@strapi/admin 4.0.1 → 4.0.5
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/UpgradePlanModal/index.js +7 -2
- 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/DynamicZone/components/DzLabel/index.js +24 -7
- package/admin/src/content-manager/components/DynamicZone/index.js +6 -10
- 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/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/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/pages/App/LeftMenu/index.js +3 -1
- package/admin/src/content-manager/pages/App/index.js +9 -3
- 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/ListSettingsView/components/DraggableCard.js +1 -0
- package/admin/src/pages/AuthPage/components/Register/index.js +4 -1
- package/admin/src/pages/AuthPage/utils/forms.js +2 -0
- package/admin/src/pages/ProfilePage/index.js +2 -0
- package/admin/src/pages/SettingsPage/pages/ApiTokens/EditView/index.js +1 -0
- package/admin/src/pages/SettingsPage/pages/Users/EditPage/utils/layout.js +2 -0
- package/admin/src/pages/SettingsPage/pages/Users/ListPage/ModalForm/utils/layout.js +2 -0
- package/admin/src/pages/SettingsPage/pages/Users/components/SelectRoles/index.js +1 -0
- package/admin/src/pages/SettingsPage/pages/Webhooks/EditView/components/EventInput/index.js +1 -9
- package/admin/src/pages/SettingsPage/pages/Webhooks/EditView/components/WebhookForm/index.js +2 -0
- package/admin/src/pages/SettingsPage/pages/Webhooks/EditView/components/utils/schema.js +1 -4
- package/admin/src/translations/dk.json +300 -110
- package/admin/src/translations/en.json +3 -0
- package/admin/src/translations/es.json +204 -4
- package/admin/src/translations/hu.json +672 -0
- package/admin/src/translations/ja.json +327 -7
- package/admin/src/translations/languageNativeNames.js +1 -0
- package/admin/src/translations/nl.json +512 -125
- package/admin/src/translations/pt-BR.json +398 -19
- package/admin/src/translations/uk.json +40 -40
- package/admin/src/translations/zh-Hans.json +554 -204
- package/admin/src/translations/zh.json +7 -0
- package/build/{1024.1b15fbb5.chunk.js → 1024.a40d2d9e.chunk.js} +1 -1
- package/build/{1856.0a6992d6.chunk.js → 1856.cc060f4a.chunk.js} +1 -1
- package/build/{5881.deb18c91.chunk.js → 3215.e4e1d329.chunk.js} +2 -2
- package/build/{5881.deb18c91.chunk.js.LICENSE.txt → 3215.e4e1d329.chunk.js.LICENSE.txt} +0 -0
- package/build/{4064.2683bcce.chunk.js → 4064.d7baa10c.chunk.js} +1 -1
- package/build/4261.061aed35.chunk.js +1 -0
- package/build/4362.029c5c86.chunk.js +1 -0
- package/build/4672.68466ddc.chunk.js +1 -0
- package/build/{4715.f134f37a.chunk.js → 4715.a5e6716c.chunk.js} +1 -1
- package/build/4741.18bf386b.chunk.js +2 -0
- package/build/{4741.1fb6ad6e.chunk.js.LICENSE.txt → 4741.18bf386b.chunk.js.LICENSE.txt} +0 -0
- package/build/{497.726adbfa.chunk.js → 497.7e65282d.chunk.js} +1 -1
- package/build/{4982.a7f87e6c.chunk.js → 4982.4666f610.chunk.js} +1 -1
- package/build/6060.72f9dda2.chunk.js +2 -0
- package/build/{3226.1a4b5cd1.chunk.js.LICENSE.txt → 6060.72f9dda2.chunk.js.LICENSE.txt} +1 -1
- package/build/{6250.11ba8b50.chunk.js → 6250.5f8cd6cb.chunk.js} +1 -1
- package/build/849.46892e8e.chunk.js +1 -0
- package/build/{2664.f33f619d.chunk.js → 8530.f3460d3b.chunk.js} +2 -2
- package/build/{2664.f33f619d.chunk.js.LICENSE.txt → 8530.f3460d3b.chunk.js.LICENSE.txt} +0 -0
- package/build/Admin-authenticatedApp.a0ed38a6.chunk.js +1 -0
- package/build/{Admin_homePage.74b48134.chunk.js → Admin_homePage.83a8b04f.chunk.js} +1 -1
- package/build/Admin_marketplace.1cf20eeb.chunk.js +1 -0
- package/build/{Admin_pluginsPage.22390055.chunk.js → Admin_pluginsPage.0d59d86e.chunk.js} +1 -1
- package/build/Admin_profilePage.c08119de.chunk.js +1 -0
- package/build/Admin_settingsPage.97246c41.chunk.js +1 -0
- package/build/admin-edit-roles-page.8af004a6.chunk.js +1 -0
- package/build/admin-edit-users.73877840.chunk.js +1 -0
- package/build/admin-users.e0558d75.chunk.js +1 -0
- package/build/{api-tokens-create-page.ab33d46d.chunk.js → api-tokens-create-page.ebe57c8e.chunk.js} +1 -1
- package/build/{api-tokens-edit-page.749496cc.chunk.js → api-tokens-edit-page.35e1522b.chunk.js} +1 -1
- package/build/api-tokens-list-page.f01b7b98.chunk.js +1 -0
- package/build/{ar-json.9805489e.chunk.js → ar-json.d79e4709.chunk.js} +1 -1
- package/build/codemirror-css.17bc19d4.chunk.js +1 -0
- package/build/codemirror-theme.b5559efc.chunk.js +1 -0
- package/build/content-manager.05646891.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.098bd218.chunk.js +1 -0
- package/build/{content-type-builder-translation-en-json.81257d0d.chunk.js → content-type-builder-translation-en-json.d70fc3af.chunk.js} +1 -1
- package/build/content-type-builder-translation-es-json.20c177ee.chunk.js +1 -0
- 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.0288cb2b.chunk.js → content-type-builder-translation-ko-json.2a5e0769.chunk.js} +1 -1
- 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.7673250d.chunk.js +1 -0
- package/build/cropper-css.ace19575.chunk.js +1 -0
- package/build/{cs-json.ff08076e.chunk.js → cs-json.b8ba75b8.chunk.js} +1 -1
- package/build/de-json.e01bdeae.chunk.js +1 -0
- package/build/dk-json.7356ea4b.chunk.js +1 -0
- package/build/email-settings-page.8f22f49c.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.f8a595bf.chunk.js +1 -0
- package/build/{email-translation-en-json.ef8208e3.chunk.js → email-translation-en-json.fa0dc92b.chunk.js} +1 -1
- package/build/email-translation-es-json.eb303dea.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.66b21ec1.chunk.js → email-translation-ja-json.66337e44.chunk.js} +1 -1
- package/build/{email-translation-ko-json.e383ad57.chunk.js → email-translation-ko-json.52bbd7b4.chunk.js} +1 -1
- 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.ed9c8bef.chunk.js +1 -0
- package/build/fontawesome-css-all.3b89f909.chunk.js +1 -0
- package/build/fontawesome-css.ef93ee2a.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.6321cb45.chunk.js +1 -0
- package/build/hu-json.a741d263.chunk.js +1 -0
- package/build/i18n-translation-dk-json.932d3cc2.chunk.js +1 -0
- package/build/{i18n-translation-en-json.a90b9dc5.chunk.js → i18n-translation-en-json.239b740f.chunk.js} +1 -1
- package/build/i18n-translation-es-json.347904f3.chunk.js +1 -0
- package/build/i18n-translation-fr-json.b52474fc.chunk.js +1 -0
- package/build/{i18n-translation-ko-json.f0628aff.chunk.js → i18n-translation-ko-json.e88e11ef.chunk.js} +1 -1
- 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.52581a2a.chunk.js +1 -0
- package/build/{ko-json.35832b30.chunk.js → ko-json.29633034.chunk.js} +1 -1
- package/build/main.f4419aa1.js +2 -0
- package/build/{main.9b622560.js.LICENSE.txt → main.f4419aa1.js.LICENSE.txt} +0 -0
- package/build/{ms-json.a66beabc.chunk.js → ms-json.5e5d12f9.chunk.js} +1 -1
- package/build/nl-json.ac661b7f.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.8b3f799d.chunk.js +1 -0
- 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.25881105.js +1 -0
- package/build/{sk-json.7f750e28.chunk.js → sk-json.a40bc2c8.chunk.js} +1 -1
- package/build/{sso-settings-page.bd7a8fd7.chunk.js → sso-settings-page.36c35df0.chunk.js} +1 -1
- 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.da2ed14e.chunk.js +1 -0
- 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.bc6af8b4.chunk.js} +1 -1
- package/build/{upload-translation-en-json.d205cecd.chunk.js → upload-translation-en-json.31ea0622.chunk.js} +1 -1
- package/build/upload-translation-es-json.b53d6641.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.71aa85eb.chunk.js} +1 -1
- package/build/{upload-translation-ko-json.b6602572.chunk.js → upload-translation-ko-json.da369eef.chunk.js} +1 -1
- 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/users-email-settings-page.678794aa.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.3e0295e5.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.a4f81eaa.chunk.js +1 -0
- 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.5709c5a0.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.d4f78a77.chunk.js +1 -0
- package/build/users-roles-settings-page.4f04bf06.chunk.js +1 -0
- package/build/{vi-json.c25f42fe.chunk.js → vi-json.e993857a.chunk.js} +1 -1
- package/build/webhook-edit-page.42ec446c.chunk.js +1 -0
- package/build/{webhook-list-page.8abf0b5f.chunk.js → webhook-list-page.775c0e30.chunk.js} +1 -1
- package/build/zh-Hans-json.fcc53388.chunk.js +1 -0
- package/build/zh-json.2e4c9ef4.chunk.js +1 -0
- package/index.html +1 -1
- package/index.js +12 -1
- package/package.json +26 -33
- package/server/bootstrap.js +16 -0
- package/server/controllers/webhooks.js +6 -10
- package/server/services/api-token.js +1 -1
- package/server/services/metrics.js +6 -0
- package/server/services/permission/permissions-manager/sanitize.js +8 -2
- package/server/services/user.js +10 -0
- package/webpack.alias.js +0 -6
- package/webpack.config.js +1 -3
- package/build/3226.1a4b5cd1.chunk.js +0 -2
- package/build/4261.b7b7ac00.chunk.js +0 -1
- package/build/4362.c65ab24b.chunk.js +0 -1
- package/build/4741.1fb6ad6e.chunk.js +0 -2
- package/build/849.35b7e7af.chunk.js +0 -1
- package/build/9238.63386655.chunk.js +0 -1
- package/build/Admin-authenticatedApp.bcc1dcbe.chunk.js +0 -1
- package/build/Admin_marketplace.8d0028cc.chunk.js +0 -1
- package/build/Admin_profilePage.f276f571.chunk.js +0 -1
- package/build/Admin_settingsPage.1947fe0c.chunk.js +0 -1
- package/build/admin-edit-roles-page.2bccaf76.chunk.js +0 -1
- package/build/admin-edit-users.1632dcf7.chunk.js +0 -1
- package/build/admin-users.1f0533e6.chunk.js +0 -1
- package/build/api-tokens-list-page.d451255e.chunk.js +0 -1
- package/build/codemirror-css.d09c79d2.chunk.js +0 -1
- package/build/codemirror-theme.4a209ed5.chunk.js +0 -1
- package/build/content-manager.be0bf12e.chunk.js +0 -1
- package/build/content-type-builder-translation-dk-json.215eca36.chunk.js +0 -1
- package/build/content-type-builder-translation-es-json.5a4f519b.chunk.js +0 -1
- package/build/content-type-builder-translation-id-json.e66f4e0a.chunk.js +0 -1
- package/build/content-type-builder.aa13e7a4.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.d3ce077f.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-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-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.4c3c1c95.chunk.js +0 -1
- package/build/es-json.060b658c.chunk.js +0 -1
- package/build/fontawesome-css-all.90be2358.chunk.js +0 -1
- package/build/fontawesome-css.32df0f91.chunk.js +0 -1
- package/build/fr-json.c75e1a2e.chunk.js +0 -1
- package/build/highlight.js.3f31aed7.chunk.js +0 -1
- package/build/i18n-translation-fr-json.482f6933.chunk.js +0 -1
- package/build/ja-json.14eaee93.chunk.js +0 -1
- package/build/main.9b622560.js +0 -2
- package/build/nl-json.9e55cf9c.chunk.js +0 -1
- package/build/pt-BR-json.e21cd994.chunk.js +0 -1
- package/build/runtime~main.726e5497.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.36142cd7.chunk.js +0 -1
- package/build/users-permissions-translation-es-json.768cc00e.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.4677f640.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.2c0685d3.chunk.js +0 -1
- package/build/users-roles-settings-page.61c9b376.chunk.js +0 -1
- package/build/webhook-edit-page.36755ae4.chunk.js +0 -1
- package/build/zh-Hans-json.e5041b18.chunk.js +0 -1
- package/build/zh-json.3b683748.chunk.js +0 -1
|
@@ -80,12 +80,20 @@ const LeftMenu = ({ generalSectionLinks, pluginsSectionLinks }) => {
|
|
|
80
80
|
}
|
|
81
81
|
};
|
|
82
82
|
|
|
83
|
+
const menuTitle = formatMessage({
|
|
84
|
+
id: 'app.components.LeftMenu.navbrand.title',
|
|
85
|
+
defaultMessage: 'Strapi Dashboard',
|
|
86
|
+
});
|
|
87
|
+
|
|
83
88
|
return (
|
|
84
89
|
<MainNav condensed={condensed}>
|
|
85
90
|
<NavBrand
|
|
86
|
-
workplace=
|
|
87
|
-
|
|
88
|
-
|
|
91
|
+
workplace={formatMessage({
|
|
92
|
+
id: 'app.components.LeftMenu.navbrand.workplace',
|
|
93
|
+
defaultMessage: 'Workplace',
|
|
94
|
+
})}
|
|
95
|
+
title={menuTitle}
|
|
96
|
+
icon={<img src={menuLogo} alt={menuTitle} />}
|
|
89
97
|
/>
|
|
90
98
|
|
|
91
99
|
<Divider />
|
|
@@ -149,7 +157,7 @@ const LeftMenu = ({ generalSectionLinks, pluginsSectionLinks }) => {
|
|
|
149
157
|
>
|
|
150
158
|
<FocusTrap onEscape={handleToggleUserLinks}>
|
|
151
159
|
<Stack size={0}>
|
|
152
|
-
<LinkUser onClick={handleToggleUserLinks} to="/me">
|
|
160
|
+
<LinkUser tabIndex={0} onClick={handleToggleUserLinks} to="/me">
|
|
153
161
|
<Typography>
|
|
154
162
|
{formatMessage({
|
|
155
163
|
id: 'app.components.LeftMenu.profile',
|
|
@@ -157,7 +165,7 @@ const LeftMenu = ({ generalSectionLinks, pluginsSectionLinks }) => {
|
|
|
157
165
|
})}
|
|
158
166
|
</Typography>
|
|
159
167
|
</LinkUser>
|
|
160
|
-
<LinkUser onClick={handleLogout} logout="logout" to="/auth/login">
|
|
168
|
+
<LinkUser tabIndex={0} onClick={handleLogout} logout="logout" to="/auth/login">
|
|
161
169
|
<Typography textColor="danger600">
|
|
162
170
|
{formatMessage({
|
|
163
171
|
id: 'app.components.LeftMenu.logout',
|
|
@@ -70,9 +70,14 @@ const UpgradePlanModal = ({ onClose, isOpen }) => {
|
|
|
70
70
|
|
|
71
71
|
return (
|
|
72
72
|
<Portal>
|
|
73
|
-
<UpgradeWrapper>
|
|
73
|
+
<UpgradeWrapper onClick={onClose}>
|
|
74
74
|
<FocusTrap onEscape={onClose}>
|
|
75
|
-
<UpgradeContainer
|
|
75
|
+
<UpgradeContainer
|
|
76
|
+
onClick={e => e.stopPropagation()}
|
|
77
|
+
aria-labelledby="upgrade-plan"
|
|
78
|
+
background="neutral0"
|
|
79
|
+
hasRadius
|
|
80
|
+
>
|
|
76
81
|
<img src={AirBalloon} alt="air-balloon" />
|
|
77
82
|
<CloseButtonContainer>
|
|
78
83
|
<IconButton onClick={onClose} aria-label="Close" icon={<Cross />} />
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
2
|
import { useIntl } from 'react-intl';
|
|
3
3
|
import toString from 'lodash/toString';
|
|
4
|
+
import { getNumberOfDecimals } from './utils/getNumberOfDecimals';
|
|
4
5
|
|
|
5
6
|
const CellValue = ({ type, value }) => {
|
|
6
7
|
const { formatDate, formatTime, formatNumber } = useIntl();
|
|
@@ -27,8 +28,17 @@ const CellValue = ({ type, value }) => {
|
|
|
27
28
|
});
|
|
28
29
|
}
|
|
29
30
|
|
|
30
|
-
if (['float', '
|
|
31
|
-
|
|
31
|
+
if (['float', 'decimal'].includes(type)) {
|
|
32
|
+
const numberOfDecimals = getNumberOfDecimals(value);
|
|
33
|
+
|
|
34
|
+
formattedValue = formatNumber(value, {
|
|
35
|
+
minimumFractionDigits: numberOfDecimals,
|
|
36
|
+
maximumFractionDigits: numberOfDecimals,
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
if (['integer', 'biginteger'].includes(type)) {
|
|
41
|
+
formattedValue = formatNumber(value, { maximumFractionDigits: 0 });
|
|
32
42
|
}
|
|
33
43
|
|
|
34
44
|
return toString(formattedValue);
|
|
@@ -17,7 +17,7 @@ const StyledBox = styled(Box)`
|
|
|
17
17
|
border-radius: ${pxToRem(26)};
|
|
18
18
|
`;
|
|
19
19
|
|
|
20
|
-
const DzLabel = ({ label, labelAction, name, numberOfComponents, required }) => {
|
|
20
|
+
const DzLabel = ({ label, labelAction, name, numberOfComponents, required, intlDescription }) => {
|
|
21
21
|
const { formatMessage } = useIntl();
|
|
22
22
|
const intlLabel = formatMessage({ id: label || name, defaultMessage: label || name });
|
|
23
23
|
|
|
@@ -33,12 +33,24 @@ const DzLabel = ({ label, labelAction, name, numberOfComponents, required }) =>
|
|
|
33
33
|
shadow="filterShadow"
|
|
34
34
|
color="neutral500"
|
|
35
35
|
>
|
|
36
|
-
<Flex>
|
|
37
|
-
<
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
36
|
+
<Flex direction="column" justifyContent="center">
|
|
37
|
+
<Flex maxWidth={pxToRem(356)}>
|
|
38
|
+
<Typography variant="pi" textColor="neutral600" fontWeight="bold" ellipsis>
|
|
39
|
+
{intlLabel}
|
|
40
|
+
</Typography>
|
|
41
|
+
<Typography variant="pi" textColor="neutral600" fontWeight="bold">
|
|
42
|
+
({numberOfComponents})
|
|
43
|
+
</Typography>
|
|
44
|
+
{required && <Typography textColor="danger600">*</Typography>}
|
|
45
|
+
{labelAction && <Box paddingLeft={1}>{labelAction}</Box>}
|
|
46
|
+
</Flex>
|
|
47
|
+
{intlDescription && (
|
|
48
|
+
<Box paddingTop={1} maxWidth={pxToRem(356)}>
|
|
49
|
+
<Typography variant="pi" textColor="neutral600" ellipsis>
|
|
50
|
+
{formatMessage(intlDescription)}
|
|
51
|
+
</Typography>
|
|
52
|
+
</Box>
|
|
53
|
+
)}
|
|
42
54
|
</Flex>
|
|
43
55
|
</StyledBox>
|
|
44
56
|
</Box>
|
|
@@ -47,12 +59,17 @@ const DzLabel = ({ label, labelAction, name, numberOfComponents, required }) =>
|
|
|
47
59
|
};
|
|
48
60
|
|
|
49
61
|
DzLabel.defaultProps = {
|
|
62
|
+
intlDescription: undefined,
|
|
50
63
|
label: '',
|
|
51
64
|
labelAction: undefined,
|
|
52
65
|
required: false,
|
|
53
66
|
};
|
|
54
67
|
|
|
55
68
|
DzLabel.propTypes = {
|
|
69
|
+
intlDescription: PropTypes.shape({
|
|
70
|
+
id: PropTypes.string.isRequired,
|
|
71
|
+
defaultMessage: PropTypes.string.isRequired,
|
|
72
|
+
}),
|
|
56
73
|
label: PropTypes.string,
|
|
57
74
|
labelAction: PropTypes.element,
|
|
58
75
|
name: PropTypes.string.isRequired,
|
|
@@ -39,6 +39,9 @@ const DynamicZone = ({
|
|
|
39
39
|
const [isOpen, setIsOpen] = useState(false);
|
|
40
40
|
const [shouldOpenAddedComponent, setShouldOpenAddedComponent] = useState(false);
|
|
41
41
|
const dynamicDisplayedComponentsLength = dynamicDisplayedComponents.length;
|
|
42
|
+
const intlDescription = metadatas.description
|
|
43
|
+
? { id: metadatas.description, defaultMessage: metadatas.description }
|
|
44
|
+
: null;
|
|
42
45
|
|
|
43
46
|
const [componentCollapses, setComponentsCollapses] = useState(
|
|
44
47
|
createCollapses(dynamicDisplayedComponentsLength)
|
|
@@ -159,11 +162,7 @@ const DynamicZone = ({
|
|
|
159
162
|
if (!isFieldAllowed && isCreatingEntry) {
|
|
160
163
|
return (
|
|
161
164
|
<NotAllowedInput
|
|
162
|
-
description={
|
|
163
|
-
metadatas.description
|
|
164
|
-
? { id: metadatas.description, defaultMessage: metadatas.description }
|
|
165
|
-
: null
|
|
166
|
-
}
|
|
165
|
+
description={intlDescription}
|
|
167
166
|
intlLabel={{ id: metadatas.label, defaultMessage: metadatas.label }}
|
|
168
167
|
labelAction={labelAction}
|
|
169
168
|
name={name}
|
|
@@ -174,11 +173,7 @@ const DynamicZone = ({
|
|
|
174
173
|
if (!isFieldAllowed && !isFieldReadable && !isCreatingEntry) {
|
|
175
174
|
return (
|
|
176
175
|
<NotAllowedInput
|
|
177
|
-
description={
|
|
178
|
-
metadatas.description
|
|
179
|
-
? { id: metadatas.description, defaultMessage: metadatas.description }
|
|
180
|
-
: null
|
|
181
|
-
}
|
|
176
|
+
description={intlDescription}
|
|
182
177
|
intlLabel={{ id: metadatas.label, defaultMessage: metadatas.label }}
|
|
183
178
|
labelAction={labelAction}
|
|
184
179
|
name={name}
|
|
@@ -191,6 +186,7 @@ const DynamicZone = ({
|
|
|
191
186
|
{dynamicDisplayedComponentsLength > 0 && (
|
|
192
187
|
<Box>
|
|
193
188
|
<DzLabel
|
|
189
|
+
intlDescription={intlDescription}
|
|
194
190
|
label={metadatas.label}
|
|
195
191
|
labelAction={labelAction}
|
|
196
192
|
name={name}
|
|
@@ -32,6 +32,7 @@ const InputUID = ({
|
|
|
32
32
|
onChange,
|
|
33
33
|
value,
|
|
34
34
|
placeholder,
|
|
35
|
+
required,
|
|
35
36
|
}) => {
|
|
36
37
|
const { modifiedData, initialData, layout } = useCMEditViewDataManager();
|
|
37
38
|
const [isLoading, setIsLoading] = useState(false);
|
|
@@ -244,6 +245,7 @@ const InputUID = ({
|
|
|
244
245
|
onChange={handleChange}
|
|
245
246
|
placeholder={formattedPlaceholder}
|
|
246
247
|
value={value || ''}
|
|
248
|
+
required={required}
|
|
247
249
|
/>
|
|
248
250
|
);
|
|
249
251
|
};
|
|
@@ -275,6 +277,7 @@ InputUID.propTypes = {
|
|
|
275
277
|
defaultMessage: PropTypes.string.isRequired,
|
|
276
278
|
values: PropTypes.object,
|
|
277
279
|
}),
|
|
280
|
+
required: PropTypes.bool,
|
|
278
281
|
};
|
|
279
282
|
|
|
280
283
|
InputUID.defaultProps = {
|
|
@@ -284,6 +287,7 @@ InputUID.defaultProps = {
|
|
|
284
287
|
labelAction: undefined,
|
|
285
288
|
placeholder: undefined,
|
|
286
289
|
value: '',
|
|
290
|
+
required: false,
|
|
287
291
|
};
|
|
288
292
|
|
|
289
293
|
export default InputUID;
|
|
@@ -3,12 +3,14 @@ import React, { memo, useEffect, useRef, useState } from 'react';
|
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { useDrag, useDrop } from 'react-dnd';
|
|
5
5
|
import { getEmptyImage } from 'react-dnd-html5-backend';
|
|
6
|
+
import styled from 'styled-components';
|
|
6
7
|
import { useIntl } from 'react-intl';
|
|
7
8
|
import toString from 'lodash/toString';
|
|
8
9
|
import { Accordion, AccordionToggle, AccordionContent } from '@strapi/design-system/Accordion';
|
|
9
10
|
import { Grid, GridItem } from '@strapi/design-system/Grid';
|
|
10
11
|
import { Stack } from '@strapi/design-system/Stack';
|
|
11
12
|
import { Box } from '@strapi/design-system/Box';
|
|
13
|
+
import { Tooltip } from '@strapi/design-system/Tooltip';
|
|
12
14
|
import Trash from '@strapi/icons/Trash';
|
|
13
15
|
import Drag from '@strapi/icons/Drag';
|
|
14
16
|
import ItemTypes from '../../../utils/ItemTypes';
|
|
@@ -17,9 +19,23 @@ import Inputs from '../../Inputs';
|
|
|
17
19
|
import FieldComponent from '../../FieldComponent';
|
|
18
20
|
import Preview from './Preview';
|
|
19
21
|
import DraggingSibling from './DraggingSibling';
|
|
20
|
-
import { CustomIconButton
|
|
22
|
+
import { CustomIconButton } from './IconButtonCustoms';
|
|
21
23
|
import { connect, select } from './utils';
|
|
22
24
|
|
|
25
|
+
const DragButton = styled.span`
|
|
26
|
+
display: flex;
|
|
27
|
+
align-items: center;
|
|
28
|
+
height: ${({ theme }) => theme.spaces[7]};
|
|
29
|
+
|
|
30
|
+
padding: 0 ${({ theme }) => theme.spaces[3]};
|
|
31
|
+
cursor: all-scroll;
|
|
32
|
+
|
|
33
|
+
svg {
|
|
34
|
+
width: ${12 / 16}rem;
|
|
35
|
+
height: ${12 / 16}rem;
|
|
36
|
+
}
|
|
37
|
+
`;
|
|
38
|
+
|
|
23
39
|
/* eslint-disable react/no-array-index-key */
|
|
24
40
|
|
|
25
41
|
// Issues:
|
|
@@ -40,7 +56,7 @@ const DraggedItem = ({
|
|
|
40
56
|
// Retrieved from the select function
|
|
41
57
|
moveComponentField,
|
|
42
58
|
removeRepeatableField,
|
|
43
|
-
|
|
59
|
+
setIsDraggingSibling,
|
|
44
60
|
triggerFormValidation,
|
|
45
61
|
// checkFormErrors,
|
|
46
62
|
displayedValue,
|
|
@@ -125,7 +141,7 @@ const DraggedItem = ({
|
|
|
125
141
|
end: () => {
|
|
126
142
|
// Update the errors
|
|
127
143
|
triggerFormValidation();
|
|
128
|
-
|
|
144
|
+
setIsDraggingSibling(false);
|
|
129
145
|
},
|
|
130
146
|
collect: monitor => ({
|
|
131
147
|
isDragging: monitor.isDragging(),
|
|
@@ -138,9 +154,9 @@ const DraggedItem = ({
|
|
|
138
154
|
|
|
139
155
|
useEffect(() => {
|
|
140
156
|
if (isDragging) {
|
|
141
|
-
|
|
157
|
+
setIsDraggingSibling(true);
|
|
142
158
|
}
|
|
143
|
-
}, [isDragging,
|
|
159
|
+
}, [isDragging, setIsDraggingSibling]);
|
|
144
160
|
|
|
145
161
|
// Effect in order to force a rerender after reordering the components
|
|
146
162
|
// Since we are removing the Accordion when doing the DnD we are losing the dragRef, therefore the replaced element cannot be dragged
|
|
@@ -195,16 +211,22 @@ const DraggedItem = ({
|
|
|
195
211
|
})}
|
|
196
212
|
icon={<Trash />}
|
|
197
213
|
/>
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
label={formatMessage({
|
|
214
|
+
{/* react-dnd is broken in firefox with our IconButton, maybe a ref issue */}
|
|
215
|
+
<Tooltip
|
|
216
|
+
description={formatMessage({
|
|
202
217
|
id: getTrad('components.DragHandle-label'),
|
|
203
218
|
defaultMessage: 'Drag',
|
|
204
219
|
})}
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
220
|
+
>
|
|
221
|
+
<DragButton
|
|
222
|
+
role="button"
|
|
223
|
+
tabIndex={-1}
|
|
224
|
+
ref={refs.dragRef}
|
|
225
|
+
onClick={e => e.stopPropagation()}
|
|
226
|
+
>
|
|
227
|
+
<Drag />
|
|
228
|
+
</DragButton>
|
|
229
|
+
</Tooltip>
|
|
208
230
|
</Stack>
|
|
209
231
|
)
|
|
210
232
|
}
|
|
@@ -268,7 +290,7 @@ const DraggedItem = ({
|
|
|
268
290
|
DraggedItem.defaultProps = {
|
|
269
291
|
isDraggingSibling: false,
|
|
270
292
|
isOpen: false,
|
|
271
|
-
|
|
293
|
+
setIsDraggingSibling: () => {},
|
|
272
294
|
toggleCollapses: () => {},
|
|
273
295
|
};
|
|
274
296
|
|
|
@@ -284,7 +306,7 @@ DraggedItem.propTypes = {
|
|
|
284
306
|
toggleCollapses: PropTypes.func,
|
|
285
307
|
moveComponentField: PropTypes.func.isRequired,
|
|
286
308
|
removeRepeatableField: PropTypes.func.isRequired,
|
|
287
|
-
|
|
309
|
+
setIsDraggingSibling: PropTypes.func,
|
|
288
310
|
triggerFormValidation: PropTypes.func.isRequired,
|
|
289
311
|
// checkFormErrors: PropTypes.func.isRequired,
|
|
290
312
|
displayedValue: PropTypes.string.isRequired,
|
|
@@ -47,7 +47,7 @@ const RepeatableComponent = ({
|
|
|
47
47
|
const toggleNotification = useNotification();
|
|
48
48
|
const { formatMessage } = useIntl();
|
|
49
49
|
const [collapseToOpen, setCollapseToOpen] = useState('');
|
|
50
|
-
const [isDraggingSibling,
|
|
50
|
+
const [isDraggingSibling, setIsDraggingSibling] = useState(false);
|
|
51
51
|
const [, drop] = useDrop({ accept: ItemTypes.COMPONENT });
|
|
52
52
|
const { getComponentLayout } = useContentTypeLayout();
|
|
53
53
|
const componentLayoutData = useMemo(() => getComponentLayout(componentUid), [
|
|
@@ -173,7 +173,7 @@ const RepeatableComponent = ({
|
|
|
173
173
|
}}
|
|
174
174
|
parentName={name}
|
|
175
175
|
schema={componentLayoutData}
|
|
176
|
-
|
|
176
|
+
setIsDraggingSibling={setIsDraggingSibling}
|
|
177
177
|
toggleCollapses={toggleCollapses}
|
|
178
178
|
/>
|
|
179
179
|
);
|
|
@@ -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>
|