@sdcorejs/angular 22.3.1 → 22.3.3
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 +25 -5
- package/assets/THEME.md +289 -5
- package/assets/licenses/tiptap-oss-NOTICES.txt +332 -0
- package/assets/scss/ckeditor5.scss +2 -88
- package/assets/scss/core/_control.scss +39 -0
- package/assets/scss/core/form.scss +444 -45
- package/assets/scss/core/view.scss +24 -0
- package/assets/scss/editor-content.scss +173 -0
- package/assets/scss/sd-core.scss +1 -0
- package/assets/scss/themes/_component-tokens.scss +123 -32
- package/assets/scss/themes/_material-tokens.scss +112 -0
- package/assets/scss/themes/_presets.scss +25 -0
- package/assets/scss/themes/_scales.scss +10 -0
- package/assets/scss/themes/_semantic.scss +13 -0
- package/assets/scss/themes/default.scss +8 -2
- package/fesm2022/sdcorejs-angular-components-api-contract-builder.mjs +5 -5
- package/fesm2022/sdcorejs-angular-components-api-contract-builder.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-avatar.mjs +166 -11
- package/fesm2022/sdcorejs-angular-components-avatar.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-badge.mjs +590 -24
- package/fesm2022/sdcorejs-angular-components-badge.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-button.mjs +35 -3
- package/fesm2022/sdcorejs-angular-components-button.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-ckeditor-styles.mjs +5 -20
- package/fesm2022/sdcorejs-angular-components-ckeditor-styles.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-data-state.mjs +1 -1
- package/fesm2022/sdcorejs-angular-components-data-state.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-editor-engine.mjs +1906 -0
- package/fesm2022/sdcorejs-angular-components-editor-engine.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-components-editor.mjs +461 -757
- package/fesm2022/sdcorejs-angular-components-editor.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-file-explorer.mjs +69 -37
- package/fesm2022/sdcorejs-angular-components-file-explorer.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-form-generic.mjs +2195 -1182
- package/fesm2022/sdcorejs-angular-components-form-generic.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-history.mjs +5 -2
- package/fesm2022/sdcorejs-angular-components-history.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-image-editor.mjs +1 -1
- package/fesm2022/sdcorejs-angular-components-image-editor.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-import-excel.mjs +21 -6
- package/fesm2022/sdcorejs-angular-components-import-excel.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-inform.mjs +1 -1
- package/fesm2022/sdcorejs-angular-components-inform.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-kanban.mjs +12 -2
- package/fesm2022/sdcorejs-angular-components-kanban.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-mini-editor.mjs +182 -284
- package/fesm2022/sdcorejs-angular-components-mini-editor.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-modal-resizable.mjs +1 -316
- package/fesm2022/sdcorejs-angular-components-modal-resizable.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-modal.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-modal.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-operator.mjs +274 -44
- package/fesm2022/sdcorejs-angular-components-operator.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-query-bar.mjs +12 -12
- package/fesm2022/sdcorejs-angular-components-query-bar.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-query-builder.mjs +1 -1
- package/fesm2022/sdcorejs-angular-components-query-builder.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-section.mjs +17 -5
- package/fesm2022/sdcorejs-angular-components-section.mjs.map +1 -1
- 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-splitter.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-tab-router.mjs +574 -95
- package/fesm2022/sdcorejs-angular-components-tab-router.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-table.mjs +1034 -119
- package/fesm2022/sdcorejs-angular-components-table.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-tree.mjs +1 -1
- package/fesm2022/sdcorejs-angular-components-tree.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-upload-file.mjs +932 -174
- package/fesm2022/sdcorejs-angular-components-upload-file.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-view.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-view.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-window.mjs +498 -0
- package/fesm2022/sdcorejs-angular-components-window.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-components.mjs +1 -0
- package/fesm2022/sdcorejs-angular-components.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-configurations.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-directives.mjs +18 -1
- package/fesm2022/sdcorejs-angular-directives.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-autocomplete.mjs +20 -2
- package/fesm2022/sdcorejs-angular-forms-autocomplete.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-checkbox.mjs +2 -2
- package/fesm2022/sdcorejs-angular-forms-checkbox.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-chip-calendar.mjs +483 -126
- package/fesm2022/sdcorejs-angular-forms-chip-calendar.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-chip.mjs +437 -122
- package/fesm2022/sdcorejs-angular-forms-chip.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-date-range.mjs +86 -13
- package/fesm2022/sdcorejs-angular-forms-date-range.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-date.mjs +81 -18
- package/fesm2022/sdcorejs-angular-forms-date.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-datetime.mjs +79 -16
- package/fesm2022/sdcorejs-angular-forms-datetime.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-directives.mjs +90 -2
- package/fesm2022/sdcorejs-angular-forms-directives.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-entity-picker.mjs +2 -2
- package/fesm2022/sdcorejs-angular-forms-entity-picker.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-input-color.mjs +1 -1
- package/fesm2022/sdcorejs-angular-forms-input-color.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-input-number.mjs +63 -6
- package/fesm2022/sdcorejs-angular-forms-input-number.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-input.mjs +60 -7
- package/fesm2022/sdcorejs-angular-forms-input.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-models.mjs +88 -5
- package/fesm2022/sdcorejs-angular-forms-models.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-radio.mjs +2 -2
- package/fesm2022/sdcorejs-angular-forms-radio.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-segmented.mjs +5 -4
- package/fesm2022/sdcorejs-angular-forms-segmented.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-select.mjs +95 -33
- package/fesm2022/sdcorejs-angular-forms-select.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-switch.mjs +2 -2
- package/fesm2022/sdcorejs-angular-forms-switch.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-textarea.mjs +16 -3
- package/fesm2022/sdcorejs-angular-forms-textarea.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-time.mjs +2 -2
- package/fesm2022/sdcorejs-angular-forms-time.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 +1745 -22
- package/fesm2022/sdcorejs-angular-i18n.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-interceptors.mjs +1 -1
- package/fesm2022/sdcorejs-angular-interceptors.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-modules-generic-generic-configuration.page-SJIWI1dX.mjs +509 -0
- package/fesm2022/sdcorejs-angular-modules-generic-generic-configuration.page-SJIWI1dX.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-generic-generic-form-host.page-BPhMLVbv.mjs +232 -0
- package/fesm2022/sdcorejs-angular-modules-generic-generic-form-host.page-BPhMLVbv.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-generic-generic-list.page-aGhowe9Y.mjs +294 -0
- package/fesm2022/sdcorejs-angular-modules-generic-generic-list.page-aGhowe9Y.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-generic-sdcorejs-angular-modules-generic-N8_oGpqD.mjs +1556 -0
- package/fesm2022/sdcorejs-angular-modules-generic-sdcorejs-angular-modules-generic-N8_oGpqD.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-generic.mjs +2 -0
- package/fesm2022/sdcorejs-angular-modules-generic.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-icon.mjs +96 -3
- package/fesm2022/sdcorejs-angular-modules-icon.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-modules-layout.mjs +2178 -38
- package/fesm2022/sdcorejs-angular-modules-layout.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-api-error-BBWwQ6h2.mjs +23 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-api-error-BBWwQ6h2.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-approval-inbox-BMwD6_FC.mjs +16 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-approval-inbox-BMwD6_FC.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-base-api.service-Cfmr0L_5.mjs +51 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-base-api.service-Cfmr0L_5.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-create-side-drawer.component-C7-itJqB.mjs +134 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-create-side-drawer.component-C7-itJqB.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-create-side-drawer.component-CxgmaNod.mjs +132 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-create-side-drawer.component-CxgmaNod.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-create.component-C2GdGhkJ.mjs +100 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-create.component-C2GdGhkJ.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-create.component-CzJh4LMR.mjs +119 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-create.component-CzJh4LMR.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-create.component-DIivNX4o.mjs +469 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-create.component-DIivNX4o.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-customer.model-C3fr4yNw.mjs +18 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-customer.model-C3fr4yNw.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-customer.service-B0nhFd_M.mjs +67 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-customer.service-B0nhFd_M.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-detail-side-drawer.component-D1dqsKX0.mjs +152 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-detail-side-drawer.component-D1dqsKX0.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-Dkmm0a2Y.mjs +479 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-Dkmm0a2Y.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-WK0AcxNJ.mjs +175 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-WK0AcxNJ.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-yJ5fPyYU.mjs +92 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-yJ5fPyYU.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-flow.component-BvhEMUgY.mjs +533 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-flow.component-BvhEMUgY.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-form-api-errors-Ydotvlyc.mjs +64 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-form-api-errors-Ydotvlyc.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-D8-WXUAE.mjs +92 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-D8-WXUAE.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-DHTxzjRN.mjs +242 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-DHTxzjRN.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-cxNRkeRU.mjs +179 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-cxNRkeRU.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-general-information-view.component-CTgHdGeQ.mjs +72 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-general-information-view.component-CTgHdGeQ.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-index.component-D1zWXyN6.mjs +100 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-index.component-D1zWXyN6.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-lines-form.component-BK__9Mzb.mjs +541 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-lines-form.component-BK__9Mzb.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-1Xn1WaAP.mjs +647 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-1Xn1WaAP.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-B6Ndq542.mjs +120 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-B6Ndq542.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-Bv_l7vnz.mjs +73 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-Bv_l7vnz.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-CaXgC8wK.mjs +172 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-CaXgC8wK.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-ChwTb4BU.mjs +118 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-ChwTb4BU.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-mock-backend.factory-DKK3NmbN.mjs +1069 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-mock-backend.factory-DKK3NmbN.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-pattern-source-viewer-BpLQaYP5.mjs +186 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-pattern-source-viewer-BpLQaYP5.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-pattern-source.generated-BrejHvB2.mjs +97 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-pattern-source.generated-BrejHvB2.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-product.model-BoHLJ8vf.mjs +12 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-product.model-BoHLJ8vf.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-product.service-GSlXwL2Z.mjs +49 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-product.service-GSlXwL2Z.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-profile.component-DPBwMafn.mjs +301 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-profile.component-DPBwMafn.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-1kifjm82.mjs +100 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-1kifjm82.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-B6z9lJYB.mjs +45 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-B6z9lJYB.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-D1fsRfRB.mjs +66 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-D1fsRfRB.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-DdCFCwxY.mjs +50 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-DdCFCwxY.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-DeThmv4f.mjs +74 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-DeThmv4f.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-bQpdxKlY.mjs +166 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-bQpdxKlY.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-h66efEeH.mjs +74 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-h66efEeH.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-t3O2L2J5.mjs +43 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-t3O2L2J5.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-sdcorejs-angular-modules-pattern-B6w4N6wo.mjs +413 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-sdcorejs-angular-modules-pattern-B6w4N6wo.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-shell.component-BIYHlzVQ.mjs +325 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-shell.component-BIYHlzVQ.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-DKgmhJT2.mjs +146 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-DKgmhJT2.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-nnldn2cz.mjs +135 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-nnldn2cz.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-update.component-C0Bewuwz.mjs +129 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-update.component-C0Bewuwz.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-update.component-Qlh3Lm2p.mjs +360 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-update.component-Qlh3Lm2p.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-update.component-p9R5-eou.mjs +101 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-update.component-p9R5-eou.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern.mjs +2 -0
- package/fesm2022/sdcorejs-angular-modules-pattern.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules.mjs +1 -0
- package/fesm2022/sdcorejs-angular-modules.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-pipes.mjs +27 -7
- package/fesm2022/sdcorejs-angular-pipes.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-services-confirm.mjs +1 -1
- package/fesm2022/sdcorejs-angular-services-confirm.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-services-date-time.mjs +143 -0
- package/fesm2022/sdcorejs-angular-services-date-time.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-services-storage.mjs +44 -8
- package/fesm2022/sdcorejs-angular-services-storage.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-services-unsaved-changes.mjs +104 -4
- package/fesm2022/sdcorejs-angular-services-unsaved-changes.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-services.mjs +1 -0
- package/fesm2022/sdcorejs-angular-services.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-utilities-read-state.mjs +4 -0
- package/fesm2022/sdcorejs-angular-utilities-read-state.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-utilities-theme.mjs +10 -0
- package/fesm2022/sdcorejs-angular-utilities-theme.mjs.map +1 -1
- package/modules/pattern/README.md +76 -0
- package/modules/pattern/docs/detail.md +237 -0
- package/modules/pattern/docs/drawer.md +484 -0
- package/modules/pattern/docs/flow.md +631 -0
- package/modules/pattern/docs/form.md +518 -0
- package/modules/pattern/docs/header-actions.md +342 -0
- package/modules/pattern/docs/list.md +247 -0
- package/modules/pattern/docs/relation.md +180 -0
- package/modules/pattern/docs/select.md +206 -0
- package/modules/pattern/docs/split.md +350 -0
- package/modules/pattern/docs/states.md +168 -0
- package/modules/pattern/features/approval/entity.resolver.ts +21 -0
- package/modules/pattern/features/approval/pages/detail/detail.component.ts +139 -0
- package/modules/pattern/features/approval/pages/list/approval-inbox.ts +7 -0
- package/modules/pattern/features/approval/pages/list/list.component.html +20 -0
- package/modules/pattern/features/approval/pages/list/list.component.ts +149 -0
- package/modules/pattern/features/approval/routes.ts +30 -0
- package/modules/pattern/features/approval/services/approval.model.ts +38 -0
- package/modules/pattern/features/approval/services/approval.service.ts +23 -0
- package/modules/pattern/features/category/components/create-side-drawer/create-side-drawer.component.ts +123 -0
- package/modules/pattern/features/category/components/general-information-form/general-information-form.component.ts +61 -0
- package/modules/pattern/features/category/components/update-side-drawer/update-side-drawer.component.ts +134 -0
- package/modules/pattern/features/category/entity.resolver.ts +27 -0
- package/modules/pattern/features/category/pages/list/list.component.html +20 -0
- package/modules/pattern/features/category/pages/list/list.component.ts +105 -0
- package/modules/pattern/features/category/routes.ts +42 -0
- package/modules/pattern/features/category/services/category.model.ts +39 -0
- package/modules/pattern/features/category/services/category.service.ts +36 -0
- package/modules/pattern/features/customer/components/create-side-drawer/create-side-drawer.component.ts +131 -0
- package/modules/pattern/features/customer/components/customer-select/customer-select.component.ts +72 -0
- package/modules/pattern/features/customer/components/customer-type-select/customer-type-select.component.ts +30 -0
- package/modules/pattern/features/customer/components/debts-view/debts-view.component.ts +28 -0
- package/modules/pattern/features/customer/components/detail-side-drawer/detail-side-drawer.component.ts +106 -0
- package/modules/pattern/features/customer/components/documents-view/documents-view.component.ts +50 -0
- package/modules/pattern/features/customer/components/general-information-form/general-information-form.component.ts +140 -0
- package/modules/pattern/features/customer/components/general-information-view/general-information-view.component.ts +39 -0
- package/modules/pattern/features/customer/components/orders-view/orders-view.component.ts +35 -0
- package/modules/pattern/features/customer/components/summary-cards/summary-cards.component.ts +101 -0
- package/modules/pattern/features/customer/components/update-side-drawer/update-side-drawer.component.ts +127 -0
- package/modules/pattern/features/customer/entity.resolver.ts +21 -0
- package/modules/pattern/features/customer/pages/list/list.component.html +22 -0
- package/modules/pattern/features/customer/pages/list/list.component.ts +113 -0
- package/modules/pattern/features/customer/pages/profile/profile.component.ts +120 -0
- package/modules/pattern/features/customer/pipes/customer-detail.pipe.ts +18 -0
- package/modules/pattern/features/customer/routes.ts +59 -0
- package/modules/pattern/features/customer/services/customer.model.ts +87 -0
- package/modules/pattern/features/customer/services/customer.service.ts +79 -0
- package/modules/pattern/features/import/components/mapping-form/mapping-form.component.ts +41 -0
- package/modules/pattern/features/import/components/preview-view/preview-view.component.ts +44 -0
- package/modules/pattern/features/import/pages/flow/flow.component.ts +269 -0
- package/modules/pattern/features/import/routes.ts +19 -0
- package/modules/pattern/features/import/services/import.model.ts +82 -0
- package/modules/pattern/features/import/services/import.service.ts +18 -0
- package/modules/pattern/features/order/components/approval-steps/approval-steps.component.ts +74 -0
- package/modules/pattern/features/order/components/bulk-result/bulk-result.component.ts +46 -0
- package/modules/pattern/features/order/components/general-information-form/general-information-form.component.ts +96 -0
- package/modules/pattern/features/order/components/lines-form/lines-form.component.ts +205 -0
- package/modules/pattern/features/order/components/lines-view/lines-view.component.ts +42 -0
- package/modules/pattern/features/order/components/summary-cards/summary-cards.component.ts +128 -0
- package/modules/pattern/features/order/entity.resolver.ts +37 -0
- package/modules/pattern/features/order/pages/create/create.component.ts +99 -0
- package/modules/pattern/features/order/pages/detail/detail.component.ts +222 -0
- package/modules/pattern/features/order/pages/list/list.component.html +38 -0
- package/modules/pattern/features/order/pages/list/list.component.ts +291 -0
- package/modules/pattern/features/order/pages/update/update.component.ts +119 -0
- package/modules/pattern/features/order/routes.ts +54 -0
- package/modules/pattern/features/order/services/order.model.ts +109 -0
- package/modules/pattern/features/order/services/order.service.ts +63 -0
- package/modules/pattern/features/partner/pages/create/create.component.ts +324 -0
- package/modules/pattern/features/partner/routes.ts +20 -0
- package/modules/pattern/features/partner/services/partner.model.ts +30 -0
- package/modules/pattern/features/partner/services/partner.service.ts +17 -0
- package/modules/pattern/features/product/components/general-information-form/general-information-form.component.ts +88 -0
- package/modules/pattern/features/product/components/product-select/product-select.component.ts +65 -0
- package/modules/pattern/features/product/components/product-status-select/product-status-select.component.ts +30 -0
- package/modules/pattern/features/product/entity.resolver.ts +21 -0
- package/modules/pattern/features/product/pages/create/create.component.ts +85 -0
- package/modules/pattern/features/product/pages/detail/detail.component.ts +53 -0
- package/modules/pattern/features/product/pages/list/list.component.html +30 -0
- package/modules/pattern/features/product/pages/list/list.component.ts +71 -0
- package/modules/pattern/features/product/pages/update/update.component.ts +86 -0
- package/modules/pattern/features/product/pipes/product-detail.pipe.ts +18 -0
- package/modules/pattern/features/product/routes.ts +48 -0
- package/modules/pattern/features/product/services/product.model.ts +38 -0
- package/modules/pattern/features/product/services/product.service.ts +48 -0
- package/modules/pattern/features/settings/pages/update/update.component.ts +227 -0
- package/modules/pattern/features/settings/routes.ts +24 -0
- package/modules/pattern/features/settings/services/settings.model.ts +18 -0
- package/modules/pattern/features/settings/services/settings.service.ts +15 -0
- package/modules/pattern/features/settings/settings.resolver.ts +8 -0
- package/package.json +44 -7
- package/types/sdcorejs-angular-components-avatar.d.ts +67 -2
- package/types/sdcorejs-angular-components-badge.d.ts +206 -6
- package/types/sdcorejs-angular-components-button.d.ts +20 -1
- package/types/sdcorejs-angular-components-ckeditor-styles.d.ts +3 -18
- package/types/sdcorejs-angular-components-editor-engine.d.ts +246 -0
- package/types/sdcorejs-angular-components-editor.d.ts +20 -17
- package/types/sdcorejs-angular-components-file-explorer.d.ts +4 -2
- package/types/sdcorejs-angular-components-form-generic.d.ts +246 -35
- package/types/sdcorejs-angular-components-mini-editor.d.ts +33 -70
- package/types/sdcorejs-angular-components-modal-resizable.d.ts +1 -124
- package/types/sdcorejs-angular-components-operator.d.ts +137 -8
- package/types/sdcorejs-angular-components-section.d.ts +13 -1
- package/types/sdcorejs-angular-components-splitter.d.ts +1 -1
- package/types/sdcorejs-angular-components-tab-router.d.ts +74 -19
- package/types/sdcorejs-angular-components-table.d.ts +210 -18
- package/types/sdcorejs-angular-components-upload-file.d.ts +181 -21
- package/types/sdcorejs-angular-components-window.d.ts +81 -0
- package/types/sdcorejs-angular-components.d.ts +1 -0
- package/types/sdcorejs-angular-configurations.d.ts +8 -1
- package/types/sdcorejs-angular-forms-autocomplete.d.ts +5 -0
- package/types/sdcorejs-angular-forms-chip-calendar.d.ts +163 -18
- package/types/sdcorejs-angular-forms-chip.d.ts +136 -26
- package/types/sdcorejs-angular-forms-date-range.d.ts +24 -2
- package/types/sdcorejs-angular-forms-date.d.ts +23 -2
- package/types/sdcorejs-angular-forms-directives.d.ts +47 -2
- package/types/sdcorejs-angular-forms-input-number.d.ts +23 -2
- package/types/sdcorejs-angular-forms-input.d.ts +23 -2
- package/types/sdcorejs-angular-forms-models.d.ts +38 -3
- package/types/sdcorejs-angular-forms-select.d.ts +32 -2
- package/types/sdcorejs-angular-i18n.d.ts +344 -2
- package/types/sdcorejs-angular-modules-generic.d.ts +316 -0
- package/types/sdcorejs-angular-modules-icon.d.ts +37 -6
- package/types/sdcorejs-angular-modules-layout.d.ts +622 -89
- package/types/sdcorejs-angular-modules-pattern.d.ts +50 -0
- package/types/sdcorejs-angular-modules.d.ts +1 -0
- package/types/sdcorejs-angular-pipes.d.ts +2 -0
- package/types/sdcorejs-angular-services-date-time.d.ts +57 -0
- package/types/sdcorejs-angular-services-storage.d.ts +8 -1
- package/types/sdcorejs-angular-services-unsaved-changes.d.ts +11 -0
- package/types/sdcorejs-angular-services.d.ts +1 -0
- package/types/sdcorejs-angular-utilities-read-state.d.ts +2 -0
- package/types/sdcorejs-angular-utilities-theme.d.ts +1 -1
|
@@ -1,78 +1,131 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as i8 from '@angular/cdk/a11y';
|
|
2
|
+
import { A11yModule } from '@angular/cdk/a11y';
|
|
3
|
+
import * as i7 from '@angular/cdk/overlay';
|
|
4
|
+
import { OverlayModule } from '@angular/cdk/overlay';
|
|
2
5
|
import * as i1 from '@angular/common';
|
|
3
|
-
import { CommonModule } from '@angular/common';
|
|
6
|
+
import { formatDate, CommonModule } from '@angular/common';
|
|
4
7
|
import * as i0 from '@angular/core';
|
|
5
|
-
import {
|
|
8
|
+
import { inject, ChangeDetectionStrategy, Component, ChangeDetectorRef, ElementRef, LOCALE_ID, viewChild, signal, input, computed, booleanAttribute, model, output, contentChild, effect, isDevMode, DestroyRef } from '@angular/core';
|
|
9
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
6
10
|
import { Utilities, DateUtilities } from '@sdcorejs/utils/fns';
|
|
7
11
|
import * as i2 from '@angular/forms';
|
|
8
|
-
import { NgForm, FormGroup, FormControl, Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
9
|
-
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
|
12
|
+
import { FormGroupDirective, NgForm, FormGroup, FormControl, Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
10
13
|
import * as i5 from '@angular/material/chips';
|
|
11
14
|
import { MatChipsModule } from '@angular/material/chips';
|
|
12
15
|
import { MatNativeDateModule } from '@angular/material/core';
|
|
13
16
|
import * as i6 from '@angular/material/datepicker';
|
|
14
|
-
import { MatCalendar, MatDatepickerModule } from '@angular/material/datepicker';
|
|
15
|
-
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
17
|
+
import { MatCalendarHeader, MatCalendar, MatDatepickerModule } from '@angular/material/datepicker';
|
|
18
|
+
import { MatFormField, MatFormFieldModule } from '@angular/material/form-field';
|
|
16
19
|
import * as i3 from '@angular/material/input';
|
|
17
20
|
import { MatInputModule } from '@angular/material/input';
|
|
18
|
-
import * as i7 from '@angular/material/menu';
|
|
19
|
-
import { MatMenuTrigger, MatMenuModule } from '@angular/material/menu';
|
|
20
|
-
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
|
21
21
|
import * as i4 from '@angular/material/tooltip';
|
|
22
22
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
23
|
+
import { SdButton } from '@sdcorejs/angular/components/button';
|
|
23
24
|
import { SdView } from '@sdcorejs/angular/components/view';
|
|
24
25
|
import { SdViewDefDirective, SdLabelDefDirective } from '@sdcorejs/angular/forms/directives';
|
|
25
26
|
import { SdLabel } from '@sdcorejs/angular/forms/label';
|
|
26
|
-
import { ɵsdTimerScope as _sdTimerScope, sdFormControlState, sdViewedTransform, sdViewedInline, SdFormControl, ɵsdFormControlConnector as _sdFormControlConnector } from '@sdcorejs/angular/forms/models';
|
|
27
|
-
import { I18nService } from '@sdcorejs/angular/i18n';
|
|
27
|
+
import { ɵsdTimerScope as _sdTimerScope, sdFormControlState, sdViewedTransform, sdViewedInline, SdFormControl, ɵsdModelFacingControl as _sdModelFacingControl, ɵsdFormControlConnector as _sdFormControlConnector, ɵsdNormalizeCalendarDay as _sdNormalizeCalendarDay, sdLocalStartOfDay, sdSerializeTemporalValue } from '@sdcorejs/angular/forms/models';
|
|
28
|
+
import { I18nService, SdTranslatePipe } from '@sdcorejs/angular/i18n';
|
|
29
|
+
import { SdDateTimeService } from '@sdcorejs/angular/services/date-time';
|
|
28
30
|
import { sdIsEmpty, sdSerializeDataValue } from '@sdcorejs/angular/utilities/data-state';
|
|
29
31
|
import { Subscription } from 'rxjs';
|
|
30
32
|
import { SdIcon } from '@sdcorejs/angular/modules/icon';
|
|
31
33
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
34
|
+
/**
|
|
35
|
+
* Header of the `<sd-chip-calendar>` popup (design handoff 3 · 2): previous button, period label, next button, in that
|
|
36
|
+
* tab order. Extends Material's header for the paging rules, the min/max limits and the `MatDatepickerIntl` labels;
|
|
37
|
+
* only the markup and the month label change. The month label is the current locale's long month and year
|
|
38
|
+
* (`Intl.DateTimeFormat`), capitalised; the year and multi-year views keep Material's labels.
|
|
39
|
+
*
|
|
40
|
+
* Internal (`ɵ`): not covered by SemVer.
|
|
41
|
+
*/
|
|
42
|
+
class ɵSdChipCalendarHeader extends MatCalendarHeader {
|
|
43
|
+
#i18n = inject(I18nService);
|
|
44
|
+
/** Visible period text: "Tháng 10 năm 2026" in month view, Material's text in the other views. */
|
|
45
|
+
get periodText() {
|
|
46
|
+
if (this.calendar.currentView !== 'month')
|
|
47
|
+
return this.periodButtonText;
|
|
48
|
+
const text = new Intl.DateTimeFormat(this.#i18n.locale(), { month: 'long', year: 'numeric' }).format(this.calendar.activeDate);
|
|
49
|
+
return text.charAt(0).toLocaleUpperCase(this.#i18n.locale()) + text.slice(1);
|
|
39
50
|
}
|
|
40
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type:
|
|
41
|
-
static
|
|
51
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: ɵSdChipCalendarHeader, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
52
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.5", type: ɵSdChipCalendarHeader, isStandalone: true, selector: "sd-chip-calendar-header", usesInheritance: true, ngImport: i0, template: "<!-- why: th\u1EE9 t\u1EF1 DOM = th\u1EE9 t\u1EF1 Tab c\u1EE7a th\u00F4ng s\u1ED1 (tr\u01B0\u1EDBc, nh\u00E3n, sau). Nh\u00E3n m\u00F4 t\u1EA3 n\u1EB1m trong v\u00F9ng aria-live \u1EA9n nh\u01B0 header\n m\u1EB7c \u0111\u1ECBnh c\u1EE7a Material, \u0111\u1EC3 screen reader \u0111\u1ECDc k\u1EF3 m\u1EDBi khi chuy\u1EC3n th\u00E1ng. -->\n<div class=\"sd-chip-calendar-header\">\n <span [id]=\"_periodButtonLabelId\" class=\"sd-visually-hidden\" aria-live=\"polite\">{{ periodButtonDescription }}</span>\n <button\n type=\"button\"\n class=\"sd-chip-calendar-header__nav\"\n data-chip-calendar-previous\n [disabled]=\"!previousEnabled()\"\n [attr.aria-label]=\"prevButtonLabel\"\n (click)=\"previousClicked()\">\n <sd-icon name=\"chevron_left\" size=\"20px\" aria-hidden=\"true\" />\n </button>\n <button\n type=\"button\"\n class=\"sd-chip-calendar-header__period\"\n data-chip-calendar-period\n [attr.aria-label]=\"periodButtonLabel\"\n [attr.aria-describedby]=\"_periodButtonLabelId\"\n (click)=\"currentPeriodClicked()\">\n <span aria-hidden=\"true\">{{ periodText }}</span>\n </button>\n <button\n type=\"button\"\n class=\"sd-chip-calendar-header__nav\"\n data-chip-calendar-next\n [disabled]=\"!nextEnabled()\"\n [attr.aria-label]=\"nextButtonLabel\"\n (click)=\"nextClicked()\">\n <sd-icon name=\"chevron_right\" size=\"20px\" aria-hidden=\"true\" />\n </button>\n</div>\n", styles: [".sd-chip-calendar-header{display:flex;align-items:center;justify-content:space-between;height:40px;margin-top:4px}.sd-chip-calendar-header__nav,.sd-chip-calendar-header__period{display:inline-flex;align-items:center;justify-content:center;margin:0;border:0;border-radius:8px;background:transparent;font:inherit;cursor:pointer}.sd-chip-calendar-header__nav:hover:not(:disabled),.sd-chip-calendar-header__period:hover:not(:disabled){background:color-mix(in srgb,var(--sd-text) 5%,transparent)}.sd-chip-calendar-header__nav:focus-visible,.sd-chip-calendar-header__period:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color);outline-offset:1px}.sd-chip-calendar-header__nav:disabled,.sd-chip-calendar-header__period:disabled{color:var(--sd-disabled-text);cursor:default}.sd-chip-calendar-header__nav{width:32px;height:32px;padding:0;color:var(--sd-text-secondary)}.sd-chip-calendar-header__period{height:32px;padding:0 8px;color:var(--sd-text);font-size:var(--sd-font-size-14, 14px);font-weight:var(--sd-font-weight-semibold, 600)}.sd-visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}@media(prefers-reduced-motion:no-preference){.sd-chip-calendar-header__nav,.sd-chip-calendar-header__period{transition:background-color var(--sd-duration-fast, .12s) ease}}\n"], dependencies: [{ kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
42
53
|
}
|
|
43
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type:
|
|
44
|
-
type:
|
|
45
|
-
args: [{
|
|
46
|
-
|
|
47
|
-
}]
|
|
48
|
-
}], ctorParameters: () => [] });
|
|
54
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: ɵSdChipCalendarHeader, decorators: [{
|
|
55
|
+
type: Component,
|
|
56
|
+
args: [{ selector: 'sd-chip-calendar-header', changeDetection: ChangeDetectionStrategy.OnPush, imports: [SdIcon], template: "<!-- why: th\u1EE9 t\u1EF1 DOM = th\u1EE9 t\u1EF1 Tab c\u1EE7a th\u00F4ng s\u1ED1 (tr\u01B0\u1EDBc, nh\u00E3n, sau). Nh\u00E3n m\u00F4 t\u1EA3 n\u1EB1m trong v\u00F9ng aria-live \u1EA9n nh\u01B0 header\n m\u1EB7c \u0111\u1ECBnh c\u1EE7a Material, \u0111\u1EC3 screen reader \u0111\u1ECDc k\u1EF3 m\u1EDBi khi chuy\u1EC3n th\u00E1ng. -->\n<div class=\"sd-chip-calendar-header\">\n <span [id]=\"_periodButtonLabelId\" class=\"sd-visually-hidden\" aria-live=\"polite\">{{ periodButtonDescription }}</span>\n <button\n type=\"button\"\n class=\"sd-chip-calendar-header__nav\"\n data-chip-calendar-previous\n [disabled]=\"!previousEnabled()\"\n [attr.aria-label]=\"prevButtonLabel\"\n (click)=\"previousClicked()\">\n <sd-icon name=\"chevron_left\" size=\"20px\" aria-hidden=\"true\" />\n </button>\n <button\n type=\"button\"\n class=\"sd-chip-calendar-header__period\"\n data-chip-calendar-period\n [attr.aria-label]=\"periodButtonLabel\"\n [attr.aria-describedby]=\"_periodButtonLabelId\"\n (click)=\"currentPeriodClicked()\">\n <span aria-hidden=\"true\">{{ periodText }}</span>\n </button>\n <button\n type=\"button\"\n class=\"sd-chip-calendar-header__nav\"\n data-chip-calendar-next\n [disabled]=\"!nextEnabled()\"\n [attr.aria-label]=\"nextButtonLabel\"\n (click)=\"nextClicked()\">\n <sd-icon name=\"chevron_right\" size=\"20px\" aria-hidden=\"true\" />\n </button>\n</div>\n", styles: [".sd-chip-calendar-header{display:flex;align-items:center;justify-content:space-between;height:40px;margin-top:4px}.sd-chip-calendar-header__nav,.sd-chip-calendar-header__period{display:inline-flex;align-items:center;justify-content:center;margin:0;border:0;border-radius:8px;background:transparent;font:inherit;cursor:pointer}.sd-chip-calendar-header__nav:hover:not(:disabled),.sd-chip-calendar-header__period:hover:not(:disabled){background:color-mix(in srgb,var(--sd-text) 5%,transparent)}.sd-chip-calendar-header__nav:focus-visible,.sd-chip-calendar-header__period:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color);outline-offset:1px}.sd-chip-calendar-header__nav:disabled,.sd-chip-calendar-header__period:disabled{color:var(--sd-disabled-text);cursor:default}.sd-chip-calendar-header__nav{width:32px;height:32px;padding:0;color:var(--sd-text-secondary)}.sd-chip-calendar-header__period{height:32px;padding:0 8px;color:var(--sd-text);font-size:var(--sd-font-size-14, 14px);font-weight:var(--sd-font-weight-semibold, 600)}.sd-visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}@media(prefers-reduced-motion:no-preference){.sd-chip-calendar-header__nav,.sd-chip-calendar-header__period{transition:background-color var(--sd-duration-fast, .12s) ease}}\n"] }]
|
|
57
|
+
}] });
|
|
49
58
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
+
/**
|
|
60
|
+
* Icon sizes of the field by size (handoff 2 · Kích thước): chip ✕ / lock, clear button, calendar button.
|
|
61
|
+
* The chip icons are one step below the handoff table (14 / 16 / 18px looked heavy next to the 13–14px date).
|
|
62
|
+
*/
|
|
63
|
+
const FIELD_ICONS = {
|
|
64
|
+
sm: { chip: '12px', clear: '16px', open: '18px' },
|
|
65
|
+
md: { chip: '14px', clear: '18px', open: '20px' },
|
|
66
|
+
lg: { chip: '16px', clear: '20px', open: '22px' },
|
|
67
|
+
};
|
|
68
|
+
const FULL_DATE = { day: 'numeric', month: 'long', year: 'numeric' };
|
|
69
|
+
/** Same days in the same order. */
|
|
70
|
+
function sameDays(left, right) {
|
|
71
|
+
if (left === right)
|
|
72
|
+
return true;
|
|
73
|
+
if (!left || !right || left.length !== right.length)
|
|
74
|
+
return false;
|
|
75
|
+
return left.every((value, index) => Object.is(value, right[index]));
|
|
76
|
+
}
|
|
77
|
+
/** `yyyy/MM/dd` → local midnight of that day (the carrier `mat-calendar` and `Intl` work with). */
|
|
78
|
+
function dayToDate(day) {
|
|
79
|
+
const [year, month, date] = day.split('/').map(Number);
|
|
80
|
+
return new Date(year, month - 1, date);
|
|
59
81
|
}
|
|
60
82
|
class SdChipCalendar {
|
|
61
83
|
#ref = inject(ChangeDetectorRef);
|
|
62
84
|
#i18n = inject(I18nService);
|
|
85
|
+
#dateTime = inject(SdDateTimeService);
|
|
86
|
+
#zoned = this.#dateTime.timeZone !== 'local';
|
|
87
|
+
// why: lỗi phải hiện khi form cha đã submit dù field chưa chạm (A4). NgForm / FormGroupDirective tổ tiên
|
|
88
|
+
// giữ cờ `submitted`; MatInput cũng lấy đúng hai directive này cho ErrorStateMatcher.
|
|
89
|
+
#parentForm = inject(FormGroupDirective, { optional: true }) ?? inject(NgForm, { optional: true });
|
|
90
|
+
#host = inject(ElementRef).nativeElement;
|
|
91
|
+
#locale = inject(LOCALE_ID);
|
|
63
92
|
// why: focus hoãn 100ms; handle phải bị clear khi destroy, nếu không timer vẫn chạm
|
|
64
93
|
// input của view đã tháo.
|
|
65
94
|
#timers = _sdTimerScope();
|
|
66
95
|
#subscription = new Subscription();
|
|
67
96
|
#name = Utilities.generateUuid();
|
|
68
|
-
#
|
|
97
|
+
#warnedUnreadable = false;
|
|
98
|
+
#warnedDeprecated = false;
|
|
69
99
|
/** why: id ổn định của <mat-error> để ô nhập chip trỏ `aria-describedby` sang — thông báo
|
|
70
100
|
* lỗi phải đọc được từ chính control, không chỉ hiện ra màn hình. */
|
|
71
101
|
errorId = `sd-chip-calendar-error-${Utilities.generateUuid()}`;
|
|
72
|
-
menuTrigger = viewChild(MatMenuTrigger, /* @ts-ignore */
|
|
73
|
-
...(ngDevMode ? [{ debugName: "menuTrigger" }] : /* istanbul ignore next */ []));
|
|
74
102
|
calendar = viewChild(MatCalendar, /* @ts-ignore */
|
|
75
103
|
...(ngDevMode ? [{ debugName: "calendar" }] : /* istanbul ignore next */ []));
|
|
104
|
+
// why: query signal không đặt được trên field ES private (#).
|
|
105
|
+
field = viewChild(MatFormField, /* @ts-ignore */
|
|
106
|
+
...(ngDevMode ? [{ debugName: "field" }] : /* istanbul ignore next */ []));
|
|
107
|
+
/** Header of the popup calendar (handoff 3 · 2). */
|
|
108
|
+
calendarHeader = ɵSdChipCalendarHeader;
|
|
109
|
+
panelId = `sd-chip-calendar-panel-${Utilities.generateUuid()}`;
|
|
110
|
+
/** Whether the popup is open. */
|
|
111
|
+
isOpen = signal(false, /* @ts-ignore */
|
|
112
|
+
...(ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []));
|
|
113
|
+
/** Month the popup opened at (4.2), fixed for one opening. */
|
|
114
|
+
openAt = signal(null, /* @ts-ignore */
|
|
115
|
+
...(ngDevMode ? [{ debugName: "openAt" }] : /* istanbul ignore next */ []));
|
|
116
|
+
/**
|
|
117
|
+
* The popup hangs from the field box (the outline), like the select panel. Read in `open()`: `_textField` of
|
|
118
|
+
* `MatFormField` is a view query, and read too early the origin falls back to the whole field with its subscript row.
|
|
119
|
+
*/
|
|
120
|
+
overlayOrigin = signal(undefined, /* @ts-ignore */
|
|
121
|
+
...(ngDevMode ? [{ debugName: "overlayOrigin" }] : /* istanbul ignore next */ []));
|
|
122
|
+
// why: cách khung ô 6px như panel sd-select / menu operator / badge picker (quyết định 3 của PLAN); lật lên khi thiếu chỗ.
|
|
123
|
+
positions = [
|
|
124
|
+
{ originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top', offsetY: 6 },
|
|
125
|
+
{ originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom', offsetY: -6 },
|
|
126
|
+
{ originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top', offsetY: 6 },
|
|
127
|
+
{ originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom', offsetY: -6 },
|
|
128
|
+
];
|
|
76
129
|
autoIdInput = input(undefined, { ...(ngDevMode ? { debugName: "autoIdInput" } : /* istanbul ignore next */ {}), alias: 'autoId',
|
|
77
130
|
transform: (v) => v ?? undefined });
|
|
78
131
|
autoId = computed(() => (this.autoIdInput() ? `forms-chip-calendar-${this.autoIdInput()}` : undefined), /* @ts-ignore */
|
|
@@ -128,20 +181,63 @@ class SdChipCalendar {
|
|
|
128
181
|
} });
|
|
129
182
|
label = input('', { ...(ngDevMode ? { debugName: "label" } : /* istanbul ignore next */ {}), transform: (v) => v ?? '' });
|
|
130
183
|
placeholder = input(undefined, { ...(ngDevMode ? { debugName: "placeholder" } : /* istanbul ignore next */ {}), transform: (v) => v ?? undefined });
|
|
184
|
+
/**
|
|
185
|
+
* `true` / `false` for every chip, or a predicate. The predicate receives the normalised `yyyy/MM/dd` day and is
|
|
186
|
+
* applied on every removal path: the ✕ button, Backspace / Delete on a chip, pressing the day again in the
|
|
187
|
+
* calendar and clearing.
|
|
188
|
+
*/
|
|
131
189
|
removable = input(true, { ...(ngDevMode ? { debugName: "removable" } : /* istanbul ignore next */ {}), transform: (v) => v ?? true });
|
|
132
190
|
hideInlineError = input(false, { ...(ngDevMode ? { debugName: "hideInlineError" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
133
191
|
required = input(false, { ...(ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
192
|
+
/** Fewest days to pick; > 0 adds `Validators.minLength`. Replaces `min`. */
|
|
193
|
+
minCount = input(undefined, { ...(ngDevMode ? { debugName: "minCount" } : /* istanbul ignore next */ {}), transform: (v) => v ?? undefined });
|
|
194
|
+
/** Most days to pick; > 0 adds `Validators.maxLength` and blocks picking more in the calendar (4.3). Replaces `max`. */
|
|
195
|
+
maxCount = input(undefined, { ...(ngDevMode ? { debugName: "maxCount" } : /* istanbul ignore next */ {}), transform: (v) => v ?? undefined });
|
|
196
|
+
/** @deprecated Use `minCount`; `minCount` wins when both are set. */
|
|
134
197
|
min = input(0, { ...(ngDevMode ? { debugName: "min" } : /* istanbul ignore next */ {}), transform: (v) => v ?? 0 });
|
|
198
|
+
/** @deprecated Use `maxCount`; `maxCount` wins when both are set. */
|
|
135
199
|
max = input(0, { ...(ngDevMode ? { debugName: "max" } : /* istanbul ignore next */ {}), transform: (v) => v ?? 0 });
|
|
200
|
+
/** Earliest day that can be picked; same reading as `minDate` of `<sd-date>` (`'TODAY'` = today in the zone). */
|
|
201
|
+
minDate = input(null, /* @ts-ignore */
|
|
202
|
+
...(ngDevMode ? [{ debugName: "minDate" }] : /* istanbul ignore next */ []));
|
|
203
|
+
/** Latest day that can be picked; same reading as `maxDate` of `<sd-date>`. */
|
|
204
|
+
maxDate = input(null, /* @ts-ignore */
|
|
205
|
+
...(ngDevMode ? [{ debugName: "maxDate" }] : /* istanbul ignore next */ []));
|
|
206
|
+
/** `false` makes a day unpickable. A chosen day stays removable even when the filter refuses it. Name of `mat-calendar`. */
|
|
207
|
+
dateFilter = input(null, /* @ts-ignore */
|
|
208
|
+
...(ngDevMode ? [{ debugName: "dateFilter" }] : /* istanbul ignore next */ []));
|
|
209
|
+
/** Month the popup opens at; without it, the chosen day nearest to today, else today (4.2). */
|
|
210
|
+
startAt = input(null, /* @ts-ignore */
|
|
211
|
+
...(ngDevMode ? [{ debugName: "startAt" }] : /* istanbul ignore next */ []));
|
|
212
|
+
/** Shows “Xoá hết” in the popup (and the clear button of the field). Off by default, like `clearable` of `<sd-date>`. */
|
|
213
|
+
clearable = input(false, { ...(ngDevMode ? { debugName: "clearable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
214
|
+
/**
|
|
215
|
+
* Chips shown while the popup is closed; the rest fold into a “+N” button that opens it. `null` shows them all.
|
|
216
|
+
* `2` is the suggestion inside `<sd-table>` filters.
|
|
217
|
+
*/
|
|
218
|
+
maxVisible = input(null, /* @ts-ignore */
|
|
219
|
+
...(ngDevMode ? [{ debugName: "maxVisible" }] : /* istanbul ignore next */ []));
|
|
220
|
+
/** Date format of the chips and of the viewed text, in Angular `DatePipe` syntax. */
|
|
221
|
+
displayFormat = input('dd/MM/yyyy', { ...(ngDevMode ? { debugName: "displayFormat" } : /* istanbul ignore next */ {}), transform: (v) => v || 'dd/MM/yyyy' });
|
|
136
222
|
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
137
223
|
/** Display mode: `false` edit · `true` static view · `'inline'` interactive (disabled `'inline'` → static). */
|
|
138
224
|
viewed = input(false, { ...(ngDevMode ? { debugName: "viewed" } : /* istanbul ignore next */ {}), transform: sdViewedTransform });
|
|
225
|
+
/**
|
|
226
|
+
* String form of each day when the value leaves the component, same contract as `<sd-date>`: `undefined` →
|
|
227
|
+
* `yyyy/MM/dd`, `'ISOString'` / `'UTCString'` → the start of the day (in `ISdCoreConfiguration.timeZone` when
|
|
228
|
+
* configured). Display is not affected.
|
|
229
|
+
*/
|
|
230
|
+
transform = input(/* @ts-ignore */
|
|
231
|
+
...(ngDevMode ? [undefined, { debugName: "transform" }] : /* istanbul ignore next */ []));
|
|
139
232
|
// why: tri-state viewed — `'inline'` keeps it interactive; disabled `'inline'` falls back to static.
|
|
140
233
|
#viewedState = sdViewedInline(this.viewed, undefined, this.disabled);
|
|
141
234
|
/** `true` when the static view should render (`viewed===true`, or disabled `'inline'`). */
|
|
142
235
|
isViewed = this.#viewedState.isViewed;
|
|
143
236
|
hyperlink = input(undefined, { ...(ngDevMode ? { debugName: "hyperlink" } : /* istanbul ignore next */ {}), transform: (v) => v ?? undefined });
|
|
144
|
-
|
|
237
|
+
/**
|
|
238
|
+
* Two-way model. Read wide (each item `string | number | Date`, like `<sd-date>`), written back only on a user
|
|
239
|
+
* action, as `string[]`. A model from the parent is never rewritten.
|
|
240
|
+
*/
|
|
145
241
|
model = model(undefined, /* @ts-ignore */
|
|
146
242
|
...(ngDevMode ? [{ debugName: "model" }] : /* istanbul ignore next */ []));
|
|
147
243
|
// Outputs (modelChange auto-generated by model() signal)
|
|
@@ -158,14 +254,22 @@ class SdChipCalendar {
|
|
|
158
254
|
...(ngDevMode ? [{ debugName: "sdValueTemplate" }] : /* istanbul ignore next */ []));
|
|
159
255
|
isFocused = false;
|
|
160
256
|
#inputControl = new FormControl();
|
|
257
|
+
/** Holds the normalised days (`yyyy/MM/dd`, no duplicates, model order); the parent form gets this control
|
|
258
|
+
* unless a `transform` is set. */
|
|
161
259
|
#formControl = new SdFormControl();
|
|
162
260
|
// why: `min`/`max` là validator do CHÍNH component sở hữu; `required` đi qua option riêng của
|
|
163
261
|
// connector. Connector chỉ add/remove đúng phần này nên validator do consumer tự gắn vào
|
|
164
262
|
// `formControl` public không bị xoá — trước đây `clearValidators()` + `setValidators()` xoá sạch.
|
|
263
|
+
/** `minCount`, else the deprecated `min`. */
|
|
264
|
+
effectiveMinCount = computed(() => this.minCount() ?? this.min() ?? 0, /* @ts-ignore */
|
|
265
|
+
...(ngDevMode ? [{ debugName: "effectiveMinCount" }] : /* istanbul ignore next */ []));
|
|
266
|
+
/** `maxCount`, else the deprecated `max`. */
|
|
267
|
+
effectiveMaxCount = computed(() => this.maxCount() ?? this.max() ?? 0, /* @ts-ignore */
|
|
268
|
+
...(ngDevMode ? [{ debugName: "effectiveMaxCount" }] : /* istanbul ignore next */ []));
|
|
165
269
|
#validators = computed(() => {
|
|
166
270
|
const validators = [];
|
|
167
|
-
const min = this.
|
|
168
|
-
const max = this.
|
|
271
|
+
const min = this.effectiveMinCount();
|
|
272
|
+
const max = this.effectiveMaxCount();
|
|
169
273
|
if (min > 0)
|
|
170
274
|
validators.push(Validators.minLength(min));
|
|
171
275
|
if (max > 0)
|
|
@@ -173,32 +277,129 @@ class SdChipCalendar {
|
|
|
173
277
|
return validators;
|
|
174
278
|
}, /* @ts-ignore */
|
|
175
279
|
...(ngDevMode ? [{ debugName: "#validators" }] : /* istanbul ignore next */ []));
|
|
280
|
+
/**
|
|
281
|
+
* why: with a `transform` the model holds ISO / RFC-1123 strings while the control keeps `yyyy/MM/dd`. Like
|
|
282
|
+
* `<sd-date>`, the parent form then gets a control that carries the model, so `form.value` equals `modelChange`.
|
|
283
|
+
*/
|
|
284
|
+
#modelFacing = _sdModelFacingControl({
|
|
285
|
+
active: computed(() => !!this.transform()),
|
|
286
|
+
model: this.model,
|
|
287
|
+
writeModel: value => this.#writeModel(value),
|
|
288
|
+
source: computed(() => this.#formControl),
|
|
289
|
+
modelEquals: (left, right) => this.#modelsEqual(left, right),
|
|
290
|
+
});
|
|
176
291
|
#formConnector = _sdFormControlConnector({
|
|
177
292
|
form: this.form,
|
|
178
293
|
name: computed(() => this.name() || this.#name),
|
|
179
294
|
control: computed(() => this.#formControl),
|
|
295
|
+
registeredControl: this.#modelFacing.registered,
|
|
296
|
+
model: this.model,
|
|
297
|
+
writeModel: value => this.#writeModel(value),
|
|
298
|
+
modelToControl: value => this.#days(value),
|
|
299
|
+
controlToModel: days => this.#serializeDays(days),
|
|
300
|
+
modelEquals: (left, right) => this.#modelsEqual(left, right),
|
|
301
|
+
controlEquals: sameDays,
|
|
180
302
|
validators: this.#validators,
|
|
181
303
|
required: this.required,
|
|
182
304
|
});
|
|
183
305
|
#matcher;
|
|
184
|
-
|
|
306
|
+
#fullDate = computed(() => new Intl.DateTimeFormat(this.#i18n.locale(), FULL_DATE), /* @ts-ignore */
|
|
307
|
+
...(ngDevMode ? [{ debugName: "#fullDate" }] : /* istanbul ignore next */ []));
|
|
308
|
+
/** Chosen days, normalised (`yyyy/MM/dd`, model order). */
|
|
309
|
+
days = computed(() => this.#days(this.model()) ?? [], /* @ts-ignore */
|
|
310
|
+
...(ngDevMode ? [{ debugName: "days" }] : /* istanbul ignore next */ []));
|
|
311
|
+
/** `maxCount` reached: unchosen days are disabled and the popup says so (4.3). */
|
|
312
|
+
full = computed(() => {
|
|
313
|
+
const max = this.effectiveMaxCount();
|
|
314
|
+
return max > 0 && this.days().length >= max;
|
|
315
|
+
}, /* @ts-ignore */
|
|
316
|
+
...(ngDevMode ? [{ debugName: "full" }] : /* istanbul ignore next */ []));
|
|
317
|
+
/** At least one chosen day may be removed (enables “Xoá hết”). */
|
|
318
|
+
hasRemovable = computed(() => {
|
|
319
|
+
void this.removable();
|
|
320
|
+
return this.days().some(day => this.isRemovable(day));
|
|
321
|
+
}, /* @ts-ignore */
|
|
322
|
+
...(ngDevMode ? [{ debugName: "hasRemovable" }] : /* istanbul ignore next */ []));
|
|
323
|
+
/** Chosen days by date (B2). Display only: the model keeps its order. `yyyy/MM/dd` sorts as text in date order. */
|
|
324
|
+
sortedDays = computed(() => [...this.days()].sort(), /* @ts-ignore */
|
|
325
|
+
...(ngDevMode ? [{ debugName: "sortedDays" }] : /* istanbul ignore next */ []));
|
|
326
|
+
/** Chips on screen: all while the popup is open, else at most `maxVisible` (B3). */
|
|
327
|
+
visibleDays = computed(() => {
|
|
328
|
+
const days = this.sortedDays();
|
|
329
|
+
const max = this.maxVisible();
|
|
330
|
+
if (this.isOpen() || max === null || max === undefined || max < 0 || days.length <= max)
|
|
331
|
+
return days;
|
|
332
|
+
return days.slice(0, max);
|
|
333
|
+
}, /* @ts-ignore */
|
|
334
|
+
...(ngDevMode ? [{ debugName: "visibleDays" }] : /* istanbul ignore next */ []));
|
|
335
|
+
/** Icon sizes of the chips and suffix buttons for the current size. */
|
|
336
|
+
iconSizes = computed(() => FIELD_ICONS[this.size() === 'sm' || this.size() === 'lg' ? this.size() : 'md'], /* @ts-ignore */
|
|
337
|
+
...(ngDevMode ? [{ debugName: "iconSizes" }] : /* istanbul ignore next */ []));
|
|
338
|
+
/** Days folded into “+N”. */
|
|
339
|
+
hiddenCount = computed(() => this.sortedDays().length - this.visibleDays().length, /* @ts-ignore */
|
|
340
|
+
...(ngDevMode ? [{ debugName: "hiddenCount" }] : /* istanbul ignore next */ []));
|
|
341
|
+
/** Viewed text: days by date in `displayFormat`, joined by “, ” (C3). */
|
|
342
|
+
viewText = computed(() => this.sortedDays()
|
|
343
|
+
.map(day => this.formatDay(day))
|
|
344
|
+
.join(', '), /* @ts-ignore */
|
|
345
|
+
...(ngDevMode ? [{ debugName: "viewText" }] : /* istanbul ignore next */ []));
|
|
346
|
+
/** Placeholder while no day is chosen: the input, else “Chọn ngày” — no longer the label (B1). Empty once there are chips. */
|
|
347
|
+
effectivePlaceholder = computed(() => this.days().length ? '' : this.placeholder() || this.#i18n.t('core.form.chip-calendar.placeholder'), /* @ts-ignore */
|
|
348
|
+
...(ngDevMode ? [{ debugName: "effectivePlaceholder" }] : /* istanbul ignore next */ []));
|
|
349
|
+
resolvedMinDate = computed(() => this.#toDate(this.minDate()), /* @ts-ignore */
|
|
350
|
+
...(ngDevMode ? [{ debugName: "resolvedMinDate" }] : /* istanbul ignore next */ []));
|
|
351
|
+
resolvedMaxDate = computed(() => this.#toDate(this.maxDate()), /* @ts-ignore */
|
|
352
|
+
...(ngDevMode ? [{ debugName: "resolvedMaxDate" }] : /* istanbul ignore next */ []));
|
|
353
|
+
/**
|
|
354
|
+
* `dateFilter` handed to `mat-calendar` (4.1): a chosen day is pickable exactly when it may be removed (even against the
|
|
355
|
+
* consumer filter), an unchosen one when the limit is not reached and the consumer filter allows it. A new function on
|
|
356
|
+
* every change makes `mat-calendar` render its cells again.
|
|
357
|
+
*/
|
|
358
|
+
calendarFilter = computed(() => {
|
|
359
|
+
const chosen = new Set(this.days());
|
|
360
|
+
const full = this.full();
|
|
361
|
+
const consumer = this.dateFilter();
|
|
362
|
+
void this.removable();
|
|
363
|
+
return (date) => {
|
|
364
|
+
if (!date)
|
|
365
|
+
return false;
|
|
366
|
+
const day = DateUtilities.toFormat(date, 'yyyy/MM/dd');
|
|
367
|
+
if (chosen.has(day))
|
|
368
|
+
return this.isRemovable(day);
|
|
369
|
+
return !full && (!consumer || consumer(date));
|
|
370
|
+
};
|
|
371
|
+
}, /* @ts-ignore */
|
|
372
|
+
...(ngDevMode ? [{ debugName: "calendarFilter" }] : /* istanbul ignore next */ []));
|
|
373
|
+
/** Cell classes: `sd-chip-calendar-selected`, plus `sd-chip-calendar-locked` for a chosen day that cannot go. */
|
|
374
|
+
calendarDateClass = computed(() => {
|
|
375
|
+
const chosen = new Set(this.days());
|
|
376
|
+
void this.removable();
|
|
377
|
+
return (date, view = 'month') => {
|
|
378
|
+
if (view !== 'month')
|
|
379
|
+
return '';
|
|
380
|
+
const day = DateUtilities.toFormat(date, 'yyyy/MM/dd');
|
|
381
|
+
if (!chosen.has(day))
|
|
382
|
+
return '';
|
|
383
|
+
return this.isRemovable(day) ? 'sd-chip-calendar-selected' : 'sd-chip-calendar-selected sd-chip-calendar-locked';
|
|
384
|
+
};
|
|
385
|
+
}, /* @ts-ignore */
|
|
386
|
+
...(ngDevMode ? [{ debugName: "calendarDateClass" }] : /* istanbul ignore next */ []));
|
|
185
387
|
constructor() {
|
|
186
|
-
effect(() => {
|
|
187
|
-
const values = this.model();
|
|
188
|
-
if (Array.isArray(values)) {
|
|
189
|
-
this.#formControl.setValue(values);
|
|
190
|
-
}
|
|
191
|
-
});
|
|
192
388
|
effect(() => {
|
|
193
389
|
const isDisabled = this.disabled();
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
390
|
+
// why: `enable()` / `disable()` phát `valueChanges`; connector sẽ coi đó là thao tác và ghi model (đã
|
|
391
|
+
// transform) ngược lên cha. Chỉ đổi khi trạng thái thật sự khác, và không phát event.
|
|
392
|
+
if (isDisabled !== this.#formControl.disabled) {
|
|
393
|
+
if (isDisabled)
|
|
394
|
+
this.#formControl.disable({ emitEvent: false });
|
|
395
|
+
else
|
|
396
|
+
this.#formControl.enable({ emitEvent: false });
|
|
397
|
+
this.#ref.markForCheck();
|
|
197
398
|
}
|
|
198
|
-
|
|
199
|
-
this.#
|
|
399
|
+
if (isDisabled)
|
|
400
|
+
this.#inputControl.disable();
|
|
401
|
+
else
|
|
200
402
|
this.#inputControl.enable();
|
|
201
|
-
}
|
|
202
403
|
});
|
|
203
404
|
effect(() => {
|
|
204
405
|
const nameVal = this.name();
|
|
@@ -206,7 +407,15 @@ class SdChipCalendar {
|
|
|
206
407
|
this.#name = nameVal;
|
|
207
408
|
}
|
|
208
409
|
});
|
|
209
|
-
|
|
410
|
+
effect(() => {
|
|
411
|
+
if ((this.min() > 0 || this.max() > 0) && !this.#warnedDeprecated && isDevMode()) {
|
|
412
|
+
this.#warnedDeprecated = true;
|
|
413
|
+
console.warn('[sd-chip-calendar] `min` / `max` are deprecated; use `minCount` / `maxCount`.');
|
|
414
|
+
}
|
|
415
|
+
});
|
|
416
|
+
// why: `submitted` của form cha không phải signal; submit phải vẽ lại lỗi dưới OnPush.
|
|
417
|
+
this.#parentForm?.ngSubmit.pipe(takeUntilDestroyed(inject(DestroyRef))).subscribe(() => this.#ref.markForCheck());
|
|
418
|
+
this.#matcher = { isErrorState: (_control, form) => this.#errorGate(form) };
|
|
210
419
|
}
|
|
211
420
|
get formControl() {
|
|
212
421
|
return this.#formControl;
|
|
@@ -223,8 +432,8 @@ class SdChipCalendar {
|
|
|
223
432
|
errorMessage = computed(() => {
|
|
224
433
|
void this.#state();
|
|
225
434
|
void this.required();
|
|
226
|
-
const min = this.
|
|
227
|
-
const max = this.
|
|
435
|
+
const min = this.effectiveMinCount();
|
|
436
|
+
const max = this.effectiveMaxCount();
|
|
228
437
|
const errors = this.#formControl.errors;
|
|
229
438
|
if (!errors)
|
|
230
439
|
return undefined;
|
|
@@ -240,6 +449,97 @@ class SdChipCalendar {
|
|
|
240
449
|
get matcher() {
|
|
241
450
|
return this.#matcher;
|
|
242
451
|
}
|
|
452
|
+
/**
|
|
453
|
+
* The one place that decides whether the error shows (A4): `ErrorStateMatcher`, `<mat-error>`, `aria-invalid` and
|
|
454
|
+
* the `hideInlineError` icon all read it. Invalid and touched, or the parent form was submitted; a selection that
|
|
455
|
+
* is still too short while the user picks (dirty only) shows nothing.
|
|
456
|
+
*/
|
|
457
|
+
isErrorShown() {
|
|
458
|
+
return !!this.errorMessage() && this.#errorGate();
|
|
459
|
+
}
|
|
460
|
+
#errorGate(form) {
|
|
461
|
+
const control = this.#formControl;
|
|
462
|
+
return control.invalid && (control.touched || !!(form ?? this.#parentForm)?.submitted);
|
|
463
|
+
}
|
|
464
|
+
/** Whether `day` (`yyyy/MM/dd`) may be removed, per `removable`. */
|
|
465
|
+
isRemovable(day) {
|
|
466
|
+
const removable = this.removable();
|
|
467
|
+
return typeof removable === 'function' ? !!removable(day) : removable;
|
|
468
|
+
}
|
|
469
|
+
/** Accessible name of a chip: the full date in the current locale, plus the locked note. */
|
|
470
|
+
chipLabel(day) {
|
|
471
|
+
const full = this.#fullDate().format(dayToDate(day));
|
|
472
|
+
return this.isRemovable(day) ? full : `${full}, ${this.#i18n.t('core.form.chip-calendar.locked')}`;
|
|
473
|
+
}
|
|
474
|
+
/** A chip day in `displayFormat` (Angular `DatePipe` / `formatDate` syntax, as the chips used before). */
|
|
475
|
+
formatDay(day) {
|
|
476
|
+
return formatDate(dayToDate(day), this.displayFormat(), this.#locale);
|
|
477
|
+
}
|
|
478
|
+
/** Accessible name of the ✕ button of a chip. */
|
|
479
|
+
removeLabel(day) {
|
|
480
|
+
return this.#i18n.t('core.form.chip-calendar.remove', { date: this.#fullDate().format(dayToDate(day)) });
|
|
481
|
+
}
|
|
482
|
+
/** Opens the popup at the month of 4.2. No-op when disabled, viewed or already open. */
|
|
483
|
+
open() {
|
|
484
|
+
if (this.#formControl.disabled || this.isViewed() || this.isOpen())
|
|
485
|
+
return;
|
|
486
|
+
this.openAt.set(this.#firstMonth());
|
|
487
|
+
this.overlayOrigin.set(this.field()?.getConnectedOverlayOrigin());
|
|
488
|
+
this.isOpen.set(true);
|
|
489
|
+
this.#ref.markForCheck();
|
|
490
|
+
}
|
|
491
|
+
/** Closes the popup and marks the field touched (A4); `returnFocus` puts focus back on the input (Esc, “Xong”). */
|
|
492
|
+
close(returnFocus = false) {
|
|
493
|
+
if (!this.isOpen())
|
|
494
|
+
return;
|
|
495
|
+
this.isOpen.set(false);
|
|
496
|
+
this.isFocused = false;
|
|
497
|
+
this.#formConnector.markAsTouched();
|
|
498
|
+
this.#ref.markForCheck();
|
|
499
|
+
if (returnFocus)
|
|
500
|
+
this.input()?.nativeElement.focus();
|
|
501
|
+
}
|
|
502
|
+
/** Focus goes to the active day of the grid once the panel is attached. */
|
|
503
|
+
onAttach() {
|
|
504
|
+
this.#timers.schedule(() => this.calendar()?.focusActiveCell(), 0);
|
|
505
|
+
}
|
|
506
|
+
onOverlayKeydown(event) {
|
|
507
|
+
if (event.key === 'Escape' || event.key === 'Esc') {
|
|
508
|
+
event.preventDefault();
|
|
509
|
+
this.close(true);
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
/** A click outside closes; a click on the field itself is left to the field (it keeps the popup open). */
|
|
513
|
+
onOutsideClick(event) {
|
|
514
|
+
const target = event.target;
|
|
515
|
+
if (target && this.#host.contains(target))
|
|
516
|
+
return;
|
|
517
|
+
this.close();
|
|
518
|
+
}
|
|
519
|
+
/** Click on the empty part of the field or on the input opens the popup; chips stop the click (3 · 2). */
|
|
520
|
+
onFieldClick() {
|
|
521
|
+
this.open();
|
|
522
|
+
}
|
|
523
|
+
/** Calendar button of the suffix: opens or closes the popup without the field click opening it again. */
|
|
524
|
+
onToggleClick(event) {
|
|
525
|
+
event.stopPropagation();
|
|
526
|
+
if (this.isOpen())
|
|
527
|
+
this.close();
|
|
528
|
+
else
|
|
529
|
+
this.open();
|
|
530
|
+
}
|
|
531
|
+
/** “+N” opens the popup, where every chip shows. */
|
|
532
|
+
onMoreClick(event) {
|
|
533
|
+
event.stopPropagation();
|
|
534
|
+
this.open();
|
|
535
|
+
}
|
|
536
|
+
/** Enter, Space, ArrowDown and Alt+ArrowDown on the input open the popup. */
|
|
537
|
+
onInputKeydown(event) {
|
|
538
|
+
if (event.key === 'Enter' || event.key === ' ' || event.key === 'ArrowDown') {
|
|
539
|
+
event.preventDefault();
|
|
540
|
+
this.open();
|
|
541
|
+
}
|
|
542
|
+
}
|
|
243
543
|
ngAfterViewInit() {
|
|
244
544
|
this.#subscription.add(this.#formControl.sdChanges.subscribe(() => {
|
|
245
545
|
this.#ref.markForCheck();
|
|
@@ -248,6 +548,92 @@ class SdChipCalendar {
|
|
|
248
548
|
ngOnDestroy() {
|
|
249
549
|
this.#subscription.unsubscribe();
|
|
250
550
|
}
|
|
551
|
+
/** Normalised days of a model: one `yyyy/MM/dd` per calendar day, model order, unreadable items skipped. */
|
|
552
|
+
#days(value) {
|
|
553
|
+
if (!Array.isArray(value))
|
|
554
|
+
return null;
|
|
555
|
+
const zone = this.#zoned ? this.#dateTime : null;
|
|
556
|
+
const days = [];
|
|
557
|
+
let unreadable = false;
|
|
558
|
+
for (const item of value) {
|
|
559
|
+
const day = _sdNormalizeCalendarDay(item, zone);
|
|
560
|
+
if (!day) {
|
|
561
|
+
unreadable = true;
|
|
562
|
+
continue;
|
|
563
|
+
}
|
|
564
|
+
if (!days.includes(day))
|
|
565
|
+
days.push(day);
|
|
566
|
+
}
|
|
567
|
+
if (unreadable && !this.#warnedUnreadable && isDevMode()) {
|
|
568
|
+
this.#warnedUnreadable = true;
|
|
569
|
+
console.warn('[sd-chip-calendar] Skipped model items that are not dates:', value);
|
|
570
|
+
}
|
|
571
|
+
return days;
|
|
572
|
+
}
|
|
573
|
+
/** Days → the model written back: `yyyy/MM/dd`, or the start of each day per `transform` (like `<sd-date>`). */
|
|
574
|
+
#serializeDays(days) {
|
|
575
|
+
if (!days)
|
|
576
|
+
return days;
|
|
577
|
+
const transform = this.transform();
|
|
578
|
+
if (!transform)
|
|
579
|
+
return [...days];
|
|
580
|
+
return days.map(day => {
|
|
581
|
+
const startOfDay = sdLocalStartOfDay(dayToDate(day));
|
|
582
|
+
return sdSerializeTemporalValue(this.#zoned ? this.#dateTime.fromWallClock(startOfDay) : startOfDay, transform) ?? day;
|
|
583
|
+
});
|
|
584
|
+
}
|
|
585
|
+
/**
|
|
586
|
+
* why: không có transform thì so theo ngày, để `[Date]` từ cha và `['yyyy/MM/dd']` của chính ta là một (không ghi
|
|
587
|
+
* ngược model của cha). Có transform thì so nguyên văn, như sd-date: đổi transform rồi thao tác phải ra chuỗi mới.
|
|
588
|
+
*/
|
|
589
|
+
#modelsEqual(left, right) {
|
|
590
|
+
if (this.transform())
|
|
591
|
+
return sameDays(left, right);
|
|
592
|
+
return sameDays(this.#days(left), this.#days(right));
|
|
593
|
+
}
|
|
594
|
+
#writeModel(value) {
|
|
595
|
+
this.model.set(value);
|
|
596
|
+
this.sdChange.emit(value ? value : []);
|
|
597
|
+
}
|
|
598
|
+
#currentDays() {
|
|
599
|
+
const value = this.#formControl.value;
|
|
600
|
+
return Array.isArray(value) ? value : [];
|
|
601
|
+
}
|
|
602
|
+
/** Today as a local-midnight carrier: in the configured zone, else the machine's. */
|
|
603
|
+
#today() {
|
|
604
|
+
return this.#zoned ? this.#dateTime.today() : sdLocalStartOfDay(new Date());
|
|
605
|
+
}
|
|
606
|
+
/** `minDate` / `maxDate` / `startAt` → local-midnight carrier, read like a model item. */
|
|
607
|
+
#toDate(value) {
|
|
608
|
+
if (value === 'TODAY')
|
|
609
|
+
return this.#today();
|
|
610
|
+
const day = _sdNormalizeCalendarDay(value, this.#zoned ? this.#dateTime : null);
|
|
611
|
+
return day ? dayToDate(day) : null;
|
|
612
|
+
}
|
|
613
|
+
/** 4.2: `startAt`; else the chosen day nearest to today (a later one on a tie); else today. */
|
|
614
|
+
#firstMonth() {
|
|
615
|
+
const start = this.#toDate(this.startAt());
|
|
616
|
+
if (start)
|
|
617
|
+
return start;
|
|
618
|
+
const today = this.#today().getTime();
|
|
619
|
+
let best = null;
|
|
620
|
+
for (const day of this.days()) {
|
|
621
|
+
const date = dayToDate(day);
|
|
622
|
+
const distance = Math.abs(date.getTime() - today);
|
|
623
|
+
const bestDistance = best ? Math.abs(best.getTime() - today) : Infinity;
|
|
624
|
+
if (distance < bestDistance || (distance === bestDistance && best !== null && date > best))
|
|
625
|
+
best = date;
|
|
626
|
+
}
|
|
627
|
+
return best ?? this.#today();
|
|
628
|
+
}
|
|
629
|
+
/** Every user action ends here: a new array of days, written once (the connector writes the model). */
|
|
630
|
+
#commit(next) {
|
|
631
|
+
// why: người dùng sửa thì control của form phải dirty trước khi nhận giá trị, như value accessor của Angular;
|
|
632
|
+
// chọn ngày trên lịch và xoá chip không đi qua value accessor.
|
|
633
|
+
this.#formControl.markAsDirty();
|
|
634
|
+
this.#formControl.setValue(next);
|
|
635
|
+
this.#ref.markForCheck();
|
|
636
|
+
}
|
|
251
637
|
#clickChip = (event, item) => {
|
|
252
638
|
event.stopPropagation();
|
|
253
639
|
event.stopImmediatePropagation();
|
|
@@ -255,41 +641,16 @@ class SdChipCalendar {
|
|
|
255
641
|
this.#focus();
|
|
256
642
|
}
|
|
257
643
|
};
|
|
258
|
-
#remove = (
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
// why: `filter` đã trả mảng mới nên reference đổi →
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
this.model.set(next);
|
|
265
|
-
this.sdChange.emit(next);
|
|
644
|
+
#remove = (day) => {
|
|
645
|
+
if (typeof day === 'string' && this.isRemovable(day)) {
|
|
646
|
+
const days = this.#currentDays();
|
|
647
|
+
// why: `filter` đã trả mảng mới nên reference đổi → model ghi một lần.
|
|
648
|
+
if (days.includes(day))
|
|
649
|
+
this.#commit(days.filter(value => value !== day));
|
|
266
650
|
}
|
|
267
651
|
this.#inputControl.setValue('');
|
|
268
652
|
this.#focus();
|
|
269
653
|
};
|
|
270
|
-
#select = (event) => {
|
|
271
|
-
const item = event.option.value;
|
|
272
|
-
const values = this.#formControl.value ?? [];
|
|
273
|
-
if (item) {
|
|
274
|
-
if (typeof item === 'string' || typeof item === 'number') {
|
|
275
|
-
if (!values.includes(item)) {
|
|
276
|
-
// why: PHẢI tạo mảng MỚI. `values` là chính mảng của consumer (model đi thẳng vào
|
|
277
|
-
// formControl), nên `push` vừa sửa trộm mảng của họ, vừa giữ nguyên reference —
|
|
278
|
-
// `model()` dùng equality Object.is nên `model.set(sameRef)` KHÔNG phát `modelChange`.
|
|
279
|
-
const next = [...values, item];
|
|
280
|
-
this.#formControl.setValue(next);
|
|
281
|
-
this.model.set(next);
|
|
282
|
-
this.sdChange.emit(next);
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
const inputEl = this.input();
|
|
286
|
-
if (inputEl)
|
|
287
|
-
inputEl.nativeElement.value = '';
|
|
288
|
-
this.#inputControl.setValue('', {
|
|
289
|
-
emitEvent: false,
|
|
290
|
-
});
|
|
291
|
-
}
|
|
292
|
-
};
|
|
293
654
|
#onClick = () => {
|
|
294
655
|
if (this.sdViewDef()?.templateRef) {
|
|
295
656
|
if (!this.#formControl.disabled && !this.isFocused) {
|
|
@@ -299,7 +660,6 @@ class SdChipCalendar {
|
|
|
299
660
|
};
|
|
300
661
|
#focus = () => {
|
|
301
662
|
this.isFocused = true;
|
|
302
|
-
this.#isBlurring = false;
|
|
303
663
|
// why: vẫn 100ms như cũ — chỉ scope handle theo DestroyRef.
|
|
304
664
|
this.#timers.schedule(() => {
|
|
305
665
|
if (this.isFocused) {
|
|
@@ -307,44 +667,39 @@ class SdChipCalendar {
|
|
|
307
667
|
}
|
|
308
668
|
}, 100);
|
|
309
669
|
};
|
|
670
|
+
/** Removes every day the predicate allows; kept days stay. One change, none when nothing goes. */
|
|
310
671
|
#clear = (evt) => {
|
|
311
672
|
evt?.stopPropagation();
|
|
312
673
|
this.#inputControl.setValue('');
|
|
313
|
-
this.#
|
|
314
|
-
|
|
315
|
-
|
|
674
|
+
const days = this.#currentDays();
|
|
675
|
+
const kept = days.filter(day => !this.isRemovable(day));
|
|
676
|
+
if (kept.length !== days.length)
|
|
677
|
+
this.#commit(kept);
|
|
316
678
|
this.#ref.detectChanges();
|
|
317
679
|
};
|
|
318
680
|
#selectDate = (date) => {
|
|
319
|
-
|
|
320
|
-
const
|
|
321
|
-
if (
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
this
|
|
327
|
-
|
|
328
|
-
this.sdChange.emit(next);
|
|
329
|
-
this.calendar()?.updateTodaysDate();
|
|
330
|
-
this.#ref.markForCheck();
|
|
681
|
+
// why: ô lịch là ngày lịch (nửa đêm local của native adapter), không phải instant → chỉ đọc chữ số.
|
|
682
|
+
const day = DateUtilities.toFormat(date, 'yyyy/MM/dd');
|
|
683
|
+
if (!day)
|
|
684
|
+
return;
|
|
685
|
+
const days = this.#currentDays();
|
|
686
|
+
if (days.includes(day)) {
|
|
687
|
+
// A1: bấm lại ngày đã chọn chỉ bỏ khi predicate cho phép.
|
|
688
|
+
if (this.isRemovable(day))
|
|
689
|
+
this.#commit(days.filter(value => value !== day));
|
|
331
690
|
}
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
const selected = dates.some(date => date === DateUtilities.toFormat(cellDate, 'yyyy/MM/dd'));
|
|
341
|
-
return selected ? 'sd-chip-calendar-selected-date' : '';
|
|
691
|
+
else {
|
|
692
|
+
this.#commit([...days, day]);
|
|
693
|
+
}
|
|
694
|
+
// why: dateFilter mới làm mat-calendar dựng lại ô; giữ ô vừa bấm là ô active và trả focus về nó cho bàn phím.
|
|
695
|
+
const calendar = this.calendar();
|
|
696
|
+
if (calendar && date) {
|
|
697
|
+
calendar.activeDate = date;
|
|
698
|
+
this.#timers.schedule(() => this.calendar()?.focusActiveCell(), 0);
|
|
342
699
|
}
|
|
343
|
-
return '';
|
|
344
700
|
};
|
|
345
701
|
onClickChip = (event, item) => this.#clickChip(event, item);
|
|
346
702
|
onRemove = (item) => this.#remove(item);
|
|
347
|
-
onSelect = (event) => this.#select(event);
|
|
348
703
|
onClick = () => this.#onClick();
|
|
349
704
|
/**
|
|
350
705
|
* why: khi `sdViewDef` đang hiển thị thì bên trong KHÔNG còn phần tử nào focus được, nên
|
|
@@ -358,10 +713,12 @@ class SdChipCalendar {
|
|
|
358
713
|
};
|
|
359
714
|
onClear = (evt) => this.#clear(evt);
|
|
360
715
|
onSelectDate = (date) => this.#selectDate(date);
|
|
361
|
-
|
|
362
|
-
|
|
716
|
+
/** Closes the popup without moving focus (outside click); marks the field touched. */
|
|
717
|
+
onCloseCalendar = () => this.close();
|
|
718
|
+
/** Classes of a month-view cell; see `calendarDateClass`. */
|
|
719
|
+
dateClass = (cellDate) => this.calendarDateClass()(cellDate);
|
|
363
720
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: SdChipCalendar, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
364
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: SdChipCalendar, isStandalone: true, selector: "sd-chip-calendar", inputs: { autoIdInput: { classPropertyName: "autoIdInput", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, labelPlacement: { classPropertyName: "labelPlacement", publicName: "labelPlacement", isSignal: true, isRequired: false, transformFunction: null }, floatLabel: { classPropertyName: "floatLabel", publicName: "floatLabel", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, removable: { classPropertyName: "removable", publicName: "removable", isSignal: true, isRequired: false, transformFunction: null }, hideInlineError: { classPropertyName: "hideInlineError", publicName: "hideInlineError", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, viewed: { classPropertyName: "viewed", publicName: "viewed", isSignal: true, isRequired: false, transformFunction: null }, hyperlink: { classPropertyName: "hyperlink", publicName: "hyperlink", isSignal: true, isRequired: false, transformFunction: null }, model: { classPropertyName: "model", publicName: "model", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { model: "modelChange", sdChange: "sdChange" }, host: { properties: { "class.sd-has-label": "!!label()", "class.sd-viewed": "isViewed()", "class.sd-label-top": "labelPlacement() === 'top'" } }, queries: [{ propertyName: "sdViewDef", first: true, predicate: SdViewDefDirective, descendants: true, isSignal: true }, { propertyName: "sdLabelDef", first: true, predicate: SdLabelDefDirective, descendants: true, isSignal: true }, { propertyName: "sdLabelTemplate", first: true, predicate: ["sdLabel"], descendants: true, isSignal: true }, { propertyName: "sdValueTemplate", first: true, predicate: ["sdValue"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "menuTrigger", first: true, predicate: MatMenuTrigger, descendants: true, isSignal: true }, { propertyName: "calendar", first: true, predicate: MatCalendar, descendants: true, isSignal: true }, { propertyName: "input", first: true, predicate: ["input"], descendants: true, isSignal: true }], ngImport: i0, template: "@let _label = label();\n@let _appearance = appearance();\n@let _required = required();\n@let _isViewed = isViewed();\n@let _hideInlineError = hideInlineError();\n@let _sdViewDef = sdViewDef();\n@let _labelTemplate = (sdLabelTemplate() ?? sdLabelDef()?.templateRef) || undefined;\n@let _valueTemplate = (sdValueTemplate() ?? _sdViewDef?.templateRef) || undefined;\n@let _errorMessage = errorMessage();\n@let _size = size();\n@let _removable = removable();\n@let _labelTop = labelPlacement() === 'top';\n<!-- why: m\u1ED9t c\u1ED5ng gate duy nh\u1EA5t cho <mat-error>, aria-invalid v\u00E0 aria-describedby. -->\n@let _errorVisible = !!_errorMessage && formControl.touched;\n@let _showInlineError = !_hideInlineError && _errorVisible;\n@let _viewTemplate = _sdViewDef?.templateRef;\n\n@if (_isViewed) {\n <sd-view\n [label]=\"_label\"\n [labelTemplate]=\"_labelTemplate\"\n [value]=\"formControl.value\"\n [display]=\"formControl.value\"\n [hyperlink]=\"hyperlink()\"\n [valueTemplate]=\"_valueTemplate\">\n </sd-view>\n} @else {\n @if ((!_appearance || _labelTop) && _labelTemplate) {\n <ng-container *ngTemplateOutlet=\"_labelTemplate\"></ng-container>\n }\n @if ((!_appearance || _labelTop) && _label && !_labelTemplate) {\n <sd-label [label]=\"_label\" [required]=\"_required\" [for]=\"_labelTop ? inputId : null\"></sd-label>\n }\n\n <!-- why: div ch\u1EC9 l\u00E0 h\u1ED9p layout \u2014 aria-hidden=\"true\" c\u0169 \u1EA9n C\u1EA2 c\u00E2y con (chip, \u00F4 nh\u1EADp, <mat-error>)\n kh\u1ECFi accessibility tree. \u1EDE \u0111\u00E2y (click) KH\u00D4NG ph\u1EA3i ti\u1EC7n \u00EDch chu\u1ED9t th\u1EEBa nh\u01B0 c\u00E1c control kh\u00E1c:\n khi sdViewDef \u0111ang hi\u1EC3n th\u1ECB th\u00EC kh\u00F4ng c\u00F3 ph\u1EA7n t\u1EED focus \u0111\u01B0\u1EE3c n\u00E0o b\u00EAn trong, n\u00EAn click l\u00E0 l\u1ED1i\n v\u00E0o DUY NH\u1EA4T. V\u00EC v\u1EADy handler \u0111\u01B0\u1EE3c chuy\u1EC3n h\u1EB3n xu\u1ED1ng ph\u1EA7n t\u1EED view v\u00E0 ph\u1EA7n t\u1EED \u0111\u00F3 nh\u1EADn\n role=\"button\" + tabindex=\"0\" + keydown Enter/Space; div ngo\u00E0i kh\u00F4ng c\u00F2n handler n\u00E0o. -->\n <div\n class=\"d-flex align-items-center\"\n [class.sd-view]=\"!!_viewTemplate\"\n [class.c-focused]=\"isFocused\"\n [class.c-disabled]=\"formControl.disabled\">\n @if (_viewTemplate && !isFocused) {\n <!-- why: KH\u00D4NG \u0111\u1EB7t aria-label \u2014 n\u1ED9i dung sdViewDef ch\u00EDnh l\u00E0 nh\u00E3n nh\u00ECn th\u1EA5y \u0111\u01B0\u1EE3c, aria-label\n s\u1EBD ghi \u0111\u00E8 v\u00E0 l\u00E0m AT \u0111\u1ECDc kh\u00E1c ch\u1EEF tr\u00EAn m\u00E0n h\u00ECnh. -->\n <div\n class=\"sd-chip-calendar__view-trigger\"\n role=\"button\"\n tabindex=\"0\"\n (click)=\"onClick()\"\n (keydown.enter)=\"onViewKeydown($event)\"\n (keydown.space)=\"onViewKeydown($event)\">\n <ng-container *ngTemplateOutlet=\"_viewTemplate; context: { value: formControl.value }\"></ng-container>\n </div>\n } @else {\n <mat-form-field\n [class.sd-md]=\"_size === 'md'\"\n [class.sd-sm]=\"_size === 'sm'\"\n [class.hide-inline-error]=\"_hideInlineError\"\n [class.sd-label-top]=\"_labelTop\"\n [appearance]=\"_appearance\"\n [floatLabel]=\"floatLabel()\">\n @if (_appearance && _label && !_labelTop) {\n <mat-label>{{ _label }}</mat-label>\n }\n <mat-chip-grid [formControl]=\"formControl\" #chipList [class.sd-md]=\"_size === 'md'\" [class.sd-sm]=\"_size === 'sm'\">\n @for (item of formControl.value; track item) {\n @if (item) {\n <mat-chip-row\n [class.sd-md]=\"_size === 'md'\"\n [class.sd-sm]=\"_size === 'sm'\"\n [removable]=\"_removable\"\n (removed)=\"onRemove(item)\"\n [disabled]=\"inputControl.disabled\"\n (click)=\"onClickChip($event, item)\"\n [value]=\"item\">\n <span>{{ item | date: 'dd/MM/yyyy' }}</span>\n @if (!inputControl.disabled && item | sdRemovableChip: _removable) {\n <sd-icon matChipRemove name=\"cancel\"></sd-icon>\n }\n </mat-chip-row>\n }\n }\n\n <input\n class=\"sd-chip-input\"\n [formControl]=\"inputControl\"\n [id]=\"inputId\"\n [placeholder]=\"placeholder() || (_labelTop ? '' : _label)\"\n [matChipInputFor]=\"chipList\"\n autocomplete=\"off\"\n [errorStateMatcher]=\"matcher\"\n [matMenuTriggerFor]=\"calendarMenu\"\n [required]=\"_required\"\n matInput\n [attr.data-autoId]=\"autoId()\"\n [attr.data-disabled]=\"dataDisabled()\"\n [attr.data-empty]=\"dataEmpty()\"\n [attr.data-value]=\"dataValue()\"\n [attr.data-count]=\"dataCount()\"\n [attr.data-required]=\"dataRequired()\"\n [attr.data-error-message]=\"dataErrorMessage()\"\n [attr.aria-invalid]=\"_errorVisible ? 'true' : null\"\n [attr.aria-describedby]=\"_errorMessage ? errorId : null\"\n readonly\n #input />\n </mat-chip-grid>\n\n <mat-menu #calendarMenu=\"matMenu\" overlapTrigger=\"false\" (closed)=\"onCloseCalendar()\">\n <!-- why: aria-hidden=\"true\" \u1EDF \u0111\u00E2y t\u1EEBng \u1EA9n NGUY\u00CAN <mat-calendar> \u2014 t\u1EE9c to\u00E0n b\u1ED9 l\u01B0\u1EDBi ng\u00E0y,\n n\u00FAt chuy\u1EC3n th\u00E1ng v\u00E0 \u00F4 ng\u00E0y \u0111ang ch\u1ECDn \u2014 kh\u1ECFi accessibility tree, d\u00F9 l\u1ECBch v\u1EABn nh\u1EADn\n focus v\u00E0 \u0111i\u1EC1u h\u01B0\u1EDBng b\u1EB1ng ph\u00EDm m\u0169i t\u00EAn. role=\"presentation\" ch\u1EC9 v\u00F4 hi\u1EC7u ho\u00E1 c\u00E1i div\n b\u1ECDc (n\u00F3 ch\u1EC9 t\u1ED3n t\u1EA1i \u0111\u1EC3 ch\u1EB7n n\u1ED5i b\u1ECDt click l\u00E0m \u0111\u00F3ng menu), KH\u00D4NG lan xu\u1ED1ng l\u1ECBch. -->\n <div style=\"width: 280px\" role=\"presentation\" (click)=\"$event.stopPropagation()\">\n <mat-calendar (selectedChange)=\"onSelectDate($event)\" [dateClass]=\"dateClass\"> </mat-calendar>\n </div>\n </mat-menu>\n @if (_hideInlineError && _errorVisible) {\n <sd-icon matSuffix class=\"sd-error-icon\" [matTooltip]=\"_errorMessage\" matTooltipPosition=\"above\" name=\"error\"></sd-icon>\n }\n @if (_hideInlineError && _errorVisible) {\n <span class=\"sd-visually-hidden\" [id]=\"errorId\" matSuffix>{{ _errorMessage }}</span>\n\n }\n\n @if (_showInlineError) {\n <mat-error [id]=\"errorId\">{{ _errorMessage }}</mat-error>\n }\n </mat-form-field>\n }\n </div>\n}\n", styles: ["@charset \"UTF-8\";.text-primary{color:var(--sd-primary)!important}.bg-primary{background:var(--sd-primary)!important}.border-primary{border-color:var(--sd-primary)!important}.text-primary-light{color:var(--sd-primary-light)!important}.bg-primary-light{background:var(--sd-primary-light)!important}.border-primary-light{border-color:var(--sd-primary-light)!important}.text-primary-dark{color:var(--sd-primary-dark)!important}.bg-primary-dark{background:var(--sd-primary-dark)!important}.border-primary-dark{border-color:var(--sd-primary-dark)!important}.text-primary-contrast{color:var(--sd-primary-contrast)!important}.bg-primary-contrast{background:var(--sd-primary-contrast)!important}.border-primary-contrast{border-color:var(--sd-primary-contrast)!important}.text-secondary{color:var(--sd-secondary)!important}.bg-secondary{background:var(--sd-secondary)!important}.border-secondary{border-color:var(--sd-secondary)!important}.text-secondary-light{color:var(--sd-secondary-light)!important}.bg-secondary-light{background:var(--sd-secondary-light)!important}.border-secondary-light{border-color:var(--sd-secondary-light)!important}.text-secondary-dark{color:var(--sd-secondary-dark)!important}.bg-secondary-dark{background:var(--sd-secondary-dark)!important}.border-secondary-dark{border-color:var(--sd-secondary-dark)!important}.text-secondary-contrast{color:var(--sd-secondary-contrast)!important}.bg-secondary-contrast{background:var(--sd-secondary-contrast)!important}.border-secondary-contrast{border-color:var(--sd-secondary-contrast)!important}.text-info{color:var(--sd-info)!important}.bg-info{background:var(--sd-info)!important}.border-info{border-color:var(--sd-info)!important}.text-info-light{color:var(--sd-info-light)!important}.bg-info-light{background:var(--sd-info-light)!important}.border-info-light{border-color:var(--sd-info-light)!important}.text-info-dark{color:var(--sd-info-dark)!important}.bg-info-dark{background:var(--sd-info-dark)!important}.border-info-dark{border-color:var(--sd-info-dark)!important}.text-info-contrast{color:var(--sd-info-contrast)!important}.bg-info-contrast{background:var(--sd-info-contrast)!important}.border-info-contrast{border-color:var(--sd-info-contrast)!important}.text-success{color:var(--sd-success)!important}.bg-success{background:var(--sd-success)!important}.border-success{border-color:var(--sd-success)!important}.text-success-light{color:var(--sd-success-light)!important}.bg-success-light{background:var(--sd-success-light)!important}.border-success-light{border-color:var(--sd-success-light)!important}.text-success-dark{color:var(--sd-success-dark)!important}.bg-success-dark{background:var(--sd-success-dark)!important}.border-success-dark{border-color:var(--sd-success-dark)!important}.text-success-contrast{color:var(--sd-success-contrast)!important}.bg-success-contrast{background:var(--sd-success-contrast)!important}.border-success-contrast{border-color:var(--sd-success-contrast)!important}.text-warning{color:var(--sd-warning)!important}.bg-warning{background:var(--sd-warning)!important}.border-warning{border-color:var(--sd-warning)!important}.text-warning-light{color:var(--sd-warning-light)!important}.bg-warning-light{background:var(--sd-warning-light)!important}.border-warning-light{border-color:var(--sd-warning-light)!important}.text-warning-dark{color:var(--sd-warning-dark)!important}.bg-warning-dark{background:var(--sd-warning-dark)!important}.border-warning-dark{border-color:var(--sd-warning-dark)!important}.text-warning-contrast{color:var(--sd-warning-contrast)!important}.bg-warning-contrast{background:var(--sd-warning-contrast)!important}.border-warning-contrast{border-color:var(--sd-warning-contrast)!important}.text-error{color:var(--sd-error)!important}.bg-error{background:var(--sd-error)!important}.border-error{border-color:var(--sd-error)!important}.text-error-light{color:var(--sd-error-light)!important}.bg-error-light{background:var(--sd-error-light)!important}.border-error-light{border-color:var(--sd-error-light)!important}.text-error-dark{color:var(--sd-error-dark)!important}.bg-error-dark{background:var(--sd-error-dark)!important}.border-error-dark{border-color:var(--sd-error-dark)!important}.text-error-contrast{color:var(--sd-error-contrast)!important}.bg-error-contrast{background:var(--sd-error-contrast)!important}.border-error-contrast{border-color:var(--sd-error-contrast)!important}.text-surface{color:var(--sd-surface)!important}.bg-surface{background:var(--sd-surface)!important}.border-surface{border-color:var(--sd-surface)!important}.text-surface-muted{color:var(--sd-surface-muted)!important}.bg-surface-muted{background:var(--sd-surface-muted)!important}.border-surface-muted{border-color:var(--sd-surface-muted)!important}.text-text{color:var(--sd-text)!important}.bg-text{background:var(--sd-text)!important}.border-text{border-color:var(--sd-text)!important}.text-text-secondary{color:var(--sd-text-secondary)!important}.bg-text-secondary{background:var(--sd-text-secondary)!important}.border-text-secondary{border-color:var(--sd-text-secondary)!important}.text-text-muted{color:var(--sd-text-muted)!important}.bg-text-muted{background:var(--sd-text-muted)!important}.border-text-muted{border-color:var(--sd-text-muted)!important}.text-border{color:var(--sd-border)!important}.bg-border{background:var(--sd-border)!important}.border-border{border-color:var(--sd-border)!important}.text-border-strong{color:var(--sd-border-strong)!important}.bg-border-strong{background:var(--sd-border-strong)!important}.border-border-strong{border-color:var(--sd-border-strong)!important}.text-disabled-bg{color:var(--sd-disabled-bg)!important}.bg-disabled-bg{background:var(--sd-disabled-bg)!important}.border-disabled-bg{border-color:var(--sd-disabled-bg)!important}.text-disabled-text{color:var(--sd-disabled-text)!important}.bg-disabled-text{background:var(--sd-disabled-text)!important}.border-disabled-text{border-color:var(--sd-disabled-text)!important}.text-white{color:#fff!important}.bg-white{background:#fff!important}.border-white{border-color:#fff!important}.text-black{color:#000!important}.bg-black{background:#000!important}.border-black{border-color:#000!important}.text-secondary{color:var(--sd-text-secondary)!important}.text-muted{color:var(--sd-text-muted)!important}.text-body{color:var(--sd-text)!important}.bg-muted{background:var(--sd-surface-muted)!important}:host{display:block}:host(.sd-has-label){padding-top:4px}:host(.sd-label-top){padding-top:0}:host(.sd-viewed){padding-top:0}:host ::ng-deep .mat-mdc-form-field.no-padding-wrapper .mat-mdc-text-field-wrapper{padding-bottom:0}:host ::ng-deep mat-form-field.c-md .mat-mdc-standard-chip{padding:7px 10px;min-height:26px}:host ::ng-deep mat-form-field.c-md .mat-mdc-standard-chip .mat-mdc-chip-trailing-icon{padding:7px 7px 7px 10px}:host ::ng-deep .mat-mdc-chip-row.sd-sm{--mdc-chip-label-text-size: 12px;--mdc-chip-container-height: 20px}:host ::ng-deep .mat-mdc-chip-set.sd-md{margin-top:10px}:host ::ng-deep .mat-mdc-chip-set.sd-sm{margin-top:2px}.sd-view:not(.c-focused):not(.c-disabled):hover{background-color:var(--sd-chip-calendar-bg, #ebecf0)}mat-form-field{width:100%}mat-chip-listbox{display:flex;flex-wrap:wrap;gap:4px}::ng-deep .sd-chip-calendar-selected-date .mat-calendar-body-cell-content{background-color:var(--sd-primary-light)!important;color:var(--sd-primary)!important;border-radius:50%}.sd-chip-calendar__view-trigger{display:flex;align-items:center;width:100%;cursor:pointer}.sd-chip-calendar__view-trigger:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:2px}\n"], dependencies: [{ kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i4.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "ngmodule", type: MatAutocompleteModule }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "ngmodule", type: MatChipsModule }, { kind: "component", type: i5.MatChipGrid, selector: "mat-chip-grid", inputs: ["disabled", "placeholder", "required", "value", "errorStateMatcher"], outputs: ["change", "valueChange"] }, { kind: "directive", type: i5.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled", "readonly", "matChipInputDisabledInteractive"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { kind: "directive", type: i5.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: i5.MatChipRow, selector: "mat-chip-row, [mat-chip-row], mat-basic-chip-row, [mat-basic-chip-row]", inputs: ["editable"], outputs: ["edited"] }, { kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i6.MatCalendar, selector: "mat-calendar", inputs: ["headerComponent", "startAt", "startView", "selected", "minDate", "maxDate", "dateFilter", "dateClass", "comparisonStart", "comparisonEnd", "startDateAccessibleName", "endDateAccessibleName"], outputs: ["selectedChange", "yearSelected", "monthSelected", "viewChanged", "_userSelection", "_userDragDrop"], exportAs: ["matCalendar"] }, { kind: "ngmodule", type: MatNativeDateModule }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i7.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "directive", type: i7.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "component", type: SdLabel, selector: "sd-label", inputs: ["label", "description", "required", "helperText", "for", "labelId"] }, { kind: "component", type: SdView, selector: "sd-view", inputs: ["label", "value", "display", "hyperlink", "labelTemplate", "valueTemplate", "selectedItems"] }, { kind: "pipe", type: i1.DatePipe, name: "date" }, { kind: "pipe", type: SdRemovableChipPipe, name: "sdRemovableChip" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
721
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: SdChipCalendar, isStandalone: true, selector: "sd-chip-calendar", inputs: { autoIdInput: { classPropertyName: "autoIdInput", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, labelPlacement: { classPropertyName: "labelPlacement", publicName: "labelPlacement", isSignal: true, isRequired: false, transformFunction: null }, floatLabel: { classPropertyName: "floatLabel", publicName: "floatLabel", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, removable: { classPropertyName: "removable", publicName: "removable", isSignal: true, isRequired: false, transformFunction: null }, hideInlineError: { classPropertyName: "hideInlineError", publicName: "hideInlineError", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, minCount: { classPropertyName: "minCount", publicName: "minCount", isSignal: true, isRequired: false, transformFunction: null }, maxCount: { classPropertyName: "maxCount", publicName: "maxCount", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null }, dateFilter: { classPropertyName: "dateFilter", publicName: "dateFilter", isSignal: true, isRequired: false, transformFunction: null }, startAt: { classPropertyName: "startAt", publicName: "startAt", isSignal: true, isRequired: false, transformFunction: null }, clearable: { classPropertyName: "clearable", publicName: "clearable", isSignal: true, isRequired: false, transformFunction: null }, maxVisible: { classPropertyName: "maxVisible", publicName: "maxVisible", isSignal: true, isRequired: false, transformFunction: null }, displayFormat: { classPropertyName: "displayFormat", publicName: "displayFormat", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, viewed: { classPropertyName: "viewed", publicName: "viewed", isSignal: true, isRequired: false, transformFunction: null }, transform: { classPropertyName: "transform", publicName: "transform", isSignal: true, isRequired: false, transformFunction: null }, hyperlink: { classPropertyName: "hyperlink", publicName: "hyperlink", isSignal: true, isRequired: false, transformFunction: null }, model: { classPropertyName: "model", publicName: "model", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { model: "modelChange", sdChange: "sdChange" }, host: { properties: { "class.sd-has-label": "!!label()", "class.sd-viewed": "isViewed()", "class.sd-label-top": "labelPlacement() === 'top'" } }, queries: [{ propertyName: "sdViewDef", first: true, predicate: SdViewDefDirective, descendants: true, isSignal: true }, { propertyName: "sdLabelDef", first: true, predicate: SdLabelDefDirective, descendants: true, isSignal: true }, { propertyName: "sdLabelTemplate", first: true, predicate: ["sdLabel"], descendants: true, isSignal: true }, { propertyName: "sdValueTemplate", first: true, predicate: ["sdValue"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "calendar", first: true, predicate: MatCalendar, descendants: true, isSignal: true }, { propertyName: "field", first: true, predicate: MatFormField, descendants: true, isSignal: true }, { propertyName: "input", first: true, predicate: ["input"], descendants: true, isSignal: true }], ngImport: i0, template: "@let _label = label();\n@let _appearance = appearance();\n@let _required = required();\n@let _isViewed = isViewed();\n@let _hideInlineError = hideInlineError();\n@let _sdViewDef = sdViewDef();\n@let _labelTemplate = (sdLabelTemplate() ?? sdLabelDef()?.templateRef) || undefined;\n@let _valueTemplate = (sdValueTemplate() ?? _sdViewDef?.templateRef) || undefined;\n@let _errorMessage = errorMessage();\n@let _size = size();\n@let _labelTop = labelPlacement() === 'top';\n@let _icons = iconSizes();\n<!-- why: m\u1ED9t c\u1ED5ng gate duy nh\u1EA5t cho <mat-error>, aria-invalid v\u00E0 aria-describedby. -->\n@let _errorVisible = isErrorShown();\n@let _showInlineError = !_hideInlineError && _errorVisible;\n@let _viewTemplate = _sdViewDef?.templateRef;\n\n@if (_isViewed) {\n <sd-view\n [label]=\"_label\"\n [labelTemplate]=\"_labelTemplate\"\n [value]=\"formControl.value\"\n [display]=\"viewText()\"\n [hyperlink]=\"hyperlink()\"\n [valueTemplate]=\"_valueTemplate\">\n </sd-view>\n} @else {\n @if ((!_appearance || _labelTop) && _labelTemplate) {\n <ng-container *ngTemplateOutlet=\"_labelTemplate\"></ng-container>\n }\n @if ((!_appearance || _labelTop) && _label && !_labelTemplate) {\n <sd-label [label]=\"_label\" [required]=\"_required\" [for]=\"_labelTop ? inputId : null\"></sd-label>\n }\n\n <!-- why: div ch\u1EC9 l\u00E0 h\u1ED9p layout \u2014 aria-hidden=\"true\" c\u0169 \u1EA9n C\u1EA2 c\u00E2y con (chip, \u00F4 nh\u1EADp, <mat-error>)\n kh\u1ECFi accessibility tree. \u1EDE \u0111\u00E2y (click) KH\u00D4NG ph\u1EA3i ti\u1EC7n \u00EDch chu\u1ED9t th\u1EEBa nh\u01B0 c\u00E1c control kh\u00E1c:\n khi sdViewDef \u0111ang hi\u1EC3n th\u1ECB th\u00EC kh\u00F4ng c\u00F3 ph\u1EA7n t\u1EED focus \u0111\u01B0\u1EE3c n\u00E0o b\u00EAn trong, n\u00EAn click l\u00E0 l\u1ED1i\n v\u00E0o DUY NH\u1EA4T. V\u00EC v\u1EADy handler \u0111\u01B0\u1EE3c chuy\u1EC3n h\u1EB3n xu\u1ED1ng ph\u1EA7n t\u1EED view v\u00E0 ph\u1EA7n t\u1EED \u0111\u00F3 nh\u1EADn\n role=\"button\" + tabindex=\"0\" + keydown Enter/Space; div ngo\u00E0i kh\u00F4ng c\u00F2n handler n\u00E0o. -->\n <div\n class=\"d-flex align-items-center\"\n [class.sd-view]=\"!!_viewTemplate\"\n [class.c-focused]=\"isFocused\"\n [class.c-disabled]=\"formControl.disabled\">\n @if (_viewTemplate && !isFocused) {\n <!-- why: KH\u00D4NG \u0111\u1EB7t aria-label \u2014 n\u1ED9i dung sdViewDef ch\u00EDnh l\u00E0 nh\u00E3n nh\u00ECn th\u1EA5y \u0111\u01B0\u1EE3c, aria-label\n s\u1EBD ghi \u0111\u00E8 v\u00E0 l\u00E0m AT \u0111\u1ECDc kh\u00E1c ch\u1EEF tr\u00EAn m\u00E0n h\u00ECnh. -->\n <div\n class=\"sd-chip-calendar__view-trigger\"\n role=\"button\"\n tabindex=\"0\"\n (click)=\"onClick()\"\n (keydown.enter)=\"onViewKeydown($event)\"\n (keydown.space)=\"onViewKeydown($event)\">\n <ng-container *ngTemplateOutlet=\"_viewTemplate; context: { value: formControl.value }\"></ng-container>\n </div>\n } @else {\n <mat-form-field\n class=\"sd-chip-calendar-field\"\n [class.sd-md]=\"_size === 'md'\"\n [class.sd-sm]=\"_size === 'sm'\"\n [class.sd-lg]=\"_size === 'lg'\"\n [class.sd-chip-calendar-field--open]=\"isOpen()\"\n [class.hide-inline-error]=\"_hideInlineError\"\n [class.sd-label-top]=\"_labelTop\"\n [appearance]=\"_appearance\"\n [floatLabel]=\"floatLabel()\"\n (click)=\"onFieldClick()\">\n @if (_appearance && _label && !_labelTop) {\n <mat-label>{{ _label }}</mat-label>\n }\n <mat-chip-grid [formControl]=\"formControl\" #chipList [class.sd-md]=\"_size === 'md'\" [class.sd-sm]=\"_size === 'sm'\">\n <!-- why: chip l\u00E0 ng\u00E0y \u0111\u00E3 chu\u1EA9n ho\u00E1 (yyyy/MM/dd), hi\u1EC7n theo ng\u00E0y (B2) v\u00E0 g\u1ED9p \u201C+N\u201D khi popup \u0111\u00F3ng (B3). `removable` \u00E1p\n c\u1EA3 cho Backspace / Delete tr\u00EAn chip (A1); chip c\u00F3 t\u00EAn \u0111\u1EA7y \u0111\u1EE7, n\u00FAt \u2715 c\u00F3 t\u00EAn ri\u00EAng (A6). -->\n @for (item of visibleDays(); track item) {\n @let _removable = isRemovable(item);\n <mat-chip-row\n class=\"sd-chip-calendar__chip\"\n [class.sd-chip-calendar__chip--locked]=\"!_removable\"\n [removable]=\"_removable\"\n [aria-label]=\"chipLabel(item)\"\n (removed)=\"onRemove(item)\"\n [disabled]=\"inputControl.disabled\"\n (click)=\"onClickChip($event, item)\"\n [value]=\"item\">\n <span class=\"sd-chip-calendar__chip-text\">{{ formatDay(item) }}</span>\n <!-- why: m\u1ED7i kh\u1ED1i @if m\u1ED9t ph\u1EA7n t\u1EED g\u1ED1c, \u0111\u1EC3 \u2715 \u0111\u01B0\u1EE3c chi\u1EBFu v\u00E0o \u00F4 trailing c\u1EE7a mat-chip-row ([matChipRemove]). -->\n @if (!inputControl.disabled && _removable) {\n <sd-icon matChipRemove name=\"close\" [size]=\"_icons.chip\" [ariaLabel]=\"removeLabel(item)\"></sd-icon>\n }\n @if (!inputControl.disabled && !_removable) {\n <sd-icon\n class=\"sd-chip-calendar__lock\"\n name=\"lock\"\n [size]=\"_icons.chip\"\n [matTooltip]=\"'core.form.chip-calendar.locked' | sdTranslate\"></sd-icon>\n }\n </mat-chip-row>\n }\n @if (hiddenCount() > 0) {\n <button\n type=\"button\"\n class=\"sd-chip-calendar__more\"\n [attr.aria-label]=\"'core.form.chip-calendar.more' | sdTranslate: { count: hiddenCount() }\"\n [attr.data-autoid]=\"autoId() ? autoId() + '-more' : null\"\n (click)=\"onMoreClick($event)\">\n +{{ hiddenCount() }}\n </button>\n }\n\n <input\n class=\"sd-chip-input\"\n [formControl]=\"inputControl\"\n [id]=\"inputId\"\n [placeholder]=\"effectivePlaceholder()\"\n [matChipInputFor]=\"chipList\"\n autocomplete=\"off\"\n [errorStateMatcher]=\"matcher\"\n [required]=\"_required\"\n aria-haspopup=\"dialog\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-controls]=\"isOpen() ? panelId : null\"\n (keydown)=\"onInputKeydown($event)\"\n matInput\n [attr.data-autoId]=\"autoId()\"\n [attr.data-disabled]=\"dataDisabled()\"\n [attr.data-empty]=\"dataEmpty()\"\n [attr.data-value]=\"dataValue()\"\n [attr.data-count]=\"dataCount()\"\n [attr.data-required]=\"dataRequired()\"\n [attr.data-error-message]=\"dataErrorMessage()\"\n [attr.aria-invalid]=\"_errorVisible ? 'true' : null\"\n [attr.aria-describedby]=\"_errorMessage ? errorId : null\"\n readonly\n #input />\n </mat-chip-grid>\n\n @if (_hideInlineError && _errorVisible) {\n <sd-icon matSuffix class=\"sd-error-icon\" [matTooltip]=\"_errorMessage\" matTooltipPosition=\"above\" name=\"error\"></sd-icon>\n }\n @if (_hideInlineError && _errorVisible) {\n <span class=\"sd-visually-hidden\" [id]=\"errorId\" matSuffix>{{ _errorMessage }}</span>\n }\n <!-- Suffix (thi\u1EBFt k\u1EBF 2): n\u00FAt b\u1ECF h\u1EBFt (hover-gated nh\u01B0 sd-date, lu\u00F4n hi\u1EC7n khi popup m\u1EDF) r\u1ED3i n\u00FAt l\u1ECBch. \u1EA8n khi disabled. -->\n <!-- why: m\u1ED7i kh\u1ED1i @if m\u1ED9t ph\u1EA7n t\u1EED g\u1ED1c, \u0111\u1EC3 matSuffix \u0111\u01B0\u1EE3c chi\u1EBFu v\u00E0o v\u00F9ng suffix. -->\n @if (!formControl.disabled && clearable() && !_required && hasRemovable()) {\n <button\n type=\"button\"\n matSuffix\n class=\"sd-clear-btn sd-chip-calendar__suffix\"\n [class.sd-hover]=\"!isOpen()\"\n [attr.aria-label]=\"'core.form.chip-calendar.clear' | sdTranslate\"\n [attr.data-autoid]=\"autoId() ? autoId() + '-clear' : null\"\n (click)=\"onClear($event)\">\n <sd-icon name=\"close\" [size]=\"_icons.clear\"></sd-icon>\n </button>\n }\n @if (!formControl.disabled) {\n <button\n type=\"button\"\n matSuffix\n class=\"sd-chip-calendar__open sd-chip-calendar__suffix\"\n [class.sd-chip-calendar__open--active]=\"isOpen()\"\n data-chip-calendar-open\n [attr.aria-label]=\"'core.form.date.open-picker' | sdTranslate\"\n aria-haspopup=\"dialog\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-controls]=\"isOpen() ? panelId : null\"\n [attr.data-autoid]=\"autoId() ? autoId() + '-open' : null\"\n (click)=\"onToggleClick($event)\">\n <sd-icon name=\"calendar_month\" [size]=\"_icons.open\"></sd-icon>\n </button>\n }\n\n @if (_showInlineError) {\n <mat-error [id]=\"errorId\">{{ _errorMessage }}</mat-error>\n }\n </mat-form-field>\n\n <!-- Popup (thi\u1EBFt k\u1EBF 3): CDK overlay role=\"dialog\" treo d\u01B0\u1EDBi khung \u00F4. Ch\u1ECDn ng\u00E0y kh\u00F4ng \u0111\u00F3ng; \u0111\u00F3ng b\u1EB1ng \u201CXong\u201D, Esc\n ho\u1EB7c b\u1EA5m ra ngo\u00E0i. why: mat-menu c\u0169 \u0111\u00F3ng khi Tab v\u00E0 kh\u00F4ng ph\u1EA3i dialog (A3). Kh\u00F4ng aria-hidden \u1EDF \u0111\u00E2u c\u1EA3:\n l\u01B0\u1EDBi ng\u00E0y, n\u00FAt chuy\u1EC3n th\u00E1ng v\u00E0 \u00F4 \u0111ang ch\u1ECDn \u0111\u1EC1u ph\u1EA3i \u0111\u1ECDc \u0111\u01B0\u1EE3c. -->\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"overlayOrigin()!\"\n [cdkConnectedOverlayOpen]=\"isOpen()\"\n [cdkConnectedOverlayPositions]=\"positions\"\n [cdkConnectedOverlayPush]=\"true\"\n [cdkConnectedOverlayViewportMargin]=\"8\"\n cdkConnectedOverlayPanelClass=\"sd-chip-calendar-pane\"\n (attach)=\"onAttach()\"\n (overlayOutsideClick)=\"onOutsideClick($event)\"\n (overlayKeydown)=\"onOverlayKeydown($event)\">\n @let _days = days();\n @let _maxCount = effectiveMaxCount();\n @let _full = full();\n <div\n class=\"sd-chip-calendar-panel\"\n role=\"dialog\"\n cdkTrapFocus\n [id]=\"panelId\"\n [attr.aria-label]=\"_label || ('core.form.chip-calendar.dialog-label' | sdTranslate)\"\n [attr.data-autoid]=\"autoId() ? autoId() + '-panel' : null\">\n <div class=\"sd-chip-calendar-panel__head\">\n <div class=\"sd-chip-calendar-panel__summary\">\n <span class=\"sd-chip-calendar-panel__count\">{{\n 'core.form.chip-calendar.selected-count' | sdTranslate: { count: _days.length }\n }}</span>\n <span class=\"sd-chip-calendar-panel__limit\">\n {{\n _maxCount > 0\n ? ('core.form.chip-calendar.max-count' | sdTranslate: { max: _maxCount })\n : ('core.form.chip-calendar.no-limit' | sdTranslate)\n }}\n </span>\n </div>\n <!-- why: v\u00F9ng live lu\u00F4n c\u00F3 m\u1EB7t (r\u1ED7ng khi ch\u01B0a \u0111\u1EE7) \u0111\u1EC3 screen reader \u0111\u1ECDc c\u00E2u \u201C\u0111\u00E3 \u0111\u1EE7\u201D ngay khi n\u00F3 xu\u1EA5t hi\u1EC7n. -->\n <p class=\"sd-chip-calendar-panel__full\" aria-live=\"polite\">\n @if (_full) {\n {{ 'core.form.chip-calendar.full' | sdTranslate: { max: _maxCount } }}\n }\n </p>\n </div>\n\n <mat-calendar\n [headerComponent]=\"calendarHeader\"\n [startAt]=\"openAt()\"\n [minDate]=\"resolvedMinDate()\"\n [maxDate]=\"resolvedMaxDate()\"\n [dateFilter]=\"calendarFilter()\"\n [dateClass]=\"calendarDateClass()\"\n (selectedChange)=\"onSelectDate($event)\">\n </mat-calendar>\n\n <div class=\"sd-chip-calendar-panel__footer\">\n @if (clearable()) {\n <sd-button\n data-chip-calendar-clear-all\n type=\"text\"\n color=\"primary\"\n size=\"sm\"\n [disabled]=\"!hasRemovable()\"\n [autoId]=\"autoId() ? autoId() + '-clear-all' : undefined\"\n [title]=\"'core.form.chip-calendar.clear-all' | sdTranslate\"\n (click)=\"onClear()\"></sd-button>\n } @else {\n <span></span>\n }\n <sd-button\n data-chip-calendar-done\n type=\"fill\"\n color=\"primary\"\n size=\"sm\"\n [autoId]=\"autoId() ? autoId() + '-done' : undefined\"\n [title]=\"'core.form.chip-calendar.done' | sdTranslate\"\n (click)=\"close(true)\"></sd-button>\n </div>\n </div>\n </ng-template>\n }\n </div>\n}\n", styles: [":host{display:block}:host(.sd-has-label){padding-top:4px}:host(.sd-label-top){padding-top:0}:host(.sd-viewed){padding-top:0}.sd-view:not(.c-focused):not(.c-disabled):hover{background-color:var(--sd-chip-calendar-bg)}mat-form-field{width:100%}.sd-chip-calendar__view-trigger{display:flex;align-items:center;width:100%;cursor:pointer}.sd-chip-calendar__view-trigger:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:2px}.sd-chip-calendar-panel{display:flex;flex-direction:column;gap:4px;box-sizing:border-box;width:var(--sd-chip-calendar-panel-width, 296px);padding:12px 8px 8px;border:1px solid color-mix(in srgb,var(--sd-border) 60%,var(--sd-surface));border-radius:var(--sd-panel-radius, 10px);background-color:var(--sd-select-panel-bg, var(--sd-surface));box-shadow:var(--sd-shadow-md, none);color:var(--sd-text);animation:sd-chip-calendar-panel-in var(--sd-duration-fast, .12s) var(--sd-ease-standard, ease-out);--mat-datepicker-calendar-date-text-color: var(--sd-text);--mat-datepicker-calendar-date-hover-state-background-color: color-mix(in srgb, var(--sd-text) 5%, transparent);--mat-datepicker-calendar-date-focus-state-background-color: transparent;--mat-datepicker-calendar-date-today-outline-color: var(--sd-primary);--mat-datepicker-calendar-date-disabled-state-text-color: var(--sd-disabled-text);--mat-datepicker-calendar-date-today-disabled-state-outline-color: transparent;--mat-datepicker-calendar-header-text-color: var(--sd-text-secondary);--mat-datepicker-calendar-header-text-size: var(--sd-font-size-11, 11px);--mat-datepicker-calendar-header-text-weight: var(--sd-font-weight-medium, 500);--mat-datepicker-calendar-header-divider-color: transparent;--mat-datepicker-calendar-text-size: var(--sd-font-size-13, 13px)}@keyframes sd-chip-calendar-panel-in{0%{opacity:0;transform:scale(.98)}to{opacity:1;transform:none}}@media(prefers-reduced-motion:reduce){.sd-chip-calendar-panel{animation:none}}.sd-chip-calendar-panel__head{padding:0 8px}.sd-chip-calendar-panel__summary{display:flex;align-items:baseline;justify-content:space-between;gap:8px}.sd-chip-calendar-panel__count{font-size:var(--sd-font-size-13, 13px);font-weight:var(--sd-font-weight-semibold, 600)}.sd-chip-calendar-panel__limit{font-size:var(--sd-font-size-12, 12px);color:var(--sd-text-secondary)}.sd-chip-calendar-panel__full{margin:0;font-size:var(--sd-font-size-12, 12px);line-height:16px;color:var(--sd-warning-dark)}.sd-chip-calendar-panel__full:empty{display:none}.sd-chip-calendar-panel__footer{display:flex;align-items:center;justify-content:space-between;margin-top:4px;padding:8px 4px 0;border-top:1px solid var(--sd-select-panel-divider, var(--sd-border))}.sd-chip-calendar-panel ::ng-deep .mat-calendar-content{padding:0}.sd-chip-calendar-panel ::ng-deep .mat-calendar-table-header th{padding:0;line-height:24px}.sd-chip-calendar-panel ::ng-deep .mat-calendar-body-label{visibility:hidden}.sd-chip-calendar-panel ::ng-deep .mat-calendar-body-cell-content{font-variant-numeric:tabular-nums}.sd-chip-calendar-panel ::ng-deep .mat-calendar-body-cell.sd-chip-calendar-selected{--mat-datepicker-calendar-date-hover-state-background-color: var(--sd-primary-600, var(--sd-primary-dark));--mat-datepicker-calendar-date-focus-state-background-color: var(--sd-primary);--mat-datepicker-calendar-date-today-outline-color: transparent}.sd-chip-calendar-panel ::ng-deep .mat-calendar-body-cell.sd-chip-calendar-selected>.mat-calendar-body-cell-content{background-color:var(--sd-primary);color:var(--sd-primary-contrast);font-weight:var(--sd-font-weight-semibold, 600)}.sd-chip-calendar-panel ::ng-deep .mat-calendar-body-cell.sd-chip-calendar-locked{--mat-datepicker-calendar-date-disabled-state-text-color: var(--sd-primary-dark);--mat-datepicker-calendar-date-hover-state-background-color: var(--sd-primary-light);--mat-datepicker-calendar-date-focus-state-background-color: var(--sd-primary-light)}.sd-chip-calendar-panel ::ng-deep .mat-calendar-body-cell.sd-chip-calendar-locked>.mat-calendar-body-cell-content{background-color:var(--sd-primary-light);color:var(--sd-primary-dark)}.sd-chip-calendar-panel ::ng-deep .mat-calendar-body-cell:focus-visible>.mat-calendar-body-cell-content{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color);outline-offset:1px}@media(forced-colors:active){.sd-chip-calendar-panel ::ng-deep .mat-calendar-body-cell.sd-chip-calendar-selected>.mat-calendar-body-cell-content{forced-color-adjust:none;background-color:Highlight;color:HighlightText}.sd-chip-calendar-panel ::ng-deep .mat-calendar-body-cell.sd-chip-calendar-locked>.mat-calendar-body-cell-content{forced-color-adjust:auto;border:1px solid GrayText;background-color:Canvas;color:GrayText}}.sd-chip-calendar__open{display:inline-flex;align-items:center;justify-content:center;width:var(--sd-chip-row-suffix-size);height:var(--sd-chip-row-suffix-size);padding:0;border:0;border-radius:var(--sd-radius-6, 6px);background:transparent;color:var(--sd-text-secondary);cursor:pointer}.sd-chip-calendar__open:hover{background-color:color-mix(in srgb,var(--sd-text) 5%,transparent)}.sd-chip-calendar__open:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color);outline-offset:1px}.sd-chip-calendar__open--active{color:var(--sd-primary)}@media(prefers-reduced-motion:no-preference){.sd-chip-calendar__open{transition:background-color var(--sd-duration-fast, .12s) ease}}\n"], dependencies: [{ kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i4.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "ngmodule", type: MatChipsModule }, { kind: "component", type: i5.MatChipGrid, selector: "mat-chip-grid", inputs: ["disabled", "placeholder", "required", "value", "errorStateMatcher"], outputs: ["change", "valueChange"] }, { kind: "directive", type: i5.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled", "readonly", "matChipInputDisabledInteractive"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { kind: "directive", type: i5.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: i5.MatChipRow, selector: "mat-chip-row, [mat-chip-row], mat-basic-chip-row, [mat-basic-chip-row]", inputs: ["editable"], outputs: ["edited"] }, { kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i6.MatCalendar, selector: "mat-calendar", inputs: ["headerComponent", "startAt", "startView", "selected", "minDate", "maxDate", "dateFilter", "dateClass", "comparisonStart", "comparisonEnd", "startDateAccessibleName", "endDateAccessibleName"], outputs: ["selectedChange", "yearSelected", "monthSelected", "viewChanged", "_userSelection", "_userDragDrop"], exportAs: ["matCalendar"] }, { kind: "ngmodule", type: MatNativeDateModule }, { kind: "ngmodule", type: OverlayModule }, { kind: "directive", type: i7.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i8.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "component", type: SdButton, selector: "sd-button", inputs: ["autoId", "type", "color", "size", "fontSet", "title", "width", "tooltip", "prefixIcon", "suffixIcon", "disabled", "openOnHover", "loading", "block", "htmlType", "indicator", "indicatorColor", "indicatorMax", "indicatorLabel"], outputs: ["click"] }, { kind: "component", type: SdLabel, selector: "sd-label", inputs: ["label", "description", "required", "helperText", "for", "labelId"] }, { kind: "component", type: SdView, selector: "sd-view", inputs: ["label", "value", "display", "hyperlink", "labelTemplate", "valueTemplate", "selectedItems"] }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
365
722
|
}
|
|
366
723
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: SdChipCalendar, decorators: [{
|
|
367
724
|
type: Component,
|
|
@@ -377,17 +734,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
|
|
|
377
734
|
MatInputModule,
|
|
378
735
|
MatTooltipModule,
|
|
379
736
|
MatFormFieldModule,
|
|
380
|
-
MatAutocompleteModule,
|
|
381
|
-
MatProgressSpinnerModule,
|
|
382
737
|
MatChipsModule,
|
|
383
738
|
MatDatepickerModule,
|
|
384
739
|
MatNativeDateModule,
|
|
385
|
-
|
|
740
|
+
OverlayModule,
|
|
741
|
+
A11yModule,
|
|
742
|
+
SdButton,
|
|
743
|
+
SdTranslatePipe,
|
|
386
744
|
SdLabel,
|
|
387
745
|
SdView,
|
|
388
|
-
SdRemovableChipPipe,
|
|
389
|
-
], template: "@let _label = label();\n@let _appearance = appearance();\n@let _required = required();\n@let _isViewed = isViewed();\n@let _hideInlineError = hideInlineError();\n@let _sdViewDef = sdViewDef();\n@let _labelTemplate = (sdLabelTemplate() ?? sdLabelDef()?.templateRef) || undefined;\n@let _valueTemplate = (sdValueTemplate() ?? _sdViewDef?.templateRef) || undefined;\n@let _errorMessage = errorMessage();\n@let _size = size();\n@let _removable = removable();\n@let _labelTop = labelPlacement() === 'top';\n<!-- why: m\u1ED9t c\u1ED5ng gate duy nh\u1EA5t cho <mat-error>, aria-invalid v\u00E0 aria-describedby. -->\n@let _errorVisible = !!_errorMessage && formControl.touched;\n@let _showInlineError = !_hideInlineError && _errorVisible;\n@let _viewTemplate = _sdViewDef?.templateRef;\n\n@if (_isViewed) {\n <sd-view\n [label]=\"_label\"\n [labelTemplate]=\"_labelTemplate\"\n [value]=\"formControl.value\"\n [display]=\"formControl.value\"\n [hyperlink]=\"hyperlink()\"\n [valueTemplate]=\"_valueTemplate\">\n </sd-view>\n} @else {\n @if ((!_appearance || _labelTop) && _labelTemplate) {\n <ng-container *ngTemplateOutlet=\"_labelTemplate\"></ng-container>\n }\n @if ((!_appearance || _labelTop) && _label && !_labelTemplate) {\n <sd-label [label]=\"_label\" [required]=\"_required\" [for]=\"_labelTop ? inputId : null\"></sd-label>\n }\n\n <!-- why: div ch\u1EC9 l\u00E0 h\u1ED9p layout \u2014 aria-hidden=\"true\" c\u0169 \u1EA9n C\u1EA2 c\u00E2y con (chip, \u00F4 nh\u1EADp, <mat-error>)\n kh\u1ECFi accessibility tree. \u1EDE \u0111\u00E2y (click) KH\u00D4NG ph\u1EA3i ti\u1EC7n \u00EDch chu\u1ED9t th\u1EEBa nh\u01B0 c\u00E1c control kh\u00E1c:\n khi sdViewDef \u0111ang hi\u1EC3n th\u1ECB th\u00EC kh\u00F4ng c\u00F3 ph\u1EA7n t\u1EED focus \u0111\u01B0\u1EE3c n\u00E0o b\u00EAn trong, n\u00EAn click l\u00E0 l\u1ED1i\n v\u00E0o DUY NH\u1EA4T. V\u00EC v\u1EADy handler \u0111\u01B0\u1EE3c chuy\u1EC3n h\u1EB3n xu\u1ED1ng ph\u1EA7n t\u1EED view v\u00E0 ph\u1EA7n t\u1EED \u0111\u00F3 nh\u1EADn\n role=\"button\" + tabindex=\"0\" + keydown Enter/Space; div ngo\u00E0i kh\u00F4ng c\u00F2n handler n\u00E0o. -->\n <div\n class=\"d-flex align-items-center\"\n [class.sd-view]=\"!!_viewTemplate\"\n [class.c-focused]=\"isFocused\"\n [class.c-disabled]=\"formControl.disabled\">\n @if (_viewTemplate && !isFocused) {\n <!-- why: KH\u00D4NG \u0111\u1EB7t aria-label \u2014 n\u1ED9i dung sdViewDef ch\u00EDnh l\u00E0 nh\u00E3n nh\u00ECn th\u1EA5y \u0111\u01B0\u1EE3c, aria-label\n s\u1EBD ghi \u0111\u00E8 v\u00E0 l\u00E0m AT \u0111\u1ECDc kh\u00E1c ch\u1EEF tr\u00EAn m\u00E0n h\u00ECnh. -->\n <div\n class=\"sd-chip-calendar__view-trigger\"\n role=\"button\"\n tabindex=\"0\"\n (click)=\"onClick()\"\n (keydown.enter)=\"onViewKeydown($event)\"\n (keydown.space)=\"onViewKeydown($event)\">\n <ng-container *ngTemplateOutlet=\"_viewTemplate; context: { value: formControl.value }\"></ng-container>\n </div>\n } @else {\n <mat-form-field\n [class.sd-md]=\"_size === 'md'\"\n [class.sd-sm]=\"_size === 'sm'\"\n [class.hide-inline-error]=\"_hideInlineError\"\n [class.sd-label-top]=\"_labelTop\"\n [appearance]=\"_appearance\"\n [floatLabel]=\"floatLabel()\">\n @if (_appearance && _label && !_labelTop) {\n <mat-label>{{ _label }}</mat-label>\n }\n <mat-chip-grid [formControl]=\"formControl\" #chipList [class.sd-md]=\"_size === 'md'\" [class.sd-sm]=\"_size === 'sm'\">\n @for (item of formControl.value; track item) {\n @if (item) {\n <mat-chip-row\n [class.sd-md]=\"_size === 'md'\"\n [class.sd-sm]=\"_size === 'sm'\"\n [removable]=\"_removable\"\n (removed)=\"onRemove(item)\"\n [disabled]=\"inputControl.disabled\"\n (click)=\"onClickChip($event, item)\"\n [value]=\"item\">\n <span>{{ item | date: 'dd/MM/yyyy' }}</span>\n @if (!inputControl.disabled && item | sdRemovableChip: _removable) {\n <sd-icon matChipRemove name=\"cancel\"></sd-icon>\n }\n </mat-chip-row>\n }\n }\n\n <input\n class=\"sd-chip-input\"\n [formControl]=\"inputControl\"\n [id]=\"inputId\"\n [placeholder]=\"placeholder() || (_labelTop ? '' : _label)\"\n [matChipInputFor]=\"chipList\"\n autocomplete=\"off\"\n [errorStateMatcher]=\"matcher\"\n [matMenuTriggerFor]=\"calendarMenu\"\n [required]=\"_required\"\n matInput\n [attr.data-autoId]=\"autoId()\"\n [attr.data-disabled]=\"dataDisabled()\"\n [attr.data-empty]=\"dataEmpty()\"\n [attr.data-value]=\"dataValue()\"\n [attr.data-count]=\"dataCount()\"\n [attr.data-required]=\"dataRequired()\"\n [attr.data-error-message]=\"dataErrorMessage()\"\n [attr.aria-invalid]=\"_errorVisible ? 'true' : null\"\n [attr.aria-describedby]=\"_errorMessage ? errorId : null\"\n readonly\n #input />\n </mat-chip-grid>\n\n <mat-menu #calendarMenu=\"matMenu\" overlapTrigger=\"false\" (closed)=\"onCloseCalendar()\">\n <!-- why: aria-hidden=\"true\" \u1EDF \u0111\u00E2y t\u1EEBng \u1EA9n NGUY\u00CAN <mat-calendar> \u2014 t\u1EE9c to\u00E0n b\u1ED9 l\u01B0\u1EDBi ng\u00E0y,\n n\u00FAt chuy\u1EC3n th\u00E1ng v\u00E0 \u00F4 ng\u00E0y \u0111ang ch\u1ECDn \u2014 kh\u1ECFi accessibility tree, d\u00F9 l\u1ECBch v\u1EABn nh\u1EADn\n focus v\u00E0 \u0111i\u1EC1u h\u01B0\u1EDBng b\u1EB1ng ph\u00EDm m\u0169i t\u00EAn. role=\"presentation\" ch\u1EC9 v\u00F4 hi\u1EC7u ho\u00E1 c\u00E1i div\n b\u1ECDc (n\u00F3 ch\u1EC9 t\u1ED3n t\u1EA1i \u0111\u1EC3 ch\u1EB7n n\u1ED5i b\u1ECDt click l\u00E0m \u0111\u00F3ng menu), KH\u00D4NG lan xu\u1ED1ng l\u1ECBch. -->\n <div style=\"width: 280px\" role=\"presentation\" (click)=\"$event.stopPropagation()\">\n <mat-calendar (selectedChange)=\"onSelectDate($event)\" [dateClass]=\"dateClass\"> </mat-calendar>\n </div>\n </mat-menu>\n @if (_hideInlineError && _errorVisible) {\n <sd-icon matSuffix class=\"sd-error-icon\" [matTooltip]=\"_errorMessage\" matTooltipPosition=\"above\" name=\"error\"></sd-icon>\n }\n @if (_hideInlineError && _errorVisible) {\n <span class=\"sd-visually-hidden\" [id]=\"errorId\" matSuffix>{{ _errorMessage }}</span>\n\n }\n\n @if (_showInlineError) {\n <mat-error [id]=\"errorId\">{{ _errorMessage }}</mat-error>\n }\n </mat-form-field>\n }\n </div>\n}\n", styles: ["@charset \"UTF-8\";.text-primary{color:var(--sd-primary)!important}.bg-primary{background:var(--sd-primary)!important}.border-primary{border-color:var(--sd-primary)!important}.text-primary-light{color:var(--sd-primary-light)!important}.bg-primary-light{background:var(--sd-primary-light)!important}.border-primary-light{border-color:var(--sd-primary-light)!important}.text-primary-dark{color:var(--sd-primary-dark)!important}.bg-primary-dark{background:var(--sd-primary-dark)!important}.border-primary-dark{border-color:var(--sd-primary-dark)!important}.text-primary-contrast{color:var(--sd-primary-contrast)!important}.bg-primary-contrast{background:var(--sd-primary-contrast)!important}.border-primary-contrast{border-color:var(--sd-primary-contrast)!important}.text-secondary{color:var(--sd-secondary)!important}.bg-secondary{background:var(--sd-secondary)!important}.border-secondary{border-color:var(--sd-secondary)!important}.text-secondary-light{color:var(--sd-secondary-light)!important}.bg-secondary-light{background:var(--sd-secondary-light)!important}.border-secondary-light{border-color:var(--sd-secondary-light)!important}.text-secondary-dark{color:var(--sd-secondary-dark)!important}.bg-secondary-dark{background:var(--sd-secondary-dark)!important}.border-secondary-dark{border-color:var(--sd-secondary-dark)!important}.text-secondary-contrast{color:var(--sd-secondary-contrast)!important}.bg-secondary-contrast{background:var(--sd-secondary-contrast)!important}.border-secondary-contrast{border-color:var(--sd-secondary-contrast)!important}.text-info{color:var(--sd-info)!important}.bg-info{background:var(--sd-info)!important}.border-info{border-color:var(--sd-info)!important}.text-info-light{color:var(--sd-info-light)!important}.bg-info-light{background:var(--sd-info-light)!important}.border-info-light{border-color:var(--sd-info-light)!important}.text-info-dark{color:var(--sd-info-dark)!important}.bg-info-dark{background:var(--sd-info-dark)!important}.border-info-dark{border-color:var(--sd-info-dark)!important}.text-info-contrast{color:var(--sd-info-contrast)!important}.bg-info-contrast{background:var(--sd-info-contrast)!important}.border-info-contrast{border-color:var(--sd-info-contrast)!important}.text-success{color:var(--sd-success)!important}.bg-success{background:var(--sd-success)!important}.border-success{border-color:var(--sd-success)!important}.text-success-light{color:var(--sd-success-light)!important}.bg-success-light{background:var(--sd-success-light)!important}.border-success-light{border-color:var(--sd-success-light)!important}.text-success-dark{color:var(--sd-success-dark)!important}.bg-success-dark{background:var(--sd-success-dark)!important}.border-success-dark{border-color:var(--sd-success-dark)!important}.text-success-contrast{color:var(--sd-success-contrast)!important}.bg-success-contrast{background:var(--sd-success-contrast)!important}.border-success-contrast{border-color:var(--sd-success-contrast)!important}.text-warning{color:var(--sd-warning)!important}.bg-warning{background:var(--sd-warning)!important}.border-warning{border-color:var(--sd-warning)!important}.text-warning-light{color:var(--sd-warning-light)!important}.bg-warning-light{background:var(--sd-warning-light)!important}.border-warning-light{border-color:var(--sd-warning-light)!important}.text-warning-dark{color:var(--sd-warning-dark)!important}.bg-warning-dark{background:var(--sd-warning-dark)!important}.border-warning-dark{border-color:var(--sd-warning-dark)!important}.text-warning-contrast{color:var(--sd-warning-contrast)!important}.bg-warning-contrast{background:var(--sd-warning-contrast)!important}.border-warning-contrast{border-color:var(--sd-warning-contrast)!important}.text-error{color:var(--sd-error)!important}.bg-error{background:var(--sd-error)!important}.border-error{border-color:var(--sd-error)!important}.text-error-light{color:var(--sd-error-light)!important}.bg-error-light{background:var(--sd-error-light)!important}.border-error-light{border-color:var(--sd-error-light)!important}.text-error-dark{color:var(--sd-error-dark)!important}.bg-error-dark{background:var(--sd-error-dark)!important}.border-error-dark{border-color:var(--sd-error-dark)!important}.text-error-contrast{color:var(--sd-error-contrast)!important}.bg-error-contrast{background:var(--sd-error-contrast)!important}.border-error-contrast{border-color:var(--sd-error-contrast)!important}.text-surface{color:var(--sd-surface)!important}.bg-surface{background:var(--sd-surface)!important}.border-surface{border-color:var(--sd-surface)!important}.text-surface-muted{color:var(--sd-surface-muted)!important}.bg-surface-muted{background:var(--sd-surface-muted)!important}.border-surface-muted{border-color:var(--sd-surface-muted)!important}.text-text{color:var(--sd-text)!important}.bg-text{background:var(--sd-text)!important}.border-text{border-color:var(--sd-text)!important}.text-text-secondary{color:var(--sd-text-secondary)!important}.bg-text-secondary{background:var(--sd-text-secondary)!important}.border-text-secondary{border-color:var(--sd-text-secondary)!important}.text-text-muted{color:var(--sd-text-muted)!important}.bg-text-muted{background:var(--sd-text-muted)!important}.border-text-muted{border-color:var(--sd-text-muted)!important}.text-border{color:var(--sd-border)!important}.bg-border{background:var(--sd-border)!important}.border-border{border-color:var(--sd-border)!important}.text-border-strong{color:var(--sd-border-strong)!important}.bg-border-strong{background:var(--sd-border-strong)!important}.border-border-strong{border-color:var(--sd-border-strong)!important}.text-disabled-bg{color:var(--sd-disabled-bg)!important}.bg-disabled-bg{background:var(--sd-disabled-bg)!important}.border-disabled-bg{border-color:var(--sd-disabled-bg)!important}.text-disabled-text{color:var(--sd-disabled-text)!important}.bg-disabled-text{background:var(--sd-disabled-text)!important}.border-disabled-text{border-color:var(--sd-disabled-text)!important}.text-white{color:#fff!important}.bg-white{background:#fff!important}.border-white{border-color:#fff!important}.text-black{color:#000!important}.bg-black{background:#000!important}.border-black{border-color:#000!important}.text-secondary{color:var(--sd-text-secondary)!important}.text-muted{color:var(--sd-text-muted)!important}.text-body{color:var(--sd-text)!important}.bg-muted{background:var(--sd-surface-muted)!important}:host{display:block}:host(.sd-has-label){padding-top:4px}:host(.sd-label-top){padding-top:0}:host(.sd-viewed){padding-top:0}:host ::ng-deep .mat-mdc-form-field.no-padding-wrapper .mat-mdc-text-field-wrapper{padding-bottom:0}:host ::ng-deep mat-form-field.c-md .mat-mdc-standard-chip{padding:7px 10px;min-height:26px}:host ::ng-deep mat-form-field.c-md .mat-mdc-standard-chip .mat-mdc-chip-trailing-icon{padding:7px 7px 7px 10px}:host ::ng-deep .mat-mdc-chip-row.sd-sm{--mdc-chip-label-text-size: 12px;--mdc-chip-container-height: 20px}:host ::ng-deep .mat-mdc-chip-set.sd-md{margin-top:10px}:host ::ng-deep .mat-mdc-chip-set.sd-sm{margin-top:2px}.sd-view:not(.c-focused):not(.c-disabled):hover{background-color:var(--sd-chip-calendar-bg, #ebecf0)}mat-form-field{width:100%}mat-chip-listbox{display:flex;flex-wrap:wrap;gap:4px}::ng-deep .sd-chip-calendar-selected-date .mat-calendar-body-cell-content{background-color:var(--sd-primary-light)!important;color:var(--sd-primary)!important;border-radius:50%}.sd-chip-calendar__view-trigger{display:flex;align-items:center;width:100%;cursor:pointer}.sd-chip-calendar__view-trigger:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:2px}\n"] }]
|
|
390
|
-
}], ctorParameters: () => [], propDecorators: { menuTrigger: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatMenuTrigger), { isSignal: true }] }], calendar: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatCalendar), { isSignal: true }] }], autoIdInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoId", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], labelPlacement: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelPlacement", required: false }] }], floatLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "floatLabel", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], form: [{ type: i0.Input, args: [{ isSignal: true, alias: "form", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], removable: [{ type: i0.Input, args: [{ isSignal: true, alias: "removable", required: false }] }], hideInlineError: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideInlineError", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], viewed: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewed", required: false }] }], hyperlink: [{ type: i0.Input, args: [{ isSignal: true, alias: "hyperlink", required: false }] }], model: [{ type: i0.Input, args: [{ isSignal: true, alias: "model", required: false }] }, { type: i0.Output, args: ["modelChange"] }], sdChange: [{ type: i0.Output, args: ["sdChange"] }], input: [{ type: i0.ViewChild, args: ['input', { isSignal: true }] }], sdViewDef: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SdViewDefDirective), { isSignal: true }] }], sdLabelDef: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SdLabelDefDirective), { isSignal: true }] }], sdLabelTemplate: [{ type: i0.ContentChild, args: ['sdLabel', { isSignal: true }] }], sdValueTemplate: [{ type: i0.ContentChild, args: ['sdValue', { isSignal: true }] }] } });
|
|
746
|
+
], template: "@let _label = label();\n@let _appearance = appearance();\n@let _required = required();\n@let _isViewed = isViewed();\n@let _hideInlineError = hideInlineError();\n@let _sdViewDef = sdViewDef();\n@let _labelTemplate = (sdLabelTemplate() ?? sdLabelDef()?.templateRef) || undefined;\n@let _valueTemplate = (sdValueTemplate() ?? _sdViewDef?.templateRef) || undefined;\n@let _errorMessage = errorMessage();\n@let _size = size();\n@let _labelTop = labelPlacement() === 'top';\n@let _icons = iconSizes();\n<!-- why: m\u1ED9t c\u1ED5ng gate duy nh\u1EA5t cho <mat-error>, aria-invalid v\u00E0 aria-describedby. -->\n@let _errorVisible = isErrorShown();\n@let _showInlineError = !_hideInlineError && _errorVisible;\n@let _viewTemplate = _sdViewDef?.templateRef;\n\n@if (_isViewed) {\n <sd-view\n [label]=\"_label\"\n [labelTemplate]=\"_labelTemplate\"\n [value]=\"formControl.value\"\n [display]=\"viewText()\"\n [hyperlink]=\"hyperlink()\"\n [valueTemplate]=\"_valueTemplate\">\n </sd-view>\n} @else {\n @if ((!_appearance || _labelTop) && _labelTemplate) {\n <ng-container *ngTemplateOutlet=\"_labelTemplate\"></ng-container>\n }\n @if ((!_appearance || _labelTop) && _label && !_labelTemplate) {\n <sd-label [label]=\"_label\" [required]=\"_required\" [for]=\"_labelTop ? inputId : null\"></sd-label>\n }\n\n <!-- why: div ch\u1EC9 l\u00E0 h\u1ED9p layout \u2014 aria-hidden=\"true\" c\u0169 \u1EA9n C\u1EA2 c\u00E2y con (chip, \u00F4 nh\u1EADp, <mat-error>)\n kh\u1ECFi accessibility tree. \u1EDE \u0111\u00E2y (click) KH\u00D4NG ph\u1EA3i ti\u1EC7n \u00EDch chu\u1ED9t th\u1EEBa nh\u01B0 c\u00E1c control kh\u00E1c:\n khi sdViewDef \u0111ang hi\u1EC3n th\u1ECB th\u00EC kh\u00F4ng c\u00F3 ph\u1EA7n t\u1EED focus \u0111\u01B0\u1EE3c n\u00E0o b\u00EAn trong, n\u00EAn click l\u00E0 l\u1ED1i\n v\u00E0o DUY NH\u1EA4T. V\u00EC v\u1EADy handler \u0111\u01B0\u1EE3c chuy\u1EC3n h\u1EB3n xu\u1ED1ng ph\u1EA7n t\u1EED view v\u00E0 ph\u1EA7n t\u1EED \u0111\u00F3 nh\u1EADn\n role=\"button\" + tabindex=\"0\" + keydown Enter/Space; div ngo\u00E0i kh\u00F4ng c\u00F2n handler n\u00E0o. -->\n <div\n class=\"d-flex align-items-center\"\n [class.sd-view]=\"!!_viewTemplate\"\n [class.c-focused]=\"isFocused\"\n [class.c-disabled]=\"formControl.disabled\">\n @if (_viewTemplate && !isFocused) {\n <!-- why: KH\u00D4NG \u0111\u1EB7t aria-label \u2014 n\u1ED9i dung sdViewDef ch\u00EDnh l\u00E0 nh\u00E3n nh\u00ECn th\u1EA5y \u0111\u01B0\u1EE3c, aria-label\n s\u1EBD ghi \u0111\u00E8 v\u00E0 l\u00E0m AT \u0111\u1ECDc kh\u00E1c ch\u1EEF tr\u00EAn m\u00E0n h\u00ECnh. -->\n <div\n class=\"sd-chip-calendar__view-trigger\"\n role=\"button\"\n tabindex=\"0\"\n (click)=\"onClick()\"\n (keydown.enter)=\"onViewKeydown($event)\"\n (keydown.space)=\"onViewKeydown($event)\">\n <ng-container *ngTemplateOutlet=\"_viewTemplate; context: { value: formControl.value }\"></ng-container>\n </div>\n } @else {\n <mat-form-field\n class=\"sd-chip-calendar-field\"\n [class.sd-md]=\"_size === 'md'\"\n [class.sd-sm]=\"_size === 'sm'\"\n [class.sd-lg]=\"_size === 'lg'\"\n [class.sd-chip-calendar-field--open]=\"isOpen()\"\n [class.hide-inline-error]=\"_hideInlineError\"\n [class.sd-label-top]=\"_labelTop\"\n [appearance]=\"_appearance\"\n [floatLabel]=\"floatLabel()\"\n (click)=\"onFieldClick()\">\n @if (_appearance && _label && !_labelTop) {\n <mat-label>{{ _label }}</mat-label>\n }\n <mat-chip-grid [formControl]=\"formControl\" #chipList [class.sd-md]=\"_size === 'md'\" [class.sd-sm]=\"_size === 'sm'\">\n <!-- why: chip l\u00E0 ng\u00E0y \u0111\u00E3 chu\u1EA9n ho\u00E1 (yyyy/MM/dd), hi\u1EC7n theo ng\u00E0y (B2) v\u00E0 g\u1ED9p \u201C+N\u201D khi popup \u0111\u00F3ng (B3). `removable` \u00E1p\n c\u1EA3 cho Backspace / Delete tr\u00EAn chip (A1); chip c\u00F3 t\u00EAn \u0111\u1EA7y \u0111\u1EE7, n\u00FAt \u2715 c\u00F3 t\u00EAn ri\u00EAng (A6). -->\n @for (item of visibleDays(); track item) {\n @let _removable = isRemovable(item);\n <mat-chip-row\n class=\"sd-chip-calendar__chip\"\n [class.sd-chip-calendar__chip--locked]=\"!_removable\"\n [removable]=\"_removable\"\n [aria-label]=\"chipLabel(item)\"\n (removed)=\"onRemove(item)\"\n [disabled]=\"inputControl.disabled\"\n (click)=\"onClickChip($event, item)\"\n [value]=\"item\">\n <span class=\"sd-chip-calendar__chip-text\">{{ formatDay(item) }}</span>\n <!-- why: m\u1ED7i kh\u1ED1i @if m\u1ED9t ph\u1EA7n t\u1EED g\u1ED1c, \u0111\u1EC3 \u2715 \u0111\u01B0\u1EE3c chi\u1EBFu v\u00E0o \u00F4 trailing c\u1EE7a mat-chip-row ([matChipRemove]). -->\n @if (!inputControl.disabled && _removable) {\n <sd-icon matChipRemove name=\"close\" [size]=\"_icons.chip\" [ariaLabel]=\"removeLabel(item)\"></sd-icon>\n }\n @if (!inputControl.disabled && !_removable) {\n <sd-icon\n class=\"sd-chip-calendar__lock\"\n name=\"lock\"\n [size]=\"_icons.chip\"\n [matTooltip]=\"'core.form.chip-calendar.locked' | sdTranslate\"></sd-icon>\n }\n </mat-chip-row>\n }\n @if (hiddenCount() > 0) {\n <button\n type=\"button\"\n class=\"sd-chip-calendar__more\"\n [attr.aria-label]=\"'core.form.chip-calendar.more' | sdTranslate: { count: hiddenCount() }\"\n [attr.data-autoid]=\"autoId() ? autoId() + '-more' : null\"\n (click)=\"onMoreClick($event)\">\n +{{ hiddenCount() }}\n </button>\n }\n\n <input\n class=\"sd-chip-input\"\n [formControl]=\"inputControl\"\n [id]=\"inputId\"\n [placeholder]=\"effectivePlaceholder()\"\n [matChipInputFor]=\"chipList\"\n autocomplete=\"off\"\n [errorStateMatcher]=\"matcher\"\n [required]=\"_required\"\n aria-haspopup=\"dialog\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-controls]=\"isOpen() ? panelId : null\"\n (keydown)=\"onInputKeydown($event)\"\n matInput\n [attr.data-autoId]=\"autoId()\"\n [attr.data-disabled]=\"dataDisabled()\"\n [attr.data-empty]=\"dataEmpty()\"\n [attr.data-value]=\"dataValue()\"\n [attr.data-count]=\"dataCount()\"\n [attr.data-required]=\"dataRequired()\"\n [attr.data-error-message]=\"dataErrorMessage()\"\n [attr.aria-invalid]=\"_errorVisible ? 'true' : null\"\n [attr.aria-describedby]=\"_errorMessage ? errorId : null\"\n readonly\n #input />\n </mat-chip-grid>\n\n @if (_hideInlineError && _errorVisible) {\n <sd-icon matSuffix class=\"sd-error-icon\" [matTooltip]=\"_errorMessage\" matTooltipPosition=\"above\" name=\"error\"></sd-icon>\n }\n @if (_hideInlineError && _errorVisible) {\n <span class=\"sd-visually-hidden\" [id]=\"errorId\" matSuffix>{{ _errorMessage }}</span>\n }\n <!-- Suffix (thi\u1EBFt k\u1EBF 2): n\u00FAt b\u1ECF h\u1EBFt (hover-gated nh\u01B0 sd-date, lu\u00F4n hi\u1EC7n khi popup m\u1EDF) r\u1ED3i n\u00FAt l\u1ECBch. \u1EA8n khi disabled. -->\n <!-- why: m\u1ED7i kh\u1ED1i @if m\u1ED9t ph\u1EA7n t\u1EED g\u1ED1c, \u0111\u1EC3 matSuffix \u0111\u01B0\u1EE3c chi\u1EBFu v\u00E0o v\u00F9ng suffix. -->\n @if (!formControl.disabled && clearable() && !_required && hasRemovable()) {\n <button\n type=\"button\"\n matSuffix\n class=\"sd-clear-btn sd-chip-calendar__suffix\"\n [class.sd-hover]=\"!isOpen()\"\n [attr.aria-label]=\"'core.form.chip-calendar.clear' | sdTranslate\"\n [attr.data-autoid]=\"autoId() ? autoId() + '-clear' : null\"\n (click)=\"onClear($event)\">\n <sd-icon name=\"close\" [size]=\"_icons.clear\"></sd-icon>\n </button>\n }\n @if (!formControl.disabled) {\n <button\n type=\"button\"\n matSuffix\n class=\"sd-chip-calendar__open sd-chip-calendar__suffix\"\n [class.sd-chip-calendar__open--active]=\"isOpen()\"\n data-chip-calendar-open\n [attr.aria-label]=\"'core.form.date.open-picker' | sdTranslate\"\n aria-haspopup=\"dialog\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-controls]=\"isOpen() ? panelId : null\"\n [attr.data-autoid]=\"autoId() ? autoId() + '-open' : null\"\n (click)=\"onToggleClick($event)\">\n <sd-icon name=\"calendar_month\" [size]=\"_icons.open\"></sd-icon>\n </button>\n }\n\n @if (_showInlineError) {\n <mat-error [id]=\"errorId\">{{ _errorMessage }}</mat-error>\n }\n </mat-form-field>\n\n <!-- Popup (thi\u1EBFt k\u1EBF 3): CDK overlay role=\"dialog\" treo d\u01B0\u1EDBi khung \u00F4. Ch\u1ECDn ng\u00E0y kh\u00F4ng \u0111\u00F3ng; \u0111\u00F3ng b\u1EB1ng \u201CXong\u201D, Esc\n ho\u1EB7c b\u1EA5m ra ngo\u00E0i. why: mat-menu c\u0169 \u0111\u00F3ng khi Tab v\u00E0 kh\u00F4ng ph\u1EA3i dialog (A3). Kh\u00F4ng aria-hidden \u1EDF \u0111\u00E2u c\u1EA3:\n l\u01B0\u1EDBi ng\u00E0y, n\u00FAt chuy\u1EC3n th\u00E1ng v\u00E0 \u00F4 \u0111ang ch\u1ECDn \u0111\u1EC1u ph\u1EA3i \u0111\u1ECDc \u0111\u01B0\u1EE3c. -->\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"overlayOrigin()!\"\n [cdkConnectedOverlayOpen]=\"isOpen()\"\n [cdkConnectedOverlayPositions]=\"positions\"\n [cdkConnectedOverlayPush]=\"true\"\n [cdkConnectedOverlayViewportMargin]=\"8\"\n cdkConnectedOverlayPanelClass=\"sd-chip-calendar-pane\"\n (attach)=\"onAttach()\"\n (overlayOutsideClick)=\"onOutsideClick($event)\"\n (overlayKeydown)=\"onOverlayKeydown($event)\">\n @let _days = days();\n @let _maxCount = effectiveMaxCount();\n @let _full = full();\n <div\n class=\"sd-chip-calendar-panel\"\n role=\"dialog\"\n cdkTrapFocus\n [id]=\"panelId\"\n [attr.aria-label]=\"_label || ('core.form.chip-calendar.dialog-label' | sdTranslate)\"\n [attr.data-autoid]=\"autoId() ? autoId() + '-panel' : null\">\n <div class=\"sd-chip-calendar-panel__head\">\n <div class=\"sd-chip-calendar-panel__summary\">\n <span class=\"sd-chip-calendar-panel__count\">{{\n 'core.form.chip-calendar.selected-count' | sdTranslate: { count: _days.length }\n }}</span>\n <span class=\"sd-chip-calendar-panel__limit\">\n {{\n _maxCount > 0\n ? ('core.form.chip-calendar.max-count' | sdTranslate: { max: _maxCount })\n : ('core.form.chip-calendar.no-limit' | sdTranslate)\n }}\n </span>\n </div>\n <!-- why: v\u00F9ng live lu\u00F4n c\u00F3 m\u1EB7t (r\u1ED7ng khi ch\u01B0a \u0111\u1EE7) \u0111\u1EC3 screen reader \u0111\u1ECDc c\u00E2u \u201C\u0111\u00E3 \u0111\u1EE7\u201D ngay khi n\u00F3 xu\u1EA5t hi\u1EC7n. -->\n <p class=\"sd-chip-calendar-panel__full\" aria-live=\"polite\">\n @if (_full) {\n {{ 'core.form.chip-calendar.full' | sdTranslate: { max: _maxCount } }}\n }\n </p>\n </div>\n\n <mat-calendar\n [headerComponent]=\"calendarHeader\"\n [startAt]=\"openAt()\"\n [minDate]=\"resolvedMinDate()\"\n [maxDate]=\"resolvedMaxDate()\"\n [dateFilter]=\"calendarFilter()\"\n [dateClass]=\"calendarDateClass()\"\n (selectedChange)=\"onSelectDate($event)\">\n </mat-calendar>\n\n <div class=\"sd-chip-calendar-panel__footer\">\n @if (clearable()) {\n <sd-button\n data-chip-calendar-clear-all\n type=\"text\"\n color=\"primary\"\n size=\"sm\"\n [disabled]=\"!hasRemovable()\"\n [autoId]=\"autoId() ? autoId() + '-clear-all' : undefined\"\n [title]=\"'core.form.chip-calendar.clear-all' | sdTranslate\"\n (click)=\"onClear()\"></sd-button>\n } @else {\n <span></span>\n }\n <sd-button\n data-chip-calendar-done\n type=\"fill\"\n color=\"primary\"\n size=\"sm\"\n [autoId]=\"autoId() ? autoId() + '-done' : undefined\"\n [title]=\"'core.form.chip-calendar.done' | sdTranslate\"\n (click)=\"close(true)\"></sd-button>\n </div>\n </div>\n </ng-template>\n }\n </div>\n}\n", styles: [":host{display:block}:host(.sd-has-label){padding-top:4px}:host(.sd-label-top){padding-top:0}:host(.sd-viewed){padding-top:0}.sd-view:not(.c-focused):not(.c-disabled):hover{background-color:var(--sd-chip-calendar-bg)}mat-form-field{width:100%}.sd-chip-calendar__view-trigger{display:flex;align-items:center;width:100%;cursor:pointer}.sd-chip-calendar__view-trigger:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:2px}.sd-chip-calendar-panel{display:flex;flex-direction:column;gap:4px;box-sizing:border-box;width:var(--sd-chip-calendar-panel-width, 296px);padding:12px 8px 8px;border:1px solid color-mix(in srgb,var(--sd-border) 60%,var(--sd-surface));border-radius:var(--sd-panel-radius, 10px);background-color:var(--sd-select-panel-bg, var(--sd-surface));box-shadow:var(--sd-shadow-md, none);color:var(--sd-text);animation:sd-chip-calendar-panel-in var(--sd-duration-fast, .12s) var(--sd-ease-standard, ease-out);--mat-datepicker-calendar-date-text-color: var(--sd-text);--mat-datepicker-calendar-date-hover-state-background-color: color-mix(in srgb, var(--sd-text) 5%, transparent);--mat-datepicker-calendar-date-focus-state-background-color: transparent;--mat-datepicker-calendar-date-today-outline-color: var(--sd-primary);--mat-datepicker-calendar-date-disabled-state-text-color: var(--sd-disabled-text);--mat-datepicker-calendar-date-today-disabled-state-outline-color: transparent;--mat-datepicker-calendar-header-text-color: var(--sd-text-secondary);--mat-datepicker-calendar-header-text-size: var(--sd-font-size-11, 11px);--mat-datepicker-calendar-header-text-weight: var(--sd-font-weight-medium, 500);--mat-datepicker-calendar-header-divider-color: transparent;--mat-datepicker-calendar-text-size: var(--sd-font-size-13, 13px)}@keyframes sd-chip-calendar-panel-in{0%{opacity:0;transform:scale(.98)}to{opacity:1;transform:none}}@media(prefers-reduced-motion:reduce){.sd-chip-calendar-panel{animation:none}}.sd-chip-calendar-panel__head{padding:0 8px}.sd-chip-calendar-panel__summary{display:flex;align-items:baseline;justify-content:space-between;gap:8px}.sd-chip-calendar-panel__count{font-size:var(--sd-font-size-13, 13px);font-weight:var(--sd-font-weight-semibold, 600)}.sd-chip-calendar-panel__limit{font-size:var(--sd-font-size-12, 12px);color:var(--sd-text-secondary)}.sd-chip-calendar-panel__full{margin:0;font-size:var(--sd-font-size-12, 12px);line-height:16px;color:var(--sd-warning-dark)}.sd-chip-calendar-panel__full:empty{display:none}.sd-chip-calendar-panel__footer{display:flex;align-items:center;justify-content:space-between;margin-top:4px;padding:8px 4px 0;border-top:1px solid var(--sd-select-panel-divider, var(--sd-border))}.sd-chip-calendar-panel ::ng-deep .mat-calendar-content{padding:0}.sd-chip-calendar-panel ::ng-deep .mat-calendar-table-header th{padding:0;line-height:24px}.sd-chip-calendar-panel ::ng-deep .mat-calendar-body-label{visibility:hidden}.sd-chip-calendar-panel ::ng-deep .mat-calendar-body-cell-content{font-variant-numeric:tabular-nums}.sd-chip-calendar-panel ::ng-deep .mat-calendar-body-cell.sd-chip-calendar-selected{--mat-datepicker-calendar-date-hover-state-background-color: var(--sd-primary-600, var(--sd-primary-dark));--mat-datepicker-calendar-date-focus-state-background-color: var(--sd-primary);--mat-datepicker-calendar-date-today-outline-color: transparent}.sd-chip-calendar-panel ::ng-deep .mat-calendar-body-cell.sd-chip-calendar-selected>.mat-calendar-body-cell-content{background-color:var(--sd-primary);color:var(--sd-primary-contrast);font-weight:var(--sd-font-weight-semibold, 600)}.sd-chip-calendar-panel ::ng-deep .mat-calendar-body-cell.sd-chip-calendar-locked{--mat-datepicker-calendar-date-disabled-state-text-color: var(--sd-primary-dark);--mat-datepicker-calendar-date-hover-state-background-color: var(--sd-primary-light);--mat-datepicker-calendar-date-focus-state-background-color: var(--sd-primary-light)}.sd-chip-calendar-panel ::ng-deep .mat-calendar-body-cell.sd-chip-calendar-locked>.mat-calendar-body-cell-content{background-color:var(--sd-primary-light);color:var(--sd-primary-dark)}.sd-chip-calendar-panel ::ng-deep .mat-calendar-body-cell:focus-visible>.mat-calendar-body-cell-content{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color);outline-offset:1px}@media(forced-colors:active){.sd-chip-calendar-panel ::ng-deep .mat-calendar-body-cell.sd-chip-calendar-selected>.mat-calendar-body-cell-content{forced-color-adjust:none;background-color:Highlight;color:HighlightText}.sd-chip-calendar-panel ::ng-deep .mat-calendar-body-cell.sd-chip-calendar-locked>.mat-calendar-body-cell-content{forced-color-adjust:auto;border:1px solid GrayText;background-color:Canvas;color:GrayText}}.sd-chip-calendar__open{display:inline-flex;align-items:center;justify-content:center;width:var(--sd-chip-row-suffix-size);height:var(--sd-chip-row-suffix-size);padding:0;border:0;border-radius:var(--sd-radius-6, 6px);background:transparent;color:var(--sd-text-secondary);cursor:pointer}.sd-chip-calendar__open:hover{background-color:color-mix(in srgb,var(--sd-text) 5%,transparent)}.sd-chip-calendar__open:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color);outline-offset:1px}.sd-chip-calendar__open--active{color:var(--sd-primary)}@media(prefers-reduced-motion:no-preference){.sd-chip-calendar__open{transition:background-color var(--sd-duration-fast, .12s) ease}}\n"] }]
|
|
747
|
+
}], ctorParameters: () => [], propDecorators: { calendar: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatCalendar), { isSignal: true }] }], field: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatFormField), { isSignal: true }] }], autoIdInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoId", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], labelPlacement: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelPlacement", required: false }] }], floatLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "floatLabel", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], form: [{ type: i0.Input, args: [{ isSignal: true, alias: "form", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], removable: [{ type: i0.Input, args: [{ isSignal: true, alias: "removable", required: false }] }], hideInlineError: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideInlineError", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], minCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "minCount", required: false }] }], maxCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxCount", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], minDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "minDate", required: false }] }], maxDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDate", required: false }] }], dateFilter: [{ type: i0.Input, args: [{ isSignal: true, alias: "dateFilter", required: false }] }], startAt: [{ type: i0.Input, args: [{ isSignal: true, alias: "startAt", required: false }] }], clearable: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearable", required: false }] }], maxVisible: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxVisible", required: false }] }], displayFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayFormat", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], viewed: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewed", required: false }] }], transform: [{ type: i0.Input, args: [{ isSignal: true, alias: "transform", required: false }] }], hyperlink: [{ type: i0.Input, args: [{ isSignal: true, alias: "hyperlink", required: false }] }], model: [{ type: i0.Input, args: [{ isSignal: true, alias: "model", required: false }] }, { type: i0.Output, args: ["modelChange"] }], sdChange: [{ type: i0.Output, args: ["sdChange"] }], input: [{ type: i0.ViewChild, args: ['input', { isSignal: true }] }], sdViewDef: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SdViewDefDirective), { isSignal: true }] }], sdLabelDef: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SdLabelDefDirective), { isSignal: true }] }], sdLabelTemplate: [{ type: i0.ContentChild, args: ['sdLabel', { isSignal: true }] }], sdValueTemplate: [{ type: i0.ContentChild, args: ['sdValue', { isSignal: true }] }] } });
|
|
391
748
|
|
|
392
749
|
/**
|
|
393
750
|
* Generated bundle index. Do not edit.
|