@unchainedshop/admin-ui 5.0.0-alpha.6 → 5.0.0-alpha.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -19
- package/dist/chunk-2ARWAOZW.js +17 -0
- package/dist/chunk-6UGLNLJG.js +44 -0
- package/dist/{chunk-UXG7EYHC.js → chunk-6ZZIMVID.js} +1 -1
- package/dist/{chunk-6TXD4TA7.js → chunk-A3WBMBUF.js} +5 -84
- package/dist/{chunk-45H2WVIC.js → chunk-COV7BREX.js} +0 -1
- package/dist/{chunk-UFYR5WZT.js → chunk-GY2DRQGW.js} +2 -1
- package/dist/{chunk-QNLGYFV7.js → chunk-IYKPRAWC.js} +4 -0
- package/dist/{chunk-BGCKJQGS.js → chunk-JAVEZY3Q.js} +22 -15
- package/dist/{chunk-RHUFQVKL.js → chunk-QVKXUZEC.js} +1 -1
- package/dist/chunk-RORNAN2J.js +12 -0
- package/dist/{chunk-YSKZE2KN.js → chunk-SDA2A6TP.js} +37 -24
- package/dist/{chunk-4VNS5WPM.js → chunk-WPLOTFGW.js} +7 -8
- package/dist/components/ui/Tag/TagInput.d.ts +10 -5
- package/dist/components/ui/Tag/TagInput.d.ts.map +1 -1
- package/dist/components/ui/form/ChoicesField.d.ts.map +1 -1
- package/dist/components/ui/form/TagInputField.d.ts +2 -1
- package/dist/components/ui/form/TagInputField.d.ts.map +1 -1
- package/dist/components/ui/index.d.ts +2 -0
- package/dist/components/ui/index.d.ts.map +1 -1
- package/dist/form.js +1071 -2806
- package/dist/gql/operation-types.d.ts +13063 -0
- package/dist/gql/operation-types.d.ts.map +1 -0
- package/dist/gql/schema-types.d.ts +3821 -0
- package/dist/gql/schema-types.d.ts.map +1 -0
- package/dist/gql/types.d.ts +2 -17208
- package/dist/gql/types.d.ts.map +1 -1
- package/dist/hooks.js +3 -3
- package/dist/modal.js +11 -6
- package/dist/modules/accounts/fragment/UserFragment.d.ts.map +1 -1
- package/dist/modules/accounts/hooks/useCurrentUser.d.ts.map +1 -1
- package/dist/modules/accounts.js +220 -64
- package/dist/modules/assortment.js +10 -5
- package/dist/modules/common/components/MediaAvatar.d.ts +6 -0
- package/dist/modules/common/components/MediaAvatar.d.ts.map +1 -0
- package/dist/modules/common/components/Table.d.ts +25 -0
- package/dist/modules/common/components/Table.d.ts.map +1 -0
- package/dist/modules/common/components/TableCell.d.ts +12 -0
- package/dist/modules/common/components/TableCell.d.ts.map +1 -0
- package/dist/modules/common/components/TableRow.d.ts +10 -0
- package/dist/modules/common/components/TableRow.d.ts.map +1 -0
- package/dist/modules/common/hooks/useApp.d.ts +1 -1
- package/dist/modules/common/hooks/useBulkResultHandler.d.ts +8 -0
- package/dist/modules/common/hooks/useBulkResultHandler.d.ts.map +1 -0
- package/dist/modules/common/hooks/useBulkSelection.d.ts +12 -0
- package/dist/modules/common/hooks/useBulkSelection.d.ts.map +1 -0
- package/dist/modules/common/hooks/useScrollRestoration.d.ts +8 -0
- package/dist/modules/common/hooks/useScrollRestoration.d.ts.map +1 -0
- package/dist/modules/common/hooks/useShopInfo.d.ts +13 -13
- package/dist/modules/common/hooks/useShopInfo.d.ts.map +1 -1
- package/dist/modules/common/utils/useFormatDateTime.d.ts +10 -1
- package/dist/modules/common/utils/useFormatDateTime.d.ts.map +1 -1
- package/dist/modules/country/hooks/useCountries.d.ts +4 -4
- package/dist/modules/country.js +1 -1
- package/dist/modules/currency.js +1 -1
- package/dist/modules/delivery-provider.js +1 -1
- package/dist/modules/enrollment.js +24 -3
- package/dist/modules/event.js +2 -2
- package/dist/modules/filter.js +2 -2
- package/dist/modules/language/hooks/useLanguages.d.ts +4 -4
- package/dist/modules/language.js +1 -1
- package/dist/modules/modal/components/DangerMessage.d.ts +2 -1
- package/dist/modules/modal/components/DangerMessage.d.ts.map +1 -1
- package/dist/modules/order/hooks/useOrders.d.ts +20 -20
- package/dist/modules/order/hooks/useOrders.d.ts.map +1 -1
- package/dist/modules/order.js +10 -4
- package/dist/modules/payment-providers.js +1 -1
- package/dist/modules/product-review.js +25 -6
- package/dist/modules/product.js +14 -18
- package/dist/modules/quotation.js +23 -3
- package/dist/modules/token.js +3 -3
- package/dist/modules/warehousing-providers.js +1 -1
- package/dist/modules/work/hooks/useWork.d.ts +14 -14
- package/dist/modules/work.js +15 -7
- package/dist/plugins.js +7 -2
- package/dist/providers.js +5 -4
- package/dist/sdk/plugins.d.ts +11 -0
- package/dist/sdk/plugins.d.ts.map +1 -1
- package/dist/sdk/shims/admin-ui-plugins.d.ts +3 -0
- package/dist/sdk/shims/admin-ui-plugins.d.ts.map +1 -0
- package/dist/sdk/shims/apollo-client-react.d.ts +3 -0
- package/dist/sdk/shims/apollo-client-react.d.ts.map +1 -0
- package/dist/sdk/shims/apollo-client.d.ts +3 -0
- package/dist/sdk/shims/apollo-client.d.ts.map +1 -0
- package/dist/sdk/shims/host.d.ts +17 -0
- package/dist/sdk/shims/host.d.ts.map +1 -0
- package/dist/sdk/shims/next-head.d.ts +3 -0
- package/dist/sdk/shims/next-head.d.ts.map +1 -0
- package/dist/sdk/shims/next-image.d.ts +3 -0
- package/dist/sdk/shims/next-image.d.ts.map +1 -0
- package/dist/sdk/shims/next-link.d.ts +3 -0
- package/dist/sdk/shims/next-link.d.ts.map +1 -0
- package/dist/sdk/shims/next-router.d.ts +3 -0
- package/dist/sdk/shims/next-router.d.ts.map +1 -0
- package/dist/sdk/shims/react-dom-client.d.ts +3 -0
- package/dist/sdk/shims/react-dom-client.d.ts.map +1 -0
- package/dist/sdk/shims/react-dom.d.ts +3 -0
- package/dist/sdk/shims/react-dom.d.ts.map +1 -0
- package/dist/sdk/shims/react-hook-form.d.ts +3 -0
- package/dist/sdk/shims/react-hook-form.d.ts.map +1 -0
- package/dist/sdk/shims/react-intl.d.ts +3 -0
- package/dist/sdk/shims/react-intl.d.ts.map +1 -0
- package/dist/sdk/shims/react-jsx-runtime.d.ts +3 -0
- package/dist/sdk/shims/react-jsx-runtime.d.ts.map +1 -0
- package/dist/sdk/shims/react-toastify.d.ts +3 -0
- package/dist/sdk/shims/react-toastify.d.ts.map +1 -0
- package/dist/sdk/shims/react.d.ts +3 -0
- package/dist/sdk/shims/react.d.ts.map +1 -0
- package/dist/shims/admin-ui-plugins.js +9 -0
- package/dist/shims/apollo-client-react.js +25 -0
- package/dist/shims/apollo-client.js +55 -0
- package/dist/shims/next-head.js +9 -0
- package/dist/shims/next-image.js +9 -0
- package/dist/shims/next-link.js +9 -0
- package/dist/shims/next-router.js +13 -0
- package/dist/shims/react-dom-client.js +11 -0
- package/dist/shims/react-dom.js +22 -0
- package/dist/shims/react-hook-form.js +25 -0
- package/dist/shims/react-intl.js +37 -0
- package/dist/shims/react-jsx-runtime.js +11 -0
- package/dist/shims/react-toastify.js +16 -0
- package/dist/shims/react.js +52 -0
- package/dist/theme.js +1 -1
- package/dist/ui.js +1438 -1465
- 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/{VYWUvBJY94uiS3jm4HOFN → 9EKCOng_3jDFmFdZSuNp0}/_buildManifest.js +63 -63
- package/out/_next/static/chunks/0-2b37ubdpy0o.js +7 -0
- package/out/_next/static/chunks/015ge5k3o3f-r.js +226 -0
- package/out/_next/static/chunks/05-ui58k9illr.js +234 -0
- package/out/_next/static/chunks/05au-xyt__0f2.js +3 -0
- package/out/_next/static/chunks/{087a2d-0e1pvn.js → 05nn5xr3ufcsh.js} +1 -1
- package/out/_next/static/chunks/{1m5m15javwn8p.js → 05o_q7jg8wucs.js} +1 -1
- package/out/_next/static/chunks/065x9wl2mga3m.js +11 -0
- package/out/_next/static/chunks/0752goe9_9g2s.js +110 -0
- package/out/_next/static/chunks/07evy5u8ldd1y.js +50 -0
- package/out/_next/static/chunks/07o7bmqljy89r.js +1 -0
- package/out/_next/static/chunks/083ylavob4a8d.js +3 -0
- package/out/_next/static/chunks/09qx8ltnvw8f2.js +12 -0
- package/out/_next/static/chunks/0_o5motvr7gdv.js +21 -0
- package/out/_next/static/chunks/0_puys1lwhv9m.js +16 -0
- package/out/_next/static/chunks/0a_bg-ub3r2eo.js +60 -0
- package/out/_next/static/chunks/0b28h3157pjxr.js +17 -0
- package/out/_next/static/chunks/0bd_--7-52ko6.js +13 -0
- package/out/_next/static/chunks/0bg4_y1qh5y5h.js +47 -0
- package/out/_next/static/chunks/0ckhtcvz1kyxg.js +1 -0
- package/out/_next/static/chunks/{19y4w6_d_qiou.js → 0dnh0kr83_tj0.js} +1 -1
- package/out/_next/static/chunks/0dxu94yin5gdn.js +35 -0
- package/out/_next/static/chunks/0e2c-jlh2q_eq.js +74 -0
- package/out/_next/static/chunks/0e7hhok2eawc3.js +9 -0
- package/out/_next/static/chunks/0el-98_f_r8ex.js +27 -0
- package/out/_next/static/chunks/0g2igd8sj5-gg.js +16 -0
- package/out/_next/static/chunks/0gx9t6j5kx_ho.js +9 -0
- package/out/_next/static/chunks/0i9ymn9xxs0nx.js +18 -0
- package/out/_next/static/chunks/0iebz0rtddbw8.js +15 -0
- package/out/_next/static/chunks/0iqjlf_9c6eo_.js +59 -0
- package/out/_next/static/chunks/0iy11ws57hzzr.js +99 -0
- package/out/_next/static/chunks/0j838r-8ied1f.js +1 -0
- package/out/_next/static/chunks/0jeddko6bac8h.js +1 -0
- package/out/_next/static/chunks/0l4eldqr95f75.js +16 -0
- package/out/_next/static/chunks/0ld6wd2it3xix.js +18 -0
- package/out/_next/static/chunks/0lzvfs3koqtzr.js +15 -0
- package/out/_next/static/chunks/0m6jydfuy_4o3.js +1 -0
- package/out/_next/static/chunks/0mez27zlo26ni.js +103 -0
- package/out/_next/static/chunks/0n9to89fz811b.js +3 -0
- package/out/_next/static/chunks/0nkkcq0-s-9fo.js +1 -0
- package/out/_next/static/chunks/0o7k5vanq57ch.js +807 -0
- package/out/_next/static/chunks/0ou6gsnpn0wml.js +1 -0
- package/out/_next/static/chunks/0pgpevl26rrte.js +13 -0
- package/out/_next/static/chunks/0pji5t2zheb2j.js +234 -0
- package/out/_next/static/chunks/0r5wwinf72z4g.js +1 -0
- package/out/_next/static/chunks/0rgdxqr_0y-g-.js +136 -0
- package/out/_next/static/chunks/0rqjr_lmrk4pz.js +5 -0
- package/out/_next/static/chunks/0s165pqd53i2e.js +13 -0
- package/out/_next/static/chunks/0tej_--_qru5h.js +126 -0
- package/out/_next/static/chunks/0tnyefaaxof6-.js +247 -0
- package/out/_next/static/chunks/{1dsjo02ozub3p.js → 0ubzi2s1spm4e.js} +4 -4
- package/out/_next/static/chunks/0uecw_5mn0zvr.js +110 -0
- package/out/_next/static/chunks/0v0928tdjepyk.js +16 -0
- package/out/_next/static/chunks/0vbqa5pd_ajm5.js +1 -0
- package/out/_next/static/chunks/0w7ic_22nz92w.js +58 -0
- package/out/_next/static/chunks/0x97pf4va0tdj.js +17 -0
- package/out/_next/static/chunks/0y4eg57kgif01.js +1 -0
- package/out/_next/static/chunks/0ywlba3uh1t0x.js +16 -0
- package/out/_next/static/chunks/0zoum0jzrtu0s.js +145 -0
- package/out/_next/static/chunks/10u71-qve349q.js +14 -0
- package/out/_next/static/chunks/10vpdjjvq7u53.js +15 -0
- package/out/_next/static/chunks/13pcz259h-_kj.js +17 -0
- package/out/_next/static/chunks/13u_a5l2xngm4.js +1 -0
- package/out/_next/static/chunks/13wfvr2b0-qlj.js +30 -0
- package/out/_next/static/chunks/151puw-sc__by.js +103 -0
- package/out/_next/static/chunks/15vz50rks0o2-.js +238 -0
- package/out/_next/static/chunks/17b4rvj5k8ye2.js +807 -0
- package/out/_next/static/chunks/188l-km9dyejj.js +34 -0
- package/out/_next/static/chunks/{252n_i72ate30.js → 18juy_eauk94g.js} +2 -2
- package/out/_next/static/chunks/{0k-vf2ns330qm.js → 19eflki8bmivb.js} +1 -1
- package/out/_next/static/chunks/19eu5d-wm2hfr.js +23 -0
- package/out/_next/static/chunks/1_5ba1obzc231.js +1 -0
- package/out/_next/static/chunks/1_lrjs51fhhko.js +807 -0
- package/out/_next/static/chunks/1a5z9hqww-usq.js +20 -0
- package/out/_next/static/chunks/1am9n6exll687.js +807 -0
- package/out/_next/static/chunks/1cqhbfj3zp710.js +1 -0
- package/out/_next/static/chunks/1cy-2yb5j5_9b.js +157 -0
- package/out/_next/static/chunks/{1ji44prsmhq_a.js → 1dt9_bzfioi8a.js} +3 -3
- package/out/_next/static/chunks/1feyuu-4twwai.js +15 -0
- package/out/_next/static/chunks/1i8wb5lh3jac1.js +13 -0
- package/out/_next/static/chunks/1k4ep4igedo8p.js +1 -0
- package/out/_next/static/chunks/1kn74nabrpy14.js +3 -0
- package/out/_next/static/chunks/{34sm1u3s14z4b.js → 1ndk3s-aeqfej.js} +1 -1
- package/out/_next/static/chunks/1ngpcnj86ohnv.js +14 -0
- package/out/_next/static/chunks/1ocvneidf1syf.js +25 -0
- package/out/_next/static/chunks/1og09fg689_nc.js +180 -0
- package/out/_next/static/chunks/1p639idox1vll.js +16 -0
- package/out/_next/static/chunks/1q5b4oexneef5.js +17 -0
- package/out/_next/static/chunks/1q_sewe1wbxsk.js +54 -0
- package/out/_next/static/chunks/1r_e-dk-1oicl.js +2 -0
- package/out/_next/static/chunks/1rkg8vhvo8vgz.js +83 -0
- package/out/_next/static/chunks/1rtv3c_klo0jk.js +1 -0
- package/out/_next/static/chunks/1s8vxngh_0xfn.js +13 -0
- package/out/_next/static/chunks/1srfjl1rurrm9.js +3 -0
- package/out/_next/static/chunks/1t8mb2td_pm1h.js +43 -0
- package/out/_next/static/chunks/1tkaly-z0eb-q.js +14 -0
- package/out/_next/static/chunks/1tvr-10z5x0by.js +104 -0
- package/out/_next/static/chunks/1v-2aqdslc2g1.js +1 -0
- package/out/_next/static/chunks/1w5uao_cylgd1.js +234 -0
- package/out/_next/static/chunks/1x-t9f0f5vr10.js +329 -0
- package/out/_next/static/chunks/1ylgjha1c0ua_.js +124 -0
- package/out/_next/static/chunks/1yp98n-n4gxwy.js +15 -0
- package/out/_next/static/chunks/1yy_-xc9xthfo.js +3 -0
- package/out/_next/static/chunks/1z1esw-t8kopy.js +1 -0
- package/out/_next/static/chunks/1z1jxtjhg_5v6.js +11 -0
- package/out/_next/static/chunks/1zgah7t55d46v.js +19 -0
- package/out/_next/static/chunks/200_u2ywg-be1.js +43 -0
- package/out/_next/static/chunks/205q4wv45jomk.js +13 -0
- package/out/_next/static/chunks/20usp87kxiivk.js +14 -0
- package/out/_next/static/chunks/224p31baeu3c3.js +15 -0
- package/out/_next/static/chunks/22mj125470p07.js +15 -0
- package/out/_next/static/chunks/22ud9v8dzixqk.js +15 -0
- package/out/_next/static/chunks/24-pobk4qjjvp.js +3 -0
- package/out/_next/static/chunks/24mbze45k4evy.js +22 -0
- package/out/_next/static/chunks/26mue2l4069m0.js +22 -0
- package/out/_next/static/chunks/26yksvb45bfug.js +13 -0
- package/out/_next/static/chunks/{1rgwj4dr0k4_b.js → 270ua9t85a7ev.js} +1 -1
- package/out/_next/static/chunks/27jaailh2k450.js +879 -0
- package/out/_next/static/chunks/29m1e34-eyni_.js +9 -0
- package/out/_next/static/chunks/2__i5ksblcvil.js +16 -0
- package/out/_next/static/chunks/2d_tll2e3tyei.js +9 -0
- package/out/_next/static/chunks/2dnjzvnx4dg-n.js +22 -0
- package/out/_next/static/chunks/{34dhtdp_8idgm.js → 2dyj8q92_k5el.js} +112 -62
- package/out/_next/static/chunks/2e47h0g7w7si3.js +7 -0
- package/out/_next/static/chunks/2f16josk9b_cl.js +8 -0
- package/out/_next/static/chunks/2fjmw94mat8m0.js +807 -0
- package/out/_next/static/chunks/{0f7z8oojvqahv.js → 2fo2ki1egxbah.js} +1 -1
- package/out/_next/static/chunks/2g7t-73faoik2.js +15 -0
- package/out/_next/static/chunks/2hg887w-4-saz.js +11 -0
- package/out/_next/static/chunks/2httcwd92at4i.js +9 -0
- package/out/_next/static/chunks/2ib6fee-nqe-z.js +23 -0
- package/out/_next/static/chunks/2j3p_ne416507.js +16 -0
- package/out/_next/static/chunks/2k5rg3rwz2qz1.js +15 -0
- package/out/_next/static/chunks/2kjux30i3gg-c.js +5 -0
- package/out/_next/static/chunks/2l629mu99aqil.js +9 -0
- package/out/_next/static/chunks/2lal4ruoql8-s.js +16 -0
- package/out/_next/static/chunks/2lx_iig9xewfj.js +52 -0
- package/out/_next/static/chunks/2m4su5mqey5cb.js +14 -0
- package/out/_next/static/chunks/2o9hdz0gk1-s7.js +165 -0
- package/out/_next/static/chunks/2on7of8c32boh.js +15 -0
- package/out/_next/static/chunks/2q-mpau-4gsvd.js +1 -0
- package/out/_next/static/chunks/2qzxq2qs80c_8.js +11 -0
- package/out/_next/static/chunks/2rddaar-ns45d.js +116 -0
- package/out/_next/static/chunks/2rywg4dn0aeez.js +1 -0
- package/out/_next/static/chunks/2s6u8274_jzk2.js +105 -0
- package/out/_next/static/chunks/{0qjv_q4seojfh.js → 2skfzjx2g9hkk.js} +7 -3
- package/out/_next/static/chunks/2sw8wfufjrcpb.js +14 -0
- package/out/_next/static/chunks/2szj6o9fr-rib.js +15 -0
- package/out/_next/static/chunks/{1cgliwmj52a0t.js → 2u6jwsqz0uhes.js} +3 -3
- package/out/_next/static/chunks/{08o69avnk4qvk.js → 2v4k4vpb2id7m.js} +1 -1
- package/out/_next/static/chunks/2vkqez8xx-yp9.js +807 -0
- package/out/_next/static/chunks/2ztcyhxd9w5_m.js +1 -0
- package/out/_next/static/chunks/2zynam_mr2g6y.js +21 -0
- package/out/_next/static/chunks/3-xi25w8-k-02.js +15 -0
- package/out/_next/static/chunks/304cl99rh8rs_.js +2 -0
- package/out/_next/static/chunks/30_ns6urg1dkn.js +41 -0
- package/out/_next/static/chunks/{0gurfn3nhm859.js → 313i1x81q2xj1.js} +1 -1
- package/out/_next/static/chunks/325a7n__tfxy_.js +61 -0
- package/out/_next/static/chunks/32gi2dpw3twz7.js +17 -0
- package/out/_next/static/chunks/33emlry70k-lv.js +2 -0
- package/out/_next/static/chunks/{202a3z9hys0o7.js → 346itdsbw-5tn.js} +2 -2
- package/out/_next/static/chunks/348d_4lpnrkzq.js +100 -0
- package/out/_next/static/chunks/351jscvbk_wb9.js +13 -0
- package/out/_next/static/chunks/357odtev0t245.js +59 -0
- package/out/_next/static/chunks/{2oz58zpay0wub.js → 35fjd9uhctw7y.js} +1 -1
- package/out/_next/static/chunks/35mb--fw85e9-.js +20 -0
- package/out/_next/static/chunks/360g4b1clnt45.js +142 -0
- package/out/_next/static/chunks/36aqs7u7s-lb1.js +119 -0
- package/out/_next/static/chunks/36zrtyhmqlx_n.js +807 -0
- package/out/_next/static/chunks/{18yg2pj3hb_in.js → 37uz0njkj43tz.js} +1 -1
- package/out/_next/static/chunks/38ffn8gazqz8_.js +3 -0
- package/out/_next/static/chunks/38kjuo_3xeof3.js +14 -0
- package/out/_next/static/chunks/39-19ao-xkexy.js +2 -0
- package/out/_next/static/chunks/39m5tbxzzsmn4.js +807 -0
- package/out/_next/static/chunks/3bgtu00fe99yc.js +1 -0
- package/out/_next/static/chunks/3c1rc1w-xe4u7.js +39 -0
- package/out/_next/static/chunks/3cdfuacs4_0d-.js +1 -0
- package/out/_next/static/chunks/3d1ofcqmlbg-5.js +52 -0
- package/out/_next/static/chunks/3dopaxkoi5px6.js +1 -0
- package/out/_next/static/chunks/3ic_dagw-uvrx.js +234 -0
- package/out/_next/static/chunks/3jtzvr48aaoo0.js +13 -0
- package/out/_next/static/chunks/3k5lt5_-g36w9.js +9 -0
- package/out/_next/static/chunks/3krpx72smyufn.js +15 -0
- package/out/_next/static/chunks/3l-9xxd1i1sya.js +1 -0
- package/out/_next/static/chunks/3m2hre_c-kclo.js +25 -0
- package/out/_next/static/chunks/3mancxzz8c7hl.js +51 -0
- package/out/_next/static/chunks/3nkse7h0-kbyx.js +126 -0
- package/out/_next/static/chunks/3om1fkw-lrmng.js +1 -0
- package/out/_next/static/chunks/{3m7-q-ztmzcf5.js → 3oynij37wfjb2.js} +2 -2
- package/out/_next/static/chunks/3oz5p4rrvnew1.js +807 -0
- package/out/_next/static/chunks/3p0ir-pqcslbi.js +175 -0
- package/out/_next/static/chunks/{434iz38padke2.js → 3pbyo5kkko3wh.js} +1 -1
- package/out/_next/static/chunks/3pr477_ci25mm.js +22 -0
- package/out/_next/static/chunks/3qjgt-x153i6u.js +234 -0
- package/out/_next/static/chunks/3r54d1b_uyq95.js +13 -0
- package/out/_next/static/chunks/3rh3nigvg06yu.js +337 -0
- package/out/_next/static/chunks/3s-n0xc-vi0ww.js +31 -0
- package/out/_next/static/chunks/3sc7jsyx25g08.js +16 -0
- package/out/_next/static/chunks/3t_3vlnk1ntkb.js +95 -0
- package/out/_next/static/chunks/3ti7tims6gz1j.js +234 -0
- package/out/_next/static/chunks/3tzaludii6vtu.js +54 -0
- package/out/_next/static/chunks/{01q9gliprwq-_.js → 3u504487p_y7e.js} +2 -2
- package/out/_next/static/chunks/3ufg-in2riva7.js +1 -0
- package/out/_next/static/chunks/3ugwv1vrnbivg.js +1 -0
- package/out/_next/static/chunks/3vet2a9q9rf2c.js +61 -0
- package/out/_next/static/chunks/3vjgbl76cgrmt.js +1 -0
- package/out/_next/static/chunks/3vz3gqmojh7sx.js +4 -0
- package/out/_next/static/chunks/3w9xrlkiztuwi.js +23 -0
- package/out/_next/static/chunks/3xmtbqm0gddn8.js +3 -0
- package/out/_next/static/chunks/3yqmjvx7t3t0_.js +1 -0
- package/out/_next/static/chunks/3z3k6qx61arup.js +27 -0
- package/out/_next/static/chunks/401o5bfi_90qs.js +141 -0
- package/out/_next/static/chunks/40xhwnc_48o73.js +297 -0
- package/out/_next/static/chunks/41e2wlkp9_pvk.js +28 -0
- package/out/_next/static/chunks/41g7mv3yuhz6k.js +68 -0
- package/out/_next/static/chunks/429ihwc6co7u7.js +32 -0
- package/out/_next/static/chunks/42x9tn0uff92o.js +15 -0
- package/out/_next/static/chunks/43jyzccx6x0lw.js +1 -0
- package/out/_next/static/chunks/44daaafswok67.css +1 -0
- package/out/_next/static/chunks/turbopack-02-k6w2e9_3af.js +1 -0
- package/out/_next/static/chunks/{turbopack-04ukk4jyuwwfc.js → turbopack-03fj2scz_09ul.js} +1 -1
- package/out/_next/static/chunks/{turbopack-40xcd2mr6qovi.js → turbopack-0_42u9tky4zng.js} +1 -1
- package/out/_next/static/chunks/turbopack-0gnmdx6ye6n_e.js +1 -0
- package/out/_next/static/chunks/turbopack-0iozo8xy34oiw.js +1 -0
- package/out/_next/static/chunks/turbopack-0rb_mm-wnau-3.js +1 -0
- package/out/_next/static/chunks/{turbopack-29n-soxzu37jf.js → turbopack-0v5-op7r79bhf.js} +1 -1
- package/out/_next/static/chunks/{turbopack-34749rlp0_n5c.js → turbopack-0zf_85we0x_rs.js} +1 -1
- package/out/_next/static/chunks/turbopack-1-ukcimwb2wq1.js +1 -0
- package/out/_next/static/chunks/turbopack-10anz7o9kcb98.js +1 -0
- package/out/_next/static/chunks/{turbopack-0w2ztfttfubzl.js → turbopack-12-4lgc8wbnmx.js} +1 -1
- package/out/_next/static/chunks/turbopack-14bpgd3qmna2b.js +1 -0
- package/out/_next/static/chunks/{turbopack-04s7-zvvb1coi.js → turbopack-16ecm5pf7vta6.js} +1 -1
- package/out/_next/static/chunks/{turbopack-298r66lt68r_n.js → turbopack-16gej7p33tsw5.js} +1 -1
- package/out/_next/static/chunks/{turbopack-41cj0-dssfw9l.js → turbopack-1iglf5syrme2d.js} +1 -1
- package/out/_next/static/chunks/turbopack-1l2mxrtt6fj2q.js +1 -0
- package/out/_next/static/chunks/turbopack-1nwkuzx-97xdl.js +1 -0
- package/out/_next/static/chunks/{turbopack-1h9u07n6a83dl.js → turbopack-1od40dnbx8fg3.js} +1 -1
- package/out/_next/static/chunks/turbopack-1qg_72lzl6ek8.js +1 -0
- package/out/_next/static/chunks/turbopack-1rmjnbaunrx2u.js +1 -0
- package/out/_next/static/chunks/{turbopack-3b2k0p0g1mako.js → turbopack-1wpa09idv1cyh.js} +1 -1
- package/out/_next/static/chunks/turbopack-1ykuk8u3enawr.js +1 -0
- package/out/_next/static/chunks/{turbopack-0cwxwz82vstff.js → turbopack-21_p8k9zs76-x.js} +1 -1
- package/out/_next/static/chunks/{turbopack-13v4uorj3l10n.js → turbopack-220rj632xmu2e.js} +1 -1
- package/out/_next/static/chunks/turbopack-22p012gdqk61c.js +1 -0
- package/out/_next/static/chunks/turbopack-25j7jj4dskbwu.js +1 -0
- package/out/_next/static/chunks/turbopack-27pc-r2lunwha.js +1 -0
- package/out/_next/static/chunks/{turbopack-3p-k1txa6-4ik.js → turbopack-2bb143jjb45b6.js} +1 -1
- package/out/_next/static/chunks/turbopack-2esinq43hb-vc.js +1 -0
- package/out/_next/static/chunks/{turbopack-32kxihayw_v97.js → turbopack-2g3vf-v8r3qd2.js} +1 -1
- package/out/_next/static/chunks/{turbopack-1noe2ur-_o71n.js → turbopack-2gxln6h99_6pp.js} +1 -1
- package/out/_next/static/chunks/{turbopack-3j07f1odh4keh.js → turbopack-2j5sxbr_zaxjf.js} +1 -1
- package/out/_next/static/chunks/turbopack-2j61phdts4xpn.js +1 -0
- package/out/_next/static/chunks/{turbopack-2k2d3c2qq-0z0.js → turbopack-2nd6qjscj3z2p.js} +1 -1
- package/out/_next/static/chunks/turbopack-2o76al0gsswxo.js +1 -0
- package/out/_next/static/chunks/turbopack-2pe-c3nyyswmm.js +1 -0
- package/out/_next/static/chunks/{turbopack-0sv7lr_kx3kdq.js → turbopack-2tz1t67cqt8ex.js} +1 -1
- package/out/_next/static/chunks/turbopack-2u-4w10t8mu6i.js +1 -0
- package/out/_next/static/chunks/turbopack-2u879ap4um9kt.js +1 -0
- package/out/_next/static/chunks/turbopack-2ubl1vyufevbf.js +1 -0
- package/out/_next/static/chunks/{turbopack-1wqjl3y4c1ij-.js → turbopack-2x85w-5txf7i5.js} +1 -1
- package/out/_next/static/chunks/turbopack-32oolm1x2hqm8.js +1 -0
- package/out/_next/static/chunks/turbopack-32unbrrzdhim9.js +1 -0
- package/out/_next/static/chunks/{turbopack-3jw01psrsjqdi.js → turbopack-37e-e484qmc03.js} +1 -1
- package/out/_next/static/chunks/turbopack-3aa45-9tjh99k.js +1 -0
- package/out/_next/static/chunks/{turbopack-1-ceqxb_000x-.js → turbopack-3d9zuhypuljic.js} +1 -1
- package/out/_next/static/chunks/turbopack-3dl00zga30bss.js +1 -0
- package/out/_next/static/chunks/turbopack-3f06s1e12y6j9.js +1 -0
- package/out/_next/static/chunks/{turbopack-0qa163y1bx_g6.js → turbopack-3g98_iakkqypg.js} +1 -1
- package/out/_next/static/chunks/turbopack-3j4bdo8-ldea5.js +1 -0
- package/out/_next/static/chunks/{turbopack-1au-y5u3wzv22.js → turbopack-3l3o1x7j1z_63.js} +1 -1
- package/out/_next/static/chunks/{turbopack-1sllc7f9its9a.js → turbopack-3lm631px3s8-4.js} +1 -1
- package/out/_next/static/chunks/{turbopack-14kspgbfigjpa.js → turbopack-3mwf6he42ff9n.js} +1 -1
- package/out/_next/static/chunks/turbopack-3oih6rrmvb7t3.js +1 -0
- package/out/_next/static/chunks/turbopack-3oq88d3632ksa.js +1 -0
- package/out/_next/static/chunks/turbopack-3q1s32jzw2pnu.js +1 -0
- package/out/_next/static/chunks/turbopack-3snas0eww9sey.js +1 -0
- package/out/_next/static/chunks/turbopack-3tg-pp9_bemtn.js +1 -0
- package/out/_next/static/chunks/turbopack-3tlngjwse53m1.js +1 -0
- package/out/_next/static/chunks/turbopack-3tp3s3o8o9e-_.js +1 -0
- package/out/_next/static/chunks/turbopack-3tyhe6yjnx5h6.js +1 -0
- package/out/_next/static/chunks/turbopack-3v3wnwaeu0os5.js +1 -0
- package/out/_next/static/chunks/turbopack-3xc_rmnnnzfkm.js +1 -0
- package/out/_next/static/chunks/turbopack-4592lth1oe0jg.js +1 -0
- 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/ext/[[...slug]]/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 +18 -13
- package/src/sdk/README.md +195 -0
- package/src/sdk/plugin-build.mjs +83 -98
- package/src/sdk/plugin-build.test.mjs +39 -4
- package/src/sdk/plugin-runtime.cjs +66 -0
- package/src/sdk/plugin-runtime.d.mts +11 -0
- package/src/sdk/plugin-runtime.mjs +27 -0
- package/src/sdk/plugin-runtime.test.mjs +32 -0
- package/src/sdk/plugins.mjs +17 -0
- package/src/sdk/plugins.ts +17 -0
- package/src/sdk/shims/admin-ui-plugins.ts +3 -0
- package/src/sdk/shims/apollo-client-react.ts +3 -0
- package/src/sdk/shims/apollo-client.ts +3 -0
- package/src/sdk/shims/host.ts +61 -0
- package/src/sdk/shims/next-head.ts +3 -0
- package/src/sdk/shims/next-image.ts +3 -0
- package/src/sdk/shims/next-link.ts +3 -0
- package/src/sdk/shims/next-router.ts +3 -0
- package/src/sdk/shims/react-dom-client.ts +3 -0
- package/src/sdk/shims/react-dom.ts +3 -0
- package/src/sdk/shims/react-hook-form.ts +3 -0
- package/src/sdk/shims/react-intl.ts +3 -0
- package/src/sdk/shims/react-jsx-runtime.ts +3 -0
- package/src/sdk/shims/react-toastify.ts +3 -0
- package/src/sdk/shims/react.ts +3 -0
- package/out/_next/static/chunks/00zpb_zgq36h-.js +0 -14
- package/out/_next/static/chunks/02aa23atze2y4.js +0 -119
- package/out/_next/static/chunks/02u93m0n7n-q-.js +0 -12
- package/out/_next/static/chunks/03n4up296yhei.js +0 -138
- package/out/_next/static/chunks/03zrzz0sb-gy8.js +0 -14
- package/out/_next/static/chunks/044dmimivt13x.js +0 -233
- package/out/_next/static/chunks/07pwkvl-lm4vp.js +0 -24
- package/out/_next/static/chunks/08vf2wf3mxta3.js +0 -13
- package/out/_next/static/chunks/094s-grteo6tb.js +0 -31
- package/out/_next/static/chunks/0_wt7zjqgpl76.js +0 -807
- package/out/_next/static/chunks/0a81cjauoijka.js +0 -1
- package/out/_next/static/chunks/0ab_-095b34n5.js +0 -90
- package/out/_next/static/chunks/0ac9c5ecooaav.js +0 -234
- package/out/_next/static/chunks/0b--0624xswmi.js +0 -16
- package/out/_next/static/chunks/0b3hl4d_27v6q.js +0 -173
- package/out/_next/static/chunks/0braigkg4hdry.js +0 -39
- package/out/_next/static/chunks/0cdcsn87u-tzw.js +0 -1
- package/out/_next/static/chunks/0d9cf7svcpjcu.js +0 -1
- package/out/_next/static/chunks/0eooy6dat270h.js +0 -226
- package/out/_next/static/chunks/0ety-u93s5lsq.js +0 -188
- package/out/_next/static/chunks/0fb5j_lva6f8h.js +0 -19
- package/out/_next/static/chunks/0hm6-xlqw4vmr.js +0 -1
- package/out/_next/static/chunks/0im5k2e2u2uz_.js +0 -8
- package/out/_next/static/chunks/0iv288bepx0ug.js +0 -29
- package/out/_next/static/chunks/0ld2eenwz_blg.js +0 -52
- package/out/_next/static/chunks/0m9y8-nk64c1e.js +0 -12
- package/out/_next/static/chunks/0nz8nqr7k7pni.js +0 -61
- package/out/_next/static/chunks/0pyfoz6288y0f.js +0 -1
- package/out/_next/static/chunks/0qfjbvj6nn9zr.js +0 -18
- package/out/_next/static/chunks/0r0l1vs8bls6y.js +0 -1
- package/out/_next/static/chunks/0r2v5se5riad_.js +0 -227
- package/out/_next/static/chunks/0rdl1jrsef2ew.js +0 -3
- package/out/_next/static/chunks/0sutuaadm9sa2.js +0 -11
- package/out/_next/static/chunks/0tmo-o_wjgk4-.js +0 -8
- package/out/_next/static/chunks/0u-md-qpvyccn.js +0 -149
- package/out/_next/static/chunks/0u881hesm8z4s.js +0 -14
- package/out/_next/static/chunks/0u_efcr52k9v1.js +0 -15
- package/out/_next/static/chunks/0ukobsq85_to1.js +0 -135
- package/out/_next/static/chunks/0vxvcl2s96x4f.js +0 -24
- package/out/_next/static/chunks/0vyfm3usoot1p.js +0 -60
- package/out/_next/static/chunks/0wr0r7tr1jbcz.js +0 -10
- package/out/_next/static/chunks/0x_i69reqib8u.js +0 -3
- package/out/_next/static/chunks/0xxl7fb2bi8_8.js +0 -82
- package/out/_next/static/chunks/0z7jldn83dst6.js +0 -13
- package/out/_next/static/chunks/1-4f-vlpf5end.js +0 -43
- package/out/_next/static/chunks/1293ysgb8y4y3.js +0 -12
- package/out/_next/static/chunks/129pi8m3j6761.js +0 -1
- package/out/_next/static/chunks/12lbg_ctrshrg.js +0 -1
- package/out/_next/static/chunks/13f9ypdy9t6l8.js +0 -15
- package/out/_next/static/chunks/13g90lbjehcp1.js +0 -12
- package/out/_next/static/chunks/1413uu5ol2rfr.js +0 -166
- package/out/_next/static/chunks/15-duc2e3btcy.js +0 -1
- package/out/_next/static/chunks/155jjdhtr4dhn.js +0 -30
- package/out/_next/static/chunks/1679i7xv8jnle.js +0 -117
- package/out/_next/static/chunks/16a-8jlyrl0m8.js +0 -12
- package/out/_next/static/chunks/16bdu48a5vry_.js +0 -13
- package/out/_next/static/chunks/16r_t7quts1w0.js +0 -289
- package/out/_next/static/chunks/189epg0ebf7bc.js +0 -13
- package/out/_next/static/chunks/18ujb5-7bg1p4.js +0 -1
- package/out/_next/static/chunks/19fzi9f2kw8zv.js +0 -233
- package/out/_next/static/chunks/1_ov-8bomgh6c.js +0 -54
- package/out/_next/static/chunks/1axp79-x4n7i4.js +0 -242
- package/out/_next/static/chunks/1bga5_ny7avyr.js +0 -23
- package/out/_next/static/chunks/1bgsls3okrjue.js +0 -1
- package/out/_next/static/chunks/1cliieayy_gw1.js +0 -13
- package/out/_next/static/chunks/1cvyi5qu_s_d7.js +0 -10
- package/out/_next/static/chunks/1dcw-b0uqh6b0.js +0 -1
- package/out/_next/static/chunks/1drrou5kp4qdz.js +0 -1
- package/out/_next/static/chunks/1e4ue1_7qn6kz.js +0 -14
- package/out/_next/static/chunks/1emope9zm_-ch.js +0 -14
- package/out/_next/static/chunks/1f7ar56dj5j8s.js +0 -21
- package/out/_next/static/chunks/1fk9whsy-495f.js +0 -1
- package/out/_next/static/chunks/1fp7uihlvzcij.js +0 -13
- package/out/_next/static/chunks/1g0syfr6r0rj8.js +0 -111
- package/out/_next/static/chunks/1g5l7e7du4p25.js +0 -1
- package/out/_next/static/chunks/1h03py7retxw8.js +0 -13
- package/out/_next/static/chunks/1i6-vxhyp4fan.js +0 -73
- package/out/_next/static/chunks/1ihjqvn68cj5e.js +0 -36
- package/out/_next/static/chunks/1ij-bgloqrwlw.js +0 -809
- package/out/_next/static/chunks/1l1_ntden2a5-.js +0 -58
- package/out/_next/static/chunks/1m0x2mb91rv2i.js +0 -13
- package/out/_next/static/chunks/1mw35msx036qx.js +0 -66
- package/out/_next/static/chunks/1ou8q3ltdifd1.js +0 -34
- package/out/_next/static/chunks/1prx7jjoz9cq8.js +0 -3
- package/out/_next/static/chunks/1q1js93yqv2ym.js +0 -14
- package/out/_next/static/chunks/1qkgln72hya5g.js +0 -1
- package/out/_next/static/chunks/1qn6du1pk46f0.js +0 -14
- package/out/_next/static/chunks/1r_q8-_cl6_b-.js +0 -23
- package/out/_next/static/chunks/1rirgtcu6_bpa.js +0 -17
- package/out/_next/static/chunks/1rpgl9uhsj7jq.js +0 -28
- package/out/_next/static/chunks/1tzo3v9d5ccon.js +0 -15
- package/out/_next/static/chunks/1uculcrefh01f.js +0 -16
- package/out/_next/static/chunks/1uinfdu-lhddb.js +0 -1
- package/out/_next/static/chunks/1uiqmuia9hpwc.js +0 -32
- package/out/_next/static/chunks/1ukg1j06gk9j7.js +0 -233
- package/out/_next/static/chunks/1v2r-dm5xnwxd.js +0 -95
- package/out/_next/static/chunks/1x8c4f-tlz8oq.js +0 -54
- package/out/_next/static/chunks/1xic7x33en-_t.js +0 -46
- package/out/_next/static/chunks/1y-vwb0-v5xv0.js +0 -304
- package/out/_next/static/chunks/1ymswtxkxcnfi.js +0 -11
- package/out/_next/static/chunks/1yrby6v2msnio.js +0 -13
- package/out/_next/static/chunks/1yx8v1-jzs__q.js +0 -234
- package/out/_next/static/chunks/1yxsj_p-0xiav.js +0 -14
- package/out/_next/static/chunks/2-1ihmwxm5nd8.js +0 -13
- package/out/_next/static/chunks/2-hsn5zne_kbo.js +0 -18
- package/out/_next/static/chunks/20ndjd4r5l6vk.js +0 -1
- package/out/_next/static/chunks/22l-2aehes9lx.js +0 -153
- package/out/_next/static/chunks/23ju3v8ue0m8a.js +0 -8
- package/out/_next/static/chunks/23lmor9w4r767.js +0 -1
- package/out/_next/static/chunks/24p5ic154k1id.js +0 -50
- package/out/_next/static/chunks/250qu8q7duhe7.js +0 -1
- package/out/_next/static/chunks/25asi1rq6d8hb.js +0 -7
- package/out/_next/static/chunks/263u-_eyq54xn.js +0 -155
- package/out/_next/static/chunks/26ca8aneaqvre.js +0 -2
- package/out/_next/static/chunks/27_5des_qn7kz.js +0 -1
- package/out/_next/static/chunks/27ek8w2c2mk46.js +0 -15
- package/out/_next/static/chunks/28d90lqq_6ddl.js +0 -135
- package/out/_next/static/chunks/29yitf66u5w9d.js +0 -1
- package/out/_next/static/chunks/2_3qu55ddb4jo.js +0 -3
- package/out/_next/static/chunks/2b8nhs_3rpawc.js +0 -1
- package/out/_next/static/chunks/2bby8chs2h2zt.js +0 -190
- package/out/_next/static/chunks/2ch1ir5bauqm-.js +0 -41
- package/out/_next/static/chunks/2cwzq52lgg7tg.js +0 -147
- package/out/_next/static/chunks/2dbrybnhe5thu.css +0 -1
- package/out/_next/static/chunks/2dddh3jepg6r9.js +0 -22
- package/out/_next/static/chunks/2epfbio36cp2x.js +0 -13
- package/out/_next/static/chunks/2ev7bgw2foqui.js +0 -12
- package/out/_next/static/chunks/2f0e2t3pz-rua.js +0 -1
- package/out/_next/static/chunks/2ibnigbqfhrjb.js +0 -8
- package/out/_next/static/chunks/2iuu4shi025hv.js +0 -10
- package/out/_next/static/chunks/2n3x1m3a_ria_.js +0 -1
- package/out/_next/static/chunks/2ngg-2uli_wsk.js +0 -17
- package/out/_next/static/chunks/2nofj6ud99639.js +0 -2
- package/out/_next/static/chunks/2onfts3kpe9d8.js +0 -1
- package/out/_next/static/chunks/2rdh3y4-gf0r1.js +0 -7
- package/out/_next/static/chunks/2ry72x6et3uyk.js +0 -235
- package/out/_next/static/chunks/2t2zzfasof1ej.js +0 -18
- package/out/_next/static/chunks/2tw-iq1oliu-h.js +0 -1
- package/out/_next/static/chunks/2twd9trj9horc.js +0 -61
- package/out/_next/static/chunks/2uln0xj_hk2xv.js +0 -22
- package/out/_next/static/chunks/2x0c4v5dipld3.js +0 -13
- package/out/_next/static/chunks/2xhllcys1_u52.js +0 -14
- package/out/_next/static/chunks/3-n5bzlk225-y.js +0 -1
- package/out/_next/static/chunks/3154519pby2gj.js +0 -5
- package/out/_next/static/chunks/327jk4epgudqh.js +0 -110
- package/out/_next/static/chunks/334lcmrt6lgtz.js +0 -14
- package/out/_next/static/chunks/33bnjdrokmipf.js +0 -12
- package/out/_next/static/chunks/33g91_yljnpiw.js +0 -807
- package/out/_next/static/chunks/33getgbb1rmpa.js +0 -43
- package/out/_next/static/chunks/342etvf_c28cb.js +0 -39
- package/out/_next/static/chunks/34kqgu8bnykwx.js +0 -315
- package/out/_next/static/chunks/34zya3wqxvl8k.js +0 -19
- package/out/_next/static/chunks/35k7e1g1muu56.js +0 -5
- package/out/_next/static/chunks/399t21noeueqk.js +0 -13
- package/out/_next/static/chunks/39ze4mwy903wm.js +0 -13
- package/out/_next/static/chunks/3_8h-x8lcmhr7.js +0 -339
- package/out/_next/static/chunks/3_j5zrbyysq1g.js +0 -31
- package/out/_next/static/chunks/3a8a8fpl7-ndf.js +0 -1
- package/out/_next/static/chunks/3a9g7ouf888jt.js +0 -1
- package/out/_next/static/chunks/3anxg7pk9-h3t.js +0 -50
- package/out/_next/static/chunks/3blzs4z5wryub.js +0 -1
- package/out/_next/static/chunks/3cfkqo3t0m0es.js +0 -3
- package/out/_next/static/chunks/3coz1fo064u6a.js +0 -12
- package/out/_next/static/chunks/3cr1as0q659er.js +0 -1
- package/out/_next/static/chunks/3crdcex_nrx3o.js +0 -12
- package/out/_next/static/chunks/3crkl2ligc-kt.js +0 -14
- package/out/_next/static/chunks/3d0ic2ovyeue7.js +0 -2
- package/out/_next/static/chunks/3ddaet08eakmw.js +0 -18
- package/out/_next/static/chunks/3dh3x6thy7fef.js +0 -1
- package/out/_next/static/chunks/3e75y5wr7_vem.js +0 -327
- package/out/_next/static/chunks/3e98ykfx_vamf.js +0 -60
- package/out/_next/static/chunks/3eq-uts_yz1e5.js +0 -1
- package/out/_next/static/chunks/3ghzaufs2n8uq.js +0 -2
- package/out/_next/static/chunks/3ie60090urams.js +0 -16
- package/out/_next/static/chunks/3jffivfbeet7f.js +0 -15
- package/out/_next/static/chunks/3mskn3uvx6s77.js +0 -142
- package/out/_next/static/chunks/3oppyz2wurlv-.js +0 -329
- package/out/_next/static/chunks/3p-pioxz8jyip.js +0 -15
- package/out/_next/static/chunks/3po1wffu1pc3k.js +0 -12
- package/out/_next/static/chunks/3rvxjwpm2hkzt.js +0 -13
- package/out/_next/static/chunks/3snnfwi0hsfwy.js +0 -31
- package/out/_next/static/chunks/3so-jsqyai73m.js +0 -1
- package/out/_next/static/chunks/3voheu4m42ctw.js +0 -14
- package/out/_next/static/chunks/3x3oqxb68-ull.js +0 -7
- package/out/_next/static/chunks/3ysj3lx_q697-.js +0 -124
- package/out/_next/static/chunks/3zncjth-kop8p.js +0 -1
- package/out/_next/static/chunks/3zp4iedgev460.js +0 -35
- package/out/_next/static/chunks/40jzqlki-ix7b.js +0 -17
- package/out/_next/static/chunks/4138xi7jgdv_o.js +0 -107
- package/out/_next/static/chunks/413d2n3_vvshb.js +0 -14
- package/out/_next/static/chunks/41mslgyvxwsej.js +0 -1
- package/out/_next/static/chunks/44kw4hk598ruu.js +0 -1
- package/out/_next/static/chunks/44um3bi95nxcy.js +0 -1
- package/out/_next/static/chunks/44xj9eghssy4h.js +0 -1
- package/out/_next/static/chunks/turbopack-00bqo3amk802l.js +0 -1
- package/out/_next/static/chunks/turbopack-00xv5x2980kaw.js +0 -1
- package/out/_next/static/chunks/turbopack-07riv31885zxj.js +0 -1
- package/out/_next/static/chunks/turbopack-0_sc_n1p1bcp9.js +0 -1
- package/out/_next/static/chunks/turbopack-0a3d8s54evtiu.js +0 -1
- package/out/_next/static/chunks/turbopack-0eg08vs3s4808.js +0 -1
- package/out/_next/static/chunks/turbopack-0j5aiynif9rh6.js +0 -1
- package/out/_next/static/chunks/turbopack-0utbjxefp9fml.js +0 -1
- package/out/_next/static/chunks/turbopack-12eu9ngd0g762.js +0 -1
- package/out/_next/static/chunks/turbopack-169mif_3j2xs7.js +0 -1
- package/out/_next/static/chunks/turbopack-16y9ecuw-sg_1.js +0 -1
- package/out/_next/static/chunks/turbopack-17gr4a9fxe8he.js +0 -1
- package/out/_next/static/chunks/turbopack-19agtluuz9hs9.js +0 -1
- package/out/_next/static/chunks/turbopack-1qm1ao7m24ujy.js +0 -1
- package/out/_next/static/chunks/turbopack-1tefm98ftz444.js +0 -1
- package/out/_next/static/chunks/turbopack-1yd96mx8ypi2r.js +0 -1
- package/out/_next/static/chunks/turbopack-1yr-b62bnm8pn.js +0 -1
- package/out/_next/static/chunks/turbopack-20jztdd3emk_4.js +0 -1
- package/out/_next/static/chunks/turbopack-24wh5-0ze4f20.js +0 -1
- package/out/_next/static/chunks/turbopack-27e97jv6b-s-_.js +0 -1
- package/out/_next/static/chunks/turbopack-2_-s3bsa7fy5n.js +0 -1
- package/out/_next/static/chunks/turbopack-2agmtzzi93gcu.js +0 -1
- package/out/_next/static/chunks/turbopack-2krkwbmqyusjo.js +0 -1
- package/out/_next/static/chunks/turbopack-2ktr6ad7w59-u.js +0 -1
- package/out/_next/static/chunks/turbopack-2o3ztc3qxaqmv.js +0 -1
- package/out/_next/static/chunks/turbopack-2ocojyxy_6ohm.js +0 -1
- package/out/_next/static/chunks/turbopack-2p09rgir8a_rr.js +0 -1
- package/out/_next/static/chunks/turbopack-2s314huts4-ih.js +0 -1
- package/out/_next/static/chunks/turbopack-2uy0-z_9q9r-t.js +0 -1
- package/out/_next/static/chunks/turbopack-2xkr4g1kb-c30.js +0 -1
- package/out/_next/static/chunks/turbopack-38uc2-slitwye.js +0 -1
- package/out/_next/static/chunks/turbopack-3_vxq7t7y83kn.js +0 -1
- package/out/_next/static/chunks/turbopack-3b4ho7bon8y1n.js +0 -1
- package/out/_next/static/chunks/turbopack-3ldzloccscyev.js +0 -1
- package/out/_next/static/chunks/turbopack-3o2wlpvy73vfc.js +0 -1
- package/out/_next/static/chunks/turbopack-3u8iq4uiukeh-.js +0 -1
- package/out/_next/static/chunks/turbopack-3ywen4wf3l3h-.js +0 -1
- package/out/_next/static/chunks/turbopack-3zajpzv2knbum.js +0 -1
- package/out/_next/static/chunks/turbopack-42c24-sypz5zz.js +0 -1
- /package/dist/{chunk-BYXBJQAS.js → chunk-QWQ3WJJN.js} +0 -0
- /package/out/_next/static/{VYWUvBJY94uiS3jm4HOFN → 9EKCOng_3jDFmFdZSuNp0}/_clientMiddlewareManifest.js +0 -0
- /package/out/_next/static/{VYWUvBJY94uiS3jm4HOFN → 9EKCOng_3jDFmFdZSuNp0}/_ssgManifest.js +0 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unchainedshop/admin-ui",
|
|
3
3
|
"license": "EUPL-1.2",
|
|
4
|
-
"version": "5.0.0-alpha.
|
|
4
|
+
"version": "5.0.0-alpha.8",
|
|
5
5
|
"description": "Unchained Commerce Admin UI Template",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./out/index.html",
|
|
@@ -29,11 +29,16 @@
|
|
|
29
29
|
},
|
|
30
30
|
"./theme": {
|
|
31
31
|
"import": "./dist/theme.js",
|
|
32
|
-
"types": "./
|
|
32
|
+
"types": "./src/sdk/theme.ts"
|
|
33
33
|
},
|
|
34
34
|
"./plugins": {
|
|
35
|
-
"import": "./
|
|
36
|
-
"types": "./
|
|
35
|
+
"import": "./src/sdk/plugins.mjs",
|
|
36
|
+
"types": "./src/sdk/plugins.ts"
|
|
37
|
+
},
|
|
38
|
+
"./plugin-runtime": {
|
|
39
|
+
"types": "./src/sdk/plugin-runtime.d.mts",
|
|
40
|
+
"import": "./src/sdk/plugin-runtime.mjs",
|
|
41
|
+
"require": "./src/sdk/plugin-runtime.cjs"
|
|
37
42
|
},
|
|
38
43
|
"./plugin-build": {
|
|
39
44
|
"import": "./src/sdk/plugin-build.mjs"
|
|
@@ -106,7 +111,7 @@
|
|
|
106
111
|
"scripts": {
|
|
107
112
|
"prepublishOnly": "npm run build",
|
|
108
113
|
"dev": "next dev",
|
|
109
|
-
"build": "NODE_ENV=production next build &&
|
|
114
|
+
"build": "NODE_ENV=production next build && npm run build:sdk",
|
|
110
115
|
"build:sdk": "tsup && tsc -p tsconfig.sdk.json",
|
|
111
116
|
"start": "next start",
|
|
112
117
|
"lint": "eslint .",
|
|
@@ -129,7 +134,7 @@
|
|
|
129
134
|
"codegen": "graphql-codegen --config codegen.ts"
|
|
130
135
|
},
|
|
131
136
|
"engines": {
|
|
132
|
-
"node": ">=
|
|
137
|
+
"node": ">=26.0.0",
|
|
133
138
|
"npm": ">=10.0.0"
|
|
134
139
|
},
|
|
135
140
|
"contributors": [
|
|
@@ -161,7 +166,7 @@
|
|
|
161
166
|
"@typescript-eslint/parser": "^8.43.0",
|
|
162
167
|
"ai": "^7.0.79",
|
|
163
168
|
"clsx": "^2.1.1",
|
|
164
|
-
"cypress": "^
|
|
169
|
+
"cypress": "^16.0.0",
|
|
165
170
|
"d3": "^7.9.0",
|
|
166
171
|
"date-fns": "^4.1.0",
|
|
167
172
|
"date-fns-tz": "^3.2.0",
|
|
@@ -169,22 +174,22 @@
|
|
|
169
174
|
"eslint": "^10.0.0",
|
|
170
175
|
"eslint-config-prettier": "^10.1.8",
|
|
171
176
|
"eslint-plugin-cypress": "^7.0.1",
|
|
172
|
-
"eslint-plugin-formatjs": "^
|
|
177
|
+
"eslint-plugin-formatjs": "^8.0.5",
|
|
173
178
|
"eslint-plugin-prettier": "^5.5.4",
|
|
174
179
|
"react-hook-form": "^7.81.0",
|
|
175
180
|
"globals": "^17.0.0",
|
|
176
181
|
"graphql": "^17.0.2",
|
|
177
|
-
"intl-messageformat": "^
|
|
182
|
+
"intl-messageformat": "^12.1.2",
|
|
178
183
|
"lodash.isequal": "^4.5.0",
|
|
179
184
|
"lucide-react": "^1.7.0",
|
|
180
185
|
"next": "^16.0.10",
|
|
181
186
|
"npm-run-all": "^4.1.5",
|
|
182
187
|
"papaparse": "^5.5.3",
|
|
183
188
|
"prettier": "^3.7.4",
|
|
184
|
-
"react": "19.
|
|
185
|
-
"react-dom": "19.
|
|
186
|
-
"react-intl": "^
|
|
187
|
-
"react-is": "19.
|
|
189
|
+
"react": "19.3",
|
|
190
|
+
"react-dom": "19.3",
|
|
191
|
+
"react-intl": "^12.1.2",
|
|
192
|
+
"react-is": "19.3",
|
|
188
193
|
"react-markdown": "^10.1.0",
|
|
189
194
|
"react-toastify": "^11.0.5",
|
|
190
195
|
"recharts": "^3.6.0",
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
# Admin UI Plugins
|
|
2
|
+
|
|
3
|
+
Extend the Unchained admin-ui with your own pages, entity managers, tabs, and
|
|
4
|
+
dashboard widgets — without forking it. A plugin is a single ESM bundle plus a
|
|
5
|
+
manifest you register on the engine; the admin-ui discovers and loads it at
|
|
6
|
+
runtime.
|
|
7
|
+
|
|
8
|
+
## How it works
|
|
9
|
+
|
|
10
|
+
- Plugins are built with `definePluginConfig()` from
|
|
11
|
+
`@unchainedshop/admin-ui/plugin-build` into one standard ESM bundle.
|
|
12
|
+
- Dependencies the host app already ships (React, Apollo, react-intl, the
|
|
13
|
+
`@unchainedshop/admin-ui/*` SDK modules, ...) are left as bare import
|
|
14
|
+
specifiers. In the browser, an import map resolves them to the host's own
|
|
15
|
+
module instances, so your plugin runs on the exact same React/Apollo as the
|
|
16
|
+
admin-ui. Everything else you import gets bundled in.
|
|
17
|
+
- The engine serves your bundle under `/admin-plugins/<name>.js` and a
|
|
18
|
+
manifest under `/admin-ui-plugins.json`; the admin-ui loads bundles with a
|
|
19
|
+
native dynamic `import()`.
|
|
20
|
+
|
|
21
|
+
The module graph (which specifiers are shared vs. bundled) is defined in
|
|
22
|
+
[`plugin-runtime.cjs`](./plugin-runtime.cjs), re-exported by `plugin-runtime.mjs` — see `SHARED_DEP_SHIMS` and
|
|
23
|
+
`SDK_ENTRY_KEYS`.
|
|
24
|
+
|
|
25
|
+
## Writing a plugin
|
|
26
|
+
|
|
27
|
+
Minimal project layout (see `examples/kitchensink/plugins/bookmark-manager`
|
|
28
|
+
for a complete one):
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
my-plugin/
|
|
32
|
+
├── package.json
|
|
33
|
+
├── tsup.config.ts
|
|
34
|
+
└── src/
|
|
35
|
+
└── index.tsx
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
`package.json`:
|
|
39
|
+
|
|
40
|
+
```json
|
|
41
|
+
{
|
|
42
|
+
"name": "my-plugin",
|
|
43
|
+
"type": "module",
|
|
44
|
+
"scripts": { "build": "tsup", "build:watch": "tsup --watch" },
|
|
45
|
+
"devDependencies": {
|
|
46
|
+
"@types/react": "^19.0.0",
|
|
47
|
+
"@unchainedshop/admin-ui": "^5.0.0-alpha.8",
|
|
48
|
+
"esbuild": "^0.25.0",
|
|
49
|
+
"react": "^19.0.0",
|
|
50
|
+
"tsup": "^8.0.0"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
`tsup.config.ts`:
|
|
56
|
+
|
|
57
|
+
```ts
|
|
58
|
+
import { definePluginConfig } from '@unchainedshop/admin-ui/plugin-build';
|
|
59
|
+
|
|
60
|
+
export default definePluginConfig('my-plugin');
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
`src/index.tsx` — export every component your manifest references, as named
|
|
64
|
+
exports:
|
|
65
|
+
|
|
66
|
+
```tsx
|
|
67
|
+
export { default as ThingList } from './components/ThingList';
|
|
68
|
+
export { default as ThingDetail } from './components/ThingDetail';
|
|
69
|
+
export { default as ThingWidget } from './components/ThingWidget';
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Inside components you can import from the host SDK:
|
|
73
|
+
|
|
74
|
+
```tsx
|
|
75
|
+
import { Button } from '@unchainedshop/admin-ui/ui';
|
|
76
|
+
import { useForm } from '@unchainedshop/admin-ui/hooks';
|
|
77
|
+
import { useProducts } from '@unchainedshop/admin-ui/modules/product';
|
|
78
|
+
import { usePluginRuntime } from '@unchainedshop/admin-ui/plugins';
|
|
79
|
+
import { useQuery } from '@apollo/client/react';
|
|
80
|
+
import { FormattedMessage } from 'react-intl';
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Registering a plugin on the engine
|
|
84
|
+
|
|
85
|
+
Pass the manifest in the `adminUI.plugins` option of the Express or Fastify
|
|
86
|
+
`connect()`:
|
|
87
|
+
|
|
88
|
+
```ts
|
|
89
|
+
adminUI: {
|
|
90
|
+
plugins: [
|
|
91
|
+
{
|
|
92
|
+
name: 'my-plugin', // [a-z0-9._-], used in URLs
|
|
93
|
+
version: '1.0.0', // optional, informational
|
|
94
|
+
bundlePath: resolve(__dirname, '../plugins/my-plugin/dist/index.js'),
|
|
95
|
+
navigation: { // optional: groups nav items in a submenu
|
|
96
|
+
label: 'My Plugin',
|
|
97
|
+
icon: 'bookmark', // heroicon name
|
|
98
|
+
requiredRole: 'viewProducts',
|
|
99
|
+
sortOrder: 75, // position among sidebar items, see below
|
|
100
|
+
},
|
|
101
|
+
slots: {
|
|
102
|
+
entities: [
|
|
103
|
+
{
|
|
104
|
+
path: '/things', // page lives at /ext/things
|
|
105
|
+
label: 'Things',
|
|
106
|
+
icon: 'bookmark',
|
|
107
|
+
requiredRole: 'viewProducts',
|
|
108
|
+
sortOrder: 75,
|
|
109
|
+
components: {
|
|
110
|
+
list: 'ThingList', // must match a named export of the bundle
|
|
111
|
+
detail: 'ThingDetail',
|
|
112
|
+
create: 'ThingCreate' // optional
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
],
|
|
116
|
+
pages: [
|
|
117
|
+
{ path: '/reports', label: 'Reports', component: 'ReportsPage' },
|
|
118
|
+
],
|
|
119
|
+
'dashboard:widgets': [
|
|
120
|
+
{ component: 'ThingWidget', width: 'half' }, // full | half | third
|
|
121
|
+
],
|
|
122
|
+
'product:tabs': [
|
|
123
|
+
{ label: 'Things', component: 'ProductThingsTab' },
|
|
124
|
+
],
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
],
|
|
128
|
+
}
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Slot types: `entities` (list/detail/create pages under `/ext/<path>`),
|
|
132
|
+
`pages` (single custom page under `/ext/<path>`), `dashboard:widgets`, and
|
|
133
|
+
`<entity>:tabs` for `product`, `assortment`, `filter`, `user`, `order`.
|
|
134
|
+
|
|
135
|
+
- `requiredRole` — action name (such as `viewProducts`) checked against the logged-in user's `allowedActions`; the item is
|
|
136
|
+
hidden without it.
|
|
137
|
+
- `sortOrder` — position in the sidebar. Built-in items use 0–130 in steps of
|
|
138
|
+
10 (Orders 30, Products 40, Users 70, System settings 110, ...). Items
|
|
139
|
+
without a `sortOrder` keep their relative order after ordered ones.
|
|
140
|
+
|
|
141
|
+
At startup the engine validates the manifest against the bundle and logs a
|
|
142
|
+
warning if a referenced component is not exported, if two plugins share a
|
|
143
|
+
name, or if the bundle was built against a different admin-ui SDK version
|
|
144
|
+
than the one running.
|
|
145
|
+
|
|
146
|
+
## Development workflow
|
|
147
|
+
|
|
148
|
+
### Client project with the packaged Admin UI
|
|
149
|
+
|
|
150
|
+
The engine can serve the prebuilt Admin UI from the installed
|
|
151
|
+
`@unchainedshop/admin-ui` npm package while you develop local extensions.
|
|
152
|
+
Register the local plugin's `dist/index.js` as its `bundlePath`, build the
|
|
153
|
+
plugin before starting the engine, and run its build watcher alongside the
|
|
154
|
+
engine. Open the engine's Admin UI URL and refresh after a successful rebuild.
|
|
155
|
+
Only the local extension needs rebuilding; the packaged Admin UI stays prebuilt.
|
|
156
|
+
|
|
157
|
+
Both Kitchensink examples provide this workflow through `npm run dev` in the
|
|
158
|
+
example directory: an initial plugin build followed by backend and plugin
|
|
159
|
+
watchers. `npm run dev:server` starts only the backend. The repository root's
|
|
160
|
+
`npm run dev` also starts Next.js for development of the Admin UI itself.
|
|
161
|
+
|
|
162
|
+
In a standalone project, use published package versions instead of the
|
|
163
|
+
examples' repository-local `file:` dependencies, and use the same
|
|
164
|
+
`@unchainedshop/admin-ui` version for the engine and plugin build. Install the
|
|
165
|
+
plugin's dependencies separately if it is not included in your npm workspaces.
|
|
166
|
+
|
|
167
|
+
### Rebuilds and refreshes
|
|
168
|
+
|
|
169
|
+
Run the plugin build in watch mode next to the engine:
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
cd my-plugin && npm run build:watch
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
In dev mode (`NODE_ENV !== 'production'`) the engine picks up bundle changes
|
|
176
|
+
on the next manifest request — reload the admin-ui to get the new bundle. In
|
|
177
|
+
production, bundles are read once at startup and served with immutable
|
|
178
|
+
caching, keyed by content hash.
|
|
179
|
+
|
|
180
|
+
The plugin bundle must exist when the engine starts. If it was missing at
|
|
181
|
+
startup, build it and restart the engine. This workflow uses browser refreshes;
|
|
182
|
+
it does not provide React Fast Refresh or preserve component state across edits.
|
|
183
|
+
|
|
184
|
+
## Content-Security-Policy
|
|
185
|
+
|
|
186
|
+
The engine injects the import map as an inline `<script type="importmap">`
|
|
187
|
+
tag. If you serve the admin-ui with a strict CSP, provide a nonce and it will
|
|
188
|
+
be added to the tag:
|
|
189
|
+
|
|
190
|
+
- **Express + helmet**: set `res.locals.cspNonce` in a middleware (as in
|
|
191
|
+
helmet's CSP nonce docs) before the admin-ui router.
|
|
192
|
+
- **Fastify + @fastify/helmet**: register with `enableCSPNonces: true`; the
|
|
193
|
+
engine reads `reply.cspNonce.script`.
|
|
194
|
+
|
|
195
|
+
Without a nonce, `script-src` must allow the inline import map tag.
|
package/src/sdk/plugin-build.mjs
CHANGED
|
@@ -1,112 +1,97 @@
|
|
|
1
|
+
import { readFileSync } from 'node:fs';
|
|
1
2
|
import { defineConfig } from 'tsup';
|
|
3
|
+
import { PLUGIN_EXTERNALS } from './plugin-runtime.mjs';
|
|
2
4
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
'useRef',
|
|
11
|
-
'useMemo',
|
|
12
|
-
'useContext',
|
|
13
|
-
'useReducer',
|
|
14
|
-
'useLayoutEffect',
|
|
15
|
-
'createContext',
|
|
16
|
-
'createElement',
|
|
17
|
-
'Fragment',
|
|
18
|
-
'Component',
|
|
19
|
-
'forwardRef',
|
|
20
|
-
'memo',
|
|
21
|
-
'lazy',
|
|
22
|
-
'Suspense',
|
|
23
|
-
'Children',
|
|
24
|
-
'cloneElement',
|
|
25
|
-
'isValidElement',
|
|
26
|
-
'createRef',
|
|
27
|
-
'StrictMode',
|
|
28
|
-
],
|
|
29
|
-
},
|
|
30
|
-
'react/jsx-runtime': {
|
|
31
|
-
named: ['jsx', 'jsxs', 'Fragment'],
|
|
32
|
-
},
|
|
33
|
-
'@apollo/client': {
|
|
34
|
-
named: ['gql', 'useQuery', 'useMutation', 'useLazyQuery', 'useApolloClient'],
|
|
35
|
-
},
|
|
36
|
-
'@apollo/client/react': {
|
|
37
|
-
named: ['useQuery', 'useMutation', 'useLazyQuery', 'useApolloClient'],
|
|
38
|
-
},
|
|
39
|
-
'next/router': {
|
|
40
|
-
named: ['useRouter'],
|
|
41
|
-
},
|
|
42
|
-
'react-intl': {
|
|
43
|
-
named: ['useIntl', 'FormattedMessage', 'defineMessages'],
|
|
44
|
-
},
|
|
45
|
-
'react-toastify': {
|
|
46
|
-
named: ['toast'],
|
|
47
|
-
},
|
|
48
|
-
'react-hook-form': {
|
|
49
|
-
named: ['useForm', 'useFormContext', 'useController', 'useFieldArray', 'useWatch', 'FormProvider', 'Controller'],
|
|
50
|
-
},
|
|
51
|
-
'@unchainedshop/admin-ui/plugins': {
|
|
52
|
-
named: ['usePluginRuntime'],
|
|
53
|
-
},
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
function generateShim(specifier) {
|
|
57
|
-
const config = SHARED_DEPS[specifier];
|
|
58
|
-
if (!config) return '';
|
|
59
|
-
|
|
60
|
-
const lines = [
|
|
61
|
-
`var __dep = (typeof window !== 'undefined' && window.__UNCHAINED_PLUGIN_DEPS__) ? window.__UNCHAINED_PLUGIN_DEPS__[${JSON.stringify(specifier)}] : {};`,
|
|
62
|
-
];
|
|
63
|
-
|
|
64
|
-
if (config.default) {
|
|
65
|
-
lines.push(`export default __dep;`);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
if (config.named) {
|
|
69
|
-
for (const name of config.named) {
|
|
70
|
-
lines.push(`export var ${name} = __dep.${name};`);
|
|
71
|
-
}
|
|
5
|
+
// Version of the admin-ui SDK this plugin is built against, stamped into the
|
|
6
|
+
// bundle banner so the engine can warn about plugin/host version skew.
|
|
7
|
+
const SDK_VERSION = (() => {
|
|
8
|
+
try {
|
|
9
|
+
return JSON.parse(readFileSync(new URL('../../package.json', import.meta.url), 'utf-8')).version;
|
|
10
|
+
} catch {
|
|
11
|
+
return null;
|
|
72
12
|
}
|
|
13
|
+
})();
|
|
73
14
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
namespace: 'unchained-shim',
|
|
88
|
-
}));
|
|
89
|
-
|
|
90
|
-
build.onLoad({ filter: /.*/, namespace: 'unchained-shim' }, (args) => ({
|
|
91
|
-
contents: generateShim(args.path),
|
|
92
|
-
loader: 'js',
|
|
93
|
-
}));
|
|
94
|
-
},
|
|
95
|
-
});
|
|
96
|
-
|
|
15
|
+
/**
|
|
16
|
+
* Build configuration for admin-ui plugins.
|
|
17
|
+
*
|
|
18
|
+
* Plugins are compiled to a single standard ESM bundle. Dependencies provided
|
|
19
|
+
* by the host admin-ui (react, @apollo/client, @unchainedshop/admin-ui/*, ...)
|
|
20
|
+
* are left as bare import specifiers; at runtime the admin-ui resolves them
|
|
21
|
+
* through a browser import map to the host's own module instances, so plugins
|
|
22
|
+
* share one React/Apollo instance with the app. Everything else (plugin-local
|
|
23
|
+
* dependencies) is bundled in.
|
|
24
|
+
*
|
|
25
|
+
* The bundle is loaded by the admin-ui with a native dynamic import(); its
|
|
26
|
+
* module exports are the components referenced from the plugin manifest.
|
|
27
|
+
*/
|
|
97
28
|
export function definePluginConfig(pluginName, entry = 'src/index.tsx') {
|
|
98
29
|
return defineConfig({
|
|
99
30
|
entry: { index: entry },
|
|
100
|
-
format: ['
|
|
31
|
+
format: ['esm'],
|
|
32
|
+
platform: 'browser',
|
|
33
|
+
target: 'es2022',
|
|
101
34
|
outDir: 'dist',
|
|
102
|
-
outExtension: () => ({ js: '.
|
|
35
|
+
outExtension: () => ({ js: '.js' }),
|
|
103
36
|
dts: false,
|
|
104
37
|
splitting: false,
|
|
38
|
+
sourcemap: false,
|
|
105
39
|
clean: true,
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
js: `if(typeof window!=='undefined'){window.__UNCHAINED_PLUGINS__=window.__UNCHAINED_PLUGINS__||{};window.__UNCHAINED_PLUGINS__[${JSON.stringify(pluginName)}]=_pluginExports;}`,
|
|
40
|
+
banner: {
|
|
41
|
+
js: `/* unchained admin-ui plugin: ${JSON.stringify(pluginName)} (esm${SDK_VERSION ? `, sdk ${SDK_VERSION}` : ''}) */`,
|
|
109
42
|
},
|
|
110
|
-
esbuildPlugins: [
|
|
43
|
+
esbuildPlugins: [handleExternals(PLUGIN_EXTERNALS)],
|
|
111
44
|
});
|
|
112
45
|
}
|
|
46
|
+
|
|
47
|
+
const SHIM_NS = 'unchained-cjs-esm-bridge';
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Unified esbuild plugin that handles shared dependencies declared as external.
|
|
51
|
+
*
|
|
52
|
+
* ESM imports (kind "import-statement") are marked external so the bare
|
|
53
|
+
* specifier is preserved in the output for the browser import map.
|
|
54
|
+
*
|
|
55
|
+
* CJS require() calls (kind "require-call") from bundled CJS dependencies
|
|
56
|
+
* (e.g. @unchainedshop/client) are redirected to virtual ESM re-export modules.
|
|
57
|
+
* Without this, esbuild wraps them as __require() which throws in the browser.
|
|
58
|
+
*
|
|
59
|
+
* This plugin replaces both tsup's built-in `external` option (which cannot
|
|
60
|
+
* distinguish import kinds) and the previous rewriteCjsExternals plugin. The
|
|
61
|
+
* admin-ui SDK build uses it too: Headless UI and recharts bundle the CJS
|
|
62
|
+
* use-sync-external-store, which require()s react.
|
|
63
|
+
*/
|
|
64
|
+
export function handleExternals(externals) {
|
|
65
|
+
const isExternal = (id) =>
|
|
66
|
+
externals.some((ext) =>
|
|
67
|
+
ext instanceof RegExp ? ext.test(id) : ext === id,
|
|
68
|
+
);
|
|
69
|
+
|
|
70
|
+
return {
|
|
71
|
+
name: 'unchained-handle-externals',
|
|
72
|
+
setup(build) {
|
|
73
|
+
build.onResolve({ filter: /.*/ }, (args) => {
|
|
74
|
+
if (!isExternal(args.path)) return undefined;
|
|
75
|
+
|
|
76
|
+
if (args.kind === 'require-call' || args.kind === 'require-resolve') {
|
|
77
|
+
return { path: args.path, namespace: SHIM_NS };
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
return { path: args.path, external: true };
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
build.onLoad({ filter: /.*/, namespace: SHIM_NS }, (args) => {
|
|
84
|
+
const spec = JSON.stringify(args.path);
|
|
85
|
+
return {
|
|
86
|
+
contents: [
|
|
87
|
+
`import * as _ns from ${spec};`,
|
|
88
|
+
`export default _ns.default;`,
|
|
89
|
+
`export * from ${spec};`,
|
|
90
|
+
].join('\n'),
|
|
91
|
+
loader: 'js',
|
|
92
|
+
resolveDir: '.',
|
|
93
|
+
};
|
|
94
|
+
});
|
|
95
|
+
},
|
|
96
|
+
};
|
|
97
|
+
}
|
|
@@ -1,11 +1,46 @@
|
|
|
1
1
|
import test from 'node:test';
|
|
2
2
|
import assert from 'node:assert/strict';
|
|
3
|
+
import { mkdtempSync, readFileSync, rmSync, writeFileSync } from 'node:fs';
|
|
4
|
+
import { tmpdir } from 'node:os';
|
|
5
|
+
import { join } from 'node:path';
|
|
6
|
+
import { build } from 'tsup';
|
|
3
7
|
|
|
4
|
-
import { definePluginConfig } from './plugin-build.mjs';
|
|
8
|
+
import { definePluginConfig, handleExternals } from './plugin-build.mjs';
|
|
5
9
|
|
|
6
|
-
test('definePluginConfig emits browser
|
|
10
|
+
test('definePluginConfig emits native ESM browser bundles with a .js extension', () => {
|
|
7
11
|
const config = definePluginConfig('bookmark-manager');
|
|
8
|
-
const outputExtension = config.outExtension?.({ format: '
|
|
12
|
+
const outputExtension = config.outExtension?.({ format: 'esm' });
|
|
9
13
|
|
|
10
|
-
assert.
|
|
14
|
+
assert.deepEqual(config.format, ['esm']);
|
|
15
|
+
assert.equal(config.platform, 'browser');
|
|
16
|
+
assert.equal(config.splitting, false);
|
|
17
|
+
assert.equal(outputExtension?.js, '.js');
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
test('handleExternals keeps shared dependencies external when bundled CJS require()s them', async (t) => {
|
|
21
|
+
const dir = mkdtempSync(join(tmpdir(), 'admin-ui-externals-'));
|
|
22
|
+
t.after(() => rmSync(dir, { recursive: true, force: true }));
|
|
23
|
+
writeFileSync(
|
|
24
|
+
join(dir, 'legacy.cjs'),
|
|
25
|
+
"const React = require('react');\nmodule.exports = React.useRef;\n",
|
|
26
|
+
);
|
|
27
|
+
writeFileSync(
|
|
28
|
+
join(dir, 'index.js'),
|
|
29
|
+
"import useRef from './legacy.cjs';\nexport default useRef;\n",
|
|
30
|
+
);
|
|
31
|
+
|
|
32
|
+
await build({
|
|
33
|
+
entry: { index: join(dir, 'index.js') },
|
|
34
|
+
format: ['esm'],
|
|
35
|
+
platform: 'browser',
|
|
36
|
+
outDir: join(dir, 'dist'),
|
|
37
|
+
config: false,
|
|
38
|
+
silent: true,
|
|
39
|
+
esbuildPlugins: [handleExternals(['react'])],
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
const output = readFileSync(join(dir, 'dist', 'index.js'), 'utf-8');
|
|
43
|
+
// tsup's `external` option would emit __require("react"), which throws in the browser.
|
|
44
|
+
assert.doesNotMatch(output, /__require\(["']react["']\)/);
|
|
45
|
+
assert.match(output, /from ["']react["']/);
|
|
11
46
|
});
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Synchronously loadable source of truth for the admin-ui plugin module graph.
|
|
3
|
+
*
|
|
4
|
+
* Keep this file data-only: the API loads it through the package's `require`
|
|
5
|
+
* condition when plugins are enabled, while plugin-runtime.mjs exposes the
|
|
6
|
+
* same values to ESM consumers and the browser build.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
const SHARED_DEP_SHIMS = {
|
|
10
|
+
react: 'shims/react.js',
|
|
11
|
+
'react/jsx-runtime': 'shims/react-jsx-runtime.js',
|
|
12
|
+
'react-dom': 'shims/react-dom.js',
|
|
13
|
+
'react-dom/client': 'shims/react-dom-client.js',
|
|
14
|
+
'@apollo/client': 'shims/apollo-client.js',
|
|
15
|
+
'@apollo/client/react': 'shims/apollo-client-react.js',
|
|
16
|
+
'next/router': 'shims/next-router.js',
|
|
17
|
+
'next/link': 'shims/next-link.js',
|
|
18
|
+
'next/image': 'shims/next-image.js',
|
|
19
|
+
'next/head': 'shims/next-head.js',
|
|
20
|
+
'react-intl': 'shims/react-intl.js',
|
|
21
|
+
'react-toastify': 'shims/react-toastify.js',
|
|
22
|
+
'react-hook-form': 'shims/react-hook-form.js',
|
|
23
|
+
'@unchainedshop/admin-ui/plugins': 'shims/admin-ui-plugins.js',
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const SDK_ENTRY_KEYS = [
|
|
27
|
+
'ui',
|
|
28
|
+
'form',
|
|
29
|
+
'hooks',
|
|
30
|
+
'providers',
|
|
31
|
+
'modal',
|
|
32
|
+
'theme',
|
|
33
|
+
'modules/accounts',
|
|
34
|
+
'modules/assortment',
|
|
35
|
+
'modules/country',
|
|
36
|
+
'modules/currency',
|
|
37
|
+
'modules/delivery-provider',
|
|
38
|
+
'modules/enrollment',
|
|
39
|
+
'modules/event',
|
|
40
|
+
'modules/filter',
|
|
41
|
+
'modules/language',
|
|
42
|
+
'modules/order',
|
|
43
|
+
'modules/payment-providers',
|
|
44
|
+
'modules/product',
|
|
45
|
+
'modules/product-review',
|
|
46
|
+
'modules/quotation',
|
|
47
|
+
'modules/token',
|
|
48
|
+
'modules/warehousing-providers',
|
|
49
|
+
'modules/work',
|
|
50
|
+
];
|
|
51
|
+
|
|
52
|
+
const SDK_MODULE_FILES = Object.fromEntries(
|
|
53
|
+
SDK_ENTRY_KEYS.map((key) => [`@unchainedshop/admin-ui/${key}`, `${key}.js`]),
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
const PLUGIN_EXTERNALS = [
|
|
57
|
+
...Object.keys(SHARED_DEP_SHIMS),
|
|
58
|
+
/^@unchainedshop\/admin-ui\//,
|
|
59
|
+
];
|
|
60
|
+
|
|
61
|
+
module.exports = {
|
|
62
|
+
SHARED_DEP_SHIMS,
|
|
63
|
+
SDK_ENTRY_KEYS,
|
|
64
|
+
SDK_MODULE_FILES,
|
|
65
|
+
PLUGIN_EXTERNALS,
|
|
66
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** Bare specifiers provided by the host app, mapped to their shim file in dist/. */
|
|
2
|
+
export declare const SHARED_DEP_SHIMS: Record<string, string>;
|
|
3
|
+
|
|
4
|
+
/** SDK entry keys built by tsup.config.ts (excluding shim entries). */
|
|
5
|
+
export declare const SDK_ENTRY_KEYS: string[];
|
|
6
|
+
|
|
7
|
+
/** SDK subpath exports resolvable from plugin bundles, mapped to their dist file. */
|
|
8
|
+
export declare const SDK_MODULE_FILES: Record<string, string>;
|
|
9
|
+
|
|
10
|
+
/** All bare specifiers a plugin bundle may leave external. */
|
|
11
|
+
export declare const PLUGIN_EXTERNALS: (string | RegExp)[];
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Single source of truth for the admin-ui plugin runtime module graph.
|
|
3
|
+
*
|
|
4
|
+
* Plugins are built as pure ESM bundles (see plugin-build.mjs) with shared
|
|
5
|
+
* dependencies left as bare import specifiers. At runtime the browser resolves
|
|
6
|
+
* those specifiers through an import map:
|
|
7
|
+
*
|
|
8
|
+
* - Host-owned dependencies (react, @apollo/client, ...) map to tiny shim
|
|
9
|
+
* modules (built from src/sdk/shims/) that re-export the running admin-ui
|
|
10
|
+
* app's instances via window.__UNCHAINED_PLUGIN_DEPS__, so plugins share the
|
|
11
|
+
* exact same React/Apollo instances as the host.
|
|
12
|
+
* - SDK subpaths (@unchainedshop/admin-ui/ui, ...) map to the prebuilt ESM
|
|
13
|
+
* files in dist/, served by the engine under /admin-ui-sdk/.
|
|
14
|
+
*
|
|
15
|
+
* This file is imported by plugin build configs (via tsup, plain Node ESM)
|
|
16
|
+
* and the browser build. The data lives in the dependency-free CommonJS
|
|
17
|
+
* module so @unchainedshop/api can load it synchronously and lazily through
|
|
18
|
+
* the package's `require` condition.
|
|
19
|
+
*/
|
|
20
|
+
import runtime from './plugin-runtime.cjs';
|
|
21
|
+
|
|
22
|
+
export const {
|
|
23
|
+
SHARED_DEP_SHIMS,
|
|
24
|
+
SDK_ENTRY_KEYS,
|
|
25
|
+
SDK_MODULE_FILES,
|
|
26
|
+
PLUGIN_EXTERNALS,
|
|
27
|
+
} = runtime;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import assert from 'node:assert/strict';
|
|
2
|
+
import { createRequire } from 'node:module';
|
|
3
|
+
import test from 'node:test';
|
|
4
|
+
import {
|
|
5
|
+
PLUGIN_EXTERNALS,
|
|
6
|
+
SDK_ENTRY_KEYS,
|
|
7
|
+
SHARED_DEP_SHIMS,
|
|
8
|
+
} from './plugin-runtime.mjs';
|
|
9
|
+
import * as pluginAPI from './plugins.mjs';
|
|
10
|
+
|
|
11
|
+
test('shares react-hook-form instead of the removed Formik runtime', () => {
|
|
12
|
+
assert.equal(SHARED_DEP_SHIMS['react-hook-form'], 'shims/react-hook-form.js');
|
|
13
|
+
assert.equal('formik' in SHARED_DEP_SHIMS, false);
|
|
14
|
+
assert.equal(PLUGIN_EXTERNALS.includes('react-hook-form'), true);
|
|
15
|
+
assert.equal(PLUGIN_EXTERNALS.includes('formik'), false);
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
test('exposes the same runtime graph to import and require consumers', () => {
|
|
19
|
+
const require = createRequire(import.meta.url);
|
|
20
|
+
const commonJSRuntime = require('@unchainedshop/admin-ui/plugin-runtime');
|
|
21
|
+
|
|
22
|
+
assert.deepEqual(commonJSRuntime.SHARED_DEP_SHIMS, SHARED_DEP_SHIMS);
|
|
23
|
+
assert.deepEqual(commonJSRuntime.SDK_ENTRY_KEYS, SDK_ENTRY_KEYS);
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
test('makes every host plugin API export visible to shim generation', () => {
|
|
27
|
+
assert.deepEqual(Object.keys(pluginAPI).sort(), ['definePlugin', 'usePluginRuntime']);
|
|
28
|
+
assert.throws(
|
|
29
|
+
() => pluginAPI.usePluginRuntime(),
|
|
30
|
+
/only available inside an admin-ui plugin component/,
|
|
31
|
+
);
|
|
32
|
+
});
|