@tylertech/forge 2.8.0 → 2.10.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/custom-elements.json +4525 -246
- package/dist/esm/accordion/index.js +1 -34
- package/dist/esm/app-bar/help-button/index.js +1 -53
- package/dist/esm/app-bar/index.js +1 -131
- package/dist/esm/app-bar/menu-button/index.js +1 -36
- package/dist/esm/app-bar/notification-button/index.js +1 -41
- package/dist/esm/app-bar/profile-button/index.js +1 -46
- package/dist/esm/app-bar/search/index.js +1 -38
- package/dist/esm/autocomplete/index.js +1 -72
- package/dist/esm/avatar/index.js +1 -27
- package/dist/esm/backdrop/index.js +1 -22
- package/dist/esm/badge/index.js +1 -25
- package/dist/esm/banner/index.js +1 -40
- package/dist/esm/bottom-sheet/index.js +1 -40
- package/dist/esm/busy-indicator/index.js +1 -33
- package/dist/esm/button/index.js +1 -25
- package/dist/esm/button-toggle/button-toggle/index.js +1 -27
- package/dist/esm/button-toggle/button-toggle-group/index.js +1 -26
- package/dist/esm/button-toggle/index.js +1 -40
- package/dist/esm/calendar/calendar-dropdown/index.js +1 -30
- package/dist/esm/calendar/calendar-menu/index.js +1 -43
- package/dist/esm/calendar/core/index.js +1 -7
- package/dist/esm/calendar/index.js +1 -194
- package/dist/esm/card/index.js +1 -16
- package/dist/esm/checkbox/index.js +1 -39
- package/dist/esm/chip-field/index.js +1 -46
- package/dist/esm/chips/chip/index.js +1 -37
- package/dist/esm/chips/chip-set/index.js +1 -37
- package/dist/esm/chips/index.js +1 -50
- package/dist/esm/chunks/chunk.23VA56ZY.js +7 -0
- package/dist/esm/chunks/{chunk.M3O5VPDD.js.map → chunk.23VA56ZY.js.map} +1 -1
- package/dist/esm/chunks/chunk.24D46RLZ.js +7 -0
- package/dist/esm/chunks/{chunk.HZISALRH.js.map → chunk.24D46RLZ.js.map} +1 -1
- package/dist/esm/chunks/chunk.2A3CKLXJ.js +7 -0
- package/dist/esm/chunks/{chunk.U5ECVIX5.js.map → chunk.2A3CKLXJ.js.map} +1 -1
- package/dist/esm/chunks/chunk.2GY2VPJG.js +7 -0
- package/dist/esm/chunks/{chunk.FWJ7SIFA.js.map → chunk.2GY2VPJG.js.map} +1 -1
- package/dist/esm/chunks/chunk.2YGKMENJ.js +7 -0
- package/dist/esm/chunks/chunk.2YGKMENJ.js.map +7 -0
- package/dist/esm/chunks/chunk.33Q5FK2H.js +7 -0
- package/dist/esm/chunks/{chunk.LX2HDAIF.js.map → chunk.33Q5FK2H.js.map} +2 -2
- package/dist/esm/chunks/chunk.35U4OX7S.js +7 -0
- package/dist/esm/chunks/{chunk.E26BROOG.js.map → chunk.35U4OX7S.js.map} +1 -1
- package/dist/esm/chunks/chunk.3E5QKMHL.js +7 -0
- package/dist/esm/chunks/{chunk.VK6LIH3B.js.map → chunk.3E5QKMHL.js.map} +1 -1
- package/dist/esm/chunks/chunk.444GNOS4.js +7 -0
- package/dist/esm/chunks/{chunk.FZ6KICMD.js.map → chunk.444GNOS4.js.map} +1 -1
- package/dist/esm/chunks/chunk.54QFNVMG.js +7 -0
- package/dist/esm/chunks/{chunk.6ZBFCE2A.js.map → chunk.54QFNVMG.js.map} +1 -1
- package/dist/esm/chunks/chunk.57XBS3DF.js +7 -0
- package/dist/esm/chunks/chunk.57XBS3DF.js.map +7 -0
- package/dist/esm/chunks/chunk.5HUDHTAK.js +7 -0
- package/dist/esm/chunks/chunk.5HUDHTAK.js.map +7 -0
- package/dist/esm/chunks/chunk.5QK7XR2W.js +7 -0
- package/dist/esm/chunks/{chunk.EUPO2VO2.js.map → chunk.5QK7XR2W.js.map} +1 -1
- package/dist/esm/chunks/chunk.5SRA2RH3.js +7 -0
- package/dist/esm/chunks/chunk.5SRA2RH3.js.map +7 -0
- package/dist/esm/chunks/chunk.5WMEFHVN.js +7 -0
- package/dist/esm/chunks/{chunk.35BJJH5E.js.map → chunk.5WMEFHVN.js.map} +1 -1
- package/dist/esm/chunks/chunk.5XQVZQ4U.js +7 -0
- package/dist/esm/chunks/chunk.5XQVZQ4U.js.map +7 -0
- package/dist/esm/chunks/chunk.6APYGKNX.js +7 -0
- package/dist/esm/chunks/{chunk.ZSHQMR4O.js.map → chunk.6APYGKNX.js.map} +1 -1
- package/dist/esm/chunks/chunk.6BKOGBE6.js +7 -0
- package/dist/esm/chunks/chunk.6BKOGBE6.js.map +7 -0
- package/dist/esm/chunks/chunk.6P6VQMTU.js +7 -0
- package/dist/esm/chunks/chunk.6P6VQMTU.js.map +7 -0
- package/dist/esm/chunks/chunk.7GT5LOI3.js +7 -0
- package/dist/esm/chunks/{chunk.V6Q2SM6Y.js.map → chunk.7GT5LOI3.js.map} +1 -1
- package/dist/esm/chunks/chunk.7JTKKFL4.js +7 -0
- package/dist/esm/chunks/{chunk.GWNR3UUX.js.map → chunk.7JTKKFL4.js.map} +1 -1
- package/dist/esm/chunks/chunk.7NXPOEXV.js +7 -0
- package/dist/esm/chunks/{chunk.7UAH67PT.js.map → chunk.7NXPOEXV.js.map} +1 -1
- package/dist/esm/chunks/chunk.7TQYFMM4.js +7 -0
- package/dist/esm/chunks/{chunk.WSH4S3GM.js.map → chunk.7TQYFMM4.js.map} +1 -1
- package/dist/esm/chunks/chunk.7WWP6WI6.js +7 -0
- package/dist/esm/chunks/chunk.7WWP6WI6.js.map +7 -0
- package/dist/esm/chunks/chunk.7ZS4N2FT.js +8 -0
- package/dist/esm/chunks/{chunk.WIYLQTSX.js.map → chunk.7ZS4N2FT.js.map} +1 -1
- package/dist/esm/chunks/chunk.A23NSEWA.js +7 -0
- package/dist/esm/chunks/{chunk.KZATVOA6.js.map → chunk.A23NSEWA.js.map} +1 -1
- package/dist/esm/chunks/chunk.A6I4EIPW.js +7 -0
- package/dist/esm/chunks/{chunk.L4OUV7W6.js.map → chunk.A6I4EIPW.js.map} +1 -1
- package/dist/esm/chunks/chunk.AABG6MSC.js +7 -0
- package/dist/esm/chunks/chunk.AABG6MSC.js.map +7 -0
- package/dist/esm/chunks/chunk.AFZB3MG5.js +7 -0
- package/dist/esm/chunks/{chunk.UQ3QTUUB.js.map → chunk.AFZB3MG5.js.map} +1 -1
- package/dist/esm/chunks/chunk.AHOQXJRN.js +7 -0
- package/dist/esm/chunks/{chunk.S3UVF647.js.map → chunk.AHOQXJRN.js.map} +1 -1
- package/dist/esm/chunks/chunk.AJJILT3A.js +6 -0
- package/dist/esm/chunks/{chunk.LM5TVNZY.js.map → chunk.AJJILT3A.js.map} +0 -0
- package/dist/esm/chunks/chunk.AMFXGOSA.js +7 -0
- package/dist/esm/chunks/{chunk.PBGL3BRX.js.map → chunk.AMFXGOSA.js.map} +1 -1
- package/dist/esm/chunks/chunk.AWCBH5KW.js +7 -0
- package/dist/esm/chunks/{chunk.RV3E762Y.js.map → chunk.AWCBH5KW.js.map} +1 -1
- package/dist/esm/chunks/chunk.B3IJU6XJ.js +7 -0
- package/dist/esm/chunks/{chunk.MMIZOYAS.js.map → chunk.B3IJU6XJ.js.map} +1 -1
- package/dist/esm/chunks/chunk.B5ABD4CZ.js +7 -0
- package/dist/esm/chunks/{chunk.WDD2GTIH.js.map → chunk.B5ABD4CZ.js.map} +1 -1
- package/dist/esm/chunks/chunk.BCUBTR5O.js +7 -0
- package/dist/esm/chunks/{chunk.3EHQ3YHJ.js.map → chunk.BCUBTR5O.js.map} +1 -1
- package/dist/esm/chunks/chunk.BSZ2LBJX.js +7 -0
- package/dist/esm/chunks/{chunk.35U3UPDV.js.map → chunk.BSZ2LBJX.js.map} +1 -1
- package/dist/esm/chunks/chunk.CSOY4C7A.js +7 -0
- package/dist/esm/chunks/{chunk.KNR5DXE4.js.map → chunk.CSOY4C7A.js.map} +1 -1
- package/dist/esm/chunks/chunk.CV5E5W6I.js +7 -0
- package/dist/esm/chunks/{chunk.YL2NAVJW.js.map → chunk.CV5E5W6I.js.map} +2 -2
- package/dist/esm/chunks/chunk.D3DLVPPE.js +7 -0
- package/dist/esm/chunks/{chunk.5U6ZT6MC.js.map → chunk.D3DLVPPE.js.map} +1 -1
- package/dist/esm/chunks/chunk.D4SNVKDA.js +14 -0
- package/dist/esm/chunks/{chunk.BYN27JXZ.js.map → chunk.D4SNVKDA.js.map} +1 -1
- package/dist/esm/chunks/chunk.DGDT4UQT.js +7 -0
- package/dist/esm/chunks/{chunk.IBED5TWL.js.map → chunk.DGDT4UQT.js.map} +1 -1
- package/dist/esm/chunks/chunk.DGOV5RDW.js +29 -0
- package/dist/esm/chunks/{chunk.TYU4RLZG.js.map → chunk.DGOV5RDW.js.map} +1 -1
- package/dist/esm/chunks/chunk.DGQAYNAF.js +7 -0
- package/dist/esm/chunks/{chunk.GHZ75UPO.js.map → chunk.DGQAYNAF.js.map} +1 -1
- package/dist/esm/chunks/chunk.DIYJJHWP.js +7 -0
- package/dist/esm/chunks/{chunk.THKWQXBJ.js.map → chunk.DIYJJHWP.js.map} +1 -1
- package/dist/esm/chunks/chunk.DJSOBAWA.js +7 -0
- package/dist/esm/chunks/{chunk.67B6JDOJ.js.map → chunk.DJSOBAWA.js.map} +1 -1
- package/dist/esm/chunks/chunk.DRFU6POI.js +7 -0
- package/dist/esm/chunks/{chunk.DLF5JAQO.js.map → chunk.DRFU6POI.js.map} +2 -2
- package/dist/esm/chunks/chunk.DVYJDQ55.js +7 -0
- package/dist/esm/chunks/chunk.DVYJDQ55.js.map +7 -0
- package/dist/esm/chunks/chunk.E37HEAJ5.js +7 -0
- package/dist/esm/chunks/{chunk.2NMHSTAO.js.map → chunk.E37HEAJ5.js.map} +3 -3
- package/dist/esm/chunks/chunk.E43TT4RI.js +7 -0
- package/dist/esm/chunks/{chunk.SNAZ6JSS.js.map → chunk.E43TT4RI.js.map} +1 -1
- package/dist/esm/chunks/chunk.EC6JSIQW.js +7 -0
- package/dist/esm/chunks/{chunk.EY57VTRF.js.map → chunk.EC6JSIQW.js.map} +1 -1
- package/dist/esm/chunks/chunk.EM3OQRZP.js +7 -0
- package/dist/esm/chunks/chunk.EM3OQRZP.js.map +7 -0
- package/dist/esm/chunks/chunk.ESW45SN4.js +7 -0
- package/dist/esm/chunks/chunk.ESW45SN4.js.map +7 -0
- package/dist/esm/chunks/chunk.F5I55MXD.js +7 -0
- package/dist/esm/chunks/chunk.F5I55MXD.js.map +7 -0
- package/dist/esm/chunks/chunk.G5BCWBD5.js +7 -0
- package/dist/esm/chunks/{chunk.EBC2HGO3.js.map → chunk.G5BCWBD5.js.map} +1 -1
- package/dist/esm/chunks/chunk.G76HB2FK.js +7 -0
- package/dist/esm/chunks/{chunk.MEFT5FQC.js.map → chunk.G76HB2FK.js.map} +1 -1
- package/dist/esm/chunks/chunk.GP7WDYWQ.js +7 -0
- package/dist/esm/chunks/chunk.GP7WDYWQ.js.map +7 -0
- package/dist/esm/chunks/chunk.GVQVA7P3.js +7 -0
- package/dist/esm/chunks/{chunk.6EGTLHJS.js.map → chunk.GVQVA7P3.js.map} +2 -2
- package/dist/esm/chunks/chunk.HN4PXH3D.js +7 -0
- package/dist/esm/chunks/{chunk.K2PCTUVN.js.map → chunk.HN4PXH3D.js.map} +1 -1
- package/dist/esm/chunks/chunk.I33ZJKOX.js +7 -0
- package/dist/esm/chunks/{chunk.TM46MNYN.js.map → chunk.I33ZJKOX.js.map} +1 -1
- package/dist/esm/chunks/chunk.IBQVV4HR.js +7 -0
- package/dist/esm/chunks/{chunk.MBZLA635.js.map → chunk.IBQVV4HR.js.map} +2 -2
- package/dist/esm/chunks/chunk.IGMTMR3D.js +7 -0
- package/dist/esm/chunks/{chunk.RD4RIFOZ.js.map → chunk.IGMTMR3D.js.map} +1 -1
- package/dist/esm/chunks/chunk.IJIKFXUT.js +7 -0
- package/dist/esm/chunks/{chunk.K7OLG7CS.js.map → chunk.IJIKFXUT.js.map} +1 -1
- package/dist/esm/chunks/chunk.IMK2LFWR.js +7 -0
- package/dist/esm/chunks/{chunk.Q4YMHFRY.js.map → chunk.IMK2LFWR.js.map} +1 -1
- package/dist/esm/chunks/chunk.J6ERQLHJ.js +7 -0
- package/dist/esm/chunks/chunk.J6ERQLHJ.js.map +7 -0
- package/dist/esm/chunks/chunk.JXQZMASB.js +7 -0
- package/dist/esm/chunks/{chunk.QYWAZCBX.js.map → chunk.JXQZMASB.js.map} +1 -1
- package/dist/esm/chunks/chunk.K43ZNKT2.js +7 -0
- package/dist/esm/chunks/{chunk.7FWTBD6Y.js.map → chunk.K43ZNKT2.js.map} +1 -1
- package/dist/esm/chunks/chunk.K753A3KI.js +29 -0
- package/dist/esm/chunks/{chunk.ZXIDTDRC.js.map → chunk.K753A3KI.js.map} +1 -1
- package/dist/esm/chunks/chunk.KLHXGSZU.js +7 -0
- package/dist/esm/chunks/{chunk.VXVE7KEM.js.map → chunk.KLHXGSZU.js.map} +1 -1
- package/dist/esm/chunks/chunk.KZHMDZVS.js +29 -0
- package/dist/esm/chunks/{chunk.ITQ55IPH.js.map → chunk.KZHMDZVS.js.map} +1 -1
- package/dist/esm/chunks/chunk.LZMYHIO2.js +7 -0
- package/dist/esm/chunks/{chunk.GS2AXUCN.js.map → chunk.LZMYHIO2.js.map} +1 -1
- package/dist/esm/chunks/chunk.MCIQXNKY.js +7 -0
- package/dist/esm/chunks/chunk.MCIQXNKY.js.map +7 -0
- package/dist/esm/chunks/chunk.MGTNCCW3.js +7 -0
- package/dist/esm/chunks/{chunk.KCVJDJ6K.js.map → chunk.MGTNCCW3.js.map} +1 -1
- package/dist/esm/chunks/chunk.MIYZJUXH.js +7 -0
- package/dist/esm/chunks/{chunk.WT4W2IFT.js.map → chunk.MIYZJUXH.js.map} +1 -1
- package/dist/esm/chunks/chunk.MTMZFAWU.js +7 -0
- package/dist/esm/chunks/chunk.MTMZFAWU.js.map +7 -0
- package/dist/esm/chunks/chunk.NEGJYSPB.js +7 -0
- package/dist/esm/chunks/chunk.NEGJYSPB.js.map +7 -0
- package/dist/esm/chunks/chunk.NGIBMR3Q.js +7 -0
- package/dist/esm/chunks/{chunk.4PF7WRP4.js.map → chunk.NGIBMR3Q.js.map} +1 -1
- package/dist/esm/chunks/chunk.NJHQA266.js +7 -0
- package/dist/esm/chunks/chunk.NJHQA266.js.map +7 -0
- package/dist/esm/chunks/chunk.O3G6ZLJN.js +7 -0
- package/dist/esm/chunks/{chunk.4WLVFWKI.js.map → chunk.O3G6ZLJN.js.map} +1 -1
- package/dist/esm/chunks/chunk.OAP3JDBS.js +12 -0
- package/dist/esm/chunks/chunk.OAP3JDBS.js.map +7 -0
- package/dist/esm/chunks/chunk.OHCHNL3V.js +7 -0
- package/dist/esm/chunks/{chunk.HASAPJMX.js.map → chunk.OHCHNL3V.js.map} +1 -1
- package/dist/esm/chunks/chunk.OOBE3XRM.js +29 -0
- package/dist/esm/chunks/{chunk.HMM7PGGZ.js.map → chunk.OOBE3XRM.js.map} +1 -1
- package/dist/esm/chunks/chunk.OUEF6VQ6.js +7 -0
- package/dist/esm/chunks/{chunk.OXS2O7RG.js.map → chunk.OUEF6VQ6.js.map} +2 -2
- package/dist/esm/chunks/chunk.PBTGGYKX.js +29 -0
- package/dist/esm/chunks/{chunk.V2ELLBDP.js.map → chunk.PBTGGYKX.js.map} +1 -1
- package/dist/esm/chunks/chunk.PYG4YVBA.js +73 -0
- package/dist/esm/chunks/chunk.PYG4YVBA.js.map +7 -0
- package/dist/esm/chunks/chunk.QJPH24V4.js +7 -0
- package/dist/esm/chunks/{chunk.GXTNND2M.js.map → chunk.QJPH24V4.js.map} +1 -1
- package/dist/esm/chunks/chunk.QXLPBYMX.js +7 -0
- package/dist/esm/chunks/{chunk.56BNM7F2.js.map → chunk.QXLPBYMX.js.map} +1 -1
- package/dist/esm/chunks/chunk.QZHEP4X2.js +29 -0
- package/dist/esm/chunks/{chunk.5VKAVHLM.js.map → chunk.QZHEP4X2.js.map} +1 -1
- package/dist/esm/chunks/chunk.R46EDURP.js +7 -0
- package/dist/esm/chunks/{chunk.JKC5PU23.js.map → chunk.R46EDURP.js.map} +1 -1
- package/dist/esm/chunks/chunk.R4NDFXVA.js +7 -0
- package/dist/esm/chunks/{chunk.4JURZYE4.js.map → chunk.R4NDFXVA.js.map} +1 -1
- package/dist/esm/chunks/chunk.RS5NH2NG.js +7 -0
- package/dist/esm/chunks/{chunk.PKZ43JNW.js.map → chunk.RS5NH2NG.js.map} +2 -2
- package/dist/esm/chunks/chunk.RZL6S3K3.js +7 -0
- package/dist/esm/chunks/chunk.RZL6S3K3.js.map +7 -0
- package/dist/esm/chunks/chunk.SFFYXKJW.js +7 -0
- package/dist/esm/chunks/{chunk.MUP3NY6M.js.map → chunk.SFFYXKJW.js.map} +2 -2
- package/dist/esm/chunks/chunk.SHT6BCLY.js +7 -0
- package/dist/esm/chunks/{chunk.BLZJIYMG.js.map → chunk.SHT6BCLY.js.map} +1 -1
- package/dist/esm/chunks/chunk.SNGELGOD.js +7 -0
- package/dist/esm/chunks/{chunk.5OYAJ36F.js.map → chunk.SNGELGOD.js.map} +1 -1
- package/dist/esm/chunks/{chunk.LCWRP2UI.js → chunk.STS5TIUV.js} +2 -32
- package/dist/esm/chunks/chunk.STS5TIUV.js.map +7 -0
- package/dist/esm/chunks/chunk.SVGEVCXA.js +7 -0
- package/dist/esm/chunks/{chunk.VHO7NUMI.js.map → chunk.SVGEVCXA.js.map} +1 -1
- package/dist/esm/chunks/chunk.UNTTQM6V.js +7 -0
- package/dist/esm/chunks/chunk.UNTTQM6V.js.map +7 -0
- package/dist/esm/chunks/chunk.URBXDOF7.js +7 -0
- package/dist/esm/chunks/{chunk.ELAJS33V.js.map → chunk.URBXDOF7.js.map} +1 -1
- package/dist/esm/chunks/chunk.UUX4QJ4D.js +7 -0
- package/dist/esm/chunks/{chunk.BKMWXPAS.js.map → chunk.UUX4QJ4D.js.map} +1 -1
- package/dist/esm/chunks/chunk.VEVOKTUX.js +7 -0
- package/dist/esm/chunks/{chunk.UPW5HUKB.js.map → chunk.VEVOKTUX.js.map} +1 -1
- package/dist/esm/chunks/chunk.VLTJFKGZ.js +7 -0
- package/dist/esm/chunks/{chunk.NX5SKZLU.js.map → chunk.VLTJFKGZ.js.map} +1 -1
- package/dist/esm/chunks/chunk.VMWS5OOZ.js +7 -0
- package/dist/esm/chunks/{chunk.QXZZ2MTF.js.map → chunk.VMWS5OOZ.js.map} +1 -1
- package/dist/esm/chunks/chunk.W7UTHKBF.js +7 -0
- package/dist/esm/chunks/chunk.W7UTHKBF.js.map +7 -0
- package/dist/esm/chunks/chunk.WAEWHBHE.js +7 -0
- package/dist/esm/chunks/{chunk.LK2DN5KX.js.map → chunk.WAEWHBHE.js.map} +1 -1
- package/dist/esm/chunks/chunk.WGE5R5JK.js +7 -0
- package/dist/esm/chunks/chunk.WGE5R5JK.js.map +7 -0
- package/dist/esm/chunks/chunk.WKKNDQYZ.js +7 -0
- package/dist/esm/chunks/chunk.WKKNDQYZ.js.map +7 -0
- package/dist/esm/chunks/chunk.WMO47F6Z.js +7 -0
- package/dist/esm/chunks/{chunk.CLEUHAZ6.js.map → chunk.WMO47F6Z.js.map} +1 -1
- package/dist/esm/chunks/{chunk.IUNON3UL.js → chunk.WNOSTPQQ.js} +2 -253
- package/dist/esm/chunks/{chunk.IUNON3UL.js.map → chunk.WNOSTPQQ.js.map} +1 -1
- package/dist/esm/chunks/chunk.WSGJIPQJ.js +7 -0
- package/dist/esm/chunks/{chunk.J5NUYQ4D.js.map → chunk.WSGJIPQJ.js.map} +1 -1
- package/dist/esm/chunks/chunk.WYVYTAFS.js +7 -0
- package/dist/esm/chunks/chunk.WYVYTAFS.js.map +7 -0
- package/dist/esm/chunks/chunk.WZRXUTYC.js +7 -0
- package/dist/esm/chunks/{chunk.2WBHHTUM.js.map → chunk.WZRXUTYC.js.map} +1 -1
- package/dist/esm/chunks/chunk.X2RP4QW3.js +6 -0
- package/dist/esm/chunks/chunk.X2RP4QW3.js.map +7 -0
- package/dist/esm/chunks/chunk.X77WVI2H.js +7 -0
- package/dist/esm/chunks/{chunk.ANME7BKM.js.map → chunk.X77WVI2H.js.map} +1 -1
- package/dist/esm/chunks/chunk.XURVHDKR.js +7 -0
- package/dist/esm/chunks/{chunk.3QXCVTCP.js.map → chunk.XURVHDKR.js.map} +1 -1
- package/dist/esm/chunks/chunk.XXA6KNXT.js +7 -0
- package/dist/esm/chunks/{chunk.I7BQUB7Z.js.map → chunk.XXA6KNXT.js.map} +1 -1
- package/dist/esm/chunks/chunk.XYBFFTXS.js +29 -0
- package/dist/esm/chunks/{chunk.WNVZQDNS.js.map → chunk.XYBFFTXS.js.map} +1 -1
- package/dist/esm/chunks/chunk.YFIDBZ7V.js +7 -0
- package/dist/esm/chunks/{chunk.ZLF2G3YT.js.map → chunk.YFIDBZ7V.js.map} +1 -1
- package/dist/esm/chunks/chunk.YHHIPP2F.js +7 -0
- package/dist/esm/chunks/{chunk.QHHYCB7N.js.map → chunk.YHHIPP2F.js.map} +1 -1
- package/dist/esm/chunks/chunk.ZHCQBWAG.js +7 -0
- package/dist/esm/chunks/{chunk.BEAJZPWS.js.map → chunk.ZHCQBWAG.js.map} +1 -1
- package/dist/esm/circular-progress/index.js +1 -22
- package/dist/esm/color-picker/index.js +1 -44
- package/dist/esm/core/base/index.js +1 -15
- package/dist/esm/core/delegates/index.js +1 -14
- package/dist/esm/core/index.js +1 -83
- package/dist/esm/core/mask/index.js +1 -20
- package/dist/esm/core/utils/index.js +1 -46
- package/dist/esm/date-picker/index.js +1 -57
- package/dist/esm/date-range-picker/index.js +1 -59
- package/dist/esm/dialog/index.js +1 -39
- package/dist/esm/divider/index.js +1 -16
- package/dist/esm/drawer/base/index.js +1 -20
- package/dist/esm/drawer/drawer/index.js +1 -20
- package/dist/esm/drawer/index.js +1 -51
- package/dist/esm/drawer/mini-drawer/index.js +1 -20
- package/dist/esm/drawer/modal-drawer/index.js +1 -25
- package/dist/esm/expansion-panel/index.js +1 -33
- package/dist/esm/file-picker/index.js +1 -36
- package/dist/esm/floating-action-button/index.js +1 -23
- package/dist/esm/floating-label/index.js +1 -17
- package/dist/esm/icon/index.js +1 -48
- package/dist/esm/icon-button/index.js +1 -32
- package/dist/esm/index.js +1 -1275
- package/dist/esm/inline-message/index.js +1 -16
- package/dist/esm/keyboard-shortcut/index.js +1 -35
- package/dist/esm/label-value/index.js +1 -26
- package/dist/esm/linear-progress/index.js +1 -18
- package/dist/esm/list/index.js +1 -38
- package/dist/esm/list/list/index.js +1 -27
- package/dist/esm/list/list-item/index.js +1 -25
- package/dist/esm/list-dropdown/index.js +1 -50
- package/dist/esm/menu/index.js +1 -48
- package/dist/esm/open-icon/index.js +1 -32
- package/dist/esm/page-state/index.js +1 -16
- package/dist/esm/paginator/index.js +1 -63
- package/dist/esm/popup/index.js +1 -25
- package/dist/esm/product-icon/index.js +1 -23
- package/dist/esm/profile-card/index.js +1 -33
- package/dist/esm/quantity-field/index.js +1 -41
- package/dist/esm/radio/index.js +1 -20
- package/dist/esm/ripple/index.js +1 -26
- package/dist/esm/scaffold/index.js +1 -16
- package/dist/esm/select/core/index.js +1 -55
- package/dist/esm/select/index.js +1 -109
- package/dist/esm/select/option/index.js +1 -22
- package/dist/esm/select/option-group/index.js +1 -16
- package/dist/esm/select/select/index.js +1 -58
- package/dist/esm/select/select-dropdown/index.js +1 -54
- package/dist/esm/skeleton/index.js +1 -16
- package/dist/esm/slider/index.js +1 -30
- package/dist/esm/split-view/core/index.js +7 -0
- package/dist/esm/split-view/core/index.js.map +7 -0
- package/dist/esm/split-view/index.js +7 -0
- package/dist/esm/split-view/index.js.map +7 -0
- package/dist/esm/split-view/split-view/index.js +7 -0
- package/dist/esm/split-view/split-view/index.js.map +7 -0
- package/dist/esm/split-view/split-view-panel/index.js +7 -0
- package/dist/esm/split-view/split-view-panel/index.js.map +7 -0
- package/dist/esm/stepper/index.js +1 -50
- package/dist/esm/stepper/step/index.js +1 -35
- package/dist/esm/stepper/stepper/index.js +1 -38
- package/dist/esm/switch/index.js +1 -29
- package/dist/esm/table/index.js +1 -52
- package/dist/esm/tabs/index.js +1 -56
- package/dist/esm/tabs/tab/index.js +1 -27
- package/dist/esm/tabs/tab-bar/index.js +1 -42
- package/dist/esm/text-field/index.js +1 -33
- package/dist/esm/theme/index.js +1 -11
- package/dist/esm/time-picker/index.js +1 -87
- package/dist/esm/toast/index.js +1 -37
- package/dist/esm/toolbar/index.js +1 -16
- package/dist/esm/tooltip/index.js +1 -28
- package/dist/esm/utils/index.js +1 -11
- package/dist/esm/view-switcher/index.js +1 -34
- package/dist/esm/view-switcher/view/index.js +1 -16
- package/dist/forge.css +1 -1
- package/dist/table/forge-table.css +1 -1
- package/esm/app-bar/app-bar.d.ts +3 -3
- package/esm/app-bar/profile-button/app-bar-profile-button-adapter.d.ts +6 -1
- package/esm/app-bar/profile-button/app-bar-profile-button-adapter.js +30 -12
- package/esm/app-bar/profile-button/app-bar-profile-button-constants.d.ts +4 -0
- package/esm/app-bar/profile-button/app-bar-profile-button-constants.js +2 -0
- package/esm/app-bar/profile-button/app-bar-profile-button-foundation.d.ts +8 -0
- package/esm/app-bar/profile-button/app-bar-profile-button-foundation.js +22 -0
- package/esm/app-bar/profile-button/app-bar-profile-button.d.ts +4 -0
- package/esm/app-bar/profile-button/app-bar-profile-button.js +14 -0
- package/esm/autocomplete/autocomplete-adapter.d.ts +2 -0
- package/esm/autocomplete/autocomplete-adapter.js +4 -0
- package/esm/autocomplete/autocomplete-foundation.d.ts +15 -16
- package/esm/autocomplete/autocomplete-foundation.js +21 -13
- package/esm/autocomplete/autocomplete.d.ts +9 -9
- package/esm/bottom-sheet/bottom-sheet-adapter.js +1 -1
- package/esm/calendar/calendar-foundation.d.ts +14 -14
- package/esm/calendar/calendar-foundation.js +5 -5
- package/esm/calendar/calendar-utils.d.ts +1 -1
- package/esm/calendar/calendar-utils.js +1 -1
- package/esm/calendar/calendar.d.ts +7 -7
- package/esm/calendar/core/calendar-base.d.ts +7 -7
- package/esm/chip-field/chip-field-adapter.d.ts +1 -1
- package/esm/chip-field/chip-field-adapter.js +2 -2
- package/esm/chip-field/chip-field.js +1 -1
- package/esm/chips/chip/chip-foundation.d.ts +1 -1
- package/esm/chips/chip/chip.d.ts +2 -2
- package/esm/chips/chip/chip.js +1 -1
- package/esm/color-picker/color-picker-foundation.d.ts +12 -12
- package/esm/color-picker/color-picker-foundation.js +1 -1
- package/esm/color-picker/color-picker.d.ts +8 -8
- package/esm/core/utils/date-utils.d.ts +1 -1
- package/esm/core/utils/event-utils.d.ts +1 -0
- package/esm/core/utils/event-utils.js +3 -0
- package/esm/core/utils/utils.d.ts +36 -0
- package/esm/core/utils/utils.js +57 -0
- package/esm/date-picker/base/base-date-picker-adapter.d.ts +8 -8
- package/esm/date-picker/base/base-date-picker-constants.d.ts +5 -5
- package/esm/date-picker/base/base-date-picker-foundation.d.ts +21 -21
- package/esm/date-picker/base/base-date-picker.d.ts +8 -8
- package/esm/date-picker/date-picker-foundation.d.ts +6 -6
- package/esm/date-picker/date-picker-foundation.js +3 -1
- package/esm/date-picker/date-picker.d.ts +1 -1
- package/esm/date-range-picker/date-range-picker-foundation.d.ts +11 -11
- package/esm/date-range-picker/date-range-picker.d.ts +4 -4
- package/esm/dialog/dialog-adapter.js +2 -2
- package/esm/dialog/dialog-foundation.d.ts +6 -6
- package/esm/dialog/dialog-foundation.js +1 -1
- package/esm/dialog/dialog.d.ts +4 -4
- package/esm/field/field-adapter.d.ts +4 -4
- package/esm/field/field-adapter.js +4 -13
- package/esm/field/field-foundation.js +2 -2
- package/esm/file-picker/file-picker-adapter.d.ts +4 -4
- package/esm/file-picker/file-picker-foundation.d.ts +9 -9
- package/esm/file-picker/file-picker.d.ts +6 -6
- package/esm/floating-label/floating-label-adapter.js +1 -1
- package/esm/index.d.ts +1 -0
- package/esm/index.js +3 -0
- package/esm/keyboard-shortcut/keyboard-shortcut-foundation.d.ts +3 -3
- package/esm/keyboard-shortcut/keyboard-shortcut-foundation.js +0 -1
- package/esm/keyboard-shortcut/keyboard-shortcut-utils.d.ts +1 -1
- package/esm/keyboard-shortcut/keyboard-shortcut-utils.js +5 -5
- package/esm/keyboard-shortcut/keyboard-shortcut.d.ts +6 -2
- package/esm/keyboard-shortcut/keyboard-shortcut.js +7 -0
- package/esm/menu/menu.d.ts +2 -2
- package/esm/paginator/paginator-foundation.js +15 -12
- package/esm/popup/popup.d.ts +3 -3
- package/esm/profile-card/profile-card-adapter.d.ts +4 -0
- package/esm/profile-card/profile-card-adapter.js +6 -0
- package/esm/profile-card/profile-card-constants.d.ts +4 -0
- package/esm/profile-card/profile-card-constants.js +5 -1
- package/esm/profile-card/profile-card-foundation.d.ts +6 -0
- package/esm/profile-card/profile-card-foundation.js +22 -0
- package/esm/profile-card/profile-card.d.ts +4 -0
- package/esm/profile-card/profile-card.js +15 -1
- package/esm/quantity-field/quantity-field-adapter.d.ts +0 -2
- package/esm/quantity-field/quantity-field-adapter.js +2 -14
- package/esm/quantity-field/quantity-field-foundation.js +0 -1
- package/esm/quantity-field/quantity-field.js +1 -1
- package/esm/select/select/select.js +1 -1
- package/esm/split-view/core/index.d.ts +6 -0
- package/esm/split-view/core/index.js +6 -0
- package/esm/split-view/core/split-view-base.d.ts +14 -0
- package/esm/split-view/core/split-view-base.js +6 -0
- package/esm/split-view/index.d.ts +8 -0
- package/esm/split-view/index.js +8 -0
- package/esm/split-view/split-view/index.d.ts +10 -0
- package/esm/split-view/split-view/index.js +14 -0
- package/esm/split-view/split-view/split-view-adapter.d.ts +29 -0
- package/esm/split-view/split-view/split-view-adapter.js +62 -0
- package/esm/split-view/split-view/split-view-constants.d.ts +41 -0
- package/esm/split-view/split-view/split-view-constants.js +40 -0
- package/esm/split-view/split-view/split-view-foundation.d.ts +86 -0
- package/esm/split-view/split-view/split-view-foundation.js +179 -0
- package/esm/split-view/split-view/split-view.d.ts +67 -0
- package/esm/split-view/split-view/split-view.js +103 -0
- package/esm/split-view/split-view-panel/index.d.ts +11 -0
- package/esm/split-view/split-view-panel/index.js +15 -0
- package/esm/split-view/split-view-panel/split-view-panel-adapter.d.ts +171 -0
- package/esm/split-view/split-view-panel/split-view-panel-adapter.js +295 -0
- package/esm/split-view/split-view-panel/split-view-panel-constants.d.ts +97 -0
- package/esm/split-view/split-view-panel/split-view-panel-constants.js +78 -0
- package/esm/split-view/split-view-panel/split-view-panel-foundation.d.ts +235 -0
- package/esm/split-view/split-view-panel/split-view-panel-foundation.js +667 -0
- package/esm/split-view/split-view-panel/split-view-panel-utils.d.ts +130 -0
- package/esm/split-view/split-view-panel/split-view-panel-utils.js +300 -0
- package/esm/split-view/split-view-panel/split-view-panel.d.ts +105 -0
- package/esm/split-view/split-view-panel/split-view-panel.js +173 -0
- package/esm/table/table-utils.d.ts +2 -2
- package/esm/table/table-utils.js +31 -15
- package/esm/table/table.d.ts +2 -2
- package/esm/text-field/text-field-adapter.d.ts +1 -1
- package/esm/text-field/text-field-adapter.js +2 -2
- package/esm/text-field/text-field.js +1 -1
- package/esm/time-picker/time-picker-foundation.d.ts +8 -8
- package/esm/time-picker/time-picker-foundation.js +4 -4
- package/esm/time-picker/time-picker-utils.d.ts +1 -1
- package/esm/time-picker/time-picker.d.ts +8 -8
- package/esm/tooltip/tooltip.d.ts +1 -1
- package/esm/view-switcher/view-switcher.d.ts +2 -2
- package/package.json +2 -2
- package/styles/chip-field/_base.scss +2 -2
- package/styles/chip-field/_selector.scss +1 -1
- package/styles/chip-field/_variables.scss +1 -1
- package/styles/chips/chip/_mixins.scss +4 -3
- package/styles/chips/chip/_variables.scss +3 -2
- package/styles/field/_base.scss +16 -4
- package/styles/field/_selector.scss +4 -4
- package/styles/quantity-field/_mixins.scss +1 -1
- package/styles/select/select/_selector.scss +1 -1
- package/styles/split-view/split-view/_mixins.scss +48 -0
- package/styles/split-view/split-view/split-view.scss +25 -0
- package/styles/split-view/split-view-panel/_mixins.scss +260 -0
- package/styles/split-view/split-view-panel/_variables.scss +7 -0
- package/styles/split-view/split-view-panel/split-view-panel.scss +23 -0
- package/styles/table/_mixins.scss +2 -0
- package/dist/esm/chunks/chunk.2MBI5DLT.js +0 -439
- package/dist/esm/chunks/chunk.2MBI5DLT.js.map +0 -7
- package/dist/esm/chunks/chunk.2NMHSTAO.js +0 -1473
- package/dist/esm/chunks/chunk.2WBHHTUM.js +0 -200
- package/dist/esm/chunks/chunk.35BJJH5E.js +0 -56
- package/dist/esm/chunks/chunk.35U3UPDV.js +0 -70
- package/dist/esm/chunks/chunk.3EHQ3YHJ.js +0 -52
- package/dist/esm/chunks/chunk.3QXCVTCP.js +0 -73
- package/dist/esm/chunks/chunk.46BED43J.js +0 -602
- package/dist/esm/chunks/chunk.46BED43J.js.map +0 -7
- package/dist/esm/chunks/chunk.4HQ5VELO.js +0 -793
- package/dist/esm/chunks/chunk.4HQ5VELO.js.map +0 -7
- package/dist/esm/chunks/chunk.4JURZYE4.js +0 -410
- package/dist/esm/chunks/chunk.4PF7WRP4.js +0 -450
- package/dist/esm/chunks/chunk.4WLVFWKI.js +0 -21
- package/dist/esm/chunks/chunk.56BNM7F2.js +0 -202
- package/dist/esm/chunks/chunk.5OYAJ36F.js +0 -21
- package/dist/esm/chunks/chunk.5U6ZT6MC.js +0 -296
- package/dist/esm/chunks/chunk.5VKAVHLM.js +0 -610
- package/dist/esm/chunks/chunk.67B6JDOJ.js +0 -654
- package/dist/esm/chunks/chunk.6EGTLHJS.js +0 -16
- package/dist/esm/chunks/chunk.6ZBFCE2A.js +0 -52
- package/dist/esm/chunks/chunk.7FWTBD6Y.js +0 -21
- package/dist/esm/chunks/chunk.7I2XNJBL.js +0 -593
- package/dist/esm/chunks/chunk.7I2XNJBL.js.map +0 -7
- package/dist/esm/chunks/chunk.7UAH67PT.js +0 -634
- package/dist/esm/chunks/chunk.ANME7BKM.js +0 -293
- package/dist/esm/chunks/chunk.BEAJZPWS.js +0 -72
- package/dist/esm/chunks/chunk.BKMWXPAS.js +0 -439
- package/dist/esm/chunks/chunk.BLZJIYMG.js +0 -55
- package/dist/esm/chunks/chunk.BVGJFMEG.js +0 -760
- package/dist/esm/chunks/chunk.BVGJFMEG.js.map +0 -7
- package/dist/esm/chunks/chunk.BYN27JXZ.js +0 -51
- package/dist/esm/chunks/chunk.CLEUHAZ6.js +0 -732
- package/dist/esm/chunks/chunk.D33KLIFD.js +0 -422
- package/dist/esm/chunks/chunk.D33KLIFD.js.map +0 -7
- package/dist/esm/chunks/chunk.DLF5JAQO.js +0 -552
- package/dist/esm/chunks/chunk.E26BROOG.js +0 -291
- package/dist/esm/chunks/chunk.EBC2HGO3.js +0 -372
- package/dist/esm/chunks/chunk.ELAJS33V.js +0 -145
- package/dist/esm/chunks/chunk.EUPO2VO2.js +0 -462
- package/dist/esm/chunks/chunk.EY57VTRF.js +0 -33
- package/dist/esm/chunks/chunk.FJJVIMZ2.js +0 -176
- package/dist/esm/chunks/chunk.FJJVIMZ2.js.map +0 -7
- package/dist/esm/chunks/chunk.FWJ7SIFA.js +0 -433
- package/dist/esm/chunks/chunk.FZ6KICMD.js +0 -297
- package/dist/esm/chunks/chunk.GHZ75UPO.js +0 -342
- package/dist/esm/chunks/chunk.GS2AXUCN.js +0 -150
- package/dist/esm/chunks/chunk.GWNR3UUX.js +0 -658
- package/dist/esm/chunks/chunk.GXTNND2M.js +0 -221
- package/dist/esm/chunks/chunk.HASAPJMX.js +0 -110
- package/dist/esm/chunks/chunk.HAWYW54W.js +0 -728
- package/dist/esm/chunks/chunk.HAWYW54W.js.map +0 -7
- package/dist/esm/chunks/chunk.HMM7PGGZ.js +0 -505
- package/dist/esm/chunks/chunk.HZISALRH.js +0 -20
- package/dist/esm/chunks/chunk.I6PJGNJS.js +0 -401
- package/dist/esm/chunks/chunk.I6PJGNJS.js.map +0 -7
- package/dist/esm/chunks/chunk.I7BQUB7Z.js +0 -212
- package/dist/esm/chunks/chunk.IBED5TWL.js +0 -649
- package/dist/esm/chunks/chunk.IGBDDH3J.js +0 -1203
- package/dist/esm/chunks/chunk.IGBDDH3J.js.map +0 -7
- package/dist/esm/chunks/chunk.IJW2YKP3.js +0 -1347
- package/dist/esm/chunks/chunk.IJW2YKP3.js.map +0 -7
- package/dist/esm/chunks/chunk.ITQ55IPH.js +0 -1335
- package/dist/esm/chunks/chunk.J5NUYQ4D.js +0 -840
- package/dist/esm/chunks/chunk.JC2PZ4TS.js +0 -463
- package/dist/esm/chunks/chunk.JC2PZ4TS.js.map +0 -7
- package/dist/esm/chunks/chunk.JKC5PU23.js +0 -42
- package/dist/esm/chunks/chunk.K2PCTUVN.js +0 -139
- package/dist/esm/chunks/chunk.K7OLG7CS.js +0 -244
- package/dist/esm/chunks/chunk.KCVJDJ6K.js +0 -105
- package/dist/esm/chunks/chunk.KNR5DXE4.js +0 -445
- package/dist/esm/chunks/chunk.KZATVOA6.js +0 -68
- package/dist/esm/chunks/chunk.L4OUV7W6.js +0 -236
- package/dist/esm/chunks/chunk.LCWRP2UI.js.map +0 -7
- package/dist/esm/chunks/chunk.LHWZ4KZU.js +0 -559
- package/dist/esm/chunks/chunk.LHWZ4KZU.js.map +0 -7
- package/dist/esm/chunks/chunk.LK2DN5KX.js +0 -72
- package/dist/esm/chunks/chunk.LM5TVNZY.js +0 -71
- package/dist/esm/chunks/chunk.LX2HDAIF.js +0 -458
- package/dist/esm/chunks/chunk.M3O5VPDD.js +0 -742
- package/dist/esm/chunks/chunk.MBZLA635.js +0 -684
- package/dist/esm/chunks/chunk.MEFT5FQC.js +0 -158
- package/dist/esm/chunks/chunk.MMIZOYAS.js +0 -147
- package/dist/esm/chunks/chunk.MUP3NY6M.js +0 -912
- package/dist/esm/chunks/chunk.NX5SKZLU.js +0 -50
- package/dist/esm/chunks/chunk.OXS2O7RG.js +0 -476
- package/dist/esm/chunks/chunk.PBGL3BRX.js +0 -27
- package/dist/esm/chunks/chunk.PKZ43JNW.js +0 -344
- package/dist/esm/chunks/chunk.PM7D2SUE.js +0 -297
- package/dist/esm/chunks/chunk.PM7D2SUE.js.map +0 -7
- package/dist/esm/chunks/chunk.PNKLV3BK.js +0 -513
- package/dist/esm/chunks/chunk.PNKLV3BK.js.map +0 -7
- package/dist/esm/chunks/chunk.Q4YMHFRY.js +0 -155
- package/dist/esm/chunks/chunk.QD7EPCL6.js +0 -144
- package/dist/esm/chunks/chunk.QD7EPCL6.js.map +0 -7
- package/dist/esm/chunks/chunk.QHHYCB7N.js +0 -56
- package/dist/esm/chunks/chunk.QWW6A7AF.js +0 -603
- package/dist/esm/chunks/chunk.QWW6A7AF.js.map +0 -7
- package/dist/esm/chunks/chunk.QXZZ2MTF.js +0 -52
- package/dist/esm/chunks/chunk.QYWAZCBX.js +0 -258
- package/dist/esm/chunks/chunk.RD4RIFOZ.js +0 -307
- package/dist/esm/chunks/chunk.RL7ZFLMG.js +0 -801
- package/dist/esm/chunks/chunk.RL7ZFLMG.js.map +0 -7
- package/dist/esm/chunks/chunk.RV3E762Y.js +0 -73
- package/dist/esm/chunks/chunk.S3UVF647.js +0 -168
- package/dist/esm/chunks/chunk.SNAZ6JSS.js +0 -22
- package/dist/esm/chunks/chunk.THKWQXBJ.js +0 -52
- package/dist/esm/chunks/chunk.TIUNGGBF.js +0 -964
- package/dist/esm/chunks/chunk.TIUNGGBF.js.map +0 -7
- package/dist/esm/chunks/chunk.TM46MNYN.js +0 -417
- package/dist/esm/chunks/chunk.TYU4RLZG.js +0 -648
- package/dist/esm/chunks/chunk.U37G47LH.js +0 -2994
- package/dist/esm/chunks/chunk.U37G47LH.js.map +0 -7
- package/dist/esm/chunks/chunk.U5ECVIX5.js +0 -561
- package/dist/esm/chunks/chunk.UFMUXBT4.js +0 -317
- package/dist/esm/chunks/chunk.UFMUXBT4.js.map +0 -7
- package/dist/esm/chunks/chunk.UPW5HUKB.js +0 -136
- package/dist/esm/chunks/chunk.UQ3QTUUB.js +0 -173
- package/dist/esm/chunks/chunk.V2ELLBDP.js +0 -1591
- package/dist/esm/chunks/chunk.V6Q2SM6Y.js +0 -187
- package/dist/esm/chunks/chunk.VHO7NUMI.js +0 -37
- package/dist/esm/chunks/chunk.VK6LIH3B.js +0 -13
- package/dist/esm/chunks/chunk.VXAPRFMK.js +0 -978
- package/dist/esm/chunks/chunk.VXAPRFMK.js.map +0 -7
- package/dist/esm/chunks/chunk.VXVE7KEM.js +0 -248
- package/dist/esm/chunks/chunk.WDD2GTIH.js +0 -73
- package/dist/esm/chunks/chunk.WIYLQTSX.js +0 -3550
- package/dist/esm/chunks/chunk.WNVZQDNS.js +0 -540
- package/dist/esm/chunks/chunk.WSH4S3GM.js +0 -507
- package/dist/esm/chunks/chunk.WT4W2IFT.js +0 -92
- package/dist/esm/chunks/chunk.XE7ZMJBZ.js +0 -2430
- package/dist/esm/chunks/chunk.XE7ZMJBZ.js.map +0 -7
- package/dist/esm/chunks/chunk.YL2NAVJW.js +0 -244
- package/dist/esm/chunks/chunk.ZLF2G3YT.js +0 -350
- package/dist/esm/chunks/chunk.ZSHQMR4O.js +0 -59
- package/dist/esm/chunks/chunk.ZXIDTDRC.js +0 -419
|
@@ -1,2430 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2022 Tyler Technologies, Inc.
|
|
4
|
-
* License: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import {
|
|
7
|
-
createPredicate,
|
|
8
|
-
findWhere,
|
|
9
|
-
getPropertyValue,
|
|
10
|
-
matchesPredicate
|
|
11
|
-
} from "./chunk.RV3E762Y.js";
|
|
12
|
-
import {
|
|
13
|
-
CHECKBOX_CONSTANTS,
|
|
14
|
-
CheckboxComponent
|
|
15
|
-
} from "./chunk.7UAH67PT.js";
|
|
16
|
-
import {
|
|
17
|
-
EXPANSION_PANEL_CONSTANTS,
|
|
18
|
-
ExpansionPanelComponent
|
|
19
|
-
} from "./chunk.KNR5DXE4.js";
|
|
20
|
-
import {
|
|
21
|
-
getEventPath
|
|
22
|
-
} from "./chunk.EY57VTRF.js";
|
|
23
|
-
import {
|
|
24
|
-
tylIconArrowDownward
|
|
25
|
-
} from "./chunk.GS2AXUCN.js";
|
|
26
|
-
import {
|
|
27
|
-
TOOLTIP_CONSTANTS
|
|
28
|
-
} from "./chunk.NX5SKZLU.js";
|
|
29
|
-
import {
|
|
30
|
-
ICON_CONSTANTS,
|
|
31
|
-
IconComponent,
|
|
32
|
-
IconRegistry
|
|
33
|
-
} from "./chunk.WSH4S3GM.js";
|
|
34
|
-
import {
|
|
35
|
-
FormFieldComponentDelegate
|
|
36
|
-
} from "./chunk.HZISALRH.js";
|
|
37
|
-
import {
|
|
38
|
-
BaseAdapter
|
|
39
|
-
} from "./chunk.KZATVOA6.js";
|
|
40
|
-
import {
|
|
41
|
-
FoundationProperty
|
|
42
|
-
} from "./chunk.MMIZOYAS.js";
|
|
43
|
-
import {
|
|
44
|
-
COMPONENT_NAME_PREFIX,
|
|
45
|
-
CustomElement
|
|
46
|
-
} from "./chunk.35U3UPDV.js";
|
|
47
|
-
import {
|
|
48
|
-
BaseComponent
|
|
49
|
-
} from "./chunk.VK6LIH3B.js";
|
|
50
|
-
import {
|
|
51
|
-
defineCustomElement
|
|
52
|
-
} from "./chunk.K2PCTUVN.js";
|
|
53
|
-
import {
|
|
54
|
-
addClass,
|
|
55
|
-
removeAllChildren,
|
|
56
|
-
removeClass,
|
|
57
|
-
removeElement,
|
|
58
|
-
replaceElement,
|
|
59
|
-
safeCssWidth,
|
|
60
|
-
toggleClass
|
|
61
|
-
} from "./chunk.4JURZYE4.js";
|
|
62
|
-
import {
|
|
63
|
-
coerceBoolean,
|
|
64
|
-
coerceNumber,
|
|
65
|
-
debounce,
|
|
66
|
-
isDefined,
|
|
67
|
-
isFunction,
|
|
68
|
-
isNumber,
|
|
69
|
-
isObject,
|
|
70
|
-
isString
|
|
71
|
-
} from "./chunk.MEFT5FQC.js";
|
|
72
|
-
import {
|
|
73
|
-
__decorateClass,
|
|
74
|
-
__spreadValues
|
|
75
|
-
} from "./chunk.LM5TVNZY.js";
|
|
76
|
-
|
|
77
|
-
// node_modules/@tylertech/forge-core/esm/utils/item-manager.js
|
|
78
|
-
var ItemManager = class {
|
|
79
|
-
constructor(_key) {
|
|
80
|
-
this._key = _key;
|
|
81
|
-
this._items = [];
|
|
82
|
-
}
|
|
83
|
-
getItems() {
|
|
84
|
-
return [...this._items];
|
|
85
|
-
}
|
|
86
|
-
count() {
|
|
87
|
-
return this._items.length;
|
|
88
|
-
}
|
|
89
|
-
setKey(key) {
|
|
90
|
-
this._key = key;
|
|
91
|
-
}
|
|
92
|
-
add(data) {
|
|
93
|
-
if (!(data instanceof Array)) {
|
|
94
|
-
data = [data];
|
|
95
|
-
}
|
|
96
|
-
data.forEach((item) => {
|
|
97
|
-
if (!this.exists(item)) {
|
|
98
|
-
this._items.push(item);
|
|
99
|
-
}
|
|
100
|
-
});
|
|
101
|
-
return this;
|
|
102
|
-
}
|
|
103
|
-
remove(data) {
|
|
104
|
-
if (!(data instanceof Array)) {
|
|
105
|
-
data = [data];
|
|
106
|
-
}
|
|
107
|
-
for (let i = data.length - 1; i >= 0; i--) {
|
|
108
|
-
if (this.exists(data[i])) {
|
|
109
|
-
this._items.splice(this._items.indexOf(this._getItem(data[i])), 1);
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
return this;
|
|
113
|
-
}
|
|
114
|
-
clear() {
|
|
115
|
-
this._items = [];
|
|
116
|
-
return this;
|
|
117
|
-
}
|
|
118
|
-
exists(data) {
|
|
119
|
-
return this._getItem(data) !== null;
|
|
120
|
-
}
|
|
121
|
-
_getItem(data) {
|
|
122
|
-
if (this._key) {
|
|
123
|
-
return findWhere(this._items, createPredicate(this._key, data)) || null;
|
|
124
|
-
} else {
|
|
125
|
-
return this._items.find((item) => item === data) || null;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
};
|
|
129
|
-
|
|
130
|
-
// dist/build/lib/staging/src/table/table-constants.ts
|
|
131
|
-
var elementName = `${COMPONENT_NAME_PREFIX}table`;
|
|
132
|
-
var classes = {
|
|
133
|
-
TABLE: "forge-table",
|
|
134
|
-
TABLE_DENSE: "forge-table--dense",
|
|
135
|
-
TABLE_ROOMY: "forge-table--roomy",
|
|
136
|
-
TABLE_RESIZABLE: "forge-table--resizable",
|
|
137
|
-
TABLE_RESIZING: "forge-table--resizing",
|
|
138
|
-
TABLE_RESIZE_HANDLE: "forge-table__resize-handle",
|
|
139
|
-
TABLE_NO_WRAP_CONTENT: "forge-table--no-wrap-content",
|
|
140
|
-
TABLE_LAYOUT_FIXED: "forge-table--layout-fixed",
|
|
141
|
-
TABLE_FILTER_VISIBLE: "forge-table--filter-visible",
|
|
142
|
-
TABLE_FIXED: "forge-table--fixed",
|
|
143
|
-
TABLE_HEAD: "forge-table-head",
|
|
144
|
-
TABLE_HEAD_ROW: "forge-table-head__row",
|
|
145
|
-
TABLE_HEAD_ROW_FILTER: "forge-table-head__row__filter",
|
|
146
|
-
TABLE_HEAD_CELL: "forge-table-head__cell",
|
|
147
|
-
TABLE_HEAD_CELL_CONTAINER: "forge-table-head__cell-container",
|
|
148
|
-
TABLE_HEAD_CELL_SORTABLE: "forge-table-head__cell--sortable",
|
|
149
|
-
TABLE_HEAD_CELL_SORT_ICON: "forge-table-head__cell-sort-icon",
|
|
150
|
-
TABLE_HEAD_CELL_TEXT: "forge-table-head__cell-text",
|
|
151
|
-
TABLE_HEAD_CELL_SORT_ICON_ACTIVE: "forge-table-head__cell-sort-icon--active",
|
|
152
|
-
TABLE_HEAD_CELL_SORTED_ASCENDING: "forge-table-head__cell--sorted-ascending",
|
|
153
|
-
TABLE_HEAD_CELL_SORTED_DESCENDING: "forge-table-head__cell--sorted-descending",
|
|
154
|
-
TABLE_HEAD_CELL_SORT_ORDER: "forge-table-head__cell__sort-order",
|
|
155
|
-
TABLE_HEAD_CELL_SORT_ORDER_HIDDEN: "forge-table-head__cell__sort-order--hidden",
|
|
156
|
-
TABLE_BODY: "forge-table-body",
|
|
157
|
-
TABLE_BODY_ROW: "forge-table-body__row",
|
|
158
|
-
TABLE_BODY_ROW_SELECTED: "forge-table-body__row--selected",
|
|
159
|
-
TABLE_BODY_ROW_CLICKABLE: "forge-table-body__row--clickable",
|
|
160
|
-
TABLE_BODY_CELL: "forge-table-body__cell",
|
|
161
|
-
TABLE_ROW: "forge-table-row",
|
|
162
|
-
TABLE_ROW_EXPANDED: "forge-table-row--expanded",
|
|
163
|
-
TABLE_ROW_EXPANDABLE_CONTENT: "forge-table-row__expandable-content",
|
|
164
|
-
TABLE_ROW_EXPANDABLE_CONTENT_CELL: "forge-table-row__expandable-content-cell",
|
|
165
|
-
TABLE_CELL: "forge-table-cell",
|
|
166
|
-
TABLE_CELL_SELECT: "forge-table-cell__select",
|
|
167
|
-
TABLE_CELL_SELECT_CHECKBOX: "forge-table-cell__select-checkbox",
|
|
168
|
-
TABLE_CELL_SELECT_CHECKBOX_CONTAINER: "forge-table-cell__select-checkbox-container",
|
|
169
|
-
TABLE_CELL_SELECT_CHECKBOX_CONTAINER_ALIGN_RIGHT: "forge-table-cell__select-checkbox-container--align-right",
|
|
170
|
-
TABLE_CELL_SELECT_CHECKBOX_CONTAINER_ALIGN_LEFT: "forge-table-cell__select-checkbox-container--align-left",
|
|
171
|
-
TABLE_CELL_SELECT_CHECKBOX_CONTAINER_ALIGN_CENTER: "forge-table-cell__select-checkbox-container--align-center",
|
|
172
|
-
TABLE_CELL_CONTAINER: "forge-table-cell__container",
|
|
173
|
-
TABLE_CELL_CONTAINER_TEXT: "forge-table-cell__container-text",
|
|
174
|
-
TABLE_CELL_CENTER: "forge-table-cell--center",
|
|
175
|
-
TABLE_CELL_RIGHT: "forge-table-cell--right",
|
|
176
|
-
TABLE_CELL_RESIZABLE: "forge-table-cell--resizing"
|
|
177
|
-
};
|
|
178
|
-
var selectors = {
|
|
179
|
-
TABLE: ".forge-table",
|
|
180
|
-
CHECKBOX_INPUT: "forge-checkbox > input[type=checkbox]:not([forge-ignore])",
|
|
181
|
-
SELECT_ALL_TEMPLATE_CHECKBOX_INPUT: "input[type=checkbox]:not([forge-ignore])",
|
|
182
|
-
ROW_SELECTED: `.${classes.TABLE_BODY_ROW_SELECTED}`
|
|
183
|
-
};
|
|
184
|
-
var attributes = {
|
|
185
|
-
SELECT: "select",
|
|
186
|
-
MULTISELECT: "multiselect",
|
|
187
|
-
SELECT_KEY: "select-key",
|
|
188
|
-
DENSE: "dense",
|
|
189
|
-
ROOMY: "roomy",
|
|
190
|
-
FILTER: "filter",
|
|
191
|
-
FIXED_HEADERS: "fixed-headers",
|
|
192
|
-
LAYOUT_TYPE: "layout-type",
|
|
193
|
-
WRAP_CONTENT: "wrap-content",
|
|
194
|
-
RESIZABLE: "resizable",
|
|
195
|
-
MIN_RESIZE_WIDTH: "min-resize-width",
|
|
196
|
-
ALLOW_ROW_CLICK: "allow-row-click",
|
|
197
|
-
MULTI_COLUMN_SORT: "multi-column-sort",
|
|
198
|
-
SELECT_CHECKBOX_ALIGNMENT: "select-checkbox-alignment",
|
|
199
|
-
TOOLTIP_SELECT: "tooltip-select",
|
|
200
|
-
TOOLTIP_SELECT_ALL: "tooltip-select-all",
|
|
201
|
-
CHECKBOX_TYPE: "forge-checkbox-type",
|
|
202
|
-
CUSTOM_CELL_TEMPLATE: "data-cell-template",
|
|
203
|
-
CUSTOM_CELL_TEMPLATE_STOP_PROPAGATION: "data-cell-template-stop-propagation"
|
|
204
|
-
};
|
|
205
|
-
var events = {
|
|
206
|
-
ROW_CLICK: `${elementName}-row-click`,
|
|
207
|
-
SELECT: `${elementName}-select`,
|
|
208
|
-
SELECT_DOUBLE: `${elementName}-select-double`,
|
|
209
|
-
SELECT_ALL: `${elementName}-select-all`,
|
|
210
|
-
SORT: `${elementName}-sort`,
|
|
211
|
-
FILTER: `${elementName}-filter`,
|
|
212
|
-
INITIALIZED: `${elementName}-initialized`,
|
|
213
|
-
COLUMN_RESIZE: `${elementName}-column-resize`
|
|
214
|
-
};
|
|
215
|
-
var strings = {
|
|
216
|
-
SELECT_ALL: "select-all",
|
|
217
|
-
SELECT_ROW: "select-row",
|
|
218
|
-
DEFAULT_LAYOUT_TYPE: "auto"
|
|
219
|
-
};
|
|
220
|
-
var icons = {
|
|
221
|
-
SORT_DOWN: "arrow_downward"
|
|
222
|
-
};
|
|
223
|
-
var numbers = {
|
|
224
|
-
DEFAULT_FILTER_DEBOUNCE_TIME: 750,
|
|
225
|
-
MIN_RESIZE_WIDTH: 100,
|
|
226
|
-
RESIZE_HOVER_DURATION: 150
|
|
227
|
-
};
|
|
228
|
-
var TABLE_CONSTANTS = {
|
|
229
|
-
elementName,
|
|
230
|
-
classes,
|
|
231
|
-
selectors,
|
|
232
|
-
attributes,
|
|
233
|
-
events,
|
|
234
|
-
strings,
|
|
235
|
-
icons,
|
|
236
|
-
numbers
|
|
237
|
-
};
|
|
238
|
-
|
|
239
|
-
// dist/build/lib/staging/src/table/types.ts
|
|
240
|
-
var CellAlign = /* @__PURE__ */ ((CellAlign2) => {
|
|
241
|
-
CellAlign2["Left"] = "left";
|
|
242
|
-
CellAlign2["Right"] = "right";
|
|
243
|
-
CellAlign2["Center"] = "center";
|
|
244
|
-
return CellAlign2;
|
|
245
|
-
})(CellAlign || {});
|
|
246
|
-
var SortDirection = /* @__PURE__ */ ((SortDirection2) => {
|
|
247
|
-
SortDirection2["Ascending"] = "ASC";
|
|
248
|
-
SortDirection2["Descending"] = "DESC";
|
|
249
|
-
SortDirection2["Unset"] = "UNSET";
|
|
250
|
-
return SortDirection2;
|
|
251
|
-
})(SortDirection || {});
|
|
252
|
-
var TableFilterType = /* @__PURE__ */ ((TableFilterType2) => {
|
|
253
|
-
TableFilterType2["InputText"] = "text";
|
|
254
|
-
TableFilterType2["InputNumber"] = "number";
|
|
255
|
-
TableFilterType2["Select"] = "select";
|
|
256
|
-
TableFilterType2["SelectMultiple"] = "select-multiple";
|
|
257
|
-
TableFilterType2["Date"] = "date";
|
|
258
|
-
TableFilterType2["DateRange"] = "date-range";
|
|
259
|
-
return TableFilterType2;
|
|
260
|
-
})(TableFilterType || {});
|
|
261
|
-
|
|
262
|
-
// dist/build/lib/staging/src/table/table-utils.ts
|
|
263
|
-
function isTemplateResultObject(val) {
|
|
264
|
-
return val && typeof val === "object" && "content" in val;
|
|
265
|
-
}
|
|
266
|
-
var TableUtils = class {
|
|
267
|
-
static createTable(configuration) {
|
|
268
|
-
TableUtils._resetTable(configuration.tableElement);
|
|
269
|
-
const thead = TableUtils._createTableHead(configuration);
|
|
270
|
-
const tbody = TableUtils._createTableBody(configuration);
|
|
271
|
-
if (configuration.clickListener) {
|
|
272
|
-
TableUtils._attachRowClickListeners(tbody, configuration.clickListener, configuration.doubleClickListener);
|
|
273
|
-
TableUtils._addRowClickAttributes(tbody);
|
|
274
|
-
}
|
|
275
|
-
if (configuration.fixedHeaders) {
|
|
276
|
-
TableUtils.setFixedHeaders(configuration);
|
|
277
|
-
}
|
|
278
|
-
if (configuration.resizable) {
|
|
279
|
-
TableUtils.setResizable(configuration);
|
|
280
|
-
}
|
|
281
|
-
if (configuration.dense) {
|
|
282
|
-
TableUtils.setDenseState(configuration.tableElement, configuration.dense);
|
|
283
|
-
}
|
|
284
|
-
if (configuration.wrapContent) {
|
|
285
|
-
TableUtils.setWrapContentState(configuration.tableElement, configuration.wrapContent);
|
|
286
|
-
}
|
|
287
|
-
if (configuration.selectListener) {
|
|
288
|
-
TableUtils._addSelectColumn(thead, tbody, configuration.selectListener, configuration.selectAllListener, configuration.selectAllTemplate, configuration.selectCheckboxAlignment, configuration.data, configuration.tooltipSelect, configuration.tooltipSelectAll);
|
|
289
|
-
}
|
|
290
|
-
if (configuration.resizable || configuration.columnConfigurations.some((c) => !!c.sortable)) {
|
|
291
|
-
TableUtils._attachHeadRowMouseDownListener(thead, configuration.headRowMouseDownListener);
|
|
292
|
-
if (TableUtils._isMac()) {
|
|
293
|
-
TableUtils._attachHeadRowContextMenuListener(thead, configuration.headRowContextMenuListener);
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
TableUtils.setLayoutType(configuration);
|
|
297
|
-
TableUtils._setTableHead(configuration.tableElement, thead);
|
|
298
|
-
if (configuration.filter) {
|
|
299
|
-
TableUtils.setFilterRow(configuration);
|
|
300
|
-
}
|
|
301
|
-
TableUtils._setTableBody(configuration.tableElement, tbody);
|
|
302
|
-
}
|
|
303
|
-
static _setTableHead(tableElement, thead) {
|
|
304
|
-
if (tableElement.tHead) {
|
|
305
|
-
replaceElement(thead, tableElement.tHead);
|
|
306
|
-
} else {
|
|
307
|
-
tableElement.appendChild(thead);
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
static _setTableBody(tableElement, tbody) {
|
|
311
|
-
if (tableElement.tBodies.length) {
|
|
312
|
-
replaceElement(tbody, tableElement.tBodies[0]);
|
|
313
|
-
} else {
|
|
314
|
-
tableElement.appendChild(tbody);
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
static recreateTableBody(configuration) {
|
|
318
|
-
const tbody = TableUtils._createTableBody(configuration);
|
|
319
|
-
if (configuration.clickListener) {
|
|
320
|
-
TableUtils._attachRowClickListeners(tbody, configuration.clickListener, configuration.doubleClickListener);
|
|
321
|
-
}
|
|
322
|
-
if (configuration.selectListener) {
|
|
323
|
-
TableUtils._createBodySelectColumn(tbody, configuration.selectCheckboxAlignment, configuration.data, configuration.tooltipSelect, configuration.tooltipSelectAll);
|
|
324
|
-
TableUtils._attachRowSelectListeners(tbody, configuration.selectListener);
|
|
325
|
-
}
|
|
326
|
-
TableUtils._setTableBody(configuration.tableElement, tbody);
|
|
327
|
-
}
|
|
328
|
-
static _resetTable(tableElement) {
|
|
329
|
-
removeAllChildren(tableElement);
|
|
330
|
-
}
|
|
331
|
-
static _createMultisortTooltip() {
|
|
332
|
-
const tooltip = document.createElement(TOOLTIP_CONSTANTS.elementName);
|
|
333
|
-
tooltip.textContent = "Ctrl + click to sort multiple columns";
|
|
334
|
-
tooltip.position = "bottom";
|
|
335
|
-
tooltip.delay = 0;
|
|
336
|
-
return tooltip;
|
|
337
|
-
}
|
|
338
|
-
static _createTableHead(tableConfiguration) {
|
|
339
|
-
const thead = document.createElement("thead");
|
|
340
|
-
const tr = thead.insertRow();
|
|
341
|
-
addClass([TABLE_CONSTANTS.classes.TABLE_ROW, TABLE_CONSTANTS.classes.TABLE_HEAD_ROW], tr);
|
|
342
|
-
let setInitialSort = false;
|
|
343
|
-
for (let i = 0; i < tableConfiguration.columnConfigurations.length; i++) {
|
|
344
|
-
const columnConfig = tableConfiguration.columnConfigurations[i];
|
|
345
|
-
const th = document.createElement("th");
|
|
346
|
-
th.scope = "col";
|
|
347
|
-
addClass([TABLE_CONSTANTS.classes.TABLE_CELL, TABLE_CONSTANTS.classes.TABLE_HEAD_CELL], th);
|
|
348
|
-
const cellContainer = document.createElement("div");
|
|
349
|
-
cellContainer.classList.add(TABLE_CONSTANTS.classes.TABLE_HEAD_CELL_CONTAINER);
|
|
350
|
-
if (tableConfiguration.multiColumnSort) {
|
|
351
|
-
const tooltip = TableUtils._createMultisortTooltip();
|
|
352
|
-
cellContainer.appendChild(tooltip);
|
|
353
|
-
}
|
|
354
|
-
if (columnConfig.align) {
|
|
355
|
-
TableUtils._setCellAlignmentClass(cellContainer, columnConfig.align);
|
|
356
|
-
}
|
|
357
|
-
if (isDefined(columnConfig.width)) {
|
|
358
|
-
const width = safeCssWidth(columnConfig.width);
|
|
359
|
-
if (width) {
|
|
360
|
-
th.style.width = width;
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
if (tableConfiguration.resizable && columnConfig.resizable !== false) {
|
|
364
|
-
const resizeHandle = document.createElement("div");
|
|
365
|
-
resizeHandle.classList.add(TABLE_CONSTANTS.classes.TABLE_RESIZE_HANDLE);
|
|
366
|
-
th.appendChild(resizeHandle);
|
|
367
|
-
}
|
|
368
|
-
if (isDefined(columnConfig.headerCellStyle) && isObject(columnConfig.headerCellStyle)) {
|
|
369
|
-
Object.assign(th.style, columnConfig.headerCellStyle);
|
|
370
|
-
Object.assign(cellContainer.style, columnConfig.headerCellStyle);
|
|
371
|
-
}
|
|
372
|
-
const span = document.createElement("span");
|
|
373
|
-
span.classList.add(TABLE_CONSTANTS.classes.TABLE_HEAD_CELL_TEXT);
|
|
374
|
-
span.textContent = columnConfig.header && typeof columnConfig.header === "string" ? columnConfig.header.trim() : "";
|
|
375
|
-
if (columnConfig.sortable) {
|
|
376
|
-
th.classList.add(TABLE_CONSTANTS.classes.TABLE_HEAD_CELL_SORTABLE);
|
|
377
|
-
const sortOrderElement = document.createElement("span");
|
|
378
|
-
addClass([TABLE_CONSTANTS.classes.TABLE_HEAD_CELL_SORT_ORDER_HIDDEN, TABLE_CONSTANTS.classes.TABLE_HEAD_CELL_SORT_ORDER], sortOrderElement);
|
|
379
|
-
const iconElement = document.createElement(ICON_CONSTANTS.elementName);
|
|
380
|
-
iconElement.name = TABLE_CONSTANTS.icons.SORT_DOWN;
|
|
381
|
-
addClass([TABLE_CONSTANTS.classes.TABLE_HEAD_CELL_SORT_ICON], iconElement);
|
|
382
|
-
if (tableConfiguration.multiColumnSort) {
|
|
383
|
-
if (typeof columnConfig.initialSort === "object" && columnConfig.initialSort.sortOrder) {
|
|
384
|
-
sortOrderElement.textContent = columnConfig.initialSort.sortOrder.toString();
|
|
385
|
-
if (tableConfiguration.columnConfigurations.filter((c) => typeof c.initialSort === "object").length > 1) {
|
|
386
|
-
removeClass(TABLE_CONSTANTS.classes.TABLE_HEAD_CELL_SORT_ORDER_HIDDEN, sortOrderElement);
|
|
387
|
-
}
|
|
388
|
-
th.classList.add(TABLE_CONSTANTS.classes.TABLE_HEAD_CELL_SORTED_DESCENDING);
|
|
389
|
-
iconElement.classList.add(TABLE_CONSTANTS.classes.TABLE_HEAD_CELL_SORT_ICON_ACTIVE);
|
|
390
|
-
TableUtils._setColumnSortDirection(th, columnConfig.initialSort.direction);
|
|
391
|
-
}
|
|
392
|
-
} else {
|
|
393
|
-
if (tableConfiguration.sortedColumn === i && !setInitialSort && !tableConfiguration.multiColumnSort) {
|
|
394
|
-
th.classList.add(TABLE_CONSTANTS.classes.TABLE_HEAD_CELL_SORTED_DESCENDING);
|
|
395
|
-
iconElement.classList.add(TABLE_CONSTANTS.classes.TABLE_HEAD_CELL_SORT_ICON_ACTIVE);
|
|
396
|
-
TableUtils._setColumnSortDirection(th, tableConfiguration.sortDirection);
|
|
397
|
-
setInitialSort = true;
|
|
398
|
-
}
|
|
399
|
-
}
|
|
400
|
-
cellContainer.appendChild(iconElement);
|
|
401
|
-
cellContainer.appendChild(sortOrderElement);
|
|
402
|
-
}
|
|
403
|
-
if (typeof columnConfig.headerTemplate === "function") {
|
|
404
|
-
Promise.resolve(columnConfig.headerTemplate(i, cellContainer, columnConfig)).then((element) => {
|
|
405
|
-
if (element) {
|
|
406
|
-
const node = document.createElement("div");
|
|
407
|
-
addClass(TABLE_CONSTANTS.classes.TABLE_CELL_CONTAINER, node);
|
|
408
|
-
if (typeof element === "string") {
|
|
409
|
-
node.innerHTML = element;
|
|
410
|
-
} else {
|
|
411
|
-
TableUtils._prepend(element, node);
|
|
412
|
-
}
|
|
413
|
-
node.setAttribute(TABLE_CONSTANTS.attributes.CUSTOM_CELL_TEMPLATE, "");
|
|
414
|
-
TableUtils._prepend(node, cellContainer);
|
|
415
|
-
}
|
|
416
|
-
});
|
|
417
|
-
} else {
|
|
418
|
-
TableUtils._prepend(span, cellContainer);
|
|
419
|
-
}
|
|
420
|
-
th.appendChild(cellContainer);
|
|
421
|
-
tr.appendChild(th);
|
|
422
|
-
}
|
|
423
|
-
return thead;
|
|
424
|
-
}
|
|
425
|
-
static setSortDirection(tableElement, columnIndex, sortDirection) {
|
|
426
|
-
const cell = TableUtils._getHeaderCellByIndex(tableElement, columnIndex);
|
|
427
|
-
TableUtils._setColumnSortDirection(cell, sortDirection);
|
|
428
|
-
}
|
|
429
|
-
static _setColumnSortDirection(thElement, sortDirection) {
|
|
430
|
-
if (thElement.classList.contains(TABLE_CONSTANTS.classes.TABLE_HEAD_CELL_SORTED_ASCENDING)) {
|
|
431
|
-
thElement.classList.remove(TABLE_CONSTANTS.classes.TABLE_HEAD_CELL_SORTED_ASCENDING);
|
|
432
|
-
}
|
|
433
|
-
if (thElement.classList.contains(TABLE_CONSTANTS.classes.TABLE_HEAD_CELL_SORTED_DESCENDING)) {
|
|
434
|
-
thElement.classList.remove(TABLE_CONSTANTS.classes.TABLE_HEAD_CELL_SORTED_DESCENDING);
|
|
435
|
-
}
|
|
436
|
-
if (!sortDirection || sortDirection === "DESC" /* Descending */) {
|
|
437
|
-
thElement.classList.add(TABLE_CONSTANTS.classes.TABLE_HEAD_CELL_SORTED_DESCENDING);
|
|
438
|
-
} else {
|
|
439
|
-
thElement.classList.add(TABLE_CONSTANTS.classes.TABLE_HEAD_CELL_SORTED_ASCENDING);
|
|
440
|
-
}
|
|
441
|
-
}
|
|
442
|
-
static _createTableBody(configuration) {
|
|
443
|
-
const tbody = document.createElement("tbody");
|
|
444
|
-
const rowData = TableUtils._getOrderedRowData(configuration.columnConfigurations, configuration.data);
|
|
445
|
-
rowData.forEach((cellData, rowIndex) => {
|
|
446
|
-
const tr = tbody.insertRow();
|
|
447
|
-
addClass([TABLE_CONSTANTS.classes.TABLE_ROW, TABLE_CONSTANTS.classes.TABLE_BODY_ROW], tr);
|
|
448
|
-
TableUtils._populateRowCells(configuration, tr, cellData, rowIndex);
|
|
449
|
-
if (typeof configuration.rowCreatedCallback === "function") {
|
|
450
|
-
configuration.rowCreatedCallback(tr, rowIndex, __spreadValues({}, configuration.data[rowIndex].data));
|
|
451
|
-
}
|
|
452
|
-
});
|
|
453
|
-
return tbody;
|
|
454
|
-
}
|
|
455
|
-
static _populateRowCells(configuration, tr, cellData, rowIndex) {
|
|
456
|
-
for (let i = 0; i < cellData.length; i++) {
|
|
457
|
-
const columnConfig = configuration.columnConfigurations[i];
|
|
458
|
-
const td = tr.insertCell();
|
|
459
|
-
addClass([TABLE_CONSTANTS.classes.TABLE_CELL, TABLE_CONSTANTS.classes.TABLE_BODY_CELL], td);
|
|
460
|
-
if (isDefined(columnConfig.width)) {
|
|
461
|
-
const width = safeCssWidth(columnConfig.width);
|
|
462
|
-
if (width) {
|
|
463
|
-
td.style.width = width;
|
|
464
|
-
}
|
|
465
|
-
}
|
|
466
|
-
const div = document.createElement("div");
|
|
467
|
-
div.classList.add(TABLE_CONSTANTS.classes.TABLE_CELL_CONTAINER);
|
|
468
|
-
if (isDefined(columnConfig.cellStyle) && isObject(columnConfig.cellStyle)) {
|
|
469
|
-
Object.assign(td.style, columnConfig.cellStyle);
|
|
470
|
-
Object.assign(div.style, columnConfig.cellStyle);
|
|
471
|
-
}
|
|
472
|
-
if (columnConfig.template && typeof columnConfig.template === "function") {
|
|
473
|
-
const rowData = configuration.data[rowIndex] ? configuration.data[rowIndex].data : void 0;
|
|
474
|
-
Promise.resolve(columnConfig.template(rowIndex, div, rowData)).then((result) => {
|
|
475
|
-
const config = isTemplateResultObject(result) ? result : { content: result, stopClickPropagation: columnConfig.stopCellTemplateClickPropagation };
|
|
476
|
-
if (!config.content) {
|
|
477
|
-
return;
|
|
478
|
-
}
|
|
479
|
-
if (typeof config.content === "string") {
|
|
480
|
-
div.innerHTML = config.content;
|
|
481
|
-
} else {
|
|
482
|
-
div.appendChild(config.content);
|
|
483
|
-
}
|
|
484
|
-
div.setAttribute(TABLE_CONSTANTS.attributes.CUSTOM_CELL_TEMPLATE, "");
|
|
485
|
-
if (config.stopClickPropagation) {
|
|
486
|
-
div.setAttribute(TABLE_CONSTANTS.attributes.CUSTOM_CELL_TEMPLATE_STOP_PROPAGATION, "");
|
|
487
|
-
}
|
|
488
|
-
});
|
|
489
|
-
} else if (columnConfig.property) {
|
|
490
|
-
const span = document.createElement("span");
|
|
491
|
-
span.classList.add(TABLE_CONSTANTS.classes.TABLE_CELL_CONTAINER_TEXT);
|
|
492
|
-
div.appendChild(span);
|
|
493
|
-
if (columnConfig.transform && typeof columnConfig.transform === "function") {
|
|
494
|
-
Promise.resolve(columnConfig.transform(cellData[i])).then((value) => span.textContent = value);
|
|
495
|
-
} else {
|
|
496
|
-
if (cellData[i] === void 0 || cellData[i] === null) {
|
|
497
|
-
span.textContent = "";
|
|
498
|
-
} else {
|
|
499
|
-
span.textContent = cellData[i].toString();
|
|
500
|
-
}
|
|
501
|
-
}
|
|
502
|
-
}
|
|
503
|
-
if (columnConfig.align) {
|
|
504
|
-
TableUtils._setCellAlignmentClass(div, columnConfig.align);
|
|
505
|
-
}
|
|
506
|
-
td.appendChild(div);
|
|
507
|
-
if (isDefined(columnConfig.columnSpan)) {
|
|
508
|
-
if (columnConfig.columnSpan === "all") {
|
|
509
|
-
td.colSpan = cellData.length - i;
|
|
510
|
-
break;
|
|
511
|
-
} else if (typeof columnConfig.columnSpan === "number" && columnConfig.columnSpan > 0) {
|
|
512
|
-
let colspan = columnConfig.columnSpan;
|
|
513
|
-
if (columnConfig.columnSpan > cellData.length - i) {
|
|
514
|
-
colspan = cellData.length;
|
|
515
|
-
}
|
|
516
|
-
td.colSpan = colspan;
|
|
517
|
-
i = i + (colspan - 1);
|
|
518
|
-
}
|
|
519
|
-
}
|
|
520
|
-
if (typeof configuration.cellCreatedCallback === "function") {
|
|
521
|
-
configuration.cellCreatedCallback(td, rowIndex, i);
|
|
522
|
-
}
|
|
523
|
-
}
|
|
524
|
-
}
|
|
525
|
-
static _setCellAlignmentClass(el, align) {
|
|
526
|
-
switch (align) {
|
|
527
|
-
case "center" /* Center */:
|
|
528
|
-
el.classList.add(TABLE_CONSTANTS.classes.TABLE_CELL_CENTER);
|
|
529
|
-
break;
|
|
530
|
-
case "right" /* Right */:
|
|
531
|
-
el.classList.add(TABLE_CONSTANTS.classes.TABLE_CELL_RIGHT);
|
|
532
|
-
break;
|
|
533
|
-
}
|
|
534
|
-
}
|
|
535
|
-
static _getNonExpandedRows(rows) {
|
|
536
|
-
return Array.from(rows).filter((row) => !row.classList.contains(TABLE_CONSTANTS.classes.TABLE_ROW_EXPANDABLE_CONTENT));
|
|
537
|
-
}
|
|
538
|
-
static _getExpandedRows(rows) {
|
|
539
|
-
return Array.from(rows).filter((row) => row.classList.contains(TABLE_CONSTANTS.classes.TABLE_ROW_EXPANDABLE_CONTENT));
|
|
540
|
-
}
|
|
541
|
-
static _createColumnDataMap(columnConfigurations, data) {
|
|
542
|
-
return columnConfigurations.map((columnConfig) => {
|
|
543
|
-
return {
|
|
544
|
-
config: columnConfig,
|
|
545
|
-
data: data.map((item) => {
|
|
546
|
-
if (columnConfig.property) {
|
|
547
|
-
const value = getPropertyValue(item.data, columnConfig.property);
|
|
548
|
-
return isDefined(value) ? value : null;
|
|
549
|
-
}
|
|
550
|
-
return null;
|
|
551
|
-
})
|
|
552
|
-
};
|
|
553
|
-
});
|
|
554
|
-
}
|
|
555
|
-
static _getOrderedRowData(columnConfigurations, data) {
|
|
556
|
-
const columnDataMap = TableUtils._createColumnDataMap(columnConfigurations, data);
|
|
557
|
-
const rowData = [];
|
|
558
|
-
for (const columnData of columnDataMap) {
|
|
559
|
-
for (let j = 0; j < columnData.data.length; j++) {
|
|
560
|
-
if (!rowData[j]) {
|
|
561
|
-
rowData[j] = [];
|
|
562
|
-
}
|
|
563
|
-
rowData[j].push(columnData.data[j]);
|
|
564
|
-
}
|
|
565
|
-
}
|
|
566
|
-
return rowData;
|
|
567
|
-
}
|
|
568
|
-
static _attachRowClickListeners(tbodyElement, clickListener, doubleClickListener) {
|
|
569
|
-
const nonExpandedRows = TableUtils._getNonExpandedRows(tbodyElement.rows);
|
|
570
|
-
nonExpandedRows.forEach((row) => {
|
|
571
|
-
row.addEventListener("click", clickListener);
|
|
572
|
-
if (doubleClickListener) {
|
|
573
|
-
row.addEventListener("dblclick", doubleClickListener);
|
|
574
|
-
}
|
|
575
|
-
});
|
|
576
|
-
}
|
|
577
|
-
static _addRowClickAttributes(tbodyElement) {
|
|
578
|
-
const nonExpandedRows = TableUtils._getNonExpandedRows(tbodyElement.rows);
|
|
579
|
-
nonExpandedRows.forEach((row) => {
|
|
580
|
-
row.classList.add(TABLE_CONSTANTS.classes.TABLE_BODY_ROW_CLICKABLE);
|
|
581
|
-
});
|
|
582
|
-
}
|
|
583
|
-
static _removeRowClickAttributes(tbodyElement) {
|
|
584
|
-
const nonExpandedRows = TableUtils._getNonExpandedRows(tbodyElement.rows);
|
|
585
|
-
nonExpandedRows.forEach((row) => {
|
|
586
|
-
row.classList.remove(TABLE_CONSTANTS.classes.TABLE_BODY_ROW_CLICKABLE);
|
|
587
|
-
});
|
|
588
|
-
}
|
|
589
|
-
static _attachRowSelectListeners(tbodyElement, clickListener) {
|
|
590
|
-
const nonExpandedRows = TableUtils._getNonExpandedRows(tbodyElement.rows);
|
|
591
|
-
nonExpandedRows.forEach((row) => TableUtils._attachRowSelectListener(row, clickListener));
|
|
592
|
-
}
|
|
593
|
-
static _attachRowSelectListener(row, clickListener) {
|
|
594
|
-
const checkboxElement = TableUtils._getCheckboxElement(row);
|
|
595
|
-
checkboxElement.addEventListener("click", clickListener);
|
|
596
|
-
}
|
|
597
|
-
static _detachRowSelectListeners(tbodyElement, clickListener) {
|
|
598
|
-
Array.from(tbodyElement.rows).forEach((row) => {
|
|
599
|
-
const checkboxElement = TableUtils._getCheckboxElement(row);
|
|
600
|
-
if (checkboxElement) {
|
|
601
|
-
checkboxElement.removeEventListener("click", clickListener);
|
|
602
|
-
}
|
|
603
|
-
});
|
|
604
|
-
}
|
|
605
|
-
static _detachRowClickListeners(tbodyElement, clickListener, doubleClickListener) {
|
|
606
|
-
Array.from(tbodyElement.rows).forEach((row) => {
|
|
607
|
-
row.removeEventListener("click", clickListener);
|
|
608
|
-
row.removeEventListener("dblclick", doubleClickListener);
|
|
609
|
-
});
|
|
610
|
-
}
|
|
611
|
-
static _attachSelectAllListener(theadElement, listener) {
|
|
612
|
-
const lastTheadRow = theadElement.rows[theadElement.rows.length - 1];
|
|
613
|
-
const checkboxElement = TableUtils._getCheckboxElement(lastTheadRow);
|
|
614
|
-
if (!checkboxElement) {
|
|
615
|
-
throw new Error("Checkbox element not found.");
|
|
616
|
-
}
|
|
617
|
-
checkboxElement.addEventListener("change", listener);
|
|
618
|
-
}
|
|
619
|
-
static _tryAttachSelectAllTemplateListener(theadElement, listener) {
|
|
620
|
-
const lastTheadRow = theadElement.rows[theadElement.rows.length - 1];
|
|
621
|
-
const checkboxElement = TableUtils._tryGetCheckboxElement(lastTheadRow);
|
|
622
|
-
if (checkboxElement) {
|
|
623
|
-
checkboxElement.addEventListener("change", listener);
|
|
624
|
-
}
|
|
625
|
-
}
|
|
626
|
-
static _detachSelectAllListener(theadElement, listener) {
|
|
627
|
-
const lastTheadRow = theadElement.rows[theadElement.rows.length - 1];
|
|
628
|
-
const checkboxElement = TableUtils._tryGetCheckboxElement(lastTheadRow);
|
|
629
|
-
if (!checkboxElement) {
|
|
630
|
-
return;
|
|
631
|
-
}
|
|
632
|
-
checkboxElement.removeEventListener("change", listener);
|
|
633
|
-
}
|
|
634
|
-
static _attachHeadRowMouseDownListener(theadElement, listener) {
|
|
635
|
-
const firstRow = theadElement.rows[0];
|
|
636
|
-
if (!firstRow) {
|
|
637
|
-
throw new Error("Missing table header row. Unable to attach sort listener.");
|
|
638
|
-
}
|
|
639
|
-
firstRow.addEventListener("mousedown", listener);
|
|
640
|
-
}
|
|
641
|
-
static _attachHeadRowContextMenuListener(theadElement, listener) {
|
|
642
|
-
const firstRow = theadElement.rows[0];
|
|
643
|
-
if (!firstRow) {
|
|
644
|
-
throw new Error("Missing table header row. Unable to attach sort listener.");
|
|
645
|
-
}
|
|
646
|
-
firstRow.addEventListener("contextmenu", listener);
|
|
647
|
-
}
|
|
648
|
-
static _createSelectColumn(theadElement, tbodyElement, showSelectAll, selectAllTemplate, registerListener, selectCheckboxAlignment, data, tooltipSelect, tooltipSelectAll) {
|
|
649
|
-
if (theadElement) {
|
|
650
|
-
TableUtils._createHeadSelectColumn(theadElement, showSelectAll, selectAllTemplate, registerListener, selectCheckboxAlignment, tooltipSelectAll);
|
|
651
|
-
}
|
|
652
|
-
if (tbodyElement) {
|
|
653
|
-
TableUtils._createBodySelectColumn(tbodyElement, selectCheckboxAlignment, data, tooltipSelect, tooltipSelectAll);
|
|
654
|
-
}
|
|
655
|
-
}
|
|
656
|
-
static _createHeadSelectColumn(theadElement, showSelectAll, selectAllTemplate, registerListener, selectCheckboxAlignment, tooltipSelectAll) {
|
|
657
|
-
var _a;
|
|
658
|
-
Array.from(theadElement.rows).forEach((row) => {
|
|
659
|
-
const th = document.createElement("th");
|
|
660
|
-
addClass([TABLE_CONSTANTS.classes.TABLE_CELL, TABLE_CONSTANTS.classes.TABLE_HEAD_CELL], th);
|
|
661
|
-
row.insertBefore(th, row.cells.item(0));
|
|
662
|
-
});
|
|
663
|
-
if (showSelectAll) {
|
|
664
|
-
const lastRowFirstCell = (_a = theadElement.rows.item(theadElement.rows.length - 1)) == null ? void 0 : _a.cells.item(0);
|
|
665
|
-
lastRowFirstCell.classList.add(TABLE_CONSTANTS.classes.TABLE_CELL_SELECT);
|
|
666
|
-
if (typeof selectAllTemplate === "function") {
|
|
667
|
-
TableUtils._renderSelectAllTemplate(selectAllTemplate, theadElement).then(() => {
|
|
668
|
-
if (typeof registerListener === "function") {
|
|
669
|
-
registerListener();
|
|
670
|
-
}
|
|
671
|
-
});
|
|
672
|
-
} else {
|
|
673
|
-
lastRowFirstCell == null ? void 0 : lastRowFirstCell.appendChild(TableUtils._createCheckboxElement(true, selectCheckboxAlignment, null, null, null, tooltipSelectAll));
|
|
674
|
-
}
|
|
675
|
-
}
|
|
676
|
-
}
|
|
677
|
-
static _createBodySelectColumn(tbodyElement, selectCheckboxAlignment, data, tooltipSelect, tooltipSelectAll) {
|
|
678
|
-
const nonExpandedRows = TableUtils._getNonExpandedRows(tbodyElement.rows);
|
|
679
|
-
nonExpandedRows.forEach((row, rowIndex) => TableUtils._addRowSelectColumn(row, selectCheckboxAlignment, rowIndex, data[rowIndex], tooltipSelect, tooltipSelectAll));
|
|
680
|
-
if (tbodyElement.rows.length) {
|
|
681
|
-
const firstRow = tbodyElement.rows.item(0);
|
|
682
|
-
if (firstRow) {
|
|
683
|
-
TableUtils._updateExpandedRowColspan(tbodyElement.rows, firstRow.cells.length);
|
|
684
|
-
}
|
|
685
|
-
}
|
|
686
|
-
}
|
|
687
|
-
static _addRowSelectColumn(row, selectCheckboxAlignment, rowIndex, rowData, tooltipSelect, tooltipSelectAll) {
|
|
688
|
-
const td = row.insertCell(0);
|
|
689
|
-
addClass([TABLE_CONSTANTS.classes.TABLE_CELL, TABLE_CONSTANTS.classes.TABLE_BODY_CELL, TABLE_CONSTANTS.classes.TABLE_CELL_SELECT], td);
|
|
690
|
-
td.appendChild(TableUtils._createCheckboxElement(false, selectCheckboxAlignment, rowIndex, rowData, tooltipSelect, tooltipSelectAll));
|
|
691
|
-
}
|
|
692
|
-
static _destroySelectColumn(theadElement, tbodyElement) {
|
|
693
|
-
const nonExpandedRows = TableUtils._getNonExpandedRows(tbodyElement.rows);
|
|
694
|
-
Array.from(theadElement.rows).forEach((row) => row.removeChild(row.cells.item(0)));
|
|
695
|
-
Array.from(nonExpandedRows).forEach((row) => row.removeChild(row.cells.item(0)));
|
|
696
|
-
if (tbodyElement.rows.length) {
|
|
697
|
-
const firstRow = tbodyElement.rows.item(0);
|
|
698
|
-
if (firstRow) {
|
|
699
|
-
TableUtils._updateExpandedRowColspan(tbodyElement.rows, firstRow.cells.length);
|
|
700
|
-
}
|
|
701
|
-
}
|
|
702
|
-
}
|
|
703
|
-
static _hasSelectColumn(theadElement, tbodyElement) {
|
|
704
|
-
const tableRows = [...Array.from(theadElement.rows), ...Array.from(tbodyElement.rows)];
|
|
705
|
-
return tableRows.some((row) => {
|
|
706
|
-
const firstCell = row.cells.item(0);
|
|
707
|
-
return firstCell.classList.contains(TABLE_CONSTANTS.classes.TABLE_CELL_SELECT);
|
|
708
|
-
});
|
|
709
|
-
}
|
|
710
|
-
static _createCheckboxElement(isHeader, alignment, rowIndex, rowData, tooltipSelect, tooltipSelectAll) {
|
|
711
|
-
const checkboxContainer = document.createElement("div");
|
|
712
|
-
checkboxContainer.classList.add(TABLE_CONSTANTS.classes.TABLE_CELL_SELECT_CHECKBOX_CONTAINER);
|
|
713
|
-
if (alignment) {
|
|
714
|
-
switch (alignment) {
|
|
715
|
-
case "center" /* Center */:
|
|
716
|
-
checkboxContainer.classList.add(TABLE_CONSTANTS.classes.TABLE_CELL_SELECT_CHECKBOX_CONTAINER_ALIGN_CENTER);
|
|
717
|
-
break;
|
|
718
|
-
case "left" /* Left */:
|
|
719
|
-
checkboxContainer.classList.add(TABLE_CONSTANTS.classes.TABLE_CELL_SELECT_CHECKBOX_CONTAINER_ALIGN_LEFT);
|
|
720
|
-
break;
|
|
721
|
-
case "right" /* Right */:
|
|
722
|
-
checkboxContainer.classList.add(TABLE_CONSTANTS.classes.TABLE_CELL_SELECT_CHECKBOX_CONTAINER_ALIGN_RIGHT);
|
|
723
|
-
break;
|
|
724
|
-
}
|
|
725
|
-
}
|
|
726
|
-
const checkboxElement = document.createElement(CHECKBOX_CONSTANTS.elementName);
|
|
727
|
-
const checkboxInputElement = document.createElement("input");
|
|
728
|
-
checkboxInputElement.type = "checkbox";
|
|
729
|
-
let tooltipText = tooltipSelect ? tooltipSelect : "";
|
|
730
|
-
if (rowData && typeof tooltipSelect === "function") {
|
|
731
|
-
tooltipText = tooltipSelect.call(null, rowIndex, rowData.data);
|
|
732
|
-
}
|
|
733
|
-
const tooltip = document.createElement("forge-tooltip");
|
|
734
|
-
tooltip.position = "left";
|
|
735
|
-
if (isHeader) {
|
|
736
|
-
tooltip.textContent = tooltipSelectAll ? tooltipSelectAll : "";
|
|
737
|
-
} else {
|
|
738
|
-
tooltip.textContent = tooltipText;
|
|
739
|
-
}
|
|
740
|
-
checkboxInputElement.setAttribute("aria-label", "Select row");
|
|
741
|
-
checkboxElement.appendChild(checkboxInputElement);
|
|
742
|
-
checkboxContainer.appendChild(tooltip);
|
|
743
|
-
checkboxContainer.appendChild(checkboxElement);
|
|
744
|
-
return checkboxContainer;
|
|
745
|
-
}
|
|
746
|
-
static _getCheckboxElement(rowElement) {
|
|
747
|
-
return rowElement.querySelector(TABLE_CONSTANTS.selectors.CHECKBOX_INPUT);
|
|
748
|
-
}
|
|
749
|
-
static _tryGetCheckboxElement(rowElement) {
|
|
750
|
-
return rowElement.querySelector(TABLE_CONSTANTS.selectors.CHECKBOX_INPUT) || rowElement.querySelector(TABLE_CONSTANTS.selectors.SELECT_ALL_TEMPLATE_CHECKBOX_INPUT);
|
|
751
|
-
}
|
|
752
|
-
static _setSelectedCheckboxState(checkboxElement, isSelected) {
|
|
753
|
-
if (checkboxElement) {
|
|
754
|
-
checkboxElement.checked = isSelected;
|
|
755
|
-
}
|
|
756
|
-
}
|
|
757
|
-
static _setIndeterminateCheckboxState(checkboxElement, isIndeterminate) {
|
|
758
|
-
if (checkboxElement) {
|
|
759
|
-
checkboxElement.indeterminate = isIndeterminate;
|
|
760
|
-
}
|
|
761
|
-
}
|
|
762
|
-
static _setRowSelectedState(rowElement, isSelected) {
|
|
763
|
-
if (isSelected) {
|
|
764
|
-
if (!rowElement.classList.contains(TABLE_CONSTANTS.classes.TABLE_BODY_ROW_SELECTED)) {
|
|
765
|
-
rowElement.classList.add(TABLE_CONSTANTS.classes.TABLE_BODY_ROW_SELECTED);
|
|
766
|
-
}
|
|
767
|
-
} else {
|
|
768
|
-
rowElement.classList.remove(TABLE_CONSTANTS.classes.TABLE_BODY_ROW_SELECTED);
|
|
769
|
-
}
|
|
770
|
-
}
|
|
771
|
-
static _updateExpandedRowColspan(rows, cellCount) {
|
|
772
|
-
const expandedRows = TableUtils._getExpandedRows(rows);
|
|
773
|
-
expandedRows.forEach((row) => {
|
|
774
|
-
const cell = row.cells.item(0);
|
|
775
|
-
if (cell) {
|
|
776
|
-
cell.colSpan = cellCount;
|
|
777
|
-
}
|
|
778
|
-
});
|
|
779
|
-
}
|
|
780
|
-
static updateSelectedState(rowElement, isSelected) {
|
|
781
|
-
TableUtils._setRowSelectedState(rowElement, isSelected);
|
|
782
|
-
TableUtils._setSelectedCheckboxState(TableUtils._getCheckboxElement(rowElement), isSelected);
|
|
783
|
-
}
|
|
784
|
-
static getRowByIndex(tableElement, index) {
|
|
785
|
-
return TableUtils._getNonExpandedRows(tableElement.tBodies[0].rows)[index];
|
|
786
|
-
}
|
|
787
|
-
static updateSelectAllState(tableElement, isAllSelected, isIndeterminate) {
|
|
788
|
-
if (!tableElement.tHead) {
|
|
789
|
-
return;
|
|
790
|
-
}
|
|
791
|
-
const lastTheadRow = tableElement.tHead.rows[tableElement.tHead.rows.length - 1];
|
|
792
|
-
const selectAllCheckboxElement = TableUtils._tryGetCheckboxElement(lastTheadRow);
|
|
793
|
-
if (selectAllCheckboxElement) {
|
|
794
|
-
TableUtils._setSelectedCheckboxState(selectAllCheckboxElement, isAllSelected);
|
|
795
|
-
TableUtils._setIndeterminateCheckboxState(selectAllCheckboxElement, !!isIndeterminate);
|
|
796
|
-
}
|
|
797
|
-
}
|
|
798
|
-
static setSelectedRows(tableElement, key, data, selectedRows, preserveExisting = false) {
|
|
799
|
-
if (!tableElement.tBodies.length) {
|
|
800
|
-
return;
|
|
801
|
-
}
|
|
802
|
-
if (!preserveExisting) {
|
|
803
|
-
TableUtils.clearSelectedRows(tableElement);
|
|
804
|
-
}
|
|
805
|
-
const rows = tableElement.tBodies[0].rows;
|
|
806
|
-
let selectedRowCount = 0;
|
|
807
|
-
if (selectedRows.length) {
|
|
808
|
-
Array.from(rows).forEach((row, index) => {
|
|
809
|
-
const rowData = data[index];
|
|
810
|
-
const existingSelection = findWhere(selectedRows, createPredicate(key, rowData));
|
|
811
|
-
if (existingSelection) {
|
|
812
|
-
TableUtils._setRowSelectedState(row, true);
|
|
813
|
-
TableUtils._setSelectedCheckboxState(TableUtils._getCheckboxElement(row), true);
|
|
814
|
-
selectedRowCount++;
|
|
815
|
-
}
|
|
816
|
-
});
|
|
817
|
-
}
|
|
818
|
-
TableUtils.updateSelectAllState(tableElement, selectedRowCount > 0 && rows.length === selectedRowCount);
|
|
819
|
-
}
|
|
820
|
-
static clearSelectedRows(tableElement) {
|
|
821
|
-
if (!tableElement.tBodies.length) {
|
|
822
|
-
return;
|
|
823
|
-
}
|
|
824
|
-
const nonExpandedRows = TableUtils._getNonExpandedRows(tableElement.tBodies[0].rows);
|
|
825
|
-
nonExpandedRows.forEach((row) => {
|
|
826
|
-
TableUtils._setRowSelectedState(row, false);
|
|
827
|
-
TableUtils._setSelectedCheckboxState(TableUtils._getCheckboxElement(row), false);
|
|
828
|
-
});
|
|
829
|
-
}
|
|
830
|
-
static setSortedColumn(tableElement, columnIndex, sortDirection) {
|
|
831
|
-
const cell = TableUtils._getHeaderCellByIndex(tableElement, columnIndex);
|
|
832
|
-
const iconElement = TableUtils._getSortIconElementFromHeaderCell(cell);
|
|
833
|
-
iconElement.classList.add(TABLE_CONSTANTS.classes.TABLE_HEAD_CELL_SORT_ICON_ACTIVE);
|
|
834
|
-
TableUtils._setColumnSortDirection(cell, sortDirection);
|
|
835
|
-
}
|
|
836
|
-
static setMultiSortColumnSortNumber(tableElement, hasMultipleColumnsSorted, columnIndex, sortOrder) {
|
|
837
|
-
const cell = TableUtils._getHeaderCellByIndex(tableElement, columnIndex);
|
|
838
|
-
const cellContainer = cell.querySelector(`.${TABLE_CONSTANTS.classes.TABLE_HEAD_CELL_CONTAINER}`);
|
|
839
|
-
const sortOrderElement = cellContainer.querySelector(`.${TABLE_CONSTANTS.classes.TABLE_HEAD_CELL_SORT_ORDER}`);
|
|
840
|
-
if (sortOrderElement) {
|
|
841
|
-
toggleClass(sortOrderElement, typeof sortOrder !== "number" || !hasMultipleColumnsSorted, TABLE_CONSTANTS.classes.TABLE_HEAD_CELL_SORT_ORDER_HIDDEN);
|
|
842
|
-
if (sortOrder) {
|
|
843
|
-
sortOrderElement.textContent = sortOrder.toString();
|
|
844
|
-
}
|
|
845
|
-
}
|
|
846
|
-
}
|
|
847
|
-
static removeColumnSort(tableElement, columnIndex) {
|
|
848
|
-
const cell = TableUtils._getHeaderCellByIndex(tableElement, columnIndex);
|
|
849
|
-
if (cell.classList.contains(TABLE_CONSTANTS.classes.TABLE_HEAD_CELL_SORTED_ASCENDING)) {
|
|
850
|
-
cell.classList.remove(TABLE_CONSTANTS.classes.TABLE_HEAD_CELL_SORTED_ASCENDING);
|
|
851
|
-
}
|
|
852
|
-
if (cell.classList.contains(TABLE_CONSTANTS.classes.TABLE_HEAD_CELL_SORTED_DESCENDING)) {
|
|
853
|
-
cell.classList.remove(TABLE_CONSTANTS.classes.TABLE_HEAD_CELL_SORTED_DESCENDING);
|
|
854
|
-
}
|
|
855
|
-
const existingIconElement = TableUtils._getSortIconElementFromHeaderCell(cell);
|
|
856
|
-
if (existingIconElement && existingIconElement.classList.contains(TABLE_CONSTANTS.classes.TABLE_HEAD_CELL_SORT_ICON_ACTIVE)) {
|
|
857
|
-
existingIconElement.classList.remove(TABLE_CONSTANTS.classes.TABLE_HEAD_CELL_SORT_ICON_ACTIVE);
|
|
858
|
-
}
|
|
859
|
-
}
|
|
860
|
-
static _getHeaderCellByIndex(tableElement, index) {
|
|
861
|
-
if (!tableElement.tHead) {
|
|
862
|
-
throw new Error("Table head element cannot be null.");
|
|
863
|
-
}
|
|
864
|
-
const headerRow = tableElement.tHead.rows.item(0);
|
|
865
|
-
return headerRow.cells.item(index);
|
|
866
|
-
}
|
|
867
|
-
static _getSortIconElementFromHeaderCell(cell) {
|
|
868
|
-
return cell.querySelector(`.${TABLE_CONSTANTS.classes.TABLE_HEAD_CELL_SORT_ICON}`);
|
|
869
|
-
}
|
|
870
|
-
static setSelectColumnVisibility(tableElement, isVisible, selectListener, selectAllListener, selectAllTemplate, selectCheckboxAlignment, data, tooltipSelect, tooltipSelectAll) {
|
|
871
|
-
const theadElement = tableElement.tHead;
|
|
872
|
-
const tbodyElement = tableElement.tBodies[0];
|
|
873
|
-
if (!theadElement || !tbodyElement) {
|
|
874
|
-
return;
|
|
875
|
-
}
|
|
876
|
-
if (isVisible) {
|
|
877
|
-
TableUtils._addSelectColumn(theadElement, tbodyElement, selectListener, selectAllListener, selectAllTemplate, selectCheckboxAlignment, data, tooltipSelect, tooltipSelectAll);
|
|
878
|
-
} else if (TableUtils._hasSelectColumn(theadElement, tbodyElement)) {
|
|
879
|
-
if (selectListener) {
|
|
880
|
-
TableUtils._detachRowSelectListeners(tbodyElement, selectListener);
|
|
881
|
-
}
|
|
882
|
-
if (selectAllListener) {
|
|
883
|
-
TableUtils._detachSelectAllListener(theadElement, selectAllListener);
|
|
884
|
-
}
|
|
885
|
-
TableUtils._destroySelectColumn(theadElement, tbodyElement);
|
|
886
|
-
}
|
|
887
|
-
}
|
|
888
|
-
static _addSelectColumn(theadElement, tbodyElement, selectListener, selectAllListener, selectAllTemplate, selectCheckboxAlignment, data, tooltipSelect, tooltipSelectAll) {
|
|
889
|
-
TableUtils._createSelectColumn(theadElement, tbodyElement, !!selectAllListener, selectAllTemplate, () => {
|
|
890
|
-
if (selectAllListener) {
|
|
891
|
-
TableUtils._tryAttachSelectAllTemplateListener(theadElement, selectAllListener);
|
|
892
|
-
}
|
|
893
|
-
}, selectCheckboxAlignment, data, tooltipSelect, tooltipSelectAll);
|
|
894
|
-
if (selectListener) {
|
|
895
|
-
TableUtils._attachRowSelectListeners(tbodyElement, selectListener);
|
|
896
|
-
}
|
|
897
|
-
if (selectAllListener && !selectAllTemplate) {
|
|
898
|
-
TableUtils._tryAttachSelectAllTemplateListener(theadElement, selectAllListener);
|
|
899
|
-
}
|
|
900
|
-
}
|
|
901
|
-
static setDenseState(tableElement, isDense) {
|
|
902
|
-
if (tableElement.classList.contains(TABLE_CONSTANTS.classes.TABLE_DENSE)) {
|
|
903
|
-
tableElement.classList.remove(TABLE_CONSTANTS.classes.TABLE_DENSE);
|
|
904
|
-
}
|
|
905
|
-
if (isDense) {
|
|
906
|
-
tableElement.classList.add(TABLE_CONSTANTS.classes.TABLE_DENSE);
|
|
907
|
-
}
|
|
908
|
-
}
|
|
909
|
-
static setRoomyState(tableElement, isRoomy) {
|
|
910
|
-
if (tableElement.classList.contains(TABLE_CONSTANTS.classes.TABLE_ROOMY)) {
|
|
911
|
-
tableElement.classList.remove(TABLE_CONSTANTS.classes.TABLE_ROOMY);
|
|
912
|
-
}
|
|
913
|
-
if (isRoomy) {
|
|
914
|
-
tableElement.classList.add(TABLE_CONSTANTS.classes.TABLE_ROOMY);
|
|
915
|
-
}
|
|
916
|
-
}
|
|
917
|
-
static setResizable(configuration) {
|
|
918
|
-
const thead = configuration.tableElement.tHead;
|
|
919
|
-
if (configuration.resizable) {
|
|
920
|
-
configuration.tableElement.classList.add(TABLE_CONSTANTS.classes.TABLE_RESIZABLE);
|
|
921
|
-
TableUtils._addResizeHandles(thead, configuration);
|
|
922
|
-
} else {
|
|
923
|
-
configuration.tableElement.classList.remove(TABLE_CONSTANTS.classes.TABLE_RESIZABLE);
|
|
924
|
-
TableUtils._removeResizeHandles(thead);
|
|
925
|
-
}
|
|
926
|
-
}
|
|
927
|
-
static _addResizeHandles(thead, configuration) {
|
|
928
|
-
if (!thead) {
|
|
929
|
-
return;
|
|
930
|
-
}
|
|
931
|
-
const firstRow = thead.rows.item(0);
|
|
932
|
-
if (firstRow) {
|
|
933
|
-
let cells = Array.from(firstRow.cells);
|
|
934
|
-
if (configuration.selectListener) {
|
|
935
|
-
cells = cells.slice(1);
|
|
936
|
-
}
|
|
937
|
-
for (const cell of cells) {
|
|
938
|
-
const index = cells.indexOf(cell);
|
|
939
|
-
const columnConfig = configuration.columnConfigurations[index];
|
|
940
|
-
if (columnConfig.resizable !== false) {
|
|
941
|
-
const resizeHandle = document.createElement("div");
|
|
942
|
-
resizeHandle.classList.add(TABLE_CONSTANTS.classes.TABLE_RESIZE_HANDLE);
|
|
943
|
-
cell.appendChild(resizeHandle);
|
|
944
|
-
}
|
|
945
|
-
}
|
|
946
|
-
}
|
|
947
|
-
}
|
|
948
|
-
static _removeResizeHandles(thead) {
|
|
949
|
-
if (!thead) {
|
|
950
|
-
return;
|
|
951
|
-
}
|
|
952
|
-
const firstRow = thead.rows.item(0);
|
|
953
|
-
if (firstRow) {
|
|
954
|
-
const cells = Array.from(firstRow.cells);
|
|
955
|
-
for (const cell of cells) {
|
|
956
|
-
const resizeHandle = document.querySelector(`.${TABLE_CONSTANTS.classes.TABLE_RESIZE_HANDLE}`);
|
|
957
|
-
if (resizeHandle) {
|
|
958
|
-
cell.removeChild(resizeHandle);
|
|
959
|
-
}
|
|
960
|
-
}
|
|
961
|
-
}
|
|
962
|
-
}
|
|
963
|
-
static setWrapContentState(tableElement, wrapContent) {
|
|
964
|
-
if (wrapContent) {
|
|
965
|
-
tableElement.classList.remove(TABLE_CONSTANTS.classes.TABLE_NO_WRAP_CONTENT);
|
|
966
|
-
} else {
|
|
967
|
-
tableElement.classList.add(TABLE_CONSTANTS.classes.TABLE_NO_WRAP_CONTENT);
|
|
968
|
-
}
|
|
969
|
-
}
|
|
970
|
-
static setSelectAllVisibility(tableElement, isVisible, listener, selectAllTemplate, selectCheckboxAlignment, tooltipSelectAll) {
|
|
971
|
-
const theadElement = tableElement.tHead;
|
|
972
|
-
if (!theadElement) {
|
|
973
|
-
return;
|
|
974
|
-
}
|
|
975
|
-
if (!isVisible && listener) {
|
|
976
|
-
TableUtils._detachSelectAllListener(theadElement, listener);
|
|
977
|
-
}
|
|
978
|
-
const lastTheadRow = theadElement.rows[theadElement.rows.length - 1];
|
|
979
|
-
const selectAllCell = lastTheadRow.cells.item(0);
|
|
980
|
-
if (isVisible) {
|
|
981
|
-
if (!selectAllCell.childElementCount) {
|
|
982
|
-
selectAllCell.classList.add(TABLE_CONSTANTS.classes.TABLE_CELL_SELECT);
|
|
983
|
-
if (selectAllTemplate) {
|
|
984
|
-
TableUtils._renderSelectAllTemplate(selectAllTemplate, theadElement).then(() => {
|
|
985
|
-
if (listener) {
|
|
986
|
-
TableUtils._tryAttachSelectAllTemplateListener(theadElement, listener);
|
|
987
|
-
}
|
|
988
|
-
});
|
|
989
|
-
} else {
|
|
990
|
-
selectAllCell.appendChild(TableUtils._createCheckboxElement(true, selectCheckboxAlignment || null, null, null, null, tooltipSelectAll));
|
|
991
|
-
}
|
|
992
|
-
if (listener && !selectAllTemplate) {
|
|
993
|
-
TableUtils._attachSelectAllListener(theadElement, listener);
|
|
994
|
-
}
|
|
995
|
-
}
|
|
996
|
-
} else {
|
|
997
|
-
if (listener) {
|
|
998
|
-
TableUtils._detachSelectAllListener(theadElement, listener);
|
|
999
|
-
}
|
|
1000
|
-
removeAllChildren(selectAllCell);
|
|
1001
|
-
}
|
|
1002
|
-
}
|
|
1003
|
-
static setFilterRow(configuration) {
|
|
1004
|
-
if (!configuration.tableElement.tHead) {
|
|
1005
|
-
return;
|
|
1006
|
-
}
|
|
1007
|
-
const filterRowElement = TableUtils._getFilterRowElement(configuration.tableElement.tHead);
|
|
1008
|
-
let selectAllCell;
|
|
1009
|
-
if (configuration.filter) {
|
|
1010
|
-
configuration.tableElement.classList.add(TABLE_CONSTANTS.classes.TABLE_FILTER_VISIBLE);
|
|
1011
|
-
} else {
|
|
1012
|
-
configuration.tableElement.classList.remove(TABLE_CONSTANTS.classes.TABLE_FILTER_VISIBLE);
|
|
1013
|
-
}
|
|
1014
|
-
if (configuration.filter && !filterRowElement) {
|
|
1015
|
-
if (configuration.columnConfigurations.every((cc) => !cc.filter)) {
|
|
1016
|
-
return;
|
|
1017
|
-
}
|
|
1018
|
-
if (configuration.selectListener && configuration.selectAllListener) {
|
|
1019
|
-
const lastTheadRow = configuration.tableElement.tHead.rows[configuration.tableElement.tHead.rows.length - 1];
|
|
1020
|
-
selectAllCell = lastTheadRow.cells.item(0);
|
|
1021
|
-
}
|
|
1022
|
-
const rowElement = TableUtils._createFilterRowElement(configuration);
|
|
1023
|
-
if (rowElement && selectAllCell) {
|
|
1024
|
-
Array.from(selectAllCell.children).forEach((child) => {
|
|
1025
|
-
var _a;
|
|
1026
|
-
(_a = rowElement.cells.item(0)) == null ? void 0 : _a.appendChild(child);
|
|
1027
|
-
});
|
|
1028
|
-
}
|
|
1029
|
-
} else if (!configuration.filter && filterRowElement) {
|
|
1030
|
-
if (configuration.selectListener && configuration.selectAllListener) {
|
|
1031
|
-
selectAllCell = filterRowElement.cells.item(0);
|
|
1032
|
-
const previousRowElementIndex = Array.from(configuration.tableElement.tHead.rows).indexOf(filterRowElement) - 1;
|
|
1033
|
-
const previousRowElement = configuration.tableElement.tHead.rows.item(previousRowElementIndex);
|
|
1034
|
-
if (previousRowElement) {
|
|
1035
|
-
Array.from(selectAllCell.children).forEach((child) => {
|
|
1036
|
-
var _a;
|
|
1037
|
-
(_a = previousRowElement.cells.item(0)) == null ? void 0 : _a.appendChild(child);
|
|
1038
|
-
});
|
|
1039
|
-
}
|
|
1040
|
-
}
|
|
1041
|
-
removeElement(filterRowElement);
|
|
1042
|
-
}
|
|
1043
|
-
}
|
|
1044
|
-
static _createFilterRowElement(configuration) {
|
|
1045
|
-
if (!configuration.tableElement.tHead) {
|
|
1046
|
-
throw new Error("Table head element cannot be null.");
|
|
1047
|
-
}
|
|
1048
|
-
const filterRow = configuration.tableElement.tHead.insertRow();
|
|
1049
|
-
addClass([TABLE_CONSTANTS.classes.TABLE_ROW, TABLE_CONSTANTS.classes.TABLE_HEAD_ROW_FILTER], filterRow);
|
|
1050
|
-
if (configuration.selectListener) {
|
|
1051
|
-
const th = document.createElement("th");
|
|
1052
|
-
addClass([TABLE_CONSTANTS.classes.TABLE_CELL, TABLE_CONSTANTS.classes.TABLE_HEAD_CELL], th);
|
|
1053
|
-
filterRow.insertBefore(th, filterRow.cells[0]);
|
|
1054
|
-
th.classList.add(TABLE_CONSTANTS.classes.TABLE_CELL_SELECT);
|
|
1055
|
-
}
|
|
1056
|
-
configuration.columnConfigurations.forEach((columnConfig, columnIndex) => {
|
|
1057
|
-
const th = document.createElement("th");
|
|
1058
|
-
addClass([TABLE_CONSTANTS.classes.TABLE_CELL, TABLE_CONSTANTS.classes.TABLE_HEAD_CELL], th);
|
|
1059
|
-
if (columnConfig.filter && isDefined(columnConfig.filterDelegate)) {
|
|
1060
|
-
const container = document.createElement("div");
|
|
1061
|
-
container.classList.add(TABLE_CONSTANTS.classes.TABLE_HEAD_CELL_CONTAINER);
|
|
1062
|
-
if (columnConfig.align) {
|
|
1063
|
-
TableUtils._setCellAlignmentClass(container, columnConfig.align);
|
|
1064
|
-
}
|
|
1065
|
-
const element = TableUtils._createFilterElement(columnConfig, columnIndex, configuration.filterListener);
|
|
1066
|
-
container.appendChild(element);
|
|
1067
|
-
th.appendChild(container);
|
|
1068
|
-
}
|
|
1069
|
-
filterRow.appendChild(th);
|
|
1070
|
-
});
|
|
1071
|
-
return filterRow;
|
|
1072
|
-
}
|
|
1073
|
-
static _createFilterElement(columnConfig, columnIndex, filterListener) {
|
|
1074
|
-
let delegate;
|
|
1075
|
-
if (isFunction(columnConfig.filterDelegate)) {
|
|
1076
|
-
delegate = columnConfig.filterDelegate();
|
|
1077
|
-
} else if (columnConfig.filterDelegate instanceof FormFieldComponentDelegate) {
|
|
1078
|
-
delegate = columnConfig.filterDelegate;
|
|
1079
|
-
} else {
|
|
1080
|
-
throw new Error("Invalid filter delegate.");
|
|
1081
|
-
}
|
|
1082
|
-
if (filterListener) {
|
|
1083
|
-
if (!isDefined(columnConfig.filterDebounceTime) || isNumber(columnConfig.filterDebounceTime)) {
|
|
1084
|
-
const debounceTime = isDefined(columnConfig.filterDebounceTime) ? columnConfig.filterDebounceTime : TABLE_CONSTANTS.numbers.DEFAULT_FILTER_DEBOUNCE_TIME;
|
|
1085
|
-
delegate.onChange(debounce((value) => filterListener(value, columnIndex), debounceTime));
|
|
1086
|
-
} else {
|
|
1087
|
-
delegate.onChange((value) => filterListener(value, columnIndex));
|
|
1088
|
-
}
|
|
1089
|
-
}
|
|
1090
|
-
return delegate.element;
|
|
1091
|
-
}
|
|
1092
|
-
static _getFilterRowElement(tHeadElement) {
|
|
1093
|
-
if (!tHeadElement) {
|
|
1094
|
-
return;
|
|
1095
|
-
}
|
|
1096
|
-
return Array.from(tHeadElement.rows).find((r) => r.classList.contains(TABLE_CONSTANTS.classes.TABLE_HEAD_ROW_FILTER));
|
|
1097
|
-
}
|
|
1098
|
-
static async expandRow(configuration, rowIndex, template) {
|
|
1099
|
-
const tbody = configuration.tableElement.tBodies[0];
|
|
1100
|
-
const nonExpandedRows = TableUtils._getNonExpandedRows(tbody.rows);
|
|
1101
|
-
const requestedRow = nonExpandedRows[rowIndex];
|
|
1102
|
-
requestedRow.classList.add(TABLE_CONSTANTS.classes.TABLE_ROW_EXPANDED);
|
|
1103
|
-
const actualRowIndex = Array.from(tbody.rows).indexOf(requestedRow);
|
|
1104
|
-
const expandedRow = tbody.insertRow(actualRowIndex + 1);
|
|
1105
|
-
addClass([TABLE_CONSTANTS.classes.TABLE_ROW, TABLE_CONSTANTS.classes.TABLE_BODY_ROW, TABLE_CONSTANTS.classes.TABLE_ROW_EXPANDABLE_CONTENT], expandedRow);
|
|
1106
|
-
const td = expandedRow.insertCell();
|
|
1107
|
-
td.setAttribute("colspan", requestedRow.cells.length.toString());
|
|
1108
|
-
td.classList.add(TABLE_CONSTANTS.classes.TABLE_ROW_EXPANDABLE_CONTENT_CELL);
|
|
1109
|
-
const contentDiv = document.createElement("div");
|
|
1110
|
-
const expansionPanel = document.createElement(EXPANSION_PANEL_CONSTANTS.elementName);
|
|
1111
|
-
expansionPanel.appendChild(contentDiv);
|
|
1112
|
-
td.appendChild(expansionPanel);
|
|
1113
|
-
let content = template;
|
|
1114
|
-
if (isFunction(template)) {
|
|
1115
|
-
const rowData = configuration.data[rowIndex] ? configuration.data[rowIndex].data : void 0;
|
|
1116
|
-
const templateValue = template(rowIndex, contentDiv, rowData);
|
|
1117
|
-
try {
|
|
1118
|
-
const result = await Promise.resolve(templateValue);
|
|
1119
|
-
content = isTemplateResultObject(result) ? result.content : result;
|
|
1120
|
-
} catch (e) {
|
|
1121
|
-
console.error("Failed to load row template " + e.message);
|
|
1122
|
-
content = "";
|
|
1123
|
-
}
|
|
1124
|
-
}
|
|
1125
|
-
if (content) {
|
|
1126
|
-
TableUtils._setRowTemplate(contentDiv, content);
|
|
1127
|
-
}
|
|
1128
|
-
window.requestAnimationFrame(() => expansionPanel.open = true);
|
|
1129
|
-
}
|
|
1130
|
-
static _setRowTemplate(element, template) {
|
|
1131
|
-
if (isString(template)) {
|
|
1132
|
-
element.innerHTML = template;
|
|
1133
|
-
} else {
|
|
1134
|
-
element.appendChild(template);
|
|
1135
|
-
}
|
|
1136
|
-
}
|
|
1137
|
-
static collapseRow(configuration, rowIndex) {
|
|
1138
|
-
if (!configuration.tableElement || !configuration.tableElement.tBodies.length || !configuration.tableElement.tBodies[0].rows.length) {
|
|
1139
|
-
return Promise.resolve();
|
|
1140
|
-
}
|
|
1141
|
-
const tbody = configuration.tableElement.tBodies[0];
|
|
1142
|
-
const nonExpandedRows = TableUtils._getNonExpandedRows(tbody.rows);
|
|
1143
|
-
const requestedRow = nonExpandedRows[rowIndex];
|
|
1144
|
-
const actualRowIndex = Array.from(tbody.rows).indexOf(requestedRow);
|
|
1145
|
-
if (requestedRow && requestedRow.classList.contains(TABLE_CONSTANTS.classes.TABLE_ROW_EXPANDED)) {
|
|
1146
|
-
const expandableRow = tbody.rows[actualRowIndex + 1];
|
|
1147
|
-
const expansionPanel = expandableRow.querySelector(EXPANSION_PANEL_CONSTANTS.elementName);
|
|
1148
|
-
if (expansionPanel && expansionPanel.open) {
|
|
1149
|
-
expansionPanel.open = false;
|
|
1150
|
-
return new Promise((resolve) => {
|
|
1151
|
-
setTimeout(() => {
|
|
1152
|
-
requestedRow.classList.remove(TABLE_CONSTANTS.classes.TABLE_ROW_EXPANDED);
|
|
1153
|
-
removeElement(expandableRow);
|
|
1154
|
-
resolve();
|
|
1155
|
-
}, EXPANSION_PANEL_CONSTANTS.numbers.COLLAPSE_ANIMATION_DURATION);
|
|
1156
|
-
});
|
|
1157
|
-
}
|
|
1158
|
-
}
|
|
1159
|
-
return Promise.resolve();
|
|
1160
|
-
}
|
|
1161
|
-
static isRowExpanded(configuration, rowIndex) {
|
|
1162
|
-
const tbody = configuration.tableElement.tBodies[0];
|
|
1163
|
-
const nonExpandedRows = TableUtils._getNonExpandedRows(tbody.rows);
|
|
1164
|
-
const requestedRow = nonExpandedRows[rowIndex];
|
|
1165
|
-
return requestedRow && requestedRow.classList.contains(TABLE_CONSTANTS.classes.TABLE_ROW_EXPANDED);
|
|
1166
|
-
}
|
|
1167
|
-
static setFixedHeaders(configuration) {
|
|
1168
|
-
if (configuration.fixedHeaders) {
|
|
1169
|
-
configuration.tableElement.classList.add(TABLE_CONSTANTS.classes.TABLE_FIXED);
|
|
1170
|
-
} else {
|
|
1171
|
-
configuration.tableElement.classList.remove(TABLE_CONSTANTS.classes.TABLE_FIXED);
|
|
1172
|
-
}
|
|
1173
|
-
}
|
|
1174
|
-
static setLayoutType(configuration) {
|
|
1175
|
-
if (configuration.layoutType === "fixed") {
|
|
1176
|
-
configuration.tableElement.classList.add(TABLE_CONSTANTS.classes.TABLE_LAYOUT_FIXED);
|
|
1177
|
-
} else {
|
|
1178
|
-
configuration.tableElement.classList.remove(TABLE_CONSTANTS.classes.TABLE_LAYOUT_FIXED);
|
|
1179
|
-
}
|
|
1180
|
-
}
|
|
1181
|
-
static normalizeColumnWidths(configuration) {
|
|
1182
|
-
const tableElement = configuration.tableElement;
|
|
1183
|
-
if (tableElement.tHead && tableElement.tHead.rows.length) {
|
|
1184
|
-
const cells = Array.from(tableElement.tHead.rows[0].cells);
|
|
1185
|
-
for (const cell of cells) {
|
|
1186
|
-
const expectedWidth = getComputedStyle(cell).width;
|
|
1187
|
-
if (cell.style.width && cell.style.width !== expectedWidth) {
|
|
1188
|
-
cell.style.width = expectedWidth;
|
|
1189
|
-
}
|
|
1190
|
-
}
|
|
1191
|
-
}
|
|
1192
|
-
}
|
|
1193
|
-
static setColumnResizeIndicatorVisibility(configuration, columnIndex, isVisible) {
|
|
1194
|
-
const tableElement = configuration.tableElement;
|
|
1195
|
-
if (tableElement.tHead && tableElement.tHead.rows.length) {
|
|
1196
|
-
const rows = Array.from(tableElement.tHead.rows);
|
|
1197
|
-
for (const row of rows) {
|
|
1198
|
-
const cell = row.cells[columnIndex];
|
|
1199
|
-
if (cell) {
|
|
1200
|
-
if (isVisible) {
|
|
1201
|
-
cell.classList.add(TABLE_CONSTANTS.classes.TABLE_CELL_RESIZABLE);
|
|
1202
|
-
} else {
|
|
1203
|
-
cell.classList.remove(TABLE_CONSTANTS.classes.TABLE_CELL_RESIZABLE);
|
|
1204
|
-
}
|
|
1205
|
-
}
|
|
1206
|
-
}
|
|
1207
|
-
}
|
|
1208
|
-
if (tableElement.tBodies.length) {
|
|
1209
|
-
const rows = Array.from(tableElement.tBodies[0].rows);
|
|
1210
|
-
for (const row of rows) {
|
|
1211
|
-
const cell = row.cells[columnIndex];
|
|
1212
|
-
if (cell) {
|
|
1213
|
-
if (isVisible) {
|
|
1214
|
-
cell.classList.add(TABLE_CONSTANTS.classes.TABLE_CELL_RESIZABLE);
|
|
1215
|
-
} else {
|
|
1216
|
-
cell.classList.remove(TABLE_CONSTANTS.classes.TABLE_CELL_RESIZABLE);
|
|
1217
|
-
}
|
|
1218
|
-
}
|
|
1219
|
-
}
|
|
1220
|
-
}
|
|
1221
|
-
}
|
|
1222
|
-
static setRowClickListeners(tableElement, allowClick, clickListener, doubleClickListener) {
|
|
1223
|
-
const tbodyElement = tableElement.tBodies[0];
|
|
1224
|
-
if (!tbodyElement) {
|
|
1225
|
-
return;
|
|
1226
|
-
}
|
|
1227
|
-
if (allowClick) {
|
|
1228
|
-
TableUtils._attachRowClickListeners(tbodyElement, clickListener, doubleClickListener);
|
|
1229
|
-
} else {
|
|
1230
|
-
TableUtils._detachRowClickListeners(tbodyElement, clickListener, doubleClickListener);
|
|
1231
|
-
}
|
|
1232
|
-
}
|
|
1233
|
-
static setRowClickAttributes(tableElement, allowClick) {
|
|
1234
|
-
const tbodyElement = tableElement.tBodies[0];
|
|
1235
|
-
if (!tbodyElement) {
|
|
1236
|
-
return;
|
|
1237
|
-
}
|
|
1238
|
-
if (allowClick) {
|
|
1239
|
-
TableUtils._addRowClickAttributes(tbodyElement);
|
|
1240
|
-
} else {
|
|
1241
|
-
TableUtils._removeRowClickAttributes(tbodyElement);
|
|
1242
|
-
}
|
|
1243
|
-
}
|
|
1244
|
-
static getOwnerDocument(el) {
|
|
1245
|
-
return el.ownerDocument || document;
|
|
1246
|
-
}
|
|
1247
|
-
static _prepend(element, target) {
|
|
1248
|
-
const elementToSetBefore = target.childNodes.item(0);
|
|
1249
|
-
if (elementToSetBefore) {
|
|
1250
|
-
target.insertBefore(element, elementToSetBefore);
|
|
1251
|
-
} else {
|
|
1252
|
-
target.appendChild(element);
|
|
1253
|
-
}
|
|
1254
|
-
}
|
|
1255
|
-
static _isMac() {
|
|
1256
|
-
return !!(navigator && navigator.platform && navigator.platform.substr(0, 3) === "Mac");
|
|
1257
|
-
}
|
|
1258
|
-
static _renderSelectAllTemplate(selectAllTemplate, theadElement) {
|
|
1259
|
-
return Promise.resolve(selectAllTemplate()).then((element) => {
|
|
1260
|
-
const lastTheadRow = theadElement.rows.item(theadElement.rows.length - 1);
|
|
1261
|
-
if (!lastTheadRow) {
|
|
1262
|
-
return;
|
|
1263
|
-
}
|
|
1264
|
-
const targetElement = lastTheadRow.cells.item(0);
|
|
1265
|
-
if (element && targetElement) {
|
|
1266
|
-
if (typeof element === "string") {
|
|
1267
|
-
targetElement.innerHTML = element;
|
|
1268
|
-
} else if (element instanceof HTMLElement) {
|
|
1269
|
-
targetElement.appendChild(element);
|
|
1270
|
-
}
|
|
1271
|
-
targetElement.setAttribute(TABLE_CONSTANTS.attributes.CUSTOM_CELL_TEMPLATE, "");
|
|
1272
|
-
}
|
|
1273
|
-
});
|
|
1274
|
-
}
|
|
1275
|
-
};
|
|
1276
|
-
|
|
1277
|
-
// dist/build/lib/staging/src/table/table-adapter.ts
|
|
1278
|
-
var TableAdapter = class extends BaseAdapter {
|
|
1279
|
-
constructor(component) {
|
|
1280
|
-
super(component);
|
|
1281
|
-
}
|
|
1282
|
-
initialize() {
|
|
1283
|
-
if (!this._tableElement) {
|
|
1284
|
-
this._tableElement = document.createElement("table");
|
|
1285
|
-
this._tableElement.classList.add(TABLE_CONSTANTS.classes.TABLE);
|
|
1286
|
-
if (this._component.children.length) {
|
|
1287
|
-
removeAllChildren(this._component);
|
|
1288
|
-
}
|
|
1289
|
-
this._component.appendChild(this._tableElement);
|
|
1290
|
-
}
|
|
1291
|
-
}
|
|
1292
|
-
getTableElement() {
|
|
1293
|
-
if (!this._tableElement) {
|
|
1294
|
-
this.initialize();
|
|
1295
|
-
}
|
|
1296
|
-
return this._tableElement;
|
|
1297
|
-
}
|
|
1298
|
-
createTable(configuration) {
|
|
1299
|
-
return TableUtils.createTable(configuration);
|
|
1300
|
-
}
|
|
1301
|
-
recreateTableBody(configuration) {
|
|
1302
|
-
TableUtils.recreateTableBody(configuration);
|
|
1303
|
-
}
|
|
1304
|
-
setSelectedRows(tableElement, key, data, selectedRows, preserveExisting = false) {
|
|
1305
|
-
TableUtils.setSelectedRows(tableElement, key, data, selectedRows, preserveExisting);
|
|
1306
|
-
}
|
|
1307
|
-
clearSelectedRows(tableElement) {
|
|
1308
|
-
TableUtils.clearSelectedRows(tableElement);
|
|
1309
|
-
}
|
|
1310
|
-
updateSelectedState(rowElement, isSelected) {
|
|
1311
|
-
TableUtils.updateSelectedState(rowElement, isSelected);
|
|
1312
|
-
}
|
|
1313
|
-
updateSelectAllState(tableElement, isAllSelected, isIndeterminate) {
|
|
1314
|
-
TableUtils.updateSelectAllState(tableElement, isAllSelected, isIndeterminate);
|
|
1315
|
-
}
|
|
1316
|
-
setSortedColumn(tableElement, columnIndex, sortDirection) {
|
|
1317
|
-
TableUtils.setSortedColumn(tableElement, columnIndex, sortDirection);
|
|
1318
|
-
}
|
|
1319
|
-
removeColumnSort(tableElement, columnIndex) {
|
|
1320
|
-
TableUtils.removeColumnSort(tableElement, columnIndex);
|
|
1321
|
-
}
|
|
1322
|
-
setSortDirection(tableElement, columnIndex, sortDirection) {
|
|
1323
|
-
TableUtils.setSortDirection(tableElement, columnIndex, sortDirection);
|
|
1324
|
-
}
|
|
1325
|
-
setSelectColumnVisibility(tableElement, isVisible, selectListener, selectAllListener, selectAllTemplate, selectCheckboxAlignment, data, tooltipSelect, tooltipSelectAll) {
|
|
1326
|
-
TableUtils.setSelectColumnVisibility(tableElement, isVisible, selectListener, selectAllListener || null, selectAllTemplate || null, selectCheckboxAlignment || null, data || [], tooltipSelect || null, tooltipSelectAll || null);
|
|
1327
|
-
}
|
|
1328
|
-
setDense(tableElement, isDense) {
|
|
1329
|
-
TableUtils.setDenseState(tableElement, isDense);
|
|
1330
|
-
}
|
|
1331
|
-
setRoomy(tableElement, isRoomy) {
|
|
1332
|
-
TableUtils.setRoomyState(tableElement, isRoomy);
|
|
1333
|
-
}
|
|
1334
|
-
setResizable(configuration) {
|
|
1335
|
-
TableUtils.setResizable(configuration);
|
|
1336
|
-
}
|
|
1337
|
-
setSelectAllVisibility(tableElement, isVisible, listener, selectAllTemplate, selectCheckboxAlignment, tooltipSelectAll = null) {
|
|
1338
|
-
TableUtils.setSelectAllVisibility(tableElement, isVisible, listener, selectAllTemplate, selectCheckboxAlignment || null, tooltipSelectAll || null);
|
|
1339
|
-
}
|
|
1340
|
-
setFilterRow(configuration) {
|
|
1341
|
-
TableUtils.setFilterRow(configuration);
|
|
1342
|
-
}
|
|
1343
|
-
expandRow(configuration, rowIndex, template) {
|
|
1344
|
-
return TableUtils.expandRow(configuration, rowIndex, template);
|
|
1345
|
-
}
|
|
1346
|
-
collapseRow(configuration, rowIndex) {
|
|
1347
|
-
return TableUtils.collapseRow(configuration, rowIndex);
|
|
1348
|
-
}
|
|
1349
|
-
isRowExpanded(configuration, rowIndex) {
|
|
1350
|
-
return TableUtils.isRowExpanded(configuration, rowIndex);
|
|
1351
|
-
}
|
|
1352
|
-
setFixedHeaders(configuration) {
|
|
1353
|
-
TableUtils.setFixedHeaders(configuration);
|
|
1354
|
-
}
|
|
1355
|
-
setTableLayoutType(configuration) {
|
|
1356
|
-
TableUtils.setLayoutType(configuration);
|
|
1357
|
-
}
|
|
1358
|
-
setWrapContentState(configuration) {
|
|
1359
|
-
TableUtils.setWrapContentState(configuration.tableElement, configuration.wrapContent);
|
|
1360
|
-
}
|
|
1361
|
-
addDocumentListener(type, listener) {
|
|
1362
|
-
TableUtils.getOwnerDocument(this._component).addEventListener(type, listener);
|
|
1363
|
-
}
|
|
1364
|
-
removeDocumentListener(type, listener) {
|
|
1365
|
-
TableUtils.getOwnerDocument(this._component).removeEventListener(type, listener);
|
|
1366
|
-
}
|
|
1367
|
-
normalizeColumnWidths(configuration) {
|
|
1368
|
-
TableUtils.normalizeColumnWidths(configuration);
|
|
1369
|
-
}
|
|
1370
|
-
setResizeColumnVisibility(configuration, columnIndex, isVisible) {
|
|
1371
|
-
TableUtils.setColumnResizeIndicatorVisibility(configuration, columnIndex, isVisible);
|
|
1372
|
-
}
|
|
1373
|
-
addTableClass(classes2) {
|
|
1374
|
-
addClass(classes2, this._tableElement);
|
|
1375
|
-
}
|
|
1376
|
-
removeTableClass(classes2) {
|
|
1377
|
-
removeClass(classes2, this._tableElement);
|
|
1378
|
-
}
|
|
1379
|
-
setRowClickListeners(tableElement, allowClick, clickListener, doubleClickListener) {
|
|
1380
|
-
TableUtils.setRowClickListeners(tableElement, allowClick, clickListener, doubleClickListener);
|
|
1381
|
-
}
|
|
1382
|
-
setRowClickAttributes(tableElement, allowClick) {
|
|
1383
|
-
TableUtils.setRowClickAttributes(tableElement, allowClick);
|
|
1384
|
-
}
|
|
1385
|
-
};
|
|
1386
|
-
|
|
1387
|
-
// dist/build/lib/staging/src/table/multi-sort-manager.ts
|
|
1388
|
-
var MultiSortManager = class {
|
|
1389
|
-
constructor() {
|
|
1390
|
-
this._sortedColumns = [];
|
|
1391
|
-
}
|
|
1392
|
-
get sortedColumns() {
|
|
1393
|
-
return [...this._sortedColumns.map((c) => __spreadValues({}, c))];
|
|
1394
|
-
}
|
|
1395
|
-
addSortColumn(column) {
|
|
1396
|
-
this._sortedColumns.push(__spreadValues({}, column));
|
|
1397
|
-
this._updateSortNumbers();
|
|
1398
|
-
}
|
|
1399
|
-
updateSortColumn(column) {
|
|
1400
|
-
const col = this._sortedColumns.find((c) => c.columnIndex === column.columnIndex);
|
|
1401
|
-
if (col) {
|
|
1402
|
-
switch (col.direction) {
|
|
1403
|
-
case "ASC" /* Ascending */:
|
|
1404
|
-
this.removeSortColumn(column);
|
|
1405
|
-
break;
|
|
1406
|
-
case "DESC" /* Descending */:
|
|
1407
|
-
col.direction = "ASC" /* Ascending */;
|
|
1408
|
-
break;
|
|
1409
|
-
case "UNSET" /* Unset */:
|
|
1410
|
-
col.direction = "DESC" /* Descending */;
|
|
1411
|
-
break;
|
|
1412
|
-
}
|
|
1413
|
-
}
|
|
1414
|
-
}
|
|
1415
|
-
setSortColumns(columns) {
|
|
1416
|
-
this._sortedColumns = [...columns.map((c) => __spreadValues({}, c))];
|
|
1417
|
-
}
|
|
1418
|
-
removeSortColumn(columnOrIndex) {
|
|
1419
|
-
if (typeof columnOrIndex === "number") {
|
|
1420
|
-
this._sortedColumns.splice(columnOrIndex, 1);
|
|
1421
|
-
} else {
|
|
1422
|
-
this._sortedColumns.splice(this._sortedColumns.indexOf(columnOrIndex), 1);
|
|
1423
|
-
}
|
|
1424
|
-
this._updateSortNumbers();
|
|
1425
|
-
}
|
|
1426
|
-
isSortColumn(columnOrIndex) {
|
|
1427
|
-
if (typeof columnOrIndex === "number") {
|
|
1428
|
-
return this._sortedColumns.some((c) => c.columnIndex === columnOrIndex);
|
|
1429
|
-
} else {
|
|
1430
|
-
return this._sortedColumns.includes(columnOrIndex);
|
|
1431
|
-
}
|
|
1432
|
-
}
|
|
1433
|
-
clearMultiSort() {
|
|
1434
|
-
this._sortedColumns = [];
|
|
1435
|
-
}
|
|
1436
|
-
getSortColumn(columnIndex) {
|
|
1437
|
-
return this._sortedColumns.find((c) => c.columnIndex === columnIndex);
|
|
1438
|
-
}
|
|
1439
|
-
_updateSortNumbers() {
|
|
1440
|
-
if (this._sortedColumns.every((c) => typeof c.sortOrder === "number")) {
|
|
1441
|
-
this._sortedColumns.sort((col1, col2) => col1.sortOrder - col2.sortOrder);
|
|
1442
|
-
}
|
|
1443
|
-
this._sortedColumns.forEach((column, index) => column.sortOrder = index + 1);
|
|
1444
|
-
}
|
|
1445
|
-
};
|
|
1446
|
-
|
|
1447
|
-
// dist/build/lib/staging/src/table/table-row.ts
|
|
1448
|
-
var TableRow = class {
|
|
1449
|
-
constructor(data, selected = false) {
|
|
1450
|
-
this.data = data;
|
|
1451
|
-
this.selected = selected;
|
|
1452
|
-
}
|
|
1453
|
-
};
|
|
1454
|
-
|
|
1455
|
-
// dist/build/lib/staging/src/table/table-foundation.ts
|
|
1456
|
-
var TableFoundation = class {
|
|
1457
|
-
constructor(_adapter) {
|
|
1458
|
-
this._adapter = _adapter;
|
|
1459
|
-
this._tableRows = [];
|
|
1460
|
-
this._data = [];
|
|
1461
|
-
this._columnConfigurations = [];
|
|
1462
|
-
this._select = false;
|
|
1463
|
-
this._multiselect = true;
|
|
1464
|
-
this._dense = false;
|
|
1465
|
-
this._roomy = false;
|
|
1466
|
-
this._filter = false;
|
|
1467
|
-
this._fixedHeaders = false;
|
|
1468
|
-
this._layoutType = TABLE_CONSTANTS.strings.DEFAULT_LAYOUT_TYPE;
|
|
1469
|
-
this._wrapContent = true;
|
|
1470
|
-
this._resizable = false;
|
|
1471
|
-
this._minResizeWidth = TABLE_CONSTANTS.numbers.MIN_RESIZE_WIDTH;
|
|
1472
|
-
this._multiColumnSort = false;
|
|
1473
|
-
this._selectCheckboxAlignment = "center" /* Center */;
|
|
1474
|
-
this._isAllSelected = false;
|
|
1475
|
-
this._sortedColumnIndex = -1;
|
|
1476
|
-
this._rendered = false;
|
|
1477
|
-
this._allowRowClick = false;
|
|
1478
|
-
this._multiSortManager = new MultiSortManager();
|
|
1479
|
-
this._rowClickListener = (evt) => this._onRowClick(evt);
|
|
1480
|
-
this._rowDoubleClickListener = (evt) => this._onRowDoubleClick(evt);
|
|
1481
|
-
this._selectRowListener = (evt) => this._onRowSelected(evt);
|
|
1482
|
-
this._selectAllListener = (evt) => this._onSelectAll(evt);
|
|
1483
|
-
this._headRowMouseDownListener = (evt) => this._onHeadRowMouseDown(evt);
|
|
1484
|
-
this._headRowContextMenuListener = (evt) => this._onHeadRowContextMenu(evt);
|
|
1485
|
-
this._documentMouseMoveListener = (evt) => this._onMouseMove(evt);
|
|
1486
|
-
this._documentMouseUpListener = (evt) => this._onMouseUp(evt);
|
|
1487
|
-
this._filterListener = (value, columnIndex) => this._onFilter(value, columnIndex);
|
|
1488
|
-
this._selectionManager = new ItemManager(this._selectKey);
|
|
1489
|
-
this._hiddenColumnManager = new ItemManager();
|
|
1490
|
-
}
|
|
1491
|
-
initialize() {
|
|
1492
|
-
this.connect();
|
|
1493
|
-
this._adapter.setHostAttribute(TABLE_CONSTANTS.attributes.SELECT, this._select.toString());
|
|
1494
|
-
this._adapter.setHostAttribute(TABLE_CONSTANTS.attributes.MULTISELECT, this._multiselect.toString());
|
|
1495
|
-
this._adapter.setHostAttribute(TABLE_CONSTANTS.attributes.DENSE, this._dense.toString());
|
|
1496
|
-
this._adapter.setHostAttribute(TABLE_CONSTANTS.attributes.ROOMY, this._roomy.toString());
|
|
1497
|
-
this._adapter.setHostAttribute(TABLE_CONSTANTS.attributes.FILTER, this._filter.toString());
|
|
1498
|
-
this._adapter.emitHostEvent(TABLE_CONSTANTS.events.INITIALIZED, void 0, false);
|
|
1499
|
-
}
|
|
1500
|
-
connect() {
|
|
1501
|
-
this._adapter.initialize();
|
|
1502
|
-
}
|
|
1503
|
-
disconnect() {
|
|
1504
|
-
this._resizeDescriptor = void 0;
|
|
1505
|
-
this._adapter.removeDocumentListener("mousemove", this._documentMouseMoveListener);
|
|
1506
|
-
this._adapter.removeDocumentListener("mouseup", this._documentMouseUpListener);
|
|
1507
|
-
}
|
|
1508
|
-
set data(value) {
|
|
1509
|
-
if (Array.isArray(value) && value.length > 0) {
|
|
1510
|
-
if (isObject(value[0])) {
|
|
1511
|
-
this._data = value.map((v) => __spreadValues({}, v));
|
|
1512
|
-
} else {
|
|
1513
|
-
this._data = [...value];
|
|
1514
|
-
}
|
|
1515
|
-
} else {
|
|
1516
|
-
this._data = [];
|
|
1517
|
-
}
|
|
1518
|
-
this._tableRows = this._data.map((data) => new TableRow(data, this._selectionManager.exists(data)));
|
|
1519
|
-
this._renderBody();
|
|
1520
|
-
}
|
|
1521
|
-
get data() {
|
|
1522
|
-
return JSON.parse(JSON.stringify(this._data));
|
|
1523
|
-
}
|
|
1524
|
-
set columnConfigurations(value) {
|
|
1525
|
-
this._columnConfigurations = value.map((cc) => __spreadValues({}, cc));
|
|
1526
|
-
this._hiddenColumnManager.clear();
|
|
1527
|
-
this._columnConfigurations.forEach((cc) => {
|
|
1528
|
-
if (cc.hidden) {
|
|
1529
|
-
this._hiddenColumnManager.add(cc);
|
|
1530
|
-
}
|
|
1531
|
-
});
|
|
1532
|
-
this._refreshTableSort();
|
|
1533
|
-
this.render();
|
|
1534
|
-
}
|
|
1535
|
-
get columnConfigurations() {
|
|
1536
|
-
return this._columnConfigurations.map((cc) => __spreadValues({}, cc));
|
|
1537
|
-
}
|
|
1538
|
-
get _visibleColumnConfigurations() {
|
|
1539
|
-
return this._columnConfigurations.filter((cc) => !this._hiddenColumnManager.exists(cc));
|
|
1540
|
-
}
|
|
1541
|
-
get _tableConfiguration() {
|
|
1542
|
-
return {
|
|
1543
|
-
tableElement: this._adapter.getTableElement(),
|
|
1544
|
-
columnConfigurations: this._visibleColumnConfigurations,
|
|
1545
|
-
data: this._tableRows,
|
|
1546
|
-
clickListener: this._allowRowClick ? this._rowClickListener : null,
|
|
1547
|
-
doubleClickListener: this._allowRowClick ? this._rowDoubleClickListener : null,
|
|
1548
|
-
selectListener: this._select ? this._selectRowListener : null,
|
|
1549
|
-
selectAllListener: this._multiselect ? this._selectAllListener : null,
|
|
1550
|
-
headRowMouseDownListener: this._headRowMouseDownListener,
|
|
1551
|
-
headRowContextMenuListener: this._headRowContextMenuListener,
|
|
1552
|
-
filterListener: this._filter ? this._filterListener : null,
|
|
1553
|
-
sortDirection: this._sortDirection,
|
|
1554
|
-
sortedColumn: this._sortedColumnIndex,
|
|
1555
|
-
multiColumnSort: this._multiColumnSort,
|
|
1556
|
-
filter: this._filter,
|
|
1557
|
-
wrapContent: this._wrapContent,
|
|
1558
|
-
fixedHeaders: this._fixedHeaders,
|
|
1559
|
-
layoutType: this._layoutType,
|
|
1560
|
-
dense: this._dense,
|
|
1561
|
-
resizable: this._resizable,
|
|
1562
|
-
rowCreatedCallback: this._rowCreatedCallback,
|
|
1563
|
-
cellCreatedCallback: this._cellCreatedCallback,
|
|
1564
|
-
selectAllTemplate: this._selectAllTemplate,
|
|
1565
|
-
selectCheckboxAlignment: this._selectCheckboxAlignment,
|
|
1566
|
-
tooltipSelect: this._tooltipSelect,
|
|
1567
|
-
tooltipSelectAll: this._tooltipSelectAll
|
|
1568
|
-
};
|
|
1569
|
-
}
|
|
1570
|
-
set select(value) {
|
|
1571
|
-
if (this._select !== value) {
|
|
1572
|
-
this._select = value;
|
|
1573
|
-
this._adapter.setSelectColumnVisibility(this._adapter.getTableElement(), this._select, this._selectRowListener, this._multiselect ? this._selectAllListener : void 0, this._multiselect ? this._selectAllTemplate : null, this._selectCheckboxAlignment, this._tableRows, this._tooltipSelect, this._tooltipSelectAll);
|
|
1574
|
-
this._updateSelections(true);
|
|
1575
|
-
if (this._select) {
|
|
1576
|
-
this._adapter.setHostAttribute(TABLE_CONSTANTS.attributes.SELECT, this._select.toString());
|
|
1577
|
-
} else {
|
|
1578
|
-
this._adapter.removeHostAttribute(TABLE_CONSTANTS.attributes.SELECT);
|
|
1579
|
-
}
|
|
1580
|
-
}
|
|
1581
|
-
}
|
|
1582
|
-
get select() {
|
|
1583
|
-
return this._select;
|
|
1584
|
-
}
|
|
1585
|
-
set multiselect(value) {
|
|
1586
|
-
if (this._multiselect !== value) {
|
|
1587
|
-
this._multiselect = value;
|
|
1588
|
-
if (this._select) {
|
|
1589
|
-
this._adapter.setSelectAllVisibility(this._adapter.getTableElement(), this._multiselect, this._multiselect ? this._selectAllListener : null, this._multiselect ? this.selectAllTemplate : null, this._selectCheckboxAlignment, this._tooltipSelectAll);
|
|
1590
|
-
this._updateSelections(true);
|
|
1591
|
-
}
|
|
1592
|
-
this._adapter.setHostAttribute(TABLE_CONSTANTS.attributes.MULTISELECT, this._multiselect.toString());
|
|
1593
|
-
}
|
|
1594
|
-
}
|
|
1595
|
-
get multiselect() {
|
|
1596
|
-
return this._multiselect;
|
|
1597
|
-
}
|
|
1598
|
-
get selectKey() {
|
|
1599
|
-
if (Array.isArray(this._selectKey)) {
|
|
1600
|
-
return [...this._selectKey];
|
|
1601
|
-
}
|
|
1602
|
-
return this._selectKey;
|
|
1603
|
-
}
|
|
1604
|
-
set selectKey(value) {
|
|
1605
|
-
if (this._originalSelectKey === value) {
|
|
1606
|
-
return;
|
|
1607
|
-
}
|
|
1608
|
-
if (Array.isArray(value)) {
|
|
1609
|
-
this._originalSelectKey = [...value];
|
|
1610
|
-
this._selectKey = [...value];
|
|
1611
|
-
} else {
|
|
1612
|
-
this._originalSelectKey = value;
|
|
1613
|
-
this._selectKey = [value];
|
|
1614
|
-
}
|
|
1615
|
-
this._selectionManager.setKey(this._selectKey);
|
|
1616
|
-
this._updateSelections(false);
|
|
1617
|
-
}
|
|
1618
|
-
get dense() {
|
|
1619
|
-
return this._dense;
|
|
1620
|
-
}
|
|
1621
|
-
set dense(value) {
|
|
1622
|
-
if (this._dense !== value) {
|
|
1623
|
-
this._dense = value;
|
|
1624
|
-
this._adapter.setDense(this._adapter.getTableElement(), this._dense);
|
|
1625
|
-
this._adapter.setHostAttribute(TABLE_CONSTANTS.attributes.DENSE, this._dense.toString());
|
|
1626
|
-
}
|
|
1627
|
-
}
|
|
1628
|
-
get roomy() {
|
|
1629
|
-
return this._roomy;
|
|
1630
|
-
}
|
|
1631
|
-
set roomy(value) {
|
|
1632
|
-
if (value !== this._roomy) {
|
|
1633
|
-
this._roomy = value;
|
|
1634
|
-
this._applyRoomy();
|
|
1635
|
-
}
|
|
1636
|
-
}
|
|
1637
|
-
set filter(value) {
|
|
1638
|
-
if (this._filter !== value) {
|
|
1639
|
-
this._filter = value;
|
|
1640
|
-
this._adapter.setFilterRow(this._tableConfiguration);
|
|
1641
|
-
this._adapter.setHostAttribute(TABLE_CONSTANTS.attributes.FILTER, this._filter.toString());
|
|
1642
|
-
}
|
|
1643
|
-
}
|
|
1644
|
-
get filter() {
|
|
1645
|
-
return this._filter;
|
|
1646
|
-
}
|
|
1647
|
-
set fixedHeaders(value) {
|
|
1648
|
-
if (this._fixedHeaders !== value) {
|
|
1649
|
-
this._fixedHeaders = value;
|
|
1650
|
-
this._adapter.setFixedHeaders(this._tableConfiguration);
|
|
1651
|
-
}
|
|
1652
|
-
}
|
|
1653
|
-
get fixedHeaders() {
|
|
1654
|
-
return this._fixedHeaders;
|
|
1655
|
-
}
|
|
1656
|
-
get layoutType() {
|
|
1657
|
-
return this._layoutType;
|
|
1658
|
-
}
|
|
1659
|
-
set layoutType(value) {
|
|
1660
|
-
if (this._layoutType !== value) {
|
|
1661
|
-
this._layoutType = value;
|
|
1662
|
-
this._adapter.setTableLayoutType(this._tableConfiguration);
|
|
1663
|
-
}
|
|
1664
|
-
}
|
|
1665
|
-
get wrapContent() {
|
|
1666
|
-
return this._wrapContent;
|
|
1667
|
-
}
|
|
1668
|
-
set wrapContent(value) {
|
|
1669
|
-
if (this._wrapContent !== value) {
|
|
1670
|
-
this._wrapContent = value;
|
|
1671
|
-
this._adapter.setWrapContentState(this._tableConfiguration);
|
|
1672
|
-
}
|
|
1673
|
-
}
|
|
1674
|
-
get resizable() {
|
|
1675
|
-
return this._resizable;
|
|
1676
|
-
}
|
|
1677
|
-
set resizable(value) {
|
|
1678
|
-
if (this._resizable !== value) {
|
|
1679
|
-
this._resizable = value;
|
|
1680
|
-
this._adapter.setResizable(this._tableConfiguration);
|
|
1681
|
-
}
|
|
1682
|
-
}
|
|
1683
|
-
get minResizeWidth() {
|
|
1684
|
-
return this._minResizeWidth;
|
|
1685
|
-
}
|
|
1686
|
-
set minResizeWidth(value) {
|
|
1687
|
-
if (this._minResizeWidth !== value) {
|
|
1688
|
-
this._minResizeWidth = value;
|
|
1689
|
-
if (!isNumber(this._minResizeWidth)) {
|
|
1690
|
-
this._minResizeWidth = TABLE_CONSTANTS.numbers.MIN_RESIZE_WIDTH;
|
|
1691
|
-
} else if (this._minResizeWidth < 0) {
|
|
1692
|
-
this._minResizeWidth = 0;
|
|
1693
|
-
}
|
|
1694
|
-
}
|
|
1695
|
-
}
|
|
1696
|
-
get allowRowClick() {
|
|
1697
|
-
return this._allowRowClick;
|
|
1698
|
-
}
|
|
1699
|
-
set allowRowClick(value) {
|
|
1700
|
-
if (this._allowRowClick !== value) {
|
|
1701
|
-
this._allowRowClick = value;
|
|
1702
|
-
if (this._rendered) {
|
|
1703
|
-
this._adapter.setRowClickListeners(this._adapter.getTableElement(), this._allowRowClick, this._rowClickListener, this._rowDoubleClickListener);
|
|
1704
|
-
this._adapter.setRowClickAttributes(this._adapter.getTableElement(), this._allowRowClick);
|
|
1705
|
-
}
|
|
1706
|
-
}
|
|
1707
|
-
}
|
|
1708
|
-
get multiColumnSort() {
|
|
1709
|
-
return this._multiColumnSort;
|
|
1710
|
-
}
|
|
1711
|
-
set multiColumnSort(value) {
|
|
1712
|
-
if (value !== this._multiColumnSort) {
|
|
1713
|
-
this._multiColumnSort = value;
|
|
1714
|
-
this._refreshTableSort();
|
|
1715
|
-
this.render();
|
|
1716
|
-
}
|
|
1717
|
-
}
|
|
1718
|
-
get selectCheckboxAlignment() {
|
|
1719
|
-
return this._selectCheckboxAlignment;
|
|
1720
|
-
}
|
|
1721
|
-
set selectCheckboxAlignment(value) {
|
|
1722
|
-
if (value !== this._selectCheckboxAlignment) {
|
|
1723
|
-
this._selectCheckboxAlignment = value;
|
|
1724
|
-
this._adapter.setHostAttribute(TABLE_CONSTANTS.attributes.SELECT_CHECKBOX_ALIGNMENT, value);
|
|
1725
|
-
this.render();
|
|
1726
|
-
}
|
|
1727
|
-
}
|
|
1728
|
-
get tooltipSelect() {
|
|
1729
|
-
return this._tooltipSelect;
|
|
1730
|
-
}
|
|
1731
|
-
set tooltipSelect(value) {
|
|
1732
|
-
if (value !== this._tooltipSelect) {
|
|
1733
|
-
this._tooltipSelect = value;
|
|
1734
|
-
if (typeof value === "string") {
|
|
1735
|
-
this._adapter.setHostAttribute(TABLE_CONSTANTS.attributes.TOOLTIP_SELECT, value);
|
|
1736
|
-
}
|
|
1737
|
-
this.render();
|
|
1738
|
-
}
|
|
1739
|
-
}
|
|
1740
|
-
get tooltipSelectAll() {
|
|
1741
|
-
return this._tooltipSelectAll;
|
|
1742
|
-
}
|
|
1743
|
-
set tooltipSelectAll(value) {
|
|
1744
|
-
if (value !== this._tooltipSelectAll) {
|
|
1745
|
-
this._tooltipSelectAll = value;
|
|
1746
|
-
this._adapter.setHostAttribute(TABLE_CONSTANTS.attributes.TOOLTIP_SELECT_ALL, value);
|
|
1747
|
-
this.render();
|
|
1748
|
-
}
|
|
1749
|
-
}
|
|
1750
|
-
get selectAllTemplate() {
|
|
1751
|
-
return this._selectAllTemplate;
|
|
1752
|
-
}
|
|
1753
|
-
set selectAllTemplate(value) {
|
|
1754
|
-
if (value !== this._selectAllTemplate) {
|
|
1755
|
-
this._selectAllTemplate = value;
|
|
1756
|
-
this.render();
|
|
1757
|
-
}
|
|
1758
|
-
}
|
|
1759
|
-
get rowCreated() {
|
|
1760
|
-
return this._rowCreatedCallback;
|
|
1761
|
-
}
|
|
1762
|
-
set rowCreated(value) {
|
|
1763
|
-
this._rowCreatedCallback = value;
|
|
1764
|
-
}
|
|
1765
|
-
get cellCreated() {
|
|
1766
|
-
return this._cellCreatedCallback;
|
|
1767
|
-
}
|
|
1768
|
-
set cellCreated(value) {
|
|
1769
|
-
this._cellCreatedCallback = value;
|
|
1770
|
-
}
|
|
1771
|
-
isRowSelected(rowData) {
|
|
1772
|
-
const predicate = createPredicate(Array.isArray(this._selectKey) ? this._selectKey : [this._selectKey], rowData);
|
|
1773
|
-
return this.selectKey ? !!this._selectionManager.getItems().find((item) => matchesPredicate(item, predicate)) : this._selectionManager.exists(rowData);
|
|
1774
|
-
}
|
|
1775
|
-
getSelectedRows() {
|
|
1776
|
-
return this._selectionManager.getItems();
|
|
1777
|
-
}
|
|
1778
|
-
selectRows(data, clearCurrentSelections) {
|
|
1779
|
-
if (!this._selectKey) {
|
|
1780
|
-
throw new Error("You must set a selectKey to select rows.");
|
|
1781
|
-
}
|
|
1782
|
-
if (!this._multiselect || clearCurrentSelections) {
|
|
1783
|
-
this.clearSelections();
|
|
1784
|
-
}
|
|
1785
|
-
if (data && data.length) {
|
|
1786
|
-
this._selectionManager.add(data);
|
|
1787
|
-
this._updateSelections(!clearCurrentSelections);
|
|
1788
|
-
}
|
|
1789
|
-
}
|
|
1790
|
-
deselectRows(data) {
|
|
1791
|
-
if (data && data.length) {
|
|
1792
|
-
this._selectionManager.remove(data);
|
|
1793
|
-
this._updateSelections(false);
|
|
1794
|
-
}
|
|
1795
|
-
}
|
|
1796
|
-
clearSelections() {
|
|
1797
|
-
const tableElement = this._adapter.getTableElement();
|
|
1798
|
-
this._selectionManager.clear();
|
|
1799
|
-
this._tableRows.forEach((tableRow) => tableRow.selected = false);
|
|
1800
|
-
this._isAllSelected = false;
|
|
1801
|
-
this._adapter.clearSelectedRows(tableElement);
|
|
1802
|
-
if (this._select && this._multiselect) {
|
|
1803
|
-
this._adapter.updateSelectAllState(tableElement, false);
|
|
1804
|
-
}
|
|
1805
|
-
}
|
|
1806
|
-
hideColumn(columnIndex) {
|
|
1807
|
-
const columnConfig = this._columnConfigurations[columnIndex];
|
|
1808
|
-
if (this._sortedColumnIndex === columnIndex) {
|
|
1809
|
-
this._sortedColumnIndex = -1;
|
|
1810
|
-
}
|
|
1811
|
-
if (!this._hiddenColumnManager.exists(columnConfig)) {
|
|
1812
|
-
this._hiddenColumnManager.add(columnConfig);
|
|
1813
|
-
this.render();
|
|
1814
|
-
}
|
|
1815
|
-
}
|
|
1816
|
-
showColumn(columnIndex) {
|
|
1817
|
-
const columnConfig = this._columnConfigurations[columnIndex];
|
|
1818
|
-
if (this._hiddenColumnManager.exists(columnConfig)) {
|
|
1819
|
-
this._hiddenColumnManager.remove(columnConfig);
|
|
1820
|
-
this.render();
|
|
1821
|
-
}
|
|
1822
|
-
}
|
|
1823
|
-
render() {
|
|
1824
|
-
this._adapter.createTable(this._tableConfiguration);
|
|
1825
|
-
this._renderSelections();
|
|
1826
|
-
this._rendered = true;
|
|
1827
|
-
}
|
|
1828
|
-
_renderBody() {
|
|
1829
|
-
if (!this._rendered) {
|
|
1830
|
-
return;
|
|
1831
|
-
}
|
|
1832
|
-
this._adapter.recreateTableBody(this._tableConfiguration);
|
|
1833
|
-
this._renderSelections();
|
|
1834
|
-
}
|
|
1835
|
-
_renderSelections() {
|
|
1836
|
-
if (this.select) {
|
|
1837
|
-
this._isAllSelected = this._getSelectAllState();
|
|
1838
|
-
if (this._multiselect) {
|
|
1839
|
-
this._adapter.updateSelectAllState(this._adapter.getTableElement(), this._isAllSelected, this._isIndeterminate(this._isAllSelected));
|
|
1840
|
-
}
|
|
1841
|
-
}
|
|
1842
|
-
const selections = this._selectionManager.getItems();
|
|
1843
|
-
if (selections.length) {
|
|
1844
|
-
this._adapter.setSelectedRows(this._adapter.getTableElement(), this._selectKey, this._data, selections, false);
|
|
1845
|
-
}
|
|
1846
|
-
}
|
|
1847
|
-
expandRow(rowIndex, template) {
|
|
1848
|
-
if (!this._rendered) {
|
|
1849
|
-
throw new Error("Cannot expand a row before the table has rendered.");
|
|
1850
|
-
}
|
|
1851
|
-
if (rowIndex < 0 || rowIndex > this._tableRows.length) {
|
|
1852
|
-
throw new Error(`Invalid row index: ${rowIndex}.`);
|
|
1853
|
-
}
|
|
1854
|
-
return this._adapter.expandRow(this._tableConfiguration, rowIndex, template);
|
|
1855
|
-
}
|
|
1856
|
-
collapseRow(rowIndex) {
|
|
1857
|
-
if (!this._rendered) {
|
|
1858
|
-
return Promise.resolve();
|
|
1859
|
-
}
|
|
1860
|
-
if (rowIndex < 0 || rowIndex > this._tableRows.length) {
|
|
1861
|
-
return Promise.resolve();
|
|
1862
|
-
}
|
|
1863
|
-
return this._adapter.collapseRow(this._tableConfiguration, rowIndex);
|
|
1864
|
-
}
|
|
1865
|
-
isRowExpanded(rowIndex) {
|
|
1866
|
-
return this._adapter.isRowExpanded(this._tableConfiguration, rowIndex);
|
|
1867
|
-
}
|
|
1868
|
-
selectRowsByIndex(indexes, preserveExisting) {
|
|
1869
|
-
const rowsToSelect = indexes.map((i) => this._data[i]).filter((obj) => !!obj);
|
|
1870
|
-
this.selectRows(rowsToSelect, !preserveExisting);
|
|
1871
|
-
}
|
|
1872
|
-
deselectRowsByIndex(indexes) {
|
|
1873
|
-
const rowsToDeselect = indexes.map((i) => this._data[i]).filter((obj) => !!obj);
|
|
1874
|
-
this.deselectRows(rowsToDeselect);
|
|
1875
|
-
}
|
|
1876
|
-
_getSelectAllState() {
|
|
1877
|
-
return this._tableRows.length > 0 && this._tableRows.every((tr) => tr.selected);
|
|
1878
|
-
}
|
|
1879
|
-
_updateSelections(preserveExisting) {
|
|
1880
|
-
this._tableRows.forEach((tableRow) => tableRow.selected = this._selectionManager.exists(tableRow.data));
|
|
1881
|
-
const isAllSelected = this._getSelectAllState();
|
|
1882
|
-
this._adapter.setSelectedRows(this._adapter.getTableElement(), this._selectKey, this._data, this._selectionManager.getItems(), preserveExisting);
|
|
1883
|
-
if (isAllSelected !== this._isAllSelected || this._isIndeterminate(isAllSelected)) {
|
|
1884
|
-
this._isAllSelected = isAllSelected;
|
|
1885
|
-
if (this._multiselect) {
|
|
1886
|
-
this._adapter.updateSelectAllState(this._adapter.getTableElement(), this._isAllSelected, this._isIndeterminate(this._isAllSelected));
|
|
1887
|
-
}
|
|
1888
|
-
}
|
|
1889
|
-
}
|
|
1890
|
-
_onRowClick(evt) {
|
|
1891
|
-
evt.stopImmediatePropagation();
|
|
1892
|
-
if (evt.target.tagName === "INPUT" && evt.target.type === "checkbox") {
|
|
1893
|
-
return;
|
|
1894
|
-
}
|
|
1895
|
-
const composedPath = getEventPath(evt);
|
|
1896
|
-
const composedElements = composedPath.filter((node) => node.nodeType === 1);
|
|
1897
|
-
const customCellTemplateElement = composedElements.find((el) => el.hasAttribute(TABLE_CONSTANTS.attributes.CUSTOM_CELL_TEMPLATE));
|
|
1898
|
-
const stopClickPropagation = customCellTemplateElement && customCellTemplateElement.hasAttribute(TABLE_CONSTANTS.attributes.CUSTOM_CELL_TEMPLATE_STOP_PROPAGATION);
|
|
1899
|
-
if (stopClickPropagation) {
|
|
1900
|
-
return;
|
|
1901
|
-
}
|
|
1902
|
-
const { index, data } = this._getSelectedRowFromEvent(evt);
|
|
1903
|
-
const evtData = { index, data };
|
|
1904
|
-
this._adapter.emitHostEvent(TABLE_CONSTANTS.events.ROW_CLICK, evtData, true, false);
|
|
1905
|
-
}
|
|
1906
|
-
_onRowDoubleClick(evt) {
|
|
1907
|
-
evt.stopPropagation();
|
|
1908
|
-
if (evt.target.tagName === "INPUT" && evt.target.type === "checkbox") {
|
|
1909
|
-
return;
|
|
1910
|
-
}
|
|
1911
|
-
const rowSelectedInfo = this._getSelectedRowFromEvent(evt);
|
|
1912
|
-
const detail = {
|
|
1913
|
-
index: rowSelectedInfo.index,
|
|
1914
|
-
data: rowSelectedInfo.data
|
|
1915
|
-
};
|
|
1916
|
-
this._adapter.emitHostEvent(TABLE_CONSTANTS.events.SELECT_DOUBLE, detail, true, false);
|
|
1917
|
-
}
|
|
1918
|
-
_onRowSelected(evt) {
|
|
1919
|
-
const rowSelectedInfo = this._getSelectedRowFromEvent(evt);
|
|
1920
|
-
if (!this._multiselect) {
|
|
1921
|
-
const existingSelections = this._tableRows.filter((item) => item.selected);
|
|
1922
|
-
existingSelections.forEach((selection) => {
|
|
1923
|
-
if (!matchesPredicate(selection.data, createPredicate(this._selectKey, rowSelectedInfo.data))) {
|
|
1924
|
-
this.deselectRows([selection.data]);
|
|
1925
|
-
}
|
|
1926
|
-
});
|
|
1927
|
-
}
|
|
1928
|
-
const isSelected = !this._selectionManager.exists(rowSelectedInfo.data);
|
|
1929
|
-
this._adapter.updateSelectedState(rowSelectedInfo.rowElement, isSelected);
|
|
1930
|
-
if (isSelected) {
|
|
1931
|
-
this._selectionManager.add(rowSelectedInfo.data);
|
|
1932
|
-
} else {
|
|
1933
|
-
this._selectionManager.remove(rowSelectedInfo.data);
|
|
1934
|
-
}
|
|
1935
|
-
this._tableRows[rowSelectedInfo.index].selected = isSelected;
|
|
1936
|
-
let selectionIndexes = [rowSelectedInfo.index];
|
|
1937
|
-
let isAllSelected = false;
|
|
1938
|
-
if (this._multiselect) {
|
|
1939
|
-
const shift = evt.shiftKey;
|
|
1940
|
-
if (shift && this._previouslyClickedRow) {
|
|
1941
|
-
selectionIndexes = this._shiftSelectRows(rowSelectedInfo);
|
|
1942
|
-
if (selectionIndexes.includes(this._previouslyClickedRow.index)) {
|
|
1943
|
-
const idx = selectionIndexes.indexOf(this._previouslyClickedRow.index);
|
|
1944
|
-
selectionIndexes.splice(idx, 1);
|
|
1945
|
-
}
|
|
1946
|
-
}
|
|
1947
|
-
isAllSelected = this._getSelectAllState();
|
|
1948
|
-
this._adapter.updateSelectAllState(this._adapter.getTableElement(), isAllSelected, this._isIndeterminate(isAllSelected));
|
|
1949
|
-
}
|
|
1950
|
-
for (const index of selectionIndexes) {
|
|
1951
|
-
const data = this._tableRows[index].data;
|
|
1952
|
-
const selected = this._selectionManager.exists(data);
|
|
1953
|
-
const detail = { selected, index, data };
|
|
1954
|
-
this._adapter.emitHostEvent(TABLE_CONSTANTS.events.SELECT, detail, true, false);
|
|
1955
|
-
}
|
|
1956
|
-
if (this._isAllSelected !== isAllSelected) {
|
|
1957
|
-
this._isAllSelected = isAllSelected;
|
|
1958
|
-
const data = {
|
|
1959
|
-
status: this._isAllSelected,
|
|
1960
|
-
count: this._tableRows.filter((row) => row.selected).length,
|
|
1961
|
-
data: [...this._data],
|
|
1962
|
-
targetType: "row"
|
|
1963
|
-
};
|
|
1964
|
-
this._adapter.emitHostEvent(TABLE_CONSTANTS.events.SELECT_ALL, data, true, false);
|
|
1965
|
-
}
|
|
1966
|
-
this._previouslyClickedRow = __spreadValues({}, rowSelectedInfo);
|
|
1967
|
-
}
|
|
1968
|
-
_getSelectedRowFromEvent(evt) {
|
|
1969
|
-
const composedPath = getEventPath(evt);
|
|
1970
|
-
const rowElement = composedPath.find((el) => el.tagName === "TR");
|
|
1971
|
-
const tbody = rowElement.parentElement;
|
|
1972
|
-
const index = this._getNonExpandedRows(tbody).findIndex((el) => el === rowElement);
|
|
1973
|
-
const data = this._tableRows[index].data;
|
|
1974
|
-
return { rowElement, index, data };
|
|
1975
|
-
}
|
|
1976
|
-
_getNonExpandedRows(tbodyElement) {
|
|
1977
|
-
return Array.from(tbodyElement.rows).filter((row) => !row.classList.contains(TABLE_CONSTANTS.classes.TABLE_ROW_EXPANDABLE_CONTENT));
|
|
1978
|
-
}
|
|
1979
|
-
_onSelectAll(evt) {
|
|
1980
|
-
evt.stopPropagation();
|
|
1981
|
-
this._isAllSelected = !this._isAllSelected;
|
|
1982
|
-
const tableElement = this._adapter.getTableElement();
|
|
1983
|
-
this._adapter.updateSelectAllState(tableElement, this._isAllSelected);
|
|
1984
|
-
this._tableRows.forEach((tableRow, index) => {
|
|
1985
|
-
tableRow.selected = this._isAllSelected;
|
|
1986
|
-
if (this._isAllSelected) {
|
|
1987
|
-
this._selectionManager.add(tableRow.data);
|
|
1988
|
-
} else {
|
|
1989
|
-
this._selectionManager.remove(tableRow.data);
|
|
1990
|
-
}
|
|
1991
|
-
const rowElement = TableUtils.getRowByIndex(tableElement, index);
|
|
1992
|
-
if (rowElement) {
|
|
1993
|
-
this._adapter.updateSelectedState(rowElement, this._isAllSelected);
|
|
1994
|
-
}
|
|
1995
|
-
});
|
|
1996
|
-
const data = {
|
|
1997
|
-
status: this._isAllSelected,
|
|
1998
|
-
count: this._tableRows.filter((row) => row.selected).length,
|
|
1999
|
-
data: [...this._data],
|
|
2000
|
-
targetType: "select-all"
|
|
2001
|
-
};
|
|
2002
|
-
this._adapter.emitHostEvent(TABLE_CONSTANTS.events.SELECT_ALL, data, true, false);
|
|
2003
|
-
}
|
|
2004
|
-
_onHeadRowContextMenu(evt) {
|
|
2005
|
-
evt.preventDefault();
|
|
2006
|
-
}
|
|
2007
|
-
_onHeadRowMouseDown(evt) {
|
|
2008
|
-
if (evt.button !== 0) {
|
|
2009
|
-
return;
|
|
2010
|
-
}
|
|
2011
|
-
const composedPath = getEventPath(evt);
|
|
2012
|
-
const target = evt.target;
|
|
2013
|
-
const rowElement = composedPath.find((el) => el.tagName === "TR");
|
|
2014
|
-
const thElement = composedPath.find((el) => el.tagName === "TH");
|
|
2015
|
-
const cellIndex = Array.from(rowElement.cells).findIndex((c) => c === thElement);
|
|
2016
|
-
this._headCellMouseDownIndex = cellIndex;
|
|
2017
|
-
if (target !== thElement && target.classList.contains(TABLE_CONSTANTS.classes.TABLE_RESIZE_HANDLE)) {
|
|
2018
|
-
this._resizeDescriptor = {
|
|
2019
|
-
element: thElement,
|
|
2020
|
-
startWidth: thElement.offsetWidth,
|
|
2021
|
-
startX: evt.pageX,
|
|
2022
|
-
width: thElement.offsetWidth,
|
|
2023
|
-
index: this._select ? cellIndex - 1 : cellIndex
|
|
2024
|
-
};
|
|
2025
|
-
this._adapter.addDocumentListener("mousemove", this._documentMouseMoveListener);
|
|
2026
|
-
this._adapter.setResizeColumnVisibility(this._tableConfiguration, cellIndex, true);
|
|
2027
|
-
}
|
|
2028
|
-
this._adapter.addDocumentListener("mouseup", this._documentMouseUpListener);
|
|
2029
|
-
}
|
|
2030
|
-
_onMouseMove(evt) {
|
|
2031
|
-
if (this._resizeDescriptor) {
|
|
2032
|
-
let newWidth = this._resizeDescriptor.startWidth + (evt.pageX - this._resizeDescriptor.startX);
|
|
2033
|
-
if (newWidth < this._minResizeWidth) {
|
|
2034
|
-
newWidth = this._minResizeWidth;
|
|
2035
|
-
}
|
|
2036
|
-
this._resizeDescriptor.width = newWidth;
|
|
2037
|
-
this._resizeDescriptor.element.style.width = `${newWidth}px`;
|
|
2038
|
-
this._adapter.addTableClass(TABLE_CONSTANTS.classes.TABLE_RESIZING);
|
|
2039
|
-
}
|
|
2040
|
-
}
|
|
2041
|
-
_onMouseUp(evt) {
|
|
2042
|
-
this._adapter.removeDocumentListener("mousemove", this._documentMouseMoveListener);
|
|
2043
|
-
this._adapter.removeDocumentListener("mouseup", this._documentMouseUpListener);
|
|
2044
|
-
this._adapter.removeTableClass(TABLE_CONSTANTS.classes.TABLE_RESIZING);
|
|
2045
|
-
if (this._headCellMouseDownIndex === void 0) {
|
|
2046
|
-
return;
|
|
2047
|
-
}
|
|
2048
|
-
if (this._resizeDescriptor) {
|
|
2049
|
-
this._adapter.normalizeColumnWidths(this._tableConfiguration);
|
|
2050
|
-
this._adapter.setResizeColumnVisibility(this._tableConfiguration, this._headCellMouseDownIndex, false);
|
|
2051
|
-
const resizeEventData = {
|
|
2052
|
-
index: this._resizeDescriptor.index,
|
|
2053
|
-
width: this._resizeDescriptor.width
|
|
2054
|
-
};
|
|
2055
|
-
this._adapter.emitHostEvent(TABLE_CONSTANTS.events.COLUMN_RESIZE, resizeEventData);
|
|
2056
|
-
this._resizeDescriptor = void 0;
|
|
2057
|
-
} else if (this._tableConfiguration.tableElement.tHead.contains(evt.target)) {
|
|
2058
|
-
if (this._multiColumnSort) {
|
|
2059
|
-
this._onMultiSort(this._headCellMouseDownIndex, evt.ctrlKey);
|
|
2060
|
-
} else {
|
|
2061
|
-
this._onSort(this._headCellMouseDownIndex);
|
|
2062
|
-
}
|
|
2063
|
-
}
|
|
2064
|
-
this._headCellMouseDownIndex = void 0;
|
|
2065
|
-
}
|
|
2066
|
-
_onSort(cellIndex) {
|
|
2067
|
-
const columnIndex = this._select ? cellIndex - 1 : cellIndex;
|
|
2068
|
-
const columnConfig = columnIndex >= 0 ? this._visibleColumnConfigurations[columnIndex] : null;
|
|
2069
|
-
if (!columnConfig || !columnConfig.sortable) {
|
|
2070
|
-
return;
|
|
2071
|
-
}
|
|
2072
|
-
let desiredSortDirection = "ASC" /* Ascending */;
|
|
2073
|
-
const isTogglingSortOnSameColumn = columnIndex === this._sortedColumnIndex;
|
|
2074
|
-
const currentSortDirectionIsAscending = this._sortDirection === "ASC" /* Ascending */ || this._sortDirection === void 0;
|
|
2075
|
-
const isUnsorting = isTogglingSortOnSameColumn && this._sortDirection === "DESC" /* Descending */;
|
|
2076
|
-
if (isTogglingSortOnSameColumn && currentSortDirectionIsAscending) {
|
|
2077
|
-
desiredSortDirection = "DESC" /* Descending */;
|
|
2078
|
-
}
|
|
2079
|
-
if (isUnsorting && !columnConfig.preventUnsort) {
|
|
2080
|
-
desiredSortDirection = "UNSET" /* Unset */;
|
|
2081
|
-
}
|
|
2082
|
-
const data = {
|
|
2083
|
-
direction: desiredSortDirection,
|
|
2084
|
-
columnIndex
|
|
2085
|
-
};
|
|
2086
|
-
if (!this._adapter.emitHostEvent(TABLE_CONSTANTS.events.SORT, data, true, true)) {
|
|
2087
|
-
return;
|
|
2088
|
-
}
|
|
2089
|
-
if (isTogglingSortOnSameColumn && this._sortDirection === "DESC" /* Descending */ && !columnConfig.preventUnsort) {
|
|
2090
|
-
this._adapter.removeColumnSort(this._adapter.getTableElement(), this._select ? this._sortedColumnIndex + 1 : this._sortedColumnIndex);
|
|
2091
|
-
this._sortedColumnIndex = -1;
|
|
2092
|
-
return;
|
|
2093
|
-
}
|
|
2094
|
-
this._sortDirection = desiredSortDirection;
|
|
2095
|
-
if (columnIndex === this._sortedColumnIndex) {
|
|
2096
|
-
this._adapter.setSortDirection(this._adapter.getTableElement(), cellIndex, this._sortDirection);
|
|
2097
|
-
} else {
|
|
2098
|
-
if (this._sortedColumnIndex >= 0) {
|
|
2099
|
-
this._adapter.removeColumnSort(this._adapter.getTableElement(), this._select ? this._sortedColumnIndex + 1 : this._sortedColumnIndex);
|
|
2100
|
-
}
|
|
2101
|
-
this._sortedColumnIndex = columnIndex;
|
|
2102
|
-
this._adapter.setSortedColumn(this._adapter.getTableElement(), cellIndex, this._sortDirection);
|
|
2103
|
-
}
|
|
2104
|
-
}
|
|
2105
|
-
_onMultiSort(cellIndex, ctrlKey) {
|
|
2106
|
-
const columnIndex = this._select ? cellIndex - 1 : cellIndex;
|
|
2107
|
-
const columnConfig = columnIndex >= 0 ? this._visibleColumnConfigurations[columnIndex] : null;
|
|
2108
|
-
if (!columnConfig || !columnConfig.sortable) {
|
|
2109
|
-
return;
|
|
2110
|
-
}
|
|
2111
|
-
const revertColumns = this._multiSortManager.sortedColumns;
|
|
2112
|
-
const sortColumn = this._multiSortManager.getSortColumn(columnIndex);
|
|
2113
|
-
if (sortColumn) {
|
|
2114
|
-
this._multiSortManager.updateSortColumn(sortColumn);
|
|
2115
|
-
} else if (ctrlKey) {
|
|
2116
|
-
this._multiSortManager.addSortColumn({ direction: "DESC" /* Descending */, columnIndex, propertyName: columnConfig.property });
|
|
2117
|
-
} else {
|
|
2118
|
-
this._multiSortManager.clearMultiSort();
|
|
2119
|
-
this._multiSortManager.addSortColumn({ direction: "DESC" /* Descending */, columnIndex, propertyName: columnConfig.property });
|
|
2120
|
-
}
|
|
2121
|
-
const data = this._multiSortManager.sortedColumns.map((col) => __spreadValues({}, col));
|
|
2122
|
-
if (!this._adapter.emitHostEvent(TABLE_CONSTANTS.events.SORT, data, true, true)) {
|
|
2123
|
-
this._multiSortManager.setSortColumns(revertColumns);
|
|
2124
|
-
return;
|
|
2125
|
-
}
|
|
2126
|
-
const newSortedColumns = this._multiSortManager.sortedColumns;
|
|
2127
|
-
const hasMultipleColumnsSorted = newSortedColumns.length > 1;
|
|
2128
|
-
for (let virtualIndex = 0; virtualIndex < this._visibleColumnConfigurations.length; virtualIndex++) {
|
|
2129
|
-
const actualIndex = this._select ? virtualIndex + 1 : virtualIndex;
|
|
2130
|
-
if (!this._multiSortManager.isSortColumn(virtualIndex)) {
|
|
2131
|
-
this._adapter.removeColumnSort(this._adapter.getTableElement(), actualIndex);
|
|
2132
|
-
TableUtils.setMultiSortColumnSortNumber(this._adapter.getTableElement(), hasMultipleColumnsSorted, actualIndex, null);
|
|
2133
|
-
} else {
|
|
2134
|
-
const column = this._multiSortManager.getSortColumn(virtualIndex);
|
|
2135
|
-
if (column) {
|
|
2136
|
-
this._adapter.setSortedColumn(this._adapter.getTableElement(), actualIndex, column.direction);
|
|
2137
|
-
TableUtils.setMultiSortColumnSortNumber(this._adapter.getTableElement(), hasMultipleColumnsSorted, actualIndex, column.sortOrder || null);
|
|
2138
|
-
}
|
|
2139
|
-
}
|
|
2140
|
-
}
|
|
2141
|
-
}
|
|
2142
|
-
_onFilter(value, columnIndex) {
|
|
2143
|
-
const data = { value, columnIndex };
|
|
2144
|
-
this._adapter.emitHostEvent(TABLE_CONSTANTS.events.FILTER, data, true, false);
|
|
2145
|
-
}
|
|
2146
|
-
_shiftSelectRows(selectedRow) {
|
|
2147
|
-
const indexes = [];
|
|
2148
|
-
if (this._previouslyClickedRow) {
|
|
2149
|
-
const prevIndex = this._previouslyClickedRow.index;
|
|
2150
|
-
const currIndex = selectedRow.index;
|
|
2151
|
-
let startIndex = currIndex >= prevIndex ? prevIndex : currIndex;
|
|
2152
|
-
let endIndex = currIndex >= prevIndex ? currIndex : prevIndex;
|
|
2153
|
-
endIndex += endIndex > startIndex ? 1 : 0;
|
|
2154
|
-
startIndex += startIndex > endIndex ? 1 : 0;
|
|
2155
|
-
let action = (data) => this.selectRows(data, false);
|
|
2156
|
-
const existingSelection = this._tableRows.find((item) => item.selected && item.data === selectedRow.data);
|
|
2157
|
-
const shouldDeselect = this._tableRows.find((item) => {
|
|
2158
|
-
var _a;
|
|
2159
|
-
return item.data === ((_a = this._previouslyClickedRow) == null ? void 0 : _a.data) && !item.selected;
|
|
2160
|
-
});
|
|
2161
|
-
if (!existingSelection || shouldDeselect) {
|
|
2162
|
-
action = (data) => this.deselectRows(data);
|
|
2163
|
-
}
|
|
2164
|
-
for (let i = startIndex; i < endIndex; i++) {
|
|
2165
|
-
indexes.push(i);
|
|
2166
|
-
}
|
|
2167
|
-
action(this.data.filter((v, i) => indexes.includes(i)));
|
|
2168
|
-
}
|
|
2169
|
-
return indexes;
|
|
2170
|
-
}
|
|
2171
|
-
_isIndeterminate(isAllSelected) {
|
|
2172
|
-
return !isAllSelected && this.getSelectedRows().length > 0 && this._data.length !== this.getSelectedRows().length;
|
|
2173
|
-
}
|
|
2174
|
-
_applyRoomy() {
|
|
2175
|
-
this._adapter.setRoomy(this._adapter.getTableElement(), this._roomy);
|
|
2176
|
-
this._adapter.setHostAttribute(TABLE_CONSTANTS.attributes.ROOMY, this._roomy.toString());
|
|
2177
|
-
}
|
|
2178
|
-
_refreshTableSort() {
|
|
2179
|
-
this._sortedColumnIndex = this._visibleColumnConfigurations.findIndex((c) => c.initialSort);
|
|
2180
|
-
this._sortDirection = this._sortedColumnIndex >= 0 ? this._visibleColumnConfigurations[this._sortedColumnIndex].sortDirection : void 0;
|
|
2181
|
-
if (this._multiColumnSort) {
|
|
2182
|
-
const sortedColumns = [];
|
|
2183
|
-
this._visibleColumnConfigurations.forEach((col, index) => {
|
|
2184
|
-
if (typeof col.initialSort === "object") {
|
|
2185
|
-
sortedColumns.push({
|
|
2186
|
-
columnIndex: index,
|
|
2187
|
-
direction: col.initialSort.direction,
|
|
2188
|
-
sortOrder: col.initialSort.sortOrder,
|
|
2189
|
-
propertyName: col.property
|
|
2190
|
-
});
|
|
2191
|
-
}
|
|
2192
|
-
});
|
|
2193
|
-
this._multiSortManager.setSortColumns(sortedColumns);
|
|
2194
|
-
}
|
|
2195
|
-
}
|
|
2196
|
-
};
|
|
2197
|
-
|
|
2198
|
-
// dist/build/lib/staging/src/table/table.ts
|
|
2199
|
-
var TableComponent = class extends BaseComponent {
|
|
2200
|
-
constructor() {
|
|
2201
|
-
super();
|
|
2202
|
-
IconRegistry.define(tylIconArrowDownward);
|
|
2203
|
-
this._foundation = new TableFoundation(new TableAdapter(this));
|
|
2204
|
-
}
|
|
2205
|
-
static get observedAttributes() {
|
|
2206
|
-
return [
|
|
2207
|
-
TABLE_CONSTANTS.attributes.SELECT,
|
|
2208
|
-
TABLE_CONSTANTS.attributes.MULTISELECT,
|
|
2209
|
-
TABLE_CONSTANTS.attributes.SELECT_KEY,
|
|
2210
|
-
TABLE_CONSTANTS.attributes.DENSE,
|
|
2211
|
-
TABLE_CONSTANTS.attributes.ROOMY,
|
|
2212
|
-
TABLE_CONSTANTS.attributes.FILTER,
|
|
2213
|
-
TABLE_CONSTANTS.attributes.FIXED_HEADERS,
|
|
2214
|
-
TABLE_CONSTANTS.attributes.LAYOUT_TYPE,
|
|
2215
|
-
TABLE_CONSTANTS.attributes.WRAP_CONTENT,
|
|
2216
|
-
TABLE_CONSTANTS.attributes.RESIZABLE,
|
|
2217
|
-
TABLE_CONSTANTS.attributes.MIN_RESIZE_WIDTH,
|
|
2218
|
-
TABLE_CONSTANTS.attributes.ALLOW_ROW_CLICK,
|
|
2219
|
-
TABLE_CONSTANTS.attributes.MULTI_COLUMN_SORT,
|
|
2220
|
-
TABLE_CONSTANTS.attributes.SELECT_CHECKBOX_ALIGNMENT,
|
|
2221
|
-
TABLE_CONSTANTS.attributes.TOOLTIP_SELECT,
|
|
2222
|
-
TABLE_CONSTANTS.attributes.TOOLTIP_SELECT_ALL
|
|
2223
|
-
];
|
|
2224
|
-
}
|
|
2225
|
-
initializedCallback() {
|
|
2226
|
-
this._foundation.initialize();
|
|
2227
|
-
}
|
|
2228
|
-
connectedCallback() {
|
|
2229
|
-
this._foundation.connect();
|
|
2230
|
-
}
|
|
2231
|
-
disconnectedCallback() {
|
|
2232
|
-
this._foundation.disconnect();
|
|
2233
|
-
}
|
|
2234
|
-
attributeChangedCallback(name, oldValue, newValue) {
|
|
2235
|
-
switch (name) {
|
|
2236
|
-
case TABLE_CONSTANTS.attributes.SELECT:
|
|
2237
|
-
this.select = coerceBoolean(newValue);
|
|
2238
|
-
break;
|
|
2239
|
-
case TABLE_CONSTANTS.attributes.MULTISELECT:
|
|
2240
|
-
this.multiselect = coerceBoolean(newValue);
|
|
2241
|
-
break;
|
|
2242
|
-
case TABLE_CONSTANTS.attributes.SELECT_KEY:
|
|
2243
|
-
this.selectKey = newValue;
|
|
2244
|
-
break;
|
|
2245
|
-
case TABLE_CONSTANTS.attributes.DENSE:
|
|
2246
|
-
this.dense = coerceBoolean(newValue);
|
|
2247
|
-
break;
|
|
2248
|
-
case TABLE_CONSTANTS.attributes.ROOMY:
|
|
2249
|
-
this.roomy = coerceBoolean(newValue);
|
|
2250
|
-
break;
|
|
2251
|
-
case TABLE_CONSTANTS.attributes.FILTER:
|
|
2252
|
-
this.filter = coerceBoolean(newValue);
|
|
2253
|
-
break;
|
|
2254
|
-
case TABLE_CONSTANTS.attributes.FIXED_HEADERS:
|
|
2255
|
-
this.fixedHeaders = coerceBoolean(newValue);
|
|
2256
|
-
break;
|
|
2257
|
-
case TABLE_CONSTANTS.attributes.LAYOUT_TYPE:
|
|
2258
|
-
this.layoutType = newValue;
|
|
2259
|
-
break;
|
|
2260
|
-
case TABLE_CONSTANTS.attributes.WRAP_CONTENT:
|
|
2261
|
-
this.wrapContent = coerceBoolean(newValue);
|
|
2262
|
-
break;
|
|
2263
|
-
case TABLE_CONSTANTS.attributes.RESIZABLE:
|
|
2264
|
-
this.resizable = coerceBoolean(newValue);
|
|
2265
|
-
break;
|
|
2266
|
-
case TABLE_CONSTANTS.attributes.MIN_RESIZE_WIDTH:
|
|
2267
|
-
this.minResizeWidth = coerceNumber(newValue);
|
|
2268
|
-
break;
|
|
2269
|
-
case TABLE_CONSTANTS.attributes.ALLOW_ROW_CLICK:
|
|
2270
|
-
this.allowRowClick = coerceBoolean(newValue);
|
|
2271
|
-
break;
|
|
2272
|
-
case TABLE_CONSTANTS.attributes.MULTI_COLUMN_SORT:
|
|
2273
|
-
this.multiColumnSort = coerceBoolean(newValue);
|
|
2274
|
-
break;
|
|
2275
|
-
case TABLE_CONSTANTS.attributes.SELECT_CHECKBOX_ALIGNMENT:
|
|
2276
|
-
this.selectCheckboxAlignment = this.getAttribute(TABLE_CONSTANTS.attributes.SELECT_CHECKBOX_ALIGNMENT) || "center" /* Center */;
|
|
2277
|
-
break;
|
|
2278
|
-
case TABLE_CONSTANTS.attributes.TOOLTIP_SELECT:
|
|
2279
|
-
this.tooltipSelect = newValue;
|
|
2280
|
-
break;
|
|
2281
|
-
case TABLE_CONSTANTS.attributes.TOOLTIP_SELECT_ALL:
|
|
2282
|
-
this.tooltipSelectAll = newValue;
|
|
2283
|
-
break;
|
|
2284
|
-
}
|
|
2285
|
-
}
|
|
2286
|
-
hideColumn(columnIndex) {
|
|
2287
|
-
this._foundation.hideColumn(columnIndex);
|
|
2288
|
-
}
|
|
2289
|
-
showColumn(columnIndex) {
|
|
2290
|
-
this._foundation.showColumn(columnIndex);
|
|
2291
|
-
}
|
|
2292
|
-
getSelectedRows() {
|
|
2293
|
-
return this._foundation.getSelectedRows();
|
|
2294
|
-
}
|
|
2295
|
-
selectRow(data) {
|
|
2296
|
-
this._foundation.selectRows([data], false);
|
|
2297
|
-
}
|
|
2298
|
-
selectRows(data, preserveExisting = false) {
|
|
2299
|
-
this._foundation.selectRows(data, !preserveExisting);
|
|
2300
|
-
}
|
|
2301
|
-
deselectRow(data) {
|
|
2302
|
-
this._foundation.deselectRows([data]);
|
|
2303
|
-
}
|
|
2304
|
-
deselectRows(data) {
|
|
2305
|
-
this._foundation.deselectRows(data);
|
|
2306
|
-
}
|
|
2307
|
-
clearSelections() {
|
|
2308
|
-
this._foundation.clearSelections();
|
|
2309
|
-
}
|
|
2310
|
-
render() {
|
|
2311
|
-
this._foundation.render();
|
|
2312
|
-
}
|
|
2313
|
-
expandRow(rowIndex, template) {
|
|
2314
|
-
return this._foundation.expandRow(rowIndex, template);
|
|
2315
|
-
}
|
|
2316
|
-
collapseRow(rowIndex) {
|
|
2317
|
-
return this._foundation.collapseRow(rowIndex);
|
|
2318
|
-
}
|
|
2319
|
-
isRowExpanded(rowIndex) {
|
|
2320
|
-
return this._foundation.isRowExpanded(rowIndex);
|
|
2321
|
-
}
|
|
2322
|
-
selectRowsByIndex(indexes, preserveExisting) {
|
|
2323
|
-
if (typeof indexes === "number") {
|
|
2324
|
-
this._foundation.selectRowsByIndex([indexes], preserveExisting);
|
|
2325
|
-
} else if (Array.isArray(indexes)) {
|
|
2326
|
-
this._foundation.selectRowsByIndex(indexes, preserveExisting);
|
|
2327
|
-
}
|
|
2328
|
-
}
|
|
2329
|
-
deselectRowsByIndex(indexes) {
|
|
2330
|
-
if (typeof indexes === "number") {
|
|
2331
|
-
this._foundation.deselectRowsByIndex([indexes]);
|
|
2332
|
-
} else if (Array.isArray(indexes)) {
|
|
2333
|
-
this._foundation.deselectRowsByIndex(indexes);
|
|
2334
|
-
}
|
|
2335
|
-
}
|
|
2336
|
-
isRowSelected(rowData) {
|
|
2337
|
-
return this._foundation.isRowSelected(rowData);
|
|
2338
|
-
}
|
|
2339
|
-
};
|
|
2340
|
-
__decorateClass([
|
|
2341
|
-
FoundationProperty()
|
|
2342
|
-
], TableComponent.prototype, "data", 2);
|
|
2343
|
-
__decorateClass([
|
|
2344
|
-
FoundationProperty()
|
|
2345
|
-
], TableComponent.prototype, "columnConfigurations", 2);
|
|
2346
|
-
__decorateClass([
|
|
2347
|
-
FoundationProperty()
|
|
2348
|
-
], TableComponent.prototype, "select", 2);
|
|
2349
|
-
__decorateClass([
|
|
2350
|
-
FoundationProperty()
|
|
2351
|
-
], TableComponent.prototype, "multiselect", 2);
|
|
2352
|
-
__decorateClass([
|
|
2353
|
-
FoundationProperty()
|
|
2354
|
-
], TableComponent.prototype, "selectKey", 2);
|
|
2355
|
-
__decorateClass([
|
|
2356
|
-
FoundationProperty()
|
|
2357
|
-
], TableComponent.prototype, "tooltipSelect", 2);
|
|
2358
|
-
__decorateClass([
|
|
2359
|
-
FoundationProperty()
|
|
2360
|
-
], TableComponent.prototype, "tooltipSelectAll", 2);
|
|
2361
|
-
__decorateClass([
|
|
2362
|
-
FoundationProperty()
|
|
2363
|
-
], TableComponent.prototype, "dense", 2);
|
|
2364
|
-
__decorateClass([
|
|
2365
|
-
FoundationProperty()
|
|
2366
|
-
], TableComponent.prototype, "roomy", 2);
|
|
2367
|
-
__decorateClass([
|
|
2368
|
-
FoundationProperty()
|
|
2369
|
-
], TableComponent.prototype, "filter", 2);
|
|
2370
|
-
__decorateClass([
|
|
2371
|
-
FoundationProperty()
|
|
2372
|
-
], TableComponent.prototype, "fixedHeaders", 2);
|
|
2373
|
-
__decorateClass([
|
|
2374
|
-
FoundationProperty()
|
|
2375
|
-
], TableComponent.prototype, "layoutType", 2);
|
|
2376
|
-
__decorateClass([
|
|
2377
|
-
FoundationProperty()
|
|
2378
|
-
], TableComponent.prototype, "wrapContent", 2);
|
|
2379
|
-
__decorateClass([
|
|
2380
|
-
FoundationProperty()
|
|
2381
|
-
], TableComponent.prototype, "resizable", 2);
|
|
2382
|
-
__decorateClass([
|
|
2383
|
-
FoundationProperty()
|
|
2384
|
-
], TableComponent.prototype, "minResizeWidth", 2);
|
|
2385
|
-
__decorateClass([
|
|
2386
|
-
FoundationProperty()
|
|
2387
|
-
], TableComponent.prototype, "allowRowClick", 2);
|
|
2388
|
-
__decorateClass([
|
|
2389
|
-
FoundationProperty()
|
|
2390
|
-
], TableComponent.prototype, "multiColumnSort", 2);
|
|
2391
|
-
__decorateClass([
|
|
2392
|
-
FoundationProperty()
|
|
2393
|
-
], TableComponent.prototype, "rowCreated", 2);
|
|
2394
|
-
__decorateClass([
|
|
2395
|
-
FoundationProperty()
|
|
2396
|
-
], TableComponent.prototype, "cellCreated", 2);
|
|
2397
|
-
__decorateClass([
|
|
2398
|
-
FoundationProperty()
|
|
2399
|
-
], TableComponent.prototype, "selectAllTemplate", 2);
|
|
2400
|
-
__decorateClass([
|
|
2401
|
-
FoundationProperty()
|
|
2402
|
-
], TableComponent.prototype, "selectCheckboxAlignment", 2);
|
|
2403
|
-
TableComponent = __decorateClass([
|
|
2404
|
-
CustomElement({
|
|
2405
|
-
name: TABLE_CONSTANTS.elementName,
|
|
2406
|
-
dependencies: [
|
|
2407
|
-
ExpansionPanelComponent,
|
|
2408
|
-
IconComponent,
|
|
2409
|
-
CheckboxComponent
|
|
2410
|
-
]
|
|
2411
|
-
})
|
|
2412
|
-
], TableComponent);
|
|
2413
|
-
|
|
2414
|
-
// dist/build/lib/staging/src/table/index.ts
|
|
2415
|
-
function defineTableComponent() {
|
|
2416
|
-
defineCustomElement(TableComponent);
|
|
2417
|
-
}
|
|
2418
|
-
|
|
2419
|
-
export {
|
|
2420
|
-
TABLE_CONSTANTS,
|
|
2421
|
-
CellAlign,
|
|
2422
|
-
SortDirection,
|
|
2423
|
-
TableFilterType,
|
|
2424
|
-
TableAdapter,
|
|
2425
|
-
TableRow,
|
|
2426
|
-
TableFoundation,
|
|
2427
|
-
TableComponent,
|
|
2428
|
-
defineTableComponent
|
|
2429
|
-
};
|
|
2430
|
-
//# sourceMappingURL=chunk.XE7ZMJBZ.js.map
|