@strapi/admin 4.0.0 → 4.0.4
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/LeftMenu/index.js +13 -5
- package/admin/src/components/Notifications/Notification/index.js +3 -3
- package/admin/src/content-manager/components/CollectionTypeFormWrapper/index.js +2 -2
- package/admin/src/content-manager/components/ComponentInitializer/index.js +4 -9
- package/admin/src/content-manager/components/DragLayer/index.js +1 -1
- package/admin/src/content-manager/components/DynamicTable/CellContent/CellValue.js +12 -2
- package/admin/src/content-manager/components/DynamicTable/CellContent/utils/getNumberOfDecimals.js +8 -0
- package/admin/src/content-manager/components/DynamicTable/index.js +7 -0
- package/admin/src/content-manager/components/DynamicZone/components/DzLabel/index.js +24 -7
- package/admin/src/content-manager/components/DynamicZone/index.js +31 -15
- package/admin/src/content-manager/components/EditViewDataManagerProvider/utils/schema.js +4 -1
- package/admin/src/content-manager/components/InputUID/index.js +4 -0
- package/admin/src/content-manager/components/PreviewWysiwyg/Wrapper.js +4 -0
- package/admin/src/content-manager/components/RepeatableComponent/AccordionGroupCustom/index.js +1 -3
- package/admin/src/content-manager/components/RepeatableComponent/DraggedItem/IconButtonCustoms.js +0 -4
- package/admin/src/content-manager/components/RepeatableComponent/DraggedItem/index.js +36 -14
- package/admin/src/content-manager/components/RepeatableComponent/index.js +2 -2
- package/admin/src/content-manager/components/SelectWrapper/index.js +15 -81
- package/admin/src/content-manager/components/Wysiwyg/Editor.js +2 -3
- package/admin/src/content-manager/components/Wysiwyg/EditorLayout.js +2 -0
- package/admin/src/content-manager/components/Wysiwyg/WysiwygFooter.js +2 -4
- package/admin/src/content-manager/components/Wysiwyg/WysiwygNav.js +67 -62
- package/admin/src/content-manager/components/Wysiwyg/index.js +13 -4
- package/admin/src/content-manager/hooks/useFetchContentTypeLayout/utils/formatLayouts.js +2 -2
- package/admin/src/content-manager/pages/App/LeftMenu/index.js +5 -7
- package/admin/src/content-manager/pages/App/index.js +12 -4
- package/admin/src/content-manager/pages/EditSettingsView/components/DisplayedFieldButton.js +1 -1
- package/admin/src/content-manager/pages/EditSettingsView/components/FieldButtonContent.js +1 -1
- package/admin/src/content-manager/pages/EditSettingsView/components/RelationalFieldButton.js +1 -1
- package/admin/src/content-manager/pages/EditSettingsView/index.js +1 -1
- package/admin/src/content-manager/pages/EditView/Informations/index.js +37 -13
- package/admin/src/content-manager/pages/ListSettingsView/components/CardPreview.js +19 -8
- package/admin/src/content-manager/pages/ListSettingsView/components/DraggableCard.js +124 -67
- package/admin/src/content-manager/pages/ListSettingsView/components/SortDisplayedFields.js +4 -1
- package/admin/src/content-manager/pages/ListSettingsView/index.js +1 -1
- package/admin/src/content-manager/pages/ListView/index.js +37 -20
- package/admin/src/hooks/useSettingsMenu/utils/defaultGlobalLinks.js +1 -1
- package/admin/src/pages/App/utils/unique-identifier.js +3 -1
- package/admin/src/pages/AuthPage/components/Register/index.js +4 -1
- package/admin/src/pages/AuthPage/index.js +8 -2
- package/admin/src/pages/AuthPage/utils/forms.js +2 -0
- package/admin/src/pages/ProfilePage/index.js +34 -6
- package/admin/src/pages/SettingsPage/pages/ApiTokens/EditView/index.js +3 -2
- package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/index.js +20 -7
- package/admin/src/pages/SettingsPage/pages/Roles/EditPage/index.js +1 -1
- package/admin/src/pages/SettingsPage/pages/Users/EditPage/index.js +3 -3
- package/admin/src/pages/SettingsPage/pages/Users/EditPage/utils/layout.js +2 -0
- package/admin/src/pages/SettingsPage/pages/Users/ListPage/ModalForm/index.js +3 -3
- package/admin/src/pages/SettingsPage/pages/Users/ListPage/ModalForm/utils/layout.js +2 -0
- package/admin/src/pages/SettingsPage/pages/Users/ListPage/ModalForm/utils/stepper.js +1 -1
- package/admin/src/pages/SettingsPage/pages/Users/ListPage/index.js +5 -11
- package/admin/src/pages/SettingsPage/pages/Users/ListPage/utils/tableHeaders.js +1 -1
- package/admin/src/pages/SettingsPage/pages/Users/components/MagicLink/index.js +1 -1
- package/admin/src/pages/SettingsPage/pages/Users/components/SelectRoles/index.js +2 -1
- package/admin/src/pages/SettingsPage/pages/Webhooks/EditView/components/EventInput/index.js +1 -1
- package/admin/src/pages/SettingsPage/pages/Webhooks/EditView/components/HeadersInput/index.js +1 -1
- package/admin/src/pages/SettingsPage/pages/Webhooks/EditView/components/WebhookForm/index.js +3 -1
- package/admin/src/pages/SettingsPage/pages/Webhooks/ListView/index.js +5 -5
- package/admin/src/translations/en.json +32 -23
- package/admin/src/translations/fr.json +315 -6
- package/admin/src/translations/ko.json +670 -263
- package/admin/src/translations/nl.json +1 -1
- package/admin/src/translations/zh-Hans.json +554 -204
- package/admin/src/translations/zh.json +482 -41
- package/build/{01a600d9e6e0dea21e33017a97bdf431.png → 01a600d9e6e0dea21e33.png} +0 -0
- package/build/{15026a3d58aeb282813457f060f2d6ac.png → 15026a3d58aeb2828134.png} +0 -0
- package/build/{1551f4f60c37af51121f106501f69b80.woff2 → 1551f4f60c37af51121f.woff2} +0 -0
- package/build/{1e59d2330b4c6deb84b340635ed36249.ttf → 1e59d2330b4c6deb84b3.ttf} +0 -0
- package/build/{20fd1704ea223900efa9fd4e869efb08.woff2 → 20fd1704ea223900efa9.woff2} +0 -0
- package/build/{2285773e6b4b172f07d9b777c81b0775.woff → 2285773e6b4b172f07d9.woff} +0 -0
- package/build/{23f19bb08961f37aaf692ff943823453.eot → 23f19bb08961f37aaf69.eot} +0 -0
- package/build/{2a9e9ef5c4c775bb7c7b3625041b1354.png → 2a9e9ef5c4c775bb7c7b.png} +0 -0
- package/build/{2f517e09eb2ca6650ff5bec5a95157ab.svg → 2f517e09eb2ca6650ff5.svg} +0 -0
- package/build/3742.2281afd7.chunk.js +1 -0
- package/build/4045.0b43d55e.chunk.js +1 -0
- package/build/4261.061aed35.chunk.js +1 -0
- package/build/4672.7ad6782a.chunk.js +1 -0
- package/build/{4689f52cc96215721344e51e5831eec1.svg → 4689f52cc96215721344.svg} +0 -0
- package/build/{4715.35096dd7.chunk.js → 4715.f134f37a.chunk.js} +1 -1
- package/build/{491974d108fe4002b2aaf7ffc48249a0.ttf → 491974d108fe4002b2aa.ttf} +0 -0
- package/build/{527940b104eb2ea366c8630f3f038603.ttf → 527940b104eb2ea366c8.ttf} +0 -0
- package/build/6060.3af8877e.chunk.js +2 -0
- package/build/{3226.0dc582b2.chunk.js.LICENSE.txt → 6060.3af8877e.chunk.js.LICENSE.txt} +1 -1
- package/build/{6250.11ba8b50.chunk.js → 6250.7b4872b1.chunk.js} +1 -1
- package/build/{5881.deb18c91.chunk.js → 6354.48168bc8.chunk.js} +2 -2
- package/build/{5881.deb18c91.chunk.js.LICENSE.txt → 6354.48168bc8.chunk.js.LICENSE.txt} +0 -0
- package/build/{77206a6bb316fa0aded5083cc57f92b9.eot → 77206a6bb316fa0aded5.eot} +0 -0
- package/build/{7a3337626410ca2f40718481c755640f.woff2 → 7a3337626410ca2f4071.woff2} +0 -0
- package/build/{7a8b4f130182d19a2d7c67d80c090397.svg → 7a8b4f130182d19a2d7c.svg} +0 -0
- package/build/8530.a978bde6.chunk.js +2 -0
- package/build/8530.a978bde6.chunk.js.LICENSE.txt +7 -0
- package/build/{8b43027f47b20503057dfbbaa9401fef.eot → 8b43027f47b20503057d.eot} +0 -0
- package/build/{9bbb245e67a133f6e486d8d2545e14a5.eot → 9bbb245e67a133f6e486.eot} +0 -0
- package/build/Admin-authenticatedApp.8c375af0.chunk.js +1 -0
- package/build/{Admin_homePage.31e37124.chunk.js → Admin_homePage.f9cdd615.chunk.js} +1 -1
- package/build/Admin_marketplace.4f6c77f2.chunk.js +1 -0
- package/build/Admin_pluginsPage.cd9a871c.chunk.js +1 -0
- package/build/Admin_profilePage.077e17a5.chunk.js +1 -0
- package/build/Admin_settingsPage.9752ef85.chunk.js +1 -0
- package/build/admin-edit-roles-page.27b047fc.chunk.js +1 -0
- package/build/admin-edit-users.a0dede23.chunk.js +1 -0
- package/build/admin-users.a11177c1.chunk.js +1 -0
- package/build/{api-tokens-create-page.ac4285ba.chunk.js → api-tokens-create-page.07be3e07.chunk.js} +1 -1
- package/build/{api-tokens-edit-page.b8900ddd.chunk.js → api-tokens-edit-page.d6afc60e.chunk.js} +1 -1
- package/build/api-tokens-list-page.da9714d8.chunk.js +1 -0
- package/build/{ar-json.9805489e.chunk.js → ar-json.d79e4709.chunk.js} +1 -1
- package/build/{b997a22a2e0b87ef1fa23258f14f3b27.ico → b997a22a2e0b87ef1fa2.ico} +0 -0
- package/build/{bb58e57c48a3e911f15fa834ff00d44a.woff → bb58e57c48a3e911f15f.woff} +0 -0
- package/build/{bd81ba6c07827282255d031b2a6f4fe4.png → bd81ba6c07827282255d.png} +0 -0
- package/build/{be9ee23c0c6390141475d519c2c5fb8f.ttf → be9ee23c0c6390141475.ttf} +0 -0
- package/build/{c1e38fd9e0e74ba58f7a2b77ef29fdd3.svg → c1e38fd9e0e74ba58f7a.svg} +0 -0
- package/build/{c3de6118ef47086ad05c83a1c78f006d.png → c3de6118ef47086ad05c.png} +0 -0
- package/build/codemirror-css.f9701755.chunk.js +1 -0
- package/build/codemirror-theme.1563c1c2.chunk.js +1 -0
- package/build/content-manager.51651b3b.chunk.js +1 -0
- package/build/{content-type-builder-translation-ar-json.bce4d624.chunk.js → content-type-builder-translation-ar-json.f1fedc12.chunk.js} +1 -1
- package/build/{content-type-builder-translation-cs-json.785866b6.chunk.js → content-type-builder-translation-cs-json.2f7e2289.chunk.js} +1 -1
- package/build/{content-type-builder-translation-de-json.6faa019a.chunk.js → content-type-builder-translation-de-json.46017754.chunk.js} +1 -1
- package/build/content-type-builder-translation-dk-json.5c6344f9.chunk.js +1 -0
- package/build/{content-type-builder-translation-en-json.d860718a.chunk.js → content-type-builder-translation-en-json.d70fc3af.chunk.js} +1 -1
- package/build/{content-type-builder-translation-es-json.5a4f519b.chunk.js → content-type-builder-translation-es-json.7e2055ad.chunk.js} +1 -1
- package/build/{content-type-builder-translation-fr-json.2156f48c.chunk.js → content-type-builder-translation-fr-json.8f66eb66.chunk.js} +1 -1
- package/build/content-type-builder-translation-id-json.aab2f426.chunk.js +1 -0
- package/build/{content-type-builder-translation-it-json.dc154c62.chunk.js → content-type-builder-translation-it-json.4c91e895.chunk.js} +1 -1
- package/build/{content-type-builder-translation-ja-json.9f8695a0.chunk.js → content-type-builder-translation-ja-json.c239ba90.chunk.js} +1 -1
- package/build/content-type-builder-translation-ko-json.2a5e0769.chunk.js +1 -0
- package/build/{content-type-builder-translation-ms-json.cfc21fb6.chunk.js → content-type-builder-translation-ms-json.124be88c.chunk.js} +1 -1
- package/build/{content-type-builder-translation-nl-json.4d742025.chunk.js → content-type-builder-translation-nl-json.98a240b8.chunk.js} +1 -1
- package/build/{content-type-builder-translation-pl-json.1b701a76.chunk.js → content-type-builder-translation-pl-json.2abc61bd.chunk.js} +1 -1
- package/build/{content-type-builder-translation-pt-BR-json.2c514ada.chunk.js → content-type-builder-translation-pt-BR-json.c0415545.chunk.js} +1 -1
- package/build/{content-type-builder-translation-pt-json.a3c4315c.chunk.js → content-type-builder-translation-pt-json.ab3e086d.chunk.js} +1 -1
- package/build/{content-type-builder-translation-ru-json.72173619.chunk.js → content-type-builder-translation-ru-json.1a6779fd.chunk.js} +1 -1
- package/build/{content-type-builder-translation-sk-json.e654be3b.chunk.js → content-type-builder-translation-sk-json.5c82f020.chunk.js} +1 -1
- package/build/{content-type-builder-translation-th-json.403aa6a4.chunk.js → content-type-builder-translation-th-json.24ee19eb.chunk.js} +1 -1
- package/build/{content-type-builder-translation-tr-json.72027971.chunk.js → content-type-builder-translation-tr-json.30434835.chunk.js} +1 -1
- package/build/{content-type-builder-translation-uk-json.a1b9f71b.chunk.js → content-type-builder-translation-uk-json.771662ef.chunk.js} +1 -1
- package/build/{content-type-builder-translation-zh-Hans-json.4c242866.chunk.js → content-type-builder-translation-zh-Hans-json.070020ae.chunk.js} +1 -1
- package/build/{content-type-builder-translation-zh-json.3b3eb4e8.chunk.js → content-type-builder-translation-zh-json.9708310d.chunk.js} +1 -1
- package/build/content-type-builder.c815d0c6.chunk.js +1 -0
- package/build/cropper-css.45c47fe3.chunk.js +1 -0
- package/build/{cs-json.ff08076e.chunk.js → cs-json.b8ba75b8.chunk.js} +1 -1
- package/build/{d878b0a6a1144760244ff0665888404c.woff2 → d878b0a6a1144760244f.woff2} +0 -0
- package/build/de-json.e01bdeae.chunk.js +1 -0
- package/build/dk-json.9516eb08.chunk.js +1 -0
- package/build/{eeccf4f66002c6f2ba24d3d22f2434c2.woff → eeccf4f66002c6f2ba24.woff} +0 -0
- package/build/email-settings-page.03e18bb2.chunk.js +1 -0
- package/build/email-translation-ar-json.95d90eb4.chunk.js +1 -0
- package/build/email-translation-cs-json.dfd1f3f2.chunk.js +1 -0
- package/build/email-translation-de-json.559a7d5f.chunk.js +1 -0
- package/build/email-translation-dk-json.e1480892.chunk.js +1 -0
- package/build/email-translation-en-json.fa0dc92b.chunk.js +1 -0
- package/build/email-translation-es-json.abbba8e3.chunk.js +1 -0
- package/build/email-translation-fr-json.49c3c888.chunk.js +1 -0
- package/build/email-translation-id-json.e3c2101d.chunk.js +1 -0
- package/build/email-translation-it-json.3de61cb6.chunk.js +1 -0
- package/build/email-translation-ja-json.66337e44.chunk.js +1 -0
- package/build/email-translation-ko-json.52bbd7b4.chunk.js +1 -0
- package/build/email-translation-ms-json.e39256df.chunk.js +1 -0
- package/build/email-translation-nl-json.12d28adb.chunk.js +1 -0
- package/build/email-translation-pl-json.9585a84e.chunk.js +1 -0
- package/build/email-translation-pt-BR-json.6c04b3ef.chunk.js +1 -0
- package/build/email-translation-pt-json.0239be04.chunk.js +1 -0
- package/build/email-translation-ru-json.f3b4fecc.chunk.js +1 -0
- package/build/email-translation-sk-json.76dbaaa6.chunk.js +1 -0
- package/build/email-translation-th-json.25ad73e7.chunk.js +1 -0
- package/build/email-translation-tr-json.ae04a9f2.chunk.js +1 -0
- package/build/email-translation-uk-json.03b27b08.chunk.js +1 -0
- package/build/email-translation-vi-json.3e1dd5b3.chunk.js +1 -0
- package/build/email-translation-zh-Hans-json.0df4ca59.chunk.js +1 -0
- package/build/email-translation-zh-json.82978eb0.chunk.js +1 -0
- package/build/en-json.9e3c8615.chunk.js +1 -0
- package/build/{es-json.060b658c.chunk.js → es-json.fa8ddd1d.chunk.js} +1 -1
- package/build/{f691f37e57f04c152e2315ab7dbad881.woff → f691f37e57f04c152e23.woff} +0 -0
- package/build/{fde9b1ad0670d29a251605a5e8eef02b.png → fde9b1ad0670d29a2516.png} +0 -0
- package/build/fontawesome-css-all.9c41f1d7.chunk.js +1 -0
- package/build/fontawesome-css.24c8dbfc.chunk.js +1 -0
- package/build/fr-json.bae03a2c.chunk.js +1 -0
- package/build/{he-json.fafa8569.chunk.js → he-json.86f9e663.chunk.js} +1 -1
- package/build/highlight.js.90b600ee.chunk.js +1 -0
- package/build/i18n-settings-page.89d1776c.chunk.js +1 -0
- package/build/i18n-translation-en-json.239b740f.chunk.js +1 -0
- package/build/i18n-translation-fr-json.b52474fc.chunk.js +1 -0
- package/build/i18n-translation-ko-json.e88e11ef.chunk.js +1 -0
- package/build/{i18n-translation-zh-Hans-json.670b4940.chunk.js → i18n-translation-zh-Hans-json.4c17fed0.chunk.js} +1 -1
- package/build/{id-json.3372dadc.chunk.js → id-json.0b0c9731.chunk.js} +1 -1
- package/build/index.html +1 -1
- package/build/{it-json.0e5d5fdb.chunk.js → it-json.939916bc.chunk.js} +1 -1
- package/build/{ja-json.14eaee93.chunk.js → ja-json.57abaacb.chunk.js} +1 -1
- package/build/ko-json.29633034.chunk.js +1 -0
- package/build/main.ca080a1e.js +2 -0
- package/build/{main.a5bd9650.js.LICENSE.txt → main.ca080a1e.js.LICENSE.txt} +0 -0
- package/build/{ms-json.a66beabc.chunk.js → ms-json.5e5d12f9.chunk.js} +1 -1
- package/build/nl-json.d757328d.chunk.js +1 -0
- package/build/{no-json.25f63ee7.chunk.js → no-json.ff46b126.chunk.js} +1 -1
- package/build/{pl-json.3d7884e1.chunk.js → pl-json.6bff1d54.chunk.js} +1 -1
- package/build/{pt-BR-json.e21cd994.chunk.js → pt-BR-json.6d1cfdb2.chunk.js} +1 -1
- package/build/{pt-json.21a66a61.chunk.js → pt-json.b23d9a79.chunk.js} +1 -1
- package/build/{ru-json.ca2b6c3c.chunk.js → ru-json.bff93229.chunk.js} +1 -1
- package/build/runtime~main.6f530910.js +1 -0
- package/build/{sk-json.7f750e28.chunk.js → sk-json.2eb1ec0d.chunk.js} +1 -1
- package/build/sso-settings-page.d4ab164b.chunk.js +1 -0
- package/build/{sv-json.3b5cc7f9.chunk.js → sv-json.8ac61ecf.chunk.js} +1 -1
- package/build/{th-json.694b4038.chunk.js → th-json.6e4502a3.chunk.js} +1 -1
- package/build/{tr-json.a842843a.chunk.js → tr-json.eaca955b.chunk.js} +1 -1
- package/build/uk-json.c50ad2a8.chunk.js +1 -0
- package/build/{upload-settings.8a380d3d.chunk.js → upload-settings.aa148b01.chunk.js} +1 -1
- package/build/{upload-translation-de-json.b4ff3c56.chunk.js → upload-translation-de-json.00f90715.chunk.js} +1 -1
- package/build/{upload-translation-dk-json.f37ae5c0.chunk.js → upload-translation-dk-json.e8c0a891.chunk.js} +1 -1
- package/build/{upload-translation-en-json.58d8ce44.chunk.js → upload-translation-en-json.31ea0622.chunk.js} +1 -1
- package/build/upload-translation-es-json.42b5c758.chunk.js +1 -0
- package/build/{upload-translation-fr-json.0f4b3839.chunk.js → upload-translation-fr-json.ccb4ad8b.chunk.js} +1 -1
- package/build/{upload-translation-he-json.4b5e48bc.chunk.js → upload-translation-he-json.5dc34ea8.chunk.js} +1 -1
- package/build/upload-translation-it-json.c1809a47.chunk.js +1 -0
- package/build/{upload-translation-ja-json.9e1193c7.chunk.js → upload-translation-ja-json.568f097e.chunk.js} +1 -1
- package/build/upload-translation-ko-json.da369eef.chunk.js +1 -0
- package/build/{upload-translation-ms-json.bfb86c2e.chunk.js → upload-translation-ms-json.be669f81.chunk.js} +1 -1
- package/build/{upload-translation-pl-json.e0282fa4.chunk.js → upload-translation-pl-json.67685825.chunk.js} +1 -1
- package/build/{upload-translation-pt-BR-json.ad6bb9f8.chunk.js → upload-translation-pt-BR-json.f7b1133d.chunk.js} +1 -1
- package/build/{upload-translation-ru-json.4303b6a0.chunk.js → upload-translation-ru-json.54c031aa.chunk.js} +1 -1
- package/build/{upload-translation-sk-json.90a0bc6c.chunk.js → upload-translation-sk-json.f643dfc2.chunk.js} +1 -1
- package/build/{upload-translation-th-json.cf0d62e0.chunk.js → upload-translation-th-json.88ee2090.chunk.js} +1 -1
- package/build/{upload-translation-uk-json.ec345d61.chunk.js → upload-translation-uk-json.1a90e73c.chunk.js} +1 -1
- package/build/{upload-translation-zh-Hans-json.f320fa39.chunk.js → upload-translation-zh-Hans-json.ac1dc0b9.chunk.js} +1 -1
- package/build/{upload-translation-zh-json.9ad30216.chunk.js → upload-translation-zh-json.164ac601.chunk.js} +1 -1
- package/build/{upload.1e3e2685.chunk.js → upload.1991e997.chunk.js} +1 -1
- package/build/{users-advanced-settings-page.bda19eae.chunk.js → users-advanced-settings-page.23ed7ee9.chunk.js} +1 -1
- package/build/users-email-settings-page.64dc429a.chunk.js +1 -0
- package/build/{users-permissions-translation-ar-json.6fe0dcf5.chunk.js → users-permissions-translation-ar-json.bdddd0d7.chunk.js} +1 -1
- package/build/{users-permissions-translation-cs-json.dd4bb452.chunk.js → users-permissions-translation-cs-json.7881d3ff.chunk.js} +1 -1
- package/build/{users-permissions-translation-de-json.1505b462.chunk.js → users-permissions-translation-de-json.8d53c619.chunk.js} +1 -1
- package/build/{users-permissions-translation-dk-json.6b47229f.chunk.js → users-permissions-translation-dk-json.a36b323b.chunk.js} +1 -1
- package/build/{users-permissions-translation-en-json.3e650c44.chunk.js → users-permissions-translation-en-json.1993655e.chunk.js} +1 -1
- package/build/{users-permissions-translation-es-json.768cc00e.chunk.js → users-permissions-translation-es-json.c8ef51bd.chunk.js} +1 -1
- package/build/users-permissions-translation-fr-json.a2172545.chunk.js +1 -0
- package/build/users-permissions-translation-id-json.8f17982a.chunk.js +1 -0
- package/build/{users-permissions-translation-it-json.baa4f859.chunk.js → users-permissions-translation-it-json.87952a24.chunk.js} +1 -1
- package/build/{users-permissions-translation-ja-json.3ddd4418.chunk.js → users-permissions-translation-ja-json.5915d9ef.chunk.js} +1 -1
- package/build/users-permissions-translation-ko-json.f1ca6cc4.chunk.js +1 -0
- package/build/{users-permissions-translation-ms-json.dc405667.chunk.js → users-permissions-translation-ms-json.2268324c.chunk.js} +1 -1
- package/build/{users-permissions-translation-nl-json.2d8e847a.chunk.js → users-permissions-translation-nl-json.4e1231dd.chunk.js} +1 -1
- package/build/{users-permissions-translation-pl-json.b150dfb0.chunk.js → users-permissions-translation-pl-json.107638b5.chunk.js} +1 -1
- package/build/{users-permissions-translation-pt-BR-json.0c494c69.chunk.js → users-permissions-translation-pt-BR-json.8dafc053.chunk.js} +1 -1
- package/build/{users-permissions-translation-pt-json.0fccc389.chunk.js → users-permissions-translation-pt-json.3322464f.chunk.js} +1 -1
- package/build/users-permissions-translation-ru-json.44dd1f10.chunk.js +1 -0
- package/build/{users-permissions-translation-sk-json.2602e768.chunk.js → users-permissions-translation-sk-json.fe7cc044.chunk.js} +1 -1
- package/build/users-permissions-translation-sv-json.e7e1684b.chunk.js +1 -0
- package/build/{users-permissions-translation-th-json.abe0558b.chunk.js → users-permissions-translation-th-json.bb544ee3.chunk.js} +1 -1
- package/build/{users-permissions-translation-tr-json.269ee593.chunk.js → users-permissions-translation-tr-json.30f3ca90.chunk.js} +1 -1
- package/build/{users-permissions-translation-uk-json.ffd9a4ee.chunk.js → users-permissions-translation-uk-json.634f2569.chunk.js} +1 -1
- package/build/{users-permissions-translation-vi-json.c2cd19d5.chunk.js → users-permissions-translation-vi-json.605d88bc.chunk.js} +1 -1
- package/build/{users-permissions-translation-zh-Hans-json.2d909528.chunk.js → users-permissions-translation-zh-Hans-json.85480dab.chunk.js} +1 -1
- package/build/{users-permissions-translation-zh-json.7f3027c5.chunk.js → users-permissions-translation-zh-json.99932731.chunk.js} +1 -1
- package/build/users-providers-settings-page.329f102a.chunk.js +1 -0
- package/build/users-roles-settings-page.e28982b6.chunk.js +1 -0
- package/build/{vi-json.c25f42fe.chunk.js → vi-json.e993857a.chunk.js} +1 -1
- package/build/webhook-edit-page.678af4e2.chunk.js +1 -0
- package/build/{webhook-list-page.aae66737.chunk.js → webhook-list-page.5abda9c2.chunk.js} +1 -1
- package/build/zh-Hans-json.fcc53388.chunk.js +1 -0
- package/build/zh-json.496bd6c4.chunk.js +1 -0
- package/ee/admin/pages/SettingsPage/pages/Roles/CreatePage/index.js +1 -1
- package/ee/admin/pages/SettingsPage/pages/Users/components/MagicLink/index.js +1 -1
- package/index.html +1 -1
- package/index.js +40 -1
- package/jest.config.front.js +10 -0
- package/package.json +36 -38
- package/server/register.js +5 -0
- package/server/routes/serve-admin-panel.js +59 -0
- package/server/strategies/api-token.js +2 -1
- package/webpack.alias.js +0 -6
- package/webpack.config.js +12 -10
- package/build/3226.0dc582b2.chunk.js +0 -2
- package/build/4261.b7b7ac00.chunk.js +0 -1
- package/build/4362.e71cf036.chunk.js +0 -1
- package/build/8447.32ee17be.chunk.js +0 -2
- package/build/8447.32ee17be.chunk.js.LICENSE.txt +0 -22
- package/build/849.fc26299c.chunk.js +0 -1
- package/build/9238.f112d6c9.chunk.js +0 -1
- package/build/Admin-authenticatedApp.0298a225.chunk.js +0 -1
- package/build/Admin_marketplace.201373e2.chunk.js +0 -1
- package/build/Admin_pluginsPage.22390055.chunk.js +0 -1
- package/build/Admin_profilePage.3aa61921.chunk.js +0 -1
- package/build/Admin_settingsPage.363ad01d.chunk.js +0 -1
- package/build/admin-edit-roles-page.e91bd9e5.chunk.js +0 -1
- package/build/admin-edit-users.bcdd2e4d.chunk.js +0 -1
- package/build/admin-users.a2d08780.chunk.js +0 -1
- package/build/api-tokens-list-page.d451255e.chunk.js +0 -1
- package/build/codemirror-css.7b034e03.chunk.js +0 -1
- package/build/codemirror-theme.4a209ed5.chunk.js +0 -1
- package/build/content-manager.4a449a52.chunk.js +0 -1
- package/build/content-type-builder-translation-dk-json.215eca36.chunk.js +0 -1
- package/build/content-type-builder-translation-id-json.e66f4e0a.chunk.js +0 -1
- package/build/content-type-builder-translation-ko-json.20ad3eac.chunk.js +0 -1
- package/build/content-type-builder.eeae4ee8.chunk.js +0 -1
- package/build/cropper-css.b71d1229.chunk.js +0 -1
- package/build/de-json.93987708.chunk.js +0 -1
- package/build/dk-json.97f8f309.chunk.js +0 -1
- package/build/email-settings-page.def5ceaf.chunk.js +0 -1
- package/build/email-translation-ar-json.536b0217.chunk.js +0 -1
- package/build/email-translation-cs-json.8f533c9b.chunk.js +0 -1
- package/build/email-translation-de-json.89f5373e.chunk.js +0 -1
- package/build/email-translation-dk-json.9c95cf96.chunk.js +0 -1
- package/build/email-translation-en-json.5ec38fe9.chunk.js +0 -1
- package/build/email-translation-es-json.fec78330.chunk.js +0 -1
- package/build/email-translation-fr-json.76afb1c3.chunk.js +0 -1
- package/build/email-translation-id-json.1b3e055a.chunk.js +0 -1
- package/build/email-translation-it-json.7273fee2.chunk.js +0 -1
- package/build/email-translation-ja-json.b75afc52.chunk.js +0 -1
- package/build/email-translation-ko-json.eb9a23cd.chunk.js +0 -1
- package/build/email-translation-ms-json.af7c5861.chunk.js +0 -1
- package/build/email-translation-nl-json.10fec023.chunk.js +0 -1
- package/build/email-translation-pl-json.ebda42d5.chunk.js +0 -1
- package/build/email-translation-pt-BR-json.338d8b7c.chunk.js +0 -1
- package/build/email-translation-pt-json.1cd0fedf.chunk.js +0 -1
- package/build/email-translation-ru-json.2c369331.chunk.js +0 -1
- package/build/email-translation-sk-json.ba2e026d.chunk.js +0 -1
- package/build/email-translation-th-json.16457076.chunk.js +0 -1
- package/build/email-translation-tr-json.92e0a5d9.chunk.js +0 -1
- package/build/email-translation-uk-json.d00dd5b1.chunk.js +0 -1
- package/build/email-translation-vi-json.ed425dde.chunk.js +0 -1
- package/build/email-translation-zh-Hans-json.e2c630b6.chunk.js +0 -1
- package/build/email-translation-zh-json.2a06ebac.chunk.js +0 -1
- package/build/en-json.6282a00f.chunk.js +0 -1
- package/build/fontawesome-css-all.162c8569.chunk.js +0 -1
- package/build/fontawesome-css.b1736497.chunk.js +0 -1
- package/build/fr-json.f7d484a8.chunk.js +0 -1
- package/build/highlight.js.3f31aed7.chunk.js +0 -1
- package/build/i18n-settings-page.00c74503.chunk.js +0 -1
- package/build/i18n-translation-en-json.17af559c.chunk.js +0 -1
- package/build/i18n-translation-fr-json.482f6933.chunk.js +0 -1
- package/build/ko-json.7203b08b.chunk.js +0 -1
- package/build/main.a5bd9650.js +0 -2
- package/build/nl-json.9c7f83db.chunk.js +0 -1
- package/build/runtime~main.bddfe3c6.js +0 -1
- package/build/sso-settings-page.bd7a8fd7.chunk.js +0 -1
- package/build/uk-json.3b8f967b.chunk.js +0 -1
- package/build/upload-translation-es-json.f9e9ffdf.chunk.js +0 -1
- package/build/upload-translation-it-json.fb24c332.chunk.js +0 -1
- package/build/users-email-settings-page.b1d1f551.chunk.js +0 -1
- package/build/users-permissions-translation-fr-json.12f3c930.chunk.js +0 -1
- package/build/users-permissions-translation-id-json.ec3deaf0.chunk.js +0 -1
- package/build/users-permissions-translation-ko-json.90c2d129.chunk.js +0 -1
- package/build/users-permissions-translation-ru-json.4389c542.chunk.js +0 -1
- package/build/users-permissions-translation-sv-json.438e46f7.chunk.js +0 -1
- package/build/users-providers-settings-page.733a51ec.chunk.js +0 -1
- package/build/users-roles-settings-page.0eb926e7.chunk.js +0 -1
- package/build/webhook-edit-page.634e50da.chunk.js +0 -1
- package/build/zh-Hans-json.e5041b18.chunk.js +0 -1
- package/build/zh-json.414d826f.chunk.js +0 -1
|
@@ -29,9 +29,9 @@ import { connect, select } from './utils';
|
|
|
29
29
|
import getSelectStyles from './utils/getSelectStyles';
|
|
30
30
|
|
|
31
31
|
const initialPaginationState = {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
contains: '',
|
|
33
|
+
limit: 20,
|
|
34
|
+
start: 0,
|
|
35
35
|
};
|
|
36
36
|
|
|
37
37
|
const buildParams = (query, paramsToKeep) => {
|
|
@@ -141,10 +141,10 @@ function SelectWrapper({
|
|
|
141
141
|
|
|
142
142
|
setIsLoading(true);
|
|
143
143
|
|
|
144
|
-
const params = {
|
|
144
|
+
const params = { limit: state.limit, ...defaultParams, start: state.start };
|
|
145
145
|
|
|
146
|
-
if (state.
|
|
147
|
-
params[containsKey] = state.
|
|
146
|
+
if (state.contains) {
|
|
147
|
+
params[`filters[${containsKey}][$contains]`] = state.contains;
|
|
148
148
|
}
|
|
149
149
|
|
|
150
150
|
try {
|
|
@@ -183,10 +183,9 @@ function SelectWrapper({
|
|
|
183
183
|
isFieldAllowed,
|
|
184
184
|
isMorph,
|
|
185
185
|
mainField.name,
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
state.
|
|
189
|
-
state._limit,
|
|
186
|
+
state.contains,
|
|
187
|
+
state.limit,
|
|
188
|
+
state.start,
|
|
190
189
|
]
|
|
191
190
|
);
|
|
192
191
|
|
|
@@ -204,11 +203,11 @@ function SelectWrapper({
|
|
|
204
203
|
const handleInputChange = (inputValue, { action }) => {
|
|
205
204
|
if (action === 'input-change') {
|
|
206
205
|
setState(prevState => {
|
|
207
|
-
if (prevState.
|
|
206
|
+
if (prevState.contains === inputValue) {
|
|
208
207
|
return prevState;
|
|
209
208
|
}
|
|
210
209
|
|
|
211
|
-
return { ...prevState,
|
|
210
|
+
return { ...prevState, contains: inputValue, start: 0 };
|
|
212
211
|
});
|
|
213
212
|
}
|
|
214
213
|
|
|
@@ -216,7 +215,10 @@ function SelectWrapper({
|
|
|
216
215
|
};
|
|
217
216
|
|
|
218
217
|
const handleMenuScrollToBottom = () => {
|
|
219
|
-
setState(prevState => ({
|
|
218
|
+
setState(prevState => ({
|
|
219
|
+
...prevState,
|
|
220
|
+
start: prevState.start + 20,
|
|
221
|
+
}));
|
|
220
222
|
};
|
|
221
223
|
|
|
222
224
|
const handleMenuClose = () => {
|
|
@@ -304,7 +306,6 @@ function SelectWrapper({
|
|
|
304
306
|
move={moveRelation}
|
|
305
307
|
name={name}
|
|
306
308
|
options={filteredOptions}
|
|
307
|
-
// options={temp}
|
|
308
309
|
onChange={handleChange}
|
|
309
310
|
onInputChange={handleInputChange}
|
|
310
311
|
onMenuClose={handleMenuClose}
|
|
@@ -320,73 +321,6 @@ function SelectWrapper({
|
|
|
320
321
|
/>
|
|
321
322
|
</Stack>
|
|
322
323
|
);
|
|
323
|
-
|
|
324
|
-
// return (
|
|
325
|
-
// <Padded>
|
|
326
|
-
// <BaselineAlignment />
|
|
327
|
-
// <Flex justifyContent="space-between">
|
|
328
|
-
// <Flex>
|
|
329
|
-
// <Text fontWeight="semiBold">
|
|
330
|
-
// <span>
|
|
331
|
-
// {label}
|
|
332
|
-
// {!isSingle && ` (${associationsLength})`}
|
|
333
|
-
// </span>
|
|
334
|
-
// </Text>
|
|
335
|
-
// {labelIconformatted && (
|
|
336
|
-
// <div style={{ lineHeight: '13px' }}>
|
|
337
|
-
// <LabelIconWrapper title={labelIconformatted.title}>
|
|
338
|
-
// {labelIconformatted.icon}
|
|
339
|
-
// </LabelIconWrapper>
|
|
340
|
-
// </div>
|
|
341
|
-
// )}
|
|
342
|
-
// </Flex>
|
|
343
|
-
// {isSingle && link}
|
|
344
|
-
// </Flex>
|
|
345
|
-
// {!isEmpty(description) && (
|
|
346
|
-
// <Padded top size="xs">
|
|
347
|
-
// <BaselineAlignment />
|
|
348
|
-
// <Text fontSize="sm" color="grey" lineHeight="12px" ellipsis>
|
|
349
|
-
// {description}
|
|
350
|
-
// </Text>
|
|
351
|
-
// </Padded>
|
|
352
|
-
// )}
|
|
353
|
-
// <Padded top size="sm">
|
|
354
|
-
// <BaselineAlignment />
|
|
355
|
-
|
|
356
|
-
// <Component
|
|
357
|
-
// addRelation={handleAddRelation}
|
|
358
|
-
// components={{ ClearIndicator, DropdownIndicator, IndicatorSeparator, Option }}
|
|
359
|
-
// displayNavigationLink={shouldDisplayRelationLink}
|
|
360
|
-
// id={name}
|
|
361
|
-
// isDisabled={isDisabled}
|
|
362
|
-
// isLoading={isLoading}
|
|
363
|
-
// isClearable
|
|
364
|
-
// mainField={mainField}
|
|
365
|
-
// move={moveRelation}
|
|
366
|
-
// name={name}
|
|
367
|
-
// options={filteredOptions}
|
|
368
|
-
// onChange={handleChange}
|
|
369
|
-
// onInputChange={handleInputChange}
|
|
370
|
-
// onMenuClose={handleMenuClose}
|
|
371
|
-
// onMenuOpen={handleMenuOpen}
|
|
372
|
-
// onMenuScrollToBottom={handleMenuScrollToBottom}
|
|
373
|
-
// onRemove={onRemoveRelation}
|
|
374
|
-
// placeholder={
|
|
375
|
-
// isEmpty(placeholder) ? (
|
|
376
|
-
// <FormattedMessage id={getTrad('containers.Edit.addAnItem')} />
|
|
377
|
-
// ) : (
|
|
378
|
-
// placeholder
|
|
379
|
-
// )
|
|
380
|
-
// }
|
|
381
|
-
// searchToPersist={searchToPersist}
|
|
382
|
-
// styles={styles}
|
|
383
|
-
// targetModel={targetModel}
|
|
384
|
-
// value={value}
|
|
385
|
-
// />
|
|
386
|
-
// </Padded>
|
|
387
|
-
// <div style={{ marginBottom: 28 }} />
|
|
388
|
-
// </Padded>
|
|
389
|
-
// );
|
|
390
324
|
}
|
|
391
325
|
|
|
392
326
|
SelectWrapper.defaultProps = {
|
|
@@ -25,9 +25,8 @@ const Editor = ({
|
|
|
25
25
|
lineWrapping: true,
|
|
26
26
|
extraKeys: {
|
|
27
27
|
Enter: 'newlineAndIndentContinueMarkdownList',
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
// 'Shift-Tab': false,
|
|
28
|
+
Tab: false,
|
|
29
|
+
'Shift-Tab': false,
|
|
31
30
|
},
|
|
32
31
|
readOnly: false,
|
|
33
32
|
smartIndent: false,
|
|
@@ -68,6 +68,7 @@ export const EditorLayout = ({ children, isExpandMode, error, previewContent, on
|
|
|
68
68
|
bottom={0}
|
|
69
69
|
zIndex={4}
|
|
70
70
|
justifyContent="center"
|
|
71
|
+
onClick={onCollapse}
|
|
71
72
|
>
|
|
72
73
|
<Box
|
|
73
74
|
id="wysiwyg-expand"
|
|
@@ -77,6 +78,7 @@ export const EditorLayout = ({ children, isExpandMode, error, previewContent, on
|
|
|
77
78
|
overflow="hidden"
|
|
78
79
|
width="70%"
|
|
79
80
|
height="70%"
|
|
81
|
+
onClick={e => e.stopPropagation()}
|
|
80
82
|
>
|
|
81
83
|
<Flex height="100%" alignItems="flex-start">
|
|
82
84
|
<BoxWithBorder flex="1" height="100%">
|
|
@@ -7,13 +7,13 @@ import { Typography } from '@strapi/design-system/Typography';
|
|
|
7
7
|
import Expand from '@strapi/icons/Expand';
|
|
8
8
|
import { ExpandButton } from './WysiwygStyles';
|
|
9
9
|
|
|
10
|
-
const WysiwygFooter = ({
|
|
10
|
+
const WysiwygFooter = ({ onToggleExpand }) => {
|
|
11
11
|
const { formatMessage } = useIntl();
|
|
12
12
|
|
|
13
13
|
return (
|
|
14
14
|
<Box padding={2} background="neutral100" hasRadius>
|
|
15
15
|
<Flex justifyContent="flex-end" alignItems="flex-end">
|
|
16
|
-
<ExpandButton id="expand"
|
|
16
|
+
<ExpandButton id="expand" onClick={onToggleExpand}>
|
|
17
17
|
<Typography>
|
|
18
18
|
{formatMessage({
|
|
19
19
|
id: 'components.WysiwygBottomControls.fullscreen',
|
|
@@ -29,12 +29,10 @@ const WysiwygFooter = ({ isPreviewMode, onToggleExpand }) => {
|
|
|
29
29
|
|
|
30
30
|
WysiwygFooter.defaultProps = {
|
|
31
31
|
onToggleExpand: () => {},
|
|
32
|
-
isPreviewMode: false,
|
|
33
32
|
};
|
|
34
33
|
|
|
35
34
|
WysiwygFooter.propTypes = {
|
|
36
35
|
onToggleExpand: PropTypes.func,
|
|
37
|
-
isPreviewMode: PropTypes.bool,
|
|
38
36
|
};
|
|
39
37
|
|
|
40
38
|
export default WysiwygFooter;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { useRef, useState } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { useIntl } from 'react-intl';
|
|
4
|
+
import { FocusTrap } from '@strapi/design-system/FocusTrap';
|
|
4
5
|
import { Box } from '@strapi/design-system/Box';
|
|
5
6
|
import { Button } from '@strapi/design-system/Button';
|
|
6
7
|
import { IconButtonGroup } from '@strapi/design-system/IconButton';
|
|
@@ -41,7 +42,9 @@ const WysiwygNav = ({
|
|
|
41
42
|
});
|
|
42
43
|
const buttonMoreRef = useRef();
|
|
43
44
|
|
|
44
|
-
const handleTogglePopover = () =>
|
|
45
|
+
const handleTogglePopover = () => {
|
|
46
|
+
setVisiblePopover(prev => !prev);
|
|
47
|
+
};
|
|
45
48
|
|
|
46
49
|
if (isPreviewMode) {
|
|
47
50
|
return (
|
|
@@ -81,10 +84,10 @@ const WysiwygNav = ({
|
|
|
81
84
|
/>
|
|
82
85
|
</MainButtons>
|
|
83
86
|
|
|
84
|
-
<MoreButton disabled
|
|
87
|
+
<MoreButton disabled id="more" label="More" icon={<More />} />
|
|
85
88
|
</Flex>
|
|
86
89
|
|
|
87
|
-
<Button onClick={onTogglePreviewMode} variant="tertiary"
|
|
90
|
+
<Button onClick={onTogglePreviewMode} variant="tertiary" id="preview">
|
|
88
91
|
{formatMessage({
|
|
89
92
|
id: 'components.Wysiwyg.ToggleMode.markdown-mode',
|
|
90
93
|
defaultMessage: 'Markdown mode',
|
|
@@ -146,65 +149,67 @@ const WysiwygNav = ({
|
|
|
146
149
|
/>
|
|
147
150
|
{visiblePopover && (
|
|
148
151
|
<Popover centered source={buttonMoreRef} spacing={4} id="popover">
|
|
149
|
-
<
|
|
150
|
-
<
|
|
151
|
-
<
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
<
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
152
|
+
<FocusTrap onEscape={handleTogglePopover}>
|
|
153
|
+
<Flex>
|
|
154
|
+
<IconButtonGroupMargin>
|
|
155
|
+
<CustomIconButton
|
|
156
|
+
onClick={() => onActionClick('Strikethrough', editorRef, handleTogglePopover)}
|
|
157
|
+
id="Strikethrough"
|
|
158
|
+
label="Strikethrough"
|
|
159
|
+
name="Strikethrough"
|
|
160
|
+
icon={<Strikethrough />}
|
|
161
|
+
/>
|
|
162
|
+
<CustomIconButton
|
|
163
|
+
onClick={() => onActionClick('BulletList', editorRef, handleTogglePopover)}
|
|
164
|
+
id="BulletList"
|
|
165
|
+
label="BulletList"
|
|
166
|
+
name="BulletList"
|
|
167
|
+
icon={<BulletList />}
|
|
168
|
+
/>
|
|
169
|
+
<CustomIconButton
|
|
170
|
+
onClick={() => onActionClick('NumberList', editorRef, handleTogglePopover)}
|
|
171
|
+
id="NumberList"
|
|
172
|
+
label="NumberList"
|
|
173
|
+
name="NumberList"
|
|
174
|
+
icon={<NumberList />}
|
|
175
|
+
/>
|
|
176
|
+
</IconButtonGroupMargin>
|
|
177
|
+
<IconButtonGroup>
|
|
178
|
+
<CustomIconButton
|
|
179
|
+
onClick={() => onActionClick('Code', editorRef, handleTogglePopover)}
|
|
180
|
+
id="Code"
|
|
181
|
+
label="Code"
|
|
182
|
+
name="Code"
|
|
183
|
+
icon={<Code />}
|
|
184
|
+
/>
|
|
185
|
+
<CustomIconButton
|
|
186
|
+
onClick={() => {
|
|
187
|
+
handleTogglePopover();
|
|
188
|
+
onToggleMediaLib();
|
|
189
|
+
}}
|
|
190
|
+
id="Image"
|
|
191
|
+
label="Image"
|
|
192
|
+
name="Image"
|
|
193
|
+
icon={<Image />}
|
|
194
|
+
/>
|
|
195
|
+
<CustomLinkIconButton
|
|
196
|
+
onClick={() => onActionClick('Link', editorRef, handleTogglePopover)}
|
|
197
|
+
id="Link"
|
|
198
|
+
label="Link"
|
|
199
|
+
name="Link"
|
|
200
|
+
// eslint-disable-next-line jsx-a11y/anchor-is-valid
|
|
201
|
+
icon={<Link />}
|
|
202
|
+
/>
|
|
203
|
+
<CustomIconButton
|
|
204
|
+
onClick={() => onActionClick('Quote', editorRef, handleTogglePopover)}
|
|
205
|
+
id="Quote"
|
|
206
|
+
label="Quote"
|
|
207
|
+
name="Quote"
|
|
208
|
+
icon={<Quote />}
|
|
209
|
+
/>
|
|
210
|
+
</IconButtonGroup>
|
|
211
|
+
</Flex>
|
|
212
|
+
</FocusTrap>
|
|
208
213
|
</Popover>
|
|
209
214
|
)}
|
|
210
215
|
</Flex>
|
|
@@ -26,6 +26,10 @@ const LabelAction = styled(Box)`
|
|
|
26
26
|
}
|
|
27
27
|
`;
|
|
28
28
|
|
|
29
|
+
const TypographyAsterisk = styled(Typography)`
|
|
30
|
+
line-height: 0;
|
|
31
|
+
`;
|
|
32
|
+
|
|
29
33
|
const Wysiwyg = ({
|
|
30
34
|
description,
|
|
31
35
|
disabled,
|
|
@@ -36,6 +40,7 @@ const Wysiwyg = ({
|
|
|
36
40
|
onChange,
|
|
37
41
|
placeholder,
|
|
38
42
|
value,
|
|
43
|
+
required,
|
|
39
44
|
}) => {
|
|
40
45
|
const { formatMessage } = useIntl();
|
|
41
46
|
const textareaRef = useRef(null);
|
|
@@ -49,7 +54,10 @@ const Wysiwyg = ({
|
|
|
49
54
|
|
|
50
55
|
const handleToggleMediaLib = () => setMediaLibVisible(prev => !prev);
|
|
51
56
|
const handleTogglePreviewMode = () => setIsPreviewMode(prev => !prev);
|
|
52
|
-
const handleToggleExpand = () =>
|
|
57
|
+
const handleToggleExpand = () => {
|
|
58
|
+
setIsPreviewMode(false);
|
|
59
|
+
setIsExpandMode(prev => !prev);
|
|
60
|
+
};
|
|
53
61
|
|
|
54
62
|
const handleActionClick = (value, currentEditorRef, togglePopover) => {
|
|
55
63
|
switch (value) {
|
|
@@ -124,6 +132,7 @@ const Wysiwyg = ({
|
|
|
124
132
|
<Stack horizontal size={1}>
|
|
125
133
|
<Typography variant="pi" fontWeight="bold" textColor="neutral800">
|
|
126
134
|
{label}
|
|
135
|
+
{required && <TypographyAsterisk textColor="danger600">*</TypographyAsterisk>}
|
|
127
136
|
</Typography>
|
|
128
137
|
{labelAction && <LabelAction paddingLeft={1}>{labelAction}</LabelAction>}
|
|
129
138
|
</Stack>
|
|
@@ -154,9 +163,7 @@ const Wysiwyg = ({
|
|
|
154
163
|
value={value}
|
|
155
164
|
/>
|
|
156
165
|
|
|
157
|
-
{!isExpandMode &&
|
|
158
|
-
<WysiwygFooter isPreviewMode={isPreviewMode} onToggleExpand={handleToggleExpand} />
|
|
159
|
-
)}
|
|
166
|
+
{!isExpandMode && <WysiwygFooter onToggleExpand={handleToggleExpand} />}
|
|
160
167
|
</EditorLayout>
|
|
161
168
|
<Hint description={description} name={name} error={error} />
|
|
162
169
|
</Stack>
|
|
@@ -182,6 +189,7 @@ Wysiwyg.defaultProps = {
|
|
|
182
189
|
error: '',
|
|
183
190
|
labelAction: undefined,
|
|
184
191
|
placeholder: null,
|
|
192
|
+
required: false,
|
|
185
193
|
value: '',
|
|
186
194
|
};
|
|
187
195
|
|
|
@@ -206,6 +214,7 @@ Wysiwyg.propTypes = {
|
|
|
206
214
|
defaultMessage: PropTypes.string.isRequired,
|
|
207
215
|
values: PropTypes.object,
|
|
208
216
|
}),
|
|
217
|
+
required: PropTypes.bool,
|
|
209
218
|
value: PropTypes.string,
|
|
210
219
|
};
|
|
211
220
|
|
|
@@ -185,7 +185,7 @@ const generateRelationQueryInfos = (contentTypeConfiguration, fieldName, models)
|
|
|
185
185
|
|
|
186
186
|
const queryInfos = {
|
|
187
187
|
endPoint,
|
|
188
|
-
containsKey: `${mainField}
|
|
188
|
+
containsKey: `${mainField}`,
|
|
189
189
|
defaultParams: {},
|
|
190
190
|
shouldDisplayRelationLink,
|
|
191
191
|
};
|
|
@@ -210,7 +210,7 @@ const generateRelationQueryInfosForComponents = (
|
|
|
210
210
|
|
|
211
211
|
const queryInfos = {
|
|
212
212
|
endPoint,
|
|
213
|
-
containsKey: `${mainField}
|
|
213
|
+
containsKey: `${mainField}`,
|
|
214
214
|
defaultParams: {
|
|
215
215
|
_component: contentTypeConfiguration.uid,
|
|
216
216
|
},
|
|
@@ -48,9 +48,7 @@ const LeftMenu = () => {
|
|
|
48
48
|
id: 'collectionTypes',
|
|
49
49
|
title: {
|
|
50
50
|
id: getTrad('components.LeftMenu.collection-types'),
|
|
51
|
-
defaultMessage:
|
|
52
|
-
'{number, plural, =0 {Collection Types} one {Collection Type } other {Collection Types}}',
|
|
53
|
-
values: { number: intlCollectionTypeLinks.length },
|
|
51
|
+
defaultMessage: 'Collection Types',
|
|
54
52
|
},
|
|
55
53
|
searchable: true,
|
|
56
54
|
links: sortBy(matchByTitle(intlCollectionTypeLinks, search), object =>
|
|
@@ -61,9 +59,7 @@ const LeftMenu = () => {
|
|
|
61
59
|
id: 'singleTypes',
|
|
62
60
|
title: {
|
|
63
61
|
id: getTrad('components.LeftMenu.single-types'),
|
|
64
|
-
defaultMessage:
|
|
65
|
-
'{number, plural, =0 {Single Types} one {Single Type } other {Single Types}}',
|
|
66
|
-
values: { number: intlSingleTypeLinks.length },
|
|
62
|
+
defaultMessage: 'Single Types',
|
|
67
63
|
},
|
|
68
64
|
searchable: true,
|
|
69
65
|
links: sortBy(matchByTitle(intlSingleTypeLinks, search), object =>
|
|
@@ -112,8 +108,10 @@ const LeftMenu = () => {
|
|
|
112
108
|
badgeLabel={section.links.length.toString()}
|
|
113
109
|
>
|
|
114
110
|
{section.links.map(link => {
|
|
111
|
+
const search = link.search ? `?${link.search}` : '';
|
|
112
|
+
|
|
115
113
|
return (
|
|
116
|
-
<SubNavLink key={link.uid} to={`${link.to}
|
|
114
|
+
<SubNavLink key={link.uid} to={`${link.to}${search}`}>
|
|
117
115
|
{link.title}
|
|
118
116
|
</SubNavLink>
|
|
119
117
|
);
|
|
@@ -23,7 +23,9 @@ const cmPermissions = permissions.contentManager;
|
|
|
23
23
|
const App = () => {
|
|
24
24
|
const contentTypeMatch = useRouteMatch(`/content-manager/:kind/:uid`);
|
|
25
25
|
const { status, collectionTypeLinks, singleTypeLinks, models, refetchData } = useModels();
|
|
26
|
-
const authorisedModels = sortBy([...collectionTypeLinks, ...singleTypeLinks],
|
|
26
|
+
const authorisedModels = sortBy([...collectionTypeLinks, ...singleTypeLinks], model =>
|
|
27
|
+
model.title.toLowerCase()
|
|
28
|
+
);
|
|
27
29
|
const { pathname } = useLocation();
|
|
28
30
|
const { formatMessage } = useIntl();
|
|
29
31
|
|
|
@@ -41,14 +43,20 @@ const App = () => {
|
|
|
41
43
|
);
|
|
42
44
|
}
|
|
43
45
|
|
|
46
|
+
// Array of models that are displayed in the content manager
|
|
47
|
+
const supportedModelsToDisplay = models.filter(({ isDisplayed }) => isDisplayed);
|
|
48
|
+
|
|
44
49
|
// Redirect the user to the 403 page
|
|
45
|
-
|
|
46
|
-
|
|
50
|
+
if (
|
|
51
|
+
authorisedModels.length === 0 &&
|
|
52
|
+
supportedModelsToDisplay.length > 0 &&
|
|
53
|
+
pathname !== '/content-manager/403'
|
|
54
|
+
) {
|
|
47
55
|
return <Redirect to="/content-manager/403" />;
|
|
48
56
|
}
|
|
49
57
|
|
|
50
58
|
// Redirect the user to the create content type page
|
|
51
|
-
if (
|
|
59
|
+
if (supportedModelsToDisplay.length === 0 && pathname !== '/content-manager/no-content-types') {
|
|
52
60
|
return <Redirect to="/content-manager/no-content-types" />;
|
|
53
61
|
}
|
|
54
62
|
|
|
@@ -24,7 +24,7 @@ const FieldButtonContent = ({ attribute, onEditField, onDeleteField, children })
|
|
|
24
24
|
|
|
25
25
|
return (
|
|
26
26
|
<Box overflow="hidden" width="100%">
|
|
27
|
-
<Flex paddingLeft={3} alignItems="
|
|
27
|
+
<Flex paddingLeft={3} alignItems="center" justifyContent="space-between">
|
|
28
28
|
<Typography fontWeight="semiBold" textColor="neutral800" ellipsis>
|
|
29
29
|
{children}
|
|
30
30
|
</Typography>
|
|
@@ -13,19 +13,25 @@ import { getFullName } from '../../../../utils';
|
|
|
13
13
|
const Informations = () => {
|
|
14
14
|
const { formatMessage, formatRelativeTime } = useIntl();
|
|
15
15
|
const { initialData, isCreatingEntry } = useCMEditViewDataManager();
|
|
16
|
-
|
|
17
|
-
const updatedAt = 'updatedAt';
|
|
18
|
-
const updatedByFirstname = initialData.updatedBy?.firstname || '';
|
|
19
|
-
const updatedByLastname = initialData.updatedBy?.lastname || '';
|
|
20
|
-
const updatedByUsername = initialData.updatedBy?.username;
|
|
21
|
-
const updatedBy = updatedByUsername || getFullName(updatedByFirstname, updatedByLastname);
|
|
22
16
|
const currentTime = useRef(Date.now());
|
|
23
|
-
const timestamp = initialData[updatedAt]
|
|
24
|
-
? new Date(initialData[updatedAt]).getTime()
|
|
25
|
-
: Date.now();
|
|
26
|
-
const elapsed = timestamp - currentTime.current;
|
|
27
17
|
|
|
28
|
-
const
|
|
18
|
+
const getFieldInfo = (atField, byField) => {
|
|
19
|
+
const userFirstname = initialData[byField]?.firstname || '';
|
|
20
|
+
const userLastname = initialData[byField]?.lastname || '';
|
|
21
|
+
const userUsername = initialData[byField]?.username;
|
|
22
|
+
const user = userUsername || getFullName(userFirstname, userLastname);
|
|
23
|
+
const timestamp = initialData[atField] ? new Date(initialData[atField]).getTime() : Date.now();
|
|
24
|
+
const elapsed = timestamp - currentTime.current;
|
|
25
|
+
const { unit, value } = getUnits(-elapsed);
|
|
26
|
+
|
|
27
|
+
return {
|
|
28
|
+
at: formatRelativeTime(value, unit, { numeric: 'auto' }),
|
|
29
|
+
by: isCreatingEntry ? '-' : user,
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const updated = getFieldInfo('updatedAt', 'updatedBy');
|
|
34
|
+
const created = getFieldInfo('createdAt', 'createdBy');
|
|
29
35
|
|
|
30
36
|
return (
|
|
31
37
|
<Box>
|
|
@@ -39,6 +45,24 @@ const Informations = () => {
|
|
|
39
45
|
<Divider />
|
|
40
46
|
</Box>
|
|
41
47
|
<Stack size={4}>
|
|
48
|
+
<Flex justifyContent="space-between">
|
|
49
|
+
<Typography fontWeight="bold">
|
|
50
|
+
{formatMessage({
|
|
51
|
+
id: getTrad('containers.Edit.information.created'),
|
|
52
|
+
defaultMessage: 'Created',
|
|
53
|
+
})}
|
|
54
|
+
</Typography>
|
|
55
|
+
<Typography>{created.at}</Typography>
|
|
56
|
+
</Flex>
|
|
57
|
+
<Flex justifyContent="space-between">
|
|
58
|
+
<Typography fontWeight="bold">
|
|
59
|
+
{formatMessage({
|
|
60
|
+
id: getTrad('containers.Edit.information.by'),
|
|
61
|
+
defaultMessage: 'By',
|
|
62
|
+
})}
|
|
63
|
+
</Typography>
|
|
64
|
+
<Typography>{created.by}</Typography>
|
|
65
|
+
</Flex>
|
|
42
66
|
<Flex justifyContent="space-between">
|
|
43
67
|
<Typography fontWeight="bold">
|
|
44
68
|
{formatMessage({
|
|
@@ -46,7 +70,7 @@ const Informations = () => {
|
|
|
46
70
|
defaultMessage: 'Last update',
|
|
47
71
|
})}
|
|
48
72
|
</Typography>
|
|
49
|
-
<Typography>{
|
|
73
|
+
<Typography>{updated.at}</Typography>
|
|
50
74
|
</Flex>
|
|
51
75
|
<Flex justifyContent="space-between">
|
|
52
76
|
<Typography fontWeight="bold">
|
|
@@ -55,7 +79,7 @@ const Informations = () => {
|
|
|
55
79
|
defaultMessage: 'By',
|
|
56
80
|
})}
|
|
57
81
|
</Typography>
|
|
58
|
-
<Typography>{
|
|
82
|
+
<Typography>{updated.by}</Typography>
|
|
59
83
|
</Flex>
|
|
60
84
|
</Stack>
|
|
61
85
|
</Box>
|