@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
package/admin/src/content-manager/components/RepeatableComponent/DraggedItem/DraggingSibling.js
CHANGED
|
@@ -5,7 +5,7 @@ import { Stack } from '@strapi/design-system/Stack';
|
|
|
5
5
|
import { Flex } from '@strapi/design-system/Flex';
|
|
6
6
|
import { TextButton } from '@strapi/design-system/TextButton';
|
|
7
7
|
import { Icon } from '@strapi/design-system/Icon';
|
|
8
|
-
import {
|
|
8
|
+
import { Typography } from '@strapi/design-system/Typography';
|
|
9
9
|
import Trash from '@strapi/icons/Trash';
|
|
10
10
|
import Drag from '@strapi/icons/Drag';
|
|
11
11
|
import DropdownIcon from '@strapi/icons/CarretDown';
|
|
@@ -51,9 +51,9 @@ const DraggingSibling = ({ displayedValue }) => {
|
|
|
51
51
|
</Flex>
|
|
52
52
|
|
|
53
53
|
<ToggleButton onClick={() => {}} flex={1}>
|
|
54
|
-
<
|
|
54
|
+
<Typography fontWeight="bold" textColor="neutral700">
|
|
55
55
|
{displayedValue}
|
|
56
|
-
</
|
|
56
|
+
</Typography>
|
|
57
57
|
</ToggleButton>
|
|
58
58
|
</Stack>
|
|
59
59
|
|
|
@@ -5,7 +5,6 @@ import { useDrag, useDrop } from 'react-dnd';
|
|
|
5
5
|
import { getEmptyImage } from 'react-dnd-html5-backend';
|
|
6
6
|
import { useIntl } from 'react-intl';
|
|
7
7
|
import toString from 'lodash/toString';
|
|
8
|
-
import styled from 'styled-components';
|
|
9
8
|
import { Accordion, AccordionToggle, AccordionContent } from '@strapi/design-system/Accordion';
|
|
10
9
|
import { Grid, GridItem } from '@strapi/design-system/Grid';
|
|
11
10
|
import { Stack } from '@strapi/design-system/Stack';
|
|
@@ -21,14 +20,6 @@ import DraggingSibling from './DraggingSibling';
|
|
|
21
20
|
import { CustomIconButton, DragHandleWrapper } from './IconButtonCustoms';
|
|
22
21
|
import { connect, select } from './utils';
|
|
23
22
|
|
|
24
|
-
const StyledBox = styled(Box)`
|
|
25
|
-
> div {
|
|
26
|
-
> div:not(:first-of-type) {
|
|
27
|
-
overflow: visible;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
`;
|
|
31
|
-
|
|
32
23
|
/* eslint-disable react/no-array-index-key */
|
|
33
24
|
|
|
34
25
|
// Issues:
|
|
@@ -37,11 +28,9 @@ const StyledBox = styled(Box)`
|
|
|
37
28
|
|
|
38
29
|
const DraggedItem = ({
|
|
39
30
|
componentFieldName,
|
|
40
|
-
//
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
// hasMinError,
|
|
44
|
-
// isFirst,
|
|
31
|
+
// Errors are retrieved from the AccordionGroupCustom cloneElement
|
|
32
|
+
hasErrorMessage,
|
|
33
|
+
hasErrors,
|
|
45
34
|
isDraggingSibling,
|
|
46
35
|
isOpen,
|
|
47
36
|
isReadOnly,
|
|
@@ -171,16 +160,24 @@ const DraggedItem = ({
|
|
|
171
160
|
};
|
|
172
161
|
|
|
173
162
|
const accordionTitle = toString(displayedValue);
|
|
163
|
+
const accordionHasError = hasErrors ? 'error' : undefined;
|
|
174
164
|
|
|
175
165
|
return (
|
|
176
|
-
<
|
|
166
|
+
<Box ref={refs ? refs.dropRef : null}>
|
|
177
167
|
{isDragging && <Preview />}
|
|
178
168
|
{!isDragging && isDraggingSibling && (
|
|
179
169
|
<DraggingSibling displayedValue={accordionTitle} componentFieldName={componentFieldName} />
|
|
180
170
|
)}
|
|
181
171
|
|
|
182
172
|
{!isDragging && !isDraggingSibling && (
|
|
183
|
-
<Accordion
|
|
173
|
+
<Accordion
|
|
174
|
+
error={accordionHasError}
|
|
175
|
+
hasErrorMessage={hasErrorMessage}
|
|
176
|
+
expanded={isOpen}
|
|
177
|
+
toggle={onClickToggle}
|
|
178
|
+
id={componentFieldName}
|
|
179
|
+
size="S"
|
|
180
|
+
>
|
|
184
181
|
<AccordionToggle
|
|
185
182
|
action={
|
|
186
183
|
isReadOnly ? null : (
|
|
@@ -264,15 +261,11 @@ const DraggedItem = ({
|
|
|
264
261
|
</AccordionContent>
|
|
265
262
|
</Accordion>
|
|
266
263
|
)}
|
|
267
|
-
</
|
|
264
|
+
</Box>
|
|
268
265
|
);
|
|
269
266
|
};
|
|
270
267
|
|
|
271
268
|
DraggedItem.defaultProps = {
|
|
272
|
-
// doesPreviousFieldContainErrorsAndIsOpen: false,
|
|
273
|
-
// hasErrors: false,
|
|
274
|
-
// hasMinError: false,
|
|
275
|
-
// isFirst: false,
|
|
276
269
|
isDraggingSibling: false,
|
|
277
270
|
isOpen: false,
|
|
278
271
|
setIsDraggingSiblig: () => {},
|
|
@@ -281,10 +274,8 @@ DraggedItem.defaultProps = {
|
|
|
281
274
|
|
|
282
275
|
DraggedItem.propTypes = {
|
|
283
276
|
componentFieldName: PropTypes.string.isRequired,
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
// hasMinError: PropTypes.bool,
|
|
287
|
-
// isFirst: PropTypes.bool,
|
|
277
|
+
hasErrorMessage: PropTypes.bool.isRequired,
|
|
278
|
+
hasErrors: PropTypes.bool.isRequired,
|
|
288
279
|
isDraggingSibling: PropTypes.bool,
|
|
289
280
|
isOpen: PropTypes.bool,
|
|
290
281
|
isReadOnly: PropTypes.bool.isRequired,
|
|
@@ -6,13 +6,11 @@ import styled from 'styled-components';
|
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
7
|
import get from 'lodash/get';
|
|
8
8
|
import take from 'lodash/take';
|
|
9
|
-
// import { FormattedMessage } from 'react-intl';
|
|
10
9
|
import { useNotification } from '@strapi/helper-plugin';
|
|
11
10
|
import { Box } from '@strapi/design-system/Box';
|
|
12
11
|
import { Flex } from '@strapi/design-system/Flex';
|
|
13
12
|
import { TextButton } from '@strapi/design-system/TextButton';
|
|
14
13
|
import Plus from '@strapi/icons/Plus';
|
|
15
|
-
// import { ErrorMessage } from '@buffetjs/styles';
|
|
16
14
|
import { getMaxTempKey, getTrad } from '../../utils';
|
|
17
15
|
import { useContentTypeLayout } from '../../hooks';
|
|
18
16
|
import ItemTypes from '../../utils/ItemTypes';
|
|
@@ -43,7 +41,7 @@ const RepeatableComponent = ({
|
|
|
43
41
|
isNested,
|
|
44
42
|
isReadOnly,
|
|
45
43
|
max,
|
|
46
|
-
|
|
44
|
+
min,
|
|
47
45
|
name,
|
|
48
46
|
}) => {
|
|
49
47
|
const toggleNotification = useNotification();
|
|
@@ -75,11 +73,10 @@ const RepeatableComponent = ({
|
|
|
75
73
|
const toggleCollapses = () => {
|
|
76
74
|
setCollapseToOpen('');
|
|
77
75
|
};
|
|
78
|
-
// TODO
|
|
79
|
-
// const missingComponentsValue = min - componentValueLength;
|
|
80
|
-
const errorsArray = componentErrorKeys.map(key => get(formErrors, [key, 'id'], ''));
|
|
81
76
|
|
|
82
|
-
const
|
|
77
|
+
const missingComponentsValue = min - componentValueLength;
|
|
78
|
+
|
|
79
|
+
const hasMinError = get(formErrors, name, { id: '' }).id.includes('min');
|
|
83
80
|
|
|
84
81
|
const handleClick = useCallback(() => {
|
|
85
82
|
if (!isReadOnly) {
|
|
@@ -108,15 +105,40 @@ const RepeatableComponent = ({
|
|
|
108
105
|
toggleNotification,
|
|
109
106
|
]);
|
|
110
107
|
|
|
108
|
+
let errorMessage = formErrors[name];
|
|
109
|
+
|
|
110
|
+
if (hasMinError) {
|
|
111
|
+
errorMessage = {
|
|
112
|
+
id: getTrad('components.DynamicZone.missing-components'),
|
|
113
|
+
defaultMessage:
|
|
114
|
+
'There {number, plural, =0 {are # missing components} one {is # missing component} other {are # missing components}}',
|
|
115
|
+
values: { number: missingComponentsValue },
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
|
|
111
119
|
if (componentValueLength === 0) {
|
|
112
|
-
return
|
|
120
|
+
return (
|
|
121
|
+
<ComponentInitializer error={errorMessage} isReadOnly={isReadOnly} onClick={handleClick} />
|
|
122
|
+
);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
const doesRepComponentHasChildError = componentErrorKeys.some(
|
|
126
|
+
error => error.split('.').length > 1
|
|
127
|
+
);
|
|
128
|
+
|
|
129
|
+
if (doesRepComponentHasChildError && !hasMinError) {
|
|
130
|
+
errorMessage = {
|
|
131
|
+
id: getTrad('components.RepeatableComponent.error-message'),
|
|
132
|
+
defaultMessage: 'The component(s) contain error(s)',
|
|
133
|
+
};
|
|
113
134
|
}
|
|
114
135
|
|
|
115
136
|
return (
|
|
116
|
-
<Box hasRadius
|
|
137
|
+
<Box hasRadius ref={drop}>
|
|
117
138
|
<AccordionGroupCustom
|
|
139
|
+
error={errorMessage}
|
|
118
140
|
footer={
|
|
119
|
-
<Flex justifyContent="center" height="48px" background="neutral0"
|
|
141
|
+
<Flex justifyContent="center" height="48px" background="neutral0">
|
|
120
142
|
<TextButtonCustom disabled={isReadOnly} onClick={handleClick} startIcon={<Plus />}>
|
|
121
143
|
{formatMessage({
|
|
122
144
|
id: getTrad('containers.EditView.add.new-entry'),
|
|
@@ -130,24 +152,15 @@ const RepeatableComponent = ({
|
|
|
130
152
|
const key = data.__temp_key__;
|
|
131
153
|
const isOpen = collapseToOpen === key;
|
|
132
154
|
const componentFieldName = `${name}.${index}`;
|
|
133
|
-
const previousComponentTempKey = get(componentValue, [index - 1, '__temp_key__']);
|
|
134
|
-
const doesPreviousFieldContainErrorsAndIsOpen =
|
|
135
|
-
componentErrorKeys.includes(`${name}.${index - 1}`) &&
|
|
136
|
-
index !== 0 &&
|
|
137
|
-
collapseToOpen === previousComponentTempKey;
|
|
138
|
-
|
|
139
155
|
const hasErrors = componentErrorKeys.includes(componentFieldName);
|
|
140
156
|
|
|
141
157
|
return (
|
|
142
158
|
<DraggedItem
|
|
143
159
|
componentFieldName={componentFieldName}
|
|
144
160
|
componentUid={componentUid}
|
|
145
|
-
// TODO
|
|
146
|
-
doesPreviousFieldContainErrorsAndIsOpen={doesPreviousFieldContainErrorsAndIsOpen}
|
|
147
161
|
hasErrors={hasErrors}
|
|
148
162
|
hasMinError={hasMinError}
|
|
149
163
|
isDraggingSibling={isDraggingSibling}
|
|
150
|
-
isFirst={index === 0}
|
|
151
164
|
isOpen={isOpen}
|
|
152
165
|
isReadOnly={isReadOnly}
|
|
153
166
|
key={key}
|
|
@@ -167,139 +180,7 @@ const RepeatableComponent = ({
|
|
|
167
180
|
})}
|
|
168
181
|
</AccordionGroupCustom>
|
|
169
182
|
</Box>
|
|
170
|
-
// <Box hasRadius borderColor="neutral200">
|
|
171
|
-
// <Box ref={drop}>
|
|
172
|
-
// {componentValue.map((data, index) => {
|
|
173
|
-
// const key = data.__temp_key__;
|
|
174
|
-
// const isOpen = collapseToOpen === key;
|
|
175
|
-
// const componentFieldName = `${name}.${index}`;
|
|
176
|
-
// const previousComponentTempKey = get(componentValue, [index - 1, '__temp_key__']);
|
|
177
|
-
// const doesPreviousFieldContainErrorsAndIsOpen =
|
|
178
|
-
// componentErrorKeys.includes(`${name}.${index - 1}`) &&
|
|
179
|
-
// index !== 0 &&
|
|
180
|
-
// collapseToOpen === previousComponentTempKey;
|
|
181
|
-
|
|
182
|
-
// const hasErrors = componentErrorKeys.includes(componentFieldName);
|
|
183
|
-
|
|
184
|
-
// return (
|
|
185
|
-
// <DraggedItem
|
|
186
|
-
// componentFieldName={componentFieldName}
|
|
187
|
-
// componentUid={componentUid}
|
|
188
|
-
// // TODO
|
|
189
|
-
// doesPreviousFieldContainErrorsAndIsOpen={doesPreviousFieldContainErrorsAndIsOpen}
|
|
190
|
-
// hasErrors={hasErrors}
|
|
191
|
-
// hasMinError={hasMinError}
|
|
192
|
-
// isFirst={index === 0}
|
|
193
|
-
// isOdd={index % 2 === 1}
|
|
194
|
-
// isOpen={isOpen}
|
|
195
|
-
// isReadOnly={isReadOnly}
|
|
196
|
-
// key={key}
|
|
197
|
-
// onClickToggle={() => {
|
|
198
|
-
// if (isOpen) {
|
|
199
|
-
// setCollapseToOpen('');
|
|
200
|
-
// } else {
|
|
201
|
-
// setCollapseToOpen(key);
|
|
202
|
-
// }
|
|
203
|
-
// }}
|
|
204
|
-
// parentName={name}
|
|
205
|
-
// schema={componentLayoutData}
|
|
206
|
-
// toggleCollapses={toggleCollapses}
|
|
207
|
-
// />
|
|
208
|
-
// );
|
|
209
|
-
// })}
|
|
210
|
-
// </Box>
|
|
211
|
-
// <Button
|
|
212
|
-
// // TODO
|
|
213
|
-
// // hasMinError={hasMinError}
|
|
214
|
-
// disabled={isReadOnly}
|
|
215
|
-
// // TODO
|
|
216
|
-
// // doesPreviousFieldContainErrorsAndIsClosed={
|
|
217
|
-
// // componentValueLength > 0 &&
|
|
218
|
-
// // componentErrorKeys.includes(`${name}.${componentValueLength - 1}`) &&
|
|
219
|
-
// // componentValue[componentValueLength - 1].__temp_key__ !== collapseToOpen
|
|
220
|
-
// // }
|
|
221
|
-
// onClick={handleClick}
|
|
222
|
-
// />
|
|
223
|
-
// </Box>
|
|
224
183
|
);
|
|
225
|
-
|
|
226
|
-
// return (
|
|
227
|
-
// <div>
|
|
228
|
-
// {componentValueLength === 0 && (
|
|
229
|
-
// <EmptyComponent hasMinError={hasMinError}>
|
|
230
|
-
// <FormattedMessage id={getTrad('components.empty-repeatable')}>
|
|
231
|
-
// {msg => <p>{msg}</p>}
|
|
232
|
-
// </FormattedMessage>
|
|
233
|
-
// </EmptyComponent>
|
|
234
|
-
// )}
|
|
235
|
-
// <div ref={drop}>
|
|
236
|
-
// {componentValueLength > 0 &&
|
|
237
|
-
// componentValue.map((data, index) => {
|
|
238
|
-
// const key = data.__temp_key__;
|
|
239
|
-
// const isOpen = collapseToOpen === key;
|
|
240
|
-
// const componentFieldName = `${name}.${index}`;
|
|
241
|
-
// const previousComponentTempKey = get(componentValue, [index - 1, '__temp_key__']);
|
|
242
|
-
// const doesPreviousFieldContainErrorsAndIsOpen =
|
|
243
|
-
// componentErrorKeys.includes(`${name}.${index - 1}`) &&
|
|
244
|
-
// index !== 0 &&
|
|
245
|
-
// collapseToOpen === previousComponentTempKey;
|
|
246
|
-
|
|
247
|
-
// const hasErrors = componentErrorKeys.includes(componentFieldName);
|
|
248
|
-
|
|
249
|
-
// return (
|
|
250
|
-
// <DraggedItem
|
|
251
|
-
// componentFieldName={componentFieldName}
|
|
252
|
-
// componentUid={componentUid}
|
|
253
|
-
// doesPreviousFieldContainErrorsAndIsOpen={doesPreviousFieldContainErrorsAndIsOpen}
|
|
254
|
-
// hasErrors={hasErrors}
|
|
255
|
-
// hasMinError={hasMinError}
|
|
256
|
-
// isFirst={index === 0}
|
|
257
|
-
// isReadOnly={isReadOnly}
|
|
258
|
-
// isOpen={isOpen}
|
|
259
|
-
// key={key}
|
|
260
|
-
// onClickToggle={() => {
|
|
261
|
-
// if (isOpen) {
|
|
262
|
-
// setCollapseToOpen('');
|
|
263
|
-
// } else {
|
|
264
|
-
// setCollapseToOpen(key);
|
|
265
|
-
// }
|
|
266
|
-
// }}
|
|
267
|
-
// parentName={name}
|
|
268
|
-
// schema={componentLayoutData}
|
|
269
|
-
// toggleCollapses={toggleCollapses}
|
|
270
|
-
// />
|
|
271
|
-
// );
|
|
272
|
-
// })}
|
|
273
|
-
// </div>
|
|
274
|
-
// <Button
|
|
275
|
-
// hasMinError={hasMinError}
|
|
276
|
-
// disabled={isReadOnly}
|
|
277
|
-
// withBorderRadius={false}
|
|
278
|
-
// doesPreviousFieldContainErrorsAndIsClosed={
|
|
279
|
-
// componentValueLength > 0 &&
|
|
280
|
-
// componentErrorKeys.includes(`${name}.${componentValueLength - 1}`) &&
|
|
281
|
-
// componentValue[componentValueLength - 1].__temp_key__ !== collapseToOpen
|
|
282
|
-
// }
|
|
283
|
-
// type="button"
|
|
284
|
-
// onClick={handleClick}
|
|
285
|
-
// >
|
|
286
|
-
// <i className="fa fa-plus" />
|
|
287
|
-
// <FormattedMessage id={getTrad('containers.EditView.add.new')} />
|
|
288
|
-
// </Button>
|
|
289
|
-
// {hasMinError && (
|
|
290
|
-
// <ErrorMessage>
|
|
291
|
-
// <FormattedMessage
|
|
292
|
-
// id={getTrad(
|
|
293
|
-
// `components.DynamicZone.missing${
|
|
294
|
-
// missingComponentsValue > 1 ? '.plural' : '.singular'
|
|
295
|
-
// }`
|
|
296
|
-
// )}
|
|
297
|
-
// values={{ count: missingComponentsValue }}
|
|
298
|
-
// />
|
|
299
|
-
// </ErrorMessage>
|
|
300
|
-
// )}
|
|
301
|
-
// </div>
|
|
302
|
-
// );
|
|
303
184
|
};
|
|
304
185
|
|
|
305
186
|
RepeatableComponent.defaultProps = {
|
|
@@ -308,7 +189,7 @@ RepeatableComponent.defaultProps = {
|
|
|
308
189
|
formErrors: {},
|
|
309
190
|
isNested: false,
|
|
310
191
|
max: Infinity,
|
|
311
|
-
|
|
192
|
+
min: 0,
|
|
312
193
|
};
|
|
313
194
|
|
|
314
195
|
RepeatableComponent.propTypes = {
|
|
@@ -320,7 +201,7 @@ RepeatableComponent.propTypes = {
|
|
|
320
201
|
isNested: PropTypes.bool,
|
|
321
202
|
isReadOnly: PropTypes.bool.isRequired,
|
|
322
203
|
max: PropTypes.number,
|
|
323
|
-
|
|
204
|
+
min: PropTypes.number,
|
|
324
205
|
name: PropTypes.string.isRequired,
|
|
325
206
|
};
|
|
326
207
|
|
|
@@ -8,14 +8,13 @@ import has from 'lodash/has';
|
|
|
8
8
|
import isEmpty from 'lodash/isEmpty';
|
|
9
9
|
import { Box } from '@strapi/design-system/Box';
|
|
10
10
|
import { Flex } from '@strapi/design-system/Flex';
|
|
11
|
-
import {
|
|
11
|
+
import { Typography } from '@strapi/design-system/Typography';
|
|
12
12
|
import { Link } from '@strapi/design-system/Link';
|
|
13
13
|
import { getTrad } from '../../utils';
|
|
14
14
|
|
|
15
15
|
const StyledBullet = styled.div`
|
|
16
16
|
width: ${pxToRem(6)};
|
|
17
17
|
height: ${pxToRem(6)};
|
|
18
|
-
margin-right: ${({ theme }) => theme.spaces[2]};
|
|
19
18
|
background: ${({ theme, isDraft }) => theme.colors[isDraft ? 'secondary600' : 'success600']};
|
|
20
19
|
border-radius: 50%;
|
|
21
20
|
cursor: pointer;
|
|
@@ -60,7 +59,7 @@ function ListItem({
|
|
|
60
59
|
<Flex as="li" alignItems="center">
|
|
61
60
|
<Flex style={{ flex: 1 }} alignItems="center">
|
|
62
61
|
{hasDraftAndPublish && (
|
|
63
|
-
<Box
|
|
62
|
+
<Box paddingRight={2}>
|
|
64
63
|
<StyledBullet isDraft={isDraft} title={title} />
|
|
65
64
|
</Box>
|
|
66
65
|
)}
|
|
@@ -72,7 +71,7 @@ function ListItem({
|
|
|
72
71
|
{value || data.id}
|
|
73
72
|
</Link>
|
|
74
73
|
) : (
|
|
75
|
-
<
|
|
74
|
+
<Typography variant="pi">{value || data.id}</Typography>
|
|
76
75
|
)}
|
|
77
76
|
</Flex>
|
|
78
77
|
<RemoveRoundedButton onClick={onRemove} label="Remove" style={{ cursor }} />
|
|
@@ -5,6 +5,7 @@ import isEmpty from 'lodash/isEmpty';
|
|
|
5
5
|
import Select, { createFilter } from 'react-select';
|
|
6
6
|
import { Box } from '@strapi/design-system/Box';
|
|
7
7
|
import { Stack } from '@strapi/design-system/Stack';
|
|
8
|
+
import { Typography } from '@strapi/design-system/Typography';
|
|
8
9
|
import ListItem from './ListItem';
|
|
9
10
|
|
|
10
11
|
function SelectMany({
|
|
@@ -26,6 +27,7 @@ function SelectMany({
|
|
|
26
27
|
styles,
|
|
27
28
|
targetModel,
|
|
28
29
|
value,
|
|
30
|
+
description,
|
|
29
31
|
}) {
|
|
30
32
|
const { formatMessage } = useIntl();
|
|
31
33
|
|
|
@@ -37,7 +39,7 @@ function SelectMany({
|
|
|
37
39
|
};
|
|
38
40
|
|
|
39
41
|
return (
|
|
40
|
-
|
|
42
|
+
<Stack size={1}>
|
|
41
43
|
<Select
|
|
42
44
|
components={components}
|
|
43
45
|
isDisabled={isDisabled}
|
|
@@ -95,11 +97,17 @@ function SelectMany({
|
|
|
95
97
|
})}
|
|
96
98
|
</Stack>
|
|
97
99
|
</Box>
|
|
98
|
-
|
|
100
|
+
{description && (
|
|
101
|
+
<Typography variant="pi" textColor="neutral600">
|
|
102
|
+
{description}
|
|
103
|
+
</Typography>
|
|
104
|
+
)}
|
|
105
|
+
</Stack>
|
|
99
106
|
);
|
|
100
107
|
}
|
|
101
108
|
|
|
102
109
|
SelectMany.defaultProps = {
|
|
110
|
+
description: '',
|
|
103
111
|
components: {},
|
|
104
112
|
placeholder: null,
|
|
105
113
|
searchToPersist: null,
|
|
@@ -133,6 +141,7 @@ SelectMany.propTypes = {
|
|
|
133
141
|
styles: PropTypes.object.isRequired,
|
|
134
142
|
targetModel: PropTypes.string.isRequired,
|
|
135
143
|
value: PropTypes.array,
|
|
144
|
+
description: PropTypes.string,
|
|
136
145
|
};
|
|
137
146
|
|
|
138
147
|
export default memo(SelectMany);
|
|
@@ -5,7 +5,7 @@ import styled from 'styled-components';
|
|
|
5
5
|
import { useIntl } from 'react-intl';
|
|
6
6
|
import { pxToRem } from '@strapi/helper-plugin';
|
|
7
7
|
import { Flex } from '@strapi/design-system/Flex';
|
|
8
|
-
import {
|
|
8
|
+
import { Typography } from '@strapi/design-system/Typography';
|
|
9
9
|
import get from 'lodash/get';
|
|
10
10
|
import has from 'lodash/has';
|
|
11
11
|
import isEmpty from 'lodash/isEmpty';
|
|
@@ -41,7 +41,7 @@ const SingleValue = props => {
|
|
|
41
41
|
<Component {...props}>
|
|
42
42
|
<Flex>
|
|
43
43
|
<StyledBullet title={title} isDraft={isDraft} />
|
|
44
|
-
<
|
|
44
|
+
<Typography ellipsis>{props.data.label || '-'}</Typography>
|
|
45
45
|
</Flex>
|
|
46
46
|
</Component>
|
|
47
47
|
);
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import React, { memo } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { useIntl } from 'react-intl';
|
|
4
|
+
import { Stack } from '@strapi/design-system/Stack';
|
|
5
|
+
import { Typography } from '@strapi/design-system/Typography';
|
|
4
6
|
import get from 'lodash/get';
|
|
5
7
|
import isNull from 'lodash/isNull';
|
|
6
8
|
import Select from 'react-select';
|
|
@@ -21,36 +23,46 @@ function SelectOne({
|
|
|
21
23
|
placeholder,
|
|
22
24
|
styles,
|
|
23
25
|
value,
|
|
26
|
+
description,
|
|
24
27
|
}) {
|
|
25
28
|
const { formatMessage } = useIntl();
|
|
26
29
|
|
|
27
30
|
return (
|
|
28
|
-
<
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
placeholder
|
|
31
|
+
<Stack size={1}>
|
|
32
|
+
<Select
|
|
33
|
+
components={{
|
|
34
|
+
...components,
|
|
35
|
+
SingleValue,
|
|
36
|
+
}}
|
|
37
|
+
id={name}
|
|
38
|
+
isClearable
|
|
39
|
+
isDisabled={isDisabled}
|
|
40
|
+
isLoading={isLoading}
|
|
41
|
+
mainField={mainField}
|
|
42
|
+
options={options}
|
|
43
|
+
onChange={onChange}
|
|
44
|
+
onInputChange={onInputChange}
|
|
45
|
+
onMenuClose={onMenuClose}
|
|
46
|
+
onMenuOpen={onMenuOpen}
|
|
47
|
+
onMenuScrollToBottom={onMenuScrollToBottom}
|
|
48
|
+
placeholder={formatMessage(
|
|
49
|
+
placeholder || { id: 'components.Select.placeholder', defaultMessage: 'Select...' }
|
|
50
|
+
)}
|
|
51
|
+
styles={styles}
|
|
52
|
+
value={isNull(value) ? null : { label: get(value, [mainField.name], ''), value }}
|
|
53
|
+
/>
|
|
54
|
+
|
|
55
|
+
{description && (
|
|
56
|
+
<Typography variant="pi" textColor="neutral600">
|
|
57
|
+
{description}
|
|
58
|
+
</Typography>
|
|
46
59
|
)}
|
|
47
|
-
|
|
48
|
-
value={isNull(value) ? null : { label: get(value, [mainField.name], ''), value }}
|
|
49
|
-
/>
|
|
60
|
+
</Stack>
|
|
50
61
|
);
|
|
51
62
|
}
|
|
52
63
|
|
|
53
64
|
SelectOne.defaultProps = {
|
|
65
|
+
description: '',
|
|
54
66
|
components: {},
|
|
55
67
|
placeholder: null,
|
|
56
68
|
value: null,
|
|
@@ -79,6 +91,7 @@ SelectOne.propTypes = {
|
|
|
79
91
|
}),
|
|
80
92
|
styles: PropTypes.object.isRequired,
|
|
81
93
|
value: PropTypes.object,
|
|
94
|
+
description: PropTypes.string,
|
|
82
95
|
};
|
|
83
96
|
|
|
84
97
|
export default memo(SelectOne);
|
|
@@ -4,7 +4,7 @@ import { useIntl } from 'react-intl';
|
|
|
4
4
|
import styled from 'styled-components';
|
|
5
5
|
import { Box } from '@strapi/design-system/Box';
|
|
6
6
|
import { Flex } from '@strapi/design-system/Flex';
|
|
7
|
-
import {
|
|
7
|
+
import { Typography } from '@strapi/design-system/Typography';
|
|
8
8
|
|
|
9
9
|
const LabelAction = styled(Box)`
|
|
10
10
|
svg path {
|
|
@@ -19,10 +19,16 @@ const Label = ({ intlLabel, id, labelAction, link, name, numberOfEntries, isSing
|
|
|
19
19
|
return (
|
|
20
20
|
<Flex justifyContent="space-between">
|
|
21
21
|
<Flex>
|
|
22
|
-
<
|
|
22
|
+
<Typography
|
|
23
|
+
textColor="neutral800"
|
|
24
|
+
htmlFor={id || name}
|
|
25
|
+
variant="pi"
|
|
26
|
+
fontWeight="bold"
|
|
27
|
+
as="label"
|
|
28
|
+
>
|
|
23
29
|
{label}
|
|
24
30
|
{!isSingle && <> ({numberOfEntries})</>}
|
|
25
|
-
</
|
|
31
|
+
</Typography>
|
|
26
32
|
{labelAction && <LabelAction paddingLeft={1}>{labelAction}</LabelAction>}
|
|
27
33
|
</Flex>
|
|
28
34
|
{link}
|
|
@@ -5,7 +5,7 @@ import { useIntl } from 'react-intl';
|
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import { get, has, isEmpty } from 'lodash';
|
|
7
7
|
import { Flex } from '@strapi/design-system/Flex';
|
|
8
|
-
import {
|
|
8
|
+
import { Typography } from '@strapi/design-system/Typography';
|
|
9
9
|
import { pxToRem } from '@strapi/helper-plugin';
|
|
10
10
|
import { getTrad } from '../../utils';
|
|
11
11
|
|
|
@@ -40,7 +40,7 @@ const Option = props => {
|
|
|
40
40
|
<Component {...props}>
|
|
41
41
|
<Flex>
|
|
42
42
|
<StyledBullet title={title} isDraft={isDraft} />
|
|
43
|
-
<
|
|
43
|
+
<Typography ellipsis>{props.label || '-'}</Typography>
|
|
44
44
|
</Flex>
|
|
45
45
|
</Component>
|
|
46
46
|
);
|
|
@@ -50,7 +50,7 @@ const buildParams = (query, paramsToKeep) => {
|
|
|
50
50
|
}, {});
|
|
51
51
|
};
|
|
52
52
|
function SelectWrapper({
|
|
53
|
-
|
|
53
|
+
description,
|
|
54
54
|
editable,
|
|
55
55
|
labelAction,
|
|
56
56
|
intlLabel,
|
|
@@ -316,6 +316,7 @@ function SelectWrapper({
|
|
|
316
316
|
styles={styles}
|
|
317
317
|
targetModel={targetModel}
|
|
318
318
|
value={value}
|
|
319
|
+
description={description}
|
|
319
320
|
/>
|
|
320
321
|
</Stack>
|
|
321
322
|
);
|
|
@@ -390,7 +391,7 @@ function SelectWrapper({
|
|
|
390
391
|
|
|
391
392
|
SelectWrapper.defaultProps = {
|
|
392
393
|
editable: true,
|
|
393
|
-
|
|
394
|
+
description: '',
|
|
394
395
|
labelAction: null,
|
|
395
396
|
isFieldAllowed: true,
|
|
396
397
|
placeholder: null,
|
|
@@ -398,11 +399,7 @@ SelectWrapper.defaultProps = {
|
|
|
398
399
|
|
|
399
400
|
SelectWrapper.propTypes = {
|
|
400
401
|
editable: PropTypes.bool,
|
|
401
|
-
|
|
402
|
-
// id: PropTypes.string.isRequired,
|
|
403
|
-
// defaultMessage: PropTypes.string.isRequired,
|
|
404
|
-
// values: PropTypes.object,
|
|
405
|
-
// }),
|
|
402
|
+
description: PropTypes.string,
|
|
406
403
|
intlLabel: PropTypes.shape({
|
|
407
404
|
id: PropTypes.string.isRequired,
|
|
408
405
|
defaultMessage: PropTypes.string.isRequired,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { useIntl } from 'react-intl';
|
|
4
|
-
import {
|
|
4
|
+
import { Typography } from '@strapi/design-system/Typography';
|
|
5
5
|
import { Box } from '@strapi/design-system/Box';
|
|
6
6
|
import { getTrad } from '../../utils';
|
|
7
7
|
|
|
@@ -23,9 +23,9 @@ const State = ({ isPublished }) => {
|
|
|
23
23
|
paddingRight={2}
|
|
24
24
|
style={{ width: 'fit-content' }}
|
|
25
25
|
>
|
|
26
|
-
<
|
|
26
|
+
<Typography fontWeight="bold" textColor={textColor}>
|
|
27
27
|
{content}
|
|
28
|
-
</
|
|
28
|
+
</Typography>
|
|
29
29
|
</Box>
|
|
30
30
|
);
|
|
31
31
|
};
|