@mintplayer/web-components 2.7.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/calendar/index.mjs +1 -1
- package/calendar/src/mp-calendar.element.d.ts +19 -1
- 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/{id-BstjfRrz.mjs → id-DNZVAnGC.mjs} +267 -162
- 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-calendar.element-u6uS31_j.mjs → mp-calendar.element-CJ8-t-Zn.mjs} +71 -39
- package/chunks/{mp-datetime-picker.element-MPTRHwyc.mjs → mp-datetime-picker.element-D1CiLbHm.mjs} +1 -1
- 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/datepicker/index.mjs +1 -1
- package/datetime-picker/index.mjs +1 -1
- 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 +1507 -1086
- package/scheduler/src/components/mp-scheduler.d.ts +186 -1
- package/scheduler/src/input/input-handler.d.ts +22 -0
- package/scheduler/src/views/base-view.d.ts +30 -1
- package/scheduler/src/views/index.d.ts +1 -1
- package/scheduler/src/views/timeline-view.d.ts +39 -15
- package/scheduler/src/views/year-view.d.ts +7 -0
- package/scheduler-core/index.mjs +42 -40
- package/scheduler-core/src/models/messages.d.ts +29 -0
- package/scheduler-core/src/models/options.d.ts +24 -7
- package/scheduler-core/src/services/date.service.d.ts +64 -10
- package/scheduler-core/src/utils/color.d.ts +19 -0
- 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
|
|
2
|
-
import { L as
|
|
3
|
-
import { e as
|
|
4
|
-
import { D as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { unsafeCSS as ce, LitElement as he, html as S, nothing as k } from "lit";
|
|
2
|
+
import { L as ue } from "../chunks/live-announcer-Bi0orG4n.mjs";
|
|
3
|
+
import { e as pe } from "../chunks/error-text-B45eDAt1.mjs";
|
|
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";
|
|
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-datetime-picker.element-
|
|
10
|
-
function
|
|
9
|
+
import "../chunks/mp-select-lHP00OBH.mjs";
|
|
10
|
+
import "../chunks/mp-datetime-picker.element-D1CiLbHm.mjs";
|
|
11
|
+
function oe(p, e = []) {
|
|
11
12
|
for (const t of p) {
|
|
12
|
-
if (
|
|
13
|
-
|
|
13
|
+
if (H(t)) {
|
|
14
|
+
oe(t.children, e);
|
|
14
15
|
continue;
|
|
15
16
|
}
|
|
16
17
|
for (const s of t.events ?? [])
|
|
@@ -18,40 +19,40 @@ function ee(p, e = []) {
|
|
|
18
19
|
}
|
|
19
20
|
return e;
|
|
20
21
|
}
|
|
21
|
-
function
|
|
22
|
-
const t =
|
|
22
|
+
function te(p, e) {
|
|
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
|
-
|
|
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
|
-
|
|
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 ue(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 pe {
|
|
|
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
|
|
@@ -164,7 +165,7 @@ class pe {
|
|
|
164
165
|
*/
|
|
165
166
|
setEvents(e) {
|
|
166
167
|
this.flatEventsInput = e, this.setState((t) => ({
|
|
167
|
-
events:
|
|
168
|
+
events: te(e, t.resources)
|
|
168
169
|
}));
|
|
169
170
|
}
|
|
170
171
|
/**
|
|
@@ -210,8 +211,8 @@ class pe {
|
|
|
210
211
|
setResources(e) {
|
|
211
212
|
this.setState((t) => ({
|
|
212
213
|
resources: e,
|
|
213
|
-
events:
|
|
214
|
-
collapsedGroups:
|
|
214
|
+
events: te(this.flatEventsInput, e),
|
|
215
|
+
collapsedGroups: we(
|
|
215
216
|
e,
|
|
216
217
|
t.collapsedGroups,
|
|
217
218
|
this.seededGroupIds
|
|
@@ -378,11 +379,11 @@ class pe {
|
|
|
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,67 +405,87 @@ class pe {
|
|
|
404
405
|
this.setState({ focusedDate: e });
|
|
405
406
|
}
|
|
406
407
|
}
|
|
407
|
-
function
|
|
408
|
-
|
|
409
|
-
|
|
408
|
+
function le(p) {
|
|
409
|
+
return `${p.getFullYear()}-${String(p.getMonth() + 1).padStart(2, "0")}-${String(
|
|
410
|
+
p.getDate()
|
|
411
|
+
).padStart(2, "0")}`;
|
|
410
412
|
}
|
|
411
|
-
function W(p) {
|
|
413
|
+
function W(p, e, t) {
|
|
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(", ");
|
|
416
|
+
}
|
|
417
|
+
function G(p) {
|
|
412
418
|
const { selectionAnchor: e, selectionExtent: t, selectionResourceId: s } = p;
|
|
413
419
|
if (!e || !t) return null;
|
|
414
|
-
const
|
|
420
|
+
const n = Math.min(e.start.getTime(), t.start.getTime()), i = Math.max(e.end.getTime(), t.end.getTime());
|
|
415
421
|
return {
|
|
416
|
-
start: new Date(
|
|
417
|
-
end: new Date(
|
|
422
|
+
start: new Date(n),
|
|
423
|
+
end: new Date(i),
|
|
418
424
|
resourceId: s
|
|
419
425
|
};
|
|
420
426
|
}
|
|
421
|
-
function
|
|
422
|
-
const s =
|
|
427
|
+
function Z(p, e, t = null) {
|
|
428
|
+
const s = G(e);
|
|
423
429
|
return !s || s.resourceId && t && s.resourceId !== t ? !1 : p.start.getTime() < s.end.getTime() && p.end.getTime() > s.start.getTime();
|
|
424
430
|
}
|
|
425
|
-
function
|
|
431
|
+
function q(p, e, t = null) {
|
|
426
432
|
const s = p.start.toLocaleDateString(e.locale, {
|
|
427
433
|
weekday: "long",
|
|
428
434
|
month: "short",
|
|
429
435
|
day: "numeric"
|
|
430
|
-
}),
|
|
431
|
-
return t &&
|
|
436
|
+
}), n = h.formatTime(p.start, e.timeFormat, e.locale), i = [`${s}, ${n}`];
|
|
437
|
+
return t && i.push(t), i.join(", ");
|
|
432
438
|
}
|
|
433
|
-
function
|
|
434
|
-
const t =
|
|
439
|
+
function Se(p, e) {
|
|
440
|
+
const t = G(p);
|
|
435
441
|
if (!t) return "";
|
|
436
|
-
const { options: s } = p,
|
|
437
|
-
return
|
|
438
|
-
start:
|
|
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);
|
|
443
|
+
return E(d.selection, {
|
|
444
|
+
start: r,
|
|
439
445
|
end: o,
|
|
440
446
|
count: l,
|
|
441
447
|
slots: l === 1 ? d.slotSingular : d.slotPlural
|
|
442
448
|
});
|
|
443
449
|
}
|
|
444
|
-
function
|
|
445
|
-
const s = t.timeFormat
|
|
446
|
-
return
|
|
447
|
-
start: h.formatTime(p, s),
|
|
448
|
-
end: h.formatTime(e, s),
|
|
449
|
-
day:
|
|
450
|
+
function ke(p, e, t) {
|
|
451
|
+
const s = t.timeFormat, n = p.toLocaleDateString(t.locale, { weekday: "short", month: "short", day: "numeric" });
|
|
452
|
+
return E(w(t.messages).movedTo, {
|
|
453
|
+
start: h.formatTime(p, s, t.locale),
|
|
454
|
+
end: h.formatTime(e, s, t.locale),
|
|
455
|
+
day: n
|
|
450
456
|
});
|
|
451
457
|
}
|
|
452
|
-
function
|
|
453
|
-
const
|
|
454
|
-
return
|
|
455
|
-
edge: t === "start" ?
|
|
456
|
-
start: h.formatTime(p,
|
|
457
|
-
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)
|
|
458
464
|
});
|
|
459
465
|
}
|
|
460
|
-
const
|
|
461
|
-
function
|
|
462
|
-
const [t = 0, s = 0,
|
|
463
|
-
return
|
|
466
|
+
const Ce = 40, Te = 20;
|
|
467
|
+
function se(p, e) {
|
|
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;
|
|
464
470
|
}
|
|
465
|
-
class
|
|
471
|
+
class K {
|
|
466
472
|
constructor(e, t) {
|
|
467
|
-
this.container = e, this.state = t;
|
|
473
|
+
this.pendingScroll = null, this.container = e, this.state = t;
|
|
474
|
+
}
|
|
475
|
+
/**
|
|
476
|
+
* The week's first day for the current options — the consumer's choice if they
|
|
477
|
+
* made one, otherwise the locale's own convention (Sunday for en-US and ja-JP,
|
|
478
|
+
* Monday across most of Europe).
|
|
479
|
+
*
|
|
480
|
+
* Resolved at the point of use rather than written back into `options`:
|
|
481
|
+
* `setOptions` merges cumulatively, so a stored derivation would freeze at the
|
|
482
|
+
* locale that produced it and quietly ignore a later locale change.
|
|
483
|
+
*/
|
|
484
|
+
get firstDayOfWeek() {
|
|
485
|
+
return h.resolveFirstDayOfWeek(
|
|
486
|
+
this.state.options.firstDayOfWeek,
|
|
487
|
+
this.state.options.locale
|
|
488
|
+
);
|
|
468
489
|
}
|
|
469
490
|
/**
|
|
470
491
|
* Update the now indicator position (called every minute)
|
|
@@ -506,20 +527,20 @@ class B {
|
|
|
506
527
|
* `Resource.color`/`eventColor` sat in the model unread.
|
|
507
528
|
*/
|
|
508
529
|
applyEventColors(e, t) {
|
|
509
|
-
const s =
|
|
530
|
+
const s = X(
|
|
510
531
|
t,
|
|
511
532
|
this.state.resourceById,
|
|
512
533
|
this.state.options.defaultEventColor
|
|
513
534
|
);
|
|
514
|
-
e.style.backgroundColor = s, e.style.color = t.textColor ??
|
|
535
|
+
e.style.backgroundColor = s, e.style.color = t.textColor ?? me(s);
|
|
515
536
|
}
|
|
516
537
|
partGeometry(e, t, s) {
|
|
517
|
-
const
|
|
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());
|
|
518
539
|
if (a <= o) return null;
|
|
519
|
-
const l =
|
|
540
|
+
const l = Ce / (n * 1e3);
|
|
520
541
|
return {
|
|
521
|
-
top: (o -
|
|
522
|
-
height: Math.max((a - o) * l,
|
|
542
|
+
top: (o - i.getTime()) * l,
|
|
543
|
+
height: Math.max((a - o) * l, Te)
|
|
523
544
|
};
|
|
524
545
|
}
|
|
525
546
|
createElement(e, ...t) {
|
|
@@ -530,22 +551,26 @@ class B {
|
|
|
530
551
|
* Helper to set data attributes
|
|
531
552
|
*/
|
|
532
553
|
setData(e, t) {
|
|
533
|
-
for (const [s,
|
|
534
|
-
e.dataset[s] = String(
|
|
554
|
+
for (const [s, n] of Object.entries(t))
|
|
555
|
+
e.dataset[s] = String(n);
|
|
535
556
|
}
|
|
536
|
-
/**
|
|
537
|
-
* Helper to clear container
|
|
538
|
-
*/
|
|
539
557
|
clearContainer() {
|
|
540
|
-
this.container.
|
|
541
|
-
|
|
558
|
+
const e = !this.pendingScroll && (this.container.scrollLeft || this.container.scrollTop);
|
|
559
|
+
if (e && (this.pendingScroll = { left: this.container.scrollLeft, top: this.container.scrollTop }), this.container.innerHTML = "", e) {
|
|
560
|
+
const t = { left: this.container.scrollLeft, top: this.container.scrollTop };
|
|
561
|
+
queueMicrotask(() => {
|
|
562
|
+
const s = this.pendingScroll;
|
|
563
|
+
this.pendingScroll = null, s && (this.container.scrollLeft !== t.left || this.container.scrollTop !== t.top || (this.container.scrollLeft = s.left, this.container.scrollTop = s.top));
|
|
564
|
+
});
|
|
565
|
+
}
|
|
566
|
+
for (const t of [
|
|
542
567
|
"role",
|
|
543
568
|
"aria-label",
|
|
544
569
|
"aria-describedby",
|
|
545
570
|
"aria-multiselectable",
|
|
546
571
|
"aria-rowcount"
|
|
547
572
|
])
|
|
548
|
-
this.container.removeAttribute(
|
|
573
|
+
this.container.removeAttribute(t);
|
|
549
574
|
this.container.classList.remove(
|
|
550
575
|
"scheduler-week-view",
|
|
551
576
|
"scheduler-day-view",
|
|
@@ -563,15 +588,15 @@ class B {
|
|
|
563
588
|
* Position classes are per-view: ['top','bottom'] for time grids,
|
|
564
589
|
* ['left','right'] for the timeline.
|
|
565
590
|
*/
|
|
566
|
-
appendResizeHandles(e, t, [s,
|
|
567
|
-
const
|
|
568
|
-
t.isStart &&
|
|
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"));
|
|
569
594
|
}
|
|
570
595
|
createResizeHandle(e, t) {
|
|
571
596
|
const s = this.createElement("div", "resize-handle", e);
|
|
572
597
|
this.setData(s, { handle: t });
|
|
573
|
-
const
|
|
574
|
-
return
|
|
598
|
+
const n = this.createElement("span", "resize-glyph");
|
|
599
|
+
return n.setAttribute("aria-hidden", "true"), s.appendChild(n), s;
|
|
575
600
|
}
|
|
576
601
|
/**
|
|
577
602
|
* Retrofit the ARIA grid chain onto a rendered view (wc-aria PRD step 5.7):
|
|
@@ -587,30 +612,39 @@ class B {
|
|
|
587
612
|
*/
|
|
588
613
|
applyGridRoles(e) {
|
|
589
614
|
const t = this.container;
|
|
590
|
-
t.getAttribute("role") !== "grid" && t.setAttribute("role", "grid")
|
|
591
|
-
const
|
|
592
|
-
|
|
615
|
+
t.getAttribute("role") !== "grid" && t.setAttribute("role", "grid");
|
|
616
|
+
const n = this.container.getRootNode().host?.getAttribute(
|
|
617
|
+
"aria-label"
|
|
618
|
+
) || e.label;
|
|
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);
|
|
593
622
|
});
|
|
594
|
-
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");
|
|
595
624
|
}
|
|
596
625
|
/** aria-current="date" on every element the views styled `.today`. */
|
|
597
626
|
markToday() {
|
|
598
627
|
this.container.querySelectorAll(".today").forEach((e) => e.setAttribute("aria-current", "date"));
|
|
599
628
|
}
|
|
600
629
|
}
|
|
601
|
-
class
|
|
630
|
+
class U extends K {
|
|
602
631
|
constructor() {
|
|
603
632
|
super(...arguments), this.monthCards = /* @__PURE__ */ new Map();
|
|
604
633
|
}
|
|
605
634
|
render() {
|
|
606
635
|
this.clearContainer(), this.container.classList.add("scheduler-year-view");
|
|
607
|
-
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");
|
|
608
637
|
this.monthCards.clear();
|
|
609
|
-
for (const
|
|
610
|
-
const
|
|
611
|
-
|
|
638
|
+
for (const i of s) {
|
|
639
|
+
const r = this.createMonthCard(i);
|
|
640
|
+
n.appendChild(r);
|
|
612
641
|
}
|
|
613
|
-
this.container.appendChild(
|
|
642
|
+
this.container.appendChild(n), this.applyGridRoles({
|
|
643
|
+
label: E(w(this.state.options.messages).yearGridLabel, {
|
|
644
|
+
date: String(this.state.date.getFullYear())
|
|
645
|
+
}),
|
|
646
|
+
rows: ".scheduler-year-grid"
|
|
647
|
+
}), this.markToday(), this.updateMonthCardFocus();
|
|
614
648
|
}
|
|
615
649
|
/**
|
|
616
650
|
* Build a `YYYY-MM` key from a Date, which is the unit of focus on year
|
|
@@ -623,19 +657,19 @@ class N extends B {
|
|
|
623
657
|
return `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}`;
|
|
624
658
|
}
|
|
625
659
|
createMonthCard(e) {
|
|
626
|
-
const { events: t, options: s } = this.state,
|
|
627
|
-
|
|
628
|
-
const
|
|
629
|
-
|
|
630
|
-
const o = this.createElement("div", "scheduler-mini-month"), a = h.getMonthWeeks(e,
|
|
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];
|
|
631
665
|
for (const f of l) {
|
|
632
666
|
const v = this.createElement("div", "scheduler-mini-day", "header");
|
|
633
667
|
v.textContent = h.getDayName(f, s.locale, "narrow"), v.style.fontWeight = "600", v.style.color = "#666", o.appendChild(v);
|
|
634
668
|
}
|
|
635
|
-
const d = h.getMonthStart(e), c = h.getMonthEnd(e), u = C.filterByRange(t, d, c), m =
|
|
636
|
-
|
|
669
|
+
const d = h.getMonthStart(e), c = h.getMonthEnd(e), u = C.filterByRange(t, d, c), m = w(s.messages);
|
|
670
|
+
n.setAttribute(
|
|
637
671
|
"aria-label",
|
|
638
|
-
|
|
672
|
+
E(m.yearMonthCardLabel, {
|
|
639
673
|
month: `${h.getMonthName(e, s.locale)} ${e.getFullYear()}`,
|
|
640
674
|
count: u.length,
|
|
641
675
|
events: u.length === 1 ? m.eventSingular : m.eventPlural
|
|
@@ -651,10 +685,10 @@ class N extends B {
|
|
|
651
685
|
for (const v of f) {
|
|
652
686
|
const y = this.createElement("div", "scheduler-mini-day");
|
|
653
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");
|
|
654
|
-
const
|
|
655
|
-
g.has(
|
|
688
|
+
const b = v.toISOString().split("T")[0];
|
|
689
|
+
g.has(b) && y.classList.add("has-events"), o.appendChild(y);
|
|
656
690
|
}
|
|
657
|
-
return
|
|
691
|
+
return n.appendChild(o), n;
|
|
658
692
|
}
|
|
659
693
|
/**
|
|
660
694
|
* Apply roving tabindex based on `state.focusedDate`'s month. Year-view's
|
|
@@ -664,47 +698,62 @@ class N extends B {
|
|
|
664
698
|
updateMonthCardFocus() {
|
|
665
699
|
const e = this.state.focusedDate;
|
|
666
700
|
let t = !1;
|
|
667
|
-
const s = e ?
|
|
668
|
-
for (const [
|
|
669
|
-
const
|
|
670
|
-
|
|
701
|
+
const s = e ? U.monthKey(e) : null;
|
|
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);
|
|
671
705
|
}
|
|
672
706
|
t || this.monthCards.values().next().value?.setAttribute("tabindex", "0");
|
|
673
707
|
}
|
|
674
708
|
update(e) {
|
|
675
|
-
const t = this.state.date.getFullYear() !== e.date.getFullYear();
|
|
676
|
-
if (this.state = e, t) {
|
|
709
|
+
const t = this.state.date.getFullYear() !== e.date.getFullYear(), s = this.optionsRequireRerender(this.state.options, e.options);
|
|
710
|
+
if (this.state = e, t || s) {
|
|
677
711
|
this.render();
|
|
678
712
|
return;
|
|
679
713
|
}
|
|
680
714
|
this.updateMonthCardFocus();
|
|
681
715
|
}
|
|
716
|
+
/**
|
|
717
|
+
* The check the other three views already had, and this one did not: without it
|
|
718
|
+
* a runtime `locale` or `firstDayOfWeek` change left all twelve mini-calendars
|
|
719
|
+
* frozen at the previous locale, so a language switch appeared to do nothing
|
|
720
|
+
* while the year view was showing.
|
|
721
|
+
*/
|
|
722
|
+
optionsRequireRerender(e, t) {
|
|
723
|
+
return e.firstDayOfWeek !== t.firstDayOfWeek || e.locale !== t.locale;
|
|
724
|
+
}
|
|
682
725
|
destroy() {
|
|
683
726
|
this.monthCards.clear(), this.clearContainer();
|
|
684
727
|
}
|
|
685
728
|
}
|
|
686
|
-
class
|
|
729
|
+
class N extends K {
|
|
687
730
|
constructor() {
|
|
688
731
|
super(...arguments), this.dayCells = /* @__PURE__ */ new Map();
|
|
689
732
|
}
|
|
690
733
|
render() {
|
|
691
734
|
this.clearContainer(), this.container.classList.add("scheduler-month-view");
|
|
692
|
-
const { date: e, options: t } = this.state, s = h.getMonthWeeks(e,
|
|
693
|
-
for (const o of
|
|
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) {
|
|
694
737
|
const a = this.createElement("div", "scheduler-day-header");
|
|
695
|
-
a.textContent = h.getDayName(o, t.locale),
|
|
738
|
+
a.textContent = h.getDayName(o, t.locale), n.appendChild(a);
|
|
696
739
|
}
|
|
697
|
-
this.container.appendChild(
|
|
698
|
-
const
|
|
740
|
+
this.container.appendChild(n);
|
|
741
|
+
const r = this.createElement("div", "scheduler-month-grid");
|
|
699
742
|
for (const o of s) {
|
|
700
743
|
const a = this.createElement("div", "scheduler-month-week");
|
|
701
744
|
for (const l of o) {
|
|
702
745
|
const d = this.createDayCell(l);
|
|
703
746
|
a.appendChild(d);
|
|
704
747
|
}
|
|
705
|
-
|
|
748
|
+
r.appendChild(a);
|
|
706
749
|
}
|
|
707
|
-
this.container.appendChild(
|
|
750
|
+
this.container.appendChild(r), this.renderEvents(), this.updateDayCellFocus(), this.applyGridRoles({
|
|
751
|
+
label: E(w(this.state.options.messages).monthGridLabel, {
|
|
752
|
+
date: h.formatDate(this.state.date, this.state.options.locale, {
|
|
753
|
+
month: "long",
|
|
754
|
+
year: "numeric"
|
|
755
|
+
})
|
|
756
|
+
}),
|
|
708
757
|
columnHeaderRow: ":scope > .scheduler-day-headers",
|
|
709
758
|
columnHeaders: ".scheduler-day-headers > .scheduler-day-header",
|
|
710
759
|
presentation: [".scheduler-month-grid"],
|
|
@@ -718,17 +767,17 @@ class z extends B {
|
|
|
718
767
|
* cell IDs would not match the visible day numbers.
|
|
719
768
|
*/
|
|
720
769
|
static dayKey(e) {
|
|
721
|
-
return
|
|
770
|
+
return le(e);
|
|
722
771
|
}
|
|
723
772
|
createDayCell(e) {
|
|
724
773
|
const { date: t } = this.state, s = this.createElement("div", "scheduler-month-day");
|
|
725
774
|
h.isSameMonth(e, t) || s.classList.add("other-month"), h.isToday(e) && s.classList.add("today");
|
|
726
|
-
const
|
|
727
|
-
s.setAttribute("role", "gridcell"), s.setAttribute("tabindex", "-1"), s.id = `scheduler-cell-m-${
|
|
728
|
-
const
|
|
729
|
-
|
|
730
|
-
const
|
|
731
|
-
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;
|
|
732
781
|
}
|
|
733
782
|
/**
|
|
734
783
|
* Apply roving tabindex based on `state.focusedDate`. The grid must always
|
|
@@ -738,23 +787,23 @@ class z extends B {
|
|
|
738
787
|
updateDayCellFocus() {
|
|
739
788
|
const e = this.state.focusedDate;
|
|
740
789
|
let t = !1;
|
|
741
|
-
const s = e ?
|
|
742
|
-
for (const [
|
|
743
|
-
const
|
|
744
|
-
|
|
790
|
+
const s = e ? N.dayKey(e) : null;
|
|
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);
|
|
745
794
|
}
|
|
746
|
-
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");
|
|
747
796
|
}
|
|
748
797
|
renderEvents() {
|
|
749
798
|
const { date: e, events: t, options: s } = this.state;
|
|
750
799
|
h.getMonthStart(e), h.getMonthEnd(e);
|
|
751
|
-
const
|
|
752
|
-
|
|
753
|
-
const o = C.filterByRange(t,
|
|
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();
|
|
754
803
|
for (const d of o) {
|
|
755
804
|
const c = new Date(d.start), u = new Date(d.end), m = new Date(c);
|
|
756
805
|
for (m.setHours(0, 0, 0, 0); m <= u; ) {
|
|
757
|
-
const g =
|
|
806
|
+
const g = N.dayKey(m);
|
|
758
807
|
a.has(g) || a.set(g, []), a.get(g).push(d), m.setDate(m.getDate() + 1);
|
|
759
808
|
}
|
|
760
809
|
}
|
|
@@ -768,12 +817,15 @@ class z extends B {
|
|
|
768
817
|
const g = c.slice(0, l), f = c.length - g.length;
|
|
769
818
|
for (const v of g) {
|
|
770
819
|
const y = this.createElement("div", "scheduler-month-event");
|
|
771
|
-
y.textContent = v.title, this.applyEventColors(y, v), y.setAttribute("role", "button"), y.setAttribute("tabindex", "0"), y.setAttribute("aria-label",
|
|
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(
|
|
821
|
+
"aria-pressed",
|
|
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);
|
|
772
824
|
}
|
|
773
825
|
if (f > 0) {
|
|
774
826
|
const v = this.createElement("div", "scheduler-more-link");
|
|
775
|
-
v.textContent =
|
|
776
|
-
|
|
827
|
+
v.textContent = E(
|
|
828
|
+
w(this.state.options.messages).moreEvents,
|
|
777
829
|
{ count: f }
|
|
778
830
|
), v.setAttribute("role", "button"), v.setAttribute("tabindex", "0"), this.setData(v, { date: d }), m.appendChild(v);
|
|
779
831
|
}
|
|
@@ -794,32 +846,37 @@ class z extends B {
|
|
|
794
846
|
this.dayCells.clear(), this.clearContainer();
|
|
795
847
|
}
|
|
796
848
|
}
|
|
797
|
-
function
|
|
849
|
+
function ne(p, e) {
|
|
798
850
|
const t = new Date(p.start);
|
|
799
851
|
t.setHours(0, 0, 0, 0);
|
|
800
|
-
const s = p.start.getTime() - t.getTime(),
|
|
801
|
-
|
|
802
|
-
const
|
|
803
|
-
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) };
|
|
804
856
|
}
|
|
805
|
-
class
|
|
857
|
+
class Ie extends K {
|
|
806
858
|
constructor() {
|
|
807
859
|
super(...arguments), this.dayColumns = [], this.eventElements = /* @__PURE__ */ new Map(), this.slotElements = /* @__PURE__ */ new Map();
|
|
808
860
|
}
|
|
809
861
|
render() {
|
|
810
862
|
this.clearContainer(), this.container.classList.add("scheduler-week-view");
|
|
811
|
-
const { date: e, options: t } = this.state, s = h.getWeekDays(e,
|
|
812
|
-
|
|
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);
|
|
813
865
|
for (const d of s) {
|
|
814
866
|
const c = this.createElement("div", "scheduler-day-header");
|
|
815
867
|
h.isToday(d) && c.classList.add("today");
|
|
816
868
|
const u = this.createElement("div", "day-name");
|
|
817
869
|
u.textContent = h.getDayName(d, t.locale);
|
|
818
870
|
const m = this.createElement("div", "day-number");
|
|
819
|
-
m.textContent = String(d.getDate()),
|
|
871
|
+
m.textContent = String(d.getDate()), m.setAttribute("role", "button"), m.setAttribute("tabindex", "0"), m.setAttribute(
|
|
872
|
+
"aria-label",
|
|
873
|
+
E(w(t.messages).openDayView, {
|
|
874
|
+
date: h.formatDateWithWeekday(d, t.locale)
|
|
875
|
+
})
|
|
876
|
+
), this.setData(m, { date: le(d) }), c.appendChild(u), c.appendChild(m), n.appendChild(c);
|
|
820
877
|
}
|
|
821
|
-
this.container.appendChild(
|
|
822
|
-
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(
|
|
823
880
|
s[0],
|
|
824
881
|
t.slotDuration,
|
|
825
882
|
t.slotMinTime,
|
|
@@ -827,29 +884,41 @@ class we extends B {
|
|
|
827
884
|
);
|
|
828
885
|
for (const d of a) {
|
|
829
886
|
const c = this.createElement("div", "scheduler-time-slot-label");
|
|
830
|
-
c.textContent = h.formatTime(d.start, t.timeFormat), o.appendChild(c);
|
|
887
|
+
c.textContent = h.formatTime(d.start, t.timeFormat, t.locale), o.appendChild(c);
|
|
831
888
|
}
|
|
832
|
-
|
|
889
|
+
r.appendChild(o);
|
|
833
890
|
const l = this.createElement("div", "scheduler-days-container");
|
|
834
891
|
this.dayColumns = [];
|
|
835
892
|
for (let d = 0; d < s.length; d++) {
|
|
836
893
|
const c = s[d], u = this.createElement("div", "scheduler-day-column");
|
|
837
|
-
this.setData(u, { dayIndex: d })
|
|
894
|
+
this.setData(u, { dayIndex: d }), u.setAttribute(
|
|
895
|
+
"aria-label",
|
|
896
|
+
h.formatDateWithWeekday(c, t.locale)
|
|
897
|
+
), u.setAttribute("aria-rowindex", String(d + 2));
|
|
838
898
|
for (let g = 0; g < a.length; g++) {
|
|
839
|
-
const f = a[g], { start: v, end: y } =
|
|
840
|
-
|
|
899
|
+
const f = a[g], { start: v, end: y } = ne(f, c), b = this.createElement("div", "scheduler-time-slot");
|
|
900
|
+
b.setAttribute("role", "gridcell"), b.setAttribute("tabindex", "-1"), b.setAttribute("aria-selected", "false"), b.setAttribute(
|
|
901
|
+
"aria-label",
|
|
902
|
+
q({ start: v }, t)
|
|
903
|
+
), b.setAttribute("aria-colindex", String(g + 2)), b.id = `scheduler-cell-w-${d}-${g}`, this.setData(b, {
|
|
841
904
|
dayIndex: d,
|
|
842
905
|
slotIndex: g,
|
|
843
906
|
start: v.toISOString(),
|
|
844
907
|
end: y.toISOString()
|
|
845
908
|
});
|
|
846
|
-
const
|
|
847
|
-
this.slotElements.set(
|
|
909
|
+
const M = `${d}-${g}`;
|
|
910
|
+
this.slotElements.set(M, b), u.appendChild(b);
|
|
848
911
|
}
|
|
849
912
|
const m = this.createElement("div", "scheduler-events-container");
|
|
850
913
|
u.appendChild(m), this.dayColumns.push(u), l.appendChild(u);
|
|
851
914
|
}
|
|
852
|
-
|
|
915
|
+
r.appendChild(l), this.container.appendChild(r), this.renderEvents(), this.updateCellFocusAndSelection(), this.renderNowIndicator(s, a), this.applyGridRoles({
|
|
916
|
+
label: E(w(this.state.options.messages).weekGridLabel, {
|
|
917
|
+
date: h.formatDateWithWeekday(
|
|
918
|
+
h.getWeekStart(this.state.date, this.firstDayOfWeek),
|
|
919
|
+
this.state.options.locale
|
|
920
|
+
)
|
|
921
|
+
}),
|
|
853
922
|
multiselectable: !0,
|
|
854
923
|
columnHeaderRow: ":scope > .scheduler-day-headers",
|
|
855
924
|
columnHeaders: ".scheduler-day-headers > .scheduler-day-header",
|
|
@@ -869,12 +938,12 @@ class we extends B {
|
|
|
869
938
|
}), this.markToday();
|
|
870
939
|
}
|
|
871
940
|
update(e) {
|
|
872
|
-
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;
|
|
873
942
|
if (this.state = e, t || s) {
|
|
874
943
|
this.render();
|
|
875
944
|
return;
|
|
876
945
|
}
|
|
877
|
-
this.updateGreyedSlots(),
|
|
946
|
+
this.updateGreyedSlots(), n ? this.renderEvents() : this.renderEvents(), this.updateCellFocusAndSelection(), this.renderPreviewEvent();
|
|
878
947
|
}
|
|
879
948
|
/**
|
|
880
949
|
* Apply roving tabindex and aria-selected to each cached slot element. Also
|
|
@@ -886,14 +955,14 @@ class we extends B {
|
|
|
886
955
|
updateCellFocusAndSelection() {
|
|
887
956
|
const e = this.state.focusedCell;
|
|
888
957
|
let t = !1, s = null;
|
|
889
|
-
for (const [,
|
|
890
|
-
s || (s =
|
|
891
|
-
const
|
|
892
|
-
if (!
|
|
893
|
-
const o = { start: new Date(
|
|
894
|
-
|
|
895
|
-
const l =
|
|
896
|
-
|
|
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);
|
|
897
966
|
}
|
|
898
967
|
!t && s && s.setAttribute("tabindex", "0");
|
|
899
968
|
}
|
|
@@ -901,46 +970,51 @@ class we extends B {
|
|
|
901
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;
|
|
902
971
|
}
|
|
903
972
|
renderEvents() {
|
|
904
|
-
const { date: e, events: t, options: s } = this.state,
|
|
905
|
-
|
|
906
|
-
const o = C.filterByRange(t,
|
|
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 = [];
|
|
907
976
|
for (const c of o) {
|
|
908
977
|
const { parts: u } = C.splitInParts(c);
|
|
909
978
|
a.push(...u);
|
|
910
979
|
}
|
|
911
|
-
const l = C.filterPartsByRange(a,
|
|
980
|
+
const l = C.filterPartsByRange(a, i, r), d = C.getTimelinedParts(l);
|
|
912
981
|
this.eventElements.forEach((c) => c.remove()), this.eventElements.clear();
|
|
913
982
|
for (const { part: c, trackIndex: u, totalTracks: m, colspan: g } of d) {
|
|
914
983
|
if (!c.event) continue;
|
|
915
|
-
const f =
|
|
984
|
+
const f = n.findIndex((M) => h.isSameDay(M, c.start));
|
|
916
985
|
if (f === -1) continue;
|
|
917
986
|
const y = this.dayColumns[f].querySelector(".scheduler-events-container");
|
|
918
987
|
if (!y) continue;
|
|
919
|
-
const
|
|
988
|
+
const b = this.createEventElement(
|
|
920
989
|
c,
|
|
921
990
|
u,
|
|
922
991
|
m,
|
|
923
992
|
g,
|
|
924
993
|
s.slotDuration ?? 1800
|
|
925
994
|
);
|
|
926
|
-
y.appendChild(
|
|
995
|
+
y.appendChild(b), this.eventElements.set(c.id, b);
|
|
927
996
|
}
|
|
928
997
|
}
|
|
929
|
-
createEventElement(e, t, s,
|
|
930
|
-
const
|
|
931
|
-
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(
|
|
932
1001
|
"aria-label",
|
|
933
|
-
|
|
1002
|
+
W(r, null, this.state.options)
|
|
934
1003
|
), o.setAttribute("aria-pressed", a ? "true" : "false"), o.setAttribute("aria-describedby", "scheduler-kbd-event"), a && o.classList.add("selected");
|
|
935
1004
|
const l = this.partGeometry(e.start, e.end, {
|
|
936
1005
|
...this.state.options,
|
|
937
|
-
slotDuration:
|
|
938
|
-
}), { top: d, height: c } = l ?? { top: 0, height: 0 }, u = t / s * 100, m =
|
|
939
|
-
o.style.top = `${d}px`, o.style.height = `${c}px`, o.style.left = `${u}%`, o.style.width = `calc(${m}% - 2px)`, this.applyEventColors(o,
|
|
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 });
|
|
940
1009
|
const g = this.createElement("div", "event-content"), f = this.createElement("div", "event-title");
|
|
941
|
-
f.textContent =
|
|
1010
|
+
f.textContent = r.title, g.appendChild(f);
|
|
942
1011
|
const v = this.createElement("div", "event-time");
|
|
943
|
-
return v.textContent =
|
|
1012
|
+
return v.textContent = h.formatTimeRange(
|
|
1013
|
+
e.start,
|
|
1014
|
+
e.end,
|
|
1015
|
+
this.state.options.timeFormat,
|
|
1016
|
+
this.state.options.locale
|
|
1017
|
+
), g.appendChild(v), o.appendChild(g), this.appendResizeHandles(o, e), o;
|
|
944
1018
|
}
|
|
945
1019
|
/**
|
|
946
1020
|
* Dashed ghost showing where the dragged/created range will land — ONE box per
|
|
@@ -949,34 +1023,34 @@ class we extends B {
|
|
|
949
1023
|
* box hanging out of the first column for a 3-day range.
|
|
950
1024
|
*/
|
|
951
1025
|
renderPreviewEvent() {
|
|
952
|
-
this.container.querySelectorAll(".scheduler-event.preview").forEach((
|
|
1026
|
+
this.container.querySelectorAll(".scheduler-event.preview").forEach((r) => r.remove());
|
|
953
1027
|
const { previewEvent: e, options: t, date: s } = this.state;
|
|
954
1028
|
if (!e) return;
|
|
955
|
-
const
|
|
956
|
-
for (const
|
|
957
|
-
const o =
|
|
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));
|
|
958
1032
|
if (o === -1) continue;
|
|
959
1033
|
const a = this.dayColumns[o]?.querySelector(".scheduler-events-container");
|
|
960
1034
|
if (!a) continue;
|
|
961
|
-
const l = this.partGeometry(
|
|
1035
|
+
const l = this.partGeometry(r.start, r.end, t);
|
|
962
1036
|
if (!l) continue;
|
|
963
1037
|
const d = this.createElement("div", "scheduler-event", "preview");
|
|
964
|
-
|
|
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);
|
|
965
1039
|
}
|
|
966
1040
|
}
|
|
967
1041
|
updateGreyedSlots() {
|
|
968
|
-
const { dragState: e, previewEvent: t, options: s, date:
|
|
1042
|
+
const { dragState: e, previewEvent: t, options: s, date: n } = this.state;
|
|
969
1043
|
if (this.slotElements.forEach((o) => o.classList.remove("greyed")), !e || !t) return;
|
|
970
|
-
const
|
|
971
|
-
|
|
1044
|
+
const i = h.getWeekDays(n, this.firstDayOfWeek), r = h.getTimeSlots(
|
|
1045
|
+
i[0],
|
|
972
1046
|
s.slotDuration,
|
|
973
1047
|
s.slotMinTime,
|
|
974
1048
|
s.slotMaxTime
|
|
975
1049
|
);
|
|
976
|
-
for (let o = 0; o <
|
|
977
|
-
const a =
|
|
978
|
-
for (let l = 0; l <
|
|
979
|
-
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);
|
|
980
1054
|
if (c < t.end && u > t.start) {
|
|
981
1055
|
const m = `${o}-${l}`, g = this.slotElements.get(m);
|
|
982
1056
|
g && g.classList.add("greyed");
|
|
@@ -986,54 +1060,54 @@ class we extends B {
|
|
|
986
1060
|
}
|
|
987
1061
|
renderNowIndicator(e, t) {
|
|
988
1062
|
if (!this.state.options.nowIndicator) return;
|
|
989
|
-
const s = /* @__PURE__ */ new Date(),
|
|
990
|
-
if (r === -1) return;
|
|
991
|
-
const n = this.dayColumns[r];
|
|
992
|
-
if (!n) return;
|
|
993
|
-
const i = new Date(s);
|
|
994
|
-
i.setHours(0, 0, 0, 0);
|
|
995
|
-
const o = (s.getTime() - i.getTime()) / (1e3 * 60), a = (this.state.options.slotDuration ?? 1800) / 60, l = o / a * 40, d = this.createElement("div", "scheduler-now-indicator");
|
|
996
|
-
d.style.top = `${l}px`, n.appendChild(d);
|
|
997
|
-
}
|
|
998
|
-
updateNowIndicator() {
|
|
999
|
-
if (!this.state.options.nowIndicator) return;
|
|
1000
|
-
const { date: e, options: t } = this.state, s = h.getWeekDays(e, t.firstDayOfWeek), r = /* @__PURE__ */ new Date(), n = s.findIndex((u) => h.isSameDay(u, r));
|
|
1063
|
+
const s = /* @__PURE__ */ new Date(), n = e.findIndex((c) => h.isSameDay(c, s));
|
|
1001
1064
|
if (n === -1) return;
|
|
1002
1065
|
const i = this.dayColumns[n];
|
|
1003
1066
|
if (!i) return;
|
|
1004
|
-
const
|
|
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);
|
|
1071
|
+
}
|
|
1072
|
+
updateNowIndicator() {
|
|
1073
|
+
if (!this.state.options.nowIndicator) return;
|
|
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);
|
|
1005
1079
|
a.setHours(0, 0, 0, 0);
|
|
1006
|
-
const l = (
|
|
1080
|
+
const l = (n.getTime() - a.getTime()) / (1e3 * 60), d = (t.slotDuration ?? 1800) / 60, c = l / d * 40;
|
|
1007
1081
|
if (o)
|
|
1008
1082
|
o.style.top = `${c}px`;
|
|
1009
1083
|
else {
|
|
1010
1084
|
const u = this.createElement("div", "scheduler-now-indicator");
|
|
1011
|
-
u.style.top = `${c}px`,
|
|
1085
|
+
u.style.top = `${c}px`, r.appendChild(u);
|
|
1012
1086
|
}
|
|
1013
1087
|
}
|
|
1014
1088
|
destroy() {
|
|
1015
1089
|
this.eventElements.clear(), this.slotElements.clear(), this.dayColumns = [], this.clearContainer();
|
|
1016
1090
|
}
|
|
1017
1091
|
}
|
|
1018
|
-
class
|
|
1092
|
+
class Ae extends K {
|
|
1019
1093
|
constructor() {
|
|
1020
1094
|
super(...arguments), this.eventsContainer = null, this.slotElements = /* @__PURE__ */ new Map(), this.dayColumn = null;
|
|
1021
1095
|
}
|
|
1022
1096
|
render() {
|
|
1023
1097
|
this.clearContainer(), this.container.classList.add("scheduler-day-view");
|
|
1024
|
-
const { date: e, options: t } = this.state, s = this.createElement("div", "scheduler-day-headers"),
|
|
1025
|
-
|
|
1026
|
-
const
|
|
1027
|
-
h.isToday(e) &&
|
|
1028
|
-
const
|
|
1029
|
-
|
|
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);
|
|
1030
1104
|
const o = this.createElement("div", "day-number");
|
|
1031
1105
|
o.textContent = String(e.getDate());
|
|
1032
1106
|
const a = this.createElement("div", "month-year");
|
|
1033
1107
|
a.textContent = h.formatDate(e, t.locale, {
|
|
1034
1108
|
month: "long",
|
|
1035
1109
|
year: "numeric"
|
|
1036
|
-
}), 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);
|
|
1037
1111
|
const l = this.createElement("div", "scheduler-time-grid"), d = this.createElement("div", "scheduler-time-gutter"), c = h.getTimeSlots(
|
|
1038
1112
|
e,
|
|
1039
1113
|
t.slotDuration,
|
|
@@ -1042,7 +1116,7 @@ class Ee extends B {
|
|
|
1042
1116
|
);
|
|
1043
1117
|
for (const g of c) {
|
|
1044
1118
|
const f = this.createElement("div", "scheduler-time-slot-label");
|
|
1045
|
-
f.textContent = h.formatTime(g.start, t.timeFormat), d.appendChild(f);
|
|
1119
|
+
f.textContent = h.formatTime(g.start, t.timeFormat, t.locale), d.appendChild(f);
|
|
1046
1120
|
}
|
|
1047
1121
|
l.appendChild(d);
|
|
1048
1122
|
const u = this.createElement("div", "scheduler-days-container");
|
|
@@ -1050,13 +1124,16 @@ class Ee extends B {
|
|
|
1050
1124
|
const m = this.dayColumn;
|
|
1051
1125
|
for (let g = 0; g < c.length; g++) {
|
|
1052
1126
|
const f = c[g], v = this.createElement("div", "scheduler-time-slot");
|
|
1053
|
-
v.setAttribute("role", "gridcell"), v.setAttribute("tabindex", "-1"), v.setAttribute("aria-selected", "false"), v.id = `scheduler-cell-d-${g}`, this.setData(v, {
|
|
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, {
|
|
1054
1128
|
slotIndex: g,
|
|
1055
1129
|
start: f.start.toISOString(),
|
|
1056
1130
|
end: f.end.toISOString()
|
|
1057
1131
|
}), this.slotElements.set(g, v), m.appendChild(v);
|
|
1058
1132
|
}
|
|
1059
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({
|
|
1134
|
+
label: E(w(this.state.options.messages).dayGridLabel, {
|
|
1135
|
+
date: h.formatDateWithWeekday(this.state.date, this.state.options.locale)
|
|
1136
|
+
}),
|
|
1060
1137
|
multiselectable: !0,
|
|
1061
1138
|
columnHeaderRow: ":scope > .scheduler-day-headers",
|
|
1062
1139
|
columnHeaders: ".scheduler-day-headers > .scheduler-day-header",
|
|
@@ -1082,27 +1159,27 @@ class Ee extends B {
|
|
|
1082
1159
|
updateCellFocusAndSelection() {
|
|
1083
1160
|
const e = this.state.focusedCell;
|
|
1084
1161
|
let t = !1, s = null;
|
|
1085
|
-
for (const [,
|
|
1086
|
-
s || (s =
|
|
1087
|
-
const
|
|
1088
|
-
if (!
|
|
1089
|
-
const o = { start: new Date(
|
|
1090
|
-
|
|
1091
|
-
const l =
|
|
1092
|
-
|
|
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);
|
|
1093
1170
|
}
|
|
1094
1171
|
!t && s && s.setAttribute("tabindex", "0");
|
|
1095
1172
|
}
|
|
1096
1173
|
renderEvents() {
|
|
1097
1174
|
if (!this.eventsContainer) return;
|
|
1098
1175
|
this.eventsContainer.innerHTML = "";
|
|
1099
|
-
const { date: e, events: t, options: s } = this.state,
|
|
1100
|
-
|
|
1101
|
-
const
|
|
1102
|
-
|
|
1103
|
-
const
|
|
1104
|
-
for (const l of
|
|
1105
|
-
const { parts: d } = C.splitInParts(l), c = C.filterPartsByRange(d,
|
|
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);
|
|
1106
1183
|
o.push(...c);
|
|
1107
1184
|
}
|
|
1108
1185
|
const a = C.getTimelinedParts(o);
|
|
@@ -1118,34 +1195,39 @@ class Ee extends B {
|
|
|
1118
1195
|
this.eventsContainer.appendChild(m);
|
|
1119
1196
|
}
|
|
1120
1197
|
}
|
|
1121
|
-
createEventElement(e, t, s,
|
|
1122
|
-
const
|
|
1123
|
-
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(
|
|
1124
1201
|
"aria-label",
|
|
1125
|
-
|
|
1202
|
+
W(r, null, this.state.options)
|
|
1126
1203
|
), o.setAttribute("aria-pressed", a ? "true" : "false"), o.setAttribute("aria-describedby", "scheduler-kbd-event"), a && o.classList.add("selected");
|
|
1127
1204
|
const l = this.partGeometry(e.start, e.end, {
|
|
1128
1205
|
...this.state.options,
|
|
1129
|
-
slotDuration:
|
|
1130
|
-
}), { top: d, height: c } = l ?? { top: 0, height: 0 }, u = t / s * 100, m =
|
|
1131
|
-
o.style.top = `${d}px`, o.style.height = `${c}px`, o.style.left = `${u}%`, o.style.width = `calc(${m}% - 2px)`, this.applyEventColors(o,
|
|
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 });
|
|
1132
1209
|
const g = this.createElement("div", "event-content"), f = this.createElement("div", "event-title");
|
|
1133
|
-
f.textContent =
|
|
1210
|
+
f.textContent = r.title, g.appendChild(f);
|
|
1134
1211
|
const v = this.createElement("div", "event-time");
|
|
1135
|
-
return v.textContent =
|
|
1212
|
+
return v.textContent = h.formatTimeRange(
|
|
1213
|
+
e.start,
|
|
1214
|
+
e.end,
|
|
1215
|
+
this.state.options.timeFormat,
|
|
1216
|
+
this.state.options.locale
|
|
1217
|
+
), g.appendChild(v), o.appendChild(g), this.appendResizeHandles(o, e), o;
|
|
1136
1218
|
}
|
|
1137
1219
|
renderNowIndicator(e) {
|
|
1138
1220
|
const t = /* @__PURE__ */ new Date(), s = new Date(t);
|
|
1139
1221
|
s.setHours(0, 0, 0, 0);
|
|
1140
|
-
const
|
|
1141
|
-
o.style.top = `${
|
|
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);
|
|
1142
1224
|
}
|
|
1143
1225
|
updateNowIndicator() {
|
|
1144
1226
|
if (!this.dayColumn || !this.state.options.nowIndicator || !h.isToday(this.state.date)) return;
|
|
1145
1227
|
const e = this.dayColumn.querySelector(".scheduler-now-indicator"), t = /* @__PURE__ */ new Date(), s = new Date(t);
|
|
1146
1228
|
s.setHours(0, 0, 0, 0);
|
|
1147
|
-
const
|
|
1148
|
-
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);
|
|
1149
1231
|
}
|
|
1150
1232
|
update(e) {
|
|
1151
1233
|
const t = this.state.date.getTime() !== e.date.getTime(), s = this.optionsRequireRerender(this.state.options, e.options);
|
|
@@ -1159,18 +1241,18 @@ class Ee extends B {
|
|
|
1159
1241
|
return e.slotDuration !== t.slotDuration || e.timeFormat !== t.timeFormat || e.slotMinTime !== t.slotMinTime || e.slotMaxTime !== t.slotMaxTime || e.locale !== t.locale;
|
|
1160
1242
|
}
|
|
1161
1243
|
updateGreyedSlots() {
|
|
1162
|
-
const { dragState: e, previewEvent: t, options: s, date:
|
|
1163
|
-
if (this.slotElements.forEach((
|
|
1164
|
-
const
|
|
1165
|
-
|
|
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,
|
|
1166
1248
|
s.slotDuration,
|
|
1167
1249
|
s.slotMinTime,
|
|
1168
1250
|
s.slotMaxTime
|
|
1169
1251
|
);
|
|
1170
|
-
for (let
|
|
1171
|
-
const o =
|
|
1252
|
+
for (let r = 0; r < i.length; r++) {
|
|
1253
|
+
const o = i[r];
|
|
1172
1254
|
if (o.start < t.end && o.end > t.start) {
|
|
1173
|
-
const a = this.slotElements.get(
|
|
1255
|
+
const a = this.slotElements.get(r);
|
|
1174
1256
|
a && a.classList.add("greyed");
|
|
1175
1257
|
}
|
|
1176
1258
|
}
|
|
@@ -1186,19 +1268,19 @@ class Ee extends B {
|
|
|
1186
1268
|
this.eventsContainer.querySelectorAll(".scheduler-event.preview").forEach((a) => a.remove());
|
|
1187
1269
|
const { previewEvent: e, options: t, date: s } = this.state;
|
|
1188
1270
|
if (!e) return;
|
|
1189
|
-
const { parts:
|
|
1190
|
-
if (!n) return;
|
|
1191
|
-
const i = this.partGeometry(n.start, n.end, t);
|
|
1271
|
+
const { parts: n } = C.splitInParts(e), i = n.find((a) => h.isSameDay(s, a.start));
|
|
1192
1272
|
if (!i) return;
|
|
1273
|
+
const r = this.partGeometry(i.start, i.end, t);
|
|
1274
|
+
if (!r) return;
|
|
1193
1275
|
const o = this.createElement("div", "scheduler-event", "preview");
|
|
1194
|
-
|
|
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);
|
|
1195
1277
|
}
|
|
1196
1278
|
destroy() {
|
|
1197
1279
|
this.eventsContainer = null, this.dayColumn = null, this.slotElements.clear(), this.clearContainer();
|
|
1198
1280
|
}
|
|
1199
1281
|
}
|
|
1200
|
-
const
|
|
1201
|
-
class
|
|
1282
|
+
const z = "__mp-unassigned__";
|
|
1283
|
+
class I extends K {
|
|
1202
1284
|
constructor() {
|
|
1203
1285
|
super(...arguments), this.rowElements = /* @__PURE__ */ new Map(), this.pendingFocusKey = null, this.columnDrag = null, this.boundColumnDragMove = (e) => this.onColumnDragMove(e), this.boundColumnDragEnd = () => this.onColumnDragEnd();
|
|
1204
1286
|
}
|
|
@@ -1221,9 +1303,9 @@ class A extends B {
|
|
|
1221
1303
|
* the way week/day must (there, height IS duration).
|
|
1222
1304
|
*/
|
|
1223
1305
|
get trackMetrics() {
|
|
1224
|
-
const e = getComputedStyle(this.container), t = (s,
|
|
1225
|
-
const
|
|
1226
|
-
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;
|
|
1227
1309
|
};
|
|
1228
1310
|
return {
|
|
1229
1311
|
height: t("--scheduler-timeline-event-height", 28),
|
|
@@ -1233,66 +1315,61 @@ class A extends B {
|
|
|
1233
1315
|
}
|
|
1234
1316
|
render() {
|
|
1235
1317
|
this.captureActionFocus(), this.clearContainer(), this.container.classList.add("scheduler-timeline-view");
|
|
1236
|
-
const { date: e, options: t, resources: s, collapsedGroups:
|
|
1237
|
-
|
|
1318
|
+
const { date: e, options: t, resources: s, collapsedGroups: n } = this.state, i = h.getWeekDays(e, this.firstDayOfWeek), r = i.map(
|
|
1319
|
+
(D) => h.getTimeSlots(D, t.slotDuration, t.slotMinTime, t.slotMaxTime)
|
|
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");
|
|
1321
|
+
c.setAttribute("role", "grid"), c.setAttribute(
|
|
1238
1322
|
"aria-label",
|
|
1239
|
-
|
|
1240
|
-
date: h.formatDateWithWeekday(
|
|
1323
|
+
E(w(t.messages).timelineGridLabel, {
|
|
1324
|
+
date: h.formatDateWithWeekday(i[0], t.locale)
|
|
1241
1325
|
})
|
|
1242
|
-
),
|
|
1243
|
-
const
|
|
1244
|
-
|
|
1245
|
-
const
|
|
1246
|
-
|
|
1247
|
-
const
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
).
|
|
1255
|
-
k.setAttribute("role", "columnheader"), k.style.width = `${H * this.slotWidth}px`, k.textContent = h.formatDateWithWeekday(b, t.locale), k.style.borderBottom = "1px solid var(--scheduler-border-color)", u.appendChild(k);
|
|
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");
|
|
1327
|
+
const u = this.createElement("div", "scheduler-timeline-header");
|
|
1328
|
+
u.setAttribute("role", "row"), u.setAttribute("aria-rowindex", "1");
|
|
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);
|
|
1331
|
+
const g = this.createElement("div", "scheduler-timeline-slots-header");
|
|
1332
|
+
g.setAttribute("role", "presentation");
|
|
1333
|
+
let f = 2;
|
|
1334
|
+
for (const [D, T] of i.entries()) {
|
|
1335
|
+
const V = r[D].length, P = this.createElement("div", "scheduler-timeline-slot-header", "day");
|
|
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`;
|
|
1337
|
+
const ee = this.createElement("span", "day-label");
|
|
1338
|
+
ee.textContent = h.formatDateWithWeekday(T, t.locale), P.appendChild(ee), P.style.borderBottom = "1px solid var(--scheduler-border-color)", g.appendChild(P);
|
|
1256
1339
|
}
|
|
1257
|
-
|
|
1258
|
-
const
|
|
1259
|
-
|
|
1260
|
-
const
|
|
1261
|
-
|
|
1262
|
-
const
|
|
1263
|
-
|
|
1264
|
-
const
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
t.
|
|
1271
|
-
t.slotMaxTime
|
|
1272
|
-
);
|
|
1273
|
-
for (const H of M) {
|
|
1274
|
-
const k = this.createElement("div", "scheduler-timeline-slot-header");
|
|
1275
|
-
k.setAttribute("role", "columnheader"), k.style.width = `${this.slotWidth}px`, k.textContent = h.formatTime(H.start, t.timeFormat), k.style.fontSize = "10px", v.appendChild(k);
|
|
1340
|
+
u.appendChild(g);
|
|
1341
|
+
const v = this.createElement("div", "scheduler-timeline-head");
|
|
1342
|
+
v.appendChild(u), c.appendChild(v);
|
|
1343
|
+
const y = this.createElement("div", "scheduler-timeline-header");
|
|
1344
|
+
y.setAttribute("role", "row"), y.setAttribute("aria-rowindex", "2");
|
|
1345
|
+
const b = this.createElement("div", "scheduler-resource-header");
|
|
1346
|
+
b.setAttribute("role", "columnheader"), b.setAttribute("aria-colindex", "1"), b.style.borderBottom = "1px solid var(--scheduler-border-color)", y.appendChild(b);
|
|
1347
|
+
const M = this.createElement("div", "scheduler-timeline-slots-header");
|
|
1348
|
+
M.setAttribute("role", "presentation");
|
|
1349
|
+
let A = 2;
|
|
1350
|
+
for (const D of r)
|
|
1351
|
+
for (const T of D) {
|
|
1352
|
+
const R = this.createElement("div", "scheduler-timeline-slot-header");
|
|
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);
|
|
1276
1354
|
}
|
|
1355
|
+
y.appendChild(M), v.appendChild(y);
|
|
1356
|
+
const x = this.createElement("div", "scheduler-timeline-body"), F = O.flatten(s, n);
|
|
1357
|
+
let L = 3;
|
|
1358
|
+
for (const D of F) {
|
|
1359
|
+
if (!D.visible) continue;
|
|
1360
|
+
const T = this.createResourceRow(D, r);
|
|
1361
|
+
T.setAttribute("aria-rowindex", String(L)), x.appendChild(T), L++;
|
|
1277
1362
|
}
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
for (const b of w) {
|
|
1282
|
-
if (!b.visible) continue;
|
|
1283
|
-
const M = this.createResourceRow(b, n);
|
|
1284
|
-
M.setAttribute("aria-rowindex", String(x)), y.appendChild(M), x++;
|
|
1363
|
+
if (l) {
|
|
1364
|
+
const D = this.createUnassignedRow(r);
|
|
1365
|
+
D.setAttribute("aria-rowindex", String(L)), x.appendChild(D), L++;
|
|
1285
1366
|
}
|
|
1286
|
-
if (
|
|
1287
|
-
const
|
|
1288
|
-
|
|
1289
|
-
}
|
|
1290
|
-
if (l.appendChild(y), this.container.appendChild(l), w.length === 0 && !o) {
|
|
1291
|
-
const b = this.createElement("div", "scheduler-timeline-empty");
|
|
1292
|
-
b.textContent = E(t.messages).noResources, y.appendChild(b);
|
|
1367
|
+
if (c.appendChild(x), this.container.appendChild(c), F.length === 0 && !l) {
|
|
1368
|
+
const D = this.createElement("div", "scheduler-timeline-empty");
|
|
1369
|
+
D.textContent = w(t.messages).noResources, x.appendChild(D);
|
|
1293
1370
|
}
|
|
1294
|
-
const
|
|
1295
|
-
|
|
1371
|
+
const Q = this.createAddBar();
|
|
1372
|
+
Q && this.container.appendChild(Q), this.renderEvents(i), this.updateCellFocusAndSelection(), this.restoreActionFocus();
|
|
1296
1373
|
}
|
|
1297
1374
|
/**
|
|
1298
1375
|
* Focus key of an action control: what it does plus which row it belongs to.
|
|
@@ -1300,7 +1377,15 @@ class A extends B {
|
|
|
1300
1377
|
*/
|
|
1301
1378
|
actionFocusKey(e) {
|
|
1302
1379
|
const t = e.dataset.action;
|
|
1303
|
-
return t ? [
|
|
1380
|
+
return t ? [
|
|
1381
|
+
t,
|
|
1382
|
+
e.dataset.parentId ?? "",
|
|
1383
|
+
e.dataset.resourceId ?? "",
|
|
1384
|
+
// The expand toggle identifies its row this way, and it is the control
|
|
1385
|
+
// most likely to be focused across a rebuild — activating it IS what
|
|
1386
|
+
// triggers the rebuild.
|
|
1387
|
+
e.dataset.groupId ?? ""
|
|
1388
|
+
].join("|") : null;
|
|
1304
1389
|
}
|
|
1305
1390
|
/**
|
|
1306
1391
|
* Remember which action control the user was on, if any, before a rebuild.
|
|
@@ -1316,7 +1401,7 @@ class A extends B {
|
|
|
1316
1401
|
if (this.pendingFocusKey = null, !e) return;
|
|
1317
1402
|
const t = Array.from(
|
|
1318
1403
|
this.container.querySelectorAll("[data-action]")
|
|
1319
|
-
).find((
|
|
1404
|
+
).find((n) => this.actionFocusKey(n) === e), s = this.container.querySelector(".scheduler-add-button");
|
|
1320
1405
|
(t ?? s)?.focus();
|
|
1321
1406
|
}
|
|
1322
1407
|
/**
|
|
@@ -1326,58 +1411,55 @@ class A extends B {
|
|
|
1326
1411
|
*/
|
|
1327
1412
|
updateCellFocusAndSelection() {
|
|
1328
1413
|
const e = this.state.focusedCell, t = this.state.focusedResourceId, s = this.container.querySelectorAll(".scheduler-timeline-slot");
|
|
1329
|
-
let
|
|
1330
|
-
s.forEach((
|
|
1331
|
-
|
|
1332
|
-
const o =
|
|
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;
|
|
1333
1418
|
if (!o || !a) return;
|
|
1334
1419
|
const d = { start: new Date(o), end: new Date(a) }, c = !!e && d.start.getTime() === e.start.getTime() && t === l;
|
|
1335
|
-
|
|
1336
|
-
const u =
|
|
1337
|
-
|
|
1338
|
-
}), !
|
|
1420
|
+
r.setAttribute("tabindex", c ? "0" : "-1");
|
|
1421
|
+
const u = Z(d, this.state, l);
|
|
1422
|
+
r.setAttribute("aria-selected", u ? "true" : "false"), r.classList.toggle("selected", u), c && (n = !0);
|
|
1423
|
+
}), !n && i && i.setAttribute("tabindex", "0");
|
|
1339
1424
|
}
|
|
1340
1425
|
createResourceRow(e, t) {
|
|
1341
|
-
const { options: s } = this.state,
|
|
1342
|
-
|
|
1343
|
-
const
|
|
1344
|
-
if (
|
|
1345
|
-
const
|
|
1346
|
-
|
|
1347
|
-
const
|
|
1348
|
-
|
|
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)) {
|
|
1430
|
+
const l = this.createElement("button", "expand-toggle");
|
|
1431
|
+
l.type = "button";
|
|
1432
|
+
const d = this.state.collapsedGroups.has(e.item.id);
|
|
1433
|
+
l.textContent = d ? "▶" : "▼", l.setAttribute("aria-expanded", String(!d)), l.setAttribute(
|
|
1349
1434
|
"aria-label",
|
|
1350
|
-
|
|
1351
|
-
|
|
1435
|
+
E(
|
|
1436
|
+
w(this.state.options.messages)[d ? "expandGroup" : "collapseGroup"],
|
|
1352
1437
|
{ title: e.item.title }
|
|
1353
1438
|
)
|
|
1354
|
-
), this.setData(
|
|
1439
|
+
), this.setData(l, { action: "toggle-group", groupId: e.item.id }), i.appendChild(l);
|
|
1355
1440
|
}
|
|
1356
|
-
const
|
|
1357
|
-
|
|
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);
|
|
1358
1443
|
const o = this.createElement("div", "scheduler-timeline-slots");
|
|
1359
1444
|
o.setAttribute("role", "presentation");
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
a,
|
|
1363
|
-
s.slotDuration,
|
|
1364
|
-
s.slotMinTime,
|
|
1365
|
-
s.slotMaxTime
|
|
1366
|
-
);
|
|
1445
|
+
let a = 2;
|
|
1446
|
+
for (const l of t)
|
|
1367
1447
|
for (const d of l) {
|
|
1368
1448
|
const c = this.createElement("div", "scheduler-timeline-slot");
|
|
1369
|
-
c.setAttribute("role", "gridcell"), c.setAttribute("tabindex", "-1"), c.setAttribute("aria-selected", "false"), c.
|
|
1449
|
+
c.setAttribute("role", "gridcell"), c.setAttribute("aria-colindex", String(a)), a++, c.setAttribute("tabindex", "-1"), c.setAttribute("aria-selected", "false"), c.setAttribute(
|
|
1450
|
+
"aria-label",
|
|
1451
|
+
q(d, this.state.options, e.item.title)
|
|
1452
|
+
), c.id = `scheduler-cell-t-${e.item.id}-${d.start.getTime()}`, c.style.width = `${this.slotWidth}px`, this.setData(c, {
|
|
1370
1453
|
resourceId: e.item.id,
|
|
1371
1454
|
start: d.start.toISOString(),
|
|
1372
1455
|
end: d.end.toISOString()
|
|
1373
1456
|
}), o.appendChild(c);
|
|
1374
1457
|
}
|
|
1458
|
+
if (ie(e.item)) {
|
|
1459
|
+
const l = this.createElement("div", "scheduler-timeline-events");
|
|
1460
|
+
l.setAttribute("role", "gridcell"), l.setAttribute("aria-colindex", "2"), l.setAttribute("aria-colspan", String(a - 2)), o.appendChild(l);
|
|
1375
1461
|
}
|
|
1376
|
-
|
|
1377
|
-
const a = this.createElement("div", "scheduler-timeline-events");
|
|
1378
|
-
a.setAttribute("role", "gridcell"), o.appendChild(a);
|
|
1379
|
-
}
|
|
1380
|
-
return r.appendChild(o), this.rowElements.set(e.item.id, r), r;
|
|
1462
|
+
return n.appendChild(o), this.rowElements.set(e.item.id, n), n;
|
|
1381
1463
|
}
|
|
1382
1464
|
/**
|
|
1383
1465
|
* Whether the synthetic bucket row renders: only when something is actually
|
|
@@ -1402,25 +1484,32 @@ class A extends B {
|
|
|
1402
1484
|
* strips classes and ARIA, not inline style), which is what makes the
|
|
1403
1485
|
* user's chosen width sticky.
|
|
1404
1486
|
*
|
|
1405
|
-
*
|
|
1406
|
-
*
|
|
1407
|
-
*
|
|
1487
|
+
* On its placement (audit M11): it lives inside the corner columnheader,
|
|
1488
|
+
* which IS inside the `role="grid"` subtree — an earlier comment here claimed
|
|
1489
|
+
* the opposite. That is fine, but not for the reason the old comment gave.
|
|
1490
|
+
* `columnheader` places no restriction on its own descendants, so the
|
|
1491
|
+
* separator breaks no owned-children rule; and it is a deliberate second Tab
|
|
1492
|
+
* stop rather than a trap, because `getFocusedKind()` matches on the cell and
|
|
1493
|
+
* event classes and returns `'other'` here, so the grid's arrow handling
|
|
1494
|
+
* declines the key and only this element's own listener resizes. Moving it out
|
|
1495
|
+
* of the grid would mean rebuilding the containing block it positions against
|
|
1496
|
+
* — the sticky corner cell — for no accessibility gain.
|
|
1408
1497
|
*/
|
|
1409
1498
|
createColumnResizer() {
|
|
1410
|
-
const e =
|
|
1499
|
+
const e = w(this.state.options.messages), t = this.createElement("div", "scheduler-column-resizer");
|
|
1411
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) => {
|
|
1412
1501
|
s.preventDefault(), s.stopPropagation(), this.columnDrag = { startX: s.clientX, startWidth: this.currentColumnWidth() }, document.addEventListener("pointermove", this.boundColumnDragMove), document.addEventListener("pointerup", this.boundColumnDragEnd);
|
|
1413
1502
|
}), t.addEventListener("keydown", (s) => {
|
|
1414
|
-
const
|
|
1503
|
+
const i = this.currentColumnWidth();
|
|
1415
1504
|
switch (s.key) {
|
|
1416
1505
|
case "ArrowLeft":
|
|
1417
|
-
s.preventDefault(), this.applyColumnWidth(
|
|
1506
|
+
s.preventDefault(), this.applyColumnWidth(i - 16);
|
|
1418
1507
|
break;
|
|
1419
1508
|
case "ArrowRight":
|
|
1420
|
-
s.preventDefault(), this.applyColumnWidth(
|
|
1509
|
+
s.preventDefault(), this.applyColumnWidth(i + 16);
|
|
1421
1510
|
break;
|
|
1422
1511
|
case "Home":
|
|
1423
|
-
s.preventDefault(), this.applyColumnWidth(
|
|
1512
|
+
s.preventDefault(), this.applyColumnWidth(I.MIN_COLUMN_PX);
|
|
1424
1513
|
break;
|
|
1425
1514
|
case "End":
|
|
1426
1515
|
s.preventDefault(), this.applyColumnWidth(Number.MAX_SAFE_INTEGER);
|
|
@@ -1433,25 +1522,25 @@ class A extends B {
|
|
|
1433
1522
|
}
|
|
1434
1523
|
maxColumnWidth() {
|
|
1435
1524
|
return Math.max(
|
|
1436
|
-
|
|
1437
|
-
this.container.clientWidth -
|
|
1525
|
+
I.MIN_COLUMN_PX,
|
|
1526
|
+
this.container.clientWidth - I.MIN_GRID_PX
|
|
1438
1527
|
);
|
|
1439
1528
|
}
|
|
1440
1529
|
applyColumnWidth(e) {
|
|
1441
1530
|
const t = Math.round(
|
|
1442
|
-
Math.min(Math.max(e,
|
|
1531
|
+
Math.min(Math.max(e, I.MIN_COLUMN_PX), this.maxColumnWidth())
|
|
1443
1532
|
);
|
|
1444
1533
|
this.container.style.setProperty(
|
|
1445
1534
|
"--scheduler-resource-column-width",
|
|
1446
|
-
`min(${t}px, calc(100% - ${
|
|
1535
|
+
`min(${t}px, calc(100% - ${I.MIN_GRID_PX}px))`
|
|
1447
1536
|
);
|
|
1448
1537
|
const s = this.container.querySelector(".scheduler-column-resizer");
|
|
1449
1538
|
s && this.updateResizerValue(s, t);
|
|
1450
1539
|
}
|
|
1451
1540
|
/** aria-valuenow as a percentage of the scroller, per the splitter pattern. */
|
|
1452
1541
|
updateResizerValue(e, t) {
|
|
1453
|
-
const s = this.container.clientWidth || 1,
|
|
1454
|
-
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)));
|
|
1455
1544
|
}
|
|
1456
1545
|
onColumnDragMove(e) {
|
|
1457
1546
|
this.columnDrag && this.applyColumnWidth(this.columnDrag.startWidth + (e.clientX - this.columnDrag.startX));
|
|
@@ -1461,7 +1550,7 @@ class A extends B {
|
|
|
1461
1550
|
}
|
|
1462
1551
|
/** True when the capability is granted for the whole scheduler. */
|
|
1463
1552
|
can(e) {
|
|
1464
|
-
return
|
|
1553
|
+
return re(e, { permissions: this.state.resolvedPermissions });
|
|
1465
1554
|
}
|
|
1466
1555
|
/**
|
|
1467
1556
|
* Per-row resource actions, rendered into the pinned rowheader cell.
|
|
@@ -1478,54 +1567,43 @@ class A extends B {
|
|
|
1478
1567
|
* it entirely — `aria-level` is invalid on these roles, so nesting is conveyed
|
|
1479
1568
|
* by the name and the indent, not by an attribute axe flags.
|
|
1480
1569
|
*/
|
|
1481
|
-
appendResourceActions(e, t) {
|
|
1482
|
-
const s = E(this.state.options.messages), r = this.createElement("div", "scheduler-resource-actions");
|
|
1483
|
-
L(t) && (this.can("createResource") && r.appendChild(
|
|
1484
|
-
this.createResourceAction(
|
|
1485
|
-
"add-resource",
|
|
1486
|
-
"+",
|
|
1487
|
-
S(s.addResourceToGroup, { title: t.title }),
|
|
1488
|
-
{ parentId: t.id }
|
|
1489
|
-
)
|
|
1490
|
-
), this.can("createGroup") && r.appendChild(
|
|
1491
|
-
this.createResourceAction(
|
|
1492
|
-
"add-group",
|
|
1493
|
-
"⊞",
|
|
1494
|
-
S(s.addGroupToGroup, { title: t.title }),
|
|
1495
|
-
{ parentId: t.id }
|
|
1496
|
-
)
|
|
1497
|
-
)), this.can("updateResource") && r.appendChild(this.createColorSwatch(t, s.resourceColor)), this.can("deleteResource") && r.appendChild(
|
|
1498
|
-
this.createResourceAction(
|
|
1499
|
-
"delete-resource",
|
|
1500
|
-
"×",
|
|
1501
|
-
S(s.removeResource, { title: t.title }),
|
|
1502
|
-
{ resourceId: t.id }
|
|
1503
|
-
)
|
|
1504
|
-
), r.childElementCount > 0 && e.appendChild(r);
|
|
1505
|
-
}
|
|
1506
1570
|
/**
|
|
1507
|
-
*
|
|
1508
|
-
*
|
|
1571
|
+
* Which actions this row offers. One list, consulted twice: here to decide
|
|
1572
|
+
* whether the row deserves a trigger at all, and by the component to build the
|
|
1573
|
+
* panel's contents. Keeping it in one place is what stops the button from
|
|
1574
|
+
* promising a menu that turns out to be empty.
|
|
1509
1575
|
*/
|
|
1510
|
-
|
|
1511
|
-
const
|
|
1512
|
-
|
|
1513
|
-
const i = this.createElement("span", "action-glyph");
|
|
1514
|
-
return i.setAttribute("aria-hidden", "true"), i.textContent = t, n.appendChild(i), n;
|
|
1576
|
+
rowActions(e) {
|
|
1577
|
+
const t = [];
|
|
1578
|
+
return this.can("updateResource") && t.push("rename-resource"), H(e) && (this.can("createResource") && t.push("add-resource"), this.can("createGroup") && t.push("add-group")), this.can("updateResource") && t.push("set-resource-color"), this.can("deleteResource") && t.push("delete-resource"), t;
|
|
1515
1579
|
}
|
|
1516
1580
|
/**
|
|
1517
|
-
*
|
|
1518
|
-
*
|
|
1519
|
-
*
|
|
1520
|
-
*
|
|
1581
|
+
* The row's actions trigger — one 24px button where four controls used to sit.
|
|
1582
|
+
*
|
|
1583
|
+
* Those four (add resource, add subgroup, a colour input, delete) took 102px of
|
|
1584
|
+
* a 200px column, leaving roughly 50px for the resource title: five characters,
|
|
1585
|
+
* silently ellipsised. #395 shipped them inline and #396's D12.1c predicted
|
|
1586
|
+
* this exact complaint; §11.2 named the trigger for revisiting it. The
|
|
1587
|
+
* behaviour is unchanged — every action keeps its `data-action`, its permission
|
|
1588
|
+
* gate and its emitted event — only the layout is reverted.
|
|
1589
|
+
*
|
|
1590
|
+
* The button doubles as the row's colour chip. A group's `color` is stored and
|
|
1591
|
+
* editable but was painted nowhere in this column, so this is the first place
|
|
1592
|
+
* it becomes visible where it is set.
|
|
1521
1593
|
*
|
|
1522
|
-
*
|
|
1523
|
-
*
|
|
1524
|
-
*
|
|
1594
|
+
* `data-action` + `data-resource-id` are load-bearing, not decoration: the
|
|
1595
|
+
* timeline rebuilds its DOM on every state change, and
|
|
1596
|
+
* captureActionFocus/restoreActionFocus restores focus by exactly that key.
|
|
1597
|
+
* Omitting it reproduces the expand toggle's bug, where focus falls to <body>.
|
|
1525
1598
|
*/
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1599
|
+
appendResourceActions(e, t) {
|
|
1600
|
+
if (this.rowActions(t).length === 0) return;
|
|
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);
|
|
1605
|
+
const l = this.createElement("span", "action-glyph");
|
|
1606
|
+
l.setAttribute("aria-hidden", "true"), l.textContent = "⋯", i.appendChild(l), e.insertBefore(i, e.firstChild);
|
|
1529
1607
|
}
|
|
1530
1608
|
/**
|
|
1531
1609
|
* Root-level "Add resource" / "Add group" bar, pinned to the bottom of the
|
|
@@ -1539,16 +1617,16 @@ class A extends B {
|
|
|
1539
1617
|
createAddBar() {
|
|
1540
1618
|
const e = this.can("createResource"), t = this.can("createGroup");
|
|
1541
1619
|
if (!e && !t) return null;
|
|
1542
|
-
const s =
|
|
1543
|
-
if (
|
|
1544
|
-
const
|
|
1545
|
-
|
|
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);
|
|
1546
1624
|
}
|
|
1547
1625
|
if (t) {
|
|
1548
|
-
const
|
|
1549
|
-
|
|
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);
|
|
1550
1628
|
}
|
|
1551
|
-
return
|
|
1629
|
+
return n;
|
|
1552
1630
|
}
|
|
1553
1631
|
/**
|
|
1554
1632
|
* The "(No resource)" bucket row.
|
|
@@ -1564,94 +1642,95 @@ class A extends B {
|
|
|
1564
1642
|
createUnassignedRow(e) {
|
|
1565
1643
|
const { options: t } = this.state, s = this.createElement("div", "scheduler-timeline-row", "unassigned");
|
|
1566
1644
|
s.setAttribute("role", "row");
|
|
1567
|
-
const
|
|
1568
|
-
|
|
1569
|
-
const
|
|
1570
|
-
|
|
1571
|
-
const
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
a,
|
|
1576
|
-
t.slotDuration,
|
|
1577
|
-
t.slotMinTime,
|
|
1578
|
-
t.slotMaxTime
|
|
1579
|
-
);
|
|
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;
|
|
1652
|
+
for (const l of e)
|
|
1580
1653
|
for (const d of l) {
|
|
1581
1654
|
const c = this.createElement("div", "scheduler-timeline-slot");
|
|
1582
|
-
c.setAttribute("role", "gridcell"), c.setAttribute("tabindex", "-1"), c.setAttribute("aria-selected", "false"), c.
|
|
1655
|
+
c.setAttribute("role", "gridcell"), c.setAttribute("aria-colindex", String(o)), o++, c.setAttribute("tabindex", "-1"), c.setAttribute("aria-selected", "false"), c.setAttribute(
|
|
1656
|
+
"aria-label",
|
|
1657
|
+
q(
|
|
1658
|
+
d,
|
|
1659
|
+
this.state.options,
|
|
1660
|
+
w(this.state.options.messages).unassignedResource
|
|
1661
|
+
)
|
|
1662
|
+
), c.id = `scheduler-cell-t-${z}-${d.start.getTime()}`, c.style.width = `${this.slotWidth}px`, this.setData(c, {
|
|
1583
1663
|
start: d.start.toISOString(),
|
|
1584
1664
|
end: d.end.toISOString(),
|
|
1585
1665
|
unassigned: "true"
|
|
1586
|
-
}),
|
|
1666
|
+
}), r.appendChild(c);
|
|
1587
1667
|
}
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
return o.setAttribute("role", "gridcell"), i.appendChild(o), s.appendChild(i), this.rowElements.set(P, s), s;
|
|
1668
|
+
const a = this.createElement("div", "scheduler-timeline-events");
|
|
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;
|
|
1591
1670
|
}
|
|
1592
1671
|
renderEvents(e) {
|
|
1593
|
-
const { resources: t, options: s } = this.state,
|
|
1594
|
-
|
|
1672
|
+
const { resources: t, options: s } = this.state, n = e[0], i = new Date(e[6]);
|
|
1673
|
+
i.setHours(23, 59, 59, 999);
|
|
1595
1674
|
const a = h.getTimeSlots(
|
|
1596
1675
|
e[0],
|
|
1597
1676
|
s.slotDuration,
|
|
1598
1677
|
s.slotMinTime,
|
|
1599
1678
|
s.slotMaxTime
|
|
1600
1679
|
).length * 7 * this.slotWidth, l = [
|
|
1601
|
-
...
|
|
1680
|
+
...O.getAllResources(t).map((d) => ({
|
|
1602
1681
|
resourceId: d.id,
|
|
1603
1682
|
title: d.title
|
|
1604
1683
|
})),
|
|
1605
|
-
...this.rowElements.has(
|
|
1684
|
+
...this.rowElements.has(z) ? [
|
|
1606
1685
|
{
|
|
1607
1686
|
resourceId: null,
|
|
1608
|
-
title:
|
|
1687
|
+
title: w(s.messages).unassignedResource
|
|
1609
1688
|
}
|
|
1610
1689
|
] : []
|
|
1611
1690
|
];
|
|
1612
1691
|
for (const { resourceId: d, title: c } of l) {
|
|
1613
|
-
const u = this.rowElements.get(d ??
|
|
1692
|
+
const u = this.rowElements.get(d ?? z);
|
|
1614
1693
|
if (!u) continue;
|
|
1615
1694
|
const m = u.querySelector(".scheduler-timeline-events");
|
|
1616
1695
|
if (!m) continue;
|
|
1617
1696
|
m.innerHTML = "";
|
|
1618
1697
|
const f = (this.state.eventsByResource.get(d) ?? []).filter(
|
|
1619
|
-
(
|
|
1620
|
-
).map((
|
|
1621
|
-
id:
|
|
1622
|
-
event:
|
|
1623
|
-
start:
|
|
1624
|
-
end:
|
|
1698
|
+
(x) => x.start < i && x.end > n
|
|
1699
|
+
).map((x) => ({
|
|
1700
|
+
id: x.id,
|
|
1701
|
+
event: x,
|
|
1702
|
+
start: x.start,
|
|
1703
|
+
end: x.end,
|
|
1625
1704
|
isStart: !0,
|
|
1626
1705
|
isEnd: !0,
|
|
1627
1706
|
dayIndex: 0,
|
|
1628
1707
|
totalDays: 1
|
|
1629
|
-
})), v = C.getTimelinedParts(f), y = v.reduce((
|
|
1630
|
-
u.style.minHeight = `${y *
|
|
1631
|
-
for (const { part:
|
|
1632
|
-
if (!
|
|
1633
|
-
const
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1708
|
+
})), v = C.getTimelinedParts(f), y = v.reduce((x, F) => Math.max(x, F.totalTracks), 1), { height: b, gap: M, padding: A } = this.trackMetrics;
|
|
1709
|
+
u.style.minHeight = `${y * b + (y - 1) * M + 2 * A}px`;
|
|
1710
|
+
for (const { part: x, trackIndex: F } of v) {
|
|
1711
|
+
if (!x.event) continue;
|
|
1712
|
+
const L = this.createEventElement(
|
|
1713
|
+
x.event,
|
|
1714
|
+
F,
|
|
1715
|
+
n,
|
|
1637
1716
|
a,
|
|
1638
1717
|
s.slotDuration ?? 1800,
|
|
1639
1718
|
c
|
|
1640
1719
|
);
|
|
1641
|
-
m.appendChild(
|
|
1720
|
+
m.appendChild(L);
|
|
1642
1721
|
}
|
|
1643
1722
|
}
|
|
1644
1723
|
}
|
|
1645
|
-
createEventElement(e, t, s,
|
|
1724
|
+
createEventElement(e, t, s, n, i, r = null) {
|
|
1646
1725
|
const o = this.createElement("div", "scheduler-timeline-event"), a = this.state.selectedEvent?.id === e.id;
|
|
1647
1726
|
this.state.keyboardMoveEventId, e.id, o.setAttribute("role", "button"), o.setAttribute("tabindex", "0"), o.setAttribute(
|
|
1648
1727
|
"aria-label",
|
|
1649
|
-
|
|
1728
|
+
W(e, r, this.state.options)
|
|
1650
1729
|
), o.setAttribute("aria-pressed", a ? "true" : "false"), o.setAttribute("aria-describedby", "scheduler-kbd-event"), a && o.classList.add("selected");
|
|
1651
|
-
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 *
|
|
1652
|
-
o.style.left = `${f}px`, o.style.width = `${v}px`, o.style.top = `${
|
|
1653
|
-
const
|
|
1654
|
-
return
|
|
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 });
|
|
1732
|
+
const A = this.createElement("div", "event-content"), x = this.createElement("div", "event-title");
|
|
1733
|
+
return x.textContent = e.title, A.appendChild(x), o.appendChild(A), this.appendResizeHandles(
|
|
1655
1734
|
o,
|
|
1656
1735
|
{
|
|
1657
1736
|
id: e.id,
|
|
@@ -1677,31 +1756,31 @@ class A extends B {
|
|
|
1677
1756
|
*/
|
|
1678
1757
|
renderPreviewEvent(e) {
|
|
1679
1758
|
this.container.querySelector(".scheduler-timeline-event.preview")?.remove();
|
|
1680
|
-
const { dragState: t, previewEvent: s, options:
|
|
1759
|
+
const { dragState: t, previewEvent: s, options: n } = this.state;
|
|
1681
1760
|
if (!s) return;
|
|
1682
|
-
const
|
|
1683
|
-
if (!
|
|
1684
|
-
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");
|
|
1685
1764
|
if (!a) return;
|
|
1686
1765
|
const d = h.getTimeSlots(
|
|
1687
1766
|
e[0],
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1767
|
+
n.slotDuration,
|
|
1768
|
+
n.slotMinTime,
|
|
1769
|
+
n.slotMaxTime
|
|
1691
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");
|
|
1692
1771
|
v.style.left = `${(m - c.getTime()) / f * d}px`, v.style.width = `${Math.max((g - m) / f * d, 20)}px`;
|
|
1693
|
-
const y =
|
|
1772
|
+
const y = i ? (
|
|
1694
1773
|
// dataset match rather than an attribute selector: event ids are
|
|
1695
1774
|
// consumer-supplied and would need CSS escaping.
|
|
1696
1775
|
Array.from(
|
|
1697
1776
|
a.querySelectorAll(".scheduler-timeline-event:not(.preview)")
|
|
1698
|
-
).find((
|
|
1777
|
+
).find((b) => b.dataset.eventId === i)
|
|
1699
1778
|
) : void 0;
|
|
1700
1779
|
if (y)
|
|
1701
1780
|
v.style.top = y.style.top, v.style.height = y.style.height;
|
|
1702
1781
|
else {
|
|
1703
|
-
const { height:
|
|
1704
|
-
v.style.top = `${
|
|
1782
|
+
const { height: b, padding: M } = this.trackMetrics;
|
|
1783
|
+
v.style.top = `${M}px`, v.style.height = `${b}px`;
|
|
1705
1784
|
}
|
|
1706
1785
|
a.appendChild(v);
|
|
1707
1786
|
}
|
|
@@ -1724,37 +1803,37 @@ class A extends B {
|
|
|
1724
1803
|
const { dragState: e, previewEvent: t } = this.state;
|
|
1725
1804
|
if (!t) return;
|
|
1726
1805
|
if (t.resourceId !== void 0)
|
|
1727
|
-
return t.resourceId ??
|
|
1728
|
-
const s = e?.event?.id ?? this.state.keyboardMoveEventId,
|
|
1729
|
-
return
|
|
1806
|
+
return t.resourceId ?? z;
|
|
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;
|
|
1730
1809
|
}
|
|
1731
1810
|
update(e) {
|
|
1732
|
-
const t = this.state.date.getTime() !== e.date.getTime(), s = this.optionsRequireRerender(this.state.options, e.options),
|
|
1733
|
-
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) {
|
|
1734
1813
|
this.render();
|
|
1735
1814
|
return;
|
|
1736
1815
|
}
|
|
1737
1816
|
this.updateGreyedSlots();
|
|
1738
|
-
const
|
|
1739
|
-
this.renderEvents(
|
|
1817
|
+
const i = h.getWeekDays(e.date, this.firstDayOfWeek);
|
|
1818
|
+
this.renderEvents(i), this.renderPreviewEvent(i), this.updateCellFocusAndSelection();
|
|
1740
1819
|
}
|
|
1741
1820
|
optionsRequireRerender(e, t) {
|
|
1742
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;
|
|
1743
1822
|
}
|
|
1744
1823
|
updateGreyedSlots() {
|
|
1745
1824
|
const { dragState: e, previewEvent: t } = this.state;
|
|
1746
|
-
if (this.container.querySelectorAll(".scheduler-timeline-slot").forEach((
|
|
1747
|
-
const
|
|
1748
|
-
|
|
1749
|
-
const o = new Date(
|
|
1750
|
-
o < t.end && a > t.start &&
|
|
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");
|
|
1751
1830
|
}));
|
|
1752
1831
|
}
|
|
1753
1832
|
destroy() {
|
|
1754
1833
|
this.onColumnDragEnd(), this.rowElements.clear(), this.clearContainer();
|
|
1755
1834
|
}
|
|
1756
1835
|
}
|
|
1757
|
-
const
|
|
1836
|
+
const Re = ce(`@charset "UTF-8";
|
|
1758
1837
|
/* Layering ladder. Nothing between :host and the events establishes a
|
|
1759
1838
|
stacking context, so every one of these competes in ONE shared context
|
|
1760
1839
|
across the whole shadow root — a selected event in one day column is
|
|
@@ -1790,8 +1869,11 @@ const xe = J(`@charset "UTF-8";
|
|
|
1790
1869
|
--scheduler-timeline-track-gap: 2px;
|
|
1791
1870
|
--scheduler-timeline-row-padding: 2px;
|
|
1792
1871
|
/* Pinned resource column. Capped so it can never swallow the grid on a narrow
|
|
1793
|
-
viewport (AG Grid applies the same guard by auto-unpinning).
|
|
1794
|
-
|
|
1872
|
+
viewport (AG Grid applies the same guard by auto-unpinning).
|
|
1873
|
+
140px, down from 200px: the four inline action controls that used to need
|
|
1874
|
+
102px of it are now behind one 24px trigger, so the title gets MORE room in
|
|
1875
|
+
a narrower column than it had in the wide one. */
|
|
1876
|
+
--scheduler-resource-column-width: min(140px, calc(100% - 50px));
|
|
1795
1877
|
--scheduler-resize-glyph-size: 14px;
|
|
1796
1878
|
--scheduler-resize-glyph-color: var(--bs-body-color, #212529);
|
|
1797
1879
|
--scheduler-resize-glyph-bg: var(--bs-body-bg, #fff);
|
|
@@ -2072,11 +2154,20 @@ const xe = J(`@charset "UTF-8";
|
|
|
2072
2154
|
text-overflow: ellipsis;
|
|
2073
2155
|
}
|
|
2074
2156
|
|
|
2075
|
-
/* Prevent browser from handling touch gestures on events (enables drag)
|
|
2157
|
+
/* Prevent browser from handling touch gestures on events (enables drag).
|
|
2158
|
+
The three suppression properties beneath touch-action are the same recipe
|
|
2159
|
+
.dock-tab uses to run an identical 600ms long-press drag: without them iOS
|
|
2160
|
+
raises the selection magnifier over the event partway through the hold. They
|
|
2161
|
+
do NOT stop the contextmenu event itself — that is arbitrated in JS, see
|
|
2162
|
+
MpScheduler.handleContextMenu — they stop the selection UI that would appear
|
|
2163
|
+
alongside it. */
|
|
2076
2164
|
.scheduler-event:not(.preview),
|
|
2077
2165
|
.scheduler-timeline-event:not(.preview) {
|
|
2078
2166
|
touch-action: none;
|
|
2079
2167
|
-ms-touch-action: none;
|
|
2168
|
+
user-select: none;
|
|
2169
|
+
-webkit-user-select: none;
|
|
2170
|
+
-webkit-touch-callout: none;
|
|
2080
2171
|
}
|
|
2081
2172
|
|
|
2082
2173
|
.scheduler-event:hover {
|
|
@@ -2787,6 +2878,34 @@ const xe = J(`@charset "UTF-8";
|
|
|
2787
2878
|
font-size: 12px;
|
|
2788
2879
|
}
|
|
2789
2880
|
|
|
2881
|
+
/* The DAY header row only — this class is shared with the 336 per-slot time
|
|
2882
|
+
labels, which must keep their centred, non-sticky behaviour. */
|
|
2883
|
+
.scheduler-timeline-slot-header.day {
|
|
2884
|
+
text-align: start;
|
|
2885
|
+
}
|
|
2886
|
+
|
|
2887
|
+
/* Pin the date to the left edge of the scrollport so it stays readable for the
|
|
2888
|
+
whole day, instead of only while the middle of a 2400px column is on screen.
|
|
2889
|
+
|
|
2890
|
+
The offset is the resource column, NOT 0: the corner cell is \`sticky; left: 0\`
|
|
2891
|
+
at $z-sticky-column, so a label stuck at 0 would slide underneath it and be
|
|
2892
|
+
invisible for the last stretch of each day. Reading the same custom property
|
|
2893
|
+
the column resizer writes means a user-dragged column keeps this in sync for
|
|
2894
|
+
free. Logical property so RTL pins to the right edge.
|
|
2895
|
+
|
|
2896
|
+
Sticky INSIDE the sticky header block is fine — that one sticks on \`top\`,
|
|
2897
|
+
this on the inline axis, so they do not compete. Verified in Chromium: the
|
|
2898
|
+
label pins at the column edge, hands off cleanly to the next day at the
|
|
2899
|
+
boundary, never leaves its own cell, and passes UNDER the corner column. */
|
|
2900
|
+
.scheduler-timeline-slot-header.day .day-label {
|
|
2901
|
+
position: sticky;
|
|
2902
|
+
inset-inline-start: var(--scheduler-resource-column-width);
|
|
2903
|
+
display: inline-block;
|
|
2904
|
+
/* Opaque so the outgoing label cannot show through the incoming one during
|
|
2905
|
+
the hand-off at a day boundary. */
|
|
2906
|
+
background: var(--scheduler-header-bg);
|
|
2907
|
+
}
|
|
2908
|
+
|
|
2790
2909
|
.scheduler-timeline-body {
|
|
2791
2910
|
display: flex;
|
|
2792
2911
|
flex-direction: column;
|
|
@@ -2831,11 +2950,15 @@ const xe = J(`@charset "UTF-8";
|
|
|
2831
2950
|
|
|
2832
2951
|
/* Resource-column resize separator (R15): the WAI-ARIA window splitter on the
|
|
2833
2952
|
corner header's right edge. Inside the sticky corner cell, so it pins with
|
|
2834
|
-
the column it resizes.
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
}
|
|
2838
|
-
|
|
2953
|
+
the column it resizes.
|
|
2954
|
+
|
|
2955
|
+
NOTE: this block used to re-declare \`.scheduler-resource-header { position:
|
|
2956
|
+
relative }\` so the absolutely-positioned resizer below had a containing block.
|
|
2957
|
+
That silently un-stuck BOTH corner cells — same specificity as the sticky
|
|
2958
|
+
declaration above, later in the file, so \`relative\` won — and the two header
|
|
2959
|
+
cells scrolled away with the grid while every body row stayed pinned. It was
|
|
2960
|
+
never needed: \`position: sticky\` is itself a positioned value and already
|
|
2961
|
+
establishes the containing block the resizer wants. */
|
|
2839
2962
|
.scheduler-column-resizer {
|
|
2840
2963
|
position: absolute;
|
|
2841
2964
|
top: 0;
|
|
@@ -2918,27 +3041,22 @@ const xe = J(`@charset "UTF-8";
|
|
|
2918
3041
|
flex: 0 0 auto;
|
|
2919
3042
|
}
|
|
2920
3043
|
|
|
2921
|
-
/*
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
gap: 2px;
|
|
2927
|
-
flex: 0 0 auto;
|
|
2928
|
-
margin-left: auto;
|
|
2929
|
-
}
|
|
2930
|
-
|
|
2931
|
-
.scheduler-resource-action {
|
|
3044
|
+
/* The row's actions trigger. One button where four controls used to sit: they
|
|
3045
|
+
took 102px of a 200px column and left the title about 50px — five characters.
|
|
3046
|
+
Doubles as the row's colour chip, which is the first time a group's stored
|
|
3047
|
+
colour is painted anywhere in this column. */
|
|
3048
|
+
.scheduler-row-menu-button {
|
|
2932
3049
|
/* 24x24 = WCAG 2.2 SC 2.5.8 minimum target size. The glyph is smaller; the
|
|
2933
3050
|
button is not. */
|
|
2934
3051
|
width: 24px;
|
|
2935
3052
|
height: 24px;
|
|
3053
|
+
flex: 0 0 auto;
|
|
2936
3054
|
display: flex;
|
|
2937
3055
|
align-items: center;
|
|
2938
3056
|
justify-content: center;
|
|
2939
3057
|
padding: 0;
|
|
2940
3058
|
cursor: pointer;
|
|
2941
|
-
border: 1px solid
|
|
3059
|
+
border: 1px solid var(--scheduler-border-color);
|
|
2942
3060
|
border-radius: 4px;
|
|
2943
3061
|
background: transparent;
|
|
2944
3062
|
color: inherit;
|
|
@@ -2946,18 +3064,68 @@ const xe = J(`@charset "UTF-8";
|
|
|
2946
3064
|
line-height: 1;
|
|
2947
3065
|
}
|
|
2948
3066
|
|
|
2949
|
-
.scheduler-
|
|
2950
|
-
|
|
3067
|
+
.scheduler-row-menu-button:hover {
|
|
3068
|
+
filter: brightness(0.92);
|
|
2951
3069
|
}
|
|
2952
3070
|
|
|
2953
|
-
.scheduler-
|
|
3071
|
+
.scheduler-row-menu-button .action-glyph {
|
|
2954
3072
|
font-size: 14px;
|
|
2955
3073
|
pointer-events: none;
|
|
2956
3074
|
}
|
|
2957
3075
|
|
|
2958
|
-
.scheduler-
|
|
2959
|
-
|
|
2960
|
-
|
|
3076
|
+
/* Row-actions dialog. Like .scheduler-day-popover, the OverlayController writes
|
|
3077
|
+
\`position: fixed\` coordinates, so this must stay a top-level child of the
|
|
3078
|
+
shadow root — nothing above it may introduce transform/filter/contain, which
|
|
3079
|
+
would become its containing block and shift the panel. It is also OUTSIDE the
|
|
3080
|
+
grid on purpose: a dialog owned by a rowheader breaks the grid's
|
|
3081
|
+
owned-children contract. */
|
|
3082
|
+
.scheduler-row-panel {
|
|
3083
|
+
position: fixed;
|
|
3084
|
+
z-index: 21;
|
|
3085
|
+
min-width: 200px;
|
|
3086
|
+
max-width: min(280px, 90vw);
|
|
3087
|
+
padding: 4px;
|
|
3088
|
+
display: flex;
|
|
3089
|
+
flex-direction: column;
|
|
3090
|
+
gap: 2px;
|
|
3091
|
+
border: 1px solid var(--scheduler-border-color);
|
|
3092
|
+
border-radius: 6px;
|
|
3093
|
+
background: var(--bs-body-bg, #fff);
|
|
3094
|
+
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
|
|
3095
|
+
}
|
|
3096
|
+
|
|
3097
|
+
.scheduler-row-panel .row-action {
|
|
3098
|
+
display: flex;
|
|
3099
|
+
align-items: center;
|
|
3100
|
+
justify-content: space-between;
|
|
3101
|
+
gap: 8px;
|
|
3102
|
+
/* 32px, comfortably over the 24px minimum: these are the primary targets on a
|
|
3103
|
+
phone now, not a secondary affordance. */
|
|
3104
|
+
min-height: 32px;
|
|
3105
|
+
padding: 4px 8px;
|
|
3106
|
+
border: 1px solid transparent;
|
|
3107
|
+
border-radius: 4px;
|
|
3108
|
+
background: transparent;
|
|
3109
|
+
color: inherit;
|
|
3110
|
+
font: inherit;
|
|
3111
|
+
font-size: 13px;
|
|
3112
|
+
text-align: start;
|
|
3113
|
+
cursor: pointer;
|
|
3114
|
+
}
|
|
3115
|
+
|
|
3116
|
+
.scheduler-row-panel .row-action:hover {
|
|
3117
|
+
background: var(--bs-secondary-bg, rgba(0, 0, 0, 0.08));
|
|
3118
|
+
}
|
|
3119
|
+
|
|
3120
|
+
.scheduler-row-panel .row-action.is-destructive {
|
|
3121
|
+
color: var(--bs-danger, #dc3545);
|
|
3122
|
+
}
|
|
3123
|
+
|
|
3124
|
+
.scheduler-row-panel .row-color-input {
|
|
3125
|
+
/* A native colour input is ~44px wide by default. It stays native: the
|
|
3126
|
+
platform gives it keyboard operation, localization and an accessible name
|
|
3127
|
+
for free, and a dialog (unlike a menu) may legally own a form control. */
|
|
3128
|
+
width: 40px;
|
|
2961
3129
|
height: 24px;
|
|
2962
3130
|
padding: 0;
|
|
2963
3131
|
border: 1px solid var(--scheduler-border-color);
|
|
@@ -3000,12 +3168,25 @@ const xe = J(`@charset "UTF-8";
|
|
|
3000
3168
|
background: var(--bs-secondary-bg, rgba(0, 0, 0, 0.08));
|
|
3001
3169
|
}
|
|
3002
3170
|
|
|
3171
|
+
/* Narrow mode stacks the two creation buttons instead of leaving them to wrap.
|
|
3172
|
+
\`flex-wrap: wrap\` only broke the row when the strings happened not to fit —
|
|
3173
|
+
an accident of font metrics that stopped working the moment the column
|
|
3174
|
+
narrowed or the labels were translated shorter. The signal is the same
|
|
3175
|
+
ResizeObserver that drives the header ([data-narrow] on .scheduler-container),
|
|
3176
|
+
keyed off COMPONENT width because the scheduler can sit in a dock pane far
|
|
3177
|
+
narrower than the viewport. */
|
|
3178
|
+
.scheduler-container[data-narrow] .scheduler-timeline-addbar {
|
|
3179
|
+
flex-direction: column;
|
|
3180
|
+
align-items: stretch;
|
|
3181
|
+
}
|
|
3182
|
+
|
|
3003
3183
|
/* One focus ring for every control in the resource column. \`.expand-toggle\` had
|
|
3004
3184
|
none at all — Bootstrap's focus-ring utilities do not cross the shadow
|
|
3005
3185
|
boundary, so a keyboard user tabbing onto it saw nothing. */
|
|
3006
3186
|
.scheduler-resource-cell .expand-toggle:focus-visible,
|
|
3007
|
-
.scheduler-
|
|
3008
|
-
.scheduler-
|
|
3187
|
+
.scheduler-row-menu-button:focus-visible,
|
|
3188
|
+
.scheduler-row-panel .row-action:focus-visible,
|
|
3189
|
+
.scheduler-row-panel .row-color-input:focus-visible,
|
|
3009
3190
|
.scheduler-add-button:focus-visible {
|
|
3010
3191
|
outline: 2px solid var(--bs-primary);
|
|
3011
3192
|
outline-offset: 1px;
|
|
@@ -3228,161 +3409,14 @@ const xe = J(`@charset "UTF-8";
|
|
|
3228
3409
|
animation: none !important;
|
|
3229
3410
|
transition: none !important;
|
|
3230
3411
|
}
|
|
3231
|
-
}`),
|
|
3232
|
-
display: block;
|
|
3233
|
-
width: 100%;
|
|
3234
|
-
padding: 0.375rem 0.75rem;
|
|
3235
|
-
font-size: 1rem;
|
|
3236
|
-
font-weight: 400;
|
|
3237
|
-
line-height: 1.5;
|
|
3238
|
-
color: var(--bs-body-color);
|
|
3239
|
-
appearance: none;
|
|
3240
|
-
background-color: var(--bs-body-bg);
|
|
3241
|
-
background-clip: padding-box;
|
|
3242
|
-
border: var(--bs-border-width) solid var(--bs-border-color);
|
|
3243
|
-
border-radius: var(--bs-border-radius);
|
|
3244
|
-
transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
|
|
3245
|
-
}
|
|
3246
|
-
@media (prefers-reduced-motion: reduce) {
|
|
3247
|
-
.form-control {
|
|
3248
|
-
transition: none;
|
|
3249
|
-
}
|
|
3250
|
-
}
|
|
3251
|
-
.form-control[type=file] {
|
|
3252
|
-
overflow: hidden;
|
|
3253
|
-
}
|
|
3254
|
-
.form-control[type=file]:not(:disabled):not([readonly]) {
|
|
3255
|
-
cursor: pointer;
|
|
3256
|
-
}
|
|
3257
|
-
.form-control:focus {
|
|
3258
|
-
color: var(--bs-body-color);
|
|
3259
|
-
background-color: var(--bs-body-bg);
|
|
3260
|
-
border-color: rgb(134, 182.5, 254);
|
|
3261
|
-
outline: 0;
|
|
3262
|
-
box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
|
|
3263
|
-
}
|
|
3264
|
-
.form-control::-webkit-date-and-time-value {
|
|
3265
|
-
min-width: 85px;
|
|
3266
|
-
height: 1.5em;
|
|
3267
|
-
margin: 0;
|
|
3268
|
-
}
|
|
3269
|
-
.form-control::-webkit-datetime-edit {
|
|
3270
|
-
display: block;
|
|
3271
|
-
padding: 0;
|
|
3272
|
-
}
|
|
3273
|
-
.form-control::placeholder {
|
|
3274
|
-
color: var(--bs-secondary-color);
|
|
3275
|
-
opacity: 1;
|
|
3276
|
-
}
|
|
3277
|
-
.form-control:disabled {
|
|
3278
|
-
background-color: var(--bs-secondary-bg);
|
|
3279
|
-
opacity: 1;
|
|
3280
|
-
}
|
|
3281
|
-
.form-control::file-selector-button {
|
|
3282
|
-
padding: 0.375rem 0.75rem;
|
|
3283
|
-
margin: -0.375rem -0.75rem;
|
|
3284
|
-
margin-inline-end: 0.75rem;
|
|
3285
|
-
color: var(--bs-body-color);
|
|
3286
|
-
background-color: var(--bs-tertiary-bg);
|
|
3287
|
-
pointer-events: none;
|
|
3288
|
-
border-color: inherit;
|
|
3289
|
-
border-style: solid;
|
|
3290
|
-
border-width: 0;
|
|
3291
|
-
border-inline-end-width: var(--bs-border-width);
|
|
3292
|
-
border-radius: 0;
|
|
3293
|
-
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;
|
|
3294
|
-
}
|
|
3295
|
-
@media (prefers-reduced-motion: reduce) {
|
|
3296
|
-
.form-control::file-selector-button {
|
|
3297
|
-
transition: none;
|
|
3298
|
-
}
|
|
3299
|
-
}
|
|
3300
|
-
.form-control:hover:not(:disabled):not([readonly])::file-selector-button {
|
|
3301
|
-
background-color: var(--bs-secondary-bg);
|
|
3302
|
-
}
|
|
3303
|
-
|
|
3304
|
-
.form-control-plaintext {
|
|
3305
|
-
display: block;
|
|
3306
|
-
width: 100%;
|
|
3307
|
-
padding: 0.375rem 0;
|
|
3308
|
-
margin-bottom: 0;
|
|
3309
|
-
line-height: 1.5;
|
|
3310
|
-
color: var(--bs-body-color);
|
|
3311
|
-
background-color: transparent;
|
|
3312
|
-
border: solid transparent;
|
|
3313
|
-
border-width: var(--bs-border-width) 0;
|
|
3314
|
-
}
|
|
3315
|
-
.form-control-plaintext:focus {
|
|
3316
|
-
outline: 0;
|
|
3317
|
-
}
|
|
3318
|
-
.form-control-plaintext.form-control-sm, .form-control-plaintext.form-control-lg {
|
|
3319
|
-
padding-right: 0;
|
|
3320
|
-
padding-left: 0;
|
|
3321
|
-
}
|
|
3322
|
-
|
|
3323
|
-
.form-control-sm {
|
|
3324
|
-
min-height: calc(1.5em + 0.5rem + calc(var(--bs-border-width) * 2));
|
|
3325
|
-
padding: 0.25rem 0.5rem;
|
|
3326
|
-
font-size: 0.875rem;
|
|
3327
|
-
border-radius: var(--bs-border-radius-sm);
|
|
3328
|
-
}
|
|
3329
|
-
.form-control-sm::file-selector-button {
|
|
3330
|
-
padding: 0.25rem 0.5rem;
|
|
3331
|
-
margin: -0.25rem -0.5rem;
|
|
3332
|
-
margin-inline-end: 0.5rem;
|
|
3333
|
-
}
|
|
3334
|
-
|
|
3335
|
-
.form-control-lg {
|
|
3336
|
-
min-height: calc(1.5em + 1rem + calc(var(--bs-border-width) * 2));
|
|
3337
|
-
padding: 0.5rem 1rem;
|
|
3338
|
-
font-size: 1.25rem;
|
|
3339
|
-
border-radius: var(--bs-border-radius-lg);
|
|
3340
|
-
}
|
|
3341
|
-
.form-control-lg::file-selector-button {
|
|
3342
|
-
padding: 0.5rem 1rem;
|
|
3343
|
-
margin: -0.5rem -1rem;
|
|
3344
|
-
margin-inline-end: 1rem;
|
|
3345
|
-
}
|
|
3346
|
-
|
|
3347
|
-
textarea.form-control {
|
|
3348
|
-
min-height: calc(1.5em + 0.75rem + calc(var(--bs-border-width) * 2));
|
|
3349
|
-
}
|
|
3350
|
-
textarea.form-control-sm {
|
|
3351
|
-
min-height: calc(1.5em + 0.5rem + calc(var(--bs-border-width) * 2));
|
|
3352
|
-
}
|
|
3353
|
-
textarea.form-control-lg {
|
|
3354
|
-
min-height: calc(1.5em + 1rem + calc(var(--bs-border-width) * 2));
|
|
3355
|
-
}
|
|
3356
|
-
|
|
3357
|
-
.form-control-color {
|
|
3358
|
-
width: 3rem;
|
|
3359
|
-
height: calc(1.5em + 0.75rem + calc(var(--bs-border-width) * 2));
|
|
3360
|
-
padding: 0.375rem;
|
|
3361
|
-
}
|
|
3362
|
-
.form-control-color:not(:disabled):not([readonly]) {
|
|
3363
|
-
cursor: pointer;
|
|
3364
|
-
}
|
|
3365
|
-
.form-control-color::-moz-color-swatch {
|
|
3366
|
-
border: 0 !important;
|
|
3367
|
-
border-radius: var(--bs-border-radius);
|
|
3368
|
-
}
|
|
3369
|
-
.form-control-color::-webkit-color-swatch {
|
|
3370
|
-
border: 0 !important;
|
|
3371
|
-
border-radius: var(--bs-border-radius);
|
|
3372
|
-
}
|
|
3373
|
-
.form-control-color.form-control-sm {
|
|
3374
|
-
height: calc(1.5em + 0.5rem + calc(var(--bs-border-width) * 2));
|
|
3375
|
-
}
|
|
3376
|
-
.form-control-color.form-control-lg {
|
|
3377
|
-
height: calc(1.5em + 1rem + calc(var(--bs-border-width) * 2));
|
|
3378
|
-
}`), _ = {
|
|
3412
|
+
}`), J = {
|
|
3379
3413
|
dragThreshold: 5,
|
|
3380
3414
|
minDurationMs: 1800 * 1e3
|
|
3381
3415
|
// 30 minutes
|
|
3382
3416
|
};
|
|
3383
|
-
class
|
|
3417
|
+
class Pe {
|
|
3384
3418
|
constructor(e = {}) {
|
|
3385
|
-
this.config = { ...
|
|
3419
|
+
this.config = { ...J, ...e };
|
|
3386
3420
|
}
|
|
3387
3421
|
/**
|
|
3388
3422
|
* Calculate the preview event position based on drag state.
|
|
@@ -3393,16 +3427,16 @@ class Se {
|
|
|
3393
3427
|
* @param originalEvent - The original event being moved/resized (null for create)
|
|
3394
3428
|
* @returns The preview event with new start/end, or null if invalid
|
|
3395
3429
|
*/
|
|
3396
|
-
calculatePreview(e, t, s,
|
|
3430
|
+
calculatePreview(e, t, s, n) {
|
|
3397
3431
|
switch (e) {
|
|
3398
3432
|
case "create":
|
|
3399
3433
|
return this.calculateCreatePreview(t, s);
|
|
3400
3434
|
case "move":
|
|
3401
|
-
return
|
|
3435
|
+
return n ? this.calculateMovePreview(t, s, n) : null;
|
|
3402
3436
|
case "resize-start":
|
|
3403
|
-
return
|
|
3437
|
+
return n ? this.calculateResizeStartPreview(s, n) : null;
|
|
3404
3438
|
case "resize-end":
|
|
3405
|
-
return
|
|
3439
|
+
return n ? this.calculateResizeEndPreview(s, n) : null;
|
|
3406
3440
|
default:
|
|
3407
3441
|
return null;
|
|
3408
3442
|
}
|
|
@@ -3414,12 +3448,12 @@ class Se {
|
|
|
3414
3448
|
calculateCreatePreview(e, t) {
|
|
3415
3449
|
const s = new Date(
|
|
3416
3450
|
Math.min(e.start.getTime(), t.start.getTime())
|
|
3417
|
-
),
|
|
3451
|
+
), n = new Date(
|
|
3418
3452
|
Math.max(e.end.getTime(), t.end.getTime())
|
|
3419
3453
|
);
|
|
3420
3454
|
return {
|
|
3421
3455
|
start: s,
|
|
3422
|
-
end:
|
|
3456
|
+
end: n,
|
|
3423
3457
|
...e.resourceId !== void 0 ? { resourceId: e.resourceId } : {}
|
|
3424
3458
|
};
|
|
3425
3459
|
}
|
|
@@ -3428,9 +3462,9 @@ class Se {
|
|
|
3428
3462
|
* Preserves event duration, applies offset from drag start.
|
|
3429
3463
|
*/
|
|
3430
3464
|
calculateMovePreview(e, t, s) {
|
|
3431
|
-
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;
|
|
3432
3466
|
return {
|
|
3433
|
-
start:
|
|
3467
|
+
start: r,
|
|
3434
3468
|
end: o,
|
|
3435
3469
|
...a !== void 0 ? { resourceId: a } : {}
|
|
3436
3470
|
};
|
|
@@ -3452,13 +3486,13 @@ class Se {
|
|
|
3452
3486
|
* Enforces minimum duration.
|
|
3453
3487
|
*/
|
|
3454
3488
|
calculateResizeEndPreview(e, t) {
|
|
3455
|
-
const s = t.start.getTime() + this.config.minDurationMs,
|
|
3489
|
+
const s = t.start.getTime() + this.config.minDurationMs, n = new Date(
|
|
3456
3490
|
Math.max(e.end.getTime(), s)
|
|
3457
3491
|
);
|
|
3458
|
-
return { start: t.start, end:
|
|
3492
|
+
return { start: t.start, end: n };
|
|
3459
3493
|
}
|
|
3460
3494
|
}
|
|
3461
|
-
function
|
|
3495
|
+
function B(p) {
|
|
3462
3496
|
return {
|
|
3463
3497
|
pointerId: 0,
|
|
3464
3498
|
pointerType: "mouse",
|
|
@@ -3469,7 +3503,7 @@ function O(p) {
|
|
|
3469
3503
|
isPrimary: !0
|
|
3470
3504
|
};
|
|
3471
3505
|
}
|
|
3472
|
-
function
|
|
3506
|
+
function Y(p) {
|
|
3473
3507
|
const e = p.touches[0] || p.changedTouches[0];
|
|
3474
3508
|
return e ? {
|
|
3475
3509
|
pointerId: e.identifier,
|
|
@@ -3481,13 +3515,13 @@ function q(p) {
|
|
|
3481
3515
|
isPrimary: e.identifier === 0
|
|
3482
3516
|
} : null;
|
|
3483
3517
|
}
|
|
3484
|
-
function
|
|
3518
|
+
function de(p, e) {
|
|
3485
3519
|
const t = e.x - p.x, s = e.y - p.y;
|
|
3486
3520
|
return Math.sqrt(t * t + s * s);
|
|
3487
3521
|
}
|
|
3488
|
-
class
|
|
3522
|
+
class Fe {
|
|
3489
3523
|
constructor(e = {}) {
|
|
3490
|
-
this.state = { phase: "idle" }, this.config = { ...
|
|
3524
|
+
this.state = { phase: "idle" }, this.config = { ...J, ...e }, this.previewCalculator = new Pe(this.config);
|
|
3491
3525
|
}
|
|
3492
3526
|
/**
|
|
3493
3527
|
* Get current state (read-only).
|
|
@@ -3580,14 +3614,14 @@ class Ce {
|
|
|
3580
3614
|
transitionFromIdle(e) {
|
|
3581
3615
|
if (e.type !== "POINTER_DOWN")
|
|
3582
3616
|
return this.state;
|
|
3583
|
-
const { target: t, position: s, slot:
|
|
3617
|
+
const { target: t, position: s, slot: n, slotElement: i, immediate: r } = e, o = this.getOperationType(t);
|
|
3584
3618
|
if (!o)
|
|
3585
3619
|
return this.state;
|
|
3586
3620
|
const a = t.event ?? null;
|
|
3587
3621
|
if (a && a.draggable === !1)
|
|
3588
3622
|
return this.state;
|
|
3589
|
-
if (
|
|
3590
|
-
let l =
|
|
3623
|
+
if (r) {
|
|
3624
|
+
let l = n;
|
|
3591
3625
|
if (!l && a && (l = {
|
|
3592
3626
|
start: a.start,
|
|
3593
3627
|
end: a.end
|
|
@@ -3615,8 +3649,8 @@ class Ce {
|
|
|
3615
3649
|
operationType: o,
|
|
3616
3650
|
event: a,
|
|
3617
3651
|
startPosition: s,
|
|
3618
|
-
startSlot:
|
|
3619
|
-
slotElement:
|
|
3652
|
+
startSlot: n,
|
|
3653
|
+
slotElement: i
|
|
3620
3654
|
};
|
|
3621
3655
|
}
|
|
3622
3656
|
/**
|
|
@@ -3626,7 +3660,7 @@ class Ce {
|
|
|
3626
3660
|
if (this.state.phase !== "pending") return this.state;
|
|
3627
3661
|
switch (e.type) {
|
|
3628
3662
|
case "POINTER_MOVE":
|
|
3629
|
-
return
|
|
3663
|
+
return de(
|
|
3630
3664
|
this.state.startPosition,
|
|
3631
3665
|
e.position
|
|
3632
3666
|
) < this.config.dragThreshold ? this.state : this.activateDrag(e.slot);
|
|
@@ -3700,19 +3734,19 @@ class Ce {
|
|
|
3700
3734
|
const t = this.state.startSlot ?? e;
|
|
3701
3735
|
if (!t)
|
|
3702
3736
|
return { phase: "idle" };
|
|
3703
|
-
const s = e ?? t,
|
|
3737
|
+
const s = e ?? t, n = this.previewCalculator.calculatePreview(
|
|
3704
3738
|
this.state.operationType,
|
|
3705
3739
|
t,
|
|
3706
3740
|
s,
|
|
3707
3741
|
this.state.event
|
|
3708
3742
|
);
|
|
3709
|
-
return
|
|
3743
|
+
return n ? {
|
|
3710
3744
|
phase: "active",
|
|
3711
3745
|
operationType: this.state.operationType,
|
|
3712
3746
|
event: this.state.event,
|
|
3713
3747
|
startSlot: t,
|
|
3714
3748
|
currentSlot: s,
|
|
3715
|
-
preview:
|
|
3749
|
+
preview: n,
|
|
3716
3750
|
originalEvent: this.state.event ?? void 0
|
|
3717
3751
|
} : { phase: "idle" };
|
|
3718
3752
|
}
|
|
@@ -3744,9 +3778,9 @@ class Ce {
|
|
|
3744
3778
|
} : { start: /* @__PURE__ */ new Date(), end: /* @__PURE__ */ new Date() };
|
|
3745
3779
|
}
|
|
3746
3780
|
}
|
|
3747
|
-
class
|
|
3781
|
+
class Le {
|
|
3748
3782
|
constructor(e, t = {}) {
|
|
3749
|
-
this.pendingUpdate = null, this.latestPointer = null, this.getSlotAtPosition = null, this.stateManager = e, this.config = { ...
|
|
3783
|
+
this.pendingUpdate = null, this.latestPointer = null, this.getSlotAtPosition = null, this.stateManager = e, this.config = { ...J, ...t }, this.stateMachine = new Fe(this.config);
|
|
3750
3784
|
}
|
|
3751
3785
|
/**
|
|
3752
3786
|
* Set the function used to get a slot at a position.
|
|
@@ -3760,12 +3794,12 @@ class ke {
|
|
|
3760
3794
|
* @param immediate If true, skip pending state (for touch-initiated drags)
|
|
3761
3795
|
*/
|
|
3762
3796
|
handlePointerDown(e, t, s = !1) {
|
|
3763
|
-
const
|
|
3797
|
+
const n = this.getSlotAtPosition?.(e.clientX, e.clientY) ?? null;
|
|
3764
3798
|
this.stateMachine.send({
|
|
3765
3799
|
type: "POINTER_DOWN",
|
|
3766
3800
|
target: t,
|
|
3767
3801
|
position: { x: e.clientX, y: e.clientY },
|
|
3768
|
-
slot:
|
|
3802
|
+
slot: n,
|
|
3769
3803
|
slotElement: t.slotElement,
|
|
3770
3804
|
immediate: s
|
|
3771
3805
|
}), this.stateMachine.isActive() && this.syncToStateManager();
|
|
@@ -3837,7 +3871,7 @@ class ke {
|
|
|
3837
3871
|
*/
|
|
3838
3872
|
createEventFromResult(e) {
|
|
3839
3873
|
return {
|
|
3840
|
-
id:
|
|
3874
|
+
id: fe(),
|
|
3841
3875
|
title: "New Event",
|
|
3842
3876
|
start: e.preview.start,
|
|
3843
3877
|
end: e.preview.end,
|
|
@@ -3890,10 +3924,20 @@ class ke {
|
|
|
3890
3924
|
this.pendingUpdate !== null && (cancelAnimationFrame(this.pendingUpdate), this.pendingUpdate = null), this.latestPointer = null;
|
|
3891
3925
|
}
|
|
3892
3926
|
}
|
|
3893
|
-
const
|
|
3894
|
-
class
|
|
3927
|
+
const ze = 600, $e = 10;
|
|
3928
|
+
class He {
|
|
3895
3929
|
constructor(e, t) {
|
|
3896
|
-
this.touchHoldTimer = null, this.touchStartPosition = null, this.isTouchDragMode = !1, this.touchHoldTarget = null, this.touchHoldPointer = null, this.isPanMode = !1, this.panStartPosition = null, this.panStartScroll = null, this.panStartedOnEvent = !1, this.savedBodyStyles = null, this.config = e, this.callbacks = t, this.boundHandleMouseDown = this.handleMouseDown.bind(this), this.boundHandleMouseMove = this.handleMouseMove.bind(this), this.boundHandleMouseUp = this.handleMouseUp.bind(this), this.boundHandleClick = this.handleClick.bind(this), this.boundHandleDblClick = this.handleDblClick.bind(this), this.boundHandleTouchStart = this.handleTouchStart.bind(this), this.boundHandleTouchMove = this.handleTouchMove.bind(this), this.boundHandleTouchEnd = this.handleTouchEnd.bind(this), this.boundHandleTouchCancel = this.handleTouchCancel.bind(this);
|
|
3930
|
+
this.lastPointerType = "mouse", this.touchHoldTimer = null, this.touchStartPosition = null, this.isTouchDragMode = !1, this.touchHoldTarget = null, this.touchHoldPointer = null, this.isPanMode = !1, this.panStartPosition = null, this.panStartScroll = null, this.panStartedOnEvent = !1, this.savedBodyStyles = null, this.config = e, this.callbacks = t, this.boundHandleMouseDown = this.handleMouseDown.bind(this), this.boundHandleMouseMove = this.handleMouseMove.bind(this), this.boundHandleMouseUp = this.handleMouseUp.bind(this), this.boundHandleClick = this.handleClick.bind(this), this.boundHandleDblClick = this.handleDblClick.bind(this), this.boundHandleTouchStart = this.handleTouchStart.bind(this), this.boundHandleTouchMove = this.handleTouchMove.bind(this), this.boundHandleTouchEnd = this.handleTouchEnd.bind(this), this.boundHandleTouchCancel = this.handleTouchCancel.bind(this);
|
|
3931
|
+
}
|
|
3932
|
+
/**
|
|
3933
|
+
* True when the gesture in progress came from a finger.
|
|
3934
|
+
*
|
|
3935
|
+
* The caller is `contextmenu` arbitration: on touch the browser fires that
|
|
3936
|
+
* event ~100ms before our 600ms hold arms, so acting on it would make
|
|
3937
|
+
* hold-to-drag unreachable.
|
|
3938
|
+
*/
|
|
3939
|
+
isTouchGesture() {
|
|
3940
|
+
return this.lastPointerType === "touch";
|
|
3897
3941
|
}
|
|
3898
3942
|
/**
|
|
3899
3943
|
* Attach all event listeners.
|
|
@@ -3925,9 +3969,9 @@ class Ie {
|
|
|
3925
3969
|
analyzeTarget(e) {
|
|
3926
3970
|
const t = e.closest(".resize-handle");
|
|
3927
3971
|
if (t) {
|
|
3928
|
-
const
|
|
3972
|
+
const r = t.closest(
|
|
3929
3973
|
".scheduler-event, .scheduler-timeline-event"
|
|
3930
|
-
)?.dataset.eventId, o =
|
|
3974
|
+
)?.dataset.eventId, o = r ? this.config.getEventById(r) : null;
|
|
3931
3975
|
if (o)
|
|
3932
3976
|
return {
|
|
3933
3977
|
type: "resize-handle",
|
|
@@ -3939,80 +3983,80 @@ class Ie {
|
|
|
3939
3983
|
".scheduler-event:not(.preview), .scheduler-timeline-event:not(.preview)"
|
|
3940
3984
|
);
|
|
3941
3985
|
if (s) {
|
|
3942
|
-
const
|
|
3943
|
-
if (
|
|
3944
|
-
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 };
|
|
3945
3989
|
}
|
|
3946
|
-
const
|
|
3990
|
+
const n = e.closest(
|
|
3947
3991
|
".scheduler-time-slot, .scheduler-timeline-slot"
|
|
3948
3992
|
);
|
|
3949
|
-
return
|
|
3993
|
+
return n ? { type: "slot", slotElement: n } : { type: "none" };
|
|
3950
3994
|
}
|
|
3951
3995
|
// Mouse event handlers
|
|
3952
3996
|
handleMouseDown(e) {
|
|
3953
|
-
if (!this.config.isEditable()) return;
|
|
3954
|
-
const t =
|
|
3997
|
+
if (this.lastPointerType = "mouse", !this.config.isEditable()) return;
|
|
3998
|
+
const t = B(e), s = this.analyzeTarget(t.target);
|
|
3955
3999
|
s.type !== "none" && (s.type === "slot" && !this.config.isSelectable() || (e.preventDefault(), this.callbacks.onPointerDown(t, s)));
|
|
3956
4000
|
}
|
|
3957
4001
|
handleMouseMove(e) {
|
|
3958
|
-
const t =
|
|
4002
|
+
const t = B(e);
|
|
3959
4003
|
this.callbacks.onPointerMove(t);
|
|
3960
4004
|
}
|
|
3961
4005
|
handleMouseUp(e) {
|
|
3962
|
-
const t =
|
|
4006
|
+
const t = B(e);
|
|
3963
4007
|
this.callbacks.onPointerUp(t);
|
|
3964
4008
|
}
|
|
3965
4009
|
handleClick(e) {
|
|
3966
|
-
const t =
|
|
4010
|
+
const t = B(e), s = this.analyzeTarget(t.target);
|
|
3967
4011
|
s.type === "event" || s.type === "resize-handle" || this.callbacks.onClick(t, s);
|
|
3968
4012
|
}
|
|
3969
4013
|
handleDblClick(e) {
|
|
3970
|
-
const t =
|
|
4014
|
+
const t = B(e), s = this.analyzeTarget(t.target);
|
|
3971
4015
|
this.callbacks.onDoubleClick(t, s);
|
|
3972
4016
|
}
|
|
3973
4017
|
// Touch event handlers
|
|
3974
4018
|
handleTouchStart(e) {
|
|
3975
|
-
if (!this.config.isEditable()) return;
|
|
4019
|
+
if (this.lastPointerType = "touch", !this.config.isEditable()) return;
|
|
3976
4020
|
if (e.touches.length !== 1) {
|
|
3977
4021
|
this.cancelTouchHold();
|
|
3978
4022
|
return;
|
|
3979
4023
|
}
|
|
3980
|
-
const t =
|
|
4024
|
+
const t = Y(e);
|
|
3981
4025
|
if (!t) return;
|
|
3982
4026
|
const s = this.analyzeTarget(t.target);
|
|
3983
4027
|
if (s.type === "none" || s.type === "slot" && !this.config.isSelectable()) return;
|
|
3984
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";
|
|
3985
|
-
const
|
|
3986
|
-
if (
|
|
3987
|
-
|
|
3988
|
-
}, { passive: !1 }),
|
|
3989
|
-
|
|
3990
|
-
}),
|
|
3991
|
-
|
|
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);
|
|
3992
4036
|
}), s.type === "resize-handle" && s.event && this.config.isEventSelected?.(s.event.id)) {
|
|
3993
4037
|
this.activateTouchDragMode(t, s);
|
|
3994
4038
|
return;
|
|
3995
4039
|
}
|
|
3996
4040
|
this.addTouchFeedback(t.target, "pending");
|
|
3997
|
-
const
|
|
4041
|
+
const r = this.config.touchHoldDuration ?? ze;
|
|
3998
4042
|
this.touchHoldTimer = setTimeout(() => {
|
|
3999
4043
|
this.activateTouchDragMode(t, s);
|
|
4000
|
-
},
|
|
4044
|
+
}, r);
|
|
4001
4045
|
}
|
|
4002
4046
|
handleTouchMove(e) {
|
|
4003
4047
|
if (e.touches.length !== 1) {
|
|
4004
4048
|
this.cancelTouchHold(), this.exitPanMode();
|
|
4005
4049
|
return;
|
|
4006
4050
|
}
|
|
4007
|
-
const t =
|
|
4051
|
+
const t = Y(e);
|
|
4008
4052
|
if (t) {
|
|
4009
4053
|
if (this.isPanMode) {
|
|
4010
4054
|
e.preventDefault(), this.performPan(t.clientX, t.clientY);
|
|
4011
4055
|
return;
|
|
4012
4056
|
}
|
|
4013
4057
|
if (this.touchHoldTimer && this.touchStartPosition) {
|
|
4014
|
-
const s = this.config.touchMoveThreshold ??
|
|
4015
|
-
if (
|
|
4058
|
+
const s = this.config.touchMoveThreshold ?? $e;
|
|
4059
|
+
if (de(this.touchStartPosition, {
|
|
4016
4060
|
x: t.clientX,
|
|
4017
4061
|
y: t.clientY
|
|
4018
4062
|
}) > s) {
|
|
@@ -4026,7 +4070,7 @@ class Ie {
|
|
|
4026
4070
|
}
|
|
4027
4071
|
}
|
|
4028
4072
|
handleTouchEnd(e) {
|
|
4029
|
-
const t =
|
|
4073
|
+
const t = Y(e);
|
|
4030
4074
|
if (this.isPanMode) {
|
|
4031
4075
|
this.exitPanMode();
|
|
4032
4076
|
return;
|
|
@@ -4054,7 +4098,12 @@ class Ie {
|
|
|
4054
4098
|
}
|
|
4055
4099
|
// Touch helpers
|
|
4056
4100
|
activateTouchDragMode(e, t) {
|
|
4057
|
-
this.touchHoldTimer = null, this.touchStartPosition = null, this.triggerHapticFeedback(), this.isTouchDragMode = !0, this.touchHoldTarget?.closest(".scheduler-event") || (document.addEventListener("touchmove", this.boundHandleTouchMove, { passive: !1 }), document.addEventListener("touchend", this.boundHandleTouchEnd), document.addEventListener("touchcancel", this.boundHandleTouchCancel)), this.touchHoldTarget && (this.removeTouchFeedback(this.touchHoldTarget, "pending"), this.addTouchFeedback(this.touchHoldTarget, "active")), this.config.shadowRoot.querySelector(".scheduler-container")?.classList.add("touch-drag-mode"), this.applyScrollBlock(),
|
|
4101
|
+
if (this.touchHoldTimer = null, this.touchStartPosition = null, this.triggerHapticFeedback(), this.isTouchDragMode = !0, this.touchHoldTarget?.closest(".scheduler-event") || (document.addEventListener("touchmove", this.boundHandleTouchMove, { passive: !1 }), document.addEventListener("touchend", this.boundHandleTouchEnd), document.addEventListener("touchcancel", this.boundHandleTouchCancel)), this.touchHoldTarget && (this.removeTouchFeedback(this.touchHoldTarget, "pending"), this.addTouchFeedback(this.touchHoldTarget, "active")), this.config.shadowRoot.querySelector(".scheduler-container")?.classList.add("touch-drag-mode"), this.applyScrollBlock(), typeof navigator < "u" && typeof navigator.vibrate == "function")
|
|
4102
|
+
try {
|
|
4103
|
+
navigator.vibrate(10);
|
|
4104
|
+
} catch {
|
|
4105
|
+
}
|
|
4106
|
+
this.callbacks.onTouchDragActivated?.(), this.callbacks.onPointerDown(e, t, !0);
|
|
4058
4107
|
}
|
|
4059
4108
|
cancelTouchHold() {
|
|
4060
4109
|
this.touchHoldTimer && (clearTimeout(this.touchHoldTimer), this.touchHoldTimer = null), document.removeEventListener("touchmove", this.boundHandleTouchMove), document.removeEventListener("touchend", this.boundHandleTouchEnd), document.removeEventListener("touchcancel", this.boundHandleTouchCancel), this.touchHoldTarget && (this.removeTouchFeedback(this.touchHoldTarget, "pending"), this.removeTouchFeedback(this.touchHoldTarget, "active"));
|
|
@@ -4089,8 +4138,8 @@ class Ie {
|
|
|
4089
4138
|
if (!this.isPanMode || !this.panStartPosition || !this.panStartScroll) return;
|
|
4090
4139
|
const s = this.callbacks.getScrollContainer?.();
|
|
4091
4140
|
if (!s) return;
|
|
4092
|
-
const
|
|
4093
|
-
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;
|
|
4094
4143
|
}
|
|
4095
4144
|
// Scroll blocking helpers
|
|
4096
4145
|
applyScrollBlock() {
|
|
@@ -4107,7 +4156,7 @@ class Ie {
|
|
|
4107
4156
|
e && e.classList.remove("scroll-blocked");
|
|
4108
4157
|
}
|
|
4109
4158
|
}
|
|
4110
|
-
class
|
|
4159
|
+
class Oe {
|
|
4111
4160
|
constructor(e) {
|
|
4112
4161
|
this.host = e;
|
|
4113
4162
|
}
|
|
@@ -4144,8 +4193,8 @@ class Ae {
|
|
|
4144
4193
|
* the scheduler does not mutate its internal events list — the consumer
|
|
4145
4194
|
* receives the range and decides whether to construct an event from it.
|
|
4146
4195
|
*/
|
|
4147
|
-
emitEventCreate(e, t, s,
|
|
4148
|
-
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 });
|
|
4149
4198
|
}
|
|
4150
4199
|
/**
|
|
4151
4200
|
* Emit an event-update event.
|
|
@@ -4176,8 +4225,8 @@ class Ae {
|
|
|
4176
4225
|
* the time-range selection — either may be null. Fires on every transition
|
|
4177
4226
|
* so consumers can react to the selection clearing without polling.
|
|
4178
4227
|
*/
|
|
4179
|
-
emitSelectionChange(e, t, s,
|
|
4180
|
-
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 });
|
|
4181
4230
|
}
|
|
4182
4231
|
/**
|
|
4183
4232
|
* Emit a `resource-create` or `group-create` *request*. Same controlled
|
|
@@ -4185,10 +4234,10 @@ class Ae {
|
|
|
4185
4234
|
* input, so the consumer decides the id, title and placement. `parentId` is
|
|
4186
4235
|
* the group to insert into — absent means root level.
|
|
4187
4236
|
*/
|
|
4188
|
-
emitResourceCreate(e, t, s,
|
|
4237
|
+
emitResourceCreate(e, t, s, n) {
|
|
4189
4238
|
this.emit({
|
|
4190
4239
|
type: e === "group" ? "group-create" : "resource-create",
|
|
4191
|
-
parentId:
|
|
4240
|
+
parentId: n,
|
|
4192
4241
|
view: t,
|
|
4193
4242
|
originalEvent: s
|
|
4194
4243
|
});
|
|
@@ -4207,10 +4256,10 @@ class Ae {
|
|
|
4207
4256
|
this.emit({ type: "resource-delete", resource: e, originalEvent: t });
|
|
4208
4257
|
}
|
|
4209
4258
|
}
|
|
4210
|
-
let
|
|
4211
|
-
class
|
|
4259
|
+
let Ne = 0;
|
|
4260
|
+
class $ extends he {
|
|
4212
4261
|
constructor() {
|
|
4213
|
-
super(), this.currentView = null, this.currentViewType = null, this.contentContainer = null, this.inputHandler = null, this.previousView = null, this.previousDate = null, this.previousSelectedEventId = null, this.previousRangeKey = "__init__", this.pendingDragUpdate = null, this.latestDragState = null, this.nowIndicatorTimer = null, this.liveAnnouncer = new
|
|
4262
|
+
super(), this.currentView = null, this.currentViewType = null, this.contentContainer = null, this.inputHandler = null, this.previousView = null, this.previousDate = null, this.previousSelectedEventId = null, this.previousRangeKey = "__init__", this.pendingDragUpdate = null, this.latestDragState = null, this.nowIndicatorTimer = null, this.liveAnnouncer = new ue(this), this.popoverDate = null, this.popoverScope = "day", this.popoverAnchorId = null, this.dayPopover = new _(this, {
|
|
4214
4263
|
anchor: () => this.popoverAnchorCell(),
|
|
4215
4264
|
// Same element as the anchor: the day cell IS the trigger. Spelling it out
|
|
4216
4265
|
// means focus returns to the day even when the popover was opened without
|
|
@@ -4231,7 +4280,16 @@ class F extends re {
|
|
|
4231
4280
|
onClose: () => {
|
|
4232
4281
|
this.popoverDate = null, this.popoverAnchorId = null, this.requestUpdate();
|
|
4233
4282
|
}
|
|
4234
|
-
}), this.
|
|
4283
|
+
}), this.rowMenuResourceId = null, this.rowMenuOverlay = new _(this, {
|
|
4284
|
+
anchor: () => this.rowMenuTriggerById(this.rowMenuResourceId),
|
|
4285
|
+
trigger: () => this.rowMenuTriggerById(this.rowMenuResourceId),
|
|
4286
|
+
panel: () => this.shadowRoot?.querySelector(".scheduler-row-panel") ?? null,
|
|
4287
|
+
initialFocus: () => this.shadowRoot?.querySelector(".scheduler-row-panel .row-action") ?? null,
|
|
4288
|
+
modal: !1,
|
|
4289
|
+
onClose: () => {
|
|
4290
|
+
this.rowMenuResourceId = null, this.requestUpdate(), this.syncRowMenuTriggerState();
|
|
4291
|
+
}
|
|
4292
|
+
}), this.editorEventId = null, this.editorError = null, this.editorTitleErrorId = `mp-scheduler-${++Ne}-editor-title-error`, this.eventEditorOverlay = new _(this, {
|
|
4235
4293
|
anchor: () => this.eventElementById(this.editorEventId),
|
|
4236
4294
|
trigger: () => this.eventElementById(this.editorEventId),
|
|
4237
4295
|
panel: () => this.shadowRoot?.querySelector(".scheduler-event-editor") ?? null,
|
|
@@ -4242,10 +4300,10 @@ class F extends re {
|
|
|
4242
4300
|
onClose: () => {
|
|
4243
4301
|
this.editorEventId = null, this.editorError = null, this.editorDraft = null, this.requestUpdate();
|
|
4244
4302
|
}
|
|
4245
|
-
}), this.editorDraft = null, this.headerResizeObserver = null, this.headerIsNarrow = !1, 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));
|
|
4246
4304
|
}
|
|
4247
4305
|
static {
|
|
4248
|
-
this.styles = [
|
|
4306
|
+
this.styles = [ye, be, Re];
|
|
4249
4307
|
}
|
|
4250
4308
|
static get observedAttributes() {
|
|
4251
4309
|
return [
|
|
@@ -4280,10 +4338,8 @@ class F extends re {
|
|
|
4280
4338
|
break;
|
|
4281
4339
|
case "first-day-of-week":
|
|
4282
4340
|
if (s) {
|
|
4283
|
-
const
|
|
4284
|
-
|
|
4285
|
-
firstDayOfWeek: r
|
|
4286
|
-
});
|
|
4341
|
+
const n = parseInt(s, 10);
|
|
4342
|
+
Number.isInteger(n) && n >= 0 && n <= 7 && this.stateManager.setOptions({ firstDayOfWeek: n % 7 });
|
|
4287
4343
|
}
|
|
4288
4344
|
break;
|
|
4289
4345
|
case "slot-duration":
|
|
@@ -4426,9 +4482,27 @@ class F extends re {
|
|
|
4426
4482
|
* Localized string lookup: options.messages overrides merged onto the
|
|
4427
4483
|
* English defaults, with {placeholder} interpolation.
|
|
4428
4484
|
*/
|
|
4485
|
+
/**
|
|
4486
|
+
* Which keymap the grid advertises (audit M6). The keys genuinely differ per
|
|
4487
|
+
* view, so the single global string was not merely vague — it was false: it
|
|
4488
|
+
* promised that Enter creates an event, which in year view opens the month
|
|
4489
|
+
* instead, and it never mentioned Space, the only way to reach the popover
|
|
4490
|
+
* in month or year.
|
|
4491
|
+
*/
|
|
4492
|
+
gridInstructionsKey() {
|
|
4493
|
+
const e = this.can("createEvent") || this.can("selectRange");
|
|
4494
|
+
switch (this.stateManager.getState().view) {
|
|
4495
|
+
case "year":
|
|
4496
|
+
return "gridInstructionsYear";
|
|
4497
|
+
case "month":
|
|
4498
|
+
return e ? "gridInstructionsMonth" : "gridInstructionsMonthReadOnly";
|
|
4499
|
+
default:
|
|
4500
|
+
return e ? "gridInstructions" : "gridInstructionsReadOnly";
|
|
4501
|
+
}
|
|
4502
|
+
}
|
|
4429
4503
|
msg(e, t) {
|
|
4430
|
-
return
|
|
4431
|
-
|
|
4504
|
+
return E(
|
|
4505
|
+
w(this.stateManager.getState().options.messages)[e],
|
|
4432
4506
|
t
|
|
4433
4507
|
);
|
|
4434
4508
|
}
|
|
@@ -4436,13 +4510,13 @@ class F extends re {
|
|
|
4436
4510
|
// Rendering
|
|
4437
4511
|
// ============================================
|
|
4438
4512
|
render() {
|
|
4439
|
-
return
|
|
4513
|
+
return S`
|
|
4440
4514
|
<div class="scheduler-container">
|
|
4441
4515
|
<header class="scheduler-header"></header>
|
|
4442
4516
|
<div class="scheduler-content"></div>
|
|
4443
4517
|
</div>
|
|
4444
4518
|
<div id="scheduler-kbd-grid" class="visually-hidden">
|
|
4445
|
-
${this.msg(this.
|
|
4519
|
+
${this.msg(this.gridInstructionsKey())}
|
|
4446
4520
|
</div>
|
|
4447
4521
|
<div id="scheduler-kbd-event" class="visually-hidden">
|
|
4448
4522
|
${this.msg(
|
|
@@ -4450,6 +4524,7 @@ class F extends re {
|
|
|
4450
4524
|
)}
|
|
4451
4525
|
</div>
|
|
4452
4526
|
${this.renderDayPopover()}
|
|
4527
|
+
${this.renderRowMenu()}
|
|
4453
4528
|
${this.renderEventEditor()}
|
|
4454
4529
|
${this.liveAnnouncer.template()}
|
|
4455
4530
|
`;
|
|
@@ -4469,23 +4544,157 @@ class F extends re {
|
|
|
4469
4544
|
* is `event-selected`, "New event" is `event-create`, "Show day" is the same
|
|
4470
4545
|
* drill the "+N more" link used to do.
|
|
4471
4546
|
*/
|
|
4547
|
+
/**
|
|
4548
|
+
* The open panel's trigger, resolved by id because the timeline rebuilds its
|
|
4549
|
+
* DOM on every state change.
|
|
4550
|
+
*
|
|
4551
|
+
* Matched by reading `dataset` rather than by building an attribute selector:
|
|
4552
|
+
* a resource id is consumer data and may contain quotes or brackets, and
|
|
4553
|
+
* `CSS.escape` is not available everywhere (jsdom has no `CSS` global at all,
|
|
4554
|
+
* which threw here). Scanning a handful of buttons costs nothing.
|
|
4555
|
+
*/
|
|
4556
|
+
rowMenuTriggerById(e) {
|
|
4557
|
+
if (!e) return null;
|
|
4558
|
+
const t = this.shadowRoot?.querySelectorAll(".scheduler-row-menu-button");
|
|
4559
|
+
if (!t) return null;
|
|
4560
|
+
for (const s of t)
|
|
4561
|
+
if (s.dataset.resourceId === e) return s;
|
|
4562
|
+
return null;
|
|
4563
|
+
}
|
|
4564
|
+
/**
|
|
4565
|
+
* `aria-expanded` belongs on the trigger and must change in the same beat as
|
|
4566
|
+
* the visual state. The trigger is imperative DOM (the timeline builds it), so
|
|
4567
|
+
* it cannot ride Lit's render — it is written here and re-asserted after every
|
|
4568
|
+
* rebuild.
|
|
4569
|
+
*/
|
|
4570
|
+
syncRowMenuTriggerState() {
|
|
4571
|
+
this.shadowRoot?.querySelectorAll(".scheduler-row-menu-button").forEach((e) => {
|
|
4572
|
+
const t = e.dataset.resourceId === this.rowMenuResourceId;
|
|
4573
|
+
e.setAttribute("aria-expanded", String(t));
|
|
4574
|
+
});
|
|
4575
|
+
}
|
|
4576
|
+
/** Move focus from the focused cell onto its row's actions trigger. */
|
|
4577
|
+
focusRowTrigger() {
|
|
4578
|
+
const e = this.stateManager.getState().focusedResourceId;
|
|
4579
|
+
this.rowMenuTriggerById(e ?? null)?.focus();
|
|
4580
|
+
}
|
|
4581
|
+
/**
|
|
4582
|
+
* Keys while the row's trigger has focus. It sits outside the roving cell
|
|
4583
|
+
* model, so it needs its own small map: open, or hand focus back to the grid.
|
|
4584
|
+
*/
|
|
4585
|
+
handleRowTriggerKeyDown(e, t) {
|
|
4586
|
+
const s = t.dataset.resourceId;
|
|
4587
|
+
switch (e.key) {
|
|
4588
|
+
case "Enter":
|
|
4589
|
+
case " ":
|
|
4590
|
+
return e.preventDefault(), s && this.openRowMenu(s), !0;
|
|
4591
|
+
case "ArrowRight":
|
|
4592
|
+
case "Escape":
|
|
4593
|
+
return e.preventDefault(), this.focusFocusedCell(), !0;
|
|
4594
|
+
default:
|
|
4595
|
+
return !1;
|
|
4596
|
+
}
|
|
4597
|
+
}
|
|
4598
|
+
/**
|
|
4599
|
+
* Open the actions panel for a row, or re-target it if another row's is open.
|
|
4600
|
+
*
|
|
4601
|
+
* `OverlayController.open()` is a no-op while already open, and the anchor is
|
|
4602
|
+
* resolved lazily by id — so simply changing the id repainted the panel's
|
|
4603
|
+
* CONTENTS for the new row while leaving it positioned under the previous
|
|
4604
|
+
* row's trigger. The outside-mousedown dismissal cannot break the tie either:
|
|
4605
|
+
* it ignores any press whose composed path includes the host, and every
|
|
4606
|
+
* trigger is inside the host. Nothing was going to close it.
|
|
4607
|
+
*
|
|
4608
|
+
* So a different row is treated as what it is — a different dialog: close,
|
|
4609
|
+
* then open. `close(false)` deliberately does NOT return focus, because the
|
|
4610
|
+
* user's focus is already on the new trigger; handing it back to the old one
|
|
4611
|
+
* would flicker, and would make the following `open()` capture the wrong
|
|
4612
|
+
* element as its Escape target.
|
|
4613
|
+
*/
|
|
4614
|
+
openRowMenu(e) {
|
|
4615
|
+
if (this.rowMenuOverlay.isOpen && this.rowMenuResourceId === e) {
|
|
4616
|
+
this.closeRowMenu();
|
|
4617
|
+
return;
|
|
4618
|
+
}
|
|
4619
|
+
this.rowMenuOverlay.isOpen && this.rowMenuOverlay.close(!1), this.rowMenuResourceId = e, this.requestUpdate(), this.updateComplete.then(() => {
|
|
4620
|
+
this.syncRowMenuTriggerState(), this.rowMenuOverlay.open();
|
|
4621
|
+
});
|
|
4622
|
+
}
|
|
4623
|
+
closeRowMenu() {
|
|
4624
|
+
this.rowMenuOverlay.close();
|
|
4625
|
+
}
|
|
4626
|
+
/**
|
|
4627
|
+
* The row-actions panel. Built from the SAME permission list the trigger
|
|
4628
|
+
* consults, so a button never promises a panel that turns out to be empty.
|
|
4629
|
+
*/
|
|
4630
|
+
renderRowMenu() {
|
|
4631
|
+
const e = this.rowMenuResourceId;
|
|
4632
|
+
if (!e) return k;
|
|
4633
|
+
const t = this.findResourceOrGroup(e), s = this.currentView;
|
|
4634
|
+
if (!t || !(s instanceof I)) return k;
|
|
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;
|
|
4638
|
+
return S`
|
|
4639
|
+
<div
|
|
4640
|
+
class="scheduler-row-panel"
|
|
4641
|
+
role="dialog"
|
|
4642
|
+
aria-label=${E(i.rowMenuDialogLabel, { title: t.title })}
|
|
4643
|
+
>
|
|
4644
|
+
${n.map((l) => {
|
|
4645
|
+
if (l === "set-resource-color") {
|
|
4646
|
+
const c = E(i.resourceColor, { title: t.title });
|
|
4647
|
+
return S`
|
|
4648
|
+
<label class="row-action row-action-color">
|
|
4649
|
+
<span>${c}</span>
|
|
4650
|
+
<input
|
|
4651
|
+
type="color"
|
|
4652
|
+
class="row-color-input"
|
|
4653
|
+
aria-label=${c}
|
|
4654
|
+
.value=${a && /^#[0-9a-f]{6}$/i.test(a) ? a : "#000000"}
|
|
4655
|
+
data-action="set-resource-color"
|
|
4656
|
+
data-resource-id=${t.id}
|
|
4657
|
+
data-field=${o}
|
|
4658
|
+
/>
|
|
4659
|
+
</label>
|
|
4660
|
+
`;
|
|
4661
|
+
}
|
|
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 });
|
|
4663
|
+
return S`
|
|
4664
|
+
<button
|
|
4665
|
+
type="button"
|
|
4666
|
+
class="row-action ${l === "delete-resource" ? "is-destructive" : ""}"
|
|
4667
|
+
data-action=${l}
|
|
4668
|
+
data-parent-id=${l === "add-resource" || l === "add-group" ? t.id : k}
|
|
4669
|
+
data-resource-id=${l === "add-resource" || l === "add-group" ? k : t.id}
|
|
4670
|
+
@click=${() => {
|
|
4671
|
+
l !== "rename-resource" && this.closeRowMenu();
|
|
4672
|
+
}}
|
|
4673
|
+
>
|
|
4674
|
+
${d}
|
|
4675
|
+
</button>
|
|
4676
|
+
`;
|
|
4677
|
+
})}
|
|
4678
|
+
</div>
|
|
4679
|
+
`;
|
|
4680
|
+
}
|
|
4472
4681
|
renderDayPopover() {
|
|
4473
4682
|
const e = this.popoverDate;
|
|
4474
|
-
if (!e) return
|
|
4475
|
-
const t = this.stateManager.getState(), { options: s } = t,
|
|
4476
|
-
return
|
|
4683
|
+
if (!e) return k;
|
|
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()];
|
|
4685
|
+
return S`
|
|
4477
4686
|
<div
|
|
4478
4687
|
class="scheduler-day-popover"
|
|
4479
4688
|
role="dialog"
|
|
4480
|
-
aria-label=${this.msg("dayPopoverLabel", { date:
|
|
4689
|
+
aria-label=${this.msg("dayPopoverLabel", { date: r })}
|
|
4481
4690
|
>
|
|
4482
4691
|
<div class="popover-head">
|
|
4483
4692
|
<div>
|
|
4484
|
-
<div class="popover-date">${
|
|
4693
|
+
<div class="popover-date">${r}</div>
|
|
4485
4694
|
<div class="popover-count">
|
|
4486
4695
|
${this.msg("dayPopoverCount", {
|
|
4487
|
-
count:
|
|
4488
|
-
events: this.msg(
|
|
4696
|
+
count: i.length,
|
|
4697
|
+
events: this.msg(i.length === 1 ? "eventSingular" : "eventPlural")
|
|
4489
4698
|
})}
|
|
4490
4699
|
</div>
|
|
4491
4700
|
</div>
|
|
@@ -4498,54 +4707,57 @@ class F extends re {
|
|
|
4498
4707
|
<span aria-hidden="true">×</span>
|
|
4499
4708
|
</button>
|
|
4500
4709
|
</div>
|
|
4501
|
-
${
|
|
4710
|
+
${i.length === 0 ? S`<p class="popover-empty">${this.msg("dayPopoverEmpty")}</p>` : n === "month" ? this.renderPopoverDayGroups(i, s) : S`
|
|
4502
4711
|
<ul class="popover-events">
|
|
4503
|
-
${
|
|
4712
|
+
${i.map((a) => this.renderPopoverEvent(a, s))}
|
|
4504
4713
|
</ul>
|
|
4505
4714
|
`}
|
|
4506
|
-
${this.can("createEvent") && o.length > 0 ?
|
|
4715
|
+
${this.can("createEvent") && o.length > 0 ? S`
|
|
4507
4716
|
<label class="popover-resource">
|
|
4508
4717
|
<span class="popover-resource-label">${this.msg("newEventResource")}</span>
|
|
4509
|
-
<mp-select
|
|
4718
|
+
<mp-select
|
|
4719
|
+
class="popover-resource-select"
|
|
4720
|
+
input-label=${this.msg("newEventResource")}
|
|
4721
|
+
>
|
|
4510
4722
|
<option value="">${this.msg("unassignedResource")}</option>
|
|
4511
4723
|
${o.map(
|
|
4512
|
-
(a) =>
|
|
4724
|
+
(a) => S`<option value=${a.id}>${a.title}</option>`
|
|
4513
4725
|
)}
|
|
4514
4726
|
</mp-select>
|
|
4515
4727
|
</label>
|
|
4516
|
-
` :
|
|
4728
|
+
` : k}
|
|
4517
4729
|
<div class="popover-actions">
|
|
4518
|
-
${this.can("createEvent") ?
|
|
4730
|
+
${this.can("createEvent") ? S`<button
|
|
4519
4731
|
type="button"
|
|
4520
4732
|
class="popover-action primary"
|
|
4521
4733
|
@click=${(a) => this.createFromPopover(a)}
|
|
4522
4734
|
>
|
|
4523
4735
|
${this.msg("newEvent")}
|
|
4524
|
-
</button>` :
|
|
4736
|
+
</button>` : k}
|
|
4525
4737
|
<button
|
|
4526
4738
|
type="button"
|
|
4527
4739
|
class="popover-action"
|
|
4528
4740
|
@click=${() => this.drillFromPopover()}
|
|
4529
4741
|
>
|
|
4530
|
-
${this.msg(
|
|
4742
|
+
${this.msg(n === "month" ? "showMonth" : "showDay")}
|
|
4531
4743
|
</button>
|
|
4532
4744
|
</div>
|
|
4533
4745
|
</div>
|
|
4534
4746
|
`;
|
|
4535
4747
|
}
|
|
4536
4748
|
renderPopoverEvent(e, t) {
|
|
4537
|
-
return
|
|
4749
|
+
return S`
|
|
4538
4750
|
<li class="popover-event-row">
|
|
4539
4751
|
<button
|
|
4540
4752
|
type="button"
|
|
4541
4753
|
class="popover-event"
|
|
4542
|
-
aria-label=${
|
|
4754
|
+
aria-label=${W(e, null, t)}
|
|
4543
4755
|
@click=${(s) => this.selectFromPopover(e, s)}
|
|
4544
4756
|
>
|
|
4545
4757
|
<span
|
|
4546
4758
|
class="popover-event-swatch"
|
|
4547
4759
|
aria-hidden="true"
|
|
4548
|
-
style=${`background:${
|
|
4760
|
+
style=${`background:${X(
|
|
4549
4761
|
e,
|
|
4550
4762
|
this.stateManager.getState().resourceById,
|
|
4551
4763
|
t.defaultEventColor
|
|
@@ -4553,14 +4765,14 @@ class F extends re {
|
|
|
4553
4765
|
></span>
|
|
4554
4766
|
<span class="popover-event-title">${e.title}</span>
|
|
4555
4767
|
</button>
|
|
4556
|
-
${this.can("deleteEvent", e) ?
|
|
4768
|
+
${this.can("deleteEvent", e) ? S`<button
|
|
4557
4769
|
type="button"
|
|
4558
4770
|
class="popover-event-delete"
|
|
4559
4771
|
aria-label=${this.msg("deleteEventLabel", { title: e.title })}
|
|
4560
4772
|
@click=${() => this.deleteFromPopover(e)}
|
|
4561
4773
|
>
|
|
4562
4774
|
<span aria-hidden="true">×</span>
|
|
4563
|
-
</button>` :
|
|
4775
|
+
</button>` : k}
|
|
4564
4776
|
</li>
|
|
4565
4777
|
`;
|
|
4566
4778
|
}
|
|
@@ -4581,15 +4793,15 @@ class F extends re {
|
|
|
4581
4793
|
this.announceDenied();
|
|
4582
4794
|
return;
|
|
4583
4795
|
}
|
|
4584
|
-
const t = this.shadowRoot?.querySelector(".scheduler-day-popover"),
|
|
4585
|
-
(
|
|
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)
|
|
4586
4798
|
);
|
|
4587
4799
|
this.eventEmitter.emitEventDelete(e), this.updateComplete.then(
|
|
4588
4800
|
() => requestAnimationFrame(() => {
|
|
4589
|
-
const
|
|
4590
|
-
if (!
|
|
4591
|
-
const
|
|
4592
|
-
(
|
|
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();
|
|
4593
4805
|
})
|
|
4594
4806
|
);
|
|
4595
4807
|
}
|
|
@@ -4599,22 +4811,22 @@ class F extends re {
|
|
|
4599
4811
|
* running in from last month sits under the 1st rather than vanishing).
|
|
4600
4812
|
*/
|
|
4601
4813
|
renderPopoverDayGroups(e, t) {
|
|
4602
|
-
const s = this.popoverDate,
|
|
4603
|
-
const a = o.start <
|
|
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);
|
|
4604
4816
|
a.setHours(0, 0, 0, 0);
|
|
4605
|
-
const l = a.getTime(), d =
|
|
4606
|
-
return d.events.push(o),
|
|
4817
|
+
const l = a.getTime(), d = r.get(l) ?? { day: a, events: [] };
|
|
4818
|
+
return d.events.push(o), r.set(l, d);
|
|
4607
4819
|
}, /* @__PURE__ */ new Map());
|
|
4608
|
-
return
|
|
4820
|
+
return S`
|
|
4609
4821
|
<ul class="popover-events popover-day-groups">
|
|
4610
|
-
${[...
|
|
4611
|
-
(
|
|
4822
|
+
${[...i.values()].map(
|
|
4823
|
+
(r) => S`
|
|
4612
4824
|
<li class="popover-day-group">
|
|
4613
4825
|
<div class="popover-day-label">
|
|
4614
|
-
${h.formatDateWithWeekday(
|
|
4826
|
+
${h.formatDateWithWeekday(r.day, t.locale)}
|
|
4615
4827
|
</div>
|
|
4616
4828
|
<ul class="popover-events">
|
|
4617
|
-
${
|
|
4829
|
+
${r.events.map((o) => this.renderPopoverEvent(o, t))}
|
|
4618
4830
|
</ul>
|
|
4619
4831
|
</li>
|
|
4620
4832
|
`
|
|
@@ -4638,14 +4850,14 @@ class F extends re {
|
|
|
4638
4850
|
* no date-keyed cell — the popover is a month/year surface only.
|
|
4639
4851
|
*/
|
|
4640
4852
|
defaultPopoverAnchorId(e) {
|
|
4641
|
-
return this.stateManager.getState().view === "year" ? `scheduler-cell-y-${
|
|
4853
|
+
return this.stateManager.getState().view === "year" ? `scheduler-cell-y-${U.monthKey(e)}` : `scheduler-cell-m-${N.dayKey(e)}`;
|
|
4642
4854
|
}
|
|
4643
4855
|
/** Every event overlapping the given local day, in start order. */
|
|
4644
4856
|
eventsOnDay(e) {
|
|
4645
4857
|
const t = new Date(e);
|
|
4646
4858
|
t.setHours(0, 0, 0, 0);
|
|
4647
4859
|
const s = new Date(t);
|
|
4648
|
-
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());
|
|
4649
4861
|
}
|
|
4650
4862
|
/**
|
|
4651
4863
|
* Open the date popover for `day`. Anchored on an element resolved LAZILY by
|
|
@@ -4670,20 +4882,20 @@ class F extends re {
|
|
|
4670
4882
|
createFromPopover(e) {
|
|
4671
4883
|
const t = this.popoverDate;
|
|
4672
4884
|
if (!t) return;
|
|
4673
|
-
const
|
|
4885
|
+
const n = this.shadowRoot?.querySelector(
|
|
4674
4886
|
"mp-select.popover-resource-select"
|
|
4675
|
-
)?.value || void 0,
|
|
4676
|
-
|
|
4677
|
-
const
|
|
4678
|
-
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)) {
|
|
4679
4891
|
this.announceDenied();
|
|
4680
4892
|
return;
|
|
4681
4893
|
}
|
|
4682
4894
|
this.eventEmitter.emitEventCreate(
|
|
4683
|
-
{ start:
|
|
4895
|
+
{ start: i, end: r },
|
|
4684
4896
|
this.stateManager.getState().view,
|
|
4685
4897
|
e,
|
|
4686
|
-
|
|
4898
|
+
n
|
|
4687
4899
|
);
|
|
4688
4900
|
}
|
|
4689
4901
|
/** "Show day" / "Show month" — the drill that matches the popover's scope. */
|
|
@@ -4696,7 +4908,7 @@ class F extends re {
|
|
|
4696
4908
|
/** Every event overlapping `day`'s local month, in start order. */
|
|
4697
4909
|
eventsInMonth(e) {
|
|
4698
4910
|
const t = new Date(e.getFullYear(), e.getMonth(), 1), s = new Date(e.getFullYear(), e.getMonth() + 1, 1);
|
|
4699
|
-
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());
|
|
4700
4912
|
}
|
|
4701
4913
|
// ============================================
|
|
4702
4914
|
// Built-in event editor (R20 / D12.8)
|
|
@@ -4763,14 +4975,78 @@ class F extends re {
|
|
|
4763
4975
|
closeEventEditor() {
|
|
4764
4976
|
this.editorDraft = null, this.contentContainer?.removeEventListener("scroll", this.boundRepositionEditor), this.eventEditorOverlay.close(), this.editorEventId = null, this.editorError = null, this.editorDraft = null, this.requestUpdate();
|
|
4765
4977
|
}
|
|
4766
|
-
/**
|
|
4978
|
+
/**
|
|
4979
|
+
* Right-click on an event box opens the editor (D12.8b) — on a POINTING device
|
|
4980
|
+
* only.
|
|
4981
|
+
*
|
|
4982
|
+
* On touch the browser synthesizes `contextmenu` from a long-press at roughly
|
|
4983
|
+
* 500ms, which lands ~100ms before our own 600ms hold-to-drag arms. Acting on
|
|
4984
|
+
* it made dragging unreachable on a phone (R9): the editor opened every time
|
|
4985
|
+
* and the drag never started. So a touch-originated `contextmenu` is consumed
|
|
4986
|
+
* and discarded here, leaving the gesture to the hold timer.
|
|
4987
|
+
*
|
|
4988
|
+
* `preventDefault` on the touch path is what stops the *platform* menu from
|
|
4989
|
+
* appearing over an arming drag. It is called for every touch target, not just
|
|
4990
|
+
* events, because the hold timer arms on every target — a long-press on empty
|
|
4991
|
+
* grid arms drag-to-create, and used to do so underneath Android's own menu.
|
|
4992
|
+
*/
|
|
4767
4993
|
handleContextMenu(e) {
|
|
4768
|
-
const
|
|
4994
|
+
const t = e.composedPath?.()[0] ?? e.target;
|
|
4995
|
+
if (t?.closest?.("input, textarea, [contenteditable]")) return;
|
|
4996
|
+
if (this.isTouchContextMenu(e)) {
|
|
4997
|
+
e.preventDefault();
|
|
4998
|
+
return;
|
|
4999
|
+
}
|
|
5000
|
+
const s = t?.closest?.(
|
|
4769
5001
|
"[data-event-id]:not(.preview)"
|
|
4770
5002
|
);
|
|
4771
|
-
if (!s)
|
|
4772
|
-
|
|
4773
|
-
|
|
5003
|
+
if (!s) {
|
|
5004
|
+
const r = t?.closest?.(".scheduler-resource-cell")?.querySelector?.(
|
|
5005
|
+
".scheduler-row-menu-button"
|
|
5006
|
+
)?.dataset.resourceId;
|
|
5007
|
+
r && (e.preventDefault(), this.openRowMenu(r));
|
|
5008
|
+
return;
|
|
5009
|
+
}
|
|
5010
|
+
const n = this.getEventById(s.dataset.eventId ?? "");
|
|
5011
|
+
!n || !this.eventEditor || !this.canOpenEditor(n) || (e.preventDefault(), this.stateManager.setSelectedEvent(n), this.tryOpenEventEditor(n));
|
|
5012
|
+
}
|
|
5013
|
+
/**
|
|
5014
|
+
* Did this `contextmenu` come from a finger?
|
|
5015
|
+
*
|
|
5016
|
+
* Two signals, because no single one is portable. Chromium delivers
|
|
5017
|
+
* `contextmenu` as a `PointerEvent` and its `pointerType` is authoritative when
|
|
5018
|
+
* present; Firefox and WebKit deliver a bare `MouseEvent` with no such field,
|
|
5019
|
+
* so those fall back to the device recorded at `touchstart`/`mousedown`.
|
|
5020
|
+
*
|
|
5021
|
+
* Measured, not assumed — see the spike in the PRD (§14.3). The browser's
|
|
5022
|
+
* long-press gesture cannot be synthesized through CDP, so this decision is the
|
|
5023
|
+
* only part of the touch story an automated test can reach.
|
|
5024
|
+
*/
|
|
5025
|
+
isTouchContextMenu(e) {
|
|
5026
|
+
const t = e.pointerType;
|
|
5027
|
+
return t ? t === "touch" : this.inputHandler?.isTouchGesture() ?? !1;
|
|
5028
|
+
}
|
|
5029
|
+
/**
|
|
5030
|
+
* Does the editor's time list use a 12-hour clock?
|
|
5031
|
+
*
|
|
5032
|
+
* `mp-datetime-picker.hour12` is a boolean, so an unset `timeFormat` has to be
|
|
5033
|
+
* resolved rather than read as false — otherwise a US user gets a 24-hour
|
|
5034
|
+
* picker inside a scheduler that renders 12-hour times everywhere else.
|
|
5035
|
+
* `detectTimeFormat` is the `Intl` probe written for this and, until now,
|
|
5036
|
+
* never called from the component.
|
|
5037
|
+
*/
|
|
5038
|
+
/**
|
|
5039
|
+
* The week's first day: the consumer's choice, else the locale's convention.
|
|
5040
|
+
* Mirrors `BaseView.firstDayOfWeek` — resolved at the point of use so a later
|
|
5041
|
+
* locale change is picked up, never written back into `options`.
|
|
5042
|
+
*/
|
|
5043
|
+
firstDayOfWeek() {
|
|
5044
|
+
const { firstDayOfWeek: e, locale: t } = this.stateManager.getState().options;
|
|
5045
|
+
return h.resolveFirstDayOfWeek(e, t);
|
|
5046
|
+
}
|
|
5047
|
+
resolvedHour12() {
|
|
5048
|
+
const { timeFormat: e, locale: t } = this.stateManager.getState().options;
|
|
5049
|
+
return (e ?? h.detectTimeFormat(t)) === "12h";
|
|
4774
5050
|
}
|
|
4775
5051
|
/**
|
|
4776
5052
|
* Minute granularity for the editor's time lists, derived from the grid's own
|
|
@@ -4783,17 +5059,17 @@ class F extends re {
|
|
|
4783
5059
|
}
|
|
4784
5060
|
renderEventEditor() {
|
|
4785
5061
|
const e = this.editorEventId ? this.getEventById(this.editorEventId) : null, t = this.editorDraft;
|
|
4786
|
-
if (!e || !t) return
|
|
4787
|
-
const { options: s } = this.stateManager.getState(),
|
|
5062
|
+
if (!e || !t) return k;
|
|
5063
|
+
const { options: s } = this.stateManager.getState(), n = this.can("editEvent", e), i = this.editorError?.field === "title", r = this.editorError?.field === "end", o = pe(
|
|
4788
5064
|
this.editorTitleErrorId,
|
|
4789
5065
|
this.editorError?.message ?? null,
|
|
4790
|
-
|
|
4791
|
-
), { canStart: a, canEnd: l, startIsMove: d } = this.editorTimeFields(e), c = t.color ??
|
|
5066
|
+
i
|
|
5067
|
+
), { canStart: a, canEnd: l, startIsMove: d } = this.editorTimeFields(e), c = t.color ?? X(
|
|
4792
5068
|
e,
|
|
4793
5069
|
this.stateManager.getState().resourceById,
|
|
4794
5070
|
this.stateManager.getState().options.defaultEventColor
|
|
4795
5071
|
);
|
|
4796
|
-
return
|
|
5072
|
+
return S`
|
|
4797
5073
|
<div
|
|
4798
5074
|
class="scheduler-event-editor"
|
|
4799
5075
|
role="dialog"
|
|
@@ -4814,10 +5090,10 @@ class F extends re {
|
|
|
4814
5090
|
<span>${this.msg("editorTitleLabel")}</span>
|
|
4815
5091
|
<input
|
|
4816
5092
|
type="text"
|
|
4817
|
-
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" : ""}"
|
|
4818
5094
|
.value=${t.title}
|
|
4819
|
-
?disabled=${!
|
|
4820
|
-
aria-invalid=${
|
|
5095
|
+
?disabled=${!n}
|
|
5096
|
+
aria-invalid=${i ? "true" : "false"}
|
|
4821
5097
|
aria-errormessage=${o.id}
|
|
4822
5098
|
aria-describedby=${o.id}
|
|
4823
5099
|
@input=${(u) => this.updateEditorDraft({ title: u.target.value })}
|
|
@@ -4833,9 +5109,9 @@ class F extends re {
|
|
|
4833
5109
|
?disabled=${!a}
|
|
4834
5110
|
@value-change=${(u) => this.onEditorStartChange(u)}
|
|
4835
5111
|
input-label=${this.msg("editorStartLabel")}
|
|
4836
|
-
locale=${s.locale ??
|
|
4837
|
-
first-day-of-week=${
|
|
4838
|
-
.hour12=${
|
|
5112
|
+
locale=${s.locale ?? k}
|
|
5113
|
+
first-day-of-week=${this.firstDayOfWeek()}
|
|
5114
|
+
.hour12=${this.resolvedHour12()}
|
|
4839
5115
|
.step=${this.pickerStep()}
|
|
4840
5116
|
></mp-datetime-picker>
|
|
4841
5117
|
</label>
|
|
@@ -4846,13 +5122,13 @@ class F extends re {
|
|
|
4846
5122
|
.value=${t.end}
|
|
4847
5123
|
.min=${t.start}
|
|
4848
5124
|
?disabled=${!l}
|
|
4849
|
-
?invalid=${
|
|
4850
|
-
error-text=${
|
|
5125
|
+
?invalid=${r}
|
|
5126
|
+
error-text=${r ? this.editorError.message : k}
|
|
4851
5127
|
@value-change=${(u) => this.onEditorEndChange(u)}
|
|
4852
5128
|
input-label=${this.msg("editorEndLabel")}
|
|
4853
|
-
locale=${s.locale ??
|
|
4854
|
-
first-day-of-week=${
|
|
4855
|
-
.hour12=${
|
|
5129
|
+
locale=${s.locale ?? k}
|
|
5130
|
+
first-day-of-week=${this.firstDayOfWeek()}
|
|
5131
|
+
.hour12=${this.resolvedHour12()}
|
|
4856
5132
|
.step=${this.pickerStep()}
|
|
4857
5133
|
></mp-datetime-picker>
|
|
4858
5134
|
</label>
|
|
@@ -4862,7 +5138,7 @@ class F extends re {
|
|
|
4862
5138
|
type="color"
|
|
4863
5139
|
class="form-control form-control-color editor-input editor-color-input"
|
|
4864
5140
|
.value=${c}
|
|
4865
|
-
?disabled=${!
|
|
5141
|
+
?disabled=${!n || t.inheritColor}
|
|
4866
5142
|
@input=${(u) => this.updateEditorDraft({ color: u.target.value })}
|
|
4867
5143
|
/>
|
|
4868
5144
|
</label>
|
|
@@ -4870,7 +5146,7 @@ class F extends re {
|
|
|
4870
5146
|
<mp-checkbox
|
|
4871
5147
|
class="editor-inherit-input"
|
|
4872
5148
|
.checked=${t.inheritColor}
|
|
4873
|
-
?disabled=${!
|
|
5149
|
+
?disabled=${!n}
|
|
4874
5150
|
@change=${() => this.toggleEditorColorInherit()}
|
|
4875
5151
|
>${this.msg("editorInheritColor")}</mp-checkbox>
|
|
4876
5152
|
</div>
|
|
@@ -4882,13 +5158,13 @@ class F extends re {
|
|
|
4882
5158
|
>
|
|
4883
5159
|
${this.msg("editorSave")}
|
|
4884
5160
|
</button>
|
|
4885
|
-
${this.can("deleteEvent", e) ?
|
|
5161
|
+
${this.can("deleteEvent", e) ? S`<button
|
|
4886
5162
|
type="button"
|
|
4887
5163
|
class="editor-action danger"
|
|
4888
5164
|
@click=${() => this.deleteFromEditor()}
|
|
4889
5165
|
>
|
|
4890
5166
|
${this.msg("editorDelete")}
|
|
4891
|
-
</button>` :
|
|
5167
|
+
</button>` : k}
|
|
4892
5168
|
<button
|
|
4893
5169
|
type="button"
|
|
4894
5170
|
class="editor-action"
|
|
@@ -4946,23 +5222,23 @@ class F extends re {
|
|
|
4946
5222
|
onEditorStartChange(e) {
|
|
4947
5223
|
const t = e.detail, s = this.editorDraft;
|
|
4948
5224
|
if (!t || !s) return;
|
|
4949
|
-
const
|
|
4950
|
-
if (
|
|
4951
|
-
const
|
|
4952
|
-
if (!
|
|
4953
|
-
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) });
|
|
4954
5230
|
return;
|
|
4955
5231
|
}
|
|
4956
|
-
const
|
|
4957
|
-
if (t.getTime() <=
|
|
5232
|
+
const r = new Date(s.end.getTime() - this.minutesPerSlot() * 60 * 1e3);
|
|
5233
|
+
if (t.getTime() <= r.getTime()) {
|
|
4958
5234
|
this.updateEditorDraft({ start: t });
|
|
4959
5235
|
return;
|
|
4960
5236
|
}
|
|
4961
|
-
this.updateEditorDraft({ start:
|
|
5237
|
+
this.updateEditorDraft({ start: r });
|
|
4962
5238
|
const { options: o } = this.stateManager.getState();
|
|
4963
5239
|
this.liveAnnouncer.announce(
|
|
4964
5240
|
this.msg("editorStartClamped", {
|
|
4965
|
-
start: h.formatTime(
|
|
5241
|
+
start: h.formatTime(r, o.timeFormat, o.locale)
|
|
4966
5242
|
})
|
|
4967
5243
|
);
|
|
4968
5244
|
}
|
|
@@ -4988,16 +5264,16 @@ class F extends re {
|
|
|
4988
5264
|
onEditorEndChange(e) {
|
|
4989
5265
|
const t = e.detail, s = this.editorDraft;
|
|
4990
5266
|
if (!t || !s) return;
|
|
4991
|
-
const
|
|
4992
|
-
if (t.getTime() >=
|
|
5267
|
+
const n = new Date(s.start.getTime() + this.minutesPerSlot() * 60 * 1e3);
|
|
5268
|
+
if (t.getTime() >= n.getTime()) {
|
|
4993
5269
|
this.updateEditorDraft({ end: t });
|
|
4994
5270
|
return;
|
|
4995
5271
|
}
|
|
4996
|
-
this.updateEditorDraft({ end:
|
|
4997
|
-
const { options:
|
|
5272
|
+
this.updateEditorDraft({ end: n });
|
|
5273
|
+
const { options: i } = this.stateManager.getState();
|
|
4998
5274
|
this.liveAnnouncer.announce(
|
|
4999
5275
|
this.msg("editorEndClamped", {
|
|
5000
|
-
end: h.formatTime(
|
|
5276
|
+
end: h.formatTime(n, i.timeFormat, i.locale)
|
|
5001
5277
|
})
|
|
5002
5278
|
);
|
|
5003
5279
|
}
|
|
@@ -5025,12 +5301,12 @@ class F extends re {
|
|
|
5025
5301
|
if (!e || !t) return;
|
|
5026
5302
|
const s = { ...e };
|
|
5027
5303
|
if (this.can("editEvent", e)) {
|
|
5028
|
-
const
|
|
5029
|
-
if (!
|
|
5304
|
+
const n = t.title.trim();
|
|
5305
|
+
if (!n) {
|
|
5030
5306
|
this.refuseSave("title", this.msg("editorTitleRequired"));
|
|
5031
5307
|
return;
|
|
5032
5308
|
}
|
|
5033
|
-
s.title =
|
|
5309
|
+
s.title = n, t.inheritColor ? delete s.color : t.color && (s.color = t.color);
|
|
5034
5310
|
}
|
|
5035
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) {
|
|
5036
5312
|
this.refuseSave("end", this.msg("editorInvalidRange"));
|
|
@@ -5067,8 +5343,8 @@ class F extends re {
|
|
|
5067
5343
|
".resource-title[data-resource-id]"
|
|
5068
5344
|
);
|
|
5069
5345
|
if (!s) return;
|
|
5070
|
-
const
|
|
5071
|
-
|
|
5346
|
+
const n = s.dataset.resourceId;
|
|
5347
|
+
n && this.beginResourceRename(n);
|
|
5072
5348
|
}
|
|
5073
5349
|
/**
|
|
5074
5350
|
* Swap a resource/group title for an inline input — file-manager's proven
|
|
@@ -5084,27 +5360,27 @@ class F extends re {
|
|
|
5084
5360
|
`.resource-title[data-resource-id="${this.cssEscape(e)}"]`
|
|
5085
5361
|
);
|
|
5086
5362
|
if (!t || !s || s.querySelector("input")) return;
|
|
5087
|
-
const
|
|
5088
|
-
|
|
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(
|
|
5089
5365
|
"aria-label",
|
|
5090
|
-
this.msg("renameResourceLabel", { title:
|
|
5366
|
+
this.msg("renameResourceLabel", { title: n })
|
|
5091
5367
|
);
|
|
5092
|
-
let
|
|
5368
|
+
let r = !1;
|
|
5093
5369
|
const o = (a) => {
|
|
5094
|
-
if (
|
|
5095
|
-
|
|
5096
|
-
const l =
|
|
5097
|
-
s.textContent = a && l ? l :
|
|
5098
|
-
this.msg("resourceRenamed", { from:
|
|
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 })
|
|
5099
5375
|
)), requestAnimationFrame(() => {
|
|
5100
5376
|
this.shadowRoot?.querySelector(
|
|
5101
5377
|
`.scheduler-timeline-slot[data-resource-id="${this.cssEscape(e)}"]`
|
|
5102
5378
|
)?.focus({ preventScroll: !0 });
|
|
5103
5379
|
});
|
|
5104
5380
|
};
|
|
5105
|
-
|
|
5381
|
+
i.addEventListener("keydown", (a) => {
|
|
5106
5382
|
a.stopPropagation(), a.key === "Enter" ? (a.preventDefault(), o(!0)) : a.key === "Escape" && (a.preventDefault(), o(!1));
|
|
5107
|
-
}),
|
|
5383
|
+
}), i.addEventListener("blur", () => o(!0)), i.addEventListener("pointerdown", (a) => a.stopPropagation()), s.textContent = "", s.appendChild(i), i.focus(), i.select();
|
|
5108
5384
|
}
|
|
5109
5385
|
/** The in-grid pointer delete (D12.4b's revised home). */
|
|
5110
5386
|
deleteFromEditor() {
|
|
@@ -5136,7 +5412,7 @@ class F extends re {
|
|
|
5136
5412
|
}
|
|
5137
5413
|
firstUpdated() {
|
|
5138
5414
|
const e = this.shadowRoot.querySelector(".scheduler-header");
|
|
5139
|
-
this.contentContainer = this.shadowRoot.querySelector(".scheduler-content"), this.populateHeader(e), this.observeHeaderWidth(e), this.inputHandler = new
|
|
5415
|
+
this.contentContainer = this.shadowRoot.querySelector(".scheduler-content"), this.populateHeader(e), this.observeHeaderWidth(e), this.inputHandler = new He(
|
|
5140
5416
|
{
|
|
5141
5417
|
shadowRoot: this.shadowRoot,
|
|
5142
5418
|
getEventById: (t) => this.getEventById(t),
|
|
@@ -5147,7 +5423,7 @@ class F extends re {
|
|
|
5147
5423
|
isEventSelected: (t) => this.stateManager.getState().selectedEvent?.id === t
|
|
5148
5424
|
},
|
|
5149
5425
|
{
|
|
5150
|
-
onPointerDown: (t, s,
|
|
5426
|
+
onPointerDown: (t, s, n) => this.handlePointerDown(t, s, n),
|
|
5151
5427
|
onPointerMove: (t) => this.handlePointerMove(t),
|
|
5152
5428
|
onPointerUp: (t) => this.handlePointerUp(t),
|
|
5153
5429
|
onClick: (t, s) => this.handleClick(t, s),
|
|
@@ -5161,12 +5437,12 @@ class F extends re {
|
|
|
5161
5437
|
t.className = "scheduler-nav", t.setAttribute("aria-label", this.msg("navLabel"));
|
|
5162
5438
|
const s = document.createElement("button");
|
|
5163
5439
|
s.type = "button", s.textContent = "‹", s.setAttribute("aria-label", this.msg("previousPeriod")), s.title = this.msg("previousPeriod"), s.addEventListener("click", () => this.prev());
|
|
5164
|
-
const r = document.createElement("button");
|
|
5165
|
-
r.type = "button", r.textContent = "›", r.setAttribute("aria-label", this.msg("nextPeriod")), r.title = this.msg("nextPeriod"), r.addEventListener("click", () => this.next());
|
|
5166
5440
|
const n = document.createElement("button");
|
|
5167
|
-
n.type = "button", n.textContent =
|
|
5168
|
-
const i = document.createElement("
|
|
5169
|
-
i.
|
|
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);
|
|
5170
5446
|
const o = document.createElement("div");
|
|
5171
5447
|
o.className = "scheduler-view-switcher", o.setAttribute("role", "group"), o.setAttribute("aria-label", this.msg("switchView"));
|
|
5172
5448
|
const a = ["year", "month", "week", "day", "timeline"];
|
|
@@ -5176,38 +5452,35 @@ class F extends re {
|
|
|
5176
5452
|
const c = l === this.view;
|
|
5177
5453
|
d.setAttribute("aria-pressed", String(c)), c && d.classList.add("active"), d.addEventListener("click", () => this.changeView(l)), o.appendChild(d);
|
|
5178
5454
|
}
|
|
5179
|
-
e.appendChild(t), e.appendChild(
|
|
5455
|
+
e.appendChild(t), e.appendChild(r), e.appendChild(o);
|
|
5180
5456
|
}
|
|
5181
5457
|
updateTitle(e) {
|
|
5182
5458
|
const t = e ?? this.shadowRoot.querySelector(".scheduler-title");
|
|
5183
5459
|
if (!t) return;
|
|
5184
|
-
const s = this.stateManager.getState(), { date:
|
|
5460
|
+
const s = this.stateManager.getState(), { date: n, view: i, options: r } = s;
|
|
5185
5461
|
let o = "";
|
|
5186
|
-
switch (
|
|
5462
|
+
switch (i) {
|
|
5187
5463
|
case "year":
|
|
5188
|
-
o =
|
|
5464
|
+
o = n.getFullYear().toString();
|
|
5189
5465
|
break;
|
|
5190
5466
|
case "month":
|
|
5191
|
-
o = h.formatDate(
|
|
5467
|
+
o = h.formatDate(n, r.locale, {
|
|
5192
5468
|
month: "long",
|
|
5193
5469
|
year: "numeric"
|
|
5194
5470
|
});
|
|
5195
5471
|
break;
|
|
5196
5472
|
case "week":
|
|
5197
5473
|
case "timeline": {
|
|
5198
|
-
const a = h.getWeekStart(
|
|
5199
|
-
o =
|
|
5200
|
-
month: "short",
|
|
5201
|
-
day: "numeric"
|
|
5202
|
-
})} - ${h.formatDate(l, i.locale, {
|
|
5474
|
+
const a = h.getWeekStart(n, this.firstDayOfWeek()), l = h.addDays(a, 6);
|
|
5475
|
+
o = h.formatDateRange(a, l, r.locale, {
|
|
5203
5476
|
month: "short",
|
|
5204
5477
|
day: "numeric",
|
|
5205
5478
|
year: "numeric"
|
|
5206
|
-
})
|
|
5479
|
+
});
|
|
5207
5480
|
break;
|
|
5208
5481
|
}
|
|
5209
5482
|
case "day":
|
|
5210
|
-
o = h.formatDate(
|
|
5483
|
+
o = h.formatDate(n, r.locale, {
|
|
5211
5484
|
weekday: "long",
|
|
5212
5485
|
month: "long",
|
|
5213
5486
|
day: "numeric",
|
|
@@ -5226,55 +5499,84 @@ class F extends re {
|
|
|
5226
5499
|
* wrapped layout off [data-narrow]; the title text swap needs JS anyway.
|
|
5227
5500
|
*/
|
|
5228
5501
|
observeHeaderWidth(e) {
|
|
5229
|
-
typeof ResizeObserver > "u"
|
|
5230
|
-
|
|
5231
|
-
|
|
5232
|
-
|
|
5502
|
+
if (typeof ResizeObserver > "u") return;
|
|
5503
|
+
const t = this.shadowRoot?.querySelector(".scheduler-container");
|
|
5504
|
+
this.headerResizeObserver = new ResizeObserver((s) => {
|
|
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);
|
|
5233
5508
|
}));
|
|
5234
|
-
}), this.headerResizeObserver.observe(e)
|
|
5509
|
+
}), this.headerResizeObserver.observe(e);
|
|
5235
5510
|
}
|
|
5236
5511
|
renderView() {
|
|
5237
5512
|
if (!this.contentContainer) return;
|
|
5238
|
-
this.
|
|
5239
|
-
|
|
5240
|
-
|
|
5513
|
+
const e = this.shadowRoot?.activeElement, t = !!e && this.contentContainer.contains(e);
|
|
5514
|
+
this.currentViewType !== this.stateManager.getState().view && (this.contentContainer.scrollLeft = 0, this.contentContainer.scrollTop = 0), this.currentView?.destroy();
|
|
5515
|
+
const s = this.stateManager.getState();
|
|
5516
|
+
switch (s.view) {
|
|
5241
5517
|
case "year":
|
|
5242
|
-
this.currentView = new
|
|
5518
|
+
this.currentView = new U(this.contentContainer, s), this.currentViewType = "year";
|
|
5243
5519
|
break;
|
|
5244
5520
|
case "month":
|
|
5245
|
-
this.currentView = new
|
|
5521
|
+
this.currentView = new N(this.contentContainer, s), this.currentViewType = "month";
|
|
5246
5522
|
break;
|
|
5247
5523
|
case "week":
|
|
5248
|
-
this.currentView = new
|
|
5524
|
+
this.currentView = new Ie(this.contentContainer, s), this.currentViewType = "week";
|
|
5249
5525
|
break;
|
|
5250
5526
|
case "day":
|
|
5251
|
-
this.currentView = new
|
|
5527
|
+
this.currentView = new Ae(this.contentContainer, s), this.currentViewType = "day";
|
|
5252
5528
|
break;
|
|
5253
5529
|
case "timeline":
|
|
5254
|
-
this.currentView = new
|
|
5530
|
+
this.currentView = new I(this.contentContainer, s), this.currentViewType = "timeline";
|
|
5255
5531
|
break;
|
|
5256
5532
|
}
|
|
5257
|
-
this.currentView?.render()
|
|
5533
|
+
this.currentView?.render(), t && requestAnimationFrame(() => {
|
|
5534
|
+
const n = this.shadowRoot?.activeElement;
|
|
5535
|
+
(!n || n === this.shadowRoot?.host) && this.focusFocusedCell();
|
|
5536
|
+
});
|
|
5258
5537
|
}
|
|
5259
5538
|
// ============================================
|
|
5260
5539
|
// State Change Handling
|
|
5261
5540
|
// ============================================
|
|
5262
5541
|
onStateChange(e) {
|
|
5263
|
-
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.popoverDate || this.editorEventId) && this.requestUpdate();
|
|
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();
|
|
5264
5543
|
}
|
|
5265
5544
|
detectAndEmitChanges(e) {
|
|
5266
|
-
const t = this.previousView !== null && this.previousView !== e.view, s = this.previousDate !== null && this.previousDate.getTime() !== e.date.getTime(),
|
|
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;
|
|
5267
5546
|
(t || s) && this.eventEmitter.emitViewChange(e.view, e.date), o && this.eventEmitter.emitSelectionChange(
|
|
5268
5547
|
e.selectedEvent,
|
|
5269
|
-
|
|
5548
|
+
i,
|
|
5270
5549
|
e.view,
|
|
5271
5550
|
e.selectionResourceId ?? void 0
|
|
5272
|
-
), 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;
|
|
5552
|
+
}
|
|
5553
|
+
/**
|
|
5554
|
+
* Re-apply the header's localized labels.
|
|
5555
|
+
*
|
|
5556
|
+
* The chrome is built imperatively once, in `firstUpdated`, so its button text
|
|
5557
|
+
* froze at whatever `options.messages` held at that moment. The TITLE updated
|
|
5558
|
+
* on every state change and the buttons did not, so switching language at
|
|
5559
|
+
* runtime produced a half-translated header — Dutch dates over English
|
|
5560
|
+
* buttons. Cheap enough to redo unconditionally: eight string assignments.
|
|
5561
|
+
*/
|
|
5562
|
+
applyHeaderLabels() {
|
|
5563
|
+
const e = this.shadowRoot;
|
|
5564
|
+
if (!e) return;
|
|
5565
|
+
const t = e.querySelector(".scheduler-nav");
|
|
5566
|
+
t?.setAttribute("aria-label", this.msg("navLabel"));
|
|
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) => {
|
|
5571
|
+
const l = a.dataset.view;
|
|
5572
|
+
l && (a.textContent = this.viewLabel(l));
|
|
5573
|
+
});
|
|
5273
5574
|
}
|
|
5274
5575
|
updateUI(e) {
|
|
5275
|
-
|
|
5276
|
-
|
|
5277
|
-
|
|
5576
|
+
if (!this.shadowRoot) return;
|
|
5577
|
+
this.updateTitle(), this.applyHeaderLabels(), this.shadowRoot.querySelectorAll(".scheduler-view-switcher button").forEach((s) => {
|
|
5578
|
+
const n = s, i = n.dataset.view === e.view;
|
|
5579
|
+
n.classList.toggle("active", i), n.setAttribute("aria-pressed", String(i));
|
|
5278
5580
|
}), this.currentView && (this.currentViewType !== e.view ? this.renderView() : e.dragState || e.previewEvent ? this.scheduleDragUpdate(e) : this.currentView.update(e));
|
|
5279
5581
|
}
|
|
5280
5582
|
scheduleDragUpdate(e) {
|
|
@@ -5337,10 +5639,10 @@ class F extends re {
|
|
|
5337
5639
|
this.stopEdgeScroll();
|
|
5338
5640
|
return;
|
|
5339
5641
|
}
|
|
5340
|
-
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;
|
|
5341
5643
|
if (this.edgeScrollVector = {
|
|
5342
|
-
x:
|
|
5343
|
-
y:
|
|
5644
|
+
x: r(e.clientX, s.left, s.right),
|
|
5645
|
+
y: r(e.clientY, s.top, s.bottom)
|
|
5344
5646
|
}, this.edgeScrollPointer = e, this.edgeScrollVector.x === 0 && this.edgeScrollVector.y === 0) {
|
|
5345
5647
|
this.stopEdgeScroll();
|
|
5346
5648
|
return;
|
|
@@ -5352,8 +5654,8 @@ class F extends re {
|
|
|
5352
5654
|
this.edgeScrollFrame = null;
|
|
5353
5655
|
const e = this.contentContainer, t = this.edgeScrollPointer;
|
|
5354
5656
|
if (!e || !t || !this.dragManager.isDragging()) return;
|
|
5355
|
-
const s = e.scrollLeft,
|
|
5356
|
-
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());
|
|
5357
5659
|
});
|
|
5358
5660
|
}
|
|
5359
5661
|
stopEdgeScroll() {
|
|
@@ -5363,8 +5665,8 @@ class F extends re {
|
|
|
5363
5665
|
this.DBLCLICK_WINDOW_MS = 500;
|
|
5364
5666
|
}
|
|
5365
5667
|
registerEventActivation(e, t) {
|
|
5366
|
-
const s = Date.now(),
|
|
5367
|
-
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));
|
|
5368
5670
|
}
|
|
5369
5671
|
handleDragComplete(e, t) {
|
|
5370
5672
|
if (e.wasClick) {
|
|
@@ -5406,25 +5708,25 @@ class F extends re {
|
|
|
5406
5708
|
handleClick(e, t) {
|
|
5407
5709
|
const s = e.target;
|
|
5408
5710
|
if (this.handleResourceAction(s, e.originalEvent)) return;
|
|
5409
|
-
const
|
|
5410
|
-
if (
|
|
5411
|
-
const a =
|
|
5711
|
+
const n = s.closest(".expand-toggle");
|
|
5712
|
+
if (n) {
|
|
5713
|
+
const a = n.dataset.groupId;
|
|
5412
5714
|
if (a) {
|
|
5413
5715
|
this.stateManager.toggleGroupCollapse(a), this.renderView();
|
|
5414
5716
|
return;
|
|
5415
5717
|
}
|
|
5416
5718
|
}
|
|
5417
|
-
const
|
|
5418
|
-
if (
|
|
5419
|
-
const a =
|
|
5719
|
+
const i = s.closest(".scheduler-more-link");
|
|
5720
|
+
if (i) {
|
|
5721
|
+
const a = i.dataset.date;
|
|
5420
5722
|
if (a) {
|
|
5421
5723
|
this.handleMoreLink(a);
|
|
5422
5724
|
return;
|
|
5423
5725
|
}
|
|
5424
5726
|
}
|
|
5425
|
-
const
|
|
5426
|
-
if (
|
|
5427
|
-
const a =
|
|
5727
|
+
const r = s.closest("[data-date]");
|
|
5728
|
+
if (r) {
|
|
5729
|
+
const a = r.dataset.date;
|
|
5428
5730
|
if (a) {
|
|
5429
5731
|
const l = this.parseDayKey(a);
|
|
5430
5732
|
if (this.eventEmitter.emitDateClick(l, e.originalEvent), s.closest(".day-number")) {
|
|
@@ -5458,14 +5760,24 @@ class F extends re {
|
|
|
5458
5760
|
handleResourceAction(e, t) {
|
|
5459
5761
|
const s = e.closest("[data-action]");
|
|
5460
5762
|
if (!s) return !1;
|
|
5461
|
-
const { action:
|
|
5462
|
-
switch (
|
|
5763
|
+
const { action: n, parentId: i, resourceId: r } = s.dataset, o = this.stateManager.getState().view;
|
|
5764
|
+
switch (n) {
|
|
5765
|
+
// The trigger itself is not a request — it opens the panel that carries
|
|
5766
|
+
// them. Handled here so the click never falls through to the grid.
|
|
5767
|
+
case "row-menu":
|
|
5768
|
+
return r && this.openRowMenu(r), !0;
|
|
5769
|
+
// Starts the same inline edit double-click and F2 already start. The panel
|
|
5770
|
+
// closes WITHOUT returning focus first: `beginResourceRename` focuses the
|
|
5771
|
+
// input it creates, and handing focus back to the trigger on the way there
|
|
5772
|
+
// would be a visible detour.
|
|
5773
|
+
case "rename-resource":
|
|
5774
|
+
return r && this.can("updateResource") && (this.rowMenuOverlay.close(!1), this.beginResourceRename(r)), !0;
|
|
5463
5775
|
case "add-resource":
|
|
5464
|
-
return this.can("createResource") && this.eventEmitter.emitResourceCreate("resource", o, t,
|
|
5776
|
+
return this.can("createResource") && this.eventEmitter.emitResourceCreate("resource", o, t, i), !0;
|
|
5465
5777
|
case "add-group":
|
|
5466
|
-
return this.can("createGroup") && this.eventEmitter.emitResourceCreate("group", o, t,
|
|
5778
|
+
return this.can("createGroup") && this.eventEmitter.emitResourceCreate("group", o, t, i), !0;
|
|
5467
5779
|
case "delete-resource": {
|
|
5468
|
-
const a =
|
|
5780
|
+
const a = r ? this.findResourceOrGroup(r) : null;
|
|
5469
5781
|
return a && this.can("deleteResource") && this.eventEmitter.emitResourceDelete(a, t), !0;
|
|
5470
5782
|
}
|
|
5471
5783
|
// The colour input reports through `change`, not `click` — a click merely
|
|
@@ -5485,18 +5797,18 @@ class F extends re {
|
|
|
5485
5797
|
handleValueChange(e) {
|
|
5486
5798
|
const t = e.composedPath?.()[0] ?? e.target;
|
|
5487
5799
|
if (!t || t.dataset.action !== "set-resource-color" || !this.can("updateResource")) return;
|
|
5488
|
-
const { resourceId: s, field:
|
|
5489
|
-
if (!
|
|
5490
|
-
const
|
|
5800
|
+
const { resourceId: s, field: n } = t.dataset, i = s ? this.findResourceOrGroup(s) : null;
|
|
5801
|
+
if (!i) return;
|
|
5802
|
+
const r = t.value;
|
|
5491
5803
|
this.eventEmitter.emitResourceUpdate(
|
|
5492
|
-
|
|
5493
|
-
|
|
5804
|
+
i,
|
|
5805
|
+
n === "eventColor" ? { eventColor: r } : { color: r },
|
|
5494
5806
|
e
|
|
5495
5807
|
);
|
|
5496
5808
|
}
|
|
5497
5809
|
/** Resolve a resource or group by id from the current `resources` input. */
|
|
5498
5810
|
findResourceOrGroup(e) {
|
|
5499
|
-
return
|
|
5811
|
+
return O.findById(this.stateManager.getState().resources, e) ?? null;
|
|
5500
5812
|
}
|
|
5501
5813
|
handleDoubleClick(e, t) {
|
|
5502
5814
|
t.type === "event" && t.event && (this.eventEmitter.emitEventDblClick(t.event, e.originalEvent), this.tryOpenEventEditor(t.event));
|
|
@@ -5513,23 +5825,50 @@ class F extends re {
|
|
|
5513
5825
|
handleFocusIn(e) {
|
|
5514
5826
|
const s = (e.composedPath?.() ?? [])[0] ?? e.target;
|
|
5515
5827
|
if (!s || !s.dataset) return;
|
|
5516
|
-
const
|
|
5517
|
-
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"))
|
|
5518
5830
|
return;
|
|
5519
|
-
const
|
|
5520
|
-
|
|
5521
|
-
const
|
|
5522
|
-
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 });
|
|
5523
5835
|
}));
|
|
5524
5836
|
}
|
|
5837
|
+
/**
|
|
5838
|
+
* Is this key event coming from inside one of the open panels?
|
|
5839
|
+
*
|
|
5840
|
+
* The dialogs are deliberately NON-modal, which invites the user to Shift+Tab
|
|
5841
|
+
* back to the grid while one is open. The guards below used to return
|
|
5842
|
+
* unconditionally on `isOpen`, so every arrow, Enter and Escape in the grid
|
|
5843
|
+
* was swallowed and the widget read as broken (audit M12). Claiming keys only
|
|
5844
|
+
* when focus is actually inside the panel fixes that without weakening the
|
|
5845
|
+
* Escape arbitration, which is the reason the guards exist.
|
|
5846
|
+
*/
|
|
5847
|
+
eventInsidePanel(e, t) {
|
|
5848
|
+
const s = e.composedPath?.() ?? [], n = this.shadowRoot?.querySelector(t);
|
|
5849
|
+
return n ? s.includes(n) : !1;
|
|
5850
|
+
}
|
|
5525
5851
|
handleKeyDown(e) {
|
|
5852
|
+
if (this.rowMenuOverlay.isOpen) {
|
|
5853
|
+
if (e.key === "Escape" && this.rowMenuOverlay.isTopmost) {
|
|
5854
|
+
e.preventDefault(), e.stopPropagation(), this.closeRowMenu();
|
|
5855
|
+
return;
|
|
5856
|
+
}
|
|
5857
|
+
if (this.eventInsidePanel(e, ".scheduler-row-panel")) return;
|
|
5858
|
+
}
|
|
5526
5859
|
if (this.dayPopover.isOpen) {
|
|
5527
|
-
e.key === "Escape" && this.dayPopover.isTopmost
|
|
5528
|
-
|
|
5860
|
+
if (e.key === "Escape" && this.dayPopover.isTopmost) {
|
|
5861
|
+
e.preventDefault(), e.stopPropagation(), this.closeDayPopover();
|
|
5862
|
+
return;
|
|
5863
|
+
}
|
|
5864
|
+
if (this.eventInsidePanel(e, ".scheduler-day-popover")) return;
|
|
5529
5865
|
}
|
|
5530
5866
|
if (this.eventEditorOverlay.isOpen) {
|
|
5531
|
-
e.key === "Escape" && this.eventEditorOverlay.isTopmost
|
|
5532
|
-
|
|
5867
|
+
if (e.key === "Escape" && this.eventEditorOverlay.isTopmost) {
|
|
5868
|
+
e.preventDefault(), e.stopPropagation(), this.closeEventEditor();
|
|
5869
|
+
return;
|
|
5870
|
+
}
|
|
5871
|
+
if (this.eventInsidePanel(e, ".scheduler-event-editor")) return;
|
|
5533
5872
|
}
|
|
5534
5873
|
if (this.keyboardMove) {
|
|
5535
5874
|
this.handleKeyboardMove(e);
|
|
@@ -5539,14 +5878,17 @@ class F extends re {
|
|
|
5539
5878
|
this.dragManager.cancel();
|
|
5540
5879
|
return;
|
|
5541
5880
|
}
|
|
5542
|
-
|
|
5881
|
+
const t = e.composedPath?.()[0]?.closest?.(
|
|
5882
|
+
".scheduler-row-menu-button"
|
|
5883
|
+
);
|
|
5884
|
+
if (t && this.handleRowTriggerKeyDown(e, t) || e.altKey && !e.ctrlKey && !e.metaKey && !e.shiftKey && this.handleAltShortcut(e))
|
|
5543
5885
|
return;
|
|
5544
5886
|
if ((e.key === "Enter" || e.key === " ") && this.activateFocusedDrillControl()) {
|
|
5545
5887
|
e.preventDefault();
|
|
5546
5888
|
return;
|
|
5547
5889
|
}
|
|
5548
|
-
const
|
|
5549
|
-
|
|
5890
|
+
const s = this.getFocusedKind();
|
|
5891
|
+
s === "cell" ? this.handleCellKeyDown(e) : s === "event" && this.handleEventKeyDown(e);
|
|
5550
5892
|
}
|
|
5551
5893
|
/** Keyboard face of the more-link / year-month-header click delegation. */
|
|
5552
5894
|
activateFocusedDrillControl() {
|
|
@@ -5556,12 +5898,30 @@ class F extends re {
|
|
|
5556
5898
|
const t = e.dataset.date;
|
|
5557
5899
|
return t ? (this.handleMoreLink(t), !0) : !1;
|
|
5558
5900
|
}
|
|
5901
|
+
if (e.classList.contains("day-number")) {
|
|
5902
|
+
const t = e.dataset.date;
|
|
5903
|
+
return t ? (this.drillTo(this.parseDayKey(t), "day"), !0) : !1;
|
|
5904
|
+
}
|
|
5559
5905
|
if (e.classList.contains("scheduler-year-month-header")) {
|
|
5560
5906
|
const t = e.dataset.month;
|
|
5561
|
-
return t ? (this.
|
|
5907
|
+
return t ? (this.drillTo(this.parseDayKey(t), "month"), !0) : !1;
|
|
5562
5908
|
}
|
|
5563
5909
|
return !1;
|
|
5564
5910
|
}
|
|
5911
|
+
/**
|
|
5912
|
+
* Drill into `view` at `date` from a control that the resulting rebuild will
|
|
5913
|
+
* destroy — which is every drill-down control, by definition.
|
|
5914
|
+
*
|
|
5915
|
+
* The focus restore has to happen HERE rather than being left to the view
|
|
5916
|
+
* switch. `setDate` rebuilds the current view first, and that rebuild already
|
|
5917
|
+
* drops focus to `<body>`; by the time the switch looks for something worth
|
|
5918
|
+
* restoring, there is nothing focused inside the widget and it correctly
|
|
5919
|
+
* declines to steal focus from wherever it went. So the switch's own
|
|
5920
|
+
* restoration can never cover this path.
|
|
5921
|
+
*/
|
|
5922
|
+
drillTo(e, t) {
|
|
5923
|
+
this.stateManager.setDate(e), this.stateManager.setView(t), this.focusFocusedCell();
|
|
5924
|
+
}
|
|
5565
5925
|
getFocusedKind() {
|
|
5566
5926
|
const e = this.shadowRoot?.activeElement;
|
|
5567
5927
|
return e ? e.classList.contains("scheduler-time-slot") || e.classList.contains("scheduler-timeline-slot") || e.classList.contains("scheduler-month-day") || e.classList.contains("scheduler-year-month") ? "cell" : e.classList.contains("scheduler-event") || e.classList.contains("scheduler-timeline-event") || e.classList.contains("scheduler-month-event") ? "event" : "other" : "other";
|
|
@@ -5590,7 +5950,7 @@ class F extends re {
|
|
|
5590
5950
|
*/
|
|
5591
5951
|
can(e, t) {
|
|
5592
5952
|
const { options: s } = this.stateManager.getState();
|
|
5593
|
-
return
|
|
5953
|
+
return re(e, {
|
|
5594
5954
|
permissions: this.effectivePermissions(s),
|
|
5595
5955
|
event: t ?? null
|
|
5596
5956
|
});
|
|
@@ -5602,7 +5962,7 @@ class F extends re {
|
|
|
5602
5962
|
*/
|
|
5603
5963
|
canResizeEdge(e, t) {
|
|
5604
5964
|
const { options: s } = this.stateManager.getState();
|
|
5605
|
-
return
|
|
5965
|
+
return j(e, {
|
|
5606
5966
|
permissions: this.effectivePermissions(s),
|
|
5607
5967
|
event: t ?? null
|
|
5608
5968
|
});
|
|
@@ -5697,17 +6057,17 @@ class F extends re {
|
|
|
5697
6057
|
* No wrap at the ends — matches the APG list/feed pattern.
|
|
5698
6058
|
*/
|
|
5699
6059
|
focusAdjacentEvent(e, t) {
|
|
5700
|
-
const
|
|
6060
|
+
const n = [...this.stateManager.getState().events].sort((l, d) => {
|
|
5701
6061
|
const c = l.start.getTime() - d.start.getTime();
|
|
5702
6062
|
return c !== 0 ? c : l.id.localeCompare(d.id);
|
|
5703
|
-
}),
|
|
5704
|
-
if (
|
|
5705
|
-
const
|
|
5706
|
-
if (!
|
|
6063
|
+
}), i = n.findIndex((l) => l.id === e.id);
|
|
6064
|
+
if (i < 0) return;
|
|
6065
|
+
const r = n[i + t];
|
|
6066
|
+
if (!r) return;
|
|
5707
6067
|
const o = this.shadowRoot;
|
|
5708
6068
|
if (!o) return;
|
|
5709
6069
|
o.querySelector(
|
|
5710
|
-
`[data-event-id="${this.cssEscape(
|
|
6070
|
+
`[data-event-id="${this.cssEscape(r.id)}"]`
|
|
5711
6071
|
)?.focus({ preventScroll: !1 });
|
|
5712
6072
|
}
|
|
5713
6073
|
handleCellKeyDown(e) {
|
|
@@ -5721,29 +6081,37 @@ class F extends re {
|
|
|
5721
6081
|
return;
|
|
5722
6082
|
}
|
|
5723
6083
|
if (t.focusedCell || this.initFocusedCellFromActive(), e.key === "F2" && t.view === "timeline") {
|
|
5724
|
-
const
|
|
5725
|
-
|
|
6084
|
+
const r = this.stateManager.getState().focusedResourceId;
|
|
6085
|
+
r && (e.preventDefault(), this.beginResourceRename(r));
|
|
5726
6086
|
return;
|
|
5727
6087
|
}
|
|
5728
|
-
const s = e.shiftKey,
|
|
6088
|
+
const s = e.shiftKey, n = e.ctrlKey || e.metaKey, i = t.view === "timeline";
|
|
5729
6089
|
switch (e.key) {
|
|
5730
6090
|
case "ArrowUp":
|
|
5731
|
-
e.preventDefault(),
|
|
6091
|
+
e.preventDefault(), i ? this.moveCellByResource(-1, s) : this.moveCellByTime(-1, s);
|
|
5732
6092
|
break;
|
|
5733
6093
|
case "ArrowDown":
|
|
5734
|
-
e.preventDefault(),
|
|
6094
|
+
e.preventDefault(), i ? this.moveCellByResource(1, s) : this.moveCellByTime(1, s);
|
|
5735
6095
|
break;
|
|
5736
|
-
case "ArrowLeft":
|
|
5737
|
-
e.preventDefault(),
|
|
6096
|
+
case "ArrowLeft": {
|
|
6097
|
+
if (e.preventDefault(), !i) {
|
|
6098
|
+
this.moveCellByDay(-1, s);
|
|
6099
|
+
break;
|
|
6100
|
+
}
|
|
6101
|
+
const r = this.stateManager.getState().focusedCell?.start.getTime();
|
|
6102
|
+
this.moveCellByTime(-1, s);
|
|
6103
|
+
const o = this.stateManager.getState().focusedCell?.start.getTime();
|
|
6104
|
+
r !== void 0 && r === o && !s && this.focusRowTrigger();
|
|
5738
6105
|
break;
|
|
6106
|
+
}
|
|
5739
6107
|
case "ArrowRight":
|
|
5740
|
-
e.preventDefault(),
|
|
6108
|
+
e.preventDefault(), i ? this.moveCellByTime(1, s) : this.moveCellByDay(1, s);
|
|
5741
6109
|
break;
|
|
5742
6110
|
case "Home":
|
|
5743
|
-
e.preventDefault(),
|
|
6111
|
+
e.preventDefault(), n ? this.moveCellToViewExtreme("start", s) : this.moveCellToColumnExtreme("start", s);
|
|
5744
6112
|
break;
|
|
5745
6113
|
case "End":
|
|
5746
|
-
e.preventDefault(),
|
|
6114
|
+
e.preventDefault(), n ? this.moveCellToViewExtreme("end", s) : this.moveCellToColumnExtreme("end", s);
|
|
5747
6115
|
break;
|
|
5748
6116
|
case "PageUp":
|
|
5749
6117
|
e.preventDefault(), this.moveCellByPeriod(-1);
|
|
@@ -5769,8 +6137,8 @@ class F extends re {
|
|
|
5769
6137
|
if (!e) return;
|
|
5770
6138
|
const t = e.dataset.start, s = e.dataset.end;
|
|
5771
6139
|
if (!t || !s) return;
|
|
5772
|
-
const
|
|
5773
|
-
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);
|
|
5774
6142
|
}
|
|
5775
6143
|
/**
|
|
5776
6144
|
* Month-view keyboard handler (PRD scheduler-controlled-selection §5.1).
|
|
@@ -5792,6 +6160,14 @@ class F extends re {
|
|
|
5792
6160
|
case "ArrowDown":
|
|
5793
6161
|
e.preventDefault(), this.moveFocusedDateByDays(7);
|
|
5794
6162
|
return;
|
|
6163
|
+
// Promised by the announced keymap, previously dead — and worse, not
|
|
6164
|
+
// prevented, so the page scrolled the widget out of view instead.
|
|
6165
|
+
case "PageUp":
|
|
6166
|
+
e.preventDefault(), this.moveFocusedDateByMonths(-1);
|
|
6167
|
+
return;
|
|
6168
|
+
case "PageDown":
|
|
6169
|
+
e.preventDefault(), this.moveFocusedDateByMonths(1);
|
|
6170
|
+
return;
|
|
5795
6171
|
case "Enter":
|
|
5796
6172
|
e.preventDefault(), this.commitFocusedDateAsCreate(e, "day");
|
|
5797
6173
|
return;
|
|
@@ -5825,6 +6201,13 @@ class F extends re {
|
|
|
5825
6201
|
case "ArrowDown":
|
|
5826
6202
|
e.preventDefault(), this.moveFocusedDateByMonths(3);
|
|
5827
6203
|
return;
|
|
6204
|
+
// A year is the period here, so Page Up/Down move by twelve months.
|
|
6205
|
+
case "PageUp":
|
|
6206
|
+
e.preventDefault(), this.moveFocusedDateByMonths(-12);
|
|
6207
|
+
return;
|
|
6208
|
+
case "PageDown":
|
|
6209
|
+
e.preventDefault(), this.moveFocusedDateByMonths(12);
|
|
6210
|
+
return;
|
|
5828
6211
|
// Drill into the month, matching what clicking the month header does.
|
|
5829
6212
|
// Enter used to emit a MONTH-SPANNING event-create here, which no consumer
|
|
5830
6213
|
// could reasonably want from a year overview.
|
|
@@ -5858,12 +6241,12 @@ class F extends re {
|
|
|
5858
6241
|
t && this.stateManager.setFocusedDate(this.parseDayKey(t));
|
|
5859
6242
|
}
|
|
5860
6243
|
moveFocusedDateByDays(e) {
|
|
5861
|
-
const t = this.stateManager.getState(), s = t.focusedDate ?? t.date,
|
|
5862
|
-
|
|
6244
|
+
const t = this.stateManager.getState(), s = t.focusedDate ?? t.date, n = new Date(s);
|
|
6245
|
+
n.setDate(n.getDate() + e), this.commitFocusedDate(n);
|
|
5863
6246
|
}
|
|
5864
6247
|
moveFocusedDateByMonths(e) {
|
|
5865
|
-
const t = this.stateManager.getState(), s = t.focusedDate ?? t.date,
|
|
5866
|
-
|
|
6248
|
+
const t = this.stateManager.getState(), s = t.focusedDate ?? t.date, n = new Date(s);
|
|
6249
|
+
n.setMonth(n.getMonth() + e), this.commitFocusedDate(n);
|
|
5867
6250
|
}
|
|
5868
6251
|
/**
|
|
5869
6252
|
* Apply a focused-date update. If the new date crosses the displayed
|
|
@@ -5886,8 +6269,8 @@ class F extends re {
|
|
|
5886
6269
|
scrollAndFocusDateCell(e) {
|
|
5887
6270
|
const t = this.stateManager.getState(), s = this.shadowRoot;
|
|
5888
6271
|
if (!s) return;
|
|
5889
|
-
const
|
|
5890
|
-
|
|
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" }));
|
|
5891
6274
|
}
|
|
5892
6275
|
/**
|
|
5893
6276
|
* Emit `event-create` covering the focused day (month view) or focused
|
|
@@ -5895,81 +6278,81 @@ class F extends re {
|
|
|
5895
6278
|
* scheduler-controlled-selection — consumer constructs the actual event.
|
|
5896
6279
|
*/
|
|
5897
6280
|
commitFocusedDateAsCreate(e, t) {
|
|
5898
|
-
const s = this.stateManager.getState(),
|
|
5899
|
-
if (!
|
|
5900
|
-
const n = new Date(r);
|
|
5901
|
-
n.setHours(0, 0, 0, 0);
|
|
6281
|
+
const s = this.stateManager.getState(), n = s.focusedDate;
|
|
6282
|
+
if (!n) return;
|
|
5902
6283
|
const i = new Date(n);
|
|
5903
|
-
|
|
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 })) {
|
|
5904
6287
|
this.announceDenied();
|
|
5905
6288
|
return;
|
|
5906
6289
|
}
|
|
5907
6290
|
this.eventEmitter.emitEventCreate(
|
|
5908
|
-
{ start:
|
|
6291
|
+
{ start: i, end: r },
|
|
5909
6292
|
s.view,
|
|
5910
6293
|
e
|
|
5911
6294
|
);
|
|
5912
6295
|
}
|
|
5913
6296
|
moveCellByTime(e, t) {
|
|
5914
|
-
const s = this.stateManager.getState(),
|
|
5915
|
-
if (!
|
|
5916
|
-
const
|
|
5917
|
-
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);
|
|
5918
6301
|
}
|
|
5919
6302
|
/** Week view ArrowLeft/Right: ±1 day, same time-of-day. No-op on day view. */
|
|
5920
6303
|
moveCellByDay(e, t) {
|
|
5921
|
-
const s = this.stateManager.getState(),
|
|
5922
|
-
if (!
|
|
5923
|
-
const
|
|
5924
|
-
|
|
5925
|
-
const o = new Date(
|
|
5926
|
-
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);
|
|
5927
6310
|
}
|
|
5928
6311
|
/** Timeline ArrowUp/Down: ±1 resource, same time-of-day. PRD D1: cross-resource
|
|
5929
6312
|
* Shift+Arrow is intentionally ignored (resource is categorical). */
|
|
5930
6313
|
moveCellByResource(e, t) {
|
|
5931
|
-
const s = this.stateManager.getState(),
|
|
5932
|
-
if (!
|
|
5933
|
-
const
|
|
5934
|
-
|
|
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);
|
|
5935
6318
|
}
|
|
5936
6319
|
moveCellToColumnExtreme(e, t) {
|
|
5937
|
-
const s = this.stateManager.getState(),
|
|
5938
|
-
if (!
|
|
5939
|
-
const
|
|
5940
|
-
|
|
5941
|
-
const
|
|
5942
|
-
|
|
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,
|
|
5943
6326
|
s.options.slotDuration,
|
|
5944
6327
|
s.options.slotMinTime,
|
|
5945
6328
|
s.options.slotMaxTime
|
|
5946
|
-
), o = e === "start" ?
|
|
6329
|
+
), o = e === "start" ? r[0] : r[r.length - 1];
|
|
5947
6330
|
o && this.commitFocusMove(o, s.focusedResourceId, t);
|
|
5948
6331
|
}
|
|
5949
6332
|
moveCellToViewExtreme(e, t) {
|
|
5950
6333
|
const s = this.stateManager.getState();
|
|
5951
|
-
let
|
|
6334
|
+
let n = null, i = s.focusedResourceId;
|
|
5952
6335
|
switch (s.view) {
|
|
5953
6336
|
case "day": {
|
|
5954
|
-
const
|
|
5955
|
-
|
|
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];
|
|
5956
6339
|
break;
|
|
5957
6340
|
}
|
|
5958
6341
|
case "week": {
|
|
5959
|
-
const
|
|
5960
|
-
|
|
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];
|
|
5961
6344
|
break;
|
|
5962
6345
|
}
|
|
5963
6346
|
case "timeline": {
|
|
5964
|
-
const
|
|
5965
|
-
if (
|
|
5966
|
-
|
|
5967
|
-
const
|
|
5968
|
-
|
|
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];
|
|
5969
6352
|
break;
|
|
5970
6353
|
}
|
|
5971
6354
|
}
|
|
5972
|
-
|
|
6355
|
+
n && this.commitFocusMove(n, i, t);
|
|
5973
6356
|
}
|
|
5974
6357
|
/**
|
|
5975
6358
|
* PageUp/PageDown — advance one period (week or day) and re-focus the same
|
|
@@ -5977,17 +6360,17 @@ class F extends re {
|
|
|
5977
6360
|
* crossing a period boundary breaks the linear-range invariant.
|
|
5978
6361
|
*/
|
|
5979
6362
|
moveCellByPeriod(e) {
|
|
5980
|
-
const t = this.stateManager.getState(), s = t.focusedCell,
|
|
6363
|
+
const t = this.stateManager.getState(), s = t.focusedCell, n = t.date;
|
|
5981
6364
|
if (e > 0 ? this.next() : this.prev(), !s) return;
|
|
5982
|
-
const
|
|
5983
|
-
let
|
|
5984
|
-
if (
|
|
5985
|
-
|
|
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);
|
|
5986
6369
|
else {
|
|
5987
|
-
const l = h.getWeekDays(
|
|
5988
|
-
|
|
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);
|
|
5989
6372
|
}
|
|
5990
|
-
const o = (
|
|
6373
|
+
const o = (i.options.slotDuration ?? 1800) * 1e3, a = { start: r, end: new Date(r.getTime() + o) };
|
|
5991
6374
|
this.commitFocusMove(a, t.focusedResourceId, !1);
|
|
5992
6375
|
}
|
|
5993
6376
|
/**
|
|
@@ -5996,36 +6379,36 @@ class F extends re {
|
|
|
5996
6379
|
* focused cell or selection range.
|
|
5997
6380
|
*/
|
|
5998
6381
|
commitFocusMove(e, t, s) {
|
|
5999
|
-
const
|
|
6382
|
+
const n = this.stateManager.getState(), i = n.options.slotDuration ?? 1800;
|
|
6000
6383
|
if (s) {
|
|
6001
6384
|
this.stateManager.extendSelection(e, t), this.stateManager.setFocusedCell(e, t, !1);
|
|
6002
|
-
const
|
|
6003
|
-
this.liveAnnouncer.announce(
|
|
6385
|
+
const r = this.stateManager.getState();
|
|
6386
|
+
this.liveAnnouncer.announce(Se(r, i));
|
|
6004
6387
|
} else {
|
|
6005
6388
|
this.stateManager.setFocusedCell(e, t, !0);
|
|
6006
|
-
const
|
|
6007
|
-
this.liveAnnouncer.announce(
|
|
6389
|
+
const r = this.getResourceTitle(t);
|
|
6390
|
+
this.liveAnnouncer.announce(q(e, n.options, r));
|
|
6008
6391
|
}
|
|
6009
6392
|
this.scrollAndFocusCell(e, t);
|
|
6010
6393
|
}
|
|
6011
6394
|
cellIsWithinView(e, t) {
|
|
6012
6395
|
switch (t.view) {
|
|
6013
6396
|
case "day": {
|
|
6014
|
-
const s = this.parseTimeOnDay(t.date, t.options.slotMinTime),
|
|
6015
|
-
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();
|
|
6016
6399
|
}
|
|
6017
6400
|
case "week":
|
|
6018
6401
|
case "timeline": {
|
|
6019
|
-
const s = h.getWeekDays(t.date,
|
|
6020
|
-
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();
|
|
6021
6404
|
}
|
|
6022
6405
|
default:
|
|
6023
6406
|
return !1;
|
|
6024
6407
|
}
|
|
6025
6408
|
}
|
|
6026
6409
|
parseTimeOnDay(e, t) {
|
|
6027
|
-
const [s,
|
|
6028
|
-
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;
|
|
6029
6412
|
}
|
|
6030
6413
|
/**
|
|
6031
6414
|
* Walk the timeline's RENDERED row order: visible leaf resources, then the
|
|
@@ -6037,20 +6420,39 @@ class F extends re {
|
|
|
6037
6420
|
* The old version returned `null` for BOTH of the last two, which is exactly
|
|
6038
6421
|
* why the bucket was unreachable by keyboard.
|
|
6039
6422
|
*/
|
|
6040
|
-
adjacentRow(e, t, s) {
|
|
6041
|
-
const
|
|
6042
|
-
if (
|
|
6043
|
-
const
|
|
6044
|
-
if (
|
|
6045
|
-
const o =
|
|
6046
|
-
if (!(o < 0 || o >=
|
|
6047
|
-
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];
|
|
6048
6431
|
}
|
|
6432
|
+
/**
|
|
6433
|
+
* The rows a keyboard user can land on, in the order the timeline draws them.
|
|
6434
|
+
*
|
|
6435
|
+
* `includeGroups` is the whole difference between navigating and moving.
|
|
6436
|
+
* Arrow keys navigate, and a group row is a real row with real gridcells that
|
|
6437
|
+
* can even hold the grid's only tab stop — skipping it is what made the first
|
|
6438
|
+
* arrow press teleport the user to an unrelated row (audit M10). Move-mode
|
|
6439
|
+
* carries an event with it, and a group row renders no events container, so a
|
|
6440
|
+
* group must never be offered as a destination there.
|
|
6441
|
+
*/
|
|
6442
|
+
navigableRows(e, t) {
|
|
6443
|
+
const s = O.flatten(e.resources, e.collapsedGroups).filter((n) => n.visible && (t || ie(n.item))).map((n) => n.item.id);
|
|
6444
|
+
return (e.eventsByResource.get(null) ?? []).length > 0 && s.push(null), s;
|
|
6445
|
+
}
|
|
6446
|
+
/**
|
|
6447
|
+
* Title of any row, group rows included. `getAllResources` returns leaves
|
|
6448
|
+
* only by design, so while that was the lookup, arrowing onto a group row
|
|
6449
|
+
* announced the time with no row name at all — swapping M10's teleport for a
|
|
6450
|
+
* silent row rather than fixing it.
|
|
6451
|
+
*/
|
|
6049
6452
|
getResourceTitle(e) {
|
|
6050
6453
|
if (!e) return null;
|
|
6051
|
-
|
|
6052
|
-
|
|
6053
|
-
return null;
|
|
6454
|
+
const t = this.stateManager.getState();
|
|
6455
|
+
return O.flatten(t.resources, t.collapsedGroups).find((n) => n.item.id === e)?.item.title ?? null;
|
|
6054
6456
|
}
|
|
6055
6457
|
/**
|
|
6056
6458
|
* Find the cell DOM element for a (slot, resource) pair and call .focus()
|
|
@@ -6071,13 +6473,27 @@ class F extends re {
|
|
|
6071
6473
|
timeCellElement(e, t) {
|
|
6072
6474
|
const s = this.shadowRoot;
|
|
6073
6475
|
if (!s) return null;
|
|
6074
|
-
const
|
|
6075
|
-
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);
|
|
6076
6478
|
}
|
|
6077
6479
|
/** Re-focus whatever cell the keyboard model currently considers focused. */
|
|
6480
|
+
/**
|
|
6481
|
+
* Put focus back inside the grid after a rebuild or a view switch.
|
|
6482
|
+
*
|
|
6483
|
+
* The fallback is the point. `focusedCell` is null whenever the user never
|
|
6484
|
+
* entered the grid, and after a view switch it can name a cell the new view
|
|
6485
|
+
* does not render — in both cases this used to do nothing at all and focus
|
|
6486
|
+
* stayed on `<body>`. That is reachable from every drill-down control (the
|
|
6487
|
+
* week day-number, the more-link, the year month-header): activating one
|
|
6488
|
+
* destroys the element the user is standing on by definition, since it
|
|
6489
|
+
* rebuilds the view underneath them.
|
|
6490
|
+
*
|
|
6491
|
+
* Every view promotes exactly one cell to `tabindex="0"` as its roving tab
|
|
6492
|
+
* stop, so that cell is the correct "wherever this view considers current".
|
|
6493
|
+
*/
|
|
6078
6494
|
focusFocusedCell() {
|
|
6079
6495
|
const e = this.stateManager.getState();
|
|
6080
|
-
e.focusedCell && this.scrollAndFocusCell(e.focusedCell, e.focusedResourceId);
|
|
6496
|
+
e.focusedCell && this.scrollAndFocusCell(e.focusedCell, e.focusedResourceId), !this.shadowRoot?.activeElement && this.contentContainer?.querySelector('[role="gridcell"][tabindex="0"]')?.focus();
|
|
6081
6497
|
}
|
|
6082
6498
|
/**
|
|
6083
6499
|
* Parse a `YYYY-MM-DD` day key as a LOCAL date.
|
|
@@ -6104,26 +6520,26 @@ class F extends re {
|
|
|
6104
6520
|
* whether/when to clear the selection.
|
|
6105
6521
|
*/
|
|
6106
6522
|
createEventFromCellOrSelection(e) {
|
|
6107
|
-
const t = this.stateManager.getState(), s =
|
|
6108
|
-
let
|
|
6523
|
+
const t = this.stateManager.getState(), s = G(t);
|
|
6524
|
+
let n, i, r;
|
|
6109
6525
|
if (s)
|
|
6110
|
-
|
|
6526
|
+
n = s.start, i = s.end, r = t.selectionResourceId ?? void 0;
|
|
6111
6527
|
else if (t.focusedCell)
|
|
6112
|
-
|
|
6528
|
+
n = t.focusedCell.start, i = t.focusedCell.end, r = t.focusedResourceId ?? void 0;
|
|
6113
6529
|
else
|
|
6114
6530
|
return;
|
|
6115
|
-
if (!this.can("createEvent") || !this.allowsCreateAt({ start:
|
|
6531
|
+
if (!this.can("createEvent") || !this.allowsCreateAt({ start: n, end: i }, r)) {
|
|
6116
6532
|
this.announceDenied();
|
|
6117
6533
|
return;
|
|
6118
6534
|
}
|
|
6119
6535
|
this.eventEmitter.emitEventCreate(
|
|
6120
|
-
{ start:
|
|
6536
|
+
{ start: n, end: i },
|
|
6121
6537
|
t.view,
|
|
6122
6538
|
e,
|
|
6123
|
-
|
|
6539
|
+
r
|
|
6124
6540
|
), this.liveAnnouncer.announce(this.msg("selectionCommitted", {
|
|
6125
|
-
start: h.formatTime(
|
|
6126
|
-
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)
|
|
6127
6543
|
}));
|
|
6128
6544
|
}
|
|
6129
6545
|
/**
|
|
@@ -6153,15 +6569,15 @@ class F extends re {
|
|
|
6153
6569
|
resourceId: t
|
|
6154
6570
|
}
|
|
6155
6571
|
});
|
|
6156
|
-
const s = this.minutesPerSlot(),
|
|
6572
|
+
const s = this.minutesPerSlot(), n = this.stateManager.getState().view === "timeline";
|
|
6157
6573
|
this.liveAnnouncer.announce(
|
|
6158
|
-
this.msg(
|
|
6574
|
+
this.msg(n ? "moveModeEnteredTimeline" : "moveModeEntered", {
|
|
6159
6575
|
title: e.title,
|
|
6160
6576
|
minutes: s
|
|
6161
6577
|
})
|
|
6162
6578
|
), requestAnimationFrame(() => {
|
|
6163
|
-
const
|
|
6164
|
-
this.shadowRoot?.querySelector(
|
|
6579
|
+
const i = `[data-event-id="${this.cssEscape(e.id)}"]`;
|
|
6580
|
+
this.shadowRoot?.querySelector(i)?.focus({ preventScroll: !0 });
|
|
6165
6581
|
});
|
|
6166
6582
|
}
|
|
6167
6583
|
/**
|
|
@@ -6183,19 +6599,19 @@ class F extends re {
|
|
|
6183
6599
|
e.preventDefault(), this.commitEventMoveMode();
|
|
6184
6600
|
return;
|
|
6185
6601
|
}
|
|
6186
|
-
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;
|
|
6187
6603
|
switch (e.key) {
|
|
6188
6604
|
case "ArrowUp":
|
|
6189
|
-
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);
|
|
6190
6606
|
return;
|
|
6191
6607
|
case "ArrowDown":
|
|
6192
|
-
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);
|
|
6193
6609
|
return;
|
|
6194
6610
|
case "ArrowLeft":
|
|
6195
|
-
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));
|
|
6196
6612
|
return;
|
|
6197
6613
|
case "ArrowRight":
|
|
6198
|
-
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));
|
|
6199
6615
|
return;
|
|
6200
6616
|
}
|
|
6201
6617
|
}
|
|
@@ -6207,12 +6623,17 @@ class F extends re {
|
|
|
6207
6623
|
nudgeKeyboardMove(e) {
|
|
6208
6624
|
if (!this.keyboardMove) return;
|
|
6209
6625
|
const t = new Date(this.keyboardMove.workingStart.getTime() + e), s = new Date(this.keyboardMove.workingEnd.getTime() + e);
|
|
6210
|
-
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));
|
|
6211
6627
|
}
|
|
6212
6628
|
/** Walk to the next/previous row (timeline only). Updates the preview's resourceId. */
|
|
6213
6629
|
nudgeKeyboardMoveResource(e) {
|
|
6214
6630
|
if (!this.keyboardMove) return;
|
|
6215
|
-
const t = this.adjacentRow(
|
|
6631
|
+
const t = this.adjacentRow(
|
|
6632
|
+
this.keyboardMove.workingResourceId,
|
|
6633
|
+
e,
|
|
6634
|
+
this.stateManager.getState(),
|
|
6635
|
+
!1
|
|
6636
|
+
);
|
|
6216
6637
|
if (t === void 0) return;
|
|
6217
6638
|
this.keyboardMove.workingResourceId = t, this.applyKeyboardMovePreview();
|
|
6218
6639
|
const s = t === null ? this.msg("unassignedResource") : this.getResourceTitle(t) ?? t;
|
|
@@ -6229,18 +6650,18 @@ class F extends re {
|
|
|
6229
6650
|
this.announceDenied();
|
|
6230
6651
|
return;
|
|
6231
6652
|
}
|
|
6232
|
-
const
|
|
6233
|
-
let
|
|
6653
|
+
const n = this.minutesPerSlot() * 60 * 1e3;
|
|
6654
|
+
let i = this.keyboardMove.workingStart, r = this.keyboardMove.workingEnd;
|
|
6234
6655
|
if (e === "end") {
|
|
6235
|
-
if (
|
|
6236
|
-
} else if (
|
|
6237
|
-
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));
|
|
6238
6659
|
}
|
|
6239
6660
|
/** Mirror keyboardMove.working* into state.previewEvent so views render the destination,
|
|
6240
6661
|
* then scroll the destination into view so the sighted-keyboard user can see it (PRD D6). */
|
|
6241
6662
|
applyKeyboardMovePreview() {
|
|
6242
6663
|
if (!this.keyboardMove) return;
|
|
6243
|
-
const { eventId: e, workingStart: t, workingEnd: s, workingResourceId:
|
|
6664
|
+
const { eventId: e, workingStart: t, workingEnd: s, workingResourceId: n } = this.keyboardMove;
|
|
6244
6665
|
this.stateManager.setState({
|
|
6245
6666
|
previewEvent: {
|
|
6246
6667
|
start: t,
|
|
@@ -6248,13 +6669,13 @@ class F extends re {
|
|
|
6248
6669
|
// Explicit: `null` = the bucket row. A truthiness spread dropped it,
|
|
6249
6670
|
// so a nudge INTO the bucket rendered the ghost back in the event's
|
|
6250
6671
|
// original row (B26).
|
|
6251
|
-
resourceId:
|
|
6672
|
+
resourceId: n
|
|
6252
6673
|
}
|
|
6253
6674
|
}), requestAnimationFrame(() => {
|
|
6254
|
-
const
|
|
6255
|
-
if (!
|
|
6256
|
-
|
|
6257
|
-
const o = this.timeCellElement(t,
|
|
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);
|
|
6258
6679
|
o && typeof o.scrollIntoView == "function" && o.scrollIntoView({ block: "nearest", inline: "nearest" });
|
|
6259
6680
|
});
|
|
6260
6681
|
}
|
|
@@ -6296,32 +6717,32 @@ class F extends re {
|
|
|
6296
6717
|
// Slot Resolution
|
|
6297
6718
|
// ============================================
|
|
6298
6719
|
getSlotAtPosition(e, t) {
|
|
6299
|
-
const
|
|
6300
|
-
(
|
|
6720
|
+
const n = this.shadowRoot.elementsFromPoint(e, t).find(
|
|
6721
|
+
(i) => i.matches(".scheduler-time-slot, .scheduler-timeline-slot")
|
|
6301
6722
|
);
|
|
6302
|
-
return
|
|
6723
|
+
return n ? this.getSlotFromElement(n) : null;
|
|
6303
6724
|
}
|
|
6304
6725
|
getSlotFromElement(e) {
|
|
6305
6726
|
const t = e.dataset.start, s = e.dataset.end;
|
|
6306
6727
|
if (!t || !s) return null;
|
|
6307
|
-
const
|
|
6728
|
+
const n = e.dataset.resourceId ?? (e.dataset.unassigned ? null : void 0);
|
|
6308
6729
|
return {
|
|
6309
6730
|
start: new Date(t),
|
|
6310
6731
|
end: new Date(s),
|
|
6311
|
-
...
|
|
6732
|
+
...n !== void 0 ? { resourceId: n } : {}
|
|
6312
6733
|
};
|
|
6313
6734
|
}
|
|
6314
6735
|
}
|
|
6315
|
-
typeof customElements < "u" && !customElements.get("mp-scheduler") && customElements.define("mp-scheduler",
|
|
6736
|
+
typeof customElements < "u" && !customElements.get("mp-scheduler") && customElements.define("mp-scheduler", $);
|
|
6316
6737
|
export {
|
|
6317
|
-
|
|
6318
|
-
|
|
6319
|
-
|
|
6320
|
-
|
|
6321
|
-
|
|
6322
|
-
|
|
6323
|
-
|
|
6324
|
-
|
|
6325
|
-
|
|
6326
|
-
|
|
6738
|
+
K as BaseView,
|
|
6739
|
+
Ae as DayView,
|
|
6740
|
+
N as MonthView,
|
|
6741
|
+
$ as MpScheduler,
|
|
6742
|
+
De as SchedulerStateManager,
|
|
6743
|
+
I as TimelineView,
|
|
6744
|
+
Ie as WeekView,
|
|
6745
|
+
U as YearView,
|
|
6746
|
+
xe as createInitialState,
|
|
6747
|
+
Re as schedulerStyles
|
|
6327
6748
|
};
|