boardplot 0.56.0 → 0.57.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 +110 -0
- package/README.md +3 -3
- package/dist/{ReaderBox-GLCKYXBU.js → ReaderBox-GCIITQCX.js} +4 -4
- package/dist/{annotateEngine-QVNAE3EH.js → annotateEngine-JMZI6QEG.js} +1 -1
- package/dist/build-identity.json +3 -3
- package/dist/{chunk-CKGSGRP7.js → chunk-26WNBTWB.js} +20 -4
- package/dist/{chunk-UBCVBBJJ.js → chunk-2AJWRVZ2.js} +4 -3
- package/dist/{chunk-XMP2DNLI.js → chunk-2BHLRHF2.js} +2 -2
- package/dist/{chunk-2NRHD2G7.js → chunk-2HD5RY2U.js} +11 -3
- package/dist/{chunk-6QDMRPXI.js → chunk-2I76VFMZ.js} +184 -239
- package/dist/{chunk-XC5IRUEL.js → chunk-2KCK63DD.js} +2 -2
- package/dist/{chunk-ZEYBI47P.js → chunk-2WTD3GCR.js} +11 -3
- package/dist/{chunk-BTDGWHGJ.js → chunk-2X6XY4K4.js} +4 -4
- package/dist/{chunk-5S3JQ5AT.js → chunk-3DUGZ7ML.js} +149 -118
- package/dist/{chunk-JTFKRDDA.js → chunk-3LNVEE5Z.js} +1 -1
- package/dist/{chunk-JCAGVAB3.js → chunk-43PCSBVQ.js} +563 -10
- package/dist/{chunk-F2EVCJ4U.js → chunk-4JNHF6JW.js} +10 -10
- package/dist/{chunk-ECBUFKCP.js → chunk-4RN4OM6I.js} +3 -3
- package/dist/{chunk-A2GAWGVJ.js → chunk-4U2WSW6F.js} +20 -20
- package/dist/{chunk-CCDXK5NA.js → chunk-53OEKS4L.js} +5 -3
- package/dist/{chunk-YPYD6OJ3.js → chunk-54HEIM2A.js} +2 -2
- package/dist/{chunk-IGJ2G5C6.js → chunk-5H4HFRDO.js} +6 -6
- package/dist/{chunk-EMFUZKYK.js → chunk-5HTGSB6Y.js} +3 -3
- package/dist/{chunk-WXJ5MHLH.js → chunk-5JTRCSBN.js} +1 -1
- package/dist/{chunk-67QSW5RW.js → chunk-5P4MXWKP.js} +3 -3
- package/dist/{chunk-EBB4PYBN.js → chunk-5RHP7YTL.js} +5 -5
- package/dist/{chunk-VVXKFU72.js → chunk-5TUDYKNL.js} +35 -27
- package/dist/{chunk-HZUAEMN5.js → chunk-5WSIH4SR.js} +1 -1
- package/dist/{chunk-KF7HD3EH.js → chunk-62JZL6FW.js} +43 -35
- package/dist/{chunk-S7NRL66K.js → chunk-6EE6XEMA.js} +4 -4
- package/dist/chunk-6JXBLQJ2.js +32 -0
- package/dist/{chunk-KBJMLXNW.js → chunk-6KHRMK3I.js} +14 -14
- package/dist/{chunk-2DOEZ5QY.js → chunk-6LQKU6YN.js} +4 -4
- package/dist/chunk-6VU2XI3W.js +89 -0
- package/dist/{chunk-DQ7YMQVX.js → chunk-6WJOHZPW.js} +5 -5
- package/dist/{chunk-ZMPH2OC4.js → chunk-6XU5XGYV.js} +7 -8
- package/dist/{chunk-MAFPVR4G.js → chunk-6ZN2XJFI.js} +10 -5
- package/dist/{chunk-PQLAZEQV.js → chunk-72OJBDRB.js} +204 -59
- package/dist/{chunk-T2YDWT54.js → chunk-73O6AOAA.js} +43 -30
- package/dist/{chunk-4JHMCXOB.js → chunk-76UL4CT4.js} +60 -24
- package/dist/chunk-7BQK2UDV.js +13 -0
- package/dist/{chunk-7PPMT5EJ.js → chunk-7EQU2TUN.js} +300 -64
- package/dist/{chunk-2HTYGMMG.js → chunk-7FAO4ICF.js} +2 -2
- package/dist/{chunk-6WHWXCHJ.js → chunk-7MYJUJZV.js} +6 -2
- package/dist/{chunk-CB4CERXZ.js → chunk-7P7D6WXR.js} +11 -2
- package/dist/{chunk-RT66UTLJ.js → chunk-A33MFWHW.js} +2 -2
- package/dist/{chunk-4JC3SE4G.js → chunk-A6XCVOC5.js} +1 -1
- package/dist/{chunk-QWCLWFKC.js → chunk-AFA32LHN.js} +132 -36
- package/dist/{chunk-T2CYNDYU.js → chunk-AFGQXMKT.js} +235 -80
- package/dist/{chunk-HOU2MZHC.js → chunk-AKJO6N4K.js} +2 -2
- package/dist/{chunk-MRAP2UVV.js → chunk-ANNQJWDX.js} +10 -10
- package/dist/{chunk-LGNJCPFP.js → chunk-AOIZJ7GR.js} +7 -7
- package/dist/chunk-B5A7X2BA.js +44 -0
- package/dist/{chunk-SS4YGK3E.js → chunk-BDCKHLUB.js} +15 -15
- package/dist/{chunk-XHRUXZD7.js → chunk-BFDPY7JM.js} +10 -3
- package/dist/{chunk-BK6P6KMW.js → chunk-BM2A3IGQ.js} +1 -1
- package/dist/{chunk-GQT2SY2S.js → chunk-BO5EJBLH.js} +247 -127
- package/dist/chunk-BQIADGJB.js +23 -0
- package/dist/{chunk-PJBEJR2U.js → chunk-BY5JGQFZ.js} +24 -7
- package/dist/{chunk-SXD3OYAR.js → chunk-C5SQEYTQ.js} +76 -55
- package/dist/{chunk-3465633G.js → chunk-CEMXGMQN.js} +2 -2
- package/dist/{chunk-AMR4SUAN.js → chunk-CIDOL4FO.js} +5 -5
- package/dist/{chunk-E7V3OHQQ.js → chunk-CT4RFZO4.js} +6 -6
- package/dist/{chunk-7Q37C6GZ.js → chunk-CV3NC75L.js} +1 -1
- package/dist/{chunk-FFJGC2DX.js → chunk-D3PQAVFW.js} +22 -12
- package/dist/{chunk-52WNCUIN.js → chunk-D5G67OER.js} +1 -1
- package/dist/{chunk-MOS6WFWM.js → chunk-D5RAVZ5C.js} +6 -7
- package/dist/{chunk-FNRPQIQE.js → chunk-DJBMA4FW.js} +4 -4
- package/dist/{chunk-4DZFR52I.js → chunk-DPUCT567.js} +2 -2
- package/dist/{chunk-TE4M52AA.js → chunk-DYSEZVIJ.js} +18 -2
- package/dist/{chunk-SA46CNMS.js → chunk-ED7GLWTF.js} +4 -1
- package/dist/{chunk-R5MEBBAA.js → chunk-EDBUVDRI.js} +117 -67
- package/dist/{chunk-TUW5IYGA.js → chunk-EEBMK6T6.js} +6 -6
- package/dist/{chunk-RLMC5CUP.js → chunk-EEL2N4Y6.js} +7 -8
- package/dist/{chunk-CF4NMRN7.js → chunk-EFKFZNQC.js} +24 -18
- package/dist/{chunk-UPTXFTKH.js → chunk-EHNGPUTO.js} +6 -6
- package/dist/{chunk-BISJK67O.js → chunk-EHQLLZCQ.js} +48 -21
- package/dist/{chunk-U3A6FMSI.js → chunk-EWR6WVOV.js} +6 -6
- package/dist/{chunk-RMC4OONA.js → chunk-EY4OA4OF.js} +985 -663
- package/dist/{chunk-YYJORENB.js → chunk-F4JAGDPD.js} +5 -5
- package/dist/{chunk-ZY72LSQK.js → chunk-FAFUMSPR.js} +33 -24
- package/dist/{chunk-CYKXROFG.js → chunk-FERP4WS3.js} +19 -9
- package/dist/{chunk-N5HN5QGH.js → chunk-FF7MV4D4.js} +1 -1
- package/dist/{chunk-O7REHICC.js → chunk-FJKFYQ5I.js} +10 -10
- package/dist/chunk-FL3FQ2YA.js +27 -0
- package/dist/{chunk-YOOHNQ3L.js → chunk-FX5VZK5F.js} +4 -0
- package/dist/{chunk-7M2GK7XQ.js → chunk-G5BUGYIL.js} +68 -16
- package/dist/{chunk-QZIHKQRH.js → chunk-G5CELEUR.js} +6 -6
- package/dist/{chunk-ZJFJ2IKQ.js → chunk-GADI2DU7.js} +11 -10
- package/dist/{chunk-F6OLHND5.js → chunk-GAFEN3H7.js} +2 -2
- package/dist/{chunk-GM3EGUYW.js → chunk-GHFTKVJN.js} +1 -1
- package/dist/chunk-GKDUIDU6.js +138 -0
- package/dist/{chunk-OJ5CQV7H.js → chunk-GKQLKUMF.js} +186 -82
- package/dist/{chunk-EGGDPDYJ.js → chunk-GS5UG6QD.js} +1 -1
- package/dist/{chunk-5TWY3ZIC.js → chunk-H2POQ4LB.js} +5 -5
- package/dist/{chunk-KD5GOR2K.js → chunk-H3EWFSWI.js} +93 -52
- package/dist/{chunk-CHAS5A5B.js → chunk-H6EJ63QN.js} +18 -16
- package/dist/{chunk-GIHH6VC2.js → chunk-HB3TH7GY.js} +3 -3
- package/dist/{chunk-FMDNJ6PC.js → chunk-HC6WHTBX.js} +2 -2
- package/dist/{chunk-63Y3ROZ7.js → chunk-HDSHS2QZ.js} +45 -30
- package/dist/{chunk-KTHFHD6C.js → chunk-HFFKN7PA.js} +11 -6
- package/dist/{chunk-QSMGZOT5.js → chunk-HGPFEG2L.js} +7 -8
- package/dist/{chunk-2YO4WRJN.js → chunk-HVX2E26J.js} +35 -25
- package/dist/{chunk-KLB2QC24.js → chunk-I3DLERI7.js} +1 -1
- package/dist/{chunk-SPSGUFTI.js → chunk-I4NUYVP5.js} +1 -1
- package/dist/{chunk-LKMFMNQX.js → chunk-I5ZADE2U.js} +1 -1
- package/dist/{chunk-CPGASWNN.js → chunk-I65OLJ2X.js} +1 -1
- package/dist/{chunk-SRAV6FPB.js → chunk-I6QGYRY4.js} +3 -3
- package/dist/{chunk-NCLRZQR6.js → chunk-I7KDPCC7.js} +3 -3
- package/dist/{chunk-6EYTD777.js → chunk-IFURKTOL.js} +2 -2
- package/dist/{chunk-Y54LU4CU.js → chunk-IPWUBZ4P.js} +1 -1
- package/dist/{chunk-BIGQKCU7.js → chunk-IRXTNSZL.js} +9 -9
- package/dist/{chunk-2FKEF2AC.js → chunk-IUVJVMKS.js} +11 -11
- package/dist/{chunk-ZKJ5L35C.js → chunk-IVQT2E3Y.js} +28 -17
- package/dist/{chunk-7DAH2E4T.js → chunk-IW3YUMPI.js} +2 -2
- package/dist/chunk-IXM6BAM4.js +53 -0
- package/dist/{chunk-YMTXTQCN.js → chunk-IZRTNCJQ.js} +5 -5
- package/dist/{chunk-QGFKSDQO.js → chunk-J22ETKDJ.js} +2 -2
- package/dist/{chunk-HJRNBKIT.js → chunk-JARJP576.js} +3 -3
- package/dist/{chunk-DD6RVD3S.js → chunk-JHWDTV4K.js} +5 -1
- package/dist/{chunk-P4SMC4BY.js → chunk-JIH52I36.js} +79 -79
- package/dist/{chunk-KQCKK3LD.js → chunk-JKXJWCJ5.js} +69 -34
- package/dist/{chunk-WI5VOSQX.js → chunk-JMOBA5ES.js} +2 -2
- package/dist/{chunk-AGDDH6XY.js → chunk-JMXNXLAC.js} +5 -1
- package/dist/{chunk-R2IKOLBK.js → chunk-JRRSKCGG.js} +3 -3
- package/dist/{chunk-IVRYF7QA.js → chunk-JSA3ESEJ.js} +1 -1
- package/dist/{chunk-WBETBGSC.js → chunk-K6Y4HBK7.js} +31 -31
- package/dist/{chunk-Z55DXFWS.js → chunk-KAAB2DIV.js} +23 -13
- package/dist/{chunk-UZLR25BW.js → chunk-KF3ZHLHQ.js} +7 -8
- package/dist/{chunk-GELSK76Y.js → chunk-KGS5Z7SL.js} +3 -3
- package/dist/{chunk-E2ZUBP4Q.js → chunk-KIXNHDXS.js} +7 -8
- package/dist/{chunk-7VMEM3LN.js → chunk-KJLH5EHD.js} +26 -26
- package/dist/{chunk-KLIZXSBK.js → chunk-KLQKHA3T.js} +6 -6
- package/dist/chunk-KQ2WZ6BY.js +11 -0
- package/dist/{chunk-DF3XEFQ7.js → chunk-KUMJI5B6.js} +10 -10
- package/dist/{chunk-SE7MJ2LQ.js → chunk-L2XRUG4P.js} +7 -8
- package/dist/{chunk-JYBT2JNY.js → chunk-LE3LSEUL.js} +27 -2
- package/dist/{chunk-75WIUG2W.js → chunk-LFX5BERN.js} +140 -60
- package/dist/{chunk-MJPXHCBW.js → chunk-LGMV7ZV4.js} +4 -4
- package/dist/{chunk-3V62N3Z7.js → chunk-LO3AGGE3.js} +7 -8
- package/dist/{chunk-7KSUMFBK.js → chunk-LSKCKGCF.js} +5 -1
- package/dist/{chunk-NHC2ADGI.js → chunk-LSR3SBJ4.js} +45 -34
- package/dist/{chunk-V634AXDM.js → chunk-LUZ7HXBT.js} +1 -1
- package/dist/{chunk-5PPQIF4D.js → chunk-LW4ZQGVL.js} +2 -2
- package/dist/{chunk-H3IBJQ5A.js → chunk-M2OQK2FO.js} +1 -1
- package/dist/{chunk-4LTN7SND.js → chunk-M74H7QYD.js} +1 -1
- package/dist/{chunk-TXBO2LWM.js → chunk-MOQFYJ3F.js} +6 -6
- package/dist/{chunk-VPL3JYC6.js → chunk-MQ5EKWIG.js} +51 -9
- package/dist/{chunk-X3KCQEYZ.js → chunk-MTCDGSYW.js} +9 -1
- package/dist/{chunk-FCECYJVA.js → chunk-NCCDEUHD.js} +1 -1
- package/dist/{chunk-IGVAWAOK.js → chunk-NIDH22DI.js} +31 -7
- package/dist/{chunk-5DTCOOLU.js → chunk-NINK4G7U.js} +2 -2
- package/dist/{chunk-HHXIVFAU.js → chunk-NO7GRVUU.js} +10 -8
- package/dist/{chunk-X23SZHV5.js → chunk-NRYERHEI.js} +6 -6
- package/dist/{chunk-V5JQQMFQ.js → chunk-O4D27FKH.js} +1 -1
- package/dist/{chunk-I7H5DU34.js → chunk-O7Y6RJ4D.js} +21 -9
- package/dist/{chunk-2NN676RI.js → chunk-OAT6FWKL.js} +7 -8
- package/dist/{chunk-JHWYG7V5.js → chunk-OF7FMGH5.js} +6 -6
- package/dist/{chunk-GLQ3KCTY.js → chunk-OKM5LYYP.js} +7 -8
- package/dist/{chunk-JCIXYOND.js → chunk-OTGNVAI4.js} +2 -2
- package/dist/{chunk-EIL3KHAL.js → chunk-PSYPB22T.js} +3 -3
- package/dist/{chunk-JXBZIJCG.js → chunk-PYGEIPPH.js} +1 -1
- package/dist/{chunk-KZJ5VM6E.js → chunk-PZ3TQFSY.js} +15 -1
- package/dist/{chunk-K3VZ5QJK.js → chunk-Q7VPTN5X.js} +4 -4
- package/dist/{chunk-ZVM5TFGR.js → chunk-QFIRPOXR.js} +6 -2
- package/dist/{chunk-YHD2FZFP.js → chunk-QHPJ5ZKS.js} +6 -6
- package/dist/{chunk-QLANK3VN.js → chunk-QLWUFEKR.js} +6 -6
- package/dist/{chunk-64LJDGJH.js → chunk-QNLESRH6.js} +3 -1
- package/dist/{chunk-RJGCYGC3.js → chunk-QRZESG66.js} +38 -27
- package/dist/{chunk-76Q7E3TM.js → chunk-QYOZ46ZQ.js} +70 -23
- package/dist/{chunk-E555EDOQ.js → chunk-QZMLSK43.js} +221 -62
- package/dist/{chunk-NGA7ICG4.js → chunk-RDJ3ZU6O.js} +16 -13
- package/dist/{chunk-6MJUW5R5.js → chunk-RHBQ2Q5H.js} +95 -44
- package/dist/{chunk-ZYQYX66L.js → chunk-RHVP62HI.js} +6 -6
- package/dist/{chunk-F5BYLT3M.js → chunk-RMVCKO6N.js} +13 -11
- package/dist/chunk-RRPTQGRU.js +47 -0
- package/dist/{chunk-IRXVV65V.js → chunk-S2TSXUYP.js} +6 -6
- package/dist/{chunk-OG2YUVBW.js → chunk-SD6ENKTO.js} +7 -2
- package/dist/{chunk-6AMN7IKJ.js → chunk-SHAAMKN7.js} +43 -22
- package/dist/{chunk-DLUNQHFO.js → chunk-SHCW2TCA.js} +9 -9
- package/dist/{chunk-54ROMBU7.js → chunk-SSZB3VXG.js} +17 -17
- package/dist/chunk-SXAZDIGM.js +84 -0
- package/dist/{chunk-QHRE2M6V.js → chunk-T2L5H2WW.js} +4 -3
- package/dist/{chunk-RPIKNMZA.js → chunk-T3WCDDIL.js} +7 -2
- package/dist/{chunk-JIEVDGAF.js → chunk-T5MBORBK.js} +1 -1
- package/dist/{chunk-32LLDRPI.js → chunk-TDDSWNGD.js} +23 -15
- package/dist/{chunk-7VVHTOE7.js → chunk-TGR6PRKG.js} +2 -2
- package/dist/{chunk-QJWLNP64.js → chunk-TKERVBJ3.js} +7 -8
- package/dist/{chunk-43GGVT7W.js → chunk-TMXRTYGT.js} +10 -4
- package/dist/{chunk-BIVL764T.js → chunk-TQ5HHNM3.js} +2 -2
- package/dist/{chunk-WN3HEU3P.js → chunk-TWRFVW3J.js} +4 -2
- package/dist/{chunk-7FKY6YWU.js → chunk-TXMS7QUJ.js} +3 -3
- package/dist/{chunk-O6ZTIDWB.js → chunk-UBXIGE2P.js} +3 -2
- package/dist/{chunk-JTC5SEAQ.js → chunk-UCIAHSJK.js} +2 -2
- package/dist/{chunk-BVYIKLQ5.js → chunk-UD6U4EF5.js} +1 -1
- package/dist/{chunk-DMAMWUYY.js → chunk-UFZXZJJG.js} +5 -5
- package/dist/{chunk-SNQ7D5R7.js → chunk-UIHGGWES.js} +51 -11
- package/dist/{chunk-27OIGDRK.js → chunk-UP4JSNDR.js} +1 -1
- package/dist/{chunk-JEUL777U.js → chunk-USFIDSTO.js} +7 -5
- package/dist/{chunk-PZ46S2SY.js → chunk-V3UE3TB7.js} +2 -2
- package/dist/{chunk-KDSYZLF6.js → chunk-V5IFI3FV.js} +8 -1
- package/dist/{chunk-BSATR6ZO.js → chunk-V62B23VC.js} +13 -1
- package/dist/{chunk-WWGPTEQB.js → chunk-VFLMBA2M.js} +66 -16
- package/dist/{chunk-5P2TTHBZ.js → chunk-VM5CQ7CG.js} +2 -2
- package/dist/{chunk-UREXN6WG.js → chunk-VMGTNB6H.js} +6 -6
- package/dist/{chunk-2NSQIPAA.js → chunk-VT7PBGL2.js} +6 -6
- package/dist/{chunk-CXETOLPX.js → chunk-VY2NPB2Q.js} +1 -1
- package/dist/{chunk-F77TMAUY.js → chunk-VY67Q6CJ.js} +18 -18
- package/dist/{chunk-7STMIK2X.js → chunk-W5SVS4B6.js} +2 -2
- package/dist/{chunk-MD6DCQMA.js → chunk-W7Q6PLT4.js} +37 -37
- package/dist/{chunk-JVZTKQFS.js → chunk-WDAZ2MT4.js} +8 -4
- package/dist/{chunk-MZACASZY.js → chunk-WE5WVQE4.js} +13 -1
- package/dist/chunk-WJQX7HBH.js +54 -0
- package/dist/{chunk-MS7O3KDJ.js → chunk-WKWCNS6K.js} +6 -6
- package/dist/{chunk-4KQHKPB3.js → chunk-WSKZZ2ZB.js} +11 -12
- package/dist/{chunk-SMHZXHHD.js → chunk-WZB6R2ZX.js} +6 -4
- package/dist/{chunk-37PKNVLS.js → chunk-X5OVVMZX.js} +1 -1
- package/dist/{chunk-MPO5TVGF.js → chunk-XFCBH3TI.js} +3 -3
- package/dist/{chunk-CAJ54IEP.js → chunk-XJUZC53Y.js} +1 -1
- package/dist/chunk-XN7JDII2.js +2047 -0
- package/dist/{chunk-4KMZAK6J.js → chunk-XNV7VOIT.js} +4 -4
- package/dist/{chunk-YK2KWNTU.js → chunk-XR7VOF2V.js} +9 -7
- package/dist/{chunk-WTQAG2OT.js → chunk-XYUXB5VK.js} +8 -3
- package/dist/{chunk-QB5HV4IY.js → chunk-Y5IKCXQR.js} +7 -8
- package/dist/{chunk-FNMH5WEY.js → chunk-Y5WHM2Q5.js} +1 -1
- package/dist/{chunk-IGNBQT23.js → chunk-Y7Q3VEYC.js} +96 -5
- package/dist/{chunk-L6YVK6VC.js → chunk-YB6QGOCO.js} +1 -1
- package/dist/{chunk-BYCJ6TKI.js → chunk-YBYV56FS.js} +3 -3
- package/dist/{chunk-DLDDRXAI.js → chunk-YCUNFAEE.js} +77 -37
- package/dist/{chunk-V7F4F6JA.js → chunk-YFI5PN5O.js} +5 -7
- package/dist/{chunk-ZL6IHMOW.js → chunk-YGPLUENN.js} +88 -58
- package/dist/chunk-YGZEG3JV.js +123 -0
- package/dist/{chunk-JGFHNAHS.js → chunk-YJGFT63R.js} +8 -3
- package/dist/{chunk-XQMYQ4TN.js → chunk-YNHPPZ7S.js} +1 -1
- package/dist/{chunk-EZZ533MH.js → chunk-YO5UKKCQ.js} +1 -1
- package/dist/{chunk-YZZLIYPA.js → chunk-YTEJYLU7.js} +5 -1
- package/dist/{chunk-CCJP6QZO.js → chunk-Z257SH5U.js} +1 -1
- package/dist/{chunk-ETMHDCEH.js → chunk-Z2BDTZDT.js} +13 -11
- package/dist/{chunk-MOK3ZS6P.js → chunk-ZDD3MJ2H.js} +1 -1
- package/dist/{chunk-6364WO5D.js → chunk-ZNX5J7D7.js} +2 -2
- package/dist/{chunk-UZTQUPTB.js → chunk-ZSYU6LIH.js} +4 -4
- package/dist/{chunk-JFFREZGT.js → chunk-ZTSJ7NY6.js} +6 -2
- package/dist/chunk-ZV3SNRJI.js +122 -0
- package/dist/cli/index.js +1 -1
- package/dist/{core-MU4ALRR7.js → core-4M4RY7MX.js} +4 -1
- package/dist/{core-XW7UJFJZ.js → core-4PW4MXWR.js} +4 -1
- package/dist/{core-LB5M7XL4.js → core-5S5CJHBG.js} +5 -1
- package/dist/{core-LGJZUP6H.js → core-7TTM4KRP.js} +6 -1
- package/dist/{core-GSILPKUR.js → core-7XKNJM7Y.js} +4 -1
- package/dist/{core-JDFUZFRH.js → core-A7HXVSKB.js} +5 -1
- package/dist/{core-K3JX5WPM.js → core-AMWCZTOT.js} +2 -1
- package/dist/{core-BLHEJ5OK.js → core-AVA4XLQ2.js} +4 -1
- package/dist/{core-ILPXXC2Z.js → core-BJZEJ63L.js} +5 -1
- package/dist/{core-3KLQSYWB.js → core-CCB3IXGD.js} +4 -1
- package/dist/{core-BBNY2BX4.js → core-D2OIGYC7.js} +2 -1
- package/dist/{core-4RR6VSXM.js → core-DMDAXVMY.js} +3 -1
- package/dist/{core-HDNWVLJW.js → core-EMSJRGSE.js} +4 -1
- package/dist/{core-A5AKUB7H.js → core-FCSA74RT.js} +2 -1
- package/dist/{core-WZ4CHVYL.js → core-FTQBESDS.js} +3 -1
- package/dist/{core-G3LXHW73.js → core-GS4DXDDG.js} +4 -1
- package/dist/{core-H5HO2CED.js → core-JDZDBTID.js} +2 -1
- package/dist/{core-VKZSQFRG.js → core-L3UR75IJ.js} +2 -1
- package/dist/{core-AR2T32Y3.js → core-MAW4S3KA.js} +4 -1
- package/dist/{core-4HFVG4CP.js → core-N2JEWJ7D.js} +3 -1
- package/dist/{core-BOG33BFD.js → core-OBPTBKX6.js} +4 -1
- package/dist/{core-HTD5RHE7.js → core-OFPPRHYY.js} +5 -1
- package/dist/{core-ZLSQHZ3I.js → core-QFAVWFI3.js} +4 -1
- package/dist/{core-TCSW24N6.js → core-QM34237W.js} +4 -1
- package/dist/{core-WJNK7F2J.js → core-SKMHEA4Y.js} +5 -1
- package/dist/{core-7S3XMW5O.js → core-T3OSZOVV.js} +2 -1
- package/dist/{core-7Y5BZZON.js → core-UNX4ZV4M.js} +4 -1
- package/dist/{core-DFZMOO7E.js → core-VRVL6LIM.js} +5 -1
- package/dist/{core-J2JD5ODO.js → core-VT35VDVS.js} +4 -1
- package/dist/{core-TKZZZ6UW.js → core-VWYXK2R3.js} +4 -1
- package/dist/{core-E2XOSHPR.js → core-WNT6ZMRO.js} +5 -1
- package/dist/{core-RR2CAZC5.js → core-WP73P4CW.js} +4 -1
- package/dist/{core-DD62MWEW.js → core-WPEYRK6Y.js} +2 -1
- package/dist/{core-YMXYUGF5.js → core-WXZJ7V7S.js} +2 -1
- package/dist/{core-5UF44NDI.js → core-XKXDXALI.js} +3 -1
- package/dist/{core-GLOZY6Z7.js → core-ZACFV6XR.js} +2 -1
- package/dist/{core-QPSAYRFT.js → core-ZSERZGK6.js} +5 -1
- package/dist/{dataTable-CNDRVGA5.js → dataTable-7IO546LM.js} +10 -2
- package/dist/{engine-FVEIM3WV.js → engine-US3N6UCH.js} +17 -9
- package/dist/fixtures.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 +31 -19
- package/dist/{main-THU6VIVU.js → main-2UWKGUHR.js} +27 -13
- package/dist/mcp/server.js +23 -13
- package/dist/react/bar.js +6 -1
- package/dist/react/bartable.js +8 -1
- package/dist/react/box.js +6 -1
- package/dist/react/bullet.js +7 -1
- package/dist/react/butterfly.js +6 -1
- package/dist/react/choropleth.js +8 -1
- package/dist/react/cohort.js +9 -1
- package/dist/react/column.js +6 -1
- package/dist/react/combo.js +6 -1
- package/dist/react/creative.js +8 -1
- package/dist/react/diagram.js +8 -1
- package/dist/react/dimswitch.js +6 -1
- package/dist/react/dot.js +6 -1
- package/dist/react/export.js +25 -18
- package/dist/react/funnel.js +6 -1
- package/dist/react/gantt.js +7 -1
- package/dist/react/grid.js +5 -1
- package/dist/react/heatmap.js +7 -1
- package/dist/react/histogram.js +6 -1
- package/dist/react/index.js +93 -84
- package/dist/react/kpi.js +7 -1
- package/dist/react/likert.js +6 -1
- package/dist/react/line.js +6 -1
- package/dist/react/mekko.js +6 -1
- package/dist/react/pareto.js +6 -1
- package/dist/react/pie.js +6 -1
- package/dist/react/prepare.js +35 -20
- package/dist/react/pvm.js +7 -1
- package/dist/react/pyramid.js +6 -1
- package/dist/react/sankey.js +8 -1
- package/dist/react/scatter.js +6 -1
- package/dist/react/slope.js +7 -1
- package/dist/react/sparkline.js +7 -1
- package/dist/react/spec.js +17 -11
- package/dist/react/status.js +7 -1
- package/dist/react/story.js +4 -2
- package/dist/react/table.js +6 -1
- package/dist/react/theme.js +8 -3
- package/dist/react/tilemap.js +7 -1
- package/dist/react/treemap.js +7 -1
- package/dist/react/variance.js +6 -1
- package/dist/react/waffle.js +7 -1
- package/dist/react/waterfall.js +7 -1
- package/dist/rows.js +3 -2
- package/dist/{rowsModule-LI6KOS46.js → rowsModule-DYDVHBAX.js} +2 -1
- package/dist/{schema-ZQSIR5UC.js → schema-3KMU5737.js} +1 -1
- package/dist/{schema-YLE4XXQQ.js → schema-4JRNXEZF.js} +3 -1
- package/dist/{schema-KPEPBGAX.js → schema-626QXX4G.js} +3 -1
- package/dist/{schema-72EEMYS3.js → schema-6PL46VXZ.js} +3 -1
- package/dist/{schema-JH57NFXJ.js → schema-6V5K3J2V.js} +4 -1
- package/dist/{schema-H2EC4GAQ.js → schema-A2XUZUCV.js} +3 -1
- package/dist/{schema-QPOBZUAR.js → schema-CNJ4Y6CT.js} +3 -1
- package/dist/{schema-5KDEQBBT.js → schema-DHMMGDTI.js} +3 -1
- package/dist/{schema-BKUFZLLI.js → schema-F2Q6MH7W.js} +3 -1
- package/dist/{schema-PL3EU6EQ.js → schema-FC6J6KZC.js} +5 -1
- package/dist/{schema-AXRDF6ND.js → schema-FGE5YK3S.js} +3 -1
- package/dist/{schema-5DUTAVO7.js → schema-FSYDLMGD.js} +1 -1
- package/dist/{schema-PQZWO3BP.js → schema-G5KSSI5W.js} +1 -1
- package/dist/{schema-25INXAMY.js → schema-GXOG4MXL.js} +1 -1
- package/dist/{schema-AMT7P7KB.js → schema-HEB6ZDI5.js} +3 -1
- package/dist/{schema-HH5HOORE.js → schema-I44IDRGD.js} +1 -1
- package/dist/{schema-VYECMPON.js → schema-IFTIMTS3.js} +1 -1
- package/dist/{schema-QCIE6M2P.js → schema-IUY7VYHJ.js} +3 -1
- package/dist/{schema-M5JBHQIV.js → schema-J4HCSD5C.js} +5 -2
- package/dist/{schema-B2GCEYXD.js → schema-JCU6LTYD.js} +1 -1
- package/dist/{schema-FDFQKIO5.js → schema-JJWORI7D.js} +3 -1
- package/dist/{schema-GNTKL5DN.js → schema-K4V4PYBO.js} +3 -1
- package/dist/{schema-L5U4OROI.js → schema-LGLQBRC4.js} +3 -1
- package/dist/{schema-THXXFY6I.js → schema-MD22QYZU.js} +1 -1
- package/dist/{schema-7NSV542V.js → schema-MGETMQYC.js} +3 -1
- package/dist/{schema-ZG6ZKFRZ.js → schema-MQB6CE5V.js} +3 -1
- package/dist/{schema-OU35XA3Z.js → schema-NMIYKGHE.js} +3 -1
- package/dist/{schema-5ZTGVQAJ.js → schema-NOBNFD2F.js} +3 -1
- package/dist/{schema-MMVPMJEF.js → schema-OXO2XY4Y.js} +1 -1
- package/dist/{schema-LOQ3AFC7.js → schema-PHIHMDVB.js} +1 -1
- package/dist/{schema-ZEVJMFLV.js → schema-UXWKA3PI.js} +3 -1
- package/dist/{schema-GN6GAIU5.js → schema-WBOPCTPC.js} +1 -1
- package/dist/{schema-BBTXTWYI.js → schema-WFGDVBJK.js} +1 -1
- package/dist/{schema-J7TNCZIP.js → schema-WX2RS4OU.js} +3 -1
- package/dist/{schema-QORUB6EK.js → schema-XIHAKX3B.js} +18 -1
- package/dist/{schema-R5Y6NVBH.js → schema-XRSORYBI.js} +3 -1
- package/dist/{schema-CGQID64D.js → schema-YDZCGL56.js} +3 -1
- package/dist/{specValidation-VHLGDEME.js → specValidation-XGELWQUU.js} +2 -1
- package/dist/theme.js +5 -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/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 +20 -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/histogram/types.d.ts +8 -0
- package/dist/types/core/charts/likert/layout.d.ts +10 -8
- package/dist/types/core/charts/pvm/types.d.ts +9 -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/status/layout.d.ts +3 -0
- package/dist/types/core/charts/table/resolve.d.ts +14 -0
- package/dist/types/core/footer.d.ts +2 -0
- package/dist/types/core/formatSpec.d.ts +10 -0
- package/dist/types/core/frame.d.ts +1 -1
- package/dist/types/core/geo/types.d.ts +2 -0
- package/dist/types/core/geometry.d.ts +1 -1
- package/dist/types/core/normalize/shared.d.ts +2 -0
- package/dist/types/core/registry.d.ts +4 -5
- package/dist/types/core/request.d.ts +6 -0
- package/dist/types/core/schema/capability.d.ts +20 -7
- package/dist/types/core/schema/generatedColumns.d.ts +168 -0
- package/dist/types/core/text.d.ts +16 -0
- package/dist/types/core/themeGeometry.d.ts +9 -0
- package/dist/types/core/timeAxis.d.ts +6 -1
- package/dist/types/core/types/diagram.d.ts +7 -0
- package/dist/types/core/types/options.d.ts +83 -12
- package/dist/types/core/types/table.d.ts +21 -3
- package/dist/types/index.d.ts +2 -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 +15 -5
- package/docs/manual.md +31 -3
- package/docs/reference/bar.md +3 -0
- package/docs/reference/bartable.md +16 -1
- package/docs/reference/box.md +8 -1
- package/docs/reference/bullet.md +12 -1
- package/docs/reference/butterfly.md +7 -1
- package/docs/reference/choropleth.md +14 -1
- package/docs/reference/cohort.md +25 -5
- package/docs/reference/column.md +1 -0
- package/docs/reference/combo.md +1 -0
- package/docs/reference/creative.md +13 -0
- package/docs/reference/diagram.md +5 -0
- package/docs/reference/dimswitch.md +50 -32
- package/docs/reference/dot.md +7 -2
- package/docs/reference/fixtures.md +57 -0
- package/docs/reference/funnel.md +5 -0
- package/docs/reference/gantt.md +10 -2
- package/docs/reference/grid.md +9 -2
- package/docs/reference/heatmap.md +6 -0
- package/docs/reference/histogram.md +2 -2
- package/docs/reference/kpi.md +5 -1
- package/docs/reference/likert.md +8 -0
- package/docs/reference/options.md +4 -3
- package/docs/reference/pareto.md +1 -1
- package/docs/reference/pvm.md +7 -1
- package/docs/reference/pyramid.md +6 -0
- package/docs/reference/react.md +1 -2
- package/docs/reference/sankey.md +6 -2
- package/docs/reference/slope.md +6 -0
- package/docs/reference/sparkline.md +1 -1
- package/docs/reference/status.md +7 -1
- package/docs/reference/table.md +16 -4
- package/docs/reference/tilemap.md +1 -1
- package/docs/reference/treemap.md +1 -1
- package/docs/reference/waffle.md +1 -1
- package/docs/reference/waterfall.md +4 -1
- package/package.json +1 -1
- package/dist/chunk-FG5L2LUK.js +0 -89
- package/dist/chunk-IFQN4GKK.js +0 -1852
- package/dist/chunk-O36WX56O.js +0 -13
- package/dist/chunk-WIVFIVFZ.js +0 -27
- package/dist/chunk-ZWNRLIFT.js +0 -24
|
@@ -2,64 +2,121 @@ import {
|
|
|
2
2
|
ENGINE_NOTES,
|
|
3
3
|
LABEL_WRAP_FLOOR,
|
|
4
4
|
SOFT_LABEL_CAP
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-HVX2E26J.js";
|
|
6
6
|
import {
|
|
7
7
|
bandFor
|
|
8
8
|
} from "./chunk-263SZKIL.js";
|
|
9
|
-
import {
|
|
10
|
-
emptyIdRecord
|
|
11
|
-
} from "./chunk-LINZPU5D.js";
|
|
12
9
|
import {
|
|
13
10
|
closestKey
|
|
14
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-V62B23VC.js";
|
|
15
12
|
import {
|
|
16
13
|
EMPTY_DATA
|
|
17
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-YB6QGOCO.js";
|
|
15
|
+
import {
|
|
16
|
+
generatedIdWarnings
|
|
17
|
+
} from "./chunk-SXAZDIGM.js";
|
|
18
18
|
import {
|
|
19
19
|
cappedItems,
|
|
20
20
|
cleanDiff,
|
|
21
21
|
cleanSum,
|
|
22
22
|
saysToDate
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-WSKZZ2ZB.js";
|
|
24
24
|
import {
|
|
25
|
+
defaultNotePlacement,
|
|
25
26
|
disclosureNote,
|
|
26
27
|
disclosuresShown,
|
|
27
|
-
engineNote
|
|
28
|
-
|
|
28
|
+
engineNote,
|
|
29
|
+
shownNoteKinds
|
|
30
|
+
} from "./chunk-WZB6R2ZX.js";
|
|
31
|
+
import {
|
|
32
|
+
emptyIdRecord
|
|
33
|
+
} from "./chunk-LINZPU5D.js";
|
|
29
34
|
import {
|
|
30
35
|
AUTOMATIC_FORMAT,
|
|
36
|
+
LABEL_ONLY_ROW,
|
|
37
|
+
MAGNITUDE_FIGURES,
|
|
31
38
|
MAGNITUDE_GROUP,
|
|
32
39
|
parseFormatExample,
|
|
33
40
|
specUnitKind,
|
|
34
41
|
unitMagnitude
|
|
35
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-D3PQAVFW.js";
|
|
36
43
|
import {
|
|
37
44
|
formatAutomaticPercent,
|
|
38
45
|
formatPercentagePoints,
|
|
39
46
|
localeStrings,
|
|
40
47
|
stringFields
|
|
41
48
|
} from "./chunk-MSYTF3DZ.js";
|
|
49
|
+
import {
|
|
50
|
+
toJsonPointer
|
|
51
|
+
} from "./chunk-ZQ4VFQID.js";
|
|
42
52
|
import {
|
|
43
53
|
NormalizeError
|
|
44
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-FX5VZK5F.js";
|
|
45
55
|
import {
|
|
46
56
|
maxOf
|
|
47
57
|
} from "./chunk-WYJEOMNY.js";
|
|
48
58
|
|
|
49
59
|
// src/core/charts/dimswitch/compile.ts
|
|
50
60
|
var key = (...parts) => JSON.stringify(parts), FOLDED = /* @__PURE__ */ Symbol("dimswitchFolded");
|
|
51
|
-
function dimSwitchTableWarnings(warnings) {
|
|
61
|
+
function dimSwitchTableWarnings(warnings, overrides) {
|
|
52
62
|
return warnings.map((warning) => {
|
|
53
63
|
if (warning.code !== "table-column-clipped" && warning.code !== "table-column-widened" || warning.owner?.colId === void 0) return warning;
|
|
54
64
|
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 {
|
|
65
|
+
return overrides?.[id]?.width !== void 0 ? {
|
|
66
|
+
...warning,
|
|
67
|
+
field: ["options", "columnOverrides", id, "width"],
|
|
68
|
+
suggest: `Set options.columnOverrides.${id}.width to ${need} px or more so this column fits.`
|
|
69
|
+
} : {
|
|
56
70
|
...warning,
|
|
57
71
|
field: ["options", "widths", width],
|
|
58
72
|
suggest: `Set options.widths.${width} to ${need} px or more so this column fits.`
|
|
59
73
|
};
|
|
60
74
|
});
|
|
61
75
|
}
|
|
62
|
-
var
|
|
76
|
+
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) => ({
|
|
77
|
+
code: PARTIAL_NOTE_OFF_FRAME,
|
|
78
|
+
severity: "warn",
|
|
79
|
+
field: ["options", "columnHeads"],
|
|
80
|
+
message: `columnHeads: false removes the head that says "${note}", and the frame has no place for that note.`,
|
|
81
|
+
suggest: "Make room in options.footnotes, list note in options.notes.show, or keep the head."
|
|
82
|
+
}), printsValue = (row) => Object.values(row.cells ?? {}).some((cell2) => cell2 != null && !(typeof cell2 == "object" && cell2.missing === "blank")), LABELS_ONLY = "dimswitch-labels-only";
|
|
83
|
+
function hiddenTotalFoldWarnings(rows, collapsed, totalId) {
|
|
84
|
+
let folded = new Set(collapsed), byId = new Map(rows.map((row) => [row.id, row])), open = (row) => {
|
|
85
|
+
for (let id = row.parentId; id !== void 0; id = byId.get(id)?.parentId) if (folded.has(id)) return !1;
|
|
86
|
+
return !0;
|
|
87
|
+
};
|
|
88
|
+
return rows.some((row) => !row.inline && printsValue(row) && open(row)) ? [] : [{
|
|
89
|
+
code: LABELS_ONLY,
|
|
90
|
+
severity: "warn",
|
|
91
|
+
field: ["options", "rowVisibility", totalId],
|
|
92
|
+
message: "rowVisibility hides the Total, and no drawn row prints a value, so the table draws its labels only.",
|
|
93
|
+
suggest: "Raise options.depth or open rows in options.expansion, so that member rows print, or keep the Total."
|
|
94
|
+
}];
|
|
95
|
+
}
|
|
96
|
+
var dimswitchRowId = (variant, member, measure) => key(variant, member, ...measure ? [measure] : []);
|
|
97
|
+
function tableOptionsOf(options) {
|
|
98
|
+
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;
|
|
99
|
+
return tableOptions.columnVisibility && (tableOptions.columnVisibility = {}), tableOptions.density?.startsWith("cohort") && delete tableOptions.density, tableOptions;
|
|
100
|
+
}
|
|
101
|
+
var tableDefaults = (form, pinned) => ({
|
|
102
|
+
variant: "steering",
|
|
103
|
+
stickyLabels: pinned,
|
|
104
|
+
mountCollapsed: !1,
|
|
105
|
+
fitFormats: !0,
|
|
106
|
+
labelIndent: form.card ? { base: 12, step: 12 } : { base: 25, step: 17 },
|
|
107
|
+
...form.card ? { cellPadX: 3 } : {}
|
|
108
|
+
});
|
|
109
|
+
function currentDimSwitchOptions(compiled, options, form, effectLabel) {
|
|
110
|
+
let { inlineVisibility: _inline, expansion, ...kept } = compiled, tableOptions = tableOptionsOf(options);
|
|
111
|
+
return {
|
|
112
|
+
...tableDefaults(form, kept.stickyLabels),
|
|
113
|
+
...tableOptions,
|
|
114
|
+
...kept,
|
|
115
|
+
...effectLabel ? { inlineVisibility: { effect: !1, ...tableOptions.inlineVisibility } } : {},
|
|
116
|
+
expansion
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
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
120
|
let kind = m.format ? specUnitKind(parseFormatExample(m.format)) : m.scale === "percent" ? "percent" : void 0;
|
|
64
121
|
return (m.unit === "%" || m.unit === "pp") && (kind === "percent" || kind === "pp") ? void 0 : m.unit;
|
|
65
122
|
}, combine = (op, a, b) => op === "sub" ? cleanDiff(a, b) : op === "add" ? cleanSum([a, b]) : op === "mul" ? a * b : a / b;
|
|
@@ -140,7 +197,11 @@ function compileDimSwitch(data, options = {}, form = {}) {
|
|
|
140
197
|
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"}`);
|
|
141
198
|
let range = data.periods.find((p) => p.kind === "range"), prior = data.periods.find((p) => p.kind === "prior");
|
|
142
199
|
if (!range || !prior) throw new NormalizeError("invalid-data", "periods", "dimswitch requires one range and one prior period", "give periods exactly one period of kind range and one of kind prior");
|
|
143
|
-
let authoredPeriods = data
|
|
200
|
+
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 = () => {
|
|
201
|
+
let cells = emptyIdRecord();
|
|
202
|
+
for (let id of blockColumns) cells[id] = null;
|
|
203
|
+
return cells;
|
|
204
|
+
};
|
|
144
205
|
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");
|
|
145
206
|
for (let setting of [options.thresholds, options.thresholds?.period, options.thresholds?.prior, options.thresholds?.plan]) for (let family of ["volume", "cost", "rate", "effect"]) {
|
|
146
207
|
let pair = setting?.[family];
|
|
@@ -162,15 +223,28 @@ function compileDimSwitch(data, options = {}, form = {}) {
|
|
|
162
223
|
let m = measures.get(id);
|
|
163
224
|
if (!m) throw new NormalizeError("calc-ref-missing", "measures", `dimswitch measure '${from}' names unknown measure '${id}'; use a measures[].id.`);
|
|
164
225
|
return m;
|
|
165
|
-
}, warnings = [],
|
|
166
|
-
|
|
226
|
+
}, 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);
|
|
227
|
+
warnings.push(
|
|
228
|
+
...generatedIdWarnings("dimswitch", "columnVisibility", options.columnVisibility, [...generatedIds, ...allPeriodIds]),
|
|
229
|
+
...generatedIdWarnings("dimswitch", "columnOverrides", options.columnOverrides, ["label", ...blockColumns, ...authoredPeriods.map((p) => p.id)]),
|
|
230
|
+
...generatedIdWarnings("dimswitch", "columnOrder", options.columnOrder, ["block", "periods"])
|
|
231
|
+
), !blockColumns.length && !authoredPeriods.length && warnings.push({
|
|
232
|
+
code: "dimswitch-labels-only",
|
|
233
|
+
severity: "warn",
|
|
234
|
+
field: ["options", "columnVisibility"],
|
|
235
|
+
message: "columnVisibility leaves out every value column, so the table draws its labels only.",
|
|
236
|
+
suggest: "Keep range or one period in the table."
|
|
237
|
+
});
|
|
238
|
+
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));
|
|
239
|
+
for (let [id, entry] of encodings) if (!columnIds.includes(id)) {
|
|
167
240
|
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
241
|
warnings.push({
|
|
169
242
|
code: "dimswitch-encoding-column",
|
|
170
243
|
severity: "warn",
|
|
171
244
|
field: ["options", "encodings", id],
|
|
172
245
|
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(", ")}
|
|
246
|
+
suggest: `${guess?.near ? `Use '${guess.key}'. ` : ""}The column ids are ${columnIds.map((c) => `'${c}'`).join(", ")}.`,
|
|
247
|
+
...removable(id, entry) && !(heatMustStay && isHeat(entry)) ? { fix: [{ op: "remove", path: toJsonPointer(["options", "encodings", id]) }] } : {}
|
|
174
248
|
});
|
|
175
249
|
}
|
|
176
250
|
let warned = /* @__PURE__ */ new Set(), warn = (code, id, message, severity = "warn") => {
|
|
@@ -381,7 +455,7 @@ function compileDimSwitch(data, options = {}, form = {}) {
|
|
|
381
455
|
}
|
|
382
456
|
let shares = cur.every((v) => v !== null) && ref.every((v) => v !== null) ? shapley(owner.drivers, ids, cur, ref) : ids.map(() => null);
|
|
383
457
|
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();
|
|
458
|
+
}, 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
459
|
for (let m of data.measures) if (m.drivers !== void 0) {
|
|
386
460
|
let assign = (e, glyph) => {
|
|
387
461
|
if (!(typeof e == "number" || "field" in e || "total" in e)) {
|
|
@@ -394,26 +468,28 @@ function compileDimSwitch(data, options = {}, form = {}) {
|
|
|
394
468
|
};
|
|
395
469
|
assign(m.drivers);
|
|
396
470
|
}
|
|
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 =
|
|
471
|
+
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") => {
|
|
472
|
+
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
473
|
for (let { p, reference, comparisonKind } of [
|
|
400
474
|
{ p: range, reference: prior, comparisonKind: "prior" },
|
|
401
475
|
...plan ? [{ p: range, reference: plan, comparisonKind: "plan" }] : [],
|
|
402
476
|
...periods.map((p2) => ({ p: p2, reference: void 0, comparisonKind: "period" }))
|
|
403
477
|
]) {
|
|
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");
|
|
478
|
+
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);
|
|
479
|
+
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
480
|
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" }));
|
|
481
|
+
(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
482
|
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") {
|
|
483
|
+
if (values.set(col, current), comparisonKind !== "plan" && (!p.kind || rangeDrawn)) {
|
|
412
484
|
let levelJudgement = m.bands ? judgeBand(m, current, [currentSums, ...usesTotal(exprOf(m)) ? [total] : []], p.partial === !0, options) : NEUTRAL;
|
|
413
485
|
cells[col] = cell(current, levelJudgement), record(id, col, m, member, p.id, current);
|
|
414
486
|
}
|
|
415
487
|
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
|
|
488
|
+
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) {
|
|
489
|
+
if (!comparisonDrawn) continue;
|
|
490
|
+
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;
|
|
491
|
+
} else
|
|
492
|
+
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
493
|
}
|
|
418
494
|
let sized = !m.judge && (m.scale === "money" || m.scale === "count") && !inStatement(m);
|
|
419
495
|
if (isSubtotal(m) && m.value !== void 0) for (let p of [range, ...plan ? [plan] : [], ...periods]) {
|
|
@@ -421,11 +497,11 @@ function compileDimSwitch(data, options = {}, form = {}) {
|
|
|
421
497
|
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
498
|
}
|
|
423
499
|
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)]) {
|
|
500
|
+
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
501
|
let value = values.get(col)?.raw;
|
|
426
502
|
typeof value == "number" && bars.push({ row, measure: m.id, col, value });
|
|
427
503
|
}
|
|
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;
|
|
504
|
+
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
505
|
}, statementRow = (m, row, first) => {
|
|
430
506
|
if (m.result) {
|
|
431
507
|
row.kind = "result";
|
|
@@ -443,7 +519,7 @@ function compileDimSwitch(data, options = {}, form = {}) {
|
|
|
443
519
|
}, 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
520
|
let last = rows.slice(from).filter((r) => r.kind === "result" && !r.inline).pop();
|
|
445
521
|
last && (last.final = !0);
|
|
446
|
-
};
|
|
522
|
+
}, totalBlockEnd = 0;
|
|
447
523
|
if (variant === "by-measure") {
|
|
448
524
|
let grouped = roots.some((m) => m.group !== void 0), current = null, groupStart = rows.length, walk = (m, parent, parentMember, rung, memberLevel) => {
|
|
449
525
|
for (let member of ordered(parentMember)) {
|
|
@@ -464,7 +540,7 @@ function compileDimSwitch(data, options = {}, form = {}) {
|
|
|
464
540
|
levels[row.id] = statementDepth + 1, walk(m, row.id, void 0, rung + 1, 1);
|
|
465
541
|
}, firstLine = !0;
|
|
466
542
|
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));
|
|
543
|
+
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
544
|
closeResults(groupStart);
|
|
469
545
|
} else {
|
|
470
546
|
let block = (member, parentRow, rung) => {
|
|
@@ -481,9 +557,9 @@ function compileDimSwitch(data, options = {}, form = {}) {
|
|
|
481
557
|
}, firstIn = /* @__PURE__ */ new Map();
|
|
482
558
|
for (let m of roots.filter((m2) => applies(m2, member) && (member !== totalId || m2.inTotalBlock !== !1))) {
|
|
483
559
|
let parent = parentRow, at = rung + 1;
|
|
484
|
-
if (m.group !== void 0) {
|
|
560
|
+
if (m.group !== void 0 && headIds.add(`group:${m.group}`), m.group !== void 0 && !headHidden(m.group)) {
|
|
485
561
|
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;
|
|
562
|
+
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
563
|
}
|
|
488
564
|
let g = m.group ?? "";
|
|
489
565
|
line(m, parent, at, firstIn.get(g) ?? !0), firstIn.set(g, !1);
|
|
@@ -503,11 +579,11 @@ function compileDimSwitch(data, options = {}, form = {}) {
|
|
|
503
579
|
let changeRow = rows.find((r) => r.id === `${id}:change`);
|
|
504
580
|
form.card && changeRow && changeRow.label === "" && (changeRow.label = summary.unitAffix, delete summary.unitAffix);
|
|
505
581
|
}, 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);
|
|
582
|
+
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
583
|
let walk = (parentMember, parentRow, rung) => {
|
|
508
584
|
for (let member of ordered(parentMember)) {
|
|
509
585
|
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);
|
|
586
|
+
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
587
|
}
|
|
512
588
|
};
|
|
513
589
|
walk(void 0, void 0, 0);
|
|
@@ -519,17 +595,37 @@ function compileDimSwitch(data, options = {}, form = {}) {
|
|
|
519
595
|
group ? group.push(entry) : groups.set(entry.col, [entry]);
|
|
520
596
|
}
|
|
521
597
|
return groups;
|
|
522
|
-
};
|
|
598
|
+
}, barDrawn = !1;
|
|
523
599
|
for (let [col, inCol] of byCol(bars)) {
|
|
524
600
|
let counts = /* @__PURE__ */ new Map();
|
|
525
601
|
for (let bar of inCol) counts.set(bar.measure, (counts.get(bar.measure) ?? 0) + 1);
|
|
526
602
|
let chosen = [...counts].sort((a, b) => b[1] - a[1] || measureOrder.get(a[0]) - measureOrder.get(b[0]))[0][0];
|
|
527
603
|
for (let parent of new Set(inCol.map((bar) => bar.row.parentId))) {
|
|
528
604
|
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)))
|
|
605
|
+
if (!(max <= 0 || siblings.every((bar) => bar.value / max >= 0.9)) && (barDrawn = !0, options.bars !== !1))
|
|
530
606
|
for (let bar of siblings) bar.row.cells[col] = withBar(bar.row.cells[col], bar.value / max);
|
|
531
607
|
}
|
|
532
608
|
}
|
|
609
|
+
options.bars === !1 && !barDrawn && warnings.push({
|
|
610
|
+
code: "option-ignored",
|
|
611
|
+
severity: "warn",
|
|
612
|
+
field: ["options", "bars"],
|
|
613
|
+
message: "options.bars does nothing here, because this table draws no size bars.",
|
|
614
|
+
suggest: "Remove options.bars."
|
|
615
|
+
}), 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({
|
|
616
|
+
code: "option-ignored",
|
|
617
|
+
severity: "warn",
|
|
618
|
+
field: ["options", "totalPosition"],
|
|
619
|
+
message: "options.totalPosition does not apply in by-measure, because each Total row owns its members.",
|
|
620
|
+
suggest: "Remove options.totalPosition, or use variant by-member.",
|
|
621
|
+
fix: [{ op: "remove", path: "/options/totalPosition" }]
|
|
622
|
+
}), variant === "by-member" && totalHidden && options.totalPosition === "bottom" && warnings.push({
|
|
623
|
+
code: "option-ignored",
|
|
624
|
+
severity: "warn",
|
|
625
|
+
field: ["options", "totalPosition"],
|
|
626
|
+
message: "options.totalPosition has nothing to move, because rowVisibility hides the Total block.",
|
|
627
|
+
suggest: "Remove options.totalPosition, or show the Total."
|
|
628
|
+
});
|
|
533
629
|
let parents = new Set(rows.filter((r) => !r.inline && r.parentId).map((r) => r.parentId));
|
|
534
630
|
for (let id of Object.keys(levels)) parents.has(id) || delete levels[id];
|
|
535
631
|
let maxDepth = Math.max(1, maxOf(Object.values(levels)));
|
|
@@ -555,46 +651,88 @@ function compileDimSwitch(data, options = {}, form = {}) {
|
|
|
555
651
|
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
652
|
for (let entry of entries) entry.cell.format = format;
|
|
557
653
|
}
|
|
558
|
-
let
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
654
|
+
let computedCells = totalHidden ? hideTotal() : records;
|
|
655
|
+
function hideTotal() {
|
|
656
|
+
let hiddenIds = /* @__PURE__ */ new Set(), dropped = /* @__PURE__ */ new Set();
|
|
657
|
+
if (variant === "by-member") for (let row of rows.slice(0, totalBlockEnd)) dropped.add(row);
|
|
658
|
+
else for (let row of totalRows) row.kind === "split" && dropped.add(row);
|
|
659
|
+
let lines = [...totalRows];
|
|
660
|
+
for (let row of lines)
|
|
661
|
+
hiddenIds.add(row.id), hiddenIds.add(`${row.id}:change`), hiddenIds.add(`${row.id}:effect`);
|
|
662
|
+
variant === "by-member" && hiddenIds.add(dimswitchRowId(variant, totalId));
|
|
663
|
+
for (let row of rows) row.inline && row.parentId !== void 0 && hiddenIds.has(row.parentId) && dropped.add(row);
|
|
664
|
+
let figures = /* @__PURE__ */ new Map();
|
|
665
|
+
for (let row of lines) {
|
|
666
|
+
let group = row[MAGNITUDE_GROUP];
|
|
667
|
+
if (group === void 0) continue;
|
|
668
|
+
let list = figures.get(group);
|
|
669
|
+
list || figures.set(group, list = []);
|
|
670
|
+
for (let col of ["range", ...periods.map((p) => p.id)]) {
|
|
671
|
+
let value = row.cells?.[col];
|
|
672
|
+
value !== null && typeof value == "object" && typeof value.v == "number" && list.push([col, value.v]);
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
let kept = rows.filter((row) => !dropped.has(row));
|
|
676
|
+
rows.length = 0, rows.push(...kept);
|
|
677
|
+
for (let row of lines) dropped.has(row) || (row.cells = emptyIdRecord(), row.missing = "blank", labelOnly(row));
|
|
678
|
+
for (let row of rows) {
|
|
679
|
+
let group = row[MAGNITUDE_GROUP], list = group === void 0 ? void 0 : figures.get(group);
|
|
680
|
+
list && (Object.assign(row, { [MAGNITUDE_FIGURES]: list }), figures.delete(group));
|
|
681
|
+
}
|
|
682
|
+
for (let row of dropped)
|
|
683
|
+
delete levels[row.id], collapsed.delete(row.id);
|
|
684
|
+
for (let i = defaults.length - 1; i >= 0; i--) defaults[i] in levels || defaults.splice(i, 1);
|
|
685
|
+
return (blockColumns.length || authoredPeriods.length) && warnings.push(...hiddenTotalFoldWarnings(rows, collapsed, totalId)), records.filter((record2) => record2.kind !== "calc" || !hiddenIds.has(record2.rowId));
|
|
686
|
+
}
|
|
687
|
+
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) => {
|
|
688
|
+
let o = overrides?.[id];
|
|
689
|
+
return { ...o?.align === void 0 ? {} : { align: o.align }, ...o?.headAlign === void 0 ? {} : { headAlign: o.headAlign } };
|
|
690
|
+
}, 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;
|
|
691
|
+
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({
|
|
692
|
+
code: "option-ignored",
|
|
693
|
+
severity: "warn",
|
|
694
|
+
field: ["options", "columnOverrides", id, "width"],
|
|
695
|
+
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.`,
|
|
696
|
+
suggest: `Give the table more width, or remove options.columnOverrides.${id}.width.`
|
|
697
|
+
});
|
|
698
|
+
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";
|
|
699
|
+
partialNote !== void 0 && !noteFits && warnings.push(partialNoteWarning(partialNote)), noteFits && (tableOptions.footnotes = [...tableOptions.footnotes || [], partialNote]);
|
|
700
|
+
let notes = [
|
|
701
|
+
...partial.length && !noteFits ? [disclosureNote(`${star ? `${star} ` : ""}${partialText}`)] : [],
|
|
562
702
|
...nearZeroSeen ? [disclosureNote(strings.nearZeroChange)] : [],
|
|
563
703
|
...hidden.length ? [engineNote(fullPeriodNote, "disclosure", shortPeriodNote === fullPeriodNote ? void 0 : shortPeriodNote)] : []
|
|
564
704
|
];
|
|
705
|
+
if ((overrides?.label?.align ?? "left") !== "left") for (let row of rows) row.unitAffix !== void 0 && (row.label = `${row.label} ${row.unitAffix}`, delete row.unitAffix);
|
|
706
|
+
let blockTracks = [
|
|
707
|
+
...rangeDrawn ? [{ id: "range", kind: "value", label: range.partial ? `${nameOf(range)}${star}` : nameOf(range), subLabel: headSub(range), ...track("range", width.range), aggregate: "source", emphasis: "strong" }] : [],
|
|
708
|
+
...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" }] : [],
|
|
709
|
+
...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" }] : []
|
|
710
|
+
], 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
711
|
return {
|
|
566
712
|
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" } : {} }))
|
|
713
|
+
{ 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 } },
|
|
714
|
+
...periodsFirst ? [...periodTracks, ...blockTracks] : [...blockTracks, ...periodTracks]
|
|
573
715
|
// Range and its comparisons form one block between labels and periods.
|
|
574
|
-
], columnGroups: [{ id: "labels", label: "Labels", heading: !1, columns: ["label"] }, { id: "block", label: "Range", heading: !1, columns:
|
|
716
|
+
], columnGroups: [{ id: "labels", label: "Labels", heading: !1, columns: ["label"] }, ...blockColumns.length ? [{ id: "block", label: "Range", heading: !1, columns: blockColumns }] : []], rows },
|
|
575
717
|
// No rowExtent: under the default the rules end at the last track.
|
|
576
718
|
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 } : {},
|
|
719
|
+
...tableDefaults(form, pinned),
|
|
583
720
|
...tableOptions,
|
|
584
721
|
...notes.length ? { [ENGINE_NOTES]: notes } : {},
|
|
585
|
-
...
|
|
722
|
+
...labelWidth !== void 0 && !form.card ? { [SOFT_LABEL_CAP]: !0 } : {},
|
|
586
723
|
[LABEL_WRAP_FLOOR]: !0,
|
|
587
724
|
// 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:
|
|
725
|
+
...typeof tableOptions.stickyLabels == "object" && tableOptions.stickyLabels.columns === void 0 ? { stickyLabels: { ...tableOptions.stickyLabels, columns: pinned } } : {},
|
|
589
726
|
...data.effectLabel ? { inlineVisibility: { effect: !1, ...tableOptions.inlineVisibility } } : {},
|
|
590
727
|
expansion: { collapsed: [...collapsed] }
|
|
591
728
|
},
|
|
592
|
-
computedCells
|
|
729
|
+
computedCells,
|
|
593
730
|
depthCollapsed: defaults,
|
|
594
731
|
levels,
|
|
595
732
|
maxDepth,
|
|
596
733
|
warnings,
|
|
597
|
-
omissions
|
|
734
|
+
omissions,
|
|
735
|
+
...partialNote === void 0 ? {} : { partialNote }
|
|
598
736
|
};
|
|
599
737
|
}
|
|
600
738
|
function foreignRowId(ids) {
|
|
@@ -612,7 +750,14 @@ function foreignRowId(ids) {
|
|
|
612
750
|
export {
|
|
613
751
|
FOLDED,
|
|
614
752
|
dimSwitchTableWarnings,
|
|
753
|
+
hostPeriods,
|
|
754
|
+
PARTIAL_NOTE_OFF,
|
|
755
|
+
PARTIAL_NOTE_OFF_FRAME,
|
|
756
|
+
partialNoteWarning,
|
|
757
|
+
LABELS_ONLY,
|
|
758
|
+
hiddenTotalFoldWarnings,
|
|
615
759
|
dimswitchRowId,
|
|
760
|
+
currentDimSwitchOptions,
|
|
616
761
|
compileDimSwitch,
|
|
617
762
|
foreignRowId
|
|
618
763
|
};
|