@unchainedshop/admin-ui 5.0.0-alpha.11 → 5.0.0-alpha.12
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/README.md +1 -1
- package/dist/{chunk-WPLOTFGW.js → chunk-2HTCKO4E.js} +12 -3
- package/dist/{chunk-BMDNY67T.js → chunk-33ZO52Z7.js} +3241 -1753
- package/dist/{chunk-PJLYVMUM.js → chunk-4MXPTVDL.js} +2 -2
- package/dist/{chunk-I64TXIE7.js → chunk-ATZJXTRA.js} +1 -1
- package/dist/{chunk-QHR23GVH.js → chunk-CUYIP5XG.js} +1 -1
- package/dist/{chunk-5WPFHQZN.js → chunk-E6HDJYA6.js} +3 -3
- package/dist/{chunk-FDHXLNZQ.js → chunk-EAVP6XZQ.js} +1 -1
- package/dist/{chunk-E77YIMGR.js → chunk-ED2FP42R.js} +1 -1
- package/dist/{chunk-HJKRGBDG.js → chunk-GWMLIF3C.js} +1 -1
- package/dist/{chunk-3L6EZQ6P.js → chunk-NFJE5EJG.js} +1 -1
- package/dist/{chunk-ICJH36K4.js → chunk-YUXHILXY.js} +1 -1
- package/dist/components/ui/Loading.d.ts +8 -1
- package/dist/components/ui/Loading.d.ts.map +1 -1
- package/dist/components/ui/index.d.ts +1 -0
- package/dist/components/ui/index.d.ts.map +1 -1
- package/dist/form.js +797 -286
- package/dist/gql/schema-types.d.ts +3 -2
- package/dist/gql/schema-types.d.ts.map +1 -1
- package/dist/hooks.js +3 -3
- package/dist/modal.js +5 -5
- package/dist/modules/accounts.js +1 -1
- package/dist/modules/assortment.js +1 -1
- package/dist/modules/country.js +1 -1
- package/dist/modules/currency.js +1 -1
- package/dist/modules/delivery-provider.js +1 -1
- package/dist/modules/enrollment.js +1 -1
- package/dist/modules/event.js +1 -1
- package/dist/modules/filter.js +1 -1
- package/dist/modules/language.js +1 -1
- package/dist/modules/order.js +1 -1
- package/dist/modules/payment-providers.js +1 -1
- package/dist/modules/product-review.js +1 -1
- package/dist/modules/product.js +5 -5
- package/dist/modules/quotation.js +1 -1
- package/dist/modules/token.js +1 -1
- package/dist/modules/warehousing-providers.js +1 -1
- package/dist/modules/work.js +1 -1
- package/dist/plugins.js +1 -1
- package/dist/providers.js +5 -5
- package/dist/shims/admin-ui-plugins.js +1 -1
- package/dist/shims/apollo-client-react.js +1 -1
- package/dist/shims/apollo-client.js +1 -1
- package/dist/shims/next-head.js +1 -1
- package/dist/shims/next-image.js +1 -1
- package/dist/shims/next-link.js +1 -1
- package/dist/shims/next-router.js +1 -1
- package/dist/shims/react-dom-client.js +1 -1
- package/dist/shims/react-dom.js +1 -1
- package/dist/shims/react-hook-form.js +1 -1
- package/dist/shims/react-intl.js +1 -1
- package/dist/shims/react-jsx-runtime.js +1 -1
- package/dist/shims/react-toastify.js +1 -1
- package/dist/shims/react.js +1 -1
- package/dist/theme.js +1 -1
- package/dist/ui.js +3933 -3416
- package/out/403/index.html +3 -3
- package/out/404/index.html +3 -3
- package/out/404.html +3 -3
- package/out/423/index.html +3 -3
- package/out/500/index.html +3 -3
- package/out/_next/static/bg3Z_ZBjStiTvJAHlsPDE/_buildManifest.js +262 -0
- package/out/_next/static/chunks/0-kvzk5p0hp-4.js +11 -0
- package/out/_next/static/chunks/0-nzk-g6k41e-.js +119 -0
- package/out/_next/static/chunks/00wlebfe9j80r.js +24 -0
- package/out/_next/static/chunks/01isyk4v59s_4.js +5 -0
- package/out/_next/static/chunks/01otzjqxk372n.js +1 -0
- package/out/_next/static/chunks/03x_mgpai_kbn.js +1 -0
- package/out/_next/static/chunks/04327_1fq5i7-.js +9 -0
- package/out/_next/static/chunks/04_r4qnsjmy81.js +4 -0
- package/out/_next/static/chunks/04egfa7kckou_.js +165 -0
- package/out/_next/static/chunks/05474mknnr_tw.js +4 -0
- package/out/_next/static/chunks/{2ajr0rk0_yax6.js → 06kqbwwnuu3te.js} +1 -1
- package/out/_next/static/chunks/0728622u98g6r.js +1 -0
- package/out/_next/static/chunks/09irjy-7k1922.js +1 -0
- package/out/_next/static/chunks/0_3suta3t3lus.js +5 -0
- package/out/_next/static/chunks/0_a5fzdztv84p.js +272 -0
- package/out/_next/static/chunks/0_ppdn6x6ci0v.js +31 -0
- package/out/_next/static/chunks/0br42_xli8-2x.js +6 -0
- package/out/_next/static/chunks/0cdk-eqghrgee.js +5 -0
- package/out/_next/static/chunks/0d54jo566j9ka.js +12 -0
- package/out/_next/static/chunks/0gfia1t8drmnx.js +182 -0
- package/out/_next/static/chunks/0gwd6ju8j_bwr.js +39 -0
- package/out/_next/static/chunks/{0_pn7w49dpkak.js → 0hv3x0mo1tt7i.js} +2 -2
- package/out/_next/static/chunks/0i481ym5-ss1t.js +5 -0
- package/out/_next/static/chunks/0iohwbogpxe5r.js +1 -0
- package/out/_next/static/chunks/0j46qnxaxeqk_.js +1 -0
- package/out/_next/static/chunks/{1jmdpa0tc5puj.js → 0mcu2o1ir2t_w.js} +3 -3
- package/out/_next/static/chunks/0o4aj3bm49d_h.js +61 -0
- package/out/_next/static/chunks/0op3htrvd-ix6.js +5 -0
- package/out/_next/static/chunks/0p55j-ysba0wq.js +63 -0
- package/out/_next/static/chunks/0qv2nce7okzy5.js +103 -0
- package/out/_next/static/chunks/0rrhyxuk32t3n.js +95 -0
- package/out/_next/static/chunks/0rt4le6syjqdj.js +21 -0
- package/out/_next/static/chunks/0s2jvi6_qj0lc.js +16 -0
- package/out/_next/static/chunks/0uef4ugmc_g10.js +1 -0
- package/out/_next/static/chunks/0v1tb34y7e1y4.js +5 -0
- package/out/_next/static/chunks/0w9d4swf95hvu.js +33 -0
- package/out/_next/static/chunks/0we1tw4xvdb7o.js +7 -0
- package/out/_next/static/chunks/0zlzflyq18hhy.js +4 -0
- package/out/_next/static/chunks/0zqdvl0b4w5nc.js +7 -0
- package/out/_next/static/chunks/1-wbp_4f-c4-3.js +837 -0
- package/out/_next/static/chunks/11vnr4kb9qkjr.js +1 -0
- package/out/_next/static/chunks/12cy_5m_0fj96.js +44 -0
- package/out/_next/static/chunks/131uuhqexo4si.js +4 -0
- package/out/_next/static/chunks/14eqp21pspjud.js +234 -0
- package/out/_next/static/chunks/14jd75j8ij4u2.js +3 -0
- package/out/_next/static/chunks/153-_av1r1ssb.js +4 -0
- package/out/_next/static/chunks/{0m73vd78oga92.js → 157ndq6b9jcvv.js} +11 -11
- package/out/_next/static/chunks/177p92k5pdloo.js +1 -0
- package/out/_next/static/chunks/19-1z6h5eeq_w.js +134 -0
- package/out/_next/static/chunks/1bxznw06g-5u2.js +5 -0
- package/out/_next/static/chunks/1bypzyw5fs3w2.js +59 -0
- package/out/_next/static/chunks/1cz2fp89ssu5d.js +4 -0
- package/out/_next/static/chunks/1e2jykfql801f.js +16 -0
- package/out/_next/static/chunks/1eokbzdgdicpa.js +33 -0
- package/out/_next/static/chunks/1f0t23r6y0hni.js +1 -0
- package/out/_next/static/chunks/1fehej_7rgmmo.js +5 -0
- package/out/_next/static/chunks/1gl4h7w9t850f.js +1 -0
- package/out/_next/static/chunks/1gv0k-w7m83om.js +41 -0
- package/out/_next/static/chunks/1hzt0aoixrv4_.js +7 -0
- package/out/_next/static/chunks/1ia6hdgf7pj9y.js +174 -0
- package/out/_next/static/chunks/1in8spfokcjsp.js +8 -0
- package/out/_next/static/chunks/1j2gw9gyg8j80.js +5 -0
- package/out/_next/static/chunks/1k06h8wbfrx_v.js +5 -0
- package/out/_next/static/chunks/1kdcu-0jkya-b.js +61 -0
- package/out/_next/static/chunks/1msc4qrgaanh7.js +43 -0
- package/out/_next/static/chunks/{1iamjw8qh1m4o.js → 1mx0p6r-9c5u_.js} +1 -1
- package/out/_next/static/chunks/1oqc8etm-romv.js +1 -0
- package/out/_next/static/chunks/1p5lt4tkyouxz.js +4 -0
- package/out/_next/static/chunks/1q7wxp4rlhy0x.js +12 -0
- package/out/_next/static/chunks/1r61kgm2ct0nf.js +74 -0
- package/out/_next/static/chunks/1rmlm4404fsge.js +15 -0
- package/out/_next/static/chunks/1s3ool53utm9o.js +39 -0
- package/out/_next/static/chunks/1sc2ug6_szd_d.js +2 -0
- package/out/_next/static/chunks/{12yd8t4k6c0t1.js → 1t8jj0-6g8uyd.js} +1 -1
- package/out/_next/static/chunks/1tbd6m-xvx0um.js +353 -0
- package/out/_next/static/chunks/1th1-x1szvnq8.js +5 -0
- package/out/_next/static/chunks/1tosw188dr9d6.js +44 -0
- package/out/_next/static/chunks/1tw97cvdosb89.js +5 -0
- package/out/_next/static/chunks/1ubmbegreszhk.js +1 -0
- package/out/_next/static/chunks/{43uqmej6-s4am.js → 1ug1ie2lrhi0a.js} +3 -3
- package/out/_next/static/chunks/1uw7hr3o4w5cj.js +8 -0
- package/out/_next/static/chunks/1vzs8hvrsoslf.js +5 -0
- package/out/_next/static/chunks/1w6gc_cygbi6h.js +5 -0
- package/out/_next/static/chunks/1xybsisfyvqrj.js +115 -0
- package/out/_next/static/chunks/1yvl8l5yx1rj8.js +4 -0
- package/out/_next/static/chunks/{3dcwbsiechj8e.js → 1z-etrje5tsj6.js} +3 -3
- package/out/_next/static/chunks/1z1d11slpalrq.js +4 -0
- package/out/_next/static/chunks/1zdral15la_p7.js +99 -0
- package/out/_next/static/chunks/2-qo63s4vlxol.js +156 -0
- package/out/_next/static/chunks/20au-bdji0nu2.js +14 -0
- package/out/_next/static/chunks/21zghy5-42i1e.js +1 -0
- package/out/_next/static/chunks/22duvsj-priip.js +7 -0
- package/out/_next/static/chunks/22rdge7enz4nd.js +12 -0
- package/out/_next/static/chunks/{3m_9ozv0orvze.js → 249b4cg2ev597.js} +3 -3
- package/out/_next/static/chunks/24caedynuzux0.js +5 -0
- package/out/_next/static/chunks/25ite4-jpq_mo.js +4 -0
- package/out/_next/static/chunks/25vdihxswn7dy.js +1 -0
- package/out/_next/static/chunks/26guwpx1_pkxv.js +1 -0
- package/out/_next/static/chunks/28o6402k4vuky.js +11 -0
- package/out/_next/static/chunks/29x7cj-318eaa.js +1 -0
- package/out/_next/static/chunks/2_0v0fw6x71zy.js +46 -0
- package/out/_next/static/chunks/2a9dpzjx5mfjp.js +4 -0
- package/out/_next/static/chunks/2apnv1hcv-4zc.js +23 -0
- package/out/_next/static/chunks/2b4k5t_myq-pa.js +1 -0
- package/out/_next/static/chunks/2bugi3kot5jtu.js +1 -0
- package/out/_next/static/chunks/2bxdh-td1el8z.js +5 -0
- package/out/_next/static/chunks/2dz0_3jf4m9cy.js +31 -0
- package/out/_next/static/chunks/2ege1545af18d.js +4 -0
- package/out/_next/static/chunks/2erqawjj0rnih.js +117 -0
- package/out/_next/static/chunks/2gfzt_fdr-h96.js +81 -0
- package/out/_next/static/chunks/2grm6dtosrvoq.js +1 -0
- package/out/_next/static/chunks/2hc3d38gb0q-v.js +1 -0
- package/out/_next/static/chunks/2hci18oosfv5d.js +5 -0
- package/out/_next/static/chunks/2imf3_f1_ex86.js +1 -0
- package/out/_next/static/chunks/{3fpgg_wy6j2ph.js → 2ipcn3vy6d4_6.js} +1 -1
- package/out/_next/static/chunks/2iwst7mjldlcz.js +1 -0
- package/out/_next/static/chunks/2ja0dztzyw8zw.js +1 -0
- package/out/_next/static/chunks/2ja1--2x_gs49.js +83 -0
- package/out/_next/static/chunks/2lec5u8obskt6.js +5 -0
- package/out/_next/static/chunks/2m38nntt3z8zi.js +103 -0
- package/out/_next/static/chunks/2pogx3xggqd8y.js +1 -0
- package/out/_next/static/chunks/2q988j4vovsiy.js +8 -0
- package/out/_next/static/chunks/2s-0q8i8lr2p2.js +5 -0
- package/out/_next/static/chunks/{0a_gulnq-c7to.js → 2u64ldp2xfy8a.js} +7 -7
- package/out/_next/static/chunks/2ud5j0_nqocf4.js +5 -0
- package/out/_next/static/chunks/2uo6puoi0y082.js +5 -0
- package/out/_next/static/chunks/2w3z7kqh6nbmw.js +23 -0
- package/out/_next/static/chunks/2y11qf38baxpu.js +14 -0
- package/out/_next/static/chunks/{2yw5sk06gdixu.js → 2y8uau15r3p-o.js} +1 -1
- package/out/_next/static/chunks/2zb-xmda5rbn0.js +1 -0
- package/out/_next/static/chunks/2zsvxbghbsuz1.js +4 -0
- package/out/_next/static/chunks/{0s6u_6w75ggbw.js → 3205eg3ochzp4.js} +7 -7
- package/out/_next/static/chunks/32g5gxee1kcdc.js +28 -0
- package/out/_next/static/chunks/32whi9clpxjd0.js +5 -0
- package/out/_next/static/chunks/3368kg846t33d.js +57 -0
- package/out/_next/static/chunks/33oz-znvi5-m6.js +1 -0
- package/out/_next/static/chunks/345s7967cwd02.js +5 -0
- package/out/_next/static/chunks/34wf3lz_fft3k.js +2 -0
- package/out/_next/static/chunks/{3btkj1_irjkq7.js → 36x7q29atus_r.js} +6 -6
- package/out/_next/static/chunks/37jjn1wguhj-a.js +5 -0
- package/out/_next/static/chunks/{1so6ouxrq_ffa.js → 393--hagnnm97.js} +3 -3
- package/out/_next/static/chunks/39moagn46hde9.js +5 -0
- package/out/_next/static/chunks/3_0q-dmk8few_.css +1 -0
- package/out/_next/static/chunks/3_adkt8r_brx4.js +165 -0
- package/out/_next/static/chunks/3b1kt-r_75q1a.js +43 -0
- package/out/_next/static/chunks/3e38rrs6dszgt.js +8 -0
- package/out/_next/static/chunks/{01xy3u9ybz9ts.js → 3e7d8sb4289js.js} +2 -2
- package/out/_next/static/chunks/3ek1bahoqa_ll.js +5 -0
- package/out/_next/static/chunks/3ek680kdzjdr7.js +1 -0
- package/out/_next/static/chunks/3eth7s2-06yuz.js +1 -0
- package/out/_next/static/chunks/3exy4ii5maq4x.js +54 -0
- package/out/_next/static/chunks/3fevbt4ysloo8.js +8 -0
- package/out/_next/static/chunks/3fu072xwkf88o.js +6 -0
- package/out/_next/static/chunks/3h6a3clw5m5ro.js +4 -0
- package/out/_next/static/chunks/3hmoy4f23y1s4.js +147 -0
- package/out/_next/static/chunks/3i4_3b36nutw7.js +33 -0
- package/out/_next/static/chunks/3jfe0uesrzz7a.js +1 -0
- package/out/_next/static/chunks/3k01tdsm6l20w.js +54 -0
- package/out/_next/static/chunks/3lr6hkso67d68.js +6 -0
- package/out/_next/static/chunks/3lzin6_25n8rs.js +30 -0
- package/out/_next/static/chunks/3nrrzhhoy8amt.js +4 -0
- package/out/_next/static/chunks/3o-h2po9z09dk.js +4 -0
- package/out/_next/static/chunks/3onharcadlou0.js +327 -0
- package/out/_next/static/chunks/3pls-kicv4xu9.js +175 -0
- package/out/_next/static/chunks/3t48n1yk76zoa.js +1 -0
- package/out/_next/static/chunks/3t_520l4ihlg3.js +54 -0
- package/out/_next/static/chunks/3tg_clsx6ux4o.js +1 -0
- package/out/_next/static/chunks/3ttz1zgoq3xmp.js +1 -0
- package/out/_next/static/chunks/3uekb_s0jaboj.js +1 -0
- package/out/_next/static/chunks/3ujdligrod612.js +5 -0
- package/out/_next/static/chunks/3www97fxyknos.js +4 -0
- package/out/_next/static/chunks/3x_gia2m5w9_l.js +147 -0
- package/out/_next/static/chunks/{3j25u7rzawm9f.js → 3xs_undkbcqp7.js} +5 -5
- package/out/_next/static/chunks/3yktizlgzr6vc.js +4 -0
- package/out/_next/static/chunks/3ytp87o76hzmx.js +100 -0
- package/out/_next/static/chunks/40kvu3lk3s9h2.js +276 -0
- package/out/_next/static/chunks/41c4n9whpyrjc.js +7 -0
- package/out/_next/static/chunks/42dygj7ul4k54.js +33 -0
- package/out/_next/static/chunks/449x6nw2kd7l6.js +119 -0
- package/out/_next/static/chunks/44b7_q6pkf1k9.js +5 -0
- package/out/_next/static/chunks/44qc0zn0tudui.js +2 -0
- package/out/_next/static/chunks/45c05mbjow5wz.js +4 -0
- package/out/_next/static/chunks/{turbopack-2c3mg3r-05n1w.js → turbopack-077hmtqrhcoji.js} +1 -1
- package/out/_offline/index.html +3 -3
- package/out/account/forgot-password/index.html +3 -3
- package/out/account/index.html +3 -3
- package/out/assortments/AssortmentDetailPage/index.html +3 -3
- package/out/assortments/index.html +3 -3
- package/out/assortments/new/index.html +3 -3
- package/out/copilot/index.html +3 -3
- package/out/country/CountryDetailPage/index.html +3 -3
- package/out/country/index.html +3 -3
- package/out/country/new/index.html +3 -3
- package/out/currency/CurrencyDetailPage/index.html +3 -3
- package/out/currency/index.html +3 -3
- package/out/currency/new/index.html +3 -3
- package/out/delivery-provider/DeliveryProviderDetailPage/index.html +3 -3
- package/out/delivery-provider/index.html +3 -3
- package/out/delivery-provider/new/index.html +3 -3
- package/out/enrollments/EnrollmentDetailPage/index.html +3 -3
- package/out/enrollments/index.html +3 -3
- package/out/events/EventDetailPage/index.html +3 -3
- package/out/events/index.html +3 -3
- package/out/exports/index.html +3 -3
- package/out/ext/[[...slug]]/index.html +3 -3
- package/out/external/index.html +3 -3
- package/out/filters/FilterDetailPage/index.html +3 -3
- package/out/filters/index.html +3 -3
- package/out/filters/new/index.html +3 -3
- package/out/index.html +3 -3
- package/out/install/index.html +3 -3
- package/out/language/LanguageDetailPage/index.html +3 -3
- package/out/language/index.html +3 -3
- package/out/language/new/index.html +3 -3
- package/out/log-in/index.html +3 -3
- package/out/orders/OrderDetailPage/index.html +3 -3
- package/out/orders/index.html +3 -3
- package/out/payment-provider/PaymentProviderDetailPage/index.html +3 -3
- package/out/payment-provider/index.html +3 -3
- package/out/payment-provider/new/index.html +3 -3
- package/out/products/ProductDetailPage/index.html +3 -3
- package/out/products/index.html +3 -3
- package/out/products/new/index.html +3 -3
- package/out/quotations/QuotationDetailPage/index.html +3 -3
- package/out/quotations/index.html +3 -3
- package/out/reset-password/index.html +3 -3
- package/out/sign-up/index.html +3 -3
- package/out/styleguide/index.html +3 -3
- package/out/tokens/TokenDetailPage/index.html +3 -3
- package/out/tokens/index.html +3 -3
- package/out/users/UserDetailPage/index.html +3 -3
- package/out/users/index.html +3 -3
- package/out/users/new/index.html +3 -3
- package/out/verify-email/index.html +3 -3
- package/out/warehousing-provider/WarehousingProviderDetailPage/index.html +3 -3
- package/out/warehousing-provider/index.html +3 -3
- package/out/warehousing-provider/new/index.html +3 -3
- package/out/works/WorkDetailPage/index.html +3 -3
- package/out/works/WorkQueueListView/index.html +3 -3
- package/out/works/index.html +3 -3
- package/out/works/management/index.html +3 -3
- package/package.json +10 -10
- package/src/modules/accounts/hooks/logOut.ts +26 -0
- package/src/modules/accounts/hooks/useAddEmail.ts +34 -0
- package/src/modules/accounts/hooks/useAddWeb3Address.ts +38 -0
- package/src/modules/accounts/hooks/useAddWebAuthnCredentials.ts +48 -0
- package/src/modules/accounts/hooks/useBulkUserOperations.ts +91 -0
- package/src/modules/accounts/hooks/useChangePassword.ts +36 -0
- package/src/modules/accounts/hooks/useCreateUser.ts +74 -0
- package/src/modules/accounts/hooks/useCreateWebAuthnCredentialCreationOptions.ts +31 -0
- package/src/modules/accounts/hooks/useCreateWebAuthnCredentialRequestOptions.ts +30 -0
- package/src/modules/accounts/hooks/useCurrentUser.ts +44 -0
- package/src/modules/accounts/hooks/useDeleteUser.ts +26 -0
- package/src/modules/accounts/hooks/useEnrollUser.ts +48 -0
- package/src/modules/accounts/hooks/useForgotPassword.ts +35 -0
- package/src/modules/accounts/hooks/useGenerateLoginCredentials.ts +80 -0
- package/src/modules/accounts/hooks/useGenerateWebAuthCredentials.ts +102 -0
- package/src/modules/accounts/hooks/useLoginWithPassword.ts +65 -0
- package/src/modules/accounts/hooks/useLoginWithWebAuthn.ts +38 -0
- package/src/modules/accounts/hooks/useLogoutAllSessions.ts +27 -0
- package/src/modules/accounts/hooks/useRemoveBookmark.ts +36 -0
- package/src/modules/accounts/hooks/useRemoveEmail.ts +40 -0
- package/src/modules/accounts/hooks/useRemoveWeb3Address.ts +38 -0
- package/src/modules/accounts/hooks/useRemoveWebAuthCredentials.ts +36 -0
- package/src/modules/accounts/hooks/useResetPassword.ts +46 -0
- package/src/modules/accounts/hooks/useSendVerificationEmail.ts +35 -0
- package/src/modules/accounts/hooks/useSetPassword.ts +38 -0
- package/src/modules/accounts/hooks/useSetRoles.ts +40 -0
- package/src/modules/accounts/hooks/useSetUserTags.ts +48 -0
- package/src/modules/accounts/hooks/useSetUsername.ts +40 -0
- package/src/modules/accounts/hooks/useUpdateUserAvatar.ts +49 -0
- package/src/modules/accounts/hooks/useUpdateUserProfile.ts +40 -0
- package/src/modules/accounts/hooks/useUser.ts +201 -0
- package/src/modules/accounts/hooks/useUserBookmarks.ts +51 -0
- package/src/modules/accounts/hooks/useUserExport.ts +107 -0
- package/src/modules/accounts/hooks/useUserWebAuthnCredentials.ts +44 -0
- package/src/modules/accounts/hooks/useUsers.ts +82 -0
- package/src/modules/accounts/hooks/useUsersCount.ts +50 -0
- package/src/modules/accounts/hooks/useValidateEmailVerificationToken.ts +34 -0
- package/src/modules/accounts/hooks/useValidateResetPasswordToken.ts +35 -0
- package/src/modules/accounts/hooks/useVerifyEmail.ts +41 -0
- package/src/modules/accounts/hooks/useVerifyWeb3Address.ts +40 -0
- package/src/modules/assortment/fragments/AssortmentChildrenFragment.ts +16 -0
- package/src/modules/assortment/fragments/AssortmentFragment.ts +31 -0
- package/src/modules/assortment/fragments/AssortmentLinkFragment.ts +18 -0
- package/src/modules/assortment/fragments/AssortmentMediaFragment.ts +19 -0
- package/src/modules/assortment/fragments/AssortmentMediaTextsFragment.ts +12 -0
- package/src/modules/assortment/fragments/AssortmentTextsFragment.ts +14 -0
- package/src/modules/assortment/hooks/useAddAssortmentFilter.ts +46 -0
- package/src/modules/assortment/hooks/useAddAssortmentLink.ts +46 -0
- package/src/modules/assortment/hooks/useAddAssortmentMedia.ts +52 -0
- package/src/modules/assortment/hooks/useAddAssortmentProduct.ts +46 -0
- package/src/modules/assortment/hooks/useAssortment.ts +56 -0
- package/src/modules/assortment/hooks/useAssortmentChildren.ts +58 -0
- package/src/modules/assortment/hooks/useAssortmentExport.ts +60 -0
- package/src/modules/assortment/hooks/useAssortmentFilters.ts +51 -0
- package/src/modules/assortment/hooks/useAssortmentLinks.ts +54 -0
- package/src/modules/assortment/hooks/useAssortmentMedia.ts +57 -0
- package/src/modules/assortment/hooks/useAssortmentPaths.ts +39 -0
- package/src/modules/assortment/hooks/useAssortmentProducts.ts +62 -0
- package/src/modules/assortment/hooks/useAssortments.ts +103 -0
- package/src/modules/assortment/hooks/useAssortmentsCount.ts +51 -0
- package/src/modules/assortment/hooks/useBulkAssortmentOperations.ts +100 -0
- package/src/modules/assortment/hooks/useCreateAssortment.ts +55 -0
- package/src/modules/assortment/hooks/usePrepareAssortmentImport.ts +211 -0
- package/src/modules/assortment/hooks/useRemoveAssortment.ts +36 -0
- package/src/modules/assortment/hooks/useRemoveAssortmentFilter.ts +36 -0
- package/src/modules/assortment/hooks/useRemoveAssortmentLink.ts +36 -0
- package/src/modules/assortment/hooks/useRemoveAssortmentMedia.ts +36 -0
- package/src/modules/assortment/hooks/useRemoveAssortmentProduct.ts +36 -0
- package/src/modules/assortment/hooks/useReorderAssortmentFilters.ts +39 -0
- package/src/modules/assortment/hooks/useReorderAssortmentLinks.ts +37 -0
- package/src/modules/assortment/hooks/useReorderAssortmentMedia.ts +37 -0
- package/src/modules/assortment/hooks/useReorderAssortmentProducts.ts +39 -0
- package/src/modules/assortment/hooks/useTranslatedAssortmentMediaTexts.ts +41 -0
- package/src/modules/assortment/hooks/useTranslatedAssortmentTexts.ts +40 -0
- package/src/modules/assortment/hooks/useUpdateAssortment.ts +43 -0
- package/src/modules/assortment/hooks/useUpdateAssortmentMediaTexts.ts +45 -0
- package/src/modules/assortment/hooks/useUpdateAssortmentTexts.ts +42 -0
- package/src/modules/common/fragments/AddressFragment.ts +16 -0
- package/src/modules/common/hooks/useApp.ts +11 -0
- package/src/modules/common/hooks/useBulkActionConfirmation.tsx +68 -0
- package/src/modules/common/hooks/useBulkResultHandler.ts +83 -0
- package/src/modules/common/hooks/useBulkSelection.ts +86 -0
- package/src/modules/common/hooks/useCSVExport.ts +94 -0
- package/src/modules/common/hooks/useCSVImport.ts +69 -0
- package/src/modules/common/hooks/useChatEndpointChecker.ts +25 -0
- package/src/modules/common/hooks/useConfirmMediaUpload.ts +45 -0
- package/src/modules/common/hooks/useDashboardMetrics.ts +42 -0
- package/src/modules/common/hooks/useLocalStorage.ts +34 -0
- package/src/modules/common/hooks/useOrderAnalytics.ts +139 -0
- package/src/modules/common/hooks/useOrderItemsAnalytics.ts +107 -0
- package/src/modules/common/hooks/useOutsideClick.ts +29 -0
- package/src/modules/common/hooks/usePortal.ts +54 -0
- package/src/modules/common/hooks/useScrollRestoration.ts +123 -0
- package/src/modules/common/hooks/useShopConfiguration.ts +83 -0
- package/src/modules/common/hooks/useShopInfo.ts +65 -0
- package/src/modules/common/hooks/useStatusTypes.ts +29 -0
- package/src/modules/common/hooks/useSystemRoles.ts +29 -0
- package/src/modules/common/hooks/useTheme.ts +14 -0
- package/src/modules/copilot/hooks/useAvailableTools.ts +92 -0
- package/src/modules/copilot/hooks/useChatManager.ts +169 -0
- package/src/modules/copilot/hooks/useToolTextNormalizer.ts +84 -0
- package/src/modules/country/fragments/CountryFragment.ts +17 -0
- package/src/modules/country/hooks/useCountries.ts +66 -0
- package/src/modules/country/hooks/useCountry.ts +34 -0
- package/src/modules/country/hooks/useCreateCountry.ts +41 -0
- package/src/modules/country/hooks/useRemoveCountry.ts +38 -0
- package/src/modules/country/hooks/useUpdateCountry.ts +42 -0
- package/src/modules/currency/fragments/CurrencyFragment.ts +13 -0
- package/src/modules/currency/hooks/useCreateCurrency.ts +48 -0
- package/src/modules/currency/hooks/useCurrencies.ts +68 -0
- package/src/modules/currency/hooks/useCurrency.ts +34 -0
- package/src/modules/currency/hooks/useRemoveCurrency.ts +38 -0
- package/src/modules/currency/hooks/useUpdateCurrency.ts +47 -0
- package/src/modules/delivery-provider/hooks/useCreateDeliveryProvider.ts +67 -0
- package/src/modules/delivery-provider/hooks/useDeliveryInterfacesByType.ts +38 -0
- package/src/modules/delivery-provider/hooks/useDeliveryProvider.ts +60 -0
- package/src/modules/delivery-provider/hooks/useDeliveryProviderTypes.ts +34 -0
- package/src/modules/delivery-provider/hooks/useDeliveryProviders.ts +59 -0
- package/src/modules/delivery-provider/hooks/useRemoveDeliveryProvider.ts +38 -0
- package/src/modules/delivery-provider/hooks/useUpdateDeliveryProvider.ts +68 -0
- package/src/modules/enrollment/fragments/EnrollmentDetailFragment.ts +110 -0
- package/src/modules/enrollment/fragments/EnrollmentFragment.ts +66 -0
- package/src/modules/enrollment/hooks/useActivateEnrollment.ts +36 -0
- package/src/modules/enrollment/hooks/useEnrollment.ts +39 -0
- package/src/modules/enrollment/hooks/useEnrollments.ts +70 -0
- package/src/modules/enrollment/hooks/useSendEnrollmentEmail.ts +35 -0
- package/src/modules/enrollment/hooks/useSuspendEnrollment.ts +29 -0
- package/src/modules/enrollment/hooks/useTerminateEnrollment.ts +36 -0
- package/src/modules/enrollment/hooks/useUpdateEnrollmentPlan.ts +45 -0
- package/src/modules/enrollment/hooks/useUserEnrollments.ts +61 -0
- package/src/modules/event/fragments/EventFragment.ts +12 -0
- package/src/modules/event/hooks/useEvent.ts +32 -0
- package/src/modules/event/hooks/useEventTypes.ts +29 -0
- package/src/modules/event/hooks/useEvents.ts +77 -0
- package/src/modules/filter/fragments/FilterFragment.ts +24 -0
- package/src/modules/filter/fragments/FilterOptionFragment.ts +16 -0
- package/src/modules/filter/fragments/FilterTextsFragment.ts +12 -0
- package/src/modules/filter/hooks/useBulkFilterOperations.ts +59 -0
- package/src/modules/filter/hooks/useCreateFilter.ts +44 -0
- package/src/modules/filter/hooks/useCreateFilterOption.ts +42 -0
- package/src/modules/filter/hooks/useFilter.ts +44 -0
- package/src/modules/filter/hooks/useFilterExport.ts +35 -0
- package/src/modules/filter/hooks/useFilterOptions.ts +40 -0
- package/src/modules/filter/hooks/useFilterTypes.ts +34 -0
- package/src/modules/filter/hooks/useFilters.ts +78 -0
- package/src/modules/filter/hooks/useFiltersCount.ts +37 -0
- package/src/modules/filter/hooks/usePrepareFilterImport.ts +142 -0
- package/src/modules/filter/hooks/useRemoveFilter.ts +34 -0
- package/src/modules/filter/hooks/useRemoveFilterOption.ts +40 -0
- package/src/modules/filter/hooks/useTranslatedFilterTexts.ts +40 -0
- package/src/modules/filter/hooks/useUpdateFilter.ts +38 -0
- package/src/modules/filter/hooks/useUpdateFilterTexts.ts +48 -0
- package/src/modules/forms/hooks/useField.ts +151 -0
- package/src/modules/forms/hooks/useForm.ts +210 -0
- package/src/modules/forms/hooks/useFormContext.ts +7 -0
- package/src/modules/language/fragments/LanguageFragment.ts +13 -0
- package/src/modules/language/hooks/useCreateLanguage.ts +40 -0
- package/src/modules/language/hooks/useLanguage.ts +34 -0
- package/src/modules/language/hooks/useLanguages.ts +64 -0
- package/src/modules/language/hooks/useRemoveLanguage.ts +38 -0
- package/src/modules/language/hooks/useUpdateLanguage.ts +42 -0
- package/src/modules/modal/hooks/useModal.ts +8 -0
- package/src/modules/order/fragments/OrderDetailFragment.ts +255 -0
- package/src/modules/order/fragments/OrderFragment.ts +42 -0
- package/src/modules/order/hooks/useConfirmOrder.ts +36 -0
- package/src/modules/order/hooks/useDeliverOrder.ts +36 -0
- package/src/modules/order/hooks/useOrder.ts +35 -0
- package/src/modules/order/hooks/useOrders.ts +105 -0
- package/src/modules/order/hooks/usePayOrder.ts +36 -0
- package/src/modules/order/hooks/useRejectOrder.ts +36 -0
- package/src/modules/order/hooks/useRemoveOrder.ts +36 -0
- package/src/modules/order/hooks/useUserCart.ts +71 -0
- package/src/modules/order/hooks/useUserOrders.ts +65 -0
- package/src/modules/payment-providers/fragments/PaymentProviderFragment.ts +21 -0
- package/src/modules/payment-providers/hooks/useCreatePaymentProvider.ts +43 -0
- package/src/modules/payment-providers/hooks/usePaymentInterfacesByType.ts +38 -0
- package/src/modules/payment-providers/hooks/usePaymentProvider.ts +39 -0
- package/src/modules/payment-providers/hooks/usePaymentProviderTypes.ts +34 -0
- package/src/modules/payment-providers/hooks/usePaymentProviders.ts +42 -0
- package/src/modules/payment-providers/hooks/useRemovePaymentProvider.ts +38 -0
- package/src/modules/payment-providers/hooks/useUpdatePaymentProvider.ts +47 -0
- package/src/modules/product/fragments/ProductAssignmentFragment.ts +39 -0
- package/src/modules/product/fragments/ProductBriefFragment.ts +57 -0
- package/src/modules/product/fragments/ProductCatalogPriceFragment.ts +23 -0
- package/src/modules/product/fragments/ProductDetailFragment.ts +51 -0
- package/src/modules/product/fragments/ProductDimensionFragment.ts +12 -0
- package/src/modules/product/fragments/ProductMediaFragment.ts +24 -0
- package/src/modules/product/fragments/ProductMediaTextsFragment.ts +12 -0
- package/src/modules/product/fragments/ProductPlanConfigurationFragment.ts +14 -0
- package/src/modules/product/fragments/ProductTextsFragment.ts +17 -0
- package/src/modules/product/fragments/ProductVariationFragment.ts +27 -0
- package/src/modules/product/fragments/TokenFragment.ts +24 -0
- package/src/modules/product/hooks/useAddProductAssignment.ts +46 -0
- package/src/modules/product/hooks/useAddProductMedia.ts +47 -0
- package/src/modules/product/hooks/useBulkProductOperations.ts +123 -0
- package/src/modules/product/hooks/useCreateProduct.ts +72 -0
- package/src/modules/product/hooks/useCreateProductBundleItem.ts +40 -0
- package/src/modules/product/hooks/useCreateProductVariation.ts +46 -0
- package/src/modules/product/hooks/useCreateProductVariationOption.ts +46 -0
- package/src/modules/product/hooks/useExportToken.ts +51 -0
- package/src/modules/product/hooks/useMenuPosition.ts +34 -0
- package/src/modules/product/hooks/usePrepareProductImport.ts +350 -0
- package/src/modules/product/hooks/useProduct.ts +93 -0
- package/src/modules/product/hooks/useProductAssignments.ts +71 -0
- package/src/modules/product/hooks/useProductBundleItems.ts +61 -0
- package/src/modules/product/hooks/useProductCatalogPrices.ts +39 -0
- package/src/modules/product/hooks/useProductExport.ts +90 -0
- package/src/modules/product/hooks/useProductFulfillmentSimulation.ts +137 -0
- package/src/modules/product/hooks/useProductMedia.ts +44 -0
- package/src/modules/product/hooks/useProductPlan.ts +50 -0
- package/src/modules/product/hooks/useProductPlanConfigurationOptions.ts +42 -0
- package/src/modules/product/hooks/useProductReviews.ts +62 -0
- package/src/modules/product/hooks/useProductSupply.ts +52 -0
- package/src/modules/product/hooks/useProductTokenization.ts +51 -0
- package/src/modules/product/hooks/useProductVariationTypes.ts +34 -0
- package/src/modules/product/hooks/useProductVariations.ts +50 -0
- package/src/modules/product/hooks/useProductWarehousing.ts +45 -0
- package/src/modules/product/hooks/useProducts.ts +111 -0
- package/src/modules/product/hooks/useProductsCount.ts +50 -0
- package/src/modules/product/hooks/usePublishProduct.ts +39 -0
- package/src/modules/product/hooks/useReOrderProductMedia.ts +36 -0
- package/src/modules/product/hooks/useRemoveBundleItem.ts +37 -0
- package/src/modules/product/hooks/useRemoveProduct.ts +36 -0
- package/src/modules/product/hooks/useRemoveProductAssignment.ts +40 -0
- package/src/modules/product/hooks/useRemoveProductMedia.ts +36 -0
- package/src/modules/product/hooks/useRemoveProductVariation.ts +36 -0
- package/src/modules/product/hooks/useRemoveProductVariationOption.ts +43 -0
- package/src/modules/product/hooks/useScaffoldBundleItem.ts +38 -0
- package/src/modules/product/hooks/useScaffoldVariationProduct.ts +50 -0
- package/src/modules/product/hooks/useSmartContractStandards.ts +34 -0
- package/src/modules/product/hooks/useTranslatedProductMediaTexts.ts +39 -0
- package/src/modules/product/hooks/useTranslatedProductTexts.ts +42 -0
- package/src/modules/product/hooks/useUnPublishProduct.ts +39 -0
- package/src/modules/product/hooks/useUpdateProduct.ts +46 -0
- package/src/modules/product/hooks/useUpdateProductCommerce.ts +61 -0
- package/src/modules/product/hooks/useUpdateProductMediaTexts.ts +42 -0
- package/src/modules/product/hooks/useUpdateProductPlan.ts +54 -0
- package/src/modules/product/hooks/useUpdateProductSupply.ts +60 -0
- package/src/modules/product/hooks/useUpdateProductTexts.ts +39 -0
- package/src/modules/product/hooks/useUpdateProductTokenization.ts +51 -0
- package/src/modules/product/hooks/useUpdateProductVariationTexts.ts +50 -0
- package/src/modules/product/hooks/useUpdateProductWarehousing.ts +50 -0
- package/src/modules/product/hooks/useUserTokens.ts +48 -0
- package/src/modules/product-review/fragments/ProductReviewDetailFragment.ts +55 -0
- package/src/modules/product-review/hooks/useAddProductReviewVote.ts +55 -0
- package/src/modules/product-review/hooks/useCreateProductReview.ts +47 -0
- package/src/modules/product-review/hooks/useProductReviewsByProductId.ts +70 -0
- package/src/modules/product-review/hooks/useRemoveProductReview.ts +38 -0
- package/src/modules/product-review/hooks/useRemoveProductReviewVote.ts +43 -0
- package/src/modules/product-review/hooks/useUserProductReviews.ts +92 -0
- package/src/modules/quotation/fragments/QuotationDetailFragment.ts +70 -0
- package/src/modules/quotation/fragments/QuotationFragment.ts +54 -0
- package/src/modules/quotation/hooks/useMakeQuotationProposal.ts +41 -0
- package/src/modules/quotation/hooks/useQuotation.ts +37 -0
- package/src/modules/quotation/hooks/useQuotations.ts +61 -0
- package/src/modules/quotation/hooks/useRejectQuotation.ts +41 -0
- package/src/modules/quotation/hooks/useUserQuotations.ts +60 -0
- package/src/modules/quotation/hooks/useVerifyQuotation.ts +41 -0
- package/src/modules/search/fragments/GlobalSearchFragment.ts +20 -0
- package/src/modules/search/hooks/useGlobalSearch.ts +168 -0
- package/src/modules/token/hooks/useInvalidateTicket.ts +27 -0
- package/src/modules/token/hooks/useToken.ts +64 -0
- package/src/modules/token/hooks/useTokens.ts +72 -0
- package/src/modules/warehousing-providers/fragments/WarehousingProviderFragment.ts +21 -0
- package/src/modules/warehousing-providers/hooks/useCreateWarehousingProvider.ts +46 -0
- package/src/modules/warehousing-providers/hooks/useRemoveWarehousingProvider.ts +38 -0
- package/src/modules/warehousing-providers/hooks/useUpdateWarehousingProvider.ts +47 -0
- package/src/modules/warehousing-providers/hooks/useWarehousingInterfacesByType.ts +38 -0
- package/src/modules/warehousing-providers/hooks/useWarehousingProvider.ts +39 -0
- package/src/modules/warehousing-providers/hooks/useWarehousingProviderTypes.ts +34 -0
- package/src/modules/warehousing-providers/hooks/useWarehousingProviders.ts +41 -0
- package/src/modules/work/fragments/WorkFragment.ts +24 -0
- package/src/modules/work/hooks/useActiveWorkTypes.ts +29 -0
- package/src/modules/work/hooks/useAddWork.ts +62 -0
- package/src/modules/work/hooks/useAllocateWork.ts +40 -0
- package/src/modules/work/hooks/useRecentExports.ts +129 -0
- package/src/modules/work/hooks/useRegisteredWorkTypes.ts +27 -0
- package/src/modules/work/hooks/useRemoveWork.ts +36 -0
- package/src/modules/work/hooks/useWork.ts +42 -0
- package/src/modules/work/hooks/useWorkQueue.ts +98 -0
- package/src/sdk/README.md +2 -2
- package/out/_next/static/BPoacQET3TJr2q9E370Ez/_buildManifest.js +0 -262
- package/out/_next/static/chunks/02ir8k2vqhw7u.js +0 -4
- package/out/_next/static/chunks/03mdkmx9pb3yx.js +0 -28
- package/out/_next/static/chunks/03spbldywp99b.js +0 -31
- package/out/_next/static/chunks/0531sa8v36e39.js +0 -1
- package/out/_next/static/chunks/065ltxdt7s8b2.js +0 -134
- package/out/_next/static/chunks/06b1jza2fvc6f.js +0 -4
- package/out/_next/static/chunks/0701uizxsgs75.js +0 -4
- package/out/_next/static/chunks/09olk50zbo5r6.js +0 -5
- package/out/_next/static/chunks/09pabifvs84zb.js +0 -12
- package/out/_next/static/chunks/0agx-csdwbk-x.js +0 -5
- package/out/_next/static/chunks/0clmvy-auef0p.js +0 -14
- package/out/_next/static/chunks/0czktxcs2aa12.js +0 -1
- package/out/_next/static/chunks/0d_qylr054ab-.js +0 -5
- package/out/_next/static/chunks/0e2znhpcecrqs.js +0 -175
- package/out/_next/static/chunks/0ef4vp3ehm369.js +0 -4
- package/out/_next/static/chunks/0fggi8jpi5gjk.js +0 -165
- package/out/_next/static/chunks/0gyabz3vqllr6.js +0 -83
- package/out/_next/static/chunks/0j05dboa5_xkw.js +0 -5
- package/out/_next/static/chunks/0kr4ift9_1a3s.js +0 -1
- package/out/_next/static/chunks/0l8tmlevl_6p0.js +0 -1
- package/out/_next/static/chunks/0o91usftba97q.js +0 -54
- package/out/_next/static/chunks/0oi1kpp0levnm.js +0 -1
- package/out/_next/static/chunks/0p86ng98eiz5q.js +0 -11
- package/out/_next/static/chunks/0pw1zl8_l93xl.js +0 -5
- package/out/_next/static/chunks/0py8-umjmwiwi.js +0 -156
- package/out/_next/static/chunks/0q0m2pv-3b2e2.js +0 -4
- package/out/_next/static/chunks/0r57e83u39trg.js +0 -5
- package/out/_next/static/chunks/0r9a_mcjh1k24.js +0 -6
- package/out/_next/static/chunks/0rgtc82y8z7_x.js +0 -5
- package/out/_next/static/chunks/0rxhx_x-7dojh.js +0 -182
- package/out/_next/static/chunks/0teb3b5h78855.js +0 -44
- package/out/_next/static/chunks/0thsuuvsozjop.js +0 -54
- package/out/_next/static/chunks/0v6x3uondh5hw.js +0 -5
- package/out/_next/static/chunks/0v_uz3j8jolmq.js +0 -4
- package/out/_next/static/chunks/0vwmp6qrw7odm.js +0 -7
- package/out/_next/static/chunks/0w6t6v_jzrudq.js +0 -4
- package/out/_next/static/chunks/0w7gz501ry22r.js +0 -4
- package/out/_next/static/chunks/0xgn-89s97a5w.js +0 -1
- package/out/_next/static/chunks/0xqtemh7t38y9.js +0 -119
- package/out/_next/static/chunks/1-1rj15j67dqt.js +0 -1
- package/out/_next/static/chunks/10drou7w-k58p.js +0 -4
- package/out/_next/static/chunks/11w7hldkge7sg.js +0 -8
- package/out/_next/static/chunks/130c8cta7pec6.js +0 -1
- package/out/_next/static/chunks/13qi39a_b6gkv.js +0 -1
- package/out/_next/static/chunks/15142badc5ufq.js +0 -4
- package/out/_next/static/chunks/155boltbcvwo-.js +0 -63
- package/out/_next/static/chunks/15_nwd8p454gd.js +0 -1
- package/out/_next/static/chunks/15s4qkdyz56pg.js +0 -115
- package/out/_next/static/chunks/15vdx0kewzv-6.js +0 -33
- package/out/_next/static/chunks/16shuavdpgni8.js +0 -327
- package/out/_next/static/chunks/170j06y4-47o4.js +0 -5
- package/out/_next/static/chunks/18a5kibvycb6u.js +0 -1
- package/out/_next/static/chunks/1_bckhq06wfmb.js +0 -4
- package/out/_next/static/chunks/1_ymf_rfke1aw.js +0 -6
- package/out/_next/static/chunks/1a1m389awxw4k.js +0 -1
- package/out/_next/static/chunks/1albq_5cppsa1.js +0 -5
- package/out/_next/static/chunks/1bhibqf8k2-z1.js +0 -117
- package/out/_next/static/chunks/1bxesp6kakz8_.js +0 -353
- package/out/_next/static/chunks/1d80ahah359g5.js +0 -174
- package/out/_next/static/chunks/1dbjry-rs_5we.js +0 -1
- package/out/_next/static/chunks/1dlr1eig6zpl1.js +0 -12
- package/out/_next/static/chunks/1gq8ickcg_vmv.js +0 -147
- package/out/_next/static/chunks/1gyrsx1nip-lm.js +0 -2
- package/out/_next/static/chunks/1hma23kynopdj.js +0 -3
- package/out/_next/static/chunks/1i996uxxmc736.js +0 -234
- package/out/_next/static/chunks/1ivhp-mi-5l--.js +0 -57
- package/out/_next/static/chunks/1ktkks-wpk8q-.js +0 -1
- package/out/_next/static/chunks/1kz62r46jwi0y.js +0 -5
- package/out/_next/static/chunks/1lex3myb5hmsw.js +0 -1
- package/out/_next/static/chunks/1lha1nklxo2g7.js +0 -1
- package/out/_next/static/chunks/1mwmcucidjio0.js +0 -8
- package/out/_next/static/chunks/1mzejejof4s6g.js +0 -147
- package/out/_next/static/chunks/1os6pvhjeb16o.js +0 -1
- package/out/_next/static/chunks/1p937fyqa7ssz.js +0 -1
- package/out/_next/static/chunks/1po7d3udj6iv4.js +0 -5
- package/out/_next/static/chunks/1qxxbcidu-hmv.js +0 -1
- package/out/_next/static/chunks/1re4i2t_po4sr.js +0 -95
- package/out/_next/static/chunks/1s4oi1bw8zl5d.js +0 -31
- package/out/_next/static/chunks/1sb04cqudnfpj.js +0 -4
- package/out/_next/static/chunks/1uom050rz5iol.js +0 -272
- package/out/_next/static/chunks/1uymuiqrms2h8.js +0 -103
- package/out/_next/static/chunks/1wijj_fal57co.js +0 -2
- package/out/_next/static/chunks/1wpen9t3_zbte.js +0 -1
- package/out/_next/static/chunks/1wpv1sl7vwg04.js +0 -99
- package/out/_next/static/chunks/1y3poj860g968.js +0 -24
- package/out/_next/static/chunks/1yk0pxcl4urkd.js +0 -4
- package/out/_next/static/chunks/1z2rl3h7scna4.js +0 -7
- package/out/_next/static/chunks/1zyhq82pkterc.js +0 -61
- package/out/_next/static/chunks/2-zr9-ri30va5.css +0 -1
- package/out/_next/static/chunks/20j8cdot33hql.js +0 -13
- package/out/_next/static/chunks/21fo9zerxyx-l.js +0 -59
- package/out/_next/static/chunks/22sxsq82r3cwy.js +0 -41
- package/out/_next/static/chunks/23nwkbry8kz0-.js +0 -1
- package/out/_next/static/chunks/259ckrmoldaqg.js +0 -5
- package/out/_next/static/chunks/25y2dqqrhstuq.js +0 -5
- package/out/_next/static/chunks/28myh-gi8t3t7.js +0 -7
- package/out/_next/static/chunks/29y82c6-u55hj.js +0 -5
- package/out/_next/static/chunks/2ahlen2u4lbnm.js +0 -16
- package/out/_next/static/chunks/2c3ehieqiwiw8.js +0 -119
- package/out/_next/static/chunks/2c5gq6izeq6nx.js +0 -81
- package/out/_next/static/chunks/2cj8g3fxmitaa.js +0 -1
- package/out/_next/static/chunks/2d9lzme_uzwvq.js +0 -1
- package/out/_next/static/chunks/2dqoft2pp4355.js +0 -1
- package/out/_next/static/chunks/2gso7_8v7owco.js +0 -1
- package/out/_next/static/chunks/2hc4nowrexhn3.js +0 -100
- package/out/_next/static/chunks/2hoi6cb1lromr.js +0 -4
- package/out/_next/static/chunks/2hw2_8kkf_2fg.js +0 -1
- package/out/_next/static/chunks/2kd4p_esjbozz.js +0 -21
- package/out/_next/static/chunks/2lwhn1ypqwukz.js +0 -11
- package/out/_next/static/chunks/2oz432iieo_c6.js +0 -43
- package/out/_next/static/chunks/2qjnhmz4c5fq1.js +0 -23
- package/out/_next/static/chunks/2rdjgc7_za785.js +0 -9
- package/out/_next/static/chunks/2ru66cyp0hbxn.js +0 -103
- package/out/_next/static/chunks/2ung-az_h871_.js +0 -4
- package/out/_next/static/chunks/2v4rvvdyh028e.js +0 -1
- package/out/_next/static/chunks/2vsl3-revotpl.js +0 -43
- package/out/_next/static/chunks/2wbc_9uwtsjbp.js +0 -15
- package/out/_next/static/chunks/2xixk0t9e9mnw.js +0 -1
- package/out/_next/static/chunks/2y6i_xssusr93.js +0 -1
- package/out/_next/static/chunks/2y_t26eglpeka.js +0 -4
- package/out/_next/static/chunks/3-hgyqm9mhcm9.js +0 -33
- package/out/_next/static/chunks/364y5vueeinvz.js +0 -276
- package/out/_next/static/chunks/366b9y413lk4d.js +0 -33
- package/out/_next/static/chunks/36vauyb71ot_b.js +0 -61
- package/out/_next/static/chunks/394m309ssmlo3.js +0 -5
- package/out/_next/static/chunks/39pveojee3ma1.js +0 -33
- package/out/_next/static/chunks/3_--novhq2u1q.js +0 -807
- package/out/_next/static/chunks/3apnk6kuvwze8.js +0 -5
- package/out/_next/static/chunks/3b0868kyqqkn3.js +0 -5
- package/out/_next/static/chunks/3dyd0ilb-ee5w.js +0 -8
- package/out/_next/static/chunks/3eftzknnu45-s.js +0 -1
- package/out/_next/static/chunks/3ejsx4af27cct.js +0 -7
- package/out/_next/static/chunks/3es4yddhl8uwc.js +0 -7
- package/out/_next/static/chunks/3inp15oicq85k.js +0 -1
- package/out/_next/static/chunks/3kd-t_qz3nxh7.js +0 -30
- package/out/_next/static/chunks/3kl8vv7w9jkjr.js +0 -23
- package/out/_next/static/chunks/3kmfx3f7oyfdm.js +0 -5
- package/out/_next/static/chunks/3koj4-48a7p_9.js +0 -4
- package/out/_next/static/chunks/3l7glrtu8ueuo.js +0 -4
- package/out/_next/static/chunks/3lgq9oa_2erwo.js +0 -5
- package/out/_next/static/chunks/3muxcxam24i5z.js +0 -1
- package/out/_next/static/chunks/3nimt7ngr5zv6.js +0 -46
- package/out/_next/static/chunks/3pwezwpggrz59.js +0 -74
- package/out/_next/static/chunks/3r02t7a7jknrv.js +0 -7
- package/out/_next/static/chunks/3s40iuaou1rt4.js +0 -1
- package/out/_next/static/chunks/3selzn479n73i.js +0 -16
- package/out/_next/static/chunks/3srflqnqdfd60.js +0 -5
- package/out/_next/static/chunks/3t57k35xu2eo8.js +0 -5
- package/out/_next/static/chunks/3tu90a7do336z.js +0 -12
- package/out/_next/static/chunks/3ukgj2jzxf10n.js +0 -5
- package/out/_next/static/chunks/3vosu-lpiis6v.js +0 -5
- package/out/_next/static/chunks/3xaz8fvw2x6b3.js +0 -5
- package/out/_next/static/chunks/3xgjhwzul66dp.js +0 -4
- package/out/_next/static/chunks/3zze6y1x00k__.js +0 -165
- package/out/_next/static/chunks/40730dyt912zu.js +0 -5
- package/out/_next/static/chunks/40f26tfp8txip.js +0 -5
- package/out/_next/static/chunks/40kc42ezz2dri.js +0 -1
- package/out/_next/static/chunks/41f60q88qcigi.js +0 -39
- package/out/_next/static/chunks/41l5iphw-rna3.js +0 -44
- package/out/_next/static/chunks/423kk9x5t9_b8.js +0 -5
- package/out/_next/static/chunks/42k5e3tr3uyzs.js +0 -54
- package/out/_next/static/chunks/4481d7yj7bm2q.js +0 -5
- package/out/_next/static/chunks/448is1kpt9eaa.js +0 -39
- package/out/_next/static/chunks/44fkzg2e80pqt.js +0 -8
- /package/out/_next/static/{BPoacQET3TJr2q9E370Ez → bg3Z_ZBjStiTvJAHlsPDE}/_clientMiddlewareManifest.js +0 -0
- /package/out/_next/static/{BPoacQET3TJr2q9E370Ez → bg3Z_ZBjStiTvJAHlsPDE}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { gql } from '@apollo/client';
|
|
2
|
+
import { useMutation } from '@apollo/client/react';
|
|
3
|
+
import {
|
|
4
|
+
IUpdateFilterTextsMutation,
|
|
5
|
+
IUpdateFilterTextsMutationVariables,
|
|
6
|
+
} from '../../../gql/types';
|
|
7
|
+
import FilterTextsFragment from '../fragments/FilterTextsFragment';
|
|
8
|
+
|
|
9
|
+
const UpdateFilterTextsMutation = gql`
|
|
10
|
+
mutation UpdateFilterTexts(
|
|
11
|
+
$filterId: ID!
|
|
12
|
+
$filterOptionValue: String
|
|
13
|
+
$texts: [FilterTextInput!]!
|
|
14
|
+
) {
|
|
15
|
+
updateFilterTexts(
|
|
16
|
+
filterId: $filterId
|
|
17
|
+
filterOptionValue: $filterOptionValue
|
|
18
|
+
texts: $texts
|
|
19
|
+
) {
|
|
20
|
+
...FilterTextsFragment
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
${FilterTextsFragment}
|
|
24
|
+
`;
|
|
25
|
+
|
|
26
|
+
const useUpdateFilterTexts = () => {
|
|
27
|
+
const [updateFilterTextsMutation] = useMutation<
|
|
28
|
+
IUpdateFilterTextsMutation,
|
|
29
|
+
IUpdateFilterTextsMutationVariables
|
|
30
|
+
>(UpdateFilterTextsMutation);
|
|
31
|
+
|
|
32
|
+
const updateFilterTexts = async ({
|
|
33
|
+
filterId,
|
|
34
|
+
filterOptionValue,
|
|
35
|
+
texts,
|
|
36
|
+
}: IUpdateFilterTextsMutationVariables) => {
|
|
37
|
+
return updateFilterTextsMutation({
|
|
38
|
+
variables: { filterOptionValue, filterId, texts },
|
|
39
|
+
refetchQueries: ['TranslatedFilterTexts', 'FilterOptions'],
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
return {
|
|
44
|
+
updateFilterTexts,
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export default useUpdateFilterTexts;
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { useRef } from 'react';
|
|
2
|
+
import { useIntl } from 'react-intl';
|
|
3
|
+
import { useController } from 'react-hook-form';
|
|
4
|
+
|
|
5
|
+
import { Validator, validateRequired } from '../lib/validators';
|
|
6
|
+
import useFormContext from './useFormContext';
|
|
7
|
+
|
|
8
|
+
export interface CommonFieldProps {
|
|
9
|
+
name?: string;
|
|
10
|
+
id?: string;
|
|
11
|
+
required?: boolean;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
value?: string;
|
|
14
|
+
autoComplete?: 'on' | 'off';
|
|
15
|
+
label?: string;
|
|
16
|
+
errorMessage?: string;
|
|
17
|
+
help?: string;
|
|
18
|
+
className?: string;
|
|
19
|
+
labelClassName?: string;
|
|
20
|
+
containerClassName?: string;
|
|
21
|
+
inputClassName?: string;
|
|
22
|
+
placeholder?: string;
|
|
23
|
+
hideLabel?: boolean;
|
|
24
|
+
onChange?: (event: any) => void;
|
|
25
|
+
[key: string]: any;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface FieldHookProps extends CommonFieldProps {
|
|
29
|
+
validators?: Validator[];
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface ComputedProps extends CommonFieldProps {
|
|
33
|
+
error?: string;
|
|
34
|
+
onChange: (event: any) => void;
|
|
35
|
+
onBlur: () => void;
|
|
36
|
+
setValue: (value: any, options?: any) => void;
|
|
37
|
+
setError: (message: string) => void;
|
|
38
|
+
setTouched: (touched: boolean) => void;
|
|
39
|
+
value: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const useField = (props: FieldHookProps): ComputedProps => {
|
|
43
|
+
const intl = useIntl();
|
|
44
|
+
|
|
45
|
+
const { rhf, ...form }: any = useFormContext();
|
|
46
|
+
|
|
47
|
+
const {
|
|
48
|
+
name,
|
|
49
|
+
required,
|
|
50
|
+
errorMessage,
|
|
51
|
+
disabled = form.disabled || rhf?.formState?.isSubmitting,
|
|
52
|
+
label = intl.formatMessage({
|
|
53
|
+
id: name,
|
|
54
|
+
defaultMessage: 'default_input_name',
|
|
55
|
+
description:
|
|
56
|
+
"DO not translate Skip this as it's the default given label when a component is not provided explicit label",
|
|
57
|
+
}),
|
|
58
|
+
validators = [],
|
|
59
|
+
} = props;
|
|
60
|
+
|
|
61
|
+
const combinedValidators = [
|
|
62
|
+
...validators,
|
|
63
|
+
required && validateRequired,
|
|
64
|
+
].filter(Boolean);
|
|
65
|
+
|
|
66
|
+
const validate = (value) => {
|
|
67
|
+
return combinedValidators.reduce(
|
|
68
|
+
(acc: string, { isValid, intlMessageDescriptor, intlMessageValues }) => {
|
|
69
|
+
if (acc) return acc;
|
|
70
|
+
|
|
71
|
+
if (!isValid(value))
|
|
72
|
+
return (
|
|
73
|
+
errorMessage ||
|
|
74
|
+
intl.formatMessage(intlMessageDescriptor, {
|
|
75
|
+
label,
|
|
76
|
+
...intlMessageValues,
|
|
77
|
+
})
|
|
78
|
+
);
|
|
79
|
+
return acc;
|
|
80
|
+
},
|
|
81
|
+
'',
|
|
82
|
+
);
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
const validateRef = useRef(validate);
|
|
86
|
+
validateRef.current = validate;
|
|
87
|
+
|
|
88
|
+
const { field, fieldState, formState } = useController({
|
|
89
|
+
name,
|
|
90
|
+
control: rhf?.control,
|
|
91
|
+
rules: {
|
|
92
|
+
validate: (value) => {
|
|
93
|
+
const error = validateRef.current(value);
|
|
94
|
+
return error || true;
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
const error =
|
|
100
|
+
(fieldState.isTouched || formState.isSubmitted) &&
|
|
101
|
+
fieldState.error?.message;
|
|
102
|
+
|
|
103
|
+
const onChange = (event) => {
|
|
104
|
+
if (props.onChange) {
|
|
105
|
+
props.onChange(event);
|
|
106
|
+
}
|
|
107
|
+
if (props.type === 'number') {
|
|
108
|
+
const raw = event?.target?.value;
|
|
109
|
+
const num = raw === '' || raw == null ? null : Number(raw);
|
|
110
|
+
field.onChange(num);
|
|
111
|
+
} else {
|
|
112
|
+
field.onChange(event);
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
const isNullOrUndefined = (v) => {
|
|
117
|
+
return v === null || v === undefined;
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
return {
|
|
121
|
+
...props,
|
|
122
|
+
name,
|
|
123
|
+
error,
|
|
124
|
+
label,
|
|
125
|
+
disabled,
|
|
126
|
+
required,
|
|
127
|
+
onChange,
|
|
128
|
+
onBlur: field.onBlur,
|
|
129
|
+
value: isNullOrUndefined(field.value) ? '' : field.value,
|
|
130
|
+
setValue: (value: any, shouldValidate?: boolean) => {
|
|
131
|
+
rhf?.setValue(name, value, {
|
|
132
|
+
shouldDirty: true,
|
|
133
|
+
shouldValidate: shouldValidate ?? false,
|
|
134
|
+
});
|
|
135
|
+
},
|
|
136
|
+
setError: (message: string) => {
|
|
137
|
+
if (message) {
|
|
138
|
+
rhf?.setError(name, { type: 'manual', message });
|
|
139
|
+
} else {
|
|
140
|
+
rhf?.clearErrors(name);
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
setTouched: (touched: boolean) => {
|
|
144
|
+
if (touched) {
|
|
145
|
+
rhf?.trigger(name);
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
};
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
export default useField;
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
import { useState, useCallback, useMemo } from 'react';
|
|
2
|
+
import { useForm as useRHF } from 'react-hook-form';
|
|
3
|
+
import { useIntl } from 'react-intl';
|
|
4
|
+
import { toast } from 'react-toastify';
|
|
5
|
+
import clean from '../lib/clean';
|
|
6
|
+
import { CombinedGraphQLErrors } from '@apollo/client';
|
|
7
|
+
|
|
8
|
+
export type OnSubmitSuccessType = (
|
|
9
|
+
result: boolean,
|
|
10
|
+
values: Record<string, any>,
|
|
11
|
+
) => Promise<boolean> | boolean;
|
|
12
|
+
|
|
13
|
+
export type OnSubmitType = (
|
|
14
|
+
variables: Record<string, any>,
|
|
15
|
+
) => Promise<{ success: boolean; data?: any; error?: any }>;
|
|
16
|
+
|
|
17
|
+
// Convert react-hook-form's error tree ({ type, message, ref } leaves) into
|
|
18
|
+
// plain message strings at the leaves, stripping refs.
|
|
19
|
+
const stripToMessages = (errors: any) => {
|
|
20
|
+
if (!errors || typeof errors !== 'object') return errors;
|
|
21
|
+
if (typeof errors.message === 'string' && errors.message)
|
|
22
|
+
return errors.message;
|
|
23
|
+
if (Array.isArray(errors)) return errors.map((v) => stripToMessages(v));
|
|
24
|
+
return Object.fromEntries(
|
|
25
|
+
Object.entries(errors)
|
|
26
|
+
.filter(([k]) => k !== 'ref')
|
|
27
|
+
.map(([k, v]) => [k, stripToMessages(v)]),
|
|
28
|
+
);
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export interface FormAPI {
|
|
32
|
+
setFieldError: (name: string, message: string) => void;
|
|
33
|
+
setFieldValue: (name: string, value: any) => void;
|
|
34
|
+
setValues: (values: Record<string, any>) => void;
|
|
35
|
+
values: Record<string, any>;
|
|
36
|
+
isValid: boolean;
|
|
37
|
+
isSubmitting: boolean;
|
|
38
|
+
handleSubmit: (e?: React.BaseSyntheticEvent) => void;
|
|
39
|
+
handleReset: (e?: React.BaseSyntheticEvent) => void;
|
|
40
|
+
resetForm: (nextValues?: Record<string, any>) => void;
|
|
41
|
+
submitForm: () => void;
|
|
42
|
+
getFieldMeta: (name: string) => {
|
|
43
|
+
error: string | undefined;
|
|
44
|
+
touched: boolean;
|
|
45
|
+
};
|
|
46
|
+
initialValues: Record<string, any>;
|
|
47
|
+
errors: Record<string, any>;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const useForm = ({
|
|
51
|
+
submit,
|
|
52
|
+
getSubmitErrorMessage = () => '',
|
|
53
|
+
onSubmitSuccess = () => true,
|
|
54
|
+
initialValues,
|
|
55
|
+
initialErrors,
|
|
56
|
+
initialTouched,
|
|
57
|
+
successMessage,
|
|
58
|
+
enableReinitialize,
|
|
59
|
+
validate,
|
|
60
|
+
disabled = false,
|
|
61
|
+
}: {
|
|
62
|
+
submit: OnSubmitType;
|
|
63
|
+
getSubmitErrorMessage?: (error?: Error | any) => string;
|
|
64
|
+
onSubmitSuccess?: OnSubmitSuccessType;
|
|
65
|
+
initialValues: Record<string, any>;
|
|
66
|
+
initialTouched?: Record<string, boolean>;
|
|
67
|
+
initialErrors?: Record<string, string>;
|
|
68
|
+
enableReinitialize?: boolean;
|
|
69
|
+
successMessage?: string;
|
|
70
|
+
disabled?: boolean;
|
|
71
|
+
validate?: (
|
|
72
|
+
values: Record<string, any>,
|
|
73
|
+
) => void | object | Promise<Record<string, string>>;
|
|
74
|
+
}) => {
|
|
75
|
+
const intl = useIntl();
|
|
76
|
+
const [submitError, setSubmitError] = useState('');
|
|
77
|
+
|
|
78
|
+
const rhf = useRHF({
|
|
79
|
+
mode: 'onTouched',
|
|
80
|
+
defaultValues: initialValues,
|
|
81
|
+
values: enableReinitialize ? initialValues : undefined,
|
|
82
|
+
errors: initialErrors
|
|
83
|
+
? Object.fromEntries(
|
|
84
|
+
Object.entries(initialErrors).map(([key, message]) => [
|
|
85
|
+
key,
|
|
86
|
+
{ type: 'manual', message },
|
|
87
|
+
]),
|
|
88
|
+
)
|
|
89
|
+
: undefined,
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
const parseError = useCallback(
|
|
93
|
+
(combinedError) => {
|
|
94
|
+
const error = (combinedError as CombinedGraphQLErrors)?.errors?.[0];
|
|
95
|
+
return intl.formatMessage(
|
|
96
|
+
{
|
|
97
|
+
id: 'error_server',
|
|
98
|
+
defaultMessage: '{details}',
|
|
99
|
+
},
|
|
100
|
+
{ details: error?.message || '' },
|
|
101
|
+
);
|
|
102
|
+
},
|
|
103
|
+
[intl],
|
|
104
|
+
);
|
|
105
|
+
|
|
106
|
+
const onSubmit = useCallback(
|
|
107
|
+
async (values) => {
|
|
108
|
+
let reset = true;
|
|
109
|
+
try {
|
|
110
|
+
const result = await submit(clean(values));
|
|
111
|
+
|
|
112
|
+
const success =
|
|
113
|
+
(typeof result === 'boolean' ? result : result?.success) ??
|
|
114
|
+
!result?.error;
|
|
115
|
+
if (success) {
|
|
116
|
+
if (successMessage) toast.success(successMessage);
|
|
117
|
+
await onSubmitSuccess(success, result?.data || values);
|
|
118
|
+
} else {
|
|
119
|
+
const errors = typeof result === 'boolean' ? !result : result?.error;
|
|
120
|
+
|
|
121
|
+
if (Array.isArray(errors)) {
|
|
122
|
+
errors.forEach((error) => {
|
|
123
|
+
reset = false;
|
|
124
|
+
setSubmitError(getSubmitErrorMessage(error) || parseError(error));
|
|
125
|
+
});
|
|
126
|
+
} else if (typeof errors === 'string') {
|
|
127
|
+
reset = false;
|
|
128
|
+
setSubmitError(getSubmitErrorMessage(errors) || parseError(errors));
|
|
129
|
+
} else if (typeof errors === 'object' && errors !== null) {
|
|
130
|
+
reset = false;
|
|
131
|
+
setSubmitError(getSubmitErrorMessage(errors) || parseError(errors));
|
|
132
|
+
} else {
|
|
133
|
+
reset = false;
|
|
134
|
+
setSubmitError(getSubmitErrorMessage(errors) || parseError(errors));
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
} catch (error) {
|
|
138
|
+
reset = false;
|
|
139
|
+
setSubmitError(getSubmitErrorMessage(error) || parseError(error));
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
if (reset) {
|
|
143
|
+
setSubmitError('');
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
[
|
|
147
|
+
submit,
|
|
148
|
+
successMessage,
|
|
149
|
+
onSubmitSuccess,
|
|
150
|
+
getSubmitErrorMessage,
|
|
151
|
+
parseError,
|
|
152
|
+
],
|
|
153
|
+
);
|
|
154
|
+
|
|
155
|
+
const api: FormAPI = useMemo(
|
|
156
|
+
() => ({
|
|
157
|
+
setFieldError: (name: string, message: string) => {
|
|
158
|
+
rhf.setError(name, { type: 'manual', message });
|
|
159
|
+
},
|
|
160
|
+
setFieldValue: (name: string, value: any) => {
|
|
161
|
+
rhf.setValue(name, value, { shouldDirty: true, shouldTouch: true });
|
|
162
|
+
},
|
|
163
|
+
setValues: (values: Record<string, any>) => {
|
|
164
|
+
rhf.reset(values, { keepDirtyValues: false, keepErrors: false });
|
|
165
|
+
},
|
|
166
|
+
get values() {
|
|
167
|
+
return rhf.getValues();
|
|
168
|
+
},
|
|
169
|
+
get isValid() {
|
|
170
|
+
return rhf.formState.isValid;
|
|
171
|
+
},
|
|
172
|
+
get isSubmitting() {
|
|
173
|
+
return rhf.formState.isSubmitting;
|
|
174
|
+
},
|
|
175
|
+
handleSubmit: rhf.handleSubmit(onSubmit),
|
|
176
|
+
handleReset: () => {
|
|
177
|
+
rhf.reset();
|
|
178
|
+
},
|
|
179
|
+
resetForm: (nextValues?: Record<string, any>) => {
|
|
180
|
+
rhf.reset(nextValues || initialValues);
|
|
181
|
+
},
|
|
182
|
+
submitForm: () => {
|
|
183
|
+
rhf.handleSubmit(onSubmit)();
|
|
184
|
+
},
|
|
185
|
+
getFieldMeta: (name: string) => {
|
|
186
|
+
const fieldState = rhf.getFieldState(name, rhf.formState);
|
|
187
|
+
return {
|
|
188
|
+
error: fieldState.error?.message,
|
|
189
|
+
touched: fieldState.isTouched,
|
|
190
|
+
};
|
|
191
|
+
},
|
|
192
|
+
get initialValues() {
|
|
193
|
+
return initialValues;
|
|
194
|
+
},
|
|
195
|
+
get errors() {
|
|
196
|
+
return stripToMessages(rhf.formState.errors);
|
|
197
|
+
},
|
|
198
|
+
}),
|
|
199
|
+
[rhf, onSubmit, initialValues],
|
|
200
|
+
);
|
|
201
|
+
|
|
202
|
+
return {
|
|
203
|
+
submitError,
|
|
204
|
+
api,
|
|
205
|
+
rhf,
|
|
206
|
+
setSubmitError,
|
|
207
|
+
disabled,
|
|
208
|
+
};
|
|
209
|
+
};
|
|
210
|
+
export default useForm;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { gql } from '@apollo/client';
|
|
2
|
+
import { useMutation } from '@apollo/client/react';
|
|
3
|
+
import {
|
|
4
|
+
ICreateLanguageInput,
|
|
5
|
+
ICreateLanguageMutation,
|
|
6
|
+
ICreateLanguageMutationVariables,
|
|
7
|
+
} from '../../../gql/types';
|
|
8
|
+
import LanguageFragment from '../fragments/LanguageFragment';
|
|
9
|
+
|
|
10
|
+
const CreateLanguageMutation = gql`
|
|
11
|
+
mutation CreateLanguage($language: CreateLanguageInput!) {
|
|
12
|
+
createLanguage(language: $language) {
|
|
13
|
+
...LanguageFragment
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
${LanguageFragment}
|
|
17
|
+
`;
|
|
18
|
+
|
|
19
|
+
const useCreateLanguage = () => {
|
|
20
|
+
const [createLanguageMutation, { data, loading, error }] = useMutation<
|
|
21
|
+
ICreateLanguageMutation,
|
|
22
|
+
ICreateLanguageMutationVariables
|
|
23
|
+
>(CreateLanguageMutation);
|
|
24
|
+
|
|
25
|
+
const createLanguage = async ({ isoCode }: ICreateLanguageInput) => {
|
|
26
|
+
return createLanguageMutation({
|
|
27
|
+
variables: { language: { isoCode } },
|
|
28
|
+
refetchQueries: ['ShopStatus', 'ShopInfo', 'Languages'],
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
const newLanguage = data?.createLanguage;
|
|
32
|
+
return {
|
|
33
|
+
createLanguage,
|
|
34
|
+
newLanguage,
|
|
35
|
+
loading,
|
|
36
|
+
error,
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export default useCreateLanguage;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { gql } from '@apollo/client';
|
|
2
|
+
import { useQuery } from '@apollo/client/react';
|
|
3
|
+
import { ILanguageQuery, ILanguageQueryVariables } from '../../../gql/types';
|
|
4
|
+
import useUnchainedContext from '../../UnchainedContext/useUnchainedContext';
|
|
5
|
+
import LanguageFragment from '../fragments/LanguageFragment';
|
|
6
|
+
|
|
7
|
+
const GetLanguageQuery = (inlineFragment = '') => gql`
|
|
8
|
+
query Language($languageId: ID!) {
|
|
9
|
+
language(languageId: $languageId) {
|
|
10
|
+
...LanguageFragment
|
|
11
|
+
${inlineFragment}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
${LanguageFragment}
|
|
15
|
+
`;
|
|
16
|
+
|
|
17
|
+
const useLanguage = ({ languageId }: ILanguageQueryVariables) => {
|
|
18
|
+
const { customProperties } = useUnchainedContext();
|
|
19
|
+
const { data, loading, error } = useQuery<
|
|
20
|
+
ILanguageQuery,
|
|
21
|
+
ILanguageQueryVariables
|
|
22
|
+
>(GetLanguageQuery(customProperties?.Language), {
|
|
23
|
+
skip: !languageId,
|
|
24
|
+
variables: { languageId },
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
return {
|
|
28
|
+
language: data?.language,
|
|
29
|
+
loading,
|
|
30
|
+
error,
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export default useLanguage;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { gql } from '@apollo/client';
|
|
2
|
+
import { useQuery } from '@apollo/client/react';
|
|
3
|
+
import { ILanguagesQuery, ILanguagesQueryVariables } from '../../../gql/types';
|
|
4
|
+
import LanguageFragment from '../fragments/LanguageFragment';
|
|
5
|
+
|
|
6
|
+
const LanguagesQuery = gql`
|
|
7
|
+
query Languages(
|
|
8
|
+
$queryString: String
|
|
9
|
+
$offset: Int
|
|
10
|
+
$limit: Int
|
|
11
|
+
$includeInactive: Boolean
|
|
12
|
+
$sort: [SortOptionInput!]
|
|
13
|
+
) {
|
|
14
|
+
languages(
|
|
15
|
+
queryString: $queryString
|
|
16
|
+
offset: $offset
|
|
17
|
+
limit: $limit
|
|
18
|
+
includeInactive: $includeInactive
|
|
19
|
+
sort: $sort
|
|
20
|
+
) {
|
|
21
|
+
...LanguageFragment
|
|
22
|
+
}
|
|
23
|
+
languagesCount(includeInactive: $includeInactive, queryString: $queryString)
|
|
24
|
+
}
|
|
25
|
+
${LanguageFragment}
|
|
26
|
+
`;
|
|
27
|
+
|
|
28
|
+
const useLanguages = ({
|
|
29
|
+
queryString = '',
|
|
30
|
+
limit = 20,
|
|
31
|
+
offset = 0,
|
|
32
|
+
includeInactive = true,
|
|
33
|
+
sort = [],
|
|
34
|
+
skip = false,
|
|
35
|
+
}: ILanguagesQueryVariables & { skip?: boolean } = {}) => {
|
|
36
|
+
const { data, loading, error, fetchMore } = useQuery<
|
|
37
|
+
ILanguagesQuery,
|
|
38
|
+
ILanguagesQueryVariables
|
|
39
|
+
>(LanguagesQuery, {
|
|
40
|
+
variables: { queryString, limit, offset, includeInactive, sort },
|
|
41
|
+
errorPolicy: 'all',
|
|
42
|
+
skip,
|
|
43
|
+
});
|
|
44
|
+
const languages = data?.languages || [];
|
|
45
|
+
const languagesCount = data?.languagesCount;
|
|
46
|
+
const hasMore = languages?.length < languagesCount;
|
|
47
|
+
|
|
48
|
+
const loadMore = () => {
|
|
49
|
+
fetchMore({
|
|
50
|
+
variables: { offset: languages?.length },
|
|
51
|
+
});
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
return {
|
|
55
|
+
languages,
|
|
56
|
+
languagesCount,
|
|
57
|
+
hasMore,
|
|
58
|
+
loading,
|
|
59
|
+
error,
|
|
60
|
+
loadMore,
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export default useLanguages;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { gql } from '@apollo/client';
|
|
2
|
+
import { useMutation } from '@apollo/client/react';
|
|
3
|
+
import {
|
|
4
|
+
IRemoveLanguageMutation,
|
|
5
|
+
IRemoveLanguageMutationVariables,
|
|
6
|
+
} from '../../../gql/types';
|
|
7
|
+
import LanguageFragment from '../fragments/LanguageFragment';
|
|
8
|
+
|
|
9
|
+
const RemoveLanguageMutation = gql`
|
|
10
|
+
mutation RemoveLanguage($languageId: ID!) {
|
|
11
|
+
removeLanguage(languageId: $languageId) {
|
|
12
|
+
...LanguageFragment
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
${LanguageFragment}
|
|
16
|
+
`;
|
|
17
|
+
|
|
18
|
+
const useRemoveLanguage = () => {
|
|
19
|
+
const [removeLanguageMutation] = useMutation<
|
|
20
|
+
IRemoveLanguageMutation,
|
|
21
|
+
IRemoveLanguageMutationVariables
|
|
22
|
+
>(RemoveLanguageMutation);
|
|
23
|
+
|
|
24
|
+
const removeLanguage = async ({
|
|
25
|
+
languageId,
|
|
26
|
+
}: IRemoveLanguageMutationVariables) => {
|
|
27
|
+
return removeLanguageMutation({
|
|
28
|
+
variables: { languageId },
|
|
29
|
+
refetchQueries: ['ShopStatus', 'ShopInfo', 'Languages'],
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
return {
|
|
34
|
+
removeLanguage,
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export default useRemoveLanguage;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { gql } from '@apollo/client';
|
|
2
|
+
import { useMutation } from '@apollo/client/react';
|
|
3
|
+
import {
|
|
4
|
+
IUpdateLanguageMutation,
|
|
5
|
+
IUpdateLanguageMutationVariables,
|
|
6
|
+
} from '../../../gql/types';
|
|
7
|
+
import LanguageFragment from '../fragments/LanguageFragment';
|
|
8
|
+
|
|
9
|
+
const UpdateLanguageMutation = gql`
|
|
10
|
+
mutation UpdateLanguage($language: UpdateLanguageInput!, $languageId: ID!) {
|
|
11
|
+
updateLanguage(language: $language, languageId: $languageId) {
|
|
12
|
+
...LanguageFragment
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
${LanguageFragment}
|
|
16
|
+
`;
|
|
17
|
+
|
|
18
|
+
const useUpdateLanguage = () => {
|
|
19
|
+
const [updateLanguageMutation] = useMutation<
|
|
20
|
+
IUpdateLanguageMutation,
|
|
21
|
+
IUpdateLanguageMutationVariables
|
|
22
|
+
>(UpdateLanguageMutation);
|
|
23
|
+
|
|
24
|
+
const updateLanguage = async ({
|
|
25
|
+
language: { isoCode, isActive },
|
|
26
|
+
languageId,
|
|
27
|
+
}: IUpdateLanguageMutationVariables) => {
|
|
28
|
+
return updateLanguageMutation({
|
|
29
|
+
variables: {
|
|
30
|
+
language: { isoCode, isActive },
|
|
31
|
+
languageId,
|
|
32
|
+
},
|
|
33
|
+
refetchQueries: ['ShopStatus', 'ShopInfo', 'Languages'],
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
return {
|
|
38
|
+
updateLanguage,
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export default useUpdateLanguage;
|