@unchainedshop/admin-ui 4.8.25 → 4.8.26
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/out/403/index.html +2 -2
- package/out/404/index.html +2 -2
- package/out/404.html +2 -2
- package/out/423/index.html +2 -2
- package/out/500/index.html +2 -2
- package/out/_next/static/{s9JIgzylJK2SpeEcB-ZI9 → _TiowajLX6Z3MYsLPNgxd}/_buildManifest.js +62 -62
- package/out/_next/static/chunks/{24-r3ko_zk9tx.js → 0-b63f3cwlt9h.js} +2 -2
- package/out/_next/static/chunks/{3_oq57mmti33y.js → 0-uh133eqcz6n.js} +1 -1
- package/out/_next/static/chunks/{0__v8hox2f99w.js → 0172idn4wi-am.js} +3 -3
- package/out/_next/static/chunks/{1snnkviatd2ds.js → 018n9pot9f5uf.js} +3 -3
- package/out/_next/static/chunks/{41mslgyvxwsej.js → 036jcj4okqca4.js} +1 -1
- package/out/_next/static/chunks/{33ndyf-aam_my.js → 03_e40kzqm4nj.js} +2 -2
- package/out/_next/static/chunks/{2yg0gngo1ojjy.js → 05dtc5uryjkmn.js} +2 -2
- package/out/_next/static/chunks/{3laksuh0hh5mn.js → 0989pcuje2j55.js} +1 -1
- package/out/_next/static/chunks/{3t-bgqidpfg2p.js → 0_ngi84ak813x.js} +1 -1
- package/out/_next/static/chunks/{0oikfwsuec7ab.js → 0ac5zzn3zeki5.js} +7 -7
- package/out/_next/static/chunks/{02az0am12ruz7.js → 0c1eqd9oamcur.js} +2 -2
- package/out/_next/static/chunks/{0uh50ckof6hx6.js → 0c2th4nk1xlfd.js} +2 -2
- package/out/_next/static/chunks/{1xp6bya-kpwfn.js → 0cotrfgh1n2cx.js} +1 -1
- package/out/_next/static/chunks/{2vhrwf77u-txi.js → 0dtahnosgvou_.js} +3 -3
- package/out/_next/static/chunks/{3dstnf59_lxjk.js → 0dvf7ltl55td_.js} +2 -2
- package/out/_next/static/chunks/{0rhsm8uteluq4.js → 0k433cermb_mg.js} +11 -11
- package/out/_next/static/chunks/0kkky_8vhaeaz.js +227 -0
- package/out/_next/static/chunks/{2jz9857mvxw1f.js → 0l3hp2c6_v3vu.js} +2 -2
- package/out/_next/static/chunks/{2zclrb781ijot.js → 0o16fnqhx30be.js} +2 -2
- package/out/_next/static/chunks/{2516fxi011eb1.js → 0pecsk3c09b19.js} +2 -2
- package/out/_next/static/chunks/{2k53q5l-08fs3.js → 0pj6j2o4ya0xs.js} +4 -4
- package/out/_next/static/chunks/{079edy40hhkgj.js → 0w2zoz_fn_wha.js} +4 -4
- package/out/_next/static/chunks/{3ahj8n2x-j99f.js → 0yhj5b33a-dp1.js} +4 -4
- package/out/_next/static/chunks/1-uz_5-063kh9.js +188 -0
- package/out/_next/static/chunks/{2jdelz2l311he.js → 10os1s66nimmi.js} +1 -1
- package/out/_next/static/chunks/119eyvb0tl4d7.js +5 -0
- package/out/_next/static/chunks/{3gls52bjnoo8q.js → 12ukdi5bzlbeo.js} +5 -5
- package/out/_next/static/chunks/{2rjnybq036zly.js → 13qk8ukzu1snm.js} +1 -1
- package/out/_next/static/chunks/{3_12z4kmwbyi-.js → 17wc5344qnib1.js} +3 -3
- package/out/_next/static/chunks/{37kg802txlx94.js → 18e-92lfg29wn.js} +9 -9
- package/out/_next/static/chunks/{277akhd6xt9p_.js → 1bhsgjj7bbftc.js} +2 -2
- package/out/_next/static/chunks/{42fk1xz9mr0ln.js → 1bp_0jnta8nj1.js} +2 -2
- package/out/_next/static/chunks/{3v80f5bymfjvd.js → 1cgxgd2cf8u3j.js} +1 -1
- package/out/_next/static/chunks/{0z3r-u3woyf5f.js → 1d951b6ed8oqn.js} +10 -10
- package/out/_next/static/chunks/{2qz0jmtz3yn40.js → 1epelh6347c59.js} +4 -4
- package/out/_next/static/chunks/{05j07j2bqc6wn.js → 1f5-j4f3irx0j.js} +1 -1
- package/out/_next/static/chunks/{32u64w60mh-qb.js → 1f536itbgwelp.js} +2 -2
- package/out/_next/static/chunks/{3uhtf9i__bqje.js → 1g57y7cq7tjcb.js} +3 -3
- package/out/_next/static/chunks/{26ie8u_ab24o8.js → 1gksg35fivk0-.js} +6 -6
- package/out/_next/static/chunks/{278a5_xfwj8t8.js → 1gv6j3dx9s71x.js} +3 -3
- package/out/_next/static/chunks/{238_wkbkqe4ru.js → 1hpx7xjq9a5bq.js} +2 -2
- package/out/_next/static/chunks/{2_bwqw4n9gs7w.js → 1hwup6qqzqzh8.js} +8 -8
- package/out/_next/static/chunks/{1jvgta6cg9f63.js → 1k703f4i1hgfy.js} +2 -2
- package/out/_next/static/chunks/{0qz4fmzwbpwoh.js → 1mo_wvf-1w8h-.js} +3 -3
- package/out/_next/static/chunks/{1_b14nl6-4wtw.js → 1o41sjh1nhwir.js} +10 -10
- package/out/_next/static/chunks/{2ckezjg_6i9cn.js → 1r0jyqmys60fw.js} +2 -2
- package/out/_next/static/chunks/1shkyosfbiwr4.js +1 -0
- package/out/_next/static/chunks/{35995k_05rugk.js → 1sivy8bkkmwxl.js} +1 -1
- package/out/_next/static/chunks/1t20r1ofch5r3.js +95 -0
- package/out/_next/static/chunks/{3ggt1tip88nkp.js → 1w_4l5gk0n27a.js} +2 -2
- package/out/_next/static/chunks/{3g0xmbqgxpj7o.js → 1weq9keqxiqpy.js} +1 -1
- package/out/_next/static/chunks/{3pu2ctsxqn-fl.js → 1zzpf1xbmchcj.js} +1 -1
- package/out/_next/static/chunks/{1wcwzekzzjwlq.js → 2-ciniqgtu96t.js} +3 -3
- package/out/_next/static/chunks/{16eus7dy50oyb.js → 20wamkfz03l6l.js} +2 -2
- package/out/_next/static/chunks/{2soyg4wxppe6n.js → 21c515liq8_sf.js} +2 -2
- package/out/_next/static/chunks/{0ij8zl3c4lqsk.js → 21lf0tu71e9e5.js} +4 -4
- package/out/_next/static/chunks/{3b1om2xaljjvh.js → 27tp9qrxhs6uf.js} +2 -2
- package/out/_next/static/chunks/{003ookoyh79au.js → 28z1z7in8-kbg.js} +1 -1
- package/out/_next/static/chunks/{3j7lb46_vxpd6.js → 2_0bsdj7k4kue.js} +2 -2
- package/out/_next/static/chunks/{1h4ckn5mxvi_8.js → 2b_lhf_533k0a.js} +3 -3
- package/out/_next/static/chunks/{1wez602sl5xny.js → 2cnc1jkfc85_x.js} +2 -2
- package/out/_next/static/chunks/{3_t_mtrxdgcpx.js → 2cwzp5h99c8es.js} +2 -2
- package/out/_next/static/chunks/{2wzimhcqk94rf.js → 2ecq8dhsm2eu1.js} +9 -9
- package/out/_next/static/chunks/{0x1q_xhnh-ahz.js → 2eo4m196-t6ed.js} +2 -2
- package/out/_next/static/chunks/{0id72_o51c3wx.js → 2f8qzo__ksyu7.js} +2 -2
- package/out/_next/static/chunks/{127vzg0pzx801.js → 2g0f0awj5p2qc.js} +2 -2
- package/out/_next/static/chunks/2i5uj5i4z-xu8.js +188 -0
- package/out/_next/static/chunks/2j6cph79-th54.js +7 -0
- package/out/_next/static/chunks/{0frvaf7psqfd-.js → 2o7wjpjbr5vau.js} +2 -2
- package/out/_next/static/chunks/{0feoncudhgyln.js → 2ocwu5vbc5r34.js} +1 -1
- package/out/_next/static/chunks/{43sqln4o-0sbu.js → 2p6deqdf8dlo0.js} +12 -12
- package/out/_next/static/chunks/{2ify0_8_eg6i8.js → 2rw-r9fvx6t4y.js} +2 -2
- package/out/_next/static/chunks/{3rskgltgatai7.js → 2skxi0oqka3ef.js} +4 -4
- package/out/_next/static/chunks/{0v97keszuu2ye.js → 2v0koj5wv-png.js} +2 -2
- package/out/_next/static/chunks/{36wixjyjpx2kp.js → 2vhqw66fy605y.js} +3 -3
- package/out/_next/static/chunks/{2lgzijzm81h5i.js → 2vy8ae-zwwle1.js} +3 -3
- package/out/_next/static/chunks/{3kniyx4tjrwz2.js → 2y9z7y6i5cawj.js} +3 -3
- package/out/_next/static/chunks/{2blfxtx5ec8hc.js → 2z5b35yv3i6aq.js} +2 -2
- package/out/_next/static/chunks/{0je6_km9r9fy3.js → 3-av_88np5f5_.js} +2 -2
- package/out/_next/static/chunks/{2pg_bikt9gdq9.js → 3-h5nu9jontfy.js} +2 -2
- package/out/_next/static/chunks/{2t8p0kniibzz0.js → 3-hdz4_6asex-.js} +2 -2
- package/out/_next/static/chunks/{2tn-d1ba-rexw.js → 30zp6-w17u9rt.js} +2 -2
- package/out/_next/static/chunks/{03lxylxrb--nr.js → 31_pg1fxqgdfx.js} +5 -5
- package/out/_next/static/chunks/{15qb_nbftdngf.js → 31j6x_qgtn-7j.js} +2 -2
- package/out/_next/static/chunks/{1530qvlw3k6-r.js → 363ng2l8o_bee.js} +1 -1
- package/out/_next/static/chunks/378867ti5yucc.js +3 -0
- package/out/_next/static/chunks/{3zscwdzfvog6_.js → 37phwvegpccj0.js} +3 -3
- package/out/_next/static/chunks/{1b350uot8ezcc.js → 37rq4vcfobv9x.js} +2 -2
- package/out/_next/static/chunks/{095k8hpxw-xbn.js → 3dbskin37ha12.js} +2 -2
- package/out/_next/static/chunks/{3h7u-1nejqqtb.js → 3opuxnw_w3yb5.js} +1 -1
- package/out/_next/static/chunks/{3oa7poag0otjv.js → 3s18b668qqa87.js} +3 -3
- package/out/_next/static/chunks/{41zg0kqiqrk1p.js → 3u3tcrl7wxrzi.js} +2 -2
- package/out/_next/static/chunks/{40xs4068rcf2a.js → 3wm88ukxj8u46.js} +2 -2
- package/out/_next/static/chunks/{17oybfz0_w57_.js → 404_8bnljpu18.js} +3 -3
- package/out/_next/static/chunks/{1ape9gu816w4y.js → 40bl8g3_13c59.js} +2 -2
- package/out/_next/static/chunks/{2gkktfamtwne7.js → 40v94fy15qxej.js} +2 -2
- package/out/_next/static/chunks/{1rjt4878-6jpq.js → 4188i5qe83m24.js} +9 -9
- package/out/_next/static/chunks/{39yikkubmtgqz.js → 458tg2eg5h8j5.js} +1 -1
- package/out/_next/static/chunks/{turbopack-3kacigl3rdfnv.js → turbopack-06hufy_7yovzw.js} +1 -1
- package/out/_next/static/chunks/{turbopack-36iwsu47bxp33.js → turbopack-08u3rgl_09tb7.js} +1 -1
- package/out/_next/static/chunks/{turbopack-3krde2-jab_v8.js → turbopack-0bljt1tp0zt4q.js} +1 -1
- package/out/_next/static/chunks/{turbopack-3r3t_benyr3e0.js → turbopack-0bp88aylp19tu.js} +1 -1
- package/out/_next/static/chunks/{turbopack-3ooud-27zb68g.js → turbopack-0cbhwv4g0ak0q.js} +1 -1
- package/out/_next/static/chunks/{turbopack-1w4scyf6vpol5.js → turbopack-0cu-maxx6s175.js} +1 -1
- package/out/_next/static/chunks/{turbopack-44xximgh8gm_p.js → turbopack-0hpk8f7-2xoz3.js} +1 -1
- package/out/_next/static/chunks/{turbopack-2b1khd4qbo4g_.js → turbopack-0i_uv1p6_dyo-.js} +1 -1
- package/out/_next/static/chunks/{turbopack-3qzwty6gp2rp6.js → turbopack-0j92hsdmi8k6p.js} +1 -1
- package/out/_next/static/chunks/{turbopack-3aomwkxdb1xcd.js → turbopack-0jijm5fs2d3pa.js} +1 -1
- package/out/_next/static/chunks/{turbopack-2zkucstqs-uas.js → turbopack-0la8grv9f6bxn.js} +1 -1
- package/out/_next/static/chunks/{turbopack-1nyeff6x3-pse.js → turbopack-0nlhzx_9rg6_p.js} +1 -1
- package/out/_next/static/chunks/{turbopack-1_gglg3dpcrb9.js → turbopack-0rt_vkqrb6ykb.js} +1 -1
- package/out/_next/static/chunks/{turbopack-2qna1gaz_m8yg.js → turbopack-0ywznohf-p_-1.js} +1 -1
- package/out/_next/static/chunks/{turbopack-1sbxamm6uhuz5.js → turbopack-10l1gows-lyo9.js} +1 -1
- package/out/_next/static/chunks/{turbopack-0zgk48rvr1ido.js → turbopack-13nb0axu41yph.js} +1 -1
- package/out/_next/static/chunks/{turbopack-43nacpl_z8zcq.js → turbopack-148_1qw3wae7d.js} +1 -1
- package/out/_next/static/chunks/{turbopack-3it6l3zzhdo9p.js → turbopack-14qzcqdgveoel.js} +1 -1
- package/out/_next/static/chunks/{turbopack-0f19levb05q7i.js → turbopack-14zydki2yqyd3.js} +1 -1
- package/out/_next/static/chunks/{turbopack-0_rgd_u2af3ru.js → turbopack-15x3cqzaaew93.js} +1 -1
- package/out/_next/static/chunks/{turbopack-1us_6ukt1jk6-.js → turbopack-1bnaj5x8w5m6z.js} +1 -1
- package/out/_next/static/chunks/{turbopack-0u-4g74a2wwm5.js → turbopack-1ddkj8w1l0b4_.js} +1 -1
- package/out/_next/static/chunks/{turbopack-2sq3dp63iy9sc.js → turbopack-1gbk68s3o1ulv.js} +1 -1
- package/out/_next/static/chunks/{turbopack-3_5cgc46h8vnh.js → turbopack-1k2h3st-nygbo.js} +1 -1
- package/out/_next/static/chunks/{turbopack-2gd0kzz1h3hib.js → turbopack-1r4g2xna7gckz.js} +1 -1
- package/out/_next/static/chunks/{turbopack-24dn7pallse3c.js → turbopack-1w2r6t0rjz8pp.js} +1 -1
- package/out/_next/static/chunks/{turbopack-0hqshmcyjb59f.js → turbopack-1w3-o4vpw_tgq.js} +1 -1
- package/out/_next/static/chunks/{turbopack-37s27yvm7wqhz.js → turbopack-22r1qh8g6munp.js} +1 -1
- package/out/_next/static/chunks/{turbopack-21wpv-2yjj_2k.js → turbopack-252a5rlyrq9fk.js} +1 -1
- package/out/_next/static/chunks/{turbopack-1hmv9sdzrieda.js → turbopack-25bgi6hb6qg8w.js} +1 -1
- package/out/_next/static/chunks/{turbopack-17yo0nf9vriak.js → turbopack-25hv3ltvy0wos.js} +1 -1
- package/out/_next/static/chunks/{turbopack-3q_fl6svn9p5v.js → turbopack-26z9lzkojt-cx.js} +1 -1
- package/out/_next/static/chunks/{turbopack-2xi5gbt97onhy.js → turbopack-272y7gt3ncsq7.js} +1 -1
- package/out/_next/static/chunks/{turbopack-0ck9bx9i_235a.js → turbopack-2b14t7jx5tgn7.js} +1 -1
- package/out/_next/static/chunks/{turbopack-411xj3ahxrm7x.js → turbopack-2cvqtdfi5z-33.js} +1 -1
- package/out/_next/static/chunks/{turbopack-211nr22unb6cu.js → turbopack-2h3q2k9k2riyq.js} +1 -1
- package/out/_next/static/chunks/{turbopack-3hwp80k71dv65.js → turbopack-2ihmy6dk991x4.js} +1 -1
- package/out/_next/static/chunks/{turbopack-2oib8sz_w6hep.js → turbopack-2jpit5njafpgz.js} +1 -1
- package/out/_next/static/chunks/{turbopack-1tt8er6zdq9n9.js → turbopack-2xm-84om1nxe3.js} +1 -1
- package/out/_next/static/chunks/{turbopack-34ki5zh3v60qq.js → turbopack-3-84r4h6w7ztq.js} +1 -1
- package/out/_next/static/chunks/{turbopack-31mn29md8ofl3.js → turbopack-3-kzs1xrhesa8.js} +1 -1
- package/out/_next/static/chunks/{turbopack-392y78oof71z2.js → turbopack-328hjoqts5fe-.js} +1 -1
- package/out/_next/static/chunks/{turbopack-028t8_6fqod-c.js → turbopack-34cd6px36-_ae.js} +1 -1
- package/out/_next/static/chunks/{turbopack-086jsmtsvtaec.js → turbopack-34gjko7_04blz.js} +1 -1
- package/out/_next/static/chunks/{turbopack-3_-rg9lmp4h0e.js → turbopack-34rebh56g2zjd.js} +1 -1
- package/out/_next/static/chunks/{turbopack-2jz68yzgjx-xl.js → turbopack-3591lq9bl5zm-.js} +1 -1
- package/out/_next/static/chunks/{turbopack-2uzg6ysxx6cf5.js → turbopack-3aujkr72l5znq.js} +1 -1
- package/out/_next/static/chunks/{turbopack-1pld3p02m7h8c.js → turbopack-3cnuj1vf45306.js} +1 -1
- package/out/_next/static/chunks/{turbopack-33hnf_-ch94yh.js → turbopack-3ma-qc75tctdd.js} +1 -1
- package/out/_next/static/chunks/{turbopack-2y9g0j3n6bhv8.js → turbopack-3mxiudedhdbib.js} +1 -1
- package/out/_next/static/chunks/{turbopack-3xna14y4x6294.js → turbopack-3n_3uj335tm0n.js} +1 -1
- package/out/_next/static/chunks/{turbopack-2e4vvf8-6h7il.js → turbopack-3np05fneli2gv.js} +1 -1
- package/out/_next/static/chunks/{turbopack-3vj5mrb50cv96.js → turbopack-3opb94dwpz7bg.js} +1 -1
- package/out/_next/static/chunks/{turbopack-3en5il6z7-a36.js → turbopack-3ouyppea8jp6k.js} +1 -1
- package/out/_next/static/chunks/{turbopack-1xt9y6imo4y47.js → turbopack-3qmjh91o7wte5.js} +1 -1
- package/out/_next/static/chunks/{turbopack-2tvzuc7lcku4v.js → turbopack-3seov_dvv8im-.js} +1 -1
- package/out/_next/static/chunks/{turbopack-0ougsw-ryfqrq.js → turbopack-3uov6gvwwuxmx.js} +1 -1
- package/out/_next/static/chunks/{turbopack-3p5qeedyziucp.js → turbopack-3x5pttfv2qlpw.js} +1 -1
- package/out/_next/static/chunks/{turbopack-3vozqs8tej365.js → turbopack-3xem4akmi9at9.js} +1 -1
- package/out/_next/static/chunks/{turbopack-2u4m169_39_qy.js → turbopack-3z9v3oefxw81i.js} +1 -1
- package/out/_next/static/chunks/{turbopack-2gq3nwbp7cjh5.js → turbopack-3zxsk_hikkrwx.js} +1 -1
- package/out/_next/static/chunks/{turbopack-0bro3_e58rpi5.js → turbopack-42akqkt4irsps.js} +1 -1
- package/out/_next/static/chunks/{turbopack-1hmil1x9p77h_.js → turbopack-44bpgib3rn1s2.js} +1 -1
- package/out/_offline/index.html +2 -2
- package/out/account/forgot-password/index.html +2 -2
- package/out/account/index.html +2 -2
- package/out/assortments/AssortmentDetailPage/index.html +2 -2
- package/out/assortments/index.html +2 -2
- package/out/assortments/new/index.html +2 -2
- package/out/copilot/index.html +2 -2
- package/out/country/CountryDetailPage/index.html +2 -2
- package/out/country/index.html +2 -2
- package/out/country/new/index.html +2 -2
- package/out/currency/CurrencyDetailPage/index.html +2 -2
- package/out/currency/index.html +2 -2
- package/out/currency/new/index.html +2 -2
- package/out/delivery-provider/DeliveryProviderDetailPage/index.html +2 -2
- package/out/delivery-provider/index.html +2 -2
- package/out/delivery-provider/new/index.html +2 -2
- package/out/enrollments/EnrollmentDetailPage/index.html +2 -2
- package/out/enrollments/index.html +2 -2
- package/out/events/EventDetailPage/index.html +2 -2
- package/out/events/index.html +2 -2
- package/out/exports/index.html +2 -2
- package/out/external/index.html +2 -2
- package/out/filters/FilterDetailPage/index.html +2 -2
- package/out/filters/index.html +2 -2
- package/out/filters/new/index.html +2 -2
- package/out/index.html +2 -2
- package/out/install/index.html +2 -2
- package/out/language/LanguageDetailPage/index.html +2 -2
- package/out/language/index.html +2 -2
- package/out/language/new/index.html +2 -2
- package/out/log-in/index.html +2 -2
- package/out/orders/OrderDetailPage/index.html +2 -2
- package/out/orders/index.html +2 -2
- package/out/payment-provider/PaymentProviderDetailPage/index.html +2 -2
- package/out/payment-provider/index.html +2 -2
- package/out/payment-provider/new/index.html +2 -2
- package/out/products/ProductDetailPage/index.html +2 -2
- package/out/products/index.html +2 -2
- package/out/products/new/index.html +2 -2
- package/out/quotations/QuotationDetailPage/index.html +2 -2
- package/out/quotations/index.html +2 -2
- package/out/reset-password/index.html +2 -2
- package/out/sign-up/index.html +2 -2
- package/out/styleguide/index.html +2 -2
- package/out/tokens/TokenDetailPage/index.html +2 -2
- package/out/tokens/index.html +2 -2
- package/out/users/UserDetailPage/index.html +2 -2
- package/out/users/index.html +2 -2
- package/out/users/new/index.html +2 -2
- package/out/verify-email/index.html +2 -2
- package/out/warehousing-provider/WarehousingProviderDetailPage/index.html +2 -2
- package/out/warehousing-provider/index.html +2 -2
- package/out/warehousing-provider/new/index.html +2 -2
- package/out/works/WorkDetailPage/index.html +2 -2
- package/out/works/WorkQueueListView/index.html +2 -2
- package/out/works/index.html +2 -2
- package/out/works/management/index.html +2 -2
- package/package.json +1 -1
- package/dist/chunk-45H2WVIC.js +0 -51
- package/dist/chunk-4VNS5WPM.js +0 -37
- package/dist/chunk-54DKBWXV.js +0 -33
- package/dist/chunk-6TXD4TA7.js +0 -1196
- package/dist/chunk-BGCKJQGS.js +0 -58
- package/dist/chunk-BYXBJQAS.js +0 -1
- package/dist/chunk-EJDZRZSZ.js +0 -59
- package/dist/chunk-ELPURWDC.js +0 -75
- package/dist/chunk-IAQPLRXZ.js +0 -16
- package/dist/chunk-ILYPJE4N.js +0 -57
- package/dist/chunk-IXBMHOB5.js +0 -13
- package/dist/chunk-KH5MK6ZW.js +0 -18
- package/dist/chunk-NT7RB7AK.js +0 -70
- package/dist/chunk-OKGJ6HDE.js +0 -26
- package/dist/chunk-Q6S3LBUF.js +0 -180
- package/dist/chunk-QNLGYFV7.js +0 -22
- package/dist/chunk-RAQV2GYF.js +0 -70
- package/dist/chunk-RHUFQVKL.js +0 -514
- package/dist/chunk-RVG6IOFC.js +0 -11
- package/dist/chunk-SRAAKMWY.js +0 -39
- package/dist/chunk-UFYR5WZT.js +0 -165
- package/dist/chunk-UXG7EYHC.js +0 -614
- package/dist/chunk-VDKQGOMV.js +0 -840
- package/dist/chunk-XHOCXPD5.js +0 -9
- package/dist/chunk-XJBPMIC4.js +0 -284
- package/dist/chunk-YO6PT7KD.js +0 -13
- package/dist/chunk-YSKZE2KN.js +0 -652
- package/dist/components/ui/Accordion/Accordion.d.ts +0 -11
- package/dist/components/ui/Accordion/Accordion.d.ts.map +0 -1
- package/dist/components/ui/Accordion/AccordionHeader.d.ts +0 -6
- package/dist/components/ui/Accordion/AccordionHeader.d.ts.map +0 -1
- package/dist/components/ui/Accordion/AccordionItem.d.ts +0 -11
- package/dist/components/ui/Accordion/AccordionItem.d.ts.map +0 -1
- package/dist/components/ui/ActiveInActive.d.ts +0 -10
- package/dist/components/ui/ActiveInActive.d.ts.map +0 -1
- package/dist/components/ui/AnimatedCounter.d.ts +0 -7
- package/dist/components/ui/AnimatedCounter.d.ts.map +0 -1
- package/dist/components/ui/Badge.d.ts +0 -10
- package/dist/components/ui/Badge.d.ts.map +0 -1
- package/dist/components/ui/BreadCrumbs.d.ts +0 -7
- package/dist/components/ui/BreadCrumbs.d.ts.map +0 -1
- package/dist/components/ui/Button.d.ts +0 -36
- package/dist/components/ui/Button.d.ts.map +0 -1
- package/dist/components/ui/CopyableText.d.ts +0 -5
- package/dist/components/ui/CopyableText.d.ts.map +0 -1
- package/dist/components/ui/DateInput.d.ts +0 -15
- package/dist/components/ui/DateInput.d.ts.map +0 -1
- package/dist/components/ui/DateRangeFilterInput.d.ts +0 -4
- package/dist/components/ui/DateRangeFilterInput.d.ts.map +0 -1
- package/dist/components/ui/DetailHeader.d.ts +0 -6
- package/dist/components/ui/DetailHeader.d.ts.map +0 -1
- package/dist/components/ui/DraggableIcon.d.ts +0 -3
- package/dist/components/ui/DraggableIcon.d.ts.map +0 -1
- package/dist/components/ui/ErrorBoundary.d.ts +0 -18
- package/dist/components/ui/ErrorBoundary.d.ts.map +0 -1
- package/dist/components/ui/ErrorFallback.d.ts +0 -6
- package/dist/components/ui/ErrorFallback.d.ts.map +0 -1
- package/dist/components/ui/HelpText.d.ts +0 -11
- package/dist/components/ui/HelpText.d.ts.map +0 -1
- package/dist/components/ui/ImageWithFallback.d.ts +0 -7
- package/dist/components/ui/ImageWithFallback.d.ts.map +0 -1
- package/dist/components/ui/InfoTextBanner.d.ts +0 -6
- package/dist/components/ui/InfoTextBanner.d.ts.map +0 -1
- package/dist/components/ui/JSONView.d.ts +0 -6
- package/dist/components/ui/JSONView.d.ts.map +0 -1
- package/dist/components/ui/ListHeader.d.ts +0 -6
- package/dist/components/ui/ListHeader.d.ts.map +0 -1
- package/dist/components/ui/Loading.d.ts +0 -3
- package/dist/components/ui/Loading.d.ts.map +0 -1
- package/dist/components/ui/NoData.d.ts +0 -7
- package/dist/components/ui/NoData.d.ts.map +0 -1
- package/dist/components/ui/NoImage.d.ts +0 -7
- package/dist/components/ui/NoImage.d.ts.map +0 -1
- package/dist/components/ui/NoImageSvg.d.ts +0 -8
- package/dist/components/ui/NoImageSvg.d.ts.map +0 -1
- package/dist/components/ui/PageHeader.d.ts +0 -11
- package/dist/components/ui/PageHeader.d.ts.map +0 -1
- package/dist/components/ui/Pagination.d.ts +0 -8
- package/dist/components/ui/Pagination.d.ts.map +0 -1
- package/dist/components/ui/Portal/Portal.d.ts +0 -16
- package/dist/components/ui/Portal/Portal.d.ts.map +0 -1
- package/dist/components/ui/Portal/Portal.types.d.ts +0 -16
- package/dist/components/ui/Portal/Portal.types.d.ts.map +0 -1
- package/dist/components/ui/SaveAndCancelButtons.d.ts +0 -10
- package/dist/components/ui/SaveAndCancelButtons.d.ts.map +0 -1
- package/dist/components/ui/SearchField.d.ts +0 -7
- package/dist/components/ui/SearchField.d.ts.map +0 -1
- package/dist/components/ui/Tab.d.ts +0 -18
- package/dist/components/ui/Tab.d.ts.map +0 -1
- package/dist/components/ui/Tag/TagInput.d.ts +0 -14
- package/dist/components/ui/Tag/TagInput.d.ts.map +0 -1
- package/dist/components/ui/Tag/TagList.d.ts +0 -8
- package/dist/components/ui/Tag/TagList.d.ts.map +0 -1
- package/dist/components/ui/Tag/TagListForm.d.ts +0 -8
- package/dist/components/ui/Tag/TagListForm.d.ts.map +0 -1
- package/dist/components/ui/Toggle.d.ts +0 -11
- package/dist/components/ui/Toggle.d.ts.map +0 -1
- package/dist/components/ui/ToolTip.d.ts +0 -7
- package/dist/components/ui/ToolTip.d.ts.map +0 -1
- package/dist/components/ui/card.d.ts +0 -9
- package/dist/components/ui/card.d.ts.map +0 -1
- package/dist/components/ui/chart.d.ts +0 -42
- package/dist/components/ui/chart.d.ts.map +0 -1
- package/dist/components/ui/form/CheckboxField.d.ts +0 -4
- package/dist/components/ui/form/CheckboxField.d.ts.map +0 -1
- package/dist/components/ui/form/ChoicesField.d.ts +0 -12
- package/dist/components/ui/form/ChoicesField.d.ts.map +0 -1
- package/dist/components/ui/form/Combobox.d.ts +0 -20
- package/dist/components/ui/form/Combobox.d.ts.map +0 -1
- package/dist/components/ui/form/DatePickerField.d.ts +0 -4
- package/dist/components/ui/form/DatePickerField.d.ts.map +0 -1
- package/dist/components/ui/form/EmailField.d.ts +0 -7
- package/dist/components/ui/form/EmailField.d.ts.map +0 -1
- package/dist/components/ui/form/FieldWithHelp.d.ts +0 -10
- package/dist/components/ui/form/FieldWithHelp.d.ts.map +0 -1
- package/dist/components/ui/form/FieldWrapper.d.ts +0 -8
- package/dist/components/ui/form/FieldWrapper.d.ts.map +0 -1
- package/dist/components/ui/form/FormErrors.d.ts +0 -6
- package/dist/components/ui/form/FormErrors.d.ts.map +0 -1
- package/dist/components/ui/form/JSONAreaField.d.ts +0 -7
- package/dist/components/ui/form/JSONAreaField.d.ts.map +0 -1
- package/dist/components/ui/form/MarkdownTextAreaField.d.ts +0 -8
- package/dist/components/ui/form/MarkdownTextAreaField.d.ts.map +0 -1
- package/dist/components/ui/form/PasswordField.d.ts +0 -3
- package/dist/components/ui/form/PasswordField.d.ts.map +0 -1
- package/dist/components/ui/form/SelectField.d.ts +0 -11
- package/dist/components/ui/form/SelectField.d.ts.map +0 -1
- package/dist/components/ui/form/SubmitButton.d.ts +0 -9
- package/dist/components/ui/form/SubmitButton.d.ts.map +0 -1
- package/dist/components/ui/form/TagInputField.d.ts +0 -6
- package/dist/components/ui/form/TagInputField.d.ts.map +0 -1
- package/dist/components/ui/form/TextAreaField.d.ts +0 -8
- package/dist/components/ui/form/TextAreaField.d.ts.map +0 -1
- package/dist/components/ui/form/TextField.d.ts +0 -10
- package/dist/components/ui/form/TextField.d.ts.map +0 -1
- package/dist/components/ui/form/index.d.ts +0 -17
- package/dist/components/ui/form/index.d.ts.map +0 -1
- package/dist/components/ui/icons.d.ts +0 -4
- package/dist/components/ui/icons.d.ts.map +0 -1
- package/dist/components/ui/index.d.ts +0 -41
- package/dist/components/ui/index.d.ts.map +0 -1
- package/dist/form.js +0 -30102
- package/dist/gql/types.d.ts +0 -17209
- package/dist/gql/types.d.ts.map +0 -1
- package/dist/hooks.js +0 -41
- package/dist/lib/utils.d.ts +0 -3
- package/dist/lib/utils.d.ts.map +0 -1
- package/dist/modal.js +0 -114
- package/dist/modules/UnchainedContext/UnchainedContext.d.ts +0 -8
- package/dist/modules/UnchainedContext/UnchainedContext.d.ts.map +0 -1
- package/dist/modules/UnchainedContext/useUnchainedContext.d.ts +0 -7
- package/dist/modules/UnchainedContext/useUnchainedContext.d.ts.map +0 -1
- package/dist/modules/accounts/fragment/MD5MetaDataFragment.d.ts +0 -3
- package/dist/modules/accounts/fragment/MD5MetaDataFragment.d.ts.map +0 -1
- package/dist/modules/accounts/fragment/UserFragment.d.ts +0 -3
- package/dist/modules/accounts/fragment/UserFragment.d.ts.map +0 -1
- package/dist/modules/accounts/hooks/useCurrentUser.d.ts +0 -10
- package/dist/modules/accounts/hooks/useCurrentUser.d.ts.map +0 -1
- package/dist/modules/accounts/hooks/useUsersCount.d.ts +0 -8
- package/dist/modules/accounts/hooks/useUsersCount.d.ts.map +0 -1
- package/dist/modules/accounts.js +0 -1013
- package/dist/modules/assortment/hooks/useAssortmentsCount.d.ts +0 -8
- package/dist/modules/assortment/hooks/useAssortmentsCount.d.ts.map +0 -1
- package/dist/modules/assortment.js +0 -1121
- package/dist/modules/common/components/AppContext.d.ts +0 -18
- package/dist/modules/common/components/AppContext.d.ts.map +0 -1
- package/dist/modules/common/components/FormWrapper.d.ts +0 -8
- package/dist/modules/common/components/FormWrapper.d.ts.map +0 -1
- package/dist/modules/common/components/ThemeWrapper.d.ts +0 -10
- package/dist/modules/common/components/ThemeWrapper.d.ts.map +0 -1
- package/dist/modules/common/data/iso-codes.d.ts +0 -4
- package/dist/modules/common/data/iso-codes.d.ts.map +0 -1
- package/dist/modules/common/data/miscellaneous.d.ts +0 -51
- package/dist/modules/common/data/miscellaneous.d.ts.map +0 -1
- package/dist/modules/common/fragments/AddressFragment.d.ts +0 -3
- package/dist/modules/common/fragments/AddressFragment.d.ts.map +0 -1
- package/dist/modules/common/hooks/useApp.d.ts +0 -11
- package/dist/modules/common/hooks/useApp.d.ts.map +0 -1
- package/dist/modules/common/hooks/useCSVExport.d.ts +0 -10
- package/dist/modules/common/hooks/useCSVExport.d.ts.map +0 -1
- package/dist/modules/common/hooks/useCSVImport.d.ts +0 -18
- package/dist/modules/common/hooks/useCSVImport.d.ts.map +0 -1
- package/dist/modules/common/hooks/useChatEndpointChecker.d.ts +0 -5
- package/dist/modules/common/hooks/useChatEndpointChecker.d.ts.map +0 -1
- package/dist/modules/common/hooks/useConfirmMediaUpload.d.ts +0 -10
- package/dist/modules/common/hooks/useConfirmMediaUpload.d.ts.map +0 -1
- package/dist/modules/common/hooks/useDashboardMetrics.d.ts +0 -23
- package/dist/modules/common/hooks/useDashboardMetrics.d.ts.map +0 -1
- package/dist/modules/common/hooks/useLocalStorage.d.ts +0 -3
- package/dist/modules/common/hooks/useLocalStorage.d.ts.map +0 -1
- package/dist/modules/common/hooks/useOrderAnalytics.d.ts +0 -25
- package/dist/modules/common/hooks/useOrderAnalytics.d.ts.map +0 -1
- package/dist/modules/common/hooks/useOrderItemsAnalytics.d.ts +0 -16
- package/dist/modules/common/hooks/useOrderItemsAnalytics.d.ts.map +0 -1
- package/dist/modules/common/hooks/useOutsideClick.d.ts +0 -3
- package/dist/modules/common/hooks/useOutsideClick.d.ts.map +0 -1
- package/dist/modules/common/hooks/usePortal.d.ts +0 -20
- package/dist/modules/common/hooks/usePortal.d.ts.map +0 -1
- package/dist/modules/common/hooks/useShopConfiguration.d.ts +0 -8
- package/dist/modules/common/hooks/useShopConfiguration.d.ts.map +0 -1
- package/dist/modules/common/hooks/useShopInfo.d.ts +0 -41
- package/dist/modules/common/hooks/useShopInfo.d.ts.map +0 -1
- package/dist/modules/common/hooks/useStatusTypes.d.ts +0 -10
- package/dist/modules/common/hooks/useStatusTypes.d.ts.map +0 -1
- package/dist/modules/common/hooks/useSystemRoles.d.ts +0 -7
- package/dist/modules/common/hooks/useSystemRoles.d.ts.map +0 -1
- package/dist/modules/common/hooks/useTheme.d.ts +0 -7
- package/dist/modules/common/hooks/useTheme.d.ts.map +0 -1
- package/dist/modules/common/utils/deBounce.d.ts +0 -3
- package/dist/modules/common/utils/deBounce.d.ts.map +0 -1
- package/dist/modules/common/utils/defaultNextImageLoader.d.ts +0 -7
- package/dist/modules/common/utils/defaultNextImageLoader.d.ts.map +0 -1
- package/dist/modules/common/utils/formatUsername.d.ts +0 -3
- package/dist/modules/common/utils/formatUsername.d.ts.map +0 -1
- package/dist/modules/common/utils/getSetupStepsConfigurationsMeta.d.ts +0 -30
- package/dist/modules/common/utils/getSetupStepsConfigurationsMeta.d.ts.map +0 -1
- package/dist/modules/common/utils/normalizeFilterKeys.d.ts +0 -4
- package/dist/modules/common/utils/normalizeFilterKeys.d.ts.map +0 -1
- package/dist/modules/common/utils/useFormatDateTime.d.ts +0 -7
- package/dist/modules/common/utils/useFormatDateTime.d.ts.map +0 -1
- package/dist/modules/common/utils/utils.d.ts +0 -21
- package/dist/modules/common/utils/utils.d.ts.map +0 -1
- package/dist/modules/country/fragments/CountryFragment.d.ts +0 -3
- package/dist/modules/country/fragments/CountryFragment.d.ts.map +0 -1
- package/dist/modules/country/hooks/useCountries.d.ts +0 -22
- package/dist/modules/country/hooks/useCountries.d.ts.map +0 -1
- package/dist/modules/country.js +0 -108
- package/dist/modules/currency.js +0 -119
- package/dist/modules/delivery-provider.js +0 -269
- package/dist/modules/enrollment.js +0 -353
- package/dist/modules/event.js +0 -123
- package/dist/modules/filter.js +0 -448
- package/dist/modules/forms/components/Form.d.ts +0 -8
- package/dist/modules/forms/components/Form.d.ts.map +0 -1
- package/dist/modules/forms/hooks/useField.d.ts +0 -35
- package/dist/modules/forms/hooks/useField.d.ts.map +0 -1
- package/dist/modules/forms/hooks/useForm.d.ts +0 -44
- package/dist/modules/forms/hooks/useForm.d.ts.map +0 -1
- package/dist/modules/forms/hooks/useFormContext.d.ts +0 -3
- package/dist/modules/forms/hooks/useFormContext.d.ts.map +0 -1
- package/dist/modules/forms/lib/FormContext.d.ts +0 -13
- package/dist/modules/forms/lib/FormContext.d.ts.map +0 -1
- package/dist/modules/forms/lib/clean.d.ts +0 -3
- package/dist/modules/forms/lib/clean.d.ts.map +0 -1
- package/dist/modules/forms/lib/validators.d.ts +0 -20
- package/dist/modules/forms/lib/validators.d.ts.map +0 -1
- package/dist/modules/language/fragments/LanguageFragment.d.ts +0 -3
- package/dist/modules/language/fragments/LanguageFragment.d.ts.map +0 -1
- package/dist/modules/language/hooks/useLanguages.d.ts +0 -19
- package/dist/modules/language/hooks/useLanguages.d.ts.map +0 -1
- package/dist/modules/language.js +0 -106
- package/dist/modules/modal/components/AlertMessage.d.ts +0 -9
- package/dist/modules/modal/components/AlertMessage.d.ts.map +0 -1
- package/dist/modules/modal/components/DangerMessage.d.ts +0 -12
- package/dist/modules/modal/components/DangerMessage.d.ts.map +0 -1
- package/dist/modules/modal/components/ImportResultMessage.d.ts +0 -14
- package/dist/modules/modal/components/ImportResultMessage.d.ts.map +0 -1
- package/dist/modules/modal/components/Modal.d.ts +0 -10
- package/dist/modules/modal/components/Modal.d.ts.map +0 -1
- package/dist/modules/modal/components/ModalWrapper.d.ts +0 -6
- package/dist/modules/modal/components/ModalWrapper.d.ts.map +0 -1
- package/dist/modules/modal/hooks/useModal.d.ts +0 -7
- package/dist/modules/modal/hooks/useModal.d.ts.map +0 -1
- package/dist/modules/modal/utils/ModalContext.d.ts +0 -9
- package/dist/modules/modal/utils/ModalContext.d.ts.map +0 -1
- package/dist/modules/order/fragments/OrderDetailFragment.d.ts +0 -3
- package/dist/modules/order/fragments/OrderDetailFragment.d.ts.map +0 -1
- package/dist/modules/order/fragments/OrderFragment.d.ts +0 -3
- package/dist/modules/order/fragments/OrderFragment.d.ts.map +0 -1
- package/dist/modules/order/hooks/useOrders.d.ts +0 -46
- package/dist/modules/order/hooks/useOrders.d.ts.map +0 -1
- package/dist/modules/order.js +0 -563
- package/dist/modules/payment-providers.js +0 -206
- package/dist/modules/product/hooks/useProductsCount.d.ts +0 -8
- package/dist/modules/product/hooks/useProductsCount.d.ts.map +0 -1
- package/dist/modules/product-review.js +0 -251
- package/dist/modules/product.js +0 -1929
- package/dist/modules/quotation.js +0 -297
- package/dist/modules/token.js +0 -143
- package/dist/modules/warehousing-providers.js +0 -206
- package/dist/modules/work/fragments/WorkFragment.d.ts +0 -3
- package/dist/modules/work/fragments/WorkFragment.d.ts.map +0 -1
- package/dist/modules/work/hooks/useAddWork.d.ts +0 -6
- package/dist/modules/work/hooks/useAddWork.d.ts.map +0 -1
- package/dist/modules/work/hooks/useWork.d.ts +0 -32
- package/dist/modules/work/hooks/useWork.d.ts.map +0 -1
- package/dist/modules/work.js +0 -308
- package/dist/plugins.js +0 -8
- package/dist/providers.js +0 -6
- package/dist/sdk/hooks.d.ts +0 -9
- package/dist/sdk/hooks.d.ts.map +0 -1
- package/dist/sdk/modal.d.ts +0 -7
- package/dist/sdk/modal.d.ts.map +0 -1
- package/dist/sdk/plugins.d.ts +0 -67
- package/dist/sdk/plugins.d.ts.map +0 -1
- package/dist/sdk/providers.d.ts +0 -5
- package/dist/sdk/providers.d.ts.map +0 -1
- package/dist/sdk/theme.d.ts +0 -26
- package/dist/sdk/theme.d.ts.map +0 -1
- package/dist/theme.js +0 -34
- package/dist/ui.js +0 -21540
- package/out/_next/static/chunks/0-kffmdf1lcxk.js +0 -1
- package/out/_next/static/chunks/0axbsyx70ajmu.js +0 -5
- package/out/_next/static/chunks/0dlg390tt3o1_.js +0 -107
- package/out/_next/static/chunks/0ki8gfs3dlslv.js +0 -3
- package/out/_next/static/chunks/140i5f2n-78cg.js +0 -7
- package/out/_next/static/chunks/1qx9z7kl93y0b.js +0 -188
- package/out/_next/static/chunks/25mevljp4o01b.js +0 -188
- package/out/_next/static/chunks/2qhvt2n_whgz1.js +0 -227
- package/out/manifest.json +0 -48
- /package/out/_next/static/{s9JIgzylJK2SpeEcB-ZI9 → _TiowajLX6Z3MYsLPNgxd}/_clientMiddlewareManifest.js +0 -0
- /package/out/_next/static/{s9JIgzylJK2SpeEcB-ZI9 → _TiowajLX6Z3MYsLPNgxd}/_ssgManifest.js +0 -0
package/dist/modules/product.js
DELETED
|
@@ -1,1929 +0,0 @@
|
|
|
1
|
-
import { ProductReviewDetailFragment_default } from '../chunk-ILYPJE4N.js';
|
|
2
|
-
import { TokenFragment_default } from '../chunk-QNLGYFV7.js';
|
|
3
|
-
import { parseUniqueId } from '../chunk-IXBMHOB5.js';
|
|
4
|
-
import { useApp_default } from '../chunk-BGCKJQGS.js';
|
|
5
|
-
import { ProductBriefFragment_default } from '../chunk-EJDZRZSZ.js';
|
|
6
|
-
import '../chunk-ELPURWDC.js';
|
|
7
|
-
import { useCurrencies_default } from '../chunk-NT7RB7AK.js';
|
|
8
|
-
import { parseMeta_default } from '../chunk-YO6PT7KD.js';
|
|
9
|
-
import '../chunk-BYXBJQAS.js';
|
|
10
|
-
import '../chunk-RAQV2GYF.js';
|
|
11
|
-
import '../chunk-54DKBWXV.js';
|
|
12
|
-
import { useConfirmMediaUpload_default, PUTMedia_default } from '../chunk-45H2WVIC.js';
|
|
13
|
-
import '../chunk-UFYR5WZT.js';
|
|
14
|
-
import { useUnchainedContext_default } from '../chunk-IAQPLRXZ.js';
|
|
15
|
-
import '../chunk-4VNS5WPM.js';
|
|
16
|
-
import { gql } from '@apollo/client';
|
|
17
|
-
import { useMutation, useQuery } from '@apollo/client/react';
|
|
18
|
-
import { useRef, useState, useEffect } from 'react';
|
|
19
|
-
import { useIntl } from 'react-intl';
|
|
20
|
-
|
|
21
|
-
var AddProductAssignmentMutation = gql`
|
|
22
|
-
mutation AddProductAssignment(
|
|
23
|
-
$proxyId: ID!
|
|
24
|
-
$productId: ID!
|
|
25
|
-
$vectors: [ProductAssignmentVectorInput!]!
|
|
26
|
-
) {
|
|
27
|
-
addProductAssignment(
|
|
28
|
-
proxyId: $proxyId
|
|
29
|
-
productId: $productId
|
|
30
|
-
vectors: $vectors
|
|
31
|
-
) {
|
|
32
|
-
_id
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
`;
|
|
36
|
-
var useAddProductAssignment = () => {
|
|
37
|
-
const [addProductAssignmentMutation] = useMutation(AddProductAssignmentMutation);
|
|
38
|
-
const addProductAssignment = async ({
|
|
39
|
-
productId,
|
|
40
|
-
proxyId,
|
|
41
|
-
vectors
|
|
42
|
-
}) => {
|
|
43
|
-
return addProductAssignmentMutation({
|
|
44
|
-
variables: { productId, proxyId, vectors },
|
|
45
|
-
refetchQueries: ["ProductAssignments"]
|
|
46
|
-
});
|
|
47
|
-
};
|
|
48
|
-
return {
|
|
49
|
-
addProductAssignment
|
|
50
|
-
};
|
|
51
|
-
};
|
|
52
|
-
var useAddProductAssignment_default = useAddProductAssignment;
|
|
53
|
-
var PrepareProductMediaUploadMutation = gql`
|
|
54
|
-
mutation PrepareProductMediaUpload($mediaName: String!, $productId: ID!) {
|
|
55
|
-
prepareProductMediaUpload(mediaName: $mediaName, productId: $productId) {
|
|
56
|
-
_id
|
|
57
|
-
putURL
|
|
58
|
-
expires
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
`;
|
|
62
|
-
var useAddProductMedia = () => {
|
|
63
|
-
const [prepareProductMediaUploadMutation] = useMutation(PrepareProductMediaUploadMutation);
|
|
64
|
-
const { confirmMediaUpload } = useConfirmMediaUpload_default({
|
|
65
|
-
refetchQueries: ["Product"]
|
|
66
|
-
});
|
|
67
|
-
const addProductMedia = async ({ productId, media }) => {
|
|
68
|
-
const { data } = await prepareProductMediaUploadMutation({
|
|
69
|
-
variables: { productId, mediaName: media.name }
|
|
70
|
-
});
|
|
71
|
-
const { prepareProductMediaUpload } = data;
|
|
72
|
-
await PUTMedia_default(media, prepareProductMediaUpload.putURL);
|
|
73
|
-
return confirmMediaUpload({
|
|
74
|
-
mediaUploadTicketId: prepareProductMediaUpload._id,
|
|
75
|
-
size: media?.size,
|
|
76
|
-
type: media.type
|
|
77
|
-
});
|
|
78
|
-
};
|
|
79
|
-
return {
|
|
80
|
-
addProductMedia
|
|
81
|
-
};
|
|
82
|
-
};
|
|
83
|
-
var useAddProductMedia_default = useAddProductMedia;
|
|
84
|
-
var ProductDetailFragment = gql`
|
|
85
|
-
fragment ProductDetailFragment on Product {
|
|
86
|
-
_id
|
|
87
|
-
sequence
|
|
88
|
-
status
|
|
89
|
-
created
|
|
90
|
-
tags
|
|
91
|
-
updated
|
|
92
|
-
published
|
|
93
|
-
|
|
94
|
-
media {
|
|
95
|
-
_id
|
|
96
|
-
tags
|
|
97
|
-
file {
|
|
98
|
-
_id
|
|
99
|
-
url
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
reviews {
|
|
103
|
-
_id
|
|
104
|
-
created
|
|
105
|
-
author {
|
|
106
|
-
_id
|
|
107
|
-
username
|
|
108
|
-
isGuest
|
|
109
|
-
}
|
|
110
|
-
rating
|
|
111
|
-
title
|
|
112
|
-
review
|
|
113
|
-
voteCount
|
|
114
|
-
ownVotes {
|
|
115
|
-
type
|
|
116
|
-
timestamp
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
siblings {
|
|
120
|
-
_id
|
|
121
|
-
media {
|
|
122
|
-
_id
|
|
123
|
-
file {
|
|
124
|
-
_id
|
|
125
|
-
url
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
`;
|
|
131
|
-
var ProductDetailFragment_default = ProductDetailFragment;
|
|
132
|
-
var ProductTextsFragment = gql`
|
|
133
|
-
fragment ProductTextsFragment on ProductTexts {
|
|
134
|
-
_id
|
|
135
|
-
locale
|
|
136
|
-
slug
|
|
137
|
-
title
|
|
138
|
-
subtitle
|
|
139
|
-
description
|
|
140
|
-
vendor
|
|
141
|
-
brand
|
|
142
|
-
labels
|
|
143
|
-
}
|
|
144
|
-
`;
|
|
145
|
-
var ProductTextsFragment_default = ProductTextsFragment;
|
|
146
|
-
|
|
147
|
-
// src/modules/product/hooks/useCreateProduct.ts
|
|
148
|
-
var CreateProductMutation = gql`
|
|
149
|
-
mutation CreateProduct(
|
|
150
|
-
$product: CreateProductInput!
|
|
151
|
-
$texts: [ProductTextInput!]
|
|
152
|
-
) {
|
|
153
|
-
createProduct(product: $product, texts: $texts) {
|
|
154
|
-
...ProductDetailFragment
|
|
155
|
-
... on SimpleProduct {
|
|
156
|
-
texts {
|
|
157
|
-
...ProductTextsFragment
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
... on ConfigurableProduct {
|
|
161
|
-
texts {
|
|
162
|
-
...ProductTextsFragment
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
... on BundleProduct {
|
|
166
|
-
texts {
|
|
167
|
-
...ProductTextsFragment
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
... on TokenizedProduct {
|
|
171
|
-
texts {
|
|
172
|
-
...ProductTextsFragment
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
... on PlanProduct {
|
|
176
|
-
texts {
|
|
177
|
-
...ProductTextsFragment
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
${ProductDetailFragment_default}
|
|
183
|
-
${ProductTextsFragment_default}
|
|
184
|
-
`;
|
|
185
|
-
var useCreateProduct = () => {
|
|
186
|
-
const [createProductMutation, { data, error, loading }] = useMutation(CreateProductMutation);
|
|
187
|
-
const createProduct = async ({
|
|
188
|
-
product: { type, tags },
|
|
189
|
-
texts
|
|
190
|
-
}) => {
|
|
191
|
-
return createProductMutation({
|
|
192
|
-
variables: { product: { type, tags }, texts },
|
|
193
|
-
refetchQueries: ["Products", "ShopStatus", "ShopInfo"]
|
|
194
|
-
});
|
|
195
|
-
};
|
|
196
|
-
const newProduct = data?.createProduct;
|
|
197
|
-
return {
|
|
198
|
-
createProduct,
|
|
199
|
-
newProduct,
|
|
200
|
-
error,
|
|
201
|
-
loading
|
|
202
|
-
};
|
|
203
|
-
};
|
|
204
|
-
var useCreateProduct_default = useCreateProduct;
|
|
205
|
-
var CreateProductBundleItemMutation = gql`
|
|
206
|
-
mutation CreateProductBundleItem(
|
|
207
|
-
$productId: ID!
|
|
208
|
-
$item: CreateProductBundleItemInput!
|
|
209
|
-
) {
|
|
210
|
-
createProductBundleItem(productId: $productId, item: $item) {
|
|
211
|
-
_id
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
`;
|
|
215
|
-
var useCreateProductBundleItem = () => {
|
|
216
|
-
const [createProductBundleItemMutation] = useMutation(CreateProductBundleItemMutation);
|
|
217
|
-
const createProductBundleItem = async ({
|
|
218
|
-
productId,
|
|
219
|
-
item
|
|
220
|
-
}) => {
|
|
221
|
-
return createProductBundleItemMutation({
|
|
222
|
-
variables: { productId, item },
|
|
223
|
-
refetchQueries: ["ProductBundleItems"]
|
|
224
|
-
});
|
|
225
|
-
};
|
|
226
|
-
return {
|
|
227
|
-
createProductBundleItem
|
|
228
|
-
};
|
|
229
|
-
};
|
|
230
|
-
var useCreateProductBundleItem_default = useCreateProductBundleItem;
|
|
231
|
-
var CreateProductVariationMutation = gql`
|
|
232
|
-
mutation CreateProductVariation(
|
|
233
|
-
$productId: ID!
|
|
234
|
-
$variation: CreateProductVariationInput!
|
|
235
|
-
$texts: [ProductVariationTextInput!]
|
|
236
|
-
) {
|
|
237
|
-
createProductVariation(
|
|
238
|
-
productId: $productId
|
|
239
|
-
variation: $variation
|
|
240
|
-
texts: $texts
|
|
241
|
-
) {
|
|
242
|
-
_id
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
`;
|
|
246
|
-
var useCreateProductVariation = () => {
|
|
247
|
-
const [createProductVariationMutation] = useMutation(CreateProductVariationMutation);
|
|
248
|
-
const createProductVariation = async ({
|
|
249
|
-
productId,
|
|
250
|
-
variation: { key, type },
|
|
251
|
-
texts
|
|
252
|
-
}) => {
|
|
253
|
-
return createProductVariationMutation({
|
|
254
|
-
variables: { productId, variation: { key, type }, texts },
|
|
255
|
-
refetchQueries: ["ProductVariations"]
|
|
256
|
-
});
|
|
257
|
-
};
|
|
258
|
-
return {
|
|
259
|
-
createProductVariation
|
|
260
|
-
};
|
|
261
|
-
};
|
|
262
|
-
var useCreateProductVariation_default = useCreateProductVariation;
|
|
263
|
-
var CreateProductVariationOptionMutation = gql`
|
|
264
|
-
mutation CreateProductVariationOption(
|
|
265
|
-
$productVariationId: ID!
|
|
266
|
-
$option: String!
|
|
267
|
-
$texts: [ProductVariationTextInput!]
|
|
268
|
-
) {
|
|
269
|
-
createProductVariationOption(
|
|
270
|
-
productVariationId: $productVariationId
|
|
271
|
-
option: $option
|
|
272
|
-
texts: $texts
|
|
273
|
-
) {
|
|
274
|
-
_id
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
`;
|
|
278
|
-
var useCreateProductVariationOption = () => {
|
|
279
|
-
const [createProductVariationOptionMutation] = useMutation(CreateProductVariationOptionMutation);
|
|
280
|
-
const createProductVariationOption = async ({
|
|
281
|
-
productVariationId,
|
|
282
|
-
option,
|
|
283
|
-
texts
|
|
284
|
-
}) => {
|
|
285
|
-
return createProductVariationOptionMutation({
|
|
286
|
-
variables: { productVariationId, option, texts },
|
|
287
|
-
refetchQueries: ["ProductVariations", "Product"]
|
|
288
|
-
});
|
|
289
|
-
};
|
|
290
|
-
return {
|
|
291
|
-
createProductVariationOption
|
|
292
|
-
};
|
|
293
|
-
};
|
|
294
|
-
var useCreateProductVariationOption_default = useCreateProductVariationOption;
|
|
295
|
-
var ExportTokenMutation = gql`
|
|
296
|
-
mutation ExportToken(
|
|
297
|
-
$tokenId: ID!
|
|
298
|
-
$quantity: Int! = 1
|
|
299
|
-
$recipientWalletAddress: String!
|
|
300
|
-
) {
|
|
301
|
-
exportToken(
|
|
302
|
-
tokenId: $tokenId
|
|
303
|
-
quantity: $quantity
|
|
304
|
-
recipientWalletAddress: $recipientWalletAddress
|
|
305
|
-
) {
|
|
306
|
-
...TokenFragment
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
${TokenFragment_default}
|
|
310
|
-
`;
|
|
311
|
-
var useExportToken = () => {
|
|
312
|
-
const [exportTokenMutation] = useMutation(ExportTokenMutation);
|
|
313
|
-
const exportToken = async ({
|
|
314
|
-
quantity,
|
|
315
|
-
recipientWalletAddress,
|
|
316
|
-
tokenId
|
|
317
|
-
}) => {
|
|
318
|
-
return exportTokenMutation({
|
|
319
|
-
variables: {
|
|
320
|
-
quantity,
|
|
321
|
-
recipientWalletAddress,
|
|
322
|
-
tokenId
|
|
323
|
-
}
|
|
324
|
-
});
|
|
325
|
-
};
|
|
326
|
-
return {
|
|
327
|
-
exportToken
|
|
328
|
-
};
|
|
329
|
-
};
|
|
330
|
-
var useExportToken_default = useExportToken;
|
|
331
|
-
var useMenuPosition = (active, setActive) => {
|
|
332
|
-
const menuRef = useRef(null);
|
|
333
|
-
const buttonRef = useRef(null);
|
|
334
|
-
const [position, setPosition] = useState({ top: 0, left: 0 });
|
|
335
|
-
useEffect(() => {
|
|
336
|
-
const handler = (e) => {
|
|
337
|
-
if (menuRef.current && !menuRef.current.contains(e.target)) {
|
|
338
|
-
setActive(false);
|
|
339
|
-
}
|
|
340
|
-
};
|
|
341
|
-
document.addEventListener("mousedown", handler);
|
|
342
|
-
return () => document.removeEventListener("mousedown", handler);
|
|
343
|
-
}, [setActive]);
|
|
344
|
-
useEffect(() => {
|
|
345
|
-
if (active && buttonRef.current) {
|
|
346
|
-
const rect = buttonRef.current.getBoundingClientRect();
|
|
347
|
-
const menuWidth = 192;
|
|
348
|
-
const menuHeight = 80;
|
|
349
|
-
let top = rect.bottom + 4;
|
|
350
|
-
let left = rect.right - menuWidth;
|
|
351
|
-
if (left < 8) left = 8;
|
|
352
|
-
if (top + menuHeight > window.innerHeight - 8) {
|
|
353
|
-
top = rect.top - menuHeight - 4;
|
|
354
|
-
}
|
|
355
|
-
setPosition({ top, left });
|
|
356
|
-
}
|
|
357
|
-
}, [active]);
|
|
358
|
-
return { buttonRef, menuRef, menuPosition: position };
|
|
359
|
-
};
|
|
360
|
-
|
|
361
|
-
// src/modules/product/hooks/usePrepareProductImport.ts
|
|
362
|
-
var normalizeContent = (row) => {
|
|
363
|
-
const content = {};
|
|
364
|
-
const textPrefix = "texts.";
|
|
365
|
-
Object.entries(row).forEach(([key, value]) => {
|
|
366
|
-
if (!key.startsWith(textPrefix)) return;
|
|
367
|
-
const [, locale, field] = key.split(".");
|
|
368
|
-
content[locale] ||= {};
|
|
369
|
-
if (field === "labels") {
|
|
370
|
-
content[locale][field] = value ? value.split(";") : [];
|
|
371
|
-
} else {
|
|
372
|
-
content[locale][field] = value || "";
|
|
373
|
-
}
|
|
374
|
-
});
|
|
375
|
-
return content;
|
|
376
|
-
};
|
|
377
|
-
var productMapper = (row) => {
|
|
378
|
-
const hasSupply = row["supply.weightInGram"] || row["supply.heightInMillimeters"] || row["supply.lengthInMillimeters"] || row["supply.widthInMillimeters"];
|
|
379
|
-
const hasWarehousing = row["sku"] || row["baseUnit"];
|
|
380
|
-
const content = normalizeContent(row);
|
|
381
|
-
const meta = parseMeta_default(row["meta"]);
|
|
382
|
-
const mapped = {
|
|
383
|
-
_id: row["_id"] || void 0,
|
|
384
|
-
warehousing: hasWarehousing ? {
|
|
385
|
-
sku: row["sku"] || void 0,
|
|
386
|
-
baseUnit: row["baseUnit"] || void 0
|
|
387
|
-
} : void 0,
|
|
388
|
-
sequence: typeof row["sequence"] === "string" ? parseInt(row["sequence"] || "0", 10) : row["sequence"] || 0,
|
|
389
|
-
status: row["status"] || null,
|
|
390
|
-
type: row["type"],
|
|
391
|
-
tags: row["tags"] ? row["tags"].split(";") : [],
|
|
392
|
-
updated: row["updated"] || void 0,
|
|
393
|
-
published: row["published"] || void 0,
|
|
394
|
-
content,
|
|
395
|
-
supply: hasSupply ? {
|
|
396
|
-
weightInGram: row["supply.weightInGram"] ? parseFloat(row["supply.weightInGram"]) ?? void 0 : void 0,
|
|
397
|
-
heightInMillimeters: row["supply.heightInMillimeters"] ? parseFloat(row["supply.heightInMillimeters"]) ?? void 0 : void 0,
|
|
398
|
-
lengthInMillimeters: row["supply.lengthInMillimeters"] ? parseFloat(row["supply.lengthInMillimeters"]) ?? void 0 : void 0,
|
|
399
|
-
widthInMillimeters: row["supply.widthInMillimeters"] ? parseFloat(row["supply.widthInMillimeters"]) ?? void 0 : void 0
|
|
400
|
-
} : void 0,
|
|
401
|
-
meta
|
|
402
|
-
};
|
|
403
|
-
return mapped;
|
|
404
|
-
};
|
|
405
|
-
var buildProductEvents = ({
|
|
406
|
-
variations = [],
|
|
407
|
-
...product
|
|
408
|
-
}) => {
|
|
409
|
-
const now = /* @__PURE__ */ new Date();
|
|
410
|
-
return {
|
|
411
|
-
entity: "PRODUCT",
|
|
412
|
-
operation: "CREATE",
|
|
413
|
-
payload: {
|
|
414
|
-
_id: product._id,
|
|
415
|
-
specification: {
|
|
416
|
-
...product,
|
|
417
|
-
published: product.status === "ACTIVE" ? now : null,
|
|
418
|
-
status: product.status === "ACTIVE" ? "ACTIVE" : null,
|
|
419
|
-
warehousing: {
|
|
420
|
-
sku: product.sku,
|
|
421
|
-
baseUnit: product.baseUnit
|
|
422
|
-
},
|
|
423
|
-
commerce: product.commerce ? { pricing: product.commerce } : void 0,
|
|
424
|
-
bundleItems: product?.bundleItems
|
|
425
|
-
},
|
|
426
|
-
variations: variations?.length ? variations : void 0
|
|
427
|
-
}
|
|
428
|
-
};
|
|
429
|
-
};
|
|
430
|
-
var usePrepareProductImport = () => {
|
|
431
|
-
const prepareProductImport = async ({
|
|
432
|
-
productsCSV,
|
|
433
|
-
pricesCSV,
|
|
434
|
-
bundleItemsCSV,
|
|
435
|
-
variationsCSV,
|
|
436
|
-
variationOptionsCSV
|
|
437
|
-
}) => {
|
|
438
|
-
return (productsCSV || []).map((product) => {
|
|
439
|
-
const prices = (pricesCSV || []).filter(
|
|
440
|
-
(option) => option["productId"] === product._id
|
|
441
|
-
);
|
|
442
|
-
const bundles = (bundleItemsCSV || []).filter(
|
|
443
|
-
(item) => item["productId"] === product._id
|
|
444
|
-
);
|
|
445
|
-
const productVariations = (variationsCSV || []).filter(
|
|
446
|
-
(item) => item["productId"] === product._id
|
|
447
|
-
);
|
|
448
|
-
let price = void 0;
|
|
449
|
-
let bundleItems = void 0;
|
|
450
|
-
let variations = void 0;
|
|
451
|
-
if (prices.length)
|
|
452
|
-
price = prices.map(
|
|
453
|
-
({ amount, minQuantity, isNetPrice, isTaxable, ...restPrice }) => ({
|
|
454
|
-
...restPrice,
|
|
455
|
-
amount: parseInt(amount) ?? 0,
|
|
456
|
-
isNetPrice: isNetPrice === "true",
|
|
457
|
-
isTaxable: isTaxable === "true",
|
|
458
|
-
minQuantity: parseInt(minQuantity, 10) || 0
|
|
459
|
-
})
|
|
460
|
-
);
|
|
461
|
-
if (bundles.length)
|
|
462
|
-
bundleItems = bundles.map(
|
|
463
|
-
({ bundleItemProductId, quantity, configuration }) => ({
|
|
464
|
-
productId: bundleItemProductId,
|
|
465
|
-
quantity: Number(quantity || 1),
|
|
466
|
-
configuration: (configuration || "").split(";").map((v) => {
|
|
467
|
-
const [key, value] = v.split(":");
|
|
468
|
-
return { key, value };
|
|
469
|
-
})
|
|
470
|
-
})
|
|
471
|
-
);
|
|
472
|
-
if (productVariations.length)
|
|
473
|
-
variations = productVariations.map(
|
|
474
|
-
({ variationId, type, key, configuration, ...row }) => ({
|
|
475
|
-
variationId,
|
|
476
|
-
key,
|
|
477
|
-
type,
|
|
478
|
-
content: normalizeContent(row),
|
|
479
|
-
options: (variationOptionsCSV || []).filter((o) => o.variationId === variationId).map((o) => ({
|
|
480
|
-
value: o?.value ?? "",
|
|
481
|
-
content: normalizeContent(o)
|
|
482
|
-
}))
|
|
483
|
-
})
|
|
484
|
-
);
|
|
485
|
-
return buildProductEvents({
|
|
486
|
-
...productMapper(product),
|
|
487
|
-
commerce: price,
|
|
488
|
-
bundleItems,
|
|
489
|
-
variations
|
|
490
|
-
});
|
|
491
|
-
});
|
|
492
|
-
};
|
|
493
|
-
return { prepareProductImport };
|
|
494
|
-
};
|
|
495
|
-
var usePrepareProductImport_default = usePrepareProductImport;
|
|
496
|
-
var GetProductQuery = (inlineFragment = "") => gql`
|
|
497
|
-
query Product($productId: ID, $slug: String) {
|
|
498
|
-
product(productId: $productId, slug: $slug) {
|
|
499
|
-
...ProductDetailFragment
|
|
500
|
-
${inlineFragment}
|
|
501
|
-
texts {
|
|
502
|
-
_id
|
|
503
|
-
title
|
|
504
|
-
subtitle
|
|
505
|
-
description
|
|
506
|
-
}
|
|
507
|
-
... on SimpleProduct {
|
|
508
|
-
texts {
|
|
509
|
-
_id
|
|
510
|
-
title
|
|
511
|
-
subtitle
|
|
512
|
-
description
|
|
513
|
-
}
|
|
514
|
-
proxies {
|
|
515
|
-
__typename
|
|
516
|
-
}
|
|
517
|
-
}
|
|
518
|
-
... on ConfigurableProduct {
|
|
519
|
-
texts {
|
|
520
|
-
_id
|
|
521
|
-
title
|
|
522
|
-
subtitle
|
|
523
|
-
description
|
|
524
|
-
}
|
|
525
|
-
}
|
|
526
|
-
... on PlanProduct {
|
|
527
|
-
texts {
|
|
528
|
-
_id
|
|
529
|
-
title
|
|
530
|
-
subtitle
|
|
531
|
-
description
|
|
532
|
-
}
|
|
533
|
-
proxies {
|
|
534
|
-
__typename
|
|
535
|
-
}
|
|
536
|
-
}
|
|
537
|
-
... on BundleProduct {
|
|
538
|
-
texts {
|
|
539
|
-
_id
|
|
540
|
-
title
|
|
541
|
-
subtitle
|
|
542
|
-
description
|
|
543
|
-
}
|
|
544
|
-
proxies {
|
|
545
|
-
__typename
|
|
546
|
-
}
|
|
547
|
-
}
|
|
548
|
-
}
|
|
549
|
-
}
|
|
550
|
-
${ProductDetailFragment_default}
|
|
551
|
-
`;
|
|
552
|
-
var useProduct = ({
|
|
553
|
-
productId: id = null,
|
|
554
|
-
slug = null
|
|
555
|
-
} = {}) => {
|
|
556
|
-
const parsedId = parseUniqueId(slug);
|
|
557
|
-
const { customProperties, hydrateFragment } = useUnchainedContext_default();
|
|
558
|
-
const { data, loading, error } = useQuery(GetProductQuery(customProperties?.Product), {
|
|
559
|
-
skip: !id && !parsedId,
|
|
560
|
-
variables: { productId: id || parsedId }
|
|
561
|
-
});
|
|
562
|
-
const extendedData = hydrateFragment(
|
|
563
|
-
customProperties?.Product,
|
|
564
|
-
data?.product
|
|
565
|
-
);
|
|
566
|
-
return {
|
|
567
|
-
product: data?.product,
|
|
568
|
-
loading,
|
|
569
|
-
error,
|
|
570
|
-
extendedData
|
|
571
|
-
};
|
|
572
|
-
};
|
|
573
|
-
var useProduct_default = useProduct;
|
|
574
|
-
var ProductAssignmentFragment = gql`
|
|
575
|
-
fragment ProductAssignmentFragment on ProductVariationAssignment {
|
|
576
|
-
_id
|
|
577
|
-
vectors {
|
|
578
|
-
_id
|
|
579
|
-
option {
|
|
580
|
-
_id
|
|
581
|
-
value
|
|
582
|
-
texts {
|
|
583
|
-
_id
|
|
584
|
-
title
|
|
585
|
-
subtitle
|
|
586
|
-
}
|
|
587
|
-
}
|
|
588
|
-
variation {
|
|
589
|
-
_id
|
|
590
|
-
key
|
|
591
|
-
texts {
|
|
592
|
-
_id
|
|
593
|
-
locale
|
|
594
|
-
title
|
|
595
|
-
}
|
|
596
|
-
}
|
|
597
|
-
}
|
|
598
|
-
product {
|
|
599
|
-
_id
|
|
600
|
-
texts {
|
|
601
|
-
_id
|
|
602
|
-
title
|
|
603
|
-
slug
|
|
604
|
-
subtitle
|
|
605
|
-
}
|
|
606
|
-
}
|
|
607
|
-
}
|
|
608
|
-
`;
|
|
609
|
-
var ProductAssignmentFragment_default = ProductAssignmentFragment;
|
|
610
|
-
|
|
611
|
-
// src/modules/product/hooks/useProductAssignments.ts
|
|
612
|
-
var ProductAssignmentQuery = gql`
|
|
613
|
-
query ProductAssignments($productId: ID, $slug: String) {
|
|
614
|
-
product(productId: $productId, slug: $slug) {
|
|
615
|
-
_id
|
|
616
|
-
... on ConfigurableProduct {
|
|
617
|
-
texts {
|
|
618
|
-
_id
|
|
619
|
-
subtitle
|
|
620
|
-
slug
|
|
621
|
-
title
|
|
622
|
-
}
|
|
623
|
-
variations {
|
|
624
|
-
_id
|
|
625
|
-
key
|
|
626
|
-
texts {
|
|
627
|
-
_id
|
|
628
|
-
title
|
|
629
|
-
}
|
|
630
|
-
options {
|
|
631
|
-
_id
|
|
632
|
-
value
|
|
633
|
-
texts {
|
|
634
|
-
_id
|
|
635
|
-
title
|
|
636
|
-
}
|
|
637
|
-
}
|
|
638
|
-
}
|
|
639
|
-
assignments(includeInactive: true) {
|
|
640
|
-
...ProductAssignmentFragment
|
|
641
|
-
}
|
|
642
|
-
}
|
|
643
|
-
}
|
|
644
|
-
}
|
|
645
|
-
${ProductAssignmentFragment_default}
|
|
646
|
-
`;
|
|
647
|
-
var useProductAssignments = ({
|
|
648
|
-
productId: id = null,
|
|
649
|
-
slug = null
|
|
650
|
-
} = {}) => {
|
|
651
|
-
const parsedId = parseUniqueId(slug);
|
|
652
|
-
const { data, loading, error } = useQuery(ProductAssignmentQuery, {
|
|
653
|
-
skip: !id && !parsedId,
|
|
654
|
-
variables: { productId: id || parsedId }
|
|
655
|
-
});
|
|
656
|
-
const product = data?.product;
|
|
657
|
-
return {
|
|
658
|
-
product,
|
|
659
|
-
loading,
|
|
660
|
-
error
|
|
661
|
-
};
|
|
662
|
-
};
|
|
663
|
-
var useProductAssignments_default = useProductAssignments;
|
|
664
|
-
var ProductBundleItemQuery = gql`
|
|
665
|
-
query ProductBundleItems(
|
|
666
|
-
$productId: ID
|
|
667
|
-
$slug: String
|
|
668
|
-
$forceLocale: Locale
|
|
669
|
-
) {
|
|
670
|
-
product(productId: $productId, slug: $slug) {
|
|
671
|
-
_id
|
|
672
|
-
... on BundleProduct {
|
|
673
|
-
bundleItems {
|
|
674
|
-
product {
|
|
675
|
-
...ProductBriefFragment
|
|
676
|
-
}
|
|
677
|
-
quantity
|
|
678
|
-
}
|
|
679
|
-
}
|
|
680
|
-
}
|
|
681
|
-
}
|
|
682
|
-
${ProductBriefFragment_default}
|
|
683
|
-
`;
|
|
684
|
-
var useProductBundleItems = ({
|
|
685
|
-
productId: id = null,
|
|
686
|
-
slug = null
|
|
687
|
-
} = {}) => {
|
|
688
|
-
const { selectedLocale } = useApp_default();
|
|
689
|
-
const parsedId = parseUniqueId(slug);
|
|
690
|
-
const { data, loading, error } = useQuery(ProductBundleItemQuery, {
|
|
691
|
-
skip: !id && !parsedId,
|
|
692
|
-
variables: { productId: id || parsedId, forceLocale: selectedLocale },
|
|
693
|
-
context: {
|
|
694
|
-
headers: {
|
|
695
|
-
forceLocale: selectedLocale
|
|
696
|
-
}
|
|
697
|
-
}
|
|
698
|
-
});
|
|
699
|
-
const bundleItems = data?.product?.bundleItems || [];
|
|
700
|
-
return {
|
|
701
|
-
bundleItems,
|
|
702
|
-
loading,
|
|
703
|
-
error
|
|
704
|
-
};
|
|
705
|
-
};
|
|
706
|
-
var useProductBundleItems_default = useProductBundleItems;
|
|
707
|
-
var ProductCatalogPriceFragment = gql`
|
|
708
|
-
fragment ProductCatalogPriceFragment on ProductCatalogPrice {
|
|
709
|
-
isTaxable
|
|
710
|
-
isNetPrice
|
|
711
|
-
country {
|
|
712
|
-
_id
|
|
713
|
-
isoCode
|
|
714
|
-
name
|
|
715
|
-
flagEmoji
|
|
716
|
-
}
|
|
717
|
-
currency {
|
|
718
|
-
_id
|
|
719
|
-
isoCode
|
|
720
|
-
isActive
|
|
721
|
-
}
|
|
722
|
-
amount
|
|
723
|
-
minQuantity
|
|
724
|
-
}
|
|
725
|
-
`;
|
|
726
|
-
var ProductCatalogPriceFragment_default = ProductCatalogPriceFragment;
|
|
727
|
-
|
|
728
|
-
// src/modules/product/hooks/useProductCatalogPrices.ts
|
|
729
|
-
var ProductCatalogPricesQuery = gql`
|
|
730
|
-
query ProductCatalogPrices($productId: ID!) {
|
|
731
|
-
productCatalogPrices(productId: $productId) {
|
|
732
|
-
...ProductCatalogPriceFragment
|
|
733
|
-
}
|
|
734
|
-
}
|
|
735
|
-
${ProductCatalogPriceFragment_default}
|
|
736
|
-
`;
|
|
737
|
-
var useProductCatalogPrices = ({
|
|
738
|
-
productId
|
|
739
|
-
}) => {
|
|
740
|
-
const { data, loading, error } = useQuery(ProductCatalogPricesQuery, {
|
|
741
|
-
skip: !productId,
|
|
742
|
-
variables: {
|
|
743
|
-
productId
|
|
744
|
-
}
|
|
745
|
-
});
|
|
746
|
-
const catalogPrices = data?.productCatalogPrices || [];
|
|
747
|
-
return {
|
|
748
|
-
catalogPrices,
|
|
749
|
-
loading,
|
|
750
|
-
error
|
|
751
|
-
};
|
|
752
|
-
};
|
|
753
|
-
var useProductCatalogPrices_default = useProductCatalogPrices;
|
|
754
|
-
var ProductMediaFragment = gql`
|
|
755
|
-
fragment ProductMediaFragment on ProductMedia {
|
|
756
|
-
_id
|
|
757
|
-
tags
|
|
758
|
-
file {
|
|
759
|
-
_id
|
|
760
|
-
name
|
|
761
|
-
type
|
|
762
|
-
size
|
|
763
|
-
url
|
|
764
|
-
}
|
|
765
|
-
sortKey
|
|
766
|
-
texts {
|
|
767
|
-
_id
|
|
768
|
-
locale
|
|
769
|
-
title
|
|
770
|
-
subtitle
|
|
771
|
-
}
|
|
772
|
-
}
|
|
773
|
-
`;
|
|
774
|
-
var ProductMediaFragment_default = ProductMediaFragment;
|
|
775
|
-
|
|
776
|
-
// src/modules/product/hooks/useProductMedia.ts
|
|
777
|
-
var ProductMediaQuery = gql`
|
|
778
|
-
query ProductMedia($productId: ID, $slug: String) {
|
|
779
|
-
product(productId: $productId, slug: $slug) {
|
|
780
|
-
_id
|
|
781
|
-
media {
|
|
782
|
-
...ProductMediaFragment
|
|
783
|
-
}
|
|
784
|
-
}
|
|
785
|
-
}
|
|
786
|
-
${ProductMediaFragment_default}
|
|
787
|
-
`;
|
|
788
|
-
var useProductMedia = ({
|
|
789
|
-
productId: id = null,
|
|
790
|
-
slug = null
|
|
791
|
-
} = {}) => {
|
|
792
|
-
const parsedId = parseUniqueId(slug);
|
|
793
|
-
const { data, loading, error } = useQuery(ProductMediaQuery, {
|
|
794
|
-
skip: !id && !parsedId,
|
|
795
|
-
variables: { productId: id || parsedId }
|
|
796
|
-
});
|
|
797
|
-
const productMedia = data?.product?.media || [];
|
|
798
|
-
return {
|
|
799
|
-
productMedia,
|
|
800
|
-
loading,
|
|
801
|
-
error
|
|
802
|
-
};
|
|
803
|
-
};
|
|
804
|
-
var useProductMedia_default = useProductMedia;
|
|
805
|
-
var ProductPlanConfigurationFragment = gql`
|
|
806
|
-
fragment ProductPlanConfigurationFragment on ProductPlanConfiguration {
|
|
807
|
-
usageCalculationType
|
|
808
|
-
billingInterval
|
|
809
|
-
trialInterval
|
|
810
|
-
trialIntervalCount
|
|
811
|
-
billingIntervalCount
|
|
812
|
-
}
|
|
813
|
-
`;
|
|
814
|
-
var ProductPlanConfigurationFragment_default = ProductPlanConfigurationFragment;
|
|
815
|
-
|
|
816
|
-
// src/modules/product/hooks/useProductPlan.ts
|
|
817
|
-
var ProductPlanQuery = gql`
|
|
818
|
-
query ProductPlan($productId: ID, $slug: String) {
|
|
819
|
-
product(productId: $productId, slug: $slug) {
|
|
820
|
-
_id
|
|
821
|
-
... on PlanProduct {
|
|
822
|
-
plan {
|
|
823
|
-
...ProductPlanConfigurationFragment
|
|
824
|
-
}
|
|
825
|
-
}
|
|
826
|
-
}
|
|
827
|
-
}
|
|
828
|
-
${ProductPlanConfigurationFragment_default}
|
|
829
|
-
`;
|
|
830
|
-
var useProductPlan = ({
|
|
831
|
-
productId: id = null,
|
|
832
|
-
slug = null
|
|
833
|
-
} = {}) => {
|
|
834
|
-
const parsedId = parseUniqueId(slug);
|
|
835
|
-
const { data, loading, error } = useQuery(ProductPlanQuery, {
|
|
836
|
-
skip: !id && !parsedId,
|
|
837
|
-
variables: {
|
|
838
|
-
productId: id || parsedId
|
|
839
|
-
}
|
|
840
|
-
});
|
|
841
|
-
const product = data?.product;
|
|
842
|
-
return {
|
|
843
|
-
plan: product?.plan,
|
|
844
|
-
loading,
|
|
845
|
-
error
|
|
846
|
-
};
|
|
847
|
-
};
|
|
848
|
-
var useProductPlan_default = useProductPlan;
|
|
849
|
-
var ProductPlanConfigurationOptionsQuery = gql`
|
|
850
|
-
query ProductPlanConfigurationOptions {
|
|
851
|
-
usageCalculationTypes: __type(name: "ProductPlanUsageCalculationType") {
|
|
852
|
-
options: enumValues {
|
|
853
|
-
value: name
|
|
854
|
-
label: description
|
|
855
|
-
}
|
|
856
|
-
}
|
|
857
|
-
configurationIntervals: __type(name: "ProductPlanConfigurationInterval") {
|
|
858
|
-
options: enumValues {
|
|
859
|
-
value: name
|
|
860
|
-
label: description
|
|
861
|
-
}
|
|
862
|
-
}
|
|
863
|
-
}
|
|
864
|
-
`;
|
|
865
|
-
var useProductPlanConfigurationOptions = () => {
|
|
866
|
-
const { data, loading, error } = useQuery(ProductPlanConfigurationOptionsQuery);
|
|
867
|
-
const usageCalculationTypes = data?.usageCalculationTypes?.options || [];
|
|
868
|
-
const configurationIntervals = data?.configurationIntervals?.options || [];
|
|
869
|
-
return {
|
|
870
|
-
configurationIntervals,
|
|
871
|
-
usageCalculationTypes,
|
|
872
|
-
loading,
|
|
873
|
-
error
|
|
874
|
-
};
|
|
875
|
-
};
|
|
876
|
-
var useProductPlanConfigurationOptions_default = useProductPlanConfigurationOptions;
|
|
877
|
-
var ProductReviewQuery = gql`
|
|
878
|
-
query ProductReviews(
|
|
879
|
-
$queryString: String
|
|
880
|
-
$limit: Int
|
|
881
|
-
$offset: Int
|
|
882
|
-
$sort: [SortOptionInput!]
|
|
883
|
-
$forceLocale: Locale
|
|
884
|
-
) {
|
|
885
|
-
productReviews(
|
|
886
|
-
queryString: $queryString
|
|
887
|
-
limit: $limit
|
|
888
|
-
offset: $offset
|
|
889
|
-
sort: $sort
|
|
890
|
-
) {
|
|
891
|
-
...ProductReviewDetailFragment
|
|
892
|
-
}
|
|
893
|
-
}
|
|
894
|
-
${ProductReviewDetailFragment_default}
|
|
895
|
-
`;
|
|
896
|
-
var useProductReviews = ({
|
|
897
|
-
queryString = "",
|
|
898
|
-
limit = 10,
|
|
899
|
-
offset = 0,
|
|
900
|
-
sort: sortOptions = []
|
|
901
|
-
} = {}) => {
|
|
902
|
-
const { selectedLocale } = useApp_default();
|
|
903
|
-
const { data, loading, error } = useQuery(ProductReviewQuery, {
|
|
904
|
-
variables: {
|
|
905
|
-
queryString,
|
|
906
|
-
limit: limit || 10,
|
|
907
|
-
offset: offset || 0,
|
|
908
|
-
sort: sortOptions?.length ? sortOptions : [{ key: "created", value: "DESC" /* Desc */ }],
|
|
909
|
-
forceLocale: selectedLocale
|
|
910
|
-
}
|
|
911
|
-
});
|
|
912
|
-
const reviews = data?.productReviews || [];
|
|
913
|
-
return {
|
|
914
|
-
reviews,
|
|
915
|
-
loading,
|
|
916
|
-
error
|
|
917
|
-
};
|
|
918
|
-
};
|
|
919
|
-
var useProductReviews_default = useProductReviews;
|
|
920
|
-
var ProductDimensionFragment = gql`
|
|
921
|
-
fragment ProductDimensionFragment on Dimensions {
|
|
922
|
-
weight(unit: GRAM)
|
|
923
|
-
length(unit: MILLIMETERS)
|
|
924
|
-
width(unit: MILLIMETERS)
|
|
925
|
-
height(unit: MILLIMETERS)
|
|
926
|
-
}
|
|
927
|
-
`;
|
|
928
|
-
var ProductDimensionFragment_default = ProductDimensionFragment;
|
|
929
|
-
|
|
930
|
-
// src/modules/product/hooks/useProductSupply.ts
|
|
931
|
-
var ProductSupplyQuery = gql`
|
|
932
|
-
query ProductSupply($productId: ID, $slug: String) {
|
|
933
|
-
product(productId: $productId, slug: $slug) {
|
|
934
|
-
_id
|
|
935
|
-
... on SimpleProduct {
|
|
936
|
-
dimensions {
|
|
937
|
-
...ProductDimensionFragment
|
|
938
|
-
}
|
|
939
|
-
}
|
|
940
|
-
}
|
|
941
|
-
}
|
|
942
|
-
${ProductDimensionFragment_default}
|
|
943
|
-
`;
|
|
944
|
-
var useProductSupply = ({
|
|
945
|
-
productId: id = null,
|
|
946
|
-
slug = null
|
|
947
|
-
} = {}) => {
|
|
948
|
-
const parsedId = parseUniqueId(slug);
|
|
949
|
-
const { data, loading, error } = useQuery(ProductSupplyQuery, {
|
|
950
|
-
skip: !id && !slug,
|
|
951
|
-
variables: {
|
|
952
|
-
productId: id || parsedId
|
|
953
|
-
}
|
|
954
|
-
});
|
|
955
|
-
const product = data?.product;
|
|
956
|
-
const dimensions = product?.dimensions || {};
|
|
957
|
-
return {
|
|
958
|
-
dimensions,
|
|
959
|
-
loading,
|
|
960
|
-
error
|
|
961
|
-
};
|
|
962
|
-
};
|
|
963
|
-
var useProductSupply_default = useProductSupply;
|
|
964
|
-
var ProductTokenizationQuery = gql`
|
|
965
|
-
query ProductTokenization($productId: ID, $slug: String) {
|
|
966
|
-
product(productId: $productId, slug: $slug) {
|
|
967
|
-
_id
|
|
968
|
-
... on TokenizedProduct {
|
|
969
|
-
contractConfiguration {
|
|
970
|
-
tokenId
|
|
971
|
-
supply
|
|
972
|
-
}
|
|
973
|
-
contractStandard
|
|
974
|
-
contractAddress
|
|
975
|
-
}
|
|
976
|
-
}
|
|
977
|
-
}
|
|
978
|
-
`;
|
|
979
|
-
var useProductTokenization = ({
|
|
980
|
-
productId: id = null,
|
|
981
|
-
slug = null
|
|
982
|
-
} = {}) => {
|
|
983
|
-
const parsedId = parseUniqueId(slug);
|
|
984
|
-
const { data, loading, error } = useQuery(ProductTokenizationQuery, {
|
|
985
|
-
skip: !id && !slug,
|
|
986
|
-
variables: {
|
|
987
|
-
productId: id || parsedId
|
|
988
|
-
}
|
|
989
|
-
});
|
|
990
|
-
const product = data?.product;
|
|
991
|
-
return {
|
|
992
|
-
product,
|
|
993
|
-
loading,
|
|
994
|
-
error
|
|
995
|
-
};
|
|
996
|
-
};
|
|
997
|
-
var useProductTokenization_default = useProductTokenization;
|
|
998
|
-
var ProductVariationTypesQuery = gql`
|
|
999
|
-
query ProductVariationType {
|
|
1000
|
-
variationTypes: __type(name: "ProductVariationType") {
|
|
1001
|
-
options: enumValues {
|
|
1002
|
-
value: name
|
|
1003
|
-
label: description
|
|
1004
|
-
}
|
|
1005
|
-
}
|
|
1006
|
-
}
|
|
1007
|
-
`;
|
|
1008
|
-
var useProductVariationTypes = () => {
|
|
1009
|
-
const { data, loading, error } = useQuery(ProductVariationTypesQuery);
|
|
1010
|
-
const variationTypes = data?.variationTypes?.options || [];
|
|
1011
|
-
return {
|
|
1012
|
-
variationTypes,
|
|
1013
|
-
loading,
|
|
1014
|
-
error
|
|
1015
|
-
};
|
|
1016
|
-
};
|
|
1017
|
-
var useProductVariationTypes_default = useProductVariationTypes;
|
|
1018
|
-
var ProductVariationFragment = gql`
|
|
1019
|
-
fragment ProductVariationFragment on ProductVariation {
|
|
1020
|
-
_id
|
|
1021
|
-
type
|
|
1022
|
-
key
|
|
1023
|
-
texts(forceLocale: $locale) {
|
|
1024
|
-
_id
|
|
1025
|
-
locale
|
|
1026
|
-
title
|
|
1027
|
-
subtitle
|
|
1028
|
-
}
|
|
1029
|
-
options {
|
|
1030
|
-
_id
|
|
1031
|
-
texts(forceLocale: $locale) {
|
|
1032
|
-
_id
|
|
1033
|
-
locale
|
|
1034
|
-
title
|
|
1035
|
-
subtitle
|
|
1036
|
-
}
|
|
1037
|
-
value
|
|
1038
|
-
}
|
|
1039
|
-
}
|
|
1040
|
-
`;
|
|
1041
|
-
var ProductVariationFragment_default = ProductVariationFragment;
|
|
1042
|
-
|
|
1043
|
-
// src/modules/product/hooks/useProductVariations.ts
|
|
1044
|
-
var ProductVariationQuery = gql`
|
|
1045
|
-
query ProductVariations($productId: ID, $slug: String, $locale: Locale) {
|
|
1046
|
-
product(productId: $productId, slug: $slug) {
|
|
1047
|
-
_id
|
|
1048
|
-
... on ConfigurableProduct {
|
|
1049
|
-
variations {
|
|
1050
|
-
...ProductVariationFragment
|
|
1051
|
-
}
|
|
1052
|
-
}
|
|
1053
|
-
}
|
|
1054
|
-
}
|
|
1055
|
-
${ProductVariationFragment_default}
|
|
1056
|
-
`;
|
|
1057
|
-
var useProductVariations = ({
|
|
1058
|
-
productId: id = null,
|
|
1059
|
-
slug = null,
|
|
1060
|
-
locale = null
|
|
1061
|
-
} = {}) => {
|
|
1062
|
-
const parsedId = parseUniqueId(slug);
|
|
1063
|
-
const { data, loading, error } = useQuery(ProductVariationQuery, {
|
|
1064
|
-
skip: !id && !parsedId,
|
|
1065
|
-
variables: { productId: id || parsedId, locale }
|
|
1066
|
-
});
|
|
1067
|
-
const product = data?.product;
|
|
1068
|
-
const variations = product?.variations;
|
|
1069
|
-
return {
|
|
1070
|
-
variations,
|
|
1071
|
-
loading,
|
|
1072
|
-
error
|
|
1073
|
-
};
|
|
1074
|
-
};
|
|
1075
|
-
var useProductVariations_default = useProductVariations;
|
|
1076
|
-
var ProductWarehousingQuery = gql`
|
|
1077
|
-
query ProductWarehousing($productId: ID, $slug: String) {
|
|
1078
|
-
product(productId: $productId, slug: $slug) {
|
|
1079
|
-
_id
|
|
1080
|
-
... on SimpleProduct {
|
|
1081
|
-
sku
|
|
1082
|
-
baseUnit
|
|
1083
|
-
}
|
|
1084
|
-
}
|
|
1085
|
-
}
|
|
1086
|
-
`;
|
|
1087
|
-
var useProductWarehousing = ({
|
|
1088
|
-
productId: id = null,
|
|
1089
|
-
slug = null
|
|
1090
|
-
} = {}) => {
|
|
1091
|
-
const parsedId = parseUniqueId(slug);
|
|
1092
|
-
const { data, loading, error } = useQuery(ProductWarehousingQuery, {
|
|
1093
|
-
skip: !id && !parsedId,
|
|
1094
|
-
variables: {
|
|
1095
|
-
productId: id || parsedId
|
|
1096
|
-
}
|
|
1097
|
-
});
|
|
1098
|
-
const product = data?.product || {};
|
|
1099
|
-
return {
|
|
1100
|
-
product,
|
|
1101
|
-
loading,
|
|
1102
|
-
error
|
|
1103
|
-
};
|
|
1104
|
-
};
|
|
1105
|
-
var useProductWarehousing_default = useProductWarehousing;
|
|
1106
|
-
var ProductsQuery = gql`
|
|
1107
|
-
query Products(
|
|
1108
|
-
$queryString: String
|
|
1109
|
-
$tags: [LowerCaseString!]
|
|
1110
|
-
$slugs: [String!]
|
|
1111
|
-
$limit: Int
|
|
1112
|
-
$offset: Int
|
|
1113
|
-
$includeDrafts: Boolean
|
|
1114
|
-
$sort: [SortOptionInput!]
|
|
1115
|
-
$forceLocale: Locale
|
|
1116
|
-
) {
|
|
1117
|
-
products(
|
|
1118
|
-
queryString: $queryString
|
|
1119
|
-
tags: $tags
|
|
1120
|
-
slugs: $slugs
|
|
1121
|
-
limit: $limit
|
|
1122
|
-
offset: $offset
|
|
1123
|
-
includeDrafts: $includeDrafts
|
|
1124
|
-
sort: $sort
|
|
1125
|
-
) {
|
|
1126
|
-
...ProductBriefFragment
|
|
1127
|
-
... on SimpleProduct {
|
|
1128
|
-
sku
|
|
1129
|
-
baseUnit
|
|
1130
|
-
dimensions {
|
|
1131
|
-
...ProductDimensionFragment
|
|
1132
|
-
}
|
|
1133
|
-
}
|
|
1134
|
-
}
|
|
1135
|
-
productsCount(
|
|
1136
|
-
tags: $tags
|
|
1137
|
-
slugs: $slugs
|
|
1138
|
-
includeDrafts: $includeDrafts
|
|
1139
|
-
queryString: $queryString
|
|
1140
|
-
)
|
|
1141
|
-
}
|
|
1142
|
-
${ProductDimensionFragment_default}
|
|
1143
|
-
${ProductBriefFragment_default}
|
|
1144
|
-
`;
|
|
1145
|
-
var useProducts = ({
|
|
1146
|
-
queryString = "",
|
|
1147
|
-
limit = 20,
|
|
1148
|
-
offset = 0,
|
|
1149
|
-
tags = null,
|
|
1150
|
-
includeDrafts = true,
|
|
1151
|
-
slugs = null,
|
|
1152
|
-
sort: sortOptions = [],
|
|
1153
|
-
forceLocale = ""
|
|
1154
|
-
} = {}) => {
|
|
1155
|
-
const { data, loading, error, fetchMore, client } = useQuery(ProductsQuery, {
|
|
1156
|
-
context: {
|
|
1157
|
-
headers: {
|
|
1158
|
-
forceLocale
|
|
1159
|
-
}
|
|
1160
|
-
},
|
|
1161
|
-
variables: {
|
|
1162
|
-
queryString,
|
|
1163
|
-
limit,
|
|
1164
|
-
offset,
|
|
1165
|
-
includeDrafts,
|
|
1166
|
-
tags,
|
|
1167
|
-
slugs,
|
|
1168
|
-
sort: sortOptions.length ? sortOptions : [{ key: "sequence", value: "ASC" }]
|
|
1169
|
-
}
|
|
1170
|
-
});
|
|
1171
|
-
const products = data?.products || [];
|
|
1172
|
-
const productsCount = data?.productsCount;
|
|
1173
|
-
const hasMore = products?.length < productsCount;
|
|
1174
|
-
const loadMore = () => {
|
|
1175
|
-
fetchMore({
|
|
1176
|
-
variables: { offset: products.length }
|
|
1177
|
-
});
|
|
1178
|
-
};
|
|
1179
|
-
return {
|
|
1180
|
-
products,
|
|
1181
|
-
productsCount,
|
|
1182
|
-
hasMore,
|
|
1183
|
-
loading,
|
|
1184
|
-
error,
|
|
1185
|
-
loadMore,
|
|
1186
|
-
client
|
|
1187
|
-
};
|
|
1188
|
-
};
|
|
1189
|
-
var useProducts_default = useProducts;
|
|
1190
|
-
var ProductsCountQuery = gql`
|
|
1191
|
-
query ProductsCount(
|
|
1192
|
-
$queryString: String
|
|
1193
|
-
$tags: [LowerCaseString!]
|
|
1194
|
-
$slugs: [String!]
|
|
1195
|
-
$includeDrafts: Boolean
|
|
1196
|
-
) {
|
|
1197
|
-
productsCount(
|
|
1198
|
-
tags: $tags
|
|
1199
|
-
slugs: $slugs
|
|
1200
|
-
includeDrafts: $includeDrafts
|
|
1201
|
-
queryString: $queryString
|
|
1202
|
-
)
|
|
1203
|
-
}
|
|
1204
|
-
`;
|
|
1205
|
-
var useProductsCount = ({
|
|
1206
|
-
queryString = "",
|
|
1207
|
-
tags = null,
|
|
1208
|
-
includeDrafts = true
|
|
1209
|
-
}) => {
|
|
1210
|
-
const { data, loading, error } = useQuery(ProductsCountQuery, {
|
|
1211
|
-
errorPolicy: "all",
|
|
1212
|
-
variables: {
|
|
1213
|
-
queryString,
|
|
1214
|
-
includeDrafts,
|
|
1215
|
-
tags
|
|
1216
|
-
}
|
|
1217
|
-
});
|
|
1218
|
-
const productsCount = data?.productsCount;
|
|
1219
|
-
return {
|
|
1220
|
-
productsCount,
|
|
1221
|
-
loading,
|
|
1222
|
-
error
|
|
1223
|
-
};
|
|
1224
|
-
};
|
|
1225
|
-
var useProductsCount_default = useProductsCount;
|
|
1226
|
-
var PublishProductMutation = gql`
|
|
1227
|
-
mutation PublishProduct($productId: ID!) {
|
|
1228
|
-
publishProduct(productId: $productId) {
|
|
1229
|
-
...ProductDetailFragment
|
|
1230
|
-
}
|
|
1231
|
-
}
|
|
1232
|
-
${ProductDetailFragment_default}
|
|
1233
|
-
`;
|
|
1234
|
-
var usePublishProduct = () => {
|
|
1235
|
-
const [publishProductMutation] = useMutation(PublishProductMutation);
|
|
1236
|
-
const publishProduct = async ({
|
|
1237
|
-
productId
|
|
1238
|
-
}) => {
|
|
1239
|
-
return publishProductMutation({
|
|
1240
|
-
variables: { productId },
|
|
1241
|
-
refetchQueries: ["Product", "ShopStatus"],
|
|
1242
|
-
awaitRefetchQueries: true
|
|
1243
|
-
});
|
|
1244
|
-
};
|
|
1245
|
-
return {
|
|
1246
|
-
publishProduct
|
|
1247
|
-
};
|
|
1248
|
-
};
|
|
1249
|
-
var usePublishProduct_default = usePublishProduct;
|
|
1250
|
-
var ReOrderProductMediaMutation = gql`
|
|
1251
|
-
mutation ReOrderProductMedia($sortKeys: [ReorderProductMediaInput!]!) {
|
|
1252
|
-
reorderProductMedia(sortKeys: $sortKeys) {
|
|
1253
|
-
_id
|
|
1254
|
-
}
|
|
1255
|
-
}
|
|
1256
|
-
`;
|
|
1257
|
-
var useReOrderProductMedia = () => {
|
|
1258
|
-
const [reOrderProductMutation] = useMutation(ReOrderProductMediaMutation);
|
|
1259
|
-
const reOrderProductMedia = async ({
|
|
1260
|
-
sortKeys
|
|
1261
|
-
}) => {
|
|
1262
|
-
return reOrderProductMutation({
|
|
1263
|
-
variables: { sortKeys },
|
|
1264
|
-
refetchQueries: ["ProductMedia"]
|
|
1265
|
-
});
|
|
1266
|
-
};
|
|
1267
|
-
return {
|
|
1268
|
-
reOrderProductMedia
|
|
1269
|
-
};
|
|
1270
|
-
};
|
|
1271
|
-
var useReOrderProductMedia_default = useReOrderProductMedia;
|
|
1272
|
-
var RemoveBundleItemMutation = gql`
|
|
1273
|
-
mutation RemoveBundleItem($productId: ID!, $index: Int!) {
|
|
1274
|
-
removeBundleItem(productId: $productId, index: $index) {
|
|
1275
|
-
_id
|
|
1276
|
-
}
|
|
1277
|
-
}
|
|
1278
|
-
`;
|
|
1279
|
-
var useRemoveBundleItem = () => {
|
|
1280
|
-
const [removeBundleItemMutation] = useMutation(RemoveBundleItemMutation);
|
|
1281
|
-
const removeBundleItem = async ({
|
|
1282
|
-
productId,
|
|
1283
|
-
index
|
|
1284
|
-
}) => {
|
|
1285
|
-
return removeBundleItemMutation({
|
|
1286
|
-
variables: { productId, index },
|
|
1287
|
-
refetchQueries: ["ProductBundleItems"]
|
|
1288
|
-
});
|
|
1289
|
-
};
|
|
1290
|
-
return {
|
|
1291
|
-
removeBundleItem
|
|
1292
|
-
};
|
|
1293
|
-
};
|
|
1294
|
-
var useRemoveBundleItem_default = useRemoveBundleItem;
|
|
1295
|
-
var RemoveProductMutation = gql`
|
|
1296
|
-
mutation RemoveProduct($productId: ID!) {
|
|
1297
|
-
removeProduct(productId: $productId) {
|
|
1298
|
-
_id
|
|
1299
|
-
}
|
|
1300
|
-
}
|
|
1301
|
-
`;
|
|
1302
|
-
var useRemoveProduct = () => {
|
|
1303
|
-
const [removeProductMutation] = useMutation(RemoveProductMutation);
|
|
1304
|
-
const removeProduct = async ({
|
|
1305
|
-
productId
|
|
1306
|
-
}) => {
|
|
1307
|
-
return removeProductMutation({
|
|
1308
|
-
variables: { productId },
|
|
1309
|
-
refetchQueries: ["Products", "ShopStatus", "ShopInfo"]
|
|
1310
|
-
});
|
|
1311
|
-
};
|
|
1312
|
-
return {
|
|
1313
|
-
removeProduct
|
|
1314
|
-
};
|
|
1315
|
-
};
|
|
1316
|
-
var useRemoveProduct_default = useRemoveProduct;
|
|
1317
|
-
var RemoveProductAssignmentMutation = gql`
|
|
1318
|
-
mutation RemoveProductAssignment(
|
|
1319
|
-
$proxyId: ID!
|
|
1320
|
-
$vectors: [ProductAssignmentVectorInput!]!
|
|
1321
|
-
) {
|
|
1322
|
-
removeProductAssignment(proxyId: $proxyId, vectors: $vectors) {
|
|
1323
|
-
_id
|
|
1324
|
-
}
|
|
1325
|
-
}
|
|
1326
|
-
`;
|
|
1327
|
-
var useRemoveProductAssignment = () => {
|
|
1328
|
-
const [removeProductAssignmentMutation] = useMutation(RemoveProductAssignmentMutation);
|
|
1329
|
-
const removeProductAssignment = async ({
|
|
1330
|
-
proxyId,
|
|
1331
|
-
vectors
|
|
1332
|
-
}) => {
|
|
1333
|
-
return removeProductAssignmentMutation({
|
|
1334
|
-
variables: { proxyId, vectors },
|
|
1335
|
-
refetchQueries: ["ProductAssignments"]
|
|
1336
|
-
});
|
|
1337
|
-
};
|
|
1338
|
-
return {
|
|
1339
|
-
removeProductAssignment
|
|
1340
|
-
};
|
|
1341
|
-
};
|
|
1342
|
-
var useRemoveProductAssignment_default = useRemoveProductAssignment;
|
|
1343
|
-
var RemoveProductMediaMutation = gql`
|
|
1344
|
-
mutation RemoveProductMedia($productMediaId: ID!) {
|
|
1345
|
-
removeProductMedia(productMediaId: $productMediaId) {
|
|
1346
|
-
_id
|
|
1347
|
-
}
|
|
1348
|
-
}
|
|
1349
|
-
`;
|
|
1350
|
-
var useRemoveProductMedia = () => {
|
|
1351
|
-
const [removeProductMediaMutation] = useMutation(RemoveProductMediaMutation);
|
|
1352
|
-
const removeProductMedia = async ({
|
|
1353
|
-
productMediaId
|
|
1354
|
-
}) => {
|
|
1355
|
-
return removeProductMediaMutation({
|
|
1356
|
-
variables: { productMediaId },
|
|
1357
|
-
refetchQueries: ["ProductMedia"]
|
|
1358
|
-
});
|
|
1359
|
-
};
|
|
1360
|
-
return {
|
|
1361
|
-
removeProductMedia
|
|
1362
|
-
};
|
|
1363
|
-
};
|
|
1364
|
-
var useRemoveProductMedia_default = useRemoveProductMedia;
|
|
1365
|
-
var RemoveProductVariationMutation = gql`
|
|
1366
|
-
mutation RemoveProductVariation($productVariationId: ID!) {
|
|
1367
|
-
removeProductVariation(productVariationId: $productVariationId) {
|
|
1368
|
-
_id
|
|
1369
|
-
}
|
|
1370
|
-
}
|
|
1371
|
-
`;
|
|
1372
|
-
var useRemoveProductVariation = () => {
|
|
1373
|
-
const [removeProductVariationMutation] = useMutation(RemoveProductVariationMutation);
|
|
1374
|
-
const removeProductVariation = async ({
|
|
1375
|
-
productVariationId
|
|
1376
|
-
}) => {
|
|
1377
|
-
return removeProductVariationMutation({
|
|
1378
|
-
variables: { productVariationId },
|
|
1379
|
-
refetchQueries: ["ProductVariations"]
|
|
1380
|
-
});
|
|
1381
|
-
};
|
|
1382
|
-
return {
|
|
1383
|
-
removeProductVariation
|
|
1384
|
-
};
|
|
1385
|
-
};
|
|
1386
|
-
var useRemoveProductVariation_default = useRemoveProductVariation;
|
|
1387
|
-
var RemoveProductVariationOptionMutation = gql`
|
|
1388
|
-
mutation RemoveProductVariationOption(
|
|
1389
|
-
$productVariationId: ID!
|
|
1390
|
-
$productVariationOptionValue: String!
|
|
1391
|
-
) {
|
|
1392
|
-
removeProductVariationOption(
|
|
1393
|
-
productVariationId: $productVariationId
|
|
1394
|
-
productVariationOptionValue: $productVariationOptionValue
|
|
1395
|
-
) {
|
|
1396
|
-
_id
|
|
1397
|
-
}
|
|
1398
|
-
}
|
|
1399
|
-
`;
|
|
1400
|
-
var useRemoveProductVariationOption = () => {
|
|
1401
|
-
const [removeProductVariationOptionMutation] = useMutation(RemoveProductVariationOptionMutation);
|
|
1402
|
-
const removeProductVariationOption = async ({
|
|
1403
|
-
productVariationId,
|
|
1404
|
-
productVariationOptionValue
|
|
1405
|
-
}) => {
|
|
1406
|
-
return removeProductVariationOptionMutation({
|
|
1407
|
-
variables: { productVariationId, productVariationOptionValue },
|
|
1408
|
-
refetchQueries: ["ProductVariations"]
|
|
1409
|
-
});
|
|
1410
|
-
};
|
|
1411
|
-
return {
|
|
1412
|
-
removeProductVariationOption
|
|
1413
|
-
};
|
|
1414
|
-
};
|
|
1415
|
-
var useRemoveProductVariationOption_default = useRemoveProductVariationOption;
|
|
1416
|
-
function useScaffoldBundleItem({ onSuccess }) {
|
|
1417
|
-
const { selectedLocale } = useApp_default();
|
|
1418
|
-
const { createProduct } = useCreateProduct_default();
|
|
1419
|
-
const { formatMessage } = useIntl();
|
|
1420
|
-
return async ({ title, type, quantity = 1 }) => {
|
|
1421
|
-
const texts = [
|
|
1422
|
-
{
|
|
1423
|
-
title,
|
|
1424
|
-
slug: title.toLowerCase().replace(/\s+/g, "-"),
|
|
1425
|
-
locale: selectedLocale
|
|
1426
|
-
}
|
|
1427
|
-
];
|
|
1428
|
-
const { data } = await createProduct({
|
|
1429
|
-
product: { type: type || "SIMPLE_PRODUCT" /* SimpleProduct */ },
|
|
1430
|
-
texts
|
|
1431
|
-
});
|
|
1432
|
-
const scaffoldedProduct = data?.createProduct;
|
|
1433
|
-
const scaffoldedProductID = scaffoldedProduct?._id;
|
|
1434
|
-
if (!scaffoldedProductID)
|
|
1435
|
-
throw new Error(
|
|
1436
|
-
formatMessage({
|
|
1437
|
-
id: "product_creation_failed",
|
|
1438
|
-
defaultMessage: "Product creation failed"
|
|
1439
|
-
})
|
|
1440
|
-
);
|
|
1441
|
-
onSuccess?.(scaffoldedProduct, quantity);
|
|
1442
|
-
return { success: true };
|
|
1443
|
-
};
|
|
1444
|
-
}
|
|
1445
|
-
var useScaffoldBundleItem_default = useScaffoldBundleItem;
|
|
1446
|
-
var SmartContractStandardsQuery = gql`
|
|
1447
|
-
query SmartContractStandards {
|
|
1448
|
-
smartContractStandards: __type(name: "SmartContractStandard") {
|
|
1449
|
-
options: enumValues {
|
|
1450
|
-
value: name
|
|
1451
|
-
label: name
|
|
1452
|
-
}
|
|
1453
|
-
}
|
|
1454
|
-
}
|
|
1455
|
-
`;
|
|
1456
|
-
var useSmartContractStandards = () => {
|
|
1457
|
-
const { data, loading, error } = useQuery(SmartContractStandardsQuery);
|
|
1458
|
-
const smartContractStandards = data?.smartContractStandards?.options || [];
|
|
1459
|
-
return {
|
|
1460
|
-
smartContractStandards,
|
|
1461
|
-
loading,
|
|
1462
|
-
error
|
|
1463
|
-
};
|
|
1464
|
-
};
|
|
1465
|
-
var useSmartContractStandards_default = useSmartContractStandards;
|
|
1466
|
-
var ProductMediaTextsFragment = gql`
|
|
1467
|
-
fragment ProductMediaTextsFragment on ProductMediaTexts {
|
|
1468
|
-
_id
|
|
1469
|
-
locale
|
|
1470
|
-
title
|
|
1471
|
-
subtitle
|
|
1472
|
-
}
|
|
1473
|
-
`;
|
|
1474
|
-
var ProductMediaTextsFragment_default = ProductMediaTextsFragment;
|
|
1475
|
-
|
|
1476
|
-
// src/modules/product/hooks/useTranslatedProductMediaTexts.ts
|
|
1477
|
-
var TranslatedProductMediaTextsQuery = gql`
|
|
1478
|
-
query TranslatedProductMediaTexts($productMediaId: ID!) {
|
|
1479
|
-
translatedProductMediaTexts(productMediaId: $productMediaId) {
|
|
1480
|
-
...ProductMediaTextsFragment
|
|
1481
|
-
}
|
|
1482
|
-
}
|
|
1483
|
-
${ProductMediaTextsFragment_default}
|
|
1484
|
-
`;
|
|
1485
|
-
var useTranslatedProductMediaTexts = ({
|
|
1486
|
-
productMediaId
|
|
1487
|
-
}) => {
|
|
1488
|
-
const { data, loading, error } = useQuery(TranslatedProductMediaTextsQuery, {
|
|
1489
|
-
skip: !productMediaId,
|
|
1490
|
-
variables: {
|
|
1491
|
-
productMediaId
|
|
1492
|
-
}
|
|
1493
|
-
});
|
|
1494
|
-
const translatedMediaTexts = data?.translatedProductMediaTexts || [];
|
|
1495
|
-
return {
|
|
1496
|
-
translatedMediaTexts,
|
|
1497
|
-
loading,
|
|
1498
|
-
error
|
|
1499
|
-
};
|
|
1500
|
-
};
|
|
1501
|
-
var useTranslatedProductMediaTexts_default = useTranslatedProductMediaTexts;
|
|
1502
|
-
var GetTranslatedProductTextsQuery = (inlineFragment = "") => gql`
|
|
1503
|
-
query TranslatedProductTexts($productId: ID!) {
|
|
1504
|
-
translatedProductTexts(productId: $productId) {
|
|
1505
|
-
...ProductTextsFragment
|
|
1506
|
-
${inlineFragment}
|
|
1507
|
-
}
|
|
1508
|
-
}
|
|
1509
|
-
${ProductTextsFragment_default}
|
|
1510
|
-
`;
|
|
1511
|
-
var useTranslatedProductTexts = ({
|
|
1512
|
-
productId
|
|
1513
|
-
}) => {
|
|
1514
|
-
const { customProperties } = useUnchainedContext_default();
|
|
1515
|
-
const { data, loading, error } = useQuery(GetTranslatedProductTextsQuery(customProperties?.ProductTexts), {
|
|
1516
|
-
skip: !productId,
|
|
1517
|
-
variables: {
|
|
1518
|
-
productId
|
|
1519
|
-
}
|
|
1520
|
-
});
|
|
1521
|
-
const translatedTexts = data?.translatedProductTexts || [];
|
|
1522
|
-
return {
|
|
1523
|
-
translatedTexts,
|
|
1524
|
-
loading,
|
|
1525
|
-
error
|
|
1526
|
-
};
|
|
1527
|
-
};
|
|
1528
|
-
var useTranslatedProductTexts_default = useTranslatedProductTexts;
|
|
1529
|
-
var UnPublishProductMutation = gql`
|
|
1530
|
-
mutation UnpublishProduct($productId: ID!) {
|
|
1531
|
-
unpublishProduct(productId: $productId) {
|
|
1532
|
-
...ProductDetailFragment
|
|
1533
|
-
}
|
|
1534
|
-
}
|
|
1535
|
-
${ProductDetailFragment_default}
|
|
1536
|
-
`;
|
|
1537
|
-
var useUnPublishProduct = () => {
|
|
1538
|
-
const [unPublishProductMutation] = useMutation(UnPublishProductMutation);
|
|
1539
|
-
const unPublishProduct = async ({
|
|
1540
|
-
productId
|
|
1541
|
-
}) => {
|
|
1542
|
-
return unPublishProductMutation({
|
|
1543
|
-
variables: { productId },
|
|
1544
|
-
refetchQueries: ["Product", "ShopStatus"],
|
|
1545
|
-
awaitRefetchQueries: true
|
|
1546
|
-
});
|
|
1547
|
-
};
|
|
1548
|
-
return {
|
|
1549
|
-
unPublishProduct
|
|
1550
|
-
};
|
|
1551
|
-
};
|
|
1552
|
-
var useUnPublishProduct_default = useUnPublishProduct;
|
|
1553
|
-
var UpdateProductMutation = gql`
|
|
1554
|
-
mutation UpdateProduct($productId: ID!, $product: UpdateProductInput!) {
|
|
1555
|
-
updateProduct(productId: $productId, product: $product) {
|
|
1556
|
-
...ProductDetailFragment
|
|
1557
|
-
}
|
|
1558
|
-
}
|
|
1559
|
-
${ProductDetailFragment_default}
|
|
1560
|
-
`;
|
|
1561
|
-
var useUpdateProduct = () => {
|
|
1562
|
-
const [updateProductMutation] = useMutation(UpdateProductMutation);
|
|
1563
|
-
const updateProduct = async ({
|
|
1564
|
-
productId,
|
|
1565
|
-
product: { tags, sequence, meta }
|
|
1566
|
-
}) => {
|
|
1567
|
-
return updateProductMutation({
|
|
1568
|
-
variables: {
|
|
1569
|
-
productId,
|
|
1570
|
-
product: {
|
|
1571
|
-
tags,
|
|
1572
|
-
sequence,
|
|
1573
|
-
meta
|
|
1574
|
-
}
|
|
1575
|
-
},
|
|
1576
|
-
refetchQueries: ["Products", "ShopStatus", "ShopInfo"]
|
|
1577
|
-
});
|
|
1578
|
-
};
|
|
1579
|
-
return {
|
|
1580
|
-
updateProduct
|
|
1581
|
-
};
|
|
1582
|
-
};
|
|
1583
|
-
var useUpdateProduct_default = useUpdateProduct;
|
|
1584
|
-
|
|
1585
|
-
// src/modules/product/utils/price.utils.ts
|
|
1586
|
-
var toMinorUnit = (value, decimals) => {
|
|
1587
|
-
if (!value || decimals < 0) return 0;
|
|
1588
|
-
const trimmedValue = value.trim();
|
|
1589
|
-
if (!/^-?\d*\.?\d*$/.test(trimmedValue)) return 0;
|
|
1590
|
-
const dotIndex = trimmedValue.indexOf(".");
|
|
1591
|
-
if (dotIndex === -1) {
|
|
1592
|
-
return Number(trimmedValue) * 10 ** decimals;
|
|
1593
|
-
}
|
|
1594
|
-
const integerPart = trimmedValue.slice(0, dotIndex) || "0";
|
|
1595
|
-
const decimalPart = trimmedValue.slice(dotIndex + 1);
|
|
1596
|
-
const truncatedDecimal = decimalPart.slice(0, decimals);
|
|
1597
|
-
const paddedDecimal = truncatedDecimal.padEnd(decimals, "0");
|
|
1598
|
-
const result = integerPart + paddedDecimal;
|
|
1599
|
-
return Number(result);
|
|
1600
|
-
};
|
|
1601
|
-
|
|
1602
|
-
// src/modules/product/hooks/useUpdateProductCommerce.ts
|
|
1603
|
-
var UpdateProductCommerceMutation = gql`
|
|
1604
|
-
mutation UpdateProductCommerce(
|
|
1605
|
-
$productId: ID!
|
|
1606
|
-
$commerce: UpdateProductCommerceInput!
|
|
1607
|
-
) {
|
|
1608
|
-
updateProductCommerce(productId: $productId, commerce: $commerce) {
|
|
1609
|
-
...ProductDetailFragment
|
|
1610
|
-
}
|
|
1611
|
-
}
|
|
1612
|
-
${ProductDetailFragment_default}
|
|
1613
|
-
`;
|
|
1614
|
-
var useUpdateProductCommerce = () => {
|
|
1615
|
-
const [updateProductCommerceMutation] = useMutation(UpdateProductCommerceMutation);
|
|
1616
|
-
const { currencies } = useCurrencies_default();
|
|
1617
|
-
const updateProductCommerce = async ({
|
|
1618
|
-
productId,
|
|
1619
|
-
commerce: { pricing }
|
|
1620
|
-
}) => {
|
|
1621
|
-
const normalizedPricing = pricing.map((price) => {
|
|
1622
|
-
const currency = currencies.find(
|
|
1623
|
-
({ isoCode }) => isoCode === price.currencyCode
|
|
1624
|
-
);
|
|
1625
|
-
const amount = toMinorUnit(price.amount.toString(), currency.decimals);
|
|
1626
|
-
return {
|
|
1627
|
-
...price,
|
|
1628
|
-
amount
|
|
1629
|
-
};
|
|
1630
|
-
});
|
|
1631
|
-
return updateProductCommerceMutation({
|
|
1632
|
-
variables: {
|
|
1633
|
-
productId,
|
|
1634
|
-
commerce: {
|
|
1635
|
-
pricing: normalizedPricing
|
|
1636
|
-
}
|
|
1637
|
-
},
|
|
1638
|
-
refetchQueries: ["Products"]
|
|
1639
|
-
});
|
|
1640
|
-
};
|
|
1641
|
-
return {
|
|
1642
|
-
updateProductCommerce
|
|
1643
|
-
};
|
|
1644
|
-
};
|
|
1645
|
-
var useUpdateProductCommerce_default = useUpdateProductCommerce;
|
|
1646
|
-
var UpdateProductMediaTextsMutation = gql`
|
|
1647
|
-
mutation UpdateProductMediaTexts(
|
|
1648
|
-
$productMediaId: ID!
|
|
1649
|
-
$texts: [ProductMediaTextInput!]!
|
|
1650
|
-
) {
|
|
1651
|
-
updateProductMediaTexts(productMediaId: $productMediaId, texts: $texts) {
|
|
1652
|
-
...ProductMediaTextsFragment
|
|
1653
|
-
}
|
|
1654
|
-
}
|
|
1655
|
-
${ProductMediaTextsFragment_default}
|
|
1656
|
-
`;
|
|
1657
|
-
var useUpdateProductMediaTexts = () => {
|
|
1658
|
-
const [updateProductMediaTextsMutation] = useMutation(UpdateProductMediaTextsMutation);
|
|
1659
|
-
const updateProductMediaTexts = async ({
|
|
1660
|
-
productMediaId,
|
|
1661
|
-
texts
|
|
1662
|
-
}) => {
|
|
1663
|
-
return updateProductMediaTextsMutation({
|
|
1664
|
-
variables: { productMediaId, texts },
|
|
1665
|
-
refetchQueries: ["TranslatedProductMediaTexts"]
|
|
1666
|
-
});
|
|
1667
|
-
};
|
|
1668
|
-
return {
|
|
1669
|
-
updateProductMediaTexts
|
|
1670
|
-
};
|
|
1671
|
-
};
|
|
1672
|
-
var useUpdateProductMediaTexts_default = useUpdateProductMediaTexts;
|
|
1673
|
-
var UpdateProductPlanMutation = gql`
|
|
1674
|
-
mutation UpdateProductPlan($productId: ID!, $plan: UpdateProductPlanInput!) {
|
|
1675
|
-
updateProductPlan(productId: $productId, plan: $plan) {
|
|
1676
|
-
_id
|
|
1677
|
-
}
|
|
1678
|
-
}
|
|
1679
|
-
`;
|
|
1680
|
-
var useUpdateProductPlan = () => {
|
|
1681
|
-
const [updateProductPlanMutation] = useMutation(UpdateProductPlanMutation);
|
|
1682
|
-
const updateProductPlan = async ({
|
|
1683
|
-
productId,
|
|
1684
|
-
plan: {
|
|
1685
|
-
usageCalculationType,
|
|
1686
|
-
billingInterval,
|
|
1687
|
-
billingIntervalCount = null,
|
|
1688
|
-
trialInterval = null,
|
|
1689
|
-
trialIntervalCount = null
|
|
1690
|
-
}
|
|
1691
|
-
}) => {
|
|
1692
|
-
return updateProductPlanMutation({
|
|
1693
|
-
variables: {
|
|
1694
|
-
productId,
|
|
1695
|
-
plan: {
|
|
1696
|
-
usageCalculationType,
|
|
1697
|
-
billingInterval,
|
|
1698
|
-
billingIntervalCount,
|
|
1699
|
-
trialInterval,
|
|
1700
|
-
trialIntervalCount
|
|
1701
|
-
}
|
|
1702
|
-
},
|
|
1703
|
-
refetchQueries: ["Products"]
|
|
1704
|
-
});
|
|
1705
|
-
};
|
|
1706
|
-
return {
|
|
1707
|
-
updateProductPlan
|
|
1708
|
-
};
|
|
1709
|
-
};
|
|
1710
|
-
var useUpdateProductPlan_default = useUpdateProductPlan;
|
|
1711
|
-
var UpdateProductSupplyMutation = gql`
|
|
1712
|
-
mutation UpdateProductSupply(
|
|
1713
|
-
$productId: ID!
|
|
1714
|
-
$supply: UpdateProductSupplyInput!
|
|
1715
|
-
) {
|
|
1716
|
-
updateProductSupply(productId: $productId, supply: $supply) {
|
|
1717
|
-
_id
|
|
1718
|
-
... on SimpleProduct {
|
|
1719
|
-
dimensions {
|
|
1720
|
-
...ProductDimensionFragment
|
|
1721
|
-
}
|
|
1722
|
-
}
|
|
1723
|
-
}
|
|
1724
|
-
}
|
|
1725
|
-
${ProductDimensionFragment_default}
|
|
1726
|
-
`;
|
|
1727
|
-
var useUpdateProductSupply = () => {
|
|
1728
|
-
const [updateProductSupplyMutation] = useMutation(UpdateProductSupplyMutation);
|
|
1729
|
-
const updateProductSupply = async ({
|
|
1730
|
-
productId,
|
|
1731
|
-
supply: {
|
|
1732
|
-
weightInGram: weight = null,
|
|
1733
|
-
heightInMillimeters: height = null,
|
|
1734
|
-
lengthInMillimeters: length = null,
|
|
1735
|
-
widthInMillimeters: width = null
|
|
1736
|
-
}
|
|
1737
|
-
}) => {
|
|
1738
|
-
return updateProductSupplyMutation({
|
|
1739
|
-
variables: {
|
|
1740
|
-
productId,
|
|
1741
|
-
supply: {
|
|
1742
|
-
weightInGram: weight || null,
|
|
1743
|
-
heightInMillimeters: height || null,
|
|
1744
|
-
lengthInMillimeters: length || null,
|
|
1745
|
-
widthInMillimeters: width || null
|
|
1746
|
-
}
|
|
1747
|
-
},
|
|
1748
|
-
refetchQueries: ["Products"]
|
|
1749
|
-
});
|
|
1750
|
-
};
|
|
1751
|
-
return {
|
|
1752
|
-
updateProductSupply
|
|
1753
|
-
};
|
|
1754
|
-
};
|
|
1755
|
-
var useUpdateProductSupply_default = useUpdateProductSupply;
|
|
1756
|
-
var UpdateProductTextsMutation = gql`
|
|
1757
|
-
mutation UpdateProductTexts($productId: ID!, $texts: [ProductTextInput!]!) {
|
|
1758
|
-
updateProductTexts(productId: $productId, texts: $texts) {
|
|
1759
|
-
...ProductTextsFragment
|
|
1760
|
-
}
|
|
1761
|
-
}
|
|
1762
|
-
${ProductTextsFragment_default}
|
|
1763
|
-
`;
|
|
1764
|
-
var useUpdateProductTexts = () => {
|
|
1765
|
-
const [updateProductTextsMutation] = useMutation(UpdateProductTextsMutation);
|
|
1766
|
-
const updateProductTexts = async ({
|
|
1767
|
-
productId,
|
|
1768
|
-
texts
|
|
1769
|
-
}) => {
|
|
1770
|
-
return updateProductTextsMutation({
|
|
1771
|
-
variables: { productId, texts },
|
|
1772
|
-
refetchQueries: ["TranslatedProductTexts"]
|
|
1773
|
-
});
|
|
1774
|
-
};
|
|
1775
|
-
return {
|
|
1776
|
-
updateProductTexts
|
|
1777
|
-
};
|
|
1778
|
-
};
|
|
1779
|
-
var useUpdateProductTexts_default = useUpdateProductTexts;
|
|
1780
|
-
var UpdateProductTokenizationMutation = gql`
|
|
1781
|
-
mutation UpdateProductTokenization(
|
|
1782
|
-
$productId: ID!
|
|
1783
|
-
$tokenization: UpdateProductTokenizationInput!
|
|
1784
|
-
) {
|
|
1785
|
-
updateProductTokenization(
|
|
1786
|
-
productId: $productId
|
|
1787
|
-
tokenization: $tokenization
|
|
1788
|
-
) {
|
|
1789
|
-
_id
|
|
1790
|
-
}
|
|
1791
|
-
}
|
|
1792
|
-
`;
|
|
1793
|
-
var useUpdateProductTokenization = () => {
|
|
1794
|
-
const [updateProductTokenizationMutation] = useMutation(UpdateProductTokenizationMutation);
|
|
1795
|
-
const updateProductTokenization = async ({
|
|
1796
|
-
productId,
|
|
1797
|
-
tokenization: { contractAddress, contractStandard, tokenId, supply }
|
|
1798
|
-
}) => {
|
|
1799
|
-
return updateProductTokenizationMutation({
|
|
1800
|
-
variables: {
|
|
1801
|
-
productId,
|
|
1802
|
-
tokenization: {
|
|
1803
|
-
contractAddress,
|
|
1804
|
-
contractStandard,
|
|
1805
|
-
tokenId,
|
|
1806
|
-
supply: parseInt(supply, 10)
|
|
1807
|
-
}
|
|
1808
|
-
},
|
|
1809
|
-
refetchQueries: ["Product", "Products"]
|
|
1810
|
-
});
|
|
1811
|
-
};
|
|
1812
|
-
return {
|
|
1813
|
-
updateProductTokenization
|
|
1814
|
-
};
|
|
1815
|
-
};
|
|
1816
|
-
var useUpdateProductTokenization_default = useUpdateProductTokenization;
|
|
1817
|
-
var UpdateProductVariationTextsMutation = gql`
|
|
1818
|
-
mutation UpdateProductVariationTexts(
|
|
1819
|
-
$productVariationId: ID!
|
|
1820
|
-
$productVariationOptionValue: String
|
|
1821
|
-
$texts: [ProductVariationTextInput!]!
|
|
1822
|
-
) {
|
|
1823
|
-
updateProductVariationTexts(
|
|
1824
|
-
productVariationId: $productVariationId
|
|
1825
|
-
productVariationOptionValue: $productVariationOptionValue
|
|
1826
|
-
texts: $texts
|
|
1827
|
-
) {
|
|
1828
|
-
_id
|
|
1829
|
-
}
|
|
1830
|
-
}
|
|
1831
|
-
`;
|
|
1832
|
-
var useUpdateProductVariationTexts = () => {
|
|
1833
|
-
const [updateProductVariationTextsMutation] = useMutation(UpdateProductVariationTextsMutation);
|
|
1834
|
-
const updateProductVariationTexts = async ({
|
|
1835
|
-
productVariationId,
|
|
1836
|
-
productVariationOptionValue,
|
|
1837
|
-
texts
|
|
1838
|
-
}) => {
|
|
1839
|
-
return updateProductVariationTextsMutation({
|
|
1840
|
-
variables: {
|
|
1841
|
-
productVariationId,
|
|
1842
|
-
productVariationOptionValue,
|
|
1843
|
-
texts
|
|
1844
|
-
},
|
|
1845
|
-
refetchQueries: ["ProductVariations"]
|
|
1846
|
-
});
|
|
1847
|
-
};
|
|
1848
|
-
return {
|
|
1849
|
-
updateProductVariationTexts
|
|
1850
|
-
};
|
|
1851
|
-
};
|
|
1852
|
-
var useUpdateProductVariationTexts_default = useUpdateProductVariationTexts;
|
|
1853
|
-
var UpdateProductWarehousingMutation = gql`
|
|
1854
|
-
mutation UpdateProductWarehousing(
|
|
1855
|
-
$productId: ID!
|
|
1856
|
-
$warehousing: UpdateProductWarehousingInput!
|
|
1857
|
-
) {
|
|
1858
|
-
updateProductWarehousing(productId: $productId, warehousing: $warehousing) {
|
|
1859
|
-
_id
|
|
1860
|
-
... on SimpleProduct {
|
|
1861
|
-
sku
|
|
1862
|
-
baseUnit
|
|
1863
|
-
}
|
|
1864
|
-
}
|
|
1865
|
-
}
|
|
1866
|
-
`;
|
|
1867
|
-
var useUpdateProductWarehousing = () => {
|
|
1868
|
-
const [updateProductWarehousingMutation] = useMutation(UpdateProductWarehousingMutation);
|
|
1869
|
-
const updateProductWarehousing = async ({
|
|
1870
|
-
productId,
|
|
1871
|
-
warehousing: { sku = null, baseUnit = null }
|
|
1872
|
-
}) => {
|
|
1873
|
-
return updateProductWarehousingMutation({
|
|
1874
|
-
variables: {
|
|
1875
|
-
productId,
|
|
1876
|
-
warehousing: {
|
|
1877
|
-
sku,
|
|
1878
|
-
baseUnit
|
|
1879
|
-
}
|
|
1880
|
-
},
|
|
1881
|
-
refetchQueries: ["Products"]
|
|
1882
|
-
});
|
|
1883
|
-
};
|
|
1884
|
-
return {
|
|
1885
|
-
updateProductWarehousing
|
|
1886
|
-
};
|
|
1887
|
-
};
|
|
1888
|
-
var useUpdateProductWarehousing_default = useUpdateProductWarehousing;
|
|
1889
|
-
var UserTokensQuery = gql`
|
|
1890
|
-
query UserTokens($userId: ID!, $forceLocale: Locale) {
|
|
1891
|
-
user(userId: $userId) {
|
|
1892
|
-
_id
|
|
1893
|
-
web3Addresses {
|
|
1894
|
-
address
|
|
1895
|
-
nonce
|
|
1896
|
-
verified
|
|
1897
|
-
}
|
|
1898
|
-
|
|
1899
|
-
tokens {
|
|
1900
|
-
...TokenFragment
|
|
1901
|
-
product {
|
|
1902
|
-
...ProductBriefFragment
|
|
1903
|
-
simulatedPrice {
|
|
1904
|
-
amount
|
|
1905
|
-
currencyCode
|
|
1906
|
-
}
|
|
1907
|
-
}
|
|
1908
|
-
}
|
|
1909
|
-
}
|
|
1910
|
-
}
|
|
1911
|
-
${TokenFragment_default}
|
|
1912
|
-
${ProductBriefFragment_default}
|
|
1913
|
-
`;
|
|
1914
|
-
var useUserTokens = ({ userId = null }) => {
|
|
1915
|
-
const { data, loading, error } = useQuery(UserTokensQuery, {
|
|
1916
|
-
variables: { userId }
|
|
1917
|
-
});
|
|
1918
|
-
const tokens = data?.user?.tokens || [];
|
|
1919
|
-
const web3Addresses = data?.user?.web3Addresses || [];
|
|
1920
|
-
return {
|
|
1921
|
-
tokens,
|
|
1922
|
-
web3Addresses,
|
|
1923
|
-
loading,
|
|
1924
|
-
error
|
|
1925
|
-
};
|
|
1926
|
-
};
|
|
1927
|
-
var useUserTokens_default = useUserTokens;
|
|
1928
|
-
|
|
1929
|
-
export { useAddProductAssignment_default as useAddProductAssignment, useAddProductMedia_default as useAddProductMedia, useCreateProduct_default as useCreateProduct, useCreateProductBundleItem_default as useCreateProductBundleItem, useCreateProductVariation_default as useCreateProductVariation, useCreateProductVariationOption_default as useCreateProductVariationOption, useExportToken_default as useExportToken, useMenuPosition, usePrepareProductImport_default as usePrepareProductImport, useProduct_default as useProduct, useProductAssignments_default as useProductAssignments, useProductBundleItems_default as useProductBundleItems, useProductCatalogPrices_default as useProductCatalogPrices, useProductMedia_default as useProductMedia, useProductPlan_default as useProductPlan, useProductPlanConfigurationOptions_default as useProductPlanConfigurationOptions, useProductReviews_default as useProductReviews, useProductSupply_default as useProductSupply, useProductTokenization_default as useProductTokenization, useProductVariationTypes_default as useProductVariationTypes, useProductVariations_default as useProductVariations, useProductWarehousing_default as useProductWarehousing, useProducts_default as useProducts, useProductsCount_default as useProductsCount, usePublishProduct_default as usePublishProduct, useReOrderProductMedia_default as useReOrderProductMedia, useRemoveBundleItem_default as useRemoveBundleItem, useRemoveProduct_default as useRemoveProduct, useRemoveProductAssignment_default as useRemoveProductAssignment, useRemoveProductMedia_default as useRemoveProductMedia, useRemoveProductVariation_default as useRemoveProductVariation, useRemoveProductVariationOption_default as useRemoveProductVariationOption, useScaffoldBundleItem_default as useScaffoldBundleItem, useSmartContractStandards_default as useSmartContractStandards, useTranslatedProductMediaTexts_default as useTranslatedProductMediaTexts, useTranslatedProductTexts_default as useTranslatedProductTexts, useUnPublishProduct_default as useUnPublishProduct, useUpdateProduct_default as useUpdateProduct, useUpdateProductCommerce_default as useUpdateProductCommerce, useUpdateProductMediaTexts_default as useUpdateProductMediaTexts, useUpdateProductPlan_default as useUpdateProductPlan, useUpdateProductSupply_default as useUpdateProductSupply, useUpdateProductTexts_default as useUpdateProductTexts, useUpdateProductTokenization_default as useUpdateProductTokenization, useUpdateProductVariationTexts_default as useUpdateProductVariationTexts, useUpdateProductWarehousing_default as useUpdateProductWarehousing, useUserTokens_default as useUserTokens };
|