boardplot 0.54.0 → 0.55.0
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 +448 -0
- package/README.md +4 -4
- package/dist/{ReaderBox-YXC5XK7D.js → ReaderBox-3FFPHWSI.js} +14 -10
- package/dist/{annotateEngine-5O3IRSQL.js → annotateEngine-ET4DM2OK.js} +3 -1
- package/dist/build-identity.json +3 -3
- package/dist/{chunk-GVKFFJ23.js → chunk-2ALFFOKB.js} +460 -148
- package/dist/chunk-2BP6X5GX.js +125 -0
- package/dist/chunk-2C4SYWZ3.js +25 -0
- package/dist/{chunk-23RWLBZF.js → chunk-2TAK2ELB.js} +3 -3
- package/dist/{chunk-J33RA3YO.js → chunk-2YNF6AHH.js} +5 -5
- package/dist/{chunk-DDI2W4TR.js → chunk-32IKJMUF.js} +3 -3
- package/dist/{chunk-7X3UZM7F.js → chunk-33FCWTGT.js} +1 -1
- package/dist/{chunk-KL2XJQAA.js → chunk-37A6CLR5.js} +1729 -196
- package/dist/{chunk-EHDWWFNV.js → chunk-3AJY353W.js} +3 -3
- package/dist/chunk-3B3CFJ2H.js +48 -0
- package/dist/{chunk-6TJDWMZV.js → chunk-3B3K7TD5.js} +83 -9
- package/dist/{chunk-WDONXBQE.js → chunk-3C24WWUQ.js} +1 -1
- package/dist/{chunk-BWTX7LUG.js → chunk-3L2VXXM4.js} +9 -4
- package/dist/{chunk-OD3IH6FG.js → chunk-3OZRODC4.js} +39 -21
- package/dist/{chunk-JB4YPOMT.js → chunk-3XOWXLLQ.js} +6 -7
- package/dist/{chunk-JAKRPSWP.js → chunk-3ZAH24P6.js} +164 -51
- package/dist/{chunk-2THWIKRB.js → chunk-4CJ6UCX4.js} +33 -16
- package/dist/{chunk-VDAZPGR2.js → chunk-4DZFR52I.js} +2 -2
- package/dist/{chunk-AZIRTSVP.js → chunk-4WT3T5SH.js} +122 -52
- package/dist/{chunk-FPPN5NAR.js → chunk-4X3HNETE.js} +3 -3
- package/dist/{chunk-WZBMTZBM.js → chunk-4Y7BA2NW.js} +4 -4
- package/dist/{chunk-TSPWXAAI.js → chunk-4YHZSPAJ.js} +6 -7
- package/dist/{chunk-GSMWHKOW.js → chunk-5DMHMQFP.js} +7 -7
- package/dist/{chunk-E64MTTBC.js → chunk-5SHI57XD.js} +45 -14
- package/dist/{chunk-A5TY7H5T.js → chunk-5SLJGRUO.js} +139 -47
- package/dist/{chunk-47BO6MYI.js → chunk-5UVJKB7L.js} +137 -70
- package/dist/{chunk-D3D7XHBI.js → chunk-63L35UCI.js} +6 -6
- package/dist/{chunk-S6CRZKPO.js → chunk-6C64IBOG.js} +5 -5
- package/dist/{chunk-ENOCOA3F.js → chunk-6D4EO3S7.js} +5 -5
- package/dist/chunk-6H3OSHEY.js +25 -0
- package/dist/chunk-6WZZADRL.js +25 -0
- package/dist/{chunk-HGGLJYPZ.js → chunk-75TWO5B2.js} +89 -57
- package/dist/chunk-7ADUVRG5.js +14 -0
- package/dist/{chunk-U4P6TQRW.js → chunk-7DAH2E4T.js} +2 -2
- package/dist/{chunk-43OQ26TL.js → chunk-7FKY6YWU.js} +8 -8
- package/dist/{chunk-RKITD2UJ.js → chunk-7GVYMGLK.js} +6 -3
- package/dist/{chunk-DSZUV3TM.js → chunk-7Q2WV6D2.js} +3 -3
- package/dist/{chunk-JFBEAUJ6.js → chunk-7Q37C6GZ.js} +1 -1
- package/dist/{chunk-GEBGBJBD.js → chunk-7UPZPFHQ.js} +41 -34
- package/dist/{chunk-T7ZCYYQZ.js → chunk-7Z73MM35.js} +14 -6
- package/dist/{chunk-VWYUUBBP.js → chunk-AB35GVPG.js} +80 -31
- package/dist/{chunk-HZG5NB7Q.js → chunk-AF7EB6N6.js} +151 -84
- package/dist/chunk-AIU4GZV5.js +24 -0
- package/dist/{chunk-TNHD4UTC.js → chunk-AM2CG7VX.js} +13 -3
- package/dist/{chunk-BXEM2CVW.js → chunk-APQPYM2Z.js} +3 -3
- package/dist/{chunk-AHQ4L3BE.js → chunk-AZM4YNRE.js} +2 -2
- package/dist/{chunk-U2HQELXL.js → chunk-B3AXM3MT.js} +2 -2
- package/dist/{chunk-6I7YZTY7.js → chunk-BDGLMWPO.js} +12 -4
- package/dist/{chunk-MKVV7GVJ.js → chunk-BFFPYT3Y.js} +13 -7
- package/dist/{chunk-EYLWVI26.js → chunk-BGJRCG7N.js} +135 -114
- package/dist/{chunk-RNOJSEES.js → chunk-BK6P6KMW.js} +1 -1
- package/dist/{chunk-XB4KZ6WO.js → chunk-BSATR6ZO.js} +40 -13
- package/dist/{chunk-PDG4IM3L.js → chunk-BVYIKLQ5.js} +1 -1
- package/dist/chunk-BWVNCLUS.js +19 -0
- package/dist/{chunk-MT4MP3UZ.js → chunk-CKNOLGRR.js} +1 -1
- package/dist/chunk-CLGUFVHM.js +24 -0
- package/dist/{chunk-VAEC53B3.js → chunk-COQEHO7B.js} +3 -3
- package/dist/{chunk-3EZRM4YM.js → chunk-CPGASWNN.js} +25 -1
- package/dist/{chunk-SFQ5ADIG.js → chunk-CVIW2MV4.js} +284 -150
- package/dist/chunk-CYKIX3IQ.js +24 -0
- package/dist/{chunk-4MREJWRM.js → chunk-CZ3WCG55.js} +5 -4
- package/dist/{chunk-DRTA6JG5.js → chunk-D2B3KP35.js} +26 -15
- package/dist/{chunk-E42JZ2DA.js → chunk-D2QMNHCC.js} +4 -5
- package/dist/{chunk-AA4U62G6.js → chunk-D7G27EYZ.js} +4 -4
- package/dist/{chunk-3RMTPAEJ.js → chunk-DB2JKPOX.js} +806 -69
- package/dist/{chunk-G6XCUX3I.js → chunk-DEYAI662.js} +60 -13
- package/dist/{chunk-4WK3CNW5.js → chunk-DRHQG44U.js} +11 -0
- package/dist/{chunk-WZGJSQKN.js → chunk-DZ3S4RPI.js} +15 -1
- package/dist/{chunk-JTJNQKPM.js → chunk-E44W4EEG.js} +2 -2
- package/dist/{chunk-QJ4WGAC6.js → chunk-E5OEWMNX.js} +66 -12
- package/dist/chunk-E6HDUEGK.js +26 -0
- package/dist/{chunk-A7IEVBYI.js → chunk-E76U5H52.js} +1 -5
- package/dist/{chunk-2IXDYW6O.js → chunk-EAR43REB.js} +195 -57
- package/dist/{chunk-MYCLO35J.js → chunk-EBC5TMI2.js} +29 -8
- package/dist/chunk-EBVJCVXL.js +25 -0
- package/dist/chunk-EC2PGJ64.js +24 -0
- package/dist/chunk-EGPXEY2K.js +24 -0
- package/dist/{chunk-LYVOL4TQ.js → chunk-EQRFSVDD.js} +2 -1
- package/dist/{chunk-WKWMOZNE.js → chunk-EW47LNWH.js} +226 -61
- package/dist/{chunk-7EVIIADO.js → chunk-EXDMYV5W.js} +3 -1
- package/dist/{chunk-WMZCOGD6.js → chunk-EZZ533MH.js} +1 -1
- package/dist/{chunk-K4RCWNLC.js → chunk-F5V7YFKS.js} +11 -8
- package/dist/{chunk-JEYJRJ7M.js → chunk-F6CVYNDY.js} +5 -4
- package/dist/{chunk-NRHTC2SQ.js → chunk-F6OLHND5.js} +2 -2
- package/dist/chunk-FI5EXISD.js +27 -0
- package/dist/{chunk-F35DA442.js → chunk-FQF7GSJK.js} +46 -27
- package/dist/{chunk-GYNZ72GO.js → chunk-FS6ZE5TG.js} +2 -2
- package/dist/{chunk-6BJQULXR.js → chunk-G63WXSQP.js} +75 -34
- package/dist/{chunk-DHWCFQNO.js → chunk-GCSCHK5Y.js} +4 -18
- package/dist/{chunk-WUKSZNHL.js → chunk-GD5TYS5R.js} +32 -21
- package/dist/{chunk-RGZGLKFB.js → chunk-GDVR3XHT.js} +418 -62
- package/dist/{chunk-UTQGZF37.js → chunk-GDZI5ZJ7.js} +1 -1
- package/dist/{chunk-FMFCGYCE.js → chunk-GFIT3FRE.js} +277 -291
- package/dist/chunk-GM2HIU6C.js +24 -0
- package/dist/{chunk-MZJBPDIL.js → chunk-GMJFCBR6.js} +1 -1
- package/dist/{chunk-PBYUJSEY.js → chunk-H3AEYPRP.js} +66 -43
- package/dist/{chunk-BUPLB3EX.js → chunk-H3IBJQ5A.js} +6 -2
- package/dist/chunk-H4VDQ7OE.js +24 -0
- package/dist/{chunk-FV32N6AF.js → chunk-H5L2P2GO.js} +6 -4
- package/dist/{chunk-F7X53SZM.js → chunk-HFRQLMKK.js} +12 -7
- package/dist/{chunk-KJEZFOO6.js → chunk-HGT3UKDW.js} +91 -48
- package/dist/{chunk-B3F4TS3V.js → chunk-HJRNBKIT.js} +768 -69
- package/dist/{chunk-G63ROSY5.js → chunk-HLOXWM2O.js} +118 -62
- package/dist/{chunk-NGRIT3CY.js → chunk-HR2BKLS3.js} +113 -128
- package/dist/{chunk-S4QSJAGY.js → chunk-HZUAEMN5.js} +1 -1
- package/dist/{chunk-OZUTYDV4.js → chunk-IF2ZABAM.js} +2 -2
- package/dist/chunk-IF76JRXT.js +24 -0
- package/dist/{chunk-4ZGN4ZUN.js → chunk-IGNBQT23.js} +87 -3
- package/dist/{chunk-B6LHZLLK.js → chunk-IGVAWAOK.js} +31 -101
- package/dist/{chunk-KFWEO4UA.js → chunk-ILFQ75N4.js} +253 -141
- package/dist/chunk-INHDHZNP.js +8 -0
- package/dist/chunk-IOKWBUQP.js +25 -0
- package/dist/{chunk-JJJ2KAHR.js → chunk-IQDMZ33D.js} +20 -9
- package/dist/{chunk-IDDA5INB.js → chunk-IVRYF7QA.js} +7 -4
- package/dist/{chunk-L7RHB734.js → chunk-J5PL6JLL.js} +1 -1
- package/dist/chunk-JBMWRXDS.js +24 -0
- package/dist/{chunk-IDT7DJ7F.js → chunk-JKOEHRGV.js} +1 -1
- package/dist/chunk-JMGB444D.js +26 -0
- package/dist/chunk-JU7S52HI.js +26 -0
- package/dist/{chunk-BBL3R5YZ.js → chunk-JXBZIJCG.js} +1 -1
- package/dist/{chunk-WLZ54FWG.js → chunk-JYAZPMSA.js} +70 -1
- package/dist/chunk-K5S3K6QK.js +24 -0
- package/dist/{chunk-V7RAPZHX.js → chunk-KAYBRD4F.js} +3 -3
- package/dist/{chunk-OMNQXHFF.js → chunk-KC52E5G4.js} +31 -20
- package/dist/{chunk-LNKY5Z2X.js → chunk-KDSYZLF6.js} +2 -3
- package/dist/{chunk-C3O45JWU.js → chunk-KEDNHCGB.js} +4 -4
- package/dist/chunk-KFGZMHIB.js +28 -0
- package/dist/{chunk-QQNPU27R.js → chunk-KHRAJDBM.js} +1 -1
- package/dist/{chunk-ZTH6YSVA.js → chunk-KND4OM4B.js} +117 -102
- package/dist/{chunk-IM4WUIR7.js → chunk-KZH2QI6S.js} +2 -2
- package/dist/{chunk-IYEFEBRN.js → chunk-KZJ5VM6E.js} +14 -3
- package/dist/{chunk-CICWSCLC.js → chunk-LA5OYJ5P.js} +146 -69
- package/dist/{chunk-I2E3YDNZ.js → chunk-LAVVML3X.js} +33 -9
- package/dist/{chunk-TKQKXBGC.js → chunk-LD4LML5P.js} +10 -8
- package/dist/{chunk-OURX73UJ.js → chunk-LF6RTFNK.js} +13 -11
- package/dist/{chunk-HDZGZJKR.js → chunk-LFUJTEJO.js} +100 -36
- package/dist/{chunk-53OYF4ZT.js → chunk-LHKDZAWN.js} +16 -8
- package/dist/{chunk-5PCCSSII.js → chunk-LLDKKEUD.js} +1 -1
- package/dist/{chunk-VNLSTZES.js → chunk-LRCO4G7C.js} +314 -92
- package/dist/{chunk-HZZH3MQI.js → chunk-LSF76AS3.js} +7 -3
- package/dist/chunk-M427S3G7.js +25 -0
- package/dist/{chunk-WGIO6AHP.js → chunk-MEMPP7VZ.js} +3 -3
- package/dist/{chunk-K4K6KGEF.js → chunk-MJMOKPTF.js} +186 -167
- package/dist/chunk-MLGEBFEX.js +47 -0
- package/dist/chunk-MLW72KWN.js +24 -0
- package/dist/chunk-MQYIBGZE.js +19 -0
- package/dist/{chunk-6NLH6TEP.js → chunk-MTRV3BJL.js} +301 -130
- package/dist/{chunk-H4H4O62O.js → chunk-N5HN5QGH.js} +1 -1
- package/dist/chunk-N5TZL74Y.js +53 -0
- package/dist/chunk-N7N5NIAU.js +211 -0
- package/dist/{chunk-G57ZO7DB.js → chunk-NA6WLZ66.js} +66 -26
- package/dist/{chunk-XNA6DATU.js → chunk-NB7M4KX4.js} +99 -56
- package/dist/{chunk-WEPAE4KG.js → chunk-NCZWLV7T.js} +4 -4
- package/dist/{chunk-C54QLNE4.js → chunk-NGA7ICG4.js} +1 -1
- package/dist/{chunk-RZB4RPPD.js → chunk-NHYKSPL4.js} +154 -99
- package/dist/chunk-NMTWUYUF.js +30 -0
- package/dist/{chunk-XTGWCYAR.js → chunk-NOCIN2EM.js} +430 -256
- package/dist/{chunk-RK4S3VPS.js → chunk-NUCYUKVH.js} +3 -3
- package/dist/{chunk-S32YYDIB.js → chunk-NVGAEQ6M.js} +4 -3
- package/dist/{chunk-4FFCIQDG.js → chunk-O2KKQNGW.js} +4 -1
- package/dist/chunk-O36WX56O.js +13 -0
- package/dist/{chunk-P52JHUUM.js → chunk-O4WJWHCH.js} +187 -85
- package/dist/{chunk-MEG4NMSI.js → chunk-O6NJDRXE.js} +2 -2
- package/dist/{chunk-UYNAL3Y3.js → chunk-O7DVW3IE.js} +141 -68
- package/dist/{chunk-TNNK4IIY.js → chunk-O7W35PT3.js} +13 -12
- package/dist/{chunk-26P4WRQC.js → chunk-ODZJ4LW7.js} +6 -3
- package/dist/{chunk-7JQAUJOL.js → chunk-OHGEDG46.js} +1 -1
- package/dist/{chunk-ISWU5YB3.js → chunk-OJ2BPQGQ.js} +11 -5
- package/dist/chunk-ONKSGT2M.js +28 -0
- package/dist/{chunk-EP54VZI5.js → chunk-OOFSQ5AS.js} +1 -1
- package/dist/{chunk-SHH2AHIU.js → chunk-OY2UJ4XK.js} +64 -42
- package/dist/{chunk-OU5K2JPF.js → chunk-P6TA7M3G.js} +102 -32
- package/dist/{chunk-PJWLKCFX.js → chunk-PQYJZMCR.js} +98 -90
- package/dist/{chunk-ELPQZIGR.js → chunk-PYV6ZIR6.js} +37 -13
- package/dist/chunk-PZ46S2SY.js +69 -0
- package/dist/{chunk-5SJQOPL7.js → chunk-Q3E74U2W.js} +4 -4
- package/dist/{chunk-4TPHMIE5.js → chunk-QBJDHFJJ.js} +4 -2
- package/dist/chunk-QBRRJ5OR.js +24 -0
- package/dist/{chunk-3FNY7ZCG.js → chunk-QEP3X3OV.js} +141 -79
- package/dist/{chunk-OMVYFSOM.js → chunk-QKWBDH2L.js} +2 -2
- package/dist/{chunk-QY5ZKUWY.js → chunk-QOWE55RR.js} +9 -3
- package/dist/{chunk-LVXOY5WL.js → chunk-QRVIS2QB.js} +6 -5
- package/dist/chunk-R27IDIJI.js +24 -0
- package/dist/{chunk-FILDYFT4.js → chunk-RNIYG6PI.js} +2 -2
- package/dist/{chunk-AVMKRVNP.js → chunk-RO2PSSAI.js} +13 -23
- package/dist/{chunk-2DR5MMDY.js → chunk-ROLR7HRB.js} +12 -6
- package/dist/{chunk-YF2PYLC4.js → chunk-RSCRIWAH.js} +1 -1
- package/dist/{chunk-T3PNYRDM.js → chunk-RTXRIZYU.js} +370 -134
- package/dist/{chunk-GGO43PHB.js → chunk-RUWNG2JC.js} +6 -5
- package/dist/chunk-RYPJB3RO.js +132 -0
- package/dist/{chunk-DAVHGK27.js → chunk-S7NRL66K.js} +46 -23
- package/dist/{chunk-VABRPZVC.js → chunk-SA46CNMS.js} +5 -1
- package/dist/{chunk-ZXOD37BE.js → chunk-SBR2RLEQ.js} +72 -38
- package/dist/chunk-SC42DPNV.js +24 -0
- package/dist/{chunk-MBVXROCI.js → chunk-SFG7NG23.js} +20 -3
- package/dist/{chunk-AG2CJ4JY.js → chunk-SNQ7D5R7.js} +18 -1
- package/dist/{chunk-3V7AA3IZ.js → chunk-SPSGUFTI.js} +11 -3
- package/dist/chunk-SRUV7AT6.js +51 -0
- package/dist/{chunk-NRF223FR.js → chunk-SZXKV3BX.js} +1 -1
- package/dist/{chunk-5A6MO4AR.js → chunk-T5Y4HXYO.js} +7 -4
- package/dist/{chunk-QR35TD2B.js → chunk-U7W7GYXP.js} +37 -37
- package/dist/{chunk-LFX7W4B7.js → chunk-UDKYY27B.js} +1 -1
- package/dist/{chunk-24BHMKDD.js → chunk-UF3HSFAE.js} +25 -2
- package/dist/chunk-UIYXMPDW.js +24 -0
- package/dist/{chunk-CPKHL7FK.js → chunk-UNMIUILK.js} +1 -1
- package/dist/chunk-V3MSLNSD.js +24 -0
- package/dist/chunk-V634AXDM.js +31 -0
- package/dist/{chunk-57ZGVAU3.js → chunk-V7F4F6JA.js} +39 -6
- package/dist/{chunk-JEL6665C.js → chunk-VBVG6NEL.js} +6 -6
- package/dist/chunk-VL7WLE4H.js +24 -0
- package/dist/chunk-W45AR6EW.js +94 -0
- package/dist/{chunk-U7LLQ7XM.js → chunk-WALYNKBN.js} +446 -103
- package/dist/{chunk-J2ROMB7J.js → chunk-WAPCCJUB.js} +64 -26
- package/dist/{chunk-WQ55QPEB.js → chunk-WDIVAU5U.js} +241 -118
- package/dist/{chunk-EHVESNLV.js → chunk-WEMUCDPK.js} +1 -1
- package/dist/{chunk-HHS6333D.js → chunk-WFSOKGGA.js} +2 -2
- package/dist/{chunk-AJHYXD5U.js → chunk-WG5CJGLU.js} +2 -2
- package/dist/{chunk-WJKVNRCR.js → chunk-WQT6HIIY.js} +18 -17
- package/dist/{chunk-KAQH75T6.js → chunk-WSJDLZSZ.js} +78 -47
- package/dist/{chunk-3UBTO342.js → chunk-WWIY6BBY.js} +77 -38
- package/dist/{chunk-33PLBIMA.js → chunk-WXJ5MHLH.js} +3 -2
- package/dist/chunk-X3YP4DUV.js +76 -0
- package/dist/{chunk-ZNHF2XCP.js → chunk-X7XTIM6U.js} +50 -36
- package/dist/chunk-XJQXFVXY.js +24 -0
- package/dist/{chunk-NQSDIDRO.js → chunk-XMN3Z43K.js} +5 -5
- package/dist/{chunk-32X7JGH3.js → chunk-XPOMQWXY.js} +89 -69
- package/dist/chunk-XVUQMZWV.js +24 -0
- package/dist/chunk-XYYRHGQI.js +24 -0
- package/dist/{chunk-EYZ6SLF3.js → chunk-XZLU3G23.js} +7 -7
- package/dist/chunk-Y2CAIAUI.js +24 -0
- package/dist/{chunk-3P4PJJND.js → chunk-Y3L655X6.js} +6 -6
- package/dist/{chunk-QKL7IY42.js → chunk-Y54LU4CU.js} +1 -1
- package/dist/chunk-YGTNVZJE.js +89 -0
- package/dist/{chunk-4WQ2MBE7.js → chunk-YLC42C3M.js} +1 -1
- package/dist/{chunk-SGD3ZHID.js → chunk-YOOHNQ3L.js} +15 -4
- package/dist/{chunk-7NWFKHSG.js → chunk-YTCIGJUU.js} +116 -42
- package/dist/{chunk-ULTSSIOU.js → chunk-YV5KYGE5.js} +1 -1
- package/dist/{chunk-BRPOSOK5.js → chunk-YXM4W3TN.js} +144 -71
- package/dist/{chunk-7EOLHBI6.js → chunk-Z2X4JQNY.js} +81 -21
- package/dist/{chunk-SZCPKGYG.js → chunk-Z5V6ZM76.js} +3 -3
- package/dist/{chunk-KBFPMESI.js → chunk-Z7NHFNH3.js} +165 -79
- package/dist/{chunk-LTMF75MR.js → chunk-ZBSNF5F7.js} +208 -62
- package/dist/chunk-ZGHBDMYF.js +24 -0
- package/dist/{chunk-KORHKDJW.js → chunk-ZHFUMVW7.js} +2 -1
- package/dist/{chunk-YS56RSTZ.js → chunk-ZLYQWUNR.js} +84 -50
- package/dist/chunk-ZTMZOKVC.js +61 -0
- package/dist/cli/index.js +3 -3
- package/dist/{core-WJSKT5XM.js → core-2SICIP63.js} +5 -1
- package/dist/{core-CJ7FFPDU.js → core-2YTKFBNZ.js} +5 -1
- package/dist/{core-JLXFDYHX.js → core-3647Z25D.js} +4 -1
- package/dist/{core-ASBJZZTP.js → core-3IJPBNGC.js} +2 -1
- package/dist/{core-DJPGSTXB.js → core-6HMJHFRR.js} +8 -1
- package/dist/{core-ONNGSKWQ.js → core-7JKE7H32.js} +5 -1
- package/dist/{core-MNUVP5IJ.js → core-BMY7OL76.js} +5 -1
- package/dist/{core-GEUPUZUY.js → core-CAL7YNFC.js} +3 -1
- package/dist/{core-JLJTP7P6.js → core-CBEGB2NO.js} +3 -1
- package/dist/{core-XKV7GMPG.js → core-CLLIG7ZU.js} +2 -1
- package/dist/{core-L7Y7YXWR.js → core-CTZLHGXE.js} +1 -1
- package/dist/{core-KZK3WCUG.js → core-EYJ3WJK4.js} +3 -1
- package/dist/{core-KF6GJOGW.js → core-FX7HRKTF.js} +2 -1
- package/dist/{core-EAIFSTDE.js → core-GQC6VDW5.js} +3 -1
- package/dist/{core-R27R6J5M.js → core-GRWI22NS.js} +3 -1
- package/dist/{core-7YKLT7KY.js → core-H7KMWYP5.js} +4 -1
- package/dist/{core-CJZXX2V3.js → core-HJUGHAX7.js} +2 -1
- package/dist/{core-YPH723Z7.js → core-JMYMIH6Z.js} +8 -1
- package/dist/{core-7R3ARYNI.js → core-KEB5PBCO.js} +5 -1
- package/dist/{core-AEYGGH7X.js → core-MEC6A5DD.js} +4 -1
- package/dist/{core-L5KTPXHC.js → core-MV6KGAUV.js} +3 -1
- package/dist/{core-34KIMTK6.js → core-NTWHFDM4.js} +2 -1
- package/dist/{core-RGLOYY73.js → core-OIC5KJSD.js} +6 -1
- package/dist/{core-V7I4F6JW.js → core-OWCTIPHD.js} +5 -1
- package/dist/{core-RCFFJANI.js → core-PMYCLXT7.js} +5 -1
- package/dist/{core-MN45UFF4.js → core-PTRQPQTO.js} +3 -1
- package/dist/{core-DKJUX7Q4.js → core-QABTVASG.js} +2 -1
- package/dist/{core-PFXIBWLD.js → core-RPQBIOU4.js} +4 -1
- package/dist/{core-W7AZNHOX.js → core-SKRADU7T.js} +3 -1
- package/dist/{core-KII4CH3W.js → core-T2KHX5LG.js} +3 -1
- package/dist/{core-DAFZ7YJW.js → core-T4ZH3FAU.js} +2 -1
- package/dist/{core-WHI4ABF2.js → core-UAY2G7LN.js} +1 -1
- package/dist/{core-O2K4BDYH.js → core-ULZ7XUQP.js} +4 -1
- package/dist/{core-3CWPIFAL.js → core-VBR253SM.js} +3 -1
- package/dist/{core-YVNOHIQ4.js → core-VMIBBHXI.js} +3 -1
- package/dist/{core-KCORN7F7.js → core-XMTKUXLO.js} +3 -1
- package/dist/{core-QXIAQFHM.js → core-YEFGEW3Z.js} +3 -1
- package/dist/{dataTable-VKEHFLJM.js → dataTable-2ZXK54TP.js} +3 -2
- package/dist/{engine-PPXKJJFI.js → engine-HGXSWGOI.js} +26 -27
- package/dist/fixtures.js +6 -1
- package/dist/{fontTables-WYCZNRE7.js → fontTables-ZPZQ6IR3.js} +1 -1
- package/dist/fonts.js +2 -1
- package/dist/geo/dach.js +3 -1
- package/dist/geo/de-states.js +3 -1
- package/dist/geo/eu27.js +3 -1
- package/dist/geo/europe.js +3 -1
- package/dist/geo/index.js +4 -2
- package/dist/geo/us-states.js +3 -1
- package/dist/geo/world.js +3 -1
- package/dist/index.js +31 -27
- package/dist/{main-53MXACOU.js → main-PVT6FMGC.js} +54 -24
- package/dist/mcp/server.js +50 -23
- package/dist/{module-SVEW5ZUE.js → module-ZSR7KTAS.js} +1 -1
- package/dist/react/bar.js +6 -1
- package/dist/react/bartable.js +6 -1
- package/dist/react/box.js +6 -1
- package/dist/react/bullet.js +4 -1
- package/dist/react/butterfly.js +5 -1
- package/dist/react/choropleth.js +4 -1
- package/dist/react/cohort.js +4 -1
- package/dist/react/column.js +9 -1
- package/dist/react/combo.js +3 -1
- package/dist/react/creative.js +2 -1
- package/dist/react/diagram.js +3 -1
- package/dist/react/dimswitch.js +4 -1
- package/dist/react/dot.js +9 -1
- package/dist/react/export.js +33 -31
- package/dist/react/funnel.js +4 -1
- package/dist/react/gantt.js +3 -1
- package/dist/react/grid.js +4 -1
- package/dist/react/heatmap.js +4 -1
- package/dist/react/histogram.js +6 -1
- package/dist/react/index.js +94 -90
- package/dist/react/kpi.js +2 -1
- package/dist/react/likert.js +7 -1
- package/dist/react/line.js +4 -1
- package/dist/react/mekko.js +5 -1
- package/dist/react/pareto.js +3 -1
- package/dist/react/pie.js +5 -1
- package/dist/react/prepare.js +33 -28
- package/dist/react/pvm.js +4 -1
- package/dist/react/pyramid.js +5 -1
- package/dist/react/sankey.js +4 -1
- package/dist/react/scatter.js +4 -1
- package/dist/react/slope.js +6 -1
- package/dist/react/sparkline.js +4 -1
- package/dist/react/spec.js +25 -32
- package/dist/react/status.js +3 -1
- package/dist/react/story.js +6 -4
- package/dist/react/table.js +4 -1
- package/dist/react/theme.js +6 -3
- package/dist/react/tilemap.js +4 -1
- package/dist/react/treemap.js +3 -1
- package/dist/react/variance.js +5 -1
- package/dist/react/waffle.js +3 -1
- package/dist/react/waterfall.js +4 -1
- package/dist/{resvg-ZOVDIZTV.js → resvg-VB7S5HRF.js} +1 -1
- package/dist/rows.js +2 -3
- package/dist/{rowsModule-L3MBGPBH.js → rowsModule-JTDPTWXG.js} +2 -1
- package/dist/{schema-6ZV532RM.js → schema-2M3LXR35.js} +1 -1
- package/dist/{schema-WAKLKLBB.js → schema-2Q7IJ22V.js} +1 -1
- package/dist/{schema-IOKAZVL7.js → schema-3OLBUVMZ.js} +1 -1
- package/dist/{schema-ZSYX76MO.js → schema-3XLO43SX.js} +1 -1
- package/dist/{schema-KHCLVE2V.js → schema-5753NOAL.js} +1 -1
- package/dist/{schema-QNI6MNQ2.js → schema-5KHDHTIX.js} +1 -1
- package/dist/{schema-HWU55RJL.js → schema-76XRTBCJ.js} +1 -1
- package/dist/{schema-KFXLS67Q.js → schema-7CPGNCOL.js} +1 -1
- package/dist/{schema-26YUL3MG.js → schema-BKHQ3ZUH.js} +1 -1
- package/dist/{schema-CMXL5F5L.js → schema-BMD5JR3Y.js} +1 -1
- package/dist/{schema-HGUBNXUY.js → schema-BOGTPL7F.js} +1 -1
- package/dist/{schema-733PO52K.js → schema-BUTNGYTT.js} +1 -1
- package/dist/{schema-GSE3QXUK.js → schema-C7NVOQNV.js} +5 -3
- package/dist/{schema-LYBOPAGQ.js → schema-FNTAAXQ3.js} +1 -1
- package/dist/{schema-MNG24WU2.js → schema-FYULDJFB.js} +1 -1
- package/dist/{schema-4ZXJCRZR.js → schema-FZKNIAIH.js} +1 -1
- package/dist/{schema-IOWE3RQO.js → schema-G2PLJCYL.js} +1 -1
- package/dist/{schema-HRHNGOFC.js → schema-GGG2VOY7.js} +2 -2
- package/dist/{schema-WCDYWS4K.js → schema-GLN7IHSH.js} +1 -1
- package/dist/{schema-H7RKVTVO.js → schema-HIDW4BA4.js} +1 -1
- package/dist/{schema-KH62LDYK.js → schema-J53LCIY3.js} +1 -1
- package/dist/{schema-5E5J43CF.js → schema-KIJA53MB.js} +2 -1
- package/dist/{schema-3W7IFXVN.js → schema-LEQNLBNG.js} +1 -1
- package/dist/{schema-GK6MD4EG.js → schema-LHMEXFLY.js} +1 -1
- package/dist/{schema-FT37ZEYY.js → schema-MT6NA5AL.js} +1 -3
- package/dist/{schema-NOPOI5G2.js → schema-MUTAVQMI.js} +1 -1
- package/dist/{schema-PNUC54GC.js → schema-NVMEOHAW.js} +1 -1
- package/dist/{schema-QLH2DZFI.js → schema-TA3MSAPQ.js} +1 -1
- package/dist/{schema-B4GFRYIP.js → schema-U26KG42U.js} +1 -1
- package/dist/{schema-KORNUIC6.js → schema-UHHFTVGS.js} +1 -1
- package/dist/{schema-GVHM2HEF.js → schema-V3BPW4LA.js} +1 -1
- package/dist/{schema-SY3MKF5S.js → schema-WIZ2TZAT.js} +1 -1
- package/dist/{schema-ZCZCY34J.js → schema-WZLWHOMY.js} +1 -1
- package/dist/{schema-Q4IPIR6W.js → schema-XATDKZPW.js} +1 -1
- package/dist/{schema-SLQPM32G.js → schema-XHKSGMUH.js} +1 -1
- package/dist/{schema-33ZF6WKL.js → schema-XKY2EQFH.js} +1 -1
- package/dist/{schema-AQD3H5VV.js → schema-ZE7WUNFS.js} +1 -1
- package/dist/{specValidation-H5B4MQST.js → specValidation-X5XJBPTP.js} +3 -1
- package/dist/theme.js +4 -2
- package/dist/{themeShapeRules-54U5EIZR.js → themeShapeRules-PW4BQHKL.js} +1 -1
- package/dist/types/core/a11y/recordsShared.d.ts +4 -0
- package/dist/types/core/annotate.d.ts +39 -0
- package/dist/types/core/annotateArms.d.ts +1 -1
- package/dist/types/core/axis.d.ts +2 -0
- package/dist/types/core/calendarLabels.d.ts +15 -0
- package/dist/types/core/charts/band/stacks.d.ts +71 -2
- package/dist/types/core/charts/bartable/types.d.ts +10 -0
- package/dist/types/core/charts/choropleth/index.d.ts +7 -0
- package/dist/types/core/charts/choropleth/layout.d.ts +7 -0
- package/dist/types/core/charts/choropleth/schema.d.ts +36 -0
- package/dist/types/core/charts/cohort/types.d.ts +8 -1
- package/dist/types/core/charts/column/layout.d.ts +1 -1
- package/dist/types/core/charts/column/model.d.ts +4 -0
- package/dist/types/core/charts/combo/endpoints.d.ts +1 -1
- package/dist/types/core/charts/creative/types.d.ts +1 -1
- package/dist/types/core/charts/dimswitch/compile.d.ts +2 -0
- package/dist/types/core/charts/dimswitch/types.d.ts +8 -0
- package/dist/types/core/charts/grid/normalize.d.ts +18 -1
- package/dist/types/core/charts/heatmap/fixtures.d.ts +2 -2
- package/dist/types/core/charts/histogram/types.d.ts +14 -2
- package/dist/types/core/charts/likert/layout.d.ts +14 -9
- package/dist/types/core/charts/logAxis.d.ts +55 -0
- package/dist/types/core/charts/pvm/types.d.ts +6 -0
- package/dist/types/core/charts/pyramid/types.d.ts +7 -4
- package/dist/types/core/charts/sankey/types.d.ts +3 -1
- package/dist/types/core/charts/scatter/clamp.d.ts +155 -0
- package/dist/types/core/charts/scatter/frontier.d.ts +21 -0
- package/dist/types/core/charts/scatter/index.d.ts +9 -0
- package/dist/types/core/charts/scatter/layout.d.ts +26 -0
- package/dist/types/core/charts/scatter/logAxis.d.ts +14 -0
- package/dist/types/core/charts/scatter/model.d.ts +258 -0
- package/dist/types/core/charts/scatter/schema.d.ts +57 -0
- package/dist/types/core/charts/scatter/trend.d.ts +54 -0
- package/dist/types/core/charts/scatter/valueLines.d.ts +47 -0
- package/dist/types/core/charts/sparkline/fixtures.d.ts +1 -1
- package/dist/types/core/charts/status/layout.d.ts +5 -3
- package/dist/types/core/charts/table/resolve.d.ts +0 -7
- package/dist/types/core/charts/tilemap/index.d.ts +6 -0
- package/dist/types/core/charts/tilemap/layout.d.ts +5 -0
- package/dist/types/core/charts/tilemap/schema.d.ts +4 -0
- package/dist/types/core/charts/treemap/types.d.ts +2 -2
- package/dist/types/core/charts/variance/fixtures.d.ts +2 -1
- package/dist/types/core/charts/waffle/types.d.ts +2 -0
- package/dist/types/core/dateFormat.d.ts +1 -1
- package/dist/types/core/doc/diagnostics.d.ts +8 -0
- package/dist/types/core/doc/document.d.ts +9 -1
- package/dist/types/core/doc/ownedDocumentCopy.d.ts +2 -1
- package/dist/types/core/fontMetrics/index.d.ts +1 -1
- package/dist/types/core/footer.d.ts +9 -1
- package/dist/types/core/format.d.ts +4 -1
- package/dist/types/core/formatSpec.d.ts +84 -6
- package/dist/types/core/frame.d.ts +41 -8
- package/dist/types/core/geo/packs/registry.d.ts +3 -2
- package/dist/types/core/geometry.d.ts +19 -0
- package/dist/types/core/icons.d.ts +11 -0
- package/dist/types/core/inputError.d.ts +3 -0
- package/dist/types/core/isoDate.d.ts +2 -0
- package/dist/types/core/label/categoryRow.d.ts +8 -0
- package/dist/types/core/label/occupied.d.ts +5 -0
- package/dist/types/core/label/solver.d.ts +31 -2
- package/dist/types/core/notes.d.ts +13 -1
- package/dist/types/core/ols.d.ts +38 -0
- package/dist/types/core/periodYears.d.ts +5 -1
- package/dist/types/core/registry.d.ts +12 -0
- package/dist/types/core/request.d.ts +3 -2
- package/dist/types/core/scale.d.ts +7 -0
- package/dist/types/core/schema/capability.d.ts +17 -20
- package/dist/types/core/schema/namedColumns.d.ts +6 -0
- package/dist/types/core/schema/refusals.d.ts +1 -4
- package/dist/types/core/shareRounding.d.ts +8 -0
- package/dist/types/core/sizing.d.ts +17 -12
- package/dist/types/core/story.d.ts +3 -0
- package/dist/types/core/target.d.ts +6 -0
- package/dist/types/core/text.d.ts +8 -0
- package/dist/types/core/theme.d.ts +52 -1
- package/dist/types/core/types/annotations.d.ts +15 -3
- package/dist/types/core/types/data.d.ts +4 -1
- package/dist/types/core/types/diagram.d.ts +81 -2
- package/dist/types/core/types/optionInput.d.ts +13 -0
- package/dist/types/core/types/options.d.ts +65 -24
- package/dist/types/core/types/scene.d.ts +79 -2
- package/dist/types/core/types/table.d.ts +9 -0
- package/dist/types/core/types/theme.d.ts +48 -3
- package/dist/types/index.d.ts +28 -27
- package/dist/types/optionTypes.d.ts +44 -0
- package/dist/types/react/DimSwitchChart.d.ts +2 -1
- package/dist/types/react/RefusalBoundary.d.ts +25 -0
- package/dist/types/react/SceneRenderer.d.ts +3 -1
- package/dist/types/react/SizePlaceholder.d.ts +2 -1
- package/dist/types/react/TableChart.d.ts +8 -4
- package/dist/types/react/barrelCharts.d.ts +1521 -1012
- package/dist/types/react/charts/bar.d.ts +36 -25
- package/dist/types/react/charts/bartable.d.ts +36 -25
- package/dist/types/react/charts/box.d.ts +36 -25
- package/dist/types/react/charts/bullet.d.ts +36 -25
- package/dist/types/react/charts/butterfly.d.ts +36 -25
- package/dist/types/react/charts/choropleth.d.ts +36 -25
- package/dist/types/react/charts/cohort.d.ts +76 -50
- package/dist/types/react/charts/column.d.ts +36 -25
- package/dist/types/react/charts/combo.d.ts +2 -1
- package/dist/types/react/charts/creative.d.ts +31 -25
- package/dist/types/react/charts/diagram.d.ts +302 -160
- package/dist/types/react/charts/dot.d.ts +36 -25
- package/dist/types/react/charts/funnel.d.ts +36 -25
- package/dist/types/react/charts/gantt.d.ts +36 -25
- package/dist/types/react/charts/grid.d.ts +38 -27
- package/dist/types/react/charts/heatmap.d.ts +36 -25
- package/dist/types/react/charts/histogram.d.ts +36 -25
- package/dist/types/react/charts/kpi.d.ts +36 -25
- package/dist/types/react/charts/likert.d.ts +36 -25
- package/dist/types/react/charts/line.d.ts +36 -25
- package/dist/types/react/charts/mekko.d.ts +36 -25
- package/dist/types/react/charts/pareto.d.ts +33 -25
- package/dist/types/react/charts/pie.d.ts +36 -25
- package/dist/types/react/charts/pvm.d.ts +36 -25
- package/dist/types/react/charts/pyramid.d.ts +33 -25
- package/dist/types/react/charts/sankey.d.ts +36 -25
- package/dist/types/react/charts/scatter.d.ts +36 -25
- package/dist/types/react/charts/slope.d.ts +36 -25
- package/dist/types/react/charts/sparkline.d.ts +36 -25
- package/dist/types/react/charts/status.d.ts +36 -25
- package/dist/types/react/charts/tilemap.d.ts +36 -25
- package/dist/types/react/charts/treemap.d.ts +36 -25
- package/dist/types/react/charts/variance.d.ts +36 -25
- package/dist/types/react/charts/waffle.d.ts +36 -25
- package/dist/types/react/charts/waterfall.d.ts +36 -25
- package/dist/types/react/createChartComponent.d.ts +11 -9
- package/dist/types/react/footerFrame.d.ts +1 -1
- package/dist/types/react/hover/engine.d.ts +2 -1
- package/dist/types/react/hover/labelCard.d.ts +14 -2
- package/dist/types/react/prepare.d.ts +2 -2
- package/dist/types/react/prepared.d.ts +5 -1
- package/dist/types/react/useContainerSize.d.ts +2 -0
- package/dist/types/rows.d.ts +1 -1
- package/dist/validate.js +12 -8
- package/docs/manual.md +139 -35
- package/docs/reference/bar.md +10 -7
- package/docs/reference/bartable.md +7 -3
- package/docs/reference/box.md +5 -2
- package/docs/reference/bullet.md +7 -5
- package/docs/reference/butterfly.md +12 -5
- package/docs/reference/choropleth.md +9 -7
- package/docs/reference/cohort.md +3 -2
- package/docs/reference/column.md +14 -7
- package/docs/reference/combo.md +8 -6
- package/docs/reference/creative.md +1 -1
- package/docs/reference/diagram.md +94 -18
- package/docs/reference/dimswitch.md +16 -13
- package/docs/reference/dot.md +7 -4
- package/docs/reference/fixtures.md +49 -5
- package/docs/reference/funnel.md +4 -3
- package/docs/reference/gantt.md +1 -1
- package/docs/reference/grid.md +1 -1
- package/docs/reference/heatmap.md +6 -4
- package/docs/reference/histogram.md +7 -4
- package/docs/reference/kpi.md +11 -8
- package/docs/reference/likert.md +7 -3
- package/docs/reference/line.md +9 -8
- package/docs/reference/mekko.md +4 -4
- package/docs/reference/options.md +34 -32
- package/docs/reference/pareto.md +4 -4
- package/docs/reference/pie.md +8 -7
- package/docs/reference/pvm.md +4 -2
- package/docs/reference/pyramid.md +4 -4
- package/docs/reference/react.md +20 -11
- package/docs/reference/sankey.md +5 -3
- package/docs/reference/scatter.md +3 -3
- package/docs/reference/slope.md +7 -6
- package/docs/reference/sparkline.md +6 -5
- package/docs/reference/status.md +6 -4
- package/docs/reference/table.md +28 -26
- package/docs/reference/theme.md +93 -85
- package/docs/reference/tilemap.md +7 -6
- package/docs/reference/treemap.md +6 -5
- package/docs/reference/variance.md +8 -5
- package/docs/reference/waffle.md +2 -1
- package/docs/reference/waterfall.md +12 -9
- package/docs/use-cases.md +25 -2
- package/llms.txt +1 -1
- package/package.json +1 -1
- package/dist/chunk-2HXKW6U6.js +0 -24
- package/dist/chunk-35ZTANEK.js +0 -24
- package/dist/chunk-3CLLHMFF.js +0 -24
- package/dist/chunk-46ZPFJAM.js +0 -24
- package/dist/chunk-6BWSF5PS.js +0 -24
- package/dist/chunk-6K2TMVPF.js +0 -42
- package/dist/chunk-6KWIQ5KF.js +0 -18
- package/dist/chunk-6ZXMA4TY.js +0 -24
- package/dist/chunk-7HFUG25L.js +0 -24
- package/dist/chunk-7R5EV5MS.js +0 -24
- package/dist/chunk-7X65ZQN4.js +0 -38
- package/dist/chunk-ATUZTGZI.js +0 -25
- package/dist/chunk-BW5VLBSZ.js +0 -15
- package/dist/chunk-BYD7VLAI.js +0 -24
- package/dist/chunk-CEY646NZ.js +0 -28
- package/dist/chunk-D7GZPMHW.js +0 -24
- package/dist/chunk-FIANWJXX.js +0 -19
- package/dist/chunk-H4SYN3QA.js +0 -24
- package/dist/chunk-HC4NDND6.js +0 -24
- package/dist/chunk-HNVW3YDS.js +0 -25
- package/dist/chunk-HW7BPJNQ.js +0 -24
- package/dist/chunk-I5L3QTKQ.js +0 -24
- package/dist/chunk-IK4BHOPZ.js +0 -33
- package/dist/chunk-IMJXJHFW.js +0 -88
- package/dist/chunk-JDEVGTSX.js +0 -24
- package/dist/chunk-K2KU4HHT.js +0 -25
- package/dist/chunk-KDMKHR5A.js +0 -32
- package/dist/chunk-KNZD53L4.js +0 -24
- package/dist/chunk-KOJ5QETJ.js +0 -8
- package/dist/chunk-KSQEG6DX.js +0 -24
- package/dist/chunk-KVSJ2O4Q.js +0 -24
- package/dist/chunk-L3JWM7FR.js +0 -50
- package/dist/chunk-L7FSCT4M.js +0 -28
- package/dist/chunk-LMPZKCDM.js +0 -24
- package/dist/chunk-MONVTUHR.js +0 -24
- package/dist/chunk-NWQTSZYC.js +0 -24
- package/dist/chunk-OM67S6S4.js +0 -19
- package/dist/chunk-OTW5SEFS.js +0 -21
- package/dist/chunk-PGV25HTX.js +0 -25
- package/dist/chunk-QGCEHR6S.js +0 -13
- package/dist/chunk-T3IGJARD.js +0 -22
- package/dist/chunk-U2ES66IN.js +0 -26
- package/dist/chunk-U6CJPTOB.js +0 -19
- package/dist/chunk-VDVXGAIP.js +0 -24
- package/dist/chunk-VGWWUCAB.js +0 -24
- package/dist/chunk-X4U6PT3Z.js +0 -33
- package/dist/chunk-XXNLNZ7E.js +0 -24
- package/dist/chunk-ZBJNEJSL.js +0 -24
- package/dist/chunk-ZWJTHFWB.js +0 -27
- /package/dist/{DiagnosticDetails-UNYNYCAH.js → DiagnosticDetails-JFBBXOT2.js} +0 -0
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BADGE_SECTION_ONLY,
|
|
3
3
|
BADGE_TEXT_EMPTY,
|
|
4
|
-
STATUS_VALUES
|
|
5
|
-
|
|
4
|
+
STATUS_VALUES,
|
|
5
|
+
STATUS_WORDS
|
|
6
|
+
} from "./chunk-7ADUVRG5.js";
|
|
6
7
|
import {
|
|
7
8
|
tableCellKey
|
|
8
9
|
} from "./chunk-M4SPKUZE.js";
|
|
9
10
|
import {
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
calcFlipsWithInputs,
|
|
12
|
+
calcIsLinear,
|
|
13
|
+
calcPreservesScale,
|
|
14
|
+
calcYieldsPoints,
|
|
15
|
+
columnOwnsFormat
|
|
16
|
+
} from "./chunk-X3YP4DUV.js";
|
|
12
17
|
import {
|
|
13
18
|
DEFAULT_TRACK_GROWTH,
|
|
14
19
|
DENSE_COLUMNS,
|
|
@@ -26,6 +31,7 @@ import {
|
|
|
26
31
|
frameFillExtras,
|
|
27
32
|
groupHeadingFaces,
|
|
28
33
|
groupHeadingFloors,
|
|
34
|
+
groupHeadingNeed,
|
|
29
35
|
headerContentWidth,
|
|
30
36
|
headsFit,
|
|
31
37
|
inlineFont,
|
|
@@ -34,12 +40,16 @@ import {
|
|
|
34
40
|
labelIndents,
|
|
35
41
|
rowFont,
|
|
36
42
|
sectionChipFloor,
|
|
43
|
+
strongColumnFont,
|
|
37
44
|
tableFonts,
|
|
38
45
|
wrapFloorWidth
|
|
39
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-7Z73MM35.js";
|
|
40
47
|
import {
|
|
41
48
|
toneTextPaint
|
|
42
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-BVYIKLQ5.js";
|
|
50
|
+
import {
|
|
51
|
+
fieldHeadText
|
|
52
|
+
} from "./chunk-SPSGUFTI.js";
|
|
43
53
|
import {
|
|
44
54
|
operatorWidth,
|
|
45
55
|
qualifierFont
|
|
@@ -51,38 +61,47 @@ import {
|
|
|
51
61
|
emptyIdRecord
|
|
52
62
|
} from "./chunk-LINZPU5D.js";
|
|
53
63
|
import {
|
|
64
|
+
closestKey
|
|
65
|
+
} from "./chunk-BSATR6ZO.js";
|
|
66
|
+
import {
|
|
67
|
+
caseInsensitiveValue,
|
|
54
68
|
chartSizing,
|
|
55
69
|
fitsSize,
|
|
70
|
+
inputConversion,
|
|
56
71
|
resolveSizing
|
|
57
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-WALYNKBN.js";
|
|
58
73
|
import {
|
|
59
74
|
clamp,
|
|
60
|
-
|
|
75
|
+
cleanDiff,
|
|
76
|
+
cleanSum,
|
|
61
77
|
formatDate,
|
|
62
78
|
isNumberAlone,
|
|
63
79
|
numericVariant,
|
|
80
|
+
readDateFormat,
|
|
64
81
|
unitPrinted
|
|
65
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-2ALFFOKB.js";
|
|
66
83
|
import {
|
|
67
84
|
disclosureNote,
|
|
68
85
|
disclosuresShown,
|
|
69
86
|
footerType
|
|
70
|
-
} from "./chunk-
|
|
87
|
+
} from "./chunk-5SHI57XD.js";
|
|
71
88
|
import {
|
|
72
89
|
AUTOMATIC_FORMAT,
|
|
73
90
|
MAGNITUDE_DIVISOR,
|
|
74
91
|
MAGNITUDE_GROUP,
|
|
92
|
+
MAGNITUDE_LABEL,
|
|
75
93
|
differenceExample,
|
|
76
94
|
effectiveScale,
|
|
77
95
|
formatWithSpec,
|
|
78
|
-
|
|
96
|
+
nonAdditiveSpec,
|
|
79
97
|
parseFormatExample,
|
|
80
98
|
parseISODate,
|
|
81
99
|
roundedNumber,
|
|
100
|
+
sameUnit,
|
|
82
101
|
specUnitKind,
|
|
83
102
|
unitOfSpec,
|
|
84
103
|
withChartMarks
|
|
85
|
-
} from "./chunk-
|
|
104
|
+
} from "./chunk-GDVR3XHT.js";
|
|
86
105
|
import {
|
|
87
106
|
MINUS,
|
|
88
107
|
chartNumberMarks,
|
|
@@ -94,7 +113,7 @@ import {
|
|
|
94
113
|
typicalDecimals,
|
|
95
114
|
withSmallValues,
|
|
96
115
|
zeroLifts
|
|
97
|
-
} from "./chunk-
|
|
116
|
+
} from "./chunk-LHKDZAWN.js";
|
|
98
117
|
import {
|
|
99
118
|
canvasMargin,
|
|
100
119
|
contrastInkPaint,
|
|
@@ -110,7 +129,7 @@ import {
|
|
|
110
129
|
tableEmphasis,
|
|
111
130
|
tableHeadFloorPx,
|
|
112
131
|
textScaleOf
|
|
113
|
-
} from "./chunk-
|
|
132
|
+
} from "./chunk-HJRNBKIT.js";
|
|
114
133
|
import {
|
|
115
134
|
DEFAULT_TARGET,
|
|
116
135
|
NormalizeError,
|
|
@@ -121,7 +140,7 @@ import {
|
|
|
121
140
|
resolveSubtitle,
|
|
122
141
|
scaleTextPx,
|
|
123
142
|
targetFloorsPx
|
|
124
|
-
} from "./chunk-
|
|
143
|
+
} from "./chunk-YOOHNQ3L.js";
|
|
125
144
|
import {
|
|
126
145
|
maxOf,
|
|
127
146
|
minOf,
|
|
@@ -129,7 +148,7 @@ import {
|
|
|
129
148
|
} from "./chunk-WYJEOMNY.js";
|
|
130
149
|
import {
|
|
131
150
|
twoLineWidth
|
|
132
|
-
} from "./chunk-
|
|
151
|
+
} from "./chunk-SNQ7D5R7.js";
|
|
133
152
|
|
|
134
153
|
// src/core/charts/table/ladder.ts
|
|
135
154
|
var COHORT_GRID = {
|
|
@@ -247,7 +266,7 @@ function assertTableRankOptions(options) {
|
|
|
247
266
|
);
|
|
248
267
|
}
|
|
249
268
|
function ranksAsData(row) {
|
|
250
|
-
return (row?.role ?? "data") === "data" && row?.kind !== "result" && row?.kind !== "driver";
|
|
269
|
+
return (row?.role ?? (row?.kind === "section" ? "section" : "data")) === "data" && row?.kind !== "result" && row?.kind !== "driver";
|
|
251
270
|
}
|
|
252
271
|
function additiveRankKey(row, columns) {
|
|
253
272
|
let sum = 0, counted = !1;
|
|
@@ -364,7 +383,7 @@ function foldTableTopN(data, ranked, options) {
|
|
|
364
383
|
}
|
|
365
384
|
|
|
366
385
|
// src/core/charts/table/encodings/arrow.ts
|
|
367
|
-
var ARROW_GAP = 4;
|
|
386
|
+
var ARROW_GAP = 4, printedNumber = (cell) => cell.negated ? -cell.raw : cell.raw;
|
|
368
387
|
function arrowGlyph(value, maxAbs, scale) {
|
|
369
388
|
let share = scale === "absolute" ? value / 100 : maxAbs > 0 ? value / maxAbs : 0;
|
|
370
389
|
return share > 0.1 ? "\u2191" : share > 0.02 ? "\u2197" : share >= -0.02 ? "\u2192" : share >= -0.1 ? "\u2198" : "\u2193";
|
|
@@ -382,16 +401,15 @@ function arrowKey(columns, rows) {
|
|
|
382
401
|
if (column.cellEncoding?.type !== "arrow" || column.kind !== "computed" || !column.polarity) continue;
|
|
383
402
|
let scale = column.cellEncoding.scale, values = rows.flatMap((row) => {
|
|
384
403
|
let cell = row.cells[column.id];
|
|
385
|
-
return cell?.state === "value" && typeof cell.raw == "number" ? [cell
|
|
404
|
+
return cell?.state === "value" && typeof cell.raw == "number" ? [printedNumber(cell)] : [];
|
|
386
405
|
}), maxAbs = Math.max(0, maxOf(values.map(Math.abs)));
|
|
387
406
|
for (let value of values) drawn[scale].add(arrowGlyph(value, maxAbs, scale));
|
|
388
407
|
}
|
|
389
408
|
return ["absolute", "relative"].flatMap((scale) => ARROW_KEY.filter(([glyph]) => drawn[scale].has(glyph)).map(([glyph, absolute, relative]) => ({ id: scale === "absolute" ? `arrowKey:${glyph}` : `arrowKey:relative:${glyph}`, label: scale === "absolute" ? absolute : relative, glyph })));
|
|
390
409
|
}
|
|
391
410
|
function emitArrow(context, metrics) {
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
let glyph = arrowGlyph(value, metrics.maxAbs, metrics.scale), font = metrics.font, glyphWidth = context.measure(glyph, font).width, valueWidth = context.measure(context.cell.displayed, metrics.font).width, valueLeft = metrics.valueX - valueWidth, available = valueLeft - context.box.x - ARROW_GAP;
|
|
411
|
+
if (context.cell.state !== "value" || typeof context.cell.raw != "number") return [];
|
|
412
|
+
let value = printedNumber(context.cell), glyph = arrowGlyph(value, metrics.maxAbs, metrics.scale), font = metrics.font, glyphWidth = context.measure(glyph, font).width, valueWidth = context.measure(context.cell.displayed, metrics.font).width, valueLeft = metrics.valueX - valueWidth, available = valueLeft - context.box.x - ARROW_GAP;
|
|
395
413
|
if (available <= 0) return [];
|
|
396
414
|
if (glyphWidth > available) {
|
|
397
415
|
let floor = Math.min(font.size, readerFloorPx(metrics.target ?? DEFAULT_TARGET, "label", metrics.textScale));
|
|
@@ -510,7 +528,9 @@ function laneHeatKey(columns, ranges, theme, strings, language) {
|
|
|
510
528
|
let encoding = column.cellEncoding;
|
|
511
529
|
if (encoding?.type === "heat" && encoding.scale === "status") return statusKey(columns, ranges, encoding, strings);
|
|
512
530
|
if (encoding?.type !== "heat" || encoding.scale !== "absolute" && encoding.scale !== "diverging") continue;
|
|
513
|
-
let diverging = encoding.scale === "diverging"
|
|
531
|
+
let diverging = encoding.scale === "diverging";
|
|
532
|
+
if (diverging && encoding.bins === void 0 && (encoding.steps ?? 0) < 2) continue;
|
|
533
|
+
let edges = encoding.bins ?? (diverging ? DIVERGING_BINS : []);
|
|
514
534
|
if (edges.length === 0) continue;
|
|
515
535
|
let steps = encoding.steps ?? edges.length + 1, spec = column.format === void 0 ? void 0 : withChartMarks(diverging ? { ...parseFormatExample(differenceExample(column.format)), signed: !1 } : parseFormatExample(column.format), language), text = spec === void 0 ? (value) => formatExactNumber(value, language) : (value) => formatWithSpec(value, spec), band = (index, last) => last ? `${text(edges[index - 1])} and more` : index === 0 ? `under ${text(edges[0])}` : intervalText(text(edges[index - 1]), text(edges[index])), swatch = (id, label, fill) => ({ id: `heatKey:${id}`, label, fill });
|
|
516
536
|
if (diverging) {
|
|
@@ -649,19 +669,12 @@ function holdAuthoredScale(spec, thousands) {
|
|
|
649
669
|
spec.magnitude === "none" || spec.lockMagnitude || (spec.rollMagnitude = !1, spec.thousandsSep === "" && (spec.thousandsSep = spec.decimals > 0 && thousands === spec.decimalSep ? spec.decimalSep === "," ? "." : "," : thousands));
|
|
650
670
|
}
|
|
651
671
|
function forceScale(spec, magnitude, thousands) {
|
|
652
|
-
spec.magnitude === "none" && magnitude === "m" && (spec.decimals = Math.max(spec.decimals, 1)), spec.magnitude = magnitude, spec.lockMagnitude = !0, spec.thousandsSep === "" && (spec.thousandsSep = thousands);
|
|
653
|
-
}
|
|
654
|
-
function sameUnit(a, b) {
|
|
655
|
-
return a.prefix === b.prefix && a.suffix === b.suffix && a.magnitude === b.magnitude && a.signed === b.signed && a.negative === b.negative && a.thousandsSep === b.thousandsSep && a.decimalSep === b.decimalSep;
|
|
672
|
+
spec.magnitudeInAffix || spec.exponent || spec.ordinal || (spec.magnitude === "none" && magnitude === "m" && (spec.decimals = Math.max(spec.decimals, 1)), spec.magnitude = magnitude, spec.lockMagnitude = !0, spec.thousandsSep === "" && (spec.thousandsSep = thousands));
|
|
656
673
|
}
|
|
657
|
-
function
|
|
658
|
-
|
|
659
|
-
return label ? text.endsWith(")") ? text.replace(`${label})`, ")") : text.endsWith(label) ? text.slice(0, -label.length) : text : text;
|
|
674
|
+
function sameUnit2(a, b) {
|
|
675
|
+
return a.prefix === b.prefix && a.suffix === b.suffix && a.magnitude === b.magnitude && a.signed === b.signed && a.negative === b.negative && a.thousandsSep === b.thousandsSep && a.decimalSep === b.decimalSep && a.trailingMinus === b.trailingMinus && a.ordinal === b.ordinal && a.magnitudeInAffix === b.magnitudeInAffix && JSON.stringify(a.glyphs) === JSON.stringify(b.glyphs) && JSON.stringify(a.exponent) === JSON.stringify(b.exponent) && JSON.stringify(a.magnitudeWord) === JSON.stringify(b.magnitudeWord);
|
|
660
676
|
}
|
|
661
677
|
var floatNoise = (a, b) => 1e-9 * Math.max(1, Math.abs(a), Math.abs(b));
|
|
662
|
-
function columnHeadLabel(label, theme) {
|
|
663
|
-
return theme.table?.head?.case === "asis" ? label : label.toUpperCase();
|
|
664
|
-
}
|
|
665
678
|
function columnHeaderAffix(column) {
|
|
666
679
|
let affix = [column.scenario, column.unitLabel].filter(Boolean).join(", ");
|
|
667
680
|
return `${affix ? ` (${affix})` : ""}${column.partial ? ` ${PARTIAL_MARKER}` : ""}`;
|
|
@@ -673,8 +686,20 @@ function resolveTableIn(data, options, magnitudeSource) {
|
|
|
673
686
|
let liftsBefore = zeroLifts.count, liftMode = options[ZERO_LIFT], automaticAs = (on) => on && liftMode !== "none" ? liftMode ?? !0 : !1, formats = /* @__PURE__ */ new Map(), markedLanguage = options.locale?.language, parseFormatExample2 = (example) => {
|
|
674
687
|
let spec = formats.get(example);
|
|
675
688
|
return spec === void 0 && (spec = parseFormatExample(example), spec.locale = markedLanguage, formats.set(example, spec)), { ...spec };
|
|
676
|
-
}, warnings = [];
|
|
689
|
+
}, warnings = [], datePatterns = /* @__PURE__ */ new Map();
|
|
677
690
|
data.columns.forEach((column, index) => {
|
|
691
|
+
if (column.kind === "date") {
|
|
692
|
+
let read = readDateFormat(column.format, "table", options.locale?.language);
|
|
693
|
+
datePatterns.set(column.id, read.pattern);
|
|
694
|
+
for (let note of read.notes) warnings.push({
|
|
695
|
+
code: note.kind === "fiscal" ? "date-format-fiscal-year" : `date-format-${note.kind}`,
|
|
696
|
+
severity: note.kind === "fiscal" ? "info" : "warn",
|
|
697
|
+
field: ["data", "columns", index, "format"],
|
|
698
|
+
owner: { colId: column.id },
|
|
699
|
+
message: note.message,
|
|
700
|
+
suggest: note.suggest
|
|
701
|
+
});
|
|
702
|
+
}
|
|
678
703
|
if (column.kind === "status")
|
|
679
704
|
for (let [key, label] of Object.entries(column.labels ?? {}))
|
|
680
705
|
typeof label != "string" || label.trim() !== "" || warnings.push({
|
|
@@ -687,6 +712,42 @@ function resolveTableIn(data, options, magnitudeSource) {
|
|
|
687
712
|
fix: [{ op: "remove", path: `/data/columns/${index}/labels/${key}` }]
|
|
688
713
|
});
|
|
689
714
|
});
|
|
715
|
+
let columnIds = data.columns.map((column) => column.id), columnIdSet = new Set(columnIds), nearColumn = /* @__PURE__ */ new Map(), unknownKeys = /* @__PURE__ */ new Map(), checkCellKeys = (rows, path) => {
|
|
716
|
+
rows.forEach((row, index) => {
|
|
717
|
+
let rowPath = [...path, index];
|
|
718
|
+
for (let key of Object.keys(row.cells ?? {})) {
|
|
719
|
+
if (columnIdSet.has(key)) continue;
|
|
720
|
+
if (!nearColumn.has(key)) {
|
|
721
|
+
let nearest = closestKey(key, columnIds);
|
|
722
|
+
nearColumn.set(key, nearest?.near ? nearest.key : void 0);
|
|
723
|
+
}
|
|
724
|
+
let near = nearColumn.get(key);
|
|
725
|
+
if (near === void 0 || Object.hasOwn(row.cells, near)) continue;
|
|
726
|
+
let seen = unknownKeys.get(key);
|
|
727
|
+
seen ? seen.rows += 1 : unknownKeys.set(key, { row, rowPath, near, rows: 1 });
|
|
728
|
+
}
|
|
729
|
+
row.children && checkCellKeys(row.children, [...rowPath, "children"]);
|
|
730
|
+
});
|
|
731
|
+
};
|
|
732
|
+
checkCellKeys(magnitudeSource.rows, []);
|
|
733
|
+
for (let [key, { row, rowPath, near, rows }] of unknownKeys) {
|
|
734
|
+
let cells = row.cells;
|
|
735
|
+
warnings.push({
|
|
736
|
+
code: "cell-column-unknown",
|
|
737
|
+
severity: "warn",
|
|
738
|
+
message: `cell '${key}' in row '${row.id}'${rows > 1 ? ` and ${rows - 1} more` : ""} names no column, so its value is not drawn; did you mean '${near}'?`,
|
|
739
|
+
owner: { rowId: row.id },
|
|
740
|
+
field: ["data", "rows", ...rowPath, "cells", key],
|
|
741
|
+
suggest: `Rename the cell key to '${near}'.`,
|
|
742
|
+
// A patch for the first row only would leave the others; a key in several rows gets the suggestion alone.
|
|
743
|
+
...rows > 1 ? {} : {
|
|
744
|
+
fix: [
|
|
745
|
+
{ op: "test", path: `/data/rows/${rowPath.join("/")}/cells`, value: cells },
|
|
746
|
+
{ op: "replace", path: `/data/rows/${rowPath.join("/")}/cells`, value: Object.fromEntries(Object.entries(cells).map(([name, value]) => [name === key ? near : name, value])) }
|
|
747
|
+
]
|
|
748
|
+
}
|
|
749
|
+
});
|
|
750
|
+
}
|
|
690
751
|
let records = [], autoFootnotes = /* @__PURE__ */ new Set(), lowerJudged = /* @__PURE__ */ new Set(), higherJudged = /* @__PURE__ */ new Set(), partialColumnIds = /* @__PURE__ */ new Set(), highlightedRows = new Set(resolveHighlight(options.highlight));
|
|
691
752
|
assertTableRankOptions(options);
|
|
692
753
|
let folded = applyTableTopN(data, options);
|
|
@@ -735,11 +796,11 @@ function resolveTableIn(data, options, magnitudeSource) {
|
|
|
735
796
|
dissolveSections(parentId);
|
|
736
797
|
let out = hoisted.some((k) => k.role !== "total") ? hoisted.filter((k) => k.role !== "total") : hoisted;
|
|
737
798
|
return summandCache.set(parentId, out), out;
|
|
738
|
-
}, nonAdditiveFormat = (format) => {
|
|
739
|
-
if (!format) return
|
|
799
|
+
}, nonAdditiveFormat = (format) => !!format && nonAdditiveSpec(parseFormatExample2(format)), formatAt = (row, colId) => cellFormat(row.cells[colId]) ?? row.format, unitOf = (format) => {
|
|
800
|
+
if (!format) return "";
|
|
740
801
|
let spec = parseFormatExample2(format);
|
|
741
|
-
return
|
|
742
|
-
},
|
|
802
|
+
return `${spec.prefix}\0${spec.suffix}\0${spec.magnitude}`;
|
|
803
|
+
}, nonAdditiveSum = (col, row, kids) => nonAdditiveFormat(col.format) || [row, ...kids].some((k) => nonAdditiveFormat(formatAt(k, col.id))) || new Set(kids.map((k) => unitOf(formatAt(k, col.id) ?? col.format ?? ""))).size > 1, aggregateFor = (col, row) => col.aggregate ?? (nonAdditiveSum(col, row, summandsOf(row.id)) ? "none" : "sum"), warnedNonAdditive = /* @__PURE__ */ new Set(), rawState = /* @__PURE__ */ new Map();
|
|
743
804
|
for (let r of flat) rawState.set(r.id, /* @__PURE__ */ new Map());
|
|
744
805
|
for (let [id, row] of folded.hidden) rawState.set(id, new Map(row.states));
|
|
745
806
|
let valueCols = columns.filter((c) => c.kind === "value"), postOrder = orderPostfix(childrenOf);
|
|
@@ -783,12 +844,12 @@ function resolveTableIn(data, options, magnitudeSource) {
|
|
|
783
844
|
return { raw: null, state: authored.state };
|
|
784
845
|
if (!isParent || aggregate === "none" || aggregate === "source")
|
|
785
846
|
return authored.raw === null ? { raw: null, state: "missing" } : { raw: authored.raw, state: "value" };
|
|
786
|
-
let inputs = [], blockers = [],
|
|
847
|
+
let inputs = [], blockers = [], partialKid = !1, skippedKids = [];
|
|
787
848
|
for (let kid of kids) {
|
|
788
849
|
let ks = rawState.get(kid.id).get(col.id);
|
|
789
850
|
if (ks.state === "value" && typeof ks.raw == "number") {
|
|
790
851
|
let contribution = signTo(kid, row.id) * ks.raw;
|
|
791
|
-
|
|
852
|
+
ks.partial && (partialKid = !0, pushAll(skippedKids, skippedRows(ks))), inputs.push({ rowId: kid.id, colId: col.id, value: contribution });
|
|
792
853
|
} else
|
|
793
854
|
blockers.push({ id: kid.id, state: ks.state });
|
|
794
855
|
}
|
|
@@ -840,7 +901,7 @@ function resolveTableIn(data, options, magnitudeSource) {
|
|
|
840
901
|
message: `'${row.id}'.'${col.id}' is '${glyphs[inherited]}' because ${blockers.map((b) => `child '${b.id}' is ${STATE_REASON[b.state]}`).join(", ")} (column nulls policy 'propagate')`
|
|
841
902
|
}), derived = { raw: null, state: inherited };
|
|
842
903
|
} else
|
|
843
|
-
blockers.length > 0 && (autoFootnotes.add(PARTIAL_FOOTNOTE), partialColumnIds.add(col.id)), derived = { raw:
|
|
904
|
+
blockers.length > 0 && (autoFootnotes.add(PARTIAL_FOOTNOTE), partialColumnIds.add(col.id)), derived = { raw: cleanSum(inputs.map((input) => input.value)), state: "value", ...blockers.length > 0 || partialKid ? { partial: !0, skipped: skippedKey([...blockers.map((b) => b.id), ...skippedKids]) } : {} };
|
|
844
905
|
let policy = row.totalPolicy ?? (authored.raw !== null ? "validate" : "derive");
|
|
845
906
|
return policy === "source" ? authored.raw === null ? derived : { raw: authored.raw, state: "value" } : policy === "validate" && authored.raw !== null ? (noSummands ? unauditedRecord() : records.push({
|
|
846
907
|
rowId: row.id,
|
|
@@ -875,20 +936,31 @@ function resolveTableIn(data, options, magnitudeSource) {
|
|
|
875
936
|
for (let r of summandsOf(parentId))
|
|
876
937
|
summandsOf(r.id).length === 0 ? leafRows.push(r) : collectLeafSummands(r.id);
|
|
877
938
|
};
|
|
878
|
-
collectLeafSummands(null);
|
|
879
|
-
let leafTotal = (colId) => {
|
|
880
|
-
let
|
|
881
|
-
for (let
|
|
882
|
-
|
|
939
|
+
collectLeafSummands(null), partitionLeafIds.set(rawState, leafRows.map((r) => r.id));
|
|
940
|
+
let hiddenLeaves = [...folded.hidden].filter(([, h]) => h.leaf), leafTotal = (colId) => {
|
|
941
|
+
let terms = [];
|
|
942
|
+
for (let [s, sign] of [
|
|
943
|
+
...leafRows.map((r) => [rawState.get(r.id).get(colId), signTo(r, null)]),
|
|
944
|
+
...hiddenLeaves.map(([, h]) => [h.states.get(colId), h.sign])
|
|
945
|
+
]) {
|
|
883
946
|
if (!s || s.state !== "value" || typeof s.raw != "number") return null;
|
|
884
|
-
|
|
947
|
+
terms.push(sign * s.raw);
|
|
885
948
|
}
|
|
886
|
-
return
|
|
949
|
+
return cleanSum(terms);
|
|
887
950
|
}, computedCols = columns.filter((c) => c.kind === "computed"), calcNotes = evaluateTableCalcs(flat, valueCols, computedCols, rawState, records, leafTotal, data.columnGroups ?? [], colById, noPrevious, (id) => {
|
|
888
951
|
let row = flatById.get(id);
|
|
889
952
|
return row ? signTo(row, null) : folded.hidden.get(id)?.sign ?? 1;
|
|
890
953
|
});
|
|
891
954
|
calcNotes.nearZero && autoFootnotes.add(options.strings?.nearZeroChange ?? localeStrings(options.locale?.language).nearZeroChange), calcNotes.mixedCoverage && autoFootnotes.add(options.strings?.mixedCoverage ?? localeStrings(options.locale?.language).mixedCoverage);
|
|
955
|
+
for (let { scope, rowId, colId, cells } of calcNotes.negativeBase) {
|
|
956
|
+
let more = cells > 1 ? ` and ${cells - 1} more` : "";
|
|
957
|
+
warnings.push({
|
|
958
|
+
code: "ratio-negative-base",
|
|
959
|
+
severity: "info",
|
|
960
|
+
message: `${scope === "column" ? `column '${colId}' in row '${rowId}'` : `row '${rowId}' in column '${colId}'`}${more} divides by a negative number, so the ratio prints as plain arithmetic; a percentDelta calc prints n.m. off a negative base`,
|
|
961
|
+
owner: { rowId, colId }
|
|
962
|
+
});
|
|
963
|
+
}
|
|
892
964
|
let locale = localeDefaults(options.locale), sourceRows = magnitudeSource === data ? flatById : new Map(flattenRows(magnitudeSource.rows).map((row) => [row.id, row])), sourceColumns = new Map(magnitudeSource.columns.map((col) => [col.id, col])), scales = (example) => scalesWithMagnitude(parseFormatExample2(example)), specs = /* @__PURE__ */ new Map(), formatExamples = /* @__PURE__ */ new Map(), localeDerivedColumns = /* @__PURE__ */ new Set();
|
|
893
965
|
for (let col of [...valueCols, ...computedCols]) {
|
|
894
966
|
let inherited = col.kind === "computed" && !calcPreservesScale(col.calc) ? void 0 : options.format, authoredExample = col.format ?? inherited, example = authoredExample ?? defaultExample(col);
|
|
@@ -899,18 +971,25 @@ function resolveTableIn(data, options, magnitudeSource) {
|
|
|
899
971
|
let rowSpecs = /* @__PURE__ */ new Map(), rowById = /* @__PURE__ */ new Map(), forcedMagnitude = options.magnitude === "million" ? "m" : options.magnitude === "thousand" ? "k" : void 0, authoredSpec = (example, sourceExample = example) => {
|
|
900
972
|
let spec = parseFormatExample2(example);
|
|
901
973
|
return forcedMagnitude !== void 0 && scales(sourceExample) && forceScale(spec, forcedMagnitude, locale.thousands), spec;
|
|
902
|
-
},
|
|
903
|
-
let
|
|
904
|
-
return
|
|
905
|
-
},
|
|
974
|
+
}, cellsOfRow = /* @__PURE__ */ new Map(), rowCells = (row) => {
|
|
975
|
+
let cells = cellsOfRow.get(row.id);
|
|
976
|
+
return cells === void 0 && cellsOfRow.set(row.id, cells = rowCellsUncached(row)), cells;
|
|
977
|
+
}, rowValues = (row) => rowCells(row).map(([, value]) => value), rowCellsUncached = (row) => valueCols.filter((col) => col.format === void 0 && cellFormat(row.cells[col.id]) === void 0 && !(data.columnToggles ?? []).some((toggle) => toggle.columns.includes(col.id) && (options.columnVisibility?.[toggle.id] ?? toggle.defaultVisible ?? !1) === !1)).flatMap((col) => {
|
|
978
|
+
let raw = rawState.get(row.id)?.get(col.id)?.raw;
|
|
979
|
+
return typeof raw == "number" ? [[col.id, raw]] : [];
|
|
980
|
+
}), largest = (values) => values.reduce((n, v) => Math.max(n, Math.abs(v)), 0), groupOf = (row) => sourceRows.get(row.id)?.[MAGNITUDE_GROUP], groupMax = /* @__PURE__ */ new Map(), groupColumns = /* @__PURE__ */ new Map();
|
|
906
981
|
for (let row of flat) {
|
|
907
982
|
let group = groupOf(row);
|
|
908
983
|
if (group === void 0) continue;
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
984
|
+
groupMax.set(group, Math.max(groupMax.get(group) ?? 0, largest(rowValues(row))));
|
|
985
|
+
let columns2 = groupColumns.get(group);
|
|
986
|
+
columns2 === void 0 && groupColumns.set(group, columns2 = /* @__PURE__ */ new Map());
|
|
987
|
+
for (let [colId, value] of rowCells(row)) {
|
|
988
|
+
let column = columns2.get(colId);
|
|
989
|
+
column === void 0 ? columns2.set(colId, [value]) : column.push(value);
|
|
990
|
+
}
|
|
913
991
|
}
|
|
992
|
+
let groupCellSpecs = /* @__PURE__ */ new Map();
|
|
914
993
|
for (let row of flat) {
|
|
915
994
|
rowById.set(row.id, row);
|
|
916
995
|
let example = row.format ?? (row.scale ? row.scale === "percent" ? "1.2%" : "1,234" : void 0) ?? (row.calc && calcYieldsPoints(row.calc) ? `1${locale.decimal}2%` : void 0);
|
|
@@ -920,7 +999,7 @@ function resolveTableIn(data, options, magnitudeSource) {
|
|
|
920
999
|
let group = groupOf(row), rowScale = row.scale === "money" || row.scale === "perUnit";
|
|
921
1000
|
if (rowScale || specUnitKind(spec) === "number") {
|
|
922
1001
|
let values = rowValues(row), max = group === void 0 ? largest(values) : groupMax.get(group), climb = (from) => max >= 1e9 ? "bn" : max >= 1e6 ? "m" : max >= from ? "k" : "none", authoredFormat = sourceRows.get(row.id)?.format !== void 0;
|
|
923
|
-
if (rowScale) {
|
|
1002
|
+
if (rowScale && !spec.magnitudeInAffix && !spec.exponent && !spec.ordinal) {
|
|
924
1003
|
let heldMoney = row.scale === "money" && forcedMagnitude !== void 0;
|
|
925
1004
|
if (spec.magnitude = heldMoney ? forcedMagnitude : row.scale === "money" ? climb(1e3) : "none", row.scale === "money")
|
|
926
1005
|
spec.decimals = max >= 1e3 && !(heldMoney && forcedMagnitude === "k" && max >= 1e5) ? 1 : 0;
|
|
@@ -929,25 +1008,42 @@ function resolveTableIn(data, options, magnitudeSource) {
|
|
|
929
1008
|
for (; value !== 0 && spec.decimals < 20 && Math.abs(roundedNumber(value, spec) - value) > Math.abs(value) * 0.01; ) spec.decimals++;
|
|
930
1009
|
spec.prefix = "", spec.suffix = "", spec.lockMagnitude = heldMoney, spec.rollMagnitude = !1, spec.thousandsSep === "" && (spec.thousandsSep = locale.thousands);
|
|
931
1010
|
} else row.scale === "count" && !authoredFormat && max >= 1e6 && spec.magnitude === "none" && !spec.signed && (spec.magnitude = climb(1 / 0), spec.decimals = 1, spec.lockMagnitude = !1, spec.rollMagnitude = !1);
|
|
932
|
-
let smallMoney = !rowScale && forcedMagnitude && scales(example) && values.every((v) => Math.abs(v) < 1e3), changeLine = row.inline === !0 || spec.signed;
|
|
1011
|
+
let smallMoney = !spec.magnitudeInAffix && !spec.exponent && !spec.ordinal && !rowScale && forcedMagnitude && scales(example) && values.every((v) => Math.abs(v) < 1e3), changeLine = row.inline === !0 || spec.signed;
|
|
933
1012
|
if (smallMoney || !changeLine && group === void 0 && values.some((v) => v !== 0 && roundedNumber(v, spec) === 0)) {
|
|
934
|
-
if (smallMoney || !rowScale && spec.lockMagnitude && spec.magnitude === "k" || row.scale === "money" && spec.magnitude === "k") {
|
|
1013
|
+
if (!spec.magnitudeInAffix && (smallMoney || !rowScale && spec.lockMagnitude && spec.magnitude === "k" || row.scale === "money" && spec.magnitude === "k")) {
|
|
935
1014
|
let authored = parseFormatExample2(example);
|
|
936
1015
|
spec.decimals = !rowScale && authored.magnitude === "none" ? authored.decimals : 0, spec.magnitude = "none";
|
|
937
1016
|
}
|
|
938
1017
|
spec.decimals = values.reduce((decimals, value) => nonzeroDecimals(value / MAGNITUDE_DIVISOR[spec.magnitude], decimals), spec.decimals);
|
|
939
1018
|
}
|
|
940
1019
|
if (!changeLine && (spec.magnitude !== "none" || group !== void 0 && row.scale === "money") && !(spec.lockMagnitude && spec.magnitude === "k") && (row.scale === "money" || row.scale === "count" && !authoredFormat))
|
|
941
|
-
|
|
942
|
-
for (
|
|
1020
|
+
if (group === void 0)
|
|
1021
|
+
for (let value of values)
|
|
1022
|
+
for (; value !== 0 && spec.decimals < 20 && Math.abs(roundedNumber(value, spec) - value) > Math.abs(value) * 0.01; ) spec.decimals++;
|
|
1023
|
+
else {
|
|
1024
|
+
let columns2 = groupColumns.get(group);
|
|
1025
|
+
for (let column of columns2.values())
|
|
1026
|
+
for (let value of column)
|
|
1027
|
+
for (; value !== 0 && spec.decimals < 20 && Math.abs(roundedNumber(value, spec) - value) > max * 0.01; ) spec.decimals++;
|
|
1028
|
+
let inRow = /* @__PURE__ */ new Map();
|
|
1029
|
+
for (let [colId, column] of columns2) {
|
|
1030
|
+
let cellSpec = { ...spec }, bound = largest(column) * 0.01;
|
|
1031
|
+
for (let value of column)
|
|
1032
|
+
for (; value !== 0 && cellSpec.decimals < 20 && Math.abs(roundedNumber(value, cellSpec) - value) > bound; ) cellSpec.decimals++;
|
|
1033
|
+
inRow.set(colId, cellSpec);
|
|
1034
|
+
}
|
|
1035
|
+
groupCellSpecs.set(row.id, inRow);
|
|
1036
|
+
}
|
|
943
1037
|
}
|
|
944
1038
|
let sourceRow = sourceRows.get(row.id);
|
|
945
|
-
spec.automatic = automaticAs(group !== void 0 || (sourceRow?.format === void 0 || sourceRow[AUTOMATIC_FORMAT] === !0) && options.format === void 0 && options.unit === void 0 && forcedMagnitude === void 0)
|
|
1039
|
+
spec.automatic = automaticAs(group !== void 0 || (sourceRow?.format === void 0 || sourceRow[AUTOMATIC_FORMAT] === !0) && options.format === void 0 && options.unit === void 0 && forcedMagnitude === void 0);
|
|
1040
|
+
for (let cellSpec of groupCellSpecs.get(row.id)?.values() ?? []) cellSpec.automatic = spec.automatic;
|
|
1041
|
+
rowSpecs.set(row.id, spec);
|
|
946
1042
|
}
|
|
947
1043
|
}
|
|
948
|
-
let cellSpecs = /* @__PURE__ */ new Map();
|
|
1044
|
+
let cellSpecs = /* @__PURE__ */ new Map(), cellFormatCols = [...valueCols, ...computedCols];
|
|
949
1045
|
for (let row of flat)
|
|
950
|
-
for (let col of
|
|
1046
|
+
for (let col of cellFormatCols) {
|
|
951
1047
|
let example = cellFormat(row.cells[col.id]);
|
|
952
1048
|
if (example !== void 0) {
|
|
953
1049
|
let sourceRow = sourceRows.get(row.id), sourceColumn = sourceColumns.get(col.id), sourceExample = cellFormat(sourceRow?.cells[col.id]) ?? sourceColumn?.format ?? sourceRow?.format ?? options.format ?? defaultExample(col), inRow = cellSpecs.get(row.id);
|
|
@@ -956,18 +1052,21 @@ function resolveTableIn(data, options, magnitudeSource) {
|
|
|
956
1052
|
cellFormat(sourceRow?.cells[col.id]) !== void 0 && sourceCell?.[AUTOMATIC_FORMAT] !== !0 && holdAuthoredScale(spec, locale.thousands), sourceCell?.[AUTOMATIC_FORMAT] === !0 && (spec.automatic = automaticAs(!0)), inRow.set(col.id, spec);
|
|
957
1053
|
}
|
|
958
1054
|
}
|
|
959
|
-
let
|
|
1055
|
+
let cellNamesOtherUnit = (rowId, colId, spec) => {
|
|
1056
|
+
let own = cellSpecs.get(rowId)?.get(colId);
|
|
1057
|
+
return own !== void 0 && typeof rawState.get(rowId)?.get(colId)?.raw == "number" && unitOfSpec(own) !== unitOfSpec(spec);
|
|
1058
|
+
}, hoistedRowUnits = /* @__PURE__ */ new Map();
|
|
960
1059
|
if (forcedMagnitude !== void 0)
|
|
961
1060
|
for (let [rowId, spec] of rowSpecs) {
|
|
962
|
-
if (rowById.get(rowId)?.scale === "money" || rowById.get(rowId)?.scale === "perUnit" || rowById.get(rowId)?.calc !== void 0 || !scales(sourceRows.get(rowId)?.format ?? "1,234")) continue;
|
|
963
|
-
let unit = unitOfSpec(spec);
|
|
1061
|
+
if (rowById.get(rowId)?.scale === "money" || rowById.get(rowId)?.scale === "perUnit" || rowById.get(rowId)?.calc !== void 0 || !scales(sourceRows.get(rowId)?.format ?? "1,234") || valueCols.some((col) => cellNamesOtherUnit(rowId, col.id, spec))) continue;
|
|
1062
|
+
let unit = spec.magnitude === "none" ? null : unitOfSpec(spec);
|
|
964
1063
|
unit !== null && hoistedRowUnits.set(rowId, unit);
|
|
965
1064
|
}
|
|
966
|
-
let
|
|
1065
|
+
let ownFormatColumns = new Set([...valueCols, ...computedCols].filter(columnOwnsFormat).map((col) => col.id)), rowFormattedColumns = /* @__PURE__ */ new Set();
|
|
967
1066
|
for (let row of flat)
|
|
968
1067
|
if (!(row.calc || !rowSpecs.has(row.id)))
|
|
969
1068
|
for (let col of valueCols)
|
|
970
|
-
!
|
|
1069
|
+
!ownFormatColumns.has(col.id) && typeof rawState.get(row.id)?.get(col.id)?.raw == "number" && rowFormattedColumns.add(col.id);
|
|
971
1070
|
let hoistedUnitSet = new Set(hoistedRowUnits.values()), figureRows = flat.filter((row) => !row.calc && valueCols.some((col) => typeof rawState.get(row.id)?.get(col.id)?.raw == "number")), headUnit = figureRows.length > 1 && hoistedUnitSet.size === 1 && figureRows.every((row) => hoistedRowUnits.has(row.id)) ? [...hoistedUnitSet][0] : void 0;
|
|
972
1071
|
function defaultExample(col) {
|
|
973
1072
|
if (col.kind === "computed" && calcYieldsPoints(col.calc)) return `1${locale.decimal}2%`;
|
|
@@ -985,13 +1084,13 @@ function resolveTableIn(data, options, magnitudeSource) {
|
|
|
985
1084
|
return decimals > 1 ? `0${locale.decimal}${"1234".slice(0, decimals)}` : `1${locale.decimal}2`;
|
|
986
1085
|
}
|
|
987
1086
|
let unitByCol = /* @__PURE__ */ new Map(), rollsOff = (colId, spec) => spec.magnitude !== "none" && flat.some((row) => {
|
|
988
|
-
if (rowSpecs.has(row.id) && (row.calc !== void 0 || row.inline === !0 || !
|
|
1087
|
+
if (rowSpecs.has(row.id) && (row.calc !== void 0 || row.inline === !0 || !ownFormatColumns.has(colId)) || cellSpecs.get(row.id)?.has(colId)) return !1;
|
|
989
1088
|
let raw = rawState.get(row.id)?.get(colId)?.raw;
|
|
990
1089
|
return typeof raw == "number" && raw !== 0 && effectiveScale(Math.abs(raw), spec).magnitude !== spec.magnitude;
|
|
991
1090
|
}), lettersInCells = /* @__PURE__ */ new Set();
|
|
992
1091
|
for (let col of [...valueCols, ...computedCols]) {
|
|
993
1092
|
let spec = specs.get(col.id);
|
|
994
|
-
!rowFormattedColumns.has(col.id) && rollsOff(col.id, spec) && lettersInCells.add(col.id), unitByCol.set(col.id, rowFormattedColumns.has(col.id) || lettersInCells.has(col.id) ? null : unitOfSpec(spec));
|
|
1093
|
+
!rowFormattedColumns.has(col.id) && (rollsOff(col.id, spec) || flat.some((row) => cellNamesOtherUnit(row.id, col.id, spec))) && lettersInCells.add(col.id), unitByCol.set(col.id, rowFormattedColumns.has(col.id) || lettersInCells.has(col.id) ? null : unitOfSpec(spec));
|
|
995
1094
|
}
|
|
996
1095
|
let headerUnitFor = (id) => unitByCol.get(id) ?? (rowFormattedColumns.has(id) ? headUnit ?? null : null), headerScaledFor = (id) => unitByCol.get(id) != null ? specs.get(id).magnitude !== "none" : rowFormattedColumns.has(id) && headUnit !== void 0 && figureRows.some((row) => (rowSpecs.get(row.id)?.magnitude ?? "none") !== "none"), distinctUnits = [...new Set([...unitByCol.keys()].map(headerUnitFor).filter((u) => u !== null))], candidateUnit = distinctUnits.length === 1 && [...valueCols, ...computedCols].every((col) => {
|
|
997
1096
|
let kind = specUnitKind(specs.get(col.id));
|
|
@@ -1000,8 +1099,8 @@ function resolveTableIn(data, options, magnitudeSource) {
|
|
|
1000
1099
|
subtitle: resolveSubtitle(options.subtitle),
|
|
1001
1100
|
unit: candidateUnit,
|
|
1002
1101
|
unitShown: options.unitShown
|
|
1003
|
-
}),
|
|
1004
|
-
uniformUnit !== null && options.unit !== void 0 && options.unit !== uniformUnit && warnings.push({
|
|
1102
|
+
}), authoredUnit = typeof options.unit == "string" ? options.unit.trim() : void 0, scaleWords = (authoredUnit?.split(/[\s$€£¥()]+/) ?? []).filter((word) => Object.values(MAGNITUDE_LABEL).some((label) => label !== "" && sameUnit(word, label))), bareScale = candidateUnit !== void 0 && [...[...valueCols, ...computedCols].map((col) => specs.get(col.id)), ...rowSpecs.values()].every((spec) => specUnitKind(spec) !== "number" || spec.prefix.trim() === "" && spec.suffix.trim() === ""), carriesScale = scaleWords.some((word) => sameUnit(word, candidateUnit ?? "")), composes = bareScale && !!authoredUnit && (carriesScale || scaleWords.length === 0 && /^(?:[A-Z]{3}|\p{Sc})$/u.test(authoredUnit)), composedUnit = composes ? carriesScale ? authoredUnit : `${authoredUnit} ${candidateUnit}` : candidateUnit, uniformUnit = composedUnit && frameCarriesUnit ? composedUnit : null;
|
|
1103
|
+
uniformUnit !== null && options.unit !== void 0 && options.unit !== uniformUnit && !composes && warnings.push({
|
|
1005
1104
|
code: "table-unit-overridden",
|
|
1006
1105
|
severity: "warn",
|
|
1007
1106
|
field: ["options", "unit"],
|
|
@@ -1016,18 +1115,18 @@ function resolveTableIn(data, options, magnitudeSource) {
|
|
|
1016
1115
|
let cellSpec = rowId ? cellSpecs.get(rowId)?.get(colId) : void 0;
|
|
1017
1116
|
if (cellSpec) return cellSpec;
|
|
1018
1117
|
let rowSpec = rowId ? rowSpecs.get(rowId) : void 0;
|
|
1019
|
-
return rowSpec && (rowOverridesColumn(rowId) || !
|
|
1118
|
+
return rowSpec && (rowOverridesColumn(rowId) || !ownFormatColumns.has(colId)) ? groupCellSpecs.get(rowId)?.get(colId) ?? rowSpec : specs.get(colId);
|
|
1020
1119
|
}, formatNumber = (raw, colId, rowId, lift = !0) => {
|
|
1021
|
-
let cellSpec = rowId ? cellSpecs.get(rowId)?.get(colId) : void 0, rowSpec = rowId ? rowSpecs.get(rowId) : void 0, rowPath = rowSpec !== void 0 && (rowOverridesColumn(rowId) || !
|
|
1022
|
-
if (cellSpec && !
|
|
1023
|
-
let decimals = cellSpec?.decimals ?? base.decimals;
|
|
1120
|
+
let cellSpec = rowId ? cellSpecs.get(rowId)?.get(colId) : void 0, rowSpec = rowId ? rowSpecs.get(rowId) : void 0, rowPath = rowSpec !== void 0 && (rowOverridesColumn(rowId) || !ownFormatColumns.has(colId)), base = rowPath ? rowSpec : specs.get(colId);
|
|
1121
|
+
if (cellSpec && !sameUnit2(cellSpec, base)) return formatWithSpec(raw, lift ? cellSpec : { ...cellSpec, automatic: !1 });
|
|
1122
|
+
let decimals = cellSpec?.decimals ?? (rowPath ? groupCellSpecs.get(rowId)?.get(colId)?.decimals : void 0) ?? base.decimals;
|
|
1024
1123
|
if (rowPath) {
|
|
1025
1124
|
if (raw === 0 && lift && !cellSpec && groupOf(rowById.get(rowId)) !== void 0) return "0";
|
|
1026
1125
|
let hoisted = rowId !== void 0 && hoistedRowUnits.has(rowId), automatic = lift && (cellSpec ? cellSpec.automatic : rowSpec.automatic);
|
|
1027
|
-
return hoisted ?
|
|
1126
|
+
return hoisted ? formatWithSpec(raw, { ...rowSpec, decimals, automatic, prefix: "", suffix: "", magnitudeInAffix: !0 }) : formatWithSpec(raw, { ...rowSpec, decimals, automatic });
|
|
1028
1127
|
}
|
|
1029
|
-
let spec = { ...specs.get(colId), decimals, ...cellSpec ? { currencyWhole: void 0, automatic: cellSpec.automatic } : {}, ...lift ? {} : { automatic: !1 } }, rendered = unitByCol.get(colId) == null ? formatWithSpec(raw, spec) : formatWithSpec(raw, { ...spec, prefix: "", suffix: ""
|
|
1030
|
-
return
|
|
1128
|
+
let spec = { ...specs.get(colId), decimals, ...cellSpec ? { currencyWhole: void 0, automatic: cellSpec.automatic } : {}, ...lift ? {} : { automatic: !1 } }, rendered = unitByCol.get(colId) == null ? formatWithSpec(raw, spec) : formatWithSpec(raw, { ...spec, prefix: "", suffix: "", magnitudeInAffix: !0 });
|
|
1129
|
+
return localeDerivedColumns.has(colId) && locale.minusGlyph === "-" && rendered.startsWith(MINUS) ? `-${rendered.slice(MINUS.length)}` : rendered;
|
|
1031
1130
|
}, madeNm = /* @__PURE__ */ new Set();
|
|
1032
1131
|
for (let record of records) {
|
|
1033
1132
|
if (record.kind !== "calc" || record.state !== "value") continue;
|
|
@@ -1041,16 +1140,23 @@ function resolveTableIn(data, options, magnitudeSource) {
|
|
|
1041
1140
|
reconcileShares(col.id, spec);
|
|
1042
1141
|
}
|
|
1043
1142
|
function reconcileShares(colId, spec) {
|
|
1044
|
-
let entries =
|
|
1045
|
-
|
|
1046
|
-
|
|
1143
|
+
let entries = [
|
|
1144
|
+
...leafRows.map((r) => ({ r, s: rawState.get(r.id).get(colId), shown: !0 })),
|
|
1145
|
+
...hiddenLeaves.map(([id, h]) => ({ r: { id }, s: h.states.get(colId), shown: !1 }))
|
|
1146
|
+
].filter((e) => e.s?.state === "value" && typeof e.s.raw == "number"), LAST = Number.MAX_SAFE_INTEGER;
|
|
1147
|
+
if (entries.sort((a, b) => (folded.leafOrder.get(a.r.id) ?? LAST) - (folded.leafOrder.get(b.r.id) ?? LAST)), entries.length !== leafRows.length + hiddenLeaves.length || entries.length === 0) return;
|
|
1148
|
+
let decimals = spec.decimals ?? 1, unit = Math.pow(10, -decimals), floors = entries.map((e) => Math.floor(e.s.raw / unit) * unit), remainders = entries.map((e, i) => e.s.raw - floors[i]), deficit = Math.round((100 - floors.reduce((a, b) => a + b, 0)) / unit), ownPrecision = entries.map((e) => {
|
|
1149
|
+
let cellSpec = cellSpecs.get(e.r.id)?.get(colId);
|
|
1150
|
+
return cellSpec !== void 0 && (cellSpec.decimals ?? 1) !== decimals;
|
|
1151
|
+
}), order = entries.map((_, i) => i).filter((i) => !ownPrecision[i]).sort((a, b) => remainders[b] - remainders[a] || a - b), adjusted = /* @__PURE__ */ new Set();
|
|
1047
1152
|
for (let i of order) {
|
|
1048
1153
|
if (deficit <= 0) break;
|
|
1049
1154
|
adjusted.add(i), deficit--;
|
|
1050
1155
|
}
|
|
1051
1156
|
entries.forEach((e, i) => {
|
|
1052
|
-
|
|
1053
|
-
|
|
1157
|
+
if (ownPrecision[i] || !e.shown) return;
|
|
1158
|
+
let shown = floors[i] + (adjusted.has(i) ? unit : 0), cellSpec = cellSpecs.get(e.r.id)?.get(colId);
|
|
1159
|
+
displayOverride.set(tableCellKey(e.r.id, colId), shown === 0 && e.s.raw > 0 && spec.automatic && !cellSpec ? `<${formatNumber(unit, colId)}` : formatNumber(shown, colId, e.r.id)), overrideAmount.set(tableCellKey(e.r.id, colId), shown), adjusted.has(i) && Math.abs(shown - e.s.raw) > 1e-9 && records.push({
|
|
1054
1160
|
rowId: e.r.id,
|
|
1055
1161
|
colId,
|
|
1056
1162
|
op: "share-reconcile",
|
|
@@ -1063,7 +1169,7 @@ function resolveTableIn(data, options, magnitudeSource) {
|
|
|
1063
1169
|
],
|
|
1064
1170
|
raw: shown,
|
|
1065
1171
|
state: "value",
|
|
1066
|
-
displayed: formatNumber(shown, colId),
|
|
1172
|
+
displayed: formatNumber(shown, colId, e.r.id),
|
|
1067
1173
|
kind: "rounding-adjustment"
|
|
1068
1174
|
});
|
|
1069
1175
|
});
|
|
@@ -1083,7 +1189,7 @@ function resolveTableIn(data, options, magnitudeSource) {
|
|
|
1083
1189
|
for (let row of flat) {
|
|
1084
1190
|
let rowSpec = rowSpecs.get(row.id);
|
|
1085
1191
|
if (!rowSpec || row.calc || !(rowSpec.suffix ?? "").includes("%")) continue;
|
|
1086
|
-
let vals = valueCols.filter((col) => !
|
|
1192
|
+
let vals = valueCols.filter((col) => !ownFormatColumns.has(col.id) && col.percentScale !== "points").map((col) => rawState.get(row.id).get(col.id)).filter((s) => !!s && typeof s.raw == "number");
|
|
1087
1193
|
vals.length > 0 && vals.every((v) => Math.abs(v.raw) <= 1.5) && warnings.push({
|
|
1088
1194
|
code: "percent-scale-suspect",
|
|
1089
1195
|
severity: "warn",
|
|
@@ -1107,7 +1213,7 @@ function resolveTableIn(data, options, magnitudeSource) {
|
|
|
1107
1213
|
{ rowId: k.id, colId: col.id, value: childRaw[i], role: "raw" },
|
|
1108
1214
|
{ rowId: k.id, colId: col.id, value: childShown[i], role: "displayed" }
|
|
1109
1215
|
])
|
|
1110
|
-
],
|
|
1216
|
+
], unitOf2 = (candidate) => Math.pow(10, -candidate.decimals) * MAGNITUDE_DIVISOR[candidate.magnitude], displayUnit = Math.min(unitOf2(spec), minOf(kids.map((k) => unitOf2(specFor(col.id, k.id)))));
|
|
1111
1217
|
Math.abs(roundingGap) > displayUnit * 0.5 && (autoFootnotes.add(ROUNDING_FOOTNOTE), records.push({
|
|
1112
1218
|
rowId: row.id,
|
|
1113
1219
|
colId: col.id,
|
|
@@ -1237,7 +1343,7 @@ function resolveTableIn(data, options, magnitudeSource) {
|
|
|
1237
1343
|
...obj?.heat === !1 ? { heat: !1 } : {},
|
|
1238
1344
|
...obj?.strong === !0 && obj.tone !== void 0 && obj.tone !== "neutral" ? { strong: !0 } : {},
|
|
1239
1345
|
...typeof obj?.bar == "number" && Number.isFinite(obj.bar) ? { bar: Math.min(1, Math.max(0, obj.bar)) } : {},
|
|
1240
|
-
...col.kind === "value" && obj?.format !== void 0 ? { format: obj.format } : {},
|
|
1346
|
+
...(col.kind === "value" || col.kind === "computed") && obj?.format !== void 0 ? { format: obj.format } : {},
|
|
1241
1347
|
scenario: col.kind === "value" ? col.scenario : void 0,
|
|
1242
1348
|
role: row.role,
|
|
1243
1349
|
relation: row.relation,
|
|
@@ -1252,13 +1358,13 @@ function resolveTableIn(data, options, magnitudeSource) {
|
|
|
1252
1358
|
return { ...base, raw: row.label, state: "value", displayed: row.label };
|
|
1253
1359
|
case "value":
|
|
1254
1360
|
case "computed": {
|
|
1255
|
-
let evaluated = rawState.get(row.id).get(col.id), s = evaluated ?? { raw: null, state: "missing" }, displayed;
|
|
1361
|
+
let evaluated = rawState.get(row.id).get(col.id), s = evaluated ?? { raw: null, state: "missing" }, displayed, negated = !1;
|
|
1256
1362
|
if (s.state !== "value" || typeof s.raw != "number") {
|
|
1257
1363
|
let state = s.state === "value" ? "missing" : s.state, noPreviousColumn = row.calc !== void 0 && JSON.stringify(row.calc).includes('"previous":true') && previousColumnInGroup(data.columnGroups ?? [], col.id) === null, noPreviousValue = state === "na" && previousPlaceholders && noPreviousColumn;
|
|
1258
1364
|
displayed = state === "missing" && gapWord && missing === void 0 && evaluated !== void 0 && !(noPreviousColumn && noPrevious === "missing") && !blankInputs(row, col) ? glyphs.na : state === "missing" || noPreviousValue ? missingGlyph : glyphs[state];
|
|
1259
1365
|
} else {
|
|
1260
|
-
let relativeChange = (row.inline === !0 || row.calc !== void 0 || col.kind === "computed") && (specUnitKind(specFor(col.id, row.id)) !== "number" || row.calc !== void 0 && calcYieldsPoints(row.calc) || col.kind === "computed" && calcYieldsPoints(col.calc)), negate = (options.signs ?? "signed") === "signed" && row.kind !== "driver" && row.kind !== "result" && !relativeChange && signTo(row, null) === -1;
|
|
1261
|
-
displayed = (negate ? void 0 : displayOverride.get(tableCellKey(row.id, col.id))) ?? formatNumber(negate && s.raw !== 0 ? -s.raw : s.raw, col.id, row.id), negate && locale.minusGlyph === "-" && (displayed = displayed.replace(MINUS, "-")), s.partial && !(disclosuresShown(options) && partialColumnIds.has(col.id)) && (displayed = `${displayed} ${options.strings?.incomplete ?? localeStrings(options.locale?.language).incomplete}`);
|
|
1366
|
+
let relativeChange = (row.inline === !0 || row.calc !== void 0 || col.kind === "computed") && (specUnitKind(specFor(col.id, row.id)) !== "number" || row.calc !== void 0 && calcYieldsPoints(row.calc) || col.kind === "computed" && calcYieldsPoints(col.calc)), negate = (options.signs ?? "signed") === "signed" && row.kind !== "driver" && row.kind !== "result" && !relativeChange && signTo(row, null) === -1 && (col.kind !== "computed" || row.calc !== void 0 || calcFlipsWithInputs(col.calc));
|
|
1367
|
+
negated = negate && s.raw !== 0, displayed = (negate ? void 0 : displayOverride.get(tableCellKey(row.id, col.id))) ?? formatNumber(negate && s.raw !== 0 ? -s.raw : s.raw, col.id, row.id), negate && locale.minusGlyph === "-" && (displayed = displayed.replace(MINUS, "-")), s.partial && !(disclosuresShown(options) && partialColumnIds.has(col.id)) && (displayed = `${displayed} ${options.strings?.incomplete ?? localeStrings(options.locale?.language).incomplete}`);
|
|
1262
1368
|
}
|
|
1263
1369
|
let band = obj?.bands !== void 0 && s.state === "value" && typeof s.raw == "number" ? bandFor(s.raw, obj.bands) : void 0, bandIndex = band === void 0 ? -1 : obj.bands.indexOf(band), tone = obj?.tone ?? band?.tone ?? "neutral", deEmphasized, judgmentRow = row.relation === "additive" || row.calc !== void 0 || row.inline === !0 && row.polarity !== void 0, polarity = col.polarity !== void 0 ? row.polarity ?? col.polarity : row.calc !== void 0 || row.inline === !0 || specFor(col.id, row.id).signed ? row.polarity : void 0;
|
|
1264
1370
|
if (s.state === "value" && typeof s.raw == "number" && judgmentRow) {
|
|
@@ -1282,11 +1388,12 @@ function resolveTableIn(data, options, magnitudeSource) {
|
|
|
1282
1388
|
deEmphasized,
|
|
1283
1389
|
polarity,
|
|
1284
1390
|
...zero ? { zero: !0 } : {},
|
|
1391
|
+
...negated ? { negated: !0 } : {},
|
|
1285
1392
|
...band === void 0 ? {} : { band: { to: band.to, ...bandIndex > 0 ? { from: obj.bands[bandIndex - 1].to } : {}, ...band.label === void 0 ? {} : { label: band.label } } }
|
|
1286
1393
|
};
|
|
1287
1394
|
}
|
|
1288
1395
|
case "status": {
|
|
1289
|
-
let given = typeof authored == "number" ? authored : obj?.v,
|
|
1396
|
+
let given = typeof authored == "number" ? authored : obj?.v, written = typeof authored == "string" ? authored : typeof given == "string" ? given : null, v = written;
|
|
1290
1397
|
if (typeof given == "number")
|
|
1291
1398
|
return warnings.push({
|
|
1292
1399
|
code: "status-value-number",
|
|
@@ -1294,19 +1401,39 @@ function resolveTableIn(data, options, magnitudeSource) {
|
|
|
1294
1401
|
message: `status cell rows[${row.id}].cells[${col.id}] holds the number ${given} and draws the missing dash; write one of: ${STATUS_VALUES.join(" \xB7 ")}, or use a text column with a cell tone. A later release refuses a number here.`,
|
|
1295
1402
|
owner: { rowId: row.id, colId: col.id }
|
|
1296
1403
|
}), { ...base, displayed: missingGlyph };
|
|
1404
|
+
if (v !== null && !STATUS_VALUES.includes(v)) {
|
|
1405
|
+
let converted = caseInsensitiveValue(v, STATUS_VALUES) ?? (Object.hasOwn(STATUS_WORDS, v.toLowerCase()) ? STATUS_WORDS[v.toLowerCase()] : void 0);
|
|
1406
|
+
if (converted !== void 0) {
|
|
1407
|
+
let rowPath = (rows, base2) => {
|
|
1408
|
+
for (let [index, candidate] of rows.entries()) {
|
|
1409
|
+
let path = [...base2, index];
|
|
1410
|
+
if (candidate.id === row.id) return path;
|
|
1411
|
+
let child = candidate.children && rowPath(candidate.children, [...path, "children"]);
|
|
1412
|
+
if (child) return child;
|
|
1413
|
+
}
|
|
1414
|
+
}, field = [...rowPath(data.rows, ["data", "rows"]), "cells", col.id, ...obj ? ["v"] : []];
|
|
1415
|
+
warnings.push(inputConversion(field, v, converted)), v = converted;
|
|
1416
|
+
}
|
|
1417
|
+
}
|
|
1297
1418
|
if (v !== null && !STATUS_VALUES.includes(v))
|
|
1298
1419
|
throw new NormalizeError(
|
|
1299
1420
|
"status-value-invalid",
|
|
1300
1421
|
`rows[${row.id}].cells[${col.id}]`,
|
|
1301
|
-
`status '${v}' is not one of: ${STATUS_VALUES.join(" \xB7 ")}; for free status text use a text column with a cell tone
|
|
1422
|
+
`status '${v}' is not one of: ${STATUS_VALUES.join(" \xB7 ")}; for free status text use a text column with a cell tone`,
|
|
1423
|
+
"Use on-track, at-risk, off-track, done or pending, or green, amber, yellow or red (any case). For free status text use a text column with a cell tone."
|
|
1302
1424
|
);
|
|
1303
1425
|
if (v === null) return { ...base, displayed: missingGlyph };
|
|
1304
|
-
let tone = v === "off-track" ? "bad" : v === "at-risk" ? "warn" : v === "done" || v === "on-track" ? "good" : "neutral", labels = col.kind === "status" ? col.labels : void 0;
|
|
1305
|
-
return { ...base, raw: v, state: "value", displayed
|
|
1426
|
+
let tone = v === "off-track" ? "bad" : v === "at-risk" ? "warn" : v === "done" || v === "on-track" ? "good" : "neutral", labels = col.kind === "status" ? col.labels : void 0, displayed = written === v ? labels?.[v] ?? v : labels?.[written] ?? labels?.[v] ?? v;
|
|
1427
|
+
return { ...base, raw: v, state: "value", displayed, tone: judgementTone(tone, obj?.strong) };
|
|
1306
1428
|
}
|
|
1307
1429
|
case "date": {
|
|
1308
|
-
let v = typeof authored == "string" ? authored : typeof
|
|
1309
|
-
if (
|
|
1430
|
+
let given = typeof authored == "number" ? authored : obj?.v, v = typeof authored == "string" ? authored : typeof given == "string" ? given : null;
|
|
1431
|
+
if (typeof given == "number" && warnings.push({
|
|
1432
|
+
code: "date-value-number",
|
|
1433
|
+
severity: "warn",
|
|
1434
|
+
message: `date cell rows[${row.id}].cells[${col.id}] holds the number ${given} and draws the missing dash; write an ISO date (YYYY-MM-DD), or use a value or text column.`,
|
|
1435
|
+
owner: { rowId: row.id, colId: col.id }
|
|
1436
|
+
}), v === null) return { ...base, displayed: missingGlyph };
|
|
1310
1437
|
let d = parseISODate(v);
|
|
1311
1438
|
if (!d)
|
|
1312
1439
|
throw new NormalizeError(
|
|
@@ -1314,7 +1441,7 @@ function resolveTableIn(data, options, magnitudeSource) {
|
|
|
1314
1441
|
`rows[${row.id}].cells[${col.id}]`,
|
|
1315
1442
|
`'${v}' is not an ISO date (YYYY-MM-DD)`
|
|
1316
1443
|
);
|
|
1317
|
-
let pattern =
|
|
1444
|
+
let pattern = datePatterns.get(col.id);
|
|
1318
1445
|
return { ...base, raw: v, state: "value", displayed: formatDate(d, pattern, options.locale?.language) };
|
|
1319
1446
|
}
|
|
1320
1447
|
case "text": {
|
|
@@ -1391,11 +1518,11 @@ function resolveCellEncoding(encoding, percent) {
|
|
|
1391
1518
|
...encoding.tolerance === void 0 ? {} : { tolerance: encoding.tolerance }
|
|
1392
1519
|
};
|
|
1393
1520
|
}
|
|
1394
|
-
var evaluatedStates = /* @__PURE__ */ new WeakMap();
|
|
1521
|
+
var evaluatedStates = /* @__PURE__ */ new WeakMap(), partitionLeafIds = /* @__PURE__ */ new WeakMap();
|
|
1395
1522
|
function applyTableTopN(data, options) {
|
|
1396
1523
|
let topN = options.topN;
|
|
1397
|
-
if (!topN || topN.n <= 0) return { data, generatedOthers: /* @__PURE__ */ new Set(), hidden: /* @__PURE__ */ new Map() };
|
|
1398
|
-
let inner = resolveTable(data, { ...options, topN: void 0 }), folded = foldTableTopN(data, inner.table, options), kept = new Set(flattenRows(folded.data.rows).map((row) => row.id)), innerById = new Map(inner.table.rows.map((row) => [row.id, row])), hidden = /* @__PURE__ */ new Map();
|
|
1524
|
+
if (!topN || topN.n <= 0) return { data, generatedOthers: /* @__PURE__ */ new Set(), hidden: /* @__PURE__ */ new Map(), leafOrder: /* @__PURE__ */ new Map() };
|
|
1525
|
+
let inner = resolveTable(data, { ...options, topN: void 0 }), folded = foldTableTopN(data, inner.table, options), kept = new Set(flattenRows(folded.data.rows).map((row) => row.id)), innerById = new Map(inner.table.rows.map((row) => [row.id, row])), hidden = /* @__PURE__ */ new Map(), leafOrder = new Map((partitionLeafIds.get(evaluatedStates.get(inner)) ?? []).map((id, i) => [id, i]));
|
|
1399
1526
|
for (let row of inner.table.rows) {
|
|
1400
1527
|
if (kept.has(row.id)) continue;
|
|
1401
1528
|
let evaluated = evaluatedStates.get(inner)?.get(row.id), states = /* @__PURE__ */ new Map();
|
|
@@ -1403,16 +1530,16 @@ function applyTableTopN(data, options) {
|
|
|
1403
1530
|
let own = evaluated?.get(colId);
|
|
1404
1531
|
states.set(colId, { raw: cell.raw, state: cell.state, ...own?.partial ? { partial: !0, skipped: own.skipped } : {} });
|
|
1405
1532
|
}
|
|
1406
|
-
hidden.set(row.id, { sign: contributionSignOf(row, (id) => innerById.get(id), null), states });
|
|
1533
|
+
hidden.set(row.id, { sign: contributionSignOf(row, (id) => innerById.get(id), null), states, leaf: leafOrder.has(row.id) });
|
|
1407
1534
|
}
|
|
1408
|
-
return { ...folded, hidden };
|
|
1535
|
+
return { ...folded, hidden, leafOrder };
|
|
1409
1536
|
}
|
|
1410
1537
|
function stampRecordDisplay(records, resolvedRows, formatNumber) {
|
|
1411
1538
|
let cellIndex = /* @__PURE__ */ new Map();
|
|
1412
1539
|
for (let r of resolvedRows) for (let c of Object.values(r.cells)) cellIndex.set(tableCellKey(c.rowId, c.colId), c);
|
|
1413
1540
|
for (let rec of records) {
|
|
1414
1541
|
if (rec.kind === "reconciliation" || rec.kind === "rounding-adjustment") {
|
|
1415
|
-
rec.displayed = typeof rec.raw == "number" ? formatNumber(rec.raw, rec.colId) : "";
|
|
1542
|
+
rec.displayed = typeof rec.raw == "number" ? formatNumber(rec.raw, rec.colId, rec.kind === "rounding-adjustment" ? rec.rowId : void 0) : "";
|
|
1416
1543
|
continue;
|
|
1417
1544
|
}
|
|
1418
1545
|
rec.displayed = cellIndex.get(tableCellKey(rec.rowId, rec.colId))?.displayed ?? rec.displayed;
|
|
@@ -1716,9 +1843,6 @@ function validateCalcRefs(columns, colById) {
|
|
|
1716
1843
|
for (let c of columns)
|
|
1717
1844
|
c.kind === "computed" && check(c.calc, c.id);
|
|
1718
1845
|
}
|
|
1719
|
-
function calcYieldsPoints(calc) {
|
|
1720
|
-
return "op" in calc && (calc.op === "share" || calc.op === "percentDelta");
|
|
1721
|
-
}
|
|
1722
1846
|
var LEAF_TOTAL_ROW_ID = "__leafTotal", SHARE_UNIT_ROW_ID = "__displayUnit";
|
|
1723
1847
|
function pushCalcRecord(records, rowId, colId, res) {
|
|
1724
1848
|
records.push({
|
|
@@ -1806,7 +1930,10 @@ function walkRowCalc(calc, owner, rowIds, calcRows, colById, reads = []) {
|
|
|
1806
1930
|
return reads;
|
|
1807
1931
|
}
|
|
1808
1932
|
function evaluateTableCalcs(flat, valueCols, computedCols, rawState, records, leafTotal, columnGroups, colById, noPrevious = "na", contributionSign = () => 1) {
|
|
1809
|
-
let
|
|
1933
|
+
let negativeBase = /* @__PURE__ */ new Map(), noteNegativeBase = (scope, rowId, colId) => {
|
|
1934
|
+
let key = `${scope}:${scope === "column" ? colId : rowId}`, seen = negativeBase.get(key);
|
|
1935
|
+
seen ? seen.cells += 1 : negativeBase.set(key, { scope, rowId, colId, cells: 1 });
|
|
1936
|
+
}, nearZero = !1, mixedCoverage = !1, rowIds = new Set(rawState.keys()), calcRows = new Set(flat.filter((row) => row.calc).map((row) => row.id)), previousCol = (colId) => previousColumnInGroup(columnGroups, colId), numericCols = [...valueCols, ...computedCols], partialFrom = (res, rowId, states) => {
|
|
1810
1937
|
if (res.state !== "value") return {};
|
|
1811
1938
|
let partials = res.inputs.map((input) => (input.rowId === rowId ? states : rawState.get(input.rowId))?.get(input.colId)).filter((state) => state?.partial);
|
|
1812
1939
|
return partials.length > 0 ? { partial: !0, skipped: skippedKey(partials.flatMap((state) => skippedRows(state))) } : {};
|
|
@@ -1820,7 +1947,7 @@ function evaluateTableCalcs(flat, valueCols, computedCols, rawState, records, le
|
|
|
1820
1947
|
let states = rawState.get(row.id);
|
|
1821
1948
|
for (let col of computedCols) {
|
|
1822
1949
|
let res = evalCalc(col.calc, row, states, leafTotal, void 0, contributionSign);
|
|
1823
|
-
res.state === "value" && comparesMixedRows(col.calc, coverageOf(row.id, states, col.id)) && (res = { ...res, raw: null, state: "nm" }, mixedCoverage = !0), states.set(col.id, { raw: res.raw, state: res.state, ...partialFrom(res, row.id, states) }), res.nearZero && (nearZero = !0), pushCalcRecord(records, row.id, col.id, res);
|
|
1950
|
+
res.state === "value" && comparesMixedRows(col.calc, coverageOf(row.id, states, col.id)) && (res = { ...res, raw: null, state: "nm" }, mixedCoverage = !0), states.set(col.id, { raw: res.raw, state: res.state, ...partialFrom(res, row.id, states) }), res.nearZero && (nearZero = !0), res.negativeBase && res.state === "value" && noteNegativeBase("column", row.id, col.id), pushCalcRecord(records, row.id, col.id, res);
|
|
1824
1951
|
}
|
|
1825
1952
|
}
|
|
1826
1953
|
let calcFlat = flat.filter((row) => row.role !== "section" && row.calc), byId = new Map(calcFlat.map((row) => [row.id, row])), ordered = [], visit = /* @__PURE__ */ new Map(), place = (row) => {
|
|
@@ -1842,16 +1969,19 @@ function evaluateTableCalcs(flat, valueCols, computedCols, rawState, records, le
|
|
|
1842
1969
|
let states = rawState.get(row.id), sourceStates = new Map(states);
|
|
1843
1970
|
for (let col of numericCols) {
|
|
1844
1971
|
if (col.kind === "computed" && !calcPreservesScale(col.calc)) continue;
|
|
1845
|
-
let
|
|
1972
|
+
let ownCalc = col.kind === "computed" && isChangeCalc(col.calc) && !calcIsLinear(row.calc), calc = ownCalc ? col.calc : row.calc, read = ownCalc ? states : sourceStates, res = evalCalc(calc, row, read, leafTotal, ownCalc ? void 0 : {
|
|
1846
1973
|
currentCol: col.id,
|
|
1847
1974
|
rawState,
|
|
1848
1975
|
previousCol,
|
|
1849
1976
|
noPrevious
|
|
1850
1977
|
}, contributionSign);
|
|
1851
|
-
res.state === "value" && comparesMixedRows(
|
|
1978
|
+
res.state === "value" && comparesMixedRows(calc, coverageOf(row.id, read, col.id)) && (res = { ...res, raw: null, state: "nm" }, mixedCoverage = !0), states.set(col.id, { raw: res.raw, state: res.state, ...partialFrom(res, row.id, read) }), res.nearZero && (nearZero = !0), res.negativeBase && res.state === "value" && noteNegativeBase("row", row.id, col.id), pushCalcRecord(records, row.id, col.id, res);
|
|
1852
1979
|
}
|
|
1853
1980
|
}
|
|
1854
|
-
return { nearZero, mixedCoverage };
|
|
1981
|
+
return { nearZero, mixedCoverage, negativeBase: [...negativeBase.values()] };
|
|
1982
|
+
}
|
|
1983
|
+
function isChangeCalc(calc) {
|
|
1984
|
+
return "op" in calc && (calc.op === "delta" || calc.op === "sub" && "ref" in calc.a && "ref" in calc.b);
|
|
1855
1985
|
}
|
|
1856
1986
|
function comparesMixedRows(calc, skippedOf) {
|
|
1857
1987
|
let side = (node) => {
|
|
@@ -1888,7 +2018,7 @@ function skippedRows(state) {
|
|
|
1888
2018
|
return state.skipped ? state.skipped.split("") : [];
|
|
1889
2019
|
}
|
|
1890
2020
|
function evalCalc(calc, row, states, leafTotal, scope, contributionSign = () => 1) {
|
|
1891
|
-
let inputs = [], isState = (v) => typeof v != "number", expr = "", nearZero = !1, emit = (text) => {
|
|
2021
|
+
let inputs = [], isState = (v) => typeof v != "number", expr = "", nearZero = !1, negativeBase = !1, emit = (text) => {
|
|
1892
2022
|
expr = text;
|
|
1893
2023
|
}, read = (ref) => readCalcInput(ref, {
|
|
1894
2024
|
currentRow: row.id,
|
|
@@ -1913,7 +2043,7 @@ function evalCalc(calc, row, states, leafTotal, scope, contributionSign = () =>
|
|
|
1913
2043
|
case "mul":
|
|
1914
2044
|
case "div": {
|
|
1915
2045
|
let [a, aExpr] = child(node.a), [b, bExpr] = child(node.b);
|
|
1916
|
-
return emit(`${node.op}(${aExpr},${bExpr})`), isState(a) && isState(b) ? worse(a, b) : isState(a) ? a : isState(b) ? b : node.op === "add" ? a
|
|
2046
|
+
return emit(`${node.op}(${aExpr},${bExpr})`), isState(a) && isState(b) ? worse(a, b) : isState(a) ? a : isState(b) ? b : node.op === "add" ? cleanSum([a, b]) : node.op === "sub" ? cleanDiff(a, b) : node.op === "mul" ? a * b : b === 0 ? a === 0 ? "na" : "nm" : (b < 0 && !("lit" in node.b) && (negativeBase = !0), a / b);
|
|
1917
2047
|
}
|
|
1918
2048
|
case "delta": {
|
|
1919
2049
|
let a = read(node.a), aExpr = expr, b = read(node.b);
|
|
@@ -1939,7 +2069,7 @@ function evalCalc(calc, row, states, leafTotal, scope, contributionSign = () =>
|
|
|
1939
2069
|
}
|
|
1940
2070
|
}
|
|
1941
2071
|
}, result = evalNode(calc), op = "ref" in calc ? `ref(${expr})` : "lit" in calc ? `lit(${expr})` : expr;
|
|
1942
|
-
return isState(result) ? { raw: null, state: result, op, inputs, ...nearZero && result === "nm" ? { nearZero: !0 } : {} } : { raw: result, state: "value", op, inputs };
|
|
2072
|
+
return isState(result) ? { raw: null, state: result, op, inputs, ...nearZero && result === "nm" ? { nearZero: !0 } : {} } : { raw: result, state: "value", op, inputs, ...negativeBase ? { negativeBase: !0 } : {} };
|
|
1943
2073
|
}
|
|
1944
2074
|
|
|
1945
2075
|
// src/core/charts/table/view.ts
|
|
@@ -2079,7 +2209,7 @@ function sortableColumnIds(table, sortable) {
|
|
|
2079
2209
|
function sortKey(row, colId) {
|
|
2080
2210
|
let cell = row.cells[colId];
|
|
2081
2211
|
if (cell === void 0 || cell.state !== "value") return { missing: !0 };
|
|
2082
|
-
if (typeof cell.raw == "number") return { missing: !1, number: cell
|
|
2212
|
+
if (typeof cell.raw == "number") return { missing: !1, number: printedNumber(cell) };
|
|
2083
2213
|
let text = typeof cell.raw == "string" && cell.raw !== "" ? cell.raw : cell.displayed;
|
|
2084
2214
|
return text === "" ? { missing: !0 } : { missing: !1, text };
|
|
2085
2215
|
}
|
|
@@ -2097,7 +2227,7 @@ function sortRows(table, sort, locale) {
|
|
|
2097
2227
|
let list = childrenOf.get(row.parentId) ?? [];
|
|
2098
2228
|
list.push(row), childrenOf.set(row.parentId, list);
|
|
2099
2229
|
}
|
|
2100
|
-
let movable = (row) => row
|
|
2230
|
+
let movable = (row) => ranksAsData(row) && row.inline !== !0, compare = (a, b) => {
|
|
2101
2231
|
let ka = sortKey(a, sort.column), kb = sortKey(b, sort.column);
|
|
2102
2232
|
if (ka.missing || kb.missing)
|
|
2103
2233
|
return ka.missing === kb.missing ? a.order - b.order : ka.missing ? 1 : -1;
|
|
@@ -2164,9 +2294,14 @@ function inCellBarMaxima(rows, columns) {
|
|
|
2164
2294
|
// src/core/charts/table/widths.ts
|
|
2165
2295
|
var FLEX_MIN = 80, HEAT_ONLY_CELL_W = 22;
|
|
2166
2296
|
function tableWidths(table, theme, measure, options = {}, view = {}) {
|
|
2167
|
-
let
|
|
2297
|
+
let { defaultColumns, ...own } = view, shown = own.columns ?? visibleColumns(table);
|
|
2298
|
+
if (own.scroll && defaultColumns !== void 0 && (defaultColumns.length !== shown.length || defaultColumns.some((col, index) => col.id !== shown[index].id))) {
|
|
2299
|
+
let base = tableWidths(table, theme, measure, options, { ...own, columns: defaultColumns }), track = base.tracks.find((entry) => entry.id === defaultColumns.find((col) => col.kind === "rowLabel")?.id)?.width;
|
|
2300
|
+
track !== void 0 && base.labelNeed !== void 0 && (own.labelKeep = Math.min(track, Math.max(base.labelNeed, base.labelBeforeFill ?? 0)));
|
|
2301
|
+
}
|
|
2302
|
+
let regular = tableWidthsOnce(table, theme, measure, options, own), count = (view.columns ?? visibleColumns(table)).length, densePad = count >= 25 ? 3 : count >= DENSE_COLUMNS ? 5 : regular.cellPadX;
|
|
2168
2303
|
if (options.cellPadX !== void 0 || densePad >= regular.cellPadX || Math.max(regular.minimumW, regular.totalW) <= (view.available ?? 1 / 0)) return regular;
|
|
2169
|
-
let dense = tableWidthsOnce(table, theme, measure, { ...options, cellPadX: densePad },
|
|
2304
|
+
let dense = tableWidthsOnce(table, theme, measure, { ...options, cellPadX: densePad }, own), regularOverflow = regular.warnings.find((warning) => warning.code === "table-overflow");
|
|
2170
2305
|
return regularOverflow && (dense.warnings = dense.warnings.map((warning) => warning.code === "table-overflow" ? regularOverflow : warning)), dense;
|
|
2171
2306
|
}
|
|
2172
2307
|
function tableWidthsOnce(table, theme, measure, options = {}, view = {}) {
|
|
@@ -2186,12 +2321,14 @@ function tableWidthsOnce(table, theme, measure, options = {}, view = {}) {
|
|
|
2186
2321
|
}, headingFaces = (faces) => groupHeadingFaces(view.trailingTracking ? { ...faces.group, letterSpacing: Math.round((faces.group.letterSpacing ?? 0) * 1e3) / 1e3 } : faces.group), warnings = [], ladder = levelLadder(theme, options.density ?? "regular", options.target, textScaleOf(options)), regularFonts = tableFonts(theme, ladder), rowById = new Map([...widthRows, ...rows].map((row) => [row.id, row])), hasChanges = new Set(table.rows.filter((row) => visibleInlineRows(row, options.inlineVisibility).length > 0).map((row) => row.id)), cellStep = (cell) => rowById.get(cell.rowId)?.step ?? cell.level, childCount = treeChildCounts(table), isTree = fullRows.some((row) => row.hasChildren), indents = labelIndents(cellPadX2, options.labelIndent, view.withMarks ?? options.outlineMarks === !0), operatorSlot = operatorWidth(rows, theme), rowIndent = (level) => (isTree ? indents.base + level * indents.step : 0) + operatorSlot, inlineFont2 = (level, signed) => inlineFont(theme, ladder, level, signed);
|
|
2187
2322
|
function cellFont(cell) {
|
|
2188
2323
|
let row = rowById.get(cell.rowId), kind = row?.kind, totalFace = kind === void 0 || kind !== "subtotal" && kind !== "result" && kind !== "driver" && (kind !== "member" && kind !== "measure" || theme.table?.weights?.figures?.[kind] === void 0);
|
|
2189
|
-
|
|
2324
|
+
if (cell.role === "total" && cell.kind !== "rowLabel" && totalFace) return regularFonts.totalValue;
|
|
2325
|
+
let font = kindFont(rowFont(theme, ladder, regularFonts, cell.role, cellStep(cell), row?.hasChildren === !0, hasChanges.has(cell.rowId)), kind, cell.kind === "rowLabel", theme);
|
|
2326
|
+
return cell.state === "value" ? strongColumnFont(font, cols.find((col) => col.id === cell.colId), cell, kind, theme) : font;
|
|
2190
2327
|
}
|
|
2191
2328
|
function affixRoom(row, font) {
|
|
2192
2329
|
return row.unitAffix === void 0 ? 0 : theme.table?.qualifier === void 0 ? measure(` ${row.unitAffix}`, inlineFont2(row.step, !1)).width : measure(row.unitAffix, qualifierFont(font, theme)).width + (theme.table.qualifier.gap ?? 4);
|
|
2193
2330
|
}
|
|
2194
|
-
let columnHeaderText = (col) =>
|
|
2331
|
+
let columnHeaderText = (col) => fieldHeadText(col.label, theme) + columnHeaderAffix(col);
|
|
2195
2332
|
function trackWidths(faces) {
|
|
2196
2333
|
let widths2 = /* @__PURE__ */ new Map(), minimumWidths2 = /* @__PURE__ */ new Map(), wrappedOneLines = /* @__PURE__ */ new Map(), context = {
|
|
2197
2334
|
theme,
|
|
@@ -2249,7 +2386,7 @@ function tableWidthsOnce(table, theme, measure, options = {}, view = {}) {
|
|
|
2249
2386
|
}
|
|
2250
2387
|
let labelFloor = options[LABEL_WRAP_FLOOR] === !0 && labelColumn !== void 0 ? labelWrapFloor(labelColumn, faces) + labelLead : 0;
|
|
2251
2388
|
if (labelFloor > 0) for (let target of [widths2, minimumWidths2]) target.set(labelColumn.id, Math.max(target.get(labelColumn.id), labelFloor));
|
|
2252
|
-
view.scroll && labelColumn?.width === void 0 && labelColumn !== void 0 && (labelFloor = Math.max(labelFloor, intrinsicColumnWidth(labelColumn, widthRows, {
|
|
2389
|
+
view.scroll && labelColumn?.width === void 0 && labelColumn !== void 0 && (labelFloor = Math.max(labelFloor, view.labelKeep ?? 0, intrinsicColumnWidth(labelColumn, widthRows, {
|
|
2253
2390
|
...context,
|
|
2254
2391
|
hint: void 0,
|
|
2255
2392
|
twoLineLabels: options.rowLabelLines !== 1
|
|
@@ -2297,25 +2434,33 @@ function tableWidthsOnce(table, theme, measure, options = {}, view = {}) {
|
|
|
2297
2434
|
}
|
|
2298
2435
|
let canShrink = (col) => !view.scroll || col.width === void 0 && col.kind === "rowLabel", flexIds = cols.filter((c) => canShrink(c) && (c.kind === "rowLabel" || c.kind === "text")).map((c) => c.id), totalW = sumOf(widths), floorFlexIds = cols.filter((col) => col.kind === "rowLabel" || col.kind === "text").map((col) => col.id), minimumW = Math.max(sumOf(sizingMinimums), sumOf(shrinkReach(cols, floorFlexIds, wideTable, sizingTracks, sizingMinimums, (dense ?? regular).labelFloor)));
|
|
2299
2436
|
if (totalW > available && flexIds.length > 0) {
|
|
2300
|
-
let deficit = totalW - available;
|
|
2437
|
+
let deficit = totalW - available, beforeShrink = new Map(widths), floorOf = (col) => view.scroll ? chosen.labelFloor : shrinkFloorWidth(col, wideTable, minimumWidths, chosen.labelFloor);
|
|
2301
2438
|
for (let col of cols.filter((c) => canShrink(c) && c.kind === "rowLabel")) {
|
|
2302
|
-
let take = Math.min(deficit, Math.max(0, widths.get(col.id) - minimumWidths.get(col.id)));
|
|
2439
|
+
let take = Math.min(deficit, Math.max(0, widths.get(col.id) - Math.max(minimumWidths.get(col.id), view.scroll ? view.labelKeep ?? 0 : 0)));
|
|
2303
2440
|
take > 0 && (widths.set(col.id, widths.get(col.id) - take), deficit -= take);
|
|
2304
2441
|
}
|
|
2305
2442
|
for (let kind of ["text", "rowLabel"]) {
|
|
2306
2443
|
if (deficit <= 0) break;
|
|
2307
2444
|
let shrinkable = cols.filter((c) => canShrink(c) && c.kind === kind).map((col) => ({
|
|
2308
2445
|
id: col.id,
|
|
2309
|
-
room: Math.max(0, widths.get(col.id) - (
|
|
2446
|
+
room: Math.max(0, widths.get(col.id) - floorOf(col))
|
|
2310
2447
|
})).filter((f) => f.room > 0), totalRoom = shrinkable.reduce((a, f) => a + f.room, 0);
|
|
2311
2448
|
if (totalRoom <= 0) continue;
|
|
2312
2449
|
let take = Math.min(deficit, totalRoom);
|
|
2313
2450
|
for (let f of shrinkable) {
|
|
2314
|
-
let
|
|
2315
|
-
widths.set(f.id, Math.round(widths.get(f.id) -
|
|
2451
|
+
let cut2 = take * f.room / totalRoom;
|
|
2452
|
+
widths.set(f.id, Math.round(widths.get(f.id) - cut2));
|
|
2316
2453
|
}
|
|
2317
2454
|
deficit -= take;
|
|
2318
2455
|
}
|
|
2456
|
+
if (deficit <= 0) {
|
|
2457
|
+
let flex = cols.filter((col) => canShrink(col) && (col.kind === "rowLabel" || col.kind === "text"));
|
|
2458
|
+
for (let over = Math.ceil(sumOf(widths) - available); over > 0; over--) {
|
|
2459
|
+
let roomOf2 = (col) => widths.get(col.id) - floorOf(col), widest = flex.reduce((best, col) => best === void 0 || roomOf2(col) > roomOf2(best) ? col : best, void 0);
|
|
2460
|
+
if (widest === void 0 || roomOf2(widest) < 1) break;
|
|
2461
|
+
widths.set(widest.id, widths.get(widest.id) - 1);
|
|
2462
|
+
}
|
|
2463
|
+
}
|
|
2319
2464
|
let remaining = Math.ceil(sumOf(widths) - available);
|
|
2320
2465
|
if (remaining > 0 && wideTable) {
|
|
2321
2466
|
let compactable = cols.filter((col) => canShrink(col) && col.kind !== "rowLabel" && col.kind !== "text").map((col) => col.id);
|
|
@@ -2329,6 +2474,31 @@ function tableWidthsOnce(table, theme, measure, options = {}, view = {}) {
|
|
|
2329
2474
|
if (!changed) break;
|
|
2330
2475
|
}
|
|
2331
2476
|
}
|
|
2477
|
+
let printsUncut = (col) => col.wrap ? minimumWidths.get(col.id) : intrinsicColumnWidth(col, widthRows, { ...chosen.context, hint: void 0, twoLineLabels: !0 }), flexText = cols.filter((col) => canShrink(col) && col.kind === "text" && col.width === void 0), gapOf = (col) => ({ id: col.id, gap: printsUncut(col) - widths.get(col.id) }), cutGaps = flexText.filter((col) => widths.get(col.id) < beforeShrink.get(col.id)).map(gapOf), wants = cutGaps.filter((entry) => entry.gap > 0), gaps = wants.length === 0 ? [] : flexText.map((col) => cutGaps.find((entry) => entry.id === col.id) ?? gapOf(col)), wanted = wants.reduce((sum, entry) => sum + entry.gap, 0), groupFaces = headingFaces(fonts), spare = new Map(table.columnGroups.filter((group) => group.heading !== !1).map((group) => [
|
|
2478
|
+
group.id,
|
|
2479
|
+
cols.filter((col) => group.columnIds.includes(col.id)).reduce((sum, col) => sum + widths.get(col.id), 0) - groupHeadingNeed(group, groupFaces, measure, groupCell)
|
|
2480
|
+
])), donors = gaps.filter((entry) => entry.gap < 0).map((entry) => ({
|
|
2481
|
+
id: entry.id,
|
|
2482
|
+
slack: Math.floor(-entry.gap),
|
|
2483
|
+
groups: table.columnGroups.filter((group) => spare.has(group.id) && group.columnIds.includes(entry.id))
|
|
2484
|
+
})), roomOf = (donor) => Math.max(0, Math.min(donor.slack, ...donor.groups.map((group) => spare.get(group.id)))), rooms = donors.map(roomOf), given = rooms.reduce((sum, room2) => sum + room2, 0), move = Math.floor(Math.min(wanted, given)), moved = 0, cut = (donor, amount) => {
|
|
2485
|
+
let take = Math.min(amount, roomOf(donor));
|
|
2486
|
+
widths.set(donor.id, widths.get(donor.id) - take), donor.slack -= take;
|
|
2487
|
+
for (let group of donor.groups) spare.set(group.id, spare.get(group.id) - take);
|
|
2488
|
+
moved += take;
|
|
2489
|
+
};
|
|
2490
|
+
if (move > 0) {
|
|
2491
|
+
donors.forEach((donor, index) => cut(donor, Math.floor(move * rooms[index] / given)));
|
|
2492
|
+
for (let progress = !0; progress && moved < move; ) {
|
|
2493
|
+
progress = !1;
|
|
2494
|
+
for (let donor of donors) moved < move && roomOf(donor) > 0 && (cut(donor, 1), progress = !0);
|
|
2495
|
+
}
|
|
2496
|
+
let toTake = moved;
|
|
2497
|
+
for (let [index, entry] of wants.entries()) {
|
|
2498
|
+
let add = index === wants.length - 1 ? toTake : Math.min(toTake, Math.floor(moved * entry.gap / wanted));
|
|
2499
|
+
widths.set(entry.id, widths.get(entry.id) + add), toTake -= add;
|
|
2500
|
+
}
|
|
2501
|
+
}
|
|
2332
2502
|
labelColumn !== void 0 && chipSpan(widths) < chosen.chipFloor && widths.set(labelColumn.id, widths.get(labelColumn.id) + chosen.chipFloor - chipSpan(widths));
|
|
2333
2503
|
}
|
|
2334
2504
|
let narrowed = cols.some((col) => col.width !== void 0 && (figures || !heatColumn(col)) && widths.get(col.id) < col.width);
|
|
@@ -2427,13 +2597,14 @@ function tableWidthsOnce(table, theme, measure, options = {}, view = {}) {
|
|
|
2427
2597
|
}), labelsWrap = labelColumn !== void 0 && labelNeed !== void 0 && widths.get(labelColumn.id) < labelNeed, gridTracks = tracks.flatMap((track, index) => {
|
|
2428
2598
|
let spacer = spacerBefore.get(track.id), drawn = index === 0 && (view.frameStart ?? 0) > 0 ? { ...track, width: track.width + view.frameStart } : track;
|
|
2429
2599
|
return spacer === void 0 ? [drawn] : [{ id: `bp-spacer:${track.id}`, natural: spacer, width: spacer }, drawn];
|
|
2430
|
-
});
|
|
2600
|
+
}), labelBeforeFill = labelColumn === void 0 ? void 0 : beforeFill.get(labelColumn.id);
|
|
2431
2601
|
return {
|
|
2432
2602
|
tracks,
|
|
2433
2603
|
gridTracks,
|
|
2434
2604
|
spacerBefore,
|
|
2435
2605
|
spacerTotal,
|
|
2436
2606
|
labelNeed,
|
|
2607
|
+
labelBeforeFill,
|
|
2437
2608
|
labelsWrap,
|
|
2438
2609
|
widths,
|
|
2439
2610
|
minimumWidths,
|
|
@@ -2505,6 +2676,7 @@ export {
|
|
|
2505
2676
|
LINE_BOX_EPSILON,
|
|
2506
2677
|
levelLadder,
|
|
2507
2678
|
presetLanguage,
|
|
2679
|
+
printedNumber,
|
|
2508
2680
|
arrowGlyph,
|
|
2509
2681
|
arrowKey,
|
|
2510
2682
|
emitArrow,
|
|
@@ -2514,7 +2686,6 @@ export {
|
|
|
2514
2686
|
heatPaint,
|
|
2515
2687
|
emitHeat,
|
|
2516
2688
|
ZERO_LIFT,
|
|
2517
|
-
columnHeadLabel,
|
|
2518
2689
|
columnHeaderAffix,
|
|
2519
2690
|
resolveTable,
|
|
2520
2691
|
cellHoldsNumber,
|