@mintplayer/web-components 3.1.0 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/a11y/index.mjs +1 -1
- package/a11y/src/focus-restore-controller.d.ts +18 -0
- package/a11y/src/host-aria.d.ts +2 -2
- package/a11y/src/index.d.ts +5 -8
- package/a11y/src/roving-focus.d.ts +5 -28
- package/accordion/index.mjs +58 -109
- package/accordion/src/components/mp-accordion.d.ts +13 -25
- package/badge/src/styles/badge.styles.d.ts +2 -0
- package/calendar/index.mjs +104 -1
- package/calendar/src/generated/calendar.view.generated.d.ts +8 -0
- package/calendar/src/generated/index.d.ts +1 -0
- package/calendar/src/generated/mp-calendar.generated.d.ts +70 -0
- package/calendar/src/index.d.ts +2 -1
- package/card/index.mjs +14 -51
- package/card/src/index.d.ts +2 -3
- package/card/src/mp-card.element.d.ts +15 -29
- package/carousel/index.mjs +169 -434
- package/carousel/src/generated/carousel-item.view.generated.d.ts +10 -0
- package/carousel/src/generated/carousel.view.generated.d.ts +10 -0
- package/carousel/src/generated/index.d.ts +2 -0
- package/carousel/src/generated/mp-carousel-item.generated.d.ts +20 -0
- package/carousel/src/generated/mp-carousel.generated.d.ts +110 -0
- package/carousel/src/index.d.ts +2 -3
- package/charts/hierarchy/index.mjs +252 -871
- package/charts/hierarchy/src/generated/hierarchy-chart.view.generated.d.ts +8 -0
- package/charts/hierarchy/src/generated/index.d.ts +1 -0
- package/charts/hierarchy/src/generated/mp-hierarchy-chart.generated.d.ts +254 -0
- package/charts/hierarchy/src/index.d.ts +2 -2
- package/charts/sparkline/index.mjs +30 -44
- package/charts/sparkline/src/components/mp-sparkline.d.ts +0 -1
- package/charts/trend/index.mjs +128 -320
- package/charts/trend/src/generated/index.d.ts +1 -0
- package/charts/trend/src/generated/mp-trend-chart.generated.d.ts +109 -0
- package/charts/trend/src/generated/trend-chart.view.generated.d.ts +8 -0
- package/charts/trend/src/index.d.ts +2 -2
- package/checkbox/index.mjs +276 -1
- package/chunks/a11y-CXIVMaQ_.mjs +287 -0
- package/chunks/datatable-Ce-UT16z.mjs +442 -0
- package/chunks/datetime-picker-BT6lb4qw.mjs +203 -0
- package/chunks/radio-fSMWIPFk.mjs +150 -0
- package/chunks/splitter-EuJmtwjW.mjs +120 -0
- package/chunks/{toggle-button-H1Ty5nnF.mjs → toggle-button-DWLu9iCm.mjs} +53 -77
- package/chunks/treeview-BFyPrpxn.mjs +118 -0
- package/code-snippet/index.mjs +117 -484
- package/code-snippet/src/generated/code-snippet.view.generated.d.ts +8 -0
- package/code-snippet/src/generated/index.d.ts +1 -0
- package/code-snippet/src/generated/mp-code-snippet.generated.d.ts +104 -0
- package/code-snippet/src/index.d.ts +2 -3
- package/custom-elements.json +16125 -59385
- package/datatable/index.mjs +1 -1
- package/datatable/src/generated/datatable.view.generated.d.ts +43 -0
- package/datatable/src/generated/index.d.ts +1 -0
- package/datatable/src/generated/mp-datatable.generated.d.ts +271 -0
- package/datatable/src/index.d.ts +3 -8
- package/datepicker/index.mjs +119 -141
- package/datepicker/src/generated/datepicker.view.generated.d.ts +8 -0
- package/datepicker/src/generated/index.d.ts +1 -0
- package/datepicker/src/generated/mp-datepicker.generated.d.ts +131 -0
- package/datepicker/src/index.d.ts +3 -1
- package/datetime-picker/index.mjs +1 -1
- package/datetime-picker/src/generated/datetime-picker.view.generated.d.ts +8 -0
- package/datetime-picker/src/generated/index.d.ts +1 -0
- package/datetime-picker/src/generated/mp-datetime-picker.generated.d.ts +158 -0
- package/datetime-picker/src/index.d.ts +2 -1
- package/dock/index.mjs +137 -1906
- package/dock/src/generated/dock-manager.view.generated.d.ts +15 -0
- package/dock/src/generated/dock-node.view.generated.d.ts +8 -0
- package/dock/src/generated/index.d.ts +1 -0
- package/dock/src/generated/mp-dock-manager.generated.d.ts +46 -0
- package/dock/src/index.d.ts +3 -2
- package/dropdown-menu/index.mjs +31 -147
- package/dropdown-menu/src/components/mp-dropdown-menu.d.ts +35 -46
- package/dropdown-menu/src/index.d.ts +1 -2
- package/file-manager/index.mjs +188 -903
- package/file-manager/src/generated/file-manager.view.generated.d.ts +8 -0
- package/file-manager/src/generated/index.d.ts +1 -0
- package/file-manager/src/generated/mp-file-manager.generated.d.ts +125 -0
- package/file-manager/src/index.d.ts +3 -5
- package/input-group/index.mjs +39 -1
- package/input-group/src/index.d.ts +1 -1
- package/input-group/src/mp-input-group.d.ts +29 -0
- package/machine/index.mjs +219 -9
- package/machine/src/content-query.d.ts +21 -0
- package/machine/src/core-controller.d.ts +27 -0
- package/machine/src/host-props.d.ts +87 -0
- package/machine/src/index.d.ts +4 -0
- package/machine/src/props-directive.d.ts +1 -1
- package/machine/src/teleport-directive.d.ts +20 -0
- package/multi-range/index.mjs +73 -230
- package/multi-range/src/generated/index.d.ts +1 -0
- package/multi-range/src/generated/mp-multi-range.generated.d.ts +102 -0
- package/multi-range/src/generated/multi-range.view.generated.d.ts +8 -0
- package/multi-range/src/index.d.ts +2 -2
- package/navbar/index.mjs +249 -236
- package/navbar/src/generated/index.d.ts +4 -0
- package/navbar/src/generated/mp-navbar-dropdown.generated.d.ts +44 -0
- package/navbar/src/generated/mp-navbar-item.generated.d.ts +40 -0
- package/navbar/src/generated/mp-navbar-nav.generated.d.ts +31 -0
- package/navbar/src/generated/mp-navbar.generated.d.ts +81 -0
- package/navbar/src/generated/navbar-dropdown.view.generated.d.ts +14 -0
- package/navbar/src/generated/navbar-item.view.generated.d.ts +10 -0
- package/navbar/src/generated/navbar-nav.view.generated.d.ts +10 -0
- package/navbar/src/generated/navbar.view.generated.d.ts +13 -0
- package/navbar/src/index.d.ts +2 -3
- package/otp-input/index.mjs +96 -236
- package/otp-input/src/generated/index.d.ts +1 -0
- package/otp-input/src/generated/mp-otp-input.generated.d.ts +113 -0
- package/otp-input/src/generated/otp-input.view.generated.d.ts +8 -0
- package/otp-input/src/index.d.ts +2 -4
- package/package.json +6 -37
- package/pagination/index.mjs +149 -1
- package/pagination/src/components/mp-pagination.d.ts +7 -45
- package/phone-input/index.mjs +151 -408
- package/phone-input/src/generated/index.d.ts +1 -0
- package/phone-input/src/generated/mp-phone-input.generated.d.ts +155 -0
- package/phone-input/src/generated/phone-input.view.generated.d.ts +8 -0
- package/phone-input/src/index.d.ts +2 -1
- package/query-builder/index.mjs +232 -1705
- package/query-builder/src/generated/index.d.ts +1 -0
- package/query-builder/src/generated/mp-query-builder.generated.d.ts +111 -0
- package/query-builder/src/generated/query-builder-item.view.generated.d.ts +16 -0
- package/query-builder/src/generated/query-builder.view.generated.d.ts +15 -0
- package/query-builder/src/index.d.ts +3 -27
- package/radio/index.mjs +1 -1
- package/radio/src/components/mp-radio.d.ts +38 -76
- package/radio-group/index.mjs +36 -99
- package/radio-group/src/components/mp-radio-group.d.ts +19 -32
- package/ribbon/index.mjs +1423 -2664
- package/ribbon/src/generated/index.d.ts +18 -0
- package/ribbon/src/generated/mp-quick-access-toolbar.generated.d.ts +31 -0
- package/ribbon/src/generated/mp-ribbon-button.generated.d.ts +83 -0
- package/ribbon/src/generated/mp-ribbon-checkbox.generated.d.ts +85 -0
- package/ribbon/src/generated/mp-ribbon-color-picker.generated.d.ts +85 -0
- package/ribbon/src/generated/mp-ribbon-combobox.generated.d.ts +89 -0
- package/ribbon/src/generated/mp-ribbon-contextual-tab-set.generated.d.ts +49 -0
- package/ribbon/src/generated/mp-ribbon-dropdown-button.generated.d.ts +88 -0
- package/ribbon/src/generated/mp-ribbon-gallery-item.generated.d.ts +63 -0
- package/ribbon/src/generated/mp-ribbon-gallery.generated.d.ts +91 -0
- package/ribbon/src/generated/mp-ribbon-group-button.generated.d.ts +90 -0
- package/ribbon/src/generated/mp-ribbon-group.generated.d.ts +85 -0
- package/ribbon/src/generated/mp-ribbon-menu-item.generated.d.ts +71 -0
- package/ribbon/src/generated/mp-ribbon-menu-separator.generated.d.ts +13 -0
- package/ribbon/src/generated/mp-ribbon-split-button.generated.d.ts +88 -0
- package/ribbon/src/generated/mp-ribbon-tab.generated.d.ts +61 -0
- package/ribbon/src/generated/mp-ribbon-template-item.generated.d.ts +30 -0
- package/ribbon/src/generated/mp-ribbon-toggle-button.generated.d.ts +91 -0
- package/ribbon/src/generated/mp-ribbon.generated.d.ts +98 -0
- package/ribbon/src/generated/quick-access-toolbar.view.generated.d.ts +10 -0
- package/ribbon/src/generated/ribbon-button.view.generated.d.ts +10 -0
- package/ribbon/src/generated/ribbon-check-box.view.generated.d.ts +8 -0
- package/ribbon/src/generated/ribbon-color-picker.view.generated.d.ts +8 -0
- package/ribbon/src/generated/ribbon-combo-box.view.generated.d.ts +9 -0
- package/ribbon/src/generated/ribbon-contextual-tab-set.view.generated.d.ts +10 -0
- package/ribbon/src/generated/ribbon-dropdown-button.view.generated.d.ts +11 -0
- package/ribbon/src/generated/ribbon-gallery-item.view.generated.d.ts +10 -0
- package/ribbon/src/generated/ribbon-gallery.view.generated.d.ts +11 -0
- package/ribbon/src/generated/ribbon-group-button.view.generated.d.ts +9 -0
- package/ribbon/src/generated/ribbon-group.view.generated.d.ts +10 -0
- package/ribbon/src/generated/ribbon-menu-item.view.generated.d.ts +10 -0
- package/ribbon/src/generated/ribbon-menu-separator.view.generated.d.ts +8 -0
- package/ribbon/src/generated/ribbon-split-button.view.generated.d.ts +11 -0
- package/ribbon/src/generated/ribbon-tab.view.generated.d.ts +10 -0
- package/ribbon/src/generated/ribbon-template-item.view.generated.d.ts +10 -0
- package/ribbon/src/generated/ribbon-toggle-button.view.generated.d.ts +10 -0
- package/ribbon/src/generated/ribbon.view.generated.d.ts +11 -0
- package/ribbon/src/index.d.ts +3 -10
- package/scheduler/index.mjs +489 -3605
- package/scheduler/src/generated/index.d.ts +1 -0
- package/scheduler/src/generated/mp-scheduler.generated.d.ts +128 -0
- package/scheduler/src/generated/sched-editor.view.generated.d.ts +8 -0
- package/scheduler/src/generated/sched-month.view.generated.d.ts +8 -0
- package/scheduler/src/generated/sched-popover-event.view.generated.d.ts +8 -0
- package/scheduler/src/generated/sched-popover.view.generated.d.ts +8 -0
- package/scheduler/src/generated/sched-row-panel.view.generated.d.ts +8 -0
- package/scheduler/src/generated/sched-time-grid.view.generated.d.ts +8 -0
- package/scheduler/src/generated/sched-timeline.view.generated.d.ts +8 -0
- package/scheduler/src/generated/sched-year.view.generated.d.ts +8 -0
- package/scheduler/src/generated/scheduler.view.generated.d.ts +8 -0
- package/scheduler/src/index.d.ts +4 -6
- package/select/index.mjs +165 -1
- package/select/src/generated/index.d.ts +1 -0
- package/select/src/generated/mp-select.generated.d.ts +130 -0
- package/select/src/generated/select.view.generated.d.ts +16 -0
- package/select/src/index.d.ts +2 -2
- package/shell/index.mjs +90 -100
- package/shell/src/components/mp-shell.d.ts +47 -38
- package/shell/src/index.d.ts +1 -2
- package/signature-pad/index.mjs +80 -171
- package/signature-pad/src/generated/index.d.ts +1 -0
- package/signature-pad/src/generated/mp-signature-pad.generated.d.ts +107 -0
- package/signature-pad/src/generated/signature-pad.view.generated.d.ts +8 -0
- package/signature-pad/src/index.d.ts +2 -2
- package/splitter/index.mjs +1 -1
- package/splitter/src/generated/index.d.ts +2 -0
- package/splitter/src/generated/mp-splitter-panel.generated.d.ts +20 -0
- package/splitter/src/generated/mp-splitter.generated.d.ts +62 -0
- package/splitter/src/generated/splitter-panel.view.generated.d.ts +10 -0
- package/splitter/src/generated/splitter.view.generated.d.ts +10 -0
- package/splitter/src/index.d.ts +2 -11
- package/tab-control/index.mjs +202 -1
- package/theming/color-mode.css +7 -6
- package/theming/index.mjs +36 -231
- package/theming/src/generated/index.d.ts +1 -0
- package/theming/src/generated/mp-theme-toggle.generated.d.ts +26 -0
- package/theming/src/generated/theme-toggle.view.generated.d.ts +8 -0
- package/theming/src/index.d.ts +2 -5
- package/timeline/index.mjs +282 -498
- package/timeline/src/generated/index.d.ts +2 -0
- package/timeline/src/generated/mp-timeline-item.generated.d.ts +105 -0
- package/timeline/src/generated/mp-timeline.generated.d.ts +123 -0
- package/timeline/src/generated/timeline-item.view.generated.d.ts +14 -0
- package/timeline/src/generated/timeline.view.generated.d.ts +58 -0
- package/timeline/src/index.d.ts +3 -5
- package/timepicker/index.mjs +202 -1
- package/timepicker/src/generated/index.d.ts +2 -0
- package/timepicker/src/generated/mp-time-list.generated.d.ts +69 -0
- package/timepicker/src/generated/mp-timepicker.generated.d.ts +123 -0
- package/timepicker/src/generated/time-list.view.generated.d.ts +8 -0
- package/timepicker/src/generated/timepicker.view.generated.d.ts +8 -0
- package/timepicker/src/index.d.ts +2 -2
- package/toggle-button/index.mjs +1 -1
- package/toggle-button/src/components/mp-toggle-button.d.ts +28 -33
- package/tree-select/index.mjs +266 -535
- package/tree-select/src/generated/index.d.ts +1 -0
- package/tree-select/src/generated/mp-tree-select.generated.d.ts +158 -0
- package/tree-select/src/generated/tree-select.view.generated.d.ts +36 -0
- package/tree-select/src/index.d.ts +3 -6
- package/treeview/index.mjs +1 -1
- package/treeview/src/generated/index.d.ts +1 -0
- package/treeview/src/generated/mp-treeview.generated.d.ts +82 -0
- package/treeview/src/generated/treeview.view.generated.d.ts +18 -0
- package/treeview/src/index.d.ts +2 -4
- package/typeahead/index.mjs +37 -29
- package/typeahead/src/components/mp-typeahead.d.ts +1 -0
- package/a11y/src/dismiss-stack.d.ts +0 -25
- package/a11y/src/focus-restore.d.ts +0 -116
- package/a11y/src/focus-trap.d.ts +0 -69
- package/a11y/src/inert-regions.d.ts +0 -52
- package/calendar/src/mp-calendar.element.d.ts +0 -124
- package/calendar/src/mp-calendar.element.template.d.ts +0 -2
- package/card/src/card-classes.d.ts +0 -33
- package/card/src/types/card-header-nav-style.d.ts +0 -1
- package/card/src/types/card-image-position.d.ts +0 -1
- package/carousel/src/components/index.d.ts +0 -1
- package/carousel/src/components/mp-carousel.d.ts +0 -58
- package/carousel/src/styles/carousel.styles.d.ts +0 -2
- package/carousel/src/styles/index.d.ts +0 -1
- package/carousel/src/types/carousel.d.ts +0 -10
- package/carousel/src/types/index.d.ts +0 -1
- package/charts/core/index.d.ts +0 -1
- package/charts/core/index.mjs +0 -503
- package/charts/core/src/arc.d.ts +0 -27
- package/charts/core/src/attributes.d.ts +0 -18
- package/charts/core/src/color.d.ts +0 -30
- package/charts/core/src/hierarchy-layout.d.ts +0 -68
- package/charts/core/src/index.d.ts +0 -8
- package/charts/core/src/label-fit.d.ts +0 -31
- package/charts/core/src/scale.d.ts +0 -21
- package/charts/core/src/types.d.ts +0 -52
- package/charts/core/src/view-window.d.ts +0 -46
- package/charts/hierarchy/src/components/index.d.ts +0 -1
- package/charts/hierarchy/src/components/mp-hierarchy-chart.d.ts +0 -320
- package/charts/hierarchy/src/styles/hierarchy-chart.styles.d.ts +0 -2
- package/charts/hierarchy/src/styles/index.d.ts +0 -1
- package/charts/trend/src/components/index.d.ts +0 -1
- package/charts/trend/src/components/mp-trend-chart.d.ts +0 -104
- package/charts/trend/src/styles/index.d.ts +0 -1
- package/charts/trend/src/styles/trend-chart.styles.d.ts +0 -2
- package/chunks/a11y-C6aX-lsZ.mjs +0 -532
- package/chunks/ac-aJXc45zA.mjs +0 -4
- package/chunks/ad-BTMXfwNh.mjs +0 -4
- package/chunks/ae-BrzD6osX.mjs +0 -4
- package/chunks/af-3UZ2_zTj.mjs +0 -4
- package/chunks/ag-KRBsuK2a.mjs +0 -4
- package/chunks/ai-BswLJAYs.mjs +0 -4
- package/chunks/al-wkJnSVxF.mjs +0 -4
- package/chunks/all-flags.generated-DtfbMnSZ.mjs +0 -249
- package/chunks/am-CVqI42UW.mjs +0 -4
- package/chunks/ao-85WVAZW6.mjs +0 -4
- package/chunks/ar-DJGfKADQ.mjs +0 -4
- package/chunks/as-BA11KqFF.mjs +0 -4
- package/chunks/at-BWbwtZ8t.mjs +0 -4
- package/chunks/au-gcOCUxgy.mjs +0 -4
- package/chunks/aw-cquGJK0_.mjs +0 -4
- package/chunks/ax-CqFz-_7-.mjs +0 -4
- package/chunks/az-CtGxDo7C.mjs +0 -4
- package/chunks/ba-Du5giA_b.mjs +0 -4
- package/chunks/bb-Bv08A_ob.mjs +0 -4
- package/chunks/bd-DNB5oj3n.mjs +0 -4
- package/chunks/be-CRVNdrRc.mjs +0 -4
- package/chunks/bf-CkLDaLFq.mjs +0 -4
- package/chunks/bg-5J0EZyQA.mjs +0 -4
- package/chunks/bh-Dm3fVyBc.mjs +0 -4
- package/chunks/bi-BpldTGS9.mjs +0 -4
- package/chunks/bj-Bn2B1hkk.mjs +0 -4
- package/chunks/bl-Dozbp4JI.mjs +0 -4
- package/chunks/bm-DMwDEJDn.mjs +0 -4
- package/chunks/bn-38iFiYIW.mjs +0 -4
- package/chunks/bo-C7Z0bS7Y.mjs +0 -4
- package/chunks/bq-Bp_dK3bp.mjs +0 -4
- package/chunks/br-C1y3qYTo.mjs +0 -4
- package/chunks/bs-DvapNTm6.mjs +0 -4
- package/chunks/bt-4BBK2CzL.mjs +0 -4
- package/chunks/bw-gFoFnfsO.mjs +0 -4
- package/chunks/by-BcXeEIqn.mjs +0 -4
- package/chunks/bz-DiNvPmet.mjs +0 -4
- package/chunks/ca-B6_-P3Ki.mjs +0 -4
- package/chunks/calendar-BufRj_ob.mjs +0 -270
- package/chunks/cc-1.generated-Bz6a4Z5J.mjs +0 -575
- package/chunks/cc-20.generated-B2Zbp_CG.mjs +0 -56
- package/chunks/cc-211.generated-ChWU4ZnK.mjs +0 -27
- package/chunks/cc-212.generated-rW7bueR8.mjs +0 -77
- package/chunks/cc-213.generated-Dk100iVd.mjs +0 -52
- package/chunks/cc-216.generated-Da9XXIxn.mjs +0 -37
- package/chunks/cc-218.generated-B9dPA_jz.mjs +0 -27
- package/chunks/cc-220.generated-BD583LXg.mjs +0 -26
- package/chunks/cc-221.generated-FnrRCGhQ.mjs +0 -41
- package/chunks/cc-222.generated-RIcsN1By.mjs +0 -30
- package/chunks/cc-223.generated-BJYOhmxL.mjs +0 -30
- package/chunks/cc-224.generated-ZVRf4s4P.mjs +0 -40
- package/chunks/cc-225.generated-B37F4h_L.mjs +0 -30
- package/chunks/cc-226.generated-DX6w8SIQ.mjs +0 -26
- package/chunks/cc-227.generated-DWvIJCqw.mjs +0 -35
- package/chunks/cc-228.generated-CYnF-A2j.mjs +0 -26
- package/chunks/cc-229.generated-BHENEfHM.mjs +0 -40
- package/chunks/cc-230.generated-CCkgyUCO.mjs +0 -53
- package/chunks/cc-231.generated-Cy_W19Ec.mjs +0 -50
- package/chunks/cc-232.generated-bZc5ux9j.mjs +0 -27
- package/chunks/cc-233.generated-DtiURqLW.mjs +0 -36
- package/chunks/cc-234.generated-ISth71Yl.mjs +0 -67
- package/chunks/cc-235.generated-PAizMnHl.mjs +0 -27
- package/chunks/cc-236.generated-ZPS5oQTo.mjs +0 -31
- package/chunks/cc-237.generated-fOpKOXN1.mjs +0 -34
- package/chunks/cc-238.generated-DLsZAArj.mjs +0 -36
- package/chunks/cc-239.generated-Dq7UEEQw.mjs +0 -26
- package/chunks/cc-240.generated-B5rtjDFe.mjs +0 -35
- package/chunks/cc-241.generated-C2tPOfsp.mjs +0 -40
- package/chunks/cc-242.generated-12ELhWHE.mjs +0 -35
- package/chunks/cc-243.generated-Co_QscFq.mjs +0 -64
- package/chunks/cc-244.generated-CHVaQJzk.mjs +0 -26
- package/chunks/cc-245.generated-Dlfots5d.mjs +0 -40
- package/chunks/cc-246.generated-ml5FnCdW.mjs +0 -26
- package/chunks/cc-247.generated-D8iUb2b4.mjs +0 -30
- package/chunks/cc-248.generated-ByNbG_tW.mjs +0 -37
- package/chunks/cc-249.generated-B1uFXVYg.mjs +0 -27
- package/chunks/cc-250.generated-Db4-CYfI.mjs +0 -44
- package/chunks/cc-251.generated-Dk9Nsbz4.mjs +0 -27
- package/chunks/cc-252.generated-DzLVy7Wj.mjs +0 -62
- package/chunks/cc-253.generated-BAAxb4Dd.mjs +0 -26
- package/chunks/cc-254.generated-CQb3622R.mjs +0 -55
- package/chunks/cc-255.generated-CkU7A9vn.mjs +0 -57
- package/chunks/cc-256.generated-CPuR1ls2.mjs +0 -46
- package/chunks/cc-257.generated-Bop3IKkH.mjs +0 -26
- package/chunks/cc-258.generated-CrhWzLYO.mjs +0 -34
- package/chunks/cc-260.generated-CM31-F_r.mjs +0 -42
- package/chunks/cc-261.generated-Cc1Yk2ga.mjs +0 -37
- package/chunks/cc-262.generated-iNq4Bsyg.mjs +0 -64
- package/chunks/cc-263.generated-BNSZQW1U.mjs +0 -100
- package/chunks/cc-264.generated-BYq3HF_4.mjs +0 -57
- package/chunks/cc-265.generated-55Al2n2g.mjs +0 -32
- package/chunks/cc-266.generated-CC24vRZU.mjs +0 -30
- package/chunks/cc-267.generated-Cy1cO0r8.mjs +0 -62
- package/chunks/cc-268.generated-CuFPqOA0.mjs +0 -40
- package/chunks/cc-269.generated-CCOchMHW.mjs +0 -31
- package/chunks/cc-27.generated-CgwGi0oo.mjs +0 -77
- package/chunks/cc-290.generated-WRbX8Uzp.mjs +0 -48
- package/chunks/cc-291.generated-CHqtf344.mjs +0 -27
- package/chunks/cc-297.generated-BNaG__hC.mjs +0 -36
- package/chunks/cc-298.generated-BXnC-JHy.mjs +0 -36
- package/chunks/cc-299.generated-B9EtLFYo.mjs +0 -36
- package/chunks/cc-30.generated-JiXqSdPm.mjs +0 -58
- package/chunks/cc-31.generated-T-PhKf6W.mjs +0 -91
- package/chunks/cc-32.generated-3jhsIH05.mjs +0 -58
- package/chunks/cc-33.generated-CKpraBu-.mjs +0 -43
- package/chunks/cc-34.generated-4ZOoUv3E.mjs +0 -41
- package/chunks/cc-350.generated-BZeZIKv3.mjs +0 -26
- package/chunks/cc-351.generated-Ca4DVFZ8.mjs +0 -41
- package/chunks/cc-352.generated-C5JanZQk.mjs +0 -96
- package/chunks/cc-353.generated-BgLwqLra.mjs +0 -98
- package/chunks/cc-354.generated-BgTnQRlC.mjs +0 -41
- package/chunks/cc-355.generated-DGYepZoL.mjs +0 -69
- package/chunks/cc-356.generated-BsVo-WVa.mjs +0 -36
- package/chunks/cc-357.generated-b5F9kBHS.mjs +0 -37
- package/chunks/cc-358.generated-sIEQmG3a.mjs +0 -136
- package/chunks/cc-359.generated-Djbt0V64.mjs +0 -92
- package/chunks/cc-36.generated-GYQWm_pU.mjs +0 -51
- package/chunks/cc-370.generated-CRvXymMq.mjs +0 -62
- package/chunks/cc-371.generated-BR2fz2JU.mjs +0 -37
- package/chunks/cc-372.generated-DNvOnI-D.mjs +0 -53
- package/chunks/cc-373.generated-CIFhOyHu.mjs +0 -52
- package/chunks/cc-374.generated-C3JO10F2.mjs +0 -58
- package/chunks/cc-375.generated-CdSXpaA5.mjs +0 -77
- package/chunks/cc-376.generated-JuZXGLxH.mjs +0 -47
- package/chunks/cc-377.generated-D6OxfwEg.mjs +0 -44
- package/chunks/cc-378.generated-1P6hL48M.mjs +0 -40
- package/chunks/cc-380.generated-DgzzIFUj.mjs +0 -58
- package/chunks/cc-381.generated-D_ItFJFw.mjs +0 -65
- package/chunks/cc-382.generated-DuYOeAO_.mjs +0 -37
- package/chunks/cc-383.generated-R6R6iExY.mjs +0 -58
- package/chunks/cc-385.generated-CsDeMCh1.mjs +0 -77
- package/chunks/cc-386.generated-CprplXRX.mjs +0 -67
- package/chunks/cc-387.generated-7j6TIOUR.mjs +0 -52
- package/chunks/cc-389.generated-BoKyJU1O.mjs +0 -52
- package/chunks/cc-39.generated-CD2WXEy7.mjs +0 -144
- package/chunks/cc-40.generated-BXVz6ZEf.mjs +0 -60
- package/chunks/cc-41.generated-Blq73F9R.mjs +0 -52
- package/chunks/cc-420.generated-CGBM0u2Z.mjs +0 -59
- package/chunks/cc-421.generated-TZXTbujK.mjs +0 -68
- package/chunks/cc-423.generated-0jWk7aQw.mjs +0 -51
- package/chunks/cc-43.generated-CWC77-QL.mjs +0 -124
- package/chunks/cc-44.generated-BjNEEm72.mjs +0 -185
- package/chunks/cc-45.generated-D2fAEViK.mjs +0 -31
- package/chunks/cc-46.generated-Cc7ziKiQ.mjs +0 -151
- package/chunks/cc-47.generated-BfsXOmTn.mjs +0 -68
- package/chunks/cc-48.generated-qLLhGlDM.mjs +0 -80
- package/chunks/cc-49.generated-V5s3zaiK.mjs +0 -207
- package/chunks/cc-500.generated-BthGq2Lz.mjs +0 -22
- package/chunks/cc-501.generated-D3OEBYfs.mjs +0 -34
- package/chunks/cc-502.generated-DuGMlanj.mjs +0 -35
- package/chunks/cc-503.generated-D6WQdJRe.mjs +0 -47
- package/chunks/cc-504.generated-CnaVgqYu.mjs +0 -30
- package/chunks/cc-505.generated-BymEBjCD.mjs +0 -30
- package/chunks/cc-506.generated-DECPXw0C.mjs +0 -40
- package/chunks/cc-507.generated-B3GcK3L_.mjs +0 -48
- package/chunks/cc-508.generated-Dyuwoas9.mjs +0 -45
- package/chunks/cc-509.generated-CFrvVAgw.mjs +0 -36
- package/chunks/cc-51.generated-Chb_sPYg.mjs +0 -59
- package/chunks/cc-52.generated-ByiHdoYn.mjs +0 -42
- package/chunks/cc-53.generated-DJSsiaD5.mjs +0 -63
- package/chunks/cc-54.generated-CHWQhBUJ.mjs +0 -99
- package/chunks/cc-55.generated-B1A8n_Eu.mjs +0 -62
- package/chunks/cc-56.generated-BIagT3im.mjs +0 -86
- package/chunks/cc-57.generated-BI-iKXi5.mjs +0 -56
- package/chunks/cc-58.generated-ChHB0yFM.mjs +0 -35
- package/chunks/cc-590.generated-eh5bgg8N.mjs +0 -96
- package/chunks/cc-591.generated-DtljIXWS.mjs +0 -48
- package/chunks/cc-592.generated-BFJXRJtp.mjs +0 -36
- package/chunks/cc-593.generated-BnzrDC9X.mjs +0 -57
- package/chunks/cc-594.generated-GeVqoxTf.mjs +0 -42
- package/chunks/cc-595.generated-Cb147_Es.mjs +0 -99
- package/chunks/cc-596.generated-Awrujeyi.mjs +0 -42
- package/chunks/cc-597.generated-x82tPU7m.mjs +0 -48
- package/chunks/cc-598.generated-C0CFFA9e.mjs +0 -90
- package/chunks/cc-599.generated-CBNiFVLG.mjs +0 -57
- package/chunks/cc-60.generated-BsEWXQGR.mjs +0 -72
- package/chunks/cc-61.generated-D1GBs6cI.mjs +0 -165
- package/chunks/cc-62.generated-wMxDe6Yk.mjs +0 -121
- package/chunks/cc-63.generated-CdGxow0i.mjs +0 -90
- package/chunks/cc-64.generated-RnYaXyOf.mjs +0 -88
- package/chunks/cc-65.generated-DLu3ZfUr.mjs +0 -57
- package/chunks/cc-66.generated-Bak_QXSf.mjs +0 -55
- package/chunks/cc-670.generated-C99GtcUk.mjs +0 -36
- package/chunks/cc-672.generated-CSfxhA5g.mjs +0 -30
- package/chunks/cc-673.generated-CBepp8Kp.mjs +0 -36
- package/chunks/cc-674.generated-CUruGGLX.mjs +0 -26
- package/chunks/cc-675.generated-CJAYoKiM.mjs +0 -41
- package/chunks/cc-676.generated-D0aVoKBX.mjs +0 -48
- package/chunks/cc-677.generated-CboriHtH.mjs +0 -36
- package/chunks/cc-678.generated-tV4dzsm1.mjs +0 -36
- package/chunks/cc-679.generated-r1SqDRTw.mjs +0 -35
- package/chunks/cc-680.generated-CUJSNlon.mjs +0 -26
- package/chunks/cc-681.generated-CqZqTSzv.mjs +0 -40
- package/chunks/cc-682.generated-DsTDPJJe.mjs +0 -26
- package/chunks/cc-683.generated-C46F0xza.mjs +0 -26
- package/chunks/cc-685.generated-3mzM0WBI.mjs +0 -47
- package/chunks/cc-686.generated-B7jAfSaz.mjs +0 -32
- package/chunks/cc-687.generated-DUkxCl-t.mjs +0 -31
- package/chunks/cc-688.generated-Bwg6wtz6.mjs +0 -42
- package/chunks/cc-689.generated-DIjPyQbi.mjs +0 -52
- package/chunks/cc-690.generated-BkBOgCj0.mjs +0 -27
- package/chunks/cc-691.generated-CRgqR_eS.mjs +0 -26
- package/chunks/cc-692.generated-xoIqpcZG.mjs +0 -36
- package/chunks/cc-7.generated-CVaWdxzG.mjs +0 -99
- package/chunks/cc-81.generated-BsK5UKLx.mjs +0 -100
- package/chunks/cc-82.generated-BcgfVP49.mjs +0 -96
- package/chunks/cc-84.generated-C_NDe2op.mjs +0 -81
- package/chunks/cc-850.generated-5uPEB20Q.mjs +0 -41
- package/chunks/cc-852.generated-Cmcj41zv.mjs +0 -66
- package/chunks/cc-853.generated-5Q5aYzYP.mjs +0 -34
- package/chunks/cc-855.generated-CyoP_AvI.mjs +0 -40
- package/chunks/cc-856.generated-UaGUxAVX.mjs +0 -45
- package/chunks/cc-86.generated-C76vQ-PG.mjs +0 -131
- package/chunks/cc-880.generated-DTQZvOwQ.mjs +0 -63
- package/chunks/cc-886.generated-BlEIkmSb.mjs +0 -89
- package/chunks/cc-90.generated-B6QJof50.mjs +0 -70
- package/chunks/cc-91.generated-BFtdPEFf.mjs +0 -120
- package/chunks/cc-92.generated-Dmc8JLXg.mjs +0 -84
- package/chunks/cc-93.generated-zx8cBy1Z.mjs +0 -27
- package/chunks/cc-94.generated-Blu9IgSY.mjs +0 -40
- package/chunks/cc-95.generated-DCr59wbp.mjs +0 -103
- package/chunks/cc-960.generated-D1_nf00O.mjs +0 -39
- package/chunks/cc-961.generated-DxRflmbQ.mjs +0 -42
- package/chunks/cc-962.generated-DxZQb06J.mjs +0 -58
- package/chunks/cc-963.generated-uiT34jBy.mjs +0 -34
- package/chunks/cc-964.generated-BOKCnQHJ.mjs +0 -45
- package/chunks/cc-965.generated-CxNoEz0A.mjs +0 -34
- package/chunks/cc-966.generated-DhI8Ntyw.mjs +0 -56
- package/chunks/cc-967.generated-ContxwI-.mjs +0 -36
- package/chunks/cc-968.generated-v531jzFw.mjs +0 -47
- package/chunks/cc-970.generated-ChNVoJlm.mjs +0 -55
- package/chunks/cc-971.generated-xlS_839v.mjs +0 -65
- package/chunks/cc-972.generated-C5zT9loz.mjs +0 -87
- package/chunks/cc-973.generated-GoMZ3x5A.mjs +0 -37
- package/chunks/cc-974.generated-CHoLGfhR.mjs +0 -48
- package/chunks/cc-975.generated-BILSPn9k.mjs +0 -30
- package/chunks/cc-976.generated-4w3Zjm18.mjs +0 -66
- package/chunks/cc-977.generated-QcknaTKZ.mjs +0 -48
- package/chunks/cc-98.generated-C8ajgwoF.mjs +0 -65
- package/chunks/cc-992.generated-DUtoyFJd.mjs +0 -44
- package/chunks/cc-993.generated-DA_HUZYq.mjs +0 -42
- package/chunks/cc-994.generated-Bs9TDYzb.mjs +0 -50
- package/chunks/cc-995.generated-DeCplFKG.mjs +0 -56
- package/chunks/cc-996.generated-DIoF8HI4.mjs +0 -45
- package/chunks/cc-998.generated-mB6cuCsE.mjs +0 -26
- package/chunks/cc-C0VrlA3_.mjs +0 -4
- package/chunks/cd-TfcK0f07.mjs +0 -4
- package/chunks/cf-Cr0ikDYa.mjs +0 -4
- package/chunks/cg-BeLZ5g5O.mjs +0 -4
- package/chunks/ch-cyq7xzGy.mjs +0 -4
- package/chunks/checkbox-EnxkCGiC.mjs +0 -271
- package/chunks/ci-D2pSb2Ih.mjs +0 -4
- package/chunks/ck-htfFHGea.mjs +0 -4
- package/chunks/cl-CoYa3Pmk.mjs +0 -4
- package/chunks/cm-D6uug-DA.mjs +0 -4
- package/chunks/cn-D48FvmT7.mjs +0 -4
- package/chunks/co-Dww2Azv_.mjs +0 -4
- package/chunks/color-mode-warning-BWDrpfmR.mjs +0 -11
- package/chunks/cr-T0UM2nAQ.mjs +0 -4
- package/chunks/cu-CvSN3Q4W.mjs +0 -4
- package/chunks/cv-CselBvqy.mjs +0 -4
- package/chunks/cw-DBlAOQBG.mjs +0 -4
- package/chunks/cx-CT3aGae9.mjs +0 -4
- package/chunks/cy-BgOT9gkN.mjs +0 -4
- package/chunks/cz-pyOSY6aP.mjs +0 -4
- package/chunks/datatable-FVQ8MQyR.mjs +0 -1804
- package/chunks/datetime-picker-BtroFVZZ.mjs +0 -373
- package/chunks/de-KGaNXoZN.mjs +0 -4
- package/chunks/decorate-_3lQte5d.mjs +0 -9
- package/chunks/dj-erTpydIV.mjs +0 -4
- package/chunks/dk-D1JuLNfO.mjs +0 -4
- package/chunks/dm-DCecBFF5.mjs +0 -4
- package/chunks/do-DSLfzWkU.mjs +0 -4
- package/chunks/dz-Ce9xahTz.mjs +0 -4
- package/chunks/ec-Bi76lWx3.mjs +0 -4
- package/chunks/ee-bSjXh051.mjs +0 -4
- package/chunks/eg-r6ELPNF6.mjs +0 -4
- package/chunks/eh-B9fkMRyx.mjs +0 -4
- package/chunks/er-udHBJByJ.mjs +0 -4
- package/chunks/es-Bu9WWdeR.mjs +0 -4
- package/chunks/et-CXZPC0sf.mjs +0 -4
- package/chunks/fi-dNG3mnm4.mjs +0 -4
- package/chunks/fj-DRC_-qUY.mjs +0 -4
- package/chunks/fk-J-PwBKbI.mjs +0 -4
- package/chunks/flags-BklZdqf-.mjs +0 -268
- package/chunks/fm-DdlXjhk_.mjs +0 -4
- package/chunks/fo-BF6Oan5b.mjs +0 -4
- package/chunks/form-check.styles-WIzQ8Lr8.mjs +0 -5
- package/chunks/form-control.styles-xkboF3PM.mjs +0 -5
- package/chunks/fr-m5fDKirC.mjs +0 -4
- package/chunks/ga-B4EBbkUA.mjs +0 -4
- package/chunks/gb-7vN41y_W.mjs +0 -4
- package/chunks/gd-oYxJTsCo.mjs +0 -4
- package/chunks/ge-DjFzwM58.mjs +0 -4
- package/chunks/gf-QpbaNTLf.mjs +0 -4
- package/chunks/gg-DD5U9436.mjs +0 -4
- package/chunks/gh-DwVF19eS.mjs +0 -4
- package/chunks/gi-UFWuuzET.mjs +0 -4
- package/chunks/gl-D6QboaPF.mjs +0 -4
- package/chunks/gm-DBMaPUVF.mjs +0 -4
- package/chunks/gn-CgBEf8H_.mjs +0 -4
- package/chunks/gp-CzgFkpC6.mjs +0 -4
- package/chunks/gq-Bnsg80y2.mjs +0 -4
- package/chunks/gr-BZRM9aE0.mjs +0 -4
- package/chunks/gt-BUUDyd82.mjs +0 -4
- package/chunks/gu-TRJAAUWQ.mjs +0 -4
- package/chunks/gw-D9LrzBrV.mjs +0 -4
- package/chunks/gy-DH746QP0.mjs +0 -4
- package/chunks/hk-JPHzGR1f.mjs +0 -4
- package/chunks/hn-tQE5mLlb.mjs +0 -4
- package/chunks/hr-BdLlK8MT.mjs +0 -4
- package/chunks/ht-efkMBTm5.mjs +0 -4
- package/chunks/hu-BQqGjm3B.mjs +0 -4
- package/chunks/id-DaJrUhdH.mjs +0 -4
- package/chunks/ie-BNbUpzRG.mjs +0 -4
- package/chunks/il-Cg79KHAv.mjs +0 -4
- package/chunks/im-Djx9n3WT.mjs +0 -4
- package/chunks/in-B43LtLH-.mjs +0 -4
- package/chunks/input-group-CjmHKUSw.mjs +0 -48
- package/chunks/invalid-feedback.styles-BAfKyqM0.mjs +0 -5
- package/chunks/io-BnYRzBj3.mjs +0 -4
- package/chunks/iq-DUn1QbRL.mjs +0 -4
- package/chunks/ir-DlyfLEkf.mjs +0 -4
- package/chunks/is-DQ_bn71q.mjs +0 -4
- package/chunks/it-BfPMagQk.mjs +0 -4
- package/chunks/je-BLm9fJmW.mjs +0 -4
- package/chunks/jm-CxLVl0Ry.mjs +0 -4
- package/chunks/jo-Cfupva0T.mjs +0 -4
- package/chunks/jp-iR_5eVnk.mjs +0 -4
- package/chunks/ke-QUXFhgYU.mjs +0 -4
- package/chunks/kg-C0ssUmgN.mjs +0 -4
- package/chunks/kh-9A3QNvDB.mjs +0 -4
- package/chunks/ki-bFdICXHj.mjs +0 -4
- package/chunks/km-CYuiTVlZ.mjs +0 -4
- package/chunks/kn-fqURi7WO.mjs +0 -4
- package/chunks/kp-B9J1sdkG.mjs +0 -4
- package/chunks/kr-hrrgo3DJ.mjs +0 -4
- package/chunks/kw-CsK5t1uI.mjs +0 -4
- package/chunks/ky-CIIoXV1x.mjs +0 -4
- package/chunks/kz-Q6lWH-Lp.mjs +0 -4
- package/chunks/la-BqrIQzV5.mjs +0 -4
- package/chunks/lb-f1wH5q4z.mjs +0 -4
- package/chunks/lc-DiPjKtKA.mjs +0 -4
- package/chunks/li-CC9A-Eoo.mjs +0 -4
- package/chunks/lk-DBBVyq9z.mjs +0 -4
- package/chunks/lr-CYmj0qzD.mjs +0 -4
- package/chunks/ls-5eFpOHA5.mjs +0 -4
- package/chunks/lt-DuXsTfKz.mjs +0 -4
- package/chunks/lu-l81BU1X-.mjs +0 -4
- package/chunks/lv-pBWGmb6y.mjs +0 -4
- package/chunks/ly-rQGukqgk.mjs +0 -4
- package/chunks/ma-D3s8fhJY.mjs +0 -4
- package/chunks/mc-C2UgSKD0.mjs +0 -4
- package/chunks/md-Bn-lDZyQ.mjs +0 -4
- package/chunks/me-CTM23YkQ.mjs +0 -4
- package/chunks/metadata-loaders.generated-BOHjz7Pm.mjs +0 -250
- package/chunks/mf-Dw6W2U1G.mjs +0 -4
- package/chunks/mg-BvSTuxdV.mjs +0 -4
- package/chunks/mh-DlNbre6t.mjs +0 -4
- package/chunks/mk-CMQgOxwU.mjs +0 -4
- package/chunks/ml-Dr5P0Yo_.mjs +0 -4
- package/chunks/mm-C6vWhwqu.mjs +0 -4
- package/chunks/mn-D3Xmr6k_.mjs +0 -4
- package/chunks/mo-BieTAs8C.mjs +0 -4
- package/chunks/mp-CkOXp1Ru.mjs +0 -4
- package/chunks/mq-Cjhq-UJo.mjs +0 -4
- package/chunks/mr-Dnfbj6zJ.mjs +0 -4
- package/chunks/ms-CTQctbcy.mjs +0 -4
- package/chunks/mt-CU4E0kx5.mjs +0 -4
- package/chunks/mu-D-VsOyS8.mjs +0 -4
- package/chunks/mv-BLAL7NFA.mjs +0 -4
- package/chunks/mw-v7uw9vtP.mjs +0 -4
- package/chunks/mx-eDyMiM1l.mjs +0 -4
- package/chunks/my-DZwL-5pY.mjs +0 -4
- package/chunks/mz-CUtVhMFS.mjs +0 -4
- package/chunks/na-BY29xZvs.mjs +0 -4
- package/chunks/nc-DeEXGMmA.mjs +0 -4
- package/chunks/ne-CLxU921A.mjs +0 -4
- package/chunks/nf-D_JOkQkl.mjs +0 -4
- package/chunks/ng-CR5xUr0F.mjs +0 -4
- package/chunks/ni-C15mTV4Y.mjs +0 -4
- package/chunks/nl-CLg7nWke.mjs +0 -4
- package/chunks/no-D56_k2KF.mjs +0 -4
- package/chunks/np-BAP7jy8o.mjs +0 -4
- package/chunks/nr-VKzWyaNU.mjs +0 -4
- package/chunks/nu-D3XZHNZP.mjs +0 -4
- package/chunks/nz-BdvILa2x.mjs +0 -4
- package/chunks/om-BuPCo8qp.mjs +0 -4
- package/chunks/overlay-kT0nfzL-.mjs +0 -275
- package/chunks/pa-CyYPeQbr.mjs +0 -4
- package/chunks/pagination-DgDp3v3u.mjs +0 -184
- package/chunks/pe-B-P9yq9y.mjs +0 -4
- package/chunks/pf-BEygN2Xk.mjs +0 -4
- package/chunks/pg-BbFUBN-z.mjs +0 -4
- package/chunks/ph-BwijTsiw.mjs +0 -4
- package/chunks/pk-DyS4XqKp.mjs +0 -4
- package/chunks/pl-Bs4VwV81.mjs +0 -4
- package/chunks/pm-DLEa5i47.mjs +0 -4
- package/chunks/pr-BWsOEP9w.mjs +0 -4
- package/chunks/ps-B_qECKr4.mjs +0 -4
- package/chunks/pt-C2_djybD.mjs +0 -4
- package/chunks/pw-D_NY3JPr.mjs +0 -4
- package/chunks/py-CndItMw9.mjs +0 -4
- package/chunks/qa-CD1uNFb9.mjs +0 -4
- package/chunks/radio-BO6g4B91.mjs +0 -260
- package/chunks/re-BW_tVnq3.mjs +0 -4
- package/chunks/ro-1-zfxYpt.mjs +0 -4
- package/chunks/rs-BoYWG9vg.mjs +0 -4
- package/chunks/ru-CYVEtP_y.mjs +0 -4
- package/chunks/rw-Bg3jblyd.mjs +0 -4
- package/chunks/sa-B69Q0suF.mjs +0 -4
- package/chunks/sb-BsEiWQfb.mjs +0 -4
- package/chunks/sc-DbArtz_B.mjs +0 -4
- package/chunks/scheduler-core-CoFpfrl5.mjs +0 -867
- package/chunks/sd-BBHgjmhj.mjs +0 -4
- package/chunks/se-BIv2B636.mjs +0 -4
- package/chunks/select-R-96AksV.mjs +0 -295
- package/chunks/sg-C5hxvYqk.mjs +0 -4
- package/chunks/sh-HM3W4hDH.mjs +0 -4
- package/chunks/si-DP1aBcfC.mjs +0 -4
- package/chunks/sj-BW7y-uq5.mjs +0 -4
- package/chunks/sk-i105Khwu.mjs +0 -4
- package/chunks/sl-Di2GF_yv.mjs +0 -4
- package/chunks/sm-CBa0TK4H.mjs +0 -4
- package/chunks/sn-DUHpXra8.mjs +0 -4
- package/chunks/so-BNbpnsu-.mjs +0 -4
- package/chunks/splitter-ByLyrd5H.mjs +0 -436
- package/chunks/sr-ao-a5_9y.mjs +0 -4
- package/chunks/ss-DcnzauNo.mjs +0 -4
- package/chunks/st-UM_GVNxZ.mjs +0 -4
- package/chunks/sv-DGf1zbvG.mjs +0 -4
- package/chunks/swiper-core-kwEab-Zw.mjs +0 -145
- package/chunks/sx-BswzV8CI.mjs +0 -4
- package/chunks/sy-9m1S8Kc1.mjs +0 -4
- package/chunks/sz-D85TIkXG.mjs +0 -4
- package/chunks/tab-control-CW53taeE.mjs +0 -202
- package/chunks/tc-C7PcDjFx.mjs +0 -4
- package/chunks/td-BPQVoqMT.mjs +0 -4
- package/chunks/tg-BrHdehFU.mjs +0 -4
- package/chunks/th-Dy_pGi_n.mjs +0 -4
- package/chunks/timeline-core-B9Lu8Qq4.mjs +0 -15
- package/chunks/timepicker-LaSAPnxw.mjs +0 -326
- package/chunks/tj-DMpkq8L_.mjs +0 -4
- package/chunks/tk-BnQPtoCZ.mjs +0 -4
- package/chunks/tl-ogyf_25A.mjs +0 -4
- package/chunks/tm-ftTOaKfg.mjs +0 -4
- package/chunks/tn-DH-O9SRy.mjs +0 -4
- package/chunks/to-CDqWnE6l.mjs +0 -4
- package/chunks/tr-CRzwaC_7.mjs +0 -4
- package/chunks/treeview-BuznGbcj.mjs +0 -302
- package/chunks/tt-CddKczAn.mjs +0 -4
- package/chunks/tv-b-Y36_Oq.mjs +0 -4
- package/chunks/tw-BbdD_Tku.mjs +0 -4
- package/chunks/tz-Det_pKDO.mjs +0 -4
- package/chunks/ua-CdODx9f1.mjs +0 -4
- package/chunks/ug-CTIJi1Jn.mjs +0 -4
- package/chunks/us-Dsgn127D.mjs +0 -4
- package/chunks/uy-CtFb0Nfv.mjs +0 -4
- package/chunks/uz-CqlGrq2Q.mjs +0 -4
- package/chunks/va-C-PHbkgG.mjs +0 -4
- package/chunks/vc-CtVMqDKl.mjs +0 -4
- package/chunks/ve-CBHWNLnB.mjs +0 -4
- package/chunks/vg-BN0gTtPV.mjs +0 -4
- package/chunks/vi-D91NT7D5.mjs +0 -4
- package/chunks/vn-Dz72HCr4.mjs +0 -4
- package/chunks/vu-Cmk5qbSr.mjs +0 -4
- package/chunks/wf-DAPtyg32.mjs +0 -4
- package/chunks/ws-es9JGzNi.mjs +0 -4
- package/chunks/xk-st-Xu64D.mjs +0 -4
- package/chunks/ye-Dmo8XEYa.mjs +0 -4
- package/chunks/yt-CNEu1wkH.mjs +0 -4
- package/chunks/za-CiZ4NsPE.mjs +0 -4
- package/chunks/zm-DqQAAfzp.mjs +0 -4
- package/chunks/zw-BIGE1hob.mjs +0 -4
- package/code-snippet/src/core/highlighter.d.ts +0 -39
- package/code-snippet/src/core/split-lines.d.ts +0 -44
- package/code-snippet/src/hljs-loaders.generated.d.ts +0 -14
- package/code-snippet/src/mp-code-snippet.element.d.ts +0 -223
- package/code-snippet/src/styles/code-snippet.styles.d.ts +0 -2
- package/code-snippet/src/styles/index.d.ts +0 -1
- package/code-snippet/src/types/code-line-annotation.d.ts +0 -29
- package/code-snippet/src/types/index.d.ts +0 -1
- package/datatable/src/components/column-resize.d.ts +0 -33
- package/datatable/src/components/index.d.ts +0 -2
- package/datatable/src/components/mp-datatable.d.ts +0 -992
- package/datatable/src/sort/compute-next-sort.d.ts +0 -18
- package/datatable/src/sort/index.d.ts +0 -3
- package/datatable/src/sort/sort-rows.d.ts +0 -6
- package/datatable/src/styles/datatable.light.styles.d.ts +0 -2
- package/datatable/src/styles/index.d.ts +0 -1
- package/datatable/src/types/column-def.d.ts +0 -114
- package/datatable/src/types/filter.d.ts +0 -138
- package/datatable/src/types/index.d.ts +0 -5
- package/datatable/src/types/labels.d.ts +0 -116
- package/datatable/src/types/tree.d.ts +0 -59
- package/datepicker/src/mp-datepicker.element.d.ts +0 -124
- package/datepicker/src/mp-datepicker.element.template.d.ts +0 -2
- package/datetime-picker/src/mp-datetime-picker.element.d.ts +0 -243
- package/datetime-picker/src/mp-datetime-picker.element.template.d.ts +0 -2
- package/dock/src/components/index.d.ts +0 -1
- package/dock/src/components/mint-dock-manager.element.d.ts +0 -370
- package/dock/src/components/mint-dock-manager.element.template.d.ts +0 -2
- package/dock/src/core/geometry.d.ts +0 -36
- package/dock/src/core/index.d.ts +0 -6
- package/dock/src/core/intersection-sizing.d.ts +0 -83
- package/dock/src/core/layout-tree.d.ts +0 -105
- package/dock/src/core/resize.d.ts +0 -143
- package/dock/src/core/sizes.d.ts +0 -31
- package/dock/src/core/types.d.ts +0 -58
- package/dock/src/types/dock-layout.d.ts +0 -65
- package/dock/src/types/index.d.ts +0 -1
- package/dropdown-menu/src/components/mp-dropdown-element.d.ts +0 -19
- package/dropdown-menu/src/styles/dropdown-menu.styles.d.ts +0 -2
- package/dropdown-menu/src/styles/index.d.ts +0 -1
- package/dropdown-menu/src/types/dropdown.d.ts +0 -20
- package/dropdown-menu/src/types/index.d.ts +0 -1
- package/file-manager/src/components/index.d.ts +0 -2
- package/file-manager/src/components/mp-file-manager.d.ts +0 -345
- package/file-manager/src/styles/file-manager.styles.d.ts +0 -2
- package/file-manager/src/styles/index.d.ts +0 -1
- package/file-manager/src/types/file-system-node.d.ts +0 -24
- package/file-manager/src/types/index.d.ts +0 -3
- package/file-manager/src/types/messages.d.ts +0 -52
- package/flags/README.md +0 -64
- package/flags/index.d.ts +0 -1
- package/flags/index.mjs +0 -1
- package/flags/src/all-flags.d.ts +0 -32
- package/flags/src/all-flags.generated.d.ts +0 -6
- package/flags/src/flag-loaders.generated.d.ts +0 -7
- package/flags/src/index.d.ts +0 -3
- package/flags/src/load-flag.d.ts +0 -13
- package/input-group/src/components/mp-input-group.d.ts +0 -61
- package/input-group/src/styles/index.d.ts +0 -1
- package/input-group/src/styles/input-group.styles.d.ts +0 -2
- package/multi-range/src/mint-multi-range.element.d.ts +0 -125
- package/multi-range/src/mint-multi-range.element.template.d.ts +0 -2
- package/multi-range/src/pointer-geometry.d.ts +0 -31
- package/multi-range/src/types/multi-range-orientation.d.ts +0 -1
- package/navbar/src/components/index.d.ts +0 -4
- package/navbar/src/components/mp-navbar-brand.d.ts +0 -13
- package/navbar/src/components/mp-navbar-dropdown.d.ts +0 -35
- package/navbar/src/components/mp-navbar-element.d.ts +0 -9
- package/navbar/src/components/mp-navbar-item.d.ts +0 -16
- package/navbar/src/components/mp-navbar.d.ts +0 -69
- package/navbar/src/styles/index.d.ts +0 -4
- package/navbar/src/styles/navbar-brand.styles.d.ts +0 -2
- package/navbar/src/styles/navbar-dropdown.styles.d.ts +0 -2
- package/navbar/src/styles/navbar-item.styles.d.ts +0 -2
- package/navbar/src/styles/navbar.styles.d.ts +0 -2
- package/navbar/src/types/index.d.ts +0 -1
- package/navbar/src/types/navbar.d.ts +0 -7
- package/otp-input/src/mint-otp-input.element.d.ts +0 -162
- package/otp-input/src/mint-otp-input.element.template.d.ts +0 -2
- package/otp-input/src/types/otp-input-case.d.ts +0 -1
- package/otp-input/src/types/otp-input-size.d.ts +0 -1
- package/otp-input/src/types/otp-input-type.d.ts +0 -1
- package/overlay/index.d.ts +0 -1
- package/overlay/index.mjs +0 -1
- package/overlay/src/index.d.ts +0 -4
- package/overlay/src/overlay-controller.d.ts +0 -291
- package/overlay/src/overlay-portal.d.ts +0 -53
- package/overlay/src/placement.d.ts +0 -48
- package/phone-core/README.md +0 -57
- package/phone-core/index.d.ts +0 -1
- package/phone-core/index.mjs +0 -120
- package/phone-core/src/countries.d.ts +0 -57
- package/phone-core/src/dial-code.d.ts +0 -30
- package/phone-core/src/index.d.ts +0 -4
- package/phone-core/src/metadata/cc-1.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-20.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-211.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-212.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-213.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-216.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-218.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-220.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-221.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-222.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-223.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-224.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-225.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-226.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-227.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-228.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-229.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-230.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-231.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-232.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-233.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-234.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-235.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-236.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-237.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-238.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-239.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-240.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-241.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-242.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-243.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-244.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-245.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-246.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-247.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-248.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-249.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-250.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-251.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-252.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-253.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-254.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-255.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-256.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-257.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-258.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-260.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-261.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-262.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-263.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-264.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-265.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-266.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-267.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-268.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-269.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-27.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-290.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-291.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-297.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-298.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-299.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-30.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-31.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-32.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-33.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-34.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-350.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-351.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-352.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-353.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-354.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-355.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-356.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-357.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-358.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-359.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-36.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-370.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-371.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-372.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-373.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-374.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-375.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-376.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-377.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-378.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-380.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-381.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-382.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-383.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-385.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-386.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-387.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-389.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-39.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-40.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-41.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-420.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-421.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-423.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-43.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-44.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-45.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-46.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-47.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-48.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-49.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-500.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-501.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-502.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-503.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-504.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-505.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-506.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-507.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-508.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-509.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-51.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-52.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-53.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-54.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-55.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-56.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-57.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-58.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-590.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-591.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-592.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-593.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-594.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-595.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-596.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-597.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-598.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-599.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-60.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-61.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-62.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-63.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-64.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-65.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-66.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-670.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-672.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-673.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-674.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-675.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-676.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-677.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-678.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-679.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-680.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-681.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-682.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-683.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-685.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-686.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-687.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-688.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-689.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-690.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-691.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-692.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-7.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-81.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-82.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-84.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-850.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-852.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-853.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-855.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-856.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-86.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-880.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-886.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-90.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-91.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-92.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-93.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-94.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-95.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-960.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-961.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-962.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-963.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-964.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-965.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-966.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-967.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-968.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-970.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-971.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-972.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-973.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-974.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-975.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-976.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-977.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-98.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-992.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-993.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-994.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-995.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-996.generated.d.ts +0 -3
- package/phone-core/src/metadata/cc-998.generated.d.ts +0 -3
- package/phone-core/src/metadata-loaders.generated.d.ts +0 -15
- package/phone-core/src/validation.d.ts +0 -55
- package/phone-input/src/components/caret.d.ts +0 -25
- package/phone-input/src/components/mp-phone-input.d.ts +0 -158
- package/phone-input/src/components/stack.d.ts +0 -8
- package/phone-input/src/styles/index.d.ts +0 -1
- package/phone-input/src/styles/phone-input.styles.d.ts +0 -2
- package/query-builder/src/context.d.ts +0 -14
- package/query-builder/src/dnd/drag-controller.d.ts +0 -73
- package/query-builder/src/model/default-tree.d.ts +0 -7
- package/query-builder/src/model/editor.d.ts +0 -15
- package/query-builder/src/model/errors.d.ts +0 -6
- package/query-builder/src/model/expression.d.ts +0 -22
- package/query-builder/src/model/field-def.d.ts +0 -17
- package/query-builder/src/model/messages.d.ts +0 -26
- package/query-builder/src/model/operator-overrides.d.ts +0 -21
- package/query-builder/src/model/operators.d.ts +0 -8
- package/query-builder/src/model/saved-query.d.ts +0 -6
- package/query-builder/src/model/sort.d.ts +0 -9
- package/query-builder/src/model/tree-ops.d.ts +0 -56
- package/query-builder/src/mp-query-builder.element.d.ts +0 -162
- package/query-builder/src/mp-query-builder.light.styles.d.ts +0 -2
- package/query-builder/src/mp-query-condition.element.d.ts +0 -45
- package/query-builder/src/mp-query-condition.light.styles.d.ts +0 -2
- package/query-builder/src/mp-query-group.element.d.ts +0 -52
- package/query-builder/src/mp-query-group.light.styles.d.ts +0 -2
- package/query-builder/src/mp-query-subquery.element.d.ts +0 -37
- package/query-builder/src/mp-query-subquery.light.styles.d.ts +0 -2
- package/query-builder/src/preview/render-expression.d.ts +0 -23
- package/query-builder/src/value-editors/builtin-editors.d.ts +0 -6
- package/query-builder/src/visitor/visit-tree.d.ts +0 -29
- package/query-builder/src/visitor/visitor-types.d.ts +0 -15
- package/ribbon/src/core/band-text-color.d.ts +0 -10
- package/ribbon/src/core/key-tip-allocator.d.ts +0 -10
- package/ribbon/src/core/plan-reduce-steps.d.ts +0 -62
- package/ribbon/src/items/index.d.ts +0 -15
- package/ribbon/src/items/mp-ribbon-button.element.d.ts +0 -10
- package/ribbon/src/items/mp-ribbon-checkbox.element.d.ts +0 -11
- package/ribbon/src/items/mp-ribbon-color-picker.element.d.ts +0 -12
- package/ribbon/src/items/mp-ribbon-combobox.element.d.ts +0 -19
- package/ribbon/src/items/mp-ribbon-dropdown-button.element.d.ts +0 -16
- package/ribbon/src/items/mp-ribbon-gallery-item.element.d.ts +0 -15
- package/ribbon/src/items/mp-ribbon-gallery.element.d.ts +0 -11
- package/ribbon/src/items/mp-ribbon-group-button.element.d.ts +0 -18
- package/ribbon/src/items/mp-ribbon-item-base.d.ts +0 -68
- package/ribbon/src/items/mp-ribbon-menu-item.element.d.ts +0 -13
- package/ribbon/src/items/mp-ribbon-menu-separator.element.d.ts +0 -6
- package/ribbon/src/items/mp-ribbon-split-button.element.d.ts +0 -23
- package/ribbon/src/items/mp-ribbon-template-item.element.d.ts +0 -12
- package/ribbon/src/items/mp-ribbon-toggle-button.element.d.ts +0 -12
- package/ribbon/src/mp-quick-access-toolbar.element.d.ts +0 -46
- package/ribbon/src/mp-ribbon-contextual-tab-set.element.d.ts +0 -18
- package/ribbon/src/mp-ribbon-group.element.d.ts +0 -59
- package/ribbon/src/mp-ribbon-tab.element.d.ts +0 -72
- package/ribbon/src/mp-ribbon.element.d.ts +0 -200
- package/ribbon/src/types/ribbon.types.d.ts +0 -4
- package/scheduler/src/components/mp-scheduler.d.ts +0 -877
- package/scheduler/src/drag/drag-manager.d.ts +0 -82
- package/scheduler/src/drag/drag-preview.d.ts +0 -42
- package/scheduler/src/drag/drag-state-machine.d.ts +0 -102
- package/scheduler/src/drag/drag-types.d.ts +0 -104
- package/scheduler/src/drag/index.d.ts +0 -4
- package/scheduler/src/events/index.d.ts +0 -1
- package/scheduler/src/events/scheduler-event-emitter.d.ts +0 -68
- package/scheduler/src/input/index.d.ts +0 -2
- package/scheduler/src/input/input-handler.d.ts +0 -139
- package/scheduler/src/input/pointer-event.d.ts +0 -39
- package/scheduler/src/state/scheduler-state.d.ts +0 -241
- package/scheduler/src/styles/scheduler.styles.d.ts +0 -2
- package/scheduler/src/utils/geometry.d.ts +0 -39
- package/scheduler/src/views/base-view.d.ts +0 -182
- package/scheduler/src/views/day-view.d.ts +0 -31
- package/scheduler/src/views/index.d.ts +0 -6
- package/scheduler/src/views/month-view.d.ts +0 -27
- package/scheduler/src/views/timeline-view.d.ts +0 -191
- package/scheduler/src/views/week-view.d.ts +0 -34
- package/scheduler/src/views/year-view.d.ts +0 -34
- package/scheduler-core/index.d.ts +0 -1
- package/scheduler-core/index.mjs +0 -1
- package/scheduler-core/src/index.d.ts +0 -3
- package/scheduler-core/src/models/drag-state.d.ts +0 -43
- package/scheduler-core/src/models/event.d.ts +0 -115
- package/scheduler-core/src/models/events.d.ts +0 -94
- package/scheduler-core/src/models/index.d.ts +0 -9
- package/scheduler-core/src/models/messages.d.ts +0 -192
- package/scheduler-core/src/models/options.d.ts +0 -165
- package/scheduler-core/src/models/permissions.d.ts +0 -114
- package/scheduler-core/src/models/resource.d.ts +0 -58
- package/scheduler-core/src/models/time-slot.d.ts +0 -46
- package/scheduler-core/src/models/types.d.ts +0 -20
- package/scheduler-core/src/services/date.service.d.ts +0 -194
- package/scheduler-core/src/services/index.d.ts +0 -4
- package/scheduler-core/src/services/position.service.d.ts +0 -35
- package/scheduler-core/src/services/resource.service.d.ts +0 -85
- package/scheduler-core/src/services/timeline.service.d.ts +0 -94
- package/scheduler-core/src/utils/color.d.ts +0 -65
- package/scheduler-core/src/utils/dom.d.ts +0 -54
- package/scheduler-core/src/utils/id.d.ts +0 -16
- package/scheduler-core/src/utils/index.d.ts +0 -3
- package/select/src/components/index.d.ts +0 -2
- package/select/src/components/mp-select.d.ts +0 -178
- package/select/src/styles/index.d.ts +0 -1
- package/select/src/styles/select.styles.d.ts +0 -2
- package/shell/src/styles/index.d.ts +0 -1
- package/shell/src/types/index.d.ts +0 -1
- package/shell/src/types/shell-state.d.ts +0 -8
- package/signature-pad/src/canvas-point.d.ts +0 -26
- package/signature-pad/src/mp-signature-pad.element.d.ts +0 -137
- package/signature-pad/src/mp-signature-pad.element.template.d.ts +0 -2
- package/signature-pad/src/types/signature.d.ts +0 -12
- package/splitter/src/components/index.d.ts +0 -2
- package/splitter/src/components/mp-splitter.d.ts +0 -132
- package/splitter/src/input/index.d.ts +0 -4
- package/splitter/src/input/input-handler.d.ts +0 -36
- package/splitter/src/input/pointer-event.d.ts +0 -9
- package/splitter/src/managers/index.d.ts +0 -3
- package/splitter/src/managers/rescale-panel-sizes.d.ts +0 -14
- package/splitter/src/managers/resize-manager.d.ts +0 -13
- package/splitter/src/state/index.d.ts +0 -2
- package/splitter/src/state/splitter-state.d.ts +0 -33
- package/splitter/src/styles/index.d.ts +0 -1
- package/splitter/src/styles/splitter.styles.d.ts +0 -2
- package/splitter/src/types/direction.d.ts +0 -1
- package/splitter/src/types/index.d.ts +0 -5
- package/splitter/src/types/panel-info.d.ts +0 -6
- package/splitter/src/types/point.d.ts +0 -4
- package/splitter/src/types/resize-operation.d.ts +0 -13
- package/swiper-core/index.d.ts +0 -1
- package/swiper-core/index.mjs +0 -1
- package/swiper-core/src/index-machine.d.ts +0 -59
- package/swiper-core/src/index.d.ts +0 -4
- package/swiper-core/src/keymap.d.ts +0 -2
- package/swiper-core/src/models/index.d.ts +0 -1
- package/swiper-core/src/models/types.d.ts +0 -99
- package/swiper-core/src/pointer-arbiter.d.ts +0 -45
- package/theming/src/components/mp-theme-toggle.d.ts +0 -71
- package/theming/src/cookie.d.ts +0 -31
- package/theming/src/preboot.d.ts +0 -1
- package/theming/src/resolve.d.ts +0 -36
- package/theming/src/store.d.ts +0 -27
- package/theming/src/styles/theme-toggle.styles.d.ts +0 -2
- package/theming/src/testing/fake-broadcast-channel.d.ts +0 -35
- package/theming/src/toggle-modes.d.ts +0 -23
- package/timeline/src/components/index.d.ts +0 -2
- package/timeline/src/components/mp-timeline-item.d.ts +0 -63
- package/timeline/src/components/mp-timeline.d.ts +0 -134
- package/timeline/src/styles/index.d.ts +0 -2
- package/timeline/src/styles/timeline-item.styles.d.ts +0 -2
- package/timeline/src/styles/timeline.styles.d.ts +0 -2
- package/timeline-core/index.d.ts +0 -1
- package/timeline-core/index.mjs +0 -1
- package/timeline-core/src/index.d.ts +0 -2
- package/timeline-core/src/models/context.d.ts +0 -39
- package/timeline-core/src/models/index.d.ts +0 -2
- package/timeline-core/src/models/timeline-item.d.ts +0 -44
- package/timeline-core/src/resolve-sides.d.ts +0 -12
- package/timepicker/src/mp-time-list.element.d.ts +0 -148
- package/timepicker/src/mp-time-list.element.template.d.ts +0 -2
- package/timepicker/src/mp-timepicker.element.d.ts +0 -124
- package/timepicker/src/mp-timepicker.element.template.d.ts +0 -2
- package/tree-select/src/components/index.d.ts +0 -2
- package/tree-select/src/components/mp-tree-select.d.ts +0 -170
- package/tree-select/src/providers/in-memory-provider.d.ts +0 -29
- package/tree-select/src/styles/index.d.ts +0 -1
- package/tree-select/src/styles/tree-select.light.styles.d.ts +0 -2
- package/tree-select/src/types/index.d.ts +0 -1
- package/tree-select/src/types/tree-select.d.ts +0 -51
- package/treeview/src/components/index.d.ts +0 -2
- package/treeview/src/components/mp-treeview.d.ts +0 -124
- package/treeview/src/styles/index.d.ts +0 -1
- package/treeview/src/styles/treeview.light.styles.d.ts +0 -2
- package/treeview/src/types/index.d.ts +0 -1
- package/treeview/src/types/tree-node.d.ts +0 -14
package/scheduler/index.mjs
CHANGED
|
@@ -1,3643 +1,527 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import "
|
|
4
|
-
import {
|
|
5
|
-
import "
|
|
6
|
-
import "
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
previewEvent: null,
|
|
65
|
-
collapsedGroups: /* @__PURE__ */ new Set(),
|
|
66
|
-
isMouseDown: !1,
|
|
67
|
-
isLoading: !1,
|
|
68
|
-
focusedCell: null,
|
|
69
|
-
focusedResourceId: null,
|
|
70
|
-
selectionAnchor: null,
|
|
71
|
-
selectionExtent: null,
|
|
72
|
-
selectionResourceId: null,
|
|
73
|
-
keyboardMoveEventId: null,
|
|
74
|
-
focusedDate: null
|
|
75
|
-
};
|
|
1
|
+
import { CoreController as e, booleanAttribute as t, numberAttribute as n, props as r, stringAttribute as i } from "../machine/index.mjs";
|
|
2
|
+
import "../chunks/datetime-picker-BT6lb4qw.mjs";
|
|
3
|
+
import { LitElement as a, html as o, nothing as s } from "lit";
|
|
4
|
+
import { installLightStyles as c } from "@mintplayer/ui-core/scoped-styles";
|
|
5
|
+
import { repeat as l } from "lit/directives/repeat.js";
|
|
6
|
+
import { styleMap as u } from "lit/directives/style-map.js";
|
|
7
|
+
import { SchedulerStateManager as d, createInitialState as f, schedulerCore as p, schedulerScopedStyles as m } from "@mintplayer/ui-core/scheduler";
|
|
8
|
+
import { generateEventId as h, generateGroupId as g, generateResourceId as _ } from "@mintplayer/ui-core/scheduler-core";
|
|
9
|
+
//#region libs/mintplayer-web-components/scheduler/src/generated/sched-time-grid.view.generated.ts
|
|
10
|
+
function v({ grid: e, slots: t = {} }) {
|
|
11
|
+
return o`
|
|
12
|
+
<div data-mps="scheduler" ${r(e.headerRow)}>
|
|
13
|
+
<div data-mps="scheduler" ${r(e.gutterSpace)}></div>
|
|
14
|
+
${l(e.headers, (e) => e.key, (e) => o`
|
|
15
|
+
<div data-mps="scheduler" ${r(e.bag)}>
|
|
16
|
+
<div data-mps="scheduler" ${r(e.nameBag)}>${e.name}</div>
|
|
17
|
+
<div data-mps="scheduler" ${r(e.numberBag)}>${e.number}</div>
|
|
18
|
+
${e.monthYearBag ? o`
|
|
19
|
+
<div data-mps="scheduler" ${r(e.monthYearBag)}>${e.monthYear}</div>
|
|
20
|
+
` : s}
|
|
21
|
+
</div>
|
|
22
|
+
`)}
|
|
23
|
+
</div>
|
|
24
|
+
<div data-mps="scheduler" ${r(e.grid)}>
|
|
25
|
+
<div data-mps="scheduler" ${r(e.gutter)}>
|
|
26
|
+
${l(e.labels, (e) => e.key, (e) => o`
|
|
27
|
+
<div data-mps="scheduler" ${r(e.bag)}>${e.text}</div>
|
|
28
|
+
`)}
|
|
29
|
+
</div>
|
|
30
|
+
<div data-mps="scheduler" ${r(e.days)}>
|
|
31
|
+
${l(e.columns, (e) => e.key, (e) => o`
|
|
32
|
+
<div data-mps="scheduler" ${r(e.bag)}>
|
|
33
|
+
${l(e.slots, (e) => e.key, (e) => o`
|
|
34
|
+
<div data-mps="scheduler" ${r(e.bag)}></div>
|
|
35
|
+
`)}
|
|
36
|
+
<div data-mps="scheduler" ${r(e.events)}>
|
|
37
|
+
${l(e.boxes, (e) => e.key, (e) => o`
|
|
38
|
+
<div data-mps="scheduler" ${r(e.bag)} style=${u(e.style)}>
|
|
39
|
+
<div data-mps="scheduler" ${r(e.content)}>
|
|
40
|
+
<div data-mps="scheduler" ${r(e.titleBag)}>${e.title}</div>
|
|
41
|
+
${e.timeBag ? o`
|
|
42
|
+
<div data-mps="scheduler" ${r(e.timeBag)}>${e.time}</div>
|
|
43
|
+
` : s}
|
|
44
|
+
</div>
|
|
45
|
+
${l(e.handles, (e) => e.key, (e) => o`
|
|
46
|
+
<div data-mps="scheduler" ${r(e.bag)}>
|
|
47
|
+
<span data-mps="scheduler" ${r(e.glyph)}></span>
|
|
48
|
+
</div>
|
|
49
|
+
`)}
|
|
50
|
+
</div>
|
|
51
|
+
`)}
|
|
52
|
+
${l(e.previews, (e) => e.key, (e) => o`
|
|
53
|
+
<div data-mps="scheduler" ${r(e.bag)} style=${u(e.style)}></div>
|
|
54
|
+
`)}
|
|
55
|
+
</div>
|
|
56
|
+
${e.now ? o`
|
|
57
|
+
<div data-mps="scheduler" ${r(e.now.bag)} style=${u(e.now.style)}></div>
|
|
58
|
+
` : s}
|
|
59
|
+
</div>
|
|
60
|
+
`)}
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
`;
|
|
76
64
|
}
|
|
77
|
-
var O = class {
|
|
78
|
-
constructor(e = {}) {
|
|
79
|
-
this.listeners = /* @__PURE__ */ new Set(), this.warnedUnassignedIds = /* @__PURE__ */ new Set(), this.warnedDanglingIds = /* @__PURE__ */ new Set(), this.flatEventsInput = [], this.seededGroupIds = /* @__PURE__ */ new Set(), this.state = D(e);
|
|
80
|
-
}
|
|
81
|
-
getState() {
|
|
82
|
-
return this.state;
|
|
83
|
-
}
|
|
84
|
-
setState(e) {
|
|
85
|
-
let t = typeof e == "function" ? e(this.state) : e, n = {
|
|
86
|
-
...this.state,
|
|
87
|
-
...t
|
|
88
|
-
}, r = n.resources !== this.state.resources || !this.state.resourceById;
|
|
89
|
-
r && (n.resourceById = T(n.resources)), (n.events !== this.state.events || r || !this.state.eventsByResource) && (n.eventsByResource = E(n.events, n.resourceById)), this.state = n, this.warnUnassignedEvents(), this.warnDanglingEvents(), this.notifyListeners();
|
|
90
|
-
}
|
|
91
|
-
warnUnassignedEvents() {
|
|
92
|
-
if (!this.state.options.requireEventResource) return;
|
|
93
|
-
let e = (this.state.eventsByResource?.get(null) ?? []).filter((e) => !this.warnedUnassignedIds.has(e.id));
|
|
94
|
-
if (e.length !== 0) {
|
|
95
|
-
for (let t of e) this.warnedUnassignedIds.add(t.id);
|
|
96
|
-
console.warn(`[mp-scheduler] requireEventResource is set, but ${e.length} event(s) have no resourceId. They render in the "(No resource)" row. Ids: ` + e.map((e) => e.id).join(", "));
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
warnDanglingEvents() {
|
|
100
|
-
if (this.state.resources.length === 0) return;
|
|
101
|
-
let e = this.state.events.filter((e) => e.resourceId != null && !this.state.resourceById.has(e.resourceId) && !this.warnedDanglingIds.has(e.id));
|
|
102
|
-
if (e.length !== 0) {
|
|
103
|
-
for (let t of e) this.warnedDanglingIds.add(t.id);
|
|
104
|
-
console.warn(`[mp-scheduler] ${e.length} event(s) reference a resource that does not exist. They render in the "(No resource)" row. If a resource was deleted, clear or reassign its events' resourceId. Ids: ` + e.map((e) => `${e.id} (resourceId: ${e.resourceId})`).join(", "));
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
subscribe(e) {
|
|
108
|
-
return this.listeners.add(e), () => this.listeners.delete(e);
|
|
109
|
-
}
|
|
110
|
-
notifyListeners() {
|
|
111
|
-
for (let e of this.listeners) e(this.state);
|
|
112
|
-
}
|
|
113
|
-
setView(e) {
|
|
114
|
-
this.setState({ view: e });
|
|
115
|
-
}
|
|
116
|
-
setDate(e) {
|
|
117
|
-
this.setState({ date: e });
|
|
118
|
-
}
|
|
119
|
-
setEvents(e) {
|
|
120
|
-
this.flatEventsInput = e, this.setState((t) => ({ events: C(e, t.resources) }));
|
|
121
|
-
}
|
|
122
|
-
addEvent(e) {
|
|
123
|
-
this.flatEventsInput = [...this.flatEventsInput, e], this.setState((t) => ({ events: [...t.events, e] }));
|
|
124
|
-
}
|
|
125
|
-
updateEvent(e) {
|
|
126
|
-
this.flatEventsInput = this.flatEventsInput.map((t) => t.id === e.id ? e : t), this.setState((t) => ({
|
|
127
|
-
events: t.events.map((t) => t.id === e.id ? e : t),
|
|
128
|
-
selectedEvent: t.selectedEvent?.id === e.id ? e : t.selectedEvent
|
|
129
|
-
}));
|
|
130
|
-
}
|
|
131
|
-
removeEvent(e) {
|
|
132
|
-
this.flatEventsInput = this.flatEventsInput.filter((t) => t.id !== e), this.setState((t) => ({ events: t.events.filter((t) => t.id !== e) }));
|
|
133
|
-
}
|
|
134
|
-
setResources(e) {
|
|
135
|
-
this.setState((t) => ({
|
|
136
|
-
resources: e,
|
|
137
|
-
events: C(this.flatEventsInput, e),
|
|
138
|
-
collapsedGroups: w(e, t.collapsedGroups, this.seededGroupIds)
|
|
139
|
-
}));
|
|
140
|
-
}
|
|
141
|
-
toggleGroupCollapse(e) {
|
|
142
|
-
this.setState((t) => {
|
|
143
|
-
let n = new Set(t.collapsedGroups);
|
|
144
|
-
return n.has(e) ? n.delete(e) : n.add(e), { collapsedGroups: n };
|
|
145
|
-
});
|
|
146
|
-
}
|
|
147
|
-
setSelectedEvent(e) {
|
|
148
|
-
this.setState({ selectedEvent: e });
|
|
149
|
-
}
|
|
150
|
-
setHoveredEvent(e) {
|
|
151
|
-
this.setState({ hoveredEvent: e });
|
|
152
|
-
}
|
|
153
|
-
setHoveredSlot(e) {
|
|
154
|
-
this.setState({ hoveredSlot: e });
|
|
155
|
-
}
|
|
156
|
-
startDrag(e) {
|
|
157
|
-
this.setState({
|
|
158
|
-
dragState: e,
|
|
159
|
-
previewEvent: e.preview,
|
|
160
|
-
isMouseDown: !0
|
|
161
|
-
});
|
|
162
|
-
}
|
|
163
|
-
updateDrag(e, t) {
|
|
164
|
-
this.setState((n) => ({
|
|
165
|
-
dragState: n.dragState ? {
|
|
166
|
-
...n.dragState,
|
|
167
|
-
currentSlot: e,
|
|
168
|
-
preview: t
|
|
169
|
-
} : null,
|
|
170
|
-
previewEvent: t
|
|
171
|
-
}));
|
|
172
|
-
}
|
|
173
|
-
endDrag() {
|
|
174
|
-
this.setState({
|
|
175
|
-
dragState: null,
|
|
176
|
-
previewEvent: null,
|
|
177
|
-
isMouseDown: !1
|
|
178
|
-
});
|
|
179
|
-
}
|
|
180
|
-
setMouseDown(e) {
|
|
181
|
-
this.setState({ isMouseDown: e });
|
|
182
|
-
}
|
|
183
|
-
setLoading(e) {
|
|
184
|
-
this.setState({ isLoading: e });
|
|
185
|
-
}
|
|
186
|
-
setOptions(e) {
|
|
187
|
-
this.setState((t) => ({ options: {
|
|
188
|
-
...t.options,
|
|
189
|
-
...e
|
|
190
|
-
} }));
|
|
191
|
-
}
|
|
192
|
-
next() {
|
|
193
|
-
this.setState((e) => {
|
|
194
|
-
let t = new Date(e.date);
|
|
195
|
-
switch (e.view) {
|
|
196
|
-
case "year":
|
|
197
|
-
t.setFullYear(t.getFullYear() + 1);
|
|
198
|
-
break;
|
|
199
|
-
case "month":
|
|
200
|
-
t.setMonth(t.getMonth() + 1);
|
|
201
|
-
break;
|
|
202
|
-
case "week":
|
|
203
|
-
case "timeline":
|
|
204
|
-
t.setDate(t.getDate() + 7);
|
|
205
|
-
break;
|
|
206
|
-
case "day": t.setDate(t.getDate() + 1);
|
|
207
|
-
}
|
|
208
|
-
return { date: t };
|
|
209
|
-
});
|
|
210
|
-
}
|
|
211
|
-
prev() {
|
|
212
|
-
this.setState((e) => {
|
|
213
|
-
let t = new Date(e.date);
|
|
214
|
-
switch (e.view) {
|
|
215
|
-
case "year":
|
|
216
|
-
t.setFullYear(t.getFullYear() - 1);
|
|
217
|
-
break;
|
|
218
|
-
case "month":
|
|
219
|
-
t.setMonth(t.getMonth() - 1);
|
|
220
|
-
break;
|
|
221
|
-
case "week":
|
|
222
|
-
case "timeline":
|
|
223
|
-
t.setDate(t.getDate() - 7);
|
|
224
|
-
break;
|
|
225
|
-
case "day": t.setDate(t.getDate() - 1);
|
|
226
|
-
}
|
|
227
|
-
return { date: t };
|
|
228
|
-
});
|
|
229
|
-
}
|
|
230
|
-
today() {
|
|
231
|
-
this.setState({ date: /* @__PURE__ */ new Date() });
|
|
232
|
-
}
|
|
233
|
-
gotoDate(e) {
|
|
234
|
-
this.setState({ date: e });
|
|
235
|
-
}
|
|
236
|
-
setFocusedCell(e, t = null, n = !0) {
|
|
237
|
-
n ? this.setState({
|
|
238
|
-
focusedCell: e,
|
|
239
|
-
focusedResourceId: t,
|
|
240
|
-
selectionAnchor: null,
|
|
241
|
-
selectionExtent: null,
|
|
242
|
-
selectionResourceId: null
|
|
243
|
-
}) : this.setState({
|
|
244
|
-
focusedCell: e,
|
|
245
|
-
focusedResourceId: t
|
|
246
|
-
});
|
|
247
|
-
}
|
|
248
|
-
extendSelection(e, t = null) {
|
|
249
|
-
this.setState((n) => ({
|
|
250
|
-
selectionAnchor: n.selectionAnchor ?? n.focusedCell ?? e,
|
|
251
|
-
selectionExtent: e,
|
|
252
|
-
selectionResourceId: n.selectionResourceId ?? n.focusedResourceId ?? t
|
|
253
|
-
}));
|
|
254
|
-
}
|
|
255
|
-
clearSelection() {
|
|
256
|
-
this.setState({
|
|
257
|
-
selectionAnchor: null,
|
|
258
|
-
selectionExtent: null,
|
|
259
|
-
selectionResourceId: null
|
|
260
|
-
});
|
|
261
|
-
}
|
|
262
|
-
setFocusedDate(e) {
|
|
263
|
-
this.setState({ focusedDate: e });
|
|
264
|
-
}
|
|
265
|
-
};
|
|
266
65
|
//#endregion
|
|
267
|
-
//#region libs/mintplayer-web-components/scheduler/src/
|
|
268
|
-
function
|
|
269
|
-
return
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
weekday: "long",
|
|
296
|
-
month: "short",
|
|
297
|
-
day: "numeric"
|
|
298
|
-
})}, ${_.formatTime(e.start, t.timeFormat, t.locale)}`];
|
|
299
|
-
return n && r.push(n), r.join(", ");
|
|
300
|
-
}
|
|
301
|
-
function P(e, t) {
|
|
302
|
-
let n = j(e);
|
|
303
|
-
if (!n) return "";
|
|
304
|
-
let { options: r } = e, i = r.timeFormat, o = {
|
|
305
|
-
weekday: "short",
|
|
306
|
-
month: "short",
|
|
307
|
-
day: "numeric"
|
|
308
|
-
}, s = `${_.formatTime(n.start, i, r.locale)} ${n.start.toLocaleDateString(r.locale, o)}`, c = `${_.formatTime(n.end, i, r.locale)} ${n.end.toLocaleDateString(r.locale, o)}`, l = t * 1e3, u = Math.max(1, Math.round((n.end.getTime() - n.start.getTime()) / l)), d = h(r.messages);
|
|
309
|
-
return a(d.selection, {
|
|
310
|
-
start: s,
|
|
311
|
-
end: c,
|
|
312
|
-
count: u,
|
|
313
|
-
slots: u === 1 ? d.slotSingular : d.slotPlural
|
|
314
|
-
});
|
|
315
|
-
}
|
|
316
|
-
function F(e, t, n) {
|
|
317
|
-
let r = n.timeFormat, i = e.toLocaleDateString(n.locale, {
|
|
318
|
-
weekday: "short",
|
|
319
|
-
month: "short",
|
|
320
|
-
day: "numeric"
|
|
321
|
-
});
|
|
322
|
-
return a(h(n.messages).movedTo, {
|
|
323
|
-
start: _.formatTime(e, r, n.locale),
|
|
324
|
-
end: _.formatTime(t, r, n.locale),
|
|
325
|
-
day: i
|
|
326
|
-
});
|
|
327
|
-
}
|
|
328
|
-
function ee(e, t, n, r) {
|
|
329
|
-
let i = r.timeFormat, o = h(r.messages);
|
|
330
|
-
return a(o.resizedEdge, {
|
|
331
|
-
edge: n === "start" ? o.startEdge : o.endEdge,
|
|
332
|
-
start: _.formatTime(e, i, r.locale),
|
|
333
|
-
end: _.formatTime(t, i, r.locale)
|
|
334
|
-
});
|
|
335
|
-
}
|
|
336
|
-
var te = 40, ne = 20;
|
|
337
|
-
function I(e, t) {
|
|
338
|
-
let [n = 0, r = 0, i = 0] = t.split(":").map(Number), a = new Date(e);
|
|
339
|
-
return a.setHours(0, 0, 0, 0), a.setSeconds(n * 3600 + r * 60 + i), a;
|
|
66
|
+
//#region libs/mintplayer-web-components/scheduler/src/generated/sched-month.view.generated.ts
|
|
67
|
+
function y({ month: e, slots: t = {} }) {
|
|
68
|
+
return o`
|
|
69
|
+
<div data-mps="scheduler" ${r(e.headerRow)}>
|
|
70
|
+
${l(e.headers, (e) => e.key, (e) => o`
|
|
71
|
+
<div data-mps="scheduler" ${r(e.bag)}>${e.text}</div>
|
|
72
|
+
`)}
|
|
73
|
+
</div>
|
|
74
|
+
<div data-mps="scheduler" ${r(e.grid)}>
|
|
75
|
+
${l(e.weeks, (e) => e.key, (e) => o`
|
|
76
|
+
<div data-mps="scheduler" ${r(e.bag)}>
|
|
77
|
+
${l(e.days, (e) => e.key, (e) => o`
|
|
78
|
+
<div data-mps="scheduler" ${r(e.bag)}>
|
|
79
|
+
<div data-mps="scheduler" ${r(e.numberBag)}>${e.number}</div>
|
|
80
|
+
<div data-mps="scheduler" ${r(e.events)}>
|
|
81
|
+
${l(e.items, (e) => e.key, (e) => o`
|
|
82
|
+
<div data-mps="scheduler" ${r(e.bag)} style=${u(e.style)}>${e.title}</div>
|
|
83
|
+
`)}
|
|
84
|
+
${e.more ? o`
|
|
85
|
+
<div data-mps="scheduler" ${r(e.more.bag)}>${e.more.text}</div>
|
|
86
|
+
` : s}
|
|
87
|
+
</div>
|
|
88
|
+
</div>
|
|
89
|
+
`)}
|
|
90
|
+
</div>
|
|
91
|
+
`)}
|
|
92
|
+
</div>
|
|
93
|
+
`;
|
|
340
94
|
}
|
|
341
|
-
var L = class {
|
|
342
|
-
constructor(e, t) {
|
|
343
|
-
this.pendingScroll = null, this.container = e, this.state = t;
|
|
344
|
-
}
|
|
345
|
-
get firstDayOfWeek() {
|
|
346
|
-
return _.resolveFirstDayOfWeek(this.state.options.firstDayOfWeek, this.state.options.locale);
|
|
347
|
-
}
|
|
348
|
-
updateNowIndicator() {}
|
|
349
|
-
getElement() {
|
|
350
|
-
return this.container;
|
|
351
|
-
}
|
|
352
|
-
applyEventColors(e, t) {
|
|
353
|
-
let n = f(t, this.state.resourceById, this.state.options.defaultEventColor);
|
|
354
|
-
e.style.backgroundColor = n, e.style.color = t.textColor ?? c(n);
|
|
355
|
-
}
|
|
356
|
-
partGeometry(e, t, n) {
|
|
357
|
-
let r = n.slotDuration ?? 1800, i = I(e, n.slotMinTime ?? "00:00:00"), a = I(e, n.slotMaxTime ?? "24:00:00"), o = Math.max(e.getTime(), i.getTime()), s = Math.min(t.getTime(), a.getTime());
|
|
358
|
-
if (s <= o) return null;
|
|
359
|
-
let c = te / (r * 1e3);
|
|
360
|
-
return {
|
|
361
|
-
top: (o - i.getTime()) * c,
|
|
362
|
-
height: Math.max((s - o) * c, ne)
|
|
363
|
-
};
|
|
364
|
-
}
|
|
365
|
-
createElement(e, ...t) {
|
|
366
|
-
let n = document.createElement(e);
|
|
367
|
-
return t.length > 0 && n.classList.add(...t), n;
|
|
368
|
-
}
|
|
369
|
-
setData(e, t) {
|
|
370
|
-
for (let [n, r] of Object.entries(t)) e.dataset[n] = String(r);
|
|
371
|
-
}
|
|
372
|
-
clearContainer() {
|
|
373
|
-
let e = !this.pendingScroll && (this.container.scrollLeft || this.container.scrollTop);
|
|
374
|
-
if (e && (this.pendingScroll = {
|
|
375
|
-
left: this.container.scrollLeft,
|
|
376
|
-
top: this.container.scrollTop
|
|
377
|
-
}), this.container.innerHTML = "", e) {
|
|
378
|
-
let e = {
|
|
379
|
-
left: this.container.scrollLeft,
|
|
380
|
-
top: this.container.scrollTop
|
|
381
|
-
};
|
|
382
|
-
queueMicrotask(() => {
|
|
383
|
-
let t = this.pendingScroll;
|
|
384
|
-
this.pendingScroll = null, t && this.container.scrollLeft === e.left && this.container.scrollTop === e.top && (this.container.scrollLeft = t.left, this.container.scrollTop = t.top);
|
|
385
|
-
});
|
|
386
|
-
}
|
|
387
|
-
for (let e of [
|
|
388
|
-
"role",
|
|
389
|
-
"aria-label",
|
|
390
|
-
"aria-describedby",
|
|
391
|
-
"aria-multiselectable",
|
|
392
|
-
"aria-rowcount"
|
|
393
|
-
]) this.container.removeAttribute(e);
|
|
394
|
-
this.container.classList.remove("scheduler-week-view", "scheduler-day-view", "scheduler-month-view", "scheduler-year-view", "scheduler-timeline-view");
|
|
395
|
-
}
|
|
396
|
-
appendResizeHandles(e, t, [n, r] = ["top", "bottom"]) {
|
|
397
|
-
let i = this.state.resolvedPermissions;
|
|
398
|
-
t.isStart && o("start", {
|
|
399
|
-
permissions: i,
|
|
400
|
-
event: t.event
|
|
401
|
-
}) && e.appendChild(this.createResizeHandle(n, "start")), t.isEnd && o("end", {
|
|
402
|
-
permissions: i,
|
|
403
|
-
event: t.event
|
|
404
|
-
}) && e.appendChild(this.createResizeHandle(r, "end"));
|
|
405
|
-
}
|
|
406
|
-
createResizeHandle(e, t) {
|
|
407
|
-
let n = this.createElement("div", "resize-handle", e);
|
|
408
|
-
this.setData(n, { handle: t });
|
|
409
|
-
let r = this.createElement("span", "resize-glyph");
|
|
410
|
-
return r.setAttribute("aria-hidden", "true"), n.appendChild(r), n;
|
|
411
|
-
}
|
|
412
|
-
applyGridRoles(e) {
|
|
413
|
-
let t = this.container;
|
|
414
|
-
t.getAttribute("role") !== "grid" && t.setAttribute("role", "grid");
|
|
415
|
-
let n = this.container.getRootNode().host?.getAttribute("aria-label") || e.label;
|
|
416
|
-
n && t.setAttribute("aria-label", n), t.setAttribute("aria-describedby", "scheduler-kbd-grid"), e.multiselectable && t.setAttribute("aria-multiselectable", "true");
|
|
417
|
-
let r = (e, n) => t.querySelectorAll(e).forEach((e) => {
|
|
418
|
-
e.hasAttribute("role") || e.setAttribute("role", n);
|
|
419
|
-
});
|
|
420
|
-
e.columnHeaderRow && r(e.columnHeaderRow, "row"), e.columnHeaders && r(e.columnHeaders, "columnheader"), (e.presentation ?? []).forEach((e) => r(e, "presentation")), e.rows && r(e.rows, "row"), e.cells && r(e.cells, "gridcell");
|
|
421
|
-
}
|
|
422
|
-
markToday() {
|
|
423
|
-
this.container.querySelectorAll(".today").forEach((e) => e.setAttribute("aria-current", "date"));
|
|
424
|
-
}
|
|
425
|
-
}, R = class e extends L {
|
|
426
|
-
constructor(...e) {
|
|
427
|
-
super(...e), this.monthCards = /* @__PURE__ */ new Map();
|
|
428
|
-
}
|
|
429
|
-
render() {
|
|
430
|
-
this.clearContainer(), this.container.classList.add("scheduler-year-view");
|
|
431
|
-
let { date: e, options: t } = this.state, n = _.getYearMonths(e), r = this.createElement("div", "scheduler-year-grid");
|
|
432
|
-
this.monthCards.clear();
|
|
433
|
-
for (let e of n) {
|
|
434
|
-
let t = this.createMonthCard(e);
|
|
435
|
-
r.appendChild(t);
|
|
436
|
-
}
|
|
437
|
-
this.container.appendChild(r), this.applyGridRoles({
|
|
438
|
-
label: a(h(this.state.options.messages).yearGridLabel, { date: String(this.state.date.getFullYear()) }),
|
|
439
|
-
rows: ".scheduler-year-grid"
|
|
440
|
-
}), this.markToday(), this.updateMonthCardFocus();
|
|
441
|
-
}
|
|
442
|
-
static monthKey(e) {
|
|
443
|
-
return `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}`;
|
|
444
|
-
}
|
|
445
|
-
createMonthCard(t) {
|
|
446
|
-
let { events: n, options: r } = this.state, i = this.createElement("div", "scheduler-year-month"), o = e.monthKey(t);
|
|
447
|
-
i.setAttribute("role", "gridcell"), i.setAttribute("tabindex", "-1"), i.id = `scheduler-cell-y-${o}`, this.setData(i, { month: t.toISOString() }), this.monthCards.set(o, i);
|
|
448
|
-
let s = this.createElement("div", "scheduler-year-month-header");
|
|
449
|
-
s.textContent = _.getMonthName(t, r.locale), s.setAttribute("role", "button"), s.setAttribute("tabindex", "0"), this.setData(s, { month: t.toISOString() }), i.appendChild(s);
|
|
450
|
-
let c = this.createElement("div", "scheduler-mini-month"), l = _.getMonthWeeks(t, this.firstDayOfWeek), u = l[0];
|
|
451
|
-
for (let e of u) {
|
|
452
|
-
let t = this.createElement("div", "scheduler-mini-day", "header");
|
|
453
|
-
t.textContent = _.getDayName(e, r.locale, "narrow"), t.style.fontWeight = "600", t.style.color = "#666", c.appendChild(t);
|
|
454
|
-
}
|
|
455
|
-
let d = _.getMonthStart(t), f = _.getMonthEnd(t), m = p.filterByRange(n, d, f), g = h(r.messages);
|
|
456
|
-
i.setAttribute("aria-label", a(g.yearMonthCardLabel, {
|
|
457
|
-
month: `${_.getMonthName(t, r.locale)} ${t.getFullYear()}`,
|
|
458
|
-
count: m.length,
|
|
459
|
-
events: m.length === 1 ? g.eventSingular : g.eventPlural
|
|
460
|
-
}));
|
|
461
|
-
let v = /* @__PURE__ */ new Set();
|
|
462
|
-
for (let e of m) {
|
|
463
|
-
let t = new Date(e.start);
|
|
464
|
-
for (t.setHours(0, 0, 0, 0); t <= e.end;) v.add(t.toISOString().split("T")[0]), t.setDate(t.getDate() + 1);
|
|
465
|
-
}
|
|
466
|
-
for (let e of l) for (let n of e) {
|
|
467
|
-
let e = this.createElement("div", "scheduler-mini-day");
|
|
468
|
-
e.textContent = String(n.getDate()), this.setData(e, { date: n.toISOString() }), _.isSameMonth(n, t) || e.classList.add("other-month"), _.isToday(n) && e.classList.add("today");
|
|
469
|
-
let r = n.toISOString().split("T")[0];
|
|
470
|
-
v.has(r) && e.classList.add("has-events"), c.appendChild(e);
|
|
471
|
-
}
|
|
472
|
-
return i.appendChild(c), i;
|
|
473
|
-
}
|
|
474
|
-
updateMonthCardFocus() {
|
|
475
|
-
let t = this.state.focusedDate, n = !1, r = t ? e.monthKey(t) : null;
|
|
476
|
-
for (let [e, t] of this.monthCards) {
|
|
477
|
-
let i = e === r;
|
|
478
|
-
t.setAttribute("tabindex", i ? "0" : "-1"), t.removeAttribute("aria-selected"), i && (n = !0);
|
|
479
|
-
}
|
|
480
|
-
n || this.monthCards.values().next().value?.setAttribute("tabindex", "0");
|
|
481
|
-
}
|
|
482
|
-
update(e) {
|
|
483
|
-
let t = this.state.date.getFullYear() !== e.date.getFullYear(), n = this.optionsRequireRerender(this.state.options, e.options);
|
|
484
|
-
this.state = e, t || n ? this.render() : this.updateMonthCardFocus();
|
|
485
|
-
}
|
|
486
|
-
optionsRequireRerender(e, t) {
|
|
487
|
-
return e.firstDayOfWeek !== t.firstDayOfWeek || e.locale !== t.locale;
|
|
488
|
-
}
|
|
489
|
-
destroy() {
|
|
490
|
-
this.monthCards.clear(), this.clearContainer();
|
|
491
|
-
}
|
|
492
|
-
}, z = class e extends L {
|
|
493
|
-
constructor(...e) {
|
|
494
|
-
super(...e), this.dayCells = /* @__PURE__ */ new Map();
|
|
495
|
-
}
|
|
496
|
-
render() {
|
|
497
|
-
this.clearContainer(), this.container.classList.add("scheduler-month-view");
|
|
498
|
-
let { date: e, options: t } = this.state, n = _.getMonthWeeks(e, this.firstDayOfWeek), r = this.createElement("div", "scheduler-day-headers"), i = n[0];
|
|
499
|
-
for (let e of i) {
|
|
500
|
-
let n = this.createElement("div", "scheduler-day-header");
|
|
501
|
-
n.textContent = _.getDayName(e, t.locale), r.appendChild(n);
|
|
502
|
-
}
|
|
503
|
-
this.container.appendChild(r);
|
|
504
|
-
let o = this.createElement("div", "scheduler-month-grid");
|
|
505
|
-
for (let e of n) {
|
|
506
|
-
let t = this.createElement("div", "scheduler-month-week");
|
|
507
|
-
for (let n of e) {
|
|
508
|
-
let e = this.createDayCell(n);
|
|
509
|
-
t.appendChild(e);
|
|
510
|
-
}
|
|
511
|
-
o.appendChild(t);
|
|
512
|
-
}
|
|
513
|
-
this.container.appendChild(o), this.renderEvents(), this.updateDayCellFocus(), this.applyGridRoles({
|
|
514
|
-
label: a(h(this.state.options.messages).monthGridLabel, { date: _.formatDate(this.state.date, this.state.options.locale, {
|
|
515
|
-
month: "long",
|
|
516
|
-
year: "numeric"
|
|
517
|
-
}) }),
|
|
518
|
-
columnHeaderRow: ":scope > .scheduler-day-headers",
|
|
519
|
-
columnHeaders: ".scheduler-day-headers > .scheduler-day-header",
|
|
520
|
-
presentation: [".scheduler-month-grid"],
|
|
521
|
-
rows: ".scheduler-month-week"
|
|
522
|
-
}), this.markToday();
|
|
523
|
-
}
|
|
524
|
-
static dayKey(e) {
|
|
525
|
-
return k(e);
|
|
526
|
-
}
|
|
527
|
-
createDayCell(t) {
|
|
528
|
-
let { date: n } = this.state, r = this.createElement("div", "scheduler-month-day");
|
|
529
|
-
_.isSameMonth(t, n) || r.classList.add("other-month"), _.isToday(t) && r.classList.add("today");
|
|
530
|
-
let i = e.dayKey(t);
|
|
531
|
-
r.setAttribute("role", "gridcell"), r.setAttribute("tabindex", "-1"), r.id = `scheduler-cell-m-${i}`;
|
|
532
|
-
let a = this.createElement("div", "day-number");
|
|
533
|
-
a.textContent = String(t.getDate()), r.appendChild(a);
|
|
534
|
-
let o = this.createElement("div", "month-events");
|
|
535
|
-
return r.appendChild(o), this.dayCells.set(i, r), this.setData(r, { date: i }), r;
|
|
536
|
-
}
|
|
537
|
-
updateDayCellFocus() {
|
|
538
|
-
let t = this.state.focusedDate, n = !1, r = t ? e.dayKey(t) : null;
|
|
539
|
-
for (let [e, t] of this.dayCells) {
|
|
540
|
-
let i = e === r;
|
|
541
|
-
t.setAttribute("tabindex", i ? "0" : "-1"), t.removeAttribute("aria-selected"), i && (n = !0);
|
|
542
|
-
}
|
|
543
|
-
n || (Array.from(this.dayCells.values()).find((e) => e.classList.contains("today") && !e.classList.contains("other-month")) || Array.from(this.dayCells.values()).find((e) => !e.classList.contains("other-month")) || this.dayCells.values().next().value)?.setAttribute("tabindex", "0");
|
|
544
|
-
}
|
|
545
|
-
renderEvents() {
|
|
546
|
-
let { date: t, events: n, options: r } = this.state;
|
|
547
|
-
_.getMonthStart(t), _.getMonthEnd(t);
|
|
548
|
-
let i = _.getMonthWeeks(t, this.firstDayOfWeek), o = i[0][0], s = i[i.length - 1][6];
|
|
549
|
-
s.setHours(23, 59, 59, 999);
|
|
550
|
-
let c = p.filterByRange(n, o, s), l = /* @__PURE__ */ new Map();
|
|
551
|
-
for (let t of c) {
|
|
552
|
-
let n = new Date(t.start), r = new Date(t.end), i = new Date(n);
|
|
553
|
-
for (i.setHours(0, 0, 0, 0); i <= r;) {
|
|
554
|
-
let n = e.dayKey(i);
|
|
555
|
-
l.has(n) || l.set(n, []), l.get(n).push(t), i.setDate(i.getDate() + 1);
|
|
556
|
-
}
|
|
557
|
-
}
|
|
558
|
-
let u = typeof r.dayMaxEvents == "number" ? r.dayMaxEvents : r.dayMaxEvents === !1 ? Infinity : 3;
|
|
559
|
-
for (let [e, t] of l) {
|
|
560
|
-
let n = this.dayCells.get(e);
|
|
561
|
-
if (!n) continue;
|
|
562
|
-
let r = n.querySelector(".month-events");
|
|
563
|
-
if (!r) continue;
|
|
564
|
-
r.innerHTML = "";
|
|
565
|
-
let i = t.slice(0, u), o = t.length - i.length;
|
|
566
|
-
for (let e of i) {
|
|
567
|
-
let t = this.createElement("div", "scheduler-month-event");
|
|
568
|
-
t.textContent = e.title, this.applyEventColors(t, e), t.setAttribute("role", "button"), t.setAttribute("tabindex", "0"), t.setAttribute("aria-label", A(e, null, this.state.options)), t.setAttribute("aria-pressed", String(this.state.selectedEvent?.id === e.id)), t.setAttribute("aria-describedby", "scheduler-kbd-event"), this.setData(t, { eventId: e.id }), r.appendChild(t);
|
|
569
|
-
}
|
|
570
|
-
if (o > 0) {
|
|
571
|
-
let t = this.createElement("div", "scheduler-more-link");
|
|
572
|
-
t.textContent = a(h(this.state.options.messages).moreEvents, { count: o }), t.setAttribute("role", "button"), t.setAttribute("tabindex", "0"), this.setData(t, { date: e }), r.appendChild(t);
|
|
573
|
-
}
|
|
574
|
-
}
|
|
575
|
-
}
|
|
576
|
-
update(e) {
|
|
577
|
-
let t = this.state.date.getMonth() !== e.date.getMonth() || this.state.date.getFullYear() !== e.date.getFullYear(), n = this.optionsRequireRerender(this.state.options, e.options);
|
|
578
|
-
this.state = e, t || n ? this.render() : (this.renderEvents(), this.updateDayCellFocus());
|
|
579
|
-
}
|
|
580
|
-
optionsRequireRerender(e, t) {
|
|
581
|
-
return e.firstDayOfWeek !== t.firstDayOfWeek || e.dayMaxEvents !== t.dayMaxEvents || e.locale !== t.locale;
|
|
582
|
-
}
|
|
583
|
-
destroy() {
|
|
584
|
-
this.dayCells.clear(), this.clearContainer();
|
|
585
|
-
}
|
|
586
|
-
};
|
|
587
95
|
//#endregion
|
|
588
|
-
//#region libs/mintplayer-web-components/scheduler/src/
|
|
589
|
-
function
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
96
|
+
//#region libs/mintplayer-web-components/scheduler/src/generated/sched-year.view.generated.ts
|
|
97
|
+
function b({ year: e, slots: t = {} }) {
|
|
98
|
+
return o`
|
|
99
|
+
<div data-mps="scheduler" ${r(e.grid)}>
|
|
100
|
+
${l(e.months, (e) => e.key, (e) => o`
|
|
101
|
+
<div data-mps="scheduler" ${r(e.bag)}>
|
|
102
|
+
<div data-mps="scheduler" ${r(e.headerBag)}>${e.header}</div>
|
|
103
|
+
<div data-mps="scheduler" ${r(e.mini)}>
|
|
104
|
+
${l(e.dayHeaders, (e) => e.key, (e) => o`
|
|
105
|
+
<div data-mps="scheduler" ${r(e.bag)}>${e.text}</div>
|
|
106
|
+
`)}
|
|
107
|
+
${l(e.days, (e) => e.key, (e) => o`
|
|
108
|
+
<div data-mps="scheduler" ${r(e.bag)}>${e.text}</div>
|
|
109
|
+
`)}
|
|
110
|
+
</div>
|
|
111
|
+
</div>
|
|
112
|
+
`)}
|
|
113
|
+
</div>
|
|
114
|
+
`;
|
|
599
115
|
}
|
|
600
|
-
var V = class extends L {
|
|
601
|
-
constructor(...e) {
|
|
602
|
-
super(...e), this.dayColumns = [], this.eventElements = /* @__PURE__ */ new Map(), this.slotElements = /* @__PURE__ */ new Map();
|
|
603
|
-
}
|
|
604
|
-
render() {
|
|
605
|
-
this.clearContainer(), this.container.classList.add("scheduler-week-view");
|
|
606
|
-
let { date: e, options: t } = this.state, n = _.getWeekDays(e, this.firstDayOfWeek), r = this.createElement("div", "scheduler-day-headers"), i = this.createElement("div", "scheduler-time-gutter-space");
|
|
607
|
-
i.style.width = "var(--scheduler-time-gutter-width)", r.appendChild(i);
|
|
608
|
-
for (let e of n) {
|
|
609
|
-
let n = this.createElement("div", "scheduler-day-header");
|
|
610
|
-
_.isToday(e) && n.classList.add("today");
|
|
611
|
-
let i = this.createElement("div", "day-name");
|
|
612
|
-
i.textContent = _.getDayName(e, t.locale);
|
|
613
|
-
let o = this.createElement("div", "day-number");
|
|
614
|
-
o.textContent = String(e.getDate()), o.setAttribute("role", "button"), o.setAttribute("tabindex", "0"), o.setAttribute("aria-label", a(h(t.messages).openDayView, { date: _.formatDateWithWeekday(e, t.locale) })), this.setData(o, { date: k(e) }), n.appendChild(i), n.appendChild(o), r.appendChild(n);
|
|
615
|
-
}
|
|
616
|
-
this.container.appendChild(r);
|
|
617
|
-
let o = this.createElement("div", "scheduler-time-grid"), s = this.createElement("div", "scheduler-time-gutter"), c = _.getTimeSlots(n[0], t.slotDuration, t.slotMinTime, t.slotMaxTime);
|
|
618
|
-
for (let e of c) {
|
|
619
|
-
let n = this.createElement("div", "scheduler-time-slot-label");
|
|
620
|
-
n.textContent = _.formatTime(e.start, t.timeFormat, t.locale), s.appendChild(n);
|
|
621
|
-
}
|
|
622
|
-
o.appendChild(s);
|
|
623
|
-
let l = this.createElement("div", "scheduler-days-container");
|
|
624
|
-
this.dayColumns = [];
|
|
625
|
-
for (let e = 0; e < n.length; e++) {
|
|
626
|
-
let r = n[e], i = this.createElement("div", "scheduler-day-column");
|
|
627
|
-
this.setData(i, { dayIndex: e }), i.setAttribute("aria-label", _.formatDateWithWeekday(r, t.locale)), i.setAttribute("aria-rowindex", String(e + 2));
|
|
628
|
-
for (let n = 0; n < c.length; n++) {
|
|
629
|
-
let a = c[n], { start: o, end: s } = B(a, r), l = this.createElement("div", "scheduler-time-slot");
|
|
630
|
-
l.setAttribute("role", "gridcell"), l.setAttribute("tabindex", "-1"), l.setAttribute("aria-selected", "false"), l.setAttribute("aria-label", N({
|
|
631
|
-
start: o,
|
|
632
|
-
end: s
|
|
633
|
-
}, t)), l.setAttribute("aria-colindex", String(n + 2)), l.id = `scheduler-cell-w-${e}-${n}`, this.setData(l, {
|
|
634
|
-
dayIndex: e,
|
|
635
|
-
slotIndex: n,
|
|
636
|
-
start: o.toISOString(),
|
|
637
|
-
end: s.toISOString()
|
|
638
|
-
});
|
|
639
|
-
let u = `${e}-${n}`;
|
|
640
|
-
this.slotElements.set(u, l), i.appendChild(l);
|
|
641
|
-
}
|
|
642
|
-
let a = this.createElement("div", "scheduler-events-container");
|
|
643
|
-
i.appendChild(a), this.dayColumns.push(i), l.appendChild(i);
|
|
644
|
-
}
|
|
645
|
-
o.appendChild(l), this.container.appendChild(o), this.renderEvents(), this.updateCellFocusAndSelection(), this.renderNowIndicator(n, c), this.applyGridRoles({
|
|
646
|
-
label: a(h(this.state.options.messages).weekGridLabel, { date: _.formatDateWithWeekday(_.getWeekStart(this.state.date, this.firstDayOfWeek), this.state.options.locale) }),
|
|
647
|
-
multiselectable: !0,
|
|
648
|
-
columnHeaderRow: ":scope > .scheduler-day-headers",
|
|
649
|
-
columnHeaders: ".scheduler-day-headers > .scheduler-day-header",
|
|
650
|
-
presentation: [
|
|
651
|
-
".scheduler-time-gutter-space",
|
|
652
|
-
".scheduler-time-grid",
|
|
653
|
-
".scheduler-time-gutter",
|
|
654
|
-
".scheduler-time-slot-label",
|
|
655
|
-
".scheduler-days-container"
|
|
656
|
-
],
|
|
657
|
-
rows: ".scheduler-day-column",
|
|
658
|
-
cells: ".scheduler-events-container"
|
|
659
|
-
}), this.markToday();
|
|
660
|
-
}
|
|
661
|
-
update(e) {
|
|
662
|
-
let t = this.state.date.getTime() !== e.date.getTime(), n = this.optionsRequireRerender(this.state.options, e.options);
|
|
663
|
-
this.state.selectedEvent?.id, e.selectedEvent?.id, this.state = e, t || n ? this.render() : (this.updateGreyedSlots(), this.renderEvents(), this.updateCellFocusAndSelection(), this.renderPreviewEvent());
|
|
664
|
-
}
|
|
665
|
-
updateCellFocusAndSelection() {
|
|
666
|
-
let e = this.state.focusedCell, t = !1, n = null;
|
|
667
|
-
for (let [, r] of this.slotElements) {
|
|
668
|
-
n ||= r;
|
|
669
|
-
let i = r.dataset.start, a = r.dataset.end;
|
|
670
|
-
if (!i || !a) continue;
|
|
671
|
-
let o = {
|
|
672
|
-
start: new Date(i),
|
|
673
|
-
end: new Date(a)
|
|
674
|
-
}, s = !!e && o.start.getTime() === e.start.getTime();
|
|
675
|
-
r.setAttribute("tabindex", s ? "0" : "-1");
|
|
676
|
-
let c = M(o, this.state, null);
|
|
677
|
-
r.setAttribute("aria-selected", c ? "true" : "false"), r.classList.toggle("selected", c), s && (t = !0);
|
|
678
|
-
}
|
|
679
|
-
!t && n && n.setAttribute("tabindex", "0");
|
|
680
|
-
}
|
|
681
|
-
optionsRequireRerender(e, t) {
|
|
682
|
-
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;
|
|
683
|
-
}
|
|
684
|
-
renderEvents() {
|
|
685
|
-
let { date: e, events: t, options: n } = this.state, r = _.getWeekDays(e, this.firstDayOfWeek), i = r[0], a = new Date(r[6]);
|
|
686
|
-
a.setHours(23, 59, 59, 999);
|
|
687
|
-
let o = p.filterByRange(t, i, a), s = [];
|
|
688
|
-
for (let e of o) {
|
|
689
|
-
let { parts: t } = p.splitInParts(e);
|
|
690
|
-
s.push(...t);
|
|
691
|
-
}
|
|
692
|
-
let c = p.filterPartsByRange(s, i, a), l = p.getTimelinedParts(c);
|
|
693
|
-
this.eventElements.forEach((e) => e.remove()), this.eventElements.clear();
|
|
694
|
-
for (let { part: e, trackIndex: t, totalTracks: i, colspan: a } of l) {
|
|
695
|
-
if (!e.event) continue;
|
|
696
|
-
let o = r.findIndex((t) => _.isSameDay(t, e.start));
|
|
697
|
-
if (o === -1) continue;
|
|
698
|
-
let s = this.dayColumns[o].querySelector(".scheduler-events-container");
|
|
699
|
-
if (!s) continue;
|
|
700
|
-
let c = this.createEventElement(e, t, i, a, n.slotDuration ?? 1800);
|
|
701
|
-
s.appendChild(c), this.eventElements.set(e.id, c);
|
|
702
|
-
}
|
|
703
|
-
}
|
|
704
|
-
createEventElement(e, t, n, r, i) {
|
|
705
|
-
let a = e.event, o = this.createElement("div", "scheduler-event"), s = this.state.selectedEvent?.id === a.id;
|
|
706
|
-
this.state.keyboardMoveEventId, a.id, o.setAttribute("role", "button"), o.setAttribute("tabindex", "0"), o.setAttribute("aria-label", A(a, null, this.state.options)), o.setAttribute("aria-pressed", s ? "true" : "false"), o.setAttribute("aria-describedby", "scheduler-kbd-event"), s && o.classList.add("selected");
|
|
707
|
-
let { top: c, height: l } = this.partGeometry(e.start, e.end, {
|
|
708
|
-
...this.state.options,
|
|
709
|
-
slotDuration: i
|
|
710
|
-
}) ?? {
|
|
711
|
-
top: 0,
|
|
712
|
-
height: 0
|
|
713
|
-
}, u = t / n * 100, d = r / n * 100;
|
|
714
|
-
o.style.top = `${c}px`, o.style.height = `${l}px`, o.style.left = `${u}%`, o.style.width = `calc(${d}% - 2px)`, this.applyEventColors(o, a), this.setData(o, { eventId: a.id });
|
|
715
|
-
let f = this.createElement("div", "event-content"), p = this.createElement("div", "event-title");
|
|
716
|
-
p.textContent = a.title, f.appendChild(p);
|
|
717
|
-
let m = this.createElement("div", "event-time");
|
|
718
|
-
return m.textContent = _.formatTimeRange(e.start, e.end, this.state.options.timeFormat, this.state.options.locale), f.appendChild(m), o.appendChild(f), this.appendResizeHandles(o, e), o;
|
|
719
|
-
}
|
|
720
|
-
renderPreviewEvent() {
|
|
721
|
-
this.container.querySelectorAll(".scheduler-event.preview").forEach((e) => e.remove());
|
|
722
|
-
let { previewEvent: e, options: t, date: n } = this.state;
|
|
723
|
-
if (!e) return;
|
|
724
|
-
let r = _.getWeekDays(n, this.firstDayOfWeek), { parts: i } = p.splitInParts(e);
|
|
725
|
-
for (let e of i) {
|
|
726
|
-
let n = r.findIndex((t) => _.isSameDay(t, e.start));
|
|
727
|
-
if (n === -1) continue;
|
|
728
|
-
let i = this.dayColumns[n]?.querySelector(".scheduler-events-container");
|
|
729
|
-
if (!i) continue;
|
|
730
|
-
let a = this.partGeometry(e.start, e.end, t);
|
|
731
|
-
if (!a) continue;
|
|
732
|
-
let o = this.createElement("div", "scheduler-event", "preview");
|
|
733
|
-
e.isStart || o.classList.add("preview-continues-before"), e.isEnd || o.classList.add("preview-continues-after"), o.style.top = `${a.top}px`, o.style.height = `${a.height}px`, o.style.left = "0", o.style.width = "100%", i.appendChild(o);
|
|
734
|
-
}
|
|
735
|
-
}
|
|
736
|
-
updateGreyedSlots() {
|
|
737
|
-
let { dragState: e, previewEvent: t, options: n, date: r } = this.state;
|
|
738
|
-
if (this.slotElements.forEach((e) => e.classList.remove("greyed")), !e || !t) return;
|
|
739
|
-
let i = _.getWeekDays(r, this.firstDayOfWeek), a = _.getTimeSlots(i[0], n.slotDuration, n.slotMinTime, n.slotMaxTime);
|
|
740
|
-
for (let e = 0; e < i.length; e++) {
|
|
741
|
-
let n = i[e];
|
|
742
|
-
for (let r = 0; r < a.length; r++) {
|
|
743
|
-
let i = a[r], { start: o, end: s } = B(i, n);
|
|
744
|
-
if (o < t.end && s > t.start) {
|
|
745
|
-
let t = `${e}-${r}`, n = this.slotElements.get(t);
|
|
746
|
-
n && n.classList.add("greyed");
|
|
747
|
-
}
|
|
748
|
-
}
|
|
749
|
-
}
|
|
750
|
-
}
|
|
751
|
-
renderNowIndicator(e, t) {
|
|
752
|
-
if (!this.state.options.nowIndicator) return;
|
|
753
|
-
let n = /* @__PURE__ */ new Date(), r = e.findIndex((e) => _.isSameDay(e, n));
|
|
754
|
-
if (r === -1) return;
|
|
755
|
-
let i = this.dayColumns[r];
|
|
756
|
-
if (!i) return;
|
|
757
|
-
let a = new Date(n);
|
|
758
|
-
a.setHours(0, 0, 0, 0);
|
|
759
|
-
let o = (n.getTime() - a.getTime()) / 6e4 / ((this.state.options.slotDuration ?? 1800) / 60) * 40, s = this.createElement("div", "scheduler-now-indicator");
|
|
760
|
-
s.style.top = `${o}px`, i.appendChild(s);
|
|
761
|
-
}
|
|
762
|
-
updateNowIndicator() {
|
|
763
|
-
if (!this.state.options.nowIndicator) return;
|
|
764
|
-
let { date: e, options: t } = this.state, n = _.getWeekDays(e, this.firstDayOfWeek), r = /* @__PURE__ */ new Date(), i = n.findIndex((e) => _.isSameDay(e, r));
|
|
765
|
-
if (i === -1) return;
|
|
766
|
-
let a = this.dayColumns[i];
|
|
767
|
-
if (!a) return;
|
|
768
|
-
let o = a.querySelector(".scheduler-now-indicator"), s = new Date(r);
|
|
769
|
-
s.setHours(0, 0, 0, 0);
|
|
770
|
-
let c = (r.getTime() - s.getTime()) / 6e4 / ((t.slotDuration ?? 1800) / 60) * 40;
|
|
771
|
-
if (o) o.style.top = `${c}px`;
|
|
772
|
-
else {
|
|
773
|
-
let e = this.createElement("div", "scheduler-now-indicator");
|
|
774
|
-
e.style.top = `${c}px`, a.appendChild(e);
|
|
775
|
-
}
|
|
776
|
-
}
|
|
777
|
-
destroy() {
|
|
778
|
-
this.eventElements.clear(), this.slotElements.clear(), this.dayColumns = [], this.clearContainer();
|
|
779
|
-
}
|
|
780
|
-
}, H = class extends L {
|
|
781
|
-
constructor(...e) {
|
|
782
|
-
super(...e), this.eventsContainer = null, this.slotElements = /* @__PURE__ */ new Map(), this.dayColumn = null;
|
|
783
|
-
}
|
|
784
|
-
render() {
|
|
785
|
-
this.clearContainer(), this.container.classList.add("scheduler-day-view");
|
|
786
|
-
let { date: e, options: t } = this.state, n = this.createElement("div", "scheduler-day-headers"), r = this.createElement("div", "scheduler-time-gutter-space");
|
|
787
|
-
r.style.width = "var(--scheduler-time-gutter-width)", n.appendChild(r);
|
|
788
|
-
let i = this.createElement("div", "scheduler-day-header");
|
|
789
|
-
_.isToday(e) && i.classList.add("today");
|
|
790
|
-
let o = this.createElement("div", "day-name");
|
|
791
|
-
o.textContent = _.getDayName(e, t.locale);
|
|
792
|
-
let s = this.createElement("div", "day-number");
|
|
793
|
-
s.textContent = String(e.getDate());
|
|
794
|
-
let c = this.createElement("div", "month-year");
|
|
795
|
-
c.textContent = _.formatDate(e, t.locale, {
|
|
796
|
-
month: "long",
|
|
797
|
-
year: "numeric"
|
|
798
|
-
}), c.style.fontSize = "12px", c.style.color = "#666", i.appendChild(o), i.appendChild(s), i.appendChild(c), n.appendChild(i), this.container.appendChild(n);
|
|
799
|
-
let l = this.createElement("div", "scheduler-time-grid"), u = this.createElement("div", "scheduler-time-gutter"), d = _.getTimeSlots(e, t.slotDuration, t.slotMinTime, t.slotMaxTime);
|
|
800
|
-
for (let e of d) {
|
|
801
|
-
let n = this.createElement("div", "scheduler-time-slot-label");
|
|
802
|
-
n.textContent = _.formatTime(e.start, t.timeFormat, t.locale), u.appendChild(n);
|
|
803
|
-
}
|
|
804
|
-
l.appendChild(u);
|
|
805
|
-
let f = this.createElement("div", "scheduler-days-container");
|
|
806
|
-
this.dayColumn = this.createElement("div", "scheduler-day-column");
|
|
807
|
-
let p = this.dayColumn;
|
|
808
|
-
for (let e = 0; e < d.length; e++) {
|
|
809
|
-
let n = d[e], r = this.createElement("div", "scheduler-time-slot");
|
|
810
|
-
r.setAttribute("role", "gridcell"), r.setAttribute("tabindex", "-1"), r.setAttribute("aria-selected", "false"), r.setAttribute("aria-label", N(n, t)), r.id = `scheduler-cell-d-${e}`, this.setData(r, {
|
|
811
|
-
slotIndex: e,
|
|
812
|
-
start: n.start.toISOString(),
|
|
813
|
-
end: n.end.toISOString()
|
|
814
|
-
}), this.slotElements.set(e, r), p.appendChild(r);
|
|
815
|
-
}
|
|
816
|
-
this.eventsContainer = this.createElement("div", "scheduler-events-container"), p.appendChild(this.eventsContainer), f.appendChild(p), l.appendChild(f), this.container.appendChild(l), this.renderEvents(), this.updateCellFocusAndSelection(), _.isToday(e) && t.nowIndicator && this.renderNowIndicator(p), this.applyGridRoles({
|
|
817
|
-
label: a(h(this.state.options.messages).dayGridLabel, { date: _.formatDateWithWeekday(this.state.date, this.state.options.locale) }),
|
|
818
|
-
multiselectable: !0,
|
|
819
|
-
columnHeaderRow: ":scope > .scheduler-day-headers",
|
|
820
|
-
columnHeaders: ".scheduler-day-headers > .scheduler-day-header",
|
|
821
|
-
presentation: [
|
|
822
|
-
".scheduler-time-gutter-space",
|
|
823
|
-
".scheduler-time-grid",
|
|
824
|
-
".scheduler-time-gutter",
|
|
825
|
-
".scheduler-time-slot-label",
|
|
826
|
-
".scheduler-days-container"
|
|
827
|
-
],
|
|
828
|
-
rows: ".scheduler-day-column",
|
|
829
|
-
cells: ".scheduler-events-container"
|
|
830
|
-
}), this.markToday();
|
|
831
|
-
}
|
|
832
|
-
updateCellFocusAndSelection() {
|
|
833
|
-
let e = this.state.focusedCell, t = !1, n = null;
|
|
834
|
-
for (let [, r] of this.slotElements) {
|
|
835
|
-
n ||= r;
|
|
836
|
-
let i = r.dataset.start, a = r.dataset.end;
|
|
837
|
-
if (!i || !a) continue;
|
|
838
|
-
let o = {
|
|
839
|
-
start: new Date(i),
|
|
840
|
-
end: new Date(a)
|
|
841
|
-
}, s = !!e && o.start.getTime() === e.start.getTime();
|
|
842
|
-
r.setAttribute("tabindex", s ? "0" : "-1");
|
|
843
|
-
let c = M(o, this.state, null);
|
|
844
|
-
r.setAttribute("aria-selected", c ? "true" : "false"), r.classList.toggle("selected", c), s && (t = !0);
|
|
845
|
-
}
|
|
846
|
-
!t && n && n.setAttribute("tabindex", "0");
|
|
847
|
-
}
|
|
848
|
-
renderEvents() {
|
|
849
|
-
if (!this.eventsContainer) return;
|
|
850
|
-
this.eventsContainer.innerHTML = "";
|
|
851
|
-
let { date: e, events: t, options: n } = this.state, r = new Date(e);
|
|
852
|
-
r.setHours(0, 0, 0, 0);
|
|
853
|
-
let i = new Date(e);
|
|
854
|
-
i.setHours(23, 59, 59, 999);
|
|
855
|
-
let a = p.filterByRange(t, r, i), o = [];
|
|
856
|
-
for (let e of a) {
|
|
857
|
-
let { parts: t } = p.splitInParts(e), n = p.filterPartsByRange(t, r, i);
|
|
858
|
-
o.push(...n);
|
|
859
|
-
}
|
|
860
|
-
let s = p.getTimelinedParts(o);
|
|
861
|
-
for (let { part: e, trackIndex: t, totalTracks: r, colspan: i } of s) {
|
|
862
|
-
if (!e.event) continue;
|
|
863
|
-
let a = this.createEventElement(e, t, r, i, n.slotDuration ?? 1800);
|
|
864
|
-
this.eventsContainer.appendChild(a);
|
|
865
|
-
}
|
|
866
|
-
}
|
|
867
|
-
createEventElement(e, t, n, r, i) {
|
|
868
|
-
let a = e.event, o = this.createElement("div", "scheduler-event"), s = this.state.selectedEvent?.id === a.id;
|
|
869
|
-
this.state.keyboardMoveEventId, a.id, o.setAttribute("role", "button"), o.setAttribute("tabindex", "0"), o.setAttribute("aria-label", A(a, null, this.state.options)), o.setAttribute("aria-pressed", s ? "true" : "false"), o.setAttribute("aria-describedby", "scheduler-kbd-event"), s && o.classList.add("selected");
|
|
870
|
-
let { top: c, height: l } = this.partGeometry(e.start, e.end, {
|
|
871
|
-
...this.state.options,
|
|
872
|
-
slotDuration: i
|
|
873
|
-
}) ?? {
|
|
874
|
-
top: 0,
|
|
875
|
-
height: 0
|
|
876
|
-
}, u = t / n * 100, d = r / n * 100;
|
|
877
|
-
o.style.top = `${c}px`, o.style.height = `${l}px`, o.style.left = `${u}%`, o.style.width = `calc(${d}% - 2px)`, this.applyEventColors(o, a), this.setData(o, { eventId: a.id });
|
|
878
|
-
let f = this.createElement("div", "event-content"), p = this.createElement("div", "event-title");
|
|
879
|
-
p.textContent = a.title, f.appendChild(p);
|
|
880
|
-
let m = this.createElement("div", "event-time");
|
|
881
|
-
return m.textContent = _.formatTimeRange(e.start, e.end, this.state.options.timeFormat, this.state.options.locale), f.appendChild(m), o.appendChild(f), this.appendResizeHandles(o, e), o;
|
|
882
|
-
}
|
|
883
|
-
renderNowIndicator(e) {
|
|
884
|
-
let t = /* @__PURE__ */ new Date(), n = new Date(t);
|
|
885
|
-
n.setHours(0, 0, 0, 0);
|
|
886
|
-
let r = (t.getTime() - n.getTime()) / 6e4 / ((this.state.options.slotDuration ?? 1800) / 60) * 40, i = this.createElement("div", "scheduler-now-indicator");
|
|
887
|
-
i.style.top = `${r}px`, e.appendChild(i);
|
|
888
|
-
}
|
|
889
|
-
updateNowIndicator() {
|
|
890
|
-
if (!this.dayColumn || !this.state.options.nowIndicator || !_.isToday(this.state.date)) return;
|
|
891
|
-
let e = this.dayColumn.querySelector(".scheduler-now-indicator"), t = /* @__PURE__ */ new Date(), n = new Date(t);
|
|
892
|
-
n.setHours(0, 0, 0, 0);
|
|
893
|
-
let r = (t.getTime() - n.getTime()) / 6e4 / ((this.state.options.slotDuration ?? 1800) / 60) * 40;
|
|
894
|
-
e ? e.style.top = `${r}px` : this.renderNowIndicator(this.dayColumn);
|
|
895
|
-
}
|
|
896
|
-
update(e) {
|
|
897
|
-
let t = this.state.date.getTime() !== e.date.getTime(), n = this.optionsRequireRerender(this.state.options, e.options);
|
|
898
|
-
this.state = e, t || n ? this.render() : (this.updateGreyedSlots(), this.renderEvents(), this.updateCellFocusAndSelection(), this.renderPreviewEvent());
|
|
899
|
-
}
|
|
900
|
-
optionsRequireRerender(e, t) {
|
|
901
|
-
return e.slotDuration !== t.slotDuration || e.timeFormat !== t.timeFormat || e.slotMinTime !== t.slotMinTime || e.slotMaxTime !== t.slotMaxTime || e.locale !== t.locale;
|
|
902
|
-
}
|
|
903
|
-
updateGreyedSlots() {
|
|
904
|
-
let { dragState: e, previewEvent: t, options: n, date: r } = this.state;
|
|
905
|
-
if (this.slotElements.forEach((e) => e.classList.remove("greyed")), !e || !t) return;
|
|
906
|
-
let i = _.getTimeSlots(r, n.slotDuration, n.slotMinTime, n.slotMaxTime);
|
|
907
|
-
for (let e = 0; e < i.length; e++) {
|
|
908
|
-
let n = i[e];
|
|
909
|
-
if (n.start < t.end && n.end > t.start) {
|
|
910
|
-
let t = this.slotElements.get(e);
|
|
911
|
-
t && t.classList.add("greyed");
|
|
912
|
-
}
|
|
913
|
-
}
|
|
914
|
-
}
|
|
915
|
-
renderPreviewEvent() {
|
|
916
|
-
if (!this.eventsContainer) return;
|
|
917
|
-
this.eventsContainer.querySelectorAll(".scheduler-event.preview").forEach((e) => e.remove());
|
|
918
|
-
let { previewEvent: e, options: t, date: n } = this.state;
|
|
919
|
-
if (!e) return;
|
|
920
|
-
let { parts: r } = p.splitInParts(e), i = r.find((e) => _.isSameDay(n, e.start));
|
|
921
|
-
if (!i) return;
|
|
922
|
-
let a = this.partGeometry(i.start, i.end, t);
|
|
923
|
-
if (!a) return;
|
|
924
|
-
let o = this.createElement("div", "scheduler-event", "preview");
|
|
925
|
-
i.isStart || o.classList.add("preview-continues-before"), i.isEnd || o.classList.add("preview-continues-after"), o.style.top = `${a.top}px`, o.style.height = `${a.height}px`, o.style.left = "0", o.style.width = "100%", this.eventsContainer.appendChild(o);
|
|
926
|
-
}
|
|
927
|
-
destroy() {
|
|
928
|
-
this.eventsContainer = null, this.dayColumn = null, this.slotElements.clear(), this.clearContainer();
|
|
929
|
-
}
|
|
930
|
-
};
|
|
931
116
|
//#endregion
|
|
932
|
-
//#region libs/mintplayer-web-components/scheduler/src/
|
|
933
|
-
function
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
}
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
117
|
+
//#region libs/mintplayer-web-components/scheduler/src/generated/sched-timeline.view.generated.ts
|
|
118
|
+
function x({ timeline: e, slots: t = {} }) {
|
|
119
|
+
return o`
|
|
120
|
+
<div data-mps="scheduler" ${r(e.timeline)}>
|
|
121
|
+
<div data-mps="scheduler" ${r(e.head)}>
|
|
122
|
+
<div data-mps="scheduler" ${r(e.dayRow)}>
|
|
123
|
+
<div data-mps="scheduler" ${r(e.resourceHeader)}>
|
|
124
|
+
${e.resourceHeaderText}
|
|
125
|
+
<div data-mps="scheduler" ${r(e.resizer)}></div>
|
|
126
|
+
</div>
|
|
127
|
+
<div data-mps="scheduler" ${r(e.dayHeaders)}>
|
|
128
|
+
${l(e.days, (e) => e.key, (e) => o`
|
|
129
|
+
<div data-mps="scheduler" ${r(e.bag)} style=${u(e.style)}>
|
|
130
|
+
<span data-mps="scheduler" ${r(e.labelBag)}>${e.label}</span>
|
|
131
|
+
</div>
|
|
132
|
+
`)}
|
|
133
|
+
</div>
|
|
134
|
+
</div>
|
|
135
|
+
<div data-mps="scheduler" ${r(e.timeRow)}>
|
|
136
|
+
<div data-mps="scheduler" ${r(e.emptyHeader)}></div>
|
|
137
|
+
<div data-mps="scheduler" ${r(e.timeHeaders)}>
|
|
138
|
+
${l(e.times, (e) => e.key, (e) => o`
|
|
139
|
+
<div data-mps="scheduler" ${r(e.bag)}>${e.text}</div>
|
|
140
|
+
`)}
|
|
141
|
+
</div>
|
|
142
|
+
</div>
|
|
143
|
+
</div>
|
|
144
|
+
<div data-mps="scheduler" ${r(e.body)}>
|
|
145
|
+
${l(e.rows, (e) => e.key, (e) => o`
|
|
146
|
+
<div data-mps="scheduler" ${r(e.bag)} style=${u(e.style)}>
|
|
147
|
+
<div data-mps="scheduler" ${r(e.cell)} style=${u(e.cellStyle)}>
|
|
148
|
+
${e.menu ? o`
|
|
149
|
+
<button data-mps="scheduler" ${r(e.menu.bag)} style=${u(e.menu.style)}>
|
|
150
|
+
<span data-mps="scheduler" ${r(e.menu.glyph)}>⋯</span>
|
|
151
|
+
</button>
|
|
152
|
+
` : s}
|
|
153
|
+
${e.toggle ? o`
|
|
154
|
+
<button data-mps="scheduler" ${r(e.toggle.bag)}>${e.toggle.text}</button>
|
|
155
|
+
` : s}
|
|
156
|
+
${e.rename ? o`
|
|
157
|
+
<input data-mps="scheduler" ${r(e.rename.bag)} .value=${e.rename.value}>
|
|
158
|
+
` : o`
|
|
159
|
+
<span data-mps="scheduler" ${r(e.titleBag)}>${e.title}</span>
|
|
160
|
+
`}
|
|
161
|
+
</div>
|
|
162
|
+
<div data-mps="scheduler" ${r(e.slots)}>
|
|
163
|
+
${l(e.cells, (e) => e.key, (e) => o`
|
|
164
|
+
<div data-mps="scheduler" ${r(e.bag)}></div>
|
|
165
|
+
`)}
|
|
166
|
+
${e.events ? o`
|
|
167
|
+
<div data-mps="scheduler" ${r(e.events)}>
|
|
168
|
+
${l(e.boxes, (e) => e.key, (e) => o`
|
|
169
|
+
<div data-mps="scheduler" ${r(e.bag)} style=${u(e.style)}>
|
|
170
|
+
<div data-mps="scheduler" ${r(e.content)}>
|
|
171
|
+
<div data-mps="scheduler" ${r(e.titleBag)}>${e.title}</div>
|
|
172
|
+
${e.timeBag ? o`
|
|
173
|
+
<div data-mps="scheduler" ${r(e.timeBag)}>${e.time}</div>
|
|
174
|
+
` : s}
|
|
175
|
+
</div>
|
|
176
|
+
${l(e.handles, (e) => e.key, (e) => o`
|
|
177
|
+
<div data-mps="scheduler" ${r(e.bag)}>
|
|
178
|
+
<span data-mps="scheduler" ${r(e.glyph)}></span>
|
|
179
|
+
</div>
|
|
180
|
+
`)}
|
|
181
|
+
</div>
|
|
182
|
+
`)}
|
|
183
|
+
${l(e.previews, (e) => e.key, (e) => o`
|
|
184
|
+
<div data-mps="scheduler" ${r(e.bag)} style=${u(e.style)}></div>
|
|
185
|
+
`)}
|
|
186
|
+
</div>
|
|
187
|
+
` : s}
|
|
188
|
+
</div>
|
|
189
|
+
</div>
|
|
190
|
+
`)}
|
|
191
|
+
${e.empty ? o`
|
|
192
|
+
<div data-mps="scheduler" ${r(e.empty.bag)}>${e.empty.text}</div>
|
|
193
|
+
` : s}
|
|
194
|
+
</div>
|
|
195
|
+
</div>
|
|
196
|
+
`;
|
|
946
197
|
}
|
|
947
198
|
//#endregion
|
|
948
|
-
//#region libs/mintplayer-web-components/scheduler/src/
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
height: t("--scheduler-timeline-event-height", 28),
|
|
964
|
-
gap: t("--scheduler-timeline-track-gap", 2),
|
|
965
|
-
padding: t("--scheduler-timeline-row-padding", 2)
|
|
966
|
-
};
|
|
967
|
-
}
|
|
968
|
-
render() {
|
|
969
|
-
this.captureActionFocus(), this.clearContainer(), this.container.classList.add("scheduler-timeline-view");
|
|
970
|
-
let { date: e, options: t, resources: n, collapsedGroups: r } = this.state, i = _.getWeekDays(e, this.firstDayOfWeek), o = i.map((e) => _.getTimeSlots(e, t.slotDuration, t.slotMinTime, t.slotMaxTime)), s = o.reduce((e, t) => e + t.length, 0), c = g.flatten(n, r), l = this.hasUnassignedRow(this.state), u = c.filter((e) => e.visible).length + 2 + +!!l, d = this.createElement("div", "scheduler-timeline");
|
|
971
|
-
d.setAttribute("role", "grid"), d.setAttribute("aria-label", a(h(t.messages).timelineGridLabel, { date: _.formatDateWithWeekday(i[0], t.locale) })), d.setAttribute("aria-rowcount", String(u)), d.setAttribute("aria-colcount", String(1 + s)), d.setAttribute("aria-describedby", "scheduler-kbd-grid"), d.setAttribute("aria-multiselectable", "true");
|
|
972
|
-
let f = this.createElement("div", "scheduler-timeline-header");
|
|
973
|
-
f.setAttribute("role", "row"), f.setAttribute("aria-rowindex", "1");
|
|
974
|
-
let p = this.createElement("div", "scheduler-resource-header");
|
|
975
|
-
p.setAttribute("role", "columnheader"), p.setAttribute("aria-colindex", "1"), p.textContent = h(this.state.options.messages).resourcesHeader, p.appendChild(this.createColumnResizer()), f.appendChild(p);
|
|
976
|
-
let m = this.createElement("div", "scheduler-timeline-slots-header");
|
|
977
|
-
m.setAttribute("role", "presentation");
|
|
978
|
-
let v = 2;
|
|
979
|
-
for (let [e, n] of i.entries()) {
|
|
980
|
-
let r = o[e].length, i = this.createElement("div", "scheduler-timeline-slot-header", "day");
|
|
981
|
-
i.setAttribute("role", "columnheader"), i.setAttribute("aria-colindex", String(v)), i.setAttribute("aria-colspan", String(r)), v += r, i.style.width = `${r * this.slotWidth}px`;
|
|
982
|
-
let a = this.createElement("span", "day-label");
|
|
983
|
-
a.textContent = _.formatDateWithWeekday(n, t.locale), i.appendChild(a), i.style.borderBottom = "1px solid var(--scheduler-border-color)", m.appendChild(i);
|
|
984
|
-
}
|
|
985
|
-
f.appendChild(m);
|
|
986
|
-
let y = this.createElement("div", "scheduler-timeline-head");
|
|
987
|
-
y.appendChild(f), d.appendChild(y);
|
|
988
|
-
let b = this.createElement("div", "scheduler-timeline-header");
|
|
989
|
-
b.setAttribute("role", "row"), b.setAttribute("aria-rowindex", "2");
|
|
990
|
-
let x = this.createElement("div", "scheduler-resource-header");
|
|
991
|
-
x.setAttribute("role", "columnheader"), x.setAttribute("aria-colindex", "1"), x.style.borderBottom = "1px solid var(--scheduler-border-color)", b.appendChild(x);
|
|
992
|
-
let S = this.createElement("div", "scheduler-timeline-slots-header");
|
|
993
|
-
S.setAttribute("role", "presentation");
|
|
994
|
-
let C = 2;
|
|
995
|
-
for (let e of o) for (let n of e) {
|
|
996
|
-
let e = this.createElement("div", "scheduler-timeline-slot-header");
|
|
997
|
-
e.setAttribute("role", "columnheader"), e.setAttribute("aria-colindex", String(C)), C++, e.style.width = `${this.slotWidth}px`, e.textContent = _.formatTime(n.start, t.timeFormat, t.locale), e.style.fontSize = "10px", S.appendChild(e);
|
|
998
|
-
}
|
|
999
|
-
b.appendChild(S), y.appendChild(b);
|
|
1000
|
-
let w = this.createElement("div", "scheduler-timeline-body"), T = g.flatten(n, r), E = 3;
|
|
1001
|
-
for (let e of T) {
|
|
1002
|
-
if (!e.visible) continue;
|
|
1003
|
-
let t = this.createResourceRow(e, o);
|
|
1004
|
-
t.setAttribute("aria-rowindex", String(E)), w.appendChild(t), E++;
|
|
1005
|
-
}
|
|
1006
|
-
if (l) {
|
|
1007
|
-
let e = this.createUnassignedRow(o);
|
|
1008
|
-
e.setAttribute("aria-rowindex", String(E)), w.appendChild(e), E++;
|
|
1009
|
-
}
|
|
1010
|
-
if (d.appendChild(w), this.container.appendChild(d), T.length === 0 && !l) {
|
|
1011
|
-
let e = this.createElement("div", "scheduler-timeline-empty");
|
|
1012
|
-
e.textContent = h(t.messages).noResources, w.appendChild(e);
|
|
1013
|
-
}
|
|
1014
|
-
let D = this.createAddBar();
|
|
1015
|
-
D && this.container.appendChild(D), this.renderEvents(i), this.updateCellFocusAndSelection(), this.restoreActionFocus();
|
|
1016
|
-
}
|
|
1017
|
-
actionFocusKey(e) {
|
|
1018
|
-
let t = e.dataset.action;
|
|
1019
|
-
return t ? [
|
|
1020
|
-
t,
|
|
1021
|
-
e.dataset.parentId ?? "",
|
|
1022
|
-
e.dataset.resourceId ?? "",
|
|
1023
|
-
e.dataset.groupId ?? ""
|
|
1024
|
-
].join("|") : null;
|
|
1025
|
-
}
|
|
1026
|
-
captureActionFocus() {
|
|
1027
|
-
let e = this.container.getRootNode().activeElement;
|
|
1028
|
-
this.pendingFocusKey = e && this.container.contains(e) ? this.actionFocusKey(e) : null;
|
|
1029
|
-
}
|
|
1030
|
-
restoreActionFocus() {
|
|
1031
|
-
let e = this.pendingFocusKey;
|
|
1032
|
-
if (this.pendingFocusKey = null, !e) return;
|
|
1033
|
-
let t = Array.from(this.container.querySelectorAll("[data-action]")).find((t) => this.actionFocusKey(t) === e), n = this.container.querySelector(".scheduler-add-button");
|
|
1034
|
-
(t ?? n)?.focus();
|
|
1035
|
-
}
|
|
1036
|
-
updateCellFocusAndSelection() {
|
|
1037
|
-
let e = this.state.focusedCell, t = this.state.focusedResourceId, n = this.container.querySelectorAll(".scheduler-timeline-slot"), r = !1, i = null;
|
|
1038
|
-
n.forEach((n) => {
|
|
1039
|
-
i ||= n;
|
|
1040
|
-
let a = n.dataset.start, o = n.dataset.end, s = n.dataset.resourceId ?? null;
|
|
1041
|
-
if (!a || !o) return;
|
|
1042
|
-
let c = {
|
|
1043
|
-
start: new Date(a),
|
|
1044
|
-
end: new Date(o)
|
|
1045
|
-
}, l = !!e && c.start.getTime() === e.start.getTime() && t === s;
|
|
1046
|
-
n.setAttribute("tabindex", l ? "0" : "-1");
|
|
1047
|
-
let u = M(c, this.state, s);
|
|
1048
|
-
n.setAttribute("aria-selected", u ? "true" : "false"), n.classList.toggle("selected", u), l && (r = !0);
|
|
1049
|
-
}), !r && i && i.setAttribute("tabindex", "0");
|
|
1050
|
-
}
|
|
1051
|
-
createResourceRow(e, t) {
|
|
1052
|
-
let { options: n } = this.state, r = this.createElement("div", "scheduler-timeline-row");
|
|
1053
|
-
r.setAttribute("role", "row"), m(e.item) && r.classList.add("group");
|
|
1054
|
-
let i = this.createElement("div", "scheduler-resource-cell");
|
|
1055
|
-
if (i.setAttribute("role", "rowheader"), i.setAttribute("aria-colindex", "1"), i.style.paddingLeft = `${8 + e.depth * 16}px`, m(e.item)) {
|
|
1056
|
-
let t = this.createElement("button", "expand-toggle");
|
|
1057
|
-
t.type = "button";
|
|
1058
|
-
let n = this.state.collapsedGroups.has(e.item.id);
|
|
1059
|
-
t.textContent = n ? "▶" : "▼", t.setAttribute("aria-expanded", String(!n)), t.setAttribute("aria-label", a(h(this.state.options.messages)[n ? "expandGroup" : "collapseGroup"], { title: e.item.title })), this.setData(t, {
|
|
1060
|
-
action: "toggle-group",
|
|
1061
|
-
groupId: e.item.id
|
|
1062
|
-
}), i.appendChild(t);
|
|
1063
|
-
}
|
|
1064
|
-
let o = this.createElement("span", "resource-title");
|
|
1065
|
-
o.textContent = e.item.title, o.title = e.item.title, this.can("updateResource") && this.setData(o, { resourceId: e.item.id }), i.appendChild(o), this.appendResourceActions(i, e.item), r.appendChild(i);
|
|
1066
|
-
let s = this.createElement("div", "scheduler-timeline-slots");
|
|
1067
|
-
s.setAttribute("role", "presentation");
|
|
1068
|
-
let c = 2;
|
|
1069
|
-
for (let n of t) for (let t of n) {
|
|
1070
|
-
let n = this.createElement("div", "scheduler-timeline-slot");
|
|
1071
|
-
n.setAttribute("role", "gridcell"), n.setAttribute("aria-colindex", String(c)), c++, n.setAttribute("tabindex", "-1"), n.setAttribute("aria-selected", "false"), n.setAttribute("aria-label", N(t, this.state.options, e.item.title)), n.id = `scheduler-cell-t-${e.item.id}-${t.start.getTime()}`, n.style.width = `${this.slotWidth}px`, this.setData(n, {
|
|
1072
|
-
resourceId: e.item.id,
|
|
1073
|
-
start: t.start.toISOString(),
|
|
1074
|
-
end: t.end.toISOString()
|
|
1075
|
-
}), s.appendChild(n);
|
|
1076
|
-
}
|
|
1077
|
-
if (l(e.item)) {
|
|
1078
|
-
let e = this.createElement("div", "scheduler-timeline-events");
|
|
1079
|
-
e.setAttribute("role", "gridcell"), e.setAttribute("aria-colindex", "2"), e.setAttribute("aria-colspan", String(c - 2)), s.appendChild(e);
|
|
1080
|
-
}
|
|
1081
|
-
return r.appendChild(s), this.rowElements.set(e.item.id, r), r;
|
|
1082
|
-
}
|
|
1083
|
-
hasUnassignedRow(e) {
|
|
1084
|
-
return (e.eventsByResource.get(null) ?? []).length > 0;
|
|
1085
|
-
}
|
|
1086
|
-
static {
|
|
1087
|
-
this.MIN_COLUMN_PX = 80;
|
|
1088
|
-
}
|
|
1089
|
-
static {
|
|
1090
|
-
this.MIN_GRID_PX = 50;
|
|
1091
|
-
}
|
|
1092
|
-
createColumnResizer() {
|
|
1093
|
-
let t = h(this.state.options.messages), n = this.createElement("div", "scheduler-column-resizer");
|
|
1094
|
-
return n.setAttribute("role", "separator"), n.setAttribute("tabindex", "0"), n.setAttribute("aria-orientation", "vertical"), n.setAttribute("aria-label", t.resizeResourceColumn), this.updateResizerValue(n), n.addEventListener("pointerdown", (e) => {
|
|
1095
|
-
e.preventDefault(), e.stopPropagation(), this.columnDrag = {
|
|
1096
|
-
startX: e.clientX,
|
|
1097
|
-
startWidth: this.currentColumnWidth()
|
|
1098
|
-
}, document.addEventListener("pointermove", this.boundColumnDragMove), document.addEventListener("pointerup", this.boundColumnDragEnd);
|
|
1099
|
-
}), n.addEventListener("keydown", (t) => {
|
|
1100
|
-
let n = this.currentColumnWidth();
|
|
1101
|
-
switch (t.key) {
|
|
1102
|
-
case "ArrowLeft":
|
|
1103
|
-
t.preventDefault(), this.applyColumnWidth(n - 16);
|
|
1104
|
-
break;
|
|
1105
|
-
case "ArrowRight":
|
|
1106
|
-
t.preventDefault(), this.applyColumnWidth(n + 16);
|
|
1107
|
-
break;
|
|
1108
|
-
case "Home":
|
|
1109
|
-
t.preventDefault(), this.applyColumnWidth(e.MIN_COLUMN_PX);
|
|
1110
|
-
break;
|
|
1111
|
-
case "End": t.preventDefault(), this.applyColumnWidth(2 ** 53 - 1);
|
|
1112
|
-
}
|
|
1113
|
-
}), n;
|
|
1114
|
-
}
|
|
1115
|
-
currentColumnWidth() {
|
|
1116
|
-
return this.container.querySelector(".scheduler-resource-header")?.getBoundingClientRect().width || 200;
|
|
1117
|
-
}
|
|
1118
|
-
applyColumnWidth(t) {
|
|
1119
|
-
let n = W(t, this.container.clientWidth, e.MIN_COLUMN_PX, e.MIN_GRID_PX);
|
|
1120
|
-
this.container.style.setProperty("--scheduler-resource-column-width", `min(${n}px, calc(100% - ${e.MIN_GRID_PX}px))`);
|
|
1121
|
-
let r = this.container.querySelector(".scheduler-column-resizer");
|
|
1122
|
-
r && this.updateResizerValue(r, n);
|
|
1123
|
-
}
|
|
1124
|
-
updateResizerValue(e, t) {
|
|
1125
|
-
let n = t ?? this.currentColumnWidth();
|
|
1126
|
-
e.setAttribute("aria-valuemin", "0"), e.setAttribute("aria-valuemax", "100"), e.setAttribute("aria-valuenow", String(G(n, this.container.clientWidth)));
|
|
1127
|
-
}
|
|
1128
|
-
onColumnDragMove(e) {
|
|
1129
|
-
this.columnDrag && this.applyColumnWidth(this.columnDrag.startWidth + (e.clientX - this.columnDrag.startX));
|
|
1130
|
-
}
|
|
1131
|
-
onColumnDragEnd() {
|
|
1132
|
-
this.columnDrag = null, document.removeEventListener("pointermove", this.boundColumnDragMove), document.removeEventListener("pointerup", this.boundColumnDragEnd);
|
|
1133
|
-
}
|
|
1134
|
-
can(e) {
|
|
1135
|
-
return s(e, { permissions: this.state.resolvedPermissions });
|
|
1136
|
-
}
|
|
1137
|
-
rowActions(e) {
|
|
1138
|
-
let t = [];
|
|
1139
|
-
return this.can("updateResource") && t.push("rename-resource"), m(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;
|
|
1140
|
-
}
|
|
1141
|
-
appendResourceActions(e, t) {
|
|
1142
|
-
if (this.rowActions(t).length === 0) return;
|
|
1143
|
-
let n = h(this.state.options.messages), r = a(n.rowMenuLabel, { title: t.title }), i = this.createElement("button", "scheduler-row-menu-button");
|
|
1144
|
-
i.type = "button", i.setAttribute("aria-label", r), i.title = r, i.setAttribute("aria-haspopup", "dialog"), i.setAttribute("aria-expanded", "false"), i.tabIndex = -1, this.setData(i, {
|
|
1145
|
-
action: "row-menu",
|
|
1146
|
-
resourceId: t.id
|
|
1147
|
-
});
|
|
1148
|
-
let o = t.eventColor ?? t.color, s = o ? u(o) : null;
|
|
1149
|
-
o && s && (i.style.background = o, i.style.color = s, i.style.borderColor = o);
|
|
1150
|
-
let c = this.createElement("span", "action-glyph");
|
|
1151
|
-
c.setAttribute("aria-hidden", "true"), c.textContent = "⋯", i.appendChild(c), e.insertBefore(i, e.firstChild);
|
|
1152
|
-
}
|
|
1153
|
-
createAddBar() {
|
|
1154
|
-
let e = this.can("createResource"), t = this.can("createGroup");
|
|
1155
|
-
if (!e && !t) return null;
|
|
1156
|
-
let n = h(this.state.options.messages), r = this.createElement("div", "scheduler-timeline-addbar");
|
|
1157
|
-
if (r.setAttribute("role", "toolbar"), r.setAttribute("aria-label", n.addResourceBarLabel), e) {
|
|
1158
|
-
let e = this.createElement("button", "scheduler-add-button");
|
|
1159
|
-
e.type = "button", e.textContent = n.addResource, this.setData(e, { action: "add-resource" }), r.appendChild(e);
|
|
1160
|
-
}
|
|
1161
|
-
if (t) {
|
|
1162
|
-
let e = this.createElement("button", "scheduler-add-button");
|
|
1163
|
-
e.type = "button", e.textContent = n.addGroup, this.setData(e, { action: "add-group" }), r.appendChild(e);
|
|
1164
|
-
}
|
|
1165
|
-
return r;
|
|
1166
|
-
}
|
|
1167
|
-
createUnassignedRow(e) {
|
|
1168
|
-
let { options: t } = this.state, n = this.createElement("div", "scheduler-timeline-row", "unassigned");
|
|
1169
|
-
n.setAttribute("role", "row");
|
|
1170
|
-
let r = this.createElement("div", "scheduler-resource-cell");
|
|
1171
|
-
r.setAttribute("role", "rowheader"), r.setAttribute("aria-colindex", "1"), r.style.paddingLeft = "8px";
|
|
1172
|
-
let i = this.createElement("span", "resource-title");
|
|
1173
|
-
i.textContent = h(t.messages).unassignedResource, i.title = i.textContent, r.appendChild(i), n.appendChild(r);
|
|
1174
|
-
let a = this.createElement("div", "scheduler-timeline-slots");
|
|
1175
|
-
a.setAttribute("role", "presentation");
|
|
1176
|
-
let o = 2;
|
|
1177
|
-
for (let t of e) for (let e of t) {
|
|
1178
|
-
let t = this.createElement("div", "scheduler-timeline-slot");
|
|
1179
|
-
t.setAttribute("role", "gridcell"), t.setAttribute("aria-colindex", String(o)), o++, t.setAttribute("tabindex", "-1"), t.setAttribute("aria-selected", "false"), t.setAttribute("aria-label", N(e, this.state.options, h(this.state.options.messages).unassignedResource)), t.id = `scheduler-cell-t-${K}-${e.start.getTime()}`, t.style.width = `${this.slotWidth}px`, this.setData(t, {
|
|
1180
|
-
start: e.start.toISOString(),
|
|
1181
|
-
end: e.end.toISOString(),
|
|
1182
|
-
unassigned: "true"
|
|
1183
|
-
}), a.appendChild(t);
|
|
1184
|
-
}
|
|
1185
|
-
let s = this.createElement("div", "scheduler-timeline-events");
|
|
1186
|
-
return s.setAttribute("role", "gridcell"), s.setAttribute("aria-colindex", "2"), s.setAttribute("aria-colspan", String(o - 2)), a.appendChild(s), n.appendChild(a), this.rowElements.set(K, n), n;
|
|
1187
|
-
}
|
|
1188
|
-
renderEvents(e) {
|
|
1189
|
-
let { resources: t, options: n } = this.state, r = e[0], i = new Date(e[6]);
|
|
1190
|
-
i.setHours(23, 59, 59, 999);
|
|
1191
|
-
let a = _.getTimeSlots(e[0], n.slotDuration, n.slotMinTime, n.slotMaxTime).length * 7 * this.slotWidth, o = [...g.getAllResources(t).map((e) => ({
|
|
1192
|
-
resourceId: e.id,
|
|
1193
|
-
title: e.title
|
|
1194
|
-
})), ...this.rowElements.has(K) ? [{
|
|
1195
|
-
resourceId: null,
|
|
1196
|
-
title: h(n.messages).unassignedResource
|
|
1197
|
-
}] : []];
|
|
1198
|
-
for (let { resourceId: e, title: t } of o) {
|
|
1199
|
-
let o = this.rowElements.get(e ?? K);
|
|
1200
|
-
if (!o) continue;
|
|
1201
|
-
let s = o.querySelector(".scheduler-timeline-events");
|
|
1202
|
-
if (!s) continue;
|
|
1203
|
-
s.innerHTML = "";
|
|
1204
|
-
let c = (this.state.eventsByResource.get(e) ?? []).filter((e) => e.start < i && e.end > r).map((e) => ({
|
|
1205
|
-
id: e.id,
|
|
1206
|
-
event: e,
|
|
1207
|
-
start: e.start,
|
|
1208
|
-
end: e.end,
|
|
1209
|
-
isStart: !0,
|
|
1210
|
-
isEnd: !0,
|
|
1211
|
-
dayIndex: 0,
|
|
1212
|
-
totalDays: 1
|
|
1213
|
-
})), l = p.getTimelinedParts(c), u = l.reduce((e, t) => Math.max(e, t.totalTracks), 1), { height: d, gap: f, padding: m } = this.trackMetrics;
|
|
1214
|
-
o.style.minHeight = `${u * d + (u - 1) * f + 2 * m}px`;
|
|
1215
|
-
for (let { part: e, trackIndex: i } of l) {
|
|
1216
|
-
if (!e.event) continue;
|
|
1217
|
-
let o = this.createEventElement(e.event, i, r, a, n.slotDuration ?? 1800, t);
|
|
1218
|
-
s.appendChild(o);
|
|
1219
|
-
}
|
|
1220
|
-
}
|
|
1221
|
-
}
|
|
1222
|
-
createEventElement(e, t, n, r, i, a = null) {
|
|
1223
|
-
let o = this.createElement("div", "scheduler-timeline-event"), s = this.state.selectedEvent?.id === e.id;
|
|
1224
|
-
this.state.keyboardMoveEventId, e.id, o.setAttribute("role", "button"), o.setAttribute("tabindex", "0"), o.setAttribute("aria-label", A(e, a, this.state.options)), o.setAttribute("aria-pressed", s ? "true" : "false"), o.setAttribute("aria-describedby", "scheduler-kbd-event"), s && o.classList.add("selected");
|
|
1225
|
-
let c = Math.max(e.start.getTime(), n.getTime()), l = n.getTime() + 6048e5, u = Math.min(e.end.getTime(), l), d = c - n.getTime(), f = u - c, p = l - n.getTime(), m = d / p * r, h = Math.max(f / p * r, 20), { height: g, gap: _, padding: v } = this.trackMetrics;
|
|
1226
|
-
o.style.left = `${m}px`, o.style.width = `${h}px`, o.style.top = `${v + t * (g + _)}px`, o.style.height = `${g}px`, this.applyEventColors(o, e), this.setData(o, { eventId: e.id });
|
|
1227
|
-
let y = this.createElement("div", "event-content"), b = this.createElement("div", "event-title");
|
|
1228
|
-
return b.textContent = e.title, y.appendChild(b), o.appendChild(y), this.appendResizeHandles(o, {
|
|
1229
|
-
id: e.id,
|
|
1230
|
-
event: e,
|
|
1231
|
-
start: e.start,
|
|
1232
|
-
end: e.end,
|
|
1233
|
-
isStart: e.start.getTime() >= n.getTime(),
|
|
1234
|
-
isEnd: e.end.getTime() <= l,
|
|
1235
|
-
dayIndex: 0,
|
|
1236
|
-
totalDays: 1
|
|
1237
|
-
}, ["left", "right"]), o;
|
|
1238
|
-
}
|
|
1239
|
-
renderPreviewEvent(e) {
|
|
1240
|
-
this.container.querySelector(".scheduler-timeline-event.preview")?.remove();
|
|
1241
|
-
let { dragState: t, previewEvent: n, options: r } = this.state;
|
|
1242
|
-
if (!n) return;
|
|
1243
|
-
let i = t?.event?.id ?? this.state.keyboardMoveEventId, a = this.previewRowKey();
|
|
1244
|
-
if (!a) return;
|
|
1245
|
-
let o = this.rowElements.get(a)?.querySelector(".scheduler-timeline-events");
|
|
1246
|
-
if (!o) return;
|
|
1247
|
-
let s = _.getTimeSlots(e[0], r.slotDuration, r.slotMinTime, r.slotMaxTime).length * 7 * this.slotWidth, c = e[0], l = c.getTime() + 6048e5, u = Math.max(n.start.getTime(), c.getTime()), d = Math.min(n.end.getTime(), l), f = l - c.getTime(), p = this.createElement("div", "scheduler-timeline-event", "preview");
|
|
1248
|
-
p.style.left = `${(u - c.getTime()) / f * s}px`, p.style.width = `${Math.max((d - u) / f * s, 20)}px`;
|
|
1249
|
-
let m = i ? Array.from(o.querySelectorAll(".scheduler-timeline-event:not(.preview)")).find((e) => e.dataset.eventId === i) : void 0;
|
|
1250
|
-
if (m) p.style.top = m.style.top, p.style.height = m.style.height;
|
|
1251
|
-
else {
|
|
1252
|
-
let { height: e, padding: t } = this.trackMetrics;
|
|
1253
|
-
p.style.top = `${t}px`, p.style.height = `${e}px`;
|
|
1254
|
-
}
|
|
1255
|
-
o.appendChild(p);
|
|
1256
|
-
}
|
|
1257
|
-
previewRowKey() {
|
|
1258
|
-
let { dragState: e, previewEvent: t } = this.state;
|
|
1259
|
-
if (!t) return;
|
|
1260
|
-
if (t.resourceId !== void 0) return t.resourceId ?? K;
|
|
1261
|
-
let n = e?.event?.id ?? this.state.keyboardMoveEventId, r = n ? this.state.events.find((e) => e.id === n) : void 0;
|
|
1262
|
-
return r ? r.resourceId ?? K : this.state.selectionResourceId ?? this.state.focusedResourceId ?? void 0;
|
|
1263
|
-
}
|
|
1264
|
-
update(e) {
|
|
1265
|
-
let t = this.state.date.getTime() !== e.date.getTime(), n = this.optionsRequireRerender(this.state.options, e.options), r = this.state.resources !== e.resources || this.state.collapsedGroups !== e.collapsedGroups || this.state.resolvedPermissions !== e.resolvedPermissions || this.hasUnassignedRow(this.state) !== this.hasUnassignedRow(e);
|
|
1266
|
-
if (this.state = e, t || n || r) {
|
|
1267
|
-
this.render();
|
|
1268
|
-
return;
|
|
1269
|
-
}
|
|
1270
|
-
this.updateGreyedSlots();
|
|
1271
|
-
let i = _.getWeekDays(e.date, this.firstDayOfWeek);
|
|
1272
|
-
this.renderEvents(i), this.renderPreviewEvent(i), this.updateCellFocusAndSelection();
|
|
1273
|
-
}
|
|
1274
|
-
optionsRequireRerender(e, t) {
|
|
1275
|
-
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;
|
|
1276
|
-
}
|
|
1277
|
-
updateGreyedSlots() {
|
|
1278
|
-
let { dragState: e, previewEvent: t } = this.state;
|
|
1279
|
-
if (this.container.querySelectorAll(".scheduler-timeline-slot").forEach((e) => e.classList.remove("greyed")), this.container.querySelectorAll(".scheduler-timeline-row.drop-target").forEach((e) => e.classList.remove("drop-target")), !e || !t) return;
|
|
1280
|
-
let n = this.previewRowKey(), r = n ? this.rowElements.get(n) : void 0;
|
|
1281
|
-
r && (r.classList.add("drop-target"), r.querySelectorAll(".scheduler-timeline-slot").forEach((e) => {
|
|
1282
|
-
let n = new Date(e.dataset.start ?? ""), r = new Date(e.dataset.end ?? "");
|
|
1283
|
-
n < t.end && r > t.start && e.classList.add("greyed");
|
|
1284
|
-
}));
|
|
1285
|
-
}
|
|
1286
|
-
destroy() {
|
|
1287
|
-
this.onColumnDragEnd(), this.rowElements.clear(), this.clearContainer();
|
|
1288
|
-
}
|
|
1289
|
-
}, J = x("@charset \"UTF-8\";\n/* Layering ladder. Nothing between :host and the events establishes a\n stacking context, so every one of these competes in ONE shared context\n across the whole shadow root — a selected event in one day column is\n compared directly against the now-indicator in another, and against the\n sticky header. Keep them here, in order, rather than scattering magic\n numbers: the preview ghost silently disappearing behind a selected event\n is exactly what an undocumented ladder buys you.\n SCSS vars (not custom properties) on purpose — these compile away, so the\n ladder stays internal instead of becoming consumer-overridable API. */\n:host {\n display: block;\n height: 100%;\n font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Oxygen, Ubuntu, sans-serif;\n font-size: 14px;\n --scheduler-border-color: var(--bs-border-color, #ddd);\n --scheduler-header-bg: var(--bs-tertiary-bg, #f8f9fa);\n --scheduler-today-bg: var(--bs-warning-bg-subtle, #fff3cd);\n --scheduler-slot-height: 40px;\n --scheduler-time-gutter-width: 80px;\n --scheduler-event-border-radius: 4px;\n --scheduler-now-indicator-color: var(--bs-danger, #dc3545);\n --scheduler-preview-bg: rgba(var(--bs-primary-rgb), 0.3);\n --scheduler-greyed-slot-bg: rgba(var(--bs-emphasis-color-rgb), 0.1);\n --scheduler-column-min-width: 120px;\n --scheduler-touch-hold-duration: 500ms;\n /* Timeline slot width. Was hard-coded at 50px in TS, which made a default week\n 16,800px wide; consumers can now shorten it. */\n --scheduler-slot-width: 50px;\n /* Timeline track geometry. Time runs horizontally there, so an event's height\n is free to be constant and overlapping events stack downwards, growing the\n resource row — see TimelineView.trackMetrics. */\n --scheduler-timeline-event-height: 28px;\n --scheduler-timeline-track-gap: 2px;\n --scheduler-timeline-row-padding: 2px;\n /* Pinned resource column. Capped so it can never swallow the grid on a narrow\n viewport (AG Grid applies the same guard by auto-unpinning).\n 140px, down from 200px: the four inline action controls that used to need\n 102px of it are now behind one 24px trigger, so the title gets MORE room in\n a narrower column than it had in the wide one. */\n --scheduler-resource-column-width: min(140px, calc(100% - 50px));\n --scheduler-resize-glyph-size: 14px;\n --scheduler-resize-glyph-color: var(--bs-body-color, #212529);\n --scheduler-resize-glyph-bg: var(--bs-body-bg, #fff);\n}\n\n* {\n box-sizing: border-box;\n}\n\n/* Off-screen but readable by AT — carries the aria-describedby keymap\n instructions (never applied to focusable elements). */\n.visually-hidden {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip-path: inset(50%);\n white-space: nowrap;\n border: 0;\n}\n\n.scheduler-container {\n display: flex;\n flex-direction: column;\n height: 100%;\n border: 1px solid var(--scheduler-border-color);\n border-radius: 4px;\n overflow: hidden;\n background: var(--bs-body-bg);\n}\n\n/* Header — wraps as GROUPS when narrow ([data-narrow], set by a\n ResizeObserver on component width): nav + view switcher share the first\n row(s), the title takes a full-width row, so no control ever leaves reach\n and the title never word-wraps (PRD D9). */\n.scheduler-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n flex-wrap: wrap;\n gap: 8px;\n padding: 8px 12px;\n background: var(--scheduler-header-bg);\n border-bottom: 1px solid var(--scheduler-border-color);\n flex-shrink: 0;\n}\n\n.scheduler-header[data-narrow] {\n justify-content: center;\n}\n\n.scheduler-header[data-narrow] .scheduler-nav {\n order: 1;\n}\n\n.scheduler-header[data-narrow] .scheduler-view-switcher {\n order: 2;\n flex-wrap: wrap;\n justify-content: center;\n}\n\n.scheduler-header[data-narrow] .scheduler-title {\n order: 3;\n flex-basis: 100%;\n text-align: center;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.scheduler-nav {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.scheduler-nav button {\n padding: 6px 12px;\n border: 1px solid var(--scheduler-border-color);\n border-radius: 4px;\n background: var(--bs-body-bg);\n cursor: pointer;\n font-size: 14px;\n}\n\n.scheduler-nav button:hover {\n background: var(--bs-tertiary-bg);\n}\n\n.scheduler-title {\n font-size: 18px;\n font-weight: 600;\n /* Never word-wrap the period title — multi-line titles distorted the whole\n header on phones; narrow mode compacts the text instead. */\n white-space: nowrap;\n}\n\n.scheduler-view-switcher {\n display: flex;\n gap: 4px;\n}\n\n.scheduler-view-switcher button {\n padding: 6px 12px;\n border: 1px solid var(--scheduler-border-color);\n border-radius: 4px;\n background: var(--bs-body-bg);\n cursor: pointer;\n font-size: 13px;\n}\n\n.scheduler-view-switcher button:hover {\n background: var(--bs-tertiary-bg);\n}\n\n.scheduler-view-switcher button.active {\n background: var(--bs-primary);\n color: #fff;\n border-color: var(--bs-primary);\n}\n\n/* Main content area — the single scroller for every view.\n (`.scheduler-body` / `.scheduler-sidebar` / `.scheduler-grid` rules lived here\n with no producer in any view; removed rather than left to mislead.) */\n.scheduler-content {\n flex: 1;\n overflow: auto;\n position: relative;\n}\n\n/* Week/Day View Grid */\n.scheduler-day-headers {\n display: flex;\n border-bottom: 1px solid var(--scheduler-border-color);\n background: var(--scheduler-header-bg);\n position: sticky;\n top: 0;\n z-index: 10;\n min-width: fit-content;\n}\n\n.scheduler-day-header {\n flex: 1 0 var(--scheduler-column-min-width);\n min-width: var(--scheduler-column-min-width);\n text-align: center;\n padding: 8px 4px;\n border-right: 1px solid var(--scheduler-border-color);\n font-weight: 500;\n}\n\n.scheduler-day-header:last-child {\n border-right: none;\n}\n\n.scheduler-day-header.today {\n background: var(--scheduler-today-bg);\n}\n\n.scheduler-day-header .day-name {\n font-size: 12px;\n color: var(--bs-secondary-color);\n text-transform: uppercase;\n}\n\n.scheduler-day-header .day-number {\n font-size: 20px;\n font-weight: 600;\n margin-top: 2px;\n}\n\n.scheduler-time-grid {\n display: flex;\n position: relative;\n min-width: fit-content;\n}\n\n.scheduler-time-gutter {\n width: var(--scheduler-time-gutter-width);\n flex-shrink: 0;\n border-right: 1px solid var(--scheduler-border-color);\n background: var(--scheduler-header-bg);\n /* Pin the time labels while the week scrolls horizontally — same defect the\n timeline's resource column had. Background is already opaque. */\n position: sticky;\n left: 0;\n z-index: 7;\n}\n\n.scheduler-time-slot-label {\n height: var(--scheduler-slot-height);\n padding: 0 8px;\n font-size: 12px;\n color: var(--bs-secondary-color);\n text-align: right;\n position: relative;\n top: -8px;\n white-space: nowrap;\n}\n\n.scheduler-days-container {\n display: flex;\n flex: 1;\n position: relative;\n min-width: fit-content;\n}\n\n.scheduler-day-column {\n flex: 1 0 var(--scheduler-column-min-width);\n min-width: var(--scheduler-column-min-width);\n position: relative;\n border-right: 1px solid var(--scheduler-border-color);\n}\n\n.scheduler-day-column:last-child {\n border-right: none;\n}\n\n.scheduler-time-slot {\n height: var(--scheduler-slot-height);\n border-bottom: 1px solid var(--bs-border-color);\n position: relative;\n}\n\n.scheduler-time-slot:nth-child(2n) {\n border-bottom-color: var(--scheduler-border-color);\n}\n\n.scheduler-time-slot.greyed {\n background: var(--scheduler-greyed-slot-bg);\n}\n\n.scheduler-time-slot.selected {\n background: var(--scheduler-preview-bg);\n}\n\n.scheduler-time-slot:focus-visible,\n.scheduler-time-slot:focus {\n outline: 2px solid var(--bs-primary);\n outline-offset: -2px;\n /* Above the events overlay — including a SELECTED event, which would\n otherwise hide the focus ring of the slot beneath it. */\n z-index: 6;\n}\n\n/* Events */\n.scheduler-events-container {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n pointer-events: none;\n}\n\n.scheduler-event {\n position: absolute;\n border-radius: var(--scheduler-event-border-radius);\n padding: 2px 4px;\n font-size: 12px;\n /* The box stays unclipped so the selected-state resize handles/glyphs can\n straddle the top/bottom edges; text clipping lives on .event-content. */\n overflow: visible;\n cursor: pointer;\n pointer-events: auto;\n border-left: 3px solid rgba(0, 0, 0, 0.2);\n}\n\n.scheduler-event .event-content,\n.scheduler-timeline-event .event-content {\n height: 100%;\n overflow: hidden;\n}\n\n.scheduler-timeline-event .event-title {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n/* Prevent browser from handling touch gestures on events (enables drag).\n The three suppression properties beneath touch-action are the same recipe\n .dock-tab uses to run an identical 600ms long-press drag: without them iOS\n raises the selection magnifier over the event partway through the hold. They\n do NOT stop the contextmenu event itself — that is arbitrated in JS, see\n MpScheduler.handleContextMenu — they stop the selection UI that would appear\n alongside it. */\n.scheduler-event:not(.preview),\n.scheduler-timeline-event:not(.preview) {\n touch-action: none;\n -ms-touch-action: none;\n user-select: none;\n -webkit-user-select: none;\n -webkit-touch-callout: none;\n}\n\n.scheduler-event:hover {\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);\n}\n\n/* Focus indicator independent of the .selected box-shadow — selection can be\n driven externally, so focus needs its own visible signal (audit MAJOR).\n Inset like the slot outlines so it isn't clipped by scroll containers. */\n.scheduler-event:focus-visible,\n.scheduler-timeline-event:focus-visible,\n.scheduler-month-event:focus-visible,\n.scheduler-month-day:focus-visible,\n.scheduler-year-month:focus-visible {\n outline: 2px solid var(--bs-primary);\n outline-offset: -2px;\n}\n\n.scheduler-event.selected {\n box-shadow: 0 0 0 3px var(--bs-body-color);\n /* Raise above sibling events so the straddling handles win pointer hits.\n At most one event is selected. See the ladder at the top of this file. */\n z-index: 2;\n}\n\n.scheduler-event .event-title {\n font-weight: 500;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.scheduler-event .event-time {\n font-size: 11px;\n opacity: 0.8;\n}\n\n/* A range spanning several days renders one ghost per day. Drop the border on\n the midnight seams so the set reads as ONE range instead of N events. */\n.scheduler-event.preview.preview-continues-before,\n.scheduler-timeline-event.preview.preview-continues-before {\n border-top-color: transparent;\n}\n\n.scheduler-event.preview.preview-continues-after,\n.scheduler-timeline-event.preview.preview-continues-after {\n border-bottom-color: transparent;\n}\n\n.scheduler-event.preview {\n background: var(--scheduler-preview-bg);\n border: 2px dashed var(--bs-primary);\n pointer-events: none;\n /* MUST out-rank the source event in every state (normal, selected,\n dragging) — an equal z-index would leave it relying on the preview being\n appended last, which breaks the moment a view reorders its update(). */\n z-index: 4;\n}\n\n/* Resize handles — invisible 8px strips on every resizable event (the\n long-standing mouse hit zone). On the SELECTED event they grow to a\n WCAG-2.5.8-sized strip centered on the edge (half outside the box) and\n reveal the round glyph, which is the documented touch affordance. */\n.scheduler-event .resize-handle {\n position: absolute;\n left: 0;\n right: 0;\n height: 8px;\n cursor: ns-resize;\n touch-action: none;\n -ms-touch-action: none;\n}\n\n.scheduler-event .resize-handle.top {\n top: 0;\n}\n\n.scheduler-event .resize-handle.bottom {\n bottom: 0;\n}\n\n.scheduler-event.selected .resize-handle {\n height: 24px;\n}\n\n.scheduler-event.selected .resize-handle.top {\n top: -12px;\n}\n\n.scheduler-event.selected .resize-handle.bottom {\n bottom: -12px;\n}\n\n@media (pointer: coarse) {\n .scheduler-event.selected .resize-handle {\n height: 44px;\n }\n .scheduler-event.selected .resize-handle.top {\n top: -22px;\n }\n .scheduler-event.selected .resize-handle.bottom {\n bottom: -22px;\n }\n}\n/* Decorative resize glyph, revealed by selection. Never focusable and\n aria-hidden — the keyboard resize path is move-mode on the event itself.\n Border + background only, so forced-colors mode keeps it visible. */\n.scheduler-event .resize-glyph,\n.scheduler-timeline-event .resize-glyph {\n position: absolute;\n top: 50%;\n left: 50%;\n width: var(--scheduler-resize-glyph-size);\n height: var(--scheduler-resize-glyph-size);\n transform: translate(-50%, -50%);\n border: 2px solid var(--scheduler-resize-glyph-color);\n border-radius: 50%;\n background: var(--scheduler-resize-glyph-bg);\n opacity: 0;\n visibility: hidden;\n transition: opacity 0.15s ease;\n pointer-events: none;\n}\n\n.scheduler-event.selected .resize-glyph,\n.scheduler-timeline-event.selected .resize-glyph {\n opacity: 1;\n visibility: visible;\n}\n\n/* Now indicator */\n.scheduler-now-indicator {\n position: absolute;\n left: 0;\n right: 0;\n height: 2px;\n background: var(--scheduler-now-indicator-color);\n z-index: 5;\n pointer-events: none;\n}\n\n.scheduler-now-indicator::before {\n content: \"\";\n position: absolute;\n left: -4px;\n top: -4px;\n width: 10px;\n height: 10px;\n border-radius: 50%;\n background: var(--scheduler-now-indicator-color);\n}\n\n/* Month View */\n.scheduler-month-week {\n display: contents;\n}\n\n.scheduler-month-grid {\n display: grid;\n /* `minmax(min, 1fr)` + `min-width: fit-content`, NOT a bare `1fr`.\n The day-name header row is the same `.scheduler-day-headers` week view uses,\n whose cells are `flex: 1 0 var(--scheduler-column-min-width)` — so below\n 7 x that width the header row grows past the panel while a `1fr` grid kept\n shrinking, and the two column sets visibly disagreed (at 900px: 120px\n headers over 75px cells). Both now share one minimum and overflow together,\n which is also what makes the month view horizontally scrollable instead of\n illegibly narrow on a phone. */\n grid-template-columns: repeat(7, minmax(var(--scheduler-column-min-width), 1fr));\n min-width: fit-content;\n /* 120px, not 100px: a day number plus three 24px chips and the \"+N more\" link\n needs the room, and a chip clipped by `overflow: hidden` is a target the\n user cannot hit at all. */\n grid-auto-rows: minmax(120px, 1fr);\n height: 100%;\n}\n\n.scheduler-month-day {\n border-right: 1px solid var(--scheduler-border-color);\n border-bottom: 1px solid var(--scheduler-border-color);\n padding: 4px;\n overflow: hidden;\n}\n\n.scheduler-month-day:nth-child(7n) {\n border-right: none;\n}\n\n.scheduler-month-day.other-month {\n background: var(--bs-tertiary-bg);\n color: var(--bs-secondary-color);\n}\n\n.scheduler-month-day.today {\n background: var(--scheduler-today-bg);\n}\n\n.scheduler-month-day .day-number {\n font-weight: 500;\n margin-bottom: 4px;\n}\n\n.scheduler-month-day .month-events {\n display: flex;\n flex-direction: column;\n gap: 2px;\n}\n\n/* 24px tall with 24px of clear spacing between chips: WCAG 2.2 SC 2.5.8. These\n were 20.5px with a 20.6px safe-click diameter, which axe reports as a serious\n target-size failure — it only surfaces on the month view, so the page-load\n audit (week view) never saw it. The month row grows to fit (grid-auto-rows\n below), so three chips plus the \"+N more\" link still fit a cell. */\n.scheduler-month-event {\n display: flex;\n align-items: center;\n min-height: 24px;\n margin-bottom: 2px;\n padding: 2px 4px;\n border-radius: 2px;\n font-size: 11px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n cursor: pointer;\n}\n\n.scheduler-more-link {\n display: flex;\n align-items: center;\n min-height: 24px;\n font-size: 11px;\n color: var(--bs-primary);\n cursor: pointer;\n margin-top: 2px;\n}\n\n.scheduler-more-link:focus-visible {\n outline: 2px solid var(--bs-primary);\n outline-offset: 1px;\n}\n\n/* Day popover (month view). `position: fixed` coordinates are written by the\n OverlayController, so this element must stay a top-level child of the shadow\n root — nothing above it may introduce transform/filter/contain, which would\n make that ancestor the containing block and shift the panel. */\n.scheduler-day-popover {\n position: fixed;\n z-index: 20;\n min-width: 220px;\n max-width: min(320px, 90vw);\n max-height: 60vh;\n overflow-y: auto;\n padding: 8px;\n border: 1px solid var(--scheduler-border-color);\n border-radius: 6px;\n background: var(--bs-body-bg, #fff);\n box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);\n}\n\n.scheduler-day-popover .popover-head {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: 8px;\n margin-bottom: 6px;\n}\n\n.scheduler-day-popover .popover-date {\n font-weight: 600;\n}\n\n.scheduler-day-popover .popover-count,\n.scheduler-day-popover .popover-empty {\n font-size: 12px;\n color: var(--bs-secondary-color, #6c757d);\n}\n\n.scheduler-day-popover .popover-empty {\n margin: 4px 0 8px;\n}\n\n.scheduler-day-popover .popover-close {\n width: 24px;\n height: 24px;\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n border: 1px solid transparent;\n border-radius: 4px;\n background: transparent;\n color: inherit;\n font: inherit;\n cursor: pointer;\n}\n\n.scheduler-day-popover .popover-events {\n list-style: none;\n margin: 0 0 8px;\n padding: 0;\n display: flex;\n flex-direction: column;\n gap: 2px;\n}\n\n.scheduler-day-popover .popover-event-row {\n display: flex;\n align-items: center;\n gap: 2px;\n}\n\n.scheduler-day-popover .popover-event {\n display: flex;\n align-items: center;\n gap: 8px;\n flex: 1 1 auto;\n min-width: 0;\n min-height: 28px;\n padding: 4px 6px;\n border: 1px solid transparent;\n border-radius: 4px;\n background: transparent;\n color: inherit;\n font: inherit;\n text-align: left;\n cursor: pointer;\n}\n\n/* Per-row delete — a real sibling button (the row's event entry is itself a\n button, so nesting is not an option). 24px min target (SC 2.5.8). */\n.scheduler-day-popover .popover-event-delete {\n flex: 0 0 auto;\n min-width: 24px;\n min-height: 24px;\n padding: 0;\n border: 1px solid transparent;\n border-radius: 4px;\n background: transparent;\n color: var(--bs-secondary-color, #666);\n font: inherit;\n line-height: 1;\n cursor: pointer;\n}\n\n.scheduler-day-popover .popover-event-delete:hover {\n background: var(--bs-secondary-bg, rgba(0, 0, 0, 0.08));\n color: var(--bs-danger, #dc3545);\n}\n\n.scheduler-day-popover .popover-event:hover {\n background: var(--bs-secondary-bg, rgba(0, 0, 0, 0.08));\n}\n\n/* A colour chip, NOT the only carrier of identity — the title next to it says\n which event this is (WCAG 1.4.1). */\n.scheduler-day-popover .popover-event-swatch {\n width: 10px;\n height: 10px;\n flex: 0 0 auto;\n border-radius: 2px;\n}\n\n.scheduler-day-popover .popover-event-title {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n/* Month scope (opened from a year card): a group per day, each with its own\n sub-list. The outer list keeps .popover-events so the scroll cap applies. */\n.scheduler-day-popover .popover-day-groups {\n max-height: 40vh;\n overflow-y: auto;\n}\n\n.scheduler-day-popover .popover-day-group {\n display: flex;\n flex-direction: column;\n gap: 2px;\n}\n\n.scheduler-day-popover .popover-day-label {\n font-size: 11px;\n font-weight: 600;\n color: var(--bs-secondary-color, #666);\n margin-top: 4px;\n}\n\n/* The create action's resource picker — present only when resources exist. */\n.scheduler-day-popover .popover-resource {\n display: flex;\n align-items: center;\n gap: 6px;\n margin: 0 0 8px;\n font-size: 12px;\n}\n\n/* `<mp-select>` renders the native `<select>` and Bootstrap's `.form-select`\n styling inside its OWN shadow root, so all that is left out here is how much\n room the host takes in the row. Nothing inside it is reachable from this\n stylesheet — and nothing needs to be. */\n.scheduler-day-popover .popover-resource-select {\n flex: 1 1 auto;\n min-width: 0;\n font-size: 12px;\n}\n\n.scheduler-day-popover .popover-actions {\n display: flex;\n flex-wrap: wrap;\n gap: 4px;\n}\n\n.scheduler-day-popover .popover-action {\n min-height: 28px;\n padding: 4px 10px;\n border: 1px solid var(--scheduler-border-color);\n border-radius: 4px;\n background: var(--bs-body-bg);\n color: inherit;\n font: inherit;\n font-size: 12px;\n cursor: pointer;\n}\n\n.scheduler-day-popover .popover-action.primary {\n background: var(--bs-primary);\n border-color: var(--bs-primary);\n color: #fff;\n}\n\n.scheduler-day-popover button:focus-visible {\n outline: 2px solid var(--bs-primary);\n outline-offset: 1px;\n}\n\n/* Built-in event editor (R20/D12.8). Same containing-block rule as the day\n popover: a top-level shadow child, position written by the OverlayController. */\n.scheduler-event-editor {\n position: fixed;\n z-index: 20;\n min-width: 240px;\n max-width: min(320px, 90vw);\n max-height: 70vh;\n overflow-y: auto;\n padding: 8px;\n border: 1px solid var(--scheduler-border-color);\n border-radius: 6px;\n background: var(--bs-body-bg, #fff);\n box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);\n}\n\n.scheduler-event-editor .editor-head {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: 8px;\n margin-bottom: 6px;\n}\n\n.scheduler-event-editor .editor-title {\n font-weight: 600;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.scheduler-event-editor .editor-close {\n flex: 0 0 auto;\n min-width: 24px;\n min-height: 24px;\n padding: 0;\n border: 1px solid transparent;\n border-radius: 4px;\n background: transparent;\n color: inherit;\n font: inherit;\n line-height: 1;\n cursor: pointer;\n}\n\n.scheduler-event-editor .editor-field {\n display: flex;\n align-items: center;\n gap: 6px;\n margin: 0 0 6px;\n font-size: 12px;\n}\n\n.scheduler-event-editor .editor-field > span {\n flex: 0 0 40px;\n}\n\n/* The inputs carry Bootstrap's `.form-control` (+ `-sm`, and `-color` on the\n swatch), whose rules reach them through `formControlStyles` in this shadow\n root's `adoptedStyleSheets` — Bootstrap's page stylesheet cannot. So border,\n background, focus ring and disabled appearance are Bootstrap's; only the\n layout inside this panel is ours. `.form-control` already sets\n `width: 100%`, hence no `flex: 1 1 auto` here. */\n.scheduler-event-editor .editor-input {\n min-width: 0;\n}\n\n.scheduler-event-editor .editor-color-input {\n flex: 0 0 auto;\n width: 40px;\n}\n\n/* The start/end fields are `<mp-datetime-picker>`s: input-group, popups and\n Bootstrap styling all live in their own shadow roots, so only the width they\n take in the row is ours to set. Their popups are `position: fixed` and\n escape this panel's bounds by design — do not add overflow/transform to the\n editor, which would clip them or become their containing block. */\n.scheduler-event-editor mp-datetime-picker.editor-input {\n flex: 1 1 auto;\n display: block;\n}\n\n/* \"Inherit from resource\": the checkbox owns the colour's two states, so the\n swatch above is disabled while it is checked. Indented under the swatch it\n governs — past the 40px reserved for the other fields' names.\n\n `<mp-checkbox>` brings its own `.form-check` markup, indicator and label\n inside its shadow root, which is the point of using it here: Bootstrap's\n form styles do not cross a shadow boundary, so a bare `<input>` in this\n panel would render unstyled. Nothing to size from out here. */\n.scheduler-event-editor .editor-inherit {\n margin-left: 46px;\n}\n\n/* Validation messages render inside their own field via `errorFeedback()`, so\n `invalidFeedbackStyles` draws them; the panel only needs them to sit tight\n under the control rather than inherit the field's own row gap. */\n.scheduler-event-editor .invalid-feedback {\n margin-top: 2px;\n font-size: 12px;\n}\n\n.scheduler-event-editor .editor-actions {\n display: flex;\n flex-wrap: wrap;\n gap: 4px;\n}\n\n.scheduler-event-editor .editor-action {\n min-height: 28px;\n padding: 4px 10px;\n border: 1px solid var(--scheduler-border-color);\n border-radius: 4px;\n background: var(--bs-body-bg);\n color: inherit;\n font: inherit;\n font-size: 12px;\n cursor: pointer;\n}\n\n.scheduler-event-editor .editor-action.primary {\n background: var(--bs-primary);\n border-color: var(--bs-primary);\n color: #fff;\n}\n\n.scheduler-event-editor .editor-action.danger {\n border-color: var(--bs-danger, #dc3545);\n color: var(--bs-danger, #dc3545);\n}\n\n.scheduler-event-editor :is(button, input, select):focus-visible {\n outline: 2px solid var(--bs-primary);\n outline-offset: 1px;\n}\n\n/* Year View */\n.scheduler-year-grid {\n display: grid;\n grid-template-columns: repeat(4, 1fr);\n gap: 16px;\n padding: 16px;\n}\n\n.scheduler-year-month {\n border: 1px solid var(--scheduler-border-color);\n border-radius: 4px;\n overflow: hidden;\n}\n\n.scheduler-year-month-header {\n padding: 8px;\n background: var(--scheduler-header-bg);\n font-weight: 600;\n text-align: center;\n cursor: pointer;\n}\n\n.scheduler-year-month-header:hover {\n background: var(--bs-tertiary-bg);\n}\n\n.scheduler-mini-month {\n display: grid;\n grid-template-columns: repeat(7, 1fr);\n gap: 1px;\n padding: 4px;\n}\n\n.scheduler-mini-day {\n aspect-ratio: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 11px;\n cursor: pointer;\n border-radius: 50%;\n}\n\n.scheduler-mini-day:hover {\n background: var(--bs-tertiary-bg);\n}\n\n.scheduler-mini-day.has-events {\n font-weight: 600;\n}\n\n.scheduler-mini-day.has-events::after {\n content: \"\";\n position: absolute;\n bottom: 2px;\n width: 4px;\n height: 4px;\n border-radius: 50%;\n background: var(--bs-primary);\n}\n\n.scheduler-mini-day.today {\n background: var(--scheduler-today-bg);\n}\n\n.scheduler-mini-day.other-month {\n color: var(--bs-secondary-color);\n}\n\n/* Timeline View\n ONE scroller: `.scheduler-content` (same as week view). The timeline grows to\n its content width via `min-width: fit-content` and the header/column pin with\n `position: sticky`, so horizontal and vertical scrolling both happen on the\n element the component already treats as its scroller — which is what makes\n touch-pan, `.scroll-blocked` and the styled scrollbars work here at all.\n Previously `.scheduler-timeline-body` had its own `overflow: auto`, trapping\n the overflow in a nested scroller nothing knew about, while the header strip\n clipped ~16,800px of labels with no scroll sync. */\n.scheduler-timeline {\n display: flex;\n flex-direction: column;\n min-height: 100%;\n min-width: fit-content;\n}\n\n/* The grid claims the full scrollport height so its rows fill the panel. With\n the add bar below it that sums to more than 100% and every timeline gets a\n permanent vertical scrollbar, so drop the claim when the bar is present. */\n.scheduler-timeline:has(+ .scheduler-timeline-addbar) {\n min-height: auto;\n}\n\n.scheduler-timeline-head {\n position: sticky;\n top: 0;\n z-index: 10;\n min-width: fit-content;\n background: var(--scheduler-header-bg);\n}\n\n.scheduler-timeline-header {\n display: flex;\n border-bottom: 1px solid var(--scheduler-border-color);\n background: var(--scheduler-header-bg);\n min-width: fit-content;\n}\n\n.scheduler-resource-header {\n width: var(--scheduler-resource-column-width);\n max-width: var(--scheduler-resource-column-width);\n flex-shrink: 0;\n padding: 8px;\n border-right: 1px solid var(--scheduler-border-color);\n font-weight: 600;\n /* Pinned on BOTH axes: inside the sticky header block, so it stays put\n horizontally as the grid scrolls and vertically with the header. */\n position: sticky;\n left: 0;\n z-index: 7;\n background: var(--scheduler-header-bg);\n}\n\n.scheduler-timeline-slots-header {\n display: flex;\n /* NOT flex: 1 — it must size to its content so the header travels with the\n grid instead of shrinking and clipping it. */\n flex: 0 0 auto;\n}\n\n.scheduler-timeline-slot-header {\n flex-shrink: 0;\n padding: 8px;\n text-align: center;\n border-right: 1px solid var(--scheduler-border-color);\n font-size: 12px;\n}\n\n/* The DAY header row only — this class is shared with the 336 per-slot time\n labels, which must keep their centred, non-sticky behaviour. */\n.scheduler-timeline-slot-header.day {\n text-align: start;\n}\n\n/* Pin the date to the left edge of the scrollport so it stays readable for the\n whole day, instead of only while the middle of a 2400px column is on screen.\n\n The offset is the resource column, NOT 0: the corner cell is `sticky; left: 0`\n at $z-sticky-column, so a label stuck at 0 would slide underneath it and be\n invisible for the last stretch of each day. Reading the same custom property\n the column resizer writes means a user-dragged column keeps this in sync for\n free. Logical property so RTL pins to the right edge.\n\n Sticky INSIDE the sticky header block is fine — that one sticks on `top`,\n this on the inline axis, so they do not compete. Verified in Chromium: the\n label pins at the column edge, hands off cleanly to the next day at the\n boundary, never leaves its own cell, and passes UNDER the corner column. */\n.scheduler-timeline-slot-header.day .day-label {\n position: sticky;\n inset-inline-start: var(--scheduler-resource-column-width);\n display: inline-block;\n /* Opaque so the outgoing label cannot show through the incoming one during\n the hand-off at a day boundary. */\n background: var(--scheduler-header-bg);\n}\n\n.scheduler-timeline-body {\n display: flex;\n flex-direction: column;\n /* No `overflow: auto` and no `flex: 1`: this must NOT be a scroller, or the\n horizontal overflow is trapped here instead of reaching .scheduler-content. */\n flex: 0 0 auto;\n min-width: fit-content;\n}\n\n.scheduler-timeline-empty {\n padding: 16px;\n color: var(--bs-secondary-color, #6c757d);\n /* Sticky-left so the message stays readable while the grid scrolls, and\n narrow enough not to stretch the (already very wide) timeline. */\n position: sticky;\n left: 0;\n width: var(--scheduler-resource-column-width);\n}\n\n.scheduler-timeline-row {\n display: flex;\n border-bottom: 1px solid var(--scheduler-border-color);\n min-height: 40px;\n /* Required: this is the sticky resource cell's containing block, so without it\n the pinned column only travels one viewport-width. Also stops row borders,\n .group backgrounds and .selected highlights ending at the viewport edge. */\n min-width: fit-content;\n}\n\n.scheduler-timeline-row.group {\n background: var(--scheduler-header-bg);\n font-weight: 600;\n}\n\n/* The row a drag is currently addressing — the cross-row move's answer to\n \"which resource will this land on?\". A tint on the whole row, not only the\n greyed slots, so the target reads at a glance even when the time band is\n scrolled out of view. */\n.scheduler-timeline-row.drop-target {\n background: var(--scheduler-drop-target-bg, rgba(13, 110, 253, 0.06));\n}\n\n/* Resource-column resize separator (R15): the WAI-ARIA window splitter on the\n corner header's right edge. Inside the sticky corner cell, so it pins with\n the column it resizes.\n\n NOTE: this block used to re-declare `.scheduler-resource-header { position:\n relative }` so the absolutely-positioned resizer below had a containing block.\n That silently un-stuck BOTH corner cells — same specificity as the sticky\n declaration above, later in the file, so `relative` won — and the two header\n cells scrolled away with the grid while every body row stayed pinned. It was\n never needed: `position: sticky` is itself a positioned value and already\n establishes the containing block the resizer wants. */\n.scheduler-column-resizer {\n position: absolute;\n top: 0;\n right: -4px;\n width: 8px;\n height: 100%;\n cursor: col-resize;\n /* Above the neighbouring day headers so the whole 8px strip is grabbable. */\n z-index: 1;\n touch-action: none;\n}\n\n.scheduler-column-resizer:hover,\n.scheduler-column-resizer:focus-visible {\n background: var(--bs-primary);\n opacity: 0.35;\n}\n\n.scheduler-column-resizer:focus-visible {\n outline: 2px solid var(--bs-primary);\n outline-offset: 1px;\n opacity: 0.6;\n}\n\n/* Inline rename (R17): the input takes the title's place in the pinned cell.\n Bootstrap's `.form-control.form-control-sm` supplies the chrome (via this\n shadow root's adopted sheets); these rules only shrink it to fit a 40px row\n inside a 200px column, and keep the accent border that marks it as the\n active edit. Higher specificity than `.form-control`, so they win. */\n.scheduler-resource-cell .rename-input {\n flex: 1 1 auto;\n min-width: 0;\n min-height: 24px;\n height: 24px;\n padding: 1px 4px;\n border-color: var(--bs-primary);\n font-size: inherit;\n}\n\n.scheduler-timeline-row.group .scheduler-resource-cell {\n /* Sticky cells are transparent by default — a group row must keep its own\n tint or slots slide visibly underneath the pinned column. */\n background: var(--scheduler-header-bg);\n}\n\n.scheduler-resource-cell {\n width: var(--scheduler-resource-column-width);\n max-width: var(--scheduler-resource-column-width);\n flex-shrink: 0;\n padding: 8px;\n border-right: 1px solid var(--scheduler-border-color);\n display: flex;\n align-items: center;\n gap: 8px;\n /* Pinned left while the grid scrolls horizontally. Needs an opaque background\n for the same reason as above. */\n position: sticky;\n left: 0;\n z-index: 7;\n background: var(--bs-body-bg);\n}\n\n.scheduler-resource-cell .resource-title {\n /* Ellipsis rather than wrap: the row is a fixed 40px and the action buttons\n must not be pushed out of the pinned column by a long title. */\n flex: 1 1 auto;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.scheduler-resource-cell .expand-toggle {\n cursor: pointer;\n width: 16px;\n height: 16px;\n display: flex;\n align-items: center;\n justify-content: center;\n flex: 0 0 auto;\n}\n\n/* The row's actions trigger. One button where four controls used to sit: they\n took 102px of a 200px column and left the title about 50px — five characters.\n Doubles as the row's colour chip, which is the first time a group's stored\n colour is painted anywhere in this column. */\n.scheduler-row-menu-button {\n /* 24x24 = WCAG 2.2 SC 2.5.8 minimum target size. The glyph is smaller; the\n button is not. */\n width: 24px;\n height: 24px;\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n cursor: pointer;\n border: 1px solid var(--scheduler-border-color);\n border-radius: 4px;\n background: transparent;\n color: inherit;\n font: inherit;\n line-height: 1;\n}\n\n.scheduler-row-menu-button:hover {\n filter: brightness(0.92);\n}\n\n.scheduler-row-menu-button .action-glyph {\n font-size: 14px;\n pointer-events: none;\n}\n\n/* Row-actions dialog. Like .scheduler-day-popover, the OverlayController writes\n `position: fixed` coordinates, so this must stay a top-level child of the\n shadow root — nothing above it may introduce transform/filter/contain, which\n would become its containing block and shift the panel. It is also OUTSIDE the\n grid on purpose: a dialog owned by a rowheader breaks the grid's\n owned-children contract. */\n.scheduler-row-panel {\n position: fixed;\n z-index: 21;\n min-width: 200px;\n max-width: min(280px, 90vw);\n padding: 4px;\n display: flex;\n flex-direction: column;\n gap: 2px;\n border: 1px solid var(--scheduler-border-color);\n border-radius: 6px;\n background: var(--bs-body-bg, #fff);\n box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);\n}\n\n.scheduler-row-panel .row-action {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n /* 32px, comfortably over the 24px minimum: these are the primary targets on a\n phone now, not a secondary affordance. */\n min-height: 32px;\n padding: 4px 8px;\n border: 1px solid transparent;\n border-radius: 4px;\n background: transparent;\n color: inherit;\n font: inherit;\n font-size: 13px;\n text-align: start;\n cursor: pointer;\n}\n\n.scheduler-row-panel .row-action:hover {\n background: var(--bs-secondary-bg, rgba(0, 0, 0, 0.08));\n}\n\n.scheduler-row-panel .row-action.is-destructive {\n color: var(--bs-danger, #dc3545);\n}\n\n.scheduler-row-panel .row-color-input {\n /* A native colour input is ~44px wide by default. It stays native: the\n platform gives it keyboard operation, localization and an accessible name\n for free, and a dialog (unlike a menu) may legally own a form control. */\n width: 40px;\n height: 24px;\n padding: 0;\n border: 1px solid var(--scheduler-border-color);\n border-radius: 4px;\n background: transparent;\n cursor: pointer;\n flex: 0 0 auto;\n}\n\n/* Root-level creation bar, pinned to the foot of the frozen resource column.\n `left: 0` as well as `bottom: 0` so it tracks the column, not the grid, while\n the timeline scrolls horizontally. */\n.scheduler-timeline-addbar {\n position: sticky;\n bottom: 0;\n left: 0;\n z-index: 7;\n display: flex;\n flex-wrap: wrap;\n gap: 4px;\n width: var(--scheduler-resource-column-width);\n padding: 4px 8px;\n border-top: 1px solid var(--scheduler-border-color);\n background: var(--scheduler-header-bg);\n}\n\n.scheduler-add-button {\n min-height: 24px;\n padding: 2px 8px;\n cursor: pointer;\n border: 1px solid var(--scheduler-border-color);\n border-radius: 4px;\n background: var(--bs-body-bg);\n color: inherit;\n font: inherit;\n font-size: 12px;\n}\n\n.scheduler-add-button:hover {\n background: var(--bs-secondary-bg, rgba(0, 0, 0, 0.08));\n}\n\n/* Narrow mode stacks the two creation buttons instead of leaving them to wrap.\n `flex-wrap: wrap` only broke the row when the strings happened not to fit —\n an accident of font metrics that stopped working the moment the column\n narrowed or the labels were translated shorter. The signal is the same\n ResizeObserver that drives the header ([data-narrow] on .scheduler-container),\n keyed off COMPONENT width because the scheduler can sit in a dock pane far\n narrower than the viewport. */\n.scheduler-container[data-narrow] .scheduler-timeline-addbar {\n flex-direction: column;\n align-items: stretch;\n}\n\n/* One focus ring for every control in the resource column. `.expand-toggle` had\n none at all — Bootstrap's focus-ring utilities do not cross the shadow\n boundary, so a keyboard user tabbing onto it saw nothing. */\n.scheduler-resource-cell .expand-toggle:focus-visible,\n.scheduler-row-menu-button:focus-visible,\n.scheduler-row-panel .row-action:focus-visible,\n.scheduler-row-panel .row-color-input:focus-visible,\n.scheduler-add-button:focus-visible {\n outline: 2px solid var(--bs-primary);\n outline-offset: 1px;\n}\n\n.scheduler-timeline-slots {\n display: flex;\n /* Explicit rather than relying on `min-width: auto` to push past the row box. */\n flex: 0 0 auto;\n position: relative;\n}\n\n.scheduler-timeline-slot {\n flex-shrink: 0;\n border-right: 1px solid var(--bs-border-color);\n height: 100%;\n}\n\n.scheduler-timeline-slot.greyed {\n background: var(--scheduler-greyed-slot-bg);\n}\n\n.scheduler-timeline-slot.selected {\n background: var(--scheduler-preview-bg);\n}\n\n.scheduler-timeline-slot:focus-visible,\n.scheduler-timeline-slot:focus {\n outline: 2px solid var(--bs-primary);\n outline-offset: -2px;\n z-index: 6;\n}\n\n.scheduler-timeline-events {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n pointer-events: none;\n}\n\n.scheduler-timeline-event {\n position: absolute;\n /* top/height come from the track stack (set inline per event); the fallbacks\n here only apply to the drag ghost before it copies its source's band. */\n height: var(--scheduler-timeline-event-height);\n top: var(--scheduler-timeline-row-padding);\n border-radius: var(--scheduler-event-border-radius);\n padding: 2px 6px;\n font-size: 12px;\n /* Unclipped so the selected-state handles/glyphs straddle the left/right\n edges; title clipping lives on .event-content (same as .scheduler-event). */\n overflow: visible;\n cursor: pointer;\n pointer-events: auto;\n}\n\n.scheduler-timeline-event.selected {\n box-shadow: 0 0 0 3px var(--bs-body-color);\n z-index: 2;\n}\n\n.scheduler-timeline-event.preview {\n background: var(--scheduler-preview-bg);\n border: 2px dashed var(--bs-primary);\n pointer-events: none;\n z-index: 4;\n}\n\n/* Horizontal resize handles — timeline counterpart of the week/day strips. */\n.scheduler-timeline-event .resize-handle {\n position: absolute;\n top: 0;\n bottom: 0;\n width: 8px;\n cursor: ew-resize;\n touch-action: none;\n -ms-touch-action: none;\n}\n\n.scheduler-timeline-event .resize-handle.left {\n left: 0;\n}\n\n.scheduler-timeline-event .resize-handle.right {\n right: 0;\n}\n\n.scheduler-timeline-event.selected .resize-handle {\n width: 24px;\n}\n\n.scheduler-timeline-event.selected .resize-handle.left {\n left: -12px;\n}\n\n.scheduler-timeline-event.selected .resize-handle.right {\n right: -12px;\n}\n\n@media (pointer: coarse) {\n .scheduler-timeline-event.selected .resize-handle {\n width: 44px;\n }\n .scheduler-timeline-event.selected .resize-handle.left {\n left: -22px;\n }\n .scheduler-timeline-event.selected .resize-handle.right {\n right: -22px;\n }\n}\n/* Loading state */\n.scheduler-loading {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 200px;\n color: var(--bs-secondary-color);\n}\n\n/* Empty state */\n.scheduler-empty {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 200px;\n color: var(--bs-secondary-color);\n font-style: italic;\n}\n\n/* Touch drag mode indicator */\n.scheduler-container.touch-drag-mode {\n cursor: grabbing;\n user-select: none;\n -webkit-user-select: none;\n touch-action: none;\n -ms-touch-action: none;\n}\n\n.scheduler-container.touch-drag-mode .scheduler-content {\n overflow: hidden;\n touch-action: none;\n -ms-touch-action: none;\n}\n\n.scheduler-event.touch-hold-pending {\n animation: touch-hold-pulse 0.5s ease-in-out;\n touch-action: none;\n -ms-touch-action: none;\n}\n\n.scheduler-event.touch-hold-active {\n transform: scale(1.02);\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);\n /* Was 100, which painted a held event over the sticky day-header row (they\n share one scroller and one stacking context). It only needs to out-rank\n other events; the preview still goes above it. */\n z-index: 3;\n touch-action: none;\n -ms-touch-action: none;\n}\n\n.scheduler-time-slot.touch-hold-pending,\n.scheduler-timeline-slot.touch-hold-pending {\n animation: touch-hold-pulse 0.5s ease-in-out;\n}\n\n.scheduler-time-slot.touch-hold-active,\n.scheduler-timeline-slot.touch-hold-active {\n background: var(--scheduler-preview-bg);\n}\n\n@keyframes touch-hold-pulse {\n 0% {\n opacity: 1;\n }\n 50% {\n opacity: 0.7;\n }\n 100% {\n opacity: 1;\n }\n}\n/* Pan mode styling */\n.scheduler-content.pan-mode {\n cursor: grabbing;\n user-select: none;\n}\n\n/* Scroll blocking during drag operations */\n.scheduler-content.scroll-blocked {\n overflow: hidden !important;\n touch-action: none !important;\n}\n\n/* Scrollbar styling. Theme tokens, so the bar follows dark mode: the thumb uses\n --bs-secondary-color (--bs-secondary-bg is nearly invisible on --bs-tertiary-bg\n in dark). scrollbar-color is the standard path; the webkit rules cover engines\n that ignore it. */\n.scheduler-content {\n scrollbar-color: var(--bs-secondary-color) var(--bs-tertiary-bg);\n}\n\n.scheduler-content::-webkit-scrollbar {\n width: 8px;\n height: 8px;\n}\n\n.scheduler-content::-webkit-scrollbar-track {\n background: var(--bs-tertiary-bg);\n}\n\n.scheduler-content::-webkit-scrollbar-thumb {\n background: var(--bs-secondary-color);\n border-radius: 4px;\n}\n\n.scheduler-content::-webkit-scrollbar-thumb:hover {\n background: var(--bs-emphasis-color);\n}\n\n@media (prefers-reduced-motion: reduce) {\n .scheduler-event,\n .scheduler-timeline-event,\n .resize-glyph {\n animation: none !important;\n transition: none !important;\n }\n}"), Y = {
|
|
1290
|
-
dragThreshold: 5,
|
|
1291
|
-
minDurationMs: 18e5
|
|
1292
|
-
}, re = class {
|
|
1293
|
-
constructor(e = {}) {
|
|
1294
|
-
this.config = {
|
|
1295
|
-
...Y,
|
|
1296
|
-
...e
|
|
1297
|
-
};
|
|
1298
|
-
}
|
|
1299
|
-
calculatePreview(e, t, n, r) {
|
|
1300
|
-
switch (e) {
|
|
1301
|
-
case "create": return this.calculateCreatePreview(t, n);
|
|
1302
|
-
case "move": return r ? this.calculateMovePreview(t, n, r) : null;
|
|
1303
|
-
case "resize-start": return r ? this.calculateResizeStartPreview(n, r) : null;
|
|
1304
|
-
case "resize-end": return r ? this.calculateResizeEndPreview(n, r) : null;
|
|
1305
|
-
default: return null;
|
|
1306
|
-
}
|
|
1307
|
-
}
|
|
1308
|
-
calculateCreatePreview(e, t) {
|
|
1309
|
-
return {
|
|
1310
|
-
start: new Date(Math.min(e.start.getTime(), t.start.getTime())),
|
|
1311
|
-
end: new Date(Math.max(e.end.getTime(), t.end.getTime())),
|
|
1312
|
-
...e.resourceId === void 0 ? {} : { resourceId: e.resourceId }
|
|
1313
|
-
};
|
|
1314
|
-
}
|
|
1315
|
-
calculateMovePreview(e, t, n) {
|
|
1316
|
-
let r = t.start.getTime() - e.start.getTime(), i = n.end.getTime() - n.start.getTime(), a = new Date(n.start.getTime() + r), o = new Date(a.getTime() + i), s = t.resourceId === void 0 ? n.resourceId : t.resourceId;
|
|
1317
|
-
return {
|
|
1318
|
-
start: a,
|
|
1319
|
-
end: o,
|
|
1320
|
-
...s === void 0 ? {} : { resourceId: s }
|
|
1321
|
-
};
|
|
1322
|
-
}
|
|
1323
|
-
calculateResizeStartPreview(e, t) {
|
|
1324
|
-
let n = t.end.getTime() - this.config.minDurationMs;
|
|
1325
|
-
return {
|
|
1326
|
-
start: new Date(Math.min(e.start.getTime(), n)),
|
|
1327
|
-
end: t.end
|
|
1328
|
-
};
|
|
1329
|
-
}
|
|
1330
|
-
calculateResizeEndPreview(e, t) {
|
|
1331
|
-
let n = t.start.getTime() + this.config.minDurationMs, r = new Date(Math.max(e.end.getTime(), n));
|
|
1332
|
-
return {
|
|
1333
|
-
start: t.start,
|
|
1334
|
-
end: r
|
|
1335
|
-
};
|
|
1336
|
-
}
|
|
1337
|
-
};
|
|
1338
|
-
//#endregion
|
|
1339
|
-
//#region libs/mintplayer-web-components/scheduler/src/input/pointer-event.ts
|
|
1340
|
-
function X(e) {
|
|
1341
|
-
return {
|
|
1342
|
-
pointerId: 0,
|
|
1343
|
-
pointerType: "mouse",
|
|
1344
|
-
clientX: e.clientX,
|
|
1345
|
-
clientY: e.clientY,
|
|
1346
|
-
originalEvent: e,
|
|
1347
|
-
target: e.target,
|
|
1348
|
-
isPrimary: !0
|
|
1349
|
-
};
|
|
199
|
+
//#region libs/mintplayer-web-components/scheduler/src/generated/sched-popover-event.view.generated.ts
|
|
200
|
+
function S({ event: e, slots: t = {} }) {
|
|
201
|
+
return o`
|
|
202
|
+
<li data-mps="scheduler" ${r(e.row)}>
|
|
203
|
+
<button data-mps="scheduler" ${r(e.bag)}>
|
|
204
|
+
<span data-mps="scheduler" ${r(e.swatch)} style=${u(e.swatchStyle)}></span>
|
|
205
|
+
<span data-mps="scheduler" ${r(e.titleBag)}>${e.title}</span>
|
|
206
|
+
</button>
|
|
207
|
+
${e.remove ? o`
|
|
208
|
+
<button data-mps="scheduler" ${r(e.remove)}>
|
|
209
|
+
<span data-mps="scheduler" aria-hidden="true">×</span>
|
|
210
|
+
</button>
|
|
211
|
+
` : s}
|
|
212
|
+
</li>
|
|
213
|
+
`;
|
|
1350
214
|
}
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
215
|
+
//#endregion
|
|
216
|
+
//#region libs/mintplayer-web-components/scheduler/src/generated/sched-popover.view.generated.ts
|
|
217
|
+
function C({ popover: e, slots: t = {} }) {
|
|
218
|
+
return o`
|
|
219
|
+
<div data-mps="scheduler" ${r(e.bag)}>
|
|
220
|
+
<div data-mps="scheduler" ${r(e.head)}>
|
|
221
|
+
<div data-mps="scheduler">
|
|
222
|
+
<div data-mps="scheduler" ${r(e.dateBag)}>${e.date}</div>
|
|
223
|
+
<div data-mps="scheduler" ${r(e.countBag)}>${e.count}</div>
|
|
224
|
+
</div>
|
|
225
|
+
<button data-mps="scheduler" ${r(e.close)}>
|
|
226
|
+
<span data-mps="scheduler" aria-hidden="true">×</span>
|
|
227
|
+
</button>
|
|
228
|
+
</div>
|
|
229
|
+
${e.empty ? o`
|
|
230
|
+
<p data-mps="scheduler" ${r(e.empty.bag)}>${e.empty.text}</p>
|
|
231
|
+
` : s}
|
|
232
|
+
${e.list ? o`
|
|
233
|
+
<ul data-mps="scheduler" ${r(e.list)}>
|
|
234
|
+
${l(e.events, (e) => e.key, (e) => o`
|
|
235
|
+
${S({
|
|
236
|
+
event: e,
|
|
237
|
+
slots: t
|
|
238
|
+
})}
|
|
239
|
+
`)}
|
|
240
|
+
</ul>
|
|
241
|
+
` : s}
|
|
242
|
+
${l(e.groups, (e) => e.key, (e) => o`
|
|
243
|
+
<div data-mps="scheduler" ${r(e.bag)}>
|
|
244
|
+
<div data-mps="scheduler" ${r(e.headingBag)}>${e.heading}</div>
|
|
245
|
+
<ul data-mps="scheduler" ${r(e.list)}>
|
|
246
|
+
${l(e.events, (e) => e.key, (e) => o`
|
|
247
|
+
${S({
|
|
248
|
+
event: e,
|
|
249
|
+
slots: t
|
|
250
|
+
})}
|
|
251
|
+
`)}
|
|
252
|
+
</ul>
|
|
253
|
+
</div>
|
|
254
|
+
`)}
|
|
255
|
+
${e.resource ? o`
|
|
256
|
+
<label data-mps="scheduler" ${r(e.resource.bag)}>
|
|
257
|
+
<span data-mps="scheduler" ${r(e.resource.labelBag)}>${e.resource.label}</span>
|
|
258
|
+
<select data-mps="scheduler" ${r(e.resource.select)}>
|
|
259
|
+
${l(e.resource.options, (e) => e.key, (e) => o`
|
|
260
|
+
<option data-mps="scheduler" value=${e.value ?? s}>${e.text}</option>
|
|
261
|
+
`)}
|
|
262
|
+
</select>
|
|
263
|
+
</label>
|
|
264
|
+
` : s}
|
|
265
|
+
<div data-mps="scheduler" ${r(e.actions)}>
|
|
266
|
+
${e.create ? o`
|
|
267
|
+
<button data-mps="scheduler" ${r(e.create.bag)}>${e.create.text}</button>
|
|
268
|
+
` : s}
|
|
269
|
+
<button data-mps="scheduler" ${r(e.drill.bag)}>${e.drill.text}</button>
|
|
270
|
+
</div>
|
|
271
|
+
</div>
|
|
272
|
+
`;
|
|
1362
273
|
}
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
274
|
+
//#endregion
|
|
275
|
+
//#region libs/mintplayer-web-components/scheduler/src/generated/sched-row-panel.view.generated.ts
|
|
276
|
+
function w({ panel: e, slots: t = {} }) {
|
|
277
|
+
return o`
|
|
278
|
+
<div data-mps="scheduler" ${r(e.bag)}>
|
|
279
|
+
${l(e.actions, (e) => e.key, (e) => o`
|
|
280
|
+
${e.color ? o`
|
|
281
|
+
<label data-mps="scheduler" ${r(e.color.label)}>
|
|
282
|
+
<span data-mps="scheduler">${e.color.text}</span>
|
|
283
|
+
<input data-mps="scheduler" ${r(e.color.input)} .value=${e.color.value}>
|
|
284
|
+
</label>
|
|
285
|
+
` : s}
|
|
286
|
+
${e.button ? o`
|
|
287
|
+
<button data-mps="scheduler" ${r(e.button.bag)}>${e.button.text}</button>
|
|
288
|
+
` : s}
|
|
289
|
+
`)}
|
|
290
|
+
</div>
|
|
291
|
+
`;
|
|
1366
292
|
}
|
|
1367
293
|
//#endregion
|
|
1368
|
-
//#region libs/mintplayer-web-components/scheduler/src/
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
return this.state;
|
|
1378
|
-
}
|
|
1379
|
-
getPhase() {
|
|
1380
|
-
return this.state.phase;
|
|
1381
|
-
}
|
|
1382
|
-
isActive() {
|
|
1383
|
-
return this.state.phase === "active";
|
|
1384
|
-
}
|
|
1385
|
-
isPending() {
|
|
1386
|
-
return this.state.phase === "pending";
|
|
1387
|
-
}
|
|
1388
|
-
isDragging() {
|
|
1389
|
-
return this.state.phase === "pending" || this.state.phase === "active";
|
|
1390
|
-
}
|
|
1391
|
-
getPreview() {
|
|
1392
|
-
return this.state.phase === "active" ? this.state.preview : null;
|
|
1393
|
-
}
|
|
1394
|
-
getCompletionResult() {
|
|
1395
|
-
return this.state.phase === "completing" ? this.state.result : null;
|
|
1396
|
-
}
|
|
1397
|
-
send(e) {
|
|
1398
|
-
let t = this.state.phase;
|
|
1399
|
-
return this.state = this.transition(e), this.state.phase !== t;
|
|
1400
|
-
}
|
|
1401
|
-
reset() {
|
|
1402
|
-
this.state = { phase: "idle" };
|
|
1403
|
-
}
|
|
1404
|
-
consumeResult() {
|
|
1405
|
-
if (this.state.phase === "completing") {
|
|
1406
|
-
let e = this.state.result;
|
|
1407
|
-
return this.state = { phase: "idle" }, e;
|
|
1408
|
-
}
|
|
1409
|
-
return null;
|
|
1410
|
-
}
|
|
1411
|
-
transition(e) {
|
|
1412
|
-
let t = this.state;
|
|
1413
|
-
switch (t.phase) {
|
|
1414
|
-
case "idle": return this.transitionFromIdle(e);
|
|
1415
|
-
case "pending": return this.transitionFromPending(t, e);
|
|
1416
|
-
case "active": return this.transitionFromActive(t, e);
|
|
1417
|
-
case "completing": return this.transitionFromCompleting(e);
|
|
1418
|
-
}
|
|
1419
|
-
}
|
|
1420
|
-
transitionFromIdle(e) {
|
|
1421
|
-
if (e.type !== "POINTER_DOWN") return this.state;
|
|
1422
|
-
let { target: t, position: n, slot: r, slotElement: i, immediate: a } = e, o = this.getOperationType(t);
|
|
1423
|
-
if (!o) return this.state;
|
|
1424
|
-
let s = t.event ?? null;
|
|
1425
|
-
if (s && s.draggable === !1) return this.state;
|
|
1426
|
-
if (a) {
|
|
1427
|
-
let e = r;
|
|
1428
|
-
if (!e && s && (e = {
|
|
1429
|
-
start: s.start,
|
|
1430
|
-
end: s.end
|
|
1431
|
-
}), e) {
|
|
1432
|
-
let t = this.previewCalculator.calculatePreview(o, e, e, s);
|
|
1433
|
-
if (t) return {
|
|
1434
|
-
phase: "active",
|
|
1435
|
-
operationType: o,
|
|
1436
|
-
event: s,
|
|
1437
|
-
startSlot: e,
|
|
1438
|
-
currentSlot: e,
|
|
1439
|
-
preview: t,
|
|
1440
|
-
originalEvent: s ?? void 0
|
|
1441
|
-
};
|
|
1442
|
-
}
|
|
1443
|
-
}
|
|
1444
|
-
return {
|
|
1445
|
-
phase: "pending",
|
|
1446
|
-
operationType: o,
|
|
1447
|
-
event: s,
|
|
1448
|
-
startPosition: n,
|
|
1449
|
-
startSlot: r,
|
|
1450
|
-
slotElement: i
|
|
1451
|
-
};
|
|
1452
|
-
}
|
|
1453
|
-
transitionFromPending(e, t) {
|
|
1454
|
-
switch (t.type) {
|
|
1455
|
-
case "POINTER_MOVE": return Q(e.startPosition, t.position) < this.config.dragThreshold ? e : this.activateDrag(e, t.slot);
|
|
1456
|
-
case "POINTER_UP": return {
|
|
1457
|
-
phase: "completing",
|
|
1458
|
-
result: {
|
|
1459
|
-
type: e.operationType,
|
|
1460
|
-
preview: this.getInitialPreview(e),
|
|
1461
|
-
event: e.event,
|
|
1462
|
-
originalEvent: e.event ?? void 0,
|
|
1463
|
-
wasClick: !0
|
|
1464
|
-
}
|
|
1465
|
-
};
|
|
1466
|
-
case "CANCEL": return { phase: "idle" };
|
|
1467
|
-
default: return e;
|
|
1468
|
-
}
|
|
1469
|
-
}
|
|
1470
|
-
transitionFromActive(e, t) {
|
|
1471
|
-
switch (t.type) {
|
|
1472
|
-
case "POINTER_MOVE": {
|
|
1473
|
-
if (!t.slot) return e;
|
|
1474
|
-
let n = this.previewCalculator.calculatePreview(e.operationType, e.startSlot, t.slot, e.originalEvent ?? null);
|
|
1475
|
-
return n ? {
|
|
1476
|
-
...e,
|
|
1477
|
-
currentSlot: t.slot,
|
|
1478
|
-
preview: n
|
|
1479
|
-
} : e;
|
|
1480
|
-
}
|
|
1481
|
-
case "POINTER_UP": return {
|
|
1482
|
-
phase: "completing",
|
|
1483
|
-
result: {
|
|
1484
|
-
type: e.operationType,
|
|
1485
|
-
preview: e.preview,
|
|
1486
|
-
event: e.event,
|
|
1487
|
-
originalEvent: e.originalEvent,
|
|
1488
|
-
wasClick: !1
|
|
1489
|
-
}
|
|
1490
|
-
};
|
|
1491
|
-
case "CANCEL": return { phase: "idle" };
|
|
1492
|
-
default: return e;
|
|
1493
|
-
}
|
|
1494
|
-
}
|
|
1495
|
-
transitionFromCompleting(e) {
|
|
1496
|
-
return e.type === "CANCEL" || e.type === "POINTER_DOWN" ? { phase: "idle" } : this.state;
|
|
1497
|
-
}
|
|
1498
|
-
activateDrag(e, t) {
|
|
1499
|
-
let n = e.startSlot ?? t;
|
|
1500
|
-
if (!n) return { phase: "idle" };
|
|
1501
|
-
let r = t ?? n, i = this.previewCalculator.calculatePreview(e.operationType, n, r, e.event);
|
|
1502
|
-
return i ? {
|
|
1503
|
-
phase: "active",
|
|
1504
|
-
operationType: e.operationType,
|
|
1505
|
-
event: e.event,
|
|
1506
|
-
startSlot: n,
|
|
1507
|
-
currentSlot: r,
|
|
1508
|
-
preview: i,
|
|
1509
|
-
originalEvent: e.event ?? void 0
|
|
1510
|
-
} : { phase: "idle" };
|
|
1511
|
-
}
|
|
1512
|
-
getOperationType(e) {
|
|
1513
|
-
switch (e.type) {
|
|
1514
|
-
case "resize-handle": return e.resizeHandle === "start" ? "resize-start" : "resize-end";
|
|
1515
|
-
case "event": return "move";
|
|
1516
|
-
case "slot": return "create";
|
|
1517
|
-
default: return null;
|
|
1518
|
-
}
|
|
1519
|
-
}
|
|
1520
|
-
getInitialPreview(e) {
|
|
1521
|
-
return e.event ? {
|
|
1522
|
-
start: e.event.start,
|
|
1523
|
-
end: e.event.end
|
|
1524
|
-
} : e.startSlot ? {
|
|
1525
|
-
start: e.startSlot.start,
|
|
1526
|
-
end: e.startSlot.end
|
|
1527
|
-
} : {
|
|
1528
|
-
start: /* @__PURE__ */ new Date(),
|
|
1529
|
-
end: /* @__PURE__ */ new Date()
|
|
1530
|
-
};
|
|
1531
|
-
}
|
|
1532
|
-
}, ae = class {
|
|
1533
|
-
constructor(e, t = {}) {
|
|
1534
|
-
this.pendingUpdate = null, this.latestPointer = null, this.getSlotAtPosition = null, this.stateManager = e, this.config = {
|
|
1535
|
-
...Y,
|
|
1536
|
-
...t
|
|
1537
|
-
}, this.stateMachine = new ie(this.config);
|
|
1538
|
-
}
|
|
1539
|
-
setSlotResolver(e) {
|
|
1540
|
-
this.getSlotAtPosition = e;
|
|
1541
|
-
}
|
|
1542
|
-
handlePointerDown(e, t, n = !1) {
|
|
1543
|
-
let r = this.getSlotAtPosition?.(e.clientX, e.clientY) ?? null;
|
|
1544
|
-
this.stateMachine.send({
|
|
1545
|
-
type: "POINTER_DOWN",
|
|
1546
|
-
target: t,
|
|
1547
|
-
position: {
|
|
1548
|
-
x: e.clientX,
|
|
1549
|
-
y: e.clientY
|
|
1550
|
-
},
|
|
1551
|
-
slot: r,
|
|
1552
|
-
slotElement: t.slotElement,
|
|
1553
|
-
immediate: n
|
|
1554
|
-
}), this.stateMachine.isActive() && this.syncToStateManager();
|
|
1555
|
-
}
|
|
1556
|
-
handlePointerMove(e) {
|
|
1557
|
-
this.stateMachine.isDragging() && (this.latestPointer = e, this.pendingUpdate === null && (this.pendingUpdate = requestAnimationFrame(() => {
|
|
1558
|
-
this.processPendingMove();
|
|
1559
|
-
})));
|
|
1560
|
-
}
|
|
1561
|
-
handlePointerUp(e) {
|
|
1562
|
-
this.cancelPendingUpdate(), this.stateMachine.send({
|
|
1563
|
-
type: "POINTER_UP",
|
|
1564
|
-
position: {
|
|
1565
|
-
x: e.clientX,
|
|
1566
|
-
y: e.clientY
|
|
1567
|
-
}
|
|
1568
|
-
});
|
|
1569
|
-
let t = this.stateMachine.consumeResult();
|
|
1570
|
-
return this.stateManager.endDrag(), t;
|
|
1571
|
-
}
|
|
1572
|
-
cancel() {
|
|
1573
|
-
this.cancelPendingUpdate(), this.stateMachine.send({ type: "CANCEL" }), this.stateManager.endDrag();
|
|
1574
|
-
}
|
|
1575
|
-
isActive() {
|
|
1576
|
-
return this.stateMachine.isActive();
|
|
1577
|
-
}
|
|
1578
|
-
isPending() {
|
|
1579
|
-
return this.stateMachine.isPending();
|
|
1580
|
-
}
|
|
1581
|
-
isDragging() {
|
|
1582
|
-
return this.stateMachine.isDragging();
|
|
1583
|
-
}
|
|
1584
|
-
getPhase() {
|
|
1585
|
-
return this.stateMachine.getPhase();
|
|
1586
|
-
}
|
|
1587
|
-
reset() {
|
|
1588
|
-
this.cancelPendingUpdate(), this.stateMachine.reset();
|
|
1589
|
-
}
|
|
1590
|
-
destroy() {
|
|
1591
|
-
this.cancelPendingUpdate(), this.latestPointer = null, this.getSlotAtPosition = null;
|
|
1592
|
-
}
|
|
1593
|
-
processPendingMove() {
|
|
1594
|
-
this.pendingUpdate = null;
|
|
1595
|
-
let e = this.latestPointer;
|
|
1596
|
-
if (this.latestPointer = null, !e || !this.stateMachine.isDragging()) return;
|
|
1597
|
-
let t = this.getSlotAtPosition?.(e.clientX, e.clientY) ?? null;
|
|
1598
|
-
(this.stateMachine.send({
|
|
1599
|
-
type: "POINTER_MOVE",
|
|
1600
|
-
position: {
|
|
1601
|
-
x: e.clientX,
|
|
1602
|
-
y: e.clientY
|
|
1603
|
-
},
|
|
1604
|
-
slot: t
|
|
1605
|
-
}) || this.stateMachine.isActive()) && this.syncToStateManager();
|
|
1606
|
-
}
|
|
1607
|
-
syncToStateManager() {
|
|
1608
|
-
let e = this.stateMachine.getState();
|
|
1609
|
-
e.phase === "active" && (this.stateManager.getState().dragState ? this.stateManager.updateDrag(e.currentSlot, e.preview) : this.stateManager.startDrag({
|
|
1610
|
-
type: e.operationType,
|
|
1611
|
-
event: e.event,
|
|
1612
|
-
startSlot: e.startSlot,
|
|
1613
|
-
currentSlot: e.currentSlot,
|
|
1614
|
-
preview: e.preview,
|
|
1615
|
-
originalEvent: e.originalEvent
|
|
1616
|
-
}));
|
|
1617
|
-
}
|
|
1618
|
-
cancelPendingUpdate() {
|
|
1619
|
-
this.pendingUpdate !== null && (cancelAnimationFrame(this.pendingUpdate), this.pendingUpdate = null), this.latestPointer = null;
|
|
1620
|
-
}
|
|
1621
|
-
}, oe = 600, se = 10, ce = class {
|
|
1622
|
-
constructor(e, t) {
|
|
1623
|
-
this.lastPointerType = "mouse", this.touchHoldTimer = null, this.touchStartPosition = null, this.isTouchDragMode = !1, this.touchHoldTarget = null, this.gestureElement = 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);
|
|
1624
|
-
}
|
|
1625
|
-
isTouchGesture() {
|
|
1626
|
-
return this.lastPointerType === "touch";
|
|
1627
|
-
}
|
|
1628
|
-
attach() {
|
|
1629
|
-
let e = this.config.shadowRoot;
|
|
1630
|
-
e.addEventListener("mousedown", this.boundHandleMouseDown), document.addEventListener("mousemove", this.boundHandleMouseMove), document.addEventListener("mouseup", this.boundHandleMouseUp), e.addEventListener("click", this.boundHandleClick), e.addEventListener("dblclick", this.boundHandleDblClick), e.addEventListener("touchstart", this.boundHandleTouchStart, { passive: !1 }), e.addEventListener("touchmove", this.boundHandleTouchMove, { passive: !1 }), e.addEventListener("touchend", this.boundHandleTouchEnd), e.addEventListener("touchcancel", this.boundHandleTouchCancel);
|
|
1631
|
-
}
|
|
1632
|
-
detach() {
|
|
1633
|
-
let e = this.config.shadowRoot;
|
|
1634
|
-
e.removeEventListener("mousedown", this.boundHandleMouseDown), document.removeEventListener("mousemove", this.boundHandleMouseMove), document.removeEventListener("mouseup", this.boundHandleMouseUp), e.removeEventListener("click", this.boundHandleClick), e.removeEventListener("dblclick", this.boundHandleDblClick), e.removeEventListener("touchstart", this.boundHandleTouchStart), e.removeEventListener("touchmove", this.boundHandleTouchMove), e.removeEventListener("touchend", this.boundHandleTouchEnd), e.removeEventListener("touchcancel", this.boundHandleTouchCancel), this.unbindGestureElement(), this.cancelTouchHold(), this.exitPanMode(), this.removeScrollBlock();
|
|
1635
|
-
}
|
|
1636
|
-
isInTouchDragMode() {
|
|
1637
|
-
return this.isTouchDragMode;
|
|
1638
|
-
}
|
|
1639
|
-
analyzeTarget(e) {
|
|
1640
|
-
let t = e.closest(".resize-handle");
|
|
1641
|
-
if (t) {
|
|
1642
|
-
let e = t.closest(".scheduler-event, .scheduler-timeline-event")?.dataset.eventId, n = e ? this.config.getEventById(e) : null;
|
|
1643
|
-
if (n) return {
|
|
1644
|
-
type: "resize-handle",
|
|
1645
|
-
event: n,
|
|
1646
|
-
resizeHandle: t.dataset.handle
|
|
1647
|
-
};
|
|
1648
|
-
}
|
|
1649
|
-
let n = e.closest(".scheduler-event:not(.preview), .scheduler-timeline-event:not(.preview)");
|
|
1650
|
-
if (n) {
|
|
1651
|
-
let e = n.dataset.eventId, t = e ? this.config.getEventById(e) : null;
|
|
1652
|
-
if (t) return {
|
|
1653
|
-
type: "event",
|
|
1654
|
-
event: t
|
|
1655
|
-
};
|
|
1656
|
-
}
|
|
1657
|
-
let r = e.closest(".scheduler-time-slot, .scheduler-timeline-slot");
|
|
1658
|
-
return r ? {
|
|
1659
|
-
type: "slot",
|
|
1660
|
-
slotElement: r
|
|
1661
|
-
} : { type: "none" };
|
|
1662
|
-
}
|
|
1663
|
-
handleMouseDown(e) {
|
|
1664
|
-
if (this.lastPointerType = "mouse", !this.config.isEditable()) return;
|
|
1665
|
-
let t = X(e), n = this.analyzeTarget(t.target);
|
|
1666
|
-
n.type !== "none" && (n.type !== "slot" || this.config.isSelectable()) && (e.preventDefault(), this.callbacks.onPointerDown(t, n));
|
|
1667
|
-
}
|
|
1668
|
-
handleMouseMove(e) {
|
|
1669
|
-
let t = X(e);
|
|
1670
|
-
this.callbacks.onPointerMove(t);
|
|
1671
|
-
}
|
|
1672
|
-
handleMouseUp(e) {
|
|
1673
|
-
let t = X(e);
|
|
1674
|
-
this.callbacks.onPointerUp(t);
|
|
1675
|
-
}
|
|
1676
|
-
handleClick(e) {
|
|
1677
|
-
let t = X(e), n = this.analyzeTarget(t.target);
|
|
1678
|
-
n.type !== "event" && n.type !== "resize-handle" && this.callbacks.onClick(t, n);
|
|
1679
|
-
}
|
|
1680
|
-
handleDblClick(e) {
|
|
1681
|
-
let t = X(e), n = this.analyzeTarget(t.target);
|
|
1682
|
-
this.callbacks.onDoubleClick(t, n);
|
|
1683
|
-
}
|
|
1684
|
-
handleTouchStart(e) {
|
|
1685
|
-
if (this.lastPointerType = "touch", !this.config.isEditable()) return;
|
|
1686
|
-
if (e.touches.length !== 1) {
|
|
1687
|
-
this.cancelTouchHold();
|
|
1688
|
-
return;
|
|
1689
|
-
}
|
|
1690
|
-
let t = Z(e);
|
|
1691
|
-
if (!t) return;
|
|
1692
|
-
let n = this.analyzeTarget(t.target);
|
|
1693
|
-
if (n.type === "none" || n.type === "slot" && !this.config.isSelectable()) return;
|
|
1694
|
-
if (this.touchStartPosition = {
|
|
1695
|
-
x: t.clientX,
|
|
1696
|
-
y: t.clientY
|
|
1697
|
-
}, this.touchHoldTarget = t.target, this.panStartedOnEvent = n.type === "event" || n.type === "resize-handle", this.bindGestureElement(e.target), n.type === "resize-handle" && n.event && this.config.isEventSelected?.(n.event.id)) {
|
|
1698
|
-
this.activateTouchDragMode(t, n);
|
|
1699
|
-
return;
|
|
1700
|
-
}
|
|
1701
|
-
this.addTouchFeedback(t.target, "pending");
|
|
1702
|
-
let r = this.config.touchHoldDuration ?? oe;
|
|
1703
|
-
this.touchHoldTimer = setTimeout(() => {
|
|
1704
|
-
this.activateTouchDragMode(t, n);
|
|
1705
|
-
}, r);
|
|
1706
|
-
}
|
|
1707
|
-
handleTouchMove(e) {
|
|
1708
|
-
if (e.touches.length !== 1) {
|
|
1709
|
-
this.cancelTouchHold(), this.exitPanMode();
|
|
1710
|
-
return;
|
|
1711
|
-
}
|
|
1712
|
-
let t = Z(e);
|
|
1713
|
-
if (t) {
|
|
1714
|
-
if (this.isPanMode) e.preventDefault(), this.performPan(t.clientX, t.clientY);
|
|
1715
|
-
else if (this.touchHoldTimer && this.touchStartPosition) {
|
|
1716
|
-
let n = this.config.touchMoveThreshold ?? se;
|
|
1717
|
-
if (Q(this.touchStartPosition, {
|
|
1718
|
-
x: t.clientX,
|
|
1719
|
-
y: t.clientY
|
|
1720
|
-
}) > n) {
|
|
1721
|
-
this.cancelTouchHold(), this.panStartedOnEvent && (this.enterPanMode(t.clientX, t.clientY), e.preventDefault());
|
|
1722
|
-
return;
|
|
1723
|
-
}
|
|
1724
|
-
e.preventDefault();
|
|
1725
|
-
} else this.isTouchDragMode && (e.preventDefault(), this.callbacks.onPointerMove(t));
|
|
1726
|
-
}
|
|
1727
|
-
}
|
|
1728
|
-
handleTouchEnd(e) {
|
|
1729
|
-
let t = Z(e);
|
|
1730
|
-
if (this.unbindGestureElement(), this.isPanMode) this.exitPanMode();
|
|
1731
|
-
else if (this.touchHoldTimer) {
|
|
1732
|
-
if (this.cancelTouchHold(), t && this.touchHoldTarget) {
|
|
1733
|
-
let e = this.analyzeTarget(this.touchHoldTarget);
|
|
1734
|
-
this.callbacks.onClick(t, e);
|
|
1735
|
-
}
|
|
1736
|
-
this.touchHoldTarget = null;
|
|
1737
|
-
} else this.isTouchDragMode && t && (this.callbacks.onPointerUp(t), this.exitTouchDragMode());
|
|
1738
|
-
}
|
|
1739
|
-
handleTouchCancel(e) {
|
|
1740
|
-
this.unbindGestureElement(), this.cancelTouchHold(), this.exitPanMode(), this.isTouchDragMode && (this.callbacks.onPointerCancel?.(), this.exitTouchDragMode());
|
|
1741
|
-
}
|
|
1742
|
-
bindGestureElement(e) {
|
|
1743
|
-
this.unbindGestureElement(), this.gestureElement = e, e.addEventListener("touchmove", this.boundHandleTouchMove, { passive: !1 }), e.addEventListener("touchend", this.boundHandleTouchEnd), e.addEventListener("touchcancel", this.boundHandleTouchCancel);
|
|
1744
|
-
}
|
|
1745
|
-
unbindGestureElement() {
|
|
1746
|
-
let e = this.gestureElement;
|
|
1747
|
-
e && (this.gestureElement = null, e.removeEventListener("touchmove", this.boundHandleTouchMove), e.removeEventListener("touchend", this.boundHandleTouchEnd), e.removeEventListener("touchcancel", this.boundHandleTouchCancel));
|
|
1748
|
-
}
|
|
1749
|
-
activateTouchDragMode(e, t) {
|
|
1750
|
-
if (this.touchHoldTimer = null, this.touchStartPosition = null, 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") try {
|
|
1751
|
-
navigator.vibrate(10);
|
|
1752
|
-
} catch {}
|
|
1753
|
-
this.callbacks.onTouchDragActivated?.(), this.callbacks.onPointerDown(e, t, !0);
|
|
1754
|
-
}
|
|
1755
|
-
cancelTouchHold() {
|
|
1756
|
-
this.touchHoldTimer &&= (clearTimeout(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"));
|
|
1757
|
-
}
|
|
1758
|
-
exitTouchDragMode() {
|
|
1759
|
-
this.isTouchDragMode = !1, this.touchStartPosition = null, this.touchHoldTarget = null, document.removeEventListener("touchmove", this.boundHandleTouchMove), document.removeEventListener("touchend", this.boundHandleTouchEnd), document.removeEventListener("touchcancel", this.boundHandleTouchCancel), this.config.shadowRoot.querySelector(".scheduler-container")?.classList.remove("touch-drag-mode"), this.removeScrollBlock(), this.config.shadowRoot.querySelectorAll(".touch-hold-active, .touch-hold-pending").forEach((e) => {
|
|
1760
|
-
e.classList.remove("touch-hold-active", "touch-hold-pending");
|
|
1761
|
-
}), this.callbacks.onTouchDragDeactivated?.();
|
|
1762
|
-
}
|
|
1763
|
-
addTouchFeedback(e, t) {
|
|
1764
|
-
e.closest(".scheduler-event, .scheduler-time-slot, .scheduler-timeline-slot")?.classList.add(`touch-hold-${t}`);
|
|
1765
|
-
}
|
|
1766
|
-
removeTouchFeedback(e, t) {
|
|
1767
|
-
e.closest(".scheduler-event, .scheduler-time-slot, .scheduler-timeline-slot")?.classList.remove(`touch-hold-${t}`);
|
|
1768
|
-
}
|
|
1769
|
-
enterPanMode(e, t) {
|
|
1770
|
-
let n = this.callbacks.getScrollContainer?.();
|
|
1771
|
-
n && (this.isPanMode = !0, this.panStartPosition = {
|
|
1772
|
-
x: e,
|
|
1773
|
-
y: t
|
|
1774
|
-
}, this.panStartScroll = {
|
|
1775
|
-
left: n.scrollLeft,
|
|
1776
|
-
top: n.scrollTop
|
|
1777
|
-
}, n.classList.add("pan-mode"), this.touchHoldTarget && (this.removeTouchFeedback(this.touchHoldTarget, "pending"), this.removeTouchFeedback(this.touchHoldTarget, "active")));
|
|
1778
|
-
}
|
|
1779
|
-
exitPanMode() {
|
|
1780
|
-
this.isPanMode && (this.isPanMode = !1, this.panStartPosition = null, this.panStartScroll = null, this.panStartedOnEvent = !1, this.touchStartPosition = null, this.touchHoldTarget = null, (this.callbacks.getScrollContainer?.())?.classList.remove("pan-mode"));
|
|
1781
|
-
}
|
|
1782
|
-
performPan(e, t) {
|
|
1783
|
-
if (!this.isPanMode || !this.panStartPosition || !this.panStartScroll) return;
|
|
1784
|
-
let n = this.callbacks.getScrollContainer?.();
|
|
1785
|
-
if (!n) return;
|
|
1786
|
-
let r = this.panStartPosition.x - e, i = this.panStartPosition.y - t;
|
|
1787
|
-
n.scrollLeft = this.panStartScroll.left + r, n.scrollTop = this.panStartScroll.top + i;
|
|
1788
|
-
}
|
|
1789
|
-
applyScrollBlock() {
|
|
1790
|
-
this.savedBodyStyles = {
|
|
1791
|
-
overflow: document.body.style.overflow,
|
|
1792
|
-
touchAction: document.body.style.touchAction
|
|
1793
|
-
}, document.body.style.overflow = "hidden", document.body.style.touchAction = "none";
|
|
1794
|
-
let e = this.callbacks.getScrollContainer?.();
|
|
1795
|
-
e && e.classList.add("scroll-blocked");
|
|
1796
|
-
}
|
|
1797
|
-
removeScrollBlock() {
|
|
1798
|
-
this.savedBodyStyles &&= (document.body.style.overflow = this.savedBodyStyles.overflow, document.body.style.touchAction = this.savedBodyStyles.touchAction, null);
|
|
1799
|
-
let e = this.callbacks.getScrollContainer?.();
|
|
1800
|
-
e && e.classList.remove("scroll-blocked");
|
|
1801
|
-
}
|
|
1802
|
-
}, le = class {
|
|
1803
|
-
constructor(e) {
|
|
1804
|
-
this.host = e;
|
|
1805
|
-
}
|
|
1806
|
-
emit(e) {
|
|
1807
|
-
let { type: t, ...n } = e;
|
|
1808
|
-
this.host.dispatchEvent(new CustomEvent(t, {
|
|
1809
|
-
detail: n,
|
|
1810
|
-
bubbles: !0,
|
|
1811
|
-
composed: !0
|
|
1812
|
-
}));
|
|
1813
|
-
}
|
|
1814
|
-
emitEventSelected(e, t) {
|
|
1815
|
-
this.emit({
|
|
1816
|
-
type: "event-selected",
|
|
1817
|
-
event: e,
|
|
1818
|
-
originalEvent: t
|
|
1819
|
-
});
|
|
1820
|
-
}
|
|
1821
|
-
emitEventDblClick(e, t) {
|
|
1822
|
-
this.emit({
|
|
1823
|
-
type: "event-dblclick",
|
|
1824
|
-
event: e,
|
|
1825
|
-
originalEvent: t
|
|
1826
|
-
});
|
|
1827
|
-
}
|
|
1828
|
-
emitEventCreate(e, t, n, r) {
|
|
1829
|
-
this.emit({
|
|
1830
|
-
type: "event-create",
|
|
1831
|
-
range: e,
|
|
1832
|
-
view: t,
|
|
1833
|
-
resourceId: r,
|
|
1834
|
-
originalEvent: n
|
|
1835
|
-
});
|
|
1836
|
-
}
|
|
1837
|
-
emitEventUpdate(e, t, n) {
|
|
1838
|
-
this.emit({
|
|
1839
|
-
type: "event-update",
|
|
1840
|
-
event: e,
|
|
1841
|
-
oldEvent: t,
|
|
1842
|
-
originalEvent: n
|
|
1843
|
-
});
|
|
1844
|
-
}
|
|
1845
|
-
emitEventDelete(e) {
|
|
1846
|
-
this.emit({
|
|
1847
|
-
type: "event-delete",
|
|
1848
|
-
event: e
|
|
1849
|
-
});
|
|
1850
|
-
}
|
|
1851
|
-
emitDateClick(e, t) {
|
|
1852
|
-
this.emit({
|
|
1853
|
-
type: "date-click",
|
|
1854
|
-
date: e,
|
|
1855
|
-
originalEvent: t
|
|
1856
|
-
});
|
|
1857
|
-
}
|
|
1858
|
-
emitViewChange(e, t) {
|
|
1859
|
-
this.emit({
|
|
1860
|
-
type: "view-change",
|
|
1861
|
-
view: e,
|
|
1862
|
-
date: t
|
|
1863
|
-
});
|
|
1864
|
-
}
|
|
1865
|
-
emitSelectionChange(e, t, n, r) {
|
|
1866
|
-
this.emit({
|
|
1867
|
-
type: "selection-change",
|
|
1868
|
-
selectedEvent: e,
|
|
1869
|
-
range: t,
|
|
1870
|
-
view: n,
|
|
1871
|
-
resourceId: r
|
|
1872
|
-
});
|
|
1873
|
-
}
|
|
1874
|
-
emitResourceCreate(e, t, n, r) {
|
|
1875
|
-
this.emit({
|
|
1876
|
-
type: e === "group" ? "group-create" : "resource-create",
|
|
1877
|
-
parentId: r,
|
|
1878
|
-
view: t,
|
|
1879
|
-
originalEvent: n
|
|
1880
|
-
});
|
|
1881
|
-
}
|
|
1882
|
-
emitResourceUpdate(e, t, n) {
|
|
1883
|
-
this.emit({
|
|
1884
|
-
type: "resource-update",
|
|
1885
|
-
resource: e,
|
|
1886
|
-
changes: t,
|
|
1887
|
-
originalEvent: n
|
|
1888
|
-
});
|
|
1889
|
-
}
|
|
1890
|
-
emitResourceDelete(e, t) {
|
|
1891
|
-
this.emit({
|
|
1892
|
-
type: "resource-delete",
|
|
1893
|
-
resource: e,
|
|
1894
|
-
originalEvent: t
|
|
1895
|
-
});
|
|
1896
|
-
}
|
|
1897
|
-
}, ue = 0, $ = class c extends v {
|
|
1898
|
-
static {
|
|
1899
|
-
this.styles = [
|
|
1900
|
-
i,
|
|
1901
|
-
n,
|
|
1902
|
-
J
|
|
1903
|
-
];
|
|
1904
|
-
}
|
|
1905
|
-
static get observedAttributes() {
|
|
1906
|
-
return [
|
|
1907
|
-
...super.observedAttributes ?? [],
|
|
1908
|
-
"view",
|
|
1909
|
-
"date",
|
|
1910
|
-
"locale",
|
|
1911
|
-
"event-editor",
|
|
1912
|
-
"first-day-of-week",
|
|
1913
|
-
"slot-duration",
|
|
1914
|
-
"time-format",
|
|
1915
|
-
"readonly"
|
|
1916
|
-
];
|
|
1917
|
-
}
|
|
1918
|
-
constructor() {
|
|
1919
|
-
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 t(this), this.popoverDate = null, this.popoverScope = "day", this.popoverAnchorId = null, this.dayPopover = new r(this, {
|
|
1920
|
-
anchor: () => this.popoverAnchorCell(),
|
|
1921
|
-
trigger: () => this.popoverAnchorCell(),
|
|
1922
|
-
panel: () => this.shadowRoot?.querySelector(".scheduler-day-popover") ?? null,
|
|
1923
|
-
initialFocus: () => {
|
|
1924
|
-
let e = this.shadowRoot?.querySelector(".scheduler-day-popover");
|
|
1925
|
-
return e?.querySelector(".popover-event") ?? e?.querySelector(".popover-action") ?? null;
|
|
1926
|
-
},
|
|
1927
|
-
modal: !1,
|
|
1928
|
-
onClose: () => {
|
|
1929
|
-
this.popoverDate = null, this.popoverAnchorId = null, this.requestUpdate();
|
|
1930
|
-
}
|
|
1931
|
-
}), this.rowMenuResourceId = null, this.rowMenuOverlay = new r(this, {
|
|
1932
|
-
anchor: () => this.rowMenuTriggerById(this.rowMenuResourceId),
|
|
1933
|
-
trigger: () => this.rowMenuTriggerById(this.rowMenuResourceId),
|
|
1934
|
-
panel: () => this.shadowRoot?.querySelector(".scheduler-row-panel") ?? null,
|
|
1935
|
-
initialFocus: () => this.shadowRoot?.querySelector(".scheduler-row-panel .row-action") ?? null,
|
|
1936
|
-
modal: !1,
|
|
1937
|
-
onClose: () => {
|
|
1938
|
-
this.rowMenuResourceId = null, this.requestUpdate(), this.syncRowMenuTriggerState();
|
|
1939
|
-
}
|
|
1940
|
-
}), this.editorEventId = null, this.editorError = null, this.editorTitleErrorId = `mp-scheduler-${++ue}-editor-title-error`, this.eventEditorOverlay = new r(this, {
|
|
1941
|
-
anchor: () => this.eventElementById(this.editorEventId),
|
|
1942
|
-
trigger: () => this.eventElementById(this.editorEventId),
|
|
1943
|
-
panel: () => this.shadowRoot?.querySelector(".scheduler-event-editor") ?? null,
|
|
1944
|
-
initialFocus: () => this.shadowRoot?.querySelector(".scheduler-event-editor input:not([disabled])") ?? this.shadowRoot?.querySelector(".scheduler-event-editor .editor-action") ?? null,
|
|
1945
|
-
modal: !1,
|
|
1946
|
-
onClose: () => {
|
|
1947
|
-
this.editorEventId = null, this.editorError = null, this.editorDraft = null, this.requestUpdate();
|
|
1948
|
-
}
|
|
1949
|
-
}), this.editorDraft = null, this.headerResizeObserver = null, this.headerIsNarrow = !1, this.keymapView = null, this.previousIsLoading = null, this.edgeScrollFrame = null, this.edgeScrollVector = {
|
|
1950
|
-
x: 0,
|
|
1951
|
-
y: 0
|
|
1952
|
-
}, this.edgeScrollPointer = null, this.lastEventActivation = null, this.keyboardMove = null, this.stateManager = new O(), this.eventEmitter = new le(this), this.dragManager = new ae(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));
|
|
1953
|
-
}
|
|
1954
|
-
connectedCallback() {
|
|
1955
|
-
if (super.connectedCallback(), this.inputHandler) {
|
|
1956
|
-
this.inputHandler.attach(), this.dragManager.setSlotResolver((e, t) => this.getSlotAtPosition(e, t));
|
|
1957
|
-
let e = this.shadowRoot?.querySelector(".scheduler-header");
|
|
1958
|
-
e && this.observeHeaderWidth(e), this.renderView();
|
|
1959
|
-
}
|
|
1960
|
-
this.syncPermissions(), this.addEventListener("keydown", this.boundHandleKeyDown), this.startNowIndicatorTimer();
|
|
1961
|
-
}
|
|
1962
|
-
disconnectedCallback() {
|
|
1963
|
-
this.inputHandler?.detach(), this.removeEventListener("keydown", this.boundHandleKeyDown), this.shadowRoot?.removeEventListener("focusin", this.boundHandleFocusIn), this.shadowRoot?.removeEventListener("change", this.boundHandleValueChange), this.shadowRoot?.removeEventListener("contextmenu", this.boundHandleContextMenu), this.shadowRoot?.removeEventListener("dblclick", this.boundHandleDblClick), this.currentView?.destroy(), this.dragManager.destroy(), this.stopNowIndicatorTimer(), this.headerResizeObserver?.disconnect(), this.headerResizeObserver = null, this.stopEdgeScroll(), this.cancelPendingDragUpdate(), super.disconnectedCallback();
|
|
1964
|
-
}
|
|
1965
|
-
attributeChangedCallback(e, t, n) {
|
|
1966
|
-
if (super.attributeChangedCallback(e, t, n), t !== n) switch (e) {
|
|
1967
|
-
case "view":
|
|
1968
|
-
n && [
|
|
1969
|
-
"year",
|
|
1970
|
-
"month",
|
|
1971
|
-
"week",
|
|
1972
|
-
"day",
|
|
1973
|
-
"timeline"
|
|
1974
|
-
].includes(n) && this.stateManager.setView(n);
|
|
1975
|
-
break;
|
|
1976
|
-
case "date":
|
|
1977
|
-
n && this.stateManager.setDate(new Date(n));
|
|
1978
|
-
break;
|
|
1979
|
-
case "locale":
|
|
1980
|
-
n && this.stateManager.setOptions({ locale: n });
|
|
1981
|
-
break;
|
|
1982
|
-
case "first-day-of-week":
|
|
1983
|
-
if (n) {
|
|
1984
|
-
let e = parseInt(n, 10);
|
|
1985
|
-
Number.isInteger(e) && e >= 0 && e <= 7 && this.stateManager.setOptions({ firstDayOfWeek: e % 7 });
|
|
1986
|
-
}
|
|
1987
|
-
break;
|
|
1988
|
-
case "slot-duration":
|
|
1989
|
-
n && this.stateManager.setOptions({ slotDuration: parseInt(n, 10) });
|
|
1990
|
-
break;
|
|
1991
|
-
case "time-format":
|
|
1992
|
-
n && (n === "12h" || n === "24h") && this.stateManager.setOptions({ timeFormat: n });
|
|
1993
|
-
break;
|
|
1994
|
-
case "readonly":
|
|
1995
|
-
this.syncPermissions();
|
|
1996
|
-
break;
|
|
1997
|
-
case "event-editor": this.requestUpdate();
|
|
1998
|
-
}
|
|
1999
|
-
}
|
|
2000
|
-
get view() {
|
|
2001
|
-
return this.stateManager.getState().view;
|
|
2002
|
-
}
|
|
2003
|
-
set view(e) {
|
|
2004
|
-
this.stateManager.setView(e);
|
|
2005
|
-
}
|
|
2006
|
-
get date() {
|
|
2007
|
-
return this.stateManager.getState().date;
|
|
2008
|
-
}
|
|
2009
|
-
set date(e) {
|
|
2010
|
-
this.stateManager.setDate(e);
|
|
2011
|
-
}
|
|
2012
|
-
get readonly() {
|
|
2013
|
-
return this.hasAttribute("readonly") && this.getAttribute("readonly") !== "false";
|
|
2014
|
-
}
|
|
2015
|
-
set readonly(e) {
|
|
2016
|
-
e ? this.setAttribute("readonly", "") : this.removeAttribute("readonly");
|
|
2017
|
-
}
|
|
2018
|
-
get eventEditor() {
|
|
2019
|
-
let e = this.getAttribute("event-editor");
|
|
2020
|
-
return e === null ? this.stateManager.getState().options.eventEditor !== !1 : e !== "false";
|
|
2021
|
-
}
|
|
2022
|
-
set eventEditor(e) {
|
|
2023
|
-
this.setAttribute("event-editor", e ? "true" : "false");
|
|
2024
|
-
}
|
|
2025
|
-
get events() {
|
|
2026
|
-
return this.stateManager.getState().events;
|
|
2027
|
-
}
|
|
2028
|
-
set events(e) {
|
|
2029
|
-
this.stateManager.setEvents(e);
|
|
2030
|
-
}
|
|
2031
|
-
get resources() {
|
|
2032
|
-
return this.stateManager.getState().resources;
|
|
2033
|
-
}
|
|
2034
|
-
set resources(e) {
|
|
2035
|
-
this.stateManager.setResources(e);
|
|
2036
|
-
}
|
|
2037
|
-
get options() {
|
|
2038
|
-
return this.stateManager.getState().options;
|
|
2039
|
-
}
|
|
2040
|
-
set options(e) {
|
|
2041
|
-
this.stateManager.setOptions(e), this.syncPermissions();
|
|
2042
|
-
}
|
|
2043
|
-
get selectedEvent() {
|
|
2044
|
-
return this.stateManager.getState().selectedEvent;
|
|
2045
|
-
}
|
|
2046
|
-
set selectedEvent(e) {
|
|
2047
|
-
this.stateManager.setSelectedEvent(e);
|
|
2048
|
-
}
|
|
2049
|
-
get selectedRange() {
|
|
2050
|
-
let e = j(this.stateManager.getState());
|
|
2051
|
-
return e ? {
|
|
2052
|
-
start: e.start,
|
|
2053
|
-
end: e.end
|
|
2054
|
-
} : null;
|
|
2055
|
-
}
|
|
2056
|
-
next() {
|
|
2057
|
-
this.stateManager.next();
|
|
2058
|
-
}
|
|
2059
|
-
prev() {
|
|
2060
|
-
this.stateManager.prev();
|
|
2061
|
-
}
|
|
2062
|
-
today() {
|
|
2063
|
-
this.stateManager.today();
|
|
2064
|
-
}
|
|
2065
|
-
gotoDate(e) {
|
|
2066
|
-
this.stateManager.gotoDate(e);
|
|
2067
|
-
}
|
|
2068
|
-
changeView(e) {
|
|
2069
|
-
this.stateManager.setView(e), this.liveAnnouncer.announce(this.msg("viewChanged", { view: this.viewLabel(e) }));
|
|
2070
|
-
}
|
|
2071
|
-
viewLabel(e) {
|
|
2072
|
-
return this.msg({
|
|
2073
|
-
year: "viewYear",
|
|
2074
|
-
month: "viewMonth",
|
|
2075
|
-
week: "viewWeek",
|
|
2076
|
-
day: "viewDay",
|
|
2077
|
-
timeline: "viewTimeline"
|
|
2078
|
-
}[e]);
|
|
2079
|
-
}
|
|
2080
|
-
clearSelection() {
|
|
2081
|
-
this.stateManager.clearSelection();
|
|
2082
|
-
}
|
|
2083
|
-
addEvent(e) {
|
|
2084
|
-
this.stateManager.addEvent(e), this.liveAnnouncer.announce(this.msg("eventAdded", { title: e.title }));
|
|
2085
|
-
}
|
|
2086
|
-
updateEvent(e) {
|
|
2087
|
-
this.stateManager.updateEvent(e), this.liveAnnouncer.announce(this.msg("eventUpdated", { title: e.title }));
|
|
2088
|
-
}
|
|
2089
|
-
removeEvent(e) {
|
|
2090
|
-
let t = this.getEventById(e);
|
|
2091
|
-
this.stateManager.removeEvent(e), t && this.liveAnnouncer.announce(this.msg("eventRemoved", { title: t.title }));
|
|
2092
|
-
}
|
|
2093
|
-
getEventById(e) {
|
|
2094
|
-
return this.stateManager.getState().events.find((t) => t.id === e) ?? null;
|
|
2095
|
-
}
|
|
2096
|
-
refetchEvents() {
|
|
2097
|
-
this.currentView?.update(this.stateManager.getState());
|
|
2098
|
-
}
|
|
2099
|
-
gridInstructionsKey() {
|
|
2100
|
-
let e = this.can("createEvent") || this.can("selectRange");
|
|
2101
|
-
switch (this.stateManager.getState().view) {
|
|
2102
|
-
case "year": return "gridInstructionsYear";
|
|
2103
|
-
case "month": return e ? "gridInstructionsMonth" : "gridInstructionsMonthReadOnly";
|
|
2104
|
-
default: return e ? "gridInstructions" : "gridInstructionsReadOnly";
|
|
2105
|
-
}
|
|
2106
|
-
}
|
|
2107
|
-
msg(e, t) {
|
|
2108
|
-
return a(h(this.stateManager.getState().options.messages)[e], t);
|
|
2109
|
-
}
|
|
2110
|
-
render() {
|
|
2111
|
-
return y`
|
|
2112
|
-
<div class="scheduler-container">
|
|
2113
|
-
<header class="scheduler-header"></header>
|
|
2114
|
-
<div class="scheduler-content"></div>
|
|
294
|
+
//#region libs/mintplayer-web-components/scheduler/src/generated/sched-editor.view.generated.ts
|
|
295
|
+
function T({ editor: e, slots: t = {} }) {
|
|
296
|
+
return o`
|
|
297
|
+
<div data-mps="scheduler" ${r(e.bag)}>
|
|
298
|
+
<div data-mps="scheduler" ${r(e.head)}>
|
|
299
|
+
<div data-mps="scheduler" ${r(e.titleBag)}>${e.title}</div>
|
|
300
|
+
<button data-mps="scheduler" ${r(e.close)}>
|
|
301
|
+
<span data-mps="scheduler" aria-hidden="true">×</span>
|
|
302
|
+
</button>
|
|
2115
303
|
</div>
|
|
2116
|
-
<
|
|
2117
|
-
|
|
304
|
+
<label data-mps="scheduler" ${r(e.field)}>
|
|
305
|
+
<span data-mps="scheduler">${e.titleLabel}</span>
|
|
306
|
+
<input data-mps="scheduler" ${r(e.titleInput)} .value=${e.titleValue}>
|
|
307
|
+
<div data-mps="scheduler" ${r(e.titleError)}>${e.titleErrorText}</div>
|
|
308
|
+
</label>
|
|
309
|
+
<div data-mps="scheduler" ${r(e.startField)}>
|
|
310
|
+
<mp-datetime-picker data-mp-owned .max=${e.startMax} .disabled=${e.startDisabled} .inputLabel=${e.startLabel} .locale=${e.locale} .firstDayOfWeek=${e.firstDayOfWeek} .hour12=${e.hour12} .step=${e.step} .value=${e.start.value} @valuechange=${(t) => t.target === t.currentTarget && e.start.set(t.detail)}></mp-datetime-picker>
|
|
2118
311
|
</div>
|
|
2119
|
-
<div
|
|
2120
|
-
|
|
312
|
+
<div data-mps="scheduler" ${r(e.endField)}>
|
|
313
|
+
<mp-datetime-picker data-mp-owned .min=${e.endMin} .disabled=${e.endDisabled} .invalid=${e.endInvalid} .errorText=${e.endError} .inputLabel=${e.endLabel} .locale=${e.locale} .firstDayOfWeek=${e.firstDayOfWeek} .hour12=${e.hour12} .step=${e.step} .value=${e.end.value} @valuechange=${(t) => t.target === t.currentTarget && e.end.set(t.detail)}></mp-datetime-picker>
|
|
2121
314
|
</div>
|
|
2122
|
-
${
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
this.shadowRoot?.querySelectorAll(".scheduler-row-menu-button").forEach((e) => {
|
|
2137
|
-
let t = e.dataset.resourceId === this.rowMenuResourceId;
|
|
2138
|
-
e.setAttribute("aria-expanded", String(t));
|
|
2139
|
-
});
|
|
2140
|
-
}
|
|
2141
|
-
focusRowTrigger() {
|
|
2142
|
-
let e = this.stateManager.getState().focusedResourceId;
|
|
2143
|
-
this.rowMenuTriggerById(e ?? null)?.focus();
|
|
2144
|
-
}
|
|
2145
|
-
handleRowTriggerKeyDown(e, t) {
|
|
2146
|
-
let n = t.dataset.resourceId;
|
|
2147
|
-
switch (e.key) {
|
|
2148
|
-
case "Enter":
|
|
2149
|
-
case " ": return e.preventDefault(), n && this.openRowMenu(n), !0;
|
|
2150
|
-
case "ArrowRight":
|
|
2151
|
-
case "Escape": return e.preventDefault(), this.focusFocusedCell(), !0;
|
|
2152
|
-
default: return !1;
|
|
2153
|
-
}
|
|
2154
|
-
}
|
|
2155
|
-
openRowMenu(e) {
|
|
2156
|
-
this.rowMenuOverlay.isOpen && this.rowMenuResourceId === e ? this.closeRowMenu() : (this.rowMenuOverlay.isOpen && this.rowMenuOverlay.close(!1), this.rowMenuResourceId = e, this.requestUpdate(), this.updateComplete.then(() => {
|
|
2157
|
-
this.syncRowMenuTriggerState(), this.rowMenuOverlay.open();
|
|
2158
|
-
}));
|
|
2159
|
-
}
|
|
2160
|
-
closeRowMenu() {
|
|
2161
|
-
this.rowMenuOverlay.close();
|
|
2162
|
-
}
|
|
2163
|
-
renderRowMenu() {
|
|
2164
|
-
let e = this.rowMenuResourceId;
|
|
2165
|
-
if (!e) return b;
|
|
2166
|
-
let t = this.findResourceOrGroup(e), n = this.currentView;
|
|
2167
|
-
if (!t || !(n instanceof q)) return b;
|
|
2168
|
-
let r = n.rowActions(t);
|
|
2169
|
-
if (r.length === 0) return b;
|
|
2170
|
-
let i = h(this.stateManager.getState().options.messages), o = t, s = o.eventColor ? "eventColor" : "color", c = o.eventColor ?? t.color;
|
|
2171
|
-
return y`
|
|
2172
|
-
<div
|
|
2173
|
-
class="scheduler-row-panel"
|
|
2174
|
-
role="dialog"
|
|
2175
|
-
aria-label=${a(i.rowMenuDialogLabel, { title: t.title })}
|
|
2176
|
-
>
|
|
2177
|
-
${r.map((e) => {
|
|
2178
|
-
if (e === "set-resource-color") {
|
|
2179
|
-
let e = a(i.resourceColor, { title: t.title });
|
|
2180
|
-
return y`
|
|
2181
|
-
<label class="row-action row-action-color">
|
|
2182
|
-
<span>${e}</span>
|
|
2183
|
-
<input
|
|
2184
|
-
type="color"
|
|
2185
|
-
class="row-color-input"
|
|
2186
|
-
aria-label=${e}
|
|
2187
|
-
.value=${c && /^#[0-9a-f]{6}$/i.test(c) ? c : "#000000"}
|
|
2188
|
-
data-action="set-resource-color"
|
|
2189
|
-
data-resource-id=${t.id}
|
|
2190
|
-
data-field=${s}
|
|
2191
|
-
/>
|
|
2192
|
-
</label>
|
|
2193
|
-
`;
|
|
2194
|
-
}
|
|
2195
|
-
let n = a(e === "rename-resource" ? i.renameResource : e === "add-resource" ? i.addResourceToGroup : e === "add-group" ? i.addGroupToGroup : i.removeResource, { title: t.title });
|
|
2196
|
-
return y`
|
|
2197
|
-
<button
|
|
2198
|
-
type="button"
|
|
2199
|
-
class="row-action ${e === "delete-resource" ? "is-destructive" : ""}"
|
|
2200
|
-
data-action=${e}
|
|
2201
|
-
data-parent-id=${e === "add-resource" || e === "add-group" ? t.id : b}
|
|
2202
|
-
data-resource-id=${e === "add-resource" || e === "add-group" ? b : t.id}
|
|
2203
|
-
@click=${() => {
|
|
2204
|
-
e !== "rename-resource" && this.closeRowMenu();
|
|
2205
|
-
}}
|
|
2206
|
-
>
|
|
2207
|
-
${n}
|
|
2208
|
-
</button>
|
|
2209
|
-
`;
|
|
2210
|
-
})}
|
|
315
|
+
<label data-mps="scheduler" ${r(e.field)}>
|
|
316
|
+
<span data-mps="scheduler">${e.colorLabel}</span>
|
|
317
|
+
<input data-mps="scheduler" ${r(e.colorInput)} .value=${e.colorValue}>
|
|
318
|
+
</label>
|
|
319
|
+
<label data-mps="scheduler" ${r(e.inherit)}>
|
|
320
|
+
<input data-mps="scheduler" ${r(e.inheritInput)} .checked=${e.inheritChecked}>
|
|
321
|
+
<span data-mps="scheduler">${e.inheritLabel}</span>
|
|
322
|
+
</label>
|
|
323
|
+
<div data-mps="scheduler" ${r(e.actions)}>
|
|
324
|
+
<button data-mps="scheduler" ${r(e.save.bag)}>${e.save.text}</button>
|
|
325
|
+
${e.remove ? o`
|
|
326
|
+
<button data-mps="scheduler" ${r(e.remove.bag)}>${e.remove.text}</button>
|
|
327
|
+
` : s}
|
|
328
|
+
<button data-mps="scheduler" ${r(e.cancel.bag)}>${e.cancel.text}</button>
|
|
2211
329
|
</div>
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
events: this.msg(i.length === 1 ? "eventSingular" : "eventPlural")
|
|
2231
|
-
})}
|
|
2232
|
-
</div>
|
|
2233
|
-
</div>
|
|
2234
|
-
<button
|
|
2235
|
-
type="button"
|
|
2236
|
-
class="popover-close"
|
|
2237
|
-
aria-label=${this.msg("closePopover")}
|
|
2238
|
-
@click=${() => this.closeDayPopover()}
|
|
2239
|
-
>
|
|
2240
|
-
<span aria-hidden="true">×</span>
|
|
2241
|
-
</button>
|
|
2242
|
-
</div>
|
|
2243
|
-
${i.length === 0 ? y`<p class="popover-empty">${this.msg("dayPopoverEmpty")}</p>` : r === "month" ? this.renderPopoverDayGroups(i, n) : y`
|
|
2244
|
-
<ul class="popover-events">
|
|
2245
|
-
${i.map((e) => this.renderPopoverEvent(e, n))}
|
|
2246
|
-
</ul>
|
|
2247
|
-
`}
|
|
2248
|
-
${this.can("createEvent") && o.length > 0 ? y`
|
|
2249
|
-
<label class="popover-resource">
|
|
2250
|
-
<span class="popover-resource-label">${this.msg("newEventResource")}</span>
|
|
2251
|
-
<mp-select
|
|
2252
|
-
class="popover-resource-select"
|
|
2253
|
-
input-label=${this.msg("newEventResource")}
|
|
2254
|
-
>
|
|
2255
|
-
<option value="">${this.msg("unassignedResource")}</option>
|
|
2256
|
-
${o.map((e) => y`<option value=${e.id}>${e.title}</option>`)}
|
|
2257
|
-
</mp-select>
|
|
2258
|
-
</label>
|
|
2259
|
-
` : b}
|
|
2260
|
-
<div class="popover-actions">
|
|
2261
|
-
${this.can("createEvent") ? y`<button
|
|
2262
|
-
type="button"
|
|
2263
|
-
class="popover-action primary"
|
|
2264
|
-
@click=${(e) => this.createFromPopover(e)}
|
|
2265
|
-
>
|
|
2266
|
-
${this.msg("newEvent")}
|
|
2267
|
-
</button>` : b}
|
|
2268
|
-
<button
|
|
2269
|
-
type="button"
|
|
2270
|
-
class="popover-action"
|
|
2271
|
-
@click=${() => this.drillFromPopover()}
|
|
2272
|
-
>
|
|
2273
|
-
${this.msg(r === "month" ? "showMonth" : "showDay")}
|
|
2274
|
-
</button>
|
|
2275
|
-
</div>
|
|
2276
|
-
</div>
|
|
2277
|
-
`;
|
|
2278
|
-
}
|
|
2279
|
-
renderPopoverEvent(e, t) {
|
|
2280
|
-
return y`
|
|
2281
|
-
<li class="popover-event-row">
|
|
2282
|
-
<button
|
|
2283
|
-
type="button"
|
|
2284
|
-
class="popover-event"
|
|
2285
|
-
aria-label=${A(e, null, t)}
|
|
2286
|
-
@click=${(t) => this.selectFromPopover(e, t)}
|
|
2287
|
-
>
|
|
2288
|
-
<span
|
|
2289
|
-
class="popover-event-swatch"
|
|
2290
|
-
aria-hidden="true"
|
|
2291
|
-
style=${`background:${f(e, this.stateManager.getState().resourceById, t.defaultEventColor)}`}
|
|
2292
|
-
></span>
|
|
2293
|
-
<span class="popover-event-title">${e.title}</span>
|
|
2294
|
-
</button>
|
|
2295
|
-
${this.can("deleteEvent", e) ? y`<button
|
|
2296
|
-
type="button"
|
|
2297
|
-
class="popover-event-delete"
|
|
2298
|
-
aria-label=${this.msg("deleteEventLabel", { title: e.title })}
|
|
2299
|
-
@click=${() => this.deleteFromPopover(e)}
|
|
2300
|
-
>
|
|
2301
|
-
<span aria-hidden="true">×</span>
|
|
2302
|
-
</button>` : b}
|
|
2303
|
-
</li>
|
|
2304
|
-
`;
|
|
2305
|
-
}
|
|
2306
|
-
deleteFromPopover(e) {
|
|
2307
|
-
if (!this.can("deleteEvent", e)) {
|
|
2308
|
-
this.announceDenied();
|
|
2309
|
-
return;
|
|
2310
|
-
}
|
|
2311
|
-
let t = this.shadowRoot?.querySelector(".scheduler-day-popover"), n = (t ? [...t.querySelectorAll(".popover-event")] : []).findIndex((t) => t.getAttribute("aria-label") === A(e, null, this.stateManager.getState().options));
|
|
2312
|
-
this.eventEmitter.emitEventDelete(e), this.updateComplete.then(() => requestAnimationFrame(() => {
|
|
2313
|
-
let e = this.shadowRoot?.querySelector(".scheduler-day-popover");
|
|
2314
|
-
if (!e) return;
|
|
2315
|
-
let t = [...e.querySelectorAll(".popover-event")];
|
|
2316
|
-
(t[Math.min(Math.max(n, 0), t.length - 1)] ?? e.querySelector(".popover-action") ?? e.querySelector(".popover-close"))?.focus();
|
|
2317
|
-
}));
|
|
2318
|
-
}
|
|
2319
|
-
renderPopoverDayGroups(e, t) {
|
|
2320
|
-
let n = this.popoverDate, r = new Date(n.getFullYear(), n.getMonth(), 1), i = e.reduce((e, t) => {
|
|
2321
|
-
let n = t.start < r ? new Date(r) : new Date(t.start);
|
|
2322
|
-
n.setHours(0, 0, 0, 0);
|
|
2323
|
-
let i = n.getTime(), a = e.get(i) ?? {
|
|
2324
|
-
day: n,
|
|
2325
|
-
events: []
|
|
2326
|
-
};
|
|
2327
|
-
return a.events.push(t), e.set(i, a);
|
|
2328
|
-
}, /* @__PURE__ */ new Map());
|
|
2329
|
-
return y`
|
|
2330
|
-
<ul class="popover-events popover-day-groups">
|
|
2331
|
-
${[...i.values()].map((e) => y`
|
|
2332
|
-
<li class="popover-day-group">
|
|
2333
|
-
<div class="popover-day-label">
|
|
2334
|
-
${_.formatDateWithWeekday(e.day, t.locale)}
|
|
2335
|
-
</div>
|
|
2336
|
-
<ul class="popover-events">
|
|
2337
|
-
${e.events.map((e) => this.renderPopoverEvent(e, t))}
|
|
2338
|
-
</ul>
|
|
2339
|
-
</li>
|
|
330
|
+
</div>
|
|
331
|
+
`;
|
|
332
|
+
}
|
|
333
|
+
//#endregion
|
|
334
|
+
//#region libs/mintplayer-web-components/scheduler/src/generated/scheduler.view.generated.ts
|
|
335
|
+
function E({ view: e, slots: t = {} }) {
|
|
336
|
+
return o`
|
|
337
|
+
<div data-mps="scheduler" ${r(e.container)}>
|
|
338
|
+
<div data-mps="scheduler" ${r(e.header)}>
|
|
339
|
+
<nav data-mps="scheduler" ${r(e.nav)}>
|
|
340
|
+
<button data-mps="scheduler" ${r(e.prev)}>‹</button>
|
|
341
|
+
<button data-mps="scheduler" ${r(e.next)}>›</button>
|
|
342
|
+
<button data-mps="scheduler" ${r(e.today)}>${e.todayText}</button>
|
|
343
|
+
</nav>
|
|
344
|
+
<div data-mps="scheduler" ${r(e.title)}>${e.titleText}</div>
|
|
345
|
+
<div data-mps="scheduler" ${r(e.switcher)}>
|
|
346
|
+
${l(e.views, (e) => e.key, (e) => o`
|
|
347
|
+
<button data-mps="scheduler" ${r(e.bag)}>${e.text}</button>
|
|
2340
348
|
`)}
|
|
2341
|
-
</ul>
|
|
2342
|
-
`;
|
|
2343
|
-
}
|
|
2344
|
-
popoverAnchorCell() {
|
|
2345
|
-
return this.popoverAnchorId ? this.shadowRoot?.querySelector(`#${this.cssEscape(this.popoverAnchorId)}`) ?? null : null;
|
|
2346
|
-
}
|
|
2347
|
-
defaultPopoverAnchorId(e) {
|
|
2348
|
-
return this.stateManager.getState().view === "year" ? `scheduler-cell-y-${R.monthKey(e)}` : `scheduler-cell-m-${z.dayKey(e)}`;
|
|
2349
|
-
}
|
|
2350
|
-
eventsOnDay(e) {
|
|
2351
|
-
let t = new Date(e);
|
|
2352
|
-
t.setHours(0, 0, 0, 0);
|
|
2353
|
-
let n = new Date(t);
|
|
2354
|
-
return n.setDate(n.getDate() + 1), this.stateManager.getState().events.filter((e) => e.start < n && e.end > t).sort((e, t) => e.start.getTime() - t.start.getTime());
|
|
2355
|
-
}
|
|
2356
|
-
async openDayPopover(e, t, n = "day") {
|
|
2357
|
-
this.popoverDate = new Date(e), this.popoverScope = n, this.popoverAnchorId = t ?? this.defaultPopoverAnchorId(e), this.requestUpdate(), await this.dayPopover.open(), this.contentContainer?.addEventListener("scroll", this.boundRepositionPopover, { passive: !0 });
|
|
2358
|
-
}
|
|
2359
|
-
closeDayPopover() {
|
|
2360
|
-
this.contentContainer?.removeEventListener("scroll", this.boundRepositionPopover), this.dayPopover.close(), this.popoverDate = null, this.popoverAnchorId = null, this.requestUpdate();
|
|
2361
|
-
}
|
|
2362
|
-
selectFromPopover(e, t) {
|
|
2363
|
-
this.closeDayPopover(), this.stateManager.setSelectedEvent(e), this.eventEmitter.emitEventSelected(e, t);
|
|
2364
|
-
}
|
|
2365
|
-
createFromPopover(e) {
|
|
2366
|
-
let t = this.popoverDate;
|
|
2367
|
-
if (!t) return;
|
|
2368
|
-
let n = this.shadowRoot?.querySelector("mp-select.popover-resource-select")?.value || void 0, r = new Date(t);
|
|
2369
|
-
r.setHours(0, 0, 0, 0);
|
|
2370
|
-
let i = new Date(r);
|
|
2371
|
-
i.setDate(i.getDate() + 1), this.closeDayPopover(), !this.can("createEvent") || !this.allowsCreateAt({
|
|
2372
|
-
start: r,
|
|
2373
|
-
end: i
|
|
2374
|
-
}, n) ? this.announceDenied() : this.eventEmitter.emitEventCreate({
|
|
2375
|
-
start: r,
|
|
2376
|
-
end: i
|
|
2377
|
-
}, this.stateManager.getState().view, e, n);
|
|
2378
|
-
}
|
|
2379
|
-
drillFromPopover() {
|
|
2380
|
-
let e = this.popoverDate;
|
|
2381
|
-
if (!e) return;
|
|
2382
|
-
let t = this.popoverScope;
|
|
2383
|
-
this.closeDayPopover(), this.stateManager.setDate(new Date(e)), this.stateManager.setView(t === "month" ? "month" : "day");
|
|
2384
|
-
}
|
|
2385
|
-
eventsInMonth(e) {
|
|
2386
|
-
let t = new Date(e.getFullYear(), e.getMonth(), 1), n = new Date(e.getFullYear(), e.getMonth() + 1, 1);
|
|
2387
|
-
return this.stateManager.getState().events.filter((e) => e.start < n && e.end > t).sort((e, t) => e.start.getTime() - t.start.getTime());
|
|
2388
|
-
}
|
|
2389
|
-
eventElementById(e) {
|
|
2390
|
-
return e ? this.shadowRoot?.querySelector(`[data-event-id="${this.cssEscape(e)}"]:not(.preview)`) ?? null : null;
|
|
2391
|
-
}
|
|
2392
|
-
canOpenEditor(e) {
|
|
2393
|
-
return this.can("editEvent", e) || this.can("moveEvent", e) || this.can("resizeEvent", e) || this.can("deleteEvent", e);
|
|
2394
|
-
}
|
|
2395
|
-
editorTimeFields(e) {
|
|
2396
|
-
let t = this.can("moveEvent", e), n = this.canResizeEdge("start", e) && this.canResizeEdge("end", e);
|
|
2397
|
-
return {
|
|
2398
|
-
canStart: t || n,
|
|
2399
|
-
canEnd: n,
|
|
2400
|
-
canTime: t || n,
|
|
2401
|
-
startIsMove: t
|
|
2402
|
-
};
|
|
2403
|
-
}
|
|
2404
|
-
tryOpenEventEditor(e) {
|
|
2405
|
-
this.eventEditor && this.canOpenEditor(e) && (this.editorEventId = e.id, this.editorError = null, this.editorDraft = {
|
|
2406
|
-
title: e.title,
|
|
2407
|
-
start: new Date(e.start),
|
|
2408
|
-
end: new Date(e.end),
|
|
2409
|
-
color: e.color ?? null,
|
|
2410
|
-
inheritColor: !e.color
|
|
2411
|
-
}, this.requestUpdate(), this.eventEditorOverlay.open(), this.contentContainer?.addEventListener("scroll", this.boundRepositionEditor, { passive: !0 }));
|
|
2412
|
-
}
|
|
2413
|
-
closeEventEditor() {
|
|
2414
|
-
this.editorDraft = null, this.contentContainer?.removeEventListener("scroll", this.boundRepositionEditor), this.eventEditorOverlay.close(), this.editorEventId = null, this.editorError = null, this.editorDraft = null, this.requestUpdate();
|
|
2415
|
-
}
|
|
2416
|
-
handleContextMenu(e) {
|
|
2417
|
-
let t = e.composedPath?.()[0] ?? e.target;
|
|
2418
|
-
if (t?.closest?.("input, textarea, [contenteditable]")) return;
|
|
2419
|
-
if (this.isTouchContextMenu(e)) {
|
|
2420
|
-
e.preventDefault();
|
|
2421
|
-
return;
|
|
2422
|
-
}
|
|
2423
|
-
let n = t?.closest?.("[data-event-id]:not(.preview)");
|
|
2424
|
-
if (!n) {
|
|
2425
|
-
let n = (t?.closest?.(".scheduler-resource-cell")?.querySelector?.(".scheduler-row-menu-button"))?.dataset.resourceId;
|
|
2426
|
-
n && (e.preventDefault(), this.openRowMenu(n));
|
|
2427
|
-
return;
|
|
2428
|
-
}
|
|
2429
|
-
let r = this.getEventById(n.dataset.eventId ?? "");
|
|
2430
|
-
r && this.eventEditor && this.canOpenEditor(r) && (e.preventDefault(), this.stateManager.setSelectedEvent(r), this.tryOpenEventEditor(r));
|
|
2431
|
-
}
|
|
2432
|
-
isTouchContextMenu(e) {
|
|
2433
|
-
let t = e.pointerType;
|
|
2434
|
-
return t ? t === "touch" : this.inputHandler?.isTouchGesture() ?? !1;
|
|
2435
|
-
}
|
|
2436
|
-
firstDayOfWeek() {
|
|
2437
|
-
let { firstDayOfWeek: e, locale: t } = this.stateManager.getState().options;
|
|
2438
|
-
return _.resolveFirstDayOfWeek(e, t);
|
|
2439
|
-
}
|
|
2440
|
-
resolvedHour12() {
|
|
2441
|
-
let { timeFormat: e, locale: t } = this.stateManager.getState().options;
|
|
2442
|
-
return (e ?? _.detectTimeFormat(t)) === "12h";
|
|
2443
|
-
}
|
|
2444
|
-
pickerStep() {
|
|
2445
|
-
let e = Math.round((this.stateManager.getState().options.slotDuration ?? 1800) / 60);
|
|
2446
|
-
return [
|
|
2447
|
-
1,
|
|
2448
|
-
5,
|
|
2449
|
-
10,
|
|
2450
|
-
15,
|
|
2451
|
-
30,
|
|
2452
|
-
60
|
|
2453
|
-
].find((t) => t >= e) ?? 60;
|
|
2454
|
-
}
|
|
2455
|
-
renderEventEditor() {
|
|
2456
|
-
let t = this.editorEventId ? this.getEventById(this.editorEventId) : null, n = this.editorDraft;
|
|
2457
|
-
if (!t || !n) return b;
|
|
2458
|
-
let { options: r } = this.stateManager.getState(), i = this.can("editEvent", t), a = this.editorError?.field === "title", o = this.editorError?.field === "end", s = e(this.editorTitleErrorId, this.editorError?.message ?? null, a), { canStart: c, canEnd: l, startIsMove: u } = this.editorTimeFields(t), d = n.color ?? f(t, this.stateManager.getState().resourceById, this.stateManager.getState().options.defaultEventColor);
|
|
2459
|
-
return y`
|
|
2460
|
-
<div
|
|
2461
|
-
class="scheduler-event-editor"
|
|
2462
|
-
role="dialog"
|
|
2463
|
-
aria-label=${this.msg("eventEditorLabel", { title: t.title })}
|
|
2464
|
-
>
|
|
2465
|
-
<div class="editor-head">
|
|
2466
|
-
<div class="editor-title">${n.title}</div>
|
|
2467
|
-
<button
|
|
2468
|
-
type="button"
|
|
2469
|
-
class="editor-close"
|
|
2470
|
-
aria-label=${this.msg("closePopover")}
|
|
2471
|
-
@click=${() => this.closeEventEditor()}
|
|
2472
|
-
>
|
|
2473
|
-
<span aria-hidden="true">×</span>
|
|
2474
|
-
</button>
|
|
2475
|
-
</div>
|
|
2476
|
-
<label class="editor-field">
|
|
2477
|
-
<span>${this.msg("editorTitleLabel")}</span>
|
|
2478
|
-
<input
|
|
2479
|
-
type="text"
|
|
2480
|
-
class="form-control form-control-sm editor-input editor-title-input ${a ? "is-invalid" : ""}"
|
|
2481
|
-
.value=${n.title}
|
|
2482
|
-
?disabled=${!i}
|
|
2483
|
-
aria-invalid=${a ? "true" : "false"}
|
|
2484
|
-
aria-errormessage=${s.id}
|
|
2485
|
-
aria-describedby=${s.id}
|
|
2486
|
-
@input=${(e) => this.updateEditorDraft({ title: e.target.value })}
|
|
2487
|
-
/>
|
|
2488
|
-
${s.node}
|
|
2489
|
-
</label>
|
|
2490
|
-
<label class="editor-field">
|
|
2491
|
-
<span>${this.msg("editorStartLabel")}</span>
|
|
2492
|
-
<mp-datetime-picker
|
|
2493
|
-
class="editor-input editor-start-input"
|
|
2494
|
-
.value=${n.start}
|
|
2495
|
-
.max=${u ? null : n.end}
|
|
2496
|
-
?disabled=${!c}
|
|
2497
|
-
@value-change=${(e) => this.onEditorStartChange(e)}
|
|
2498
|
-
input-label=${this.msg("editorStartLabel")}
|
|
2499
|
-
locale=${r.locale ?? b}
|
|
2500
|
-
first-day-of-week=${this.firstDayOfWeek()}
|
|
2501
|
-
.hour12=${this.resolvedHour12()}
|
|
2502
|
-
.step=${this.pickerStep()}
|
|
2503
|
-
></mp-datetime-picker>
|
|
2504
|
-
</label>
|
|
2505
|
-
<label class="editor-field">
|
|
2506
|
-
<span>${this.msg("editorEndLabel")}</span>
|
|
2507
|
-
<mp-datetime-picker
|
|
2508
|
-
class="editor-input editor-end-input"
|
|
2509
|
-
.value=${n.end}
|
|
2510
|
-
.min=${n.start}
|
|
2511
|
-
?disabled=${!l}
|
|
2512
|
-
?invalid=${o}
|
|
2513
|
-
error-text=${o ? this.editorError.message : b}
|
|
2514
|
-
@value-change=${(e) => this.onEditorEndChange(e)}
|
|
2515
|
-
input-label=${this.msg("editorEndLabel")}
|
|
2516
|
-
locale=${r.locale ?? b}
|
|
2517
|
-
first-day-of-week=${this.firstDayOfWeek()}
|
|
2518
|
-
.hour12=${this.resolvedHour12()}
|
|
2519
|
-
.step=${this.pickerStep()}
|
|
2520
|
-
></mp-datetime-picker>
|
|
2521
|
-
</label>
|
|
2522
|
-
<label class="editor-field">
|
|
2523
|
-
<span>${this.msg("editorColorLabel")}</span>
|
|
2524
|
-
<input
|
|
2525
|
-
type="color"
|
|
2526
|
-
class="form-control form-control-color editor-input editor-color-input"
|
|
2527
|
-
.value=${d}
|
|
2528
|
-
?disabled=${!i || n.inheritColor}
|
|
2529
|
-
@input=${(e) => this.updateEditorDraft({ color: e.target.value })}
|
|
2530
|
-
/>
|
|
2531
|
-
</label>
|
|
2532
|
-
<div class="editor-field editor-inherit">
|
|
2533
|
-
<mp-checkbox
|
|
2534
|
-
class="editor-inherit-input"
|
|
2535
|
-
.checked=${n.inheritColor}
|
|
2536
|
-
?disabled=${!i}
|
|
2537
|
-
@change=${() => this.toggleEditorColorInherit()}
|
|
2538
|
-
>${this.msg("editorInheritColor")}</mp-checkbox>
|
|
2539
|
-
</div>
|
|
2540
|
-
<div class="editor-actions">
|
|
2541
|
-
<button
|
|
2542
|
-
type="button"
|
|
2543
|
-
class="editor-action primary"
|
|
2544
|
-
@click=${() => this.saveEventEditor()}
|
|
2545
|
-
>
|
|
2546
|
-
${this.msg("editorSave")}
|
|
2547
|
-
</button>
|
|
2548
|
-
${this.can("deleteEvent", t) ? y`<button
|
|
2549
|
-
type="button"
|
|
2550
|
-
class="editor-action danger"
|
|
2551
|
-
@click=${() => this.deleteFromEditor()}
|
|
2552
|
-
>
|
|
2553
|
-
${this.msg("editorDelete")}
|
|
2554
|
-
</button>` : b}
|
|
2555
|
-
<button
|
|
2556
|
-
type="button"
|
|
2557
|
-
class="editor-action"
|
|
2558
|
-
@click=${() => this.closeEventEditor()}
|
|
2559
|
-
>
|
|
2560
|
-
${this.msg("editorCancel")}
|
|
2561
|
-
</button>
|
|
2562
349
|
</div>
|
|
2563
350
|
</div>
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
}
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
let e = t.title.trim();
|
|
2625
|
-
if (!e) {
|
|
2626
|
-
this.refuseSave("title", this.msg("editorTitleRequired"));
|
|
2627
|
-
return;
|
|
2628
|
-
}
|
|
2629
|
-
n.title = e, t.inheritColor ? delete n.color : t.color && (n.color = t.color);
|
|
2630
|
-
}
|
|
2631
|
-
this.editorTimeFields(e).canTime && (n.start = t.start, n.end = t.end), isNaN(n.start.getTime()) || isNaN(n.end.getTime()) || n.end <= n.start ? this.refuseSave("end", this.msg("editorInvalidRange")) : (this.closeEventEditor(), this.stateManager.updateEvent(n), this.eventEmitter.emitEventUpdate(n, e, new CustomEvent("event-editor")), this.liveAnnouncer.announce(this.msg("eventUpdated", { title: n.title })));
|
|
2632
|
-
}
|
|
2633
|
-
async refuseSave(e, t) {
|
|
2634
|
-
if (this.editorError = {
|
|
2635
|
-
field: e,
|
|
2636
|
-
message: t
|
|
2637
|
-
}, this.requestUpdate(), await this.updateComplete, this.editorError?.field !== e) return;
|
|
2638
|
-
let n = e === "title" ? this.shadowRoot?.querySelector(".editor-title-input") : this.shadowRoot?.querySelector("mp-datetime-picker.editor-end-input");
|
|
2639
|
-
await n?.updateComplete, n?.focus();
|
|
2640
|
-
}
|
|
2641
|
-
handleNativeDblClick(e) {
|
|
2642
|
-
let t = (e.composedPath?.()[0] ?? e.target)?.closest?.(".resource-title[data-resource-id]");
|
|
2643
|
-
if (!t) return;
|
|
2644
|
-
let n = t.dataset.resourceId;
|
|
2645
|
-
n && this.beginResourceRename(n);
|
|
2646
|
-
}
|
|
2647
|
-
beginResourceRename(e) {
|
|
2648
|
-
if (!this.can("updateResource")) return;
|
|
2649
|
-
let t = this.findResourceOrGroup(e), n = this.shadowRoot?.querySelector(`.resource-title[data-resource-id="${this.cssEscape(e)}"]`);
|
|
2650
|
-
if (!t || !n || n.querySelector("input")) return;
|
|
2651
|
-
let r = t.title, i = document.createElement("input");
|
|
2652
|
-
i.type = "text", i.className = "form-control form-control-sm rename-input", i.value = r, i.setAttribute("aria-label", this.msg("renameResourceLabel", { title: r }));
|
|
2653
|
-
let a = !1, o = (o) => {
|
|
2654
|
-
if (a) return;
|
|
2655
|
-
a = !0;
|
|
2656
|
-
let s = i.value.trim();
|
|
2657
|
-
n.textContent = o && s ? s : r, o && s && s !== r && (this.eventEmitter.emitResourceUpdate(t, { title: s }, new CustomEvent("rename")), this.liveAnnouncer.announce(this.msg("resourceRenamed", {
|
|
2658
|
-
from: r,
|
|
2659
|
-
to: s
|
|
2660
|
-
}))), requestAnimationFrame(() => {
|
|
2661
|
-
(this.shadowRoot?.querySelector(`.scheduler-timeline-slot[data-resource-id="${this.cssEscape(e)}"]`))?.focus({ preventScroll: !0 });
|
|
2662
|
-
});
|
|
2663
|
-
};
|
|
2664
|
-
i.addEventListener("keydown", (e) => {
|
|
2665
|
-
e.stopPropagation(), e.key === "Enter" ? (e.preventDefault(), o(!0)) : e.key === "Escape" && (e.preventDefault(), o(!1));
|
|
2666
|
-
}), i.addEventListener("blur", () => o(!0)), i.addEventListener("pointerdown", (e) => e.stopPropagation()), n.textContent = "", n.appendChild(i), i.focus(), i.select();
|
|
2667
|
-
}
|
|
2668
|
-
deleteFromEditor() {
|
|
2669
|
-
let e = this.editorEventId ? this.getEventById(this.editorEventId) : null;
|
|
2670
|
-
e && (this.can("deleteEvent", e) ? (this.closeEventEditor(), this.eventEmitter.emitEventDelete(e), requestAnimationFrame(() => this.focusFocusedCell())) : this.announceDenied());
|
|
2671
|
-
}
|
|
2672
|
-
handleMoreLink(e) {
|
|
2673
|
-
let t = this.parseDayKey(e), n = this.stateManager.getState().options.moreLinkBehavior ?? "popover";
|
|
2674
|
-
typeof n == "function" ? n({
|
|
2675
|
-
date: t,
|
|
2676
|
-
events: this.eventsOnDay(t)
|
|
2677
|
-
}) : n === "popover" ? this.openDayPopover(t) : (this.stateManager.setDate(t), this.stateManager.setView("day"));
|
|
2678
|
-
}
|
|
2679
|
-
firstUpdated() {
|
|
2680
|
-
let e = this.shadowRoot.querySelector(".scheduler-header");
|
|
2681
|
-
this.contentContainer = this.shadowRoot.querySelector(".scheduler-content"), this.populateHeader(e), this.observeHeaderWidth(e), this.inputHandler = new ce({
|
|
2682
|
-
shadowRoot: this.shadowRoot,
|
|
2683
|
-
getEventById: (e) => this.getEventById(e),
|
|
2684
|
-
isEditable: () => this.can("createEvent") || this.can("moveEvent") || this.can("resizeEvent"),
|
|
2685
|
-
isSelectable: () => this.can("selectRange") || this.can("createEvent"),
|
|
2686
|
-
isEventSelected: (e) => this.stateManager.getState().selectedEvent?.id === e
|
|
2687
|
-
}, {
|
|
2688
|
-
onPointerDown: (e, t, n) => this.handlePointerDown(e, t, n),
|
|
2689
|
-
onPointerMove: (e) => this.handlePointerMove(e),
|
|
2690
|
-
onPointerUp: (e) => this.handlePointerUp(e),
|
|
2691
|
-
onClick: (e, t) => this.handleClick(e, t),
|
|
2692
|
-
onDoubleClick: (e, t) => this.handleDoubleClick(e, t),
|
|
2693
|
-
onPointerCancel: () => this.cancelPointerDrag(),
|
|
2694
|
-
getScrollContainer: () => this.contentContainer
|
|
2695
|
-
}), this.inputHandler.attach(), this.shadowRoot.addEventListener("focusin", this.boundHandleFocusIn), this.shadowRoot.addEventListener("change", this.boundHandleValueChange), this.shadowRoot.addEventListener("contextmenu", this.boundHandleContextMenu), this.shadowRoot.addEventListener("dblclick", this.boundHandleDblClick), this.renderView();
|
|
2696
|
-
}
|
|
2697
|
-
populateHeader(e) {
|
|
2698
|
-
let t = document.createElement("nav");
|
|
2699
|
-
t.className = "scheduler-nav", t.setAttribute("aria-label", this.msg("navLabel"));
|
|
2700
|
-
let n = document.createElement("button");
|
|
2701
|
-
n.type = "button", n.textContent = "‹", n.setAttribute("aria-label", this.msg("previousPeriod")), n.title = this.msg("previousPeriod"), n.addEventListener("click", () => this.prev());
|
|
2702
|
-
let r = document.createElement("button");
|
|
2703
|
-
r.type = "button", r.textContent = "›", r.setAttribute("aria-label", this.msg("nextPeriod")), r.title = this.msg("nextPeriod"), r.addEventListener("click", () => this.next());
|
|
2704
|
-
let i = document.createElement("button");
|
|
2705
|
-
i.type = "button", i.textContent = this.msg("today"), i.setAttribute("aria-label", this.msg("jumpToToday")), i.addEventListener("click", () => this.today()), t.appendChild(n), t.appendChild(r), t.appendChild(i);
|
|
2706
|
-
let a = document.createElement("div");
|
|
2707
|
-
a.className = "scheduler-title", a.setAttribute("aria-live", "polite"), a.setAttribute("aria-atomic", "true"), this.updateTitle(a);
|
|
2708
|
-
let o = document.createElement("div");
|
|
2709
|
-
o.className = "scheduler-view-switcher", o.setAttribute("role", "group"), o.setAttribute("aria-label", this.msg("switchView"));
|
|
2710
|
-
for (let e of [
|
|
2711
|
-
"year",
|
|
2712
|
-
"month",
|
|
2713
|
-
"week",
|
|
2714
|
-
"day",
|
|
2715
|
-
"timeline"
|
|
2716
|
-
]) {
|
|
2717
|
-
let t = document.createElement("button");
|
|
2718
|
-
t.type = "button", t.textContent = this.viewLabel(e), t.dataset.view = e;
|
|
2719
|
-
let n = e === this.view;
|
|
2720
|
-
t.setAttribute("aria-pressed", String(n)), n && t.classList.add("active"), t.addEventListener("click", () => this.changeView(e)), o.appendChild(t);
|
|
2721
|
-
}
|
|
2722
|
-
e.appendChild(t), e.appendChild(a), e.appendChild(o);
|
|
2723
|
-
}
|
|
2724
|
-
updateTitle(e) {
|
|
2725
|
-
let t = e ?? this.shadowRoot.querySelector(".scheduler-title");
|
|
2726
|
-
if (!t) return;
|
|
2727
|
-
let { date: n, view: r, options: i } = this.stateManager.getState(), a = "";
|
|
2728
|
-
switch (r) {
|
|
2729
|
-
case "year":
|
|
2730
|
-
a = n.getFullYear().toString();
|
|
2731
|
-
break;
|
|
2732
|
-
case "month":
|
|
2733
|
-
a = _.formatDate(n, i.locale, {
|
|
2734
|
-
month: "long",
|
|
2735
|
-
year: "numeric"
|
|
2736
|
-
});
|
|
2737
|
-
break;
|
|
2738
|
-
case "week":
|
|
2739
|
-
case "timeline": {
|
|
2740
|
-
let e = _.getWeekStart(n, this.firstDayOfWeek()), t = _.addDays(e, 6);
|
|
2741
|
-
a = _.formatDateRange(e, t, i.locale, {
|
|
2742
|
-
month: "short",
|
|
2743
|
-
day: "numeric",
|
|
2744
|
-
year: "numeric"
|
|
2745
|
-
});
|
|
2746
|
-
break;
|
|
2747
|
-
}
|
|
2748
|
-
case "day": a = _.formatDate(n, i.locale, {
|
|
2749
|
-
weekday: "long",
|
|
2750
|
-
month: "long",
|
|
2751
|
-
day: "numeric",
|
|
2752
|
-
year: "numeric"
|
|
2753
|
-
});
|
|
2754
|
-
}
|
|
2755
|
-
t.textContent = a;
|
|
2756
|
-
}
|
|
2757
|
-
static {
|
|
2758
|
-
this.NARROW_HEADER_WIDTH = 560;
|
|
2759
|
-
}
|
|
2760
|
-
observeHeaderWidth(e) {
|
|
2761
|
-
if (typeof ResizeObserver > "u") return;
|
|
2762
|
-
let t = this.shadowRoot?.querySelector(".scheduler-container");
|
|
2763
|
-
this.headerResizeObserver = new ResizeObserver((n) => {
|
|
2764
|
-
let r = (n[0]?.contentRect.width ?? e.clientWidth) < c.NARROW_HEADER_WIDTH;
|
|
2765
|
-
r !== this.headerIsNarrow && (this.headerIsNarrow = r, requestAnimationFrame(() => {
|
|
2766
|
-
e.toggleAttribute("data-narrow", r), t?.toggleAttribute("data-narrow", r);
|
|
2767
|
-
}));
|
|
2768
|
-
}), this.headerResizeObserver.observe(e);
|
|
2769
|
-
}
|
|
2770
|
-
renderView() {
|
|
2771
|
-
if (!this.contentContainer) return;
|
|
2772
|
-
let e = this.shadowRoot?.activeElement, t = !!e && this.contentContainer.contains(e);
|
|
2773
|
-
this.currentViewType !== this.stateManager.getState().view && (this.contentContainer.scrollLeft = 0, this.contentContainer.scrollTop = 0), this.currentView?.destroy();
|
|
2774
|
-
let n = this.stateManager.getState();
|
|
2775
|
-
switch (n.view) {
|
|
2776
|
-
case "year":
|
|
2777
|
-
this.currentView = new R(this.contentContainer, n), this.currentViewType = "year";
|
|
2778
|
-
break;
|
|
2779
|
-
case "month":
|
|
2780
|
-
this.currentView = new z(this.contentContainer, n), this.currentViewType = "month";
|
|
2781
|
-
break;
|
|
2782
|
-
case "week":
|
|
2783
|
-
this.currentView = new V(this.contentContainer, n), this.currentViewType = "week";
|
|
2784
|
-
break;
|
|
2785
|
-
case "day":
|
|
2786
|
-
this.currentView = new H(this.contentContainer, n), this.currentViewType = "day";
|
|
2787
|
-
break;
|
|
2788
|
-
case "timeline": this.currentView = new q(this.contentContainer, n), this.currentViewType = "timeline";
|
|
2789
|
-
}
|
|
2790
|
-
this.currentView?.render(), t && requestAnimationFrame(() => {
|
|
2791
|
-
let e = this.shadowRoot?.activeElement;
|
|
2792
|
-
(!e || e === this.shadowRoot?.host) && this.focusFocusedCell();
|
|
2793
|
-
});
|
|
2794
|
-
}
|
|
2795
|
-
onStateChange(e) {
|
|
2796
|
-
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();
|
|
2797
|
-
}
|
|
2798
|
-
detectAndEmitChanges(e) {
|
|
2799
|
-
let t = this.previousView !== null && this.previousView !== e.view, n = this.previousDate !== null && this.previousDate.getTime() !== e.date.getTime(), r = e.selectedEvent?.id ?? null, i = j(e), a = i ? `${i.start.getTime()}-${i.end.getTime()}-${e.selectionResourceId ?? ""}` : null, o = this.previousSelectedEventId !== r || this.previousRangeKey !== a;
|
|
2800
|
-
(t || n) && this.eventEmitter.emitViewChange(e.view, e.date), o && this.eventEmitter.emitSelectionChange(e.selectedEvent, i, e.view, e.selectionResourceId ?? void 0), this.previousView = e.view, this.previousDate = new Date(e.date), this.previousSelectedEventId = r, this.previousRangeKey = a;
|
|
2801
|
-
}
|
|
2802
|
-
applyHeaderLabels() {
|
|
2803
|
-
let e = this.shadowRoot;
|
|
2804
|
-
if (!e) return;
|
|
2805
|
-
let t = e.querySelector(".scheduler-nav");
|
|
2806
|
-
t?.setAttribute("aria-label", this.msg("navLabel"));
|
|
2807
|
-
let n = t?.querySelectorAll("button"), [r, i, a] = n ? [...n] : [];
|
|
2808
|
-
r && (r.setAttribute("aria-label", this.msg("previousPeriod")), r.title = this.msg("previousPeriod")), i && (i.setAttribute("aria-label", this.msg("nextPeriod")), i.title = this.msg("nextPeriod")), a && (a.textContent = this.msg("today"), a.setAttribute("aria-label", this.msg("jumpToToday")));
|
|
2809
|
-
let o = e.querySelector(".scheduler-view-switcher");
|
|
2810
|
-
o?.setAttribute("aria-label", this.msg("switchView")), o?.querySelectorAll("button[data-view]").forEach((e) => {
|
|
2811
|
-
let t = e.dataset.view;
|
|
2812
|
-
t && (e.textContent = this.viewLabel(t));
|
|
2813
|
-
});
|
|
2814
|
-
}
|
|
2815
|
-
updateUI(e) {
|
|
2816
|
-
this.shadowRoot && (this.updateTitle(), this.applyHeaderLabels(), this.shadowRoot.querySelectorAll(".scheduler-view-switcher button").forEach((t) => {
|
|
2817
|
-
let n = t, r = n.dataset.view === e.view;
|
|
2818
|
-
n.classList.toggle("active", r), n.setAttribute("aria-pressed", String(r));
|
|
2819
|
-
}), this.currentView && (this.currentViewType === e.view ? e.dragState || e.previewEvent ? this.scheduleDragUpdate(e) : (this.cancelPendingDragUpdate(), this.currentView.update(e)) : this.renderView()));
|
|
2820
|
-
}
|
|
2821
|
-
cancelPendingDragUpdate() {
|
|
2822
|
-
this.pendingDragUpdate !== null && (cancelAnimationFrame(this.pendingDragUpdate), this.pendingDragUpdate = null), this.latestDragState = null;
|
|
2823
|
-
}
|
|
2824
|
-
scheduleDragUpdate(e) {
|
|
2825
|
-
this.latestDragState = e, this.pendingDragUpdate === null && (this.pendingDragUpdate = requestAnimationFrame(() => {
|
|
2826
|
-
this.pendingDragUpdate = null;
|
|
2827
|
-
let e = this.latestDragState;
|
|
2828
|
-
this.latestDragState = null, e && this.currentView && this.currentView.update(e);
|
|
2829
|
-
}));
|
|
2830
|
-
}
|
|
2831
|
-
handlePointerDown(e, t, n) {
|
|
2832
|
-
this.allowsGesture(t) && this.dragManager.handlePointerDown(e, t, n);
|
|
2833
|
-
}
|
|
2834
|
-
allowsGesture(e) {
|
|
2835
|
-
switch (e.type) {
|
|
2836
|
-
case "event": return this.can("moveEvent", e.event);
|
|
2837
|
-
case "resize-handle": return this.canResizeEdge(e.resizeHandle === "start" ? "start" : "end", e.event);
|
|
2838
|
-
case "slot": return this.can("createEvent") || this.can("selectRange");
|
|
2839
|
-
default: return !0;
|
|
2840
|
-
}
|
|
2841
|
-
}
|
|
2842
|
-
handlePointerMove(e) {
|
|
2843
|
-
this.dragManager.handlePointerMove(e), this.updateEdgeScroll(e);
|
|
2844
|
-
}
|
|
2845
|
-
handlePointerUp(e) {
|
|
2846
|
-
this.stopEdgeScroll();
|
|
2847
|
-
let t = this.dragManager.handlePointerUp(e);
|
|
2848
|
-
t && this.handleDragComplete(t, e.originalEvent);
|
|
2849
|
-
}
|
|
2850
|
-
cancelPointerDrag() {
|
|
2851
|
-
this.stopEdgeScroll(), this.dragManager.cancel();
|
|
2852
|
-
}
|
|
2853
|
-
static {
|
|
2854
|
-
this.EDGE_SCROLL_ZONE_PX = 40;
|
|
2855
|
-
}
|
|
2856
|
-
static {
|
|
2857
|
-
this.EDGE_SCROLL_MAX_PX = 18;
|
|
2858
|
-
}
|
|
2859
|
-
updateEdgeScroll(e) {
|
|
2860
|
-
let t = this.contentContainer;
|
|
2861
|
-
!t || !this.dragManager.isDragging() ? this.stopEdgeScroll() : (this.edgeScrollVector = U({
|
|
2862
|
-
x: e.clientX,
|
|
2863
|
-
y: e.clientY
|
|
2864
|
-
}, t.getBoundingClientRect(), c.EDGE_SCROLL_ZONE_PX, c.EDGE_SCROLL_MAX_PX), this.edgeScrollPointer = e, this.edgeScrollVector.x === 0 && this.edgeScrollVector.y === 0 ? this.stopEdgeScroll() : this.edgeScrollFrame === null && this.scheduleEdgeScroll());
|
|
2865
|
-
}
|
|
2866
|
-
scheduleEdgeScroll() {
|
|
2867
|
-
this.edgeScrollFrame = requestAnimationFrame(() => {
|
|
2868
|
-
this.edgeScrollFrame = null;
|
|
2869
|
-
let e = this.contentContainer, t = this.edgeScrollPointer;
|
|
2870
|
-
if (!e || !t || !this.dragManager.isDragging()) return;
|
|
2871
|
-
let n = e.scrollLeft, r = e.scrollTop;
|
|
2872
|
-
e.scrollLeft = n + this.edgeScrollVector.x, e.scrollTop = r + this.edgeScrollVector.y, (e.scrollLeft !== n || e.scrollTop !== r) && (this.dragManager.handlePointerMove(t), this.scheduleEdgeScroll());
|
|
2873
|
-
});
|
|
2874
|
-
}
|
|
2875
|
-
stopEdgeScroll() {
|
|
2876
|
-
this.edgeScrollFrame !== null && (cancelAnimationFrame(this.edgeScrollFrame), this.edgeScrollFrame = null), this.edgeScrollVector = {
|
|
2877
|
-
x: 0,
|
|
2878
|
-
y: 0
|
|
2879
|
-
}, this.edgeScrollPointer = null;
|
|
2880
|
-
}
|
|
351
|
+
<div data-mps="scheduler" ${r(e.content)} style=${u(e.contentStyle)}>
|
|
352
|
+
${e.timeGrid ? o`
|
|
353
|
+
${v({
|
|
354
|
+
grid: e.timeGrid,
|
|
355
|
+
slots: t
|
|
356
|
+
})}
|
|
357
|
+
` : s}
|
|
358
|
+
${e.month ? o`
|
|
359
|
+
${y({
|
|
360
|
+
month: e.month,
|
|
361
|
+
slots: t
|
|
362
|
+
})}
|
|
363
|
+
` : s}
|
|
364
|
+
${e.year ? o`
|
|
365
|
+
${b({
|
|
366
|
+
year: e.year,
|
|
367
|
+
slots: t
|
|
368
|
+
})}
|
|
369
|
+
` : s}
|
|
370
|
+
${e.timeline ? o`
|
|
371
|
+
${x({
|
|
372
|
+
timeline: e.timeline,
|
|
373
|
+
slots: t
|
|
374
|
+
})}
|
|
375
|
+
` : s}
|
|
376
|
+
${e.timeline && e.timeline.addBar ? o`
|
|
377
|
+
<div data-mps="scheduler" ${r(e.timeline.addBar.bag)}>
|
|
378
|
+
${l(e.timeline.addBar.buttons, (e) => e.key, (e) => o`
|
|
379
|
+
<button data-mps="scheduler" ${r(e.bag)}>${e.text}</button>
|
|
380
|
+
`)}
|
|
381
|
+
</div>
|
|
382
|
+
` : s}
|
|
383
|
+
</div>
|
|
384
|
+
</div>
|
|
385
|
+
<div data-mps="scheduler" ${r(e.kbdGrid)}>${e.kbdGridText}</div>
|
|
386
|
+
<div data-mps="scheduler" ${r(e.kbdEvent)}>${e.kbdEventText}</div>
|
|
387
|
+
${e.popover ? o`
|
|
388
|
+
${C({
|
|
389
|
+
popover: e.popover,
|
|
390
|
+
slots: t
|
|
391
|
+
})}
|
|
392
|
+
` : s}
|
|
393
|
+
${e.rowPanel ? o`
|
|
394
|
+
${w({
|
|
395
|
+
panel: e.rowPanel,
|
|
396
|
+
slots: t
|
|
397
|
+
})}
|
|
398
|
+
` : s}
|
|
399
|
+
${e.editor ? o`
|
|
400
|
+
${T({
|
|
401
|
+
editor: e.editor,
|
|
402
|
+
slots: t
|
|
403
|
+
})}
|
|
404
|
+
` : s}
|
|
405
|
+
<div data-mps="scheduler" ${r(e.live)}>${e.announcement}</div>
|
|
406
|
+
`;
|
|
407
|
+
}
|
|
408
|
+
//#endregion
|
|
409
|
+
//#region libs/mintplayer-web-components/scheduler/src/generated/mp-scheduler.generated.ts
|
|
410
|
+
var D = class extends a {
|
|
2881
411
|
static {
|
|
2882
|
-
this.
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
return;
|
|
2923
|
-
}
|
|
2924
|
-
}
|
|
2925
|
-
let i = n.closest(".scheduler-more-link");
|
|
2926
|
-
if (i) {
|
|
2927
|
-
let e = i.dataset.date;
|
|
2928
|
-
if (e) {
|
|
2929
|
-
this.handleMoreLink(e);
|
|
2930
|
-
return;
|
|
2931
|
-
}
|
|
2932
|
-
}
|
|
2933
|
-
let a = n.closest("[data-date]");
|
|
2934
|
-
if (a) {
|
|
2935
|
-
let t = a.dataset.date;
|
|
2936
|
-
if (t) {
|
|
2937
|
-
let r = this.parseDayKey(t);
|
|
2938
|
-
if (this.eventEmitter.emitDateClick(r, e.originalEvent), n.closest(".day-number")) {
|
|
2939
|
-
this.stateManager.setDate(r), this.stateManager.setView("day");
|
|
2940
|
-
return;
|
|
2941
|
-
}
|
|
2942
|
-
if (this.stateManager.getState().options.dayClickAction === "popover") {
|
|
2943
|
-
let e = n.closest(".scheduler-year-month");
|
|
2944
|
-
this.openDayPopover(r, e?.id);
|
|
2945
|
-
return;
|
|
2946
|
-
}
|
|
2947
|
-
}
|
|
2948
|
-
}
|
|
2949
|
-
let o = n.closest(".scheduler-year-month-header");
|
|
2950
|
-
if (o) {
|
|
2951
|
-
let e = o.dataset.month;
|
|
2952
|
-
e && (this.stateManager.setDate(this.parseDayKey(e)), this.stateManager.setView("month"));
|
|
2953
|
-
}
|
|
2954
|
-
t.type === "event" && t.event && (this.stateManager.setSelectedEvent(t.event), this.registerEventActivation(t.event, e.originalEvent));
|
|
2955
|
-
}
|
|
2956
|
-
handleResourceAction(e, t) {
|
|
2957
|
-
let n = e.closest("[data-action]");
|
|
2958
|
-
if (!n) return !1;
|
|
2959
|
-
let { action: r, parentId: i, resourceId: a } = n.dataset, o = this.stateManager.getState().view;
|
|
2960
|
-
switch (r) {
|
|
2961
|
-
case "row-menu": return a && this.openRowMenu(a), !0;
|
|
2962
|
-
case "rename-resource": return a && this.can("updateResource") && (this.rowMenuOverlay.close(!1), this.beginResourceRename(a)), !0;
|
|
2963
|
-
case "add-resource": return this.can("createResource") && this.eventEmitter.emitResourceCreate("resource", o, t, i), !0;
|
|
2964
|
-
case "add-group": return this.can("createGroup") && this.eventEmitter.emitResourceCreate("group", o, t, i), !0;
|
|
2965
|
-
case "delete-resource": {
|
|
2966
|
-
let e = a ? this.findResourceOrGroup(a) : null;
|
|
2967
|
-
return e && this.can("deleteResource") && this.eventEmitter.emitResourceDelete(e, t), !0;
|
|
2968
|
-
}
|
|
2969
|
-
case "set-resource-color": return !0;
|
|
2970
|
-
}
|
|
2971
|
-
return !1;
|
|
2972
|
-
}
|
|
2973
|
-
handleValueChange(e) {
|
|
2974
|
-
let t = e.composedPath?.()[0] ?? e.target;
|
|
2975
|
-
if (!t || t.dataset.action !== "set-resource-color" || !this.can("updateResource")) return;
|
|
2976
|
-
let { resourceId: n, field: r } = t.dataset, i = n ? this.findResourceOrGroup(n) : null;
|
|
2977
|
-
if (!i) return;
|
|
2978
|
-
let a = t.value;
|
|
2979
|
-
this.eventEmitter.emitResourceUpdate(i, r === "eventColor" ? { eventColor: a } : { color: a }, e);
|
|
2980
|
-
}
|
|
2981
|
-
findResourceOrGroup(e) {
|
|
2982
|
-
return g.findById(this.stateManager.getState().resources, e) ?? null;
|
|
2983
|
-
}
|
|
2984
|
-
handleDoubleClick(e, t) {
|
|
2985
|
-
t.type === "event" && t.event && (this.eventEmitter.emitEventDblClick(t.event, e.originalEvent), this.tryOpenEventEditor(t.event));
|
|
2986
|
-
}
|
|
2987
|
-
handleFocusIn(e) {
|
|
2988
|
-
let t = (e.composedPath?.() ?? [])[0] ?? e.target;
|
|
2989
|
-
if (!t || !t.dataset) return;
|
|
2990
|
-
let n = t.dataset.eventId;
|
|
2991
|
-
if (!n || !t.classList.contains("scheduler-event") && !t.classList.contains("scheduler-timeline-event") && !t.classList.contains("scheduler-month-event")) return;
|
|
2992
|
-
let r = this.getEventById(n);
|
|
2993
|
-
r && this.stateManager.getState().selectedEvent?.id !== r.id && (this.stateManager.setSelectedEvent(r), this.eventEmitter.emitEventSelected(r, e), requestAnimationFrame(() => {
|
|
2994
|
-
let e = `[data-event-id="${this.cssEscape(r.id)}"]`;
|
|
2995
|
-
(this.shadowRoot?.querySelector(e))?.focus({ preventScroll: !0 });
|
|
2996
|
-
}));
|
|
2997
|
-
}
|
|
2998
|
-
eventInsidePanel(e, t) {
|
|
2999
|
-
let n = e.composedPath?.() ?? [], r = this.shadowRoot?.querySelector(t);
|
|
3000
|
-
return r ? n.includes(r) : !1;
|
|
3001
|
-
}
|
|
3002
|
-
handleKeyDown(e) {
|
|
3003
|
-
if (this.rowMenuOverlay.isOpen) {
|
|
3004
|
-
if (e.key === "Escape" && this.rowMenuOverlay.isTopmost) {
|
|
3005
|
-
e.preventDefault(), e.stopPropagation(), this.closeRowMenu();
|
|
3006
|
-
return;
|
|
3007
|
-
}
|
|
3008
|
-
if (this.eventInsidePanel(e, ".scheduler-row-panel")) return;
|
|
3009
|
-
}
|
|
3010
|
-
if (this.dayPopover.isOpen) {
|
|
3011
|
-
if (e.key === "Escape" && this.dayPopover.isTopmost) {
|
|
3012
|
-
e.preventDefault(), e.stopPropagation(), this.closeDayPopover();
|
|
3013
|
-
return;
|
|
3014
|
-
}
|
|
3015
|
-
if (this.eventInsidePanel(e, ".scheduler-day-popover")) return;
|
|
3016
|
-
}
|
|
3017
|
-
if (this.eventEditorOverlay.isOpen) {
|
|
3018
|
-
if (e.key === "Escape" && this.eventEditorOverlay.isTopmost) {
|
|
3019
|
-
e.preventDefault(), e.stopPropagation(), this.closeEventEditor();
|
|
3020
|
-
return;
|
|
3021
|
-
}
|
|
3022
|
-
if (this.eventInsidePanel(e, ".scheduler-event-editor")) return;
|
|
3023
|
-
}
|
|
3024
|
-
if (this.keyboardMove) {
|
|
3025
|
-
this.handleKeyboardMove(e);
|
|
3026
|
-
return;
|
|
3027
|
-
}
|
|
3028
|
-
if (e.key === "Escape" && this.dragManager.isDragging()) {
|
|
3029
|
-
this.dragManager.cancel();
|
|
3030
|
-
return;
|
|
3031
|
-
}
|
|
3032
|
-
let t = (e.composedPath?.()[0])?.closest?.(".scheduler-row-menu-button");
|
|
3033
|
-
if (t && this.handleRowTriggerKeyDown(e, t) || e.altKey && !e.ctrlKey && !e.metaKey && !e.shiftKey && this.handleAltShortcut(e)) return;
|
|
3034
|
-
if ((e.key === "Enter" || e.key === " ") && this.activateFocusedDrillControl()) {
|
|
3035
|
-
e.preventDefault();
|
|
3036
|
-
return;
|
|
3037
|
-
}
|
|
3038
|
-
let n = this.getFocusedKind();
|
|
3039
|
-
n === "cell" ? this.handleCellKeyDown(e) : n === "event" && this.handleEventKeyDown(e);
|
|
3040
|
-
}
|
|
3041
|
-
activateFocusedDrillControl() {
|
|
3042
|
-
let e = this.shadowRoot?.activeElement;
|
|
3043
|
-
if (!e) return !1;
|
|
3044
|
-
if (e.classList.contains("scheduler-more-link")) {
|
|
3045
|
-
let t = e.dataset.date;
|
|
3046
|
-
return t ? (this.handleMoreLink(t), !0) : !1;
|
|
3047
|
-
}
|
|
3048
|
-
if (e.classList.contains("day-number")) {
|
|
3049
|
-
let t = e.dataset.date;
|
|
3050
|
-
return t ? (this.drillTo(this.parseDayKey(t), "day"), !0) : !1;
|
|
3051
|
-
}
|
|
3052
|
-
if (e.classList.contains("scheduler-year-month-header")) {
|
|
3053
|
-
let t = e.dataset.month;
|
|
3054
|
-
return t ? (this.drillTo(this.parseDayKey(t), "month"), !0) : !1;
|
|
3055
|
-
}
|
|
3056
|
-
return !1;
|
|
3057
|
-
}
|
|
3058
|
-
drillTo(e, t) {
|
|
3059
|
-
this.stateManager.setDate(e), this.stateManager.setView(t), this.focusFocusedCell();
|
|
3060
|
-
}
|
|
3061
|
-
getFocusedKind() {
|
|
3062
|
-
let e = this.shadowRoot?.activeElement;
|
|
3063
|
-
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";
|
|
3064
|
-
}
|
|
3065
|
-
handleAltShortcut(e) {
|
|
3066
|
-
switch (e.key.toLowerCase()) {
|
|
3067
|
-
case "t": return this.today(), e.preventDefault(), !0;
|
|
3068
|
-
case "y": return this.changeView("year"), e.preventDefault(), !0;
|
|
3069
|
-
case "m": return this.changeView("month"), e.preventDefault(), !0;
|
|
3070
|
-
case "w": return this.changeView("week"), e.preventDefault(), !0;
|
|
3071
|
-
case "d": return this.changeView("day"), e.preventDefault(), !0;
|
|
3072
|
-
}
|
|
3073
|
-
return !1;
|
|
3074
|
-
}
|
|
3075
|
-
can(e, t) {
|
|
3076
|
-
let { options: n } = this.stateManager.getState();
|
|
3077
|
-
return s(e, {
|
|
3078
|
-
permissions: this.effectivePermissions(n),
|
|
3079
|
-
event: t ?? null
|
|
3080
|
-
});
|
|
3081
|
-
}
|
|
3082
|
-
canResizeEdge(e, t) {
|
|
3083
|
-
let { options: n } = this.stateManager.getState();
|
|
3084
|
-
return o(e, {
|
|
3085
|
-
permissions: this.effectivePermissions(n),
|
|
3086
|
-
event: t ?? null
|
|
3087
|
-
});
|
|
3088
|
-
}
|
|
3089
|
-
syncPermissions() {
|
|
3090
|
-
let { options: e } = this.stateManager.getState();
|
|
3091
|
-
this.stateManager.setState({ resolvedPermissions: this.effectivePermissions(e) });
|
|
3092
|
-
}
|
|
3093
|
-
effectivePermissions(e) {
|
|
3094
|
-
if (this.readonly) return !1;
|
|
3095
|
-
let t = e.permissions;
|
|
3096
|
-
return t === !1 ? !1 : typeof t == "object" && t ? t : {};
|
|
3097
|
-
}
|
|
3098
|
-
allowsCreateAt(e, t) {
|
|
3099
|
-
let { permissions: n } = this.stateManager.getState().options;
|
|
3100
|
-
return typeof n != "object" || !n ? !0 : n.canCreateAt?.(e, t) ?? !0;
|
|
3101
|
-
}
|
|
3102
|
-
tryEnterEventMoveMode(e) {
|
|
3103
|
-
let t = this.can("moveEvent", e), n = this.can("resizeEvent", e);
|
|
3104
|
-
!t && !n ? this.announceDenied() : this.enterEventMoveMode(e);
|
|
3105
|
-
}
|
|
3106
|
-
announceDenied() {
|
|
3107
|
-
this.liveAnnouncer.announce(this.msg("actionNotAllowed"));
|
|
3108
|
-
}
|
|
3109
|
-
handleEventKeyDown(e) {
|
|
3110
|
-
let t = this.stateManager.getState().selectedEvent;
|
|
3111
|
-
if (t) switch (e.key) {
|
|
3112
|
-
case "m":
|
|
3113
|
-
case "M":
|
|
3114
|
-
if (e.altKey || e.ctrlKey || e.metaKey) break;
|
|
3115
|
-
e.preventDefault(), this.tryEnterEventMoveMode(t);
|
|
3116
|
-
return;
|
|
3117
|
-
case "Enter":
|
|
3118
|
-
e.preventDefault(), this.tryEnterEventMoveMode(t);
|
|
3119
|
-
return;
|
|
3120
|
-
case "F2":
|
|
3121
|
-
e.preventDefault(), this.tryOpenEventEditor(t);
|
|
3122
|
-
return;
|
|
3123
|
-
case "Delete":
|
|
3124
|
-
case "Backspace":
|
|
3125
|
-
if (e.preventDefault(), !this.can("deleteEvent", t)) {
|
|
3126
|
-
this.announceDenied();
|
|
3127
|
-
return;
|
|
3128
|
-
}
|
|
3129
|
-
this.eventEmitter.emitEventDelete(t);
|
|
3130
|
-
return;
|
|
3131
|
-
case "Escape":
|
|
3132
|
-
e.preventDefault(), this.focusFocusedCell();
|
|
3133
|
-
return;
|
|
3134
|
-
case "ArrowLeft":
|
|
3135
|
-
e.preventDefault(), this.focusAdjacentEvent(t, -1);
|
|
3136
|
-
return;
|
|
3137
|
-
case "ArrowRight":
|
|
3138
|
-
e.preventDefault(), this.focusAdjacentEvent(t, 1);
|
|
3139
|
-
return;
|
|
3140
|
-
}
|
|
3141
|
-
}
|
|
3142
|
-
focusAdjacentEvent(e, t) {
|
|
3143
|
-
let n = [...this.stateManager.getState().events].sort((e, t) => {
|
|
3144
|
-
let n = e.start.getTime() - t.start.getTime();
|
|
3145
|
-
return n === 0 ? e.id.localeCompare(t.id) : n;
|
|
3146
|
-
}), r = n.findIndex((t) => t.id === e.id);
|
|
3147
|
-
if (r < 0) return;
|
|
3148
|
-
let i = n[r + t];
|
|
3149
|
-
if (!i) return;
|
|
3150
|
-
let a = this.shadowRoot;
|
|
3151
|
-
a && a.querySelector(`[data-event-id="${this.cssEscape(i.id)}"]`)?.focus({ preventScroll: !1 });
|
|
3152
|
-
}
|
|
3153
|
-
handleCellKeyDown(e) {
|
|
3154
|
-
let t = this.stateManager.getState();
|
|
3155
|
-
if (t.view === "month") {
|
|
3156
|
-
this.handleMonthCellKeyDown(e);
|
|
3157
|
-
return;
|
|
3158
|
-
}
|
|
3159
|
-
if (t.view === "year") {
|
|
3160
|
-
this.handleYearCellKeyDown(e);
|
|
3161
|
-
return;
|
|
3162
|
-
}
|
|
3163
|
-
if (t.focusedCell || this.initFocusedCellFromActive(), e.key === "F2" && t.view === "timeline") {
|
|
3164
|
-
let t = this.stateManager.getState().focusedResourceId;
|
|
3165
|
-
t && (e.preventDefault(), this.beginResourceRename(t));
|
|
3166
|
-
return;
|
|
3167
|
-
}
|
|
3168
|
-
let n = e.shiftKey, r = e.ctrlKey || e.metaKey, i = t.view === "timeline";
|
|
3169
|
-
switch (e.key) {
|
|
3170
|
-
case "ArrowUp":
|
|
3171
|
-
e.preventDefault(), i ? this.moveCellByResource(-1, n) : this.moveCellByTime(-1, n);
|
|
3172
|
-
break;
|
|
3173
|
-
case "ArrowDown":
|
|
3174
|
-
e.preventDefault(), i ? this.moveCellByResource(1, n) : this.moveCellByTime(1, n);
|
|
3175
|
-
break;
|
|
3176
|
-
case "ArrowLeft": {
|
|
3177
|
-
if (e.preventDefault(), !i) {
|
|
3178
|
-
this.moveCellByDay(-1, n);
|
|
3179
|
-
break;
|
|
3180
|
-
}
|
|
3181
|
-
let t = this.stateManager.getState().focusedCell?.start.getTime();
|
|
3182
|
-
this.moveCellByTime(-1, n);
|
|
3183
|
-
let r = this.stateManager.getState().focusedCell?.start.getTime();
|
|
3184
|
-
t !== void 0 && t === r && !n && this.focusRowTrigger();
|
|
3185
|
-
break;
|
|
3186
|
-
}
|
|
3187
|
-
case "ArrowRight":
|
|
3188
|
-
e.preventDefault(), i ? this.moveCellByTime(1, n) : this.moveCellByDay(1, n);
|
|
3189
|
-
break;
|
|
3190
|
-
case "Home":
|
|
3191
|
-
e.preventDefault(), r ? this.moveCellToViewExtreme("start", n) : this.moveCellToColumnExtreme("start", n);
|
|
3192
|
-
break;
|
|
3193
|
-
case "End":
|
|
3194
|
-
e.preventDefault(), r ? this.moveCellToViewExtreme("end", n) : this.moveCellToColumnExtreme("end", n);
|
|
3195
|
-
break;
|
|
3196
|
-
case "PageUp":
|
|
3197
|
-
e.preventDefault(), this.moveCellByPeriod(-1);
|
|
3198
|
-
break;
|
|
3199
|
-
case "PageDown":
|
|
3200
|
-
e.preventDefault(), this.moveCellByPeriod(1);
|
|
3201
|
-
break;
|
|
3202
|
-
case "Enter":
|
|
3203
|
-
e.preventDefault(), this.createEventFromCellOrSelection(e);
|
|
3204
|
-
break;
|
|
3205
|
-
case "Escape": e.preventDefault(), this.stateManager.clearSelection();
|
|
3206
|
-
}
|
|
3207
|
-
}
|
|
3208
|
-
initFocusedCellFromActive() {
|
|
3209
|
-
let e = this.shadowRoot?.activeElement;
|
|
3210
|
-
if (!e) return;
|
|
3211
|
-
let t = e.dataset.start, n = e.dataset.end;
|
|
3212
|
-
if (!t || !n) return;
|
|
3213
|
-
let r = {
|
|
3214
|
-
start: new Date(t),
|
|
3215
|
-
end: new Date(n)
|
|
3216
|
-
}, i = e.dataset.resourceId ?? null;
|
|
3217
|
-
this.stateManager.setFocusedCell(r, i, !0);
|
|
3218
|
-
}
|
|
3219
|
-
handleMonthCellKeyDown(e) {
|
|
3220
|
-
switch (this.syncFocusedDateFromActive(), e.key) {
|
|
3221
|
-
case "ArrowLeft":
|
|
3222
|
-
e.preventDefault(), this.moveFocusedDateByDays(-1);
|
|
3223
|
-
return;
|
|
3224
|
-
case "ArrowRight":
|
|
3225
|
-
e.preventDefault(), this.moveFocusedDateByDays(1);
|
|
3226
|
-
return;
|
|
3227
|
-
case "ArrowUp":
|
|
3228
|
-
e.preventDefault(), this.moveFocusedDateByDays(-7);
|
|
3229
|
-
return;
|
|
3230
|
-
case "ArrowDown":
|
|
3231
|
-
e.preventDefault(), this.moveFocusedDateByDays(7);
|
|
3232
|
-
return;
|
|
3233
|
-
case "PageUp":
|
|
3234
|
-
e.preventDefault(), this.moveFocusedDateByMonths(-1);
|
|
3235
|
-
return;
|
|
3236
|
-
case "PageDown":
|
|
3237
|
-
e.preventDefault(), this.moveFocusedDateByMonths(1);
|
|
3238
|
-
return;
|
|
3239
|
-
case "Enter":
|
|
3240
|
-
e.preventDefault(), this.commitFocusedDateAsCreate(e);
|
|
3241
|
-
return;
|
|
3242
|
-
case " ": {
|
|
3243
|
-
e.preventDefault();
|
|
3244
|
-
let t = this.stateManager.getState().focusedDate;
|
|
3245
|
-
t && this.openDayPopover(t);
|
|
3246
|
-
return;
|
|
3247
|
-
}
|
|
3248
|
-
}
|
|
3249
|
-
}
|
|
3250
|
-
handleYearCellKeyDown(e) {
|
|
3251
|
-
switch (this.syncFocusedDateFromActive(), e.key) {
|
|
3252
|
-
case "ArrowLeft":
|
|
3253
|
-
e.preventDefault(), this.moveFocusedDateByMonths(-1);
|
|
3254
|
-
return;
|
|
3255
|
-
case "ArrowRight":
|
|
3256
|
-
e.preventDefault(), this.moveFocusedDateByMonths(1);
|
|
3257
|
-
return;
|
|
3258
|
-
case "ArrowUp":
|
|
3259
|
-
e.preventDefault(), this.moveFocusedDateByMonths(-3);
|
|
3260
|
-
return;
|
|
3261
|
-
case "ArrowDown":
|
|
3262
|
-
e.preventDefault(), this.moveFocusedDateByMonths(3);
|
|
3263
|
-
return;
|
|
3264
|
-
case "PageUp":
|
|
3265
|
-
e.preventDefault(), this.moveFocusedDateByMonths(-12);
|
|
3266
|
-
return;
|
|
3267
|
-
case "PageDown":
|
|
3268
|
-
e.preventDefault(), this.moveFocusedDateByMonths(12);
|
|
3269
|
-
return;
|
|
3270
|
-
case "Enter": {
|
|
3271
|
-
e.preventDefault();
|
|
3272
|
-
let t = this.stateManager.getState().focusedDate;
|
|
3273
|
-
t && (this.stateManager.setDate(new Date(t)), this.stateManager.setView("month"));
|
|
3274
|
-
return;
|
|
3275
|
-
}
|
|
3276
|
-
case " ": {
|
|
3277
|
-
e.preventDefault();
|
|
3278
|
-
let t = this.stateManager.getState(), n = t.focusedDate ?? t.date;
|
|
3279
|
-
this.openDayPopover(n, void 0, "month");
|
|
3280
|
-
return;
|
|
3281
|
-
}
|
|
3282
|
-
}
|
|
3283
|
-
}
|
|
3284
|
-
syncFocusedDateFromActive() {
|
|
3285
|
-
let e = this.shadowRoot?.activeElement;
|
|
3286
|
-
if (!e) return;
|
|
3287
|
-
let t = e.dataset.date ?? e.dataset.month;
|
|
3288
|
-
t && this.stateManager.setFocusedDate(this.parseDayKey(t));
|
|
3289
|
-
}
|
|
3290
|
-
moveFocusedDateByDays(e) {
|
|
3291
|
-
let t = this.stateManager.getState(), n = t.focusedDate ?? t.date, r = new Date(n);
|
|
3292
|
-
r.setDate(r.getDate() + e), this.commitFocusedDate(r);
|
|
3293
|
-
}
|
|
3294
|
-
moveFocusedDateByMonths(e) {
|
|
3295
|
-
let t = this.stateManager.getState(), n = t.focusedDate ?? t.date, r = new Date(n);
|
|
3296
|
-
r.setMonth(r.getMonth() + e), this.commitFocusedDate(r);
|
|
3297
|
-
}
|
|
3298
|
-
commitFocusedDate(e) {
|
|
3299
|
-
let t = this.stateManager.getState(), n = null;
|
|
3300
|
-
t.view === "month" ? (e.getFullYear() !== t.date.getFullYear() || e.getMonth() !== t.date.getMonth()) && (n = e) : t.view === "year" && e.getFullYear() !== t.date.getFullYear() && (n = e), n && this.stateManager.setDate(new Date(n)), this.stateManager.setFocusedDate(e), this.scrollAndFocusDateCell(e), n && requestAnimationFrame(() => this.scrollAndFocusDateCell(e));
|
|
3301
|
-
}
|
|
3302
|
-
scrollAndFocusDateCell(e) {
|
|
3303
|
-
let t = this.stateManager.getState(), n = this.shadowRoot;
|
|
3304
|
-
if (!n) return;
|
|
3305
|
-
let r = `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}`, i = t.view === "year" ? `scheduler-cell-y-${r}` : `scheduler-cell-m-${r}-${String(e.getDate()).padStart(2, "0")}`, a = n.getElementById(i);
|
|
3306
|
-
a && (a.focus({ preventScroll: !0 }), typeof a.scrollIntoView == "function" && a.scrollIntoView({
|
|
3307
|
-
block: "nearest",
|
|
3308
|
-
inline: "nearest"
|
|
3309
|
-
}));
|
|
3310
|
-
}
|
|
3311
|
-
commitFocusedDateAsCreate(e) {
|
|
3312
|
-
let t = this.stateManager.getState(), n = t.focusedDate;
|
|
3313
|
-
if (!n) return;
|
|
3314
|
-
let r = new Date(n);
|
|
3315
|
-
r.setHours(0, 0, 0, 0);
|
|
3316
|
-
let i = new Date(r);
|
|
3317
|
-
i.setDate(i.getDate() + 1), !this.can("createEvent") || !this.allowsCreateAt({
|
|
3318
|
-
start: r,
|
|
3319
|
-
end: i
|
|
3320
|
-
}) ? this.announceDenied() : this.eventEmitter.emitEventCreate({
|
|
3321
|
-
start: r,
|
|
3322
|
-
end: i
|
|
3323
|
-
}, t.view, e);
|
|
3324
|
-
}
|
|
3325
|
-
moveCellByTime(e, t) {
|
|
3326
|
-
let n = this.stateManager.getState(), r = n.focusedCell;
|
|
3327
|
-
if (!r) return;
|
|
3328
|
-
let i = (n.options.slotDuration ?? 1800) * 1e3, a = new Date(r.start.getTime() + e * i), o = new Date(a.getTime() + i);
|
|
3329
|
-
this.cellIsWithinView(a, n) && this.commitFocusMove({
|
|
3330
|
-
start: a,
|
|
3331
|
-
end: o
|
|
3332
|
-
}, n.focusedResourceId, t);
|
|
3333
|
-
}
|
|
3334
|
-
moveCellByDay(e, t) {
|
|
3335
|
-
let n = this.stateManager.getState(), r = n.focusedCell;
|
|
3336
|
-
if (!r || n.view !== "week") return;
|
|
3337
|
-
let i = (n.options.slotDuration ?? 1800) * 1e3, a = new Date(r.start);
|
|
3338
|
-
a.setDate(a.getDate() + e);
|
|
3339
|
-
let o = new Date(a.getTime() + i);
|
|
3340
|
-
this.cellIsWithinView(a, n) && this.commitFocusMove({
|
|
3341
|
-
start: a,
|
|
3342
|
-
end: o
|
|
3343
|
-
}, null, t);
|
|
3344
|
-
}
|
|
3345
|
-
moveCellByResource(e, t) {
|
|
3346
|
-
let n = this.stateManager.getState(), r = n.focusedCell;
|
|
3347
|
-
if (!r || n.view !== "timeline" || t) return;
|
|
3348
|
-
let i = this.adjacentRow(n.focusedResourceId, e, n, !0);
|
|
3349
|
-
i !== void 0 && this.commitFocusMove(r, i, !1);
|
|
3350
|
-
}
|
|
3351
|
-
moveCellToColumnExtreme(e, t) {
|
|
3352
|
-
let n = this.stateManager.getState(), r = n.focusedCell;
|
|
3353
|
-
if (!r) return;
|
|
3354
|
-
let i = new Date(r.start);
|
|
3355
|
-
i.setHours(0, 0, 0, 0);
|
|
3356
|
-
let a = _.getTimeSlots(i, n.options.slotDuration, n.options.slotMinTime, n.options.slotMaxTime), o = e === "start" ? a[0] : a[a.length - 1];
|
|
3357
|
-
o && this.commitFocusMove(o, n.focusedResourceId, t);
|
|
3358
|
-
}
|
|
3359
|
-
moveCellToViewExtreme(e, t) {
|
|
3360
|
-
let n = this.stateManager.getState(), r = null, i = n.focusedResourceId;
|
|
3361
|
-
switch (n.view) {
|
|
3362
|
-
case "day": {
|
|
3363
|
-
let t = _.getTimeSlots(n.date, n.options.slotDuration, n.options.slotMinTime, n.options.slotMaxTime);
|
|
3364
|
-
r = e === "start" ? t[0] : t[t.length - 1];
|
|
3365
|
-
break;
|
|
3366
|
-
}
|
|
3367
|
-
case "week": {
|
|
3368
|
-
let t = _.getWeekDays(n.date, this.firstDayOfWeek()), i = e === "start" ? t[0] : t[6], a = _.getTimeSlots(i, n.options.slotDuration, n.options.slotMinTime, n.options.slotMaxTime);
|
|
3369
|
-
r = e === "start" ? a[0] : a[a.length - 1];
|
|
3370
|
-
break;
|
|
3371
|
-
}
|
|
3372
|
-
case "timeline": {
|
|
3373
|
-
let t = this.navigableRows(n, !0);
|
|
3374
|
-
if (t.length === 0) return;
|
|
3375
|
-
i = e === "start" ? t[0] : t[t.length - 1];
|
|
3376
|
-
let a = _.getWeekDays(n.date, this.firstDayOfWeek()), o = e === "start" ? a[0] : a[6], s = _.getTimeSlots(o, n.options.slotDuration, n.options.slotMinTime, n.options.slotMaxTime);
|
|
3377
|
-
r = e === "start" ? s[0] : s[s.length - 1];
|
|
3378
|
-
break;
|
|
3379
|
-
}
|
|
3380
|
-
}
|
|
3381
|
-
r && this.commitFocusMove(r, i, t);
|
|
3382
|
-
}
|
|
3383
|
-
moveCellByPeriod(e) {
|
|
3384
|
-
let t = this.stateManager.getState(), n = t.focusedCell, r = t.date;
|
|
3385
|
-
if (e > 0 ? this.next() : this.prev(), !n) return;
|
|
3386
|
-
let i = this.stateManager.getState(), a;
|
|
3387
|
-
if (i.view === "day") a = new Date(i.date), a.setHours(n.start.getHours(), n.start.getMinutes(), n.start.getSeconds(), 0);
|
|
3388
|
-
else {
|
|
3389
|
-
let e = _.getWeekDays(r, this.firstDayOfWeek()), t = _.getWeekDays(i.date, this.firstDayOfWeek()), o = e.findIndex((e) => _.isSameDay(e, n.start)), s = t[Math.max(0, o)] ?? t[0];
|
|
3390
|
-
a = new Date(s), a.setHours(n.start.getHours(), n.start.getMinutes(), n.start.getSeconds(), 0);
|
|
3391
|
-
}
|
|
3392
|
-
let o = (i.options.slotDuration ?? 1800) * 1e3, s = {
|
|
3393
|
-
start: a,
|
|
3394
|
-
end: new Date(a.getTime() + o)
|
|
412
|
+
this.properties = {
|
|
413
|
+
events: { attribute: !1 },
|
|
414
|
+
resources: { attribute: !1 },
|
|
415
|
+
options: { attribute: !1 },
|
|
416
|
+
readonly: {
|
|
417
|
+
type: Boolean,
|
|
418
|
+
converter: t(!1),
|
|
419
|
+
reflect: !0
|
|
420
|
+
},
|
|
421
|
+
eventEditor: {
|
|
422
|
+
type: Boolean,
|
|
423
|
+
converter: t(!0),
|
|
424
|
+
attribute: "event-editor"
|
|
425
|
+
},
|
|
426
|
+
locale: {
|
|
427
|
+
type: String,
|
|
428
|
+
converter: i(null)
|
|
429
|
+
},
|
|
430
|
+
firstDayOfWeek: {
|
|
431
|
+
type: Number,
|
|
432
|
+
converter: n(null),
|
|
433
|
+
attribute: "first-day-of-week"
|
|
434
|
+
},
|
|
435
|
+
slotDuration: {
|
|
436
|
+
type: Number,
|
|
437
|
+
converter: n(null),
|
|
438
|
+
attribute: "slot-duration"
|
|
439
|
+
},
|
|
440
|
+
timeFormat: {
|
|
441
|
+
type: String,
|
|
442
|
+
converter: i(null, ["12h", "24h"]),
|
|
443
|
+
attribute: "time-format"
|
|
444
|
+
},
|
|
445
|
+
view: {
|
|
446
|
+
type: String,
|
|
447
|
+
converter: i(null)
|
|
448
|
+
},
|
|
449
|
+
date: { attribute: !1 },
|
|
450
|
+
selectedEvent: { attribute: !1 },
|
|
451
|
+
selectedRange: { attribute: !1 }
|
|
3395
452
|
};
|
|
3396
|
-
this.commitFocusMove(s, t.focusedResourceId, !1);
|
|
3397
|
-
}
|
|
3398
|
-
commitFocusMove(e, t, n) {
|
|
3399
|
-
let r = this.stateManager.getState(), i = r.options.slotDuration ?? 1800;
|
|
3400
|
-
if (n) {
|
|
3401
|
-
this.stateManager.extendSelection(e, t), this.stateManager.setFocusedCell(e, t, !1);
|
|
3402
|
-
let n = this.stateManager.getState();
|
|
3403
|
-
this.liveAnnouncer.announce(P(n, i));
|
|
3404
|
-
} else {
|
|
3405
|
-
this.stateManager.setFocusedCell(e, t, !0);
|
|
3406
|
-
let n = this.getResourceTitle(t);
|
|
3407
|
-
this.liveAnnouncer.announce(N(e, r.options, n));
|
|
3408
|
-
}
|
|
3409
|
-
this.scrollAndFocusCell(e, t);
|
|
3410
|
-
}
|
|
3411
|
-
cellIsWithinView(e, t) {
|
|
3412
|
-
switch (t.view) {
|
|
3413
|
-
case "day": {
|
|
3414
|
-
let n = this.parseTimeOnDay(t.date, t.options.slotMinTime), r = this.parseTimeOnDay(t.date, t.options.slotMaxTime);
|
|
3415
|
-
return e.getTime() >= n.getTime() && e.getTime() < r.getTime();
|
|
3416
|
-
}
|
|
3417
|
-
case "week":
|
|
3418
|
-
case "timeline": {
|
|
3419
|
-
let n = _.getWeekDays(t.date, this.firstDayOfWeek()), r = this.parseTimeOnDay(n[0], t.options.slotMinTime), i = this.parseTimeOnDay(n[6], t.options.slotMaxTime);
|
|
3420
|
-
return e.getTime() >= r.getTime() && e.getTime() < i.getTime();
|
|
3421
|
-
}
|
|
3422
|
-
default: return !1;
|
|
3423
|
-
}
|
|
3424
|
-
}
|
|
3425
|
-
parseTimeOnDay(e, t) {
|
|
3426
|
-
let [n, r, i] = (t ?? "00:00:00").split(":").map(Number), a = new Date(e);
|
|
3427
|
-
return a.setHours(0, 0, 0, 0), a.setSeconds((n ?? 0) * 3600 + (r ?? 0) * 60 + (i ?? 0)), a;
|
|
3428
|
-
}
|
|
3429
|
-
adjacentRow(e, t, n, r) {
|
|
3430
|
-
let i = this.navigableRows(n, r);
|
|
3431
|
-
if (i.length === 0) return;
|
|
3432
|
-
let a = i.indexOf(e);
|
|
3433
|
-
if (a < 0) return i[0];
|
|
3434
|
-
let o = a + t;
|
|
3435
|
-
if (!(o < 0 || o >= i.length)) return i[o];
|
|
3436
453
|
}
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
cssEscape(e) {
|
|
3468
|
-
return typeof CSS < "u" && typeof CSS.escape == "function" ? CSS.escape(e) : e.replace(/[^a-zA-Z0-9_-]/g, (e) => `\\${e}`);
|
|
3469
|
-
}
|
|
3470
|
-
createEventFromCellOrSelection(e) {
|
|
3471
|
-
let t = this.stateManager.getState(), n = j(t), r, i, a;
|
|
3472
|
-
if (n) r = n.start, i = n.end, a = t.selectionResourceId ?? void 0;
|
|
3473
|
-
else if (t.focusedCell) r = t.focusedCell.start, i = t.focusedCell.end, a = t.focusedResourceId ?? void 0;
|
|
3474
|
-
else return;
|
|
3475
|
-
!this.can("createEvent") || !this.allowsCreateAt({
|
|
3476
|
-
start: r,
|
|
3477
|
-
end: i
|
|
3478
|
-
}, a) ? this.announceDenied() : (this.eventEmitter.emitEventCreate({
|
|
3479
|
-
start: r,
|
|
3480
|
-
end: i
|
|
3481
|
-
}, t.view, e, a), this.liveAnnouncer.announce(this.msg("selectionCommitted", {
|
|
3482
|
-
start: _.formatTime(r, t.options.timeFormat, t.options.locale),
|
|
3483
|
-
end: _.formatTime(i, t.options.timeFormat, t.options.locale)
|
|
3484
|
-
})));
|
|
3485
|
-
}
|
|
3486
|
-
enterEventMoveMode(e) {
|
|
3487
|
-
let t = e.resourceId ?? null;
|
|
3488
|
-
this.keyboardMove = {
|
|
3489
|
-
eventId: e.id,
|
|
3490
|
-
originalStart: new Date(e.start),
|
|
3491
|
-
originalEnd: new Date(e.end),
|
|
3492
|
-
workingStart: new Date(e.start),
|
|
3493
|
-
workingEnd: new Date(e.end),
|
|
3494
|
-
workingResourceId: t
|
|
3495
|
-
}, this.stateManager.setState({
|
|
3496
|
-
keyboardMoveEventId: e.id,
|
|
3497
|
-
previewEvent: {
|
|
3498
|
-
start: new Date(e.start),
|
|
3499
|
-
end: new Date(e.end),
|
|
3500
|
-
resourceId: t
|
|
3501
|
-
}
|
|
3502
|
-
});
|
|
3503
|
-
let n = this.minutesPerSlot(), r = this.stateManager.getState().view === "timeline";
|
|
3504
|
-
this.liveAnnouncer.announce(this.msg(r ? "moveModeEnteredTimeline" : "moveModeEntered", {
|
|
3505
|
-
title: e.title,
|
|
3506
|
-
minutes: n
|
|
3507
|
-
})), requestAnimationFrame(() => {
|
|
3508
|
-
let t = `[data-event-id="${this.cssEscape(e.id)}"]`;
|
|
3509
|
-
(this.shadowRoot?.querySelector(t))?.focus({ preventScroll: !0 });
|
|
3510
|
-
});
|
|
454
|
+
#e = new e(this, p, {
|
|
455
|
+
idPrefix: "mp-scheduler",
|
|
456
|
+
inputs: () => ({
|
|
457
|
+
events: this.events,
|
|
458
|
+
resources: this.resources,
|
|
459
|
+
options: this.options,
|
|
460
|
+
readonly: this.readonly,
|
|
461
|
+
eventEditor: this.eventEditor,
|
|
462
|
+
locale: this.locale,
|
|
463
|
+
firstDayOfWeek: this.firstDayOfWeek,
|
|
464
|
+
slotDuration: this.slotDuration,
|
|
465
|
+
timeFormat: this.timeFormat,
|
|
466
|
+
view: this.view,
|
|
467
|
+
date: this.date,
|
|
468
|
+
selectedEvent: this.selectedEvent,
|
|
469
|
+
selectedRange: this.selectedRange
|
|
470
|
+
}),
|
|
471
|
+
hostBag: (e) => ({
|
|
472
|
+
...e.view.root,
|
|
473
|
+
"data-mps": "scheduler"
|
|
474
|
+
}),
|
|
475
|
+
models: [
|
|
476
|
+
"view",
|
|
477
|
+
"date",
|
|
478
|
+
"selectedEvent",
|
|
479
|
+
"selectedRange"
|
|
480
|
+
]
|
|
481
|
+
});
|
|
482
|
+
constructor() {
|
|
483
|
+
super(), this.events = [], this.resources = [], this.options = null, this.readonly = !1, this.eventEditor = !0, this.locale = null, this.firstDayOfWeek = null, this.slotDuration = null, this.timeFormat = null, this.view = null, this.date = null, this.selectedEvent = null, this.selectedRange = null;
|
|
3511
484
|
}
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
if (e.key === "Escape") {
|
|
3515
|
-
e.preventDefault(), this.cancelEventMoveMode();
|
|
3516
|
-
return;
|
|
3517
|
-
}
|
|
3518
|
-
if (e.key === "Enter") {
|
|
3519
|
-
e.preventDefault(), this.commitEventMoveMode();
|
|
3520
|
-
return;
|
|
3521
|
-
}
|
|
3522
|
-
let t = this.stateManager.getState().view, n = t === "timeline", r = this.minutesPerSlot() * 60 * 1e3, i = e.shiftKey, a = e.altKey;
|
|
3523
|
-
switch (e.key) {
|
|
3524
|
-
case "ArrowUp":
|
|
3525
|
-
e.preventDefault(), n ? !i && !a && this.nudgeKeyboardMoveResource(-1) : i && a ? this.resizeKeyboardMoveEdge("start", -r) : i ? this.resizeKeyboardMoveEdge("end", -r) : this.nudgeKeyboardMove(-r);
|
|
3526
|
-
return;
|
|
3527
|
-
case "ArrowDown":
|
|
3528
|
-
e.preventDefault(), n ? !i && !a && this.nudgeKeyboardMoveResource(1) : i && a ? this.resizeKeyboardMoveEdge("start", +r) : i ? this.resizeKeyboardMoveEdge("end", +r) : this.nudgeKeyboardMove(+r);
|
|
3529
|
-
return;
|
|
3530
|
-
case "ArrowLeft":
|
|
3531
|
-
e.preventDefault(), n ? i && a ? this.resizeKeyboardMoveEdge("start", -r) : i ? this.resizeKeyboardMoveEdge("end", -r) : this.nudgeKeyboardMove(-r) : t === "week" && (i && a ? this.resizeKeyboardMoveEdge("start", -864e5) : i ? this.resizeKeyboardMoveEdge("end", -864e5) : this.nudgeKeyboardMove(-864e5));
|
|
3532
|
-
return;
|
|
3533
|
-
case "ArrowRight":
|
|
3534
|
-
e.preventDefault(), n ? i && a ? this.resizeKeyboardMoveEdge("start", +r) : i ? this.resizeKeyboardMoveEdge("end", +r) : this.nudgeKeyboardMove(+r) : t === "week" && (i && a ? this.resizeKeyboardMoveEdge("start", 864e5) : i ? this.resizeKeyboardMoveEdge("end", 864e5) : this.nudgeKeyboardMove(864e5));
|
|
3535
|
-
return;
|
|
3536
|
-
}
|
|
485
|
+
createRenderRoot() {
|
|
486
|
+
return this;
|
|
3537
487
|
}
|
|
3538
|
-
|
|
3539
|
-
|
|
3540
|
-
return Math.max(1, Math.round(e / 60));
|
|
488
|
+
render() {
|
|
489
|
+
return E({ ...this.#e.props() });
|
|
3541
490
|
}
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
let t = new Date(this.keyboardMove.workingStart.getTime() + e), n = new Date(this.keyboardMove.workingEnd.getTime() + e);
|
|
3545
|
-
this.keyboardMove.workingStart = t, this.keyboardMove.workingEnd = n, this.applyKeyboardMovePreview(), this.liveAnnouncer.announce(F(t, n, this.stateManager.getState().options));
|
|
491
|
+
next(...e) {
|
|
492
|
+
return this.#e.call("next", e);
|
|
3546
493
|
}
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
let t = this.adjacentRow(this.keyboardMove.workingResourceId, e, this.stateManager.getState(), !1);
|
|
3550
|
-
if (t === void 0) return;
|
|
3551
|
-
this.keyboardMove.workingResourceId = t, this.applyKeyboardMovePreview();
|
|
3552
|
-
let n = t === null ? this.msg("unassignedResource") : this.getResourceTitle(t) ?? t;
|
|
3553
|
-
this.liveAnnouncer.announce(this.msg("movedToResource", { resource: n }));
|
|
494
|
+
prev(...e) {
|
|
495
|
+
return this.#e.call("prev", e);
|
|
3554
496
|
}
|
|
3555
|
-
|
|
3556
|
-
|
|
3557
|
-
let n = this.getEventById(this.keyboardMove.eventId);
|
|
3558
|
-
if (!this.canResizeEdge(e, n)) {
|
|
3559
|
-
this.announceDenied();
|
|
3560
|
-
return;
|
|
3561
|
-
}
|
|
3562
|
-
let r = this.minutesPerSlot() * 60 * 1e3, i = this.keyboardMove.workingStart, a = this.keyboardMove.workingEnd;
|
|
3563
|
-
if (e === "end") {
|
|
3564
|
-
if (a = new Date(a.getTime() + t), a.getTime() - i.getTime() < r) return;
|
|
3565
|
-
} else if (i = new Date(i.getTime() + t), a.getTime() - i.getTime() < r) return;
|
|
3566
|
-
this.keyboardMove.workingStart = i, this.keyboardMove.workingEnd = a, this.applyKeyboardMovePreview(), this.liveAnnouncer.announce(ee(i, a, e, this.stateManager.getState().options));
|
|
497
|
+
today(...e) {
|
|
498
|
+
return this.#e.call("today", e);
|
|
3567
499
|
}
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
let { eventId: e, workingStart: t, workingEnd: n, workingResourceId: r } = this.keyboardMove;
|
|
3571
|
-
this.stateManager.setState({ previewEvent: {
|
|
3572
|
-
start: t,
|
|
3573
|
-
end: n,
|
|
3574
|
-
resourceId: r
|
|
3575
|
-
} }), requestAnimationFrame(() => {
|
|
3576
|
-
let n = this.shadowRoot;
|
|
3577
|
-
if (!n) return;
|
|
3578
|
-
n.querySelector(`[data-event-id="${this.cssEscape(e)}"]`)?.focus({ preventScroll: !0 });
|
|
3579
|
-
let i = this.timeCellElement(t, r);
|
|
3580
|
-
i && typeof i.scrollIntoView == "function" && i.scrollIntoView({
|
|
3581
|
-
block: "nearest",
|
|
3582
|
-
inline: "nearest"
|
|
3583
|
-
});
|
|
3584
|
-
});
|
|
500
|
+
gotoDate(...e) {
|
|
501
|
+
return this.#e.call("gotoDate", e);
|
|
3585
502
|
}
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
let e = this.getEventById(this.keyboardMove.eventId);
|
|
3589
|
-
if (e) {
|
|
3590
|
-
let t = {
|
|
3591
|
-
...e,
|
|
3592
|
-
start: this.keyboardMove.workingStart,
|
|
3593
|
-
end: this.keyboardMove.workingEnd
|
|
3594
|
-
};
|
|
3595
|
-
this.keyboardMove.workingResourceId === null ? delete t.resourceId : t.resourceId = this.keyboardMove.workingResourceId, this.stateManager.updateEvent(t), this.eventEmitter.emitEventUpdate(t, e, new CustomEvent("keyboard-move")), this.liveAnnouncer.announce(this.msg("moveCommitted"));
|
|
3596
|
-
}
|
|
3597
|
-
this.keyboardMove = null, this.stateManager.setState({
|
|
3598
|
-
keyboardMoveEventId: null,
|
|
3599
|
-
previewEvent: null
|
|
3600
|
-
}), requestAnimationFrame(() => {
|
|
3601
|
-
let t = `[data-event-id="${this.cssEscape(e?.id ?? "")}"]`;
|
|
3602
|
-
(this.shadowRoot?.querySelector(t))?.focus({ preventScroll: !1 });
|
|
3603
|
-
});
|
|
503
|
+
changeView(...e) {
|
|
504
|
+
return this.#e.call("changeView", e);
|
|
3604
505
|
}
|
|
3605
|
-
|
|
3606
|
-
|
|
3607
|
-
this.keyboardMove = null, this.stateManager.setState({
|
|
3608
|
-
keyboardMoveEventId: null,
|
|
3609
|
-
previewEvent: null
|
|
3610
|
-
}), this.liveAnnouncer.announce(this.msg("moveCancelled")), e && requestAnimationFrame(() => {
|
|
3611
|
-
let t = `[data-event-id="${this.cssEscape(e)}"]`;
|
|
3612
|
-
(this.shadowRoot?.querySelector(t))?.focus({ preventScroll: !1 });
|
|
3613
|
-
});
|
|
506
|
+
clearSelection(...e) {
|
|
507
|
+
return this.#e.call("clearSelection", e);
|
|
3614
508
|
}
|
|
3615
|
-
|
|
3616
|
-
this.
|
|
3617
|
-
this.currentView?.updateNowIndicator();
|
|
3618
|
-
}, 6e4);
|
|
509
|
+
addEvent(...e) {
|
|
510
|
+
return this.#e.call("addEvent", e);
|
|
3619
511
|
}
|
|
3620
|
-
|
|
3621
|
-
this.
|
|
512
|
+
updateEvent(...e) {
|
|
513
|
+
return this.#e.call("updateEvent", e);
|
|
3622
514
|
}
|
|
3623
|
-
|
|
3624
|
-
return this.
|
|
515
|
+
removeEvent(...e) {
|
|
516
|
+
return this.#e.call("removeEvent", e);
|
|
3625
517
|
}
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
return n ? this.getSlotFromElement(n) : null;
|
|
518
|
+
getEventById(...e) {
|
|
519
|
+
return this.#e.call("getEventById", e);
|
|
3629
520
|
}
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
if (!t || !n) return null;
|
|
3633
|
-
let r = e.dataset.resourceId ?? (e.dataset.unassigned ? null : void 0);
|
|
3634
|
-
return {
|
|
3635
|
-
start: new Date(t),
|
|
3636
|
-
end: new Date(n),
|
|
3637
|
-
...r === void 0 ? {} : { resourceId: r }
|
|
3638
|
-
};
|
|
521
|
+
refetchEvents(...e) {
|
|
522
|
+
return this.#e.call("refetchEvents", e);
|
|
3639
523
|
}
|
|
3640
524
|
};
|
|
3641
|
-
typeof
|
|
525
|
+
typeof document < "u" && document.head && c("scheduler", m), customElements.get("mp-scheduler") || customElements.define("mp-scheduler", D);
|
|
3642
526
|
//#endregion
|
|
3643
|
-
export {
|
|
527
|
+
export { D as MpScheduler, d as SchedulerStateManager, f as createInitialState, h as generateEventId, g as generateGroupId, _ as generateResourceId };
|