@banzamel/mineralui 1.1.1 → 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-tpFpLFPO.js → MAvatar-BoO51a6m.js} +2 -2
- package/dist/{MAvatar-tpFpLFPO.js.map → MAvatar-BoO51a6m.js.map} +1 -1
- package/dist/{MAvatar-nLlGAprq.cjs → MAvatar-DJKtca9j.cjs} +2 -2
- package/dist/{MAvatar-nLlGAprq.cjs.map → MAvatar-DJKtca9j.cjs.map} +1 -1
- package/dist/{MBadge-imAk1gYn.cjs → MBadge-CexVV675.cjs} +1 -1
- package/dist/{MBadge-imAk1gYn.cjs.map → MBadge-CexVV675.cjs.map} +1 -1
- package/dist/{MBadge-UTUlEAik.js → MBadge-Y1JnZiIC.js} +1 -1
- package/dist/{MBadge-UTUlEAik.js.map → MBadge-Y1JnZiIC.js.map} +1 -1
- package/dist/{MButton-CX8SV1m0.cjs → MButton-B8rXmFX9.cjs} +1 -1
- package/dist/{MButton-CX8SV1m0.cjs.map → MButton-B8rXmFX9.cjs.map} +1 -1
- package/dist/{MButton-BJdrNg2I.js → MButton-BmTDe5Oa.js} +1 -1
- package/dist/{MButton-BJdrNg2I.js.map → MButton-BmTDe5Oa.js.map} +1 -1
- package/dist/{MCheckbox-DfCD0EtS.js → MCheckbox-B7SpcD4H.js} +1 -1
- package/dist/{MCheckbox-DfCD0EtS.js.map → MCheckbox-B7SpcD4H.js.map} +1 -1
- package/dist/{MCheckbox-CAZA97h7.cjs → MCheckbox-Bea3orrs.cjs} +1 -1
- package/dist/{MCheckbox-CAZA97h7.cjs.map → MCheckbox-Bea3orrs.cjs.map} +1 -1
- package/dist/{MCookieBootstrap-BhTMPs8T.js → MCookieBootstrap-CNYLvKjW.js} +1 -1
- package/dist/{MCookieBootstrap-BhTMPs8T.js.map → MCookieBootstrap-CNYLvKjW.js.map} +1 -1
- package/dist/{MCookieBootstrap-Fxpem-gF.cjs → MCookieBootstrap-DSOT4FQo.cjs} +1 -1
- package/dist/{MCookieBootstrap-Fxpem-gF.cjs.map → MCookieBootstrap-DSOT4FQo.cjs.map} +1 -1
- package/dist/{MDataTable-BZs6Cn9e.cjs → MDataTable-BI7wFZYN.cjs} +2 -2
- package/dist/{MDataTable-BZs6Cn9e.cjs.map → MDataTable-BI7wFZYN.cjs.map} +1 -1
- package/dist/{MDataTable-D-ASD4g3.js → MDataTable-Cqwkiq7A.js} +10 -10
- package/dist/{MDataTable-D-ASD4g3.js.map → MDataTable-Cqwkiq7A.js.map} +1 -1
- package/dist/{MDrawer-CTVEF34p.cjs → MDrawer-CSvjLrhB.cjs} +2 -2
- package/dist/{MDrawer-CTVEF34p.cjs.map → MDrawer-CSvjLrhB.cjs.map} +1 -1
- package/dist/{MDrawer-CscOMXBg.js → MDrawer-DXHtAckQ.js} +2 -2
- package/dist/{MDrawer-CscOMXBg.js.map → MDrawer-DXHtAckQ.js.map} +1 -1
- package/dist/{MDropdownMenu-B1eOmM7u.js → MDropdownMenu-CxBhYxQb.js} +1 -1
- package/dist/{MDropdownMenu-B1eOmM7u.js.map → MDropdownMenu-CxBhYxQb.js.map} +1 -1
- package/dist/{MDropdownMenu-CiJ_7DQ2.cjs → MDropdownMenu-X7ywPqth.cjs} +1 -1
- package/dist/{MDropdownMenu-CiJ_7DQ2.cjs.map → MDropdownMenu-X7ywPqth.cjs.map} +1 -1
- package/dist/{MHeading-CMGPJwul.js → MHeading-C3IgV22T.js} +2 -2
- package/dist/{MHeading-CMGPJwul.js.map → MHeading-C3IgV22T.js.map} +1 -1
- package/dist/{MHeading-sW0j7ssI.cjs → MHeading-DqvWKia1.cjs} +2 -2
- package/dist/{MHeading-sW0j7ssI.cjs.map → MHeading-DqvWKia1.cjs.map} +1 -1
- package/dist/{MImage-3UVzZIgA.js → MImage-BDcrV6IC.js} +2 -2
- package/dist/{MImage-3UVzZIgA.js.map → MImage-BDcrV6IC.js.map} +1 -1
- package/dist/{MImage-BHgzEHMO.cjs → MImage-BsQJ_eYf.cjs} +2 -2
- package/dist/{MImage-BHgzEHMO.cjs.map → MImage-BsQJ_eYf.cjs.map} +1 -1
- package/dist/{MInline-DUzpnZoB.cjs → MInline-BAhu2zT-.cjs} +1 -1
- package/dist/{MInline-DUzpnZoB.cjs.map → MInline-BAhu2zT-.cjs.map} +1 -1
- package/dist/{MInline-cTj903A4.js → MInline-Dfy3Lrjs.js} +1 -1
- package/dist/{MInline-cTj903A4.js.map → MInline-Dfy3Lrjs.js.map} +1 -1
- package/dist/{MInput-B8RPS-wr.js → MInput-BSaKw0Uc.js} +2 -2
- package/dist/{MInput-B8RPS-wr.js.map → MInput-BSaKw0Uc.js.map} +1 -1
- package/dist/{MInput-BZ1ZPuk3.cjs → MInput-W7DJQ_ng.cjs} +2 -2
- package/dist/{MInput-BZ1ZPuk3.cjs.map → MInput-W7DJQ_ng.cjs.map} +1 -1
- package/dist/{MInputCVC-DOBmGhJL.cjs → MInputCVC-DH_bjV5R.cjs} +2 -2
- package/dist/{MInputCVC-DOBmGhJL.cjs.map → MInputCVC-DH_bjV5R.cjs.map} +1 -1
- package/dist/{MInputCVC-BJQWuuwR.js → MInputCVC-Dqbl1zG9.js} +3 -3
- package/dist/{MInputCVC-BJQWuuwR.js.map → MInputCVC-Dqbl1zG9.js.map} +1 -1
- package/dist/{MInputSearch-DAAg9FXv.cjs → MInputSearch-C7betxTa.cjs} +2 -2
- package/dist/{MInputSearch-DAAg9FXv.cjs.map → MInputSearch-C7betxTa.cjs.map} +1 -1
- package/dist/{MInputSearch-PMHykVrc.js → MInputSearch-CH5ZcjLq.js} +2 -2
- package/dist/{MInputSearch-PMHykVrc.js.map → MInputSearch-CH5ZcjLq.js.map} +1 -1
- package/dist/{MLink-D10DD8oX.cjs → MLink-DHryXq_D.cjs} +1 -1
- package/dist/{MLink-D10DD8oX.cjs.map → MLink-DHryXq_D.cjs.map} +1 -1
- package/dist/{MLink-CBmT8zaD.js → MLink-ODytrwne.js} +1 -1
- package/dist/{MLink-CBmT8zaD.js.map → MLink-ODytrwne.js.map} +1 -1
- package/dist/{MModal-BogYYyZE.js → MModal-DShADuLw.js} +2 -2
- package/dist/{MModal-BogYYyZE.js.map → MModal-DShADuLw.js.map} +1 -1
- package/dist/{MModal-CfzduXaI.cjs → MModal-pMcPs3pw.cjs} +2 -2
- package/dist/{MModal-CfzduXaI.cjs.map → MModal-pMcPs3pw.cjs.map} +1 -1
- package/dist/{MPagination-CgvjKhLN.js → MPagination-B7aho7rQ.js} +2 -2
- package/dist/{MPagination-CgvjKhLN.js.map → MPagination-B7aho7rQ.js.map} +1 -1
- package/dist/{MPagination-vg2EqB8z.cjs → MPagination-BWHAVgWN.cjs} +2 -2
- package/dist/{MPagination-vg2EqB8z.cjs.map → MPagination-BWHAVgWN.cjs.map} +1 -1
- package/dist/{MQrCode-l0FzrNCq.js → MQrCode-6Cz9B7Qy.js} +2 -2
- package/dist/{MQrCode-l0FzrNCq.js.map → MQrCode-6Cz9B7Qy.js.map} +1 -1
- package/dist/{MQrCode-DB9vELHq.cjs → MQrCode-Bp2CWpmX.cjs} +2 -2
- package/dist/{MQrCode-DB9vELHq.cjs.map → MQrCode-Bp2CWpmX.cjs.map} +1 -1
- package/dist/{MSkeleton-D7wnoEE8.cjs → MSkeleton-BfRBJ6ku.cjs} +1 -1
- package/dist/{MSkeleton-D7wnoEE8.cjs.map → MSkeleton-BfRBJ6ku.cjs.map} +1 -1
- package/dist/{MSkeleton-Bh9cCe49.js → MSkeleton-CauCfkzj.js} +1 -1
- package/dist/{MSkeleton-Bh9cCe49.js.map → MSkeleton-CauCfkzj.js.map} +1 -1
- package/dist/{MSlider-YDSrVUQ8.cjs → MSlider-BCMJkvcA.cjs} +1 -1
- package/dist/{MSlider-YDSrVUQ8.cjs.map → MSlider-BCMJkvcA.cjs.map} +1 -1
- package/dist/{MSlider-BlgzLtHa.js → MSlider-CqrusKJQ.js} +1 -1
- package/dist/{MSlider-BlgzLtHa.js.map → MSlider-CqrusKJQ.js.map} +1 -1
- package/dist/{MSparkline-Bl5-EHJr.cjs → MSparkline-BOaNmbeB.cjs} +1 -1
- package/dist/{MSparkline-Bl5-EHJr.cjs.map → MSparkline-BOaNmbeB.cjs.map} +1 -1
- package/dist/{MSparkline-C8tnqhJm.js → MSparkline-Cb_EwR-E.js} +1 -1
- package/dist/{MSparkline-C8tnqhJm.js.map → MSparkline-Cb_EwR-E.js.map} +1 -1
- package/dist/{MStack-XTsT_kLJ.js → MStack-Cifiqeb2.js} +1 -1
- package/dist/{MStack-XTsT_kLJ.js.map → MStack-Cifiqeb2.js.map} +1 -1
- package/dist/{MStack-BKDsNitR.cjs → MStack-lrvy7l3w.cjs} +1 -1
- package/dist/{MStack-BKDsNitR.cjs.map → MStack-lrvy7l3w.cjs.map} +1 -1
- package/dist/{MSubText-BIaYgtU4.cjs → MSubText-78oYdJQy.cjs} +2 -2
- package/dist/{MSubText-BIaYgtU4.cjs.map → MSubText-78oYdJQy.cjs.map} +1 -1
- package/dist/{MSubText-uoh7Qx7S.js → MSubText-C2oxXwKT.js} +2 -2
- package/dist/{MSubText-uoh7Qx7S.js.map → MSubText-C2oxXwKT.js.map} +1 -1
- package/dist/{MTag-BVo9zFIj.cjs → MTag-C4_rBj4b.cjs} +2 -2
- package/dist/{MTag-BVo9zFIj.cjs.map → MTag-C4_rBj4b.cjs.map} +1 -1
- package/dist/{MTag-Bq9b51kE.js → MTag-DOcKm3c2.js} +2 -2
- package/dist/{MTag-Bq9b51kE.js.map → MTag-DOcKm3c2.js.map} +1 -1
- package/dist/{MText-B4koGfYi.cjs → MText-CxSZ2md0.cjs} +1 -1
- package/dist/{MText-B4koGfYi.cjs.map → MText-CxSZ2md0.cjs.map} +1 -1
- package/dist/{MText-CKyns1SE.js → MText-DX9O7gh7.js} +1 -1
- package/dist/{MText-CKyns1SE.js.map → MText-DX9O7gh7.js.map} +1 -1
- package/dist/{MTimeAgo-LWntwbKg.cjs → MTimeAgo-91_ndjxU.cjs} +2 -2
- package/dist/{MTimeAgo-LWntwbKg.cjs.map → MTimeAgo-91_ndjxU.cjs.map} +1 -1
- package/dist/{MTimeAgo-irsvTFAY.js → MTimeAgo-xxl53mct.js} +2 -2
- package/dist/{MTimeAgo-irsvTFAY.js.map → MTimeAgo-xxl53mct.js.map} +1 -1
- package/dist/{MToggle-BbSDIAJq.js → MToggle-B6emKoKq.js} +1 -1
- package/dist/{MToggle-BbSDIAJq.js.map → MToggle-B6emKoKq.js.map} +1 -1
- package/dist/{MToggle-GhhAJgUa.cjs → MToggle-CsGS_W3X.cjs} +1 -1
- package/dist/{MToggle-GhhAJgUa.cjs.map → MToggle-CsGS_W3X.cjs.map} +1 -1
- package/dist/{MTooltip-eTM5DKtM.cjs → MTooltip-CNXoyQEN.cjs} +1 -1
- package/dist/{MTooltip-eTM5DKtM.cjs.map → MTooltip-CNXoyQEN.cjs.map} +1 -1
- package/dist/{MTooltip-BVQ7wBrO.js → MTooltip-UYOjDBOu.js} +1 -1
- package/dist/{MTooltip-BVQ7wBrO.js.map → MTooltip-UYOjDBOu.js.map} +1 -1
- package/dist/{cards-JqA2VWit.js → cards-BE77zKTI.js} +64 -64
- package/dist/{cards-JqA2VWit.js.map → cards-BE77zKTI.js.map} +1 -1
- package/dist/{cards-QoMhQlao.cjs → cards-BINs-dmS.cjs} +2 -2
- package/dist/{cards-QoMhQlao.cjs.map → cards-BINs-dmS.cjs.map} +1 -1
- package/dist/cards.cjs +1 -1
- package/dist/cards.js +2 -2
- package/dist/components/feedback/MCookie/MCookieBootstrap/MCookieBootstrap.script.d.ts +4 -0
- 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-Dbev0qSy.js → controls-BMwQ3C1R.js} +2 -2
- package/dist/{controls-Dbev0qSy.js.map → controls-BMwQ3C1R.js.map} +1 -1
- package/dist/{controls-BFmZuejK.cjs → controls-DwL1-nVC.cjs} +2 -2
- package/dist/{controls-BFmZuejK.cjs.map → controls-DwL1-nVC.cjs.map} +1 -1
- 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/{data-BooVW8q_.cjs → data-BESfox0z.cjs} +2 -2
- package/dist/{data-BooVW8q_.cjs.map → data-BESfox0z.cjs.map} +1 -1
- package/dist/{data-B1hbWMzU.js → data-s8Hkht1B.js} +608 -608
- package/dist/{data-B1hbWMzU.js.map → data-s8Hkht1B.js.map} +1 -1
- package/dist/data.cjs +1 -1
- package/dist/data.js +3 -3
- package/dist/{display-B-zP1BEz.cjs → display-B0lpgApV.cjs} +2 -2
- package/dist/{display-B-zP1BEz.cjs.map → display-B0lpgApV.cjs.map} +1 -1
- package/dist/{display-DC0d-nPm.js → display-DuBRiEKr.js} +3 -3
- package/dist/{display-DC0d-nPm.js.map → display-DuBRiEKr.js.map} +1 -1
- package/dist/display.cjs +1 -1
- package/dist/display.js +3 -3
- package/dist/{dropdowns-Vo7Oo_ii.js → dropdowns-BcVrUMPE.js} +43 -43
- package/dist/{dropdowns-Vo7Oo_ii.js.map → dropdowns-BcVrUMPE.js.map} +1 -1
- package/dist/dropdowns-CK-oxd62.cjs +2 -0
- package/dist/{dropdowns-CMt9-Jpa.cjs.map → dropdowns-CK-oxd62.cjs.map} +1 -1
- package/dist/dropdowns.cjs +1 -1
- package/dist/dropdowns.js +1 -1
- package/dist/{feedback-D29Er-TD.js → feedback-D3LLKNlY.js} +196 -196
- package/dist/{feedback-D29Er-TD.js.map → feedback-D3LLKNlY.js.map} +1 -1
- package/dist/{feedback-B-PVXL68.cjs → feedback-DYjg0Dbp.cjs} +2 -2
- package/dist/{feedback-B-PVXL68.cjs.map → feedback-DYjg0Dbp.cjs.map} +1 -1
- package/dist/feedback.cjs +1 -1
- package/dist/feedback.js +6 -6
- package/dist/{frameworkTexts-BgzNvcs2.js → frameworkTexts-B6oE8pMk.js} +1 -1
- package/dist/{frameworkTexts-BgzNvcs2.js.map → frameworkTexts-B6oE8pMk.js.map} +1 -1
- package/dist/{frameworkTexts-r4jSfpMt.cjs → frameworkTexts-C_9KZK_A.cjs} +1 -1
- package/dist/{frameworkTexts-r4jSfpMt.cjs.map → frameworkTexts-C_9KZK_A.cjs.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +40 -40
- package/dist/{inputs-Dw9Uv8f4.cjs → inputs-Dcj6C_Fn.cjs} +2 -2
- package/dist/{inputs-Dw9Uv8f4.cjs.map → inputs-Dcj6C_Fn.cjs.map} +1 -1
- package/dist/{inputs-Bl7ssV3Q.js → inputs-bCxSLz-U.js} +115 -115
- package/dist/{inputs-Bl7ssV3Q.js.map → inputs-bCxSLz-U.js.map} +1 -1
- package/dist/inputs.cjs +1 -1
- package/dist/inputs.js +4 -4
- package/dist/{layout-UP_12LRD.js → layout-Cb94o3oU.js} +282 -208
- 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 +5 -5
- package/dist/{locale-uMMj57KX.js → locale-BNyzqXAU.js} +1 -1
- package/dist/{locale-uMMj57KX.js.map → locale-BNyzqXAU.js.map} +1 -1
- package/dist/{locale-LCAQDJCd.cjs → locale-BltrWJtd.cjs} +1 -1
- package/dist/{locale-LCAQDJCd.cjs.map → locale-BltrWJtd.cjs.map} +1 -1
- package/dist/{media-D5zF3vH6.js → media-8aMOtckF.js} +5 -5
- package/dist/{media-D5zF3vH6.js.map → media-8aMOtckF.js.map} +1 -1
- package/dist/{media-C4WtzWxU.cjs → media-D5YGOTm7.cjs} +2 -2
- package/dist/{media-C4WtzWxU.cjs.map → media-D5YGOTm7.cjs.map} +1 -1
- package/dist/media.cjs +1 -1
- package/dist/media.js +3 -3
- package/dist/{overlays-D9_8GEse.cjs → overlays-DCj-oV2H.cjs} +2 -2
- package/dist/{overlays-D9_8GEse.cjs.map → overlays-DCj-oV2H.cjs.map} +1 -1
- package/dist/{overlays-BahWPCPW.js → overlays-gjg00CAf.js} +3 -3
- package/dist/{overlays-BahWPCPW.js.map → overlays-gjg00CAf.js.map} +1 -1
- package/dist/overlays.cjs +1 -1
- package/dist/overlays.js +5 -5
- package/dist/style-runtime.cjs +1 -1
- package/dist/style-runtime.js +1 -1
- package/dist/styles.css +1 -1
- package/dist/{typography-BR2o3w3X.js → typography-DKdr1Tds.js} +2 -2
- package/dist/{typography-BR2o3w3X.js.map → typography-DKdr1Tds.js.map} +1 -1
- package/dist/{typography-BobOsDbn.cjs → typography-qbFGv1gA.cjs} +2 -2
- package/dist/{typography-BobOsDbn.cjs.map → typography-qbFGv1gA.cjs.map} +1 -1
- package/dist/typography.cjs +1 -1
- package/dist/typography.js +5 -5
- package/package.json +1 -1
- package/dist/dropdowns-CMt9-Jpa.cjs +0 -2
- package/dist/layout-C1QKiv2J.cjs +0 -2
- package/dist/layout-C1QKiv2J.cjs.map +0 -1
- package/dist/layout-UP_12LRD.js.map +0 -1
|
@@ -2,66 +2,66 @@ 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,
|
|
|
2
2
|
import { t as I } from "./cn-YER3QsV1.js";
|
|
3
3
|
import { t as L } from "./MPortal-Dqlkh3hw.js";
|
|
4
4
|
import { t as R } from "./MPopover-BC9C5967.js";
|
|
5
|
-
import {
|
|
6
|
-
import { t as z } from "./
|
|
7
|
-
import { t as
|
|
8
|
-
import { t as le } from "./
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { t as
|
|
12
|
-
import {
|
|
13
|
-
import { t as
|
|
14
|
-
import {
|
|
15
|
-
import { t as
|
|
16
|
-
import { t as
|
|
17
|
-
import { t as
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import { t as
|
|
23
|
-
import { Children as
|
|
24
|
-
import { Fragment as
|
|
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";
|
|
25
25
|
//#region src/components/data/MChat/MChatContext.ts
|
|
26
|
-
var
|
|
27
|
-
function
|
|
28
|
-
return
|
|
26
|
+
var Be = Fe({});
|
|
27
|
+
function Ve() {
|
|
28
|
+
return Le(Be);
|
|
29
29
|
}
|
|
30
30
|
//#endregion
|
|
31
31
|
//#region src/components/data/MChat/MChat.tsx
|
|
32
|
-
function
|
|
33
|
-
return
|
|
32
|
+
function He(e, t) {
|
|
33
|
+
return Ie(e) && !!e.type[t];
|
|
34
34
|
}
|
|
35
|
-
function
|
|
35
|
+
function Ue({ variant: e = "inline", open: t, onToggle: r, unreadCount: i, color: a = "primary", className: o, children: s, ...c }) {
|
|
36
36
|
let l = null, u = null, d = [];
|
|
37
|
-
|
|
38
|
-
if (
|
|
37
|
+
Pe.forEach(s, (e) => {
|
|
38
|
+
if (He(e, "__chatHeader")) {
|
|
39
39
|
l = e;
|
|
40
40
|
return;
|
|
41
41
|
}
|
|
42
|
-
if (
|
|
42
|
+
if (He(e, "__chatConversationList")) {
|
|
43
43
|
u = e;
|
|
44
44
|
return;
|
|
45
45
|
}
|
|
46
46
|
d.push(e);
|
|
47
47
|
});
|
|
48
|
-
let f =
|
|
48
|
+
let f = K(() => ({ color: a }), [a]), p = /* @__PURE__ */ Y(Be.Provider, {
|
|
49
49
|
value: f,
|
|
50
|
-
children: /* @__PURE__ */
|
|
50
|
+
children: /* @__PURE__ */ X("div", {
|
|
51
51
|
className: I("chat", e, `color-${a}`, e === "floating" && t && "open", o),
|
|
52
52
|
...c,
|
|
53
|
-
children: [u && /* @__PURE__ */
|
|
53
|
+
children: [u && /* @__PURE__ */ Y("div", {
|
|
54
54
|
className: "chat-sidebar",
|
|
55
55
|
children: u
|
|
56
|
-
}), /* @__PURE__ */
|
|
56
|
+
}), /* @__PURE__ */ X("div", {
|
|
57
57
|
className: "chat-main",
|
|
58
58
|
children: [l, d]
|
|
59
59
|
})]
|
|
60
60
|
})
|
|
61
61
|
});
|
|
62
|
-
return e === "floating" ? /* @__PURE__ */
|
|
62
|
+
return e === "floating" ? /* @__PURE__ */ Y(L, { children: /* @__PURE__ */ X("div", {
|
|
63
63
|
className: I("chat-floating-wrapper", t && "open"),
|
|
64
|
-
children: [t && p, /* @__PURE__ */
|
|
64
|
+
children: [t && p, /* @__PURE__ */ Y(de, {
|
|
65
65
|
variant: "filled",
|
|
66
66
|
color: a,
|
|
67
67
|
shape: "circle",
|
|
@@ -72,55 +72,55 @@ function Ve({ variant: e = "inline", open: t, onToggle: r, unreadCount: i, color
|
|
|
72
72
|
badge: !t && i ? i : void 0,
|
|
73
73
|
badgeColor: "error",
|
|
74
74
|
badgePulsing: !t && !!i,
|
|
75
|
-
children: /* @__PURE__ */
|
|
75
|
+
children: /* @__PURE__ */ Y(n, {})
|
|
76
76
|
})]
|
|
77
77
|
}) }) : p;
|
|
78
78
|
}
|
|
79
79
|
//#endregion
|
|
80
80
|
//#region src/components/data/MChat/MChatHeader.tsx
|
|
81
|
-
function
|
|
82
|
-
return /* @__PURE__ */
|
|
81
|
+
function We({ bordered: e = !1, className: t, children: n, ...r }) {
|
|
82
|
+
return /* @__PURE__ */ Y("div", {
|
|
83
83
|
className: I("chat-header", e && "bordered", t),
|
|
84
84
|
...r,
|
|
85
85
|
children: n
|
|
86
86
|
});
|
|
87
87
|
}
|
|
88
|
-
|
|
88
|
+
We.__chatHeader = !0;
|
|
89
89
|
//#endregion
|
|
90
90
|
//#region src/components/data/MChat/MChatMessage.tsx
|
|
91
|
-
function
|
|
91
|
+
function Ge({ status: e }) {
|
|
92
92
|
if (!e) return null;
|
|
93
93
|
let t = e === "delivered" || e === "read";
|
|
94
|
-
return /* @__PURE__ */
|
|
94
|
+
return /* @__PURE__ */ Y("span", {
|
|
95
95
|
className: I("chat-status", e === "read" ? "chat-status-read" : ""),
|
|
96
96
|
"aria-label": e,
|
|
97
97
|
children: t ? "✓✓" : "✓"
|
|
98
98
|
});
|
|
99
99
|
}
|
|
100
|
-
function
|
|
100
|
+
function Ke({ message: e, showAvatar: t = !0, showTimestamp: n = !0, color: r, className: i, ...a }) {
|
|
101
101
|
let { content: o, sender: s, timestamp: c, status: l, isOwn: u, images: d } = e;
|
|
102
|
-
return /* @__PURE__ */
|
|
102
|
+
return /* @__PURE__ */ X("div", {
|
|
103
103
|
className: I("chat-message", u && "own", r || void 0, i),
|
|
104
104
|
...a,
|
|
105
|
-
children: [t && !u && /* @__PURE__ */
|
|
105
|
+
children: [t && !u && /* @__PURE__ */ Y(ve, {
|
|
106
106
|
src: s.avatar,
|
|
107
107
|
name: s.name,
|
|
108
108
|
size: "sm",
|
|
109
109
|
color: r,
|
|
110
110
|
className: "chat-message-avatar"
|
|
111
|
-
}), /* @__PURE__ */
|
|
111
|
+
}), /* @__PURE__ */ X("div", {
|
|
112
112
|
className: "chat-message-content",
|
|
113
113
|
children: [
|
|
114
|
-
!u && /* @__PURE__ */
|
|
114
|
+
!u && /* @__PURE__ */ Y(z, {
|
|
115
115
|
className: "chat-message-sender",
|
|
116
116
|
color: "neutral",
|
|
117
117
|
children: s.name
|
|
118
118
|
}),
|
|
119
|
-
/* @__PURE__ */
|
|
119
|
+
/* @__PURE__ */ X("div", {
|
|
120
120
|
className: "chat-message-bubble",
|
|
121
|
-
children: [o && /* @__PURE__ */
|
|
121
|
+
children: [o && /* @__PURE__ */ Y(z, { children: o }), d && d.length > 0 && /* @__PURE__ */ Y("div", {
|
|
122
122
|
className: I("chat-message-images", d.length > 1 && "grid"),
|
|
123
|
-
children: d.map((e, t) => /* @__PURE__ */
|
|
123
|
+
children: d.map((e, t) => /* @__PURE__ */ Y(_e, {
|
|
124
124
|
src: e,
|
|
125
125
|
alt: "",
|
|
126
126
|
fit: "cover",
|
|
@@ -129,11 +129,11 @@ function We({ message: e, showAvatar: t = !0, showTimestamp: n = !0, color: r, c
|
|
|
129
129
|
}, t))
|
|
130
130
|
})]
|
|
131
131
|
}),
|
|
132
|
-
/* @__PURE__ */
|
|
132
|
+
/* @__PURE__ */ X("div", {
|
|
133
133
|
className: "chat-message-meta",
|
|
134
|
-
children: [u && /* @__PURE__ */
|
|
134
|
+
children: [u && /* @__PURE__ */ Y(Ge, { status: l }), n && /* @__PURE__ */ Y(le, {
|
|
135
135
|
className: "chat-message-time",
|
|
136
|
-
children: /* @__PURE__ */
|
|
136
|
+
children: /* @__PURE__ */ Y(ge, { value: c })
|
|
137
137
|
})]
|
|
138
138
|
})
|
|
139
139
|
]
|
|
@@ -142,17 +142,17 @@ function We({ message: e, showAvatar: t = !0, showTimestamp: n = !0, color: r, c
|
|
|
142
142
|
}
|
|
143
143
|
//#endregion
|
|
144
144
|
//#region src/components/data/MChat/MChatBody.tsx
|
|
145
|
-
function
|
|
146
|
-
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(() => {
|
|
147
147
|
let e = l.current;
|
|
148
148
|
e && (e.scrollTop = e.scrollHeight);
|
|
149
149
|
}, []);
|
|
150
|
-
return
|
|
150
|
+
return Re(() => {
|
|
151
151
|
let t = e?.length ?? 0;
|
|
152
152
|
t > d.current && u.current && f(), d.current = t;
|
|
153
|
-
}, [e?.length, f]),
|
|
153
|
+
}, [e?.length, f]), Re(() => {
|
|
154
154
|
f();
|
|
155
|
-
}, [f]), /* @__PURE__ */
|
|
155
|
+
}, [f]), /* @__PURE__ */ X("div", {
|
|
156
156
|
ref: l,
|
|
157
157
|
className: I("chat-body", i),
|
|
158
158
|
onScroll: () => {
|
|
@@ -161,11 +161,11 @@ function Ge({ messages: e, onScrollTop: t, loading: n = !1, color: r, className:
|
|
|
161
161
|
},
|
|
162
162
|
...o,
|
|
163
163
|
children: [
|
|
164
|
-
n && /* @__PURE__ */
|
|
164
|
+
n && /* @__PURE__ */ Y("div", {
|
|
165
165
|
className: "chat-body-loader",
|
|
166
|
-
children: /* @__PURE__ */
|
|
166
|
+
children: /* @__PURE__ */ Y(ue, { size: "sm" })
|
|
167
167
|
}),
|
|
168
|
-
e?.map((e) => /* @__PURE__ */
|
|
168
|
+
e?.map((e) => /* @__PURE__ */ Y(Ke, {
|
|
169
169
|
message: e,
|
|
170
170
|
color: c
|
|
171
171
|
}, e.id)),
|
|
@@ -175,7 +175,7 @@ function Ge({ messages: e, onScrollTop: t, loading: n = !1, color: r, className:
|
|
|
175
175
|
}
|
|
176
176
|
//#endregion
|
|
177
177
|
//#region src/components/data/MChat/emojis.ts
|
|
178
|
-
var
|
|
178
|
+
var Je = [
|
|
179
179
|
{
|
|
180
180
|
label: "Smileys",
|
|
181
181
|
emojis: /* @__PURE__ */ "😀.😃.😄.😁.😆.😅.🤣.😂.🙂.😊.😇.🥰.😍.🤩.😘.😗.😋.😛.😜.🤪.😝.🤗.🤔.🫡.🤐.🤨.😐.😑.😶.🫠.😏.😒.🙄.😬.😮💨.🤥.😌.😔.😪.🤤.😴.😷.🤒.🤕.🤢.🤮.🤧.🥵.🥶.😵.🤯.🥳.🥸.😎.🤓.🧐".split(".")
|
|
@@ -234,19 +234,19 @@ var Ke = [
|
|
|
234
234
|
"🔔"
|
|
235
235
|
]
|
|
236
236
|
}
|
|
237
|
-
],
|
|
238
|
-
function
|
|
239
|
-
let { color: l } =
|
|
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) => {
|
|
240
240
|
let t = e.filter((e) => e.type.startsWith("image/"));
|
|
241
241
|
t.length !== 0 && (_((e) => [...e, ...t]), t.forEach((e) => {
|
|
242
242
|
let t = URL.createObjectURL(e);
|
|
243
243
|
y((e) => [...e, t]);
|
|
244
244
|
}));
|
|
245
|
-
}, []), k =
|
|
245
|
+
}, []), k = G((e) => {
|
|
246
246
|
y((t) => (URL.revokeObjectURL(t[e]), t.filter((t, n) => n !== e))), _((t) => t.filter((t, n) => n !== e));
|
|
247
247
|
}, []);
|
|
248
|
-
|
|
249
|
-
let A =
|
|
248
|
+
Re(() => () => v.forEach((e) => URL.revokeObjectURL(e)), []);
|
|
249
|
+
let A = G(() => {
|
|
250
250
|
let t = f.trim();
|
|
251
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)));
|
|
252
252
|
}, [
|
|
@@ -264,7 +264,7 @@ function Je({ onSend: e, placeholder: t = "Type a message…", disabled: n = !1,
|
|
|
264
264
|
}, P = (e) => {
|
|
265
265
|
e.style.height = "auto", e.style.height = Math.min(e.scrollHeight, 120) + "px";
|
|
266
266
|
};
|
|
267
|
-
|
|
267
|
+
Re(() => () => clearTimeout(D.current), []);
|
|
268
268
|
let ee = (e) => {
|
|
269
269
|
p((t) => t + e), h(!1), C.current?.focus();
|
|
270
270
|
}, te = (e) => {
|
|
@@ -277,34 +277,34 @@ function Je({ onSend: e, placeholder: t = "Type a message…", disabled: n = !1,
|
|
|
277
277
|
let e = T.current?.files;
|
|
278
278
|
e && O(Array.from(e)), T.current && (T.current.value = "");
|
|
279
279
|
}, ae = f.trim() || g.length > 0;
|
|
280
|
-
return /* @__PURE__ */
|
|
280
|
+
return /* @__PURE__ */ X("div", {
|
|
281
281
|
className: I("chat-input", b && "drag-over", s),
|
|
282
282
|
onDragOver: te,
|
|
283
283
|
onDragLeave: ne,
|
|
284
284
|
onDrop: re,
|
|
285
285
|
...c,
|
|
286
|
-
children: [v.length > 0 && /* @__PURE__ */
|
|
286
|
+
children: [v.length > 0 && /* @__PURE__ */ Y("div", {
|
|
287
287
|
className: "chat-input-previews",
|
|
288
|
-
children: v.map((e, t) => /* @__PURE__ */
|
|
288
|
+
children: v.map((e, t) => /* @__PURE__ */ X("div", {
|
|
289
289
|
className: "chat-input-preview",
|
|
290
|
-
children: [/* @__PURE__ */
|
|
290
|
+
children: [/* @__PURE__ */ Y(_e, {
|
|
291
291
|
src: e,
|
|
292
292
|
alt: "",
|
|
293
293
|
fit: "cover",
|
|
294
294
|
rounded: !0,
|
|
295
295
|
className: "chat-input-preview-img"
|
|
296
|
-
}), /* @__PURE__ */
|
|
296
|
+
}), /* @__PURE__ */ Y("button", {
|
|
297
297
|
type: "button",
|
|
298
298
|
className: "chat-input-preview-remove",
|
|
299
299
|
onClick: () => k(t),
|
|
300
300
|
"aria-label": "Remove image",
|
|
301
|
-
children: /* @__PURE__ */
|
|
301
|
+
children: /* @__PURE__ */ Y(u, {})
|
|
302
302
|
})]
|
|
303
303
|
}, t))
|
|
304
|
-
}), /* @__PURE__ */
|
|
304
|
+
}), /* @__PURE__ */ X("div", {
|
|
305
305
|
className: "chat-input-field",
|
|
306
306
|
children: [
|
|
307
|
-
r && /* @__PURE__ */
|
|
307
|
+
r && /* @__PURE__ */ X(ze, { children: [/* @__PURE__ */ Y("button", {
|
|
308
308
|
ref: w,
|
|
309
309
|
type: "button",
|
|
310
310
|
className: "chat-input-emoji-trigger",
|
|
@@ -312,21 +312,21 @@ function Je({ onSend: e, placeholder: t = "Type a message…", disabled: n = !1,
|
|
|
312
312
|
"aria-label": "Emoji",
|
|
313
313
|
disabled: n,
|
|
314
314
|
children: "😊"
|
|
315
|
-
}), /* @__PURE__ */
|
|
315
|
+
}), /* @__PURE__ */ Y(R, {
|
|
316
316
|
open: m,
|
|
317
317
|
anchorRef: w,
|
|
318
318
|
onClose: () => h(!1),
|
|
319
319
|
placement: "top-start",
|
|
320
|
-
children: /* @__PURE__ */
|
|
320
|
+
children: /* @__PURE__ */ Y("div", {
|
|
321
321
|
className: "chat-emoji-picker",
|
|
322
|
-
children:
|
|
322
|
+
children: Je.map((e) => /* @__PURE__ */ X("div", {
|
|
323
323
|
className: "chat-emoji-category",
|
|
324
|
-
children: [/* @__PURE__ */
|
|
324
|
+
children: [/* @__PURE__ */ Y("div", {
|
|
325
325
|
className: "chat-emoji-category-label",
|
|
326
326
|
children: e.label
|
|
327
|
-
}), /* @__PURE__ */
|
|
327
|
+
}), /* @__PURE__ */ Y("div", {
|
|
328
328
|
className: "chat-emoji-grid",
|
|
329
|
-
children: e.emojis.map((e) => /* @__PURE__ */
|
|
329
|
+
children: e.emojis.map((e) => /* @__PURE__ */ Y("button", {
|
|
330
330
|
type: "button",
|
|
331
331
|
className: "chat-emoji-btn",
|
|
332
332
|
onClick: () => ee(e),
|
|
@@ -336,23 +336,23 @@ function Je({ onSend: e, placeholder: t = "Type a message…", disabled: n = !1,
|
|
|
336
336
|
}, e.label))
|
|
337
337
|
})
|
|
338
338
|
})] }),
|
|
339
|
-
i && /* @__PURE__ */
|
|
339
|
+
i && /* @__PURE__ */ X(ze, { children: [/* @__PURE__ */ Y("input", {
|
|
340
340
|
ref: T,
|
|
341
341
|
type: "file",
|
|
342
|
-
accept:
|
|
342
|
+
accept: Ye,
|
|
343
343
|
multiple: !0,
|
|
344
344
|
className: "chat-input-file-hidden",
|
|
345
345
|
onChange: ie,
|
|
346
346
|
tabIndex: -1
|
|
347
|
-
}), /* @__PURE__ */
|
|
347
|
+
}), /* @__PURE__ */ Y("button", {
|
|
348
348
|
type: "button",
|
|
349
349
|
className: "chat-input-attach-trigger",
|
|
350
350
|
onClick: () => T.current?.click(),
|
|
351
351
|
"aria-label": "Attach image",
|
|
352
352
|
disabled: n,
|
|
353
|
-
children: /* @__PURE__ */
|
|
353
|
+
children: /* @__PURE__ */ Y(S, { color: "inherit" })
|
|
354
354
|
})] }),
|
|
355
|
-
/* @__PURE__ */
|
|
355
|
+
/* @__PURE__ */ Y("textarea", {
|
|
356
356
|
ref: C,
|
|
357
357
|
className: "chat-input-textarea",
|
|
358
358
|
value: f,
|
|
@@ -362,7 +362,7 @@ function Je({ onSend: e, placeholder: t = "Type a message…", disabled: n = !1,
|
|
|
362
362
|
disabled: n,
|
|
363
363
|
rows: 1
|
|
364
364
|
}),
|
|
365
|
-
/* @__PURE__ */
|
|
365
|
+
/* @__PURE__ */ Y(de, {
|
|
366
366
|
variant: "filled",
|
|
367
367
|
size: "sm",
|
|
368
368
|
color: d ?? "primary",
|
|
@@ -372,7 +372,7 @@ function Je({ onSend: e, placeholder: t = "Type a message…", disabled: n = !1,
|
|
|
372
372
|
onClick: A,
|
|
373
373
|
disabled: n || !ae,
|
|
374
374
|
"aria-label": "Send",
|
|
375
|
-
children: /* @__PURE__ */
|
|
375
|
+
children: /* @__PURE__ */ Y(M, {})
|
|
376
376
|
})
|
|
377
377
|
]
|
|
378
378
|
})]
|
|
@@ -380,43 +380,43 @@ function Je({ onSend: e, placeholder: t = "Type a message…", disabled: n = !1,
|
|
|
380
380
|
}
|
|
381
381
|
//#endregion
|
|
382
382
|
//#region src/components/data/MChat/MChatTypingIndicator.tsx
|
|
383
|
-
function
|
|
383
|
+
function Ze({ users: e = [], visible: t = !0, className: n, ...r }) {
|
|
384
384
|
if (!t || e.length === 0) return null;
|
|
385
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`;
|
|
386
|
-
return /* @__PURE__ */
|
|
386
|
+
return /* @__PURE__ */ X("div", {
|
|
387
387
|
className: I("chat-typing", n),
|
|
388
388
|
"aria-label": i,
|
|
389
389
|
...r,
|
|
390
|
-
children: [e.length === 1 && /* @__PURE__ */
|
|
390
|
+
children: [e.length === 1 && /* @__PURE__ */ Y(ve, {
|
|
391
391
|
src: e[0].avatar,
|
|
392
392
|
name: e[0].name,
|
|
393
393
|
size: "sm",
|
|
394
394
|
className: "chat-typing-avatar"
|
|
395
|
-
}), /* @__PURE__ */
|
|
395
|
+
}), /* @__PURE__ */ X("div", {
|
|
396
396
|
className: "chat-typing-dots",
|
|
397
397
|
children: [
|
|
398
|
-
/* @__PURE__ */
|
|
399
|
-
/* @__PURE__ */
|
|
400
|
-
/* @__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" })
|
|
401
401
|
]
|
|
402
402
|
})]
|
|
403
403
|
});
|
|
404
404
|
}
|
|
405
405
|
//#endregion
|
|
406
406
|
//#region src/components/data/MChat/MChatConversationList.tsx
|
|
407
|
-
function
|
|
408
|
-
return /* @__PURE__ */
|
|
407
|
+
function Qe({ className: e, children: t, ...n }) {
|
|
408
|
+
return /* @__PURE__ */ Y("div", {
|
|
409
409
|
className: I("chat-conversation-list", e),
|
|
410
410
|
...n,
|
|
411
411
|
children: t
|
|
412
412
|
});
|
|
413
413
|
}
|
|
414
|
-
|
|
414
|
+
Qe.__chatConversationList = !0;
|
|
415
415
|
//#endregion
|
|
416
416
|
//#region src/components/data/MChat/MChatConversationItem.tsx
|
|
417
|
-
function
|
|
418
|
-
let { color: o } =
|
|
419
|
-
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", {
|
|
420
420
|
className: I("chat-conversation-item", t && "active", i),
|
|
421
421
|
onClick: () => r?.(e),
|
|
422
422
|
role: "button",
|
|
@@ -425,7 +425,7 @@ function Ze({ conversation: e, active: t = !1, color: n, onClick: r, className:
|
|
|
425
425
|
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), r?.(e));
|
|
426
426
|
},
|
|
427
427
|
...a,
|
|
428
|
-
children: [/* @__PURE__ */
|
|
428
|
+
children: [/* @__PURE__ */ Y(ve, {
|
|
429
429
|
src: p?.avatar,
|
|
430
430
|
name: p?.name,
|
|
431
431
|
size: "md",
|
|
@@ -433,23 +433,23 @@ function Ze({ conversation: e, active: t = !1, color: n, onClick: r, className:
|
|
|
433
433
|
badge: m,
|
|
434
434
|
badgeColor: "success",
|
|
435
435
|
className: "chat-conversation-avatar"
|
|
436
|
-
}), /* @__PURE__ */
|
|
436
|
+
}), /* @__PURE__ */ X("div", {
|
|
437
437
|
className: "chat-conversation-info",
|
|
438
|
-
children: [/* @__PURE__ */
|
|
438
|
+
children: [/* @__PURE__ */ X("div", {
|
|
439
439
|
className: "chat-conversation-top",
|
|
440
|
-
children: [/* @__PURE__ */
|
|
440
|
+
children: [/* @__PURE__ */ Y(z, {
|
|
441
441
|
className: "chat-conversation-name",
|
|
442
442
|
children: f
|
|
443
|
-
}), u && /* @__PURE__ */
|
|
443
|
+
}), u && /* @__PURE__ */ Y(le, {
|
|
444
444
|
className: "chat-conversation-time",
|
|
445
|
-
children: /* @__PURE__ */
|
|
445
|
+
children: /* @__PURE__ */ Y(ge, { value: u.timestamp })
|
|
446
446
|
})]
|
|
447
|
-
}), u && /* @__PURE__ */
|
|
447
|
+
}), u && /* @__PURE__ */ X("div", {
|
|
448
448
|
className: "chat-conversation-bottom",
|
|
449
|
-
children: [/* @__PURE__ */
|
|
449
|
+
children: [/* @__PURE__ */ X(le, {
|
|
450
450
|
className: "chat-conversation-preview",
|
|
451
451
|
children: [u.isOwn ? "You: " : "", u.content]
|
|
452
|
-
}), !!d && d > 0 && /* @__PURE__ */
|
|
452
|
+
}), !!d && d > 0 && /* @__PURE__ */ Y(B, {
|
|
453
453
|
color: s ?? "primary",
|
|
454
454
|
size: "sm",
|
|
455
455
|
rounded: !0,
|
|
@@ -461,51 +461,51 @@ function Ze({ conversation: e, active: t = !1, color: n, onClick: r, className:
|
|
|
461
461
|
}
|
|
462
462
|
//#endregion
|
|
463
463
|
//#region src/components/data/MTreeView/MTreeView.tsx
|
|
464
|
-
var
|
|
465
|
-
pdf: /* @__PURE__ */
|
|
466
|
-
ts: /* @__PURE__ */
|
|
467
|
-
tsx: /* @__PURE__ */
|
|
468
|
-
js: /* @__PURE__ */
|
|
469
|
-
jsx: /* @__PURE__ */
|
|
470
|
-
css: /* @__PURE__ */
|
|
471
|
-
scss: /* @__PURE__ */
|
|
472
|
-
html: /* @__PURE__ */
|
|
473
|
-
json: /* @__PURE__ */
|
|
474
|
-
md: /* @__PURE__ */
|
|
475
|
-
txt: /* @__PURE__ */
|
|
476
|
-
csv: /* @__PURE__ */
|
|
477
|
-
zip: /* @__PURE__ */
|
|
478
|
-
rar: /* @__PURE__ */
|
|
479
|
-
svg: /* @__PURE__ */
|
|
480
|
-
png: /* @__PURE__ */
|
|
481
|
-
jpg: /* @__PURE__ */
|
|
482
|
-
jpeg: /* @__PURE__ */
|
|
483
|
-
gif: /* @__PURE__ */
|
|
484
|
-
webp: /* @__PURE__ */
|
|
485
|
-
php: /* @__PURE__ */
|
|
486
|
-
xml: /* @__PURE__ */
|
|
487
|
-
xls: /* @__PURE__ */
|
|
488
|
-
ppt: /* @__PURE__ */
|
|
489
|
-
odt: /* @__PURE__ */
|
|
490
|
-
exe: /* @__PURE__ */
|
|
491
|
-
mp3: /* @__PURE__ */
|
|
492
|
-
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, {})
|
|
493
493
|
};
|
|
494
|
-
function
|
|
494
|
+
function tt(e) {
|
|
495
495
|
let t = e.lastIndexOf(".");
|
|
496
496
|
return t < 1 ? null : e.slice(t + 1).toLowerCase();
|
|
497
497
|
}
|
|
498
|
-
function
|
|
498
|
+
function nt(e) {
|
|
499
499
|
return e.kind === "folder" || !!e.children?.length;
|
|
500
500
|
}
|
|
501
|
-
function
|
|
502
|
-
let t =
|
|
503
|
-
return t ?
|
|
501
|
+
function rt(e) {
|
|
502
|
+
let t = tt(e);
|
|
503
|
+
return t ? et[t] ?? /* @__PURE__ */ Y(A, {}) : /* @__PURE__ */ Y(ne, {});
|
|
504
504
|
}
|
|
505
|
-
function
|
|
506
|
-
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;
|
|
507
507
|
}
|
|
508
|
-
function
|
|
508
|
+
function at(e) {
|
|
509
509
|
let t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map();
|
|
510
510
|
function r(e) {
|
|
511
511
|
t.set(e.id, e);
|
|
@@ -518,7 +518,7 @@ function rt(e) {
|
|
|
518
518
|
descendants: n
|
|
519
519
|
};
|
|
520
520
|
}
|
|
521
|
-
function
|
|
521
|
+
function ot(e, t) {
|
|
522
522
|
return typeof window > "u" ? {
|
|
523
523
|
x: e,
|
|
524
524
|
y: t
|
|
@@ -527,12 +527,12 @@ function it(e, t) {
|
|
|
527
527
|
y: Math.max(8, Math.min(t, window.innerHeight - 16))
|
|
528
528
|
};
|
|
529
529
|
}
|
|
530
|
-
function
|
|
531
|
-
let x =
|
|
532
|
-
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", {
|
|
533
533
|
role: "treeitem",
|
|
534
534
|
"aria-expanded": x ? S : void 0,
|
|
535
|
-
children: [/* @__PURE__ */
|
|
535
|
+
children: [/* @__PURE__ */ X("div", {
|
|
536
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
537
|
style: { paddingLeft: t * u },
|
|
538
538
|
draggable: p && !e.disabled,
|
|
@@ -545,27 +545,27 @@ function at({ node: e, level: t, expandable: n, selectable: r, expandedIds: i, s
|
|
|
545
545
|
onDrop: (t) => y?.(t, e),
|
|
546
546
|
onDragEnd: b,
|
|
547
547
|
children: [
|
|
548
|
-
/* @__PURE__ */
|
|
548
|
+
/* @__PURE__ */ Y("span", {
|
|
549
549
|
className: "toggle",
|
|
550
|
-
children: x && n ? /* @__PURE__ */
|
|
550
|
+
children: x && n ? /* @__PURE__ */ Y("span", {
|
|
551
551
|
className: I("arrow", S && "expanded"),
|
|
552
|
-
children: /* @__PURE__ */
|
|
553
|
-
}) : /* @__PURE__ */
|
|
552
|
+
children: /* @__PURE__ */ Y(h, {})
|
|
553
|
+
}) : /* @__PURE__ */ Y("span", { className: "spacer" })
|
|
554
554
|
}),
|
|
555
|
-
D && /* @__PURE__ */
|
|
555
|
+
D && /* @__PURE__ */ Y("span", {
|
|
556
556
|
className: "icon",
|
|
557
557
|
children: D
|
|
558
558
|
}),
|
|
559
|
-
/* @__PURE__ */
|
|
559
|
+
/* @__PURE__ */ Y("span", {
|
|
560
560
|
className: "label",
|
|
561
561
|
children: e.label
|
|
562
562
|
})
|
|
563
563
|
]
|
|
564
|
-
}), x && S && /* @__PURE__ */
|
|
564
|
+
}), x && S && /* @__PURE__ */ Y("ul", {
|
|
565
565
|
className: "list",
|
|
566
566
|
role: "group",
|
|
567
567
|
style: d ? { "--line-left": `${t * u + 17}px` } : void 0,
|
|
568
|
-
children: (e.children ?? []).map((e) => /* @__PURE__ */
|
|
568
|
+
children: (e.children ?? []).map((e) => /* @__PURE__ */ Y(st, {
|
|
569
569
|
node: e,
|
|
570
570
|
level: t + 1,
|
|
571
571
|
expandable: n,
|
|
@@ -590,9 +590,9 @@ function at({ node: e, level: t, expandable: n, selectable: r, expandedIds: i, s
|
|
|
590
590
|
})]
|
|
591
591
|
});
|
|
592
592
|
}
|
|
593
|
-
function
|
|
594
|
-
let [v, y] =
|
|
595
|
-
|
|
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(() => {
|
|
596
596
|
if (!E) return;
|
|
597
597
|
function e(e) {
|
|
598
598
|
e && O.current && O.current.contains(e.target) || D(null);
|
|
@@ -615,14 +615,14 @@ function ot({ items: e, expandable: t = !0, selectable: n = !1, defaultExpanded:
|
|
|
615
615
|
C(null), T(null);
|
|
616
616
|
}
|
|
617
617
|
function re(e) {
|
|
618
|
-
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;
|
|
619
619
|
}
|
|
620
620
|
function ie(e, t) {
|
|
621
621
|
if (!m || t.disabled) return;
|
|
622
622
|
let n = m(t).filter(Boolean);
|
|
623
623
|
if (!n.length) return;
|
|
624
624
|
e.preventDefault(), te(t.id, t);
|
|
625
|
-
let r =
|
|
625
|
+
let r = ot(e.clientX, e.clientY);
|
|
626
626
|
D({
|
|
627
627
|
node: t,
|
|
628
628
|
items: n,
|
|
@@ -648,13 +648,13 @@ function ot({ items: e, expandable: t = !0, selectable: n = !1, defaultExpanded:
|
|
|
648
648
|
targetNode: n
|
|
649
649
|
}), t && !A.has(n.id) && ee(n.id), ne();
|
|
650
650
|
}
|
|
651
|
-
return /* @__PURE__ */
|
|
651
|
+
return /* @__PURE__ */ X("div", {
|
|
652
652
|
className: I("tree", l && "lines", g),
|
|
653
653
|
..._,
|
|
654
|
-
children: [/* @__PURE__ */
|
|
654
|
+
children: [/* @__PURE__ */ Y("ul", {
|
|
655
655
|
className: "list",
|
|
656
656
|
role: "tree",
|
|
657
|
-
children: e.map((e) => /* @__PURE__ */
|
|
657
|
+
children: e.map((e) => /* @__PURE__ */ Y(st, {
|
|
658
658
|
node: e,
|
|
659
659
|
level: 0,
|
|
660
660
|
expandable: t,
|
|
@@ -676,7 +676,7 @@ function ot({ items: e, expandable: t = !0, selectable: n = !1, defaultExpanded:
|
|
|
676
676
|
onDrop: oe,
|
|
677
677
|
onDragEnd: ne
|
|
678
678
|
}, e.id))
|
|
679
|
-
}), E && /* @__PURE__ */
|
|
679
|
+
}), E && /* @__PURE__ */ Y(L, { children: /* @__PURE__ */ Y("div", {
|
|
680
680
|
ref: O,
|
|
681
681
|
className: "tree menu",
|
|
682
682
|
style: {
|
|
@@ -684,7 +684,7 @@ function ot({ items: e, expandable: t = !0, selectable: n = !1, defaultExpanded:
|
|
|
684
684
|
left: E.x
|
|
685
685
|
},
|
|
686
686
|
role: "menu",
|
|
687
|
-
children: E.items.map((e) => /* @__PURE__ */
|
|
687
|
+
children: E.items.map((e) => /* @__PURE__ */ X("button", {
|
|
688
688
|
type: "button",
|
|
689
689
|
className: I("action", e.color, e.disabled && "disabled"),
|
|
690
690
|
role: "menuitem",
|
|
@@ -692,28 +692,28 @@ function ot({ items: e, expandable: t = !0, selectable: n = !1, defaultExpanded:
|
|
|
692
692
|
onClick: () => {
|
|
693
693
|
e.disabled || (h?.(e.id, E.node), D(null));
|
|
694
694
|
},
|
|
695
|
-
children: [e.icon && /* @__PURE__ */
|
|
695
|
+
children: [e.icon && /* @__PURE__ */ Y("span", {
|
|
696
696
|
className: "icon",
|
|
697
697
|
children: e.icon
|
|
698
|
-
}), /* @__PURE__ */
|
|
698
|
+
}), /* @__PURE__ */ Y("span", { children: e.label })]
|
|
699
699
|
}, e.id))
|
|
700
700
|
}) })]
|
|
701
701
|
});
|
|
702
702
|
}
|
|
703
703
|
//#endregion
|
|
704
704
|
//#region src/components/data/MTaskList/MTaskList.tsx
|
|
705
|
-
function
|
|
706
|
-
return /* @__PURE__ */
|
|
705
|
+
function lt({ items: e, color: t = "primary", strikethrough: n = !0, onChange: r, className: i, ...a }) {
|
|
706
|
+
return /* @__PURE__ */ Y("div", {
|
|
707
707
|
className: I("task list", `color-${t}`, i),
|
|
708
708
|
role: "list",
|
|
709
709
|
...a,
|
|
710
|
-
children: e.map((e) => /* @__PURE__ */
|
|
710
|
+
children: e.map((e) => /* @__PURE__ */ X("div", {
|
|
711
711
|
className: I("task item", e.checked && "checked", e.disabled && "disabled"),
|
|
712
712
|
role: "listitem",
|
|
713
713
|
onClick: (t) => {
|
|
714
714
|
e.disabled || t.target.closest(".checkbox") || r?.(e.id, !(e.checked ?? !1));
|
|
715
715
|
},
|
|
716
|
-
children: [/* @__PURE__ */
|
|
716
|
+
children: [/* @__PURE__ */ Y(fe, {
|
|
717
717
|
className: "task control",
|
|
718
718
|
checked: e.checked ?? !1,
|
|
719
719
|
color: t,
|
|
@@ -721,7 +721,7 @@ function st({ items: e, color: t = "primary", strikethrough: n = !0, onChange: r
|
|
|
721
721
|
disabled: e.disabled,
|
|
722
722
|
onChange: (t) => r?.(e.id, t.target.checked),
|
|
723
723
|
clickEffect: "ripple"
|
|
724
|
-
}), /* @__PURE__ */
|
|
724
|
+
}), /* @__PURE__ */ Y("span", {
|
|
725
725
|
className: I("task label", e.checked && n && "done"),
|
|
726
726
|
children: e.label
|
|
727
727
|
})]
|
|
@@ -730,51 +730,51 @@ function st({ items: e, color: t = "primary", strikethrough: n = !0, onChange: r
|
|
|
730
730
|
}
|
|
731
731
|
//#endregion
|
|
732
732
|
//#region src/components/data/MFileManager/MFileManager.tsx
|
|
733
|
-
var
|
|
734
|
-
pdf: /* @__PURE__ */
|
|
735
|
-
ts: /* @__PURE__ */
|
|
736
|
-
tsx: /* @__PURE__ */
|
|
737
|
-
js: /* @__PURE__ */
|
|
738
|
-
jsx: /* @__PURE__ */
|
|
739
|
-
css: /* @__PURE__ */
|
|
740
|
-
scss: /* @__PURE__ */
|
|
741
|
-
html: /* @__PURE__ */
|
|
742
|
-
json: /* @__PURE__ */
|
|
743
|
-
md: /* @__PURE__ */
|
|
744
|
-
txt: /* @__PURE__ */
|
|
745
|
-
csv: /* @__PURE__ */
|
|
746
|
-
zip: /* @__PURE__ */
|
|
747
|
-
rar: /* @__PURE__ */
|
|
748
|
-
svg: /* @__PURE__ */
|
|
749
|
-
png: /* @__PURE__ */
|
|
750
|
-
jpg: /* @__PURE__ */
|
|
751
|
-
jpeg: /* @__PURE__ */
|
|
752
|
-
gif: /* @__PURE__ */
|
|
753
|
-
webp: /* @__PURE__ */
|
|
754
|
-
php: /* @__PURE__ */
|
|
755
|
-
xml: /* @__PURE__ */
|
|
756
|
-
xls: /* @__PURE__ */
|
|
757
|
-
ppt: /* @__PURE__ */
|
|
758
|
-
odt: /* @__PURE__ */
|
|
759
|
-
exe: /* @__PURE__ */
|
|
760
|
-
mp3: /* @__PURE__ */
|
|
761
|
-
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, {})
|
|
762
762
|
};
|
|
763
|
-
function
|
|
763
|
+
function dt(e) {
|
|
764
764
|
let t = e.lastIndexOf(".");
|
|
765
765
|
return t < 1 ? null : e.slice(t + 1).toLowerCase();
|
|
766
766
|
}
|
|
767
|
-
function
|
|
767
|
+
function Z(e) {
|
|
768
768
|
return e?.kind === "folder" || !!e?.children?.length;
|
|
769
769
|
}
|
|
770
|
-
function
|
|
771
|
-
let t =
|
|
772
|
-
return t ?
|
|
770
|
+
function ft(e) {
|
|
771
|
+
let t = dt(e);
|
|
772
|
+
return t ? ut[t] ?? /* @__PURE__ */ Y(A, {}) : /* @__PURE__ */ Y(ne, {});
|
|
773
773
|
}
|
|
774
|
-
function
|
|
775
|
-
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);
|
|
776
776
|
}
|
|
777
|
-
function
|
|
777
|
+
function mt(e) {
|
|
778
778
|
if (!e || e < 1) return null;
|
|
779
779
|
let t = [
|
|
780
780
|
"B",
|
|
@@ -787,7 +787,7 @@ function ft(e) {
|
|
|
787
787
|
let i = n >= 100 || r === 0 ? 0 : 1;
|
|
788
788
|
return `${n.toFixed(i)} ${t[r]}`;
|
|
789
789
|
}
|
|
790
|
-
function
|
|
790
|
+
function ht(e, t) {
|
|
791
791
|
if (!e) return null;
|
|
792
792
|
let n = e instanceof Date ? e : new Date(e);
|
|
793
793
|
return Number.isNaN(n.getTime()) ? null : new Intl.DateTimeFormat(t, {
|
|
@@ -798,7 +798,7 @@ function pt(e, t) {
|
|
|
798
798
|
minute: "2-digit"
|
|
799
799
|
}).format(n);
|
|
800
800
|
}
|
|
801
|
-
function
|
|
801
|
+
function gt(e) {
|
|
802
802
|
let t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map();
|
|
803
803
|
function r(e, i) {
|
|
804
804
|
for (let a of e) t.set(a.id, a), n.set(a.id, i), a.children?.length && r(a.children, a.id);
|
|
@@ -808,14 +808,14 @@ function mt(e) {
|
|
|
808
808
|
parentMap: n
|
|
809
809
|
};
|
|
810
810
|
}
|
|
811
|
-
function
|
|
812
|
-
return e.flatMap((e) =>
|
|
811
|
+
function _t(e) {
|
|
812
|
+
return e.flatMap((e) => Z(e) ? [{
|
|
813
813
|
...e,
|
|
814
814
|
kind: "folder",
|
|
815
|
-
children:
|
|
815
|
+
children: _t(e.children ?? [])
|
|
816
816
|
}] : []);
|
|
817
817
|
}
|
|
818
|
-
function
|
|
818
|
+
function vt(e, t, n) {
|
|
819
819
|
let r = [], i = e;
|
|
820
820
|
for (; i;) {
|
|
821
821
|
let e = t.get(i);
|
|
@@ -824,15 +824,15 @@ function gt(e, t, n) {
|
|
|
824
824
|
}
|
|
825
825
|
return r;
|
|
826
826
|
}
|
|
827
|
-
function
|
|
827
|
+
function yt(e, t, n) {
|
|
828
828
|
if (!e) return null;
|
|
829
829
|
let r = t.get(e);
|
|
830
|
-
return r ?
|
|
830
|
+
return r ? Z(r) ? r.id : n.get(r.id) ?? null : null;
|
|
831
831
|
}
|
|
832
|
-
function
|
|
832
|
+
function bt(e, t) {
|
|
833
833
|
return e ? e.children ?? [] : t;
|
|
834
834
|
}
|
|
835
|
-
function
|
|
835
|
+
function xt(e, t, n, r, i) {
|
|
836
836
|
let a = e ? t.get(e) ?? null : null, o = a ? n.get(a.id) ?? null : null;
|
|
837
837
|
return {
|
|
838
838
|
id: e,
|
|
@@ -843,174 +843,174 @@ function yt(e, t, n, r, i) {
|
|
|
843
843
|
activeFolder: i
|
|
844
844
|
};
|
|
845
845
|
}
|
|
846
|
-
function
|
|
846
|
+
function St(e, t) {
|
|
847
847
|
return [
|
|
848
|
-
|
|
848
|
+
...Z(e) ? [] : [{
|
|
849
849
|
id: "download",
|
|
850
850
|
label: t.download,
|
|
851
|
-
icon: /* @__PURE__ */
|
|
851
|
+
icon: /* @__PURE__ */ Y(ie, {}),
|
|
852
852
|
color: "primary"
|
|
853
853
|
}],
|
|
854
854
|
{
|
|
855
855
|
id: "rename",
|
|
856
856
|
label: t.rename,
|
|
857
|
-
icon: /* @__PURE__ */
|
|
857
|
+
icon: /* @__PURE__ */ Y(ee, {})
|
|
858
858
|
},
|
|
859
859
|
{
|
|
860
860
|
id: "move",
|
|
861
861
|
label: t.moveTo,
|
|
862
|
-
icon: /* @__PURE__ */
|
|
862
|
+
icon: /* @__PURE__ */ Y(N, {})
|
|
863
863
|
},
|
|
864
864
|
{
|
|
865
865
|
id: "delete",
|
|
866
866
|
label: t.delete,
|
|
867
|
-
icon: /* @__PURE__ */
|
|
867
|
+
icon: /* @__PURE__ */ Y(k, {}),
|
|
868
868
|
color: "error"
|
|
869
869
|
}
|
|
870
870
|
];
|
|
871
871
|
}
|
|
872
|
-
function
|
|
873
|
-
return [
|
|
872
|
+
function Ct(e, t) {
|
|
873
|
+
return [...Z(e) ? [{
|
|
874
874
|
id: "new-folder",
|
|
875
875
|
label: t.newFolder,
|
|
876
|
-
icon: /* @__PURE__ */
|
|
877
|
-
}] : [], ...
|
|
876
|
+
icon: /* @__PURE__ */ Y(O, {})
|
|
877
|
+
}] : [], ...St(e, t)];
|
|
878
878
|
}
|
|
879
|
-
function
|
|
880
|
-
let M =
|
|
881
|
-
function
|
|
882
|
-
let t =
|
|
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
883
|
s ? s(t, n) : ee(t);
|
|
884
884
|
}
|
|
885
|
-
function
|
|
886
|
-
let r =
|
|
885
|
+
function Ee(e, t = le, n = ue) {
|
|
886
|
+
let r = xt(e, L, R, t, n);
|
|
887
887
|
l ? l(r) : ne(e);
|
|
888
888
|
}
|
|
889
|
-
function
|
|
889
|
+
function De(e) {
|
|
890
890
|
f ? f(e) : ae(e);
|
|
891
891
|
}
|
|
892
|
-
function
|
|
892
|
+
function Oe(e) {
|
|
893
893
|
h ? h(e) : oe(e);
|
|
894
894
|
}
|
|
895
|
-
function
|
|
896
|
-
|
|
895
|
+
function W(e, t) {
|
|
896
|
+
Te(e), Ee(e, t.id, t);
|
|
897
897
|
}
|
|
898
|
-
function
|
|
899
|
-
if (
|
|
900
|
-
|
|
898
|
+
function ke(e) {
|
|
899
|
+
if (Z(e)) {
|
|
900
|
+
Te(e.id), Ee(e.id, e.id, e);
|
|
901
901
|
return;
|
|
902
902
|
}
|
|
903
|
-
|
|
903
|
+
Ee(e.id);
|
|
904
904
|
}
|
|
905
|
-
function
|
|
905
|
+
function je(e) {
|
|
906
906
|
S && S({
|
|
907
|
-
...
|
|
907
|
+
...xt(H, L, R, le, ue),
|
|
908
908
|
actionId: e,
|
|
909
|
-
visibleItems:
|
|
909
|
+
visibleItems: we
|
|
910
910
|
});
|
|
911
911
|
}
|
|
912
|
-
function
|
|
912
|
+
function Me(e, t) {
|
|
913
913
|
(w ?? T)?.(e, t);
|
|
914
914
|
}
|
|
915
|
-
function
|
|
915
|
+
function Pe(e, t) {
|
|
916
916
|
(T ?? w)?.(e, t);
|
|
917
917
|
}
|
|
918
|
-
function
|
|
919
|
-
let t = [], n =
|
|
920
|
-
return
|
|
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
921
|
}
|
|
922
|
-
return /* @__PURE__ */
|
|
922
|
+
return /* @__PURE__ */ X("div", {
|
|
923
923
|
className: I("file-manager", !v && "no-sidebar", !y && "no-preview", A),
|
|
924
924
|
...j,
|
|
925
|
-
children: [/* @__PURE__ */
|
|
925
|
+
children: [/* @__PURE__ */ X("div", {
|
|
926
926
|
className: "toolbar",
|
|
927
|
-
children: [/* @__PURE__ */
|
|
927
|
+
children: [/* @__PURE__ */ X("div", {
|
|
928
928
|
className: "toolbar-main",
|
|
929
|
-
children: [/* @__PURE__ */
|
|
929
|
+
children: [/* @__PURE__ */ X("div", {
|
|
930
930
|
className: "breadcrumbs",
|
|
931
|
-
children: [/* @__PURE__ */
|
|
931
|
+
children: [/* @__PURE__ */ X("button", {
|
|
932
932
|
type: "button",
|
|
933
933
|
className: "breadcrumb root",
|
|
934
|
-
onClick: () =>
|
|
935
|
-
children: [/* @__PURE__ */
|
|
934
|
+
onClick: () => Te(null),
|
|
935
|
+
children: [/* @__PURE__ */ Y(D, {}), /* @__PURE__ */ Y(z, {
|
|
936
936
|
as: "span",
|
|
937
937
|
weight: "semibold",
|
|
938
938
|
children: N.home
|
|
939
939
|
})]
|
|
940
|
-
}),
|
|
940
|
+
}), be.map((e) => /* @__PURE__ */ X("div", {
|
|
941
941
|
className: "breadcrumbs",
|
|
942
|
-
children: [/* @__PURE__ */
|
|
942
|
+
children: [/* @__PURE__ */ Y("span", {
|
|
943
943
|
className: "breadcrumb-separator",
|
|
944
944
|
children: "/"
|
|
945
|
-
}), /* @__PURE__ */
|
|
945
|
+
}), /* @__PURE__ */ Y("button", {
|
|
946
946
|
type: "button",
|
|
947
947
|
className: "breadcrumb",
|
|
948
|
-
onClick: () =>
|
|
949
|
-
children: /* @__PURE__ */
|
|
948
|
+
onClick: () => Te(e.id),
|
|
949
|
+
children: /* @__PURE__ */ Y(z, {
|
|
950
950
|
as: "span",
|
|
951
951
|
children: e.label
|
|
952
952
|
})
|
|
953
953
|
})]
|
|
954
954
|
}, e.id))]
|
|
955
|
-
}), g && /* @__PURE__ */
|
|
955
|
+
}), g && /* @__PURE__ */ Y(ye, {
|
|
956
956
|
className: "toolbar-search",
|
|
957
957
|
size: "sm",
|
|
958
|
-
placeholder:
|
|
959
|
-
value:
|
|
960
|
-
onChange: (e) =>
|
|
961
|
-
onClear: () =>
|
|
958
|
+
placeholder: xe,
|
|
959
|
+
value: ge,
|
|
960
|
+
onChange: (e) => Oe(e.target.value),
|
|
961
|
+
onClear: () => Oe("")
|
|
962
962
|
})]
|
|
963
|
-
}), /* @__PURE__ */
|
|
963
|
+
}), /* @__PURE__ */ X("div", {
|
|
964
964
|
className: "toolbar-actions",
|
|
965
|
-
children: [x.map((e) => /* @__PURE__ */
|
|
965
|
+
children: [x.map((e) => /* @__PURE__ */ Y(de, {
|
|
966
966
|
size: "sm",
|
|
967
967
|
variant: e.variant ?? "ghost",
|
|
968
968
|
color: e.color,
|
|
969
969
|
disabled: e.disabled,
|
|
970
|
-
onClick: () =>
|
|
970
|
+
onClick: () => je(e.id),
|
|
971
971
|
startIcon: e.icon,
|
|
972
972
|
children: e.label
|
|
973
|
-
}, e.id)), /* @__PURE__ */
|
|
973
|
+
}, e.id)), /* @__PURE__ */ X("div", {
|
|
974
974
|
className: "view-switch",
|
|
975
|
-
children: [/* @__PURE__ */
|
|
975
|
+
children: [/* @__PURE__ */ Y(de, {
|
|
976
976
|
size: "sm",
|
|
977
|
-
variant:
|
|
978
|
-
onClick: () =>
|
|
977
|
+
variant: pe === "list" ? "secondary" : "ghost",
|
|
978
|
+
onClick: () => De("list"),
|
|
979
979
|
children: N.listView
|
|
980
|
-
}), /* @__PURE__ */
|
|
980
|
+
}), /* @__PURE__ */ Y(de, {
|
|
981
981
|
size: "sm",
|
|
982
|
-
variant:
|
|
983
|
-
onClick: () =>
|
|
982
|
+
variant: pe === "grid" ? "secondary" : "ghost",
|
|
983
|
+
onClick: () => De("grid"),
|
|
984
984
|
children: N.gridView
|
|
985
985
|
})]
|
|
986
986
|
})]
|
|
987
987
|
})]
|
|
988
|
-
}), /* @__PURE__ */
|
|
988
|
+
}), /* @__PURE__ */ X("div", {
|
|
989
989
|
className: "body",
|
|
990
990
|
children: [
|
|
991
|
-
v && /* @__PURE__ */
|
|
991
|
+
v && /* @__PURE__ */ X("aside", {
|
|
992
992
|
className: "panel",
|
|
993
|
-
children: [/* @__PURE__ */
|
|
993
|
+
children: [/* @__PURE__ */ X("div", {
|
|
994
994
|
className: "panel-header",
|
|
995
|
-
children: [/* @__PURE__ */
|
|
995
|
+
children: [/* @__PURE__ */ Y(z, {
|
|
996
996
|
weight: "semibold",
|
|
997
997
|
children: N.folders
|
|
998
|
-
}), /* @__PURE__ */
|
|
998
|
+
}), /* @__PURE__ */ Y(B, {
|
|
999
999
|
size: "sm",
|
|
1000
1000
|
color: "info",
|
|
1001
|
-
children:
|
|
1001
|
+
children: ce.length
|
|
1002
1002
|
})]
|
|
1003
|
-
}), /* @__PURE__ */
|
|
1003
|
+
}), /* @__PURE__ */ Y("div", {
|
|
1004
1004
|
className: "panel-body sidebar-body",
|
|
1005
|
-
children:
|
|
1006
|
-
items:
|
|
1005
|
+
children: ce.length > 0 ? /* @__PURE__ */ Y(ct, {
|
|
1006
|
+
items: ce,
|
|
1007
1007
|
selectable: !0,
|
|
1008
1008
|
fileIcons: !0,
|
|
1009
1009
|
defaultExpanded: n,
|
|
1010
1010
|
expanded: r,
|
|
1011
1011
|
onExpandChange: i,
|
|
1012
1012
|
selected: le,
|
|
1013
|
-
onSelect: (e, t) =>
|
|
1013
|
+
onSelect: (e, t) => W(e, t),
|
|
1014
1014
|
draggable: !!O,
|
|
1015
1015
|
canDrop: E ? (e, t) => E(e, t) : void 0,
|
|
1016
1016
|
onMove: O ? (e) => O({
|
|
@@ -1019,72 +1019,72 @@ function St({ items: e, locale: t, defaultExpanded: n = [], expanded: r, onExpan
|
|
|
1019
1019
|
targetId: e.targetId,
|
|
1020
1020
|
targetNode: e.targetNode
|
|
1021
1021
|
}) : void 0,
|
|
1022
|
-
contextMenuItems:
|
|
1023
|
-
onContextMenuAction:
|
|
1024
|
-
}) : /* @__PURE__ */
|
|
1022
|
+
contextMenuItems: Ce ? (e) => Ct(e, N) : void 0,
|
|
1023
|
+
onContextMenuAction: Ce ? (e, t) => Pe(e, t) : void 0
|
|
1024
|
+
}) : /* @__PURE__ */ Y("div", {
|
|
1025
1025
|
className: "empty-state",
|
|
1026
1026
|
children: N.noFoldersAvailable
|
|
1027
1027
|
})
|
|
1028
1028
|
})]
|
|
1029
1029
|
}),
|
|
1030
|
-
/* @__PURE__ */
|
|
1030
|
+
/* @__PURE__ */ X("section", {
|
|
1031
1031
|
className: "panel",
|
|
1032
|
-
children: [/* @__PURE__ */
|
|
1032
|
+
children: [/* @__PURE__ */ X("div", {
|
|
1033
1033
|
className: "panel-header",
|
|
1034
|
-
children: [/* @__PURE__ */
|
|
1034
|
+
children: [/* @__PURE__ */ X(se, {
|
|
1035
1035
|
align: "center",
|
|
1036
1036
|
wrap: "wrap",
|
|
1037
|
-
children: [/* @__PURE__ */
|
|
1037
|
+
children: [/* @__PURE__ */ Y(z, {
|
|
1038
1038
|
weight: "semibold",
|
|
1039
1039
|
children: ue?.label ?? N.home
|
|
1040
|
-
}), /* @__PURE__ */
|
|
1040
|
+
}), /* @__PURE__ */ Y(B, {
|
|
1041
1041
|
size: "sm",
|
|
1042
|
-
children:
|
|
1042
|
+
children: we.length
|
|
1043
1043
|
})]
|
|
1044
|
-
}), /* @__PURE__ */
|
|
1044
|
+
}), /* @__PURE__ */ Y(z, {
|
|
1045
1045
|
size: "sm",
|
|
1046
1046
|
tone: "muted",
|
|
1047
|
-
children:
|
|
1047
|
+
children: ve ? N.filteredBy(ge) : N.currentFolder
|
|
1048
1048
|
})]
|
|
1049
|
-
}), /* @__PURE__ */
|
|
1049
|
+
}), /* @__PURE__ */ Y("div", {
|
|
1050
1050
|
className: "panel-body",
|
|
1051
|
-
children:
|
|
1052
|
-
className: I("content-items",
|
|
1053
|
-
children:
|
|
1054
|
-
let t =
|
|
1055
|
-
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", {
|
|
1056
1056
|
className: I("item-card", t && "selected"),
|
|
1057
|
-
children: [/* @__PURE__ */
|
|
1057
|
+
children: [/* @__PURE__ */ X("button", {
|
|
1058
1058
|
type: "button",
|
|
1059
1059
|
className: "item-card-main",
|
|
1060
|
-
onClick: () =>
|
|
1060
|
+
onClick: () => ke(e),
|
|
1061
1061
|
onDoubleClick: () => C?.(e),
|
|
1062
|
-
children: [/* @__PURE__ */
|
|
1062
|
+
children: [/* @__PURE__ */ Y("span", {
|
|
1063
1063
|
className: "item-icon",
|
|
1064
|
-
children:
|
|
1065
|
-
}), /* @__PURE__ */
|
|
1064
|
+
children: pt(e)
|
|
1065
|
+
}), /* @__PURE__ */ X("span", {
|
|
1066
1066
|
className: "item-text",
|
|
1067
1067
|
children: [
|
|
1068
|
-
/* @__PURE__ */
|
|
1068
|
+
/* @__PURE__ */ Y(z, {
|
|
1069
1069
|
as: "span",
|
|
1070
1070
|
weight: "semibold",
|
|
1071
1071
|
truncate: !0,
|
|
1072
1072
|
children: e.label
|
|
1073
1073
|
}),
|
|
1074
|
-
e.description ? /* @__PURE__ */
|
|
1074
|
+
e.description ? /* @__PURE__ */ Y(z, {
|
|
1075
1075
|
as: "span",
|
|
1076
1076
|
size: "sm",
|
|
1077
1077
|
tone: "muted",
|
|
1078
1078
|
truncate: 2,
|
|
1079
1079
|
children: e.description
|
|
1080
1080
|
}) : null,
|
|
1081
|
-
/* @__PURE__ */
|
|
1081
|
+
/* @__PURE__ */ X("span", {
|
|
1082
1082
|
className: "item-meta",
|
|
1083
|
-
children: [/* @__PURE__ */
|
|
1083
|
+
children: [/* @__PURE__ */ Y(B, {
|
|
1084
1084
|
size: "sm",
|
|
1085
|
-
color:
|
|
1086
|
-
children:
|
|
1087
|
-
}), n ? /* @__PURE__ */
|
|
1085
|
+
color: Z(e) ? "info" : "primary",
|
|
1086
|
+
children: Z(e) ? N.folder : N.file
|
|
1087
|
+
}), n ? /* @__PURE__ */ Y(z, {
|
|
1088
1088
|
as: "span",
|
|
1089
1089
|
size: "sm",
|
|
1090
1090
|
tone: "muted",
|
|
@@ -1094,94 +1094,94 @@ function St({ items: e, locale: t, defaultExpanded: n = [], expanded: r, onExpan
|
|
|
1094
1094
|
})
|
|
1095
1095
|
]
|
|
1096
1096
|
})]
|
|
1097
|
-
}), r.length > 0 ? /* @__PURE__ */
|
|
1097
|
+
}), r.length > 0 ? /* @__PURE__ */ Y("div", {
|
|
1098
1098
|
className: "item-card-actions",
|
|
1099
|
-
children: /* @__PURE__ */
|
|
1099
|
+
children: /* @__PURE__ */ Y(U, {
|
|
1100
1100
|
placement: "bottom-end",
|
|
1101
|
-
trigger: /* @__PURE__ */
|
|
1101
|
+
trigger: /* @__PURE__ */ Y(de, {
|
|
1102
1102
|
"aria-label": `${N.preview}: ${e.label}`,
|
|
1103
1103
|
variant: "ghost",
|
|
1104
1104
|
size: "sm",
|
|
1105
1105
|
iconOnly: !0,
|
|
1106
|
-
children: /* @__PURE__ */
|
|
1106
|
+
children: /* @__PURE__ */ Y(re, {})
|
|
1107
1107
|
}),
|
|
1108
|
-
children: r.map((t) => /* @__PURE__ */
|
|
1108
|
+
children: r.map((t) => /* @__PURE__ */ Y(me, {
|
|
1109
1109
|
icon: t.icon,
|
|
1110
1110
|
label: t.label,
|
|
1111
1111
|
color: t.color,
|
|
1112
|
-
onClick: () =>
|
|
1112
|
+
onClick: () => Me(t.id, e)
|
|
1113
1113
|
}, t.id))
|
|
1114
1114
|
})
|
|
1115
1115
|
}) : null]
|
|
1116
1116
|
}, e.id);
|
|
1117
1117
|
})
|
|
1118
|
-
}) : /* @__PURE__ */
|
|
1118
|
+
}) : /* @__PURE__ */ Y("div", {
|
|
1119
1119
|
className: "empty-state",
|
|
1120
|
-
children:
|
|
1120
|
+
children: Se
|
|
1121
1121
|
})
|
|
1122
1122
|
})]
|
|
1123
1123
|
}),
|
|
1124
|
-
y && /* @__PURE__ */
|
|
1124
|
+
y && /* @__PURE__ */ X("aside", {
|
|
1125
1125
|
className: "panel",
|
|
1126
|
-
children: [/* @__PURE__ */
|
|
1126
|
+
children: [/* @__PURE__ */ X("div", {
|
|
1127
1127
|
className: "panel-header",
|
|
1128
|
-
children: [/* @__PURE__ */
|
|
1128
|
+
children: [/* @__PURE__ */ Y(z, {
|
|
1129
1129
|
weight: "semibold",
|
|
1130
1130
|
children: N.preview
|
|
1131
|
-
}), V ? /* @__PURE__ */
|
|
1131
|
+
}), V ? /* @__PURE__ */ Y(B, {
|
|
1132
1132
|
size: "sm",
|
|
1133
|
-
color:
|
|
1134
|
-
children:
|
|
1133
|
+
color: Z(V) ? "info" : "primary",
|
|
1134
|
+
children: Z(V) ? N.folder : N.file
|
|
1135
1135
|
}) : null]
|
|
1136
|
-
}), /* @__PURE__ */
|
|
1136
|
+
}), /* @__PURE__ */ Y("div", {
|
|
1137
1137
|
className: "panel-body",
|
|
1138
|
-
children: V ? /* @__PURE__ */
|
|
1139
|
-
/* @__PURE__ */
|
|
1138
|
+
children: V ? /* @__PURE__ */ X(Ne, { children: [
|
|
1139
|
+
/* @__PURE__ */ Y("div", {
|
|
1140
1140
|
className: "preview-visual",
|
|
1141
|
-
children: k ? k(V) : V.preview ? V.preview : /* @__PURE__ */
|
|
1141
|
+
children: k ? k(V) : V.preview ? V.preview : /* @__PURE__ */ Y("span", {
|
|
1142
1142
|
className: "preview-icon",
|
|
1143
|
-
children:
|
|
1143
|
+
children: pt(V, !0)
|
|
1144
1144
|
})
|
|
1145
1145
|
}),
|
|
1146
|
-
/* @__PURE__ */
|
|
1146
|
+
/* @__PURE__ */ Y(z, {
|
|
1147
1147
|
weight: "semibold",
|
|
1148
1148
|
children: V.label
|
|
1149
1149
|
}),
|
|
1150
|
-
V.description ? /* @__PURE__ */
|
|
1150
|
+
V.description ? /* @__PURE__ */ Y(z, {
|
|
1151
1151
|
size: "sm",
|
|
1152
1152
|
tone: "muted",
|
|
1153
1153
|
children: V.description
|
|
1154
1154
|
}) : null,
|
|
1155
|
-
/* @__PURE__ */
|
|
1155
|
+
/* @__PURE__ */ X("div", {
|
|
1156
1156
|
className: "preview-meta",
|
|
1157
1157
|
children: [
|
|
1158
|
-
/* @__PURE__ */
|
|
1158
|
+
/* @__PURE__ */ Y(B, {
|
|
1159
1159
|
size: "sm",
|
|
1160
|
-
color:
|
|
1161
|
-
children:
|
|
1160
|
+
color: Z(V) ? "info" : "primary",
|
|
1161
|
+
children: Z(V) ? N.folder : N.file
|
|
1162
1162
|
}),
|
|
1163
|
-
|
|
1163
|
+
mt(V.size) ? /* @__PURE__ */ Y(B, {
|
|
1164
1164
|
size: "sm",
|
|
1165
|
-
children:
|
|
1165
|
+
children: mt(V.size)
|
|
1166
1166
|
}) : null,
|
|
1167
|
-
|
|
1167
|
+
ht(V.modifiedAt, M) ? /* @__PURE__ */ Y(B, {
|
|
1168
1168
|
size: "sm",
|
|
1169
1169
|
color: "neutral",
|
|
1170
|
-
children:
|
|
1170
|
+
children: ht(V.modifiedAt, M)
|
|
1171
1171
|
}) : null
|
|
1172
1172
|
]
|
|
1173
1173
|
}),
|
|
1174
|
-
/* @__PURE__ */
|
|
1174
|
+
/* @__PURE__ */ X(z, {
|
|
1175
1175
|
size: "sm",
|
|
1176
1176
|
tone: "muted",
|
|
1177
1177
|
children: [
|
|
1178
1178
|
N.path,
|
|
1179
1179
|
":",
|
|
1180
1180
|
" ",
|
|
1181
|
-
[N.home, ...
|
|
1181
|
+
[N.home, ...vt(V.id, L, R).map((e) => e.label)].join(" / ")
|
|
1182
1182
|
]
|
|
1183
1183
|
})
|
|
1184
|
-
] }) : /* @__PURE__ */
|
|
1184
|
+
] }) : /* @__PURE__ */ Y("div", {
|
|
1185
1185
|
className: "preview-empty",
|
|
1186
1186
|
children: N.selectItemToInspect
|
|
1187
1187
|
})
|
|
@@ -1193,27 +1193,27 @@ function St({ items: e, locale: t, defaultExpanded: n = [], expanded: r, onExpan
|
|
|
1193
1193
|
}
|
|
1194
1194
|
//#endregion
|
|
1195
1195
|
//#region src/components/data/MCalendarBoard/MCalendarBoard.tsx
|
|
1196
|
-
function
|
|
1196
|
+
function Q(e) {
|
|
1197
1197
|
return new Date(e.getFullYear(), e.getMonth(), e.getDate());
|
|
1198
1198
|
}
|
|
1199
|
-
function
|
|
1199
|
+
function Tt(e) {
|
|
1200
1200
|
if (!e) return null;
|
|
1201
|
-
if (e instanceof Date) return
|
|
1201
|
+
if (e instanceof Date) return Q(e);
|
|
1202
1202
|
let t = new Date(e);
|
|
1203
|
-
return Number.isNaN(t.getTime()) ? null :
|
|
1203
|
+
return Number.isNaN(t.getTime()) ? null : Q(t);
|
|
1204
1204
|
}
|
|
1205
|
-
function
|
|
1205
|
+
function $(e) {
|
|
1206
1206
|
return `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`;
|
|
1207
1207
|
}
|
|
1208
1208
|
function Et(e) {
|
|
1209
|
-
return
|
|
1209
|
+
return Tt(e.date);
|
|
1210
1210
|
}
|
|
1211
1211
|
function Dt(e, t) {
|
|
1212
1212
|
let n = new Date(e);
|
|
1213
|
-
return n.setDate(n.getDate() + t),
|
|
1213
|
+
return n.setDate(n.getDate() + t), Q(n);
|
|
1214
1214
|
}
|
|
1215
1215
|
function Ot(e, t) {
|
|
1216
|
-
let n =
|
|
1216
|
+
let n = Q(e);
|
|
1217
1217
|
return Dt(n, -((n.getDay() - t + 7) % 7));
|
|
1218
1218
|
}
|
|
1219
1219
|
function kt(e) {
|
|
@@ -1259,7 +1259,7 @@ function Ft(e, t) {
|
|
|
1259
1259
|
return i.setHours(t + 1, 0, 0, 0), i <= n ? "past" : r <= n && i > n ? "active" : "upcoming";
|
|
1260
1260
|
}
|
|
1261
1261
|
function It(e) {
|
|
1262
|
-
return kt(e).slice(0, 4).map((e) => /* @__PURE__ */
|
|
1262
|
+
return kt(e).slice(0, 4).map((e) => /* @__PURE__ */ Y("span", {
|
|
1263
1263
|
className: "marker",
|
|
1264
1264
|
style: { background: e.color ?? jt(e.status) },
|
|
1265
1265
|
"aria-hidden": "true"
|
|
@@ -1281,24 +1281,24 @@ function zt(e, t) {
|
|
|
1281
1281
|
}
|
|
1282
1282
|
function Bt({ date: e, events: t, locale: n, timelineStartHour: r, timelineEndHour: i, showTimeline: a, emptyStateText: o, renderEventItem: s }) {
|
|
1283
1283
|
if (!e) return null;
|
|
1284
|
-
let c =
|
|
1285
|
-
return /* @__PURE__ */
|
|
1286
|
-
/* @__PURE__ */
|
|
1284
|
+
let c = Me();
|
|
1285
|
+
return /* @__PURE__ */ X(Ne, { children: [
|
|
1286
|
+
/* @__PURE__ */ X(Ne, { children: [/* @__PURE__ */ Y(ce, {
|
|
1287
1287
|
level: 4,
|
|
1288
1288
|
children: Mt(e, n)
|
|
1289
|
-
}), /* @__PURE__ */
|
|
1289
|
+
}), /* @__PURE__ */ Y(z, {
|
|
1290
1290
|
tone: "muted",
|
|
1291
1291
|
size: "sm",
|
|
1292
1292
|
children: t.length > 0 ? c.itemsCount(t.length) : o
|
|
1293
1293
|
})] }),
|
|
1294
|
-
/* @__PURE__ */
|
|
1294
|
+
/* @__PURE__ */ Y(Gt, {
|
|
1295
1295
|
events: t,
|
|
1296
1296
|
locale: n,
|
|
1297
1297
|
currentDate: e,
|
|
1298
1298
|
emptyStateText: o,
|
|
1299
1299
|
renderEventItem: s
|
|
1300
1300
|
}),
|
|
1301
|
-
a && /* @__PURE__ */
|
|
1301
|
+
a && /* @__PURE__ */ Y(Kt, {
|
|
1302
1302
|
date: e,
|
|
1303
1303
|
events: t,
|
|
1304
1304
|
locale: n,
|
|
@@ -1308,11 +1308,11 @@ function Bt({ date: e, events: t, locale: n, timelineStartHour: r, timelineEndHo
|
|
|
1308
1308
|
] });
|
|
1309
1309
|
}
|
|
1310
1310
|
function Vt({ filters: e, activeFilterIds: t, onToggle: n }) {
|
|
1311
|
-
return e.length ? /* @__PURE__ */
|
|
1311
|
+
return e.length ? /* @__PURE__ */ Y("div", {
|
|
1312
1312
|
className: "calendar filters",
|
|
1313
1313
|
children: e.map((e) => {
|
|
1314
1314
|
let r = t.includes(e.id);
|
|
1315
|
-
return /* @__PURE__ */
|
|
1315
|
+
return /* @__PURE__ */ Y(de, {
|
|
1316
1316
|
type: "button",
|
|
1317
1317
|
size: "sm",
|
|
1318
1318
|
variant: "outlined",
|
|
@@ -1326,14 +1326,14 @@ function Vt({ filters: e, activeFilterIds: t, onToggle: n }) {
|
|
|
1326
1326
|
}) : null;
|
|
1327
1327
|
}
|
|
1328
1328
|
function Ht({ days: e, eventsByDay: t, selectedDate: n, activeDate: r, onDayInteract: i, onDayHover: a, onDayLeave: o, dayBadge: s, renderDayCell: c }) {
|
|
1329
|
-
let l =
|
|
1330
|
-
return /* @__PURE__ */
|
|
1329
|
+
let l = $(Q(/* @__PURE__ */ new Date()));
|
|
1330
|
+
return /* @__PURE__ */ Y("div", {
|
|
1331
1331
|
className: "calendar week",
|
|
1332
1332
|
children: e.map((e) => {
|
|
1333
|
-
let u =
|
|
1333
|
+
let u = $(e), d = t.get(u) ?? [], f = s?.(e, d) ?? (d.length > 0 ? /* @__PURE__ */ Y(B, {
|
|
1334
1334
|
size: "sm",
|
|
1335
1335
|
children: d.length
|
|
1336
|
-
}) : null), p = It(d), m = !!(n &&
|
|
1336
|
+
}) : null), p = It(d), m = !!(n && $(n) === u), h = {
|
|
1337
1337
|
date: e,
|
|
1338
1338
|
events: d,
|
|
1339
1339
|
badge: f,
|
|
@@ -1341,15 +1341,15 @@ function Ht({ days: e, eventsByDay: t, selectedDate: n, activeDate: r, onDayInte
|
|
|
1341
1341
|
isSelected: m,
|
|
1342
1342
|
isOutsideMonth: !1
|
|
1343
1343
|
};
|
|
1344
|
-
return /* @__PURE__ */
|
|
1344
|
+
return /* @__PURE__ */ Y("div", {
|
|
1345
1345
|
className: "calendar week column",
|
|
1346
|
-
children: /* @__PURE__ */
|
|
1346
|
+
children: /* @__PURE__ */ Y(Ut, {
|
|
1347
1347
|
date: e,
|
|
1348
1348
|
events: d,
|
|
1349
1349
|
badge: f,
|
|
1350
1350
|
markers: p,
|
|
1351
1351
|
isToday: h.isToday,
|
|
1352
|
-
isSelected: m || !!(r &&
|
|
1352
|
+
isSelected: m || !!(r && $(r) === u),
|
|
1353
1353
|
isOutsideMonth: !1,
|
|
1354
1354
|
onClick: (t) => i(e, t.currentTarget, d),
|
|
1355
1355
|
onMouseEnter: (t) => a(e, t.currentTarget, d),
|
|
@@ -1361,74 +1361,74 @@ function Ht({ days: e, eventsByDay: t, selectedDate: n, activeDate: r, onDayInte
|
|
|
1361
1361
|
});
|
|
1362
1362
|
}
|
|
1363
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 }) {
|
|
1364
|
-
return /* @__PURE__ */
|
|
1364
|
+
return /* @__PURE__ */ Y("button", {
|
|
1365
1365
|
type: "button",
|
|
1366
1366
|
className: I("calendar day cell", i && "today", a && "selected", o && "outside-month", s),
|
|
1367
1367
|
...l,
|
|
1368
|
-
children: c ?? /* @__PURE__ */
|
|
1368
|
+
children: c ?? /* @__PURE__ */ X(ze, { children: [/* @__PURE__ */ X("div", {
|
|
1369
1369
|
className: "day header",
|
|
1370
|
-
children: [/* @__PURE__ */
|
|
1370
|
+
children: [/* @__PURE__ */ Y("span", {
|
|
1371
1371
|
className: "day number",
|
|
1372
1372
|
children: e.getDate()
|
|
1373
|
-
}), /* @__PURE__ */
|
|
1373
|
+
}), /* @__PURE__ */ Y("div", {
|
|
1374
1374
|
className: "day meta",
|
|
1375
1375
|
children: n
|
|
1376
1376
|
})]
|
|
1377
|
-
}), /* @__PURE__ */
|
|
1377
|
+
}), /* @__PURE__ */ Y("div", {
|
|
1378
1378
|
className: "markers",
|
|
1379
1379
|
children: r ?? It(t)
|
|
1380
1380
|
})] })
|
|
1381
1381
|
});
|
|
1382
1382
|
}
|
|
1383
1383
|
function Wt({ event: e, locale: t, className: n, currentDate: r, ...i }) {
|
|
1384
|
-
let a =
|
|
1385
|
-
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", {
|
|
1386
1386
|
className: I("calendar event item", n),
|
|
1387
1387
|
...i,
|
|
1388
|
-
children: [/* @__PURE__ */
|
|
1388
|
+
children: [/* @__PURE__ */ Y("div", {
|
|
1389
1389
|
className: "event time",
|
|
1390
1390
|
children: Pt(e, o)
|
|
1391
|
-
}), /* @__PURE__ */
|
|
1391
|
+
}), /* @__PURE__ */ X("div", {
|
|
1392
1392
|
className: "event content",
|
|
1393
1393
|
children: [
|
|
1394
|
-
/* @__PURE__ */
|
|
1394
|
+
/* @__PURE__ */ X("div", {
|
|
1395
1395
|
className: "event title row",
|
|
1396
|
-
children: [/* @__PURE__ */
|
|
1396
|
+
children: [/* @__PURE__ */ Y(ce, {
|
|
1397
1397
|
level: 5,
|
|
1398
1398
|
children: e.title
|
|
1399
|
-
}), e.status && /* @__PURE__ */
|
|
1399
|
+
}), e.status && /* @__PURE__ */ Y(B, {
|
|
1400
1400
|
color: s,
|
|
1401
1401
|
size: "sm",
|
|
1402
1402
|
children: e.status
|
|
1403
1403
|
})]
|
|
1404
1404
|
}),
|
|
1405
|
-
e.description && /* @__PURE__ */
|
|
1405
|
+
e.description && /* @__PURE__ */ Y(z, {
|
|
1406
1406
|
size: "sm",
|
|
1407
1407
|
tone: "muted",
|
|
1408
1408
|
children: e.description
|
|
1409
1409
|
}),
|
|
1410
|
-
/* @__PURE__ */
|
|
1410
|
+
/* @__PURE__ */ X("div", {
|
|
1411
1411
|
className: "event details",
|
|
1412
1412
|
children: [
|
|
1413
|
-
e.type && /* @__PURE__ */
|
|
1413
|
+
e.type && /* @__PURE__ */ Y(B, {
|
|
1414
1414
|
color: "neutral",
|
|
1415
1415
|
size: "sm",
|
|
1416
1416
|
children: e.type
|
|
1417
1417
|
}),
|
|
1418
|
-
e.badgeLabel && /* @__PURE__ */
|
|
1418
|
+
e.badgeLabel && /* @__PURE__ */ Y(B, {
|
|
1419
1419
|
size: "sm",
|
|
1420
1420
|
children: e.badgeLabel
|
|
1421
1421
|
}),
|
|
1422
|
-
e.user && /* @__PURE__ */
|
|
1422
|
+
e.user && /* @__PURE__ */ X("span", {
|
|
1423
1423
|
className: "event user",
|
|
1424
|
-
children: [/* @__PURE__ */
|
|
1424
|
+
children: [/* @__PURE__ */ Y(ve, {
|
|
1425
1425
|
size: "sm",
|
|
1426
1426
|
src: e.user.avatar,
|
|
1427
1427
|
name: e.user.name,
|
|
1428
1428
|
backgroundColor: e.user.color
|
|
1429
1429
|
}), e.user.name]
|
|
1430
1430
|
}),
|
|
1431
|
-
!e.startTime && !e.endTime && r && /* @__PURE__ */
|
|
1431
|
+
!e.startTime && !e.endTime && r && /* @__PURE__ */ Y(z, {
|
|
1432
1432
|
size: "sm",
|
|
1433
1433
|
tone: "muted",
|
|
1434
1434
|
children: Mt(r, a)
|
|
@@ -1440,16 +1440,16 @@ function Wt({ event: e, locale: t, className: n, currentDate: r, ...i }) {
|
|
|
1440
1440
|
});
|
|
1441
1441
|
}
|
|
1442
1442
|
function Gt({ events: e, locale: t, currentDate: n, emptyStateText: r, renderEventItem: i, className: a, ...o }) {
|
|
1443
|
-
let s =
|
|
1444
|
-
return e.length ? /* @__PURE__ */
|
|
1443
|
+
let s = he(t), c = Me();
|
|
1444
|
+
return e.length ? /* @__PURE__ */ Y("div", {
|
|
1445
1445
|
className: I("calendar event list", a),
|
|
1446
1446
|
...o,
|
|
1447
|
-
children: /* @__PURE__ */
|
|
1447
|
+
children: /* @__PURE__ */ Y(Ne, { children: kt(e).map((e) => i ? /* @__PURE__ */ Y("div", { children: i(e) }, e.id) : /* @__PURE__ */ Y(Wt, {
|
|
1448
1448
|
event: e,
|
|
1449
1449
|
locale: s,
|
|
1450
1450
|
currentDate: n
|
|
1451
1451
|
}, e.id)) })
|
|
1452
|
-
}) : /* @__PURE__ */
|
|
1452
|
+
}) : /* @__PURE__ */ Y(z, {
|
|
1453
1453
|
size: "sm",
|
|
1454
1454
|
tone: "muted",
|
|
1455
1455
|
className: I("calendar event list", a),
|
|
@@ -1458,38 +1458,38 @@ function Gt({ events: e, locale: t, currentDate: n, emptyStateText: r, renderEve
|
|
|
1458
1458
|
});
|
|
1459
1459
|
}
|
|
1460
1460
|
function Kt({ date: e, events: t, locale: n, startHour: r = 6, endHour: i = 22, emptyStateText: a, className: o, ...s }) {
|
|
1461
|
-
|
|
1462
|
-
let c =
|
|
1463
|
-
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", {
|
|
1464
1464
|
className: I("calendar timeline", o),
|
|
1465
1465
|
...s,
|
|
1466
|
-
children: /* @__PURE__ */
|
|
1466
|
+
children: /* @__PURE__ */ X(Ne, { children: [/* @__PURE__ */ Y(ce, {
|
|
1467
1467
|
level: 5,
|
|
1468
1468
|
children: c.timelineTitle
|
|
1469
|
-
}), /* @__PURE__ */
|
|
1469
|
+
}), /* @__PURE__ */ Y("div", {
|
|
1470
1470
|
className: "timeline slots",
|
|
1471
1471
|
children: l.map((n) => {
|
|
1472
1472
|
let r = t.filter((e) => e.startTime ? Number(e.startTime.split(":")[0]) === n : !1);
|
|
1473
|
-
return /* @__PURE__ */
|
|
1473
|
+
return /* @__PURE__ */ X("div", {
|
|
1474
1474
|
className: I("timeline slot", Ft(e, n)),
|
|
1475
1475
|
children: [
|
|
1476
|
-
/* @__PURE__ */
|
|
1476
|
+
/* @__PURE__ */ Y("div", {
|
|
1477
1477
|
className: "slot time",
|
|
1478
1478
|
children: `${String(n).padStart(2, "0")}:00`
|
|
1479
1479
|
}),
|
|
1480
|
-
/* @__PURE__ */
|
|
1481
|
-
/* @__PURE__ */
|
|
1480
|
+
/* @__PURE__ */ Y("div", { className: "slot line" }),
|
|
1481
|
+
/* @__PURE__ */ Y("div", {
|
|
1482
1482
|
className: "slot content",
|
|
1483
|
-
children: r.length > 0 ? /* @__PURE__ */
|
|
1483
|
+
children: r.length > 0 ? /* @__PURE__ */ Y(Ne, { children: r.map((e) => /* @__PURE__ */ X("div", {
|
|
1484
1484
|
className: "slot event",
|
|
1485
|
-
children: [/* @__PURE__ */
|
|
1485
|
+
children: [/* @__PURE__ */ Y("span", {
|
|
1486
1486
|
className: "slot event dot",
|
|
1487
1487
|
style: { background: e.color ?? jt(e.status) }
|
|
1488
|
-
}), /* @__PURE__ */
|
|
1488
|
+
}), /* @__PURE__ */ Y(z, {
|
|
1489
1489
|
size: "sm",
|
|
1490
1490
|
children: e.title
|
|
1491
1491
|
})]
|
|
1492
|
-
}, e.id)) }) : /* @__PURE__ */
|
|
1492
|
+
}, e.id)) }) : /* @__PURE__ */ Y(z, {
|
|
1493
1493
|
size: "sm",
|
|
1494
1494
|
tone: "muted",
|
|
1495
1495
|
children: a ?? c.timelineEmptyState
|
|
@@ -1502,19 +1502,19 @@ function Kt({ date: e, events: t, locale: n, startHour: r = 6, endHour: i = 22,
|
|
|
1502
1502
|
});
|
|
1503
1503
|
}
|
|
1504
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 }) {
|
|
1505
|
-
let h =
|
|
1506
|
-
return /* @__PURE__ */
|
|
1505
|
+
let h = he(s), g = Me();
|
|
1506
|
+
return /* @__PURE__ */ Y(R, {
|
|
1507
1507
|
open: e,
|
|
1508
1508
|
anchorRef: t,
|
|
1509
1509
|
onClose: n,
|
|
1510
1510
|
placement: "bottom-start",
|
|
1511
1511
|
className: I("calendar popover", p),
|
|
1512
1512
|
style: m,
|
|
1513
|
-
children: /* @__PURE__ */
|
|
1513
|
+
children: /* @__PURE__ */ Y(V, {
|
|
1514
1514
|
className: "calendar event popover",
|
|
1515
1515
|
onPointerEnter: r,
|
|
1516
1516
|
onPointerLeave: i,
|
|
1517
|
-
children: /* @__PURE__ */
|
|
1517
|
+
children: /* @__PURE__ */ Y(H, { children: /* @__PURE__ */ Y(Bt, {
|
|
1518
1518
|
date: a,
|
|
1519
1519
|
events: o,
|
|
1520
1520
|
locale: h,
|
|
@@ -1528,158 +1528,158 @@ function qt({ open: e, anchorRef: t, onClose: n, onPointerEnter: r, onPointerLea
|
|
|
1528
1528
|
});
|
|
1529
1529
|
}
|
|
1530
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 }) {
|
|
1531
|
-
let k =
|
|
1532
|
-
|
|
1533
|
-
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);
|
|
1534
1534
|
return t(), e.addEventListener("change", t), () => e.removeEventListener("change", t);
|
|
1535
|
-
}, []),
|
|
1536
|
-
|
|
1537
|
-
}, [
|
|
1535
|
+
}, []), Re(() => {
|
|
1536
|
+
V && e && P(Q(e));
|
|
1537
|
+
}, [V, e]), Re(() => {
|
|
1538
1538
|
o && te(o);
|
|
1539
|
-
}, [o]),
|
|
1540
|
-
u !== void 0 && re(
|
|
1541
|
-
}, [u]),
|
|
1542
|
-
|
|
1539
|
+
}, [o]), Re(() => {
|
|
1540
|
+
u !== void 0 && re(Tt(u));
|
|
1541
|
+
}, [u]), Re(() => () => {
|
|
1542
|
+
fe.current && window.clearTimeout(fe.current);
|
|
1543
1543
|
}, []);
|
|
1544
|
-
let
|
|
1544
|
+
let _e = K(() => Lt(r, S, ge), [
|
|
1545
1545
|
r,
|
|
1546
1546
|
S,
|
|
1547
|
-
|
|
1548
|
-
]),
|
|
1547
|
+
ge
|
|
1548
|
+
]), ve = K(() => {
|
|
1549
1549
|
let e = /* @__PURE__ */ new Map();
|
|
1550
|
-
return
|
|
1550
|
+
return _e.forEach((t) => {
|
|
1551
1551
|
let n = Et(t);
|
|
1552
1552
|
if (!n) return;
|
|
1553
|
-
let r =
|
|
1553
|
+
let r = $(n), i = e.get(r) ?? [];
|
|
1554
1554
|
i.push(t), e.set(r, i);
|
|
1555
1555
|
}), e;
|
|
1556
|
-
}, [
|
|
1556
|
+
}, [_e]), ye = K(() => {
|
|
1557
1557
|
if (U === "week") {
|
|
1558
|
-
let e = Ot(
|
|
1558
|
+
let e = Ot(me ?? H, a);
|
|
1559
1559
|
return Array.from({ length: 7 }, (t, n) => Dt(e, n));
|
|
1560
1560
|
}
|
|
1561
1561
|
return At(H, a);
|
|
1562
1562
|
}, [
|
|
1563
1563
|
U,
|
|
1564
|
-
|
|
1564
|
+
me,
|
|
1565
1565
|
H,
|
|
1566
1566
|
a
|
|
1567
|
-
]),
|
|
1568
|
-
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);
|
|
1569
1569
|
P(t), n?.(t);
|
|
1570
|
-
},
|
|
1570
|
+
}, Te = (e) => {
|
|
1571
1571
|
if (U === "week") {
|
|
1572
|
-
let t = Dt(
|
|
1573
|
-
|
|
1572
|
+
let t = Dt(me ?? H, e * 7);
|
|
1573
|
+
we(t), re(t), oe(t), R(!1);
|
|
1574
1574
|
return;
|
|
1575
1575
|
}
|
|
1576
|
-
|
|
1577
|
-
},
|
|
1576
|
+
we(new Date(H.getFullYear(), H.getMonth() + e, 1)), R(!1), oe(null);
|
|
1577
|
+
}, Ee = (e) => {
|
|
1578
1578
|
te(e), l?.(e);
|
|
1579
|
-
},
|
|
1580
|
-
let n =
|
|
1579
|
+
}, De = (e, t) => {
|
|
1580
|
+
let n = Q(e);
|
|
1581
1581
|
re(n), f?.(n, t);
|
|
1582
|
-
},
|
|
1583
|
-
|
|
1584
|
-
},
|
|
1585
|
-
|
|
1582
|
+
}, Oe = () => {
|
|
1583
|
+
fe.current &&= (window.clearTimeout(fe.current), null);
|
|
1584
|
+
}, W = () => {
|
|
1585
|
+
Oe(), fe.current = window.setTimeout(() => {
|
|
1586
1586
|
R(!1);
|
|
1587
1587
|
}, 180);
|
|
1588
1588
|
}, ke = (e, t, n) => {
|
|
1589
|
-
|
|
1590
|
-
},
|
|
1591
|
-
|
|
1592
|
-
},
|
|
1593
|
-
g !== "hover" ||
|
|
1594
|
-
},
|
|
1595
|
-
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];
|
|
1596
1596
|
ae(t), T?.(t);
|
|
1597
|
-
},
|
|
1598
|
-
return /* @__PURE__ */
|
|
1597
|
+
}, Ie = Ot(U === "week" ? me ?? H : H, a);
|
|
1598
|
+
return /* @__PURE__ */ X("div", {
|
|
1599
1599
|
className: I("calendar board", E && "full-width", D),
|
|
1600
1600
|
...O,
|
|
1601
1601
|
children: [
|
|
1602
|
-
/* @__PURE__ */
|
|
1602
|
+
/* @__PURE__ */ X("div", {
|
|
1603
1603
|
className: "calendar header",
|
|
1604
|
-
children: [/* @__PURE__ */
|
|
1604
|
+
children: [/* @__PURE__ */ X(Ne, { children: [/* @__PURE__ */ Y(ce, {
|
|
1605
1605
|
level: 3,
|
|
1606
1606
|
children: Rt(H, U, k, a)
|
|
1607
|
-
}), /* @__PURE__ */
|
|
1607
|
+
}), /* @__PURE__ */ Y(z, {
|
|
1608
1608
|
size: "sm",
|
|
1609
1609
|
tone: "muted",
|
|
1610
1610
|
children: zt(U, j)
|
|
1611
|
-
})] }), /* @__PURE__ */
|
|
1611
|
+
})] }), /* @__PURE__ */ X(Ne, {
|
|
1612
1612
|
align: "end",
|
|
1613
|
-
children: [/* @__PURE__ */
|
|
1613
|
+
children: [/* @__PURE__ */ X("div", {
|
|
1614
1614
|
className: "calendar actions",
|
|
1615
|
-
children: [/* @__PURE__ */
|
|
1615
|
+
children: [/* @__PURE__ */ Y(de, {
|
|
1616
1616
|
type: "button",
|
|
1617
1617
|
size: "sm",
|
|
1618
1618
|
variant: "outlined",
|
|
1619
1619
|
color: "neutral",
|
|
1620
|
-
onClick: () =>
|
|
1620
|
+
onClick: () => Te(-1),
|
|
1621
1621
|
children: U === "week" ? j.previousWeek : A.previousMonth
|
|
1622
|
-
}), /* @__PURE__ */
|
|
1622
|
+
}), /* @__PURE__ */ Y(de, {
|
|
1623
1623
|
type: "button",
|
|
1624
1624
|
size: "sm",
|
|
1625
1625
|
variant: "outlined",
|
|
1626
1626
|
color: "neutral",
|
|
1627
|
-
onClick: () =>
|
|
1627
|
+
onClick: () => Te(1),
|
|
1628
1628
|
children: U === "week" ? j.nextWeek : A.nextMonth
|
|
1629
1629
|
})]
|
|
1630
|
-
}), (
|
|
1630
|
+
}), (Se || Ce) && /* @__PURE__ */ X("div", {
|
|
1631
1631
|
className: "calendar views",
|
|
1632
|
-
children: [
|
|
1632
|
+
children: [Se && /* @__PURE__ */ Y(de, {
|
|
1633
1633
|
type: "button",
|
|
1634
1634
|
size: "sm",
|
|
1635
1635
|
variant: "outlined",
|
|
1636
1636
|
color: U === "month" ? "primary" : "neutral",
|
|
1637
1637
|
active: U === "month",
|
|
1638
|
-
onClick: () =>
|
|
1638
|
+
onClick: () => Ee("month"),
|
|
1639
1639
|
children: j.monthView
|
|
1640
|
-
}),
|
|
1640
|
+
}), Ce && /* @__PURE__ */ Y(de, {
|
|
1641
1641
|
type: "button",
|
|
1642
1642
|
size: "sm",
|
|
1643
1643
|
variant: "outlined",
|
|
1644
1644
|
color: U === "week" ? "primary" : "neutral",
|
|
1645
1645
|
active: U === "week",
|
|
1646
|
-
onClick: () =>
|
|
1646
|
+
onClick: () => Ee("week"),
|
|
1647
1647
|
children: j.weekView
|
|
1648
1648
|
})]
|
|
1649
1649
|
})]
|
|
1650
1650
|
})]
|
|
1651
1651
|
}),
|
|
1652
|
-
/* @__PURE__ */
|
|
1652
|
+
/* @__PURE__ */ Y(Vt, {
|
|
1653
1653
|
filters: S,
|
|
1654
|
-
activeFilterIds:
|
|
1655
|
-
onToggle:
|
|
1654
|
+
activeFilterIds: ge,
|
|
1655
|
+
onToggle: Fe
|
|
1656
1656
|
}),
|
|
1657
|
-
/* @__PURE__ */
|
|
1657
|
+
/* @__PURE__ */ Y("div", {
|
|
1658
1658
|
className: "calendar days",
|
|
1659
|
-
children: Array.from({ length: 7 }, (e, t) => Dt(
|
|
1659
|
+
children: Array.from({ length: 7 }, (e, t) => Dt(Ie, t)).map((e) => /* @__PURE__ */ Y("div", {
|
|
1660
1660
|
className: "calendar day",
|
|
1661
1661
|
children: new Intl.DateTimeFormat(k, { weekday: "short" }).format(e)
|
|
1662
|
-
},
|
|
1662
|
+
}, $(e)))
|
|
1663
1663
|
}),
|
|
1664
|
-
U === "week" ? /* @__PURE__ */
|
|
1665
|
-
days:
|
|
1666
|
-
eventsByDay:
|
|
1667
|
-
selectedDate:
|
|
1664
|
+
U === "week" ? /* @__PURE__ */ Y(Ht, {
|
|
1665
|
+
days: ye,
|
|
1666
|
+
eventsByDay: ve,
|
|
1667
|
+
selectedDate: me,
|
|
1668
1668
|
activeDate: F,
|
|
1669
|
-
onDayInteract:
|
|
1670
|
-
onDayHover:
|
|
1669
|
+
onDayInteract: Ae,
|
|
1670
|
+
onDayHover: Pe,
|
|
1671
1671
|
onDayLeave: () => {
|
|
1672
|
-
g === "hover" &&
|
|
1672
|
+
g === "hover" && be === "popover" && W();
|
|
1673
1673
|
},
|
|
1674
1674
|
dayBadge: p,
|
|
1675
1675
|
renderDayCell: m
|
|
1676
|
-
}) : /* @__PURE__ */
|
|
1676
|
+
}) : /* @__PURE__ */ Y("div", {
|
|
1677
1677
|
className: "calendar grid",
|
|
1678
|
-
children:
|
|
1679
|
-
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, {
|
|
1680
1680
|
size: "sm",
|
|
1681
1681
|
children: n.length
|
|
1682
|
-
}) : null), i = t ===
|
|
1682
|
+
}) : null), i = t === $(M), a = !!(me && t === $(me)), o = e.getMonth() !== H.getMonth(), s = It(n), c = {
|
|
1683
1683
|
date: e,
|
|
1684
1684
|
events: n,
|
|
1685
1685
|
badge: r,
|
|
@@ -1687,46 +1687,46 @@ function Jt({ month: e, defaultMonth: t, onMonthChange: n, events: r = [], local
|
|
|
1687
1687
|
isSelected: a,
|
|
1688
1688
|
isOutsideMonth: o
|
|
1689
1689
|
};
|
|
1690
|
-
return /* @__PURE__ */
|
|
1690
|
+
return /* @__PURE__ */ Y(Ut, {
|
|
1691
1691
|
date: e,
|
|
1692
1692
|
events: n,
|
|
1693
1693
|
badge: r,
|
|
1694
1694
|
markers: s,
|
|
1695
1695
|
isToday: i,
|
|
1696
|
-
isSelected: a || !!(F && t ===
|
|
1696
|
+
isSelected: a || !!(F && t === $(F)),
|
|
1697
1697
|
isOutsideMonth: o,
|
|
1698
|
-
onClick: (t) =>
|
|
1699
|
-
onMouseEnter: (t) =>
|
|
1698
|
+
onClick: (t) => Ae(e, t.currentTarget, n),
|
|
1699
|
+
onMouseEnter: (t) => Pe(e, t.currentTarget, n),
|
|
1700
1700
|
onMouseLeave: () => {
|
|
1701
|
-
g === "hover" &&
|
|
1701
|
+
g === "hover" && be === "popover" && W();
|
|
1702
1702
|
},
|
|
1703
1703
|
children: m ? m(e, c) : void 0
|
|
1704
1704
|
}, t);
|
|
1705
1705
|
})
|
|
1706
1706
|
}),
|
|
1707
|
-
|
|
1708
|
-
open: L && !!F && !!
|
|
1709
|
-
anchorRef:
|
|
1707
|
+
be === "popover" ? /* @__PURE__ */ Y(qt, {
|
|
1708
|
+
open: L && !!F && !!ue.current,
|
|
1709
|
+
anchorRef: ue,
|
|
1710
1710
|
onClose: () => R(!1),
|
|
1711
|
-
onPointerEnter: () =>
|
|
1712
|
-
onPointerLeave: () =>
|
|
1711
|
+
onPointerEnter: () => Oe(),
|
|
1712
|
+
onPointerLeave: () => W(),
|
|
1713
1713
|
date: F,
|
|
1714
|
-
events:
|
|
1714
|
+
events: xe,
|
|
1715
1715
|
locale: k,
|
|
1716
1716
|
timelineStartHour: y,
|
|
1717
1717
|
timelineEndHour: b,
|
|
1718
1718
|
showTimeline: v,
|
|
1719
1719
|
emptyStateText: x ?? j.emptyStateText,
|
|
1720
1720
|
renderEventItem: h
|
|
1721
|
-
}) : /* @__PURE__ */
|
|
1721
|
+
}) : /* @__PURE__ */ Y(pe, {
|
|
1722
1722
|
open: L && !!F,
|
|
1723
1723
|
onClose: () => R(!1),
|
|
1724
1724
|
title: F ? Mt(F, k) : void 0,
|
|
1725
|
-
description: F ? j.itemsCount(
|
|
1725
|
+
description: F ? j.itemsCount(xe.length) : void 0,
|
|
1726
1726
|
size: "lg",
|
|
1727
|
-
children: /* @__PURE__ */
|
|
1727
|
+
children: /* @__PURE__ */ Y(Bt, {
|
|
1728
1728
|
date: F,
|
|
1729
|
-
events:
|
|
1729
|
+
events: xe,
|
|
1730
1730
|
locale: k,
|
|
1731
1731
|
timelineStartHour: y,
|
|
1732
1732
|
timelineEndHour: b,
|
|
@@ -1771,15 +1771,15 @@ function $t(e) {
|
|
|
1771
1771
|
//#endregion
|
|
1772
1772
|
//#region src/components/data/MChart/parts/ChartGrid.tsx
|
|
1773
1773
|
function en({ x: e, y: t, width: n, height: r, horizontalLines: i, verticalLines: a }) {
|
|
1774
|
-
return /* @__PURE__ */
|
|
1774
|
+
return /* @__PURE__ */ X("g", {
|
|
1775
1775
|
className: "chart-grid",
|
|
1776
|
-
children: [i.map((t, r) => /* @__PURE__ */
|
|
1776
|
+
children: [i.map((t, r) => /* @__PURE__ */ Y("line", {
|
|
1777
1777
|
x1: e,
|
|
1778
1778
|
y1: t,
|
|
1779
1779
|
x2: e + n,
|
|
1780
1780
|
y2: t,
|
|
1781
1781
|
className: "chart-grid-line"
|
|
1782
|
-
}, `h${r}`)), a?.map((e, n) => /* @__PURE__ */
|
|
1782
|
+
}, `h${r}`)), a?.map((e, n) => /* @__PURE__ */ Y("line", {
|
|
1783
1783
|
x1: e,
|
|
1784
1784
|
y1: t,
|
|
1785
1785
|
x2: e,
|
|
@@ -1792,23 +1792,23 @@ function en({ x: e, y: t, width: n, height: r, horizontalLines: i, verticalLines
|
|
|
1792
1792
|
//#region src/components/data/MChart/parts/ChartAxis.tsx
|
|
1793
1793
|
function tn({ type: e, x: t, y: n, length: r, ticks: i, title: a }) {
|
|
1794
1794
|
let o = e === "x";
|
|
1795
|
-
return /* @__PURE__ */
|
|
1795
|
+
return /* @__PURE__ */ X("g", {
|
|
1796
1796
|
className: `chart-axis chart-axis-${e}`,
|
|
1797
1797
|
children: [
|
|
1798
|
-
/* @__PURE__ */
|
|
1798
|
+
/* @__PURE__ */ Y("line", {
|
|
1799
1799
|
x1: t,
|
|
1800
1800
|
y1: n,
|
|
1801
1801
|
x2: o ? t + r : t,
|
|
1802
1802
|
y2: o ? n : n - r,
|
|
1803
1803
|
className: "chart-axis-line"
|
|
1804
1804
|
}),
|
|
1805
|
-
i.map((e, r) => /* @__PURE__ */
|
|
1805
|
+
i.map((e, r) => /* @__PURE__ */ Y("g", { children: o ? /* @__PURE__ */ Y("text", {
|
|
1806
1806
|
x: e.position,
|
|
1807
1807
|
y: n + 16,
|
|
1808
1808
|
textAnchor: "middle",
|
|
1809
1809
|
className: "chart-axis-label",
|
|
1810
1810
|
children: e.label
|
|
1811
|
-
}) : /* @__PURE__ */
|
|
1811
|
+
}) : /* @__PURE__ */ Y("text", {
|
|
1812
1812
|
x: t - 8,
|
|
1813
1813
|
y: e.position,
|
|
1814
1814
|
textAnchor: "end",
|
|
@@ -1816,13 +1816,13 @@ function tn({ type: e, x: t, y: n, length: r, ticks: i, title: a }) {
|
|
|
1816
1816
|
className: "chart-axis-label",
|
|
1817
1817
|
children: e.label
|
|
1818
1818
|
}) }, r)),
|
|
1819
|
-
a && (o ? /* @__PURE__ */
|
|
1819
|
+
a && (o ? /* @__PURE__ */ Y("text", {
|
|
1820
1820
|
x: t + r / 2,
|
|
1821
1821
|
y: n + 36,
|
|
1822
1822
|
textAnchor: "middle",
|
|
1823
1823
|
className: "chart-axis-title",
|
|
1824
1824
|
children: a
|
|
1825
|
-
}) : /* @__PURE__ */
|
|
1825
|
+
}) : /* @__PURE__ */ Y("text", {
|
|
1826
1826
|
x: t - 40,
|
|
1827
1827
|
y: n - r / 2,
|
|
1828
1828
|
textAnchor: "middle",
|
|
@@ -1837,8 +1837,8 @@ function tn({ type: e, x: t, y: n, length: r, ticks: i, title: a }) {
|
|
|
1837
1837
|
//#endregion
|
|
1838
1838
|
//#region src/components/data/MChart/charts/MLineChart.tsx
|
|
1839
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 }) {
|
|
1840
|
-
let [h, g] =
|
|
1841
|
-
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]);
|
|
1842
1842
|
return {
|
|
1843
1843
|
yMin: i,
|
|
1844
1844
|
yMax: s,
|
|
@@ -1855,7 +1855,7 @@ function nn({ data: e, colors: t, innerWidth: n, innerHeight: r, padding: i, xAx
|
|
|
1855
1855
|
v,
|
|
1856
1856
|
a,
|
|
1857
1857
|
o
|
|
1858
|
-
]), w =
|
|
1858
|
+
]), w = W([y, b], [v, 0]), T = W([0, Math.max(S.length - 1, 1)], [0, _]), E = G((r) => {
|
|
1859
1859
|
let a = r.currentTarget.closest("svg");
|
|
1860
1860
|
if (!a) return;
|
|
1861
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));
|
|
@@ -1877,7 +1877,7 @@ function nn({ data: e, colors: t, innerWidth: n, innerHeight: r, padding: i, xAx
|
|
|
1877
1877
|
i.left,
|
|
1878
1878
|
n,
|
|
1879
1879
|
p
|
|
1880
|
-
]), D =
|
|
1880
|
+
]), D = G(() => {
|
|
1881
1881
|
g(null), p(null);
|
|
1882
1882
|
}, [p]), O = x.map((e) => i.top + w(e)), k = S.map((e, t) => i.left + T(t)), A = x.map((e) => ({
|
|
1883
1883
|
position: i.top + w(e),
|
|
@@ -1886,8 +1886,8 @@ function nn({ data: e, colors: t, innerWidth: n, innerHeight: r, padding: i, xAx
|
|
|
1886
1886
|
position: i.left + T(t),
|
|
1887
1887
|
label: e
|
|
1888
1888
|
}));
|
|
1889
|
-
return /* @__PURE__ */
|
|
1890
|
-
s && /* @__PURE__ */
|
|
1889
|
+
return /* @__PURE__ */ X("g", { children: [
|
|
1890
|
+
s && /* @__PURE__ */ Y(en, {
|
|
1891
1891
|
x: i.left,
|
|
1892
1892
|
y: i.top,
|
|
1893
1893
|
width: _,
|
|
@@ -1895,7 +1895,7 @@ function nn({ data: e, colors: t, innerWidth: n, innerHeight: r, padding: i, xAx
|
|
|
1895
1895
|
horizontalLines: O,
|
|
1896
1896
|
verticalLines: k
|
|
1897
1897
|
}),
|
|
1898
|
-
l && /* @__PURE__ */
|
|
1898
|
+
l && /* @__PURE__ */ Y(tn, {
|
|
1899
1899
|
type: "y",
|
|
1900
1900
|
x: i.left,
|
|
1901
1901
|
y: i.top + v,
|
|
@@ -1903,7 +1903,7 @@ function nn({ data: e, colors: t, innerWidth: n, innerHeight: r, padding: i, xAx
|
|
|
1903
1903
|
ticks: A,
|
|
1904
1904
|
title: o?.title
|
|
1905
1905
|
}),
|
|
1906
|
-
c && /* @__PURE__ */
|
|
1906
|
+
c && /* @__PURE__ */ Y(tn, {
|
|
1907
1907
|
type: "x",
|
|
1908
1908
|
x: i.left,
|
|
1909
1909
|
y: i.top + v,
|
|
@@ -1911,11 +1911,11 @@ function nn({ data: e, colors: t, innerWidth: n, innerHeight: r, padding: i, xAx
|
|
|
1911
1911
|
ticks: j,
|
|
1912
1912
|
title: a?.title
|
|
1913
1913
|
}),
|
|
1914
|
-
/* @__PURE__ */
|
|
1914
|
+
/* @__PURE__ */ X("g", {
|
|
1915
1915
|
onMouseMove: E,
|
|
1916
1916
|
onMouseLeave: D,
|
|
1917
1917
|
children: [
|
|
1918
|
-
/* @__PURE__ */
|
|
1918
|
+
/* @__PURE__ */ Y("rect", {
|
|
1919
1919
|
x: i.left,
|
|
1920
1920
|
y: i.top,
|
|
1921
1921
|
width: _,
|
|
@@ -1923,17 +1923,17 @@ function nn({ data: e, colors: t, innerWidth: n, innerHeight: r, padding: i, xAx
|
|
|
1923
1923
|
fill: "transparent"
|
|
1924
1924
|
}),
|
|
1925
1925
|
C.map((n, r) => {
|
|
1926
|
-
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) => ({
|
|
1927
1927
|
x: e.x + i.left,
|
|
1928
1928
|
y: e.y + i.top
|
|
1929
|
-
}))) :
|
|
1929
|
+
}))) : we(n.map((e) => ({
|
|
1930
1930
|
x: e.x + i.left,
|
|
1931
1931
|
y: e.y + i.top
|
|
1932
1932
|
})));
|
|
1933
|
-
return /* @__PURE__ */
|
|
1933
|
+
return /* @__PURE__ */ X("g", { children: [/* @__PURE__ */ Y("path", {
|
|
1934
1934
|
className: `chart-line ${a} ${d ? "animated" : ""}`,
|
|
1935
1935
|
d: o
|
|
1936
|
-
}), n.map((t, n) => /* @__PURE__ */
|
|
1936
|
+
}), n.map((t, n) => /* @__PURE__ */ Y("circle", {
|
|
1937
1937
|
className: `chart-dot ${a} ${h === n ? "active" : ""}`,
|
|
1938
1938
|
cx: t.x + i.left,
|
|
1939
1939
|
cy: t.y + i.top,
|
|
@@ -1942,7 +1942,7 @@ function nn({ data: e, colors: t, innerWidth: n, innerHeight: r, padding: i, xAx
|
|
|
1942
1942
|
style: { cursor: m ? "pointer" : void 0 }
|
|
1943
1943
|
}, n))] }, r);
|
|
1944
1944
|
}),
|
|
1945
|
-
h !== null && /* @__PURE__ */
|
|
1945
|
+
h !== null && /* @__PURE__ */ Y("line", {
|
|
1946
1946
|
className: "chart-crosshair",
|
|
1947
1947
|
x1: i.left + T(h),
|
|
1948
1948
|
y1: i.top,
|
|
@@ -1956,14 +1956,14 @@ function nn({ data: e, colors: t, innerWidth: n, innerHeight: r, padding: i, xAx
|
|
|
1956
1956
|
//#endregion
|
|
1957
1957
|
//#region src/components/data/MChart/charts/MBarChart.tsx
|
|
1958
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 }) {
|
|
1959
|
-
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(() => {
|
|
1960
1960
|
let t = e.map((e) => e.data), n = Math.max(...t.map((e) => e.length), 1), r, i;
|
|
1961
|
-
u ? [r, i] =
|
|
1962
|
-
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);
|
|
1963
1963
|
return {
|
|
1964
1964
|
yMin: s,
|
|
1965
1965
|
yMax: c,
|
|
1966
|
-
yTicks:
|
|
1966
|
+
yTicks: xe(s, c, o?.ticks ?? 5),
|
|
1967
1967
|
xLabels: a?.labels ?? Array.from({ length: n }, (e, t) => String(t)),
|
|
1968
1968
|
maxLen: n
|
|
1969
1969
|
};
|
|
@@ -1972,7 +1972,7 @@ function rn({ data: e, colors: t, innerWidth: n, innerHeight: r, padding: i, xAx
|
|
|
1972
1972
|
a,
|
|
1973
1973
|
o,
|
|
1974
1974
|
u
|
|
1975
|
-
]), w =
|
|
1975
|
+
]), w = W([y, b], [v, 0]), T = _ / C, E = Math.max(T * .1, 2), D = e.length, O = G((n, r, i) => {
|
|
1976
1976
|
g({
|
|
1977
1977
|
di: n,
|
|
1978
1978
|
pi: r
|
|
@@ -2000,7 +2000,7 @@ function rn({ data: e, colors: t, innerWidth: n, innerHeight: r, padding: i, xAx
|
|
|
2000
2000
|
S,
|
|
2001
2001
|
u,
|
|
2002
2002
|
p
|
|
2003
|
-
]), k =
|
|
2003
|
+
]), k = G(() => {
|
|
2004
2004
|
g(null), p(null);
|
|
2005
2005
|
}, [p]), A = x.map((e) => i.top + w(e)), j = S.map((e, t) => ({
|
|
2006
2006
|
position: i.left + T * t + T / 2,
|
|
@@ -2009,15 +2009,15 @@ function rn({ data: e, colors: t, innerWidth: n, innerHeight: r, padding: i, xAx
|
|
|
2009
2009
|
position: i.top + w(e),
|
|
2010
2010
|
label: (o?.formatter ?? f)(e)
|
|
2011
2011
|
})), N = w(0);
|
|
2012
|
-
return /* @__PURE__ */
|
|
2013
|
-
s && /* @__PURE__ */
|
|
2012
|
+
return /* @__PURE__ */ X("g", { children: [
|
|
2013
|
+
s && /* @__PURE__ */ Y(en, {
|
|
2014
2014
|
x: i.left,
|
|
2015
2015
|
y: i.top,
|
|
2016
2016
|
width: _,
|
|
2017
2017
|
height: v,
|
|
2018
2018
|
horizontalLines: A
|
|
2019
2019
|
}),
|
|
2020
|
-
l && /* @__PURE__ */
|
|
2020
|
+
l && /* @__PURE__ */ Y(tn, {
|
|
2021
2021
|
type: "y",
|
|
2022
2022
|
x: i.left,
|
|
2023
2023
|
y: i.top + v,
|
|
@@ -2025,7 +2025,7 @@ function rn({ data: e, colors: t, innerWidth: n, innerHeight: r, padding: i, xAx
|
|
|
2025
2025
|
ticks: M,
|
|
2026
2026
|
title: o?.title
|
|
2027
2027
|
}),
|
|
2028
|
-
c && /* @__PURE__ */
|
|
2028
|
+
c && /* @__PURE__ */ Y(tn, {
|
|
2029
2029
|
type: "x",
|
|
2030
2030
|
x: i.left,
|
|
2031
2031
|
y: i.top + v,
|
|
@@ -2033,15 +2033,15 @@ function rn({ data: e, colors: t, innerWidth: n, innerHeight: r, padding: i, xAx
|
|
|
2033
2033
|
ticks: j,
|
|
2034
2034
|
title: a?.title
|
|
2035
2035
|
}),
|
|
2036
|
-
/* @__PURE__ */
|
|
2036
|
+
/* @__PURE__ */ Y("g", {
|
|
2037
2037
|
onMouseLeave: k,
|
|
2038
2038
|
children: u ? S.map((n, r) => {
|
|
2039
2039
|
let a = N, o = T - E * 2, s = i.left + T * r + E;
|
|
2040
|
-
return /* @__PURE__ */
|
|
2040
|
+
return /* @__PURE__ */ Y("g", { children: e.map((n, c) => {
|
|
2041
2041
|
let l = n.data[r] ?? 0, u = N - w(l), f = a - u;
|
|
2042
2042
|
a = f;
|
|
2043
2043
|
let p = n.color ?? t[c % t.length], g = h?.di === c && h?.pi === r;
|
|
2044
|
-
return /* @__PURE__ */
|
|
2044
|
+
return /* @__PURE__ */ Y("rect", {
|
|
2045
2045
|
className: `chart-bar ${p} ${d ? "animated" : ""} ${g ? "active" : ""}`,
|
|
2046
2046
|
x: s,
|
|
2047
2047
|
y: i.top + f,
|
|
@@ -2055,9 +2055,9 @@ function rn({ data: e, colors: t, innerWidth: n, innerHeight: r, padding: i, xAx
|
|
|
2055
2055
|
}) }, r);
|
|
2056
2056
|
}) : e.map((e, n) => {
|
|
2057
2057
|
let r = (T - E * 2) / D;
|
|
2058
|
-
return /* @__PURE__ */
|
|
2058
|
+
return /* @__PURE__ */ Y("g", { children: e.data.map((a, o) => {
|
|
2059
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;
|
|
2060
|
-
return /* @__PURE__ */
|
|
2060
|
+
return /* @__PURE__ */ Y("rect", {
|
|
2061
2061
|
className: `chart-bar ${u} ${d ? "animated" : ""} ${f ? "active" : ""}`,
|
|
2062
2062
|
x: c,
|
|
2063
2063
|
y: i.top + l,
|
|
@@ -2076,10 +2076,10 @@ function rn({ data: e, colors: t, innerWidth: n, innerHeight: r, padding: i, xAx
|
|
|
2076
2076
|
//#endregion
|
|
2077
2077
|
//#region src/components/data/MChart/charts/MAreaChart.tsx
|
|
2078
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 }) {
|
|
2079
|
-
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(() => {
|
|
2080
2080
|
let t = e.map((e) => e.data), n = Math.max(...t.map((e) => e.length), 1), r, s;
|
|
2081
|
-
d ? [r, s] =
|
|
2082
|
-
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]);
|
|
2083
2083
|
if (d) {
|
|
2084
2084
|
let e = [];
|
|
2085
2085
|
for (let r = 0; r < t.length; r++) {
|
|
@@ -2098,14 +2098,14 @@ function an({ data: e, colors: t, innerWidth: n, innerHeight: r, padding: i, xAx
|
|
|
2098
2098
|
y: i.top + h(e)
|
|
2099
2099
|
}));
|
|
2100
2100
|
return {
|
|
2101
|
-
area:
|
|
2101
|
+
area: De(r, n === 0 ? t.map((e, t) => ({
|
|
2102
2102
|
x: i.left + m(t),
|
|
2103
2103
|
y: i.top + h(0)
|
|
2104
2104
|
})) : e[n - 1].map((e, t) => ({
|
|
2105
2105
|
x: i.left + m(t),
|
|
2106
2106
|
y: i.top + h(e)
|
|
2107
2107
|
})), u),
|
|
2108
|
-
line: u ?
|
|
2108
|
+
line: u ? Oe(r) : we(r),
|
|
2109
2109
|
topPts: r
|
|
2110
2110
|
};
|
|
2111
2111
|
})
|
|
@@ -2131,7 +2131,7 @@ function an({ data: e, colors: t, innerWidth: n, innerHeight: r, padding: i, xAx
|
|
|
2131
2131
|
d,
|
|
2132
2132
|
u,
|
|
2133
2133
|
i
|
|
2134
|
-
]), E =
|
|
2134
|
+
]), E = W([b, x], [y, 0]), D = W([0, Math.max(C.length - 1, 1)], [0, v]), O = G((r) => {
|
|
2135
2135
|
let a = r.currentTarget.closest("svg");
|
|
2136
2136
|
if (!a) return;
|
|
2137
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));
|
|
@@ -2153,7 +2153,7 @@ function an({ data: e, colors: t, innerWidth: n, innerHeight: r, padding: i, xAx
|
|
|
2153
2153
|
i.left,
|
|
2154
2154
|
n,
|
|
2155
2155
|
m
|
|
2156
|
-
]), k =
|
|
2156
|
+
]), k = G(() => {
|
|
2157
2157
|
_(null), m(null);
|
|
2158
2158
|
}, [m]), A = S.map((e) => i.top + E(e)), j = S.map((e) => ({
|
|
2159
2159
|
position: i.top + E(e),
|
|
@@ -2162,15 +2162,15 @@ function an({ data: e, colors: t, innerWidth: n, innerHeight: r, padding: i, xAx
|
|
|
2162
2162
|
position: i.left + D(t),
|
|
2163
2163
|
label: e
|
|
2164
2164
|
}));
|
|
2165
|
-
return /* @__PURE__ */
|
|
2166
|
-
s && /* @__PURE__ */
|
|
2165
|
+
return /* @__PURE__ */ X("g", { children: [
|
|
2166
|
+
s && /* @__PURE__ */ Y(en, {
|
|
2167
2167
|
x: i.left,
|
|
2168
2168
|
y: i.top,
|
|
2169
2169
|
width: v,
|
|
2170
2170
|
height: y,
|
|
2171
2171
|
horizontalLines: A
|
|
2172
2172
|
}),
|
|
2173
|
-
l && /* @__PURE__ */
|
|
2173
|
+
l && /* @__PURE__ */ Y(tn, {
|
|
2174
2174
|
type: "y",
|
|
2175
2175
|
x: i.left,
|
|
2176
2176
|
y: i.top + y,
|
|
@@ -2178,7 +2178,7 @@ function an({ data: e, colors: t, innerWidth: n, innerHeight: r, padding: i, xAx
|
|
|
2178
2178
|
ticks: j,
|
|
2179
2179
|
title: o?.title
|
|
2180
2180
|
}),
|
|
2181
|
-
c && /* @__PURE__ */
|
|
2181
|
+
c && /* @__PURE__ */ Y(tn, {
|
|
2182
2182
|
type: "x",
|
|
2183
2183
|
x: i.left,
|
|
2184
2184
|
y: i.top + y,
|
|
@@ -2186,11 +2186,11 @@ function an({ data: e, colors: t, innerWidth: n, innerHeight: r, padding: i, xAx
|
|
|
2186
2186
|
ticks: M,
|
|
2187
2187
|
title: a?.title
|
|
2188
2188
|
}),
|
|
2189
|
-
/* @__PURE__ */
|
|
2189
|
+
/* @__PURE__ */ X("g", {
|
|
2190
2190
|
onMouseMove: O,
|
|
2191
2191
|
onMouseLeave: k,
|
|
2192
2192
|
children: [
|
|
2193
|
-
/* @__PURE__ */
|
|
2193
|
+
/* @__PURE__ */ Y("rect", {
|
|
2194
2194
|
x: i.left,
|
|
2195
2195
|
y: i.top,
|
|
2196
2196
|
width: v,
|
|
@@ -2199,25 +2199,25 @@ function an({ data: e, colors: t, innerWidth: n, innerHeight: r, padding: i, xAx
|
|
|
2199
2199
|
}),
|
|
2200
2200
|
d && T ? T.map((n, r) => {
|
|
2201
2201
|
let i = e[r].color ?? t[r % t.length];
|
|
2202
|
-
return /* @__PURE__ */
|
|
2202
|
+
return /* @__PURE__ */ X("g", { children: [/* @__PURE__ */ Y("path", {
|
|
2203
2203
|
className: `chart-area-fill ${i}`,
|
|
2204
2204
|
d: n.area
|
|
2205
|
-
}), /* @__PURE__ */
|
|
2205
|
+
}), /* @__PURE__ */ Y("path", {
|
|
2206
2206
|
className: `chart-line ${i} ${f ? "animated" : ""}`,
|
|
2207
2207
|
d: n.line
|
|
2208
2208
|
})] }, r);
|
|
2209
2209
|
}) : w.map((n, r) => {
|
|
2210
|
-
let a = e[r].color ?? t[r % t.length], o = u ?
|
|
2211
|
-
return /* @__PURE__ */
|
|
2212
|
-
/* @__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", {
|
|
2213
2213
|
className: `chart-area-fill ${a}`,
|
|
2214
2214
|
d: s
|
|
2215
2215
|
}),
|
|
2216
|
-
/* @__PURE__ */
|
|
2216
|
+
/* @__PURE__ */ Y("path", {
|
|
2217
2217
|
className: `chart-line ${a} ${f ? "animated" : ""}`,
|
|
2218
2218
|
d: o
|
|
2219
2219
|
}),
|
|
2220
|
-
n.map((t, n) => /* @__PURE__ */
|
|
2220
|
+
n.map((t, n) => /* @__PURE__ */ Y("circle", {
|
|
2221
2221
|
className: `chart-dot ${a} ${g === n ? "active" : ""}`,
|
|
2222
2222
|
cx: t.x,
|
|
2223
2223
|
cy: t.y,
|
|
@@ -2227,7 +2227,7 @@ function an({ data: e, colors: t, innerWidth: n, innerHeight: r, padding: i, xAx
|
|
|
2227
2227
|
}, n))
|
|
2228
2228
|
] }, r);
|
|
2229
2229
|
}),
|
|
2230
|
-
g !== null && /* @__PURE__ */
|
|
2230
|
+
g !== null && /* @__PURE__ */ Y("line", {
|
|
2231
2231
|
className: "chart-crosshair",
|
|
2232
2232
|
x1: i.left + D(g),
|
|
2233
2233
|
y1: i.top,
|
|
@@ -2241,7 +2241,7 @@ function an({ data: e, colors: t, innerWidth: n, innerHeight: r, padding: i, xAx
|
|
|
2241
2241
|
//#endregion
|
|
2242
2242
|
//#region src/components/data/MChart/charts/MPieChart.tsx
|
|
2243
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 }) {
|
|
2244
|
-
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(() => {
|
|
2245
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;
|
|
2246
2246
|
return n.map((n, o) => {
|
|
2247
2247
|
let s = Math.max(n, 0) / i * Math.PI * 2, c = {
|
|
@@ -2258,7 +2258,7 @@ function on({ data: e, colors: t, innerWidth: n, innerHeight: r, donut: i, donut
|
|
|
2258
2258
|
e,
|
|
2259
2259
|
t,
|
|
2260
2260
|
c
|
|
2261
|
-
]), v =
|
|
2261
|
+
]), v = G((e, t) => {
|
|
2262
2262
|
f(e);
|
|
2263
2263
|
let n = t.currentTarget.closest("svg");
|
|
2264
2264
|
if (!n) return;
|
|
@@ -2273,12 +2273,12 @@ function on({ data: e, colors: t, innerWidth: n, innerHeight: r, donut: i, donut
|
|
|
2273
2273
|
x: t.clientX - r.left,
|
|
2274
2274
|
y: t.clientY - r.top
|
|
2275
2275
|
});
|
|
2276
|
-
}, [_, l]), y =
|
|
2276
|
+
}, [_, l]), y = G(() => {
|
|
2277
2277
|
f(null), l(null);
|
|
2278
2278
|
}, [l]);
|
|
2279
|
-
return /* @__PURE__ */
|
|
2280
|
-
let n = d === t, r =
|
|
2281
|
-
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", {
|
|
2282
2282
|
className: `chart-pie-segment ${e.color} ${o ? "animated" : ""} ${n ? "active" : ""}`,
|
|
2283
2283
|
d: r,
|
|
2284
2284
|
onMouseEnter: (e) => v(t, e),
|
|
@@ -2301,7 +2301,7 @@ function on({ data: e, colors: t, innerWidth: n, innerHeight: r, donut: i, donut
|
|
|
2301
2301
|
onClick: () => u?.(0, t, e.value),
|
|
2302
2302
|
style: { cursor: u ? "pointer" : void 0 }
|
|
2303
2303
|
}, t);
|
|
2304
|
-
}), i && /* @__PURE__ */
|
|
2304
|
+
}), i && /* @__PURE__ */ Y("text", {
|
|
2305
2305
|
x: p,
|
|
2306
2306
|
y: m,
|
|
2307
2307
|
textAnchor: "middle",
|
|
@@ -2324,45 +2324,45 @@ var sn = [
|
|
|
2324
2324
|
"light"
|
|
2325
2325
|
];
|
|
2326
2326
|
function cn() {
|
|
2327
|
-
return /* @__PURE__ */
|
|
2328
|
-
sn.map((e) => /* @__PURE__ */
|
|
2327
|
+
return /* @__PURE__ */ X("defs", { children: [
|
|
2328
|
+
sn.map((e) => /* @__PURE__ */ X("linearGradient", {
|
|
2329
2329
|
id: `chart-bar-grad-${e}`,
|
|
2330
2330
|
x1: "0",
|
|
2331
2331
|
y1: "0",
|
|
2332
2332
|
x2: "0",
|
|
2333
2333
|
y2: "1",
|
|
2334
|
-
children: [/* @__PURE__ */
|
|
2334
|
+
children: [/* @__PURE__ */ Y("stop", {
|
|
2335
2335
|
offset: "0%",
|
|
2336
2336
|
className: `chart-grad-stop-start ${e}`
|
|
2337
|
-
}), /* @__PURE__ */
|
|
2337
|
+
}), /* @__PURE__ */ Y("stop", {
|
|
2338
2338
|
offset: "100%",
|
|
2339
2339
|
className: `chart-grad-stop-end ${e}`
|
|
2340
2340
|
})]
|
|
2341
2341
|
}, `bar-${e}`)),
|
|
2342
|
-
sn.map((e) => /* @__PURE__ */
|
|
2342
|
+
sn.map((e) => /* @__PURE__ */ X("linearGradient", {
|
|
2343
2343
|
id: `chart-pie-grad-${e}`,
|
|
2344
2344
|
x1: "0.3",
|
|
2345
2345
|
y1: "0",
|
|
2346
2346
|
x2: "0.7",
|
|
2347
2347
|
y2: "1",
|
|
2348
|
-
children: [/* @__PURE__ */
|
|
2348
|
+
children: [/* @__PURE__ */ Y("stop", {
|
|
2349
2349
|
offset: "0%",
|
|
2350
2350
|
className: `chart-grad-stop-start ${e}`
|
|
2351
|
-
}), /* @__PURE__ */
|
|
2351
|
+
}), /* @__PURE__ */ Y("stop", {
|
|
2352
2352
|
offset: "100%",
|
|
2353
2353
|
className: `chart-grad-stop-end ${e}`
|
|
2354
2354
|
})]
|
|
2355
2355
|
}, `pie-${e}`)),
|
|
2356
|
-
sn.map((e) => /* @__PURE__ */
|
|
2356
|
+
sn.map((e) => /* @__PURE__ */ X("linearGradient", {
|
|
2357
2357
|
id: `chart-area-grad-${e}`,
|
|
2358
2358
|
x1: "0",
|
|
2359
2359
|
y1: "0",
|
|
2360
2360
|
x2: "0",
|
|
2361
2361
|
y2: "1",
|
|
2362
|
-
children: [/* @__PURE__ */
|
|
2362
|
+
children: [/* @__PURE__ */ Y("stop", {
|
|
2363
2363
|
offset: "0%",
|
|
2364
2364
|
className: `chart-grad-area-start ${e}`
|
|
2365
|
-
}), /* @__PURE__ */
|
|
2365
|
+
}), /* @__PURE__ */ Y("stop", {
|
|
2366
2366
|
offset: "100%",
|
|
2367
2367
|
className: `chart-grad-area-end ${e}`
|
|
2368
2368
|
})]
|
|
@@ -2372,24 +2372,24 @@ function cn() {
|
|
|
2372
2372
|
//#endregion
|
|
2373
2373
|
//#region src/components/data/MChart/parts/ChartTooltip.tsx
|
|
2374
2374
|
function ln({ data: e, valueFormatter: t }) {
|
|
2375
|
-
return e ? /* @__PURE__ */
|
|
2375
|
+
return e ? /* @__PURE__ */ X("div", {
|
|
2376
2376
|
className: "chart-tooltip",
|
|
2377
2377
|
style: {
|
|
2378
2378
|
left: e.x,
|
|
2379
2379
|
top: e.y
|
|
2380
2380
|
},
|
|
2381
|
-
children: [/* @__PURE__ */
|
|
2381
|
+
children: [/* @__PURE__ */ Y("div", {
|
|
2382
2382
|
className: "chart-tooltip-label",
|
|
2383
2383
|
children: e.label
|
|
2384
|
-
}), e.items.map((e, n) => /* @__PURE__ */
|
|
2384
|
+
}), e.items.map((e, n) => /* @__PURE__ */ X("div", {
|
|
2385
2385
|
className: "chart-tooltip-row",
|
|
2386
2386
|
children: [
|
|
2387
|
-
/* @__PURE__ */
|
|
2388
|
-
/* @__PURE__ */
|
|
2387
|
+
/* @__PURE__ */ Y("span", { className: `chart-tooltip-dot ${e.color}` }),
|
|
2388
|
+
/* @__PURE__ */ Y("span", {
|
|
2389
2389
|
className: "chart-tooltip-name",
|
|
2390
2390
|
children: e.name
|
|
2391
2391
|
}),
|
|
2392
|
-
/* @__PURE__ */
|
|
2392
|
+
/* @__PURE__ */ Y("span", {
|
|
2393
2393
|
className: "chart-tooltip-value",
|
|
2394
2394
|
children: t(e.value)
|
|
2395
2395
|
})
|
|
@@ -2400,11 +2400,11 @@ function ln({ data: e, valueFormatter: t }) {
|
|
|
2400
2400
|
//#endregion
|
|
2401
2401
|
//#region src/components/data/MChart/parts/ChartLegend.tsx
|
|
2402
2402
|
function un({ items: e }) {
|
|
2403
|
-
return e.length <= 1 ? null : /* @__PURE__ */
|
|
2403
|
+
return e.length <= 1 ? null : /* @__PURE__ */ Y("div", {
|
|
2404
2404
|
className: "chart-legend",
|
|
2405
|
-
children: e.map((e, t) => /* @__PURE__ */
|
|
2405
|
+
children: e.map((e, t) => /* @__PURE__ */ X("div", {
|
|
2406
2406
|
className: "chart-legend-item",
|
|
2407
|
-
children: [/* @__PURE__ */
|
|
2407
|
+
children: [/* @__PURE__ */ Y("span", { className: `chart-legend-dot ${e.color}` }), /* @__PURE__ */ Y("span", {
|
|
2408
2408
|
className: "chart-legend-label",
|
|
2409
2409
|
children: e.label
|
|
2410
2410
|
})]
|
|
@@ -2414,9 +2414,9 @@ function un({ items: e }) {
|
|
|
2414
2414
|
//#endregion
|
|
2415
2415
|
//#region src/components/data/MChart/MChart.tsx
|
|
2416
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 }) {
|
|
2417
|
-
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) => {
|
|
2418
2418
|
d && T(e);
|
|
2419
|
-
}, [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) => ({
|
|
2420
2420
|
label: e,
|
|
2421
2421
|
color: E[t % E.length]
|
|
2422
2422
|
})) : t.map((e, t) => ({
|
|
@@ -2443,7 +2443,7 @@ function dn({ type: e, data: t, width: n = "100%", height: r = 300, aspectRatio:
|
|
|
2443
2443
|
onTooltip: A,
|
|
2444
2444
|
onDataClick: y
|
|
2445
2445
|
};
|
|
2446
|
-
return /* @__PURE__ */
|
|
2446
|
+
return /* @__PURE__ */ X("div", {
|
|
2447
2447
|
ref: C,
|
|
2448
2448
|
className: I("chart", b),
|
|
2449
2449
|
style: {
|
|
@@ -2454,44 +2454,44 @@ function dn({ type: e, data: t, width: n = "100%", height: r = 300, aspectRatio:
|
|
|
2454
2454
|
},
|
|
2455
2455
|
...S,
|
|
2456
2456
|
children: [
|
|
2457
|
-
/* @__PURE__ */
|
|
2457
|
+
/* @__PURE__ */ X("svg", {
|
|
2458
2458
|
viewBox: `0 0 600 ${k}`,
|
|
2459
2459
|
preserveAspectRatio: "xMidYMid meet",
|
|
2460
2460
|
className: "chart-svg",
|
|
2461
2461
|
children: [
|
|
2462
|
-
/* @__PURE__ */
|
|
2463
|
-
e === "line" && /* @__PURE__ */
|
|
2462
|
+
/* @__PURE__ */ Y(cn, {}),
|
|
2463
|
+
e === "line" && /* @__PURE__ */ Y(nn, {
|
|
2464
2464
|
...M,
|
|
2465
2465
|
curved: m
|
|
2466
2466
|
}),
|
|
2467
|
-
e === "bar" && /* @__PURE__ */
|
|
2467
|
+
e === "bar" && /* @__PURE__ */ Y(rn, {
|
|
2468
2468
|
...M,
|
|
2469
2469
|
stacked: p
|
|
2470
2470
|
}),
|
|
2471
|
-
e === "area" && /* @__PURE__ */
|
|
2471
|
+
e === "area" && /* @__PURE__ */ Y(an, {
|
|
2472
2472
|
...M,
|
|
2473
2473
|
curved: m,
|
|
2474
2474
|
stacked: p
|
|
2475
2475
|
}),
|
|
2476
|
-
e === "pie" && /* @__PURE__ */
|
|
2476
|
+
e === "pie" && /* @__PURE__ */ Y(on, {
|
|
2477
2477
|
...M,
|
|
2478
2478
|
donut: h,
|
|
2479
2479
|
donutWidth: g
|
|
2480
2480
|
})
|
|
2481
2481
|
]
|
|
2482
2482
|
}),
|
|
2483
|
-
d && /* @__PURE__ */
|
|
2483
|
+
d && /* @__PURE__ */ Y(ln, {
|
|
2484
2484
|
data: w,
|
|
2485
2485
|
valueFormatter: _
|
|
2486
2486
|
}),
|
|
2487
|
-
u && /* @__PURE__ */
|
|
2487
|
+
u && /* @__PURE__ */ Y(un, { items: j })
|
|
2488
2488
|
]
|
|
2489
2489
|
});
|
|
2490
2490
|
}
|
|
2491
2491
|
//#endregion
|
|
2492
2492
|
//#region src/components/data/MChart/MLineChart.tsx
|
|
2493
2493
|
function fn(e) {
|
|
2494
|
-
return /* @__PURE__ */
|
|
2494
|
+
return /* @__PURE__ */ Y(dn, {
|
|
2495
2495
|
type: "line",
|
|
2496
2496
|
...e
|
|
2497
2497
|
});
|
|
@@ -2499,7 +2499,7 @@ function fn(e) {
|
|
|
2499
2499
|
//#endregion
|
|
2500
2500
|
//#region src/components/data/MChart/MBarChart.tsx
|
|
2501
2501
|
function pn(e) {
|
|
2502
|
-
return /* @__PURE__ */
|
|
2502
|
+
return /* @__PURE__ */ Y(dn, {
|
|
2503
2503
|
type: "bar",
|
|
2504
2504
|
...e
|
|
2505
2505
|
});
|
|
@@ -2507,7 +2507,7 @@ function pn(e) {
|
|
|
2507
2507
|
//#endregion
|
|
2508
2508
|
//#region src/components/data/MChart/MAreaChart.tsx
|
|
2509
2509
|
function mn(e) {
|
|
2510
|
-
return /* @__PURE__ */
|
|
2510
|
+
return /* @__PURE__ */ Y(dn, {
|
|
2511
2511
|
type: "area",
|
|
2512
2512
|
...e
|
|
2513
2513
|
});
|
|
@@ -2515,12 +2515,12 @@ function mn(e) {
|
|
|
2515
2515
|
//#endregion
|
|
2516
2516
|
//#region src/components/data/MChart/MPieChart.tsx
|
|
2517
2517
|
function hn(e) {
|
|
2518
|
-
return /* @__PURE__ */
|
|
2518
|
+
return /* @__PURE__ */ Y(dn, {
|
|
2519
2519
|
type: "pie",
|
|
2520
2520
|
...e
|
|
2521
2521
|
});
|
|
2522
2522
|
}
|
|
2523
2523
|
//#endregion
|
|
2524
|
-
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 };
|
|
2525
2525
|
|
|
2526
|
-
//# sourceMappingURL=data-
|
|
2526
|
+
//# sourceMappingURL=data-s8Hkht1B.js.map
|