@sdcorejs/angular 19.3.5 → 19.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/components/anchor/src/components/anchor/anchor.component.d.ts +6 -1
- package/components/button/src/button-item.component.d.ts +7 -1
- package/components/calendar/index.d.ts +12 -0
- package/components/calendar/src/calendar-edge-scroll.d.ts +27 -0
- package/components/calendar/src/calendar-format.d.ts +51 -0
- package/components/calendar/src/calendar-host.d.ts +33 -0
- package/components/calendar/src/calendar-loader.d.ts +18 -0
- package/components/calendar/src/calendar-move.d.ts +189 -0
- package/components/calendar/src/calendar.component.d.ts +325 -0
- package/components/calendar/src/calendar.configuration.d.ts +24 -0
- package/components/calendar/src/calendar.model.d.ts +121 -0
- package/components/calendar/src/calendar.templates.d.ts +65 -0
- package/components/calendar/src/calendar.utils.d.ts +242 -0
- package/components/card/index.d.ts +3 -0
- package/components/card/src/card-actions.directive.d.ts +13 -0
- package/components/card/src/card-group.component.d.ts +32 -1
- package/components/card/src/card.component.d.ts +71 -5
- package/components/card/src/card.configuration.d.ts +20 -0
- package/components/card/src/card.format.d.ts +50 -0
- package/components/card/src/card.model.d.ts +83 -0
- package/components/card/src/card.utils.d.ts +5 -0
- package/components/file-explorer/src/file-explorer.utils.d.ts +1 -4
- package/components/index.d.ts +3 -1
- package/components/kanban/src/kanban-card-outlet.d.ts +16 -0
- package/components/kanban/src/kanban-loader.d.ts +45 -0
- package/components/kanban/src/kanban.component.d.ts +97 -37
- package/components/kanban/src/kanban.model.d.ts +93 -37
- package/components/kanban/src/kanban.utils.d.ts +38 -5
- package/components/modal/src/modal.component.d.ts +10 -1
- package/components/query-bar/src/components/actions-bar/actions-bar.component.d.ts +6 -2
- package/components/query-bar/src/components/chip-popover/chip-popover.component.d.ts +26 -22
- package/components/query-bar/src/components/field-picker/field-picker.component.d.ts +52 -31
- package/components/query-bar/src/components/inline-chip/inline-chip.component.d.ts +20 -1
- package/components/query-bar/src/components/inline-value-chip/inline-value-chip.component.d.ts +5 -1
- package/components/query-bar/src/components/panel/query-panel.d.ts +110 -0
- package/components/query-bar/src/components/popover-chip/popover-chip.component.d.ts +15 -8
- package/components/query-bar/src/components/saved-filters-menu/saved-filters-menu.component.d.ts +35 -18
- package/components/query-bar/src/components/saved-filters-menu/saved-filters-storage.d.ts +13 -0
- package/components/query-bar/src/query-bar-filter.d.ts +8 -0
- package/components/query-bar/src/query-bar.component.d.ts +62 -7
- package/components/query-bar/src/query-bar.model.d.ts +2 -0
- package/components/quick-action/index.d.ts +2 -0
- package/components/quick-action/src/selection-bar/selection-bar.component.d.ts +39 -0
- package/components/quick-action/src/selection-bar/selection-bar.model.d.ts +24 -0
- package/components/scheduler/index.d.ts +4 -0
- package/components/scheduler/src/scheduler.component.d.ts +345 -0
- package/components/scheduler/src/scheduler.model.d.ts +123 -0
- package/components/scheduler/src/scheduler.templates.d.ts +76 -0
- package/components/scheduler/src/scheduler.utils.d.ts +99 -0
- package/components/tab/src/tab-group.component.d.ts +6 -1
- package/components/tab-router/src/utils/tab-activated-route.d.ts +17 -0
- package/components/table/src/components/filter/quick-search/quick-search.component.d.ts +3 -1
- package/components/table/src/components/selector-action/action-filter.pipe.d.ts +3 -24
- package/components/table/src/components/selector-action/selector-action.component.d.ts +0 -10
- package/components/table/src/configurations/table.configuration.d.ts +44 -2
- package/components/table/src/models/table-option.model.d.ts +6 -0
- package/components/table/src/services/config.service.d.ts +0 -2
- package/components/table/src/services/table-filter/table-filter-callbacks.util.d.ts +25 -0
- package/components/table/src/services/table-filter/table-filter.model.d.ts +9 -0
- package/components/table/src/services/table-filter/table-query-bar.util.d.ts +1 -1
- package/components/table/src/services/table-query-params/table-query-params.util.d.ts +48 -0
- package/components/table/src/table.component.d.ts +21 -5
- package/components/timeline/index.d.ts +3 -0
- package/components/timeline/src/timeline.component.d.ts +95 -0
- package/components/timeline/src/timeline.model.d.ts +82 -0
- package/components/timeline/src/timeline.templates.d.ts +28 -0
- package/components/timeline/src/timeline.utils.d.ts +41 -0
- package/components/tree/index.d.ts +1 -0
- package/components/tree/src/tree-empty-def.directive.d.ts +13 -0
- package/components/tree/src/tree.component.d.ts +79 -5
- package/components/tree/src/tree.model.d.ts +29 -0
- package/directives/src/sd-scroll-pointer.service.d.ts +18 -0
- package/directives/src/sd-scroll.directive.d.ts +4 -2
- package/fesm2022/sdcorejs-angular-components-anchor.mjs +61 -2
- package/fesm2022/sdcorejs-angular-components-anchor.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-button.mjs +13 -5
- package/fesm2022/sdcorejs-angular-components-button.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-calendar.mjs +2481 -0
- package/fesm2022/sdcorejs-angular-components-calendar.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-components-card.mjs +485 -22
- 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 +832 -153
- package/fesm2022/sdcorejs-angular-components-kanban.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-modal.mjs +23 -6
- package/fesm2022/sdcorejs-angular-components-modal.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-query-bar.mjs +1304 -212
- 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 +1934 -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 +30 -1
- package/fesm2022/sdcorejs-angular-components-tab.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-table.mjs +612 -101
- 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 +596 -35
- 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-Bk3PrEf3.mjs → sdcorejs-angular-modules-generic-generic-configuration.page-DHrM12Z3.mjs} +3 -3
- package/fesm2022/{sdcorejs-angular-modules-generic-generic-configuration.page-Bk3PrEf3.mjs.map → sdcorejs-angular-modules-generic-generic-configuration.page-DHrM12Z3.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-generic-generic-form-host.page-CwUegGgG.mjs → sdcorejs-angular-modules-generic-generic-form-host.page-f7ysKltl.mjs} +2 -2
- package/fesm2022/{sdcorejs-angular-modules-generic-generic-form-host.page-CwUegGgG.mjs.map → sdcorejs-angular-modules-generic-generic-form-host.page-f7ysKltl.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-generic-generic-list.page-lF2trhfp.mjs → sdcorejs-angular-modules-generic-generic-list.page-BdGxuquq.mjs} +3 -3
- package/fesm2022/{sdcorejs-angular-modules-generic-generic-list.page-lF2trhfp.mjs.map → sdcorejs-angular-modules-generic-generic-list.page-BdGxuquq.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-generic-sdcorejs-angular-modules-generic-BbmeOduc.mjs → sdcorejs-angular-modules-generic-sdcorejs-angular-modules-generic-DtPfIB97.mjs} +4 -4
- package/fesm2022/{sdcorejs-angular-modules-generic-sdcorejs-angular-modules-generic-BbmeOduc.mjs.map → sdcorejs-angular-modules-generic-sdcorejs-angular-modules-generic-DtPfIB97.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-DK33LxHm.mjs → sdcorejs-angular-modules-pattern-base-api.service-Bj3iKGg_.mjs} +2 -2
- package/fesm2022/{sdcorejs-angular-modules-pattern-base-api.service-DK33LxHm.mjs.map → sdcorejs-angular-modules-pattern-base-api.service-Bj3iKGg_.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-create.component-CPwGkrNk.mjs → sdcorejs-angular-modules-pattern-create.component-C27vASfj.mjs} +11 -7
- package/fesm2022/sdcorejs-angular-modules-pattern-create.component-C27vASfj.mjs.map +1 -0
- package/fesm2022/{sdcorejs-angular-modules-pattern-create.component-VCbA_FkZ.mjs → sdcorejs-angular-modules-pattern-create.component-C63mUjRM.mjs} +2 -2
- package/fesm2022/{sdcorejs-angular-modules-pattern-create.component-VCbA_FkZ.mjs.map → sdcorejs-angular-modules-pattern-create.component-C63mUjRM.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-create.component-Bi2tMFHf.mjs → sdcorejs-angular-modules-pattern-create.component-DYn8jkTD.mjs} +2 -2
- package/fesm2022/{sdcorejs-angular-modules-pattern-create.component-Bi2tMFHf.mjs.map → sdcorejs-angular-modules-pattern-create.component-DYn8jkTD.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-customer.service-CehsdBRP.mjs → sdcorejs-angular-modules-pattern-customer.service-BNVk2VIb.mjs} +2 -2
- package/fesm2022/{sdcorejs-angular-modules-pattern-customer.service-CehsdBRP.mjs.map → sdcorejs-angular-modules-pattern-customer.service-BNVk2VIb.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-detail.component-5kI7wGdX.mjs → sdcorejs-angular-modules-pattern-detail.component-Bh8UD7ft.mjs} +57 -54
- package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-Bh8UD7ft.mjs.map +1 -0
- package/fesm2022/{sdcorejs-angular-modules-pattern-detail.component-CjAy-B9K.mjs → sdcorejs-angular-modules-pattern-detail.component-S7x8j9i5.mjs} +2 -2
- package/fesm2022/{sdcorejs-angular-modules-pattern-detail.component-CjAy-B9K.mjs.map → sdcorejs-angular-modules-pattern-detail.component-S7x8j9i5.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-flow.component-DObN_wCR.mjs → sdcorejs-angular-modules-pattern-flow.component-CHtskh2X.mjs} +3 -3
- package/fesm2022/{sdcorejs-angular-modules-pattern-flow.component-DObN_wCR.mjs.map → sdcorejs-angular-modules-pattern-flow.component-CHtskh2X.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-index.component-TTrWCXIT.mjs → sdcorejs-angular-modules-pattern-index.component-W8icBRPe.mjs} +2 -2
- package/fesm2022/{sdcorejs-angular-modules-pattern-index.component-TTrWCXIT.mjs.map → sdcorejs-angular-modules-pattern-index.component-W8icBRPe.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-lines-table-form.component-B1qePLfk.mjs → sdcorejs-angular-modules-pattern-lines-table-form.component-DEwUiNkq.mjs} +5 -5
- package/fesm2022/{sdcorejs-angular-modules-pattern-lines-table-form.component-B1qePLfk.mjs.map → sdcorejs-angular-modules-pattern-lines-table-form.component-DEwUiNkq.mjs.map} +1 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-8m-QmfUX.mjs +501 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-8m-QmfUX.mjs.map +1 -0
- package/fesm2022/{sdcorejs-angular-modules-pattern-list.component-W9vY7HrT.mjs → sdcorejs-angular-modules-pattern-list.component-BDEm2v0W.mjs} +3 -3
- package/fesm2022/{sdcorejs-angular-modules-pattern-list.component-W9vY7HrT.mjs.map → sdcorejs-angular-modules-pattern-list.component-BDEm2v0W.mjs.map} +1 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-BgwTyRhE.mjs +506 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-BgwTyRhE.mjs.map +1 -0
- package/fesm2022/{sdcorejs-angular-modules-pattern-list.component-CJ38CJXg.mjs → sdcorejs-angular-modules-pattern-list.component-BhFkL7tX.mjs} +30 -39
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-BhFkL7tX.mjs.map +1 -0
- package/fesm2022/{sdcorejs-angular-modules-pattern-list.component-BY5gjtNS.mjs → sdcorejs-angular-modules-pattern-list.component-j7ZFxvlG.mjs} +3 -3
- package/fesm2022/{sdcorejs-angular-modules-pattern-list.component-BY5gjtNS.mjs.map → sdcorejs-angular-modules-pattern-list.component-j7ZFxvlG.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-mock-backend.factory-CI0H_5a4.mjs → sdcorejs-angular-modules-pattern-mock-backend.factory-CPAV_J3j.mjs} +2 -2
- package/fesm2022/{sdcorejs-angular-modules-pattern-mock-backend.factory-CI0H_5a4.mjs.map → sdcorejs-angular-modules-pattern-mock-backend.factory-CPAV_J3j.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-D829aEk5.mjs → sdcorejs-angular-modules-pattern-product.service-B9Dc2NUr.mjs} +2 -2
- package/fesm2022/{sdcorejs-angular-modules-pattern-product.service-D829aEk5.mjs.map → sdcorejs-angular-modules-pattern-product.service-B9Dc2NUr.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-profile.component-BEFVmSSj.mjs → sdcorejs-angular-modules-pattern-profile.component-097Hf7Bc.mjs} +24 -14
- package/fesm2022/sdcorejs-angular-modules-pattern-profile.component-097Hf7Bc.mjs.map +1 -0
- package/fesm2022/{sdcorejs-angular-modules-pattern-routes-B-TJUSV_.mjs → sdcorejs-angular-modules-pattern-routes-CahNEP9-.mjs} +5 -5
- package/fesm2022/{sdcorejs-angular-modules-pattern-routes-B-TJUSV_.mjs.map → sdcorejs-angular-modules-pattern-routes-CahNEP9-.mjs.map} +1 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-CjfWGMvJ.mjs +65 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-CjfWGMvJ.mjs.map +1 -0
- package/fesm2022/{sdcorejs-angular-modules-pattern-routes-1kDb9T7_.mjs → sdcorejs-angular-modules-pattern-routes-DeE5hp5x.mjs} +4 -4
- package/fesm2022/{sdcorejs-angular-modules-pattern-routes-1kDb9T7_.mjs.map → sdcorejs-angular-modules-pattern-routes-DeE5hp5x.mjs.map} +1 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-Di2ceIlM.mjs +56 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-Di2ceIlM.mjs.map +1 -0
- package/fesm2022/{sdcorejs-angular-modules-pattern-routes-B6z7KO0P.mjs → sdcorejs-angular-modules-pattern-routes-MEcCUESx.mjs} +3 -3
- package/fesm2022/{sdcorejs-angular-modules-pattern-routes-B6z7KO0P.mjs.map → sdcorejs-angular-modules-pattern-routes-MEcCUESx.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-routes-DVlcUUzh.mjs → sdcorejs-angular-modules-pattern-routes-hKorxavO.mjs} +3 -3
- package/fesm2022/{sdcorejs-angular-modules-pattern-routes-DVlcUUzh.mjs.map → sdcorejs-angular-modules-pattern-routes-hKorxavO.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-routes-DS39vgzU.mjs → sdcorejs-angular-modules-pattern-routes-sJfnmrVg.mjs} +3 -3
- package/fesm2022/{sdcorejs-angular-modules-pattern-routes-DS39vgzU.mjs.map → sdcorejs-angular-modules-pattern-routes-sJfnmrVg.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-routes-DxWDWUdo.mjs → sdcorejs-angular-modules-pattern-routes-ygWsDRk9.mjs} +8 -8
- package/fesm2022/{sdcorejs-angular-modules-pattern-routes-DxWDWUdo.mjs.map → sdcorejs-angular-modules-pattern-routes-ygWsDRk9.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-sdcorejs-angular-modules-pattern-nV5dVFx2.mjs → sdcorejs-angular-modules-pattern-sdcorejs-angular-modules-pattern-C5IG0tkk.mjs} +12 -12
- package/fesm2022/{sdcorejs-angular-modules-pattern-sdcorejs-angular-modules-pattern-nV5dVFx2.mjs.map → sdcorejs-angular-modules-pattern-sdcorejs-angular-modules-pattern-C5IG0tkk.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-shell.component-0rRaWsuo.mjs → sdcorejs-angular-modules-pattern-shell.component-BPgXiYkB.mjs} +4 -4
- package/fesm2022/{sdcorejs-angular-modules-pattern-shell.component-0rRaWsuo.mjs.map → sdcorejs-angular-modules-pattern-shell.component-BPgXiYkB.mjs.map} +1 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-DF0pm6_f.mjs +480 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-DF0pm6_f.mjs.map +1 -0
- package/fesm2022/{sdcorejs-angular-modules-pattern-update.component-DkAcDmsZ.mjs → sdcorejs-angular-modules-pattern-update.component-BXBxoTdB.mjs} +2 -2
- package/fesm2022/{sdcorejs-angular-modules-pattern-update.component-DkAcDmsZ.mjs.map → sdcorejs-angular-modules-pattern-update.component-BXBxoTdB.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-update.component-BmsOgENL.mjs → sdcorejs-angular-modules-pattern-update.component-DS253vcu.mjs} +2 -2
- package/fesm2022/{sdcorejs-angular-modules-pattern-update.component-BmsOgENL.mjs.map → sdcorejs-angular-modules-pattern-update.component-DS253vcu.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-update.component-DPZ_ucNB.mjs → sdcorejs-angular-modules-pattern-update.component-OOYioclV.mjs} +9 -6
- package/fesm2022/sdcorejs-angular-modules-pattern-update.component-OOYioclV.mjs.map +1 -0
- 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/forms/date/src/date.component.d.ts +2 -0
- package/forms/directives/src/search-field.component.d.ts +1 -1
- package/i18n/src/en.d.ts +121 -9
- package/modules/layout/components/page-list/page-list.component.d.ts +2 -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.d.ts +6 -4
- 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.d.ts +13 -5
- 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.d.ts +15 -3
- 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.d.ts +4 -1
- package/modules/pattern/features/category/routes.ts +5 -22
- package/modules/pattern/features/customer/components/create-side-drawer/create-side-drawer.component.d.ts +6 -5
- 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.d.ts +20 -8
- 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.d.ts +5 -3
- 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.d.ts +18 -7
- package/modules/pattern/features/customer/components/update-side-drawer/update-side-drawer.component.ts +53 -19
- package/modules/pattern/features/customer/entity.resolver.d.ts +1 -1
- package/modules/pattern/features/customer/entity.resolver.ts +1 -1
- package/modules/pattern/features/customer/pages/list/list.component.d.ts +21 -3
- 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.d.ts +5 -2
- package/modules/pattern/features/customer/pages/profile/profile.component.ts +17 -8
- package/modules/pattern/features/customer/routes.d.ts +3 -2
- package/modules/pattern/features/customer/routes.ts +6 -27
- package/modules/pattern/features/order/components/approval-steps/approval-steps.component.d.ts +11 -3
- 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.d.ts +7 -4
- package/modules/pattern/features/order/components/summary-cards/summary-cards.component.ts +14 -76
- package/modules/pattern/features/order/pages/create/create.component.d.ts +1 -1
- 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.d.ts +1 -1
- package/modules/pattern/features/order/pages/update/update.component.ts +5 -2
- package/package.json +29 -17
- package/services/confirm/src/lib/components/dialog-confirm/dialog-confirm.component.d.ts +6 -1
- package/services/confirm/src/lib/confirm.service.d.ts +23 -12
- package/services/confirm/src/public-api.d.ts +0 -1
- package/services/query-params/index.d.ts +1 -0
- package/services/query-params/src/query-param-sync.d.ts +63 -0
- package/utilities/extensions/index.d.ts +1 -0
- package/utilities/extensions/src/format-bytes.d.ts +8 -0
- package/components/history/index.d.ts +0 -1
- package/components/history/models/history.model.d.ts +0 -13
- package/components/history/pipes/view-date.pipe.d.ts +0 -9
- package/components/history/src/history.component.d.ts +0 -7
- 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-B1BUBiag.mjs +0 -145
- package/fesm2022/sdcorejs-angular-modules-pattern-create-side-drawer.component-B1BUBiag.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-create-side-drawer.component-B27ZX8Co.mjs +0 -144
- package/fesm2022/sdcorejs-angular-modules-pattern-create-side-drawer.component-B27ZX8Co.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-create.component-CPwGkrNk.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-CPhLTiyx.mjs +0 -148
- package/fesm2022/sdcorejs-angular-modules-pattern-detail-side-drawer.component-CPhLTiyx.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-5kI7wGdX.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-D6eKR2cq.mjs +0 -87
- package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-D6eKR2cq.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-FcJS3Nbd.mjs +0 -232
- package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-FcJS3Nbd.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-general-information-view.component-BA-3FR1J.mjs +0 -70
- package/fesm2022/sdcorejs-angular-modules-pattern-general-information-view.component-BA-3FR1J.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-CJ38CJXg.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-CdgPtSjJ.mjs +0 -164
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-CdgPtSjJ.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-DKIwrluh.mjs +0 -118
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-DKIwrluh.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-BEFVmSSj.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-r9CTj-8C.mjs +0 -74
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-r9CTj-8C.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-xI1XYRo6.mjs +0 -99
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-xI1XYRo6.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-6uH7sDEg.mjs +0 -143
- package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-6uH7sDEg.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-DglN2sS_.mjs +0 -132
- package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-DglN2sS_.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-update.component-DPZ_ucNB.mjs.map +0 -1
- package/modules/pattern/features/category/entity.resolver.d.ts +0 -6
- package/modules/pattern/features/category/entity.resolver.ts +0 -27
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import type { SdTimeRangeValue } from '@sdcorejs/angular/forms/time-range';
|
|
2
|
+
import type { Color } from '@sdcorejs/utils/models';
|
|
3
|
+
/** Layout of `sd-calendar`. */
|
|
4
|
+
export type SdCalendarView = 'month' | 'week' | 'day' | 'agenda';
|
|
5
|
+
/** A date value read through `SdDateTimeService`: a `Date`, epoch milliseconds or a string. */
|
|
6
|
+
export type SdCalendarDateInput = Date | string | number;
|
|
7
|
+
/** What started a move: dragging the block, dragging its bottom edge, `Alt` + arrow keys, or `move()`. */
|
|
8
|
+
export type SdCalendarMoveSource = 'drag' | 'resize' | 'keyboard' | 'api';
|
|
9
|
+
/** Which occurrences of a recurring event a move applies to. */
|
|
10
|
+
export type SdCalendarMoveScope = 'this' | 'following' | 'all';
|
|
11
|
+
/** Static flag or predicate of a context. Evaluated while rendering and again right before the action runs. */
|
|
12
|
+
export type SdCalendarState<C> = boolean | ((context: C) => boolean);
|
|
13
|
+
/** One event shown by the calendar. Map your DTO into this shape inside `dataSource.onLoad`. */
|
|
14
|
+
export interface SdCalendarEvent<T = unknown> {
|
|
15
|
+
/** Unique within the result of one `onLoad`. Every occurrence of a recurring event has its own id. */
|
|
16
|
+
id: string;
|
|
17
|
+
/** Not empty; the name read by screen readers. */
|
|
18
|
+
title: string;
|
|
19
|
+
start: SdCalendarDateInput;
|
|
20
|
+
/** Timed: the exclusive end instant. All-day: the last day, inclusive; omitted means one day. */
|
|
21
|
+
end?: SdCalendarDateInput | null;
|
|
22
|
+
/** Defaults to `false`. */
|
|
23
|
+
allDay?: boolean;
|
|
24
|
+
/** A `Color` or any CSS colour. Defaults to `'primary'`. */
|
|
25
|
+
color?: Color | string;
|
|
26
|
+
/** Set when the event is one occurrence of a series already expanded by the server or the consumer. */
|
|
27
|
+
occurrence?: SdCalendarOccurrence | null;
|
|
28
|
+
/** Caller-owned DTO, kept by reference and never serialized. */
|
|
29
|
+
data?: T;
|
|
30
|
+
}
|
|
31
|
+
/** Marks an event as one occurrence of a recurring series. */
|
|
32
|
+
export interface SdCalendarOccurrence {
|
|
33
|
+
readonly seriesId: string;
|
|
34
|
+
/** Start of this occurrence by the rule, before any exception. */
|
|
35
|
+
readonly originalStart: SdCalendarDateInput;
|
|
36
|
+
}
|
|
37
|
+
/** A time span in the form the calendar emits (see "Date values" in `sd-calendar.md`). */
|
|
38
|
+
export interface SdCalendarRange {
|
|
39
|
+
readonly start: string;
|
|
40
|
+
readonly end: string;
|
|
41
|
+
readonly allDay: boolean;
|
|
42
|
+
}
|
|
43
|
+
/** Days on screen, both ends included. Same shape as `SdDateRangeValue`, plus the view. */
|
|
44
|
+
export interface SdCalendarVisibleRange {
|
|
45
|
+
/** `'yyyy/MM/dd'`. */
|
|
46
|
+
readonly from: string;
|
|
47
|
+
/** `'yyyy/MM/dd'`. */
|
|
48
|
+
readonly to: string;
|
|
49
|
+
readonly view: SdCalendarView;
|
|
50
|
+
}
|
|
51
|
+
/** Arguments of `dataSource.onLoad`. */
|
|
52
|
+
export interface SdCalendarLoadArgs extends SdCalendarVisibleRange {
|
|
53
|
+
/** Aborted when the range changes, on `reload()`, when `option` changes or when the calendar is destroyed. */
|
|
54
|
+
readonly signal: AbortSignal;
|
|
55
|
+
}
|
|
56
|
+
/** Arguments of `create.onCreate`: the span the user picked. */
|
|
57
|
+
export interface SdCalendarCreateArgs extends SdCalendarRange {
|
|
58
|
+
/** Aborted when `option` changes or the calendar is destroyed. */
|
|
59
|
+
readonly signal: AbortSignal;
|
|
60
|
+
}
|
|
61
|
+
/** Proposal passed to `move.onMove`. Nothing changes on screen until it is accepted. */
|
|
62
|
+
export interface SdCalendarMoveRequest<T = unknown> {
|
|
63
|
+
readonly event: SdCalendarEvent<T>;
|
|
64
|
+
readonly from: SdCalendarRange;
|
|
65
|
+
readonly to: SdCalendarRange;
|
|
66
|
+
readonly source: SdCalendarMoveSource;
|
|
67
|
+
/** `null` when the event is not an occurrence of a recurring series. */
|
|
68
|
+
readonly scope: SdCalendarMoveScope | null;
|
|
69
|
+
/**
|
|
70
|
+
* Aborted when the range changes, on `reload()`, when `option` changes, when `disabled` or `readonly` turns on, or
|
|
71
|
+
* when the calendar is destroyed. Cooperative: it does not undo a backend change that already happened.
|
|
72
|
+
*/
|
|
73
|
+
readonly signal: AbortSignal;
|
|
74
|
+
}
|
|
75
|
+
/** Payload of `sdMoveError`. A `'cancel'` result emits nothing. */
|
|
76
|
+
export interface SdCalendarMoveError<T = unknown> {
|
|
77
|
+
readonly request: SdCalendarMoveRequest<T>;
|
|
78
|
+
readonly reason: 'rejected' | 'error';
|
|
79
|
+
readonly error?: unknown;
|
|
80
|
+
}
|
|
81
|
+
/** A public holiday or a named day. */
|
|
82
|
+
export interface SdCalendarHoliday {
|
|
83
|
+
readonly date: SdCalendarDateInput;
|
|
84
|
+
readonly label: string;
|
|
85
|
+
/** `off`: a day off, the whole column is shaded and the label uses the error colour. `observance`: the name only. */
|
|
86
|
+
readonly type: 'off' | 'observance';
|
|
87
|
+
}
|
|
88
|
+
/** Keys 0–6, 0 is Sunday. A weekday without a key, or with an empty list, is a day off. */
|
|
89
|
+
export type SdCalendarWorkingHours = Partial<Record<0 | 1 | 2 | 3 | 4 | 5 | 6, readonly SdTimeRangeValue[]>>;
|
|
90
|
+
/** Configuration of `<sd-calendar>`: the data source and the capabilities it switches on. */
|
|
91
|
+
export interface SdCalendarOption<T = unknown> {
|
|
92
|
+
/** Required. */
|
|
93
|
+
dataSource: {
|
|
94
|
+
/**
|
|
95
|
+
* Returns the events of the visible range. Called on init, whenever the range changes and on `reload()`.
|
|
96
|
+
* Client data: return the whole array, the calendar keeps what falls in the range. Server data: query by
|
|
97
|
+
* `from`/`to` and pass `signal` on. Throw or reject to show the load error with a retry button.
|
|
98
|
+
*/
|
|
99
|
+
onLoad: (args: SdCalendarLoadArgs) => readonly SdCalendarEvent<T>[] | Promise<readonly SdCalendarEvent<T>[]>;
|
|
100
|
+
};
|
|
101
|
+
/** Turns on creating by click, sweep, tap and `Enter`. */
|
|
102
|
+
create?: {
|
|
103
|
+
/** Defaults to `true`. The context is the span about to be created. */
|
|
104
|
+
creatable?: SdCalendarState<SdCalendarRange>;
|
|
105
|
+
/**
|
|
106
|
+
* Opens your form. Return the created event to insert it right away; return nothing when the user cancels.
|
|
107
|
+
* Throw or reject to show the failure band. The dashed block stays while this runs.
|
|
108
|
+
*/
|
|
109
|
+
onCreate: (args: SdCalendarCreateArgs) => SdCalendarEvent<T> | void | Promise<SdCalendarEvent<T> | void>;
|
|
110
|
+
};
|
|
111
|
+
/** Turns on dragging, resizing the end and `Alt` + arrow keys. */
|
|
112
|
+
move?: {
|
|
113
|
+
/** Defaults to `true`. `false`, or a predicate returning `false`, removes the handle and locks the event. */
|
|
114
|
+
movable?: SdCalendarState<SdCalendarEvent<T>>;
|
|
115
|
+
/**
|
|
116
|
+
* `true` or nothing: accepted. `false`: rejected. `'cancel'`: the user cancelled inside your flow (for example
|
|
117
|
+
* closed a reason dialog); the block goes back without an error. Throw or reject: error.
|
|
118
|
+
*/
|
|
119
|
+
onMove: (request: SdCalendarMoveRequest<T>) => boolean | 'cancel' | void | Promise<boolean | 'cancel' | void>;
|
|
120
|
+
};
|
|
121
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { TemplateRef } from '@angular/core';
|
|
2
|
+
import type { SdCalendarEvent, SdCalendarHoliday, SdCalendarRange, SdCalendarView, SdCalendarVisibleRange } from './calendar.model';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/** Context of `sdCalendarEventTemplate`. */
|
|
5
|
+
export interface SdCalendarEventTemplateContext<T = unknown> {
|
|
6
|
+
$implicit: SdCalendarEvent<T>;
|
|
7
|
+
event: SdCalendarEvent<T>;
|
|
8
|
+
/** Where the block is drawn: the proposed span while a move waits, otherwise the event's own span. */
|
|
9
|
+
range: SdCalendarRange;
|
|
10
|
+
view: SdCalendarView;
|
|
11
|
+
/** The block is shorter than 34px and shows one line. */
|
|
12
|
+
compact: boolean;
|
|
13
|
+
/** A move or a create of this event is waiting for your callback. */
|
|
14
|
+
pending: boolean;
|
|
15
|
+
}
|
|
16
|
+
/** Context of `sdCalendarAgendaItemTemplate`. */
|
|
17
|
+
export type SdCalendarAgendaItemTemplateContext<T = unknown> = Omit<SdCalendarEventTemplateContext<T>, 'compact'>;
|
|
18
|
+
/** Context of `sdCalendarDayCellTemplate` (month view). */
|
|
19
|
+
export interface SdCalendarDayCellTemplateContext<T = unknown> {
|
|
20
|
+
/** `'yyyy/MM/dd'`. */
|
|
21
|
+
$implicit: string;
|
|
22
|
+
date: string;
|
|
23
|
+
events: readonly SdCalendarEvent<T>[];
|
|
24
|
+
holiday: SdCalendarHoliday | null;
|
|
25
|
+
today: boolean;
|
|
26
|
+
/** The day belongs to the month on screen. */
|
|
27
|
+
inMonth: boolean;
|
|
28
|
+
/** Day off: weekend without working hours or an `off` holiday. */
|
|
29
|
+
off: boolean;
|
|
30
|
+
}
|
|
31
|
+
/** Context of `sdCalendarEmptyTemplate` (agenda view). */
|
|
32
|
+
export interface SdCalendarEmptyTemplateContext {
|
|
33
|
+
$implicit: SdCalendarVisibleRange;
|
|
34
|
+
}
|
|
35
|
+
/** Replaces the content of an event block; frame, colour, handle and states stay. `let-event`. */
|
|
36
|
+
export declare class SdCalendarEventTemplateDirective<T = unknown> {
|
|
37
|
+
readonly template: TemplateRef<SdCalendarEventTemplateContext<T>>;
|
|
38
|
+
static ngTemplateContextGuard<T>(_directive: SdCalendarEventTemplateDirective<T>, _context: unknown): _context is SdCalendarEventTemplateContext<T>;
|
|
39
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SdCalendarEventTemplateDirective<any>, never>;
|
|
40
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<SdCalendarEventTemplateDirective<any>, "ng-template[sdCalendarEventTemplate]", never, {}, {}, never, never, true, never>;
|
|
41
|
+
}
|
|
42
|
+
/** Replaces the part of a month cell under the day number (for example a timesheet code). `let-date`. */
|
|
43
|
+
export declare class SdCalendarDayCellTemplateDirective<T = unknown> {
|
|
44
|
+
readonly template: TemplateRef<SdCalendarDayCellTemplateContext<T>>;
|
|
45
|
+
static ngTemplateContextGuard<T>(_directive: SdCalendarDayCellTemplateDirective<T>, _context: unknown): _context is SdCalendarDayCellTemplateContext<T>;
|
|
46
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SdCalendarDayCellTemplateDirective<any>, never>;
|
|
47
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<SdCalendarDayCellTemplateDirective<any>, "ng-template[sdCalendarDayCellTemplate]", never, {}, {}, never, never, true, never>;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Content of the place column of an agenda row, shown when the host is at least 720px wide (§11). Below that width
|
|
51
|
+
* the column, and the template, are left out. `let-event`.
|
|
52
|
+
*/
|
|
53
|
+
export declare class SdCalendarAgendaItemTemplateDirective<T = unknown> {
|
|
54
|
+
readonly template: TemplateRef<SdCalendarAgendaItemTemplateContext<T>>;
|
|
55
|
+
static ngTemplateContextGuard<T>(_directive: SdCalendarAgendaItemTemplateDirective<T>, _context: unknown): _context is SdCalendarAgendaItemTemplateContext<T>;
|
|
56
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SdCalendarAgendaItemTemplateDirective<any>, never>;
|
|
57
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<SdCalendarAgendaItemTemplateDirective<any>, "ng-template[sdCalendarAgendaItemTemplate]", never, {}, {}, never, never, true, never>;
|
|
58
|
+
}
|
|
59
|
+
/** Replaces the empty state of the agenda view. `let-range`. */
|
|
60
|
+
export declare class SdCalendarEmptyTemplateDirective {
|
|
61
|
+
readonly template: TemplateRef<SdCalendarEmptyTemplateContext>;
|
|
62
|
+
static ngTemplateContextGuard(_directive: SdCalendarEmptyTemplateDirective, _context: unknown): _context is SdCalendarEmptyTemplateContext;
|
|
63
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SdCalendarEmptyTemplateDirective, never>;
|
|
64
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<SdCalendarEmptyTemplateDirective, "ng-template[sdCalendarEmptyTemplate]", never, {}, {}, never, never, true, never>;
|
|
65
|
+
}
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
import { type SdTemporalValueTransform } from '@sdcorejs/angular/forms/models';
|
|
2
|
+
import { type ISdCalendarConfiguration } from './calendar.configuration';
|
|
3
|
+
import type { SdCalendarDateInput, SdCalendarEvent, SdCalendarHoliday, SdCalendarRange, SdCalendarView, SdCalendarVisibleRange, SdCalendarWorkingHours } from './calendar.model';
|
|
4
|
+
/**
|
|
5
|
+
* Pure helpers of `sd-calendar`, shared with `sd-scheduler` through the `ɵ` exports of the entry point.
|
|
6
|
+
*
|
|
7
|
+
* A calendar day is the string `'yyyy/MM/dd'` (it sorts as text) and a time of day is a number of wall-clock
|
|
8
|
+
* minutes, 0–1440. Day arithmetic works on year/month/day numbers only: never on instants, never by adding
|
|
9
|
+
* 24 hours, so a 23- or 25-hour DST day cannot move a date.
|
|
10
|
+
*/
|
|
11
|
+
/** The part of `SdDateTimeService` the pure helpers need; pass the service itself. */
|
|
12
|
+
export interface SdCalendarClock {
|
|
13
|
+
readonly timeZone: string;
|
|
14
|
+
toFormat(value: unknown, format: string): string;
|
|
15
|
+
parse(value: unknown): Date | null;
|
|
16
|
+
parseFrom(value: unknown, format: string): Date | null;
|
|
17
|
+
beginOfNextDay(value: unknown): Date | null;
|
|
18
|
+
}
|
|
19
|
+
export interface SdCalendarDayParts {
|
|
20
|
+
readonly year: number;
|
|
21
|
+
readonly month: number;
|
|
22
|
+
readonly day: number;
|
|
23
|
+
}
|
|
24
|
+
/** What the visible range depends on. `date` is the anchor day `'yyyy/MM/dd'`. */
|
|
25
|
+
export interface SdCalendarRangeInput {
|
|
26
|
+
readonly view: SdCalendarView;
|
|
27
|
+
readonly date: string;
|
|
28
|
+
readonly firstDayOfWeek: number;
|
|
29
|
+
readonly hideWeekends: boolean;
|
|
30
|
+
readonly agendaDays: number;
|
|
31
|
+
}
|
|
32
|
+
/** A span of wall-clock minutes inside one day, end exclusive. */
|
|
33
|
+
export interface SdCalendarSpan {
|
|
34
|
+
readonly start: number;
|
|
35
|
+
readonly end: number;
|
|
36
|
+
}
|
|
37
|
+
/** Column of one timed event inside its overlap cluster; `index` points into the input. */
|
|
38
|
+
export interface SdCalendarStacked {
|
|
39
|
+
readonly index: number;
|
|
40
|
+
readonly column: number;
|
|
41
|
+
readonly columns: number;
|
|
42
|
+
}
|
|
43
|
+
/** Days covered by a bar, both ends included. */
|
|
44
|
+
export interface SdCalendarDaySpan {
|
|
45
|
+
readonly firstDay: string;
|
|
46
|
+
readonly lastDay: string;
|
|
47
|
+
}
|
|
48
|
+
/** One bar of the all-day row: `from`/`to` are indexes of the visible days; `index` points into the input. */
|
|
49
|
+
export interface SdCalendarBar {
|
|
50
|
+
readonly index: number;
|
|
51
|
+
readonly row: number;
|
|
52
|
+
readonly from: number;
|
|
53
|
+
readonly to: number;
|
|
54
|
+
readonly clippedStart: boolean;
|
|
55
|
+
readonly clippedEnd: boolean;
|
|
56
|
+
}
|
|
57
|
+
export interface SdCalendarAllDayLayout {
|
|
58
|
+
/** Bars of the rows on screen, in layout order. */
|
|
59
|
+
readonly bars: readonly SdCalendarBar[];
|
|
60
|
+
/** Rows on screen. */
|
|
61
|
+
readonly rows: number;
|
|
62
|
+
/** Bars left out, per visible day ("+N"). */
|
|
63
|
+
readonly more: readonly number[];
|
|
64
|
+
}
|
|
65
|
+
/** Where an event sits, read in the zone of the clock. */
|
|
66
|
+
export interface SdCalendarPlacement {
|
|
67
|
+
readonly allDay: boolean;
|
|
68
|
+
/** Drawn in the time grid; `false` for all-day events and timed events that cross midnight. */
|
|
69
|
+
readonly inGrid: boolean;
|
|
70
|
+
readonly startDay: string;
|
|
71
|
+
readonly startMinutes: number;
|
|
72
|
+
/** Timed: the day of the end; an end at midnight of the next day reads as `startDay` at 1440. All-day: last day. */
|
|
73
|
+
readonly endDay: string;
|
|
74
|
+
readonly endMinutes: number;
|
|
75
|
+
/** Days covered, both included. */
|
|
76
|
+
readonly firstDay: string;
|
|
77
|
+
readonly lastDay: string;
|
|
78
|
+
/** Epoch milliseconds; all-day events span from the start of the first day to the start of the day after the last. */
|
|
79
|
+
readonly startInstant: number;
|
|
80
|
+
readonly endInstant: number;
|
|
81
|
+
}
|
|
82
|
+
/** Slot lengths `step` accepts: the divisors of 60 a time grid can draw. */
|
|
83
|
+
export declare const SD_CALENDAR_STEPS: readonly number[];
|
|
84
|
+
/** Year, month and day of `'yyyy/MM/dd'`; `null` for anything else, including an impossible date. */
|
|
85
|
+
export declare function sdCalendarDayParts(day: string): SdCalendarDayParts | null;
|
|
86
|
+
/** `'yyyy/MM/dd'` of the given numbers; overflowing months and days roll over like `Date` does. */
|
|
87
|
+
export declare function sdCalendarDay(year: number, month: number, day: number): string;
|
|
88
|
+
export declare function sdCalendarAddDays(day: string, days: number): string;
|
|
89
|
+
/** First day of the month `months` away from the month of `day`. */
|
|
90
|
+
export declare function sdCalendarAddMonths(day: string, months: number): string;
|
|
91
|
+
/** The same day number `months` away, clamped to the last day of that month (month view PageUp/PageDown). */
|
|
92
|
+
export declare function sdCalendarAddMonthsKeepDay(day: string, months: number): string;
|
|
93
|
+
/** 0 (Sunday) – 6 (Saturday). */
|
|
94
|
+
export declare function sdCalendarWeekday(day: string): number;
|
|
95
|
+
/** Number of days from `from` to `to` (negative when `to` is earlier). */
|
|
96
|
+
export declare function sdCalendarDayDiff(from: string, to: string): number;
|
|
97
|
+
export declare function sdCalendarStartOfWeek(day: string, firstDayOfWeek: number): string;
|
|
98
|
+
export declare function sdCalendarIsWeekend(day: string): boolean;
|
|
99
|
+
/** `agendaDays` kept in 1–62; not a number → 14. */
|
|
100
|
+
export declare function sdCalendarClampAgendaDays(days: number): number;
|
|
101
|
+
/** `step` when it is one of `SD_CALENDAR_STEPS`, otherwise `null`. */
|
|
102
|
+
export declare function sdCalendarNormalizeStep(step: number): number | null;
|
|
103
|
+
/** Granularity of moving and resizing: `min(step, 15)`. */
|
|
104
|
+
export declare function sdCalendarMoveStep(step: number): number;
|
|
105
|
+
/** Every day from `from` to `to`, both included. */
|
|
106
|
+
export declare function sdCalendarDaysBetween(from: string, to: string): string[];
|
|
107
|
+
/** Full weeks of the month view (4–6 rows), weekends left out when `hideWeekends`. */
|
|
108
|
+
export declare function sdCalendarMonthWeeks(input: SdCalendarRangeInput): string[][];
|
|
109
|
+
/** Days on screen, in order. Day and agenda views ignore `hideWeekends`. */
|
|
110
|
+
export declare function sdCalendarVisibleDays(input: SdCalendarRangeInput): string[];
|
|
111
|
+
/** First and last day on screen (both included) and the view. */
|
|
112
|
+
export declare function sdCalendarVisibleRange(input: SdCalendarRangeInput): SdCalendarVisibleRange;
|
|
113
|
+
/** Anchor day after "Previous" (`-1`) or "Next" (`1`): ±7 days, ±1 day, ±1 month on day 1, ±`agendaDays` days. */
|
|
114
|
+
export declare function sdCalendarShiftDate(input: SdCalendarRangeInput, direction: 1 | -1): string;
|
|
115
|
+
/**
|
|
116
|
+
* Columns of overlapping timed events of one day (§8.4): sorted by start, longer first on a tie; a cluster grows
|
|
117
|
+
* while an event starts before the latest end so far; each event takes the first column that is free by its
|
|
118
|
+
* start; every event of a cluster shares its column count. Output order is the sorted order (the DOM order).
|
|
119
|
+
*/
|
|
120
|
+
export declare function sdCalendarStack(items: readonly SdCalendarSpan[]): SdCalendarStacked[];
|
|
121
|
+
/**
|
|
122
|
+
* Rows of the all-day band (§7) over `days`. Bars sort by first day, then the longer first; each takes the first
|
|
123
|
+
* row that is free at its first visible day. Rows from `maxRows` on are left out and counted per day in `more`.
|
|
124
|
+
*/
|
|
125
|
+
export declare function sdCalendarAllDayLayout(items: readonly SdCalendarDaySpan[], days: readonly string[], maxRows?: number): SdCalendarAllDayLayout;
|
|
126
|
+
/** The slot of `step` minutes under `minutes`: a click or a tap. */
|
|
127
|
+
export declare function sdCalendarSlot(minutes: number, step: number): SdCalendarSpan;
|
|
128
|
+
/** Span swept from `anchor` to `current` minutes: `[min, max + step]`, kept inside the day. */
|
|
129
|
+
export declare function sdCalendarSweep(anchor: number, current: number, step: number): SdCalendarSpan;
|
|
130
|
+
/** New start of a block dragged by `delta` minutes: `delta` rounded to `moveStep`, kept in `[0, 1440 − duration]`. */
|
|
131
|
+
export declare function sdCalendarSnapMove(start: number, delta: number, duration: number, moveStep: number): number;
|
|
132
|
+
/** New end of a block whose bottom edge moved by `delta`: at least 15 minutes (one step under 15) long, at most 24:00. */
|
|
133
|
+
export declare function sdCalendarResizeEnd(start: number, end: number, delta: number, step: number): number;
|
|
134
|
+
/** `'HH:mm'`; 1440 reads `'24:00'`. */
|
|
135
|
+
export declare function sdCalendarClockText(minutes: number): string;
|
|
136
|
+
/** Minutes of `'HH:mm'` as `sd-time` reads it, plus `'24:00'` for the end of the day. */
|
|
137
|
+
export declare function sdCalendarTimeToMinutes(value: unknown): number | null;
|
|
138
|
+
/**
|
|
139
|
+
* Working spans of a weekday, sorted. `null` hours → `null` (no shading). A weekday without hours is a day off
|
|
140
|
+
* (`[]`). A span without both ends, or whose end is not after its start, is left out.
|
|
141
|
+
*/
|
|
142
|
+
export declare function sdCalendarWorkingRanges(hours: SdCalendarWorkingHours | null, weekday: number): SdCalendarSpan[] | null;
|
|
143
|
+
/** Off-hours spans of a day: the complement of the working spans. `null` (no shading) → none. */
|
|
144
|
+
export declare function sdCalendarOffSegments(working: readonly SdCalendarSpan[] | null): SdCalendarSpan[];
|
|
145
|
+
/** First `scrollTop` of the time grid: half an hour above `minutes`, never above the top. */
|
|
146
|
+
export declare function sdCalendarInitialScroll(minutes: number, hourHeight: number): number;
|
|
147
|
+
/** Calendar day of a date-like value, read like `sd-date` reads its model (an instant takes its day in the zone). */
|
|
148
|
+
export declare function sdCalendarReadDay(value: unknown, clock: SdCalendarClock): string | null;
|
|
149
|
+
/**
|
|
150
|
+
* Wall-clock day and minutes of a value in the clock's zone.
|
|
151
|
+
*
|
|
152
|
+
* why: read as text (`toFormat`), not through `SdDateTimeService.toWallClock`: that carrier is a local `Date`, and a
|
|
153
|
+
* 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.
|
|
154
|
+
*/
|
|
155
|
+
export declare function sdCalendarReadWallClock(value: unknown, clock: SdCalendarClock): {
|
|
156
|
+
day: string;
|
|
157
|
+
minutes: number;
|
|
158
|
+
} | null;
|
|
159
|
+
/**
|
|
160
|
+
* Where an event sits (§5). `null` when a date cannot be read or a timed event does not end after its start (a
|
|
161
|
+
* timed event needs an `end`). A timed event that ends after midnight of its start day goes to the all-day row; one
|
|
162
|
+
* that ends exactly at that midnight stays in the grid with an end of 1440.
|
|
163
|
+
*/
|
|
164
|
+
export declare function sdCalendarPlace(event: SdCalendarEvent, clock: SdCalendarClock): SdCalendarPlacement | null;
|
|
165
|
+
/**
|
|
166
|
+
* Value the calendar emits for a wall clock (§5). Without `transform`: `'yyyy/MM/dd HH:mm:ss'`, or `'yyyy/MM/dd'`
|
|
167
|
+
* when `minutes` is `null` (all-day). With `transform`: the instant of that wall clock in the zone, serialized by
|
|
168
|
+
* `sdSerializeTemporalValue` like `sd-date` and `sd-datetime` (an all-day value is the start of its day).
|
|
169
|
+
*/
|
|
170
|
+
export declare function sdCalendarSerialize(day: string, minutes: number | null, clock: SdCalendarClock, transform: SdTemporalValueTransform | null | undefined): string;
|
|
171
|
+
/** The current span of a placed event, serialized like a new one so `request.from` and `request.to` match. */
|
|
172
|
+
export declare function sdCalendarRangeOf(placement: Pick<SdCalendarPlacement, 'allDay' | 'startDay' | 'startMinutes' | 'endDay' | 'endMinutes'>, clock: SdCalendarClock, transform: SdTemporalValueTransform | null | undefined): SdCalendarRange;
|
|
173
|
+
/** Where an event should go: wall clock of its start and end in the zone. */
|
|
174
|
+
export interface SdCalendarTarget {
|
|
175
|
+
readonly allDay: boolean;
|
|
176
|
+
readonly startDay: string;
|
|
177
|
+
readonly startMinutes: number;
|
|
178
|
+
readonly endDay: string;
|
|
179
|
+
readonly endMinutes: number;
|
|
180
|
+
}
|
|
181
|
+
/** The target of a placed event where it is now. */
|
|
182
|
+
export declare function sdCalendarTargetOf(placement: SdCalendarTarget): SdCalendarTarget;
|
|
183
|
+
/** The target of a placement moved by whole days, its times and kind kept. */
|
|
184
|
+
export declare function sdCalendarShiftDays(placement: SdCalendarTarget, days: number): SdCalendarTarget;
|
|
185
|
+
/**
|
|
186
|
+
* Target of `move(id, to)` (calendar.md §4.3): `to.allDay` (default `allDay`) picks the kind. All-day: the days of
|
|
187
|
+
* `to`, the duration in days kept without `to.end`. Timed: the span of `to`, or its start with the duration kept.
|
|
188
|
+
* `null` when a value cannot be read or the end is before the start.
|
|
189
|
+
*/
|
|
190
|
+
export declare function sdCalendarMoveTarget(placement: Pick<SdCalendarPlacement, 'firstDay' | 'lastDay' | 'startInstant' | 'endInstant'>, to: {
|
|
191
|
+
readonly start: SdCalendarDateInput;
|
|
192
|
+
readonly end?: SdCalendarDateInput | null;
|
|
193
|
+
readonly allDay?: boolean;
|
|
194
|
+
}, allDay: boolean, clock: SdCalendarClock): SdCalendarTarget | null;
|
|
195
|
+
/** Last calendar day a target covers (an end at 00:00 belongs to the day before). */
|
|
196
|
+
export declare function sdCalendarLastDayOf(target: SdCalendarTarget): string;
|
|
197
|
+
/** `step`: the input, then the configuration, then 30; a length that is not a divisor of 60 falls back to 30. */
|
|
198
|
+
export declare function sdCalendarResolveStep(value: number | undefined, configuration: ISdCalendarConfiguration | null): number;
|
|
199
|
+
/** `firstDayOfWeek`: the input, then the configuration, then Monday; anything but 0–6 is Monday. */
|
|
200
|
+
export declare function sdCalendarResolveFirstDayOfWeek(value: number | undefined, configuration: ISdCalendarConfiguration | null): number;
|
|
201
|
+
/** `workingHours`: the input (`null` included), then the configuration, then Monday–Friday. */
|
|
202
|
+
export declare function sdCalendarResolveWorkingHours(value: SdCalendarWorkingHours | null | undefined, configuration: ISdCalendarConfiguration | null): SdCalendarWorkingHours | null;
|
|
203
|
+
/** Holidays by calendar day (the input, then the configuration); an unreadable date is left out, the first one wins. */
|
|
204
|
+
export declare function sdCalendarHolidayMap(value: readonly SdCalendarHoliday[] | undefined, configuration: ISdCalendarConfiguration | null, clock: SdCalendarClock): Map<string, SdCalendarHoliday>;
|
|
205
|
+
/** Day of `minDate` / `maxDate`: `'TODAY'` is `today`; an empty value is no bound. */
|
|
206
|
+
export declare function sdCalendarBoundDay(value: SdCalendarDateInput | 'TODAY' | null | undefined, today: string, clock: SdCalendarClock): string | null;
|
|
207
|
+
/** `day` is before `minDay` or after `maxDay` (a `null` bound does not limit). */
|
|
208
|
+
export declare function sdCalendarOutOfRange(day: string, minDay: string | null, maxDay: string | null): boolean;
|
|
209
|
+
/** `'yyyy/MM/dd'` of a carrier (a local `Date` whose fields are a wall clock of the zone). */
|
|
210
|
+
export declare function sdCalendarCarrierDay(carrier: Date): string;
|
|
211
|
+
/** Identity of a visible range; two ranges with the same key are the same range. */
|
|
212
|
+
export declare function sdCalendarRangeKey(range: SdCalendarVisibleRange | {
|
|
213
|
+
readonly view: string;
|
|
214
|
+
readonly from: string;
|
|
215
|
+
readonly to: string;
|
|
216
|
+
}): string;
|
|
217
|
+
export declare function sdCalendarSameList(a: readonly string[], b: readonly string[]): boolean;
|
|
218
|
+
/** Client point of a mouse or touch event (the first touch, or the first changed one on `touchend`). */
|
|
219
|
+
export declare function sdCalendarPointOf(event: MouseEvent | TouchEvent): {
|
|
220
|
+
x: number;
|
|
221
|
+
y: number;
|
|
222
|
+
} | null;
|
|
223
|
+
/** Duplicate, empty or non-string ids, or an empty title: the data set is refused (calendar §5, scheduler §12). */
|
|
224
|
+
export declare function sdCalendarInvalidItems(items: readonly {
|
|
225
|
+
readonly id: unknown;
|
|
226
|
+
readonly title: unknown;
|
|
227
|
+
}[]): boolean;
|
|
228
|
+
/** `data-color` of an item (§8.1): a palette name as is, any other CSS colour as `custom` with the value aside. */
|
|
229
|
+
export declare function sdCalendarColor(color: string | undefined): {
|
|
230
|
+
readonly color: string;
|
|
231
|
+
readonly customColor: string | null;
|
|
232
|
+
};
|
|
233
|
+
/** A day off: an `off` holiday, or a weekday without working hours (never with `null` hours). */
|
|
234
|
+
export declare function sdCalendarIsOffDay(day: string, holiday: SdCalendarHoliday | null | undefined, hours: SdCalendarWorkingHours | null): boolean;
|
|
235
|
+
/** Weekdays of `hours` with a range that `sdCalendarWorkingRanges` leaves out (a dev-mode warning). */
|
|
236
|
+
export declare function sdCalendarBrokenWeekdays(hours: SdCalendarWorkingHours | null | undefined): number[];
|
|
237
|
+
/** SC-27: the selected id is no longer in the loaded items (only once the load settled). */
|
|
238
|
+
export declare function sdCalendarSelectionGone(selected: string | null, phase: string, items: readonly {
|
|
239
|
+
readonly id: string;
|
|
240
|
+
}[]): boolean;
|
|
241
|
+
/** An id inside an attribute selector. */
|
|
242
|
+
export declare function sdCalendarCssEscape(value: string): string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { TemplateRef } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* Action area (for example a ⋯ menu) of the `entity` and `file` layouts:
|
|
5
|
+
* `<ng-template sdCardActions>…</ng-template>` inside `sd-card`.
|
|
6
|
+
*
|
|
7
|
+
* Clicks inside the area never trigger the card's behavior.
|
|
8
|
+
*/
|
|
9
|
+
export declare class SdCardActionsDirective {
|
|
10
|
+
readonly templateRef: TemplateRef<void>;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SdCardActionsDirective, never>;
|
|
12
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<SdCardActionsDirective, "ng-template[sdCardActions]", never, {}, {}, never, never, true, never>;
|
|
13
|
+
}
|
|
@@ -1,9 +1,24 @@
|
|
|
1
|
+
import { type Signal } from '@angular/core';
|
|
1
2
|
import type { Color as SdColor } from '@sdcorejs/utils/models';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
3
4
|
/** Compares a model item with a card value for selection. */
|
|
4
5
|
export type SdCardCompareWith<T> = (modelValue: T, cardValue: T) => boolean;
|
|
6
|
+
/**
|
|
7
|
+
* What a descendant `SdCard` tells its group so the group can switch to radio semantics.
|
|
8
|
+
* @internal Implemented by `SdCard` only.
|
|
9
|
+
*/
|
|
10
|
+
export interface ɵSdCardGroupMember {
|
|
11
|
+
readonly element: HTMLElement;
|
|
12
|
+
/** The card renders the `option` layout and behaves as `select`. */
|
|
13
|
+
readonly isOption: Signal<boolean>;
|
|
14
|
+
/** The card can receive focus and selection. */
|
|
15
|
+
readonly isEnabled: Signal<boolean>;
|
|
16
|
+
readonly selected: Signal<boolean>;
|
|
17
|
+
readonly value: Signal<unknown>;
|
|
18
|
+
}
|
|
5
19
|
/** Owns single or multiple selection state for descendant `SdCard` instances. */
|
|
6
20
|
export declare class SdCardGroup<T = unknown> {
|
|
21
|
+
#private;
|
|
7
22
|
/** Selected value, selected values, or `null` when there is no selection. */
|
|
8
23
|
readonly model: import("@angular/core").ModelSignal<T | T[] | null>;
|
|
9
24
|
/** Whether more than one card can be selected. Bare attributes coerce to `true`. */
|
|
@@ -18,7 +33,23 @@ export declare class SdCardGroup<T = unknown> {
|
|
|
18
33
|
readonly compareWith: import("@angular/core").InputSignal<SdCardCompareWith<T>>;
|
|
19
34
|
/** Emits only after an accepted user activation changes `model`. */
|
|
20
35
|
readonly sdChange: import("@angular/core").OutputEmitterRef<T | T[] | null>;
|
|
21
|
-
protected readonly resolvedAutoId:
|
|
36
|
+
protected readonly resolvedAutoId: Signal<string | undefined>;
|
|
37
|
+
/**
|
|
38
|
+
* Single selection where every card is an `option`: the group is a radiogroup with one tab stop and arrow keys.
|
|
39
|
+
* @internal
|
|
40
|
+
*/
|
|
41
|
+
readonly radioMode: Signal<boolean>;
|
|
42
|
+
/** @internal Called by descendant cards on creation. */
|
|
43
|
+
ɵregister(member: ɵSdCardGroupMember): void;
|
|
44
|
+
/** @internal Called by descendant cards on destroy. */
|
|
45
|
+
ɵunregister(member: ɵSdCardGroupMember): void;
|
|
46
|
+
/** @internal Whether `member` is the radiogroup tab stop. */
|
|
47
|
+
ɵisTabStop(member: ɵSdCardGroupMember): boolean;
|
|
48
|
+
/**
|
|
49
|
+
* @internal Moves focus and selection to the next (`step` 1) or previous (`step` -1) enabled radio, wrapping.
|
|
50
|
+
* Selecting never clears: the target is selected unless it already is.
|
|
51
|
+
*/
|
|
52
|
+
ɵmoveFocus(from: ɵSdCardGroupMember, step: 1 | -1): void;
|
|
22
53
|
/** Returns whether `value` is selected under the current mode and comparator. */
|
|
23
54
|
isSelected(value: T): boolean;
|
|
24
55
|
/** Applies one accepted card activation and emits the resulting model when it changes. */
|
|
@@ -1,27 +1,93 @@
|
|
|
1
1
|
import { OnDestroy, OnInit, Signal } from '@angular/core';
|
|
2
|
+
import { type Params } from '@angular/router';
|
|
2
3
|
import type { Color as SdColor } from '@sdcorejs/utils/models';
|
|
4
|
+
import { SdCardActionsDirective } from './card-actions.directive';
|
|
5
|
+
import type { SdCardBehavior, SdCardContent, SdCardSize } from './card.model';
|
|
3
6
|
import * as i0 from "@angular/core";
|
|
4
7
|
export declare class SdCard<T = unknown> implements OnInit, OnDestroy {
|
|
5
8
|
#private;
|
|
6
|
-
/**
|
|
7
|
-
readonly value: import("@angular/core").InputSignal<NonNullable<T
|
|
9
|
+
/** Value used by the nearest group selection model. Required for `select` inside a group. */
|
|
10
|
+
readonly value: import("@angular/core").InputSignal<NonNullable<T> | undefined>;
|
|
11
|
+
/** Interaction model; defaults to `select` inside `sd-card-group` and `static` elsewhere. */
|
|
12
|
+
readonly behavior: import("@angular/core").InputSignal<SdCardBehavior | undefined>;
|
|
13
|
+
/** Built-in layout and its data; without it the card projects `ng-content`. */
|
|
14
|
+
readonly content: import("@angular/core").InputSignal<SdCardContent | undefined>;
|
|
15
|
+
/** Density; layouts without an `sm` variant (`option`, `file`) always render `md`. */
|
|
16
|
+
readonly size: import("@angular/core").InputSignal<SdCardSize | undefined>;
|
|
17
|
+
/** Skeleton state of a built-in layout; blocks activation and keeps the card height. No effect without `content`. */
|
|
18
|
+
readonly loading: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
19
|
+
/** Failed state of a built-in layout with a "Retry" button (`sdRetry`). No effect without `content`. */
|
|
20
|
+
readonly error: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
21
|
+
/** Router commands for `behavior="link"` (rendered through `RouterLink`). */
|
|
22
|
+
readonly link: import("@angular/core").InputSignal<string | readonly unknown[] | undefined>;
|
|
23
|
+
/** Query params that go with `link`. */
|
|
24
|
+
readonly queryParams: import("@angular/core").InputSignal<Params | undefined>;
|
|
25
|
+
/** External URL or file download for `behavior="link"`; `link` wins when both are set. */
|
|
26
|
+
readonly href: import("@angular/core").InputSignal<string | undefined>;
|
|
27
|
+
/** Anchor target; only applies to `href`. */
|
|
28
|
+
readonly target: import("@angular/core").InputSignal<string | undefined>;
|
|
8
29
|
/** Whether this card is disabled independently of its group. */
|
|
9
30
|
readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
10
31
|
/** Stable suffix used by the Core UI inspector and end-to-end selectors. */
|
|
11
32
|
readonly autoId: import("@angular/core").InputSignal<string | null | undefined>;
|
|
12
33
|
/** Optional semantic color override; otherwise the nearest group or Core UI default is used. */
|
|
13
34
|
readonly color: import("@angular/core").InputSignalWithTransform<SdColor | undefined, SdColor | null | undefined>;
|
|
14
|
-
/**
|
|
35
|
+
/** `select`: emits the accepted native `Event` after the selection changed. `link`: emits after navigation started. */
|
|
15
36
|
readonly click: import("@angular/core").OutputEmitterRef<Event>;
|
|
16
|
-
/**
|
|
37
|
+
/** The user pressed "Retry" in the error state; the card's behavior is not triggered. */
|
|
38
|
+
readonly sdRetry: import("@angular/core").OutputEmitterRef<void>;
|
|
39
|
+
protected readonly layout: Signal<"stat" | "option" | "entity" | "file" | "shortcut" | undefined>;
|
|
40
|
+
/** Rendered behavior. A stat link whose value is 0 renders static so it never opens an empty list. */
|
|
41
|
+
protected readonly mode: Signal<SdCardBehavior>;
|
|
42
|
+
protected readonly resolvedSize: Signal<SdCardSize>;
|
|
43
|
+
/** Loading applies to built-in layouts only. */
|
|
44
|
+
protected readonly busy: Signal<boolean>;
|
|
45
|
+
/** Error applies to built-in layouts only; loading wins over error. */
|
|
46
|
+
protected readonly failed: Signal<boolean>;
|
|
47
|
+
protected readonly stat: Signal<{
|
|
48
|
+
data: import("@sdcorejs/angular/components/card").SdCardStatData;
|
|
49
|
+
value: import("./card.format").SdCardStatValue;
|
|
50
|
+
delta: import("./card.format").SdCardStatDelta | null;
|
|
51
|
+
} | null>;
|
|
52
|
+
/** Accessible name of the focusable element (host for select/static, anchor for link) for built-in layouts. */
|
|
53
|
+
protected readonly accessibleLabel: Signal<string | null>;
|
|
54
|
+
/** Read-only selection state; always `false` unless the card behaves as `select`. */
|
|
17
55
|
readonly selected: Signal<boolean>;
|
|
18
56
|
protected readonly effectiveDisabled: Signal<boolean>;
|
|
19
57
|
protected readonly effectiveColor: Signal<SdColor>;
|
|
20
58
|
protected readonly resolvedAutoId: Signal<string | undefined>;
|
|
59
|
+
/** The card renders the `option` layout as a selectable choice. */
|
|
60
|
+
protected readonly isOption: Signal<boolean>;
|
|
61
|
+
/** Option cards read as checkboxes unless they sit in a single-selection group. */
|
|
62
|
+
protected readonly optionMultiple: Signal<boolean>;
|
|
63
|
+
protected readonly checkIcon: Signal<"check_box" | "check_box_outline_blank" | "check_circle" | "radio_button_unchecked">;
|
|
64
|
+
protected readonly option: Signal<import("@sdcorejs/angular/components/card").SdCardOptionData | null>;
|
|
65
|
+
protected readonly file: Signal<{
|
|
66
|
+
data: import("@sdcorejs/angular/components/card").SdCardFileData;
|
|
67
|
+
info: import("./card.format").SdCardFileInfo;
|
|
68
|
+
meta: string;
|
|
69
|
+
} | null>;
|
|
70
|
+
protected readonly shortcut: Signal<import("@sdcorejs/angular/components/card").SdCardShortcutData | null>;
|
|
71
|
+
protected readonly actionsTemplate: Signal<SdCardActionsDirective | undefined>;
|
|
72
|
+
/** Action template, rendered only for `entity` at md and for `file`. */
|
|
73
|
+
protected readonly actions: Signal<SdCardActionsDirective | null>;
|
|
74
|
+
protected readonly entity: Signal<{
|
|
75
|
+
data: import("@sdcorejs/angular/components/card").SdCardEntityData;
|
|
76
|
+
meta: {
|
|
77
|
+
label: string;
|
|
78
|
+
value: string;
|
|
79
|
+
}[];
|
|
80
|
+
metaColumns: string;
|
|
81
|
+
} | null>;
|
|
82
|
+
protected readonly hostRole: Signal<"checkbox" | "radio" | "button" | "group" | null>;
|
|
83
|
+
protected readonly hostTabIndex: Signal<0 | -1 | null>;
|
|
84
|
+
/** Router link when present; otherwise the external href. */
|
|
85
|
+
protected readonly routerCommands: Signal<string | readonly unknown[] | null>;
|
|
21
86
|
constructor();
|
|
22
87
|
ngOnInit(): void;
|
|
23
88
|
protected onKeydown(event: KeyboardEvent): void;
|
|
89
|
+
protected retry(): void;
|
|
24
90
|
ngOnDestroy(): void;
|
|
25
91
|
static ɵfac: i0.ɵɵFactoryDeclaration<SdCard<any>, never>;
|
|
26
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SdCard<any>, "sd-card", ["sdCard"], { "value": { "alias": "value"; "required": true; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "autoId": { "alias": "autoId"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; }, { "click": "click"; },
|
|
92
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SdCard<any>, "sd-card", ["sdCard"], { "value": { "alias": "value"; "required": false; "isSignal": true; }; "behavior": { "alias": "behavior"; "required": false; "isSignal": true; }; "content": { "alias": "content"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "link": { "alias": "link"; "required": false; "isSignal": true; }; "queryParams": { "alias": "queryParams"; "required": false; "isSignal": true; }; "href": { "alias": "href"; "required": false; "isSignal": true; }; "target": { "alias": "target"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "autoId": { "alias": "autoId"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; }, { "click": "click"; "sdRetry": "sdRetry"; }, ["actionsTemplate"], ["*"], true, never>;
|
|
27
93
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { InjectionToken, type Signal } from '@angular/core';
|
|
2
|
+
/** App-wide defaults for `sd-card` layouts. */
|
|
3
|
+
export interface SdCardConfiguration {
|
|
4
|
+
/**
|
|
5
|
+
* Word form of `format: 'compact'` numbers. Defaults to `'long'` for Vietnamese ("86,4 triệu") and `'short'`
|
|
6
|
+
* for other locales ("86.4M").
|
|
7
|
+
*/
|
|
8
|
+
compactDisplay?: 'short' | 'long';
|
|
9
|
+
}
|
|
10
|
+
export declare const SD_CARD_CONFIGURATION: InjectionToken<SdCardConfiguration>;
|
|
11
|
+
/**
|
|
12
|
+
* Layout context a surrounding page frame (for example `sd-page-list`) offers the cards inside it.
|
|
13
|
+
*
|
|
14
|
+
* why: the token lives in the card entry so the card does not depend back on `modules/layout`.
|
|
15
|
+
*/
|
|
16
|
+
export interface SdCardLayout {
|
|
17
|
+
/** Cards without an explicit `size` render `sm` while this is true. */
|
|
18
|
+
readonly compact: Signal<boolean>;
|
|
19
|
+
}
|
|
20
|
+
export declare const SD_CARD_LAYOUT: InjectionToken<SdCardLayout>;
|