@tylertech/forge 2.21.1 → 2.21.3-dev.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 +2059 -1221
- package/dist/esm/accordion/index.js +1 -1
- package/dist/esm/app-bar/help-button/index.js +1 -1
- package/dist/esm/app-bar/index.js +1 -1
- package/dist/esm/app-bar/menu-button/index.js +1 -1
- package/dist/esm/app-bar/notification-button/index.js +1 -1
- package/dist/esm/app-bar/profile-button/index.js +1 -1
- package/dist/esm/app-bar/search/index.js +1 -1
- package/dist/esm/autocomplete/index.js +1 -1
- package/dist/esm/avatar/index.js +1 -1
- package/dist/esm/backdrop/index.js +1 -1
- package/dist/esm/badge/index.js +1 -1
- package/dist/esm/banner/index.js +1 -1
- package/dist/esm/bottom-sheet/index.js +1 -1
- package/dist/esm/busy-indicator/index.js +1 -1
- package/dist/esm/button/index.js +1 -1
- package/dist/esm/button-area/index.js +1 -1
- package/dist/esm/button-toggle/button-toggle/index.js +1 -1
- package/dist/esm/button-toggle/button-toggle-group/index.js +1 -1
- package/dist/esm/button-toggle/index.js +1 -1
- package/dist/esm/calendar/calendar-dropdown/index.js +1 -1
- package/dist/esm/calendar/calendar-menu/index.js +1 -1
- package/dist/esm/calendar/index.js +1 -1
- package/dist/esm/card/index.js +1 -1
- package/dist/esm/checkbox/index.js +1 -1
- package/dist/esm/chip-field/index.js +1 -1
- package/dist/esm/chips/chip/index.js +1 -1
- package/dist/esm/chips/chip-set/index.js +1 -1
- package/dist/esm/chips/index.js +1 -1
- package/dist/esm/chunks/{chunk.6ATSOUJQ.js → chunk.2PPBLQZB.js} +2 -2
- package/dist/esm/chunks/{chunk.4R6NK524.js → chunk.2XZ6BY33.js} +2 -2
- package/dist/esm/chunks/{chunk.D43PPRFO.js → chunk.3463HRWW.js} +2 -2
- package/dist/esm/chunks/{chunk.L3SL4NW6.js → chunk.3JJ5BNQS.js} +2 -2
- package/dist/esm/chunks/{chunk.76PI42C5.js → chunk.3PWL5O53.js} +2 -2
- package/dist/esm/chunks/{chunk.NMKDIHFB.js → chunk.4OWKFHAE.js} +2 -2
- package/dist/esm/chunks/{chunk.2GDEYC4V.js → chunk.4TDZGLY4.js} +2 -2
- package/dist/esm/chunks/{chunk.TBSCULSM.js → chunk.4VOG3DHT.js} +2 -2
- package/dist/esm/chunks/{chunk.TBSCULSM.js.map → chunk.4VOG3DHT.js.map} +1 -1
- package/dist/esm/chunks/chunk.4W3D3MDK.js +7 -0
- package/dist/esm/chunks/chunk.4W3D3MDK.js.map +7 -0
- package/dist/esm/chunks/chunk.5ESMU755.js +7 -0
- package/dist/esm/chunks/chunk.5ESMU755.js.map +7 -0
- package/dist/esm/chunks/chunk.5QKZUMJK.js +7 -0
- package/dist/esm/chunks/chunk.5QKZUMJK.js.map +7 -0
- package/dist/esm/chunks/chunk.5YRBAF55.js +7 -0
- package/dist/esm/chunks/{chunk.45KYMP5J.js.map → chunk.5YRBAF55.js.map} +1 -1
- package/dist/esm/chunks/{chunk.5E2BG6O3.js → chunk.62E3LRCI.js} +2 -2
- package/dist/esm/chunks/{chunk.JCDIPDQR.js → chunk.6N2DTQEX.js} +2 -2
- package/dist/esm/chunks/{chunk.F5CFD2NG.js → chunk.6P5FHZUS.js} +2 -2
- package/dist/esm/chunks/{chunk.3FAYFYXF.js → chunk.6PDOZYVS.js} +2 -2
- package/dist/esm/chunks/chunk.6YHMCE3A.js +12 -0
- package/dist/esm/chunks/chunk.7BPT4PPX.js +7 -0
- package/dist/esm/chunks/{chunk.PWHMNJ5Y.js.map → chunk.7BPT4PPX.js.map} +3 -3
- package/dist/esm/chunks/{chunk.7IHNVPY5.js → chunk.A52AXPOG.js} +2 -2
- package/dist/esm/chunks/{chunk.7IHNVPY5.js.map → chunk.A52AXPOG.js.map} +3 -3
- package/dist/esm/chunks/{chunk.RUK5PIER.js → chunk.AAU5YRKV.js} +2 -2
- package/dist/esm/chunks/{chunk.NLXSZNQI.js → chunk.AP2U5NXZ.js} +2 -2
- package/dist/esm/chunks/{chunk.JD4APKZS.js → chunk.APHQBFX2.js} +2 -2
- package/dist/esm/chunks/chunk.AZIQUHDG.js +7 -0
- package/dist/esm/chunks/chunk.AZIQUHDG.js.map +7 -0
- package/dist/esm/chunks/{chunk.PKVY6EWM.js → chunk.BDIZD35A.js} +2 -2
- package/dist/esm/chunks/{chunk.3YT72ZWJ.js → chunk.BLXQYTBF.js} +2 -2
- package/dist/esm/chunks/chunk.BTJNWEJC.js +7 -0
- package/dist/esm/chunks/chunk.BTJNWEJC.js.map +7 -0
- package/dist/esm/chunks/{chunk.GQCUI7YS.js → chunk.BZOB3WK3.js} +2 -2
- package/dist/esm/chunks/{chunk.QOA2O575.js → chunk.CP3RUPXU.js} +2 -2
- package/dist/esm/chunks/chunk.D4DZUGEV.js +7 -0
- package/dist/esm/chunks/chunk.D4DZUGEV.js.map +7 -0
- package/dist/esm/chunks/{chunk.F5LXG5X7.js → chunk.DKTVITIN.js} +2 -2
- package/dist/esm/chunks/{chunk.OEZZ2NEY.js → chunk.DMNCQ65M.js} +2 -2
- package/dist/esm/chunks/chunk.DMVVKGUE.js +7 -0
- package/dist/esm/chunks/chunk.DMVVKGUE.js.map +7 -0
- package/dist/esm/chunks/chunk.DXKC3WSJ.js +7 -0
- package/dist/esm/chunks/chunk.DXKC3WSJ.js.map +7 -0
- package/dist/esm/chunks/{chunk.Y2I2VRMF.js → chunk.EWODE3XY.js} +2 -2
- package/dist/esm/chunks/{chunk.G6GRI7UL.js → chunk.F2BTDJGX.js} +2 -2
- package/dist/esm/chunks/chunk.F44B5HVQ.js +7 -0
- package/dist/esm/chunks/chunk.F44B5HVQ.js.map +7 -0
- package/dist/esm/chunks/chunk.F4V3I2N6.js +7 -0
- package/dist/esm/chunks/chunk.F4V3I2N6.js.map +7 -0
- package/dist/esm/chunks/{chunk.42QTJZSF.js → chunk.FHVUINRK.js} +2 -2
- package/dist/esm/chunks/{chunk.44WDRTRR.js → chunk.FYRB5HEB.js} +2 -2
- package/dist/esm/chunks/{chunk.J2PHUKSR.js → chunk.G237CWYN.js} +2 -2
- package/dist/esm/chunks/{chunk.UQTJSPU4.js → chunk.G32SGSIY.js} +2 -2
- package/dist/esm/chunks/{chunk.PADHAJLS.js → chunk.H453YDP7.js} +2 -2
- package/dist/esm/chunks/{chunk.DPZU5F27.js → chunk.HANVBHOC.js} +2 -2
- package/dist/esm/chunks/{chunk.BL4IBI6G.js → chunk.HURHZXUW.js} +2 -2
- package/dist/esm/chunks/{chunk.XQ5CDWDY.js → chunk.HXNVTFM2.js} +2 -2
- package/dist/esm/chunks/{chunk.SAQSXX2T.js → chunk.I57ANSQV.js} +2 -2
- package/dist/esm/chunks/{chunk.Y7YPNMPI.js → chunk.IAIRKZA4.js} +2 -2
- package/dist/esm/chunks/{chunk.Y7YPNMPI.js.map → chunk.IAIRKZA4.js.map} +2 -2
- package/dist/esm/chunks/{chunk.73GVVX4K.js → chunk.IBUO2ECP.js} +2 -2
- package/dist/esm/chunks/{chunk.73GVVX4K.js.map → chunk.IBUO2ECP.js.map} +2 -2
- package/dist/esm/chunks/chunk.IEHJRFK3.js +7 -0
- package/dist/esm/chunks/chunk.IEHJRFK3.js.map +7 -0
- package/dist/esm/chunks/{chunk.6G4DOKR2.js → chunk.IF6EQQHS.js} +2 -2
- package/dist/esm/chunks/{chunk.6G4DOKR2.js.map → chunk.IF6EQQHS.js.map} +2 -2
- package/dist/esm/chunks/{chunk.FPLHVO6D.js → chunk.IXERIVWC.js} +2 -2
- package/dist/esm/chunks/{chunk.AIUIUCZH.js → chunk.J5RH7JNF.js} +2 -2
- package/dist/esm/chunks/{chunk.YJTE34LC.js → chunk.JS3EC7ZT.js} +2 -2
- package/dist/esm/chunks/{chunk.67G7HT5S.js → chunk.K256XE5K.js} +2 -2
- package/dist/esm/chunks/{chunk.APHMTBRQ.js → chunk.KXJTDCIF.js} +2 -2
- package/dist/esm/chunks/chunk.KZJYLYWN.js +7 -0
- package/dist/esm/chunks/chunk.KZJYLYWN.js.map +7 -0
- package/dist/esm/chunks/{chunk.IV2GMOPB.js → chunk.LDHCZ2XZ.js} +2 -2
- package/dist/esm/chunks/{chunk.6TTAKWXI.js → chunk.LFNRRMUA.js} +2 -2
- package/dist/esm/chunks/{chunk.FCTKNIBN.js → chunk.LLOJKGBZ.js} +2 -2
- package/dist/esm/chunks/{chunk.FCTKNIBN.js.map → chunk.LLOJKGBZ.js.map} +2 -2
- package/dist/esm/chunks/{chunk.3C44DXZ2.js → chunk.LWKEQQSZ.js} +2 -2
- package/dist/esm/chunks/{chunk.7K44O5RO.js → chunk.LZRRQRLQ.js} +2 -2
- package/dist/esm/chunks/{chunk.LM57IEFE.js → chunk.MJRCAYWO.js} +2 -2
- package/dist/esm/chunks/{chunk.K7HRCGML.js → chunk.MQLALZA2.js} +2 -2
- package/dist/esm/chunks/chunk.MQMORXQE.js +7 -0
- package/dist/esm/chunks/chunk.MQMORXQE.js.map +7 -0
- package/dist/esm/chunks/{chunk.ON2K3O3I.js → chunk.N65R3467.js} +2 -2
- package/dist/esm/chunks/{chunk.3IXTRC6Z.js → chunk.NHG22ATF.js} +2 -2
- package/dist/esm/chunks/{chunk.7SULS4D2.js → chunk.OHFGFCWK.js} +2 -2
- package/dist/esm/chunks/{chunk.43RHBWGI.js → chunk.ONZWRAL2.js} +2 -2
- package/dist/esm/chunks/{chunk.TH7RLTJK.js → chunk.OSLPQH7C.js} +2 -2
- package/dist/esm/chunks/chunk.OWDH3AE3.js +7 -0
- package/dist/esm/chunks/chunk.OWDH3AE3.js.map +7 -0
- package/dist/esm/chunks/{chunk.XTMXGKUO.js → chunk.P2OQZWGG.js} +2 -2
- package/dist/esm/chunks/{chunk.L52XPVYZ.js → chunk.P4SR3CV7.js} +2 -2
- package/dist/esm/chunks/{chunk.KII37K76.js → chunk.P5ZQZKFX.js} +2 -2
- package/dist/esm/chunks/chunk.PDH27IKB.js +7 -0
- package/dist/esm/chunks/{chunk.VTB27IL7.js → chunk.Q7R5XWS7.js} +2 -2
- package/dist/esm/chunks/chunk.RX7IOKBK.js +7 -0
- package/dist/esm/chunks/chunk.RX7IOKBK.js.map +7 -0
- package/dist/esm/chunks/{chunk.COS4RDZB.js → chunk.SSJFLG7R.js} +2 -2
- package/dist/esm/chunks/{chunk.KQK2XX5H.js → chunk.TDF42HNZ.js} +2 -2
- package/dist/esm/chunks/chunk.TF4DRMEL.js +7 -0
- package/dist/esm/chunks/chunk.TF4DRMEL.js.map +7 -0
- package/dist/esm/chunks/{chunk.IZSUW7WG.js → chunk.TJDJHXUO.js} +2 -2
- package/dist/esm/chunks/{chunk.CX7MOSLM.js → chunk.TMLHKTB4.js} +2 -2
- package/dist/esm/chunks/{chunk.BINM3NUA.js → chunk.TNCZEZGT.js} +2 -2
- package/dist/esm/chunks/chunk.TQARIRN7.js +7 -0
- package/dist/esm/chunks/chunk.TQARIRN7.js.map +7 -0
- package/dist/esm/chunks/{chunk.AZFF62ZK.js → chunk.TTONWP6R.js} +2 -2
- package/dist/esm/chunks/{chunk.SFTWKDQV.js → chunk.TTZZQ2LC.js} +2 -2
- package/dist/esm/chunks/{chunk.N6XHXCZE.js → chunk.UJ4YJO2U.js} +2 -2
- package/dist/esm/chunks/chunk.V5DI7JR6.js +7 -0
- package/dist/esm/chunks/chunk.VJA7DAS7.js +29 -0
- package/dist/esm/chunks/chunk.VJA7DAS7.js.map +7 -0
- package/dist/esm/chunks/{chunk.UVL4TIK2.js → chunk.VPGS3ZWT.js} +2 -2
- package/dist/esm/chunks/{chunk.M6PJ3PNN.js → chunk.VPIPNSLG.js} +2 -2
- package/dist/esm/chunks/chunk.WFOTCL2T.js +7 -0
- package/dist/esm/chunks/chunk.WFOTCL2T.js.map +7 -0
- package/dist/esm/chunks/{chunk.M2ATVI24.js → chunk.WGYEDOPA.js} +2 -2
- package/dist/esm/chunks/chunk.WJ7SH5VI.js +7 -0
- package/dist/esm/chunks/{chunk.IWICN773.js → chunk.WMGXMDNO.js} +2 -2
- package/dist/esm/chunks/{chunk.H3IPTBWM.js → chunk.XNNDCXKG.js} +2 -2
- package/dist/esm/chunks/chunk.XPW5QMOA.js +7 -0
- package/dist/esm/chunks/{chunk.MXVJSEF3.js.map → chunk.XPW5QMOA.js.map} +1 -1
- package/dist/esm/chunks/{chunk.EMV7JGHB.js → chunk.Y5KHNONH.js} +2 -2
- package/dist/esm/chunks/{chunk.WOTVTBJS.js → chunk.ZA5NG3NP.js} +2 -2
- package/dist/esm/chunks/{chunk.2T6HVSO4.js → chunk.ZFXDVJUN.js} +2 -2
- package/dist/esm/chunks/{chunk.ZCQO3N25.js → chunk.ZIABFRW3.js} +2 -2
- package/dist/esm/circular-progress/index.js +1 -1
- package/dist/esm/color-picker/index.js +1 -1
- package/dist/esm/core/base/index.js +1 -1
- package/dist/esm/core/index.js +1 -1
- package/dist/esm/core/utils/index.js +1 -1
- package/dist/esm/date-picker/index.js +1 -1
- package/dist/esm/date-range-picker/index.js +1 -1
- package/dist/esm/dialog/index.js +1 -1
- package/dist/esm/divider/index.js +1 -1
- package/dist/esm/drawer/base/index.js +1 -1
- package/dist/esm/drawer/drawer/index.js +1 -1
- package/dist/esm/drawer/index.js +1 -1
- package/dist/esm/drawer/mini-drawer/index.js +1 -1
- package/dist/esm/drawer/modal-drawer/index.js +1 -1
- package/dist/esm/expansion-panel/index.js +1 -1
- package/dist/esm/file-picker/index.js +1 -1
- package/dist/esm/floating-action-button/index.js +1 -1
- package/dist/esm/icon/index.js +1 -1
- package/dist/esm/icon-button/index.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/inline-message/index.js +1 -1
- package/dist/esm/keyboard-shortcut/index.js +1 -1
- package/dist/esm/label-value/index.js +1 -1
- package/dist/esm/linear-progress/index.js +1 -1
- package/dist/esm/list/index.js +1 -1
- package/dist/esm/list/list/index.js +1 -1
- package/dist/esm/list/list-item/index.js +1 -1
- package/dist/esm/list-dropdown/index.js +1 -1
- package/dist/esm/menu/index.js +1 -1
- package/dist/esm/open-icon/index.js +1 -1
- package/dist/esm/page-state/index.js +1 -1
- package/dist/esm/paginator/index.js +1 -1
- package/dist/esm/popup/index.js +1 -1
- package/dist/esm/product-icon/index.js +1 -1
- package/dist/esm/profile-card/index.js +1 -1
- package/dist/esm/quantity-field/index.js +1 -1
- package/dist/esm/radio/index.js +1 -1
- package/dist/esm/ripple/index.js +1 -1
- package/dist/esm/scaffold/index.js +1 -1
- package/dist/esm/select/core/index.js +1 -1
- package/dist/esm/select/index.js +1 -1
- package/dist/esm/select/option/index.js +1 -1
- package/dist/esm/select/option-group/index.js +1 -1
- package/dist/esm/select/select/index.js +1 -1
- package/dist/esm/select/select-dropdown/index.js +1 -1
- package/dist/esm/skeleton/index.js +1 -1
- package/dist/esm/slider/index.js +1 -1
- package/dist/esm/split-view/index.js +1 -1
- package/dist/esm/split-view/split-view/index.js +1 -1
- package/dist/esm/split-view/split-view-panel/index.js +1 -1
- package/dist/esm/stack/index.js +1 -1
- package/dist/esm/stepper/index.js +1 -1
- package/dist/esm/stepper/step/index.js +1 -1
- package/dist/esm/stepper/stepper/index.js +1 -1
- package/dist/esm/switch/index.js +1 -1
- package/dist/esm/table/index.js +1 -1
- package/dist/esm/tabs/index.js +1 -1
- package/dist/esm/tabs/tab/index.js +1 -1
- package/dist/esm/tabs/tab-bar/index.js +1 -1
- package/dist/esm/text-field/index.js +1 -1
- package/dist/esm/time-picker/index.js +1 -1
- package/dist/esm/toast/index.js +1 -1
- package/dist/esm/toolbar/index.js +1 -1
- package/dist/esm/tooltip/index.js +1 -1
- package/dist/esm/view-switcher/index.js +1 -1
- package/dist/esm/view-switcher/view/index.js +1 -1
- package/esm/autocomplete/autocomplete.d.ts +8 -2
- package/esm/button/button.d.ts +1 -0
- package/esm/button/button.js +18 -7
- package/esm/button-area/button-area-adapter.d.ts +3 -1
- package/esm/button-area/button-area-adapter.js +14 -5
- package/esm/button-area/button-area-foundation.js +1 -0
- package/esm/calendar/calendar-foundation.js +22 -18
- package/esm/calendar/calendar.d.ts +1 -0
- package/esm/checkbox/checkbox-adapter.d.ts +1 -0
- package/esm/checkbox/checkbox-adapter.js +18 -7
- package/esm/core/base/base-adapter.d.ts +4 -2
- package/esm/core/base/base-adapter.js +3 -0
- package/esm/core/utils/utils.d.ts +5 -2
- package/esm/core/utils/utils.js +21 -6
- package/esm/date-picker/base/base-date-picker-adapter.js +1 -3
- package/esm/date-picker/base/base-date-picker-foundation.js +6 -0
- package/esm/dialog/dialog-adapter.d.ts +2 -0
- package/esm/dialog/dialog-adapter.js +14 -0
- package/esm/dialog/dialog-foundation.js +1 -0
- package/esm/icon-button/icon-button.d.ts +2 -0
- package/esm/icon-button/icon-button.js +31 -7
- package/esm/list/list/list-adapter.d.ts +2 -6
- package/esm/list/list/list-adapter.js +29 -18
- package/esm/list/list/list-constants.d.ts +2 -2
- package/esm/list/list/list-constants.js +3 -3
- package/esm/list/list/list-foundation.js +6 -0
- package/esm/list/list-item/list-item-adapter.d.ts +3 -3
- package/esm/list/list-item/list-item-adapter.js +3 -3
- package/esm/list/list-item/list-item-foundation.d.ts +1 -0
- package/esm/list/list-item/list-item-foundation.js +12 -2
- package/esm/menu/menu-foundation.js +1 -0
- package/esm/menu/menu.d.ts +4 -1
- package/esm/open-icon/open-icon.js +2 -2
- package/esm/paginator/paginator-adapter.d.ts +6 -2
- package/esm/paginator/paginator-adapter.js +34 -54
- package/esm/paginator/paginator-constants.d.ts +1 -1
- package/esm/paginator/paginator-foundation.js +7 -17
- package/esm/radio/radio-adapter.d.ts +1 -0
- package/esm/radio/radio-adapter.js +18 -7
- package/esm/ripple/forge-ripple.d.ts +2 -0
- package/esm/ripple/forge-ripple.js +4 -0
- package/esm/select/core/base-select.d.ts +4 -1
- package/esm/split-view/split-view-panel/split-view-panel.js +1 -1
- package/esm/switch/switch.js +15 -2
- package/esm/tooltip/tooltip.d.ts +1 -0
- package/package.json +3 -3
- package/dist/esm/chunks/chunk.45KYMP5J.js +0 -7
- package/dist/esm/chunks/chunk.4CWMNWZU.js +0 -7
- package/dist/esm/chunks/chunk.4CWMNWZU.js.map +0 -7
- package/dist/esm/chunks/chunk.5KC43VFL.js +0 -7
- package/dist/esm/chunks/chunk.5KC43VFL.js.map +0 -7
- package/dist/esm/chunks/chunk.7BAO5IED.js +0 -7
- package/dist/esm/chunks/chunk.7NHFZL6J.js +0 -7
- package/dist/esm/chunks/chunk.AHDIUCUB.js +0 -7
- package/dist/esm/chunks/chunk.AHDIUCUB.js.map +0 -7
- package/dist/esm/chunks/chunk.CE6NTUWI.js +0 -7
- package/dist/esm/chunks/chunk.CE6NTUWI.js.map +0 -7
- package/dist/esm/chunks/chunk.DLALEZ73.js +0 -7
- package/dist/esm/chunks/chunk.DLALEZ73.js.map +0 -7
- package/dist/esm/chunks/chunk.DYF2MREZ.js +0 -7
- package/dist/esm/chunks/chunk.DYF2MREZ.js.map +0 -7
- package/dist/esm/chunks/chunk.HOXFK44F.js +0 -7
- package/dist/esm/chunks/chunk.HOXFK44F.js.map +0 -7
- package/dist/esm/chunks/chunk.ITXUKOKJ.js +0 -7
- package/dist/esm/chunks/chunk.ITXUKOKJ.js.map +0 -7
- package/dist/esm/chunks/chunk.MXVJSEF3.js +0 -7
- package/dist/esm/chunks/chunk.PWHMNJ5Y.js +0 -7
- package/dist/esm/chunks/chunk.Q7HX26UO.js +0 -7
- package/dist/esm/chunks/chunk.Q7HX26UO.js.map +0 -7
- package/dist/esm/chunks/chunk.QZ2NXIGY.js +0 -7
- package/dist/esm/chunks/chunk.QZ2NXIGY.js.map +0 -7
- package/dist/esm/chunks/chunk.RD7SYOAI.js +0 -12
- package/dist/esm/chunks/chunk.RLWX5BFQ.js +0 -7
- package/dist/esm/chunks/chunk.RLWX5BFQ.js.map +0 -7
- package/dist/esm/chunks/chunk.SXTM6OK4.js +0 -7
- package/dist/esm/chunks/chunk.SXTM6OK4.js.map +0 -7
- package/dist/esm/chunks/chunk.UHU4FUIS.js +0 -7
- package/dist/esm/chunks/chunk.VT2QJ7SM.js +0 -29
- package/dist/esm/chunks/chunk.VT2QJ7SM.js.map +0 -7
- package/dist/esm/chunks/chunk.Y66GSZJB.js +0 -7
- package/dist/esm/chunks/chunk.Y66GSZJB.js.map +0 -7
- package/dist/esm/chunks/chunk.YG24YPYO.js +0 -7
- package/dist/esm/chunks/chunk.YG24YPYO.js.map +0 -7
- /package/dist/esm/chunks/{chunk.6ATSOUJQ.js.map → chunk.2PPBLQZB.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.4R6NK524.js.map → chunk.2XZ6BY33.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.D43PPRFO.js.map → chunk.3463HRWW.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.L3SL4NW6.js.map → chunk.3JJ5BNQS.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.76PI42C5.js.map → chunk.3PWL5O53.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.NMKDIHFB.js.map → chunk.4OWKFHAE.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.2GDEYC4V.js.map → chunk.4TDZGLY4.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.5E2BG6O3.js.map → chunk.62E3LRCI.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.JCDIPDQR.js.map → chunk.6N2DTQEX.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.F5CFD2NG.js.map → chunk.6P5FHZUS.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.3FAYFYXF.js.map → chunk.6PDOZYVS.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.RD7SYOAI.js.map → chunk.6YHMCE3A.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.RUK5PIER.js.map → chunk.AAU5YRKV.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.NLXSZNQI.js.map → chunk.AP2U5NXZ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.JD4APKZS.js.map → chunk.APHQBFX2.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.PKVY6EWM.js.map → chunk.BDIZD35A.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.3YT72ZWJ.js.map → chunk.BLXQYTBF.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.GQCUI7YS.js.map → chunk.BZOB3WK3.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.QOA2O575.js.map → chunk.CP3RUPXU.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.F5LXG5X7.js.map → chunk.DKTVITIN.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.OEZZ2NEY.js.map → chunk.DMNCQ65M.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.Y2I2VRMF.js.map → chunk.EWODE3XY.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.G6GRI7UL.js.map → chunk.F2BTDJGX.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.42QTJZSF.js.map → chunk.FHVUINRK.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.44WDRTRR.js.map → chunk.FYRB5HEB.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.J2PHUKSR.js.map → chunk.G237CWYN.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.UQTJSPU4.js.map → chunk.G32SGSIY.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.PADHAJLS.js.map → chunk.H453YDP7.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.DPZU5F27.js.map → chunk.HANVBHOC.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.BL4IBI6G.js.map → chunk.HURHZXUW.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.XQ5CDWDY.js.map → chunk.HXNVTFM2.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.SAQSXX2T.js.map → chunk.I57ANSQV.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.FPLHVO6D.js.map → chunk.IXERIVWC.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.AIUIUCZH.js.map → chunk.J5RH7JNF.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.YJTE34LC.js.map → chunk.JS3EC7ZT.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.67G7HT5S.js.map → chunk.K256XE5K.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.APHMTBRQ.js.map → chunk.KXJTDCIF.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.IV2GMOPB.js.map → chunk.LDHCZ2XZ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.6TTAKWXI.js.map → chunk.LFNRRMUA.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.3C44DXZ2.js.map → chunk.LWKEQQSZ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.7K44O5RO.js.map → chunk.LZRRQRLQ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.LM57IEFE.js.map → chunk.MJRCAYWO.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.K7HRCGML.js.map → chunk.MQLALZA2.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.ON2K3O3I.js.map → chunk.N65R3467.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.3IXTRC6Z.js.map → chunk.NHG22ATF.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.7SULS4D2.js.map → chunk.OHFGFCWK.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.43RHBWGI.js.map → chunk.ONZWRAL2.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.TH7RLTJK.js.map → chunk.OSLPQH7C.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.XTMXGKUO.js.map → chunk.P2OQZWGG.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.L52XPVYZ.js.map → chunk.P4SR3CV7.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.KII37K76.js.map → chunk.P5ZQZKFX.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.7NHFZL6J.js.map → chunk.PDH27IKB.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.VTB27IL7.js.map → chunk.Q7R5XWS7.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.COS4RDZB.js.map → chunk.SSJFLG7R.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.KQK2XX5H.js.map → chunk.TDF42HNZ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.IZSUW7WG.js.map → chunk.TJDJHXUO.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.CX7MOSLM.js.map → chunk.TMLHKTB4.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.BINM3NUA.js.map → chunk.TNCZEZGT.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.AZFF62ZK.js.map → chunk.TTONWP6R.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.SFTWKDQV.js.map → chunk.TTZZQ2LC.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.N6XHXCZE.js.map → chunk.UJ4YJO2U.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.7BAO5IED.js.map → chunk.V5DI7JR6.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.UVL4TIK2.js.map → chunk.VPGS3ZWT.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.M6PJ3PNN.js.map → chunk.VPIPNSLG.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.M2ATVI24.js.map → chunk.WGYEDOPA.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.UHU4FUIS.js.map → chunk.WJ7SH5VI.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.IWICN773.js.map → chunk.WMGXMDNO.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.H3IPTBWM.js.map → chunk.XNNDCXKG.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.EMV7JGHB.js.map → chunk.Y5KHNONH.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.WOTVTBJS.js.map → chunk.ZA5NG3NP.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.2T6HVSO4.js.map → chunk.ZFXDVJUN.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.ZCQO3N25.js.map → chunk.ZIABFRW3.js.map} +0 -0
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
|
-
* License: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import{a as q,b as x,c as v,d as X}from"./chunk.DONAMICM.js";import{c as re,f as ce}from"./chunk.YG24YPYO.js";import{a as M,d as ne}from"./chunk.DPZU5F27.js";import{a as R}from"./chunk.4DAIIJ37.js";import{b as te}from"./chunk.MZLPUI6R.js";import{a as ae}from"./chunk.3IXTRC6Z.js";import{a as ie,d as oe,l as se}from"./chunk.IWICN773.js";import{a as Y}from"./chunk.2KXSGD3S.js";import{a as le}from"./chunk.BESB4RGK.js";import{a as U}from"./chunk.5KC43VFL.js";import{a as b}from"./chunk.KTGSZEAG.js";import{a as J,b as ee}from"./chunk.QOA2O575.js";import{a as j,l as Q}from"./chunk.HOXFK44F.js";import{d as g,e as F,f as p,g as D,i as W,j as K,t as $}from"./chunk.4LA6HEA7.js";import{b as L,c as G,d as y,h as H,j as w,k as h,l as V,o as Z}from"./chunk.J2M2MXP2.js";import{a as C,f as _}from"./chunk.MCIQXNKY.js";var I=class{constructor(e){this._key=e,this._items=[]}getItems(){return[...this._items]}count(){return this._items.length}setKey(e){this._key=e}add(e){return e instanceof Array||(e=[e]),e.forEach(t=>{this.exists(t)||this._items.push(t)}),this}remove(e){e instanceof Array||(e=[e]);for(let t=e.length-1;t>=0;t--)this.exists(e[t])&&this._items.splice(this._items.indexOf(this._getItem(e[t])),1);return this}clear(){return this._items=[],this}exists(e){return this._getItem(e)!==null}_getItem(e){return this._key?x(this._items,v(this._key,e))||null:this._items.find(t=>t===e)||null}};var S=`${ee}table`,de={TABLE:"forge-table",TABLE_DENSE:"forge-table--dense",TABLE_ROOMY:"forge-table--roomy",TABLE_RESIZABLE:"forge-table--resizable",TABLE_RESIZING:"forge-table--resizing",TABLE_RESIZE_HANDLE:"forge-table__resize-handle",TABLE_NO_WRAP_CONTENT:"forge-table--no-wrap-content",TABLE_LAYOUT_FIXED:"forge-table--layout-fixed",TABLE_FILTER_VISIBLE:"forge-table--filter-visible",TABLE_FIXED:"forge-table--fixed",TABLE_HEAD:"forge-table-head",TABLE_HEAD_ROW:"forge-table-head__row",TABLE_HEAD_ROW_FILTER:"forge-table-head__row__filter",TABLE_HEAD_CELL:"forge-table-head__cell",TABLE_HEAD_CELL_CONTAINER:"forge-table-head__cell-container",TABLE_HEAD_CELL_SORTABLE:"forge-table-head__cell--sortable",TABLE_HEAD_CELL_SORT_ICON:"forge-table-head__cell-sort-icon",TABLE_HEAD_CELL_TEXT:"forge-table-head__cell-text",TABLE_HEAD_CELL_SORT_ICON_ACTIVE:"forge-table-head__cell-sort-icon--active",TABLE_HEAD_CELL_SORTED_ASCENDING:"forge-table-head__cell--sorted-ascending",TABLE_HEAD_CELL_SORTED_DESCENDING:"forge-table-head__cell--sorted-descending",TABLE_HEAD_CELL_SORT_ORDER:"forge-table-head__cell__sort-order",TABLE_HEAD_CELL_SORT_ORDER_HIDDEN:"forge-table-head__cell__sort-order--hidden",TABLE_BODY:"forge-table-body",TABLE_BODY_ROW:"forge-table-body__row",TABLE_BODY_ROW_SELECTED:"forge-table-body__row--selected",TABLE_BODY_ROW_CLICKABLE:"forge-table-body__row--clickable",TABLE_BODY_CELL:"forge-table-body__cell",TABLE_ROW:"forge-table-row",TABLE_ROW_EXPANDED:"forge-table-row--expanded",TABLE_ROW_EXPANDABLE_CONTENT:"forge-table-row__expandable-content",TABLE_ROW_EXPANDABLE_CONTENT_CELL:"forge-table-row__expandable-content-cell",TABLE_CELL:"forge-table-cell",TABLE_CELL_SELECT:"forge-table-cell__select",TABLE_CELL_SELECT_CHECKBOX:"forge-table-cell__select-checkbox",TABLE_CELL_SELECT_CHECKBOX_CONTAINER:"forge-table-cell__select-checkbox-container",TABLE_CELL_SELECT_CHECKBOX_CONTAINER_ALIGN_RIGHT:"forge-table-cell__select-checkbox-container--align-right",TABLE_CELL_SELECT_CHECKBOX_CONTAINER_ALIGN_LEFT:"forge-table-cell__select-checkbox-container--align-left",TABLE_CELL_SELECT_CHECKBOX_CONTAINER_ALIGN_CENTER:"forge-table-cell__select-checkbox-container--align-center",TABLE_CELL_CONTAINER:"forge-table-cell__container",TABLE_CELL_CONTAINER_TEXT:"forge-table-cell__container-text",TABLE_CELL_CENTER:"forge-table-cell--center",TABLE_CELL_RIGHT:"forge-table-cell--right",TABLE_CELL_RESIZABLE:"forge-table-cell--resizing"},_e={TABLE:".forge-table",CHECKBOX_INPUT:"forge-checkbox > input[type=checkbox]:not([forge-ignore])",SELECT_ALL_TEMPLATE_CHECKBOX_INPUT:"input[type=checkbox]:not([forge-ignore])",ROW_SELECTED:`.${de.TABLE_BODY_ROW_SELECTED}`},be={SELECT:"select",MULTISELECT:"multiselect",SELECT_KEY:"select-key",DENSE:"dense",ROOMY:"roomy",FILTER:"filter",FIXED_HEADERS:"fixed-headers",LAYOUT_TYPE:"layout-type",WRAP_CONTENT:"wrap-content",RESIZABLE:"resizable",MIN_RESIZE_WIDTH:"min-resize-width",ALLOW_ROW_CLICK:"allow-row-click",MULTI_COLUMN_SORT:"multi-column-sort",SELECT_CHECKBOX_ALIGNMENT:"select-checkbox-alignment",TOOLTIP_SELECT:"tooltip-select",TOOLTIP_SELECT_ALL:"tooltip-select-all",CHECKBOX_TYPE:"forge-checkbox-type",CUSTOM_CELL_TEMPLATE:"data-cell-template",CUSTOM_CELL_TEMPLATE_STOP_PROPAGATION:"data-cell-template-stop-propagation"},pe={ROW_CLICK:`${S}-row-click`,SELECT:`${S}-select`,SELECT_DOUBLE:`${S}-select-double`,SELECT_ALL:`${S}-select-all`,SORT:`${S}-sort`,FILTER:`${S}-filter`,INITIALIZED:`${S}-initialized`,COLUMN_RESIZE:`${S}-column-resize`},Te={SELECT_ALL:"select-all",SELECT_ROW:"select-row",DEFAULT_LAYOUT_TYPE:"auto"},Ce={SORT_DOWN:"arrow_downward"},he={DEFAULT_FILTER_DEBOUNCE_TIME:750,MIN_RESIZE_WIDTH:100,RESIZE_HOVER_DURATION:150},o={elementName:S,classes:de,selectors:_e,attributes:be,events:pe,strings:Te,icons:Ce,numbers:he};var B=(l=>(l.Left="left",l.Right="right",l.Center="center",l))(B||{}),O=(l=>(l.Ascending="ASC",l.Descending="DESC",l.Unset="UNSET",l))(O||{}),Le=(s=>(s.InputText="text",s.InputNumber="number",s.Select="select",s.SelectMultiple="select-multiple",s.Date="date",s.DateRange="date-range",s))(Le||{});function me(f){return f&&typeof f=="object"&&"content"in f}var a=class{static createTable(e){a._resetTable(e.tableElement);let t=a._createTableHead(e),l=a._createTableBody(e);e.clickListener&&(a._attachRowClickListeners(l,e.clickListener,e.doubleClickListener),a._addRowClickAttributes(l)),e.fixedHeaders&&a.setFixedHeaders(e),e.resizable&&a.setResizable(e),e.dense&&a.setDenseState(e.tableElement,e.dense),e.wrapContent&&a.setWrapContentState(e.tableElement,e.wrapContent),e.selectListener&&a._addSelectColumn(t,l,e.selectListener,e.selectAllListener,e.selectAllTemplate,e.selectCheckboxAlignment,e.data,e.tooltipSelect,e.tooltipSelectAll),(e.resizable||e.columnConfigurations.some(i=>!!i.sortable))&&(a._attachHeadRowMouseDownListener(t,e.headRowMouseDownListener),a._isMac()&&a._attachHeadRowContextMenuListener(t,e.headRowContextMenuListener)),a.setLayoutType(e),a._setTableHead(e.tableElement,t),e.filter&&a.setFilterRow(e),a._setTableBody(e.tableElement,l)}static _setTableHead(e,t){e.tHead?F(t,e.tHead):e.appendChild(t)}static _setTableBody(e,t){e.tBodies.length?F(t,e.tBodies[0]):e.appendChild(t)}static recreateTableBody(e){let t=a._createTableBody(e);e.clickListener&&(a._attachRowClickListeners(t,e.clickListener,e.doubleClickListener),a._addRowClickAttributes(t)),e.selectListener&&(a._createBodySelectColumn(t,e.selectCheckboxAlignment,e.data,e.tooltipSelect,e.tooltipSelectAll),a._attachRowSelectListeners(t,e.selectListener)),a._setTableBody(e.tableElement,t)}static _resetTable(e){g(e)}static _createMultisortTooltip(){let e=document.createElement(ae.elementName);return e.textContent="Ctrl + click to sort multiple columns",e.position="bottom",e.delay=0,e}static _createTableHead(e){let t=document.createElement("thead"),l=t.insertRow();p([o.classes.TABLE_ROW,o.classes.TABLE_HEAD_ROW],l);let i=!1;for(let n=0;n<e.columnConfigurations.length;n++){let s=e.columnConfigurations[n],r=document.createElement("th");r.scope="col",p([o.classes.TABLE_CELL,o.classes.TABLE_HEAD_CELL],r);let c;if(s.sortable?(c=document.createElement("button"),c.type="button",c.addEventListener("keydown",e.sortableHeadCellKeydownListener)):c=document.createElement("div"),c.classList.add(o.classes.TABLE_HEAD_CELL_CONTAINER),e.multiColumnSort){let d=a._createMultisortTooltip();c.appendChild(d)}if(s.align&&a._setCellAlignmentClass(c,s.align),L(s.width)){let d=K(s.width);d&&(r.style.width=d)}if(e.resizable&&s.resizable!==!1){let d=document.createElement("div");d.classList.add(o.classes.TABLE_RESIZE_HANDLE),r.appendChild(d)}L(s.headerCellStyle)&&w(s.headerCellStyle)&&(Object.assign(r.style,s.headerCellStyle),Object.assign(c.style,s.headerCellStyle));let m=document.createElement("span");if(m.classList.add(o.classes.TABLE_HEAD_CELL_TEXT),m.textContent=s.header&&typeof s.header=="string"?s.header.trim():"",s.sortable){r.classList.add(o.classes.TABLE_HEAD_CELL_SORTABLE);let d=document.createElement("span");p([o.classes.TABLE_HEAD_CELL_SORT_ORDER_HIDDEN,o.classes.TABLE_HEAD_CELL_SORT_ORDER],d);let u=document.createElement(ie.elementName);u.name=o.icons.SORT_DOWN,p([o.classes.TABLE_HEAD_CELL_SORT_ICON],u),e.multiColumnSort?typeof s.initialSort=="object"&&s.initialSort.sortOrder&&(d.textContent=s.initialSort.sortOrder.toString(),e.columnConfigurations.filter(T=>typeof T.initialSort=="object").length>1&&D(o.classes.TABLE_HEAD_CELL_SORT_ORDER_HIDDEN,d),r.classList.add(o.classes.TABLE_HEAD_CELL_SORTED_DESCENDING),u.classList.add(o.classes.TABLE_HEAD_CELL_SORT_ICON_ACTIVE),a._setColumnSortDirection(r,s.initialSort.direction)):e.sortedColumn===n&&!i&&!e.multiColumnSort&&(r.classList.add(o.classes.TABLE_HEAD_CELL_SORTED_DESCENDING),u.classList.add(o.classes.TABLE_HEAD_CELL_SORT_ICON_ACTIVE),a._setColumnSortDirection(r,e.sortDirection),i=!0),c.appendChild(u),c.appendChild(d)}typeof s.headerTemplate=="function"?Promise.resolve(s.headerTemplate(n,c,s)).then(d=>{if(d){let u=document.createElement("div");p(o.classes.TABLE_CELL_CONTAINER,u),typeof d=="string"?u.innerHTML=d:a._prepend(d,u),u.setAttribute(o.attributes.CUSTOM_CELL_TEMPLATE,""),a._prepend(u,c)}}):a._prepend(m,c),r.appendChild(c),l.appendChild(r)}return t}static setSortDirection(e,t,l){let i=a._getHeaderCellByIndex(e,t);e.querySelectorAll("th[aria-sort]").forEach(n=>n.removeAttribute("aria-sort")),a._setColumnSortDirection(i,l)}static _setColumnSortDirection(e,t){e.classList.contains(o.classes.TABLE_HEAD_CELL_SORTED_ASCENDING)&&e.classList.remove(o.classes.TABLE_HEAD_CELL_SORTED_ASCENDING),e.classList.contains(o.classes.TABLE_HEAD_CELL_SORTED_DESCENDING)&&e.classList.remove(o.classes.TABLE_HEAD_CELL_SORTED_DESCENDING),!t||t==="DESC"?(e.setAttribute("aria-sort","descending"),e.classList.add(o.classes.TABLE_HEAD_CELL_SORTED_DESCENDING)):(e.setAttribute("aria-sort","ascending"),e.classList.add(o.classes.TABLE_HEAD_CELL_SORTED_ASCENDING))}static _createTableBody(e){let t=document.createElement("tbody");return a._getOrderedRowData(e.columnConfigurations,e.data).forEach((i,n)=>{let s=t.insertRow();p([o.classes.TABLE_ROW,o.classes.TABLE_BODY_ROW],s),a._populateRowCells(e,s,i,n),typeof e.rowCreatedCallback=="function"&&e.rowCreatedCallback(s,n,C({},e.data[n].data))}),t}static _populateRowCells(e,t,l,i){for(let n=0;n<l.length;n++){let s=e.columnConfigurations[n],r=t.insertCell();if(p([o.classes.TABLE_CELL,o.classes.TABLE_BODY_CELL],r),L(s.width)){let m=K(s.width);m&&(r.style.width=m)}let c=document.createElement("div");if(c.classList.add(o.classes.TABLE_CELL_CONTAINER),L(s.cellStyle)&&w(s.cellStyle)&&(Object.assign(r.style,s.cellStyle),Object.assign(c.style,s.cellStyle)),s.template&&typeof s.template=="function"){let m=e.data[i]?e.data[i].data:void 0;Promise.resolve(s.template(i,c,m,n)).then(d=>{let u=me(d)?d:{content:d,stopClickPropagation:s.stopCellTemplateClickPropagation};!u.content||(typeof u.content=="string"?c.innerHTML=u.content:c.appendChild(u.content),c.setAttribute(o.attributes.CUSTOM_CELL_TEMPLATE,""),u.stopClickPropagation&&c.setAttribute(o.attributes.CUSTOM_CELL_TEMPLATE_STOP_PROPAGATION,""))})}else if(s.property){let m=document.createElement("span");m.classList.add(o.classes.TABLE_CELL_CONTAINER_TEXT),c.appendChild(m),s.transform&&typeof s.transform=="function"?Promise.resolve(s.transform(l[n])).then(d=>m.textContent=d):l[n]==null?m.textContent="":m.textContent=l[n].toString()}if(s.align&&a._setCellAlignmentClass(c,s.align),r.appendChild(c),L(s.columnSpan)){if(s.columnSpan==="all"){r.colSpan=l.length-n;break}else if(typeof s.columnSpan=="number"&&s.columnSpan>0){let m=s.columnSpan;s.columnSpan>l.length-n&&(m=l.length),r.colSpan=m,n=n+(m-1)}}typeof e.cellCreatedCallback=="function"&&e.cellCreatedCallback(r,i,n)}}static _setCellAlignmentClass(e,t){switch(t){case"center":e.classList.add(o.classes.TABLE_CELL_CENTER);break;case"right":e.classList.add(o.classes.TABLE_CELL_RIGHT);break}}static _getNonExpandedRows(e){return Array.from(e).filter(t=>!t.classList.contains(o.classes.TABLE_ROW_EXPANDABLE_CONTENT))}static _getExpandedRows(e){return Array.from(e).filter(t=>t.classList.contains(o.classes.TABLE_ROW_EXPANDABLE_CONTENT))}static _createColumnDataMap(e,t){return e.map(l=>({config:l,data:t.map(i=>{if(l.property){let n=q(i.data,l.property);return L(n)?n:null}return null})}))}static _getOrderedRowData(e,t){let l=a._createColumnDataMap(e,t),i=[];for(let n of l)for(let s=0;s<n.data.length;s++)i[s]||(i[s]=[]),i[s].push(n.data[s]);return i}static _attachRowClickListeners(e,t,l){a._getNonExpandedRows(e.rows).forEach(n=>{n.addEventListener("click",t),l&&n.addEventListener("dblclick",l)})}static _addRowClickAttributes(e){a._getNonExpandedRows(e.rows).forEach(l=>{l.classList.add(o.classes.TABLE_BODY_ROW_CLICKABLE)})}static _removeRowClickAttributes(e){a._getNonExpandedRows(e.rows).forEach(l=>{l.classList.remove(o.classes.TABLE_BODY_ROW_CLICKABLE)})}static _attachRowSelectListeners(e,t){a._getNonExpandedRows(e.rows).forEach(i=>a._attachRowSelectListener(i,t))}static _attachRowSelectListener(e,t){let l=a._getCheckboxElement(e);l==null||l.addEventListener("click",t)}static _detachRowSelectListeners(e,t){Array.from(e.rows).forEach(l=>{let i=a._getCheckboxElement(l);i==null||i.removeEventListener("click",t)})}static _detachRowClickListeners(e,t,l){Array.from(e.rows).forEach(i=>{i.removeEventListener("click",t),i.removeEventListener("dblclick",l)})}static _attachSelectAllListener(e,t){let l=e.rows[e.rows.length-1],i=a._getCheckboxElement(l);if(!i)throw new Error("Checkbox element not found.");i.addEventListener("change",t)}static _tryAttachSelectAllTemplateListener(e,t){let l=e.rows[e.rows.length-1],i=a._tryGetSelectAllCheckboxElement(l);i&&i.addEventListener("change",t)}static _detachSelectAllListener(e,t){let l=e.rows[e.rows.length-1],i=a._tryGetSelectAllCheckboxElement(l);!i||i.removeEventListener("change",t)}static _attachHeadRowMouseDownListener(e,t){let l=e.rows[0];if(!l)throw new Error("Missing table header row. Unable to attach sort listener.");l.addEventListener("mousedown",t)}static _attachHeadRowContextMenuListener(e,t){let l=e.rows[0];if(!l)throw new Error("Missing table header row. Unable to attach sort listener.");l.addEventListener("contextmenu",t)}static _createSelectColumn(e,t,l,i,n,s,r,c,m){e&&a._createHeadSelectColumn(e,l,i,n,s,m),t&&a._createBodySelectColumn(t,s,r,c,m)}static _createHeadSelectColumn(e,t,l,i,n,s){var r;if(Array.from(e.rows).forEach(c=>{let m=document.createElement("th");p([o.classes.TABLE_CELL,o.classes.TABLE_HEAD_CELL],m),c.insertBefore(m,c.cells.item(0))}),t){let c=(r=e.rows.item(e.rows.length-1))==null?void 0:r.cells.item(0);c.classList.add(o.classes.TABLE_CELL_SELECT),typeof l=="function"?a._renderSelectAllTemplate(l,e).then(()=>{typeof i=="function"&&i()}):c==null||c.appendChild(a._createCheckboxElement(!0,n,null,null,null,s))}}static _createBodySelectColumn(e,t,l,i,n){if(a._getNonExpandedRows(e.rows).forEach((r,c)=>a._addRowSelectColumn(r,t,c,l[c],i,n)),e.rows.length){let r=e.rows.item(0);r&&a._updateExpandedRowColspan(e.rows,r.cells.length)}}static _addRowSelectColumn(e,t,l,i,n,s){let r=e.insertCell(0);p([o.classes.TABLE_CELL,o.classes.TABLE_BODY_CELL,o.classes.TABLE_CELL_SELECT],r),r.appendChild(a._createCheckboxElement(!1,t,l,i,n,s))}static _destroySelectColumn(e,t){let l=a._getNonExpandedRows(t.rows);if(Array.from(e.rows).forEach(i=>i.removeChild(i.cells.item(0))),Array.from(l).forEach(i=>i.removeChild(i.cells.item(0))),t.rows.length){let i=t.rows.item(0);i&&a._updateExpandedRowColspan(t.rows,i.cells.length)}}static _hasSelectColumn(e,t){return[...Array.from(e.rows),...Array.from(t.rows)].some(i=>i.cells.item(0).classList.contains(o.classes.TABLE_CELL_SELECT))}static _createCheckboxElement(e,t,l,i,n,s){let r=document.createElement("div");if(r.classList.add(o.classes.TABLE_CELL_SELECT_CHECKBOX_CONTAINER),t)switch(t){case"center":r.classList.add(o.classes.TABLE_CELL_SELECT_CHECKBOX_CONTAINER_ALIGN_CENTER);break;case"left":r.classList.add(o.classes.TABLE_CELL_SELECT_CHECKBOX_CONTAINER_ALIGN_LEFT);break;case"right":r.classList.add(o.classes.TABLE_CELL_SELECT_CHECKBOX_CONTAINER_ALIGN_RIGHT);break}let c=document.createElement(re.elementName),m=document.createElement("input");m.type="checkbox";let d=n||"";i&&typeof n=="function"&&(d=n.call(null,l,i.data));let u=document.createElement("forge-tooltip");return u.position="left",e?u.textContent=s||"":u.textContent=d,m.setAttribute("aria-label","Select row"),c.appendChild(m),r.appendChild(u),r.appendChild(c),r}static _getCheckboxElement(e){let t=e.querySelector(`.${o.classes.TABLE_CELL_SELECT}`);return t?t.querySelector(o.selectors.CHECKBOX_INPUT):null}static _tryGetSelectAllCheckboxElement(e){let t=e.querySelector(`.${o.classes.TABLE_CELL_SELECT}`);return t?t.querySelector(o.selectors.CHECKBOX_INPUT)||t.querySelector(o.selectors.SELECT_ALL_TEMPLATE_CHECKBOX_INPUT):null}static _setSelectedCheckboxState(e,t){e&&(e.checked=t)}static _setIndeterminateCheckboxState(e,t){e&&(e.indeterminate=t)}static _setRowSelectedState(e,t){t?e.classList.contains(o.classes.TABLE_BODY_ROW_SELECTED)||e.classList.add(o.classes.TABLE_BODY_ROW_SELECTED):e.classList.remove(o.classes.TABLE_BODY_ROW_SELECTED)}static _updateExpandedRowColspan(e,t){a._getExpandedRows(e).forEach(i=>{let n=i.cells.item(0);n&&(n.colSpan=t)})}static updateSelectedState(e,t){a._setRowSelectedState(e,t);let l=a._getCheckboxElement(e);l&&a._setSelectedCheckboxState(l,t)}static getRowByIndex(e,t){return a._getNonExpandedRows(e.tBodies[0].rows)[t]}static updateSelectAllState(e,t,l){if(!e.tHead)return;let i=e.tHead.rows[e.tHead.rows.length-1],n=a._tryGetSelectAllCheckboxElement(i);n&&(a._setSelectedCheckboxState(n,t),a._setIndeterminateCheckboxState(n,!!l))}static setSelectedRows(e,t,l,i,n=!1){if(!e.tBodies.length)return;n||a.clearSelectedRows(e);let s=e.tBodies[0].rows,r=0;i.length&&Array.from(s).forEach((c,m)=>{let d=l[m];if(x(i,v(t,d))){a._setRowSelectedState(c,!0);let T=a._getCheckboxElement(c);T&&a._setSelectedCheckboxState(T,!0),r++}}),a.updateSelectAllState(e,r>0&&s.length===r)}static clearSelectedRows(e){if(!e.tBodies.length)return;a._getNonExpandedRows(e.tBodies[0].rows).forEach(l=>{a._setRowSelectedState(l,!1);let i=a._getCheckboxElement(l);i&&a._setSelectedCheckboxState(i,!1)})}static setSortedColumn(e,t,l){let i=a._getHeaderCellByIndex(e,t);a._getSortIconElementFromHeaderCell(i).classList.add(o.classes.TABLE_HEAD_CELL_SORT_ICON_ACTIVE),a._setColumnSortDirection(i,l)}static setMultiSortColumnSortNumber(e,t,l,i){let r=a._getHeaderCellByIndex(e,l).querySelector(`.${o.classes.TABLE_HEAD_CELL_CONTAINER}`).querySelector(`.${o.classes.TABLE_HEAD_CELL_SORT_ORDER}`);r&&($(r,typeof i!="number"||!t,o.classes.TABLE_HEAD_CELL_SORT_ORDER_HIDDEN),i&&(r.textContent=i.toString()))}static removeColumnSort(e,t){let l=a._getHeaderCellByIndex(e,t);l.removeAttribute("aria-sort"),l.classList.contains(o.classes.TABLE_HEAD_CELL_SORTED_ASCENDING)&&l.classList.remove(o.classes.TABLE_HEAD_CELL_SORTED_ASCENDING),l.classList.contains(o.classes.TABLE_HEAD_CELL_SORTED_DESCENDING)&&l.classList.remove(o.classes.TABLE_HEAD_CELL_SORTED_DESCENDING);let i=a._getSortIconElementFromHeaderCell(l);i&&i.classList.contains(o.classes.TABLE_HEAD_CELL_SORT_ICON_ACTIVE)&&i.classList.remove(o.classes.TABLE_HEAD_CELL_SORT_ICON_ACTIVE)}static _getHeaderCellByIndex(e,t){if(!e.tHead)throw new Error("Table head element cannot be null.");return e.tHead.rows.item(0).cells.item(t)}static _getSortIconElementFromHeaderCell(e){return e.querySelector(`.${o.classes.TABLE_HEAD_CELL_SORT_ICON}`)}static setSelectColumnVisibility(e,t,l,i,n,s,r,c,m){let d=e.tHead,u=e.tBodies[0];!d||!u||(t?a._addSelectColumn(d,u,l,i,n,s,r,c,m):a._hasSelectColumn(d,u)&&(l&&a._detachRowSelectListeners(u,l),i&&a._detachSelectAllListener(d,i),a._destroySelectColumn(d,u)))}static _addSelectColumn(e,t,l,i,n,s,r,c,m){a._createSelectColumn(e,t,!!i,n,()=>{i&&a._tryAttachSelectAllTemplateListener(e,i)},s,r,c,m),l&&a._attachRowSelectListeners(t,l),i&&!n&&a._tryAttachSelectAllTemplateListener(e,i)}static setDenseState(e,t){e.classList.contains(o.classes.TABLE_DENSE)&&e.classList.remove(o.classes.TABLE_DENSE),t&&e.classList.add(o.classes.TABLE_DENSE)}static setRoomyState(e,t){e.classList.contains(o.classes.TABLE_ROOMY)&&e.classList.remove(o.classes.TABLE_ROOMY),t&&e.classList.add(o.classes.TABLE_ROOMY)}static setResizable(e){let t=e.tableElement.tHead;e.resizable?(e.tableElement.classList.add(o.classes.TABLE_RESIZABLE),a._addResizeHandles(t,e)):(e.tableElement.classList.remove(o.classes.TABLE_RESIZABLE),a._removeResizeHandles(t,e))}static _addResizeHandles(e,t){if(!e)return;let l=e.rows.item(0);if(l){let i=Array.from(l.cells);t.selectListener&&(i=i.slice(1));for(let n of i){let s=i.indexOf(n);if(t.columnConfigurations[s].resizable!==!1){let c=document.createElement("div");c.classList.add(o.classes.TABLE_RESIZE_HANDLE),n.appendChild(c)}}}}static _removeResizeHandles(e,t){if(!e)return;let l=e.rows.item(0);if(l){let i=Array.from(l.cells);t.selectListener&&(i=i.slice(1));for(let n of i){let s=document.querySelector(`.${o.classes.TABLE_RESIZE_HANDLE}`);s&&n.removeChild(s)}}}static setWrapContentState(e,t){t?e.classList.remove(o.classes.TABLE_NO_WRAP_CONTENT):e.classList.add(o.classes.TABLE_NO_WRAP_CONTENT)}static setSelectAllVisibility(e,t,l,i,n,s){let r=e.tHead;if(!r)return;!t&&l&&a._detachSelectAllListener(r,l);let m=r.rows[r.rows.length-1].cells.item(0);t?m.childElementCount||(m.classList.add(o.classes.TABLE_CELL_SELECT),i?a._renderSelectAllTemplate(i,r).then(()=>{l&&a._tryAttachSelectAllTemplateListener(r,l)}):m.appendChild(a._createCheckboxElement(!0,n||null,null,null,null,s)),l&&!i&&a._attachSelectAllListener(r,l)):(l&&a._detachSelectAllListener(r,l),g(m))}static setFilterRow(e){if(!e.tableElement.tHead)return;let t=a._getFilterRowElement(e.tableElement.tHead),l;if(e.filter?e.tableElement.classList.add(o.classes.TABLE_FILTER_VISIBLE):e.tableElement.classList.remove(o.classes.TABLE_FILTER_VISIBLE),e.filter&&!t){if(e.columnConfigurations.every(n=>!n.filter))return;e.selectListener&&e.selectAllListener&&(l=e.tableElement.tHead.rows[e.tableElement.tHead.rows.length-1].cells.item(0));let i=a._createFilterRowElement(e);i&&l&&Array.from(l.children).forEach(n=>{var s;(s=i.cells.item(0))==null||s.appendChild(n)})}else if(!e.filter&&t){if(e.selectListener&&e.selectAllListener){l=t.cells.item(0);let i=Array.from(e.tableElement.tHead.rows).indexOf(t)-1,n=e.tableElement.tHead.rows.item(i);n&&Array.from(l.children).forEach(s=>{var r;(r=n.cells.item(0))==null||r.appendChild(s)})}W(t)}}static _createFilterRowElement(e){if(!e.tableElement.tHead)throw new Error("Table head element cannot be null.");let t=e.tableElement.tHead.insertRow();if(p([o.classes.TABLE_ROW,o.classes.TABLE_HEAD_ROW_FILTER],t),e.selectListener){let l=document.createElement("th");p([o.classes.TABLE_CELL,o.classes.TABLE_HEAD_CELL],l),t.insertBefore(l,t.cells[0]),l.classList.add(o.classes.TABLE_CELL_SELECT)}return e.columnConfigurations.forEach((l,i)=>{let n=document.createElement("th");if(p([o.classes.TABLE_CELL,o.classes.TABLE_HEAD_CELL],n),l.filter&&L(l.filterDelegate)){let s=document.createElement("div");s.classList.add(o.classes.TABLE_HEAD_CELL_CONTAINER),l.align&&a._setCellAlignmentClass(s,l.align);let r=a._createFilterElement(l,i,e.filterListener);s.appendChild(r),n.appendChild(s)}t.appendChild(n)}),t}static _createFilterElement(e,t,l){let i;if(H(e.filterDelegate))i=e.filterDelegate();else if(e.filterDelegate instanceof Y||e.filterDelegate instanceof le)i=e.filterDelegate;else throw new Error("Invalid filter delegate.");if(!!l&&i instanceof Y&&H(i.onChange))if(!L(e.filterDebounceTime)||y(e.filterDebounceTime)){let n=L(e.filterDebounceTime)?e.filterDebounceTime:o.numbers.DEFAULT_FILTER_DEBOUNCE_TIME;i.onChange(Z(s=>l(s,t),n))}else i.onChange(n=>l(n,t));return i.element}static _getFilterRowElement(e){if(!!e)return Array.from(e.rows).find(t=>t.classList.contains(o.classes.TABLE_HEAD_ROW_FILTER))}static async expandRow(e,t,l){let i=e.tableElement.tBodies[0],s=a._getNonExpandedRows(i.rows)[t];s.classList.add(o.classes.TABLE_ROW_EXPANDED);let r=Array.from(i.rows).indexOf(s),c=i.insertRow(r+1);p([o.classes.TABLE_ROW,o.classes.TABLE_BODY_ROW,o.classes.TABLE_ROW_EXPANDABLE_CONTENT],c);let m=c.insertCell();m.setAttribute("colspan",s.cells.length.toString()),m.classList.add(o.classes.TABLE_ROW_EXPANDABLE_CONTENT_CELL);let d=document.createElement("div"),u=document.createElement(M.elementName);u.appendChild(d),m.appendChild(u);let T=l;if(H(l)){let ue=e.data[t]?e.data[t].data:void 0,Ee=l(t,d,ue);try{let A=await Promise.resolve(Ee);T=me(A)?A.content:A}catch(A){console.error("Failed to load row template "+A.message),T=""}}T&&a._setRowTemplate(d,T),window.requestAnimationFrame(()=>u.open=!0)}static _setRowTemplate(e,t){G(t)?e.innerHTML=t:e.appendChild(t)}static collapseRow(e,t){if(!e.tableElement||!e.tableElement.tBodies.length||!e.tableElement.tBodies[0].rows.length)return Promise.resolve();let l=e.tableElement.tBodies[0],n=a._getNonExpandedRows(l.rows)[t],s=Array.from(l.rows).indexOf(n);if(n&&n.classList.contains(o.classes.TABLE_ROW_EXPANDED)){let r=l.rows[s+1],c=r.querySelector(M.elementName);if(c&&c.open)return c.open=!1,new Promise(m=>{setTimeout(()=>{n.classList.remove(o.classes.TABLE_ROW_EXPANDED),W(r),m()},M.numbers.COLLAPSE_ANIMATION_DURATION)})}return Promise.resolve()}static isRowExpanded(e,t){let l=e.tableElement.tBodies[0],n=a._getNonExpandedRows(l.rows)[t];return n&&n.classList.contains(o.classes.TABLE_ROW_EXPANDED)}static setFixedHeaders(e){e.fixedHeaders?e.tableElement.classList.add(o.classes.TABLE_FIXED):e.tableElement.classList.remove(o.classes.TABLE_FIXED)}static setLayoutType(e){e.layoutType==="fixed"?e.tableElement.classList.add(o.classes.TABLE_LAYOUT_FIXED):e.tableElement.classList.remove(o.classes.TABLE_LAYOUT_FIXED)}static normalizeColumnWidths(e){let t=e.tableElement;if(t.tHead&&t.tHead.rows.length){let l=Array.from(t.tHead.rows[0].cells);for(let i of l){let n=getComputedStyle(i).width;i.style.width&&i.style.width!==n&&(i.style.width=n)}}}static setColumnResizeIndicatorVisibility(e,t,l){let i=e.tableElement;if(i.tHead&&i.tHead.rows.length){let n=Array.from(i.tHead.rows);for(let s of n){let r=s.cells[t];r&&(l?r.classList.add(o.classes.TABLE_CELL_RESIZABLE):r.classList.remove(o.classes.TABLE_CELL_RESIZABLE))}}if(i.tBodies.length){let n=Array.from(i.tBodies[0].rows);for(let s of n){let r=s.cells[t];r&&(l?r.classList.add(o.classes.TABLE_CELL_RESIZABLE):r.classList.remove(o.classes.TABLE_CELL_RESIZABLE))}}}static setRowClickListeners(e,t,l,i){let n=e.tBodies[0];!n||(t?a._attachRowClickListeners(n,l,i):a._detachRowClickListeners(n,l,i))}static setRowClickAttributes(e,t){let l=e.tBodies[0];!l||(t?a._addRowClickAttributes(l):a._removeRowClickAttributes(l))}static getOwnerDocument(e){return e.ownerDocument||document}static _prepend(e,t){let l=t.childNodes.item(0);l?t.insertBefore(e,l):t.appendChild(e)}static _isMac(){return!!(navigator&&navigator.platform&&navigator.platform.substr(0,3)==="Mac")}static _renderSelectAllTemplate(e,t){return Promise.resolve(e()).then(l=>{let i=t.rows.item(t.rows.length-1);if(!i)return;let n=i.cells.item(0);l&&n&&(typeof l=="string"?n.innerHTML=l:l instanceof HTMLElement&&n.appendChild(l),n.setAttribute(o.attributes.CUSTOM_CELL_TEMPLATE,""))})}};var N=class extends U{constructor(t){super(t)}initialize(){this._tableElement||(this._tableElement=document.createElement("table"),this._tableElement.classList.add(o.classes.TABLE),this._component.children.length&&g(this._component),this._component.appendChild(this._tableElement))}getTableElement(){return this._tableElement||this.initialize(),this._tableElement}createTable(t){return a.createTable(t)}recreateTableBody(t){a.recreateTableBody(t)}setSelectedRows(t,l,i,n,s=!1){a.setSelectedRows(t,l,i,n,s)}clearSelectedRows(t){a.clearSelectedRows(t)}updateSelectedState(t,l){a.updateSelectedState(t,l)}updateSelectAllState(t,l,i){a.updateSelectAllState(t,l,i)}setSortedColumn(t,l,i){a.setSortedColumn(t,l,i)}removeColumnSort(t,l){a.removeColumnSort(t,l)}setSortDirection(t,l,i){a.setSortDirection(t,l,i)}setSelectColumnVisibility(t,l,i,n,s,r,c,m,d){a.setSelectColumnVisibility(t,l,i,n||null,s||null,r||null,c||[],m||null,d||null)}setDense(t,l){a.setDenseState(t,l)}setRoomy(t,l){a.setRoomyState(t,l)}setResizable(t){a.setResizable(t)}setSelectAllVisibility(t,l,i,n,s,r=null){a.setSelectAllVisibility(t,l,i,n,s||null,r||null)}setFilterRow(t){a.setFilterRow(t)}expandRow(t,l,i){return a.expandRow(t,l,i)}collapseRow(t,l){return a.collapseRow(t,l)}isRowExpanded(t,l){return a.isRowExpanded(t,l)}setFixedHeaders(t){a.setFixedHeaders(t)}setTableLayoutType(t){a.setLayoutType(t)}setWrapContentState(t){a.setWrapContentState(t.tableElement,t.wrapContent)}addDocumentListener(t,l){a.getOwnerDocument(this._component).addEventListener(t,l)}removeDocumentListener(t,l){a.getOwnerDocument(this._component).removeEventListener(t,l)}normalizeColumnWidths(t){a.normalizeColumnWidths(t)}setResizeColumnVisibility(t,l,i){a.setColumnResizeIndicatorVisibility(t,l,i)}addTableClass(t){p(t,this._tableElement)}removeTableClass(t){D(t,this._tableElement)}setRowClickListeners(t,l,i,n){a.setRowClickListeners(t,l,i,n)}setRowClickAttributes(t,l){a.setRowClickAttributes(t,l)}};var k=class{constructor(){this._sortedColumns=[]}get sortedColumns(){return[...this._sortedColumns.map(e=>C({},e))]}addSortColumn(e){this._sortedColumns.push(C({},e)),this._updateSortNumbers()}updateSortColumn(e){let t=this._sortedColumns.find(l=>l.columnIndex===e.columnIndex);if(t)switch(t.direction){case"ASC":this.removeSortColumn(e);break;case"DESC":t.direction="ASC";break;case"UNSET":t.direction="DESC";break}}setSortColumns(e){this._sortedColumns=[...e.map(t=>C({},t))]}removeSortColumn(e){typeof e=="number"?this._sortedColumns.splice(e,1):this._sortedColumns.splice(this._sortedColumns.indexOf(e),1),this._updateSortNumbers()}isSortColumn(e){return typeof e=="number"?this._sortedColumns.some(t=>t.columnIndex===e):this._sortedColumns.includes(e)}clearMultiSort(){this._sortedColumns=[]}getSortColumn(e){return this._sortedColumns.find(t=>t.columnIndex===e)}_updateSortNumbers(){this._sortedColumns.every(e=>typeof e.sortOrder=="number")&&this._sortedColumns.sort((e,t)=>e.sortOrder-t.sortOrder),this._sortedColumns.forEach((e,t)=>e.sortOrder=t+1)}};var P=class{constructor(e,t=!1){this.data=e;this.selected=t}};var z=class{constructor(e){this._adapter=e;this._tableRows=[];this._data=[];this._columnConfigurations=[];this._select=!1;this._multiselect=!0;this._dense=!1;this._roomy=!1;this._filter=!1;this._fixedHeaders=!1;this._layoutType=o.strings.DEFAULT_LAYOUT_TYPE;this._wrapContent=!0;this._resizable=!1;this._minResizeWidth=o.numbers.MIN_RESIZE_WIDTH;this._multiColumnSort=!1;this._selectCheckboxAlignment="center";this._isAllSelected=!1;this._sortedColumnIndex=-1;this._rendered=!1;this._allowRowClick=!1;this._multiSortManager=new k;this._rowClickListener=t=>this._onRowClick(t),this._rowDoubleClickListener=t=>this._onRowDoubleClick(t),this._selectRowListener=t=>this._onRowSelected(t),this._selectAllListener=t=>this._onSelectAll(t),this._sortableHeadCellKeydownListener=t=>this._onSortableHeadCellKeydown(t),this._headRowMouseDownListener=t=>this._onHeadRowMouseDown(t),this._headRowContextMenuListener=t=>this._onHeadRowContextMenu(t),this._documentMouseMoveListener=t=>this._onMouseMove(t),this._documentMouseUpListener=t=>this._onMouseUp(t),this._filterListener=(t,l)=>this._onFilter(t,l),this._selectionManager=new I(this._selectKey),this._hiddenColumnManager=new I}initialize(){this.connect(),this._adapter.setHostAttribute(o.attributes.SELECT,this._select.toString()),this._adapter.setHostAttribute(o.attributes.MULTISELECT,this._multiselect.toString()),this._adapter.setHostAttribute(o.attributes.DENSE,this._dense.toString()),this._adapter.setHostAttribute(o.attributes.ROOMY,this._roomy.toString()),this._adapter.setHostAttribute(o.attributes.FILTER,this._filter.toString()),this._adapter.emitHostEvent(o.events.INITIALIZED,void 0,!1)}connect(){this._adapter.initialize()}disconnect(){this._resizeDescriptor=void 0,this._adapter.removeDocumentListener("mousemove",this._documentMouseMoveListener),this._adapter.removeDocumentListener("mouseup",this._documentMouseUpListener)}set data(e){Array.isArray(e)&&e.length>0?w(e[0])?this._data=e.map(t=>C({},t)):this._data=[...e]:this._data=[],this._tableRows=this._data.map(t=>new P(t,this._selectionManager.exists(t))),this._renderBody()}get data(){return this._data.map(e=>C({},e))}set columnConfigurations(e){this._columnConfigurations=e.map(t=>C({},t)),this._hiddenColumnManager.clear(),this._columnConfigurations.forEach(t=>{t.hidden&&this._hiddenColumnManager.add(t)}),this._refreshTableSort(),this.render()}get columnConfigurations(){return this._columnConfigurations.map(e=>C({},e))}get _visibleColumnConfigurations(){return this._columnConfigurations.filter(e=>!this._hiddenColumnManager.exists(e))}get _tableConfiguration(){return{tableElement:this._adapter.getTableElement(),columnConfigurations:this._visibleColumnConfigurations,data:this._tableRows,clickListener:this._allowRowClick?this._rowClickListener:null,doubleClickListener:this._allowRowClick?this._rowDoubleClickListener:null,selectListener:this._select?this._selectRowListener:null,selectAllListener:this._multiselect?this._selectAllListener:null,sortableHeadCellKeydownListener:this._sortableHeadCellKeydownListener,headRowMouseDownListener:this._headRowMouseDownListener,headRowContextMenuListener:this._headRowContextMenuListener,filterListener:this._filter?this._filterListener:null,sortDirection:this._sortDirection,sortedColumn:this._sortedColumnIndex,multiColumnSort:this._multiColumnSort,filter:this._filter,wrapContent:this._wrapContent,fixedHeaders:this._fixedHeaders,layoutType:this._layoutType,dense:this._dense,resizable:this._resizable,rowCreatedCallback:this._rowCreatedCallback,cellCreatedCallback:this._cellCreatedCallback,selectAllTemplate:this._selectAllTemplate,selectCheckboxAlignment:this._selectCheckboxAlignment,tooltipSelect:this._tooltipSelect,tooltipSelectAll:this._tooltipSelectAll}}set select(e){this._select!==e&&(this._select=e,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),this._updateSelections(!0),this._select?this._adapter.setHostAttribute(o.attributes.SELECT,this._select.toString()):this._adapter.removeHostAttribute(o.attributes.SELECT))}get select(){return this._select}set multiselect(e){this._multiselect!==e&&(this._multiselect=e,this._select&&(this._adapter.setSelectAllVisibility(this._adapter.getTableElement(),this._multiselect,this._multiselect?this._selectAllListener:null,this._multiselect?this.selectAllTemplate:null,this._selectCheckboxAlignment,this._tooltipSelectAll),this._updateSelections(!0)),this._adapter.setHostAttribute(o.attributes.MULTISELECT,this._multiselect.toString()))}get multiselect(){return this._multiselect}get selectKey(){return Array.isArray(this._selectKey)?[...this._selectKey]:this._selectKey}set selectKey(e){this._originalSelectKey!==e&&(Array.isArray(e)?(this._originalSelectKey=[...e],this._selectKey=[...e]):(this._originalSelectKey=e,this._selectKey=[e]),this._selectionManager.setKey(this._selectKey),this._updateSelections(!1))}get dense(){return this._dense}set dense(e){this._dense!==e&&(this._dense=e,this._adapter.setDense(this._adapter.getTableElement(),this._dense),this._adapter.setHostAttribute(o.attributes.DENSE,this._dense.toString()))}get roomy(){return this._roomy}set roomy(e){e!==this._roomy&&(this._roomy=e,this._applyRoomy())}set filter(e){this._filter!==e&&(this._filter=e,this._adapter.setFilterRow(this._tableConfiguration),this._adapter.setHostAttribute(o.attributes.FILTER,this._filter.toString()))}get filter(){return this._filter}set fixedHeaders(e){this._fixedHeaders!==e&&(this._fixedHeaders=e,this._adapter.setFixedHeaders(this._tableConfiguration))}get fixedHeaders(){return this._fixedHeaders}get layoutType(){return this._layoutType}set layoutType(e){this._layoutType!==e&&(this._layoutType=e,this._adapter.setTableLayoutType(this._tableConfiguration))}get wrapContent(){return this._wrapContent}set wrapContent(e){this._wrapContent!==e&&(this._wrapContent=e,this._adapter.setWrapContentState(this._tableConfiguration))}get resizable(){return this._resizable}set resizable(e){this._resizable!==e&&(this._resizable=e,this._adapter.setResizable(this._tableConfiguration))}get minResizeWidth(){return this._minResizeWidth}set minResizeWidth(e){this._minResizeWidth!==e&&(this._minResizeWidth=e,y(this._minResizeWidth)?this._minResizeWidth<0&&(this._minResizeWidth=0):this._minResizeWidth=o.numbers.MIN_RESIZE_WIDTH)}get allowRowClick(){return this._allowRowClick}set allowRowClick(e){this._allowRowClick!==e&&(this._allowRowClick=e,this._rendered&&(this._adapter.setRowClickListeners(this._adapter.getTableElement(),this._allowRowClick,this._rowClickListener,this._rowDoubleClickListener),this._adapter.setRowClickAttributes(this._adapter.getTableElement(),this._allowRowClick)))}get multiColumnSort(){return this._multiColumnSort}set multiColumnSort(e){e!==this._multiColumnSort&&(this._multiColumnSort=e,this._refreshTableSort(),this.render())}get selectCheckboxAlignment(){return this._selectCheckboxAlignment}set selectCheckboxAlignment(e){e!==this._selectCheckboxAlignment&&(this._selectCheckboxAlignment=e,this._adapter.setHostAttribute(o.attributes.SELECT_CHECKBOX_ALIGNMENT,e),this.render())}get tooltipSelect(){return this._tooltipSelect}set tooltipSelect(e){e!==this._tooltipSelect&&(this._tooltipSelect=e,typeof e=="string"&&this._adapter.setHostAttribute(o.attributes.TOOLTIP_SELECT,e),this.render())}get tooltipSelectAll(){return this._tooltipSelectAll}set tooltipSelectAll(e){e!==this._tooltipSelectAll&&(this._tooltipSelectAll=e,this._adapter.setHostAttribute(o.attributes.TOOLTIP_SELECT_ALL,e),this.render())}get selectAllTemplate(){return this._selectAllTemplate}set selectAllTemplate(e){e!==this._selectAllTemplate&&(this._selectAllTemplate=e,this.render())}get rowCreated(){return this._rowCreatedCallback}set rowCreated(e){this._rowCreatedCallback=e}get cellCreated(){return this._cellCreatedCallback}set cellCreated(e){this._cellCreatedCallback=e}isRowSelected(e){let t=v(Array.isArray(this._selectKey)?this._selectKey:[this._selectKey],e);return this.selectKey?!!this._selectionManager.getItems().find(l=>X(l,t)):this._selectionManager.exists(e)}getSelectedRows(){return this._selectionManager.getItems()}selectRows(e,t){if(!this._selectKey)throw new Error("You must set a selectKey to select rows.");(!this._multiselect||t)&&this.clearSelections(),e&&e.length&&(this._selectionManager.add(e),this._updateSelections(!t))}deselectRows(e){e&&e.length&&(this._selectionManager.remove(e),this._updateSelections(!1))}clearSelections(){let e=this._adapter.getTableElement();this._selectionManager.clear(),this._tableRows.forEach(t=>t.selected=!1),this._isAllSelected=!1,this._adapter.clearSelectedRows(e),this._select&&this._multiselect&&this._adapter.updateSelectAllState(e,!1)}hideColumn(e){let t=this._columnConfigurations[e];this._sortedColumnIndex===e&&(this._sortedColumnIndex=-1),this._hiddenColumnManager.exists(t)||(this._hiddenColumnManager.add(t),this.render())}showColumn(e){let t=this._columnConfigurations[e];this._hiddenColumnManager.exists(t)&&(this._hiddenColumnManager.remove(t),this.render())}isColumnHidden(e){let t=this._columnConfigurations[e];return!!t&&this._hiddenColumnManager.exists(t)}render(){this._adapter.createTable(this._tableConfiguration),this._renderSelections(),this._rendered=!0}_renderBody(){!this._rendered||(this._adapter.recreateTableBody(this._tableConfiguration),this._renderSelections())}_renderSelections(){this.select&&(this._isAllSelected=this._getSelectAllState(),this._multiselect&&this._adapter.updateSelectAllState(this._adapter.getTableElement(),this._isAllSelected,this._isIndeterminate(this._isAllSelected)));let e=this._selectionManager.getItems();e.length&&this._adapter.setSelectedRows(this._adapter.getTableElement(),this._selectKey,this._data,e,!1)}expandRow(e,t){if(!this._rendered)throw new Error("Cannot expand a row before the table has rendered.");if(e<0||e>this._tableRows.length)throw new Error(`Invalid row index: ${e}.`);return this._adapter.expandRow(this._tableConfiguration,e,t)}collapseRow(e){return!this._rendered||e<0||e>this._tableRows.length?Promise.resolve():this._adapter.collapseRow(this._tableConfiguration,e)}isRowExpanded(e){return this._adapter.isRowExpanded(this._tableConfiguration,e)}selectRowsByIndex(e,t){let l=e.map(i=>this._data[i]).filter(i=>!!i);this.selectRows(l,!t)}deselectRowsByIndex(e){let t=e.map(l=>this._data[l]).filter(l=>!!l);this.deselectRows(t)}_getSelectAllState(){return this._tableRows.length>0&&this._tableRows.every(e=>e.selected)}_updateSelections(e){this._tableRows.forEach(l=>l.selected=this._selectionManager.exists(l.data));let t=this._getSelectAllState();this._adapter.setSelectedRows(this._adapter.getTableElement(),this._selectKey,this._data,this._selectionManager.getItems(),e),(t!==this._isAllSelected||this._isIndeterminate(t))&&(this._isAllSelected=t,this._multiselect&&this._adapter.updateSelectAllState(this._adapter.getTableElement(),this._isAllSelected,this._isIndeterminate(this._isAllSelected)))}_onRowClick(e){if(e.stopImmediatePropagation(),e.target.tagName==="INPUT"&&e.target.type==="checkbox")return;let i=R(e).filter(m=>m.nodeType===1).find(m=>m.hasAttribute(o.attributes.CUSTOM_CELL_TEMPLATE));if(i&&i.hasAttribute(o.attributes.CUSTOM_CELL_TEMPLATE_STOP_PROPAGATION))return;let{index:s,data:r}=this._getSelectedRowFromEvent(e),c={index:s,data:r};this._adapter.emitHostEvent(o.events.ROW_CLICK,c,!0,!1)}_onRowDoubleClick(e){if(e.stopPropagation(),e.target.tagName==="INPUT"&&e.target.type==="checkbox")return;let t=this._getSelectedRowFromEvent(e),l={index:t.index,data:t.data};this._adapter.emitHostEvent(o.events.SELECT_DOUBLE,l,!0,!1)}_onRowSelected(e){let t=this._getSelectedRowFromEvent(e);this._multiselect||this._tableRows.filter(r=>r.selected).forEach(r=>{X(r.data,v(this._selectKey,t.data))||this.deselectRows([r.data])});let l=!this._selectionManager.exists(t.data);this._adapter.updateSelectedState(t.rowElement,l),l?this._selectionManager.add(t.data):this._selectionManager.remove(t.data),this._tableRows[t.index].selected=l;let i=[t.index],n=!1;if(this._multiselect){if(e.shiftKey&&this._previouslyClickedRow&&(i=this._shiftSelectRows(t),i.includes(this._previouslyClickedRow.index))){let r=i.indexOf(this._previouslyClickedRow.index);i.splice(r,1)}n=this._getSelectAllState(),this._adapter.updateSelectAllState(this._adapter.getTableElement(),n,this._isIndeterminate(n))}for(let s of i){let r=this._tableRows[s].data,m={selected:this._selectionManager.exists(r),index:s,data:r};this._adapter.emitHostEvent(o.events.SELECT,m,!0,!1)}if(this._isAllSelected!==n){this._isAllSelected=n;let s={status:this._isAllSelected,count:this._tableRows.filter(r=>r.selected).length,data:[...this._data],targetType:"row"};this._adapter.emitHostEvent(o.events.SELECT_ALL,s,!0,!1)}this._previouslyClickedRow=C({},t)}_getSelectedRowFromEvent(e){let l=R(e).find(r=>r.tagName==="TR"),i=l.parentElement,n=this._getNonExpandedRows(i).findIndex(r=>r===l),s=this._tableRows[n].data;return{rowElement:l,index:n,data:s}}_getNonExpandedRows(e){return Array.from(e.rows).filter(t=>!t.classList.contains(o.classes.TABLE_ROW_EXPANDABLE_CONTENT))}_onSelectAll(e){e.stopPropagation(),this._isAllSelected=!this._isAllSelected;let t=this._adapter.getTableElement();this._adapter.updateSelectAllState(t,this._isAllSelected),this._tableRows.forEach((i,n)=>{i.selected=this._isAllSelected,this._isAllSelected?this._selectionManager.add(i.data):this._selectionManager.remove(i.data);let s=a.getRowByIndex(t,n);s&&this._adapter.updateSelectedState(s,this._isAllSelected)});let l={status:this._isAllSelected,count:this._tableRows.filter(i=>i.selected).length,data:[...this._data],targetType:"select-all"};this._adapter.emitHostEvent(o.events.SELECT_ALL,l,!0,!1)}_onHeadRowContextMenu(e){e.ctrlKey&&e.preventDefault()}_onHeadRowMouseDown(e){if(e.button!==0)return;let t=R(e),l=e.target,i=t.find(r=>r.tagName==="TR"),n=t.find(r=>r.tagName==="TH"),s=Array.from(i.cells).findIndex(r=>r===n);this._headCellMouseDownIndex=s,l!==n&&l.classList.contains(o.classes.TABLE_RESIZE_HANDLE)&&(this._resizeDescriptor={element:n,startWidth:n.offsetWidth,startX:e.pageX,width:n.offsetWidth,index:this._select?s-1:s},this._adapter.addDocumentListener("mousemove",this._documentMouseMoveListener),this._adapter.setResizeColumnVisibility(this._tableConfiguration,s,!0)),this._adapter.addDocumentListener("mouseup",this._documentMouseUpListener)}_onMouseMove(e){if(this._resizeDescriptor){let t=this._resizeDescriptor.startWidth+(e.pageX-this._resizeDescriptor.startX);t<this._minResizeWidth&&(t=this._minResizeWidth),this._resizeDescriptor.width=t,this._resizeDescriptor.element.style.width=`${t}px`,this._adapter.addTableClass(o.classes.TABLE_RESIZING)}}_onMouseUp(e){if(this._adapter.removeDocumentListener("mousemove",this._documentMouseMoveListener),this._adapter.removeDocumentListener("mouseup",this._documentMouseUpListener),this._adapter.removeTableClass(o.classes.TABLE_RESIZING),this._headCellMouseDownIndex!==void 0){if(this._resizeDescriptor){this._adapter.normalizeColumnWidths(this._tableConfiguration),this._adapter.setResizeColumnVisibility(this._tableConfiguration,this._headCellMouseDownIndex,!1);let t={index:this._resizeDescriptor.index,width:this._resizeDescriptor.width};this._adapter.emitHostEvent(o.events.COLUMN_RESIZE,t),this._resizeDescriptor=void 0}else this._tableConfiguration.tableElement.tHead.contains(e.target)&&(this._multiColumnSort?this._onMultiSort(this._headCellMouseDownIndex,e.ctrlKey):this._onSort(this._headCellMouseDownIndex));this._headCellMouseDownIndex=void 0}}_onSortableHeadCellKeydown(e){if(e.key===" "||e.key==="Enter"){let t=R(e),l=t.find(s=>s.tagName==="TR"),i=t.find(s=>s.tagName==="TH"),n=Array.from(l.cells).findIndex(s=>s===i);this._onSort(n)}}_onSort(e){let t=this._select?e-1:e,l=t>=0?this._visibleColumnConfigurations[t]:null;if(!l||!l.sortable)return;let i="ASC",n=t===this._sortedColumnIndex,s=this._sortDirection==="ASC"||this._sortDirection===void 0,r=n&&this._sortDirection==="DESC";n&&s&&(i="DESC"),r&&!l.preventUnsort&&(i="UNSET");let c={direction:i,columnIndex:t};if(!!this._adapter.emitHostEvent(o.events.SORT,c,!0,!0)){if(n&&this._sortDirection==="DESC"&&!l.preventUnsort){this._adapter.removeColumnSort(this._adapter.getTableElement(),this._select?this._sortedColumnIndex+1:this._sortedColumnIndex),this._sortedColumnIndex=-1;return}this._sortDirection=i,t===this._sortedColumnIndex?this._adapter.setSortDirection(this._adapter.getTableElement(),e,this._sortDirection):(this._sortedColumnIndex>=0&&this._adapter.removeColumnSort(this._adapter.getTableElement(),this._select?this._sortedColumnIndex+1:this._sortedColumnIndex),this._sortedColumnIndex=t,this._adapter.setSortedColumn(this._adapter.getTableElement(),e,this._sortDirection))}}_onMultiSort(e,t){let l=this._select?e-1:e,i=l>=0?this._visibleColumnConfigurations[l]:null;if(!i||!i.sortable)return;let n=this._multiSortManager.sortedColumns,s=this._multiSortManager.getSortColumn(l);s?this._multiSortManager.updateSortColumn(s):t?this._multiSortManager.addSortColumn({direction:"DESC",columnIndex:l,propertyName:i.property}):(this._multiSortManager.clearMultiSort(),this._multiSortManager.addSortColumn({direction:"DESC",columnIndex:l,propertyName:i.property}));let r=this._multiSortManager.sortedColumns.map(d=>C({},d));if(!this._adapter.emitHostEvent(o.events.SORT,r,!0,!0)){this._multiSortManager.setSortColumns(n);return}let m=this._multiSortManager.sortedColumns.length>1;for(let d=0;d<this._visibleColumnConfigurations.length;d++){let u=this._select?d+1:d;if(!this._multiSortManager.isSortColumn(d))this._adapter.removeColumnSort(this._adapter.getTableElement(),u),a.setMultiSortColumnSortNumber(this._adapter.getTableElement(),m,u,null);else{let T=this._multiSortManager.getSortColumn(d);T&&(this._adapter.setSortedColumn(this._adapter.getTableElement(),u,T.direction),a.setMultiSortColumnSortNumber(this._adapter.getTableElement(),m,u,T.sortOrder||null))}}}_onFilter(e,t){let l={value:e,columnIndex:t};this._adapter.emitHostEvent(o.events.FILTER,l,!0,!1)}_shiftSelectRows(e){let t=[];if(this._previouslyClickedRow){let l=this._previouslyClickedRow.index,i=e.index,n=i>=l?l:i,s=i>=l?i:l;s+=s>n?1:0,n+=n>s?1:0;let r=d=>this.selectRows(d,!1),c=this._tableRows.find(d=>d.selected&&d.data===e.data),m=this._tableRows.find(d=>{var u;return d.data===((u=this._previouslyClickedRow)==null?void 0:u.data)&&!d.selected});(!c||m)&&(r=d=>this.deselectRows(d));for(let d=n;d<s;d++)t.push(d);r(this.data.filter((d,u)=>t.includes(u)))}return t}_isIndeterminate(e){return!e&&this.getSelectedRows().length>0&&this._data.length!==this.getSelectedRows().length}_applyRoomy(){this._adapter.setRoomy(this._adapter.getTableElement(),this._roomy),this._adapter.setHostAttribute(o.attributes.ROOMY,this._roomy.toString())}_refreshTableSort(){if(this._sortedColumnIndex=this._visibleColumnConfigurations.findIndex(e=>e.initialSort),this._sortDirection=this._sortedColumnIndex>=0?this._visibleColumnConfigurations[this._sortedColumnIndex].sortDirection:void 0,this._multiColumnSort){let e=[];this._visibleColumnConfigurations.forEach((t,l)=>{typeof t.initialSort=="object"&&e.push({columnIndex:l,direction:t.initialSort.direction,sortOrder:t.initialSort.sortOrder,propertyName:t.property})}),this._multiSortManager.setSortColumns(e)}}};var E=class extends Q{constructor(){super();oe.define(te),this._foundation=new z(new N(this))}static get observedAttributes(){return[o.attributes.SELECT,o.attributes.MULTISELECT,o.attributes.SELECT_KEY,o.attributes.DENSE,o.attributes.ROOMY,o.attributes.FILTER,o.attributes.FIXED_HEADERS,o.attributes.LAYOUT_TYPE,o.attributes.WRAP_CONTENT,o.attributes.RESIZABLE,o.attributes.MIN_RESIZE_WIDTH,o.attributes.ALLOW_ROW_CLICK,o.attributes.MULTI_COLUMN_SORT,o.attributes.SELECT_CHECKBOX_ALIGNMENT,o.attributes.TOOLTIP_SELECT,o.attributes.TOOLTIP_SELECT_ALL]}initializedCallback(){this._foundation.initialize()}connectedCallback(){this._foundation.connect()}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(t,l,i){switch(t){case o.attributes.SELECT:this.select=h(i);break;case o.attributes.MULTISELECT:this.multiselect=h(i);break;case o.attributes.SELECT_KEY:this.selectKey=i;break;case o.attributes.DENSE:this.dense=h(i);break;case o.attributes.ROOMY:this.roomy=h(i);break;case o.attributes.FILTER:this.filter=h(i);break;case o.attributes.FIXED_HEADERS:this.fixedHeaders=h(i);break;case o.attributes.LAYOUT_TYPE:this.layoutType=i;break;case o.attributes.WRAP_CONTENT:this.wrapContent=h(i);break;case o.attributes.RESIZABLE:this.resizable=h(i);break;case o.attributes.MIN_RESIZE_WIDTH:this.minResizeWidth=V(i);break;case o.attributes.ALLOW_ROW_CLICK:this.allowRowClick=h(i);break;case o.attributes.MULTI_COLUMN_SORT:this.multiColumnSort=h(i);break;case o.attributes.SELECT_CHECKBOX_ALIGNMENT:this.selectCheckboxAlignment=this.getAttribute(o.attributes.SELECT_CHECKBOX_ALIGNMENT)||"center";break;case o.attributes.TOOLTIP_SELECT:this.tooltipSelect=i;break;case o.attributes.TOOLTIP_SELECT_ALL:this.tooltipSelectAll=i;break}}hideColumn(t){this._foundation.hideColumn(t)}showColumn(t){this._foundation.showColumn(t)}isColumnHidden(t){return this._foundation.isColumnHidden(t)}getSelectedRows(){return this._foundation.getSelectedRows()}selectRow(t){this._foundation.selectRows([t],!1)}selectRows(t,l=!1){this._foundation.selectRows(t,!l)}deselectRow(t){this._foundation.deselectRows([t])}deselectRows(t){this._foundation.deselectRows(t)}clearSelections(){this._foundation.clearSelections()}render(){this._foundation.render()}expandRow(t,l){return this._foundation.expandRow(t,l)}collapseRow(t){return this._foundation.collapseRow(t)}isRowExpanded(t){return this._foundation.isRowExpanded(t)}selectRowsByIndex(t,l){typeof t=="number"?this._foundation.selectRowsByIndex([t],l):Array.isArray(t)&&this._foundation.selectRowsByIndex(t,l)}deselectRowsByIndex(t){typeof t=="number"?this._foundation.deselectRowsByIndex([t]):Array.isArray(t)&&this._foundation.deselectRowsByIndex(t)}isRowSelected(t){return this._foundation.isRowSelected(t)}};_([b()],E.prototype,"data",2),_([b()],E.prototype,"columnConfigurations",2),_([b()],E.prototype,"select",2),_([b()],E.prototype,"multiselect",2),_([b()],E.prototype,"selectKey",2),_([b()],E.prototype,"tooltipSelect",2),_([b()],E.prototype,"tooltipSelectAll",2),_([b()],E.prototype,"dense",2),_([b()],E.prototype,"roomy",2),_([b()],E.prototype,"filter",2),_([b()],E.prototype,"fixedHeaders",2),_([b()],E.prototype,"layoutType",2),_([b()],E.prototype,"wrapContent",2),_([b()],E.prototype,"resizable",2),_([b()],E.prototype,"minResizeWidth",2),_([b()],E.prototype,"allowRowClick",2),_([b()],E.prototype,"multiColumnSort",2),_([b()],E.prototype,"rowCreated",2),_([b()],E.prototype,"cellCreated",2),_([b()],E.prototype,"selectAllTemplate",2),_([b()],E.prototype,"selectCheckboxAlignment",2),E=_([J({name:o.elementName,dependencies:[ne,se,ce]})],E);function El(){j(E)}export{o as a,B as b,O as c,Le as d,N as e,P as f,z as g,E as h,El as i};
|
|
7
|
-
//# sourceMappingURL=chunk.45KYMP5J.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
|
-
* License: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import{c as h,d as g}from"./chunk.2DXG2R3M.js";import{a as d}from"./chunk.KTGSZEAG.js";import{a as _,b as f}from"./chunk.QOA2O575.js";import{a as b,l as v}from"./chunk.HOXFK44F.js";import{f as c,g as m}from"./chunk.4LA6HEA7.js";import{k as u}from"./chunk.J2M2MXP2.js";import{f as o}from"./chunk.MCIQXNKY.js";var R=`${f}ripple`,T={SURFACE:"mdc-ripple-surface"},E={TARGET:"target",UNBOUNDED:"unbounded"},e={elementName:R,classes:T,attributes:E};var r=class extends g{handleFocus(){this.foundation.handleFocus()}animate(){this.foundation.animateActivation()}},C=class extends h{};var n=class{constructor(t){this._component=t}_tryFindTarget(){return this._component.parentElement}initialize(t,s){t&&(this._target=(this._component.ownerDocument||document).querySelector(t)),this._target||(this._target=this._tryFindTarget()),this._target&&(this._ripple=new r(this._target),this._ripple.unbounded=s,c(e.classes.SURFACE,this._target))}destroy(){this._ripple&&(this._ripple.destroy(),this._ripple=void 0),this._target&&m(e.classes.SURFACE,this._target),this._target=void 0}activate(){var t;(t=this._ripple)==null||t.activate()}deactivate(){var t;(t=this._ripple)==null||t.deactivate()}};var p=class{constructor(t){this._adapter=t;this._unbounded=!1}initialize(){this._adapter.initialize(this._target,this._unbounded)}disconnect(){this._adapter.destroy()}layout(){this._applyTarget()}activate(){this._adapter.activate()}deactivate(){this._adapter.deactivate()}_applyTarget(){this._adapter.destroy(),this._adapter.initialize(this._target,this._unbounded)}get target(){return this._target}set target(t){this._target!==t&&(this._target=t,this._applyTarget())}get unbounded(){return this._unbounded}set unbounded(t){this._unbounded!==t&&(this._unbounded=t,this._applyTarget())}};var i=class extends v{constructor(){super();this._foundation=new p(new n(this))}static get observedAttributes(){return[e.attributes.TARGET,e.attributes.UNBOUNDED]}connectedCallback(){this._foundation.initialize()}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(s,y,l){switch(s){case e.attributes.TARGET:this.target=l;break;case e.attributes.UNBOUNDED:this.unbounded=u(l);break}}layout(){this._foundation.layout()}activate(){return this._foundation.activate()}deactivate(){return this._foundation.deactivate()}};o([d()],i.prototype,"target",2),o([d()],i.prototype,"unbounded",2),i=o([_({name:e.elementName})],i);function q(){b(i)}export{e as a,r as b,C as c,n as d,p as e,i as f,q as g};
|
|
7
|
-
//# sourceMappingURL=chunk.4CWMNWZU.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/ripple/ripple-constants.ts", "../../src/ripple/forge-ripple.ts", "../../src/ripple/ripple-adapter.ts", "../../src/ripple/ripple-foundation.ts", "../../src/ripple/ripple.ts", "../../src/ripple/index.ts"],
|
|
4
|
-
"sourcesContent": ["import { COMPONENT_NAME_PREFIX } from '../constants';\n\nconst elementName: keyof HTMLElementTagNameMap = `${COMPONENT_NAME_PREFIX}ripple`;\n\nconst classes = {\n SURFACE: 'mdc-ripple-surface'\n};\n\nconst attributes = {\n TARGET: 'target',\n UNBOUNDED: 'unbounded'\n};\n\nexport const RIPPLE_CONSTANTS = {\n elementName,\n classes,\n attributes\n};\n", "import { MDCRipple, type MDCRippleAdapter, MDCRippleFoundation, type MDCRippleCapableSurface } from '@material/ripple';\n\nexport class ForgeRipple extends MDCRipple {\n /** Manually trigger focus activation. */\n public handleFocus(): void {\n this.foundation.handleFocus();\n }\n\n /** Executes the ripple animation. */\n public animate(): void {\n (this.foundation as any).animateActivation(); // MDC does not expose this method, using `any` to access it.\n }\n}\nexport class ForgeRippleFoundation extends MDCRippleFoundation {}\nexport {\n MDCRippleAdapter as ForgeRippleAdapter,\n MDCRippleCapableSurface as ForgeRippleCapableSurface\n};\n", "import { addClass, removeClass } from '@tylertech/forge-core';\n\nimport { IRippleComponent } from './ripple';\nimport { RIPPLE_CONSTANTS } from './ripple-constants';\nimport { ForgeRipple } from './forge-ripple';\n\nexport interface IRippleAdapter {\n initialize(target: string, unbounded: boolean): void;\n destroy(): void;\n activate(): void;\n deactivate(): void;\n}\n\nexport class RippleAdapter implements IRippleAdapter {\n private _target: HTMLElement | undefined;\n private _ripple: ForgeRipple | undefined;\n\n constructor(private _component: IRippleComponent) {}\n\n private _tryFindTarget(): HTMLElement {\n return this._component.parentElement as HTMLElement;\n }\n\n public initialize(target: string, unbounded: boolean): void {\n if (target) {\n this._target = (this._component.ownerDocument || document).querySelector(target) as HTMLElement;\n }\n\n if (!this._target) {\n this._target = this._tryFindTarget();\n }\n\n if (this._target) {\n this._ripple = new ForgeRipple(this._target);\n this._ripple.unbounded = unbounded;\n addClass(RIPPLE_CONSTANTS.classes.SURFACE, this._target);\n }\n }\n\n public destroy(): void {\n if (this._ripple) {\n this._ripple.destroy();\n this._ripple = undefined;\n }\n\n if (this._target) {\n removeClass(RIPPLE_CONSTANTS.classes.SURFACE, this._target);\n }\n \n this._target = undefined;\n }\n\n public activate(): void {\n this._ripple?.activate();\n }\n\n public deactivate(): void {\n this._ripple?.deactivate();\n }\n}\n", "import { ICustomElementFoundation } from '@tylertech/forge-core';\nimport { IRippleAdapter } from './ripple-adapter';\n\nexport interface IRippleFoundation extends ICustomElementFoundation {\n target: string;\n unbounded: boolean;\n layout(): void;\n activate(): void;\n deactivate(): void;\n}\n\nexport class RippleFoundation implements IRippleFoundation {\n private _target: string;\n private _unbounded = false;\n\n constructor(private _adapter: IRippleAdapter) {}\n\n public initialize(): void {\n this._adapter.initialize(this._target, this._unbounded);\n }\n\n public disconnect(): void {\n this._adapter.destroy();\n }\n\n public layout(): void {\n this._applyTarget();\n }\n\n public activate(): void {\n this._adapter.activate();\n }\n\n public deactivate(): void {\n this._adapter.deactivate();\n }\n\n private _applyTarget(): void {\n this._adapter.destroy();\n this._adapter.initialize(this._target, this._unbounded);\n }\n\n public get target(): string {\n return this._target;\n }\n public set target(value: string) {\n if (this._target !== value) {\n this._target = value;\n this._applyTarget();\n }\n }\n\n public get unbounded(): boolean {\n return this._unbounded;\n }\n public set unbounded(value: boolean) {\n if (this._unbounded !== value) {\n this._unbounded = value;\n this._applyTarget();\n }\n }\n}\n", "import { coerceBoolean, CustomElement, FoundationProperty } from '@tylertech/forge-core';\nimport { BaseComponent, IBaseComponent } from '../core/base/base-component';\nimport { RippleAdapter } from './ripple-adapter';\nimport { RIPPLE_CONSTANTS } from './ripple-constants';\nimport { RippleFoundation } from './ripple-foundation';\n\nexport interface IRippleComponent extends IBaseComponent {\n target: string;\n unbounded: boolean;\n layout(): void;\n activate(): void;\n deactivate(): void;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'forge-ripple': IRippleComponent;\n }\n}\n\n/**\n * The web component class behind the `<forge-ripple>` custom element.\n * \n * @tag forge-ripple\n */\n@CustomElement({\n name: RIPPLE_CONSTANTS.elementName\n})\nexport class RippleComponent extends BaseComponent implements IRippleComponent {\n public static get observedAttributes(): string[] {\n return [\n RIPPLE_CONSTANTS.attributes.TARGET,\n RIPPLE_CONSTANTS.attributes.UNBOUNDED\n ];\n }\n\n private _foundation: RippleFoundation;\n\n constructor() {\n super();\n this._foundation = new RippleFoundation(new RippleAdapter(this));\n }\n\n public connectedCallback(): void {\n this._foundation.initialize();\n }\n\n public disconnectedCallback(): void {\n this._foundation.disconnect();\n }\n\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\n switch (name) {\n case RIPPLE_CONSTANTS.attributes.TARGET:\n this.target = newValue;\n break;\n case RIPPLE_CONSTANTS.attributes.UNBOUNDED:\n this.unbounded = coerceBoolean(newValue);\n break;\n }\n }\n\n public layout(): void {\n this._foundation.layout();\n }\n\n public activate(): void {\n return this._foundation.activate();\n }\n\n public deactivate(): void {\n return this._foundation.deactivate();\n }\n\n @FoundationProperty()\n public declare target: string;\n\n @FoundationProperty()\n public declare unbounded: boolean;\n}\n", "import { defineCustomElement } from '@tylertech/forge-core';\n\nimport { RippleComponent } from './ripple';\n\nexport * from './ripple-adapter';\nexport * from './ripple-constants';\nexport * from './ripple-foundation';\nexport * from './ripple';\nexport * from './forge-ripple';\n\nexport function defineRippleComponent(): void {\n defineCustomElement(RippleComponent);\n}\n"],
|
|
5
|
-
"mappings": "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",
|
|
6
|
-
"names": ["elementName", "COMPONENT_NAME_PREFIX", "classes", "attributes", "RIPPLE_CONSTANTS", "ForgeRipple", "MDCRipple", "ForgeRippleFoundation", "MDCRippleFoundation", "RippleAdapter", "_component", "target", "unbounded", "ForgeRipple", "addClass", "RIPPLE_CONSTANTS", "removeClass", "_a", "RippleFoundation", "_adapter", "value", "RippleComponent", "BaseComponent", "RippleFoundation", "RippleAdapter", "RIPPLE_CONSTANTS", "name", "oldValue", "newValue", "coerceBoolean", "__decorateClass", "FoundationProperty", "CustomElement", "defineRippleComponent", "defineCustomElement", "RippleComponent"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
|
-
* License: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import{i}from"./chunk.HOXFK44F.js";import{u as o}from"./chunk.4LA6HEA7.js";var r=class{constructor(e){this._component=e}getHostAttribute(e){return this._component.getAttribute(e)}setHostAttribute(e,t=""){this._component.setAttribute(e,t)}removeHostAttribute(e){this._component.removeAttribute(e)}toggleHostAttribute(e,t,n){o(this._component,t,e,n)}emitHostEvent(e,t=null,n=!0,s){return i(this._component,e,t,n,s)}addHostListener(e,t,n){this._component.addEventListener(e,t,n)}removeHostListener(e,t){this._component.removeEventListener(e,t)}addWindowListener(e,t,n){window.addEventListener(e,t,n)}removeWindowListener(e,t,n){window.removeEventListener(e,t,n)}addDocumentListener(e,t,n){document.addEventListener(e,t,n)}removeDocumentListener(e,t,n){document.removeEventListener(e,t,n)}getScreenWidth(){return window.innerWidth}setBodyAttribute(e,t){document.body.setAttribute(e,t)}removeBodyAttribute(e){document.body.removeAttribute(e)}get isConnected(){return this._component.isConnected}};export{r as a};
|
|
7
|
-
//# sourceMappingURL=chunk.5KC43VFL.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/core/base/base-adapter.ts"],
|
|
4
|
-
"sourcesContent": ["import { emitEvent, toggleAttribute } from '@tylertech/forge-core';\nimport { IBaseComponent } from './base-component';\n\nexport interface IBaseAdapter {\n readonly isConnected: boolean;\n removeHostAttribute(name: string): void;\n getHostAttribute(name: string): string | null;\n setHostAttribute(name: string, value?: string): void;\n toggleHostAttribute(name: string, hasAttribute: boolean, value?: string): void;\n emitHostEvent(type: string, data?: any, bubble?: boolean, cancelable?: boolean): boolean;\n addHostListener(event: string, callback: (event: Event) => void, options?: boolean | AddEventListenerOptions): void;\n removeHostListener(event: string, callback: (event: Event) => void): void;\n addWindowListener(event: string, callback: (event: Event) => void, options?: boolean | AddEventListenerOptions): void;\n removeWindowListener(event: string, callback: (event: Event) => void, options?: boolean | EventListenerOptions): void;\n addDocumentListener(event: string, callback: (event: Event) => void, options?: boolean | AddEventListenerOptions): void;\n removeDocumentListener(event: string, callback: (event: Event) => void, options?: boolean | EventListenerOptions): void;\n getScreenWidth(): number;\n setBodyAttribute(name: string, value: string): void;\n removeBodyAttribute(name: string): void;\n}\n\nexport class BaseAdapter<T extends IBaseComponent> implements IBaseAdapter {\n constructor(protected _component: T) {}\n\n public getHostAttribute(name: string): string | null {\n return this._component.getAttribute(name);\n }\n\n public setHostAttribute(name: string, value = ''): void {\n this._component.setAttribute(name, value);\n }\n\n public removeHostAttribute(name: string): void {\n this._component.removeAttribute(name);\n }\n\n public toggleHostAttribute(name: string, hasAttribute: boolean, value?: string): void {\n toggleAttribute(this._component, hasAttribute, name, value);\n }\n\n public emitHostEvent(type: string, data: any = null, bubble = true, cancelable?: boolean): boolean {\n return emitEvent(this._component, type, data, bubble, cancelable);\n }\n\n public addHostListener(event: string, callback: (event: Event) => void, options?: boolean | AddEventListenerOptions): void {\n this._component.addEventListener(event, callback, options);\n }\n\n public removeHostListener(event: string, callback: (event: Event) => void): void {\n this._component.removeEventListener(event, callback);\n }\n\n public addWindowListener(event: string, callback: (event: Event) => void, options?: boolean | AddEventListenerOptions): void {\n window.addEventListener(event, callback, options);\n }\n\n public removeWindowListener(event: string, callback: (event: Event) => void, options?: boolean | EventListenerOptions): void {\n window.removeEventListener(event, callback, options);\n }\n\n public addDocumentListener(event: string, callback: (event: Event) => void, options?: boolean | AddEventListenerOptions): void {\n document.addEventListener(event, callback, options);\n }\n\n public removeDocumentListener(event: string, callback: (event: Event) => void, options?: boolean | EventListenerOptions): void {\n document.removeEventListener(event, callback, options);\n }\n\n public getScreenWidth(): number {\n return window.innerWidth;\n }\n\n public setBodyAttribute(name: string, value: string): void {\n document.body.setAttribute(name, value);\n }\n\n public removeBodyAttribute(name: string): void {\n document.body.removeAttribute(name);\n }\n\n public get isConnected(): boolean {\n return this._component.isConnected;\n }\n}\n"],
|
|
5
|
-
"mappings": "2EAqBO,IAAMA,EAAN,KAAoE,CACzE,YAAsBC,EAAe,CAAf,gBAAAA,CAAgB,CAE/B,iBAAiBC,EAA6B,CACnD,OAAO,KAAK,WAAW,aAAaA,CAAI,CAC1C,CAEO,iBAAiBA,EAAcC,EAAQ,GAAU,CACtD,KAAK,WAAW,aAAaD,EAAMC,CAAK,CAC1C,CAEO,oBAAoBD,EAAoB,CAC7C,KAAK,WAAW,gBAAgBA,CAAI,CACtC,CAEO,oBAAoBA,EAAcE,EAAuBD,EAAsB,CACpFE,EAAgB,KAAK,WAAYD,EAAcF,EAAMC,CAAK,CAC5D,CAEO,cAAcG,EAAcC,EAAY,KAAMC,EAAS,GAAMC,EAA+B,CACjG,OAAOC,EAAU,KAAK,WAAYJ,EAAMC,EAAMC,EAAQC,CAAU,CAClE,CAEO,gBAAgBE,EAAeC,EAAkCC,EAAmD,CACzH,KAAK,WAAW,iBAAiBF,EAAOC,EAAUC,CAAO,CAC3D,CAEO,mBAAmBF,EAAeC,EAAwC,CAC/E,KAAK,WAAW,oBAAoBD,EAAOC,CAAQ,CACrD,CAEO,kBAAkBD,EAAeC,EAAkCC,EAAmD,CAC3H,OAAO,iBAAiBF,EAAOC,EAAUC,CAAO,CAClD,CAEO,qBAAqBF,EAAeC,EAAkCC,EAAgD,CAC3H,OAAO,oBAAoBF,EAAOC,EAAUC,CAAO,CACrD,CAEO,oBAAoBF,EAAeC,EAAkCC,EAAmD,CAC7H,SAAS,iBAAiBF,EAAOC,EAAUC,CAAO,CACpD,CAEO,uBAAuBF,EAAeC,EAAkCC,EAAgD,CAC7H,SAAS,oBAAoBF,EAAOC,EAAUC,CAAO,CACvD,CAEO,gBAAyB,CAC9B,OAAO,OAAO,UAChB,CAEO,iBAAiBX,EAAcC,EAAqB,CACzD,SAAS,KAAK,aAAaD,EAAMC,CAAK,CACxC,CAEO,oBAAoBD,EAAoB,CAC7C,SAAS,KAAK,gBAAgBA,CAAI,CACpC,CAEA,IAAW,aAAuB,CAChC,OAAO,KAAK,WAAW,WACzB,CACF",
|
|
6
|
-
"names": ["BaseAdapter", "_component", "name", "value", "hasAttribute", "toggleAttribute", "type", "data", "bubble", "cancelable", "emitEvent", "event", "callback", "options"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
|
-
* License: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import{a as y}from"./chunk.4DAIIJ37.js";import{b as u,c as O,f as S}from"./chunk.4CWMNWZU.js";import{b as B}from"./chunk.Y66GSZJB.js";import{a as A}from"./chunk.5KC43VFL.js";import{a as L}from"./chunk.KTGSZEAG.js";import{a as k,b as I}from"./chunk.QOA2O575.js";import{a as E,e as w,g as c}from"./chunk.HOXFK44F.js";import{f as v,g as h,t as _}from"./chunk.4LA6HEA7.js";import{k as g}from"./chunk.J2M2MXP2.js";import{a as b,b as m,f as l}from"./chunk.MCIQXNKY.js";var C=`${I}button-area`,x={DISABLED:"disabled",IGNORE:"data-forge-ignore",IGNORE_ALT:"forge-ignore"},T={ROOT:"root",BUTTON_SLOT:"button"},D={DISABLED:"forge-button-area--disabled"},z={ROOT:`#${T.ROOT}`,BUTTON_SLOT:"slot[name=button]"},o={elementName:C,attributes:x,ids:T,classes:D,selectors:z};var p=class extends A{constructor(e){super(e);this._rootElement=c(e,o.selectors.ROOT),this._buttonSlotElement=c(e,o.selectors.BUTTON_SLOT)}get root(){return this._rootElement}get unbounded(){return!1}get disabled(){return this.buttonIsDisabled()}setDisabled(e){var a;_(this._rootElement,e,o.classes.DISABLED),(a=this._buttonElement)==null||a.toggleAttribute(o.attributes.DISABLED,e)}addListener(e,a){this._rootElement.addEventListener(e,a)}removeListener(e,a){this._rootElement.removeEventListener(e,a)}addSlotChangeListener(e){this._buttonSlotElement.addEventListener("slotchange",e)}removeSlotChangeListener(e){this._buttonSlotElement.removeEventListener("slotchange",e)}startButtonObserver(e){this._buttonElement&&(this._buttonObserver=new MutationObserver(e),this._buttonObserver.observe(this._buttonElement,{attributeFilter:[o.attributes.DISABLED]}))}stopButtonObserver(){this._buttonObserver&&(this._buttonObserver.disconnect(),this._buttonObserver=void 0)}detectSlottedButton(){this._buttonElement=this._buttonSlotElement.assignedElements()[0]}buttonIsDisabled(){var e,a;return(a=(e=this._buttonElement)==null?void 0:e.disabled)!=null?a:!0}requestDisabledButtonFrame(){this._buttonElement&&(this._buttonElement.disabled=!0,requestAnimationFrame(()=>this._buttonElement.disabled=!1))}async createRipple(){if(this._rippleInstance)this._rippleInstance.destroy(),this._rippleInstance=void 0;else{let e=await this._userInteractionListener();if(!this._rippleInstance){let a=m(b({},u.createAdapter(this)),{isSurfaceActive:()=>{var t,i;return this._rootElement.matches(":active")||((i=(t=this._buttonElement)==null?void 0:t.matches(":active"))!=null?i:!1)},isSurfaceDisabled:()=>{var t;return(t=this.disabled)!=null?t:!0},isUnbounded:()=>!!this.unbounded,registerInteractionHandler:(t,i)=>{var d;this._isRootEvent(t)?this._rootElement.addEventListener(t,i,{passive:!0}):(d=this._buttonElement)==null||d.addEventListener(t,i,{passive:!0})},deregisterInteractionHandler:(t,i)=>{var d;this._isRootEvent(t)?this._rootElement.removeEventListener(t,i,{passive:!0}):(d=this._buttonElement)==null||d.removeEventListener(t,i,{passive:!0})},addClass:t=>v(t,this._rootElement),removeClass:t=>h(t,this._rootElement),updateCssVariable:(t,i)=>this._rootElement.style.setProperty(t,i)});this._rippleInstance=new u(this._rootElement,new O(a)),e==="focusin"&&this._rippleInstance.handleFocus()}}}_userInteractionListener(){return B(this._rootElement)}_isRootEvent(e){return["touchstart","pointerdown","mousedown"].includes(e)}};var s=class{constructor(r){this._adapter=r;this._disabled=!1;this._clickListener=e=>this._handleClick(e),this._keydownListener=e=>this._handleKeydown(e),this._pointerdownListener=e=>this._handlePointerdown(e),this._slotListener=()=>this._handleSlotChange()}initialize(){this._adapter.addListener("click",this._clickListener),this._adapter.addListener("keydown",this._keydownListener),this._adapter.addListener("pointerdown",this._pointerdownListener),this._adapter.addSlotChangeListener(this._slotListener),this._adapter.createRipple()}disconnect(){this._adapter.removeListener("click",this._clickListener),this._adapter.removeSlotChangeListener(this._slotListener),this._adapter.stopButtonObserver()}_handleClick(r){var a;this._disabled&&r.stopPropagation(),((a=window.getSelection())==null?void 0:a.type)==="Range"&&r.stopPropagation(),this._shouldIgnoreEvent(r)&&r.stopPropagation()}_handleKeydown(r){r.key!==" "&&r.key!=="Enter"||this._shouldIgnoreEvent(r)&&r.stopPropagation()}_handlePointerdown(r){this._disabled||this._shouldIgnoreEvent(r)&&this._adapter.requestDisabledButtonFrame()}_handleSlotChange(){this._adapter.stopButtonObserver(),this._adapter.detectSlottedButton(),this._adapter.startButtonObserver(()=>this._handleButtonDisabled()),this._adapter.buttonIsDisabled()?this.disabled=!0:this._disabled&&this._adapter.setDisabled(!0)}_handleButtonDisabled(){this.disabled=this._adapter.buttonIsDisabled()}_shouldIgnoreEvent(r){return y(r).some(a=>a.nodeType===1&&(a.hasAttribute(o.attributes.IGNORE)||a.hasAttribute(o.attributes.IGNORE_ALT)))}get disabled(){return this._disabled}set disabled(r){this._disabled!==r&&(this._disabled=r,this._adapter.setDisabled(this._disabled),this._adapter.toggleHostAttribute(o.attributes.DISABLED,this._disabled))}};var R='<template><div class="forge-button-area" id="root" part="root"><div class="forge-button-area__button" id="button" part="button"><slot name="button"></slot></div><slot></slot></div></template>',N='@-webkit-keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@-webkit-keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@-webkit-keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}@keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-ripple-surface{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity;position:relative;outline:0;overflow:hidden}.mdc-ripple-surface::after,.mdc-ripple-surface::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-ripple-surface::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.mdc-ripple-surface::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.mdc-ripple-surface.mdc-ripple-upgraded::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface.mdc-ripple-upgraded::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-activation::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-deactivation::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface::after,.mdc-ripple-surface::before{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-ripple-surface.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded],.mdc-ripple-upgraded--unbounded{overflow:visible}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::before,.mdc-ripple-upgraded--unbounded::after,.mdc-ripple-upgraded--unbounded::before{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::before,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::before{top:var(--mdc-ripple-top,calc(50% - 50%));left:var(--mdc-ripple-left,calc(50% - 50%));width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface::after,.mdc-ripple-surface::before{background-color:#000;background-color:var(--mdc-ripple-color,#000)}.mdc-ripple-surface.mdc-ripple-surface--hover::before,.mdc-ripple-surface:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.mdc-ripple-surface:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface::after,.mdc-ripple-surface::before{--mdc-ripple-color:var(--mdc-theme-on-surface)}.forge-button-area{overflow:hidden}.forge-button-area:not(.forge-button-area--disabled).forge-button-area{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity;cursor:pointer}.forge-button-area:not(.forge-button-area--disabled).forge-button-area::after,.forge-button-area:not(.forge-button-area--disabled).forge-button-area::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.forge-button-area:not(.forge-button-area--disabled).forge-button-area::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.forge-button-area:not(.forge-button-area--disabled).forge-button-area::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.forge-button-area:not(.forge-button-area--disabled).forge-button-area.mdc-ripple-upgraded::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.forge-button-area:not(.forge-button-area--disabled).forge-button-area.mdc-ripple-upgraded::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.forge-button-area:not(.forge-button-area--disabled).forge-button-area.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.forge-button-area:not(.forge-button-area--disabled).forge-button-area.mdc-ripple-upgraded--foreground-activation::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.forge-button-area:not(.forge-button-area--disabled).forge-button-area.mdc-ripple-upgraded--foreground-deactivation::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.forge-button-area:not(.forge-button-area--disabled).forge-button-area::after,.forge-button-area:not(.forge-button-area--disabled).forge-button-area::before{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.forge-button-area:not(.forge-button-area--disabled).forge-button-area.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.forge-button-area:not(.forge-button-area--disabled).forge-button-area::after,.forge-button-area:not(.forge-button-area--disabled).forge-button-area::before{background-color:#6200ee;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#6200ee))}.forge-button-area:not(.forge-button-area--disabled).forge-button-area.mdc-ripple-surface--hover::before,.forge-button-area:not(.forge-button-area--disabled).forge-button-area:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.forge-button-area:not(.forge-button-area--disabled).forge-button-area.mdc-ripple-upgraded--background-focused::before,.forge-button-area:not(.forge-button-area--disabled).forge-button-area:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.forge-button-area:not(.forge-button-area--disabled).forge-button-area:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-button-area:not(.forge-button-area--disabled).forge-button-area:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.forge-button-area:not(.forge-button-area--disabled).forge-button-area.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.forge-button-area:not(.forge-button-area--disabled).forge-button-area--activated::before{opacity:.12;opacity:var(--mdc-ripple-activated-opacity, .12)}.forge-button-area:not(.forge-button-area--disabled).forge-button-area--activated::after,.forge-button-area:not(.forge-button-area--disabled).forge-button-area--activated::before{background-color:#6200ee;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#6200ee))}.forge-button-area:not(.forge-button-area--disabled).forge-button-area--activated.mdc-ripple-surface--hover::before,.forge-button-area:not(.forge-button-area--disabled).forge-button-area--activated:hover::before{opacity:.16;opacity:var(--mdc-ripple-hover-opacity, .16)}.forge-button-area:not(.forge-button-area--disabled).forge-button-area--activated.mdc-ripple-upgraded--background-focused::before,.forge-button-area:not(.forge-button-area--disabled).forge-button-area--activated:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.24;opacity:var(--mdc-ripple-focus-opacity, .24)}.forge-button-area:not(.forge-button-area--disabled).forge-button-area--activated:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-button-area:not(.forge-button-area--disabled).forge-button-area--activated:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.24;opacity:var(--mdc-ripple-press-opacity, .24)}.forge-button-area:not(.forge-button-area--disabled).forge-button-area--activated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.forge-button-area:not(.forge-button-area--disabled).forge-button-area--selected::before{opacity:.08;opacity:var(--mdc-ripple-selected-opacity, .08)}.forge-button-area:not(.forge-button-area--disabled).forge-button-area--selected::after,.forge-button-area:not(.forge-button-area--disabled).forge-button-area--selected::before{background-color:#6200ee;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#6200ee))}.forge-button-area:not(.forge-button-area--disabled).forge-button-area--selected.mdc-ripple-surface--hover::before,.forge-button-area:not(.forge-button-area--disabled).forge-button-area--selected:hover::before{opacity:.12;opacity:var(--mdc-ripple-hover-opacity, .12)}.forge-button-area:not(.forge-button-area--disabled).forge-button-area--selected.mdc-ripple-upgraded--background-focused::before,.forge-button-area:not(.forge-button-area--disabled).forge-button-area--selected:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.2;opacity:var(--mdc-ripple-focus-opacity, .2)}.forge-button-area:not(.forge-button-area--disabled).forge-button-area--selected:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-button-area:not(.forge-button-area--disabled).forge-button-area--selected:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.2;opacity:var(--mdc-ripple-press-opacity, .2)}.forge-button-area:not(.forge-button-area--disabled).forge-button-area--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.2)}.forge-button-area__button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;outline:0;-webkit-appearance:none;-moz-appearance:none}:host{display:block}:host([hidden]){display:none}',n=class extends HTMLElement{constructor(){super();w(this,R,N),this._foundation=new s(new p(this))}static get observedAttributes(){return[o.attributes.DISABLED]}connectedCallback(){this._foundation.initialize()}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(e,a,t){switch(e){case o.attributes.DISABLED:this.disabled=g(t);break}}};l([L()],n.prototype,"disabled",2),n=l([k({name:o.elementName,dependencies:[S]})],n);function ne(){E(n)}export{o as a,p as b,s as c,n as d,ne as e};
|
|
7
|
-
//# sourceMappingURL=chunk.AHDIUCUB.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/button-area/button-area-constants.ts", "../../src/button-area/button-area-adapter.ts", "../../src/button-area/button-area-foundation.ts", "../../src/button-area/button-area.ts", "../../src/button-area/index.ts"],
|
|
4
|
-
"sourcesContent": ["import { COMPONENT_NAME_PREFIX } from '../constants';\n\nconst elementName = `${COMPONENT_NAME_PREFIX}button-area`;\n\nconst attributes = {\n DISABLED: 'disabled',\n IGNORE: 'data-forge-ignore',\n IGNORE_ALT: 'forge-ignore'\n};\n\nconst ids = {\n ROOT: 'root',\n BUTTON_SLOT: 'button'\n};\n\nconst classes = {\n DISABLED: `forge-button-area--disabled`\n};\n\nconst selectors = {\n ROOT: `#${ids.ROOT}`,\n BUTTON_SLOT: `slot[name=button]`\n};\n\nexport const BUTTON_AREA_CONSTANTS = {\n elementName,\n attributes,\n ids,\n classes,\n selectors\n};\n", "import { addClass, getShadowElement, removeClass, toggleClass } from '@tylertech/forge-core';\n\nimport { BaseAdapter, IBaseAdapter, userInteractionListener } from '../core';\nimport { ForgeRipple, ForgeRippleAdapter, ForgeRippleCapableSurface, ForgeRippleFoundation } from '../ripple';\nimport { IButtonAreaComponent } from './button-area';\nimport { BUTTON_AREA_CONSTANTS } from './button-area-constants';\n\nexport interface IButtonAreaAdapter extends IBaseAdapter {\n setDisabled(value: boolean): void;\n addListener(type: string, listener: (event: Event) => void): void;\n removeListener(type: string, listener: (event: Event) => void): void;\n addSlotChangeListener(listener: () => void): void;\n removeSlotChangeListener(listener: () => void): void;\n startButtonObserver(callback: MutationCallback): void;\n stopButtonObserver(): void;\n detectSlottedButton(): void;\n buttonIsDisabled(): boolean;\n requestDisabledButtonFrame(): void;\n createRipple(): Promise<void>;\n}\n\nexport class ButtonAreaAdapter extends BaseAdapter<IButtonAreaComponent> implements IButtonAreaAdapter, ForgeRippleCapableSurface {\n private _rootElement: HTMLElement;\n private _buttonSlotElement: HTMLSlotElement;\n private _buttonElement?: HTMLButtonElement;\n private _rippleInstance?: ForgeRipple;\n private _buttonObserver?: MutationObserver;\n\n constructor(component: IButtonAreaComponent) {\n super(component);\n this._rootElement = getShadowElement(component, BUTTON_AREA_CONSTANTS.selectors.ROOT);\n this._buttonSlotElement = getShadowElement(component, BUTTON_AREA_CONSTANTS.selectors.BUTTON_SLOT) as HTMLSlotElement;\n }\n\n public get root(): HTMLElement {\n return this._rootElement;\n }\n\n public get unbounded(): boolean | undefined {\n return false;\n }\n\n public get disabled(): boolean | undefined {\n return this.buttonIsDisabled();\n }\n\n public setDisabled(value: boolean): void {\n toggleClass(this._rootElement, value, BUTTON_AREA_CONSTANTS.classes.DISABLED);\n this._buttonElement?.toggleAttribute(BUTTON_AREA_CONSTANTS.attributes.DISABLED, value);\n }\n\n public addListener(type: string, listener: (event: Event) => void): void {\n this._rootElement.addEventListener(type, listener);\n }\n\n public removeListener(type: string, listener: (event: Event) => void): void {\n this._rootElement.removeEventListener(type, listener);\n }\n\n public addSlotChangeListener(listener: () => void): void {\n this._buttonSlotElement.addEventListener('slotchange', listener);\n }\n\n public removeSlotChangeListener(listener: () => void): void {\n this._buttonSlotElement.removeEventListener('slotchange', listener);\n }\n\n public startButtonObserver(callback: MutationCallback): void {\n if (this._buttonElement) {\n this._buttonObserver = new MutationObserver(callback);\n this._buttonObserver.observe(this._buttonElement, { attributeFilter: [BUTTON_AREA_CONSTANTS.attributes.DISABLED] });\n }\n }\n\n public stopButtonObserver(): void {\n if (this._buttonObserver) {\n this._buttonObserver.disconnect();\n this._buttonObserver = undefined;\n }\n }\n\n public detectSlottedButton(): void {\n this._buttonElement = this._buttonSlotElement.assignedElements()[0] as HTMLButtonElement | undefined;\n }\n\n public buttonIsDisabled(): boolean {\n return this._buttonElement?.disabled ?? true;\n }\n\n public requestDisabledButtonFrame(): void {\n if (this._buttonElement) {\n this._buttonElement.disabled = true;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n requestAnimationFrame(() => this._buttonElement!.disabled = false);\n }\n }\n\n public async createRipple(): Promise<void> {\n if (!this._rippleInstance) {\n const type = await this._userInteractionListener();\n if (!this._rippleInstance) {\n const adapter: ForgeRippleAdapter = {\n ...ForgeRipple.createAdapter(this),\n isSurfaceActive: () => this._rootElement.matches(':active') || (this._buttonElement?.matches(':active') ?? false),\n isSurfaceDisabled: () => this.disabled ?? true,\n isUnbounded: () => !!this.unbounded,\n registerInteractionHandler: (evtType, handler) => {\n if (this._isRootEvent(evtType)) {\n this._rootElement.addEventListener(evtType, handler, { passive: true });\n } else {\n this._buttonElement?.addEventListener(evtType, handler, { passive: true});\n }\n },\n deregisterInteractionHandler: (evtType, handler) => {\n if (this._isRootEvent(evtType)) {\n this._rootElement.removeEventListener(evtType, handler, { passive: true } as AddEventListenerOptions);\n } else {\n this._buttonElement?.removeEventListener(evtType, handler, { passive: true } as AddEventListenerOptions);\n }\n },\n addClass: (className) => addClass(className, this._rootElement),\n removeClass: (className) => removeClass(className, this._rootElement),\n updateCssVariable: (varName, value) => this._rootElement.style.setProperty(varName, value)\n };\n this._rippleInstance = new ForgeRipple(this._rootElement, new ForgeRippleFoundation(adapter));\n if (type === 'focusin') {\n this._rippleInstance.handleFocus();\n }\n }\n } else {\n this._rippleInstance.destroy();\n this._rippleInstance = undefined;\n }\n }\n\n private _userInteractionListener(): ReturnType<typeof userInteractionListener> {\n return userInteractionListener(this._rootElement);\n }\n\n private _isRootEvent(evtType: string): boolean {\n return ['touchstart', 'pointerdown', 'mousedown'].includes(evtType);\n }\n}\n", "import { ICustomElementFoundation, getEventPath } from '@tylertech/forge-core';\n\nimport { IButtonAreaAdapter } from './button-area-adapter';\nimport { BUTTON_AREA_CONSTANTS } from './button-area-constants';\n\nexport interface IButtonAreaFoundation extends ICustomElementFoundation {\n disabled: boolean;\n}\n\nexport class ButtonAreaFoundation implements IButtonAreaFoundation {\n private _disabled = false;\n private _clickListener: (event: Event) => void;\n private _keydownListener: (event: KeyboardEvent) => void;\n private _pointerdownListener: (event: Event) => void;\n private _slotListener: () => void;\n\n constructor(private _adapter: IButtonAreaAdapter) {\n this._clickListener = event => this._handleClick(event);\n this._keydownListener = event => this._handleKeydown(event);\n this._pointerdownListener = event => this._handlePointerdown(event);\n this._slotListener = () => this._handleSlotChange();\n }\n\n public initialize(): void {\n this._adapter.addListener('click', this._clickListener);\n this._adapter.addListener('keydown', this._keydownListener);\n this._adapter.addListener('pointerdown', this._pointerdownListener);\n this._adapter.addSlotChangeListener(this._slotListener);\n this._adapter.createRipple();\n }\n\n public disconnect(): void {\n this._adapter.removeListener('click', this._clickListener);\n this._adapter.removeSlotChangeListener(this._slotListener);\n this._adapter.stopButtonObserver();\n }\n\n private _handleClick(event: Event): void {\n // Prevent the click if disabled\n if (this._disabled) {\n event.stopPropagation();\n }\n\n // Prevent the click if a selection was made\n const selectionType = window.getSelection()?.type;\n if (selectionType === 'Range') {\n event.stopPropagation();\n }\n\n // Prevent the click if it originates from an ignored element\n if (this._shouldIgnoreEvent(event)) {\n event.stopPropagation();\n }\n }\n\n private _handleKeydown(event: KeyboardEvent): void {\n if (event.key !== ' ' && event.key !== 'Enter') {\n return;\n }\n\n // Prevent the keydown if it originates from an ignored element\n if (this._shouldIgnoreEvent(event)) {\n event.stopPropagation();\n }\n }\n\n private _handlePointerdown(event: Event): void {\n if (this._disabled) {\n return;\n }\n\n // Prevent the ripple animation when ignored children are clicked\n if (this._shouldIgnoreEvent(event)) {\n this._adapter.requestDisabledButtonFrame();\n }\n }\n\n private _handleSlotChange(): void {\n // Clear old button-connected listeners\n this._adapter.stopButtonObserver();\n\n this._adapter.detectSlottedButton();\n this._adapter.startButtonObserver(() => this._handleButtonDisabled());\n\n // Match the component and button states if either is disabled\n if (this._adapter.buttonIsDisabled()) {\n this.disabled = true;\n } else if (this._disabled) {\n this._adapter.setDisabled(true);\n }\n }\n\n private _handleButtonDisabled(): void {\n this.disabled = this._adapter.buttonIsDisabled();\n }\n\n private _shouldIgnoreEvent(event: Event): boolean {\n const eventPath = getEventPath(event);\n return eventPath.some(el => el.nodeType === 1 && (el.hasAttribute(BUTTON_AREA_CONSTANTS.attributes.IGNORE) || el.hasAttribute(BUTTON_AREA_CONSTANTS.attributes.IGNORE_ALT)));\n }\n\n public get disabled(): boolean {\n return this._disabled;\n }\n public set disabled(value: boolean) {\n if (this._disabled !== value) {\n this._disabled = value;\n this._adapter.setDisabled(this._disabled);\n this._adapter.toggleHostAttribute(BUTTON_AREA_CONSTANTS.attributes.DISABLED, this._disabled);\n }\n }\n}\n", "import { CustomElement, attachShadowTemplate, ICustomElement, FoundationProperty, coerceBoolean } from '@tylertech/forge-core';\nimport { ButtonAreaAdapter } from './button-area-adapter';\nimport { ButtonAreaFoundation } from './button-area-foundation';\nimport { BUTTON_AREA_CONSTANTS } from './button-area-constants';\nimport { RippleComponent } from '../ripple';\n\nconst template = '<template><div class=\\\"forge-button-area\\\" id=\\\"root\\\" part=\\\"root\\\"><div class=\\\"forge-button-area__button\\\" id=\\\"button\\\" part=\\\"button\\\"><slot name=\\\"button\\\"></slot></div><slot></slot></div></template>';\nconst styles = '@-webkit-keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@-webkit-keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@-webkit-keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}@keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-ripple-surface{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity;position:relative;outline:0;overflow:hidden}.mdc-ripple-surface::after,.mdc-ripple-surface::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:\\\"\\\"}.mdc-ripple-surface::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.mdc-ripple-surface::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.mdc-ripple-surface.mdc-ripple-upgraded::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface.mdc-ripple-upgraded::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-activation::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-deactivation::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface::after,.mdc-ripple-surface::before{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-ripple-surface.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded],.mdc-ripple-upgraded--unbounded{overflow:visible}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::before,.mdc-ripple-upgraded--unbounded::after,.mdc-ripple-upgraded--unbounded::before{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::before,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::before{top:var(--mdc-ripple-top,calc(50% - 50%));left:var(--mdc-ripple-left,calc(50% - 50%));width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface::after,.mdc-ripple-surface::before{background-color:#000;background-color:var(--mdc-ripple-color,#000)}.mdc-ripple-surface.mdc-ripple-surface--hover::before,.mdc-ripple-surface:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.mdc-ripple-surface:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface::after,.mdc-ripple-surface::before{--mdc-ripple-color:var(--mdc-theme-on-surface)}.forge-button-area{overflow:hidden}.forge-button-area:not(.forge-button-area--disabled).forge-button-area{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity;cursor:pointer}.forge-button-area:not(.forge-button-area--disabled).forge-button-area::after,.forge-button-area:not(.forge-button-area--disabled).forge-button-area::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:\\\"\\\"}.forge-button-area:not(.forge-button-area--disabled).forge-button-area::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.forge-button-area:not(.forge-button-area--disabled).forge-button-area::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.forge-button-area:not(.forge-button-area--disabled).forge-button-area.mdc-ripple-upgraded::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.forge-button-area:not(.forge-button-area--disabled).forge-button-area.mdc-ripple-upgraded::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.forge-button-area:not(.forge-button-area--disabled).forge-button-area.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.forge-button-area:not(.forge-button-area--disabled).forge-button-area.mdc-ripple-upgraded--foreground-activation::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.forge-button-area:not(.forge-button-area--disabled).forge-button-area.mdc-ripple-upgraded--foreground-deactivation::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.forge-button-area:not(.forge-button-area--disabled).forge-button-area::after,.forge-button-area:not(.forge-button-area--disabled).forge-button-area::before{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.forge-button-area:not(.forge-button-area--disabled).forge-button-area.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.forge-button-area:not(.forge-button-area--disabled).forge-button-area::after,.forge-button-area:not(.forge-button-area--disabled).forge-button-area::before{background-color:#6200ee;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#6200ee))}.forge-button-area:not(.forge-button-area--disabled).forge-button-area.mdc-ripple-surface--hover::before,.forge-button-area:not(.forge-button-area--disabled).forge-button-area:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.forge-button-area:not(.forge-button-area--disabled).forge-button-area.mdc-ripple-upgraded--background-focused::before,.forge-button-area:not(.forge-button-area--disabled).forge-button-area:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.forge-button-area:not(.forge-button-area--disabled).forge-button-area:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-button-area:not(.forge-button-area--disabled).forge-button-area:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.forge-button-area:not(.forge-button-area--disabled).forge-button-area.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.forge-button-area:not(.forge-button-area--disabled).forge-button-area--activated::before{opacity:.12;opacity:var(--mdc-ripple-activated-opacity, .12)}.forge-button-area:not(.forge-button-area--disabled).forge-button-area--activated::after,.forge-button-area:not(.forge-button-area--disabled).forge-button-area--activated::before{background-color:#6200ee;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#6200ee))}.forge-button-area:not(.forge-button-area--disabled).forge-button-area--activated.mdc-ripple-surface--hover::before,.forge-button-area:not(.forge-button-area--disabled).forge-button-area--activated:hover::before{opacity:.16;opacity:var(--mdc-ripple-hover-opacity, .16)}.forge-button-area:not(.forge-button-area--disabled).forge-button-area--activated.mdc-ripple-upgraded--background-focused::before,.forge-button-area:not(.forge-button-area--disabled).forge-button-area--activated:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.24;opacity:var(--mdc-ripple-focus-opacity, .24)}.forge-button-area:not(.forge-button-area--disabled).forge-button-area--activated:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-button-area:not(.forge-button-area--disabled).forge-button-area--activated:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.24;opacity:var(--mdc-ripple-press-opacity, .24)}.forge-button-area:not(.forge-button-area--disabled).forge-button-area--activated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.forge-button-area:not(.forge-button-area--disabled).forge-button-area--selected::before{opacity:.08;opacity:var(--mdc-ripple-selected-opacity, .08)}.forge-button-area:not(.forge-button-area--disabled).forge-button-area--selected::after,.forge-button-area:not(.forge-button-area--disabled).forge-button-area--selected::before{background-color:#6200ee;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#6200ee))}.forge-button-area:not(.forge-button-area--disabled).forge-button-area--selected.mdc-ripple-surface--hover::before,.forge-button-area:not(.forge-button-area--disabled).forge-button-area--selected:hover::before{opacity:.12;opacity:var(--mdc-ripple-hover-opacity, .12)}.forge-button-area:not(.forge-button-area--disabled).forge-button-area--selected.mdc-ripple-upgraded--background-focused::before,.forge-button-area:not(.forge-button-area--disabled).forge-button-area--selected:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.2;opacity:var(--mdc-ripple-focus-opacity, .2)}.forge-button-area:not(.forge-button-area--disabled).forge-button-area--selected:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-button-area:not(.forge-button-area--disabled).forge-button-area--selected:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.2;opacity:var(--mdc-ripple-press-opacity, .2)}.forge-button-area:not(.forge-button-area--disabled).forge-button-area--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.2)}.forge-button-area__button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;outline:0;-webkit-appearance:none;-moz-appearance:none}:host{display:block}:host([hidden]){display:none}';\n\nexport interface IButtonAreaComponent extends ICustomElement {\n disabled: boolean;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'forge-button-area': IButtonAreaComponent;\n }\n}\n\n/**\n * The custom element class behind the `<forge-button-area>` element.\n * \n * @tag forge-button-area\n */\n@CustomElement({\n name: BUTTON_AREA_CONSTANTS.elementName,\n dependencies: [\n RippleComponent\n ]\n})\nexport class ButtonAreaComponent extends HTMLElement implements IButtonAreaComponent {\n public static get observedAttributes(): string[] {\n return [\n BUTTON_AREA_CONSTANTS.attributes.DISABLED\n ];\n }\n\n private _foundation: ButtonAreaFoundation;\n\n constructor() {\n super();\n attachShadowTemplate(this, template, styles);\n this._foundation = new ButtonAreaFoundation(new ButtonAreaAdapter(this));\n }\n\n public connectedCallback(): void {\n this._foundation.initialize();\n }\n\n public disconnectedCallback(): void {\n this._foundation.disconnect();\n }\n\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\n switch (name) {\n case BUTTON_AREA_CONSTANTS.attributes.DISABLED:\n this.disabled = coerceBoolean(newValue);\n break;\n }\n }\n\n /** Controls whether the component and associated button element are disabled. */\n @FoundationProperty()\n public declare disabled: boolean;\n}\n", "import { defineCustomElement } from '@tylertech/forge-core';\n\nimport { ButtonAreaComponent } from './button-area';\n\nexport * from './button-area-adapter';\nexport * from './button-area-constants';\nexport * from './button-area-foundation';\nexport * from './button-area';\n\nexport function defineButtonAreaComponent(): void {\n defineCustomElement(ButtonAreaComponent);\n}\n"],
|
|
5
|
-
"mappings": "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",
|
|
6
|
-
"names": ["elementName", "COMPONENT_NAME_PREFIX", "attributes", "ids", "classes", "selectors", "BUTTON_AREA_CONSTANTS", "ButtonAreaAdapter", "BaseAdapter", "component", "getShadowElement", "BUTTON_AREA_CONSTANTS", "value", "_a", "toggleClass", "type", "listener", "callback", "_b", "adapter", "__spreadProps", "__spreadValues", "ForgeRipple", "evtType", "handler", "className", "addClass", "removeClass", "varName", "ForgeRippleFoundation", "userInteractionListener", "ButtonAreaFoundation", "_adapter", "event", "_a", "getEventPath", "el", "BUTTON_AREA_CONSTANTS", "value", "template", "styles", "ButtonAreaComponent", "attachShadowTemplate", "ButtonAreaFoundation", "ButtonAreaAdapter", "BUTTON_AREA_CONSTANTS", "name", "oldValue", "newValue", "coerceBoolean", "__decorateClass", "FoundationProperty", "CustomElement", "RippleComponent", "defineButtonAreaComponent", "defineCustomElement", "ButtonAreaComponent"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
|
-
* License: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import{b as h}from"./chunk.4CWMNWZU.js";import{b as E}from"./chunk.Y66GSZJB.js";import{a as _}from"./chunk.BESB4RGK.js";import{a as d,b}from"./chunk.QOA2O575.js";import{a as c,l as m}from"./chunk.HOXFK44F.js";import{l as u,u as p}from"./chunk.4LA6HEA7.js";import{f as l}from"./chunk.MCIQXNKY.js";var B=`${b}button`,a=["button","a"],r={BUTTON:"forge-button",LABEL:"forge-button__label",ICON:"forge-button__icon",BUTTON_RAISED:"forge-button--raised",BUTTON_UNELEVATED:"forge-button--unelevated",BUTTON_OUTLINED:"forge-button--outlined",BUTTON_DENSE:"forge-button--dense",RIPPLE:"forge-button__ripple"},O={BUTTON:a.join(","),LABEL:`span:not(.${r.RIPPLE})`,ICON:"i,forge-icon,[data-forge-button-icon]",RIPPLE:`.${r.RIPPLE}`},g={TYPE:"type",DISABLED:"disabled"},e={elementName:B,classes:r,selectors:O,attributes:g};var s=class extends m{constructor(){super()}static get observedAttributes(){return[e.attributes.TYPE]}connectedCallback(){this.children.length?this._initialize():u(this).then(()=>this._initialize())}attributeChangedCallback(t,n,i){switch(t){case e.attributes.TYPE:this.type=i;break}}disconnectedCallback(){this._rippleInstance&&this._rippleInstance.destroy(),this._mutationObserver&&this._mutationObserver.disconnect(),this._buttonAttrMutationObserver&&this._buttonAttrMutationObserver.disconnect()}get type(){return this._type}set type(t){this._type!==t&&(this._type=t,this._applyType(t),this.setAttribute(e.attributes.TYPE,this._type))}_applyType(t){this._buttonElement&&(this._buttonElement.classList.remove(e.classes.BUTTON_RAISED),this._buttonElement.classList.remove(e.classes.BUTTON_UNELEVATED),this._buttonElement.classList.remove(e.classes.BUTTON_OUTLINED),this._buttonElement.classList.remove(e.classes.BUTTON_DENSE),t.includes("raised")&&this._buttonElement.classList.add(e.classes.BUTTON_RAISED),t.includes("unelevated")&&this._buttonElement.classList.add(e.classes.BUTTON_UNELEVATED),t.includes("outlined")&&this._buttonElement.classList.add(e.classes.BUTTON_OUTLINED),t.includes("dense")&&this._buttonElement.classList.add(e.classes.BUTTON_DENSE))}_initialize(){this._initializeButton(),this._initializeMutationObserver()}_initializeButton(){this._buttonElement=this.querySelector(e.selectors.BUTTON),this._buttonElement&&(this.hasAttribute(e.attributes.TYPE)&&(this._type=this.getAttribute(e.attributes.TYPE),this._applyType(this._type)),this._buttonElement.classList.add(e.classes.BUTTON),this._syncDisabledState(),this._initializeButtonChildren(),this._deferRippleInitialization())}async _deferRippleInitialization(){let t=await E(this._buttonElement);this._rippleInstance||(this._rippleInstance=this._createRipple(),t==="focusin"&&this._rippleInstance.handleFocus())}_createRipple(){return this._rippleInstance&&this._rippleInstance.destroy(),new h(this._buttonElement)}_initializeButtonChildren(){if(!this._buttonElement.querySelector(e.selectors.RIPPLE)){let i=document.createElement("span");i.classList.add(e.classes.RIPPLE),this._buttonElement.appendChild(i)}let t=this.querySelector(e.selectors.LABEL);t&&t.classList.add(e.classes.LABEL),Array.from(this.querySelectorAll(e.selectors.ICON)).forEach(i=>{i.classList.add(e.classes.ICON),i.hasAttribute("aria-hidden")||i.setAttribute("aria-hidden","true")})}_initializeMutationObserver(){if(!this._mutationObserver){let t={childList:!0,subtree:!0},n=i=>{this._buttonWasAdded(i)?this._initializeButton():i.some(o=>o.addedNodes.length)&&this._initializeButtonChildren()};this._mutationObserver=new MutationObserver(n),this._mutationObserver.observe(this,t),this._buttonElement&&(this._buttonAttrMutationObserver=new MutationObserver(i=>{i.some(o=>o.attributeName==="disabled")&&this._syncDisabledState()}),this._buttonAttrMutationObserver.observe(this._buttonElement,{attributes:!0,attributeFilter:["disabled"]}))}}_buttonWasAdded(t){return t.some(n=>Array.from(n.addedNodes).some(i=>a.includes(i.nodeName.toLowerCase())))}_syncDisabledState(){p(this,this._buttonElement.disabled,e.attributes.DISABLED)}};s=l([d({name:e.elementName})],s);var f=class extends _{constructor(t){super(t)}destroy(){this._buttonElement=void 0}get buttonElement(){return this._buttonElement}_build(){var n,i;let t=document.createElement(e.elementName);return this._buttonElement=document.createElement("button"),this._buttonElement.type=((n=this._config.options)==null?void 0:n.type)||"button",this._buttonElement.textContent=((i=this._config.options)==null?void 0:i.text)||"",t.appendChild(this._buttonElement),t}onClick(t){var n;(n=this._buttonElement)==null||n.addEventListener("click",t)}onFocus(t){var n;(n=this._buttonElement)==null||n.addEventListener("focus",i=>t(i))}onBlur(t){var n;(n=this._buttonElement)==null||n.addEventListener("blur",i=>t(i))}};function F(){c(s)}export{a,e as b,s as c,f as d,F as e};
|
|
7
|
-
//# sourceMappingURL=chunk.CE6NTUWI.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/button/button-constants.ts", "../../src/button/button.ts", "../../src/button/button-component-delegate.ts", "../../src/button/index.ts"],
|
|
4
|
-
"sourcesContent": ["import { COMPONENT_NAME_PREFIX } from '../constants';\n\nconst elementName: keyof HTMLElementTagNameMap = `${COMPONENT_NAME_PREFIX}button`;\n\nexport const ALLOWED_CHILDREN = ['button', 'a'];\n\nconst classes = {\n BUTTON: 'forge-button',\n LABEL: 'forge-button__label',\n ICON: 'forge-button__icon',\n BUTTON_RAISED: 'forge-button--raised',\n BUTTON_UNELEVATED: 'forge-button--unelevated',\n BUTTON_OUTLINED: 'forge-button--outlined',\n BUTTON_DENSE: 'forge-button--dense',\n RIPPLE: 'forge-button__ripple'\n};\n\nconst selectors = {\n BUTTON: ALLOWED_CHILDREN.join(','),\n LABEL: `span:not(.${classes.RIPPLE})`,\n ICON: 'i,forge-icon,[data-forge-button-icon]',\n RIPPLE: `.${classes.RIPPLE}`\n};\n\nconst attributes = {\n TYPE: 'type',\n DISABLED: 'disabled'\n};\n\nexport const BUTTON_CONSTANTS = {\n elementName,\n classes,\n selectors,\n attributes\n};\n", "import { CustomElement, ensureChildren, toggleAttribute } from '@tylertech/forge-core';\nimport { BaseComponent, IBaseComponent } from '../core/base/base-component';\nimport { ALLOWED_CHILDREN, BUTTON_CONSTANTS } from './button-constants';\nimport { userInteractionListener } from '../core/utils/utils';\nimport { ForgeRipple } from '../ripple';\n\nexport interface IButtonComponent extends IBaseComponent {\n type: string;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'forge-button': IButtonComponent;\n }\n}\n\n/**\n * The custom element class behind the `<forge-button>` element.\n * \n * @tag forge-button\n */\n@CustomElement({\n name: BUTTON_CONSTANTS.elementName\n})\nexport class ButtonComponent extends BaseComponent implements IButtonComponent {\n public static get observedAttributes(): string[] {\n return [BUTTON_CONSTANTS.attributes.TYPE];\n }\n\n private _rippleInstance: ForgeRipple;\n private _buttonElement: HTMLButtonElement;\n private _type: string;\n private _mutationObserver: MutationObserver;\n private _buttonAttrMutationObserver: MutationObserver;\n\n constructor() {\n super();\n }\n\n public connectedCallback(): void {\n if (this.children.length) {\n this._initialize();\n } else {\n ensureChildren(this).then(() => this._initialize());\n }\n }\n\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\n switch (name) {\n case BUTTON_CONSTANTS.attributes.TYPE:\n this.type = newValue;\n break;\n }\n }\n\n public disconnectedCallback(): void {\n if (this._rippleInstance) {\n this._rippleInstance.destroy();\n }\n if (this._mutationObserver) {\n this._mutationObserver.disconnect();\n }\n if (this._buttonAttrMutationObserver) {\n this._buttonAttrMutationObserver.disconnect();\n }\n }\n\n /**\n * Sets the type of button decoration.\n * Possible values are: raised, elevated, outlined, and dense.\n * Can be combined as: outlined-dense.\n */\n public get type(): string {\n return this._type;\n }\n public set type(value: string) {\n if (this._type !== value) {\n this._type = value;\n this._applyType(value);\n this.setAttribute(BUTTON_CONSTANTS.attributes.TYPE, this._type);\n }\n }\n\n private _applyType(type: string): void {\n if (this._buttonElement) {\n this._buttonElement.classList.remove(BUTTON_CONSTANTS.classes.BUTTON_RAISED);\n this._buttonElement.classList.remove(BUTTON_CONSTANTS.classes.BUTTON_UNELEVATED);\n this._buttonElement.classList.remove(BUTTON_CONSTANTS.classes.BUTTON_OUTLINED);\n this._buttonElement.classList.remove(BUTTON_CONSTANTS.classes.BUTTON_DENSE);\n\n if (type.includes('raised')) {\n this._buttonElement.classList.add(BUTTON_CONSTANTS.classes.BUTTON_RAISED);\n }\n if (type.includes('unelevated')) {\n this._buttonElement.classList.add(BUTTON_CONSTANTS.classes.BUTTON_UNELEVATED);\n }\n if (type.includes('outlined')) {\n this._buttonElement.classList.add(BUTTON_CONSTANTS.classes.BUTTON_OUTLINED);\n }\n if (type.includes('dense')) {\n this._buttonElement.classList.add(BUTTON_CONSTANTS.classes.BUTTON_DENSE);\n }\n }\n }\n\n private _initialize(): void {\n this._initializeButton();\n this._initializeMutationObserver();\n }\n\n private _initializeButton(): void {\n this._buttonElement = this.querySelector(BUTTON_CONSTANTS.selectors.BUTTON) as HTMLButtonElement;\n if (!this._buttonElement) {\n return;\n }\n\n if (this.hasAttribute(BUTTON_CONSTANTS.attributes.TYPE)) {\n this._type = this.getAttribute(BUTTON_CONSTANTS.attributes.TYPE) as string;\n this._applyType(this._type);\n }\n this._buttonElement.classList.add(BUTTON_CONSTANTS.classes.BUTTON);\n\n this._syncDisabledState();\n this._initializeButtonChildren();\n\n // We wait to initialize the ripple instance until the user interacts with the component to avoid unnecessary performance overhead\n this._deferRippleInitialization();\n }\n\n private async _deferRippleInitialization(): Promise<void> {\n const type = await userInteractionListener(this._buttonElement);\n if (!this._rippleInstance) {\n this._rippleInstance = this._createRipple();\n if (type === 'focusin') {\n this._rippleInstance.handleFocus();\n }\n }\n }\n\n private _createRipple(): ForgeRipple {\n if (this._rippleInstance) {\n this._rippleInstance.destroy();\n }\n return new ForgeRipple(this._buttonElement);\n }\n\n private _initializeButtonChildren(): void {\n if (!this._buttonElement.querySelector(BUTTON_CONSTANTS.selectors.RIPPLE)) {\n const rippleElement = document.createElement('span');\n rippleElement.classList.add(BUTTON_CONSTANTS.classes.RIPPLE);\n this._buttonElement.appendChild(rippleElement);\n }\n\n const labelElement = this.querySelector(BUTTON_CONSTANTS.selectors.LABEL);\n if (labelElement) {\n labelElement.classList.add(BUTTON_CONSTANTS.classes.LABEL);\n }\n\n const iconElements = Array.from(this.querySelectorAll(BUTTON_CONSTANTS.selectors.ICON));\n iconElements.forEach(iconElement => {\n iconElement.classList.add(BUTTON_CONSTANTS.classes.ICON);\n if (!iconElement.hasAttribute('aria-hidden')) {\n iconElement.setAttribute('aria-hidden', 'true');\n }\n });\n }\n\n private _initializeMutationObserver(): void {\n if (!this._mutationObserver) {\n const config: MutationObserverInit = { childList: true, subtree: true };\n const callback: MutationCallback = mutationList => {\n if (this._buttonWasAdded(mutationList)) {\n this._initializeButton();\n } else if (mutationList.some(mutation => mutation.addedNodes.length)) {\n this._initializeButtonChildren();\n }\n };\n this._mutationObserver = new MutationObserver(callback);\n this._mutationObserver.observe(this, config);\n \n if (this._buttonElement) {\n // Watch attributes on the `<button>` element\n this._buttonAttrMutationObserver = new MutationObserver(mutationList => {\n if (mutationList.some(mutation => mutation.attributeName === 'disabled')) {\n this._syncDisabledState();\n }\n });\n this._buttonAttrMutationObserver.observe(this._buttonElement, { attributes: true, attributeFilter: ['disabled'] });\n }\n }\n }\n\n private _buttonWasAdded(mutationList: MutationRecord[]): boolean {\n return mutationList.some(mutation => {\n return Array.from(mutation.addedNodes)\n .some(node => ALLOWED_CHILDREN.includes(node.nodeName.toLowerCase()));\n });\n }\n\n private _syncDisabledState(): void {\n toggleAttribute(this, this._buttonElement.disabled, BUTTON_CONSTANTS.attributes.DISABLED);\n }\n}\n\n", "import { BaseComponentDelegate, IBaseComponentDelegateConfig, IBaseComponentDelegateOptions } from '../core/delegates/base-component-delegate';\nimport { IButtonComponent } from './button';\nimport { BUTTON_CONSTANTS } from './button-constants';\n\nexport type ButtonComponentDelegateProps = Partial<IButtonComponent>;\nexport interface IButtonComponentDelegateOptions extends IBaseComponentDelegateOptions {\n type?: 'button' | 'submit';\n text?: string;\n}\nexport interface IButtonComponentDelegateConfig extends IBaseComponentDelegateConfig<IButtonComponent, IButtonComponentDelegateOptions> {}\n\nexport class ButtonComponentDelegate extends BaseComponentDelegate<IButtonComponent, IButtonComponentDelegateOptions> {\n private _buttonElement?: HTMLButtonElement;\n\n constructor(config?: IButtonComponentDelegateConfig) {\n super(config);\n }\n\n public override destroy(): void {\n this._buttonElement = undefined;\n }\n\n public get buttonElement(): HTMLButtonElement | undefined {\n return this._buttonElement;\n }\n\n protected _build(): IButtonComponent {\n const component = document.createElement(BUTTON_CONSTANTS.elementName);\n\n this._buttonElement = document.createElement('button');\n this._buttonElement.type = this._config.options?.type || 'button';\n this._buttonElement.textContent = this._config.options?.text || '';\n component.appendChild(this._buttonElement);\n\n return component;\n }\n\n public onClick(listener: (evt: MouseEvent) => void): void {\n this._buttonElement?.addEventListener('click', listener);\n }\n\n public onFocus(listener: (evt: Event) => void): void {\n this._buttonElement?.addEventListener('focus', evt => listener(evt));\n }\n\n public onBlur(listener: (evt: Event) => void): void {\n this._buttonElement?.addEventListener('blur', evt => listener(evt));\n }\n}\n", "import { defineCustomElement } from '@tylertech/forge-core';\nimport { ButtonComponent } from './button';\n\nexport * from './button';\nexport * from './button-constants';\nexport * from './button-component-delegate';\n\nexport function defineButtonComponent(): void {\n defineCustomElement(ButtonComponent);\n}\n"],
|
|
5
|
-
"mappings": "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",
|
|
6
|
-
"names": ["elementName", "COMPONENT_NAME_PREFIX", "ALLOWED_CHILDREN", "classes", "selectors", "attributes", "BUTTON_CONSTANTS", "ButtonComponent", "BaseComponent", "BUTTON_CONSTANTS", "ensureChildren", "name", "oldValue", "newValue", "value", "type", "userInteractionListener", "ForgeRipple", "rippleElement", "labelElement", "iconElement", "config", "callback", "mutationList", "mutation", "node", "ALLOWED_CHILDREN", "toggleAttribute", "__decorateClass", "CustomElement", "ButtonComponentDelegate", "BaseComponentDelegate", "config", "_a", "_b", "component", "BUTTON_CONSTANTS", "listener", "evt", "defineButtonComponent", "defineCustomElement", "ButtonComponent"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
|
-
* License: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import{b,c as L}from"./chunk.4CWMNWZU.js";import{b as z}from"./chunk.Y66GSZJB.js";import{a as C}from"./chunk.KTGSZEAG.js";import{a as I,b as x}from"./chunk.QOA2O575.js";import{a as E,e as w,g as m,l as R}from"./chunk.HOXFK44F.js";import{f as v,g as y,s as k}from"./chunk.4LA6HEA7.js";import{k as _}from"./chunk.J2M2MXP2.js";import{a as g,b as h,f as p}from"./chunk.MCIQXNKY.js";var D=`${x}radio`,A={RADIO:"mdc-radio",RADIO_DENSE:"forge-radio--dense",DISABLED:"mdc-radio--disabled",WRAPPER_DISABLED:"forge-radio-wrapper--disabled",CHECKED:"forge-radio--checked",FOCUSED:"forge-radio--focused",ENABLED:"forge-radio--enabled"},S={WRAPPER:".forge-radio-wrapper",RADIO:".mdc-radio",RADIO_INPUT:'input[type="radio"]',LABEL:"label"},O={DENSE:"dense",ROLE:"role",RADIOGROUP_ROLE:"radiogroup",SLOT:"slot"},N=["checked","disabled"],i={elementName:D,classes:A,selectors:S,attributes:O,inputProperties:N};var d=class{constructor(e){this._adapter=e;this._dense=!1}connect(){this._adapter.connect(),this._adapter.deferRippleInitialization(),this._focusListenerCallback=()=>this._adapter.syncFocusedStateWithInput(),this._disabledListenerCallback=()=>this._adapter.syncDisabledStateWithInput(),this._syncRadiogroupCheckStyles=()=>this._adapter.syncRadiogroupCheckStyles(),this._addFocusEventListeners(),this._addInputDisabledListener(),this._extendNativeInputSetter(),this._addRadioChangeListener(),this._adapter.syncCheckedStateWithInput(),this._adapter.syncDisabledStateWithInput(),this._adapter.syncFocusedStateWithInput(),this._applyDense(),this.syncCheckedState()}disconnect(){this._removeFocusEventListeners(),this._removeInputDisabledListener(),this._adapter.revertNativeInputSetter(),this._removeRadioChangeListener(),this._adapter.destroyRipple()}syncCheckedState(){this._adapter.syncCheckedStateWithInput()}_applyDense(){this._dense?(this._adapter.addRootClass(i.classes.RADIO_DENSE),this._adapter.setHostAttribute(i.attributes.DENSE)):(this._adapter.removeRootClass(i.classes.RADIO_DENSE),this._adapter.removeHostAttribute(i.attributes.DENSE))}_extendNativeInputSetter(){this._adapter.extendNativeInputSetter(this._syncRadiogroupCheckStyles)}_addRadioChangeListener(){this._adapter.addInputEventListener("change",this._syncRadiogroupCheckStyles)}_removeRadioChangeListener(){this._adapter.removeInputEventListener("change",this._syncRadiogroupCheckStyles)}_addFocusEventListeners(){this._adapter.addInputEventListener("focus",this._focusListenerCallback),this._adapter.addInputEventListener("blur",this._focusListenerCallback)}_removeFocusEventListeners(){this._adapter.removeInputEventListener("focus",this._focusListenerCallback),this._adapter.removeInputEventListener("blur",this._focusListenerCallback)}_addInputDisabledListener(){this._adapter.addInputDisabledAttributeChangeListener(this._disabledListenerCallback)}_removeInputDisabledListener(){this._adapter.removeInputDisabledAttributeChangeListener()}get dense(){return this._dense}set dense(e){this._dense!==e&&(this._dense=e,this._applyDense())}};var c=class{constructor(e){this._component=e;this._rootElement=m(this._component,i.selectors.RADIO),this._containerElement=m(this._component,i.selectors.WRAPPER)}get root(){return this._rootElement}get unbounded(){return!0}get disabled(){return this._isDisabled()}connect(){let e=this._component.querySelector(i.selectors.LABEL);e&&e.setAttribute(i.attributes.SLOT,i.selectors.LABEL)}async deferRippleInitialization(){let e=await z(this._rootElement);this._rippleInstance||(this._rippleInstance=this._createRipple(),e==="focusin"&&this._rippleInstance.handleFocus())}destroyRipple(){var e;(e=this._rippleInstance)==null||e.destroy(),this._rippleInstance=void 0}setHostAttribute(e,t=""){this._component.setAttribute(e,t)}removeHostAttribute(e){this._component.removeAttribute(e)}addRootClass(e){this._rootElement.classList.add(e)}removeRootClass(e){this._rootElement.classList.remove(e)}addContainerClass(e){this._containerElement.classList.add(e)}removeContainerClass(e){this._containerElement.classList.remove(e)}syncDisabledStateWithInput(){this.inputDisabled?(this.addRootClass(i.classes.DISABLED),this.removeRootClass(i.classes.ENABLED),this.addContainerClass(i.classes.WRAPPER_DISABLED)):(this.addRootClass(i.classes.ENABLED),this.removeRootClass(i.classes.DISABLED),this.removeContainerClass(i.classes.WRAPPER_DISABLED))}syncFocusedStateWithInput(){k(this._component.ownerDocument)===this._inputElement?this.addRootClass(i.classes.FOCUSED):this.removeRootClass(i.classes.FOCUSED)}syncCheckedStateWithInput(){this.inputChecked?this.addRootClass(i.classes.CHECKED):this.removeRootClass(i.classes.CHECKED)}addInputEventListener(e,t){!this._inputElement||this._inputElement.addEventListener(e,t)}removeInputEventListener(e,t){!this._inputElement||this._inputElement.removeEventListener(e,t)}addInputDisabledAttributeChangeListener(e){this._setupInputDisabledAttributeMutationObserver(e)}removeInputDisabledAttributeChangeListener(){this._cleanupInputDisabledAttributeMutationObserver()}getRadiosFromContainingRadiogroup(){let e=this._getContainingRadioGroup(this._component);return e==null?null:e.querySelectorAll(i.elementName)}syncRadiogroupCheckStyles(){let e=this.getRadiosFromContainingRadiogroup();e&&e.forEach(t=>t.syncCheckedState())}extendNativeInputSetter(e){if(!this._inputElement)return;let t=this._inputElement,r=Object.getPrototypeOf(t);i.inputProperties.forEach(o=>{let a=Object.getOwnPropertyDescriptor(r,o);if(!!this._validPropertyDescriptor(a)&&a){let f={configurable:a.configurable,enumerable:a.enumerable,get:a.get,set:l=>{var s;(s=a.set)==null||s.call(t,l),e()}};Object.defineProperty(t,o,f)}})}revertNativeInputSetter(){if(!this._inputElement)return;let e=this._inputElement,t=Object.getPrototypeOf(e);i.inputProperties.forEach(r=>{let o=Object.getOwnPropertyDescriptor(t,r);!this._validPropertyDescriptor(o)||Object.defineProperty(e,r,o)})}_validPropertyDescriptor(e){return!!e&&typeof e.set=="function"}_getContainingRadioGroup(e){if(!e||!e.parentElement)throw new Error('Unable to locate ancestor element with role="radiogroup". When using radios, a parent with this attribute must be applied.');let t=e.parentElement,r=t.getAttribute(i.attributes.ROLE);return!!r&&r.toLocaleLowerCase()===i.attributes.RADIOGROUP_ROLE.toLocaleLowerCase()?t:this._getContainingRadioGroup(t)}_setupInputDisabledAttributeMutationObserver(e){if(!this._inputElement)return;this._cleanupInputDisabledAttributeMutationObserver();let t=o=>this._inputDisabledAttributeMutationCallback(o,e);this._inputAttributeMutationObserver=new MutationObserver(t);let r={attributes:!0,attributeOldValue:!0,attributeFilter:["disabled"]};this._inputAttributeMutationObserver.observe(this._inputElement,r)}_cleanupInputDisabledAttributeMutationObserver(){this._inputAttributeMutationObserver&&(this._inputAttributeMutationObserver.disconnect(),delete this._inputAttributeMutationObserver)}_inputDisabledAttributeMutationCallback(e,t){for(let r of e)r.type!=="attributes"||!r.attributeName||r.attributeName!=="disabled"||r.target[r.attributeName]===r.oldValue||t()}get inputDisabled(){return this._inputElement?this._inputElement.disabled:!1}get inputChecked(){return this._inputElement?this._inputElement.checked:!1}get _inputElement(){return this._nativeInputElement||(this._nativeInputElement=this._component.querySelector(i.selectors.RADIO_INPUT)),this._nativeInputElement}_isDisabled(){return this._inputElement?this._inputElement.disabled:!1}_createRipple(){let e=h(g({},b.createAdapter(this)),{deregisterInteractionHandler:(t,r)=>{this._inputElement&&this._inputElement.removeEventListener(t,r,{passive:!0})},isSurfaceActive:()=>this._inputElement?this._inputElement.matches(":active"):!1,isUnbounded:()=>Boolean(this.unbounded),registerInteractionHandler:(t,r)=>{this._inputElement&&this._inputElement.addEventListener(t,r,{passive:!0})},isSurfaceDisabled:()=>this._inputElement?this._inputElement.disabled:!1,addClass:t=>v(t,this._rootElement),removeClass:t=>y(t,this._rootElement),updateCssVariable:(t,r)=>this._rootElement.style.setProperty(t,r)});return new b(this._rootElement,new L(e))}};var P='<template><div class="forge-radio-wrapper forge-form-field" part="root"><div class="mdc-radio" part="container"><slot></slot><div class="mdc-radio__background" part="background"><div class="mdc-radio__outer-circle" part="outer-circle"></div><div class="mdc-radio__inner-circle" part="inner-circle"></div></div><div class="mdc-radio__ripple" part="ripple-container"></div></div><slot name="label"></slot></div></template>',M='.mdc-radio{padding:10px;display:inline-block;position:relative;-webkit-box-flex:0;flex:0 0 auto;-webkit-box-sizing:content-box;box-sizing:content-box;width:20px;height:20px;cursor:pointer;will-change:opacity,transform,border-color,color}.mdc-radio.forge-radio--enabled .mdc-radio__background .mdc-radio__outer-circle{border-color:rgba(0,0,0,.54);border-color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}.mdc-radio.forge-radio--enabled.forge-radio--checked .mdc-radio__background .mdc-radio__outer-circle{border-color:#3d5afe;border-color:var(--forge-theme-tertiary,#3d5afe)}.mdc-radio.forge-radio--enabled .mdc-radio__background .mdc-radio__inner-circle{border-color:#3d5afe;border-color:var(--forge-theme-tertiary,#3d5afe)}.mdc-radio.mdc-radio--disabled .mdc-radio__background .mdc-radio__outer-circle{border-color:rgba(0,0,0,.26);border-color:var(--forge-theme-form-field-icon-disabled-on-background,rgba(0,0,0,.26))}.mdc-radio.mdc-radio--disabled.forge-radio--checked .mdc-radio__background .mdc-radio__outer-circle{border-color:rgba(0,0,0,.26);border-color:var(--forge-theme-form-field-icon-disabled-on-background,rgba(0,0,0,.26))}.mdc-radio.mdc-radio--disabled .mdc-radio__background .mdc-radio__inner-circle{border-color:rgba(0,0,0,.26);border-color:var(--forge-theme-form-field-icon-disabled-on-background,rgba(0,0,0,.26))}.mdc-radio .mdc-radio__background::before{background-color:#3d5afe;background-color:var(--forge-theme-tertiary,#3d5afe)}.mdc-radio .mdc-radio__background::before{top:-10px;left:-10px;width:40px;height:40px}.mdc-radio .mdc-radio__native-control{top:0;right:0;left:0;width:40px;height:40px}@media screen and (forced-colors:active),(-ms-high-contrast:active){.mdc-radio.mdc-radio--disabled .mdc-radio__background .mdc-radio__outer-circle{border-color:GrayText}.mdc-radio.mdc-radio--disabled.forge-radio--checked .mdc-radio__background .mdc-radio__outer-circle{border-color:GrayText}.mdc-radio.mdc-radio--disabled .mdc-radio__background .mdc-radio__inner-circle{border-color:GrayText}}.mdc-radio__background{display:inline-block;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;width:20px;height:20px}.mdc-radio__background::before{position:absolute;-webkit-transform:scale(0,0);transform:scale(0,0);border-radius:50%;opacity:0;pointer-events:none;content:"";-webkit-transition:opacity 120ms 0s cubic-bezier(.4, 0, .6, 1),-webkit-transform 120ms 0s cubic-bezier(.4, 0, .6, 1);transition:opacity 120ms 0s cubic-bezier(.4, 0, .6, 1),-webkit-transform 120ms 0s cubic-bezier(.4, 0, .6, 1);transition:opacity 120ms 0s cubic-bezier(.4, 0, .6, 1),transform 120ms 0s cubic-bezier(.4, 0, .6, 1);transition:opacity 120ms 0s cubic-bezier(.4, 0, .6, 1),transform 120ms 0s cubic-bezier(.4, 0, .6, 1),-webkit-transform 120ms 0s cubic-bezier(.4, 0, .6, 1)}.mdc-radio__outer-circle{position:absolute;top:0;left:0;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;height:100%;border-width:2px;border-style:solid;border-radius:50%;-webkit-transition:border-color 120ms 0s cubic-bezier(.4, 0, .6, 1);transition:border-color 120ms 0s cubic-bezier(.4, 0, .6, 1)}.mdc-radio__inner-circle{position:absolute;top:0;left:0;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;height:100%;-webkit-transform:scale(0,0);transform:scale(0,0);border-width:10px;border-style:solid;border-radius:50%;-webkit-transition:border-color 120ms 0s cubic-bezier(.4, 0, .6, 1),-webkit-transform 120ms 0s cubic-bezier(.4, 0, .6, 1);transition:border-color 120ms 0s cubic-bezier(.4, 0, .6, 1),-webkit-transform 120ms 0s cubic-bezier(.4, 0, .6, 1);transition:transform 120ms 0s cubic-bezier(.4, 0, .6, 1),border-color 120ms 0s cubic-bezier(.4, 0, .6, 1);transition:transform 120ms 0s cubic-bezier(.4, 0, .6, 1),border-color 120ms 0s cubic-bezier(.4, 0, .6, 1),-webkit-transform 120ms 0s cubic-bezier(.4, 0, .6, 1)}.mdc-radio ::slotted(input[type=radio]){position:absolute;margin:0;padding:0;opacity:0;cursor:inherit;z-index:1;top:0;right:0;left:0;width:40px;height:40px}.mdc-radio.forge-radio--dense{padding:4px;margin:0}.mdc-radio.forge-radio--dense .mdc-radio__background::before{top:-4px;left:-4px;width:28px;height:28px}.mdc-radio.forge-radio--dense .mdc-radio__native-control{top:0;right:0;left:0;width:28px;height:28px}.mdc-radio.forge-radio--dense ::slotted(input[type=radio]){width:28px;height:28px}.mdc-radio--disabled+::slotted(label){color:rgba(0,0,0,.38);color:var(--forge-theme-label-disabled-on-background,rgba(0,0,0,.38))}.forge-radio--checked .mdc-radio__background,.mdc-radio--disabled .mdc-radio__background{-webkit-transition:opacity 120ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 120ms 0s cubic-bezier(0, 0, .2, 1);transition:opacity 120ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 120ms 0s cubic-bezier(0, 0, .2, 1);transition:opacity 120ms 0s cubic-bezier(0, 0, .2, 1),transform 120ms 0s cubic-bezier(0, 0, .2, 1);transition:opacity 120ms 0s cubic-bezier(0, 0, .2, 1),transform 120ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 120ms 0s cubic-bezier(0, 0, .2, 1)}.forge-radio--checked .mdc-radio__background .mdc-radio__outer-circle,.mdc-radio--disabled .mdc-radio__background .mdc-radio__outer-circle{-webkit-transition:border-color 120ms 0s cubic-bezier(0, 0, .2, 1);transition:border-color 120ms 0s cubic-bezier(0, 0, .2, 1)}.forge-radio--checked .mdc-radio__background .mdc-radio__inner-circle,.mdc-radio--disabled .mdc-radio__background .mdc-radio__inner-circle{-webkit-transition:border-color 120ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 120ms 0s cubic-bezier(0, 0, .2, 1);transition:border-color 120ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 120ms 0s cubic-bezier(0, 0, .2, 1);transition:transform 120ms 0s cubic-bezier(0, 0, .2, 1),border-color 120ms 0s cubic-bezier(0, 0, .2, 1);transition:transform 120ms 0s cubic-bezier(0, 0, .2, 1),border-color 120ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 120ms 0s cubic-bezier(0, 0, .2, 1)}.mdc-radio--disabled{cursor:default;pointer-events:none}.forge-radio--checked .mdc-radio__background .mdc-radio__inner-circle{-webkit-transform:scale(.5);transform:scale(.5);-webkit-transition:border-color 120ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 120ms 0s cubic-bezier(0, 0, .2, 1);transition:border-color 120ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 120ms 0s cubic-bezier(0, 0, .2, 1);transition:transform 120ms 0s cubic-bezier(0, 0, .2, 1),border-color 120ms 0s cubic-bezier(0, 0, .2, 1);transition:transform 120ms 0s cubic-bezier(0, 0, .2, 1),border-color 120ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 120ms 0s cubic-bezier(0, 0, .2, 1)}.mdc-radio--disabled .mdc-radio__background{cursor:default}.forge-radio--focused .mdc-radio__background::before{-webkit-transform:scale(1);transform:scale(1);opacity:.12;-webkit-transition:opacity 120ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 120ms 0s cubic-bezier(0, 0, .2, 1);transition:opacity 120ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 120ms 0s cubic-bezier(0, 0, .2, 1);transition:opacity 120ms 0s cubic-bezier(0, 0, .2, 1),transform 120ms 0s cubic-bezier(0, 0, .2, 1);transition:opacity 120ms 0s cubic-bezier(0, 0, .2, 1),transform 120ms 0s cubic-bezier(0, 0, .2, 1),-webkit-transform 120ms 0s cubic-bezier(0, 0, .2, 1)}@-webkit-keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@-webkit-keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@-webkit-keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}@keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-radio{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity}.mdc-radio .mdc-radio__ripple::after,.mdc-radio .mdc-radio__ripple::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-radio .mdc-radio__ripple::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.mdc-radio .mdc-radio__ripple::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.mdc-radio.mdc-ripple-upgraded .mdc-radio__ripple::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.mdc-radio.mdc-ripple-upgraded .mdc-radio__ripple::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.mdc-radio.mdc-ripple-upgraded--unbounded .mdc-radio__ripple::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.mdc-radio.mdc-ripple-upgraded--foreground-activation .mdc-radio__ripple::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-radio.mdc-ripple-upgraded--foreground-deactivation .mdc-radio__ripple::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.mdc-radio .mdc-radio__ripple::after,.mdc-radio .mdc-radio__ripple::before{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-radio.mdc-ripple-upgraded .mdc-radio__ripple::after,.mdc-radio.mdc-ripple-upgraded .mdc-radio__ripple::before{top:var(--mdc-ripple-top,calc(50% - 50%));left:var(--mdc-ripple-left,calc(50% - 50%));width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-radio.mdc-ripple-upgraded .mdc-radio__ripple::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-radio .mdc-radio__ripple::after,.mdc-radio .mdc-radio__ripple::before{background-color:#3d5afe;background-color:var(--forge-theme-tertiary,#3d5afe)}.mdc-radio.mdc-ripple-surface--hover .mdc-radio__ripple::before,.mdc-radio:hover .mdc-radio__ripple::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__ripple::before,.mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__ripple::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.mdc-radio:not(.mdc-ripple-upgraded) .mdc-radio__ripple::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.mdc-radio:not(.mdc-ripple-upgraded):active .mdc-radio__ripple::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.mdc-radio.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-radio.mdc-ripple-upgraded .mdc-radio__background::before,.mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__background::before{content:none}.mdc-radio__ripple{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.forge-radio-wrapper--disabled{cursor:not-allowed}.forge-radio-wrapper--disabled ::slotted(label){cursor:not-allowed}.forge-form-field{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.875rem;font-size:var(--mdc-typography-body2-font-size, .875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight,400);letter-spacing:.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, .0178571429em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform,inherit);color:rgba(0,0,0,.87);color:var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87));display:-webkit-inline-box;display:inline-flex;-webkit-box-align:center;align-items:center;vertical-align:middle}.forge-form-field ::slotted([slot=label]){-webkit-box-ordinal-group:1;order:0;margin-right:auto;padding-left:4px}.forge-form-field forge-switch~::slotted([slot=label]){padding-left:8px}.forge-form-field--align-end ::slotted([slot=label]){-webkit-box-ordinal-group:0;order:-1;margin-left:auto;padding-right:4px}:host{display:inline-block}:host([hidden]){display:none}',n=class extends R{constructor(){super();w(this,P,M),this._foundation=new d(new c(this))}static get observedAttributes(){return[i.attributes.DENSE]}connectedCallback(){this._ensureRadioInputElement().then(()=>this._foundation.connect())}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(t,r,o){switch(t){case i.attributes.DENSE:this.dense=_(o);break}}_ensureRadioInputElement(){return new Promise(t=>{if(this.querySelector(i.selectors.RADIO_INPUT)){t();return}let o=new MutationObserver(a=>{a.reduce((l,s)=>l+s.addedNodes.length,0)>0&&this.querySelector(i.selectors.RADIO_INPUT)&&(o.disconnect(),t())});o.observe(this,{childList:!0,subtree:!0})})}syncCheckedState(){this._foundation.syncCheckedState()}};p([C()],n.prototype,"dense",2),n=p([I({name:i.elementName})],n);function re(){E(n)}export{i as a,n as b,re as c};
|
|
7
|
-
//# sourceMappingURL=chunk.DLALEZ73.js.map
|