@sdcorejs/angular 21.3.5 → 21.3.6
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/assets/STYLE-GUIDE.md +78 -1
- package/assets/THEME.md +45 -3
- package/assets/scss/core/_popover-panel.scss +90 -0
- package/assets/scss/core/form.scss +5 -2
- package/assets/scss/core/utilities/_grid.scss +15 -0
- package/assets/scss/core/utilities/_sizing.scss +4 -0
- package/assets/scss/themes/_component-tokens.scss +9 -4
- package/assets/scss/themes/_semantic.scss +6 -5
- package/fesm2022/sdcorejs-angular-components-anchor.mjs +62 -3
- package/fesm2022/sdcorejs-angular-components-anchor.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-button.mjs +14 -6
- package/fesm2022/sdcorejs-angular-components-button.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-calendar.mjs +2479 -0
- package/fesm2022/sdcorejs-angular-components-calendar.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-components-card.mjs +486 -23
- package/fesm2022/sdcorejs-angular-components-card.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-editor-engine.mjs +1 -1
- package/fesm2022/sdcorejs-angular-components-editor-engine.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-file-explorer.mjs +4 -18
- package/fesm2022/sdcorejs-angular-components-file-explorer.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-form-generic.mjs +7 -7
- package/fesm2022/sdcorejs-angular-components-form-generic.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-import-excel.mjs +1 -1
- package/fesm2022/sdcorejs-angular-components-import-excel.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-kanban.mjs +833 -154
- package/fesm2022/sdcorejs-angular-components-kanban.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-modal.mjs +23 -7
- package/fesm2022/sdcorejs-angular-components-modal.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-query-bar.mjs +1312 -220
- package/fesm2022/sdcorejs-angular-components-query-bar.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-quick-action.mjs +68 -2
- package/fesm2022/sdcorejs-angular-components-quick-action.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-scheduler.mjs +1932 -0
- package/fesm2022/sdcorejs-angular-components-scheduler.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-components-side-drawer.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-side-drawer.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-tab-router.mjs +126 -26
- package/fesm2022/sdcorejs-angular-components-tab-router.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-tab.mjs +31 -2
- package/fesm2022/sdcorejs-angular-components-tab.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-table.mjs +615 -104
- package/fesm2022/sdcorejs-angular-components-table.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-timeline.mjs +473 -0
- package/fesm2022/sdcorejs-angular-components-timeline.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-components-tree.mjs +597 -36
- package/fesm2022/sdcorejs-angular-components-tree.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-upload-file.mjs +2 -4
- package/fesm2022/sdcorejs-angular-components-upload-file.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components.mjs +3 -1
- package/fesm2022/sdcorejs-angular-components.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-directives.mjs +109 -22
- package/fesm2022/sdcorejs-angular-directives.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-date.mjs +140 -42
- package/fesm2022/sdcorejs-angular-forms-date.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-datetime.mjs +70 -21
- package/fesm2022/sdcorejs-angular-forms-datetime.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-directives.mjs +4 -3
- package/fesm2022/sdcorejs-angular-forms-directives.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-entity-picker.mjs +1 -1
- package/fesm2022/sdcorejs-angular-forms-entity-picker.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-tree-select.mjs +1 -1
- package/fesm2022/sdcorejs-angular-forms-tree-select.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-i18n.mjs +622 -52
- package/fesm2022/sdcorejs-angular-i18n.mjs.map +1 -1
- package/fesm2022/{sdcorejs-angular-modules-generic-generic-configuration.page-BR6jxyYd.mjs → sdcorejs-angular-modules-generic-generic-configuration.page-BfvRoiKg.mjs} +3 -3
- package/fesm2022/{sdcorejs-angular-modules-generic-generic-configuration.page-BR6jxyYd.mjs.map → sdcorejs-angular-modules-generic-generic-configuration.page-BfvRoiKg.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-generic-generic-form-host.page-BsEL-y-M.mjs → sdcorejs-angular-modules-generic-generic-form-host.page-C9jW2AkB.mjs} +2 -2
- package/fesm2022/{sdcorejs-angular-modules-generic-generic-form-host.page-BsEL-y-M.mjs.map → sdcorejs-angular-modules-generic-generic-form-host.page-C9jW2AkB.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-generic-generic-list.page-qTFKh4UG.mjs → sdcorejs-angular-modules-generic-generic-list.page-BwGHv8k-.mjs} +3 -3
- package/fesm2022/{sdcorejs-angular-modules-generic-generic-list.page-qTFKh4UG.mjs.map → sdcorejs-angular-modules-generic-generic-list.page-BwGHv8k-.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-generic-sdcorejs-angular-modules-generic-Cq0GFfo1.mjs → sdcorejs-angular-modules-generic-sdcorejs-angular-modules-generic-BhUf_wyg.mjs} +4 -4
- package/fesm2022/{sdcorejs-angular-modules-generic-sdcorejs-angular-modules-generic-Cq0GFfo1.mjs.map → sdcorejs-angular-modules-generic-sdcorejs-angular-modules-generic-BhUf_wyg.mjs.map} +1 -1
- package/fesm2022/sdcorejs-angular-modules-generic.mjs +1 -1
- package/fesm2022/sdcorejs-angular-modules-layout.mjs +7 -2
- package/fesm2022/sdcorejs-angular-modules-layout.mjs.map +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-base-api.service-5uIBONB3.mjs → sdcorejs-angular-modules-pattern-base-api.service-VnxHofZl.mjs} +2 -2
- package/fesm2022/{sdcorejs-angular-modules-pattern-base-api.service-5uIBONB3.mjs.map → sdcorejs-angular-modules-pattern-base-api.service-VnxHofZl.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-create.component-CCHeD5tf.mjs → sdcorejs-angular-modules-pattern-create.component-7VOgxRio.mjs} +11 -7
- package/fesm2022/sdcorejs-angular-modules-pattern-create.component-7VOgxRio.mjs.map +1 -0
- package/fesm2022/{sdcorejs-angular-modules-pattern-create.component-B35CvNrI.mjs → sdcorejs-angular-modules-pattern-create.component-COnQ3U15.mjs} +2 -2
- package/fesm2022/{sdcorejs-angular-modules-pattern-create.component-B35CvNrI.mjs.map → sdcorejs-angular-modules-pattern-create.component-COnQ3U15.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-create.component-Cvxx5s1o.mjs → sdcorejs-angular-modules-pattern-create.component-CggApoVx.mjs} +2 -2
- package/fesm2022/{sdcorejs-angular-modules-pattern-create.component-Cvxx5s1o.mjs.map → sdcorejs-angular-modules-pattern-create.component-CggApoVx.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-customer.service-5hBM9st3.mjs → sdcorejs-angular-modules-pattern-customer.service-5th_X0wz.mjs} +2 -2
- package/fesm2022/{sdcorejs-angular-modules-pattern-customer.service-5hBM9st3.mjs.map → sdcorejs-angular-modules-pattern-customer.service-5th_X0wz.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-detail.component-BuvAy1by.mjs → sdcorejs-angular-modules-pattern-detail.component-BBqMMusi.mjs} +2 -2
- package/fesm2022/{sdcorejs-angular-modules-pattern-detail.component-BuvAy1by.mjs.map → sdcorejs-angular-modules-pattern-detail.component-BBqMMusi.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-detail.component-BcxxJCVt.mjs → sdcorejs-angular-modules-pattern-detail.component-LS8QNECh.mjs} +58 -55
- package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-LS8QNECh.mjs.map +1 -0
- package/fesm2022/{sdcorejs-angular-modules-pattern-flow.component-BDixzOA6.mjs → sdcorejs-angular-modules-pattern-flow.component-CQajWHBR.mjs} +3 -3
- package/fesm2022/{sdcorejs-angular-modules-pattern-flow.component-BDixzOA6.mjs.map → sdcorejs-angular-modules-pattern-flow.component-CQajWHBR.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-index.component-iRIG7WQo.mjs → sdcorejs-angular-modules-pattern-index.component-DHRtqSRm.mjs} +2 -2
- package/fesm2022/{sdcorejs-angular-modules-pattern-index.component-iRIG7WQo.mjs.map → sdcorejs-angular-modules-pattern-index.component-DHRtqSRm.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-lines-table-form.component-BqKJDK9M.mjs → sdcorejs-angular-modules-pattern-lines-table-form.component-DBPMTKqD.mjs} +5 -5
- package/fesm2022/{sdcorejs-angular-modules-pattern-lines-table-form.component-BqKJDK9M.mjs.map → sdcorejs-angular-modules-pattern-lines-table-form.component-DBPMTKqD.mjs.map} +1 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-CIkZmM47.mjs +501 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-CIkZmM47.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-CgKUBP46.mjs +506 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-CgKUBP46.mjs.map +1 -0
- package/fesm2022/{sdcorejs-angular-modules-pattern-list.component-Cj03DgF1.mjs → sdcorejs-angular-modules-pattern-list.component-Co22ltOo.mjs} +30 -39
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-Co22ltOo.mjs.map +1 -0
- package/fesm2022/{sdcorejs-angular-modules-pattern-list.component-DH3CroK1.mjs → sdcorejs-angular-modules-pattern-list.component-D1Q69_3M.mjs} +3 -3
- package/fesm2022/{sdcorejs-angular-modules-pattern-list.component-DH3CroK1.mjs.map → sdcorejs-angular-modules-pattern-list.component-D1Q69_3M.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-list.component-BMpOXn7E.mjs → sdcorejs-angular-modules-pattern-list.component-DBnStJM_.mjs} +3 -3
- package/fesm2022/{sdcorejs-angular-modules-pattern-list.component-BMpOXn7E.mjs.map → sdcorejs-angular-modules-pattern-list.component-DBnStJM_.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-mock-backend.factory-DnB5_C1D.mjs → sdcorejs-angular-modules-pattern-mock-backend.factory-DexrG-bI.mjs} +2 -2
- package/fesm2022/{sdcorejs-angular-modules-pattern-mock-backend.factory-DnB5_C1D.mjs.map → sdcorejs-angular-modules-pattern-mock-backend.factory-DexrG-bI.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-pattern-source-viewer-BqHwKfoc.mjs → sdcorejs-angular-modules-pattern-pattern-source-viewer-DuhyXsGn.mjs} +4 -22
- package/fesm2022/sdcorejs-angular-modules-pattern-pattern-source-viewer-DuhyXsGn.mjs.map +1 -0
- package/fesm2022/{sdcorejs-angular-modules-pattern-pattern-source.generated-CIiLOizq.mjs → sdcorejs-angular-modules-pattern-pattern-source.generated-bfpj85ke.mjs} +26 -27
- package/fesm2022/sdcorejs-angular-modules-pattern-pattern-source.generated-bfpj85ke.mjs.map +1 -0
- package/fesm2022/{sdcorejs-angular-modules-pattern-product.service-DZ3fY-yQ.mjs → sdcorejs-angular-modules-pattern-product.service-DG1pe8fb.mjs} +2 -2
- package/fesm2022/{sdcorejs-angular-modules-pattern-product.service-DZ3fY-yQ.mjs.map → sdcorejs-angular-modules-pattern-product.service-DG1pe8fb.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-profile.component-DVYnHOtn.mjs → sdcorejs-angular-modules-pattern-profile.component-CLvjGnbA.mjs} +24 -14
- package/fesm2022/sdcorejs-angular-modules-pattern-profile.component-CLvjGnbA.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-B8ceLXT4.mjs +65 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-B8ceLXT4.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-C1YBKLdb.mjs +56 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-C1YBKLdb.mjs.map +1 -0
- package/fesm2022/{sdcorejs-angular-modules-pattern-routes-BGZzmwY2.mjs → sdcorejs-angular-modules-pattern-routes-CntNjuzb.mjs} +3 -3
- package/fesm2022/{sdcorejs-angular-modules-pattern-routes-BGZzmwY2.mjs.map → sdcorejs-angular-modules-pattern-routes-CntNjuzb.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-routes-CdSiqJCz.mjs → sdcorejs-angular-modules-pattern-routes-CwfyLo_V.mjs} +5 -5
- package/fesm2022/{sdcorejs-angular-modules-pattern-routes-CdSiqJCz.mjs.map → sdcorejs-angular-modules-pattern-routes-CwfyLo_V.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-routes-B8i5MUtz.mjs → sdcorejs-angular-modules-pattern-routes-DAw75sbm.mjs} +8 -8
- package/fesm2022/{sdcorejs-angular-modules-pattern-routes-B8i5MUtz.mjs.map → sdcorejs-angular-modules-pattern-routes-DAw75sbm.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-routes-C_CLbNSs.mjs → sdcorejs-angular-modules-pattern-routes-DZmBTvxf.mjs} +3 -3
- package/fesm2022/{sdcorejs-angular-modules-pattern-routes-C_CLbNSs.mjs.map → sdcorejs-angular-modules-pattern-routes-DZmBTvxf.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-routes-uRsy0zag.mjs → sdcorejs-angular-modules-pattern-routes-Dp3-TMG3.mjs} +4 -4
- package/fesm2022/{sdcorejs-angular-modules-pattern-routes-uRsy0zag.mjs.map → sdcorejs-angular-modules-pattern-routes-Dp3-TMG3.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-routes-p7lQcGGX.mjs → sdcorejs-angular-modules-pattern-routes-WyOa9Q3H.mjs} +3 -3
- package/fesm2022/{sdcorejs-angular-modules-pattern-routes-p7lQcGGX.mjs.map → sdcorejs-angular-modules-pattern-routes-WyOa9Q3H.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-sdcorejs-angular-modules-pattern-els-Wxch.mjs → sdcorejs-angular-modules-pattern-sdcorejs-angular-modules-pattern-CsipDO_7.mjs} +12 -12
- package/fesm2022/{sdcorejs-angular-modules-pattern-sdcorejs-angular-modules-pattern-els-Wxch.mjs.map → sdcorejs-angular-modules-pattern-sdcorejs-angular-modules-pattern-CsipDO_7.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-shell.component-5G4lKoLv.mjs → sdcorejs-angular-modules-pattern-shell.component-Dy1a9seQ.mjs} +4 -4
- package/fesm2022/{sdcorejs-angular-modules-pattern-shell.component-5G4lKoLv.mjs.map → sdcorejs-angular-modules-pattern-shell.component-Dy1a9seQ.mjs.map} +1 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-CBpuQnHp.mjs +480 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-CBpuQnHp.mjs.map +1 -0
- package/fesm2022/{sdcorejs-angular-modules-pattern-update.component-CpGbjd_m.mjs → sdcorejs-angular-modules-pattern-update.component-B8N158up.mjs} +2 -2
- package/fesm2022/{sdcorejs-angular-modules-pattern-update.component-CpGbjd_m.mjs.map → sdcorejs-angular-modules-pattern-update.component-B8N158up.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-update.component-Bwsqvl4A.mjs → sdcorejs-angular-modules-pattern-update.component-BBktRBkQ.mjs} +9 -6
- package/fesm2022/sdcorejs-angular-modules-pattern-update.component-BBktRBkQ.mjs.map +1 -0
- package/fesm2022/{sdcorejs-angular-modules-pattern-update.component-Bq_5H0xM.mjs → sdcorejs-angular-modules-pattern-update.component-C9Wf6jhW.mjs} +2 -2
- package/fesm2022/{sdcorejs-angular-modules-pattern-update.component-Bq_5H0xM.mjs.map → sdcorejs-angular-modules-pattern-update.component-C9Wf6jhW.mjs.map} +1 -1
- package/fesm2022/sdcorejs-angular-modules-pattern.mjs +1 -1
- package/fesm2022/sdcorejs-angular-services-confirm.mjs +171 -158
- package/fesm2022/sdcorejs-angular-services-confirm.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-services-query-params.mjs +226 -0
- package/fesm2022/sdcorejs-angular-services-query-params.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-utilities-extensions.mjs +24 -1
- package/fesm2022/sdcorejs-angular-utilities-extensions.mjs.map +1 -1
- package/modules/pattern/README.md +5 -4
- package/modules/pattern/docs/detail.md +18 -9
- package/modules/pattern/docs/drawer.md +185 -83
- package/modules/pattern/docs/header-actions.md +1 -1
- package/modules/pattern/docs/list.md +3 -3
- package/modules/pattern/docs/states.md +1 -1
- package/modules/pattern/features/category/components/create-side-drawer/create-side-drawer.component.ts +12 -16
- package/modules/pattern/features/category/components/update-side-drawer/update-side-drawer.component.ts +58 -29
- package/modules/pattern/features/category/pages/list/list.component.html +11 -3
- package/modules/pattern/features/category/pages/list/list.component.ts +36 -10
- package/modules/pattern/features/category/routes.ts +5 -22
- package/modules/pattern/features/customer/components/create-side-drawer/create-side-drawer.component.ts +7 -11
- package/modules/pattern/features/customer/components/detail-side-drawer/detail-side-drawer.component.ts +70 -27
- package/modules/pattern/features/customer/components/summary-cards/summary-cards.component.ts +9 -53
- package/modules/pattern/features/customer/components/update-side-drawer/update-side-drawer.component.ts +53 -19
- package/modules/pattern/features/customer/entity.resolver.ts +1 -1
- package/modules/pattern/features/customer/pages/list/list.component.html +18 -3
- package/modules/pattern/features/customer/pages/list/list.component.ts +43 -16
- package/modules/pattern/features/customer/pages/profile/profile.component.ts +17 -8
- package/modules/pattern/features/customer/routes.ts +6 -27
- package/modules/pattern/features/order/components/approval-steps/approval-steps.component.ts +37 -56
- package/modules/pattern/features/order/components/summary-cards/summary-cards.component.ts +14 -76
- package/modules/pattern/features/order/pages/create/create.component.ts +7 -3
- package/modules/pattern/features/order/pages/detail/detail.component.ts +1 -1
- package/modules/pattern/features/order/pages/update/update.component.ts +5 -2
- package/package.json +17 -5
- package/types/sdcorejs-angular-components-anchor.d.ts +6 -1
- package/types/sdcorejs-angular-components-button.d.ts +7 -1
- package/types/sdcorejs-angular-components-calendar.d.ts +1092 -0
- package/types/sdcorejs-angular-components-card.d.ts +247 -9
- package/types/sdcorejs-angular-components-kanban.d.ts +191 -74
- package/types/sdcorejs-angular-components-modal.d.ts +10 -1
- package/types/sdcorejs-angular-components-query-bar.d.ts +176 -36
- package/types/sdcorejs-angular-components-quick-action.d.ts +65 -1
- package/types/sdcorejs-angular-components-scheduler.d.ts +544 -0
- package/types/sdcorejs-angular-components-tab.d.ts +6 -1
- package/types/sdcorejs-angular-components-table.d.ts +56 -7
- package/types/sdcorejs-angular-components-timeline.d.ts +216 -0
- package/types/sdcorejs-angular-components-tree.d.ts +119 -6
- package/types/sdcorejs-angular-components.d.ts +3 -1
- package/types/sdcorejs-angular-directives.d.ts +4 -2
- package/types/sdcorejs-angular-forms-date.d.ts +2 -0
- package/types/sdcorejs-angular-forms-directives.d.ts +1 -1
- package/types/sdcorejs-angular-i18n.d.ts +121 -9
- package/types/sdcorejs-angular-modules-layout.d.ts +2 -1
- package/types/sdcorejs-angular-services-confirm.d.ts +22 -81
- package/types/sdcorejs-angular-services-query-params.d.ts +67 -0
- package/types/sdcorejs-angular-utilities-extensions.d.ts +10 -1
- package/fesm2022/sdcorejs-angular-components-history.mjs +0 -54
- package/fesm2022/sdcorejs-angular-components-history.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-create-side-drawer.component-7d4hJjAo.mjs +0 -144
- package/fesm2022/sdcorejs-angular-modules-pattern-create-side-drawer.component-7d4hJjAo.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-create-side-drawer.component-CGkdzJ-A.mjs +0 -145
- package/fesm2022/sdcorejs-angular-modules-pattern-create-side-drawer.component-CGkdzJ-A.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-create.component-CCHeD5tf.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-customer.model-C3fr4yNw.mjs +0 -18
- package/fesm2022/sdcorejs-angular-modules-pattern-customer.model-C3fr4yNw.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-detail-side-drawer.component-Bza4JOdZ.mjs +0 -148
- package/fesm2022/sdcorejs-angular-modules-pattern-detail-side-drawer.component-Bza4JOdZ.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-BcxxJCVt.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-B9vCzIT6.mjs +0 -232
- package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-B9vCzIT6.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-BnROr-Wg.mjs +0 -87
- package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-BnROr-Wg.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-general-information-view.component-Cbwdhc0Z.mjs +0 -70
- package/fesm2022/sdcorejs-angular-modules-pattern-general-information-view.component-Cbwdhc0Z.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-B6_x5N3F.mjs +0 -164
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-B6_x5N3F.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-Cj03DgF1.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-D-pHPHFP.mjs +0 -118
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-D-pHPHFP.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-pattern-source-viewer-BqHwKfoc.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-pattern-source.generated-CIiLOizq.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-profile.component-DVYnHOtn.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-BPofy0Oq.mjs +0 -99
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-BPofy0Oq.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-CYeHFGl1.mjs +0 -74
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-CYeHFGl1.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-BF0hAVrv.mjs +0 -132
- package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-BF0hAVrv.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-DJeQxfDA.mjs +0 -143
- package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-DJeQxfDA.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-update.component-Bwsqvl4A.mjs.map +0 -1
- package/modules/pattern/features/category/entity.resolver.ts +0 -27
- package/types/sdcorejs-angular-components-history.d.ts +0 -23
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sdcorejs-angular-components-calendar.mjs","sources":["../../../projects/sdcorejs-angular/components/calendar/src/calendar-edge-scroll.ts","../../../projects/sdcorejs-angular/components/calendar/src/calendar.configuration.ts","../../../projects/sdcorejs-angular/components/calendar/src/calendar.utils.ts","../../../projects/sdcorejs-angular/components/calendar/src/calendar-format.ts","../../../projects/sdcorejs-angular/components/calendar/src/calendar-host.ts","../../../projects/sdcorejs-angular/components/calendar/src/calendar-loader.ts","../../../projects/sdcorejs-angular/components/calendar/src/calendar-move.ts","../../../projects/sdcorejs-angular/components/calendar/src/calendar.templates.ts","../../../projects/sdcorejs-angular/components/calendar/src/calendar.component.ts","../../../projects/sdcorejs-angular/components/calendar/src/calendar.component.html","../../../projects/sdcorejs-angular/components/calendar/sdcorejs-angular-components-calendar.ts"],"sourcesContent":["import type { NgZone } from '@angular/core';\n\n// Auto-scroll while dragging (calendar.md §9.3, scheduler.md §9.3), shared with sd-scheduler through the ɵ exports of\n// the entry point: sd-calendar scrolls its time grid vertically, sd-scheduler scrolls both axes.\n\n/** Distance (px) from an edge of the visible area where auto-scroll starts, and the top speed (px per frame). */\nconst EDGE = 40;\nconst EDGE_SPEED = 16;\n\n/** Part of the scroll area that shows content, in client coordinates (the sticky header and column left out). */\nexport interface SdCalendarEdgeArea {\n readonly top: number;\n readonly bottom: number;\n readonly left: number;\n readonly right: number;\n}\n\n/** Speed (px per frame) on one axis: negative within 40px of the start edge, positive within 40px of the end edge. */\nexport function sdCalendarEdgeSpeed(position: number, start: number, end: number): number {\n const before = position - start;\n const after = end - position;\n if (before >= 0 && before < EDGE) return -Math.ceil(((EDGE - before) / EDGE) * EDGE_SPEED);\n if (after >= 0 && after < EDGE) return Math.ceil(((EDGE - after) / EDGE) * EDGE_SPEED);\n return 0;\n}\n\n/**\n * One `requestAnimationFrame` loop outside the zone. `update` is called on every pointer move of a drag; while the\n * pointer stays near an edge the loop scrolls and calls `onFrame` (inside the zone) after each step.\n */\nexport class SdCalendarEdgeScroller {\n #frame = 0;\n\n constructor(private readonly zone: NgZone) {}\n\n update(\n scroller: HTMLElement | null | undefined,\n area: SdCalendarEdgeArea | null,\n pointer: { readonly x: number; readonly y: number } | null,\n axes: { readonly x: boolean; readonly y: boolean },\n onFrame: () => void\n ): void {\n if (!scroller || !area || !pointer) return this.stop();\n const dy = axes.y ? sdCalendarEdgeSpeed(pointer.y, area.top, area.bottom) : 0;\n const dx = axes.x ? sdCalendarEdgeSpeed(pointer.x, area.left, area.right) : 0;\n if (!dx && !dy) return this.stop();\n if (this.#frame || typeof requestAnimationFrame === 'undefined') return;\n const frame = (): void => {\n this.#frame = 0;\n scroller.scrollTop += dy;\n scroller.scrollLeft += dx;\n this.zone.run(onFrame);\n };\n this.#frame = this.zone.runOutsideAngular(() => requestAnimationFrame(frame));\n }\n\n stop(): void {\n if (this.#frame && typeof cancelAnimationFrame !== 'undefined') cancelAnimationFrame(this.#frame);\n this.#frame = 0;\n }\n}\n","import { InjectionToken } from '@angular/core';\nimport type { SdCalendarHoliday, SdCalendarWorkingHours } from './calendar.model';\n\n/** App-wide defaults of `<sd-calendar>`. An input of the calendar wins over this configuration. */\nexport interface ISdCalendarConfiguration {\n /** 0–6, 0 is Sunday. Defaults to `1` (Monday). */\n firstDayOfWeek?: number;\n /** Minutes of one slot, a divisor of 60 (5, 10, 15, 20, 30, 60). Defaults to `30`. */\n step?: number;\n /** `null` turns the off-hours shading off. Defaults to Monday–Friday 08:00–12:00 and 13:00–17:30. */\n workingHours?: SdCalendarWorkingHours | null;\n /** Defaults to none. */\n holidays?: readonly SdCalendarHoliday[];\n /** `'HH:mm'` scrolled to when the week or day view opens. Defaults to the earliest working hour on screen. */\n scrollTime?: string;\n}\n\nexport const SD_CALENDAR_CONFIGURATION = new InjectionToken<ISdCalendarConfiguration>('sd-calendar.configuration');\n\nconst WORKDAY = [\n { from: '08:00', to: '12:00' },\n { from: '13:00', to: '17:30' },\n] as const;\n\n/** @internal Built-in defaults, shared with `sd-scheduler`. Not covered by SemVer. */\nexport const ɵSD_CALENDAR_DEFAULTS = {\n firstDayOfWeek: 1,\n step: 30,\n agendaDays: 14,\n scrollTime: '08:00',\n workingHours: { 1: WORKDAY, 2: WORKDAY, 3: WORKDAY, 4: WORKDAY, 5: WORKDAY } as SdCalendarWorkingHours,\n} as const;\n","import { ɵsdNormalizeCalendarDay, sdSerializeTemporalValue, type SdTemporalValueTransform } from '@sdcorejs/angular/forms/models';\nimport { sdTimeToMinutes } from '@sdcorejs/angular/forms/time';\nimport { ɵSD_CALENDAR_DEFAULTS, type ISdCalendarConfiguration } from './calendar.configuration';\nimport type {\n SdCalendarDateInput,\n SdCalendarEvent,\n SdCalendarHoliday,\n SdCalendarRange,\n SdCalendarView,\n SdCalendarVisibleRange,\n SdCalendarWorkingHours,\n} from './calendar.model';\n\n/**\n * Pure helpers of `sd-calendar`, shared with `sd-scheduler` through the `ɵ` exports of the entry point.\n *\n * A calendar day is the string `'yyyy/MM/dd'` (it sorts as text) and a time of day is a number of wall-clock\n * minutes, 0–1440. Day arithmetic works on year/month/day numbers only: never on instants, never by adding\n * 24 hours, so a 23- or 25-hour DST day cannot move a date.\n */\n\n/** The part of `SdDateTimeService` the pure helpers need; pass the service itself. */\nexport interface SdCalendarClock {\n readonly timeZone: string;\n toFormat(value: unknown, format: string): string;\n parse(value: unknown): Date | null;\n parseFrom(value: unknown, format: string): Date | null;\n beginOfNextDay(value: unknown): Date | null;\n}\n\nexport interface SdCalendarDayParts {\n readonly year: number;\n readonly month: number;\n readonly day: number;\n}\n\n/** What the visible range depends on. `date` is the anchor day `'yyyy/MM/dd'`. */\nexport interface SdCalendarRangeInput {\n readonly view: SdCalendarView;\n readonly date: string;\n readonly firstDayOfWeek: number;\n readonly hideWeekends: boolean;\n readonly agendaDays: number;\n}\n\n/** A span of wall-clock minutes inside one day, end exclusive. */\nexport interface SdCalendarSpan {\n readonly start: number;\n readonly end: number;\n}\n\n/** Column of one timed event inside its overlap cluster; `index` points into the input. */\nexport interface SdCalendarStacked {\n readonly index: number;\n readonly column: number;\n readonly columns: number;\n}\n\n/** Days covered by a bar, both ends included. */\nexport interface SdCalendarDaySpan {\n readonly firstDay: string;\n readonly lastDay: string;\n}\n\n/** One bar of the all-day row: `from`/`to` are indexes of the visible days; `index` points into the input. */\nexport interface SdCalendarBar {\n readonly index: number;\n readonly row: number;\n readonly from: number;\n readonly to: number;\n readonly clippedStart: boolean;\n readonly clippedEnd: boolean;\n}\n\nexport interface SdCalendarAllDayLayout {\n /** Bars of the rows on screen, in layout order. */\n readonly bars: readonly SdCalendarBar[];\n /** Rows on screen. */\n readonly rows: number;\n /** Bars left out, per visible day (\"+N\"). */\n readonly more: readonly number[];\n}\n\n/** Where an event sits, read in the zone of the clock. */\nexport interface SdCalendarPlacement {\n readonly allDay: boolean;\n /** Drawn in the time grid; `false` for all-day events and timed events that cross midnight. */\n readonly inGrid: boolean;\n readonly startDay: string;\n readonly startMinutes: number;\n /** Timed: the day of the end; an end at midnight of the next day reads as `startDay` at 1440. All-day: last day. */\n readonly endDay: string;\n readonly endMinutes: number;\n /** Days covered, both included. */\n readonly firstDay: string;\n readonly lastDay: string;\n /** Epoch milliseconds; all-day events span from the start of the first day to the start of the day after the last. */\n readonly startInstant: number;\n readonly endInstant: number;\n}\n\nconst DAY = /^(\\d{4})\\/(\\d{2})\\/(\\d{2})$/;\nconst MINUTES_PER_DAY = 1440;\n\n/** Slot lengths `step` accepts: the divisors of 60 a time grid can draw. */\nexport const SD_CALENDAR_STEPS: readonly number[] = [5, 10, 15, 20, 30, 60];\n\nconst pad = (value: number, length = 2): string => String(value).padStart(length, '0');\n\n/** Year, month and day of `'yyyy/MM/dd'`; `null` for anything else, including an impossible date. */\nexport function sdCalendarDayParts(day: string): SdCalendarDayParts | null {\n const match = DAY.exec(day);\n if (!match) return null;\n const [year, month, date] = [Number(match[1]), Number(match[2]), Number(match[3])];\n return sdCalendarDay(year, month, date) === day ? { year, month, day: date } : null;\n}\n\n/** `'yyyy/MM/dd'` of the given numbers; overflowing months and days roll over like `Date` does. */\nexport function sdCalendarDay(year: number, month: number, day: number): string {\n // why: UTC fields carry plain calendar arithmetic (no zone, no DST); the instant itself is never used.\n const date = new Date(0);\n date.setUTCFullYear(year, month - 1, day);\n return `${pad(date.getUTCFullYear(), 4)}/${pad(date.getUTCMonth() + 1)}/${pad(date.getUTCDate())}`;\n}\n\nconst partsOf = (day: string): SdCalendarDayParts => {\n const parts = sdCalendarDayParts(day);\n if (!parts) throw new Error(`[sd-calendar] invalid day \"${day}\"`);\n return parts;\n};\n\nexport function sdCalendarAddDays(day: string, days: number): string {\n const { year, month, day: date } = partsOf(day);\n return sdCalendarDay(year, month, date + days);\n}\n\n/** First day of the month `months` away from the month of `day`. */\nexport function sdCalendarAddMonths(day: string, months: number): string {\n const { year, month } = partsOf(day);\n return sdCalendarDay(year, month + months, 1);\n}\n\n/** The same day number `months` away, clamped to the last day of that month (month view PageUp/PageDown). */\nexport function sdCalendarAddMonthsKeepDay(day: string, months: number): string {\n const { year, month, day: date } = partsOf(day);\n const last = sdCalendarDayParts(sdCalendarDay(year, month + months + 1, 0))!.day;\n return sdCalendarDay(year, month + months, Math.min(date, last));\n}\n\n/** 0 (Sunday) – 6 (Saturday). */\nexport function sdCalendarWeekday(day: string): number {\n const { year, month, day: date } = partsOf(day);\n const utc = new Date(0);\n utc.setUTCFullYear(year, month - 1, date);\n return utc.getUTCDay();\n}\n\n/** Number of days from `from` to `to` (negative when `to` is earlier). */\nexport function sdCalendarDayDiff(from: string, to: string): number {\n const epochDay = (day: string): number => {\n const { year, month, day: date } = partsOf(day);\n const utc = new Date(0);\n utc.setUTCFullYear(year, month - 1, date);\n return Math.round(utc.getTime() / 86_400_000);\n };\n return epochDay(to) - epochDay(from);\n}\n\nexport function sdCalendarStartOfWeek(day: string, firstDayOfWeek: number): string {\n return sdCalendarAddDays(day, -((sdCalendarWeekday(day) - firstDayOfWeek + 7) % 7));\n}\n\nexport function sdCalendarIsWeekend(day: string): boolean {\n const weekday = sdCalendarWeekday(day);\n return weekday === 0 || weekday === 6;\n}\n\n/** `agendaDays` kept in 1–62; not a number → 14. */\nexport function sdCalendarClampAgendaDays(days: number): number {\n if (!Number.isFinite(days)) return 14;\n return Math.min(62, Math.max(1, Math.floor(days)));\n}\n\n/** `step` when it is one of `SD_CALENDAR_STEPS`, otherwise `null`. */\nexport function sdCalendarNormalizeStep(step: number): number | null {\n return SD_CALENDAR_STEPS.includes(step) ? step : null;\n}\n\n/** Granularity of moving and resizing: `min(step, 15)`. */\nexport function sdCalendarMoveStep(step: number): number {\n return Math.min(step, 15);\n}\n\n/** Every day from `from` to `to`, both included. */\nexport function sdCalendarDaysBetween(from: string, to: string): string[] {\n const days: string[] = [];\n for (let day = from; day <= to; day = sdCalendarAddDays(day, 1)) days.push(day);\n return days;\n}\n\nconst daysBetween = sdCalendarDaysBetween;\n\n/** Full weeks of the month view (4–6 rows), weekends left out when `hideWeekends`. */\nexport function sdCalendarMonthWeeks(input: SdCalendarRangeInput): string[][] {\n const first = sdCalendarAddMonths(input.date, 0);\n const last = sdCalendarAddDays(sdCalendarAddMonths(input.date, 1), -1);\n const weeks: string[][] = [];\n for (let start = sdCalendarStartOfWeek(first, input.firstDayOfWeek); start <= last; start = sdCalendarAddDays(start, 7)) {\n const week = daysBetween(start, sdCalendarAddDays(start, 6));\n weeks.push(input.hideWeekends ? week.filter(day => !sdCalendarIsWeekend(day)) : week);\n }\n return weeks;\n}\n\n/** Days on screen, in order. Day and agenda views ignore `hideWeekends`. */\nexport function sdCalendarVisibleDays(input: SdCalendarRangeInput): string[] {\n switch (input.view) {\n case 'month':\n return sdCalendarMonthWeeks(input).flat();\n case 'week': {\n const start = sdCalendarStartOfWeek(input.date, input.firstDayOfWeek);\n const week = daysBetween(start, sdCalendarAddDays(start, 6));\n return input.hideWeekends ? week.filter(day => !sdCalendarIsWeekend(day)) : week;\n }\n case 'agenda':\n return daysBetween(input.date, sdCalendarAddDays(input.date, sdCalendarClampAgendaDays(input.agendaDays) - 1));\n default:\n return [input.date];\n }\n}\n\n/** First and last day on screen (both included) and the view. */\nexport function sdCalendarVisibleRange(input: SdCalendarRangeInput): SdCalendarVisibleRange {\n const days = sdCalendarVisibleDays(input);\n return { from: days[0], to: days[days.length - 1], view: input.view };\n}\n\n/** Anchor day after \"Previous\" (`-1`) or \"Next\" (`1`): ±7 days, ±1 day, ±1 month on day 1, ±`agendaDays` days. */\nexport function sdCalendarShiftDate(input: SdCalendarRangeInput, direction: 1 | -1): string {\n switch (input.view) {\n case 'month':\n return sdCalendarAddMonths(input.date, direction);\n case 'week':\n return sdCalendarAddDays(input.date, 7 * direction);\n case 'agenda':\n return sdCalendarAddDays(input.date, sdCalendarClampAgendaDays(input.agendaDays) * direction);\n default:\n return sdCalendarAddDays(input.date, direction);\n }\n}\n\n/**\n * Columns of overlapping timed events of one day (§8.4): sorted by start, longer first on a tie; a cluster grows\n * while an event starts before the latest end so far; each event takes the first column that is free by its\n * start; every event of a cluster shares its column count. Output order is the sorted order (the DOM order).\n */\nexport function sdCalendarStack(items: readonly SdCalendarSpan[]): SdCalendarStacked[] {\n const order = items.map((item, index) => ({ item, index })).sort((a, b) => a.item.start - b.item.start || b.item.end - a.item.end);\n const result: { index: number; column: number; columns: number }[] = [];\n let cluster: { index: number; column: number; columns: number }[] = [];\n let columnEnds: number[] = [];\n let clusterEnd = -Infinity;\n const close = (): void => {\n for (const entry of cluster) entry.columns = columnEnds.length;\n result.push(...cluster);\n cluster = [];\n columnEnds = [];\n clusterEnd = -Infinity;\n };\n for (const { item, index } of order) {\n if (item.start >= clusterEnd) close();\n let column = columnEnds.findIndex(end => end <= item.start);\n if (column < 0) column = columnEnds.push(item.end) - 1;\n else columnEnds[column] = item.end;\n cluster.push({ index, column, columns: 0 });\n clusterEnd = Math.max(clusterEnd, item.end);\n }\n close();\n return result;\n}\n\n/**\n * Rows of the all-day band (§7) over `days`. Bars sort by first day, then the longer first; each takes the first\n * row that is free at its first visible day. Rows from `maxRows` on are left out and counted per day in `more`.\n */\nexport function sdCalendarAllDayLayout(items: readonly SdCalendarDaySpan[], days: readonly string[], maxRows = 3): SdCalendarAllDayLayout {\n const more = days.map(() => 0);\n const bars: SdCalendarBar[] = [];\n if (!days.length) return { bars, rows: 0, more };\n const first = days[0];\n const last = days[days.length - 1];\n const order = items\n .map((item, index) => ({ item, index }))\n .sort(\n (a, b) =>\n (a.item.firstDay < b.item.firstDay ? -1 : a.item.firstDay > b.item.firstDay ? 1 : 0) ||\n sdCalendarDayDiff(b.item.firstDay, b.item.lastDay) - sdCalendarDayDiff(a.item.firstDay, a.item.lastDay)\n );\n const rowEnds: number[] = [];\n for (const { item, index } of order) {\n const from = days.findIndex(day => day >= item.firstDay);\n let to = days.length - 1;\n while (to >= 0 && days[to] > item.lastDay) to--;\n if (from < 0 || to < from) continue;\n let row = rowEnds.findIndex(end => end < from);\n if (row < 0) row = rowEnds.push(to) - 1;\n else rowEnds[row] = to;\n if (row >= maxRows) {\n for (let day = from; day <= to; day++) more[day]++;\n continue;\n }\n bars.push({ index, row, from, to, clippedStart: item.firstDay < first, clippedEnd: item.lastDay > last });\n }\n return { bars, rows: Math.min(rowEnds.length, maxRows), more };\n}\n\nconst clampMinutes = (minutes: number): number => Math.min(MINUTES_PER_DAY, Math.max(0, minutes));\n\n/** The slot of `step` minutes under `minutes`: a click or a tap. */\nexport function sdCalendarSlot(minutes: number, step: number): SdCalendarSpan {\n const start = Math.min(MINUTES_PER_DAY - step, Math.floor(clampMinutes(minutes) / step) * step);\n return { start, end: start + step };\n}\n\n/** Span swept from `anchor` to `current` minutes: `[min, max + step]`, kept inside the day. */\nexport function sdCalendarSweep(anchor: number, current: number, step: number): SdCalendarSpan {\n const a = sdCalendarSlot(anchor, step).start;\n const b = sdCalendarSlot(current, step).start;\n return { start: Math.min(a, b), end: Math.min(MINUTES_PER_DAY, Math.max(a, b) + step) };\n}\n\n/** New start of a block dragged by `delta` minutes: `delta` rounded to `moveStep`, kept in `[0, 1440 − duration]`. */\nexport function sdCalendarSnapMove(start: number, delta: number, duration: number, moveStep: number): number {\n const next = start + Math.round(delta / moveStep) * moveStep;\n return Math.min(MINUTES_PER_DAY - duration, Math.max(0, next));\n}\n\n/** New end of a block whose bottom edge moved by `delta`: at least 15 minutes (one step under 15) long, at most 24:00. */\nexport function sdCalendarResizeEnd(start: number, end: number, delta: number, step: number): number {\n const next = end + Math.round(delta / sdCalendarMoveStep(step)) * sdCalendarMoveStep(step);\n return Math.min(MINUTES_PER_DAY, Math.max(start + Math.min(step, 15), next));\n}\n\n/** `'HH:mm'`; 1440 reads `'24:00'`. */\nexport function sdCalendarClockText(minutes: number): string {\n return `${pad(Math.floor(minutes / 60))}:${pad(minutes % 60)}`;\n}\n\n/** Minutes of `'HH:mm'` as `sd-time` reads it, plus `'24:00'` for the end of the day. */\nexport function sdCalendarTimeToMinutes(value: unknown): number | null {\n if (typeof value === 'string' && value.trim() === '24:00') return MINUTES_PER_DAY;\n return sdTimeToMinutes(value);\n}\n\n/**\n * Working spans of a weekday, sorted. `null` hours → `null` (no shading). A weekday without hours is a day off\n * (`[]`). A span without both ends, or whose end is not after its start, is left out.\n */\nexport function sdCalendarWorkingRanges(hours: SdCalendarWorkingHours | null, weekday: number): SdCalendarSpan[] | null {\n if (hours === null) return null;\n const spans: SdCalendarSpan[] = [];\n for (const range of hours[weekday as 0 | 1 | 2 | 3 | 4 | 5 | 6] ?? []) {\n const start = sdCalendarTimeToMinutes(range.from);\n const end = sdCalendarTimeToMinutes(range.to);\n if (start !== null && end !== null && end > start) spans.push({ start, end });\n }\n return spans.sort((a, b) => a.start - b.start);\n}\n\n/** Off-hours spans of a day: the complement of the working spans. `null` (no shading) → none. */\nexport function sdCalendarOffSegments(working: readonly SdCalendarSpan[] | null): SdCalendarSpan[] {\n if (working === null) return [];\n const off: SdCalendarSpan[] = [];\n let cursor = 0;\n for (const span of working) {\n if (span.start > cursor) off.push({ start: cursor, end: span.start });\n cursor = Math.max(cursor, span.end);\n }\n if (cursor < MINUTES_PER_DAY) off.push({ start: cursor, end: MINUTES_PER_DAY });\n return off;\n}\n\n/** First `scrollTop` of the time grid: half an hour above `minutes`, never above the top. */\nexport function sdCalendarInitialScroll(minutes: number, hourHeight: number): number {\n return (Math.max(0, minutes - 30) / 60) * hourHeight;\n}\n\n/** Calendar day of a date-like value, read like `sd-date` reads its model (an instant takes its day in the zone). */\nexport function sdCalendarReadDay(value: unknown, clock: SdCalendarClock): string | null {\n if (value === 'TODAY') return null;\n return ɵsdNormalizeCalendarDay(value, clock);\n}\n\nconst WALL_CLOCK = 'yyyy/MM/dd HH:mm';\n\n/**\n * Wall-clock day and minutes of a value in the clock's zone.\n *\n * why: read as text (`toFormat`), not through `SdDateTimeService.toWallClock`: that carrier is a local `Date`, and a\n * wall clock that falls in a DST gap of the browser's own zone (02:30 on a spring-forward day) would shift by an hour.\n */\nexport function sdCalendarReadWallClock(value: unknown, clock: SdCalendarClock): { day: string; minutes: number } | null {\n if (value === null || value === undefined || value === '') return null;\n const text = clock.toFormat(value, WALL_CLOCK);\n if (!text) return null;\n return { day: text.slice(0, 10), minutes: Number(text.slice(11, 13)) * 60 + Number(text.slice(14, 16)) };\n}\n\n/**\n * Where an event sits (§5). `null` when a date cannot be read or a timed event does not end after its start (a\n * timed event needs an `end`). A timed event that ends after midnight of its start day goes to the all-day row; one\n * that ends exactly at that midnight stays in the grid with an end of 1440.\n */\nexport function sdCalendarPlace(event: SdCalendarEvent, clock: SdCalendarClock): SdCalendarPlacement | null {\n if (event.allDay) {\n const firstDay = sdCalendarReadDay(event.start, clock);\n const hasEnd = event.end !== null && event.end !== undefined && event.end !== '';\n const lastDay = hasEnd ? sdCalendarReadDay(event.end, clock) : firstDay;\n if (!firstDay || !lastDay || lastDay < firstDay) return null;\n // A day read back by `sdCalendarReadDay` always parses.\n const startInstant = clock.parse(firstDay)!.getTime();\n const endInstant = clock.beginOfNextDay(lastDay)!.getTime();\n return {\n allDay: true,\n inGrid: false,\n startDay: firstDay,\n startMinutes: 0,\n endDay: lastDay,\n endMinutes: MINUTES_PER_DAY,\n firstDay,\n lastDay,\n startInstant,\n endInstant,\n };\n }\n const start = sdCalendarReadWallClock(event.start, clock);\n const end = sdCalendarReadWallClock(event.end, clock);\n const startInstant = clock.parse(event.start)?.getTime();\n const endInstant = clock.parse(event.end)?.getTime();\n const nextDay = clock.beginOfNextDay(event.start)?.getTime();\n if (!start || !end || startInstant === undefined || endInstant === undefined || nextDay === undefined || endInstant <= startInstant)\n return null;\n if (endInstant <= nextDay) {\n // Ends the same day, or exactly at midnight of the next one (24:00).\n const endMinutes = end.day === start.day ? end.minutes : MINUTES_PER_DAY;\n return {\n allDay: false,\n inGrid: true,\n startDay: start.day,\n startMinutes: start.minutes,\n endDay: start.day,\n endMinutes,\n firstDay: start.day,\n lastDay: start.day,\n startInstant,\n endInstant,\n };\n }\n return {\n allDay: false,\n inGrid: false,\n startDay: start.day,\n startMinutes: start.minutes,\n endDay: end.day,\n endMinutes: end.minutes,\n firstDay: start.day,\n lastDay: end.minutes > 0 ? end.day : sdCalendarAddDays(end.day, -1),\n startInstant,\n endInstant,\n };\n}\n\n/** Instant of a wall clock (`minutes` may be 1440: midnight of the next day) in the clock's zone. */\nfunction instantOf(day: string, minutes: number, clock: SdCalendarClock): Date {\n // why: parsed from text in the zone (`parseFrom`), like the reading above, so no local carrier sits in between.\n return clock.parseFrom(`${sdCalendarSerialize(day, minutes, clock, null).slice(0, 16)}`, WALL_CLOCK)!;\n}\n\n/**\n * Value the calendar emits for a wall clock (§5). Without `transform`: `'yyyy/MM/dd HH:mm:ss'`, or `'yyyy/MM/dd'`\n * when `minutes` is `null` (all-day). With `transform`: the instant of that wall clock in the zone, serialized by\n * `sdSerializeTemporalValue` like `sd-date` and `sd-datetime` (an all-day value is the start of its day).\n */\nexport function sdCalendarSerialize(\n day: string,\n minutes: number | null,\n clock: SdCalendarClock,\n transform: SdTemporalValueTransform | null | undefined\n): string {\n if (transform) return sdSerializeTemporalValue(instantOf(day, minutes ?? 0, clock), transform)!;\n if (minutes === null) return day;\n const target = minutes >= MINUTES_PER_DAY ? sdCalendarAddDays(day, 1) : day;\n const rest = minutes % MINUTES_PER_DAY;\n return `${target} ${pad(Math.floor(rest / 60))}:${pad(rest % 60)}:00`;\n}\n\n/** The current span of a placed event, serialized like a new one so `request.from` and `request.to` match. */\nexport function sdCalendarRangeOf(\n placement: Pick<SdCalendarPlacement, 'allDay' | 'startDay' | 'startMinutes' | 'endDay' | 'endMinutes'>,\n clock: SdCalendarClock,\n transform: SdTemporalValueTransform | null | undefined\n): SdCalendarRange {\n if (placement.allDay) {\n return {\n start: sdCalendarSerialize(placement.startDay, null, clock, transform),\n end: sdCalendarSerialize(placement.endDay, null, clock, transform),\n allDay: true,\n };\n }\n return {\n start: sdCalendarSerialize(placement.startDay, placement.startMinutes, clock, transform),\n end: sdCalendarSerialize(placement.endDay, placement.endMinutes, clock, transform),\n allDay: false,\n };\n}\n\n// ---- configuration and small helpers shared with sd-scheduler ----\n\n/** Where an event should go: wall clock of its start and end in the zone. */\nexport interface SdCalendarTarget {\n readonly allDay: boolean;\n readonly startDay: string;\n readonly startMinutes: number;\n readonly endDay: string;\n readonly endMinutes: number;\n}\n\n/** The target of a placed event where it is now. */\nexport function sdCalendarTargetOf(placement: SdCalendarTarget): SdCalendarTarget {\n return {\n allDay: placement.allDay,\n startDay: placement.startDay,\n startMinutes: placement.startMinutes,\n endDay: placement.endDay,\n endMinutes: placement.endMinutes,\n };\n}\n\n/** The target of a placement moved by whole days, its times and kind kept. */\nexport function sdCalendarShiftDays(placement: SdCalendarTarget, days: number): SdCalendarTarget {\n return {\n allDay: placement.allDay,\n startDay: sdCalendarAddDays(placement.startDay, days),\n startMinutes: placement.startMinutes,\n endDay: sdCalendarAddDays(placement.endDay, days),\n endMinutes: placement.endMinutes,\n };\n}\n\n/**\n * Target of `move(id, to)` (calendar.md §4.3): `to.allDay` (default `allDay`) picks the kind. All-day: the days of\n * `to`, the duration in days kept without `to.end`. Timed: the span of `to`, or its start with the duration kept.\n * `null` when a value cannot be read or the end is before the start.\n */\nexport function sdCalendarMoveTarget(\n placement: Pick<SdCalendarPlacement, 'firstDay' | 'lastDay' | 'startInstant' | 'endInstant'>,\n to: { readonly start: SdCalendarDateInput; readonly end?: SdCalendarDateInput | null; readonly allDay?: boolean },\n allDay: boolean,\n clock: SdCalendarClock\n): SdCalendarTarget | null {\n if (to.allDay ?? allDay) {\n const startDay = sdCalendarReadDay(to.start, clock);\n if (!startDay) return null;\n const endDay = to.end\n ? sdCalendarReadDay(to.end, clock)\n : sdCalendarAddDays(startDay, sdCalendarDayDiff(placement.firstDay, placement.lastDay));\n return endDay && endDay >= startDay ? { allDay: true, startDay, startMinutes: 0, endDay, endMinutes: 1440 } : null;\n }\n if (to.end !== null && to.end !== undefined) {\n const next = sdCalendarPlace({ id: 'move', title: 'move', start: to.start, end: to.end }, clock);\n return next ? sdCalendarTargetOf(next) : null;\n }\n const start = sdCalendarReadWallClock(to.start, clock);\n if (!start) return null;\n const total = start.minutes + Math.round((placement.endInstant - placement.startInstant) / 60_000);\n const days = Math.floor((total - 1) / MINUTES_PER_DAY);\n return {\n allDay: false,\n startDay: start.day,\n startMinutes: start.minutes,\n endDay: sdCalendarAddDays(start.day, days),\n endMinutes: total - days * MINUTES_PER_DAY,\n };\n}\n\n/** Last calendar day a target covers (an end at 00:00 belongs to the day before). */\nexport function sdCalendarLastDayOf(target: SdCalendarTarget): string {\n if (target.allDay || target.endDay === target.startDay || target.endMinutes > 0) return target.endDay;\n return sdCalendarAddDays(target.endDay, -1);\n}\n\n/** `step`: the input, then the configuration, then 30; a length that is not a divisor of 60 falls back to 30. */\nexport function sdCalendarResolveStep(value: number | undefined, configuration: ISdCalendarConfiguration | null): number {\n return sdCalendarNormalizeStep(value ?? configuration?.step ?? ɵSD_CALENDAR_DEFAULTS.step) ?? 30;\n}\n\n/** `firstDayOfWeek`: the input, then the configuration, then Monday; anything but 0–6 is Monday. */\nexport function sdCalendarResolveFirstDayOfWeek(value: number | undefined, configuration: ISdCalendarConfiguration | null): number {\n const day = value ?? configuration?.firstDayOfWeek ?? ɵSD_CALENDAR_DEFAULTS.firstDayOfWeek;\n return Number.isInteger(day) && day >= 0 && day <= 6 ? day : ɵSD_CALENDAR_DEFAULTS.firstDayOfWeek;\n}\n\n/** `workingHours`: the input (`null` included), then the configuration, then Monday–Friday. */\nexport function sdCalendarResolveWorkingHours(\n value: SdCalendarWorkingHours | null | undefined,\n configuration: ISdCalendarConfiguration | null\n): SdCalendarWorkingHours | null {\n if (value !== undefined) return value;\n const configured = configuration?.workingHours;\n return configured !== undefined ? configured : ɵSD_CALENDAR_DEFAULTS.workingHours;\n}\n\n/** Holidays by calendar day (the input, then the configuration); an unreadable date is left out, the first one wins. */\nexport function sdCalendarHolidayMap(\n value: readonly SdCalendarHoliday[] | undefined,\n configuration: ISdCalendarConfiguration | null,\n clock: SdCalendarClock\n): Map<string, SdCalendarHoliday> {\n const map = new Map<string, SdCalendarHoliday>();\n for (const holiday of value ?? configuration?.holidays ?? []) {\n const day = sdCalendarReadDay(holiday.date, clock);\n if (day && !map.has(day)) map.set(day, holiday);\n }\n return map;\n}\n\n/** Day of `minDate` / `maxDate`: `'TODAY'` is `today`; an empty value is no bound. */\nexport function sdCalendarBoundDay(\n value: SdCalendarDateInput | 'TODAY' | null | undefined,\n today: string,\n clock: SdCalendarClock\n): string | null {\n if (value === null || value === undefined || value === '') return null;\n return value === 'TODAY' ? today : sdCalendarReadDay(value, clock);\n}\n\n/** `day` is before `minDay` or after `maxDay` (a `null` bound does not limit). */\nexport function sdCalendarOutOfRange(day: string, minDay: string | null, maxDay: string | null): boolean {\n return (!!minDay && day < minDay) || (!!maxDay && day > maxDay);\n}\n\n/** `'yyyy/MM/dd'` of a carrier (a local `Date` whose fields are a wall clock of the zone). */\nexport function sdCalendarCarrierDay(carrier: Date): string {\n return sdCalendarDay(carrier.getFullYear(), carrier.getMonth() + 1, carrier.getDate());\n}\n\n/** Identity of a visible range; two ranges with the same key are the same range. */\nexport function sdCalendarRangeKey(\n range: SdCalendarVisibleRange | { readonly view: string; readonly from: string; readonly to: string }\n): string {\n return `${range.view}|${range.from}|${range.to}`;\n}\n\nexport function sdCalendarSameList(a: readonly string[], b: readonly string[]): boolean {\n return a.length === b.length && a.every((value, index) => value === b[index]);\n}\n\n/** Client point of a mouse or touch event (the first touch, or the first changed one on `touchend`). */\nexport function sdCalendarPointOf(event: MouseEvent | TouchEvent): { x: number; y: number } | null {\n if ('touches' in event) {\n const touch = event.touches[0] ?? event.changedTouches[0];\n return touch ? { x: touch.clientX, y: touch.clientY } : null;\n }\n return { x: event.clientX, y: event.clientY };\n}\n\n/** Duplicate, empty or non-string ids, or an empty title: the data set is refused (calendar §5, scheduler §12). */\nexport function sdCalendarInvalidItems(items: readonly { readonly id: unknown; readonly title: unknown }[]): boolean {\n const seen = new Set<string>();\n for (const item of items) {\n if (typeof item.id !== 'string' || !item.id || seen.has(item.id) || typeof item.title !== 'string' || !item.title.trim()) return true;\n seen.add(item.id);\n }\n return false;\n}\n\nconst PALETTE = new Set(['primary', 'secondary', 'info', 'success', 'warning', 'error']);\n\n/** `data-color` of an item (§8.1): a palette name as is, any other CSS colour as `custom` with the value aside. */\nexport function sdCalendarColor(color: string | undefined): { readonly color: string; readonly customColor: string | null } {\n const value = color ?? 'primary';\n return PALETTE.has(value) ? { color: value, customColor: null } : { color: 'custom', customColor: value };\n}\n\n/** A day off: an `off` holiday, or a weekday without working hours (never with `null` hours). */\nexport function sdCalendarIsOffDay(\n day: string,\n holiday: SdCalendarHoliday | null | undefined,\n hours: SdCalendarWorkingHours | null\n): boolean {\n if (holiday?.type === 'off') return true;\n const working = sdCalendarWorkingRanges(hours, sdCalendarWeekday(day));\n return working !== null && working.length === 0;\n}\n\n/** Weekdays of `hours` with a range that `sdCalendarWorkingRanges` leaves out (a dev-mode warning). */\nexport function sdCalendarBrokenWeekdays(hours: SdCalendarWorkingHours | null | undefined): number[] {\n if (!hours) return [];\n return Object.entries(hours)\n .filter(([weekday, ranges]) => sdCalendarWorkingRanges(hours, Number(weekday))!.length !== (ranges ?? []).length)\n .map(([weekday]) => Number(weekday));\n}\n\n/** SC-27: the selected id is no longer in the loaded items (only once the load settled). */\nexport function sdCalendarSelectionGone(selected: string | null, phase: string, items: readonly { readonly id: string }[]): boolean {\n return selected !== null && phase === 'idle' && !items.some(item => item.id === selected);\n}\n\n/** An id inside an attribute selector. */\nexport function sdCalendarCssEscape(value: string): string {\n return typeof CSS !== 'undefined' && CSS.escape ? CSS.escape(value) : value.replace(/[\"\\\\]/g, '\\\\$&');\n}\n","import type { SdCalendarMoveSource } from './calendar.model';\nimport { sdCalendarClockText, sdCalendarDay, sdCalendarDayParts } from './calendar.utils';\n\n// Date names of the toolbar title, the labels and the live region (calendar.md §6, §15), shared with sd-scheduler\n// through the ɵ exports of the entry point so both components name a day the same way.\n\n/** `Intl` formatters of one locale; build them once per locale (a `computed` on the i18n locale). */\nexport interface SdCalendarFormats {\n /** English names months (\"Oct 22\"); other languages write numeric dates (\"22/10\"). */\n readonly named: boolean;\n readonly weekday: Intl.DateTimeFormat;\n readonly monthShort: Intl.DateTimeFormat;\n readonly monthLong: Intl.DateTimeFormat;\n readonly date: Intl.DateTimeFormat;\n readonly dateYear: Intl.DateTimeFormat;\n}\n\n/** Translation function of `I18nService.t`. */\nexport type SdCalendarTranslate = (key: string, params?: Record<string, string | number>) => string;\n\n/** What the title names: a month, one day, a week of the calendar or any other span of days. */\nexport type SdCalendarTitleKind = 'month' | 'day' | 'week' | 'range';\n\nexport function sdCalendarFormats(locale: string, language: string): SdCalendarFormats {\n const named = language === 'en';\n const format = (options: Intl.DateTimeFormatOptions): Intl.DateTimeFormat =>\n new Intl.DateTimeFormat(locale, { ...options, timeZone: 'UTC' });\n return {\n named,\n weekday: format({ weekday: 'long' }),\n monthShort: format({ month: 'short' }),\n monthLong: format({ month: 'long' }),\n date: format(named ? { month: 'short', day: 'numeric' } : { day: '2-digit', month: '2-digit' }),\n dateYear: format(named ? { month: 'short', day: 'numeric', year: 'numeric' } : { day: '2-digit', month: '2-digit', year: 'numeric' }),\n };\n}\n\n/** Noon UTC of a calendar day, only to name it with `Intl` in `timeZone: 'UTC'`. */\nexport function sdCalendarUtcDay(day: string): Date {\n const { year, month, day: date } = sdCalendarDayParts(day)!;\n const value = new Date(0);\n value.setUTCFullYear(year, month - 1, date);\n value.setUTCHours(12);\n return value;\n}\n\nexport function sdCalendarWeekdayLong(formats: SdCalendarFormats, day: string): string {\n return formats.weekday.format(sdCalendarUtcDay(day));\n}\n\n/**\n * Short date of a day: \"Oct 22\" / \"Oct 22, 2026\" in English, otherwise the numeric parts in the order of the\n * locale joined by \"/\" (\"22/10/2026\", \"2026/10/22\").\n *\n * why: `Intl` writes vi-VN numeric dates with \"-\" in current Chromium, while the design shows \"22/10\".\n */\nexport function sdCalendarDateText(formats: SdCalendarFormats, day: string, withYear: boolean): string {\n const format = withYear ? formats.dateYear : formats.date;\n if (formats.named) return format.format(sdCalendarUtcDay(day));\n return format\n .formatToParts(sdCalendarUtcDay(day))\n .filter(part => part.type === 'day' || part.type === 'month' || part.type === 'year')\n .map(part => part.value)\n .join('/');\n}\n\n/**\n * Toolbar title. `month` names the month of `anchor`; `day` the day `from`; `week` the days `from`–`to` in one\n * month (\"19–25 Thg 10, 2026\"), and any span across months or a `range` falls back to \"22/10 – 04/11/2026\".\n */\nexport function sdCalendarTitle(\n kind: SdCalendarTitleKind,\n span: { readonly anchor: string; readonly from: string; readonly to: string },\n formats: SdCalendarFormats,\n t: SdCalendarTranslate\n): string {\n const anchor = sdCalendarDayParts(span.anchor)!;\n if (kind === 'month') {\n return t('core.component.calendar.title-month', {\n month: anchor.month,\n monthName: formats.monthLong.format(sdCalendarUtcDay(sdCalendarDay(anchor.year, anchor.month, 1))),\n year: anchor.year,\n });\n }\n if (kind === 'day') {\n return t('core.component.calendar.title-day', {\n weekday: sdCalendarWeekdayLong(formats, span.from),\n day: anchor.day,\n month: anchor.month,\n monthName: formats.monthLong.format(sdCalendarUtcDay(span.from)),\n year: anchor.year,\n });\n }\n const a = sdCalendarDayParts(span.from)!;\n const b = sdCalendarDayParts(span.to)!;\n if (kind === 'week' && a.year === b.year && a.month === b.month) {\n return t('core.component.calendar.title-week', {\n from: a.day,\n to: b.day,\n month: a.month,\n monthName: formats.monthShort.format(sdCalendarUtcDay(span.from)),\n year: a.year,\n });\n }\n return t('core.component.calendar.title-range', {\n from: sdCalendarDateText(formats, span.from, a.year !== b.year),\n to: sdCalendarDateText(formats, span.to, true),\n });\n}\n\n/**\n * Live-region text of an accepted move (calendar.md §15): \"resized\" when only the end changed (or the move was a\n * resize), otherwise \"moved\" with the new day and time.\n */\nexport function sdCalendarMovedText(\n title: string,\n target: { readonly allDay: boolean; readonly startDay: string; readonly startMinutes: number; readonly endMinutes: number },\n from: { readonly start: string; readonly end: string },\n to: { readonly start: string; readonly end: string },\n source: SdCalendarMoveSource,\n formats: SdCalendarFormats,\n t: SdCalendarTranslate\n): string {\n if (source === 'resize' || (from.start === to.start && from.end !== to.end)) {\n return t('core.component.calendar.resized', {\n title,\n start: sdCalendarClockText(target.startMinutes),\n end: sdCalendarClockText(target.endMinutes),\n });\n }\n return t('core.component.calendar.moved', {\n title,\n weekday: sdCalendarWeekdayLong(formats, target.startDay),\n date: sdCalendarDateText(formats, target.startDay, false),\n time: target.allDay ? t('core.component.calendar.all-day') : sdCalendarClockText(target.startMinutes),\n });\n}\n","import { isDevMode, signal, untracked, type NgZone } from '@angular/core';\n\n// Host plumbing shared by sd-calendar and sd-scheduler through the ɵ exports of the entry point: the width of the host\n// (compact layout, SC-32), the one-minute clock of the now line, and the dev-mode diagnostics.\n\n/** Width of the host from a `ResizeObserver` (SC-32); `null` until known, and always without `ResizeObserver` (SSR, tests). */\nexport class SdCalendarHostWidth {\n readonly #width = signal<number | null>(null);\n readonly width = this.#width.asReadonly();\n readonly #observer: ResizeObserver | null;\n\n constructor(\n private readonly host: HTMLElement,\n zone: NgZone\n ) {\n this.#observer =\n typeof ResizeObserver === 'undefined'\n ? null\n : new ResizeObserver(entries => {\n const width = entries[entries.length - 1]?.contentRect.width;\n if (width !== undefined && width !== untracked(this.#width)) zone.run(() => this.#width.set(width));\n });\n this.#observer?.observe(host);\n }\n\n /** Width before the first observer callback, so the first render already fits a narrow host. */\n measureOnce(): void {\n if (untracked(this.#width) !== null || typeof ResizeObserver === 'undefined') return;\n const width = this.host.getBoundingClientRect().width;\n if (width > 0) this.#width.set(width);\n }\n\n disconnect(): void {\n this.#observer?.disconnect();\n }\n}\n\n/**\n * Calls `tick` every minute while running, outside the zone so the timer does not run change detection; `tick` itself\n * enters the zone.\n */\nexport class SdCalendarMinuteTimer {\n #timer: ReturnType<typeof setInterval> | null = null;\n\n constructor(\n private readonly zone: NgZone,\n private readonly tick: () => void\n ) {}\n\n /** Starts or stops the timer. */\n run(active: boolean): void {\n if (!active) return this.stop();\n if (this.#timer !== null) return;\n this.#timer = this.zone.runOutsideAngular(() => setInterval(() => this.zone.run(this.tick), 60_000));\n }\n\n stop(): void {\n if (this.#timer !== null) clearInterval(this.#timer);\n this.#timer = null;\n }\n}\n\n/** Logs a dev-mode diagnostic once per instance and key, with the component's prefix (`[sd-calendar]`). */\nexport class SdCalendarReporter {\n readonly #reported = new Set<string>();\n\n constructor(private readonly prefix: string) {}\n\n report(level: 'error' | 'warn', key: string, message: string): void {\n if (!isDevMode() || this.#reported.has(key)) return;\n this.#reported.add(key);\n console[level](`${this.prefix} ${message}`);\n }\n}\n\n/** The element is laid out right-to-left. */\nexport function sdCalendarIsRtl(element: Element): boolean {\n return getComputedStyle(element).direction === 'rtl';\n}\n","import { signal } from '@angular/core';\n\n// Lifecycle of `dataSource.onLoad` (SHARED-CONTRACT SC-22 … SC-24, calendar.md §13), shared with sd-scheduler through\n// the ɵ exports of the entry point.\n\n/** `loading`: first load or a new range (the grid is empty); `reloading`: same range, the items stay. */\nexport type SdCalendarLoadPhase = 'idle' | 'loading' | 'reloading' | 'error';\n\nexport class SdCalendarLoader<T> {\n /** Items of the last successful load; updated in place by accepted creates and moves. */\n readonly items = signal<readonly T[]>([]);\n readonly phase = signal<SdCalendarLoadPhase>('idle');\n /** At least one load succeeded: later loads show the progress bar only, never the skeleton. */\n readonly everLoaded = signal(false);\n #controller: AbortController | null = null;\n #key: string | null = null;\n\n /**\n * Aborts the running load and calls `call` for `key`. A different key clears the items first; the same key keeps\n * them until the result arrives. A late or aborted result is dropped. `onError` runs for a real failure only, after\n * the items were cleared (§13).\n */\n async load(\n key: string,\n call: (signal: AbortSignal) => readonly T[] | Promise<readonly T[]>,\n onError: (error: unknown) => void\n ): Promise<void> {\n const keep = key === this.#key;\n this.#controller?.abort();\n const controller = new AbortController();\n this.#controller = controller;\n this.#key = key;\n if (!keep) this.items.set([]);\n this.phase.set(keep && this.everLoaded() ? 'reloading' : 'loading');\n let items: readonly T[];\n try {\n items = await call(controller.signal);\n } catch (error) {\n if (this.#controller !== controller || controller.signal.aborted) return;\n this.#controller = null;\n this.items.set([]);\n this.phase.set('error');\n onError(error);\n return;\n }\n // why: a newer key, option or reload aborted this request; its late result must not replace newer data.\n if (this.#controller !== controller || controller.signal.aborted) return;\n this.#controller = null;\n this.items.set(Array.isArray(items) ? items : []);\n this.everLoaded.set(true);\n this.phase.set('idle');\n }\n\n /** Aborts the running load (destroy). */\n abort(): void {\n this.#controller?.abort();\n this.#controller = null;\n }\n}\n","import { afterNextRender, computed, effect, signal, untracked, type Injector } from '@angular/core';\nimport type { SdCalendarMoveScope, SdCalendarMoveSource, SdCalendarState } from './calendar.model';\n\n// Pieces of the create and move pipelines (calendar.md §9.2, §9.5, SHARED-CONTRACT §3) that do not depend on the\n// calendar's layout, so sd-scheduler reuses them through the ɵ exports of the entry point.\n\n/** What one `onMove` call ended with. `aborted`: the request was cancelled before or after it answered (SC-15). */\nexport type SdCalendarMoveOutcome =\n | { readonly kind: 'accepted' }\n | { readonly kind: 'rejected' }\n | { readonly kind: 'cancelled' }\n | { readonly kind: 'error'; readonly error: unknown }\n | { readonly kind: 'aborted' };\n\n/** Evaluates a capability flag; an omitted flag allows (SC-05, SC-06). */\nexport function sdCalendarAllows<C>(state: SdCalendarState<C> | undefined, context: C): boolean {\n if (state === undefined) return true;\n return typeof state === 'function' ? state(context) : state;\n}\n\n/**\n * Calls `onMove` and classifies its answer (SC-09 … SC-13): `true` or nothing accepts, `false` rejects, `'cancel'`\n * cancels, a throw or a rejection is an error. Any answer that arrives after `request.signal` was aborted is `aborted`.\n */\nexport async function sdCalendarCallMove<R extends { readonly signal: AbortSignal }>(\n onMove: (request: R) => boolean | 'cancel' | void | Promise<boolean | 'cancel' | void>,\n request: R\n): Promise<SdCalendarMoveOutcome> {\n let result: boolean | 'cancel' | void;\n try {\n result = await onMove(request);\n } catch (error) {\n return request.signal.aborted ? { kind: 'aborted' } : { kind: 'error', error };\n }\n // why: a range change, reload, new option, lock or destroy aborted the request; its late answer must not apply.\n if (request.signal.aborted) return { kind: 'aborted' };\n if (result === 'cancel') return { kind: 'cancelled' };\n if (result === false) return { kind: 'rejected' };\n return { kind: 'accepted' };\n}\n\n/** One waiting create or move per component (SC-14): a second `begin` is refused until the first one ends. */\nexport class SdCalendarOperation<K extends string> {\n readonly #current = signal<{ readonly kind: K; readonly controller: AbortController } | null>(null);\n /** Kind of the waiting operation, or `null`. */\n readonly kind = computed(() => this.#current()?.kind ?? null);\n readonly busy = computed(() => this.#current() !== null);\n\n /** Starts an operation and returns its signal, or `null` while another one waits. */\n begin(kind: K): AbortSignal | null {\n if (this.#current()) return null;\n const controller = new AbortController();\n this.#current.set({ kind, controller });\n return controller.signal;\n }\n\n /** Ends the operation of `signal`; a stale signal is ignored. */\n end(signal: AbortSignal): void {\n if (this.#current()?.controller.signal === signal) this.#current.set(null);\n }\n\n /** Aborts the waiting operation when its kind is one of `kinds` (all kinds when omitted). Returns whether it did. */\n abort(kinds?: readonly K[]): boolean {\n const current = this.#current();\n if (!current || (kinds && !kinds.includes(current.kind))) return false;\n current.controller.abort();\n this.#current.set(null);\n return true;\n }\n}\n\n/** One move handed to `SdCalendarMoveRunner`: what is specific to the component (calendar.md §9.5, scheduler.md §9.5). */\nexport interface SdCalendarMovePlan<R extends { readonly signal: AbortSignal }> {\n readonly id: string;\n readonly title: string;\n /** An occurrence of a series: the scope bar asks first, unless the move comes from `move()` (§9.6). */\n readonly recurring: boolean;\n readonly source: SdCalendarMoveSource;\n /**\n * Started from the keyboard: the focus goes back to the item afterwards (SC-29). Any other source does the same when\n * the item held the focus at the start (review RX #6, as sd-kanban); a focus elsewhere stays there (SC-31).\n */\n readonly keyboard: boolean;\n /** The capability flags, evaluated again right before `onMove` (SC-06); `false` stops without a callback. */\n readonly allowed: () => boolean;\n readonly request: (scope: SdCalendarMoveScope | null, signal: AbortSignal) => R;\n readonly onMove: (request: R) => boolean | 'cancel' | void | Promise<boolean | 'cancel' | void>;\n /** Draws the item at its target: `false` while the scope bar asks, `true` while `onMove` runs, `null` clears. */\n readonly show: (saving: boolean | null) => void;\n /** `onMove` accepted: change the data and emit the move output. Returns the text for the live region. */\n readonly accept: (request: R) => string;\n /** `onMove` rejected or failed: emit the error output. */\n readonly fail: (request: R, outcome: { readonly kind: 'rejected' } | { readonly kind: 'error'; readonly error: unknown }) => void;\n}\n\n/** What `SdCalendarMoveRunner` needs from its component. */\nexport interface SdCalendarMoveHost {\n readonly operation: SdCalendarOperation<'create' | 'move'>;\n readonly announcer: SdCalendarAnnouncer;\n readonly focus: SdCalendarFocusKeeper;\n readonly t: (key: string, params?: Record<string, string | number>) => string;\n /** Opens the scope bar and resolves with the answer; `null` is Cancel, also when `signal` (the move's) aborts. */\n readonly ask: (title: string, signal: AbortSignal) => Promise<SdCalendarMoveScope | null>;\n /** Shows the failure band of an item, or clears it with `null`. */\n readonly band: (failure: { readonly id: string; readonly message: string } | null) => void;\n readonly reload: () => void;\n}\n\n/**\n * The move pipeline after the component's own checks (calendar.md §9.5 steps 4–6): one waiting operation (SC-14), the\n * scope bar of an occurrence, the flags once more (SC-06), `onMove` and its five results (SC-09 … SC-13), focus\n * (SC-29, SC-30) and the live region. Shared by sd-calendar and sd-scheduler.\n */\nexport class SdCalendarMoveRunner {\n constructor(private readonly host: SdCalendarMoveHost) {}\n\n async run<R extends { readonly signal: AbortSignal }>(plan: SdCalendarMovePlan<R>): Promise<boolean> {\n const { operation, focus } = this.host;\n const signal = operation.begin('move');\n if (!signal) return false;\n const follow = plan.keyboard || focus.holds(plan.id);\n const origin = follow ? document.activeElement : null;\n const watch = focus.track(origin);\n try {\n return await this.#run(plan, signal, origin, watch, follow);\n } finally {\n watch.stop();\n }\n }\n\n async #run<R extends { readonly signal: AbortSignal }>(\n plan: SdCalendarMovePlan<R>,\n signal: AbortSignal,\n origin: Element | null,\n watch: SdCalendarFocusWatch,\n follow: boolean\n ): Promise<boolean> {\n const { operation, announcer, focus, t } = this.host;\n let restore = follow;\n let scope: SdCalendarMoveScope | null = plan.recurring ? 'this' : null;\n if (plan.recurring && plan.source !== 'api') {\n // The scope bar takes the focus, so it goes back to the item when the bar closes, after a mouse drag too.\n restore = true;\n // §9.6: an occurrence waits at the proposal (dashed, no sync icon) until the user picks a scope.\n plan.show(false);\n scope = await this.host.ask(plan.title, signal);\n if (signal.aborted) return false;\n if (scope === null) {\n operation.end(signal);\n plan.show(null);\n announcer.announce(t('core.component.calendar.cancelled'));\n focus.restore(plan.id, origin, watch);\n return false;\n }\n }\n if (!plan.allowed()) {\n operation.end(signal);\n plan.show(null);\n return false;\n }\n const request = Object.freeze(plan.request(scope, signal));\n this.host.band(null);\n plan.show(true);\n announcer.announce(t('core.component.calendar.pending', { title: plan.title }));\n const outcome = await sdCalendarCallMove(plan.onMove, request);\n if (outcome.kind === 'aborted') return false;\n operation.end(signal);\n plan.show(null);\n if (restore) focus.restore(plan.id, origin, watch);\n if (outcome.kind === 'cancelled') {\n announcer.announce(t('core.component.calendar.cancelled'));\n return false;\n }\n if (outcome.kind === 'rejected' || outcome.kind === 'error') {\n const message = t(`core.component.calendar.${outcome.kind === 'rejected' ? 'rejected' : 'error'}`);\n this.host.band({ id: plan.id, message });\n announcer.announce(message);\n plan.fail(request, outcome);\n return false;\n }\n announcer.announce(plan.accept(request));\n if (scope === 'following' || scope === 'all') this.host.reload();\n return true;\n }\n}\n\n/** One create handed to `SdCalendarCreateRunner`: the span the user picked and what to do with the answer. */\nexport interface SdCalendarCreatePlan<A extends object, E> {\n /** Arguments of `onCreate` without `signal`. */\n readonly args: A;\n readonly onCreate: (args: A & { readonly signal: AbortSignal }) => E | void | Promise<E | void>;\n /** Draws the dashed block as waiting (`true`) or removes it (`false`). */\n readonly show: (waiting: boolean) => void;\n /** `onCreate` returned an item: insert and select it. */\n readonly accept: (created: E) => void;\n}\n\n/** What `SdCalendarCreateRunner` needs from its component. */\nexport interface SdCalendarCreateHost {\n readonly operation: SdCalendarOperation<'create' | 'move'>;\n readonly announcer: SdCalendarAnnouncer;\n readonly t: (key: string, params?: Record<string, string | number>) => string;\n /** Shows the create failure band (`id: null`), or clears the band with `null`. */\n readonly band: (failure: { readonly id: null; readonly message: string } | null) => void;\n}\n\n/**\n * The create pipeline after the component's own checks (calendar.md §9.2, SC-14, SC-19 … SC-21): one waiting\n * operation, the waiting dashed block, `onCreate`, the error band without the error text, and the late answer of an\n * aborted create dropped (SC-15). Shared by sd-calendar and sd-scheduler.\n */\nexport class SdCalendarCreateRunner {\n constructor(private readonly host: SdCalendarCreateHost) {}\n\n async run<A extends object, E>(plan: SdCalendarCreatePlan<A, E>): Promise<void> {\n const { operation, announcer, t } = this.host;\n const signal = operation.begin('create');\n if (!signal) return;\n this.host.band(null);\n plan.show(true);\n let created: E | void;\n try {\n created = await plan.onCreate({ ...plan.args, signal });\n } catch {\n if (signal.aborted) return;\n operation.end(signal);\n plan.show(false);\n const message = t('core.component.calendar.create-error');\n this.host.band({ id: null, message });\n announcer.announce(message);\n return;\n }\n if (signal.aborted) return;\n operation.end(signal);\n plan.show(false);\n if (created) plan.accept(created);\n }\n}\n\n/**\n * The scope bar of a recurring move (calendar.md §9.6): it holds the one waiting question and takes the focus on its\n * first answer when it opens.\n */\nexport class SdCalendarScopeBar {\n readonly #asking = signal<{ readonly title: string; readonly answer: (scope: SdCalendarMoveScope | null) => void } | null>(null);\n /** The open question, for the template: `{ title }` or `null`. */\n readonly asking = this.#asking.asReadonly();\n\n constructor(host: HTMLElement, injector: Injector) {\n effect(\n () => {\n if (!this.#asking()) return;\n untracked(() =>\n afterNextRender(() => host.querySelector<HTMLElement>('[role=\"alertdialog\"] [data-scope=\"this\"]')?.focus(), { injector })\n );\n },\n { injector }\n );\n }\n\n /** Opens the bar; resolves with the answer, `null` for Cancel. An abort of `signal` (its operation) is Cancel. */\n ask(title: string, signal?: AbortSignal): Promise<SdCalendarMoveScope | null> {\n return new Promise(answer => {\n const asking = { title, answer };\n this.#asking.set(asking);\n // why: an operation aborted while the bar asks (the component destroyed included) must settle, or the move never\n // ends and its focus watch stays on document. An old signal does not close a newer question.\n const cancel = (): void => {\n if (untracked(this.#asking) === asking) this.answer(null);\n };\n if (signal?.aborted) cancel();\n else signal?.addEventListener('abort', cancel, { once: true });\n });\n }\n\n /** Answers and closes the bar; `null` is Cancel. Nothing happens while the bar is closed. */\n answer(scope: SdCalendarMoveScope | null): void {\n const asking = untracked(this.#asking);\n if (!asking) return;\n this.#asking.set(null);\n asking.answer(scope);\n }\n\n /** Esc on the bar is Cancel. */\n onKeydown(domEvent: KeyboardEvent): void {\n if (domEvent.key !== 'Escape') return;\n domEvent.preventDefault();\n domEvent.stopPropagation();\n this.answer(null);\n }\n}\n\n/** Text of the one live region of a component (SC-33). */\nexport class SdCalendarAnnouncer {\n readonly #text = signal('');\n readonly text = this.#text.asReadonly();\n\n /** Writes the live region; the same text twice in a row gets a trailing no-break space so it is read again (R1-G9). */\n announce(message: string): void {\n const current = untracked(this.#text);\n this.#text.set(current === message ? `${message}\\xa0` : message);\n }\n}\n\n/** Whether the user put the focus somewhere else while a move waited (SC-30). */\nexport interface SdCalendarFocusWatch {\n readonly abandoned: () => boolean;\n readonly stop: () => void;\n}\n\n/**\n * Puts the focus back on an item after a move that started from the keyboard or the scope bar (SC-29, SC-30). The\n * item may first need the next range to load, so `pending()` runs again after every load.\n */\nexport class SdCalendarFocusKeeper {\n #target: string | null = null;\n\n constructor(\n private readonly host: HTMLElement,\n private readonly injector: Injector,\n /** The focusable element of an item, from its id. */\n private readonly selector: (id: string) => string,\n /** The scope bar: a focus inside it is the component's own, the bar is about to be removed (R2 A-18). */\n private readonly scopeSelector: string\n ) {}\n\n /**\n * Watches the focus while a move waits: a focus the user puts outside `origin` and the scope bar abandons the item\n * (SC-30), even when that element loses the focus to `body` before the move ends (as sd-kanban, RX #4). A focus that\n * falls back to `body` alone (the item re-rendered or disabled) does not.\n */\n track(origin: Element | null): SdCalendarFocusWatch {\n let abandoned = false;\n const listener = (event: FocusEvent): void => {\n // why: focusin always targets an element (a window focus does not fire it).\n const target = event.target as Element;\n if (target === document.body || target === origin) return;\n if (this.host.querySelector(this.scopeSelector)?.contains(target)) return;\n abandoned = true;\n };\n document.addEventListener('focusin', listener, true);\n return { abandoned: () => abandoned, stop: () => document.removeEventListener('focusin', listener, true) };\n }\n\n /** Whether the focus is on the item `id` or inside it (review RX #6). */\n holds(id: string): boolean {\n const active = document.activeElement;\n return !!active && this.host.contains(active) && !!active.closest(this.selector(id));\n }\n\n /** Focuses `id` unless the user moved the focus somewhere else while waiting (`origin` is where it started). */\n restore(id: string, origin: Element | null, watch?: SdCalendarFocusWatch): void {\n if (watch?.abandoned()) return;\n const active = document.activeElement;\n const inScopeBar = !!active && !!this.host.querySelector(this.scopeSelector)?.contains(active);\n if (active && active !== document.body && active !== origin && active.isConnected && !inScopeBar) return;\n this.#target = id;\n this.pending();\n }\n\n /** Focuses the waiting item once it is rendered. */\n pending(): void {\n if (!this.#target) return;\n afterNextRender(\n () => {\n const id = this.#target;\n if (!id) return;\n const element = this.host.querySelector<HTMLElement>(this.selector(id));\n if (!element) return;\n this.#target = null;\n element.focus();\n },\n { injector: this.injector }\n );\n }\n}\n","import { Directive, TemplateRef, inject } from '@angular/core';\nimport type { SdCalendarEvent, SdCalendarHoliday, SdCalendarRange, SdCalendarView, SdCalendarVisibleRange } from './calendar.model';\n\n/** Context of `sdCalendarEventTemplate`. */\nexport interface SdCalendarEventTemplateContext<T = unknown> {\n $implicit: SdCalendarEvent<T>;\n event: SdCalendarEvent<T>;\n /** Where the block is drawn: the proposed span while a move waits, otherwise the event's own span. */\n range: SdCalendarRange;\n view: SdCalendarView;\n /** The block is shorter than 34px and shows one line. */\n compact: boolean;\n /** A move or a create of this event is waiting for your callback. */\n pending: boolean;\n}\n\n/** Context of `sdCalendarAgendaItemTemplate`. */\nexport type SdCalendarAgendaItemTemplateContext<T = unknown> = Omit<SdCalendarEventTemplateContext<T>, 'compact'>;\n\n/** Context of `sdCalendarDayCellTemplate` (month view). */\nexport interface SdCalendarDayCellTemplateContext<T = unknown> {\n /** `'yyyy/MM/dd'`. */\n $implicit: string;\n date: string;\n events: readonly SdCalendarEvent<T>[];\n holiday: SdCalendarHoliday | null;\n today: boolean;\n /** The day belongs to the month on screen. */\n inMonth: boolean;\n /** Day off: weekend without working hours or an `off` holiday. */\n off: boolean;\n}\n\n/** Context of `sdCalendarEmptyTemplate` (agenda view). */\nexport interface SdCalendarEmptyTemplateContext {\n $implicit: SdCalendarVisibleRange;\n}\n\n/** Replaces the content of an event block; frame, colour, handle and states stay. `let-event`. */\n@Directive({ selector: 'ng-template[sdCalendarEventTemplate]', standalone: true })\nexport class SdCalendarEventTemplateDirective<T = unknown> {\n readonly template = inject<TemplateRef<SdCalendarEventTemplateContext<T>>>(TemplateRef);\n static ngTemplateContextGuard<T>(\n _directive: SdCalendarEventTemplateDirective<T>,\n _context: unknown\n ): _context is SdCalendarEventTemplateContext<T> {\n return true;\n }\n}\n\n/** Replaces the part of a month cell under the day number (for example a timesheet code). `let-date`. */\n@Directive({ selector: 'ng-template[sdCalendarDayCellTemplate]', standalone: true })\nexport class SdCalendarDayCellTemplateDirective<T = unknown> {\n readonly template = inject<TemplateRef<SdCalendarDayCellTemplateContext<T>>>(TemplateRef);\n static ngTemplateContextGuard<T>(\n _directive: SdCalendarDayCellTemplateDirective<T>,\n _context: unknown\n ): _context is SdCalendarDayCellTemplateContext<T> {\n return true;\n }\n}\n\n/**\n * Content of the place column of an agenda row, shown when the host is at least 720px wide (§11). Below that width\n * the column, and the template, are left out. `let-event`.\n */\n@Directive({ selector: 'ng-template[sdCalendarAgendaItemTemplate]', standalone: true })\nexport class SdCalendarAgendaItemTemplateDirective<T = unknown> {\n readonly template = inject<TemplateRef<SdCalendarAgendaItemTemplateContext<T>>>(TemplateRef);\n static ngTemplateContextGuard<T>(\n _directive: SdCalendarAgendaItemTemplateDirective<T>,\n _context: unknown\n ): _context is SdCalendarAgendaItemTemplateContext<T> {\n return true;\n }\n}\n\n/** Replaces the empty state of the agenda view. `let-range`. */\n@Directive({ selector: 'ng-template[sdCalendarEmptyTemplate]', standalone: true })\nexport class SdCalendarEmptyTemplateDirective {\n readonly template = inject<TemplateRef<SdCalendarEmptyTemplateContext>>(TemplateRef);\n static ngTemplateContextGuard(\n _directive: SdCalendarEmptyTemplateDirective,\n _context: unknown\n ): _context is SdCalendarEmptyTemplateContext {\n return true;\n }\n}\n","import { CdkDrag, type CdkDragEnd, type CdkDragStart, type DragRef, type Point } from '@angular/cdk/drag-drop';\nimport { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n ElementRef,\n Injector,\n NgZone,\n afterNextRender,\n booleanAttribute,\n computed,\n contentChild,\n effect,\n inject,\n input,\n model,\n output,\n signal,\n untracked,\n viewChild,\n} from '@angular/core';\nimport { SdDataState } from '@sdcorejs/angular/components/data-state';\nimport type { SdTemporalValueTransform } from '@sdcorejs/angular/forms/models';\nimport { I18nService, SdTranslatePipe } from '@sdcorejs/angular/i18n';\nimport { SdIcon } from '@sdcorejs/angular/modules/icon';\nimport { SdDateTimeService } from '@sdcorejs/angular/services/date-time';\nimport { SdCalendarEdgeScroller } from './calendar-edge-scroll';\nimport { sdCalendarDateText, sdCalendarFormats, sdCalendarMovedText, sdCalendarTitle, sdCalendarWeekdayLong } from './calendar-format';\nimport { SdCalendarHostWidth, SdCalendarMinuteTimer, SdCalendarReporter, sdCalendarIsRtl } from './calendar-host';\nimport { SdCalendarLoader } from './calendar-loader';\nimport {\n SdCalendarAnnouncer,\n SdCalendarCreateRunner,\n SdCalendarFocusKeeper,\n SdCalendarMoveRunner,\n SdCalendarOperation,\n SdCalendarScopeBar,\n sdCalendarAllows,\n} from './calendar-move';\nimport { SD_CALENDAR_CONFIGURATION, ɵSD_CALENDAR_DEFAULTS } from './calendar.configuration';\nimport type {\n SdCalendarDateInput,\n SdCalendarEvent,\n SdCalendarHoliday,\n SdCalendarMoveError,\n SdCalendarMoveRequest,\n SdCalendarMoveSource,\n SdCalendarOption,\n SdCalendarRange,\n SdCalendarView,\n SdCalendarVisibleRange,\n SdCalendarWorkingHours,\n} from './calendar.model';\nimport {\n SdCalendarAgendaItemTemplateDirective,\n SdCalendarDayCellTemplateDirective,\n SdCalendarEmptyTemplateDirective,\n SdCalendarEventTemplateDirective,\n type SdCalendarAgendaItemTemplateContext,\n type SdCalendarDayCellTemplateContext,\n type SdCalendarEventTemplateContext,\n} from './calendar.templates';\nimport {\n sdCalendarAddDays,\n sdCalendarAddMonthsKeepDay,\n sdCalendarAllDayLayout,\n sdCalendarBoundDay,\n sdCalendarBrokenWeekdays,\n sdCalendarCarrierDay,\n sdCalendarColor,\n sdCalendarClampAgendaDays,\n sdCalendarClockText,\n sdCalendarCssEscape,\n sdCalendarDayParts,\n sdCalendarHolidayMap,\n sdCalendarInitialScroll,\n sdCalendarInvalidItems,\n sdCalendarIsOffDay,\n sdCalendarLastDayOf,\n sdCalendarMonthWeeks,\n sdCalendarMoveStep,\n sdCalendarNormalizeStep,\n sdCalendarOffSegments,\n sdCalendarPlace,\n sdCalendarPointOf,\n sdCalendarRangeKey,\n sdCalendarRangeOf,\n sdCalendarReadDay,\n sdCalendarResizeEnd,\n sdCalendarResolveFirstDayOfWeek,\n sdCalendarResolveStep,\n sdCalendarResolveWorkingHours,\n sdCalendarSameList,\n sdCalendarMoveTarget,\n sdCalendarOutOfRange,\n sdCalendarSelectionGone,\n sdCalendarShiftDate,\n sdCalendarShiftDays,\n sdCalendarSlot,\n sdCalendarSnapMove,\n sdCalendarStack,\n sdCalendarSweep,\n sdCalendarTargetOf,\n sdCalendarTimeToMinutes,\n sdCalendarVisibleDays,\n sdCalendarVisibleRange,\n sdCalendarWeekday,\n sdCalendarWorkingRanges,\n type SdCalendarPlacement,\n type SdCalendarRangeInput,\n type SdCalendarSpan,\n type SdCalendarTarget,\n} from './calendar.utils';\n\nconst ALL_VIEWS: readonly SdCalendarView[] = ['month', 'week', 'day', 'agenda'];\n/** Baseline hour height (px) the content tiers of a block are measured against (§8.2). */\nconst HOUR_HEIGHT = 48;\nconst MINUTE = 60_000;\n/** Pointer travel (px) under which a press is a click (§9.1). */\nconst CLICK_SLOP = 5;\n/** Horizontal travel (px) of a swipe that changes the day or week (§12). */\nconst SWIPE = 60;\n/** Where the first-load skeleton draws its blocks: [day index, start minute, minutes]. */\nconst SKELETON: readonly (readonly [number, number, number])[] = [\n [0, 540, 60],\n [1, 600, 90],\n [2, 480, 45],\n [3, 780, 120],\n [4, 570, 60],\n];\nlet nextCalendarId = 0;\n\ninterface SdCalendarPlaced<T> {\n readonly event: SdCalendarEvent<T>;\n readonly placement: SdCalendarPlacement;\n /** Drawn at a proposed position while `onMove` (or the scope bar) waits. */\n readonly pending: boolean;\n /** `onMove` runs (not only the scope bar): the block shows the sync icon. */\n readonly saving: boolean;\n}\n\n/** @internal View model of one day column / header. */\ninterface SdCalendarDayView {\n readonly day: string;\n readonly dayNumber: number;\n readonly weekdayShort: string;\n readonly label: string;\n readonly today: boolean;\n readonly off: boolean;\n readonly outOfRange: boolean;\n readonly holiday: SdCalendarHoliday | null;\n readonly offSegments: readonly SdCalendarSpan[];\n}\n\n/** @internal Shared view model of a block, a bar, a month line and an agenda row. */\ninterface SdCalendarItemView<T> {\n readonly key: string;\n readonly event: SdCalendarEvent<T>;\n readonly placement: SdCalendarPlacement;\n readonly range: SdCalendarRange;\n readonly label: string;\n readonly autoId: string | null;\n readonly color: string;\n readonly customColor: string | null;\n readonly recurring: boolean;\n readonly past: boolean;\n readonly pending: boolean;\n readonly saving: boolean;\n readonly movable: boolean;\n readonly timeText: string;\n}\n\n/** @internal A timed block of the grid. */\ninterface SdCalendarBlockView<T> extends SdCalendarItemView<T> {\n readonly top: string;\n readonly height: string;\n readonly column: number;\n readonly columns: number;\n /** `lg` ≥ 62px, `md` 34–61px, `sm` < 34px, `xs` < 20px (§8.2). */\n readonly size: 'lg' | 'md' | 'sm' | 'xs';\n readonly context: SdCalendarEventTemplateContext<T>;\n}\n\n/** @internal One line of a month cell. */\ninterface SdCalendarMonthLine<T> {\n readonly key: string;\n readonly item: SdCalendarItemView<T> | null;\n readonly bar: boolean;\n readonly showTitle: boolean;\n readonly joinStart: boolean;\n readonly joinEnd: boolean;\n readonly text: string;\n}\n\n/** @internal A month cell. */\ninterface SdCalendarMonthCell<T> {\n readonly day: SdCalendarDayView;\n readonly inMonth: boolean;\n readonly label: string;\n readonly lines: readonly SdCalendarMonthLine<T>[];\n readonly more: number;\n /** Compact month: up to three dots, one per colour (§12). */\n readonly dots: readonly { readonly color: string; readonly customColor: string | null }[];\n readonly context: SdCalendarDayCellTemplateContext<T>;\n}\n\n/** @internal A day group of the agenda. */\ninterface SdCalendarAgendaDay<T> {\n readonly day: SdCalendarDayView;\n readonly heading: string;\n readonly rows: readonly (SdCalendarItemView<T> & { readonly context: SdCalendarAgendaItemTemplateContext<T> })[];\n}\n\n/** @internal The dashed block of a create (§9.2). */\ninterface SdCalendarGhost {\n readonly day: string;\n readonly start: number;\n readonly end: number;\n readonly pending: boolean;\n readonly blocked: boolean;\n}\n\n/** @internal Where a dragged block would land (§9.3). */\ninterface SdCalendarDragProposal {\n readonly id: string;\n readonly day: string;\n readonly start: number;\n readonly end: number;\n readonly title: string;\n readonly outside: boolean;\n readonly color: string;\n readonly customColor: string | null;\n}\n\n@Component({\n selector: 'sd-calendar',\n standalone: true,\n imports: [CdkDrag, NgTemplateOutlet, SdDataState, SdIcon, SdTranslatePipe],\n templateUrl: './calendar.component.html',\n styleUrl: './calendar.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\n/** Month, week, day and agenda calendar with grouped capabilities: `dataSource`, `create` and `move` (see `sd-calendar.md`). */\nexport class SdCalendar<T = unknown> {\n readonly #clock = inject(SdDateTimeService);\n readonly #i18n = inject(I18nService);\n readonly #configuration = inject(SD_CALENDAR_CONFIGURATION, { optional: true });\n readonly #zone = inject(NgZone);\n readonly #host = inject<ElementRef<HTMLElement>>(ElementRef);\n readonly #injector = inject(Injector);\n readonly #reporter = new SdCalendarReporter('[sd-calendar]');\n readonly #t = (key: string, params?: Record<string, string | number>): string => this.#i18n.t(key, params);\n protected readonly baseId = `sd-calendar-${nextCalendarId++}`;\n\n /** Data source and capabilities. A new object is the signal to load again. */\n readonly option = input.required<SdCalendarOption<T>>();\n /** Layout on screen; one of `views`, otherwise the first of `views`. */\n readonly view = model<SdCalendarView>('week');\n /** Anchor day; the calendar writes back `'yyyy/MM/dd'` (no `transform`). Defaults to today in the zone. */\n readonly date = model<SdCalendarDateInput | null | undefined>(undefined);\n /** Id of the selected event; back to `null` when the event is no longer loaded. */\n readonly selectedId = model<string | null>(null);\n /** Views offered by the switcher, in this order. */\n readonly views = input<readonly SdCalendarView[]>(ALL_VIEWS);\n /** Minutes of one slot, a divisor of 60. Configuration, then 30. */\n readonly step = input<number | undefined>(undefined);\n /** 0–6, 0 is Sunday. Configuration, then 1. */\n readonly firstDayOfWeek = input<number | undefined>(undefined);\n /** Hides Saturday and Sunday in the week and month views. */\n readonly hideWeekends = input(false, { transform: booleanAttribute });\n /** `null` turns the off-hours shading and days off by weekday off. Configuration, then Monday–Friday. */\n readonly workingHours = input<SdCalendarWorkingHours | null | undefined>(undefined);\n /** Configuration, then none. */\n readonly holidays = input<readonly SdCalendarHoliday[] | undefined>(undefined);\n /** First day that can be shown and edited, compared as a calendar day in the zone. */\n readonly minDate = input<SdCalendarDateInput | 'TODAY' | null | undefined>(undefined);\n /** Last day that can be shown and edited, compared as a calendar day in the zone. */\n readonly maxDate = input<SdCalendarDateInput | 'TODAY' | null | undefined>(undefined);\n /** `'HH:mm'` the week and day views open at. Configuration, then the earliest working hour, then 08:00. */\n readonly scrollTime = input<string | undefined>(undefined);\n /** Days of the agenda view, 1–62. */\n readonly agendaDays = input<number>(14);\n /** Fades events that have ended. */\n readonly dimPast = input(false, { transform: booleanAttribute });\n /** Serialization of the values the calendar emits; see \"Date values\" in `sd-calendar.md`. */\n readonly transform = input<SdTemporalValueTransform | undefined>(undefined);\n /** No create, move or selection; events leave the tab order. Navigation still works. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** No create or move. Selection and navigation still work. */\n readonly readonly = input(false, { transform: booleanAttribute });\n /** Accessible name of the region; defaults to the translated \"Calendar\". */\n readonly ariaLabel = input<string | null | undefined>(undefined);\n /** E2E scope: `data-autoid=\"components-calendar-{autoId}\"` and derived child ids. */\n readonly autoId = input<string | null | undefined>(undefined);\n\n /** An event was clicked, tapped or activated with Enter/Space. */\n readonly sdSelect = output<SdCalendarEvent<T>>();\n /** Once on init, then whenever `from`, `to` or the view on screen changes. */\n readonly sdRangeChange = output<SdCalendarVisibleRange>();\n /** `onMove` accepted and the data changed. */\n readonly sdMove = output<SdCalendarMoveRequest<T>>();\n /** `onMove` rejected or failed. */\n readonly sdMoveError = output<SdCalendarMoveError<T>>();\n /** `onLoad` threw or rejected (never for an aborted load). */\n readonly sdLoadError = output<unknown>();\n\n protected readonly eventTemplate = contentChild<SdCalendarEventTemplateDirective<T>>(SdCalendarEventTemplateDirective);\n protected readonly dayCellTemplate = contentChild<SdCalendarDayCellTemplateDirective<T>>(SdCalendarDayCellTemplateDirective);\n protected readonly agendaItemTemplate = contentChild<SdCalendarAgendaItemTemplateDirective<T>>(SdCalendarAgendaItemTemplateDirective);\n protected readonly emptyTemplate = contentChild(SdCalendarEmptyTemplateDirective);\n protected readonly scroller = viewChild<ElementRef<HTMLElement>>('scroller');\n protected readonly gridElement = viewChild<ElementRef<HTMLElement>>('grid');\n\n readonly #loader = new SdCalendarLoader<SdCalendarEvent<T>>();\n readonly #operation = new SdCalendarOperation<'create' | 'move'>();\n readonly #now = signal<Date>(this.#clock.now());\n readonly #hostWidth = new SdCalendarHostWidth(this.#host.nativeElement, this.#zone);\n readonly #width = this.#hostWidth.width;\n readonly #timer = new SdCalendarMinuteTimer(this.#zone, () => this.#now.set(this.#clock.now()));\n readonly #announcer = new SdCalendarAnnouncer();\n readonly #focus = new SdCalendarFocusKeeper(\n this.#host.nativeElement,\n this.#injector,\n id => `[data-event-id=\"${sdCalendarCssEscape(id)}\"][tabindex]`,\n '.sd-calendar__scope'\n );\n readonly #edge = new SdCalendarEdgeScroller(this.#zone);\n /** Move waiting for `onMove`: the event is drawn at `target` (§8.3, saving). */\n readonly #moving = signal<{ readonly id: string; readonly target: SdCalendarTarget; readonly saving: boolean } | null>(null);\n /** Scope bar of a recurring event (§9.6); it holds the one waiting operation until answered. */\n protected readonly scopeBar = new SdCalendarScopeBar(this.#host.nativeElement, this.#injector);\n readonly #ghost = signal<SdCalendarGhost | null>(null);\n readonly #failure = signal<{ readonly id: string | null; readonly message: string } | null>(null);\n readonly #drag = signal<SdCalendarDragProposal | null>(null);\n readonly #resize = signal<{ readonly id: string; readonly end: number } | null>(null);\n readonly #cursor = signal<{ readonly day: string; readonly minutes: number } | null>(null);\n readonly #monthFocus = signal<string | null>(null);\n readonly #runner = new SdCalendarMoveRunner({\n operation: this.#operation,\n announcer: this.#announcer,\n focus: this.#focus,\n t: this.#t,\n ask: (title, signal) => this.scopeBar.ask(title, signal),\n band: failure => this.#failure.set(failure),\n reload: () => this.reload(),\n });\n readonly #creator = new SdCalendarCreateRunner({\n operation: this.#operation,\n announcer: this.#announcer,\n t: this.#t,\n band: failure => this.#failure.set(failure),\n });\n #emittedKey: string | null = null;\n #lastOption: SdCalendarOption<T> | null = null;\n /** A drag just ended: the click that follows its mouseup must not select. Reset on the next press. */\n #justDragged = false;\n #press: {\n readonly day: string;\n readonly anchor: number;\n readonly x: number;\n readonly y: number;\n readonly touch: boolean;\n readonly column: HTMLElement;\n moved: boolean;\n } | null = null;\n #dragSession: {\n readonly id: string;\n readonly placement: SdCalendarPlacement;\n readonly title: string;\n readonly color: string;\n readonly customColor: string | null;\n readonly start: Point;\n readonly scrollTop: number;\n readonly columns: readonly { readonly day: string; readonly left: number; readonly right: number }[];\n cancelled: boolean;\n } | null = null;\n #dragPointer: Point | null = null;\n /** Where the press that may start a drag happened (CDK's start event is the move that crossed the threshold). */\n #pickup: Point | null = null;\n #resizeSession: { readonly id: string; readonly placement: SdCalendarPlacement; readonly y: number } | null = null;\n #stripPress: { readonly x: number; readonly y: number } | null = null;\n\n /** Host narrower than 600px (§12): measured on the host, not the viewport. */\n protected readonly compact = computed(() => {\n const width = this.#width();\n return width !== null && width < 600;\n });\n /** Host at least 720px wide: the agenda shows the place column. */\n protected readonly wide = computed(() => (this.#width() ?? 0) >= 720);\n protected readonly phase = this.#loader.phase.asReadonly();\n protected readonly announcement = this.#announcer.text;\n protected readonly failure = this.#failure.asReadonly();\n protected readonly ghost = this.#ghost.asReadonly();\n protected readonly dragProposal = this.#drag.asReadonly();\n protected readonly cursor = this.#cursor.asReadonly();\n protected readonly scopeMessageId = `${this.baseId}-scope`;\n protected readonly busy = computed(() => this.#loader.phase() === 'loading' || this.#loader.phase() === 'reloading');\n protected readonly skeleton = computed(() => this.#loader.phase() === 'loading' && !this.#loader.everLoaded());\n protected readonly rootAutoId = computed(() => (this.autoId() ? `components-calendar-${this.autoId()}` : null));\n protected readonly regionLabel = computed(() => this.ariaLabel() || this.#i18n.t('core.component.calendar.label'));\n\n protected readonly stepValue = computed(() => sdCalendarResolveStep(this.step(), this.#configuration));\n readonly #firstDayOfWeek = computed(() => sdCalendarResolveFirstDayOfWeek(this.firstDayOfWeek(), this.#configuration));\n readonly #workingHours = computed<SdCalendarWorkingHours | null>(() =>\n sdCalendarResolveWorkingHours(this.workingHours(), this.#configuration)\n );\n readonly #holidays = computed(() => sdCalendarHolidayMap(this.holidays(), this.#configuration, this.#clock));\n\n protected readonly today = computed(() => sdCalendarCarrierDay(this.#now()));\n readonly #nowMinutes = computed(() => this.#now().getHours() * 60 + this.#now().getMinutes());\n readonly #nowInstant = computed(() => this.#clock.fromWallClock(this.#now()).getTime());\n readonly #anchor = computed(() => {\n const value = this.date();\n return (value === null || value === undefined ? null : sdCalendarReadDay(value, this.#clock)) ?? this.today();\n });\n readonly #minDay = computed(() => sdCalendarBoundDay(this.minDate(), this.today(), this.#clock));\n readonly #maxDay = computed(() => sdCalendarBoundDay(this.maxDate(), this.today(), this.#clock));\n\n /** Views of the switcher; the week button is hidden while compact (§12). */\n protected readonly viewOptions = computed(() => {\n const views = this.views().length ? this.views() : ALL_VIEWS;\n return this.compact() ? views.filter(view => view !== 'week') : views;\n });\n protected readonly activeView = computed<SdCalendarView>(() => {\n const views = this.views().length ? this.views() : ALL_VIEWS;\n return views.includes(this.view()) ? this.view() : views[0];\n });\n /** What is drawn: a compact week is drawn as a day. */\n protected readonly displayView = computed<SdCalendarView>(() =>\n this.compact() && this.activeView() === 'week' ? 'day' : this.activeView()\n );\n protected readonly timeView = computed(() => this.displayView() === 'week' || this.displayView() === 'day');\n readonly #rangeInput = computed<SdCalendarRangeInput>(() => ({\n view: this.displayView(),\n date: this.#anchor(),\n firstDayOfWeek: this.#firstDayOfWeek(),\n hideWeekends: this.hideWeekends(),\n agendaDays: sdCalendarClampAgendaDays(this.agendaDays()),\n }));\n protected readonly visible = computed(() => sdCalendarVisibleRange(this.#rangeInput()), {\n equal: (a, b) => sdCalendarRangeKey(a) === sdCalendarRangeKey(b),\n });\n protected readonly days = computed(() => sdCalendarVisibleDays(this.#rangeInput()), { equal: sdCalendarSameList });\n\n /** Duplicate or empty id, or an empty title: the whole data set is refused (§5). */\n protected readonly invalid = computed(() => sdCalendarInvalidItems(this.#loader.items()));\n /** No create and no move (§4.1, §13): disabled, readonly, loading, load error or invalid data. */\n protected readonly locked = computed(\n () => this.disabled() || this.readonly() || this.busy() || this.#loader.phase() === 'error' || this.invalid()\n );\n /** Create is on: `option.create` and not locked. */\n protected readonly canCreate = computed(() => !!this.option().create && !this.locked());\n\n readonly #formats = computed(() => sdCalendarFormats(this.#i18n.locale(), this.#i18n.language()));\n\n protected readonly title = computed(() => {\n const view = this.displayView();\n const { from, to } = this.visible();\n const kind = view === 'month' || (this.compact() && view === 'day') ? 'month' : view === 'agenda' ? 'range' : view;\n return sdCalendarTitle(kind, { anchor: this.#anchor(), from, to }, this.#formats(), (key, params) => this.#i18n.t(key, params));\n });\n\n protected readonly prevLabel = computed(() => this.#navLabel('prev'));\n protected readonly nextLabel = computed(() => this.#navLabel('next'));\n protected readonly prevDisabled = computed(() => {\n const min = this.#minDay();\n return !!min && sdCalendarVisibleRange({ ...this.#rangeInput(), date: sdCalendarShiftDate(this.#rangeInput(), -1) }).to < min;\n });\n protected readonly nextDisabled = computed(() => {\n const max = this.#maxDay();\n return !!max && sdCalendarVisibleRange({ ...this.#rangeInput(), date: sdCalendarShiftDate(this.#rangeInput(), 1) }).from > max;\n });\n\n readonly #reading = computed(() => {\n const placed: SdCalendarPlaced<T>[] = [];\n const unreadable: string[] = [];\n const moving = this.#moving();\n for (const event of this.#loader.items()) {\n const placement = sdCalendarPlace(event, this.#clock);\n if (!placement) {\n unreadable.push(event.id);\n continue;\n }\n if (moving?.id === event.id) {\n const range = sdCalendarRangeOf(moving.target, this.#clock, null);\n const proposed = sdCalendarPlace({ ...event, start: range.start, end: range.end, allDay: range.allDay }, this.#clock);\n if (proposed) {\n placed.push({ event, placement: proposed, pending: true, saving: moving.saving });\n continue;\n }\n }\n placed.push({ event, placement, pending: false, saving: false });\n }\n return { placed, unreadable };\n });\n readonly #placed = computed<readonly SdCalendarPlaced<T>[]>(() => this.#reading().placed);\n readonly #inRange = computed(() => {\n const { from, to } = this.visible();\n return this.#placed().filter(({ placement }) => placement.lastDay >= from && placement.firstDay <= to);\n });\n\n protected readonly dayViews = computed(() => this.days().map(day => this.#dayView(day)));\n\n protected readonly blocksByDay = computed(() => {\n const byDay = new Map<string, SdCalendarBlockView<T>[]>();\n const days = new Set(this.days());\n const grouped = new Map<string, SdCalendarPlaced<T>[]>();\n for (const placed of this.#inRange()) {\n if (!placed.placement.inGrid || !days.has(placed.placement.startDay)) continue;\n const list = grouped.get(placed.placement.startDay) ?? [];\n list.push(placed);\n grouped.set(placed.placement.startDay, list);\n }\n for (const [day, list] of grouped) {\n // §8.4 step 5: a pending block is left out of the columns and drawn full width on top.\n const stacking = list.filter(item => !item.pending);\n const stacked = sdCalendarStack(stacking.map(({ placement }) => ({ start: placement.startMinutes, end: placement.endMinutes })));\n const views = stacked.map(({ index, column, columns }) => this.#blockView(stacking[index], column, columns));\n for (const item of list) if (item.pending) views.push(this.#blockView(item, 0, 1));\n byDay.set(day, views);\n }\n return byDay;\n });\n\n protected readonly allDay = computed(() => {\n const days = this.days();\n const items = this.#inRange().filter(({ placement }) => !placement.inGrid);\n const layout = sdCalendarAllDayLayout(\n items.map(({ placement }) => placement),\n days\n );\n const bars = layout.bars.map(bar => {\n const placed = items[bar.index];\n const item = this.#itemView(placed);\n const { placement } = placed;\n const text = placement.allDay ? placed.event.title : `${sdCalendarClockText(placement.startMinutes)} ${placed.event.title}`;\n const spanText =\n placement.firstDay === placement.lastDay\n ? ''\n : `${this.#dateText(placement.firstDay, false)} – ${this.#dateText(placement.lastDay, false)}`;\n return {\n ...item,\n row: bar.row,\n from: bar.from,\n to: bar.to,\n clippedStart: bar.clippedStart,\n clippedEnd: bar.clippedEnd,\n text,\n spanText,\n };\n });\n return { bars, rows: layout.rows, more: layout.more };\n });\n\n protected readonly monthWeeks = computed(() => {\n if (this.displayView() !== 'month') return [];\n const input = this.#rangeInput();\n const anchor = sdCalendarDayParts(input.date)!;\n const seen = new Set<string>();\n return sdCalendarMonthWeeks(input).map(week => this.#monthWeek(week, anchor.month, seen));\n });\n protected readonly monthHeaders = computed(() => (this.monthWeeks()[0] ?? []).map(cell => cell.day.weekdayShort));\n /** The month cell in the tab order (roving tabindex, §9.7). */\n protected readonly monthFocusDay = computed(() => {\n const days = this.days();\n const focus = this.#monthFocus();\n if (focus && days.includes(focus)) return focus;\n return days.includes(this.#anchor()) ? this.#anchor() : days[0];\n });\n\n protected readonly agenda = computed<readonly SdCalendarAgendaDay<T>[]>(() => {\n if (this.displayView() !== 'agenda') return [];\n const groups: SdCalendarAgendaDay<T>[] = [];\n const seen = new Set<string>();\n for (const day of this.days()) {\n const placed = this.#inRange()\n .filter(({ placement }) => placement.firstDay <= day && placement.lastDay >= day)\n .sort((a, b) => Number(b.placement.allDay) - Number(a.placement.allDay) || a.placement.startInstant - b.placement.startInstant);\n const view = this.#dayView(day);\n if (!placed.length && !view.holiday) continue;\n groups.push({\n day: view,\n heading: `${this.#weekdayLong(day)}, ${this.#dateText(day, false)}`,\n rows: placed.map(item => {\n const row = firstSegment(this.#itemView(item), seen);\n return { ...row, context: { $implicit: item.event, event: item.event, range: row.range, view: 'agenda', pending: item.pending } };\n }),\n });\n }\n return groups;\n });\n protected readonly agendaCount = computed(() => this.days().length);\n\n protected readonly skeletonBlocks = SKELETON;\n protected readonly hours = Array.from({ length: 23 }, (_, index) => index + 1);\n protected readonly zoneLabel = computed(() => {\n const zone = this.#clock.timeZone;\n const format = new Intl.DateTimeFormat('en-US', {\n timeZoneName: 'shortOffset',\n ...(zone && zone !== 'local' ? { timeZone: zone } : {}),\n });\n return format.formatToParts(this.#clock.fromWallClock(this.#now())).find(part => part.type === 'timeZoneName')?.value ?? '';\n });\n protected readonly nowTop = computed(() => offsetTop(this.#nowMinutes()));\n protected readonly cursorId = `${this.baseId}-cursor`;\n protected readonly cursorLabel = computed(() => {\n const cursor = this.#cursor();\n return cursor ? this.#slotLabel(cursor.day, cursor.minutes) : '';\n });\n protected readonly gridInstructionsId = `${this.baseId}-grid-help`;\n protected readonly eventInstructionsId = `${this.baseId}-event-help`;\n protected readonly dragDelay = { touch: 400, mouse: 0 };\n\n constructor() {\n const destroyRef = inject(DestroyRef);\n\n // why: one effect owns loading and the range output, so a range emits once and only together with its load.\n effect(() => {\n untracked(() => this.#hostWidth.measureOnce());\n const option = this.option();\n const range = this.visible();\n untracked(() => {\n const key = sdCalendarRangeKey(range);\n if (key !== this.#emittedKey) {\n this.#emittedKey = key;\n this.sdRangeChange.emit(range);\n }\n // SC-15: a new source also aborts a waiting create; a range change or a reload aborts a waiting move only.\n if (this.#lastOption !== null && this.#lastOption !== option) this.#abortCreate();\n this.#lastOption = option;\n this.#startLoad(option, range);\n });\n });\n\n effect(() => {\n for (const id of this.#reading().unreadable) {\n this.#reporter.report(\n 'warn',\n `date:${id}`,\n `event \"${id}\" has an unreadable date or does not end after it starts; it is not shown.`\n );\n }\n });\n\n effect(() => {\n const step = this.step() ?? this.#configuration?.step;\n if (step !== undefined && sdCalendarNormalizeStep(step) === null) {\n this.#reporter.report('warn', `step:${step}`, `step ${step} is not one of 5, 10, 15, 20, 30, 60; 30 is used.`);\n }\n });\n\n effect(() => {\n for (const weekday of sdCalendarBrokenWeekdays(this.#workingHours())) {\n this.#reporter.report(\n 'warn',\n `hours:${weekday}`,\n `workingHours[${weekday}] has a range without both ends or that does not end after it starts; it is ignored.`\n );\n }\n });\n\n // SC-15: turning disabled or readonly on aborts a waiting move.\n effect(() => {\n if (this.disabled() || this.readonly()) untracked(() => this.#abortMove());\n });\n\n // why: the timer only runs while today is on a time grid, and outside the zone so it does not tick change detection.\n const ticking = computed(() => this.timeView() && this.days().includes(this.today()));\n effect(() => this.#timer.run(ticking()));\n\n // Scroll to the working day when the week or day view opens; not when the week only changes.\n effect(() => {\n if (!this.timeView()) return;\n untracked(() => afterNextRender(() => this.#scrollToStart(), { injector: this.#injector }));\n });\n\n effect(() => {\n if (sdCalendarSelectionGone(this.selectedId(), this.#loader.phase(), this.#loader.items()))\n untracked(() => this.selectedId.set(null));\n });\n\n destroyRef.onDestroy(() => {\n this.#loader.abort();\n this.#operation.abort();\n this.#hostWidth.disconnect();\n this.#timer.stop();\n this.#stopEdgeScroll();\n document.removeEventListener('keydown', this.#onDocumentKeydown, true);\n });\n }\n\n /** The 7-day strip of a compact week (§12). */\n protected readonly strip = computed(() => {\n if (!this.compact() || this.activeView() !== 'week') return [];\n const anchor = this.#anchor();\n const placed = this.#placed();\n return sdCalendarVisibleDays({ ...this.#rangeInput(), view: 'week' }).map(day => {\n const view = this.#dayView(day);\n return {\n day,\n weekdayShort: view.weekdayShort,\n dayNumber: view.dayNumber,\n label: view.label,\n today: view.today,\n current: day === anchor,\n events: placed.some(({ placement }) => placement.firstDay <= day && placement.lastDay >= day),\n };\n });\n });\n\n /** Hours printed (§16): from the earliest working hour to the latest one of the days on screen. */\n protected readonly printHours = computed(() => {\n const hours = this.#workingHours();\n let start = 1440;\n let end = 0;\n for (const day of this.days()) {\n for (const span of sdCalendarWorkingRanges(hours, sdCalendarWeekday(day)) ?? []) {\n start = Math.min(start, span.start);\n end = Math.max(end, span.end);\n }\n }\n return end > start ? { start: start / 60, hours: (end - start) / 60 } : { start: 0, hours: 24 };\n });\n\n /** Aborts a running load and a waiting move, then calls `onLoad` again for the range on screen. */\n reload(): void {\n this.#startLoad(untracked(this.option), untracked(this.visible));\n }\n\n /**\n * Moves an event through the pipeline of `sd-calendar.md` (\"Moving\"): `onMove` decides. Resolves `true` only when\n * accepted; `false` without `option.move`, while locked or another operation waits, for an unknown id, a refused\n * `movable`, the same position, a position outside `minDate`/`maxDate`, a rejection, `'cancel'` or an error.\n * With `source: 'api'` (the default) an occurrence of a series is moved with `scope: 'this'` and focus stays put.\n */\n move(\n eventId: string,\n to: { start: SdCalendarDateInput; end?: SdCalendarDateInput | null; allDay?: boolean },\n source: SdCalendarMoveSource = 'api'\n ): Promise<boolean> {\n const placed = untracked(this.#placed).find(item => item.event.id === eventId);\n const target = placed ? this.#targetOf(placed, to) : null;\n if (!placed || !target) return Promise.resolve(false);\n return this.#runMove(eventId, target, source, false);\n }\n\n // ---- toolbar ----\n\n protected setView(view: SdCalendarView): void {\n this.view.set(view);\n this.#announceTitle();\n }\n\n protected shift(direction: 1 | -1): void {\n if (direction < 0 ? this.prevDisabled() : this.nextDisabled()) return;\n this.date.set(sdCalendarShiftDate(this.#rangeInput(), direction));\n this.#announceTitle();\n }\n\n protected goToday(): void {\n this.#now.set(this.#clock.now());\n this.date.set(this.today());\n this.#announceTitle();\n }\n\n protected openDay(day: string): void {\n this.date.set(day);\n this.view.set('day');\n this.#announceTitle();\n }\n\n protected dismissFailure(): void {\n this.#failure.set(null);\n }\n\n // ---- selection (§9.1) ----\n\n protected selectItem(event: SdCalendarEvent<T>, domEvent?: Event): void {\n domEvent?.stopPropagation();\n if (this.#justDragged) {\n this.#justDragged = false;\n return;\n }\n if (this.disabled()) return;\n this.selectedId.set(event.id);\n this.sdSelect.emit(event);\n }\n\n /** Press on an item: a new gesture, and the pickup point of a possible drag. */\n protected onPressItem(domEvent: MouseEvent | TouchEvent): void {\n this.#justDragged = false;\n this.#pickup = sdCalendarPointOf(domEvent);\n }\n\n protected onItemKeydown(domEvent: KeyboardEvent, item: SdCalendarItemView<T>): void {\n const key = domEvent.key;\n if (key === 'Enter' || key === ' ') {\n domEvent.preventDefault();\n this.selectItem(item.event, domEvent);\n return;\n }\n if (key === 'Escape') {\n domEvent.preventDefault();\n domEvent.stopPropagation();\n this.selectedId.set(null);\n this.gridElement()?.nativeElement.focus();\n return;\n }\n if (!domEvent.altKey || !key.startsWith('Arrow')) return;\n domEvent.preventDefault();\n domEvent.stopPropagation();\n const placement = item.placement;\n let target: SdCalendarTarget | null = null;\n let resize = false;\n if (key === 'ArrowLeft' || key === 'ArrowRight') {\n target = this.#shifted(placement, (key === 'ArrowRight') !== this.#rtl() ? 1 : -1, 0);\n } else if (placement.inGrid) {\n const delta = sdCalendarMoveStep(this.stepValue()) * (key === 'ArrowDown' ? 1 : -1);\n resize = domEvent.shiftKey;\n target = resize\n ? {\n ...sdCalendarTargetOf(placement),\n endMinutes: sdCalendarResizeEnd(placement.startMinutes, placement.endMinutes, delta, this.stepValue()),\n }\n : this.#shifted(placement, 0, delta);\n }\n // why: a change of the end is a 'resize' whichever input made it, as in sd-scheduler (review RX #2).\n if (target) void this.#runMove(item.event.id, target, resize ? 'resize' : 'keyboard', true);\n }\n\n // ---- create (§9.2) ----\n\n protected onGridPointerDown(domEvent: PointerEvent): void {\n if (!domEvent.isPrimary || domEvent.button !== 0) return;\n const target = domEvent.target as Element;\n const column = target.closest<HTMLElement>('[data-day-column]');\n if (!column || target.closest('[data-event-id], [data-resize-handle]')) return;\n this.#press = {\n day: column.dataset['date']!,\n anchor: this.#minutesAt(domEvent.clientY, column),\n x: domEvent.clientX,\n y: domEvent.clientY,\n touch: domEvent.pointerType === 'touch',\n column,\n moved: false,\n };\n try {\n column.setPointerCapture(domEvent.pointerId);\n } catch {\n // why: a synthetic or already released pointer cannot be captured; the press still works without capture.\n }\n document.addEventListener('keydown', this.#onDocumentKeydown, true);\n }\n\n protected onGridPointerMove(domEvent: PointerEvent): void {\n const press = this.#press;\n if (!press) return;\n if (!press.moved && Math.hypot(domEvent.clientX - press.x, domEvent.clientY - press.y) < CLICK_SLOP) return;\n press.moved = true;\n // §12: on touch a vertical move scrolls; there is no sweep.\n if (press.touch || !this.canCreate() || this.#operation.busy() || this.#outOfRange(press.day)) return;\n const span = sdCalendarSweep(press.anchor, this.#minutesAt(domEvent.clientY, press.column), this.stepValue());\n this.#ghost.set({ ...span, day: press.day, pending: false, blocked: !this.#creatable(press.day, span) });\n }\n\n protected onGridPointerUp(domEvent?: PointerEvent): void {\n const press = this.#press;\n if (!press) return;\n this.#press = null;\n document.removeEventListener('keydown', this.#onDocumentKeydown, true);\n // §12: a horizontal touch swipe of at least 60px on the day grid moves one day.\n if (press.touch && domEvent && this.displayView() === 'day' && this.#swipe(press, domEvent)) return;\n const ghost = this.#ghost();\n if (!this.#operation.busy()) this.#ghost.set(null);\n // §9.1: a press on an empty slot clears the selection; with option.create it also creates there.\n this.selectedId.set(null);\n if (this.canCreate() && this.#outOfRange(press.day)) {\n this.#announce(this.#i18n.t('core.component.calendar.out-of-range'));\n return;\n }\n if (press.moved && (press.touch || !ghost)) return;\n const span = press.moved && ghost ? { start: ghost.start, end: ghost.end } : sdCalendarSlot(press.anchor, this.stepValue());\n void this.#create(press.day, span);\n }\n\n protected pickDay(day: string): void {\n this.date.set(day);\n this.#announceTitle();\n }\n\n protected onStripPointerDown(domEvent: PointerEvent): void {\n this.#stripPress = { x: domEvent.clientX, y: domEvent.clientY };\n }\n\n /** §12: a horizontal swipe of the strip moves one week. */\n protected onStripPointerUp(domEvent: PointerEvent): void {\n const press = this.#stripPress;\n this.#stripPress = null;\n const dx = press ? domEvent.clientX - press.x : 0;\n if (!press || Math.abs(dx) < SWIPE || Math.abs(dx) <= Math.abs(domEvent.clientY - press.y)) return;\n this.date.set(sdCalendarAddDays(this.#anchor(), dx < 0 ? 7 : -7));\n this.#announceTitle();\n }\n\n protected onGridPointerCancel(): void {\n this.#press = null;\n document.removeEventListener('keydown', this.#onDocumentKeydown, true);\n if (!this.#operation.busy()) this.#ghost.set(null);\n }\n\n // ---- grid keyboard (§9.7) ----\n\n protected onGridFocus(): void {\n if (this.#cursor()) return;\n const days = this.days();\n const day = days.includes(this.#anchor()) ? this.#anchor() : days[0];\n const start =\n sdCalendarWorkingRanges(this.#workingHours(), sdCalendarWeekday(day))?.[0]?.start ??\n sdCalendarTimeToMinutes(ɵSD_CALENDAR_DEFAULTS.scrollTime)!;\n this.#cursor.set({ day, minutes: sdCalendarSlot(start, this.stepValue()).start });\n }\n\n protected onGridKeydown(domEvent: KeyboardEvent): void {\n if (domEvent.target !== domEvent.currentTarget) return;\n this.onGridFocus();\n const cursor = this.#cursor()!;\n const step = this.stepValue();\n const key = domEvent.key;\n let next: { day: string; minutes: number };\n switch (key) {\n case 'ArrowUp':\n case 'ArrowDown':\n next = { day: cursor.day, minutes: Math.min(1440 - step, Math.max(0, cursor.minutes + (key === 'ArrowDown' ? step : -step))) };\n break;\n case 'ArrowLeft':\n case 'ArrowRight':\n next = { day: this.#neighbourDay(cursor.day, (key === 'ArrowRight') !== this.#rtl() ? 1 : -1), minutes: cursor.minutes };\n break;\n case 'Home':\n case 'End': {\n const working = sdCalendarWorkingRanges(this.#workingHours(), sdCalendarWeekday(cursor.day)) ?? [];\n const minutes = key === 'Home' ? (working[0]?.start ?? 0) : (working[working.length - 1]?.end ?? 1440) - step;\n next = { day: cursor.day, minutes: sdCalendarSlot(minutes, step).start };\n break;\n }\n case 'PageUp':\n case 'PageDown': {\n const direction = key === 'PageDown' ? 1 : -1;\n this.shift(direction);\n next = { day: sdCalendarAddDays(cursor.day, direction * (this.displayView() === 'week' ? 7 : 1)), minutes: cursor.minutes };\n break;\n }\n case 't':\n case 'T':\n this.goToday();\n next = { day: this.today(), minutes: cursor.minutes };\n break;\n case 'Enter':\n case ' ':\n domEvent.preventDefault();\n void this.#create(cursor.day, { start: cursor.minutes, end: Math.min(1440, cursor.minutes + step) });\n return;\n default:\n return;\n }\n domEvent.preventDefault();\n this.#cursor.set(next);\n this.#announce(this.#slotLabel(next.day, next.minutes));\n afterNextRender(() => this.#revealCursor(), { injector: this.#injector });\n }\n\n // ---- month keyboard (§9.7) ----\n\n protected onCellKeydown(domEvent: KeyboardEvent, day: string): void {\n const key = domEvent.key;\n if (key === 'Enter' || key === ' ') {\n domEvent.preventDefault();\n this.openDay(day);\n return;\n }\n const week = this.monthWeeks()\n .find(row => row.some(cell => cell.day.day === day))\n ?.map(cell => cell.day.day) ?? [day];\n let next: string | null = null;\n if (key === 'ArrowLeft' || key === 'ArrowRight') next = sdCalendarAddDays(day, (key === 'ArrowRight') !== this.#rtl() ? 1 : -1);\n else if (key === 'ArrowUp' || key === 'ArrowDown') next = sdCalendarAddDays(day, key === 'ArrowDown' ? 7 : -7);\n else if (key === 'Home') next = week[0];\n else if (key === 'End') next = week[week.length - 1];\n else if (key === 'PageUp' || key === 'PageDown')\n next = sdCalendarAddMonthsKeepDay(day, (key === 'PageDown' ? 1 : -1) * (domEvent.shiftKey ? 12 : 1));\n if (!next) return;\n domEvent.preventDefault();\n const focus = next;\n this.#monthFocus.set(focus);\n if (!this.days().includes(focus)) this.date.set(focus);\n afterNextRender(() => this.#host.nativeElement.querySelector<HTMLElement>(`[role=\"gridcell\"][data-date=\"${focus}\"]`)?.focus(), {\n injector: this.#injector,\n });\n }\n\n // ---- drag (§9.3) ----\n\n /** Keeps the dragged element in place (the proposal is drawn instead) and records the real pointer. */\n protected readonly constrainDrag = (point: Point, _ref: DragRef, rect: DOMRect): Point => {\n // why: CDK 19 reports the constrained point in cdkDragMoved, so the real pointer is kept from here.\n this.#dragPointer = point;\n return { x: rect.left, y: rect.top };\n };\n\n protected onDragStarted(start: CdkDragStart, item: SdCalendarItemView<T>): void {\n const columns = Array.from(this.#host.nativeElement.querySelectorAll<HTMLElement>('[data-day-column]')).map(column => {\n const rect = column.getBoundingClientRect();\n return { day: column.dataset['date']!, left: rect.left, right: rect.right };\n });\n this.#dragSession = {\n id: item.event.id,\n placement: item.placement,\n title: item.event.title,\n color: item.color,\n customColor: item.customColor,\n start: this.#pickup ?? sdCalendarPointOf(start.event) ?? { x: 0, y: 0 },\n scrollTop: this.scroller()?.nativeElement.scrollTop ?? 0,\n columns,\n cancelled: false,\n };\n this.#failure.set(null);\n if (typeof TouchEvent !== 'undefined' && start.event instanceof TouchEvent) navigator.vibrate?.(10);\n document.addEventListener('keydown', this.#onDocumentKeydown, true);\n }\n\n protected onDragMoved(): void {\n this.#updateDragProposal();\n this.#edgeScroll();\n }\n\n protected onDragEnded(end: CdkDragEnd): void {\n end.source.reset();\n this.#stopEdgeScroll();\n document.removeEventListener('keydown', this.#onDocumentKeydown, true);\n const session = this.#dragSession;\n const proposal = this.#drag();\n this.#dragSession = null;\n this.#dragPointer = null;\n this.#drag.set(null);\n this.#justDragged = true;\n if (!session || !proposal || session.cancelled || proposal.outside) return;\n const target: SdCalendarTarget = {\n allDay: false,\n startDay: proposal.day,\n startMinutes: proposal.start,\n endDay: proposal.day,\n endMinutes: proposal.end,\n };\n void this.#runMove(session.id, target, 'drag', false);\n }\n\n // ---- resize (§9.4) ----\n\n protected onResizeDown(domEvent: PointerEvent, item: SdCalendarItemView<T>): void {\n domEvent.stopPropagation();\n if (!domEvent.isPrimary || !item.movable) return;\n this.#resizeSession = { id: item.event.id, placement: item.placement, y: domEvent.clientY };\n this.#failure.set(null);\n try {\n (domEvent.currentTarget as Element).setPointerCapture(domEvent.pointerId);\n } catch {\n // why: see onGridPointerDown.\n }\n document.addEventListener('keydown', this.#onDocumentKeydown, true);\n }\n\n protected onResizeMove(domEvent: PointerEvent): void {\n const session = this.#resizeSession;\n if (!session) return;\n const delta = ((domEvent.clientY - session.y) / this.#hourHeight()) * 60;\n const end = sdCalendarResizeEnd(session.placement.startMinutes, session.placement.endMinutes, delta, this.stepValue());\n this.#resize.set({ id: session.id, end });\n }\n\n protected onResizeUp(domEvent: PointerEvent): void {\n domEvent.stopPropagation();\n const session = this.#resizeSession;\n const resize = this.#resize();\n this.#resizeSession = null;\n this.#resize.set(null);\n document.removeEventListener('keydown', this.#onDocumentKeydown, true);\n if (!session || !resize) return;\n void this.#runMove(session.id, { ...sdCalendarTargetOf(session.placement), endMinutes: resize.end }, 'resize', false);\n }\n\n /** The browser took the pointer away (a scroll or a system gesture): the live resize is dropped. */\n protected onResizeCancel(): void {\n this.#resizeSession = null;\n this.#resize.set(null);\n document.removeEventListener('keydown', this.#onDocumentKeydown, true);\n }\n\n /** Height of a block, following a live resize. */\n protected blockHeight(block: SdCalendarBlockView<T>): string {\n const resize = this.#resize();\n return resize?.id === block.key ? blockHeight(resize.end - block.placement.startMinutes) : block.height;\n }\n\n /** Time line of a block, following a live resize. */\n protected blockTime(block: SdCalendarBlockView<T>): string {\n const resize = this.#resize();\n if (resize?.id !== block.key) return block.timeText;\n return `${sdCalendarClockText(block.placement.startMinutes)} – ${sdCalendarClockText(resize.end)}`;\n }\n\n protected isDragging(id: string): boolean {\n return this.#drag()?.id === id;\n }\n\n protected isFailed(id: string): boolean {\n return this.#failure()?.id === id;\n }\n\n protected spanTop(minutes: number): string {\n return offsetTop(minutes);\n }\n\n protected spanHeight(minutes: number): string {\n return blockHeight(minutes);\n }\n\n protected clockText(minutes: number): string {\n return sdCalendarClockText(minutes);\n }\n\n protected viewLabel(view: SdCalendarView): string {\n return this.#i18n.t(`core.component.calendar.view-${view}`);\n }\n\n protected childAutoId(kind: string): string | null {\n const root = this.rootAutoId();\n return root ? `${root}-${kind}` : null;\n }\n\n /** Name of the \"+N\" button of the all-day row: the visible \"+2\" leads it in every language (WCAG 2.5.3). */\n protected allDayMoreLabel(count: number, day: SdCalendarDayView): string {\n const visible = this.#i18n.t('core.component.calendar.more-short', { count });\n const more = this.#i18n.t('core.component.calendar.more', { count });\n return `${more.startsWith(visible) ? more : `${visible}, ${more}`}, ${day.label}`;\n }\n\n protected blocksOf(day: string): readonly SdCalendarBlockView<T>[] {\n return this.blocksByDay().get(day) ?? [];\n }\n\n // ---- pipeline (§9.5) ----\n\n async #runMove(id: string, target: SdCalendarTarget, source: SdCalendarMoveSource, keyboard: boolean): Promise<boolean> {\n const move = untracked(this.option).move;\n if (!move || untracked(this.locked) || untracked(this.#operation.busy)) return false;\n const placed = untracked(this.#placed).find(item => item.event.id === id);\n if (!placed || !sdCalendarAllows(move.movable, placed.event)) return false;\n const transform = untracked(this.transform);\n const from = sdCalendarRangeOf(placed.placement, this.#clock, transform);\n const to = sdCalendarRangeOf(target, this.#clock, transform);\n if (from.start === to.start && from.end === to.end && from.allDay === to.allDay) return false;\n if (this.#outOfRange(target.startDay) || this.#outOfRange(sdCalendarLastDayOf(target))) {\n this.#announce(this.#i18n.t('core.component.calendar.out-of-range'));\n return false;\n }\n const { event } = placed;\n return this.#runner.run<SdCalendarMoveRequest<T>>({\n id,\n title: event.title,\n recurring: !!event.occurrence,\n source,\n keyboard,\n // SC-06: the flag is evaluated once more right before the callback.\n allowed: () => sdCalendarAllows(move.movable, event),\n request: (scope, signal) => ({ event, from, to, source, scope, signal }),\n onMove: move.onMove,\n show: saving => this.#moving.set(saving === null ? null : { id, target, saving }),\n accept: request => {\n const moved: SdCalendarEvent<T> = { ...event, start: to.start, end: to.end, allDay: to.allDay };\n this.#loader.items.update(items => items.map(item => (item.id === event.id ? moved : item)));\n const visible = untracked(this.visible);\n if (target.startDay < visible.from || target.startDay > visible.to) this.date.set(target.startDay);\n this.sdMove.emit(request);\n return sdCalendarMovedText(event.title, target, from, to, source, this.#formats(), this.#t);\n },\n fail: (request, outcome) =>\n this.sdMoveError.emit(\n outcome.kind === 'error' ? { request, reason: 'error', error: outcome.error } : { request, reason: 'rejected' }\n ),\n });\n }\n\n async #create(day: string, span: SdCalendarSpan): Promise<void> {\n const create = untracked(this.option).create;\n if (!create || untracked(this.locked) || untracked(this.#operation.busy)) return;\n if (this.#outOfRange(day)) {\n this.#announce(this.#i18n.t('core.component.calendar.out-of-range'));\n return;\n }\n const range = this.#createRange(day, span);\n if (!sdCalendarAllows(create.creatable, range)) return;\n await this.#creator.run<SdCalendarRange, SdCalendarEvent<T>>({\n args: range,\n onCreate: create.onCreate,\n show: waiting => this.#ghost.set(waiting ? { day, start: span.start, end: span.end, pending: true, blocked: false } : null),\n accept: event => {\n this.#loader.items.update(items => [...items, event]);\n this.selectedId.set(event.id);\n },\n });\n }\n\n #createRange(day: string, span: SdCalendarSpan): SdCalendarRange {\n return sdCalendarRangeOf(\n { allDay: false, startDay: day, startMinutes: span.start, endDay: day, endMinutes: span.end },\n this.#clock,\n untracked(this.transform)\n );\n }\n\n #creatable(day: string, span: SdCalendarSpan): boolean {\n return sdCalendarAllows(untracked(this.option).create?.creatable, this.#createRange(day, span));\n }\n\n #startLoad(option: SdCalendarOption<T>, range: SdCalendarVisibleRange): void {\n this.#abortMove();\n // R1-G8: \"now\" may be stale when the minute timer is off (month, agenda); refresh it with every load.\n this.#now.set(this.#clock.now());\n void this.#loader\n .load(\n sdCalendarRangeKey(range),\n signal => option.dataSource.onLoad({ from: range.from, to: range.to, view: range.view, signal }),\n error => {\n this.#announce(this.#i18n.t('core.component.calendar.load-error'));\n this.sdLoadError.emit(error);\n }\n )\n .then(() => this.#focus.pending());\n }\n\n #abortMove(): void {\n if (!this.#operation.abort(['move'])) return;\n this.#moving.set(null);\n this.scopeBar.answer(null);\n }\n\n #abortCreate(): void {\n if (this.#operation.abort(['create'])) this.#ghost.set(null);\n }\n\n #targetOf(\n placed: SdCalendarPlaced<T>,\n to: { start: SdCalendarDateInput; end?: SdCalendarDateInput | null; allDay?: boolean }\n ): SdCalendarTarget | null {\n return sdCalendarMoveTarget(placed.placement, to, !!placed.event.allDay, this.#clock);\n }\n\n #shifted(placement: SdCalendarPlacement, days: number, minutes: number): SdCalendarTarget {\n if (placement.inGrid) {\n const duration = placement.endMinutes - placement.startMinutes;\n const start = minutes\n ? sdCalendarSnapMove(placement.startMinutes, minutes, duration, sdCalendarMoveStep(this.stepValue()))\n : placement.startMinutes;\n const day = sdCalendarAddDays(placement.startDay, days);\n return { allDay: false, startDay: day, startMinutes: start, endDay: day, endMinutes: start + duration };\n }\n return sdCalendarShiftDays(placement, days);\n }\n\n #updateDragProposal(): void {\n const session = this.#dragSession;\n const pointer = this.#dragPointer;\n if (!session || !pointer || session.cancelled) return;\n const { columns, placement } = session;\n const grid = this.gridElement()?.nativeElement.getBoundingClientRect();\n const outside = !grid || pointer.x < grid.left || pointer.x > grid.right || pointer.y < grid.top || pointer.y > grid.bottom;\n let column = columns.findIndex(item => pointer.x >= item.left && pointer.x < item.right);\n if (column < 0) column = pointer.x < (columns[0]?.left ?? 0) ? 0 : columns.length - 1;\n const scrolled = (this.scroller()?.nativeElement.scrollTop ?? 0) - session.scrollTop;\n const delta = ((pointer.y - session.start.y + scrolled) / this.#hourHeight()) * 60;\n const duration = placement.endMinutes - placement.startMinutes;\n const start = sdCalendarSnapMove(placement.startMinutes, delta, duration, sdCalendarMoveStep(this.stepValue()));\n const day = columns[column]?.day ?? placement.startDay;\n const { title, color, customColor } = session;\n this.#drag.set({ id: session.id, day, start, end: start + duration, title, outside, color, customColor });\n }\n\n /** Scrolls while the pointer is within 40px of the top or bottom of the scroll area, faster closer to it (§9.3). */\n #edgeScroll(): void {\n const scroller = this.scroller()?.nativeElement;\n this.#edge.update(scroller, scroller?.getBoundingClientRect() ?? null, this.#dragPointer, { x: false, y: true }, () => {\n if (!this.#dragSession) return;\n this.#updateDragProposal();\n this.#edgeScroll();\n });\n }\n\n #stopEdgeScroll(): void {\n this.#edge.stop();\n }\n\n /** Esc cancels a sweep, a drag or a resize. */\n readonly #onDocumentKeydown = (domEvent: KeyboardEvent): void => {\n if (domEvent.key !== 'Escape') return;\n this.#zone.run(() => {\n if (this.#press) {\n this.#press = null;\n if (!this.#operation.busy()) this.#ghost.set(null);\n }\n if (this.#dragSession) {\n this.#dragSession.cancelled = true;\n this.#drag.set(null);\n }\n if (this.#resizeSession) {\n this.#resizeSession = null;\n this.#resize.set(null);\n }\n });\n // A cancelled sweep or resize has nothing left to end it, so the listener goes now; a drag ends on its drop.\n if (!this.#press && !this.#dragSession && !this.#resizeSession) {\n document.removeEventListener('keydown', this.#onDocumentKeydown, true);\n }\n };\n\n #restoreFocus(id: string, origin: Element | null): void {\n this.#focus.restore(id, origin);\n }\n\n #revealCursor(): void {\n const scroller = this.scroller()?.nativeElement;\n const cursor = this.#cursor();\n if (!scroller || !cursor) return;\n const hour = this.#hourHeight();\n const head = scroller.querySelector<HTMLElement>('[data-head]')?.offsetHeight ?? 0;\n const top = (cursor.minutes / 60) * hour;\n const bottom = top + (this.stepValue() / 60) * hour;\n if (top < scroller.scrollTop) scroller.scrollTop = top;\n else if (head + bottom > scroller.scrollTop + scroller.clientHeight) scroller.scrollTop = head + bottom - scroller.clientHeight;\n }\n\n #neighbourDay(day: string, direction: 1 | -1): string {\n const days = this.days();\n const next = days[days.indexOf(day) + direction];\n if (next) return next;\n this.shift(direction);\n const shifted = this.days();\n return direction > 0 ? shifted[0] : shifted[shifted.length - 1];\n }\n\n /** Moves one day for a horizontal swipe; returns whether the press was one. */\n #swipe(press: { readonly x: number; readonly y: number }, domEvent: PointerEvent): boolean {\n const dx = domEvent.clientX - press.x;\n if (Math.abs(dx) < SWIPE || Math.abs(dx) <= Math.abs(domEvent.clientY - press.y)) return false;\n this.date.set(sdCalendarAddDays(this.#anchor(), dx < 0 ? 1 : -1));\n this.#announceTitle();\n return true;\n }\n\n #minutesAt(clientY: number, column: HTMLElement): number {\n const rect = column.getBoundingClientRect();\n return Math.min(1439, Math.max(0, ((clientY - rect.top) / this.#hourHeight()) * 60));\n }\n\n #hourHeight(): number {\n return parseFloat(getComputedStyle(this.#host.nativeElement).getPropertyValue('--sd-calendar-hour-height')) || HOUR_HEIGHT;\n }\n\n #rtl(): boolean {\n return sdCalendarIsRtl(this.#host.nativeElement);\n }\n\n #outOfRange(day: string): boolean {\n return sdCalendarOutOfRange(day, untracked(this.#minDay), untracked(this.#maxDay));\n }\n\n #slotLabel(day: string, minutes: number): string {\n return this.#i18n.t('core.component.calendar.slot-label', {\n weekday: this.#weekdayLong(day),\n date: this.#dateText(day, false),\n time: sdCalendarClockText(minutes),\n });\n }\n\n #scrollToStart(): void {\n const element = this.scroller()?.nativeElement;\n if (!element) return;\n const minutes = sdCalendarTimeToMinutes(this.scrollTime() ?? this.#configuration?.scrollTime) ?? this.#earliestWorkingMinute();\n element.scrollTop = sdCalendarInitialScroll(minutes, this.#hourHeight());\n }\n\n #earliestWorkingMinute(): number {\n const hours = this.#workingHours();\n const starts = this.days()\n .map(day => sdCalendarWorkingRanges(hours, sdCalendarWeekday(day))?.[0]?.start)\n .filter((start): start is number => start !== undefined);\n return starts.length ? Math.min(...starts) : sdCalendarTimeToMinutes(ɵSD_CALENDAR_DEFAULTS.scrollTime)!;\n }\n\n #announceTitle(): void {\n this.#announce(untracked(this.title));\n }\n\n #announce(message: string): void {\n this.#announcer.announce(message);\n }\n\n #navLabel(direction: 'prev' | 'next'): string {\n const view = this.displayView();\n if (view === 'agenda') {\n return this.#i18n.t(`core.component.calendar.${direction}-agenda`, { count: sdCalendarClampAgendaDays(this.agendaDays()) });\n }\n return this.#i18n.t(`core.component.calendar.${direction}-${view}`);\n }\n\n #weekdayLong(day: string): string {\n return sdCalendarWeekdayLong(this.#formats(), day);\n }\n\n #dateText(day: string, withYear: boolean): string {\n return sdCalendarDateText(this.#formats(), day, withYear);\n }\n\n #dayView(day: string): SdCalendarDayView {\n const weekday = sdCalendarWeekday(day);\n const holiday = this.#holidays().get(day) ?? null;\n const working = sdCalendarWorkingRanges(this.#workingHours(), weekday);\n const off = sdCalendarIsOffDay(day, holiday, this.#workingHours());\n const min = this.#minDay();\n const max = this.#maxDay();\n return {\n day,\n dayNumber: sdCalendarDayParts(day)!.day,\n weekdayShort: this.#i18n.t(`core.component.calendar.weekday-short-${weekday}`),\n label: `${this.#weekdayLong(day)} ${this.#dateText(day, false)}`,\n today: day === this.today(),\n off,\n outOfRange: (!!min && day < min) || (!!max && day > max),\n holiday,\n offSegments: off ? [] : sdCalendarOffSegments(working),\n };\n }\n\n #itemView(placed: SdCalendarPlaced<T>): SdCalendarItemView<T> {\n const { event, placement } = placed;\n const { color, customColor } = sdCalendarColor(event.color);\n const start = sdCalendarClockText(placement.startMinutes);\n const end = sdCalendarClockText(placement.endMinutes);\n const recurring = !!event.occurrence;\n let label: string;\n if (placement.allDay) {\n label = this.#i18n.t('core.component.calendar.event-label-all-day', {\n title: event.title,\n from: this.#dateText(placement.firstDay, false),\n to: this.#dateText(placement.lastDay, false),\n });\n } else {\n label = this.#i18n.t('core.component.calendar.event-label', {\n title: event.title,\n weekday: this.#weekdayLong(placement.startDay),\n date: this.#dateText(placement.startDay, false),\n start,\n end: placement.inGrid ? end : `${this.#dateText(placement.endDay, false)} ${end}`,\n });\n }\n if (recurring) label = `${label}, ${this.#i18n.t('core.component.calendar.recurring')}`;\n const root = this.rootAutoId();\n const move = this.option().move;\n return {\n key: event.id,\n event,\n placement,\n range: sdCalendarRangeOf(placement, this.#clock, this.transform()),\n label,\n autoId: root ? `${root}-event-${encodeURIComponent(event.id)}` : null,\n color,\n customColor,\n recurring,\n past: this.dimPast() && placement.endInstant <= this.#nowInstant(),\n pending: placed.pending,\n saving: placed.saving,\n movable: !!move && !this.locked() && sdCalendarAllows(move.movable, event),\n timeText: placement.allDay ? this.#i18n.t('core.component.calendar.all-day') : `${start} – ${end}`,\n };\n }\n\n #blockView(placed: SdCalendarPlaced<T>, column: number, columns: number): SdCalendarBlockView<T> {\n const item = this.#itemView(placed);\n const { startMinutes, endMinutes } = placed.placement;\n const pixels = Math.max(((endMinutes - startMinutes) / 60) * HOUR_HEIGHT - 2, 16);\n const size = pixels >= 62 ? 'lg' : pixels >= 34 ? 'md' : pixels >= 20 ? 'sm' : 'xs';\n return {\n ...item,\n top: `calc(${offsetTop(startMinutes)} + 1px)`,\n height: blockHeight(endMinutes - startMinutes),\n column,\n columns,\n size,\n context: {\n $implicit: placed.event,\n event: placed.event,\n range: item.range,\n view: this.displayView(),\n compact: pixels < 34,\n pending: placed.pending,\n },\n };\n }\n\n /** Cells of one month row; `seen` carries the events that already have their `data-autoid` (first segment only). */\n #monthWeek(week: readonly string[], month: number, seen: Set<string>): readonly SdCalendarMonthCell<T>[] {\n const placed = this.#inRange().filter(({ placement }) => placement.lastDay >= week[0] && placement.firstDay <= week[week.length - 1]);\n const spanning = placed.filter(({ placement }) => !placement.inGrid);\n const layout = sdCalendarAllDayLayout(\n spanning.map(({ placement }) => placement),\n week,\n Number.POSITIVE_INFINITY\n );\n return week.map((day, column) => {\n const view = this.#dayView(day);\n const slots: (SdCalendarMonthLine<T> | null)[] = [];\n for (const bar of layout.bars) {\n if (bar.from > column || bar.to < column) continue;\n const item = firstSegment(this.#itemView(spanning[bar.index]), seen);\n const { placement, event } = spanning[bar.index];\n slots[bar.row] = {\n key: `${event.id}`,\n item,\n bar: true,\n showTitle: column === bar.from,\n joinStart: placement.firstDay < day,\n joinEnd: placement.lastDay > day,\n text: placement.allDay ? event.title : `${sdCalendarClockText(placement.startMinutes)} ${event.title}`,\n };\n }\n const lines: SdCalendarMonthLine<T>[] = Array.from(\n slots,\n (slot, row) => slot ?? { key: `gap-${row}`, item: null, bar: false, showTitle: false, joinStart: false, joinEnd: false, text: '' }\n );\n const timed = placed\n .filter(({ placement }) => placement.inGrid && placement.startDay === day)\n .sort((a, b) => a.placement.startMinutes - b.placement.startMinutes);\n for (const entry of timed) {\n lines.push({\n key: entry.event.id,\n item: firstSegment(this.#itemView(entry), seen),\n bar: false,\n showTitle: true,\n joinStart: false,\n joinEnd: false,\n text: `${sdCalendarClockText(entry.placement.startMinutes)} ${entry.event.title}`,\n });\n }\n const limit = view.holiday ? 2 : 3;\n const real = lines.filter(line => line.item).length;\n const shown = lines.length > limit ? lines.slice(0, limit - 1) : lines;\n const more = real - shown.filter(line => line.item).length;\n const events = placed.filter(({ placement }) => placement.firstDay <= day && placement.lastDay >= day).map(({ event }) => event);\n const label = view.holiday\n ? this.#i18n.t('core.component.calendar.day-label-holiday', {\n weekday: this.#weekdayLong(day),\n date: this.#dateText(day, false),\n holiday: view.holiday.label,\n count: events.length,\n })\n : this.#i18n.t('core.component.calendar.day-label', {\n weekday: this.#weekdayLong(day),\n date: this.#dateText(day, false),\n count: events.length,\n });\n const inMonth = sdCalendarDayParts(day)!.month === month;\n const dots = new Map<string, { color: string; customColor: string | null }>();\n for (const event of events) {\n const color = event.color ?? 'primary';\n if (dots.size < 3 && !dots.has(color)) dots.set(color, sdCalendarColor(color));\n }\n return {\n day: view,\n inMonth,\n label,\n lines: shown,\n more,\n dots: [...dots.values()],\n context: { $implicit: day, date: day, events, holiday: view.holiday, today: view.today, inMonth, off: view.off },\n };\n });\n }\n}\n\n/**\n * Keeps `data-autoid` on the first segment of an event only: a multi-day event repeats in month cells and agenda days,\n * and an E2E selector must stay unique (R1-G5).\n */\nfunction firstSegment<V extends { readonly key: string; readonly autoId: string | null }>(item: V, seen: Set<string>): V {\n if (!item.autoId) return item;\n if (seen.has(item.key)) return { ...item, autoId: null };\n seen.add(item.key);\n return item;\n}\n\nfunction offsetTop(minutes: number): string {\n return `calc(var(--sd-calendar-hour-height) * ${minutes / 60})`;\n}\n\nfunction blockHeight(minutes: number): string {\n return `max(calc(var(--sd-calendar-hour-height) * ${minutes / 60} - 2px), 16px)`;\n}\n","@let _view = displayView();\n@let _disabled = disabled();\n@let _selected = selectedId();\n@let _failure = failure();\n<section\n class=\"sd-calendar\"\n role=\"region\"\n [class.sd-calendar--compact]=\"compact()\"\n [attr.data-compact]=\"compact() || null\"\n [attr.aria-label]=\"regionLabel()\"\n [attr.data-autoid]=\"rootAutoId()\"\n [attr.data-view]=\"activeView()\"\n [attr.data-display]=\"_view\"\n [attr.data-from]=\"visible().from\"\n [attr.data-to]=\"visible().to\">\n <header class=\"sd-calendar__toolbar\">\n <div class=\"sd-calendar__nav\">\n <button type=\"button\" class=\"sd-calendar__today\" data-action=\"today\" [attr.data-autoid]=\"childAutoId('today')\" (click)=\"goToday()\">\n {{ 'core.component.calendar.today' | sdTranslate }}\n </button>\n <button\n type=\"button\"\n class=\"sd-calendar__icon-button\"\n data-action=\"prev\"\n [attr.aria-label]=\"prevLabel()\"\n [attr.data-autoid]=\"childAutoId('prev')\"\n [disabled]=\"prevDisabled()\"\n (click)=\"shift(-1)\">\n <sd-icon name=\"chevron_left\" size=\"22px\" aria-hidden=\"true\" />\n </button>\n <button\n type=\"button\"\n class=\"sd-calendar__icon-button\"\n data-action=\"next\"\n [attr.aria-label]=\"nextLabel()\"\n [attr.data-autoid]=\"childAutoId('next')\"\n [disabled]=\"nextDisabled()\"\n (click)=\"shift(1)\">\n <sd-icon name=\"chevron_right\" size=\"22px\" aria-hidden=\"true\" />\n </button>\n </div>\n <div class=\"sd-calendar__title\" data-title>{{ title() }}</div>\n <div class=\"sd-calendar__views\" role=\"group\" [attr.aria-label]=\"'core.component.calendar.views' | sdTranslate\">\n @for (option of viewOptions(); track option) {\n <button\n type=\"button\"\n class=\"sd-calendar__view\"\n [attr.data-view-option]=\"option\"\n [attr.data-autoid]=\"childAutoId('view-' + option)\"\n [attr.aria-pressed]=\"option === _view\"\n (click)=\"setView(option)\">\n {{ viewLabel(option) }}\n </button>\n }\n </div>\n </header>\n\n @if (busy()) {\n <div class=\"sd-calendar__progress\" role=\"progressbar\" [attr.aria-label]=\"'core.component.calendar.label' | sdTranslate\">\n <span class=\"sd-calendar__progress-bar\"></span>\n </div>\n }\n @if (phase() === 'error') {\n <div class=\"sd-calendar__band\" data-band=\"load-error\">\n <sd-icon class=\"sd-calendar__band-icon\" name=\"error\" size=\"18px\" aria-hidden=\"true\" />\n <span class=\"sd-calendar__band-text\">{{ 'core.component.calendar.load-error' | sdTranslate }}</span>\n <button type=\"button\" class=\"sd-calendar__band-button\" data-action=\"retry\" [attr.data-autoid]=\"childAutoId('retry')\" (click)=\"reload()\">\n {{ 'core.common.retry' | sdTranslate }}\n </button>\n </div>\n }\n @if (_failure) {\n <div class=\"sd-calendar__band\" data-band=\"move-error\">\n <sd-icon class=\"sd-calendar__band-icon\" name=\"error\" size=\"18px\" aria-hidden=\"true\" />\n <span class=\"sd-calendar__band-text\">{{ _failure.message }}</span>\n <button type=\"button\" class=\"sd-calendar__band-button\" data-action=\"dismiss\" [attr.data-autoid]=\"childAutoId('dismiss')\" (click)=\"dismissFailure()\">\n {{ 'core.common.dismiss' | sdTranslate }}\n </button>\n </div>\n }\n @if (strip().length) {\n <div class=\"sd-calendar__strip\" data-day-strip (pointerdown)=\"onStripPointerDown($event)\" (pointerup)=\"onStripPointerUp($event)\">\n @for (cell of strip(); track cell.day) {\n <button\n type=\"button\"\n class=\"sd-calendar__strip-day\"\n [attr.data-date]=\"cell.day\"\n [attr.data-today]=\"cell.today || null\"\n [attr.aria-current]=\"cell.current ? 'date' : null\"\n [attr.aria-label]=\"cell.label\"\n (click)=\"pickDay(cell.day)\">\n <span class=\"sd-calendar__strip-weekday\">{{ cell.weekdayShort }}</span>\n <span class=\"sd-calendar__strip-number\">{{ cell.dayNumber }}</span>\n @if (cell.events) {\n <span class=\"sd-calendar__strip-dot\" data-dot aria-hidden=\"true\"></span>\n } @else {\n <span class=\"sd-calendar__strip-dot sd-calendar__strip-dot--empty\" aria-hidden=\"true\"></span>\n }\n </button>\n }\n </div>\n }\n <div class=\"sd-calendar__status sd-visually-hidden\" role=\"status\" aria-live=\"polite\" aria-atomic=\"true\">{{ announcement() }}</div>\n <span class=\"sd-visually-hidden\" [id]=\"gridInstructionsId\">{{ 'core.component.calendar.grid-instructions' | sdTranslate }}</span>\n <span class=\"sd-visually-hidden\" [id]=\"eventInstructionsId\">{{ 'core.component.calendar.event-instructions' | sdTranslate }}</span>\n @if (scopeBar.asking(); as _ask) {\n <div class=\"sd-calendar__scope\" role=\"alertdialog\" [attr.aria-labelledby]=\"scopeMessageId\" (keydown)=\"scopeBar.onKeydown($event)\">\n <p class=\"sd-calendar__scope-message\" [id]=\"scopeMessageId\">\n {{ 'core.component.calendar.scope-message' | sdTranslate: { title: _ask.title } }}\n </p>\n <div class=\"sd-calendar__scope-actions\">\n <button type=\"button\" class=\"sd-calendar__scope-button\" data-scope=\"this\" [attr.data-autoid]=\"childAutoId('scope-this')\" (click)=\"scopeBar.answer('this')\">\n {{ 'core.component.calendar.scope-this' | sdTranslate }}\n </button>\n <button\n type=\"button\"\n class=\"sd-calendar__scope-button\"\n data-scope=\"following\"\n [attr.data-autoid]=\"childAutoId('scope-following')\"\n (click)=\"scopeBar.answer('following')\">\n {{ 'core.component.calendar.scope-following' | sdTranslate }}\n </button>\n <button type=\"button\" class=\"sd-calendar__scope-button\" data-scope=\"all\" [attr.data-autoid]=\"childAutoId('scope-all')\" (click)=\"scopeBar.answer('all')\">\n {{ 'core.component.calendar.scope-all' | sdTranslate }}\n </button>\n <button\n type=\"button\"\n class=\"sd-calendar__scope-button sd-calendar__scope-button--cancel\"\n data-scope=\"cancel\"\n [attr.data-autoid]=\"childAutoId('scope-cancel')\"\n (click)=\"scopeBar.answer(null)\">\n {{ 'core.common.cancel' | sdTranslate }}\n </button>\n </div>\n </div>\n }\n\n @if (invalid()) {\n <sd-data-state class=\"sd-calendar__invalid\" state=\"error\" compact [title]=\"'core.component.calendar.invalid-data' | sdTranslate\" />\n } @else if (_view === 'week' || _view === 'day') {\n @let _days = dayViews();\n @let _allDay = allDay();\n @let _ghost = ghost();\n @let _proposal = dragProposal();\n @let _cursor = cursor();\n <div\n #scroller\n class=\"sd-calendar__scroller\"\n data-region=\"scroller\"\n [style.--sd-calendar-days]=\"_days.length\"\n [style.--sd-calendar-print-start]=\"printHours().start\"\n [style.--sd-calendar-print-hours]=\"printHours().hours\">\n <div class=\"sd-calendar__head\" data-head>\n @if (_view === 'week') {\n <div class=\"sd-calendar__day-headers\">\n <div class=\"sd-calendar__corner\" data-zone>{{ zoneLabel() }}</div>\n @for (day of _days; track day.day) {\n <div class=\"sd-calendar__day-header\" data-day-header [attr.data-date]=\"day.day\" [attr.data-today]=\"day.today || null\">\n <span class=\"sd-calendar__weekday\">{{ day.weekdayShort }}</span>\n <button type=\"button\" class=\"sd-calendar__day-number\" [attr.aria-label]=\"day.label\" (click)=\"openDay(day.day)\">\n {{ day.dayNumber }}\n </button>\n @if (day.holiday; as holiday) {\n <span class=\"sd-calendar__holiday\" [attr.data-holiday]=\"holiday.type\" [attr.title]=\"holiday.label\">{{ holiday.label }}</span>\n }\n </div>\n }\n </div>\n }\n <div class=\"sd-calendar__all-day\">\n <div class=\"sd-calendar__all-day-label\">\n @if (_view === 'day') {\n <span class=\"sd-calendar__zone\" data-zone>{{ zoneLabel() }}</span>\n }\n {{ 'core.component.calendar.all-day' | sdTranslate }}\n </div>\n <div class=\"sd-calendar__all-day-grid\">\n @for (bar of _allDay.bars; track bar.key) {\n <div\n class=\"sd-calendar__bar\"\n role=\"button\"\n [attr.tabindex]=\"_disabled ? -1 : 0\"\n [attr.aria-label]=\"bar.label\"\n [attr.aria-describedby]=\"eventInstructionsId\"\n [attr.data-event-id]=\"bar.event.id\"\n [attr.data-autoid]=\"bar.autoId\"\n [attr.data-start]=\"bar.range.start\"\n [attr.data-end]=\"bar.range.end\"\n [attr.data-all-day]=\"bar.placement.allDay\"\n [attr.data-color]=\"bar.color\"\n [attr.data-past]=\"bar.past || null\"\n [attr.data-pending]=\"bar.pending || null\"\n [attr.data-selected]=\"bar.key === _selected || null\"\n [attr.data-failed]=\"isFailed(bar.key) || null\"\n [attr.data-clipped-start]=\"bar.clippedStart || null\"\n [attr.data-clipped-end]=\"bar.clippedEnd || null\"\n [style.--sd-calendar-event-color]=\"bar.customColor\"\n [style.grid-column]=\"bar.from + 1 + ' / ' + (bar.to + 2)\"\n [style.grid-row]=\"bar.row + 1\"\n (click)=\"selectItem(bar.event, $event)\"\n (keydown)=\"onItemKeydown($event, bar)\">\n @if (bar.clippedStart) {\n <sd-icon class=\"sd-calendar__clip\" name=\"chevron_left\" size=\"16px\" aria-hidden=\"true\" />\n }\n <span class=\"sd-calendar__dot\" aria-hidden=\"true\"></span>\n @if (bar.recurring) {\n <sd-icon class=\"sd-calendar__repeat\" name=\"repeat\" size=\"13px\" aria-hidden=\"true\" />\n }\n <span class=\"sd-calendar__bar-title\">{{ bar.text }}</span>\n @if (bar.saving) {\n <sd-icon class=\"sd-calendar__sync\" name=\"sync\" size=\"14px\" aria-hidden=\"true\" />\n }\n @if (_view === 'day' && bar.spanText) {\n <span class=\"sd-calendar__bar-span\">{{ bar.spanText }}</span>\n }\n @if (bar.clippedEnd) {\n <sd-icon class=\"sd-calendar__clip\" name=\"chevron_right\" size=\"16px\" aria-hidden=\"true\" />\n }\n </div>\n }\n @for (count of _allDay.more; track $index) {\n @if (count) {\n <button\n type=\"button\"\n class=\"sd-calendar__more\"\n data-more\n [attr.data-date]=\"_days[$index].day\"\n [style.grid-column]=\"$index + 1\"\n [style.grid-row]=\"_allDay.rows + 1\"\n [attr.aria-label]=\"allDayMoreLabel(count, _days[$index])\"\n (click)=\"openDay(_days[$index].day)\">\n {{ 'core.component.calendar.more-short' | sdTranslate: { count } }}\n </button>\n }\n }\n </div>\n </div>\n </div>\n <div class=\"sd-calendar__body\">\n <div class=\"sd-calendar__gutter\" aria-hidden=\"true\">\n @for (hour of hours; track hour) {\n <span class=\"sd-calendar__hour\" [style.top]=\"'calc(var(--sd-calendar-hour-height) * ' + hour + ')'\">{{ hour < 10 ? '0' + hour : hour }}:00</span>\n }\n </div>\n <div\n #grid\n class=\"sd-calendar__columns\"\n data-region=\"time-grid\"\n role=\"group\"\n tabindex=\"0\"\n [class.sd-calendar__columns--create]=\"canCreate()\"\n [class.sd-calendar__columns--blocked]=\"!!ghost()?.blocked\"\n [attr.aria-label]=\"title()\"\n [attr.aria-describedby]=\"gridInstructionsId\"\n [attr.aria-activedescendant]=\"_cursor ? cursorId : null\"\n [attr.aria-busy]=\"busy() || null\"\n [attr.aria-disabled]=\"_disabled || null\"\n (focus)=\"onGridFocus()\"\n (keydown)=\"onGridKeydown($event)\"\n (pointerdown)=\"onGridPointerDown($event)\"\n (pointermove)=\"onGridPointerMove($event)\"\n (pointerup)=\"onGridPointerUp($event)\"\n (pointercancel)=\"onGridPointerCancel()\">\n @for (day of _days; track day.day; let column = $index) {\n <div\n class=\"sd-calendar__column\"\n data-day-column\n [attr.data-date]=\"day.day\"\n [attr.data-today]=\"day.today || null\"\n [attr.data-off]=\"day.off || null\"\n [attr.data-out-of-range]=\"day.outOfRange || null\">\n @for (segment of day.offSegments; track segment.start) {\n <div\n class=\"sd-calendar__off\"\n data-off-hours\n aria-hidden=\"true\"\n [style.top]=\"spanTop(segment.start)\"\n [style.height]=\"'calc(var(--sd-calendar-hour-height) * ' + (segment.end - segment.start) / 60 + ')'\"></div>\n }\n @if (skeleton()) {\n @for (shape of skeletonBlocks; track $index) {\n @if (shape[0] === column) {\n <div class=\"sd-calendar__skeleton\" data-skeleton aria-hidden=\"true\" [style.top]=\"spanTop(shape[1])\" [style.height]=\"spanHeight(shape[2])\"></div>\n }\n }\n }\n @if (_cursor && _cursor.day === day.day) {\n <div\n class=\"sd-calendar__cursor\"\n data-cursor\n [id]=\"cursorId\"\n [attr.aria-label]=\"cursorLabel()\"\n [style.top]=\"spanTop(_cursor.minutes)\"\n [style.height]=\"'calc(var(--sd-calendar-hour-height) * ' + stepValue() / 60 + ')'\">\n {{ clockText(_cursor.minutes) }}\n </div>\n }\n @for (block of blocksOf(day.day); track block.key) {\n <div\n class=\"sd-calendar__event\"\n role=\"button\"\n cdkDrag\n [cdkDragDisabled]=\"!block.movable\"\n [cdkDragStartDelay]=\"dragDelay\"\n [cdkDragConstrainPosition]=\"constrainDrag\"\n [attr.tabindex]=\"_disabled ? -1 : 0\"\n [attr.aria-label]=\"block.label\"\n [attr.aria-describedby]=\"eventInstructionsId\"\n [attr.data-event-id]=\"block.event.id\"\n [attr.data-autoid]=\"block.autoId\"\n [attr.data-start]=\"block.range.start\"\n [attr.data-end]=\"block.range.end\"\n [attr.data-all-day]=\"false\"\n [attr.data-color]=\"block.color\"\n [attr.data-size]=\"block.size\"\n [attr.data-past]=\"block.past || null\"\n [attr.data-pending]=\"block.pending || null\"\n [attr.data-selected]=\"block.key === _selected || null\"\n [attr.data-failed]=\"isFailed(block.key) || null\"\n [attr.data-dragging]=\"isDragging(block.key) || null\"\n [attr.data-movable]=\"block.movable || null\"\n [style.--sd-calendar-event-color]=\"block.customColor\"\n [style.--sd-calendar-column]=\"block.column\"\n [style.--sd-calendar-columns]=\"block.columns\"\n [style.top]=\"block.top\"\n [style.height]=\"blockHeight(block)\"\n (cdkDragStarted)=\"onDragStarted($event, block)\"\n (cdkDragMoved)=\"onDragMoved()\"\n (cdkDragEnded)=\"onDragEnded($event)\"\n (mousedown)=\"onPressItem($event)\"\n (touchstart)=\"onPressItem($event)\"\n (click)=\"selectItem(block.event, $event)\"\n (keydown)=\"onItemKeydown($event, block)\">\n <span class=\"sd-calendar__dot\" aria-hidden=\"true\"></span>\n @if (eventTemplate(); as _template) {\n <div class=\"sd-calendar__event-content\">\n <ng-container [ngTemplateOutlet]=\"_template.template\" [ngTemplateOutletContext]=\"block.context\" />\n </div>\n } @else {\n <div class=\"sd-calendar__event-content\">\n <span class=\"sd-calendar__event-title\">\n @if (block.recurring) {\n <sd-icon class=\"sd-calendar__repeat\" name=\"repeat\" size=\"13px\" aria-hidden=\"true\" />\n }\n {{ block.event.title }}@if (block.size === 'sm' || block.size === 'xs') {\n <span>, {{ block.timeText.slice(0, 5) }}</span>\n }\n </span>\n @if (block.size === 'lg' || block.size === 'md') {\n <span class=\"sd-calendar__event-time\">{{ blockTime(block) }}</span>\n }\n </div>\n }\n @if (block.saving) {\n <sd-icon class=\"sd-calendar__sync\" name=\"sync\" size=\"14px\" aria-hidden=\"true\" />\n }\n @if (block.movable) {\n <div\n class=\"sd-calendar__resize\"\n data-resize-handle\n aria-hidden=\"true\"\n (mousedown)=\"$event.stopPropagation()\"\n (touchstart)=\"$event.stopPropagation()\"\n (pointerdown)=\"onResizeDown($event, block)\"\n (pointermove)=\"onResizeMove($event)\"\n (pointerup)=\"onResizeUp($event)\"\n (pointercancel)=\"onResizeCancel()\"></div>\n }\n </div>\n }\n @if (_ghost && _ghost.day === day.day) {\n <div\n class=\"sd-calendar__ghost\"\n data-create-ghost\n aria-hidden=\"true\"\n [attr.data-pending]=\"_ghost.pending || null\"\n [attr.data-blocked]=\"_ghost.blocked || null\"\n [style.top]=\"spanTop(_ghost.start)\"\n [style.height]=\"spanHeight(_ghost.end - _ghost.start)\">\n <span class=\"sd-calendar__event-title\">{{ 'core.component.calendar.new-event' | sdTranslate }}</span>\n <span class=\"sd-calendar__event-time\">{{ clockText(_ghost.start) }} – {{ clockText(_ghost.end) }}</span>\n @if (_ghost.pending) {\n <sd-icon class=\"sd-calendar__sync\" name=\"sync\" size=\"14px\" aria-hidden=\"true\" />\n }\n </div>\n }\n @if (_proposal && !_proposal.outside && _proposal.day === day.day) {\n <div\n class=\"sd-calendar__proposal\"\n data-drag-proposal\n aria-hidden=\"true\"\n [attr.data-color]=\"_proposal.color\"\n [style.--sd-calendar-event-color]=\"_proposal.customColor\"\n [style.top]=\"spanTop(_proposal.start)\"\n [style.height]=\"spanHeight(_proposal.end - _proposal.start)\">\n <span class=\"sd-calendar__dot\" aria-hidden=\"true\"></span>\n <div class=\"sd-calendar__event-content\">\n <span class=\"sd-calendar__event-title\">{{ _proposal.title }}</span>\n <span class=\"sd-calendar__event-time\">{{ clockText(_proposal.start) }} – {{ clockText(_proposal.end) }}</span>\n </div>\n </div>\n }\n @if (day.today) {\n <div class=\"sd-calendar__now\" data-now aria-hidden=\"true\" [style.top]=\"nowTop()\"></div>\n }\n </div>\n }\n </div>\n </div>\n </div>\n } @else if (_view === 'month') {\n <div\n class=\"sd-calendar__month\"\n role=\"grid\"\n [style.--sd-calendar-month-columns]=\"monthHeaders().length\"\n [attr.aria-label]=\"title()\"\n [attr.aria-busy]=\"busy() || null\"\n [attr.aria-disabled]=\"_disabled || null\">\n <div class=\"sd-calendar__month-head\" role=\"row\">\n @for (weekday of monthHeaders(); track $index) {\n <div class=\"sd-calendar__month-weekday\" role=\"columnheader\">{{ weekday }}</div>\n }\n </div>\n @for (week of monthWeeks(); track $index) {\n <div class=\"sd-calendar__month-row\" role=\"row\">\n @for (cell of week; track cell.day.day) {\n <div\n class=\"sd-calendar__cell\"\n role=\"gridcell\"\n [attr.tabindex]=\"cell.day.day === monthFocusDay() ? 0 : -1\"\n [attr.aria-label]=\"cell.label\"\n [attr.data-date]=\"cell.day.day\"\n [attr.data-today]=\"cell.day.today || null\"\n [attr.data-off]=\"cell.day.off || null\"\n [attr.data-out-of-month]=\"!cell.inMonth || null\"\n [attr.data-out-of-range]=\"cell.day.outOfRange || null\"\n (click)=\"openDay(cell.day.day)\"\n (keydown)=\"onCellKeydown($event, cell.day.day)\">\n <div class=\"sd-calendar__cell-head\">\n <span class=\"sd-calendar__cell-number\">{{ cell.day.dayNumber }}</span>\n @if (!compact() && cell.day.holiday; as holiday) {\n <span class=\"sd-calendar__cell-holiday\" [attr.data-holiday]=\"holiday.type\" [attr.title]=\"holiday.label\">{{ holiday.label }}</span>\n }\n </div>\n @if (compact()) {\n <div class=\"sd-calendar__cell-dots\" aria-hidden=\"true\">\n @for (dot of cell.dots; track dot.color + (dot.customColor ?? '')) {\n <span class=\"sd-calendar__cell-dot\" data-dot [attr.data-color]=\"dot.color\" [style.--sd-calendar-event-color]=\"dot.customColor\"></span>\n }\n </div>\n } @else {\n @if (dayCellTemplate(); as _template) {\n <ng-container [ngTemplateOutlet]=\"_template.template\" [ngTemplateOutletContext]=\"cell.context\" />\n } @else {\n @for (line of cell.lines; track line.key) {\n @if (line.item; as item) {\n <!-- why: chips stay out of the tab order (§9.7); the cell is the keyboard target and opens the day. -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n <div\n class=\"sd-calendar__chip\"\n [class.sd-calendar__chip--bar]=\"line.bar\"\n [attr.data-event-id]=\"item.event.id\"\n [attr.data-autoid]=\"item.autoId\"\n [attr.data-color]=\"item.color\"\n [attr.data-past]=\"item.past || null\"\n [attr.data-selected]=\"item.key === _selected || null\"\n [attr.data-join-start]=\"line.joinStart || null\"\n [attr.data-join-end]=\"line.joinEnd || null\"\n [attr.title]=\"item.label\"\n [style.--sd-calendar-event-color]=\"item.customColor\"\n (click)=\"selectItem(item.event, $event)\">\n @if (line.showTitle) {\n <span class=\"sd-calendar__dot\" aria-hidden=\"true\"></span>\n <span class=\"sd-calendar__chip-text\">{{ line.text }}</span>\n }\n </div>\n } @else {\n <div class=\"sd-calendar__chip sd-calendar__chip--gap\" aria-hidden=\"true\"></div>\n }\n }\n @if (cell.more) {\n <button\n type=\"button\"\n class=\"sd-calendar__month-more\"\n data-more\n tabindex=\"-1\"\n [attr.data-date]=\"cell.day.day\"\n (click)=\"$event.stopPropagation(); openDay(cell.day.day)\">\n {{ 'core.component.calendar.more' | sdTranslate: { count: cell.more } }}\n </button>\n }\n }\n }\n </div>\n }\n </div>\n }\n </div>\n } @else {\n <div class=\"sd-calendar__agenda\" [attr.aria-busy]=\"busy() || null\">\n @for (group of agenda(); track group.day.day) {\n <div class=\"sd-calendar__agenda-day\" role=\"group\" data-agenda-day [attr.data-date]=\"group.day.day\" [attr.aria-label]=\"group.heading\">\n <div class=\"sd-calendar__agenda-heading\" [attr.data-today]=\"group.day.today || null\">\n <span>{{ group.heading }}</span>\n @if (group.day.today) {\n <span class=\"sd-calendar__agenda-today\">{{ 'core.component.calendar.today' | sdTranslate }}</span>\n }\n @if (group.day.holiday; as holiday) {\n <span class=\"sd-calendar__agenda-holiday\" [attr.data-holiday]=\"holiday.type\">{{ holiday.label }}</span>\n }\n </div>\n <div class=\"sd-calendar__agenda-rows\">\n @for (row of group.rows; track row.key) {\n <div\n class=\"sd-calendar__agenda-row\"\n role=\"button\"\n [attr.tabindex]=\"_disabled ? -1 : 0\"\n [attr.aria-label]=\"row.label\"\n [attr.data-event-id]=\"row.event.id\"\n [attr.data-autoid]=\"row.autoId\"\n [attr.data-color]=\"row.color\"\n [attr.data-past]=\"row.past || null\"\n [attr.data-pending]=\"row.pending || null\"\n [attr.data-selected]=\"row.key === _selected || null\"\n [style.--sd-calendar-event-color]=\"row.customColor\"\n (click)=\"selectItem(row.event, $event)\"\n (keydown)=\"onItemKeydown($event, row)\">\n <span class=\"sd-calendar__agenda-time\">{{ row.timeText }}</span>\n <span class=\"sd-calendar__agenda-title\">\n <span class=\"sd-calendar__dot\" aria-hidden=\"true\"></span>\n <span class=\"sd-calendar__agenda-text\">{{ row.event.title }}</span>\n @if (row.recurring) {\n <sd-icon class=\"sd-calendar__repeat\" name=\"repeat\" size=\"15px\" aria-hidden=\"true\" />\n }\n </span>\n @if (wide() && agendaItemTemplate(); as _template) {\n <span class=\"sd-calendar__agenda-place\" data-agenda-place>\n <ng-container [ngTemplateOutlet]=\"_template.template\" [ngTemplateOutletContext]=\"row.context\" />\n </span>\n }\n </div>\n }\n </div>\n </div>\n } @empty {\n @if (!busy()) {\n @if (emptyTemplate(); as _empty) {\n <ng-container [ngTemplateOutlet]=\"_empty.template\" [ngTemplateOutletContext]=\"{ $implicit: visible() }\" />\n } @else {\n <div class=\"sd-calendar__empty\">\n <sd-icon class=\"sd-calendar__empty-icon\" name=\"event_available\" size=\"28px\" aria-hidden=\"true\" />\n <p class=\"sd-calendar__empty-text\" data-empty>\n {{ 'core.component.calendar.empty-agenda' | sdTranslate: { count: agendaCount() } }}\n </p>\n </div>\n }\n }\n }\n </div>\n }\n</section>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["ɵsdNormalizeCalendarDay"],"mappings":";;;;;;;;;;;AAEA;AACA;AAEA;AACA,MAAM,IAAI,GAAG,EAAE;AACf,MAAM,UAAU,GAAG,EAAE;AAUrB;SACgB,mBAAmB,CAAC,QAAgB,EAAE,KAAa,EAAE,GAAW,EAAA;AAC9E,IAAA,MAAM,MAAM,GAAG,QAAQ,GAAG,KAAK;AAC/B,IAAA,MAAM,KAAK,GAAG,GAAG,GAAG,QAAQ;AAC5B,IAAA,IAAI,MAAM,IAAI,CAAC,IAAI,MAAM,GAAG,IAAI;AAAE,QAAA,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG,MAAM,IAAI,IAAI,IAAI,UAAU,CAAC;AAC1F,IAAA,IAAI,KAAK,IAAI,CAAC,IAAI,KAAK,GAAG,IAAI;AAAE,QAAA,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG,KAAK,IAAI,IAAI,IAAI,UAAU,CAAC;AACtF,IAAA,OAAO,CAAC;AACV;AAEA;;;AAGG;MACU,sBAAsB,CAAA;AAGJ,IAAA,IAAA;IAF7B,MAAM,GAAG,CAAC;AAEV,IAAA,WAAA,CAA6B,IAAY,EAAA;QAAZ,IAAA,CAAA,IAAI,GAAJ,IAAI;IAAW;IAE5C,MAAM,CACJ,QAAwC,EACxC,IAA+B,EAC/B,OAA0D,EAC1D,IAAkD,EAClD,OAAmB,EAAA;AAEnB,QAAA,IAAI,CAAC,QAAQ,IAAI,CAAC,IAAI,I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