@strapi/admin 5.0.0-alpha.1 → 5.0.0-alpha.2
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/{AdminSeatInfo-TjK5LW2b.js → AdminSeatInfo-JtsYpBbO.js} +3 -3
- package/dist/_chunks/{AdminSeatInfo-TjK5LW2b.js.map → AdminSeatInfo-JtsYpBbO.js.map} +1 -1
- package/dist/_chunks/{AdminSeatInfo-20pkL95U.mjs → AdminSeatInfo-ZZsKxX-S.mjs} +3 -3
- package/dist/_chunks/{AdminSeatInfo-20pkL95U.mjs.map → AdminSeatInfo-ZZsKxX-S.mjs.map} +1 -1
- package/dist/_chunks/{ApplicationInfoPage-ed6y9Q-B.mjs → ApplicationInfoPage-NhhWzHF1.mjs} +15 -15
- package/dist/_chunks/ApplicationInfoPage-NhhWzHF1.mjs.map +1 -0
- package/dist/_chunks/{ApplicationInfoPage-1OdKMDYH.js → ApplicationInfoPage-xj1SCaSR.js} +13 -13
- package/dist/_chunks/ApplicationInfoPage-xj1SCaSR.js.map +1 -0
- package/dist/_chunks/{AuthResponse-Hxop00n-.mjs → AuthResponse-jIqWZLMh.mjs} +2 -2
- package/dist/_chunks/{AuthResponse-Hxop00n-.mjs.map → AuthResponse-jIqWZLMh.mjs.map} +1 -1
- package/dist/_chunks/{AuthResponse-sca_wjIN.js → AuthResponse-maUe9KWA.js} +2 -2
- package/dist/_chunks/{AuthResponse-sca_wjIN.js.map → AuthResponse-maUe9KWA.js.map} +1 -1
- package/dist/_chunks/{AuthenticatedLayout-knXNB2i2.mjs → AuthenticatedLayout-Ffy6uoNF.mjs} +27 -22
- package/dist/_chunks/AuthenticatedLayout-Ffy6uoNF.mjs.map +1 -0
- package/dist/_chunks/{AuthenticatedLayout-PPlOm7kb.js → AuthenticatedLayout-kxORHKAl.js} +29 -25
- package/dist/_chunks/AuthenticatedLayout-kxORHKAl.js.map +1 -0
- package/dist/_chunks/{ComponentConfigurationPage-xZMDjeVf.js → ComponentConfigurationPage-JMCc1P7r.js} +12 -11
- package/dist/_chunks/ComponentConfigurationPage-JMCc1P7r.js.map +1 -0
- package/dist/_chunks/{ComponentConfigurationPage-okd3XovW.mjs → ComponentConfigurationPage-oiBCHXQO.mjs} +12 -11
- package/dist/_chunks/ComponentConfigurationPage-oiBCHXQO.mjs.map +1 -0
- package/dist/_chunks/{CreateActionEE-E6YNdAVx.js → CreateActionEE-ThopeFZP.js} +2 -2
- package/dist/_chunks/{CreateActionEE-E6YNdAVx.js.map → CreateActionEE-ThopeFZP.js.map} +1 -1
- package/dist/_chunks/{CreateActionEE-PaZYJ410.mjs → CreateActionEE-VMKfXSGW.mjs} +2 -2
- package/dist/_chunks/{CreateActionEE-PaZYJ410.mjs.map → CreateActionEE-VMKfXSGW.mjs.map} +1 -1
- package/dist/_chunks/{CreatePage-P1F3dkB3.mjs → CreatePage-6AeIanOF.mjs} +16 -17
- package/dist/_chunks/CreatePage-6AeIanOF.mjs.map +1 -0
- package/dist/_chunks/{CreatePage-PM_r99U5.mjs → CreatePage-Gh5xb10f.mjs} +9 -10
- package/dist/_chunks/CreatePage-Gh5xb10f.mjs.map +1 -0
- package/dist/_chunks/{CreatePage-hlkPO2Cv.js → CreatePage-JIHfFWS7.js} +3 -3
- package/dist/_chunks/{CreatePage-hlkPO2Cv.js.map → CreatePage-JIHfFWS7.js.map} +1 -1
- package/dist/_chunks/{CreatePage-1Oi4-aR6.js → CreatePage-WWKaoNH7.js} +16 -17
- package/dist/_chunks/CreatePage-WWKaoNH7.js.map +1 -0
- package/dist/_chunks/{CreatePage-6458K0l9.mjs → CreatePage-hxFhldpL.mjs} +3 -3
- package/dist/_chunks/{CreatePage-6458K0l9.mjs.map → CreatePage-hxFhldpL.mjs.map} +1 -1
- package/dist/_chunks/{CreatePage-DmNFNVN9.js → CreatePage-yjmy0z57.js} +9 -10
- package/dist/_chunks/CreatePage-yjmy0z57.js.map +1 -0
- package/dist/_chunks/{CreateView-AWmN1xWJ.js → CreateView-J48m0lSL.js} +3 -3
- package/dist/_chunks/{CreateView-AWmN1xWJ.js.map → CreateView-J48m0lSL.js.map} +1 -1
- package/dist/_chunks/{CreateView-hUH4bf5k.js → CreateView-Vqd1PVrJ.js} +3 -3
- package/dist/_chunks/{CreateView-hUH4bf5k.js.map → CreateView-Vqd1PVrJ.js.map} +1 -1
- package/dist/_chunks/{CreateView-cTvLLIgu.mjs → CreateView-oBp0NzJx.mjs} +3 -3
- package/dist/_chunks/{CreateView-cTvLLIgu.mjs.map → CreateView-oBp0NzJx.mjs.map} +1 -1
- package/dist/_chunks/{CreateView-pBI75ZwZ.mjs → CreateView-qzpeDBvR.mjs} +3 -3
- package/dist/_chunks/{CreateView-pBI75ZwZ.mjs.map → CreateView-qzpeDBvR.mjs.map} +1 -1
- package/dist/_chunks/{EditConfigurationPage-LItt0mJo.mjs → EditConfigurationPage-MAUfMzG6.mjs} +11 -10
- package/dist/_chunks/EditConfigurationPage-MAUfMzG6.mjs.map +1 -0
- package/dist/_chunks/{EditConfigurationPage-PZ4yq1bM.js → EditConfigurationPage-PKHUVKGD.js} +11 -10
- package/dist/_chunks/EditConfigurationPage-PKHUVKGD.js.map +1 -0
- package/dist/_chunks/{EditPage-W6hncyNY.js → EditPage-7bVupT7n.js} +15 -15
- package/dist/_chunks/EditPage-7bVupT7n.js.map +1 -0
- package/dist/_chunks/{EditPage-MPNLCYgQ.mjs → EditPage-DQUZsl8H.mjs} +16 -17
- package/dist/_chunks/EditPage-DQUZsl8H.mjs.map +1 -0
- package/dist/_chunks/{EditPage-mU2WAH0F.js → EditPage-Hxt5uBXk.js} +10 -11
- package/dist/_chunks/EditPage-Hxt5uBXk.js.map +1 -0
- package/dist/_chunks/{EditPage-30rqjB1d.mjs → EditPage-Izmz7bdh.mjs} +16 -16
- package/dist/_chunks/EditPage-Izmz7bdh.mjs.map +1 -0
- package/dist/_chunks/{EditPage-_N_lm93z.js → EditPage-QA0-S3kV.js} +14 -15
- package/dist/_chunks/EditPage-QA0-S3kV.js.map +1 -0
- package/dist/_chunks/{EditPage--EPGgPNr.mjs → EditPage-THSaM4-0.mjs} +10 -11
- package/dist/_chunks/EditPage-THSaM4-0.mjs.map +1 -0
- package/dist/_chunks/{EditPage-RpzlPkkU.js → EditPage-vUQIn3OJ.js} +18 -19
- package/dist/_chunks/{EditPage-RpzlPkkU.js.map → EditPage-vUQIn3OJ.js.map} +1 -1
- package/dist/_chunks/{EditPage-GRIZWtGz.mjs → EditPage-zpnfFOjc.mjs} +18 -19
- package/dist/_chunks/{EditPage-GRIZWtGz.mjs.map → EditPage-zpnfFOjc.mjs.map} +1 -1
- package/dist/_chunks/{EditView-wDP9PNQY.js → EditView-63ynF0vf.js} +12 -13
- package/dist/_chunks/EditView-63ynF0vf.js.map +1 -0
- package/dist/_chunks/{EditView-0lXpbgG0.mjs → EditView-cfOpTlAi.mjs} +14 -15
- package/dist/_chunks/EditView-cfOpTlAi.mjs.map +1 -0
- package/dist/_chunks/{EditViewPage-0Pd8zBi7.js → EditViewPage--SujdXIG.js} +16 -18
- package/dist/_chunks/EditViewPage--SujdXIG.js.map +1 -0
- package/dist/_chunks/{EditViewPage-R6diW-gL.mjs → EditViewPage-JFzIJClS.mjs} +6 -7
- package/dist/_chunks/EditViewPage-JFzIJClS.mjs.map +1 -0
- package/dist/_chunks/{EditViewPage-ed0-10GO.js → EditViewPage-kkCJlZyh.js} +8 -9
- package/dist/_chunks/EditViewPage-kkCJlZyh.js.map +1 -0
- package/dist/_chunks/{EditViewPage-uWYR_o8w.mjs → EditViewPage-vz8UJ4U_.mjs} +17 -18
- package/dist/_chunks/EditViewPage-vz8UJ4U_.mjs.map +1 -0
- package/dist/_chunks/{EventsTable-R_AHW6Z4.js → EventsTable-1X4uyY8J.js} +2 -2
- package/dist/_chunks/{EventsTable-R_AHW6Z4.js.map → EventsTable-1X4uyY8J.js.map} +1 -1
- package/dist/_chunks/{EventsTable-CqN6AzV9.mjs → EventsTable-dN2MNNFu.mjs} +2 -2
- package/dist/_chunks/{EventsTable-CqN6AzV9.mjs.map → EventsTable-dN2MNNFu.mjs.map} +1 -1
- package/dist/_chunks/{FieldTypeIcon-rAK1gg9p.mjs → FieldTypeIcon-4-UZzZla.mjs} +2 -2
- package/dist/_chunks/{FieldTypeIcon-rAK1gg9p.mjs.map → FieldTypeIcon-4-UZzZla.mjs.map} +1 -1
- package/dist/_chunks/{FieldTypeIcon-1WDWx0cR.js → FieldTypeIcon-wxfhExw2.js} +2 -2
- package/dist/_chunks/{FieldTypeIcon-1WDWx0cR.js.map → FieldTypeIcon-wxfhExw2.js.map} +1 -1
- package/dist/_chunks/{Filters-rPaxqj4F.mjs → Filters--lh-i85A.mjs} +2 -3
- package/dist/_chunks/Filters--lh-i85A.mjs.map +1 -0
- package/dist/_chunks/{Filters-f6ghLf0Z.js → Filters-V0VODaNk.js} +4 -5
- package/dist/_chunks/Filters-V0VODaNk.js.map +1 -0
- package/dist/_chunks/{Form-eqzCPjSo.js → Form-6QJjWK34.js} +5 -6
- package/dist/_chunks/Form-6QJjWK34.js.map +1 -0
- package/dist/_chunks/{Form-QOZA9Aq6.mjs → Form-HXiNxSZi.mjs} +5 -6
- package/dist/_chunks/Form-HXiNxSZi.mjs.map +1 -0
- package/dist/_chunks/{History-Eq4_WQPf.mjs → History-CRGqDfHr.mjs} +4 -5
- package/dist/_chunks/History-CRGqDfHr.mjs.map +1 -0
- package/dist/_chunks/{History-j00hpmXV.js → History-R_4lEy01.js} +9 -10
- package/dist/_chunks/History-R_4lEy01.js.map +1 -0
- package/dist/_chunks/{HomePage-gTElgmEK.mjs → HomePage-GJRtRqAj.mjs} +3 -3
- package/dist/_chunks/{HomePage-gTElgmEK.mjs.map → HomePage-GJRtRqAj.mjs.map} +1 -1
- package/dist/_chunks/{HomePage-O-TRGX5T.mjs → HomePage-Si17pjt5.mjs} +5 -6
- package/dist/_chunks/HomePage-Si17pjt5.mjs.map +1 -0
- package/dist/_chunks/{HomePage-3IVOMrYf.js → HomePage-oiaJD-JE.js} +5 -6
- package/dist/_chunks/HomePage-oiaJD-JE.js.map +1 -0
- package/dist/_chunks/{HomePage-79fqDlve.js → HomePage-rEW7Jpww.js} +3 -3
- package/dist/_chunks/{HomePage-79fqDlve.js.map → HomePage-rEW7Jpww.js.map} +1 -1
- package/dist/_chunks/{InputRenderer-bJwYq9ga.mjs → InputRenderer-JfwBoJk0.mjs} +40 -18
- package/dist/_chunks/InputRenderer-JfwBoJk0.mjs.map +1 -0
- package/dist/_chunks/{InputRenderer-AVDw8MeU.js → InputRenderer-hWILsDgK.js} +42 -20
- package/dist/_chunks/InputRenderer-hWILsDgK.js.map +1 -0
- package/dist/_chunks/{InstalledPluginsPage-R2hVFPZl.mjs → InstalledPluginsPage-XqzfeZgq.mjs} +7 -9
- package/dist/_chunks/InstalledPluginsPage-XqzfeZgq.mjs.map +1 -0
- package/dist/_chunks/{InstalledPluginsPage-FkR2xkQz.js → InstalledPluginsPage-ao6yYe7N.js} +6 -8
- package/dist/_chunks/InstalledPluginsPage-ao6yYe7N.js.map +1 -0
- package/dist/_chunks/{Layout-omCNy92r.mjs → Layout-2dctwEHz.mjs} +2 -2
- package/dist/_chunks/{Layout-omCNy92r.mjs.map → Layout-2dctwEHz.mjs.map} +1 -1
- package/dist/_chunks/{Layout-cV6Se3U9.mjs → Layout-3sYAgWn4.mjs} +6 -6
- package/dist/_chunks/Layout-3sYAgWn4.mjs.map +1 -0
- package/dist/_chunks/{Layout-jweb3cF3.js → Layout-4vMUN0Ez.js} +2 -2
- package/dist/_chunks/{Layout-jweb3cF3.js.map → Layout-4vMUN0Ez.js.map} +1 -1
- package/dist/_chunks/{Layout-G49-Vc5u.js → Layout-kbqdKkiF.js} +5 -5
- package/dist/_chunks/Layout-kbqdKkiF.js.map +1 -0
- package/dist/_chunks/{ListConfigurationPage-70qtv4Ci.js → ListConfigurationPage-BXuW_9Wt.js} +10 -11
- package/dist/_chunks/ListConfigurationPage-BXuW_9Wt.js.map +1 -0
- package/dist/_chunks/{ListConfigurationPage-PrJNO_6y.mjs → ListConfigurationPage-lPILAPkW.mjs} +10 -11
- package/dist/_chunks/ListConfigurationPage-lPILAPkW.mjs.map +1 -0
- package/dist/_chunks/{ListPage-78Cv8Vfq.js → ListPage-02WM7Pt9.js} +11 -12
- package/dist/_chunks/ListPage-02WM7Pt9.js.map +1 -0
- package/dist/_chunks/{ListPage-2lswUYQN.js → ListPage-7TAp-q4k.js} +15 -16
- package/dist/_chunks/ListPage-7TAp-q4k.js.map +1 -0
- package/dist/_chunks/{ListPage-edro79m2.mjs → ListPage-EdOy02-v.mjs} +11 -12
- package/dist/_chunks/ListPage-EdOy02-v.mjs.map +1 -0
- package/dist/_chunks/{ListPage-mAUCZIg8.mjs → ListPage-OaldiDCh.mjs} +57 -59
- package/dist/_chunks/ListPage-OaldiDCh.mjs.map +1 -0
- package/dist/_chunks/{ListPage-Q81SX0vA.mjs → ListPage-R8Qs69v7.mjs} +3 -3
- package/dist/_chunks/{ListPage-Q81SX0vA.mjs.map → ListPage-R8Qs69v7.mjs.map} +1 -1
- package/dist/_chunks/{ListPage-Cvn3WbMH.mjs → ListPage-SCTNGhhO.mjs} +16 -17
- package/dist/_chunks/ListPage-SCTNGhhO.mjs.map +1 -0
- package/dist/_chunks/{ListPage-xFkcmM1b.mjs → ListPage-YZ45BiMe.mjs} +17 -18
- package/dist/_chunks/ListPage-YZ45BiMe.mjs.map +1 -0
- package/dist/_chunks/{ListPage-7dZ3nYvc.js → ListPage-ZWUo77nT.js} +55 -56
- package/dist/_chunks/ListPage-ZWUo77nT.js.map +1 -0
- package/dist/_chunks/{ListPage-Ms6egnF5.js → ListPage-bE4a6YkV.js} +3 -3
- package/dist/_chunks/{ListPage-Ms6egnF5.js.map → ListPage-bE4a6YkV.js.map} +1 -1
- package/dist/_chunks/{ListPage-NmUS_cOz.mjs → ListPage-p17R2Gql.mjs} +14 -18
- package/dist/_chunks/ListPage-p17R2Gql.mjs.map +1 -0
- package/dist/_chunks/{ListPage-Pf5LxUYn.js → ListPage-rCVvOLlD.js} +14 -20
- package/dist/_chunks/ListPage-rCVvOLlD.js.map +1 -0
- package/dist/_chunks/{ListPage-yymh17qi.js → ListPage-u6uVacPz.js} +14 -15
- package/dist/_chunks/ListPage-u6uVacPz.js.map +1 -0
- package/dist/_chunks/{ListView--43zLiHW.mjs → ListView--O7X6dMw.mjs} +13 -14
- package/dist/_chunks/ListView--O7X6dMw.mjs.map +1 -0
- package/dist/_chunks/{ListView-YtMAQnXL.js → ListView-SsUn5vcn.js} +11 -12
- package/dist/_chunks/ListView-SsUn5vcn.js.map +1 -0
- package/dist/_chunks/{ListView-nfA6o3qO.js → ListView-ZkjwQBXQ.js} +10 -11
- package/dist/_chunks/ListView-ZkjwQBXQ.js.map +1 -0
- package/dist/_chunks/{ListView-qPiKeCxj.mjs → ListView-oP-C8SCR.mjs} +12 -13
- package/dist/_chunks/ListView-oP-C8SCR.mjs.map +1 -0
- package/dist/_chunks/{ListViewPage-fPFonK_X.mjs → ListViewPage-1VNVP9Rw.mjs} +12 -13
- package/dist/_chunks/ListViewPage-1VNVP9Rw.mjs.map +1 -0
- package/dist/_chunks/{ListViewPage-Ys7-G2XX.js → ListViewPage-idgrhBAP.js} +16 -17
- package/dist/_chunks/ListViewPage-idgrhBAP.js.map +1 -0
- package/dist/_chunks/{Login-Ge3DZEpr.js → Login-4Igrm6CC.js} +2 -2
- package/dist/_chunks/{Login-Ge3DZEpr.js.map → Login-4Igrm6CC.js.map} +1 -1
- package/dist/_chunks/{Login-6kXI90Vy.mjs → Login-B55AM-7k.mjs} +2 -2
- package/dist/_chunks/{Login-6kXI90Vy.mjs.map → Login-B55AM-7k.mjs.map} +1 -1
- package/dist/_chunks/{MagicLinkEE-HXWaLr0K.mjs → MagicLinkEE-Zy_9ZZ7y.mjs} +3 -3
- package/dist/_chunks/{MagicLinkEE-HXWaLr0K.mjs.map → MagicLinkEE-Zy_9ZZ7y.mjs.map} +1 -1
- package/dist/_chunks/{MagicLinkEE-sXtA2gUK.js → MagicLinkEE-v7xTuVEA.js} +3 -3
- package/dist/_chunks/{MagicLinkEE-sXtA2gUK.js.map → MagicLinkEE-v7xTuVEA.js.map} +1 -1
- package/dist/_chunks/{MarketplacePage-hVOJ9_0k.mjs → MarketplacePage-UGys0LVN.mjs} +20 -17
- package/dist/_chunks/MarketplacePage-UGys0LVN.mjs.map +1 -0
- package/dist/_chunks/{MarketplacePage-s8KDwNwK.js → MarketplacePage-tWKM5xe8.js} +22 -19
- package/dist/_chunks/MarketplacePage-tWKM5xe8.js.map +1 -0
- package/dist/_chunks/{NoContentTypePage-szvJnQKF.mjs → NoContentTypePage-BaaTD5uB.mjs} +4 -6
- package/dist/_chunks/NoContentTypePage-BaaTD5uB.mjs.map +1 -0
- package/dist/_chunks/{NoContentTypePage-7YEcgsE3.js → NoContentTypePage-Lbuve_Uu.js} +3 -5
- package/dist/_chunks/NoContentTypePage-Lbuve_Uu.js.map +1 -0
- package/dist/_chunks/{NoPermissionsPage-pqQFFlXa.mjs → NoPermissionsPage--Oa97N7k.mjs} +5 -7
- package/dist/_chunks/NoPermissionsPage--Oa97N7k.mjs.map +1 -0
- package/dist/_chunks/{NoPermissionsPage-UX-5msLb.js → NoPermissionsPage-q44k5VFX.js} +3 -5
- package/dist/_chunks/NoPermissionsPage-q44k5VFX.js.map +1 -0
- package/dist/_chunks/{Permissions-a0IZJ8dM.js → Permissions-CFuwI0Ni.js} +5 -6
- package/dist/_chunks/Permissions-CFuwI0Ni.js.map +1 -0
- package/dist/_chunks/{Permissions-NUaDxULo.mjs → Permissions-NbmBkSB4.mjs} +3 -3
- package/dist/_chunks/Permissions-NbmBkSB4.mjs.map +1 -0
- package/dist/_chunks/{PrivateRoute-eP4-pBby.mjs → PrivateRoute-YN_98pM_.mjs} +2 -2
- package/dist/_chunks/{PrivateRoute-eP4-pBby.mjs.map → PrivateRoute-YN_98pM_.mjs.map} +1 -1
- package/dist/_chunks/{PrivateRoute-KGxyTa5b.js → PrivateRoute-avlq1MEy.js} +2 -2
- package/dist/_chunks/{PrivateRoute-KGxyTa5b.js.map → PrivateRoute-avlq1MEy.js.map} +1 -1
- package/dist/_chunks/{ProfilePage-MBCGqbc_.js → ProfilePage-brPbqDP1.js} +14 -16
- package/dist/_chunks/ProfilePage-brPbqDP1.js.map +1 -0
- package/dist/_chunks/{ProfilePage-LXB-_EZ8.mjs → ProfilePage-eCIvxxJY.mjs} +15 -17
- package/dist/_chunks/ProfilePage-eCIvxxJY.mjs.map +1 -0
- package/dist/_chunks/{ReviewWorkflowsColumn-Ancp7-x3.js → ReviewWorkflowsColumn-HfjzpLFU.js} +2 -2
- package/dist/_chunks/{ReviewWorkflowsColumn-Ancp7-x3.js.map → ReviewWorkflowsColumn-HfjzpLFU.js.map} +1 -1
- package/dist/_chunks/{ReviewWorkflowsColumn-WzYpj2O3.mjs → ReviewWorkflowsColumn-sPZxvFUd.mjs} +2 -2
- package/dist/_chunks/{ReviewWorkflowsColumn-WzYpj2O3.mjs.map → ReviewWorkflowsColumn-sPZxvFUd.mjs.map} +1 -1
- package/dist/_chunks/{SelectRoles-Pr2wqehq.js → SelectRoles-BmNzL0q5.js} +9 -7
- package/dist/_chunks/SelectRoles-BmNzL0q5.js.map +1 -0
- package/dist/_chunks/{SelectRoles-Dxz_rAaT.mjs → SelectRoles-jvH4WUf6.mjs} +8 -6
- package/dist/_chunks/SelectRoles-jvH4WUf6.mjs.map +1 -0
- package/dist/_chunks/{SingleSignOnPage-4dK4id8H.js → SingleSignOnPage-ZyiHtZxJ.js} +10 -11
- package/dist/_chunks/SingleSignOnPage-ZyiHtZxJ.js.map +1 -0
- package/dist/_chunks/{SingleSignOnPage-gxgIeURz.mjs → SingleSignOnPage-aMd3wcAh.mjs} +12 -13
- package/dist/_chunks/SingleSignOnPage-aMd3wcAh.mjs.map +1 -0
- package/dist/_chunks/{Table-NiTkS4IC.mjs → Table-591I_RMU.mjs} +2 -3
- package/dist/_chunks/Table-591I_RMU.mjs.map +1 -0
- package/dist/_chunks/{Table-_9gVkGGi.js → Table-aUfykqgd.js} +3 -4
- package/dist/_chunks/Table-aUfykqgd.js.map +1 -0
- package/dist/_chunks/{TokenTypeSelect-jtfCyMMZ.mjs → TokenTypeSelect-vIBdBE9t.mjs} +9 -10
- package/dist/_chunks/TokenTypeSelect-vIBdBE9t.mjs.map +1 -0
- package/dist/_chunks/{TokenTypeSelect-3aWUm1cW.js → TokenTypeSelect-vp-54yBv.js} +10 -11
- package/dist/_chunks/TokenTypeSelect-vp-54yBv.js.map +1 -0
- package/dist/_chunks/{UseCasePage-QK-B8FfM.js → UseCasePage-0_alQEc9.js} +6 -7
- package/dist/_chunks/UseCasePage-0_alQEc9.js.map +1 -0
- package/dist/_chunks/{UseCasePage-0qXYZ8kt.mjs → UseCasePage-Cxu2FeWo.mjs} +6 -7
- package/dist/_chunks/UseCasePage-Cxu2FeWo.mjs.map +1 -0
- package/dist/_chunks/{apiTokens-TayNdk_V.js → apiTokens-IG3rF-G2.js} +2 -2
- package/dist/_chunks/{apiTokens-TayNdk_V.js.map → apiTokens-IG3rF-G2.js.map} +1 -1
- package/dist/_chunks/{apiTokens-DO6vkoyd.mjs → apiTokens-wLmJ3Liv.mjs} +2 -2
- package/dist/_chunks/{apiTokens-DO6vkoyd.mjs.map → apiTokens-wLmJ3Liv.mjs.map} +1 -1
- package/dist/_chunks/{constants-_T5uxsuv.mjs → constants-0OGkpIzK.mjs} +3 -3
- package/dist/_chunks/{constants-_T5uxsuv.mjs.map → constants-0OGkpIzK.mjs.map} +1 -1
- package/dist/_chunks/{constants-RZp8o_c4.js → constants-7yqqXq3r.js} +2 -2
- package/dist/_chunks/{constants-RZp8o_c4.js.map → constants-7yqqXq3r.js.map} +1 -1
- package/dist/_chunks/{constants-FEW7x2Od.mjs → constants-JgR8CVx2.mjs} +2 -2
- package/dist/_chunks/{constants-FEW7x2Od.mjs.map → constants-JgR8CVx2.mjs.map} +1 -1
- package/dist/_chunks/{constants-Xd-X3SCR.js → constants-XJLrl2Tl.js} +3 -3
- package/dist/_chunks/{constants-Xd-X3SCR.js.map → constants-XJLrl2Tl.js.map} +1 -1
- package/dist/_chunks/{index-hjUhNUvw.mjs → index-GIVuHJgC.mjs} +647 -312
- package/dist/_chunks/index-GIVuHJgC.mjs.map +1 -0
- package/dist/_chunks/{index-ejSDPT-T.js → index-haHGOQMJ.js} +553 -218
- package/dist/_chunks/index-haHGOQMJ.js.map +1 -0
- package/dist/_chunks/{selectors-uLWxH-jN.mjs → selectors--2Vzk8PA.mjs} +2 -2
- package/dist/_chunks/{selectors-uLWxH-jN.mjs.map → selectors--2Vzk8PA.mjs.map} +1 -1
- package/dist/_chunks/{selectors-T2YIN4Fb.js → selectors-NSSzzIzx.js} +2 -2
- package/dist/_chunks/{selectors-T2YIN4Fb.js.map → selectors-NSSzzIzx.js.map} +1 -1
- package/dist/_chunks/{transferTokens-jdkk-sPx.mjs → transferTokens-WIsWKVbF.mjs} +2 -2
- package/dist/_chunks/{transferTokens-jdkk-sPx.mjs.map → transferTokens-WIsWKVbF.mjs.map} +1 -1
- package/dist/_chunks/{transferTokens-T-kGMb3U.js → transferTokens-xL4mlopP.js} +2 -2
- package/dist/_chunks/{transferTokens-T-kGMb3U.js.map → transferTokens-xL4mlopP.js.map} +1 -1
- package/dist/_chunks/{useAdminRoles-QJQS1BCd.mjs → useAdminRoles--ozrdfW_.mjs} +2 -2
- package/dist/_chunks/{useAdminRoles-QJQS1BCd.mjs.map → useAdminRoles--ozrdfW_.mjs.map} +1 -1
- package/dist/_chunks/{useAdminRoles-SnzC_mvy.js → useAdminRoles-Y25Pjlcy.js} +2 -2
- package/dist/_chunks/{useAdminRoles-SnzC_mvy.js.map → useAdminRoles-Y25Pjlcy.js.map} +1 -1
- package/dist/_chunks/{useContentTypes-Lpg-eJmK.js → useContentTypes-Vr8jkHQL.js} +4 -5
- package/dist/_chunks/useContentTypes-Vr8jkHQL.js.map +1 -0
- package/dist/_chunks/{useContentTypes-U-n1-lz0.mjs → useContentTypes-ralhLmpD.mjs} +4 -5
- package/dist/_chunks/useContentTypes-ralhLmpD.mjs.map +1 -0
- package/dist/_chunks/{useLicenseLimitNotification-yJHxF4YO.mjs → useLicenseLimitNotification-RSTkqcfW.mjs} +5 -6
- package/dist/_chunks/useLicenseLimitNotification-RSTkqcfW.mjs.map +1 -0
- package/dist/_chunks/{useLicenseLimitNotification-Hjv_LKmp.js → useLicenseLimitNotification-fSsffVh-.js} +5 -6
- package/dist/_chunks/useLicenseLimitNotification-fSsffVh-.js.map +1 -0
- package/dist/_chunks/{useReviewWorkflows-0rQx2KxS.mjs → useReviewWorkflows--7WPIykR.mjs} +2 -2
- package/dist/_chunks/{useReviewWorkflows-0rQx2KxS.mjs.map → useReviewWorkflows--7WPIykR.mjs.map} +1 -1
- package/dist/_chunks/{useReviewWorkflows-QoSEilRp.js → useReviewWorkflows-4t3eVbDa.js} +2 -2
- package/dist/_chunks/{useReviewWorkflows-QoSEilRp.js.map → useReviewWorkflows-4t3eVbDa.js.map} +1 -1
- package/dist/_chunks/{useSyncRbac-hZJWbmmY.js → useSyncRbac-Fw5UPeMQ.js} +2 -2
- package/dist/_chunks/{useSyncRbac-hZJWbmmY.js.map → useSyncRbac-Fw5UPeMQ.js.map} +1 -1
- package/dist/_chunks/{useSyncRbac-wVgN6XIc.mjs → useSyncRbac-JNQibLFa.mjs} +2 -2
- package/dist/_chunks/{useSyncRbac-wVgN6XIc.mjs.map → useSyncRbac-JNQibLFa.mjs.map} +1 -1
- package/dist/_chunks/{useWebhooks-1ZG0V0Mc.js → useWebhooks-IXb4Ks8E.js} +2 -2
- package/dist/_chunks/{useWebhooks-1ZG0V0Mc.js.map → useWebhooks-IXb4Ks8E.js.map} +1 -1
- package/dist/_chunks/{useWebhooks-WBwti5Jl.mjs → useWebhooks-sfNt0r3v.mjs} +2 -2
- package/dist/_chunks/{useWebhooks-WBwti5Jl.mjs.map → useWebhooks-sfNt0r3v.mjs.map} +1 -1
- package/dist/_chunks/{validateWorkflow-23kb45Oa.mjs → validateWorkflow-YRBggwod.mjs} +5 -6
- package/dist/_chunks/validateWorkflow-YRBggwod.mjs.map +1 -0
- package/dist/_chunks/{validateWorkflow-MaEpFiHz.js → validateWorkflow-akFNValJ.js} +8 -9
- package/dist/_chunks/validateWorkflow-akFNValJ.js.map +1 -0
- package/dist/_chunks/{validation-7cD0kJHF.js → validation--QPWqn0e.js} +2 -2
- package/dist/_chunks/{validation-7cD0kJHF.js.map → validation--QPWqn0e.js.map} +1 -1
- package/dist/_chunks/{validation-rilbXPnt.mjs → validation-hlioQ0PO.mjs} +2 -2
- package/dist/_chunks/{validation-rilbXPnt.mjs.map → validation-hlioQ0PO.mjs.map} +1 -1
- package/dist/admin/index.js +7 -1
- package/dist/admin/index.js.map +1 -1
- package/dist/admin/index.mjs +28 -22
- package/dist/admin/src/components/PageHelpers.d.ts +6 -2
- package/dist/admin/src/content-manager/history/services/historyVersion.d.ts +1 -1
- package/dist/admin/src/content-manager/history/tests/mockData.d.ts +692 -0
- package/dist/admin/src/content-manager/history/tests/server.d.ts +3 -0
- package/dist/admin/src/content-manager/pages/EditView/components/DocumentActions.d.ts +2 -1
- package/dist/admin/src/content-manager/services/api.d.ts +1 -1
- package/dist/admin/src/content-manager/services/components.d.ts +2 -2
- package/dist/admin/src/content-manager/services/contentTypes.d.ts +3 -3
- package/dist/admin/src/content-manager/services/documents.d.ts +17 -20
- package/dist/admin/src/content-manager/services/init.d.ts +1 -1
- package/dist/admin/src/content-manager/services/relations.d.ts +2 -2
- package/dist/admin/src/content-manager/services/uid.d.ts +3 -3
- package/dist/admin/src/core/store/configure.d.ts +2 -2
- package/dist/admin/src/core/store/hooks.d.ts +3 -3
- package/dist/admin/src/features/AppInfo.d.ts +22 -0
- package/dist/admin/src/features/Notifications.d.ts +47 -0
- package/dist/admin/src/hooks/useAPIErrorHandler.d.ts +4 -3
- package/dist/admin/src/hooks/useClipboard.d.ts +4 -0
- package/dist/admin/src/hooks/useFetchClient.d.ts +43 -0
- package/dist/admin/src/hooks/useFocusInputField.d.ts +20 -0
- package/dist/admin/src/hooks/useQueryParams.d.ts +5 -0
- package/dist/admin/src/index.d.ts +8 -4
- package/dist/admin/src/pages/Marketplace/components/NpmPackageCard.d.ts +1 -1
- package/dist/admin/src/pages/Marketplace/components/NpmPackagesGrid.d.ts +1 -1
- package/dist/admin/src/pages/Marketplace/hooks/useMarketplaceData.d.ts +2 -2
- package/dist/admin/src/selectors.d.ts +2 -2
- package/dist/admin/src/utils/baseQuery.d.ts +1 -1
- package/dist/admin/src/utils/getFetchClient.d.ts +30 -0
- package/dist/admin/src/utils/getYupInnerErrors.d.ts +7 -0
- package/dist/admin/src/utils/normalizeAPIError.d.ts +2 -2
- package/dist/admin/src/utils/users.d.ts +1 -1
- package/dist/admin/tests/index.js +49173 -0
- package/dist/admin/tests/index.js.map +1 -0
- package/dist/admin/tests/index.mjs +49135 -0
- package/dist/admin/tests/index.mjs.map +1 -0
- package/dist/admin/tests/mockData.d.ts +2053 -0
- package/dist/admin/tests/server.d.ts +2 -0
- package/dist/admin/tests/setup.d.ts +1 -0
- package/dist/admin/tests/store.d.ts +468 -0
- package/dist/admin/tests/utils.d.ts +511 -0
- package/dist/server/src/validation/api-tokens.d.ts +4 -27
- package/dist/server/src/validation/api-tokens.d.ts.map +1 -1
- package/dist/server/src/validation/authentication/register.d.ts +2 -8
- package/dist/server/src/validation/authentication/register.d.ts.map +1 -1
- package/dist/server/src/validation/permission.d.ts +4 -53
- package/dist/server/src/validation/permission.d.ts.map +1 -1
- package/dist/server/src/validation/policies/hasPermissions.d.ts +2 -7
- package/dist/server/src/validation/policies/hasPermissions.d.ts.map +1 -1
- package/dist/server/src/validation/role.d.ts +6 -23
- package/dist/server/src/validation/role.d.ts.map +1 -1
- package/dist/server/src/validation/transfer/token.d.ts +4 -23
- package/dist/server/src/validation/transfer/token.d.ts.map +1 -1
- package/dist/server/src/validation/user.d.ts +8 -56
- package/dist/server/src/validation/user.d.ts.map +1 -1
- package/package.json +12 -12
- package/dist/_chunks/ApplicationInfoPage-1OdKMDYH.js.map +0 -1
- package/dist/_chunks/ApplicationInfoPage-ed6y9Q-B.mjs.map +0 -1
- package/dist/_chunks/AuthenticatedLayout-PPlOm7kb.js.map +0 -1
- package/dist/_chunks/AuthenticatedLayout-knXNB2i2.mjs.map +0 -1
- package/dist/_chunks/ComponentConfigurationPage-okd3XovW.mjs.map +0 -1
- package/dist/_chunks/ComponentConfigurationPage-xZMDjeVf.js.map +0 -1
- package/dist/_chunks/CreatePage-1Oi4-aR6.js.map +0 -1
- package/dist/_chunks/CreatePage-DmNFNVN9.js.map +0 -1
- package/dist/_chunks/CreatePage-P1F3dkB3.mjs.map +0 -1
- package/dist/_chunks/CreatePage-PM_r99U5.mjs.map +0 -1
- package/dist/_chunks/EditConfigurationPage-LItt0mJo.mjs.map +0 -1
- package/dist/_chunks/EditConfigurationPage-PZ4yq1bM.js.map +0 -1
- package/dist/_chunks/EditPage--EPGgPNr.mjs.map +0 -1
- package/dist/_chunks/EditPage-30rqjB1d.mjs.map +0 -1
- package/dist/_chunks/EditPage-MPNLCYgQ.mjs.map +0 -1
- package/dist/_chunks/EditPage-W6hncyNY.js.map +0 -1
- package/dist/_chunks/EditPage-_N_lm93z.js.map +0 -1
- package/dist/_chunks/EditPage-mU2WAH0F.js.map +0 -1
- package/dist/_chunks/EditView-0lXpbgG0.mjs.map +0 -1
- package/dist/_chunks/EditView-wDP9PNQY.js.map +0 -1
- package/dist/_chunks/EditViewPage-0Pd8zBi7.js.map +0 -1
- package/dist/_chunks/EditViewPage-R6diW-gL.mjs.map +0 -1
- package/dist/_chunks/EditViewPage-ed0-10GO.js.map +0 -1
- package/dist/_chunks/EditViewPage-uWYR_o8w.mjs.map +0 -1
- package/dist/_chunks/Filters-f6ghLf0Z.js.map +0 -1
- package/dist/_chunks/Filters-rPaxqj4F.mjs.map +0 -1
- package/dist/_chunks/Form-QOZA9Aq6.mjs.map +0 -1
- package/dist/_chunks/Form-eqzCPjSo.js.map +0 -1
- package/dist/_chunks/History-Eq4_WQPf.mjs.map +0 -1
- package/dist/_chunks/History-j00hpmXV.js.map +0 -1
- package/dist/_chunks/HomePage-3IVOMrYf.js.map +0 -1
- package/dist/_chunks/HomePage-O-TRGX5T.mjs.map +0 -1
- package/dist/_chunks/InputRenderer-AVDw8MeU.js.map +0 -1
- package/dist/_chunks/InputRenderer-bJwYq9ga.mjs.map +0 -1
- package/dist/_chunks/InstalledPluginsPage-FkR2xkQz.js.map +0 -1
- package/dist/_chunks/InstalledPluginsPage-R2hVFPZl.mjs.map +0 -1
- package/dist/_chunks/Layout-G49-Vc5u.js.map +0 -1
- package/dist/_chunks/Layout-cV6Se3U9.mjs.map +0 -1
- package/dist/_chunks/ListConfigurationPage-70qtv4Ci.js.map +0 -1
- package/dist/_chunks/ListConfigurationPage-PrJNO_6y.mjs.map +0 -1
- package/dist/_chunks/ListPage-2lswUYQN.js.map +0 -1
- package/dist/_chunks/ListPage-78Cv8Vfq.js.map +0 -1
- package/dist/_chunks/ListPage-7dZ3nYvc.js.map +0 -1
- package/dist/_chunks/ListPage-Cvn3WbMH.mjs.map +0 -1
- package/dist/_chunks/ListPage-NmUS_cOz.mjs.map +0 -1
- package/dist/_chunks/ListPage-Pf5LxUYn.js.map +0 -1
- package/dist/_chunks/ListPage-edro79m2.mjs.map +0 -1
- package/dist/_chunks/ListPage-mAUCZIg8.mjs.map +0 -1
- package/dist/_chunks/ListPage-xFkcmM1b.mjs.map +0 -1
- package/dist/_chunks/ListPage-yymh17qi.js.map +0 -1
- package/dist/_chunks/ListView--43zLiHW.mjs.map +0 -1
- package/dist/_chunks/ListView-YtMAQnXL.js.map +0 -1
- package/dist/_chunks/ListView-nfA6o3qO.js.map +0 -1
- package/dist/_chunks/ListView-qPiKeCxj.mjs.map +0 -1
- package/dist/_chunks/ListViewPage-Ys7-G2XX.js.map +0 -1
- package/dist/_chunks/ListViewPage-fPFonK_X.mjs.map +0 -1
- package/dist/_chunks/MarketplacePage-hVOJ9_0k.mjs.map +0 -1
- package/dist/_chunks/MarketplacePage-s8KDwNwK.js.map +0 -1
- package/dist/_chunks/NoContentTypePage-7YEcgsE3.js.map +0 -1
- package/dist/_chunks/NoContentTypePage-szvJnQKF.mjs.map +0 -1
- package/dist/_chunks/NoPermissionsPage-UX-5msLb.js.map +0 -1
- package/dist/_chunks/NoPermissionsPage-pqQFFlXa.mjs.map +0 -1
- package/dist/_chunks/Permissions-NUaDxULo.mjs.map +0 -1
- package/dist/_chunks/Permissions-a0IZJ8dM.js.map +0 -1
- package/dist/_chunks/ProfilePage-LXB-_EZ8.mjs.map +0 -1
- package/dist/_chunks/ProfilePage-MBCGqbc_.js.map +0 -1
- package/dist/_chunks/SelectRoles-Dxz_rAaT.mjs.map +0 -1
- package/dist/_chunks/SelectRoles-Pr2wqehq.js.map +0 -1
- package/dist/_chunks/SingleSignOnPage-4dK4id8H.js.map +0 -1
- package/dist/_chunks/SingleSignOnPage-gxgIeURz.mjs.map +0 -1
- package/dist/_chunks/Table-NiTkS4IC.mjs.map +0 -1
- package/dist/_chunks/Table-_9gVkGGi.js.map +0 -1
- package/dist/_chunks/TokenTypeSelect-3aWUm1cW.js.map +0 -1
- package/dist/_chunks/TokenTypeSelect-jtfCyMMZ.mjs.map +0 -1
- package/dist/_chunks/UseCasePage-0qXYZ8kt.mjs.map +0 -1
- package/dist/_chunks/UseCasePage-QK-B8FfM.js.map +0 -1
- package/dist/_chunks/index-ejSDPT-T.js.map +0 -1
- package/dist/_chunks/index-hjUhNUvw.mjs.map +0 -1
- package/dist/_chunks/useContentTypes-Lpg-eJmK.js.map +0 -1
- package/dist/_chunks/useContentTypes-U-n1-lz0.mjs.map +0 -1
- package/dist/_chunks/useLicenseLimitNotification-Hjv_LKmp.js.map +0 -1
- package/dist/_chunks/useLicenseLimitNotification-yJHxF4YO.mjs.map +0 -1
- package/dist/_chunks/validateWorkflow-23kb45Oa.mjs.map +0 -1
- package/dist/_chunks/validateWorkflow-MaEpFiHz.js.map +0 -1
- package/dist/admin/src/types/errors.d.ts +0 -2
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const helperPlugin = require("@strapi/helper-plugin");
|
|
3
2
|
const client = require("react-dom/client");
|
|
4
3
|
const jsxRuntime = require("react/jsx-runtime");
|
|
5
4
|
const React = require("react");
|
|
@@ -11,15 +10,17 @@ const pick = require("lodash/pick");
|
|
|
11
10
|
const reactRedux = require("react-redux");
|
|
12
11
|
const reactRouterDom = require("react-router-dom");
|
|
13
12
|
const reactHelmet = require("react-helmet");
|
|
13
|
+
const helperPlugin = require("@strapi/helper-plugin");
|
|
14
14
|
const Icons = require("@strapi/icons");
|
|
15
15
|
const reactIntl = require("react-intl");
|
|
16
|
+
const v2 = require("@strapi/design-system/v2");
|
|
16
17
|
const react = require("@reduxjs/toolkit/query/react");
|
|
17
18
|
const axios = require("axios");
|
|
19
|
+
const qs = require("qs");
|
|
18
20
|
const reactQuery = require("react-query");
|
|
19
21
|
const ContextSelector = require("use-context-selector");
|
|
20
22
|
const toolkit = require("@reduxjs/toolkit");
|
|
21
|
-
const
|
|
22
|
-
const produce = require("immer");
|
|
23
|
+
const immer = require("immer");
|
|
23
24
|
const reactContext = require("@radix-ui/react-context");
|
|
24
25
|
const get = require("lodash/get");
|
|
25
26
|
const set = require("lodash/set");
|
|
@@ -31,7 +32,6 @@ const fractionalIndexing = require("fractional-indexing");
|
|
|
31
32
|
const isEqual = require("lodash/isEqual");
|
|
32
33
|
const clone = require("lodash/clone");
|
|
33
34
|
const toPath = require("lodash/toPath");
|
|
34
|
-
const qs = require("qs");
|
|
35
35
|
const throttle = require("lodash/throttle");
|
|
36
36
|
const dateFns = require("date-fns");
|
|
37
37
|
const reactDnd = require("react-dnd");
|
|
@@ -65,8 +65,8 @@ const isFunction__default = /* @__PURE__ */ _interopDefault(isFunction);
|
|
|
65
65
|
const merge__default = /* @__PURE__ */ _interopDefault(merge);
|
|
66
66
|
const pick__default = /* @__PURE__ */ _interopDefault(pick);
|
|
67
67
|
const axios__default = /* @__PURE__ */ _interopDefault(axios);
|
|
68
|
+
const qs__default = /* @__PURE__ */ _interopDefault(qs);
|
|
68
69
|
const ContextSelector__namespace = /* @__PURE__ */ _interopNamespace(ContextSelector);
|
|
69
|
-
const produce__default = /* @__PURE__ */ _interopDefault(produce);
|
|
70
70
|
const get__default = /* @__PURE__ */ _interopDefault(get);
|
|
71
71
|
const set__default = /* @__PURE__ */ _interopDefault(set);
|
|
72
72
|
const defaultsDeep__default = /* @__PURE__ */ _interopDefault(defaultsDeep);
|
|
@@ -113,7 +113,7 @@ const getEERoutes$1 = () => window.strapi.isEE ? [
|
|
|
113
113
|
{
|
|
114
114
|
path: "auth/login/:authResponse",
|
|
115
115
|
lazy: async () => {
|
|
116
|
-
const { AuthResponse } = await Promise.resolve().then(() => require("./AuthResponse-
|
|
116
|
+
const { AuthResponse } = await Promise.resolve().then(() => require("./AuthResponse-maUe9KWA.js"));
|
|
117
117
|
return {
|
|
118
118
|
Component: AuthResponse
|
|
119
119
|
};
|
|
@@ -161,7 +161,7 @@ const getEERoutes = () => [
|
|
|
161
161
|
{
|
|
162
162
|
path: "audit-logs",
|
|
163
163
|
lazy: async () => {
|
|
164
|
-
const { ProtectedListPage } = await Promise.resolve().then(() => require("./ListPage-
|
|
164
|
+
const { ProtectedListPage } = await Promise.resolve().then(() => require("./ListPage-02WM7Pt9.js"));
|
|
165
165
|
return {
|
|
166
166
|
Component: ProtectedListPage
|
|
167
167
|
};
|
|
@@ -172,7 +172,7 @@ const getEERoutes = () => [
|
|
|
172
172
|
{
|
|
173
173
|
path: "review-workflows",
|
|
174
174
|
lazy: async () => {
|
|
175
|
-
const { ProtectedReviewWorkflowsPage } = await Promise.resolve().then(() => require("./ListPage-
|
|
175
|
+
const { ProtectedReviewWorkflowsPage } = await Promise.resolve().then(() => require("./ListPage-ZWUo77nT.js"));
|
|
176
176
|
return {
|
|
177
177
|
Component: ProtectedReviewWorkflowsPage
|
|
178
178
|
};
|
|
@@ -181,7 +181,7 @@ const getEERoutes = () => [
|
|
|
181
181
|
{
|
|
182
182
|
path: "review-workflows/create",
|
|
183
183
|
lazy: async () => {
|
|
184
|
-
const { ReviewWorkflowsCreatePage } = await Promise.resolve().then(() => require("./CreatePage-
|
|
184
|
+
const { ReviewWorkflowsCreatePage } = await Promise.resolve().then(() => require("./CreatePage-WWKaoNH7.js"));
|
|
185
185
|
return {
|
|
186
186
|
Component: ReviewWorkflowsCreatePage
|
|
187
187
|
};
|
|
@@ -190,7 +190,7 @@ const getEERoutes = () => [
|
|
|
190
190
|
{
|
|
191
191
|
path: "review-workflows/:workflowId",
|
|
192
192
|
lazy: async () => {
|
|
193
|
-
const { ReviewWorkflowsEditPage } = await Promise.resolve().then(() => require("./EditPage-
|
|
193
|
+
const { ReviewWorkflowsEditPage } = await Promise.resolve().then(() => require("./EditPage-7bVupT7n.js"));
|
|
194
194
|
return {
|
|
195
195
|
Component: ReviewWorkflowsEditPage
|
|
196
196
|
};
|
|
@@ -201,7 +201,7 @@ const getEERoutes = () => [
|
|
|
201
201
|
{
|
|
202
202
|
path: "single-sign-on",
|
|
203
203
|
lazy: async () => {
|
|
204
|
-
const { ProtectedSSO } = await Promise.resolve().then(() => require("./SingleSignOnPage-
|
|
204
|
+
const { ProtectedSSO } = await Promise.resolve().then(() => require("./SingleSignOnPage-ZyiHtZxJ.js"));
|
|
205
205
|
return {
|
|
206
206
|
Component: ProtectedSSO
|
|
207
207
|
};
|
|
@@ -209,6 +209,151 @@ const getEERoutes = () => [
|
|
|
209
209
|
}
|
|
210
210
|
] : []
|
|
211
211
|
];
|
|
212
|
+
const NotificationsContext = React__namespace.createContext({
|
|
213
|
+
toggleNotification: () => {
|
|
214
|
+
}
|
|
215
|
+
});
|
|
216
|
+
const NotificationsProvider = ({ children }) => {
|
|
217
|
+
const notificationIdRef = React__namespace.useRef(0);
|
|
218
|
+
const [notifications, setNotifications] = React__namespace.useState([]);
|
|
219
|
+
const toggleNotification = React__namespace.useCallback(
|
|
220
|
+
({ type, message, link, timeout, blockTransition, onClose, title }) => {
|
|
221
|
+
setNotifications((s) => [
|
|
222
|
+
...s,
|
|
223
|
+
{
|
|
224
|
+
id: notificationIdRef.current++,
|
|
225
|
+
type,
|
|
226
|
+
message,
|
|
227
|
+
link,
|
|
228
|
+
timeout,
|
|
229
|
+
blockTransition,
|
|
230
|
+
onClose,
|
|
231
|
+
title
|
|
232
|
+
}
|
|
233
|
+
]);
|
|
234
|
+
},
|
|
235
|
+
[]
|
|
236
|
+
);
|
|
237
|
+
const clearNotification = React__namespace.useCallback((id) => {
|
|
238
|
+
setNotifications((s) => s.filter((n) => n.id !== id));
|
|
239
|
+
}, []);
|
|
240
|
+
const value = React__namespace.useMemo(() => ({ toggleNotification }), [toggleNotification]);
|
|
241
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(NotificationsContext.Provider, { value, children: [
|
|
242
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
243
|
+
designSystem.Flex,
|
|
244
|
+
{
|
|
245
|
+
left: "50%",
|
|
246
|
+
marginLeft: "-250px",
|
|
247
|
+
position: "fixed",
|
|
248
|
+
direction: "column",
|
|
249
|
+
alignItems: "stretch",
|
|
250
|
+
gap: 2,
|
|
251
|
+
top: `${46 / 16}rem`,
|
|
252
|
+
width: `${500 / 16}rem`,
|
|
253
|
+
zIndex: 10,
|
|
254
|
+
children: notifications.map((notification) => {
|
|
255
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
256
|
+
Notification,
|
|
257
|
+
{
|
|
258
|
+
...notification,
|
|
259
|
+
clearNotification
|
|
260
|
+
},
|
|
261
|
+
notification.id
|
|
262
|
+
);
|
|
263
|
+
})
|
|
264
|
+
}
|
|
265
|
+
),
|
|
266
|
+
children
|
|
267
|
+
] });
|
|
268
|
+
};
|
|
269
|
+
const Notification = ({
|
|
270
|
+
clearNotification,
|
|
271
|
+
blockTransition = false,
|
|
272
|
+
id,
|
|
273
|
+
link,
|
|
274
|
+
message,
|
|
275
|
+
onClose,
|
|
276
|
+
timeout = 2500,
|
|
277
|
+
title,
|
|
278
|
+
type
|
|
279
|
+
}) => {
|
|
280
|
+
const { formatMessage } = reactIntl.useIntl();
|
|
281
|
+
const onCloseCallback = designSystem.useCallbackRef(onClose);
|
|
282
|
+
const handleClose = React__namespace.useCallback(() => {
|
|
283
|
+
onCloseCallback();
|
|
284
|
+
clearNotification(id);
|
|
285
|
+
}, [clearNotification, id, onCloseCallback]);
|
|
286
|
+
React__namespace.useEffect(() => {
|
|
287
|
+
if (!blockTransition) {
|
|
288
|
+
const timeoutReference = setTimeout(() => {
|
|
289
|
+
handleClose();
|
|
290
|
+
}, timeout);
|
|
291
|
+
return () => {
|
|
292
|
+
clearTimeout(timeoutReference);
|
|
293
|
+
};
|
|
294
|
+
}
|
|
295
|
+
}, [blockTransition, handleClose, timeout]);
|
|
296
|
+
let variant;
|
|
297
|
+
let alertTitle;
|
|
298
|
+
if (type === "info") {
|
|
299
|
+
variant = "default";
|
|
300
|
+
alertTitle = formatMessage({
|
|
301
|
+
id: "notification.default.title",
|
|
302
|
+
defaultMessage: "Information:"
|
|
303
|
+
});
|
|
304
|
+
} else if (type === "danger") {
|
|
305
|
+
variant = "danger";
|
|
306
|
+
alertTitle = formatMessage({
|
|
307
|
+
id: "notification.warning.title",
|
|
308
|
+
defaultMessage: "Warning:"
|
|
309
|
+
});
|
|
310
|
+
} else if (type === "warning") {
|
|
311
|
+
variant = "warning";
|
|
312
|
+
alertTitle = formatMessage({
|
|
313
|
+
id: "notification.warning.title",
|
|
314
|
+
defaultMessage: "Warning:"
|
|
315
|
+
});
|
|
316
|
+
} else {
|
|
317
|
+
variant = "success";
|
|
318
|
+
alertTitle = formatMessage({
|
|
319
|
+
id: "notification.success.title",
|
|
320
|
+
defaultMessage: "Success:"
|
|
321
|
+
});
|
|
322
|
+
}
|
|
323
|
+
if (title) {
|
|
324
|
+
alertTitle = title;
|
|
325
|
+
}
|
|
326
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
327
|
+
designSystem.Alert,
|
|
328
|
+
{
|
|
329
|
+
action: link ? /* @__PURE__ */ jsxRuntime.jsx(v2.Link, { href: link.url, isExternal: true, children: link.label }) : void 0,
|
|
330
|
+
onClose: handleClose,
|
|
331
|
+
closeLabel: formatMessage({
|
|
332
|
+
id: "global.close",
|
|
333
|
+
defaultMessage: "Close"
|
|
334
|
+
}),
|
|
335
|
+
title: alertTitle,
|
|
336
|
+
variant,
|
|
337
|
+
children: message
|
|
338
|
+
}
|
|
339
|
+
);
|
|
340
|
+
};
|
|
341
|
+
/**
|
|
342
|
+
* @preserve
|
|
343
|
+
* @description Returns an object to interact with the notification
|
|
344
|
+
* system. The callbacks are wrapped in `useCallback` for a stable
|
|
345
|
+
* identity.
|
|
346
|
+
*
|
|
347
|
+
* @example
|
|
348
|
+
* ```tsx
|
|
349
|
+
* import { useNotification } from '@strapi/helper-plugin';
|
|
350
|
+
*
|
|
351
|
+
* const MyComponent = () => {
|
|
352
|
+
* const { toggleNotification } = useNotification();
|
|
353
|
+
*
|
|
354
|
+
* return <button onClick={() => toggleNotification({ message: 'Hello world!' })}>Click me</button>;
|
|
355
|
+
*/
|
|
356
|
+
const useNotification = () => React__namespace.useContext(NotificationsContext);
|
|
212
357
|
function getPrefixedId(message, callback) {
|
|
213
358
|
const prefixedMessage = `apiError.${message}`;
|
|
214
359
|
if (typeof callback === "function") {
|
|
@@ -346,9 +491,54 @@ function formatAPIError(error, { formatMessage, intlMessagePrefixCallback }) {
|
|
|
346
491
|
}
|
|
347
492
|
return formatMessage(normalizedError);
|
|
348
493
|
}
|
|
494
|
+
const fetchClient = () => {
|
|
495
|
+
const instance2 = axios__default.default.create({
|
|
496
|
+
headers: {
|
|
497
|
+
Accept: "application/json",
|
|
498
|
+
"Content-Type": "application/json"
|
|
499
|
+
},
|
|
500
|
+
paramsSerializer: (params) => {
|
|
501
|
+
return qs__default.default.stringify(params, { encode: false });
|
|
502
|
+
}
|
|
503
|
+
});
|
|
504
|
+
instance2.interceptors.request.use(
|
|
505
|
+
async (config) => {
|
|
506
|
+
config.headers.Authorization = `Bearer ${helperPlugin.auth.getToken()}`;
|
|
507
|
+
return config;
|
|
508
|
+
},
|
|
509
|
+
(error) => Promise.reject(error)
|
|
510
|
+
);
|
|
511
|
+
instance2.interceptors.response.use(
|
|
512
|
+
(response) => response,
|
|
513
|
+
(error) => {
|
|
514
|
+
if (error?.response?.status === 401) {
|
|
515
|
+
helperPlugin.auth.clearAppStorage();
|
|
516
|
+
window.location.reload();
|
|
517
|
+
}
|
|
518
|
+
throw error;
|
|
519
|
+
}
|
|
520
|
+
);
|
|
521
|
+
return instance2;
|
|
522
|
+
};
|
|
523
|
+
const instance = fetchClient();
|
|
524
|
+
const addPrependingSlash = (url) => url.charAt(0) !== "/" ? `/${url}` : url;
|
|
525
|
+
const hasProtocol = (url) => new RegExp("^(?:[a-z+]+:)?//", "i").test(url);
|
|
526
|
+
const normalizeUrl = (url) => hasProtocol(url) ? url : addPrependingSlash(url);
|
|
527
|
+
const getFetchClient = (defaultOptions = {}) => {
|
|
528
|
+
instance.defaults.baseURL = window.strapi.backendURL;
|
|
529
|
+
return {
|
|
530
|
+
get: (url, config) => instance.get(normalizeUrl(url), {
|
|
531
|
+
...defaultOptions,
|
|
532
|
+
...config
|
|
533
|
+
}),
|
|
534
|
+
put: (url, data, config) => instance.put(normalizeUrl(url), data, { ...defaultOptions, ...config }),
|
|
535
|
+
post: (url, data, config) => instance.post(normalizeUrl(url), data, { ...defaultOptions, ...config }),
|
|
536
|
+
del: (url, config) => instance.delete(normalizeUrl(url), { ...defaultOptions, ...config })
|
|
537
|
+
};
|
|
538
|
+
};
|
|
349
539
|
const axiosBaseQuery = () => async (query, { signal }) => {
|
|
350
540
|
try {
|
|
351
|
-
const { get: get2, post, del, put } =
|
|
541
|
+
const { get: get2, post, del, put } = getFetchClient();
|
|
352
542
|
if (typeof query === "string") {
|
|
353
543
|
const result = await get2(query, { signal });
|
|
354
544
|
return { data: result.data };
|
|
@@ -613,12 +803,15 @@ const {
|
|
|
613
803
|
useGetProviderOptionsQuery,
|
|
614
804
|
useUpdateProviderOptionsMutation
|
|
615
805
|
} = authService;
|
|
806
|
+
const PageMain = ({ children, ...restProps }) => {
|
|
807
|
+
return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Main, { ...restProps, children });
|
|
808
|
+
};
|
|
616
809
|
const Loading$1 = ({ children = "Loading content." }) => {
|
|
617
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
810
|
+
return /* @__PURE__ */ jsxRuntime.jsx(PageMain, { height: "100vh", "aria-busy": true, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { alignItems: "center", height: "100%", justifyContent: "center", children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Loader, { children }) }) });
|
|
618
811
|
};
|
|
619
812
|
const Error$1 = (props) => {
|
|
620
813
|
const { formatMessage } = reactIntl.useIntl();
|
|
621
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
814
|
+
return /* @__PURE__ */ jsxRuntime.jsx(PageMain, { height: "100%", children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { alignItems: "center", height: "100%", justifyContent: "center", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
622
815
|
designSystem.EmptyStateLayout,
|
|
623
816
|
{
|
|
624
817
|
icon: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Icon, { as: Icons.ExclamationMarkCircle, width: "10rem" }),
|
|
@@ -632,7 +825,7 @@ const Error$1 = (props) => {
|
|
|
632
825
|
};
|
|
633
826
|
const NoPermissions = (props) => {
|
|
634
827
|
const { formatMessage } = reactIntl.useIntl();
|
|
635
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
828
|
+
return /* @__PURE__ */ jsxRuntime.jsx(PageMain, { height: "100%", children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { alignItems: "center", height: "100%", justifyContent: "center", children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { minWidth: "50%", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
636
829
|
designSystem.EmptyStateLayout,
|
|
637
830
|
{
|
|
638
831
|
icon: /* @__PURE__ */ jsxRuntime.jsx(Icons.EmptyPermissions, { width: "10rem" }),
|
|
@@ -646,7 +839,7 @@ const NoPermissions = (props) => {
|
|
|
646
839
|
};
|
|
647
840
|
const NoData = (props) => {
|
|
648
841
|
const { formatMessage } = reactIntl.useIntl();
|
|
649
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
842
|
+
return /* @__PURE__ */ jsxRuntime.jsx(PageMain, { height: "100%", children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { alignItems: "center", height: "100%", width: "100%", justifyContent: "center", children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { minWidth: "50%", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
650
843
|
designSystem.EmptyStateLayout,
|
|
651
844
|
{
|
|
652
845
|
icon: /* @__PURE__ */ jsxRuntime.jsx(Icons.EmptyDocuments, { width: "10rem" }),
|
|
@@ -660,7 +853,7 @@ const NoData = (props) => {
|
|
|
660
853
|
};
|
|
661
854
|
const Protect = ({ permissions = [], children }) => {
|
|
662
855
|
const { allPermissions } = helperPlugin.useRBACProvider();
|
|
663
|
-
const toggleNotification =
|
|
856
|
+
const { toggleNotification } = useNotification();
|
|
664
857
|
const { _unstableFormatAPIError: formatAPIError2 } = useAPIErrorHandler();
|
|
665
858
|
const matchingPermissions = allPermissions.filter(
|
|
666
859
|
(permission) => permissions.findIndex(
|
|
@@ -684,7 +877,7 @@ const Protect = ({ permissions = [], children }) => {
|
|
|
684
877
|
React__namespace.useEffect(() => {
|
|
685
878
|
if (error) {
|
|
686
879
|
toggleNotification({
|
|
687
|
-
type: "
|
|
880
|
+
type: "danger",
|
|
688
881
|
message: formatAPIError2(error)
|
|
689
882
|
});
|
|
690
883
|
}
|
|
@@ -707,7 +900,8 @@ const Page = {
|
|
|
707
900
|
Loading: Loading$1,
|
|
708
901
|
NoPermissions,
|
|
709
902
|
Protect,
|
|
710
|
-
NoData
|
|
903
|
+
NoData,
|
|
904
|
+
Main: PageMain
|
|
711
905
|
};
|
|
712
906
|
function createContext(rootComponentName, defaultContext) {
|
|
713
907
|
const Context = ContextSelector__namespace.createContext(defaultContext);
|
|
@@ -904,7 +1098,7 @@ const HistoryProvider = ({ children }) => {
|
|
|
904
1098
|
}, [dispatch, location.pathname, location.search]);
|
|
905
1099
|
return /* @__PURE__ */ jsxRuntime.jsx(Provider, { pushState, goBack, ...state, children });
|
|
906
1100
|
};
|
|
907
|
-
const reducer$5 = (state, action) =>
|
|
1101
|
+
const reducer$5 = (state, action) => immer.produce(state, (draft) => {
|
|
908
1102
|
switch (action.type) {
|
|
909
1103
|
case "PUSH_STATE": {
|
|
910
1104
|
const path = `${action.payload.to}${action.payload.search}`;
|
|
@@ -1047,6 +1241,7 @@ const {
|
|
|
1047
1241
|
useGetPluginsQuery,
|
|
1048
1242
|
useGetLicenseLimitsQuery
|
|
1049
1243
|
} = admin;
|
|
1244
|
+
const [AppInfoProvider, useAppInfo] = createContext("AppInfo", {});
|
|
1050
1245
|
const TrackingContext = React__namespace.createContext({
|
|
1051
1246
|
uuid: false
|
|
1052
1247
|
});
|
|
@@ -1090,7 +1285,7 @@ const TrackingProvider = ({ children }) => {
|
|
|
1090
1285
|
};
|
|
1091
1286
|
const useTracking = () => {
|
|
1092
1287
|
const { uuid, telemetryProperties } = React__namespace.useContext(TrackingContext);
|
|
1093
|
-
const
|
|
1288
|
+
const userId = useAppInfo("useTracking", (state) => state.userId);
|
|
1094
1289
|
const trackUsage = React__namespace.useCallback(
|
|
1095
1290
|
async (event, properties) => {
|
|
1096
1291
|
try {
|
|
@@ -1135,7 +1330,7 @@ const ConfigurationProvider = ({
|
|
|
1135
1330
|
}) => {
|
|
1136
1331
|
const { trackUsage } = useTracking();
|
|
1137
1332
|
const { formatMessage } = reactIntl.useIntl();
|
|
1138
|
-
const toggleNotification =
|
|
1333
|
+
const { toggleNotification } = useNotification();
|
|
1139
1334
|
const { _unstableFormatAPIError: formatAPIError2 } = useAPIErrorHandler();
|
|
1140
1335
|
const permissions = useTypedSelector(
|
|
1141
1336
|
(state) => state.admin_app.permissions.settings?.["project-settings"]
|
|
@@ -1152,11 +1347,11 @@ const ConfigurationProvider = ({
|
|
|
1152
1347
|
React__namespace.useEffect(() => {
|
|
1153
1348
|
if (error) {
|
|
1154
1349
|
toggleNotification({
|
|
1155
|
-
type: "
|
|
1156
|
-
message: { id: "app.containers.App.notification.error.init" }
|
|
1350
|
+
type: "danger",
|
|
1351
|
+
message: formatMessage({ id: "app.containers.App.notification.error.init" })
|
|
1157
1352
|
});
|
|
1158
1353
|
}
|
|
1159
|
-
}, [error, toggleNotification]);
|
|
1354
|
+
}, [error, formatMessage, toggleNotification]);
|
|
1160
1355
|
const { data, isSuccess } = useProjectSettingsQuery(void 0, {
|
|
1161
1356
|
skip: !token || !canRead
|
|
1162
1357
|
});
|
|
@@ -1191,7 +1386,7 @@ const ConfigurationProvider = ({
|
|
|
1191
1386
|
});
|
|
1192
1387
|
} else {
|
|
1193
1388
|
toggleNotification({
|
|
1194
|
-
type: "
|
|
1389
|
+
type: "danger",
|
|
1195
1390
|
message: formatAPIError2(res.error)
|
|
1196
1391
|
});
|
|
1197
1392
|
}
|
|
@@ -1331,7 +1526,7 @@ const initialState$3 = {
|
|
|
1331
1526
|
isGuidedTourVisible: false,
|
|
1332
1527
|
isSkipped: false
|
|
1333
1528
|
};
|
|
1334
|
-
const reducer$4 = (state = initialState$3, action) =>
|
|
1529
|
+
const reducer$4 = (state = initialState$3, action) => immer.produce(state, (draftState) => {
|
|
1335
1530
|
switch (action.type) {
|
|
1336
1531
|
case "SET_CURRENT_STEP": {
|
|
1337
1532
|
draftState.currentStep = action.step;
|
|
@@ -1454,7 +1649,7 @@ const Providers = ({ children, strapi, store }) => {
|
|
|
1454
1649
|
},
|
|
1455
1650
|
runHookSeries: strapi.runHookSeries,
|
|
1456
1651
|
settings: strapi.settings,
|
|
1457
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1652
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(NotificationsProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(TrackingProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(GuidedTourProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1458
1653
|
ConfigurationProvider,
|
|
1459
1654
|
{
|
|
1460
1655
|
defaultAuthLogo: strapi.configurations.authLogo,
|
|
@@ -1479,10 +1674,32 @@ const App = ({ strapi, store }) => {
|
|
|
1479
1674
|
] }) });
|
|
1480
1675
|
};
|
|
1481
1676
|
const StrapiLogo = "data:image/svg+xml,%3csvg%20width='800'%20height='800'%20viewBox='0%200%20800%20800'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M39%20282c0-118%200-176.9%2036.6-213.5C112.2%2032%20171.1%2032%20288.9%2032h221.2c117.8%200%20176.7%200%20213.3%2036.6C760%20105.2%20760%20164.1%20760%20281.9v221.2c0%20117.8%200%20176.7-36.6%20213.3C686.8%20753%20627.9%20753%20510.1%20753H288.9c-117.8%200-176.7%200-213.3-36.6C39%20679.8%2039%20620.9%2039%20503.1V281.9Z'%20fill='%234945FF'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M536.4%20250.7H293.7v123.8h123.8v123.7h123.8V255.5c0-2.6-2.2-4.8-4.9-4.8Z'%20fill='%23fff'/%3e%3cpath%20fill='%23fff'%20d='M412.7%20374.5h4.8v4.8h-4.8z'/%3e%3cpath%20d='M293.8%20374.5h119c2.6%200%204.8%202.1%204.8%204.8v119h-119a4.8%204.8%200%200%201-4.8-4.9v-119Z'%20fill='%239593FF'/%3e%3cpath%20d='M417.5%20498.2h123.8L421.6%20618a2.4%202.4%200%200%201-4-1.7v-118ZM293.8%20374.5h-118a2.4%202.4%200%200%201-1.7-4.1l119.7-119.7v123.8Z'%20fill='%239593FF'/%3e%3c/svg%3e";
|
|
1677
|
+
const useClipboard = () => {
|
|
1678
|
+
const copy = React.useCallback(async (value) => {
|
|
1679
|
+
try {
|
|
1680
|
+
if (typeof value !== "string" && typeof value !== "number") {
|
|
1681
|
+
throw new Error(
|
|
1682
|
+
`Cannot copy typeof ${typeof value} to clipboard, must be a string or number`
|
|
1683
|
+
);
|
|
1684
|
+
} else if (value === "") {
|
|
1685
|
+
throw new Error(`Cannot copy empty string to clipboard.`);
|
|
1686
|
+
}
|
|
1687
|
+
const stringifiedValue = value.toString();
|
|
1688
|
+
await navigator.clipboard.writeText(stringifiedValue);
|
|
1689
|
+
return true;
|
|
1690
|
+
} catch (error) {
|
|
1691
|
+
if (process.env.NODE_ENV === "development") {
|
|
1692
|
+
console.warn("Copy failed", error);
|
|
1693
|
+
}
|
|
1694
|
+
return false;
|
|
1695
|
+
}
|
|
1696
|
+
}, []);
|
|
1697
|
+
return { copy };
|
|
1698
|
+
};
|
|
1482
1699
|
const ErrorElement = () => {
|
|
1483
1700
|
const error = reactRouterDom.useRouteError();
|
|
1484
1701
|
const { formatMessage } = reactIntl.useIntl();
|
|
1485
|
-
const { copy } =
|
|
1702
|
+
const { copy } = useClipboard();
|
|
1486
1703
|
if (error instanceof Error) {
|
|
1487
1704
|
console.error(error);
|
|
1488
1705
|
const handleClick = async () => {
|
|
@@ -1773,7 +1990,7 @@ const routes$1 = [
|
|
|
1773
1990
|
{
|
|
1774
1991
|
path: ":collectionType/:slug/:id/history",
|
|
1775
1992
|
lazy: async () => {
|
|
1776
|
-
const { ProtectedHistoryPage } = await Promise.resolve().then(() => require("./History-
|
|
1993
|
+
const { ProtectedHistoryPage } = await Promise.resolve().then(() => require("./History-R_4lEy01.js"));
|
|
1777
1994
|
return {
|
|
1778
1995
|
Component: ProtectedHistoryPage
|
|
1779
1996
|
};
|
|
@@ -1782,7 +1999,7 @@ const routes$1 = [
|
|
|
1782
1999
|
{
|
|
1783
2000
|
path: ":collectionType/:slug/history",
|
|
1784
2001
|
lazy: async () => {
|
|
1785
|
-
const { ProtectedHistoryPage } = await Promise.resolve().then(() => require("./History-
|
|
2002
|
+
const { ProtectedHistoryPage } = await Promise.resolve().then(() => require("./History-R_4lEy01.js"));
|
|
1786
2003
|
return {
|
|
1787
2004
|
Component: ProtectedHistoryPage
|
|
1788
2005
|
};
|
|
@@ -1807,10 +2024,10 @@ const Redirect = () => {
|
|
|
1807
2024
|
);
|
|
1808
2025
|
};
|
|
1809
2026
|
const ProtectedEditViewPage = React.lazy(
|
|
1810
|
-
() => Promise.resolve().then(() => require("./EditViewPage-
|
|
2027
|
+
() => Promise.resolve().then(() => require("./EditViewPage-kkCJlZyh.js")).then((mod) => ({ default: mod.ProtectedEditViewPage }))
|
|
1811
2028
|
);
|
|
1812
2029
|
const ProtectedListViewPage = React.lazy(
|
|
1813
|
-
() => Promise.resolve().then(() => require("./ListViewPage-
|
|
2030
|
+
() => Promise.resolve().then(() => require("./ListViewPage-idgrhBAP.js")).then((mod) => ({ default: mod.ProtectedListViewPage }))
|
|
1814
2031
|
);
|
|
1815
2032
|
const CollectionTypePages = () => {
|
|
1816
2033
|
const { collectionType } = reactRouterDom.useParams();
|
|
@@ -1865,7 +2082,7 @@ const routes = [
|
|
|
1865
2082
|
{
|
|
1866
2083
|
path: ":collectionType/:slug/:id",
|
|
1867
2084
|
lazy: async () => {
|
|
1868
|
-
const { ProtectedEditViewPage: ProtectedEditViewPage2 } = await Promise.resolve().then(() => require("./EditViewPage-
|
|
2085
|
+
const { ProtectedEditViewPage: ProtectedEditViewPage2 } = await Promise.resolve().then(() => require("./EditViewPage-kkCJlZyh.js"));
|
|
1869
2086
|
return {
|
|
1870
2087
|
Component: ProtectedEditViewPage2
|
|
1871
2088
|
};
|
|
@@ -1874,7 +2091,7 @@ const routes = [
|
|
|
1874
2091
|
{
|
|
1875
2092
|
path: CLONE_RELATIVE_PATH,
|
|
1876
2093
|
lazy: async () => {
|
|
1877
|
-
const { ProtectedEditViewPage: ProtectedEditViewPage2 } = await Promise.resolve().then(() => require("./EditViewPage-
|
|
2094
|
+
const { ProtectedEditViewPage: ProtectedEditViewPage2 } = await Promise.resolve().then(() => require("./EditViewPage-kkCJlZyh.js"));
|
|
1878
2095
|
return {
|
|
1879
2096
|
Component: ProtectedEditViewPage2
|
|
1880
2097
|
};
|
|
@@ -1883,7 +2100,7 @@ const routes = [
|
|
|
1883
2100
|
{
|
|
1884
2101
|
path: ":collectionType/:slug/configurations/list",
|
|
1885
2102
|
lazy: async () => {
|
|
1886
|
-
const { ProtectedListConfiguration } = await Promise.resolve().then(() => require("./ListConfigurationPage-
|
|
2103
|
+
const { ProtectedListConfiguration } = await Promise.resolve().then(() => require("./ListConfigurationPage-BXuW_9Wt.js"));
|
|
1887
2104
|
return {
|
|
1888
2105
|
Component: ProtectedListConfiguration
|
|
1889
2106
|
};
|
|
@@ -1892,7 +2109,7 @@ const routes = [
|
|
|
1892
2109
|
{
|
|
1893
2110
|
path: "components/:slug/configurations/edit",
|
|
1894
2111
|
lazy: async () => {
|
|
1895
|
-
const { ProtectedComponentConfigurationPage } = await Promise.resolve().then(() => require("./ComponentConfigurationPage-
|
|
2112
|
+
const { ProtectedComponentConfigurationPage } = await Promise.resolve().then(() => require("./ComponentConfigurationPage-JMCc1P7r.js"));
|
|
1896
2113
|
return {
|
|
1897
2114
|
Component: ProtectedComponentConfigurationPage
|
|
1898
2115
|
};
|
|
@@ -1901,7 +2118,7 @@ const routes = [
|
|
|
1901
2118
|
{
|
|
1902
2119
|
path: ":collectionType/:slug/configurations/edit",
|
|
1903
2120
|
lazy: async () => {
|
|
1904
|
-
const { ProtectedEditConfigurationPage } = await Promise.resolve().then(() => require("./EditConfigurationPage-
|
|
2121
|
+
const { ProtectedEditConfigurationPage } = await Promise.resolve().then(() => require("./EditConfigurationPage-PKHUVKGD.js"));
|
|
1905
2122
|
return {
|
|
1906
2123
|
Component: ProtectedEditConfigurationPage
|
|
1907
2124
|
};
|
|
@@ -1910,7 +2127,7 @@ const routes = [
|
|
|
1910
2127
|
{
|
|
1911
2128
|
path: "403",
|
|
1912
2129
|
lazy: async () => {
|
|
1913
|
-
const { NoPermissions: NoPermissions2 } = await Promise.resolve().then(() => require("./NoPermissionsPage-
|
|
2130
|
+
const { NoPermissions: NoPermissions2 } = await Promise.resolve().then(() => require("./NoPermissionsPage-q44k5VFX.js"));
|
|
1914
2131
|
return {
|
|
1915
2132
|
Component: NoPermissions2
|
|
1916
2133
|
};
|
|
@@ -1919,7 +2136,7 @@ const routes = [
|
|
|
1919
2136
|
{
|
|
1920
2137
|
path: "no-content-types",
|
|
1921
2138
|
lazy: async () => {
|
|
1922
|
-
const { NoContentType } = await Promise.resolve().then(() => require("./NoContentTypePage-
|
|
2139
|
+
const { NoContentType } = await Promise.resolve().then(() => require("./NoContentTypePage-Lbuve_Uu.js"));
|
|
1923
2140
|
return {
|
|
1924
2141
|
Component: NoContentType
|
|
1925
2142
|
};
|
|
@@ -1929,6 +2146,52 @@ const routes = [
|
|
|
1929
2146
|
]
|
|
1930
2147
|
}
|
|
1931
2148
|
];
|
|
2149
|
+
const useQueryParams = (initialParams) => {
|
|
2150
|
+
const { search } = reactRouterDom.useLocation();
|
|
2151
|
+
const navigate = reactRouterDom.useNavigate();
|
|
2152
|
+
const query = React.useMemo(() => {
|
|
2153
|
+
const searchQuery = search.startsWith("?") ? search.slice(1) : search;
|
|
2154
|
+
if (!search && initialParams) {
|
|
2155
|
+
return initialParams;
|
|
2156
|
+
}
|
|
2157
|
+
return { ...initialParams, ...qs.parse(searchQuery) };
|
|
2158
|
+
}, [search, initialParams]);
|
|
2159
|
+
const setQuery = React.useCallback(
|
|
2160
|
+
(nextParams, method = "push", replace = false) => {
|
|
2161
|
+
let nextQuery = { ...query };
|
|
2162
|
+
if (method === "remove") {
|
|
2163
|
+
Object.keys(nextParams).forEach((key) => {
|
|
2164
|
+
if (Object.prototype.hasOwnProperty.call(nextQuery, key)) {
|
|
2165
|
+
delete nextQuery[key];
|
|
2166
|
+
}
|
|
2167
|
+
});
|
|
2168
|
+
} else {
|
|
2169
|
+
nextQuery = { ...query, ...nextParams };
|
|
2170
|
+
}
|
|
2171
|
+
navigate({ search: qs.stringify(nextQuery, { encode: false }) }, { replace });
|
|
2172
|
+
},
|
|
2173
|
+
[navigate, query]
|
|
2174
|
+
);
|
|
2175
|
+
return [{ query, rawQuery: search }, setQuery];
|
|
2176
|
+
};
|
|
2177
|
+
const extractValuesFromYupError = (errorType, errorParams) => {
|
|
2178
|
+
if (!errorType || !errorParams) {
|
|
2179
|
+
return {};
|
|
2180
|
+
}
|
|
2181
|
+
return {
|
|
2182
|
+
[errorType]: errorParams[errorType]
|
|
2183
|
+
};
|
|
2184
|
+
};
|
|
2185
|
+
const getYupInnerErrors = (error) => (error?.inner || []).reduce((acc, currentError) => {
|
|
2186
|
+
if (currentError.path) {
|
|
2187
|
+
acc[currentError.path.split("[").join(".").split("]").join("")] = {
|
|
2188
|
+
id: currentError.message,
|
|
2189
|
+
defaultMessage: currentError.message,
|
|
2190
|
+
values: extractValuesFromYupError(currentError?.type, currentError?.params)
|
|
2191
|
+
};
|
|
2192
|
+
}
|
|
2193
|
+
return acc;
|
|
2194
|
+
}, {});
|
|
1932
2195
|
const contentManagerApi = react.createApi({
|
|
1933
2196
|
reducerPath: "contentManagerApi",
|
|
1934
2197
|
baseQuery: axiosBaseQuery(),
|
|
@@ -1938,7 +2201,8 @@ const contentManagerApi = react.createApi({
|
|
|
1938
2201
|
"ContentTypeSettings",
|
|
1939
2202
|
"Document",
|
|
1940
2203
|
"InitialData",
|
|
1941
|
-
"HistoryVersion"
|
|
2204
|
+
"HistoryVersion",
|
|
2205
|
+
"Relations"
|
|
1942
2206
|
],
|
|
1943
2207
|
endpoints: () => ({})
|
|
1944
2208
|
});
|
|
@@ -1978,7 +2242,10 @@ const documentApi = contentManagerApi.injectEndpoints({
|
|
|
1978
2242
|
params
|
|
1979
2243
|
}
|
|
1980
2244
|
}),
|
|
1981
|
-
invalidatesTags: (
|
|
2245
|
+
invalidatesTags: (result, _error, { model }) => [
|
|
2246
|
+
{ type: "Document", id: `${model}_LIST` },
|
|
2247
|
+
"Relations"
|
|
2248
|
+
]
|
|
1982
2249
|
}),
|
|
1983
2250
|
deleteDocument: builder.mutation({
|
|
1984
2251
|
query: ({ collectionType, model, documentId, params }) => ({
|
|
@@ -2014,7 +2281,8 @@ const documentApi = contentManagerApi.injectEndpoints({
|
|
|
2014
2281
|
type: "Document",
|
|
2015
2282
|
id: collectionType !== SINGLE_TYPES ? `${model}_${documentId}` : model
|
|
2016
2283
|
},
|
|
2017
|
-
{ type: "Document", id: `${model}_LIST` }
|
|
2284
|
+
{ type: "Document", id: `${model}_LIST` },
|
|
2285
|
+
"Relations"
|
|
2018
2286
|
];
|
|
2019
2287
|
}
|
|
2020
2288
|
}),
|
|
@@ -2102,7 +2370,8 @@ const documentApi = contentManagerApi.injectEndpoints({
|
|
|
2102
2370
|
type: "Document",
|
|
2103
2371
|
id: collectionType !== SINGLE_TYPES ? `${model}_${documentId}` : model
|
|
2104
2372
|
},
|
|
2105
|
-
{ type: "Document", id: `${model}_LIST` }
|
|
2373
|
+
{ type: "Document", id: `${model}_LIST` },
|
|
2374
|
+
"Relations"
|
|
2106
2375
|
];
|
|
2107
2376
|
}
|
|
2108
2377
|
}),
|
|
@@ -2128,7 +2397,8 @@ const documentApi = contentManagerApi.injectEndpoints({
|
|
|
2128
2397
|
{
|
|
2129
2398
|
type: "Document",
|
|
2130
2399
|
id: collectionType !== SINGLE_TYPES ? `${model}_${documentId}` : model
|
|
2131
|
-
}
|
|
2400
|
+
},
|
|
2401
|
+
"Relations"
|
|
2132
2402
|
];
|
|
2133
2403
|
}
|
|
2134
2404
|
}),
|
|
@@ -2474,7 +2744,7 @@ const initApi = contentManagerApi.injectEndpoints({
|
|
|
2474
2744
|
});
|
|
2475
2745
|
const { useGetInitialDataQuery } = initApi;
|
|
2476
2746
|
const useContentTypeSchema = (model) => {
|
|
2477
|
-
const toggleNotification =
|
|
2747
|
+
const { toggleNotification } = useNotification();
|
|
2478
2748
|
const { _unstableFormatAPIError: formatAPIError2 } = useAPIErrorHandler();
|
|
2479
2749
|
const { components, contentType, contentTypes, error, isLoading, isFetching } = useGetInitialDataQuery(void 0, {
|
|
2480
2750
|
selectFromResult: (res) => {
|
|
@@ -2500,7 +2770,7 @@ const useContentTypeSchema = (model) => {
|
|
|
2500
2770
|
React__namespace.useEffect(() => {
|
|
2501
2771
|
if (error) {
|
|
2502
2772
|
toggleNotification({
|
|
2503
|
-
type: "
|
|
2773
|
+
type: "danger",
|
|
2504
2774
|
message: formatAPIError2(error)
|
|
2505
2775
|
});
|
|
2506
2776
|
}
|
|
@@ -2544,7 +2814,7 @@ const extractContentTypeComponents = (attributes = {}, allComponents = {}) => {
|
|
|
2544
2814
|
return componentsByKey;
|
|
2545
2815
|
};
|
|
2546
2816
|
const useDocument = (args, opts) => {
|
|
2547
|
-
const toggleNotification =
|
|
2817
|
+
const { toggleNotification } = useNotification();
|
|
2548
2818
|
const { _unstableFormatAPIError: formatAPIError2 } = useAPIErrorHandler();
|
|
2549
2819
|
const {
|
|
2550
2820
|
currentData: data,
|
|
@@ -2556,7 +2826,7 @@ const useDocument = (args, opts) => {
|
|
|
2556
2826
|
React__namespace.useEffect(() => {
|
|
2557
2827
|
if (error) {
|
|
2558
2828
|
toggleNotification({
|
|
2559
|
-
type: "
|
|
2829
|
+
type: "danger",
|
|
2560
2830
|
message: formatAPIError2(error)
|
|
2561
2831
|
});
|
|
2562
2832
|
}
|
|
@@ -2579,7 +2849,7 @@ const useDocument = (args, opts) => {
|
|
|
2579
2849
|
return null;
|
|
2580
2850
|
} catch (error2) {
|
|
2581
2851
|
if (error2 instanceof yup.ValidationError) {
|
|
2582
|
-
return
|
|
2852
|
+
return getYupInnerErrors(error2);
|
|
2583
2853
|
}
|
|
2584
2854
|
throw error2;
|
|
2585
2855
|
}
|
|
@@ -2598,7 +2868,7 @@ const useDocument = (args, opts) => {
|
|
|
2598
2868
|
};
|
|
2599
2869
|
const useDoc = () => {
|
|
2600
2870
|
const { id, slug, collectionType, origin } = reactRouterDom.useParams();
|
|
2601
|
-
const [{ query }] =
|
|
2871
|
+
const [{ query }] = useQueryParams();
|
|
2602
2872
|
const params = React__namespace.useMemo(() => buildValidParams(query), [query]);
|
|
2603
2873
|
if (!collectionType) {
|
|
2604
2874
|
throw new Error("Could not find collectionType in url params");
|
|
@@ -2936,7 +3206,7 @@ const Form = React__namespace.forwardRef(
|
|
|
2936
3206
|
}
|
|
2937
3207
|
);
|
|
2938
3208
|
const isErrorYupValidationError = (err) => typeof err === "object" && err !== null && "name" in err && typeof err.name === "string" && err.name === "ValidationError";
|
|
2939
|
-
const reducer$3 = (state, action) =>
|
|
3209
|
+
const reducer$3 = (state, action) => immer.produce(state, (draft) => {
|
|
2940
3210
|
switch (action.type) {
|
|
2941
3211
|
case "SET_INITIAL_VALUES":
|
|
2942
3212
|
draft.values = action.payload;
|
|
@@ -3287,7 +3557,7 @@ const getDisplayName = ({
|
|
|
3287
3557
|
}
|
|
3288
3558
|
).trim();
|
|
3289
3559
|
}
|
|
3290
|
-
return email;
|
|
3560
|
+
return email ?? "";
|
|
3291
3561
|
};
|
|
3292
3562
|
const reviewWorkflowsApi = adminApi.injectEndpoints({
|
|
3293
3563
|
endpoints: (builder) => ({
|
|
@@ -3402,7 +3672,7 @@ const AssigneeSelect = () => {
|
|
|
3402
3672
|
const permissions = useTypedSelector((state) => state.admin_app.permissions);
|
|
3403
3673
|
const { formatMessage } = reactIntl.useIntl();
|
|
3404
3674
|
const { _unstableFormatAPIError: formatAPIError2 } = useAPIErrorHandler();
|
|
3405
|
-
const toggleNotification =
|
|
3675
|
+
const { toggleNotification } = useNotification();
|
|
3406
3676
|
const {
|
|
3407
3677
|
allowedActions: { canRead },
|
|
3408
3678
|
isLoading: isLoadingPermissions
|
|
@@ -3430,10 +3700,10 @@ const AssigneeSelect = () => {
|
|
|
3430
3700
|
field.onChange(ASSIGNEE_ATTRIBUTE_NAME, res.data[ASSIGNEE_ATTRIBUTE_NAME]);
|
|
3431
3701
|
toggleNotification({
|
|
3432
3702
|
type: "success",
|
|
3433
|
-
message: {
|
|
3703
|
+
message: formatMessage({
|
|
3434
3704
|
id: "content-manager.reviewWorkflows.assignee.notification.saved",
|
|
3435
3705
|
defaultMessage: "Assignee updated"
|
|
3436
|
-
}
|
|
3706
|
+
})
|
|
3437
3707
|
});
|
|
3438
3708
|
}
|
|
3439
3709
|
};
|
|
@@ -3625,7 +3895,7 @@ const StageSelect = () => {
|
|
|
3625
3895
|
const { collectionType, model, id } = useDoc();
|
|
3626
3896
|
const { formatMessage } = reactIntl.useIntl();
|
|
3627
3897
|
const { _unstableFormatAPIError: formatAPIError2 } = useAPIErrorHandler();
|
|
3628
|
-
const toggleNotification =
|
|
3898
|
+
const { toggleNotification } = useNotification();
|
|
3629
3899
|
const { data, isLoading } = useGetStagesQuery(
|
|
3630
3900
|
{
|
|
3631
3901
|
slug: collectionType,
|
|
@@ -3661,10 +3931,10 @@ const StageSelect = () => {
|
|
|
3661
3931
|
field.onChange(STAGE_ATTRIBUTE_NAME, res.data[STAGE_ATTRIBUTE_NAME]);
|
|
3662
3932
|
toggleNotification({
|
|
3663
3933
|
type: "success",
|
|
3664
|
-
message: {
|
|
3934
|
+
message: formatMessage({
|
|
3665
3935
|
id: "content-manager.reviewWorkflows.stage.notification.saved",
|
|
3666
3936
|
defaultMessage: "Review stage updated"
|
|
3667
|
-
}
|
|
3937
|
+
})
|
|
3668
3938
|
});
|
|
3669
3939
|
}
|
|
3670
3940
|
}
|
|
@@ -3802,7 +4072,7 @@ const StyledHistory = styled__default.default(Icons.History)`
|
|
|
3802
4072
|
`;
|
|
3803
4073
|
const HistoryAction = ({ model, document: document2 }) => {
|
|
3804
4074
|
const { formatMessage } = reactIntl.useIntl();
|
|
3805
|
-
const [{ query }] =
|
|
4075
|
+
const [{ query }] = useQueryParams();
|
|
3806
4076
|
const navigate = reactRouterDom.useNavigate();
|
|
3807
4077
|
const pluginsQueryParams = qs.stringify({ plugins: query.plugins }, { encode: false });
|
|
3808
4078
|
if (!window.strapi.future.isEnabled("history")) {
|
|
@@ -3922,7 +4192,8 @@ const DEFAULT_UNEXPECTED_ERROR_MSG = {
|
|
|
3922
4192
|
defaultMessage: "An error occurred, please try again"
|
|
3923
4193
|
};
|
|
3924
4194
|
const useDocumentActions = () => {
|
|
3925
|
-
const toggleNotification =
|
|
4195
|
+
const { toggleNotification } = useNotification();
|
|
4196
|
+
const { formatMessage } = reactIntl.useIntl();
|
|
3926
4197
|
const { trackUsage } = useTracking();
|
|
3927
4198
|
const { _unstableFormatAPIError: formatAPIError2 } = useAPIErrorHandler();
|
|
3928
4199
|
const [deleteDocument] = useDeleteDocumentMutation();
|
|
@@ -3938,30 +4209,30 @@ const useDocumentActions = () => {
|
|
|
3938
4209
|
});
|
|
3939
4210
|
if ("error" in res) {
|
|
3940
4211
|
toggleNotification({
|
|
3941
|
-
type: "
|
|
4212
|
+
type: "danger",
|
|
3942
4213
|
message: formatAPIError2(res.error)
|
|
3943
4214
|
});
|
|
3944
4215
|
return { error: res.error };
|
|
3945
4216
|
}
|
|
3946
4217
|
toggleNotification({
|
|
3947
4218
|
type: "success",
|
|
3948
|
-
message: {
|
|
4219
|
+
message: formatMessage({
|
|
3949
4220
|
id: getTranslation("success.record.delete"),
|
|
3950
4221
|
defaultMessage: "Deleted document"
|
|
3951
|
-
}
|
|
4222
|
+
})
|
|
3952
4223
|
});
|
|
3953
4224
|
trackUsage("didDeleteEntry", trackerProperty);
|
|
3954
4225
|
return res.data;
|
|
3955
4226
|
} catch (err) {
|
|
3956
4227
|
toggleNotification({
|
|
3957
|
-
type: "
|
|
3958
|
-
message: DEFAULT_UNEXPECTED_ERROR_MSG
|
|
4228
|
+
type: "danger",
|
|
4229
|
+
message: formatMessage(DEFAULT_UNEXPECTED_ERROR_MSG)
|
|
3959
4230
|
});
|
|
3960
4231
|
trackUsage("didNotDeleteEntry", { error: err, ...trackerProperty });
|
|
3961
4232
|
throw err;
|
|
3962
4233
|
}
|
|
3963
4234
|
},
|
|
3964
|
-
[trackUsage, deleteDocument, toggleNotification, formatAPIError2]
|
|
4235
|
+
[trackUsage, deleteDocument, toggleNotification, formatMessage, formatAPIError2]
|
|
3965
4236
|
);
|
|
3966
4237
|
const [discardDocument] = useDiscardDocumentMutation();
|
|
3967
4238
|
const discard = React__namespace.useCallback(
|
|
@@ -3974,28 +4245,28 @@ const useDocumentActions = () => {
|
|
|
3974
4245
|
});
|
|
3975
4246
|
if ("error" in res) {
|
|
3976
4247
|
toggleNotification({
|
|
3977
|
-
type: "
|
|
4248
|
+
type: "danger",
|
|
3978
4249
|
message: formatAPIError2(res.error)
|
|
3979
4250
|
});
|
|
3980
4251
|
return { error: res.error };
|
|
3981
4252
|
}
|
|
3982
4253
|
toggleNotification({
|
|
3983
4254
|
type: "success",
|
|
3984
|
-
message: {
|
|
4255
|
+
message: formatMessage({
|
|
3985
4256
|
id: "content-manager.success.record.discard",
|
|
3986
4257
|
defaultMessage: "Changes discarded"
|
|
3987
|
-
}
|
|
4258
|
+
})
|
|
3988
4259
|
});
|
|
3989
4260
|
return res.data;
|
|
3990
4261
|
} catch (err) {
|
|
3991
4262
|
toggleNotification({
|
|
3992
|
-
type: "
|
|
3993
|
-
message: DEFAULT_UNEXPECTED_ERROR_MSG
|
|
4263
|
+
type: "danger",
|
|
4264
|
+
message: formatMessage(DEFAULT_UNEXPECTED_ERROR_MSG)
|
|
3994
4265
|
});
|
|
3995
4266
|
throw err;
|
|
3996
4267
|
}
|
|
3997
4268
|
},
|
|
3998
|
-
[discardDocument, formatAPIError2, toggleNotification]
|
|
4269
|
+
[discardDocument, formatAPIError2, formatMessage, toggleNotification]
|
|
3999
4270
|
);
|
|
4000
4271
|
const [publishDocument] = usePublishDocumentMutation();
|
|
4001
4272
|
const publish = React__namespace.useCallback(
|
|
@@ -4010,27 +4281,27 @@ const useDocumentActions = () => {
|
|
|
4010
4281
|
params
|
|
4011
4282
|
});
|
|
4012
4283
|
if ("error" in res) {
|
|
4013
|
-
toggleNotification({ type: "
|
|
4284
|
+
toggleNotification({ type: "danger", message: formatAPIError2(res.error) });
|
|
4014
4285
|
return { error: res.error };
|
|
4015
4286
|
}
|
|
4016
4287
|
trackUsage("didPublishEntry");
|
|
4017
4288
|
toggleNotification({
|
|
4018
4289
|
type: "success",
|
|
4019
|
-
message: {
|
|
4290
|
+
message: formatMessage({
|
|
4020
4291
|
id: getTranslation("success.record.publish"),
|
|
4021
4292
|
defaultMessage: "Published document"
|
|
4022
|
-
}
|
|
4293
|
+
})
|
|
4023
4294
|
});
|
|
4024
4295
|
return res.data;
|
|
4025
4296
|
} catch (err) {
|
|
4026
4297
|
toggleNotification({
|
|
4027
|
-
type: "
|
|
4028
|
-
message: DEFAULT_UNEXPECTED_ERROR_MSG
|
|
4298
|
+
type: "danger",
|
|
4299
|
+
message: formatMessage(DEFAULT_UNEXPECTED_ERROR_MSG)
|
|
4029
4300
|
});
|
|
4030
4301
|
throw err;
|
|
4031
4302
|
}
|
|
4032
4303
|
},
|
|
4033
|
-
[trackUsage, publishDocument, toggleNotification, formatAPIError2]
|
|
4304
|
+
[trackUsage, publishDocument, toggleNotification, formatMessage, formatAPIError2]
|
|
4034
4305
|
);
|
|
4035
4306
|
const [updateDocument] = useUpdateDocumentMutation();
|
|
4036
4307
|
const update = React__namespace.useCallback(
|
|
@@ -4045,26 +4316,29 @@ const useDocumentActions = () => {
|
|
|
4045
4316
|
params
|
|
4046
4317
|
});
|
|
4047
4318
|
if ("error" in res) {
|
|
4048
|
-
toggleNotification({ type: "
|
|
4319
|
+
toggleNotification({ type: "danger", message: formatAPIError2(res.error) });
|
|
4049
4320
|
trackUsage("didNotEditEntry", { error: res.error, ...trackerProperty });
|
|
4050
4321
|
return { error: res.error };
|
|
4051
4322
|
}
|
|
4052
4323
|
trackUsage("didEditEntry", trackerProperty);
|
|
4053
4324
|
toggleNotification({
|
|
4054
4325
|
type: "success",
|
|
4055
|
-
message: {
|
|
4326
|
+
message: formatMessage({
|
|
4327
|
+
id: getTranslation("success.record.save"),
|
|
4328
|
+
defaultMessage: "Saved document"
|
|
4329
|
+
})
|
|
4056
4330
|
});
|
|
4057
4331
|
return res.data;
|
|
4058
4332
|
} catch (err) {
|
|
4059
4333
|
trackUsage("didNotEditEntry", { error: err, ...trackerProperty });
|
|
4060
4334
|
toggleNotification({
|
|
4061
|
-
type: "
|
|
4062
|
-
message: DEFAULT_UNEXPECTED_ERROR_MSG
|
|
4335
|
+
type: "danger",
|
|
4336
|
+
message: formatMessage(DEFAULT_UNEXPECTED_ERROR_MSG)
|
|
4063
4337
|
});
|
|
4064
4338
|
throw err;
|
|
4065
4339
|
}
|
|
4066
4340
|
},
|
|
4067
|
-
[trackUsage, updateDocument, toggleNotification, formatAPIError2]
|
|
4341
|
+
[trackUsage, updateDocument, toggleNotification, formatMessage, formatAPIError2]
|
|
4068
4342
|
);
|
|
4069
4343
|
const [unpublishDocument] = useUnpublishDocumentMutation();
|
|
4070
4344
|
const unpublish = React__namespace.useCallback(
|
|
@@ -4081,27 +4355,27 @@ const useDocumentActions = () => {
|
|
|
4081
4355
|
}
|
|
4082
4356
|
});
|
|
4083
4357
|
if ("error" in res) {
|
|
4084
|
-
toggleNotification({ type: "
|
|
4358
|
+
toggleNotification({ type: "danger", message: formatAPIError2(res.error) });
|
|
4085
4359
|
return { error: res.error };
|
|
4086
4360
|
}
|
|
4087
4361
|
trackUsage("didUnpublishEntry");
|
|
4088
4362
|
toggleNotification({
|
|
4089
4363
|
type: "success",
|
|
4090
|
-
message: {
|
|
4364
|
+
message: formatMessage({
|
|
4091
4365
|
id: getTranslation("success.record.unpublish"),
|
|
4092
4366
|
defaultMessage: "Unpublished document"
|
|
4093
|
-
}
|
|
4367
|
+
})
|
|
4094
4368
|
});
|
|
4095
4369
|
return res.data;
|
|
4096
4370
|
} catch (err) {
|
|
4097
4371
|
toggleNotification({
|
|
4098
|
-
type: "
|
|
4099
|
-
message: DEFAULT_UNEXPECTED_ERROR_MSG
|
|
4372
|
+
type: "danger",
|
|
4373
|
+
message: formatMessage(DEFAULT_UNEXPECTED_ERROR_MSG)
|
|
4100
4374
|
});
|
|
4101
4375
|
throw err;
|
|
4102
4376
|
}
|
|
4103
4377
|
},
|
|
4104
|
-
[trackUsage, unpublishDocument, toggleNotification, formatAPIError2]
|
|
4378
|
+
[trackUsage, unpublishDocument, toggleNotification, formatMessage, formatAPIError2]
|
|
4105
4379
|
);
|
|
4106
4380
|
const [createDocument] = useCreateDocumentMutation();
|
|
4107
4381
|
const create = React__namespace.useCallback(
|
|
@@ -4113,26 +4387,29 @@ const useDocumentActions = () => {
|
|
|
4113
4387
|
params
|
|
4114
4388
|
});
|
|
4115
4389
|
if ("error" in res) {
|
|
4116
|
-
toggleNotification({ type: "
|
|
4390
|
+
toggleNotification({ type: "danger", message: formatAPIError2(res.error) });
|
|
4117
4391
|
trackUsage("didNotCreateEntry", { error: res.error, ...trackerProperty });
|
|
4118
4392
|
return { error: res.error };
|
|
4119
4393
|
}
|
|
4120
4394
|
trackUsage("didCreateEntry", trackerProperty);
|
|
4121
4395
|
toggleNotification({
|
|
4122
4396
|
type: "success",
|
|
4123
|
-
message: {
|
|
4397
|
+
message: formatMessage({
|
|
4398
|
+
id: getTranslation("success.record.save"),
|
|
4399
|
+
defaultMessage: "Saved document"
|
|
4400
|
+
})
|
|
4124
4401
|
});
|
|
4125
4402
|
return res.data;
|
|
4126
4403
|
} catch (err) {
|
|
4127
4404
|
toggleNotification({
|
|
4128
|
-
type: "
|
|
4129
|
-
message: DEFAULT_UNEXPECTED_ERROR_MSG
|
|
4405
|
+
type: "danger",
|
|
4406
|
+
message: formatMessage(DEFAULT_UNEXPECTED_ERROR_MSG)
|
|
4130
4407
|
});
|
|
4131
4408
|
trackUsage("didNotCreateEntry", { error: err, ...trackerProperty });
|
|
4132
4409
|
throw err;
|
|
4133
4410
|
}
|
|
4134
4411
|
},
|
|
4135
|
-
[createDocument, formatAPIError2, toggleNotification, trackUsage]
|
|
4412
|
+
[createDocument, formatAPIError2, formatMessage, toggleNotification, trackUsage]
|
|
4136
4413
|
);
|
|
4137
4414
|
const [autoCloneDocument] = useAutoCloneDocumentMutation();
|
|
4138
4415
|
const autoClone = React__namespace.useCallback(
|
|
@@ -4143,26 +4420,26 @@ const useDocumentActions = () => {
|
|
|
4143
4420
|
sourceId
|
|
4144
4421
|
});
|
|
4145
4422
|
if ("error" in res) {
|
|
4146
|
-
toggleNotification({ type: "
|
|
4423
|
+
toggleNotification({ type: "danger", message: formatAPIError2(res.error) });
|
|
4147
4424
|
return { error: res.error };
|
|
4148
4425
|
}
|
|
4149
4426
|
toggleNotification({
|
|
4150
4427
|
type: "success",
|
|
4151
|
-
message: {
|
|
4428
|
+
message: formatMessage({
|
|
4152
4429
|
id: getTranslation("success.record.clone"),
|
|
4153
4430
|
defaultMessage: "Cloned document"
|
|
4154
|
-
}
|
|
4431
|
+
})
|
|
4155
4432
|
});
|
|
4156
4433
|
return res.data;
|
|
4157
4434
|
} catch (err) {
|
|
4158
4435
|
toggleNotification({
|
|
4159
|
-
type: "
|
|
4160
|
-
message: DEFAULT_UNEXPECTED_ERROR_MSG
|
|
4436
|
+
type: "danger",
|
|
4437
|
+
message: formatMessage(DEFAULT_UNEXPECTED_ERROR_MSG)
|
|
4161
4438
|
});
|
|
4162
4439
|
throw err;
|
|
4163
4440
|
}
|
|
4164
4441
|
},
|
|
4165
|
-
[autoCloneDocument, formatAPIError2, toggleNotification]
|
|
4442
|
+
[autoCloneDocument, formatAPIError2, formatMessage, toggleNotification]
|
|
4166
4443
|
);
|
|
4167
4444
|
const [cloneDocument] = useCloneDocumentMutation();
|
|
4168
4445
|
const clone2 = React__namespace.useCallback(
|
|
@@ -4176,29 +4453,29 @@ const useDocumentActions = () => {
|
|
|
4176
4453
|
params
|
|
4177
4454
|
});
|
|
4178
4455
|
if ("error" in res) {
|
|
4179
|
-
toggleNotification({ type: "
|
|
4456
|
+
toggleNotification({ type: "danger", message: formatAPIError2(res.error) });
|
|
4180
4457
|
trackUsage("didNotCreateEntry", { error: res.error, ...trackerProperty });
|
|
4181
4458
|
return { error: res.error };
|
|
4182
4459
|
}
|
|
4183
4460
|
trackUsage("didCreateEntry", trackerProperty);
|
|
4184
4461
|
toggleNotification({
|
|
4185
4462
|
type: "success",
|
|
4186
|
-
message: {
|
|
4463
|
+
message: formatMessage({
|
|
4187
4464
|
id: getTranslation("success.record.clone"),
|
|
4188
4465
|
defaultMessage: "Cloned document"
|
|
4189
|
-
}
|
|
4466
|
+
})
|
|
4190
4467
|
});
|
|
4191
4468
|
return res.data;
|
|
4192
4469
|
} catch (err) {
|
|
4193
4470
|
toggleNotification({
|
|
4194
|
-
type: "
|
|
4195
|
-
message: DEFAULT_UNEXPECTED_ERROR_MSG
|
|
4471
|
+
type: "danger",
|
|
4472
|
+
message: formatMessage(DEFAULT_UNEXPECTED_ERROR_MSG)
|
|
4196
4473
|
});
|
|
4197
4474
|
trackUsage("didNotCreateEntry", { error: err, ...trackerProperty });
|
|
4198
4475
|
throw err;
|
|
4199
4476
|
}
|
|
4200
4477
|
},
|
|
4201
|
-
[cloneDocument, trackUsage, toggleNotification, formatAPIError2]
|
|
4478
|
+
[cloneDocument, trackUsage, toggleNotification, formatMessage, formatAPIError2]
|
|
4202
4479
|
);
|
|
4203
4480
|
const [getDoc] = useLazyGetDocumentQuery();
|
|
4204
4481
|
const getDocument = React__namespace.useCallback(
|
|
@@ -4257,7 +4534,7 @@ const DocumentActions = ({ actions: actions2 }) => {
|
|
|
4257
4534
|
};
|
|
4258
4535
|
const DocumentActionButton = (action) => {
|
|
4259
4536
|
const [dialogId, setDialogId] = React__namespace.useState(null);
|
|
4260
|
-
const toggleNotification =
|
|
4537
|
+
const { toggleNotification } = useNotification();
|
|
4261
4538
|
const handleClick = (action2) => async (e) => {
|
|
4262
4539
|
const { onClick = () => false, dialog, id } = action2;
|
|
4263
4540
|
const muteDialog = await onClick(e);
|
|
@@ -4323,7 +4600,7 @@ const DocumentActionsMenu = ({
|
|
|
4323
4600
|
const [isOpen, setIsOpen] = React__namespace.useState(false);
|
|
4324
4601
|
const [dialogId, setDialogId] = React__namespace.useState(null);
|
|
4325
4602
|
const { formatMessage } = reactIntl.useIntl();
|
|
4326
|
-
const toggleNotification =
|
|
4603
|
+
const { toggleNotification } = useNotification();
|
|
4327
4604
|
const isDisabled = actions2.every((action) => action.disabled) || actions2.length === 0;
|
|
4328
4605
|
const handleClick = (action) => async (e) => {
|
|
4329
4606
|
const { onClick = () => false, dialog, id } = action;
|
|
@@ -4526,7 +4803,7 @@ const PublishAction = ({
|
|
|
4526
4803
|
}) => {
|
|
4527
4804
|
const { schema } = useDoc();
|
|
4528
4805
|
const navigate = reactRouterDom.useNavigate();
|
|
4529
|
-
const toggleNotification =
|
|
4806
|
+
const { toggleNotification } = useNotification();
|
|
4530
4807
|
const { _unstableFormatValidationErrors: formatValidationErrors } = useAPIErrorHandler();
|
|
4531
4808
|
const isCloning = reactRouterDom.useMatch(CLONE_PATH) !== null;
|
|
4532
4809
|
const { formatMessage } = reactIntl.useIntl();
|
|
@@ -4535,7 +4812,7 @@ const PublishAction = ({
|
|
|
4535
4812
|
({ canPublish: canPublish2, canCreate: canCreate2, canUpdate: canUpdate2 }) => ({ canPublish: canPublish2, canCreate: canCreate2, canUpdate: canUpdate2 })
|
|
4536
4813
|
);
|
|
4537
4814
|
const { publish } = useDocumentActions();
|
|
4538
|
-
const [{ query, rawQuery }] =
|
|
4815
|
+
const [{ query, rawQuery }] = useQueryParams();
|
|
4539
4816
|
const params = React__namespace.useMemo(() => buildValidParams(query), [query]);
|
|
4540
4817
|
const modified = useForm("PublishAction", ({ modified: modified2 }) => modified2);
|
|
4541
4818
|
const setSubmitting = useForm("PublishAction", ({ setSubmitting: setSubmitting2 }) => setSubmitting2);
|
|
@@ -4570,11 +4847,11 @@ const PublishAction = ({
|
|
|
4570
4847
|
const { errors } = await validate();
|
|
4571
4848
|
if (errors) {
|
|
4572
4849
|
toggleNotification({
|
|
4573
|
-
type: "
|
|
4574
|
-
message: {
|
|
4850
|
+
type: "danger",
|
|
4851
|
+
message: formatMessage({
|
|
4575
4852
|
id: "content-manager.validation.error",
|
|
4576
4853
|
defaultMessage: "There are validation errors in your document. Please fix them before saving."
|
|
4577
|
-
}
|
|
4854
|
+
})
|
|
4578
4855
|
});
|
|
4579
4856
|
return;
|
|
4580
4857
|
}
|
|
@@ -4609,7 +4886,7 @@ const UpdateAction = ({
|
|
|
4609
4886
|
collectionType
|
|
4610
4887
|
}) => {
|
|
4611
4888
|
const navigate = reactRouterDom.useNavigate();
|
|
4612
|
-
const toggleNotification =
|
|
4889
|
+
const { toggleNotification } = useNotification();
|
|
4613
4890
|
const { _unstableFormatValidationErrors: formatValidationErrors } = useAPIErrorHandler();
|
|
4614
4891
|
const cloneMatch = reactRouterDom.useMatch(CLONE_PATH);
|
|
4615
4892
|
const isCloning = cloneMatch !== null;
|
|
@@ -4619,7 +4896,7 @@ const UpdateAction = ({
|
|
|
4619
4896
|
canUpdate: canUpdate2
|
|
4620
4897
|
}));
|
|
4621
4898
|
const { create, update, clone: clone2 } = useDocumentActions();
|
|
4622
|
-
const [{ query, rawQuery }] =
|
|
4899
|
+
const [{ query, rawQuery }] = useQueryParams();
|
|
4623
4900
|
const params = React__namespace.useMemo(() => buildValidParams(query), [query]);
|
|
4624
4901
|
const isSubmitting = useForm("UpdateAction", ({ isSubmitting: isSubmitting2 }) => isSubmitting2);
|
|
4625
4902
|
const modified = useForm("UpdateAction", ({ modified: modified2 }) => modified2);
|
|
@@ -4627,6 +4904,7 @@ const UpdateAction = ({
|
|
|
4627
4904
|
const document2 = useForm("UpdateAction", ({ values }) => values);
|
|
4628
4905
|
const validate = useForm("UpdateAction", (state) => state.validate);
|
|
4629
4906
|
const setErrors = useForm("UpdateAction", (state) => state.setErrors);
|
|
4907
|
+
const resetForm = useForm("PublishAction", ({ resetForm: resetForm2 }) => resetForm2);
|
|
4630
4908
|
return {
|
|
4631
4909
|
/**
|
|
4632
4910
|
* Disabled when:
|
|
@@ -4647,11 +4925,11 @@ const UpdateAction = ({
|
|
|
4647
4925
|
const { errors } = await validate();
|
|
4648
4926
|
if (errors) {
|
|
4649
4927
|
toggleNotification({
|
|
4650
|
-
type: "
|
|
4651
|
-
message: {
|
|
4928
|
+
type: "danger",
|
|
4929
|
+
message: formatMessage({
|
|
4652
4930
|
id: "content-manager.validation.error",
|
|
4653
4931
|
defaultMessage: "There are validation errors in your document. Please fix them before saving."
|
|
4654
|
-
}
|
|
4932
|
+
})
|
|
4655
4933
|
});
|
|
4656
4934
|
return;
|
|
4657
4935
|
}
|
|
@@ -4684,6 +4962,8 @@ const UpdateAction = ({
|
|
|
4684
4962
|
);
|
|
4685
4963
|
if ("error" in res && isBaseQueryError(res.error) && res.error.name === "ValidationError") {
|
|
4686
4964
|
setErrors(formatValidationErrors(res.error));
|
|
4965
|
+
} else {
|
|
4966
|
+
resetForm();
|
|
4687
4967
|
}
|
|
4688
4968
|
} else {
|
|
4689
4969
|
const res = await create(
|
|
@@ -4724,9 +5004,9 @@ const UnpublishAction = ({
|
|
|
4724
5004
|
const { schema } = useDoc();
|
|
4725
5005
|
const canPublish = useDocumentRBAC("UnpublishAction", ({ canPublish: canPublish2 }) => canPublish2);
|
|
4726
5006
|
const { unpublish } = useDocumentActions();
|
|
4727
|
-
const [{ query }] =
|
|
5007
|
+
const [{ query }] = useQueryParams();
|
|
4728
5008
|
const params = React__namespace.useMemo(() => buildValidParams(query), [query]);
|
|
4729
|
-
const toggleNotification =
|
|
5009
|
+
const { toggleNotification } = useNotification();
|
|
4730
5010
|
const [shouldKeepDraft, setShouldKeepDraft] = React__namespace.useState(true);
|
|
4731
5011
|
const isDocumentModified = document2?.status === "modified";
|
|
4732
5012
|
const handleChange = (e) => {
|
|
@@ -4755,7 +5035,7 @@ const UnpublishAction = ({
|
|
|
4755
5035
|
id: "content-manager.actions.unpublish.error",
|
|
4756
5036
|
defaultMessage: "An error occurred while trying to unpublish the document."
|
|
4757
5037
|
}),
|
|
4758
|
-
type: "
|
|
5038
|
+
type: "danger"
|
|
4759
5039
|
});
|
|
4760
5040
|
}
|
|
4761
5041
|
return;
|
|
@@ -4829,7 +5109,7 @@ const UnpublishAction = ({
|
|
|
4829
5109
|
id: "content-manager.actions.unpublish.error",
|
|
4830
5110
|
defaultMessage: "An error occurred while trying to unpublish the document."
|
|
4831
5111
|
}),
|
|
4832
|
-
type: "
|
|
5112
|
+
type: "danger"
|
|
4833
5113
|
});
|
|
4834
5114
|
}
|
|
4835
5115
|
await unpublish(
|
|
@@ -4859,7 +5139,7 @@ const DiscardAction = ({
|
|
|
4859
5139
|
const { schema } = useDoc();
|
|
4860
5140
|
const canUpdate = useDocumentRBAC("DiscardAction", ({ canUpdate: canUpdate2 }) => canUpdate2);
|
|
4861
5141
|
const { discard } = useDocumentActions();
|
|
4862
|
-
const [{ query }] =
|
|
5142
|
+
const [{ query }] = useQueryParams();
|
|
4863
5143
|
const params = React__namespace.useMemo(() => buildValidParams(query), [query]);
|
|
4864
5144
|
if (!schema?.options?.draftAndPublish) {
|
|
4865
5145
|
return null;
|
|
@@ -5100,7 +5380,7 @@ const HeaderToolbar = () => {
|
|
|
5100
5380
|
{
|
|
5101
5381
|
query: { status = "draft" }
|
|
5102
5382
|
}
|
|
5103
|
-
] =
|
|
5383
|
+
] = useQueryParams();
|
|
5104
5384
|
const { model, id, document: document2, meta, collectionType } = useDoc();
|
|
5105
5385
|
const plugins = useStrapiApp("HeaderToolbar", (state) => state.plugins);
|
|
5106
5386
|
return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, children: [
|
|
@@ -5324,7 +5604,7 @@ const DeleteAction = ({ documentId, model, collectionType, document: document2 }
|
|
|
5324
5604
|
const listViewPathMatch = reactRouterDom.useMatch(LIST_PATH);
|
|
5325
5605
|
const canDelete = useDocumentRBAC("DeleteAction", (state) => state.canDelete);
|
|
5326
5606
|
const { delete: deleteAction } = useDocumentActions();
|
|
5327
|
-
const toggleNotification =
|
|
5607
|
+
const { toggleNotification } = useNotification();
|
|
5328
5608
|
const setSubmitting = useForm("DeleteAction", (state) => state.setSubmitting);
|
|
5329
5609
|
return {
|
|
5330
5610
|
disabled: !canDelete || !document2,
|
|
@@ -5360,7 +5640,7 @@ const DeleteAction = ({ documentId, model, collectionType, document: document2 }
|
|
|
5360
5640
|
id: "content-manager.actions.delete.error",
|
|
5361
5641
|
defaultMessage: "An error occurred while trying to delete the document."
|
|
5362
5642
|
}),
|
|
5363
|
-
type: "
|
|
5643
|
+
type: "danger"
|
|
5364
5644
|
});
|
|
5365
5645
|
return;
|
|
5366
5646
|
}
|
|
@@ -5399,7 +5679,7 @@ const Panels = () => {
|
|
|
5399
5679
|
{
|
|
5400
5680
|
query: { status }
|
|
5401
5681
|
}
|
|
5402
|
-
] =
|
|
5682
|
+
] = useQueryParams({
|
|
5403
5683
|
status: "draft"
|
|
5404
5684
|
});
|
|
5405
5685
|
const { model, id, document: document2, meta, collectionType } = useDoc();
|
|
@@ -5438,7 +5718,7 @@ const ActionsPanelContent = () => {
|
|
|
5438
5718
|
{
|
|
5439
5719
|
query: { status = "draft" }
|
|
5440
5720
|
}
|
|
5441
|
-
] =
|
|
5721
|
+
] = useQueryParams();
|
|
5442
5722
|
const { model, id, document: document2, meta, collectionType } = useDoc();
|
|
5443
5723
|
const plugins = useStrapiApp("ActionsPanel", (state) => state.plugins);
|
|
5444
5724
|
const props = {
|
|
@@ -5582,8 +5862,8 @@ const EditAction = ({ documentId }) => {
|
|
|
5582
5862
|
const navigate = reactRouterDom.useNavigate();
|
|
5583
5863
|
const { formatMessage } = reactIntl.useIntl();
|
|
5584
5864
|
const { canRead } = useDocumentRBAC("EditAction", ({ canRead: canRead2 }) => ({ canRead: canRead2 }));
|
|
5585
|
-
const toggleNotification =
|
|
5586
|
-
const [{ query }] =
|
|
5865
|
+
const { toggleNotification } = useNotification();
|
|
5866
|
+
const [{ query }] = useQueryParams();
|
|
5587
5867
|
return {
|
|
5588
5868
|
disabled: !canRead,
|
|
5589
5869
|
icon: /* @__PURE__ */ jsxRuntime.jsx(StyledPencil, {}),
|
|
@@ -5602,7 +5882,7 @@ const EditAction = ({ documentId }) => {
|
|
|
5602
5882
|
id: "content-manager.actions.edit.error",
|
|
5603
5883
|
defaultMessage: "An error occurred while trying to edit the document."
|
|
5604
5884
|
}),
|
|
5605
|
-
type: "
|
|
5885
|
+
type: "danger"
|
|
5606
5886
|
});
|
|
5607
5887
|
return;
|
|
5608
5888
|
}
|
|
@@ -5625,7 +5905,7 @@ const CloneAction = ({ model, documentId }) => {
|
|
|
5625
5905
|
const navigate = reactRouterDom.useNavigate();
|
|
5626
5906
|
const { formatMessage } = reactIntl.useIntl();
|
|
5627
5907
|
const { canCreate } = useDocumentRBAC("CloneAction", ({ canCreate: canCreate2 }) => ({ canCreate: canCreate2 }));
|
|
5628
|
-
const toggleNotification =
|
|
5908
|
+
const { toggleNotification } = useNotification();
|
|
5629
5909
|
const { autoClone } = useDocumentActions();
|
|
5630
5910
|
const [prohibitedFields, setProhibitedFields] = React__namespace.useState([]);
|
|
5631
5911
|
return {
|
|
@@ -5646,7 +5926,7 @@ const CloneAction = ({ model, documentId }) => {
|
|
|
5646
5926
|
id: "content-manager.actions.clone.error",
|
|
5647
5927
|
defaultMessage: "An error occurred while trying to clone the document."
|
|
5648
5928
|
}),
|
|
5649
|
-
type: "
|
|
5929
|
+
type: "danger"
|
|
5650
5930
|
});
|
|
5651
5931
|
return;
|
|
5652
5932
|
}
|
|
@@ -5929,7 +6209,7 @@ const setPermissionsAction = (permissions) => ({
|
|
|
5929
6209
|
type: SET_PERMISSIONS,
|
|
5930
6210
|
permissions
|
|
5931
6211
|
});
|
|
5932
|
-
const RBACReducer = (state = initialState$2, action) =>
|
|
6212
|
+
const RBACReducer = (state = initialState$2, action) => immer.produce(state, (draftState) => {
|
|
5933
6213
|
switch (action.type) {
|
|
5934
6214
|
case SET_PERMISSIONS: {
|
|
5935
6215
|
draftState.allPermissions = action.permissions;
|
|
@@ -6105,6 +6385,27 @@ const ToggleButton = styled__default.default.button`
|
|
|
6105
6385
|
text-align: unset;
|
|
6106
6386
|
padding: 0;
|
|
6107
6387
|
`;
|
|
6388
|
+
const useFocusInputField = (name) => {
|
|
6389
|
+
const { search: searchString } = reactRouterDom.useLocation();
|
|
6390
|
+
const search = React.useMemo(() => new URLSearchParams(searchString), [searchString]);
|
|
6391
|
+
const [field, setField] = React.useState(null);
|
|
6392
|
+
React.useEffect(() => {
|
|
6393
|
+
if (search.has("field") && search.get("field") === name && field) {
|
|
6394
|
+
if ("input" in field) {
|
|
6395
|
+
field.input.current.focus();
|
|
6396
|
+
field.input.current.scrollIntoView({
|
|
6397
|
+
block: "center"
|
|
6398
|
+
});
|
|
6399
|
+
} else {
|
|
6400
|
+
field.focus();
|
|
6401
|
+
field.scrollIntoView({
|
|
6402
|
+
block: "center"
|
|
6403
|
+
});
|
|
6404
|
+
}
|
|
6405
|
+
}
|
|
6406
|
+
}, [search, name, field]);
|
|
6407
|
+
return setField;
|
|
6408
|
+
};
|
|
6108
6409
|
const ItemTypes = {
|
|
6109
6410
|
COMPONENT: "component",
|
|
6110
6411
|
EDIT_FIELD: "editField",
|
|
@@ -6345,7 +6646,9 @@ const relationsApi = contentManagerApi.injectEndpoints({
|
|
|
6345
6646
|
endpointName,
|
|
6346
6647
|
model: queryArgs.model,
|
|
6347
6648
|
id: queryArgs.id,
|
|
6348
|
-
targetField: queryArgs.targetField
|
|
6649
|
+
targetField: queryArgs.targetField,
|
|
6650
|
+
locale: queryArgs.params?.locale,
|
|
6651
|
+
status: queryArgs.params?.status
|
|
6349
6652
|
};
|
|
6350
6653
|
},
|
|
6351
6654
|
merge: (currentCache, newItems) => {
|
|
@@ -6378,7 +6681,8 @@ const relationsApi = contentManagerApi.injectEndpoints({
|
|
|
6378
6681
|
} else {
|
|
6379
6682
|
return response;
|
|
6380
6683
|
}
|
|
6381
|
-
}
|
|
6684
|
+
},
|
|
6685
|
+
providesTags: ["Relations"]
|
|
6382
6686
|
}),
|
|
6383
6687
|
searchRelations: build.query({
|
|
6384
6688
|
query: ({ model, targetField, params }) => {
|
|
@@ -6465,7 +6769,7 @@ const RelationsField = React__namespace.forwardRef(
|
|
|
6465
6769
|
const { document: document2, model: documentModel } = useDoc();
|
|
6466
6770
|
const documentId = document2?.documentId;
|
|
6467
6771
|
const { formatMessage } = reactIntl.useIntl();
|
|
6468
|
-
const [{ query }] =
|
|
6772
|
+
const [{ query }] = useQueryParams();
|
|
6469
6773
|
const params = buildValidParams(query);
|
|
6470
6774
|
const isMorph = props.attribute.relation.toLowerCase().includes("morph");
|
|
6471
6775
|
const isDisabled = isMorph || disabled;
|
|
@@ -6540,19 +6844,20 @@ const RelationsField = React__namespace.forwardRef(
|
|
|
6540
6844
|
const handleConnect = (relation) => {
|
|
6541
6845
|
const [lastItemInList] = relations.slice(-1);
|
|
6542
6846
|
const item = {
|
|
6543
|
-
|
|
6847
|
+
id: relation.id,
|
|
6848
|
+
status: relation.status,
|
|
6544
6849
|
/**
|
|
6545
6850
|
* If there's a last item, that's the first key we use to generate out next one.
|
|
6546
6851
|
*/
|
|
6547
6852
|
__temp_key__: fractionalIndexing.generateNKeysBetween(lastItemInList?.__temp_key__ ?? null, null, 1)[0],
|
|
6548
6853
|
// Fallback to `id` if there is no `mainField` value, which will overwrite the above `id` property with the exact same data.
|
|
6549
|
-
[props.mainField?.name ?? "
|
|
6854
|
+
[props.mainField?.name ?? "documentId"]: relation[props.mainField?.name ?? "documentId"],
|
|
6550
6855
|
label: getRelationLabel(relation, props.mainField),
|
|
6551
6856
|
// @ts-expect-error – targetModel does exist on the attribute, but it's not typed.
|
|
6552
6857
|
href: `../${COLLECTION_TYPES}/${props.attribute.targetModel}/${relation.documentId}`
|
|
6553
6858
|
};
|
|
6554
6859
|
if (ONE_WAY_RELATIONS.includes(props.attribute.relation)) {
|
|
6555
|
-
field.onChange(props.name
|
|
6860
|
+
field.onChange(`${props.name}.connect`, [item]);
|
|
6556
6861
|
} else {
|
|
6557
6862
|
field.onChange(`${props.name}.connect`, [...field.value?.connect ?? [], item]);
|
|
6558
6863
|
}
|
|
@@ -6618,18 +6923,18 @@ const StyledFlex = styled__default.default(designSystem.Flex)`
|
|
|
6618
6923
|
const removeConnected = ({ field }) => (relations) => {
|
|
6619
6924
|
return relations.filter((relation) => {
|
|
6620
6925
|
const connectedRelations = field?.connect ?? [];
|
|
6621
|
-
return connectedRelations.findIndex((rel) => rel.
|
|
6926
|
+
return connectedRelations.findIndex((rel) => rel.id === relation.id) === -1;
|
|
6622
6927
|
});
|
|
6623
6928
|
};
|
|
6624
6929
|
const removeDisconnected = ({ field }) => (relations) => relations.filter((relation) => {
|
|
6625
6930
|
const disconnectedRelations = field?.disconnect ?? [];
|
|
6626
|
-
return disconnectedRelations.findIndex((rel) => rel.
|
|
6931
|
+
return disconnectedRelations.findIndex((rel) => rel.id === relation.id) === -1;
|
|
6627
6932
|
});
|
|
6628
6933
|
const addLabelAndHref = ({ mainField, href }) => (relations) => relations.map((relation) => {
|
|
6629
6934
|
return {
|
|
6630
6935
|
...relation,
|
|
6631
|
-
// Fallback to `id` if there is no `mainField` value, which will overwrite the above `
|
|
6632
|
-
[mainField?.name ?? "
|
|
6936
|
+
// Fallback to `id` if there is no `mainField` value, which will overwrite the above `documentId` property with the exact same data.
|
|
6937
|
+
[mainField?.name ?? "documentId"]: relation[mainField?.name ?? "documentId"],
|
|
6633
6938
|
label: getRelationLabel(relation, mainField),
|
|
6634
6939
|
href: `${href}/${relation.documentId}`
|
|
6635
6940
|
};
|
|
@@ -6651,10 +6956,10 @@ const RelationsInput = ({
|
|
|
6651
6956
|
_q: "",
|
|
6652
6957
|
page: 1
|
|
6653
6958
|
});
|
|
6654
|
-
const toggleNotification =
|
|
6655
|
-
const [{ query }] =
|
|
6959
|
+
const { toggleNotification } = useNotification();
|
|
6960
|
+
const [{ query }] = useQueryParams();
|
|
6656
6961
|
const { formatMessage } = reactIntl.useIntl();
|
|
6657
|
-
const fieldRef =
|
|
6962
|
+
const fieldRef = useFocusInputField(name);
|
|
6658
6963
|
const field = useField(name);
|
|
6659
6964
|
const [searchForTrigger, { data, isLoading }] = useLazySearchRelationsQuery();
|
|
6660
6965
|
React__namespace.useEffect(() => {
|
|
@@ -6666,8 +6971,8 @@ const RelationsInput = ({
|
|
|
6666
6971
|
...buildValidParams(query),
|
|
6667
6972
|
id: id ?? "",
|
|
6668
6973
|
pageSize: 10,
|
|
6669
|
-
idsToInclude: field.value?.disconnect?.map((rel) => rel.
|
|
6670
|
-
idsToOmit: field.value?.connect?.map((rel) => rel.
|
|
6974
|
+
idsToInclude: field.value?.disconnect?.map((rel) => rel.id.toString()) ?? [],
|
|
6975
|
+
idsToOmit: field.value?.connect?.map((rel) => rel.id.toString()) ?? [],
|
|
6671
6976
|
...searchParams
|
|
6672
6977
|
}
|
|
6673
6978
|
});
|
|
@@ -6690,7 +6995,7 @@ const RelationsInput = ({
|
|
|
6690
6995
|
if (!relationId) {
|
|
6691
6996
|
return;
|
|
6692
6997
|
}
|
|
6693
|
-
const relation = options.find((opt) => opt.
|
|
6998
|
+
const relation = options.find((opt) => opt.id.toString() === relationId);
|
|
6694
6999
|
if (!relation) {
|
|
6695
7000
|
console.error(
|
|
6696
7001
|
"You've tried to add a relation with an id that does not exist in the options you can see, this is likely a bug with Strapi. Please open an issue."
|
|
@@ -6700,7 +7005,7 @@ const RelationsInput = ({
|
|
|
6700
7005
|
id: getTranslation("relation.error-adding-relation"),
|
|
6701
7006
|
defaultMessage: "An error occurred while trying to add the relation."
|
|
6702
7007
|
}),
|
|
6703
|
-
type: "
|
|
7008
|
+
type: "danger"
|
|
6704
7009
|
});
|
|
6705
7010
|
return;
|
|
6706
7011
|
}
|
|
@@ -6755,10 +7060,10 @@ const RelationsInput = ({
|
|
|
6755
7060
|
},
|
|
6756
7061
|
children: options.map((opt) => {
|
|
6757
7062
|
const textValue2 = getRelationLabel(opt, mainField);
|
|
6758
|
-
return /* @__PURE__ */ jsxRuntime.jsx(designSystem.ComboboxOption, { value: opt.
|
|
7063
|
+
return /* @__PURE__ */ jsxRuntime.jsx(designSystem.ComboboxOption, { value: opt.id.toString(), textValue: textValue2, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, justifyContent: "space-between", children: [
|
|
6759
7064
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { ellipsis: true, children: textValue2 }),
|
|
6760
7065
|
opt.status ? /* @__PURE__ */ jsxRuntime.jsx(DocumentStatus, { status: opt.status }) : null
|
|
6761
|
-
] }) }, opt.
|
|
7066
|
+
] }) }, opt.id);
|
|
6762
7067
|
})
|
|
6763
7068
|
}
|
|
6764
7069
|
);
|
|
@@ -6895,14 +7200,14 @@ const RelationsList = ({
|
|
|
6895
7200
|
const handleDisconnect = (relation) => {
|
|
6896
7201
|
if (field.value && field.value.connect) {
|
|
6897
7202
|
const indexOfRelationInConnectArray = field.value.connect.findIndex(
|
|
6898
|
-
(rel) => rel.
|
|
7203
|
+
(rel) => rel.id === relation.id
|
|
6899
7204
|
);
|
|
6900
7205
|
if (indexOfRelationInConnectArray >= 0) {
|
|
6901
7206
|
removeFieldRow(`${name}.connect`, indexOfRelationInConnectArray);
|
|
6902
7207
|
return;
|
|
6903
7208
|
}
|
|
6904
7209
|
}
|
|
6905
|
-
addFieldRow(`${name}.disconnect`, {
|
|
7210
|
+
addFieldRow(`${name}.disconnect`, { id: relation.id });
|
|
6906
7211
|
};
|
|
6907
7212
|
const canReorder = !ONE_WAY_RELATIONS.includes(relationType);
|
|
6908
7213
|
const dynamicListHeight = data.length > RELATIONS_TO_DISPLAY ? Math.min(data.length, RELATIONS_TO_DISPLAY) * (RELATION_ITEM_HEIGHT + RELATION_GUTTER) + RELATION_ITEM_HEIGHT / 2 : Math.min(data.length, RELATIONS_TO_DISPLAY) * (RELATION_ITEM_HEIGHT + RELATION_GUTTER);
|
|
@@ -7142,7 +7447,7 @@ const RelationDragPreview = ({ status, displayedValue, width }) => {
|
|
|
7142
7447
|
};
|
|
7143
7448
|
const LeftMenu = () => {
|
|
7144
7449
|
const [search, setSearch] = React__namespace.useState("");
|
|
7145
|
-
const [{ query }] =
|
|
7450
|
+
const [{ query }] = useQueryParams();
|
|
7146
7451
|
const { formatMessage, locale } = reactIntl.useIntl();
|
|
7147
7452
|
const collectionTypeLinks = useTypedSelector(
|
|
7148
7453
|
(state) => state["content-manager_app"].collectionTypeLinks
|
|
@@ -7289,7 +7594,7 @@ const {
|
|
|
7289
7594
|
const { MUTATE_COLLECTION_TYPES_LINKS: MUTATE_COLLECTION_TYPES_LINKS$1, MUTATE_SINGLE_TYPES_LINKS: MUTATE_SINGLE_TYPES_LINKS$1 } = HOOKS;
|
|
7290
7595
|
const useContentManagerInitData = () => {
|
|
7291
7596
|
const dispatch = useTypedDispatch();
|
|
7292
|
-
const toggleNotification =
|
|
7597
|
+
const { toggleNotification } = useNotification();
|
|
7293
7598
|
const { allPermissions } = helperPlugin.useRBACProvider();
|
|
7294
7599
|
const runHookWaterfall = useStrapiApp(
|
|
7295
7600
|
"useContentManagerInitData",
|
|
@@ -7318,14 +7623,14 @@ const useContentManagerInitData = () => {
|
|
|
7318
7623
|
}, [formatMessage, initialDataQuery.data, notifyStatus]);
|
|
7319
7624
|
React.useEffect(() => {
|
|
7320
7625
|
if (initialDataQuery.error) {
|
|
7321
|
-
toggleNotification({ type: "
|
|
7626
|
+
toggleNotification({ type: "danger", message: formatAPIError2(initialDataQuery.error) });
|
|
7322
7627
|
}
|
|
7323
7628
|
}, [formatAPIError2, initialDataQuery.error, toggleNotification]);
|
|
7324
7629
|
const contentTypeSettingsQuery = useGetAllContentTypeSettingsQuery();
|
|
7325
7630
|
React.useEffect(() => {
|
|
7326
7631
|
if (contentTypeSettingsQuery.error) {
|
|
7327
7632
|
toggleNotification({
|
|
7328
|
-
type: "
|
|
7633
|
+
type: "danger",
|
|
7329
7634
|
message: formatAPIError2(contentTypeSettingsQuery.error)
|
|
7330
7635
|
});
|
|
7331
7636
|
}
|
|
@@ -7514,7 +7819,7 @@ const initialState$1 = {
|
|
|
7514
7819
|
singleTypeLinks: [],
|
|
7515
7820
|
isLoading: true
|
|
7516
7821
|
};
|
|
7517
|
-
const reducer$2 = (state = initialState$1, action) =>
|
|
7822
|
+
const reducer$2 = (state = initialState$1, action) => immer.produce(state, (draftState) => {
|
|
7518
7823
|
switch (action.type) {
|
|
7519
7824
|
case SET_INIT_DATA: {
|
|
7520
7825
|
const initDataAction = action;
|
|
@@ -7675,7 +7980,7 @@ const useEnterprise = (ceData, eeCallback, opts = {}) => {
|
|
|
7675
7980
|
const BooleanInput = React.forwardRef((props, ref) => {
|
|
7676
7981
|
const { formatMessage } = reactIntl.useIntl();
|
|
7677
7982
|
const field = useField(props.name);
|
|
7678
|
-
const fieldRef =
|
|
7983
|
+
const fieldRef = useFocusInputField(props.name);
|
|
7679
7984
|
const composedRefs = designSystem.useComposedRefs(ref, fieldRef);
|
|
7680
7985
|
return (
|
|
7681
7986
|
// @ts-expect-error – label _could_ be a ReactNode since it's a child, this should be fixed in the DS.
|
|
@@ -7704,7 +8009,7 @@ const BooleanInput = React.forwardRef((props, ref) => {
|
|
|
7704
8009
|
});
|
|
7705
8010
|
const CheckboxInput = React.forwardRef((props, ref) => {
|
|
7706
8011
|
const field = useField(props.name);
|
|
7707
|
-
const fieldRef =
|
|
8012
|
+
const fieldRef = useFocusInputField(props.name);
|
|
7708
8013
|
const composedRefs = designSystem.useComposedRefs(ref, fieldRef);
|
|
7709
8014
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7710
8015
|
designSystem.Checkbox,
|
|
@@ -7720,7 +8025,7 @@ const CheckboxInput = React.forwardRef((props, ref) => {
|
|
|
7720
8025
|
const DateInput = React.forwardRef(({ type: _type, ...props }, ref) => {
|
|
7721
8026
|
const { formatMessage } = reactIntl.useIntl();
|
|
7722
8027
|
const field = useField(props.name);
|
|
7723
|
-
const fieldRef =
|
|
8028
|
+
const fieldRef = useFocusInputField(props.name);
|
|
7724
8029
|
const composedRefs = designSystem.useComposedRefs(ref, fieldRef);
|
|
7725
8030
|
const value = typeof field.value === "string" ? new Date(field.value) : field.value;
|
|
7726
8031
|
return (
|
|
@@ -7745,7 +8050,7 @@ const DateInput = React.forwardRef(({ type: _type, ...props }, ref) => {
|
|
|
7745
8050
|
const DateTimeInput = React.forwardRef((props, ref) => {
|
|
7746
8051
|
const { formatMessage } = reactIntl.useIntl();
|
|
7747
8052
|
const field = useField(props.name);
|
|
7748
|
-
const fieldRef =
|
|
8053
|
+
const fieldRef = useFocusInputField(props.name);
|
|
7749
8054
|
const composedRefs = designSystem.useComposedRefs(ref, fieldRef);
|
|
7750
8055
|
const value = typeof field.value === "string" ? new Date(field.value) : field.value;
|
|
7751
8056
|
return (
|
|
@@ -7769,7 +8074,7 @@ const DateTimeInput = React.forwardRef((props, ref) => {
|
|
|
7769
8074
|
});
|
|
7770
8075
|
const EmailInput = React.forwardRef((props, ref) => {
|
|
7771
8076
|
const field = useField(props.name);
|
|
7772
|
-
const fieldRef =
|
|
8077
|
+
const fieldRef = useFocusInputField(props.name);
|
|
7773
8078
|
const composedRefs = designSystem.useComposedRefs(ref, fieldRef);
|
|
7774
8079
|
return (
|
|
7775
8080
|
// @ts-expect-error – label _could_ be a ReactNode since it's a child, this should be fixed in the DS.
|
|
@@ -7792,7 +8097,7 @@ const EmailInput = React.forwardRef((props, ref) => {
|
|
|
7792
8097
|
const EnumerationInput = React.forwardRef(
|
|
7793
8098
|
({ options = [], ...props }, ref) => {
|
|
7794
8099
|
const field = useField(props.name);
|
|
7795
|
-
const fieldRef =
|
|
8100
|
+
const fieldRef = useFocusInputField(props.name);
|
|
7796
8101
|
const composedRefs = designSystem.useComposedRefs(ref, fieldRef);
|
|
7797
8102
|
return (
|
|
7798
8103
|
// @ts-expect-error – label _could_ be a ReactNode since it's a child, this should be fixed in the DS.
|
|
@@ -7816,7 +8121,7 @@ const EnumerationInput = React.forwardRef(
|
|
|
7816
8121
|
);
|
|
7817
8122
|
const JsonInput = React.forwardRef((props, ref) => {
|
|
7818
8123
|
const field = useField(props.name);
|
|
7819
|
-
const fieldRef =
|
|
8124
|
+
const fieldRef = useFocusInputField(props.name);
|
|
7820
8125
|
const composedRefs = designSystem.useComposedRefs(ref, fieldRef);
|
|
7821
8126
|
return (
|
|
7822
8127
|
// @ts-expect-error – label _could_ be a ReactNode since it's a child, this should be fixed in the DS.
|
|
@@ -7839,7 +8144,7 @@ const JsonInput = React.forwardRef((props, ref) => {
|
|
|
7839
8144
|
});
|
|
7840
8145
|
const NumberInputImpl = React.forwardRef(({ type, ...props }, ref) => {
|
|
7841
8146
|
const field = useField(props.name);
|
|
7842
|
-
const fieldRef =
|
|
8147
|
+
const fieldRef = useFocusInputField(props.name);
|
|
7843
8148
|
const composedRefs = designSystem.useComposedRefs(ref, fieldRef);
|
|
7844
8149
|
return (
|
|
7845
8150
|
// @ts-expect-error – label _could_ be a ReactNode since it's a child, this should be fixed in the DS.
|
|
@@ -7864,7 +8169,7 @@ const PasswordInput = React.forwardRef((props, ref) => {
|
|
|
7864
8169
|
const [showPassword, setShowPassword] = React.useState(false);
|
|
7865
8170
|
const { formatMessage } = reactIntl.useIntl();
|
|
7866
8171
|
const field = useField(props.name);
|
|
7867
|
-
const fieldRef =
|
|
8172
|
+
const fieldRef = useFocusInputField(props.name);
|
|
7868
8173
|
const composedRefs = designSystem.useComposedRefs(ref, fieldRef);
|
|
7869
8174
|
return (
|
|
7870
8175
|
// @ts-expect-error – label _could_ be a ReactNode since it's a child, this should be fixed in the DS.
|
|
@@ -7905,7 +8210,7 @@ const PasswordInput = React.forwardRef((props, ref) => {
|
|
|
7905
8210
|
});
|
|
7906
8211
|
const StringInput = React.forwardRef(({ ...props }, ref) => {
|
|
7907
8212
|
const field = useField(props.name);
|
|
7908
|
-
const fieldRef =
|
|
8213
|
+
const fieldRef = useFocusInputField(props.name);
|
|
7909
8214
|
const composedRefs = designSystem.useComposedRefs(ref, fieldRef);
|
|
7910
8215
|
return (
|
|
7911
8216
|
// @ts-expect-error – label _could_ be a ReactNode since it's a child, this should be fixed in the DS.
|
|
@@ -7924,7 +8229,7 @@ const StringInput = React.forwardRef(({ ...props }, ref) => {
|
|
|
7924
8229
|
});
|
|
7925
8230
|
const TextareaInput = React.forwardRef((props, ref) => {
|
|
7926
8231
|
const field = useField(props.name);
|
|
7927
|
-
const fieldRef =
|
|
8232
|
+
const fieldRef = useFocusInputField(props.name);
|
|
7928
8233
|
const composedRefs = designSystem.useComposedRefs(ref, fieldRef);
|
|
7929
8234
|
return (
|
|
7930
8235
|
// @ts-expect-error – label _could_ be a ReactNode since it's a child, this should be fixed in the DS.
|
|
@@ -7945,7 +8250,7 @@ const TextareaInput = React.forwardRef((props, ref) => {
|
|
|
7945
8250
|
const TimeInput = React.forwardRef((props, ref) => {
|
|
7946
8251
|
const { formatMessage } = reactIntl.useIntl();
|
|
7947
8252
|
const field = useField(props.name);
|
|
7948
|
-
const fieldRef =
|
|
8253
|
+
const fieldRef = useFocusInputField(props.name);
|
|
7949
8254
|
const composedRefs = designSystem.useComposedRefs(ref, fieldRef);
|
|
7950
8255
|
return (
|
|
7951
8256
|
// @ts-expect-error – label _could_ be a ReactNode since it's a child, this should be fixed in the DS.
|
|
@@ -8004,7 +8309,7 @@ const InputRenderer = React.memo(
|
|
|
8004
8309
|
);
|
|
8005
8310
|
const NotSupportedField = React.forwardRef((props, ref) => {
|
|
8006
8311
|
const { error } = useField(props.name);
|
|
8007
|
-
const fieldRef =
|
|
8312
|
+
const fieldRef = useFocusInputField(props.name);
|
|
8008
8313
|
const composedRefs = designSystem.useComposedRefs(ref, fieldRef);
|
|
8009
8314
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8010
8315
|
designSystem.TextInput,
|
|
@@ -8088,7 +8393,8 @@ const LOGIN_SCHEMA = yup__namespace.object().shape({
|
|
|
8088
8393
|
const Login = ({ children }) => {
|
|
8089
8394
|
const [apiError, setApiError] = React__namespace.useState();
|
|
8090
8395
|
const { formatMessage } = reactIntl.useIntl();
|
|
8091
|
-
const
|
|
8396
|
+
const { search: searchString } = reactRouterDom.useLocation();
|
|
8397
|
+
const query = React__namespace.useMemo(() => new URLSearchParams(searchString), [searchString]);
|
|
8092
8398
|
const navigate = reactRouterDom.useNavigate();
|
|
8093
8399
|
const login = useAuth("Login", (state) => state.login);
|
|
8094
8400
|
const handleLogin = async (body) => {
|
|
@@ -8260,7 +8566,8 @@ const ForgotPasswordSuccess = () => {
|
|
|
8260
8566
|
};
|
|
8261
8567
|
const Oops = () => {
|
|
8262
8568
|
const { formatMessage } = reactIntl.useIntl();
|
|
8263
|
-
const
|
|
8569
|
+
const { search: searchString } = reactRouterDom.useLocation();
|
|
8570
|
+
const query = React__namespace.useMemo(() => new URLSearchParams(searchString), [searchString]);
|
|
8264
8571
|
const message = query.get("info") || formatMessage({
|
|
8265
8572
|
id: "Auth.components.Oops.text",
|
|
8266
8573
|
defaultMessage: "Your account has been suspended."
|
|
@@ -8359,8 +8666,9 @@ const NpsSurvey = () => {
|
|
|
8359
8666
|
const { formatMessage } = reactIntl.useIntl();
|
|
8360
8667
|
const { npsSurveySettings, setNpsSurveySettings } = useNpsSurveySettings();
|
|
8361
8668
|
const [isFeedbackResponse, setIsFeedbackResponse] = React__namespace.useState(false);
|
|
8362
|
-
const toggleNotification =
|
|
8363
|
-
const
|
|
8669
|
+
const { toggleNotification } = useNotification();
|
|
8670
|
+
const currentEnvironment = useAppInfo("NpsSurvey", (state) => state.currentEnvironment);
|
|
8671
|
+
const strapiVersion = useAppInfo("NpsSurvey", (state) => state.strapiVersion);
|
|
8364
8672
|
const [surveyIsShown, setSurveyIsShown] = React__namespace.useState(
|
|
8365
8673
|
checkIfShouldShowSurvey(npsSurveySettings)
|
|
8366
8674
|
);
|
|
@@ -8415,7 +8723,7 @@ const NpsSurvey = () => {
|
|
|
8415
8723
|
}, 3e3);
|
|
8416
8724
|
} catch (err) {
|
|
8417
8725
|
toggleNotification({
|
|
8418
|
-
type: "
|
|
8726
|
+
type: "danger",
|
|
8419
8727
|
message: formatMessage({ id: "notification.error", defaultMessage: "An error occurred" })
|
|
8420
8728
|
});
|
|
8421
8729
|
}
|
|
@@ -8642,14 +8950,15 @@ const REGISTER_ADMIN_SCHEMA = yup__namespace.object().shape({
|
|
|
8642
8950
|
})
|
|
8643
8951
|
});
|
|
8644
8952
|
const Register = ({ hasAdmin }) => {
|
|
8645
|
-
const toggleNotification =
|
|
8953
|
+
const { toggleNotification } = useNotification();
|
|
8646
8954
|
const navigate = reactRouterDom.useNavigate();
|
|
8647
8955
|
const [submitCount, setSubmitCount] = React__namespace.useState(0);
|
|
8648
8956
|
const [apiError, setApiError] = React__namespace.useState();
|
|
8649
8957
|
const { trackUsage } = useTracking();
|
|
8650
8958
|
const { formatMessage } = reactIntl.useIntl();
|
|
8651
8959
|
const setSkipped = useGuidedTour("Register", (state) => state.setSkipped);
|
|
8652
|
-
const
|
|
8960
|
+
const { search: searchString } = reactRouterDom.useLocation();
|
|
8961
|
+
const query = React__namespace.useMemo(() => new URLSearchParams(searchString), [searchString]);
|
|
8653
8962
|
const match = reactRouterDom.useMatch("/auth/:authType");
|
|
8654
8963
|
const {
|
|
8655
8964
|
_unstableFormatAPIError: formatAPIError2,
|
|
@@ -8664,7 +8973,7 @@ const Register = ({ hasAdmin }) => {
|
|
|
8664
8973
|
if (error) {
|
|
8665
8974
|
const message = isBaseQueryError(error) ? formatAPIError2(error) : error.message ?? "";
|
|
8666
8975
|
toggleNotification({
|
|
8667
|
-
type: "
|
|
8976
|
+
type: "danger",
|
|
8668
8977
|
message
|
|
8669
8978
|
});
|
|
8670
8979
|
navigate(`/auth/oops?info=${encodeURIComponent(message)}`);
|
|
@@ -8947,7 +9256,8 @@ const RESET_PASSWORD_SCHEMA = yup__namespace.object().shape({
|
|
|
8947
9256
|
const ResetPassword = () => {
|
|
8948
9257
|
const { formatMessage } = reactIntl.useIntl();
|
|
8949
9258
|
const navigate = reactRouterDom.useNavigate();
|
|
8950
|
-
const
|
|
9259
|
+
const { search: searchString } = reactRouterDom.useLocation();
|
|
9260
|
+
const query = React__namespace.useMemo(() => new URLSearchParams(searchString), [searchString]);
|
|
8951
9261
|
const { _unstableFormatAPIError: formatAPIError2 } = useAPIErrorHandler();
|
|
8952
9262
|
const setToken = useAuth("ResetPassword", (state) => state.setToken);
|
|
8953
9263
|
const [resetPassword, { error }] = useResetPasswordMutation();
|
|
@@ -9042,11 +9352,11 @@ const AuthPage = () => {
|
|
|
9042
9352
|
const { hasAdmin } = data ?? {};
|
|
9043
9353
|
const Login$1 = useEnterprise(
|
|
9044
9354
|
Login,
|
|
9045
|
-
async () => (await Promise.resolve().then(() => require("./Login-
|
|
9355
|
+
async () => (await Promise.resolve().then(() => require("./Login-4Igrm6CC.js"))).LoginEE
|
|
9046
9356
|
);
|
|
9047
9357
|
const forms = useEnterprise(
|
|
9048
9358
|
FORMS,
|
|
9049
|
-
async () => (await Promise.resolve().then(() => require("./constants-
|
|
9359
|
+
async () => (await Promise.resolve().then(() => require("./constants-7yqqXq3r.js"))).FORMS,
|
|
9050
9360
|
{
|
|
9051
9361
|
combine(ceForms, eeForms) {
|
|
9052
9362
|
return {
|
|
@@ -9087,8 +9397,7 @@ const AuthPage = () => {
|
|
|
9087
9397
|
};
|
|
9088
9398
|
const NotFoundPage = () => {
|
|
9089
9399
|
const { formatMessage } = reactIntl.useIntl();
|
|
9090
|
-
|
|
9091
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Main, { labelledBy: "title", children: [
|
|
9400
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Page.Main, { labelledBy: "title", children: [
|
|
9092
9401
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9093
9402
|
designSystem.HeaderLayout,
|
|
9094
9403
|
{
|
|
@@ -9120,7 +9429,7 @@ const NotFoundPage = () => {
|
|
|
9120
9429
|
const ROUTES_CE = [
|
|
9121
9430
|
{
|
|
9122
9431
|
lazy: async () => {
|
|
9123
|
-
const { ProtectedListPage } = await Promise.resolve().then(() => require("./ListPage-
|
|
9432
|
+
const { ProtectedListPage } = await Promise.resolve().then(() => require("./ListPage-rCVvOLlD.js"));
|
|
9124
9433
|
return {
|
|
9125
9434
|
Component: ProtectedListPage
|
|
9126
9435
|
};
|
|
@@ -9129,7 +9438,7 @@ const ROUTES_CE = [
|
|
|
9129
9438
|
},
|
|
9130
9439
|
{
|
|
9131
9440
|
lazy: async () => {
|
|
9132
|
-
const { ProtectedCreatePage } = await Promise.resolve().then(() => require("./CreatePage-
|
|
9441
|
+
const { ProtectedCreatePage } = await Promise.resolve().then(() => require("./CreatePage-yjmy0z57.js"));
|
|
9133
9442
|
return {
|
|
9134
9443
|
Component: ProtectedCreatePage
|
|
9135
9444
|
};
|
|
@@ -9138,7 +9447,7 @@ const ROUTES_CE = [
|
|
|
9138
9447
|
},
|
|
9139
9448
|
{
|
|
9140
9449
|
lazy: async () => {
|
|
9141
|
-
const { ProtectedCreatePage } = await Promise.resolve().then(() => require("./CreatePage-
|
|
9450
|
+
const { ProtectedCreatePage } = await Promise.resolve().then(() => require("./CreatePage-yjmy0z57.js"));
|
|
9142
9451
|
return {
|
|
9143
9452
|
Component: ProtectedCreatePage
|
|
9144
9453
|
};
|
|
@@ -9147,7 +9456,7 @@ const ROUTES_CE = [
|
|
|
9147
9456
|
},
|
|
9148
9457
|
{
|
|
9149
9458
|
lazy: async () => {
|
|
9150
|
-
const { ProtectedEditPage } = await Promise.resolve().then(() => require("./EditPage-
|
|
9459
|
+
const { ProtectedEditPage } = await Promise.resolve().then(() => require("./EditPage-Hxt5uBXk.js"));
|
|
9151
9460
|
return {
|
|
9152
9461
|
Component: ProtectedEditPage
|
|
9153
9462
|
};
|
|
@@ -9156,7 +9465,7 @@ const ROUTES_CE = [
|
|
|
9156
9465
|
},
|
|
9157
9466
|
{
|
|
9158
9467
|
lazy: async () => {
|
|
9159
|
-
const { ProtectedListPage } = await Promise.resolve().then(() => require("./ListPage-
|
|
9468
|
+
const { ProtectedListPage } = await Promise.resolve().then(() => require("./ListPage-7TAp-q4k.js"));
|
|
9160
9469
|
return {
|
|
9161
9470
|
Component: ProtectedListPage
|
|
9162
9471
|
};
|
|
@@ -9165,7 +9474,7 @@ const ROUTES_CE = [
|
|
|
9165
9474
|
},
|
|
9166
9475
|
{
|
|
9167
9476
|
lazy: async () => {
|
|
9168
|
-
const { ProtectedEditPage } = await Promise.resolve().then(() => require("./EditPage-
|
|
9477
|
+
const { ProtectedEditPage } = await Promise.resolve().then(() => require("./EditPage-QA0-S3kV.js"));
|
|
9169
9478
|
return {
|
|
9170
9479
|
Component: ProtectedEditPage
|
|
9171
9480
|
};
|
|
@@ -9174,7 +9483,7 @@ const ROUTES_CE = [
|
|
|
9174
9483
|
},
|
|
9175
9484
|
{
|
|
9176
9485
|
lazy: async () => {
|
|
9177
|
-
const { ProtectedCreatePage } = await Promise.resolve().then(() => require("./CreatePage-
|
|
9486
|
+
const { ProtectedCreatePage } = await Promise.resolve().then(() => require("./CreatePage-JIHfFWS7.js"));
|
|
9178
9487
|
return {
|
|
9179
9488
|
Component: ProtectedCreatePage
|
|
9180
9489
|
};
|
|
@@ -9183,7 +9492,7 @@ const ROUTES_CE = [
|
|
|
9183
9492
|
},
|
|
9184
9493
|
{
|
|
9185
9494
|
lazy: async () => {
|
|
9186
|
-
const { ProtectedEditPage } = await Promise.resolve().then(() => require("./EditPage-
|
|
9495
|
+
const { ProtectedEditPage } = await Promise.resolve().then(() => require("./EditPage-vUQIn3OJ.js")).then((n) => n.EditPage$1);
|
|
9187
9496
|
return {
|
|
9188
9497
|
Component: ProtectedEditPage
|
|
9189
9498
|
};
|
|
@@ -9192,7 +9501,7 @@ const ROUTES_CE = [
|
|
|
9192
9501
|
},
|
|
9193
9502
|
{
|
|
9194
9503
|
lazy: async () => {
|
|
9195
|
-
const { ProtectedListPage } = await Promise.resolve().then(() => require("./ListPage-
|
|
9504
|
+
const { ProtectedListPage } = await Promise.resolve().then(() => require("./ListPage-u6uVacPz.js"));
|
|
9196
9505
|
return {
|
|
9197
9506
|
Component: ProtectedListPage
|
|
9198
9507
|
};
|
|
@@ -9201,7 +9510,7 @@ const ROUTES_CE = [
|
|
|
9201
9510
|
},
|
|
9202
9511
|
{
|
|
9203
9512
|
lazy: async () => {
|
|
9204
|
-
const { ProtectedListView } = await Promise.resolve().then(() => require("./ListView-
|
|
9513
|
+
const { ProtectedListView } = await Promise.resolve().then(() => require("./ListView-SsUn5vcn.js"));
|
|
9205
9514
|
return {
|
|
9206
9515
|
Component: ProtectedListView
|
|
9207
9516
|
};
|
|
@@ -9210,7 +9519,7 @@ const ROUTES_CE = [
|
|
|
9210
9519
|
},
|
|
9211
9520
|
{
|
|
9212
9521
|
lazy: async () => {
|
|
9213
|
-
const { ProtectedCreateView } = await Promise.resolve().then(() => require("./CreateView-
|
|
9522
|
+
const { ProtectedCreateView } = await Promise.resolve().then(() => require("./CreateView-Vqd1PVrJ.js"));
|
|
9214
9523
|
return {
|
|
9215
9524
|
Component: ProtectedCreateView
|
|
9216
9525
|
};
|
|
@@ -9219,7 +9528,7 @@ const ROUTES_CE = [
|
|
|
9219
9528
|
},
|
|
9220
9529
|
{
|
|
9221
9530
|
lazy: async () => {
|
|
9222
|
-
const { ProtectedEditView } = await Promise.resolve().then(() => require("./EditViewPage
|
|
9531
|
+
const { ProtectedEditView } = await Promise.resolve().then(() => require("./EditViewPage--SujdXIG.js"));
|
|
9223
9532
|
return {
|
|
9224
9533
|
Component: ProtectedEditView
|
|
9225
9534
|
};
|
|
@@ -9228,7 +9537,7 @@ const ROUTES_CE = [
|
|
|
9228
9537
|
},
|
|
9229
9538
|
{
|
|
9230
9539
|
lazy: async () => {
|
|
9231
|
-
const { ProtectedCreateView } = await Promise.resolve().then(() => require("./CreateView-
|
|
9540
|
+
const { ProtectedCreateView } = await Promise.resolve().then(() => require("./CreateView-J48m0lSL.js"));
|
|
9232
9541
|
return {
|
|
9233
9542
|
Component: ProtectedCreateView
|
|
9234
9543
|
};
|
|
@@ -9237,7 +9546,7 @@ const ROUTES_CE = [
|
|
|
9237
9546
|
},
|
|
9238
9547
|
{
|
|
9239
9548
|
lazy: async () => {
|
|
9240
|
-
const { ProtectedListView } = await Promise.resolve().then(() => require("./ListView-
|
|
9549
|
+
const { ProtectedListView } = await Promise.resolve().then(() => require("./ListView-ZkjwQBXQ.js"));
|
|
9241
9550
|
return {
|
|
9242
9551
|
Component: ProtectedListView
|
|
9243
9552
|
};
|
|
@@ -9246,7 +9555,7 @@ const ROUTES_CE = [
|
|
|
9246
9555
|
},
|
|
9247
9556
|
{
|
|
9248
9557
|
lazy: async () => {
|
|
9249
|
-
const { ProtectedEditView } = await Promise.resolve().then(() => require("./EditView-
|
|
9558
|
+
const { ProtectedEditView } = await Promise.resolve().then(() => require("./EditView-63ynF0vf.js"));
|
|
9250
9559
|
return {
|
|
9251
9560
|
Component: ProtectedEditView
|
|
9252
9561
|
};
|
|
@@ -9729,7 +10038,7 @@ class StrapiApp {
|
|
|
9729
10038
|
{
|
|
9730
10039
|
path: "usecase",
|
|
9731
10040
|
lazy: async () => {
|
|
9732
|
-
const { PrivateUseCasePage } = await Promise.resolve().then(() => require("./UseCasePage-
|
|
10041
|
+
const { PrivateUseCasePage } = await Promise.resolve().then(() => require("./UseCasePage-0_alQEc9.js"));
|
|
9733
10042
|
return {
|
|
9734
10043
|
Component: PrivateUseCasePage
|
|
9735
10044
|
};
|
|
@@ -9742,7 +10051,7 @@ class StrapiApp {
|
|
|
9742
10051
|
{
|
|
9743
10052
|
path: "/*",
|
|
9744
10053
|
lazy: async () => {
|
|
9745
|
-
const { PrivateAdminLayout } = await Promise.resolve().then(() => require("./AuthenticatedLayout-
|
|
10054
|
+
const { PrivateAdminLayout } = await Promise.resolve().then(() => require("./AuthenticatedLayout-kxORHKAl.js"));
|
|
9746
10055
|
return {
|
|
9747
10056
|
Component: PrivateAdminLayout
|
|
9748
10057
|
};
|
|
@@ -9751,7 +10060,7 @@ class StrapiApp {
|
|
|
9751
10060
|
{
|
|
9752
10061
|
index: true,
|
|
9753
10062
|
lazy: async () => {
|
|
9754
|
-
const { HomePage } = await Promise.resolve().then(() => require("./HomePage-
|
|
10063
|
+
const { HomePage } = await Promise.resolve().then(() => require("./HomePage-oiaJD-JE.js"));
|
|
9755
10064
|
return {
|
|
9756
10065
|
Component: HomePage
|
|
9757
10066
|
};
|
|
@@ -9760,7 +10069,7 @@ class StrapiApp {
|
|
|
9760
10069
|
{
|
|
9761
10070
|
path: "me",
|
|
9762
10071
|
lazy: async () => {
|
|
9763
|
-
const { ProfilePage } = await Promise.resolve().then(() => require("./ProfilePage-
|
|
10072
|
+
const { ProfilePage } = await Promise.resolve().then(() => require("./ProfilePage-brPbqDP1.js"));
|
|
9764
10073
|
return {
|
|
9765
10074
|
Component: ProfilePage
|
|
9766
10075
|
};
|
|
@@ -9769,7 +10078,7 @@ class StrapiApp {
|
|
|
9769
10078
|
{
|
|
9770
10079
|
path: "list-plugins",
|
|
9771
10080
|
lazy: async () => {
|
|
9772
|
-
const { ProtectedInstalledPluginsPage } = await Promise.resolve().then(() => require("./InstalledPluginsPage-
|
|
10081
|
+
const { ProtectedInstalledPluginsPage } = await Promise.resolve().then(() => require("./InstalledPluginsPage-ao6yYe7N.js"));
|
|
9773
10082
|
return {
|
|
9774
10083
|
Component: ProtectedInstalledPluginsPage
|
|
9775
10084
|
};
|
|
@@ -9778,7 +10087,7 @@ class StrapiApp {
|
|
|
9778
10087
|
{
|
|
9779
10088
|
path: "marketplace",
|
|
9780
10089
|
lazy: async () => {
|
|
9781
|
-
const { ProtectedMarketplacePage } = await Promise.resolve().then(() => require("./MarketplacePage-
|
|
10090
|
+
const { ProtectedMarketplacePage } = await Promise.resolve().then(() => require("./MarketplacePage-tWKM5xe8.js"));
|
|
9782
10091
|
return {
|
|
9783
10092
|
Component: ProtectedMarketplacePage
|
|
9784
10093
|
};
|
|
@@ -9787,7 +10096,7 @@ class StrapiApp {
|
|
|
9787
10096
|
{
|
|
9788
10097
|
path: "settings/*",
|
|
9789
10098
|
lazy: async () => {
|
|
9790
|
-
const { Layout: Layout2 } = await Promise.resolve().then(() => require("./Layout-
|
|
10099
|
+
const { Layout: Layout2 } = await Promise.resolve().then(() => require("./Layout-kbqdKkiF.js"));
|
|
9791
10100
|
return {
|
|
9792
10101
|
Component: Layout2
|
|
9793
10102
|
};
|
|
@@ -9796,7 +10105,7 @@ class StrapiApp {
|
|
|
9796
10105
|
{
|
|
9797
10106
|
path: "application-infos",
|
|
9798
10107
|
lazy: async () => {
|
|
9799
|
-
const { ApplicationInfoPage } = await Promise.resolve().then(() => require("./ApplicationInfoPage-
|
|
10108
|
+
const { ApplicationInfoPage } = await Promise.resolve().then(() => require("./ApplicationInfoPage-xj1SCaSR.js"));
|
|
9800
10109
|
return {
|
|
9801
10110
|
Component: ApplicationInfoPage
|
|
9802
10111
|
};
|
|
@@ -9869,7 +10178,7 @@ const renderAdmin = async (mountNode, { plugins, customisations, features }) =>
|
|
|
9869
10178
|
promoteEE: true
|
|
9870
10179
|
}
|
|
9871
10180
|
};
|
|
9872
|
-
const { get: get2 } =
|
|
10181
|
+
const { get: get2 } = getFetchClient();
|
|
9873
10182
|
try {
|
|
9874
10183
|
const {
|
|
9875
10184
|
data: {
|
|
@@ -9960,7 +10269,7 @@ const DefaultBodyWrapper = ({ children }) => {
|
|
|
9960
10269
|
const [PaginationProvider, usePagination] = createContext("Pagination");
|
|
9961
10270
|
const Root$1 = React__namespace.forwardRef(
|
|
9962
10271
|
({ children, defaultPageSize = 10, pageCount = 0, defaultPage = 1, onPageSizeChange, total = 0 }, forwardedRef) => {
|
|
9963
|
-
const [{ query }, setQuery] =
|
|
10272
|
+
const [{ query }, setQuery] = useQueryParams(
|
|
9964
10273
|
{
|
|
9965
10274
|
pageSize: defaultPageSize.toString(),
|
|
9966
10275
|
page: defaultPage.toString()
|
|
@@ -10124,7 +10433,7 @@ const SearchInput = ({
|
|
|
10124
10433
|
}) => {
|
|
10125
10434
|
const inputRef = React__namespace.useRef(null);
|
|
10126
10435
|
const iconButtonRef = React__namespace.useRef(null);
|
|
10127
|
-
const [{ query }, setQuery] =
|
|
10436
|
+
const [{ query }, setQuery] = useQueryParams();
|
|
10128
10437
|
const [value, setValue] = React__namespace.useState(query?._q || "");
|
|
10129
10438
|
const [isOpen, setIsOpen] = React__namespace.useState(!!value);
|
|
10130
10439
|
const { formatMessage } = reactIntl.useIntl();
|
|
@@ -10278,7 +10587,7 @@ const Head = ({ children }) => {
|
|
|
10278
10587
|
return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Thead, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Tr, { children }) });
|
|
10279
10588
|
};
|
|
10280
10589
|
const HeaderCell = ({ name, label, sortable }) => {
|
|
10281
|
-
const [{ query }, setQuery] =
|
|
10590
|
+
const [{ query }, setQuery] = useQueryParams();
|
|
10282
10591
|
const sort = query?.sort ?? "";
|
|
10283
10592
|
const [sortBy, sortOrder] = sort.split(":");
|
|
10284
10593
|
const { formatMessage } = reactIntl.useIntl();
|
|
@@ -10457,6 +10766,23 @@ function useInjectReducer(namespace, reducer2) {
|
|
|
10457
10766
|
store.injectReducer(namespace, reducer2);
|
|
10458
10767
|
}, [store, namespace, reducer2]);
|
|
10459
10768
|
}
|
|
10769
|
+
const useFetchClient = () => {
|
|
10770
|
+
const controller = React__namespace.useRef(null);
|
|
10771
|
+
if (controller.current === null) {
|
|
10772
|
+
controller.current = new AbortController();
|
|
10773
|
+
}
|
|
10774
|
+
React__namespace.useEffect(() => {
|
|
10775
|
+
return () => {
|
|
10776
|
+
controller.current.abort();
|
|
10777
|
+
};
|
|
10778
|
+
}, []);
|
|
10779
|
+
return React__namespace.useMemo(
|
|
10780
|
+
() => getFetchClient({
|
|
10781
|
+
signal: controller.current.signal
|
|
10782
|
+
}),
|
|
10783
|
+
[]
|
|
10784
|
+
);
|
|
10785
|
+
};
|
|
10460
10786
|
const checkIfAttributeIsDisplayable = (attribute) => {
|
|
10461
10787
|
const { type } = attribute;
|
|
10462
10788
|
if (type === "relation") {
|
|
@@ -10489,9 +10815,9 @@ const DEFAULT_SETTINGS = {
|
|
|
10489
10815
|
};
|
|
10490
10816
|
const useDocumentLayout = (model) => {
|
|
10491
10817
|
const { schema, components } = useDocument({ model, collectionType: "" }, { skip: true });
|
|
10492
|
-
const [{ query }] =
|
|
10818
|
+
const [{ query }] = useQueryParams();
|
|
10493
10819
|
const runHookWaterfall = useStrapiApp("useDocumentLayout", (state) => state.runHookWaterfall);
|
|
10494
|
-
const toggleNotification =
|
|
10820
|
+
const { toggleNotification } = useNotification();
|
|
10495
10821
|
const { _unstableFormatAPIError: formatAPIError2 } = useAPIErrorHandler();
|
|
10496
10822
|
const { isLoading: isLoadingSchemas, schemas } = useContentTypeSchema();
|
|
10497
10823
|
const { data, isLoading: isLoadingConfigs, error } = useGetContentTypeConfigurationQuery(model);
|
|
@@ -10499,7 +10825,7 @@ const useDocumentLayout = (model) => {
|
|
|
10499
10825
|
React__namespace.useEffect(() => {
|
|
10500
10826
|
if (error) {
|
|
10501
10827
|
toggleNotification({
|
|
10502
|
-
type: "
|
|
10828
|
+
type: "danger",
|
|
10503
10829
|
message: formatAPIError2(error)
|
|
10504
10830
|
});
|
|
10505
10831
|
}
|
|
@@ -10702,6 +11028,7 @@ exports.ACTION_UPDATE_STAGE_POSITION = ACTION_UPDATE_STAGE_POSITION;
|
|
|
10702
11028
|
exports.ACTION_UPDATE_WORKFLOW = ACTION_UPDATE_WORKFLOW;
|
|
10703
11029
|
exports.ASSIGNEE_ATTRIBUTE_NAME = ASSIGNEE_ATTRIBUTE_NAME;
|
|
10704
11030
|
exports.ATTRIBUTE_TYPES_THAT_CANNOT_BE_MAIN_FIELD = ATTRIBUTE_TYPES_THAT_CANNOT_BE_MAIN_FIELD;
|
|
11031
|
+
exports.AppInfoProvider = AppInfoProvider;
|
|
10705
11032
|
exports.BackButton = BackButton;
|
|
10706
11033
|
exports.Blocker = Blocker;
|
|
10707
11034
|
exports.CHARGEBEE_STAGES_PER_WORKFLOW_ENTITLEMENT_NAME = CHARGEBEE_STAGES_PER_WORKFLOW_ENTITLEMENT_NAME;
|
|
@@ -10729,6 +11056,7 @@ exports.LayoutContent = LayoutContent;
|
|
|
10729
11056
|
exports.LimitsModal = LimitsModal;
|
|
10730
11057
|
exports.Login = Login;
|
|
10731
11058
|
exports.Logo = Logo;
|
|
11059
|
+
exports.NotificationsProvider = NotificationsProvider;
|
|
10732
11060
|
exports.NpsSurvey = NpsSurvey;
|
|
10733
11061
|
exports.Page = Page;
|
|
10734
11062
|
exports.Pagination = Pagination;
|
|
@@ -10762,6 +11090,7 @@ exports.extractContentTypeComponents = extractContentTypeComponents;
|
|
|
10762
11090
|
exports.getAvailableStageColors = getAvailableStageColors;
|
|
10763
11091
|
exports.getBasename = getBasename;
|
|
10764
11092
|
exports.getDisplayName = getDisplayName;
|
|
11093
|
+
exports.getFetchClient = getFetchClient;
|
|
10765
11094
|
exports.getIn = getIn;
|
|
10766
11095
|
exports.getMainField = getMainField;
|
|
10767
11096
|
exports.getRelationLabel = getRelationLabel;
|
|
@@ -10777,7 +11106,9 @@ exports.setIn = setIn;
|
|
|
10777
11106
|
exports.setPermissions = setPermissions;
|
|
10778
11107
|
exports.useAPIErrorHandler = useAPIErrorHandler;
|
|
10779
11108
|
exports.useAdminUsers = useAdminUsers;
|
|
11109
|
+
exports.useAppInfo = useAppInfo;
|
|
10780
11110
|
exports.useAuth = useAuth;
|
|
11111
|
+
exports.useClipboard = useClipboard;
|
|
10781
11112
|
exports.useComponent = useComponent;
|
|
10782
11113
|
exports.useConfiguration = useConfiguration;
|
|
10783
11114
|
exports.useContentTypeSchema = useContentTypeSchema;
|
|
@@ -10795,7 +11126,9 @@ exports.useDocumentLayout = useDocumentLayout;
|
|
|
10795
11126
|
exports.useDocumentRBAC = useDocumentRBAC;
|
|
10796
11127
|
exports.useDragAndDrop = useDragAndDrop;
|
|
10797
11128
|
exports.useEnterprise = useEnterprise;
|
|
11129
|
+
exports.useFetchClient = useFetchClient;
|
|
10798
11130
|
exports.useField = useField;
|
|
11131
|
+
exports.useFocusInputField = useFocusInputField;
|
|
10799
11132
|
exports.useForm = useForm;
|
|
10800
11133
|
exports.useGetAllDocumentsQuery = useGetAllDocumentsQuery;
|
|
10801
11134
|
exports.useGetContentTypeConfigurationQuery = useGetContentTypeConfigurationQuery;
|
|
@@ -10815,6 +11148,8 @@ exports.useInjectReducer = useInjectReducer;
|
|
|
10815
11148
|
exports.useIsHistoryRoute = useIsHistoryRoute;
|
|
10816
11149
|
exports.useIsSSOLockedQuery = useIsSSOLockedQuery;
|
|
10817
11150
|
exports.useLicenseLimits = useLicenseLimits;
|
|
11151
|
+
exports.useNotification = useNotification;
|
|
11152
|
+
exports.useQueryParams = useQueryParams;
|
|
10818
11153
|
exports.useRegenerateTokenMutation = useRegenerateTokenMutation;
|
|
10819
11154
|
exports.useStrapiApp = useStrapiApp;
|
|
10820
11155
|
exports.useTable = useTable;
|
|
@@ -10828,4 +11163,4 @@ exports.useUpdateRoleMutation = useUpdateRoleMutation;
|
|
|
10828
11163
|
exports.useUpdateRolePermissionsMutation = useUpdateRolePermissionsMutation;
|
|
10829
11164
|
exports.useUpdateUserMutation = useUpdateUserMutation;
|
|
10830
11165
|
exports.useUpdateWorkflowMutation = useUpdateWorkflowMutation;
|
|
10831
|
-
//# sourceMappingURL=index-
|
|
11166
|
+
//# sourceMappingURL=index-haHGOQMJ.js.map
|