boardplot 0.0.0-stage → 0.52.5
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/CHANGELOG.md +18 -0
- package/LICENSE +201 -0
- package/NOTICE.md +180 -0
- package/README.md +208 -2
- package/THIRD_PARTY_NOTICES.md +1110 -0
- package/dist/DiagnosticDetails-UNYNYCAH.js +69 -0
- package/dist/ReaderBox-VUNSFKZY.js +137 -0
- package/dist/annotateEngine-H7OW4H3W.js +30 -0
- package/dist/build-identity.json +6 -0
- package/dist/chunk-24WB3HMB.js +621 -0
- package/dist/chunk-263SZKIL.js +8 -0
- package/dist/chunk-27QQEWNV.js +18 -0
- package/dist/chunk-2AKWCMS4.js +24 -0
- package/dist/chunk-2DHJJ2EN.js +24 -0
- package/dist/chunk-2EQE4E3I.js +22 -0
- package/dist/chunk-2GELJH37.js +88 -0
- package/dist/chunk-2JAWQ7VV.js +3874 -0
- package/dist/chunk-2LMCD3ZR.js +6 -0
- package/dist/chunk-2MTWKMEG.js +841 -0
- package/dist/chunk-2SGIHKKU.js +33 -0
- package/dist/chunk-2UVTHU7A.js +1146 -0
- package/dist/chunk-33CBPK5Q.js +2800 -0
- package/dist/chunk-33PLBIMA.js +176 -0
- package/dist/chunk-35DZP2R2.js +22 -0
- package/dist/chunk-3D3D3D23.js +25 -0
- package/dist/chunk-3EZRM4YM.js +92 -0
- package/dist/chunk-3GZECHOK.js +802 -0
- package/dist/chunk-3HHNQPAH.js +68 -0
- package/dist/chunk-3I6RANBJ.js +1058 -0
- package/dist/chunk-3SIRPKMP.js +12 -0
- package/dist/chunk-3W23F7EY.js +185 -0
- package/dist/chunk-3XQ635KD.js +24 -0
- package/dist/chunk-3ZCKEANJ.js +24 -0
- package/dist/chunk-4DNOEV3Q.js +25857 -0
- package/dist/chunk-4GB7TBY7.js +373 -0
- package/dist/chunk-4SM2ONUC.js +18 -0
- package/dist/chunk-5C7TWNYZ.js +79 -0
- package/dist/chunk-5DJXJXDE.js +58 -0
- package/dist/chunk-5ENRZX6I.js +687 -0
- package/dist/chunk-5KWXRYAT.js +294 -0
- package/dist/chunk-5T5YW52S.js +47 -0
- package/dist/chunk-627P6T25.js +936 -0
- package/dist/chunk-62FR4FYJ.js +23 -0
- package/dist/chunk-6JUJ2DU3.js +67 -0
- package/dist/chunk-6KWIQ5KF.js +18 -0
- package/dist/chunk-6UBEGKIQ.js +25 -0
- package/dist/chunk-6XE3GVGU.js +116 -0
- package/dist/chunk-76ANFJOI.js +227 -0
- package/dist/chunk-7IFLQMJL.js +160 -0
- package/dist/chunk-7JVAQX6C.js +28 -0
- package/dist/chunk-7QDAHY5M.js +63 -0
- package/dist/chunk-7VXZDB45.js +149 -0
- package/dist/chunk-7X65ZQN4.js +38 -0
- package/dist/chunk-A2FHZH7E.js +1410 -0
- package/dist/chunk-A372DLQX.js +54 -0
- package/dist/chunk-A3ULWR5N.js +76 -0
- package/dist/chunk-A4QZXLXF.js +7 -0
- package/dist/chunk-A5JWFZVU.js +1467 -0
- package/dist/chunk-A5LZUYK4.js +59 -0
- package/dist/chunk-A6XCAQ52.js +89 -0
- package/dist/chunk-A7A4PDG5.js +24 -0
- package/dist/chunk-A7IEVBYI.js +35 -0
- package/dist/chunk-ACXX2JNL.js +6 -0
- package/dist/chunk-AFK47A6O.js +25 -0
- package/dist/chunk-ALKTNXMR.js +3650 -0
- package/dist/chunk-AOQ6VF5H.js +6 -0
- package/dist/chunk-ASAON7G4.js +648 -0
- package/dist/chunk-ATTE3FYC.js +24 -0
- package/dist/chunk-AZOUSKZD.js +728 -0
- package/dist/chunk-B2EBEXIS.js +113 -0
- package/dist/chunk-B67K5X4M.js +58 -0
- package/dist/chunk-BBL3R5YZ.js +186 -0
- package/dist/chunk-BIDIGDGH.js +6 -0
- package/dist/chunk-BKYMLFUG.js +69 -0
- package/dist/chunk-BLFWUMTD.js +12 -0
- package/dist/chunk-BM6SFFWF.js +6 -0
- package/dist/chunk-BUPLB3EX.js +129 -0
- package/dist/chunk-BVWU6GOB.js +47 -0
- package/dist/chunk-BW5VLBSZ.js +15 -0
- package/dist/chunk-C64FBRJO.js +290 -0
- package/dist/chunk-CAE2HK2G.js +295 -0
- package/dist/chunk-CCQNL33L.js +446 -0
- package/dist/chunk-CDZHNLO6.js +42 -0
- package/dist/chunk-COKHNEJP.js +24 -0
- package/dist/chunk-COYPDRJK.js +21 -0
- package/dist/chunk-CRZKGHZ6.js +1810 -0
- package/dist/chunk-CS4DHFNG.js +128 -0
- package/dist/chunk-CYDZP5W6.js +1589 -0
- package/dist/chunk-D4BIV6WG.js +1072 -0
- package/dist/chunk-D4SOADBD.js +19 -0
- package/dist/chunk-DCCJRLAJ.js +422 -0
- package/dist/chunk-DFKTS6XJ.js +75 -0
- package/dist/chunk-DGDOGOTQ.js +25 -0
- package/dist/chunk-DLC23CKC.js +53 -0
- package/dist/chunk-DRTA6JG5.js +160 -0
- package/dist/chunk-DVKBU23L.js +97 -0
- package/dist/chunk-E2HEVF23.js +692 -0
- package/dist/chunk-EC2NAYPQ.js +24 -0
- package/dist/chunk-EKQK5D6G.js +14 -0
- package/dist/chunk-EKQMYG2B.js +2353 -0
- package/dist/chunk-ELYU6TRQ.js +98 -0
- package/dist/chunk-EQT3EPTB.js +203 -0
- package/dist/chunk-ERAIVAK5.js +1359 -0
- package/dist/chunk-ETHWK2RZ.js +16 -0
- package/dist/chunk-EWVKBRLV.js +72 -0
- package/dist/chunk-F77BNDAT.js +43 -0
- package/dist/chunk-FGAGGPFF.js +566 -0
- package/dist/chunk-FIANWJXX.js +19 -0
- package/dist/chunk-FIWNDOMO.js +6 -0
- package/dist/chunk-FOKEGVPB.js +24 -0
- package/dist/chunk-FT3F72C3.js +30 -0
- package/dist/chunk-FT47HQ5U.js +47 -0
- package/dist/chunk-GDOW2KNP.js +19 -0
- package/dist/chunk-GDQ3NGDZ.js +17 -0
- package/dist/chunk-GH3ZMBFX.js +563 -0
- package/dist/chunk-GQPESFAF.js +3378 -0
- package/dist/chunk-GQS46LC3.js +50 -0
- package/dist/chunk-GULJ6KVT.js +587 -0
- package/dist/chunk-GWQIXU37.js +2774 -0
- package/dist/chunk-GZ2VNM4L.js +24 -0
- package/dist/chunk-GZ4RHGIW.js +836 -0
- package/dist/chunk-H4H4O62O.js +46 -0
- package/dist/chunk-H57TJD3B.js +72 -0
- package/dist/chunk-H7UZZ7KP.js +24 -0
- package/dist/chunk-HAAUJDGB.js +83 -0
- package/dist/chunk-HFG76JTS.js +296 -0
- package/dist/chunk-HJXXFPOL.js +211 -0
- package/dist/chunk-HTYFQHRC.js +24 -0
- package/dist/chunk-HUF6TQ2J.js +24 -0
- package/dist/chunk-HUFCSX2Y.js +89 -0
- package/dist/chunk-HX3MQ3H4.js +26 -0
- package/dist/chunk-HZQEQ34U.js +296 -0
- package/dist/chunk-I322G5UG.js +888 -0
- package/dist/chunk-IDDA5INB.js +60 -0
- package/dist/chunk-IDTLHPTK.js +60 -0
- package/dist/chunk-II7652VA.js +2918 -0
- package/dist/chunk-IN4QT33I.js +38 -0
- package/dist/chunk-IV2UXZXX.js +16 -0
- package/dist/chunk-IXSZ7OKR.js +133 -0
- package/dist/chunk-IYEFEBRN.js +41 -0
- package/dist/chunk-IZ35GMGB.js +2543 -0
- package/dist/chunk-IZCOG3FS.js +28 -0
- package/dist/chunk-JA755JHN.js +379 -0
- package/dist/chunk-JETXFF3M.js +33 -0
- package/dist/chunk-JFBEAUJ6.js +24 -0
- package/dist/chunk-JFG4DHKQ.js +48 -0
- package/dist/chunk-JL5BRMDT.js +179 -0
- package/dist/chunk-JLCAWQ3H.js +195 -0
- package/dist/chunk-JLZM7XMZ.js +525 -0
- package/dist/chunk-JMH5MD5A.js +19 -0
- package/dist/chunk-JRPI64AQ.js +3066 -0
- package/dist/chunk-JSX3C6LL.js +344 -0
- package/dist/chunk-JY4R3GML.js +83 -0
- package/dist/chunk-JYBT2JNY.js +61 -0
- package/dist/chunk-K2HNV4LE.js +2008 -0
- package/dist/chunk-KAXJFL7N.js +43 -0
- package/dist/chunk-KDMKHR5A.js +32 -0
- package/dist/chunk-KFFNCDX6.js +19 -0
- package/dist/chunk-KKWZWP67.js +24 -0
- package/dist/chunk-KOJ5QETJ.js +8 -0
- package/dist/chunk-KPMGGE4W.js +51 -0
- package/dist/chunk-KS7DXCXH.js +27 -0
- package/dist/chunk-KSYVTEKR.js +24 -0
- package/dist/chunk-KU4YS6HN.js +61 -0
- package/dist/chunk-KYELSLDJ.js +40 -0
- package/dist/chunk-LC3PSQJJ.js +383 -0
- package/dist/chunk-LC6DYCTG.js +85 -0
- package/dist/chunk-LNKY5Z2X.js +23 -0
- package/dist/chunk-LO2DANS6.js +302 -0
- package/dist/chunk-M4SPKUZE.js +7 -0
- package/dist/chunk-M4YLED7M.js +17 -0
- package/dist/chunk-M6KTNAND.js +746 -0
- package/dist/chunk-MCOIEWW6.js +54 -0
- package/dist/chunk-MDYLOIS2.js +48 -0
- package/dist/chunk-MEISCROL.js +24 -0
- package/dist/chunk-MFLH5ZDQ.js +69 -0
- package/dist/chunk-MIXKQJ64.js +935 -0
- package/dist/chunk-MJMJEURO.js +359 -0
- package/dist/chunk-MNJ2DHU6.js +526 -0
- package/dist/chunk-NEVSQGOI.js +63 -0
- package/dist/chunk-NG5IGZXC.js +1179 -0
- package/dist/chunk-NLOMCLKI.js +3303 -0
- package/dist/chunk-NMCOUVN5.js +24 -0
- package/dist/chunk-NT3HAZYT.js +51 -0
- package/dist/chunk-NXNQQ3DS.js +382 -0
- package/dist/chunk-NYEY6W5R.js +569 -0
- package/dist/chunk-OAPCJO6W.js +23 -0
- package/dist/chunk-OH7FA4TF.js +251 -0
- package/dist/chunk-OLNORNCT.js +331 -0
- package/dist/chunk-OQEBOVUO.js +30 -0
- package/dist/chunk-ORUJI3VB.js +83 -0
- package/dist/chunk-PEN2DK7T.js +49 -0
- package/dist/chunk-PGIQMQRU.js +1650 -0
- package/dist/chunk-PTVOXB5T.js +39 -0
- package/dist/chunk-PUVGWJQ5.js +24 -0
- package/dist/chunk-PWROWDZS.js +137 -0
- package/dist/chunk-Q6XJOJTY.js +29 -0
- package/dist/chunk-QBR6IKIX.js +50 -0
- package/dist/chunk-QETGGFH2.js +30 -0
- package/dist/chunk-QG6MOQLI.js +2934 -0
- package/dist/chunk-QGCEHR6S.js +13 -0
- package/dist/chunk-QHFQHQDC.js +43 -0
- package/dist/chunk-QHRE2M6V.js +26 -0
- package/dist/chunk-QKL7IY42.js +38 -0
- package/dist/chunk-QN6JHMGU.js +44 -0
- package/dist/chunk-QNHZXFRA.js +347 -0
- package/dist/chunk-QPWRHDLZ.js +17 -0
- package/dist/chunk-QVABTUDS.js +80 -0
- package/dist/chunk-QXILAMAU.js +28 -0
- package/dist/chunk-QZAT46PP.js +95 -0
- package/dist/chunk-R3WI7ZLE.js +545 -0
- package/dist/chunk-R5SWC3EW.js +30 -0
- package/dist/chunk-RJQ5YS3Q.js +40 -0
- package/dist/chunk-RNOD2UWF.js +613 -0
- package/dist/chunk-RNXITK5M.js +24 -0
- package/dist/chunk-ROXO4R3J.js +16 -0
- package/dist/chunk-RQ5DNYLG.js +10 -0
- package/dist/chunk-RSWVH7DB.js +24 -0
- package/dist/chunk-RTJXOIIQ.js +12 -0
- package/dist/chunk-RZNYW7UP.js +133 -0
- package/dist/chunk-S4F27M7N.js +37 -0
- package/dist/chunk-S4ONWRJE.js +28 -0
- package/dist/chunk-S53OGZL6.js +168 -0
- package/dist/chunk-S5ADHIZK.js +2508 -0
- package/dist/chunk-S62M63LU.js +19 -0
- package/dist/chunk-S7VDRUED.js +62 -0
- package/dist/chunk-SGD3ZHID.js +250 -0
- package/dist/chunk-SGSPYHFE.js +40 -0
- package/dist/chunk-SLTMRTXV.js +597 -0
- package/dist/chunk-SXGTRZFN.js +26 -0
- package/dist/chunk-SZPTTNW7.js +16 -0
- package/dist/chunk-T3IGJARD.js +22 -0
- package/dist/chunk-TA3TFKYZ.js +86 -0
- package/dist/chunk-TNEHPP3H.js +18 -0
- package/dist/chunk-TPYV2FTV.js +25 -0
- package/dist/chunk-TPZB2YWR.js +25 -0
- package/dist/chunk-TSR5YDPS.js +1266 -0
- package/dist/chunk-TTR7EWNH.js +170 -0
- package/dist/chunk-TVHLKVUO.js +24 -0
- package/dist/chunk-TXINIAFL.js +198 -0
- package/dist/chunk-TXZBBZOG.js +58 -0
- package/dist/chunk-UEU46Q3D.js +300 -0
- package/dist/chunk-UMDEWWXT.js +33 -0
- package/dist/chunk-UQSVWO7Z.js +334 -0
- package/dist/chunk-UZF3G2FN.js +942 -0
- package/dist/chunk-V422EKLW.js +24 -0
- package/dist/chunk-V4DYVLOO.js +433 -0
- package/dist/chunk-V4VC25UL.js +128 -0
- package/dist/chunk-V667FCIJ.js +12 -0
- package/dist/chunk-VABRPZVC.js +43 -0
- package/dist/chunk-VB2MJLET.js +19 -0
- package/dist/chunk-VDAKTZQP.js +18 -0
- package/dist/chunk-VDAZPGR2.js +79 -0
- package/dist/chunk-VXZFQKBJ.js +21 -0
- package/dist/chunk-VYMGZ27S.js +133 -0
- package/dist/chunk-W2RGSGRR.js +131 -0
- package/dist/chunk-W7UZXD5D.js +1109 -0
- package/dist/chunk-WDUNR2VI.js +2718 -0
- package/dist/chunk-WHSTEAVP.js +229 -0
- package/dist/chunk-WJMUMN3I.js +127 -0
- package/dist/chunk-WLZ54FWG.js +120 -0
- package/dist/chunk-WMJPFLF3.js +2980 -0
- package/dist/chunk-WRHFBCVY.js +24 -0
- package/dist/chunk-WVSNSWBJ.js +47 -0
- package/dist/chunk-WYJEOMNY.js +31 -0
- package/dist/chunk-WYJMV62X.js +24 -0
- package/dist/chunk-WZGJSQKN.js +29 -0
- package/dist/chunk-WZL4EEBS.js +11 -0
- package/dist/chunk-X7TXGKRX.js +272 -0
- package/dist/chunk-XB4KZ6WO.js +81 -0
- package/dist/chunk-XDLQRSSH.js +266 -0
- package/dist/chunk-XDS4UZGR.js +113 -0
- package/dist/chunk-XEGRWWNO.js +30 -0
- package/dist/chunk-XO5ONLVM.js +420 -0
- package/dist/chunk-XPWRD424.js +24 -0
- package/dist/chunk-XTNV2YMB.js +50 -0
- package/dist/chunk-XW5J5JAX.js +42 -0
- package/dist/chunk-XY5O74BH.js +33 -0
- package/dist/chunk-XYONCO5Q.js +984 -0
- package/dist/chunk-Y4PXIJMD.js +829 -0
- package/dist/chunk-YAYRRKC7.js +24 -0
- package/dist/chunk-YEDYBMCW.js +210 -0
- package/dist/chunk-YFG4E3N2.js +1161 -0
- package/dist/chunk-YHTO46W2.js +2670 -0
- package/dist/chunk-YI2ZVTCB.js +38 -0
- package/dist/chunk-YKO3VCTF.js +24 -0
- package/dist/chunk-YP3I6W7T.js +24 -0
- package/dist/chunk-YQ2B3YVF.js +687 -0
- package/dist/chunk-YS6KMYM4.js +91 -0
- package/dist/chunk-YTSSXSZR.js +197 -0
- package/dist/chunk-Z256ACGC.js +27 -0
- package/dist/chunk-Z2MGTKDR.js +20 -0
- package/dist/chunk-Z5VSLLNY.js +23 -0
- package/dist/chunk-Z7X3RGGA.js +22 -0
- package/dist/chunk-ZF43WRG3.js +29 -0
- package/dist/chunk-ZJKOLOVF.js +1754 -0
- package/dist/chunk-ZQ4VFQID.js +76 -0
- package/dist/chunk-ZSLGN6CO.js +89 -0
- package/dist/chunk-ZVTFZF4V.js +542 -0
- package/dist/cli/index.js +9 -0
- package/dist/core-5Z6UW5DS.js +31 -0
- package/dist/core-6ANZ2OWO.js +40 -0
- package/dist/core-6LLJNZ4O.js +37 -0
- package/dist/core-CPN2HF75.js +33 -0
- package/dist/core-CS7AKNME.js +37 -0
- package/dist/core-DBRILYNB.js +38 -0
- package/dist/core-DU77ZYPR.js +34 -0
- package/dist/core-E6YD7VU4.js +32 -0
- package/dist/core-EE55P6XK.js +56 -0
- package/dist/core-FFLPH5XK.js +41 -0
- package/dist/core-IV26EL5C.js +32 -0
- package/dist/core-IZVZ2B7Y.js +34 -0
- package/dist/core-JQV7STNF.js +34 -0
- package/dist/core-KBH3EJZV.js +32 -0
- package/dist/core-KFBW5PRT.js +36 -0
- package/dist/core-KWGXHBJE.js +37 -0
- package/dist/core-MZMR2DF4.js +32 -0
- package/dist/core-OK2ZY5OJ.js +29 -0
- package/dist/core-OV5MPTZP.js +43 -0
- package/dist/core-OW5V74Q4.js +40 -0
- package/dist/core-PL64QPOH.js +57 -0
- package/dist/core-PVINU5JJ.js +33 -0
- package/dist/core-QUYSNTC7.js +34 -0
- package/dist/core-RE3L6YCM.js +29 -0
- package/dist/core-RUA3EWW3.js +39 -0
- package/dist/core-RY6IFRKM.js +35 -0
- package/dist/core-SCWEVNUY.js +34 -0
- package/dist/core-SE67HHFG.js +55 -0
- package/dist/core-T5Q4DSH2.js +32 -0
- package/dist/core-TJX3I7KH.js +37 -0
- package/dist/core-ULUA5ZB2.js +55 -0
- package/dist/core-WLVU2HWX.js +46 -0
- package/dist/core-WQPHNVNY.js +51 -0
- package/dist/core-XXIOJY2X.js +52 -0
- package/dist/core-ZH7XTJTD.js +39 -0
- package/dist/core-ZHE7N4NS.js +50 -0
- package/dist/core-ZJYLJWZQ.js +38 -0
- package/dist/dataTable-IL7HVDHL.js +58 -0
- package/dist/engine-MYLZI5VH.js +961 -0
- package/dist/fixtures.d.ts +1 -0
- package/dist/fixtures.js +40 -0
- package/dist/fontTables-ZYBUCJ5N.js +18 -0
- package/dist/fonts.d.ts +1 -0
- package/dist/fonts.js +19 -0
- package/dist/geo/dach.d.ts +1 -0
- package/dist/geo/dach.js +14 -0
- package/dist/geo/de-states.d.ts +1 -0
- package/dist/geo/de-states.js +14 -0
- package/dist/geo/eu27.d.ts +1 -0
- package/dist/geo/eu27.js +14 -0
- package/dist/geo/europe.d.ts +1 -0
- package/dist/geo/europe.js +14 -0
- package/dist/geo/index.d.ts +1 -0
- package/dist/geo/index.js +41 -0
- package/dist/geo/us-states.d.ts +1 -0
- package/dist/geo/us-states.js +14 -0
- package/dist/geo/world.d.ts +1 -0
- package/dist/geo/world.js +14 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +363 -0
- package/dist/main-ISJ53IS5.js +568 -0
- package/dist/mcp/server.js +1023 -0
- package/dist/module-SVEW5ZUE.js +137233 -0
- package/dist/react/bar.d.ts +1 -0
- package/dist/react/bar.js +80 -0
- package/dist/react/bartable.d.ts +1 -0
- package/dist/react/bartable.js +70 -0
- package/dist/react/box.d.ts +1 -0
- package/dist/react/box.js +64 -0
- package/dist/react/bullet.d.ts +1 -0
- package/dist/react/bullet.js +71 -0
- package/dist/react/butterfly.d.ts +1 -0
- package/dist/react/butterfly.js +65 -0
- package/dist/react/choropleth.d.ts +1 -0
- package/dist/react/choropleth.js +67 -0
- package/dist/react/cohort.d.ts +1 -0
- package/dist/react/cohort.js +69 -0
- package/dist/react/column.d.ts +1 -0
- package/dist/react/column.js +85 -0
- package/dist/react/combo.d.ts +1 -0
- package/dist/react/combo.js +85 -0
- package/dist/react/creative.d.ts +1 -0
- package/dist/react/creative.js +61 -0
- package/dist/react/diagram.d.ts +1 -0
- package/dist/react/diagram.js +60 -0
- package/dist/react/dimswitch.d.ts +1 -0
- package/dist/react/dimswitch.js +71 -0
- package/dist/react/dot.d.ts +1 -0
- package/dist/react/dot.js +69 -0
- package/dist/react/export.d.ts +1 -0
- package/dist/react/export.js +657 -0
- package/dist/react/funnel.d.ts +1 -0
- package/dist/react/funnel.js +62 -0
- package/dist/react/gantt.d.ts +1 -0
- package/dist/react/gantt.js +62 -0
- package/dist/react/grid.d.ts +1 -0
- package/dist/react/grid.js +66 -0
- package/dist/react/heatmap.d.ts +1 -0
- package/dist/react/heatmap.js +67 -0
- package/dist/react/histogram.d.ts +1 -0
- package/dist/react/histogram.js +85 -0
- package/dist/react/index.d.ts +1 -0
- package/dist/react/index.js +503 -0
- package/dist/react/kpi.d.ts +1 -0
- package/dist/react/kpi.js +67 -0
- package/dist/react/likert.d.ts +1 -0
- package/dist/react/likert.js +82 -0
- package/dist/react/line.d.ts +1 -0
- package/dist/react/line.js +80 -0
- package/dist/react/mekko.d.ts +1 -0
- package/dist/react/mekko.js +70 -0
- package/dist/react/pareto.d.ts +1 -0
- package/dist/react/pareto.js +89 -0
- package/dist/react/pie.d.ts +1 -0
- package/dist/react/pie.js +63 -0
- package/dist/react/prepare.d.ts +1 -0
- package/dist/react/prepare.js +277 -0
- package/dist/react/pvm.d.ts +1 -0
- package/dist/react/pvm.js +67 -0
- package/dist/react/pyramid.d.ts +1 -0
- package/dist/react/pyramid.js +66 -0
- package/dist/react/sankey.d.ts +1 -0
- package/dist/react/sankey.js +59 -0
- package/dist/react/scatter.d.ts +1 -0
- package/dist/react/scatter.js +62 -0
- package/dist/react/slope.d.ts +1 -0
- package/dist/react/slope.js +63 -0
- package/dist/react/sparkline.d.ts +1 -0
- package/dist/react/sparkline.js +59 -0
- package/dist/react/spec.d.ts +1 -0
- package/dist/react/spec.js +370 -0
- package/dist/react/status.d.ts +1 -0
- package/dist/react/status.js +64 -0
- package/dist/react/story.d.ts +1 -0
- package/dist/react/story.js +140 -0
- package/dist/react/table.d.ts +1 -0
- package/dist/react/table.js +68 -0
- package/dist/react/theme.d.ts +1 -0
- package/dist/react/theme.js +53 -0
- package/dist/react/tilemap.d.ts +1 -0
- package/dist/react/tilemap.js +66 -0
- package/dist/react/treemap.d.ts +1 -0
- package/dist/react/treemap.js +61 -0
- package/dist/react/variance.d.ts +1 -0
- package/dist/react/variance.js +64 -0
- package/dist/react/waffle.d.ts +1 -0
- package/dist/react/waffle.js +62 -0
- package/dist/react/waterfall.d.ts +1 -0
- package/dist/react/waterfall.js +67 -0
- package/dist/resvg-ZOVDIZTV.js +23 -0
- package/dist/rows.d.ts +1 -0
- package/dist/rows.js +23 -0
- package/dist/rowsModule-3Y4I3M3E.js +27 -0
- package/dist/schema-2BMZOHXI.js +22 -0
- package/dist/schema-2GUBWOBC.js +26 -0
- package/dist/schema-34ZELWRQ.js +25 -0
- package/dist/schema-3BHL2B76.js +22 -0
- package/dist/schema-4735XAZX.js +29 -0
- package/dist/schema-5YTNQ6JY.js +22 -0
- package/dist/schema-7J3NAIN2.js +27 -0
- package/dist/schema-AOJJ7JZB.js +22 -0
- package/dist/schema-CVMV4LRA.js +22 -0
- package/dist/schema-D3RCMN3T.js +22 -0
- package/dist/schema-E2ISJ65D.js +23 -0
- package/dist/schema-E6YOSOWB.js +28 -0
- package/dist/schema-EQQB43AY.js +22 -0
- package/dist/schema-EVLLL5UF.js +22 -0
- package/dist/schema-EYQ5IBLF.js +23 -0
- package/dist/schema-EYZVD73N.js +22 -0
- package/dist/schema-G4KFMQBL.js +22 -0
- package/dist/schema-GH7IKSOU.js +23 -0
- package/dist/schema-IF5N3J56.js +42 -0
- package/dist/schema-IG7JIR4H.js +23 -0
- package/dist/schema-JJYJOQTT.js +23 -0
- package/dist/schema-KFC4WYH4.js +32 -0
- package/dist/schema-L7263JMT.js +25 -0
- package/dist/schema-MEAFRXVH.js +53 -0
- package/dist/schema-P63S63GE.js +23 -0
- package/dist/schema-P7LJFJAJ.js +22 -0
- package/dist/schema-PA2MXYY4.js +23 -0
- package/dist/schema-PDZ6256H.js +23 -0
- package/dist/schema-PNC3Z7AH.js +25 -0
- package/dist/schema-QEVSIMGO.js +22 -0
- package/dist/schema-QJJPRRE7.js +22 -0
- package/dist/schema-S3EQKVOT.js +23 -0
- package/dist/schema-STGL44TL.js +22 -0
- package/dist/schema-T4NE2EAO.js +22 -0
- package/dist/schema-TQYTESG3.js +22 -0
- package/dist/schema-W376PAJG.js +22 -0
- package/dist/schema-XYYDUUHS.js +26 -0
- package/dist/specValidation-NVBIZMEE.js +48 -0
- package/dist/theme.d.ts +1 -0
- package/dist/theme.js +24 -0
- package/dist/themeShapeRules-5C2463YH.js +11 -0
- package/dist/types/core/a11y/accessibility.d.ts +43 -0
- package/dist/types/core/a11y/recordsShared.d.ts +44 -0
- package/dist/types/core/a11y/structuralRecords.d.ts +6 -0
- package/dist/types/core/a11y/types.d.ts +116 -0
- package/dist/types/core/annotate.d.ts +300 -0
- package/dist/types/core/annotateArms.d.ts +37 -0
- package/dist/types/core/annotateFields.d.ts +30 -0
- package/dist/types/core/annotateGapBracket.d.ts +66 -0
- package/dist/types/core/annotateLinks.d.ts +47 -0
- package/dist/types/core/annotateTargets.d.ts +90 -0
- package/dist/types/core/axis.d.ts +179 -0
- package/dist/types/core/bandSelect.d.ts +10 -0
- package/dist/types/core/bands.d.ts +14 -0
- package/dist/types/core/calendarLabels.d.ts +101 -0
- package/dist/types/core/charts/band/stacks.d.ts +155 -0
- package/dist/types/core/charts/bar/fixtures.d.ts +9 -0
- package/dist/types/core/charts/bar/layout.d.ts +95 -0
- package/dist/types/core/charts/bartable/fixtures.d.ts +4 -0
- package/dist/types/core/charts/bartable/types.d.ts +192 -0
- package/dist/types/core/charts/box/fixtures.d.ts +12 -0
- package/dist/types/core/charts/box/types.d.ts +110 -0
- package/dist/types/core/charts/bullet/fixtures.d.ts +11 -0
- package/dist/types/core/charts/butterfly/fixtures.d.ts +9 -0
- package/dist/types/core/charts/choropleth/fixtures.d.ts +3 -0
- package/dist/types/core/charts/choropleth/overlayTypes.d.ts +68 -0
- package/dist/types/core/charts/choropleth/types.d.ts +117 -0
- package/dist/types/core/charts/cohort/fixtures.d.ts +12 -0
- package/dist/types/core/charts/cohort/types.d.ts +165 -0
- package/dist/types/core/charts/column/anomaly.d.ts +204 -0
- package/dist/types/core/charts/column/fixtures.d.ts +12 -0
- package/dist/types/core/charts/column/layout.d.ts +116 -0
- package/dist/types/core/charts/column/model.d.ts +295 -0
- package/dist/types/core/charts/column/types.d.ts +56 -0
- package/dist/types/core/charts/combo/endpoints.d.ts +165 -0
- package/dist/types/core/charts/combo/fixtures.d.ts +12 -0
- package/dist/types/core/charts/combo/layout.d.ts +48 -0
- package/dist/types/core/charts/creative/fixtures.d.ts +4 -0
- package/dist/types/core/charts/creative/types.d.ts +73 -0
- package/dist/types/core/charts/diagram/fixtures.d.ts +3 -0
- package/dist/types/core/charts/dimswitch/compile.d.ts +20 -0
- package/dist/types/core/charts/dimswitch/fixtures.d.ts +3 -0
- package/dist/types/core/charts/dimswitch/types.d.ts +152 -0
- package/dist/types/core/charts/dot/fixtures.d.ts +11 -0
- package/dist/types/core/charts/funnel/fixtures.d.ts +11 -0
- package/dist/types/core/charts/gantt/fixtures.d.ts +9 -0
- package/dist/types/core/charts/gantt/layout.d.ts +56 -0
- package/dist/types/core/charts/grid/fixtures.d.ts +3 -0
- package/dist/types/core/charts/grid/metricStack.d.ts +108 -0
- package/dist/types/core/charts/grid/metricStackSchema.d.ts +74 -0
- package/dist/types/core/charts/grid/normalize.d.ts +99 -0
- package/dist/types/core/charts/grid/schema.d.ts +168 -0
- package/dist/types/core/charts/heatmap/fixtures.d.ts +11 -0
- package/dist/types/core/charts/histogram/fixtures.d.ts +15 -0
- package/dist/types/core/charts/histogram/types.d.ts +98 -0
- package/dist/types/core/charts/kpi/fixtures.d.ts +9 -0
- package/dist/types/core/charts/likert/fixtures.d.ts +11 -0
- package/dist/types/core/charts/likert/layout.d.ts +111 -0
- package/dist/types/core/charts/line/fixtures.d.ts +16 -0
- package/dist/types/core/charts/line/types.d.ts +6 -0
- package/dist/types/core/charts/mekko/fixtures.d.ts +13 -0
- package/dist/types/core/charts/pareto/fixtures.d.ts +5 -0
- package/dist/types/core/charts/pareto/layout.d.ts +68 -0
- package/dist/types/core/charts/pie/fixtures.d.ts +14 -0
- package/dist/types/core/charts/pvm/fixtures.d.ts +13 -0
- package/dist/types/core/charts/pvm/types.d.ts +118 -0
- package/dist/types/core/charts/pyramid/fixtures.d.ts +4 -0
- package/dist/types/core/charts/pyramid/types.d.ts +92 -0
- package/dist/types/core/charts/sankey/fixtures.d.ts +4 -0
- package/dist/types/core/charts/sankey/types.d.ts +116 -0
- package/dist/types/core/charts/scatter/fixtures.d.ts +12 -0
- package/dist/types/core/charts/scatter/types.d.ts +58 -0
- package/dist/types/core/charts/slope/fixtures.d.ts +13 -0
- package/dist/types/core/charts/sparkline/fixtures.d.ts +9 -0
- package/dist/types/core/charts/status/fixtures.d.ts +8 -0
- package/dist/types/core/charts/status/layout.d.ts +71 -0
- package/dist/types/core/charts/table/fitFormats.d.ts +67 -0
- package/dist/types/core/charts/table/fixtures.d.ts +7 -0
- package/dist/types/core/charts/table/resolve.d.ts +72 -0
- package/dist/types/core/charts/table/view.d.ts +156 -0
- package/dist/types/core/charts/tilemap/fixtures.d.ts +3 -0
- package/dist/types/core/charts/tilemap/types.d.ts +94 -0
- package/dist/types/core/charts/treemap/fixtures.d.ts +4 -0
- package/dist/types/core/charts/treemap/types.d.ts +78 -0
- package/dist/types/core/charts/variance/fixtures.d.ts +12 -0
- package/dist/types/core/charts/waffle/fixtures.d.ts +5 -0
- package/dist/types/core/charts/waffle/types.d.ts +117 -0
- package/dist/types/core/charts/waterfall/fixtures.d.ts +9 -0
- package/dist/types/core/claims/browser.d.ts +49 -0
- package/dist/types/core/claims/manifest.d.ts +22 -0
- package/dist/types/core/dateFormat.d.ts +39 -0
- package/dist/types/core/deferred.d.ts +121 -0
- package/dist/types/core/diagnostics/describe.d.ts +149 -0
- package/dist/types/core/diagnostics/jsonPatch.d.ts +36 -0
- package/dist/types/core/doc/bareChart.d.ts +2 -0
- package/dist/types/core/doc/diagnostics.d.ts +124 -0
- package/dist/types/core/doc/docExpand.d.ts +39 -0
- package/dist/types/core/doc/document.d.ts +43 -0
- package/dist/types/core/doc/ownedDocumentCopy.d.ts +5 -0
- package/dist/types/core/doc/specError.d.ts +6 -0
- package/dist/types/core/emptyData.d.ts +27 -0
- package/dist/types/core/eventLane.d.ts +208 -0
- package/dist/types/core/fontMetrics/index.d.ts +47 -0
- package/dist/types/core/fontMetrics/injected.d.ts +40 -0
- package/dist/types/core/fontMetrics/tableDocument.d.ts +73 -0
- package/dist/types/core/fontMetrics/tables.generated.d.ts +17 -0
- package/dist/types/core/footer.d.ts +59 -0
- package/dist/types/core/format.d.ts +149 -0
- package/dist/types/core/formatPrecision.d.ts +136 -0
- package/dist/types/core/formatSpec.d.ts +302 -0
- package/dist/types/core/frame.d.ts +583 -0
- package/dist/types/core/geo/packs/all.d.ts +7 -0
- package/dist/types/core/geo/packs/dach.d.ts +16 -0
- package/dist/types/core/geo/packs/de-states.d.ts +16 -0
- package/dist/types/core/geo/packs/eu27.d.ts +16 -0
- package/dist/types/core/geo/packs/europe.d.ts +16 -0
- package/dist/types/core/geo/packs/index.d.ts +22 -0
- package/dist/types/core/geo/packs/registry.d.ts +37 -0
- package/dist/types/core/geo/packs/us-states.d.ts +16 -0
- package/dist/types/core/geo/packs/world.d.ts +16 -0
- package/dist/types/core/geo/tiles/eu27.generated.d.ts +412 -0
- package/dist/types/core/geo/tiles/europe.generated.d.ts +842 -0
- package/dist/types/core/geo/tiles/index.d.ts +8 -0
- package/dist/types/core/geo/tiles/types.d.ts +36 -0
- package/dist/types/core/geo/tiles/us-states.generated.d.ts +952 -0
- package/dist/types/core/geo/tiles/world.generated.d.ts +968 -0
- package/dist/types/core/geo/types.d.ts +146 -0
- package/dist/types/core/geometry.d.ts +102 -0
- package/dist/types/core/grid/sharedScale.d.ts +82 -0
- package/dist/types/core/icons.d.ts +227 -0
- package/dist/types/core/inputError.d.ts +14 -0
- package/dist/types/core/isoDate.d.ts +2 -0
- package/dist/types/core/isoTime.d.ts +7 -0
- package/dist/types/core/label/categoryRow.d.ts +332 -0
- package/dist/types/core/label/occupied.d.ts +41 -0
- package/dist/types/core/label/ownership.d.ts +83 -0
- package/dist/types/core/label/solver.d.ts +380 -0
- package/dist/types/core/label/tickRow.d.ts +78 -0
- package/dist/types/core/live/types.d.ts +50 -0
- package/dist/types/core/normalize/shared.d.ts +56 -0
- package/dist/types/core/notes.d.ts +174 -0
- package/dist/types/core/othersShade.d.ts +9 -0
- package/dist/types/core/periodYears.d.ts +9 -0
- package/dist/types/core/polyline.d.ts +11 -0
- package/dist/types/core/rangeRules.d.ts +19 -0
- package/dist/types/core/ratioTier.d.ts +120 -0
- package/dist/types/core/readerStrings.d.ts +13 -0
- package/dist/types/core/reading.d.ts +120 -0
- package/dist/types/core/registry.d.ts +178 -0
- package/dist/types/core/repaintGeometry.d.ts +19 -0
- package/dist/types/core/request.d.ts +124 -0
- package/dist/types/core/rows.d.ts +45 -0
- package/dist/types/core/scale.d.ts +106 -0
- package/dist/types/core/schema/capability.d.ts +229 -0
- package/dist/types/core/schema/namedColumns.d.ts +45 -0
- package/dist/types/core/schema/reference.d.ts +31 -0
- package/dist/types/core/schema/refusals.d.ts +45 -0
- package/dist/types/core/schema/unknownKeys.d.ts +45 -0
- package/dist/types/core/seriesIdentity.d.ts +120 -0
- package/dist/types/core/shareRounding.d.ts +49 -0
- package/dist/types/core/sizing.d.ts +330 -0
- package/dist/types/core/staticFooter.d.ts +6 -0
- package/dist/types/core/story.d.ts +41 -0
- package/dist/types/core/structureCounts.d.ts +10 -0
- package/dist/types/core/svg/renderSvg.d.ts +51 -0
- package/dist/types/core/target.d.ts +89 -0
- package/dist/types/core/text.d.ts +113 -0
- package/dist/types/core/theme.d.ts +478 -0
- package/dist/types/core/themeFields.d.ts +11 -0
- package/dist/types/core/themeRules.d.ts +111 -0
- package/dist/types/core/themeShape.d.ts +87 -0
- package/dist/types/core/themeValidate.d.ts +15 -0
- package/dist/types/core/timeAxis.d.ts +106 -0
- package/dist/types/core/types/annotations.d.ts +223 -0
- package/dist/types/core/types/cell.d.ts +82 -0
- package/dist/types/core/types/data.d.ts +309 -0
- package/dist/types/core/types/diagram.d.ts +234 -0
- package/dist/types/core/types/index.d.ts +8 -0
- package/dist/types/core/types/options.d.ts +1583 -0
- package/dist/types/core/types/scene.d.ts +990 -0
- package/dist/types/core/types/sizing.d.ts +51 -0
- package/dist/types/core/types/table.d.ts +873 -0
- package/dist/types/core/types/theme.d.ts +806 -0
- package/dist/types/core/zoom.d.ts +106 -0
- package/dist/types/fixtures/index.d.ts +40 -0
- package/dist/types/fixtures/registry.d.ts +15 -0
- package/dist/types/fonts.d.ts +10 -0
- package/dist/types/index.d.ts +70 -0
- package/dist/types/react/BoardplotTheme.d.ts +9 -0
- package/dist/types/react/DimSwitchChart.d.ts +36 -0
- package/dist/types/react/ScaleGroup.d.ts +31 -0
- package/dist/types/react/SceneRenderer.d.ts +23 -0
- package/dist/types/react/SizePlaceholder.d.ts +51 -0
- package/dist/types/react/StoryFrame.d.ts +42 -0
- package/dist/types/react/TableChart.d.ts +220 -0
- package/dist/types/react/a11ySurface.d.ts +20 -0
- package/dist/types/react/barrelCharts.d.ts +1023 -0
- package/dist/types/react/charts/bar.d.ts +28 -0
- package/dist/types/react/charts/bartable.d.ts +27 -0
- package/dist/types/react/charts/box.d.ts +27 -0
- package/dist/types/react/charts/bullet.d.ts +28 -0
- package/dist/types/react/charts/butterfly.d.ts +28 -0
- package/dist/types/react/charts/choropleth.d.ts +27 -0
- package/dist/types/react/charts/cohort.d.ts +52 -0
- package/dist/types/react/charts/column.d.ts +27 -0
- package/dist/types/react/charts/combo.d.ts +7 -0
- package/dist/types/react/charts/creative.d.ts +27 -0
- package/dist/types/react/charts/diagram.d.ts +162 -0
- package/dist/types/react/charts/dimswitch.d.ts +6 -0
- package/dist/types/react/charts/dot.d.ts +28 -0
- package/dist/types/react/charts/funnel.d.ts +28 -0
- package/dist/types/react/charts/gantt.d.ts +28 -0
- package/dist/types/react/charts/grid.d.ts +29 -0
- package/dist/types/react/charts/heatmap.d.ts +28 -0
- package/dist/types/react/charts/histogram.d.ts +27 -0
- package/dist/types/react/charts/kpi.d.ts +28 -0
- package/dist/types/react/charts/likert.d.ts +27 -0
- package/dist/types/react/charts/line.d.ts +28 -0
- package/dist/types/react/charts/mekko.d.ts +28 -0
- package/dist/types/react/charts/pareto.d.ts +28 -0
- package/dist/types/react/charts/pie.d.ts +28 -0
- package/dist/types/react/charts/pvm.d.ts +27 -0
- package/dist/types/react/charts/pyramid.d.ts +27 -0
- package/dist/types/react/charts/sankey.d.ts +27 -0
- package/dist/types/react/charts/scatter.d.ts +28 -0
- package/dist/types/react/charts/slope.d.ts +28 -0
- package/dist/types/react/charts/sparkline.d.ts +28 -0
- package/dist/types/react/charts/status.d.ts +27 -0
- package/dist/types/react/charts/table.d.ts +6 -0
- package/dist/types/react/charts/tilemap.d.ts +27 -0
- package/dist/types/react/charts/treemap.d.ts +27 -0
- package/dist/types/react/charts/variance.d.ts +28 -0
- package/dist/types/react/charts/waffle.d.ts +28 -0
- package/dist/types/react/charts/waterfall.d.ts +28 -0
- package/dist/types/react/createChartComponent.d.ts +135 -0
- package/dist/types/react/export/clipboard.d.ts +8 -0
- package/dist/types/react/export/csv.d.ts +2 -0
- package/dist/types/react/export/frame.d.ts +35 -0
- package/dist/types/react/export/index.d.ts +7 -0
- package/dist/types/react/export/png.d.ts +14 -0
- package/dist/types/react/export/svg.d.ts +5 -0
- package/dist/types/react/export/types.d.ts +69 -0
- package/dist/types/react/export/useExport.d.ts +17 -0
- package/dist/types/react/exportLink.d.ts +49 -0
- package/dist/types/react/footerFrame.d.ts +25 -0
- package/dist/types/react/hover/dataTable.d.ts +13 -0
- package/dist/types/react/hover/engine.d.ts +210 -0
- package/dist/types/react/hover/keyboard.d.ts +44 -0
- package/dist/types/react/hover/labelCard.d.ts +170 -0
- package/dist/types/react/hover/placement.d.ts +49 -0
- package/dist/types/react/index.d.ts +16 -0
- package/dist/types/react/parseChartSpec.d.ts +16 -0
- package/dist/types/react/prepare.d.ts +32 -0
- package/dist/types/react/prepared.d.ts +53 -0
- package/dist/types/react/preparedTable.d.ts +15 -0
- package/dist/types/react/rowsInput.d.ts +55 -0
- package/dist/types/react/rowsModule.d.ts +18 -0
- package/dist/types/react/rowsStore.d.ts +50 -0
- package/dist/types/react/scale-group.d.ts +2 -0
- package/dist/types/react/scaleGroupContext.d.ts +22 -0
- package/dist/types/react/scenePaint.d.ts +10 -0
- package/dist/types/react/scrollState.d.ts +26 -0
- package/dist/types/react/spec.d.ts +65 -0
- package/dist/types/react/specValidation.d.ts +45 -0
- package/dist/types/react/story.d.ts +15 -0
- package/dist/types/react/theme.d.ts +9 -0
- package/dist/types/react/themeContext.d.ts +44 -0
- package/dist/types/react/useChartLayout.d.ts +22 -0
- package/dist/types/react/useContainerSize.d.ts +57 -0
- package/dist/types/react/useHover.d.ts +100 -0
- package/dist/types/react/useZoom.d.ts +50 -0
- package/dist/types/rows.d.ts +58 -0
- package/dist/types/tableLooks.d.ts +6 -0
- package/dist/types/theme.d.ts +3 -0
- package/dist/types/validate.d.ts +3 -0
- package/dist/validate.d.ts +1 -0
- package/dist/validate.js +222 -0
- package/docs/FONTS.md +68 -0
- package/docs/TELEMETRY.md +94 -0
- package/docs/manual.md +838 -0
- package/docs/reference/bar.md +222 -0
- package/docs/reference/bartable.md +143 -0
- package/docs/reference/box.md +93 -0
- package/docs/reference/bullet.md +118 -0
- package/docs/reference/butterfly.md +117 -0
- package/docs/reference/choropleth.md +148 -0
- package/docs/reference/cohort.md +149 -0
- package/docs/reference/column.md +275 -0
- package/docs/reference/combo.md +219 -0
- package/docs/reference/creative.md +147 -0
- package/docs/reference/diagram.md +191 -0
- package/docs/reference/dimswitch.md +1395 -0
- package/docs/reference/dot.md +117 -0
- package/docs/reference/fixtures.md +1088 -0
- package/docs/reference/funnel.md +121 -0
- package/docs/reference/gantt.md +132 -0
- package/docs/reference/grid.md +302 -0
- package/docs/reference/heatmap.md +127 -0
- package/docs/reference/histogram.md +77 -0
- package/docs/reference/kpi.md +115 -0
- package/docs/reference/likert.md +113 -0
- package/docs/reference/line.md +436 -0
- package/docs/reference/mekko.md +114 -0
- package/docs/reference/options.md +313 -0
- package/docs/reference/pareto.md +102 -0
- package/docs/reference/pie.md +114 -0
- package/docs/reference/pvm.md +114 -0
- package/docs/reference/pyramid.md +99 -0
- package/docs/reference/react.md +703 -0
- package/docs/reference/reading.md +28 -0
- package/docs/reference/sankey.md +110 -0
- package/docs/reference/scatter.md +211 -0
- package/docs/reference/slope.md +126 -0
- package/docs/reference/sparkline.md +74 -0
- package/docs/reference/status.md +107 -0
- package/docs/reference/table.md +673 -0
- package/docs/reference/theme.md +361 -0
- package/docs/reference/tilemap.md +121 -0
- package/docs/reference/treemap.md +86 -0
- package/docs/reference/variance.md +126 -0
- package/docs/reference/waffle.md +106 -0
- package/docs/reference/waterfall.md +164 -0
- package/llms.txt +57 -0
- package/package.json +437 -4
|
@@ -0,0 +1,2353 @@
|
|
|
1
|
+
import {
|
|
2
|
+
sharedKeys10,
|
|
3
|
+
sharedKeys5,
|
|
4
|
+
sharedKeys7,
|
|
5
|
+
sharedKeys9
|
|
6
|
+
} from "./chunk-QGCEHR6S.js";
|
|
7
|
+
import {
|
|
8
|
+
optionKeyCheck
|
|
9
|
+
} from "./chunk-H4H4O62O.js";
|
|
10
|
+
import {
|
|
11
|
+
LayoutRefusal,
|
|
12
|
+
LoadingPlaceholder,
|
|
13
|
+
PROBE_STYLE,
|
|
14
|
+
SizePlaceholder,
|
|
15
|
+
hoverFlags,
|
|
16
|
+
markScrollRegion,
|
|
17
|
+
rebindable,
|
|
18
|
+
scrollStateOf,
|
|
19
|
+
useContainerSize,
|
|
20
|
+
useDeferredModule,
|
|
21
|
+
useDeferredRevision,
|
|
22
|
+
useDisplayWarnings,
|
|
23
|
+
useHoverEngine,
|
|
24
|
+
usePrepared,
|
|
25
|
+
usePrinting,
|
|
26
|
+
useRefusalSettle,
|
|
27
|
+
useResolvedChartRequest,
|
|
28
|
+
useRowsInput,
|
|
29
|
+
watchPrint
|
|
30
|
+
} from "./chunk-GH3ZMBFX.js";
|
|
31
|
+
import {
|
|
32
|
+
useIsomorphicLayoutEffect
|
|
33
|
+
} from "./chunk-A4QZXLXF.js";
|
|
34
|
+
import {
|
|
35
|
+
useExportLink
|
|
36
|
+
} from "./chunk-KKWZWP67.js";
|
|
37
|
+
import {
|
|
38
|
+
useStableValue
|
|
39
|
+
} from "./chunk-PTVOXB5T.js";
|
|
40
|
+
import {
|
|
41
|
+
sceneAttributes
|
|
42
|
+
} from "./chunk-IV2UXZXX.js";
|
|
43
|
+
import {
|
|
44
|
+
IdPrefixContext,
|
|
45
|
+
checkedIdPrefix,
|
|
46
|
+
useScopedId
|
|
47
|
+
} from "./chunk-VDAKTZQP.js";
|
|
48
|
+
import {
|
|
49
|
+
useBoardplotTheme
|
|
50
|
+
} from "./chunk-R5SWC3EW.js";
|
|
51
|
+
import {
|
|
52
|
+
tableCore
|
|
53
|
+
} from "./chunk-35DZP2R2.js";
|
|
54
|
+
import {
|
|
55
|
+
emitSparkline,
|
|
56
|
+
fitTableFormats,
|
|
57
|
+
formatsFittedWarning,
|
|
58
|
+
sparklineDomains,
|
|
59
|
+
sparklineSourceValues
|
|
60
|
+
} from "./chunk-ZJKOLOVF.js";
|
|
61
|
+
import {
|
|
62
|
+
heatEncodingRefusals
|
|
63
|
+
} from "./chunk-ZF43WRG3.js";
|
|
64
|
+
import {
|
|
65
|
+
insetTint,
|
|
66
|
+
tableFrame,
|
|
67
|
+
tableGroundTextStyle,
|
|
68
|
+
tablePresentation,
|
|
69
|
+
tableRenderTheme,
|
|
70
|
+
tableStylesheet
|
|
71
|
+
} from "./chunk-FGAGGPFF.js";
|
|
72
|
+
import {
|
|
73
|
+
publishTableChart
|
|
74
|
+
} from "./chunk-OQEBOVUO.js";
|
|
75
|
+
import {
|
|
76
|
+
registeredType,
|
|
77
|
+
withRegistered
|
|
78
|
+
} from "./chunk-4SM2ONUC.js";
|
|
79
|
+
import {
|
|
80
|
+
measureResolvedRequest,
|
|
81
|
+
resolveChartRequest
|
|
82
|
+
} from "./chunk-M6KTNAND.js";
|
|
83
|
+
import {
|
|
84
|
+
arrowGlyph,
|
|
85
|
+
arrowKey,
|
|
86
|
+
badSide,
|
|
87
|
+
belowTableViewportFloor,
|
|
88
|
+
cellDrawsTabular,
|
|
89
|
+
collapsedByDefault,
|
|
90
|
+
columnHeadLabel,
|
|
91
|
+
columnHeaderAffix,
|
|
92
|
+
emptyMessageRow,
|
|
93
|
+
expansionForFolds,
|
|
94
|
+
expansionRootsHidden,
|
|
95
|
+
finalClosers,
|
|
96
|
+
groupSpans,
|
|
97
|
+
heatColumn,
|
|
98
|
+
heatKey,
|
|
99
|
+
heatPaint,
|
|
100
|
+
heatRanges,
|
|
101
|
+
inCellBarMaxima,
|
|
102
|
+
levelLadder,
|
|
103
|
+
numericCell,
|
|
104
|
+
presetLanguage,
|
|
105
|
+
printsFigures,
|
|
106
|
+
resolveTable,
|
|
107
|
+
rowGrounds,
|
|
108
|
+
sortRows,
|
|
109
|
+
sortableColumnIds,
|
|
110
|
+
tableWidths,
|
|
111
|
+
treeChildCounts,
|
|
112
|
+
visibleColumns,
|
|
113
|
+
visibleInlineRows,
|
|
114
|
+
visibleRows
|
|
115
|
+
} from "./chunk-IZ35GMGB.js";
|
|
116
|
+
import {
|
|
117
|
+
tableCellNodeId
|
|
118
|
+
} from "./chunk-M4SPKUZE.js";
|
|
119
|
+
import {
|
|
120
|
+
lastObservedIndex
|
|
121
|
+
} from "./chunk-NYEY6W5R.js";
|
|
122
|
+
import {
|
|
123
|
+
ENGINE_NOTES,
|
|
124
|
+
LABEL_WRAP_FLOOR,
|
|
125
|
+
SOFT_LABEL_CAP,
|
|
126
|
+
browserSlack,
|
|
127
|
+
cellPadX,
|
|
128
|
+
changeLineFitFont,
|
|
129
|
+
kindFont,
|
|
130
|
+
pinnedColumns,
|
|
131
|
+
rowFont,
|
|
132
|
+
tableFonts,
|
|
133
|
+
trackTemplate,
|
|
134
|
+
trackTotal
|
|
135
|
+
} from "./chunk-QNHZXFRA.js";
|
|
136
|
+
import {
|
|
137
|
+
hasPolarityBadge,
|
|
138
|
+
isFigureCell,
|
|
139
|
+
polarityBadgeInk
|
|
140
|
+
} from "./chunk-A3ULWR5N.js";
|
|
141
|
+
import {
|
|
142
|
+
DEFAULT_EMPTY_MESSAGE,
|
|
143
|
+
hasNoDataRows
|
|
144
|
+
} from "./chunk-F77BNDAT.js";
|
|
145
|
+
import {
|
|
146
|
+
resolvePaint
|
|
147
|
+
} from "./chunk-2JAWQ7VV.js";
|
|
148
|
+
import {
|
|
149
|
+
chartRefusals,
|
|
150
|
+
isSizeDependentRefusal,
|
|
151
|
+
optionRefusals,
|
|
152
|
+
refusalFindings
|
|
153
|
+
} from "./chunk-DCCJRLAJ.js";
|
|
154
|
+
import {
|
|
155
|
+
canvasMargin,
|
|
156
|
+
textScaleOf
|
|
157
|
+
} from "./chunk-II7652VA.js";
|
|
158
|
+
import {
|
|
159
|
+
DeferredCoreError,
|
|
160
|
+
asFirstFrame
|
|
161
|
+
} from "./chunk-2MTWKMEG.js";
|
|
162
|
+
import {
|
|
163
|
+
resolveCanvasOptions,
|
|
164
|
+
resolveSize
|
|
165
|
+
} from "./chunk-SGD3ZHID.js";
|
|
166
|
+
import {
|
|
167
|
+
defaultMeasurer,
|
|
168
|
+
splitNameBreaks
|
|
169
|
+
} from "./chunk-TXINIAFL.js";
|
|
170
|
+
|
|
171
|
+
// src/react/TableChart.tsx
|
|
172
|
+
import {
|
|
173
|
+
createContext,
|
|
174
|
+
memo,
|
|
175
|
+
useCallback as useCallback2,
|
|
176
|
+
useContext,
|
|
177
|
+
useEffect as useEffect2,
|
|
178
|
+
useImperativeHandle,
|
|
179
|
+
useMemo as useMemo2,
|
|
180
|
+
useRef as useRef3,
|
|
181
|
+
useState as useState3,
|
|
182
|
+
useSyncExternalStore
|
|
183
|
+
} from "react";
|
|
184
|
+
|
|
185
|
+
// src/core/charts/table/sticky.ts
|
|
186
|
+
function stickySettings(value) {
|
|
187
|
+
if (value === void 0 || value === !1) return { on: !1, head: !1, columns: 0, top: 0, sections: !1 };
|
|
188
|
+
if (typeof value == "object") {
|
|
189
|
+
let head = value.head === void 0 ? "table" : value.head, columns2 = Math.max(0, Math.floor(value.columns ?? 1)), sections = value.sections === !0;
|
|
190
|
+
return { on: columns2 > 0 || head !== !1 || sections, head, columns: columns2, top: head === "page" ? Math.max(0, value.top ?? 0) : 0, sections };
|
|
191
|
+
}
|
|
192
|
+
let columns = value === !0 ? 1 : Math.max(0, Math.floor(value));
|
|
193
|
+
return { on: columns > 0, head: "table", columns, top: 0, sections: !1 };
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
// src/react/rowsGate.tsx
|
|
197
|
+
import { jsx } from "react/jsx-runtime";
|
|
198
|
+
function useRowsGate(spec, props, frame) {
|
|
199
|
+
let mapped = useRowsInput(spec, props);
|
|
200
|
+
if (props.rows === void 0 && props.columns === void 0) return { data: spec.data };
|
|
201
|
+
let options = { ...frame, size: frame.size === "container" ? frame.fallbackSize : frame.size };
|
|
202
|
+
return mapped.refusals.length ? { element: /* @__PURE__ */ jsx(LayoutRefusal, { refusals: mapped.refusals, theme: frame.theme, options }) } : mapped.data === void 0 ? { element: /* @__PURE__ */ jsx(LoadingPlaceholder, { theme: frame.theme, failure: mapped.failure, options }) } : { data: mapped.data };
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
// src/react/hover/TableHoverFrame.tsx
|
|
206
|
+
import { useEffect, useMemo, useRef, useState } from "react";
|
|
207
|
+
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
208
|
+
function cellKey(rowId, columnId) {
|
|
209
|
+
return JSON.stringify([rowId, columnId]);
|
|
210
|
+
}
|
|
211
|
+
function drawnRecords(source, rows, columns) {
|
|
212
|
+
let rowIds = new Set(rows.map((row) => row.id)), colIds = new Set(columns.map((column) => column.id));
|
|
213
|
+
return source.filter((record) => {
|
|
214
|
+
let { rowId, colId } = record.target.owner;
|
|
215
|
+
return rowId !== void 0 && colId !== void 0 && rowIds.has(rowId) && colIds.has(colId);
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
function portalTarget(portal) {
|
|
219
|
+
return portal === !1 ? void 0 : portal || (typeof document > "u" ? void 0 : document.body || void 0);
|
|
220
|
+
}
|
|
221
|
+
function clientBox(element) {
|
|
222
|
+
let box = element.getBoundingClientRect(), { offsetWidth, offsetHeight } = element, sx = offsetWidth ? box.width / offsetWidth : 1, sy = offsetHeight ? box.height / offsetHeight : 1, x = box.left + element.clientLeft * sx, y = box.top + element.clientTop * sy;
|
|
223
|
+
return {
|
|
224
|
+
x,
|
|
225
|
+
y,
|
|
226
|
+
right: x + element.clientWidth * sx,
|
|
227
|
+
bottom: y + element.clientHeight * sy,
|
|
228
|
+
sx,
|
|
229
|
+
sy
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
function cellPosition(cell, container, portal, visibleIds) {
|
|
233
|
+
let document2 = cell.ownerDocument, view = document2.defaultView, viewport = {
|
|
234
|
+
left: 8,
|
|
235
|
+
top: 8,
|
|
236
|
+
right: (document2.documentElement.clientWidth || view.innerWidth) - 8,
|
|
237
|
+
bottom: (document2.documentElement.clientHeight || view.innerHeight) - 8
|
|
238
|
+
}, { left, top, right, bottom } = viewport, isVisible = (element) => (!visibleIds || (element.dataset.bpRow === void 0 || visibleIds.rows.has(element.dataset.bpRow)) && (element.dataset.bpColumn === void 0 || visibleIds.columns.has(element.dataset.bpColumn))) && !element.closest('[hidden],[aria-hidden="true"]');
|
|
239
|
+
if (!isVisible(cell)) return;
|
|
240
|
+
for (let ancestor = cell.closest(".bp-scroll") ?? cell.closest(".bp-table-grid") ?? cell.parentElement; ancestor; ancestor = ancestor.parentElement) {
|
|
241
|
+
let style = view.getComputedStyle(ancestor);
|
|
242
|
+
if ([style.overflow, style.overflowX, style.overflowY].some((value) => value && value !== "visible")) {
|
|
243
|
+
let box2 = clientBox(ancestor);
|
|
244
|
+
left = Math.max(left, box2.x), top = Math.max(top, box2.y), right = Math.min(right, box2.right), bottom = Math.min(bottom, box2.bottom);
|
|
245
|
+
}
|
|
246
|
+
if (ancestor === portal) break;
|
|
247
|
+
}
|
|
248
|
+
let box = cell.getBoundingClientRect();
|
|
249
|
+
if (!cell.isConnected || Math.min(right - left, bottom - top, box.width, box.height) <= 0 || box.right <= left || box.left >= right || box.bottom <= top || box.top >= bottom) return;
|
|
250
|
+
let positioned = (element) => {
|
|
251
|
+
let { position, transform } = view.getComputedStyle(element);
|
|
252
|
+
return position && position !== "static" || transform && transform !== "none";
|
|
253
|
+
}, block = positioned(container) ? container : container.offsetParent, origin = { x: -view.scrollX, y: -view.scrollY, sx: 1, sy: 1 };
|
|
254
|
+
block && block !== document2.documentElement && (block !== document2.body || positioned(block)) && (origin = clientBox(block), origin.x -= block.scrollLeft * origin.sx, origin.y -= block.scrollTop * origin.sy), "showPopover" in cell && (origin = { x: 0, y: 0, sx: 1, sy: 1 });
|
|
255
|
+
let { sx, sy } = origin, cells = /* @__PURE__ */ new Map(), rowBounds = /* @__PURE__ */ new Map(), occupied = [], range = document2.createRange(), x1 = right, y1 = bottom, x2 = left, y2 = top, local = (box2) => ({
|
|
256
|
+
x: (box2.left - viewport.left) / sx,
|
|
257
|
+
y: (box2.top - viewport.top) / sy,
|
|
258
|
+
w: (box2.right - box2.left) / sx,
|
|
259
|
+
h: (box2.bottom - box2.top) / sy
|
|
260
|
+
});
|
|
261
|
+
for (let element of Array.from(cell.closest(".bp-table-grid")?.querySelectorAll('[data-bp-row][data-bp-column],[role="columnheader"]') ?? [])) {
|
|
262
|
+
if (!isVisible(element)) continue;
|
|
263
|
+
let box2 = element.getBoundingClientRect(), visible = {
|
|
264
|
+
left: Math.max(left, box2.left),
|
|
265
|
+
top: Math.max(top, box2.top),
|
|
266
|
+
right: Math.min(right, box2.right),
|
|
267
|
+
bottom: Math.min(bottom, box2.bottom)
|
|
268
|
+
};
|
|
269
|
+
if (visible.right <= visible.left || visible.bottom <= visible.top) continue;
|
|
270
|
+
let rect = local(visible);
|
|
271
|
+
cells.set(element, rect), x1 = Math.min(x1, visible.left), y1 = Math.min(y1, visible.top), x2 = Math.max(x2, visible.right), y2 = Math.max(y2, visible.bottom);
|
|
272
|
+
let rowId = element.dataset.bpRow;
|
|
273
|
+
if (rowId !== void 0) {
|
|
274
|
+
let row = rowBounds.get(rowId) ?? [];
|
|
275
|
+
row.push(rect), rowBounds.set(rowId, row);
|
|
276
|
+
}
|
|
277
|
+
let walker = document2.createTreeWalker(
|
|
278
|
+
element,
|
|
279
|
+
4
|
|
280
|
+
/* SHOW_TEXT */
|
|
281
|
+
), textBounds;
|
|
282
|
+
for (let node = walker.nextNode(); node; node = walker.nextNode())
|
|
283
|
+
if (node.textContent?.trim()) {
|
|
284
|
+
range.selectNodeContents(node);
|
|
285
|
+
for (let text of Array.from(range.getClientRects?.() ?? [])) {
|
|
286
|
+
let clipped = {
|
|
287
|
+
left: Math.max(visible.left, text.left),
|
|
288
|
+
top: Math.max(visible.top, text.top),
|
|
289
|
+
right: Math.min(visible.right, text.right),
|
|
290
|
+
bottom: Math.min(visible.bottom, text.bottom)
|
|
291
|
+
};
|
|
292
|
+
clipped.right > clipped.left && clipped.bottom > clipped.top && (textBounds = textBounds ? {
|
|
293
|
+
left: Math.min(textBounds.left, clipped.left),
|
|
294
|
+
top: Math.min(textBounds.top, clipped.top),
|
|
295
|
+
right: Math.max(textBounds.right, clipped.right),
|
|
296
|
+
bottom: Math.max(textBounds.bottom, clipped.bottom)
|
|
297
|
+
} : clipped);
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
textBounds && occupied.push({ rect: local(textBounds), kind: "label", owner: { rowId, colId: element.dataset.bpColumn } });
|
|
301
|
+
}
|
|
302
|
+
return {
|
|
303
|
+
cells,
|
|
304
|
+
rowBounds,
|
|
305
|
+
occupied,
|
|
306
|
+
tableBounds: cells.size ? local({ left: x1, top: y1, right: x2, bottom: y2 }) : void 0,
|
|
307
|
+
anchor: local(box),
|
|
308
|
+
frame: { w: (viewport.right - viewport.left) / sx, h: (viewport.bottom - viewport.top) / sy },
|
|
309
|
+
offset: { x: (viewport.left - origin.x) / sx, y: (viewport.top - origin.y) / sy },
|
|
310
|
+
scale: { x: sx, y: sy }
|
|
311
|
+
};
|
|
312
|
+
}
|
|
313
|
+
function tableWidth(table, request) {
|
|
314
|
+
if (request.options.size !== void 0) return request.size.width;
|
|
315
|
+
let resolved = table.columns.reduce((sum, column) => sum + (column.width ?? 0), 0);
|
|
316
|
+
return resolved > 0 ? resolved : request.size.width;
|
|
317
|
+
}
|
|
318
|
+
function TableHoverFrame({ table, rows, columns, request, theme, initialPrepared, refused, portal, flags, styleNonce, inlineVisibility, children }) {
|
|
319
|
+
let { direction } = useBoardplotTheme(), engine = useHoverEngine(), target = portalTarget(portal), frameRef = useRef(null), touch = useRef(void 0), visibleIds = useMemo(() => ({ rows: new Set(rows.map((row2) => row2.id)), columns: new Set(columns.map((column) => column.id)) }), [rows, columns]), revision = useMemo(() => ({}), [table, rows, columns, theme, request, inlineVisibility, children]), [activeCell, setActiveCell] = useState(void 0), activeRef = useRef(activeCell);
|
|
320
|
+
activeRef.current = activeCell, useEffect(() => {
|
|
321
|
+
let selectedCell = activeRef.current?.cell;
|
|
322
|
+
if (!selectedCell) return;
|
|
323
|
+
let document2 = selectedCell.ownerDocument, view = document2.defaultView, pending, close = () => {
|
|
324
|
+
touch.current = void 0, setActiveCell(void 0);
|
|
325
|
+
}, escape = (event) => {
|
|
326
|
+
event.key === "Escape" && close();
|
|
327
|
+
}, outside = (event) => {
|
|
328
|
+
frameRef.current?.contains(event.target) || close();
|
|
329
|
+
}, update = () => {
|
|
330
|
+
pending === void 0 && (pending = view.requestAnimationFrame(() => {
|
|
331
|
+
pending = void 0;
|
|
332
|
+
let cell2 = activeRef.current?.cell, position = cell2 && cellPosition(cell2, target ?? frameRef.current, target, visibleIds);
|
|
333
|
+
setActiveCell((current) => current && position ? { ...current, ...position, revision } : void 0);
|
|
334
|
+
}));
|
|
335
|
+
};
|
|
336
|
+
document2.addEventListener("keydown", escape), document2.addEventListener("pointerdown", outside, !0), document2.addEventListener("pointercancel", close), view.addEventListener("scroll", update, { capture: !0, passive: !0 }), view.addEventListener("resize", update);
|
|
337
|
+
let observer = typeof ResizeObserver > "u" ? void 0 : new ResizeObserver(update);
|
|
338
|
+
return frameRef.current && observer?.observe(frameRef.current), activeRef.current?.revision !== revision && update(), document2.fonts?.addEventListener("loadingdone", update), () => {
|
|
339
|
+
document2.removeEventListener("keydown", escape), document2.removeEventListener("pointerdown", outside, !0), document2.removeEventListener("pointercancel", close), view.removeEventListener("scroll", update, !0), view.removeEventListener("resize", update), observer?.disconnect(), document2.fonts?.removeEventListener("loadingdone", update), pending !== void 0 && view.cancelAnimationFrame(pending);
|
|
340
|
+
};
|
|
341
|
+
}, [activeCell !== void 0, target, visibleIds, revision]);
|
|
342
|
+
let records = useMemo(() => {
|
|
343
|
+
let cached;
|
|
344
|
+
return () => cached ??= engine ? drawnRecords(initialPrepared?.records ?? engine.tableRecords(table, request.data, request.scope, request.options), rows, columns) : [];
|
|
345
|
+
}, [engine, initialPrepared, table, request.data, request.scope, request.options, rows, columns]), byCell = useMemo(() => {
|
|
346
|
+
let cached;
|
|
347
|
+
return () => cached ??= new Map(records().flatMap((record) => {
|
|
348
|
+
let { rowId, colId } = record.target.owner;
|
|
349
|
+
return rowId !== void 0 && colId !== void 0 ? [[cellKey(rowId, colId), record]] : [];
|
|
350
|
+
}));
|
|
351
|
+
}, [records]), instance = useScopedId(), active = refused || activeCell === void 0 ? void 0 : records().find((record) => record.id === activeCell.id), locale = request.locale?.language, activate = (event) => openCell(event.target, event.currentTarget, { x: event.clientX, y: event.clientY }), openCell = (from, frame, at) => {
|
|
352
|
+
let cell2 = from instanceof Element ? from.closest("[data-bp-row][data-bp-column]") : null, rowId = cell2?.dataset.bpRow, columnId = cell2?.dataset.bpColumn, record = rowId === void 0 || columnId === void 0 ? void 0 : byCell().get(cellKey(rowId, columnId));
|
|
353
|
+
if (!record || !cell2) {
|
|
354
|
+
setActiveCell(void 0);
|
|
355
|
+
return;
|
|
356
|
+
}
|
|
357
|
+
if (cell2 === activeCell?.cell) return;
|
|
358
|
+
let cached = activeCell?.revision === revision && activeCell.cells.get(cell2), position = cached ? { ...activeCell, anchor: cached } : cellPosition(cell2, target ?? frame, target, visibleIds), box = at ? void 0 : cell2.getBoundingClientRect(), pointer = at ?? { x: box.left + box.width / 2, y: box.top + box.height / 2 };
|
|
359
|
+
setActiveCell(position ? { ...position, id: record.id, cell: cell2, revision, pointer } : void 0);
|
|
360
|
+
}, moveTouch = (event) => {
|
|
361
|
+
let start = touch.current;
|
|
362
|
+
start && start.id === event.pointerId && Math.hypot(event.clientX - start.x, event.clientY - start.y) > 8 && (touch.current = void 0, setActiveCell(void 0));
|
|
363
|
+
}, owner = active?.target.owner, mark = owner?.rowId !== void 0 && owner.colId !== void 0 ? `${encodeURIComponent(owner.rowId)}:${encodeURIComponent(owner.colId)}` : void 0, cell = activeCell?.cell, row = cell?.closest('[role="row"]');
|
|
364
|
+
useIsomorphicLayoutEffect(() => {
|
|
365
|
+
if (!(!row || owner?.rowId === void 0))
|
|
366
|
+
return row.setAttribute("data-bp-active-row", owner.rowId), () => row.removeAttribute("data-bp-active-row");
|
|
367
|
+
}, [row, owner?.rowId]), useIsomorphicLayoutEffect(() => {
|
|
368
|
+
if (!(!cell || mark === void 0))
|
|
369
|
+
return cell.setAttribute("data-bp-active", mark), () => cell.removeAttribute("data-bp-active");
|
|
370
|
+
}, [cell, mark]);
|
|
371
|
+
let scope = `.bp-hover-table[data-bp-instance="${instance}"]`, rowRule = `${scope} .bp-table-grid [role="row"][data-bp-active-row]>*{background:var(--bp-hover-wash)}`, cellRule = `${scope} .bp-table-grid [data-bp-active]{background:var(--bp-band)}`, css = useMemo(() => ({ __html: ((flags.highlight ? rowRule : "") + (flags.card === "sparkline" ? cellRule : "")).replace(/</g, "\\3c ") }), [flags.highlight, flags.card, rowRule, cellRule]);
|
|
372
|
+
return /* @__PURE__ */ jsxs(
|
|
373
|
+
"div",
|
|
374
|
+
{
|
|
375
|
+
ref: frameRef,
|
|
376
|
+
className: "bp-hover-table",
|
|
377
|
+
"data-bp-hover": "",
|
|
378
|
+
"data-bp-instance": instance,
|
|
379
|
+
style: { position: "relative" },
|
|
380
|
+
onPointerOver: (event) => {
|
|
381
|
+
event.pointerType !== "touch" && activate(event);
|
|
382
|
+
},
|
|
383
|
+
onPointerDown: (event) => {
|
|
384
|
+
event.pointerType === "touch" && (touch.current = { id: event.pointerId, x: event.clientX, y: event.clientY });
|
|
385
|
+
},
|
|
386
|
+
onPointerMove: moveTouch,
|
|
387
|
+
onPointerUp: (event) => {
|
|
388
|
+
moveTouch(event), event.pointerType === "touch" && touch.current?.id === event.pointerId && activate(event), touch.current = void 0;
|
|
389
|
+
},
|
|
390
|
+
onPointerCancel: () => {
|
|
391
|
+
touch.current = void 0, setActiveCell(void 0);
|
|
392
|
+
},
|
|
393
|
+
onPointerLeave: (event) => {
|
|
394
|
+
event.pointerType !== "touch" && setActiveCell(void 0);
|
|
395
|
+
},
|
|
396
|
+
onFocus: (event) => openCell(event.target, event.currentTarget),
|
|
397
|
+
onBlur: (event) => {
|
|
398
|
+
(!(event.relatedTarget instanceof Node) || !event.currentTarget.contains(event.relatedTarget)) && setActiveCell(void 0);
|
|
399
|
+
},
|
|
400
|
+
children: [
|
|
401
|
+
/* @__PURE__ */ jsx2("style", { nonce: styleNonce, dangerouslySetInnerHTML: css }),
|
|
402
|
+
children,
|
|
403
|
+
engine && active && activeCell && flags.card !== !1 ? /* @__PURE__ */ jsx2(
|
|
404
|
+
engine.TableCard,
|
|
405
|
+
{
|
|
406
|
+
record: active,
|
|
407
|
+
width: tableWidth(table, request),
|
|
408
|
+
theme,
|
|
409
|
+
palette: request.options.palette,
|
|
410
|
+
locale,
|
|
411
|
+
measure: request.fontMetrics,
|
|
412
|
+
direction,
|
|
413
|
+
anchor: activeCell.anchor,
|
|
414
|
+
frame: activeCell.frame,
|
|
415
|
+
pointer: { x: (activeCell.pointer.x - 8) / activeCell.scale.x, y: (activeCell.pointer.y - 8) / activeCell.scale.y },
|
|
416
|
+
occupied: activeCell.occupied,
|
|
417
|
+
forbidden: activeCell.rowBounds.get(owner.rowId),
|
|
418
|
+
tableBounds: activeCell.tableBounds,
|
|
419
|
+
styleNonce,
|
|
420
|
+
variant: flags.card,
|
|
421
|
+
table,
|
|
422
|
+
columns,
|
|
423
|
+
inlineVisibility,
|
|
424
|
+
smallValues: request.options.smallValues,
|
|
425
|
+
container: target ?? frameRef.current ?? void 0,
|
|
426
|
+
offset: activeCell.offset
|
|
427
|
+
}
|
|
428
|
+
) : null
|
|
429
|
+
]
|
|
430
|
+
}
|
|
431
|
+
);
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
// src/react/tableGrid.ts
|
|
435
|
+
import {
|
|
436
|
+
useCallback,
|
|
437
|
+
useRef as useRef2,
|
|
438
|
+
useState as useState2
|
|
439
|
+
} from "react";
|
|
440
|
+
function columnsForRow(row, columns) {
|
|
441
|
+
if (row.role !== "section") return columns;
|
|
442
|
+
let label = columns.find((column) => column.kind === "rowLabel");
|
|
443
|
+
return label === void 0 ? columns.slice(0, 1) : [label];
|
|
444
|
+
}
|
|
445
|
+
function initialTableGridFocus(rows, columns) {
|
|
446
|
+
for (let row of rows) {
|
|
447
|
+
let first = columnsForRow(row, columns)[0];
|
|
448
|
+
if (first !== void 0) return { rowId: row.id, colId: first.id };
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
function retainTableGridFocus(focus, rows, columns, allRows = rows) {
|
|
452
|
+
if (focus === void 0) return initialTableGridFocus(rows, columns);
|
|
453
|
+
let row = rows.find((candidate) => candidate.id === focus.rowId);
|
|
454
|
+
if (row === void 0) {
|
|
455
|
+
let parentId = allRows.find((candidate) => candidate.id === focus.rowId)?.parentId;
|
|
456
|
+
for (; parentId !== void 0; ) {
|
|
457
|
+
let id = parentId;
|
|
458
|
+
if (rows.some((candidate) => candidate.id === id)) return retainTableGridFocus({ rowId: id, colId: focus.colId }, rows, columns);
|
|
459
|
+
parentId = allRows.find((candidate) => candidate.id === id)?.parentId;
|
|
460
|
+
}
|
|
461
|
+
return initialTableGridFocus(rows, columns);
|
|
462
|
+
}
|
|
463
|
+
let cols = columnsForRow(row, columns);
|
|
464
|
+
if (cols.some((column) => column.id === focus.colId)) return focus;
|
|
465
|
+
let order = Object.keys(row.cells), from = order.indexOf(focus.colId), visible = new Set(cols.map((column) => column.id)), fallback;
|
|
466
|
+
for (let distance = 1; from >= 0 && fallback === void 0 && distance < order.length; distance++)
|
|
467
|
+
for (let id of [order[from - distance], order[from + distance]])
|
|
468
|
+
if (id !== void 0 && visible.has(id)) {
|
|
469
|
+
fallback = cols.find((column) => column.id === id);
|
|
470
|
+
break;
|
|
471
|
+
}
|
|
472
|
+
return fallback ??= cols[0], fallback === void 0 ? initialTableGridFocus(rows, columns) : { rowId: row.id, colId: fallback.id };
|
|
473
|
+
}
|
|
474
|
+
function stepTableGridFocus(focus, rows, columns, key, pageRows = 1, control = !1) {
|
|
475
|
+
let rowIndex = rows.findIndex((row2) => row2.id === focus.rowId);
|
|
476
|
+
if (rowIndex < 0) return focus;
|
|
477
|
+
let row = rows[rowIndex], cols = columnsForRow(row, columns), colIndex = cols.findIndex((column) => column.id === focus.colId);
|
|
478
|
+
if (colIndex < 0) return focus;
|
|
479
|
+
if (control && (key === "Home" || key === "End")) {
|
|
480
|
+
let edge = rows[key === "Home" ? 0 : rows.length - 1], edgeCols = columnsForRow(edge, columns);
|
|
481
|
+
return { rowId: edge.id, colId: edgeCols[key === "Home" ? 0 : edgeCols.length - 1].id };
|
|
482
|
+
}
|
|
483
|
+
if (key === "ArrowLeft" || key === "Home") {
|
|
484
|
+
let next = key === "Home" ? cols[0] : cols[colIndex - 1];
|
|
485
|
+
return next === void 0 ? focus : { rowId: row.id, colId: next.id };
|
|
486
|
+
}
|
|
487
|
+
if (key === "ArrowRight" || key === "End") {
|
|
488
|
+
let next = key === "End" ? cols[cols.length - 1] : cols[colIndex + 1];
|
|
489
|
+
return next === void 0 ? focus : { rowId: row.id, colId: next.id };
|
|
490
|
+
}
|
|
491
|
+
if (!["ArrowUp", "ArrowDown", "PageUp", "PageDown"].includes(key)) return focus;
|
|
492
|
+
let distance = key.startsWith("Page") ? pageRows : 1, nextRow = rows[Math.max(0, Math.min(rows.length - 1, rowIndex + (key.endsWith("Up") ? -distance : distance)))];
|
|
493
|
+
if (nextRow === void 0) return focus;
|
|
494
|
+
let nextCols = columnsForRow(nextRow, columns), same = nextCols.find((column) => column.id === focus.colId), fallback = nextCols[0];
|
|
495
|
+
return same === void 0 && fallback === void 0 ? focus : { rowId: nextRow.id, colId: (same ?? fallback).id };
|
|
496
|
+
}
|
|
497
|
+
function isTableGridKey(key) {
|
|
498
|
+
return ["ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown", "Home", "End", "PageUp", "PageDown"].includes(key);
|
|
499
|
+
}
|
|
500
|
+
function cellSelector(focus) {
|
|
501
|
+
let key = `${encodeURIComponent(focus.rowId)}:${encodeURIComponent(focus.colId)}`;
|
|
502
|
+
return `[data-bp-label="${key}"],[data-bp-mark="${key}"]`;
|
|
503
|
+
}
|
|
504
|
+
function useTableGridNavigation(rows, columns, allRows = rows) {
|
|
505
|
+
let tableRef = useRef2(null), activeCell = useRef2(void 0), activeToggle = useRef2(!1), pending = useRef2(void 0), [focus, setFocus] = useState2(
|
|
506
|
+
() => initialTableGridFocus(rows, columns)
|
|
507
|
+
), current = retainTableGridFocus(focus, rows, columns, allRows);
|
|
508
|
+
(current?.rowId !== focus?.rowId || current?.colId !== focus?.colId) && setFocus(current);
|
|
509
|
+
let onKeyDown = useCallback(
|
|
510
|
+
(event) => {
|
|
511
|
+
let control = event.ctrlKey || event.metaKey;
|
|
512
|
+
if (event.defaultPrevented || event.altKey || event.shiftKey || control && event.key !== "Home" && event.key !== "End" || !isTableGridKey(event.key) || current === void 0) return;
|
|
513
|
+
let from = event.target;
|
|
514
|
+
if (from instanceof Element && from.closest("[data-bp-row][data-bp-column]") === null) return;
|
|
515
|
+
let pageRows = 1;
|
|
516
|
+
if (event.key.startsWith("Page") && from instanceof Element) {
|
|
517
|
+
let scroller = from.closest(".bp-scroll"), view = from.ownerDocument.defaultView, top = 0, bottom = view.innerHeight;
|
|
518
|
+
for (let ancestor = scroller; ancestor; ancestor = ancestor.parentElement) {
|
|
519
|
+
let overflow = view.getComputedStyle(ancestor).overflowY;
|
|
520
|
+
if (ancestor.clientHeight <= 0 || ancestor !== scroller && (!overflow || overflow === "visible")) continue;
|
|
521
|
+
let box = ancestor.getBoundingClientRect(), scale = ancestor.offsetHeight > 0 ? box.height / ancestor.offsetHeight : 1, edge = box.top + ancestor.clientTop * scale;
|
|
522
|
+
top = Math.max(top, edge), bottom = Math.min(bottom, edge + ancestor.clientHeight * scale);
|
|
523
|
+
}
|
|
524
|
+
let rowHeight = from.closest('[role="row"]')?.getBoundingClientRect().height ?? 0, head = tableRef.current?.querySelector('[data-bp-rowgroup="head"]')?.getBoundingClientRect(), headHeight = head === void 0 ? 0 : Math.max(0, Math.min(bottom, head.bottom) - Math.max(top, head.top));
|
|
525
|
+
pageRows = Math.max(1, Math.floor((bottom - top - headHeight) / (rowHeight || 1)));
|
|
526
|
+
}
|
|
527
|
+
let next = stepTableGridFocus(current, rows, columns, event.key, pageRows, control), fromHeader = from instanceof Element && from.closest('[role="rowheader"]') !== null;
|
|
528
|
+
if (event.key === "ArrowRight" && fromHeader) {
|
|
529
|
+
let child = rows.find((row) => row.parentId === current.rowId);
|
|
530
|
+
child !== void 0 && (next = { rowId: child.id, colId: columnsForRow(child, columns)[0].id });
|
|
531
|
+
}
|
|
532
|
+
if (event.key === "ArrowLeft" && (next === current || fromHeader)) {
|
|
533
|
+
let parentId = rows.find((row) => row.id === current.rowId)?.parentId, parent = rows.find((row) => row.id === parentId);
|
|
534
|
+
parent !== void 0 && (next = { rowId: parent.id, colId: fromHeader ? current.colId : columnsForRow(parent, columns)[0].id });
|
|
535
|
+
}
|
|
536
|
+
event.preventDefault(), setFocus(next);
|
|
537
|
+
let node = tableRef.current?.querySelector(cellSelector(next));
|
|
538
|
+
node instanceof HTMLElement ? node.focus() : pending.current = next;
|
|
539
|
+
},
|
|
540
|
+
[columns, current, rows]
|
|
541
|
+
);
|
|
542
|
+
useIsomorphicLayoutEffect(() => {
|
|
543
|
+
let queued = pending.current, active = activeCell.current, folded = queued === void 0 && active !== void 0 && current !== void 0 && active.getAttribute("data-bp-row") !== current.rowId && (active.isConnected ? active.contains(document.activeElement) : document.activeElement === document.body) && !rows.some((row) => row.id === active.getAttribute("data-bp-row")), next = queued ?? (folded || active !== void 0 && !active.isConnected && document.activeElement === document.body ? current : void 0);
|
|
544
|
+
if (next === void 0) return;
|
|
545
|
+
pending.current = void 0;
|
|
546
|
+
let node = tableRef.current?.querySelector(cellSelector(next)), target = (folded && activeToggle.current ? node?.querySelector("[data-bp-toggle-row]") : null) ?? node;
|
|
547
|
+
target instanceof HTMLElement && target.focus({ preventScroll: queued === void 0 && !folded });
|
|
548
|
+
});
|
|
549
|
+
let onFocusCapture = useCallback((event) => {
|
|
550
|
+
activeCell.current = void 0;
|
|
551
|
+
let target = event.target;
|
|
552
|
+
if (!(target instanceof Element)) return;
|
|
553
|
+
let cell = target.closest("[data-bp-row][data-bp-column]"), rowId = cell?.getAttribute("data-bp-row"), colId = cell?.getAttribute("data-bp-column");
|
|
554
|
+
rowId == null || colId === null || colId === void 0 || (activeCell.current = cell ?? void 0, activeToggle.current = target.closest("[data-bp-toggle-row]") !== null, setFocus(
|
|
555
|
+
(prev) => prev?.rowId === rowId && prev.colId === colId ? prev : { rowId, colId }
|
|
556
|
+
));
|
|
557
|
+
}, []), onBlurCapture = useCallback((event) => {
|
|
558
|
+
(!(event.relatedTarget instanceof Node) || !event.currentTarget.contains(event.relatedTarget)) && (activeCell.current = void 0);
|
|
559
|
+
}, []);
|
|
560
|
+
return { focus: current, tableRef, onKeyDown, onFocusCapture, onBlurCapture };
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
// src/react/TableChart.tsx
|
|
564
|
+
import { Fragment, jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
565
|
+
var WINDOW_COLUMNS = 40, WINDOW_BLOCK = 8, ROW_PAGE = 64, LITE_BLOCK = 32;
|
|
566
|
+
function isColumnSort(value) {
|
|
567
|
+
return typeof value == "object" && value !== null && "column" in value;
|
|
568
|
+
}
|
|
569
|
+
function eventColumn(event) {
|
|
570
|
+
let cell = event.target instanceof Element ? event.target.closest("[data-bp-column]") : null;
|
|
571
|
+
return cell !== null && event.currentTarget.contains(cell) ? cell.getAttribute("data-bp-column") ?? void 0 : void 0;
|
|
572
|
+
}
|
|
573
|
+
var styleRegistry = /* @__PURE__ */ new WeakMap(), SAFE_HREF = /^(?:https?:\/\/|mailto:|#)/i;
|
|
574
|
+
function encodeStructuralIds(ids) {
|
|
575
|
+
return `${ids.length}:${ids.map((id) => `${id.length}:${id}`).join("")}`;
|
|
576
|
+
}
|
|
577
|
+
var TableFloorRequestContext = createContext(void 0), measureContext, measuredWidths = /* @__PURE__ */ new Map(), measuredDigits = /* @__PURE__ */ new Map(), noSubscription = () => () => {
|
|
578
|
+
};
|
|
579
|
+
function canvasTextWidth() {
|
|
580
|
+
if (typeof document > "u" || typeof HTMLCanvasElement > "u" || document.fonts === void 0) return;
|
|
581
|
+
try {
|
|
582
|
+
measureContext ??= document.createElement("canvas").getContext("2d") ?? void 0;
|
|
583
|
+
} catch {
|
|
584
|
+
return;
|
|
585
|
+
}
|
|
586
|
+
let context = measureContext;
|
|
587
|
+
if (context === void 0 || typeof context.measureText != "function") return;
|
|
588
|
+
let cache = measuredWidths, digits = measuredDigits;
|
|
589
|
+
return cache.size > 5e4 && cache.clear(), (text, font) => {
|
|
590
|
+
let face = `${font.weight ?? 400} ${font.size}px ${font.family ?? "sans-serif"}`, key = `${face}\0${font.letterSpacing ?? 0}\0${font.tabular === !0}\0${text}`, hit = cache.get(key);
|
|
591
|
+
if (hit !== void 0) return hit;
|
|
592
|
+
context.font = face;
|
|
593
|
+
let width = context.measureText(text).width + (font.letterSpacing ?? 0) * Math.max(0, text.length - 1);
|
|
594
|
+
if (font.tabular === !0 && /[0-9]/.test(text)) {
|
|
595
|
+
let advances = digits.get(face);
|
|
596
|
+
advances === void 0 && (advances = [..."0123456789"].map((digit) => context.measureText(digit).width), digits.set(face, advances));
|
|
597
|
+
let widest = Math.max(...advances);
|
|
598
|
+
for (let character of text)
|
|
599
|
+
character >= "0" && character <= "9" && (width += widest - advances[character.charCodeAt(0) - 48]);
|
|
600
|
+
}
|
|
601
|
+
return cache.set(key, width), width;
|
|
602
|
+
};
|
|
603
|
+
}
|
|
604
|
+
function canvasWidthsMoved() {
|
|
605
|
+
let context = measureContext;
|
|
606
|
+
if (context === void 0 || measuredWidths.size === 0) return !0;
|
|
607
|
+
let step = Math.max(1, Math.floor(measuredWidths.size / 64)), index = 0;
|
|
608
|
+
for (let [key, width] of measuredWidths) {
|
|
609
|
+
if (index++ % step !== 0) continue;
|
|
610
|
+
let [face, spacing, tabular, text] = key.split("\0");
|
|
611
|
+
context.font = face;
|
|
612
|
+
let fresh = context.measureText(text).width + Number(spacing) * Math.max(0, text.length - 1);
|
|
613
|
+
if (tabular === "true" && /[0-9]/.test(text)) {
|
|
614
|
+
let advances = [..."0123456789"].map((digit) => context.measureText(digit).width), widest = Math.max(...advances);
|
|
615
|
+
for (let character of text) character >= "0" && character <= "9" && (fresh += widest - advances[character.charCodeAt(0) - 48]);
|
|
616
|
+
}
|
|
617
|
+
if (Math.abs(fresh - width) > 0.01) return !0;
|
|
618
|
+
}
|
|
619
|
+
return !1;
|
|
620
|
+
}
|
|
621
|
+
function useWidthMeasure(base, enabled) {
|
|
622
|
+
let [swap, setSwap] = useState3(0), hydrated = useSyncExternalStore(noSubscription, () => !0, () => !1);
|
|
623
|
+
return useEffect2(() => {
|
|
624
|
+
if (!enabled) return;
|
|
625
|
+
let fonts = document.fonts;
|
|
626
|
+
if (fonts?.ready === void 0) return;
|
|
627
|
+
let active = !0, remeasure = () => {
|
|
628
|
+
!active || !canvasWidthsMoved() || (measuredWidths.clear(), measuredDigits.clear(), setSwap((previous) => previous + 1));
|
|
629
|
+
};
|
|
630
|
+
return fonts.ready.then(remeasure), fonts.addEventListener?.("loadingdone", remeasure), () => {
|
|
631
|
+
active = !1, fonts.removeEventListener?.("loadingdone", remeasure);
|
|
632
|
+
};
|
|
633
|
+
}, [enabled]), useMemo2(() => {
|
|
634
|
+
let browser = enabled && hydrated ? canvasTextWidth() : void 0;
|
|
635
|
+
return browser === void 0 ? { measure: base, browser: !1 } : {
|
|
636
|
+
browser: !0,
|
|
637
|
+
measure: (text, font) => {
|
|
638
|
+
let metric = base(text, font), drawn = browser(text, font);
|
|
639
|
+
return drawn > metric.width ? { ...metric, width: drawn } : metric;
|
|
640
|
+
}
|
|
641
|
+
};
|
|
642
|
+
}, [base, enabled, hydrated, swap]);
|
|
643
|
+
}
|
|
644
|
+
function columnVisibilityDefaults(table, authored) {
|
|
645
|
+
return {
|
|
646
|
+
...Object.fromEntries(table.columnToggles.map((toggle) => [toggle.id, toggle.visible])),
|
|
647
|
+
...authored
|
|
648
|
+
};
|
|
649
|
+
}
|
|
650
|
+
function createTableChart(checkKeys, linked) {
|
|
651
|
+
function TableChart3(props) {
|
|
652
|
+
let { rows, columns, onRowsReading, ...table } = props, gate = useRowsGate({ type: "table", data: table.data }, { rows, columns, onRowsReading }, table);
|
|
653
|
+
return gate.element ?? /* @__PURE__ */ jsx3(DrawnTable, { table: { ...table, data: gate.data }, checkKeys, linked });
|
|
654
|
+
}
|
|
655
|
+
return TableChart3.displayName = "TableChart", TableChart3.chartType = "table", rebindable(TableChart3, (relinked) => createTableChart(checkKeys, relinked)), TableChart3;
|
|
656
|
+
}
|
|
657
|
+
var TableChart = createTableChart();
|
|
658
|
+
function DrawnTable({ table: props, checkKeys, linked }) {
|
|
659
|
+
let compiledRequest = useContext(TableFloorRequestContext), originalFloorRequest = compiledRequest?.request, {
|
|
660
|
+
data,
|
|
661
|
+
collapsed: controlledCollapsed,
|
|
662
|
+
defaultCollapsed,
|
|
663
|
+
onCollapsedChange,
|
|
664
|
+
onExpansionChange,
|
|
665
|
+
columnVisibility: controlledColumnVisibility,
|
|
666
|
+
defaultColumnVisibility,
|
|
667
|
+
onColumnVisibilityChange,
|
|
668
|
+
inlineVisibility: controlledInlineVisibility,
|
|
669
|
+
defaultInlineVisibility,
|
|
670
|
+
onInlineVisibilityChange,
|
|
671
|
+
sortable: authoredSortable = !1,
|
|
672
|
+
sort: controlledSort,
|
|
673
|
+
defaultSort,
|
|
674
|
+
onSortChange,
|
|
675
|
+
rootsHidden: controlledRootsHidden,
|
|
676
|
+
measureWidths = "browser",
|
|
677
|
+
stickyLabels = !1,
|
|
678
|
+
toolbar = !0,
|
|
679
|
+
target,
|
|
680
|
+
onWarnings,
|
|
681
|
+
size,
|
|
682
|
+
fit = "content",
|
|
683
|
+
fallbackSize,
|
|
684
|
+
prepared,
|
|
685
|
+
scope,
|
|
686
|
+
fontMetrics,
|
|
687
|
+
styleNonce,
|
|
688
|
+
idPrefix,
|
|
689
|
+
onRefused,
|
|
690
|
+
renderRefused,
|
|
691
|
+
hover,
|
|
692
|
+
onScrollChange,
|
|
693
|
+
handleRef,
|
|
694
|
+
onContentWidth,
|
|
695
|
+
fillHeight = !1,
|
|
696
|
+
rowLabelLead,
|
|
697
|
+
portalContainer,
|
|
698
|
+
onRowSelect: authoredRowSelect,
|
|
699
|
+
interactions = !0,
|
|
700
|
+
foldOn,
|
|
701
|
+
onFormatsFit,
|
|
702
|
+
onEmpty,
|
|
703
|
+
isRowSelectable,
|
|
704
|
+
exporter,
|
|
705
|
+
...options
|
|
706
|
+
} = props, widthOptions = compiledRequest?.options ?? options, softLabelCap = widthOptions[SOFT_LABEL_CAP] === !0, labelWrapFloor = widthOptions[LABEL_WRAP_FLOOR] === !0, onRowSelect = interactions ? authoredRowSelect : void 0, sortable = interactions ? authoredSortable : !1, flags = hoverFlags(hover), container = useContainerSize({ size, target, fit, fallbackSize, needsHeight: fillHeight }), [scrollWidth, setScrollWidth] = useState3(), resolvedSize = size === "container" ? container.size : size, stableSize = useStableValue(typeof resolvedSize == "object" ? resolvedSize : {}), authoredTableOptions = {
|
|
707
|
+
...options,
|
|
708
|
+
// An authored sibling order goes back into the options the core resolves;
|
|
709
|
+
// a column sort is reader state and never reaches resolveTable.
|
|
710
|
+
...controlledSort == null || isColumnSort(controlledSort) ? {} : { sort: controlledSort },
|
|
711
|
+
...resolvedSize === void 0 ? {} : { size: typeof resolvedSize == "object" ? stableSize : resolvedSize },
|
|
712
|
+
...controlledColumnVisibility === void 0 ? {} : { columnVisibility: controlledColumnVisibility },
|
|
713
|
+
...controlledInlineVisibility === void 0 ? {} : { inlineVisibility: controlledInlineVisibility }
|
|
714
|
+
}, stableOptions = useStableValue(
|
|
715
|
+
authoredTableOptions
|
|
716
|
+
), { request, layoutRequest: fullLayoutRequest, provider, deferred } = useResolvedChartRequest({ type: "table", data, target, options: stableOptions, scope, fontMetrics }, {}, prepared, linked), { inlineVisibility: _inlineVisibility, ...valueOptions } = fullLayoutRequest?.options ?? {}, valueContext = useStableValue(fullLayoutRequest === void 0 ? void 0 : { ...fullLayoutRequest, data: void 0, options: valueOptions }), layoutRequest = useMemo2(() => valueContext === void 0 ? void 0 : { ...valueContext, data: fullLayoutRequest.data }, [valueContext, fullLayoutRequest?.data]), refusedProps = optionRefusals(stableOptions, "table", checkKeys, provider?.strings), failure = useDeferredModule(deferred), tableOptions = layoutRequest?.options, initialPrepared = usePrepared(prepared, fullLayoutRequest, "table", size === "container" ? fit : void 0), { size: _resolveSize, ...sizeFreeOptions } = tableOptions ?? {}, resolveKey = useStableValue(tableOptions === void 0 ? void 0 : sizeFreeOptions), resolved = useMemo2(() => !layoutRequest || !tableOptions ? void 0 : initialPrepared ? { table: { ...initialPrepared.table, provenance: {} }, warnings: initialPrepared.warnings ?? [] } : resolveTable(layoutRequest.data, tableOptions), [layoutRequest?.data, resolveKey, initialPrepared]), rootsHidden = controlledRootsHidden ?? (resolved === void 0 ? !1 : expansionRootsHidden(resolved.table, tableOptions?.expansion)), colorblindSafe = tableOptions?.colorblindSafe === !0, [freshMount] = useState3(useSyncExternalStore(noSubscription, () => !0, () => !1)), waitsForWidth = container.waiting, theme = useStableValue(useMemo2(
|
|
717
|
+
() => request && !waitsForWidth ? tableRenderTheme(request) : void 0,
|
|
718
|
+
[request?.theme, request?.target, request?.size.width, tableOptions, waitsForWidth]
|
|
719
|
+
)), colorblindWarnings = useMemo2(() => colorblindSafe && layoutRequest && tableOptions ? tableCore.layout(layoutRequest.data, tableOptions).warnings.filter((warning) => warning.code === "table-colorblind-safe-unused") : [], [layoutRequest, colorblindSafe]), metricMeasure = request?.fontMetrics ?? defaultMeasurer, width = useWidthMeasure(metricMeasure, measureWidths === "browser"), statement = resolved?.table.rows.some((row) => row.sign === -1 || row.operator !== void 0 || row.kind === "subtotal" || row.kind === "result" || row.kind === "driver") ?? !1, cohort = tableOptions?.density?.startsWith("cohort") ?? !1, stylesheet = useMemo2(() => theme && tableStylesheet(theme, request?.target, statement, cohort, typeof stickyLabels == "object", textScaleOf(request?.options), tableOptions?.palette), [theme, request?.target, request?.options.textScale, request?.options.textSize, statement, cohort, typeof stickyLabels == "object", tableOptions?.palette]), themeScope = stylesheet === void 0 ? "" : stylesheetHash(stylesheet), floorRevision = useDeferredRevision(), floorAttempt = useMemo2(() => !fullLayoutRequest || !belowTableViewportFloor(fullLayoutRequest.options.size) ? {} : floorRevision === 0 ? asFirstFrame(linked ?? [], attemptFloor) : attemptFloor(), [fullLayoutRequest, originalFloorRequest, provider, scope, fontMetrics, floorRevision, size, container.pinnedHeight, data, target, stableOptions, linked]);
|
|
720
|
+
function attemptFloor() {
|
|
721
|
+
if (!fullLayoutRequest) return {};
|
|
722
|
+
try {
|
|
723
|
+
let openHeight = size === "container" && !container.pinnedHeight, floorRequest = originalFloorRequest === void 0 && !openHeight ? fullLayoutRequest : (provider?.resolve ?? resolveChartRequest)({
|
|
724
|
+
...originalFloorRequest ?? { type: "table", data, target, options: stableOptions },
|
|
725
|
+
size: openHeight ? { width: fullLayoutRequest.size.width } : fullLayoutRequest.options.size,
|
|
726
|
+
scope,
|
|
727
|
+
fontMetrics
|
|
728
|
+
}, provider ?? {});
|
|
729
|
+
return { result: measureResolvedRequest(floorRequest).refused };
|
|
730
|
+
} catch (error) {
|
|
731
|
+
if (!(error instanceof DeferredCoreError)) throw error;
|
|
732
|
+
return { deferred: error.module };
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
let sized = floorAttempt.result, settling = useRefusalSettle(
|
|
736
|
+
size === "container" && sized !== void 0 && chartRefusals(sized.warnings).every(isSizeDependentRefusal),
|
|
737
|
+
container.client,
|
|
738
|
+
`${container.size.width}x${container.size.height ?? ""}`,
|
|
739
|
+
sized
|
|
740
|
+
), floorFailure = useDeferredModule(floorAttempt.deferred), initialCollapsed = () => defaultCollapsed ?? (resolved ? [...collapsedByDefault(resolved.table)] : []), initialColumnVisibility = () => resolved ? columnVisibilityDefaults(resolved.table, defaultColumnVisibility) : {}, initialInlineVisibility = () => ({
|
|
741
|
+
...options.inlineVisibility,
|
|
742
|
+
...defaultInlineVisibility
|
|
743
|
+
}), isSortControlled = controlledSort === null || isColumnSort(controlledSort), [uncontrolledCollapsed, setUncontrolledCollapsed] = useState3(initialCollapsed), [uncontrolledColumnVisibility, setUncontrolledColumnVisibility] = useState3(initialColumnVisibility), [uncontrolledInlineVisibility, setUncontrolledInlineVisibility] = useState3(initialInlineVisibility), inlineVisibility = controlledInlineVisibility !== void 0 ? controlledInlineVisibility : uncontrolledInlineVisibility, [uncontrolledSort, setUncontrolledSort] = useState3(defaultSort ?? null), structureKey = useMemo2(
|
|
744
|
+
() => resolved === void 0 ? "" : encodeStructuralIds(resolved.table.rows.map((row) => row.id)) + encodeStructuralIds(resolved.table.columns.map((column) => column.id)) + encodeStructuralIds(resolved.table.columnToggles.map((toggle) => toggle.id)),
|
|
745
|
+
[resolved?.table]
|
|
746
|
+
), expansionKey = resolved === void 0 ? void 0 : JSON.stringify(tableOptions?.expansion ?? null), [seenExpansionKey, setSeenExpansionKey] = useState3(expansionKey);
|
|
747
|
+
expansionKey !== void 0 && seenExpansionKey !== expansionKey && (setSeenExpansionKey(expansionKey), seenExpansionKey !== void 0 && setUncontrolledCollapsed([...collapsedByDefault(resolved.table)]));
|
|
748
|
+
let [seenStructureKey, setSeenStructureKey] = useState3(structureKey);
|
|
749
|
+
seenStructureKey !== structureKey && (setSeenStructureKey(structureKey), setUncontrolledCollapsed(initialCollapsed()), setUncontrolledColumnVisibility(initialColumnVisibility()), setUncontrolledInlineVisibility(initialInlineVisibility()), setUncontrolledSort(defaultSort ?? null));
|
|
750
|
+
let isColumnVisibilityControlled = controlledColumnVisibility !== void 0, currentColumnVisibility = isColumnVisibilityControlled ? controlledColumnVisibility : uncontrolledColumnVisibility, columnVisibility = useMemo2(
|
|
751
|
+
() => Object.fromEntries(
|
|
752
|
+
(resolved?.table.columnToggles ?? []).map((toggle) => [
|
|
753
|
+
toggle.id,
|
|
754
|
+
currentColumnVisibility[toggle.id] ?? toggle.visible
|
|
755
|
+
])
|
|
756
|
+
),
|
|
757
|
+
[currentColumnVisibility, resolved?.table.columnToggles]
|
|
758
|
+
), fitResult = useMemo2(() => {
|
|
759
|
+
if (resolved === void 0 || layoutRequest === void 0 || theme === void 0 || tableOptions?.fitFormats !== !0) return;
|
|
760
|
+
let ladder = levelLadder(theme, tableOptions.density ?? "regular", request?.target, textScaleOf(request?.options)), fonts = tableFonts(theme, ladder), rowById = new Map(resolved.table.rows.map((row) => [row.id, row])), fitChanges = new Set(resolved.table.rows.filter((row) => visibleInlineRows(row, inlineVisibility).length > 0).map((row) => row.id)), drawnColumns = (candidate) => visibleColumns(candidate, columnVisibility);
|
|
761
|
+
return fitTableFormats(layoutRequest.data, tableOptions, resolved, drawnColumns, {
|
|
762
|
+
measure: width.measure,
|
|
763
|
+
padX: tableOptions.cellPadX ?? cellPadX(drawnColumns(resolved.table).length),
|
|
764
|
+
cellFont: (cell) => {
|
|
765
|
+
let row = rowById.get(cell.rowId);
|
|
766
|
+
return kindFont(rowFont(theme, ladder, fonts, cell.role, row?.step ?? cell.level, row?.hasChildren === !0, fitChanges.has(cell.rowId)), row?.kind, cell.kind === "rowLabel", theme);
|
|
767
|
+
},
|
|
768
|
+
...width.browser ? {} : { slack: browserSlack },
|
|
769
|
+
figures: (column, text) => cellDrawsTabular(theme, column.kind, text),
|
|
770
|
+
lineFont: (parent, line, text, tabular) => changeLineFitFont(theme, ladder, parent.step, line.polarity !== void 0, text, width.measure, tabular, width.browser ? void 0 : browserSlack),
|
|
771
|
+
...tableOptions.locale?.decimal === void 0 ? {} : { decimal: tableOptions.locale.decimal }
|
|
772
|
+
});
|
|
773
|
+
}, [resolved, layoutRequest?.data, theme, resolveKey, columnVisibility, inlineVisibility, width]), fitted = useMemo2(
|
|
774
|
+
() => fitResult === void 0 || resolved === void 0 ? resolved : { table: { ...fitResult.resolved.table, provenance: resolved.table.provenance } },
|
|
775
|
+
[fitResult, resolved]
|
|
776
|
+
), formatChanges = fitResult?.changes, formatsListener = useRef3(onFormatsFit);
|
|
777
|
+
formatsListener.current = onFormatsFit;
|
|
778
|
+
let formatsKey = useRef3(void 0);
|
|
779
|
+
useEffect2(() => {
|
|
780
|
+
let key = JSON.stringify(formatChanges ?? []);
|
|
781
|
+
if (formatsKey.current === key) return;
|
|
782
|
+
let first = formatsKey.current === void 0;
|
|
783
|
+
formatsKey.current = key, !(first && (formatChanges?.length ?? 0) === 0) && formatsListener.current?.(formatChanges ?? []);
|
|
784
|
+
}, [formatChanges]);
|
|
785
|
+
let fittedNote = useMemo2(() => formatsFittedWarning(formatChanges ?? []), [formatChanges]), sort = isSortControlled ? isColumnSort(controlledSort) ? controlledSort : null : uncontrolledSort, sortedTable = useMemo2(() => {
|
|
786
|
+
if (fitted === void 0) return;
|
|
787
|
+
let sorted = sortRows(fitted.table, sort, request?.locale?.language);
|
|
788
|
+
return sorted === fitted.table.rows ? fitted.table : { ...fitted.table, rows: sorted };
|
|
789
|
+
}, [fitted?.table, sort, request?.locale?.language]), isEmpty = sortedTable !== void 0 && hasNoDataRows(sortedTable), emptyText = provider?.strings?.emptyMessage ?? DEFAULT_EMPTY_MESSAGE, table = useMemo2(
|
|
790
|
+
() => sortedTable !== void 0 && isEmpty ? { ...sortedTable, rows: [...sortedTable.rows, emptyMessageRow(sortedTable, emptyText)] } : sortedTable,
|
|
791
|
+
[sortedTable, isEmpty, emptyText]
|
|
792
|
+
), emptyListener = useRef3(onEmpty);
|
|
793
|
+
emptyListener.current = onEmpty;
|
|
794
|
+
let emptyNotified = useRef3(!1);
|
|
795
|
+
useEffect2(() => {
|
|
796
|
+
if (!isEmpty) {
|
|
797
|
+
emptyNotified.current = !1;
|
|
798
|
+
return;
|
|
799
|
+
}
|
|
800
|
+
emptyNotified.current || (emptyNotified.current = !0, emptyListener.current?.());
|
|
801
|
+
}, [isEmpty]);
|
|
802
|
+
let sortableIds = useMemo2(
|
|
803
|
+
() => table ? sortableColumnIds(table, sortable) : /* @__PURE__ */ new Set(),
|
|
804
|
+
[table, sortable]
|
|
805
|
+
), isCollapsedControlled = controlledCollapsed !== void 0, readOnlyTree = isCollapsedControlled && onCollapsedChange === void 0 || !interactions, collapsed = isCollapsedControlled ? controlledCollapsed : uncontrolledCollapsed, collapsedSet = useMemo2(() => {
|
|
806
|
+
let fixed = new Set((table?.rows ?? []).filter((row) => row.foldable === !1).map((row) => row.id));
|
|
807
|
+
return new Set(collapsed.filter((id) => !fixed.has(id)));
|
|
808
|
+
}, [collapsed, table]), rows = useMemo2(
|
|
809
|
+
() => table ? visibleRows(table, collapsedSet, rootsHidden) : [],
|
|
810
|
+
[table, collapsedSet, rootsHidden]
|
|
811
|
+
), closers = useMemo2(() => finalClosers(rows), [rows]), columns = useMemo2(
|
|
812
|
+
() => table ? visibleColumns(table, columnVisibility) : [],
|
|
813
|
+
[table, columnVisibility]
|
|
814
|
+
), spans = useMemo2(
|
|
815
|
+
() => table ? groupSpans(table, columns) : [],
|
|
816
|
+
[table, columns]
|
|
817
|
+
), groupMarks = useMemo2(() => {
|
|
818
|
+
let banded = /* @__PURE__ */ new Set(), groupStart = /* @__PURE__ */ new Set(), groundsOnly = new Set(
|
|
819
|
+
printsFigures(tableOptions?.figures, columns) ? [] : columns.filter(heatColumn).map((column) => column.id)
|
|
820
|
+
), divided = !1, groupEnd = /* @__PURE__ */ new Set(), groupRowStart = /* @__PURE__ */ new Set();
|
|
821
|
+
if (!table) return { banded, groupStart, groupEnd, groupRowStart, groundsOnly, divided };
|
|
822
|
+
let drawn = new Set(columns.map((column) => column.id));
|
|
823
|
+
table.columnGroups.forEach((group, index) => {
|
|
824
|
+
let visible = group.columnIds.filter((columnId) => drawn.has(columnId));
|
|
825
|
+
if (visible.length !== 0) {
|
|
826
|
+
if (group.band === !0) for (let columnId of visible) banded.add(columnId);
|
|
827
|
+
index > 0 && columns[0]?.id !== visible[0] && (groupStart.add(visible[0]), (group.spacer ?? 0) <= 0 && (divided = !0));
|
|
828
|
+
}
|
|
829
|
+
}), columns.forEach((column, index) => {
|
|
830
|
+
column.band === !0 && (banded.add(column.id), index > 0 && columns[index - 1]?.band !== !0 && (groupStart.add(column.id), divided = !0));
|
|
831
|
+
});
|
|
832
|
+
let blocks = [];
|
|
833
|
+
for (let group of table.columnGroups) {
|
|
834
|
+
if (group.band !== !0) continue;
|
|
835
|
+
let lastIndex = columns.reduce((last, column, index) => group.columnIds.includes(column.id) ? index : last, -1);
|
|
836
|
+
lastIndex >= 0 && blocks.push({ lastIndex, group: !0 });
|
|
837
|
+
}
|
|
838
|
+
columns.forEach((column, index) => {
|
|
839
|
+
column.band === !0 && columns[index + 1]?.band !== !0 && blocks.push({ lastIndex: index, group: !1 });
|
|
840
|
+
});
|
|
841
|
+
for (let { lastIndex, group } of blocks) {
|
|
842
|
+
let next = columns[lastIndex + 1];
|
|
843
|
+
if (next === void 0) {
|
|
844
|
+
tableOptions?.rowExtent === "frame" && (groupEnd.add(columns[lastIndex].id), divided = !0);
|
|
845
|
+
continue;
|
|
846
|
+
}
|
|
847
|
+
let nextGroup = table.columnGroups.find((candidate) => candidate.columnIds.includes(next.id));
|
|
848
|
+
nextGroup && (nextGroup.spacer ?? 0) > 0 && nextGroup.columnIds.find((id) => columns.some((column) => column.id === id)) === next.id || (groupStart.add(next.id), group && next.groupId === void 0 && groupRowStart.add(next.id), divided = !0);
|
|
849
|
+
}
|
|
850
|
+
return { banded, groupStart, groupEnd, groupRowStart, groundsOnly, divided };
|
|
851
|
+
}, [table, columns, tableOptions?.figures, tableOptions?.rowExtent]), density = tableOptions?.density ?? "regular", sticky = stickySettings(stickyLabels), stickyCount = sticky.columns, pageHead = sticky.head === "page", figures = printsFigures(tableOptions?.figures, columns), grid = useTableGridNavigation(rows, columns, table?.rows), summaryId = `bp-table-summary-${useScopedId(checkedIdPrefix(idPrefix))}`, allColumns = table?.columns ?? [], windowed = allColumns.length > WINDOW_COLUMNS, rowWindowed = useMemo2(
|
|
852
|
+
() => freshMount && typeof IntersectionObserver < "u" && !windowed && !sticky.sections && rowLabelLead === void 0 && rows.length > 500 && allColumns.every((column) => (column.kind === "rowLabel" || column.kind === "value" || column.kind === "computed") && !column.wrap && !(column.kind === "rowLabel" && tableOptions?.rowLabelLines !== 1 && (column.width !== void 0 || column.maxWidth !== void 0 || column.maxTextWidth !== void 0)) && (column.cellEncoding === void 0 || column.cellEncoding.type === "inCellBar")) && rows.every((row) => !row.hasChildren && !row.inlineRows?.length && row.role === "data" && row.unitAffix === void 0 && row.operator === void 0 && Object.values(row.cells).every((cell) => cell.note === void 0 && cell.href === void 0)),
|
|
853
|
+
[freshMount, windowed, sticky.sections, rowLabelLead, rows, allColumns, tableOptions?.rowLabelLines]
|
|
854
|
+
), containRowPages = useMemo2(
|
|
855
|
+
() => rowWindowed && figures && rows.every((row) => row.step === 0 && row.kind === void 0 && row.spacer === void 0 && !row.divider && allColumns.some((column) => column.kind === "rowLabel" && row.cells[column.id]?.displayed !== "")),
|
|
856
|
+
[rowWindowed, figures, rows, allColumns]
|
|
857
|
+
);
|
|
858
|
+
useIsomorphicLayoutEffect(() => {
|
|
859
|
+
if (!containRowPages) return;
|
|
860
|
+
let body = grid.tableRef.current?.querySelector('[data-bp-rowgroup="body"]'), sample = body?.querySelectorAll('[data-bp-row-page="0"] [role="row"]')[1];
|
|
861
|
+
if (!body || !sample) return;
|
|
862
|
+
let measure = () => {
|
|
863
|
+
let height = parseFloat(getComputedStyle(sample).height);
|
|
864
|
+
if (!(height > 0)) return;
|
|
865
|
+
let second = body.querySelector('[data-bp-row-page="1"]');
|
|
866
|
+
if (second !== null && Math.abs(parseFloat(getComputedStyle(second).blockSize) - height * ROW_PAGE) < 0.01) return;
|
|
867
|
+
let pitch = `${height}px`;
|
|
868
|
+
body.style.getPropertyValue("--bp-row-pitch") !== pitch && body.style.setProperty("--bp-row-pitch", pitch);
|
|
869
|
+
};
|
|
870
|
+
measure();
|
|
871
|
+
let observer = typeof ResizeObserver > "u" ? void 0 : new ResizeObserver(measure);
|
|
872
|
+
return observer?.observe(sample), () => observer?.disconnect();
|
|
873
|
+
}, [containRowPages, grid.tableRef, rows]);
|
|
874
|
+
let hiddenColumns = useMemo2(() => {
|
|
875
|
+
let drawn = new Set(columns.map((column) => column.id));
|
|
876
|
+
return new Set(allColumns.filter((column) => !drawn.has(column.id)).map((column) => column.id));
|
|
877
|
+
}, [allColumns, columns]), margin = tableOptions === void 0 ? void 0 : resolveCanvasOptions(tableOptions).margin, marginLeft = margin?.left ?? 0, marginRight = margin?.right ?? 0, frameReach = tableOptions?.rowExtent === "frame" ? Math.max(0, marginRight) : 0, frameStart = tableOptions?.rowExtent === "frame" ? Math.max(0, marginLeft) : 0, rowToFrame = (tableOptions?.rowExtent ?? "frame") === "frame", available = useMemo2(() => {
|
|
878
|
+
if (size === "container") return container.size === void 0 ? void 0 : container.size.width - marginLeft - marginRight;
|
|
879
|
+
if (size === void 0 || theme === void 0) return;
|
|
880
|
+
let frameWidth = resolveSize(size).width, sides = { ...canvasMargin(theme, frameWidth), ...margin };
|
|
881
|
+
return frameWidth - sides.left - sides.right;
|
|
882
|
+
}, [size, container.size?.width, theme, margin, marginLeft, marginRight]), measured = useMemo2(() => table && theme ? tableWidths(table, theme, width.measure, {
|
|
883
|
+
...tableOptions,
|
|
884
|
+
density,
|
|
885
|
+
target: request?.target,
|
|
886
|
+
inlineVisibility,
|
|
887
|
+
[SOFT_LABEL_CAP]: softLabelCap,
|
|
888
|
+
[LABEL_WRAP_FLOOR]: labelWrapFloor
|
|
889
|
+
}, {
|
|
890
|
+
columns,
|
|
891
|
+
allColumns,
|
|
892
|
+
rows,
|
|
893
|
+
available,
|
|
894
|
+
frameStart,
|
|
895
|
+
scroll: !0,
|
|
896
|
+
withMarks: !readOnlyTree || tableOptions?.outlineMarks === !0,
|
|
897
|
+
sortable: sortableIds,
|
|
898
|
+
leadWidth: rowLabelLead?.width,
|
|
899
|
+
trailingTracking: !0,
|
|
900
|
+
groupStart: groupMarks.groupStart,
|
|
901
|
+
groupEnd: groupMarks.groupEnd,
|
|
902
|
+
slack: width.browser ? void 0 : browserSlack,
|
|
903
|
+
fit: size === "container" ? fit : void 0
|
|
904
|
+
}) : void 0, [
|
|
905
|
+
table,
|
|
906
|
+
theme,
|
|
907
|
+
width,
|
|
908
|
+
tableOptions,
|
|
909
|
+
density,
|
|
910
|
+
request?.target,
|
|
911
|
+
inlineVisibility,
|
|
912
|
+
softLabelCap,
|
|
913
|
+
labelWrapFloor,
|
|
914
|
+
columns,
|
|
915
|
+
allColumns,
|
|
916
|
+
rows,
|
|
917
|
+
available,
|
|
918
|
+
frameStart,
|
|
919
|
+
readOnlyTree,
|
|
920
|
+
sortableIds,
|
|
921
|
+
rowLabelLead?.width,
|
|
922
|
+
groupMarks,
|
|
923
|
+
size,
|
|
924
|
+
fit
|
|
925
|
+
]), padX = measured?.cellPadX ?? 12, indents = measured?.indents ?? { base: 0, step: 16 }, operatorSlot = measured?.operatorSlot ?? 0, tracks = measured?.tracks ?? [], spacerWidths = measured?.spacerBefore ?? /* @__PURE__ */ new Map(), labelsWrap = measured?.labelsWrap ?? !1, diagnostics = useMemo2(() => layoutRequest && resolved ? {
|
|
926
|
+
warnings: [...resolved.warnings, ...layoutRequest.inputWarnings ?? [], ...fittedNote === void 0 ? [] : [fittedNote], ...colorblindWarnings, ...measured?.warnings ?? [], ...sized?.warnings ?? []],
|
|
927
|
+
presentation: initialPrepared?.presentation ?? tablePresentation(layoutRequest, resolved.table),
|
|
928
|
+
refused: sized?.refused
|
|
929
|
+
} : void 0, [layoutRequest, resolved, initialPrepared, sized, colorblindWarnings, fittedNote, measured?.warnings]), displayRef = useDisplayWarnings(settling ? void 0 : diagnostics, onWarnings, null), headFonts = measured?.fonts, frameRoom = !rowToFrame || tableOptions?.frameFill === "none" || available === void 0 ? void 0 : available - (measured?.spacerTotal ?? 0), reachFrame = rowToFrame && !(tableOptions?.rowExtent === void 0 && frameRoom !== void 0 && Math.floor(frameRoom - trackTotal(tracks)) >= 1), gridTracks = measured?.gridTracks ?? [], trackColumn = useMemo2(() => {
|
|
930
|
+
if (spacerWidths.size === 0 && !windowed) return;
|
|
931
|
+
let index = /* @__PURE__ */ new Map();
|
|
932
|
+
return gridTracks.forEach((track, position) => {
|
|
933
|
+
track.id.startsWith("bp-spacer:") || index.set(track.id, position + 1);
|
|
934
|
+
}), index;
|
|
935
|
+
}, [gridTracks, spacerWidths, windowed]), pinned = useMemo2(() => pinnedColumns(
|
|
936
|
+
allColumns.filter((column) => !hiddenColumns.has(column.id)),
|
|
937
|
+
gridTracks,
|
|
938
|
+
stickyCount,
|
|
939
|
+
scrollWidth ?? (container.ready ? container.size.width : void 0)
|
|
940
|
+
), [stickyCount, gridTracks, allColumns, hiddenColumns, scrollWidth, container.ready, container.size.width]), pinEnd = useMemo2(() => {
|
|
941
|
+
let widths = new Map(gridTracks.map((track) => [track.id, track.width])), end = 0;
|
|
942
|
+
for (let [id, pin] of pinned) pin.last && (end = pin.left + (widths.get(`bp-spacer:${id}`) ?? 0) + (widths.get(id) ?? 0));
|
|
943
|
+
return end;
|
|
944
|
+
}, [pinned, gridTracks]), wideGroups = useMemo2(() => {
|
|
945
|
+
let wide = /* @__PURE__ */ new Set(), box = scrollWidth ?? (container.ready ? container.size.width : void 0), room = box === void 0 ? void 0 : box - pinEnd;
|
|
946
|
+
if (room === void 0 || room <= 0) return wide;
|
|
947
|
+
let widths = new Map(gridTracks.map((track) => [track.id, track.width])), groupWidths = /* @__PURE__ */ new Map();
|
|
948
|
+
for (let column of allColumns) {
|
|
949
|
+
if (column.groupId === void 0 || hiddenColumns.has(column.id)) continue;
|
|
950
|
+
let before = groupWidths.get(column.groupId);
|
|
951
|
+
groupWidths.set(column.groupId, (before ?? 0) + (widths.get(column.id) ?? 0) + (before === void 0 ? 0 : widths.get(`bp-spacer:${column.id}`) ?? 0));
|
|
952
|
+
}
|
|
953
|
+
for (let [id, width2] of groupWidths) width2 > room + 0.5 && wide.add(id);
|
|
954
|
+
return wide;
|
|
955
|
+
}, [allColumns, gridTracks, hiddenColumns, scrollWidth, container.ready, container.size.width, pinEnd]), columnEdges = useMemo2(() => {
|
|
956
|
+
let width2 = new Map(gridTracks.map((track) => [track.id, track.width])), left = /* @__PURE__ */ new Map(), x = 0;
|
|
957
|
+
for (let column of allColumns)
|
|
958
|
+
hiddenColumns.has(column.id) || (x += width2.get(`bp-spacer:${column.id}`) ?? 0, left.set(column.id, x), x += width2.get(column.id) ?? 0);
|
|
959
|
+
return { left, groupStart: [...groupMarks.groupStart].filter((id) => left.has(id) && !((width2.get(`bp-spacer:${id}`) ?? 0) > 0)) };
|
|
960
|
+
}, [gridTracks, allColumns, hiddenColumns, groupMarks]), gridStyle = useMemo2(() => ({
|
|
961
|
+
// Under 'frame' the empty track is at least the right margin wide.
|
|
962
|
+
// The scroll box reaches through the margin, so a grid whose
|
|
963
|
+
// natural width left the margin out gave a card that sizes itself to
|
|
964
|
+
// its content (`width: max-content`) no room for it: the card shrank by
|
|
965
|
+
// the margin and the last column met its edge.
|
|
966
|
+
"--bp-cols": reachFrame ? `${trackTemplate(gridTracks)} minmax(${frameReach > 0 ? `${frameReach}px` : 0},1fr)` : trackTemplate(gridTracks),
|
|
967
|
+
// The table is exactly as wide as the columns it draws; room a capped
|
|
968
|
+
// fill did not use stays to the right of it.
|
|
969
|
+
"--bp-table-width": reachFrame ? `max(${Math.round((trackTotal(gridTracks) + frameReach) * 10) / 10}px, 100%)` : `${trackTotal(gridTracks)}px`,
|
|
970
|
+
// Print has no animation to protect, so the tracks may be proportional
|
|
971
|
+
// and the table takes the page width.
|
|
972
|
+
"--bp-cols-print": `${gridTracks.map((track) => track.width === 0 ? "0px" : `${track.natural}fr`).join(" ")}${reachFrame ? " 0px" : ""}`,
|
|
973
|
+
"--bp-cell-pad-x": `${padX}px`,
|
|
974
|
+
...frameStart > 0 ? { "--bp-reach-pad-x": `${padX + frameStart}px`, "--bp-pad-x-base": `${padX}px` } : {},
|
|
975
|
+
// Use the same label ladder for track measurement and CSS padding.
|
|
976
|
+
"--bp-indent-base": `${indents.base}px`,
|
|
977
|
+
"--bp-indent-step": `${indents.step}px`,
|
|
978
|
+
...headFonts === void 0 ? {} : headVars(headFonts)
|
|
979
|
+
}), [gridTracks, padX, headFonts, reachFrame, frameReach, frameStart, indents]), reachEnd = reachFrame && marginRight > 0 ? marginRight : 0, scrollStyle = frameStart + reachEnd > 0 ? {
|
|
980
|
+
...frameStart > 0 ? { marginInlineStart: -frameStart } : {},
|
|
981
|
+
...reachEnd > 0 ? { marginInlineEnd: -reachEnd } : {},
|
|
982
|
+
maxWidth: `calc(100% + ${frameStart + reachEnd}px)`
|
|
983
|
+
} : void 0, filler = useMemo2(() => reachFrame ? trackColumn === void 0 ? {} : { gridColumn: gridTracks.length + 1 } : void 0, [reachFrame, trackColumn, gridTracks.length]), [scroller, setScroller] = useState3(null), [headBox, setHeadBox] = useState3(null), [floatClip, setFloatClip] = useState3(null), [floatInner, setFloatInner] = useState3(null), [floatId, setFloatId] = useState3(void 0), gridWidth = trackTotal(gridTracks), printing = usePrinting(), [printBox, setPrintBox] = useState3();
|
|
984
|
+
useEffect2(() => size !== "container" ? void 0 : watchPrint((phase) => {
|
|
985
|
+
let box = phase === "print" ? grid.tableRef.current?.parentElement?.clientWidth : void 0;
|
|
986
|
+
return () => setPrintBox(box);
|
|
987
|
+
}), [size, grid.tableRef]);
|
|
988
|
+
let printFit = useMemo2(() => printing && printBox !== void 0 && printBox > 0 && gridWidth > printBox + 0.5 ? { zoom: printBox / gridWidth, width: gridWidth, "--bp-cols-print": "var(--bp-cols)" } : void 0, [printing, printBox, gridWidth]), [scrolled, setScrolled] = useState3(!1), scrollListener = useRef3(onScrollChange);
|
|
989
|
+
scrollListener.current = onScrollChange;
|
|
990
|
+
let scrollLabel = useRef3("");
|
|
991
|
+
useEffect2(() => {
|
|
992
|
+
if (scroller === null) return;
|
|
993
|
+
let report = () => {
|
|
994
|
+
scroller.clientWidth > 0 && setScrollWidth((before) => (before ?? container.size.width) === scroller.clientWidth ? before : scroller.clientWidth), setScrolled(scroller.scrollLeft > 0), markScrollRegion(scroller, scrollLabel.current), headBox !== null && headBox.scrollLeft !== scroller.scrollLeft && (headBox.scrollLeft = scroller.scrollLeft), scrollListener.current?.(scrollStateOf(scroller));
|
|
995
|
+
}, follow = () => {
|
|
996
|
+
headBox !== null && scroller.scrollLeft !== headBox.scrollLeft && (scroller.scrollLeft = headBox.scrollLeft);
|
|
997
|
+
};
|
|
998
|
+
report(), scroller.addEventListener("scroll", report, { passive: !0 }), headBox?.addEventListener("scroll", follow, { passive: !0 });
|
|
999
|
+
let resize = typeof ResizeObserver < "u" ? new ResizeObserver(report) : void 0;
|
|
1000
|
+
return resize?.observe(scroller), () => {
|
|
1001
|
+
scroller.removeEventListener("scroll", report), headBox?.removeEventListener("scroll", follow), resize?.disconnect();
|
|
1002
|
+
};
|
|
1003
|
+
}, [scroller, headBox, gridWidth, container.size?.width, fillHeight, rows, theme, density]);
|
|
1004
|
+
let trackSpans = useMemo2(() => {
|
|
1005
|
+
if (!windowed) return [];
|
|
1006
|
+
let left = 0;
|
|
1007
|
+
return gridTracks.map((track) => {
|
|
1008
|
+
let span = { id: track.id, start: left, end: left + track.width };
|
|
1009
|
+
return left += track.width, span;
|
|
1010
|
+
});
|
|
1011
|
+
}, [windowed, gridTracks]), fallbackViewport = container.size?.width ?? (typeof size == "object" ? resolveSize(size).width : typeof window > "u" ? 1024 : window.innerWidth), viewRange = useCallback2((left, width2) => {
|
|
1012
|
+
let view = width2 > 0 ? width2 : fallbackViewport, from = left - view / 2, to = left + view * 1.5, inside = trackSpans.filter((span) => span.end >= from && span.start <= to);
|
|
1013
|
+
return inside.length === 0 ? "" : `${inside[0].id}\0${inside[inside.length - 1].id}`;
|
|
1014
|
+
}, [trackSpans, fallbackViewport]), [viewKey, setViewKey] = useState3(void 0);
|
|
1015
|
+
useEffect2(() => {
|
|
1016
|
+
if (!windowed || scroller === null) return;
|
|
1017
|
+
let frame2 = 0, update = () => {
|
|
1018
|
+
frame2 = 0;
|
|
1019
|
+
let left = getComputedStyle(scroller).direction === "rtl" ? Math.abs(scroller.scrollLeft) : scroller.scrollLeft, next = viewRange(left, scroller.clientWidth);
|
|
1020
|
+
setViewKey((before) => before === next ? before : next);
|
|
1021
|
+
}, schedule = () => {
|
|
1022
|
+
frame2 === 0 && (frame2 = typeof requestAnimationFrame > "u" ? (update(), 0) : requestAnimationFrame(update));
|
|
1023
|
+
};
|
|
1024
|
+
update(), scroller.addEventListener("scroll", schedule, { passive: !0 });
|
|
1025
|
+
let resize = typeof ResizeObserver > "u" ? void 0 : new ResizeObserver(schedule);
|
|
1026
|
+
return resize?.observe(scroller), () => {
|
|
1027
|
+
frame2 !== 0 && typeof cancelAnimationFrame < "u" && cancelAnimationFrame(frame2), scroller.removeEventListener("scroll", schedule), resize?.disconnect();
|
|
1028
|
+
};
|
|
1029
|
+
}, [windowed, scroller, viewRange]);
|
|
1030
|
+
let liteSlots = useMemo2(() => new Map(trackSpans.map((span) => [span.id, { start: span.start, width: span.end - span.start }])), [trackSpans]), [rowPagesInView, setRowPagesInView] = useState3(() => /* @__PURE__ */ new Set([0]));
|
|
1031
|
+
useEffect2(() => {
|
|
1032
|
+
if (!rowWindowed || scroller === null) return;
|
|
1033
|
+
let observer = new IntersectionObserver((entries) => {
|
|
1034
|
+
setRowPagesInView((before) => {
|
|
1035
|
+
let next = new Set(before);
|
|
1036
|
+
for (let entry of entries) {
|
|
1037
|
+
let page = Number(entry.target.dataset.bpRowPage);
|
|
1038
|
+
entry.isIntersecting ? next.add(page) : next.delete(page);
|
|
1039
|
+
}
|
|
1040
|
+
return next.size === before.size && [...next].every((page) => before.has(page)) ? before : next;
|
|
1041
|
+
});
|
|
1042
|
+
}, { root: fillHeight ? scroller : null, rootMargin: "100% 0px" });
|
|
1043
|
+
return scroller.querySelectorAll("[data-bp-row-page]").forEach((page) => observer.observe(page)), () => observer.disconnect();
|
|
1044
|
+
}, [rowWindowed, scroller, fillHeight, rows]);
|
|
1045
|
+
let focusColumn = grid.focus?.colId, windowRef = useRef3(void 0), windowIds = useMemo2(() => {
|
|
1046
|
+
if (!windowed || printing) return;
|
|
1047
|
+
let key = viewKey ?? viewRange(0, 0), [first, last] = key.split("\0"), ids = /* @__PURE__ */ new Set([...pinned.keys()]);
|
|
1048
|
+
focusColumn !== void 0 && ids.add(focusColumn);
|
|
1049
|
+
let inside = !1;
|
|
1050
|
+
for (let span of trackSpans)
|
|
1051
|
+
span.id === first && (inside = !0), inside && ids.add(span.id), span.id === last && (inside = !1);
|
|
1052
|
+
let blocks = /* @__PURE__ */ new Set();
|
|
1053
|
+
allColumns.forEach((column, index) => {
|
|
1054
|
+
ids.has(column.id) && !pinned.has(column.id) && blocks.add(Math.floor(index / WINDOW_BLOCK));
|
|
1055
|
+
}), allColumns.forEach((column, index) => {
|
|
1056
|
+
blocks.has(Math.floor(index / WINDOW_BLOCK)) && ids.add(column.id);
|
|
1057
|
+
});
|
|
1058
|
+
let before = windowRef.current;
|
|
1059
|
+
return before !== void 0 && before.size === ids.size && [...ids].every((id) => before.has(id)) ? before : windowRef.current = ids;
|
|
1060
|
+
}, [windowed, printing, viewKey, viewRange, pinned, focusColumn, trackSpans, allColumns]), columnPlan = useMemo2(() => {
|
|
1061
|
+
if (windowIds === void 0) return;
|
|
1062
|
+
let plan = [], run;
|
|
1063
|
+
return allColumns.forEach((column, index) => {
|
|
1064
|
+
if (windowIds.has(column.id)) {
|
|
1065
|
+
plan.push(index), run = void 0;
|
|
1066
|
+
return;
|
|
1067
|
+
}
|
|
1068
|
+
if (hiddenColumns.has(column.id)) {
|
|
1069
|
+
run = void 0;
|
|
1070
|
+
return;
|
|
1071
|
+
}
|
|
1072
|
+
if (run !== void 0 && Math.floor(run.to / LITE_BLOCK) === Math.floor(index / LITE_BLOCK)) {
|
|
1073
|
+
run.to = index;
|
|
1074
|
+
return;
|
|
1075
|
+
}
|
|
1076
|
+
plan.push(run = { from: index, to: index });
|
|
1077
|
+
}), plan;
|
|
1078
|
+
}, [windowIds, allColumns, hiddenColumns]), stickySections = sticky.sections, stickyHeadMode = sticky.head, tableReady = table !== void 0;
|
|
1079
|
+
useEffect2(() => {
|
|
1080
|
+
let element = grid.tableRef.current, head = element?.querySelector('[data-bp-rowgroup="head"]');
|
|
1081
|
+
if (!stickySections || !element || !head) return;
|
|
1082
|
+
let apply = () => element.style.setProperty("--bp-head-h", `${stickyHeadMode === !1 ? 0 : head.offsetHeight}px`);
|
|
1083
|
+
apply();
|
|
1084
|
+
let watch = typeof ResizeObserver > "u" ? void 0 : new ResizeObserver(apply);
|
|
1085
|
+
return watch?.observe(head), () => watch?.disconnect();
|
|
1086
|
+
}, [stickySections, stickyHeadMode, tableReady, gridWidth]), useEffect2(() => {
|
|
1087
|
+
let element = grid.tableRef.current;
|
|
1088
|
+
if (!pageHead || !stickySections || !element || headBox === null || scroller === null || floatClip === null || floatInner === null) return;
|
|
1089
|
+
let frame2 = 0, update = () => {
|
|
1090
|
+
frame2 = 0;
|
|
1091
|
+
let body = element.querySelector('[data-bp-rowgroup="body"]');
|
|
1092
|
+
if (body === null) return;
|
|
1093
|
+
let headBottom = headBox.getBoundingClientRect().bottom, headings = Array.from(body.querySelectorAll('[role="row"][data-role="section"]')).map((row) => ({ id: row.getAttribute("data-row-id") ?? void 0, box: row.getBoundingClientRect() })), active = -1;
|
|
1094
|
+
headings.forEach((heading, index) => {
|
|
1095
|
+
heading.box.top < headBottom - 0.5 && (active = index);
|
|
1096
|
+
});
|
|
1097
|
+
let current = headings[active];
|
|
1098
|
+
if (current === void 0) floatClip.style.visibility = "hidden";
|
|
1099
|
+
else {
|
|
1100
|
+
let limit = headings[active + 1]?.box.top ?? body.getBoundingClientRect().bottom, height = floatInner.firstElementChild === null ? current.box.height : floatInner.getBoundingClientRect().height;
|
|
1101
|
+
floatClip.style.height = `${height}px`, floatClip.style.visibility = "visible", floatInner.style.transform = `translateY(${Math.min(0, limit - (headBottom + height))}px)`, floatClip.scrollLeft = scroller.scrollLeft;
|
|
1102
|
+
}
|
|
1103
|
+
setFloatId((before) => before === current?.id ? before : current?.id);
|
|
1104
|
+
}, schedule = () => {
|
|
1105
|
+
frame2 === 0 && (frame2 = requestAnimationFrame(update));
|
|
1106
|
+
};
|
|
1107
|
+
update(), document.addEventListener("scroll", schedule, { capture: !0, passive: !0 }), window.addEventListener("resize", schedule);
|
|
1108
|
+
let watch = typeof ResizeObserver > "u" ? void 0 : new ResizeObserver(schedule);
|
|
1109
|
+
return watch?.observe(element), () => {
|
|
1110
|
+
frame2 !== 0 && cancelAnimationFrame(frame2), document.removeEventListener("scroll", schedule, { capture: !0 }), window.removeEventListener("resize", schedule), watch?.disconnect();
|
|
1111
|
+
};
|
|
1112
|
+
}, [pageHead, stickySections, headBox, scroller, floatClip, floatInner, floatId, tableReady, gridWidth]), useImperativeHandle(handleRef, () => ({
|
|
1113
|
+
scrollState: () => scrollStateOf(scroller),
|
|
1114
|
+
scrollToColumn: (columnId, behavior) => {
|
|
1115
|
+
if (scroller === null) return;
|
|
1116
|
+
let offset = 0;
|
|
1117
|
+
for (let track of gridTracks) {
|
|
1118
|
+
if (track.id === columnId) break;
|
|
1119
|
+
offset += track.width;
|
|
1120
|
+
}
|
|
1121
|
+
let pinnedWidth = 0;
|
|
1122
|
+
for (let [id, pin] of pinned)
|
|
1123
|
+
pin.last && (pinnedWidth = pin.left + (gridTracks.find((track) => track.id === id)?.width ?? 0));
|
|
1124
|
+
scrollBoxTo(scroller, Math.max(0, offset - pinnedWidth), behavior);
|
|
1125
|
+
},
|
|
1126
|
+
scrollTo: (left, behavior) => {
|
|
1127
|
+
scroller !== null && scrollBoxTo(scroller, left, behavior);
|
|
1128
|
+
}
|
|
1129
|
+
}), [scroller, gridTracks, pinned]);
|
|
1130
|
+
let contentWidth = tracks.length === 0 ? void 0 : Math.ceil(marginLeft - frameStart + trackTotal(gridTracks) + Math.max(0, marginRight)), contentListener = useRef3(onContentWidth);
|
|
1131
|
+
contentListener.current = onContentWidth, useEffect2(() => {
|
|
1132
|
+
contentWidth !== void 0 && contentListener.current?.(contentWidth);
|
|
1133
|
+
}, [contentWidth]);
|
|
1134
|
+
let toggleRow = useCallback2(
|
|
1135
|
+
(rowId) => {
|
|
1136
|
+
let next = collapsedSet.has(rowId) ? collapsed.filter((candidate) => candidate !== rowId) : [...collapsed, rowId];
|
|
1137
|
+
isCollapsedControlled || setUncontrolledCollapsed(next), onCollapsedChange?.(next), onExpansionChange !== void 0 && resolved !== void 0 && onExpansionChange(expansionForFolds(resolved.table, tableOptions?.expansion, new Set(next)));
|
|
1138
|
+
},
|
|
1139
|
+
[collapsed, collapsedSet, isCollapsedControlled, onCollapsedChange, onExpansionChange, resolved, tableOptions?.expansion]
|
|
1140
|
+
), toggleColumns = useCallback2(
|
|
1141
|
+
(toggleId) => {
|
|
1142
|
+
let next = {
|
|
1143
|
+
...columnVisibility,
|
|
1144
|
+
[toggleId]: !(columnVisibility[toggleId] ?? !0)
|
|
1145
|
+
};
|
|
1146
|
+
isColumnVisibilityControlled || setUncontrolledColumnVisibility(next), onColumnVisibilityChange?.(next);
|
|
1147
|
+
},
|
|
1148
|
+
[
|
|
1149
|
+
columnVisibility,
|
|
1150
|
+
isColumnVisibilityControlled,
|
|
1151
|
+
onColumnVisibilityChange
|
|
1152
|
+
]
|
|
1153
|
+
), rowSelectListener = useRef3(onRowSelect);
|
|
1154
|
+
rowSelectListener.current = onRowSelect;
|
|
1155
|
+
let hasRowSelect = onRowSelect !== void 0, selectRow = useMemo2(
|
|
1156
|
+
() => hasRowSelect ? (row, event, columnId) => rowSelectListener.current?.(row.id, { row, event, ...columnId === void 0 ? {} : { columnId } }) : void 0,
|
|
1157
|
+
[hasRowSelect]
|
|
1158
|
+
), toggleSort = useCallback2(
|
|
1159
|
+
(column) => {
|
|
1160
|
+
let next = nextSort(sort, column);
|
|
1161
|
+
isSortControlled || setUncontrolledSort(next), onSortChange?.(next);
|
|
1162
|
+
},
|
|
1163
|
+
[sort, isSortControlled, onSortChange]
|
|
1164
|
+
), barMaxima = useMemo2(
|
|
1165
|
+
() => table && inCellBarMaxima(rows, columns),
|
|
1166
|
+
[table, rows, columns]
|
|
1167
|
+
), sparkDomains = useMemo2(
|
|
1168
|
+
() => table ? sparklineDomains(columns, rows) : /* @__PURE__ */ new Map(),
|
|
1169
|
+
[table, columns, rows]
|
|
1170
|
+
), heatLanes = useMemo2(
|
|
1171
|
+
() => table ? heatRanges(columns, rows) : /* @__PURE__ */ new Map(),
|
|
1172
|
+
[table, columns, rows]
|
|
1173
|
+
), grounds = useMemo2(
|
|
1174
|
+
() => table && presetLanguage(tableOptions?.variant).groupBand ? rowGrounds(table) : /* @__PURE__ */ new Map(),
|
|
1175
|
+
[table, tableOptions?.variant]
|
|
1176
|
+
), sparkWidths = useMemo2(
|
|
1177
|
+
() => new Map(tracks.filter((track) => track.width > 0).map((track) => [track.id, track.width])),
|
|
1178
|
+
[tracks]
|
|
1179
|
+
), childCounts = useMemo2(
|
|
1180
|
+
() => table ? treeChildCounts(table) : /* @__PURE__ */ new Map(),
|
|
1181
|
+
[table]
|
|
1182
|
+
), rowTree = useMemo2(() => tableRowTree(table?.rows ?? [], rootsHidden), [table, rootsHidden]), rowPages = useMemo2(() => rowWindowed ? Array.from({ length: Math.ceil(rowTree.length / ROW_PAGE) }, (_, index) => rowTree.slice(index * ROW_PAGE, (index + 1) * ROW_PAGE)) : [], [rowWindowed, rowTree]), engineNotes = options[ENGINE_NOTES], frameMemo = useMemo2(
|
|
1183
|
+
() => table === void 0 || tableOptions === void 0 ? void 0 : tableFrame(table, engineNotes ? { ...tableOptions, [ENGINE_NOTES]: engineNotes } : tableOptions, rows, columns),
|
|
1184
|
+
[table, tableOptions, engineNotes, rows, columns]
|
|
1185
|
+
), headRowCount = (table?.columnGroups ?? []).some((group) => group.heading !== !1) ? 2 : 1, isTree = (table?.rows ?? []).some((row) => row.hasChildren), rowIndices = useMemo2(() => new Map(rows.map((row, index) => [row.id, index + headRowCount + 1])), [rows, headRowCount]), columnIndices = useMemo2(() => new Map(columns.map((column, index) => [column.id, index + 1])), [columns]), wrap = (content) => {
|
|
1186
|
+
let body = size === "container" ? /* @__PURE__ */ jsxs2("div", { ref: container.wrapperRef, "data-bp-container": fit, style: fillHeight ? { height: "100%" } : void 0, children: [
|
|
1187
|
+
container.probed && /* @__PURE__ */ jsx3("div", { "data-bp-probe": "", "aria-hidden": "true", style: PROBE_STYLE }),
|
|
1188
|
+
content
|
|
1189
|
+
] }) : content;
|
|
1190
|
+
return idPrefix === void 0 ? body : /* @__PURE__ */ jsx3(IdPrefixContext.Provider, { value: checkedIdPrefix(idPrefix), children: body });
|
|
1191
|
+
}, refusedOptions = [
|
|
1192
|
+
...refusedProps,
|
|
1193
|
+
...heatEncodingRefusals(stableOptions.encodings),
|
|
1194
|
+
...refusalFindings(colorblindWarnings),
|
|
1195
|
+
// The table is the vertical scroll owner under fillHeight, so it cannot also pin its head to the page.
|
|
1196
|
+
...pageHead && fillHeight ? [{
|
|
1197
|
+
code: "invalid-options",
|
|
1198
|
+
message: "stickyLabels.head 'page' cannot be used with fillHeight: fillHeight makes the table the vertical scroll box, so the head cannot follow the page scroll",
|
|
1199
|
+
path: "options.stickyLabels.head",
|
|
1200
|
+
suggest: "Set stickyLabels.head to 'table' so the head pins inside the table's scroll box, or remove fillHeight to pin it to the page.",
|
|
1201
|
+
fix: [{ op: "replace", path: "/options/stickyLabels/head", value: "table" }]
|
|
1202
|
+
}] : []
|
|
1203
|
+
], drew = refusedOptions.length === 0 && !floorAttempt.deferred && !!resolved && !!table && !!theme && !!tableOptions && stylesheet !== void 0 && !sized?.refused && !settling, exported = useMemo2(() => exporter && drew && request ? {
|
|
1204
|
+
request: { ...request, options: {
|
|
1205
|
+
...request.options,
|
|
1206
|
+
expansion: { depth: "all", collapsed: [...collapsedSet], expanded: openParents(table, collapsedSet), rootsHidden },
|
|
1207
|
+
columnVisibility,
|
|
1208
|
+
inlineVisibility
|
|
1209
|
+
} },
|
|
1210
|
+
data,
|
|
1211
|
+
frame: { width: Math.max(request.size.width, contentWidth ?? 0) },
|
|
1212
|
+
pinnedHeight: !1,
|
|
1213
|
+
// A DimSwitch's document is its own spec at the view on screen: the compiled table is internal.
|
|
1214
|
+
...originalFloorRequest === void 0 ? {} : { source: {
|
|
1215
|
+
type: originalFloorRequest.type,
|
|
1216
|
+
data: originalFloorRequest.data,
|
|
1217
|
+
options: Object.fromEntries(Object.entries({
|
|
1218
|
+
...originalFloorRequest.options,
|
|
1219
|
+
expansion: { expanded: openParents(table, collapsedSet), collapsed: [...collapsedSet] },
|
|
1220
|
+
columnVisibility,
|
|
1221
|
+
inlineVisibility
|
|
1222
|
+
}).filter(([, value]) => value !== void 0))
|
|
1223
|
+
} }
|
|
1224
|
+
} : void 0, [exporter, drew, request, data, table, collapsedSet, rootsHidden, columnVisibility, inlineVisibility, contentWidth, originalFloorRequest]);
|
|
1225
|
+
if (useExportLink(exporter, exported), refusedOptions.length && request?.theme) return wrap(/* @__PURE__ */ jsx3(LayoutRefusal, { refusals: refusedOptions, theme: request.theme, options: request.options, size: request.size }));
|
|
1226
|
+
if (floorAttempt.deferred || !resolved || !table || !theme || !tableOptions || stylesheet === void 0)
|
|
1227
|
+
return wrap(/* @__PURE__ */ jsx3(LoadingPlaceholder, { theme: stableOptions.theme, failure: failure ?? floorFailure, options: { ...stableOptions, target } }));
|
|
1228
|
+
let frame = frameMemo, figureStyle = {
|
|
1229
|
+
...frame.padding === void 0 ? {} : { padding: frame.padding },
|
|
1230
|
+
"--bp-note-indent": `${padX}px`
|
|
1231
|
+
}, withInteraction = (content) => flags ? /* @__PURE__ */ jsx3(
|
|
1232
|
+
TableHoverFrame,
|
|
1233
|
+
{
|
|
1234
|
+
flags,
|
|
1235
|
+
styleNonce,
|
|
1236
|
+
table,
|
|
1237
|
+
rows,
|
|
1238
|
+
columns,
|
|
1239
|
+
request,
|
|
1240
|
+
theme,
|
|
1241
|
+
initialPrepared,
|
|
1242
|
+
refused: sized?.refused,
|
|
1243
|
+
portal: portalContainer,
|
|
1244
|
+
inlineVisibility,
|
|
1245
|
+
children: content
|
|
1246
|
+
}
|
|
1247
|
+
) : content;
|
|
1248
|
+
if (sized?.refused) return wrap(settling ? /* @__PURE__ */ jsx3(LoadingPlaceholder, { theme, size: sized.size, options: tableOptions }) : withInteraction(
|
|
1249
|
+
/* @__PURE__ */ jsx3(SizePlaceholder, { result: sized, theme, options: tableOptions, onRefused, renderRefused })
|
|
1250
|
+
));
|
|
1251
|
+
let stickyObject = typeof stickyLabels == "object" && stickyLabels !== null, stickyVars = stickyObject ? {
|
|
1252
|
+
...pageHead ? { "--bp-sticky-top": `${sticky.top}px` } : {},
|
|
1253
|
+
...sticky.sections ? { "--bp-sections-top": sticky.head === "page" ? `calc(${sticky.top}px + var(--bp-head-h,0px))` : sticky.head === "table" ? "var(--bp-head-h,0px)" : "0px" } : {}
|
|
1254
|
+
} : void 0;
|
|
1255
|
+
scrollLabel.current = frame.title || (typeof tableOptions.title == "string" ? tableOptions.title : "Table");
|
|
1256
|
+
let gridProps = {
|
|
1257
|
+
role: isTree ? "treegrid" : "grid",
|
|
1258
|
+
"aria-label": scrollLabel.current,
|
|
1259
|
+
className: "bp-table bp-table-grid",
|
|
1260
|
+
"aria-describedby": summaryId,
|
|
1261
|
+
"aria-rowcount": rows.length + headRowCount,
|
|
1262
|
+
"aria-colcount": columns.length,
|
|
1263
|
+
"data-bp-table-theme": themeScope,
|
|
1264
|
+
"data-bp-variant": tableOptions.variant ?? "hierarchy",
|
|
1265
|
+
"data-bp-tree": isTree ? "" : void 0,
|
|
1266
|
+
"data-bp-operators": operatorSlot > 0 ? "" : void 0,
|
|
1267
|
+
"data-bp-reach": frameStart > 0 ? "" : void 0,
|
|
1268
|
+
"data-bp-readonly": isTree && readOnlyTree ? "" : void 0,
|
|
1269
|
+
"data-bp-sticky": sticky.on ? "" : void 0,
|
|
1270
|
+
// Only the object form writes these: a `true` or a number draws the 0.27 markup.
|
|
1271
|
+
"data-bp-sticky-head": stickyObject && sticky.on ? sticky.head === !1 ? "off" : sticky.head : void 0,
|
|
1272
|
+
"data-bp-sticky-sections": stickyObject && sticky.sections ? "" : void 0,
|
|
1273
|
+
"data-bp-scrolled": scrolled ? "" : void 0,
|
|
1274
|
+
"data-bp-group-rule": (tableOptions.groupRule ?? "span") === "span" ? "span" : void 0,
|
|
1275
|
+
"data-bp-group-align": tableOptions.groupAlign === "left" || tableOptions.groupAlign === "right" ? tableOptions.groupAlign : void 0,
|
|
1276
|
+
// The right end: every row closes on a hairline in the group
|
|
1277
|
+
// divider's ink, or the head rule's where no group opens with a
|
|
1278
|
+
// divider. A cohort grid keeps its open matrix edge, as in the SVG,
|
|
1279
|
+
// and so does a theme with `table.endRule: 'none'`.
|
|
1280
|
+
"data-bp-mark-style": theme?.table?.mark ?? (tableOptions.variant === "steering" ? "boxed" : "bare"),
|
|
1281
|
+
"data-bp-end": void 0,
|
|
1282
|
+
"data-bp-density": density,
|
|
1283
|
+
// A row label takes two lines before its cut (`rowLabelLines`), as on the SVG.
|
|
1284
|
+
"data-bp-label-lines": tableOptions.rowLabelLines === 1 ? "1" : void 0,
|
|
1285
|
+
// 'sorted' keeps the chevron on the sorted header alone; the other
|
|
1286
|
+
// sortable headers keep its reserve, so no track moves.
|
|
1287
|
+
"data-bp-sort-indicator": tableOptions.sortIndicator === "sorted" ? "sorted" : void 0,
|
|
1288
|
+
"data-bp-figures": figures ? void 0 : "off",
|
|
1289
|
+
"data-bp-wired": "",
|
|
1290
|
+
onKeyDown: grid.onKeyDown,
|
|
1291
|
+
onFocusCapture: grid.onFocusCapture,
|
|
1292
|
+
onBlurCapture: grid.onBlurCapture
|
|
1293
|
+
}, headGroup = /* @__PURE__ */ jsx3(
|
|
1294
|
+
TableHead,
|
|
1295
|
+
{
|
|
1296
|
+
table,
|
|
1297
|
+
columnIndices,
|
|
1298
|
+
columns: allColumns,
|
|
1299
|
+
hiddenColumns,
|
|
1300
|
+
spans,
|
|
1301
|
+
groupMarks,
|
|
1302
|
+
sortableIds,
|
|
1303
|
+
sort,
|
|
1304
|
+
onToggleSort: toggleSort,
|
|
1305
|
+
pinned,
|
|
1306
|
+
trackColumn,
|
|
1307
|
+
theme,
|
|
1308
|
+
windowIds,
|
|
1309
|
+
wideGroups
|
|
1310
|
+
}
|
|
1311
|
+
), rowShared = {
|
|
1312
|
+
palette: tableOptions.palette,
|
|
1313
|
+
rowIndices,
|
|
1314
|
+
columnIndices,
|
|
1315
|
+
isTree,
|
|
1316
|
+
columns: allColumns,
|
|
1317
|
+
hiddenColumns,
|
|
1318
|
+
collapsedSet,
|
|
1319
|
+
closers,
|
|
1320
|
+
mountCollapsed: tableOptions.mountCollapsed !== !1,
|
|
1321
|
+
anchorWash: tableOptions.anchorWash === !0,
|
|
1322
|
+
barMaxima,
|
|
1323
|
+
grounds,
|
|
1324
|
+
groundMode: tableOptions.groupGround ?? theme.table?.groupGround ?? "expanded",
|
|
1325
|
+
heatLanes,
|
|
1326
|
+
sparkDomains,
|
|
1327
|
+
sparkWidths,
|
|
1328
|
+
theme,
|
|
1329
|
+
measure: request?.fontMetrics ?? defaultMeasurer,
|
|
1330
|
+
groupMarks,
|
|
1331
|
+
levelNouns: table.levelNouns,
|
|
1332
|
+
childCounts,
|
|
1333
|
+
inlineVisibility,
|
|
1334
|
+
onToggleRow: toggleRow,
|
|
1335
|
+
readOnly: readOnlyTree,
|
|
1336
|
+
staticMarks: readOnlyTree && tableOptions.outlineMarks === !0,
|
|
1337
|
+
onSelect: selectRow,
|
|
1338
|
+
selectable: isRowSelectable,
|
|
1339
|
+
labelLead: rowLabelLead,
|
|
1340
|
+
filler,
|
|
1341
|
+
focus: grid.focus,
|
|
1342
|
+
pinned,
|
|
1343
|
+
trackColumn,
|
|
1344
|
+
columnEdges,
|
|
1345
|
+
figures,
|
|
1346
|
+
foldOn,
|
|
1347
|
+
liteSlots,
|
|
1348
|
+
columnPlan
|
|
1349
|
+
}, rowGroup = (node) => /* @__PURE__ */ jsx3(TableRowGroup, { node, hidden: !1, ...rowShared }, node.row.id), floatHeading = floatId === void 0 ? void 0 : table.rows.find((row) => row.id === floatId), bodyGroup = /* @__PURE__ */ jsx3("div", { role: "rowgroup", "data-bp-rowgroup": "body", children: rowWindowed ? rowPages.map((nodes, index) => /* @__PURE__ */ jsx3(
|
|
1350
|
+
TableRowPage,
|
|
1351
|
+
{
|
|
1352
|
+
...rowShared,
|
|
1353
|
+
nodes,
|
|
1354
|
+
index,
|
|
1355
|
+
contain: containRowPages && !labelsWrap && !printing,
|
|
1356
|
+
filler: frameReach === 0 && gridWidth >= container.size.width ? void 0 : filler,
|
|
1357
|
+
light: !printing && !rowPagesInView.has(index) && !nodes.some((node) => node.row.id === grid.focus?.rowId)
|
|
1358
|
+
},
|
|
1359
|
+
index
|
|
1360
|
+
)) : sticky.sections && !pageHead ? sectionScopes(rowTree).map((item) => "scope" in item ? /* @__PURE__ */ jsx3("div", { className: "bp-section-scope", children: item.nodes.map(rowGroup) }, `scope:${item.scope}`) : rowGroup(item)) : rowTree.map(rowGroup) }), figure = /* @__PURE__ */ jsxs2("figure", { ref: displayRef, className: "bp-table", "data-bp-chart": "table", "data-bp-table-theme": themeScope, "data-bp-motion": provider?.motion, "data-bp-mount": tableOptions.mountCollapsed === !1 ? "open" : void 0, "data-bp-density": density, "data-bp-mode": frame.mode === "compact" ? "compact" : void 0, "data-bp-fill-height": fillHeight ? "" : void 0, style: figureStyle, children: [
|
|
1361
|
+
/* @__PURE__ */ jsx3(TableThemeStyle, { stylesheet, scope: themeScope, nonce: styleNonce }),
|
|
1362
|
+
/* @__PURE__ */ jsx3(
|
|
1363
|
+
TableCaption,
|
|
1364
|
+
{
|
|
1365
|
+
frame,
|
|
1366
|
+
theme,
|
|
1367
|
+
keyEntries: tableOptions.legend === "none" ? [] : heatKey(columns, heatLanes, theme, tableOptions.strings, tableOptions.locale?.language),
|
|
1368
|
+
arrowEntries: tableOptions.legend === "none" ? [] : arrowKey(columns, rows)
|
|
1369
|
+
}
|
|
1370
|
+
),
|
|
1371
|
+
/* @__PURE__ */ jsx3("p", { id: summaryId, className: "bp-summary", children: frame.summary }),
|
|
1372
|
+
/* @__PURE__ */ jsx3(TableColumnToggles, { toggles: toolbar ? table.columnToggles : [], visibility: columnVisibility, onToggle: toggleColumns }),
|
|
1373
|
+
pageHead ? (
|
|
1374
|
+
// Page mode (`stickyLabels.head: 'page'`): the live head sits OUTSIDE the box that scrolls sideways, so the page
|
|
1375
|
+
// scroll can pin it; an overflow ancestor would capture `position: sticky`. The head box follows the body's
|
|
1376
|
+
// sideways scroll (see the scroll effect), and the table stays one grid.
|
|
1377
|
+
/* @__PURE__ */ jsxs2("div", { ref: grid.tableRef, ...gridProps, style: { ...gridStyle, ...scrollStyle, ...stickyVars, ...printFit, "--bp-pin-end": `${pinEnd}px` }, children: [
|
|
1378
|
+
/* @__PURE__ */ jsx3("div", { ref: setHeadBox, className: "bp-page-head", children: headGroup }),
|
|
1379
|
+
sticky.sections ? /* @__PURE__ */ jsx3("div", { className: "bp-section-float", "aria-hidden": "true", children: /* @__PURE__ */ jsx3("div", { ref: setFloatClip, className: "bp-section-float-clip", style: { visibility: "hidden" }, children: /* @__PURE__ */ jsx3("div", { ref: setFloatInner, className: "bp-section-float-inner", children: floatHeading === void 0 ? null : /* @__PURE__ */ jsx3(TableGridRow, { row: floatHeading, collapsed: !1, hidden: !1, floating: !0, ...rowShared, readOnly: !0, staticMarks: tableOptions.outlineMarks === !0, onSelect: void 0, selectable: void 0, focus: void 0 }) }) }) }) : null,
|
|
1380
|
+
/* @__PURE__ */ jsx3("div", { ref: setScroller, className: "bp-scroll", children: bodyGroup })
|
|
1381
|
+
] })
|
|
1382
|
+
) : /* @__PURE__ */ jsx3("div", { ref: setScroller, className: "bp-scroll", style: scrollStyle, children: /* @__PURE__ */ jsxs2("div", { ref: grid.tableRef, ...gridProps, style: { ...gridStyle, ...stickyVars, ...printFit, "--bp-pin-end": `${pinEnd}px` }, children: [
|
|
1383
|
+
headGroup,
|
|
1384
|
+
bodyGroup
|
|
1385
|
+
] }) }),
|
|
1386
|
+
frame.footnotes.length > 0 ? /* @__PURE__ */ jsx3("ul", { className: "bp-footnotes", children: frame.footnotes.map((footnote, index) => /* @__PURE__ */ jsx3("li", { children: footnote }, `${index}:${footnote}`)) }) : null,
|
|
1387
|
+
frame.pointer ? (
|
|
1388
|
+
// The author's notes the placement keeps out of the frame (footer rule), behind a native disclosure.
|
|
1389
|
+
// Print shows the list open in place of the disclosure, as ChartFooter's panel does: a closed
|
|
1390
|
+
// <details> keeps its content out of print in browsers without ::details-content.
|
|
1391
|
+
/* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
1392
|
+
/* @__PURE__ */ jsxs2("details", { className: "bp-notes", children: [
|
|
1393
|
+
/* @__PURE__ */ jsx3("summary", { children: frame.pointer }),
|
|
1394
|
+
/* @__PURE__ */ jsx3("ul", { className: "bp-footnotes", children: frame.listed.map((note, index) => /* @__PURE__ */ jsx3("li", { children: note }, `${index}:${note}`)) })
|
|
1395
|
+
] }),
|
|
1396
|
+
/* @__PURE__ */ jsx3("div", { className: "bp-notes-print", children: /* @__PURE__ */ jsx3("ul", { className: "bp-footnotes", children: frame.listed.map((note, index) => /* @__PURE__ */ jsx3("li", { children: note }, `${index}:${note}`)) }) })
|
|
1397
|
+
] })
|
|
1398
|
+
) : null,
|
|
1399
|
+
frame.source ? /* @__PURE__ */ jsx3("p", { className: "bp-source", children: frame.source }) : null
|
|
1400
|
+
] });
|
|
1401
|
+
return wrap(withInteraction(figure));
|
|
1402
|
+
}
|
|
1403
|
+
function scrollBoxTo(box, left, behavior) {
|
|
1404
|
+
typeof box.scrollTo == "function" ? box.scrollTo({ left, ...behavior === void 0 ? {} : { behavior } }) : box.scrollLeft = left;
|
|
1405
|
+
}
|
|
1406
|
+
function TableColumnToggles({ toggles, visibility, onToggle }) {
|
|
1407
|
+
return toggles.length ? /* @__PURE__ */ jsx3("div", { className: "bp-col-toolbar", role: "group", "aria-label": "Column groups", children: toggles.map((toggle) => /* @__PURE__ */ jsx3(
|
|
1408
|
+
"button",
|
|
1409
|
+
{
|
|
1410
|
+
type: "button",
|
|
1411
|
+
className: "bp-col-toggle",
|
|
1412
|
+
"data-bp-toggle-cols": toggle.id,
|
|
1413
|
+
"data-bp-default-visible": String(toggle.visible),
|
|
1414
|
+
"aria-pressed": visibility[toggle.id] ?? toggle.visible,
|
|
1415
|
+
onClick: () => onToggle(toggle.id),
|
|
1416
|
+
children: toggle.label
|
|
1417
|
+
},
|
|
1418
|
+
toggle.id
|
|
1419
|
+
)) }) : null;
|
|
1420
|
+
}
|
|
1421
|
+
function TableCaption({ frame, keyEntries, arrowEntries, theme }) {
|
|
1422
|
+
let keyed = keyEntries.length + arrowEntries.length > 0;
|
|
1423
|
+
return !frame.title && !frame.subtitle && !keyed ? null : /* @__PURE__ */ jsxs2("figcaption", { children: [
|
|
1424
|
+
frame.title ? /* @__PURE__ */ jsxs2("span", { className: "bp-title", children: [
|
|
1425
|
+
frame.title,
|
|
1426
|
+
frame.markerNotes ? /* @__PURE__ */ jsx3("sup", { className: "bp-footnote-marker", "aria-label": frame.markerNotes, children: "1" }) : null
|
|
1427
|
+
] }) : null,
|
|
1428
|
+
frame.title && frame.subtitle ? " " : null,
|
|
1429
|
+
frame.subtitle ? /* @__PURE__ */ jsx3("span", { className: "bp-subtitle", children: frame.subtitle }) : null,
|
|
1430
|
+
keyed ? /* @__PURE__ */ jsxs2("span", { className: "bp-key", role: "list", "aria-label": "Key", children: [
|
|
1431
|
+
keyEntries.map((entry) => /* @__PURE__ */ jsxs2("span", { role: "listitem", children: [
|
|
1432
|
+
/* @__PURE__ */ jsx3("i", { "aria-hidden": "true", style: { background: resolvePaint(entry.fill, theme) } }),
|
|
1433
|
+
entry.label
|
|
1434
|
+
] }, entry.id)),
|
|
1435
|
+
arrowEntries.map((entry) => /* @__PURE__ */ jsxs2("span", { role: "listitem", children: [
|
|
1436
|
+
/* @__PURE__ */ jsx3("b", { className: "bp-key-glyph", children: entry.glyph }),
|
|
1437
|
+
entry.label
|
|
1438
|
+
] }, entry.id))
|
|
1439
|
+
] }) : null
|
|
1440
|
+
] });
|
|
1441
|
+
}
|
|
1442
|
+
function openParents(table, collapsed) {
|
|
1443
|
+
let rows = table?.rows ?? [], foldable = new Set(rows.filter((row) => row.foldable !== !1).map((row) => row.id));
|
|
1444
|
+
return [...new Set(rows.map((row) => row.parentId))].filter((id) => id !== void 0 && foldable.has(id) && !collapsed.has(id));
|
|
1445
|
+
}
|
|
1446
|
+
function tableRowTree(rows, rootsHidden = !1) {
|
|
1447
|
+
let nodes = /* @__PURE__ */ new Map(), roots = [];
|
|
1448
|
+
for (let row of rows)
|
|
1449
|
+
row.inline !== !0 && nodes.set(row.id, { row, children: [] });
|
|
1450
|
+
for (let row of rows) {
|
|
1451
|
+
let node = nodes.get(row.id);
|
|
1452
|
+
if (node === void 0) continue;
|
|
1453
|
+
let parent = row.parentId === void 0 ? void 0 : nodes.get(row.parentId);
|
|
1454
|
+
rootsHidden && row.role === "data" && row.foldable !== !1 && (parent === void 0 || parent.row.role === "section" && parent.row.foldable !== !1) || (parent === void 0 ? roots.push(node) : parent.children.push(node));
|
|
1455
|
+
}
|
|
1456
|
+
return roots;
|
|
1457
|
+
}
|
|
1458
|
+
function sectionScopes(nodes) {
|
|
1459
|
+
let items = [], open;
|
|
1460
|
+
for (let node of nodes)
|
|
1461
|
+
node.row.role === "section" ? (open = { scope: node.row.id, nodes: [node] }, items.push(open)) : open !== void 0 && node.row.role !== "total" ? open.nodes.push(node) : (open = void 0, items.push(node));
|
|
1462
|
+
return items;
|
|
1463
|
+
}
|
|
1464
|
+
function firstSortDirection(column) {
|
|
1465
|
+
return column.kind === "value" || column.kind === "computed" ? "desc" : "asc";
|
|
1466
|
+
}
|
|
1467
|
+
function SortChevron({ direction }) {
|
|
1468
|
+
return /* @__PURE__ */ jsx3("svg", { width: "8", height: "8", viewBox: "0 0 8 8", "aria-hidden": "true", focusable: "false", children: /* @__PURE__ */ jsx3(
|
|
1469
|
+
"path",
|
|
1470
|
+
{
|
|
1471
|
+
d: direction === "asc" ? "M1 5l3-3 3 3" : "M1 3l3 3 3-3",
|
|
1472
|
+
stroke: "currentColor",
|
|
1473
|
+
strokeWidth: "var(--bp-stroke-mark)",
|
|
1474
|
+
strokeLinecap: "round",
|
|
1475
|
+
strokeLinejoin: "round",
|
|
1476
|
+
fill: "none"
|
|
1477
|
+
}
|
|
1478
|
+
) });
|
|
1479
|
+
}
|
|
1480
|
+
function nextSort(current, column) {
|
|
1481
|
+
let first = firstSortDirection(column);
|
|
1482
|
+
return !current || current.column !== column.id ? { column: column.id, direction: first } : current.direction === first ? { column: column.id, direction: first === "desc" ? "asc" : "desc" } : null;
|
|
1483
|
+
}
|
|
1484
|
+
function groupColIndex(ids, indices) {
|
|
1485
|
+
let first;
|
|
1486
|
+
for (let id of ids) {
|
|
1487
|
+
let index = indices.get(id);
|
|
1488
|
+
index !== void 0 && (first === void 0 || index < first) && (first = index);
|
|
1489
|
+
}
|
|
1490
|
+
return first;
|
|
1491
|
+
}
|
|
1492
|
+
function TableHead({
|
|
1493
|
+
columnIndices,
|
|
1494
|
+
table,
|
|
1495
|
+
columns,
|
|
1496
|
+
hiddenColumns,
|
|
1497
|
+
spans,
|
|
1498
|
+
groupMarks,
|
|
1499
|
+
sortableIds,
|
|
1500
|
+
sort,
|
|
1501
|
+
onToggleSort,
|
|
1502
|
+
pinned,
|
|
1503
|
+
trackColumn,
|
|
1504
|
+
theme,
|
|
1505
|
+
windowIds,
|
|
1506
|
+
wideGroups
|
|
1507
|
+
}) {
|
|
1508
|
+
let hasSubLabels = columns.some((column) => column.subLabel !== void 0), groupById = new Map(table.columnGroups.map((group) => [group.id, group])), spanById = new Map(spans.map((span) => [span.id, span])), collapsedVisibility = Object.fromEntries(
|
|
1509
|
+
table.columnToggles.map((toggle) => [toggle.id, !1])
|
|
1510
|
+
), collapsedSpanById = new Map(
|
|
1511
|
+
groupSpans(table, visibleColumns(table, collapsedVisibility)).map((span) => [
|
|
1512
|
+
span.id,
|
|
1513
|
+
span.span
|
|
1514
|
+
])
|
|
1515
|
+
), togglesByGroup = /* @__PURE__ */ new Map();
|
|
1516
|
+
for (let toggle of table.columnToggles) {
|
|
1517
|
+
let groupId = table.columns.find(
|
|
1518
|
+
(column) => toggle.columnIds.includes(column.id)
|
|
1519
|
+
)?.groupId;
|
|
1520
|
+
if (groupId === void 0) continue;
|
|
1521
|
+
let toggles = togglesByGroup.get(groupId) ?? [];
|
|
1522
|
+
toggles.push(toggle), togglesByGroup.set(groupId, toggles);
|
|
1523
|
+
}
|
|
1524
|
+
let headRef = useRef3(null), lastHidden = useRef3(hiddenColumns);
|
|
1525
|
+
useIsomorphicLayoutEffect(() => {
|
|
1526
|
+
let was = lastHidden.current;
|
|
1527
|
+
lastHidden.current = hiddenColumns;
|
|
1528
|
+
let head = headRef.current, row = head?.querySelector('[role="row"]');
|
|
1529
|
+
if (!head || !row || was === hiddenColumns) return;
|
|
1530
|
+
let ms = parseFloat(getComputedStyle(row).transitionDuration) * 1e3;
|
|
1531
|
+
if (!(ms > 0)) return;
|
|
1532
|
+
let opened = (ids) => ids.every((id) => was.has(id)) && ids.some((id) => !hiddenColumns.has(id)), cells = [...head.querySelectorAll("[data-col-id],[data-group-id]")].filter((cell) => cell.dataset.colId !== void 0 ? opened([cell.dataset.colId]) : opened(groupById.get(cell.dataset.groupId)?.columnIds ?? []));
|
|
1533
|
+
cells.forEach((cell) => cell.setAttribute("data-bp-opening", ""));
|
|
1534
|
+
let done = () => cells.forEach((cell) => cell.removeAttribute("data-bp-opening")), timer = setTimeout(done, ms);
|
|
1535
|
+
return () => {
|
|
1536
|
+
clearTimeout(timer), done();
|
|
1537
|
+
};
|
|
1538
|
+
}, [hiddenColumns]);
|
|
1539
|
+
let renderedGroups = /* @__PURE__ */ new Set(), groupCells = [];
|
|
1540
|
+
for (let column of columns) {
|
|
1541
|
+
if (column.groupId === void 0) {
|
|
1542
|
+
if (windowIds !== void 0 && !windowIds.has(column.id)) continue;
|
|
1543
|
+
groupCells.push(
|
|
1544
|
+
/* @__PURE__ */ jsx3(
|
|
1545
|
+
"div",
|
|
1546
|
+
{
|
|
1547
|
+
role: "columnheader",
|
|
1548
|
+
"aria-hidden": "true",
|
|
1549
|
+
"data-bp-hidden": hiddenColumns.has(column.id) ? "" : void 0,
|
|
1550
|
+
"data-bp-group-start": groupMarks.groupRowStart.has(column.id) ? "" : void 0,
|
|
1551
|
+
"data-bp-pin": pinned.has(column.id) ? "" : void 0,
|
|
1552
|
+
style: headCellStyle(pinned.get(column.id), trackColumn?.get(column.id))
|
|
1553
|
+
},
|
|
1554
|
+
`ungrouped:${column.id}`
|
|
1555
|
+
)
|
|
1556
|
+
);
|
|
1557
|
+
continue;
|
|
1558
|
+
}
|
|
1559
|
+
if (renderedGroups.has(column.groupId)) continue;
|
|
1560
|
+
renderedGroups.add(column.groupId);
|
|
1561
|
+
let group = groupById.get(column.groupId), span = spanById.get(column.groupId);
|
|
1562
|
+
if (group === void 0 || span === void 0) continue;
|
|
1563
|
+
let toggles = togglesByGroup.get(group.id) ?? [];
|
|
1564
|
+
groupCells.push(
|
|
1565
|
+
/* @__PURE__ */ jsx3(
|
|
1566
|
+
"div",
|
|
1567
|
+
{
|
|
1568
|
+
role: "columnheader",
|
|
1569
|
+
"aria-colspan": span.span > 0 ? span.span : void 0,
|
|
1570
|
+
"aria-colindex": groupColIndex(group.columnIds, columnIndices),
|
|
1571
|
+
"aria-hidden": span.span === 0 ? "true" : void 0,
|
|
1572
|
+
style: {
|
|
1573
|
+
gridColumn: trackColumn === void 0 ? `span ${span.fullSpan}` : `${trackColumn.get(column.id) ?? 1} / span ${span.fullSpan}`
|
|
1574
|
+
},
|
|
1575
|
+
"data-group-id": group.id,
|
|
1576
|
+
"data-colspan-full": toggles.length > 0 ? span.fullSpan : void 0,
|
|
1577
|
+
"data-colspan-visible": toggles.length > 0 ? collapsedSpanById.get(group.id) : void 0,
|
|
1578
|
+
"data-bp-hidden": span.span === 0 ? "" : void 0,
|
|
1579
|
+
"data-bp-band": group.band === !0 ? "" : void 0,
|
|
1580
|
+
"data-bp-group-wide": wideGroups.has(group.id) ? "" : void 0,
|
|
1581
|
+
"data-bp-group-start": groupMarks.groupStart.has(column.id) ? "" : void 0,
|
|
1582
|
+
"data-bp-group-end": group.columnIds.some((id) => groupMarks.groupEnd.has(id)) ? "" : void 0,
|
|
1583
|
+
"aria-label": group.heading === !1 ? group.label : void 0,
|
|
1584
|
+
children: group.heading === !1 ? null : /* @__PURE__ */ jsxs2("span", { children: [
|
|
1585
|
+
group.label,
|
|
1586
|
+
group.note === void 0 ? null : /* @__PURE__ */ jsxs2("span", { className: "bp-group-note", children: [
|
|
1587
|
+
" \xB7 ",
|
|
1588
|
+
group.note
|
|
1589
|
+
] })
|
|
1590
|
+
] })
|
|
1591
|
+
},
|
|
1592
|
+
group.id
|
|
1593
|
+
)
|
|
1594
|
+
);
|
|
1595
|
+
}
|
|
1596
|
+
return /* @__PURE__ */ jsxs2("div", { ref: headRef, role: "rowgroup", "data-bp-rowgroup": "head", children: [
|
|
1597
|
+
table.columnGroups.some((group) => group.heading !== !1) ? /* @__PURE__ */ jsx3("div", { className: "bp-groups", role: "row", "aria-rowindex": 1, children: groupCells }) : null,
|
|
1598
|
+
/* @__PURE__ */ jsx3("div", { className: "bp-columns", role: "row", "aria-rowindex": table.columnGroups.some((group) => group.heading !== !1) ? 2 : 1, children: columns.map((column) => {
|
|
1599
|
+
if (windowIds !== void 0 && !windowIds.has(column.id))
|
|
1600
|
+
return hiddenColumns.has(column.id) ? null : /* @__PURE__ */ jsx3("div", { role: "columnheader", "aria-colindex": columnIndices.get(column.id), "data-bp-lite": "", style: liteStyle(trackColumn?.get(column.id)), children: headText(column, theme) }, column.id);
|
|
1601
|
+
let sortable = sortableIds.has(column.id), active = sortable && sort?.column === column.id ? sort.direction : void 0, text = headText(column, theme);
|
|
1602
|
+
return /* @__PURE__ */ jsxs2(
|
|
1603
|
+
"div",
|
|
1604
|
+
{
|
|
1605
|
+
role: "columnheader",
|
|
1606
|
+
"aria-colindex": columnIndices.get(column.id),
|
|
1607
|
+
"data-col-id": column.id,
|
|
1608
|
+
"data-bp-column": column.id,
|
|
1609
|
+
"data-bp-detail": column.toggleGroup,
|
|
1610
|
+
"data-bp-hidden": hiddenColumns.has(column.id) ? "" : void 0,
|
|
1611
|
+
"aria-hidden": hiddenColumns.has(column.id) ? "true" : void 0,
|
|
1612
|
+
"aria-sort": sortable ? active === "asc" ? "ascending" : active === "desc" ? "descending" : "none" : void 0,
|
|
1613
|
+
"data-bp-band": groupMarks.banded.has(column.id) ? "" : void 0,
|
|
1614
|
+
"data-bp-group-start": groupMarks.groupStart.has(column.id) ? "" : void 0,
|
|
1615
|
+
"data-bp-group-end": groupMarks.groupEnd.has(column.id) ? "" : void 0,
|
|
1616
|
+
"data-bp-grounds-only": groupMarks.groundsOnly.has(column.id) ? "" : void 0,
|
|
1617
|
+
"data-emphasis": column.emphasis,
|
|
1618
|
+
"data-bp-pin": pinned.has(column.id) ? "" : void 0,
|
|
1619
|
+
"data-bp-pin-last": pinned.get(column.id)?.last === !0 ? "" : void 0,
|
|
1620
|
+
style: headCellStyle(pinned.get(column.id), trackColumn?.get(column.id)),
|
|
1621
|
+
className: alignmentClass(column),
|
|
1622
|
+
children: [
|
|
1623
|
+
sortable ? /* @__PURE__ */ jsxs2(
|
|
1624
|
+
"button",
|
|
1625
|
+
{
|
|
1626
|
+
type: "button",
|
|
1627
|
+
className: "bp-sort",
|
|
1628
|
+
"data-bp-sort": column.id,
|
|
1629
|
+
"data-bp-sort-direction": active,
|
|
1630
|
+
onClick: () => onToggleSort(column),
|
|
1631
|
+
children: [
|
|
1632
|
+
/* @__PURE__ */ jsx3("span", { className: "bp-head-label", children: text }),
|
|
1633
|
+
/* @__PURE__ */ jsx3(SortChevron, { direction: active ?? firstSortDirection(column) })
|
|
1634
|
+
]
|
|
1635
|
+
}
|
|
1636
|
+
) : /* @__PURE__ */ jsx3("span", { className: "bp-head-label", children: text }),
|
|
1637
|
+
hasSubLabels ? column.subLabel === void 0 ? /* @__PURE__ */ jsx3("span", { className: "bp-head-sub bp-head-sub-spacer", "aria-hidden": "true" }) : /* @__PURE__ */ jsx3("span", { className: "bp-head-sub", children: column.subLabel }) : null
|
|
1638
|
+
]
|
|
1639
|
+
},
|
|
1640
|
+
column.id
|
|
1641
|
+
);
|
|
1642
|
+
}) })
|
|
1643
|
+
] });
|
|
1644
|
+
}
|
|
1645
|
+
function headText(column, theme) {
|
|
1646
|
+
return `${columnHeadLabel(column.label, theme ?? {})}${columnHeaderAffix(column)}`;
|
|
1647
|
+
}
|
|
1648
|
+
function headCellStyle(pin, gridColumn) {
|
|
1649
|
+
if (!(pin === void 0 && gridColumn === void 0))
|
|
1650
|
+
return {
|
|
1651
|
+
...pin === void 0 ? {} : { "--bp-pin-left": `${pin.left}px` },
|
|
1652
|
+
...gridColumn === void 0 ? {} : { gridColumn }
|
|
1653
|
+
};
|
|
1654
|
+
}
|
|
1655
|
+
function TableRowGroup({ node, hidden, ...shared }) {
|
|
1656
|
+
let collapsed = shared.collapsedSet.has(node.row.id), [closing, setClosing] = useState3(!1), [seenCollapsed, setSeenCollapsed] = useState3(collapsed);
|
|
1657
|
+
seenCollapsed !== collapsed && (setSeenCollapsed(collapsed), setClosing(collapsed && !shared.mountCollapsed));
|
|
1658
|
+
let closed = useCallback2(() => setClosing(!1), []);
|
|
1659
|
+
return /* @__PURE__ */ jsxs2(
|
|
1660
|
+
"div",
|
|
1661
|
+
{
|
|
1662
|
+
className: "bp-rowwrap",
|
|
1663
|
+
"data-bp-row-wrap": node.row.id,
|
|
1664
|
+
"data-bp-defer-row": !shared.mountCollapsed && node.children.length === 0 ? "" : void 0,
|
|
1665
|
+
style: !shared.mountCollapsed && node.children.length === 0 ? { "--bp-defer-lines": visibleInlineRows(node.row, shared.inlineVisibility).length } : void 0,
|
|
1666
|
+
children: [
|
|
1667
|
+
/* @__PURE__ */ jsx3(TableGridRow, { row: node.row, collapsed, hidden, ...shared }),
|
|
1668
|
+
node.children.length > 0 && (shared.mountCollapsed || !collapsed || closing) ? /* @__PURE__ */ jsx3(TableChildren, { rowId: node.row.id, collapsed, onClosed: closing ? closed : void 0, children: node.children.map((child) => /* @__PURE__ */ jsx3(TableRowGroup, { node: child, hidden: hidden || collapsed, ...shared }, child.row.id)) }) : null
|
|
1669
|
+
]
|
|
1670
|
+
}
|
|
1671
|
+
);
|
|
1672
|
+
}
|
|
1673
|
+
var TableRowPage = memo(function({ nodes, index, contain, ...shared }) {
|
|
1674
|
+
return /* @__PURE__ */ jsx3(
|
|
1675
|
+
"div",
|
|
1676
|
+
{
|
|
1677
|
+
"data-bp-row-page": index,
|
|
1678
|
+
style: index > 0 && contain ? { contentVisibility: "auto", blockSize: `calc(var(--bp-row-pitch, calc(round(up, calc((var(--bp-label-size) + var(--bp-size-step)) * var(--bp-line-ratio)), 1px) + 2 * var(--bp-pad-anchor) + var(--bp-stroke-hair))) * ${nodes.length})` } : void 0,
|
|
1679
|
+
children: nodes.map((node) => /* @__PURE__ */ jsx3(TableRowGroup, { node, hidden: !1, ...shared }, node.row.id))
|
|
1680
|
+
}
|
|
1681
|
+
);
|
|
1682
|
+
});
|
|
1683
|
+
function TableChildren({ rowId, collapsed, onClosed, children }) {
|
|
1684
|
+
let element = useRef3(null), previous = useRef3(collapsed), closedRef = useRef3(onClosed);
|
|
1685
|
+
return closedRef.current = onClosed, useIsomorphicLayoutEffect(() => {
|
|
1686
|
+
let node = element.current;
|
|
1687
|
+
if (node === null || previous.current === collapsed) return;
|
|
1688
|
+
previous.current = collapsed, collapsed && node.style.maxHeight === "" && (node.style.maxHeight = "none");
|
|
1689
|
+
let natural = node.scrollHeight;
|
|
1690
|
+
node.style.maxHeight = collapsed ? `${natural}px` : "0px", node.offsetHeight, node.style.maxHeight = collapsed ? "0px" : `${natural}px`;
|
|
1691
|
+
let still = () => getComputedStyle(node).transitionDuration.split(",").every((duration) => parseFloat(duration) === 0);
|
|
1692
|
+
!collapsed && still() && (node.style.maxHeight = ""), collapsed && closedRef.current !== void 0 && (natural === 0 || still()) && closedRef.current();
|
|
1693
|
+
}, [collapsed]), /* @__PURE__ */ jsx3(
|
|
1694
|
+
"div",
|
|
1695
|
+
{
|
|
1696
|
+
ref: element,
|
|
1697
|
+
className: "bp-children",
|
|
1698
|
+
"data-bp-children": rowId,
|
|
1699
|
+
"data-bp-collapsed": collapsed ? "" : void 0,
|
|
1700
|
+
"aria-hidden": collapsed ? "true" : void 0,
|
|
1701
|
+
onTransitionEnd: (event) => {
|
|
1702
|
+
event.target !== event.currentTarget || event.propertyName !== "max-height" || (!collapsed && element.current && (element.current.style.maxHeight = ""), collapsed && closedRef.current?.());
|
|
1703
|
+
},
|
|
1704
|
+
children
|
|
1705
|
+
}
|
|
1706
|
+
);
|
|
1707
|
+
}
|
|
1708
|
+
function TableGridRow({
|
|
1709
|
+
palette,
|
|
1710
|
+
row,
|
|
1711
|
+
rowIndices,
|
|
1712
|
+
columnIndices,
|
|
1713
|
+
isTree,
|
|
1714
|
+
light,
|
|
1715
|
+
floating = !1,
|
|
1716
|
+
closers,
|
|
1717
|
+
columns,
|
|
1718
|
+
hiddenColumns,
|
|
1719
|
+
collapsed,
|
|
1720
|
+
hidden,
|
|
1721
|
+
anchorWash,
|
|
1722
|
+
barMaxima,
|
|
1723
|
+
grounds,
|
|
1724
|
+
groundMode,
|
|
1725
|
+
heatLanes,
|
|
1726
|
+
sparkDomains,
|
|
1727
|
+
sparkWidths,
|
|
1728
|
+
theme,
|
|
1729
|
+
measure,
|
|
1730
|
+
groupMarks,
|
|
1731
|
+
levelNouns,
|
|
1732
|
+
childCounts,
|
|
1733
|
+
inlineVisibility,
|
|
1734
|
+
onToggleRow,
|
|
1735
|
+
readOnly,
|
|
1736
|
+
staticMarks,
|
|
1737
|
+
onSelect,
|
|
1738
|
+
selectable,
|
|
1739
|
+
labelLead,
|
|
1740
|
+
filler,
|
|
1741
|
+
focus,
|
|
1742
|
+
pinned,
|
|
1743
|
+
trackColumn,
|
|
1744
|
+
columnEdges,
|
|
1745
|
+
figures,
|
|
1746
|
+
foldOn,
|
|
1747
|
+
liteSlots,
|
|
1748
|
+
columnPlan
|
|
1749
|
+
}) {
|
|
1750
|
+
let foldable = row.hasChildren && row.foldable !== !1, toggles = foldable && !readOnly, mark = toggles ? /* @__PURE__ */ jsx3(TreeToggle, { row, collapsed, hidden, onToggleRow }) : foldable && staticMarks ? /* @__PURE__ */ jsx3(OutlineMark, { collapsed }) : null, rowLabel = columns.find((column) => column.kind === "rowLabel"), childCount = childCounts.get(row.id) ?? 0, labelNote = row.cells[rowLabel.id]?.note !== void 0, selects = onSelect !== void 0 && row.role !== "section" && selectable?.(row, { collapsed }) !== !1, foldsOnRow = toggles && (foldOn ?? (selects ? "toggle" : "row")) === "row", handleRowClick = (event) => {
|
|
1751
|
+
let target = event.target;
|
|
1752
|
+
target instanceof Element && target.closest("a,button") || (foldsOnRow && onToggleRow(row.id), selects && onSelect(row, event, eventColumn(event)));
|
|
1753
|
+
}, handleRowKey = (event) => {
|
|
1754
|
+
if (event.defaultPrevented || event.key !== "Enter" && event.key !== " ") return;
|
|
1755
|
+
let target = event.target;
|
|
1756
|
+
!(target instanceof Element) || target.closest('[role="gridcell"],[role="rowheader"]') !== target || (event.preventDefault(), foldsOnRow && target.getAttribute("role") === "rowheader" && onToggleRow(row.id), onSelect(row, event, eventColumn(event)));
|
|
1757
|
+
}, step = Math.min(3, row.step), style = {
|
|
1758
|
+
"--bp-level": row.step,
|
|
1759
|
+
...row.spacer === void 0 ? {} : { "--bp-row-spacer": `${row.spacer}px` }
|
|
1760
|
+
}, sectionCell = row.role === "section" ? cellAttributes(row.cells[rowLabel.id], rowLabel, focus, groupMarks, hiddenColumns, hidden) : void 0;
|
|
1761
|
+
if (floating && sectionCell !== void 0) for (let key of ["data-col-id", "data-bp-row", "data-bp-column", "data-bp-label", "data-bp-mark"]) delete sectionCell[key];
|
|
1762
|
+
let sectionPin = row.role === "section" && alignmentClass(rowLabel) === void 0 ? pinned.get(rowLabel.id) : void 0, pinnedSpan = row.role === "section" && theme.table?.blockRule === "rule" && trackColumn === void 0 && pinned.size > 0 ? columns.findIndex((column) => !pinned.has(column.id)) : -1, restStart = pinnedSpan > 0 ? columnEdges.left.get(columns[pinnedSpan].id) ?? 0 : 0, sectionRules = (inPinned, start) => row.role !== "section" ? null : columnEdges.groupStart.filter((id) => pinnedSpan > 0 ? pinned.has(id) === inPinned : !pinned.has(id)).map((id) => /* @__PURE__ */ jsx3("span", { "aria-hidden": "true", className: "bp-section-rule", style: { insetInlineStart: `${columnEdges.left.get(id) - start}px` } }, id));
|
|
1763
|
+
return /* @__PURE__ */ jsxs2(
|
|
1764
|
+
"div",
|
|
1765
|
+
{
|
|
1766
|
+
role: "row",
|
|
1767
|
+
className: row.role === "total" && row.kind !== "result" && row.kind !== "driver" ? "bp-total" : void 0,
|
|
1768
|
+
"aria-rowindex": hidden || floating ? void 0 : rowIndices.get(row.id),
|
|
1769
|
+
"aria-level": isTree && !floating ? row.level + 1 : void 0,
|
|
1770
|
+
"aria-expanded": isTree && foldable && !floating ? !collapsed : void 0,
|
|
1771
|
+
"data-row-id": floating ? void 0 : row.id,
|
|
1772
|
+
"data-bp-row": floating ? void 0 : row.id,
|
|
1773
|
+
"data-bp-floating": floating ? "" : void 0,
|
|
1774
|
+
"data-parent-id": row.parentId,
|
|
1775
|
+
"data-has-children": row.hasChildren ? "true" : void 0,
|
|
1776
|
+
"data-bp-kind": row.kind,
|
|
1777
|
+
"data-bp-driver-tone": row.driverTone ? "" : void 0,
|
|
1778
|
+
"data-bp-final": closers.has(row.id) ? "" : void 0,
|
|
1779
|
+
"data-bp-divider": row.divider ? "" : void 0,
|
|
1780
|
+
"data-bp-member-open": row.kind === "member" && row.hasChildren && !collapsed ? "" : void 0,
|
|
1781
|
+
"data-bp-ground": row.kind === "member" ? row.hasChildren && !collapsed && groundMode !== "none" ? "band" : void 0 : row.kind === "measure" || row.kind === "detail" || row.kind === "split" || row.kind === "subtotal" || row.kind === "result" || row.kind === "driver" ? void 0 : row.role === "total" ? "emphasis" : (groundMode === "always" || groundMode === "expanded" && row.hasChildren && !collapsed) && grounds.has(row.id) ? "band" : void 0,
|
|
1782
|
+
"data-anchor": anchorWash && row.step === 0 && row.hasChildren ? "" : void 0,
|
|
1783
|
+
"data-level": row.level,
|
|
1784
|
+
"data-bp-step": step,
|
|
1785
|
+
"data-role": row.role,
|
|
1786
|
+
"data-relation": row.relation,
|
|
1787
|
+
"data-highlight-tone": row.highlightTone,
|
|
1788
|
+
"data-bp-spacer": row.spacer === void 0 ? void 0 : "",
|
|
1789
|
+
"data-bp-selectable": selects ? "" : void 0,
|
|
1790
|
+
style,
|
|
1791
|
+
onClick: foldsOnRow || selects ? handleRowClick : void 0,
|
|
1792
|
+
onKeyDown: selects ? handleRowKey : void 0,
|
|
1793
|
+
children: [
|
|
1794
|
+
row.role === "section" ? /* @__PURE__ */ jsxs2(
|
|
1795
|
+
"div",
|
|
1796
|
+
{
|
|
1797
|
+
role: "rowheader",
|
|
1798
|
+
"aria-colindex": 1,
|
|
1799
|
+
"aria-colspan": columnIndices.size,
|
|
1800
|
+
...sectionCell,
|
|
1801
|
+
...toggles ? expandableCellProps(row, collapsed, onToggleRow, foldsOnRow && !selects) : {},
|
|
1802
|
+
"data-bp-section-pin": sectionPin === void 0 || pinnedSpan > 0 ? void 0 : "",
|
|
1803
|
+
"data-bp-pin": pinnedSpan > 0 ? "" : void 0,
|
|
1804
|
+
"data-bp-pin-last": pinnedSpan > 0 ? "" : void 0,
|
|
1805
|
+
style: {
|
|
1806
|
+
...sectionCell?.style,
|
|
1807
|
+
...sectionPin === void 0 ? {} : { "--bp-pin-left": `${sectionPin.left}px` },
|
|
1808
|
+
gridColumn: pinnedSpan > 0 ? `1 / ${pinnedSpan + 1}` : "1 / -1"
|
|
1809
|
+
},
|
|
1810
|
+
children: [
|
|
1811
|
+
sectionRules(!0, 0),
|
|
1812
|
+
row.badge === void 0 ? /* @__PURE__ */ jsx3(
|
|
1813
|
+
CellContent,
|
|
1814
|
+
{
|
|
1815
|
+
cell: row.cells[rowLabel.id],
|
|
1816
|
+
column: rowLabel,
|
|
1817
|
+
row,
|
|
1818
|
+
mark,
|
|
1819
|
+
after: /* @__PURE__ */ jsx3(CollapsedHint, { row, collapsed, count: childCount, levelNouns })
|
|
1820
|
+
}
|
|
1821
|
+
) : (
|
|
1822
|
+
// The heading's text gives way, the chip never does. Its
|
|
1823
|
+
// paints are chipPaints, the SVG's, through the chip variables.
|
|
1824
|
+
// The line carries the mark too, so mark, heading and chip share one centre.
|
|
1825
|
+
/* @__PURE__ */ jsxs2("span", { className: "bp-section-line", children: [
|
|
1826
|
+
mark,
|
|
1827
|
+
/* @__PURE__ */ jsx3(CellContent, { cell: row.cells[rowLabel.id], column: rowLabel, row }),
|
|
1828
|
+
/* @__PURE__ */ jsx3("span", { className: "bp-section-badge", "data-tone": row.badge.tone === "neutral" ? void 0 : row.badge.tone, children: /* @__PURE__ */ jsx3("span", { className: "bp-chip", children: row.badge.text }) }),
|
|
1829
|
+
/* @__PURE__ */ jsx3(CollapsedHint, { row, collapsed, count: childCount, levelNouns })
|
|
1830
|
+
] })
|
|
1831
|
+
)
|
|
1832
|
+
]
|
|
1833
|
+
}
|
|
1834
|
+
) : null,
|
|
1835
|
+
pinnedSpan > 0 ? /* @__PURE__ */ jsx3("div", { "aria-hidden": "true", "data-bp-section-rest": "", style: { gridColumn: `${pinnedSpan + 1} / -1` }, children: sectionRules(!1, restStart) }) : null,
|
|
1836
|
+
row.role === "section" ? null : (columnPlan ?? columns.map((_, index) => index)).map((entry) => {
|
|
1837
|
+
if (typeof entry == "object") return /* @__PURE__ */ jsx3(LiteRun, { row, columns, columnIndices, from: entry.from, to: entry.to, trackColumn, slots: liteSlots, inlineVisibility }, `lite:${entry.from}`);
|
|
1838
|
+
let index = entry, column = columns[index], cell = row.cells[column.id], isLabel = column.kind === "rowLabel";
|
|
1839
|
+
return light ? /* @__PURE__ */ jsx3(
|
|
1840
|
+
"div",
|
|
1841
|
+
{
|
|
1842
|
+
role: isLabel ? "rowheader" : "gridcell",
|
|
1843
|
+
"aria-colindex": columnIndices.get(column.id),
|
|
1844
|
+
...cellAttributes(
|
|
1845
|
+
cell,
|
|
1846
|
+
column,
|
|
1847
|
+
focus,
|
|
1848
|
+
groupMarks,
|
|
1849
|
+
hiddenColumns,
|
|
1850
|
+
hidden,
|
|
1851
|
+
void 0,
|
|
1852
|
+
{ pin: pinned.get(column.id), gridColumn: trackColumn?.get(column.id) }
|
|
1853
|
+
),
|
|
1854
|
+
children: isLabel ? /* @__PURE__ */ jsx3("span", { className: "bp-value", children: cell.displayed }) : cell.displayed
|
|
1855
|
+
},
|
|
1856
|
+
column.id
|
|
1857
|
+
) : isLabel ? /* @__PURE__ */ jsxs2(
|
|
1858
|
+
"div",
|
|
1859
|
+
{
|
|
1860
|
+
role: "rowheader",
|
|
1861
|
+
"aria-colindex": columnIndices.get(column.id),
|
|
1862
|
+
title: cellTitle(void 0, cell),
|
|
1863
|
+
...cellAttributes(
|
|
1864
|
+
cell,
|
|
1865
|
+
column,
|
|
1866
|
+
focus,
|
|
1867
|
+
groupMarks,
|
|
1868
|
+
hiddenColumns,
|
|
1869
|
+
hidden,
|
|
1870
|
+
heatStyle(cell, column, heatLanes.get(column.id), theme, measure, figures),
|
|
1871
|
+
{
|
|
1872
|
+
...pinned.get(column.id) === void 0 ? {} : { pin: pinned.get(column.id) },
|
|
1873
|
+
...trackColumn?.get(column.id) === void 0 ? {} : { gridColumn: trackColumn.get(column.id) }
|
|
1874
|
+
}
|
|
1875
|
+
),
|
|
1876
|
+
...toggles ? expandableCellProps(row, collapsed, onToggleRow, foldsOnRow && !selects) : {},
|
|
1877
|
+
children: [
|
|
1878
|
+
/* @__PURE__ */ jsx3(
|
|
1879
|
+
CellContent,
|
|
1880
|
+
{
|
|
1881
|
+
cell,
|
|
1882
|
+
column,
|
|
1883
|
+
row,
|
|
1884
|
+
mark,
|
|
1885
|
+
before: labelLead === void 0 ? void 0 : leadBox(labelLead, row),
|
|
1886
|
+
barMaximum: barMaxima.get(column.id),
|
|
1887
|
+
spark: {
|
|
1888
|
+
domain: sparkDomains.get(column.id),
|
|
1889
|
+
width: sparkWidths.get(column.id),
|
|
1890
|
+
theme,
|
|
1891
|
+
measure
|
|
1892
|
+
},
|
|
1893
|
+
after: /* @__PURE__ */ jsx3(CollapsedHint, { row, collapsed, count: childCount, levelNouns })
|
|
1894
|
+
}
|
|
1895
|
+
),
|
|
1896
|
+
/* @__PURE__ */ jsx3(
|
|
1897
|
+
InlineLines,
|
|
1898
|
+
{
|
|
1899
|
+
row,
|
|
1900
|
+
column,
|
|
1901
|
+
visibility: inlineVisibility
|
|
1902
|
+
}
|
|
1903
|
+
)
|
|
1904
|
+
]
|
|
1905
|
+
},
|
|
1906
|
+
column.id
|
|
1907
|
+
) : /* @__PURE__ */ jsx3(
|
|
1908
|
+
GridValueCell,
|
|
1909
|
+
{
|
|
1910
|
+
row,
|
|
1911
|
+
column,
|
|
1912
|
+
colIndex: columnIndices.get(column.id),
|
|
1913
|
+
focus: focus?.rowId === cell.rowId && focus.colId === column.id ? focus : void 0,
|
|
1914
|
+
groupMarks,
|
|
1915
|
+
hiddenColumns,
|
|
1916
|
+
hidden,
|
|
1917
|
+
palette,
|
|
1918
|
+
heatLane: heatLanes.get(column.id),
|
|
1919
|
+
theme,
|
|
1920
|
+
measure,
|
|
1921
|
+
figures,
|
|
1922
|
+
pin: pinned.get(column.id),
|
|
1923
|
+
gridColumn: trackColumn?.get(column.id),
|
|
1924
|
+
labelNote,
|
|
1925
|
+
barMaximum: barMaxima.get(column.id),
|
|
1926
|
+
sparkDomain: sparkDomains.get(column.id),
|
|
1927
|
+
sparkWidth: sparkWidths.get(column.id),
|
|
1928
|
+
inlineVisibility
|
|
1929
|
+
},
|
|
1930
|
+
column.id
|
|
1931
|
+
);
|
|
1932
|
+
}),
|
|
1933
|
+
filler === void 0 || row.role === "section" ? null : /* @__PURE__ */ jsx3("div", { "aria-hidden": "true", "data-bp-filler": "", style: filler.gridColumn === void 0 ? void 0 : { gridColumn: filler.gridColumn } })
|
|
1934
|
+
]
|
|
1935
|
+
}
|
|
1936
|
+
);
|
|
1937
|
+
}
|
|
1938
|
+
var LiteRun = memo(function({ row, columns, columnIndices, from, to, trackColumn, slots, inlineVisibility }) {
|
|
1939
|
+
let first = columns[from], last = columns[to], startLine = trackColumn?.get(first.id), endLine = trackColumn?.get(last.id), spans = [];
|
|
1940
|
+
for (let index = from; index <= to; index++) {
|
|
1941
|
+
let column = columns[index], slot = slots.get(column.id), next = index < to ? slots.get(columns[index + 1].id) : void 0;
|
|
1942
|
+
if (!columnIndices.has(column.id)) continue;
|
|
1943
|
+
let width = slot === void 0 ? 0 : next === void 0 ? slot.width : next.start - slot.start;
|
|
1944
|
+
spans.push(/* @__PURE__ */ jsx3("span", { role: "gridcell", "aria-colindex": columnIndices.get(column.id), style: { flex: `0 0 ${width}px`, overflow: "hidden" }, children: liteText(row, column, inlineVisibility) }, column.id));
|
|
1945
|
+
}
|
|
1946
|
+
return /* @__PURE__ */ jsx3("div", { "data-bp-lite": "", style: { ...startLine === void 0 || endLine === void 0 ? {} : { gridColumn: `${startLine} / ${endLine + 1}` }, display: "flex", flexDirection: "row", overflow: "hidden", whiteSpace: "nowrap", minWidth: 0, contentVisibility: "auto", containIntrinsicSize: "auto 1px auto 1em" }, children: spans });
|
|
1947
|
+
});
|
|
1948
|
+
function liteText(row, column, inlineVisibility) {
|
|
1949
|
+
let lines = row.role === "data" ? row.inlineRows ?? [] : [], text = row.cells[column.id]?.displayed ?? "";
|
|
1950
|
+
for (let line of lines) {
|
|
1951
|
+
if (inlineVisibility[line.inlineGroup ?? line.id] === !1) continue;
|
|
1952
|
+
let part = line.cells[column.id]?.displayed ?? "";
|
|
1953
|
+
part !== "" && (text = text === "" ? part : `${text} ${part}`);
|
|
1954
|
+
}
|
|
1955
|
+
return text;
|
|
1956
|
+
}
|
|
1957
|
+
var liteStyle = (gridColumn) => ({ ...gridColumn === void 0 ? {} : { gridColumn }, overflow: "hidden", whiteSpace: "nowrap" }), GridValueCell = memo(function({ palette, row, column, colIndex, focus, groupMarks, hiddenColumns, hidden, heatLane, theme, measure, figures, pin, gridColumn, labelNote, barMaximum, sparkDomain, sparkWidth, inlineVisibility }) {
|
|
1958
|
+
let cell = row.cells[column.id];
|
|
1959
|
+
return /* @__PURE__ */ jsxs2(
|
|
1960
|
+
"div",
|
|
1961
|
+
{
|
|
1962
|
+
role: "gridcell",
|
|
1963
|
+
"aria-colindex": colIndex,
|
|
1964
|
+
title: cellTitle(inlineTitle(row, column.id), cell),
|
|
1965
|
+
...cellAttributes(
|
|
1966
|
+
cell,
|
|
1967
|
+
column,
|
|
1968
|
+
focus,
|
|
1969
|
+
groupMarks,
|
|
1970
|
+
hiddenColumns,
|
|
1971
|
+
hidden,
|
|
1972
|
+
heatStyle(cell, column, heatLane, theme, measure, figures),
|
|
1973
|
+
{ ...pin === void 0 ? {} : { pin }, ...gridColumn === void 0 ? {} : { gridColumn } }
|
|
1974
|
+
),
|
|
1975
|
+
children: [
|
|
1976
|
+
/* @__PURE__ */ jsx3(CellContent, { cell, column, row, barMaximum, spark: { domain: sparkDomain, width: sparkWidth, theme, measure, palette } }),
|
|
1977
|
+
labelNote ? /* @__PURE__ */ jsx3("span", { className: "bp-note-spacer", "aria-hidden": "true" }) : null,
|
|
1978
|
+
/* @__PURE__ */ jsx3(InlineLines, { row, column, visibility: inlineVisibility, noteLine: column.noteLine === !0 ? cell.note : void 0 })
|
|
1979
|
+
]
|
|
1980
|
+
}
|
|
1981
|
+
);
|
|
1982
|
+
});
|
|
1983
|
+
function InlineLines({ row, column, visibility, noteLine }) {
|
|
1984
|
+
let lines = row.inlineRows;
|
|
1985
|
+
if (column.kind !== "rowLabel" && column.kind !== "value" && column.kind !== "computed") return null;
|
|
1986
|
+
if (lines === void 0 || row.role !== "data")
|
|
1987
|
+
return noteLine === void 0 ? null : /* @__PURE__ */ jsx3("span", { className: "bp-note-line", children: noteLine });
|
|
1988
|
+
let notePlaced = noteLine === void 0;
|
|
1989
|
+
return /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
1990
|
+
lines.map((line) => {
|
|
1991
|
+
let group = line.inlineGroup ?? line.id, cell = line.cells[column.id], signed = line.polarity !== void 0 && column.kind !== "rowLabel", toned = column.kind !== "rowLabel" && cell?.state === "value" && cell.tone !== "neutral", text = column.kind === "rowLabel" ? line.label : cell?.displayed ?? "", holdsValue = cell !== void 0 && cell.state === "value" && cell.displayed !== "", takesNote = !notePlaced && !holdsValue && visibility[group] !== !1;
|
|
1992
|
+
return takesNote && (notePlaced = !0), /* @__PURE__ */ jsx3(
|
|
1993
|
+
"span",
|
|
1994
|
+
{
|
|
1995
|
+
className: takesNote ? "bp-line bp-note-line" : visibility[group] === !1 ? "bp-line bp-line-off" : "bp-line",
|
|
1996
|
+
"data-bp-inline": takesNote ? void 0 : group,
|
|
1997
|
+
"data-bp-line": takesNote ? void 0 : line.id,
|
|
1998
|
+
"data-bp-kind": line.kind,
|
|
1999
|
+
"data-bp-driver-tone": line.driverTone ? "" : void 0,
|
|
2000
|
+
"data-bp-signed": signed && !takesNote ? "" : void 0,
|
|
2001
|
+
"data-tone": toned ? cell.tone : void 0,
|
|
2002
|
+
"data-bp-strong": toned && cell.strong ? "" : void 0,
|
|
2003
|
+
"data-state": !takesNote && column.kind !== "rowLabel" && cell !== void 0 && cell.state !== "value" ? cell.state : void 0,
|
|
2004
|
+
children: takesNote ? noteLine : text
|
|
2005
|
+
},
|
|
2006
|
+
line.id
|
|
2007
|
+
);
|
|
2008
|
+
}),
|
|
2009
|
+
notePlaced ? null : /* @__PURE__ */ jsx3("span", { className: "bp-note-line", children: noteLine })
|
|
2010
|
+
] });
|
|
2011
|
+
}
|
|
2012
|
+
function cellTitle(lineTitle, cell) {
|
|
2013
|
+
let parts = [lineTitle, cell.band?.label].filter((part) => part !== void 0 && part !== "");
|
|
2014
|
+
return parts.length === 0 ? void 0 : parts.join(" \xB7 ");
|
|
2015
|
+
}
|
|
2016
|
+
function inlineTitle(row, columnId) {
|
|
2017
|
+
let parts = (row.inlineRows ?? []).flatMap((line) => {
|
|
2018
|
+
let cell = line.cells[columnId];
|
|
2019
|
+
return cell === void 0 || cell.displayed === "" ? [] : [`${line.label} ${cell.displayed}`.trim()];
|
|
2020
|
+
});
|
|
2021
|
+
return parts.length === 0 ? void 0 : parts.join(" \xB7 ");
|
|
2022
|
+
}
|
|
2023
|
+
function cellAttributes(cell, column, focus, groupMarks, hiddenColumns, rowHidden, heat, placement = {}) {
|
|
2024
|
+
let classes = [], alignment = alignmentClass(column);
|
|
2025
|
+
alignment !== void 0 && classes.push(alignment), numericCell(cell) && classes.push("bp-figures"), cell.deEmphasized && classes.push("bp-muted");
|
|
2026
|
+
let key = `${encodeURIComponent(cell.rowId)}:${encodeURIComponent(column.id)}`, hidden = hiddenColumns.has(column.id) || rowHidden;
|
|
2027
|
+
return {
|
|
2028
|
+
"data-col-id": column.id,
|
|
2029
|
+
"data-bp-row": cell.rowId,
|
|
2030
|
+
"data-bp-column": column.id,
|
|
2031
|
+
...column.kind === "rowLabel" ? { "data-bp-label": key } : { "data-bp-mark": key },
|
|
2032
|
+
"data-bp-detail": column.toggleGroup,
|
|
2033
|
+
"data-bp-wrap": column.wrap === !0 ? "" : void 0,
|
|
2034
|
+
"data-bp-hidden": hiddenColumns.has(column.id) ? "" : void 0,
|
|
2035
|
+
"aria-hidden": hiddenColumns.has(column.id) ? "true" : void 0,
|
|
2036
|
+
"data-bp-band": groupMarks.banded.has(column.id) ? "" : void 0,
|
|
2037
|
+
"data-bp-group-start": groupMarks.groupStart.has(column.id) ? "" : void 0,
|
|
2038
|
+
"data-bp-group-end": groupMarks.groupEnd.has(column.id) ? "" : void 0,
|
|
2039
|
+
"data-bp-grounds-only": groupMarks.groundsOnly.has(column.id) ? "" : void 0,
|
|
2040
|
+
"data-emphasis": column.emphasis,
|
|
2041
|
+
"data-state": cell.state,
|
|
2042
|
+
"data-bp-figure": isFigureCell(cell, column) ? "" : void 0,
|
|
2043
|
+
tabIndex: !hidden && focus?.rowId === cell.rowId && focus.colId === column.id ? 0 : -1,
|
|
2044
|
+
"data-tone": cell.tone === "neutral" ? void 0 : cell.tone,
|
|
2045
|
+
"data-bp-strong": cell.strong ? "" : void 0,
|
|
2046
|
+
"data-bp-bar": cell.bar === void 0 || cell.state !== "value" ? void 0 : "",
|
|
2047
|
+
"data-bp-zero": cell.zero ? "" : void 0,
|
|
2048
|
+
"data-encoding": column.kind === "encoding" ? column.encoding?.type ?? "sparkline" : column.cellEncoding?.type === "inCellBar" ? "inCellBar" : column.cellEncoding?.type === "heat" && heat !== void 0 ? "heat" : void 0,
|
|
2049
|
+
"data-bp-pin": placement.pin === void 0 ? void 0 : "",
|
|
2050
|
+
"data-bp-pin-last": placement.pin?.last === !0 ? "" : void 0,
|
|
2051
|
+
// The heat lane is paint, and the cell's own background is where it
|
|
2052
|
+
// belongs: a rule in the stylesheet could not know the value.
|
|
2053
|
+
style: heat === void 0 && placement.pin === void 0 && placement.gridColumn === void 0 && cell.bar === void 0 ? void 0 : {
|
|
2054
|
+
...cell.bar === void 0 ? {} : { "--bp-bar": String(cell.bar) },
|
|
2055
|
+
...heat === void 0 ? {} : {
|
|
2056
|
+
...heat.tint,
|
|
2057
|
+
...heat.color === void 0 ? {} : { color: heat.color },
|
|
2058
|
+
...heat.fontWeight === void 0 ? {} : { fontWeight: heat.fontWeight }
|
|
2059
|
+
},
|
|
2060
|
+
...placement.pin === void 0 ? {} : { "--bp-pin-left": `${placement.pin.left}px` },
|
|
2061
|
+
...placement.gridColumn === void 0 ? {} : { gridColumn: placement.gridColumn }
|
|
2062
|
+
},
|
|
2063
|
+
className: classes.length > 0 ? classes.join(" ") : void 0
|
|
2064
|
+
};
|
|
2065
|
+
}
|
|
2066
|
+
function heatStyle(cell, column, lane, theme, measure, figures = !0) {
|
|
2067
|
+
let encoding = column.cellEncoding;
|
|
2068
|
+
if (encoding?.type !== "heat" || lane === void 0) return;
|
|
2069
|
+
let { fill, ink, weight } = heatPaint({ cell, theme, measure }, lane, encoding), plain = { token: "ink" };
|
|
2070
|
+
if (!(fill === void 0 && weight === void 0 && figures && JSON.stringify(ink) === JSON.stringify(plain)))
|
|
2071
|
+
return {
|
|
2072
|
+
// No ground where the band has none: an unshaded cell must not paint
|
|
2073
|
+
// over the row's own band.
|
|
2074
|
+
...fill === void 0 ? {} : { tint: { ...insetTint(resolvePaint(fill, theme)), ...tableGroundTextStyle(theme, fill) } },
|
|
2075
|
+
...!figures && cell.role !== "total" ? { color: "transparent" } : JSON.stringify(ink) === JSON.stringify(plain) ? {} : { color: resolvePaint(ink, theme) },
|
|
2076
|
+
...weight === void 0 ? {} : { fontWeight: weight }
|
|
2077
|
+
};
|
|
2078
|
+
}
|
|
2079
|
+
function groupHeadingFace(fonts) {
|
|
2080
|
+
let group = fonts.group;
|
|
2081
|
+
return { ...group, letterSpacing: Math.round((group.letterSpacing ?? 0) * 1e3) / 1e3 };
|
|
2082
|
+
}
|
|
2083
|
+
function headVars(fonts) {
|
|
2084
|
+
let face = groupHeadingFace(fonts);
|
|
2085
|
+
return {
|
|
2086
|
+
"--bp-header-size": `${fonts.header.size}px`,
|
|
2087
|
+
"--bp-header-tracking": `${Math.round((fonts.header.letterSpacing ?? 0) * 1e3) / 1e3}px`,
|
|
2088
|
+
"--bp-group-head-size": `${face.size}px`,
|
|
2089
|
+
"--bp-group-head-tracking": `${face.letterSpacing}px`
|
|
2090
|
+
};
|
|
2091
|
+
}
|
|
2092
|
+
function alignmentClass(column) {
|
|
2093
|
+
return column.align === "right" ? "bp-num" : column.align === "center" ? "bp-center" : void 0;
|
|
2094
|
+
}
|
|
2095
|
+
function expandableCellProps(row, collapsed, onToggleRow, foldsOnKey) {
|
|
2096
|
+
return !row.hasChildren || row.foldable === !1 ? {} : {
|
|
2097
|
+
"aria-expanded": !collapsed,
|
|
2098
|
+
onKeyDown: (event) => {
|
|
2099
|
+
event.target !== event.currentTarget || !(event.key === "ArrowRight" && collapsed || event.key === "ArrowLeft" && !collapsed) && (!foldsOnKey || event.key !== "Enter" && event.key !== " ") || event.ctrlKey || event.metaKey || event.altKey || (event.preventDefault(), onToggleRow(row.id));
|
|
2100
|
+
}
|
|
2101
|
+
};
|
|
2102
|
+
}
|
|
2103
|
+
function TreeToggle({ row, collapsed, hidden, onToggleRow }) {
|
|
2104
|
+
return /* @__PURE__ */ jsx3(
|
|
2105
|
+
"button",
|
|
2106
|
+
{
|
|
2107
|
+
type: "button",
|
|
2108
|
+
className: "bp-tree-toggle",
|
|
2109
|
+
"data-bp-toggle-row": "",
|
|
2110
|
+
"aria-expanded": !collapsed,
|
|
2111
|
+
"aria-label": `${collapsed ? "Expand" : "Collapse"} ${row.label}`,
|
|
2112
|
+
tabIndex: hidden ? -1 : void 0,
|
|
2113
|
+
onClick: (event) => {
|
|
2114
|
+
event.stopPropagation(), onToggleRow(row.id);
|
|
2115
|
+
},
|
|
2116
|
+
children: /* @__PURE__ */ jsx3("svg", { width: "8", height: "8", viewBox: "0 0 8 8", "aria-hidden": "true", focusable: "false", children: /* @__PURE__ */ jsx3(
|
|
2117
|
+
"path",
|
|
2118
|
+
{
|
|
2119
|
+
d: collapsed ? "M1 4h6M4 1v6" : "M1 4h6",
|
|
2120
|
+
stroke: "currentColor",
|
|
2121
|
+
strokeWidth: "var(--bp-stroke-mark)",
|
|
2122
|
+
strokeLinecap: "round",
|
|
2123
|
+
fill: "none"
|
|
2124
|
+
}
|
|
2125
|
+
) })
|
|
2126
|
+
}
|
|
2127
|
+
);
|
|
2128
|
+
}
|
|
2129
|
+
function leadBox(lead, row) {
|
|
2130
|
+
let glyph = lead.render(row);
|
|
2131
|
+
if (!(glyph == null || glyph === !1))
|
|
2132
|
+
return /* @__PURE__ */ jsx3("span", { className: "bp-label-lead", style: { width: lead.width }, children: glyph });
|
|
2133
|
+
}
|
|
2134
|
+
function OutlineMark({ collapsed }) {
|
|
2135
|
+
return /* @__PURE__ */ jsx3("span", { className: "bp-tree-mark", "data-bp-outline-mark": collapsed ? "closed" : "open", "aria-hidden": "true", children: /* @__PURE__ */ jsx3("svg", { width: "8", height: "8", viewBox: "0 0 8 8", focusable: "false", children: /* @__PURE__ */ jsx3("path", { d: collapsed ? "M1 4h6M4 1v6" : "M1 4h6", stroke: "currentColor", strokeWidth: "var(--bp-stroke-mark)", strokeLinecap: "round", fill: "none" }) }) });
|
|
2136
|
+
}
|
|
2137
|
+
function CollapsedHint({ row, collapsed, count, levelNouns }) {
|
|
2138
|
+
if (!collapsed || !row.hasChildren || count === 0) return null;
|
|
2139
|
+
let noun = levelNouns?.[row.level + 1];
|
|
2140
|
+
return noun === void 0 ? null : /* @__PURE__ */ jsx3("span", { className: "bp-hint", children: `\xB7 ${count} ${count === 1 ? noun.one : noun.other}` });
|
|
2141
|
+
}
|
|
2142
|
+
var SPARK_CELL_HEIGHT = 28;
|
|
2143
|
+
function SparklineCell({ cell, column, row, spark }) {
|
|
2144
|
+
let encoding = column.encoding, width = spark.width;
|
|
2145
|
+
if (encoding?.type !== "sparkline" || width === void 0 || row.role === "section")
|
|
2146
|
+
return /* @__PURE__ */ jsx3("span", { className: "bp-muted", children: "\u2014" });
|
|
2147
|
+
let values = sparklineSourceValues(row, encoding.sourceColumns), last = lastObservedIndex(values), lastSource = last === void 0 ? void 0 : encoding.sourceColumns[last], nodes = emitSparkline(
|
|
2148
|
+
{
|
|
2149
|
+
cell,
|
|
2150
|
+
box: { x: 0, y: 0, w: width, h: SPARK_CELL_HEIGHT },
|
|
2151
|
+
theme: spark.theme,
|
|
2152
|
+
measure: spark.measure,
|
|
2153
|
+
nodeId: (suffix) => tableCellNodeId(suffix, row.id, column.id),
|
|
2154
|
+
owner: { rowId: row.id, colId: column.id }
|
|
2155
|
+
},
|
|
2156
|
+
values,
|
|
2157
|
+
{
|
|
2158
|
+
kind: encoding.kind ?? "line",
|
|
2159
|
+
domain: spark.domain ?? { min: 0, max: 0 },
|
|
2160
|
+
lastText: lastSource === void 0 ? void 0 : row.cells[lastSource]?.displayed
|
|
2161
|
+
}
|
|
2162
|
+
);
|
|
2163
|
+
return /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
2164
|
+
/* @__PURE__ */ jsx3(
|
|
2165
|
+
"svg",
|
|
2166
|
+
{
|
|
2167
|
+
className: "bp-spark",
|
|
2168
|
+
width,
|
|
2169
|
+
height: SPARK_CELL_HEIGHT,
|
|
2170
|
+
viewBox: `0 0 ${width} ${SPARK_CELL_HEIGHT}`,
|
|
2171
|
+
"aria-hidden": "true",
|
|
2172
|
+
focusable: "false",
|
|
2173
|
+
children: nodes.map((node) => sparkNode(node, spark.theme))
|
|
2174
|
+
}
|
|
2175
|
+
),
|
|
2176
|
+
/* @__PURE__ */ jsx3("span", { className: "bp-spark-text", children: sparklineSummary(row, encoding.sourceColumns, spark.theme.table?.glyphs?.missing ?? "\u2014") })
|
|
2177
|
+
] });
|
|
2178
|
+
}
|
|
2179
|
+
function sparklineSummary(row, sourceColumns, missing) {
|
|
2180
|
+
let drawn = sourceColumns.map((id) => row.cells[id]).filter((candidate) => candidate?.state === "value");
|
|
2181
|
+
return drawn.length === 0 ? missing : drawn.length === 1 ? drawn[0].displayed : `${drawn[0].displayed} \u2192 ${drawn[drawn.length - 1].displayed}`;
|
|
2182
|
+
}
|
|
2183
|
+
function sparkNode(node, theme) {
|
|
2184
|
+
let common = { key: node.id, ...sceneAttributes(node) };
|
|
2185
|
+
switch (node.t) {
|
|
2186
|
+
case "path":
|
|
2187
|
+
return /* @__PURE__ */ jsx3(
|
|
2188
|
+
"path",
|
|
2189
|
+
{
|
|
2190
|
+
...common,
|
|
2191
|
+
d: node.d,
|
|
2192
|
+
fill: node.fill === void 0 ? "none" : resolvePaint(node.fill, theme),
|
|
2193
|
+
stroke: node.stroke === void 0 ? void 0 : resolvePaint(node.stroke, theme),
|
|
2194
|
+
strokeWidth: node.width,
|
|
2195
|
+
strokeLinecap: "round",
|
|
2196
|
+
strokeLinejoin: "round"
|
|
2197
|
+
}
|
|
2198
|
+
);
|
|
2199
|
+
case "rect":
|
|
2200
|
+
return /* @__PURE__ */ jsx3(
|
|
2201
|
+
"rect",
|
|
2202
|
+
{
|
|
2203
|
+
...common,
|
|
2204
|
+
x: node.rect.x,
|
|
2205
|
+
y: node.rect.y,
|
|
2206
|
+
width: node.rect.w,
|
|
2207
|
+
height: node.rect.h,
|
|
2208
|
+
fill: node.fill === void 0 ? "none" : resolvePaint(node.fill, theme)
|
|
2209
|
+
}
|
|
2210
|
+
);
|
|
2211
|
+
case "circle":
|
|
2212
|
+
return /* @__PURE__ */ jsx3(
|
|
2213
|
+
"circle",
|
|
2214
|
+
{
|
|
2215
|
+
...common,
|
|
2216
|
+
cx: node.cx,
|
|
2217
|
+
cy: node.cy,
|
|
2218
|
+
r: node.r,
|
|
2219
|
+
fill: node.fill === void 0 ? "none" : resolvePaint(node.fill, theme)
|
|
2220
|
+
}
|
|
2221
|
+
);
|
|
2222
|
+
case "text":
|
|
2223
|
+
return /* @__PURE__ */ jsx3(
|
|
2224
|
+
"text",
|
|
2225
|
+
{
|
|
2226
|
+
...common,
|
|
2227
|
+
x: node.x,
|
|
2228
|
+
y: node.y + node.font.size * SPARK_TEXT_ASCENT,
|
|
2229
|
+
textAnchor: node.align === "end" ? "end" : node.align === "middle" ? "middle" : "start",
|
|
2230
|
+
fontFamily: node.font.family,
|
|
2231
|
+
fontSize: node.font.size,
|
|
2232
|
+
fontWeight: node.font.weight,
|
|
2233
|
+
fill: resolvePaint(node.ink, theme),
|
|
2234
|
+
children: node.lines.join(" ")
|
|
2235
|
+
}
|
|
2236
|
+
);
|
|
2237
|
+
default:
|
|
2238
|
+
return null;
|
|
2239
|
+
}
|
|
2240
|
+
}
|
|
2241
|
+
var SPARK_TEXT_ASCENT = 0.88;
|
|
2242
|
+
function CellContent({
|
|
2243
|
+
cell,
|
|
2244
|
+
column,
|
|
2245
|
+
row,
|
|
2246
|
+
barMaximum = 0,
|
|
2247
|
+
spark,
|
|
2248
|
+
after,
|
|
2249
|
+
before,
|
|
2250
|
+
mark
|
|
2251
|
+
}) {
|
|
2252
|
+
let main;
|
|
2253
|
+
if (column.kind === "encoding" && row !== void 0 && spark !== void 0)
|
|
2254
|
+
main = /* @__PURE__ */ jsx3(SparklineCell, { cell, column, row, spark });
|
|
2255
|
+
else if (hasPolarityBadge(cell, column) && spark !== void 0 && row !== void 0)
|
|
2256
|
+
main = /* @__PURE__ */ jsx3("span", { className: "bp-chip bp-polarity-badge", style: { color: resolvePaint(polarityBadgeInk(spark.theme, cell, column, row, spark.palette), spark.theme) }, children: cell.displayed });
|
|
2257
|
+
else if (cell.kind === "status" && cell.state === "value" && column.statusMark === "square")
|
|
2258
|
+
main = /* @__PURE__ */ jsxs2("span", { className: "bp-status-mark", "data-status": typeof cell.raw == "string" ? cell.raw : cell.displayed, children: [
|
|
2259
|
+
/* @__PURE__ */ jsx3("span", { className: "bp-status-square", "aria-hidden": "true" }),
|
|
2260
|
+
/* @__PURE__ */ jsx3("span", { className: "bp-status-text", children: cell.displayed })
|
|
2261
|
+
] });
|
|
2262
|
+
else if (cell.kind === "status" && cell.state === "value")
|
|
2263
|
+
main = /* @__PURE__ */ jsx3(
|
|
2264
|
+
"span",
|
|
2265
|
+
{
|
|
2266
|
+
className: "bp-chip",
|
|
2267
|
+
"data-status": typeof cell.raw == "string" ? cell.raw : cell.displayed,
|
|
2268
|
+
children: cell.displayed
|
|
2269
|
+
}
|
|
2270
|
+
);
|
|
2271
|
+
else if (column.cellEncoding?.type === "inCellBar" && cell.state === "value" && typeof cell.raw == "number") {
|
|
2272
|
+
let scale = barMaximum > 0 ? Math.min(100, 100 * Math.abs(cell.raw) / barMaximum) : 0;
|
|
2273
|
+
main = /* @__PURE__ */ jsxs2("span", { className: "bp-in-cell-bar", "data-bar-sign": cell.raw !== 0 && badSide(cell.raw < 0, cell.polarity) ? "negative" : "positive", children: [
|
|
2274
|
+
/* @__PURE__ */ jsx3("span", { className: "bp-in-cell-track", "aria-hidden": "true", children: /* @__PURE__ */ jsx3("span", { className: "bp-in-cell-fill", style: { width: `${scale}%` } }) }),
|
|
2275
|
+
/* @__PURE__ */ jsx3("span", { className: "bp-in-cell-value", children: cell.displayed })
|
|
2276
|
+
] });
|
|
2277
|
+
} else column.cellEncoding?.type === "arrow" && column.kind === "computed" && column.polarity !== void 0 && cell.state === "value" && typeof cell.raw == "number" ? main = /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
2278
|
+
/* @__PURE__ */ jsx3("span", { className: "bp-arrow", "aria-hidden": "true", children: arrowGlyph(cell.raw, barMaximum, column.cellEncoding.scale) }),
|
|
2279
|
+
cell.displayed
|
|
2280
|
+
] }) : column.kind === "rowLabel" ? main = splitNameBreaks(cell.displayed).flatMap((piece, index) => index === 0 ? [piece] : [/* @__PURE__ */ jsx3("wbr", {}, index), piece]) : main = cell.displayed;
|
|
2281
|
+
let underLabel = column.kind === "rowLabel" && cell.note !== void 0, onItsOwnLine = underLabel || column.noteLine === !0, unit = column.kind === "rowLabel" ? row?.unitAffix : void 0, content = /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
2282
|
+
before,
|
|
2283
|
+
column.kind === "rowLabel" && row?.operator !== void 0 ? /* @__PURE__ */ jsx3("span", { className: "bp-operator", "aria-hidden": "true", children: row.operator }) : null,
|
|
2284
|
+
main,
|
|
2285
|
+
unit === void 0 ? null : /* @__PURE__ */ jsx3("span", { className: "bp-unit-affix", children: unit }),
|
|
2286
|
+
cell.note === void 0 || onItsOwnLine ? null : /* @__PURE__ */ jsx3("span", { className: "bp-note", children: cell.note })
|
|
2287
|
+
] }), href = safeHref(cell.href), drawn = /* @__PURE__ */ jsxs2("span", { className: "bp-value", title: column.kind === "rowLabel" ? cell.displayed : void 0, children: [
|
|
2288
|
+
href === void 0 ? content : /* @__PURE__ */ jsx3("a", { href, rel: "noopener", children: content }),
|
|
2289
|
+
after
|
|
2290
|
+
] }), value = mark == null ? drawn : /* @__PURE__ */ jsxs2("span", { className: "bp-label-line", children: [
|
|
2291
|
+
mark,
|
|
2292
|
+
drawn
|
|
2293
|
+
] });
|
|
2294
|
+
return underLabel ? /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
2295
|
+
value,
|
|
2296
|
+
/* @__PURE__ */ jsx3("span", { className: "bp-note-line", children: cell.note })
|
|
2297
|
+
] }) : value;
|
|
2298
|
+
}
|
|
2299
|
+
function safeHref(href) {
|
|
2300
|
+
if (href === void 0) return;
|
|
2301
|
+
let trimmed = href.trim();
|
|
2302
|
+
return SAFE_HREF.test(trimmed) ? trimmed : void 0;
|
|
2303
|
+
}
|
|
2304
|
+
function TableThemeStyle({ stylesheet, scope, nonce }) {
|
|
2305
|
+
let [attached, setAttached] = useState3(!1), inline = useRef3(null), root = useRef3(void 0), key = `${nonce ?? ""}\0${stylesheet}`, css = useMemo2(() => stylesheetBody(stylesheet).replace(
|
|
2306
|
+
/([^{}]+)([{}])/g,
|
|
2307
|
+
(match, selector, brace) => brace === "}" ? match : `${selector.replace(/\.bp-table(-grid)?(?![\w-])/g, (_hit, grid) => `.bp-table${grid ?? ""}[data-bp-table-theme="${scope}"]`)}{`
|
|
2308
|
+
) + `
|
|
2309
|
+
.bp-table[data-bp-motion="reduce"] .bp-tree-toggle,.bp-table[data-bp-motion="reduce"] [role="row"],.bp-table[data-bp-motion="reduce"] [role="row"]>*,.bp-table[data-bp-motion="reduce"] .bp-line,.bp-table[data-bp-motion="reduce"] .bp-children{transition:none;animation:none}
|
|
2310
|
+
@media(prefers-reduced-motion:reduce){.bp-table:not([data-bp-motion="full"]) .bp-tree-toggle,.bp-table:not([data-bp-motion="full"]) [role="row"],.bp-table:not([data-bp-motion="full"]) [role="row"]>*,.bp-table:not([data-bp-motion="full"]) .bp-line,.bp-table:not([data-bp-motion="full"]) .bp-children{transition:none;animation:none}}`, [stylesheet, scope]);
|
|
2311
|
+
return useIsomorphicLayoutEffect(() => {
|
|
2312
|
+
root.current ??= inline.current?.getRootNode();
|
|
2313
|
+
let found = root.current, owner = found?.nodeType === Node.DOCUMENT_NODE || found?.nodeType === Node.DOCUMENT_FRAGMENT_NODE && "host" in found ? found : document, doc = owner.ownerDocument ?? owner, styles = styleRegistry.get(owner);
|
|
2314
|
+
styles === void 0 && (styles = /* @__PURE__ */ new Map(), styleRegistry.set(owner, styles));
|
|
2315
|
+
let entry = styles.get(key);
|
|
2316
|
+
if (entry !== void 0 && !entry.element.isConnected && (styles.delete(key), entry = void 0), entry === void 0) {
|
|
2317
|
+
let element = doc.createElement("style");
|
|
2318
|
+
element.dataset.bpTableTheme = scope, nonce !== void 0 && (element.nonce = nonce), element.textContent = css, (owner === doc ? doc.head : owner).append(element), entry = { count: 0, element }, styles.set(key, entry);
|
|
2319
|
+
}
|
|
2320
|
+
entry.count += 1;
|
|
2321
|
+
let registered = styles;
|
|
2322
|
+
return () => {
|
|
2323
|
+
let current = registered.get(key);
|
|
2324
|
+
current !== void 0 && (current.count -= 1, current.count === 0 && (current.element.remove(), registered.delete(key)));
|
|
2325
|
+
};
|
|
2326
|
+
}, [key, css, scope, nonce]), useEffect2(() => setAttached(!0), []), attached ? null : /* @__PURE__ */ jsx3("style", { ref: inline, "data-bp-table-theme": scope, nonce, dangerouslySetInnerHTML: { __html: css } });
|
|
2327
|
+
}
|
|
2328
|
+
function stylesheetBody(stylesheet) {
|
|
2329
|
+
let open = "<style>", close = "</style>";
|
|
2330
|
+
if (!stylesheet.startsWith(open) || !stylesheet.endsWith(close))
|
|
2331
|
+
throw new Error("tableStylesheet(theme) must return one <style> element");
|
|
2332
|
+
let body = stylesheet.slice(open.length, -close.length);
|
|
2333
|
+
if (/<\/?style/i.test(body))
|
|
2334
|
+
throw new Error("tableStylesheet(theme) body carries a <style> boundary \u2014 refusing to mount");
|
|
2335
|
+
return body;
|
|
2336
|
+
}
|
|
2337
|
+
function stylesheetHash(value) {
|
|
2338
|
+
let hash = 2166136261;
|
|
2339
|
+
for (let index = 0; index < value.length; index += 1)
|
|
2340
|
+
hash ^= value.charCodeAt(index), hash = Math.imul(hash, 16777619);
|
|
2341
|
+
return (hash >>> 0).toString(36);
|
|
2342
|
+
}
|
|
2343
|
+
registeredType(tableCore);
|
|
2344
|
+
publishTableChart(TableChart);
|
|
2345
|
+
|
|
2346
|
+
// src/react/charts/table.ts
|
|
2347
|
+
var checkOptionKeys = optionKeyCheck({ tree: { target: 0, textScale: 0, textSize: 0, a11y: { title: 0, table: 0 }, mode: 0, belowMinimum: 0, size: { width: 0, height: 0, unit: 0 }, embed: { width: 0 }, margin: { top: 0, right: 0, bottom: 0, left: 0 }, canvas: { margin: { top: 0, right: 0, bottom: 0, left: 0 } }, title: 0, subtitle: { company: 0, measure: 0, period: 0, scenarios: 0 }, unit: 0, unitShown: 0, source: 0, footnotes: 0, notes: { maxListed: 0, placement: 0, maxLines: 0, show: 0, pointer: 0 }, theme: { preset: 0, overrides: 0 }, locale: { language: 0, decimal: 0, thousands: 0, minusGlyph: 0, weekStartsOn: 0 }, strings: sharedKeys10, format: 0, smallValues: 0, palette: 0, labelDensity: 0, labelPlacements: 0, legend: { position: 0, order: 0 }, scaleGroup: { y: 0, id: 0 }, sort: { categories: 0, segments: 0 }, topN: { n: 0, rest: 0, restLabel: 0, showRestCount: 0, threshold: 0 }, highlight: 0, focus: sharedKeys5, colorblindSafe: 0, interactive: 0, annotations: sharedKeys9, mountCollapsed: 0, signs: 0, driverTones: 0, judgements: 0, variant: 0, encodings: sharedKeys7, totalPosition: 0, density: 0, nulls: 0, figures: 0, expansion: { depth: 0, collapsed: 0, expanded: 0, rootsHidden: 0 }, columnVisibility: 0, inlineVisibility: 0, magnitude: 0, foldOn: 0, groupGround: 0, anchorWash: 0, stickyLabels: { head: 0, columns: 0, top: 0, sections: 0 }, frameFill: 0, rowLabelLines: 0, lastTrackFlex: 0, rowExtent: 0, sortIndicator: 0, levelOffset: 0, cellPadX: 0, groupRule: 0, groupAlign: 0, fitFormats: 0, maxGrowth: 0, labelIndent: { base: 0, step: 0 }, outlineMarks: 0 } }), TableChart2 = withRegistered(createTableChart(checkOptionKeys), registeredType(tableCore));
|
|
2348
|
+
|
|
2349
|
+
export {
|
|
2350
|
+
useRowsGate,
|
|
2351
|
+
TableFloorRequestContext,
|
|
2352
|
+
TableChart2 as TableChart
|
|
2353
|
+
};
|