@mintplayer/web-components 2.8.0 → 2.9.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/chunks/ac-C5mj7mOe.mjs +5 -0
- package/chunks/ad-DuKUeTXh.mjs +5 -0
- package/chunks/ae-BFJrplpe.mjs +5 -0
- package/chunks/af-BIQlNFtj.mjs +5 -0
- package/chunks/ag-B9GDO0Ip.mjs +5 -0
- package/chunks/ai-pifHTP5K.mjs +5 -0
- package/chunks/al-CWQ3OuN9.mjs +5 -0
- package/chunks/all-flags-BtYcfgjy.mjs +8 -0
- package/chunks/all-flags.generated-B7Rctzuq.mjs +493 -0
- package/chunks/am-Do56ciQl.mjs +5 -0
- package/chunks/ao-Ci_fen-O.mjs +5 -0
- package/chunks/ar-BEZTIgF7.mjs +5 -0
- package/chunks/as-B29efaG_.mjs +5 -0
- package/chunks/at-c7xv31cV.mjs +5 -0
- package/chunks/au-DK4ZROf6.mjs +5 -0
- package/chunks/aw-eEmOo-kc.mjs +5 -0
- package/chunks/ax-CF1cgQbd.mjs +5 -0
- package/chunks/az-BXPec7pf.mjs +5 -0
- package/chunks/ba-EoocSiX0.mjs +5 -0
- package/chunks/bb-BomyOgY0.mjs +5 -0
- package/chunks/bd-C2Y9A316.mjs +5 -0
- package/chunks/be-DcE56El1.mjs +5 -0
- package/chunks/bf-g7XzTHJG.mjs +5 -0
- package/chunks/bg-DAHpwJAh.mjs +5 -0
- package/chunks/bh-BiHF8vqO.mjs +5 -0
- package/chunks/bi-DVAoOy2o.mjs +5 -0
- package/chunks/bj-CB6I0T1J.mjs +5 -0
- package/chunks/bl-DhUObXcB.mjs +5 -0
- package/chunks/bm-d77E6A-Q.mjs +5 -0
- package/chunks/bn-CG1_6Vfv.mjs +5 -0
- package/chunks/bo-ulcQ_Lws.mjs +5 -0
- package/chunks/bq-wOjRpmJJ.mjs +5 -0
- package/chunks/br-BwQAEpKL.mjs +5 -0
- package/chunks/bs-Cmq3uDf9.mjs +5 -0
- package/chunks/bt-Cik-3ebf.mjs +5 -0
- package/chunks/bw-ZUkpxAL1.mjs +5 -0
- package/chunks/by-Dh-5h5x1.mjs +5 -0
- package/chunks/bz-DB0s7-5N.mjs +5 -0
- package/chunks/ca-Coq88_mc.mjs +5 -0
- package/chunks/cc-1.generated-CkRogBGA.mjs +4 -0
- package/chunks/cc-20.generated-DMpg7apl.mjs +4 -0
- package/chunks/cc-211.generated-DSnuuKPM.mjs +4 -0
- package/chunks/cc-212.generated-Dcg3rrip.mjs +4 -0
- package/chunks/cc-213.generated-DPwtGlxT.mjs +4 -0
- package/chunks/cc-216.generated-Cgber7dX.mjs +4 -0
- package/chunks/cc-218.generated-CZGwxl9D.mjs +4 -0
- package/chunks/cc-220.generated-CKmXmpGe.mjs +4 -0
- package/chunks/cc-221.generated-BYzgBejl.mjs +4 -0
- package/chunks/cc-222.generated-YwuXcbvd.mjs +4 -0
- package/chunks/cc-223.generated-9iiHnni6.mjs +4 -0
- package/chunks/cc-224.generated-Okty02TJ.mjs +4 -0
- package/chunks/cc-225.generated-CYkDnG14.mjs +4 -0
- package/chunks/cc-226.generated-GT_rqbCO.mjs +4 -0
- package/chunks/cc-227.generated-B1VkrgoB.mjs +4 -0
- package/chunks/cc-228.generated-Bhck-C6Z.mjs +4 -0
- package/chunks/cc-229.generated-aAR4PP7n.mjs +4 -0
- package/chunks/cc-230.generated-CG5TxZtb.mjs +4 -0
- package/chunks/cc-231.generated-BjYHl_BP.mjs +4 -0
- package/chunks/cc-232.generated-CFDyaA7o.mjs +4 -0
- package/chunks/cc-233.generated-ChwvrW0E.mjs +4 -0
- package/chunks/cc-234.generated-BIpIojaD.mjs +4 -0
- package/chunks/cc-235.generated-Dklizfb9.mjs +4 -0
- package/chunks/cc-236.generated-EJZlz23v.mjs +4 -0
- package/chunks/cc-237.generated-DwOapZWZ.mjs +4 -0
- package/chunks/cc-238.generated-BkCWtGDY.mjs +4 -0
- package/chunks/cc-239.generated-S_foXUit.mjs +4 -0
- package/chunks/cc-240.generated-CtKfcEWk.mjs +4 -0
- package/chunks/cc-241.generated-aAUw2QzS.mjs +4 -0
- package/chunks/cc-242.generated-D5jMR3KR.mjs +4 -0
- package/chunks/cc-243.generated-Bk5dwdUf.mjs +4 -0
- package/chunks/cc-244.generated-DywGvISM.mjs +4 -0
- package/chunks/cc-245.generated-Bm7wVXl5.mjs +4 -0
- package/chunks/cc-246.generated-CFSezynW.mjs +4 -0
- package/chunks/cc-247.generated-DKXGq8p1.mjs +4 -0
- package/chunks/cc-248.generated-CnI_kkbi.mjs +4 -0
- package/chunks/cc-249.generated-Zenj8WBl.mjs +4 -0
- package/chunks/cc-250.generated-140A9gFx.mjs +4 -0
- package/chunks/cc-251.generated-BYtVzI1w.mjs +4 -0
- package/chunks/cc-252.generated-C9By3_Ih.mjs +4 -0
- package/chunks/cc-253.generated-DZIADgzo.mjs +4 -0
- package/chunks/cc-254.generated-Bkb5VbuX.mjs +4 -0
- package/chunks/cc-255.generated-U_k4UlnG.mjs +4 -0
- package/chunks/cc-256.generated-BBGMRLJL.mjs +4 -0
- package/chunks/cc-257.generated-2Jiadm-X.mjs +4 -0
- package/chunks/cc-258.generated-CSHZFQtI.mjs +4 -0
- package/chunks/cc-260.generated-CWgOLjv4.mjs +4 -0
- package/chunks/cc-261.generated-DzpnYK1v.mjs +4 -0
- package/chunks/cc-262.generated-uZY0cJ08.mjs +4 -0
- package/chunks/cc-263.generated-D2QbPttm.mjs +4 -0
- package/chunks/cc-264.generated-DhUT_yRg.mjs +4 -0
- package/chunks/cc-265.generated-BKIU4vGv.mjs +4 -0
- package/chunks/cc-266.generated-O_zgqaDo.mjs +4 -0
- package/chunks/cc-267.generated-DpLBLCK1.mjs +4 -0
- package/chunks/cc-268.generated-B9Y4LS_4.mjs +4 -0
- package/chunks/cc-269.generated-DPQ0A8VW.mjs +4 -0
- package/chunks/cc-27.generated-BxeFhsuD.mjs +4 -0
- package/chunks/cc-290.generated-DGy2isg7.mjs +4 -0
- package/chunks/cc-291.generated-C4LSfffl.mjs +4 -0
- package/chunks/cc-297.generated-4k_1JOUj.mjs +4 -0
- package/chunks/cc-298.generated-A2xB0PKR.mjs +4 -0
- package/chunks/cc-299.generated-BwDC9B1N.mjs +4 -0
- package/chunks/cc-30.generated-JhyYglqU.mjs +4 -0
- package/chunks/cc-31.generated-5GOCJzfN.mjs +4 -0
- package/chunks/cc-32.generated-CpVvykA2.mjs +4 -0
- package/chunks/cc-33.generated-BDzHxbR_.mjs +4 -0
- package/chunks/cc-34.generated-P3nQfhBw.mjs +4 -0
- package/chunks/cc-350.generated-BGl8hYsP.mjs +4 -0
- package/chunks/cc-351.generated-pJBouwSG.mjs +4 -0
- package/chunks/cc-352.generated-8_NbdAx6.mjs +4 -0
- package/chunks/cc-353.generated-Cfz2tBdq.mjs +4 -0
- package/chunks/cc-354.generated-CEgaa6qB.mjs +4 -0
- package/chunks/cc-355.generated-DGZ-kJ0i.mjs +4 -0
- package/chunks/cc-356.generated-BZqLs86A.mjs +4 -0
- package/chunks/cc-357.generated-CfCB5cHL.mjs +4 -0
- package/chunks/cc-358.generated-wL2JzNDk.mjs +4 -0
- package/chunks/cc-359.generated-BxJe3xGt.mjs +4 -0
- package/chunks/cc-36.generated-CJdA4Rvi.mjs +4 -0
- package/chunks/cc-370.generated-B6SpL74q.mjs +4 -0
- package/chunks/cc-371.generated-Cx6lrGG9.mjs +4 -0
- package/chunks/cc-372.generated-Ckc30SHu.mjs +4 -0
- package/chunks/cc-373.generated-BK0ypz55.mjs +4 -0
- package/chunks/cc-374.generated-B51ogwAh.mjs +4 -0
- package/chunks/cc-375.generated-CMbmbMav.mjs +4 -0
- package/chunks/cc-376.generated-DZngLeqA.mjs +4 -0
- package/chunks/cc-377.generated-BYuCOf7K.mjs +4 -0
- package/chunks/cc-378.generated-CuNlUjOw.mjs +4 -0
- package/chunks/cc-380.generated-A2e4FwA4.mjs +4 -0
- package/chunks/cc-381.generated-Cvwf7aDo.mjs +4 -0
- package/chunks/cc-382.generated-B-x4jIQ_.mjs +4 -0
- package/chunks/cc-383.generated-B6E63WN4.mjs +4 -0
- package/chunks/cc-385.generated-CbYlsCsW.mjs +4 -0
- package/chunks/cc-386.generated-BUSyzthQ.mjs +4 -0
- package/chunks/cc-387.generated-IhkhnsGu.mjs +4 -0
- package/chunks/cc-389.generated-SNuHIdqu.mjs +4 -0
- package/chunks/cc-39.generated-BGZK1sVL.mjs +4 -0
- package/chunks/cc-40.generated-Bo8WnsNc.mjs +4 -0
- package/chunks/cc-41.generated-CG0098r3.mjs +4 -0
- package/chunks/cc-420.generated-C59jh2M8.mjs +4 -0
- package/chunks/cc-421.generated-BhxO-pTK.mjs +4 -0
- package/chunks/cc-423.generated-B4UJk2xr.mjs +4 -0
- package/chunks/cc-43.generated-BIdhhcvA.mjs +4 -0
- package/chunks/cc-44.generated-BfeK0wEP.mjs +4 -0
- package/chunks/cc-45.generated-BEJCwF4o.mjs +4 -0
- package/chunks/cc-46.generated-DeEMtTcI.mjs +4 -0
- package/chunks/cc-47.generated-DQy2Xk_0.mjs +4 -0
- package/chunks/cc-48.generated-C4yA7R1Q.mjs +4 -0
- package/chunks/cc-49.generated-a02djmT4.mjs +4 -0
- package/chunks/cc-500.generated-glAZ4AUe.mjs +4 -0
- package/chunks/cc-501.generated-D-GCAbI8.mjs +4 -0
- package/chunks/cc-502.generated-Co-n0usI.mjs +4 -0
- package/chunks/cc-503.generated-BM58qC_M.mjs +4 -0
- package/chunks/cc-504.generated-cTtfXvjR.mjs +4 -0
- package/chunks/cc-505.generated-DLSKmmzY.mjs +4 -0
- package/chunks/cc-506.generated-BMyMgwgZ.mjs +4 -0
- package/chunks/cc-507.generated-DWOdIJMd.mjs +4 -0
- package/chunks/cc-508.generated-DN3D0FwY.mjs +4 -0
- package/chunks/cc-509.generated-D-jyniz5.mjs +4 -0
- package/chunks/cc-51.generated-Bjy1G3kG.mjs +4 -0
- package/chunks/cc-52.generated-CDeO-q1n.mjs +4 -0
- package/chunks/cc-53.generated-Bg_ETBvx.mjs +4 -0
- package/chunks/cc-54.generated-BCfSFUZP.mjs +4 -0
- package/chunks/cc-55.generated-C1iLoSl1.mjs +4 -0
- package/chunks/cc-56.generated-ChgDDlud.mjs +4 -0
- package/chunks/cc-57.generated-qfDFimii.mjs +4 -0
- package/chunks/cc-58.generated-Cl6DzTam.mjs +4 -0
- package/chunks/cc-590.generated-DhG2cP7S.mjs +4 -0
- package/chunks/cc-591.generated-CjxsaggL.mjs +4 -0
- package/chunks/cc-592.generated-DnF2AtPs.mjs +4 -0
- package/chunks/cc-593.generated-J4b4KU_z.mjs +4 -0
- package/chunks/cc-594.generated-BDqHqvBX.mjs +4 -0
- package/chunks/cc-595.generated-Di23-NWq.mjs +4 -0
- package/chunks/cc-596.generated-B92oLPvz.mjs +4 -0
- package/chunks/cc-597.generated-pdvIpWWG.mjs +4 -0
- package/chunks/cc-598.generated-C9i6NuuS.mjs +4 -0
- package/chunks/cc-599.generated-Cot_Tjya.mjs +4 -0
- package/chunks/cc-60.generated-Dt21L5ED.mjs +4 -0
- package/chunks/cc-61.generated-CsF19uOz.mjs +4 -0
- package/chunks/cc-62.generated-CXe9l8jN.mjs +4 -0
- package/chunks/cc-63.generated-CyxqKEMz.mjs +4 -0
- package/chunks/cc-64.generated-B1U2VUWE.mjs +4 -0
- package/chunks/cc-65.generated-BqB9SL91.mjs +4 -0
- package/chunks/cc-66.generated-DSW4cKRJ.mjs +4 -0
- package/chunks/cc-670.generated-B5lMBLIA.mjs +4 -0
- package/chunks/cc-672.generated-rtLnRViR.mjs +4 -0
- package/chunks/cc-673.generated-CCfKxiHb.mjs +4 -0
- package/chunks/cc-674.generated-DqEenJAu.mjs +4 -0
- package/chunks/cc-675.generated-CDZsNVmA.mjs +4 -0
- package/chunks/cc-676.generated-CtuzuSpR.mjs +4 -0
- package/chunks/cc-677.generated-B6Vdcheb.mjs +4 -0
- package/chunks/cc-678.generated-Bu-wQLCv.mjs +4 -0
- package/chunks/cc-679.generated-C_vQNfa9.mjs +4 -0
- package/chunks/cc-680.generated-DgD0sTpR.mjs +4 -0
- package/chunks/cc-681.generated-CgCDLpTf.mjs +4 -0
- package/chunks/cc-682.generated-BBdb0LCA.mjs +4 -0
- package/chunks/cc-683.generated-BYq9qGSN.mjs +4 -0
- package/chunks/cc-685.generated-BeVt0xOD.mjs +4 -0
- package/chunks/cc-686.generated-DSuHUyGC.mjs +4 -0
- package/chunks/cc-687.generated-CAYCkQGn.mjs +4 -0
- package/chunks/cc-688.generated-BxoYuhyI.mjs +4 -0
- package/chunks/cc-689.generated-D1LJPuEc.mjs +4 -0
- package/chunks/cc-690.generated-wBJlIR_d.mjs +4 -0
- package/chunks/cc-691.generated-D3313DJE.mjs +4 -0
- package/chunks/cc-692.generated-BjRLK6LH.mjs +4 -0
- package/chunks/cc-7.generated-Be8Per3z.mjs +4 -0
- package/chunks/cc-81.generated-Bfr_1Ik4.mjs +4 -0
- package/chunks/cc-82.generated-CXvQgAj0.mjs +4 -0
- package/chunks/cc-84.generated-DsMrssxQ.mjs +4 -0
- package/chunks/cc-850.generated-B6dMNsJB.mjs +4 -0
- package/chunks/cc-852.generated-DoLs1jmz.mjs +4 -0
- package/chunks/cc-853.generated-C9J4qDF6.mjs +4 -0
- package/chunks/cc-855.generated-rriF89dH.mjs +4 -0
- package/chunks/cc-856.generated-DWMBTBFS.mjs +4 -0
- package/chunks/cc-86.generated-C8Ob3yVb.mjs +4 -0
- package/chunks/cc-880.generated-gteZx8SL.mjs +4 -0
- package/chunks/cc-886.generated-QyIDP1_q.mjs +4 -0
- package/chunks/cc-90.generated-DSXR50SV.mjs +4 -0
- package/chunks/cc-91.generated-C_cDq0Xp.mjs +4 -0
- package/chunks/cc-92.generated-Cxd7f_QX.mjs +4 -0
- package/chunks/cc-93.generated-Cyqo0e91.mjs +4 -0
- package/chunks/cc-94.generated-EsnmfbnH.mjs +4 -0
- package/chunks/cc-95.generated-D_8p55mp.mjs +4 -0
- package/chunks/cc-960.generated-DletKApH.mjs +4 -0
- package/chunks/cc-961.generated-CXVHoWFk.mjs +4 -0
- package/chunks/cc-962.generated-B7EPSakT.mjs +4 -0
- package/chunks/cc-963.generated-D71Y75mr.mjs +4 -0
- package/chunks/cc-964.generated-B8-RYrVD.mjs +4 -0
- package/chunks/cc-965.generated-tesjPkaP.mjs +4 -0
- package/chunks/cc-966.generated-CkCCmcR2.mjs +4 -0
- package/chunks/cc-967.generated-Bz1kG3rR.mjs +4 -0
- package/chunks/cc-968.generated-B8izDjLu.mjs +4 -0
- package/chunks/cc-970.generated-CKTkdIET.mjs +4 -0
- package/chunks/cc-971.generated-Wzj17K10.mjs +4 -0
- package/chunks/cc-972.generated-CJO02ZmJ.mjs +4 -0
- package/chunks/cc-973.generated-CL9ZE2Of.mjs +4 -0
- package/chunks/cc-974.generated-ZkYqGi9L.mjs +4 -0
- package/chunks/cc-975.generated-DP2Teiuc.mjs +4 -0
- package/chunks/cc-976.generated-GGNMRuFQ.mjs +4 -0
- package/chunks/cc-977.generated-KwvwlHUw.mjs +4 -0
- package/chunks/cc-98.generated-DW-Wj2k5.mjs +4 -0
- package/chunks/cc-992.generated-NRREmly7.mjs +4 -0
- package/chunks/cc-993.generated-BNlup4k-.mjs +4 -0
- package/chunks/cc-994.generated-BUD4e8ho.mjs +4 -0
- package/chunks/cc-995.generated-8P4TnVbi.mjs +4 -0
- package/chunks/cc-996.generated-CKCe7foO.mjs +4 -0
- package/chunks/cc-998.generated-CsAmnJYd.mjs +4 -0
- package/chunks/cc-BZdCRpNT.mjs +5 -0
- package/chunks/cd-9O28tBfy.mjs +5 -0
- package/chunks/cf-BdhmyWlv.mjs +5 -0
- package/chunks/cg-C-Qu4NMU.mjs +5 -0
- package/chunks/ch-A1RQVYLO.mjs +5 -0
- package/chunks/ci-DZY7fgO7.mjs +5 -0
- package/chunks/ck-D-2C9a72.mjs +5 -0
- package/chunks/cl-3HNgrmyT.mjs +5 -0
- package/chunks/cm-DJ4mixO9.mjs +5 -0
- package/chunks/cn-Cw6Qlqzd.mjs +5 -0
- package/chunks/co-B6rvgyRo.mjs +5 -0
- package/chunks/cr-jJzoBrc7.mjs +5 -0
- package/chunks/cu-BRzz3vV_.mjs +5 -0
- package/chunks/cv-BzZilEMp.mjs +5 -0
- package/chunks/cw-5PnLdxCt.mjs +5 -0
- package/chunks/cx-C0sAUlCS.mjs +5 -0
- package/chunks/cy-DeC9FFGV.mjs +5 -0
- package/chunks/cz-C3rh8aUO.mjs +5 -0
- package/chunks/de-Q2c2XZ_v.mjs +5 -0
- package/chunks/dj-DWAmmYDE.mjs +5 -0
- package/chunks/dk-FTaySAJe.mjs +5 -0
- package/chunks/dm-DgSJioJq.mjs +5 -0
- package/chunks/do-C549n3on.mjs +5 -0
- package/chunks/dz-CPgKocaY.mjs +5 -0
- package/chunks/ec-DkC-cDOb.mjs +5 -0
- package/chunks/ee-BQmFOHXA.mjs +5 -0
- package/chunks/eg-DMVarwMR.mjs +5 -0
- package/chunks/eh--oxmiCXh.mjs +5 -0
- package/chunks/er-DjB_DDiD.mjs +5 -0
- package/chunks/es-D__9e8wL.mjs +5 -0
- package/chunks/et-C3reU7Z2.mjs +5 -0
- package/chunks/fi-C1K0Kh4o.mjs +5 -0
- package/chunks/fj-Cs7ECsE1.mjs +5 -0
- package/chunks/fk-DYEJDgjs.mjs +5 -0
- package/chunks/fm-C7r_OFnj.mjs +5 -0
- package/chunks/fo-DsT-wW0Q.mjs +5 -0
- package/chunks/form-control.styles-BOTBdmvg.mjs +171 -0
- package/chunks/fr-oy8Uo1bo.mjs +5 -0
- package/chunks/ga-DESElBvk.mjs +5 -0
- package/chunks/gb-D5r9QI-K.mjs +5 -0
- package/chunks/gd-BuRviRXt.mjs +5 -0
- package/chunks/ge-BpGz5nUs.mjs +5 -0
- package/chunks/gf-BQgWe_yS.mjs +5 -0
- package/chunks/gg-BLNQrqls.mjs +5 -0
- package/chunks/gh-BzVF8tSr.mjs +5 -0
- package/chunks/gi-DfKOJdRQ.mjs +5 -0
- package/chunks/gl-C558Toee.mjs +5 -0
- package/chunks/gm-DNdinxnD.mjs +5 -0
- package/chunks/gn-DwEBOZ3-.mjs +5 -0
- package/chunks/gp-oy8Uo1bo.mjs +5 -0
- package/chunks/gq-BSkOSQWe.mjs +5 -0
- package/chunks/gr-CTJJbGEC.mjs +5 -0
- package/chunks/gt-D4BwgazI.mjs +5 -0
- package/chunks/gu-CQpMzEB_.mjs +5 -0
- package/chunks/gw-DxZDYMtv.mjs +5 -0
- package/chunks/gy-BWZVUGl8.mjs +5 -0
- package/chunks/hk-BHxjZMf4.mjs +5 -0
- package/chunks/hn-BEVgQ0QQ.mjs +5 -0
- package/chunks/hr-BpVWlAoF.mjs +5 -0
- package/chunks/ht-CfzU-07O.mjs +5 -0
- package/chunks/hu-5Yy5WRy5.mjs +5 -0
- package/chunks/id-BfVg05v7.mjs +5 -0
- package/chunks/ie-DvpkJVl8.mjs +5 -0
- package/chunks/il-DDofIlI0.mjs +5 -0
- package/chunks/im-CW65ei4K.mjs +5 -0
- package/chunks/in-i60GVnCJ.mjs +5 -0
- package/chunks/io-Diyu5soM.mjs +5 -0
- package/chunks/iq-B74bFnMJ.mjs +5 -0
- package/chunks/ir-BWGwwJq9.mjs +5 -0
- package/chunks/is-CK4oIk76.mjs +5 -0
- package/chunks/it-Y7rj3hMY.mjs +5 -0
- package/chunks/je-DMoX3evy.mjs +5 -0
- package/chunks/jm-DZUStFkR.mjs +5 -0
- package/chunks/jo-DVQ6-ojE.mjs +5 -0
- package/chunks/jp-Y5R0MQfN.mjs +5 -0
- package/chunks/ke-CGq6XP7w.mjs +5 -0
- package/chunks/kg-DAoQwbeR.mjs +5 -0
- package/chunks/kh-kMI7MghQ.mjs +5 -0
- package/chunks/ki-Cu7fdPLn.mjs +5 -0
- package/chunks/km-CM7URKBO.mjs +5 -0
- package/chunks/kn-DBVGPz8w.mjs +5 -0
- package/chunks/kp-D3Ea15h2.mjs +5 -0
- package/chunks/kr-DKM0Jy7P.mjs +5 -0
- package/chunks/kw-B7J-nbX9.mjs +5 -0
- package/chunks/ky-p4ckNq_W.mjs +5 -0
- package/chunks/kz-D936idA9.mjs +5 -0
- package/chunks/la-CUKVKbGp.mjs +5 -0
- package/chunks/lb-CzUWz90e.mjs +5 -0
- package/chunks/lc-DuHqL5FW.mjs +5 -0
- package/chunks/li-DgJDzs_F.mjs +5 -0
- package/chunks/lk-3zaagaQ9.mjs +5 -0
- package/chunks/lr-B6Vn6C_9.mjs +5 -0
- package/chunks/ls-DrI0Fh7Y.mjs +5 -0
- package/chunks/lt-PBck9Sgv.mjs +5 -0
- package/chunks/lu-B_xY22fB.mjs +5 -0
- package/chunks/lv-D16yLm3v.mjs +5 -0
- package/chunks/ly-C1adX4Zr.mjs +5 -0
- package/chunks/ma-B7rH3zoW.mjs +5 -0
- package/chunks/mc-Xqh4jc6i.mjs +5 -0
- package/chunks/md-wW4zZzbN.mjs +5 -0
- package/chunks/me-DCy_XMtC.mjs +5 -0
- package/chunks/metadata-loaders.generated-Bu_7pFwU.mjs +250 -0
- package/chunks/mf-DP_tIA6i.mjs +5 -0
- package/chunks/mg-InflpHX7.mjs +5 -0
- package/chunks/mh-VKf434Ww.mjs +5 -0
- package/chunks/mk-C64VS9I-.mjs +5 -0
- package/chunks/ml-BjOQYgou.mjs +5 -0
- package/chunks/mm-DgKeX7WQ.mjs +5 -0
- package/chunks/mn-BBubqCvd.mjs +5 -0
- package/chunks/mo-BtY-l2cE.mjs +5 -0
- package/chunks/mp-DlkcjH8B.mjs +5 -0
- package/chunks/mp-input-group-Bf9a9Xut.mjs +193 -0
- package/chunks/{mp-select-CKX0eM5C.mjs → mp-select-lHP00OBH.mjs} +177 -33
- package/chunks/mq-BK7HwZSV.mjs +5 -0
- package/chunks/mr-C0S-6dqR.mjs +5 -0
- package/chunks/ms-DpwSSTE-.mjs +5 -0
- package/chunks/mt-B1ie-04J.mjs +5 -0
- package/chunks/mu-DTA25SEP.mjs +5 -0
- package/chunks/mv-DW49amZl.mjs +5 -0
- package/chunks/mw-V-bbqGPN.mjs +5 -0
- package/chunks/mx-CtTJw0SX.mjs +5 -0
- package/chunks/my-DThIQKCq.mjs +5 -0
- package/chunks/mz-Btgk8Li_.mjs +5 -0
- package/chunks/na-D08-xA7q.mjs +5 -0
- package/chunks/nc-hb1s2KqL.mjs +5 -0
- package/chunks/ne-B5vEjeNk.mjs +5 -0
- package/chunks/nf-DDFUS5Ht.mjs +5 -0
- package/chunks/ng-DBhdmXcS.mjs +5 -0
- package/chunks/ni-_x4RKVT8.mjs +5 -0
- package/chunks/nl-DBxW_qVy.mjs +5 -0
- package/chunks/no-LyFCuMlU.mjs +5 -0
- package/chunks/np-DEvIQAys.mjs +5 -0
- package/chunks/nr-CuzElmFx.mjs +5 -0
- package/chunks/nu-C6vVHkwP.mjs +5 -0
- package/chunks/nz-BkhNYKha.mjs +5 -0
- package/chunks/om-BsI3oHrd.mjs +5 -0
- package/chunks/pa-CtNQVaHE.mjs +5 -0
- package/chunks/pe-vcSV6ioD.mjs +5 -0
- package/chunks/pf-BOetDvnB.mjs +5 -0
- package/chunks/pg-BDqa4YXR.mjs +5 -0
- package/chunks/ph-BlAaFzEE.mjs +5 -0
- package/chunks/pk-2auAZIDh.mjs +5 -0
- package/chunks/pl-W6WZfuq9.mjs +5 -0
- package/chunks/pm-oy8Uo1bo.mjs +5 -0
- package/chunks/pr-B3p98s5J.mjs +5 -0
- package/chunks/ps-RET8kTuo.mjs +5 -0
- package/chunks/pt-Z2yfZJAz.mjs +5 -0
- package/chunks/pw-Dm4Y4noS.mjs +5 -0
- package/chunks/py-1pKD7w9y.mjs +5 -0
- package/chunks/qa-DpK5_Q-a.mjs +5 -0
- package/chunks/re-oy8Uo1bo.mjs +5 -0
- package/chunks/ro-VYde6hop.mjs +5 -0
- package/chunks/rs-Dj7Wicw9.mjs +5 -0
- package/chunks/ru-CkWEkuTy.mjs +5 -0
- package/chunks/rw-DjRHPIJ_.mjs +5 -0
- package/chunks/sa-BBdaW-_G.mjs +5 -0
- package/chunks/sb-nNr9S0gd.mjs +5 -0
- package/chunks/sc-DcbShXuj.mjs +5 -0
- package/chunks/sd-B1jbITc6.mjs +5 -0
- package/chunks/se-B-CIMrxu.mjs +5 -0
- package/chunks/sg-BIR0OErL.mjs +5 -0
- package/chunks/sh-BR9c9S8h.mjs +5 -0
- package/chunks/si-B5HzM3z8.mjs +5 -0
- package/chunks/sj-LyFCuMlU.mjs +5 -0
- package/chunks/sk-7ZEImIK5.mjs +5 -0
- package/chunks/sl-DuhHodH6.mjs +5 -0
- package/chunks/sm-BrM5UOOM.mjs +5 -0
- package/chunks/sn-jptojE_-.mjs +5 -0
- package/chunks/so-auBJUCeE.mjs +5 -0
- package/chunks/sr-DqWWIG11.mjs +5 -0
- package/chunks/ss-BcJF0rd5.mjs +5 -0
- package/chunks/st-D65H7-IP.mjs +5 -0
- package/chunks/sv-D8EgdK15.mjs +5 -0
- package/chunks/sx-Cmd53qC5.mjs +5 -0
- package/chunks/sy-LL8b7cLC.mjs +5 -0
- package/chunks/sz-D-qYq589.mjs +5 -0
- package/chunks/tc-AIE9LFuJ.mjs +5 -0
- package/chunks/td-C5AP4EiN.mjs +5 -0
- package/chunks/tg-Dt9WAF7L.mjs +5 -0
- package/chunks/th-DyfDlw-o.mjs +5 -0
- package/chunks/tj-U7xsGAAg.mjs +5 -0
- package/chunks/tk-BWjKruB4.mjs +5 -0
- package/chunks/tl-CcXsJf98.mjs +5 -0
- package/chunks/tm-DTASSSkf.mjs +5 -0
- package/chunks/tn-DttZvPz0.mjs +5 -0
- package/chunks/to-ChsX5Z4Q.mjs +5 -0
- package/chunks/tr-C2CRhai0.mjs +5 -0
- package/chunks/tt-DPpP-HbL.mjs +5 -0
- package/chunks/tv-CiTLokZi.mjs +5 -0
- package/chunks/tw--J7h_fxf.mjs +5 -0
- package/chunks/tz-qS3mKSkx.mjs +5 -0
- package/chunks/ua-DiZstskV.mjs +5 -0
- package/chunks/ug-BxVGZUby.mjs +5 -0
- package/chunks/us-BvyIwpav.mjs +5 -0
- package/chunks/uy-Dsr4HSrP.mjs +5 -0
- package/chunks/uz-D25kmTp8.mjs +5 -0
- package/chunks/va-hG27DTVe.mjs +5 -0
- package/chunks/validation-ChktfuxI.mjs +137 -0
- package/chunks/vc-7r46jyD5.mjs +5 -0
- package/chunks/ve-R8UkJHAj.mjs +5 -0
- package/chunks/vg-BLSugSwb.mjs +5 -0
- package/chunks/vi-DSyJsPSD.mjs +5 -0
- package/chunks/vn-BwGpRkWs.mjs +5 -0
- package/chunks/vu-aFyzktTY.mjs +5 -0
- package/chunks/wf-Ca9RrMIP.mjs +5 -0
- package/chunks/ws-DphODgja.mjs +5 -0
- package/chunks/xk-sugAykhS.mjs +5 -0
- package/chunks/ye-D2MZq-93.mjs +5 -0
- package/chunks/yt-tAecYEDU.mjs +5 -0
- package/chunks/za-DadXcfMa.mjs +5 -0
- package/chunks/zm--rp7ufAJ.mjs +5 -0
- package/chunks/zw-BG5nNe2I.mjs +5 -0
- package/flags/README.md +64 -0
- package/flags/index.d.ts +1 -0
- package/flags/index.mjs +264 -0
- package/flags/src/all-flags.d.ts +32 -0
- package/flags/src/all-flags.generated.d.ts +6 -0
- package/flags/src/flag-loaders.generated.d.ts +7 -0
- package/flags/src/index.d.ts +3 -0
- package/flags/src/load-flag.d.ts +13 -0
- package/input-group/index.d.ts +1 -0
- package/input-group/index.mjs +4 -0
- package/input-group/src/components/mp-input-group.d.ts +61 -0
- package/input-group/src/index.d.ts +1 -0
- package/input-group/src/styles/index.d.ts +1 -0
- package/input-group/src/styles/input-group.styles.d.ts +2 -0
- package/package.json +20 -2
- package/phone-core/README.md +57 -0
- package/phone-core/index.d.ts +1 -0
- package/phone-core/index.mjs +8 -0
- package/phone-core/src/countries.d.ts +57 -0
- package/phone-core/src/dial-code.d.ts +30 -0
- package/phone-core/src/index.d.ts +4 -0
- package/phone-core/src/metadata/cc-1.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-20.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-211.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-212.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-213.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-216.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-218.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-220.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-221.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-222.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-223.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-224.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-225.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-226.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-227.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-228.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-229.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-230.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-231.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-232.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-233.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-234.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-235.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-236.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-237.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-238.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-239.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-240.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-241.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-242.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-243.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-244.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-245.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-246.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-247.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-248.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-249.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-250.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-251.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-252.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-253.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-254.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-255.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-256.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-257.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-258.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-260.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-261.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-262.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-263.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-264.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-265.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-266.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-267.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-268.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-269.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-27.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-290.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-291.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-297.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-298.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-299.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-30.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-31.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-32.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-33.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-34.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-350.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-351.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-352.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-353.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-354.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-355.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-356.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-357.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-358.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-359.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-36.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-370.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-371.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-372.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-373.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-374.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-375.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-376.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-377.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-378.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-380.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-381.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-382.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-383.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-385.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-386.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-387.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-389.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-39.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-40.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-41.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-420.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-421.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-423.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-43.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-44.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-45.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-46.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-47.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-48.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-49.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-500.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-501.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-502.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-503.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-504.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-505.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-506.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-507.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-508.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-509.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-51.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-52.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-53.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-54.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-55.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-56.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-57.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-58.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-590.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-591.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-592.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-593.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-594.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-595.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-596.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-597.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-598.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-599.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-60.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-61.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-62.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-63.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-64.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-65.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-66.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-670.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-672.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-673.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-674.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-675.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-676.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-677.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-678.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-679.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-680.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-681.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-682.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-683.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-685.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-686.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-687.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-688.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-689.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-690.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-691.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-692.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-7.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-81.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-82.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-84.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-850.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-852.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-853.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-855.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-856.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-86.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-880.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-886.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-90.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-91.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-92.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-93.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-94.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-95.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-960.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-961.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-962.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-963.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-964.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-965.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-966.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-967.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-968.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-970.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-971.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-972.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-973.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-974.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-975.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-976.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-977.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-98.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-992.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-993.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-994.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-995.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-996.generated.d.ts +3 -0
- package/phone-core/src/metadata/cc-998.generated.d.ts +3 -0
- package/phone-core/src/metadata-loaders.generated.d.ts +15 -0
- package/phone-core/src/validation.d.ts +55 -0
- package/phone-input/index.d.ts +1 -0
- package/phone-input/index.mjs +514 -0
- package/phone-input/src/components/caret.d.ts +25 -0
- package/phone-input/src/components/mp-phone-input.d.ts +149 -0
- package/phone-input/src/index.d.ts +1 -0
- package/phone-input/src/styles/index.d.ts +1 -0
- package/phone-input/src/styles/phone-input.styles.d.ts +2 -0
- package/query-builder/index.mjs +1 -1
- package/scheduler/index.mjs +768 -914
- package/select/index.mjs +1 -1
- package/select/src/components/index.d.ts +1 -1
- package/select/src/components/mp-select.d.ts +38 -0
- package/select/src/index.d.ts +1 -1
- package/select/src/styles/index.d.ts +1 -0
- package/select/src/styles/select.styles.d.ts +2 -0
package/scheduler/index.mjs
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { unsafeCSS as
|
|
1
|
+
import { unsafeCSS as ce, LitElement as he, html as S, nothing as k } from "lit";
|
|
2
2
|
import { L as ue } from "../chunks/live-announcer-Bi0orG4n.mjs";
|
|
3
3
|
import { e as pe } from "../chunks/error-text-B45eDAt1.mjs";
|
|
4
|
-
import { D as
|
|
5
|
-
import {
|
|
4
|
+
import { D as ve, s as H, d as h, j as E, w, v as X, p as me, x as j, z as C, y as O, r as ie, u as re, q as ge, k as fe } from "../chunks/id-DNZVAnGC.mjs";
|
|
5
|
+
import { f as ye } from "../chunks/form-control.styles-BOTBdmvg.mjs";
|
|
6
|
+
import { i as be } from "../chunks/invalid-feedback.styles-he0JYrJm.mjs";
|
|
6
7
|
import { O as _ } from "../chunks/overlay-controller-D6agzzOI.mjs";
|
|
7
8
|
import "../chunks/mp-checkbox-6EJwdUIn.mjs";
|
|
8
|
-
import "../chunks/mp-select-
|
|
9
|
+
import "../chunks/mp-select-lHP00OBH.mjs";
|
|
9
10
|
import "../chunks/mp-datetime-picker.element-D1CiLbHm.mjs";
|
|
10
|
-
function
|
|
11
|
+
function oe(p, e = []) {
|
|
11
12
|
for (const t of p) {
|
|
12
13
|
if (H(t)) {
|
|
13
|
-
|
|
14
|
+
oe(t.children, e);
|
|
14
15
|
continue;
|
|
15
16
|
}
|
|
16
17
|
for (const s of t.events ?? [])
|
|
@@ -19,39 +20,39 @@ function ae(p, e = []) {
|
|
|
19
20
|
return e;
|
|
20
21
|
}
|
|
21
22
|
function te(p, e) {
|
|
22
|
-
const t =
|
|
23
|
+
const t = oe(e);
|
|
23
24
|
if (t.length === 0) return p;
|
|
24
25
|
const s = /* @__PURE__ */ new Map();
|
|
25
|
-
for (const
|
|
26
|
-
const
|
|
27
|
-
for (const
|
|
28
|
-
s.has(
|
|
29
|
-
return
|
|
30
|
-
`[mp-scheduler] ${
|
|
26
|
+
for (const i of t) s.set(i.id, i);
|
|
27
|
+
const n = [];
|
|
28
|
+
for (const i of p)
|
|
29
|
+
s.has(i.id) && n.push(i.id), s.set(i.id, i);
|
|
30
|
+
return n.length > 0 && console.warn(
|
|
31
|
+
`[mp-scheduler] ${n.length} event id(s) appear in both the "events" input and under a resource; the "events" entry wins. Ids: ${n.join(", ")}`
|
|
31
32
|
), [...s.values()];
|
|
32
33
|
}
|
|
33
|
-
function
|
|
34
|
-
const s = new Set(e),
|
|
35
|
-
for (const
|
|
36
|
-
H(
|
|
34
|
+
function we(p, e, t) {
|
|
35
|
+
const s = new Set(e), n = (i) => {
|
|
36
|
+
for (const r of i)
|
|
37
|
+
H(r) && (t.has(r.id) || (t.add(r.id), r.collapsed && s.add(r.id)), n(r.children));
|
|
37
38
|
};
|
|
38
|
-
return
|
|
39
|
+
return n(p), s;
|
|
39
40
|
}
|
|
40
|
-
function
|
|
41
|
+
function ae(p, e = /* @__PURE__ */ new Map()) {
|
|
41
42
|
for (const t of p)
|
|
42
|
-
H(t) ?
|
|
43
|
+
H(t) ? ae(t.children, e) : e.set(t.id, t);
|
|
43
44
|
return e;
|
|
44
45
|
}
|
|
45
|
-
function
|
|
46
|
+
function Ee(p, e) {
|
|
46
47
|
const t = /* @__PURE__ */ new Map();
|
|
47
48
|
for (const s of p) {
|
|
48
|
-
const
|
|
49
|
-
|
|
49
|
+
const n = s.resourceId != null && e.has(s.resourceId) ? s.resourceId : null, i = t.get(n);
|
|
50
|
+
i ? i.push(s) : t.set(n, [s]);
|
|
50
51
|
}
|
|
51
52
|
return t;
|
|
52
53
|
}
|
|
53
|
-
function
|
|
54
|
-
const e = { ...
|
|
54
|
+
function xe(p = {}) {
|
|
55
|
+
const e = { ...ve, ...p };
|
|
55
56
|
return {
|
|
56
57
|
view: e.initialView,
|
|
57
58
|
date: e.initialDate,
|
|
@@ -78,9 +79,9 @@ function Ee(p = {}) {
|
|
|
78
79
|
focusedDate: null
|
|
79
80
|
};
|
|
80
81
|
}
|
|
81
|
-
class
|
|
82
|
+
class De {
|
|
82
83
|
constructor(e = {}) {
|
|
83
|
-
this.listeners = /* @__PURE__ */ new Set(), this.warnedUnassignedIds = /* @__PURE__ */ new Set(), this.warnedDanglingIds = /* @__PURE__ */ new Set(), this.flatEventsInput = [], this.seededGroupIds = /* @__PURE__ */ new Set(), this.state =
|
|
84
|
+
this.listeners = /* @__PURE__ */ new Set(), this.warnedUnassignedIds = /* @__PURE__ */ new Set(), this.warnedDanglingIds = /* @__PURE__ */ new Set(), this.flatEventsInput = [], this.seededGroupIds = /* @__PURE__ */ new Set(), this.state = xe(e);
|
|
84
85
|
}
|
|
85
86
|
/**
|
|
86
87
|
* Get current state
|
|
@@ -92,8 +93,8 @@ class xe {
|
|
|
92
93
|
* Update state with partial update or updater function
|
|
93
94
|
*/
|
|
94
95
|
setState(e) {
|
|
95
|
-
const t = typeof e == "function" ? e(this.state) : e, s = { ...this.state, ...t },
|
|
96
|
-
|
|
96
|
+
const t = typeof e == "function" ? e(this.state) : e, s = { ...this.state, ...t }, n = s.resources !== this.state.resources || !this.state.resourceById;
|
|
97
|
+
n && (s.resourceById = ae(s.resources)), (s.events !== this.state.events || n || !this.state.eventsByResource) && (s.eventsByResource = Ee(s.events, s.resourceById)), this.state = s, this.warnUnassignedEvents(), this.warnDanglingEvents(), this.notifyListeners();
|
|
97
98
|
}
|
|
98
99
|
/**
|
|
99
100
|
* `options.requireEventResource` is a DEVELOPMENT signal, not a filter: the
|
|
@@ -211,7 +212,7 @@ class xe {
|
|
|
211
212
|
this.setState((t) => ({
|
|
212
213
|
resources: e,
|
|
213
214
|
events: te(this.flatEventsInput, e),
|
|
214
|
-
collapsedGroups:
|
|
215
|
+
collapsedGroups: we(
|
|
215
216
|
e,
|
|
216
217
|
t.collapsedGroups,
|
|
217
218
|
this.seededGroupIds
|
|
@@ -378,11 +379,11 @@ class xe {
|
|
|
378
379
|
*/
|
|
379
380
|
extendSelection(e, t = null) {
|
|
380
381
|
this.setState((s) => {
|
|
381
|
-
const
|
|
382
|
+
const n = s.selectionAnchor ?? s.focusedCell ?? e, i = s.selectionResourceId ?? s.focusedResourceId ?? t;
|
|
382
383
|
return {
|
|
383
|
-
selectionAnchor:
|
|
384
|
+
selectionAnchor: n,
|
|
384
385
|
selectionExtent: e,
|
|
385
|
-
selectionResourceId:
|
|
386
|
+
selectionResourceId: i
|
|
386
387
|
};
|
|
387
388
|
});
|
|
388
389
|
}
|
|
@@ -404,22 +405,22 @@ class xe {
|
|
|
404
405
|
this.setState({ focusedDate: e });
|
|
405
406
|
}
|
|
406
407
|
}
|
|
407
|
-
function
|
|
408
|
+
function le(p) {
|
|
408
409
|
return `${p.getFullYear()}-${String(p.getMonth() + 1).padStart(2, "0")}-${String(
|
|
409
410
|
p.getDate()
|
|
410
411
|
).padStart(2, "0")}`;
|
|
411
412
|
}
|
|
412
413
|
function W(p, e, t) {
|
|
413
|
-
const s = t.timeFormat,
|
|
414
|
-
return e &&
|
|
414
|
+
const s = t.timeFormat, n = h.formatTime(p.start, s, t.locale), i = h.formatTime(p.end, s, t.locale), r = p.start.toLocaleDateString(t.locale, { weekday: "long", month: "short", day: "numeric" }), o = [`${p.title}, ${n}–${i}`, r];
|
|
415
|
+
return e && o.push(E(w(t.messages).eventOnResource, { resource: e })), o.join(", ");
|
|
415
416
|
}
|
|
416
417
|
function G(p) {
|
|
417
418
|
const { selectionAnchor: e, selectionExtent: t, selectionResourceId: s } = p;
|
|
418
419
|
if (!e || !t) return null;
|
|
419
|
-
const
|
|
420
|
+
const n = Math.min(e.start.getTime(), t.start.getTime()), i = Math.max(e.end.getTime(), t.end.getTime());
|
|
420
421
|
return {
|
|
421
|
-
start: new Date(
|
|
422
|
-
end: new Date(
|
|
422
|
+
start: new Date(n),
|
|
423
|
+
end: new Date(i),
|
|
423
424
|
resourceId: s
|
|
424
425
|
};
|
|
425
426
|
}
|
|
@@ -432,40 +433,40 @@ function q(p, e, t = null) {
|
|
|
432
433
|
weekday: "long",
|
|
433
434
|
month: "short",
|
|
434
435
|
day: "numeric"
|
|
435
|
-
}),
|
|
436
|
-
return t &&
|
|
436
|
+
}), n = h.formatTime(p.start, e.timeFormat, e.locale), i = [`${s}, ${n}`];
|
|
437
|
+
return t && i.push(t), i.join(", ");
|
|
437
438
|
}
|
|
438
|
-
function
|
|
439
|
+
function Se(p, e) {
|
|
439
440
|
const t = G(p);
|
|
440
441
|
if (!t) return "";
|
|
441
|
-
const { options: s } = p,
|
|
442
|
+
const { options: s } = p, n = s.timeFormat, i = { weekday: "short", month: "short", day: "numeric" }, r = `${h.formatTime(t.start, n, s.locale)} ${t.start.toLocaleDateString(s.locale, i)}`, o = `${h.formatTime(t.end, n, s.locale)} ${t.end.toLocaleDateString(s.locale, i)}`, a = e * 1e3, l = Math.max(1, Math.round((t.end.getTime() - t.start.getTime()) / a)), d = w(s.messages);
|
|
442
443
|
return E(d.selection, {
|
|
443
|
-
start:
|
|
444
|
-
end:
|
|
444
|
+
start: r,
|
|
445
|
+
end: o,
|
|
445
446
|
count: l,
|
|
446
447
|
slots: l === 1 ? d.slotSingular : d.slotPlural
|
|
447
448
|
});
|
|
448
449
|
}
|
|
449
|
-
function
|
|
450
|
-
const s = t.timeFormat,
|
|
450
|
+
function ke(p, e, t) {
|
|
451
|
+
const s = t.timeFormat, n = p.toLocaleDateString(t.locale, { weekday: "short", month: "short", day: "numeric" });
|
|
451
452
|
return E(w(t.messages).movedTo, {
|
|
452
453
|
start: h.formatTime(p, s, t.locale),
|
|
453
454
|
end: h.formatTime(e, s, t.locale),
|
|
454
|
-
day:
|
|
455
|
+
day: n
|
|
455
456
|
});
|
|
456
457
|
}
|
|
457
|
-
function
|
|
458
|
-
const
|
|
459
|
-
return E(
|
|
460
|
-
edge: t === "start" ?
|
|
461
|
-
start: h.formatTime(p,
|
|
462
|
-
end: h.formatTime(e,
|
|
458
|
+
function Me(p, e, t, s) {
|
|
459
|
+
const n = s.timeFormat, i = w(s.messages);
|
|
460
|
+
return E(i.resizedEdge, {
|
|
461
|
+
edge: t === "start" ? i.startEdge : i.endEdge,
|
|
462
|
+
start: h.formatTime(p, n, s.locale),
|
|
463
|
+
end: h.formatTime(e, n, s.locale)
|
|
463
464
|
});
|
|
464
465
|
}
|
|
465
|
-
const
|
|
466
|
+
const Ce = 40, Te = 20;
|
|
466
467
|
function se(p, e) {
|
|
467
|
-
const [t = 0, s = 0,
|
|
468
|
-
return
|
|
468
|
+
const [t = 0, s = 0, n = 0] = e.split(":").map(Number), i = new Date(p);
|
|
469
|
+
return i.setHours(0, 0, 0, 0), i.setSeconds(t * 3600 + s * 60 + n), i;
|
|
469
470
|
}
|
|
470
471
|
class K {
|
|
471
472
|
constructor(e, t) {
|
|
@@ -531,15 +532,15 @@ class K {
|
|
|
531
532
|
this.state.resourceById,
|
|
532
533
|
this.state.options.defaultEventColor
|
|
533
534
|
);
|
|
534
|
-
e.style.backgroundColor = s, e.style.color = t.textColor ??
|
|
535
|
+
e.style.backgroundColor = s, e.style.color = t.textColor ?? me(s);
|
|
535
536
|
}
|
|
536
537
|
partGeometry(e, t, s) {
|
|
537
|
-
const
|
|
538
|
-
if (a <=
|
|
539
|
-
const l =
|
|
538
|
+
const n = s.slotDuration ?? 1800, i = se(e, s.slotMinTime ?? "00:00:00"), r = se(e, s.slotMaxTime ?? "24:00:00"), o = Math.max(e.getTime(), i.getTime()), a = Math.min(t.getTime(), r.getTime());
|
|
539
|
+
if (a <= o) return null;
|
|
540
|
+
const l = Ce / (n * 1e3);
|
|
540
541
|
return {
|
|
541
|
-
top: (
|
|
542
|
-
height: Math.max((a -
|
|
542
|
+
top: (o - i.getTime()) * l,
|
|
543
|
+
height: Math.max((a - o) * l, Te)
|
|
543
544
|
};
|
|
544
545
|
}
|
|
545
546
|
createElement(e, ...t) {
|
|
@@ -550,8 +551,8 @@ class K {
|
|
|
550
551
|
* Helper to set data attributes
|
|
551
552
|
*/
|
|
552
553
|
setData(e, t) {
|
|
553
|
-
for (const [s,
|
|
554
|
-
e.dataset[s] = String(
|
|
554
|
+
for (const [s, n] of Object.entries(t))
|
|
555
|
+
e.dataset[s] = String(n);
|
|
555
556
|
}
|
|
556
557
|
clearContainer() {
|
|
557
558
|
const e = !this.pendingScroll && (this.container.scrollLeft || this.container.scrollTop);
|
|
@@ -587,15 +588,15 @@ class K {
|
|
|
587
588
|
* Position classes are per-view: ['top','bottom'] for time grids,
|
|
588
589
|
* ['left','right'] for the timeline.
|
|
589
590
|
*/
|
|
590
|
-
appendResizeHandles(e, t, [s,
|
|
591
|
-
const
|
|
592
|
-
t.isStart && j("start", { permissions:
|
|
591
|
+
appendResizeHandles(e, t, [s, n] = ["top", "bottom"]) {
|
|
592
|
+
const i = this.state.resolvedPermissions;
|
|
593
|
+
t.isStart && j("start", { permissions: i, event: t.event }) && e.appendChild(this.createResizeHandle(s, "start")), t.isEnd && j("end", { permissions: i, event: t.event }) && e.appendChild(this.createResizeHandle(n, "end"));
|
|
593
594
|
}
|
|
594
595
|
createResizeHandle(e, t) {
|
|
595
596
|
const s = this.createElement("div", "resize-handle", e);
|
|
596
597
|
this.setData(s, { handle: t });
|
|
597
|
-
const
|
|
598
|
-
return
|
|
598
|
+
const n = this.createElement("span", "resize-glyph");
|
|
599
|
+
return n.setAttribute("aria-hidden", "true"), s.appendChild(n), s;
|
|
599
600
|
}
|
|
600
601
|
/**
|
|
601
602
|
* Retrofit the ARIA grid chain onto a rendered view (wc-aria PRD step 5.7):
|
|
@@ -612,14 +613,14 @@ class K {
|
|
|
612
613
|
applyGridRoles(e) {
|
|
613
614
|
const t = this.container;
|
|
614
615
|
t.getAttribute("role") !== "grid" && t.setAttribute("role", "grid");
|
|
615
|
-
const
|
|
616
|
+
const n = this.container.getRootNode().host?.getAttribute(
|
|
616
617
|
"aria-label"
|
|
617
618
|
) || e.label;
|
|
618
|
-
|
|
619
|
-
const
|
|
620
|
-
a.hasAttribute("role") || a.setAttribute("role",
|
|
619
|
+
n && t.setAttribute("aria-label", n), t.setAttribute("aria-describedby", "scheduler-kbd-grid"), e.multiselectable && t.setAttribute("aria-multiselectable", "true");
|
|
620
|
+
const i = (r, o) => t.querySelectorAll(r).forEach((a) => {
|
|
621
|
+
a.hasAttribute("role") || a.setAttribute("role", o);
|
|
621
622
|
});
|
|
622
|
-
e.columnHeaderRow &&
|
|
623
|
+
e.columnHeaderRow && i(e.columnHeaderRow, "row"), e.columnHeaders && i(e.columnHeaders, "columnheader"), (e.presentation ?? []).forEach((r) => i(r, "presentation")), e.rows && i(e.rows, "row"), e.cells && i(e.cells, "gridcell");
|
|
623
624
|
}
|
|
624
625
|
/** aria-current="date" on every element the views styled `.today`. */
|
|
625
626
|
markToday() {
|
|
@@ -632,13 +633,13 @@ class U extends K {
|
|
|
632
633
|
}
|
|
633
634
|
render() {
|
|
634
635
|
this.clearContainer(), this.container.classList.add("scheduler-year-view");
|
|
635
|
-
const { date: e, options: t } = this.state, s = h.getYearMonths(e),
|
|
636
|
+
const { date: e, options: t } = this.state, s = h.getYearMonths(e), n = this.createElement("div", "scheduler-year-grid");
|
|
636
637
|
this.monthCards.clear();
|
|
637
|
-
for (const
|
|
638
|
-
const
|
|
639
|
-
|
|
638
|
+
for (const i of s) {
|
|
639
|
+
const r = this.createMonthCard(i);
|
|
640
|
+
n.appendChild(r);
|
|
640
641
|
}
|
|
641
|
-
this.container.appendChild(
|
|
642
|
+
this.container.appendChild(n), this.applyGridRoles({
|
|
642
643
|
label: E(w(this.state.options.messages).yearGridLabel, {
|
|
643
644
|
date: String(this.state.date.getFullYear())
|
|
644
645
|
}),
|
|
@@ -656,38 +657,38 @@ class U extends K {
|
|
|
656
657
|
return `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}`;
|
|
657
658
|
}
|
|
658
659
|
createMonthCard(e) {
|
|
659
|
-
const { events: t, options: s } = this.state,
|
|
660
|
-
|
|
661
|
-
const
|
|
662
|
-
|
|
663
|
-
const
|
|
660
|
+
const { events: t, options: s } = this.state, n = this.createElement("div", "scheduler-year-month"), i = U.monthKey(e);
|
|
661
|
+
n.setAttribute("role", "gridcell"), n.setAttribute("tabindex", "-1"), n.id = `scheduler-cell-y-${i}`, this.setData(n, { month: e.toISOString() }), this.monthCards.set(i, n);
|
|
662
|
+
const r = this.createElement("div", "scheduler-year-month-header");
|
|
663
|
+
r.textContent = h.getMonthName(e, s.locale), r.setAttribute("role", "button"), r.setAttribute("tabindex", "0"), this.setData(r, { month: e.toISOString() }), n.appendChild(r);
|
|
664
|
+
const o = this.createElement("div", "scheduler-mini-month"), a = h.getMonthWeeks(e, this.firstDayOfWeek), l = a[0];
|
|
664
665
|
for (const f of l) {
|
|
665
|
-
const
|
|
666
|
-
|
|
666
|
+
const v = this.createElement("div", "scheduler-mini-day", "header");
|
|
667
|
+
v.textContent = h.getDayName(f, s.locale, "narrow"), v.style.fontWeight = "600", v.style.color = "#666", o.appendChild(v);
|
|
667
668
|
}
|
|
668
|
-
const d = h.getMonthStart(e), c = h.getMonthEnd(e), u = C.filterByRange(t, d, c),
|
|
669
|
-
|
|
669
|
+
const d = h.getMonthStart(e), c = h.getMonthEnd(e), u = C.filterByRange(t, d, c), m = w(s.messages);
|
|
670
|
+
n.setAttribute(
|
|
670
671
|
"aria-label",
|
|
671
|
-
E(
|
|
672
|
+
E(m.yearMonthCardLabel, {
|
|
672
673
|
month: `${h.getMonthName(e, s.locale)} ${e.getFullYear()}`,
|
|
673
674
|
count: u.length,
|
|
674
|
-
events: u.length === 1 ?
|
|
675
|
+
events: u.length === 1 ? m.eventSingular : m.eventPlural
|
|
675
676
|
})
|
|
676
677
|
);
|
|
677
678
|
const g = /* @__PURE__ */ new Set();
|
|
678
679
|
for (const f of u) {
|
|
679
|
-
const
|
|
680
|
-
for (
|
|
681
|
-
g.add(
|
|
680
|
+
const v = new Date(f.start);
|
|
681
|
+
for (v.setHours(0, 0, 0, 0); v <= f.end; )
|
|
682
|
+
g.add(v.toISOString().split("T")[0]), v.setDate(v.getDate() + 1);
|
|
682
683
|
}
|
|
683
684
|
for (const f of a)
|
|
684
|
-
for (const
|
|
685
|
+
for (const v of f) {
|
|
685
686
|
const y = this.createElement("div", "scheduler-mini-day");
|
|
686
|
-
y.textContent = String(
|
|
687
|
-
const b =
|
|
688
|
-
g.has(b) && y.classList.add("has-events"),
|
|
687
|
+
y.textContent = String(v.getDate()), this.setData(y, { date: v.toISOString() }), h.isSameMonth(v, e) || y.classList.add("other-month"), h.isToday(v) && y.classList.add("today");
|
|
688
|
+
const b = v.toISOString().split("T")[0];
|
|
689
|
+
g.has(b) && y.classList.add("has-events"), o.appendChild(y);
|
|
689
690
|
}
|
|
690
|
-
return
|
|
691
|
+
return n.appendChild(o), n;
|
|
691
692
|
}
|
|
692
693
|
/**
|
|
693
694
|
* Apply roving tabindex based on `state.focusedDate`'s month. Year-view's
|
|
@@ -698,9 +699,9 @@ class U extends K {
|
|
|
698
699
|
const e = this.state.focusedDate;
|
|
699
700
|
let t = !1;
|
|
700
701
|
const s = e ? U.monthKey(e) : null;
|
|
701
|
-
for (const [
|
|
702
|
-
const
|
|
703
|
-
|
|
702
|
+
for (const [n, i] of this.monthCards) {
|
|
703
|
+
const r = n === s;
|
|
704
|
+
i.setAttribute("tabindex", r ? "0" : "-1"), i.removeAttribute("aria-selected"), r && (t = !0);
|
|
704
705
|
}
|
|
705
706
|
t || this.monthCards.values().next().value?.setAttribute("tabindex", "0");
|
|
706
707
|
}
|
|
@@ -731,22 +732,22 @@ class N extends K {
|
|
|
731
732
|
}
|
|
732
733
|
render() {
|
|
733
734
|
this.clearContainer(), this.container.classList.add("scheduler-month-view");
|
|
734
|
-
const { date: e, options: t } = this.state, s = h.getMonthWeeks(e, this.firstDayOfWeek),
|
|
735
|
-
for (const
|
|
735
|
+
const { date: e, options: t } = this.state, s = h.getMonthWeeks(e, this.firstDayOfWeek), n = this.createElement("div", "scheduler-day-headers"), i = s[0];
|
|
736
|
+
for (const o of i) {
|
|
736
737
|
const a = this.createElement("div", "scheduler-day-header");
|
|
737
|
-
a.textContent = h.getDayName(
|
|
738
|
+
a.textContent = h.getDayName(o, t.locale), n.appendChild(a);
|
|
738
739
|
}
|
|
739
|
-
this.container.appendChild(
|
|
740
|
-
const
|
|
741
|
-
for (const
|
|
740
|
+
this.container.appendChild(n);
|
|
741
|
+
const r = this.createElement("div", "scheduler-month-grid");
|
|
742
|
+
for (const o of s) {
|
|
742
743
|
const a = this.createElement("div", "scheduler-month-week");
|
|
743
|
-
for (const l of
|
|
744
|
+
for (const l of o) {
|
|
744
745
|
const d = this.createDayCell(l);
|
|
745
746
|
a.appendChild(d);
|
|
746
747
|
}
|
|
747
|
-
|
|
748
|
+
r.appendChild(a);
|
|
748
749
|
}
|
|
749
|
-
this.container.appendChild(
|
|
750
|
+
this.container.appendChild(r), this.renderEvents(), this.updateDayCellFocus(), this.applyGridRoles({
|
|
750
751
|
label: E(w(this.state.options.messages).monthGridLabel, {
|
|
751
752
|
date: h.formatDate(this.state.date, this.state.options.locale, {
|
|
752
753
|
month: "long",
|
|
@@ -766,17 +767,17 @@ class N extends K {
|
|
|
766
767
|
* cell IDs would not match the visible day numbers.
|
|
767
768
|
*/
|
|
768
769
|
static dayKey(e) {
|
|
769
|
-
return
|
|
770
|
+
return le(e);
|
|
770
771
|
}
|
|
771
772
|
createDayCell(e) {
|
|
772
773
|
const { date: t } = this.state, s = this.createElement("div", "scheduler-month-day");
|
|
773
774
|
h.isSameMonth(e, t) || s.classList.add("other-month"), h.isToday(e) && s.classList.add("today");
|
|
774
|
-
const
|
|
775
|
-
s.setAttribute("role", "gridcell"), s.setAttribute("tabindex", "-1"), s.id = `scheduler-cell-m-${
|
|
776
|
-
const
|
|
777
|
-
|
|
778
|
-
const
|
|
779
|
-
return s.appendChild(
|
|
775
|
+
const n = N.dayKey(e);
|
|
776
|
+
s.setAttribute("role", "gridcell"), s.setAttribute("tabindex", "-1"), s.id = `scheduler-cell-m-${n}`;
|
|
777
|
+
const i = this.createElement("div", "day-number");
|
|
778
|
+
i.textContent = String(e.getDate()), s.appendChild(i);
|
|
779
|
+
const r = this.createElement("div", "month-events");
|
|
780
|
+
return s.appendChild(r), this.dayCells.set(n, s), this.setData(s, { date: n }), s;
|
|
780
781
|
}
|
|
781
782
|
/**
|
|
782
783
|
* Apply roving tabindex based on `state.focusedDate`. The grid must always
|
|
@@ -787,46 +788,46 @@ class N extends K {
|
|
|
787
788
|
const e = this.state.focusedDate;
|
|
788
789
|
let t = !1;
|
|
789
790
|
const s = e ? N.dayKey(e) : null;
|
|
790
|
-
for (const [
|
|
791
|
-
const
|
|
792
|
-
|
|
791
|
+
for (const [n, i] of this.dayCells) {
|
|
792
|
+
const r = n === s;
|
|
793
|
+
i.setAttribute("tabindex", r ? "0" : "-1"), i.removeAttribute("aria-selected"), r && (t = !0);
|
|
793
794
|
}
|
|
794
|
-
t || (Array.from(this.dayCells.values()).find((
|
|
795
|
+
t || (Array.from(this.dayCells.values()).find((i) => i.classList.contains("today") && !i.classList.contains("other-month")) || Array.from(this.dayCells.values()).find((i) => !i.classList.contains("other-month")) || this.dayCells.values().next().value)?.setAttribute("tabindex", "0");
|
|
795
796
|
}
|
|
796
797
|
renderEvents() {
|
|
797
798
|
const { date: e, events: t, options: s } = this.state;
|
|
798
799
|
h.getMonthStart(e), h.getMonthEnd(e);
|
|
799
|
-
const
|
|
800
|
-
|
|
801
|
-
const
|
|
802
|
-
for (const d of
|
|
803
|
-
const c = new Date(d.start), u = new Date(d.end),
|
|
804
|
-
for (
|
|
805
|
-
const g = N.dayKey(
|
|
806
|
-
a.has(g) || a.set(g, []), a.get(g).push(d),
|
|
800
|
+
const n = h.getMonthWeeks(e, this.firstDayOfWeek), i = n[0][0], r = n[n.length - 1][6];
|
|
801
|
+
r.setHours(23, 59, 59, 999);
|
|
802
|
+
const o = C.filterByRange(t, i, r), a = /* @__PURE__ */ new Map();
|
|
803
|
+
for (const d of o) {
|
|
804
|
+
const c = new Date(d.start), u = new Date(d.end), m = new Date(c);
|
|
805
|
+
for (m.setHours(0, 0, 0, 0); m <= u; ) {
|
|
806
|
+
const g = N.dayKey(m);
|
|
807
|
+
a.has(g) || a.set(g, []), a.get(g).push(d), m.setDate(m.getDate() + 1);
|
|
807
808
|
}
|
|
808
809
|
}
|
|
809
810
|
const l = typeof s.dayMaxEvents == "number" ? s.dayMaxEvents : s.dayMaxEvents === !1 ? Number.POSITIVE_INFINITY : 3;
|
|
810
811
|
for (const [d, c] of a) {
|
|
811
812
|
const u = this.dayCells.get(d);
|
|
812
813
|
if (!u) continue;
|
|
813
|
-
const
|
|
814
|
-
if (!
|
|
815
|
-
|
|
814
|
+
const m = u.querySelector(".month-events");
|
|
815
|
+
if (!m) continue;
|
|
816
|
+
m.innerHTML = "";
|
|
816
817
|
const g = c.slice(0, l), f = c.length - g.length;
|
|
817
|
-
for (const
|
|
818
|
+
for (const v of g) {
|
|
818
819
|
const y = this.createElement("div", "scheduler-month-event");
|
|
819
|
-
y.textContent =
|
|
820
|
+
y.textContent = v.title, this.applyEventColors(y, v), y.setAttribute("role", "button"), y.setAttribute("tabindex", "0"), y.setAttribute("aria-label", W(v, null, this.state.options)), y.setAttribute(
|
|
820
821
|
"aria-pressed",
|
|
821
|
-
String(this.state.selectedEvent?.id ===
|
|
822
|
-
), y.setAttribute("aria-describedby", "scheduler-kbd-event"), this.setData(y, { eventId:
|
|
822
|
+
String(this.state.selectedEvent?.id === v.id)
|
|
823
|
+
), y.setAttribute("aria-describedby", "scheduler-kbd-event"), this.setData(y, { eventId: v.id }), m.appendChild(y);
|
|
823
824
|
}
|
|
824
825
|
if (f > 0) {
|
|
825
|
-
const
|
|
826
|
-
|
|
826
|
+
const v = this.createElement("div", "scheduler-more-link");
|
|
827
|
+
v.textContent = E(
|
|
827
828
|
w(this.state.options.messages).moreEvents,
|
|
828
829
|
{ count: f }
|
|
829
|
-
),
|
|
830
|
+
), v.setAttribute("role", "button"), v.setAttribute("tabindex", "0"), this.setData(v, { date: d }), m.appendChild(v);
|
|
830
831
|
}
|
|
831
832
|
}
|
|
832
833
|
}
|
|
@@ -845,37 +846,37 @@ class N extends K {
|
|
|
845
846
|
this.dayCells.clear(), this.clearContainer();
|
|
846
847
|
}
|
|
847
848
|
}
|
|
848
|
-
function
|
|
849
|
+
function ne(p, e) {
|
|
849
850
|
const t = new Date(p.start);
|
|
850
851
|
t.setHours(0, 0, 0, 0);
|
|
851
|
-
const s = p.start.getTime() - t.getTime(),
|
|
852
|
-
|
|
853
|
-
const
|
|
854
|
-
return { start: new Date(
|
|
852
|
+
const s = p.start.getTime() - t.getTime(), n = p.end.getTime() - p.start.getTime(), i = new Date(e);
|
|
853
|
+
i.setHours(0, 0, 0, 0);
|
|
854
|
+
const r = i.getTime() + s;
|
|
855
|
+
return { start: new Date(r), end: new Date(r + n) };
|
|
855
856
|
}
|
|
856
|
-
class
|
|
857
|
+
class Ie extends K {
|
|
857
858
|
constructor() {
|
|
858
859
|
super(...arguments), this.dayColumns = [], this.eventElements = /* @__PURE__ */ new Map(), this.slotElements = /* @__PURE__ */ new Map();
|
|
859
860
|
}
|
|
860
861
|
render() {
|
|
861
862
|
this.clearContainer(), this.container.classList.add("scheduler-week-view");
|
|
862
|
-
const { date: e, options: t } = this.state, s = h.getWeekDays(e, this.firstDayOfWeek),
|
|
863
|
-
|
|
863
|
+
const { date: e, options: t } = this.state, s = h.getWeekDays(e, this.firstDayOfWeek), n = this.createElement("div", "scheduler-day-headers"), i = this.createElement("div", "scheduler-time-gutter-space");
|
|
864
|
+
i.style.width = "var(--scheduler-time-gutter-width)", n.appendChild(i);
|
|
864
865
|
for (const d of s) {
|
|
865
866
|
const c = this.createElement("div", "scheduler-day-header");
|
|
866
867
|
h.isToday(d) && c.classList.add("today");
|
|
867
868
|
const u = this.createElement("div", "day-name");
|
|
868
869
|
u.textContent = h.getDayName(d, t.locale);
|
|
869
|
-
const
|
|
870
|
-
|
|
870
|
+
const m = this.createElement("div", "day-number");
|
|
871
|
+
m.textContent = String(d.getDate()), m.setAttribute("role", "button"), m.setAttribute("tabindex", "0"), m.setAttribute(
|
|
871
872
|
"aria-label",
|
|
872
873
|
E(w(t.messages).openDayView, {
|
|
873
874
|
date: h.formatDateWithWeekday(d, t.locale)
|
|
874
875
|
})
|
|
875
|
-
), this.setData(
|
|
876
|
+
), this.setData(m, { date: le(d) }), c.appendChild(u), c.appendChild(m), n.appendChild(c);
|
|
876
877
|
}
|
|
877
|
-
this.container.appendChild(
|
|
878
|
-
const
|
|
878
|
+
this.container.appendChild(n);
|
|
879
|
+
const r = this.createElement("div", "scheduler-time-grid"), o = this.createElement("div", "scheduler-time-gutter"), a = h.getTimeSlots(
|
|
879
880
|
s[0],
|
|
880
881
|
t.slotDuration,
|
|
881
882
|
t.slotMinTime,
|
|
@@ -883,9 +884,9 @@ class Te extends K {
|
|
|
883
884
|
);
|
|
884
885
|
for (const d of a) {
|
|
885
886
|
const c = this.createElement("div", "scheduler-time-slot-label");
|
|
886
|
-
c.textContent = h.formatTime(d.start, t.timeFormat, t.locale),
|
|
887
|
+
c.textContent = h.formatTime(d.start, t.timeFormat, t.locale), o.appendChild(c);
|
|
887
888
|
}
|
|
888
|
-
|
|
889
|
+
r.appendChild(o);
|
|
889
890
|
const l = this.createElement("div", "scheduler-days-container");
|
|
890
891
|
this.dayColumns = [];
|
|
891
892
|
for (let d = 0; d < s.length; d++) {
|
|
@@ -895,23 +896,23 @@ class Te extends K {
|
|
|
895
896
|
h.formatDateWithWeekday(c, t.locale)
|
|
896
897
|
), u.setAttribute("aria-rowindex", String(d + 2));
|
|
897
898
|
for (let g = 0; g < a.length; g++) {
|
|
898
|
-
const f = a[g], { start:
|
|
899
|
+
const f = a[g], { start: v, end: y } = ne(f, c), b = this.createElement("div", "scheduler-time-slot");
|
|
899
900
|
b.setAttribute("role", "gridcell"), b.setAttribute("tabindex", "-1"), b.setAttribute("aria-selected", "false"), b.setAttribute(
|
|
900
901
|
"aria-label",
|
|
901
|
-
q({ start:
|
|
902
|
+
q({ start: v }, t)
|
|
902
903
|
), b.setAttribute("aria-colindex", String(g + 2)), b.id = `scheduler-cell-w-${d}-${g}`, this.setData(b, {
|
|
903
904
|
dayIndex: d,
|
|
904
905
|
slotIndex: g,
|
|
905
|
-
start:
|
|
906
|
+
start: v.toISOString(),
|
|
906
907
|
end: y.toISOString()
|
|
907
908
|
});
|
|
908
909
|
const M = `${d}-${g}`;
|
|
909
910
|
this.slotElements.set(M, b), u.appendChild(b);
|
|
910
911
|
}
|
|
911
|
-
const
|
|
912
|
-
u.appendChild(
|
|
912
|
+
const m = this.createElement("div", "scheduler-events-container");
|
|
913
|
+
u.appendChild(m), this.dayColumns.push(u), l.appendChild(u);
|
|
913
914
|
}
|
|
914
|
-
|
|
915
|
+
r.appendChild(l), this.container.appendChild(r), this.renderEvents(), this.updateCellFocusAndSelection(), this.renderNowIndicator(s, a), this.applyGridRoles({
|
|
915
916
|
label: E(w(this.state.options.messages).weekGridLabel, {
|
|
916
917
|
date: h.formatDateWithWeekday(
|
|
917
918
|
h.getWeekStart(this.state.date, this.firstDayOfWeek),
|
|
@@ -937,12 +938,12 @@ class Te extends K {
|
|
|
937
938
|
}), this.markToday();
|
|
938
939
|
}
|
|
939
940
|
update(e) {
|
|
940
|
-
const t = this.state.date.getTime() !== e.date.getTime(), s = this.optionsRequireRerender(this.state.options, e.options),
|
|
941
|
+
const t = this.state.date.getTime() !== e.date.getTime(), s = this.optionsRequireRerender(this.state.options, e.options), n = this.state.selectedEvent?.id !== e.selectedEvent?.id;
|
|
941
942
|
if (this.state = e, t || s) {
|
|
942
943
|
this.render();
|
|
943
944
|
return;
|
|
944
945
|
}
|
|
945
|
-
this.updateGreyedSlots(),
|
|
946
|
+
this.updateGreyedSlots(), n ? this.renderEvents() : this.renderEvents(), this.updateCellFocusAndSelection(), this.renderPreviewEvent();
|
|
946
947
|
}
|
|
947
948
|
/**
|
|
948
949
|
* Apply roving tabindex and aria-selected to each cached slot element. Also
|
|
@@ -954,14 +955,14 @@ class Te extends K {
|
|
|
954
955
|
updateCellFocusAndSelection() {
|
|
955
956
|
const e = this.state.focusedCell;
|
|
956
957
|
let t = !1, s = null;
|
|
957
|
-
for (const [,
|
|
958
|
-
s || (s =
|
|
959
|
-
const
|
|
960
|
-
if (!
|
|
961
|
-
const
|
|
962
|
-
|
|
963
|
-
const l = Z(
|
|
964
|
-
|
|
958
|
+
for (const [, n] of this.slotElements) {
|
|
959
|
+
s || (s = n);
|
|
960
|
+
const i = n.dataset.start, r = n.dataset.end;
|
|
961
|
+
if (!i || !r) continue;
|
|
962
|
+
const o = { start: new Date(i), end: new Date(r) }, a = !!e && o.start.getTime() === e.start.getTime();
|
|
963
|
+
n.setAttribute("tabindex", a ? "0" : "-1");
|
|
964
|
+
const l = Z(o, this.state, null);
|
|
965
|
+
n.setAttribute("aria-selected", l ? "true" : "false"), n.classList.toggle("selected", l), a && (t = !0);
|
|
965
966
|
}
|
|
966
967
|
!t && s && s.setAttribute("tabindex", "0");
|
|
967
968
|
}
|
|
@@ -969,51 +970,51 @@ class Te extends K {
|
|
|
969
970
|
return e.slotDuration !== t.slotDuration || e.timeFormat !== t.timeFormat || e.firstDayOfWeek !== t.firstDayOfWeek || e.slotMinTime !== t.slotMinTime || e.slotMaxTime !== t.slotMaxTime || e.locale !== t.locale;
|
|
970
971
|
}
|
|
971
972
|
renderEvents() {
|
|
972
|
-
const { date: e, events: t, options: s } = this.state,
|
|
973
|
-
|
|
974
|
-
const
|
|
975
|
-
for (const c of
|
|
973
|
+
const { date: e, events: t, options: s } = this.state, n = h.getWeekDays(e, this.firstDayOfWeek), i = n[0], r = new Date(n[6]);
|
|
974
|
+
r.setHours(23, 59, 59, 999);
|
|
975
|
+
const o = C.filterByRange(t, i, r), a = [];
|
|
976
|
+
for (const c of o) {
|
|
976
977
|
const { parts: u } = C.splitInParts(c);
|
|
977
978
|
a.push(...u);
|
|
978
979
|
}
|
|
979
|
-
const l = C.filterPartsByRange(a,
|
|
980
|
+
const l = C.filterPartsByRange(a, i, r), d = C.getTimelinedParts(l);
|
|
980
981
|
this.eventElements.forEach((c) => c.remove()), this.eventElements.clear();
|
|
981
|
-
for (const { part: c, trackIndex: u, totalTracks:
|
|
982
|
+
for (const { part: c, trackIndex: u, totalTracks: m, colspan: g } of d) {
|
|
982
983
|
if (!c.event) continue;
|
|
983
|
-
const f =
|
|
984
|
+
const f = n.findIndex((M) => h.isSameDay(M, c.start));
|
|
984
985
|
if (f === -1) continue;
|
|
985
986
|
const y = this.dayColumns[f].querySelector(".scheduler-events-container");
|
|
986
987
|
if (!y) continue;
|
|
987
988
|
const b = this.createEventElement(
|
|
988
989
|
c,
|
|
989
990
|
u,
|
|
990
|
-
|
|
991
|
+
m,
|
|
991
992
|
g,
|
|
992
993
|
s.slotDuration ?? 1800
|
|
993
994
|
);
|
|
994
995
|
y.appendChild(b), this.eventElements.set(c.id, b);
|
|
995
996
|
}
|
|
996
997
|
}
|
|
997
|
-
createEventElement(e, t, s,
|
|
998
|
-
const
|
|
999
|
-
this.state.keyboardMoveEventId,
|
|
998
|
+
createEventElement(e, t, s, n, i) {
|
|
999
|
+
const r = e.event, o = this.createElement("div", "scheduler-event"), a = this.state.selectedEvent?.id === r.id;
|
|
1000
|
+
this.state.keyboardMoveEventId, r.id, o.setAttribute("role", "button"), o.setAttribute("tabindex", "0"), o.setAttribute(
|
|
1000
1001
|
"aria-label",
|
|
1001
|
-
W(
|
|
1002
|
-
),
|
|
1002
|
+
W(r, null, this.state.options)
|
|
1003
|
+
), o.setAttribute("aria-pressed", a ? "true" : "false"), o.setAttribute("aria-describedby", "scheduler-kbd-event"), a && o.classList.add("selected");
|
|
1003
1004
|
const l = this.partGeometry(e.start, e.end, {
|
|
1004
1005
|
...this.state.options,
|
|
1005
|
-
slotDuration:
|
|
1006
|
-
}), { top: d, height: c } = l ?? { top: 0, height: 0 }, u = t / s * 100,
|
|
1007
|
-
|
|
1006
|
+
slotDuration: i
|
|
1007
|
+
}), { top: d, height: c } = l ?? { top: 0, height: 0 }, u = t / s * 100, m = n / s * 100;
|
|
1008
|
+
o.style.top = `${d}px`, o.style.height = `${c}px`, o.style.left = `${u}%`, o.style.width = `calc(${m}% - 2px)`, this.applyEventColors(o, r), this.setData(o, { eventId: r.id });
|
|
1008
1009
|
const g = this.createElement("div", "event-content"), f = this.createElement("div", "event-title");
|
|
1009
|
-
f.textContent =
|
|
1010
|
-
const
|
|
1011
|
-
return
|
|
1010
|
+
f.textContent = r.title, g.appendChild(f);
|
|
1011
|
+
const v = this.createElement("div", "event-time");
|
|
1012
|
+
return v.textContent = h.formatTimeRange(
|
|
1012
1013
|
e.start,
|
|
1013
1014
|
e.end,
|
|
1014
1015
|
this.state.options.timeFormat,
|
|
1015
1016
|
this.state.options.locale
|
|
1016
|
-
), g.appendChild(
|
|
1017
|
+
), g.appendChild(v), o.appendChild(g), this.appendResizeHandles(o, e), o;
|
|
1017
1018
|
}
|
|
1018
1019
|
/**
|
|
1019
1020
|
* Dashed ghost showing where the dragged/created range will land — ONE box per
|
|
@@ -1022,36 +1023,36 @@ class Te extends K {
|
|
|
1022
1023
|
* box hanging out of the first column for a 3-day range.
|
|
1023
1024
|
*/
|
|
1024
1025
|
renderPreviewEvent() {
|
|
1025
|
-
this.container.querySelectorAll(".scheduler-event.preview").forEach((
|
|
1026
|
+
this.container.querySelectorAll(".scheduler-event.preview").forEach((r) => r.remove());
|
|
1026
1027
|
const { previewEvent: e, options: t, date: s } = this.state;
|
|
1027
1028
|
if (!e) return;
|
|
1028
|
-
const
|
|
1029
|
-
for (const
|
|
1030
|
-
const
|
|
1031
|
-
if (
|
|
1032
|
-
const a = this.dayColumns[
|
|
1029
|
+
const n = h.getWeekDays(s, this.firstDayOfWeek), { parts: i } = C.splitInParts(e);
|
|
1030
|
+
for (const r of i) {
|
|
1031
|
+
const o = n.findIndex((c) => h.isSameDay(c, r.start));
|
|
1032
|
+
if (o === -1) continue;
|
|
1033
|
+
const a = this.dayColumns[o]?.querySelector(".scheduler-events-container");
|
|
1033
1034
|
if (!a) continue;
|
|
1034
|
-
const l = this.partGeometry(
|
|
1035
|
+
const l = this.partGeometry(r.start, r.end, t);
|
|
1035
1036
|
if (!l) continue;
|
|
1036
1037
|
const d = this.createElement("div", "scheduler-event", "preview");
|
|
1037
|
-
|
|
1038
|
+
r.isStart || d.classList.add("preview-continues-before"), r.isEnd || d.classList.add("preview-continues-after"), d.style.top = `${l.top}px`, d.style.height = `${l.height}px`, d.style.left = "0", d.style.width = "100%", a.appendChild(d);
|
|
1038
1039
|
}
|
|
1039
1040
|
}
|
|
1040
1041
|
updateGreyedSlots() {
|
|
1041
|
-
const { dragState: e, previewEvent: t, options: s, date:
|
|
1042
|
-
if (this.slotElements.forEach((
|
|
1043
|
-
const
|
|
1044
|
-
|
|
1042
|
+
const { dragState: e, previewEvent: t, options: s, date: n } = this.state;
|
|
1043
|
+
if (this.slotElements.forEach((o) => o.classList.remove("greyed")), !e || !t) return;
|
|
1044
|
+
const i = h.getWeekDays(n, this.firstDayOfWeek), r = h.getTimeSlots(
|
|
1045
|
+
i[0],
|
|
1045
1046
|
s.slotDuration,
|
|
1046
1047
|
s.slotMinTime,
|
|
1047
1048
|
s.slotMaxTime
|
|
1048
1049
|
);
|
|
1049
|
-
for (let
|
|
1050
|
-
const a =
|
|
1051
|
-
for (let l = 0; l <
|
|
1052
|
-
const d =
|
|
1050
|
+
for (let o = 0; o < i.length; o++) {
|
|
1051
|
+
const a = i[o];
|
|
1052
|
+
for (let l = 0; l < r.length; l++) {
|
|
1053
|
+
const d = r[l], { start: c, end: u } = ne(d, a);
|
|
1053
1054
|
if (c < t.end && u > t.start) {
|
|
1054
|
-
const
|
|
1055
|
+
const m = `${o}-${l}`, g = this.slotElements.get(m);
|
|
1055
1056
|
g && g.classList.add("greyed");
|
|
1056
1057
|
}
|
|
1057
1058
|
}
|
|
@@ -1059,54 +1060,54 @@ class Te extends K {
|
|
|
1059
1060
|
}
|
|
1060
1061
|
renderNowIndicator(e, t) {
|
|
1061
1062
|
if (!this.state.options.nowIndicator) return;
|
|
1062
|
-
const s = /* @__PURE__ */ new Date(),
|
|
1063
|
-
if (
|
|
1064
|
-
const
|
|
1065
|
-
if (!
|
|
1066
|
-
const
|
|
1067
|
-
|
|
1068
|
-
const
|
|
1069
|
-
d.style.top = `${l}px`,
|
|
1063
|
+
const s = /* @__PURE__ */ new Date(), n = e.findIndex((c) => h.isSameDay(c, s));
|
|
1064
|
+
if (n === -1) return;
|
|
1065
|
+
const i = this.dayColumns[n];
|
|
1066
|
+
if (!i) return;
|
|
1067
|
+
const r = new Date(s);
|
|
1068
|
+
r.setHours(0, 0, 0, 0);
|
|
1069
|
+
const o = (s.getTime() - r.getTime()) / (1e3 * 60), a = (this.state.options.slotDuration ?? 1800) / 60, l = o / a * 40, d = this.createElement("div", "scheduler-now-indicator");
|
|
1070
|
+
d.style.top = `${l}px`, i.appendChild(d);
|
|
1070
1071
|
}
|
|
1071
1072
|
updateNowIndicator() {
|
|
1072
1073
|
if (!this.state.options.nowIndicator) return;
|
|
1073
|
-
const { date: e, options: t } = this.state, s = h.getWeekDays(e, this.firstDayOfWeek),
|
|
1074
|
-
if (
|
|
1075
|
-
const
|
|
1076
|
-
if (!
|
|
1077
|
-
const
|
|
1074
|
+
const { date: e, options: t } = this.state, s = h.getWeekDays(e, this.firstDayOfWeek), n = /* @__PURE__ */ new Date(), i = s.findIndex((u) => h.isSameDay(u, n));
|
|
1075
|
+
if (i === -1) return;
|
|
1076
|
+
const r = this.dayColumns[i];
|
|
1077
|
+
if (!r) return;
|
|
1078
|
+
const o = r.querySelector(".scheduler-now-indicator"), a = new Date(n);
|
|
1078
1079
|
a.setHours(0, 0, 0, 0);
|
|
1079
|
-
const l = (
|
|
1080
|
-
if (
|
|
1081
|
-
|
|
1080
|
+
const l = (n.getTime() - a.getTime()) / (1e3 * 60), d = (t.slotDuration ?? 1800) / 60, c = l / d * 40;
|
|
1081
|
+
if (o)
|
|
1082
|
+
o.style.top = `${c}px`;
|
|
1082
1083
|
else {
|
|
1083
1084
|
const u = this.createElement("div", "scheduler-now-indicator");
|
|
1084
|
-
u.style.top = `${c}px`,
|
|
1085
|
+
u.style.top = `${c}px`, r.appendChild(u);
|
|
1085
1086
|
}
|
|
1086
1087
|
}
|
|
1087
1088
|
destroy() {
|
|
1088
1089
|
this.eventElements.clear(), this.slotElements.clear(), this.dayColumns = [], this.clearContainer();
|
|
1089
1090
|
}
|
|
1090
1091
|
}
|
|
1091
|
-
class
|
|
1092
|
+
class Ae extends K {
|
|
1092
1093
|
constructor() {
|
|
1093
1094
|
super(...arguments), this.eventsContainer = null, this.slotElements = /* @__PURE__ */ new Map(), this.dayColumn = null;
|
|
1094
1095
|
}
|
|
1095
1096
|
render() {
|
|
1096
1097
|
this.clearContainer(), this.container.classList.add("scheduler-day-view");
|
|
1097
|
-
const { date: e, options: t } = this.state, s = this.createElement("div", "scheduler-day-headers"),
|
|
1098
|
-
|
|
1099
|
-
const
|
|
1100
|
-
h.isToday(e) &&
|
|
1101
|
-
const
|
|
1102
|
-
|
|
1103
|
-
const
|
|
1104
|
-
|
|
1098
|
+
const { date: e, options: t } = this.state, s = this.createElement("div", "scheduler-day-headers"), n = this.createElement("div", "scheduler-time-gutter-space");
|
|
1099
|
+
n.style.width = "var(--scheduler-time-gutter-width)", s.appendChild(n);
|
|
1100
|
+
const i = this.createElement("div", "scheduler-day-header");
|
|
1101
|
+
h.isToday(e) && i.classList.add("today");
|
|
1102
|
+
const r = this.createElement("div", "day-name");
|
|
1103
|
+
r.textContent = h.getDayName(e, t.locale);
|
|
1104
|
+
const o = this.createElement("div", "day-number");
|
|
1105
|
+
o.textContent = String(e.getDate());
|
|
1105
1106
|
const a = this.createElement("div", "month-year");
|
|
1106
1107
|
a.textContent = h.formatDate(e, t.locale, {
|
|
1107
1108
|
month: "long",
|
|
1108
1109
|
year: "numeric"
|
|
1109
|
-
}), a.style.fontSize = "12px", a.style.color = "#666",
|
|
1110
|
+
}), a.style.fontSize = "12px", a.style.color = "#666", i.appendChild(r), i.appendChild(o), i.appendChild(a), s.appendChild(i), this.container.appendChild(s);
|
|
1110
1111
|
const l = this.createElement("div", "scheduler-time-grid"), d = this.createElement("div", "scheduler-time-gutter"), c = h.getTimeSlots(
|
|
1111
1112
|
e,
|
|
1112
1113
|
t.slotDuration,
|
|
@@ -1120,16 +1121,16 @@ class Ie extends K {
|
|
|
1120
1121
|
l.appendChild(d);
|
|
1121
1122
|
const u = this.createElement("div", "scheduler-days-container");
|
|
1122
1123
|
this.dayColumn = this.createElement("div", "scheduler-day-column");
|
|
1123
|
-
const
|
|
1124
|
+
const m = this.dayColumn;
|
|
1124
1125
|
for (let g = 0; g < c.length; g++) {
|
|
1125
|
-
const f = c[g],
|
|
1126
|
-
|
|
1126
|
+
const f = c[g], v = this.createElement("div", "scheduler-time-slot");
|
|
1127
|
+
v.setAttribute("role", "gridcell"), v.setAttribute("tabindex", "-1"), v.setAttribute("aria-selected", "false"), v.setAttribute("aria-label", q(f, t)), v.id = `scheduler-cell-d-${g}`, this.setData(v, {
|
|
1127
1128
|
slotIndex: g,
|
|
1128
1129
|
start: f.start.toISOString(),
|
|
1129
1130
|
end: f.end.toISOString()
|
|
1130
|
-
}), this.slotElements.set(g,
|
|
1131
|
+
}), this.slotElements.set(g, v), m.appendChild(v);
|
|
1131
1132
|
}
|
|
1132
|
-
this.eventsContainer = this.createElement("div", "scheduler-events-container"),
|
|
1133
|
+
this.eventsContainer = this.createElement("div", "scheduler-events-container"), m.appendChild(this.eventsContainer), u.appendChild(m), l.appendChild(u), this.container.appendChild(l), this.renderEvents(), this.updateCellFocusAndSelection(), h.isToday(e) && t.nowIndicator && this.renderNowIndicator(m), this.applyGridRoles({
|
|
1133
1134
|
label: E(w(this.state.options.messages).dayGridLabel, {
|
|
1134
1135
|
date: h.formatDateWithWeekday(this.state.date, this.state.options.locale)
|
|
1135
1136
|
}),
|
|
@@ -1158,75 +1159,75 @@ class Ie extends K {
|
|
|
1158
1159
|
updateCellFocusAndSelection() {
|
|
1159
1160
|
const e = this.state.focusedCell;
|
|
1160
1161
|
let t = !1, s = null;
|
|
1161
|
-
for (const [,
|
|
1162
|
-
s || (s =
|
|
1163
|
-
const
|
|
1164
|
-
if (!
|
|
1165
|
-
const
|
|
1166
|
-
|
|
1167
|
-
const l = Z(
|
|
1168
|
-
|
|
1162
|
+
for (const [, n] of this.slotElements) {
|
|
1163
|
+
s || (s = n);
|
|
1164
|
+
const i = n.dataset.start, r = n.dataset.end;
|
|
1165
|
+
if (!i || !r) continue;
|
|
1166
|
+
const o = { start: new Date(i), end: new Date(r) }, a = !!e && o.start.getTime() === e.start.getTime();
|
|
1167
|
+
n.setAttribute("tabindex", a ? "0" : "-1");
|
|
1168
|
+
const l = Z(o, this.state, null);
|
|
1169
|
+
n.setAttribute("aria-selected", l ? "true" : "false"), n.classList.toggle("selected", l), a && (t = !0);
|
|
1169
1170
|
}
|
|
1170
1171
|
!t && s && s.setAttribute("tabindex", "0");
|
|
1171
1172
|
}
|
|
1172
1173
|
renderEvents() {
|
|
1173
1174
|
if (!this.eventsContainer) return;
|
|
1174
1175
|
this.eventsContainer.innerHTML = "";
|
|
1175
|
-
const { date: e, events: t, options: s } = this.state,
|
|
1176
|
-
|
|
1177
|
-
const
|
|
1178
|
-
|
|
1179
|
-
const
|
|
1180
|
-
for (const l of
|
|
1181
|
-
const { parts: d } = C.splitInParts(l), c = C.filterPartsByRange(d,
|
|
1182
|
-
|
|
1176
|
+
const { date: e, events: t, options: s } = this.state, n = new Date(e);
|
|
1177
|
+
n.setHours(0, 0, 0, 0);
|
|
1178
|
+
const i = new Date(e);
|
|
1179
|
+
i.setHours(23, 59, 59, 999);
|
|
1180
|
+
const r = C.filterByRange(t, n, i), o = [];
|
|
1181
|
+
for (const l of r) {
|
|
1182
|
+
const { parts: d } = C.splitInParts(l), c = C.filterPartsByRange(d, n, i);
|
|
1183
|
+
o.push(...c);
|
|
1183
1184
|
}
|
|
1184
|
-
const a = C.getTimelinedParts(
|
|
1185
|
+
const a = C.getTimelinedParts(o);
|
|
1185
1186
|
for (const { part: l, trackIndex: d, totalTracks: c, colspan: u } of a) {
|
|
1186
1187
|
if (!l.event) continue;
|
|
1187
|
-
const
|
|
1188
|
+
const m = this.createEventElement(
|
|
1188
1189
|
l,
|
|
1189
1190
|
d,
|
|
1190
1191
|
c,
|
|
1191
1192
|
u,
|
|
1192
1193
|
s.slotDuration ?? 1800
|
|
1193
1194
|
);
|
|
1194
|
-
this.eventsContainer.appendChild(
|
|
1195
|
+
this.eventsContainer.appendChild(m);
|
|
1195
1196
|
}
|
|
1196
1197
|
}
|
|
1197
|
-
createEventElement(e, t, s,
|
|
1198
|
-
const
|
|
1199
|
-
this.state.keyboardMoveEventId,
|
|
1198
|
+
createEventElement(e, t, s, n, i) {
|
|
1199
|
+
const r = e.event, o = this.createElement("div", "scheduler-event"), a = this.state.selectedEvent?.id === r.id;
|
|
1200
|
+
this.state.keyboardMoveEventId, r.id, o.setAttribute("role", "button"), o.setAttribute("tabindex", "0"), o.setAttribute(
|
|
1200
1201
|
"aria-label",
|
|
1201
|
-
W(
|
|
1202
|
-
),
|
|
1202
|
+
W(r, null, this.state.options)
|
|
1203
|
+
), o.setAttribute("aria-pressed", a ? "true" : "false"), o.setAttribute("aria-describedby", "scheduler-kbd-event"), a && o.classList.add("selected");
|
|
1203
1204
|
const l = this.partGeometry(e.start, e.end, {
|
|
1204
1205
|
...this.state.options,
|
|
1205
|
-
slotDuration:
|
|
1206
|
-
}), { top: d, height: c } = l ?? { top: 0, height: 0 }, u = t / s * 100,
|
|
1207
|
-
|
|
1206
|
+
slotDuration: i
|
|
1207
|
+
}), { top: d, height: c } = l ?? { top: 0, height: 0 }, u = t / s * 100, m = n / s * 100;
|
|
1208
|
+
o.style.top = `${d}px`, o.style.height = `${c}px`, o.style.left = `${u}%`, o.style.width = `calc(${m}% - 2px)`, this.applyEventColors(o, r), this.setData(o, { eventId: r.id });
|
|
1208
1209
|
const g = this.createElement("div", "event-content"), f = this.createElement("div", "event-title");
|
|
1209
|
-
f.textContent =
|
|
1210
|
-
const
|
|
1211
|
-
return
|
|
1210
|
+
f.textContent = r.title, g.appendChild(f);
|
|
1211
|
+
const v = this.createElement("div", "event-time");
|
|
1212
|
+
return v.textContent = h.formatTimeRange(
|
|
1212
1213
|
e.start,
|
|
1213
1214
|
e.end,
|
|
1214
1215
|
this.state.options.timeFormat,
|
|
1215
1216
|
this.state.options.locale
|
|
1216
|
-
), g.appendChild(
|
|
1217
|
+
), g.appendChild(v), o.appendChild(g), this.appendResizeHandles(o, e), o;
|
|
1217
1218
|
}
|
|
1218
1219
|
renderNowIndicator(e) {
|
|
1219
1220
|
const t = /* @__PURE__ */ new Date(), s = new Date(t);
|
|
1220
1221
|
s.setHours(0, 0, 0, 0);
|
|
1221
|
-
const
|
|
1222
|
-
|
|
1222
|
+
const n = (t.getTime() - s.getTime()) / (1e3 * 60), i = (this.state.options.slotDuration ?? 1800) / 60, r = n / i * 40, o = this.createElement("div", "scheduler-now-indicator");
|
|
1223
|
+
o.style.top = `${r}px`, e.appendChild(o);
|
|
1223
1224
|
}
|
|
1224
1225
|
updateNowIndicator() {
|
|
1225
1226
|
if (!this.dayColumn || !this.state.options.nowIndicator || !h.isToday(this.state.date)) return;
|
|
1226
1227
|
const e = this.dayColumn.querySelector(".scheduler-now-indicator"), t = /* @__PURE__ */ new Date(), s = new Date(t);
|
|
1227
1228
|
s.setHours(0, 0, 0, 0);
|
|
1228
|
-
const
|
|
1229
|
-
e ? e.style.top = `${
|
|
1229
|
+
const n = (t.getTime() - s.getTime()) / (1e3 * 60), i = (this.state.options.slotDuration ?? 1800) / 60, r = n / i * 40;
|
|
1230
|
+
e ? e.style.top = `${r}px` : this.renderNowIndicator(this.dayColumn);
|
|
1230
1231
|
}
|
|
1231
1232
|
update(e) {
|
|
1232
1233
|
const t = this.state.date.getTime() !== e.date.getTime(), s = this.optionsRequireRerender(this.state.options, e.options);
|
|
@@ -1240,18 +1241,18 @@ class Ie extends K {
|
|
|
1240
1241
|
return e.slotDuration !== t.slotDuration || e.timeFormat !== t.timeFormat || e.slotMinTime !== t.slotMinTime || e.slotMaxTime !== t.slotMaxTime || e.locale !== t.locale;
|
|
1241
1242
|
}
|
|
1242
1243
|
updateGreyedSlots() {
|
|
1243
|
-
const { dragState: e, previewEvent: t, options: s, date:
|
|
1244
|
-
if (this.slotElements.forEach((
|
|
1245
|
-
const
|
|
1246
|
-
|
|
1244
|
+
const { dragState: e, previewEvent: t, options: s, date: n } = this.state;
|
|
1245
|
+
if (this.slotElements.forEach((r) => r.classList.remove("greyed")), !e || !t) return;
|
|
1246
|
+
const i = h.getTimeSlots(
|
|
1247
|
+
n,
|
|
1247
1248
|
s.slotDuration,
|
|
1248
1249
|
s.slotMinTime,
|
|
1249
1250
|
s.slotMaxTime
|
|
1250
1251
|
);
|
|
1251
|
-
for (let
|
|
1252
|
-
const
|
|
1253
|
-
if (
|
|
1254
|
-
const a = this.slotElements.get(
|
|
1252
|
+
for (let r = 0; r < i.length; r++) {
|
|
1253
|
+
const o = i[r];
|
|
1254
|
+
if (o.start < t.end && o.end > t.start) {
|
|
1255
|
+
const a = this.slotElements.get(r);
|
|
1255
1256
|
a && a.classList.add("greyed");
|
|
1256
1257
|
}
|
|
1257
1258
|
}
|
|
@@ -1267,12 +1268,12 @@ class Ie extends K {
|
|
|
1267
1268
|
this.eventsContainer.querySelectorAll(".scheduler-event.preview").forEach((a) => a.remove());
|
|
1268
1269
|
const { previewEvent: e, options: t, date: s } = this.state;
|
|
1269
1270
|
if (!e) return;
|
|
1270
|
-
const { parts:
|
|
1271
|
-
if (!
|
|
1272
|
-
const
|
|
1273
|
-
if (!
|
|
1274
|
-
const
|
|
1275
|
-
|
|
1271
|
+
const { parts: n } = C.splitInParts(e), i = n.find((a) => h.isSameDay(s, a.start));
|
|
1272
|
+
if (!i) return;
|
|
1273
|
+
const r = this.partGeometry(i.start, i.end, t);
|
|
1274
|
+
if (!r) return;
|
|
1275
|
+
const o = this.createElement("div", "scheduler-event", "preview");
|
|
1276
|
+
i.isStart || o.classList.add("preview-continues-before"), i.isEnd || o.classList.add("preview-continues-after"), o.style.top = `${r.top}px`, o.style.height = `${r.height}px`, o.style.left = "0", o.style.width = "100%", this.eventsContainer.appendChild(o);
|
|
1276
1277
|
}
|
|
1277
1278
|
destroy() {
|
|
1278
1279
|
this.eventsContainer = null, this.dayColumn = null, this.slotElements.clear(), this.clearContainer();
|
|
@@ -1302,9 +1303,9 @@ class I extends K {
|
|
|
1302
1303
|
* the way week/day must (there, height IS duration).
|
|
1303
1304
|
*/
|
|
1304
1305
|
get trackMetrics() {
|
|
1305
|
-
const e = getComputedStyle(this.container), t = (s,
|
|
1306
|
-
const
|
|
1307
|
-
return Number.isFinite(
|
|
1306
|
+
const e = getComputedStyle(this.container), t = (s, n) => {
|
|
1307
|
+
const i = Number.parseFloat(e.getPropertyValue(s).trim());
|
|
1308
|
+
return Number.isFinite(i) && i >= 0 ? i : n;
|
|
1308
1309
|
};
|
|
1309
1310
|
return {
|
|
1310
1311
|
height: t("--scheduler-timeline-event-height", 28),
|
|
@@ -1314,31 +1315,31 @@ class I extends K {
|
|
|
1314
1315
|
}
|
|
1315
1316
|
render() {
|
|
1316
1317
|
this.captureActionFocus(), this.clearContainer(), this.container.classList.add("scheduler-timeline-view");
|
|
1317
|
-
const { date: e, options: t, resources: s, collapsedGroups:
|
|
1318
|
+
const { date: e, options: t, resources: s, collapsedGroups: n } = this.state, i = h.getWeekDays(e, this.firstDayOfWeek), r = i.map(
|
|
1318
1319
|
(D) => h.getTimeSlots(D, t.slotDuration, t.slotMinTime, t.slotMaxTime)
|
|
1319
|
-
),
|
|
1320
|
+
), o = r.reduce((D, T) => D + T.length, 0), a = O.flatten(s, n), l = this.hasUnassignedRow(this.state), d = a.filter((D) => D.visible).length + 2 + (l ? 1 : 0), c = this.createElement("div", "scheduler-timeline");
|
|
1320
1321
|
c.setAttribute("role", "grid"), c.setAttribute(
|
|
1321
1322
|
"aria-label",
|
|
1322
1323
|
E(w(t.messages).timelineGridLabel, {
|
|
1323
|
-
date: h.formatDateWithWeekday(
|
|
1324
|
+
date: h.formatDateWithWeekday(i[0], t.locale)
|
|
1324
1325
|
})
|
|
1325
|
-
), c.setAttribute("aria-rowcount", String(d)), c.setAttribute("aria-colcount", String(1 +
|
|
1326
|
+
), c.setAttribute("aria-rowcount", String(d)), c.setAttribute("aria-colcount", String(1 + o)), c.setAttribute("aria-describedby", "scheduler-kbd-grid"), c.setAttribute("aria-multiselectable", "true");
|
|
1326
1327
|
const u = this.createElement("div", "scheduler-timeline-header");
|
|
1327
1328
|
u.setAttribute("role", "row"), u.setAttribute("aria-rowindex", "1");
|
|
1328
|
-
const
|
|
1329
|
-
|
|
1329
|
+
const m = this.createElement("div", "scheduler-resource-header");
|
|
1330
|
+
m.setAttribute("role", "columnheader"), m.setAttribute("aria-colindex", "1"), m.textContent = w(this.state.options.messages).resourcesHeader, m.appendChild(this.createColumnResizer()), u.appendChild(m);
|
|
1330
1331
|
const g = this.createElement("div", "scheduler-timeline-slots-header");
|
|
1331
1332
|
g.setAttribute("role", "presentation");
|
|
1332
1333
|
let f = 2;
|
|
1333
|
-
for (const [D, T] of
|
|
1334
|
-
const V =
|
|
1334
|
+
for (const [D, T] of i.entries()) {
|
|
1335
|
+
const V = r[D].length, P = this.createElement("div", "scheduler-timeline-slot-header", "day");
|
|
1335
1336
|
P.setAttribute("role", "columnheader"), P.setAttribute("aria-colindex", String(f)), P.setAttribute("aria-colspan", String(V)), f += V, P.style.width = `${V * this.slotWidth}px`;
|
|
1336
1337
|
const ee = this.createElement("span", "day-label");
|
|
1337
1338
|
ee.textContent = h.formatDateWithWeekday(T, t.locale), P.appendChild(ee), P.style.borderBottom = "1px solid var(--scheduler-border-color)", g.appendChild(P);
|
|
1338
1339
|
}
|
|
1339
1340
|
u.appendChild(g);
|
|
1340
|
-
const
|
|
1341
|
-
|
|
1341
|
+
const v = this.createElement("div", "scheduler-timeline-head");
|
|
1342
|
+
v.appendChild(u), c.appendChild(v);
|
|
1342
1343
|
const y = this.createElement("div", "scheduler-timeline-header");
|
|
1343
1344
|
y.setAttribute("role", "row"), y.setAttribute("aria-rowindex", "2");
|
|
1344
1345
|
const b = this.createElement("div", "scheduler-resource-header");
|
|
@@ -1346,21 +1347,21 @@ class I extends K {
|
|
|
1346
1347
|
const M = this.createElement("div", "scheduler-timeline-slots-header");
|
|
1347
1348
|
M.setAttribute("role", "presentation");
|
|
1348
1349
|
let A = 2;
|
|
1349
|
-
for (const D of
|
|
1350
|
+
for (const D of r)
|
|
1350
1351
|
for (const T of D) {
|
|
1351
1352
|
const R = this.createElement("div", "scheduler-timeline-slot-header");
|
|
1352
1353
|
R.setAttribute("role", "columnheader"), R.setAttribute("aria-colindex", String(A)), A++, R.style.width = `${this.slotWidth}px`, R.textContent = h.formatTime(T.start, t.timeFormat, t.locale), R.style.fontSize = "10px", M.appendChild(R);
|
|
1353
1354
|
}
|
|
1354
|
-
y.appendChild(M),
|
|
1355
|
-
const x = this.createElement("div", "scheduler-timeline-body"), F = O.flatten(s,
|
|
1355
|
+
y.appendChild(M), v.appendChild(y);
|
|
1356
|
+
const x = this.createElement("div", "scheduler-timeline-body"), F = O.flatten(s, n);
|
|
1356
1357
|
let L = 3;
|
|
1357
1358
|
for (const D of F) {
|
|
1358
1359
|
if (!D.visible) continue;
|
|
1359
|
-
const T = this.createResourceRow(D,
|
|
1360
|
+
const T = this.createResourceRow(D, r);
|
|
1360
1361
|
T.setAttribute("aria-rowindex", String(L)), x.appendChild(T), L++;
|
|
1361
1362
|
}
|
|
1362
1363
|
if (l) {
|
|
1363
|
-
const D = this.createUnassignedRow(
|
|
1364
|
+
const D = this.createUnassignedRow(r);
|
|
1364
1365
|
D.setAttribute("aria-rowindex", String(L)), x.appendChild(D), L++;
|
|
1365
1366
|
}
|
|
1366
1367
|
if (c.appendChild(x), this.container.appendChild(c), F.length === 0 && !l) {
|
|
@@ -1368,7 +1369,7 @@ class I extends K {
|
|
|
1368
1369
|
D.textContent = w(t.messages).noResources, x.appendChild(D);
|
|
1369
1370
|
}
|
|
1370
1371
|
const Q = this.createAddBar();
|
|
1371
|
-
Q && this.container.appendChild(Q), this.renderEvents(
|
|
1372
|
+
Q && this.container.appendChild(Q), this.renderEvents(i), this.updateCellFocusAndSelection(), this.restoreActionFocus();
|
|
1372
1373
|
}
|
|
1373
1374
|
/**
|
|
1374
1375
|
* Focus key of an action control: what it does plus which row it belongs to.
|
|
@@ -1400,7 +1401,7 @@ class I extends K {
|
|
|
1400
1401
|
if (this.pendingFocusKey = null, !e) return;
|
|
1401
1402
|
const t = Array.from(
|
|
1402
1403
|
this.container.querySelectorAll("[data-action]")
|
|
1403
|
-
).find((
|
|
1404
|
+
).find((n) => this.actionFocusKey(n) === e), s = this.container.querySelector(".scheduler-add-button");
|
|
1404
1405
|
(t ?? s)?.focus();
|
|
1405
1406
|
}
|
|
1406
1407
|
/**
|
|
@@ -1410,22 +1411,22 @@ class I extends K {
|
|
|
1410
1411
|
*/
|
|
1411
1412
|
updateCellFocusAndSelection() {
|
|
1412
1413
|
const e = this.state.focusedCell, t = this.state.focusedResourceId, s = this.container.querySelectorAll(".scheduler-timeline-slot");
|
|
1413
|
-
let
|
|
1414
|
-
s.forEach((
|
|
1415
|
-
|
|
1416
|
-
const
|
|
1417
|
-
if (!
|
|
1418
|
-
const d = { start: new Date(
|
|
1419
|
-
|
|
1414
|
+
let n = !1, i = null;
|
|
1415
|
+
s.forEach((r) => {
|
|
1416
|
+
i || (i = r);
|
|
1417
|
+
const o = r.dataset.start, a = r.dataset.end, l = r.dataset.resourceId ?? null;
|
|
1418
|
+
if (!o || !a) return;
|
|
1419
|
+
const d = { start: new Date(o), end: new Date(a) }, c = !!e && d.start.getTime() === e.start.getTime() && t === l;
|
|
1420
|
+
r.setAttribute("tabindex", c ? "0" : "-1");
|
|
1420
1421
|
const u = Z(d, this.state, l);
|
|
1421
|
-
|
|
1422
|
-
}), !
|
|
1422
|
+
r.setAttribute("aria-selected", u ? "true" : "false"), r.classList.toggle("selected", u), c && (n = !0);
|
|
1423
|
+
}), !n && i && i.setAttribute("tabindex", "0");
|
|
1423
1424
|
}
|
|
1424
1425
|
createResourceRow(e, t) {
|
|
1425
|
-
const { options: s } = this.state,
|
|
1426
|
-
|
|
1427
|
-
const
|
|
1428
|
-
if (
|
|
1426
|
+
const { options: s } = this.state, n = this.createElement("div", "scheduler-timeline-row");
|
|
1427
|
+
n.setAttribute("role", "row"), H(e.item) && n.classList.add("group");
|
|
1428
|
+
const i = this.createElement("div", "scheduler-resource-cell");
|
|
1429
|
+
if (i.setAttribute("role", "rowheader"), i.setAttribute("aria-colindex", "1"), i.style.paddingLeft = `${8 + e.depth * 16}px`, H(e.item)) {
|
|
1429
1430
|
const l = this.createElement("button", "expand-toggle");
|
|
1430
1431
|
l.type = "button";
|
|
1431
1432
|
const d = this.state.collapsedGroups.has(e.item.id);
|
|
@@ -1435,12 +1436,12 @@ class I extends K {
|
|
|
1435
1436
|
w(this.state.options.messages)[d ? "expandGroup" : "collapseGroup"],
|
|
1436
1437
|
{ title: e.item.title }
|
|
1437
1438
|
)
|
|
1438
|
-
), this.setData(l, { action: "toggle-group", groupId: e.item.id }),
|
|
1439
|
+
), this.setData(l, { action: "toggle-group", groupId: e.item.id }), i.appendChild(l);
|
|
1439
1440
|
}
|
|
1440
|
-
const
|
|
1441
|
-
|
|
1442
|
-
const
|
|
1443
|
-
|
|
1441
|
+
const r = this.createElement("span", "resource-title");
|
|
1442
|
+
r.textContent = e.item.title, r.title = e.item.title, this.can("updateResource") && this.setData(r, { resourceId: e.item.id }), i.appendChild(r), this.appendResourceActions(i, e.item), n.appendChild(i);
|
|
1443
|
+
const o = this.createElement("div", "scheduler-timeline-slots");
|
|
1444
|
+
o.setAttribute("role", "presentation");
|
|
1444
1445
|
let a = 2;
|
|
1445
1446
|
for (const l of t)
|
|
1446
1447
|
for (const d of l) {
|
|
@@ -1452,13 +1453,13 @@ class I extends K {
|
|
|
1452
1453
|
resourceId: e.item.id,
|
|
1453
1454
|
start: d.start.toISOString(),
|
|
1454
1455
|
end: d.end.toISOString()
|
|
1455
|
-
}),
|
|
1456
|
+
}), o.appendChild(c);
|
|
1456
1457
|
}
|
|
1457
|
-
if (
|
|
1458
|
+
if (ie(e.item)) {
|
|
1458
1459
|
const l = this.createElement("div", "scheduler-timeline-events");
|
|
1459
|
-
l.setAttribute("role", "gridcell"), l.setAttribute("aria-colindex", "2"), l.setAttribute("aria-colspan", String(a - 2)),
|
|
1460
|
+
l.setAttribute("role", "gridcell"), l.setAttribute("aria-colindex", "2"), l.setAttribute("aria-colspan", String(a - 2)), o.appendChild(l);
|
|
1460
1461
|
}
|
|
1461
|
-
return
|
|
1462
|
+
return n.appendChild(o), this.rowElements.set(e.item.id, n), n;
|
|
1462
1463
|
}
|
|
1463
1464
|
/**
|
|
1464
1465
|
* Whether the synthetic bucket row renders: only when something is actually
|
|
@@ -1499,13 +1500,13 @@ class I extends K {
|
|
|
1499
1500
|
return t.setAttribute("role", "separator"), t.setAttribute("tabindex", "0"), t.setAttribute("aria-orientation", "vertical"), t.setAttribute("aria-label", e.resizeResourceColumn), this.updateResizerValue(t), t.addEventListener("pointerdown", (s) => {
|
|
1500
1501
|
s.preventDefault(), s.stopPropagation(), this.columnDrag = { startX: s.clientX, startWidth: this.currentColumnWidth() }, document.addEventListener("pointermove", this.boundColumnDragMove), document.addEventListener("pointerup", this.boundColumnDragEnd);
|
|
1501
1502
|
}), t.addEventListener("keydown", (s) => {
|
|
1502
|
-
const
|
|
1503
|
+
const i = this.currentColumnWidth();
|
|
1503
1504
|
switch (s.key) {
|
|
1504
1505
|
case "ArrowLeft":
|
|
1505
|
-
s.preventDefault(), this.applyColumnWidth(
|
|
1506
|
+
s.preventDefault(), this.applyColumnWidth(i - 16);
|
|
1506
1507
|
break;
|
|
1507
1508
|
case "ArrowRight":
|
|
1508
|
-
s.preventDefault(), this.applyColumnWidth(
|
|
1509
|
+
s.preventDefault(), this.applyColumnWidth(i + 16);
|
|
1509
1510
|
break;
|
|
1510
1511
|
case "Home":
|
|
1511
1512
|
s.preventDefault(), this.applyColumnWidth(I.MIN_COLUMN_PX);
|
|
@@ -1538,8 +1539,8 @@ class I extends K {
|
|
|
1538
1539
|
}
|
|
1539
1540
|
/** aria-valuenow as a percentage of the scroller, per the splitter pattern. */
|
|
1540
1541
|
updateResizerValue(e, t) {
|
|
1541
|
-
const s = this.container.clientWidth || 1,
|
|
1542
|
-
e.setAttribute("aria-valuemin", "0"), e.setAttribute("aria-valuemax", "100"), e.setAttribute("aria-valuenow", String(Math.round(
|
|
1542
|
+
const s = this.container.clientWidth || 1, n = t ?? this.currentColumnWidth();
|
|
1543
|
+
e.setAttribute("aria-valuemin", "0"), e.setAttribute("aria-valuemax", "100"), e.setAttribute("aria-valuenow", String(Math.round(n / s * 100)));
|
|
1543
1544
|
}
|
|
1544
1545
|
onColumnDragMove(e) {
|
|
1545
1546
|
this.columnDrag && this.applyColumnWidth(this.columnDrag.startWidth + (e.clientX - this.columnDrag.startX));
|
|
@@ -1549,7 +1550,7 @@ class I extends K {
|
|
|
1549
1550
|
}
|
|
1550
1551
|
/** True when the capability is granted for the whole scheduler. */
|
|
1551
1552
|
can(e) {
|
|
1552
|
-
return
|
|
1553
|
+
return re(e, { permissions: this.state.resolvedPermissions });
|
|
1553
1554
|
}
|
|
1554
1555
|
/**
|
|
1555
1556
|
* Per-row resource actions, rendered into the pinned rowheader cell.
|
|
@@ -1597,12 +1598,12 @@ class I extends K {
|
|
|
1597
1598
|
*/
|
|
1598
1599
|
appendResourceActions(e, t) {
|
|
1599
1600
|
if (this.rowActions(t).length === 0) return;
|
|
1600
|
-
const s = w(this.state.options.messages),
|
|
1601
|
-
|
|
1602
|
-
const
|
|
1603
|
-
|
|
1601
|
+
const s = w(this.state.options.messages), n = E(s.rowMenuLabel, { title: t.title }), i = this.createElement("button", "scheduler-row-menu-button");
|
|
1602
|
+
i.type = "button", i.setAttribute("aria-label", n), i.title = n, i.setAttribute("aria-haspopup", "dialog"), i.setAttribute("aria-expanded", "false"), i.tabIndex = -1, this.setData(i, { action: "row-menu", resourceId: t.id });
|
|
1603
|
+
const o = t.eventColor ?? t.color, a = o ? ge(o) : null;
|
|
1604
|
+
o && a && (i.style.background = o, i.style.color = a, i.style.borderColor = o);
|
|
1604
1605
|
const l = this.createElement("span", "action-glyph");
|
|
1605
|
-
l.setAttribute("aria-hidden", "true"), l.textContent = "⋯",
|
|
1606
|
+
l.setAttribute("aria-hidden", "true"), l.textContent = "⋯", i.appendChild(l), e.insertBefore(i, e.firstChild);
|
|
1606
1607
|
}
|
|
1607
1608
|
/**
|
|
1608
1609
|
* Root-level "Add resource" / "Add group" bar, pinned to the bottom of the
|
|
@@ -1616,16 +1617,16 @@ class I extends K {
|
|
|
1616
1617
|
createAddBar() {
|
|
1617
1618
|
const e = this.can("createResource"), t = this.can("createGroup");
|
|
1618
1619
|
if (!e && !t) return null;
|
|
1619
|
-
const s = w(this.state.options.messages),
|
|
1620
|
-
if (
|
|
1621
|
-
const
|
|
1622
|
-
|
|
1620
|
+
const s = w(this.state.options.messages), n = this.createElement("div", "scheduler-timeline-addbar");
|
|
1621
|
+
if (n.setAttribute("role", "toolbar"), n.setAttribute("aria-label", s.addResourceBarLabel), e) {
|
|
1622
|
+
const i = this.createElement("button", "scheduler-add-button");
|
|
1623
|
+
i.type = "button", i.textContent = s.addResource, this.setData(i, { action: "add-resource" }), n.appendChild(i);
|
|
1623
1624
|
}
|
|
1624
1625
|
if (t) {
|
|
1625
|
-
const
|
|
1626
|
-
|
|
1626
|
+
const i = this.createElement("button", "scheduler-add-button");
|
|
1627
|
+
i.type = "button", i.textContent = s.addGroup, this.setData(i, { action: "add-group" }), n.appendChild(i);
|
|
1627
1628
|
}
|
|
1628
|
-
return
|
|
1629
|
+
return n;
|
|
1629
1630
|
}
|
|
1630
1631
|
/**
|
|
1631
1632
|
* The "(No resource)" bucket row.
|
|
@@ -1641,17 +1642,17 @@ class I extends K {
|
|
|
1641
1642
|
createUnassignedRow(e) {
|
|
1642
1643
|
const { options: t } = this.state, s = this.createElement("div", "scheduler-timeline-row", "unassigned");
|
|
1643
1644
|
s.setAttribute("role", "row");
|
|
1644
|
-
const
|
|
1645
|
-
|
|
1646
|
-
const
|
|
1647
|
-
|
|
1648
|
-
const
|
|
1649
|
-
|
|
1650
|
-
let
|
|
1645
|
+
const n = this.createElement("div", "scheduler-resource-cell");
|
|
1646
|
+
n.setAttribute("role", "rowheader"), n.setAttribute("aria-colindex", "1"), n.style.paddingLeft = "8px";
|
|
1647
|
+
const i = this.createElement("span", "resource-title");
|
|
1648
|
+
i.textContent = w(t.messages).unassignedResource, i.title = i.textContent, n.appendChild(i), s.appendChild(n);
|
|
1649
|
+
const r = this.createElement("div", "scheduler-timeline-slots");
|
|
1650
|
+
r.setAttribute("role", "presentation");
|
|
1651
|
+
let o = 2;
|
|
1651
1652
|
for (const l of e)
|
|
1652
1653
|
for (const d of l) {
|
|
1653
1654
|
const c = this.createElement("div", "scheduler-timeline-slot");
|
|
1654
|
-
c.setAttribute("role", "gridcell"), c.setAttribute("aria-colindex", String(
|
|
1655
|
+
c.setAttribute("role", "gridcell"), c.setAttribute("aria-colindex", String(o)), o++, c.setAttribute("tabindex", "-1"), c.setAttribute("aria-selected", "false"), c.setAttribute(
|
|
1655
1656
|
"aria-label",
|
|
1656
1657
|
q(
|
|
1657
1658
|
d,
|
|
@@ -1662,14 +1663,14 @@ class I extends K {
|
|
|
1662
1663
|
start: d.start.toISOString(),
|
|
1663
1664
|
end: d.end.toISOString(),
|
|
1664
1665
|
unassigned: "true"
|
|
1665
|
-
}),
|
|
1666
|
+
}), r.appendChild(c);
|
|
1666
1667
|
}
|
|
1667
1668
|
const a = this.createElement("div", "scheduler-timeline-events");
|
|
1668
|
-
return a.setAttribute("role", "gridcell"), a.setAttribute("aria-colindex", "2"), a.setAttribute("aria-colspan", String(
|
|
1669
|
+
return a.setAttribute("role", "gridcell"), a.setAttribute("aria-colindex", "2"), a.setAttribute("aria-colspan", String(o - 2)), r.appendChild(a), s.appendChild(r), this.rowElements.set(z, s), s;
|
|
1669
1670
|
}
|
|
1670
1671
|
renderEvents(e) {
|
|
1671
|
-
const { resources: t, options: s } = this.state,
|
|
1672
|
-
|
|
1672
|
+
const { resources: t, options: s } = this.state, n = e[0], i = new Date(e[6]);
|
|
1673
|
+
i.setHours(23, 59, 59, 999);
|
|
1673
1674
|
const a = h.getTimeSlots(
|
|
1674
1675
|
e[0],
|
|
1675
1676
|
s.slotDuration,
|
|
@@ -1690,11 +1691,11 @@ class I extends K {
|
|
|
1690
1691
|
for (const { resourceId: d, title: c } of l) {
|
|
1691
1692
|
const u = this.rowElements.get(d ?? z);
|
|
1692
1693
|
if (!u) continue;
|
|
1693
|
-
const
|
|
1694
|
-
if (!
|
|
1695
|
-
|
|
1694
|
+
const m = u.querySelector(".scheduler-timeline-events");
|
|
1695
|
+
if (!m) continue;
|
|
1696
|
+
m.innerHTML = "";
|
|
1696
1697
|
const f = (this.state.eventsByResource.get(d) ?? []).filter(
|
|
1697
|
-
(x) => x.start <
|
|
1698
|
+
(x) => x.start < i && x.end > n
|
|
1698
1699
|
).map((x) => ({
|
|
1699
1700
|
id: x.id,
|
|
1700
1701
|
event: x,
|
|
@@ -1704,33 +1705,33 @@ class I extends K {
|
|
|
1704
1705
|
isEnd: !0,
|
|
1705
1706
|
dayIndex: 0,
|
|
1706
1707
|
totalDays: 1
|
|
1707
|
-
})),
|
|
1708
|
+
})), v = C.getTimelinedParts(f), y = v.reduce((x, F) => Math.max(x, F.totalTracks), 1), { height: b, gap: M, padding: A } = this.trackMetrics;
|
|
1708
1709
|
u.style.minHeight = `${y * b + (y - 1) * M + 2 * A}px`;
|
|
1709
|
-
for (const { part: x, trackIndex: F } of
|
|
1710
|
+
for (const { part: x, trackIndex: F } of v) {
|
|
1710
1711
|
if (!x.event) continue;
|
|
1711
1712
|
const L = this.createEventElement(
|
|
1712
1713
|
x.event,
|
|
1713
1714
|
F,
|
|
1714
|
-
|
|
1715
|
+
n,
|
|
1715
1716
|
a,
|
|
1716
1717
|
s.slotDuration ?? 1800,
|
|
1717
1718
|
c
|
|
1718
1719
|
);
|
|
1719
|
-
|
|
1720
|
+
m.appendChild(L);
|
|
1720
1721
|
}
|
|
1721
1722
|
}
|
|
1722
1723
|
}
|
|
1723
|
-
createEventElement(e, t, s,
|
|
1724
|
-
const
|
|
1725
|
-
this.state.keyboardMoveEventId, e.id,
|
|
1724
|
+
createEventElement(e, t, s, n, i, r = null) {
|
|
1725
|
+
const o = this.createElement("div", "scheduler-timeline-event"), a = this.state.selectedEvent?.id === e.id;
|
|
1726
|
+
this.state.keyboardMoveEventId, e.id, o.setAttribute("role", "button"), o.setAttribute("tabindex", "0"), o.setAttribute(
|
|
1726
1727
|
"aria-label",
|
|
1727
|
-
W(e,
|
|
1728
|
-
),
|
|
1729
|
-
const l = Math.max(e.start.getTime(), s.getTime()), d = s.getTime() + 10080 * 60 * 1e3, c = Math.min(e.end.getTime(), d), u = l - s.getTime(),
|
|
1730
|
-
|
|
1728
|
+
W(e, r, this.state.options)
|
|
1729
|
+
), o.setAttribute("aria-pressed", a ? "true" : "false"), o.setAttribute("aria-describedby", "scheduler-kbd-event"), a && o.classList.add("selected");
|
|
1730
|
+
const l = Math.max(e.start.getTime(), s.getTime()), d = s.getTime() + 10080 * 60 * 1e3, c = Math.min(e.end.getTime(), d), u = l - s.getTime(), m = c - l, g = d - s.getTime(), f = u / g * n, v = Math.max(m / g * n, 20), { height: y, gap: b, padding: M } = this.trackMetrics;
|
|
1731
|
+
o.style.left = `${f}px`, o.style.width = `${v}px`, o.style.top = `${M + t * (y + b)}px`, o.style.height = `${y}px`, this.applyEventColors(o, e), this.setData(o, { eventId: e.id });
|
|
1731
1732
|
const A = this.createElement("div", "event-content"), x = this.createElement("div", "event-title");
|
|
1732
|
-
return x.textContent = e.title, A.appendChild(x),
|
|
1733
|
-
|
|
1733
|
+
return x.textContent = e.title, A.appendChild(x), o.appendChild(A), this.appendResizeHandles(
|
|
1734
|
+
o,
|
|
1734
1735
|
{
|
|
1735
1736
|
id: e.id,
|
|
1736
1737
|
event: e,
|
|
@@ -1742,7 +1743,7 @@ class I extends K {
|
|
|
1742
1743
|
totalDays: 1
|
|
1743
1744
|
},
|
|
1744
1745
|
["left", "right"]
|
|
1745
|
-
),
|
|
1746
|
+
), o;
|
|
1746
1747
|
}
|
|
1747
1748
|
/**
|
|
1748
1749
|
* Dashed ghost showing where the event will land. Mirrors
|
|
@@ -1755,33 +1756,33 @@ class I extends K {
|
|
|
1755
1756
|
*/
|
|
1756
1757
|
renderPreviewEvent(e) {
|
|
1757
1758
|
this.container.querySelector(".scheduler-timeline-event.preview")?.remove();
|
|
1758
|
-
const { dragState: t, previewEvent: s, options:
|
|
1759
|
+
const { dragState: t, previewEvent: s, options: n } = this.state;
|
|
1759
1760
|
if (!s) return;
|
|
1760
|
-
const
|
|
1761
|
-
if (!
|
|
1762
|
-
const a = this.rowElements.get(
|
|
1761
|
+
const i = t?.event?.id ?? this.state.keyboardMoveEventId, r = this.previewRowKey();
|
|
1762
|
+
if (!r) return;
|
|
1763
|
+
const a = this.rowElements.get(r)?.querySelector(".scheduler-timeline-events");
|
|
1763
1764
|
if (!a) return;
|
|
1764
1765
|
const d = h.getTimeSlots(
|
|
1765
1766
|
e[0],
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
).length * 7 * this.slotWidth, c = e[0], u = c.getTime() + 10080 * 60 * 1e3,
|
|
1770
|
-
|
|
1771
|
-
const y =
|
|
1767
|
+
n.slotDuration,
|
|
1768
|
+
n.slotMinTime,
|
|
1769
|
+
n.slotMaxTime
|
|
1770
|
+
).length * 7 * this.slotWidth, c = e[0], u = c.getTime() + 10080 * 60 * 1e3, m = Math.max(s.start.getTime(), c.getTime()), g = Math.min(s.end.getTime(), u), f = u - c.getTime(), v = this.createElement("div", "scheduler-timeline-event", "preview");
|
|
1771
|
+
v.style.left = `${(m - c.getTime()) / f * d}px`, v.style.width = `${Math.max((g - m) / f * d, 20)}px`;
|
|
1772
|
+
const y = i ? (
|
|
1772
1773
|
// dataset match rather than an attribute selector: event ids are
|
|
1773
1774
|
// consumer-supplied and would need CSS escaping.
|
|
1774
1775
|
Array.from(
|
|
1775
1776
|
a.querySelectorAll(".scheduler-timeline-event:not(.preview)")
|
|
1776
|
-
).find((b) => b.dataset.eventId ===
|
|
1777
|
+
).find((b) => b.dataset.eventId === i)
|
|
1777
1778
|
) : void 0;
|
|
1778
1779
|
if (y)
|
|
1779
|
-
|
|
1780
|
+
v.style.top = y.style.top, v.style.height = y.style.height;
|
|
1780
1781
|
else {
|
|
1781
1782
|
const { height: b, padding: M } = this.trackMetrics;
|
|
1782
|
-
|
|
1783
|
+
v.style.top = `${M}px`, v.style.height = `${b}px`;
|
|
1783
1784
|
}
|
|
1784
|
-
a.appendChild(
|
|
1785
|
+
a.appendChild(v);
|
|
1785
1786
|
}
|
|
1786
1787
|
/**
|
|
1787
1788
|
* Which row a drag/preview is currently addressing.
|
|
@@ -1803,36 +1804,36 @@ class I extends K {
|
|
|
1803
1804
|
if (!t) return;
|
|
1804
1805
|
if (t.resourceId !== void 0)
|
|
1805
1806
|
return t.resourceId ?? z;
|
|
1806
|
-
const s = e?.event?.id ?? this.state.keyboardMoveEventId,
|
|
1807
|
-
return
|
|
1807
|
+
const s = e?.event?.id ?? this.state.keyboardMoveEventId, n = s ? this.state.events.find((i) => i.id === s) : void 0;
|
|
1808
|
+
return n ? n.resourceId ?? z : this.state.selectionResourceId ?? this.state.focusedResourceId ?? void 0;
|
|
1808
1809
|
}
|
|
1809
1810
|
update(e) {
|
|
1810
|
-
const t = this.state.date.getTime() !== e.date.getTime(), s = this.optionsRequireRerender(this.state.options, e.options),
|
|
1811
|
-
if (this.state = e, t || s ||
|
|
1811
|
+
const t = this.state.date.getTime() !== e.date.getTime(), s = this.optionsRequireRerender(this.state.options, e.options), n = this.state.resources !== e.resources || this.state.collapsedGroups !== e.collapsedGroups || this.state.resolvedPermissions !== e.resolvedPermissions || this.hasUnassignedRow(this.state) !== this.hasUnassignedRow(e);
|
|
1812
|
+
if (this.state = e, t || s || n) {
|
|
1812
1813
|
this.render();
|
|
1813
1814
|
return;
|
|
1814
1815
|
}
|
|
1815
1816
|
this.updateGreyedSlots();
|
|
1816
|
-
const
|
|
1817
|
-
this.renderEvents(
|
|
1817
|
+
const i = h.getWeekDays(e.date, this.firstDayOfWeek);
|
|
1818
|
+
this.renderEvents(i), this.renderPreviewEvent(i), this.updateCellFocusAndSelection();
|
|
1818
1819
|
}
|
|
1819
1820
|
optionsRequireRerender(e, t) {
|
|
1820
1821
|
return e.slotDuration !== t.slotDuration || e.timeFormat !== t.timeFormat || e.firstDayOfWeek !== t.firstDayOfWeek || e.slotMinTime !== t.slotMinTime || e.slotMaxTime !== t.slotMaxTime || e.locale !== t.locale;
|
|
1821
1822
|
}
|
|
1822
1823
|
updateGreyedSlots() {
|
|
1823
1824
|
const { dragState: e, previewEvent: t } = this.state;
|
|
1824
|
-
if (this.container.querySelectorAll(".scheduler-timeline-slot").forEach((
|
|
1825
|
-
const
|
|
1826
|
-
|
|
1827
|
-
const
|
|
1828
|
-
|
|
1825
|
+
if (this.container.querySelectorAll(".scheduler-timeline-slot").forEach((r) => r.classList.remove("greyed")), this.container.querySelectorAll(".scheduler-timeline-row.drop-target").forEach((r) => r.classList.remove("drop-target")), !e || !t) return;
|
|
1826
|
+
const n = this.previewRowKey(), i = n ? this.rowElements.get(n) : void 0;
|
|
1827
|
+
i && (i.classList.add("drop-target"), i.querySelectorAll(".scheduler-timeline-slot").forEach((r) => {
|
|
1828
|
+
const o = new Date(r.dataset.start ?? ""), a = new Date(r.dataset.end ?? "");
|
|
1829
|
+
o < t.end && a > t.start && r.classList.add("greyed");
|
|
1829
1830
|
}));
|
|
1830
1831
|
}
|
|
1831
1832
|
destroy() {
|
|
1832
1833
|
this.onColumnDragEnd(), this.rowElements.clear(), this.clearContainer();
|
|
1833
1834
|
}
|
|
1834
1835
|
}
|
|
1835
|
-
const
|
|
1836
|
+
const Re = ce(`@charset "UTF-8";
|
|
1836
1837
|
/* Layering ladder. Nothing between :host and the events establishes a
|
|
1837
1838
|
stacking context, so every one of these competes in ONE shared context
|
|
1838
1839
|
across the whole shadow root — a selected event in one day column is
|
|
@@ -3408,153 +3409,6 @@ const Ae = ne(`@charset "UTF-8";
|
|
|
3408
3409
|
animation: none !important;
|
|
3409
3410
|
transition: none !important;
|
|
3410
3411
|
}
|
|
3411
|
-
}`), Re = ne(`.form-control {
|
|
3412
|
-
display: block;
|
|
3413
|
-
width: 100%;
|
|
3414
|
-
padding: 0.375rem 0.75rem;
|
|
3415
|
-
font-size: 1rem;
|
|
3416
|
-
font-weight: 400;
|
|
3417
|
-
line-height: 1.5;
|
|
3418
|
-
color: var(--bs-body-color);
|
|
3419
|
-
appearance: none;
|
|
3420
|
-
background-color: var(--bs-body-bg);
|
|
3421
|
-
background-clip: padding-box;
|
|
3422
|
-
border: var(--bs-border-width) solid var(--bs-border-color);
|
|
3423
|
-
border-radius: var(--bs-border-radius);
|
|
3424
|
-
transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
|
|
3425
|
-
}
|
|
3426
|
-
@media (prefers-reduced-motion: reduce) {
|
|
3427
|
-
.form-control {
|
|
3428
|
-
transition: none;
|
|
3429
|
-
}
|
|
3430
|
-
}
|
|
3431
|
-
.form-control[type=file] {
|
|
3432
|
-
overflow: hidden;
|
|
3433
|
-
}
|
|
3434
|
-
.form-control[type=file]:not(:disabled):not([readonly]) {
|
|
3435
|
-
cursor: pointer;
|
|
3436
|
-
}
|
|
3437
|
-
.form-control:focus {
|
|
3438
|
-
color: var(--bs-body-color);
|
|
3439
|
-
background-color: var(--bs-body-bg);
|
|
3440
|
-
border-color: rgb(134, 182.5, 254);
|
|
3441
|
-
outline: 0;
|
|
3442
|
-
box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
|
|
3443
|
-
}
|
|
3444
|
-
.form-control::-webkit-date-and-time-value {
|
|
3445
|
-
min-width: 85px;
|
|
3446
|
-
height: 1.5em;
|
|
3447
|
-
margin: 0;
|
|
3448
|
-
}
|
|
3449
|
-
.form-control::-webkit-datetime-edit {
|
|
3450
|
-
display: block;
|
|
3451
|
-
padding: 0;
|
|
3452
|
-
}
|
|
3453
|
-
.form-control::placeholder {
|
|
3454
|
-
color: var(--bs-secondary-color);
|
|
3455
|
-
opacity: 1;
|
|
3456
|
-
}
|
|
3457
|
-
.form-control:disabled {
|
|
3458
|
-
background-color: var(--bs-secondary-bg);
|
|
3459
|
-
opacity: 1;
|
|
3460
|
-
}
|
|
3461
|
-
.form-control::file-selector-button {
|
|
3462
|
-
padding: 0.375rem 0.75rem;
|
|
3463
|
-
margin: -0.375rem -0.75rem;
|
|
3464
|
-
margin-inline-end: 0.75rem;
|
|
3465
|
-
color: var(--bs-body-color);
|
|
3466
|
-
background-color: var(--bs-tertiary-bg);
|
|
3467
|
-
pointer-events: none;
|
|
3468
|
-
border-color: inherit;
|
|
3469
|
-
border-style: solid;
|
|
3470
|
-
border-width: 0;
|
|
3471
|
-
border-inline-end-width: var(--bs-border-width);
|
|
3472
|
-
border-radius: 0;
|
|
3473
|
-
transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
|
|
3474
|
-
}
|
|
3475
|
-
@media (prefers-reduced-motion: reduce) {
|
|
3476
|
-
.form-control::file-selector-button {
|
|
3477
|
-
transition: none;
|
|
3478
|
-
}
|
|
3479
|
-
}
|
|
3480
|
-
.form-control:hover:not(:disabled):not([readonly])::file-selector-button {
|
|
3481
|
-
background-color: var(--bs-secondary-bg);
|
|
3482
|
-
}
|
|
3483
|
-
|
|
3484
|
-
.form-control-plaintext {
|
|
3485
|
-
display: block;
|
|
3486
|
-
width: 100%;
|
|
3487
|
-
padding: 0.375rem 0;
|
|
3488
|
-
margin-bottom: 0;
|
|
3489
|
-
line-height: 1.5;
|
|
3490
|
-
color: var(--bs-body-color);
|
|
3491
|
-
background-color: transparent;
|
|
3492
|
-
border: solid transparent;
|
|
3493
|
-
border-width: var(--bs-border-width) 0;
|
|
3494
|
-
}
|
|
3495
|
-
.form-control-plaintext:focus {
|
|
3496
|
-
outline: 0;
|
|
3497
|
-
}
|
|
3498
|
-
.form-control-plaintext.form-control-sm, .form-control-plaintext.form-control-lg {
|
|
3499
|
-
padding-right: 0;
|
|
3500
|
-
padding-left: 0;
|
|
3501
|
-
}
|
|
3502
|
-
|
|
3503
|
-
.form-control-sm {
|
|
3504
|
-
min-height: calc(1.5em + 0.5rem + calc(var(--bs-border-width) * 2));
|
|
3505
|
-
padding: 0.25rem 0.5rem;
|
|
3506
|
-
font-size: 0.875rem;
|
|
3507
|
-
border-radius: var(--bs-border-radius-sm);
|
|
3508
|
-
}
|
|
3509
|
-
.form-control-sm::file-selector-button {
|
|
3510
|
-
padding: 0.25rem 0.5rem;
|
|
3511
|
-
margin: -0.25rem -0.5rem;
|
|
3512
|
-
margin-inline-end: 0.5rem;
|
|
3513
|
-
}
|
|
3514
|
-
|
|
3515
|
-
.form-control-lg {
|
|
3516
|
-
min-height: calc(1.5em + 1rem + calc(var(--bs-border-width) * 2));
|
|
3517
|
-
padding: 0.5rem 1rem;
|
|
3518
|
-
font-size: 1.25rem;
|
|
3519
|
-
border-radius: var(--bs-border-radius-lg);
|
|
3520
|
-
}
|
|
3521
|
-
.form-control-lg::file-selector-button {
|
|
3522
|
-
padding: 0.5rem 1rem;
|
|
3523
|
-
margin: -0.5rem -1rem;
|
|
3524
|
-
margin-inline-end: 1rem;
|
|
3525
|
-
}
|
|
3526
|
-
|
|
3527
|
-
textarea.form-control {
|
|
3528
|
-
min-height: calc(1.5em + 0.75rem + calc(var(--bs-border-width) * 2));
|
|
3529
|
-
}
|
|
3530
|
-
textarea.form-control-sm {
|
|
3531
|
-
min-height: calc(1.5em + 0.5rem + calc(var(--bs-border-width) * 2));
|
|
3532
|
-
}
|
|
3533
|
-
textarea.form-control-lg {
|
|
3534
|
-
min-height: calc(1.5em + 1rem + calc(var(--bs-border-width) * 2));
|
|
3535
|
-
}
|
|
3536
|
-
|
|
3537
|
-
.form-control-color {
|
|
3538
|
-
width: 3rem;
|
|
3539
|
-
height: calc(1.5em + 0.75rem + calc(var(--bs-border-width) * 2));
|
|
3540
|
-
padding: 0.375rem;
|
|
3541
|
-
}
|
|
3542
|
-
.form-control-color:not(:disabled):not([readonly]) {
|
|
3543
|
-
cursor: pointer;
|
|
3544
|
-
}
|
|
3545
|
-
.form-control-color::-moz-color-swatch {
|
|
3546
|
-
border: 0 !important;
|
|
3547
|
-
border-radius: var(--bs-border-radius);
|
|
3548
|
-
}
|
|
3549
|
-
.form-control-color::-webkit-color-swatch {
|
|
3550
|
-
border: 0 !important;
|
|
3551
|
-
border-radius: var(--bs-border-radius);
|
|
3552
|
-
}
|
|
3553
|
-
.form-control-color.form-control-sm {
|
|
3554
|
-
height: calc(1.5em + 0.5rem + calc(var(--bs-border-width) * 2));
|
|
3555
|
-
}
|
|
3556
|
-
.form-control-color.form-control-lg {
|
|
3557
|
-
height: calc(1.5em + 1rem + calc(var(--bs-border-width) * 2));
|
|
3558
3412
|
}`), J = {
|
|
3559
3413
|
dragThreshold: 5,
|
|
3560
3414
|
minDurationMs: 1800 * 1e3
|
|
@@ -3573,16 +3427,16 @@ class Pe {
|
|
|
3573
3427
|
* @param originalEvent - The original event being moved/resized (null for create)
|
|
3574
3428
|
* @returns The preview event with new start/end, or null if invalid
|
|
3575
3429
|
*/
|
|
3576
|
-
calculatePreview(e, t, s,
|
|
3430
|
+
calculatePreview(e, t, s, n) {
|
|
3577
3431
|
switch (e) {
|
|
3578
3432
|
case "create":
|
|
3579
3433
|
return this.calculateCreatePreview(t, s);
|
|
3580
3434
|
case "move":
|
|
3581
|
-
return
|
|
3435
|
+
return n ? this.calculateMovePreview(t, s, n) : null;
|
|
3582
3436
|
case "resize-start":
|
|
3583
|
-
return
|
|
3437
|
+
return n ? this.calculateResizeStartPreview(s, n) : null;
|
|
3584
3438
|
case "resize-end":
|
|
3585
|
-
return
|
|
3439
|
+
return n ? this.calculateResizeEndPreview(s, n) : null;
|
|
3586
3440
|
default:
|
|
3587
3441
|
return null;
|
|
3588
3442
|
}
|
|
@@ -3594,12 +3448,12 @@ class Pe {
|
|
|
3594
3448
|
calculateCreatePreview(e, t) {
|
|
3595
3449
|
const s = new Date(
|
|
3596
3450
|
Math.min(e.start.getTime(), t.start.getTime())
|
|
3597
|
-
),
|
|
3451
|
+
), n = new Date(
|
|
3598
3452
|
Math.max(e.end.getTime(), t.end.getTime())
|
|
3599
3453
|
);
|
|
3600
3454
|
return {
|
|
3601
3455
|
start: s,
|
|
3602
|
-
end:
|
|
3456
|
+
end: n,
|
|
3603
3457
|
...e.resourceId !== void 0 ? { resourceId: e.resourceId } : {}
|
|
3604
3458
|
};
|
|
3605
3459
|
}
|
|
@@ -3608,10 +3462,10 @@ class Pe {
|
|
|
3608
3462
|
* Preserves event duration, applies offset from drag start.
|
|
3609
3463
|
*/
|
|
3610
3464
|
calculateMovePreview(e, t, s) {
|
|
3611
|
-
const
|
|
3465
|
+
const n = t.start.getTime() - e.start.getTime(), i = s.end.getTime() - s.start.getTime(), r = new Date(s.start.getTime() + n), o = new Date(r.getTime() + i), a = t.resourceId !== void 0 ? t.resourceId : s.resourceId;
|
|
3612
3466
|
return {
|
|
3613
|
-
start:
|
|
3614
|
-
end:
|
|
3467
|
+
start: r,
|
|
3468
|
+
end: o,
|
|
3615
3469
|
...a !== void 0 ? { resourceId: a } : {}
|
|
3616
3470
|
};
|
|
3617
3471
|
}
|
|
@@ -3632,10 +3486,10 @@ class Pe {
|
|
|
3632
3486
|
* Enforces minimum duration.
|
|
3633
3487
|
*/
|
|
3634
3488
|
calculateResizeEndPreview(e, t) {
|
|
3635
|
-
const s = t.start.getTime() + this.config.minDurationMs,
|
|
3489
|
+
const s = t.start.getTime() + this.config.minDurationMs, n = new Date(
|
|
3636
3490
|
Math.max(e.end.getTime(), s)
|
|
3637
3491
|
);
|
|
3638
|
-
return { start: t.start, end:
|
|
3492
|
+
return { start: t.start, end: n };
|
|
3639
3493
|
}
|
|
3640
3494
|
}
|
|
3641
3495
|
function B(p) {
|
|
@@ -3661,7 +3515,7 @@ function Y(p) {
|
|
|
3661
3515
|
isPrimary: e.identifier === 0
|
|
3662
3516
|
} : null;
|
|
3663
3517
|
}
|
|
3664
|
-
function
|
|
3518
|
+
function de(p, e) {
|
|
3665
3519
|
const t = e.x - p.x, s = e.y - p.y;
|
|
3666
3520
|
return Math.sqrt(t * t + s * s);
|
|
3667
3521
|
}
|
|
@@ -3760,20 +3614,20 @@ class Fe {
|
|
|
3760
3614
|
transitionFromIdle(e) {
|
|
3761
3615
|
if (e.type !== "POINTER_DOWN")
|
|
3762
3616
|
return this.state;
|
|
3763
|
-
const { target: t, position: s, slot:
|
|
3764
|
-
if (!
|
|
3617
|
+
const { target: t, position: s, slot: n, slotElement: i, immediate: r } = e, o = this.getOperationType(t);
|
|
3618
|
+
if (!o)
|
|
3765
3619
|
return this.state;
|
|
3766
3620
|
const a = t.event ?? null;
|
|
3767
3621
|
if (a && a.draggable === !1)
|
|
3768
3622
|
return this.state;
|
|
3769
|
-
if (
|
|
3770
|
-
let l =
|
|
3623
|
+
if (r) {
|
|
3624
|
+
let l = n;
|
|
3771
3625
|
if (!l && a && (l = {
|
|
3772
3626
|
start: a.start,
|
|
3773
3627
|
end: a.end
|
|
3774
3628
|
}), l) {
|
|
3775
3629
|
const d = this.previewCalculator.calculatePreview(
|
|
3776
|
-
|
|
3630
|
+
o,
|
|
3777
3631
|
l,
|
|
3778
3632
|
l,
|
|
3779
3633
|
a
|
|
@@ -3781,7 +3635,7 @@ class Fe {
|
|
|
3781
3635
|
if (d)
|
|
3782
3636
|
return {
|
|
3783
3637
|
phase: "active",
|
|
3784
|
-
operationType:
|
|
3638
|
+
operationType: o,
|
|
3785
3639
|
event: a,
|
|
3786
3640
|
startSlot: l,
|
|
3787
3641
|
currentSlot: l,
|
|
@@ -3792,11 +3646,11 @@ class Fe {
|
|
|
3792
3646
|
}
|
|
3793
3647
|
return {
|
|
3794
3648
|
phase: "pending",
|
|
3795
|
-
operationType:
|
|
3649
|
+
operationType: o,
|
|
3796
3650
|
event: a,
|
|
3797
3651
|
startPosition: s,
|
|
3798
|
-
startSlot:
|
|
3799
|
-
slotElement:
|
|
3652
|
+
startSlot: n,
|
|
3653
|
+
slotElement: i
|
|
3800
3654
|
};
|
|
3801
3655
|
}
|
|
3802
3656
|
/**
|
|
@@ -3806,7 +3660,7 @@ class Fe {
|
|
|
3806
3660
|
if (this.state.phase !== "pending") return this.state;
|
|
3807
3661
|
switch (e.type) {
|
|
3808
3662
|
case "POINTER_MOVE":
|
|
3809
|
-
return
|
|
3663
|
+
return de(
|
|
3810
3664
|
this.state.startPosition,
|
|
3811
3665
|
e.position
|
|
3812
3666
|
) < this.config.dragThreshold ? this.state : this.activateDrag(e.slot);
|
|
@@ -3880,19 +3734,19 @@ class Fe {
|
|
|
3880
3734
|
const t = this.state.startSlot ?? e;
|
|
3881
3735
|
if (!t)
|
|
3882
3736
|
return { phase: "idle" };
|
|
3883
|
-
const s = e ?? t,
|
|
3737
|
+
const s = e ?? t, n = this.previewCalculator.calculatePreview(
|
|
3884
3738
|
this.state.operationType,
|
|
3885
3739
|
t,
|
|
3886
3740
|
s,
|
|
3887
3741
|
this.state.event
|
|
3888
3742
|
);
|
|
3889
|
-
return
|
|
3743
|
+
return n ? {
|
|
3890
3744
|
phase: "active",
|
|
3891
3745
|
operationType: this.state.operationType,
|
|
3892
3746
|
event: this.state.event,
|
|
3893
3747
|
startSlot: t,
|
|
3894
3748
|
currentSlot: s,
|
|
3895
|
-
preview:
|
|
3749
|
+
preview: n,
|
|
3896
3750
|
originalEvent: this.state.event ?? void 0
|
|
3897
3751
|
} : { phase: "idle" };
|
|
3898
3752
|
}
|
|
@@ -3940,12 +3794,12 @@ class Le {
|
|
|
3940
3794
|
* @param immediate If true, skip pending state (for touch-initiated drags)
|
|
3941
3795
|
*/
|
|
3942
3796
|
handlePointerDown(e, t, s = !1) {
|
|
3943
|
-
const
|
|
3797
|
+
const n = this.getSlotAtPosition?.(e.clientX, e.clientY) ?? null;
|
|
3944
3798
|
this.stateMachine.send({
|
|
3945
3799
|
type: "POINTER_DOWN",
|
|
3946
3800
|
target: t,
|
|
3947
3801
|
position: { x: e.clientX, y: e.clientY },
|
|
3948
|
-
slot:
|
|
3802
|
+
slot: n,
|
|
3949
3803
|
slotElement: t.slotElement,
|
|
3950
3804
|
immediate: s
|
|
3951
3805
|
}), this.stateMachine.isActive() && this.syncToStateManager();
|
|
@@ -4115,13 +3969,13 @@ class He {
|
|
|
4115
3969
|
analyzeTarget(e) {
|
|
4116
3970
|
const t = e.closest(".resize-handle");
|
|
4117
3971
|
if (t) {
|
|
4118
|
-
const
|
|
3972
|
+
const r = t.closest(
|
|
4119
3973
|
".scheduler-event, .scheduler-timeline-event"
|
|
4120
|
-
)?.dataset.eventId,
|
|
4121
|
-
if (
|
|
3974
|
+
)?.dataset.eventId, o = r ? this.config.getEventById(r) : null;
|
|
3975
|
+
if (o)
|
|
4122
3976
|
return {
|
|
4123
3977
|
type: "resize-handle",
|
|
4124
|
-
event:
|
|
3978
|
+
event: o,
|
|
4125
3979
|
resizeHandle: t.dataset.handle
|
|
4126
3980
|
};
|
|
4127
3981
|
}
|
|
@@ -4129,14 +3983,14 @@ class He {
|
|
|
4129
3983
|
".scheduler-event:not(.preview), .scheduler-timeline-event:not(.preview)"
|
|
4130
3984
|
);
|
|
4131
3985
|
if (s) {
|
|
4132
|
-
const
|
|
4133
|
-
if (
|
|
4134
|
-
return { type: "event", event:
|
|
3986
|
+
const i = s.dataset.eventId, r = i ? this.config.getEventById(i) : null;
|
|
3987
|
+
if (r)
|
|
3988
|
+
return { type: "event", event: r };
|
|
4135
3989
|
}
|
|
4136
|
-
const
|
|
3990
|
+
const n = e.closest(
|
|
4137
3991
|
".scheduler-time-slot, .scheduler-timeline-slot"
|
|
4138
3992
|
);
|
|
4139
|
-
return
|
|
3993
|
+
return n ? { type: "slot", slotElement: n } : { type: "none" };
|
|
4140
3994
|
}
|
|
4141
3995
|
// Mouse event handlers
|
|
4142
3996
|
handleMouseDown(e) {
|
|
@@ -4172,22 +4026,22 @@ class He {
|
|
|
4172
4026
|
const s = this.analyzeTarget(t.target);
|
|
4173
4027
|
if (s.type === "none" || s.type === "slot" && !this.config.isSelectable()) return;
|
|
4174
4028
|
this.touchStartPosition = { x: t.clientX, y: t.clientY }, this.touchHoldTarget = t.target, this.touchHoldPointer = t, this.panStartedOnEvent = s.type === "event" || s.type === "resize-handle";
|
|
4175
|
-
const
|
|
4176
|
-
if (
|
|
4177
|
-
|
|
4178
|
-
}, { passive: !1 }),
|
|
4179
|
-
|
|
4180
|
-
}),
|
|
4181
|
-
|
|
4029
|
+
const n = this, i = e.target;
|
|
4030
|
+
if (i.addEventListener("touchmove", function(o) {
|
|
4031
|
+
n.handleTouchMove(o);
|
|
4032
|
+
}, { passive: !1 }), i.addEventListener("touchend", function(o) {
|
|
4033
|
+
n.handleTouchEnd(o);
|
|
4034
|
+
}), i.addEventListener("touchcancel", function(o) {
|
|
4035
|
+
n.handleTouchCancel(o);
|
|
4182
4036
|
}), s.type === "resize-handle" && s.event && this.config.isEventSelected?.(s.event.id)) {
|
|
4183
4037
|
this.activateTouchDragMode(t, s);
|
|
4184
4038
|
return;
|
|
4185
4039
|
}
|
|
4186
4040
|
this.addTouchFeedback(t.target, "pending");
|
|
4187
|
-
const
|
|
4041
|
+
const r = this.config.touchHoldDuration ?? ze;
|
|
4188
4042
|
this.touchHoldTimer = setTimeout(() => {
|
|
4189
4043
|
this.activateTouchDragMode(t, s);
|
|
4190
|
-
},
|
|
4044
|
+
}, r);
|
|
4191
4045
|
}
|
|
4192
4046
|
handleTouchMove(e) {
|
|
4193
4047
|
if (e.touches.length !== 1) {
|
|
@@ -4202,7 +4056,7 @@ class He {
|
|
|
4202
4056
|
}
|
|
4203
4057
|
if (this.touchHoldTimer && this.touchStartPosition) {
|
|
4204
4058
|
const s = this.config.touchMoveThreshold ?? $e;
|
|
4205
|
-
if (
|
|
4059
|
+
if (de(this.touchStartPosition, {
|
|
4206
4060
|
x: t.clientX,
|
|
4207
4061
|
y: t.clientY
|
|
4208
4062
|
}) > s) {
|
|
@@ -4284,8 +4138,8 @@ class He {
|
|
|
4284
4138
|
if (!this.isPanMode || !this.panStartPosition || !this.panStartScroll) return;
|
|
4285
4139
|
const s = this.callbacks.getScrollContainer?.();
|
|
4286
4140
|
if (!s) return;
|
|
4287
|
-
const
|
|
4288
|
-
s.scrollLeft = this.panStartScroll.left +
|
|
4141
|
+
const n = this.panStartPosition.x - e, i = this.panStartPosition.y - t;
|
|
4142
|
+
s.scrollLeft = this.panStartScroll.left + n, s.scrollTop = this.panStartScroll.top + i;
|
|
4289
4143
|
}
|
|
4290
4144
|
// Scroll blocking helpers
|
|
4291
4145
|
applyScrollBlock() {
|
|
@@ -4339,8 +4193,8 @@ class Oe {
|
|
|
4339
4193
|
* the scheduler does not mutate its internal events list — the consumer
|
|
4340
4194
|
* receives the range and decides whether to construct an event from it.
|
|
4341
4195
|
*/
|
|
4342
|
-
emitEventCreate(e, t, s,
|
|
4343
|
-
this.emit({ type: "event-create", range: e, view: t, resourceId:
|
|
4196
|
+
emitEventCreate(e, t, s, n) {
|
|
4197
|
+
this.emit({ type: "event-create", range: e, view: t, resourceId: n, originalEvent: s });
|
|
4344
4198
|
}
|
|
4345
4199
|
/**
|
|
4346
4200
|
* Emit an event-update event.
|
|
@@ -4371,8 +4225,8 @@ class Oe {
|
|
|
4371
4225
|
* the time-range selection — either may be null. Fires on every transition
|
|
4372
4226
|
* so consumers can react to the selection clearing without polling.
|
|
4373
4227
|
*/
|
|
4374
|
-
emitSelectionChange(e, t, s,
|
|
4375
|
-
this.emit({ type: "selection-change", selectedEvent: e, range: t, view: s, resourceId:
|
|
4228
|
+
emitSelectionChange(e, t, s, n) {
|
|
4229
|
+
this.emit({ type: "selection-change", selectedEvent: e, range: t, view: s, resourceId: n });
|
|
4376
4230
|
}
|
|
4377
4231
|
/**
|
|
4378
4232
|
* Emit a `resource-create` or `group-create` *request*. Same controlled
|
|
@@ -4380,10 +4234,10 @@ class Oe {
|
|
|
4380
4234
|
* input, so the consumer decides the id, title and placement. `parentId` is
|
|
4381
4235
|
* the group to insert into — absent means root level.
|
|
4382
4236
|
*/
|
|
4383
|
-
emitResourceCreate(e, t, s,
|
|
4237
|
+
emitResourceCreate(e, t, s, n) {
|
|
4384
4238
|
this.emit({
|
|
4385
4239
|
type: e === "group" ? "group-create" : "resource-create",
|
|
4386
|
-
parentId:
|
|
4240
|
+
parentId: n,
|
|
4387
4241
|
view: t,
|
|
4388
4242
|
originalEvent: s
|
|
4389
4243
|
});
|
|
@@ -4446,10 +4300,10 @@ class $ extends he {
|
|
|
4446
4300
|
onClose: () => {
|
|
4447
4301
|
this.editorEventId = null, this.editorError = null, this.editorDraft = null, this.requestUpdate();
|
|
4448
4302
|
}
|
|
4449
|
-
}), this.editorDraft = null, this.headerResizeObserver = null, this.headerIsNarrow = !1, this.keymapView = null, this.previousIsLoading = null, this.edgeScrollFrame = null, this.edgeScrollVector = { x: 0, y: 0 }, this.edgeScrollPointer = null, this.lastEventActivation = null, this.keyboardMove = null, this.stateManager = new
|
|
4303
|
+
}), this.editorDraft = null, this.headerResizeObserver = null, this.headerIsNarrow = !1, this.keymapView = null, this.previousIsLoading = null, this.edgeScrollFrame = null, this.edgeScrollVector = { x: 0, y: 0 }, this.edgeScrollPointer = null, this.lastEventActivation = null, this.keyboardMove = null, this.stateManager = new De(), this.eventEmitter = new Oe(this), this.dragManager = new Le(this.stateManager), this.dragManager.setSlotResolver((e, t) => this.getSlotAtPosition(e, t)), this.boundHandleKeyDown = this.handleKeyDown.bind(this), this.boundHandleFocusIn = this.handleFocusIn.bind(this), this.boundHandleValueChange = this.handleValueChange.bind(this), this.boundHandleContextMenu = this.handleContextMenu.bind(this), this.boundHandleDblClick = this.handleNativeDblClick.bind(this), this.boundRepositionPopover = () => this.dayPopover.position(), this.boundRepositionEditor = () => this.eventEditorOverlay.position(), this.stateManager.subscribe((e) => this.onStateChange(e));
|
|
4450
4304
|
}
|
|
4451
4305
|
static {
|
|
4452
|
-
this.styles = [
|
|
4306
|
+
this.styles = [ye, be, Re];
|
|
4453
4307
|
}
|
|
4454
4308
|
static get observedAttributes() {
|
|
4455
4309
|
return [
|
|
@@ -4484,8 +4338,8 @@ class $ extends he {
|
|
|
4484
4338
|
break;
|
|
4485
4339
|
case "first-day-of-week":
|
|
4486
4340
|
if (s) {
|
|
4487
|
-
const
|
|
4488
|
-
Number.isInteger(
|
|
4341
|
+
const n = parseInt(s, 10);
|
|
4342
|
+
Number.isInteger(n) && n >= 0 && n <= 7 && this.stateManager.setOptions({ firstDayOfWeek: n % 7 });
|
|
4489
4343
|
}
|
|
4490
4344
|
break;
|
|
4491
4345
|
case "slot-duration":
|
|
@@ -4778,18 +4632,18 @@ class $ extends he {
|
|
|
4778
4632
|
if (!e) return k;
|
|
4779
4633
|
const t = this.findResourceOrGroup(e), s = this.currentView;
|
|
4780
4634
|
if (!t || !(s instanceof I)) return k;
|
|
4781
|
-
const
|
|
4782
|
-
if (
|
|
4783
|
-
const
|
|
4635
|
+
const n = s.rowActions(t);
|
|
4636
|
+
if (n.length === 0) return k;
|
|
4637
|
+
const i = w(this.stateManager.getState().options.messages), r = t, o = r.eventColor ? "eventColor" : "color", a = r.eventColor ?? t.color;
|
|
4784
4638
|
return S`
|
|
4785
4639
|
<div
|
|
4786
4640
|
class="scheduler-row-panel"
|
|
4787
4641
|
role="dialog"
|
|
4788
|
-
aria-label=${E(
|
|
4642
|
+
aria-label=${E(i.rowMenuDialogLabel, { title: t.title })}
|
|
4789
4643
|
>
|
|
4790
|
-
${
|
|
4644
|
+
${n.map((l) => {
|
|
4791
4645
|
if (l === "set-resource-color") {
|
|
4792
|
-
const c = E(
|
|
4646
|
+
const c = E(i.resourceColor, { title: t.title });
|
|
4793
4647
|
return S`
|
|
4794
4648
|
<label class="row-action row-action-color">
|
|
4795
4649
|
<span>${c}</span>
|
|
@@ -4800,12 +4654,12 @@ class $ extends he {
|
|
|
4800
4654
|
.value=${a && /^#[0-9a-f]{6}$/i.test(a) ? a : "#000000"}
|
|
4801
4655
|
data-action="set-resource-color"
|
|
4802
4656
|
data-resource-id=${t.id}
|
|
4803
|
-
data-field=${
|
|
4657
|
+
data-field=${o}
|
|
4804
4658
|
/>
|
|
4805
4659
|
</label>
|
|
4806
4660
|
`;
|
|
4807
4661
|
}
|
|
4808
|
-
const d = l === "rename-resource" ? E(
|
|
4662
|
+
const d = l === "rename-resource" ? E(i.renameResource, { title: t.title }) : l === "add-resource" ? E(i.addResourceToGroup, { title: t.title }) : l === "add-group" ? E(i.addGroupToGroup, { title: t.title }) : E(i.removeResource, { title: t.title });
|
|
4809
4663
|
return S`
|
|
4810
4664
|
<button
|
|
4811
4665
|
type="button"
|
|
@@ -4827,20 +4681,20 @@ class $ extends he {
|
|
|
4827
4681
|
renderDayPopover() {
|
|
4828
4682
|
const e = this.popoverDate;
|
|
4829
4683
|
if (!e) return k;
|
|
4830
|
-
const t = this.stateManager.getState(), { options: s } = t,
|
|
4684
|
+
const t = this.stateManager.getState(), { options: s } = t, n = this.popoverScope, i = n === "month" ? this.eventsInMonth(e) : this.eventsOnDay(e), r = n === "month" ? `${h.getMonthName(e, s.locale)} ${e.getFullYear()}` : h.formatDateWithWeekday(e, s.locale), o = [...t.resourceById.values()];
|
|
4831
4685
|
return S`
|
|
4832
4686
|
<div
|
|
4833
4687
|
class="scheduler-day-popover"
|
|
4834
4688
|
role="dialog"
|
|
4835
|
-
aria-label=${this.msg("dayPopoverLabel", { date:
|
|
4689
|
+
aria-label=${this.msg("dayPopoverLabel", { date: r })}
|
|
4836
4690
|
>
|
|
4837
4691
|
<div class="popover-head">
|
|
4838
4692
|
<div>
|
|
4839
|
-
<div class="popover-date">${
|
|
4693
|
+
<div class="popover-date">${r}</div>
|
|
4840
4694
|
<div class="popover-count">
|
|
4841
4695
|
${this.msg("dayPopoverCount", {
|
|
4842
|
-
count:
|
|
4843
|
-
events: this.msg(
|
|
4696
|
+
count: i.length,
|
|
4697
|
+
events: this.msg(i.length === 1 ? "eventSingular" : "eventPlural")
|
|
4844
4698
|
})}
|
|
4845
4699
|
</div>
|
|
4846
4700
|
</div>
|
|
@@ -4853,12 +4707,12 @@ class $ extends he {
|
|
|
4853
4707
|
<span aria-hidden="true">×</span>
|
|
4854
4708
|
</button>
|
|
4855
4709
|
</div>
|
|
4856
|
-
${
|
|
4710
|
+
${i.length === 0 ? S`<p class="popover-empty">${this.msg("dayPopoverEmpty")}</p>` : n === "month" ? this.renderPopoverDayGroups(i, s) : S`
|
|
4857
4711
|
<ul class="popover-events">
|
|
4858
|
-
${
|
|
4712
|
+
${i.map((a) => this.renderPopoverEvent(a, s))}
|
|
4859
4713
|
</ul>
|
|
4860
4714
|
`}
|
|
4861
|
-
${this.can("createEvent") &&
|
|
4715
|
+
${this.can("createEvent") && o.length > 0 ? S`
|
|
4862
4716
|
<label class="popover-resource">
|
|
4863
4717
|
<span class="popover-resource-label">${this.msg("newEventResource")}</span>
|
|
4864
4718
|
<mp-select
|
|
@@ -4866,7 +4720,7 @@ class $ extends he {
|
|
|
4866
4720
|
input-label=${this.msg("newEventResource")}
|
|
4867
4721
|
>
|
|
4868
4722
|
<option value="">${this.msg("unassignedResource")}</option>
|
|
4869
|
-
${
|
|
4723
|
+
${o.map(
|
|
4870
4724
|
(a) => S`<option value=${a.id}>${a.title}</option>`
|
|
4871
4725
|
)}
|
|
4872
4726
|
</mp-select>
|
|
@@ -4885,7 +4739,7 @@ class $ extends he {
|
|
|
4885
4739
|
class="popover-action"
|
|
4886
4740
|
@click=${() => this.drillFromPopover()}
|
|
4887
4741
|
>
|
|
4888
|
-
${this.msg(
|
|
4742
|
+
${this.msg(n === "month" ? "showMonth" : "showDay")}
|
|
4889
4743
|
</button>
|
|
4890
4744
|
</div>
|
|
4891
4745
|
</div>
|
|
@@ -4939,15 +4793,15 @@ class $ extends he {
|
|
|
4939
4793
|
this.announceDenied();
|
|
4940
4794
|
return;
|
|
4941
4795
|
}
|
|
4942
|
-
const t = this.shadowRoot?.querySelector(".scheduler-day-popover"),
|
|
4943
|
-
(
|
|
4796
|
+
const t = this.shadowRoot?.querySelector(".scheduler-day-popover"), n = (t ? [...t.querySelectorAll(".popover-event")] : []).findIndex(
|
|
4797
|
+
(i) => i.getAttribute("aria-label") === W(e, null, this.stateManager.getState().options)
|
|
4944
4798
|
);
|
|
4945
4799
|
this.eventEmitter.emitEventDelete(e), this.updateComplete.then(
|
|
4946
4800
|
() => requestAnimationFrame(() => {
|
|
4947
|
-
const
|
|
4948
|
-
if (!
|
|
4949
|
-
const
|
|
4950
|
-
(
|
|
4801
|
+
const i = this.shadowRoot?.querySelector(".scheduler-day-popover");
|
|
4802
|
+
if (!i) return;
|
|
4803
|
+
const r = [...i.querySelectorAll(".popover-event")];
|
|
4804
|
+
(r[Math.min(Math.max(n, 0), r.length - 1)] ?? i.querySelector(".popover-action") ?? i.querySelector(".popover-close"))?.focus();
|
|
4951
4805
|
})
|
|
4952
4806
|
);
|
|
4953
4807
|
}
|
|
@@ -4957,22 +4811,22 @@ class $ extends he {
|
|
|
4957
4811
|
* running in from last month sits under the 1st rather than vanishing).
|
|
4958
4812
|
*/
|
|
4959
4813
|
renderPopoverDayGroups(e, t) {
|
|
4960
|
-
const s = this.popoverDate,
|
|
4961
|
-
const a =
|
|
4814
|
+
const s = this.popoverDate, n = new Date(s.getFullYear(), s.getMonth(), 1), i = e.reduce((r, o) => {
|
|
4815
|
+
const a = o.start < n ? new Date(n) : new Date(o.start);
|
|
4962
4816
|
a.setHours(0, 0, 0, 0);
|
|
4963
|
-
const l = a.getTime(), d =
|
|
4964
|
-
return d.events.push(
|
|
4817
|
+
const l = a.getTime(), d = r.get(l) ?? { day: a, events: [] };
|
|
4818
|
+
return d.events.push(o), r.set(l, d);
|
|
4965
4819
|
}, /* @__PURE__ */ new Map());
|
|
4966
4820
|
return S`
|
|
4967
4821
|
<ul class="popover-events popover-day-groups">
|
|
4968
|
-
${[...
|
|
4969
|
-
(
|
|
4822
|
+
${[...i.values()].map(
|
|
4823
|
+
(r) => S`
|
|
4970
4824
|
<li class="popover-day-group">
|
|
4971
4825
|
<div class="popover-day-label">
|
|
4972
|
-
${h.formatDateWithWeekday(
|
|
4826
|
+
${h.formatDateWithWeekday(r.day, t.locale)}
|
|
4973
4827
|
</div>
|
|
4974
4828
|
<ul class="popover-events">
|
|
4975
|
-
${
|
|
4829
|
+
${r.events.map((o) => this.renderPopoverEvent(o, t))}
|
|
4976
4830
|
</ul>
|
|
4977
4831
|
</li>
|
|
4978
4832
|
`
|
|
@@ -5003,7 +4857,7 @@ class $ extends he {
|
|
|
5003
4857
|
const t = new Date(e);
|
|
5004
4858
|
t.setHours(0, 0, 0, 0);
|
|
5005
4859
|
const s = new Date(t);
|
|
5006
|
-
return s.setDate(s.getDate() + 1), this.stateManager.getState().events.filter((
|
|
4860
|
+
return s.setDate(s.getDate() + 1), this.stateManager.getState().events.filter((n) => n.start < s && n.end > t).sort((n, i) => n.start.getTime() - i.start.getTime());
|
|
5007
4861
|
}
|
|
5008
4862
|
/**
|
|
5009
4863
|
* Open the date popover for `day`. Anchored on an element resolved LAZILY by
|
|
@@ -5028,20 +4882,20 @@ class $ extends he {
|
|
|
5028
4882
|
createFromPopover(e) {
|
|
5029
4883
|
const t = this.popoverDate;
|
|
5030
4884
|
if (!t) return;
|
|
5031
|
-
const
|
|
4885
|
+
const n = this.shadowRoot?.querySelector(
|
|
5032
4886
|
"mp-select.popover-resource-select"
|
|
5033
|
-
)?.value || void 0,
|
|
5034
|
-
|
|
5035
|
-
const
|
|
5036
|
-
if (
|
|
4887
|
+
)?.value || void 0, i = new Date(t);
|
|
4888
|
+
i.setHours(0, 0, 0, 0);
|
|
4889
|
+
const r = new Date(i);
|
|
4890
|
+
if (r.setDate(r.getDate() + 1), this.closeDayPopover(), !this.can("createEvent") || !this.allowsCreateAt({ start: i, end: r }, n)) {
|
|
5037
4891
|
this.announceDenied();
|
|
5038
4892
|
return;
|
|
5039
4893
|
}
|
|
5040
4894
|
this.eventEmitter.emitEventCreate(
|
|
5041
|
-
{ start:
|
|
4895
|
+
{ start: i, end: r },
|
|
5042
4896
|
this.stateManager.getState().view,
|
|
5043
4897
|
e,
|
|
5044
|
-
|
|
4898
|
+
n
|
|
5045
4899
|
);
|
|
5046
4900
|
}
|
|
5047
4901
|
/** "Show day" / "Show month" — the drill that matches the popover's scope. */
|
|
@@ -5054,7 +4908,7 @@ class $ extends he {
|
|
|
5054
4908
|
/** Every event overlapping `day`'s local month, in start order. */
|
|
5055
4909
|
eventsInMonth(e) {
|
|
5056
4910
|
const t = new Date(e.getFullYear(), e.getMonth(), 1), s = new Date(e.getFullYear(), e.getMonth() + 1, 1);
|
|
5057
|
-
return this.stateManager.getState().events.filter((
|
|
4911
|
+
return this.stateManager.getState().events.filter((n) => n.start < s && n.end > t).sort((n, i) => n.start.getTime() - i.start.getTime());
|
|
5058
4912
|
}
|
|
5059
4913
|
// ============================================
|
|
5060
4914
|
// Built-in event editor (R20 / D12.8)
|
|
@@ -5147,14 +5001,14 @@ class $ extends he {
|
|
|
5147
5001
|
"[data-event-id]:not(.preview)"
|
|
5148
5002
|
);
|
|
5149
5003
|
if (!s) {
|
|
5150
|
-
const
|
|
5004
|
+
const r = t?.closest?.(".scheduler-resource-cell")?.querySelector?.(
|
|
5151
5005
|
".scheduler-row-menu-button"
|
|
5152
5006
|
)?.dataset.resourceId;
|
|
5153
|
-
|
|
5007
|
+
r && (e.preventDefault(), this.openRowMenu(r));
|
|
5154
5008
|
return;
|
|
5155
5009
|
}
|
|
5156
|
-
const
|
|
5157
|
-
!
|
|
5010
|
+
const n = this.getEventById(s.dataset.eventId ?? "");
|
|
5011
|
+
!n || !this.eventEditor || !this.canOpenEditor(n) || (e.preventDefault(), this.stateManager.setSelectedEvent(n), this.tryOpenEventEditor(n));
|
|
5158
5012
|
}
|
|
5159
5013
|
/**
|
|
5160
5014
|
* Did this `contextmenu` come from a finger?
|
|
@@ -5206,10 +5060,10 @@ class $ extends he {
|
|
|
5206
5060
|
renderEventEditor() {
|
|
5207
5061
|
const e = this.editorEventId ? this.getEventById(this.editorEventId) : null, t = this.editorDraft;
|
|
5208
5062
|
if (!e || !t) return k;
|
|
5209
|
-
const { options: s } = this.stateManager.getState(),
|
|
5063
|
+
const { options: s } = this.stateManager.getState(), n = this.can("editEvent", e), i = this.editorError?.field === "title", r = this.editorError?.field === "end", o = pe(
|
|
5210
5064
|
this.editorTitleErrorId,
|
|
5211
5065
|
this.editorError?.message ?? null,
|
|
5212
|
-
|
|
5066
|
+
i
|
|
5213
5067
|
), { canStart: a, canEnd: l, startIsMove: d } = this.editorTimeFields(e), c = t.color ?? X(
|
|
5214
5068
|
e,
|
|
5215
5069
|
this.stateManager.getState().resourceById,
|
|
@@ -5236,15 +5090,15 @@ class $ extends he {
|
|
|
5236
5090
|
<span>${this.msg("editorTitleLabel")}</span>
|
|
5237
5091
|
<input
|
|
5238
5092
|
type="text"
|
|
5239
|
-
class="form-control form-control-sm editor-input editor-title-input ${
|
|
5093
|
+
class="form-control form-control-sm editor-input editor-title-input ${i ? "is-invalid" : ""}"
|
|
5240
5094
|
.value=${t.title}
|
|
5241
|
-
?disabled=${!
|
|
5242
|
-
aria-invalid=${
|
|
5243
|
-
aria-errormessage=${
|
|
5244
|
-
aria-describedby=${
|
|
5095
|
+
?disabled=${!n}
|
|
5096
|
+
aria-invalid=${i ? "true" : "false"}
|
|
5097
|
+
aria-errormessage=${o.id}
|
|
5098
|
+
aria-describedby=${o.id}
|
|
5245
5099
|
@input=${(u) => this.updateEditorDraft({ title: u.target.value })}
|
|
5246
5100
|
/>
|
|
5247
|
-
${
|
|
5101
|
+
${o.node}
|
|
5248
5102
|
</label>
|
|
5249
5103
|
<label class="editor-field">
|
|
5250
5104
|
<span>${this.msg("editorStartLabel")}</span>
|
|
@@ -5268,8 +5122,8 @@ class $ extends he {
|
|
|
5268
5122
|
.value=${t.end}
|
|
5269
5123
|
.min=${t.start}
|
|
5270
5124
|
?disabled=${!l}
|
|
5271
|
-
?invalid=${
|
|
5272
|
-
error-text=${
|
|
5125
|
+
?invalid=${r}
|
|
5126
|
+
error-text=${r ? this.editorError.message : k}
|
|
5273
5127
|
@value-change=${(u) => this.onEditorEndChange(u)}
|
|
5274
5128
|
input-label=${this.msg("editorEndLabel")}
|
|
5275
5129
|
locale=${s.locale ?? k}
|
|
@@ -5284,7 +5138,7 @@ class $ extends he {
|
|
|
5284
5138
|
type="color"
|
|
5285
5139
|
class="form-control form-control-color editor-input editor-color-input"
|
|
5286
5140
|
.value=${c}
|
|
5287
|
-
?disabled=${!
|
|
5141
|
+
?disabled=${!n || t.inheritColor}
|
|
5288
5142
|
@input=${(u) => this.updateEditorDraft({ color: u.target.value })}
|
|
5289
5143
|
/>
|
|
5290
5144
|
</label>
|
|
@@ -5292,7 +5146,7 @@ class $ extends he {
|
|
|
5292
5146
|
<mp-checkbox
|
|
5293
5147
|
class="editor-inherit-input"
|
|
5294
5148
|
.checked=${t.inheritColor}
|
|
5295
|
-
?disabled=${!
|
|
5149
|
+
?disabled=${!n}
|
|
5296
5150
|
@change=${() => this.toggleEditorColorInherit()}
|
|
5297
5151
|
>${this.msg("editorInheritColor")}</mp-checkbox>
|
|
5298
5152
|
</div>
|
|
@@ -5368,23 +5222,23 @@ class $ extends he {
|
|
|
5368
5222
|
onEditorStartChange(e) {
|
|
5369
5223
|
const t = e.detail, s = this.editorDraft;
|
|
5370
5224
|
if (!t || !s) return;
|
|
5371
|
-
const
|
|
5372
|
-
if (
|
|
5373
|
-
const
|
|
5374
|
-
if (!
|
|
5375
|
-
this.updateEditorDraft({ start: t, end: new Date(s.end.getTime() +
|
|
5225
|
+
const n = t.getTime() - s.start.getTime();
|
|
5226
|
+
if (n === 0) return;
|
|
5227
|
+
const i = this.editorEventId ? this.getEventById(this.editorEventId) : null;
|
|
5228
|
+
if (!i || this.editorTimeFields(i).startIsMove) {
|
|
5229
|
+
this.updateEditorDraft({ start: t, end: new Date(s.end.getTime() + n) });
|
|
5376
5230
|
return;
|
|
5377
5231
|
}
|
|
5378
|
-
const
|
|
5379
|
-
if (t.getTime() <=
|
|
5232
|
+
const r = new Date(s.end.getTime() - this.minutesPerSlot() * 60 * 1e3);
|
|
5233
|
+
if (t.getTime() <= r.getTime()) {
|
|
5380
5234
|
this.updateEditorDraft({ start: t });
|
|
5381
5235
|
return;
|
|
5382
5236
|
}
|
|
5383
|
-
this.updateEditorDraft({ start:
|
|
5384
|
-
const { options:
|
|
5237
|
+
this.updateEditorDraft({ start: r });
|
|
5238
|
+
const { options: o } = this.stateManager.getState();
|
|
5385
5239
|
this.liveAnnouncer.announce(
|
|
5386
5240
|
this.msg("editorStartClamped", {
|
|
5387
|
-
start: h.formatTime(
|
|
5241
|
+
start: h.formatTime(r, o.timeFormat, o.locale)
|
|
5388
5242
|
})
|
|
5389
5243
|
);
|
|
5390
5244
|
}
|
|
@@ -5410,16 +5264,16 @@ class $ extends he {
|
|
|
5410
5264
|
onEditorEndChange(e) {
|
|
5411
5265
|
const t = e.detail, s = this.editorDraft;
|
|
5412
5266
|
if (!t || !s) return;
|
|
5413
|
-
const
|
|
5414
|
-
if (t.getTime() >=
|
|
5267
|
+
const n = new Date(s.start.getTime() + this.minutesPerSlot() * 60 * 1e3);
|
|
5268
|
+
if (t.getTime() >= n.getTime()) {
|
|
5415
5269
|
this.updateEditorDraft({ end: t });
|
|
5416
5270
|
return;
|
|
5417
5271
|
}
|
|
5418
|
-
this.updateEditorDraft({ end:
|
|
5419
|
-
const { options:
|
|
5272
|
+
this.updateEditorDraft({ end: n });
|
|
5273
|
+
const { options: i } = this.stateManager.getState();
|
|
5420
5274
|
this.liveAnnouncer.announce(
|
|
5421
5275
|
this.msg("editorEndClamped", {
|
|
5422
|
-
end: h.formatTime(
|
|
5276
|
+
end: h.formatTime(n, i.timeFormat, i.locale)
|
|
5423
5277
|
})
|
|
5424
5278
|
);
|
|
5425
5279
|
}
|
|
@@ -5447,12 +5301,12 @@ class $ extends he {
|
|
|
5447
5301
|
if (!e || !t) return;
|
|
5448
5302
|
const s = { ...e };
|
|
5449
5303
|
if (this.can("editEvent", e)) {
|
|
5450
|
-
const
|
|
5451
|
-
if (!
|
|
5304
|
+
const n = t.title.trim();
|
|
5305
|
+
if (!n) {
|
|
5452
5306
|
this.refuseSave("title", this.msg("editorTitleRequired"));
|
|
5453
5307
|
return;
|
|
5454
5308
|
}
|
|
5455
|
-
s.title =
|
|
5309
|
+
s.title = n, t.inheritColor ? delete s.color : t.color && (s.color = t.color);
|
|
5456
5310
|
}
|
|
5457
5311
|
if (this.editorTimeFields(e).canTime && (s.start = t.start, s.end = t.end), isNaN(s.start.getTime()) || isNaN(s.end.getTime()) || s.end <= s.start) {
|
|
5458
5312
|
this.refuseSave("end", this.msg("editorInvalidRange"));
|
|
@@ -5489,8 +5343,8 @@ class $ extends he {
|
|
|
5489
5343
|
".resource-title[data-resource-id]"
|
|
5490
5344
|
);
|
|
5491
5345
|
if (!s) return;
|
|
5492
|
-
const
|
|
5493
|
-
|
|
5346
|
+
const n = s.dataset.resourceId;
|
|
5347
|
+
n && this.beginResourceRename(n);
|
|
5494
5348
|
}
|
|
5495
5349
|
/**
|
|
5496
5350
|
* Swap a resource/group title for an inline input — file-manager's proven
|
|
@@ -5506,27 +5360,27 @@ class $ extends he {
|
|
|
5506
5360
|
`.resource-title[data-resource-id="${this.cssEscape(e)}"]`
|
|
5507
5361
|
);
|
|
5508
5362
|
if (!t || !s || s.querySelector("input")) return;
|
|
5509
|
-
const
|
|
5510
|
-
|
|
5363
|
+
const n = t.title, i = document.createElement("input");
|
|
5364
|
+
i.type = "text", i.className = "form-control form-control-sm rename-input", i.value = n, i.setAttribute(
|
|
5511
5365
|
"aria-label",
|
|
5512
|
-
this.msg("renameResourceLabel", { title:
|
|
5366
|
+
this.msg("renameResourceLabel", { title: n })
|
|
5513
5367
|
);
|
|
5514
|
-
let
|
|
5515
|
-
const
|
|
5516
|
-
if (
|
|
5517
|
-
|
|
5518
|
-
const l =
|
|
5519
|
-
s.textContent = a && l ? l :
|
|
5520
|
-
this.msg("resourceRenamed", { from:
|
|
5368
|
+
let r = !1;
|
|
5369
|
+
const o = (a) => {
|
|
5370
|
+
if (r) return;
|
|
5371
|
+
r = !0;
|
|
5372
|
+
const l = i.value.trim();
|
|
5373
|
+
s.textContent = a && l ? l : n, a && l && l !== n && (this.eventEmitter.emitResourceUpdate(t, { title: l }, new CustomEvent("rename")), this.liveAnnouncer.announce(
|
|
5374
|
+
this.msg("resourceRenamed", { from: n, to: l })
|
|
5521
5375
|
)), requestAnimationFrame(() => {
|
|
5522
5376
|
this.shadowRoot?.querySelector(
|
|
5523
5377
|
`.scheduler-timeline-slot[data-resource-id="${this.cssEscape(e)}"]`
|
|
5524
5378
|
)?.focus({ preventScroll: !0 });
|
|
5525
5379
|
});
|
|
5526
5380
|
};
|
|
5527
|
-
|
|
5528
|
-
a.stopPropagation(), a.key === "Enter" ? (a.preventDefault(),
|
|
5529
|
-
}),
|
|
5381
|
+
i.addEventListener("keydown", (a) => {
|
|
5382
|
+
a.stopPropagation(), a.key === "Enter" ? (a.preventDefault(), o(!0)) : a.key === "Escape" && (a.preventDefault(), o(!1));
|
|
5383
|
+
}), i.addEventListener("blur", () => o(!0)), i.addEventListener("pointerdown", (a) => a.stopPropagation()), s.textContent = "", s.appendChild(i), i.focus(), i.select();
|
|
5530
5384
|
}
|
|
5531
5385
|
/** The in-grid pointer delete (D12.4b's revised home). */
|
|
5532
5386
|
deleteFromEditor() {
|
|
@@ -5569,7 +5423,7 @@ class $ extends he {
|
|
|
5569
5423
|
isEventSelected: (t) => this.stateManager.getState().selectedEvent?.id === t
|
|
5570
5424
|
},
|
|
5571
5425
|
{
|
|
5572
|
-
onPointerDown: (t, s,
|
|
5426
|
+
onPointerDown: (t, s, n) => this.handlePointerDown(t, s, n),
|
|
5573
5427
|
onPointerMove: (t) => this.handlePointerMove(t),
|
|
5574
5428
|
onPointerUp: (t) => this.handlePointerUp(t),
|
|
5575
5429
|
onClick: (t, s) => this.handleClick(t, s),
|
|
@@ -5583,42 +5437,42 @@ class $ extends he {
|
|
|
5583
5437
|
t.className = "scheduler-nav", t.setAttribute("aria-label", this.msg("navLabel"));
|
|
5584
5438
|
const s = document.createElement("button");
|
|
5585
5439
|
s.type = "button", s.textContent = "‹", s.setAttribute("aria-label", this.msg("previousPeriod")), s.title = this.msg("previousPeriod"), s.addEventListener("click", () => this.prev());
|
|
5586
|
-
const r = document.createElement("button");
|
|
5587
|
-
r.type = "button", r.textContent = "›", r.setAttribute("aria-label", this.msg("nextPeriod")), r.title = this.msg("nextPeriod"), r.addEventListener("click", () => this.next());
|
|
5588
5440
|
const n = document.createElement("button");
|
|
5589
|
-
n.type = "button", n.textContent =
|
|
5441
|
+
n.type = "button", n.textContent = "›", n.setAttribute("aria-label", this.msg("nextPeriod")), n.title = this.msg("nextPeriod"), n.addEventListener("click", () => this.next());
|
|
5442
|
+
const i = document.createElement("button");
|
|
5443
|
+
i.type = "button", i.textContent = this.msg("today"), i.setAttribute("aria-label", this.msg("jumpToToday")), i.addEventListener("click", () => this.today()), t.appendChild(s), t.appendChild(n), t.appendChild(i);
|
|
5444
|
+
const r = document.createElement("div");
|
|
5445
|
+
r.className = "scheduler-title", r.setAttribute("aria-live", "polite"), r.setAttribute("aria-atomic", "true"), this.updateTitle(r);
|
|
5590
5446
|
const o = document.createElement("div");
|
|
5591
|
-
o.className = "scheduler-
|
|
5592
|
-
const i = document.createElement("div");
|
|
5593
|
-
i.className = "scheduler-view-switcher", i.setAttribute("role", "group"), i.setAttribute("aria-label", this.msg("switchView"));
|
|
5447
|
+
o.className = "scheduler-view-switcher", o.setAttribute("role", "group"), o.setAttribute("aria-label", this.msg("switchView"));
|
|
5594
5448
|
const a = ["year", "month", "week", "day", "timeline"];
|
|
5595
5449
|
for (const l of a) {
|
|
5596
5450
|
const d = document.createElement("button");
|
|
5597
5451
|
d.type = "button", d.textContent = this.viewLabel(l), d.dataset.view = l;
|
|
5598
5452
|
const c = l === this.view;
|
|
5599
|
-
d.setAttribute("aria-pressed", String(c)), c && d.classList.add("active"), d.addEventListener("click", () => this.changeView(l)),
|
|
5453
|
+
d.setAttribute("aria-pressed", String(c)), c && d.classList.add("active"), d.addEventListener("click", () => this.changeView(l)), o.appendChild(d);
|
|
5600
5454
|
}
|
|
5601
|
-
e.appendChild(t), e.appendChild(
|
|
5455
|
+
e.appendChild(t), e.appendChild(r), e.appendChild(o);
|
|
5602
5456
|
}
|
|
5603
5457
|
updateTitle(e) {
|
|
5604
5458
|
const t = e ?? this.shadowRoot.querySelector(".scheduler-title");
|
|
5605
5459
|
if (!t) return;
|
|
5606
|
-
const s = this.stateManager.getState(), { date:
|
|
5607
|
-
let
|
|
5608
|
-
switch (
|
|
5460
|
+
const s = this.stateManager.getState(), { date: n, view: i, options: r } = s;
|
|
5461
|
+
let o = "";
|
|
5462
|
+
switch (i) {
|
|
5609
5463
|
case "year":
|
|
5610
|
-
|
|
5464
|
+
o = n.getFullYear().toString();
|
|
5611
5465
|
break;
|
|
5612
5466
|
case "month":
|
|
5613
|
-
|
|
5467
|
+
o = h.formatDate(n, r.locale, {
|
|
5614
5468
|
month: "long",
|
|
5615
5469
|
year: "numeric"
|
|
5616
5470
|
});
|
|
5617
5471
|
break;
|
|
5618
5472
|
case "week":
|
|
5619
5473
|
case "timeline": {
|
|
5620
|
-
const a = h.getWeekStart(
|
|
5621
|
-
|
|
5474
|
+
const a = h.getWeekStart(n, this.firstDayOfWeek()), l = h.addDays(a, 6);
|
|
5475
|
+
o = h.formatDateRange(a, l, r.locale, {
|
|
5622
5476
|
month: "short",
|
|
5623
5477
|
day: "numeric",
|
|
5624
5478
|
year: "numeric"
|
|
@@ -5626,7 +5480,7 @@ class $ extends he {
|
|
|
5626
5480
|
break;
|
|
5627
5481
|
}
|
|
5628
5482
|
case "day":
|
|
5629
|
-
|
|
5483
|
+
o = h.formatDate(n, r.locale, {
|
|
5630
5484
|
weekday: "long",
|
|
5631
5485
|
month: "long",
|
|
5632
5486
|
day: "numeric",
|
|
@@ -5634,7 +5488,7 @@ class $ extends he {
|
|
|
5634
5488
|
});
|
|
5635
5489
|
break;
|
|
5636
5490
|
}
|
|
5637
|
-
t.textContent =
|
|
5491
|
+
t.textContent = o;
|
|
5638
5492
|
}
|
|
5639
5493
|
static {
|
|
5640
5494
|
this.NARROW_HEADER_WIDTH = 560;
|
|
@@ -5648,9 +5502,9 @@ class $ extends he {
|
|
|
5648
5502
|
if (typeof ResizeObserver > "u") return;
|
|
5649
5503
|
const t = this.shadowRoot?.querySelector(".scheduler-container");
|
|
5650
5504
|
this.headerResizeObserver = new ResizeObserver((s) => {
|
|
5651
|
-
const
|
|
5652
|
-
|
|
5653
|
-
e.toggleAttribute("data-narrow",
|
|
5505
|
+
const i = (s[0]?.contentRect.width ?? e.clientWidth) < $.NARROW_HEADER_WIDTH;
|
|
5506
|
+
i !== this.headerIsNarrow && (this.headerIsNarrow = i, requestAnimationFrame(() => {
|
|
5507
|
+
e.toggleAttribute("data-narrow", i), t?.toggleAttribute("data-narrow", i);
|
|
5654
5508
|
}));
|
|
5655
5509
|
}), this.headerResizeObserver.observe(e);
|
|
5656
5510
|
}
|
|
@@ -5667,18 +5521,18 @@ class $ extends he {
|
|
|
5667
5521
|
this.currentView = new N(this.contentContainer, s), this.currentViewType = "month";
|
|
5668
5522
|
break;
|
|
5669
5523
|
case "week":
|
|
5670
|
-
this.currentView = new
|
|
5524
|
+
this.currentView = new Ie(this.contentContainer, s), this.currentViewType = "week";
|
|
5671
5525
|
break;
|
|
5672
5526
|
case "day":
|
|
5673
|
-
this.currentView = new
|
|
5527
|
+
this.currentView = new Ae(this.contentContainer, s), this.currentViewType = "day";
|
|
5674
5528
|
break;
|
|
5675
5529
|
case "timeline":
|
|
5676
5530
|
this.currentView = new I(this.contentContainer, s), this.currentViewType = "timeline";
|
|
5677
5531
|
break;
|
|
5678
5532
|
}
|
|
5679
5533
|
this.currentView?.render(), t && requestAnimationFrame(() => {
|
|
5680
|
-
const
|
|
5681
|
-
(!
|
|
5534
|
+
const n = this.shadowRoot?.activeElement;
|
|
5535
|
+
(!n || n === this.shadowRoot?.host) && this.focusFocusedCell();
|
|
5682
5536
|
});
|
|
5683
5537
|
}
|
|
5684
5538
|
// ============================================
|
|
@@ -5688,13 +5542,13 @@ class $ extends he {
|
|
|
5688
5542
|
e.isLoading !== this.previousIsLoading && (this.previousIsLoading !== null && this.liveAnnouncer.announce(this.msg(e.isLoading ? "loadingEvents" : "eventsLoaded")), this.previousIsLoading = e.isLoading), this.detectAndEmitChanges(e), this.updateUI(e), this.keymapView !== e.view && (this.keymapView = e.view, this.requestUpdate()), (this.popoverDate || this.editorEventId) && this.requestUpdate();
|
|
5689
5543
|
}
|
|
5690
5544
|
detectAndEmitChanges(e) {
|
|
5691
|
-
const t = this.previousView !== null && this.previousView !== e.view, s = this.previousDate !== null && this.previousDate.getTime() !== e.date.getTime(),
|
|
5692
|
-
(t || s) && this.eventEmitter.emitViewChange(e.view, e.date),
|
|
5545
|
+
const t = this.previousView !== null && this.previousView !== e.view, s = this.previousDate !== null && this.previousDate.getTime() !== e.date.getTime(), n = e.selectedEvent?.id ?? null, i = G(e), r = i ? `${i.start.getTime()}-${i.end.getTime()}-${e.selectionResourceId ?? ""}` : null, o = this.previousSelectedEventId !== n || this.previousRangeKey !== r;
|
|
5546
|
+
(t || s) && this.eventEmitter.emitViewChange(e.view, e.date), o && this.eventEmitter.emitSelectionChange(
|
|
5693
5547
|
e.selectedEvent,
|
|
5694
|
-
|
|
5548
|
+
i,
|
|
5695
5549
|
e.view,
|
|
5696
5550
|
e.selectionResourceId ?? void 0
|
|
5697
|
-
), this.previousView = e.view, this.previousDate = new Date(e.date), this.previousSelectedEventId =
|
|
5551
|
+
), this.previousView = e.view, this.previousDate = new Date(e.date), this.previousSelectedEventId = n, this.previousRangeKey = r;
|
|
5698
5552
|
}
|
|
5699
5553
|
/**
|
|
5700
5554
|
* Re-apply the header's localized labels.
|
|
@@ -5710,10 +5564,10 @@ class $ extends he {
|
|
|
5710
5564
|
if (!e) return;
|
|
5711
5565
|
const t = e.querySelector(".scheduler-nav");
|
|
5712
5566
|
t?.setAttribute("aria-label", this.msg("navLabel"));
|
|
5713
|
-
const s = t?.querySelectorAll("button"), [
|
|
5714
|
-
|
|
5715
|
-
const
|
|
5716
|
-
|
|
5567
|
+
const s = t?.querySelectorAll("button"), [n, i, r] = s ? [...s] : [];
|
|
5568
|
+
n && (n.setAttribute("aria-label", this.msg("previousPeriod")), n.title = this.msg("previousPeriod")), i && (i.setAttribute("aria-label", this.msg("nextPeriod")), i.title = this.msg("nextPeriod")), r && (r.textContent = this.msg("today"), r.setAttribute("aria-label", this.msg("jumpToToday")));
|
|
5569
|
+
const o = e.querySelector(".scheduler-view-switcher");
|
|
5570
|
+
o?.setAttribute("aria-label", this.msg("switchView")), o?.querySelectorAll("button[data-view]").forEach((a) => {
|
|
5717
5571
|
const l = a.dataset.view;
|
|
5718
5572
|
l && (a.textContent = this.viewLabel(l));
|
|
5719
5573
|
});
|
|
@@ -5721,8 +5575,8 @@ class $ extends he {
|
|
|
5721
5575
|
updateUI(e) {
|
|
5722
5576
|
if (!this.shadowRoot) return;
|
|
5723
5577
|
this.updateTitle(), this.applyHeaderLabels(), this.shadowRoot.querySelectorAll(".scheduler-view-switcher button").forEach((s) => {
|
|
5724
|
-
const
|
|
5725
|
-
|
|
5578
|
+
const n = s, i = n.dataset.view === e.view;
|
|
5579
|
+
n.classList.toggle("active", i), n.setAttribute("aria-pressed", String(i));
|
|
5726
5580
|
}), this.currentView && (this.currentViewType !== e.view ? this.renderView() : e.dragState || e.previewEvent ? this.scheduleDragUpdate(e) : this.currentView.update(e));
|
|
5727
5581
|
}
|
|
5728
5582
|
scheduleDragUpdate(e) {
|
|
@@ -5785,10 +5639,10 @@ class $ extends he {
|
|
|
5785
5639
|
this.stopEdgeScroll();
|
|
5786
5640
|
return;
|
|
5787
5641
|
}
|
|
5788
|
-
const s = t.getBoundingClientRect(),
|
|
5642
|
+
const s = t.getBoundingClientRect(), n = $.EDGE_SCROLL_ZONE_PX, i = $.EDGE_SCROLL_MAX_PX, r = (o, a, l) => o < a + n ? -Math.min(1, (a + n - o) / n) * i : o > l - n ? Math.min(1, (o - (l - n)) / n) * i : 0;
|
|
5789
5643
|
if (this.edgeScrollVector = {
|
|
5790
|
-
x:
|
|
5791
|
-
y:
|
|
5644
|
+
x: r(e.clientX, s.left, s.right),
|
|
5645
|
+
y: r(e.clientY, s.top, s.bottom)
|
|
5792
5646
|
}, this.edgeScrollPointer = e, this.edgeScrollVector.x === 0 && this.edgeScrollVector.y === 0) {
|
|
5793
5647
|
this.stopEdgeScroll();
|
|
5794
5648
|
return;
|
|
@@ -5800,8 +5654,8 @@ class $ extends he {
|
|
|
5800
5654
|
this.edgeScrollFrame = null;
|
|
5801
5655
|
const e = this.contentContainer, t = this.edgeScrollPointer;
|
|
5802
5656
|
if (!e || !t || !this.dragManager.isDragging()) return;
|
|
5803
|
-
const s = e.scrollLeft,
|
|
5804
|
-
e.scrollLeft = s + this.edgeScrollVector.x, e.scrollTop =
|
|
5657
|
+
const s = e.scrollLeft, n = e.scrollTop;
|
|
5658
|
+
e.scrollLeft = s + this.edgeScrollVector.x, e.scrollTop = n + this.edgeScrollVector.y, !(e.scrollLeft === s && e.scrollTop === n) && (this.dragManager.handlePointerMove(t), this.scheduleEdgeScroll());
|
|
5805
5659
|
});
|
|
5806
5660
|
}
|
|
5807
5661
|
stopEdgeScroll() {
|
|
@@ -5811,8 +5665,8 @@ class $ extends he {
|
|
|
5811
5665
|
this.DBLCLICK_WINDOW_MS = 500;
|
|
5812
5666
|
}
|
|
5813
5667
|
registerEventActivation(e, t) {
|
|
5814
|
-
const s = Date.now(),
|
|
5815
|
-
this.lastEventActivation = { eventId: e.id, time: s },
|
|
5668
|
+
const s = Date.now(), n = this.lastEventActivation;
|
|
5669
|
+
this.lastEventActivation = { eventId: e.id, time: s }, n && n.eventId === e.id && s - n.time < $.DBLCLICK_WINDOW_MS && (this.lastEventActivation = null, this.eventEmitter.emitEventDblClick(e, t), this.tryOpenEventEditor(e));
|
|
5816
5670
|
}
|
|
5817
5671
|
handleDragComplete(e, t) {
|
|
5818
5672
|
if (e.wasClick) {
|
|
@@ -5854,25 +5708,25 @@ class $ extends he {
|
|
|
5854
5708
|
handleClick(e, t) {
|
|
5855
5709
|
const s = e.target;
|
|
5856
5710
|
if (this.handleResourceAction(s, e.originalEvent)) return;
|
|
5857
|
-
const
|
|
5858
|
-
if (
|
|
5859
|
-
const a =
|
|
5711
|
+
const n = s.closest(".expand-toggle");
|
|
5712
|
+
if (n) {
|
|
5713
|
+
const a = n.dataset.groupId;
|
|
5860
5714
|
if (a) {
|
|
5861
5715
|
this.stateManager.toggleGroupCollapse(a), this.renderView();
|
|
5862
5716
|
return;
|
|
5863
5717
|
}
|
|
5864
5718
|
}
|
|
5865
|
-
const
|
|
5866
|
-
if (
|
|
5867
|
-
const a =
|
|
5719
|
+
const i = s.closest(".scheduler-more-link");
|
|
5720
|
+
if (i) {
|
|
5721
|
+
const a = i.dataset.date;
|
|
5868
5722
|
if (a) {
|
|
5869
5723
|
this.handleMoreLink(a);
|
|
5870
5724
|
return;
|
|
5871
5725
|
}
|
|
5872
5726
|
}
|
|
5873
|
-
const
|
|
5874
|
-
if (
|
|
5875
|
-
const a =
|
|
5727
|
+
const r = s.closest("[data-date]");
|
|
5728
|
+
if (r) {
|
|
5729
|
+
const a = r.dataset.date;
|
|
5876
5730
|
if (a) {
|
|
5877
5731
|
const l = this.parseDayKey(a);
|
|
5878
5732
|
if (this.eventEmitter.emitDateClick(l, e.originalEvent), s.closest(".day-number")) {
|
|
@@ -5886,11 +5740,11 @@ class $ extends he {
|
|
|
5886
5740
|
}
|
|
5887
5741
|
}
|
|
5888
5742
|
}
|
|
5889
|
-
const
|
|
5743
|
+
const o = s.closest(
|
|
5890
5744
|
".scheduler-year-month-header"
|
|
5891
5745
|
);
|
|
5892
|
-
if (
|
|
5893
|
-
const a =
|
|
5746
|
+
if (o) {
|
|
5747
|
+
const a = o.dataset.month;
|
|
5894
5748
|
a && (this.stateManager.setDate(this.parseDayKey(a)), this.stateManager.setView("month"));
|
|
5895
5749
|
}
|
|
5896
5750
|
t.type === "event" && t.event && (this.stateManager.setSelectedEvent(t.event), this.registerEventActivation(t.event, e.originalEvent));
|
|
@@ -5906,24 +5760,24 @@ class $ extends he {
|
|
|
5906
5760
|
handleResourceAction(e, t) {
|
|
5907
5761
|
const s = e.closest("[data-action]");
|
|
5908
5762
|
if (!s) return !1;
|
|
5909
|
-
const { action:
|
|
5910
|
-
switch (
|
|
5763
|
+
const { action: n, parentId: i, resourceId: r } = s.dataset, o = this.stateManager.getState().view;
|
|
5764
|
+
switch (n) {
|
|
5911
5765
|
// The trigger itself is not a request — it opens the panel that carries
|
|
5912
5766
|
// them. Handled here so the click never falls through to the grid.
|
|
5913
5767
|
case "row-menu":
|
|
5914
|
-
return
|
|
5768
|
+
return r && this.openRowMenu(r), !0;
|
|
5915
5769
|
// Starts the same inline edit double-click and F2 already start. The panel
|
|
5916
5770
|
// closes WITHOUT returning focus first: `beginResourceRename` focuses the
|
|
5917
5771
|
// input it creates, and handing focus back to the trigger on the way there
|
|
5918
5772
|
// would be a visible detour.
|
|
5919
5773
|
case "rename-resource":
|
|
5920
|
-
return
|
|
5774
|
+
return r && this.can("updateResource") && (this.rowMenuOverlay.close(!1), this.beginResourceRename(r)), !0;
|
|
5921
5775
|
case "add-resource":
|
|
5922
|
-
return this.can("createResource") && this.eventEmitter.emitResourceCreate("resource",
|
|
5776
|
+
return this.can("createResource") && this.eventEmitter.emitResourceCreate("resource", o, t, i), !0;
|
|
5923
5777
|
case "add-group":
|
|
5924
|
-
return this.can("createGroup") && this.eventEmitter.emitResourceCreate("group",
|
|
5778
|
+
return this.can("createGroup") && this.eventEmitter.emitResourceCreate("group", o, t, i), !0;
|
|
5925
5779
|
case "delete-resource": {
|
|
5926
|
-
const a =
|
|
5780
|
+
const a = r ? this.findResourceOrGroup(r) : null;
|
|
5927
5781
|
return a && this.can("deleteResource") && this.eventEmitter.emitResourceDelete(a, t), !0;
|
|
5928
5782
|
}
|
|
5929
5783
|
// The colour input reports through `change`, not `click` — a click merely
|
|
@@ -5943,12 +5797,12 @@ class $ extends he {
|
|
|
5943
5797
|
handleValueChange(e) {
|
|
5944
5798
|
const t = e.composedPath?.()[0] ?? e.target;
|
|
5945
5799
|
if (!t || t.dataset.action !== "set-resource-color" || !this.can("updateResource")) return;
|
|
5946
|
-
const { resourceId: s, field:
|
|
5947
|
-
if (!
|
|
5948
|
-
const
|
|
5800
|
+
const { resourceId: s, field: n } = t.dataset, i = s ? this.findResourceOrGroup(s) : null;
|
|
5801
|
+
if (!i) return;
|
|
5802
|
+
const r = t.value;
|
|
5949
5803
|
this.eventEmitter.emitResourceUpdate(
|
|
5950
|
-
|
|
5951
|
-
|
|
5804
|
+
i,
|
|
5805
|
+
n === "eventColor" ? { eventColor: r } : { color: r },
|
|
5952
5806
|
e
|
|
5953
5807
|
);
|
|
5954
5808
|
}
|
|
@@ -5971,13 +5825,13 @@ class $ extends he {
|
|
|
5971
5825
|
handleFocusIn(e) {
|
|
5972
5826
|
const s = (e.composedPath?.() ?? [])[0] ?? e.target;
|
|
5973
5827
|
if (!s || !s.dataset) return;
|
|
5974
|
-
const
|
|
5975
|
-
if (!
|
|
5828
|
+
const n = s.dataset.eventId;
|
|
5829
|
+
if (!n || !s.classList.contains("scheduler-event") && !s.classList.contains("scheduler-timeline-event") && !s.classList.contains("scheduler-month-event"))
|
|
5976
5830
|
return;
|
|
5977
|
-
const
|
|
5978
|
-
|
|
5979
|
-
const
|
|
5980
|
-
this.shadowRoot?.querySelector(
|
|
5831
|
+
const i = this.getEventById(n);
|
|
5832
|
+
i && this.stateManager.getState().selectedEvent?.id !== i.id && (this.stateManager.setSelectedEvent(i), this.eventEmitter.emitEventSelected(i, e), requestAnimationFrame(() => {
|
|
5833
|
+
const r = `[data-event-id="${this.cssEscape(i.id)}"]`;
|
|
5834
|
+
this.shadowRoot?.querySelector(r)?.focus({ preventScroll: !0 });
|
|
5981
5835
|
}));
|
|
5982
5836
|
}
|
|
5983
5837
|
/**
|
|
@@ -5991,8 +5845,8 @@ class $ extends he {
|
|
|
5991
5845
|
* Escape arbitration, which is the reason the guards exist.
|
|
5992
5846
|
*/
|
|
5993
5847
|
eventInsidePanel(e, t) {
|
|
5994
|
-
const s = e.composedPath?.() ?? [],
|
|
5995
|
-
return
|
|
5848
|
+
const s = e.composedPath?.() ?? [], n = this.shadowRoot?.querySelector(t);
|
|
5849
|
+
return n ? s.includes(n) : !1;
|
|
5996
5850
|
}
|
|
5997
5851
|
handleKeyDown(e) {
|
|
5998
5852
|
if (this.rowMenuOverlay.isOpen) {
|
|
@@ -6096,7 +5950,7 @@ class $ extends he {
|
|
|
6096
5950
|
*/
|
|
6097
5951
|
can(e, t) {
|
|
6098
5952
|
const { options: s } = this.stateManager.getState();
|
|
6099
|
-
return
|
|
5953
|
+
return re(e, {
|
|
6100
5954
|
permissions: this.effectivePermissions(s),
|
|
6101
5955
|
event: t ?? null
|
|
6102
5956
|
});
|
|
@@ -6203,17 +6057,17 @@ class $ extends he {
|
|
|
6203
6057
|
* No wrap at the ends — matches the APG list/feed pattern.
|
|
6204
6058
|
*/
|
|
6205
6059
|
focusAdjacentEvent(e, t) {
|
|
6206
|
-
const
|
|
6060
|
+
const n = [...this.stateManager.getState().events].sort((l, d) => {
|
|
6207
6061
|
const c = l.start.getTime() - d.start.getTime();
|
|
6208
6062
|
return c !== 0 ? c : l.id.localeCompare(d.id);
|
|
6209
|
-
}),
|
|
6210
|
-
if (
|
|
6211
|
-
const
|
|
6063
|
+
}), i = n.findIndex((l) => l.id === e.id);
|
|
6064
|
+
if (i < 0) return;
|
|
6065
|
+
const r = n[i + t];
|
|
6066
|
+
if (!r) return;
|
|
6067
|
+
const o = this.shadowRoot;
|
|
6212
6068
|
if (!o) return;
|
|
6213
|
-
|
|
6214
|
-
|
|
6215
|
-
i.querySelector(
|
|
6216
|
-
`[data-event-id="${this.cssEscape(o.id)}"]`
|
|
6069
|
+
o.querySelector(
|
|
6070
|
+
`[data-event-id="${this.cssEscape(r.id)}"]`
|
|
6217
6071
|
)?.focus({ preventScroll: !1 });
|
|
6218
6072
|
}
|
|
6219
6073
|
handleCellKeyDown(e) {
|
|
@@ -6227,37 +6081,37 @@ class $ extends he {
|
|
|
6227
6081
|
return;
|
|
6228
6082
|
}
|
|
6229
6083
|
if (t.focusedCell || this.initFocusedCellFromActive(), e.key === "F2" && t.view === "timeline") {
|
|
6230
|
-
const
|
|
6231
|
-
|
|
6084
|
+
const r = this.stateManager.getState().focusedResourceId;
|
|
6085
|
+
r && (e.preventDefault(), this.beginResourceRename(r));
|
|
6232
6086
|
return;
|
|
6233
6087
|
}
|
|
6234
|
-
const s = e.shiftKey,
|
|
6088
|
+
const s = e.shiftKey, n = e.ctrlKey || e.metaKey, i = t.view === "timeline";
|
|
6235
6089
|
switch (e.key) {
|
|
6236
6090
|
case "ArrowUp":
|
|
6237
|
-
e.preventDefault(),
|
|
6091
|
+
e.preventDefault(), i ? this.moveCellByResource(-1, s) : this.moveCellByTime(-1, s);
|
|
6238
6092
|
break;
|
|
6239
6093
|
case "ArrowDown":
|
|
6240
|
-
e.preventDefault(),
|
|
6094
|
+
e.preventDefault(), i ? this.moveCellByResource(1, s) : this.moveCellByTime(1, s);
|
|
6241
6095
|
break;
|
|
6242
6096
|
case "ArrowLeft": {
|
|
6243
|
-
if (e.preventDefault(), !
|
|
6097
|
+
if (e.preventDefault(), !i) {
|
|
6244
6098
|
this.moveCellByDay(-1, s);
|
|
6245
6099
|
break;
|
|
6246
6100
|
}
|
|
6247
|
-
const
|
|
6101
|
+
const r = this.stateManager.getState().focusedCell?.start.getTime();
|
|
6248
6102
|
this.moveCellByTime(-1, s);
|
|
6249
|
-
const
|
|
6250
|
-
|
|
6103
|
+
const o = this.stateManager.getState().focusedCell?.start.getTime();
|
|
6104
|
+
r !== void 0 && r === o && !s && this.focusRowTrigger();
|
|
6251
6105
|
break;
|
|
6252
6106
|
}
|
|
6253
6107
|
case "ArrowRight":
|
|
6254
|
-
e.preventDefault(),
|
|
6108
|
+
e.preventDefault(), i ? this.moveCellByTime(1, s) : this.moveCellByDay(1, s);
|
|
6255
6109
|
break;
|
|
6256
6110
|
case "Home":
|
|
6257
|
-
e.preventDefault(),
|
|
6111
|
+
e.preventDefault(), n ? this.moveCellToViewExtreme("start", s) : this.moveCellToColumnExtreme("start", s);
|
|
6258
6112
|
break;
|
|
6259
6113
|
case "End":
|
|
6260
|
-
e.preventDefault(),
|
|
6114
|
+
e.preventDefault(), n ? this.moveCellToViewExtreme("end", s) : this.moveCellToColumnExtreme("end", s);
|
|
6261
6115
|
break;
|
|
6262
6116
|
case "PageUp":
|
|
6263
6117
|
e.preventDefault(), this.moveCellByPeriod(-1);
|
|
@@ -6283,8 +6137,8 @@ class $ extends he {
|
|
|
6283
6137
|
if (!e) return;
|
|
6284
6138
|
const t = e.dataset.start, s = e.dataset.end;
|
|
6285
6139
|
if (!t || !s) return;
|
|
6286
|
-
const
|
|
6287
|
-
this.stateManager.setFocusedCell(
|
|
6140
|
+
const n = { start: new Date(t), end: new Date(s) }, i = e.dataset.resourceId ?? null;
|
|
6141
|
+
this.stateManager.setFocusedCell(n, i, !0);
|
|
6288
6142
|
}
|
|
6289
6143
|
/**
|
|
6290
6144
|
* Month-view keyboard handler (PRD scheduler-controlled-selection §5.1).
|
|
@@ -6387,12 +6241,12 @@ class $ extends he {
|
|
|
6387
6241
|
t && this.stateManager.setFocusedDate(this.parseDayKey(t));
|
|
6388
6242
|
}
|
|
6389
6243
|
moveFocusedDateByDays(e) {
|
|
6390
|
-
const t = this.stateManager.getState(), s = t.focusedDate ?? t.date,
|
|
6391
|
-
|
|
6244
|
+
const t = this.stateManager.getState(), s = t.focusedDate ?? t.date, n = new Date(s);
|
|
6245
|
+
n.setDate(n.getDate() + e), this.commitFocusedDate(n);
|
|
6392
6246
|
}
|
|
6393
6247
|
moveFocusedDateByMonths(e) {
|
|
6394
|
-
const t = this.stateManager.getState(), s = t.focusedDate ?? t.date,
|
|
6395
|
-
|
|
6248
|
+
const t = this.stateManager.getState(), s = t.focusedDate ?? t.date, n = new Date(s);
|
|
6249
|
+
n.setMonth(n.getMonth() + e), this.commitFocusedDate(n);
|
|
6396
6250
|
}
|
|
6397
6251
|
/**
|
|
6398
6252
|
* Apply a focused-date update. If the new date crosses the displayed
|
|
@@ -6415,8 +6269,8 @@ class $ extends he {
|
|
|
6415
6269
|
scrollAndFocusDateCell(e) {
|
|
6416
6270
|
const t = this.stateManager.getState(), s = this.shadowRoot;
|
|
6417
6271
|
if (!s) return;
|
|
6418
|
-
const
|
|
6419
|
-
|
|
6272
|
+
const n = `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}`, i = t.view === "year" ? `scheduler-cell-y-${n}` : `scheduler-cell-m-${n}-${String(e.getDate()).padStart(2, "0")}`, r = s.getElementById(i);
|
|
6273
|
+
r && (r.focus({ preventScroll: !0 }), typeof r.scrollIntoView == "function" && r.scrollIntoView({ block: "nearest", inline: "nearest" }));
|
|
6420
6274
|
}
|
|
6421
6275
|
/**
|
|
6422
6276
|
* Emit `event-create` covering the focused day (month view) or focused
|
|
@@ -6424,81 +6278,81 @@ class $ extends he {
|
|
|
6424
6278
|
* scheduler-controlled-selection — consumer constructs the actual event.
|
|
6425
6279
|
*/
|
|
6426
6280
|
commitFocusedDateAsCreate(e, t) {
|
|
6427
|
-
const s = this.stateManager.getState(),
|
|
6428
|
-
if (!
|
|
6429
|
-
const
|
|
6430
|
-
|
|
6431
|
-
const
|
|
6432
|
-
if (t === "day" ?
|
|
6281
|
+
const s = this.stateManager.getState(), n = s.focusedDate;
|
|
6282
|
+
if (!n) return;
|
|
6283
|
+
const i = new Date(n);
|
|
6284
|
+
i.setHours(0, 0, 0, 0);
|
|
6285
|
+
const r = new Date(i);
|
|
6286
|
+
if (t === "day" ? r.setDate(r.getDate() + 1) : r.setMonth(r.getMonth() + 1), !this.can("createEvent") || !this.allowsCreateAt({ start: i, end: r })) {
|
|
6433
6287
|
this.announceDenied();
|
|
6434
6288
|
return;
|
|
6435
6289
|
}
|
|
6436
6290
|
this.eventEmitter.emitEventCreate(
|
|
6437
|
-
{ start:
|
|
6291
|
+
{ start: i, end: r },
|
|
6438
6292
|
s.view,
|
|
6439
6293
|
e
|
|
6440
6294
|
);
|
|
6441
6295
|
}
|
|
6442
6296
|
moveCellByTime(e, t) {
|
|
6443
|
-
const s = this.stateManager.getState(),
|
|
6444
|
-
if (!
|
|
6445
|
-
const
|
|
6446
|
-
this.cellIsWithinView(
|
|
6297
|
+
const s = this.stateManager.getState(), n = s.focusedCell;
|
|
6298
|
+
if (!n) return;
|
|
6299
|
+
const i = (s.options.slotDuration ?? 1800) * 1e3, r = new Date(n.start.getTime() + e * i), o = new Date(r.getTime() + i);
|
|
6300
|
+
this.cellIsWithinView(r, s) && this.commitFocusMove({ start: r, end: o }, s.focusedResourceId, t);
|
|
6447
6301
|
}
|
|
6448
6302
|
/** Week view ArrowLeft/Right: ±1 day, same time-of-day. No-op on day view. */
|
|
6449
6303
|
moveCellByDay(e, t) {
|
|
6450
|
-
const s = this.stateManager.getState(),
|
|
6451
|
-
if (!
|
|
6452
|
-
const
|
|
6453
|
-
|
|
6454
|
-
const
|
|
6455
|
-
this.cellIsWithinView(
|
|
6304
|
+
const s = this.stateManager.getState(), n = s.focusedCell;
|
|
6305
|
+
if (!n || s.view !== "week") return;
|
|
6306
|
+
const i = (s.options.slotDuration ?? 1800) * 1e3, r = new Date(n.start);
|
|
6307
|
+
r.setDate(r.getDate() + e);
|
|
6308
|
+
const o = new Date(r.getTime() + i);
|
|
6309
|
+
this.cellIsWithinView(r, s) && this.commitFocusMove({ start: r, end: o }, null, t);
|
|
6456
6310
|
}
|
|
6457
6311
|
/** Timeline ArrowUp/Down: ±1 resource, same time-of-day. PRD D1: cross-resource
|
|
6458
6312
|
* Shift+Arrow is intentionally ignored (resource is categorical). */
|
|
6459
6313
|
moveCellByResource(e, t) {
|
|
6460
|
-
const s = this.stateManager.getState(),
|
|
6461
|
-
if (!
|
|
6462
|
-
const
|
|
6463
|
-
|
|
6314
|
+
const s = this.stateManager.getState(), n = s.focusedCell;
|
|
6315
|
+
if (!n || s.view !== "timeline" || t) return;
|
|
6316
|
+
const i = this.adjacentRow(s.focusedResourceId, e, s, !0);
|
|
6317
|
+
i !== void 0 && this.commitFocusMove(n, i, !1);
|
|
6464
6318
|
}
|
|
6465
6319
|
moveCellToColumnExtreme(e, t) {
|
|
6466
|
-
const s = this.stateManager.getState(),
|
|
6467
|
-
if (!
|
|
6468
|
-
const
|
|
6469
|
-
|
|
6470
|
-
const
|
|
6471
|
-
|
|
6320
|
+
const s = this.stateManager.getState(), n = s.focusedCell;
|
|
6321
|
+
if (!n) return;
|
|
6322
|
+
const i = new Date(n.start);
|
|
6323
|
+
i.setHours(0, 0, 0, 0);
|
|
6324
|
+
const r = h.getTimeSlots(
|
|
6325
|
+
i,
|
|
6472
6326
|
s.options.slotDuration,
|
|
6473
6327
|
s.options.slotMinTime,
|
|
6474
6328
|
s.options.slotMaxTime
|
|
6475
|
-
),
|
|
6476
|
-
|
|
6329
|
+
), o = e === "start" ? r[0] : r[r.length - 1];
|
|
6330
|
+
o && this.commitFocusMove(o, s.focusedResourceId, t);
|
|
6477
6331
|
}
|
|
6478
6332
|
moveCellToViewExtreme(e, t) {
|
|
6479
6333
|
const s = this.stateManager.getState();
|
|
6480
|
-
let
|
|
6334
|
+
let n = null, i = s.focusedResourceId;
|
|
6481
6335
|
switch (s.view) {
|
|
6482
6336
|
case "day": {
|
|
6483
|
-
const
|
|
6484
|
-
|
|
6337
|
+
const r = h.getTimeSlots(s.date, s.options.slotDuration, s.options.slotMinTime, s.options.slotMaxTime);
|
|
6338
|
+
n = e === "start" ? r[0] : r[r.length - 1];
|
|
6485
6339
|
break;
|
|
6486
6340
|
}
|
|
6487
6341
|
case "week": {
|
|
6488
|
-
const
|
|
6489
|
-
|
|
6342
|
+
const r = h.getWeekDays(s.date, this.firstDayOfWeek()), o = e === "start" ? r[0] : r[6], a = h.getTimeSlots(o, s.options.slotDuration, s.options.slotMinTime, s.options.slotMaxTime);
|
|
6343
|
+
n = e === "start" ? a[0] : a[a.length - 1];
|
|
6490
6344
|
break;
|
|
6491
6345
|
}
|
|
6492
6346
|
case "timeline": {
|
|
6493
|
-
const
|
|
6494
|
-
if (
|
|
6495
|
-
|
|
6496
|
-
const
|
|
6497
|
-
|
|
6347
|
+
const r = this.navigableRows(s, !0);
|
|
6348
|
+
if (r.length === 0) return;
|
|
6349
|
+
i = e === "start" ? r[0] : r[r.length - 1];
|
|
6350
|
+
const o = h.getWeekDays(s.date, this.firstDayOfWeek()), a = e === "start" ? o[0] : o[6], l = h.getTimeSlots(a, s.options.slotDuration, s.options.slotMinTime, s.options.slotMaxTime);
|
|
6351
|
+
n = e === "start" ? l[0] : l[l.length - 1];
|
|
6498
6352
|
break;
|
|
6499
6353
|
}
|
|
6500
6354
|
}
|
|
6501
|
-
|
|
6355
|
+
n && this.commitFocusMove(n, i, t);
|
|
6502
6356
|
}
|
|
6503
6357
|
/**
|
|
6504
6358
|
* PageUp/PageDown — advance one period (week or day) and re-focus the same
|
|
@@ -6506,17 +6360,17 @@ class $ extends he {
|
|
|
6506
6360
|
* crossing a period boundary breaks the linear-range invariant.
|
|
6507
6361
|
*/
|
|
6508
6362
|
moveCellByPeriod(e) {
|
|
6509
|
-
const t = this.stateManager.getState(), s = t.focusedCell,
|
|
6363
|
+
const t = this.stateManager.getState(), s = t.focusedCell, n = t.date;
|
|
6510
6364
|
if (e > 0 ? this.next() : this.prev(), !s) return;
|
|
6511
|
-
const
|
|
6512
|
-
let
|
|
6513
|
-
if (
|
|
6514
|
-
|
|
6365
|
+
const i = this.stateManager.getState();
|
|
6366
|
+
let r;
|
|
6367
|
+
if (i.view === "day")
|
|
6368
|
+
r = new Date(i.date), r.setHours(s.start.getHours(), s.start.getMinutes(), s.start.getSeconds(), 0);
|
|
6515
6369
|
else {
|
|
6516
|
-
const l = h.getWeekDays(
|
|
6517
|
-
|
|
6370
|
+
const l = h.getWeekDays(n, this.firstDayOfWeek()), d = h.getWeekDays(i.date, this.firstDayOfWeek()), c = l.findIndex((m) => h.isSameDay(m, s.start)), u = d[Math.max(0, c)] ?? d[0];
|
|
6371
|
+
r = new Date(u), r.setHours(s.start.getHours(), s.start.getMinutes(), s.start.getSeconds(), 0);
|
|
6518
6372
|
}
|
|
6519
|
-
const
|
|
6373
|
+
const o = (i.options.slotDuration ?? 1800) * 1e3, a = { start: r, end: new Date(r.getTime() + o) };
|
|
6520
6374
|
this.commitFocusMove(a, t.focusedResourceId, !1);
|
|
6521
6375
|
}
|
|
6522
6376
|
/**
|
|
@@ -6525,36 +6379,36 @@ class $ extends he {
|
|
|
6525
6379
|
* focused cell or selection range.
|
|
6526
6380
|
*/
|
|
6527
6381
|
commitFocusMove(e, t, s) {
|
|
6528
|
-
const
|
|
6382
|
+
const n = this.stateManager.getState(), i = n.options.slotDuration ?? 1800;
|
|
6529
6383
|
if (s) {
|
|
6530
6384
|
this.stateManager.extendSelection(e, t), this.stateManager.setFocusedCell(e, t, !1);
|
|
6531
|
-
const
|
|
6532
|
-
this.liveAnnouncer.announce(
|
|
6385
|
+
const r = this.stateManager.getState();
|
|
6386
|
+
this.liveAnnouncer.announce(Se(r, i));
|
|
6533
6387
|
} else {
|
|
6534
6388
|
this.stateManager.setFocusedCell(e, t, !0);
|
|
6535
|
-
const
|
|
6536
|
-
this.liveAnnouncer.announce(q(e,
|
|
6389
|
+
const r = this.getResourceTitle(t);
|
|
6390
|
+
this.liveAnnouncer.announce(q(e, n.options, r));
|
|
6537
6391
|
}
|
|
6538
6392
|
this.scrollAndFocusCell(e, t);
|
|
6539
6393
|
}
|
|
6540
6394
|
cellIsWithinView(e, t) {
|
|
6541
6395
|
switch (t.view) {
|
|
6542
6396
|
case "day": {
|
|
6543
|
-
const s = this.parseTimeOnDay(t.date, t.options.slotMinTime),
|
|
6544
|
-
return e.getTime() >= s.getTime() && e.getTime() <
|
|
6397
|
+
const s = this.parseTimeOnDay(t.date, t.options.slotMinTime), n = this.parseTimeOnDay(t.date, t.options.slotMaxTime);
|
|
6398
|
+
return e.getTime() >= s.getTime() && e.getTime() < n.getTime();
|
|
6545
6399
|
}
|
|
6546
6400
|
case "week":
|
|
6547
6401
|
case "timeline": {
|
|
6548
|
-
const s = h.getWeekDays(t.date, this.firstDayOfWeek()),
|
|
6549
|
-
return e.getTime() >=
|
|
6402
|
+
const s = h.getWeekDays(t.date, this.firstDayOfWeek()), n = this.parseTimeOnDay(s[0], t.options.slotMinTime), i = this.parseTimeOnDay(s[6], t.options.slotMaxTime);
|
|
6403
|
+
return e.getTime() >= n.getTime() && e.getTime() < i.getTime();
|
|
6550
6404
|
}
|
|
6551
6405
|
default:
|
|
6552
6406
|
return !1;
|
|
6553
6407
|
}
|
|
6554
6408
|
}
|
|
6555
6409
|
parseTimeOnDay(e, t) {
|
|
6556
|
-
const [s,
|
|
6557
|
-
return
|
|
6410
|
+
const [s, n, i] = (t ?? "00:00:00").split(":").map(Number), r = new Date(e);
|
|
6411
|
+
return r.setHours(0, 0, 0, 0), r.setSeconds((s ?? 0) * 3600 + (n ?? 0) * 60 + (i ?? 0)), r;
|
|
6558
6412
|
}
|
|
6559
6413
|
/**
|
|
6560
6414
|
* Walk the timeline's RENDERED row order: visible leaf resources, then the
|
|
@@ -6566,14 +6420,14 @@ class $ extends he {
|
|
|
6566
6420
|
* The old version returned `null` for BOTH of the last two, which is exactly
|
|
6567
6421
|
* why the bucket was unreachable by keyboard.
|
|
6568
6422
|
*/
|
|
6569
|
-
adjacentRow(e, t, s,
|
|
6570
|
-
const
|
|
6571
|
-
if (
|
|
6572
|
-
const
|
|
6573
|
-
if (
|
|
6574
|
-
const
|
|
6575
|
-
if (!(
|
|
6576
|
-
return
|
|
6423
|
+
adjacentRow(e, t, s, n) {
|
|
6424
|
+
const i = this.navigableRows(s, n);
|
|
6425
|
+
if (i.length === 0) return;
|
|
6426
|
+
const r = i.indexOf(e);
|
|
6427
|
+
if (r < 0) return i[0];
|
|
6428
|
+
const o = r + t;
|
|
6429
|
+
if (!(o < 0 || o >= i.length))
|
|
6430
|
+
return i[o];
|
|
6577
6431
|
}
|
|
6578
6432
|
/**
|
|
6579
6433
|
* The rows a keyboard user can land on, in the order the timeline draws them.
|
|
@@ -6586,7 +6440,7 @@ class $ extends he {
|
|
|
6586
6440
|
* group must never be offered as a destination there.
|
|
6587
6441
|
*/
|
|
6588
6442
|
navigableRows(e, t) {
|
|
6589
|
-
const s = O.flatten(e.resources, e.collapsedGroups).filter((
|
|
6443
|
+
const s = O.flatten(e.resources, e.collapsedGroups).filter((n) => n.visible && (t || ie(n.item))).map((n) => n.item.id);
|
|
6590
6444
|
return (e.eventsByResource.get(null) ?? []).length > 0 && s.push(null), s;
|
|
6591
6445
|
}
|
|
6592
6446
|
/**
|
|
@@ -6598,7 +6452,7 @@ class $ extends he {
|
|
|
6598
6452
|
getResourceTitle(e) {
|
|
6599
6453
|
if (!e) return null;
|
|
6600
6454
|
const t = this.stateManager.getState();
|
|
6601
|
-
return O.flatten(t.resources, t.collapsedGroups).find((
|
|
6455
|
+
return O.flatten(t.resources, t.collapsedGroups).find((n) => n.item.id === e)?.item.title ?? null;
|
|
6602
6456
|
}
|
|
6603
6457
|
/**
|
|
6604
6458
|
* Find the cell DOM element for a (slot, resource) pair and call .focus()
|
|
@@ -6619,8 +6473,8 @@ class $ extends he {
|
|
|
6619
6473
|
timeCellElement(e, t) {
|
|
6620
6474
|
const s = this.shadowRoot;
|
|
6621
6475
|
if (!s) return null;
|
|
6622
|
-
const
|
|
6623
|
-
return s.querySelector(
|
|
6476
|
+
const n = e.toISOString(), r = this.stateManager.getState().view === "timeline" ? t ? `.scheduler-timeline-slot[data-resource-id="${this.cssEscape(t)}"][data-start="${n}"]` : `.scheduler-timeline-slot[data-unassigned][data-start="${n}"]` : `.scheduler-time-slot[data-start="${n}"]`;
|
|
6477
|
+
return s.querySelector(r);
|
|
6624
6478
|
}
|
|
6625
6479
|
/** Re-focus whatever cell the keyboard model currently considers focused. */
|
|
6626
6480
|
/**
|
|
@@ -6667,25 +6521,25 @@ class $ extends he {
|
|
|
6667
6521
|
*/
|
|
6668
6522
|
createEventFromCellOrSelection(e) {
|
|
6669
6523
|
const t = this.stateManager.getState(), s = G(t);
|
|
6670
|
-
let
|
|
6524
|
+
let n, i, r;
|
|
6671
6525
|
if (s)
|
|
6672
|
-
|
|
6526
|
+
n = s.start, i = s.end, r = t.selectionResourceId ?? void 0;
|
|
6673
6527
|
else if (t.focusedCell)
|
|
6674
|
-
|
|
6528
|
+
n = t.focusedCell.start, i = t.focusedCell.end, r = t.focusedResourceId ?? void 0;
|
|
6675
6529
|
else
|
|
6676
6530
|
return;
|
|
6677
|
-
if (!this.can("createEvent") || !this.allowsCreateAt({ start:
|
|
6531
|
+
if (!this.can("createEvent") || !this.allowsCreateAt({ start: n, end: i }, r)) {
|
|
6678
6532
|
this.announceDenied();
|
|
6679
6533
|
return;
|
|
6680
6534
|
}
|
|
6681
6535
|
this.eventEmitter.emitEventCreate(
|
|
6682
|
-
{ start:
|
|
6536
|
+
{ start: n, end: i },
|
|
6683
6537
|
t.view,
|
|
6684
6538
|
e,
|
|
6685
|
-
|
|
6539
|
+
r
|
|
6686
6540
|
), this.liveAnnouncer.announce(this.msg("selectionCommitted", {
|
|
6687
|
-
start: h.formatTime(
|
|
6688
|
-
end: h.formatTime(
|
|
6541
|
+
start: h.formatTime(n, t.options.timeFormat, t.options.locale),
|
|
6542
|
+
end: h.formatTime(i, t.options.timeFormat, t.options.locale)
|
|
6689
6543
|
}));
|
|
6690
6544
|
}
|
|
6691
6545
|
/**
|
|
@@ -6715,15 +6569,15 @@ class $ extends he {
|
|
|
6715
6569
|
resourceId: t
|
|
6716
6570
|
}
|
|
6717
6571
|
});
|
|
6718
|
-
const s = this.minutesPerSlot(),
|
|
6572
|
+
const s = this.minutesPerSlot(), n = this.stateManager.getState().view === "timeline";
|
|
6719
6573
|
this.liveAnnouncer.announce(
|
|
6720
|
-
this.msg(
|
|
6574
|
+
this.msg(n ? "moveModeEnteredTimeline" : "moveModeEntered", {
|
|
6721
6575
|
title: e.title,
|
|
6722
6576
|
minutes: s
|
|
6723
6577
|
})
|
|
6724
6578
|
), requestAnimationFrame(() => {
|
|
6725
|
-
const
|
|
6726
|
-
this.shadowRoot?.querySelector(
|
|
6579
|
+
const i = `[data-event-id="${this.cssEscape(e.id)}"]`;
|
|
6580
|
+
this.shadowRoot?.querySelector(i)?.focus({ preventScroll: !0 });
|
|
6727
6581
|
});
|
|
6728
6582
|
}
|
|
6729
6583
|
/**
|
|
@@ -6745,19 +6599,19 @@ class $ extends he {
|
|
|
6745
6599
|
e.preventDefault(), this.commitEventMoveMode();
|
|
6746
6600
|
return;
|
|
6747
6601
|
}
|
|
6748
|
-
const t = this.stateManager.getState().view, s = t === "timeline",
|
|
6602
|
+
const t = this.stateManager.getState().view, s = t === "timeline", n = this.minutesPerSlot() * 60 * 1e3, i = e.shiftKey, r = e.altKey;
|
|
6749
6603
|
switch (e.key) {
|
|
6750
6604
|
case "ArrowUp":
|
|
6751
|
-
e.preventDefault(), s ? !
|
|
6605
|
+
e.preventDefault(), s ? !i && !r && this.nudgeKeyboardMoveResource(-1) : i && r ? this.resizeKeyboardMoveEdge("start", -n) : i ? this.resizeKeyboardMoveEdge("end", -n) : this.nudgeKeyboardMove(-n);
|
|
6752
6606
|
return;
|
|
6753
6607
|
case "ArrowDown":
|
|
6754
|
-
e.preventDefault(), s ? !
|
|
6608
|
+
e.preventDefault(), s ? !i && !r && this.nudgeKeyboardMoveResource(1) : i && r ? this.resizeKeyboardMoveEdge("start", +n) : i ? this.resizeKeyboardMoveEdge("end", +n) : this.nudgeKeyboardMove(+n);
|
|
6755
6609
|
return;
|
|
6756
6610
|
case "ArrowLeft":
|
|
6757
|
-
e.preventDefault(), s ?
|
|
6611
|
+
e.preventDefault(), s ? i && r ? this.resizeKeyboardMoveEdge("start", -n) : i ? this.resizeKeyboardMoveEdge("end", -n) : this.nudgeKeyboardMove(-n) : t === "week" && (i && r ? this.resizeKeyboardMoveEdge("start", -864e5) : i ? this.resizeKeyboardMoveEdge("end", -864e5) : this.nudgeKeyboardMove(-864e5));
|
|
6758
6612
|
return;
|
|
6759
6613
|
case "ArrowRight":
|
|
6760
|
-
e.preventDefault(), s ?
|
|
6614
|
+
e.preventDefault(), s ? i && r ? this.resizeKeyboardMoveEdge("start", +n) : i ? this.resizeKeyboardMoveEdge("end", +n) : this.nudgeKeyboardMove(+n) : t === "week" && (i && r ? this.resizeKeyboardMoveEdge("start", 864e5) : i ? this.resizeKeyboardMoveEdge("end", 864e5) : this.nudgeKeyboardMove(864e5));
|
|
6761
6615
|
return;
|
|
6762
6616
|
}
|
|
6763
6617
|
}
|
|
@@ -6769,7 +6623,7 @@ class $ extends he {
|
|
|
6769
6623
|
nudgeKeyboardMove(e) {
|
|
6770
6624
|
if (!this.keyboardMove) return;
|
|
6771
6625
|
const t = new Date(this.keyboardMove.workingStart.getTime() + e), s = new Date(this.keyboardMove.workingEnd.getTime() + e);
|
|
6772
|
-
this.keyboardMove.workingStart = t, this.keyboardMove.workingEnd = s, this.applyKeyboardMovePreview(), this.liveAnnouncer.announce(
|
|
6626
|
+
this.keyboardMove.workingStart = t, this.keyboardMove.workingEnd = s, this.applyKeyboardMovePreview(), this.liveAnnouncer.announce(ke(t, s, this.stateManager.getState().options));
|
|
6773
6627
|
}
|
|
6774
6628
|
/** Walk to the next/previous row (timeline only). Updates the preview's resourceId. */
|
|
6775
6629
|
nudgeKeyboardMoveResource(e) {
|
|
@@ -6796,18 +6650,18 @@ class $ extends he {
|
|
|
6796
6650
|
this.announceDenied();
|
|
6797
6651
|
return;
|
|
6798
6652
|
}
|
|
6799
|
-
const
|
|
6800
|
-
let
|
|
6653
|
+
const n = this.minutesPerSlot() * 60 * 1e3;
|
|
6654
|
+
let i = this.keyboardMove.workingStart, r = this.keyboardMove.workingEnd;
|
|
6801
6655
|
if (e === "end") {
|
|
6802
|
-
if (
|
|
6803
|
-
} else if (
|
|
6804
|
-
this.keyboardMove.workingStart =
|
|
6656
|
+
if (r = new Date(r.getTime() + t), r.getTime() - i.getTime() < n) return;
|
|
6657
|
+
} else if (i = new Date(i.getTime() + t), r.getTime() - i.getTime() < n) return;
|
|
6658
|
+
this.keyboardMove.workingStart = i, this.keyboardMove.workingEnd = r, this.applyKeyboardMovePreview(), this.liveAnnouncer.announce(Me(i, r, e, this.stateManager.getState().options));
|
|
6805
6659
|
}
|
|
6806
6660
|
/** Mirror keyboardMove.working* into state.previewEvent so views render the destination,
|
|
6807
6661
|
* then scroll the destination into view so the sighted-keyboard user can see it (PRD D6). */
|
|
6808
6662
|
applyKeyboardMovePreview() {
|
|
6809
6663
|
if (!this.keyboardMove) return;
|
|
6810
|
-
const { eventId: e, workingStart: t, workingEnd: s, workingResourceId:
|
|
6664
|
+
const { eventId: e, workingStart: t, workingEnd: s, workingResourceId: n } = this.keyboardMove;
|
|
6811
6665
|
this.stateManager.setState({
|
|
6812
6666
|
previewEvent: {
|
|
6813
6667
|
start: t,
|
|
@@ -6815,14 +6669,14 @@ class $ extends he {
|
|
|
6815
6669
|
// Explicit: `null` = the bucket row. A truthiness spread dropped it,
|
|
6816
6670
|
// so a nudge INTO the bucket rendered the ghost back in the event's
|
|
6817
6671
|
// original row (B26).
|
|
6818
|
-
resourceId:
|
|
6672
|
+
resourceId: n
|
|
6819
6673
|
}
|
|
6820
6674
|
}), requestAnimationFrame(() => {
|
|
6821
|
-
const
|
|
6822
|
-
if (!
|
|
6823
|
-
|
|
6824
|
-
const
|
|
6825
|
-
|
|
6675
|
+
const i = this.shadowRoot;
|
|
6676
|
+
if (!i) return;
|
|
6677
|
+
i.querySelector(`[data-event-id="${this.cssEscape(e)}"]`)?.focus({ preventScroll: !0 });
|
|
6678
|
+
const o = this.timeCellElement(t, n);
|
|
6679
|
+
o && typeof o.scrollIntoView == "function" && o.scrollIntoView({ block: "nearest", inline: "nearest" });
|
|
6826
6680
|
});
|
|
6827
6681
|
}
|
|
6828
6682
|
commitEventMoveMode() {
|
|
@@ -6863,32 +6717,32 @@ class $ extends he {
|
|
|
6863
6717
|
// Slot Resolution
|
|
6864
6718
|
// ============================================
|
|
6865
6719
|
getSlotAtPosition(e, t) {
|
|
6866
|
-
const
|
|
6867
|
-
(
|
|
6720
|
+
const n = this.shadowRoot.elementsFromPoint(e, t).find(
|
|
6721
|
+
(i) => i.matches(".scheduler-time-slot, .scheduler-timeline-slot")
|
|
6868
6722
|
);
|
|
6869
|
-
return
|
|
6723
|
+
return n ? this.getSlotFromElement(n) : null;
|
|
6870
6724
|
}
|
|
6871
6725
|
getSlotFromElement(e) {
|
|
6872
6726
|
const t = e.dataset.start, s = e.dataset.end;
|
|
6873
6727
|
if (!t || !s) return null;
|
|
6874
|
-
const
|
|
6728
|
+
const n = e.dataset.resourceId ?? (e.dataset.unassigned ? null : void 0);
|
|
6875
6729
|
return {
|
|
6876
6730
|
start: new Date(t),
|
|
6877
6731
|
end: new Date(s),
|
|
6878
|
-
...
|
|
6732
|
+
...n !== void 0 ? { resourceId: n } : {}
|
|
6879
6733
|
};
|
|
6880
6734
|
}
|
|
6881
6735
|
}
|
|
6882
6736
|
typeof customElements < "u" && !customElements.get("mp-scheduler") && customElements.define("mp-scheduler", $);
|
|
6883
6737
|
export {
|
|
6884
6738
|
K as BaseView,
|
|
6885
|
-
|
|
6739
|
+
Ae as DayView,
|
|
6886
6740
|
N as MonthView,
|
|
6887
6741
|
$ as MpScheduler,
|
|
6888
|
-
|
|
6742
|
+
De as SchedulerStateManager,
|
|
6889
6743
|
I as TimelineView,
|
|
6890
|
-
|
|
6744
|
+
Ie as WeekView,
|
|
6891
6745
|
U as YearView,
|
|
6892
|
-
|
|
6893
|
-
|
|
6746
|
+
xe as createInitialState,
|
|
6747
|
+
Re as schedulerStyles
|
|
6894
6748
|
};
|