@banzamel/mineralui 1.1.0 → 1.2.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/README.md +1 -1
- package/dist/{MAvatar-BDfA-fQT.js → MAvatar-BoO51a6m.js} +4 -4
- package/dist/{MAvatar-BDfA-fQT.js.map → MAvatar-BoO51a6m.js.map} +1 -1
- package/dist/{MAvatar-C8tWuy5K.cjs → MAvatar-DJKtca9j.cjs} +2 -2
- package/dist/{MAvatar-C8tWuy5K.cjs.map → MAvatar-DJKtca9j.cjs.map} +1 -1
- package/dist/{MBadge-Babyr1R9.cjs → MBadge-CexVV675.cjs} +2 -2
- package/dist/MBadge-CexVV675.cjs.map +1 -0
- package/dist/{MBadge-BjZX0MIC.js → MBadge-Y1JnZiIC.js} +2 -2
- package/dist/MBadge-Y1JnZiIC.js.map +1 -0
- package/dist/{MButton-C_WTyNvw.cjs → MButton-B8rXmFX9.cjs} +2 -2
- package/dist/{MButton-C_WTyNvw.cjs.map → MButton-B8rXmFX9.cjs.map} +1 -1
- package/dist/{MButton-33EzpGvQ.js → MButton-BmTDe5Oa.js} +3 -3
- package/dist/{MButton-33EzpGvQ.js.map → MButton-BmTDe5Oa.js.map} +1 -1
- package/dist/{MCheckbox-DW-liYve.js → MCheckbox-B7SpcD4H.js} +3 -3
- package/dist/{MCheckbox-DW-liYve.js.map → MCheckbox-B7SpcD4H.js.map} +1 -1
- package/dist/{MCheckbox-9WMKKIUO.cjs → MCheckbox-Bea3orrs.cjs} +2 -2
- package/dist/{MCheckbox-9WMKKIUO.cjs.map → MCheckbox-Bea3orrs.cjs.map} +1 -1
- package/dist/{MCookieBootstrap-v2JRvgUH.js → MCookieBootstrap-CNYLvKjW.js} +1 -1
- package/dist/{MCookieBootstrap-v2JRvgUH.js.map → MCookieBootstrap-CNYLvKjW.js.map} +1 -1
- package/dist/{MCookieBootstrap-I7jiqvBM.cjs → MCookieBootstrap-DSOT4FQo.cjs} +1 -1
- package/dist/{MCookieBootstrap-I7jiqvBM.cjs.map → MCookieBootstrap-DSOT4FQo.cjs.map} +1 -1
- package/dist/MDataTable-BI7wFZYN.cjs +2 -0
- package/dist/{MDataTable-B0QbAjVI.cjs.map → MDataTable-BI7wFZYN.cjs.map} +1 -1
- package/dist/{MDataTable-C-CRvZ45.js → MDataTable-Cqwkiq7A.js} +13 -15
- package/dist/{MDataTable-C-CRvZ45.js.map → MDataTable-Cqwkiq7A.js.map} +1 -1
- package/dist/MDrawer-CSvjLrhB.cjs +2 -0
- package/dist/{MDrawer-_Bao-x1w.cjs.map → MDrawer-CSvjLrhB.cjs.map} +1 -1
- package/dist/{MDrawer-CHbmY08J.js → MDrawer-DXHtAckQ.js} +5 -5
- package/dist/{MDrawer-CHbmY08J.js.map → MDrawer-DXHtAckQ.js.map} +1 -1
- package/dist/{MDropdownMenu-D3O3-l8O.js → MDropdownMenu-CxBhYxQb.js} +4 -4
- package/dist/{MDropdownMenu-D3O3-l8O.js.map → MDropdownMenu-CxBhYxQb.js.map} +1 -1
- package/dist/{MDropdownMenu-Bd6MfUmF.cjs → MDropdownMenu-X7ywPqth.cjs} +2 -2
- package/dist/{MDropdownMenu-Bd6MfUmF.cjs.map → MDropdownMenu-X7ywPqth.cjs.map} +1 -1
- package/dist/{illustrations.entry-DtMxssXq.cjs → MGalleryIllustration-CeOMHzpt.cjs} +2 -2
- package/dist/MGalleryIllustration-CeOMHzpt.cjs.map +1 -0
- package/dist/{illustrations.entry-C0rSNpF1.js → MGalleryIllustration-D7CVMSwO.js} +2 -2
- package/dist/{illustrations.entry-DtMxssXq.cjs.map → MGalleryIllustration-D7CVMSwO.js.map} +1 -1
- package/dist/{MHeading-BlDlbYcY.js → MHeading-C3IgV22T.js} +3 -3
- package/dist/{MHeading-BlDlbYcY.js.map → MHeading-C3IgV22T.js.map} +1 -1
- package/dist/{MHeading-7-5TESyc.cjs → MHeading-DqvWKia1.cjs} +2 -2
- package/dist/{MHeading-7-5TESyc.cjs.map → MHeading-DqvWKia1.cjs.map} +1 -1
- package/dist/{MImage-C99xrQQ9.js → MImage-BDcrV6IC.js} +4 -4
- package/dist/MImage-BDcrV6IC.js.map +1 -0
- package/dist/{MImage-DbianX0t.cjs → MImage-BsQJ_eYf.cjs} +2 -2
- package/dist/MImage-BsQJ_eYf.cjs.map +1 -0
- package/dist/{MInline-Bvfuvqsf.cjs → MInline-BAhu2zT-.cjs} +2 -2
- package/dist/{MInline-Bvfuvqsf.cjs.map → MInline-BAhu2zT-.cjs.map} +1 -1
- package/dist/{MInline-NJeL5tcC.js → MInline-Dfy3Lrjs.js} +4 -4
- package/dist/{MInline-NJeL5tcC.js.map → MInline-Dfy3Lrjs.js.map} +1 -1
- package/dist/{MInput-OmuQ2Tds.js → MInput-BSaKw0Uc.js} +6 -6
- package/dist/{MInput-OmuQ2Tds.js.map → MInput-BSaKw0Uc.js.map} +1 -1
- package/dist/MInput-W7DJQ_ng.cjs +2 -0
- package/dist/{MInput-Bpkn3gOQ.cjs.map → MInput-W7DJQ_ng.cjs.map} +1 -1
- package/dist/MInputCVC-DH_bjV5R.cjs +2 -0
- package/dist/MInputCVC-DH_bjV5R.cjs.map +1 -0
- package/dist/{MInputCVC-CcG_KJvq.js → MInputCVC-Dqbl1zG9.js} +21 -23
- package/dist/MInputCVC-Dqbl1zG9.js.map +1 -0
- package/dist/MInputSearch-C7betxTa.cjs +2 -0
- package/dist/{MInputSearch-APMIHkYb.cjs.map → MInputSearch-C7betxTa.cjs.map} +1 -1
- package/dist/{MInputSearch-k2ESY4ZG.js → MInputSearch-CH5ZcjLq.js} +4 -4
- package/dist/{MInputSearch-k2ESY4ZG.js.map → MInputSearch-CH5ZcjLq.js.map} +1 -1
- package/dist/{MLink-B4JrRZ29.cjs → MLink-DHryXq_D.cjs} +2 -2
- package/dist/{MLink-B4JrRZ29.cjs.map → MLink-DHryXq_D.cjs.map} +1 -1
- package/dist/{MLink-_WcD95E0.js → MLink-ODytrwne.js} +2 -2
- package/dist/{MLink-_WcD95E0.js.map → MLink-ODytrwne.js.map} +1 -1
- package/dist/{MModal-Dni2MR1n.js → MModal-DShADuLw.js} +4 -4
- package/dist/{MModal-Dni2MR1n.js.map → MModal-DShADuLw.js.map} +1 -1
- package/dist/{MModal-D-3jQ-c5.cjs → MModal-pMcPs3pw.cjs} +2 -2
- package/dist/{MModal-D-3jQ-c5.cjs.map → MModal-pMcPs3pw.cjs.map} +1 -1
- package/dist/{MPagination-DCeU7MHM.js → MPagination-B7aho7rQ.js} +8 -8
- package/dist/{MPagination-DCeU7MHM.js.map → MPagination-B7aho7rQ.js.map} +1 -1
- package/dist/MPagination-BWHAVgWN.cjs +2 -0
- package/dist/{MPagination-3fsF3pCM.cjs.map → MPagination-BWHAVgWN.cjs.map} +1 -1
- package/dist/{MPopover-DKBdLfrw.js → MPopover-BC9C5967.js} +3 -3
- package/dist/{MPopover-DKBdLfrw.js.map → MPopover-BC9C5967.js.map} +1 -1
- package/dist/{MPopover-BXPkE575.cjs → MPopover-C3-fGAke.cjs} +2 -2
- package/dist/{MPopover-BXPkE575.cjs.map → MPopover-C3-fGAke.cjs.map} +1 -1
- package/dist/{MPortal-CbpNkzfC.js → MPortal-Dqlkh3hw.js} +1 -1
- package/dist/{MPortal-CbpNkzfC.js.map → MPortal-Dqlkh3hw.js.map} +1 -1
- package/dist/{MPortal-BysJLuEi.cjs → MPortal-PyRKsZxc.cjs} +1 -1
- package/dist/{MPortal-BysJLuEi.cjs.map → MPortal-PyRKsZxc.cjs.map} +1 -1
- package/dist/{MQrCode-DGq8ktvf.js → MQrCode-6Cz9B7Qy.js} +15 -16
- package/dist/{MQrCode-DGq8ktvf.js.map → MQrCode-6Cz9B7Qy.js.map} +1 -1
- package/dist/MQrCode-Bp2CWpmX.cjs +2 -0
- package/dist/{MQrCode-ClP7YJFt.cjs.map → MQrCode-Bp2CWpmX.cjs.map} +1 -1
- package/dist/{MSkeleton-CRgCZZqm.cjs → MSkeleton-BfRBJ6ku.cjs} +2 -2
- package/dist/{MSkeleton-CRgCZZqm.cjs.map → MSkeleton-BfRBJ6ku.cjs.map} +1 -1
- package/dist/{MSkeleton-QQ8Lk3Cr.js → MSkeleton-CauCfkzj.js} +4 -4
- package/dist/{MSkeleton-QQ8Lk3Cr.js.map → MSkeleton-CauCfkzj.js.map} +1 -1
- package/dist/{MSlider-DNAOirz9.cjs → MSlider-BCMJkvcA.cjs} +2 -2
- package/dist/{MSlider-DNAOirz9.cjs.map → MSlider-BCMJkvcA.cjs.map} +1 -1
- package/dist/{MSlider-C65mv2h1.js → MSlider-CqrusKJQ.js} +2 -2
- package/dist/{MSlider-C65mv2h1.js.map → MSlider-CqrusKJQ.js.map} +1 -1
- package/dist/{MSparkline-lRq3gAYU.cjs → MSparkline-BOaNmbeB.cjs} +2 -2
- package/dist/MSparkline-BOaNmbeB.cjs.map +1 -0
- package/dist/{MSparkline-LfEfA310.js → MSparkline-Cb_EwR-E.js} +2 -2
- package/dist/MSparkline-Cb_EwR-E.js.map +1 -0
- package/dist/{MStack-CuUE9u4h.js → MStack-Cifiqeb2.js} +4 -4
- package/dist/{MStack-CuUE9u4h.js.map → MStack-Cifiqeb2.js.map} +1 -1
- package/dist/{MStack-CFZf6I8F.cjs → MStack-lrvy7l3w.cjs} +2 -2
- package/dist/{MStack-CFZf6I8F.cjs.map → MStack-lrvy7l3w.cjs.map} +1 -1
- package/dist/{MSubText-Dr0rAnX7.cjs → MSubText-78oYdJQy.cjs} +2 -2
- package/dist/{MSubText-Dr0rAnX7.cjs.map → MSubText-78oYdJQy.cjs.map} +1 -1
- package/dist/{MSubText-BxDWVjjs.js → MSubText-C2oxXwKT.js} +3 -3
- package/dist/{MSubText-BxDWVjjs.js.map → MSubText-C2oxXwKT.js.map} +1 -1
- package/dist/{MSurface-BiusHYSB.js → MSurface-B1LXFczo.js} +4 -4
- package/dist/{MSurface-BiusHYSB.js.map → MSurface-B1LXFczo.js.map} +1 -1
- package/dist/{MSurface-BlCLcifq.cjs → MSurface-BgZ86iYn.cjs} +2 -2
- package/dist/{MSurface-BlCLcifq.cjs.map → MSurface-BgZ86iYn.cjs.map} +1 -1
- package/dist/MTag-C4_rBj4b.cjs +2 -0
- package/dist/{MTag-BMi1GS7v.cjs.map → MTag-C4_rBj4b.cjs.map} +1 -1
- package/dist/{MTag-Cor8ZIW3.js → MTag-DOcKm3c2.js} +4 -4
- package/dist/{MTag-Cor8ZIW3.js.map → MTag-DOcKm3c2.js.map} +1 -1
- package/dist/{MText-DEKnLtLk.cjs → MText-CxSZ2md0.cjs} +2 -2
- package/dist/{MText-DEKnLtLk.cjs.map → MText-CxSZ2md0.cjs.map} +1 -1
- package/dist/{MText-lZjEtV_i.js → MText-DX9O7gh7.js} +3 -3
- package/dist/{MText-lZjEtV_i.js.map → MText-DX9O7gh7.js.map} +1 -1
- package/dist/{MTimeAgo-Ci8UkEEk.cjs → MTimeAgo-91_ndjxU.cjs} +2 -2
- package/dist/{MTimeAgo-Ci8UkEEk.cjs.map → MTimeAgo-91_ndjxU.cjs.map} +1 -1
- package/dist/{MTimeAgo-4pfAn0iE.js → MTimeAgo-xxl53mct.js} +4 -4
- package/dist/{MTimeAgo-4pfAn0iE.js.map → MTimeAgo-xxl53mct.js.map} +1 -1
- package/dist/{MToggle-CndejlPX.js → MToggle-B6emKoKq.js} +3 -3
- package/dist/{MToggle-CndejlPX.js.map → MToggle-B6emKoKq.js.map} +1 -1
- package/dist/{MToggle-Dom6azGw.cjs → MToggle-CsGS_W3X.cjs} +2 -2
- package/dist/{MToggle-Dom6azGw.cjs.map → MToggle-CsGS_W3X.cjs.map} +1 -1
- package/dist/{MTooltip-CsJogGMW.cjs → MTooltip-CNXoyQEN.cjs} +2 -2
- package/dist/{MTooltip-CsJogGMW.cjs.map → MTooltip-CNXoyQEN.cjs.map} +1 -1
- package/dist/{MTooltip-DIqh59S2.js → MTooltip-UYOjDBOu.js} +3 -3
- package/dist/{MTooltip-DIqh59S2.js.map → MTooltip-UYOjDBOu.js.map} +1 -1
- package/dist/{cards-CuxycY_U.js → cards-BE77zKTI.js} +299 -304
- package/dist/cards-BE77zKTI.js.map +1 -0
- package/dist/cards-BINs-dmS.cjs +2 -0
- package/dist/cards-BINs-dmS.cjs.map +1 -0
- package/dist/cards.cjs +1 -1
- package/dist/cards.js +2 -2
- package/dist/{cn-SOcVdnX6.cjs → cn-CU5TNITO.cjs} +1 -1
- package/dist/{cn-SOcVdnX6.cjs.map → cn-CU5TNITO.cjs.map} +1 -1
- package/dist/{cn-DZLxql0l.js → cn-YER3QsV1.js} +1 -1
- package/dist/{cn-DZLxql0l.js.map → cn-YER3QsV1.js.map} +1 -1
- package/dist/components/data/index.d.ts +1 -1
- package/dist/components/feedback/MCookie/MCookieBootstrap/MCookieBootstrap.script.d.ts +4 -0
- package/dist/components/feedback/MCookie/MCookieConsent/index.d.ts +1 -1
- package/dist/components/layout/MNavbar/MNavbar.d.ts +1 -1
- package/dist/components/layout/MNavbar/MNavbar.types.d.ts +4 -0
- package/dist/components/layout/MNavbar/index.d.ts +1 -1
- package/dist/components/layout/MNavs/MNavs.types.d.ts +12 -2
- package/dist/components/layout/MNavs/index.d.ts +1 -1
- package/dist/{controls-CO70zfcl.js → controls-BMwQ3C1R.js} +5 -5
- package/dist/controls-BMwQ3C1R.js.map +1 -0
- package/dist/controls-DwL1-nVC.cjs +2 -0
- package/dist/controls-DwL1-nVC.cjs.map +1 -0
- package/dist/controls.cjs +1 -1
- package/dist/controls.js +6 -6
- package/dist/cookie-consent-bootstrap.cjs +1 -1
- package/dist/cookie-consent-bootstrap.cjs.map +1 -1
- package/dist/cookie-consent-bootstrap.js +45 -32
- package/dist/cookie-consent-bootstrap.js.map +1 -1
- package/dist/{creditCards-CoZpbB1e.js → creditCards-CCysEwry.js} +1 -1
- package/dist/{creditCards-CoZpbB1e.js.map → creditCards-CCysEwry.js.map} +1 -1
- package/dist/{creditCards-BjHGqAFx.cjs → creditCards-ljs044xt.cjs} +1 -1
- package/dist/{creditCards-BjHGqAFx.cjs.map → creditCards-ljs044xt.cjs.map} +1 -1
- package/dist/data-BESfox0z.cjs +2 -0
- package/dist/data-BESfox0z.cjs.map +1 -0
- package/dist/{data-CaRwdLlD.js → data-s8Hkht1B.js} +714 -718
- package/dist/data-s8Hkht1B.js.map +1 -0
- package/dist/data.cjs +1 -1
- package/dist/data.js +3 -3
- package/dist/{dateUtils-BOsYyWde.js → dateUtils-CUY6CRCf.js} +1 -1
- package/dist/{dateUtils-BOsYyWde.js.map → dateUtils-CUY6CRCf.js.map} +1 -1
- package/dist/{dateUtils-xSfrXjbY.cjs → dateUtils-Dq1vaA-D.cjs} +1 -1
- package/dist/{dateUtils-xSfrXjbY.cjs.map → dateUtils-Dq1vaA-D.cjs.map} +1 -1
- package/dist/display-B0lpgApV.cjs +2 -0
- package/dist/{display-DHpFRcAP.cjs.map → display-B0lpgApV.cjs.map} +1 -1
- package/dist/{display-CkzrTEdb.js → display-DuBRiEKr.js} +5 -6
- package/dist/{display-CkzrTEdb.js.map → display-DuBRiEKr.js.map} +1 -1
- package/dist/display.cjs +1 -1
- package/dist/display.js +3 -3
- package/dist/{dropdowns-BPRJL_2d.js → dropdowns-BcVrUMPE.js} +106 -110
- package/dist/dropdowns-BcVrUMPE.js.map +1 -0
- package/dist/dropdowns-CK-oxd62.cjs +2 -0
- package/dist/dropdowns-CK-oxd62.cjs.map +1 -0
- package/dist/dropdowns.cjs +1 -1
- package/dist/dropdowns.js +1 -1
- package/dist/{feedback-Cgu8ez5M.js → feedback-D3LLKNlY.js} +238 -240
- package/dist/{feedback-Cgu8ez5M.js.map → feedback-D3LLKNlY.js.map} +1 -1
- package/dist/feedback-DYjg0Dbp.cjs +2 -0
- package/dist/{feedback-DBhETzTM.cjs.map → feedback-DYjg0Dbp.cjs.map} +1 -1
- package/dist/feedback.cjs +1 -1
- package/dist/feedback.js +6 -6
- package/dist/{form-rDra9x3X.cjs → form-6JwrowsS.cjs} +2 -2
- package/dist/{form-rDra9x3X.cjs.map → form-6JwrowsS.cjs.map} +1 -1
- package/dist/{form-XhjrsBOv.js → form-CFWADsyf.js} +2 -2
- package/dist/{form-XhjrsBOv.js.map → form-CFWADsyf.js.map} +1 -1
- package/dist/form.cjs +1 -1
- package/dist/form.js +1 -1
- package/dist/{formatters-BIijIfCB.cjs → formatters-CNjg_h7-.cjs} +1 -1
- package/dist/{formatters-BIijIfCB.cjs.map → formatters-CNjg_h7-.cjs.map} +1 -1
- package/dist/{formatters-DMI5QqhS.js → formatters-T0vvjMtB.js} +1 -1
- package/dist/{formatters-DMI5QqhS.js.map → formatters-T0vvjMtB.js.map} +1 -1
- package/dist/{frameworkTexts-DH2N7l8F.js → frameworkTexts-B6oE8pMk.js} +1 -1
- package/dist/{frameworkTexts-DH2N7l8F.js.map → frameworkTexts-B6oE8pMk.js.map} +1 -1
- package/dist/{frameworkTexts-Ds2orE1v.cjs → frameworkTexts-C_9KZK_A.cjs} +1 -1
- package/dist/{frameworkTexts-Ds2orE1v.cjs.map → frameworkTexts-C_9KZK_A.cjs.map} +1 -1
- package/dist/i18n.d.ts +1 -1
- package/dist/icons-D5DK-J2C.js +4855 -0
- package/dist/icons-D5DK-J2C.js.map +1 -0
- package/dist/icons-Dv1T-cF4.cjs +2 -0
- package/dist/icons-Dv1T-cF4.cjs.map +1 -0
- package/dist/icons.cjs +1 -1
- package/dist/icons.d.ts +1 -1
- package/dist/icons.js +2 -23
- package/dist/illustrations.cjs +1 -1
- package/dist/illustrations.d.ts +1 -1
- package/dist/illustrations.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +59 -79
- package/dist/inputs-Dcj6C_Fn.cjs +2 -0
- package/dist/{inputs-DPhzLJZH.cjs.map → inputs-Dcj6C_Fn.cjs.map} +1 -1
- package/dist/{inputs-BBJgVLXO.js → inputs-bCxSLz-U.js} +424 -430
- package/dist/{inputs-BBJgVLXO.js.map → inputs-bCxSLz-U.js.map} +1 -1
- package/dist/inputs.cjs +1 -1
- package/dist/inputs.js +4 -4
- package/dist/{layout-CdAUOdYv.js → layout-Cb94o3oU.js} +291 -219
- package/dist/layout-Cb94o3oU.js.map +1 -0
- package/dist/layout-DgfsQ-Tn.cjs +2 -0
- package/dist/layout-DgfsQ-Tn.cjs.map +1 -0
- package/dist/layout.cjs +1 -1
- package/dist/layout.js +6 -6
- package/dist/{layoutProps-CZ-XhpIX.cjs → layoutProps-Ck4VtGm9.cjs} +1 -1
- package/dist/{layoutProps-CZ-XhpIX.cjs.map → layoutProps-Ck4VtGm9.cjs.map} +1 -1
- package/dist/{layoutProps-DUPQsWy9.js → layoutProps-Cl6d1KmH.js} +1 -1
- package/dist/{layoutProps-DUPQsWy9.js.map → layoutProps-Cl6d1KmH.js.map} +1 -1
- package/dist/{licensing-CMLexRJk.cjs → licensing-BXFauUj_.cjs} +1 -1
- package/dist/{licensing-CMLexRJk.cjs.map → licensing-BXFauUj_.cjs.map} +1 -1
- package/dist/{licensing-SQAMYrOI.js → licensing-CwzqhHH9.js} +1 -1
- package/dist/{licensing-SQAMYrOI.js.map → licensing-CwzqhHH9.js.map} +1 -1
- package/dist/{locale-DPqdZjGC.js → locale-BNyzqXAU.js} +1 -1
- package/dist/{locale-DPqdZjGC.js.map → locale-BNyzqXAU.js.map} +1 -1
- package/dist/{locale-BG4Q6P_O.cjs → locale-BltrWJtd.cjs} +1 -1
- package/dist/{locale-BG4Q6P_O.cjs.map → locale-BltrWJtd.cjs.map} +1 -1
- package/dist/{media-Yp4PedIi.js → media-8aMOtckF.js} +12 -12
- package/dist/{media-Yp4PedIi.js.map → media-8aMOtckF.js.map} +1 -1
- package/dist/media-D5YGOTm7.cjs +2 -0
- package/dist/{media-Cc2wBvkb.cjs.map → media-D5YGOTm7.cjs.map} +1 -1
- package/dist/media.cjs +1 -1
- package/dist/media.js +3 -3
- package/dist/overlays-DCj-oV2H.cjs +2 -0
- package/dist/{overlays-CmF2tV32.cjs.map → overlays-DCj-oV2H.cjs.map} +1 -1
- package/dist/{overlays-BBlMSWS8.js → overlays-gjg00CAf.js} +7 -7
- package/dist/{overlays-BBlMSWS8.js.map → overlays-gjg00CAf.js.map} +1 -1
- package/dist/overlays.cjs +1 -1
- package/dist/overlays.js +5 -5
- package/dist/primitives.cjs +1 -1
- package/dist/primitives.js +2 -2
- package/dist/{relativeTime-3dGgniAK.js → relativeTime-Cr-NVzij.js} +1 -1
- package/dist/{relativeTime-3dGgniAK.js.map → relativeTime-Cr-NVzij.js.map} +1 -1
- package/dist/{relativeTime-D5qYOJVu.cjs → relativeTime-DgYBUaVm.cjs} +1 -1
- package/dist/{relativeTime-D5qYOJVu.cjs.map → relativeTime-DgYBUaVm.cjs.map} +1 -1
- package/dist/style-runtime.cjs +1 -1
- package/dist/style-runtime.js +1 -1
- package/dist/styles.css +1 -1
- package/dist/{MThemeProvider-DUuTvWdm.js → theme-BV4qkzZU.js} +1 -1
- package/dist/theme-BV4qkzZU.js.map +1 -0
- package/dist/{MThemeProvider-9JHArSd7.cjs → theme-DLorpkJc.cjs} +1 -1
- package/dist/theme-DLorpkJc.cjs.map +1 -0
- package/dist/theme.cjs +1 -1
- package/dist/theme.d.ts +1 -1
- package/dist/theme.js +1 -1
- package/dist/{typography-DZx1M8Wc.js → typography-DKdr1Tds.js} +3 -3
- package/dist/{typography-DZx1M8Wc.js.map → typography-DKdr1Tds.js.map} +1 -1
- package/dist/{typography-B9-sCjsR.cjs → typography-qbFGv1gA.cjs} +2 -2
- package/dist/{typography-B9-sCjsR.cjs.map → typography-qbFGv1gA.cjs.map} +1 -1
- package/dist/typography.cjs +1 -1
- package/dist/typography.js +5 -5
- package/dist/{useGhostText-Zq3iktss.js → useGhostText-DG0bzcao.js} +1 -1
- package/dist/{useGhostText-Zq3iktss.js.map → useGhostText-DG0bzcao.js.map} +1 -1
- package/dist/{useGhostText-CL1kSB_V.cjs → useGhostText-QMdO_HK6.cjs} +1 -1
- package/dist/{useGhostText-CL1kSB_V.cjs.map → useGhostText-QMdO_HK6.cjs.map} +1 -1
- package/dist/{useInteractionEffect-BLehDk91.cjs → useInteractionEffect-DnEfbCrX.cjs} +1 -1
- package/dist/{useInteractionEffect-BLehDk91.cjs.map → useInteractionEffect-DnEfbCrX.cjs.map} +1 -1
- package/dist/{useInteractionEffect-Dfqq8lGO.js → useInteractionEffect-DtpbVd77.js} +1 -1
- package/dist/{useInteractionEffect-Dfqq8lGO.js.map → useInteractionEffect-DtpbVd77.js.map} +1 -1
- package/dist/{useKeyboardNav-DBeCcTmg.cjs → useKeyboardNav-BrODLJaL.cjs} +1 -1
- package/dist/{useKeyboardNav-DBeCcTmg.cjs.map → useKeyboardNav-BrODLJaL.cjs.map} +1 -1
- package/dist/{useKeyboardNav-DXvrPrx9.js → useKeyboardNav-iEXOdEMB.js} +1 -1
- package/dist/{useKeyboardNav-DXvrPrx9.js.map → useKeyboardNav-iEXOdEMB.js.map} +1 -1
- package/dist/{useReveal-DzskFHKb.js → useReveal-BJ59usiL.js} +1 -1
- package/dist/{useReveal-DzskFHKb.js.map → useReveal-BJ59usiL.js.map} +1 -1
- package/dist/{useReveal-CdIoh0Rk.cjs → useReveal-B_17PI89.cjs} +1 -1
- package/dist/{useReveal-CdIoh0Rk.cjs.map → useReveal-B_17PI89.cjs.map} +1 -1
- package/dist/utils.cjs +1 -1
- package/dist/utils.js +11 -11
- package/dist/{validators-CyDTl6cC.cjs → validators-BeNTD8mf.cjs} +1 -1
- package/dist/{validators-CyDTl6cC.cjs.map → validators-BeNTD8mf.cjs.map} +1 -1
- package/dist/{validators-ljBWrIca.js → validators-H8tNxb8O.js} +1 -1
- package/dist/{validators-ljBWrIca.js.map → validators-H8tNxb8O.js.map} +1 -1
- package/package.json +1 -1
- package/dist/MArrowDownIcon-BcKSgdTY.js +0 -15
- package/dist/MArrowDownIcon-BcKSgdTY.js.map +0 -1
- package/dist/MArrowDownIcon-C8EAODgv.cjs +0 -2
- package/dist/MArrowDownIcon-C8EAODgv.cjs.map +0 -1
- package/dist/MArrowUpDownIcon-CW_PWr7Q.cjs +0 -2
- package/dist/MArrowUpDownIcon-CW_PWr7Q.cjs.map +0 -1
- package/dist/MArrowUpDownIcon-DukXemVA.js +0 -19
- package/dist/MArrowUpDownIcon-DukXemVA.js.map +0 -1
- package/dist/MArrowUpIcon-DWV_HYrz.cjs +0 -2
- package/dist/MArrowUpIcon-DWV_HYrz.cjs.map +0 -1
- package/dist/MArrowUpIcon-Dan-4hs8.js +0 -15
- package/dist/MArrowUpIcon-Dan-4hs8.js.map +0 -1
- package/dist/MBadge-Babyr1R9.cjs.map +0 -1
- package/dist/MBadge-BjZX0MIC.js.map +0 -1
- package/dist/MBrandMoreIcons-IQoXQOXv.js +0 -873
- package/dist/MBrandMoreIcons-IQoXQOXv.js.map +0 -1
- package/dist/MBrandMoreIcons-aks8CSrY.cjs +0 -2
- package/dist/MBrandMoreIcons-aks8CSrY.cjs.map +0 -1
- package/dist/MCalendarIcon-DXTVH31q.js +0 -29
- package/dist/MCalendarIcon-DXTVH31q.js.map +0 -1
- package/dist/MCalendarIcon-S4GQsUlu.cjs +0 -2
- package/dist/MCalendarIcon-S4GQsUlu.cjs.map +0 -1
- package/dist/MChatIcon-Bb3DbYgB.js +0 -96
- package/dist/MChatIcon-Bb3DbYgB.js.map +0 -1
- package/dist/MChatIcon-C-5VN1TR.cjs +0 -2
- package/dist/MChatIcon-C-5VN1TR.cjs.map +0 -1
- package/dist/MCheckIcon-DQumT4HX.js +0 -15
- package/dist/MCheckIcon-DQumT4HX.js.map +0 -1
- package/dist/MCheckIcon-ck_21ybZ.cjs +0 -2
- package/dist/MCheckIcon-ck_21ybZ.cjs.map +0 -1
- package/dist/MChevronDownIcon-D3yTpzni.js +0 -15
- package/dist/MChevronDownIcon-D3yTpzni.js.map +0 -1
- package/dist/MChevronDownIcon-DCMmxkRt.cjs +0 -2
- package/dist/MChevronDownIcon-DCMmxkRt.cjs.map +0 -1
- package/dist/MChevronRightIcon-BC08M6g8.cjs +0 -2
- package/dist/MChevronRightIcon-BC08M6g8.cjs.map +0 -1
- package/dist/MChevronRightIcon-CXs8IHiV.js +0 -21
- package/dist/MChevronRightIcon-CXs8IHiV.js.map +0 -1
- package/dist/MClockIcon-DTevPaRf.js +0 -19
- package/dist/MClockIcon-DTevPaRf.js.map +0 -1
- package/dist/MClockIcon-DoskImOg.cjs +0 -2
- package/dist/MClockIcon-DoskImOg.cjs.map +0 -1
- package/dist/MCloseIcon-6cfw9trj.cjs +0 -2
- package/dist/MCloseIcon-6cfw9trj.cjs.map +0 -1
- package/dist/MCloseIcon-lDH3Vc10.js +0 -15
- package/dist/MCloseIcon-lDH3Vc10.js.map +0 -1
- package/dist/MDataTable-B0QbAjVI.cjs +0 -2
- package/dist/MDrawer-_Bao-x1w.cjs +0 -2
- package/dist/MEllipsisVerticalIcon-CXmu-bHJ.js +0 -43
- package/dist/MEllipsisVerticalIcon-CXmu-bHJ.js.map +0 -1
- package/dist/MEllipsisVerticalIcon-CufhU4cO.cjs +0 -2
- package/dist/MEllipsisVerticalIcon-CufhU4cO.cjs.map +0 -1
- package/dist/MFileExtIcons-CPsgV8eQ.cjs +0 -2
- package/dist/MFileExtIcons-CPsgV8eQ.cjs.map +0 -1
- package/dist/MFileExtIcons-Cxbgd5Fz.js +0 -145
- package/dist/MFileExtIcons-Cxbgd5Fz.js.map +0 -1
- package/dist/MIcon-BPr09_p4.js +0 -49
- package/dist/MIcon-BPr09_p4.js.map +0 -1
- package/dist/MIcon-CX5beo32.cjs +0 -2
- package/dist/MIcon-CX5beo32.cjs.map +0 -1
- package/dist/MImage-C99xrQQ9.js.map +0 -1
- package/dist/MImage-DbianX0t.cjs.map +0 -1
- package/dist/MInput-Bpkn3gOQ.cjs +0 -2
- package/dist/MInputCVC-Bl8i97Y0.cjs +0 -2
- package/dist/MInputCVC-Bl8i97Y0.cjs.map +0 -1
- package/dist/MInputCVC-CcG_KJvq.js.map +0 -1
- package/dist/MInputSearch-APMIHkYb.cjs +0 -2
- package/dist/MMenuIcon-A_eXBpM8.cjs +0 -2
- package/dist/MMenuIcon-A_eXBpM8.cjs.map +0 -1
- package/dist/MMenuIcon-CbBHfxVa.js +0 -20
- package/dist/MMenuIcon-CbBHfxVa.js.map +0 -1
- package/dist/MPagination-3fsF3pCM.cjs +0 -2
- package/dist/MPhoneIcon-D5JEg8LZ.js +0 -38
- package/dist/MPhoneIcon-D5JEg8LZ.js.map +0 -1
- package/dist/MPhoneIcon-D5unTWyf.cjs +0 -2
- package/dist/MPhoneIcon-D5unTWyf.cjs.map +0 -1
- package/dist/MProtectIcon-B_m67eu1.cjs +0 -2
- package/dist/MProtectIcon-B_m67eu1.cjs.map +0 -1
- package/dist/MProtectIcon-s_IpKWPz.js +0 -80
- package/dist/MProtectIcon-s_IpKWPz.js.map +0 -1
- package/dist/MQrCode-ClP7YJFt.cjs +0 -2
- package/dist/MSearchIcon-BakfEJQd.cjs +0 -2
- package/dist/MSearchIcon-BakfEJQd.cjs.map +0 -1
- package/dist/MSearchIcon-Dlg4Og8t.js +0 -24
- package/dist/MSearchIcon-Dlg4Og8t.js.map +0 -1
- package/dist/MSparkline-LfEfA310.js.map +0 -1
- package/dist/MSparkline-lRq3gAYU.cjs.map +0 -1
- package/dist/MStarFillIcon-BxKSY0VO.js +0 -25
- package/dist/MStarFillIcon-BxKSY0VO.js.map +0 -1
- package/dist/MStarFillIcon-CnINKvE4.cjs +0 -2
- package/dist/MStarFillIcon-CnINKvE4.cjs.map +0 -1
- package/dist/MSuccessIcon-Cvs8ER4y.cjs +0 -2
- package/dist/MSuccessIcon-Cvs8ER4y.cjs.map +0 -1
- package/dist/MSuccessIcon-DH5Z83mM.js +0 -33
- package/dist/MSuccessIcon-DH5Z83mM.js.map +0 -1
- package/dist/MTag-BMi1GS7v.cjs +0 -2
- package/dist/MThemeProvider-9JHArSd7.cjs.map +0 -1
- package/dist/MThemeProvider-DUuTvWdm.js.map +0 -1
- package/dist/MZoomInIcon-BEdmglk6.js +0 -134
- package/dist/MZoomInIcon-BEdmglk6.js.map +0 -1
- package/dist/MZoomInIcon-dhRm7zT6.cjs +0 -2
- package/dist/MZoomInIcon-dhRm7zT6.cjs.map +0 -1
- package/dist/cards-Bp7jOY3_.cjs +0 -2
- package/dist/cards-Bp7jOY3_.cjs.map +0 -1
- package/dist/cards-CuxycY_U.js.map +0 -1
- package/dist/controls-BJe59nXf.cjs +0 -2
- package/dist/controls-BJe59nXf.cjs.map +0 -1
- package/dist/controls-CO70zfcl.js.map +0 -1
- package/dist/data-CaRwdLlD.js.map +0 -1
- package/dist/data-r5uYgiWq.cjs +0 -2
- package/dist/data-r5uYgiWq.cjs.map +0 -1
- package/dist/display-DHpFRcAP.cjs +0 -2
- package/dist/dropdowns-BPRJL_2d.js.map +0 -1
- package/dist/dropdowns-BTbAnQxt.cjs +0 -2
- package/dist/dropdowns-BTbAnQxt.cjs.map +0 -1
- package/dist/feedback-DBhETzTM.cjs +0 -2
- package/dist/icons.entry-LwjwnjE2.cjs +0 -2
- package/dist/icons.entry-LwjwnjE2.cjs.map +0 -1
- package/dist/icons.entry-txsQqMvb.js +0 -3318
- package/dist/icons.entry-txsQqMvb.js.map +0 -1
- package/dist/illustrations.entry-C0rSNpF1.js.map +0 -1
- package/dist/inputs-DPhzLJZH.cjs +0 -2
- package/dist/layout-CdAUOdYv.js.map +0 -1
- package/dist/layout-DsY7-y6U.cjs +0 -2
- package/dist/layout-DsY7-y6U.cjs.map +0 -1
- package/dist/media-Cc2wBvkb.cjs +0 -2
- package/dist/overlays-CmF2tV32.cjs +0 -2
|
@@ -1,130 +1,126 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t } from "./
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { t as
|
|
7
|
-
import { t as
|
|
8
|
-
import { t as
|
|
9
|
-
import { r as
|
|
10
|
-
import { t as
|
|
11
|
-
import { t as B } from "./
|
|
12
|
-
import {
|
|
13
|
-
import { t as
|
|
14
|
-
import {
|
|
15
|
-
import { t as
|
|
16
|
-
import {
|
|
17
|
-
import { t as
|
|
18
|
-
import { t as
|
|
19
|
-
import { t as
|
|
20
|
-
import {
|
|
21
|
-
import { t as
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import { t as Ae } from "./MStack-CuUE9u4h.js";
|
|
26
|
-
import { t as je } from "./MCheckbox-DW-liYve.js";
|
|
27
|
-
import { Children as Me, createContext as Ne, isValidElement as Pe, useCallback as q, useContext as Fe, useEffect as Ie, useMemo as J, useRef as Y, useState as X } from "react";
|
|
28
|
-
import { Fragment as Le, jsx as Z, jsxs as Q } from "react/jsx-runtime";
|
|
1
|
+
import { $r as e, Ar as t, At as n, Br as r, Cr as i, Dr as a, Er as o, Fr as s, Gr as c, Hr as l, Ii as u, Ir as d, Jr as f, Kr as p, Lr as m, Ni as h, Nr as g, Or as _, Pr as v, Qr as y, Rr as b, Sr as x, Ti as S, Ur as C, Vr as w, Wr as T, Zr as E, _r as D, br as O, dn as k, ei as A, jr as j, jt as M, ki as N, kr as P, nn as ee, qr as te, ri as ne, sn as re, tn as ie, wr as ae, xr as F, zr as oe } from "./icons-D5DK-J2C.js";
|
|
2
|
+
import { t as I } from "./cn-YER3QsV1.js";
|
|
3
|
+
import { t as L } from "./MPortal-Dqlkh3hw.js";
|
|
4
|
+
import { t as R } from "./MPopover-BC9C5967.js";
|
|
5
|
+
import { t as se } from "./MInline-Dfy3Lrjs.js";
|
|
6
|
+
import { t as z } from "./MText-DX9O7gh7.js";
|
|
7
|
+
import { t as ce } from "./MHeading-C3IgV22T.js";
|
|
8
|
+
import { t as le } from "./MSubText-C2oxXwKT.js";
|
|
9
|
+
import { r as ue, t as de } from "./MButton-BmTDe5Oa.js";
|
|
10
|
+
import { t as fe } from "./MCheckbox-B7SpcD4H.js";
|
|
11
|
+
import { t as B } from "./MBadge-Y1JnZiIC.js";
|
|
12
|
+
import { n as V, r as H } from "./MSkeleton-CauCfkzj.js";
|
|
13
|
+
import { t as pe } from "./MModal-DShADuLw.js";
|
|
14
|
+
import { i as U, r as me } from "./MDropdownMenu-CxBhYxQb.js";
|
|
15
|
+
import { t as he } from "./locale-BNyzqXAU.js";
|
|
16
|
+
import { t as ge } from "./MTimeAgo-xxl53mct.js";
|
|
17
|
+
import { t as _e } from "./MImage-BDcrV6IC.js";
|
|
18
|
+
import { t as ve } from "./MAvatar-BoO51a6m.js";
|
|
19
|
+
import { t as ye } from "./MInputSearch-CH5ZcjLq.js";
|
|
20
|
+
import { a as be, c as xe, d as Se, f as Ce, i as we, l as Te, n as Ee, o as De, r as Oe, s as W, u as ke } from "./MSparkline-Cb_EwR-E.js";
|
|
21
|
+
import { a as Ae, r as je, t as Me } from "./frameworkTexts-B6oE8pMk.js";
|
|
22
|
+
import { t as Ne } from "./MStack-Cifiqeb2.js";
|
|
23
|
+
import { Children as Pe, createContext as Fe, isValidElement as Ie, useCallback as G, useContext as Le, useEffect as Re, useMemo as K, useRef as q, useState as J } from "react";
|
|
24
|
+
import { Fragment as ze, jsx as Y, jsxs as X } from "react/jsx-runtime";
|
|
29
25
|
//#region src/components/data/MChat/MChatContext.ts
|
|
30
|
-
var
|
|
31
|
-
function
|
|
32
|
-
return
|
|
26
|
+
var Be = Fe({});
|
|
27
|
+
function Ve() {
|
|
28
|
+
return Le(Be);
|
|
33
29
|
}
|
|
34
30
|
//#endregion
|
|
35
31
|
//#region src/components/data/MChat/MChat.tsx
|
|
36
|
-
function
|
|
37
|
-
return
|
|
38
|
-
}
|
|
39
|
-
function
|
|
40
|
-
let
|
|
41
|
-
|
|
42
|
-
if (
|
|
43
|
-
|
|
32
|
+
function He(e, t) {
|
|
33
|
+
return Ie(e) && !!e.type[t];
|
|
34
|
+
}
|
|
35
|
+
function Ue({ variant: e = "inline", open: t, onToggle: r, unreadCount: i, color: a = "primary", className: o, children: s, ...c }) {
|
|
36
|
+
let l = null, u = null, d = [];
|
|
37
|
+
Pe.forEach(s, (e) => {
|
|
38
|
+
if (He(e, "__chatHeader")) {
|
|
39
|
+
l = e;
|
|
44
40
|
return;
|
|
45
41
|
}
|
|
46
|
-
if (
|
|
47
|
-
|
|
42
|
+
if (He(e, "__chatConversationList")) {
|
|
43
|
+
u = e;
|
|
48
44
|
return;
|
|
49
45
|
}
|
|
50
|
-
|
|
46
|
+
d.push(e);
|
|
51
47
|
});
|
|
52
|
-
let
|
|
53
|
-
value:
|
|
54
|
-
children: /* @__PURE__ */
|
|
55
|
-
className: I("chat", e, `color-${
|
|
56
|
-
...
|
|
57
|
-
children: [
|
|
48
|
+
let f = K(() => ({ color: a }), [a]), p = /* @__PURE__ */ Y(Be.Provider, {
|
|
49
|
+
value: f,
|
|
50
|
+
children: /* @__PURE__ */ X("div", {
|
|
51
|
+
className: I("chat", e, `color-${a}`, e === "floating" && t && "open", o),
|
|
52
|
+
...c,
|
|
53
|
+
children: [u && /* @__PURE__ */ Y("div", {
|
|
58
54
|
className: "chat-sidebar",
|
|
59
|
-
children:
|
|
60
|
-
}), /* @__PURE__ */
|
|
55
|
+
children: u
|
|
56
|
+
}), /* @__PURE__ */ X("div", {
|
|
61
57
|
className: "chat-main",
|
|
62
|
-
children: [
|
|
58
|
+
children: [l, d]
|
|
63
59
|
})]
|
|
64
60
|
})
|
|
65
61
|
});
|
|
66
|
-
return e === "floating" ? /* @__PURE__ */
|
|
62
|
+
return e === "floating" ? /* @__PURE__ */ Y(L, { children: /* @__PURE__ */ X("div", {
|
|
67
63
|
className: I("chat-floating-wrapper", t && "open"),
|
|
68
|
-
children: [t && p, /* @__PURE__ */
|
|
64
|
+
children: [t && p, /* @__PURE__ */ Y(de, {
|
|
69
65
|
variant: "filled",
|
|
70
|
-
color:
|
|
66
|
+
color: a,
|
|
71
67
|
shape: "circle",
|
|
72
68
|
size: "lg",
|
|
73
69
|
className: "chat-floating-trigger",
|
|
74
|
-
onClick:
|
|
70
|
+
onClick: r,
|
|
75
71
|
"aria-label": t ? "Close chat" : "Open chat",
|
|
76
|
-
badge: !t &&
|
|
72
|
+
badge: !t && i ? i : void 0,
|
|
77
73
|
badgeColor: "error",
|
|
78
|
-
badgePulsing: !t && !!
|
|
79
|
-
children: /* @__PURE__ */
|
|
74
|
+
badgePulsing: !t && !!i,
|
|
75
|
+
children: /* @__PURE__ */ Y(n, {})
|
|
80
76
|
})]
|
|
81
77
|
}) }) : p;
|
|
82
78
|
}
|
|
83
79
|
//#endregion
|
|
84
80
|
//#region src/components/data/MChat/MChatHeader.tsx
|
|
85
|
-
function
|
|
86
|
-
return /* @__PURE__ */
|
|
81
|
+
function We({ bordered: e = !1, className: t, children: n, ...r }) {
|
|
82
|
+
return /* @__PURE__ */ Y("div", {
|
|
87
83
|
className: I("chat-header", e && "bordered", t),
|
|
88
84
|
...r,
|
|
89
85
|
children: n
|
|
90
86
|
});
|
|
91
87
|
}
|
|
92
|
-
|
|
88
|
+
We.__chatHeader = !0;
|
|
93
89
|
//#endregion
|
|
94
90
|
//#region src/components/data/MChat/MChatMessage.tsx
|
|
95
|
-
function
|
|
91
|
+
function Ge({ status: e }) {
|
|
96
92
|
if (!e) return null;
|
|
97
93
|
let t = e === "delivered" || e === "read";
|
|
98
|
-
return /* @__PURE__ */
|
|
94
|
+
return /* @__PURE__ */ Y("span", {
|
|
99
95
|
className: I("chat-status", e === "read" ? "chat-status-read" : ""),
|
|
100
96
|
"aria-label": e,
|
|
101
97
|
children: t ? "✓✓" : "✓"
|
|
102
98
|
});
|
|
103
99
|
}
|
|
104
|
-
function
|
|
100
|
+
function Ke({ message: e, showAvatar: t = !0, showTimestamp: n = !0, color: r, className: i, ...a }) {
|
|
105
101
|
let { content: o, sender: s, timestamp: c, status: l, isOwn: u, images: d } = e;
|
|
106
|
-
return /* @__PURE__ */
|
|
102
|
+
return /* @__PURE__ */ X("div", {
|
|
107
103
|
className: I("chat-message", u && "own", r || void 0, i),
|
|
108
104
|
...a,
|
|
109
|
-
children: [t && !u && /* @__PURE__ */
|
|
105
|
+
children: [t && !u && /* @__PURE__ */ Y(ve, {
|
|
110
106
|
src: s.avatar,
|
|
111
107
|
name: s.name,
|
|
112
108
|
size: "sm",
|
|
113
109
|
color: r,
|
|
114
110
|
className: "chat-message-avatar"
|
|
115
|
-
}), /* @__PURE__ */
|
|
111
|
+
}), /* @__PURE__ */ X("div", {
|
|
116
112
|
className: "chat-message-content",
|
|
117
113
|
children: [
|
|
118
|
-
!u && /* @__PURE__ */
|
|
114
|
+
!u && /* @__PURE__ */ Y(z, {
|
|
119
115
|
className: "chat-message-sender",
|
|
120
116
|
color: "neutral",
|
|
121
117
|
children: s.name
|
|
122
118
|
}),
|
|
123
|
-
/* @__PURE__ */
|
|
119
|
+
/* @__PURE__ */ X("div", {
|
|
124
120
|
className: "chat-message-bubble",
|
|
125
|
-
children: [o && /* @__PURE__ */
|
|
121
|
+
children: [o && /* @__PURE__ */ Y(z, { children: o }), d && d.length > 0 && /* @__PURE__ */ Y("div", {
|
|
126
122
|
className: I("chat-message-images", d.length > 1 && "grid"),
|
|
127
|
-
children: d.map((e, t) => /* @__PURE__ */
|
|
123
|
+
children: d.map((e, t) => /* @__PURE__ */ Y(_e, {
|
|
128
124
|
src: e,
|
|
129
125
|
alt: "",
|
|
130
126
|
fit: "cover",
|
|
@@ -133,11 +129,11 @@ function We({ message: e, showAvatar: t = !0, showTimestamp: n = !0, color: r, c
|
|
|
133
129
|
}, t))
|
|
134
130
|
})]
|
|
135
131
|
}),
|
|
136
|
-
/* @__PURE__ */
|
|
132
|
+
/* @__PURE__ */ X("div", {
|
|
137
133
|
className: "chat-message-meta",
|
|
138
|
-
children: [u && /* @__PURE__ */
|
|
134
|
+
children: [u && /* @__PURE__ */ Y(Ge, { status: l }), n && /* @__PURE__ */ Y(le, {
|
|
139
135
|
className: "chat-message-time",
|
|
140
|
-
children: /* @__PURE__ */
|
|
136
|
+
children: /* @__PURE__ */ Y(ge, { value: c })
|
|
141
137
|
})]
|
|
142
138
|
})
|
|
143
139
|
]
|
|
@@ -146,17 +142,17 @@ function We({ message: e, showAvatar: t = !0, showTimestamp: n = !0, color: r, c
|
|
|
146
142
|
}
|
|
147
143
|
//#endregion
|
|
148
144
|
//#region src/components/data/MChat/MChatBody.tsx
|
|
149
|
-
function
|
|
150
|
-
let { color: s } =
|
|
145
|
+
function qe({ messages: e, onScrollTop: t, loading: n = !1, color: r, className: i, children: a, ...o }) {
|
|
146
|
+
let { color: s } = Ve(), c = r ?? s, l = q(null), u = q(!0), d = q(0), f = G(() => {
|
|
151
147
|
let e = l.current;
|
|
152
148
|
e && (e.scrollTop = e.scrollHeight);
|
|
153
149
|
}, []);
|
|
154
|
-
return
|
|
150
|
+
return Re(() => {
|
|
155
151
|
let t = e?.length ?? 0;
|
|
156
152
|
t > d.current && u.current && f(), d.current = t;
|
|
157
|
-
}, [e?.length, f]),
|
|
153
|
+
}, [e?.length, f]), Re(() => {
|
|
158
154
|
f();
|
|
159
|
-
}, [f]), /* @__PURE__ */
|
|
155
|
+
}, [f]), /* @__PURE__ */ X("div", {
|
|
160
156
|
ref: l,
|
|
161
157
|
className: I("chat-body", i),
|
|
162
158
|
onScroll: () => {
|
|
@@ -165,11 +161,11 @@ function Ge({ messages: e, onScrollTop: t, loading: n = !1, color: r, className:
|
|
|
165
161
|
},
|
|
166
162
|
...o,
|
|
167
163
|
children: [
|
|
168
|
-
n && /* @__PURE__ */
|
|
164
|
+
n && /* @__PURE__ */ Y("div", {
|
|
169
165
|
className: "chat-body-loader",
|
|
170
|
-
children: /* @__PURE__ */
|
|
166
|
+
children: /* @__PURE__ */ Y(ue, { size: "sm" })
|
|
171
167
|
}),
|
|
172
|
-
e?.map((e) => /* @__PURE__ */
|
|
168
|
+
e?.map((e) => /* @__PURE__ */ Y(Ke, {
|
|
173
169
|
message: e,
|
|
174
170
|
color: c
|
|
175
171
|
}, e.id)),
|
|
@@ -179,7 +175,7 @@ function Ge({ messages: e, onScrollTop: t, loading: n = !1, color: r, className:
|
|
|
179
175
|
}
|
|
180
176
|
//#endregion
|
|
181
177
|
//#region src/components/data/MChat/emojis.ts
|
|
182
|
-
var
|
|
178
|
+
var Je = [
|
|
183
179
|
{
|
|
184
180
|
label: "Smileys",
|
|
185
181
|
emojis: /* @__PURE__ */ "😀.😃.😄.😁.😆.😅.🤣.😂.🙂.😊.😇.🥰.😍.🤩.😘.😗.😋.😛.😜.🤪.😝.🤗.🤔.🫡.🤐.🤨.😐.😑.😶.🫠.😏.😒.🙄.😬.😮💨.🤥.😌.😔.😪.🤤.😴.😷.🤒.🤕.🤢.🤮.🤧.🥵.🥶.😵.🤯.🥳.🥸.😎.🤓.🧐".split(".")
|
|
@@ -238,99 +234,99 @@ var Ke = [
|
|
|
238
234
|
"🔔"
|
|
239
235
|
]
|
|
240
236
|
}
|
|
241
|
-
],
|
|
242
|
-
function
|
|
243
|
-
let { color:
|
|
237
|
+
], Ye = "image/png,image/jpeg,image/gif,image/webp";
|
|
238
|
+
function Xe({ onSend: e, placeholder: t = "Type a message…", disabled: n = !1, showEmoji: r = !0, showAttach: i = !0, onTyping: a, color: o, className: s, ...c }) {
|
|
239
|
+
let { color: l } = Ve(), d = o ?? l, [f, p] = J(""), [m, h] = J(!1), [g, _] = J([]), [v, y] = J([]), [b, x] = J(!1), C = q(null), w = q(null), T = q(null), E = q(!1), D = q(void 0), O = G((e) => {
|
|
244
240
|
let t = e.filter((e) => e.type.startsWith("image/"));
|
|
245
|
-
t.length !== 0 && (
|
|
241
|
+
t.length !== 0 && (_((e) => [...e, ...t]), t.forEach((e) => {
|
|
246
242
|
let t = URL.createObjectURL(e);
|
|
247
|
-
|
|
243
|
+
y((e) => [...e, t]);
|
|
248
244
|
}));
|
|
249
|
-
}, []),
|
|
250
|
-
|
|
245
|
+
}, []), k = G((e) => {
|
|
246
|
+
y((t) => (URL.revokeObjectURL(t[e]), t.filter((t, n) => n !== e))), _((t) => t.filter((t, n) => n !== e));
|
|
251
247
|
}, []);
|
|
252
|
-
|
|
253
|
-
let
|
|
254
|
-
let
|
|
255
|
-
!
|
|
248
|
+
Re(() => () => v.forEach((e) => URL.revokeObjectURL(e)), []);
|
|
249
|
+
let A = G(() => {
|
|
250
|
+
let t = f.trim();
|
|
251
|
+
!t && g.length === 0 || n || (e?.(t, g.length > 0 ? g : void 0), p(""), _([]), y((e) => (e.forEach((e) => URL.revokeObjectURL(e)), [])), C.current && (C.current.style.height = "auto"), E.current && (E.current = !1, a?.(!1)));
|
|
256
252
|
}, [
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
]),
|
|
263
|
-
e.key === "Enter" && !e.shiftKey && (e.preventDefault(),
|
|
253
|
+
f,
|
|
254
|
+
g,
|
|
255
|
+
n,
|
|
256
|
+
e,
|
|
257
|
+
a
|
|
258
|
+
]), j = (e) => {
|
|
259
|
+
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), A());
|
|
264
260
|
}, N = (e) => {
|
|
265
|
-
|
|
266
|
-
|
|
261
|
+
p(e.target.value), P(e.target), a && (E.current || (E.current = !0, a(!0)), clearTimeout(D.current), D.current = setTimeout(() => {
|
|
262
|
+
E.current = !1, a(!1);
|
|
267
263
|
}, 1500));
|
|
268
264
|
}, P = (e) => {
|
|
269
265
|
e.style.height = "auto", e.style.height = Math.min(e.scrollHeight, 120) + "px";
|
|
270
266
|
};
|
|
271
|
-
|
|
267
|
+
Re(() => () => clearTimeout(D.current), []);
|
|
272
268
|
let ee = (e) => {
|
|
273
|
-
|
|
269
|
+
p((t) => t + e), h(!1), C.current?.focus();
|
|
274
270
|
}, te = (e) => {
|
|
275
|
-
e.preventDefault(),
|
|
271
|
+
e.preventDefault(), x(!0);
|
|
276
272
|
}, ne = (e) => {
|
|
277
|
-
e.preventDefault(),
|
|
273
|
+
e.preventDefault(), x(!1);
|
|
278
274
|
}, re = (e) => {
|
|
279
|
-
e.preventDefault(),
|
|
275
|
+
e.preventDefault(), x(!1), O(Array.from(e.dataTransfer.files));
|
|
280
276
|
}, ie = () => {
|
|
281
|
-
let e =
|
|
282
|
-
e &&
|
|
283
|
-
}, ae =
|
|
284
|
-
return /* @__PURE__ */
|
|
285
|
-
className: I("chat-input",
|
|
277
|
+
let e = T.current?.files;
|
|
278
|
+
e && O(Array.from(e)), T.current && (T.current.value = "");
|
|
279
|
+
}, ae = f.trim() || g.length > 0;
|
|
280
|
+
return /* @__PURE__ */ X("div", {
|
|
281
|
+
className: I("chat-input", b && "drag-over", s),
|
|
286
282
|
onDragOver: te,
|
|
287
283
|
onDragLeave: ne,
|
|
288
284
|
onDrop: re,
|
|
289
|
-
...
|
|
290
|
-
children: [
|
|
285
|
+
...c,
|
|
286
|
+
children: [v.length > 0 && /* @__PURE__ */ Y("div", {
|
|
291
287
|
className: "chat-input-previews",
|
|
292
|
-
children:
|
|
288
|
+
children: v.map((e, t) => /* @__PURE__ */ X("div", {
|
|
293
289
|
className: "chat-input-preview",
|
|
294
|
-
children: [/* @__PURE__ */
|
|
295
|
-
src:
|
|
290
|
+
children: [/* @__PURE__ */ Y(_e, {
|
|
291
|
+
src: e,
|
|
296
292
|
alt: "",
|
|
297
293
|
fit: "cover",
|
|
298
294
|
rounded: !0,
|
|
299
295
|
className: "chat-input-preview-img"
|
|
300
|
-
}), /* @__PURE__ */
|
|
296
|
+
}), /* @__PURE__ */ Y("button", {
|
|
301
297
|
type: "button",
|
|
302
298
|
className: "chat-input-preview-remove",
|
|
303
|
-
onClick: () =>
|
|
299
|
+
onClick: () => k(t),
|
|
304
300
|
"aria-label": "Remove image",
|
|
305
|
-
children: /* @__PURE__ */
|
|
301
|
+
children: /* @__PURE__ */ Y(u, {})
|
|
306
302
|
})]
|
|
307
|
-
},
|
|
308
|
-
}), /* @__PURE__ */
|
|
303
|
+
}, t))
|
|
304
|
+
}), /* @__PURE__ */ X("div", {
|
|
309
305
|
className: "chat-input-field",
|
|
310
306
|
children: [
|
|
311
|
-
|
|
312
|
-
ref:
|
|
307
|
+
r && /* @__PURE__ */ X(ze, { children: [/* @__PURE__ */ Y("button", {
|
|
308
|
+
ref: w,
|
|
313
309
|
type: "button",
|
|
314
310
|
className: "chat-input-emoji-trigger",
|
|
315
|
-
onClick: () =>
|
|
311
|
+
onClick: () => h((e) => !e),
|
|
316
312
|
"aria-label": "Emoji",
|
|
317
|
-
disabled:
|
|
313
|
+
disabled: n,
|
|
318
314
|
children: "😊"
|
|
319
|
-
}), /* @__PURE__ */
|
|
320
|
-
open:
|
|
321
|
-
anchorRef:
|
|
322
|
-
onClose: () =>
|
|
315
|
+
}), /* @__PURE__ */ Y(R, {
|
|
316
|
+
open: m,
|
|
317
|
+
anchorRef: w,
|
|
318
|
+
onClose: () => h(!1),
|
|
323
319
|
placement: "top-start",
|
|
324
|
-
children: /* @__PURE__ */
|
|
320
|
+
children: /* @__PURE__ */ Y("div", {
|
|
325
321
|
className: "chat-emoji-picker",
|
|
326
|
-
children:
|
|
322
|
+
children: Je.map((e) => /* @__PURE__ */ X("div", {
|
|
327
323
|
className: "chat-emoji-category",
|
|
328
|
-
children: [/* @__PURE__ */
|
|
324
|
+
children: [/* @__PURE__ */ Y("div", {
|
|
329
325
|
className: "chat-emoji-category-label",
|
|
330
326
|
children: e.label
|
|
331
|
-
}), /* @__PURE__ */
|
|
327
|
+
}), /* @__PURE__ */ Y("div", {
|
|
332
328
|
className: "chat-emoji-grid",
|
|
333
|
-
children: e.emojis.map((e) => /* @__PURE__ */
|
|
329
|
+
children: e.emojis.map((e) => /* @__PURE__ */ Y("button", {
|
|
334
330
|
type: "button",
|
|
335
331
|
className: "chat-emoji-btn",
|
|
336
332
|
onClick: () => ee(e),
|
|
@@ -340,43 +336,43 @@ function Je({ onSend: t, placeholder: n = "Type a message…", disabled: r = !1,
|
|
|
340
336
|
}, e.label))
|
|
341
337
|
})
|
|
342
338
|
})] }),
|
|
343
|
-
|
|
344
|
-
ref:
|
|
339
|
+
i && /* @__PURE__ */ X(ze, { children: [/* @__PURE__ */ Y("input", {
|
|
340
|
+
ref: T,
|
|
345
341
|
type: "file",
|
|
346
|
-
accept:
|
|
342
|
+
accept: Ye,
|
|
347
343
|
multiple: !0,
|
|
348
344
|
className: "chat-input-file-hidden",
|
|
349
345
|
onChange: ie,
|
|
350
346
|
tabIndex: -1
|
|
351
|
-
}), /* @__PURE__ */
|
|
347
|
+
}), /* @__PURE__ */ Y("button", {
|
|
352
348
|
type: "button",
|
|
353
349
|
className: "chat-input-attach-trigger",
|
|
354
|
-
onClick: () =>
|
|
350
|
+
onClick: () => T.current?.click(),
|
|
355
351
|
"aria-label": "Attach image",
|
|
356
|
-
disabled:
|
|
357
|
-
children: /* @__PURE__ */
|
|
352
|
+
disabled: n,
|
|
353
|
+
children: /* @__PURE__ */ Y(S, { color: "inherit" })
|
|
358
354
|
})] }),
|
|
359
|
-
/* @__PURE__ */
|
|
360
|
-
ref:
|
|
355
|
+
/* @__PURE__ */ Y("textarea", {
|
|
356
|
+
ref: C,
|
|
361
357
|
className: "chat-input-textarea",
|
|
362
|
-
value:
|
|
358
|
+
value: f,
|
|
363
359
|
onChange: N,
|
|
364
|
-
onKeyDown:
|
|
365
|
-
placeholder:
|
|
366
|
-
disabled:
|
|
360
|
+
onKeyDown: j,
|
|
361
|
+
placeholder: t,
|
|
362
|
+
disabled: n,
|
|
367
363
|
rows: 1
|
|
368
364
|
}),
|
|
369
|
-
/* @__PURE__ */
|
|
365
|
+
/* @__PURE__ */ Y(de, {
|
|
370
366
|
variant: "filled",
|
|
371
367
|
size: "sm",
|
|
372
|
-
color:
|
|
368
|
+
color: d ?? "primary",
|
|
373
369
|
iconOnly: !0,
|
|
374
370
|
shape: "circle",
|
|
375
371
|
className: "chat-input-send",
|
|
376
|
-
onClick:
|
|
377
|
-
disabled:
|
|
372
|
+
onClick: A,
|
|
373
|
+
disabled: n || !ae,
|
|
378
374
|
"aria-label": "Send",
|
|
379
|
-
children: /* @__PURE__ */
|
|
375
|
+
children: /* @__PURE__ */ Y(M, {})
|
|
380
376
|
})
|
|
381
377
|
]
|
|
382
378
|
})]
|
|
@@ -384,43 +380,43 @@ function Je({ onSend: t, placeholder: n = "Type a message…", disabled: r = !1,
|
|
|
384
380
|
}
|
|
385
381
|
//#endregion
|
|
386
382
|
//#region src/components/data/MChat/MChatTypingIndicator.tsx
|
|
387
|
-
function
|
|
383
|
+
function Ze({ users: e = [], visible: t = !0, className: n, ...r }) {
|
|
388
384
|
if (!t || e.length === 0) return null;
|
|
389
385
|
let i = e.length === 1 ? `${e[0].name} is typing` : e.length === 2 ? `${e[0].name} and ${e[1].name} are typing` : `${e[0].name} and ${e.length - 1} others are typing`;
|
|
390
|
-
return /* @__PURE__ */
|
|
386
|
+
return /* @__PURE__ */ X("div", {
|
|
391
387
|
className: I("chat-typing", n),
|
|
392
388
|
"aria-label": i,
|
|
393
389
|
...r,
|
|
394
|
-
children: [e.length === 1 && /* @__PURE__ */
|
|
390
|
+
children: [e.length === 1 && /* @__PURE__ */ Y(ve, {
|
|
395
391
|
src: e[0].avatar,
|
|
396
392
|
name: e[0].name,
|
|
397
393
|
size: "sm",
|
|
398
394
|
className: "chat-typing-avatar"
|
|
399
|
-
}), /* @__PURE__ */
|
|
395
|
+
}), /* @__PURE__ */ X("div", {
|
|
400
396
|
className: "chat-typing-dots",
|
|
401
397
|
children: [
|
|
402
|
-
/* @__PURE__ */
|
|
403
|
-
/* @__PURE__ */
|
|
404
|
-
/* @__PURE__ */
|
|
398
|
+
/* @__PURE__ */ Y("span", { className: "chat-typing-dot" }),
|
|
399
|
+
/* @__PURE__ */ Y("span", { className: "chat-typing-dot" }),
|
|
400
|
+
/* @__PURE__ */ Y("span", { className: "chat-typing-dot" })
|
|
405
401
|
]
|
|
406
402
|
})]
|
|
407
403
|
});
|
|
408
404
|
}
|
|
409
405
|
//#endregion
|
|
410
406
|
//#region src/components/data/MChat/MChatConversationList.tsx
|
|
411
|
-
function
|
|
412
|
-
return /* @__PURE__ */
|
|
407
|
+
function Qe({ className: e, children: t, ...n }) {
|
|
408
|
+
return /* @__PURE__ */ Y("div", {
|
|
413
409
|
className: I("chat-conversation-list", e),
|
|
414
410
|
...n,
|
|
415
411
|
children: t
|
|
416
412
|
});
|
|
417
413
|
}
|
|
418
|
-
|
|
414
|
+
Qe.__chatConversationList = !0;
|
|
419
415
|
//#endregion
|
|
420
416
|
//#region src/components/data/MChat/MChatConversationItem.tsx
|
|
421
|
-
function
|
|
422
|
-
let { color: o } =
|
|
423
|
-
return /* @__PURE__ */
|
|
417
|
+
function $e({ conversation: e, active: t = !1, color: n, onClick: r, className: i, ...a }) {
|
|
418
|
+
let { color: o } = Ve(), s = n ?? o, { title: c, participants: l, lastMessage: u, unreadCount: d } = e, f = c ?? l.map((e) => e.name).join(", "), p = l[0], m = l.some((e) => e.online);
|
|
419
|
+
return /* @__PURE__ */ X("div", {
|
|
424
420
|
className: I("chat-conversation-item", t && "active", i),
|
|
425
421
|
onClick: () => r?.(e),
|
|
426
422
|
role: "button",
|
|
@@ -429,7 +425,7 @@ function Ze({ conversation: e, active: t = !1, color: n, onClick: r, className:
|
|
|
429
425
|
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), r?.(e));
|
|
430
426
|
},
|
|
431
427
|
...a,
|
|
432
|
-
children: [/* @__PURE__ */
|
|
428
|
+
children: [/* @__PURE__ */ Y(ve, {
|
|
433
429
|
src: p?.avatar,
|
|
434
430
|
name: p?.name,
|
|
435
431
|
size: "md",
|
|
@@ -437,23 +433,23 @@ function Ze({ conversation: e, active: t = !1, color: n, onClick: r, className:
|
|
|
437
433
|
badge: m,
|
|
438
434
|
badgeColor: "success",
|
|
439
435
|
className: "chat-conversation-avatar"
|
|
440
|
-
}), /* @__PURE__ */
|
|
436
|
+
}), /* @__PURE__ */ X("div", {
|
|
441
437
|
className: "chat-conversation-info",
|
|
442
|
-
children: [/* @__PURE__ */
|
|
438
|
+
children: [/* @__PURE__ */ X("div", {
|
|
443
439
|
className: "chat-conversation-top",
|
|
444
|
-
children: [/* @__PURE__ */
|
|
440
|
+
children: [/* @__PURE__ */ Y(z, {
|
|
445
441
|
className: "chat-conversation-name",
|
|
446
442
|
children: f
|
|
447
|
-
}), u && /* @__PURE__ */
|
|
443
|
+
}), u && /* @__PURE__ */ Y(le, {
|
|
448
444
|
className: "chat-conversation-time",
|
|
449
|
-
children: /* @__PURE__ */
|
|
445
|
+
children: /* @__PURE__ */ Y(ge, { value: u.timestamp })
|
|
450
446
|
})]
|
|
451
|
-
}), u && /* @__PURE__ */
|
|
447
|
+
}), u && /* @__PURE__ */ X("div", {
|
|
452
448
|
className: "chat-conversation-bottom",
|
|
453
|
-
children: [/* @__PURE__ */
|
|
449
|
+
children: [/* @__PURE__ */ X(le, {
|
|
454
450
|
className: "chat-conversation-preview",
|
|
455
451
|
children: [u.isOwn ? "You: " : "", u.content]
|
|
456
|
-
}), !!d && d > 0 && /* @__PURE__ */
|
|
452
|
+
}), !!d && d > 0 && /* @__PURE__ */ Y(B, {
|
|
457
453
|
color: s ?? "primary",
|
|
458
454
|
size: "sm",
|
|
459
455
|
rounded: !0,
|
|
@@ -465,51 +461,51 @@ function Ze({ conversation: e, active: t = !1, color: n, onClick: r, className:
|
|
|
465
461
|
}
|
|
466
462
|
//#endregion
|
|
467
463
|
//#region src/components/data/MTreeView/MTreeView.tsx
|
|
468
|
-
var
|
|
469
|
-
pdf: /* @__PURE__ */
|
|
470
|
-
ts: /* @__PURE__ */
|
|
471
|
-
tsx: /* @__PURE__ */
|
|
472
|
-
js: /* @__PURE__ */
|
|
473
|
-
jsx: /* @__PURE__ */
|
|
474
|
-
css: /* @__PURE__ */
|
|
475
|
-
scss: /* @__PURE__ */
|
|
476
|
-
html: /* @__PURE__ */
|
|
477
|
-
json: /* @__PURE__ */
|
|
478
|
-
md: /* @__PURE__ */
|
|
479
|
-
txt: /* @__PURE__ */
|
|
480
|
-
csv: /* @__PURE__ */
|
|
481
|
-
zip: /* @__PURE__ */
|
|
482
|
-
rar: /* @__PURE__ */
|
|
483
|
-
svg: /* @__PURE__ */
|
|
484
|
-
png: /* @__PURE__ */
|
|
485
|
-
jpg: /* @__PURE__ */
|
|
486
|
-
jpeg: /* @__PURE__ */
|
|
487
|
-
gif: /* @__PURE__ */
|
|
488
|
-
webp: /* @__PURE__ */
|
|
489
|
-
php: /* @__PURE__ */
|
|
490
|
-
xml: /* @__PURE__ */
|
|
491
|
-
xls: /* @__PURE__ */
|
|
492
|
-
ppt: /* @__PURE__ */
|
|
493
|
-
odt: /* @__PURE__ */
|
|
494
|
-
exe: /* @__PURE__ */
|
|
495
|
-
mp3: /* @__PURE__ */
|
|
496
|
-
mp4: /* @__PURE__ */
|
|
464
|
+
var et = {
|
|
465
|
+
pdf: /* @__PURE__ */ Y(e, {}),
|
|
466
|
+
ts: /* @__PURE__ */ Y(l, {}),
|
|
467
|
+
tsx: /* @__PURE__ */ Y(C, {}),
|
|
468
|
+
js: /* @__PURE__ */ Y(t, {}),
|
|
469
|
+
jsx: /* @__PURE__ */ Y(E, {}),
|
|
470
|
+
css: /* @__PURE__ */ Y(i, {}),
|
|
471
|
+
scss: /* @__PURE__ */ Y(i, {}),
|
|
472
|
+
html: /* @__PURE__ */ Y(_, {}),
|
|
473
|
+
json: /* @__PURE__ */ Y(j, {}),
|
|
474
|
+
md: /* @__PURE__ */ Y(g, {}),
|
|
475
|
+
txt: /* @__PURE__ */ Y(T, {}),
|
|
476
|
+
csv: /* @__PURE__ */ Y(ae, {}),
|
|
477
|
+
zip: /* @__PURE__ */ Y(f, {}),
|
|
478
|
+
rar: /* @__PURE__ */ Y(r, {}),
|
|
479
|
+
svg: /* @__PURE__ */ Y(w, {}),
|
|
480
|
+
png: /* @__PURE__ */ Y(b, {}),
|
|
481
|
+
jpg: /* @__PURE__ */ Y(P, {}),
|
|
482
|
+
jpeg: /* @__PURE__ */ Y(y, {}),
|
|
483
|
+
gif: /* @__PURE__ */ Y(a, {}),
|
|
484
|
+
webp: /* @__PURE__ */ Y(c, {}),
|
|
485
|
+
php: /* @__PURE__ */ Y(m, {}),
|
|
486
|
+
xml: /* @__PURE__ */ Y(te, {}),
|
|
487
|
+
xls: /* @__PURE__ */ Y(p, {}),
|
|
488
|
+
ppt: /* @__PURE__ */ Y(oe, {}),
|
|
489
|
+
odt: /* @__PURE__ */ Y(d, {}),
|
|
490
|
+
exe: /* @__PURE__ */ Y(o, {}),
|
|
491
|
+
mp3: /* @__PURE__ */ Y(v, {}),
|
|
492
|
+
mp4: /* @__PURE__ */ Y(s, {})
|
|
497
493
|
};
|
|
498
|
-
function
|
|
494
|
+
function tt(e) {
|
|
499
495
|
let t = e.lastIndexOf(".");
|
|
500
496
|
return t < 1 ? null : e.slice(t + 1).toLowerCase();
|
|
501
497
|
}
|
|
502
|
-
function
|
|
498
|
+
function nt(e) {
|
|
503
499
|
return e.kind === "folder" || !!e.children?.length;
|
|
504
500
|
}
|
|
505
|
-
function
|
|
506
|
-
let t =
|
|
507
|
-
return t ?
|
|
501
|
+
function rt(e) {
|
|
502
|
+
let t = tt(e);
|
|
503
|
+
return t ? et[t] ?? /* @__PURE__ */ Y(A, {}) : /* @__PURE__ */ Y(ne, {});
|
|
508
504
|
}
|
|
509
|
-
function
|
|
510
|
-
return e.icon ? e.icon : n ?
|
|
505
|
+
function it(e, t, n) {
|
|
506
|
+
return e.icon ? e.icon : n ? nt(e) ? Y(t ? F : x, {}) : rt(e.label) : null;
|
|
511
507
|
}
|
|
512
|
-
function
|
|
508
|
+
function at(e) {
|
|
513
509
|
let t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map();
|
|
514
510
|
function r(e) {
|
|
515
511
|
t.set(e.id, e);
|
|
@@ -522,7 +518,7 @@ function rt(e) {
|
|
|
522
518
|
descendants: n
|
|
523
519
|
};
|
|
524
520
|
}
|
|
525
|
-
function
|
|
521
|
+
function ot(e, t) {
|
|
526
522
|
return typeof window > "u" ? {
|
|
527
523
|
x: e,
|
|
528
524
|
y: t
|
|
@@ -531,17 +527,17 @@ function it(e, t) {
|
|
|
531
527
|
y: Math.max(8, Math.min(t, window.innerHeight - 16))
|
|
532
528
|
};
|
|
533
529
|
}
|
|
534
|
-
function
|
|
535
|
-
let x =
|
|
536
|
-
return /* @__PURE__ */
|
|
530
|
+
function st({ node: e, level: t, expandable: n, selectable: r, expandedIds: i, selectedId: a, draggedId: o, dropTargetId: s, onToggle: c, onSelect: l, indent: u, showLines: d, fileIcons: f, draggable: p, canDropOnNode: m, onContextMenu: g, onDragStart: _, onDragOver: v, onDrop: y, onDragEnd: b }) {
|
|
531
|
+
let x = nt(e), S = i.has(e.id), C = a === e.id, w = o === e.id, T = s === e.id, E = m?.(e), D = it(e, S, !!f);
|
|
532
|
+
return /* @__PURE__ */ X("li", {
|
|
537
533
|
role: "treeitem",
|
|
538
534
|
"aria-expanded": x ? S : void 0,
|
|
539
|
-
children: [/* @__PURE__ */
|
|
540
|
-
className: I("item", C && "selected", e.disabled && "disabled",
|
|
541
|
-
style: { paddingLeft:
|
|
542
|
-
draggable:
|
|
535
|
+
children: [/* @__PURE__ */ X("div", {
|
|
536
|
+
className: I("item", C && "selected", e.disabled && "disabled", r && !e.disabled && "selectable", p && !e.disabled && "draggable", w && "dragging", E && "can-drop", T && "drop-target"),
|
|
537
|
+
style: { paddingLeft: t * u },
|
|
538
|
+
draggable: p && !e.disabled,
|
|
543
539
|
onClick: () => {
|
|
544
|
-
e.disabled || (x &&
|
|
540
|
+
e.disabled || (x && n && c(e.id), r && l?.(e.id, e));
|
|
545
541
|
},
|
|
546
542
|
onContextMenu: (t) => g?.(t, e),
|
|
547
543
|
onDragStart: (t) => _?.(t, e),
|
|
@@ -549,42 +545,42 @@ function at({ node: e, level: n, expandable: r, selectable: i, expandedIds: a, s
|
|
|
549
545
|
onDrop: (t) => y?.(t, e),
|
|
550
546
|
onDragEnd: b,
|
|
551
547
|
children: [
|
|
552
|
-
/* @__PURE__ */
|
|
548
|
+
/* @__PURE__ */ Y("span", {
|
|
553
549
|
className: "toggle",
|
|
554
|
-
children: x &&
|
|
550
|
+
children: x && n ? /* @__PURE__ */ Y("span", {
|
|
555
551
|
className: I("arrow", S && "expanded"),
|
|
556
|
-
children: /* @__PURE__ */
|
|
557
|
-
}) : /* @__PURE__ */
|
|
552
|
+
children: /* @__PURE__ */ Y(h, {})
|
|
553
|
+
}) : /* @__PURE__ */ Y("span", { className: "spacer" })
|
|
558
554
|
}),
|
|
559
|
-
D && /* @__PURE__ */
|
|
555
|
+
D && /* @__PURE__ */ Y("span", {
|
|
560
556
|
className: "icon",
|
|
561
557
|
children: D
|
|
562
558
|
}),
|
|
563
|
-
/* @__PURE__ */
|
|
559
|
+
/* @__PURE__ */ Y("span", {
|
|
564
560
|
className: "label",
|
|
565
561
|
children: e.label
|
|
566
562
|
})
|
|
567
563
|
]
|
|
568
|
-
}), x && S && /* @__PURE__ */
|
|
564
|
+
}), x && S && /* @__PURE__ */ Y("ul", {
|
|
569
565
|
className: "list",
|
|
570
566
|
role: "group",
|
|
571
|
-
style:
|
|
572
|
-
children: (e.children ?? []).map((e) => /* @__PURE__ */
|
|
567
|
+
style: d ? { "--line-left": `${t * u + 17}px` } : void 0,
|
|
568
|
+
children: (e.children ?? []).map((e) => /* @__PURE__ */ Y(st, {
|
|
573
569
|
node: e,
|
|
574
|
-
level:
|
|
575
|
-
expandable:
|
|
576
|
-
selectable:
|
|
577
|
-
expandedIds:
|
|
578
|
-
selectedId:
|
|
579
|
-
draggedId:
|
|
580
|
-
dropTargetId:
|
|
581
|
-
onToggle:
|
|
582
|
-
onSelect:
|
|
583
|
-
indent:
|
|
584
|
-
showLines:
|
|
585
|
-
fileIcons:
|
|
586
|
-
draggable:
|
|
587
|
-
canDropOnNode:
|
|
570
|
+
level: t + 1,
|
|
571
|
+
expandable: n,
|
|
572
|
+
selectable: r,
|
|
573
|
+
expandedIds: i,
|
|
574
|
+
selectedId: a,
|
|
575
|
+
draggedId: o,
|
|
576
|
+
dropTargetId: s,
|
|
577
|
+
onToggle: c,
|
|
578
|
+
onSelect: l,
|
|
579
|
+
indent: u,
|
|
580
|
+
showLines: d,
|
|
581
|
+
fileIcons: f,
|
|
582
|
+
draggable: p,
|
|
583
|
+
canDropOnNode: m,
|
|
588
584
|
onContextMenu: g,
|
|
589
585
|
onDragStart: _,
|
|
590
586
|
onDragOver: v,
|
|
@@ -594,9 +590,9 @@ function at({ node: e, level: n, expandable: r, selectable: i, expandedIds: a, s
|
|
|
594
590
|
})]
|
|
595
591
|
});
|
|
596
592
|
}
|
|
597
|
-
function
|
|
598
|
-
let [v, y] =
|
|
599
|
-
|
|
593
|
+
function ct({ items: e, expandable: t = !0, selectable: n = !1, defaultExpanded: r = [], expanded: i, onExpandChange: a, selected: o, onSelect: s, indent: c = 20, showLines: l = !0, fileIcons: u = !0, draggable: d = !1, canDrop: f, onMove: p, contextMenuItems: m, onContextMenuAction: h, className: g, ..._ }) {
|
|
594
|
+
let [v, y] = J(r), [b, x] = J(null), [S, C] = J(null), [w, T] = J(null), [E, D] = J(null), O = q(null), k = i ?? v, A = new Set(k), j = o === void 0 ? b : o, { nodeMap: M, descendants: N } = at(e), P = S ? M.get(S) ?? null : null;
|
|
595
|
+
Re(() => {
|
|
600
596
|
if (!E) return;
|
|
601
597
|
function e(e) {
|
|
602
598
|
e && O.current && O.current.contains(e.target) || D(null);
|
|
@@ -619,14 +615,14 @@ function ot({ items: e, expandable: t = !0, selectable: n = !1, defaultExpanded:
|
|
|
619
615
|
C(null), T(null);
|
|
620
616
|
}
|
|
621
617
|
function re(e) {
|
|
622
|
-
return !P || !d || !p || e.disabled || !
|
|
618
|
+
return !P || !d || !p || e.disabled || !nt(e) || e.id === P.id || N.get(P.id)?.has(e.id) ? !1 : f ? f(P, e) : !0;
|
|
623
619
|
}
|
|
624
620
|
function ie(e, t) {
|
|
625
621
|
if (!m || t.disabled) return;
|
|
626
622
|
let n = m(t).filter(Boolean);
|
|
627
623
|
if (!n.length) return;
|
|
628
624
|
e.preventDefault(), te(t.id, t);
|
|
629
|
-
let r =
|
|
625
|
+
let r = ot(e.clientX, e.clientY);
|
|
630
626
|
D({
|
|
631
627
|
node: t,
|
|
632
628
|
items: n,
|
|
@@ -652,13 +648,13 @@ function ot({ items: e, expandable: t = !0, selectable: n = !1, defaultExpanded:
|
|
|
652
648
|
targetNode: n
|
|
653
649
|
}), t && !A.has(n.id) && ee(n.id), ne();
|
|
654
650
|
}
|
|
655
|
-
return /* @__PURE__ */
|
|
651
|
+
return /* @__PURE__ */ X("div", {
|
|
656
652
|
className: I("tree", l && "lines", g),
|
|
657
653
|
..._,
|
|
658
|
-
children: [/* @__PURE__ */
|
|
654
|
+
children: [/* @__PURE__ */ Y("ul", {
|
|
659
655
|
className: "list",
|
|
660
656
|
role: "tree",
|
|
661
|
-
children: e.map((e) => /* @__PURE__ */
|
|
657
|
+
children: e.map((e) => /* @__PURE__ */ Y(st, {
|
|
662
658
|
node: e,
|
|
663
659
|
level: 0,
|
|
664
660
|
expandable: t,
|
|
@@ -680,7 +676,7 @@ function ot({ items: e, expandable: t = !0, selectable: n = !1, defaultExpanded:
|
|
|
680
676
|
onDrop: oe,
|
|
681
677
|
onDragEnd: ne
|
|
682
678
|
}, e.id))
|
|
683
|
-
}), E && /* @__PURE__ */
|
|
679
|
+
}), E && /* @__PURE__ */ Y(L, { children: /* @__PURE__ */ Y("div", {
|
|
684
680
|
ref: O,
|
|
685
681
|
className: "tree menu",
|
|
686
682
|
style: {
|
|
@@ -688,7 +684,7 @@ function ot({ items: e, expandable: t = !0, selectable: n = !1, defaultExpanded:
|
|
|
688
684
|
left: E.x
|
|
689
685
|
},
|
|
690
686
|
role: "menu",
|
|
691
|
-
children: E.items.map((e) => /* @__PURE__ */
|
|
687
|
+
children: E.items.map((e) => /* @__PURE__ */ X("button", {
|
|
692
688
|
type: "button",
|
|
693
689
|
className: I("action", e.color, e.disabled && "disabled"),
|
|
694
690
|
role: "menuitem",
|
|
@@ -696,28 +692,28 @@ function ot({ items: e, expandable: t = !0, selectable: n = !1, defaultExpanded:
|
|
|
696
692
|
onClick: () => {
|
|
697
693
|
e.disabled || (h?.(e.id, E.node), D(null));
|
|
698
694
|
},
|
|
699
|
-
children: [e.icon && /* @__PURE__ */
|
|
695
|
+
children: [e.icon && /* @__PURE__ */ Y("span", {
|
|
700
696
|
className: "icon",
|
|
701
697
|
children: e.icon
|
|
702
|
-
}), /* @__PURE__ */
|
|
698
|
+
}), /* @__PURE__ */ Y("span", { children: e.label })]
|
|
703
699
|
}, e.id))
|
|
704
700
|
}) })]
|
|
705
701
|
});
|
|
706
702
|
}
|
|
707
703
|
//#endregion
|
|
708
704
|
//#region src/components/data/MTaskList/MTaskList.tsx
|
|
709
|
-
function
|
|
710
|
-
return /* @__PURE__ */
|
|
705
|
+
function lt({ items: e, color: t = "primary", strikethrough: n = !0, onChange: r, className: i, ...a }) {
|
|
706
|
+
return /* @__PURE__ */ Y("div", {
|
|
711
707
|
className: I("task list", `color-${t}`, i),
|
|
712
708
|
role: "list",
|
|
713
709
|
...a,
|
|
714
|
-
children: e.map((e) => /* @__PURE__ */
|
|
710
|
+
children: e.map((e) => /* @__PURE__ */ X("div", {
|
|
715
711
|
className: I("task item", e.checked && "checked", e.disabled && "disabled"),
|
|
716
712
|
role: "listitem",
|
|
717
713
|
onClick: (t) => {
|
|
718
714
|
e.disabled || t.target.closest(".checkbox") || r?.(e.id, !(e.checked ?? !1));
|
|
719
715
|
},
|
|
720
|
-
children: [/* @__PURE__ */
|
|
716
|
+
children: [/* @__PURE__ */ Y(fe, {
|
|
721
717
|
className: "task control",
|
|
722
718
|
checked: e.checked ?? !1,
|
|
723
719
|
color: t,
|
|
@@ -725,7 +721,7 @@ function st({ items: e, color: t = "primary", strikethrough: n = !0, onChange: r
|
|
|
725
721
|
disabled: e.disabled,
|
|
726
722
|
onChange: (t) => r?.(e.id, t.target.checked),
|
|
727
723
|
clickEffect: "ripple"
|
|
728
|
-
}), /* @__PURE__ */
|
|
724
|
+
}), /* @__PURE__ */ Y("span", {
|
|
729
725
|
className: I("task label", e.checked && n && "done"),
|
|
730
726
|
children: e.label
|
|
731
727
|
})]
|
|
@@ -734,51 +730,51 @@ function st({ items: e, color: t = "primary", strikethrough: n = !0, onChange: r
|
|
|
734
730
|
}
|
|
735
731
|
//#endregion
|
|
736
732
|
//#region src/components/data/MFileManager/MFileManager.tsx
|
|
737
|
-
var
|
|
738
|
-
pdf: /* @__PURE__ */
|
|
739
|
-
ts: /* @__PURE__ */
|
|
740
|
-
tsx: /* @__PURE__ */
|
|
741
|
-
js: /* @__PURE__ */
|
|
742
|
-
jsx: /* @__PURE__ */
|
|
743
|
-
css: /* @__PURE__ */
|
|
744
|
-
scss: /* @__PURE__ */
|
|
745
|
-
html: /* @__PURE__ */
|
|
746
|
-
json: /* @__PURE__ */
|
|
747
|
-
md: /* @__PURE__ */
|
|
748
|
-
txt: /* @__PURE__ */
|
|
749
|
-
csv: /* @__PURE__ */
|
|
750
|
-
zip: /* @__PURE__ */
|
|
751
|
-
rar: /* @__PURE__ */
|
|
752
|
-
svg: /* @__PURE__ */
|
|
753
|
-
png: /* @__PURE__ */
|
|
754
|
-
jpg: /* @__PURE__ */
|
|
755
|
-
jpeg: /* @__PURE__ */
|
|
756
|
-
gif: /* @__PURE__ */
|
|
757
|
-
webp: /* @__PURE__ */
|
|
758
|
-
php: /* @__PURE__ */
|
|
759
|
-
xml: /* @__PURE__ */
|
|
760
|
-
xls: /* @__PURE__ */
|
|
761
|
-
ppt: /* @__PURE__ */
|
|
762
|
-
odt: /* @__PURE__ */
|
|
763
|
-
exe: /* @__PURE__ */
|
|
764
|
-
mp3: /* @__PURE__ */
|
|
765
|
-
mp4: /* @__PURE__ */
|
|
733
|
+
var ut = {
|
|
734
|
+
pdf: /* @__PURE__ */ Y(e, {}),
|
|
735
|
+
ts: /* @__PURE__ */ Y(l, {}),
|
|
736
|
+
tsx: /* @__PURE__ */ Y(C, {}),
|
|
737
|
+
js: /* @__PURE__ */ Y(t, {}),
|
|
738
|
+
jsx: /* @__PURE__ */ Y(E, {}),
|
|
739
|
+
css: /* @__PURE__ */ Y(i, {}),
|
|
740
|
+
scss: /* @__PURE__ */ Y(i, {}),
|
|
741
|
+
html: /* @__PURE__ */ Y(_, {}),
|
|
742
|
+
json: /* @__PURE__ */ Y(j, {}),
|
|
743
|
+
md: /* @__PURE__ */ Y(g, {}),
|
|
744
|
+
txt: /* @__PURE__ */ Y(T, {}),
|
|
745
|
+
csv: /* @__PURE__ */ Y(ae, {}),
|
|
746
|
+
zip: /* @__PURE__ */ Y(f, {}),
|
|
747
|
+
rar: /* @__PURE__ */ Y(r, {}),
|
|
748
|
+
svg: /* @__PURE__ */ Y(w, {}),
|
|
749
|
+
png: /* @__PURE__ */ Y(b, {}),
|
|
750
|
+
jpg: /* @__PURE__ */ Y(P, {}),
|
|
751
|
+
jpeg: /* @__PURE__ */ Y(y, {}),
|
|
752
|
+
gif: /* @__PURE__ */ Y(a, {}),
|
|
753
|
+
webp: /* @__PURE__ */ Y(c, {}),
|
|
754
|
+
php: /* @__PURE__ */ Y(m, {}),
|
|
755
|
+
xml: /* @__PURE__ */ Y(te, {}),
|
|
756
|
+
xls: /* @__PURE__ */ Y(p, {}),
|
|
757
|
+
ppt: /* @__PURE__ */ Y(oe, {}),
|
|
758
|
+
odt: /* @__PURE__ */ Y(d, {}),
|
|
759
|
+
exe: /* @__PURE__ */ Y(o, {}),
|
|
760
|
+
mp3: /* @__PURE__ */ Y(v, {}),
|
|
761
|
+
mp4: /* @__PURE__ */ Y(s, {})
|
|
766
762
|
};
|
|
767
|
-
function
|
|
763
|
+
function dt(e) {
|
|
768
764
|
let t = e.lastIndexOf(".");
|
|
769
765
|
return t < 1 ? null : e.slice(t + 1).toLowerCase();
|
|
770
766
|
}
|
|
771
|
-
function
|
|
767
|
+
function Z(e) {
|
|
772
768
|
return e?.kind === "folder" || !!e?.children?.length;
|
|
773
769
|
}
|
|
774
|
-
function
|
|
775
|
-
let t =
|
|
776
|
-
return t ?
|
|
770
|
+
function ft(e) {
|
|
771
|
+
let t = dt(e);
|
|
772
|
+
return t ? ut[t] ?? /* @__PURE__ */ Y(A, {}) : /* @__PURE__ */ Y(ne, {});
|
|
777
773
|
}
|
|
778
|
-
function
|
|
779
|
-
return e.icon ? e.icon :
|
|
774
|
+
function pt(e, t = !1) {
|
|
775
|
+
return e.icon ? e.icon : Z(e) ? Y(t ? F : x, {}) : ft(e.label);
|
|
780
776
|
}
|
|
781
|
-
function
|
|
777
|
+
function mt(e) {
|
|
782
778
|
if (!e || e < 1) return null;
|
|
783
779
|
let t = [
|
|
784
780
|
"B",
|
|
@@ -791,7 +787,7 @@ function ft(e) {
|
|
|
791
787
|
let i = n >= 100 || r === 0 ? 0 : 1;
|
|
792
788
|
return `${n.toFixed(i)} ${t[r]}`;
|
|
793
789
|
}
|
|
794
|
-
function
|
|
790
|
+
function ht(e, t) {
|
|
795
791
|
if (!e) return null;
|
|
796
792
|
let n = e instanceof Date ? e : new Date(e);
|
|
797
793
|
return Number.isNaN(n.getTime()) ? null : new Intl.DateTimeFormat(t, {
|
|
@@ -802,7 +798,7 @@ function pt(e, t) {
|
|
|
802
798
|
minute: "2-digit"
|
|
803
799
|
}).format(n);
|
|
804
800
|
}
|
|
805
|
-
function
|
|
801
|
+
function gt(e) {
|
|
806
802
|
let t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map();
|
|
807
803
|
function r(e, i) {
|
|
808
804
|
for (let a of e) t.set(a.id, a), n.set(a.id, i), a.children?.length && r(a.children, a.id);
|
|
@@ -812,14 +808,14 @@ function mt(e) {
|
|
|
812
808
|
parentMap: n
|
|
813
809
|
};
|
|
814
810
|
}
|
|
815
|
-
function
|
|
816
|
-
return e.flatMap((e) =>
|
|
811
|
+
function _t(e) {
|
|
812
|
+
return e.flatMap((e) => Z(e) ? [{
|
|
817
813
|
...e,
|
|
818
814
|
kind: "folder",
|
|
819
|
-
children:
|
|
815
|
+
children: _t(e.children ?? [])
|
|
820
816
|
}] : []);
|
|
821
817
|
}
|
|
822
|
-
function
|
|
818
|
+
function vt(e, t, n) {
|
|
823
819
|
let r = [], i = e;
|
|
824
820
|
for (; i;) {
|
|
825
821
|
let e = t.get(i);
|
|
@@ -828,15 +824,15 @@ function gt(e, t, n) {
|
|
|
828
824
|
}
|
|
829
825
|
return r;
|
|
830
826
|
}
|
|
831
|
-
function
|
|
827
|
+
function yt(e, t, n) {
|
|
832
828
|
if (!e) return null;
|
|
833
829
|
let r = t.get(e);
|
|
834
|
-
return r ?
|
|
830
|
+
return r ? Z(r) ? r.id : n.get(r.id) ?? null : null;
|
|
835
831
|
}
|
|
836
|
-
function
|
|
832
|
+
function bt(e, t) {
|
|
837
833
|
return e ? e.children ?? [] : t;
|
|
838
834
|
}
|
|
839
|
-
function
|
|
835
|
+
function xt(e, t, n, r, i) {
|
|
840
836
|
let a = e ? t.get(e) ?? null : null, o = a ? n.get(a.id) ?? null : null;
|
|
841
837
|
return {
|
|
842
838
|
id: e,
|
|
@@ -847,248 +843,248 @@ function yt(e, t, n, r, i) {
|
|
|
847
843
|
activeFolder: i
|
|
848
844
|
};
|
|
849
845
|
}
|
|
850
|
-
function
|
|
846
|
+
function St(e, t) {
|
|
851
847
|
return [
|
|
852
|
-
|
|
848
|
+
...Z(e) ? [] : [{
|
|
853
849
|
id: "download",
|
|
854
850
|
label: t.download,
|
|
855
|
-
icon: /* @__PURE__ */
|
|
851
|
+
icon: /* @__PURE__ */ Y(ie, {}),
|
|
856
852
|
color: "primary"
|
|
857
853
|
}],
|
|
858
854
|
{
|
|
859
855
|
id: "rename",
|
|
860
856
|
label: t.rename,
|
|
861
|
-
icon: /* @__PURE__ */
|
|
857
|
+
icon: /* @__PURE__ */ Y(ee, {})
|
|
862
858
|
},
|
|
863
859
|
{
|
|
864
860
|
id: "move",
|
|
865
861
|
label: t.moveTo,
|
|
866
|
-
icon: /* @__PURE__ */
|
|
862
|
+
icon: /* @__PURE__ */ Y(N, {})
|
|
867
863
|
},
|
|
868
864
|
{
|
|
869
865
|
id: "delete",
|
|
870
866
|
label: t.delete,
|
|
871
|
-
icon: /* @__PURE__ */
|
|
867
|
+
icon: /* @__PURE__ */ Y(k, {}),
|
|
872
868
|
color: "error"
|
|
873
869
|
}
|
|
874
870
|
];
|
|
875
871
|
}
|
|
876
|
-
function
|
|
877
|
-
return [
|
|
872
|
+
function Ct(e, t) {
|
|
873
|
+
return [...Z(e) ? [{
|
|
878
874
|
id: "new-folder",
|
|
879
875
|
label: t.newFolder,
|
|
880
|
-
icon: /* @__PURE__ */
|
|
881
|
-
}] : [], ...
|
|
882
|
-
}
|
|
883
|
-
function
|
|
884
|
-
let
|
|
885
|
-
function
|
|
886
|
-
let t =
|
|
887
|
-
|
|
876
|
+
icon: /* @__PURE__ */ Y(O, {})
|
|
877
|
+
}] : [], ...St(e, t)];
|
|
878
|
+
}
|
|
879
|
+
function wt({ items: e, locale: t, defaultExpanded: n = [], expanded: r, onExpandChange: i, folderId: a, defaultFolderId: o = null, onFolderChange: s, selectedId: c, onSelectionChange: l, view: u, defaultView: d = "list", onViewChange: f, searchValue: p, defaultSearchValue: m = "", onSearchChange: h, searchable: g = !0, searchPlaceholder: _, showSidebar: v = !0, showPreview: y = !0, emptyText: b, toolbarActions: x = [], onToolbarAction: S, onOpenItem: C, onItemAction: w, onContextMenuAction: T, canDrop: E, onMove: O, renderPreview: k, className: A, ...j }) {
|
|
880
|
+
let M = he(t), N = Ae(), [P, ee] = J(o), [te, ne] = J(null), [ie, ae] = J(d), [F, oe] = J(m), { nodeMap: L, parentMap: R } = K(() => gt(e), [e]), ce = K(() => _t(e), [e]), le = yt(a === void 0 ? P : a, L, R), ue = le ? L.get(le) ?? null : null, fe = c === void 0 ? te : c, V = fe ? L.get(fe) ?? null : null, H = V ? V.id : null, pe = u ?? ie, ge = p ?? F, _e = bt(ue, e), ve = ge.trim().toLowerCase(), be = vt(le, L, R), xe = _ ?? N.searchPlaceholder, Se = b ?? N.emptyText, Ce = !!(w || T), we = K(() => ve ? _e.filter((e) => e.label.toLowerCase().includes(ve)) : _e, [_e, ve]);
|
|
881
|
+
function Te(e) {
|
|
882
|
+
let t = yt(e, L, R), n = t ? L.get(t) ?? null : null;
|
|
883
|
+
s ? s(t, n) : ee(t);
|
|
888
884
|
}
|
|
889
|
-
function
|
|
890
|
-
let r =
|
|
891
|
-
|
|
885
|
+
function Ee(e, t = le, n = ue) {
|
|
886
|
+
let r = xt(e, L, R, t, n);
|
|
887
|
+
l ? l(r) : ne(e);
|
|
892
888
|
}
|
|
893
|
-
function
|
|
894
|
-
|
|
889
|
+
function De(e) {
|
|
890
|
+
f ? f(e) : ae(e);
|
|
895
891
|
}
|
|
896
|
-
function
|
|
897
|
-
|
|
892
|
+
function Oe(e) {
|
|
893
|
+
h ? h(e) : oe(e);
|
|
898
894
|
}
|
|
899
|
-
function
|
|
900
|
-
|
|
895
|
+
function W(e, t) {
|
|
896
|
+
Te(e), Ee(e, t.id, t);
|
|
901
897
|
}
|
|
902
|
-
function
|
|
903
|
-
if (
|
|
904
|
-
|
|
898
|
+
function ke(e) {
|
|
899
|
+
if (Z(e)) {
|
|
900
|
+
Te(e.id), Ee(e.id, e.id, e);
|
|
905
901
|
return;
|
|
906
902
|
}
|
|
907
|
-
|
|
903
|
+
Ee(e.id);
|
|
908
904
|
}
|
|
909
|
-
function
|
|
910
|
-
|
|
911
|
-
...
|
|
905
|
+
function je(e) {
|
|
906
|
+
S && S({
|
|
907
|
+
...xt(H, L, R, le, ue),
|
|
912
908
|
actionId: e,
|
|
913
|
-
visibleItems:
|
|
909
|
+
visibleItems: we
|
|
914
910
|
});
|
|
915
911
|
}
|
|
916
|
-
function je(e, t) {
|
|
917
|
-
(E ?? D)?.(e, t);
|
|
918
|
-
}
|
|
919
912
|
function Me(e, t) {
|
|
920
|
-
(
|
|
913
|
+
(w ?? T)?.(e, t);
|
|
921
914
|
}
|
|
922
|
-
function
|
|
923
|
-
|
|
924
|
-
return $(e) && t.push(P.itemsCount(e.children?.length ?? 0)), n && t.push(n), r && t.push(r), t.join(" / ");
|
|
915
|
+
function Pe(e, t) {
|
|
916
|
+
(T ?? w)?.(e, t);
|
|
925
917
|
}
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
918
|
+
function Fe(e) {
|
|
919
|
+
let t = [], n = mt(e.size), r = ht(e.modifiedAt, M);
|
|
920
|
+
return Z(e) && t.push(N.itemsCount(e.children?.length ?? 0)), n && t.push(n), r && t.push(r), t.join(" / ");
|
|
921
|
+
}
|
|
922
|
+
return /* @__PURE__ */ X("div", {
|
|
923
|
+
className: I("file-manager", !v && "no-sidebar", !y && "no-preview", A),
|
|
924
|
+
...j,
|
|
925
|
+
children: [/* @__PURE__ */ X("div", {
|
|
930
926
|
className: "toolbar",
|
|
931
|
-
children: [/* @__PURE__ */
|
|
927
|
+
children: [/* @__PURE__ */ X("div", {
|
|
932
928
|
className: "toolbar-main",
|
|
933
|
-
children: [/* @__PURE__ */
|
|
929
|
+
children: [/* @__PURE__ */ X("div", {
|
|
934
930
|
className: "breadcrumbs",
|
|
935
|
-
children: [/* @__PURE__ */
|
|
931
|
+
children: [/* @__PURE__ */ X("button", {
|
|
936
932
|
type: "button",
|
|
937
933
|
className: "breadcrumb root",
|
|
938
|
-
onClick: () =>
|
|
939
|
-
children: [/* @__PURE__ */
|
|
934
|
+
onClick: () => Te(null),
|
|
935
|
+
children: [/* @__PURE__ */ Y(D, {}), /* @__PURE__ */ Y(z, {
|
|
940
936
|
as: "span",
|
|
941
937
|
weight: "semibold",
|
|
942
|
-
children:
|
|
938
|
+
children: N.home
|
|
943
939
|
})]
|
|
944
|
-
}),
|
|
940
|
+
}), be.map((e) => /* @__PURE__ */ X("div", {
|
|
945
941
|
className: "breadcrumbs",
|
|
946
|
-
children: [/* @__PURE__ */
|
|
942
|
+
children: [/* @__PURE__ */ Y("span", {
|
|
947
943
|
className: "breadcrumb-separator",
|
|
948
944
|
children: "/"
|
|
949
|
-
}), /* @__PURE__ */
|
|
945
|
+
}), /* @__PURE__ */ Y("button", {
|
|
950
946
|
type: "button",
|
|
951
947
|
className: "breadcrumb",
|
|
952
|
-
onClick: () =>
|
|
953
|
-
children: /* @__PURE__ */
|
|
948
|
+
onClick: () => Te(e.id),
|
|
949
|
+
children: /* @__PURE__ */ Y(z, {
|
|
954
950
|
as: "span",
|
|
955
951
|
children: e.label
|
|
956
952
|
})
|
|
957
953
|
})]
|
|
958
954
|
}, e.id))]
|
|
959
|
-
}),
|
|
955
|
+
}), g && /* @__PURE__ */ Y(ye, {
|
|
960
956
|
className: "toolbar-search",
|
|
961
957
|
size: "sm",
|
|
962
|
-
placeholder:
|
|
963
|
-
value:
|
|
964
|
-
onChange: (e) =>
|
|
965
|
-
onClear: () =>
|
|
958
|
+
placeholder: xe,
|
|
959
|
+
value: ge,
|
|
960
|
+
onChange: (e) => Oe(e.target.value),
|
|
961
|
+
onClear: () => Oe("")
|
|
966
962
|
})]
|
|
967
|
-
}), /* @__PURE__ */
|
|
963
|
+
}), /* @__PURE__ */ X("div", {
|
|
968
964
|
className: "toolbar-actions",
|
|
969
|
-
children: [
|
|
965
|
+
children: [x.map((e) => /* @__PURE__ */ Y(de, {
|
|
970
966
|
size: "sm",
|
|
971
967
|
variant: e.variant ?? "ghost",
|
|
972
968
|
color: e.color,
|
|
973
969
|
disabled: e.disabled,
|
|
974
|
-
onClick: () =>
|
|
970
|
+
onClick: () => je(e.id),
|
|
975
971
|
startIcon: e.icon,
|
|
976
972
|
children: e.label
|
|
977
|
-
}, e.id)), /* @__PURE__ */
|
|
973
|
+
}, e.id)), /* @__PURE__ */ X("div", {
|
|
978
974
|
className: "view-switch",
|
|
979
|
-
children: [/* @__PURE__ */
|
|
975
|
+
children: [/* @__PURE__ */ Y(de, {
|
|
980
976
|
size: "sm",
|
|
981
|
-
variant:
|
|
982
|
-
onClick: () =>
|
|
983
|
-
children:
|
|
984
|
-
}), /* @__PURE__ */
|
|
977
|
+
variant: pe === "list" ? "secondary" : "ghost",
|
|
978
|
+
onClick: () => De("list"),
|
|
979
|
+
children: N.listView
|
|
980
|
+
}), /* @__PURE__ */ Y(de, {
|
|
985
981
|
size: "sm",
|
|
986
|
-
variant:
|
|
987
|
-
onClick: () =>
|
|
988
|
-
children:
|
|
982
|
+
variant: pe === "grid" ? "secondary" : "ghost",
|
|
983
|
+
onClick: () => De("grid"),
|
|
984
|
+
children: N.gridView
|
|
989
985
|
})]
|
|
990
986
|
})]
|
|
991
987
|
})]
|
|
992
|
-
}), /* @__PURE__ */
|
|
988
|
+
}), /* @__PURE__ */ X("div", {
|
|
993
989
|
className: "body",
|
|
994
990
|
children: [
|
|
995
|
-
|
|
991
|
+
v && /* @__PURE__ */ X("aside", {
|
|
996
992
|
className: "panel",
|
|
997
|
-
children: [/* @__PURE__ */
|
|
993
|
+
children: [/* @__PURE__ */ X("div", {
|
|
998
994
|
className: "panel-header",
|
|
999
|
-
children: [/* @__PURE__ */
|
|
995
|
+
children: [/* @__PURE__ */ Y(z, {
|
|
1000
996
|
weight: "semibold",
|
|
1001
|
-
children:
|
|
1002
|
-
}), /* @__PURE__ */
|
|
997
|
+
children: N.folders
|
|
998
|
+
}), /* @__PURE__ */ Y(B, {
|
|
1003
999
|
size: "sm",
|
|
1004
1000
|
color: "info",
|
|
1005
|
-
children:
|
|
1001
|
+
children: ce.length
|
|
1006
1002
|
})]
|
|
1007
|
-
}), /* @__PURE__ */
|
|
1003
|
+
}), /* @__PURE__ */ Y("div", {
|
|
1008
1004
|
className: "panel-body sidebar-body",
|
|
1009
|
-
children:
|
|
1010
|
-
items:
|
|
1005
|
+
children: ce.length > 0 ? /* @__PURE__ */ Y(ct, {
|
|
1006
|
+
items: ce,
|
|
1011
1007
|
selectable: !0,
|
|
1012
1008
|
fileIcons: !0,
|
|
1013
1009
|
defaultExpanded: n,
|
|
1014
|
-
expanded:
|
|
1015
|
-
onExpandChange:
|
|
1010
|
+
expanded: r,
|
|
1011
|
+
onExpandChange: i,
|
|
1016
1012
|
selected: le,
|
|
1017
|
-
onSelect: (e, t) =>
|
|
1018
|
-
draggable: !!
|
|
1019
|
-
canDrop:
|
|
1020
|
-
onMove:
|
|
1013
|
+
onSelect: (e, t) => W(e, t),
|
|
1014
|
+
draggable: !!O,
|
|
1015
|
+
canDrop: E ? (e, t) => E(e, t) : void 0,
|
|
1016
|
+
onMove: O ? (e) => O({
|
|
1021
1017
|
draggedId: e.draggedId,
|
|
1022
1018
|
draggedNode: e.draggedNode,
|
|
1023
1019
|
targetId: e.targetId,
|
|
1024
1020
|
targetNode: e.targetNode
|
|
1025
1021
|
}) : void 0,
|
|
1026
|
-
contextMenuItems:
|
|
1027
|
-
onContextMenuAction:
|
|
1028
|
-
}) : /* @__PURE__ */
|
|
1022
|
+
contextMenuItems: Ce ? (e) => Ct(e, N) : void 0,
|
|
1023
|
+
onContextMenuAction: Ce ? (e, t) => Pe(e, t) : void 0
|
|
1024
|
+
}) : /* @__PURE__ */ Y("div", {
|
|
1029
1025
|
className: "empty-state",
|
|
1030
|
-
children:
|
|
1026
|
+
children: N.noFoldersAvailable
|
|
1031
1027
|
})
|
|
1032
1028
|
})]
|
|
1033
1029
|
}),
|
|
1034
|
-
/* @__PURE__ */
|
|
1030
|
+
/* @__PURE__ */ X("section", {
|
|
1035
1031
|
className: "panel",
|
|
1036
|
-
children: [/* @__PURE__ */
|
|
1032
|
+
children: [/* @__PURE__ */ X("div", {
|
|
1037
1033
|
className: "panel-header",
|
|
1038
|
-
children: [/* @__PURE__ */
|
|
1034
|
+
children: [/* @__PURE__ */ X(se, {
|
|
1039
1035
|
align: "center",
|
|
1040
1036
|
wrap: "wrap",
|
|
1041
|
-
children: [/* @__PURE__ */
|
|
1037
|
+
children: [/* @__PURE__ */ Y(z, {
|
|
1042
1038
|
weight: "semibold",
|
|
1043
|
-
children: ue?.label ??
|
|
1044
|
-
}), /* @__PURE__ */
|
|
1039
|
+
children: ue?.label ?? N.home
|
|
1040
|
+
}), /* @__PURE__ */ Y(B, {
|
|
1045
1041
|
size: "sm",
|
|
1046
|
-
children:
|
|
1042
|
+
children: we.length
|
|
1047
1043
|
})]
|
|
1048
|
-
}), /* @__PURE__ */
|
|
1044
|
+
}), /* @__PURE__ */ Y(z, {
|
|
1049
1045
|
size: "sm",
|
|
1050
1046
|
tone: "muted",
|
|
1051
|
-
children:
|
|
1047
|
+
children: ve ? N.filteredBy(ge) : N.currentFolder
|
|
1052
1048
|
})]
|
|
1053
|
-
}), /* @__PURE__ */
|
|
1049
|
+
}), /* @__PURE__ */ Y("div", {
|
|
1054
1050
|
className: "panel-body",
|
|
1055
|
-
children:
|
|
1056
|
-
className: I("content-items",
|
|
1057
|
-
children:
|
|
1058
|
-
let t =
|
|
1059
|
-
return /* @__PURE__ */
|
|
1051
|
+
children: we.length > 0 ? /* @__PURE__ */ Y("div", {
|
|
1052
|
+
className: I("content-items", pe),
|
|
1053
|
+
children: we.map((e) => {
|
|
1054
|
+
let t = H === e.id, n = Fe(e), r = Ce ? St(e, N) : [];
|
|
1055
|
+
return /* @__PURE__ */ X("div", {
|
|
1060
1056
|
className: I("item-card", t && "selected"),
|
|
1061
|
-
children: [/* @__PURE__ */
|
|
1057
|
+
children: [/* @__PURE__ */ X("button", {
|
|
1062
1058
|
type: "button",
|
|
1063
1059
|
className: "item-card-main",
|
|
1064
|
-
onClick: () =>
|
|
1065
|
-
onDoubleClick: () =>
|
|
1066
|
-
children: [/* @__PURE__ */
|
|
1060
|
+
onClick: () => ke(e),
|
|
1061
|
+
onDoubleClick: () => C?.(e),
|
|
1062
|
+
children: [/* @__PURE__ */ Y("span", {
|
|
1067
1063
|
className: "item-icon",
|
|
1068
|
-
children:
|
|
1069
|
-
}), /* @__PURE__ */
|
|
1064
|
+
children: pt(e)
|
|
1065
|
+
}), /* @__PURE__ */ X("span", {
|
|
1070
1066
|
className: "item-text",
|
|
1071
1067
|
children: [
|
|
1072
|
-
/* @__PURE__ */
|
|
1068
|
+
/* @__PURE__ */ Y(z, {
|
|
1073
1069
|
as: "span",
|
|
1074
1070
|
weight: "semibold",
|
|
1075
1071
|
truncate: !0,
|
|
1076
1072
|
children: e.label
|
|
1077
1073
|
}),
|
|
1078
|
-
e.description ? /* @__PURE__ */
|
|
1074
|
+
e.description ? /* @__PURE__ */ Y(z, {
|
|
1079
1075
|
as: "span",
|
|
1080
1076
|
size: "sm",
|
|
1081
1077
|
tone: "muted",
|
|
1082
1078
|
truncate: 2,
|
|
1083
1079
|
children: e.description
|
|
1084
1080
|
}) : null,
|
|
1085
|
-
/* @__PURE__ */
|
|
1081
|
+
/* @__PURE__ */ X("span", {
|
|
1086
1082
|
className: "item-meta",
|
|
1087
|
-
children: [/* @__PURE__ */
|
|
1083
|
+
children: [/* @__PURE__ */ Y(B, {
|
|
1088
1084
|
size: "sm",
|
|
1089
|
-
color:
|
|
1090
|
-
children:
|
|
1091
|
-
}), n ? /* @__PURE__ */
|
|
1085
|
+
color: Z(e) ? "info" : "primary",
|
|
1086
|
+
children: Z(e) ? N.folder : N.file
|
|
1087
|
+
}), n ? /* @__PURE__ */ Y(z, {
|
|
1092
1088
|
as: "span",
|
|
1093
1089
|
size: "sm",
|
|
1094
1090
|
tone: "muted",
|
|
@@ -1098,96 +1094,96 @@ function St({ items: e, locale: t, defaultExpanded: n = [], expanded: i, onExpan
|
|
|
1098
1094
|
})
|
|
1099
1095
|
]
|
|
1100
1096
|
})]
|
|
1101
|
-
}),
|
|
1097
|
+
}), r.length > 0 ? /* @__PURE__ */ Y("div", {
|
|
1102
1098
|
className: "item-card-actions",
|
|
1103
|
-
children: /* @__PURE__ */
|
|
1099
|
+
children: /* @__PURE__ */ Y(U, {
|
|
1104
1100
|
placement: "bottom-end",
|
|
1105
|
-
trigger: /* @__PURE__ */
|
|
1106
|
-
"aria-label": `${
|
|
1101
|
+
trigger: /* @__PURE__ */ Y(de, {
|
|
1102
|
+
"aria-label": `${N.preview}: ${e.label}`,
|
|
1107
1103
|
variant: "ghost",
|
|
1108
1104
|
size: "sm",
|
|
1109
1105
|
iconOnly: !0,
|
|
1110
|
-
children: /* @__PURE__ */
|
|
1106
|
+
children: /* @__PURE__ */ Y(re, {})
|
|
1111
1107
|
}),
|
|
1112
|
-
children:
|
|
1108
|
+
children: r.map((t) => /* @__PURE__ */ Y(me, {
|
|
1113
1109
|
icon: t.icon,
|
|
1114
1110
|
label: t.label,
|
|
1115
1111
|
color: t.color,
|
|
1116
|
-
onClick: () =>
|
|
1112
|
+
onClick: () => Me(t.id, e)
|
|
1117
1113
|
}, t.id))
|
|
1118
1114
|
})
|
|
1119
1115
|
}) : null]
|
|
1120
1116
|
}, e.id);
|
|
1121
1117
|
})
|
|
1122
|
-
}) : /* @__PURE__ */
|
|
1118
|
+
}) : /* @__PURE__ */ Y("div", {
|
|
1123
1119
|
className: "empty-state",
|
|
1124
|
-
children:
|
|
1120
|
+
children: Se
|
|
1125
1121
|
})
|
|
1126
1122
|
})]
|
|
1127
1123
|
}),
|
|
1128
|
-
|
|
1124
|
+
y && /* @__PURE__ */ X("aside", {
|
|
1129
1125
|
className: "panel",
|
|
1130
|
-
children: [/* @__PURE__ */
|
|
1126
|
+
children: [/* @__PURE__ */ X("div", {
|
|
1131
1127
|
className: "panel-header",
|
|
1132
|
-
children: [/* @__PURE__ */
|
|
1128
|
+
children: [/* @__PURE__ */ Y(z, {
|
|
1133
1129
|
weight: "semibold",
|
|
1134
|
-
children:
|
|
1135
|
-
}), V ? /* @__PURE__ */
|
|
1130
|
+
children: N.preview
|
|
1131
|
+
}), V ? /* @__PURE__ */ Y(B, {
|
|
1136
1132
|
size: "sm",
|
|
1137
|
-
color:
|
|
1138
|
-
children:
|
|
1133
|
+
color: Z(V) ? "info" : "primary",
|
|
1134
|
+
children: Z(V) ? N.folder : N.file
|
|
1139
1135
|
}) : null]
|
|
1140
|
-
}), /* @__PURE__ */
|
|
1136
|
+
}), /* @__PURE__ */ Y("div", {
|
|
1141
1137
|
className: "panel-body",
|
|
1142
|
-
children: V ? /* @__PURE__ */
|
|
1143
|
-
/* @__PURE__ */
|
|
1138
|
+
children: V ? /* @__PURE__ */ X(Ne, { children: [
|
|
1139
|
+
/* @__PURE__ */ Y("div", {
|
|
1144
1140
|
className: "preview-visual",
|
|
1145
|
-
children:
|
|
1141
|
+
children: k ? k(V) : V.preview ? V.preview : /* @__PURE__ */ Y("span", {
|
|
1146
1142
|
className: "preview-icon",
|
|
1147
|
-
children:
|
|
1143
|
+
children: pt(V, !0)
|
|
1148
1144
|
})
|
|
1149
1145
|
}),
|
|
1150
|
-
/* @__PURE__ */
|
|
1146
|
+
/* @__PURE__ */ Y(z, {
|
|
1151
1147
|
weight: "semibold",
|
|
1152
1148
|
children: V.label
|
|
1153
1149
|
}),
|
|
1154
|
-
V.description ? /* @__PURE__ */
|
|
1150
|
+
V.description ? /* @__PURE__ */ Y(z, {
|
|
1155
1151
|
size: "sm",
|
|
1156
1152
|
tone: "muted",
|
|
1157
1153
|
children: V.description
|
|
1158
1154
|
}) : null,
|
|
1159
|
-
/* @__PURE__ */
|
|
1155
|
+
/* @__PURE__ */ X("div", {
|
|
1160
1156
|
className: "preview-meta",
|
|
1161
1157
|
children: [
|
|
1162
|
-
/* @__PURE__ */
|
|
1158
|
+
/* @__PURE__ */ Y(B, {
|
|
1163
1159
|
size: "sm",
|
|
1164
|
-
color:
|
|
1165
|
-
children:
|
|
1160
|
+
color: Z(V) ? "info" : "primary",
|
|
1161
|
+
children: Z(V) ? N.folder : N.file
|
|
1166
1162
|
}),
|
|
1167
|
-
|
|
1163
|
+
mt(V.size) ? /* @__PURE__ */ Y(B, {
|
|
1168
1164
|
size: "sm",
|
|
1169
|
-
children:
|
|
1165
|
+
children: mt(V.size)
|
|
1170
1166
|
}) : null,
|
|
1171
|
-
|
|
1167
|
+
ht(V.modifiedAt, M) ? /* @__PURE__ */ Y(B, {
|
|
1172
1168
|
size: "sm",
|
|
1173
1169
|
color: "neutral",
|
|
1174
|
-
children:
|
|
1170
|
+
children: ht(V.modifiedAt, M)
|
|
1175
1171
|
}) : null
|
|
1176
1172
|
]
|
|
1177
1173
|
}),
|
|
1178
|
-
/* @__PURE__ */
|
|
1174
|
+
/* @__PURE__ */ X(z, {
|
|
1179
1175
|
size: "sm",
|
|
1180
1176
|
tone: "muted",
|
|
1181
1177
|
children: [
|
|
1182
|
-
|
|
1178
|
+
N.path,
|
|
1183
1179
|
":",
|
|
1184
1180
|
" ",
|
|
1185
|
-
[
|
|
1181
|
+
[N.home, ...vt(V.id, L, R).map((e) => e.label)].join(" / ")
|
|
1186
1182
|
]
|
|
1187
1183
|
})
|
|
1188
|
-
] }) : /* @__PURE__ */
|
|
1184
|
+
] }) : /* @__PURE__ */ Y("div", {
|
|
1189
1185
|
className: "preview-empty",
|
|
1190
|
-
children:
|
|
1186
|
+
children: N.selectItemToInspect
|
|
1191
1187
|
})
|
|
1192
1188
|
})]
|
|
1193
1189
|
})
|
|
@@ -1197,27 +1193,27 @@ function St({ items: e, locale: t, defaultExpanded: n = [], expanded: i, onExpan
|
|
|
1197
1193
|
}
|
|
1198
1194
|
//#endregion
|
|
1199
1195
|
//#region src/components/data/MCalendarBoard/MCalendarBoard.tsx
|
|
1200
|
-
function
|
|
1196
|
+
function Q(e) {
|
|
1201
1197
|
return new Date(e.getFullYear(), e.getMonth(), e.getDate());
|
|
1202
1198
|
}
|
|
1203
|
-
function
|
|
1199
|
+
function Tt(e) {
|
|
1204
1200
|
if (!e) return null;
|
|
1205
|
-
if (e instanceof Date) return
|
|
1201
|
+
if (e instanceof Date) return Q(e);
|
|
1206
1202
|
let t = new Date(e);
|
|
1207
|
-
return Number.isNaN(t.getTime()) ? null :
|
|
1203
|
+
return Number.isNaN(t.getTime()) ? null : Q(t);
|
|
1208
1204
|
}
|
|
1209
|
-
function
|
|
1205
|
+
function $(e) {
|
|
1210
1206
|
return `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`;
|
|
1211
1207
|
}
|
|
1212
1208
|
function Et(e) {
|
|
1213
|
-
return
|
|
1209
|
+
return Tt(e.date);
|
|
1214
1210
|
}
|
|
1215
1211
|
function Dt(e, t) {
|
|
1216
1212
|
let n = new Date(e);
|
|
1217
|
-
return n.setDate(n.getDate() + t),
|
|
1213
|
+
return n.setDate(n.getDate() + t), Q(n);
|
|
1218
1214
|
}
|
|
1219
1215
|
function Ot(e, t) {
|
|
1220
|
-
let n =
|
|
1216
|
+
let n = Q(e);
|
|
1221
1217
|
return Dt(n, -((n.getDay() - t + 7) % 7));
|
|
1222
1218
|
}
|
|
1223
1219
|
function kt(e) {
|
|
@@ -1263,7 +1259,7 @@ function Ft(e, t) {
|
|
|
1263
1259
|
return i.setHours(t + 1, 0, 0, 0), i <= n ? "past" : r <= n && i > n ? "active" : "upcoming";
|
|
1264
1260
|
}
|
|
1265
1261
|
function It(e) {
|
|
1266
|
-
return kt(e).slice(0, 4).map((e) => /* @__PURE__ */
|
|
1262
|
+
return kt(e).slice(0, 4).map((e) => /* @__PURE__ */ Y("span", {
|
|
1267
1263
|
className: "marker",
|
|
1268
1264
|
style: { background: e.color ?? jt(e.status) },
|
|
1269
1265
|
"aria-hidden": "true"
|
|
@@ -1285,24 +1281,24 @@ function zt(e, t) {
|
|
|
1285
1281
|
}
|
|
1286
1282
|
function Bt({ date: e, events: t, locale: n, timelineStartHour: r, timelineEndHour: i, showTimeline: a, emptyStateText: o, renderEventItem: s }) {
|
|
1287
1283
|
if (!e) return null;
|
|
1288
|
-
let c =
|
|
1289
|
-
return /* @__PURE__ */
|
|
1290
|
-
/* @__PURE__ */
|
|
1284
|
+
let c = Me();
|
|
1285
|
+
return /* @__PURE__ */ X(Ne, { children: [
|
|
1286
|
+
/* @__PURE__ */ X(Ne, { children: [/* @__PURE__ */ Y(ce, {
|
|
1291
1287
|
level: 4,
|
|
1292
1288
|
children: Mt(e, n)
|
|
1293
|
-
}), /* @__PURE__ */
|
|
1289
|
+
}), /* @__PURE__ */ Y(z, {
|
|
1294
1290
|
tone: "muted",
|
|
1295
1291
|
size: "sm",
|
|
1296
1292
|
children: t.length > 0 ? c.itemsCount(t.length) : o
|
|
1297
1293
|
})] }),
|
|
1298
|
-
/* @__PURE__ */
|
|
1294
|
+
/* @__PURE__ */ Y(Gt, {
|
|
1299
1295
|
events: t,
|
|
1300
1296
|
locale: n,
|
|
1301
1297
|
currentDate: e,
|
|
1302
1298
|
emptyStateText: o,
|
|
1303
1299
|
renderEventItem: s
|
|
1304
1300
|
}),
|
|
1305
|
-
a && /* @__PURE__ */
|
|
1301
|
+
a && /* @__PURE__ */ Y(Kt, {
|
|
1306
1302
|
date: e,
|
|
1307
1303
|
events: t,
|
|
1308
1304
|
locale: n,
|
|
@@ -1312,11 +1308,11 @@ function Bt({ date: e, events: t, locale: n, timelineStartHour: r, timelineEndHo
|
|
|
1312
1308
|
] });
|
|
1313
1309
|
}
|
|
1314
1310
|
function Vt({ filters: e, activeFilterIds: t, onToggle: n }) {
|
|
1315
|
-
return e.length ? /* @__PURE__ */
|
|
1311
|
+
return e.length ? /* @__PURE__ */ Y("div", {
|
|
1316
1312
|
className: "calendar filters",
|
|
1317
1313
|
children: e.map((e) => {
|
|
1318
1314
|
let r = t.includes(e.id);
|
|
1319
|
-
return /* @__PURE__ */
|
|
1315
|
+
return /* @__PURE__ */ Y(de, {
|
|
1320
1316
|
type: "button",
|
|
1321
1317
|
size: "sm",
|
|
1322
1318
|
variant: "outlined",
|
|
@@ -1330,14 +1326,14 @@ function Vt({ filters: e, activeFilterIds: t, onToggle: n }) {
|
|
|
1330
1326
|
}) : null;
|
|
1331
1327
|
}
|
|
1332
1328
|
function Ht({ days: e, eventsByDay: t, selectedDate: n, activeDate: r, onDayInteract: i, onDayHover: a, onDayLeave: o, dayBadge: s, renderDayCell: c }) {
|
|
1333
|
-
let l =
|
|
1334
|
-
return /* @__PURE__ */
|
|
1329
|
+
let l = $(Q(/* @__PURE__ */ new Date()));
|
|
1330
|
+
return /* @__PURE__ */ Y("div", {
|
|
1335
1331
|
className: "calendar week",
|
|
1336
1332
|
children: e.map((e) => {
|
|
1337
|
-
let u =
|
|
1333
|
+
let u = $(e), d = t.get(u) ?? [], f = s?.(e, d) ?? (d.length > 0 ? /* @__PURE__ */ Y(B, {
|
|
1338
1334
|
size: "sm",
|
|
1339
1335
|
children: d.length
|
|
1340
|
-
}) : null), p = It(d), m = !!(n &&
|
|
1336
|
+
}) : null), p = It(d), m = !!(n && $(n) === u), h = {
|
|
1341
1337
|
date: e,
|
|
1342
1338
|
events: d,
|
|
1343
1339
|
badge: f,
|
|
@@ -1345,15 +1341,15 @@ function Ht({ days: e, eventsByDay: t, selectedDate: n, activeDate: r, onDayInte
|
|
|
1345
1341
|
isSelected: m,
|
|
1346
1342
|
isOutsideMonth: !1
|
|
1347
1343
|
};
|
|
1348
|
-
return /* @__PURE__ */
|
|
1344
|
+
return /* @__PURE__ */ Y("div", {
|
|
1349
1345
|
className: "calendar week column",
|
|
1350
|
-
children: /* @__PURE__ */
|
|
1346
|
+
children: /* @__PURE__ */ Y(Ut, {
|
|
1351
1347
|
date: e,
|
|
1352
1348
|
events: d,
|
|
1353
1349
|
badge: f,
|
|
1354
1350
|
markers: p,
|
|
1355
1351
|
isToday: h.isToday,
|
|
1356
|
-
isSelected: m || !!(r &&
|
|
1352
|
+
isSelected: m || !!(r && $(r) === u),
|
|
1357
1353
|
isOutsideMonth: !1,
|
|
1358
1354
|
onClick: (t) => i(e, t.currentTarget, d),
|
|
1359
1355
|
onMouseEnter: (t) => a(e, t.currentTarget, d),
|
|
@@ -1365,74 +1361,74 @@ function Ht({ days: e, eventsByDay: t, selectedDate: n, activeDate: r, onDayInte
|
|
|
1365
1361
|
});
|
|
1366
1362
|
}
|
|
1367
1363
|
function Ut({ date: e, events: t = [], badge: n, markers: r, isToday: i = !1, isSelected: a = !1, isOutsideMonth: o = !1, className: s, children: c, ...l }) {
|
|
1368
|
-
return /* @__PURE__ */
|
|
1364
|
+
return /* @__PURE__ */ Y("button", {
|
|
1369
1365
|
type: "button",
|
|
1370
1366
|
className: I("calendar day cell", i && "today", a && "selected", o && "outside-month", s),
|
|
1371
1367
|
...l,
|
|
1372
|
-
children: c ?? /* @__PURE__ */
|
|
1368
|
+
children: c ?? /* @__PURE__ */ X(ze, { children: [/* @__PURE__ */ X("div", {
|
|
1373
1369
|
className: "day header",
|
|
1374
|
-
children: [/* @__PURE__ */
|
|
1370
|
+
children: [/* @__PURE__ */ Y("span", {
|
|
1375
1371
|
className: "day number",
|
|
1376
1372
|
children: e.getDate()
|
|
1377
|
-
}), /* @__PURE__ */
|
|
1373
|
+
}), /* @__PURE__ */ Y("div", {
|
|
1378
1374
|
className: "day meta",
|
|
1379
1375
|
children: n
|
|
1380
1376
|
})]
|
|
1381
|
-
}), /* @__PURE__ */
|
|
1377
|
+
}), /* @__PURE__ */ Y("div", {
|
|
1382
1378
|
className: "markers",
|
|
1383
1379
|
children: r ?? It(t)
|
|
1384
1380
|
})] })
|
|
1385
1381
|
});
|
|
1386
1382
|
}
|
|
1387
1383
|
function Wt({ event: e, locale: t, className: n, currentDate: r, ...i }) {
|
|
1388
|
-
let a =
|
|
1389
|
-
return /* @__PURE__ */
|
|
1384
|
+
let a = he(t), o = Me(), s = e.status === "cancelled" ? "error" : e.status === "done" ? "success" : e.status === "active" ? "info" : "warning";
|
|
1385
|
+
return /* @__PURE__ */ X("div", {
|
|
1390
1386
|
className: I("calendar event item", n),
|
|
1391
1387
|
...i,
|
|
1392
|
-
children: [/* @__PURE__ */
|
|
1388
|
+
children: [/* @__PURE__ */ Y("div", {
|
|
1393
1389
|
className: "event time",
|
|
1394
1390
|
children: Pt(e, o)
|
|
1395
|
-
}), /* @__PURE__ */
|
|
1391
|
+
}), /* @__PURE__ */ X("div", {
|
|
1396
1392
|
className: "event content",
|
|
1397
1393
|
children: [
|
|
1398
|
-
/* @__PURE__ */
|
|
1394
|
+
/* @__PURE__ */ X("div", {
|
|
1399
1395
|
className: "event title row",
|
|
1400
|
-
children: [/* @__PURE__ */
|
|
1396
|
+
children: [/* @__PURE__ */ Y(ce, {
|
|
1401
1397
|
level: 5,
|
|
1402
1398
|
children: e.title
|
|
1403
|
-
}), e.status && /* @__PURE__ */
|
|
1399
|
+
}), e.status && /* @__PURE__ */ Y(B, {
|
|
1404
1400
|
color: s,
|
|
1405
1401
|
size: "sm",
|
|
1406
1402
|
children: e.status
|
|
1407
1403
|
})]
|
|
1408
1404
|
}),
|
|
1409
|
-
e.description && /* @__PURE__ */
|
|
1405
|
+
e.description && /* @__PURE__ */ Y(z, {
|
|
1410
1406
|
size: "sm",
|
|
1411
1407
|
tone: "muted",
|
|
1412
1408
|
children: e.description
|
|
1413
1409
|
}),
|
|
1414
|
-
/* @__PURE__ */
|
|
1410
|
+
/* @__PURE__ */ X("div", {
|
|
1415
1411
|
className: "event details",
|
|
1416
1412
|
children: [
|
|
1417
|
-
e.type && /* @__PURE__ */
|
|
1413
|
+
e.type && /* @__PURE__ */ Y(B, {
|
|
1418
1414
|
color: "neutral",
|
|
1419
1415
|
size: "sm",
|
|
1420
1416
|
children: e.type
|
|
1421
1417
|
}),
|
|
1422
|
-
e.badgeLabel && /* @__PURE__ */
|
|
1418
|
+
e.badgeLabel && /* @__PURE__ */ Y(B, {
|
|
1423
1419
|
size: "sm",
|
|
1424
1420
|
children: e.badgeLabel
|
|
1425
1421
|
}),
|
|
1426
|
-
e.user && /* @__PURE__ */
|
|
1422
|
+
e.user && /* @__PURE__ */ X("span", {
|
|
1427
1423
|
className: "event user",
|
|
1428
|
-
children: [/* @__PURE__ */
|
|
1424
|
+
children: [/* @__PURE__ */ Y(ve, {
|
|
1429
1425
|
size: "sm",
|
|
1430
1426
|
src: e.user.avatar,
|
|
1431
1427
|
name: e.user.name,
|
|
1432
1428
|
backgroundColor: e.user.color
|
|
1433
1429
|
}), e.user.name]
|
|
1434
1430
|
}),
|
|
1435
|
-
!e.startTime && !e.endTime && r && /* @__PURE__ */
|
|
1431
|
+
!e.startTime && !e.endTime && r && /* @__PURE__ */ Y(z, {
|
|
1436
1432
|
size: "sm",
|
|
1437
1433
|
tone: "muted",
|
|
1438
1434
|
children: Mt(r, a)
|
|
@@ -1444,16 +1440,16 @@ function Wt({ event: e, locale: t, className: n, currentDate: r, ...i }) {
|
|
|
1444
1440
|
});
|
|
1445
1441
|
}
|
|
1446
1442
|
function Gt({ events: e, locale: t, currentDate: n, emptyStateText: r, renderEventItem: i, className: a, ...o }) {
|
|
1447
|
-
let s =
|
|
1448
|
-
return e.length ? /* @__PURE__ */
|
|
1443
|
+
let s = he(t), c = Me();
|
|
1444
|
+
return e.length ? /* @__PURE__ */ Y("div", {
|
|
1449
1445
|
className: I("calendar event list", a),
|
|
1450
1446
|
...o,
|
|
1451
|
-
children: /* @__PURE__ */
|
|
1447
|
+
children: /* @__PURE__ */ Y(Ne, { children: kt(e).map((e) => i ? /* @__PURE__ */ Y("div", { children: i(e) }, e.id) : /* @__PURE__ */ Y(Wt, {
|
|
1452
1448
|
event: e,
|
|
1453
1449
|
locale: s,
|
|
1454
1450
|
currentDate: n
|
|
1455
1451
|
}, e.id)) })
|
|
1456
|
-
}) : /* @__PURE__ */
|
|
1452
|
+
}) : /* @__PURE__ */ Y(z, {
|
|
1457
1453
|
size: "sm",
|
|
1458
1454
|
tone: "muted",
|
|
1459
1455
|
className: I("calendar event list", a),
|
|
@@ -1462,38 +1458,38 @@ function Gt({ events: e, locale: t, currentDate: n, emptyStateText: r, renderEve
|
|
|
1462
1458
|
});
|
|
1463
1459
|
}
|
|
1464
1460
|
function Kt({ date: e, events: t, locale: n, startHour: r = 6, endHour: i = 22, emptyStateText: a, className: o, ...s }) {
|
|
1465
|
-
|
|
1466
|
-
let c =
|
|
1467
|
-
return /* @__PURE__ */
|
|
1461
|
+
he(n);
|
|
1462
|
+
let c = Me(), l = Array.from({ length: Math.max(i - r + 1, 1) }, (e, t) => r + t);
|
|
1463
|
+
return /* @__PURE__ */ Y("div", {
|
|
1468
1464
|
className: I("calendar timeline", o),
|
|
1469
1465
|
...s,
|
|
1470
|
-
children: /* @__PURE__ */
|
|
1466
|
+
children: /* @__PURE__ */ X(Ne, { children: [/* @__PURE__ */ Y(ce, {
|
|
1471
1467
|
level: 5,
|
|
1472
1468
|
children: c.timelineTitle
|
|
1473
|
-
}), /* @__PURE__ */
|
|
1469
|
+
}), /* @__PURE__ */ Y("div", {
|
|
1474
1470
|
className: "timeline slots",
|
|
1475
1471
|
children: l.map((n) => {
|
|
1476
1472
|
let r = t.filter((e) => e.startTime ? Number(e.startTime.split(":")[0]) === n : !1);
|
|
1477
|
-
return /* @__PURE__ */
|
|
1473
|
+
return /* @__PURE__ */ X("div", {
|
|
1478
1474
|
className: I("timeline slot", Ft(e, n)),
|
|
1479
1475
|
children: [
|
|
1480
|
-
/* @__PURE__ */
|
|
1476
|
+
/* @__PURE__ */ Y("div", {
|
|
1481
1477
|
className: "slot time",
|
|
1482
1478
|
children: `${String(n).padStart(2, "0")}:00`
|
|
1483
1479
|
}),
|
|
1484
|
-
/* @__PURE__ */
|
|
1485
|
-
/* @__PURE__ */
|
|
1480
|
+
/* @__PURE__ */ Y("div", { className: "slot line" }),
|
|
1481
|
+
/* @__PURE__ */ Y("div", {
|
|
1486
1482
|
className: "slot content",
|
|
1487
|
-
children: r.length > 0 ? /* @__PURE__ */
|
|
1483
|
+
children: r.length > 0 ? /* @__PURE__ */ Y(Ne, { children: r.map((e) => /* @__PURE__ */ X("div", {
|
|
1488
1484
|
className: "slot event",
|
|
1489
|
-
children: [/* @__PURE__ */
|
|
1485
|
+
children: [/* @__PURE__ */ Y("span", {
|
|
1490
1486
|
className: "slot event dot",
|
|
1491
1487
|
style: { background: e.color ?? jt(e.status) }
|
|
1492
|
-
}), /* @__PURE__ */
|
|
1488
|
+
}), /* @__PURE__ */ Y(z, {
|
|
1493
1489
|
size: "sm",
|
|
1494
1490
|
children: e.title
|
|
1495
1491
|
})]
|
|
1496
|
-
}, e.id)) }) : /* @__PURE__ */
|
|
1492
|
+
}, e.id)) }) : /* @__PURE__ */ Y(z, {
|
|
1497
1493
|
size: "sm",
|
|
1498
1494
|
tone: "muted",
|
|
1499
1495
|
children: a ?? c.timelineEmptyState
|
|
@@ -1506,19 +1502,19 @@ function Kt({ date: e, events: t, locale: n, startHour: r = 6, endHour: i = 22,
|
|
|
1506
1502
|
});
|
|
1507
1503
|
}
|
|
1508
1504
|
function qt({ open: e, anchorRef: t, onClose: n, onPointerEnter: r, onPointerLeave: i, date: a, events: o, locale: s, timelineStartHour: c = 6, timelineEndHour: l = 22, showTimeline: u = !0, emptyStateText: d, renderEventItem: f, className: p, style: m }) {
|
|
1509
|
-
let h =
|
|
1510
|
-
return /* @__PURE__ */
|
|
1505
|
+
let h = he(s), g = Me();
|
|
1506
|
+
return /* @__PURE__ */ Y(R, {
|
|
1511
1507
|
open: e,
|
|
1512
1508
|
anchorRef: t,
|
|
1513
1509
|
onClose: n,
|
|
1514
1510
|
placement: "bottom-start",
|
|
1515
1511
|
className: I("calendar popover", p),
|
|
1516
1512
|
style: m,
|
|
1517
|
-
children: /* @__PURE__ */
|
|
1513
|
+
children: /* @__PURE__ */ Y(V, {
|
|
1518
1514
|
className: "calendar event popover",
|
|
1519
1515
|
onPointerEnter: r,
|
|
1520
1516
|
onPointerLeave: i,
|
|
1521
|
-
children: /* @__PURE__ */
|
|
1517
|
+
children: /* @__PURE__ */ Y(H, { children: /* @__PURE__ */ Y(Bt, {
|
|
1522
1518
|
date: a,
|
|
1523
1519
|
events: o,
|
|
1524
1520
|
locale: h,
|
|
@@ -1532,158 +1528,158 @@ function qt({ open: e, anchorRef: t, onClose: n, onPointerEnter: r, onPointerLea
|
|
|
1532
1528
|
});
|
|
1533
1529
|
}
|
|
1534
1530
|
function Jt({ month: e, defaultMonth: t, onMonthChange: n, events: r = [], locale: i, weekStartsOn: a = 1, view: o, defaultView: s = "month", views: c = ["month", "week"], onViewChange: l, selectedDate: u, defaultSelectedDate: d, onDayClick: f, dayBadge: p, renderDayCell: m, renderEventItem: h, detailsTrigger: g = "click", detailsMode: _ = "auto", showTimeline: v = !0, timelineStartHour: y = 6, timelineEndHour: b = 22, emptyStateText: x, filters: S = [], activeFilters: C, defaultActiveFilters: w = [], onActiveFiltersChange: T, fullWidth: E = !1, className: D, ...O }) {
|
|
1535
|
-
let k =
|
|
1536
|
-
|
|
1537
|
-
let e = window.matchMedia("(max-width: 768px)"), t = () =>
|
|
1531
|
+
let k = he(i), A = je(), j = Me(), M = Q(/* @__PURE__ */ new Date()), [N, P] = J(Q(t ?? e ?? M)), [ee, te] = J(s), [ne, re] = J(Tt(d)), [ie, ae] = J(w), [F, oe] = J(null), [L, R] = J(!1), [se, le] = J(!1), ue = q(null), fe = q(null), V = e !== void 0 && typeof n == "function", H = Q(V ? e ?? N : N), U = o ?? ee, me = Tt(u) ?? ne, ge = C ?? ie;
|
|
1532
|
+
Re(() => {
|
|
1533
|
+
let e = window.matchMedia("(max-width: 768px)"), t = () => le(e.matches);
|
|
1538
1534
|
return t(), e.addEventListener("change", t), () => e.removeEventListener("change", t);
|
|
1539
|
-
}, []),
|
|
1540
|
-
|
|
1541
|
-
}, [
|
|
1535
|
+
}, []), Re(() => {
|
|
1536
|
+
V && e && P(Q(e));
|
|
1537
|
+
}, [V, e]), Re(() => {
|
|
1542
1538
|
o && te(o);
|
|
1543
|
-
}, [o]),
|
|
1544
|
-
u !== void 0 && re(
|
|
1545
|
-
}, [u]),
|
|
1546
|
-
|
|
1539
|
+
}, [o]), Re(() => {
|
|
1540
|
+
u !== void 0 && re(Tt(u));
|
|
1541
|
+
}, [u]), Re(() => () => {
|
|
1542
|
+
fe.current && window.clearTimeout(fe.current);
|
|
1547
1543
|
}, []);
|
|
1548
|
-
let
|
|
1544
|
+
let _e = K(() => Lt(r, S, ge), [
|
|
1549
1545
|
r,
|
|
1550
1546
|
S,
|
|
1551
|
-
|
|
1552
|
-
]),
|
|
1547
|
+
ge
|
|
1548
|
+
]), ve = K(() => {
|
|
1553
1549
|
let e = /* @__PURE__ */ new Map();
|
|
1554
|
-
return
|
|
1550
|
+
return _e.forEach((t) => {
|
|
1555
1551
|
let n = Et(t);
|
|
1556
1552
|
if (!n) return;
|
|
1557
|
-
let r =
|
|
1553
|
+
let r = $(n), i = e.get(r) ?? [];
|
|
1558
1554
|
i.push(t), e.set(r, i);
|
|
1559
1555
|
}), e;
|
|
1560
|
-
}, [
|
|
1556
|
+
}, [_e]), ye = K(() => {
|
|
1561
1557
|
if (U === "week") {
|
|
1562
|
-
let e = Ot(
|
|
1558
|
+
let e = Ot(me ?? H, a);
|
|
1563
1559
|
return Array.from({ length: 7 }, (t, n) => Dt(e, n));
|
|
1564
1560
|
}
|
|
1565
1561
|
return At(H, a);
|
|
1566
1562
|
}, [
|
|
1567
1563
|
U,
|
|
1568
|
-
|
|
1564
|
+
me,
|
|
1569
1565
|
H,
|
|
1570
1566
|
a
|
|
1571
|
-
]),
|
|
1572
|
-
let t =
|
|
1567
|
+
]), be = _ === "auto" ? se ? "modal" : "popover" : _, xe = F ? ve.get($(F)) ?? [] : [], Se = c.includes("month"), Ce = c.includes("week"), we = (e) => {
|
|
1568
|
+
let t = Q(e);
|
|
1573
1569
|
P(t), n?.(t);
|
|
1574
|
-
},
|
|
1570
|
+
}, Te = (e) => {
|
|
1575
1571
|
if (U === "week") {
|
|
1576
|
-
let t = Dt(
|
|
1577
|
-
|
|
1572
|
+
let t = Dt(me ?? H, e * 7);
|
|
1573
|
+
we(t), re(t), oe(t), R(!1);
|
|
1578
1574
|
return;
|
|
1579
1575
|
}
|
|
1580
|
-
|
|
1581
|
-
},
|
|
1576
|
+
we(new Date(H.getFullYear(), H.getMonth() + e, 1)), R(!1), oe(null);
|
|
1577
|
+
}, Ee = (e) => {
|
|
1582
1578
|
te(e), l?.(e);
|
|
1583
|
-
},
|
|
1584
|
-
let n =
|
|
1579
|
+
}, De = (e, t) => {
|
|
1580
|
+
let n = Q(e);
|
|
1585
1581
|
re(n), f?.(n, t);
|
|
1586
|
-
},
|
|
1587
|
-
|
|
1588
|
-
},
|
|
1589
|
-
|
|
1582
|
+
}, Oe = () => {
|
|
1583
|
+
fe.current &&= (window.clearTimeout(fe.current), null);
|
|
1584
|
+
}, W = () => {
|
|
1585
|
+
Oe(), fe.current = window.setTimeout(() => {
|
|
1590
1586
|
R(!1);
|
|
1591
1587
|
}, 180);
|
|
1592
1588
|
}, ke = (e, t, n) => {
|
|
1593
|
-
|
|
1594
|
-
},
|
|
1595
|
-
|
|
1596
|
-
},
|
|
1597
|
-
g !== "hover" ||
|
|
1598
|
-
},
|
|
1599
|
-
let t =
|
|
1589
|
+
ue.current = t, oe(e), De(e, n), R(!0);
|
|
1590
|
+
}, Ae = (e, t, n) => {
|
|
1591
|
+
Oe(), ke(e, t, n), U === "month" && e.getMonth() !== H.getMonth() && we(new Date(e.getFullYear(), e.getMonth(), 1));
|
|
1592
|
+
}, Pe = (e, t, n) => {
|
|
1593
|
+
g !== "hover" || be !== "popover" || (Oe(), ke(e, t, n));
|
|
1594
|
+
}, Fe = (e) => {
|
|
1595
|
+
let t = ge.includes(e) ? ge.filter((t) => t !== e) : [...ge, e];
|
|
1600
1596
|
ae(t), T?.(t);
|
|
1601
|
-
},
|
|
1602
|
-
return /* @__PURE__ */
|
|
1597
|
+
}, Ie = Ot(U === "week" ? me ?? H : H, a);
|
|
1598
|
+
return /* @__PURE__ */ X("div", {
|
|
1603
1599
|
className: I("calendar board", E && "full-width", D),
|
|
1604
1600
|
...O,
|
|
1605
1601
|
children: [
|
|
1606
|
-
/* @__PURE__ */
|
|
1602
|
+
/* @__PURE__ */ X("div", {
|
|
1607
1603
|
className: "calendar header",
|
|
1608
|
-
children: [/* @__PURE__ */
|
|
1604
|
+
children: [/* @__PURE__ */ X(Ne, { children: [/* @__PURE__ */ Y(ce, {
|
|
1609
1605
|
level: 3,
|
|
1610
1606
|
children: Rt(H, U, k, a)
|
|
1611
|
-
}), /* @__PURE__ */
|
|
1607
|
+
}), /* @__PURE__ */ Y(z, {
|
|
1612
1608
|
size: "sm",
|
|
1613
1609
|
tone: "muted",
|
|
1614
1610
|
children: zt(U, j)
|
|
1615
|
-
})] }), /* @__PURE__ */
|
|
1611
|
+
})] }), /* @__PURE__ */ X(Ne, {
|
|
1616
1612
|
align: "end",
|
|
1617
|
-
children: [/* @__PURE__ */
|
|
1613
|
+
children: [/* @__PURE__ */ X("div", {
|
|
1618
1614
|
className: "calendar actions",
|
|
1619
|
-
children: [/* @__PURE__ */
|
|
1615
|
+
children: [/* @__PURE__ */ Y(de, {
|
|
1620
1616
|
type: "button",
|
|
1621
1617
|
size: "sm",
|
|
1622
1618
|
variant: "outlined",
|
|
1623
1619
|
color: "neutral",
|
|
1624
|
-
onClick: () =>
|
|
1620
|
+
onClick: () => Te(-1),
|
|
1625
1621
|
children: U === "week" ? j.previousWeek : A.previousMonth
|
|
1626
|
-
}), /* @__PURE__ */
|
|
1622
|
+
}), /* @__PURE__ */ Y(de, {
|
|
1627
1623
|
type: "button",
|
|
1628
1624
|
size: "sm",
|
|
1629
1625
|
variant: "outlined",
|
|
1630
1626
|
color: "neutral",
|
|
1631
|
-
onClick: () =>
|
|
1627
|
+
onClick: () => Te(1),
|
|
1632
1628
|
children: U === "week" ? j.nextWeek : A.nextMonth
|
|
1633
1629
|
})]
|
|
1634
|
-
}), (
|
|
1630
|
+
}), (Se || Ce) && /* @__PURE__ */ X("div", {
|
|
1635
1631
|
className: "calendar views",
|
|
1636
|
-
children: [
|
|
1632
|
+
children: [Se && /* @__PURE__ */ Y(de, {
|
|
1637
1633
|
type: "button",
|
|
1638
1634
|
size: "sm",
|
|
1639
1635
|
variant: "outlined",
|
|
1640
1636
|
color: U === "month" ? "primary" : "neutral",
|
|
1641
1637
|
active: U === "month",
|
|
1642
|
-
onClick: () =>
|
|
1638
|
+
onClick: () => Ee("month"),
|
|
1643
1639
|
children: j.monthView
|
|
1644
|
-
}),
|
|
1640
|
+
}), Ce && /* @__PURE__ */ Y(de, {
|
|
1645
1641
|
type: "button",
|
|
1646
1642
|
size: "sm",
|
|
1647
1643
|
variant: "outlined",
|
|
1648
1644
|
color: U === "week" ? "primary" : "neutral",
|
|
1649
1645
|
active: U === "week",
|
|
1650
|
-
onClick: () =>
|
|
1646
|
+
onClick: () => Ee("week"),
|
|
1651
1647
|
children: j.weekView
|
|
1652
1648
|
})]
|
|
1653
1649
|
})]
|
|
1654
1650
|
})]
|
|
1655
1651
|
}),
|
|
1656
|
-
/* @__PURE__ */
|
|
1652
|
+
/* @__PURE__ */ Y(Vt, {
|
|
1657
1653
|
filters: S,
|
|
1658
|
-
activeFilterIds:
|
|
1659
|
-
onToggle:
|
|
1654
|
+
activeFilterIds: ge,
|
|
1655
|
+
onToggle: Fe
|
|
1660
1656
|
}),
|
|
1661
|
-
/* @__PURE__ */
|
|
1657
|
+
/* @__PURE__ */ Y("div", {
|
|
1662
1658
|
className: "calendar days",
|
|
1663
|
-
children: Array.from({ length: 7 }, (e, t) => Dt(
|
|
1659
|
+
children: Array.from({ length: 7 }, (e, t) => Dt(Ie, t)).map((e) => /* @__PURE__ */ Y("div", {
|
|
1664
1660
|
className: "calendar day",
|
|
1665
1661
|
children: new Intl.DateTimeFormat(k, { weekday: "short" }).format(e)
|
|
1666
|
-
},
|
|
1662
|
+
}, $(e)))
|
|
1667
1663
|
}),
|
|
1668
|
-
U === "week" ? /* @__PURE__ */
|
|
1669
|
-
days:
|
|
1670
|
-
eventsByDay:
|
|
1671
|
-
selectedDate:
|
|
1664
|
+
U === "week" ? /* @__PURE__ */ Y(Ht, {
|
|
1665
|
+
days: ye,
|
|
1666
|
+
eventsByDay: ve,
|
|
1667
|
+
selectedDate: me,
|
|
1672
1668
|
activeDate: F,
|
|
1673
|
-
onDayInteract:
|
|
1674
|
-
onDayHover:
|
|
1669
|
+
onDayInteract: Ae,
|
|
1670
|
+
onDayHover: Pe,
|
|
1675
1671
|
onDayLeave: () => {
|
|
1676
|
-
g === "hover" &&
|
|
1672
|
+
g === "hover" && be === "popover" && W();
|
|
1677
1673
|
},
|
|
1678
1674
|
dayBadge: p,
|
|
1679
1675
|
renderDayCell: m
|
|
1680
|
-
}) : /* @__PURE__ */
|
|
1676
|
+
}) : /* @__PURE__ */ Y("div", {
|
|
1681
1677
|
className: "calendar grid",
|
|
1682
|
-
children:
|
|
1683
|
-
let t =
|
|
1678
|
+
children: ye.map((e) => {
|
|
1679
|
+
let t = $(e), n = ve.get(t) ?? [], r = p?.(e, n) ?? (n.length > 0 ? /* @__PURE__ */ Y(B, {
|
|
1684
1680
|
size: "sm",
|
|
1685
1681
|
children: n.length
|
|
1686
|
-
}) : null), i = t ===
|
|
1682
|
+
}) : null), i = t === $(M), a = !!(me && t === $(me)), o = e.getMonth() !== H.getMonth(), s = It(n), c = {
|
|
1687
1683
|
date: e,
|
|
1688
1684
|
events: n,
|
|
1689
1685
|
badge: r,
|
|
@@ -1691,46 +1687,46 @@ function Jt({ month: e, defaultMonth: t, onMonthChange: n, events: r = [], local
|
|
|
1691
1687
|
isSelected: a,
|
|
1692
1688
|
isOutsideMonth: o
|
|
1693
1689
|
};
|
|
1694
|
-
return /* @__PURE__ */
|
|
1690
|
+
return /* @__PURE__ */ Y(Ut, {
|
|
1695
1691
|
date: e,
|
|
1696
1692
|
events: n,
|
|
1697
1693
|
badge: r,
|
|
1698
1694
|
markers: s,
|
|
1699
1695
|
isToday: i,
|
|
1700
|
-
isSelected: a || !!(F && t ===
|
|
1696
|
+
isSelected: a || !!(F && t === $(F)),
|
|
1701
1697
|
isOutsideMonth: o,
|
|
1702
|
-
onClick: (t) =>
|
|
1703
|
-
onMouseEnter: (t) =>
|
|
1698
|
+
onClick: (t) => Ae(e, t.currentTarget, n),
|
|
1699
|
+
onMouseEnter: (t) => Pe(e, t.currentTarget, n),
|
|
1704
1700
|
onMouseLeave: () => {
|
|
1705
|
-
g === "hover" &&
|
|
1701
|
+
g === "hover" && be === "popover" && W();
|
|
1706
1702
|
},
|
|
1707
1703
|
children: m ? m(e, c) : void 0
|
|
1708
1704
|
}, t);
|
|
1709
1705
|
})
|
|
1710
1706
|
}),
|
|
1711
|
-
|
|
1712
|
-
open: L && !!F && !!
|
|
1713
|
-
anchorRef:
|
|
1707
|
+
be === "popover" ? /* @__PURE__ */ Y(qt, {
|
|
1708
|
+
open: L && !!F && !!ue.current,
|
|
1709
|
+
anchorRef: ue,
|
|
1714
1710
|
onClose: () => R(!1),
|
|
1715
|
-
onPointerEnter: () =>
|
|
1716
|
-
onPointerLeave: () =>
|
|
1711
|
+
onPointerEnter: () => Oe(),
|
|
1712
|
+
onPointerLeave: () => W(),
|
|
1717
1713
|
date: F,
|
|
1718
|
-
events:
|
|
1714
|
+
events: xe,
|
|
1719
1715
|
locale: k,
|
|
1720
1716
|
timelineStartHour: y,
|
|
1721
1717
|
timelineEndHour: b,
|
|
1722
1718
|
showTimeline: v,
|
|
1723
1719
|
emptyStateText: x ?? j.emptyStateText,
|
|
1724
1720
|
renderEventItem: h
|
|
1725
|
-
}) : /* @__PURE__ */
|
|
1721
|
+
}) : /* @__PURE__ */ Y(pe, {
|
|
1726
1722
|
open: L && !!F,
|
|
1727
1723
|
onClose: () => R(!1),
|
|
1728
1724
|
title: F ? Mt(F, k) : void 0,
|
|
1729
|
-
description: F ? j.itemsCount(
|
|
1725
|
+
description: F ? j.itemsCount(xe.length) : void 0,
|
|
1730
1726
|
size: "lg",
|
|
1731
|
-
children: /* @__PURE__ */
|
|
1727
|
+
children: /* @__PURE__ */ Y(Bt, {
|
|
1732
1728
|
date: F,
|
|
1733
|
-
events:
|
|
1729
|
+
events: xe,
|
|
1734
1730
|
locale: k,
|
|
1735
1731
|
timelineStartHour: y,
|
|
1736
1732
|
timelineEndHour: b,
|
|
@@ -1775,15 +1771,15 @@ function $t(e) {
|
|
|
1775
1771
|
//#endregion
|
|
1776
1772
|
//#region src/components/data/MChart/parts/ChartGrid.tsx
|
|
1777
1773
|
function en({ x: e, y: t, width: n, height: r, horizontalLines: i, verticalLines: a }) {
|
|
1778
|
-
return /* @__PURE__ */
|
|
1774
|
+
return /* @__PURE__ */ X("g", {
|
|
1779
1775
|
className: "chart-grid",
|
|
1780
|
-
children: [i.map((t, r) => /* @__PURE__ */
|
|
1776
|
+
children: [i.map((t, r) => /* @__PURE__ */ Y("line", {
|
|
1781
1777
|
x1: e,
|
|
1782
1778
|
y1: t,
|
|
1783
1779
|
x2: e + n,
|
|
1784
1780
|
y2: t,
|
|
1785
1781
|
className: "chart-grid-line"
|
|
1786
|
-
}, `h${r}`)), a?.map((e, n) => /* @__PURE__ */
|
|
1782
|
+
}, `h${r}`)), a?.map((e, n) => /* @__PURE__ */ Y("line", {
|
|
1787
1783
|
x1: e,
|
|
1788
1784
|
y1: t,
|
|
1789
1785
|
x2: e,
|
|
@@ -1796,23 +1792,23 @@ function en({ x: e, y: t, width: n, height: r, horizontalLines: i, verticalLines
|
|
|
1796
1792
|
//#region src/components/data/MChart/parts/ChartAxis.tsx
|
|
1797
1793
|
function tn({ type: e, x: t, y: n, length: r, ticks: i, title: a }) {
|
|
1798
1794
|
let o = e === "x";
|
|
1799
|
-
return /* @__PURE__ */
|
|
1795
|
+
return /* @__PURE__ */ X("g", {
|
|
1800
1796
|
className: `chart-axis chart-axis-${e}`,
|
|
1801
1797
|
children: [
|
|
1802
|
-
/* @__PURE__ */
|
|
1798
|
+
/* @__PURE__ */ Y("line", {
|
|
1803
1799
|
x1: t,
|
|
1804
1800
|
y1: n,
|
|
1805
1801
|
x2: o ? t + r : t,
|
|
1806
1802
|
y2: o ? n : n - r,
|
|
1807
1803
|
className: "chart-axis-line"
|
|
1808
1804
|
}),
|
|
1809
|
-
i.map((e, r) => /* @__PURE__ */
|
|
1805
|
+
i.map((e, r) => /* @__PURE__ */ Y("g", { children: o ? /* @__PURE__ */ Y("text", {
|
|
1810
1806
|
x: e.position,
|
|
1811
1807
|
y: n + 16,
|
|
1812
1808
|
textAnchor: "middle",
|
|
1813
1809
|
className: "chart-axis-label",
|
|
1814
1810
|
children: e.label
|
|
1815
|
-
}) : /* @__PURE__ */
|
|
1811
|
+
}) : /* @__PURE__ */ Y("text", {
|
|
1816
1812
|
x: t - 8,
|
|
1817
1813
|
y: e.position,
|
|
1818
1814
|
textAnchor: "end",
|
|
@@ -1820,13 +1816,13 @@ function tn({ type: e, x: t, y: n, length: r, ticks: i, title: a }) {
|
|
|
1820
1816
|
className: "chart-axis-label",
|
|
1821
1817
|
children: e.label
|
|
1822
1818
|
}) }, r)),
|
|
1823
|
-
a && (o ? /* @__PURE__ */
|
|
1819
|
+
a && (o ? /* @__PURE__ */ Y("text", {
|
|
1824
1820
|
x: t + r / 2,
|
|
1825
1821
|
y: n + 36,
|
|
1826
1822
|
textAnchor: "middle",
|
|
1827
1823
|
className: "chart-axis-title",
|
|
1828
1824
|
children: a
|
|
1829
|
-
}) : /* @__PURE__ */
|
|
1825
|
+
}) : /* @__PURE__ */ Y("text", {
|
|
1830
1826
|
x: t - 40,
|
|
1831
1827
|
y: n - r / 2,
|
|
1832
1828
|
textAnchor: "middle",
|
|
@@ -1841,8 +1837,8 @@ function tn({ type: e, x: t, y: n, length: r, ticks: i, title: a }) {
|
|
|
1841
1837
|
//#endregion
|
|
1842
1838
|
//#region src/components/data/MChart/charts/MLineChart.tsx
|
|
1843
1839
|
function nn({ data: e, colors: t, innerWidth: n, innerHeight: r, padding: i, xAxis: a, yAxis: o, showGrid: s, showXAxis: c, showYAxis: l, curved: u, animated: d, valueFormatter: f = Qt, onTooltip: p, onDataClick: m }) {
|
|
1844
|
-
let [h, g] =
|
|
1845
|
-
let t = e.map((e) => e.data), [n, r] =
|
|
1840
|
+
let [h, g] = J(null), _ = n - i.left - i.right, v = r - i.top - i.bottom, { yMin: y, yMax: b, yTicks: x, xLabels: S, seriesPoints: C } = K(() => {
|
|
1841
|
+
let t = e.map((e) => e.data), [n, r] = Te(t), i = o?.min ?? Ce(n), s = o?.max ?? Se(r, n), c = xe(i, s, o?.ticks ?? 5), l = Math.max(...t.map((e) => e.length), 1), u = a?.labels ?? Array.from({ length: l }, (e, t) => String(t)), d = W([0, Math.max(l - 1, 1)], [0, _]), f = W([i, s], [v, 0]);
|
|
1846
1842
|
return {
|
|
1847
1843
|
yMin: i,
|
|
1848
1844
|
yMax: s,
|
|
@@ -1859,7 +1855,7 @@ function nn({ data: e, colors: t, innerWidth: n, innerHeight: r, padding: i, xAx
|
|
|
1859
1855
|
v,
|
|
1860
1856
|
a,
|
|
1861
1857
|
o
|
|
1862
|
-
]), w =
|
|
1858
|
+
]), w = W([y, b], [v, 0]), T = W([0, Math.max(S.length - 1, 1)], [0, _]), E = G((r) => {
|
|
1863
1859
|
let a = r.currentTarget.closest("svg");
|
|
1864
1860
|
if (!a) return;
|
|
1865
1861
|
let o = a.getBoundingClientRect(), s = n / o.width, c = (r.clientX - o.left) * s - i.left, l = Math.round(c / _ * Math.max(S.length - 1, 1)), u = Math.max(0, Math.min(l, S.length - 1));
|
|
@@ -1881,7 +1877,7 @@ function nn({ data: e, colors: t, innerWidth: n, innerHeight: r, padding: i, xAx
|
|
|
1881
1877
|
i.left,
|
|
1882
1878
|
n,
|
|
1883
1879
|
p
|
|
1884
|
-
]), D =
|
|
1880
|
+
]), D = G(() => {
|
|
1885
1881
|
g(null), p(null);
|
|
1886
1882
|
}, [p]), O = x.map((e) => i.top + w(e)), k = S.map((e, t) => i.left + T(t)), A = x.map((e) => ({
|
|
1887
1883
|
position: i.top + w(e),
|
|
@@ -1890,8 +1886,8 @@ function nn({ data: e, colors: t, innerWidth: n, innerHeight: r, padding: i, xAx
|
|
|
1890
1886
|
position: i.left + T(t),
|
|
1891
1887
|
label: e
|
|
1892
1888
|
}));
|
|
1893
|
-
return /* @__PURE__ */
|
|
1894
|
-
s && /* @__PURE__ */
|
|
1889
|
+
return /* @__PURE__ */ X("g", { children: [
|
|
1890
|
+
s && /* @__PURE__ */ Y(en, {
|
|
1895
1891
|
x: i.left,
|
|
1896
1892
|
y: i.top,
|
|
1897
1893
|
width: _,
|
|
@@ -1899,7 +1895,7 @@ function nn({ data: e, colors: t, innerWidth: n, innerHeight: r, padding: i, xAx
|
|
|
1899
1895
|
horizontalLines: O,
|
|
1900
1896
|
verticalLines: k
|
|
1901
1897
|
}),
|
|
1902
|
-
l && /* @__PURE__ */
|
|
1898
|
+
l && /* @__PURE__ */ Y(tn, {
|
|
1903
1899
|
type: "y",
|
|
1904
1900
|
x: i.left,
|
|
1905
1901
|
y: i.top + v,
|
|
@@ -1907,7 +1903,7 @@ function nn({ data: e, colors: t, innerWidth: n, innerHeight: r, padding: i, xAx
|
|
|
1907
1903
|
ticks: A,
|
|
1908
1904
|
title: o?.title
|
|
1909
1905
|
}),
|
|
1910
|
-
c && /* @__PURE__ */
|
|
1906
|
+
c && /* @__PURE__ */ Y(tn, {
|
|
1911
1907
|
type: "x",
|
|
1912
1908
|
x: i.left,
|
|
1913
1909
|
y: i.top + v,
|
|
@@ -1915,11 +1911,11 @@ function nn({ data: e, colors: t, innerWidth: n, innerHeight: r, padding: i, xAx
|
|
|
1915
1911
|
ticks: j,
|
|
1916
1912
|
title: a?.title
|
|
1917
1913
|
}),
|
|
1918
|
-
/* @__PURE__ */
|
|
1914
|
+
/* @__PURE__ */ X("g", {
|
|
1919
1915
|
onMouseMove: E,
|
|
1920
1916
|
onMouseLeave: D,
|
|
1921
1917
|
children: [
|
|
1922
|
-
/* @__PURE__ */
|
|
1918
|
+
/* @__PURE__ */ Y("rect", {
|
|
1923
1919
|
x: i.left,
|
|
1924
1920
|
y: i.top,
|
|
1925
1921
|
width: _,
|
|
@@ -1927,17 +1923,17 @@ function nn({ data: e, colors: t, innerWidth: n, innerHeight: r, padding: i, xAx
|
|
|
1927
1923
|
fill: "transparent"
|
|
1928
1924
|
}),
|
|
1929
1925
|
C.map((n, r) => {
|
|
1930
|
-
let a = e[r].color ?? t[r % t.length], o = u ?
|
|
1926
|
+
let a = e[r].color ?? t[r % t.length], o = u ? Oe(n.map((e) => ({
|
|
1931
1927
|
x: e.x + i.left,
|
|
1932
1928
|
y: e.y + i.top
|
|
1933
|
-
}))) :
|
|
1929
|
+
}))) : we(n.map((e) => ({
|
|
1934
1930
|
x: e.x + i.left,
|
|
1935
1931
|
y: e.y + i.top
|
|
1936
1932
|
})));
|
|
1937
|
-
return /* @__PURE__ */
|
|
1933
|
+
return /* @__PURE__ */ X("g", { children: [/* @__PURE__ */ Y("path", {
|
|
1938
1934
|
className: `chart-line ${a} ${d ? "animated" : ""}`,
|
|
1939
1935
|
d: o
|
|
1940
|
-
}), n.map((t, n) => /* @__PURE__ */
|
|
1936
|
+
}), n.map((t, n) => /* @__PURE__ */ Y("circle", {
|
|
1941
1937
|
className: `chart-dot ${a} ${h === n ? "active" : ""}`,
|
|
1942
1938
|
cx: t.x + i.left,
|
|
1943
1939
|
cy: t.y + i.top,
|
|
@@ -1946,7 +1942,7 @@ function nn({ data: e, colors: t, innerWidth: n, innerHeight: r, padding: i, xAx
|
|
|
1946
1942
|
style: { cursor: m ? "pointer" : void 0 }
|
|
1947
1943
|
}, n))] }, r);
|
|
1948
1944
|
}),
|
|
1949
|
-
h !== null && /* @__PURE__ */
|
|
1945
|
+
h !== null && /* @__PURE__ */ Y("line", {
|
|
1950
1946
|
className: "chart-crosshair",
|
|
1951
1947
|
x1: i.left + T(h),
|
|
1952
1948
|
y1: i.top,
|
|
@@ -1960,14 +1956,14 @@ function nn({ data: e, colors: t, innerWidth: n, innerHeight: r, padding: i, xAx
|
|
|
1960
1956
|
//#endregion
|
|
1961
1957
|
//#region src/components/data/MChart/charts/MBarChart.tsx
|
|
1962
1958
|
function rn({ data: e, colors: t, innerWidth: n, innerHeight: r, padding: i, xAxis: a, yAxis: o, showGrid: s, showXAxis: c, showYAxis: l, stacked: u, animated: d, valueFormatter: f = Qt, onTooltip: p, onDataClick: m }) {
|
|
1963
|
-
let [h, g] =
|
|
1959
|
+
let [h, g] = J(null), _ = n - i.left - i.right, v = r - i.top - i.bottom, { yMin: y, yMax: b, yTicks: x, xLabels: S, maxLen: C } = K(() => {
|
|
1964
1960
|
let t = e.map((e) => e.data), n = Math.max(...t.map((e) => e.length), 1), r, i;
|
|
1965
|
-
u ? [r, i] =
|
|
1966
|
-
let s = o?.min ??
|
|
1961
|
+
u ? [r, i] = ke(t) : [r, i] = Te(t);
|
|
1962
|
+
let s = o?.min ?? Ce(r), c = o?.max ?? Se(i, r);
|
|
1967
1963
|
return {
|
|
1968
1964
|
yMin: s,
|
|
1969
1965
|
yMax: c,
|
|
1970
|
-
yTicks:
|
|
1966
|
+
yTicks: xe(s, c, o?.ticks ?? 5),
|
|
1971
1967
|
xLabels: a?.labels ?? Array.from({ length: n }, (e, t) => String(t)),
|
|
1972
1968
|
maxLen: n
|
|
1973
1969
|
};
|
|
@@ -1976,7 +1972,7 @@ function rn({ data: e, colors: t, innerWidth: n, innerHeight: r, padding: i, xAx
|
|
|
1976
1972
|
a,
|
|
1977
1973
|
o,
|
|
1978
1974
|
u
|
|
1979
|
-
]), w =
|
|
1975
|
+
]), w = W([y, b], [v, 0]), T = _ / C, E = Math.max(T * .1, 2), D = e.length, O = G((n, r, i) => {
|
|
1980
1976
|
g({
|
|
1981
1977
|
di: n,
|
|
1982
1978
|
pi: r
|
|
@@ -2004,7 +2000,7 @@ function rn({ data: e, colors: t, innerWidth: n, innerHeight: r, padding: i, xAx
|
|
|
2004
2000
|
S,
|
|
2005
2001
|
u,
|
|
2006
2002
|
p
|
|
2007
|
-
]), k =
|
|
2003
|
+
]), k = G(() => {
|
|
2008
2004
|
g(null), p(null);
|
|
2009
2005
|
}, [p]), A = x.map((e) => i.top + w(e)), j = S.map((e, t) => ({
|
|
2010
2006
|
position: i.left + T * t + T / 2,
|
|
@@ -2013,15 +2009,15 @@ function rn({ data: e, colors: t, innerWidth: n, innerHeight: r, padding: i, xAx
|
|
|
2013
2009
|
position: i.top + w(e),
|
|
2014
2010
|
label: (o?.formatter ?? f)(e)
|
|
2015
2011
|
})), N = w(0);
|
|
2016
|
-
return /* @__PURE__ */
|
|
2017
|
-
s && /* @__PURE__ */
|
|
2012
|
+
return /* @__PURE__ */ X("g", { children: [
|
|
2013
|
+
s && /* @__PURE__ */ Y(en, {
|
|
2018
2014
|
x: i.left,
|
|
2019
2015
|
y: i.top,
|
|
2020
2016
|
width: _,
|
|
2021
2017
|
height: v,
|
|
2022
2018
|
horizontalLines: A
|
|
2023
2019
|
}),
|
|
2024
|
-
l && /* @__PURE__ */
|
|
2020
|
+
l && /* @__PURE__ */ Y(tn, {
|
|
2025
2021
|
type: "y",
|
|
2026
2022
|
x: i.left,
|
|
2027
2023
|
y: i.top + v,
|
|
@@ -2029,7 +2025,7 @@ function rn({ data: e, colors: t, innerWidth: n, innerHeight: r, padding: i, xAx
|
|
|
2029
2025
|
ticks: M,
|
|
2030
2026
|
title: o?.title
|
|
2031
2027
|
}),
|
|
2032
|
-
c && /* @__PURE__ */
|
|
2028
|
+
c && /* @__PURE__ */ Y(tn, {
|
|
2033
2029
|
type: "x",
|
|
2034
2030
|
x: i.left,
|
|
2035
2031
|
y: i.top + v,
|
|
@@ -2037,15 +2033,15 @@ function rn({ data: e, colors: t, innerWidth: n, innerHeight: r, padding: i, xAx
|
|
|
2037
2033
|
ticks: j,
|
|
2038
2034
|
title: a?.title
|
|
2039
2035
|
}),
|
|
2040
|
-
/* @__PURE__ */
|
|
2036
|
+
/* @__PURE__ */ Y("g", {
|
|
2041
2037
|
onMouseLeave: k,
|
|
2042
2038
|
children: u ? S.map((n, r) => {
|
|
2043
2039
|
let a = N, o = T - E * 2, s = i.left + T * r + E;
|
|
2044
|
-
return /* @__PURE__ */
|
|
2040
|
+
return /* @__PURE__ */ Y("g", { children: e.map((n, c) => {
|
|
2045
2041
|
let l = n.data[r] ?? 0, u = N - w(l), f = a - u;
|
|
2046
2042
|
a = f;
|
|
2047
2043
|
let p = n.color ?? t[c % t.length], g = h?.di === c && h?.pi === r;
|
|
2048
|
-
return /* @__PURE__ */
|
|
2044
|
+
return /* @__PURE__ */ Y("rect", {
|
|
2049
2045
|
className: `chart-bar ${p} ${d ? "animated" : ""} ${g ? "active" : ""}`,
|
|
2050
2046
|
x: s,
|
|
2051
2047
|
y: i.top + f,
|
|
@@ -2059,9 +2055,9 @@ function rn({ data: e, colors: t, innerWidth: n, innerHeight: r, padding: i, xAx
|
|
|
2059
2055
|
}) }, r);
|
|
2060
2056
|
}) : e.map((e, n) => {
|
|
2061
2057
|
let r = (T - E * 2) / D;
|
|
2062
|
-
return /* @__PURE__ */
|
|
2058
|
+
return /* @__PURE__ */ Y("g", { children: e.data.map((a, o) => {
|
|
2063
2059
|
let s = N - w(a), c = i.left + T * o + E + r * n, l = Math.min(N, w(a)), u = e.color ?? t[n % t.length], f = h?.di === n && h?.pi === o;
|
|
2064
|
-
return /* @__PURE__ */
|
|
2060
|
+
return /* @__PURE__ */ Y("rect", {
|
|
2065
2061
|
className: `chart-bar ${u} ${d ? "animated" : ""} ${f ? "active" : ""}`,
|
|
2066
2062
|
x: c,
|
|
2067
2063
|
y: i.top + l,
|
|
@@ -2080,10 +2076,10 @@ function rn({ data: e, colors: t, innerWidth: n, innerHeight: r, padding: i, xAx
|
|
|
2080
2076
|
//#endregion
|
|
2081
2077
|
//#region src/components/data/MChart/charts/MAreaChart.tsx
|
|
2082
2078
|
function an({ data: e, colors: t, innerWidth: n, innerHeight: r, padding: i, xAxis: a, yAxis: o, showGrid: s, showXAxis: c, showYAxis: l, curved: u, stacked: d, animated: f, valueFormatter: p = Qt, onTooltip: m, onDataClick: h }) {
|
|
2083
|
-
let [g, _] =
|
|
2079
|
+
let [g, _] = J(null), v = n - i.left - i.right, y = r - i.top - i.bottom, { yMin: b, yMax: x, yTicks: S, xLabels: C, seriesPoints: w, stackedPaths: T } = K(() => {
|
|
2084
2080
|
let t = e.map((e) => e.data), n = Math.max(...t.map((e) => e.length), 1), r, s;
|
|
2085
|
-
d ? [r, s] =
|
|
2086
|
-
let c = o?.min ??
|
|
2081
|
+
d ? [r, s] = ke(t) : [r, s] = Te(t);
|
|
2082
|
+
let c = o?.min ?? Ce(r), l = o?.max ?? Se(s, r), f = xe(c, l, o?.ticks ?? 5), p = a?.labels ?? Array.from({ length: n }, (e, t) => String(t)), m = W([0, Math.max(n - 1, 1)], [0, v]), h = W([c, l], [y, 0]);
|
|
2087
2083
|
if (d) {
|
|
2088
2084
|
let e = [];
|
|
2089
2085
|
for (let r = 0; r < t.length; r++) {
|
|
@@ -2102,14 +2098,14 @@ function an({ data: e, colors: t, innerWidth: n, innerHeight: r, padding: i, xAx
|
|
|
2102
2098
|
y: i.top + h(e)
|
|
2103
2099
|
}));
|
|
2104
2100
|
return {
|
|
2105
|
-
area:
|
|
2101
|
+
area: De(r, n === 0 ? t.map((e, t) => ({
|
|
2106
2102
|
x: i.left + m(t),
|
|
2107
2103
|
y: i.top + h(0)
|
|
2108
2104
|
})) : e[n - 1].map((e, t) => ({
|
|
2109
2105
|
x: i.left + m(t),
|
|
2110
2106
|
y: i.top + h(e)
|
|
2111
2107
|
})), u),
|
|
2112
|
-
line: u ?
|
|
2108
|
+
line: u ? Oe(r) : we(r),
|
|
2113
2109
|
topPts: r
|
|
2114
2110
|
};
|
|
2115
2111
|
})
|
|
@@ -2135,7 +2131,7 @@ function an({ data: e, colors: t, innerWidth: n, innerHeight: r, padding: i, xAx
|
|
|
2135
2131
|
d,
|
|
2136
2132
|
u,
|
|
2137
2133
|
i
|
|
2138
|
-
]), E =
|
|
2134
|
+
]), E = W([b, x], [y, 0]), D = W([0, Math.max(C.length - 1, 1)], [0, v]), O = G((r) => {
|
|
2139
2135
|
let a = r.currentTarget.closest("svg");
|
|
2140
2136
|
if (!a) return;
|
|
2141
2137
|
let o = a.getBoundingClientRect(), s = n / o.width, c = (r.clientX - o.left) * s - i.left, l = Math.round(c / v * Math.max(C.length - 1, 1)), u = Math.max(0, Math.min(l, C.length - 1));
|
|
@@ -2157,7 +2153,7 @@ function an({ data: e, colors: t, innerWidth: n, innerHeight: r, padding: i, xAx
|
|
|
2157
2153
|
i.left,
|
|
2158
2154
|
n,
|
|
2159
2155
|
m
|
|
2160
|
-
]), k =
|
|
2156
|
+
]), k = G(() => {
|
|
2161
2157
|
_(null), m(null);
|
|
2162
2158
|
}, [m]), A = S.map((e) => i.top + E(e)), j = S.map((e) => ({
|
|
2163
2159
|
position: i.top + E(e),
|
|
@@ -2166,15 +2162,15 @@ function an({ data: e, colors: t, innerWidth: n, innerHeight: r, padding: i, xAx
|
|
|
2166
2162
|
position: i.left + D(t),
|
|
2167
2163
|
label: e
|
|
2168
2164
|
}));
|
|
2169
|
-
return /* @__PURE__ */
|
|
2170
|
-
s && /* @__PURE__ */
|
|
2165
|
+
return /* @__PURE__ */ X("g", { children: [
|
|
2166
|
+
s && /* @__PURE__ */ Y(en, {
|
|
2171
2167
|
x: i.left,
|
|
2172
2168
|
y: i.top,
|
|
2173
2169
|
width: v,
|
|
2174
2170
|
height: y,
|
|
2175
2171
|
horizontalLines: A
|
|
2176
2172
|
}),
|
|
2177
|
-
l && /* @__PURE__ */
|
|
2173
|
+
l && /* @__PURE__ */ Y(tn, {
|
|
2178
2174
|
type: "y",
|
|
2179
2175
|
x: i.left,
|
|
2180
2176
|
y: i.top + y,
|
|
@@ -2182,7 +2178,7 @@ function an({ data: e, colors: t, innerWidth: n, innerHeight: r, padding: i, xAx
|
|
|
2182
2178
|
ticks: j,
|
|
2183
2179
|
title: o?.title
|
|
2184
2180
|
}),
|
|
2185
|
-
c && /* @__PURE__ */
|
|
2181
|
+
c && /* @__PURE__ */ Y(tn, {
|
|
2186
2182
|
type: "x",
|
|
2187
2183
|
x: i.left,
|
|
2188
2184
|
y: i.top + y,
|
|
@@ -2190,11 +2186,11 @@ function an({ data: e, colors: t, innerWidth: n, innerHeight: r, padding: i, xAx
|
|
|
2190
2186
|
ticks: M,
|
|
2191
2187
|
title: a?.title
|
|
2192
2188
|
}),
|
|
2193
|
-
/* @__PURE__ */
|
|
2189
|
+
/* @__PURE__ */ X("g", {
|
|
2194
2190
|
onMouseMove: O,
|
|
2195
2191
|
onMouseLeave: k,
|
|
2196
2192
|
children: [
|
|
2197
|
-
/* @__PURE__ */
|
|
2193
|
+
/* @__PURE__ */ Y("rect", {
|
|
2198
2194
|
x: i.left,
|
|
2199
2195
|
y: i.top,
|
|
2200
2196
|
width: v,
|
|
@@ -2203,25 +2199,25 @@ function an({ data: e, colors: t, innerWidth: n, innerHeight: r, padding: i, xAx
|
|
|
2203
2199
|
}),
|
|
2204
2200
|
d && T ? T.map((n, r) => {
|
|
2205
2201
|
let i = e[r].color ?? t[r % t.length];
|
|
2206
|
-
return /* @__PURE__ */
|
|
2202
|
+
return /* @__PURE__ */ X("g", { children: [/* @__PURE__ */ Y("path", {
|
|
2207
2203
|
className: `chart-area-fill ${i}`,
|
|
2208
2204
|
d: n.area
|
|
2209
|
-
}), /* @__PURE__ */
|
|
2205
|
+
}), /* @__PURE__ */ Y("path", {
|
|
2210
2206
|
className: `chart-line ${i} ${f ? "animated" : ""}`,
|
|
2211
2207
|
d: n.line
|
|
2212
2208
|
})] }, r);
|
|
2213
2209
|
}) : w.map((n, r) => {
|
|
2214
|
-
let a = e[r].color ?? t[r % t.length], o = u ?
|
|
2215
|
-
return /* @__PURE__ */
|
|
2216
|
-
/* @__PURE__ */
|
|
2210
|
+
let a = e[r].color ?? t[r % t.length], o = u ? Oe(n) : we(n), s = Ee(n, i.top + y, u);
|
|
2211
|
+
return /* @__PURE__ */ X("g", { children: [
|
|
2212
|
+
/* @__PURE__ */ Y("path", {
|
|
2217
2213
|
className: `chart-area-fill ${a}`,
|
|
2218
2214
|
d: s
|
|
2219
2215
|
}),
|
|
2220
|
-
/* @__PURE__ */
|
|
2216
|
+
/* @__PURE__ */ Y("path", {
|
|
2221
2217
|
className: `chart-line ${a} ${f ? "animated" : ""}`,
|
|
2222
2218
|
d: o
|
|
2223
2219
|
}),
|
|
2224
|
-
n.map((t, n) => /* @__PURE__ */
|
|
2220
|
+
n.map((t, n) => /* @__PURE__ */ Y("circle", {
|
|
2225
2221
|
className: `chart-dot ${a} ${g === n ? "active" : ""}`,
|
|
2226
2222
|
cx: t.x,
|
|
2227
2223
|
cy: t.y,
|
|
@@ -2231,7 +2227,7 @@ function an({ data: e, colors: t, innerWidth: n, innerHeight: r, padding: i, xAx
|
|
|
2231
2227
|
}, n))
|
|
2232
2228
|
] }, r);
|
|
2233
2229
|
}),
|
|
2234
|
-
g !== null && /* @__PURE__ */
|
|
2230
|
+
g !== null && /* @__PURE__ */ Y("line", {
|
|
2235
2231
|
className: "chart-crosshair",
|
|
2236
2232
|
x1: i.left + D(g),
|
|
2237
2233
|
y1: i.top,
|
|
@@ -2245,7 +2241,7 @@ function an({ data: e, colors: t, innerWidth: n, innerHeight: r, padding: i, xAx
|
|
|
2245
2241
|
//#endregion
|
|
2246
2242
|
//#region src/components/data/MChart/charts/MPieChart.tsx
|
|
2247
2243
|
function on({ data: e, colors: t, innerWidth: n, innerHeight: r, donut: i, donutWidth: a, animated: o, valueFormatter: s = Qt, xAxis: c, onTooltip: l, onDataClick: u }) {
|
|
2248
|
-
let [d, f] =
|
|
2244
|
+
let [d, f] = J(null), p = n / 2, m = r / 2, h = Math.min(p, m) - 10, g = i ? h - (a ?? h * .4) : 0, _ = K(() => {
|
|
2249
2245
|
let n = e.length === 1 ? e[0].data : e.map((e) => e.data[0] ?? 0), r = e.length === 1 ? c?.labels ?? n.map((e, t) => `Segment ${t + 1}`) : e.map((e) => e.label), i = n.reduce((e, t) => e + Math.max(t, 0), 0) || 1, a = -Math.PI / 2;
|
|
2250
2246
|
return n.map((n, o) => {
|
|
2251
2247
|
let s = Math.max(n, 0) / i * Math.PI * 2, c = {
|
|
@@ -2262,7 +2258,7 @@ function on({ data: e, colors: t, innerWidth: n, innerHeight: r, donut: i, donut
|
|
|
2262
2258
|
e,
|
|
2263
2259
|
t,
|
|
2264
2260
|
c
|
|
2265
|
-
]), v =
|
|
2261
|
+
]), v = G((e, t) => {
|
|
2266
2262
|
f(e);
|
|
2267
2263
|
let n = t.currentTarget.closest("svg");
|
|
2268
2264
|
if (!n) return;
|
|
@@ -2277,12 +2273,12 @@ function on({ data: e, colors: t, innerWidth: n, innerHeight: r, donut: i, donut
|
|
|
2277
2273
|
x: t.clientX - r.left,
|
|
2278
2274
|
y: t.clientY - r.top
|
|
2279
2275
|
});
|
|
2280
|
-
}, [_, l]), y =
|
|
2276
|
+
}, [_, l]), y = G(() => {
|
|
2281
2277
|
f(null), l(null);
|
|
2282
2278
|
}, [l]);
|
|
2283
|
-
return /* @__PURE__ */
|
|
2284
|
-
let n = d === t, r =
|
|
2285
|
-
return /* @__PURE__ */
|
|
2279
|
+
return /* @__PURE__ */ X("g", { children: [_.map((e, t) => {
|
|
2280
|
+
let n = d === t, r = be(p, m, n ? h + 4 : h, g, e.startAngle, e.endAngle);
|
|
2281
|
+
return /* @__PURE__ */ Y("path", {
|
|
2286
2282
|
className: `chart-pie-segment ${e.color} ${o ? "animated" : ""} ${n ? "active" : ""}`,
|
|
2287
2283
|
d: r,
|
|
2288
2284
|
onMouseEnter: (e) => v(t, e),
|
|
@@ -2305,7 +2301,7 @@ function on({ data: e, colors: t, innerWidth: n, innerHeight: r, donut: i, donut
|
|
|
2305
2301
|
onClick: () => u?.(0, t, e.value),
|
|
2306
2302
|
style: { cursor: u ? "pointer" : void 0 }
|
|
2307
2303
|
}, t);
|
|
2308
|
-
}), i && /* @__PURE__ */
|
|
2304
|
+
}), i && /* @__PURE__ */ Y("text", {
|
|
2309
2305
|
x: p,
|
|
2310
2306
|
y: m,
|
|
2311
2307
|
textAnchor: "middle",
|
|
@@ -2328,45 +2324,45 @@ var sn = [
|
|
|
2328
2324
|
"light"
|
|
2329
2325
|
];
|
|
2330
2326
|
function cn() {
|
|
2331
|
-
return /* @__PURE__ */
|
|
2332
|
-
sn.map((e) => /* @__PURE__ */
|
|
2327
|
+
return /* @__PURE__ */ X("defs", { children: [
|
|
2328
|
+
sn.map((e) => /* @__PURE__ */ X("linearGradient", {
|
|
2333
2329
|
id: `chart-bar-grad-${e}`,
|
|
2334
2330
|
x1: "0",
|
|
2335
2331
|
y1: "0",
|
|
2336
2332
|
x2: "0",
|
|
2337
2333
|
y2: "1",
|
|
2338
|
-
children: [/* @__PURE__ */
|
|
2334
|
+
children: [/* @__PURE__ */ Y("stop", {
|
|
2339
2335
|
offset: "0%",
|
|
2340
2336
|
className: `chart-grad-stop-start ${e}`
|
|
2341
|
-
}), /* @__PURE__ */
|
|
2337
|
+
}), /* @__PURE__ */ Y("stop", {
|
|
2342
2338
|
offset: "100%",
|
|
2343
2339
|
className: `chart-grad-stop-end ${e}`
|
|
2344
2340
|
})]
|
|
2345
2341
|
}, `bar-${e}`)),
|
|
2346
|
-
sn.map((e) => /* @__PURE__ */
|
|
2342
|
+
sn.map((e) => /* @__PURE__ */ X("linearGradient", {
|
|
2347
2343
|
id: `chart-pie-grad-${e}`,
|
|
2348
2344
|
x1: "0.3",
|
|
2349
2345
|
y1: "0",
|
|
2350
2346
|
x2: "0.7",
|
|
2351
2347
|
y2: "1",
|
|
2352
|
-
children: [/* @__PURE__ */
|
|
2348
|
+
children: [/* @__PURE__ */ Y("stop", {
|
|
2353
2349
|
offset: "0%",
|
|
2354
2350
|
className: `chart-grad-stop-start ${e}`
|
|
2355
|
-
}), /* @__PURE__ */
|
|
2351
|
+
}), /* @__PURE__ */ Y("stop", {
|
|
2356
2352
|
offset: "100%",
|
|
2357
2353
|
className: `chart-grad-stop-end ${e}`
|
|
2358
2354
|
})]
|
|
2359
2355
|
}, `pie-${e}`)),
|
|
2360
|
-
sn.map((e) => /* @__PURE__ */
|
|
2356
|
+
sn.map((e) => /* @__PURE__ */ X("linearGradient", {
|
|
2361
2357
|
id: `chart-area-grad-${e}`,
|
|
2362
2358
|
x1: "0",
|
|
2363
2359
|
y1: "0",
|
|
2364
2360
|
x2: "0",
|
|
2365
2361
|
y2: "1",
|
|
2366
|
-
children: [/* @__PURE__ */
|
|
2362
|
+
children: [/* @__PURE__ */ Y("stop", {
|
|
2367
2363
|
offset: "0%",
|
|
2368
2364
|
className: `chart-grad-area-start ${e}`
|
|
2369
|
-
}), /* @__PURE__ */
|
|
2365
|
+
}), /* @__PURE__ */ Y("stop", {
|
|
2370
2366
|
offset: "100%",
|
|
2371
2367
|
className: `chart-grad-area-end ${e}`
|
|
2372
2368
|
})]
|
|
@@ -2376,24 +2372,24 @@ function cn() {
|
|
|
2376
2372
|
//#endregion
|
|
2377
2373
|
//#region src/components/data/MChart/parts/ChartTooltip.tsx
|
|
2378
2374
|
function ln({ data: e, valueFormatter: t }) {
|
|
2379
|
-
return e ? /* @__PURE__ */
|
|
2375
|
+
return e ? /* @__PURE__ */ X("div", {
|
|
2380
2376
|
className: "chart-tooltip",
|
|
2381
2377
|
style: {
|
|
2382
2378
|
left: e.x,
|
|
2383
2379
|
top: e.y
|
|
2384
2380
|
},
|
|
2385
|
-
children: [/* @__PURE__ */
|
|
2381
|
+
children: [/* @__PURE__ */ Y("div", {
|
|
2386
2382
|
className: "chart-tooltip-label",
|
|
2387
2383
|
children: e.label
|
|
2388
|
-
}), e.items.map((e, n) => /* @__PURE__ */
|
|
2384
|
+
}), e.items.map((e, n) => /* @__PURE__ */ X("div", {
|
|
2389
2385
|
className: "chart-tooltip-row",
|
|
2390
2386
|
children: [
|
|
2391
|
-
/* @__PURE__ */
|
|
2392
|
-
/* @__PURE__ */
|
|
2387
|
+
/* @__PURE__ */ Y("span", { className: `chart-tooltip-dot ${e.color}` }),
|
|
2388
|
+
/* @__PURE__ */ Y("span", {
|
|
2393
2389
|
className: "chart-tooltip-name",
|
|
2394
2390
|
children: e.name
|
|
2395
2391
|
}),
|
|
2396
|
-
/* @__PURE__ */
|
|
2392
|
+
/* @__PURE__ */ Y("span", {
|
|
2397
2393
|
className: "chart-tooltip-value",
|
|
2398
2394
|
children: t(e.value)
|
|
2399
2395
|
})
|
|
@@ -2404,11 +2400,11 @@ function ln({ data: e, valueFormatter: t }) {
|
|
|
2404
2400
|
//#endregion
|
|
2405
2401
|
//#region src/components/data/MChart/parts/ChartLegend.tsx
|
|
2406
2402
|
function un({ items: e }) {
|
|
2407
|
-
return e.length <= 1 ? null : /* @__PURE__ */
|
|
2403
|
+
return e.length <= 1 ? null : /* @__PURE__ */ Y("div", {
|
|
2408
2404
|
className: "chart-legend",
|
|
2409
|
-
children: e.map((e, t) => /* @__PURE__ */
|
|
2405
|
+
children: e.map((e, t) => /* @__PURE__ */ X("div", {
|
|
2410
2406
|
className: "chart-legend-item",
|
|
2411
|
-
children: [/* @__PURE__ */
|
|
2407
|
+
children: [/* @__PURE__ */ Y("span", { className: `chart-legend-dot ${e.color}` }), /* @__PURE__ */ Y("span", {
|
|
2412
2408
|
className: "chart-legend-label",
|
|
2413
2409
|
children: e.label
|
|
2414
2410
|
})]
|
|
@@ -2418,9 +2414,9 @@ function un({ items: e }) {
|
|
|
2418
2414
|
//#endregion
|
|
2419
2415
|
//#region src/components/data/MChart/MChart.tsx
|
|
2420
2416
|
function dn({ type: e, data: t, width: n = "100%", height: r = 300, aspectRatio: i, xAxis: a, yAxis: o, showGrid: s = !0, showXAxis: c = !0, showYAxis: l = !0, showLegend: u = !0, showTooltip: d = !0, animated: f = !0, stacked: p = !1, curved: m = !1, donut: h = !1, donutWidth: g, valueFormatter: _ = Qt, labelFormatter: v = $t, onDataClick: y, className: b, style: x, ...S }) {
|
|
2421
|
-
let C =
|
|
2417
|
+
let C = q(null), [w, T] = J(null), E = Yt, D = a?.title || o?.title ? Zt : Xt, O = i ? void 0 : typeof r == "number" ? r : 300, k = O ?? 300, A = G((e) => {
|
|
2422
2418
|
d && T(e);
|
|
2423
|
-
}, [d]), j =
|
|
2419
|
+
}, [d]), j = K(() => e === "pie" && t.length === 1 ? (a?.labels ?? t[0].data.map((e, t) => `Segment ${t + 1}`)).map((e, t) => ({
|
|
2424
2420
|
label: e,
|
|
2425
2421
|
color: E[t % E.length]
|
|
2426
2422
|
})) : t.map((e, t) => ({
|
|
@@ -2447,7 +2443,7 @@ function dn({ type: e, data: t, width: n = "100%", height: r = 300, aspectRatio:
|
|
|
2447
2443
|
onTooltip: A,
|
|
2448
2444
|
onDataClick: y
|
|
2449
2445
|
};
|
|
2450
|
-
return /* @__PURE__ */
|
|
2446
|
+
return /* @__PURE__ */ X("div", {
|
|
2451
2447
|
ref: C,
|
|
2452
2448
|
className: I("chart", b),
|
|
2453
2449
|
style: {
|
|
@@ -2458,44 +2454,44 @@ function dn({ type: e, data: t, width: n = "100%", height: r = 300, aspectRatio:
|
|
|
2458
2454
|
},
|
|
2459
2455
|
...S,
|
|
2460
2456
|
children: [
|
|
2461
|
-
/* @__PURE__ */
|
|
2457
|
+
/* @__PURE__ */ X("svg", {
|
|
2462
2458
|
viewBox: `0 0 600 ${k}`,
|
|
2463
2459
|
preserveAspectRatio: "xMidYMid meet",
|
|
2464
2460
|
className: "chart-svg",
|
|
2465
2461
|
children: [
|
|
2466
|
-
/* @__PURE__ */
|
|
2467
|
-
e === "line" && /* @__PURE__ */
|
|
2462
|
+
/* @__PURE__ */ Y(cn, {}),
|
|
2463
|
+
e === "line" && /* @__PURE__ */ Y(nn, {
|
|
2468
2464
|
...M,
|
|
2469
2465
|
curved: m
|
|
2470
2466
|
}),
|
|
2471
|
-
e === "bar" && /* @__PURE__ */
|
|
2467
|
+
e === "bar" && /* @__PURE__ */ Y(rn, {
|
|
2472
2468
|
...M,
|
|
2473
2469
|
stacked: p
|
|
2474
2470
|
}),
|
|
2475
|
-
e === "area" && /* @__PURE__ */
|
|
2471
|
+
e === "area" && /* @__PURE__ */ Y(an, {
|
|
2476
2472
|
...M,
|
|
2477
2473
|
curved: m,
|
|
2478
2474
|
stacked: p
|
|
2479
2475
|
}),
|
|
2480
|
-
e === "pie" && /* @__PURE__ */
|
|
2476
|
+
e === "pie" && /* @__PURE__ */ Y(on, {
|
|
2481
2477
|
...M,
|
|
2482
2478
|
donut: h,
|
|
2483
2479
|
donutWidth: g
|
|
2484
2480
|
})
|
|
2485
2481
|
]
|
|
2486
2482
|
}),
|
|
2487
|
-
d && /* @__PURE__ */
|
|
2483
|
+
d && /* @__PURE__ */ Y(ln, {
|
|
2488
2484
|
data: w,
|
|
2489
2485
|
valueFormatter: _
|
|
2490
2486
|
}),
|
|
2491
|
-
u && /* @__PURE__ */
|
|
2487
|
+
u && /* @__PURE__ */ Y(un, { items: j })
|
|
2492
2488
|
]
|
|
2493
2489
|
});
|
|
2494
2490
|
}
|
|
2495
2491
|
//#endregion
|
|
2496
2492
|
//#region src/components/data/MChart/MLineChart.tsx
|
|
2497
2493
|
function fn(e) {
|
|
2498
|
-
return /* @__PURE__ */
|
|
2494
|
+
return /* @__PURE__ */ Y(dn, {
|
|
2499
2495
|
type: "line",
|
|
2500
2496
|
...e
|
|
2501
2497
|
});
|
|
@@ -2503,7 +2499,7 @@ function fn(e) {
|
|
|
2503
2499
|
//#endregion
|
|
2504
2500
|
//#region src/components/data/MChart/MBarChart.tsx
|
|
2505
2501
|
function pn(e) {
|
|
2506
|
-
return /* @__PURE__ */
|
|
2502
|
+
return /* @__PURE__ */ Y(dn, {
|
|
2507
2503
|
type: "bar",
|
|
2508
2504
|
...e
|
|
2509
2505
|
});
|
|
@@ -2511,7 +2507,7 @@ function pn(e) {
|
|
|
2511
2507
|
//#endregion
|
|
2512
2508
|
//#region src/components/data/MChart/MAreaChart.tsx
|
|
2513
2509
|
function mn(e) {
|
|
2514
|
-
return /* @__PURE__ */
|
|
2510
|
+
return /* @__PURE__ */ Y(dn, {
|
|
2515
2511
|
type: "area",
|
|
2516
2512
|
...e
|
|
2517
2513
|
});
|
|
@@ -2519,12 +2515,12 @@ function mn(e) {
|
|
|
2519
2515
|
//#endregion
|
|
2520
2516
|
//#region src/components/data/MChart/MPieChart.tsx
|
|
2521
2517
|
function hn(e) {
|
|
2522
|
-
return /* @__PURE__ */
|
|
2518
|
+
return /* @__PURE__ */ Y(dn, {
|
|
2523
2519
|
type: "pie",
|
|
2524
2520
|
...e
|
|
2525
2521
|
});
|
|
2526
2522
|
}
|
|
2527
2523
|
//#endregion
|
|
2528
|
-
export {
|
|
2524
|
+
export { Xe as _, Jt as a, We as b, Gt as c, wt as d, lt as f, Ze as g, Qe as h, fn as i, qt as l, $e as m, mn as n, Ut as o, ct as p, pn as r, Wt as s, hn as t, Kt as u, qe as v, Ue as x, Ke as y };
|
|
2529
2525
|
|
|
2530
|
-
//# sourceMappingURL=data-
|
|
2526
|
+
//# sourceMappingURL=data-s8Hkht1B.js.map
|