boardplot 0.56.0 → 0.58.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 +408 -0
- package/README.md +49 -15
- package/dist/{DiagnosticDetails-JFBBXOT2.js → DiagnosticDetails-VGSL4NJK.js} +1 -1
- package/dist/{ReaderBox-GLCKYXBU.js → ReaderBox-MHMXIDAJ.js} +8 -7
- package/dist/{annotateEngine-QVNAE3EH.js → annotateEngine-753KQBNN.js} +2 -1
- package/dist/build-identity.json +3 -3
- package/dist/{chunk-HZUAEMN5.js → chunk-2CQBBN7M.js} +4 -4
- package/dist/{chunk-K3VZ5QJK.js → chunk-2ETK5TSA.js} +4 -4
- package/dist/{chunk-HHXIVFAU.js → chunk-2ETSI2EL.js} +11 -9
- package/dist/{chunk-ECBUFKCP.js → chunk-2GRXHWRH.js} +3 -3
- package/dist/{chunk-ZVM5TFGR.js → chunk-2HII2B6S.js} +6 -2
- package/dist/{chunk-WBETBGSC.js → chunk-2LC2H3ZM.js} +1003 -907
- package/dist/chunk-2NX7EO7H.js +23 -0
- package/dist/{chunk-52WNCUIN.js → chunk-2QI2PK2O.js} +1 -1
- package/dist/{chunk-QWCLWFKC.js → chunk-2VKQQLP7.js} +180 -58
- package/dist/chunk-3DOVXJ6K.js +602 -0
- package/dist/{chunk-CAJ54IEP.js → chunk-3E6NLODZ.js} +1 -1
- package/dist/{chunk-MOS6WFWM.js → chunk-3HA4IJTO.js} +9 -9
- package/dist/{chunk-JCIXYOND.js → chunk-3HPPTQEW.js} +4 -4
- package/dist/{chunk-7VVHTOE7.js → chunk-3KT2647F.js} +4 -2
- package/dist/{chunk-O6ZTIDWB.js → chunk-3MFVJMP6.js} +3 -2
- package/dist/{chunk-KQCKK3LD.js → chunk-3P3FKPFN.js} +170 -73
- package/dist/{chunk-WI5VOSQX.js → chunk-3XAJSMYD.js} +2 -2
- package/dist/{chunk-CPGASWNN.js → chunk-42QKUSHJ.js} +13 -3
- package/dist/{chunk-QB5HV4IY.js → chunk-44JU3VOT.js} +7 -8
- package/dist/{chunk-BYCJ6TKI.js → chunk-44K75CYE.js} +3 -3
- package/dist/{chunk-MS7O3KDJ.js → chunk-4FNM4D57.js} +6 -6
- package/dist/{chunk-BVYIKLQ5.js → chunk-4ROZ4TFL.js} +1 -1
- package/dist/{chunk-3V62N3Z7.js → chunk-4VV3KUFT.js} +7 -8
- package/dist/{chunk-MAFPVR4G.js → chunk-54YO56IK.js} +10 -5
- package/dist/{chunk-JMGB444D.js → chunk-5ACFYNA4.js} +8 -4
- package/dist/{chunk-6AMN7IKJ.js → chunk-5JEU6MWC.js} +49 -28
- package/dist/{chunk-NCLRZQR6.js → chunk-5JIB4VJA.js} +18 -10
- package/dist/{chunk-SXD3OYAR.js → chunk-5OP3E2ZD.js} +205 -96
- package/dist/{chunk-SS4YGK3E.js → chunk-5SLBD4BT.js} +72 -304
- package/dist/{chunk-XMP2DNLI.js → chunk-5SVGTQTW.js} +4 -4
- package/dist/chunk-5U567TYU.js +23 -0
- package/dist/chunk-5ZLF4S7X.js +40 -0
- package/dist/{chunk-T2YDWT54.js → chunk-5ZMTQATF.js} +261 -147
- package/dist/{chunk-WXJ5MHLH.js → chunk-62BDQTO6.js} +2 -2
- package/dist/chunk-64K3V4VN.js +25 -0
- package/dist/{chunk-BK6P6KMW.js → chunk-67YJJJIB.js} +1 -1
- package/dist/{chunk-32LLDRPI.js → chunk-6DJNFT2K.js} +42 -32
- package/dist/{chunk-JYAZPMSA.js → chunk-6IUK6PAH.js} +7 -6
- package/dist/{chunk-7STMIK2X.js → chunk-6JFQCVNN.js} +4 -4
- package/dist/chunk-6JXBLQJ2.js +32 -0
- package/dist/{chunk-5TWY3ZIC.js → chunk-6XPV6M3Q.js} +5 -5
- package/dist/{chunk-MPO5TVGF.js → chunk-6ZDSEITW.js} +3 -3
- package/dist/{chunk-75WIUG2W.js → chunk-72HVDLMT.js} +172 -78
- package/dist/chunk-75NU5RLX.js +24 -0
- package/dist/chunk-76GPN6AT.js +72 -0
- package/dist/chunk-7BQK2UDV.js +13 -0
- package/dist/{chunk-CF4NMRN7.js → chunk-7CAYRPJV.js} +45 -25
- package/dist/{chunk-U3A6FMSI.js → chunk-7GWWBHVQ.js} +7 -7
- package/dist/{chunk-CHAS5A5B.js → chunk-7NYUFMLJ.js} +149 -86
- package/dist/{chunk-D2B3KP35.js → chunk-7VWXXBTC.js} +4 -0
- package/dist/chunk-A65B23JK.js +113 -0
- package/dist/{chunk-4KMZAK6J.js → chunk-A7R6FUS6.js} +4 -4
- package/dist/{chunk-E2ZUBP4Q.js → chunk-AEVGUOPB.js} +7 -8
- package/dist/chunk-AHIK2N72.js +53 -0
- package/dist/{chunk-KLB2QC24.js → chunk-AICO24HJ.js} +5 -2
- package/dist/{chunk-7KSUMFBK.js → chunk-AJGSCVVW.js} +5 -1
- package/dist/{chunk-RSCRIWAH.js → chunk-AL62JJTB.js} +10 -3
- package/dist/{chunk-E7V3OHQQ.js → chunk-AN2V2LC4.js} +37 -22
- package/dist/{chunk-JIEVDGAF.js → chunk-AOFUA5XP.js} +1 -1
- package/dist/chunk-B5A7X2BA.js +44 -0
- package/dist/{chunk-2HTYGMMG.js → chunk-BCMEGJRX.js} +2 -2
- package/dist/{chunk-KD5GOR2K.js → chunk-BDIKWR45.js} +124 -69
- package/dist/{chunk-FNRPQIQE.js → chunk-BG6AIWAK.js} +4 -6
- package/dist/{chunk-ZMPH2OC4.js → chunk-BOT6W3VB.js} +7 -8
- package/dist/{chunk-DRHQG44U.js → chunk-BQBD6Q5J.js} +6 -2
- package/dist/{chunk-2DOEZ5QY.js → chunk-BZ67BJBH.js} +11 -10
- package/dist/{chunk-UBCVBBJJ.js → chunk-C47POAC5.js} +4 -3
- package/dist/{chunk-O7REHICC.js → chunk-C5OBPO4Z.js} +36 -28
- package/dist/{chunk-IGNBQT23.js → chunk-CCAAI56H.js} +121 -10
- package/dist/{chunk-RPIKNMZA.js → chunk-CDUR3KWV.js} +7 -2
- package/dist/{chunk-MZACASZY.js → chunk-CMPHT2LS.js} +14 -2
- package/dist/{chunk-FHA3KMFC.js → chunk-CQBPNE7Z.js} +5 -1
- package/dist/{chunk-IVRYF7QA.js → chunk-CR5FP5SF.js} +1 -1
- package/dist/{chunk-DD6RVD3S.js → chunk-D2TQX7UJ.js} +5 -1
- package/dist/{chunk-VVXKFU72.js → chunk-DEANHDXU.js} +62 -41
- package/dist/{chunk-GM3EGUYW.js → chunk-DHGE46UK.js} +1 -1
- package/dist/{chunk-UZTQUPTB.js → chunk-DIHX6NUB.js} +5 -5
- package/dist/{chunk-MD6DCQMA.js → chunk-DILQ34NW.js} +37 -37
- package/dist/{chunk-YMTXTQCN.js → chunk-DJKRYJP7.js} +6 -6
- package/dist/{chunk-JCAGVAB3.js → chunk-DKLC6QLF.js} +1200 -21
- package/dist/{chunk-SRAV6FPB.js → chunk-DNHTMCUP.js} +3 -3
- package/dist/{chunk-CKGSGRP7.js → chunk-DORE2RHL.js} +21 -5
- package/dist/{chunk-SMHZXHHD.js → chunk-DZYTXZNS.js} +15 -5
- package/dist/chunk-E262NRFP.js +39 -0
- package/dist/{chunk-V5JQQMFQ.js → chunk-E5YF236N.js} +4 -1
- package/dist/{chunk-IGJ2G5C6.js → chunk-EBUK7HJP.js} +6 -6
- package/dist/{chunk-ZL6IHMOW.js → chunk-ECBHC272.js} +198 -119
- package/dist/{chunk-SA46CNMS.js → chunk-ED7GLWTF.js} +4 -1
- package/dist/chunk-EFW43JQJ.js +24 -0
- package/dist/{chunk-5P2TTHBZ.js → chunk-EHRRHSPV.js} +2 -2
- package/dist/{chunk-JXBZIJCG.js → chunk-EILNJQMN.js} +32 -12
- package/dist/{chunk-GELSK76Y.js → chunk-ERDKMZ7O.js} +3 -3
- package/dist/{chunk-T2CYNDYU.js → chunk-ETRAPN5G.js} +366 -130
- package/dist/{chunk-JEUL777U.js → chunk-ETUKDEGL.js} +21 -12
- package/dist/chunk-F2ET5ZTT.js +49 -0
- package/dist/{chunk-2YO4WRJN.js → chunk-F3XOBFS4.js} +40 -29
- package/dist/{chunk-SPSGUFTI.js → chunk-FB6X7QHA.js} +1 -1
- package/dist/{chunk-5PPQIF4D.js → chunk-FGW54I23.js} +7 -8
- package/dist/{chunk-JTC5SEAQ.js → chunk-FP5B5XIL.js} +7 -3
- package/dist/{chunk-RJGCYGC3.js → chunk-FRHQGA5Q.js} +86 -250
- package/dist/{chunk-YZZLIYPA.js → chunk-FRR7BJ3B.js} +5 -1
- package/dist/{chunk-4DZFR52I.js → chunk-FVWHEM2N.js} +7 -5
- package/dist/{chunk-YPYD6OJ3.js → chunk-FWSMENKH.js} +2 -2
- package/dist/{chunk-YYJORENB.js → chunk-FWTUGNSF.js} +8 -8
- package/dist/{chunk-GIHH6VC2.js → chunk-FZKDZQ6U.js} +10 -6
- package/dist/{chunk-S7NRL66K.js → chunk-G4FF6G3I.js} +26 -17
- package/dist/{chunk-PQLAZEQV.js → chunk-GB6BZSTL.js} +248 -92
- package/dist/chunk-GCIHRRDJ.js +24 -0
- package/dist/{chunk-X3KCQEYZ.js → chunk-GHCU6OSE.js} +9 -1
- package/dist/chunk-GKDUIDU6.js +138 -0
- package/dist/chunk-GO66OCN7.js +24 -0
- package/dist/chunk-GOFS336W.js +24 -0
- package/dist/{chunk-AGDDH6XY.js → chunk-GQYT7G4F.js} +5 -1
- package/dist/{chunk-WN3HEU3P.js → chunk-GUTLXO7Q.js} +140 -89
- package/dist/chunk-H3VICNTN.js +47 -0
- package/dist/{chunk-GC4WOLV3.js → chunk-HAG3K6PQ.js} +14 -2
- package/dist/{chunk-CB4CERXZ.js → chunk-HBQHSZ6S.js} +11 -2
- package/dist/chunk-HTQGJQZN.js +124 -0
- package/dist/{chunk-F77TMAUY.js → chunk-HUQRO6VF.js} +39 -36
- package/dist/{chunk-4KQHKPB3.js → chunk-I5VDW2XZ.js} +543 -509
- package/dist/{chunk-43GGVT7W.js → chunk-I5VNHDPR.js} +11 -4
- package/dist/{chunk-4LTN7SND.js → chunk-IDXYHDQY.js} +1 -1
- package/dist/{chunk-Y54LU4CU.js → chunk-IIWZJ5ZM.js} +1 -1
- package/dist/{chunk-FMDNJ6PC.js → chunk-IPBOREIY.js} +2 -2
- package/dist/chunk-IU335UO7.js +27 -0
- package/dist/{chunk-JVZTKQFS.js → chunk-IVDTP6SV.js} +9 -5
- package/dist/{chunk-BDGLMWPO.js → chunk-IXOBDDMW.js} +11 -2
- package/dist/{chunk-EIL3KHAL.js → chunk-J4QRB6DQ.js} +5 -5
- package/dist/{chunk-3465633G.js → chunk-JCMGKQVS.js} +3 -3
- package/dist/{chunk-YK2KWNTU.js → chunk-JM7UTLF3.js} +28 -14
- package/dist/{chunk-CXETOLPX.js → chunk-JNDWRV34.js} +4 -4
- package/dist/{chunk-DLUNQHFO.js → chunk-JSRQTDZZ.js} +26 -24
- package/dist/{chunk-WTQAG2OT.js → chunk-JT3UTEWZ.js} +8 -3
- package/dist/{chunk-GQT2SY2S.js → chunk-JUYRDZSV.js} +291 -151
- package/dist/{chunk-LKMFMNQX.js → chunk-JVGL2SCN.js} +1 -1
- package/dist/{chunk-4JC3SE4G.js → chunk-JY4LTPOV.js} +1 -1
- package/dist/chunk-K7XPTQBJ.js +267 -0
- package/dist/{chunk-P4SMC4BY.js → chunk-KGBUXMFP.js} +120 -86
- package/dist/{chunk-XC5IRUEL.js → chunk-KIE5V3DA.js} +2 -2
- package/dist/{chunk-RT66UTLJ.js → chunk-KU4PCG4W.js} +2 -2
- package/dist/{chunk-VPL3JYC6.js → chunk-KVBLTAO7.js} +52 -10
- package/dist/{chunk-XCROSJ2Z.js → chunk-KW4JXWHO.js} +1 -1
- package/dist/{chunk-PJBEJR2U.js → chunk-KWIP5YRA.js} +24 -7
- package/dist/{chunk-JYBT2JNY.js → chunk-LE3LSEUL.js} +27 -2
- package/dist/{chunk-R2IKOLBK.js → chunk-LG6M2JTH.js} +3 -3
- package/dist/{chunk-DF3XEFQ7.js → chunk-LIE2WSB4.js} +21 -18
- package/dist/{chunk-Z55DXFWS.js → chunk-LJDATBPB.js} +26 -16
- package/dist/{chunk-KLIZXSBK.js → chunk-LMMS675D.js} +10 -9
- package/dist/{chunk-MRAP2UVV.js → chunk-LPKGZ664.js} +286 -35
- package/dist/{chunk-JFFREZGT.js → chunk-LPMSGO7L.js} +6 -2
- package/dist/chunk-LQWINE7K.js +211 -0
- package/dist/{chunk-6MJUW5R5.js → chunk-MKMMQDIY.js} +139 -71
- package/dist/{chunk-F5BYLT3M.js → chunk-MQ4IEDM5.js} +462 -138
- package/dist/{chunk-QGFKSDQO.js → chunk-MRM4KJ2O.js} +2 -2
- package/dist/{chunk-ETMHDCEH.js → chunk-MX2OZHIT.js} +102 -42
- package/dist/{chunk-6EYTD777.js → chunk-MXUPMGRY.js} +2 -2
- package/dist/{chunk-2FKEF2AC.js → chunk-NHU26HQ7.js} +58 -35
- package/dist/{chunk-KBJMLXNW.js → chunk-NQVJ4FPY.js} +161 -78
- package/dist/chunk-NZ7FX3AE.js +65 -0
- package/dist/chunk-OALBVELJ.js +23 -0
- package/dist/{chunk-5S3JQ5AT.js → chunk-OGZ4UPYK.js} +183 -137
- package/dist/{chunk-6WHWXCHJ.js → chunk-OMNB27GM.js} +7 -3
- package/dist/{chunk-EGGDPDYJ.js → chunk-OO63YP35.js} +1 -1
- package/dist/{chunk-ZYQYX66L.js → chunk-OPYDTW5Q.js} +6 -6
- package/dist/{chunk-A2GAWGVJ.js → chunk-OSJN7KDS.js} +68 -39
- package/dist/{chunk-RMC4OONA.js → chunk-OSJXIW6I.js} +1030 -1123
- package/dist/{chunk-X23SZHV5.js → chunk-OVVE42P4.js} +6 -6
- package/dist/{chunk-CCJP6QZO.js → chunk-OZA7HA6L.js} +1 -1
- package/dist/chunk-OZLKEBCD.js +54 -0
- package/dist/{chunk-TE4M52AA.js → chunk-P6DEFCMQ.js} +18 -2
- package/dist/{chunk-AMR4SUAN.js → chunk-PDTIQL3B.js} +6 -6
- package/dist/{chunk-BIVL764T.js → chunk-PJ5BYZPN.js} +2 -2
- package/dist/{chunk-BISJK67O.js → chunk-PK7Z7WRJ.js} +98 -46
- package/dist/{chunk-7VMEM3LN.js → chunk-PL6NWB5U.js} +178 -113
- package/dist/chunk-PMT75APP.js +94 -0
- package/dist/chunk-PP6A4X55.js +11 -0
- package/dist/{chunk-I7H5DU34.js → chunk-PPCH3PLO.js} +25 -13
- package/dist/{chunk-BIGQKCU7.js → chunk-PPE6S7WU.js} +42 -24
- package/dist/{chunk-2NSQIPAA.js → chunk-PT7KSIEO.js} +23 -36
- package/dist/{chunk-KZJ5VM6E.js → chunk-PZ3TQFSY.js} +15 -1
- package/dist/{chunk-ZJFJ2IKQ.js → chunk-QAUGRVRU.js} +122 -23
- package/dist/{chunk-BTDGWHGJ.js → chunk-QMFWZG2P.js} +39 -19
- package/dist/{chunk-L6YVK6VC.js → chunk-QZGGCE45.js} +2 -2
- package/dist/{chunk-67QSW5RW.js → chunk-R2RJQ3BM.js} +4 -4
- package/dist/{chunk-ZY72LSQK.js → chunk-R7HBIQ63.js} +102 -61
- package/dist/{chunk-4JHMCXOB.js → chunk-RBNDZLYS.js} +77 -36
- package/dist/chunk-RCSY4CT4.js +2170 -0
- package/dist/{chunk-NGA7ICG4.js → chunk-RDJ3ZU6O.js} +16 -13
- package/dist/{chunk-2NN676RI.js → chunk-RHQRPJHS.js} +7 -8
- package/dist/chunk-RI6XQKWJ.js +26 -0
- package/dist/{chunk-YOOHNQ3L.js → chunk-RJICOOB3.js} +18 -8
- package/dist/{chunk-5DTCOOLU.js → chunk-RLAVNCQJ.js} +2 -2
- package/dist/{chunk-CYKXROFG.js → chunk-ROPPWJQB.js} +23 -12
- package/dist/{chunk-54ROMBU7.js → chunk-SELOV32X.js} +105 -50
- package/dist/{chunk-TUW5IYGA.js → chunk-SQI4NWTQ.js} +9 -9
- package/dist/{chunk-ZEYBI47P.js → chunk-SRJ74CMG.js} +11 -3
- package/dist/{chunk-NHC2ADGI.js → chunk-STWOURLG.js} +253 -144
- package/dist/chunk-SWMFXSVW.js +23 -0
- package/dist/chunk-SXAZDIGM.js +84 -0
- package/dist/{chunk-EMFUZKYK.js → chunk-SZ5VGWDY.js} +3 -3
- package/dist/{chunk-R5MEBBAA.js → chunk-T26G23RS.js} +442 -119
- package/dist/{chunk-QHRE2M6V.js → chunk-T2L5H2WW.js} +4 -3
- package/dist/chunk-T7GPIJ4L.js +89 -0
- package/dist/{chunk-MJPXHCBW.js → chunk-TAEB3RU6.js} +5 -5
- package/dist/{chunk-V7F4F6JA.js → chunk-TBDIMTRD.js} +37 -16
- package/dist/{chunk-63Y3ROZ7.js → chunk-TFFPEWNP.js} +102 -64
- package/dist/{chunk-EZZ533MH.js → chunk-TMEUK2WS.js} +6 -2
- package/dist/{chunk-37PKNVLS.js → chunk-TVOMGNFQ.js} +1 -1
- package/dist/{chunk-HJRNBKIT.js → chunk-TX5FSNAU.js} +436 -30
- package/dist/{chunk-V634AXDM.js → chunk-U52PNFPX.js} +1 -1
- package/dist/{chunk-QLANK3VN.js → chunk-U74AWJ3X.js} +6 -6
- package/dist/chunk-UC7LBW7N.js +26 -0
- package/dist/{chunk-PZ46S2SY.js → chunk-UCKUAKYQ.js} +2 -2
- package/dist/{chunk-KF7HD3EH.js → chunk-UCYL3YA7.js} +77 -55
- package/dist/{chunk-HOU2MZHC.js → chunk-UD2GI3CS.js} +11 -4
- package/dist/{chunk-SNQ7D5R7.js → chunk-UIHGGWES.js} +51 -11
- package/dist/{chunk-LGNJCPFP.js → chunk-ULQIC76A.js} +10 -13
- package/dist/{chunk-KTHFHD6C.js → chunk-UY34DDUM.js} +11 -6
- package/dist/{chunk-6QDMRPXI.js → chunk-UYMFLWM6.js} +215 -258
- package/dist/{chunk-KDSYZLF6.js → chunk-V5IFI3FV.js} +8 -1
- package/dist/{chunk-JTFKRDDA.js → chunk-V7FV66KL.js} +1 -1
- package/dist/{chunk-27OIGDRK.js → chunk-V7NUJEJE.js} +1 -1
- package/dist/{chunk-CCDXK5NA.js → chunk-VESSIKBG.js} +8 -3
- package/dist/{chunk-QSMGZOT5.js → chunk-VRFJAF3R.js} +7 -8
- package/dist/chunk-VS2R3OGN.js +34 -0
- package/dist/{chunk-RLMC5CUP.js → chunk-VS5B4J2D.js} +7 -8
- package/dist/{chunk-7M2GK7XQ.js → chunk-W4R6SGU3.js} +252 -121
- package/dist/{chunk-JKOEHRGV.js → chunk-WDLWWEHZ.js} +1 -1
- package/dist/{chunk-7DAH2E4T.js → chunk-WFBN2HXR.js} +2 -2
- package/dist/{chunk-DLDDRXAI.js → chunk-WJS6SAWA.js} +296 -145
- package/dist/{chunk-WWGPTEQB.js → chunk-WQYNKF33.js} +73 -22
- package/dist/{chunk-64LJDGJH.js → chunk-WUP6C4ZD.js} +4 -2
- package/dist/{chunk-F2EVCJ4U.js → chunk-X24WAHHV.js} +87 -43
- package/dist/{chunk-OJ5CQV7H.js → chunk-X3UCQPVV.js} +209 -96
- package/dist/{chunk-7FKY6YWU.js → chunk-X46PSAJ7.js} +6 -6
- package/dist/{chunk-H3IBJQ5A.js → chunk-XD5XB22R.js} +2 -2
- package/dist/chunk-XDIAQEYK.js +28 -0
- package/dist/{chunk-7PPMT5EJ.js → chunk-XFPNYHX3.js} +372 -105
- package/dist/{chunk-FCECYJVA.js → chunk-XIBVAKCO.js} +1 -1
- package/dist/{chunk-OG2YUVBW.js → chunk-XMX4PCFL.js} +8 -3
- package/dist/{chunk-2NRHD2G7.js → chunk-XRRG4MBM.js} +12 -4
- package/dist/{chunk-FNMH5WEY.js → chunk-XTFO6D4L.js} +1 -1
- package/dist/chunk-XWRI3N5O.js +70 -0
- package/dist/{chunk-ZKJ5L35C.js → chunk-XXPLPSOE.js} +36 -25
- package/dist/{chunk-XQMYQ4TN.js → chunk-XZXZNI7A.js} +1 -1
- package/dist/{chunk-E555EDOQ.js → chunk-YEJZ2OYS.js} +490 -182
- package/dist/chunk-YGZEG3JV.js +123 -0
- package/dist/{chunk-F6OLHND5.js → chunk-Z3WQXVFV.js} +2 -2
- package/dist/{chunk-FFJGC2DX.js → chunk-Z6DUNKFU.js} +173 -40
- package/dist/{chunk-N5HN5QGH.js → chunk-Z6H5ED2I.js} +1 -1
- package/dist/{chunk-7Q37C6GZ.js → chunk-ZBOOMLHD.js} +1 -1
- package/dist/{chunk-MOK3ZS6P.js → chunk-ZDJ7C64T.js} +1 -1
- package/dist/{chunk-GLQ3KCTY.js → chunk-ZGZLEUKM.js} +7 -8
- package/dist/{chunk-YHD2FZFP.js → chunk-ZHRGX225.js} +6 -6
- package/dist/{chunk-76Q7E3TM.js → chunk-ZIVCPXXL.js} +510 -646
- package/dist/{chunk-BSATR6ZO.js → chunk-ZNRSYS76.js} +21 -3
- package/dist/{chunk-DMAMWUYY.js → chunk-ZSLTSCTI.js} +5 -5
- package/dist/{chunk-IGVAWAOK.js → chunk-ZSYFQSPF.js} +43 -9
- package/dist/cli/index.js +8 -3
- package/dist/{core-7Y5BZZON.js → core-43GLGBOY.js} +8 -1
- package/dist/{core-7S3XMW5O.js → core-5GI3ERXO.js} +4 -1
- package/dist/{core-K3JX5WPM.js → core-5L7TMK7I.js} +6 -1
- package/dist/{core-LB5M7XL4.js → core-7TO4OVY5.js} +6 -1
- package/dist/{core-ILPXXC2Z.js → core-BJVENHFQ.js} +7 -1
- package/dist/{core-JDFUZFRH.js → core-BX4MFWKC.js} +6 -1
- package/dist/{core-XW7UJFJZ.js → core-C3KXTOIZ.js} +7 -1
- package/dist/{core-WJNK7F2J.js → core-C5Y6BFLL.js} +7 -1
- package/dist/{core-WZ4CHVYL.js → core-CLUSJ2SK.js} +5 -1
- package/dist/{core-TCSW24N6.js → core-E3IN2VVH.js} +5 -1
- package/dist/{core-MU4ALRR7.js → core-FD67NQOV.js} +6 -1
- package/dist/{core-YMXYUGF5.js → core-FDKMLRAK.js} +5 -1
- package/dist/{core-VKZSQFRG.js → core-FL6Z3VVX.js} +5 -1
- package/dist/{core-5UF44NDI.js → core-JC7JUFPY.js} +8 -1
- package/dist/{core-RR2CAZC5.js → core-JF33TADA.js} +8 -1
- package/dist/{core-4RR6VSXM.js → core-JH32ZAKM.js} +4 -1
- package/dist/{core-G3LXHW73.js → core-JYYZPPQV.js} +7 -1
- package/dist/{core-4HFVG4CP.js → core-KJTKCV4U.js} +4 -1
- package/dist/{core-GSILPKUR.js → core-LCQPE5Y6.js} +8 -1
- package/dist/{core-GLOZY6Z7.js → core-LHVGWE54.js} +6 -1
- package/dist/{core-J2JD5ODO.js → core-OVSNBOCE.js} +9 -1
- package/dist/{core-BLHEJ5OK.js → core-PPEC236B.js} +5 -1
- package/dist/{core-ZLSQHZ3I.js → core-QTJZDK5H.js} +5 -1
- package/dist/{core-TKZZZ6UW.js → core-R3YZCOUZ.js} +7 -1
- package/dist/{core-HTD5RHE7.js → core-RIBW5XU4.js} +7 -1
- package/dist/{core-AR2T32Y3.js → core-RJFILBWL.js} +8 -1
- package/dist/{core-A5AKUB7H.js → core-RWSXEKTE.js} +4 -1
- package/dist/{core-DD62MWEW.js → core-SOPPZLEH.js} +5 -1
- package/dist/{core-HDNWVLJW.js → core-TBUZCXLX.js} +5 -1
- package/dist/{core-BOG33BFD.js → core-TZ5QLTAX.js} +5 -1
- package/dist/{core-H5HO2CED.js → core-U7E5W4MY.js} +3 -1
- package/dist/{core-QPSAYRFT.js → core-UBNVSL44.js} +7 -1
- package/dist/{core-E2XOSHPR.js → core-UDRD4WIU.js} +6 -1
- package/dist/{core-DFZMOO7E.js → core-UVJZ4HY2.js} +7 -1
- package/dist/{core-LGJZUP6H.js → core-X7WWYQH4.js} +8 -1
- package/dist/{core-BBNY2BX4.js → core-XP56X47I.js} +5 -1
- package/dist/{core-3KLQSYWB.js → core-XQG54CYG.js} +6 -1
- package/dist/{dataTable-CNDRVGA5.js → dataTable-U7W4I6IF.js} +15 -2
- package/dist/{engine-FVEIM3WV.js → engine-O5V26MGR.js} +32 -19
- package/dist/fixtures.js +4 -1
- package/dist/flags-BVLSAXT3.js +10 -0
- package/dist/{fontTables-ZPZQ6IR3.js → fontTables-JUW7ZTQY.js} +3 -1
- package/dist/fonts.js +1 -1
- package/dist/geo/dach.js +1 -1
- package/dist/geo/de-states.js +1 -1
- package/dist/geo/eu27.js +1 -1
- package/dist/geo/europe.js +1 -1
- package/dist/geo/index.js +2 -2
- package/dist/geo/us-states.js +1 -1
- package/dist/geo/world.js +1 -1
- package/dist/index.js +41 -22
- package/dist/{main-THU6VIVU.js → main-35GS47XC.js} +68 -123
- package/dist/mcp/server.js +131 -118
- package/dist/react/bar.js +10 -1
- package/dist/react/bartable.js +10 -1
- package/dist/react/box.js +8 -1
- package/dist/react/bullet.js +10 -1
- package/dist/react/butterfly.js +10 -1
- package/dist/react/choropleth.js +10 -1
- package/dist/react/cohort.js +11 -1
- package/dist/react/column.js +10 -1
- package/dist/react/combo.js +10 -1
- package/dist/react/creative.js +11 -1
- package/dist/react/diagram.js +10 -1
- package/dist/react/dimswitch.js +11 -1
- package/dist/react/dot.js +9 -1
- package/dist/react/export.js +36 -18
- package/dist/react/funnel.js +9 -1
- package/dist/react/gantt.js +9 -1
- package/dist/react/grid.js +10 -1
- package/dist/react/heatmap.js +9 -1
- package/dist/react/histogram.js +11 -1
- package/dist/react/index.js +101 -85
- package/dist/react/kpi.js +10 -1
- package/dist/react/likert.js +11 -1
- package/dist/react/line.js +9 -1
- package/dist/react/mekko.js +10 -1
- package/dist/react/pareto.js +11 -1
- package/dist/react/pie.js +9 -1
- package/dist/react/prepare.js +49 -21
- package/dist/react/pvm.js +12 -1
- package/dist/react/pyramid.js +10 -1
- package/dist/react/sankey.js +10 -1
- package/dist/react/scatter.js +8 -1
- package/dist/react/slope.js +10 -1
- package/dist/react/sparkline.js +10 -1
- package/dist/react/spec.js +24 -14
- package/dist/react/status.js +9 -1
- package/dist/react/story.js +5 -2
- package/dist/react/table.js +9 -1
- package/dist/react/theme.js +10 -3
- package/dist/react/tilemap.js +9 -1
- package/dist/react/treemap.js +9 -1
- package/dist/react/variance.js +10 -1
- package/dist/react/waffle.js +9 -1
- package/dist/react/waterfall.js +11 -1
- package/dist/{resvg-VB7S5HRF.js → resvg-ZYEZTSUO.js} +3 -1
- package/dist/rows.js +3 -2
- package/dist/{rowsModule-LI6KOS46.js → rowsModule-H2S6WW4D.js} +2 -1
- package/dist/{schema-CGQID64D.js → schema-2R32F6AW.js} +1 -1
- package/dist/{schema-H2EC4GAQ.js → schema-2TPGJGVR.js} +1 -1
- package/dist/{schema-THXXFY6I.js → schema-47BG2TZA.js} +1 -3
- package/dist/{schema-AMT7P7KB.js → schema-56MOEOVR.js} +1 -1
- package/dist/{schema-GNTKL5DN.js → schema-5MSR4LNN.js} +1 -1
- package/dist/{schema-5ZTGVQAJ.js → schema-5RIYEWE6.js} +1 -1
- package/dist/{schema-LOQ3AFC7.js → schema-A26ZNGTZ.js} +1 -3
- package/dist/{schema-MMVPMJEF.js → schema-ALBF6V7Y.js} +1 -3
- package/dist/{schema-BKUFZLLI.js → schema-BA6WP5YZ.js} +1 -1
- package/dist/{schema-PQZWO3BP.js → schema-CBL2SMVR.js} +1 -3
- package/dist/{schema-BBTXTWYI.js → schema-CWKGLDSR.js} +1 -3
- package/dist/{schema-5KDEQBBT.js → schema-DBIQFL56.js} +1 -1
- package/dist/{schema-KPEPBGAX.js → schema-DL7V6NN2.js} +1 -1
- package/dist/{schema-PL3EU6EQ.js → schema-DUVJMFKQ.js} +4 -2
- package/dist/{schema-L5U4OROI.js → schema-ECJERHKF.js} +2 -1
- package/dist/{schema-YLE4XXQQ.js → schema-EDSEKZDJ.js} +1 -1
- package/dist/{schema-HH5HOORE.js → schema-ESR6ZIK4.js} +1 -3
- package/dist/{schema-5DUTAVO7.js → schema-F7TWGLRZ.js} +1 -3
- package/dist/{schema-B2GCEYXD.js → schema-FGB6IGZM.js} +1 -3
- package/dist/{schema-7NSV542V.js → schema-FKGGTM4Z.js} +2 -1
- package/dist/{schema-72EEMYS3.js → schema-FU2AFIEE.js} +1 -1
- package/dist/{schema-QORUB6EK.js → schema-JNJFCYBM.js} +18 -1
- package/dist/{schema-JH57NFXJ.js → schema-JYZ4RF6S.js} +2 -1
- package/dist/{schema-25INXAMY.js → schema-K7F6TEDK.js} +1 -2
- package/dist/{schema-OU35XA3Z.js → schema-KAK6DZX4.js} +1 -1
- package/dist/{schema-R5Y6NVBH.js → schema-MOKWIGF7.js} +1 -1
- package/dist/{schema-ZQSIR5UC.js → schema-MQT6BMNK.js} +1 -3
- package/dist/{schema-FDFQKIO5.js → schema-MR3BPPQR.js} +1 -1
- package/dist/{schema-VYECMPON.js → schema-OPXZYIW7.js} +1 -3
- package/dist/{schema-ZEVJMFLV.js → schema-PV7JGX5H.js} +1 -1
- package/dist/{schema-QPOBZUAR.js → schema-PWPQF5RC.js} +1 -1
- package/dist/{schema-GN6GAIU5.js → schema-PYQEUC5P.js} +1 -3
- package/dist/{schema-M5JBHQIV.js → schema-QPIC5MAG.js} +9 -2
- package/dist/{schema-QCIE6M2P.js → schema-R42VXFIS.js} +1 -1
- package/dist/{schema-J7TNCZIP.js → schema-TVUJNEX7.js} +1 -1
- package/dist/{schema-AXRDF6ND.js → schema-Y4TI2T3T.js} +1 -1
- package/dist/{schema-ZG6ZKFRZ.js → schema-ZU2EU2VP.js} +1 -1
- package/dist/{specValidation-VHLGDEME.js → specValidation-2NHJT7TQ.js} +4 -1
- package/dist/theme.js +7 -2
- package/dist/{themeShapeRules-PW4BQHKL.js → themeShapeRules-G7UZX6GJ.js} +1 -1
- package/dist/types/core/annotate.d.ts +27 -2
- package/dist/types/core/annotateArms.d.ts +3 -1
- package/dist/types/core/annotateTargets.d.ts +4 -0
- package/dist/types/core/annotationOrigin.d.ts +13 -0
- package/dist/types/core/axis.d.ts +2 -2
- package/dist/types/core/charts/band/stacks.d.ts +7 -1
- package/dist/types/core/charts/bartable/types.d.ts +14 -1
- package/dist/types/core/charts/box/types.d.ts +3 -1
- package/dist/types/core/charts/choropleth/layout.d.ts +1 -5
- package/dist/types/core/charts/choropleth/types.d.ts +19 -0
- package/dist/types/core/charts/cohort/types.d.ts +16 -3
- package/dist/types/core/charts/column/model.d.ts +13 -0
- package/dist/types/core/charts/combo/layout.d.ts +7 -0
- package/dist/types/core/charts/creative/types.d.ts +21 -0
- package/dist/types/core/charts/dimswitch/compile.d.ts +15 -2
- package/dist/types/core/charts/dimswitch/types.d.ts +24 -1
- package/dist/types/core/charts/gantt/calendar.d.ts +24 -0
- package/dist/types/core/charts/gantt/columns.d.ts +56 -0
- package/dist/types/core/charts/gantt/layout.d.ts +8 -2
- package/dist/types/core/charts/gantt/model.d.ts +296 -0
- package/dist/types/core/charts/grid/metricStack.d.ts +9 -0
- package/dist/types/core/charts/grid/metricStackSchema.d.ts +13 -0
- package/dist/types/core/charts/grid/normalize.d.ts +5 -0
- package/dist/types/core/charts/grid/schema.d.ts +2 -2
- package/dist/types/core/charts/histogram/types.d.ts +8 -0
- package/dist/types/core/charts/likert/layout.d.ts +10 -8
- package/dist/types/core/charts/pareto/layout.d.ts +2 -0
- package/dist/types/core/charts/pvm/types.d.ts +10 -1
- package/dist/types/core/charts/pyramid/types.d.ts +3 -1
- package/dist/types/core/charts/sankey/types.d.ts +5 -1
- package/dist/types/core/charts/scatter/clamp.d.ts +2 -1
- package/dist/types/core/charts/scatter/model.d.ts +5 -0
- package/dist/types/core/charts/scatter/valueLines.d.ts +3 -1
- package/dist/types/core/charts/status/layout.d.ts +3 -0
- package/dist/types/core/charts/table/resolve.d.ts +22 -3
- package/dist/types/core/charts/table/view.d.ts +24 -1
- package/dist/types/core/claims/browser.d.ts +2 -0
- package/dist/types/core/claims/ids.d.ts +38 -0
- package/dist/types/core/deferred.d.ts +1 -0
- package/dist/types/core/doc/diagnostics.d.ts +3 -2
- package/dist/types/core/footer.d.ts +2 -0
- package/dist/types/core/formatSpec.d.ts +43 -14
- package/dist/types/core/frame.d.ts +26 -59
- package/dist/types/core/frameText.d.ts +203 -0
- package/dist/types/core/geo/types.d.ts +2 -0
- package/dist/types/core/geometry.d.ts +3 -1
- package/dist/types/core/label/categoryRow.d.ts +19 -2
- package/dist/types/core/label/solver.d.ts +23 -2
- package/dist/types/core/normalize/shared.d.ts +14 -2
- package/dist/types/core/notes.d.ts +15 -2
- package/dist/types/core/reading.d.ts +12 -1
- package/dist/types/core/registry.d.ts +4 -5
- package/dist/types/core/request.d.ts +7 -1
- package/dist/types/core/schema/capability.d.ts +32 -7
- package/dist/types/core/schema/generatedColumns.d.ts +168 -0
- package/dist/types/core/seriesIdentity.d.ts +4 -1
- package/dist/types/core/sizing.d.ts +32 -1
- package/dist/types/core/structureCounts.d.ts +3 -1
- package/dist/types/core/text.d.ts +16 -0
- package/dist/types/core/theme.d.ts +33 -4
- package/dist/types/core/themeGeometry.d.ts +9 -0
- package/dist/types/core/themeRules.d.ts +2 -0
- package/dist/types/core/timeAxis.d.ts +6 -1
- package/dist/types/core/types/annotations.d.ts +74 -4
- package/dist/types/core/types/diagram.d.ts +7 -0
- package/dist/types/core/types/options.d.ts +118 -15
- package/dist/types/core/types/scene.d.ts +30 -2
- package/dist/types/core/types/table.d.ts +27 -3
- package/dist/types/core/types/theme.d.ts +23 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/react/TableChart.d.ts +5 -0
- package/dist/types/react/barrelCharts.d.ts +16 -5
- package/dist/types/react/charts/butterfly.d.ts +2 -2
- package/dist/types/react/charts/dot.d.ts +7 -1
- package/dist/types/react/charts/pareto.d.ts +4 -1
- package/dist/types/react/charts/variance.d.ts +3 -1
- package/dist/types/react/hover/labelCard.d.ts +11 -2
- package/dist/types/react/prepare.d.ts +7 -1
- package/dist/types/theme.d.ts +2 -0
- package/dist/validate.js +23 -6
- package/docs/TELEMETRY.md +2 -2
- package/docs/manual.md +283 -65
- package/docs/reference/bar.md +15 -4
- package/docs/reference/bartable.md +17 -2
- package/docs/reference/box.md +15 -4
- package/docs/reference/bullet.md +21 -6
- package/docs/reference/butterfly.md +17 -6
- package/docs/reference/choropleth.md +16 -5
- package/docs/reference/cohort.md +25 -5
- package/docs/reference/column.md +19 -4
- package/docs/reference/combo.md +11 -5
- package/docs/reference/creative.md +17 -8
- package/docs/reference/diagram.md +6 -1
- package/docs/reference/dimswitch.md +71 -118
- package/docs/reference/dot.md +16 -7
- package/docs/reference/fixtures.md +94 -1
- package/docs/reference/funnel.md +14 -5
- package/docs/reference/gantt.md +17 -16
- package/docs/reference/grid.md +13 -3
- package/docs/reference/heatmap.md +16 -6
- package/docs/reference/histogram.md +2 -2
- package/docs/reference/kpi.md +5 -1
- package/docs/reference/likert.md +17 -4
- package/docs/reference/line.md +18 -5
- package/docs/reference/mekko.md +10 -5
- package/docs/reference/options.md +20 -15
- package/docs/reference/pareto.md +9 -5
- package/docs/reference/pie.md +9 -5
- package/docs/reference/pvm.md +16 -6
- package/docs/reference/pyramid.md +14 -4
- package/docs/reference/react.md +6 -7
- package/docs/reference/sankey.md +7 -3
- package/docs/reference/scatter.md +8 -4
- package/docs/reference/slope.md +15 -5
- package/docs/reference/sparkline.md +1 -1
- package/docs/reference/status.md +7 -1
- package/docs/reference/table.md +41 -110
- package/docs/reference/theme.md +12 -4
- package/docs/reference/tilemap.md +2 -4
- package/docs/reference/treemap.md +1 -1
- package/docs/reference/variance.md +12 -6
- package/docs/reference/waffle.md +1 -1
- package/docs/reference/warnings.md +1077 -0
- package/docs/reference/waterfall.md +20 -5
- package/docs/use-cases.md +25 -13
- package/llms.txt +19 -6
- package/package.json +18 -3
- package/dist/chunk-6364WO5D.js +0 -47
- package/dist/chunk-DQ7YMQVX.js +0 -26
- package/dist/chunk-EBB4PYBN.js +0 -24
- package/dist/chunk-FG5L2LUK.js +0 -89
- package/dist/chunk-IFQN4GKK.js +0 -1852
- package/dist/chunk-IRXVV65V.js +0 -24
- package/dist/chunk-JGFHNAHS.js +0 -22
- package/dist/chunk-JHWYG7V5.js +0 -24
- package/dist/chunk-M4SPKUZE.js +0 -7
- package/dist/chunk-O36WX56O.js +0 -13
- package/dist/chunk-QJWLNP64.js +0 -24
- package/dist/chunk-QZIHKQRH.js +0 -26
- package/dist/chunk-SE7MJ2LQ.js +0 -24
- package/dist/chunk-TXBO2LWM.js +0 -25
- package/dist/chunk-UPTXFTKH.js +0 -25
- package/dist/chunk-UREXN6WG.js +0 -25
- package/dist/chunk-UZLR25BW.js +0 -24
- package/dist/chunk-WIVFIVFZ.js +0 -27
- package/dist/chunk-WZL4EEBS.js +0 -11
- package/dist/chunk-XHRUXZD7.js +0 -28
- package/dist/chunk-ZWNRLIFT.js +0 -24
|
@@ -2,66 +2,131 @@ import {
|
|
|
2
2
|
ENGINE_NOTES,
|
|
3
3
|
LABEL_WRAP_FLOOR,
|
|
4
4
|
SOFT_LABEL_CAP
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-F3XOBFS4.js";
|
|
6
|
+
import {
|
|
7
|
+
chartString
|
|
8
|
+
} from "./chunk-PMT75APP.js";
|
|
6
9
|
import {
|
|
7
10
|
bandFor
|
|
8
11
|
} from "./chunk-263SZKIL.js";
|
|
9
|
-
import {
|
|
10
|
-
emptyIdRecord
|
|
11
|
-
} from "./chunk-LINZPU5D.js";
|
|
12
12
|
import {
|
|
13
13
|
closestKey
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-ZNRSYS76.js";
|
|
15
15
|
import {
|
|
16
16
|
EMPTY_DATA
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-QZGGCE45.js";
|
|
18
|
+
import {
|
|
19
|
+
generatedIdWarnings
|
|
20
|
+
} from "./chunk-SXAZDIGM.js";
|
|
18
21
|
import {
|
|
19
22
|
cappedItems,
|
|
20
|
-
cleanDiff,
|
|
21
|
-
cleanSum,
|
|
22
23
|
saysToDate
|
|
23
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-I5VDW2XZ.js";
|
|
24
25
|
import {
|
|
26
|
+
defaultNotePlacement,
|
|
25
27
|
disclosureNote,
|
|
26
28
|
disclosuresShown,
|
|
27
|
-
engineNote
|
|
28
|
-
|
|
29
|
+
engineNote,
|
|
30
|
+
shownNoteKinds
|
|
31
|
+
} from "./chunk-DZYTXZNS.js";
|
|
32
|
+
import {
|
|
33
|
+
emptyIdRecord
|
|
34
|
+
} from "./chunk-LINZPU5D.js";
|
|
29
35
|
import {
|
|
30
36
|
AUTOMATIC_FORMAT,
|
|
37
|
+
LABEL_ONLY_ROW,
|
|
38
|
+
MAGNITUDE_FIGURES,
|
|
31
39
|
MAGNITUDE_GROUP,
|
|
32
40
|
parseFormatExample,
|
|
33
41
|
specUnitKind,
|
|
34
42
|
unitMagnitude
|
|
35
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-Z6DUNKFU.js";
|
|
36
44
|
import {
|
|
37
45
|
formatAutomaticPercent,
|
|
38
46
|
formatPercentagePoints,
|
|
39
47
|
localeStrings,
|
|
40
48
|
stringFields
|
|
41
49
|
} from "./chunk-MSYTF3DZ.js";
|
|
50
|
+
import {
|
|
51
|
+
cleanDiff,
|
|
52
|
+
cleanSum
|
|
53
|
+
} from "./chunk-TX5FSNAU.js";
|
|
54
|
+
import {
|
|
55
|
+
toJsonPointer
|
|
56
|
+
} from "./chunk-ZQ4VFQID.js";
|
|
42
57
|
import {
|
|
43
58
|
NormalizeError
|
|
44
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-RJICOOB3.js";
|
|
45
60
|
import {
|
|
46
61
|
maxOf
|
|
47
62
|
} from "./chunk-WYJEOMNY.js";
|
|
48
63
|
|
|
49
64
|
// src/core/charts/dimswitch/compile.ts
|
|
50
65
|
var key = (...parts) => JSON.stringify(parts), FOLDED = /* @__PURE__ */ Symbol("dimswitchFolded");
|
|
51
|
-
function dimSwitchTableWarnings(warnings) {
|
|
66
|
+
function dimSwitchTableWarnings(warnings, overrides) {
|
|
52
67
|
return warnings.map((warning) => {
|
|
53
68
|
if (warning.code !== "table-column-clipped" && warning.code !== "table-column-widened" || warning.owner?.colId === void 0) return warning;
|
|
54
69
|
let id = warning.owner.colId, width = id === "label" || id === "range" ? id : id === "pp" || id === "pl" ? "change" : "period", need = warning.detail?.natural ?? warning.detail?.widened;
|
|
55
|
-
return {
|
|
70
|
+
return overrides?.[id]?.width !== void 0 ? {
|
|
71
|
+
...warning,
|
|
72
|
+
field: ["options", "columnOverrides", id, "width"],
|
|
73
|
+
suggest: `Set options.columnOverrides.${id}.width to ${need} px or more so this column fits.`
|
|
74
|
+
} : {
|
|
56
75
|
...warning,
|
|
57
76
|
field: ["options", "widths", width],
|
|
58
77
|
suggest: `Set options.widths.${width} to ${need} px or more so this column fits.`
|
|
59
78
|
};
|
|
60
79
|
});
|
|
61
80
|
}
|
|
62
|
-
var
|
|
81
|
+
var hostPeriods = (data, options) => data.periods.filter((p) => !p.kind && options.columnVisibility?.[p.id] !== !1), PARTIAL_NOTE_OFF = /* @__PURE__ */ Symbol("dimswitchPartialNoteOff"), PARTIAL_NOTE_OFF_FRAME = "dimswitch-partial-note-off-frame", partialNoteWarning = (note) => ({
|
|
82
|
+
code: PARTIAL_NOTE_OFF_FRAME,
|
|
83
|
+
severity: "warn",
|
|
84
|
+
field: ["options", "columnHeads"],
|
|
85
|
+
message: `columnHeads: false removes the head that says "${note}", and the frame has no place for that note.`,
|
|
86
|
+
suggest: "Make room in options.footnotes, list note in options.notes.show, or keep the head."
|
|
87
|
+
}), printsValue = (row) => Object.values(row.cells ?? {}).some((cell2) => cell2 != null && !(typeof cell2 == "object" && cell2.missing === "blank")), LABELS_ONLY = "dimswitch-labels-only";
|
|
88
|
+
function hiddenTotalFoldWarnings(rows, collapsed, totalId) {
|
|
89
|
+
let folded = new Set(collapsed), byId = new Map(rows.map((row) => [row.id, row])), open = (row) => {
|
|
90
|
+
for (let id = row.parentId; id !== void 0; id = byId.get(id)?.parentId) if (folded.has(id)) return !1;
|
|
91
|
+
return !0;
|
|
92
|
+
};
|
|
93
|
+
return rows.some((row) => !row.inline && printsValue(row) && open(row)) ? [] : [{
|
|
94
|
+
code: LABELS_ONLY,
|
|
95
|
+
severity: "warn",
|
|
96
|
+
field: ["options", "rowVisibility", totalId],
|
|
97
|
+
message: "rowVisibility hides the Total, and no drawn row prints a value, so the table draws its labels only.",
|
|
98
|
+
suggest: "Raise options.depth or open rows in options.expansion, so that member rows print, or keep the Total."
|
|
99
|
+
}];
|
|
100
|
+
}
|
|
101
|
+
var dimswitchRowId = (variant, member, measure) => key(variant, member, ...measure ? [measure] : []);
|
|
102
|
+
function tableOptionsOf(options) {
|
|
103
|
+
let { variant: _v, depth: _d, splits: _sp, order: _o, show: _sh, thresholds: _t, minimumSample: _m, expansion: _e, widths: _w, columnOverrides: _overrides, columnOrder: _co, bars: _b, rowVisibility: _rv, ...tableOptions } = options;
|
|
104
|
+
return tableOptions.columnVisibility && (tableOptions.columnVisibility = {}), tableOptions.density?.startsWith("cohort") && delete tableOptions.density, tableOptions;
|
|
105
|
+
}
|
|
106
|
+
var tableDefaults = (form, pinned) => ({
|
|
107
|
+
variant: "steering",
|
|
108
|
+
stickyLabels: pinned,
|
|
109
|
+
mountCollapsed: !1,
|
|
110
|
+
fitFormats: !0,
|
|
111
|
+
labelIndent: form.card ? { base: 12, step: 12 } : { base: 25, step: 17 },
|
|
112
|
+
...form.card ? { cellPadX: 3 } : {}
|
|
113
|
+
});
|
|
114
|
+
function currentDimSwitchOptions(compiled, options, form, effectLabel) {
|
|
115
|
+
let { inlineVisibility: _inline, expansion, ...kept } = compiled, tableOptions = tableOptionsOf(options);
|
|
116
|
+
return {
|
|
117
|
+
...tableDefaults(form, kept.stickyLabels),
|
|
118
|
+
...tableOptions,
|
|
119
|
+
...kept,
|
|
120
|
+
...effectLabel ? { inlineVisibility: { effect: !1, ...tableOptions.inlineVisibility } } : {},
|
|
121
|
+
expansion
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
var fields = (expr) => typeof expr == "number" || "measure" in expr ? [] : "field" in expr ? [expr.field] : "total" in expr ? [] : [...fields(expr.a), ...fields(expr.b)], refs = (expr) => typeof expr == "number" || "field" in expr ? [] : "measure" in expr ? [expr.measure] : "total" in expr ? refs(expr.total) : [...refs(expr.a), ...refs(expr.b)], usesTotal = (expr) => typeof expr == "number" || "field" in expr || "measure" in expr ? !1 : "total" in expr || usesTotal(expr.a) || usesTotal(expr.b), percentMeasure = (m) => m.scale === "percent" || m.format !== void 0 && specUnitKind(parseFormatExample(m.format)) === "percent", affix = (m) => {
|
|
63
125
|
let kind = m.format ? specUnitKind(parseFormatExample(m.format)) : m.scale === "percent" ? "percent" : void 0;
|
|
64
126
|
return (m.unit === "%" || m.unit === "pp") && (kind === "percent" || kind === "pp") ? void 0 : m.unit;
|
|
127
|
+
}, pointAt = (at, list, id, ...field) => {
|
|
128
|
+
let hits = list.flatMap((entry, index) => entry.id === id ? [index] : []);
|
|
129
|
+
return hits.length === 1 ? [...at, hits[0], ...field] : [];
|
|
65
130
|
}, combine = (op, a, b) => op === "sub" ? cleanDiff(a, b) : op === "add" ? cleanSum([a, b]) : op === "mul" ? a * b : a / b;
|
|
66
131
|
function evaluate(expr, sums, total) {
|
|
67
132
|
if (typeof expr == "number") return { raw: expr, state: "value" };
|
|
@@ -137,40 +202,57 @@ function compileDimSwitch(data, options = {}, form = {}) {
|
|
|
137
202
|
let decimals = formatDecimals.get(format);
|
|
138
203
|
return decimals === void 0 && (decimals = parseFormatExample(format).decimals, formatDecimals.set(format, decimals)), decimals;
|
|
139
204
|
}, variant = options.variant ?? "by-measure", depth = options.depth ?? 1;
|
|
140
|
-
if (!data.periods.length || !data.facts.length) throw new NormalizeError(EMPTY_DATA, data.periods.length ? "facts" : "periods", `dimswitch requires at least one ${data.periods.length ? "fact" : "period"}
|
|
205
|
+
if (!data.periods.length || !data.facts.length) throw new NormalizeError(EMPTY_DATA, data.periods.length ? "facts" : "periods", `dimswitch requires at least one ${data.periods.length ? "fact" : "period"}`, void 0, void 0, ["data", data.periods.length ? "facts" : "periods"]);
|
|
141
206
|
let range = data.periods.find((p) => p.kind === "range"), prior = data.periods.find((p) => p.kind === "prior");
|
|
142
|
-
if (!range || !prior) throw new NormalizeError("invalid-data", "periods", "dimswitch requires one range and one prior period", "
|
|
143
|
-
let authoredPeriods = data
|
|
144
|
-
|
|
207
|
+
if (!range || !prior) throw new NormalizeError("invalid-data", "periods", "dimswitch requires one range and one prior period", "Give periods one period of kind range and one of kind prior. To hide their columns, keep both and set options.columnVisibility to { range: false, pp: false }.", void 0, ["data", "periods"]);
|
|
208
|
+
let authoredPeriods = hostPeriods(data, options), plan = data.periods.find((p) => p.kind === "plan"), hidden = authoredPeriods.slice(0, form.hide ?? 0), periods = authoredPeriods.slice(hidden.length), blockColumns = ["range", "pp", ...plan ? ["pl"] : []].filter((id) => options.columnVisibility?.[id] !== !1), drawnBlock = new Set(blockColumns), rangeDrawn = drawnBlock.has("range"), blockCells = () => {
|
|
209
|
+
let cells = emptyIdRecord();
|
|
210
|
+
for (let id of blockColumns) cells[id] = null;
|
|
211
|
+
return cells;
|
|
212
|
+
};
|
|
213
|
+
if (data.periods.filter((p) => p.kind === "plan").length > 1) throw new NormalizeError("invalid-count", "periods", "dimswitch permits at most one plan period", "keep one period of kind plan", void 0, ["data", "periods"]);
|
|
145
214
|
for (let setting of [options.thresholds, options.thresholds?.period, options.thresholds?.prior, options.thresholds?.plan]) for (let family of ["volume", "cost", "rate", "effect"]) {
|
|
146
215
|
let pair = setting?.[family];
|
|
147
216
|
if (pair && (!pair.every(Number.isFinite) || !(pair[0] >= 0 && pair[0] <= pair[1]))) throw new NormalizeError("invalid-number", "options.thresholds", `dimswitch thresholds.${family} must satisfy 0 <= first <= second.`);
|
|
148
217
|
}
|
|
149
218
|
let memberIndex = new Map(data.dimension.members.map((m) => [m.id, m])), memberLevels = 0;
|
|
150
219
|
for (let member of data.dimension.members) {
|
|
151
|
-
let seen = /* @__PURE__ */ new Set(), current = member, level = 0;
|
|
220
|
+
let seen = /* @__PURE__ */ new Set(), current = member, level = 0, child;
|
|
152
221
|
for (; current; ) {
|
|
153
|
-
if (seen.has(current.id)) throw new NormalizeError("parent-cycle", "dimension.members", "dimswitch member hierarchy contains a cycle");
|
|
222
|
+
if (seen.has(current.id)) throw new NormalizeError("parent-cycle", "dimension.members", "dimswitch member hierarchy contains a cycle", void 0, void 0, pointAt(["data", "dimension", "members"], data.dimension.members, child.id, "parentId"));
|
|
154
223
|
seen.add(current.id), level++;
|
|
155
224
|
let parent = current.parentId;
|
|
156
|
-
if (parent && !memberIndex.has(parent)) throw new NormalizeError("parent-missing", "dimension.members", `Unknown dimswitch parent ${parent}
|
|
157
|
-
current = parent ? memberIndex.get(parent) : void 0;
|
|
225
|
+
if (parent && !memberIndex.has(parent)) throw new NormalizeError("parent-missing", "dimension.members", `Unknown dimswitch parent ${parent}`, void 0, void 0, pointAt(["data", "dimension", "members"], data.dimension.members, current.id, "parentId"));
|
|
226
|
+
child = current, current = parent ? memberIndex.get(parent) : void 0;
|
|
158
227
|
}
|
|
159
228
|
memberLevels = Math.max(memberLevels, level);
|
|
160
229
|
}
|
|
161
|
-
let measures = new Map(data.measures.map((m) => [m.id, m])), measure = (id, from) => {
|
|
230
|
+
let measures = new Map(data.measures.map((m) => [m.id, m])), measure = (id, from, field) => {
|
|
162
231
|
let m = measures.get(id);
|
|
163
|
-
if (!m) throw new NormalizeError("calc-ref-missing", "measures", `dimswitch measure '${from}' names unknown measure '${id}'; use a measures[].id
|
|
232
|
+
if (!m) throw new NormalizeError("calc-ref-missing", "measures", `dimswitch measure '${from}' names unknown measure '${id}'; use a measures[].id.`, void 0, void 0, pointAt(["data", "measures"], data.measures, from, field));
|
|
164
233
|
return m;
|
|
165
|
-
}, warnings = [],
|
|
166
|
-
|
|
234
|
+
}, warnings = [], totalHidden = options.rowVisibility?.[data.dimension.total.id] === !1, headHidden = (group) => `group:${group}` !== data.dimension.total.id && options.rowVisibility?.[`group:${group}`] === !1, headIds = /* @__PURE__ */ new Set(), hostHidEveryPeriod = !authoredPeriods.length && data.periods.some((p) => !p.kind), generatedIds = ["label", "range", "pp", ...plan ? ["pl"] : []], allPeriodIds = data.periods.filter((p) => !p.kind).map((p) => p.id);
|
|
235
|
+
warnings.push(
|
|
236
|
+
...generatedIdWarnings("dimswitch", "columnVisibility", options.columnVisibility, [...generatedIds, ...allPeriodIds]),
|
|
237
|
+
...generatedIdWarnings("dimswitch", "columnOverrides", options.columnOverrides, ["label", ...blockColumns, ...authoredPeriods.map((p) => p.id)]),
|
|
238
|
+
...generatedIdWarnings("dimswitch", "columnOrder", options.columnOrder, ["block", "periods"])
|
|
239
|
+
), !blockColumns.length && !authoredPeriods.length && warnings.push({
|
|
240
|
+
code: "dimswitch-labels-only",
|
|
241
|
+
severity: "warn",
|
|
242
|
+
field: ["options", "columnVisibility"],
|
|
243
|
+
message: "columnVisibility leaves out every value column, so the table draws its labels only.",
|
|
244
|
+
suggest: "Keep range or one period in the table."
|
|
245
|
+
});
|
|
246
|
+
let columnIds = [...blockColumns, ...authoredPeriods.map((p) => p.id)], spreads = (entry) => typeof entry == "object" && (entry?.columns?.length ?? 0) > 0, removable = (id, entry) => !columnIds.includes(id) && ![...generatedIds, ...allPeriodIds].includes(id) && !spreads(entry), isHeat = (entry) => entry === "heat" || typeof entry == "object", encodings = Object.entries(options.encodings ?? {}), heatMustStay = options.figures === !1 && !encodings.some(([id, entry]) => isHeat(entry) && !removable(id, entry));
|
|
247
|
+
for (let [id, entry] of encodings) if (!columnIds.includes(id)) {
|
|
167
248
|
let asKind = data.periods.find((p) => p.kind && p.id === id), guess = asKind ? { key: asKind.kind === "prior" ? "pp" : asKind.kind === "plan" ? "pl" : "range", near: !0 } : closestKey(id, columnIds);
|
|
168
249
|
warnings.push({
|
|
169
250
|
code: "dimswitch-encoding-column",
|
|
170
251
|
severity: "warn",
|
|
171
252
|
field: ["options", "encodings", id],
|
|
172
253
|
message: `options.encodings key '${id}' names no column of this dimswitch, so it draws nothing.`,
|
|
173
|
-
suggest: `${guess?.near ? `Use '${guess.key}'. ` : ""}The column ids are ${columnIds.map((c) => `'${c}'`).join(", ")}
|
|
254
|
+
suggest: `${guess?.near ? `Use '${guess.key}'. ` : ""}The column ids are ${columnIds.map((c) => `'${c}'`).join(", ")}.`,
|
|
255
|
+
...removable(id, entry) && !(heatMustStay && isHeat(entry)) ? { fix: [{ op: "remove", path: toJsonPointer(["options", "encodings", id]) }] } : {}
|
|
174
256
|
});
|
|
175
257
|
}
|
|
176
258
|
let warned = /* @__PURE__ */ new Set(), warn = (code, id, message, severity = "warn") => {
|
|
@@ -186,52 +268,55 @@ function compileDimSwitch(data, options = {}, form = {}) {
|
|
|
186
268
|
});
|
|
187
269
|
});
|
|
188
270
|
let driverOwner = /* @__PURE__ */ new Map();
|
|
189
|
-
for (let m of data.measures) if (m.drivers !== void 0) {
|
|
271
|
+
for (let [index, m] of data.measures.entries()) if (m.drivers !== void 0) {
|
|
190
272
|
let ids = refs(m.drivers);
|
|
191
|
-
if (!ids.length || fields(m.drivers).length || usesTotal(m.drivers)) throw new NormalizeError("invalid-data", "measures", `dimswitch measure '${m.id}': drivers is a formula over { measure } references and numbers, not sums fields
|
|
192
|
-
if (new Set(ids).size > 6) throw new NormalizeError("invalid-data", "measures", `dimswitch measure '${m.id}': at most 6 drivers; the effect split evaluates every order of them
|
|
273
|
+
if (!ids.length || fields(m.drivers).length || usesTotal(m.drivers)) throw new NormalizeError("invalid-data", "measures", `dimswitch measure '${m.id}': drivers is a formula over { measure } references and numbers, not sums fields.`, void 0, void 0, ["data", "measures", index, "drivers"]);
|
|
274
|
+
if (new Set(ids).size > 6) throw new NormalizeError("invalid-data", "measures", `dimswitch measure '${m.id}': at most 6 drivers; the effect split evaluates every order of them.`, void 0, void 0, ["data", "measures", index, "drivers"]);
|
|
193
275
|
for (let id of ids) {
|
|
194
|
-
let driver = measure(id, m.id);
|
|
195
|
-
if (id === m.id || driverOwner.has(id) && driverOwner.get(id) !== m.id) throw new NormalizeError("invalid-data", "measures", `dimswitch measure '${id}': a driver explains one other line; '${m.id}' and '${driverOwner.get(id) ?? m.id}' both name it
|
|
196
|
-
if (driver.sign !== void 0 || driver.result || driver.drivers !== void 0) throw new NormalizeError("invalid-data", "measures", `dimswitch measure '${id}': a driver takes no sign, result or drivers; it is printed, never added
|
|
276
|
+
let driver = measure(id, m.id, "drivers");
|
|
277
|
+
if (id === m.id || driverOwner.has(id) && driverOwner.get(id) !== m.id) throw new NormalizeError("invalid-data", "measures", `dimswitch measure '${id}': a driver explains one other line; '${m.id}' and '${driverOwner.get(id) ?? m.id}' both name it.`, void 0, void 0, ["data", "measures", index, "drivers"]);
|
|
278
|
+
if (driver.sign !== void 0 || driver.result || driver.drivers !== void 0) throw new NormalizeError("invalid-data", "measures", `dimswitch measure '${id}': a driver takes no sign, result or drivers; it is printed, never added.`, void 0, void 0, pointAt(["data", "measures"], data.measures, id, driver.sign !== void 0 ? "sign" : driver.result ? "result" : "drivers"));
|
|
197
279
|
driverOwner.set(id, m.id);
|
|
198
280
|
}
|
|
199
281
|
}
|
|
200
282
|
let placed = /* @__PURE__ */ new Set();
|
|
201
283
|
for (let start of data.measures) {
|
|
202
|
-
let path = /* @__PURE__ */ new Map(), edges = [], current = start;
|
|
284
|
+
let path = /* @__PURE__ */ new Map(), edges = [], child, current = start;
|
|
203
285
|
for (; current && !placed.has(current.id); ) {
|
|
204
286
|
let cycleAt = path.get(current.id);
|
|
205
287
|
if (cycleAt !== void 0) throw new NormalizeError(
|
|
206
288
|
"invalid-data",
|
|
207
289
|
"measures",
|
|
208
290
|
`dimswitch measure placement forms a cycle: ${edges.slice(cycleAt).join("; ")}.`,
|
|
209
|
-
"remove one partOf or drivers reference in this cycle"
|
|
291
|
+
"remove one partOf or drivers reference in this cycle",
|
|
292
|
+
void 0,
|
|
293
|
+
// The edge out of the line before closes the cycle: its partOf, or the drivers of its owner.
|
|
294
|
+
child.partOf !== void 0 ? pointAt(["data", "measures"], data.measures, child.id, "partOf") : pointAt(["data", "measures"], data.measures, driverOwner.get(child.id), "drivers")
|
|
210
295
|
);
|
|
211
296
|
path.set(current.id, edges.length);
|
|
212
297
|
let parent = current.partOf ?? driverOwner.get(current.id);
|
|
213
298
|
if (parent === void 0) break;
|
|
214
|
-
edges.push(current.partOf !== void 0 ? `'${current.id}'.partOf -> '${parent}'` : `'${current.id}' is a driver in '${parent}'.drivers`), current = measure(parent, current.id);
|
|
299
|
+
edges.push(current.partOf !== void 0 ? `'${current.id}'.partOf -> '${parent}'` : `'${current.id}' is a driver in '${parent}'.drivers`), child = current, current = measure(parent, current.id, "partOf");
|
|
215
300
|
}
|
|
216
301
|
for (let id of path.keys()) placed.add(id);
|
|
217
302
|
}
|
|
218
303
|
let isDriver = (m) => driverOwner.has(m.id), placeOf = (m) => m.partOf ?? (isDriver(m) ? measures.get(driverOwner.get(m.id)).partOf : void 0), partsOf = (id) => data.measures.filter((m) => m.partOf === id && !isDriver(m)), childrenOf = (id) => data.measures.filter((m) => placeOf(m) === id), isSubtotal = (m) => partsOf(m.id).length > 0;
|
|
219
|
-
for (let m of data.measures) {
|
|
304
|
+
for (let [index, m] of data.measures.entries()) {
|
|
220
305
|
if (m.partOf !== void 0) {
|
|
221
|
-
let parent = measure(m.partOf, m.id);
|
|
222
|
-
if (m.parentId !== void 0 || m.splitOf !== void 0 || parent.parentId !== void 0 || parent.splitOf !== void 0) throw new NormalizeError("invalid-data", "measures", `dimswitch measure '${m.id}': partOf and split fields (parentId, splitOf) do not mix
|
|
223
|
-
if (parent.result) throw new NormalizeError("invalid-data", "measures", `dimswitch measure '${m.id}': a result has no parts; name its lines in its value instead
|
|
306
|
+
let parent = measure(m.partOf, m.id, "partOf");
|
|
307
|
+
if (m.parentId !== void 0 || m.splitOf !== void 0 || parent.parentId !== void 0 || parent.splitOf !== void 0) throw new NormalizeError("invalid-data", "measures", `dimswitch measure '${m.id}': partOf and split fields (parentId, splitOf) do not mix.`, void 0, void 0, ["data", "measures", index, "partOf"]);
|
|
308
|
+
if (parent.result) throw new NormalizeError("invalid-data", "measures", `dimswitch measure '${m.id}': a result has no parts; name its lines in its value instead.`, void 0, void 0, ["data", "measures", index, "partOf"]);
|
|
224
309
|
}
|
|
225
|
-
if (m.result && (m.sign !== void 0 || m.partOf !== void 0 || m.value === void 0)) throw new NormalizeError("invalid-data", "measures", `dimswitch measure '${m.id}': a result is a top-level line with a value that names its lines, e.g. { "op": "sub", "a": { "measure": "income" }, "b": { "measure": "costs" } }; it takes no sign or partOf
|
|
226
|
-
if (m.change === "absolute" && percentMeasure(m)) throw new NormalizeError("invalid-data", "measures", `dimswitch measure '${m.id}': a percent measure changes in points; use change 'pp', not 'absolute'
|
|
227
|
-
if (m.value === void 0 && !isSubtotal(m)) throw new NormalizeError("invalid-data", "measures", `dimswitch measure '${m.id}' has no value and no measure names it in partOf; add a value or make it a subtotal
|
|
310
|
+
if (m.result && (m.sign !== void 0 || m.partOf !== void 0 || m.value === void 0)) throw new NormalizeError("invalid-data", "measures", `dimswitch measure '${m.id}': a result is a top-level line with a value that names its lines, e.g. { "op": "sub", "a": { "measure": "income" }, "b": { "measure": "costs" } }; it takes no sign or partOf.`, void 0, void 0, ["data", "measures", index, "result"]);
|
|
311
|
+
if (m.change === "absolute" && percentMeasure(m)) throw new NormalizeError("invalid-data", "measures", `dimswitch measure '${m.id}': a percent measure changes in points; use change 'pp', not 'absolute'.`, void 0, void 0, ["data", "measures", index, "change"]);
|
|
312
|
+
if (m.value === void 0 && !isSubtotal(m)) throw new NormalizeError("invalid-data", "measures", `dimswitch measure '${m.id}' has no value and no measure names it in partOf; add a value or make it a subtotal.`, void 0, void 0, ["data", "measures", index, "value"]);
|
|
228
313
|
}
|
|
229
314
|
let statementGroups = /* @__PURE__ */ new Set(), statementField = (m) => m.partOf !== void 0 || m.sign !== void 0 || m.result === !0 || m.drivers !== void 0 || isDriver(m) || isSubtotal(m), groupOf = (m) => m.group ?? (placeOf(m) !== void 0 ? groupOf(measures.get(placeOf(m))) : isDriver(m) ? groupOf(measures.get(driverOwner.get(m.id))) : void 0);
|
|
230
|
-
for (let m of data.measures) if (statementField(m)) {
|
|
315
|
+
for (let [index, m] of data.measures.entries()) if (statementField(m)) {
|
|
231
316
|
let g = groupOf(m);
|
|
232
|
-
if (g === void 0) throw new NormalizeError("invalid-data", "measures", `dimswitch measure '${m.id}': a statement line needs a group; the group is the statement (e.g. "Contribution margin")
|
|
317
|
+
if (g === void 0) throw new NormalizeError("invalid-data", "measures", `dimswitch measure '${m.id}': a statement line needs a group; the group is the statement (e.g. "Contribution margin").`, void 0, void 0, ["data", "measures", index, "group"]);
|
|
233
318
|
let place = placeOf(m);
|
|
234
|
-
if (place !== void 0 && m.group !== void 0 && groupOf(measures.get(place)) !== m.group) throw new NormalizeError("invalid-data", "measures", `dimswitch measure '${m.id}': its group differs from the group of '${place}'; a line sits in its subtotal's group
|
|
319
|
+
if (place !== void 0 && m.group !== void 0 && groupOf(measures.get(place)) !== m.group) throw new NormalizeError("invalid-data", "measures", `dimswitch measure '${m.id}': its group differs from the group of '${place}'; a line sits in its subtotal's group.`, void 0, void 0, ["data", "measures", index, "group"]);
|
|
235
320
|
statementGroups.add(g);
|
|
236
321
|
}
|
|
237
322
|
let inStatement = (m) => {
|
|
@@ -241,19 +326,19 @@ function compileDimSwitch(data, options = {}, form = {}) {
|
|
|
241
326
|
if (effectMeasures.length) {
|
|
242
327
|
for (let kind of ["prior", ...periods.length ? ["period"] : [], ...plan ? ["plan"] : []]) if (!thresholdFor("effect", kind, options)) throw new NormalizeError("invalid-number", "options.thresholds", `dimswitch options.thresholds.effect or thresholds.${kind}.effect is required for judge family effect: two ascending numbers in the statement unit.`);
|
|
243
328
|
let scales = new Set(effectMeasures.filter((m) => !isDriver(m)).map((m) => m.scale ?? m.format ?? ""));
|
|
244
|
-
if (scales.size > 1) throw new NormalizeError("invalid-data", "measures", `dimswitch effect lines must share one scale and format; ${[...scales].map((s) => `'${s}'`).join(" and ")} differ. One threshold pair cannot judge two units
|
|
329
|
+
if (scales.size > 1) throw new NormalizeError("invalid-data", "measures", `dimswitch effect lines must share one scale and format; ${[...scales].map((s) => `'${s}'`).join(" and ")} differ. One threshold pair cannot judge two units.`, void 0, void 0, ["data", "measures"]);
|
|
245
330
|
}
|
|
246
331
|
let resolved = /* @__PURE__ */ new Map(), resolving = /* @__PURE__ */ new Set(), valueOf = (id) => {
|
|
247
332
|
let done = resolved.get(id);
|
|
248
333
|
if (done !== void 0) return done;
|
|
249
|
-
if (resolving.has(id)) throw new NormalizeError("invalid-data", "measures", `dimswitch measure '${id}' refers to itself through { measure } references
|
|
334
|
+
if (resolving.has(id)) throw new NormalizeError("invalid-data", "measures", `dimswitch measure '${id}' refers to itself through { measure } references.`, void 0, void 0, pointAt(["data", "measures"], data.measures, id, ...measures.get(id)?.value === void 0 ? [] : ["value"]));
|
|
250
335
|
resolving.add(id);
|
|
251
336
|
let m = measures.get(id), expr = m.value === void 0 ? composed(id) : inline(m.value, id);
|
|
252
337
|
return resolving.delete(id), resolved.set(id, expr), expr;
|
|
253
338
|
}, inline = (e, from) => {
|
|
254
339
|
if (typeof e == "number" || "field" in e) return e;
|
|
255
340
|
if ("measure" in e) {
|
|
256
|
-
let m = measure(e.measure, from), v = valueOf(m.id);
|
|
341
|
+
let m = measure(e.measure, from, "value"), v = valueOf(m.id);
|
|
257
342
|
return percentMeasure(m) ? { op: "mul", a: v, b: 0.01 } : v;
|
|
258
343
|
}
|
|
259
344
|
return "total" in e ? { total: inline(e.total, from) } : { ...e, a: inline(e.a, from), b: inline(e.b, from) };
|
|
@@ -381,7 +466,7 @@ function compileDimSwitch(data, options = {}, form = {}) {
|
|
|
381
466
|
}
|
|
382
467
|
let shares = cur.every((v) => v !== null) && ref.every((v) => v !== null) ? shapley(owner.drivers, ids, cur, ref) : ids.map(() => null);
|
|
383
468
|
return new Map(ids.map((id, i) => [id, shares[i]]));
|
|
384
|
-
}, rows = [], levels = {}, bars = [], relativeChanges = [], nearZeroSeen = !1, totalId = data.dimension.total.id, driverOps = /* @__PURE__ */ new Map();
|
|
469
|
+
}, rows = [], levels = {}, labelOnly = (row) => Object.assign(row, { [LABEL_ONLY_ROW]: !0 }), totalRows = /* @__PURE__ */ new Set(), bars = [], relativeChanges = [], nearZeroSeen = !1, totalId = data.dimension.total.id, driverOps = /* @__PURE__ */ new Map();
|
|
385
470
|
for (let m of data.measures) if (m.drivers !== void 0) {
|
|
386
471
|
let assign = (e, glyph) => {
|
|
387
472
|
if (!(typeof e == "number" || "field" in e || "total" in e)) {
|
|
@@ -394,26 +479,28 @@ function compileDimSwitch(data, options = {}, form = {}) {
|
|
|
394
479
|
};
|
|
395
480
|
assign(m.drivers);
|
|
396
481
|
}
|
|
397
|
-
let withRef = new Set(data.facts.filter((f) => f.ref).map((f) => f.periodId)), noChangeLine = periods.length > 0 && periods.every((p) => !withRef.has(p.id)), addMeasure = (m, member, parentId, rung, label = m.label, kind = "measure") => {
|
|
398
|
-
let id = dimswitchRowId(variant, member, m.id), cells = emptyIdRecord(), changes =
|
|
482
|
+
let withRef = new Set(data.facts.filter((f) => f.ref).map((f) => f.periodId)), noChangeLine = hostHidEveryPeriod || periods.length > 0 && periods.every((p) => !withRef.has(p.id)), addMeasure = (m, member, parentId, rung, label = m.label, kind = "measure") => {
|
|
483
|
+
let id = dimswitchRowId(variant, member, m.id), cells = emptyIdRecord(), changes = blockCells(), effects = blockCells(), values = /* @__PURE__ */ new Map(), owner = isDriver(m) ? measures.get(driverOwner.get(m.id)) : void 0, ownFormat = formatOf(m), effectFormat = signedFormat(formatOf(owner ?? m));
|
|
399
484
|
for (let { p, reference, comparisonKind } of [
|
|
400
485
|
{ p: range, reference: prior, comparisonKind: "prior" },
|
|
401
486
|
...plan ? [{ p: range, reference: plan, comparisonKind: "plan" }] : [],
|
|
402
487
|
...periods.map((p2) => ({ p: p2, reference: void 0, comparisonKind: "period" }))
|
|
403
488
|
]) {
|
|
404
|
-
let currentSums = sums(member, p.id), ref = reference ? sums(member, reference.id) : factOf(member, p.id)?.ref, total = sums(data.dimension.total.id, p.id), refTotal = reference ? sums(data.dimension.total.id, reference.id) : factOf(data.dimension.total.id, p.id)?.ref, windows = [currentSums, ref, ...usesTotal(exprOf(m)) ? [total, refTotal] : []], current = evaluate(exprOf(m), currentSums, total), before = evaluate(exprOf(m), ref, refTotal), delta = change(current, before, m.change, m.format, decimalsOf);
|
|
405
|
-
delta.nearZero && (nearZeroSeen = !0);
|
|
406
|
-
let col = p.kind ? "range" : p.id, comparison = comparisonKind === "plan" ? "pl" : comparisonKind === "prior" ? "pp" : p.id;
|
|
407
|
-
(current.negativeBase || before.negativeBase) && warn("ratio-negative-base", m.id, `Measure '${m.id}' divides by a negative number (member '${member}', ${col}), so the ratio prints as plain arithmetic, not n.m.`, "info");
|
|
489
|
+
let currentSums = sums(member, p.id), ref = reference ? sums(member, reference.id) : factOf(member, p.id)?.ref, total = sums(data.dimension.total.id, p.id), refTotal = reference ? sums(data.dimension.total.id, reference.id) : factOf(data.dimension.total.id, p.id)?.ref, windows = [currentSums, ref, ...usesTotal(exprOf(m)) ? [total, refTotal] : []], current = evaluate(exprOf(m), currentSums, total), before = evaluate(exprOf(m), ref, refTotal), delta = change(current, before, m.change, m.format, decimalsOf), col = p.kind ? "range" : p.id, comparison = comparisonKind === "plan" ? "pl" : comparisonKind === "prior" ? "pp" : p.id, comparisonDrawn = !p.kind || drawnBlock.has(comparison);
|
|
490
|
+
delta.nearZero && comparisonDrawn && !(totalHidden && member === totalId) && (nearZeroSeen = !0), (current.negativeBase || before.negativeBase) && warn("ratio-negative-base", m.id, `Measure '${m.id}' divides by a negative number (member '${member}', ${col}), so the ratio prints as plain arithmetic, not n.m.`, "info");
|
|
408
491
|
let effect = null;
|
|
409
|
-
(m.judge?.family === "effect" || owner && data.effectLabel) && (owner ? (effect = driverEffects(owner, member, col, currentSums, ref, total, refTotal).get(m.id) ?? null, effect !== null && (effect *= contribution(owner))) : current.raw !== null && before.raw !== null && (effect = contribution(m) * (current.raw - before.raw)), records.push({ rowId: `${id}:effect`, colId: comparison, op: owner ? "dimswitch:shapley" : "dimswitch:effect", inputs: [], raw: effect, state: effect === null ? "nm" : "value", displayed: "", kind: "calc" }));
|
|
492
|
+
(m.judge?.family === "effect" || owner && data.effectLabel) && (owner ? (effect = driverEffects(owner, member, col, currentSums, ref, total, refTotal).get(m.id) ?? null, effect !== null && (effect *= contribution(owner))) : current.raw !== null && before.raw !== null && (effect = contribution(m) * (current.raw - before.raw)), comparisonDrawn && records.push({ rowId: `${id}:effect`, colId: comparison, op: owner ? "dimswitch:shapley" : "dimswitch:effect", inputs: [], raw: effect, state: effect === null ? "nm" : "value", displayed: "", kind: "calc" }));
|
|
410
493
|
let judgement = judge(m, current, before, windows, p.partial === !0 || comparisonKind === "plan" && reference?.partial === !0, options, effect, comparisonKind);
|
|
411
|
-
if (values.set(col, current), comparisonKind !== "plan") {
|
|
494
|
+
if (values.set(col, current), comparisonKind !== "plan" && (!p.kind || rangeDrawn)) {
|
|
412
495
|
let levelJudgement = m.bands ? judgeBand(m, current, [currentSums, ...usesTotal(exprOf(m)) ? [total] : []], p.partial === !0, options) : NEUTRAL;
|
|
413
496
|
cells[col] = cell(current, levelJudgement), record(id, col, m, member, p.id, current);
|
|
414
497
|
}
|
|
415
498
|
let rounded = Math.round(Math.abs(delta.raw ?? 0) * 10) / 10, relative = m.change !== "pp" && m.change !== "absolute", changeFormat = m.change === "pp" ? formatPercentagePoints(1.2, 1, !0) : m.change === "absolute" ? signedFormat(ownFormat) : formatAutomaticPercent(1.2, rounded >= 5 || rounded === 0 ? 0 : 1, !0), changeCell = !p.kind && !withRef.has(p.id) ? { missing: "blank" } : delta.state === "missing" ? { missing: delta.blank ? "blank" : "dash" } : cell(delta, judgement, changeFormat), effectCell = effect === null ? null : { v: effect, format: effectFormat };
|
|
416
|
-
m.format === void 0 && m.unit === void 0 && changeCell && typeof changeCell == "object" && Object.assign(changeCell, { [AUTOMATIC_FORMAT]: !0 }), (owner ?? m).format === void 0 && (owner ?? m).unit === void 0 && effectCell && Object.assign(effectCell, { [AUTOMATIC_FORMAT]: !0 }), p.kind
|
|
499
|
+
if (m.format === void 0 && m.unit === void 0 && changeCell && typeof changeCell == "object" && Object.assign(changeCell, { [AUTOMATIC_FORMAT]: !0 }), (owner ?? m).format === void 0 && (owner ?? m).unit === void 0 && effectCell && Object.assign(effectCell, { [AUTOMATIC_FORMAT]: !0 }), p.kind) {
|
|
500
|
+
if (!comparisonDrawn) continue;
|
|
501
|
+
cells[comparison] = !m.judge && changeCell !== null && typeof changeCell == "object" && changeCell.missing === void 0 ? { ...changeCell, muted: !0 } : changeCell, relative && relativeChanges.push({ cell: cells[comparison], col: comparison, rounded }), record(id, comparison, m, member, p.id, delta, ref, !0, refTotal, reference?.id), effects[comparison] = effectCell;
|
|
502
|
+
} else
|
|
503
|
+
changes[p.id] = changeCell, effects[p.id] = effectCell, withRef.has(p.id) && (record(`${id}:change`, p.id, m, member, p.id, delta, ref, !0, refTotal), relative && relativeChanges.push({ cell: changeCell, col: p.id, rounded }));
|
|
417
504
|
}
|
|
418
505
|
let sized = !m.judge && (m.scale === "money" || m.scale === "count") && !inStatement(m);
|
|
419
506
|
if (isSubtotal(m) && m.value !== void 0) for (let p of [range, ...plan ? [plan] : [], ...periods]) {
|
|
@@ -421,11 +508,11 @@ function compileDimSwitch(data, options = {}, form = {}) {
|
|
|
421
508
|
authored !== null && parts !== null && Math.abs(authored - parts) > tolerance(m) && warn("dimswitch-subtotal-footing", m.id, `Measure '${m.id}': its value ${authored} differs from the sum of its parts ${parts} (member '${member}', ${p.id}). Boardplot keeps the authored value.`);
|
|
422
509
|
}
|
|
423
510
|
let row = { id, label, parentId, rung, kind, format: m.scale && m.scale !== "percent" && m.format === void 0 ? void 0 : ownFormat, scale: m.scale, unitAffix: kind === "detail" || kind === "split" ? void 0 : affix(m), relation: kind === "split" ? "ofWhich" : "displayOnly", totalPolicy: "source", cells };
|
|
424
|
-
if (m.format === void 0 && m.unit === void 0 && Object.assign(row, { [AUTOMATIC_FORMAT]: !0 }), (m.scale === "money" || m.scale === "count") && Object.assign(row, { [MAGNITUDE_GROUP]: m.id }), sized && member !== totalId) for (let col of ["range", ...periods.map((p) => p.id)]) {
|
|
511
|
+
if (m.format === void 0 && m.unit === void 0 && Object.assign(row, { [AUTOMATIC_FORMAT]: !0 }), (m.scale === "money" || m.scale === "count") && Object.assign(row, { [MAGNITUDE_GROUP]: m.id }), sized && member !== totalId) for (let col of [...rangeDrawn ? ["range"] : [], ...periods.map((p) => p.id)]) {
|
|
425
512
|
let value = values.get(col)?.raw;
|
|
426
513
|
typeof value == "number" && bars.push({ row, measure: m.id, col, value });
|
|
427
514
|
}
|
|
428
|
-
return m.divider && (kind === "measure" || kind === "split") && (row.divider = !0), rows.push(row), noChangeLine || rows.push({ id: `${id}:change`, label: data.changeLabel ?? "", parentId: id, inline: !0, inlineGroup: "change", relation: "displayOnly", missing: "blank", cells: changes }), owner && data.effectLabel && rows.push({ id: `${id}:effect`, label: data.effectLabel, parentId: id, inline: !0, inlineGroup: "effect", relation: "displayOnly", missing: "blank", cells: effects }), row;
|
|
515
|
+
return m.divider && (kind === "measure" || kind === "split") && (row.divider = !0), rows.push(row), totalHidden && member === totalId && totalRows.add(row), noChangeLine || rows.push({ id: `${id}:change`, label: data.changeLabel ?? "", parentId: id, inline: !0, inlineGroup: "change", relation: "displayOnly", missing: "blank", cells: changes }), owner && data.effectLabel && rows.push({ id: `${id}:effect`, label: data.effectLabel, parentId: id, inline: !0, inlineGroup: "effect", relation: "displayOnly", missing: "blank", cells: effects }), row;
|
|
429
516
|
}, statementRow = (m, row, first) => {
|
|
430
517
|
if (m.result) {
|
|
431
518
|
row.kind = "result";
|
|
@@ -443,7 +530,7 @@ function compileDimSwitch(data, options = {}, form = {}) {
|
|
|
443
530
|
}, statementDepth = Math.max(1, maxOf(data.measures.filter(inStatement).map(lineLevel))), sections = 0, section = (label, id = `dimswitch:section:${++sections}`) => rows.push({ id, label, role: "section", kind: "section" }), closeResults = (from) => {
|
|
444
531
|
let last = rows.slice(from).filter((r) => r.kind === "result" && !r.inline).pop();
|
|
445
532
|
last && (last.final = !0);
|
|
446
|
-
};
|
|
533
|
+
}, totalBlockEnd = 0;
|
|
447
534
|
if (variant === "by-measure") {
|
|
448
535
|
let grouped = roots.some((m) => m.group !== void 0), current = null, groupStart = rows.length, walk = (m, parent, parentMember, rung, memberLevel) => {
|
|
449
536
|
for (let member of ordered(parentMember)) {
|
|
@@ -464,7 +551,7 @@ function compileDimSwitch(data, options = {}, form = {}) {
|
|
|
464
551
|
levels[row.id] = statementDepth + 1, walk(m, row.id, void 0, rung + 1, 1);
|
|
465
552
|
}, firstLine = !0;
|
|
466
553
|
for (let m of roots)
|
|
467
|
-
applies(m, totalId) && (grouped && (m.group ?? "") !== current && (closeResults(groupStart), groupStart = rows.length, firstLine = !0, current = m.group ?? "", section(m.group === void 0 ? data.dimension.total.heading ?? data.dimension.total.label : data.groupHeadings?.[m.group] ?? m.group)), line(m, void 0, 0, firstLine), isDriver(m) || (firstLine = !1));
|
|
554
|
+
applies(m, totalId) && (grouped && (m.group ?? "") !== current && (closeResults(groupStart), groupStart = rows.length, firstLine = !0, current = m.group ?? "", headIds.add(`group:${current}`), headHidden(current) ? sections++ : section(m.group === void 0 ? data.dimension.total.heading ?? data.dimension.total.label : data.groupHeadings?.[m.group] ?? m.group)), line(m, void 0, 0, firstLine), isDriver(m) || (firstLine = !1));
|
|
468
555
|
closeResults(groupStart);
|
|
469
556
|
} else {
|
|
470
557
|
let block = (member, parentRow, rung) => {
|
|
@@ -481,9 +568,9 @@ function compileDimSwitch(data, options = {}, form = {}) {
|
|
|
481
568
|
}, firstIn = /* @__PURE__ */ new Map();
|
|
482
569
|
for (let m of roots.filter((m2) => applies(m2, member) && (member !== totalId || m2.inTotalBlock !== !1))) {
|
|
483
570
|
let parent = parentRow, at = rung + 1;
|
|
484
|
-
if (m.group !== void 0) {
|
|
571
|
+
if (m.group !== void 0 && headIds.add(`group:${m.group}`), m.group !== void 0 && !headHidden(m.group)) {
|
|
485
572
|
let groupRow = groups.get(m.group);
|
|
486
|
-
groupRow === void 0 && (groupRow = `${dimswitchRowId(variant, member)}:group:${m.group}`, rows.push({ id: groupRow, label: m.group, parentId: parentRow, rung: rung + 1, kind: "detail", foldable: !1, relation: "displayOnly", totalPolicy: "source", missing: "blank" }), groups.set(m.group, groupRow)), parent = groupRow, at = rung + 2;
|
|
573
|
+
groupRow === void 0 && (groupRow = `${dimswitchRowId(variant, member)}:group:${m.group}`, rows.push(labelOnly({ id: groupRow, label: m.group, parentId: parentRow, rung: rung + 1, kind: "detail", foldable: !1, relation: "displayOnly", totalPolicy: "source", missing: "blank" })), groups.set(m.group, groupRow)), parent = groupRow, at = rung + 2;
|
|
487
574
|
}
|
|
488
575
|
let g = m.group ?? "";
|
|
489
576
|
line(m, parent, at, firstIn.get(g) ?? !0), firstIn.set(g, !1);
|
|
@@ -503,11 +590,11 @@ function compileDimSwitch(data, options = {}, form = {}) {
|
|
|
503
590
|
let changeRow = rows.find((r) => r.id === `${id}:change`);
|
|
504
591
|
form.card && changeRow && changeRow.label === "" && (changeRow.label = summary.unitAffix, delete summary.unitAffix);
|
|
505
592
|
}, totalHead = options.expansion?.collapsed?.includes(totalRow) ? headline(totalId) : void 0;
|
|
506
|
-
totalHead ? headRow(totalHead, totalId, totalRow, void 0, 0, data.dimension.total.label) : rows.push({ id: totalRow, label: data.dimension.total.label, kind: "member", rung: 0, totalPolicy: "source", relation: "displayOnly" }), block(totalId, totalRow, 0);
|
|
593
|
+
totalHead ? headRow(totalHead, totalId, totalRow, void 0, 0, data.dimension.total.label) : rows.push(labelOnly({ id: totalRow, label: data.dimension.total.label, kind: "member", rung: 0, totalPolicy: "source", relation: "displayOnly" })), block(totalId, totalRow, 0), totalBlockEnd = rows.length;
|
|
507
594
|
let walk = (parentMember, parentRow, rung) => {
|
|
508
595
|
for (let member of ordered(parentMember)) {
|
|
509
596
|
let h = headline(member.id), id = dimswitchRowId(variant, member.id);
|
|
510
|
-
h ? headRow(h, member.id, id, parentRow, rung, member.label) : rows.push({ id, label: member.label, parentId: parentRow, rung, kind: "member", totalPolicy: "source", relation: "displayOnly" }), block(member.id, id, rung), levels[id] = rung + 2, walk(member.id, id, rung + 1);
|
|
597
|
+
h ? headRow(h, member.id, id, parentRow, rung, member.label) : rows.push(labelOnly({ id, label: member.label, parentId: parentRow, rung, kind: "member", totalPolicy: "source", relation: "displayOnly" })), block(member.id, id, rung), levels[id] = rung + 2, walk(member.id, id, rung + 1);
|
|
511
598
|
}
|
|
512
599
|
};
|
|
513
600
|
walk(void 0, void 0, 0);
|
|
@@ -519,17 +606,37 @@ function compileDimSwitch(data, options = {}, form = {}) {
|
|
|
519
606
|
group ? group.push(entry) : groups.set(entry.col, [entry]);
|
|
520
607
|
}
|
|
521
608
|
return groups;
|
|
522
|
-
};
|
|
609
|
+
}, barDrawn = !1;
|
|
523
610
|
for (let [col, inCol] of byCol(bars)) {
|
|
524
611
|
let counts = /* @__PURE__ */ new Map();
|
|
525
612
|
for (let bar of inCol) counts.set(bar.measure, (counts.get(bar.measure) ?? 0) + 1);
|
|
526
613
|
let chosen = [...counts].sort((a, b) => b[1] - a[1] || measureOrder.get(a[0]) - measureOrder.get(b[0]))[0][0];
|
|
527
614
|
for (let parent of new Set(inCol.map((bar) => bar.row.parentId))) {
|
|
528
615
|
let siblings = inCol.filter((bar) => bar.measure === chosen && bar.row.parentId === parent), max = Math.max(0, maxOf(siblings.map((bar) => bar.value)));
|
|
529
|
-
if (!(max <= 0 || siblings.every((bar) => bar.value / max >= 0.9)))
|
|
616
|
+
if (!(max <= 0 || siblings.every((bar) => bar.value / max >= 0.9)) && (barDrawn = !0, options.bars !== !1))
|
|
530
617
|
for (let bar of siblings) bar.row.cells[col] = withBar(bar.row.cells[col], bar.value / max);
|
|
531
618
|
}
|
|
532
619
|
}
|
|
620
|
+
options.bars === !1 && !barDrawn && warnings.push({
|
|
621
|
+
code: "option-ignored",
|
|
622
|
+
severity: "warn",
|
|
623
|
+
field: ["options", "bars"],
|
|
624
|
+
message: "options.bars does nothing here, because this table draws no size bars.",
|
|
625
|
+
suggest: "Remove options.bars."
|
|
626
|
+
}), variant === "by-member" && options.totalPosition === "bottom" && !totalHidden && rows.push(...rows.splice(0, totalBlockEnd)), warnings.push(...generatedIdWarnings("dimswitch", "rowVisibility", options.rowVisibility, [totalId, ...headIds])), variant === "by-measure" && options.totalPosition !== void 0 && warnings.push({
|
|
627
|
+
code: "option-ignored",
|
|
628
|
+
severity: "warn",
|
|
629
|
+
field: ["options", "totalPosition"],
|
|
630
|
+
message: "options.totalPosition does not apply in by-measure, because each Total row owns its members.",
|
|
631
|
+
suggest: "Remove options.totalPosition, or use variant by-member.",
|
|
632
|
+
fix: [{ op: "remove", path: "/options/totalPosition" }]
|
|
633
|
+
}), variant === "by-member" && totalHidden && options.totalPosition === "bottom" && warnings.push({
|
|
634
|
+
code: "option-ignored",
|
|
635
|
+
severity: "warn",
|
|
636
|
+
field: ["options", "totalPosition"],
|
|
637
|
+
message: "options.totalPosition has nothing to move, because rowVisibility hides the Total block.",
|
|
638
|
+
suggest: "Remove options.totalPosition, or show the Total."
|
|
639
|
+
});
|
|
533
640
|
let parents = new Set(rows.filter((r) => !r.inline && r.parentId).map((r) => r.parentId));
|
|
534
641
|
for (let id of Object.keys(levels)) parents.has(id) || delete levels[id];
|
|
535
642
|
let maxDepth = Math.max(1, maxOf(Object.values(levels)));
|
|
@@ -555,46 +662,88 @@ function compileDimSwitch(data, options = {}, form = {}) {
|
|
|
555
662
|
let entries = inCol.filter((entry) => entry.cell !== null && typeof entry.cell == "object" && typeof entry.cell.v == "number"), shown = entries.filter((entry) => drawn(entry.cell)), format = formatAutomaticPercent(1.2, (shown.length > 0 ? shown : entries).some((entry) => entry.rounded > 0 && entry.rounded < 5) ? 1 : 0, !0);
|
|
556
663
|
for (let entry of entries) entry.cell.format = format;
|
|
557
664
|
}
|
|
558
|
-
let
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
665
|
+
let computedCells = totalHidden ? hideTotal() : records;
|
|
666
|
+
function hideTotal() {
|
|
667
|
+
let hiddenIds = /* @__PURE__ */ new Set(), dropped = /* @__PURE__ */ new Set();
|
|
668
|
+
if (variant === "by-member") for (let row of rows.slice(0, totalBlockEnd)) dropped.add(row);
|
|
669
|
+
else for (let row of totalRows) row.kind === "split" && dropped.add(row);
|
|
670
|
+
let lines = [...totalRows];
|
|
671
|
+
for (let row of lines)
|
|
672
|
+
hiddenIds.add(row.id), hiddenIds.add(`${row.id}:change`), hiddenIds.add(`${row.id}:effect`);
|
|
673
|
+
variant === "by-member" && hiddenIds.add(dimswitchRowId(variant, totalId));
|
|
674
|
+
for (let row of rows) row.inline && row.parentId !== void 0 && hiddenIds.has(row.parentId) && dropped.add(row);
|
|
675
|
+
let figures = /* @__PURE__ */ new Map();
|
|
676
|
+
for (let row of lines) {
|
|
677
|
+
let group = row[MAGNITUDE_GROUP];
|
|
678
|
+
if (group === void 0) continue;
|
|
679
|
+
let list = figures.get(group);
|
|
680
|
+
list || figures.set(group, list = []);
|
|
681
|
+
for (let col of ["range", ...periods.map((p) => p.id)]) {
|
|
682
|
+
let value = row.cells?.[col];
|
|
683
|
+
value !== null && typeof value == "object" && typeof value.v == "number" && list.push([col, value.v]);
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
let kept = rows.filter((row) => !dropped.has(row));
|
|
687
|
+
rows.length = 0, rows.push(...kept);
|
|
688
|
+
for (let row of lines) dropped.has(row) || (row.cells = emptyIdRecord(), row.missing = "blank", labelOnly(row));
|
|
689
|
+
for (let row of rows) {
|
|
690
|
+
let group = row[MAGNITUDE_GROUP], list = group === void 0 ? void 0 : figures.get(group);
|
|
691
|
+
list && (Object.assign(row, { [MAGNITUDE_FIGURES]: list }), figures.delete(group));
|
|
692
|
+
}
|
|
693
|
+
for (let row of dropped)
|
|
694
|
+
delete levels[row.id], collapsed.delete(row.id);
|
|
695
|
+
for (let i = defaults.length - 1; i >= 0; i--) defaults[i] in levels || defaults.splice(i, 1);
|
|
696
|
+
return (blockColumns.length || authoredPeriods.length) && warnings.push(...hiddenTotalFoldWarnings(rows, collapsed, totalId)), records.filter((record2) => record2.kind !== "calc" || !hiddenIds.has(record2.rowId));
|
|
697
|
+
}
|
|
698
|
+
let { widths, columnOverrides: overrides } = options, tableOptions = tableOptionsOf(options), width = { label: widths?.label ?? 320, range: widths?.range ?? 110, change: widths?.change ?? 92, period: widths?.period ?? 94 }, fixed = (w) => form.card ? {} : { width: w }, labelWidth = overrides?.label?.width ?? widths?.label, labelCap = form.card ? Math.min(labelWidth ?? CARD_LABEL_WIDTH, CARD_LABEL_WIDTH) : labelWidth ?? width.label, headOf = (id, fallback) => overrides?.[id]?.label ?? fallback, aligned = (id) => {
|
|
699
|
+
let o = overrides?.[id];
|
|
700
|
+
return { ...o?.align === void 0 ? {} : { align: o.align }, ...o?.headAlign === void 0 ? {} : { headAlign: o.headAlign } };
|
|
701
|
+
}, track = (id, fallback) => ({ ...fixed(overrides?.[id]?.width ?? fallback), ...aligned(id) }), nameOf = (p) => headOf(p.kind ? "range" : p.id, p.label), noteName = (p) => nameOf(p).trim() || p.label;
|
|
702
|
+
if (form.card) for (let [id, override] of Object.entries(overrides ?? {})) override.width !== void 0 && (id === "label" ? override.width > CARD_LABEL_WIDTH : columnIds.includes(id)) && warnings.push({
|
|
703
|
+
code: "option-ignored",
|
|
704
|
+
severity: "warn",
|
|
705
|
+
field: ["options", "columnOverrides", id, "width"],
|
|
706
|
+
message: `The table does not fit at its authored widths, so the automatic card form sizes this track by content and ignores options.columnOverrides.${id}.width.`,
|
|
707
|
+
suggest: `Give the table more width, or remove options.columnOverrides.${id}.width.`
|
|
708
|
+
});
|
|
709
|
+
let strings = { ...localeStrings(options.locale?.language), ...options.strings }, partial = [...rangeDrawn ? [range] : [], ...periods].filter((p) => p.partial), star = disclosuresShown(options) && options.columnHeads !== !1 ? "*" : "", headSub = (p) => star || !p.partial || saysToDate(`${noteName(p)} ${p.subLabel ?? ""}`, strings.toDate) ? p.subLabel : p.subLabel ? `${p.subLabel} ${strings.toDate}` : strings.toDate, omitted = hidden.map((p) => p.label), fullPeriodNote = stringFields(strings.hiddenPeriods, { periods: omitted.join(", ") }), listed = cappedItems(omitted, { notes: options.notes, strings }), shortPeriodNote = stringFields(strings.hiddenPeriods, { periods: listed.join(", ") }), partialText = `${partial.map(noteName).join(", ")} ${strings.toDate}`, partialNote = partial.length && options.columnHeads === !1 && !disclosuresShown(options) ? partialText : void 0, shownKinds = shownNoteKinds(options), noteFits = partialNote !== void 0 && !options[PARTIAL_NOTE_OFF] && options.footnotes !== !1 && (shownKinds === void 0 || shownKinds.includes("note")) && (options.notes?.placement ?? defaultNotePlacement(options.target)) !== "list";
|
|
710
|
+
partialNote !== void 0 && !noteFits && warnings.push(partialNoteWarning(partialNote)), noteFits && (tableOptions.footnotes = [...tableOptions.footnotes || [], partialNote]);
|
|
711
|
+
let notes = [
|
|
712
|
+
...partial.length && !noteFits ? [disclosureNote(`${star ? `${star} ` : ""}${partialText}`)] : [],
|
|
562
713
|
...nearZeroSeen ? [disclosureNote(strings.nearZeroChange)] : [],
|
|
563
714
|
...hidden.length ? [engineNote(fullPeriodNote, "disclosure", shortPeriodNote === fullPeriodNote ? void 0 : shortPeriodNote)] : []
|
|
564
715
|
];
|
|
716
|
+
if ((overrides?.label?.align ?? "left") !== "left") for (let row of rows) row.unitAffix !== void 0 && (row.label = `${row.label} ${row.unitAffix}`, delete row.unitAffix);
|
|
717
|
+
let blockTracks = [
|
|
718
|
+
...rangeDrawn ? [{ id: "range", kind: "value", label: range.partial ? `${nameOf(range)}${star}` : nameOf(range), subLabel: headSub(range), ...track("range", width.range), aggregate: "source", emphasis: "strong" }] : [],
|
|
719
|
+
...drawnBlock.has("pp") ? [{ id: "pp", kind: "value", label: headOf("pp", prior.label), subLabel: prior.subLabel, format: "+1.2%", percentScale: "points", ...track("pp", width.change), aggregate: "none", emphasis: "strong" }] : [],
|
|
720
|
+
...plan && drawnBlock.has("pl") ? [{ id: "pl", kind: "value", label: headOf("pl", plan.label), subLabel: plan.subLabel, format: "+1.2%", percentScale: "points", ...track("pl", width.change), aggregate: "none", emphasis: "strong" }] : []
|
|
721
|
+
], periodTracks = periods.map((p) => ({ id: p.id, kind: "value", label: p.partial ? `${nameOf(p)}${star}` : nameOf(p), subLabel: headSub(p), ...track(p.id, width.period), aggregate: "source", ...p.partial ? { emphasis: "muted" } : {} })), periodsFirst = options.columnOrder?.find((id) => id === "block" || id === "periods") === "periods", pinned = 1 + (periodsFirst ? 0 : blockColumns.length);
|
|
565
722
|
return {
|
|
566
723
|
data: { columns: [
|
|
567
|
-
{ id: "label", kind: "rowLabel", label: variant === "by-measure" ? "KPI" : data.dimension.label, ...
|
|
568
|
-
|
|
569
|
-
{ id: "pp", kind: "value", label: prior.label, subLabel: prior.subLabel, format: "+1.2%", percentScale: "points", ...fixed(width.change), aggregate: "none", emphasis: "strong" },
|
|
570
|
-
...plan ? [{ id: "pl", kind: "value", label: plan.label, subLabel: plan.subLabel, format: "+1.2%", percentScale: "points", ...fixed(width.change), aggregate: "none", emphasis: "strong" }] : [],
|
|
571
|
-
// A partial period carries a star in its head; the note says what it means.
|
|
572
|
-
...periods.map((p) => ({ id: p.id, kind: "value", label: p.partial ? `${p.label}${star}` : p.label, subLabel: headSub(p), ...fixed(width.period), aggregate: "source", ...p.partial ? { emphasis: "muted" } : {} }))
|
|
724
|
+
{ id: "label", kind: "rowLabel", label: headOf("label", variant === "by-measure" ? "KPI" : data.dimension.label), ...aligned("label"), ...labelWidth === void 0 && !form.card ? { maxTextWidth: labelCap } : { maxWidth: labelCap } },
|
|
725
|
+
...periodsFirst ? [...periodTracks, ...blockTracks] : [...blockTracks, ...periodTracks]
|
|
573
726
|
// Range and its comparisons form one block between labels and periods.
|
|
574
|
-
], columnGroups: [{ id: "labels", label: "
|
|
727
|
+
], columnGroups: [{ id: "labels", label: chartString(options, "dimswitchLabels"), heading: !1, columns: ["label"] }, ...blockColumns.length ? [{ id: "block", label: chartString(options, "dimswitchRange"), heading: !1, columns: blockColumns }] : []], rows },
|
|
575
728
|
// No rowExtent: under the default the rules end at the last track.
|
|
576
729
|
options: {
|
|
577
|
-
|
|
578
|
-
stickyLabels: plan ? 4 : 3,
|
|
579
|
-
mountCollapsed: !1,
|
|
580
|
-
fitFormats: !0,
|
|
581
|
-
labelIndent: form.card ? { base: 12, step: 12 } : { base: 25, step: 17 },
|
|
582
|
-
...form.card ? { cellPadX: 3 } : {},
|
|
730
|
+
...tableDefaults(form, pinned),
|
|
583
731
|
...tableOptions,
|
|
584
732
|
...notes.length ? { [ENGINE_NOTES]: notes } : {},
|
|
585
|
-
...
|
|
733
|
+
...labelWidth !== void 0 && !form.card ? { [SOFT_LABEL_CAP]: !0 } : {},
|
|
586
734
|
[LABEL_WRAP_FLOOR]: !0,
|
|
587
735
|
// The object form of stickyLabels without `columns` keeps the compiled default: label, Range, vs prior (and vs plan).
|
|
588
|
-
...typeof tableOptions.stickyLabels == "object" && tableOptions.stickyLabels.columns === void 0 ? { stickyLabels: { ...tableOptions.stickyLabels, columns:
|
|
736
|
+
...typeof tableOptions.stickyLabels == "object" && tableOptions.stickyLabels.columns === void 0 ? { stickyLabels: { ...tableOptions.stickyLabels, columns: pinned } } : {},
|
|
589
737
|
...data.effectLabel ? { inlineVisibility: { effect: !1, ...tableOptions.inlineVisibility } } : {},
|
|
590
738
|
expansion: { collapsed: [...collapsed] }
|
|
591
739
|
},
|
|
592
|
-
computedCells
|
|
740
|
+
computedCells,
|
|
593
741
|
depthCollapsed: defaults,
|
|
594
742
|
levels,
|
|
595
743
|
maxDepth,
|
|
596
744
|
warnings,
|
|
597
|
-
omissions
|
|
745
|
+
omissions,
|
|
746
|
+
...partialNote === void 0 ? {} : { partialNote }
|
|
598
747
|
};
|
|
599
748
|
}
|
|
600
749
|
function foreignRowId(ids) {
|
|
@@ -612,7 +761,14 @@ function foreignRowId(ids) {
|
|
|
612
761
|
export {
|
|
613
762
|
FOLDED,
|
|
614
763
|
dimSwitchTableWarnings,
|
|
764
|
+
hostPeriods,
|
|
765
|
+
PARTIAL_NOTE_OFF,
|
|
766
|
+
PARTIAL_NOTE_OFF_FRAME,
|
|
767
|
+
partialNoteWarning,
|
|
768
|
+
LABELS_ONLY,
|
|
769
|
+
hiddenTotalFoldWarnings,
|
|
615
770
|
dimswitchRowId,
|
|
771
|
+
currentDimSwitchOptions,
|
|
616
772
|
compileDimSwitch,
|
|
617
773
|
foreignRowId
|
|
618
774
|
};
|