@strapi/admin 4.15.1 → 4.15.3-alpha.0
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/dist/_chunks/{AuthenticatedApp-092ef2be.js → AuthenticatedApp-26a57d48.js} +30 -30
- package/dist/_chunks/{AuthenticatedApp-092ef2be.js.map → AuthenticatedApp-26a57d48.js.map} +1 -1
- package/dist/_chunks/{AuthenticatedApp-b0ada7e9.mjs → AuthenticatedApp-332b40a8.mjs} +30 -30
- package/dist/_chunks/{AuthenticatedApp-b0ada7e9.mjs.map → AuthenticatedApp-332b40a8.mjs.map} +1 -1
- package/dist/_chunks/{HomePage-5798ba6f.mjs → HomePage-332764b2.mjs} +7 -8
- package/dist/_chunks/{HomePage-5798ba6f.mjs.map → HomePage-332764b2.mjs.map} +1 -1
- package/dist/_chunks/{HomePage-bdcb51be.js → HomePage-74c5c19b.js} +12 -13
- package/dist/_chunks/HomePage-74c5c19b.js.map +1 -0
- package/dist/_chunks/{HomePage-5ae473e6.js → HomePage-8022e4f9.js} +7 -8
- package/dist/_chunks/{HomePage-5ae473e6.js.map → HomePage-8022e4f9.js.map} +1 -1
- package/dist/_chunks/{HomePage-a3cc32d2.mjs → HomePage-ebb9bd4d.mjs} +12 -13
- package/dist/_chunks/HomePage-ebb9bd4d.mjs.map +1 -0
- package/dist/_chunks/{InstalledPluginsPage-cc2d6a36.js → InstalledPluginsPage-08915bd0.js} +10 -12
- package/dist/_chunks/{InstalledPluginsPage-cc2d6a36.js.map → InstalledPluginsPage-08915bd0.js.map} +1 -1
- package/dist/_chunks/{InstalledPluginsPage-6284aaff.mjs → InstalledPluginsPage-33ed21ac.mjs} +10 -12
- package/dist/_chunks/{InstalledPluginsPage-6284aaff.mjs.map → InstalledPluginsPage-33ed21ac.mjs.map} +1 -1
- package/dist/_chunks/{index-305a03f4.mjs → Login-4e7ab11a.mjs} +25 -29
- package/dist/_chunks/Login-4e7ab11a.mjs.map +1 -0
- package/dist/_chunks/{index-137490ba.js → Login-7c938e98.js} +25 -30
- package/dist/_chunks/Login-7c938e98.js.map +1 -0
- package/dist/_chunks/{MarketplacePage-209ec658.js → MarketplacePage-3c080568.js} +6 -8
- package/dist/_chunks/{MarketplacePage-209ec658.js.map → MarketplacePage-3c080568.js.map} +1 -1
- package/dist/_chunks/{MarketplacePage-7dee72f5.mjs → MarketplacePage-b82389f1.mjs} +6 -8
- package/dist/_chunks/{MarketplacePage-7dee72f5.mjs.map → MarketplacePage-b82389f1.mjs.map} +1 -1
- package/dist/_chunks/{ProfilePage-26c14ba4.mjs → ProfilePage-2f0d41e0.mjs} +7 -9
- package/dist/_chunks/{ProfilePage-26c14ba4.mjs.map → ProfilePage-2f0d41e0.mjs.map} +1 -1
- package/dist/_chunks/{ProfilePage-4f8c127b.js → ProfilePage-9911a1aa.js} +7 -9
- package/dist/_chunks/{ProfilePage-4f8c127b.js.map → ProfilePage-9911a1aa.js.map} +1 -1
- package/dist/_chunks/{SSOProviders-1d062c95.mjs → SSOProviders-62bfad92.mjs} +29 -61
- package/dist/_chunks/SSOProviders-62bfad92.mjs.map +1 -0
- package/dist/_chunks/{SSOProviders-1ef0a89e.js → SSOProviders-b395a4e6.js} +28 -80
- package/dist/_chunks/SSOProviders-b395a4e6.js.map +1 -0
- package/dist/_chunks/{build-f36bfc97.js → build-55ba3e68.js} +4 -2
- package/dist/_chunks/{build-f36bfc97.js.map → build-55ba3e68.js.map} +1 -1
- package/dist/_chunks/{build-e1ca35da.mjs → build-b67ecc59.mjs} +4 -2
- package/dist/_chunks/{build-e1ca35da.mjs.map → build-b67ecc59.mjs.map} +1 -1
- package/dist/_chunks/{constants-a773ff9b.js → constants-2bd3e15b.js} +13 -12
- package/dist/_chunks/{constants-a773ff9b.js.map → constants-2bd3e15b.js.map} +1 -1
- package/dist/_chunks/{constants-90c20a6f.mjs → constants-6082c0ef.mjs} +11 -12
- package/dist/_chunks/{constants-90c20a6f.mjs.map → constants-6082c0ef.mjs.map} +1 -1
- package/dist/_chunks/{constants-921eda17.mjs → constants-6ecddc43.mjs} +43 -15
- package/dist/_chunks/constants-6ecddc43.mjs.map +1 -0
- package/dist/_chunks/{constants-86aa3e70.js → constants-7596f6f3.js} +60 -13
- package/dist/_chunks/constants-7596f6f3.js.map +1 -0
- package/dist/_chunks/{constants-9de7641c.mjs → constants-889d52fe.mjs} +28 -28
- package/dist/_chunks/constants-889d52fe.mjs.map +1 -0
- package/dist/_chunks/{constants-70e05152.js → constants-9d60a039.js} +6 -6
- package/dist/_chunks/{constants-70e05152.js.map → constants-9d60a039.js.map} +1 -1
- package/dist/_chunks/{constants-6157f648.mjs → constants-b9efe215.mjs} +6 -6
- package/dist/_chunks/{constants-6157f648.mjs.map → constants-b9efe215.mjs.map} +1 -1
- package/dist/_chunks/{constants-27319180.mjs → constants-c5bbe308.mjs} +13 -12
- package/dist/_chunks/{constants-27319180.mjs.map → constants-c5bbe308.mjs.map} +1 -1
- package/dist/_chunks/{constants-32975b2e.js → constants-df81febb.js} +11 -12
- package/dist/_chunks/{constants-32975b2e.js.map → constants-df81febb.js.map} +1 -1
- package/dist/_chunks/{constants-727a113c.js → constants-efc88bf2.js} +26 -26
- package/dist/_chunks/constants-efc88bf2.js.map +1 -0
- package/dist/_chunks/{develop-513c9644.js → develop-69e28e61.js} +4 -2
- package/dist/_chunks/{develop-513c9644.js.map → develop-69e28e61.js.map} +1 -1
- package/dist/_chunks/{develop-e45b460e.mjs → develop-d97e7494.mjs} +4 -2
- package/dist/_chunks/{develop-e45b460e.mjs.map → develop-d97e7494.mjs.map} +1 -1
- package/dist/_chunks/formatAPIErrors-b599cf27.js +20 -0
- package/dist/_chunks/formatAPIErrors-b599cf27.js.map +1 -0
- package/dist/_chunks/formatAPIErrors-db6ed675.mjs +21 -0
- package/dist/_chunks/formatAPIErrors-db6ed675.mjs.map +1 -0
- package/dist/_chunks/{index-edc9bb0b.js → index-0134922e.js} +673 -811
- package/dist/_chunks/index-0134922e.js.map +1 -0
- package/dist/_chunks/{index-6a512cec.js → index-01a3932c.js} +8 -9
- package/dist/_chunks/{index-6a512cec.js.map → index-01a3932c.js.map} +1 -1
- package/dist/_chunks/{index-284c5926.js → index-13a08117.js} +33 -47
- package/dist/_chunks/index-13a08117.js.map +1 -0
- package/dist/_chunks/{index-1b7e986c.mjs → index-14462502.mjs} +14 -13
- package/dist/_chunks/{index-1b7e986c.mjs.map → index-14462502.mjs.map} +1 -1
- package/dist/_chunks/{index-85069cac.mjs → index-22fbd8cc.mjs} +9 -10
- package/dist/_chunks/{index-85069cac.mjs.map → index-22fbd8cc.mjs.map} +1 -1
- package/dist/_chunks/{index-73ba6bdd.mjs → index-259a5ab3.mjs} +3 -3
- package/dist/_chunks/{index-73ba6bdd.mjs.map → index-259a5ab3.mjs.map} +1 -1
- package/dist/_chunks/{index-7d40adea.mjs → index-287b49b0.mjs} +8 -7
- package/dist/_chunks/{index-7d40adea.mjs.map → index-287b49b0.mjs.map} +1 -1
- package/dist/_chunks/{index-77e0e5d7.js → index-293f112c.js} +8 -7
- package/dist/_chunks/{index-77e0e5d7.js.map → index-293f112c.js.map} +1 -1
- package/dist/_chunks/{index-0af587c3.js → index-2ca9ffb3.js} +78 -147
- package/dist/_chunks/index-2ca9ffb3.js.map +1 -0
- package/dist/_chunks/{index-4c5acc70.js → index-2e47d9aa.js} +9 -10
- package/dist/_chunks/{index-4c5acc70.js.map → index-2e47d9aa.js.map} +1 -1
- package/dist/_chunks/{index-59d22949.mjs → index-3d323e1b.mjs} +8 -9
- package/dist/_chunks/{index-59d22949.mjs.map → index-3d323e1b.mjs.map} +1 -1
- package/dist/_chunks/{index-5752584c.mjs → index-44360544.mjs} +182 -76
- package/dist/_chunks/index-44360544.mjs.map +1 -0
- package/dist/_chunks/{index-34a2909e.mjs → index-46245c2d.mjs} +12 -12
- package/dist/_chunks/{index-34a2909e.mjs.map → index-46245c2d.mjs.map} +1 -1
- package/dist/_chunks/{index-5ad8482b.mjs → index-486f5166.mjs} +7 -7
- package/dist/_chunks/{index-5ad8482b.mjs.map → index-486f5166.mjs.map} +1 -1
- package/dist/_chunks/{index-58db145d.mjs → index-49b41e57.mjs} +3 -3
- package/dist/_chunks/{index-58db145d.mjs.map → index-49b41e57.mjs.map} +1 -1
- package/dist/_chunks/{index-da04b144.js → index-4bdd41f2.js} +14 -13
- package/dist/_chunks/{index-da04b144.js.map → index-4bdd41f2.js.map} +1 -1
- package/dist/_chunks/{index-7aed99db.js → index-4ff5f2a8.js} +12 -12
- package/dist/_chunks/{index-7aed99db.js.map → index-4ff5f2a8.js.map} +1 -1
- package/dist/_chunks/{index-56ced4ab.mjs → index-5221021e.mjs} +8 -7
- package/dist/_chunks/{index-56ced4ab.mjs.map → index-5221021e.mjs.map} +1 -1
- package/dist/_chunks/{index-a4348f3b.js → index-54a7f1f4.js} +12 -12
- package/dist/_chunks/index-54a7f1f4.js.map +1 -0
- package/dist/_chunks/{index-1da8c640.mjs → index-5502f0f9.mjs} +9 -10
- package/dist/_chunks/{index-1da8c640.mjs.map → index-5502f0f9.mjs.map} +1 -1
- package/dist/_chunks/{index-36e0d449.mjs → index-5af78a9d.mjs} +32 -45
- package/dist/_chunks/index-5af78a9d.mjs.map +1 -0
- package/dist/_chunks/{index-1f1e2465.js → index-5be49e36.js} +9 -11
- package/dist/_chunks/{index-1f1e2465.js.map → index-5be49e36.js.map} +1 -1
- package/dist/_chunks/{index-4565fcbd.js → index-5bf8300a.js} +3 -3
- package/dist/_chunks/{index-4565fcbd.js.map → index-5bf8300a.js.map} +1 -1
- package/dist/_chunks/{index-48322669.mjs → index-663f37fb.mjs} +3 -3
- package/dist/_chunks/index-663f37fb.mjs.map +1 -0
- package/dist/_chunks/{index-35e4bad6.mjs → index-6999385d.mjs} +8 -9
- package/dist/_chunks/{index-35e4bad6.mjs.map → index-6999385d.mjs.map} +1 -1
- package/dist/_chunks/{index-928b18d2.mjs → index-70ad05e1.mjs} +3 -3
- package/dist/_chunks/{index-928b18d2.mjs.map → index-70ad05e1.mjs.map} +1 -1
- package/dist/_chunks/{index-e22d1a84.mjs → index-72195b26.mjs} +14 -13
- package/dist/_chunks/{index-e22d1a84.mjs.map → index-72195b26.mjs.map} +1 -1
- package/dist/_chunks/{index-c604806d.js → index-73b1ca6d.js} +12 -12
- package/dist/_chunks/{index-c604806d.js.map → index-73b1ca6d.js.map} +1 -1
- package/dist/_chunks/{index-62b4b3fc.js → index-76459a60.js} +11 -11
- package/dist/_chunks/{index-62b4b3fc.js.map → index-76459a60.js.map} +1 -1
- package/dist/_chunks/{index-6b9e3d60.js → index-77b91009.js} +9 -10
- package/dist/_chunks/{index-6b9e3d60.js.map → index-77b91009.js.map} +1 -1
- package/dist/_chunks/{index-24189ec9.js → index-84321b2e.js} +6 -6
- package/dist/_chunks/{index-24189ec9.js.map → index-84321b2e.js.map} +1 -1
- package/dist/_chunks/{index-b2257157.js → index-866d1aaf.js} +49 -12
- package/dist/_chunks/index-866d1aaf.js.map +1 -0
- package/dist/_chunks/{index-066ee02e.js → index-891738bc.js} +8 -10
- package/dist/_chunks/{index-066ee02e.js.map → index-891738bc.js.map} +1 -1
- package/dist/_chunks/{index-cadd3ee0.js → index-89cb437c.js} +4 -4
- package/dist/_chunks/{index-cadd3ee0.js.map → index-89cb437c.js.map} +1 -1
- package/dist/_chunks/{index-8ea5a488.js → index-901d8afc.js} +9 -10
- package/dist/_chunks/{index-8ea5a488.js.map → index-901d8afc.js.map} +1 -1
- package/dist/_chunks/{index-d1620260.js → index-9c56225f.js} +13 -14
- package/dist/_chunks/{index-d1620260.js.map → index-9c56225f.js.map} +1 -1
- package/dist/_chunks/{index-6dbc94a9.mjs → index-9e3fc4fe.mjs} +6 -6
- package/dist/_chunks/{index-6dbc94a9.mjs.map → index-9e3fc4fe.mjs.map} +1 -1
- package/dist/_chunks/{index-bdfc1149.mjs → index-a16075f2.mjs} +49 -12
- package/dist/_chunks/index-a16075f2.mjs.map +1 -0
- package/dist/_chunks/{index-6cc54f3b.mjs → index-a1c1b833.mjs} +8 -9
- package/dist/_chunks/{index-6cc54f3b.mjs.map → index-a1c1b833.mjs.map} +1 -1
- package/dist/_chunks/{index-acd6d64f.js → index-aaffa28c.js} +8 -7
- package/dist/_chunks/{index-acd6d64f.js.map → index-aaffa28c.js.map} +1 -1
- package/dist/_chunks/{index-be2ca313.mjs → index-abcea3d3.mjs} +13 -13
- package/dist/_chunks/{index-be2ca313.mjs.map → index-abcea3d3.mjs.map} +1 -1
- package/dist/_chunks/{index-af69bc98.mjs → index-acdd9b71.mjs} +11 -11
- package/dist/_chunks/{index-af69bc98.mjs.map → index-acdd9b71.mjs.map} +1 -1
- package/dist/_chunks/{index-89d27faa.js → index-adc85ed8.js} +14 -13
- package/dist/_chunks/{index-89d27faa.js.map → index-adc85ed8.js.map} +1 -1
- package/dist/_chunks/{index-f448aed2.js → index-af5e137f.js} +13 -12
- package/dist/_chunks/{index-f448aed2.js.map → index-af5e137f.js.map} +1 -1
- package/dist/_chunks/{index-16030b74.js → index-b11e88f3.js} +3 -3
- package/dist/_chunks/index-b11e88f3.js.map +1 -0
- package/dist/_chunks/{index-e414353b.js → index-b47862fc.js} +8 -8
- package/dist/_chunks/{index-e414353b.js.map → index-b47862fc.js.map} +1 -1
- package/dist/_chunks/{index-51a15b27.js → index-bea39602.js} +4 -4
- package/dist/_chunks/{index-51a15b27.js.map → index-bea39602.js.map} +1 -1
- package/dist/_chunks/{index-53ba81f9.mjs → index-c202e78f.mjs} +9 -10
- package/dist/_chunks/{index-53ba81f9.mjs.map → index-c202e78f.mjs.map} +1 -1
- package/dist/_chunks/{index-8d4d361d.mjs → index-c9f9b444.mjs} +13 -13
- package/dist/_chunks/{index-8d4d361d.mjs.map → index-c9f9b444.mjs.map} +1 -1
- package/dist/_chunks/{index-ea23ee9f.mjs → index-caecca36.mjs} +9 -11
- package/dist/_chunks/{index-ea23ee9f.mjs.map → index-caecca36.mjs.map} +1 -1
- package/dist/_chunks/{index-86dfbe3a.js → index-cce8ecb6.js} +178 -72
- package/dist/_chunks/index-cce8ecb6.js.map +1 -0
- package/dist/_chunks/{index-34de382e.mjs → index-cd461a87.mjs} +688 -824
- package/dist/_chunks/index-cd461a87.mjs.map +1 -0
- package/dist/_chunks/{index-5d8d89a7.js → index-cdfb1568.js} +13 -13
- package/dist/_chunks/{index-5d8d89a7.js.map → index-cdfb1568.js.map} +1 -1
- package/dist/_chunks/{index-1763a04f.js → index-cf87a6f0.js} +8 -9
- package/dist/_chunks/{index-1763a04f.js.map → index-cf87a6f0.js.map} +1 -1
- package/dist/_chunks/{index-b81f7273.mjs → index-d33930a8.mjs} +78 -147
- package/dist/_chunks/index-d33930a8.mjs.map +1 -0
- package/dist/_chunks/{index-fcd5bc14.mjs → index-d4473456.mjs} +14 -13
- package/dist/_chunks/{index-fcd5bc14.mjs.map → index-d4473456.mjs.map} +1 -1
- package/dist/_chunks/{index-3c58de6f.js → index-d74efba3.js} +14 -13
- package/dist/_chunks/{index-3c58de6f.js.map → index-d74efba3.js.map} +1 -1
- package/dist/_chunks/{index-1e973c03.mjs → index-d7bc095b.mjs} +14 -13
- package/dist/_chunks/{index-1e973c03.mjs.map → index-d7bc095b.mjs.map} +1 -1
- package/dist/_chunks/{index-00202c8a.mjs → index-dbbda762.mjs} +13 -12
- package/dist/_chunks/{index-00202c8a.mjs.map → index-dbbda762.mjs.map} +1 -1
- package/dist/_chunks/{index-f5342ea5.js → index-dfb03b19.js} +14 -13
- package/dist/_chunks/{index-f5342ea5.js.map → index-dfb03b19.js.map} +1 -1
- package/dist/_chunks/{index-bb8093ea.mjs → index-e10dd15d.mjs} +12 -12
- package/dist/_chunks/{index-bb8093ea.mjs.map → index-e10dd15d.mjs.map} +1 -1
- package/dist/_chunks/{index-370a4ee8.mjs → index-e4f7fa95.mjs} +12 -12
- package/dist/_chunks/index-e4f7fa95.mjs.map +1 -0
- package/dist/_chunks/{index-b98ea3ce.mjs → index-e749e6ef.mjs} +13 -14
- package/dist/_chunks/{index-b98ea3ce.mjs.map → index-e749e6ef.mjs.map} +1 -1
- package/dist/_chunks/{index-332f319e.mjs → index-ef5a0b8f.mjs} +8 -10
- package/dist/_chunks/{index-332f319e.mjs.map → index-ef5a0b8f.mjs.map} +1 -1
- package/dist/_chunks/{index-f179c7ea.js → index-f03c4e70.js} +13 -13
- package/dist/_chunks/{index-f179c7ea.js.map → index-f03c4e70.js.map} +1 -1
- package/dist/_chunks/{index-52b5db8a.js → index-fc0191f3.js} +8 -9
- package/dist/_chunks/{index-52b5db8a.js.map → index-fc0191f3.js.map} +1 -1
- package/dist/_chunks/{schema-a95f2514.mjs → schema-4d12cff6.mjs} +2 -2
- package/dist/_chunks/{schema-a95f2514.mjs.map → schema-4d12cff6.mjs.map} +1 -1
- package/dist/_chunks/{schema-f49c76d7.js → schema-c6ce9e01.js} +2 -2
- package/dist/_chunks/{schema-f49c76d7.js.map → schema-c6ce9e01.js.map} +1 -1
- package/dist/_chunks/{validateWorkflow-e66d7d2e.js → validateWorkflow-155f5778.js} +3 -3
- package/dist/_chunks/{validateWorkflow-e66d7d2e.js.map → validateWorkflow-155f5778.js.map} +1 -1
- package/dist/_chunks/{validateWorkflow-d051b610.mjs → validateWorkflow-e0166061.mjs} +3 -3
- package/dist/_chunks/{validateWorkflow-d051b610.mjs.map → validateWorkflow-e0166061.mjs.map} +1 -1
- package/dist/admin/index.js +9 -10
- package/dist/admin/index.js.map +1 -1
- package/dist/admin/index.mjs +9 -10
- package/dist/admin/index.mjs.map +1 -1
- package/dist/admin/src/constants.d.ts +10 -0
- package/dist/admin/src/contexts/admin.d.ts +2 -2
- package/dist/admin/src/hooks/__mocks__/useSettingsMenu.d.ts +2 -0
- package/dist/admin/src/hooks/useEnterprise.d.ts +6 -4
- package/dist/admin/src/hooks/useSettingsMenu.d.ts +24 -0
- package/dist/admin/src/pages/Auth/AuthPage.d.ts +6 -0
- package/dist/admin/src/pages/Auth/components/FieldActionWrapper.d.ts +3 -0
- package/dist/admin/src/pages/Auth/components/ForgotPassword.d.ts +3 -0
- package/dist/admin/src/pages/Auth/components/ForgotPasswordSuccess.d.ts +2 -0
- package/dist/admin/src/pages/Auth/components/Login.d.ts +8 -0
- package/dist/admin/src/pages/Auth/components/Oops.d.ts +2 -0
- package/dist/admin/src/pages/Auth/components/Register.d.ts +7 -0
- package/dist/admin/src/pages/Auth/components/ResetPassword.d.ts +3 -0
- package/dist/admin/src/pages/Auth/constants.d.ts +14 -0
- package/dist/admin/src/pages/Marketplace/hooks/useMarketplaceData.d.ts +2 -2
- package/dist/admin/src/types/permissions.d.ts +10 -0
- package/dist/cli.js +3 -1
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +3 -1
- package/dist/cli.mjs.map +1 -1
- package/dist/ee/admin/src/constants.d.ts +3 -1
- package/dist/ee/admin/src/pages/AuthPage/components/Login.d.ts +3 -0
- package/dist/ee/admin/src/pages/AuthPage/components/Providers.d.ts +2 -0
- package/dist/ee/admin/src/pages/AuthPage/components/SSOProviders.d.ts +8 -0
- package/dist/ee/admin/src/pages/AuthPage/constants.d.ts +3 -0
- package/dist/ee/admin/src/pages/AuthResponse.d.ts +2 -0
- package/dist/ee/admin/src/pages/HomePage.d.ts +1 -1
- package/dist/shared/contracts/authentication.d.ts +126 -0
- package/dist/shared/contracts/providers.d.ts +18 -0
- package/ee/LICENSE +1 -0
- package/package.json +21 -21
- package/dist/_chunks/HomePage-a3cc32d2.mjs.map +0 -1
- package/dist/_chunks/HomePage-bdcb51be.js.map +0 -1
- package/dist/_chunks/SSOProviders-1d062c95.mjs.map +0 -1
- package/dist/_chunks/SSOProviders-1ef0a89e.js.map +0 -1
- package/dist/_chunks/constants-12dfb222.mjs +0 -34
- package/dist/_chunks/constants-12dfb222.mjs.map +0 -1
- package/dist/_chunks/constants-1aea1185.js +0 -34
- package/dist/_chunks/constants-1aea1185.js.map +0 -1
- package/dist/_chunks/constants-727a113c.js.map +0 -1
- package/dist/_chunks/constants-86aa3e70.js.map +0 -1
- package/dist/_chunks/constants-921eda17.mjs.map +0 -1
- package/dist/_chunks/constants-9de7641c.mjs.map +0 -1
- package/dist/_chunks/index-0af587c3.js.map +0 -1
- package/dist/_chunks/index-137490ba.js.map +0 -1
- package/dist/_chunks/index-16030b74.js.map +0 -1
- package/dist/_chunks/index-284c5926.js.map +0 -1
- package/dist/_chunks/index-305a03f4.mjs.map +0 -1
- package/dist/_chunks/index-34de382e.mjs.map +0 -1
- package/dist/_chunks/index-36e0d449.mjs.map +0 -1
- package/dist/_chunks/index-370a4ee8.mjs.map +0 -1
- package/dist/_chunks/index-48322669.mjs.map +0 -1
- package/dist/_chunks/index-5752584c.mjs.map +0 -1
- package/dist/_chunks/index-86dfbe3a.js.map +0 -1
- package/dist/_chunks/index-a4348f3b.js.map +0 -1
- package/dist/_chunks/index-b2257157.js.map +0 -1
- package/dist/_chunks/index-b81f7273.mjs.map +0 -1
- package/dist/_chunks/index-bdfc1149.mjs.map +0 -1
- package/dist/_chunks/index-edc9bb0b.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { auth, useCallbackRef,
|
|
2
|
+
import { auth, useCallbackRef, translatedErrors, useFetchClient, useQuery, Form, useNotification, useAppInfo, usePersistentState, useTracking, useGuidedTour, useAPIErrorHandler, getYupInnerErrors, useFocusWhenNavigate, pxToRem, LoadingIndicatorPage, TrackingProvider, prefixFileUrlWithBackendUrl, GuidedTourProvider as GuidedTourProvider$1, StrapiAppProvider, LibraryProvider, CustomFieldsProvider, AutoReloadOverlayBlockerProvider, OverlayBlockerProvider, NotificationsProvider, RBACContext, getFetchClient } from "@strapi/helper-plugin";
|
|
3
3
|
import { createRoot } from "react-dom/client";
|
|
4
4
|
import { Box, Flex, SingleSelect, SingleSelectOption, FieldAction, TextInput, Main, Typography, Checkbox, Button, Field, Portal, IconButton, FieldLabel, VisuallyHidden, FieldInput, Textarea, Grid, GridItem, HeaderLayout, ContentLayout, EmptyStateLayout, LinkButton, Select, Option, TextButton, SkipToContent, DesignSystemProvider, lightTheme, darkTheme } from "@strapi/design-system";
|
|
5
5
|
import invariant from "invariant";
|
|
@@ -7,26 +7,25 @@ import isFunction from "lodash/isFunction";
|
|
|
7
7
|
import merge from "lodash/merge";
|
|
8
8
|
import pick from "lodash/pick";
|
|
9
9
|
import { Helmet } from "react-helmet";
|
|
10
|
-
import { useLocation, Route, Redirect, useHistory, useRouteMatch, Switch, BrowserRouter } from "react-router-dom";
|
|
10
|
+
import { useLocation, Route, Redirect, useHistory, NavLink, useRouteMatch, Switch, BrowserRouter } from "react-router-dom";
|
|
11
11
|
import * as React from "react";
|
|
12
|
-
import { useState, useReducer, useEffect } from "react";
|
|
13
12
|
import { IntlProvider, useIntl } from "react-intl";
|
|
14
13
|
import { useDispatch, Provider, useSelector, useStore } from "react-redux";
|
|
15
14
|
import { createContext } from "@radix-ui/react-context";
|
|
16
|
-
import
|
|
17
|
-
import camelCase from "lodash/camelCase";
|
|
18
|
-
import get from "lodash/get";
|
|
19
|
-
import omit from "lodash/omit";
|
|
20
|
-
import PropTypes from "prop-types";
|
|
21
|
-
import defaultsDeep from "lodash/defaultsDeep";
|
|
22
|
-
import styled, { useTheme, createGlobalStyle } from "styled-components";
|
|
15
|
+
import { Link } from "@strapi/design-system/v2";
|
|
23
16
|
import { Eye, EyeStriked, Cross, ArrowRight, EmptyPictures } from "@strapi/icons";
|
|
24
17
|
import { Formik, Form as Form$1 } from "formik";
|
|
25
|
-
import
|
|
18
|
+
import camelCase from "lodash/camelCase";
|
|
26
19
|
import { useMutation, useQuery as useQuery$1, QueryClient, QueryClientProvider } from "react-query";
|
|
20
|
+
import styled, { useTheme, createGlobalStyle } from "styled-components";
|
|
21
|
+
import * as yup from "yup";
|
|
22
|
+
import { ValidationError } from "yup";
|
|
23
|
+
import defaultsDeep from "lodash/defaultsDeep";
|
|
24
|
+
import omit from "lodash/omit";
|
|
25
|
+
import { parse } from "qs";
|
|
27
26
|
import produce from "immer";
|
|
27
|
+
import get from "lodash/get";
|
|
28
28
|
import set from "lodash/set";
|
|
29
|
-
import { parse } from "qs";
|
|
30
29
|
import { createSelector, configureStore, combineReducers } from "@reduxjs/toolkit";
|
|
31
30
|
const styles = `
|
|
32
31
|
.strapi--root {
|
|
@@ -234,16 +233,79 @@ const HOOKS = {
|
|
|
234
233
|
};
|
|
235
234
|
const ACTION_SET_APP_RUNTIME_STATUS = "StrapiAdmin/APP/SET_APP_RUNTIME_STATUS";
|
|
236
235
|
const ACTION_SET_ADMIN_PERMISSIONS = "StrapiAdmin/App/SET_ADMIN_PERMISSIONS";
|
|
236
|
+
const SETTINGS_LINKS_CE = () => ({
|
|
237
|
+
global: [
|
|
238
|
+
{
|
|
239
|
+
intlLabel: { id: "Settings.application.title", defaultMessage: "Overview" },
|
|
240
|
+
to: "/settings/application-infos",
|
|
241
|
+
id: "000-application-infos"
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
intlLabel: { id: "Settings.webhooks.title", defaultMessage: "Webhooks" },
|
|
245
|
+
to: "/settings/webhooks",
|
|
246
|
+
id: "webhooks"
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
intlLabel: { id: "Settings.apiTokens.title", defaultMessage: "API Tokens" },
|
|
250
|
+
to: "/settings/api-tokens?sort=name:ASC",
|
|
251
|
+
id: "api-tokens"
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
intlLabel: { id: "Settings.transferTokens.title", defaultMessage: "Transfer Tokens" },
|
|
255
|
+
to: "/settings/transfer-tokens?sort=name:ASC",
|
|
256
|
+
id: "transfer-tokens"
|
|
257
|
+
},
|
|
258
|
+
// If the Enterprise feature is not enabled and if the config doesn't disable it, we promote the Enterprise feature by displaying them in the settings menu.
|
|
259
|
+
// Disable this by adding "promoteEE: false" to your `./config/admin.js` file
|
|
260
|
+
...!window.strapi.features.isEnabled(window.strapi.features.SSO) && window.strapi?.flags?.promoteEE ? [
|
|
261
|
+
{
|
|
262
|
+
intlLabel: { id: "Settings.sso.title", defaultMessage: "Single Sign-On" },
|
|
263
|
+
to: "/settings/purchase-single-sign-on",
|
|
264
|
+
id: "sso",
|
|
265
|
+
lockIcon: true
|
|
266
|
+
}
|
|
267
|
+
] : [],
|
|
268
|
+
...!window.strapi.features.isEnabled(window.strapi.features.REVIEW_WORKFLOWS) && window.strapi?.flags?.promoteEE ? [
|
|
269
|
+
{
|
|
270
|
+
intlLabel: {
|
|
271
|
+
id: "Settings.review-workflows.page.title",
|
|
272
|
+
defaultMessage: "Review Workflows"
|
|
273
|
+
},
|
|
274
|
+
to: "/settings/purchase-review-workflows",
|
|
275
|
+
id: "review-workflows",
|
|
276
|
+
lockIcon: true
|
|
277
|
+
}
|
|
278
|
+
] : []
|
|
279
|
+
],
|
|
280
|
+
admin: [
|
|
281
|
+
{
|
|
282
|
+
intlLabel: { id: "global.roles", defaultMessage: "Roles" },
|
|
283
|
+
to: "/settings/roles",
|
|
284
|
+
id: "roles"
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
intlLabel: { id: "global.users", defaultMessage: "Users" },
|
|
288
|
+
// Init the search params directly
|
|
289
|
+
to: "/settings/users?pageSize=10&page=1&sort=firstname",
|
|
290
|
+
id: "users"
|
|
291
|
+
},
|
|
292
|
+
...!window.strapi.features.isEnabled(window.strapi.features.AUDIT_LOGS) && window.strapi?.flags?.promoteEE ? [
|
|
293
|
+
{
|
|
294
|
+
intlLabel: { id: "global.auditLogs", defaultMessage: "Audit Logs" },
|
|
295
|
+
to: "/settings/purchase-audit-logs",
|
|
296
|
+
id: "auditLogs",
|
|
297
|
+
lockIcon: true
|
|
298
|
+
}
|
|
299
|
+
] : []
|
|
300
|
+
]
|
|
301
|
+
});
|
|
237
302
|
const [ConfigurationContextProvider, useConfigurationContext] = createContext("ConfigurationContext");
|
|
238
303
|
const useConfiguration = () => useConfigurationContext("useConfiguration");
|
|
239
304
|
function isEnterprise() {
|
|
240
305
|
return window.strapi.isEE;
|
|
241
306
|
}
|
|
242
|
-
|
|
243
|
-
defaultValue = null,
|
|
244
|
-
combine = (ceData2, eeData) => eeData,
|
|
245
|
-
enabled = true
|
|
246
|
-
} = {}) {
|
|
307
|
+
const useEnterprise = (ceData, eeCallback, opts = {}) => {
|
|
308
|
+
const { defaultValue = null, combine = (_ceData, eeData) => eeData, enabled = true } = opts;
|
|
247
309
|
const eeCallbackRef = useCallbackRef(eeCallback);
|
|
248
310
|
const combineCallbackRef = useCallbackRef(combine);
|
|
249
311
|
const [{ data }, setData] = React.useState({
|
|
@@ -252,21 +314,22 @@ function useEnterprise(ceData, eeCallback, {
|
|
|
252
314
|
React.useEffect(() => {
|
|
253
315
|
async function importEE() {
|
|
254
316
|
const eeData = await eeCallbackRef();
|
|
255
|
-
|
|
317
|
+
const combinedValue = combineCallbackRef(ceData, eeData);
|
|
318
|
+
setData({ data: combinedValue ? combinedValue : eeData });
|
|
256
319
|
}
|
|
257
320
|
if (isEnterprise() && enabled) {
|
|
258
321
|
importEE();
|
|
259
322
|
}
|
|
260
323
|
}, [ceData, eeCallbackRef, combineCallbackRef, enabled]);
|
|
261
324
|
return data;
|
|
262
|
-
}
|
|
325
|
+
};
|
|
263
326
|
const [LocalesContextProvider, useLocalesContext] = createContext("LocalesContext");
|
|
264
327
|
const useLocales = () => useLocalesContext("useLocales");
|
|
265
328
|
const LANGUAGE_LOCAL_STORAGE_KEY = "strapi-admin-language";
|
|
266
329
|
const LanguageProvider = ({ children, localeNames, messages }) => {
|
|
267
330
|
const [{ locale }, dispatch] = React.useReducer(
|
|
268
|
-
reducer$
|
|
269
|
-
initialState$
|
|
331
|
+
reducer$2,
|
|
332
|
+
initialState$7,
|
|
270
333
|
() => {
|
|
271
334
|
const languageFromLocaleStorage = window.localStorage.getItem(LANGUAGE_LOCAL_STORAGE_KEY);
|
|
272
335
|
if (languageFromLocaleStorage && localeNames[languageFromLocaleStorage]) {
|
|
@@ -295,11 +358,11 @@ const LanguageProvider = ({ children, localeNames, messages }) => {
|
|
|
295
358
|
const appMessages = defaultsDeep(messages[locale], messages.en);
|
|
296
359
|
return /* @__PURE__ */ jsx(IntlProvider, { locale, defaultLocale: "en", messages: appMessages, textComponent: "span", children: /* @__PURE__ */ jsx(LocalesContextProvider, { changeLocale, localeNames, children }) });
|
|
297
360
|
};
|
|
298
|
-
const initialState$
|
|
361
|
+
const initialState$7 = {
|
|
299
362
|
localeNames: { en: "English" },
|
|
300
363
|
locale: "en"
|
|
301
364
|
};
|
|
302
|
-
const reducer$
|
|
365
|
+
const reducer$2 = (state = initialState$7, action) => {
|
|
303
366
|
switch (action.type) {
|
|
304
367
|
case "CHANGE_LOCALE": {
|
|
305
368
|
const { locale } = action;
|
|
@@ -313,22 +376,14 @@ const reducer$3 = (state = initialState$8, action) => {
|
|
|
313
376
|
}
|
|
314
377
|
}
|
|
315
378
|
};
|
|
316
|
-
const
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
};
|
|
325
|
-
return acc;
|
|
326
|
-
},
|
|
327
|
-
{}
|
|
328
|
-
);
|
|
329
|
-
} catch (err) {
|
|
330
|
-
return {};
|
|
331
|
-
}
|
|
379
|
+
const Img = styled.img`
|
|
380
|
+
height: ${72 / 16}rem;
|
|
381
|
+
`;
|
|
382
|
+
const Logo = () => {
|
|
383
|
+
const {
|
|
384
|
+
logos: { auth: auth2 }
|
|
385
|
+
} = useConfiguration();
|
|
386
|
+
return /* @__PURE__ */ jsx(Img, { src: auth2?.custom ?? auth2.default, "aria-hidden": true, alt: "" });
|
|
332
387
|
};
|
|
333
388
|
const Wrapper = styled(Box)`
|
|
334
389
|
margin: 0 auto;
|
|
@@ -374,15 +429,6 @@ const UnauthenticatedLayout = ({ children }) => {
|
|
|
374
429
|
/* @__PURE__ */ jsx(Box, { paddingTop: 2, paddingBottom: 11, children })
|
|
375
430
|
] });
|
|
376
431
|
};
|
|
377
|
-
const Img = styled.img`
|
|
378
|
-
height: ${72 / 16}rem;
|
|
379
|
-
`;
|
|
380
|
-
const Logo = () => {
|
|
381
|
-
const {
|
|
382
|
-
logos: { auth: auth2 }
|
|
383
|
-
} = useConfiguration();
|
|
384
|
-
return /* @__PURE__ */ jsx(Img, { src: auth2?.custom ?? auth2.default, "aria-hidden": true, alt: "" });
|
|
385
|
-
};
|
|
386
432
|
const FieldActionWrapper = styled(FieldAction)`
|
|
387
433
|
svg {
|
|
388
434
|
height: 1rem;
|
|
@@ -392,16 +438,64 @@ const FieldActionWrapper = styled(FieldAction)`
|
|
|
392
438
|
}
|
|
393
439
|
}
|
|
394
440
|
`;
|
|
395
|
-
const
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
const Login = ({
|
|
401
|
-
const [
|
|
441
|
+
const LOGIN_SCHEMA = yup.object().shape({
|
|
442
|
+
email: yup.string().email(translatedErrors.email).required(translatedErrors.required),
|
|
443
|
+
password: yup.string().required(translatedErrors.required),
|
|
444
|
+
rememberMe: yup.bool().nullable()
|
|
445
|
+
});
|
|
446
|
+
const Login = ({ children }) => {
|
|
447
|
+
const [apiError, setApiError] = React.useState();
|
|
448
|
+
const [passwordShown, setPasswordShown] = React.useState(false);
|
|
402
449
|
const { formatMessage } = useIntl();
|
|
403
|
-
|
|
450
|
+
const { post } = useFetchClient();
|
|
451
|
+
const { changeLocale } = useLocales();
|
|
452
|
+
const query = useQuery();
|
|
453
|
+
const { push } = useHistory();
|
|
454
|
+
const mutation = useMutation(
|
|
455
|
+
async (body) => {
|
|
456
|
+
const {
|
|
457
|
+
data: { data }
|
|
458
|
+
} = await post("/admin/login", body);
|
|
459
|
+
return { ...data, rememberMe: body.rememberMe };
|
|
460
|
+
},
|
|
461
|
+
{
|
|
462
|
+
onSuccess(data) {
|
|
463
|
+
if (data) {
|
|
464
|
+
const { token, user } = data;
|
|
465
|
+
if (user.preferedLanguage) {
|
|
466
|
+
changeLocale(user.preferedLanguage);
|
|
467
|
+
}
|
|
468
|
+
auth.setToken(token, data.rememberMe);
|
|
469
|
+
auth.setUserInfo(user, data.rememberMe);
|
|
470
|
+
const redirectTo = query.get("redirectTo");
|
|
471
|
+
const redirectUrl = redirectTo ? decodeURIComponent(redirectTo) : "/";
|
|
472
|
+
push(redirectUrl);
|
|
473
|
+
}
|
|
474
|
+
},
|
|
475
|
+
onError(err) {
|
|
476
|
+
const message = err.response?.data?.error?.message ?? "Something went wrong";
|
|
477
|
+
if (camelCase(message).toLowerCase() === "usernotactive") {
|
|
478
|
+
push("/auth/oops");
|
|
479
|
+
return;
|
|
480
|
+
}
|
|
481
|
+
setApiError(message);
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
);
|
|
485
|
+
return /* @__PURE__ */ jsx(UnauthenticatedLayout, { children: /* @__PURE__ */ jsxs(Main, { children: [
|
|
404
486
|
/* @__PURE__ */ jsxs(LayoutContent, { children: [
|
|
487
|
+
/* @__PURE__ */ jsxs(Column, { children: [
|
|
488
|
+
/* @__PURE__ */ jsx(Logo, {}),
|
|
489
|
+
/* @__PURE__ */ jsx(Box, { paddingTop: 6, paddingBottom: 1, children: /* @__PURE__ */ jsx(Typography, { variant: "alpha", as: "h1", children: formatMessage({
|
|
490
|
+
id: "Auth.form.welcome.title",
|
|
491
|
+
defaultMessage: "Welcome!"
|
|
492
|
+
}) }) }),
|
|
493
|
+
/* @__PURE__ */ jsx(Box, { paddingBottom: 7, children: /* @__PURE__ */ jsx(Typography, { variant: "epsilon", textColor: "neutral600", children: formatMessage({
|
|
494
|
+
id: "Auth.form.welcome.subtitle",
|
|
495
|
+
defaultMessage: "Log in to your Strapi account"
|
|
496
|
+
}) }) }),
|
|
497
|
+
mutation.isError && apiError ? /* @__PURE__ */ jsx(Typography, { id: "global-form-error", role: "alert", tabIndex: -1, textColor: "danger600", children: apiError }) : null
|
|
498
|
+
] }),
|
|
405
499
|
/* @__PURE__ */ jsx(
|
|
406
500
|
Formik,
|
|
407
501
|
{
|
|
@@ -411,171 +505,141 @@ const Login = ({ onSubmit, schema, children }) => {
|
|
|
411
505
|
password: "",
|
|
412
506
|
rememberMe: false
|
|
413
507
|
},
|
|
414
|
-
onSubmit
|
|
415
|
-
|
|
508
|
+
onSubmit: (values) => {
|
|
509
|
+
mutation.mutate(values);
|
|
510
|
+
},
|
|
511
|
+
validationSchema: LOGIN_SCHEMA,
|
|
416
512
|
validateOnChange: false,
|
|
417
|
-
children: ({ values, errors, handleChange }) => /* @__PURE__ */
|
|
418
|
-
/* @__PURE__ */
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
}
|
|
491
|
-
),
|
|
492
|
-
required: true
|
|
493
|
-
}
|
|
494
|
-
),
|
|
495
|
-
/* @__PURE__ */ jsx(
|
|
496
|
-
Checkbox,
|
|
497
|
-
{
|
|
498
|
-
onValueChange: (checked) => {
|
|
499
|
-
handleChange({ target: { value: checked, name: "rememberMe" } });
|
|
500
|
-
},
|
|
501
|
-
value: values.rememberMe,
|
|
502
|
-
"aria-label": "rememberMe",
|
|
503
|
-
name: "rememberMe",
|
|
504
|
-
children: formatMessage({
|
|
505
|
-
id: "Auth.form.rememberMe.label",
|
|
506
|
-
defaultMessage: "Remember me"
|
|
507
|
-
})
|
|
508
|
-
}
|
|
509
|
-
),
|
|
510
|
-
/* @__PURE__ */ jsx(Button, { fullWidth: true, type: "submit", children: formatMessage({ id: "Auth.form.button.login", defaultMessage: "Login" }) })
|
|
511
|
-
] })
|
|
512
|
-
] })
|
|
513
|
+
children: ({ values, errors, handleChange }) => /* @__PURE__ */ jsx(Form, { children: /* @__PURE__ */ jsxs(Flex, { direction: "column", alignItems: "stretch", gap: 6, children: [
|
|
514
|
+
/* @__PURE__ */ jsx(
|
|
515
|
+
TextInput,
|
|
516
|
+
{
|
|
517
|
+
error: errors.email ? formatMessage({
|
|
518
|
+
id: errors.email,
|
|
519
|
+
defaultMessage: "This value is required."
|
|
520
|
+
}) : "",
|
|
521
|
+
value: values.email,
|
|
522
|
+
onChange: handleChange,
|
|
523
|
+
label: formatMessage({ id: "Auth.form.email.label", defaultMessage: "Email" }),
|
|
524
|
+
placeholder: formatMessage({
|
|
525
|
+
id: "Auth.form.email.placeholder",
|
|
526
|
+
defaultMessage: "kai@doe.com"
|
|
527
|
+
}),
|
|
528
|
+
name: "email",
|
|
529
|
+
required: true
|
|
530
|
+
}
|
|
531
|
+
),
|
|
532
|
+
/* @__PURE__ */ jsx(
|
|
533
|
+
PasswordInput$2,
|
|
534
|
+
{
|
|
535
|
+
error: errors.password ? formatMessage({
|
|
536
|
+
id: errors.password,
|
|
537
|
+
defaultMessage: "This value is required."
|
|
538
|
+
}) : "",
|
|
539
|
+
onChange: handleChange,
|
|
540
|
+
value: values.password,
|
|
541
|
+
label: formatMessage({
|
|
542
|
+
id: "global.password",
|
|
543
|
+
defaultMessage: "Password"
|
|
544
|
+
}),
|
|
545
|
+
name: "password",
|
|
546
|
+
type: passwordShown ? "text" : "password",
|
|
547
|
+
endAction: /* @__PURE__ */ jsx(
|
|
548
|
+
FieldActionWrapper,
|
|
549
|
+
{
|
|
550
|
+
onClick: (e) => {
|
|
551
|
+
e.stopPropagation();
|
|
552
|
+
setPasswordShown((prev) => !prev);
|
|
553
|
+
},
|
|
554
|
+
label: formatMessage(
|
|
555
|
+
passwordShown ? {
|
|
556
|
+
id: "Auth.form.password.show-password",
|
|
557
|
+
defaultMessage: "Show password"
|
|
558
|
+
} : {
|
|
559
|
+
id: "Auth.form.password.hide-password",
|
|
560
|
+
defaultMessage: "Hide password"
|
|
561
|
+
}
|
|
562
|
+
),
|
|
563
|
+
children: passwordShown ? /* @__PURE__ */ jsx(Eye, {}) : /* @__PURE__ */ jsx(EyeStriked, {})
|
|
564
|
+
}
|
|
565
|
+
),
|
|
566
|
+
required: true
|
|
567
|
+
}
|
|
568
|
+
),
|
|
569
|
+
/* @__PURE__ */ jsx(
|
|
570
|
+
Checkbox,
|
|
571
|
+
{
|
|
572
|
+
onValueChange: (checked) => {
|
|
573
|
+
handleChange({ target: { value: checked, name: "rememberMe" } });
|
|
574
|
+
},
|
|
575
|
+
value: values.rememberMe,
|
|
576
|
+
"aria-label": "rememberMe",
|
|
577
|
+
name: "rememberMe",
|
|
578
|
+
children: formatMessage({
|
|
579
|
+
id: "Auth.form.rememberMe.label",
|
|
580
|
+
defaultMessage: "Remember me"
|
|
581
|
+
})
|
|
582
|
+
}
|
|
583
|
+
),
|
|
584
|
+
/* @__PURE__ */ jsx(Button, { fullWidth: true, type: "submit", children: formatMessage({ id: "Auth.form.button.login", defaultMessage: "Login" }) })
|
|
585
|
+
] }) })
|
|
513
586
|
}
|
|
514
587
|
),
|
|
515
588
|
children
|
|
516
589
|
] }),
|
|
517
|
-
/* @__PURE__ */ jsx(Flex, { justifyContent: "center", children: /* @__PURE__ */ jsx(Box, { paddingTop: 4, children: /* @__PURE__ */ jsx(Link, { to: "/auth/forgot-password", children: formatMessage({
|
|
590
|
+
/* @__PURE__ */ jsx(Flex, { justifyContent: "center", children: /* @__PURE__ */ jsx(Box, { paddingTop: 4, children: /* @__PURE__ */ jsx(Link, { as: NavLink, to: "/auth/forgot-password", children: formatMessage({
|
|
518
591
|
id: "Auth.link.forgot-password",
|
|
519
592
|
defaultMessage: "Forgot your password?"
|
|
520
593
|
}) }) }) })
|
|
521
|
-
] });
|
|
594
|
+
] }) });
|
|
522
595
|
};
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
596
|
+
const PasswordInput$2 = styled(TextInput)`
|
|
597
|
+
::-ms-reveal {
|
|
598
|
+
display: none;
|
|
526
599
|
}
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
schema: PropTypes.shape({
|
|
532
|
-
type: PropTypes.string.isRequired
|
|
533
|
-
}).isRequired
|
|
534
|
-
};
|
|
535
|
-
const LoginCE = (loginProps) => {
|
|
536
|
-
return /* @__PURE__ */ jsx(UnauthenticatedLayout, { children: /* @__PURE__ */ jsx(Login, { ...loginProps }) });
|
|
537
|
-
};
|
|
538
|
-
LoginCE.defaultProps = {
|
|
539
|
-
onSubmit: (e) => e.preventDefault()
|
|
540
|
-
};
|
|
541
|
-
LoginCE.propTypes = {
|
|
542
|
-
onSubmit: PropTypes.func
|
|
543
|
-
};
|
|
544
|
-
const ForgotPassword$1 = ({ onSubmit, schema }) => {
|
|
600
|
+
`;
|
|
601
|
+
const ForgotPassword = () => {
|
|
602
|
+
const { push } = useHistory();
|
|
603
|
+
const { post } = useFetchClient();
|
|
545
604
|
const { formatMessage } = useIntl();
|
|
605
|
+
const { mutate, isError } = useMutation(
|
|
606
|
+
async (body) => {
|
|
607
|
+
await post("/admin/forgot-password", body);
|
|
608
|
+
},
|
|
609
|
+
{
|
|
610
|
+
onSuccess() {
|
|
611
|
+
push("/auth/forgot-password-success");
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
);
|
|
546
615
|
return /* @__PURE__ */ jsx(UnauthenticatedLayout, { children: /* @__PURE__ */ jsxs(Main, { children: [
|
|
547
|
-
/* @__PURE__ */
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
},
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
})
|
|
575
|
-
}
|
|
576
|
-
)
|
|
577
|
-
] }),
|
|
578
|
-
/* @__PURE__ */ jsxs(Flex, { direction: "column", alignItems: "stretch", gap: 6, children: [
|
|
616
|
+
/* @__PURE__ */ jsxs(LayoutContent, { children: [
|
|
617
|
+
/* @__PURE__ */ jsxs(Column, { children: [
|
|
618
|
+
/* @__PURE__ */ jsx(Logo, {}),
|
|
619
|
+
/* @__PURE__ */ jsx(Box, { paddingTop: 6, paddingBottom: 7, children: /* @__PURE__ */ jsx(Typography, { as: "h1", variant: "alpha", children: formatMessage({
|
|
620
|
+
id: "Auth.form.button.password-recovery",
|
|
621
|
+
defaultMessage: "Password Recovery"
|
|
622
|
+
}) }) }),
|
|
623
|
+
isError ? /* @__PURE__ */ jsx(Typography, { id: "global-form-error", role: "alert", tabIndex: -1, textColor: "danger600", children: formatMessage({
|
|
624
|
+
id: "notification.error",
|
|
625
|
+
defaultMessage: "An error occurred"
|
|
626
|
+
}) }) : null
|
|
627
|
+
] }),
|
|
628
|
+
/* @__PURE__ */ jsx(
|
|
629
|
+
Formik,
|
|
630
|
+
{
|
|
631
|
+
enableReinitialize: true,
|
|
632
|
+
initialValues: {
|
|
633
|
+
email: ""
|
|
634
|
+
},
|
|
635
|
+
onSubmit: (values) => {
|
|
636
|
+
mutate(values);
|
|
637
|
+
},
|
|
638
|
+
validationSchema: yup.object().shape({
|
|
639
|
+
email: yup.string().email(translatedErrors.email).required(translatedErrors.required)
|
|
640
|
+
}),
|
|
641
|
+
validateOnChange: false,
|
|
642
|
+
children: ({ values, errors, handleChange }) => /* @__PURE__ */ jsx(Form, { children: /* @__PURE__ */ jsxs(Flex, { direction: "column", alignItems: "stretch", gap: 6, children: [
|
|
579
643
|
/* @__PURE__ */ jsx(
|
|
580
644
|
TextInput,
|
|
581
645
|
{
|
|
@@ -598,22 +662,13 @@ const ForgotPassword$1 = ({ onSubmit, schema }) => {
|
|
|
598
662
|
id: "Auth.form.button.forgot-password",
|
|
599
663
|
defaultMessage: "Send Email"
|
|
600
664
|
}) })
|
|
601
|
-
] })
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
/* @__PURE__ */ jsx(Flex, { justifyContent: "center", children: /* @__PURE__ */ jsx(Box, { paddingTop: 4, children: /* @__PURE__ */ jsx(Link, { to: "/auth/login", children: formatMessage({ id: "Auth.link.ready", defaultMessage: "Ready to sign in?" }) }) }) })
|
|
665
|
+
] }) })
|
|
666
|
+
}
|
|
667
|
+
)
|
|
668
|
+
] }),
|
|
669
|
+
/* @__PURE__ */ jsx(Flex, { justifyContent: "center", children: /* @__PURE__ */ jsx(Box, { paddingTop: 4, children: /* @__PURE__ */ jsx(Link, { as: NavLink, to: "/auth/login", children: formatMessage({ id: "Auth.link.ready", defaultMessage: "Ready to sign in?" }) }) }) })
|
|
606
670
|
] }) });
|
|
607
671
|
};
|
|
608
|
-
ForgotPassword$1.defaultProps = {
|
|
609
|
-
onSubmit: (e) => e.preventDefault()
|
|
610
|
-
};
|
|
611
|
-
ForgotPassword$1.propTypes = {
|
|
612
|
-
onSubmit: PropTypes.func,
|
|
613
|
-
schema: PropTypes.shape({
|
|
614
|
-
type: PropTypes.string.isRequired
|
|
615
|
-
}).isRequired
|
|
616
|
-
};
|
|
617
672
|
const ForgotPasswordSuccess = () => {
|
|
618
673
|
const { formatMessage } = useIntl();
|
|
619
674
|
return /* @__PURE__ */ jsx(UnauthenticatedLayout, { children: /* @__PURE__ */ jsxs(Main, { children: [
|
|
@@ -632,7 +687,7 @@ const ForgotPasswordSuccess = () => {
|
|
|
632
687
|
defaultMessage: "If you do not receive this link, please contact your administrator."
|
|
633
688
|
}) }) })
|
|
634
689
|
] }) }),
|
|
635
|
-
/* @__PURE__ */ jsx(Flex, { justifyContent: "center", children: /* @__PURE__ */ jsx(Box, { paddingTop: 4, children: /* @__PURE__ */ jsx(Link, { to: "/auth/login", children: formatMessage({ id: "Auth.link.signin", defaultMessage: "Sign in" }) }) }) })
|
|
690
|
+
/* @__PURE__ */ jsx(Flex, { justifyContent: "center", children: /* @__PURE__ */ jsx(Box, { paddingTop: 4, children: /* @__PURE__ */ jsx(Link, { as: NavLink, to: "/auth/login", children: formatMessage({ id: "Auth.link.signin", defaultMessage: "Sign in" }) }) }) })
|
|
636
691
|
] }) });
|
|
637
692
|
};
|
|
638
693
|
const Oops = () => {
|
|
@@ -652,7 +707,7 @@ const Oops = () => {
|
|
|
652
707
|
defaultMessage: "If this is a mistake, please contact your administrator."
|
|
653
708
|
}) }) })
|
|
654
709
|
] }) }),
|
|
655
|
-
/* @__PURE__ */ jsx(Flex, { justifyContent: "center", children: /* @__PURE__ */ jsx(Box, { paddingTop: 4, children: /* @__PURE__ */ jsx(Link, { to: "/auth/login", children: formatMessage({ id: "Auth.link.signin", defaultMessage: "Sign in" }) }) }) })
|
|
710
|
+
/* @__PURE__ */ jsx(Flex, { justifyContent: "center", children: /* @__PURE__ */ jsx(Box, { paddingTop: 4, children: /* @__PURE__ */ jsx(Link, { as: NavLink, to: "/auth/login", children: formatMessage({ id: "Auth.link.signin", defaultMessage: "Sign in" }) }) }) })
|
|
656
711
|
] }) });
|
|
657
712
|
};
|
|
658
713
|
const FieldWrapper = styled(Field)`
|
|
@@ -941,25 +996,36 @@ function useNpsSurveySettings() {
|
|
|
941
996
|
);
|
|
942
997
|
return { npsSurveySettings, setNpsSurveySettings };
|
|
943
998
|
}
|
|
944
|
-
const
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
999
|
+
const REGISTER_USER_SCHEMA = yup.object().shape({
|
|
1000
|
+
firstname: yup.string().trim().required(translatedErrors.required),
|
|
1001
|
+
lastname: yup.string().nullable(),
|
|
1002
|
+
password: yup.string().min(8, translatedErrors.minLength).matches(/[a-z]/, "components.Input.error.contain.lowercase").matches(/[A-Z]/, "components.Input.error.contain.uppercase").matches(/\d/, "components.Input.error.contain.number").required(translatedErrors.required),
|
|
1003
|
+
confirmPassword: yup.string().oneOf([yup.ref("password"), null], "components.Input.error.password.noMatch").required(translatedErrors.required),
|
|
1004
|
+
registrationToken: yup.string().required(translatedErrors.required)
|
|
1005
|
+
});
|
|
1006
|
+
const REGISTER_ADMIN_SCHEMA = yup.object().shape({
|
|
1007
|
+
firstname: yup.string().trim().required(translatedErrors.required),
|
|
1008
|
+
lastname: yup.string().nullable(),
|
|
1009
|
+
password: yup.string().min(8, translatedErrors.minLength).matches(/[a-z]/, "components.Input.error.contain.lowercase").matches(/[A-Z]/, "components.Input.error.contain.uppercase").matches(/\d/, "components.Input.error.contain.number").required(translatedErrors.required),
|
|
1010
|
+
email: yup.string().email(translatedErrors.email).strict().lowercase(translatedErrors.lowercase).required(translatedErrors.required),
|
|
1011
|
+
confirmPassword: yup.string().oneOf([yup.ref("password"), null], "components.Input.error.password.noMatch").required(translatedErrors.required)
|
|
1012
|
+
});
|
|
1013
|
+
const Register = ({ hasAdmin }) => {
|
|
953
1014
|
const toggleNotification = useNotification();
|
|
954
1015
|
const { push } = useHistory();
|
|
955
|
-
const [passwordShown, setPasswordShown] = useState(false);
|
|
956
|
-
const [confirmPasswordShown, setConfirmPasswordShown] = useState(false);
|
|
957
|
-
const [submitCount, setSubmitCount] = useState(0);
|
|
1016
|
+
const [passwordShown, setPasswordShown] = React.useState(false);
|
|
1017
|
+
const [confirmPasswordShown, setConfirmPasswordShown] = React.useState(false);
|
|
1018
|
+
const [submitCount, setSubmitCount] = React.useState(0);
|
|
1019
|
+
const [apiError, setApiError] = React.useState();
|
|
958
1020
|
const { trackUsage } = useTracking();
|
|
959
1021
|
const { formatMessage } = useIntl();
|
|
1022
|
+
const { setSkipped } = useGuidedTour();
|
|
960
1023
|
const query = useQuery();
|
|
1024
|
+
const match = useRouteMatch(
|
|
1025
|
+
"/auth/:authType"
|
|
1026
|
+
);
|
|
961
1027
|
const { formatAPIError } = useAPIErrorHandler();
|
|
962
|
-
const { get: get2 } = useFetchClient();
|
|
1028
|
+
const { get: get2, post } = useFetchClient();
|
|
963
1029
|
const { setNpsSurveySettings } = useNpsSurveySettings();
|
|
964
1030
|
const registrationToken = query.get("registrationToken");
|
|
965
1031
|
const { data: userInfo } = useQuery$1({
|
|
@@ -985,28 +1051,97 @@ const Register = ({ authType, fieldsToDisable, noSignin, onSubmit, schema }) =>
|
|
|
985
1051
|
push(`/auth/oops?info=${encodeURIComponent(message)}`);
|
|
986
1052
|
}
|
|
987
1053
|
});
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
1054
|
+
const registerAdminMutation = useMutation(
|
|
1055
|
+
async (body) => {
|
|
1056
|
+
const { news, ...restBody } = body;
|
|
1057
|
+
const { data } = await post("/admin/register-admin", restBody);
|
|
1058
|
+
return { ...data.data, news };
|
|
1059
|
+
},
|
|
1060
|
+
{
|
|
1061
|
+
onSuccess(data) {
|
|
1062
|
+
const { token, user, news } = data;
|
|
1063
|
+
auth.setToken(token, false);
|
|
1064
|
+
auth.setUserInfo(user, false);
|
|
1065
|
+
const { roles } = user;
|
|
1066
|
+
if (roles) {
|
|
1067
|
+
const isUserSuperAdmin = roles.find(({ code }) => code === "strapi-super-admin");
|
|
1068
|
+
if (isUserSuperAdmin) {
|
|
1069
|
+
auth.set(false, "GUIDED_TOUR_SKIPPED", true);
|
|
1070
|
+
setSkipped(false);
|
|
1071
|
+
trackUsage("didLaunchGuidedtour");
|
|
1072
|
+
}
|
|
1073
|
+
}
|
|
1074
|
+
if (news) {
|
|
1075
|
+
setNpsSurveySettings((s) => ({ ...s, enabled: true }));
|
|
1076
|
+
push({
|
|
1077
|
+
pathname: "/usecase",
|
|
1078
|
+
search: `?hasAdmin=${true}`
|
|
1079
|
+
});
|
|
1080
|
+
} else {
|
|
1081
|
+
push("/");
|
|
995
1082
|
}
|
|
1083
|
+
},
|
|
1084
|
+
onError(err) {
|
|
1085
|
+
trackUsage("didNotCreateFirstAdmin");
|
|
1086
|
+
const error = formatAPIError(err);
|
|
1087
|
+
setApiError(error);
|
|
996
1088
|
}
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1089
|
+
}
|
|
1090
|
+
);
|
|
1091
|
+
const registerUserMutation = useMutation(
|
|
1092
|
+
async (body) => {
|
|
1093
|
+
const { news, ...restBody } = body;
|
|
1094
|
+
const { data } = await post("/admin/register", restBody);
|
|
1095
|
+
return { ...data.data, news };
|
|
1096
|
+
},
|
|
1097
|
+
{
|
|
1098
|
+
onSuccess(data) {
|
|
1099
|
+
const { token, user, news } = data;
|
|
1100
|
+
auth.setToken(token, false);
|
|
1101
|
+
auth.setUserInfo(user, false);
|
|
1102
|
+
if (news) {
|
|
1103
|
+
setNpsSurveySettings((s) => ({ ...s, enabled: true }));
|
|
1104
|
+
push({
|
|
1105
|
+
pathname: "/usecase",
|
|
1106
|
+
search: `?hasAdmin=${hasAdmin}`
|
|
1107
|
+
});
|
|
1108
|
+
} else {
|
|
1109
|
+
push("/");
|
|
1110
|
+
}
|
|
1111
|
+
},
|
|
1112
|
+
onError(err) {
|
|
1113
|
+
trackUsage("didNotCreateFirstAdmin");
|
|
1114
|
+
const error = formatAPIError(err);
|
|
1115
|
+
setApiError(error);
|
|
1116
|
+
}
|
|
1117
|
+
}
|
|
1118
|
+
);
|
|
1119
|
+
if (!match || match.params.authType !== "register" && match.params.authType !== "register-admin") {
|
|
1120
|
+
return /* @__PURE__ */ jsx(Redirect, { to: "/" });
|
|
1121
|
+
}
|
|
1122
|
+
const isAdminRegistration = match.params.authType === "register-admin";
|
|
1123
|
+
const schema = isAdminRegistration ? REGISTER_ADMIN_SCHEMA : REGISTER_USER_SCHEMA;
|
|
1124
|
+
return /* @__PURE__ */ jsx(UnauthenticatedLayout, { children: /* @__PURE__ */ jsxs(LayoutContent, { children: [
|
|
1125
|
+
/* @__PURE__ */ jsxs(Flex, { direction: "column", alignItems: "center", gap: 3, children: [
|
|
1126
|
+
/* @__PURE__ */ jsx(Logo, {}),
|
|
1127
|
+
/* @__PURE__ */ jsx(Typography, { as: "h1", variant: "alpha", textAlign: "center", children: formatMessage({
|
|
1128
|
+
id: "Auth.form.welcome.title",
|
|
1129
|
+
defaultMessage: "Welcome to Strapi!"
|
|
1130
|
+
}) }),
|
|
1131
|
+
/* @__PURE__ */ jsx(Typography, { variant: "epsilon", textColor: "neutral600", textAlign: "center", children: formatMessage({
|
|
1132
|
+
id: "Auth.form.register.subtitle",
|
|
1133
|
+
defaultMessage: "Credentials are only used to authenticate in Strapi. All saved data will be stored in your database."
|
|
1134
|
+
}) }),
|
|
1135
|
+
apiError ? /* @__PURE__ */ jsx(Typography, { id: "global-form-error", role: "alert", tabIndex: -1, textColor: "danger600", children: apiError }) : null
|
|
1136
|
+
] }),
|
|
1137
|
+
/* @__PURE__ */ jsx(
|
|
1138
|
+
Formik,
|
|
1139
|
+
{
|
|
1140
|
+
enableReinitialize: true,
|
|
1141
|
+
initialValues: {
|
|
1142
|
+
firstname: userInfo?.firstname || "",
|
|
1143
|
+
lastname: userInfo?.lastname || "",
|
|
1144
|
+
email: userInfo?.email || "",
|
|
1010
1145
|
password: "",
|
|
1011
1146
|
confirmPassword: "",
|
|
1012
1147
|
registrationToken: registrationToken || void 0,
|
|
@@ -1016,265 +1151,291 @@ const Register = ({ authType, fieldsToDisable, noSignin, onSubmit, schema }) =>
|
|
|
1016
1151
|
const normalizedData = normalizeData(data);
|
|
1017
1152
|
try {
|
|
1018
1153
|
await schema.validate(normalizedData, { abortEarly: false });
|
|
1019
|
-
if (submitCount > 0 &&
|
|
1154
|
+
if (submitCount > 0 && isAdminRegistration) {
|
|
1020
1155
|
trackUsage("didSubmitWithErrorsFirstAdmin", { count: submitCount.toString() });
|
|
1021
1156
|
}
|
|
1022
|
-
if (registrationToken) {
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1157
|
+
if (normalizedData.registrationToken) {
|
|
1158
|
+
registerUserMutation.mutate({
|
|
1159
|
+
userInfo: omit(normalizedData, [
|
|
1160
|
+
"registrationToken",
|
|
1161
|
+
"confirmPassword",
|
|
1162
|
+
"email",
|
|
1163
|
+
"news"
|
|
1164
|
+
]),
|
|
1165
|
+
registrationToken: normalizedData.registrationToken,
|
|
1166
|
+
news: normalizedData.news
|
|
1167
|
+
});
|
|
1027
1168
|
} else {
|
|
1028
|
-
|
|
1169
|
+
registerAdminMutation.mutate(
|
|
1170
|
+
omit(normalizedData, ["registrationToken", "confirmPassword"])
|
|
1171
|
+
);
|
|
1029
1172
|
}
|
|
1030
|
-
setNpsSurveySettings({ enabled: data.news });
|
|
1031
1173
|
} catch (err) {
|
|
1032
|
-
|
|
1174
|
+
if (err instanceof ValidationError) {
|
|
1175
|
+
const errors = getYupInnerErrors(err);
|
|
1176
|
+
formik.setErrors(errors);
|
|
1177
|
+
}
|
|
1033
1178
|
setSubmitCount(submitCount + 1);
|
|
1034
|
-
formik.setErrors(errors);
|
|
1035
1179
|
}
|
|
1036
1180
|
},
|
|
1037
1181
|
validateOnChange: false,
|
|
1038
1182
|
children: ({ values, errors, handleChange }) => {
|
|
1039
|
-
return /* @__PURE__ */ jsx(Form, {
|
|
1040
|
-
/* @__PURE__ */ jsxs(
|
|
1041
|
-
/* @__PURE__ */ jsx(
|
|
1042
|
-
/* @__PURE__ */ jsx(Typography, { as: "h1", variant: "alpha", textAlign: "center", children: formatMessage({
|
|
1043
|
-
id: "Auth.form.welcome.title",
|
|
1044
|
-
defaultMessage: "Welcome to Strapi!"
|
|
1045
|
-
}) }),
|
|
1046
|
-
/* @__PURE__ */ jsx(Typography, { variant: "epsilon", textColor: "neutral600", textAlign: "center", children: formatMessage({
|
|
1047
|
-
id: "Auth.form.register.subtitle",
|
|
1048
|
-
defaultMessage: "Credentials are only used to authenticate in Strapi. All saved data will be stored in your database."
|
|
1049
|
-
}) })
|
|
1050
|
-
] }),
|
|
1051
|
-
/* @__PURE__ */ jsxs(Flex, { direction: "column", alignItems: "stretch", gap: 6, marginTop: 7, children: [
|
|
1052
|
-
/* @__PURE__ */ jsxs(Grid, { gap: 4, children: [
|
|
1053
|
-
/* @__PURE__ */ jsx(GridItem, { col: 6, children: /* @__PURE__ */ jsx(
|
|
1054
|
-
TextInput,
|
|
1055
|
-
{
|
|
1056
|
-
name: "firstname",
|
|
1057
|
-
required: true,
|
|
1058
|
-
value: values.firstname,
|
|
1059
|
-
error: errors.firstname ? formatMessage(errors.firstname) : void 0,
|
|
1060
|
-
onChange: handleChange,
|
|
1061
|
-
label: formatMessage({
|
|
1062
|
-
id: "Auth.form.firstname.label",
|
|
1063
|
-
defaultMessage: "Firstname"
|
|
1064
|
-
})
|
|
1065
|
-
}
|
|
1066
|
-
) }),
|
|
1067
|
-
/* @__PURE__ */ jsx(GridItem, { col: 6, children: /* @__PURE__ */ jsx(
|
|
1068
|
-
TextInput,
|
|
1069
|
-
{
|
|
1070
|
-
name: "lastname",
|
|
1071
|
-
value: values.lastname,
|
|
1072
|
-
onChange: handleChange,
|
|
1073
|
-
label: formatMessage({
|
|
1074
|
-
id: "Auth.form.lastname.label",
|
|
1075
|
-
defaultMessage: "Lastname"
|
|
1076
|
-
})
|
|
1077
|
-
}
|
|
1078
|
-
) })
|
|
1079
|
-
] }),
|
|
1080
|
-
/* @__PURE__ */ jsx(
|
|
1183
|
+
return /* @__PURE__ */ jsx(Form, { children: /* @__PURE__ */ jsx(Main, { children: /* @__PURE__ */ jsxs(Flex, { direction: "column", alignItems: "stretch", gap: 6, marginTop: 7, children: [
|
|
1184
|
+
/* @__PURE__ */ jsxs(Grid, { gap: 4, children: [
|
|
1185
|
+
/* @__PURE__ */ jsx(GridItem, { col: 6, children: /* @__PURE__ */ jsx(
|
|
1081
1186
|
TextInput,
|
|
1082
1187
|
{
|
|
1083
|
-
name: "
|
|
1084
|
-
disabled: fieldsToDisable.includes("email"),
|
|
1085
|
-
value: values.email,
|
|
1086
|
-
onChange: handleChange,
|
|
1087
|
-
error: errors.email ? formatMessage(errors.email) : void 0,
|
|
1188
|
+
name: "firstname",
|
|
1088
1189
|
required: true,
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
defaultMessage: "Email"
|
|
1092
|
-
}),
|
|
1093
|
-
type: "email"
|
|
1094
|
-
}
|
|
1095
|
-
),
|
|
1096
|
-
/* @__PURE__ */ jsx(
|
|
1097
|
-
PasswordInput$1,
|
|
1098
|
-
{
|
|
1099
|
-
name: "password",
|
|
1190
|
+
value: values.firstname,
|
|
1191
|
+
error: errors.firstname ? formatMessage(errors.firstname) : void 0,
|
|
1100
1192
|
onChange: handleChange,
|
|
1101
|
-
value: values.password,
|
|
1102
|
-
error: errors.password ? formatMessage(errors.password) : void 0,
|
|
1103
|
-
endAction: /* @__PURE__ */ jsx(
|
|
1104
|
-
FieldActionWrapper,
|
|
1105
|
-
{
|
|
1106
|
-
onClick: (e) => {
|
|
1107
|
-
e.preventDefault();
|
|
1108
|
-
setPasswordShown((prev) => !prev);
|
|
1109
|
-
},
|
|
1110
|
-
label: formatMessage(
|
|
1111
|
-
passwordShown ? {
|
|
1112
|
-
id: "Auth.form.password.show-password",
|
|
1113
|
-
defaultMessage: "Show password"
|
|
1114
|
-
} : {
|
|
1115
|
-
id: "Auth.form.password.hide-password",
|
|
1116
|
-
defaultMessage: "Hide password"
|
|
1117
|
-
}
|
|
1118
|
-
),
|
|
1119
|
-
children: passwordShown ? /* @__PURE__ */ jsx(Eye, {}) : /* @__PURE__ */ jsx(EyeStriked, {})
|
|
1120
|
-
}
|
|
1121
|
-
),
|
|
1122
|
-
hint: formatMessage({
|
|
1123
|
-
id: "Auth.form.password.hint",
|
|
1124
|
-
defaultMessage: "Must be at least 8 characters, 1 uppercase, 1 lowercase & 1 number"
|
|
1125
|
-
}),
|
|
1126
|
-
required: true,
|
|
1127
1193
|
label: formatMessage({
|
|
1128
|
-
id: "
|
|
1129
|
-
defaultMessage: "
|
|
1130
|
-
})
|
|
1131
|
-
type: passwordShown ? "text" : "password"
|
|
1194
|
+
id: "Auth.form.firstname.label",
|
|
1195
|
+
defaultMessage: "Firstname"
|
|
1196
|
+
})
|
|
1132
1197
|
}
|
|
1133
|
-
),
|
|
1134
|
-
/* @__PURE__ */ jsx(
|
|
1135
|
-
|
|
1198
|
+
) }),
|
|
1199
|
+
/* @__PURE__ */ jsx(GridItem, { col: 6, children: /* @__PURE__ */ jsx(
|
|
1200
|
+
TextInput,
|
|
1136
1201
|
{
|
|
1137
|
-
name: "
|
|
1202
|
+
name: "lastname",
|
|
1203
|
+
value: values.lastname,
|
|
1138
1204
|
onChange: handleChange,
|
|
1139
|
-
value: values.confirmPassword,
|
|
1140
|
-
error: errors.confirmPassword ? formatMessage(errors.confirmPassword) : void 0,
|
|
1141
|
-
endAction: /* @__PURE__ */ jsx(
|
|
1142
|
-
FieldActionWrapper,
|
|
1143
|
-
{
|
|
1144
|
-
onClick: (e) => {
|
|
1145
|
-
e.preventDefault();
|
|
1146
|
-
setConfirmPasswordShown((prev) => !prev);
|
|
1147
|
-
},
|
|
1148
|
-
label: formatMessage(
|
|
1149
|
-
confirmPasswordShown ? {
|
|
1150
|
-
id: "Auth.form.password.show-password",
|
|
1151
|
-
defaultMessage: "Show password"
|
|
1152
|
-
} : {
|
|
1153
|
-
id: "Auth.form.password.hide-password",
|
|
1154
|
-
defaultMessage: "Hide password"
|
|
1155
|
-
}
|
|
1156
|
-
),
|
|
1157
|
-
children: confirmPasswordShown ? /* @__PURE__ */ jsx(Eye, {}) : /* @__PURE__ */ jsx(EyeStriked, {})
|
|
1158
|
-
}
|
|
1159
|
-
),
|
|
1160
|
-
required: true,
|
|
1161
1205
|
label: formatMessage({
|
|
1162
|
-
id: "Auth.form.
|
|
1163
|
-
defaultMessage: "
|
|
1164
|
-
})
|
|
1165
|
-
type: confirmPasswordShown ? "text" : "password"
|
|
1206
|
+
id: "Auth.form.lastname.label",
|
|
1207
|
+
defaultMessage: "Lastname"
|
|
1208
|
+
})
|
|
1166
1209
|
}
|
|
1167
|
-
)
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1210
|
+
) })
|
|
1211
|
+
] }),
|
|
1212
|
+
/* @__PURE__ */ jsx(
|
|
1213
|
+
TextInput,
|
|
1214
|
+
{
|
|
1215
|
+
name: "email",
|
|
1216
|
+
disabled: !isAdminRegistration,
|
|
1217
|
+
value: values.email,
|
|
1218
|
+
onChange: handleChange,
|
|
1219
|
+
error: errors.email ? formatMessage(errors.email) : void 0,
|
|
1220
|
+
required: true,
|
|
1221
|
+
label: formatMessage({
|
|
1222
|
+
id: "Auth.form.email.label",
|
|
1223
|
+
defaultMessage: "Email"
|
|
1224
|
+
}),
|
|
1225
|
+
type: "email"
|
|
1226
|
+
}
|
|
1227
|
+
),
|
|
1228
|
+
/* @__PURE__ */ jsx(
|
|
1229
|
+
PasswordInput$1,
|
|
1230
|
+
{
|
|
1231
|
+
name: "password",
|
|
1232
|
+
onChange: handleChange,
|
|
1233
|
+
value: values.password,
|
|
1234
|
+
error: errors.password ? formatMessage(errors.password) : void 0,
|
|
1235
|
+
endAction: /* @__PURE__ */ jsx(
|
|
1236
|
+
FieldActionWrapper,
|
|
1237
|
+
{
|
|
1238
|
+
onClick: (e) => {
|
|
1239
|
+
e.preventDefault();
|
|
1240
|
+
setPasswordShown((prev) => !prev);
|
|
1181
1241
|
},
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
id: "Auth.
|
|
1185
|
-
defaultMessage: "
|
|
1186
|
-
}
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
}
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1242
|
+
label: formatMessage(
|
|
1243
|
+
passwordShown ? {
|
|
1244
|
+
id: "Auth.form.password.show-password",
|
|
1245
|
+
defaultMessage: "Show password"
|
|
1246
|
+
} : {
|
|
1247
|
+
id: "Auth.form.password.hide-password",
|
|
1248
|
+
defaultMessage: "Hide password"
|
|
1249
|
+
}
|
|
1250
|
+
),
|
|
1251
|
+
children: passwordShown ? /* @__PURE__ */ jsx(Eye, {}) : /* @__PURE__ */ jsx(EyeStriked, {})
|
|
1252
|
+
}
|
|
1253
|
+
),
|
|
1254
|
+
hint: formatMessage({
|
|
1255
|
+
id: "Auth.form.password.hint",
|
|
1256
|
+
defaultMessage: "Must be at least 8 characters, 1 uppercase, 1 lowercase & 1 number"
|
|
1257
|
+
}),
|
|
1258
|
+
required: true,
|
|
1259
|
+
label: formatMessage({
|
|
1260
|
+
id: "global.password",
|
|
1261
|
+
defaultMessage: "Password"
|
|
1262
|
+
}),
|
|
1263
|
+
type: passwordShown ? "text" : "password"
|
|
1264
|
+
}
|
|
1265
|
+
),
|
|
1266
|
+
/* @__PURE__ */ jsx(
|
|
1267
|
+
PasswordInput$1,
|
|
1268
|
+
{
|
|
1269
|
+
name: "confirmPassword",
|
|
1270
|
+
onChange: handleChange,
|
|
1271
|
+
value: values.confirmPassword,
|
|
1272
|
+
error: errors.confirmPassword ? formatMessage(errors.confirmPassword) : void 0,
|
|
1273
|
+
endAction: /* @__PURE__ */ jsx(
|
|
1274
|
+
FieldActionWrapper,
|
|
1275
|
+
{
|
|
1276
|
+
onClick: (e) => {
|
|
1277
|
+
e.preventDefault();
|
|
1278
|
+
setConfirmPasswordShown((prev) => !prev);
|
|
1279
|
+
},
|
|
1280
|
+
label: formatMessage(
|
|
1281
|
+
confirmPasswordShown ? {
|
|
1282
|
+
id: "Auth.form.password.show-password",
|
|
1283
|
+
defaultMessage: "Show password"
|
|
1284
|
+
} : {
|
|
1285
|
+
id: "Auth.form.password.hide-password",
|
|
1286
|
+
defaultMessage: "Hide password"
|
|
1287
|
+
}
|
|
1288
|
+
),
|
|
1289
|
+
children: confirmPasswordShown ? /* @__PURE__ */ jsx(Eye, {}) : /* @__PURE__ */ jsx(EyeStriked, {})
|
|
1290
|
+
}
|
|
1291
|
+
),
|
|
1292
|
+
required: true,
|
|
1293
|
+
label: formatMessage({
|
|
1294
|
+
id: "Auth.form.confirmPassword.label",
|
|
1295
|
+
defaultMessage: "Confirm Password"
|
|
1296
|
+
}),
|
|
1297
|
+
type: confirmPasswordShown ? "text" : "password"
|
|
1298
|
+
}
|
|
1299
|
+
),
|
|
1300
|
+
/* @__PURE__ */ jsx(
|
|
1301
|
+
Checkbox,
|
|
1302
|
+
{
|
|
1303
|
+
onValueChange: (checked) => {
|
|
1304
|
+
handleChange({ target: { value: checked, name: "news" } });
|
|
1305
|
+
},
|
|
1306
|
+
value: values.news,
|
|
1307
|
+
name: "news",
|
|
1308
|
+
"aria-label": "news",
|
|
1309
|
+
children: formatMessage(
|
|
1310
|
+
{
|
|
1311
|
+
id: "Auth.form.register.news.label",
|
|
1312
|
+
defaultMessage: "Keep me updated about new features & upcoming improvements (by doing this you accept the {terms} and the {policy})."
|
|
1313
|
+
},
|
|
1314
|
+
{
|
|
1315
|
+
terms: /* @__PURE__ */ jsx(A, { target: "_blank", href: "https://strapi.io/terms", rel: "noreferrer", children: formatMessage({
|
|
1316
|
+
id: "Auth.privacy-policy-agreement.terms",
|
|
1317
|
+
defaultMessage: "terms"
|
|
1318
|
+
}) }),
|
|
1319
|
+
policy: /* @__PURE__ */ jsx(A, { target: "_blank", href: "https://strapi.io/privacy", rel: "noreferrer", children: formatMessage({
|
|
1320
|
+
id: "Auth.privacy-policy-agreement.policy",
|
|
1321
|
+
defaultMessage: "policy"
|
|
1322
|
+
}) })
|
|
1323
|
+
}
|
|
1324
|
+
)
|
|
1325
|
+
}
|
|
1326
|
+
),
|
|
1327
|
+
/* @__PURE__ */ jsx(Button, { fullWidth: true, size: "L", type: "submit", children: formatMessage({
|
|
1328
|
+
id: "Auth.form.button.register",
|
|
1329
|
+
defaultMessage: "Let's start"
|
|
1330
|
+
}) })
|
|
1331
|
+
] }) }) });
|
|
1201
1332
|
}
|
|
1202
1333
|
}
|
|
1203
1334
|
),
|
|
1204
|
-
|
|
1335
|
+
match?.params.authType === "register" && /* @__PURE__ */ jsx(Box, { paddingTop: 4, children: /* @__PURE__ */ jsx(Flex, { justifyContent: "center", children: /* @__PURE__ */ jsx(Link, { as: NavLink, to: "/auth/login", children: formatMessage({
|
|
1205
1336
|
id: "Auth.link.signin.account",
|
|
1206
1337
|
defaultMessage: "Already have an account?"
|
|
1207
1338
|
}) }) }) })
|
|
1208
1339
|
] }) });
|
|
1209
1340
|
};
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1341
|
+
function normalizeData(data) {
|
|
1342
|
+
return Object.entries(data).reduce(
|
|
1343
|
+
(acc, [key, value]) => {
|
|
1344
|
+
if (!["password", "confirmPassword"].includes(key) && typeof value === "string") {
|
|
1345
|
+
acc[key] = value.trim();
|
|
1346
|
+
if (key === "lastname") {
|
|
1347
|
+
acc[key] = value || void 0;
|
|
1348
|
+
}
|
|
1349
|
+
} else {
|
|
1350
|
+
acc[key] = value;
|
|
1351
|
+
}
|
|
1352
|
+
return acc;
|
|
1353
|
+
},
|
|
1354
|
+
{}
|
|
1355
|
+
);
|
|
1356
|
+
}
|
|
1357
|
+
const A = styled.a`
|
|
1358
|
+
color: ${({ theme }) => theme.colors.primary600};
|
|
1359
|
+
`;
|
|
1360
|
+
const PasswordInput$1 = styled(TextInput)`
|
|
1226
1361
|
::-ms-reveal {
|
|
1227
1362
|
display: none;
|
|
1228
1363
|
}
|
|
1229
1364
|
`;
|
|
1230
|
-
const
|
|
1231
|
-
|
|
1232
|
-
|
|
1365
|
+
const RESET_PASSWORD_SCHEMA = yup.object().shape({
|
|
1366
|
+
password: yup.string().min(8, translatedErrors.minLength).matches(/[a-z]/, "components.Input.error.contain.lowercase").matches(/[A-Z]/, "components.Input.error.contain.uppercase").matches(/\d/, "components.Input.error.contain.number").required(translatedErrors.required),
|
|
1367
|
+
confirmPassword: yup.string().oneOf([yup.ref("password"), null], "components.Input.error.password.noMatch").required(translatedErrors.required)
|
|
1368
|
+
});
|
|
1369
|
+
const ResetPassword = () => {
|
|
1370
|
+
const [passwordShown, setPasswordShown] = React.useState(false);
|
|
1371
|
+
const [confirmPasswordShown, setConfirmPasswordShown] = React.useState(false);
|
|
1233
1372
|
const { formatMessage } = useIntl();
|
|
1373
|
+
const { post } = useFetchClient();
|
|
1374
|
+
const { push } = useHistory();
|
|
1375
|
+
const query = useQuery();
|
|
1376
|
+
const { mutate, isError } = useMutation(
|
|
1377
|
+
async (body) => {
|
|
1378
|
+
const {
|
|
1379
|
+
data: { data }
|
|
1380
|
+
} = await post("/admin/reset-password", {
|
|
1381
|
+
...body,
|
|
1382
|
+
resetPasswordToken: query.get("code")
|
|
1383
|
+
});
|
|
1384
|
+
return data;
|
|
1385
|
+
},
|
|
1386
|
+
{
|
|
1387
|
+
onSuccess(data) {
|
|
1388
|
+
if (data) {
|
|
1389
|
+
const { token, user } = data;
|
|
1390
|
+
auth.setToken(token, false);
|
|
1391
|
+
auth.setUserInfo(user, false);
|
|
1392
|
+
push("/");
|
|
1393
|
+
}
|
|
1394
|
+
}
|
|
1395
|
+
}
|
|
1396
|
+
);
|
|
1234
1397
|
return /* @__PURE__ */ jsx(UnauthenticatedLayout, { children: /* @__PURE__ */ jsxs(Main, { children: [
|
|
1235
|
-
/* @__PURE__ */
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
id: errors.errorMessage,
|
|
1262
|
-
defaultMessage: "An error occurred"
|
|
1263
|
-
})
|
|
1264
|
-
}
|
|
1265
|
-
)
|
|
1266
|
-
] }),
|
|
1267
|
-
/* @__PURE__ */ jsxs(Flex, { direction: "column", alignItems: "stretch", gap: 6, children: [
|
|
1398
|
+
/* @__PURE__ */ jsxs(LayoutContent, { children: [
|
|
1399
|
+
/* @__PURE__ */ jsxs(Column, { children: [
|
|
1400
|
+
/* @__PURE__ */ jsx(Logo, {}),
|
|
1401
|
+
/* @__PURE__ */ jsx(Box, { paddingTop: 6, paddingBottom: 7, children: /* @__PURE__ */ jsx(Typography, { as: "h1", variant: "alpha", children: formatMessage({
|
|
1402
|
+
id: "global.reset-password",
|
|
1403
|
+
defaultMessage: "Reset password"
|
|
1404
|
+
}) }) }),
|
|
1405
|
+
isError ? /* @__PURE__ */ jsx(Typography, { id: "global-form-error", role: "alert", tabIndex: -1, textColor: "danger600", children: formatMessage({
|
|
1406
|
+
id: "notification.error",
|
|
1407
|
+
defaultMessage: "An error occurred"
|
|
1408
|
+
}) }) : null
|
|
1409
|
+
] }),
|
|
1410
|
+
/* @__PURE__ */ jsx(
|
|
1411
|
+
Formik,
|
|
1412
|
+
{
|
|
1413
|
+
enableReinitialize: true,
|
|
1414
|
+
initialValues: {
|
|
1415
|
+
password: "",
|
|
1416
|
+
confirmPassword: ""
|
|
1417
|
+
},
|
|
1418
|
+
onSubmit: (values) => {
|
|
1419
|
+
mutate({ password: values.password });
|
|
1420
|
+
},
|
|
1421
|
+
validationSchema: RESET_PASSWORD_SCHEMA,
|
|
1422
|
+
validateOnChange: false,
|
|
1423
|
+
children: ({ values, errors, handleChange }) => /* @__PURE__ */ jsx(Form, { children: /* @__PURE__ */ jsxs(Flex, { direction: "column", alignItems: "stretch", gap: 6, children: [
|
|
1268
1424
|
/* @__PURE__ */ jsx(
|
|
1269
1425
|
PasswordInput,
|
|
1270
1426
|
{
|
|
1271
1427
|
name: "password",
|
|
1272
1428
|
onChange: handleChange,
|
|
1273
1429
|
value: values.password,
|
|
1274
|
-
error: errors.password ? formatMessage(
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1430
|
+
error: errors.password ? formatMessage(
|
|
1431
|
+
{
|
|
1432
|
+
id: errors.password,
|
|
1433
|
+
defaultMessage: "This field is required."
|
|
1434
|
+
},
|
|
1435
|
+
{
|
|
1436
|
+
min: 8
|
|
1437
|
+
}
|
|
1438
|
+
) : void 0,
|
|
1278
1439
|
endAction: /* @__PURE__ */ jsx(
|
|
1279
1440
|
FieldActionWrapper,
|
|
1280
1441
|
{
|
|
@@ -1343,161 +1504,47 @@ const ForgotPassword = ({ onSubmit, schema }) => {
|
|
|
1343
1504
|
type: confirmPasswordShown ? "text" : "password"
|
|
1344
1505
|
}
|
|
1345
1506
|
),
|
|
1346
|
-
/* @__PURE__ */ jsx(Button, {
|
|
1507
|
+
/* @__PURE__ */ jsx(Button, { fullWidth: true, type: "submit", children: formatMessage({
|
|
1347
1508
|
id: "global.change-password",
|
|
1348
1509
|
defaultMessage: "Change password"
|
|
1349
1510
|
}) })
|
|
1350
|
-
] })
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
/* @__PURE__ */ jsx(Flex, { justifyContent: "center", children: /* @__PURE__ */ jsx(Box, { paddingTop: 4, children: /* @__PURE__ */ jsx(Link, { to: "/auth/login", children: formatMessage({ id: "Auth.link.ready", defaultMessage: "Ready to sign in?" }) }) }) })
|
|
1511
|
+
] }) })
|
|
1512
|
+
}
|
|
1513
|
+
)
|
|
1514
|
+
] }),
|
|
1515
|
+
/* @__PURE__ */ jsx(Flex, { justifyContent: "center", children: /* @__PURE__ */ jsx(Box, { paddingTop: 4, children: /* @__PURE__ */ jsx(Link, { as: NavLink, to: "/auth/login", children: formatMessage({ id: "Auth.link.ready", defaultMessage: "Ready to sign in?" }) }) }) })
|
|
1355
1516
|
] }) });
|
|
1356
1517
|
};
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
schema: PropTypes.shape({
|
|
1363
|
-
type: PropTypes.string.isRequired
|
|
1364
|
-
}).isRequired
|
|
1365
|
-
};
|
|
1518
|
+
const PasswordInput = styled(TextInput)`
|
|
1519
|
+
::-ms-reveal {
|
|
1520
|
+
display: none;
|
|
1521
|
+
}
|
|
1522
|
+
`;
|
|
1366
1523
|
const FORMS = {
|
|
1367
|
-
"forgot-password":
|
|
1368
|
-
|
|
1369
|
-
endPoint: "forgot-password",
|
|
1370
|
-
fieldsToDisable: [],
|
|
1371
|
-
fieldsToOmit: [],
|
|
1372
|
-
schema: yup.object().shape({
|
|
1373
|
-
email: yup.string().email(translatedErrors.email).required(translatedErrors.required)
|
|
1374
|
-
}),
|
|
1375
|
-
inputsPrefix: ""
|
|
1376
|
-
},
|
|
1377
|
-
"forgot-password-success": {
|
|
1378
|
-
Component: ForgotPasswordSuccess,
|
|
1379
|
-
endPoint: "",
|
|
1380
|
-
fieldsToDisable: [],
|
|
1381
|
-
fieldsToOmit: [],
|
|
1382
|
-
schema: null,
|
|
1383
|
-
inputsPrefix: ""
|
|
1384
|
-
},
|
|
1524
|
+
"forgot-password": ForgotPassword,
|
|
1525
|
+
"forgot-password-success": ForgotPasswordSuccess,
|
|
1385
1526
|
// the `Component` attribute is set after all forms and CE/EE components are loaded, but since we
|
|
1386
1527
|
// are here outside of a React component we can not use the hook directly
|
|
1387
|
-
login:
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
}),
|
|
1396
|
-
inputsPrefix: ""
|
|
1397
|
-
},
|
|
1398
|
-
oops: {
|
|
1399
|
-
Component: Oops,
|
|
1400
|
-
endPoint: null,
|
|
1401
|
-
fieldsToDisable: [],
|
|
1402
|
-
fieldsToOmit: [],
|
|
1403
|
-
schema: null,
|
|
1404
|
-
inputsPrefix: ""
|
|
1405
|
-
},
|
|
1406
|
-
register: {
|
|
1407
|
-
Component: Register,
|
|
1408
|
-
endPoint: "register",
|
|
1409
|
-
fieldsToDisable: ["email"],
|
|
1410
|
-
fieldsToOmit: ["userInfo.confirmPassword", "userInfo.news", "userInfo.email"],
|
|
1411
|
-
schema: yup.object().shape({
|
|
1412
|
-
firstname: yup.string().trim().required(translatedErrors.required),
|
|
1413
|
-
lastname: yup.string().nullable(),
|
|
1414
|
-
password: yup.string().min(8, translatedErrors.minLength).matches(/[a-z]/, "components.Input.error.contain.lowercase").matches(/[A-Z]/, "components.Input.error.contain.uppercase").matches(/\d/, "components.Input.error.contain.number").required(translatedErrors.required),
|
|
1415
|
-
confirmPassword: yup.string().oneOf([yup.ref("password"), null], "components.Input.error.password.noMatch").required(translatedErrors.required),
|
|
1416
|
-
registrationToken: yup.string().required(translatedErrors.required)
|
|
1417
|
-
}),
|
|
1418
|
-
inputsPrefix: "userInfo."
|
|
1419
|
-
},
|
|
1420
|
-
"register-admin": {
|
|
1421
|
-
Component: Register,
|
|
1422
|
-
endPoint: "register-admin",
|
|
1423
|
-
noSignin: true,
|
|
1424
|
-
fieldsToDisable: [],
|
|
1425
|
-
fieldsToOmit: ["confirmPassword", "news"],
|
|
1426
|
-
schema: yup.object().shape({
|
|
1427
|
-
firstname: yup.string().trim().required(translatedErrors.required),
|
|
1428
|
-
lastname: yup.string().nullable(),
|
|
1429
|
-
password: yup.string().min(8, translatedErrors.minLength).matches(/[a-z]/, "components.Input.error.contain.lowercase").matches(/[A-Z]/, "components.Input.error.contain.uppercase").matches(/\d/, "components.Input.error.contain.number").required(translatedErrors.required),
|
|
1430
|
-
email: yup.string().email(translatedErrors.email).strict().lowercase(translatedErrors.lowercase).required(translatedErrors.required),
|
|
1431
|
-
confirmPassword: yup.string().oneOf([yup.ref("password"), null], "components.Input.error.password.noMatch").required(translatedErrors.required)
|
|
1432
|
-
}),
|
|
1433
|
-
inputsPrefix: ""
|
|
1434
|
-
},
|
|
1435
|
-
"reset-password": {
|
|
1436
|
-
Component: ForgotPassword,
|
|
1437
|
-
endPoint: "reset-password",
|
|
1438
|
-
fieldsToDisable: [],
|
|
1439
|
-
fieldsToOmit: ["confirmPassword"],
|
|
1440
|
-
schema: yup.object().shape({
|
|
1441
|
-
password: yup.string().min(8, translatedErrors.minLength).matches(/[a-z]/, "components.Input.error.contain.lowercase").matches(/[A-Z]/, "components.Input.error.contain.uppercase").matches(/\d/, "components.Input.error.contain.number").required(translatedErrors.required),
|
|
1442
|
-
confirmPassword: yup.string().oneOf([yup.ref("password"), null], "components.Input.error.password.noMatch").required(translatedErrors.required)
|
|
1443
|
-
})
|
|
1444
|
-
}
|
|
1445
|
-
};
|
|
1446
|
-
const init = (initialState2) => {
|
|
1447
|
-
return initialState2;
|
|
1448
|
-
};
|
|
1449
|
-
const initialState$7 = {
|
|
1450
|
-
formErrors: {},
|
|
1451
|
-
modifiedData: {},
|
|
1452
|
-
requestError: null
|
|
1453
|
-
};
|
|
1454
|
-
const reducer$2 = (state, action) => produce(state, (draftState) => {
|
|
1455
|
-
switch (action.type) {
|
|
1456
|
-
case "ON_CHANGE": {
|
|
1457
|
-
set(draftState.modifiedData, action.keys.split("."), action.value);
|
|
1458
|
-
break;
|
|
1459
|
-
}
|
|
1460
|
-
case "RESET_PROPS": {
|
|
1461
|
-
return initialState$7;
|
|
1462
|
-
}
|
|
1463
|
-
case "SET_DATA": {
|
|
1464
|
-
draftState.modifiedData = action.data;
|
|
1465
|
-
break;
|
|
1466
|
-
}
|
|
1467
|
-
case "SET_ERRORS": {
|
|
1468
|
-
draftState.formErrors = action.errors;
|
|
1469
|
-
break;
|
|
1470
|
-
}
|
|
1471
|
-
case "SET_REQUEST_ERROR": {
|
|
1472
|
-
draftState.requestError = {
|
|
1473
|
-
errorMessage: action.errorMessage,
|
|
1474
|
-
errorStatus: action.errorStatus
|
|
1475
|
-
};
|
|
1476
|
-
break;
|
|
1477
|
-
}
|
|
1478
|
-
default:
|
|
1479
|
-
return draftState;
|
|
1480
|
-
}
|
|
1481
|
-
});
|
|
1482
|
-
const AuthPage = ({ hasAdmin, setHasAdmin }) => {
|
|
1528
|
+
login: () => null,
|
|
1529
|
+
oops: Oops,
|
|
1530
|
+
register: Register,
|
|
1531
|
+
"register-admin": Register,
|
|
1532
|
+
"reset-password": ResetPassword,
|
|
1533
|
+
providers: () => null
|
|
1534
|
+
};
|
|
1535
|
+
const AuthPage = ({ hasAdmin }) => {
|
|
1483
1536
|
const {
|
|
1484
|
-
push,
|
|
1485
1537
|
location: { search }
|
|
1486
1538
|
} = useHistory();
|
|
1487
|
-
const
|
|
1488
|
-
const
|
|
1489
|
-
const
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
} = useRouteMatch("/auth/:authType");
|
|
1493
|
-
const query = useQuery();
|
|
1494
|
-
const Login2 = useEnterprise(
|
|
1495
|
-
LoginCE,
|
|
1496
|
-
async () => (await import("./index-305a03f4.mjs")).LoginEE
|
|
1539
|
+
const match = useRouteMatch("/auth/:authType");
|
|
1540
|
+
const authType = match?.params.authType;
|
|
1541
|
+
const Login$1 = useEnterprise(
|
|
1542
|
+
Login,
|
|
1543
|
+
async () => (await import("./Login-4e7ab11a.mjs")).LoginEE
|
|
1497
1544
|
);
|
|
1498
1545
|
const forms = useEnterprise(
|
|
1499
1546
|
FORMS,
|
|
1500
|
-
async () => (await import("./constants-
|
|
1547
|
+
async () => (await import("./constants-889d52fe.mjs")).FORMS,
|
|
1501
1548
|
{
|
|
1502
1549
|
combine(ceForms, eeForms) {
|
|
1503
1550
|
return {
|
|
@@ -1508,170 +1555,11 @@ const AuthPage = ({ hasAdmin, setHasAdmin }) => {
|
|
|
1508
1555
|
defaultValue: FORMS
|
|
1509
1556
|
}
|
|
1510
1557
|
);
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
)
|
|
1516
|
-
const CancelToken = axios.CancelToken;
|
|
1517
|
-
const source = CancelToken.source();
|
|
1518
|
-
const { endPoint, fieldsToDisable, fieldsToOmit, inputsPrefix, schema, ...rest } = forms?.[authType] ?? {};
|
|
1519
|
-
useEffect(() => {
|
|
1520
|
-
return () => {
|
|
1521
|
-
source.cancel("Component unmounted");
|
|
1522
|
-
};
|
|
1523
|
-
}, []);
|
|
1524
|
-
const { post } = useFetchClient();
|
|
1525
|
-
useEffect(() => {
|
|
1526
|
-
dispatch({
|
|
1527
|
-
type: "RESET_PROPS"
|
|
1528
|
-
});
|
|
1529
|
-
}, [authType]);
|
|
1530
|
-
const handleChange = ({ target: { name, value } }) => {
|
|
1531
|
-
dispatch({
|
|
1532
|
-
type: "ON_CHANGE",
|
|
1533
|
-
keys: name,
|
|
1534
|
-
value
|
|
1535
|
-
});
|
|
1536
|
-
};
|
|
1537
|
-
const handleSubmit = async (e, { setSubmitting, setErrors }) => {
|
|
1538
|
-
setSubmitting(true);
|
|
1539
|
-
const body = omit(e, fieldsToOmit);
|
|
1540
|
-
const requestURL = `/admin/${endPoint}`;
|
|
1541
|
-
if (authType === "login") {
|
|
1542
|
-
await loginRequest(e, requestURL, { setSubmitting, setErrors });
|
|
1543
|
-
}
|
|
1544
|
-
if (authType === "register" || authType === "register-admin") {
|
|
1545
|
-
await registerRequest(e, requestURL, { setSubmitting, setErrors });
|
|
1546
|
-
}
|
|
1547
|
-
if (authType === "forgot-password") {
|
|
1548
|
-
await forgotPasswordRequest(body, requestURL, { setSubmitting, setErrors });
|
|
1549
|
-
}
|
|
1550
|
-
if (authType === "reset-password") {
|
|
1551
|
-
await resetPasswordRequest(body, requestURL, { setSubmitting, setErrors });
|
|
1552
|
-
}
|
|
1553
|
-
};
|
|
1554
|
-
const forgotPasswordRequest = async (body, requestURL, { setSubmitting, setErrors }) => {
|
|
1555
|
-
try {
|
|
1556
|
-
await post(requestURL, body, { cancelToken: source.token });
|
|
1557
|
-
push("/auth/forgot-password-success");
|
|
1558
|
-
} catch (err) {
|
|
1559
|
-
console.error(err);
|
|
1560
|
-
setErrors({ errorMessage: "notification.error" });
|
|
1561
|
-
} finally {
|
|
1562
|
-
setSubmitting(false);
|
|
1563
|
-
}
|
|
1564
|
-
};
|
|
1565
|
-
const loginRequest = async (body, requestURL, { setSubmitting, setErrors }) => {
|
|
1566
|
-
try {
|
|
1567
|
-
const {
|
|
1568
|
-
data: {
|
|
1569
|
-
data: { token, user }
|
|
1570
|
-
}
|
|
1571
|
-
} = await post(requestURL, omit(body, fieldsToOmit), { cancelToken: source.token });
|
|
1572
|
-
if (user.preferedLanguage) {
|
|
1573
|
-
changeLocale(user.preferedLanguage);
|
|
1574
|
-
}
|
|
1575
|
-
auth.setToken(token, body.rememberMe);
|
|
1576
|
-
auth.setUserInfo(user, body.rememberMe);
|
|
1577
|
-
redirectToPreviousLocation();
|
|
1578
|
-
} catch (err) {
|
|
1579
|
-
if (err.response) {
|
|
1580
|
-
const errorMessage = get(
|
|
1581
|
-
err,
|
|
1582
|
-
["response", "data", "error", "message"],
|
|
1583
|
-
"Something went wrong"
|
|
1584
|
-
);
|
|
1585
|
-
if (camelCase(errorMessage).toLowerCase() === "usernotactive") {
|
|
1586
|
-
push("/auth/oops");
|
|
1587
|
-
dispatch({
|
|
1588
|
-
type: "RESET_PROPS"
|
|
1589
|
-
});
|
|
1590
|
-
return;
|
|
1591
|
-
}
|
|
1592
|
-
setErrors({ errorMessage });
|
|
1593
|
-
}
|
|
1594
|
-
} finally {
|
|
1595
|
-
setSubmitting(false);
|
|
1596
|
-
}
|
|
1597
|
-
};
|
|
1598
|
-
const registerRequest = async (body, requestURL, { setSubmitting, setErrors }) => {
|
|
1599
|
-
try {
|
|
1600
|
-
trackUsage("willCreateFirstAdmin");
|
|
1601
|
-
const {
|
|
1602
|
-
data: {
|
|
1603
|
-
data: { token, user }
|
|
1604
|
-
}
|
|
1605
|
-
} = await post(requestURL, omit(body, fieldsToOmit), { cancelToken: source.token });
|
|
1606
|
-
auth.setToken(token, false);
|
|
1607
|
-
auth.setUserInfo(user, false);
|
|
1608
|
-
setSubmitting(false);
|
|
1609
|
-
setHasAdmin(true);
|
|
1610
|
-
const { roles } = user;
|
|
1611
|
-
if (roles) {
|
|
1612
|
-
const isUserSuperAdmin = roles.find(({ code }) => code === "strapi-super-admin");
|
|
1613
|
-
if (isUserSuperAdmin) {
|
|
1614
|
-
auth.set(false, "GUIDED_TOUR_SKIPPED", true);
|
|
1615
|
-
setSkipped(false);
|
|
1616
|
-
trackUsage("didLaunchGuidedtour");
|
|
1617
|
-
}
|
|
1618
|
-
}
|
|
1619
|
-
if (authType === "register" && body.userInfo.news === true || authType === "register-admin" && body.news === true) {
|
|
1620
|
-
push({
|
|
1621
|
-
pathname: "/usecase",
|
|
1622
|
-
search: `?hasAdmin=${hasAdmin}`
|
|
1623
|
-
});
|
|
1624
|
-
return;
|
|
1625
|
-
}
|
|
1626
|
-
redirectToPreviousLocation();
|
|
1627
|
-
} catch (err) {
|
|
1628
|
-
trackUsage("didNotCreateFirstAdmin");
|
|
1629
|
-
if (err.response) {
|
|
1630
|
-
const { data } = err.response;
|
|
1631
|
-
const apiErrors = formatAPIErrors(data);
|
|
1632
|
-
setErrors({ apiErrors });
|
|
1633
|
-
}
|
|
1634
|
-
}
|
|
1635
|
-
};
|
|
1636
|
-
const resetPasswordRequest = async (body, requestURL, { setErrors, setSubmitting }) => {
|
|
1637
|
-
try {
|
|
1638
|
-
const {
|
|
1639
|
-
data: {
|
|
1640
|
-
data: { token, user }
|
|
1641
|
-
}
|
|
1642
|
-
} = await post(
|
|
1643
|
-
requestURL,
|
|
1644
|
-
{ ...body, resetPasswordToken: query.get("code") },
|
|
1645
|
-
{ cancelToken: source.token }
|
|
1646
|
-
);
|
|
1647
|
-
auth.setToken(token, false);
|
|
1648
|
-
auth.setUserInfo(user, false);
|
|
1649
|
-
push("/");
|
|
1650
|
-
} catch (err) {
|
|
1651
|
-
if (err.response) {
|
|
1652
|
-
const errorMessage = get(err, ["response", "data", "message"], "Something went wrong");
|
|
1653
|
-
const errorStatus = get(err, ["response", "data", "statusCode"], 400);
|
|
1654
|
-
dispatch({
|
|
1655
|
-
type: "SET_REQUEST_ERROR",
|
|
1656
|
-
errorMessage,
|
|
1657
|
-
errorStatus
|
|
1658
|
-
});
|
|
1659
|
-
setErrors({ errorMessage });
|
|
1660
|
-
}
|
|
1661
|
-
} finally {
|
|
1662
|
-
setSubmitting(false);
|
|
1663
|
-
}
|
|
1664
|
-
};
|
|
1665
|
-
const redirectToPreviousLocation = () => {
|
|
1666
|
-
if (authType === "login") {
|
|
1667
|
-
const redirectTo = query.get("redirectTo");
|
|
1668
|
-
const redirectUrl = redirectTo ? decodeURIComponent(redirectTo) : "/";
|
|
1669
|
-
push(redirectUrl);
|
|
1670
|
-
} else {
|
|
1671
|
-
push("/");
|
|
1672
|
-
}
|
|
1673
|
-
};
|
|
1674
|
-
if (!forms[authType] || hasAdmin && authType === "register-admin" || auth.getToken()) {
|
|
1558
|
+
if (!authType || !forms) {
|
|
1559
|
+
return /* @__PURE__ */ jsx(Redirect, { to: "/" });
|
|
1560
|
+
}
|
|
1561
|
+
const Component = forms[authType];
|
|
1562
|
+
if (!Component || hasAdmin && authType === "register-admin" || auth.getToken()) {
|
|
1675
1563
|
return /* @__PURE__ */ jsx(Redirect, { to: "/" });
|
|
1676
1564
|
}
|
|
1677
1565
|
if (!hasAdmin && authType !== "register-admin") {
|
|
@@ -1687,35 +1575,12 @@ const AuthPage = ({ hasAdmin, setHasAdmin }) => {
|
|
|
1687
1575
|
}
|
|
1688
1576
|
);
|
|
1689
1577
|
}
|
|
1690
|
-
if (
|
|
1691
|
-
|
|
1692
|
-
}
|
|
1693
|
-
if (!Login2) {
|
|
1578
|
+
if (Login$1 && authType === "login") {
|
|
1579
|
+
return /* @__PURE__ */ jsx(Login$1, {});
|
|
1580
|
+
} else if (authType === "login" && !Login$1) {
|
|
1694
1581
|
return null;
|
|
1695
1582
|
}
|
|
1696
|
-
|
|
1697
|
-
return /* @__PURE__ */ jsx(
|
|
1698
|
-
Component,
|
|
1699
|
-
{
|
|
1700
|
-
...rest,
|
|
1701
|
-
authType,
|
|
1702
|
-
fieldsToDisable,
|
|
1703
|
-
formErrors,
|
|
1704
|
-
inputsPrefix,
|
|
1705
|
-
modifiedData,
|
|
1706
|
-
onChange: handleChange,
|
|
1707
|
-
onSubmit: handleSubmit,
|
|
1708
|
-
requestError,
|
|
1709
|
-
schema
|
|
1710
|
-
}
|
|
1711
|
-
);
|
|
1712
|
-
};
|
|
1713
|
-
AuthPage.defaultProps = {
|
|
1714
|
-
hasAdmin: false
|
|
1715
|
-
};
|
|
1716
|
-
AuthPage.propTypes = {
|
|
1717
|
-
hasAdmin: PropTypes.bool,
|
|
1718
|
-
setHasAdmin: PropTypes.func.isRequired
|
|
1583
|
+
return /* @__PURE__ */ jsx(Component, { hasAdmin });
|
|
1719
1584
|
};
|
|
1720
1585
|
const NotFoundPage = () => {
|
|
1721
1586
|
const { formatMessage } = useIntl();
|
|
@@ -1910,12 +1775,12 @@ const createRoute = (loadComponent, to, exact = false) => {
|
|
|
1910
1775
|
};
|
|
1911
1776
|
const ROUTES_CE = null;
|
|
1912
1777
|
const AuthenticatedApp = React.lazy(
|
|
1913
|
-
() => import("./AuthenticatedApp-
|
|
1778
|
+
() => import("./AuthenticatedApp-332b40a8.mjs").then((n) => n.A).then((mod) => ({ default: mod.AuthenticatedApp }))
|
|
1914
1779
|
);
|
|
1915
1780
|
const App = () => {
|
|
1916
1781
|
const adminPermissions = useEnterprise(
|
|
1917
1782
|
ADMIN_PERMISSIONS_CE,
|
|
1918
|
-
async () => (await import("./constants-
|
|
1783
|
+
async () => (await import("./constants-6ecddc43.mjs")).ADMIN_PERMISSIONS_EE,
|
|
1919
1784
|
{
|
|
1920
1785
|
combine(cePermissions, eePermissions) {
|
|
1921
1786
|
return merge({}, cePermissions, eePermissions);
|
|
@@ -1925,7 +1790,7 @@ const App = () => {
|
|
|
1925
1790
|
);
|
|
1926
1791
|
const routes = useEnterprise(
|
|
1927
1792
|
ROUTES_CE,
|
|
1928
|
-
async () => (await import("./constants-
|
|
1793
|
+
async () => (await import("./constants-6ecddc43.mjs")).ROUTES_EE,
|
|
1929
1794
|
{
|
|
1930
1795
|
defaultValue: []
|
|
1931
1796
|
}
|
|
@@ -2023,7 +1888,6 @@ const App = () => {
|
|
|
2023
1888
|
};
|
|
2024
1889
|
getData();
|
|
2025
1890
|
}, [toggleNotification, updateProjectSettings]);
|
|
2026
|
-
const setHasAdmin = (hasAdmin2) => setState((prev) => ({ ...prev, hasAdmin: hasAdmin2 }));
|
|
2027
1891
|
const trackingInfo = React.useMemo(
|
|
2028
1892
|
() => ({
|
|
2029
1893
|
uuid,
|
|
@@ -2043,7 +1907,7 @@ const App = () => {
|
|
|
2043
1907
|
Route,
|
|
2044
1908
|
{
|
|
2045
1909
|
path: "/auth/:authType",
|
|
2046
|
-
render: (routerProps) => /* @__PURE__ */ jsx(AuthPage, { ...routerProps,
|
|
1910
|
+
render: (routerProps) => /* @__PURE__ */ jsx(AuthPage, { ...routerProps, hasAdmin }),
|
|
2047
1911
|
exact: true
|
|
2048
1912
|
}
|
|
2049
1913
|
),
|
|
@@ -3450,22 +3314,22 @@ const renderAdmin = async (mountNode, { plugins }) => {
|
|
|
3450
3314
|
};
|
|
3451
3315
|
export {
|
|
3452
3316
|
ACTION_SET_APP_RUNTIME_STATUS as A,
|
|
3453
|
-
|
|
3317
|
+
crudInitialState as B,
|
|
3454
3318
|
Column as C,
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3319
|
+
RESET_INIT_DATA as D,
|
|
3320
|
+
GET_INIT_DATA as E,
|
|
3321
|
+
SET_INIT_DATA as F,
|
|
3458
3322
|
GET_DATA as G,
|
|
3459
3323
|
HOOKS as H,
|
|
3460
3324
|
INIT_FORM as I,
|
|
3461
|
-
|
|
3462
|
-
|
|
3325
|
+
initialState$3 as J,
|
|
3326
|
+
StrapiLogo as K,
|
|
3463
3327
|
Login as L,
|
|
3464
|
-
|
|
3328
|
+
useLocales as M,
|
|
3465
3329
|
NpsSurvey as N,
|
|
3466
3330
|
ON_RESET_LIST_HEADERS as O,
|
|
3467
|
-
|
|
3468
|
-
|
|
3331
|
+
useThemeToggle as P,
|
|
3332
|
+
SETTINGS_LINKS_CE as Q,
|
|
3469
3333
|
RBACProvider as R,
|
|
3470
3334
|
SET_PERMISSIONS as S,
|
|
3471
3335
|
getBasename as T,
|
|
@@ -3499,6 +3363,6 @@ export {
|
|
|
3499
3363
|
ON_CHANGE_LIST_HEADERS as w,
|
|
3500
3364
|
useInjectionZone as x,
|
|
3501
3365
|
initialState$1 as y,
|
|
3502
|
-
|
|
3366
|
+
crudReducer as z
|
|
3503
3367
|
};
|
|
3504
|
-
//# sourceMappingURL=index-
|
|
3368
|
+
//# sourceMappingURL=index-cd461a87.mjs.map
|