@unchainedshop/admin-ui 5.0.0-alpha.11 → 5.0.0-alpha.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/{chunk-WPLOTFGW.js → chunk-2HTCKO4E.js} +12 -3
- package/dist/{chunk-I64TXIE7.js → chunk-5UHBGLFV.js} +40 -2
- package/dist/{chunk-PJLYVMUM.js → chunk-6WMH7PLC.js} +2 -2
- package/dist/{chunk-QHR23GVH.js → chunk-CUYIP5XG.js} +1 -1
- package/dist/{chunk-5WPFHQZN.js → chunk-E6HDJYA6.js} +3 -3
- package/dist/{chunk-FDHXLNZQ.js → chunk-EAVP6XZQ.js} +1 -1
- package/dist/{chunk-HJKRGBDG.js → chunk-EKWWSFDK.js} +1 -1
- package/dist/{chunk-Q6S3LBUF.js → chunk-JC6PXYZP.js} +7 -1
- package/dist/{chunk-BOMSMJF2.js → chunk-JGER2LQO.js} +1 -0
- package/dist/{chunk-ICJH36K4.js → chunk-M2242FCR.js} +1 -1
- package/dist/{chunk-3L6EZQ6P.js → chunk-NFJE5EJG.js} +1 -1
- package/dist/{chunk-BMDNY67T.js → chunk-NUGWX3KO.js} +3361 -1769
- package/dist/{chunk-E77YIMGR.js → chunk-XZ2V6XTD.js} +2 -2
- package/dist/components/ui/Loading.d.ts +8 -1
- package/dist/components/ui/Loading.d.ts.map +1 -1
- package/dist/components/ui/index.d.ts +2 -0
- package/dist/components/ui/index.d.ts.map +1 -1
- package/dist/form.js +798 -379
- package/dist/gql/operation-types.d.ts +51 -18
- package/dist/gql/operation-types.d.ts.map +1 -1
- package/dist/gql/schema-types.d.ts +28 -2
- package/dist/gql/schema-types.d.ts.map +1 -1
- package/dist/hooks.js +5 -5
- package/dist/modal.js +5 -5
- package/dist/modules/UnchainedContext/UnchainedContext.d.ts +1 -0
- package/dist/modules/UnchainedContext/UnchainedContext.d.ts.map +1 -1
- package/dist/modules/UnchainedContext/useUnchainedContext.d.ts +1 -0
- package/dist/modules/UnchainedContext/useUnchainedContext.d.ts.map +1 -1
- package/dist/modules/accounts.js +48 -2
- package/dist/modules/assortment.js +2 -2
- package/dist/modules/common/components/SearchWithTags.d.ts +10 -0
- package/dist/modules/common/components/SearchWithTags.d.ts.map +1 -0
- package/dist/modules/common/hooks/useShopInfo.d.ts +1 -0
- package/dist/modules/common/hooks/useShopInfo.d.ts.map +1 -1
- package/dist/modules/country.js +1 -1
- package/dist/modules/currency.js +1 -1
- package/dist/modules/delivery-provider.js +1 -1
- package/dist/modules/enrollment.js +25 -11
- package/dist/modules/event.js +1 -1
- package/dist/modules/filter.js +1 -1
- package/dist/modules/forms/lib/validators.d.ts +3 -1
- package/dist/modules/forms/lib/validators.d.ts.map +1 -1
- package/dist/modules/language.js +1 -1
- package/dist/modules/order/fragments/OrderDetailFragment.d.ts.map +1 -1
- package/dist/modules/order.js +1 -2
- package/dist/modules/payment-providers.js +1 -1
- package/dist/modules/product/hooks/useProductsCount.d.ts +1 -1
- package/dist/modules/product/hooks/useProductsCount.d.ts.map +1 -1
- package/dist/modules/product-review.js +2 -2
- package/dist/modules/product.js +437 -25
- package/dist/modules/quotation.js +2 -1
- package/dist/modules/token.js +1 -1
- package/dist/modules/warehousing-providers.js +1 -1
- package/dist/modules/work.js +1 -1
- package/dist/plugins.js +1 -1
- package/dist/providers.js +5 -5
- package/dist/shims/admin-ui-plugins.js +1 -1
- package/dist/shims/apollo-client-react.js +1 -1
- package/dist/shims/apollo-client.js +1 -1
- package/dist/shims/next-head.js +1 -1
- package/dist/shims/next-image.js +1 -1
- package/dist/shims/next-link.js +1 -1
- package/dist/shims/next-router.js +1 -1
- package/dist/shims/react-dom-client.js +1 -1
- package/dist/shims/react-dom.js +1 -1
- package/dist/shims/react-hook-form.js +1 -1
- package/dist/shims/react-intl.js +1 -1
- package/dist/shims/react-jsx-runtime.js +1 -1
- package/dist/shims/react-toastify.js +1 -1
- package/dist/shims/react.js +1 -1
- package/dist/theme.js +1 -1
- package/dist/ui.js +9627 -8204
- package/out/403/index.html +3 -3
- package/out/404/index.html +3 -3
- package/out/404.html +3 -3
- package/out/423/index.html +3 -3
- package/out/500/index.html +3 -3
- package/out/_next/static/WEaZ5SW9HLnJWzXs84JMH/_buildManifest.js +266 -0
- package/out/_next/static/chunks/0-kvzk5p0hp-4.js +11 -0
- package/out/_next/static/chunks/0-nzk-g6k41e-.js +119 -0
- package/out/_next/static/chunks/00p6gl0n0kga2.js +46 -0
- package/out/_next/static/chunks/01otzjqxk372n.js +1 -0
- package/out/_next/static/chunks/0389l__ljgq-b.js +1 -0
- package/out/_next/static/chunks/039xltalow0bh.js +1 -0
- package/out/_next/static/chunks/03awz8e25u6-9.js +33 -0
- package/out/_next/static/chunks/04_r4qnsjmy81.js +4 -0
- package/out/_next/static/chunks/04egfa7kckou_.js +165 -0
- package/out/_next/static/chunks/04kydtjv2qqb1.js +39 -0
- package/out/_next/static/chunks/05ghb-a4hshp1.js +24 -0
- package/out/_next/static/chunks/06gqojz2tfk7h.js +33 -0
- package/out/_next/static/chunks/{2ajr0rk0_yax6.js → 06kqbwwnuu3te.js} +1 -1
- package/out/_next/static/chunks/0728622u98g6r.js +1 -0
- package/out/_next/static/chunks/08e3-wndual-j.js +183 -0
- package/out/_next/static/chunks/08gngcgmdigfl.js +7 -0
- package/out/_next/static/chunks/{01xy3u9ybz9ts.js → 08htfpcq8k2ct.js} +2 -2
- package/out/_next/static/chunks/09irjy-7k1922.js +1 -0
- package/out/_next/static/chunks/0_ppdn6x6ci0v.js +31 -0
- package/out/_next/static/chunks/0ao00r36i0nko.js +4 -0
- package/out/_next/static/chunks/0az9r1m1m5nw7.js +5 -0
- package/out/_next/static/chunks/0bahbwxzev843.js +8 -0
- package/out/_next/static/chunks/0ejd4so6pfsb9.js +8 -0
- package/out/_next/static/chunks/0f0aouv41459l.js +99 -0
- package/out/_next/static/chunks/0f4mwm9gegsvc.js +8 -0
- package/out/_next/static/chunks/0ffdde8s4b7e2.js +5 -0
- package/out/_next/static/chunks/0ftb36h7poyeo.js +235 -0
- package/out/_next/static/chunks/0gclli_nyb0px.js +4 -0
- package/out/_next/static/chunks/0hv62tllrjbgx.js +5 -0
- package/out/_next/static/chunks/0ik3suboifvvc.js +1 -0
- package/out/_next/static/chunks/0iohwbogpxe5r.js +1 -0
- package/out/_next/static/chunks/0jsbw2npug66o.js +54 -0
- package/out/_next/static/chunks/0lgoprkr2wj68.js +12 -0
- package/out/_next/static/chunks/0mpgc4f7hc1dd.js +7 -0
- package/out/_next/static/chunks/0o4aj3bm49d_h.js +61 -0
- package/out/_next/static/chunks/0oauw10y-zu7q.js +14 -0
- package/out/_next/static/chunks/0p55j-ysba0wq.js +63 -0
- package/out/_next/static/chunks/0pnifxx4n6jz4.js +30 -0
- package/out/_next/static/chunks/0rj53mrsrvu49.js +5 -0
- package/out/_next/static/chunks/0s2jvi6_qj0lc.js +16 -0
- package/out/_next/static/chunks/0uef4ugmc_g10.js +1 -0
- package/out/_next/static/chunks/0v2f0xq8mp63h.js +1 -0
- package/out/_next/static/chunks/0wvck3kmtd8h3.js +5 -0
- package/out/_next/static/chunks/0y-xf7e4lgmru.js +4 -0
- package/out/_next/static/chunks/0zlzflyq18hhy.js +4 -0
- package/out/_next/static/chunks/12cy_5m_0fj96.js +44 -0
- package/out/_next/static/chunks/12z0--swhgre2.js +33 -0
- package/out/_next/static/chunks/139wqbl161pdw.js +12 -0
- package/out/_next/static/chunks/13sl42_jx13hh.js +7 -0
- package/out/_next/static/chunks/14jd75j8ij4u2.js +3 -0
- package/out/_next/static/chunks/14wav1vmqi2oo.js +371 -0
- package/out/_next/static/chunks/15oodwh44nrve.js +43 -0
- package/out/_next/static/chunks/15ullli2vlj87.js +8 -0
- package/out/_next/static/chunks/177p92k5pdloo.js +1 -0
- package/out/_next/static/chunks/17g3a6iz0s59f.js +837 -0
- package/out/_next/static/chunks/19-1z6h5eeq_w.js +134 -0
- package/out/_next/static/chunks/19-fs9eq1syvw.js +103 -0
- package/out/_next/static/chunks/195cwzh3q1i0h.js +7 -0
- package/out/_next/static/chunks/1cz2fp89ssu5d.js +4 -0
- package/out/_next/static/chunks/1e2jykfql801f.js +16 -0
- package/out/_next/static/chunks/1fou9xz0_rm6d.js +5 -0
- package/out/_next/static/chunks/1gl4h7w9t850f.js +1 -0
- package/out/_next/static/chunks/1in8spfokcjsp.js +8 -0
- package/out/_next/static/chunks/1k1b69hvwr-0g.js +5 -0
- package/out/_next/static/chunks/1kdcu-0jkya-b.js +61 -0
- package/out/_next/static/chunks/1kyjdq0bnkw10.js +95 -0
- package/out/_next/static/chunks/1l2ix83845lui.js +5 -0
- package/out/_next/static/chunks/{1iamjw8qh1m4o.js → 1mx0p6r-9c5u_.js} +1 -1
- package/out/_next/static/chunks/1ossmsdseqyeu.js +147 -0
- package/out/_next/static/chunks/1p5lt4tkyouxz.js +4 -0
- package/out/_next/static/chunks/1pm7k55e4pfpm.js +59 -0
- package/out/_next/static/chunks/1pqyz1opm5_7r.js +1 -0
- package/out/_next/static/chunks/1qd4fupa708s4.js +5 -0
- package/out/_next/static/chunks/1r61kgm2ct0nf.js +74 -0
- package/out/_next/static/chunks/1rmlm4404fsge.js +15 -0
- package/out/_next/static/chunks/1s3ool53utm9o.js +39 -0
- package/out/_next/static/chunks/1sc2ug6_szd_d.js +2 -0
- package/out/_next/static/chunks/1t1ecrjkykbv1.js +4 -0
- package/out/_next/static/chunks/{12yd8t4k6c0t1.js → 1t8jj0-6g8uyd.js} +1 -1
- package/out/_next/static/chunks/1tej7js0fwv1h.js +11 -0
- package/out/_next/static/chunks/1th8knz7txt9f.js +5 -0
- package/out/_next/static/chunks/1tosw188dr9d6.js +44 -0
- package/out/_next/static/chunks/1tuf110jbpl_r.js +1 -0
- package/out/_next/static/chunks/1tzkeg4c-br-z.js +17 -0
- package/out/_next/static/chunks/1u7l4tos3wysc.js +5 -0
- package/out/_next/static/chunks/1v0ag3k96c56s.js +1 -0
- package/out/_next/static/chunks/1w6iuc_ba9g-3.js +3 -0
- package/out/_next/static/chunks/1x7cm_fuwp9m8.js +1 -0
- package/out/_next/static/chunks/1yv22tvuqofr_.js +296 -0
- package/out/_next/static/chunks/1yvl8l5yx1rj8.js +4 -0
- package/out/_next/static/chunks/2-s-hteo3lrnj.js +21 -0
- package/out/_next/static/chunks/20au-bdji0nu2.js +14 -0
- package/out/_next/static/chunks/20p146xfq-xrq.js +5 -0
- package/out/_next/static/chunks/20t2g2u3jhtvy.js +5 -0
- package/out/_next/static/chunks/21zghy5-42i1e.js +1 -0
- package/out/_next/static/chunks/{43uqmej6-s4am.js → 231mhpexhdm2g.js} +3 -3
- package/out/_next/static/chunks/{3m_9ozv0orvze.js → 249b4cg2ev597.js} +3 -3
- package/out/_next/static/chunks/24zfmgc4cu-n1.js +9 -0
- package/out/_next/static/chunks/25b_pi2_ro9yy.js +5 -0
- package/out/_next/static/chunks/25ite4-jpq_mo.js +4 -0
- package/out/_next/static/chunks/25vdihxswn7dy.js +1 -0
- package/out/_next/static/chunks/2693w1263bb3s.js +5 -0
- package/out/_next/static/chunks/26guwpx1_pkxv.js +1 -0
- package/out/_next/static/chunks/26yarz_db5ms0.js +5 -0
- package/out/_next/static/chunks/28xbb7hkhkoup.js +1 -0
- package/out/_next/static/chunks/299pou8yuoq6b.js +116 -0
- package/out/_next/static/chunks/29x7cj-318eaa.js +1 -0
- package/out/_next/static/chunks/2_cq751vth7u7.js +81 -0
- package/out/_next/static/chunks/2a2cayocu5mc3.js +1 -0
- package/out/_next/static/chunks/2a9dpzjx5mfjp.js +4 -0
- package/out/_next/static/chunks/2apnv1hcv-4zc.js +23 -0
- package/out/_next/static/chunks/2bugi3kot5jtu.js +1 -0
- package/out/_next/static/chunks/2dn2ma73q9ye0.js +5 -0
- package/out/_next/static/chunks/2ege1545af18d.js +4 -0
- package/out/_next/static/chunks/2fnn6q9fmhu3s.js +4 -0
- package/out/_next/static/chunks/2ga95n_v_6_7b.js +175 -0
- package/out/_next/static/chunks/2gfljy_oo0nnr.js +12 -0
- package/out/_next/static/chunks/2gfot_-pkeohl.js +103 -0
- package/out/_next/static/chunks/2gfzt_fdr-h96.js +81 -0
- package/out/_next/static/chunks/2h4bxz0oww5pk.js +4 -0
- package/out/_next/static/chunks/2hc3d38gb0q-v.js +1 -0
- package/out/_next/static/chunks/2hci18oosfv5d.js +5 -0
- package/out/_next/static/chunks/{3fpgg_wy6j2ph.js → 2ipcn3vy6d4_6.js} +1 -1
- package/out/_next/static/chunks/2j4g1tyyp8ta1.js +1 -0
- package/out/_next/static/chunks/2mt78e61hd_4p.js +100 -0
- package/out/_next/static/chunks/2rri_ex6s-d8g.js +4 -0
- package/out/_next/static/chunks/2sc6dwzzc2t7n.js +5 -0
- package/out/_next/static/chunks/2texlu369byon.js +1 -0
- package/out/_next/static/chunks/2tq8sqd3-wavo.js +6 -0
- package/out/_next/static/chunks/2u2obxhc_n6xk.js +119 -0
- package/out/_next/static/chunks/{0m73vd78oga92.js → 2u4cc_r_qo0s4.js} +14 -14
- package/out/_next/static/chunks/2u6n7ohruqpxp.js +1 -0
- package/out/_next/static/chunks/2u9myo1sjc-q0.js +276 -0
- package/out/_next/static/chunks/2ubbeh02scr2l.js +7 -0
- package/out/_next/static/chunks/2v_bdu-atp2qq.js +5 -0
- package/out/_next/static/chunks/2vyv371s8n48m.js +41 -0
- package/out/_next/static/chunks/2xd_5hafdvicw.js +5 -0
- package/out/_next/static/chunks/{2yw5sk06gdixu.js → 2y8uau15r3p-o.js} +1 -1
- package/out/_next/static/chunks/2ym9q2u0yw0m8.js +326 -0
- package/out/_next/static/chunks/2zb-xmda5rbn0.js +1 -0
- package/out/_next/static/chunks/2zsvxbghbsuz1.js +4 -0
- package/out/_next/static/chunks/3-grp4-_b_uin.js +5 -0
- package/out/_next/static/chunks/31i76bjr7wp3u.js +5 -0
- package/out/_next/static/chunks/32g5gxee1kcdc.js +28 -0
- package/out/_next/static/chunks/32thgoqghnqfk.js +5 -0
- package/out/_next/static/chunks/33svzh7wrh2ca.js +147 -0
- package/out/_next/static/chunks/33v1m9okpss0r.js +5 -0
- package/out/_next/static/chunks/34gspkpv7wikw.js +8 -0
- package/out/_next/static/chunks/34wf3lz_fft3k.js +2 -0
- package/out/_next/static/chunks/{1jmdpa0tc5puj.js → 35zhvtyq31ani.js} +3 -3
- package/out/_next/static/chunks/36vqjcd_y2j30.js +1 -0
- package/out/_next/static/chunks/{3btkj1_irjkq7.js → 36x7q29atus_r.js} +6 -6
- package/out/_next/static/chunks/38043sp-g7lor.js +43 -0
- package/out/_next/static/chunks/{1so6ouxrq_ffa.js → 393--hagnnm97.js} +3 -3
- package/out/_next/static/chunks/395bs5xmcnl_3.js +31 -0
- package/out/_next/static/chunks/3_0q-dmk8few_.css +1 -0
- package/out/_next/static/chunks/3_adkt8r_brx4.js +165 -0
- package/out/_next/static/chunks/3_jqu6hq_bq0s.js +23 -0
- package/out/_next/static/chunks/3_tuio1shb_8w.js +4 -0
- package/out/_next/static/chunks/3_u_uxeaysv2y.js +6 -0
- package/out/_next/static/chunks/3e9x78_cfl4gs.js +59 -0
- package/out/_next/static/chunks/3ek1bahoqa_ll.js +5 -0
- package/out/_next/static/chunks/3i7obrooylax2.js +1 -0
- package/out/_next/static/chunks/3ij_85v4doyfu.js +2 -0
- package/out/_next/static/chunks/3jfe0uesrzz7a.js +1 -0
- package/out/_next/static/chunks/3jgmo9q79w1-c.js +290 -0
- package/out/_next/static/chunks/3jp_xvjzuj3ts.js +33 -0
- package/out/_next/static/chunks/3l9ixfzewn8ct.js +5 -0
- package/out/_next/static/chunks/3ltrxqm61t2um.js +1 -0
- package/out/_next/static/chunks/3nrrzhhoy8amt.js +4 -0
- package/out/_next/static/chunks/3qt1oiw306jtf.js +5 -0
- package/out/_next/static/chunks/3s5_6nq23zb_5.js +7 -0
- package/out/_next/static/chunks/3s_74oi_rqb7q.js +5 -0
- package/out/_next/static/chunks/3skconxcf6r_s.js +156 -0
- package/out/_next/static/chunks/3t48n1yk76zoa.js +1 -0
- package/out/_next/static/chunks/3t_520l4ihlg3.js +54 -0
- package/out/_next/static/chunks/{3j25u7rzawm9f.js → 3ud-crkzgoj7q.js} +8 -8
- package/out/_next/static/chunks/3uekb_s0jaboj.js +1 -0
- package/out/_next/static/chunks/3wr9v36meolw7.js +710 -0
- package/out/_next/static/chunks/3xun85a44o067.js +1 -0
- package/out/_next/static/chunks/3yktizlgzr6vc.js +4 -0
- package/out/_next/static/chunks/407elvwrmcfn6.js +5 -0
- package/out/_next/static/chunks/40j4nxaeofft-.js +1 -0
- package/out/_next/static/chunks/42ijceja_327z.js +54 -0
- package/out/_next/static/chunks/440jwge6wnjj6.js +1 -0
- package/out/_next/static/chunks/449x6nw2kd7l6.js +119 -0
- package/out/_next/static/chunks/44xnlcqhabyj6.js +174 -0
- package/out/_next/static/chunks/{turbopack-2c3mg3r-05n1w.js → turbopack-077hmtqrhcoji.js} +1 -1
- package/out/_offline/index.html +3 -3
- package/out/account/forgot-password/index.html +3 -3
- package/out/account/index.html +3 -3
- package/out/assortments/AssortmentDetailPage/index.html +3 -3
- package/out/assortments/index.html +3 -3
- package/out/assortments/new/index.html +3 -3
- package/out/copilot/index.html +3 -3
- package/out/country/CountryDetailPage/index.html +3 -3
- package/out/country/index.html +3 -3
- package/out/country/new/index.html +3 -3
- package/out/currency/CurrencyDetailPage/index.html +3 -3
- package/out/currency/index.html +3 -3
- package/out/currency/new/index.html +3 -3
- package/out/delivery-provider/DeliveryProviderDetailPage/index.html +3 -3
- package/out/delivery-provider/index.html +3 -3
- package/out/delivery-provider/new/index.html +3 -3
- package/out/enrollments/EnrollmentDetailPage/index.html +3 -3
- package/out/enrollments/index.html +3 -3
- package/out/events/EventDetailPage/index.html +3 -3
- package/out/events/index.html +3 -3
- package/out/exports/index.html +3 -3
- package/out/ext/[[...slug]]/index.html +3 -3
- package/out/external/index.html +3 -3
- package/out/filters/FilterDetailPage/index.html +3 -3
- package/out/filters/index.html +3 -3
- package/out/filters/new/index.html +3 -3
- package/out/index.html +3 -3
- package/out/install/index.html +3 -3
- package/out/language/LanguageDetailPage/index.html +3 -3
- package/out/language/index.html +3 -3
- package/out/language/new/index.html +3 -3
- package/out/log-in/index.html +3 -3
- package/out/login-code/index.html +12 -0
- package/out/orders/OrderDetailPage/index.html +3 -3
- package/out/orders/index.html +3 -3
- package/out/payment-provider/PaymentProviderDetailPage/index.html +3 -3
- package/out/payment-provider/index.html +3 -3
- package/out/payment-provider/new/index.html +3 -3
- package/out/products/ProductDetailPage/index.html +3 -3
- package/out/products/index.html +3 -3
- package/out/products/new/index.html +3 -3
- package/out/quotations/QuotationDetailPage/index.html +3 -3
- package/out/quotations/index.html +3 -3
- package/out/reset-password/index.html +3 -3
- package/out/sign-up/index.html +3 -3
- package/out/styleguide/index.html +3 -3
- package/out/tokens/TokenDetailPage/index.html +3 -3
- package/out/tokens/index.html +3 -3
- package/out/users/UserDetailPage/index.html +3 -3
- package/out/users/index.html +3 -3
- package/out/users/new/index.html +3 -3
- package/out/verify-email/index.html +3 -3
- package/out/warehousing-provider/WarehousingProviderDetailPage/index.html +3 -3
- package/out/warehousing-provider/index.html +3 -3
- package/out/warehousing-provider/new/index.html +3 -3
- package/out/works/WorkDetailPage/index.html +3 -3
- package/out/works/WorkQueueListView/index.html +3 -3
- package/out/works/index.html +3 -3
- package/out/works/management/index.html +3 -3
- package/package.json +10 -10
- package/src/modules/accounts/hooks/logOut.ts +26 -0
- package/src/modules/accounts/hooks/useAddEmail.ts +34 -0
- package/src/modules/accounts/hooks/useAddWeb3Address.ts +38 -0
- package/src/modules/accounts/hooks/useAddWebAuthnCredentials.ts +48 -0
- package/src/modules/accounts/hooks/useBulkUserOperations.ts +91 -0
- package/src/modules/accounts/hooks/useChangePassword.ts +36 -0
- package/src/modules/accounts/hooks/useCreateUser.ts +74 -0
- package/src/modules/accounts/hooks/useCreateWebAuthnCredentialCreationOptions.ts +31 -0
- package/src/modules/accounts/hooks/useCreateWebAuthnCredentialRequestOptions.ts +30 -0
- package/src/modules/accounts/hooks/useCurrentUser.ts +44 -0
- package/src/modules/accounts/hooks/useDeleteUser.ts +26 -0
- package/src/modules/accounts/hooks/useEnrollUser.ts +48 -0
- package/src/modules/accounts/hooks/useForgotPassword.ts +35 -0
- package/src/modules/accounts/hooks/useGenerateLoginCredentials.ts +80 -0
- package/src/modules/accounts/hooks/useGenerateWebAuthCredentials.ts +102 -0
- package/src/modules/accounts/hooks/useLoginWithLoginCode.ts +45 -0
- package/src/modules/accounts/hooks/useLoginWithPassword.ts +65 -0
- package/src/modules/accounts/hooks/useLoginWithWebAuthn.ts +38 -0
- package/src/modules/accounts/hooks/useLogoutAllSessions.ts +27 -0
- package/src/modules/accounts/hooks/useRemoveBookmark.ts +36 -0
- package/src/modules/accounts/hooks/useRemoveEmail.ts +40 -0
- package/src/modules/accounts/hooks/useRemoveWeb3Address.ts +38 -0
- package/src/modules/accounts/hooks/useRemoveWebAuthCredentials.ts +36 -0
- package/src/modules/accounts/hooks/useRequestLoginCode.ts +31 -0
- package/src/modules/accounts/hooks/useResetPassword.ts +46 -0
- package/src/modules/accounts/hooks/useSendVerificationEmail.ts +35 -0
- package/src/modules/accounts/hooks/useSetPassword.ts +38 -0
- package/src/modules/accounts/hooks/useSetRoles.ts +40 -0
- package/src/modules/accounts/hooks/useSetUserTags.ts +48 -0
- package/src/modules/accounts/hooks/useSetUsername.ts +40 -0
- package/src/modules/accounts/hooks/useUpdateUserAvatar.ts +49 -0
- package/src/modules/accounts/hooks/useUpdateUserProfile.ts +40 -0
- package/src/modules/accounts/hooks/useUser.ts +201 -0
- package/src/modules/accounts/hooks/useUserBookmarks.ts +51 -0
- package/src/modules/accounts/hooks/useUserExport.ts +107 -0
- package/src/modules/accounts/hooks/useUserWebAuthnCredentials.ts +44 -0
- package/src/modules/accounts/hooks/useUsers.ts +82 -0
- package/src/modules/accounts/hooks/useUsersCount.ts +50 -0
- package/src/modules/accounts/hooks/useValidateEmailVerificationToken.ts +34 -0
- package/src/modules/accounts/hooks/useValidateResetPasswordToken.ts +35 -0
- package/src/modules/accounts/hooks/useVerifyEmail.ts +41 -0
- package/src/modules/accounts/hooks/useVerifyWeb3Address.ts +40 -0
- package/src/modules/accounts/index.ts +2 -0
- package/src/modules/assortment/fragments/AssortmentChildrenFragment.ts +16 -0
- package/src/modules/assortment/fragments/AssortmentFragment.ts +31 -0
- package/src/modules/assortment/fragments/AssortmentLinkFragment.ts +18 -0
- package/src/modules/assortment/fragments/AssortmentMediaFragment.ts +19 -0
- package/src/modules/assortment/fragments/AssortmentMediaTextsFragment.ts +12 -0
- package/src/modules/assortment/fragments/AssortmentTextsFragment.ts +14 -0
- package/src/modules/assortment/hooks/useAddAssortmentFilter.ts +46 -0
- package/src/modules/assortment/hooks/useAddAssortmentLink.ts +46 -0
- package/src/modules/assortment/hooks/useAddAssortmentMedia.ts +52 -0
- package/src/modules/assortment/hooks/useAddAssortmentProduct.ts +46 -0
- package/src/modules/assortment/hooks/useAssortment.ts +56 -0
- package/src/modules/assortment/hooks/useAssortmentChildren.ts +58 -0
- package/src/modules/assortment/hooks/useAssortmentExport.ts +60 -0
- package/src/modules/assortment/hooks/useAssortmentFilters.ts +51 -0
- package/src/modules/assortment/hooks/useAssortmentLinks.ts +54 -0
- package/src/modules/assortment/hooks/useAssortmentMedia.ts +57 -0
- package/src/modules/assortment/hooks/useAssortmentPaths.ts +39 -0
- package/src/modules/assortment/hooks/useAssortmentProducts.ts +62 -0
- package/src/modules/assortment/hooks/useAssortments.ts +103 -0
- package/src/modules/assortment/hooks/useAssortmentsCount.ts +51 -0
- package/src/modules/assortment/hooks/useBulkAssortmentOperations.ts +100 -0
- package/src/modules/assortment/hooks/useCreateAssortment.ts +55 -0
- package/src/modules/assortment/hooks/usePrepareAssortmentImport.ts +211 -0
- package/src/modules/assortment/hooks/useRemoveAssortment.ts +36 -0
- package/src/modules/assortment/hooks/useRemoveAssortmentFilter.ts +36 -0
- package/src/modules/assortment/hooks/useRemoveAssortmentLink.ts +36 -0
- package/src/modules/assortment/hooks/useRemoveAssortmentMedia.ts +36 -0
- package/src/modules/assortment/hooks/useRemoveAssortmentProduct.ts +36 -0
- package/src/modules/assortment/hooks/useReorderAssortmentFilters.ts +39 -0
- package/src/modules/assortment/hooks/useReorderAssortmentLinks.ts +37 -0
- package/src/modules/assortment/hooks/useReorderAssortmentMedia.ts +37 -0
- package/src/modules/assortment/hooks/useReorderAssortmentProducts.ts +39 -0
- package/src/modules/assortment/hooks/useTranslatedAssortmentMediaTexts.ts +41 -0
- package/src/modules/assortment/hooks/useTranslatedAssortmentTexts.ts +40 -0
- package/src/modules/assortment/hooks/useUpdateAssortment.ts +43 -0
- package/src/modules/assortment/hooks/useUpdateAssortmentMediaTexts.ts +45 -0
- package/src/modules/assortment/hooks/useUpdateAssortmentTexts.ts +42 -0
- package/src/modules/common/fragments/AddressFragment.ts +16 -0
- package/src/modules/common/hooks/useApp.ts +11 -0
- package/src/modules/common/hooks/useBulkActionConfirmation.tsx +68 -0
- package/src/modules/common/hooks/useBulkResultHandler.ts +83 -0
- package/src/modules/common/hooks/useBulkSelection.ts +86 -0
- package/src/modules/common/hooks/useCSVExport.ts +94 -0
- package/src/modules/common/hooks/useCSVImport.ts +69 -0
- package/src/modules/common/hooks/useChatEndpointChecker.ts +25 -0
- package/src/modules/common/hooks/useConfirmMediaUpload.ts +45 -0
- package/src/modules/common/hooks/useDashboardMetrics.ts +42 -0
- package/src/modules/common/hooks/useLocalStorage.ts +34 -0
- package/src/modules/common/hooks/useOrderAnalytics.ts +139 -0
- package/src/modules/common/hooks/useOrderItemsAnalytics.ts +107 -0
- package/src/modules/common/hooks/useOutsideClick.ts +29 -0
- package/src/modules/common/hooks/usePortal.ts +54 -0
- package/src/modules/common/hooks/useScrollRestoration.ts +123 -0
- package/src/modules/common/hooks/useShopConfiguration.ts +83 -0
- package/src/modules/common/hooks/useShopInfo.ts +66 -0
- package/src/modules/common/hooks/useStatusTypes.ts +29 -0
- package/src/modules/common/hooks/useSystemRoles.ts +29 -0
- package/src/modules/common/hooks/useTheme.ts +14 -0
- package/src/modules/copilot/hooks/useAvailableTools.ts +92 -0
- package/src/modules/copilot/hooks/useChatManager.ts +169 -0
- package/src/modules/copilot/hooks/useToolTextNormalizer.ts +84 -0
- package/src/modules/country/fragments/CountryFragment.ts +17 -0
- package/src/modules/country/hooks/useCountries.ts +66 -0
- package/src/modules/country/hooks/useCountry.ts +34 -0
- package/src/modules/country/hooks/useCreateCountry.ts +41 -0
- package/src/modules/country/hooks/useRemoveCountry.ts +38 -0
- package/src/modules/country/hooks/useUpdateCountry.ts +42 -0
- package/src/modules/currency/fragments/CurrencyFragment.ts +13 -0
- package/src/modules/currency/hooks/useCreateCurrency.ts +48 -0
- package/src/modules/currency/hooks/useCurrencies.ts +68 -0
- package/src/modules/currency/hooks/useCurrency.ts +34 -0
- package/src/modules/currency/hooks/useRemoveCurrency.ts +38 -0
- package/src/modules/currency/hooks/useUpdateCurrency.ts +47 -0
- package/src/modules/delivery-provider/hooks/useCreateDeliveryProvider.ts +67 -0
- package/src/modules/delivery-provider/hooks/useDeliveryInterfacesByType.ts +38 -0
- package/src/modules/delivery-provider/hooks/useDeliveryProvider.ts +60 -0
- package/src/modules/delivery-provider/hooks/useDeliveryProviderTypes.ts +34 -0
- package/src/modules/delivery-provider/hooks/useDeliveryProviders.ts +59 -0
- package/src/modules/delivery-provider/hooks/useRemoveDeliveryProvider.ts +38 -0
- package/src/modules/delivery-provider/hooks/useUpdateDeliveryProvider.ts +68 -0
- package/src/modules/enrollment/fragments/EnrollmentDetailFragment.ts +111 -0
- package/src/modules/enrollment/fragments/EnrollmentFragment.ts +66 -0
- package/src/modules/enrollment/hooks/useActivateEnrollment.ts +36 -0
- package/src/modules/enrollment/hooks/useEnrollment.ts +39 -0
- package/src/modules/enrollment/hooks/useEnrollments.ts +70 -0
- package/src/modules/enrollment/hooks/useSendEnrollmentEmail.ts +35 -0
- package/src/modules/enrollment/hooks/useSuspendEnrollment.ts +31 -0
- package/src/modules/enrollment/hooks/useTerminateEnrollment.ts +48 -0
- package/src/modules/enrollment/hooks/useUpdateEnrollmentExpires.ts +38 -0
- package/src/modules/enrollment/hooks/useUpdateEnrollmentPlan.ts +45 -0
- package/src/modules/enrollment/hooks/useUserEnrollments.ts +61 -0
- package/src/modules/event/fragments/EventFragment.ts +12 -0
- package/src/modules/event/hooks/useEvent.ts +32 -0
- package/src/modules/event/hooks/useEventTypes.ts +29 -0
- package/src/modules/event/hooks/useEvents.ts +77 -0
- package/src/modules/filter/fragments/FilterFragment.ts +24 -0
- package/src/modules/filter/fragments/FilterOptionFragment.ts +16 -0
- package/src/modules/filter/fragments/FilterTextsFragment.ts +12 -0
- package/src/modules/filter/hooks/useBulkFilterOperations.ts +59 -0
- package/src/modules/filter/hooks/useCreateFilter.ts +44 -0
- package/src/modules/filter/hooks/useCreateFilterOption.ts +42 -0
- package/src/modules/filter/hooks/useFilter.ts +44 -0
- package/src/modules/filter/hooks/useFilterExport.ts +35 -0
- package/src/modules/filter/hooks/useFilterOptions.ts +40 -0
- package/src/modules/filter/hooks/useFilterTypes.ts +34 -0
- package/src/modules/filter/hooks/useFilters.ts +78 -0
- package/src/modules/filter/hooks/useFiltersCount.ts +37 -0
- package/src/modules/filter/hooks/usePrepareFilterImport.ts +142 -0
- package/src/modules/filter/hooks/useRemoveFilter.ts +34 -0
- package/src/modules/filter/hooks/useRemoveFilterOption.ts +40 -0
- package/src/modules/filter/hooks/useTranslatedFilterTexts.ts +40 -0
- package/src/modules/filter/hooks/useUpdateFilter.ts +38 -0
- package/src/modules/filter/hooks/useUpdateFilterTexts.ts +48 -0
- package/src/modules/forms/hooks/useField.ts +151 -0
- package/src/modules/forms/hooks/useForm.ts +210 -0
- package/src/modules/forms/hooks/useFormContext.ts +7 -0
- package/src/modules/language/fragments/LanguageFragment.ts +13 -0
- package/src/modules/language/hooks/useCreateLanguage.ts +40 -0
- package/src/modules/language/hooks/useLanguage.ts +34 -0
- package/src/modules/language/hooks/useLanguages.ts +64 -0
- package/src/modules/language/hooks/useRemoveLanguage.ts +38 -0
- package/src/modules/language/hooks/useUpdateLanguage.ts +42 -0
- package/src/modules/modal/hooks/useModal.ts +8 -0
- package/src/modules/order/fragments/OrderDetailFragment.ts +254 -0
- package/src/modules/order/fragments/OrderFragment.ts +42 -0
- package/src/modules/order/hooks/useConfirmOrder.ts +36 -0
- package/src/modules/order/hooks/useDeliverOrder.ts +36 -0
- package/src/modules/order/hooks/useOrder.ts +35 -0
- package/src/modules/order/hooks/useOrders.ts +105 -0
- package/src/modules/order/hooks/usePayOrder.ts +36 -0
- package/src/modules/order/hooks/useRejectOrder.ts +36 -0
- package/src/modules/order/hooks/useRemoveOrder.ts +36 -0
- package/src/modules/order/hooks/useUserCart.ts +71 -0
- package/src/modules/order/hooks/useUserOrders.ts +65 -0
- package/src/modules/payment-providers/fragments/PaymentProviderFragment.ts +21 -0
- package/src/modules/payment-providers/hooks/useCreatePaymentProvider.ts +43 -0
- package/src/modules/payment-providers/hooks/usePaymentInterfacesByType.ts +38 -0
- package/src/modules/payment-providers/hooks/usePaymentProvider.ts +39 -0
- package/src/modules/payment-providers/hooks/usePaymentProviderTypes.ts +34 -0
- package/src/modules/payment-providers/hooks/usePaymentProviders.ts +42 -0
- package/src/modules/payment-providers/hooks/useRemovePaymentProvider.ts +38 -0
- package/src/modules/payment-providers/hooks/useUpdatePaymentProvider.ts +47 -0
- package/src/modules/product/fragments/ProductAssignmentFragment.ts +39 -0
- package/src/modules/product/fragments/ProductBriefFragment.ts +57 -0
- package/src/modules/product/fragments/ProductCatalogPriceFragment.ts +23 -0
- package/src/modules/product/fragments/ProductDetailFragment.ts +51 -0
- package/src/modules/product/fragments/ProductDimensionFragment.ts +12 -0
- package/src/modules/product/fragments/ProductMediaFragment.ts +24 -0
- package/src/modules/product/fragments/ProductMediaTextsFragment.ts +12 -0
- package/src/modules/product/fragments/ProductPlanConfigurationFragment.ts +14 -0
- package/src/modules/product/fragments/ProductTextsFragment.ts +17 -0
- package/src/modules/product/fragments/ProductVariationFragment.ts +27 -0
- package/src/modules/product/fragments/TokenFragment.ts +24 -0
- package/src/modules/product/hooks/useAddProductAssignment.ts +46 -0
- package/src/modules/product/hooks/useAddProductMedia.ts +47 -0
- package/src/modules/product/hooks/useBulkProductOperations.ts +123 -0
- package/src/modules/product/hooks/useCreateProduct.ts +72 -0
- package/src/modules/product/hooks/useCreateProductBundleItem.ts +40 -0
- package/src/modules/product/hooks/useCreateProductVariation.ts +46 -0
- package/src/modules/product/hooks/useCreateProductVariationOption.ts +46 -0
- package/src/modules/product/hooks/useExportToken.ts +51 -0
- package/src/modules/product/hooks/useMenuPosition.ts +34 -0
- package/src/modules/product/hooks/usePrepareProductImport.ts +350 -0
- package/src/modules/product/hooks/useProduct.ts +93 -0
- package/src/modules/product/hooks/useProductAssignments.ts +71 -0
- package/src/modules/product/hooks/useProductBundleItems.ts +61 -0
- package/src/modules/product/hooks/useProductCatalogPrices.ts +39 -0
- package/src/modules/product/hooks/useProductExport.ts +90 -0
- package/src/modules/product/hooks/useProductFulfillmentSimulation.ts +137 -0
- package/src/modules/product/hooks/useProductMedia.ts +44 -0
- package/src/modules/product/hooks/useProductPlan.ts +50 -0
- package/src/modules/product/hooks/useProductPlanConfigurationOptions.ts +42 -0
- package/src/modules/product/hooks/useProductReviews.ts +62 -0
- package/src/modules/product/hooks/useProductSupply.ts +52 -0
- package/src/modules/product/hooks/useProductTokenization.ts +52 -0
- package/src/modules/product/hooks/useProductVariationTypes.ts +34 -0
- package/src/modules/product/hooks/useProductVariations.ts +50 -0
- package/src/modules/product/hooks/useProductWarehousing.ts +45 -0
- package/src/modules/product/hooks/useProducts.ts +111 -0
- package/src/modules/product/hooks/useProductsCount.ts +54 -0
- package/src/modules/product/hooks/usePublishProduct.ts +39 -0
- package/src/modules/product/hooks/useReOrderProductMedia.ts +36 -0
- package/src/modules/product/hooks/useRemoveBundleItem.ts +37 -0
- package/src/modules/product/hooks/useRemoveProduct.ts +36 -0
- package/src/modules/product/hooks/useRemoveProductAssignment.ts +40 -0
- package/src/modules/product/hooks/useRemoveProductMedia.ts +36 -0
- package/src/modules/product/hooks/useRemoveProductVariation.ts +36 -0
- package/src/modules/product/hooks/useRemoveProductVariationOption.ts +43 -0
- package/src/modules/product/hooks/useScaffoldBundleItem.ts +38 -0
- package/src/modules/product/hooks/useScaffoldVariationProduct.ts +50 -0
- package/src/modules/product/hooks/useSmartContractStandards.ts +34 -0
- package/src/modules/product/hooks/useTranslatedProductMediaTexts.ts +39 -0
- package/src/modules/product/hooks/useTranslatedProductTexts.ts +42 -0
- package/src/modules/product/hooks/useUnPublishProduct.ts +39 -0
- package/src/modules/product/hooks/useUpdateProduct.ts +46 -0
- package/src/modules/product/hooks/useUpdateProductCommerce.ts +50 -0
- package/src/modules/product/hooks/useUpdateProductMediaTexts.ts +42 -0
- package/src/modules/product/hooks/useUpdateProductPlan.ts +54 -0
- package/src/modules/product/hooks/useUpdateProductSupply.ts +60 -0
- package/src/modules/product/hooks/useUpdateProductTexts.ts +39 -0
- package/src/modules/product/hooks/useUpdateProductTokenization.ts +58 -0
- package/src/modules/product/hooks/useUpdateProductVariationTexts.ts +50 -0
- package/src/modules/product/hooks/useUpdateProductWarehousing.ts +50 -0
- package/src/modules/product/hooks/useUserTokens.ts +48 -0
- package/src/modules/product/index.ts +3 -0
- package/src/modules/product-review/fragments/ProductReviewDetailFragment.ts +55 -0
- package/src/modules/product-review/hooks/useAddProductReviewVote.ts +55 -0
- package/src/modules/product-review/hooks/useCreateProductReview.ts +47 -0
- package/src/modules/product-review/hooks/useProductReviewsByProductId.ts +70 -0
- package/src/modules/product-review/hooks/useRemoveProductReview.ts +38 -0
- package/src/modules/product-review/hooks/useRemoveProductReviewVote.ts +43 -0
- package/src/modules/product-review/hooks/useUserProductReviews.ts +92 -0
- package/src/modules/quotation/fragments/QuotationDetailFragment.ts +71 -0
- package/src/modules/quotation/fragments/QuotationFragment.ts +54 -0
- package/src/modules/quotation/hooks/useMakeQuotationProposal.ts +41 -0
- package/src/modules/quotation/hooks/useQuotation.ts +37 -0
- package/src/modules/quotation/hooks/useQuotations.ts +61 -0
- package/src/modules/quotation/hooks/useRejectQuotation.ts +41 -0
- package/src/modules/quotation/hooks/useUserQuotations.ts +60 -0
- package/src/modules/quotation/hooks/useVerifyQuotation.ts +41 -0
- package/src/modules/search/fragments/GlobalSearchFragment.ts +20 -0
- package/src/modules/search/hooks/useGlobalSearch.ts +168 -0
- package/src/modules/token/hooks/useInvalidateTicket.ts +27 -0
- package/src/modules/token/hooks/useToken.ts +64 -0
- package/src/modules/token/hooks/useTokens.ts +72 -0
- package/src/modules/warehousing-providers/fragments/WarehousingProviderFragment.ts +21 -0
- package/src/modules/warehousing-providers/hooks/useCreateWarehousingProvider.ts +46 -0
- package/src/modules/warehousing-providers/hooks/useRemoveWarehousingProvider.ts +38 -0
- package/src/modules/warehousing-providers/hooks/useUpdateWarehousingProvider.ts +47 -0
- package/src/modules/warehousing-providers/hooks/useWarehousingInterfacesByType.ts +38 -0
- package/src/modules/warehousing-providers/hooks/useWarehousingProvider.ts +39 -0
- package/src/modules/warehousing-providers/hooks/useWarehousingProviderTypes.ts +34 -0
- package/src/modules/warehousing-providers/hooks/useWarehousingProviders.ts +41 -0
- package/src/modules/work/fragments/WorkFragment.ts +24 -0
- package/src/modules/work/hooks/useActiveWorkTypes.ts +29 -0
- package/src/modules/work/hooks/useAddWork.ts +62 -0
- package/src/modules/work/hooks/useAllocateWork.ts +40 -0
- package/src/modules/work/hooks/useRecentExports.ts +129 -0
- package/src/modules/work/hooks/useRegisteredWorkTypes.ts +27 -0
- package/src/modules/work/hooks/useRemoveWork.ts +36 -0
- package/src/modules/work/hooks/useWork.ts +42 -0
- package/src/modules/work/hooks/useWorkQueue.ts +98 -0
- package/src/sdk/README.md +2 -2
- package/out/_next/static/BPoacQET3TJr2q9E370Ez/_buildManifest.js +0 -262
- package/out/_next/static/chunks/02ir8k2vqhw7u.js +0 -4
- package/out/_next/static/chunks/03mdkmx9pb3yx.js +0 -28
- package/out/_next/static/chunks/03spbldywp99b.js +0 -31
- package/out/_next/static/chunks/0531sa8v36e39.js +0 -1
- package/out/_next/static/chunks/065ltxdt7s8b2.js +0 -134
- package/out/_next/static/chunks/06b1jza2fvc6f.js +0 -4
- package/out/_next/static/chunks/0701uizxsgs75.js +0 -4
- package/out/_next/static/chunks/09olk50zbo5r6.js +0 -5
- package/out/_next/static/chunks/09pabifvs84zb.js +0 -12
- package/out/_next/static/chunks/0_pn7w49dpkak.js +0 -5
- package/out/_next/static/chunks/0a_gulnq-c7to.js +0 -709
- package/out/_next/static/chunks/0agx-csdwbk-x.js +0 -5
- package/out/_next/static/chunks/0clmvy-auef0p.js +0 -14
- package/out/_next/static/chunks/0czktxcs2aa12.js +0 -1
- package/out/_next/static/chunks/0d_qylr054ab-.js +0 -5
- package/out/_next/static/chunks/0e2znhpcecrqs.js +0 -175
- package/out/_next/static/chunks/0ef4vp3ehm369.js +0 -4
- package/out/_next/static/chunks/0fggi8jpi5gjk.js +0 -165
- package/out/_next/static/chunks/0gyabz3vqllr6.js +0 -83
- package/out/_next/static/chunks/0j05dboa5_xkw.js +0 -5
- package/out/_next/static/chunks/0kr4ift9_1a3s.js +0 -1
- package/out/_next/static/chunks/0l8tmlevl_6p0.js +0 -1
- package/out/_next/static/chunks/0o91usftba97q.js +0 -54
- package/out/_next/static/chunks/0oi1kpp0levnm.js +0 -1
- package/out/_next/static/chunks/0p86ng98eiz5q.js +0 -11
- package/out/_next/static/chunks/0pw1zl8_l93xl.js +0 -5
- package/out/_next/static/chunks/0py8-umjmwiwi.js +0 -156
- package/out/_next/static/chunks/0q0m2pv-3b2e2.js +0 -4
- package/out/_next/static/chunks/0r57e83u39trg.js +0 -5
- package/out/_next/static/chunks/0r9a_mcjh1k24.js +0 -6
- package/out/_next/static/chunks/0rgtc82y8z7_x.js +0 -5
- package/out/_next/static/chunks/0rxhx_x-7dojh.js +0 -182
- package/out/_next/static/chunks/0s6u_6w75ggbw.js +0 -297
- package/out/_next/static/chunks/0teb3b5h78855.js +0 -44
- package/out/_next/static/chunks/0thsuuvsozjop.js +0 -54
- package/out/_next/static/chunks/0v6x3uondh5hw.js +0 -5
- package/out/_next/static/chunks/0v_uz3j8jolmq.js +0 -4
- package/out/_next/static/chunks/0vwmp6qrw7odm.js +0 -7
- package/out/_next/static/chunks/0w6t6v_jzrudq.js +0 -4
- package/out/_next/static/chunks/0w7gz501ry22r.js +0 -4
- package/out/_next/static/chunks/0xgn-89s97a5w.js +0 -1
- package/out/_next/static/chunks/0xqtemh7t38y9.js +0 -119
- package/out/_next/static/chunks/1-1rj15j67dqt.js +0 -1
- package/out/_next/static/chunks/10drou7w-k58p.js +0 -4
- package/out/_next/static/chunks/11w7hldkge7sg.js +0 -8
- package/out/_next/static/chunks/130c8cta7pec6.js +0 -1
- package/out/_next/static/chunks/13qi39a_b6gkv.js +0 -1
- package/out/_next/static/chunks/15142badc5ufq.js +0 -4
- package/out/_next/static/chunks/155boltbcvwo-.js +0 -63
- package/out/_next/static/chunks/15_nwd8p454gd.js +0 -1
- package/out/_next/static/chunks/15s4qkdyz56pg.js +0 -115
- package/out/_next/static/chunks/15vdx0kewzv-6.js +0 -33
- package/out/_next/static/chunks/16shuavdpgni8.js +0 -327
- package/out/_next/static/chunks/170j06y4-47o4.js +0 -5
- package/out/_next/static/chunks/18a5kibvycb6u.js +0 -1
- package/out/_next/static/chunks/1_bckhq06wfmb.js +0 -4
- package/out/_next/static/chunks/1_ymf_rfke1aw.js +0 -6
- package/out/_next/static/chunks/1a1m389awxw4k.js +0 -1
- package/out/_next/static/chunks/1albq_5cppsa1.js +0 -5
- package/out/_next/static/chunks/1bhibqf8k2-z1.js +0 -117
- package/out/_next/static/chunks/1bxesp6kakz8_.js +0 -353
- package/out/_next/static/chunks/1d80ahah359g5.js +0 -174
- package/out/_next/static/chunks/1dbjry-rs_5we.js +0 -1
- package/out/_next/static/chunks/1dlr1eig6zpl1.js +0 -12
- package/out/_next/static/chunks/1gq8ickcg_vmv.js +0 -147
- package/out/_next/static/chunks/1gyrsx1nip-lm.js +0 -2
- package/out/_next/static/chunks/1hma23kynopdj.js +0 -3
- package/out/_next/static/chunks/1i996uxxmc736.js +0 -234
- package/out/_next/static/chunks/1ivhp-mi-5l--.js +0 -57
- package/out/_next/static/chunks/1ktkks-wpk8q-.js +0 -1
- package/out/_next/static/chunks/1kz62r46jwi0y.js +0 -5
- package/out/_next/static/chunks/1lex3myb5hmsw.js +0 -1
- package/out/_next/static/chunks/1lha1nklxo2g7.js +0 -1
- package/out/_next/static/chunks/1mwmcucidjio0.js +0 -8
- package/out/_next/static/chunks/1mzejejof4s6g.js +0 -147
- package/out/_next/static/chunks/1os6pvhjeb16o.js +0 -1
- package/out/_next/static/chunks/1p937fyqa7ssz.js +0 -1
- package/out/_next/static/chunks/1po7d3udj6iv4.js +0 -5
- package/out/_next/static/chunks/1qxxbcidu-hmv.js +0 -1
- package/out/_next/static/chunks/1re4i2t_po4sr.js +0 -95
- package/out/_next/static/chunks/1s4oi1bw8zl5d.js +0 -31
- package/out/_next/static/chunks/1sb04cqudnfpj.js +0 -4
- package/out/_next/static/chunks/1uom050rz5iol.js +0 -272
- package/out/_next/static/chunks/1uymuiqrms2h8.js +0 -103
- package/out/_next/static/chunks/1wijj_fal57co.js +0 -2
- package/out/_next/static/chunks/1wpen9t3_zbte.js +0 -1
- package/out/_next/static/chunks/1wpv1sl7vwg04.js +0 -99
- package/out/_next/static/chunks/1y3poj860g968.js +0 -24
- package/out/_next/static/chunks/1yk0pxcl4urkd.js +0 -4
- package/out/_next/static/chunks/1z2rl3h7scna4.js +0 -7
- package/out/_next/static/chunks/1zyhq82pkterc.js +0 -61
- package/out/_next/static/chunks/2-4610weysas_.js +0 -1
- package/out/_next/static/chunks/2-zr9-ri30va5.css +0 -1
- package/out/_next/static/chunks/20j8cdot33hql.js +0 -13
- package/out/_next/static/chunks/21fo9zerxyx-l.js +0 -59
- package/out/_next/static/chunks/22sxsq82r3cwy.js +0 -41
- package/out/_next/static/chunks/23nwkbry8kz0-.js +0 -1
- package/out/_next/static/chunks/259ckrmoldaqg.js +0 -5
- package/out/_next/static/chunks/25y2dqqrhstuq.js +0 -5
- package/out/_next/static/chunks/28myh-gi8t3t7.js +0 -7
- package/out/_next/static/chunks/29y82c6-u55hj.js +0 -5
- package/out/_next/static/chunks/2ahlen2u4lbnm.js +0 -16
- package/out/_next/static/chunks/2c3ehieqiwiw8.js +0 -119
- package/out/_next/static/chunks/2c5gq6izeq6nx.js +0 -81
- package/out/_next/static/chunks/2cj8g3fxmitaa.js +0 -1
- package/out/_next/static/chunks/2d9lzme_uzwvq.js +0 -1
- package/out/_next/static/chunks/2dqoft2pp4355.js +0 -1
- package/out/_next/static/chunks/2gso7_8v7owco.js +0 -1
- package/out/_next/static/chunks/2hc4nowrexhn3.js +0 -100
- package/out/_next/static/chunks/2hoi6cb1lromr.js +0 -4
- package/out/_next/static/chunks/2hw2_8kkf_2fg.js +0 -1
- package/out/_next/static/chunks/2kd4p_esjbozz.js +0 -21
- package/out/_next/static/chunks/2lwhn1ypqwukz.js +0 -11
- package/out/_next/static/chunks/2oz432iieo_c6.js +0 -43
- package/out/_next/static/chunks/2qjnhmz4c5fq1.js +0 -23
- package/out/_next/static/chunks/2rdjgc7_za785.js +0 -9
- package/out/_next/static/chunks/2ru66cyp0hbxn.js +0 -103
- package/out/_next/static/chunks/2ung-az_h871_.js +0 -4
- package/out/_next/static/chunks/2v4rvvdyh028e.js +0 -1
- package/out/_next/static/chunks/2vsl3-revotpl.js +0 -43
- package/out/_next/static/chunks/2wbc_9uwtsjbp.js +0 -15
- package/out/_next/static/chunks/2xixk0t9e9mnw.js +0 -1
- package/out/_next/static/chunks/2y6i_xssusr93.js +0 -1
- package/out/_next/static/chunks/2y_t26eglpeka.js +0 -4
- package/out/_next/static/chunks/3-hgyqm9mhcm9.js +0 -33
- package/out/_next/static/chunks/364y5vueeinvz.js +0 -276
- package/out/_next/static/chunks/366b9y413lk4d.js +0 -33
- package/out/_next/static/chunks/36vauyb71ot_b.js +0 -61
- package/out/_next/static/chunks/394m309ssmlo3.js +0 -5
- package/out/_next/static/chunks/39pveojee3ma1.js +0 -33
- package/out/_next/static/chunks/3_--novhq2u1q.js +0 -807
- package/out/_next/static/chunks/3apnk6kuvwze8.js +0 -5
- package/out/_next/static/chunks/3b0868kyqqkn3.js +0 -5
- package/out/_next/static/chunks/3dcwbsiechj8e.js +0 -7
- package/out/_next/static/chunks/3dyd0ilb-ee5w.js +0 -8
- package/out/_next/static/chunks/3eftzknnu45-s.js +0 -1
- package/out/_next/static/chunks/3ejsx4af27cct.js +0 -7
- package/out/_next/static/chunks/3es4yddhl8uwc.js +0 -7
- package/out/_next/static/chunks/3inp15oicq85k.js +0 -1
- package/out/_next/static/chunks/3kd-t_qz3nxh7.js +0 -30
- package/out/_next/static/chunks/3kl8vv7w9jkjr.js +0 -23
- package/out/_next/static/chunks/3kmfx3f7oyfdm.js +0 -5
- package/out/_next/static/chunks/3koj4-48a7p_9.js +0 -4
- package/out/_next/static/chunks/3l7glrtu8ueuo.js +0 -4
- package/out/_next/static/chunks/3lgq9oa_2erwo.js +0 -5
- package/out/_next/static/chunks/3muxcxam24i5z.js +0 -1
- package/out/_next/static/chunks/3nimt7ngr5zv6.js +0 -46
- package/out/_next/static/chunks/3pwezwpggrz59.js +0 -74
- package/out/_next/static/chunks/3r02t7a7jknrv.js +0 -7
- package/out/_next/static/chunks/3s40iuaou1rt4.js +0 -1
- package/out/_next/static/chunks/3selzn479n73i.js +0 -16
- package/out/_next/static/chunks/3srflqnqdfd60.js +0 -5
- package/out/_next/static/chunks/3t57k35xu2eo8.js +0 -5
- package/out/_next/static/chunks/3tu90a7do336z.js +0 -12
- package/out/_next/static/chunks/3ukgj2jzxf10n.js +0 -5
- package/out/_next/static/chunks/3vosu-lpiis6v.js +0 -5
- package/out/_next/static/chunks/3xaz8fvw2x6b3.js +0 -5
- package/out/_next/static/chunks/3xgjhwzul66dp.js +0 -4
- package/out/_next/static/chunks/3zze6y1x00k__.js +0 -165
- package/out/_next/static/chunks/40730dyt912zu.js +0 -5
- package/out/_next/static/chunks/40f26tfp8txip.js +0 -5
- package/out/_next/static/chunks/40kc42ezz2dri.js +0 -1
- package/out/_next/static/chunks/41f60q88qcigi.js +0 -39
- package/out/_next/static/chunks/41l5iphw-rna3.js +0 -44
- package/out/_next/static/chunks/423kk9x5t9_b8.js +0 -5
- package/out/_next/static/chunks/42k5e3tr3uyzs.js +0 -54
- package/out/_next/static/chunks/4481d7yj7bm2q.js +0 -5
- package/out/_next/static/chunks/448is1kpt9eaa.js +0 -39
- package/out/_next/static/chunks/44fkzg2e80pqt.js +0 -8
- /package/out/_next/static/{BPoacQET3TJr2q9E370Ez → WEaZ5SW9HLnJWzXs84JMH}/_clientMiddlewareManifest.js +0 -0
- /package/out/_next/static/{BPoacQET3TJr2q9E370Ez → WEaZ5SW9HLnJWzXs84JMH}/_ssgManifest.js +0 -0
package/dist/form.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { TextField_default } from './chunk-
|
|
2
|
-
export { FormErrors_default as FormErrors, MarkdownTextAreaField_default as MarkdownTextAreaField, TextField_default as TextField } from './chunk-
|
|
3
|
-
import { Z, l, b, u2, V, Ae, j, L, S as S$1, c as c$1, s, N, $0c4a58759813079a$export$4e328f61c538687f, $e969f22b6713ca4a$export$ae780daf29e6d456, w, e, u as u$1, Fe, ye, Re, Te, w2, u4, s2, g2, u3 as u3$1, p as p$1, c2 as c2$1, f, a as a$1, JSONView_default } from './chunk-
|
|
4
|
-
import { HelpText_default, FieldWrapper_default, clsx_default, Badge_default, ChevronUpDownIcon_default, CheckIcon_default } from './chunk-
|
|
5
|
-
export { FieldWrapper_default as FieldWrapper, Form_default as Form, SubmitButton_default as SubmitButton, TagInputField_default as TagInputField } from './chunk-
|
|
1
|
+
import { TextField_default } from './chunk-NUGWX3KO.js';
|
|
2
|
+
export { CheckboxField_default as CheckboxField, FormErrors_default as FormErrors, MarkdownTextAreaField_default as MarkdownTextAreaField, SelectField_default as SelectField, TextField_default as TextField } from './chunk-NUGWX3KO.js';
|
|
3
|
+
import { Z, l, b, u2, V, Ae, j, L, S as S$1, c as c$1, s, N, $0c4a58759813079a$export$4e328f61c538687f, $e969f22b6713ca4a$export$ae780daf29e6d456, w, e, u as u$1, Fe, ye, Re, Te, w2, u4, s2, g2, u3 as u3$1, p as p$1, c2 as c2$1, f, a as a$1, JSONView_default } from './chunk-6WMH7PLC.js';
|
|
4
|
+
import { HelpText_default, FieldWrapper_default, clsx_default, Badge_default, ChevronUpDownIcon_default, CheckIcon_default } from './chunk-EKWWSFDK.js';
|
|
5
|
+
export { FieldWrapper_default as FieldWrapper, Form_default as Form, SubmitButton_default as SubmitButton, TagInputField_default as TagInputField } from './chunk-EKWWSFDK.js';
|
|
6
6
|
import './chunk-ZUOVKRKC.js';
|
|
7
|
-
import { useField_default, validateMaxLength, validateDate, validateEmail } from './chunk-
|
|
7
|
+
import { useField_default, validateMaxLength, validateDate, validateEmail } from './chunk-5UHBGLFV.js';
|
|
8
8
|
import './chunk-HERLM47Z.js';
|
|
9
|
-
import { m, n as n$1, E } from './chunk-
|
|
10
|
-
import { A, Y, r, a, o2, u, S, n, x, k3 as k3$1, n2, K, c, i3, y, n3, o4, V as V$1, p, d, w as w$1, u2 as u2$1, u3, N as N$1, p2, f2, y2, x2, le, s as s$1, o, n4, c2, l2, l as l$1, T, k2, G } from './chunk-
|
|
9
|
+
import { m, n as n$1, E } from './chunk-EAVP6XZQ.js';
|
|
10
|
+
import { A, Y, r, a, o2, u, S, n, x, k3 as k3$1, n2, K, c, i3, y, n3, o4, V as V$1, p, d, w as w$1, u2 as u2$1, u3, N as N$1, p2, f2, y2, x2, le, s as s$1, o, n4, c2, l2, l as l$1, T, k2, G } from './chunk-CUYIP5XG.js';
|
|
11
11
|
import './chunk-J23QSWDL.js';
|
|
12
|
-
import './chunk-
|
|
12
|
+
import './chunk-2HTCKO4E.js';
|
|
13
13
|
import { jsxs, jsx, Fragment as Fragment$1 } from 'react/jsx-runtime';
|
|
14
14
|
import * as L2 from 'react';
|
|
15
15
|
import L2__default, { createContext, useRef, useCallback, useMemo, Fragment, useState, useContext, useEffect } from 'react';
|
|
@@ -68,98 +68,6 @@ var TextAreaField = ({
|
|
|
68
68
|
) });
|
|
69
69
|
};
|
|
70
70
|
var TextAreaField_default = TextAreaField;
|
|
71
|
-
var SelectField = (props) => {
|
|
72
|
-
const { options, ...field } = useField_default(props);
|
|
73
|
-
const { className } = props || { className: "" };
|
|
74
|
-
return /* @__PURE__ */ jsx(FieldWrapper_default, { ...field, children: /* @__PURE__ */ jsx("div", { className: "select-wrap", children: /* @__PURE__ */ jsxs(
|
|
75
|
-
"select",
|
|
76
|
-
{
|
|
77
|
-
className: clsx_default(
|
|
78
|
-
"block w-full bg-surface-input rounded-md border-1 border-border-default py-2.5 pl-3 pr-10 text-base text-text-primary shadow-xs focus:outline-hidden focus:ring-2 focus:ring-focus-ring sm:text-sm",
|
|
79
|
-
className,
|
|
80
|
-
{
|
|
81
|
-
"border-rose-700 text-rose-600 dark:border-rose-500 dark:text-rose-400": !!field.error
|
|
82
|
-
}
|
|
83
|
-
),
|
|
84
|
-
disabled: field.disabled,
|
|
85
|
-
id: field.name,
|
|
86
|
-
name: field.name,
|
|
87
|
-
onChange: field.onChange,
|
|
88
|
-
onBlur: field.onBlur,
|
|
89
|
-
value: field.value,
|
|
90
|
-
children: [
|
|
91
|
-
/* @__PURE__ */ jsx(
|
|
92
|
-
"option",
|
|
93
|
-
{
|
|
94
|
-
className: "text-text-secondary",
|
|
95
|
-
value: "",
|
|
96
|
-
disabled: field.required,
|
|
97
|
-
hidden: field.required,
|
|
98
|
-
children: field.placeholder || field.label
|
|
99
|
-
}
|
|
100
|
-
),
|
|
101
|
-
Object.entries(options).map(([value, display]) => /* @__PURE__ */ jsx("option", { className: "text-text-secondary", value, children: display }, value))
|
|
102
|
-
]
|
|
103
|
-
}
|
|
104
|
-
) }) });
|
|
105
|
-
};
|
|
106
|
-
var SelectField_default = SelectField;
|
|
107
|
-
var CheckboxField = (props) => {
|
|
108
|
-
const {
|
|
109
|
-
disabled,
|
|
110
|
-
labelClassName,
|
|
111
|
-
containerClassName,
|
|
112
|
-
inputClassName,
|
|
113
|
-
...checkboxProps
|
|
114
|
-
} = props;
|
|
115
|
-
const field = useField_default({ ...props, type: "checkbox" });
|
|
116
|
-
return /* @__PURE__ */ jsxs(
|
|
117
|
-
"div",
|
|
118
|
-
{
|
|
119
|
-
className: clsx_default(
|
|
120
|
-
"",
|
|
121
|
-
{
|
|
122
|
-
"text-rose-600": !!field.error,
|
|
123
|
-
checkbox: true,
|
|
124
|
-
disabled: field.disabled,
|
|
125
|
-
required: field.required
|
|
126
|
-
},
|
|
127
|
-
containerClassName
|
|
128
|
-
),
|
|
129
|
-
children: [
|
|
130
|
-
/* @__PURE__ */ jsx(
|
|
131
|
-
"input",
|
|
132
|
-
{
|
|
133
|
-
checked: !!field.value,
|
|
134
|
-
disabled,
|
|
135
|
-
id: field.name,
|
|
136
|
-
name: field.name,
|
|
137
|
-
onChange: field.onChange,
|
|
138
|
-
onBlur: field.onBlur,
|
|
139
|
-
type: "checkbox",
|
|
140
|
-
className: clsx_default(
|
|
141
|
-
"h-4 w-4 rounded-xs border-border-default bg-white dark:!bg-slate-800 text-indigo-600 dark:text-slate-200 focus:ring-focus-ring",
|
|
142
|
-
inputClassName,
|
|
143
|
-
props.className
|
|
144
|
-
),
|
|
145
|
-
...checkboxProps
|
|
146
|
-
}
|
|
147
|
-
),
|
|
148
|
-
/* @__PURE__ */ jsx(
|
|
149
|
-
"label",
|
|
150
|
-
{
|
|
151
|
-
htmlFor: field.name,
|
|
152
|
-
className: clsx_default("text-sm text-text-primary", labelClassName, {
|
|
153
|
-
"text-danger": !!field.error
|
|
154
|
-
}),
|
|
155
|
-
children: field.label
|
|
156
|
-
}
|
|
157
|
-
)
|
|
158
|
-
]
|
|
159
|
-
}
|
|
160
|
-
);
|
|
161
|
-
};
|
|
162
|
-
var CheckboxField_default = CheckboxField;
|
|
163
71
|
var ChoicesField = ({ multiple, options, ...props }) => {
|
|
164
72
|
const field = useField_default({ multiple, options, ...props });
|
|
165
73
|
const {
|
|
@@ -556,7 +464,86 @@ var debounce = (targetWindow, fn, ms) => {
|
|
|
556
464
|
);
|
|
557
465
|
};
|
|
558
466
|
|
|
559
|
-
// ../node_modules/@tanstack/virtual-core/dist/esm/
|
|
467
|
+
// ../node_modules/@tanstack/virtual-core/dist/esm/scroll-classifier.js
|
|
468
|
+
function classifyScrollEvent({
|
|
469
|
+
offset,
|
|
470
|
+
isScrolling,
|
|
471
|
+
elementMax,
|
|
472
|
+
holdOffset,
|
|
473
|
+
scrollOffset,
|
|
474
|
+
pendingWrite,
|
|
475
|
+
clampedMaxAtWrite
|
|
476
|
+
}) {
|
|
477
|
+
var _a;
|
|
478
|
+
if (isScrolling && pendingWrite === null && offset === scrollOffset) {
|
|
479
|
+
return "spurious";
|
|
480
|
+
}
|
|
481
|
+
if (pendingWrite !== null && Math.abs(offset - pendingWrite.target) < 1.5) {
|
|
482
|
+
return "readBack";
|
|
483
|
+
}
|
|
484
|
+
if (pendingWrite !== null && !pendingWrite.smooth && elementMax !== null && pendingWrite.target > elementMax + holdOffset + 0.5 && Math.abs(offset - (elementMax + holdOffset)) < 1.5) {
|
|
485
|
+
return "clampedReadBack";
|
|
486
|
+
}
|
|
487
|
+
if (pendingWrite !== null && !pendingWrite.smooth && ((_a = pendingWrite.lowMaxes) == null ? void 0 : _a.some((max) => Math.abs(offset - max) < 1.5))) {
|
|
488
|
+
return "clampedReadBack";
|
|
489
|
+
}
|
|
490
|
+
if (clampedMaxAtWrite !== null && Math.abs(offset - clampedMaxAtWrite) < 1.5) {
|
|
491
|
+
return "clampedEcho";
|
|
492
|
+
}
|
|
493
|
+
return "external";
|
|
494
|
+
}
|
|
495
|
+
var isAnimating = (phase) => phase === "smooth" || phase === "smoothFinishing";
|
|
496
|
+
function externalRetiresCommand({
|
|
497
|
+
kind,
|
|
498
|
+
offset,
|
|
499
|
+
command,
|
|
500
|
+
target
|
|
501
|
+
}) {
|
|
502
|
+
return kind !== "spurious" && kind !== "readBack" && // Our own write, clamped (`clampedReadBack`, #1310): the command is not
|
|
503
|
+
// retired by it, and reconcile retargets below the new max.
|
|
504
|
+
kind !== "clampedReadBack" && (command == null ? void 0 : command.index) != null && // Nothing has been written for a command waiting for the tail; these
|
|
505
|
+
// are the fling's events.
|
|
506
|
+
command.phase !== "queued" && // A non-smooth write lands at once, so any other scroll event is the
|
|
507
|
+
// user's, even before reconcile saw the target reached (the target may
|
|
508
|
+
// keep moving, or iOS ignored the write under a finger). A write the
|
|
509
|
+
// browser clamped because the sizer hasn't grown yet reads back at the
|
|
510
|
+
// max, which is also where the fresh target clamps, so the check below
|
|
511
|
+
// keeps it reconciling (#1294). While a smooth scroll's animation may
|
|
512
|
+
// still report, its events look like a user's, so it yields only once it
|
|
513
|
+
// has landed.
|
|
514
|
+
!isAnimating(command.phase) && !approxEqual(offset, command.lastTargetOffset) && !approxEqual(offset, target()) && // A compensation write's clamped echo (#1258) keeps the command. The
|
|
515
|
+
// order is deliberate, not tidiness: this clause stays after `target()`
|
|
516
|
+
// (and `clampedReadBack` before it) because `target()` can rebuild the
|
|
517
|
+
// measurements, so it must run for exactly the events it always did.
|
|
518
|
+
kind !== "clampedEcho";
|
|
519
|
+
}
|
|
520
|
+
var FLING_WINDOW_MS = 40;
|
|
521
|
+
function flingSpedUp(samples) {
|
|
522
|
+
const last = samples[samples.length - 1];
|
|
523
|
+
if (last === void 0) return false;
|
|
524
|
+
let j3 = samples.length - 2;
|
|
525
|
+
while (j3 >= 0 && last.t - samples[j3].t < FLING_WINDOW_MS) j3--;
|
|
526
|
+
if (j3 < 0) return false;
|
|
527
|
+
const mid = samples[j3];
|
|
528
|
+
let k4 = j3 - 1;
|
|
529
|
+
while (k4 >= 0 && mid.t - samples[k4].t < FLING_WINDOW_MS) k4--;
|
|
530
|
+
if (k4 < 0) return false;
|
|
531
|
+
const first = samples[k4];
|
|
532
|
+
const recent = (last.offset - mid.offset) / (last.t - mid.t);
|
|
533
|
+
const before = (mid.offset - first.offset) / (mid.t - first.t);
|
|
534
|
+
return recent * before >= 0 && Math.abs(recent) >= 2 * Math.abs(before) && Math.abs(recent) - Math.abs(before) >= 0.8;
|
|
535
|
+
}
|
|
536
|
+
function flingCaught(samples) {
|
|
537
|
+
const last = samples[samples.length - 1];
|
|
538
|
+
if (last === void 0) return false;
|
|
539
|
+
let j3 = samples.length - 2;
|
|
540
|
+
while (j3 >= 0 && last.t - samples[j3].t < FLING_WINDOW_MS) j3--;
|
|
541
|
+
if (j3 < 0) return false;
|
|
542
|
+
const from = samples[j3];
|
|
543
|
+
return Math.abs(last.offset - from.offset) / (last.t - from.t) >= 0.05;
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
// ../node_modules/@tanstack/virtual-core/dist/esm/ios-gesture.js
|
|
560
547
|
var _isIOSResult;
|
|
561
548
|
var isIOSWebKit = () => {
|
|
562
549
|
if (_isIOSResult !== void 0) return _isIOSResult;
|
|
@@ -565,14 +552,144 @@ var isIOSWebKit = () => {
|
|
|
565
552
|
const mtp = navigator.maxTouchPoints;
|
|
566
553
|
return _isIOSResult = navigator.platform === "MacIntel" && mtp !== void 0 && mtp > 0;
|
|
567
554
|
};
|
|
555
|
+
var _iosMomentumOverridesWritesResult;
|
|
556
|
+
var iosMomentumOverridesWrites = () => {
|
|
557
|
+
if (_iosMomentumOverridesWritesResult !== void 0) {
|
|
558
|
+
return _iosMomentumOverridesWritesResult;
|
|
559
|
+
}
|
|
560
|
+
return _iosMomentumOverridesWritesResult = isIOSWebKit() && typeof CSS !== "undefined" && typeof CSS.supports === "function" && CSS.supports("overflow-anchor: auto");
|
|
561
|
+
};
|
|
562
|
+
var momentumOverridesWrites = () => !isIOSWebKit() || iosMomentumOverridesWrites();
|
|
563
|
+
var touchListenerOptions = {
|
|
564
|
+
capture: true,
|
|
565
|
+
passive: true
|
|
566
|
+
};
|
|
567
|
+
var IosGesture = class {
|
|
568
|
+
constructor(host) {
|
|
569
|
+
this.host = host;
|
|
570
|
+
this._touch = null;
|
|
571
|
+
this.inMotion = () => this._touch !== null && this._touch.phase !== "lateFling";
|
|
572
|
+
this.dragging = () => {
|
|
573
|
+
var _a;
|
|
574
|
+
return ((_a = this._touch) == null ? void 0 : _a.phase) === "down" && this._touch.moved;
|
|
575
|
+
};
|
|
576
|
+
this.tail = () => {
|
|
577
|
+
var _a;
|
|
578
|
+
return ((_a = this._touch) == null ? void 0 : _a.phase) === "tail" ? this._touch.moved ? "fling" : "tap" : null;
|
|
579
|
+
};
|
|
580
|
+
this.onScroll = ({
|
|
581
|
+
isScrolling,
|
|
582
|
+
ownReadBack,
|
|
583
|
+
moved,
|
|
584
|
+
external
|
|
585
|
+
}) => {
|
|
586
|
+
var _a, _b, _c;
|
|
587
|
+
if (isScrolling && ((_a = this._touch) == null ? void 0 : _a.phase) === "tail") {
|
|
588
|
+
this._openTail(this._touch.moved || !ownReadBack, false);
|
|
589
|
+
} else if (((_b = this._touch) == null ? void 0 : _b.phase) === "lateFling") {
|
|
590
|
+
if (this.host.now() > this._touch.until) {
|
|
591
|
+
this._touch = null;
|
|
592
|
+
} else if (external && isScrolling && moved) {
|
|
593
|
+
this._openTail(true, false);
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
if (!ownReadBack && isScrolling && moved && ((_c = this._touch) == null ? void 0 : _c.phase) === "down") {
|
|
597
|
+
this._touch.moved = true;
|
|
598
|
+
return true;
|
|
599
|
+
}
|
|
600
|
+
return false;
|
|
601
|
+
};
|
|
602
|
+
this.touchStart = () => {
|
|
603
|
+
this.end();
|
|
604
|
+
this._touch = { phase: "down", moved: false };
|
|
605
|
+
};
|
|
606
|
+
this.touchEnd = () => {
|
|
607
|
+
var _a;
|
|
608
|
+
const moved = ((_a = this._touch) == null ? void 0 : _a.phase) === "down" && this._touch.moved;
|
|
609
|
+
this.end();
|
|
610
|
+
this._openTail(moved, moved);
|
|
611
|
+
};
|
|
612
|
+
this.end = () => {
|
|
613
|
+
var _a;
|
|
614
|
+
const win = this.host.getWindow();
|
|
615
|
+
if (((_a = this._touch) == null ? void 0 : _a.phase) === "tail" && win != null) {
|
|
616
|
+
win.clearTimeout(this._touch.timerId);
|
|
617
|
+
}
|
|
618
|
+
this._touch = null;
|
|
619
|
+
};
|
|
620
|
+
this.listen = (target) => {
|
|
621
|
+
const onTouchStart = () => this.touchStart();
|
|
622
|
+
const onTouchEnd = () => this.touchEnd();
|
|
623
|
+
target.addEventListener("touchstart", onTouchStart, touchListenerOptions);
|
|
624
|
+
target.addEventListener("touchend", onTouchEnd, touchListenerOptions);
|
|
625
|
+
target.addEventListener("touchcancel", onTouchEnd, touchListenerOptions);
|
|
626
|
+
return () => {
|
|
627
|
+
target.removeEventListener(
|
|
628
|
+
"touchstart",
|
|
629
|
+
onTouchStart,
|
|
630
|
+
touchListenerOptions
|
|
631
|
+
);
|
|
632
|
+
target.removeEventListener("touchend", onTouchEnd, touchListenerOptions);
|
|
633
|
+
target.removeEventListener(
|
|
634
|
+
"touchcancel",
|
|
635
|
+
onTouchEnd,
|
|
636
|
+
touchListenerOptions
|
|
637
|
+
);
|
|
638
|
+
this.end();
|
|
639
|
+
};
|
|
640
|
+
};
|
|
641
|
+
this._openTail = (moved, awaitingFling) => {
|
|
642
|
+
const win = this.host.getWindow();
|
|
643
|
+
if (win == null) return;
|
|
644
|
+
this.end();
|
|
645
|
+
const tail = {
|
|
646
|
+
phase: "tail",
|
|
647
|
+
moved,
|
|
648
|
+
awaitingFling,
|
|
649
|
+
// Only fires while this tail is current: `end` clears it otherwise.
|
|
650
|
+
timerId: win.setTimeout(() => {
|
|
651
|
+
if (this.host.tailStillMoving()) {
|
|
652
|
+
this._openTail(tail.moved, tail.awaitingFling);
|
|
653
|
+
return;
|
|
654
|
+
}
|
|
655
|
+
this._touch = tail.awaitingFling ? { phase: "lateFling", until: this.host.now() + 1e3 } : null;
|
|
656
|
+
this.host.onTailClosed();
|
|
657
|
+
}, 150)
|
|
658
|
+
};
|
|
659
|
+
this._touch = tail;
|
|
660
|
+
};
|
|
661
|
+
}
|
|
662
|
+
get touch() {
|
|
663
|
+
return this._touch;
|
|
664
|
+
}
|
|
665
|
+
};
|
|
666
|
+
|
|
667
|
+
// ../node_modules/@tanstack/virtual-core/dist/esm/index.js
|
|
568
668
|
var getRect = (element) => {
|
|
569
|
-
const {
|
|
570
|
-
return { width:
|
|
669
|
+
const { clientWidth, clientHeight } = element;
|
|
670
|
+
return { width: clientWidth, height: clientHeight };
|
|
671
|
+
};
|
|
672
|
+
var createFrameQueue = (targetWindow) => {
|
|
673
|
+
const ids = /* @__PURE__ */ new Set();
|
|
674
|
+
return {
|
|
675
|
+
schedule: (fn) => {
|
|
676
|
+
const id = targetWindow.requestAnimationFrame(() => {
|
|
677
|
+
ids.delete(id);
|
|
678
|
+
fn();
|
|
679
|
+
});
|
|
680
|
+
ids.add(id);
|
|
681
|
+
},
|
|
682
|
+
cancel: () => {
|
|
683
|
+
ids.forEach((id) => targetWindow.cancelAnimationFrame(id));
|
|
684
|
+
ids.clear();
|
|
685
|
+
}
|
|
686
|
+
};
|
|
571
687
|
};
|
|
572
688
|
var defaultKeyExtractor = (index) => index;
|
|
573
689
|
var defaultRangeExtractor = (range) => {
|
|
574
|
-
const
|
|
575
|
-
const
|
|
690
|
+
const overscan = range.overscan * Math.max(range.lanes ?? 1, 1);
|
|
691
|
+
const start = Math.max(range.startIndex - overscan, 0);
|
|
692
|
+
const end = Math.min(range.endIndex + overscan, range.count - 1);
|
|
576
693
|
const len = end - start + 1;
|
|
577
694
|
const arr = new Array(len);
|
|
578
695
|
for (let i2 = 0; i2 < len; i2++) {
|
|
@@ -598,23 +715,17 @@ var observeElementRect = (instance, cb) => {
|
|
|
598
715
|
return () => {
|
|
599
716
|
};
|
|
600
717
|
}
|
|
601
|
-
const
|
|
718
|
+
const frames = createFrameQueue(targetWindow);
|
|
719
|
+
const observer = new targetWindow.ResizeObserver(() => {
|
|
602
720
|
const run = () => {
|
|
603
|
-
const entry = entries[0];
|
|
604
|
-
if (entry == null ? void 0 : entry.borderBoxSize) {
|
|
605
|
-
const box = entry.borderBoxSize[0];
|
|
606
|
-
if (box) {
|
|
607
|
-
handler({ width: box.inlineSize, height: box.blockSize });
|
|
608
|
-
return;
|
|
609
|
-
}
|
|
610
|
-
}
|
|
611
721
|
handler(getRect(element));
|
|
612
722
|
};
|
|
613
|
-
instance.options.useAnimationFrameWithResizeObserver ?
|
|
723
|
+
instance.options.useAnimationFrameWithResizeObserver ? frames.schedule(run) : run();
|
|
614
724
|
});
|
|
615
|
-
observer.observe(element, { box: "
|
|
725
|
+
observer.observe(element, { box: "content-box" });
|
|
616
726
|
return () => {
|
|
617
727
|
observer.unobserve(element);
|
|
728
|
+
frames.cancel();
|
|
618
729
|
};
|
|
619
730
|
};
|
|
620
731
|
var addEventListenerOptions = {
|
|
@@ -689,13 +800,18 @@ var scrollWithAdjustments = (offset, {
|
|
|
689
800
|
adjustments = 0,
|
|
690
801
|
behavior
|
|
691
802
|
}, instance) => {
|
|
692
|
-
var _a
|
|
693
|
-
|
|
694
|
-
|
|
803
|
+
var _a;
|
|
804
|
+
const { scrollElement, options } = instance;
|
|
805
|
+
const adjustedOffset = offset + adjustments;
|
|
806
|
+
const isRtlElement = options.horizontal && options.isRtl && scrollElement !== null && "ownerDocument" in scrollElement;
|
|
807
|
+
(_a = scrollElement == null ? void 0 : scrollElement.scrollTo) == null ? void 0 : _a.call(scrollElement, {
|
|
808
|
+
[options.horizontal ? "left" : "top"]: isRtlElement ? -adjustedOffset : adjustedOffset,
|
|
695
809
|
behavior
|
|
696
810
|
});
|
|
697
811
|
};
|
|
698
812
|
var elementScroll = scrollWithAdjustments;
|
|
813
|
+
var initialScrollPhase = (behavior, atTarget) => behavior === "smooth" ? atTarget ? "smoothLanded" : "smooth" : "instant";
|
|
814
|
+
var isSmoothScroll = (state) => (state == null ? void 0 : state.phase) === "smooth" || (state == null ? void 0 : state.phase) === "smoothLanded";
|
|
699
815
|
function isAppendWithTrim(prevCount, nextCount, getPreviousKey, getNextKey) {
|
|
700
816
|
if (nextCount === 0) return false;
|
|
701
817
|
const firstKey = getNextKey(0);
|
|
@@ -737,67 +853,144 @@ var Virtualizer = class {
|
|
|
737
853
|
this.scrollRect = null;
|
|
738
854
|
this.scrollOffset = null;
|
|
739
855
|
this.scrollDirection = null;
|
|
740
|
-
this.
|
|
741
|
-
this.
|
|
742
|
-
this.
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
856
|
+
this._holdOffset = 0;
|
|
857
|
+
this._reportedOverscroll = false;
|
|
858
|
+
this._iosGesture = new IosGesture({
|
|
859
|
+
getWindow: () => this.targetWindow,
|
|
860
|
+
now: () => this.now(),
|
|
861
|
+
// The end of a fling can move less than a pixel per scroll event, so
|
|
862
|
+
// events can stop for 150ms while the fling is still running (seen on
|
|
863
|
+
// an iPhone, 27.0.1). A command waiting for it would then be written
|
|
864
|
+
// into the fling and overridden. The element having moved since the
|
|
865
|
+
// last event means it has not ended: wait again. Not while our own
|
|
866
|
+
// write has yet to report: that moved it.
|
|
867
|
+
tailStillMoving: () => {
|
|
868
|
+
const state = this.scrollState;
|
|
869
|
+
if ((state == null ? void 0 : state.phase) !== "queued" || this.pendingWrite !== null) {
|
|
870
|
+
return false;
|
|
871
|
+
}
|
|
872
|
+
const now = this._readElementOffset();
|
|
873
|
+
if (now === null || this._lastElementOffset === null || Math.abs(now - this._lastElementOffset) < 1) {
|
|
874
|
+
return false;
|
|
875
|
+
}
|
|
876
|
+
this._lastElementOffset = now;
|
|
877
|
+
state.samples = [...state.samples ?? [], { t: this.now(), offset: now }];
|
|
878
|
+
return true;
|
|
879
|
+
},
|
|
880
|
+
onTailClosed: () => {
|
|
881
|
+
const state = this.scrollState;
|
|
882
|
+
if ((state == null ? void 0 : state.phase) === "queued" && flingCaught(state.samples ?? [])) {
|
|
883
|
+
this.scrollState = null;
|
|
884
|
+
}
|
|
885
|
+
this._flushHoldIfReady(true);
|
|
886
|
+
this._writeAwaitingCommand();
|
|
887
|
+
this._retryClampedAdjustment();
|
|
888
|
+
}
|
|
889
|
+
});
|
|
890
|
+
this._lastElementOffset = null;
|
|
891
|
+
this.pendingWrite = null;
|
|
746
892
|
this._clampedAdjustment = null;
|
|
747
893
|
this.elementsCache = /* @__PURE__ */ new Map();
|
|
894
|
+
this._resizeBatch = null;
|
|
748
895
|
this.now = () => {
|
|
749
896
|
var _a, _b, _c;
|
|
750
897
|
return ((_c = (_b = (_a = this.targetWindow) == null ? void 0 : _a.performance) == null ? void 0 : _b.now) == null ? void 0 : _c.call(_b)) ?? Date.now();
|
|
751
898
|
};
|
|
752
899
|
this.observer = /* @__PURE__ */ (() => {
|
|
753
900
|
let _ro = null;
|
|
901
|
+
let _frames = null;
|
|
902
|
+
let delivering = false;
|
|
903
|
+
let observeQueued = false;
|
|
904
|
+
const pendingObservations = /* @__PURE__ */ new Set();
|
|
754
905
|
const get = () => {
|
|
755
906
|
if (_ro) {
|
|
756
907
|
return _ro;
|
|
757
908
|
}
|
|
758
|
-
|
|
909
|
+
const targetWindow = this.targetWindow;
|
|
910
|
+
if (!targetWindow || !targetWindow.ResizeObserver) {
|
|
759
911
|
return null;
|
|
760
912
|
}
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
913
|
+
const frames = _frames = createFrameQueue(targetWindow);
|
|
914
|
+
return _ro = new targetWindow.ResizeObserver((entries) => {
|
|
915
|
+
const run = () => {
|
|
916
|
+
const batch = { sync: false };
|
|
917
|
+
this._resizeBatch = batch;
|
|
918
|
+
try {
|
|
919
|
+
entries.forEach(measureEntry);
|
|
920
|
+
} finally {
|
|
921
|
+
this._resizeBatch = null;
|
|
922
|
+
if (batch.notify) {
|
|
923
|
+
this.notify(batch.sync);
|
|
924
|
+
this._noteClampMax();
|
|
925
|
+
this._flushHoldIfReady(true);
|
|
926
|
+
this._retryClampedAdjustment();
|
|
927
|
+
this.measureElement(null);
|
|
775
928
|
}
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
929
|
+
}
|
|
930
|
+
};
|
|
931
|
+
if (this.options.useAnimationFrameWithResizeObserver) {
|
|
932
|
+
frames.schedule(run);
|
|
933
|
+
} else {
|
|
934
|
+
delivering = true;
|
|
935
|
+
try {
|
|
936
|
+
run();
|
|
937
|
+
} finally {
|
|
938
|
+
delivering = false;
|
|
939
|
+
}
|
|
940
|
+
}
|
|
786
941
|
});
|
|
787
942
|
};
|
|
943
|
+
const measureEntry = (entry) => {
|
|
944
|
+
const node = entry.target;
|
|
945
|
+
const index = this.indexFromElement(node);
|
|
946
|
+
if (!node.isConnected) {
|
|
947
|
+
this.observer.unobserve(node);
|
|
948
|
+
for (const [cacheKey, cachedNode] of this.elementsCache) {
|
|
949
|
+
if (cachedNode === node) {
|
|
950
|
+
this.elementsCache.delete(cacheKey);
|
|
951
|
+
break;
|
|
952
|
+
}
|
|
953
|
+
}
|
|
954
|
+
return;
|
|
955
|
+
}
|
|
956
|
+
if (!this.isIndexInRange(index)) return;
|
|
957
|
+
if (this.shouldMeasureDuringScroll(index)) {
|
|
958
|
+
this.resizeItem(index, this.options.measureElement(node, entry, this));
|
|
959
|
+
}
|
|
960
|
+
};
|
|
788
961
|
return {
|
|
789
962
|
disconnect: () => {
|
|
790
963
|
var _a;
|
|
791
964
|
(_a = get()) == null ? void 0 : _a.disconnect();
|
|
965
|
+
_frames == null ? void 0 : _frames.cancel();
|
|
966
|
+
pendingObservations.clear();
|
|
967
|
+
observeQueued = false;
|
|
792
968
|
_ro = null;
|
|
969
|
+
_frames = null;
|
|
793
970
|
},
|
|
794
971
|
observe: (target) => {
|
|
795
|
-
|
|
796
|
-
|
|
972
|
+
const observer = get();
|
|
973
|
+
if (!observer) return;
|
|
974
|
+
if (!delivering) {
|
|
975
|
+
observer.observe(target, { box: "border-box" });
|
|
976
|
+
return;
|
|
977
|
+
}
|
|
978
|
+
pendingObservations.add(target);
|
|
979
|
+
if (!observeQueued) {
|
|
980
|
+
observeQueued = true;
|
|
981
|
+
_frames == null ? void 0 : _frames.schedule(() => {
|
|
982
|
+
observeQueued = false;
|
|
983
|
+
pendingObservations.forEach((node) => {
|
|
984
|
+
if (node.isConnected) _ro == null ? void 0 : _ro.observe(node, { box: "border-box" });
|
|
985
|
+
});
|
|
986
|
+
pendingObservations.clear();
|
|
987
|
+
});
|
|
988
|
+
}
|
|
797
989
|
},
|
|
798
990
|
unobserve: (target) => {
|
|
799
991
|
var _a;
|
|
800
|
-
|
|
992
|
+
pendingObservations.delete(target);
|
|
993
|
+
(_a = get()) == null ? void 0 : _a.unobserve(target);
|
|
801
994
|
}
|
|
802
995
|
};
|
|
803
996
|
})();
|
|
@@ -877,9 +1070,8 @@ var Virtualizer = class {
|
|
|
877
1070
|
this.pendingMin = 0;
|
|
878
1071
|
this.itemSizeCacheVersion++;
|
|
879
1072
|
}
|
|
880
|
-
let
|
|
881
|
-
|
|
882
|
-
if (anchor && this.scrollOffset !== null) {
|
|
1073
|
+
let anchorDelta = null;
|
|
1074
|
+
if (anchor && this.scrollOffset !== null && !this._awaitingCommandReadBack()) {
|
|
883
1075
|
const [anchorKey, anchorOffset] = anchor;
|
|
884
1076
|
const newMeasurements = this.getMeasurements();
|
|
885
1077
|
const { count, getItemKey } = this.options;
|
|
@@ -894,18 +1086,19 @@ var Virtualizer = class {
|
|
|
894
1086
|
if (!followOnAppend && newOffset !== this.scrollOffset) {
|
|
895
1087
|
anchorDelta = newOffset - this.scrollOffset;
|
|
896
1088
|
this.scrollOffset = newOffset;
|
|
897
|
-
anchorResolved = true;
|
|
898
1089
|
}
|
|
899
1090
|
}
|
|
900
1091
|
}
|
|
901
1092
|
}
|
|
902
|
-
if (
|
|
903
|
-
this.pendingScrollAnchor =
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
1093
|
+
if (followOnAppend) {
|
|
1094
|
+
this.pendingScrollAnchor = { kind: "follow", behavior: followOnAppend };
|
|
1095
|
+
} else if (anchorDelta !== null) {
|
|
1096
|
+
if (this._canWriteScroll()) {
|
|
1097
|
+
this.pendingScrollAnchor = { kind: "anchor", delta: anchorDelta };
|
|
1098
|
+
} else {
|
|
1099
|
+
this._holdOffset += anchorDelta;
|
|
1100
|
+
this._followOffsetTarget(anchorDelta);
|
|
1101
|
+
}
|
|
909
1102
|
}
|
|
910
1103
|
};
|
|
911
1104
|
this.notify = (sync) => {
|
|
@@ -935,6 +1128,7 @@ var Virtualizer = class {
|
|
|
935
1128
|
}
|
|
936
1129
|
);
|
|
937
1130
|
this.cleanup = () => {
|
|
1131
|
+
var _a;
|
|
938
1132
|
this.unsubs.filter(Boolean).forEach((d2) => d2());
|
|
939
1133
|
this.unsubs = [];
|
|
940
1134
|
this.observer.disconnect();
|
|
@@ -943,12 +1137,14 @@ var Virtualizer = class {
|
|
|
943
1137
|
this.rafId = null;
|
|
944
1138
|
}
|
|
945
1139
|
this.scrollState = null;
|
|
1140
|
+
(_a = this._momentumStop) == null ? void 0 : _a.restore();
|
|
1141
|
+
this._momentumStop = null;
|
|
946
1142
|
this.isScrolling = false;
|
|
947
1143
|
this.scrollDirection = null;
|
|
948
|
-
this.
|
|
949
|
-
this.
|
|
950
|
-
this._iosJustTouchEnded = false;
|
|
1144
|
+
this._holdOffset = 0;
|
|
1145
|
+
this._reportedOverscroll = false;
|
|
951
1146
|
this._clampedAdjustment = null;
|
|
1147
|
+
this.pendingWrite = null;
|
|
952
1148
|
this.scrollElement = null;
|
|
953
1149
|
this.targetWindow = null;
|
|
954
1150
|
};
|
|
@@ -958,7 +1154,7 @@ var Virtualizer = class {
|
|
|
958
1154
|
};
|
|
959
1155
|
};
|
|
960
1156
|
this._willUpdate = () => {
|
|
961
|
-
var _a
|
|
1157
|
+
var _a;
|
|
962
1158
|
const scrollElement = this.options.enabled ? this.options.getScrollElement() : null;
|
|
963
1159
|
if (this.scrollElement !== scrollElement) {
|
|
964
1160
|
this.cleanup();
|
|
@@ -983,22 +1179,71 @@ var Virtualizer = class {
|
|
|
983
1179
|
);
|
|
984
1180
|
this.unsubs.push(
|
|
985
1181
|
this.options.observeElementOffset(this, (offset, isScrolling) => {
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
1182
|
+
var _a2, _b, _c, _d;
|
|
1183
|
+
const elementMax = isScrolling ? this._elementMaxScrollOffset() : null;
|
|
1184
|
+
const wasOverscrolled = this._reportedOverscroll;
|
|
1185
|
+
this._reportedOverscroll = offset < 0 || elementMax !== null && offset > elementMax + 1;
|
|
1186
|
+
const elementOffset = offset;
|
|
1187
|
+
this._lastElementOffset = elementOffset;
|
|
1188
|
+
offset = this._toLayoutOffset(offset);
|
|
1189
|
+
const kind = this._classifyScrollEvent(
|
|
1190
|
+
offset,
|
|
1191
|
+
isScrolling,
|
|
1192
|
+
elementMax
|
|
1193
|
+
);
|
|
1194
|
+
if (kind === "spurious") return;
|
|
1195
|
+
if (kind === "readBack") {
|
|
1196
|
+
offset = this.pendingWrite.target;
|
|
1197
|
+
} else if (kind === "clampedReadBack" && ((_a2 = this.scrollState) == null ? void 0 : _a2.index) != null && // Not `elementMax`: an adapter can report the read-back at rest.
|
|
1198
|
+
offset < this.getMaxScrollOffset() - 1.5) {
|
|
1199
|
+
this.scrollState.lastTargetOffset = offset;
|
|
1200
|
+
} else if (externalRetiresCommand({
|
|
1201
|
+
kind,
|
|
1202
|
+
offset,
|
|
1203
|
+
command: this.scrollState,
|
|
1204
|
+
target: () => this.getScrollStateTarget(this.scrollState)
|
|
1205
|
+
})) {
|
|
1206
|
+
this.scrollState = null;
|
|
991
1207
|
}
|
|
992
|
-
this.
|
|
1208
|
+
this.pendingWrite = null;
|
|
993
1209
|
if (this._clampedAdjustment !== null && Math.abs(offset - this._clampedAdjustment.maxAtWrite) >= 1.5) {
|
|
994
1210
|
this._clampedAdjustment = null;
|
|
995
1211
|
}
|
|
996
|
-
this.scrollAdjustments = 0;
|
|
997
1212
|
const prevOffset = this.getScrollOffset();
|
|
1213
|
+
const prevDirection = this.scrollDirection;
|
|
998
1214
|
this.scrollDirection = isScrolling ? prevOffset === offset ? this.scrollDirection : prevOffset < offset ? "forward" : "backward" : null;
|
|
999
1215
|
this.scrollOffset = offset;
|
|
1000
1216
|
this.isScrolling = isScrolling;
|
|
1001
|
-
this.
|
|
1217
|
+
const queued = this.scrollState;
|
|
1218
|
+
if ((queued == null ? void 0 : queued.phase) === "queued" && kind === "external" && isScrolling) {
|
|
1219
|
+
if (wasOverscrolled || this._reportedOverscroll) {
|
|
1220
|
+
queued.samples = [];
|
|
1221
|
+
} else {
|
|
1222
|
+
const t = this.now();
|
|
1223
|
+
queued.samples = [
|
|
1224
|
+
...(queued.samples ?? []).filter(
|
|
1225
|
+
(sample) => t - sample.t <= 200
|
|
1226
|
+
),
|
|
1227
|
+
{ t, offset: elementOffset }
|
|
1228
|
+
];
|
|
1229
|
+
if (prevDirection !== null && this.scrollDirection !== prevDirection || flingSpedUp(queued.samples)) {
|
|
1230
|
+
this.scrollState = null;
|
|
1231
|
+
}
|
|
1232
|
+
}
|
|
1233
|
+
}
|
|
1234
|
+
if (this._iosGesture.onScroll({
|
|
1235
|
+
isScrolling,
|
|
1236
|
+
ownReadBack: kind === "readBack",
|
|
1237
|
+
moved: offset !== prevOffset,
|
|
1238
|
+
// Neither our write's read-back nor a frame of our smooth
|
|
1239
|
+
// animation: the user or a fling moved it.
|
|
1240
|
+
external: kind === "external" && ((_b = this.scrollState) == null ? void 0 : _b.phase) !== "smooth" && ((_c = this.scrollState) == null ? void 0 : _c.phase) !== "smoothFinishing"
|
|
1241
|
+
}) && // The user scrolls: a command still waiting for the tail is
|
|
1242
|
+
// theirs to override, like a written one would be.
|
|
1243
|
+
((_d = this.scrollState) == null ? void 0 : _d.phase) === "queued") {
|
|
1244
|
+
this.scrollState = null;
|
|
1245
|
+
}
|
|
1246
|
+
this._flushHoldIfReady(true);
|
|
1002
1247
|
if (this.scrollState) {
|
|
1003
1248
|
this.scheduleScrollReconcile();
|
|
1004
1249
|
}
|
|
@@ -1006,109 +1251,101 @@ var Virtualizer = class {
|
|
|
1006
1251
|
})
|
|
1007
1252
|
);
|
|
1008
1253
|
if ("addEventListener" in this.scrollElement) {
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
this._iosTouching = true;
|
|
1012
|
-
this._iosJustTouchEnded = false;
|
|
1013
|
-
if (this._iosTouchEndTimerId !== null && this.targetWindow != null) {
|
|
1014
|
-
this.targetWindow.clearTimeout(this._iosTouchEndTimerId);
|
|
1015
|
-
this._iosTouchEndTimerId = null;
|
|
1016
|
-
}
|
|
1017
|
-
};
|
|
1018
|
-
const onTouchEnd = () => {
|
|
1019
|
-
this._iosTouching = false;
|
|
1020
|
-
if (!isIOSWebKit() || this.targetWindow == null) {
|
|
1021
|
-
return;
|
|
1022
|
-
}
|
|
1023
|
-
this._iosJustTouchEnded = true;
|
|
1024
|
-
this._iosTouchEndTimerId = this.targetWindow.setTimeout(() => {
|
|
1025
|
-
this._iosJustTouchEnded = false;
|
|
1026
|
-
this._iosTouchEndTimerId = null;
|
|
1027
|
-
this._flushIosDeferredIfReady();
|
|
1028
|
-
}, 150);
|
|
1029
|
-
};
|
|
1030
|
-
scrollEl.addEventListener(
|
|
1031
|
-
"touchstart",
|
|
1032
|
-
onTouchStart,
|
|
1033
|
-
addEventListenerOptions
|
|
1034
|
-
);
|
|
1035
|
-
scrollEl.addEventListener(
|
|
1036
|
-
"touchend",
|
|
1037
|
-
onTouchEnd,
|
|
1038
|
-
addEventListenerOptions
|
|
1254
|
+
this.unsubs.push(
|
|
1255
|
+
this._iosGesture.listen(this.scrollElement)
|
|
1039
1256
|
);
|
|
1040
|
-
this.unsubs.push(() => {
|
|
1041
|
-
scrollEl.removeEventListener("touchstart", onTouchStart);
|
|
1042
|
-
scrollEl.removeEventListener("touchend", onTouchEnd);
|
|
1043
|
-
if (this._iosTouchEndTimerId !== null && this.targetWindow != null) {
|
|
1044
|
-
this.targetWindow.clearTimeout(this._iosTouchEndTimerId);
|
|
1045
|
-
this._iosTouchEndTimerId = null;
|
|
1046
|
-
}
|
|
1047
|
-
});
|
|
1048
1257
|
}
|
|
1049
|
-
this._scrollToOffset(this.getScrollOffset()
|
|
1050
|
-
adjustments: void 0,
|
|
1051
|
-
behavior: void 0
|
|
1052
|
-
});
|
|
1258
|
+
this._scrollToOffset(this.getScrollOffset());
|
|
1053
1259
|
}
|
|
1260
|
+
this._noteClampMax();
|
|
1054
1261
|
const anchor = this.pendingScrollAnchor;
|
|
1055
1262
|
this.pendingScrollAnchor = null;
|
|
1056
1263
|
if (anchor && this.scrollElement && this.options.enabled) {
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
this.getScrollOffset() - anchorDelta,
|
|
1264
|
+
if (anchor.kind === "anchor") {
|
|
1265
|
+
if (!this._canWriteScroll()) {
|
|
1266
|
+
this._holdOffset += anchor.delta;
|
|
1267
|
+
this._followOffsetTarget(anchor.delta);
|
|
1268
|
+
this.notify(false);
|
|
1269
|
+
} else if (isSmoothScroll(this.scrollState) && !approxEqual(
|
|
1270
|
+
this.getScrollOffset() - anchor.delta,
|
|
1065
1271
|
this.scrollState.lastTargetOffset
|
|
1066
1272
|
)) ;
|
|
1067
1273
|
else {
|
|
1068
|
-
this.
|
|
1069
|
-
|
|
1070
|
-
behavior: void 0
|
|
1071
|
-
});
|
|
1274
|
+
this._followOffsetTarget(anchor.delta);
|
|
1275
|
+
this._scrollToOffset(this.getScrollOffset());
|
|
1072
1276
|
}
|
|
1073
|
-
}
|
|
1074
|
-
|
|
1075
|
-
this.scrollToEnd({ behavior: followOnAppend });
|
|
1277
|
+
} else {
|
|
1278
|
+
this.scrollToEnd({ behavior: anchor.behavior });
|
|
1076
1279
|
}
|
|
1077
1280
|
}
|
|
1281
|
+
this._flushHoldIfReady(false);
|
|
1078
1282
|
this._retryClampedAdjustment();
|
|
1079
1283
|
};
|
|
1284
|
+
this._classifyScrollEvent = (offset, isScrolling, elementMax) => {
|
|
1285
|
+
var _a;
|
|
1286
|
+
return classifyScrollEvent({
|
|
1287
|
+
offset,
|
|
1288
|
+
isScrolling,
|
|
1289
|
+
elementMax,
|
|
1290
|
+
holdOffset: this._holdOffset,
|
|
1291
|
+
scrollOffset: this.scrollOffset,
|
|
1292
|
+
pendingWrite: this.pendingWrite,
|
|
1293
|
+
clampedMaxAtWrite: ((_a = this._clampedAdjustment) == null ? void 0 : _a.maxAtWrite) ?? null
|
|
1294
|
+
});
|
|
1295
|
+
};
|
|
1080
1296
|
this._retryClampedAdjustment = () => {
|
|
1081
|
-
if (this._clampedAdjustment === null || !this.scrollElement || !this.options.enabled) {
|
|
1297
|
+
if (this._clampedAdjustment === null || !this.scrollElement || !this.options.enabled || !this._canWriteScroll()) {
|
|
1082
1298
|
return;
|
|
1083
1299
|
}
|
|
1084
1300
|
const { target, maxAtWrite } = this._clampedAdjustment;
|
|
1085
1301
|
const max = this.getMaxScrollOffset();
|
|
1086
1302
|
if (max > maxAtWrite + 0.5) {
|
|
1087
1303
|
this._clampedAdjustment = target > max + 0.5 ? { target, maxAtWrite: max } : null;
|
|
1088
|
-
this._scrollToOffset(target
|
|
1089
|
-
adjustments: void 0,
|
|
1090
|
-
behavior: void 0
|
|
1091
|
-
});
|
|
1304
|
+
this._scrollToOffset(target);
|
|
1092
1305
|
}
|
|
1093
1306
|
};
|
|
1094
|
-
this.
|
|
1095
|
-
|
|
1096
|
-
if (
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
const
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1307
|
+
this._writeAwaitingCommand = () => {
|
|
1308
|
+
const state = this.scrollState;
|
|
1309
|
+
if (state === null || state.phase !== "queued") return;
|
|
1310
|
+
const { behavior } = state;
|
|
1311
|
+
this.getMeasurements();
|
|
1312
|
+
const offset = this.getScrollStateTarget(state);
|
|
1313
|
+
state.lastTargetOffset = offset;
|
|
1314
|
+
this._clampedAdjustment = null;
|
|
1315
|
+
state.phase = initialScrollPhase(
|
|
1316
|
+
behavior,
|
|
1317
|
+
state.index != null && approxEqual(offset, this.getScrollOffset())
|
|
1318
|
+
);
|
|
1319
|
+
this._scrollToOffset(offset, { behavior });
|
|
1320
|
+
this.scheduleScrollReconcile();
|
|
1321
|
+
};
|
|
1322
|
+
this._readElementOffset = () => {
|
|
1323
|
+
const el = this.scrollElement;
|
|
1324
|
+
if (el == null) return null;
|
|
1325
|
+
const { horizontal, isRtl } = this.options;
|
|
1326
|
+
if (typeof el.scrollTop === "number") {
|
|
1327
|
+
return horizontal ? el.scrollLeft * (isRtl && -1 || 1) : el.scrollTop;
|
|
1105
1328
|
}
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1329
|
+
if (typeof el.scrollY === "number") {
|
|
1330
|
+
return horizontal ? el.scrollX : el.scrollY;
|
|
1331
|
+
}
|
|
1332
|
+
return null;
|
|
1333
|
+
};
|
|
1334
|
+
this._canWriteScroll = () => !(isIOSWebKit() && this._iosGesture.inMotion()) && !this._reportedOverscroll;
|
|
1335
|
+
this._flushHoldIfReady = (sync) => {
|
|
1336
|
+
var _a;
|
|
1337
|
+
if (this._holdOffset === 0) return;
|
|
1338
|
+
if (!this.scrollElement || !this.options.enabled) return;
|
|
1339
|
+
if (!this._canWriteScroll()) return;
|
|
1340
|
+
if (((_a = this.scrollState) == null ? void 0 : _a.phase) === "smooth") return;
|
|
1341
|
+
this._holdOffset = 0;
|
|
1342
|
+
if (this.scrollOffset !== null && this.scrollOffset < 0) {
|
|
1343
|
+
this.scrollOffset = 0;
|
|
1344
|
+
}
|
|
1345
|
+
this.notify(sync);
|
|
1346
|
+
const target = this.getCommandWrittenOffset() ?? this.getScrollOffset();
|
|
1347
|
+
this._clampedAdjustment = this._clampedBy(target);
|
|
1348
|
+
this._scrollToOffset(target);
|
|
1112
1349
|
};
|
|
1113
1350
|
this.rafId = null;
|
|
1114
1351
|
this.getSize = () => {
|
|
@@ -1316,17 +1553,21 @@ var Virtualizer = class {
|
|
|
1316
1553
|
this.getMeasurements(),
|
|
1317
1554
|
this.getSize(),
|
|
1318
1555
|
this.getScrollOffset(),
|
|
1319
|
-
this.options.lanes
|
|
1556
|
+
this.options.lanes,
|
|
1557
|
+
// scrollOffset is measured in the scroll element and the layout total
|
|
1558
|
+
// from the list start, so the list ends scrollMargin further down.
|
|
1559
|
+
this._getLayoutTotalSize() + this.options.scrollMargin
|
|
1320
1560
|
],
|
|
1321
|
-
(measurements, outerSize, scrollOffset, lanes) => {
|
|
1561
|
+
(measurements, outerSize, scrollOffset, lanes, listEnd) => {
|
|
1322
1562
|
if (measurements.length === 0 || outerSize === 0) {
|
|
1323
1563
|
this.range = null;
|
|
1324
1564
|
return null;
|
|
1325
1565
|
}
|
|
1566
|
+
const maxScrollOffset = Math.max(listEnd - outerSize, 0);
|
|
1326
1567
|
this.range = calculateRangeImpl(
|
|
1327
1568
|
measurements,
|
|
1328
1569
|
outerSize,
|
|
1329
|
-
scrollOffset,
|
|
1570
|
+
Math.min(scrollOffset, maxScrollOffset),
|
|
1330
1571
|
lanes,
|
|
1331
1572
|
// Pass the typed array so binary search + forward-walk can read
|
|
1332
1573
|
// start/end directly from Float64Array, skipping the Proxy traps.
|
|
@@ -1354,15 +1595,17 @@ var Virtualizer = class {
|
|
|
1354
1595
|
this.options.overscan,
|
|
1355
1596
|
this.options.count,
|
|
1356
1597
|
startIndex,
|
|
1357
|
-
endIndex
|
|
1598
|
+
endIndex,
|
|
1599
|
+
this.options.lanes
|
|
1358
1600
|
];
|
|
1359
1601
|
},
|
|
1360
|
-
(rangeExtractor, overscan, count, startIndex, endIndex) => {
|
|
1602
|
+
(rangeExtractor, overscan, count, startIndex, endIndex, lanes) => {
|
|
1361
1603
|
return startIndex === null || endIndex === null ? [] : rangeExtractor({
|
|
1362
1604
|
startIndex,
|
|
1363
1605
|
endIndex,
|
|
1364
1606
|
overscan,
|
|
1365
|
-
count
|
|
1607
|
+
count,
|
|
1608
|
+
lanes
|
|
1366
1609
|
});
|
|
1367
1610
|
},
|
|
1368
1611
|
{
|
|
@@ -1383,7 +1626,7 @@ var Virtualizer = class {
|
|
|
1383
1626
|
};
|
|
1384
1627
|
this.shouldMeasureDuringScroll = (index) => {
|
|
1385
1628
|
var _a;
|
|
1386
|
-
if (!this.scrollState
|
|
1629
|
+
if (!isSmoothScroll(this.scrollState)) {
|
|
1387
1630
|
return true;
|
|
1388
1631
|
}
|
|
1389
1632
|
const scrollIndex = this.scrollState.index ?? ((_a = this.getVirtualItemForOffset(this.scrollState.lastTargetOffset)) == null ? void 0 : _a.index);
|
|
@@ -1422,17 +1665,18 @@ var Virtualizer = class {
|
|
|
1422
1665
|
this.observer.observe(node);
|
|
1423
1666
|
this.elementsCache.set(key, node);
|
|
1424
1667
|
}
|
|
1425
|
-
if ((!this.isScrolling || this.scrollState) && this.shouldMeasureDuringScroll(index)) {
|
|
1668
|
+
if (node.isConnected && (!this.isScrolling || this.scrollState) && this.shouldMeasureDuringScroll(index)) {
|
|
1426
1669
|
this.resizeItem(index, this.options.measureElement(node, void 0, this));
|
|
1427
1670
|
}
|
|
1428
1671
|
};
|
|
1429
1672
|
this.resizeItem = (index, size) => {
|
|
1430
1673
|
var _a, _b, _c;
|
|
1431
1674
|
if (!this.isIndexInRange(index)) return;
|
|
1675
|
+
if ((_a = this._resizeBatch) == null ? void 0 : _a.sync) this.getMeasurements();
|
|
1432
1676
|
let cachedSize;
|
|
1433
1677
|
let itemStart;
|
|
1434
1678
|
let key;
|
|
1435
|
-
const flat = (
|
|
1679
|
+
const flat = (_b = this._singleLaneMeasurements) == null ? void 0 : _b.flat;
|
|
1436
1680
|
if (this.options.lanes === 1 && flat != null) {
|
|
1437
1681
|
key = this.options.getItemKey(index);
|
|
1438
1682
|
itemStart = flat[index * 2];
|
|
@@ -1447,15 +1691,15 @@ var Virtualizer = class {
|
|
|
1447
1691
|
const itemSize = this.itemSizeCache.get(key) ?? cachedSize;
|
|
1448
1692
|
const delta = size - itemSize;
|
|
1449
1693
|
if (delta !== 0) {
|
|
1450
|
-
const wasAtEnd = this.options.anchorTo === "end" && (
|
|
1451
|
-
const prevTotalSize = wasAtEnd ? this.
|
|
1452
|
-
const
|
|
1694
|
+
const wasAtEnd = this.options.anchorTo === "end" && !isSmoothScroll(this.scrollState) && this.getVirtualDistanceFromEnd() <= this.options.scrollEndThreshold;
|
|
1695
|
+
const prevTotalSize = wasAtEnd ? this._getLayoutTotalSize() : 0;
|
|
1696
|
+
const scrollOffset = this.getScrollOffset();
|
|
1453
1697
|
const isFirstMeasure = !this.itemSizeCache.has(key);
|
|
1454
1698
|
const defaultShouldAdjust = isFirstMeasure ? (
|
|
1455
1699
|
// First measurement: compensate any item whose top sits above the
|
|
1456
1700
|
// fold — the estimate→actual delta must be corrected regardless of
|
|
1457
1701
|
// scroll direction, since the whole estimated block was above it.
|
|
1458
|
-
itemStart <
|
|
1702
|
+
itemStart < scrollOffset
|
|
1459
1703
|
) : (
|
|
1460
1704
|
// Re-measurement: only compensate an item that is ENTIRELY above the
|
|
1461
1705
|
// fold. An item that merely *spans* the fold (top above, bottom
|
|
@@ -1464,9 +1708,9 @@ var Virtualizer = class {
|
|
|
1464
1708
|
// delta would drag the viewport downward on every growth (#1218).
|
|
1465
1709
|
// Also skip during backward scroll to avoid the "items jump while
|
|
1466
1710
|
// scrolling up" cascade.
|
|
1467
|
-
itemStart + itemSize <=
|
|
1711
|
+
itemStart + itemSize <= scrollOffset && this.scrollDirection !== "backward"
|
|
1468
1712
|
);
|
|
1469
|
-
const shouldAdjustScroll = (
|
|
1713
|
+
const shouldAdjustScroll = !isSmoothScroll(this.scrollState) && (this.shouldAdjustScrollPositionOnItemSizeChange !== void 0 ? this.shouldAdjustScrollPositionOnItemSizeChange(
|
|
1470
1714
|
// The callback expects a VirtualItem; build one lazily only
|
|
1471
1715
|
// when the consumer actually supplied a custom predicate.
|
|
1472
1716
|
this.measurementsCache[index] ?? {
|
|
@@ -1486,25 +1730,40 @@ var Virtualizer = class {
|
|
|
1486
1730
|
this.itemSizeCache.set(key, size);
|
|
1487
1731
|
this.itemSizeCacheVersion++;
|
|
1488
1732
|
let adjustedSync = false;
|
|
1489
|
-
if (
|
|
1490
|
-
|
|
1491
|
-
this.
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1733
|
+
if (!this._awaitingCommandReadBack()) {
|
|
1734
|
+
if (wasAtEnd) {
|
|
1735
|
+
adjustedSync = this.applyScrollAdjustment(
|
|
1736
|
+
this._getLayoutTotalSize() - prevTotalSize
|
|
1737
|
+
);
|
|
1738
|
+
} else if (shouldAdjustScroll) {
|
|
1739
|
+
adjustedSync = this.applyScrollAdjustment(delta);
|
|
1740
|
+
}
|
|
1741
|
+
}
|
|
1742
|
+
if (this._resizeBatch) {
|
|
1743
|
+
this._resizeBatch.notify = true;
|
|
1744
|
+
(_c = this._resizeBatch).sync || (_c.sync = adjustedSync);
|
|
1745
|
+
return;
|
|
1495
1746
|
}
|
|
1496
1747
|
this.notify(adjustedSync);
|
|
1748
|
+
this._noteClampMax();
|
|
1749
|
+
this._flushHoldIfReady(true);
|
|
1497
1750
|
this._retryClampedAdjustment();
|
|
1498
1751
|
}
|
|
1499
1752
|
};
|
|
1500
1753
|
this.getVirtualItems = memo(
|
|
1501
|
-
() => [this.getVirtualIndexes(), this.getMeasurements()],
|
|
1502
|
-
(indexes, measurements) => {
|
|
1754
|
+
() => [this.getVirtualIndexes(), this.getMeasurements(), this._holdOffset],
|
|
1755
|
+
(indexes, measurements, hold) => {
|
|
1503
1756
|
const virtualItems = [];
|
|
1504
1757
|
for (let k4 = 0, len = indexes.length; k4 < len; k4++) {
|
|
1505
1758
|
const i2 = indexes[k4];
|
|
1506
1759
|
const measurement = measurements[i2];
|
|
1507
|
-
virtualItems.push(
|
|
1760
|
+
virtualItems.push(
|
|
1761
|
+
hold === 0 ? measurement : {
|
|
1762
|
+
...measurement,
|
|
1763
|
+
start: measurement.start - hold,
|
|
1764
|
+
end: measurement.end - hold
|
|
1765
|
+
}
|
|
1766
|
+
);
|
|
1508
1767
|
}
|
|
1509
1768
|
return virtualItems;
|
|
1510
1769
|
},
|
|
@@ -1529,18 +1788,89 @@ var Virtualizer = class {
|
|
|
1529
1788
|
);
|
|
1530
1789
|
return notUndefined(measurements[idx]);
|
|
1531
1790
|
};
|
|
1532
|
-
this.
|
|
1533
|
-
if (!this.
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1791
|
+
this._noteClampMax = () => {
|
|
1792
|
+
if (!this._awaitingCommandReadBack()) return;
|
|
1793
|
+
const elementMax = this._elementMaxScrollOffset();
|
|
1794
|
+
if (elementMax === null) return;
|
|
1795
|
+
const write = this.pendingWrite;
|
|
1796
|
+
const max = Math.max(elementMax, 0) + this._holdOffset;
|
|
1797
|
+
if (max >= write.target) return;
|
|
1798
|
+
const lowMaxes = write.lowMaxes ?? (write.lowMaxes = []);
|
|
1799
|
+
if (lowMaxes[lowMaxes.length - 1] !== max) lowMaxes.push(max);
|
|
1800
|
+
};
|
|
1801
|
+
this.getMaxScrollOffset = () => (this._elementMaxScrollOffset() ?? 0) + this._holdOffset;
|
|
1802
|
+
this._toLayoutOffset = (elementOffset) => {
|
|
1803
|
+
var _a;
|
|
1804
|
+
let offset = elementOffset + this._holdOffset;
|
|
1805
|
+
if (((_a = this.pendingScrollAnchor) == null ? void 0 : _a.kind) === "anchor") {
|
|
1806
|
+
offset += this.pendingScrollAnchor.delta;
|
|
1807
|
+
}
|
|
1808
|
+
return offset;
|
|
1809
|
+
};
|
|
1810
|
+
this._elementMaxScrollOffset = () => {
|
|
1811
|
+
const el = this.scrollElement;
|
|
1812
|
+
if (el === null) return null;
|
|
1813
|
+
if ("scrollHeight" in el) {
|
|
1814
|
+
return this.options.horizontal ? el.scrollWidth - el.clientWidth : el.scrollHeight - el.clientHeight;
|
|
1815
|
+
}
|
|
1816
|
+
if ("document" in el) {
|
|
1817
|
+
const doc = el.document.documentElement;
|
|
1818
|
+
return this.options.horizontal ? doc.scrollWidth - el.innerWidth : doc.scrollHeight - el.innerHeight;
|
|
1539
1819
|
}
|
|
1820
|
+
return null;
|
|
1821
|
+
};
|
|
1822
|
+
this._momentumStop = null;
|
|
1823
|
+
this._stopMomentum = (done) => {
|
|
1824
|
+
const el = this.scrollElement;
|
|
1825
|
+
const win = this.targetWindow;
|
|
1826
|
+
if (el === null || win === null) return;
|
|
1827
|
+
const scroller = "document" in el ? el.document.scrollingElement : el;
|
|
1828
|
+
if (!(scroller == null ? void 0 : scroller.style)) return;
|
|
1829
|
+
if (this._momentumStop) {
|
|
1830
|
+
this._momentumStop.done = done;
|
|
1831
|
+
return;
|
|
1832
|
+
}
|
|
1833
|
+
const { style } = scroller;
|
|
1834
|
+
const property = this.options.horizontal ? "overflow-x" : "overflow-y";
|
|
1835
|
+
const value = style.getPropertyValue(property);
|
|
1836
|
+
const priority = style.getPropertyPriority(property);
|
|
1837
|
+
const crossSize = () => this.options.horizontal ? scroller.clientHeight : scroller.clientWidth;
|
|
1838
|
+
const crossSizeBefore = crossSize();
|
|
1839
|
+
style.setProperty(property, "hidden", "important");
|
|
1840
|
+
if (crossSize() !== crossSizeBefore) {
|
|
1841
|
+
style.setProperty(property, value, priority);
|
|
1842
|
+
return;
|
|
1843
|
+
}
|
|
1844
|
+
const stop = {
|
|
1845
|
+
// False when the app replaced the hidden value: the fling may not
|
|
1846
|
+
// have stopped.
|
|
1847
|
+
restore: () => {
|
|
1848
|
+
if (style.getPropertyValue(property) !== "hidden" || style.getPropertyPriority(property) !== "important") {
|
|
1849
|
+
return false;
|
|
1850
|
+
}
|
|
1851
|
+
style.setProperty(property, value, priority);
|
|
1852
|
+
return true;
|
|
1853
|
+
},
|
|
1854
|
+
done
|
|
1855
|
+
};
|
|
1856
|
+
this._momentumStop = stop;
|
|
1857
|
+
win.requestAnimationFrame(
|
|
1858
|
+
() => win.requestAnimationFrame(() => {
|
|
1859
|
+
if (this._momentumStop !== stop) return;
|
|
1860
|
+
this._momentumStop = null;
|
|
1861
|
+
if (stop.restore()) stop.done();
|
|
1862
|
+
})
|
|
1863
|
+
);
|
|
1864
|
+
};
|
|
1865
|
+
this._clampedBy = (target) => {
|
|
1866
|
+
const elementMax = this._elementMaxScrollOffset();
|
|
1867
|
+
if (elementMax === null) return null;
|
|
1868
|
+
const maxAtWrite = elementMax + this._holdOffset;
|
|
1869
|
+
return target > maxAtWrite + 0.5 ? { target, maxAtWrite } : null;
|
|
1540
1870
|
};
|
|
1541
1871
|
this.getVirtualDistanceFromEnd = () => {
|
|
1542
1872
|
return Math.max(
|
|
1543
|
-
this.
|
|
1873
|
+
this._getLayoutTotalSize() + this.options.scrollMargin - this.getSize() - this.getScrollOffset(),
|
|
1544
1874
|
0
|
|
1545
1875
|
);
|
|
1546
1876
|
};
|
|
@@ -1569,7 +1899,7 @@ var Virtualizer = class {
|
|
|
1569
1899
|
index = Math.max(0, Math.min(index, this.options.count - 1));
|
|
1570
1900
|
const size = this.getSize();
|
|
1571
1901
|
const scrollOffset = this.getScrollOffset();
|
|
1572
|
-
const item = this.
|
|
1902
|
+
const item = this.getMeasurements()[index];
|
|
1573
1903
|
if (!item) return;
|
|
1574
1904
|
if (align === "auto") {
|
|
1575
1905
|
if (item.end >= scrollOffset + size - this.options.scrollPaddingEnd) {
|
|
@@ -1581,7 +1911,9 @@ var Virtualizer = class {
|
|
|
1581
1911
|
}
|
|
1582
1912
|
}
|
|
1583
1913
|
if (align === "end" && index === this.options.count - 1) {
|
|
1584
|
-
|
|
1914
|
+
const maxOffset = this.getMaxScrollOffset();
|
|
1915
|
+
const toOffset2 = maxOffset - this.options.paddingEnd + this.options.scrollPaddingEnd;
|
|
1916
|
+
return [Math.max(Math.min(toOffset2, maxOffset), 0), align];
|
|
1585
1917
|
}
|
|
1586
1918
|
const toOffset = align === "end" ? item.end + this.options.scrollPaddingEnd : item.start - this.options.scrollPaddingStart;
|
|
1587
1919
|
return [
|
|
@@ -1590,70 +1922,58 @@ var Virtualizer = class {
|
|
|
1590
1922
|
];
|
|
1591
1923
|
};
|
|
1592
1924
|
this.scrollToOffset = (toOffset, { align = "start", behavior = "auto" } = {}) => {
|
|
1593
|
-
this.
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
this.scrollState = {
|
|
1597
|
-
index: null,
|
|
1598
|
-
align,
|
|
1925
|
+
this._startScroll(
|
|
1926
|
+
{ index: null, align },
|
|
1927
|
+
this.getOffsetForAlignment(toOffset, align),
|
|
1599
1928
|
behavior,
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
stableFrames: 0
|
|
1603
|
-
};
|
|
1604
|
-
this._scrollToOffset(offset, { adjustments: void 0, behavior });
|
|
1605
|
-
this.scheduleScrollReconcile();
|
|
1929
|
+
"absolute"
|
|
1930
|
+
);
|
|
1606
1931
|
};
|
|
1607
1932
|
this.scrollToIndex = (index, {
|
|
1608
1933
|
align: initialAlign = "auto",
|
|
1609
1934
|
behavior = "auto"
|
|
1610
1935
|
} = {}) => {
|
|
1611
|
-
this._iosDeferredAdjustment = 0;
|
|
1612
1936
|
index = Math.max(0, Math.min(index, this.options.count - 1));
|
|
1613
1937
|
const offsetInfo = this.getOffsetForIndex(index, initialAlign);
|
|
1614
|
-
if (!offsetInfo)
|
|
1615
|
-
return;
|
|
1616
|
-
}
|
|
1938
|
+
if (!offsetInfo) return;
|
|
1617
1939
|
const [offset, align] = offsetInfo;
|
|
1618
|
-
|
|
1619
|
-
this.scrollState = {
|
|
1620
|
-
index,
|
|
1621
|
-
align,
|
|
1622
|
-
behavior,
|
|
1623
|
-
startedAt: now,
|
|
1624
|
-
lastTargetOffset: offset,
|
|
1625
|
-
stableFrames: 0
|
|
1626
|
-
};
|
|
1627
|
-
this._scrollToOffset(offset, { adjustments: void 0, behavior });
|
|
1628
|
-
this.scheduleScrollReconcile();
|
|
1940
|
+
this._startScroll({ index, align }, offset, behavior, "absolute");
|
|
1629
1941
|
};
|
|
1630
1942
|
this.scrollBy = (delta, { behavior = "auto" } = {}) => {
|
|
1631
|
-
const offset = this.
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1943
|
+
const offset = this.getOffsetForAlignment(
|
|
1944
|
+
(this.getCommandWrittenOffset() ?? this.getScrollOffset()) + delta,
|
|
1945
|
+
"start"
|
|
1946
|
+
);
|
|
1947
|
+
this._startScroll(
|
|
1948
|
+
{ index: null, align: "start" },
|
|
1949
|
+
offset,
|
|
1636
1950
|
behavior,
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
stableFrames: 0
|
|
1640
|
-
};
|
|
1641
|
-
this._scrollToOffset(offset, { adjustments: void 0, behavior });
|
|
1642
|
-
this.scheduleScrollReconcile();
|
|
1951
|
+
"relative"
|
|
1952
|
+
);
|
|
1643
1953
|
};
|
|
1644
1954
|
this.scrollToEnd = ({ behavior = "auto" } = {}) => {
|
|
1645
1955
|
if (this.options.count > 0) {
|
|
1646
|
-
this.
|
|
1647
|
-
align: "end",
|
|
1648
|
-
|
|
1649
|
-
|
|
1956
|
+
this._startScroll(
|
|
1957
|
+
{ index: this.options.count - 1, align: "end", toEnd: true },
|
|
1958
|
+
Math.max(this.getMaxScrollOffset(), 0),
|
|
1959
|
+
behavior,
|
|
1960
|
+
"absolute"
|
|
1961
|
+
);
|
|
1650
1962
|
return;
|
|
1651
1963
|
}
|
|
1652
1964
|
this.scrollToOffset(Math.max(this.getTotalSize() - this.getSize(), 0), {
|
|
1653
1965
|
behavior
|
|
1654
1966
|
});
|
|
1655
1967
|
};
|
|
1656
|
-
this.
|
|
1968
|
+
this.cancelScroll = () => {
|
|
1969
|
+
if (this.rafId != null && this.targetWindow) {
|
|
1970
|
+
this.targetWindow.cancelAnimationFrame(this.rafId);
|
|
1971
|
+
this.rafId = null;
|
|
1972
|
+
}
|
|
1973
|
+
this.scrollState = null;
|
|
1974
|
+
};
|
|
1975
|
+
this.getTotalSize = () => Math.max(this._getLayoutTotalSize() - this._holdOffset, 0);
|
|
1976
|
+
this._getLayoutTotalSize = () => {
|
|
1657
1977
|
var _a, _b;
|
|
1658
1978
|
const measurements = this.getMeasurements();
|
|
1659
1979
|
let end;
|
|
@@ -1705,9 +2025,28 @@ var Virtualizer = class {
|
|
|
1705
2025
|
this._scrollToOffset = (offset, {
|
|
1706
2026
|
adjustments,
|
|
1707
2027
|
behavior
|
|
1708
|
-
}) => {
|
|
1709
|
-
|
|
1710
|
-
|
|
2028
|
+
} = {}) => {
|
|
2029
|
+
const write = {
|
|
2030
|
+
target: offset + (adjustments ?? 0),
|
|
2031
|
+
smooth: behavior === "smooth"
|
|
2032
|
+
};
|
|
2033
|
+
this.pendingWrite = write;
|
|
2034
|
+
this.options.scrollToFn(
|
|
2035
|
+
offset - this._holdOffset,
|
|
2036
|
+
{ behavior, adjustments },
|
|
2037
|
+
this
|
|
2038
|
+
);
|
|
2039
|
+
return write;
|
|
2040
|
+
};
|
|
2041
|
+
this.getCommandWrittenOffset = () => this.scrollState !== null && this.pendingWrite !== null && !this.pendingWrite.smooth ? this.pendingWrite.target : null;
|
|
2042
|
+
this._awaitingCommandReadBack = () => {
|
|
2043
|
+
const writtenOffset = this.getCommandWrittenOffset();
|
|
2044
|
+
return !(isIOSWebKit() && this._iosGesture.dragging()) && writtenOffset !== null && !approxEqual(writtenOffset, this.getScrollOffset());
|
|
2045
|
+
};
|
|
2046
|
+
this._followOffsetTarget = (delta) => {
|
|
2047
|
+
if (this.scrollState !== null && this.scrollState.index == null) {
|
|
2048
|
+
this.scrollState.lastTargetOffset += delta;
|
|
2049
|
+
}
|
|
1711
2050
|
};
|
|
1712
2051
|
this.measure = () => {
|
|
1713
2052
|
this.pendingMin = null;
|
|
@@ -1718,6 +2057,14 @@ var Virtualizer = class {
|
|
|
1718
2057
|
};
|
|
1719
2058
|
this.setOptions(opts);
|
|
1720
2059
|
}
|
|
2060
|
+
/**
|
|
2061
|
+
* @deprecated Always 0: a scroll correction is folded into `scrollOffset`
|
|
2062
|
+
* at once, so there is never an outstanding adjustment to add to it. Read
|
|
2063
|
+
* `scrollOffset` alone.
|
|
2064
|
+
*/
|
|
2065
|
+
get scrollAdjustments() {
|
|
2066
|
+
return 0;
|
|
2067
|
+
}
|
|
1721
2068
|
// Returns `true` when it performed a synchronous `scrollTop` write this
|
|
1722
2069
|
// tick, `false` when the delta was zero or the write was deferred (iOS).
|
|
1723
2070
|
// `resizeItem` uses that to decide whether the follow-up `notify` must be
|
|
@@ -1727,22 +2074,21 @@ var Virtualizer = class {
|
|
|
1727
2074
|
if (this.options.debug) {
|
|
1728
2075
|
console.info("correction", delta);
|
|
1729
2076
|
}
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
2077
|
+
this._followOffsetTarget(delta);
|
|
2078
|
+
if (!this._canWriteScroll()) {
|
|
2079
|
+
this._holdOffset += delta;
|
|
2080
|
+
if (this.scrollOffset !== null) this.scrollOffset += delta;
|
|
2081
|
+
return true;
|
|
1733
2082
|
} else {
|
|
1734
|
-
const
|
|
1735
|
-
|
|
1736
|
-
const
|
|
1737
|
-
|
|
1738
|
-
this._scrollToOffset(this.getScrollOffset(), {
|
|
1739
|
-
adjustments: this.scrollAdjustments += delta,
|
|
2083
|
+
const offset = this.getScrollOffset();
|
|
2084
|
+
this._clampedAdjustment = this._clampedBy(offset + delta);
|
|
2085
|
+
const write = this._scrollToOffset(offset, {
|
|
2086
|
+
adjustments: delta,
|
|
1740
2087
|
behavior
|
|
1741
2088
|
});
|
|
1742
2089
|
if (this.scrollOffset !== null) {
|
|
1743
|
-
this.scrollOffset +=
|
|
2090
|
+
if (this.pendingWrite === write) this.scrollOffset += delta;
|
|
1744
2091
|
if (this.scrollOffset < 0) this.scrollOffset = 0;
|
|
1745
|
-
this.scrollAdjustments = 0;
|
|
1746
2092
|
}
|
|
1747
2093
|
return true;
|
|
1748
2094
|
}
|
|
@@ -1758,6 +2104,10 @@ var Virtualizer = class {
|
|
|
1758
2104
|
this.reconcileScroll();
|
|
1759
2105
|
});
|
|
1760
2106
|
}
|
|
2107
|
+
getScrollStateTarget(state) {
|
|
2108
|
+
const offsetInfo = state.toEnd ? [Math.max(this.getMaxScrollOffset(), 0)] : state.index != null ? this.getOffsetForIndex(state.index, state.align) : void 0;
|
|
2109
|
+
return offsetInfo ? offsetInfo[0] : state.lastTargetOffset;
|
|
2110
|
+
}
|
|
1761
2111
|
reconcileScroll() {
|
|
1762
2112
|
if (!this.scrollState) return;
|
|
1763
2113
|
const el = this.scrollElement;
|
|
@@ -1767,18 +2117,24 @@ var Virtualizer = class {
|
|
|
1767
2117
|
this.scrollState = null;
|
|
1768
2118
|
return;
|
|
1769
2119
|
}
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
2120
|
+
if (this.scrollState.phase === "queued") {
|
|
2121
|
+
this.scheduleScrollReconcile();
|
|
2122
|
+
return;
|
|
2123
|
+
}
|
|
2124
|
+
this.getMeasurements();
|
|
2125
|
+
const targetOffset = this.getScrollStateTarget(this.scrollState);
|
|
2126
|
+
const STABLE_FRAMES = this.scrollState.index == null ? 1 : this.options.useAnimationFrameWithResizeObserver ? 3 : 2;
|
|
1773
2127
|
const targetChanged = targetOffset !== this.scrollState.lastTargetOffset;
|
|
1774
2128
|
if (!targetChanged && approxEqual(targetOffset, this.getScrollOffset())) {
|
|
2129
|
+
if (this.scrollState.phase === "smooth") {
|
|
2130
|
+
this.scrollState.phase = "smoothLanded";
|
|
2131
|
+
} else if (this.scrollState.phase === "smoothFinishing") {
|
|
2132
|
+
this.scrollState.phase = "instant";
|
|
2133
|
+
}
|
|
1775
2134
|
this.scrollState.stableFrames++;
|
|
1776
2135
|
if (this.scrollState.stableFrames >= STABLE_FRAMES) {
|
|
1777
2136
|
if (this.getScrollOffset() !== targetOffset) {
|
|
1778
|
-
this._scrollToOffset(targetOffset, {
|
|
1779
|
-
adjustments: void 0,
|
|
1780
|
-
behavior: "auto"
|
|
1781
|
-
});
|
|
2137
|
+
this._scrollToOffset(targetOffset, { behavior: "auto" });
|
|
1782
2138
|
}
|
|
1783
2139
|
this.scrollState = null;
|
|
1784
2140
|
return;
|
|
@@ -1788,19 +2144,81 @@ var Virtualizer = class {
|
|
|
1788
2144
|
if (targetChanged) {
|
|
1789
2145
|
const viewport = this.getSize() || 600;
|
|
1790
2146
|
const distance = Math.abs(targetOffset - this.getScrollOffset());
|
|
1791
|
-
const keepSmooth = this.scrollState
|
|
2147
|
+
const keepSmooth = isSmoothScroll(this.scrollState) && distance > viewport;
|
|
1792
2148
|
this.scrollState.lastTargetOffset = targetOffset;
|
|
1793
|
-
if (
|
|
1794
|
-
this.scrollState.
|
|
2149
|
+
if (keepSmooth) {
|
|
2150
|
+
this.scrollState.phase = "smooth";
|
|
2151
|
+
} else if (this.scrollState.phase === "smooth") {
|
|
2152
|
+
this.scrollState.phase = "smoothFinishing";
|
|
2153
|
+
} else if (this.scrollState.phase === "smoothLanded") {
|
|
2154
|
+
this.scrollState.phase = "instant";
|
|
1795
2155
|
}
|
|
1796
2156
|
this._scrollToOffset(targetOffset, {
|
|
1797
|
-
adjustments: void 0,
|
|
1798
2157
|
behavior: keepSmooth ? "smooth" : "auto"
|
|
1799
2158
|
});
|
|
1800
2159
|
}
|
|
1801
2160
|
}
|
|
1802
2161
|
this.scheduleScrollReconcile();
|
|
1803
2162
|
}
|
|
2163
|
+
// Every scroll command starts here: it becomes the in-flight command,
|
|
2164
|
+
// writes its first target and leaves reconcile to retarget and retire it.
|
|
2165
|
+
//
|
|
2166
|
+
// Targets are layout offsets. A held correction is not dropped by a
|
|
2167
|
+
// command: the write lands the element `_holdOffset` short of the target,
|
|
2168
|
+
// under the rows exposed shifted by the same amount, and the flush moves
|
|
2169
|
+
// both together once a write is possible.
|
|
2170
|
+
//
|
|
2171
|
+
// An index or end target that is already at its offset starts a smooth
|
|
2172
|
+
// scroll as landed; an offset target never does, so its first scroll
|
|
2173
|
+
// event is read as the user's (see the scroll handler in `_willUpdate`).
|
|
2174
|
+
_startScroll(target, offset, behavior, kind) {
|
|
2175
|
+
this.pendingScrollAnchor = null;
|
|
2176
|
+
this._clampedAdjustment = null;
|
|
2177
|
+
const tail = this._iosGesture.tail();
|
|
2178
|
+
if (kind === "absolute" && tail !== null) {
|
|
2179
|
+
if (tail === "fling" && momentumOverridesWrites()) {
|
|
2180
|
+
this._stopMomentum(() => {
|
|
2181
|
+
const state = this.scrollState;
|
|
2182
|
+
if ((state == null ? void 0 : state.phase) !== "queued" || // A finger came down: it owns the scroll until it lifts.
|
|
2183
|
+
this._iosGesture.tail() !== "fling" || // In a bounce WebKit can drop the write (#1287): the tail
|
|
2184
|
+
// decides, as without the stop. (Not `flingCaught`: our stop
|
|
2185
|
+
// also ends the fling at speed, so a slow frame would read as
|
|
2186
|
+
// a catch and the tail would drop the command.)
|
|
2187
|
+
this._reportedOverscroll) {
|
|
2188
|
+
return;
|
|
2189
|
+
}
|
|
2190
|
+
this._iosGesture.end();
|
|
2191
|
+
this._flushHoldIfReady(true);
|
|
2192
|
+
this._writeAwaitingCommand();
|
|
2193
|
+
});
|
|
2194
|
+
this.scrollState = {
|
|
2195
|
+
...target,
|
|
2196
|
+
startedAt: this.now(),
|
|
2197
|
+
lastTargetOffset: offset,
|
|
2198
|
+
stableFrames: 0,
|
|
2199
|
+
phase: "queued",
|
|
2200
|
+
behavior,
|
|
2201
|
+
samples: []
|
|
2202
|
+
};
|
|
2203
|
+
this.scheduleScrollReconcile();
|
|
2204
|
+
return;
|
|
2205
|
+
}
|
|
2206
|
+
this._iosGesture.end();
|
|
2207
|
+
}
|
|
2208
|
+
this.scrollState = {
|
|
2209
|
+
...target,
|
|
2210
|
+
startedAt: this.now(),
|
|
2211
|
+
lastTargetOffset: offset,
|
|
2212
|
+
stableFrames: 0,
|
|
2213
|
+
behavior,
|
|
2214
|
+
phase: initialScrollPhase(
|
|
2215
|
+
behavior,
|
|
2216
|
+
target.index != null && approxEqual(offset, this.getScrollOffset())
|
|
2217
|
+
)
|
|
2218
|
+
};
|
|
2219
|
+
this._scrollToOffset(offset, { behavior });
|
|
2220
|
+
this.scheduleScrollReconcile();
|
|
2221
|
+
}
|
|
1804
2222
|
};
|
|
1805
2223
|
var findNearestBinarySearch = (low, high, getCurrentValue, value) => {
|
|
1806
2224
|
while (low <= high) {
|
|
@@ -1912,26 +2330,25 @@ function useVirtualizerBase({
|
|
|
1912
2330
|
state.container.style[sizeAxis] = `${totalSize}px`;
|
|
1913
2331
|
}
|
|
1914
2332
|
};
|
|
2333
|
+
const applyItemPosition = (instance2, item, el) => {
|
|
2334
|
+
const state = directRef.current;
|
|
2335
|
+
const horizontal = !!instance2.options.horizontal;
|
|
2336
|
+
const next = item.start - instance2.options.scrollMargin;
|
|
2337
|
+
if (state.lastPositions.get(el) === next) return;
|
|
2338
|
+
state.lastPositions.set(el, next);
|
|
2339
|
+
if (state.mode === "transform") {
|
|
2340
|
+
el.style.transform = horizontal ? `translate3d(${next}px, 0, 0)` : `translate3d(0, ${next}px, 0)`;
|
|
2341
|
+
} else {
|
|
2342
|
+
el.style[horizontal ? "left" : "top"] = `${next}px`;
|
|
2343
|
+
}
|
|
2344
|
+
};
|
|
1915
2345
|
const applyDirectStyles = (instance2) => {
|
|
1916
2346
|
const state = directRef.current;
|
|
1917
2347
|
if (!state.enabled || !state.container) return;
|
|
1918
2348
|
applyContainerSize(instance2);
|
|
1919
|
-
const
|
|
1920
|
-
const useTransform = state.mode === "transform";
|
|
1921
|
-
const posAxis = horizontal ? "left" : "top";
|
|
1922
|
-
const scrollMargin = instance2.options.scrollMargin;
|
|
1923
|
-
const items = instance2.getVirtualItems();
|
|
1924
|
-
for (const item of items) {
|
|
1925
|
-
const next = item.start - scrollMargin;
|
|
2349
|
+
for (const item of instance2.getVirtualItems()) {
|
|
1926
2350
|
const el = instance2.elementsCache.get(item.key);
|
|
1927
|
-
if (
|
|
1928
|
-
if (state.lastPositions.get(el) === next) continue;
|
|
1929
|
-
state.lastPositions.set(el, next);
|
|
1930
|
-
if (useTransform) {
|
|
1931
|
-
el.style.transform = horizontal ? `translate3d(${next}px, 0, 0)` : `translate3d(0, ${next}px, 0)`;
|
|
1932
|
-
} else {
|
|
1933
|
-
el.style[posAxis] = `${next}px`;
|
|
1934
|
-
}
|
|
2351
|
+
if (el) applyItemPosition(instance2, item, el);
|
|
1935
2352
|
}
|
|
1936
2353
|
};
|
|
1937
2354
|
const resolvedOptions = {
|
|
@@ -1973,17 +2390,19 @@ function useVirtualizerBase({
|
|
|
1973
2390
|
} finally {
|
|
1974
2391
|
measuringFromRef.current = false;
|
|
1975
2392
|
}
|
|
2393
|
+
const state = directRef.current;
|
|
2394
|
+
if (node !== null && state.enabled && state.container) {
|
|
2395
|
+
const item = v3.measurementsCache[v3.indexFromElement(node)];
|
|
2396
|
+
if (item) applyItemPosition(v3, item, node);
|
|
2397
|
+
}
|
|
1976
2398
|
};
|
|
1977
2399
|
return Object.assign(v3, {
|
|
1978
2400
|
containerRef: (node) => {
|
|
1979
2401
|
const state = directRef.current;
|
|
1980
2402
|
state.container = node;
|
|
1981
2403
|
state.lastSize = null;
|
|
1982
|
-
if (node
|
|
1983
|
-
|
|
1984
|
-
state.lastSize = total;
|
|
1985
|
-
const axis = v3.options.horizontal ? "width" : "height";
|
|
1986
|
-
node.style[axis] = `${total}px`;
|
|
2404
|
+
if (node !== null) {
|
|
2405
|
+
applyDirectStyles(v3);
|
|
1987
2406
|
}
|
|
1988
2407
|
}
|
|
1989
2408
|
});
|
|
@@ -2614,4 +3033,4 @@ var Combobox = ({
|
|
|
2614
3033
|
};
|
|
2615
3034
|
var Combobox_default = Combobox;
|
|
2616
3035
|
|
|
2617
|
-
export {
|
|
3036
|
+
export { ChoicesField_default as ChoicesField, Combobox_default as Combobox, DatePickerField_default as DatePickerField, EmailField_default as EmailField, FieldWithHelp_default as FieldWithHelp, JSONAreaField_default as JSONAreaField, PasswordField_default as PasswordField, TextAreaField_default as TextAreaField };
|