@unchainedshop/admin-ui 5.0.0-alpha.10 → 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-HTPSKUXQ.js → chunk-33ZO52Z7.js} +3337 -1778
- package/dist/{chunk-AE5LOZGH.js → chunk-4MXPTVDL.js} +16 -58
- package/dist/{chunk-I64TXIE7.js → chunk-ATZJXTRA.js} +1 -1
- package/dist/{chunk-AOR2B5N5.js → chunk-BOMSMJF2.js} +4 -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-E7BVYJ3R.js → chunk-ED2FP42R.js} +2 -2
- package/dist/{chunk-H6G4UTZ5.js → chunk-GWMLIF3C.js} +5 -11
- package/dist/chunk-IWKDBADX.js +73 -0
- package/dist/{chunk-3L6EZQ6P.js → chunk-NFJE5EJG.js} +1 -1
- package/dist/chunk-VYEXPG3M.js +107 -0
- package/dist/{chunk-DTJ2DTKS.js → chunk-YUXHILXY.js} +15 -3
- package/dist/{chunk-VDKQGOMV.js → chunk-ZUOVKRKC.js} +118 -1
- package/dist/components/ui/Badge.d.ts.map +1 -1
- package/dist/components/ui/BreadCrumbs.d.ts.map +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/Pagination.d.ts.map +1 -1
- package/dist/components/ui/form/Combobox.d.ts.map +1 -1
- package/dist/components/ui/form/TextField.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 +814 -292
- package/dist/gql/operation-types.d.ts +195 -19
- package/dist/gql/operation-types.d.ts.map +1 -1
- package/dist/gql/schema-types.d.ts +65 -9
- package/dist/gql/schema-types.d.ts.map +1 -1
- package/dist/hooks.js +5 -5
- package/dist/modal.js +5 -5
- package/dist/modules/accounts.js +183 -3
- package/dist/modules/assortment.js +82 -3
- package/dist/modules/common/components/AppContext.d.ts.map +1 -1
- package/dist/modules/common/components/FormWrapper.d.ts.map +1 -1
- package/dist/modules/common/components/ThemeWrapper.d.ts.map +1 -1
- package/dist/modules/common/data/miscellaneous.d.ts +1 -0
- package/dist/modules/common/data/miscellaneous.d.ts.map +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 +66 -9
- package/dist/modules/event.js +1 -1
- package/dist/modules/filter.js +52 -3
- package/dist/modules/language.js +1 -1
- package/dist/modules/order.js +2 -2
- package/dist/modules/payment-providers.js +1 -1
- package/dist/modules/product-review.js +3 -3
- package/dist/modules/product.js +261 -13
- package/dist/modules/quotation.js +8 -1
- package/dist/modules/token.js +2 -2
- package/dist/modules/warehousing-providers.js +1 -1
- package/dist/modules/work.js +18 -102
- package/dist/plugins.js +1 -1
- package/dist/providers.js +6 -6
- 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 +3965 -3417
- package/out/403/index.html +3 -2
- package/out/404/index.html +3 -2
- package/out/404.html +3 -2
- package/out/423/index.html +3 -2
- package/out/500/index.html +3 -2
- 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/{2kzyda4a6mqut.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/0hv3x0mo1tt7i.js +5 -0
- 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/0mcu2o1ir2t_w.js +7 -0
- 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/0p7said9rdor1.js +1 -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/157ndq6b9jcvv.js +342 -0
- 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/1mx0p6r-9c5u_.js +4 -0
- 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/1sh2ogc7tcbu-.js +1 -0
- package/out/_next/static/chunks/1t8jj0-6g8uyd.js +1 -0
- 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/1ug1ie2lrhi0a.js +7 -0
- package/out/_next/static/chunks/1ulje1tawz8fl.js +1 -0
- 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/1z-etrje5tsj6.js +7 -0
- package/out/_next/static/chunks/1z1d11slpalrq.js +4 -0
- package/out/_next/static/chunks/1z1mbux-7g74d.js +1 -0
- package/out/_next/static/chunks/1zdral15la_p7.js +99 -0
- package/out/_next/static/chunks/2-4610weysas_.js +1 -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/249b4cg2ev597.js +187 -0
- 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/28oppyg7ev102.js +1 -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/2ipcn3vy6d4_6.js +2 -0
- 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/2l8gepfm4kyjp.js +1 -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/2u64ldp2xfy8a.js +709 -0
- 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/2y8uau15r3p-o.js +1 -0
- package/out/_next/static/chunks/2zb-xmda5rbn0.js +1 -0
- package/out/_next/static/chunks/2zsvxbghbsuz1.js +4 -0
- package/out/_next/static/chunks/3-ve59izq9j-p.js +1 -0
- package/out/_next/static/chunks/3205eg3ochzp4.js +297 -0
- 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/36x7q29atus_r.js +161 -0
- package/out/_next/static/chunks/37jjn1wguhj-a.js +5 -0
- package/out/_next/static/chunks/393--hagnnm97.js +39 -0
- 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/3e7d8sb4289js.js +5 -0
- 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/3jxeyjg2g7w94.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/3xs_undkbcqp7.js +367 -0
- 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-077hmtqrhcoji.js +1 -0
- package/out/_offline/index.html +3 -2
- package/out/account/forgot-password/index.html +3 -2
- package/out/account/index.html +3 -2
- package/out/assortments/AssortmentDetailPage/index.html +3 -2
- package/out/assortments/index.html +3 -2
- package/out/assortments/new/index.html +3 -2
- package/out/copilot/index.html +3 -2
- package/out/country/CountryDetailPage/index.html +3 -2
- package/out/country/index.html +3 -2
- package/out/country/new/index.html +3 -2
- package/out/currency/CurrencyDetailPage/index.html +3 -2
- package/out/currency/index.html +3 -2
- package/out/currency/new/index.html +3 -2
- package/out/delivery-provider/DeliveryProviderDetailPage/index.html +3 -2
- package/out/delivery-provider/index.html +3 -2
- package/out/delivery-provider/new/index.html +3 -2
- package/out/enrollments/EnrollmentDetailPage/index.html +3 -2
- package/out/enrollments/index.html +3 -2
- package/out/events/EventDetailPage/index.html +3 -2
- package/out/events/index.html +3 -2
- package/out/exports/index.html +3 -2
- package/out/ext/[[...slug]]/index.html +3 -2
- package/out/external/index.html +3 -2
- package/out/filters/FilterDetailPage/index.html +3 -2
- package/out/filters/index.html +3 -2
- package/out/filters/new/index.html +3 -2
- package/out/index.html +3 -2
- package/out/install/index.html +3 -2
- package/out/language/LanguageDetailPage/index.html +3 -2
- package/out/language/index.html +3 -2
- package/out/language/new/index.html +3 -2
- package/out/log-in/index.html +3 -2
- package/out/orders/OrderDetailPage/index.html +3 -2
- package/out/orders/index.html +3 -2
- package/out/payment-provider/PaymentProviderDetailPage/index.html +3 -2
- package/out/payment-provider/index.html +3 -2
- package/out/payment-provider/new/index.html +3 -2
- package/out/products/ProductDetailPage/index.html +3 -2
- package/out/products/index.html +3 -2
- package/out/products/new/index.html +3 -2
- package/out/quotations/QuotationDetailPage/index.html +3 -2
- package/out/quotations/index.html +3 -2
- package/out/reset-password/index.html +3 -2
- package/out/sign-up/index.html +3 -2
- package/out/styleguide/index.html +3 -2
- package/out/tokens/TokenDetailPage/index.html +3 -2
- package/out/tokens/index.html +3 -2
- package/out/users/UserDetailPage/index.html +3 -2
- package/out/users/index.html +3 -2
- package/out/users/new/index.html +3 -2
- package/out/verify-email/index.html +3 -2
- package/out/warehousing-provider/WarehousingProviderDetailPage/index.html +3 -2
- package/out/warehousing-provider/index.html +3 -2
- package/out/warehousing-provider/new/index.html +3 -2
- package/out/works/WorkDetailPage/index.html +3 -2
- package/out/works/WorkQueueListView/index.html +3 -2
- package/out/works/index.html +3 -2
- package/out/works/management/index.html +3 -2
- 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/accounts/index.ts +6 -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/assortment/index.ts +2 -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/enrollment/index.ts +2 -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/filter/index.ts +2 -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/index.ts +4 -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/modules/work/index.ts +1 -0
- package/src/sdk/README.md +12 -3
- package/src/sdk/plugin-navigation.test.mjs +59 -0
- package/out/_next/static/chunks/0-2b37ubdpy0o.js +0 -7
- package/out/_next/static/chunks/012cafv-4m7rj.js +0 -807
- package/out/_next/static/chunks/02dnhll1bce87.js +0 -46
- package/out/_next/static/chunks/02ptvddfjlsxb.js +0 -1
- package/out/_next/static/chunks/03ebenjfvoj8n.js +0 -1
- package/out/_next/static/chunks/03r347235l6c4.js +0 -7
- package/out/_next/static/chunks/05au-xyt__0f2.js +0 -3
- package/out/_next/static/chunks/05nn5xr3ufcsh.js +0 -1
- package/out/_next/static/chunks/05o_q7jg8wucs.js +0 -44
- package/out/_next/static/chunks/05scroolqe8fu.js +0 -234
- package/out/_next/static/chunks/072qxdqjtqvn9.js +0 -11
- package/out/_next/static/chunks/0752goe9_9g2s.js +0 -110
- package/out/_next/static/chunks/07e-sk6v9u-qh.js +0 -807
- package/out/_next/static/chunks/07evy5u8ldd1y.js +0 -50
- package/out/_next/static/chunks/083ylavob4a8d.js +0 -3
- package/out/_next/static/chunks/08jrw03_vxllg.js +0 -54
- package/out/_next/static/chunks/08pag0k09j2b3.js +0 -807
- package/out/_next/static/chunks/09n6h-_l73rez.js +0 -13
- package/out/_next/static/chunks/0_b5faks_mrvi.js +0 -14
- package/out/_next/static/chunks/0a_bg-ub3r2eo.js +0 -60
- package/out/_next/static/chunks/0aqxsjssb0dh9.js +0 -21
- package/out/_next/static/chunks/0aw4jxe6zcc0c.js +0 -32
- package/out/_next/static/chunks/0b0hrx3sbbs70.js +0 -807
- package/out/_next/static/chunks/0bg4_y1qh5y5h.js +0 -47
- package/out/_next/static/chunks/0bgz44wi1lidl.js +0 -13
- package/out/_next/static/chunks/0dcpvidzyamvk.js +0 -100
- package/out/_next/static/chunks/0dnh0kr83_tj0.js +0 -1
- package/out/_next/static/chunks/0dxp17sbyy_dr.js +0 -22
- package/out/_next/static/chunks/0dxu94yin5gdn.js +0 -35
- package/out/_next/static/chunks/0e2c-jlh2q_eq.js +0 -74
- package/out/_next/static/chunks/0el7gr-83bm5j.js +0 -3
- package/out/_next/static/chunks/0f_ofo__wyqsp.js +0 -22
- package/out/_next/static/chunks/0gx9t6j5kx_ho.js +0 -9
- package/out/_next/static/chunks/0h0r_q6xa9qr_.js +0 -1
- package/out/_next/static/chunks/0i9ymn9xxs0nx.js +0 -18
- package/out/_next/static/chunks/0iy11ws57hzzr.js +0 -99
- package/out/_next/static/chunks/0j8_uikfyrn1f.js +0 -1
- package/out/_next/static/chunks/0jeddko6bac8h.js +0 -1
- package/out/_next/static/chunks/0jzx7vxh13cpi.js +0 -15
- package/out/_next/static/chunks/0kody3217__os.js +0 -16
- package/out/_next/static/chunks/0kwo-m1-mo-s-.js +0 -31
- package/out/_next/static/chunks/0lp_pnq1t06sl.js +0 -104
- package/out/_next/static/chunks/0m6jydfuy_4o3.js +0 -1
- package/out/_next/static/chunks/0mez27zlo26ni.js +0 -103
- package/out/_next/static/chunks/0nj8vn3509oe-.js +0 -9
- package/out/_next/static/chunks/0np9pcbt6dmxe.js +0 -25
- package/out/_next/static/chunks/0o7k5vanq57ch.js +0 -807
- package/out/_next/static/chunks/0r5wwinf72z4g.js +0 -1
- package/out/_next/static/chunks/0rqjr_lmrk4pz.js +0 -5
- package/out/_next/static/chunks/0swe0fkt4vyzn.js +0 -136
- package/out/_next/static/chunks/0u4st428hgv1v.js +0 -27
- package/out/_next/static/chunks/0u7--d8_-qyne.js +0 -83
- package/out/_next/static/chunks/0ubzi2s1spm4e.js +0 -342
- package/out/_next/static/chunks/0uecw_5mn0zvr.js +0 -110
- package/out/_next/static/chunks/0uw9cbq0ivaz0.js +0 -1
- package/out/_next/static/chunks/0uxwblyj0htyb.js +0 -1
- package/out/_next/static/chunks/0uyhr7vs9ltp0.js +0 -141
- package/out/_next/static/chunks/0vr19nswhvt2-.js +0 -14
- package/out/_next/static/chunks/0vyvc19p87f_r.js +0 -234
- package/out/_next/static/chunks/0wznlnzc2xsbz.js +0 -16
- package/out/_next/static/chunks/0ycu-q8fcc8ta.js +0 -1
- package/out/_next/static/chunks/0ytserk6fuf71.js +0 -175
- package/out/_next/static/chunks/0zoum0jzrtu0s.js +0 -145
- package/out/_next/static/chunks/1-6s62fsl_z_7.js +0 -126
- package/out/_next/static/chunks/10b6et0qn-pa0.js +0 -59
- package/out/_next/static/chunks/13m7st62a61df.js +0 -25
- package/out/_next/static/chunks/13u_a5l2xngm4.js +0 -1
- package/out/_next/static/chunks/15vz50rks0o2-.js +0 -238
- package/out/_next/static/chunks/1647yxi4ymq0z.js +0 -14
- package/out/_next/static/chunks/16hd7xvkocqxs.js +0 -807
- package/out/_next/static/chunks/16t18hhd4ax36.js +0 -2
- package/out/_next/static/chunks/17wle25pg9jkp.js +0 -11
- package/out/_next/static/chunks/18juy_eauk94g.js +0 -58
- package/out/_next/static/chunks/19eflki8bmivb.js +0 -81
- package/out/_next/static/chunks/19eu5d-wm2hfr.js +0 -23
- package/out/_next/static/chunks/19izcjxrrapb3.js +0 -9
- package/out/_next/static/chunks/1_jbj-c1d2606.js +0 -21
- package/out/_next/static/chunks/1_pwqdjxb6oou.js +0 -226
- package/out/_next/static/chunks/1ae-9ft5cgojf.js +0 -1
- package/out/_next/static/chunks/1bftmuhck_-7b.js +0 -1
- package/out/_next/static/chunks/1bww_2og01jxh.js +0 -807
- package/out/_next/static/chunks/1c0cemuv_tf6i.js +0 -16
- package/out/_next/static/chunks/1c4a2qxtb3r4_.js +0 -16
- package/out/_next/static/chunks/1cjd95y23a9qx.js +0 -1
- package/out/_next/static/chunks/1cy-2yb5j5_9b.js +0 -157
- package/out/_next/static/chunks/1dkv555kaccbl.js +0 -13
- package/out/_next/static/chunks/1dt9_bzfioi8a.js +0 -24
- package/out/_next/static/chunks/1fd7ewfb7bi_g.js +0 -234
- package/out/_next/static/chunks/1gncrqljnmqjn.js +0 -43
- package/out/_next/static/chunks/1gt65pz91hyuz.js +0 -1
- package/out/_next/static/chunks/1iewktf-9h_n8.js +0 -15
- package/out/_next/static/chunks/1l7p7exnzd0c2.js +0 -12
- package/out/_next/static/chunks/1nqu3ymv6lgev.js +0 -3
- package/out/_next/static/chunks/1o_8g-kpuqi9h.js +0 -1
- package/out/_next/static/chunks/1oent0-9-0rgb.js +0 -20
- package/out/_next/static/chunks/1og09fg689_nc.js +0 -180
- package/out/_next/static/chunks/1pj279k5ntty3.js +0 -13
- package/out/_next/static/chunks/1q_sewe1wbxsk.js +0 -54
- package/out/_next/static/chunks/1qvs4gd4rbhb2.js +0 -15
- package/out/_next/static/chunks/1rtv3c_klo0jk.js +0 -1
- package/out/_next/static/chunks/1sdqr2_r6o46f.js +0 -16
- package/out/_next/static/chunks/1vti949e9wuhz.js +0 -15
- package/out/_next/static/chunks/1x-yucftdml28.js +0 -1
- package/out/_next/static/chunks/1xbofs3ibkjvj.js +0 -1
- package/out/_next/static/chunks/1ylgjha1c0ua_.js +0 -124
- package/out/_next/static/chunks/1yp98n-n4gxwy.js +0 -15
- package/out/_next/static/chunks/1zcm_9oew7412.js +0 -14
- package/out/_next/static/chunks/2-e0d1qpp7rk9.js +0 -14
- package/out/_next/static/chunks/20ubrczdsehfm.js +0 -879
- package/out/_next/static/chunks/23m--gc-gjenm.js +0 -3
- package/out/_next/static/chunks/24-pobk4qjjvp.js +0 -3
- package/out/_next/static/chunks/24jptulqn322i.js +0 -15
- package/out/_next/static/chunks/24jyi7e2pq4gy.js +0 -15
- package/out/_next/static/chunks/252jebodi67kg.js +0 -1
- package/out/_next/static/chunks/26eux546aoag5.js +0 -58
- package/out/_next/static/chunks/270ua9t85a7ev.js +0 -5
- package/out/_next/static/chunks/28r_j2kquxrjn.js +0 -807
- package/out/_next/static/chunks/2_ccruvok3u8j.js +0 -16
- package/out/_next/static/chunks/2_ojfjgg8do9t.js +0 -1
- package/out/_next/static/chunks/2aj5aq_c0b4r_.js +0 -13
- package/out/_next/static/chunks/2ba3n9zx9e9q9.js +0 -807
- package/out/_next/static/chunks/2d-hxb31pgpn7.js +0 -13
- package/out/_next/static/chunks/2df2cqwidgpan.js +0 -15
- package/out/_next/static/chunks/2djnsowjy3p8y.js +0 -1
- package/out/_next/static/chunks/2dyj8q92_k5el.js +0 -708
- package/out/_next/static/chunks/2e0k9dt1emjfm.js +0 -1
- package/out/_next/static/chunks/2e3gba1n-yyuj.js +0 -15
- package/out/_next/static/chunks/2e_p1vqr0g_-_.js +0 -7
- package/out/_next/static/chunks/2e_te6sbs_5uw.js +0 -1
- package/out/_next/static/chunks/2f16josk9b_cl.js +0 -8
- package/out/_next/static/chunks/2fo2ki1egxbah.js +0 -39
- package/out/_next/static/chunks/2g8gzs8wpsofk.js +0 -2
- package/out/_next/static/chunks/2gh355-kh19zx.js +0 -13
- package/out/_next/static/chunks/2gr4t5xe0atdr.js +0 -15
- package/out/_next/static/chunks/2ib6fee-nqe-z.js +0 -23
- package/out/_next/static/chunks/2kjux30i3gg-c.js +0 -5
- package/out/_next/static/chunks/2ljoq6sr-g2da.js +0 -1
- package/out/_next/static/chunks/2ll_mqee86g8c.js +0 -1
- package/out/_next/static/chunks/2lx_iig9xewfj.js +0 -52
- package/out/_next/static/chunks/2lylr4-3tu1_t.js +0 -15
- package/out/_next/static/chunks/2n1v8ph2nt43w.js +0 -17
- package/out/_next/static/chunks/2o9hdz0gk1-s7.js +0 -165
- package/out/_next/static/chunks/2oadogfqpak51.js +0 -1
- package/out/_next/static/chunks/2oogwntgnu9rf.js +0 -17
- package/out/_next/static/chunks/2p4e3kh8sa8iq.js +0 -13
- package/out/_next/static/chunks/2q-mpau-4gsvd.js +0 -1
- package/out/_next/static/chunks/2rddaar-ns45d.js +0 -116
- package/out/_next/static/chunks/2s3qhuh87mu_w.js +0 -126
- package/out/_next/static/chunks/2s6u8274_jzk2.js +0 -105
- package/out/_next/static/chunks/2skfzjx2g9hkk.js +0 -134
- package/out/_next/static/chunks/2u6jwsqz0uhes.js +0 -24
- package/out/_next/static/chunks/2v4k4vpb2id7m.js +0 -44
- package/out/_next/static/chunks/2xctb084h1lyg.js +0 -329
- package/out/_next/static/chunks/2xgpwzpd6-tdb.js +0 -234
- package/out/_next/static/chunks/3-soz24u9483h.js +0 -15
- package/out/_next/static/chunks/30_ns6urg1dkn.js +0 -41
- package/out/_next/static/chunks/30nxkqu5mcga3.js +0 -1
- package/out/_next/static/chunks/313i1x81q2xj1.js +0 -1
- package/out/_next/static/chunks/31qwglme02a_r.js +0 -807
- package/out/_next/static/chunks/31sk60zzj3bc5.js +0 -17
- package/out/_next/static/chunks/325a7n__tfxy_.js +0 -61
- package/out/_next/static/chunks/33emlry70k-lv.js +0 -2
- package/out/_next/static/chunks/33v8la4hkia7j.js +0 -1
- package/out/_next/static/chunks/34ar-34flu6bu.js +0 -43
- package/out/_next/static/chunks/34z48lfdm9u0l.js +0 -9
- package/out/_next/static/chunks/351jscvbk_wb9.js +0 -13
- package/out/_next/static/chunks/357odtev0t245.js +0 -59
- package/out/_next/static/chunks/360g4b1clnt45.js +0 -142
- package/out/_next/static/chunks/360uyru28azf6.js +0 -20
- package/out/_next/static/chunks/366apf6d0xh2u.js +0 -30
- package/out/_next/static/chunks/36_zbuqpk5cpj.js +0 -14
- package/out/_next/static/chunks/36aqs7u7s-lb1.js +0 -119
- package/out/_next/static/chunks/36beon3q8orx2.js +0 -1
- package/out/_next/static/chunks/37703j9_zf5_h.js +0 -13
- package/out/_next/static/chunks/37rwzuocwsv_k.js +0 -16
- package/out/_next/static/chunks/37w6b3h04uc4c.js +0 -19
- package/out/_next/static/chunks/38ffn8gazqz8_.js +0 -3
- package/out/_next/static/chunks/38xse6_r51yqp.js +0 -234
- package/out/_next/static/chunks/39s8xbnm9f08v.js +0 -14
- package/out/_next/static/chunks/39x-p8r_sl0ng.js +0 -15
- package/out/_next/static/chunks/39zisxvmik0t_.js +0 -34
- package/out/_next/static/chunks/3_97tge0xvvon.js +0 -11
- package/out/_next/static/chunks/3aw-ri7876ngd.js +0 -39
- package/out/_next/static/chunks/3bv7gi3o6-41h.js +0 -11
- package/out/_next/static/chunks/3cdfuacs4_0d-.js +0 -1
- package/out/_next/static/chunks/3cxpx38ycu7u2.js +0 -9
- package/out/_next/static/chunks/3d1ofcqmlbg-5.js +0 -52
- package/out/_next/static/chunks/3e3i3qqkv_my7.js +0 -15
- package/out/_next/static/chunks/3ex71q3pp_ekc.js +0 -247
- package/out/_next/static/chunks/3g1lpkudwo8kg.js +0 -1
- package/out/_next/static/chunks/3h68t22714to5.js +0 -3
- package/out/_next/static/chunks/3jpzhwqgdnobq.js +0 -103
- package/out/_next/static/chunks/3jxuqt_2-j_uc.js +0 -18
- package/out/_next/static/chunks/3kqqv33l7ssn0.js +0 -16
- package/out/_next/static/chunks/3l-9xxd1i1sya.js +0 -1
- package/out/_next/static/chunks/3mancxzz8c7hl.js +0 -51
- package/out/_next/static/chunks/3mq2s9rfy78je.js +0 -27
- package/out/_next/static/chunks/3om1fkw-lrmng.js +0 -1
- package/out/_next/static/chunks/3oynij37wfjb2.js +0 -119
- package/out/_next/static/chunks/3pbyo5kkko3wh.js +0 -1
- package/out/_next/static/chunks/3pjja1obml896.js +0 -15
- package/out/_next/static/chunks/3qaiz-jwi7q2x.js +0 -1
- package/out/_next/static/chunks/3rh3nigvg06yu.js +0 -337
- package/out/_next/static/chunks/3rppjab6j3_k9.js +0 -1
- package/out/_next/static/chunks/3t_3vlnk1ntkb.js +0 -95
- package/out/_next/static/chunks/3tpo2ho54vtth.js +0 -807
- package/out/_next/static/chunks/3tqspv0ggt8j0.js +0 -17
- package/out/_next/static/chunks/3um54w4ca27n_.js +0 -17
- package/out/_next/static/chunks/3vet2a9q9rf2c.js +0 -61
- package/out/_next/static/chunks/3vjgbl76cgrmt.js +0 -1
- package/out/_next/static/chunks/3vz3gqmojh7sx.js +0 -4
- package/out/_next/static/chunks/3w2e5xa061qou.js +0 -9
- package/out/_next/static/chunks/3w9xrlkiztuwi.js +0 -23
- package/out/_next/static/chunks/3x4xfy_av3o0d.js +0 -1
- package/out/_next/static/chunks/3x9k13s5fam4j.js +0 -22
- package/out/_next/static/chunks/3xmtbqm0gddn8.js +0 -3
- package/out/_next/static/chunks/3z5uyt9mc9_fd.js +0 -2
- package/out/_next/static/chunks/3zlwp96x3hoy9.js +0 -16
- package/out/_next/static/chunks/3zr_sumh1g7il.js +0 -22
- package/out/_next/static/chunks/40jl8yfmy6tp6.js +0 -234
- package/out/_next/static/chunks/40xhwnc_48o73.js +0 -297
- package/out/_next/static/chunks/41-iysd7qkyg1.js +0 -16
- package/out/_next/static/chunks/4105a9rejv_p4.js +0 -1
- package/out/_next/static/chunks/41e2wlkp9_pvk.js +0 -28
- package/out/_next/static/chunks/41g7mv3yuhz6k.js +0 -68
- package/out/_next/static/chunks/43jyzccx6x0lw.js +0 -1
- package/out/_next/static/chunks/43vuxh3wdo567.js +0 -10
- package/out/_next/static/chunks/44daaafswok67.css +0 -1
- package/out/_next/static/chunks/452fv7r-tie6t.js +0 -1
- package/out/_next/static/chunks/457j51b69odrw.js +0 -1
- package/out/_next/static/chunks/turbopack-02vysfmmbped5.js +0 -1
- package/out/_next/static/chunks/turbopack-03fj2scz_09ul.js +0 -1
- package/out/_next/static/chunks/turbopack-07wtduwtfqsl_.js +0 -1
- package/out/_next/static/chunks/turbopack-0_zihh5ueb_wj.js +0 -1
- package/out/_next/static/chunks/turbopack-0b8-ww_z1vgvn.js +0 -1
- package/out/_next/static/chunks/turbopack-0beql_u-wc_3e.js +0 -1
- package/out/_next/static/chunks/turbopack-0dxdn-gyy3_qj.js +0 -1
- package/out/_next/static/chunks/turbopack-0hqw81t-42tbj.js +0 -1
- package/out/_next/static/chunks/turbopack-0jsdrr-oq87lm.js +0 -1
- package/out/_next/static/chunks/turbopack-0jxa33q3ikjqg.js +0 -1
- package/out/_next/static/chunks/turbopack-0k9zths9zte_8.js +0 -1
- package/out/_next/static/chunks/turbopack-0pa42wgwsv141.js +0 -1
- package/out/_next/static/chunks/turbopack-0te09_mp07k1x.js +0 -1
- package/out/_next/static/chunks/turbopack-0xsxl45thi-35.js +0 -1
- package/out/_next/static/chunks/turbopack-10-8q-q2zomxa.js +0 -1
- package/out/_next/static/chunks/turbopack-142w-8owzbg7_.js +0 -1
- package/out/_next/static/chunks/turbopack-18tezl3vagvil.js +0 -1
- package/out/_next/static/chunks/turbopack-1_1a-_v7vml72.js +0 -1
- package/out/_next/static/chunks/turbopack-1_k-7s9lmntml.js +0 -1
- package/out/_next/static/chunks/turbopack-1a47di2tss4e-.js +0 -1
- package/out/_next/static/chunks/turbopack-1c60gn7g-uduw.js +0 -1
- package/out/_next/static/chunks/turbopack-1e1yk3pkaodr5.js +0 -1
- package/out/_next/static/chunks/turbopack-1jtk1c9w2axlk.js +0 -1
- package/out/_next/static/chunks/turbopack-1k2ukl9u-7ovo.js +0 -1
- package/out/_next/static/chunks/turbopack-1lkz81ntcp1zv.js +0 -1
- package/out/_next/static/chunks/turbopack-1pkw_r5dvv20d.js +0 -1
- package/out/_next/static/chunks/turbopack-1pu2s2k3szn0s.js +0 -1
- package/out/_next/static/chunks/turbopack-1rxz_6lqtls5b.js +0 -1
- package/out/_next/static/chunks/turbopack-1uf07pugrv1fy.js +0 -1
- package/out/_next/static/chunks/turbopack-1uobzdn2r7ebw.js +0 -1
- package/out/_next/static/chunks/turbopack-1wv610ktbtzka.js +0 -1
- package/out/_next/static/chunks/turbopack-1wz4te1fj20zp.js +0 -1
- package/out/_next/static/chunks/turbopack-1zi2ss8eiiyfx.js +0 -1
- package/out/_next/static/chunks/turbopack-207p7bsc5wea7.js +0 -1
- package/out/_next/static/chunks/turbopack-21zngkzhonfcm.js +0 -1
- package/out/_next/static/chunks/turbopack-23y20ll8n-nwk.js +0 -1
- package/out/_next/static/chunks/turbopack-26wtylwa4_s95.js +0 -1
- package/out/_next/static/chunks/turbopack-27l7xplqpifq6.js +0 -1
- package/out/_next/static/chunks/turbopack-285oyoobdo21x.js +0 -1
- package/out/_next/static/chunks/turbopack-28b0zyhf3uqaq.js +0 -1
- package/out/_next/static/chunks/turbopack-28m_9eg3draop.js +0 -1
- package/out/_next/static/chunks/turbopack-29h9fgcal-fng.js +0 -1
- package/out/_next/static/chunks/turbopack-2a84kh6nmf_78.js +0 -1
- package/out/_next/static/chunks/turbopack-2b73dx1bsdg5f.js +0 -1
- package/out/_next/static/chunks/turbopack-2bslf96g-y1vv.js +0 -1
- package/out/_next/static/chunks/turbopack-2d-2wg8-_f9-v.js +0 -1
- package/out/_next/static/chunks/turbopack-2ez-mfb63qve0.js +0 -1
- package/out/_next/static/chunks/turbopack-2g7u83j1wlswz.js +0 -1
- package/out/_next/static/chunks/turbopack-2m4gns1_64-7_.js +0 -1
- package/out/_next/static/chunks/turbopack-2n4ba44aafc4x.js +0 -1
- package/out/_next/static/chunks/turbopack-2t3zb47_j-ahd.js +0 -1
- package/out/_next/static/chunks/turbopack-2tf6rdek5zvm6.js +0 -1
- package/out/_next/static/chunks/turbopack-2vb0p2htqo4nd.js +0 -1
- package/out/_next/static/chunks/turbopack-30-bi-9_7jd01.js +0 -1
- package/out/_next/static/chunks/turbopack-32pjcar5xpn1o.js +0 -1
- package/out/_next/static/chunks/turbopack-3a3skasosq9-4.js +0 -1
- package/out/_next/static/chunks/turbopack-3d2rk8-5wcgrs.js +0 -1
- package/out/_next/static/chunks/turbopack-3i91g2le3tkne.js +0 -1
- package/out/_next/static/chunks/turbopack-3j4bdo8-ldea5.js +0 -1
- package/out/_next/static/chunks/turbopack-3m47jybfw85nc.js +0 -1
- package/out/_next/static/chunks/turbopack-3yfksvslbm14s.js +0 -1
- package/out/_next/static/chunks/turbopack-414roft8p92hp.js +0 -1
- package/out/_next/static/chunks/turbopack-424slv1lqxh_5.js +0 -1
- package/out/_next/static/chunks/turbopack-444yt6auyioxn.js +0 -1
- package/out/_next/static/z5KrmhOz2mLscINN5EbUf/_buildManifest.js +0 -262
- /package/dist/{chunk-JED6SHHG.js → chunk-PUI5BIKO.js} +0 -0
- /package/out/_next/static/{z5KrmhOz2mLscINN5EbUf → bg3Z_ZBjStiTvJAHlsPDE}/_clientMiddlewareManifest.js +0 -0
- /package/out/_next/static/{z5KrmhOz2mLscINN5EbUf → bg3Z_ZBjStiTvJAHlsPDE}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,79001,34981,58101,e=>{"use strict";var s=e.i(91398),t=e.i(3326);e.i(51523);var a=e.i(19518),r=e.i(28401),i=e.i(59295),n=e.i(6277),l=e.i(53576),d=e.i(15971),o=e.i(6607),c=e.i(65530),m=e.i(57569),u=e.i(91788),f=e.i(69211),x=e.i(21128),g=e.i(98949),h=e.i(35339),p=e.i(47542),v=e.i(13120),j=e.i(58971),y=e.i(5505),b=e.i(63094),M=e.i(37547),A=e.i(59080),_=e.i(32171);let I=A.a`
|
|
2
|
+
query AssortmentPaths($assortmentId: ID!) {
|
|
3
|
+
assortment(assortmentId: $assortmentId) {
|
|
4
|
+
assortmentPaths {
|
|
5
|
+
links {
|
|
6
|
+
assortmentId
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
`;var w=e.i(57561);let N=({assortmentId:e})=>{let{formatMessage:r}=(0,t.X)(),{addAssortmentLink:i}=(0,h.f)(),{assortmentsPaths:n}=(({assortmentId:e})=>{let{data:s,loading:t,error:a}=(0,_.f)(I,{variables:{assortmentId:e}});return{assortmentsPaths:(s?.assortment?.assortmentPaths||[])?.flatMap(({links:e})=>e),loading:t,error:a}})({assortmentId:e}),{selectedLocale:l}=(0,w.f)(),d=n?.map(({assortmentId:e})=>e),{hasRole:o}=(0,j.f)(),[c,m]=(0,u.useState)(""),{assortments:A,loading:N}=(0,M.f)({queryString:c,includeInactive:!0,includeLeaves:!0,limit:50,sort:[{key:"created",value:a.A.Desc}],forceLocale:l}),k=async({childAssortmentId:s,tags:t})=>(await i({childAssortmentId:s,parentAssortmentId:e,tags:t}),{success:!0}),$=r({id:"saved",defaultMessage:"Saved"}),C=(0,g.f)({submit:k,successMessage:$,initialValues:{childAssortmentId:"",tags:""}});return(0,s.jsx)(y.U,{children:(0,s.jsx)(f.f,{form:C,id:"assortment_link_form",children:(0,s.jsxs)("div",{className:"sm:rounded-md",children:[(0,s.jsx)("div",{className:"grid gap-6 px-4 py-5 sm:p-6",children:(0,s.jsxs)("div",{className:"col-span-12",children:[(0,s.jsx)(v.f,{name:"tags",id:"tags",label:r({id:"tags",defaultMessage:"Tags"}),className:"mt-1 w-full text-sm"}),(0,s.jsx)(p.f,{name:"childAssortmentId",label:r({id:"child_assortment",defaultMessage:"Sub-Assortment"}),required:!0,isLoading:N,onFilter:m,queryString:c,data:((e=[])=>e?.map(({_id:e,status:s,texts:t,media:a})=>({id:e,tag:s,...t,image:a?.length?a[0]?.file?.url:null})))((A||[]).filter(({_id:s})=>s!==e&&!d.includes(s))),className:"mt-1 w-full py-2 text-sm text-slate-500"})]})}),(0,s.jsx)(b.f,{}),o(a.C.ManageAssortments)&&(0,s.jsx)("div",{className:"border-t-slate-100 border-t border-t-border-subtle bg-surface-subtle px-4 py-5 text-right sm:px-6",children:(0,s.jsx)(x.f,{label:r({id:"save",defaultMessage:"Save"})})})]})})})};var k=e.i(2194),$=e.i(46341),C=e.i(42469),L=e.i(6117),D=e.i(3095),T=e.i(1880),S=e.i(41158);let P=({link:e,onDelete:t,linkId:r,isParent:i,id:l})=>{let{hasRole:d}=(0,j.f)(),{attributes:o,listeners:c,setNodeRef:m,transform:u,transition:f}=(0,n.s)({id:l}),x={transform:$.r.Transform.toString(u),transition:f};return(0,s.jsx)(S.default,{href:`/assortments?assortmentSlug=${(0,T.U)(e)}`,children:(0,s.jsxs)("div",{className:"group flex items-center justify-between rounded-sm border-b border-border-subtle hover:border-slate-300 dark:hover:border-slate-600 hover:bg-slate-50/80 dark:hover:bg-slate-700/50 transition-all duration-200 ease-in-out hover:shadow-sm px-2 text-text-primary last:border-none hover:cursor-pointer",ref:m,style:x,children:[(0,s.jsx)("div",{className:"flex flex-col justify-center space-x-6 py-4 flex-auto",children:(0,s.jsxs)("div",{className:"flex gap-5 items-center",children:[(0,s.jsx)("div",{className:"flex items-center",children:(0,s.jsx)(C.f,{color:"cyan",text:i?"Parent":"Descendant"})}),(0,s.jsxs)("div",{className:"flex gap-4",children:[(0,s.jsxs)("div",{className:"flex flex-wrap gap-5",children:[(0,s.jsx)("h3",{className:"text-lg flex-auto",children:e?.texts?.title}),e?.texts?.title&&(0,s.jsx)("p",{className:"flex-auto text-xs text-text-secondary my-auto",children:e?.texts?.subtitle})]}),e?.tags&&(0,s.jsx)("div",{className:"flex gap-2",children:e?.tags.map((e,t)=>(0,s.jsx)(C.f,{text:e,color:"blue",className:"px-3 text-sm font-light capitalize py-0"},`${e}${t+1}`))})]})]})}),(0,s.jsx)("div",{onClick:e=>{e.stopPropagation()},children:(0,s.jsxs)("div",{className:"flex items-center gap-5",children:[d(a.C.ManageAssortments)&&(0,s.jsx)("button",{type:"button",...o,...c,className:"hover:cursor-move",children:(0,s.jsx)(L.f,{})}),(0,s.jsx)(D.f,{onDelete:()=>{t(r)},showEdit:!0,showDelete:d(a.C.ManageAssortments)})]})})]})})},F=({currentAssortmentId:e,links:a,onRemoveLink:r,items:i})=>{let{formatMessage:l}=(0,t.X)();return a.length?(0,s.jsx)(n.V,{items:i,strategy:n.W,children:(0,s.jsx)("div",{className:"space-y-4 py-3 px-6 rounded-sm transition-[background-color] ease-in-out delay-200",children:i.map(t=>{let{child:i,parent:n,_id:l}=Object.values(a).find(e=>e._id===t),d=[];return n&&n._id!==e&&d.push((0,s.jsx)(P,{id:t,link:n,isParent:n?.childrenCount,linkId:l,onDelete:r},n._id)),i&&i._id!==e&&d.push((0,s.jsx)(P,{id:t,link:i,linkId:l,isParent:i._id===e,onDelete:r},i._id)),d})})}):(0,s.jsx)(k.f,{message:l({id:"linked_assortment",defaultMessage:"Linked assortment"})})};var R=e.i(76204);let q=A.a`
|
|
12
|
+
mutation ReorderAssortmentLinks($sortKeys: [ReorderAssortmentLinkInput!]!) {
|
|
13
|
+
reorderAssortmentLinks(sortKeys: $sortKeys) {
|
|
14
|
+
_id
|
|
15
|
+
sortKey
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
`;var K=e.i(60195);e.s(["f",0,({assortmentId:e})=>{let{formatMessage:u}=(0,t.X)(),{setModal:f}=(0,o.f)(),{hasRole:x}=(0,j.f)(),{linkedAssortments:g,loading:h}=(0,c.f)({assortmentId:e}),{removeAssortmentLink:p}=(0,m.f)(),{reorderAssortmentLink:v}=(()=>{let[e]=(0,R.f)(q);return{reorderAssortmentLink:async({sortKeys:s})=>e({variables:{sortKeys:s},refetchQueries:["AssortmentLinks"]})}})(),y=g?.map(e=>e._id),b=async e=>{await f((0,s.jsx)(d.f,{onCancelClick:async()=>f(""),message:u({id:"delete_assortment_link",defaultMessage:"This action might cause inconsistencies with other data that relates to it. Are you sure you want to delete this language? "}),onOkClick:async()=>{f(""),await p({assortmentLinkId:e}),r.toast.success(u({id:"assortment_link",defaultMessage:"Link deleted successfully"}))},okText:u({id:"delete_link",defaultMessage:"Delete link"})}))},M=async e=>{let{active:s,over:t}=e;if(s.id!==t.id){let e=y.indexOf(s.id),a=y.indexOf(t.id),i=(0,n.e)(y,e,a).map((e,s)=>({assortmentLinkId:e,sortKey:s}));try{await v({sortKeys:i}),r.toast.success(u({id:"link_reorder",defaultMessage:"Link reorder successfully"}))}catch(e){r.toast.error(u({id:"fail_reorder",defaultMessage:"Reordering failed, Try again!"}))}}else r.toast.info(u({id:"reorder_original",defaultMessage:"Reorder to original location"}))},A=(0,i.n)((0,i.J)(i.k,{activationConstraint:{distance:5}}),(0,i.J)(i.y,{coordinateGetter:n.j}));return(0,s.jsxs)(s.Fragment,{children:[x(a.C.ManageAssortments)&&(0,s.jsx)(K.f,{documentationLabel:u({id:"assortment_link_form_header",defaultMessage:"Child assortments"}),className:"mt-2 lg:mt-5",documentation:(0,s.jsx)(t.L,{id:"assortment_link_form_description",defaultMessage:"<ul> <li>Assign assortment that are direct child of this assortment </li>\n </ul>",values:{ul:e=>(0,s.jsxs)("ul",{className:"space-y-2",children:[e," "]}),li:e=>(0,s.jsxs)("li",{className:"text-sm",children:[e," "]},Math.random()),strong:e=>(0,s.jsx)("strong",{className:"font-semibold text-text-secondary",children:e})}}),children:(0,s.jsx)(N,{assortmentId:e})}),(0,s.jsx)(K.f,{documentationLabel:u({id:"assortment_links_header",defaultMessage:"Assortment links"}),className:"sm:mt-4",documentation:(0,s.jsx)(t.L,{id:"assortment_link_list_description",defaultMessage:"<ul> <li>All assortments found on the assortment relation tree</li>\n <li> Drag and drop list items to sort assortment links </li>\n <li> Parents are assortments found in the ancestors tree on any level </li>\n <li> Descendants are assortments found in the children tree on any level </li> </ul>",values:{ul:e=>(0,s.jsxs)("ul",{className:"space-y-2",children:[e," "]}),li:e=>(0,s.jsxs)("li",{className:"text-sm",children:[e," "]},Math.random()),strong:e=>(0,s.jsx)("strong",{className:"font-semibold text-text-secondary",children:e})}}),children:h?(0,s.jsx)(l.f,{variant:"list"}):(0,s.jsx)("div",{className:"ml-auto shadow-sm dark:shadow-none dark:bg-slate-800 w-full md:col-span-2 bg-white",children:(0,s.jsx)(i.H,{sensors:A,collisionDetection:i.P,onDragEnd:M,id:"assortment-link",children:(0,s.jsx)(F,{currentAssortmentId:e,links:g||[],onRemoveLink:b,items:y})})})})]})}],79001);var O=e.i(54529);let U=A.a`
|
|
19
|
+
query AssortmentProducts(
|
|
20
|
+
$assortmentId: ID
|
|
21
|
+
$slug: String
|
|
22
|
+
$forceLocale: Locale
|
|
23
|
+
) {
|
|
24
|
+
assortment(assortmentId: $assortmentId, slug: $slug) {
|
|
25
|
+
_id
|
|
26
|
+
productAssignments {
|
|
27
|
+
_id
|
|
28
|
+
sortKey
|
|
29
|
+
tags
|
|
30
|
+
product {
|
|
31
|
+
...ProductBriefFragment
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
${O.f}
|
|
37
|
+
`,E=A.a`
|
|
38
|
+
mutation RemoveAssortmentProduct($assortmentProductId: ID!) {
|
|
39
|
+
removeAssortmentProduct(assortmentProductId: $assortmentProductId) {
|
|
40
|
+
_id
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
`,Q=A.a`
|
|
44
|
+
mutation AddAssortmentProduct(
|
|
45
|
+
$assortmentId: ID!
|
|
46
|
+
$productId: ID!
|
|
47
|
+
$tags: [LowerCaseString!]
|
|
48
|
+
) {
|
|
49
|
+
addAssortmentProduct(
|
|
50
|
+
assortmentId: $assortmentId
|
|
51
|
+
productId: $productId
|
|
52
|
+
tags: $tags
|
|
53
|
+
) {
|
|
54
|
+
_id
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
`;var V=e.i(24112);let X=({assortmentId:e})=>{let[r,i]=(0,u.useState)(""),{formatMessage:n}=(0,t.X)(),{addAssortmentProduct:l}=(()=>{let[e]=(0,R.f)(Q);return{addAssortmentProduct:async({productId:s,assortmentId:t,tags:a})=>e({variables:{productId:s,assortmentId:t,tags:a},refetchQueries:["AssortmentProducts"]})}})(),{hasRole:d}=(0,j.f)(),o=n({id:"saved",defaultMessage:"Saved"}),{products:c,loading:m}=(0,V.f)({queryString:r,includeDrafts:!0,limit:50,sort:[{key:"created",value:a.A.Desc}]}),h=async({productId:s,tags:t})=>(await l({productId:s,assortmentId:e,tags:t}),{success:!0}),b=(0,g.f)({submit:h,successMessage:o,initialValues:{productId:"",tags:""}});return(0,s.jsx)(y.U,{children:(0,s.jsx)(f.f,{form:b,id:"assortment_product_form",children:(0,s.jsxs)("div",{className:"shadow dark:shadow-none sm:rounded-md",children:[(0,s.jsx)("div",{className:"grid gap-6 px-4 py-5 sm:p-6",children:(0,s.jsxs)("div",{className:"col-span-12",children:[(0,s.jsx)(v.f,{name:"tags",id:"tags",className:"mt-1 w-full text-sm"}),(0,s.jsx)(p.f,{name:"productId",data:((e=[])=>e?.map(({_id:e,status:s,texts:t,media:a})=>({id:e,tag:s,...t,image:a?.length?a[0]?.file?.url:null})))(c),isLoading:m,label:n({id:"product",defaultMessage:"Product"}),required:!0,onFilter:i,queryString:r,className:"mt-1 w-full py-2 text-sm text-slate-500"})]})}),d(a.C.ManageAssortments)&&(0,s.jsx)("div",{className:"border-t-slate-100 border-t border-t-border-subtle bg-surface-subtle px-4 py-5 text-right sm:px-6",children:(0,s.jsx)(x.f,{label:n({id:"save",defaultMessage:"Save"})})})]})})})},W=({link:e,onDelete:t,id:r})=>{let{hasRole:i}=(0,j.f)(),{_id:l,product:d,tags:o}=e,{attributes:c,listeners:m,setNodeRef:u,transform:f,transition:x}=(0,n.s)({id:r}),g={transform:$.r.Transform.toString(f),transition:x};return(0,s.jsx)(S.default,{href:`/products?slug=${(0,T.U)(d)}`,children:(0,s.jsxs)("div",{ref:u,style:g,className:"group flex items-center justify-between rounded-sm border-b border-border-subtle hover:border-slate-300 dark:hover:border-slate-600 hover:bg-slate-50/80 dark:hover:bg-slate-700/50 transition-all duration-200 ease-in-out hover:shadow-sm px-2 text-text-primary last:border-none hover:cursor-pointer",children:[(0,s.jsx)("div",{className:"flex items-center py-4",children:(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"text-lg text-text-secondary",children:d?.texts?.title}),(0,s.jsx)("p",{className:"text-xs text-slate-600 dark:text-slate-200",children:d?.texts?.subtitle})]})}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:(o||[])?.map(e=>(0,s.jsx)(C.f,{text:e,color:"cyan"},e))}),(0,s.jsx)("div",{onClick:e=>{e.stopPropagation()},children:(0,s.jsxs)("div",{className:"flex items-center justify-between gap-5",children:[i(a.C.ManageAssortments)&&(0,s.jsx)("button",{type:"button",...c,...m,className:"hover:cursor-move",children:(0,s.jsx)(L.f,{})}),(0,s.jsx)(D.f,{onDelete:()=>{t(l)},showEdit:i(a.C.ViewProducts),showDelete:i(a.C.ManageAssortments)})]})})]})})},B=({products:e,onRemoveProduct:a,items:r})=>{let{formatMessage:i}=(0,t.X)();return e.length?(0,s.jsx)(n.V,{items:r,strategy:n.W,children:(0,s.jsx)("div",{className:"block py-3 rounded-sm px-6 bg-surface shadow-sm dark:shadow-none transition-[background-color] ease-in-out delay-200",children:r.map(t=>{let r=Object.values(e).find(e=>e._id===t);return(0,s.jsx)(W,{id:t,link:r,onDelete:a},r._id)})})}):(0,s.jsx)(k.f,{message:i({id:"assigned_products",defaultMessage:"Assigned Products"})})},J=A.a`
|
|
58
|
+
mutation ReorderAssortmentProducts(
|
|
59
|
+
$sortKeys: [ReorderAssortmentProductInput!]!
|
|
60
|
+
) {
|
|
61
|
+
reorderAssortmentProducts(sortKeys: $sortKeys) {
|
|
62
|
+
_id
|
|
63
|
+
sortKey
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
`;e.s(["f",0,({assortmentId:e})=>{let{formatMessage:c}=(0,t.X)(),{linkedProducts:m,loading:u}=(({assortmentId:e=null,slug:s=null}={})=>{let{selectedLocale:t}=(0,w.f)(),a=(0,T.Q)(s),{data:r,loading:i,error:n}=(0,_.f)(U,{skip:!e&&!a,variables:{assortmentId:e||a,forceLocale:t},context:{headers:{forceLocale:t}}}),l=r?.assortment;return{loading:i,error:n,linkedProducts:l?.productAssignments||[]}})({assortmentId:e}),{setModal:f}=(0,o.f)(),{hasRole:x}=(0,j.f)(),{removeAssortmentProduct:g}=(()=>{let[e]=(0,R.f)(E);return{removeAssortmentProduct:async({assortmentProductId:s})=>e({variables:{assortmentProductId:s},refetchQueries:["AssortmentProducts"]})}})(),{reorderAssortmentProducts:h}=(()=>{let[e]=(0,R.f)(J);return{reorderAssortmentProducts:async({sortKeys:s})=>e({variables:{sortKeys:s},refetchQueries:["AssortmentProducts"]})}})(),p=m?.map(e=>e._id),v=async e=>{await f((0,s.jsx)(d.f,{onCancelClick:async()=>f(""),message:c({id:"delete_product_confirmation",defaultMessage:"This action might cause inconsistencies with other data that relates to it and it is nonreversible. Are you sure you want to delete this product? "}),onOkClick:async()=>{f(""),await g({assortmentProductId:e}),r.toast.success(c({id:"product_deleted",defaultMessage:"Product deleted successfully"}))},okText:c({id:"delete_product",defaultMessage:"Delete Product"})}))},y=async e=>{let{active:s,over:t}=e;if(s.id!==t.id){let e=p.indexOf(s.id),a=p.indexOf(t.id),i=(0,n.e)(p,e,a).map((e,s)=>({assortmentProductId:e,sortKey:s}));try{await h({sortKeys:i}),r.toast.success(c({id:"link_reorder",defaultMessage:"Link reorder successfully"}))}catch(e){r.toast.error(c({id:"fail_reorder",defaultMessage:"Reordering failed, Try again!"}))}}else r.toast.info(c({id:"reorder_original",defaultMessage:"Reorder to original location"}))},b=(0,i.n)((0,i.J)(i.k,{activationConstraint:{distance:5}}),(0,i.J)(i.y,{coordinateGetter:n.j}));return(0,s.jsxs)(s.Fragment,{children:[x(a.C.ManageAssortments)&&(0,s.jsx)(K.f,{documentationLabel:c({id:"assortment_product_form_header",defaultMessage:"Products"}),className:"mt-2 lg:mt-5",documentation:(0,s.jsx)(t.L,{id:"assortment_product_form_description",defaultMessage:"<ul> <li>Products that belong to this assortment </li>\n </ul>",values:{ul:e=>(0,s.jsxs)("ul",{className:"space-y-2",children:[e," "]}),li:e=>(0,s.jsxs)("li",{className:"text-sm",children:[e," "]},Math.random()),strong:e=>(0,s.jsx)("strong",{className:"font-semibold text-text-secondary",children:e})}}),children:(0,s.jsx)(X,{assortmentId:e})}),(0,s.jsx)(K.f,{documentationLabel:c({id:"assortment_products_header",defaultMessage:"Assortment product"}),className:"sm:mt-4",documentation:(0,s.jsx)(t.L,{id:"assortment_product_list_description",defaultMessage:"<ul> <li>All products that belong to this assortment</li>\n <li> Drag and drop list items to sort products order </li>\n </ul>",values:{ul:e=>(0,s.jsxs)("ul",{className:"space-y-2",children:[e," "]}),li:e=>(0,s.jsxs)("li",{className:"text-sm",children:[e," "]},Math.random()),strong:e=>(0,s.jsx)("strong",{className:"font-semibold text-text-secondary",children:e})}}),children:u&&!m.length?(0,s.jsx)("div",{className:"ml-auto w-full md:col-span-2 my-auto",children:(0,s.jsx)(l.f,{variant:"list"})}):(0,s.jsx)("div",{className:"ml-auto my-auto w-full rounded-sm shadow-sm dark:shadow-none md:col-span-2",children:(0,s.jsx)(i.H,{sensors:b,collisionDetection:i.P,onDragEnd:y,id:"assortment-product",children:(0,s.jsx)(B,{products:m,onRemoveProduct:v,items:p})})})})]})}],34981);var H=e.i(80294);let z=A.a`
|
|
67
|
+
query AssortmentFilters($assortmentId: ID, $slug: String) {
|
|
68
|
+
assortment(assortmentId: $assortmentId, slug: $slug) {
|
|
69
|
+
_id
|
|
70
|
+
filterAssignments {
|
|
71
|
+
_id
|
|
72
|
+
sortKey
|
|
73
|
+
tags
|
|
74
|
+
filter {
|
|
75
|
+
...FilterFragment
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
${H.f}
|
|
81
|
+
`,G=A.a`
|
|
82
|
+
mutation RemoveAssortmentFilter($assortmentFilterId: ID!) {
|
|
83
|
+
removeAssortmentFilter(assortmentFilterId: $assortmentFilterId) {
|
|
84
|
+
_id
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
`,Z=({link:e,onDelete:r,id:i})=>{let{hasRole:l}=(0,j.f)(),{formatMessage:d}=(0,t.X)(),{_id:o,filter:c,tags:m}=e,{attributes:u,listeners:f,setNodeRef:x,transform:g,transition:h}=(0,n.s)({id:i}),p={transform:$.r.Transform.toString(g),transition:h};return(0,s.jsx)(S.default,{href:`/filters?filterId=${c._id}`,children:(0,s.jsxs)("div",{ref:x,style:p,className:"group flex items-center justify-between rounded-sm border-b border-border-subtle hover:border-slate-300 dark:hover:border-slate-600 hover:bg-slate-50/80 dark:hover:bg-slate-700/50 transition-all duration-200 ease-in-out hover:shadow-sm px-2 gap-4 last:border-none hover:cursor-pointer",children:[(0,s.jsx)("div",{className:"shrink-0 grow-0 basis-20 pl-5 space-y-1 p-2",children:(0,s.jsx)(C.f,{color:c?.isActive?"emerald":"slate",text:d(c?.isActive?{id:"active",defaultMessage:"Active"}:{id:"inactive",defaultMessage:"In-Active"})})}),(0,s.jsxs)("div",{className:"shrink grow basis-1/3 pl-5 space-y-1 p-2",children:[(0,s.jsxs)("h3",{className:"text-lg text-text-secondary",children:["(",c?.key,") ",c?.texts?.title]}),(0,s.jsx)("p",{className:"text-xs text-slate-600",children:c?.texts?.subtitle}),(0,s.jsx)(C.f,{color:"slate",text:c?.type})]}),(0,s.jsx)("div",{className:"basis-1/4 pl-5 space-y-1 p-2",children:(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:m?.map(e=>(0,s.jsx)(C.f,{color:"slate",text:e},e))})}),(0,s.jsx)("div",{onClick:e=>{e.stopPropagation()},children:(0,s.jsxs)("div",{className:"flex items-center justify-between gap-5",children:[l(a.C.ManageAssortments)&&(0,s.jsx)("button",{type:"button",...u,...f,className:"hover:cursor-move",children:(0,s.jsx)(L.f,{})}),(0,s.jsx)(D.f,{onDelete:()=>{r(o)},showEdit:l(a.C.ViewFilters),showDelete:l(a.C.ManageAssortments)})]})})]})})},Y=({filters:e,onRemoveFilter:a,items:r})=>{let{formatMessage:i}=(0,t.X)();return e?.length?(0,s.jsx)(n.V,{items:r,strategy:n.W,children:(0,s.jsx)("div",{className:"space-y-4 py-3 px-6 rounded-sm transition-[background-color] ease-in-out delay-200",children:r.map(t=>{let r=e.find(e=>e._id===t);return(0,s.jsx)(Z,{id:t,link:r,onDelete:a},r?._id)})})}):(0,s.jsx)(k.f,{message:i({id:"filters",defaultMessage:"Filters"})})},ee=A.a`
|
|
88
|
+
mutation AddAssortmentFilter(
|
|
89
|
+
$assortmentId: ID!
|
|
90
|
+
$filterId: ID!
|
|
91
|
+
$tags: [LowerCaseString!]
|
|
92
|
+
) {
|
|
93
|
+
addAssortmentFilter(
|
|
94
|
+
assortmentId: $assortmentId
|
|
95
|
+
filterId: $filterId
|
|
96
|
+
tags: $tags
|
|
97
|
+
) {
|
|
98
|
+
_id
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
`;var es=e.i(54680);let et=({assortmentId:e})=>{let{formatMessage:r}=(0,t.X)(),{addAssortmentFilter:i}=(()=>{let[e]=(0,R.f)(ee);return{addAssortmentFilter:async({assortmentId:s,filterId:t,tags:a})=>e({variables:{assortmentId:s,filterId:t,tags:a},refetchQueries:["AssortmentFilters"]})}})(),{hasRole:n}=(0,j.f)(),[l,d]=(0,u.useState)(""),{filters:o}=(0,es.f)({queryString:l,limit:50,includeInactive:!0,sort:[{key:"created",value:a.A.Desc}]}),c=r({id:"saved",defaultMessage:"Saved"}),m=async({filterId:s,tags:t})=>(await i({filterId:s,assortmentId:e,tags:t}),{success:!0}),h=(0,g.f)({submit:m,successMessage:c,initialValues:{filterId:"",tags:""}});return(0,s.jsx)(y.U,{children:(0,s.jsx)(f.f,{form:h,id:"assortment_filter_form",children:(0,s.jsxs)("div",{className:"shadow dark:shadow-none sm:rounded-md",children:[(0,s.jsx)("div",{className:"grid gap-6 px-4 py-5 sm:p-6",children:(0,s.jsxs)("div",{className:"col-span-12",children:[(0,s.jsx)(v.f,{name:"tags",id:"tags",label:r({id:"tags",defaultMessage:"Tags"}),className:"mt-1 w-full text-sm font-medium text-slate-500"}),(0,s.jsx)(p.f,{name:"filterId",required:!0,label:r({id:"filter",defaultMessage:"Filter"}),data:o?.map(({_id:e,texts:s,key:t})=>({id:e,title:` (${t})-${s?.title}`})),queryString:l,onFilter:d,className:"mt-1 w-full py-2 text-sm font-medium text-slate-500"})]})}),(0,s.jsx)(b.f,{}),n(a.C.ManageAssortments)&&(0,s.jsx)("div",{className:"border-t-slate-100 border-t border-t-border-subtle bg-surface-subtle px-4 py-5 text-right sm:px-6",children:(0,s.jsx)(x.f,{label:r({id:"save",defaultMessage:"Save"})})})]})})})},ea=A.a`
|
|
102
|
+
mutation ReorderAssortmentFilters(
|
|
103
|
+
$sortKeys: [ReorderAssortmentFilterInput!]!
|
|
104
|
+
) {
|
|
105
|
+
reorderAssortmentFilters(sortKeys: $sortKeys) {
|
|
106
|
+
_id
|
|
107
|
+
sortKey
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
`;e.s(["f",0,({assortmentId:e})=>{let{formatMessage:c}=(0,t.X)(),{assortmentFilters:m,loading:u}=(({assortmentId:e=null,slug:s=null}={})=>{let t=(0,T.Q)(s),{data:a,loading:r,error:i}=(0,_.f)(z,{skip:!e&&!t,variables:{assortmentId:e||t}}),n=a?.assortment;return{loading:r,error:i,assortmentFilters:n?.filterAssignments||[]}})({assortmentId:e}),{setModal:f}=(0,o.f)(),{hasRole:x}=(0,j.f)(),{removeAssortmentFilter:g}=(()=>{let[e]=(0,R.f)(G);return{removeAssortmentFilter:async({assortmentFilterId:s})=>e({variables:{assortmentFilterId:s},refetchQueries:["AssortmentFilters"]})}})(),{reorderAssortmentFilters:h}=(()=>{let[e]=(0,R.f)(ea);return{reorderAssortmentFilters:async({sortKeys:s})=>e({variables:{sortKeys:s},refetchQueries:["AssortmentFilters"]})}})(),p=m?.map(e=>e._id),v=async e=>{await f((0,s.jsx)(d.f,{onCancelClick:async()=>f(""),message:c({id:"delete_assortment_filter_confirmation",defaultMessage:"This action might cause inconsistencies with other data that relates to it. Are you sure you want to delete this language? "}),onOkClick:async()=>{f(""),await g({assortmentFilterId:e}),r.toast.success(c({id:"assortment_filter_deleted",defaultMessage:"Assortment filter deleted successfully"}))},okText:c({id:"delete_filter",defaultMessage:"Delete filter"})}))},y=async e=>{let{active:s,over:t}=e;if(s.id!==t.id){let e=p.indexOf(s.id),a=p.indexOf(t.id),i=(0,n.e)(p,e,a).map((e,s)=>({assortmentFilterId:e,sortKey:s}));try{await h({sortKeys:i}),r.toast.success(c({id:"link_reorder",defaultMessage:"Link reorder successfully"}))}catch(e){r.toast.error(c({id:"fail_reorder",defaultMessage:"Reordering failed, Try again!"}))}}else r.toast.info(c({id:"reorder_original",defaultMessage:"Reorder to original location"}))},b=(0,i.n)((0,i.J)(i.k,{activationConstraint:{distance:5}}),(0,i.J)(i.y,{coordinateGetter:n.j}));return(0,s.jsxs)(s.Fragment,{children:[x(a.C.ManageAssortments)&&(0,s.jsx)(K.f,{documentationLabel:c({id:"assortment_filters_form_header",defaultMessage:"Filters"}),className:"mt-2 lg:mt-5",documentation:(0,s.jsx)(t.L,{id:"assortment_filter_form_description",defaultMessage:"<ul> <li>Assign filters that will be applied for the assortment </li>\n </ul>",values:{ul:e=>(0,s.jsxs)("ul",{className:"space-y-2",children:[e," "]}),li:e=>(0,s.jsxs)("li",{className:"text-sm",children:[e," "]},Math.random()),strong:e=>(0,s.jsx)("strong",{className:"font-semibold text-text-secondary",children:e})}}),children:(0,s.jsx)(et,{assortmentId:e})}),(0,s.jsx)(K.f,{documentationLabel:c({id:"assortment_filters_header",defaultMessage:"Assortment filters"}),className:"sm:mt-4",documentation:(0,s.jsx)(t.L,{id:"assortment_filter_list_description",defaultMessage:"<ul> <li>All filters that are applied when searching for this assortment </li>\n <li> Drag and drop list items to sort filters order </li>\n </ul>",values:{ul:e=>(0,s.jsxs)("ul",{className:"space-y-2",children:[e," "]}),li:e=>(0,s.jsxs)("li",{className:"text-sm",children:[e," "]},Math.random()),strong:e=>(0,s.jsx)("strong",{className:"font-semibold text-text-secondary",children:e})}}),children:u?(0,s.jsx)("div",{className:"ml-auto shadow-sm dark:shadow-none w-full md:col-span-2",children:(0,s.jsx)(l.f,{variant:"list"})}):(0,s.jsx)("div",{className:"ml-auto shadow-sm dark:shadow-none w-full md:col-span-2 bg-surface",children:(0,s.jsx)(i.H,{sensors:b,collisionDetection:i.P,onDragEnd:y,id:"assortment-filter",children:(0,s.jsx)(Y,{filters:m,onRemoveFilter:v,items:p})})})})]})}],58101)},45856,24941,e=>{"use strict";var s=e.i(91398),t=e.i(91788);e.i(51523);var a=e.i(19518),r=e.i(3326),i=e.i(69211),n=e.i(21128),l=e.i(16984),d=e.i(98949),o=e.i(59080),c=e.i(32171);let m=o.a`
|
|
111
|
+
fragment AssortmentTextsFragment on AssortmentTexts {
|
|
112
|
+
_id
|
|
113
|
+
locale
|
|
114
|
+
slug
|
|
115
|
+
title
|
|
116
|
+
subtitle
|
|
117
|
+
description
|
|
118
|
+
}
|
|
119
|
+
`,u=o.a`
|
|
120
|
+
query TranslatedAssortmentTexts($assortmentId: ID!) {
|
|
121
|
+
translatedAssortmentTexts(assortmentId: $assortmentId) {
|
|
122
|
+
...AssortmentTextsFragment
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
${m}
|
|
126
|
+
`;var f=e.i(76204);let x=o.a`
|
|
127
|
+
mutation updateAssortmentTexts(
|
|
128
|
+
$assortmentId: ID!
|
|
129
|
+
$texts: [AssortmentTextInput!]!
|
|
130
|
+
) {
|
|
131
|
+
updateAssortmentTexts(assortmentId: $assortmentId, texts: $texts) {
|
|
132
|
+
...AssortmentTextsFragment
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
${m}
|
|
136
|
+
`;var g=e.i(60195),h=e.i(58971),p=e.i(5505),v=e.i(83094),j=e.i(57561),y=e.i(48539);e.s(["f",0,({assortmentId:e})=>{let{formatMessage:o}=(0,r.X)(),{hasRole:m}=(0,h.f)(),{defaultLocale:b,shopInfo:M,loading:A}=(0,y.f)(),{selectedLocale:_,setSelectedLocale:I,languageDialectList:w}=(0,j.f)(),{translatedAssortmentTexts:N,loading:k}=(({assortmentId:e=null})=>{let{data:s,loading:t,error:a}=(0,c.f)(u,{skip:!e,variables:{assortmentId:e}});return{loading:t,error:a,translatedAssortmentTexts:s?.translatedAssortmentTexts||[]}})({assortmentId:e}),$=o({id:"saved",defaultMessage:"Saved"}),{updateAssortmentTexts:C}=(()=>{let[e]=(0,f.f)(x);return{updateAssortmentTexts:async({assortmentId:s,texts:t})=>e({variables:{assortmentId:s,texts:t},refetchQueries:["TranslatedAssortmentTexts","Assortment"]})}})(),L=async({slug:s,title:t,subtitle:a,description:r})=>(await C({assortmentId:e,texts:[{locale:_,slug:s,title:t,subtitle:a,description:r}]}),{success:!0}),D=(0,d.f)({submit:L,successMessage:$,initialValues:{slug:"",title:"",subtitle:"",...!k&&N?.find(e=>e.locale===_)||{}}});return(0,t.useEffect)(()=>{let e=N?.find(e=>e.locale===_);D.api.setValues({slug:e?.slug||"",title:e?.title||"",subtitle:e?.subtitle||"",description:e?.description||"",...e||{}})},[N,_]),(0,t.useEffect)(()=>{if(M&&N?.length&&!N?.find(({locale:e})=>e===_))if(b&&N?.find(({locale:e})=>e===b))I(b);else if(b&&N?.find(({locale:e})=>e===b.split("-")[0]))I(b.split("-")[0]);else{let e=N?.find(({locale:e})=>e&&w?.find(({isoCode:s})=>s===e));I(e?.locale)}},[A,N]),(0,s.jsx)(g.f,{documentationLabel:o({id:"texts",defaultMessage:"Texts"}),className:"mt-2 lg:mt-5",documentation:(0,s.jsx)(r.L,{id:"assortment_text_form_description",defaultMessage:"<ul> <li><strong>Slug:</strong> The unique part of your category URL (e.g., 'electronics' or 'summer-collection'). Keep it short and descriptive.</li>\n <li><strong>Localization:</strong> Switch languages using the dropdown at the top left to translate content for different markets.</li>\n <li><strong>Description:</strong> Supports Markdown and HTML formatting. Use double backslash (\\\\\\\\\\\\\\\\) for line breaks.</li>\n <li><strong>Category Organization:</strong> Use clear, descriptive titles that help customers navigate your product catalog. Think about how customers would search for this category.</li>\n <li><strong>SEO Tip:</strong> Well-written category descriptions help search engines understand your product organization and improve discoverability.</li>\n </ul>",values:{ul:e=>(0,s.jsxs)("ul",{className:"space-y-2",children:[e," "]}),li:e=>(0,s.jsxs)("li",{className:"text-sm",children:[e," "]},Math.random()),strong:e=>(0,s.jsx)("strong",{className:"font-semibold text-text-secondary",children:e})}}),children:(0,s.jsx)(p.U,{children:(0,s.jsx)(i.f,{form:D,disabled:!m(a.C.ManageAssortments),children:(0,s.jsxs)("div",{className:"shadow sm:rounded-md",children:[(0,s.jsxs)("div",{className:"grid gap-6 px-4 py-5 sm:p-6",children:[(0,s.jsx)("div",{className:"col-span-12",children:(0,s.jsx)(l.f,{name:"slug",disabled:!m(a.C.ManageAssortments),required:!0,id:"slug",label:o({id:"slug",defaultMessage:"Slug"}),autoComplete:"on",className:"mt-1 w-full text-sm"})}),(0,s.jsx)("div",{className:"col-span-12",children:(0,s.jsx)(l.f,{name:"title",disabled:!m(a.C.ManageAssortments),id:"title",label:o({id:"title",defaultMessage:"Title"}),required:!0,autoComplete:"on",className:"mt-1 w-full text-sm"})}),(0,s.jsx)("div",{className:"col-span-12",children:(0,s.jsx)(l.f,{name:"subtitle",disabled:!m(a.C.ManageAssortments),id:"subtitle",label:o({id:"subtitle",defaultMessage:"Subtitle"}),autoComplete:"on",className:"mt-1 w-full text-sm"})}),(0,s.jsx)("div",{className:"col-span-12",children:(0,s.jsx)(v.f,{name:"description",disabled:!m(a.C.ManageAssortments),id:"description",label:o({id:"description",defaultMessage:"Description"})})})]}),(0,s.jsx)("div",{className:"border-t-slate-100 border-t border-t-border-subtle bg-surface-subtle px-4 py-5 text-right sm:px-6",children:m(a.C.ManageAssortments)&&(0,s.jsx)(n.f,{label:o({id:"save",defaultMessage:"Save"})})})]})})})})}],45856);var b=e.i(28401),M=e.i(59295),A=e.i(6277),_=e.i(33006),I=e.i(15971),w=e.i(6607),N=e.i(64479),k=e.i(93994);let $=o.a`
|
|
137
|
+
mutation PrepareAssortmentMediaUpload(
|
|
138
|
+
$mediaName: String!
|
|
139
|
+
$assortmentId: ID!
|
|
140
|
+
) {
|
|
141
|
+
prepareAssortmentMediaUpload(
|
|
142
|
+
mediaName: $mediaName
|
|
143
|
+
assortmentId: $assortmentId
|
|
144
|
+
) {
|
|
145
|
+
_id
|
|
146
|
+
putURL
|
|
147
|
+
expires
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
`,C=()=>{let[e]=(0,f.f)($),{confirmMediaUpload:s}=(0,N.f)({refetchQueries:["Assortment"]});return{addAssortmentMedia:async({assortmentId:t,media:a})=>{let{data:r}=await e({variables:{assortmentId:t,mediaName:a.name}}),{prepareAssortmentMediaUpload:i}=r;await (0,k.f)(a,i.putURL),await s({mediaUploadTicketId:i._id,size:a?.size,type:a?.type})}}};var L=e.i(1880);let D=o.a`
|
|
151
|
+
query AssortmentMedia($assortmentId: ID, $slug: String) {
|
|
152
|
+
assortment(assortmentId: $assortmentId, slug: $slug) {
|
|
153
|
+
_id
|
|
154
|
+
media {
|
|
155
|
+
_id
|
|
156
|
+
tags
|
|
157
|
+
texts {
|
|
158
|
+
_id
|
|
159
|
+
locale
|
|
160
|
+
title
|
|
161
|
+
subtitle
|
|
162
|
+
}
|
|
163
|
+
file {
|
|
164
|
+
_id
|
|
165
|
+
url
|
|
166
|
+
name
|
|
167
|
+
size
|
|
168
|
+
type
|
|
169
|
+
}
|
|
170
|
+
sortKey
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
`,T=({assortmentId:e=null,slug:s=null}={})=>{let t=(0,L.Q)(s),{data:a,loading:r,error:i}=(0,c.f)(D,{skip:!e&&!t,variables:{assortmentId:e||t}});return{loading:r,error:i,assortmentMedia:a?.assortment?.media||[]}},S=o.a`
|
|
175
|
+
mutation RemoveAssortmentMedia($assortmentMediaId: ID!) {
|
|
176
|
+
removeAssortmentMedia(assortmentMediaId: $assortmentMediaId) {
|
|
177
|
+
_id
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
`,P=()=>{let[e]=(0,f.f)(S);return{removeAssortmentMedia:async({assortmentMediaId:s})=>e({variables:{assortmentMediaId:s},refetchQueries:["AssortmentMedia"]})}},F=o.a`
|
|
181
|
+
mutation ReorderAssortmentMedia($sortKeys: [ReorderAssortmentMediaInput!]!) {
|
|
182
|
+
reorderAssortmentMedia(sortKeys: $sortKeys) {
|
|
183
|
+
_id
|
|
184
|
+
sortKey
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
`,R=()=>{let[e]=(0,f.f)(F);return{reorderAssortmentMedia:async({sortKeys:s})=>e({variables:{sortKeys:s},refetchQueries:["AssortmentMedia"]})}};var q=e.i(2194),K=e.i(90062);let O=o.a`
|
|
188
|
+
fragment AssortmentMediaTextsFragment on AssortmentMediaTexts {
|
|
189
|
+
_id
|
|
190
|
+
locale
|
|
191
|
+
title
|
|
192
|
+
subtitle
|
|
193
|
+
}
|
|
194
|
+
`,U=o.a`
|
|
195
|
+
query TranslatedAssortmentMediaTexts($assortmentMediaId: ID!) {
|
|
196
|
+
translatedAssortmentMediaTexts(assortmentMediaId: $assortmentMediaId) {
|
|
197
|
+
...AssortmentMediaTextsFragment
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
${O}
|
|
201
|
+
`,E=o.a`
|
|
202
|
+
mutation UpdateAssortmentMediaTexts(
|
|
203
|
+
$assortmentMediaId: ID!
|
|
204
|
+
$texts: [AssortmentMediaTextInput!]!
|
|
205
|
+
) {
|
|
206
|
+
updateAssortmentMediaTexts(
|
|
207
|
+
assortmentMediaId: $assortmentMediaId
|
|
208
|
+
texts: $texts
|
|
209
|
+
) {
|
|
210
|
+
...AssortmentMediaTextsFragment
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
${O}
|
|
214
|
+
`,Q=({media:e,onDelete:a,locale:r,id:i})=>{let[n,l]=(0,t.useState)(!1),{updateAssortmentMediaTexts:d}=(()=>{let[e]=(0,f.f)(E);return{updateAssortmentMediaTexts:async({assortmentMediaId:s,texts:t})=>e({variables:{assortmentMediaId:s,texts:t},refetchQueries:["TranslatedAssortmentMediaTexts"]})}})(),{translatedAssortmentMediaTexts:o}=(({assortmentMediaId:e=null})=>{let{data:s,loading:t,error:a}=(0,c.f)(U,{skip:!e,variables:{assortmentMediaId:e}});return{loading:t,error:a,translatedAssortmentMediaTexts:s?.translatedAssortmentMediaTexts||[]}})({assortmentMediaId:e._id}),m=o?.find(e=>e.locale===r)||{},u=async({title:s,subtitle:t})=>(await d({assortmentMediaId:e._id,texts:[{title:s,locale:r,subtitle:t}]}),l(!1),!0);return(0,s.jsx)(K.f,{media:e,mediaText:m,isEdit:n,onDelete:a,onEdit:l,onUpdate:u,id:i})},V=({medias:e=[],onDeleteMedia:t,items:a=[]})=>{let{formatMessage:i}=(0,r.X)(),{selectedLocale:n}=(0,j.f)();return A.V&&Q&&q.f?(0,s.jsx)("div",{className:"rounded-md lg:col-span-6",children:(0,s.jsxs)("div",{className:"mx-auto max-w-7xl overflow-hidden",children:[(0,s.jsx)("h2",{className:"sr-only",children:i({id:"assortment_media",defaultMessage:"Assortment Media"})}),(0,s.jsx)(A.V,{items:a,strategy:A.W,children:(0,s.jsx)("ul",{className:"space-y-4 transition-[background-color] ease-in-out delay-200",children:e.length?a.map(a=>{let r=Object.values(e).find(e=>e._id===a);return r?(0,s.jsx)(Q,{id:a,media:r,locale:n,onDelete:t},r._id):(console.warn(`Media with ID ${a} not found in medias array`),null)}).filter(Boolean):(0,s.jsx)(q.f,{message:i({id:"media",defaultMessage:"Media"})})})})]})}):(console.error("Required components not loaded in AssortmentMediaList:",{SortableContext:!!A.V,AssortmentMediaListItem:!!Q,NoData:!!q.f}),(0,s.jsx)("div",{className:"rounded-md lg:col-span-6",children:(0,s.jsx)("div",{className:"mx-auto max-w-7xl overflow-hidden",children:(0,s.jsx)("div",{className:"flex items-center justify-center p-8",children:(0,s.jsx)("div",{className:"text-rose-500",children:"Media list component loading error. Please refresh the page."})})})}))},X=({assortmentId:e})=>{let{assortmentMedia:t,loading:i,error:n}=T({assortmentId:e}),{formatMessage:l}=(0,r.X)(),{setModal:d}=(0,w.f)(),{hasRole:o}=(0,h.f)(),{removeAssortmentMedia:c}=P(),{reorderAssortmentMedia:m}=R(),{addAssortmentMedia:u}=C(),f=(0,M.n)((0,M.J)(M.k,{activationConstraint:{distance:5}}),(0,M.J)(M.y,{coordinateGetter:A.j})),x=(t||[]).map(e=>e._id);if(!_.f||!M.H||!V)return console.error("Required components not loaded:",{MediaUploader:!!_.f,DndContext:!!M.H,AssortmentMediaList:!!V}),(0,s.jsx)("div",{className:"mx-auto mt-5 max-w-full bg-surface py-6 shadow-sm dark:shadow-none lg:rounded-sm",children:(0,s.jsx)("div",{className:"flex items-center justify-center p-8",children:(0,s.jsx)("div",{className:"text-rose-500",children:l({id:"component_loading_error",defaultMessage:"Component loading error. Please refresh the page."})})})});if(i)return(0,s.jsx)("div",{className:"mx-auto mt-5 max-w-full bg-surface py-6 shadow-sm dark:shadow-none lg:rounded-sm",children:(0,s.jsx)("div",{className:"flex items-center justify-center p-8",children:(0,s.jsx)("div",{className:"text-text-muted",children:l({id:"loading_media",defaultMessage:"Loading media..."})})})});if(n)return(0,s.jsx)("div",{className:"mx-auto mt-5 max-w-full bg-surface py-6 shadow-sm dark:shadow-none lg:rounded-sm",children:(0,s.jsx)("div",{className:"flex items-center justify-center p-8",children:(0,s.jsxs)("div",{className:"text-rose-500",children:[l({id:"error_loading_media",defaultMessage:"Error loading media: "})," ",n.message]})})});let g=async s=>{try{await u({assortmentId:e,media:s}),b.toast.success(l({id:"assortment_media_upload",defaultMessage:"Media uploaded successfully"}))}catch(e){b.toast.error(l({id:"fail_upload",defaultMessage:"Media upload failed"}))}},p=async e=>{await d((0,s.jsx)(I.f,{onCancelClick:async()=>d(""),message:l({id:"delete_assortment_media_confirmation",defaultMessage:"This action might cause inconsistencies with other data that relates to it. Are you sure you want to delete this currency? "}),onOkClick:async()=>{d(""),await c({assortmentMediaId:e}),b.toast.success(l({id:"assortment_media_deleted",defaultMessage:"Media deleted successfully"}))},okText:l({id:"delete_assortment_media",defaultMessage:"Delete media"})}))},v=async e=>{let{active:s,over:t}=e;if(s.id!==t.id){let e=x.indexOf(s.id),a=x.indexOf(t.id),r=(0,A.e)(x,e,a).map((e,s)=>({assortmentMediaId:e,sortKey:s}));try{await m({sortKeys:r}),b.toast.success(l({id:"link_reorder",defaultMessage:"Link reorder successfully"}))}catch(e){b.toast.error(l({id:"fail_reorder",defaultMessage:"Reordering failed, Try again!"}))}}else b.toast.info(l({id:"reorder_original",defaultMessage:"Reorder to original location"}))};return(0,s.jsxs)("div",{className:"mx-auto mt-5 max-w-fullpy-6 grid lg:grid-cols-12 gap-5",children:[o(a.C.ManageAssortments)&&(0,s.jsx)("div",{className:"lg:col-span-6",children:(0,s.jsx)(_.f,{onlyDragAndDrop:!0,addMedia:g})}),(0,s.jsx)("div",{className:"lg:col-span-6",children:(0,s.jsx)(M.H,{sensors:f,collisionDetection:M.P,onDragEnd:v,id:"assortment-media",children:(0,s.jsx)(V,{medias:t,onDeleteMedia:p,items:x})})})]})};e.s(["f",0,e=>{let t=Object.entries({MediaUploader:_.f,DangerMessage:I.f,useModal:w.f,useAddAssortmentMedia:C,useAssortmentMedia:T,useRemoveAssortmentMedia:P,useReorderAssortmentMedia:R,AssortmentMediaList:V,DndContext:M.H,closestCenter:M.P,KeyboardSensor:M.y,PointerSensor:M.k,useSensor:M.J,useSensors:M.n,arrayMove:A.e,sortableKeyboardCoordinates:A.j}).filter(([e,s])=>!s).map(([e])=>e);if(t.length>0)return console.error("Missing dependencies in AssortmentMediaForm:",t),(0,s.jsx)("div",{className:"mx-auto mt-5 max-w-full bg-surface py-6 shadow-sm dark:shadow-none lg:rounded-sm",children:(0,s.jsx)("div",{className:"flex items-center justify-center p-8",children:(0,s.jsxs)("div",{className:"text-center",children:[(0,s.jsx)("div",{className:"text-rose-500 mb-2",children:"Missing Dependencies"}),(0,s.jsxs)("div",{className:"text-sm text-text-secondary",children:["The following dependencies are missing:"," ",t.join(", ")]})]})})});try{return(0,s.jsx)(X,{...e})}catch(e){return console.error("Error rendering AssortmentMediaForm:",e),(0,s.jsx)("div",{className:"mx-auto mt-5 max-w-full bg-surface py-6 shadow-sm dark:shadow-none lg:rounded-sm",children:(0,s.jsx)("div",{className:"flex items-center justify-center p-8",children:(0,s.jsxs)("div",{className:"text-center",children:[(0,s.jsx)("div",{className:"text-rose-500 mb-2",children:"Component Error"}),(0,s.jsx)("div",{className:"text-sm text-text-secondary",children:e instanceof Error?e.message:"Unknown error occurred"})]})})})}}],24941)},50931,e=>{"use strict";var s=e.i(59080);let t=s.a`
|
|
215
|
+
fragment AssortmentFragment on Assortment {
|
|
216
|
+
_id
|
|
217
|
+
isActive
|
|
218
|
+
created
|
|
219
|
+
updated
|
|
220
|
+
sequence
|
|
221
|
+
isRoot
|
|
222
|
+
tags
|
|
223
|
+
texts(forceLocale: $forceLocale) {
|
|
224
|
+
_id
|
|
225
|
+
slug
|
|
226
|
+
title
|
|
227
|
+
subtitle
|
|
228
|
+
description
|
|
229
|
+
}
|
|
230
|
+
childrenCount
|
|
231
|
+
media {
|
|
232
|
+
_id
|
|
233
|
+
tags
|
|
234
|
+
file {
|
|
235
|
+
_id
|
|
236
|
+
url
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
`;e.s(["f",0,t])},65530,57569,35339,e=>{"use strict";var s=e.i(59080),t=e.i(32171),a=e.i(1880),r=e.i(50931),i=e.i(57561);let n=s.a`
|
|
241
|
+
query AssortmentLinks(
|
|
242
|
+
$assortmentId: ID
|
|
243
|
+
$slug: String
|
|
244
|
+
$forceLocale: Locale
|
|
245
|
+
) {
|
|
246
|
+
assortment(assortmentId: $assortmentId, slug: $slug) {
|
|
247
|
+
_id
|
|
248
|
+
linkedAssortments {
|
|
249
|
+
_id
|
|
250
|
+
sortKey
|
|
251
|
+
parent {
|
|
252
|
+
...AssortmentFragment
|
|
253
|
+
}
|
|
254
|
+
child {
|
|
255
|
+
...AssortmentFragment
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
${r.f}
|
|
261
|
+
`;e.s(["f",0,({assortmentId:e=null,slug:s=null}={})=>{let r=(0,a.Q)(s),{selectedLocale:l}=(0,i.f)(),{data:d,loading:o,error:c}=(0,t.f)(n,{skip:!e&&!r,variables:{assortmentId:e||r,forceLocale:l}}),m=d?.assortment;return{loading:o,error:c,linkedAssortments:m?.linkedAssortments||[]}}],65530);var l=e.i(76204);let d=s.a`
|
|
262
|
+
mutation RemoveAssortmentLink($assortmentLinkId: ID!) {
|
|
263
|
+
removeAssortmentLink(assortmentLinkId: $assortmentLinkId) {
|
|
264
|
+
_id
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
`;e.s(["f",0,()=>{let[e]=(0,l.f)(d);return{removeAssortmentLink:async({assortmentLinkId:s})=>e({variables:{assortmentLinkId:s},refetchQueries:["AssortmentLinks"]})}}],57569);let o=s.a`
|
|
268
|
+
mutation AddAssortmentLink(
|
|
269
|
+
$parentAssortmentId: ID!
|
|
270
|
+
$childAssortmentId: ID!
|
|
271
|
+
$tags: [LowerCaseString!]
|
|
272
|
+
) {
|
|
273
|
+
addAssortmentLink(
|
|
274
|
+
parentAssortmentId: $parentAssortmentId
|
|
275
|
+
childAssortmentId: $childAssortmentId
|
|
276
|
+
tags: $tags
|
|
277
|
+
) {
|
|
278
|
+
_id
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
`;e.s(["f",0,()=>{let[e]=(0,l.f)(o);return{addAssortmentLink:async({parentAssortmentId:s,childAssortmentId:t,tags:a})=>e({variables:{parentAssortmentId:s,childAssortmentId:t,tags:a},refetchQueries:["AssortmentLinks"]})}}],35339)},37547,e=>{"use strict";var s=e.i(59080),t=e.i(32171),a=e.i(50931);let r=s.a`
|
|
282
|
+
query Assortments(
|
|
283
|
+
$queryString: String
|
|
284
|
+
$tags: [LowerCaseString!]
|
|
285
|
+
$slugs: [String!]
|
|
286
|
+
$limit: Int
|
|
287
|
+
$offset: Int
|
|
288
|
+
$includeInactive: Boolean
|
|
289
|
+
$includeLeaves: Boolean
|
|
290
|
+
$sort: [SortOptionInput!]
|
|
291
|
+
$forceLocale: Locale
|
|
292
|
+
) {
|
|
293
|
+
assortments(
|
|
294
|
+
queryString: $queryString
|
|
295
|
+
tags: $tags
|
|
296
|
+
slugs: $slugs
|
|
297
|
+
limit: $limit
|
|
298
|
+
offset: $offset
|
|
299
|
+
includeInactive: $includeInactive
|
|
300
|
+
includeLeaves: $includeLeaves
|
|
301
|
+
sort: $sort
|
|
302
|
+
) {
|
|
303
|
+
...AssortmentFragment
|
|
304
|
+
linkedAssortments {
|
|
305
|
+
child {
|
|
306
|
+
_id
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
assortmentsCount(
|
|
311
|
+
tags: $tags
|
|
312
|
+
slugs: $slugs
|
|
313
|
+
includeInactive: $includeInactive
|
|
314
|
+
includeLeaves: $includeLeaves
|
|
315
|
+
queryString: $queryString
|
|
316
|
+
)
|
|
317
|
+
}
|
|
318
|
+
${a.f}
|
|
319
|
+
`;e.s(["f",0,({queryString:e="",tags:s=null,slugs:a=null,limit:i=20,offset:n=0,includeInactive:l=!0,includeLeaves:d=!1,sort:o=[],forceLocale:c=""}={})=>{let{data:m,loading:u,error:f,fetchMore:x,client:g}=(0,t.f)(r,{variables:{queryString:e,tags:s,slugs:a||null,limit:i,offset:n,includeInactive:l,includeLeaves:d,sort:o.length?o:[{key:"sequence",value:"ASC"}],forceLocale:c},context:{headers:{forceLocale:c}}}),h=m?.assortments||[],p=m?.assortmentsCount,v=h?.length<p;return{loading:u,error:f,assortmentsCount:p,hasMore:v,assortments:m?.assortments||[],loadMore:()=>{x({variables:{offset:h?.length}})},client:g}}])},75818,e=>{"use strict";var s=e.i(59080),t=e.i(76204);let a=s.a`
|
|
320
|
+
mutation RemoveAssortment($assortmentId: ID!) {
|
|
321
|
+
removeAssortment(assortmentId: $assortmentId) {
|
|
322
|
+
_id
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
`;e.s(["f",0,()=>{let[e]=(0,t.f)(a);return{removeAssortment:async({assortmentId:s})=>e({variables:{assortmentId:s},refetchQueries:["Assortments","Assortment","ShopStatus","ShopInfo"]})}}])},921,e=>{"use strict";var s=e.i(59080),t=e.i(76204);let a=s.a`
|
|
326
|
+
mutation UpdateAssortment(
|
|
327
|
+
$assortment: UpdateAssortmentInput!
|
|
328
|
+
$assortmentId: ID!
|
|
329
|
+
) {
|
|
330
|
+
updateAssortment(assortment: $assortment, assortmentId: $assortmentId) {
|
|
331
|
+
_id
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
`;e.s(["f",0,()=>{let[e]=(0,t.f)(a);return{updateAssortment:async({assortmentId:s,assortment:{isRoot:t,tags:a,sequence:r,isActive:i}})=>e({variables:{assortment:{isRoot:t,tags:a,sequence:r,isActive:i},assortmentId:s},refetchQueries:["Assortments","Assortment"]})}}])},98568,e=>{"use strict";var s=e.i(91398),t=e.i(3326);e.i(51523);var a=e.i(19518),r=e.i(28401),i=e.i(3828),n=e.i(50595),l=e.i(53576),d=e.i(25327),o=e.i(13534),c=e.i(70475),m=e.i(25705),u=e.i(27927),f=e.i(50243),x=e.i(52745),g=e.i(93259),h=e.i(76929),p=e.i(11056),v=e.i(92276),j=e.i(21623),y=e.i(24608),b=e.i(83788),M=e.i(15971),A=e.i(75818),_=e.i(45856),I=e.i(24941),w=e.i(79001),N=e.i(34981),k=e.i(58101),$=e.i(921),C=e.i(56779),L=e.i(34948),D=e.i(58971),T=e.i(6607),S=e.i(31494),P=e.i(57561);let F=({id:e,selectedView:t,...a})=>{if("texts"===t)return(0,s.jsx)(p.f,{children:(0,s.jsx)(_.f,{assortmentId:e})});if("links"===t)return(0,s.jsx)(p.f,{children:(0,s.jsx)(w.f,{assortmentId:e})});if("media"===t)return(0,s.jsx)(b.f,{children:(0,s.jsx)(p.f,{children:(0,s.jsx)(I.f,{assortmentId:e})})});if("products"===t)return(0,s.jsx)(p.f,{children:(0,s.jsx)(N.f,{assortmentId:e})});if("filters"===t)return(0,s.jsx)(p.f,{children:(0,s.jsx)(k.f,{assortmentId:e})});if("extended"===t)return(0,s.jsx)(p.f,{children:(0,s.jsx)(S.f,{data:a})});if(t?.startsWith("plugin:")){let a=t.replace("plugin:","");return(0,s.jsx)(c.f,{slot:"assortment:tabs",entityId:e,children:(t,r)=>r.component===a?(0,s.jsx)(t,{entityId:e}):null})}return(0,s.jsx)(p.f,{children:(0,s.jsx)(_.f,{assortmentId:e})})},R=({assortment:e,extendedData:n,hideControls:l=!1})=>{let{isActive:d,isRoot:c}=e||{},{hasRole:p}=(0,D.f)(),{shopInfo:b}=(0,P.f)(),{getSlotPlugins:_}=(0,o.L)(),{formatMessage:I}=(0,t.X)(),{updateAssortment:w}=(0,$.f)(),{removeAssortment:N}=(0,A.f)(),{setModal:k}=(0,T.f)(),S=(0,i.useRouter)(),R=async s=>{s.target.value&&await w({assortmentId:e?._id,assortment:{sequence:parseInt(s.target.value,10)}})},q=[{id:"texts",title:I({id:"texts",defaultMessage:"Texts"}),Icon:(0,s.jsx)(m.f,{className:"h-5 w-5"})},{id:"links",title:I({id:"links",defaultMessage:"Links"}),Icon:(0,s.jsx)(u.f,{className:"h-5 w-5"})},{id:"media",title:I({id:"media",defaultMessage:"Media"}),Icon:(0,s.jsx)(f.f,{className:"h-5 w-5"})},{id:"products",title:I({id:"products",defaultMessage:"Products"}),Icon:(0,s.jsx)(x.f,{className:"h-5 w-5"})},{id:"filters",title:I({id:"filters",defaultMessage:"Filters"}),Icon:(0,s.jsx)(g.f,{className:"h-5 w-5"})},null!==n&&{id:"extended",title:I({id:"extended-fields",defaultMessage:"Extended"}),Icon:(0,s.jsx)(h.f,{className:"h-5 w-5"})},..._("assortment:tabs").map(({config:e})=>({id:`plugin:${e.component}`,title:e.label,Icon:(0,s.jsx)(h.f,{className:"h-5 w-5"})}))],K=async s=>(await w({assortmentId:e?._id,assortment:{isRoot:s}}),!0),O=async({tags:s})=>(await w({assortmentId:e?._id,assortment:{tags:s}}),!0),U=async s=>(await w({assortmentId:e?._id,assortment:{isActive:s}}),!0),E=[{id:"active",title:I({id:"activate",defaultMessage:"Activate"}),selectedTitle:I({id:"activated",defaultMessage:"Activated"}),description:I({id:"activate_assortment_description",defaultMessage:"Will be visible on search"}),current:d,bgColor:"emerald",disable:!p(a.C.ManageAssortments),onClick:async()=>{await U(!0),r.toast.success(I({id:"assortment_activated",defaultMessage:"Assortment activated successfully"}))}},{id:"in-active",title:I({id:"deactivate",defaultMessage:"Deactivate"}),selectedTitle:I({id:"deactivated",defaultMessage:"Deactivated"}),description:I({id:"deactivate_assortment_description",defaultMessage:"Will not be visible on search"}),current:!d,bgColor:"amber",disable:!p(a.C.ManageAssortments),onClick:async()=>{await U(!1),r.toast.success(I({id:"assortment_deactivated",defaultMessage:"Assortment deactivated successfully"}))}}],Q=[{id:"root",title:I({id:"make_root",defaultMessage:"Make root"}),selectedTitle:I({id:"root",defaultMessage:"Root"}),description:I({id:"root_assortment_description",defaultMessage:"Can not be assigned as a child of another assortment "}),current:c,bgColor:"emerald",disable:!p(a.C.ManageAssortments),onClick:async()=>{await K(!0),r.toast.success(I({id:"assortment_changed_to_root",defaultMessage:"Assortment changed to root"}))}},{id:"leaf",selectedTitle:I({id:"leaf",defaultMessage:"Leaf"}),title:I({id:"make_leaf",defaultMessage:"Make leaf"}),description:I({id:"leaf_assortment_description",defaultMessage:"Can be assigned as a child of another assortment "}),current:!c,bgColor:"emerald",disable:!p(a.C.ManageAssortments),onClick:async()=>{await K(!1),r.toast.success(I({id:"assortment_changed_to_leaf",defaultMessage:"Assortment changed to leaf"}))}}],V=async()=>{await k((0,s.jsx)(M.f,{onCancelClick:()=>k(""),message:I({id:"delete_assortment_confirmation",defaultMessage:"This action might cause inconsistencies with other data that relates to it and it is nonreversible. Are you sure you want to delete this assortment?"}),onOkClick:async()=>{k(""),await N({assortmentId:e._id}),r.toast.success(I({id:"assortment_deleted_success",defaultMessage:"Deleted successfully"})),S.push("/assortments")}}))};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"mt-5 flex flex-wrap items-center justify-between gap-10",children:[(0,s.jsx)(L.f,{defaultValue:e?.tags,onSubmit:O,enableEdit:p(a.C.ManageAssortments),availableTagOptions:b?.adminUiConfig?.assortmentTags?.filter(s=>!(e?.tags||[])?.includes(s))?.map(e=>({value:e,label:e}))||[]}),!l&&(0,s.jsxs)("div",{className:"mt-5 flex flex-wrap gap-3",children:[(0,s.jsxs)("div",{className:"inline-flex items-center gap-2 rounded-md px-4 py-2 text-sm font-medium leading-5 shadow-sm bg-surface h-[38px]",children:[(0,s.jsx)("label",{htmlFor:"sequence",className:"text-text-secondary font-medium",children:I({id:"sequence",defaultMessage:"Display Order"})}),(0,s.jsx)("input",{id:"sequence",type:"number",className:"text-center w-12 bg-transparent border border-border-default rounded focus:ring-0 focus:outline-none text-sm font-semibold text-text-primary px-2 py-1",defaultValue:e?.sequence,disabled:!p(a.C.ManageAssortments),onBlur:R})]}),(0,s.jsx)(v.f,{options:Q,type:I({id:"assortment",defaultMessage:"Assortment"})}),(0,s.jsx)(v.f,{options:E,type:I({id:"assortment",defaultMessage:"Assortment"})}),p(a.C.ManageAssortments)&&(0,s.jsx)(j.f,{variant:"danger",icon:(0,s.jsx)(y.f,{className:"h-5 w-5"}),text:"Delete",onClick:V})]})]}),(0,s.jsx)(C.f,{tabItems:q,defaultTab:"texts",children:(0,s.jsx)(F,{id:e?._id,...n})})]})};var q=e.i(59080),K=e.i(32171),O=e.i(1880),U=e.i(70693),E=e.i(50931),Q=e.i(84818),V=e.i(87284);let X=({media:e=[],onEditMedia:t})=>(0,s.jsx)("div",{className:"my-5",children:(0,s.jsx)("div",{className:"flex gap-3 overflow-x-auto",children:e.map(e=>(0,s.jsx)("div",{className:"relative flex-shrink-0 group",children:(0,s.jsx)("div",{className:"w-16 h-16 bg-surface-raised rounded-lg overflow-hidden cursor-pointer border border-border-subtle",onClick:()=>{var s;return s=e._id,void(t&&t(s))},children:(0,s.jsx)(V.f,{src:e?.file?.url,alt:e.texts?.[0]?.title||e?.file?.url,width:128,height:128,className:"w-full h-full object-cover"})})},e._id))})});e.s(["default",0,({assortmentSlug:e})=>{let{formatDateTime:o}=(0,Q.f)(),{formatMessage:c}=(0,t.X)(),{hasRole:m}=(0,D.f)(),{updateAssortment:u}=(0,$.f)(),{removeAssortment:f}=(0,A.f)(),{setModal:x}=(0,T.f)(),g=(0,i.useRouter)(),{assortment:h,loading:p,extendedData:b}=(({assortmentId:e=null,slug:s=null}={})=>{let t=(0,O.Q)(s),{customProperties:a,hydrateFragment:r}=(0,U.f)(),{selectedLocale:i}=(0,P.f)(),{data:n,loading:l,error:d}=(0,K.f)(((e="")=>q.a`
|
|
335
|
+
query Assortment($assortmentId: ID, $slug: String, $forceLocale: Locale) {
|
|
336
|
+
assortment(assortmentId: $assortmentId, slug: $slug) {
|
|
337
|
+
...AssortmentFragment
|
|
338
|
+
${e}
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
${E.f}
|
|
342
|
+
`)(a?.Assortment),{skip:!e&&!s,variables:{assortmentId:e||t,forceLocale:i}}),o=n?.assortment,c=r(a?.Assortment,o);return{loading:l,error:d,assortment:o,extendedData:c}})({slug:e}),{isActive:_,isRoot:I}=h||{},w=async e=>{e.target.value&&await u({assortmentId:h?._id,assortment:{sequence:parseInt(e.target.value,10)}})},N=async e=>(await u({assortmentId:h?._id,assortment:{isRoot:e}}),!0),k=async e=>(await u({assortmentId:h?._id,assortment:{isActive:e}}),!0),C=[{id:"active",title:c({id:"activate",defaultMessage:"Activate"}),selectedTitle:c({id:"activated",defaultMessage:"Activated"}),description:c({id:"activate_assortment_description",defaultMessage:"Will be visible on search"}),current:_,disable:!m(a.C.ManageAssortments),bgColor:"emerald",onClick:async()=>{await k(!0),r.toast.success(c({id:"assortment_activated",defaultMessage:"Assortment activated successfully"}))}},{id:"in-active",title:c({id:"deactivate",defaultMessage:"Deactivate"}),selectedTitle:c({id:"deactivated",defaultMessage:"Deactivated"}),description:c({id:"deactivate_assortment_description",defaultMessage:"Will not be visible on search"}),current:!_,disable:!m(a.C.ManageAssortments),bgColor:"amber",onClick:async()=>{await k(!1),r.toast.success(c({id:"assortment_deactivated",defaultMessage:"Assortment deactivated successfully"}))}}],L=[{id:"root",title:c({id:"make_root",defaultMessage:"Make root"}),selectedTitle:c({id:"root",defaultMessage:"Root"}),description:c({id:"root_assortment_description",defaultMessage:"Can not be assigned as a child of another assortment "}),disable:!m(a.C.ManageAssortments),current:I,bgColor:"stone",onClick:async()=>{await N(!0),r.toast.success(c({id:"assortment_changed_to_root",defaultMessage:"Assortment changed to root"}))}},{id:"leaf",selectedTitle:c({id:"leaf",defaultMessage:"Leaf"}),title:c({id:"make_leaf",defaultMessage:"Make leaf"}),disable:!m(a.C.ManageAssortments),description:c({id:"leaf_assortment_description",defaultMessage:"Can be assigned as a child of another assortment "}),current:!I,bgColor:"emerald",onClick:async()=>{await N(!1),r.toast.success(c({id:"assortment_changed_to_leaf",defaultMessage:"Assortment changed to leaf"}))}}],S=async()=>{await x((0,s.jsx)(M.f,{onCancelClick:()=>x(""),message:c({id:"delete_assortment_confirmation",defaultMessage:"This action might cause inconsistencies with other data that relates to it and it is nonreversible. Are you sure you want to delete this assortment?"}),onOkClick:async()=>{x(""),await f({assortmentId:h._id}),r.toast.success(c({id:"assortment_deleted_success",defaultMessage:"Deleted successfully"})),g.push("/assortments")}}))};return h||p?p?(0,s.jsx)(l.f,{variant:"detail"}):(0,s.jsxs)("div",{className:"mt-5 max-w-full",children:[(0,s.jsx)(n.f,{routeName:e,depth:3,currentPageTitle:h?.texts?.title}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"items-center flex-wrap flex gap-5 min-w-full justify-between",children:[(0,s.jsx)(d.f,{headerText:h?.texts?.title||"Untitled Assortment",title:`${h?.texts?.title||"Assortment"} (${h?._id})`}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-3",children:[(0,s.jsx)(v.f,{options:C,type:c({id:"assortment",defaultMessage:"Assortment"})}),(0,s.jsx)(v.f,{options:L,type:c({id:"assortment",defaultMessage:"Assortment"})}),(0,s.jsxs)("div",{className:"inline-flex items-center gap-2 rounded-md px-4 py-2 text-sm font-medium leading-5 shadow-sm bg-surface h-[38px]",children:[(0,s.jsx)("label",{htmlFor:"sequence",className:"text-text-secondary font-medium",children:c({id:"sequence",defaultMessage:"Display Order"})}),(0,s.jsx)("input",{id:"sequence",type:"number",disabled:!m(a.C.ManageAssortments),className:"text-center w-12 bg-transparent border border-border-default rounded focus:ring-0 focus:outline-none text-sm font-semibold text-text-primary px-2 py-1",defaultValue:h?.sequence,onBlur:w})]}),m(a.C.ManageAssortments)&&(0,s.jsx)(j.f,{variant:"danger",icon:(0,s.jsx)(y.f,{className:"h-5 w-5"}),text:"Delete",onClick:S})]})]}),(0,s.jsxs)("div",{className:"mt-8 flex flex-wrap gap-3 gap-x-10 text-text-secondary",children:[(0,s.jsxs)("div",{className:"flex items-baseline gap-2",children:[(0,s.jsx)("span",{className:"text-xs text-text-secondary",children:"ID:"}),(0,s.jsx)("span",{className:"text-sm font-mono",children:h?._id})]}),h?.created&&(0,s.jsxs)("div",{className:"flex items-baseline gap-2",children:[(0,s.jsxs)("span",{className:"text-xs text-text-secondary",children:[c({id:"created",defaultMessage:"Created"}),":"]}),(0,s.jsx)("span",{className:"text-sm font-mono",children:o(h.created,{dateStyle:"medium",timeStyle:"short"})})]}),h?.updated&&(0,s.jsxs)("div",{className:"flex items-baseline gap-2",children:[(0,s.jsxs)("span",{className:"text-xs text-text-secondary",children:[c({id:"updated",defaultMessage:"Updated"}),":"]}),(0,s.jsx)("span",{className:"text-sm font-mono",children:o(h.updated,{dateStyle:"medium",timeStyle:"short"})})]})]})]}),(0,s.jsx)(X,{assortmentId:h?._id,media:h?.media||[],onEditMedia:e=>{g.push({pathname:g.pathname,query:{...g.query,tab:"media"}},void 0,{shallow:!0})},canEdit:m(a.C.ManageAssortments)}),(0,s.jsx)(R,{assortment:h,extendedData:b,hideControls:!0})]}):(g.push("/404"),null)}],98568)},93259,e=>{"use strict";var s=e.i(91788);let t=s.forwardRef(function({title:e,titleId:t,...a},r){return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},a),e?s.createElement("title",{id:t},e):null,s.createElement("path",{fillRule:"evenodd",d:"M2.628 1.601C5.028 1.206 7.49 1 10 1s4.973.206 7.372.601a.75.75 0 0 1 .628.74v2.288a2.25 2.25 0 0 1-.659 1.59l-4.682 4.683a2.25 2.25 0 0 0-.659 1.59v3.037c0 .684-.31 1.33-.844 1.757l-1.937 1.55A.75.75 0 0 1 8 18.25v-5.757a2.25 2.25 0 0 0-.659-1.591L2.659 6.22A2.25 2.25 0 0 1 2 4.629V2.34a.75.75 0 0 1 .628-.74Z",clipRule:"evenodd"}))});e.s(["f",0,t],93259)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,94983,(e,t,r)=>{let s="/exports";(window.__NEXT_P=window.__NEXT_P||[]).push([s,()=>e.r(71701)]),t.hot&&t.hot.dispose(function(){window.__NEXT_P.push([s])})},95789,e=>{"use strict";var t=e.i(91398),r=e.i(56206),s=e.i(88566),l=e.i(25575),a=e.i(91788);let n=({header:e,body:n,headerCSS:d="",bodyCSS:i="",itemContainerCSS:o="",itemindex:c=1,hideChevron:u=!1})=>{let[x,f]=(0,a.useState)(!1);return(0,t.jsxs)("div",{className:(0,r.U)("mt-3",o),"data-itemindex":c,children:[(0,t.jsxs)("button",{type:"button",onClick:()=>f(!x),className:(0,r.U)("relative cursor-pointer border dark:border-slate-800 bg-surface-input text-text-muted hover:bg-surface-raised w-full max-w-full overflow-hidden",d),children:[(0,t.jsx)("div",{className:"w-full",children:e}),!u&&(0,t.jsx)("span",{className:"px-2",children:x?(0,t.jsx)(l.f,{className:"h-5 w-5"}):(0,t.jsx)(s.f,{className:"h-5 w-5"})})]}),x?(0,t.jsx)("div",{className:(0,r.U)("rounded-lg sm:p-4 xl:p-10 relative overflow-visible",i),children:n}):""]})};e.s(["f",0,({data:e,containerCSS:s="",headerCSS:l="",bodyCSS:a="",itemContainerCSS:d="",hideChevron:i=!1,...o})=>(0,t.jsx)("div",{className:(0,r.U)("my-3",s),...o,children:e.map(({header:e,body:r},s)=>(0,t.jsx)(n,{itemindex:s,header:e,body:r,headerCSS:l,bodyCSS:a,itemContainerCSS:d,hideChevron:i},s))})],95789)},50595,e=>{"use strict";var t=e.i(91398),r=e.i(41158),s=e.i(3828),l=e.i(3326);e.s(["f",0,({routeName:e=null,currentPageTitle:a=null,depth:n=null})=>{let d=(0,s.useRouter)(),{formatMessage:i}=(0,l.X)(),o={home:"home",products:"products",orders:"orders",users:"users",assortments:"assortments",filters:"filters",tokens:"tokens",quotations:"quotations",enrollments:"enrollments",activities:"activities",works:"work_queue",events:"events",currency:"currencies",country:"countries",language:"languages","delivery-provider":"delivery_providers","payment-provider":"payment_providers","warehousing-provider":"warehousing_provider",system:"system",account:"account",new:"new",edit:"edit"},c=d.asPath?.split("/")?.filter((e,t)=>d.asPath?.split("/")?.indexOf(e)===t);if(1===c.length)return null;let u="";n&&c.splice(n),e&&(c[c.length-1]=e);let x=c?.map(t=>{if(u+=`${t}/`,!t)return{name:i({id:"home",defaultMessage:"Home"}),path:"/"};let r=t?.split("?")[0],s=e?r:r.replace(/-/g," "),l=o[r];return{name:l?i({id:l,defaultMessage:s}):decodeURIComponent(s),path:u.replace(/.$/,"")}}),f=x?.length>1?x[x.length-2]:null;return(0,t.jsxs)(t.Fragment,{children:[f&&(0,t.jsx)("nav",{className:"mb-4 flex sm:hidden","aria-label":"Breadcrumb",children:(0,t.jsxs)(r.default,{href:f.path,className:"flex items-center text-sm font-medium capitalize text-text-muted hover:text-text-primary focus:outline-hidden focus:ring-2 focus:ring-focus-ring rounded-md px-1 py-1",children:[(0,t.jsx)("svg",{className:"mr-1.5 h-4 w-4 shrink-0",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:(0,t.jsx)("path",{fillRule:"evenodd",d:"M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z",clipRule:"evenodd"})}),f.name]})}),(0,t.jsx)("nav",{className:"mb-5 hidden sm:flex lg:mt-5 lg:mb-8","aria-label":"Breadcrumb",children:(0,t.jsx)("ol",{className:"flex items-center space-x-4",children:x?.map((e,s)=>(0,t.jsx)("li",{children:(0,t.jsxs)("div",{className:"flex items-center",children:[0!==s&&(0,t.jsx)("svg",{className:"mr-4 h-5 w-5 shrink-0 text-text-muted",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:(0,t.jsx)("path",{fillRule:"evenodd",d:"M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z",clipRule:"evenodd"})}),(0,t.jsx)(r.default,{href:e.path,className:"text-sm font-medium capitalize text-text-muted hover:text-text-primary focus:outline-hidden focus:ring-2 focus:ring-focus-ring rounded-md px-1 py-1",children:s===x.length-1&&a?a:e.name})]})},e.path))})})]})}])},21623,e=>{"use strict";var t=e.i(91398),r=e.i(56206);e.s(["f",0,({text:e,children:s,onClick:l,className:a="",disabled:n=!1,id:d="",variant:i="primary",size:o="md",type:c="button",loading:u=!1,icon:x,iconRight:f,fullWidth:m=!1,rounded:h="md",ariaLabel:p,...g})=>{let b=s||e,v=(x||f)&&b?"gap-2":"";return(0,t.jsx)("button",{id:d,type:c,disabled:n||u,onClick:l,"aria-label":p,className:(0,r.U)("inline-flex items-center justify-center font-medium shadow-xs focus:outline-hidden focus:ring-2 focus:ring-offset-2 transition-colors duration-200 disabled:cursor-not-allowed disabled:opacity-50",{xs:"px-2.5 py-1.5 text-xs h-6",sm:"px-3 py-2 text-sm h-8",md:"px-4 py-2 text-sm h-9",lg:"px-6 py-3 text-base h-11"}[o],{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}[h],{primary:"border border-accent bg-accent text-text-on-accent hover:bg-accent-hover focus:ring-focus-ring",secondary:"border border-border-default bg-surface text-text-secondary hover:bg-surface-raised focus:ring-focus-ring",tertiary:"border border-border-subtle bg-surface text-text-secondary hover:bg-surface-raised focus:ring-focus-ring",quaternary:"bg-transparent text-text-secondary hover:bg-surface-raised focus:ring-focus-ring",danger:"border border-danger bg-surface text-danger hover:bg-rose-50 dark:hover:bg-rose-900/10 focus:ring-rose-500",ghost:"bg-transparent border border-transparent text-text-secondary hover:text-text-primary hover:bg-surface-raised focus:ring-focus-ring",success:"border border-emerald-500 dark:border-emerald-400 bg-emerald-50 dark:bg-emerald-900/20 text-emerald-600 dark:text-emerald-400 hover:bg-emerald-100 dark:hover:bg-emerald-900/30 focus:ring-emerald-500",neutral:"border border-border-default bg-surface-raised text-text-secondary hover:bg-surface-raised focus:ring-focus-ring",input:"border border-border-default bg-surface text-text-primary hover:border-slate-400 dark:hover:border-slate-500 focus:ring-focus-ring focus:border-slate-500"}[i],v,{"w-full":m},a),...g,children:u?(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"w-4 h-4 border-2 border-current border-t-transparent rounded-full animate-spin"}),b]}):(0,t.jsxs)(t.Fragment,{children:[x,b,f]})})}])},2194,e=>{"use strict";var t=e.i(91398),r=e.i(92802),r=r,s=e.i(56206),l=e.i(3326);e.s(["f",0,({message:e,className:a="",Icon:n=null})=>(0,t.jsx)("div",{className:(0,s.U)("rounded-md flex w-full flex-col items-center justify-center min-h-[176px] py-8 border-1 border-dashed border-border-default text-slate-500 dark:text-slate-600",a),children:(0,t.jsxs)("div",{className:"grid items-center justify-center",children:[(0,t.jsx)("div",{className:"flex items-center justify-center text-slate-400 dark:text-slate-600",children:n||(0,t.jsx)(r.f,{className:"h-6 w-6"})}),(0,t.jsx)(l.L,{id:"no_data_message",defaultMessage:"<p>No <span> {message} available</span> </p>",values:{p:e=>(0,t.jsx)("p",{className:"mt-2 m-auto flex items-center justify-center",children:e}),span:e=>(0,t.jsxs)("span",{className:"capitalize ml-1",children:[" ",e," "]}),message:e}})]})})],2194)},25327,e=>{"use strict";var t=e.i(91398),r=e.i(5205),s=e.i(41158),l=e.i(3326),a=e.i(37369),n=e.i(21623);e.s(["f",0,({headerText:e=null,onEdit:d=null,onDelete:i=null,children:o=null,title:c=null,addPath:u=null,addButtonText:x=null})=>{let{formatMessage:f}=(0,l.X)();return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.default,{children:(0,t.jsxs)("title",{children:["Unchained AdminUI - ",c||e," "]})}),(0,t.jsx)("div",{className:"flex gap-3 flex-wrap items-center justify-between",children:(0,t.jsxs)("div",{className:"flex items-center flex-wrap justify-between w-full gap-4",children:[e&&(0,t.jsx)("h2",{className:"text-2xl font-medium text-slate-900 dark:text-slate-300 sm:truncate sm:text-3xl lg:text-4xl",children:e}),(0,t.jsxs)("div",{className:"flex items-center gap-3 flex-shrink-0",children:[o,u&&(0,t.jsx)(s.default,{href:u,children:(0,t.jsx)(n.f,{variant:"secondary",icon:(0,t.jsx)(a.f,{className:"h-5 w-5"}),text:x||f({id:"add",defaultMessage:"Add"})})}),d&&(0,t.jsx)(n.f,{variant:"secondary",onClick:d,text:f({id:"edit",defaultMessage:"Edit"})}),i&&(0,t.jsx)(n.f,{variant:"danger",onClick:i,text:f({id:"delete",defaultMessage:"Delete"})})]})]})})]})}])},8918,e=>{"use strict";var t=e.i(91398),r=e.i(91788),s=e.i(56206),l=e.i(3326),a=e.i(88566),n=e.i(25575),d=e.i(3828),i=e.i(83147);let o=({onSort:e,sortDirection:r})=>r?"ASC"===r?(0,t.jsx)(n.f,{className:"ml-2 w-5 h-5 text-slate-700",onClick:e}):(0,t.jsx)(a.f,{className:"ml-2 w-5 h-5 text-slate-700",onClick:e}):(0,t.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"ml-2 w-6 h-6",onClick:e,children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 15L12 18.75 15.75 15m-7.5-6L12 5.25 15.75 9"})});var c=e.i(2194);let u=e=>{let t=[],s=[],l=[];return r.default.Children.forEach(e.children,e=>{e?.props?.header?t.push(e):e?.props?.footer?l.push(e):s.push(e)}),{header:t,footer:l,body:s}},x=({className:e="",...a})=>{let[n,d]=(0,r.useState)(u(a)),{formatMessage:i}=(0,l.X)(),o={...n,header:r.default.Children.map(n.header,e=>r.default.cloneElement(e))};return(0,r.useEffect)(()=>{d(u(a))},[a.children]),o.header.length||o.body.length?(0,t.jsxs)("table",{className:(0,s.U)("overflow-hidden my-3 flex w-full flex-row flex-nowrap divide-y divide-slate-200 dark:divide-slate-600 shadow-sm sm:rounded-lg sm:bg-white dark:bg-slate-950",e),...a,children:[(0,t.jsx)("thead",{className:"hidden sm:table-header-group bg-surface-raised text-sm text-text-secondary",children:o.header}),o.body.length?(0,t.jsx)("tbody",{className:"space-y-4 sm:space-y-0 flex-1 sm:divide-y divide-slate-200 dark:divide-slate-700 sm:bg-white dark:sm:bg-slate-800 sm:flex-none",children:o.body}):null,o.footer.length?(0,t.jsx)("tfoot",{children:o.footer}):null]}):(0,t.jsx)(c.f,{message:i({id:"data",defaultMessage:"Data"})})};x.Row=({className:e="",children:l=[],header:a=!1,enablesort:n=!1,...d})=>{let i=r.default.Children.map(l,e=>r.default?.cloneElement(e||(0,t.jsx)("span",{}),{header:a,enablesort:n}));return(0,t.jsx)("tr",{className:(0,s.U)("grid grid-cols-1 auto-rows-fr border border-border-subtle sm:border-0 rounded-md sm:mb-0 sm:table-row sm:rounded-none bg-surface sm:bg-inherit dark:sm:bg-inherit",e),...d,children:i})},x.Cell=({className:e="",header:r=!1,enablesort:l=!1,children:a,sortKey:n=null,defaultSortDirection:c=null,...u})=>{let x=(0,d.useRouter)(),f=(0,i.v)(x.query?.sort),m=r?"th":"td";return(0,t.jsx)(m,{className:(0,s.U)(r?"px-4 py-3 text-left text-text-muted":"whitespace-nowrap px-4 py-3 text-text-muted border-b dark:border-slate-300 last:border-b-0 sm:border-b-0 text-left flex items-center sm:table-cell",e),...u,children:(0,t.jsxs)("div",{className:"flex items-center",children:[a,"th"===m&&l&&n&&(0,t.jsx)(o,{onSort:e=>{var t;let r;e.preventDefault(),((t=f[n])?"ASC"===t?"DESC":null:"ASC")||!f[n]?r={...f,[n]:"ASC"===f[n]?"DESC":"ASC"}:(delete f[n],r=f);let s=Object.entries(r).map(([e,t])=>[e,t].join("_")).join(","),{sort:l,...a}=x.query,d=Object.keys(a).map(e=>[e,a[e]].join("=")).join("&"),o=0===Object.keys(a).length?`${x.basePath}?sort=${s}`:`${x.basePath}?${d}&sort=${s}`;s?x.push(o):x.push({query:(0,i._)(a)})},sortDirection:Object.keys(f).length?f[n]:c})]})})},e.s(["f",0,x],8918)},83147,e=>{"use strict";let t=e=>e&&e?.split(",").reduce((e,t)=>{let[r=null,s=null]=(t||"")?.split("_")||[];return{...e,[r]:s}},null)||{};e.s(["S",0,(...e)=>e.filter(Boolean).join(" "),"R",0,e=>Object.entries(t(e))?.map(([e,t])=>({key:e,value:t})),"D",0,e=>e?.label&&e?.version?`${e.label} ${e.version}`:"","v",0,t,"Q",0,(e,t,r=!0)=>{if(!t)return"";try{return`${new Intl.DisplayNames([e],{type:"region"}).of(t)} ${r?`(${t})`:""}`}catch{return t}},"j",0,(e,t,r=!0)=>{if(!t)return"";try{return`${new Intl.DisplayNames([e],{type:"currency"}).of(t)} ${r?`(${t})`:""}`}catch{return t}},"I",0,(e,t,r=!0)=>{if(!t)return"";try{return`${new Intl.DisplayNames([e],{type:"language"}).of(t)} ${r?`(${t})`:""}`}catch{return t}},"_",0,(e,t,r)=>{let s;return s=r?{...e,[r]:t}:e,Object.keys(s)?.map(e=>[e,s[e]].join("="))?.join("&")},"d",0,()=>({formatPrice:e=>{if(!e?.currencyCode)return"n/a";if(e?.amount===void 0||e?.amount===null)return"";let{amount:t,currencyCode:r}=e||{};return new Intl.NumberFormat(navigator.language,{style:"currency",currency:r}).format(t/100)}})])},71701,e=>{"use strict";var t=e.i(91398),r=e.i(5432),s=e.i(25327),l=e.i(50595),a=e.i(3326),n=e.i(8918),d=e.i(41158),i=e.i(84818),o=e.i(83147),c=e.i(3828),u=e.i(95789),x=e.i(21623);e.s(["default",0,()=>{let{formatMessage:e}=(0,a.X)(),f={dateStyle:"short",timeStyle:"short"},{formatDateTime:m}=(0,i.f)(),h=(0,c.useRouter)(),{query:p,pathname:g}=h,b=(0,o.R)(p?.sort),v=p?.workId,j=(0,r.f)({sortOptions:b,queryString:v,formatDateTime:m}),y=()=>{let{workId:e,...t}=p;h.push({pathname:g,query:t})},w=(j?.exports||[]).map(r=>({header:(0,t.jsxs)("div",{className:"flex flex-1 justify-between items-center px-4 py-2 text-sm",children:[(0,t.jsxs)("div",{className:"flex flex-col items-start text-left",children:[(0,t.jsxs)("span",{className:"text-xs text-slate-400",children:[e({id:"id",defaultMessage:"ID"})," ",r.id.slice(-6).toUpperCase()]}),(0,t.jsx)("span",{className:"font-bold text-slate-700 dark:text-slate-100",children:r.type})]}),(0,t.jsxs)("div",{className:"flex flex-col items-start text-left",children:[(0,t.jsx)("span",{className:"text-text-secondary",children:m(r.finished,f)}),(0,t.jsx)("span",{className:"text-xs text-slate-400",children:e({id:"exported",defaultMessage:"Exported"})})]}),(0,t.jsxs)("div",{className:"bg-blue-50 dark:bg-slate-800 text-blue-600 dark:text-blue-400 px-3 py-1 rounded-full text-xs font-bold",children:[r.files.length," ",e({id:"files",defaultMessage:"Files"})]})]}),body:(0,t.jsxs)(n.f,{className:"min-w-full",children:[(0,t.jsxs)(n.f.Row,{header:!0,children:[(0,t.jsx)(n.f.Cell,{children:e({id:"file",defaultMessage:"File"})}),(0,t.jsx)(n.f.Cell,{children:e({id:"expires",defaultMessage:"Expires"})}),(0,t.jsx)(n.f.Cell,{children:" "})]}),r.files.map(r=>(0,t.jsxs)(n.f.Row,{children:[(0,t.jsx)(n.f.Cell,{className:"font-medium",children:r.name.replace(/([A-Z])/g," $1").trim()}),(0,t.jsx)(n.f.Cell,{className:"text-red-500 dark:text-red-400",children:m(r.expiresAt,f)}),(0,t.jsx)(n.f.Cell,{children:(0,t.jsx)(d.default,{href:r.url,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 dark:text-blue-400 font-bold underline",children:e({id:"download",defaultMessage:"Download"})})})]},r.url))]})}));return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(l.f,{depth:3,currentPageTitle:e({id:"recent_exports",defaultMessage:"Recent exports"})}),(0,t.jsxs)("div",{className:"flex justify-between items-end mb-4",children:[(0,t.jsx)(s.f,{title:e({id:"recent_exports_page_title",defaultMessage:"{count, plural, one {# Export} other {# Exports}}"},{count:j?.count||0}),headerText:e({id:"recent_exports_page_title",defaultMessage:"{count, plural, one {# Export} other {# Exports}}"},{count:j?.count||0})}),v&&(0,t.jsx)(x.f,{onClick:y,children:e({id:"show_all_exports",defaultMessage:"Show all exports"})})]}),j?.count?(0,t.jsx)(u.f,{data:w,headerCSS:"flex items-center rounded-lg shadow-sm",bodyCSS:"bg-surface/50 rounded-b-lg border-x border-b dark:border-slate-800"}):(0,t.jsxs)("div",{className:"p-10 text-center border-2 border-dashed rounded-xl",children:[(0,t.jsx)("p",{className:"text-slate-500",children:e({id:"no_active_exports_found",defaultMessage:"No active files found or all links have expired."})}),v&&(0,t.jsx)("button",{onClick:y,className:"mt-4 text-blue-600 underline",children:e({id:"clear_filter",defaultMessage:"Clear filter"})})]})]})}])},88566,25575,e=>{"use strict";var t=e.i(91788);let r=t.forwardRef(function({title:e,titleId:r,...s},l){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:l,"aria-labelledby":r},s),e?t.createElement("title",{id:r},e):null,t.createElement("path",{fillRule:"evenodd",d:"M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))});e.s(["f",0,r],88566);let s=t.forwardRef(function({title:e,titleId:r,...s},l){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:l,"aria-labelledby":r},s),e?t.createElement("title",{id:r},e):null,t.createElement("path",{fillRule:"evenodd",d:"M9.47 6.47a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 1 1-1.06 1.06L10 8.06l-3.72 3.72a.75.75 0 0 1-1.06-1.06l4.25-4.25Z",clipRule:"evenodd"}))});e.s(["f",0,s],25575)},37369,e=>{"use strict";var t=e.i(84985);e.s(["f",()=>t.f])}]);
|