@sdcorejs/angular 19.3.1 → 19.3.2
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 +237 -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 +156 -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 +93 -31
- 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/components/avatar/index.d.ts +1 -0
- package/components/avatar/src/avatar-group.component.d.ts +43 -0
- package/components/avatar/src/avatar.component.d.ts +23 -1
- package/components/badge/index.d.ts +2 -0
- package/components/badge/src/badge-picker.component.d.ts +148 -0
- package/components/badge/src/badge-picker.constants.d.ts +18 -0
- package/components/badge/src/badge.component.d.ts +24 -3
- package/components/button/src/button.component.d.ts +20 -1
- package/components/ckeditor-styles/src/ckeditor-styles.component.d.ts +3 -18
- package/components/editor/index.d.ts +1 -0
- package/components/editor/src/editor.component.d.ts +17 -15
- package/components/editor/src/models/editor.model.d.ts +5 -4
- package/components/editor/src/plugins/image-upload/utils/validate.utils.d.ts +5 -2
- package/components/editor/src/upload-manager.d.ts +21 -0
- package/components/editor-engine/index.d.ts +3 -0
- package/components/editor-engine/src/engine/editor-engine.d.ts +68 -0
- package/components/editor-engine/src/engine/editor-engine.models.d.ts +51 -0
- package/components/editor-engine/src/engine/editor-html-boundary.d.ts +6 -0
- package/components/editor-engine/src/engine/editor-schema.d.ts +3 -0
- package/components/editor-engine/src/surface/editor-surface.component.d.ts +50 -0
- package/components/editor-engine/src/toolbar/editor-button.directive.d.ts +17 -0
- package/components/editor-engine/src/toolbar/editor-toolbar.component.d.ts +78 -0
- package/components/file-explorer/src/components/actions.component.d.ts +1 -0
- package/components/file-explorer/src/file-explorer.model.d.ts +4 -2
- package/components/file-explorer/src/file-explorer.utils.d.ts +6 -2
- package/components/form-generic/src/components/elements/button-element.component.d.ts +16 -0
- package/components/form-generic/src/components/elements/index.d.ts +2 -0
- package/components/form-generic/src/components/elements/static-element.component.d.ts +26 -0
- package/components/form-generic/src/components/form-builder/canvas/field-preview.component.d.ts +10 -0
- package/components/form-generic/src/components/form-builder/form-builder.component.d.ts +9 -4
- package/components/form-generic/src/components/form-builder/inspector/inspector.component.d.ts +46 -0
- package/components/form-generic/src/components/form-builder/state/builder-document.d.ts +9 -1
- package/components/form-generic/src/components/form-builder/state/builder-palette.d.ts +2 -2
- package/components/form-generic/src/components/form-builder/state/builder-store.d.ts +13 -1
- package/components/form-generic/src/components/form-render/components/item/components/index.d.ts +2 -0
- package/components/form-generic/src/components/form-render/components/item/components/json/json.component.d.ts +26 -0
- package/components/form-generic/src/components/form-render/components/item/components/time/time.component.d.ts +17 -0
- package/components/form-generic/src/components/form-render/form-render.component.d.ts +64 -6
- package/components/form-generic/src/models/form-generic-element.model.d.ts +128 -0
- package/components/form-generic/src/models/form-generic-field.model.d.ts +5 -1
- package/components/form-generic/src/models/form-generic-schema.d.ts +9 -1
- package/components/form-generic/src/models/form-generic-schema.model.d.ts +7 -3
- package/components/form-generic/src/models/index.d.ts +1 -0
- package/components/form-generic/src/rules/form-generic-button.d.ts +21 -0
- package/components/form-generic/src/rules/form-generic-display.d.ts +2 -0
- package/components/form-generic/src/rules/form-generic-filter.d.ts +21 -3
- package/components/form-generic/src/rules/form-generic-url.d.ts +10 -0
- package/components/form-generic/src/rules/form-generic-validation.d.ts +13 -0
- package/components/history/pipes/view-date.pipe.d.ts +1 -0
- package/components/import-excel/src/pipes/column-transform.pipe.d.ts +1 -0
- package/components/index.d.ts +1 -0
- package/components/mini-editor/index.d.ts +1 -0
- package/components/mini-editor/src/mini-editor.component.d.ts +25 -62
- package/components/mini-editor/src/mini-editor.model.d.ts +9 -9
- package/components/modal-resizable/src/modal-resizable.component.d.ts +3 -121
- package/components/operator/index.d.ts +2 -0
- package/components/operator/src/operator-chip.component.d.ts +72 -0
- package/components/operator/src/operator-items.d.ts +49 -0
- package/components/operator/src/operator.component.d.ts +18 -11
- package/components/tab-router/src/components/tab-router-item/tab-router-item.component.d.ts +5 -0
- package/components/tab-router/src/components/tab-router-list-item/tab-router-list-item.component.d.ts +17 -0
- package/components/tab-router/src/components/tab-router-nav/tab-router-nav.component.d.ts +21 -8
- package/components/table/src/components/filter/column-filter/column-filter.component.d.ts +7 -0
- package/components/table/src/components/unknown-total-paginator/unknown-total-paginator.component.d.ts +52 -0
- package/components/table/src/models/table-option-paginate.model.d.ts +14 -0
- package/components/table/src/models/table-option.model.d.ts +25 -5
- package/components/table/src/services/table-aggregate.util.d.ts +6 -1
- package/components/table/src/services/table-export/table-export.service.d.ts +4 -3
- package/components/table/src/services/table-filter/table-filter-operator.util.d.ts +16 -0
- package/components/table/src/services/table-filter/table-filter.model.d.ts +7 -0
- package/components/table/src/services/table-local/table-local-sort.util.d.ts +8 -2
- package/components/table/src/services/table-local/table-local.util.d.ts +7 -2
- package/components/table/src/services/table-paging/unknown-total.util.d.ts +28 -0
- package/components/table/src/table.component.d.ts +16 -0
- package/components/window/index.d.ts +1 -0
- package/components/window/src/window.component.d.ts +77 -0
- package/components/{modal-resizable/src/modal-resizable.registry.d.ts → window/src/window.registry.d.ts} +7 -4
- package/configurations/src/sd-core.configuration.d.ts +7 -0
- 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 +141 -10
- package/fesm2022/sdcorejs-angular-components-avatar.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-badge.mjs +546 -22
- package/fesm2022/sdcorejs-angular-components-badge.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-button.mjs +32 -2
- 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 +1872 -0
- package/fesm2022/sdcorejs-angular-components-editor-engine.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-components-editor.mjs +456 -755
- package/fesm2022/sdcorejs-angular-components-editor.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-file-explorer.mjs +68 -37
- package/fesm2022/sdcorejs-angular-components-file-explorer.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-form-generic.mjs +2116 -1157
- 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 +175 -281
- package/fesm2022/sdcorejs-angular-components-mini-editor.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-modal-resizable.mjs +1 -308
- 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 +261 -42
- 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 +2 -2
- 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-tab-router.mjs +191 -41
- package/fesm2022/sdcorejs-angular-components-tab-router.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-table.mjs +564 -110
- 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 +1 -1
- 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 +486 -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 +15 -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 +459 -124
- package/fesm2022/sdcorejs-angular-forms-chip-calendar.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-date-range.mjs +74 -12
- package/fesm2022/sdcorejs-angular-forms-date-range.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-date.mjs +70 -17
- package/fesm2022/sdcorejs-angular-forms-date.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-datetime.mjs +75 -16
- package/fesm2022/sdcorejs-angular-forms-datetime.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-directives.mjs +82 -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 +39 -4
- package/fesm2022/sdcorejs-angular-forms-input-number.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-input.mjs +49 -6
- 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 +62 -14
- 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 +2 -2
- 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 +1535 -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-BFxO3eHX.mjs +478 -0
- package/fesm2022/sdcorejs-angular-modules-generic-generic-configuration.page-BFxO3eHX.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-generic-generic-form-host.page-Csy2fShj.mjs +214 -0
- package/fesm2022/sdcorejs-angular-modules-generic-generic-form-host.page-Csy2fShj.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-generic-generic-list.page-BIIxNR6k.mjs +277 -0
- package/fesm2022/sdcorejs-angular-modules-generic-generic-list.page-BIIxNR6k.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-generic-sdcorejs-angular-modules-generic-DjDsau9C.mjs +1556 -0
- package/fesm2022/sdcorejs-angular-modules-generic-sdcorejs-angular-modules-generic-DjDsau9C.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 +1822 -59
- package/fesm2022/sdcorejs-angular-modules-layout.mjs.map +1 -1
- 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.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/forms/autocomplete/src/autocomplete.component.d.ts +5 -0
- package/forms/chip-calendar/src/chip-calendar-header.component.d.ts +17 -0
- package/forms/chip-calendar/src/chip-calendar.component.d.ts +147 -19
- package/forms/date/src/date.component.d.ts +23 -2
- package/forms/date-range/src/date-range.component.d.ts +24 -2
- package/forms/datetime/src/datetime-time-zone.adapter.d.ts +15 -0
- package/forms/directives/index.d.ts +1 -0
- package/forms/directives/src/search-field.component.d.ts +45 -0
- package/forms/input/src/input.component.d.ts +23 -2
- package/forms/input-number/src/input-number.component.d.ts +23 -2
- package/forms/models/index.d.ts +1 -0
- package/forms/models/src/sd-calendar-day.d.ts +22 -0
- package/forms/models/src/sd-model-facing-control.d.ts +3 -1
- package/forms/models/src/sd-strict-date-adapter.d.ts +3 -0
- package/forms/models/src/sd-temporal-transform.d.ts +7 -0
- package/forms/select/src/select.component.d.ts +33 -4
- package/i18n/src/en.d.ts +302 -2
- package/modules/generic/index.d.ts +4 -0
- package/modules/generic/src/components/configuration-form/generic-configuration-form.component.d.ts +33 -0
- package/modules/generic/src/components/configuration-general/generic-configuration-general.component.d.ts +28 -0
- package/modules/generic/src/components/configuration-import/generic-configuration-import.component.d.ts +27 -0
- package/modules/generic/src/components/configuration-list/generic-configuration-list.component.d.ts +39 -0
- package/modules/generic/src/components/import-dialog/generic-import-dialog.component.d.ts +15 -0
- package/modules/generic/src/components/property-identity/generic-property-identity.component.d.ts +15 -0
- package/modules/generic/src/core/generic-columns.d.ts +19 -0
- package/modules/generic/src/core/generic-defaults.d.ts +14 -0
- package/modules/generic/src/core/generic-form.d.ts +17 -0
- package/modules/generic/src/core/generic-import.d.ts +49 -0
- package/modules/generic/src/core/generic-merge.d.ts +21 -0
- package/modules/generic/src/core/generic-permission.d.ts +3 -0
- package/modules/generic/src/core/generic-property-icon.d.ts +8 -0
- package/modules/generic/src/core/generic-search.d.ts +19 -0
- package/modules/generic/src/core/generic-title.d.ts +11 -0
- package/modules/generic/src/core/generic-validate.d.ts +8 -0
- package/modules/generic/src/core/index.d.ts +10 -0
- package/modules/generic/src/models/generic-adapter.model.d.ts +49 -0
- package/modules/generic/src/models/generic-entity.model.d.ts +71 -0
- package/modules/generic/src/models/generic-issue.model.d.ts +29 -0
- package/modules/generic/src/models/generic-schema.model.d.ts +133 -0
- package/modules/generic/src/models/index.d.ts +4 -0
- package/modules/generic/src/pages/configuration/generic-configuration.page.d.ts +26 -0
- package/modules/generic/src/pages/form/generic-form-host.page.d.ts +42 -0
- package/modules/generic/src/pages/list/generic-list.page.d.ts +39 -0
- package/modules/generic/src/registry/generic-registry.d.ts +35 -0
- package/modules/generic/src/registry/index.d.ts +2 -0
- package/modules/generic/src/registry/provide-sd-generic.d.ts +15 -0
- package/modules/generic/src/routes/generic-route.guards.d.ts +24 -0
- package/modules/generic/src/routes/sd-generic.routes.d.ts +10 -0
- package/modules/generic/src/services/generic-configuration-store.d.ts +13 -0
- package/modules/generic/src/services/generic-data.service.d.ts +34 -0
- package/modules/generic/src/services/generic-import.service.d.ts +21 -0
- package/modules/generic/src/services/generic-permission.service.d.ts +26 -0
- package/modules/generic/src/services/generic-relation-catalog.d.ts +14 -0
- package/modules/generic/src/services/generic-schema.service.d.ts +28 -0
- package/modules/generic/src/services/index.d.ts +6 -0
- package/modules/icon/src/data-type-icon.d.ts +30 -0
- package/modules/icon/src/icon.model.d.ts +2 -1
- package/modules/icon/src/index.d.ts +1 -0
- package/modules/index.d.ts +1 -0
- package/modules/layout/components/index.d.ts +3 -0
- package/modules/layout/components/layout-main/layout-main.component.d.ts +2 -1
- package/modules/layout/components/shared/context-switcher/context-switcher.component.d.ts +71 -0
- package/modules/layout/components/shared/user-menu/user-menu.component.d.ts +1 -1
- package/modules/layout/components/sidebar-mobile-v4/main.component.d.ts +95 -0
- package/modules/layout/components/sidebar-v1/components/sidebar/sidebar.component.d.ts +1 -0
- package/modules/layout/components/sidebar-v3/main.component.d.ts +3 -0
- package/modules/layout/components/sidebar-v4/main.component.d.ts +69 -0
- package/modules/layout/components/sidebar-v4/menu-tree/sidebar-v4-menu-tree.component.d.ts +174 -0
- package/modules/layout/configurations/layout.configuration.d.ts +46 -1
- package/modules/layout/services/context/context.model.d.ts +16 -0
- package/modules/layout/services/context/context.runtime.d.ts +14 -0
- package/modules/layout/services/context/context.service.d.ts +54 -0
- package/modules/layout/services/context/index.d.ts +3 -0
- package/modules/layout/services/index.d.ts +1 -0
- package/modules/layout/services/menu/menu.model.d.ts +33 -0
- package/modules/layout/services/menu/menu.utils.d.ts +32 -1
- package/modules/layout/services/storage/storage.service.d.ts +20 -1
- package/package.json +45 -12
- package/pipes/src/format-date.pipe.d.ts +1 -0
- package/pipes/src/format-datetime.pipe.d.ts +1 -0
- package/services/date-time/index.d.ts +1 -0
- package/services/date-time/src/date-time.service.d.ts +54 -0
- package/services/index.d.ts +1 -0
- package/services/storage/src/storage.model.d.ts +8 -1
- package/utilities/read-state/src/read-state.d.ts +2 -0
- package/utilities/theme/src/theme-tokens.d.ts +1 -1
- package/components/editor/src/plugins/image-upload/image-upload.plugin.d.ts +0 -22
- package/components/editor/src/plugins/image-upload/utils/batch.utils.d.ts +0 -14
- package/components/editor/src/plugins/image-upload/utils/index.d.ts +0 -3
- package/forms/chip-calendar/src/pipes/index.d.ts +0 -1
- package/forms/chip-calendar/src/pipes/removable-chip.pipe.d.ts +0 -8
|
@@ -1,76 +1,126 @@
|
|
|
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: "19.2.21", ngImport: i0, type:
|
|
41
|
-
static
|
|
51
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: ɵSdChipCalendarHeader, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
52
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.21", 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: "19.2.21", ngImport: i0, type:
|
|
44
|
-
type:
|
|
45
|
-
args: [{
|
|
46
|
-
|
|
47
|
-
}]
|
|
48
|
-
}], ctorParameters: () => [] });
|
|
54
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", 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);
|
|
73
102
|
calendar = viewChild(MatCalendar);
|
|
103
|
+
// why: query signal không đặt được trên field ES private (#).
|
|
104
|
+
field = viewChild(MatFormField);
|
|
105
|
+
/** Header of the popup calendar (handoff 3 · 2). */
|
|
106
|
+
calendarHeader = ɵSdChipCalendarHeader;
|
|
107
|
+
panelId = `sd-chip-calendar-panel-${Utilities.generateUuid()}`;
|
|
108
|
+
/** Whether the popup is open. */
|
|
109
|
+
isOpen = signal(false);
|
|
110
|
+
/** Month the popup opened at (4.2), fixed for one opening. */
|
|
111
|
+
openAt = signal(null);
|
|
112
|
+
/**
|
|
113
|
+
* The popup hangs from the field box (the outline), like the select panel. Read in `open()`: `_textField` of
|
|
114
|
+
* `MatFormField` is a view query, and read too early the origin falls back to the whole field with its subscript row.
|
|
115
|
+
*/
|
|
116
|
+
overlayOrigin = signal(undefined);
|
|
117
|
+
// 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ỗ.
|
|
118
|
+
positions = [
|
|
119
|
+
{ originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top', offsetY: 6 },
|
|
120
|
+
{ originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom', offsetY: -6 },
|
|
121
|
+
{ originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top', offsetY: 6 },
|
|
122
|
+
{ originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom', offsetY: -6 },
|
|
123
|
+
];
|
|
74
124
|
autoIdInput = input(undefined, {
|
|
75
125
|
alias: 'autoId',
|
|
76
126
|
transform: (v) => v ?? undefined,
|
|
@@ -134,20 +184,60 @@ class SdChipCalendar {
|
|
|
134
184
|
placeholder = input(undefined, {
|
|
135
185
|
transform: (v) => v ?? undefined,
|
|
136
186
|
});
|
|
187
|
+
/**
|
|
188
|
+
* `true` / `false` for every chip, or a predicate. The predicate receives the normalised `yyyy/MM/dd` day and is
|
|
189
|
+
* applied on every removal path: the ✕ button, Backspace / Delete on a chip, pressing the day again in the
|
|
190
|
+
* calendar and clearing.
|
|
191
|
+
*/
|
|
137
192
|
removable = input(true, {
|
|
138
193
|
transform: (v) => v ?? true,
|
|
139
194
|
});
|
|
140
195
|
hideInlineError = input(false, { transform: booleanAttribute });
|
|
141
196
|
required = input(false, { transform: booleanAttribute });
|
|
197
|
+
/** Fewest days to pick; > 0 adds `Validators.minLength`. Replaces `min`. */
|
|
198
|
+
minCount = input(undefined, {
|
|
199
|
+
transform: (v) => v ?? undefined,
|
|
200
|
+
});
|
|
201
|
+
/** Most days to pick; > 0 adds `Validators.maxLength` and blocks picking more in the calendar (4.3). Replaces `max`. */
|
|
202
|
+
maxCount = input(undefined, {
|
|
203
|
+
transform: (v) => v ?? undefined,
|
|
204
|
+
});
|
|
205
|
+
/** @deprecated Use `minCount`; `minCount` wins when both are set. */
|
|
142
206
|
min = input(0, {
|
|
143
207
|
transform: (v) => v ?? 0,
|
|
144
208
|
});
|
|
209
|
+
/** @deprecated Use `maxCount`; `maxCount` wins when both are set. */
|
|
145
210
|
max = input(0, {
|
|
146
211
|
transform: (v) => v ?? 0,
|
|
147
212
|
});
|
|
213
|
+
/** Earliest day that can be picked; same reading as `minDate` of `<sd-date>` (`'TODAY'` = today in the zone). */
|
|
214
|
+
minDate = input(null);
|
|
215
|
+
/** Latest day that can be picked; same reading as `maxDate` of `<sd-date>`. */
|
|
216
|
+
maxDate = input(null);
|
|
217
|
+
/** `false` makes a day unpickable. A chosen day stays removable even when the filter refuses it. Name of `mat-calendar`. */
|
|
218
|
+
dateFilter = input(null);
|
|
219
|
+
/** Month the popup opens at; without it, the chosen day nearest to today, else today (4.2). */
|
|
220
|
+
startAt = input(null);
|
|
221
|
+
/** Shows “Xoá hết” in the popup (and the clear button of the field). Off by default, like `clearable` of `<sd-date>`. */
|
|
222
|
+
clearable = input(false, { transform: booleanAttribute });
|
|
223
|
+
/**
|
|
224
|
+
* Chips shown while the popup is closed; the rest fold into a “+N” button that opens it. `null` shows them all.
|
|
225
|
+
* `2` is the suggestion inside `<sd-table>` filters.
|
|
226
|
+
*/
|
|
227
|
+
maxVisible = input(null);
|
|
228
|
+
/** Date format of the chips and of the viewed text, in Angular `DatePipe` syntax. */
|
|
229
|
+
displayFormat = input('dd/MM/yyyy', {
|
|
230
|
+
transform: (v) => v || 'dd/MM/yyyy',
|
|
231
|
+
});
|
|
148
232
|
disabled = input(false, { transform: booleanAttribute });
|
|
149
233
|
/** Display mode: `false` edit · `true` static view · `'inline'` interactive (disabled `'inline'` → static). */
|
|
150
234
|
viewed = input(false, { transform: sdViewedTransform });
|
|
235
|
+
/**
|
|
236
|
+
* String form of each day when the value leaves the component, same contract as `<sd-date>`: `undefined` →
|
|
237
|
+
* `yyyy/MM/dd`, `'ISOString'` / `'UTCString'` → the start of the day (in `ISdCoreConfiguration.timeZone` when
|
|
238
|
+
* configured). Display is not affected.
|
|
239
|
+
*/
|
|
240
|
+
transform = input();
|
|
151
241
|
// why: tri-state viewed — `'inline'` keeps it interactive; disabled `'inline'` falls back to static.
|
|
152
242
|
#viewedState = sdViewedInline(this.viewed, undefined, this.disabled);
|
|
153
243
|
/** `true` when the static view should render (`viewed===true`, or disabled `'inline'`). */
|
|
@@ -155,7 +245,10 @@ class SdChipCalendar {
|
|
|
155
245
|
hyperlink = input(undefined, {
|
|
156
246
|
transform: (v) => v ?? undefined,
|
|
157
247
|
});
|
|
158
|
-
|
|
248
|
+
/**
|
|
249
|
+
* Two-way model. Read wide (each item `string | number | Date`, like `<sd-date>`), written back only on a user
|
|
250
|
+
* action, as `string[]`. A model from the parent is never rewritten.
|
|
251
|
+
*/
|
|
159
252
|
model = model(undefined);
|
|
160
253
|
// Outputs (modelChange auto-generated by model() signal)
|
|
161
254
|
sdChange = output();
|
|
@@ -166,46 +259,135 @@ class SdChipCalendar {
|
|
|
166
259
|
sdValueTemplate = contentChild('sdValue');
|
|
167
260
|
isFocused = false;
|
|
168
261
|
#inputControl = new FormControl();
|
|
262
|
+
/** Holds the normalised days (`yyyy/MM/dd`, no duplicates, model order); the parent form gets this control
|
|
263
|
+
* unless a `transform` is set. */
|
|
169
264
|
#formControl = new SdFormControl();
|
|
170
265
|
// why: `min`/`max` là validator do CHÍNH component sở hữu; `required` đi qua option riêng của
|
|
171
266
|
// connector. Connector chỉ add/remove đúng phần này nên validator do consumer tự gắn vào
|
|
172
267
|
// `formControl` public không bị xoá — trước đây `clearValidators()` + `setValidators()` xoá sạch.
|
|
268
|
+
/** `minCount`, else the deprecated `min`. */
|
|
269
|
+
effectiveMinCount = computed(() => this.minCount() ?? this.min() ?? 0);
|
|
270
|
+
/** `maxCount`, else the deprecated `max`. */
|
|
271
|
+
effectiveMaxCount = computed(() => this.maxCount() ?? this.max() ?? 0);
|
|
173
272
|
#validators = computed(() => {
|
|
174
273
|
const validators = [];
|
|
175
|
-
const min = this.
|
|
176
|
-
const max = this.
|
|
274
|
+
const min = this.effectiveMinCount();
|
|
275
|
+
const max = this.effectiveMaxCount();
|
|
177
276
|
if (min > 0)
|
|
178
277
|
validators.push(Validators.minLength(min));
|
|
179
278
|
if (max > 0)
|
|
180
279
|
validators.push(Validators.maxLength(max));
|
|
181
280
|
return validators;
|
|
182
281
|
});
|
|
282
|
+
/**
|
|
283
|
+
* why: with a `transform` the model holds ISO / RFC-1123 strings while the control keeps `yyyy/MM/dd`. Like
|
|
284
|
+
* `<sd-date>`, the parent form then gets a control that carries the model, so `form.value` equals `modelChange`.
|
|
285
|
+
*/
|
|
286
|
+
#modelFacing = _sdModelFacingControl({
|
|
287
|
+
active: computed(() => !!this.transform()),
|
|
288
|
+
model: this.model,
|
|
289
|
+
writeModel: value => this.#writeModel(value),
|
|
290
|
+
source: computed(() => this.#formControl),
|
|
291
|
+
modelEquals: (left, right) => this.#modelsEqual(left, right),
|
|
292
|
+
});
|
|
183
293
|
#formConnector = _sdFormControlConnector({
|
|
184
294
|
form: this.form,
|
|
185
295
|
name: computed(() => this.name() || this.#name),
|
|
186
296
|
control: computed(() => this.#formControl),
|
|
297
|
+
registeredControl: this.#modelFacing.registered,
|
|
298
|
+
model: this.model,
|
|
299
|
+
writeModel: value => this.#writeModel(value),
|
|
300
|
+
modelToControl: value => this.#days(value),
|
|
301
|
+
controlToModel: days => this.#serializeDays(days),
|
|
302
|
+
modelEquals: (left, right) => this.#modelsEqual(left, right),
|
|
303
|
+
controlEquals: sameDays,
|
|
187
304
|
validators: this.#validators,
|
|
188
305
|
required: this.required,
|
|
189
306
|
});
|
|
190
307
|
#matcher;
|
|
191
|
-
|
|
308
|
+
#fullDate = computed(() => new Intl.DateTimeFormat(this.#i18n.locale(), FULL_DATE));
|
|
309
|
+
/** Chosen days, normalised (`yyyy/MM/dd`, model order). */
|
|
310
|
+
days = computed(() => this.#days(this.model()) ?? []);
|
|
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
|
+
});
|
|
316
|
+
/** At least one chosen day may be removed (enables “Xoá hết”). */
|
|
317
|
+
hasRemovable = computed(() => {
|
|
318
|
+
void this.removable();
|
|
319
|
+
return this.days().some(day => this.isRemovable(day));
|
|
320
|
+
});
|
|
321
|
+
/** Chosen days by date (B2). Display only: the model keeps its order. `yyyy/MM/dd` sorts as text in date order. */
|
|
322
|
+
sortedDays = computed(() => [...this.days()].sort());
|
|
323
|
+
/** Chips on screen: all while the popup is open, else at most `maxVisible` (B3). */
|
|
324
|
+
visibleDays = computed(() => {
|
|
325
|
+
const days = this.sortedDays();
|
|
326
|
+
const max = this.maxVisible();
|
|
327
|
+
if (this.isOpen() || max === null || max === undefined || max < 0 || days.length <= max)
|
|
328
|
+
return days;
|
|
329
|
+
return days.slice(0, max);
|
|
330
|
+
});
|
|
331
|
+
/** Icon sizes of the chips and suffix buttons for the current size. */
|
|
332
|
+
iconSizes = computed(() => FIELD_ICONS[this.size() === 'sm' || this.size() === 'lg' ? this.size() : 'md']);
|
|
333
|
+
/** Days folded into “+N”. */
|
|
334
|
+
hiddenCount = computed(() => this.sortedDays().length - this.visibleDays().length);
|
|
335
|
+
/** Viewed text: days by date in `displayFormat`, joined by “, ” (C3). */
|
|
336
|
+
viewText = computed(() => this.sortedDays()
|
|
337
|
+
.map(day => this.formatDay(day))
|
|
338
|
+
.join(', '));
|
|
339
|
+
/** Placeholder while no day is chosen: the input, else “Chọn ngày” — no longer the label (B1). Empty once there are chips. */
|
|
340
|
+
effectivePlaceholder = computed(() => this.days().length ? '' : this.placeholder() || this.#i18n.t('core.form.chip-calendar.placeholder'));
|
|
341
|
+
resolvedMinDate = computed(() => this.#toDate(this.minDate()));
|
|
342
|
+
resolvedMaxDate = computed(() => this.#toDate(this.maxDate()));
|
|
343
|
+
/**
|
|
344
|
+
* `dateFilter` handed to `mat-calendar` (4.1): a chosen day is pickable exactly when it may be removed (even against the
|
|
345
|
+
* consumer filter), an unchosen one when the limit is not reached and the consumer filter allows it. A new function on
|
|
346
|
+
* every change makes `mat-calendar` render its cells again.
|
|
347
|
+
*/
|
|
348
|
+
calendarFilter = computed(() => {
|
|
349
|
+
const chosen = new Set(this.days());
|
|
350
|
+
const full = this.full();
|
|
351
|
+
const consumer = this.dateFilter();
|
|
352
|
+
void this.removable();
|
|
353
|
+
return (date) => {
|
|
354
|
+
if (!date)
|
|
355
|
+
return false;
|
|
356
|
+
const day = DateUtilities.toFormat(date, 'yyyy/MM/dd');
|
|
357
|
+
if (chosen.has(day))
|
|
358
|
+
return this.isRemovable(day);
|
|
359
|
+
return !full && (!consumer || consumer(date));
|
|
360
|
+
};
|
|
361
|
+
});
|
|
362
|
+
/** Cell classes: `sd-chip-calendar-selected`, plus `sd-chip-calendar-locked` for a chosen day that cannot go. */
|
|
363
|
+
calendarDateClass = computed(() => {
|
|
364
|
+
const chosen = new Set(this.days());
|
|
365
|
+
void this.removable();
|
|
366
|
+
return (date, view = 'month') => {
|
|
367
|
+
if (view !== 'month')
|
|
368
|
+
return '';
|
|
369
|
+
const day = DateUtilities.toFormat(date, 'yyyy/MM/dd');
|
|
370
|
+
if (!chosen.has(day))
|
|
371
|
+
return '';
|
|
372
|
+
return this.isRemovable(day) ? 'sd-chip-calendar-selected' : 'sd-chip-calendar-selected sd-chip-calendar-locked';
|
|
373
|
+
};
|
|
374
|
+
});
|
|
192
375
|
constructor() {
|
|
193
|
-
effect(() => {
|
|
194
|
-
const values = this.model();
|
|
195
|
-
if (Array.isArray(values)) {
|
|
196
|
-
this.#formControl.setValue(values);
|
|
197
|
-
}
|
|
198
|
-
});
|
|
199
376
|
effect(() => {
|
|
200
377
|
const isDisabled = this.disabled();
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
378
|
+
// why: `enable()` / `disable()` phát `valueChanges`; connector sẽ coi đó là thao tác và ghi model (đã
|
|
379
|
+
// transform) ngược lên cha. Chỉ đổi khi trạng thái thật sự khác, và không phát event.
|
|
380
|
+
if (isDisabled !== this.#formControl.disabled) {
|
|
381
|
+
if (isDisabled)
|
|
382
|
+
this.#formControl.disable({ emitEvent: false });
|
|
383
|
+
else
|
|
384
|
+
this.#formControl.enable({ emitEvent: false });
|
|
385
|
+
this.#ref.markForCheck();
|
|
204
386
|
}
|
|
205
|
-
|
|
206
|
-
this.#
|
|
387
|
+
if (isDisabled)
|
|
388
|
+
this.#inputControl.disable();
|
|
389
|
+
else
|
|
207
390
|
this.#inputControl.enable();
|
|
208
|
-
}
|
|
209
391
|
});
|
|
210
392
|
effect(() => {
|
|
211
393
|
const nameVal = this.name();
|
|
@@ -213,7 +395,15 @@ class SdChipCalendar {
|
|
|
213
395
|
this.#name = nameVal;
|
|
214
396
|
}
|
|
215
397
|
});
|
|
216
|
-
|
|
398
|
+
effect(() => {
|
|
399
|
+
if ((this.min() > 0 || this.max() > 0) && !this.#warnedDeprecated && isDevMode()) {
|
|
400
|
+
this.#warnedDeprecated = true;
|
|
401
|
+
console.warn('[sd-chip-calendar] `min` / `max` are deprecated; use `minCount` / `maxCount`.');
|
|
402
|
+
}
|
|
403
|
+
});
|
|
404
|
+
// why: `submitted` của form cha không phải signal; submit phải vẽ lại lỗi dưới OnPush.
|
|
405
|
+
this.#parentForm?.ngSubmit.pipe(takeUntilDestroyed(inject(DestroyRef))).subscribe(() => this.#ref.markForCheck());
|
|
406
|
+
this.#matcher = { isErrorState: (_control, form) => this.#errorGate(form) };
|
|
217
407
|
}
|
|
218
408
|
get formControl() {
|
|
219
409
|
return this.#formControl;
|
|
@@ -230,8 +420,8 @@ class SdChipCalendar {
|
|
|
230
420
|
errorMessage = computed(() => {
|
|
231
421
|
void this.#state();
|
|
232
422
|
void this.required();
|
|
233
|
-
const min = this.
|
|
234
|
-
const max = this.
|
|
423
|
+
const min = this.effectiveMinCount();
|
|
424
|
+
const max = this.effectiveMaxCount();
|
|
235
425
|
const errors = this.#formControl.errors;
|
|
236
426
|
if (!errors)
|
|
237
427
|
return undefined;
|
|
@@ -246,6 +436,97 @@ class SdChipCalendar {
|
|
|
246
436
|
get matcher() {
|
|
247
437
|
return this.#matcher;
|
|
248
438
|
}
|
|
439
|
+
/**
|
|
440
|
+
* The one place that decides whether the error shows (A4): `ErrorStateMatcher`, `<mat-error>`, `aria-invalid` and
|
|
441
|
+
* the `hideInlineError` icon all read it. Invalid and touched, or the parent form was submitted; a selection that
|
|
442
|
+
* is still too short while the user picks (dirty only) shows nothing.
|
|
443
|
+
*/
|
|
444
|
+
isErrorShown() {
|
|
445
|
+
return !!this.errorMessage() && this.#errorGate();
|
|
446
|
+
}
|
|
447
|
+
#errorGate(form) {
|
|
448
|
+
const control = this.#formControl;
|
|
449
|
+
return control.invalid && (control.touched || !!(form ?? this.#parentForm)?.submitted);
|
|
450
|
+
}
|
|
451
|
+
/** Whether `day` (`yyyy/MM/dd`) may be removed, per `removable`. */
|
|
452
|
+
isRemovable(day) {
|
|
453
|
+
const removable = this.removable();
|
|
454
|
+
return typeof removable === 'function' ? !!removable(day) : removable;
|
|
455
|
+
}
|
|
456
|
+
/** Accessible name of a chip: the full date in the current locale, plus the locked note. */
|
|
457
|
+
chipLabel(day) {
|
|
458
|
+
const full = this.#fullDate().format(dayToDate(day));
|
|
459
|
+
return this.isRemovable(day) ? full : `${full}, ${this.#i18n.t('core.form.chip-calendar.locked')}`;
|
|
460
|
+
}
|
|
461
|
+
/** A chip day in `displayFormat` (Angular `DatePipe` / `formatDate` syntax, as the chips used before). */
|
|
462
|
+
formatDay(day) {
|
|
463
|
+
return formatDate(dayToDate(day), this.displayFormat(), this.#locale);
|
|
464
|
+
}
|
|
465
|
+
/** Accessible name of the ✕ button of a chip. */
|
|
466
|
+
removeLabel(day) {
|
|
467
|
+
return this.#i18n.t('core.form.chip-calendar.remove', { date: this.#fullDate().format(dayToDate(day)) });
|
|
468
|
+
}
|
|
469
|
+
/** Opens the popup at the month of 4.2. No-op when disabled, viewed or already open. */
|
|
470
|
+
open() {
|
|
471
|
+
if (this.#formControl.disabled || this.isViewed() || this.isOpen())
|
|
472
|
+
return;
|
|
473
|
+
this.openAt.set(this.#firstMonth());
|
|
474
|
+
this.overlayOrigin.set(this.field()?.getConnectedOverlayOrigin());
|
|
475
|
+
this.isOpen.set(true);
|
|
476
|
+
this.#ref.markForCheck();
|
|
477
|
+
}
|
|
478
|
+
/** Closes the popup and marks the field touched (A4); `returnFocus` puts focus back on the input (Esc, “Xong”). */
|
|
479
|
+
close(returnFocus = false) {
|
|
480
|
+
if (!this.isOpen())
|
|
481
|
+
return;
|
|
482
|
+
this.isOpen.set(false);
|
|
483
|
+
this.isFocused = false;
|
|
484
|
+
this.#formConnector.markAsTouched();
|
|
485
|
+
this.#ref.markForCheck();
|
|
486
|
+
if (returnFocus)
|
|
487
|
+
this.input()?.nativeElement.focus();
|
|
488
|
+
}
|
|
489
|
+
/** Focus goes to the active day of the grid once the panel is attached. */
|
|
490
|
+
onAttach() {
|
|
491
|
+
this.#timers.schedule(() => this.calendar()?.focusActiveCell(), 0);
|
|
492
|
+
}
|
|
493
|
+
onOverlayKeydown(event) {
|
|
494
|
+
if (event.key === 'Escape' || event.key === 'Esc') {
|
|
495
|
+
event.preventDefault();
|
|
496
|
+
this.close(true);
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
/** A click outside closes; a click on the field itself is left to the field (it keeps the popup open). */
|
|
500
|
+
onOutsideClick(event) {
|
|
501
|
+
const target = event.target;
|
|
502
|
+
if (target && this.#host.contains(target))
|
|
503
|
+
return;
|
|
504
|
+
this.close();
|
|
505
|
+
}
|
|
506
|
+
/** Click on the empty part of the field or on the input opens the popup; chips stop the click (3 · 2). */
|
|
507
|
+
onFieldClick() {
|
|
508
|
+
this.open();
|
|
509
|
+
}
|
|
510
|
+
/** Calendar button of the suffix: opens or closes the popup without the field click opening it again. */
|
|
511
|
+
onToggleClick(event) {
|
|
512
|
+
event.stopPropagation();
|
|
513
|
+
if (this.isOpen())
|
|
514
|
+
this.close();
|
|
515
|
+
else
|
|
516
|
+
this.open();
|
|
517
|
+
}
|
|
518
|
+
/** “+N” opens the popup, where every chip shows. */
|
|
519
|
+
onMoreClick(event) {
|
|
520
|
+
event.stopPropagation();
|
|
521
|
+
this.open();
|
|
522
|
+
}
|
|
523
|
+
/** Enter, Space, ArrowDown and Alt+ArrowDown on the input open the popup. */
|
|
524
|
+
onInputKeydown(event) {
|
|
525
|
+
if (event.key === 'Enter' || event.key === ' ' || event.key === 'ArrowDown') {
|
|
526
|
+
event.preventDefault();
|
|
527
|
+
this.open();
|
|
528
|
+
}
|
|
529
|
+
}
|
|
249
530
|
ngAfterViewInit() {
|
|
250
531
|
this.#subscription.add(this.#formControl.sdChanges.subscribe(() => {
|
|
251
532
|
this.#ref.markForCheck();
|
|
@@ -254,6 +535,89 @@ class SdChipCalendar {
|
|
|
254
535
|
ngOnDestroy() {
|
|
255
536
|
this.#subscription.unsubscribe();
|
|
256
537
|
}
|
|
538
|
+
/** Normalised days of a model: one `yyyy/MM/dd` per calendar day, model order, unreadable items skipped. */
|
|
539
|
+
#days(value) {
|
|
540
|
+
if (!Array.isArray(value))
|
|
541
|
+
return null;
|
|
542
|
+
const zone = this.#zoned ? this.#dateTime : null;
|
|
543
|
+
const days = [];
|
|
544
|
+
let unreadable = false;
|
|
545
|
+
for (const item of value) {
|
|
546
|
+
const day = _sdNormalizeCalendarDay(item, zone);
|
|
547
|
+
if (!day) {
|
|
548
|
+
unreadable = true;
|
|
549
|
+
continue;
|
|
550
|
+
}
|
|
551
|
+
if (!days.includes(day))
|
|
552
|
+
days.push(day);
|
|
553
|
+
}
|
|
554
|
+
if (unreadable && !this.#warnedUnreadable && isDevMode()) {
|
|
555
|
+
this.#warnedUnreadable = true;
|
|
556
|
+
console.warn('[sd-chip-calendar] Skipped model items that are not dates:', value);
|
|
557
|
+
}
|
|
558
|
+
return days;
|
|
559
|
+
}
|
|
560
|
+
/** Days → the model written back: `yyyy/MM/dd`, or the start of each day per `transform` (like `<sd-date>`). */
|
|
561
|
+
#serializeDays(days) {
|
|
562
|
+
if (!days)
|
|
563
|
+
return days;
|
|
564
|
+
const transform = this.transform();
|
|
565
|
+
if (!transform)
|
|
566
|
+
return [...days];
|
|
567
|
+
return days.map(day => {
|
|
568
|
+
const startOfDay = sdLocalStartOfDay(dayToDate(day));
|
|
569
|
+
return sdSerializeTemporalValue(this.#zoned ? this.#dateTime.fromWallClock(startOfDay) : startOfDay, transform) ?? day;
|
|
570
|
+
});
|
|
571
|
+
}
|
|
572
|
+
/**
|
|
573
|
+
* 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
|
|
574
|
+
* 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.
|
|
575
|
+
*/
|
|
576
|
+
#modelsEqual(left, right) {
|
|
577
|
+
if (this.transform())
|
|
578
|
+
return sameDays(left, right);
|
|
579
|
+
return sameDays(this.#days(left), this.#days(right));
|
|
580
|
+
}
|
|
581
|
+
#writeModel(value) {
|
|
582
|
+
this.model.set(value);
|
|
583
|
+
this.sdChange.emit(value ? value : []);
|
|
584
|
+
}
|
|
585
|
+
#currentDays() {
|
|
586
|
+
const value = this.#formControl.value;
|
|
587
|
+
return Array.isArray(value) ? value : [];
|
|
588
|
+
}
|
|
589
|
+
/** Today as a local-midnight carrier: in the configured zone, else the machine's. */
|
|
590
|
+
#today() {
|
|
591
|
+
return this.#zoned ? this.#dateTime.today() : sdLocalStartOfDay(new Date());
|
|
592
|
+
}
|
|
593
|
+
/** `minDate` / `maxDate` / `startAt` → local-midnight carrier, read like a model item. */
|
|
594
|
+
#toDate(value) {
|
|
595
|
+
if (value === 'TODAY')
|
|
596
|
+
return this.#today();
|
|
597
|
+
const day = _sdNormalizeCalendarDay(value, this.#zoned ? this.#dateTime : null);
|
|
598
|
+
return day ? dayToDate(day) : null;
|
|
599
|
+
}
|
|
600
|
+
/** 4.2: `startAt`; else the chosen day nearest to today (a later one on a tie); else today. */
|
|
601
|
+
#firstMonth() {
|
|
602
|
+
const start = this.#toDate(this.startAt());
|
|
603
|
+
if (start)
|
|
604
|
+
return start;
|
|
605
|
+
const today = this.#today().getTime();
|
|
606
|
+
let best = null;
|
|
607
|
+
for (const day of this.days()) {
|
|
608
|
+
const date = dayToDate(day);
|
|
609
|
+
const distance = Math.abs(date.getTime() - today);
|
|
610
|
+
const bestDistance = best ? Math.abs(best.getTime() - today) : Infinity;
|
|
611
|
+
if (distance < bestDistance || (distance === bestDistance && best !== null && date > best))
|
|
612
|
+
best = date;
|
|
613
|
+
}
|
|
614
|
+
return best ?? this.#today();
|
|
615
|
+
}
|
|
616
|
+
/** Every user action ends here: a new array of days, written once (the connector writes the model). */
|
|
617
|
+
#commit(next) {
|
|
618
|
+
this.#formControl.setValue(next);
|
|
619
|
+
this.#ref.markForCheck();
|
|
620
|
+
}
|
|
257
621
|
#clickChip = (event, item) => {
|
|
258
622
|
event.stopPropagation();
|
|
259
623
|
event.stopImmediatePropagation();
|
|
@@ -261,41 +625,16 @@ class SdChipCalendar {
|
|
|
261
625
|
this.#focus();
|
|
262
626
|
}
|
|
263
627
|
};
|
|
264
|
-
#remove = (
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
// why: `filter` đã trả mảng mới nên reference đổi →
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
this.model.set(next);
|
|
271
|
-
this.sdChange.emit(next);
|
|
628
|
+
#remove = (day) => {
|
|
629
|
+
if (typeof day === 'string' && this.isRemovable(day)) {
|
|
630
|
+
const days = this.#currentDays();
|
|
631
|
+
// why: `filter` đã trả mảng mới nên reference đổi → model ghi một lần.
|
|
632
|
+
if (days.includes(day))
|
|
633
|
+
this.#commit(days.filter(value => value !== day));
|
|
272
634
|
}
|
|
273
635
|
this.#inputControl.setValue('');
|
|
274
636
|
this.#focus();
|
|
275
637
|
};
|
|
276
|
-
#select = (event) => {
|
|
277
|
-
const item = event.option.value;
|
|
278
|
-
const values = this.#formControl.value ?? [];
|
|
279
|
-
if (item) {
|
|
280
|
-
if (typeof item === 'string' || typeof item === 'number') {
|
|
281
|
-
if (!values.includes(item)) {
|
|
282
|
-
// why: PHẢI tạo mảng MỚI. `values` là chính mảng của consumer (model đi thẳng vào
|
|
283
|
-
// formControl), nên `push` vừa sửa trộm mảng của họ, vừa giữ nguyên reference —
|
|
284
|
-
// `model()` dùng equality Object.is nên `model.set(sameRef)` KHÔNG phát `modelChange`.
|
|
285
|
-
const next = [...values, item];
|
|
286
|
-
this.#formControl.setValue(next);
|
|
287
|
-
this.model.set(next);
|
|
288
|
-
this.sdChange.emit(next);
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
const inputEl = this.input();
|
|
292
|
-
if (inputEl)
|
|
293
|
-
inputEl.nativeElement.value = '';
|
|
294
|
-
this.#inputControl.setValue('', {
|
|
295
|
-
emitEvent: false,
|
|
296
|
-
});
|
|
297
|
-
}
|
|
298
|
-
};
|
|
299
638
|
#onClick = () => {
|
|
300
639
|
if (this.sdViewDef()?.templateRef) {
|
|
301
640
|
if (!this.#formControl.disabled && !this.isFocused) {
|
|
@@ -305,7 +644,6 @@ class SdChipCalendar {
|
|
|
305
644
|
};
|
|
306
645
|
#focus = () => {
|
|
307
646
|
this.isFocused = true;
|
|
308
|
-
this.#isBlurring = false;
|
|
309
647
|
// why: vẫn 100ms như cũ — chỉ scope handle theo DestroyRef.
|
|
310
648
|
this.#timers.schedule(() => {
|
|
311
649
|
if (this.isFocused) {
|
|
@@ -313,44 +651,39 @@ class SdChipCalendar {
|
|
|
313
651
|
}
|
|
314
652
|
}, 100);
|
|
315
653
|
};
|
|
654
|
+
/** Removes every day the predicate allows; kept days stay. One change, none when nothing goes. */
|
|
316
655
|
#clear = (evt) => {
|
|
317
656
|
evt?.stopPropagation();
|
|
318
657
|
this.#inputControl.setValue('');
|
|
319
|
-
this.#
|
|
320
|
-
|
|
321
|
-
|
|
658
|
+
const days = this.#currentDays();
|
|
659
|
+
const kept = days.filter(day => !this.isRemovable(day));
|
|
660
|
+
if (kept.length !== days.length)
|
|
661
|
+
this.#commit(kept);
|
|
322
662
|
this.#ref.detectChanges();
|
|
323
663
|
};
|
|
324
664
|
#selectDate = (date) => {
|
|
325
|
-
|
|
326
|
-
const
|
|
327
|
-
if (
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
this
|
|
333
|
-
|
|
334
|
-
this.sdChange.emit(next);
|
|
335
|
-
this.calendar()?.updateTodaysDate();
|
|
336
|
-
this.#ref.markForCheck();
|
|
665
|
+
// 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ố.
|
|
666
|
+
const day = DateUtilities.toFormat(date, 'yyyy/MM/dd');
|
|
667
|
+
if (!day)
|
|
668
|
+
return;
|
|
669
|
+
const days = this.#currentDays();
|
|
670
|
+
if (days.includes(day)) {
|
|
671
|
+
// A1: bấm lại ngày đã chọn chỉ bỏ khi predicate cho phép.
|
|
672
|
+
if (this.isRemovable(day))
|
|
673
|
+
this.#commit(days.filter(value => value !== day));
|
|
337
674
|
}
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
const selected = dates.some(date => date === DateUtilities.toFormat(cellDate, 'yyyy/MM/dd'));
|
|
347
|
-
return selected ? 'sd-chip-calendar-selected-date' : '';
|
|
675
|
+
else {
|
|
676
|
+
this.#commit([...days, day]);
|
|
677
|
+
}
|
|
678
|
+
// 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.
|
|
679
|
+
const calendar = this.calendar();
|
|
680
|
+
if (calendar && date) {
|
|
681
|
+
calendar.activeDate = date;
|
|
682
|
+
this.#timers.schedule(() => this.calendar()?.focusActiveCell(), 0);
|
|
348
683
|
}
|
|
349
|
-
return '';
|
|
350
684
|
};
|
|
351
685
|
onClickChip = (event, item) => this.#clickChip(event, item);
|
|
352
686
|
onRemove = (item) => this.#remove(item);
|
|
353
|
-
onSelect = (event) => this.#select(event);
|
|
354
687
|
onClick = () => this.#onClick();
|
|
355
688
|
/**
|
|
356
689
|
* why: khi `sdViewDef` đang hiển thị thì bên trong KHÔNG còn phần tử nào focus được, nên
|
|
@@ -364,10 +697,12 @@ class SdChipCalendar {
|
|
|
364
697
|
};
|
|
365
698
|
onClear = (evt) => this.#clear(evt);
|
|
366
699
|
onSelectDate = (date) => this.#selectDate(date);
|
|
367
|
-
|
|
368
|
-
|
|
700
|
+
/** Closes the popup without moving focus (outside click); marks the field touched. */
|
|
701
|
+
onCloseCalendar = () => this.close();
|
|
702
|
+
/** Classes of a month-view cell; see `calendarDateClass`. */
|
|
703
|
+
dateClass = (cellDate) => this.calendarDateClass()(cellDate);
|
|
369
704
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: SdChipCalendar, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
370
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", 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();\r\n@let _appearance = appearance();\r\n@let _required = required();\r\n@let _isViewed = isViewed();\r\n@let _hideInlineError = hideInlineError();\r\n@let _sdViewDef = sdViewDef();\r\n@let _labelTemplate = (sdLabelTemplate() ?? sdLabelDef()?.templateRef) || undefined;\r\n@let _valueTemplate = (sdValueTemplate() ?? _sdViewDef?.templateRef) || undefined;\r\n@let _errorMessage = errorMessage();\r\n@let _size = size();\r\n@let _removable = removable();\r\n@let _labelTop = labelPlacement() === 'top';\r\n<!-- why: m\u1ED9t c\u1ED5ng gate duy nh\u1EA5t cho <mat-error>, aria-invalid v\u00E0 aria-describedby. -->\r\n@let _errorVisible = !!_errorMessage && formControl.touched;\r\n@let _showInlineError = !_hideInlineError && _errorVisible;\r\n@let _viewTemplate = _sdViewDef?.templateRef;\r\n\r\n@if (_isViewed) {\r\n <sd-view\r\n [label]=\"_label\"\r\n [labelTemplate]=\"_labelTemplate\"\r\n [value]=\"formControl.value\"\r\n [display]=\"formControl.value\"\r\n [hyperlink]=\"hyperlink()\"\r\n [valueTemplate]=\"_valueTemplate\">\r\n </sd-view>\r\n} @else {\r\n @if ((!_appearance || _labelTop) && _labelTemplate) {\r\n <ng-container *ngTemplateOutlet=\"_labelTemplate\"></ng-container>\r\n }\r\n @if ((!_appearance || _labelTop) && _label && !_labelTemplate) {\r\n <sd-label [label]=\"_label\" [required]=\"_required\" [for]=\"_labelTop ? inputId : null\"></sd-label>\r\n }\r\n\r\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>)\r\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:\r\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\r\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\r\n role=\"button\" + tabindex=\"0\" + keydown Enter/Space; div ngo\u00E0i kh\u00F4ng c\u00F2n handler n\u00E0o. -->\r\n <div\r\n class=\"d-flex align-items-center\"\r\n [class.sd-view]=\"!!_viewTemplate\"\r\n [class.c-focused]=\"isFocused\"\r\n [class.c-disabled]=\"formControl.disabled\">\r\n @if (_viewTemplate && !isFocused) {\r\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\r\n s\u1EBD ghi \u0111\u00E8 v\u00E0 l\u00E0m AT \u0111\u1ECDc kh\u00E1c ch\u1EEF tr\u00EAn m\u00E0n h\u00ECnh. -->\r\n <div\r\n class=\"sd-chip-calendar__view-trigger\"\r\n role=\"button\"\r\n tabindex=\"0\"\r\n (click)=\"onClick()\"\r\n (keydown.enter)=\"onViewKeydown($event)\"\r\n (keydown.space)=\"onViewKeydown($event)\">\r\n <ng-container *ngTemplateOutlet=\"_viewTemplate; context: { value: formControl.value }\"></ng-container>\r\n </div>\r\n } @else {\r\n <mat-form-field\r\n [class.sd-md]=\"_size === 'md'\"\r\n [class.sd-sm]=\"_size === 'sm'\"\r\n [class.hide-inline-error]=\"_hideInlineError\"\r\n [class.sd-label-top]=\"_labelTop\"\r\n [appearance]=\"_appearance\"\r\n [floatLabel]=\"floatLabel()\">\r\n @if (_appearance && _label && !_labelTop) {\r\n <mat-label>{{ _label }}</mat-label>\r\n }\r\n <mat-chip-grid [formControl]=\"formControl\" #chipList [class.sd-md]=\"_size === 'md'\" [class.sd-sm]=\"_size === 'sm'\">\r\n @for (item of formControl.value; track item) {\r\n @if (item) {\r\n <mat-chip-row\r\n [class.sd-md]=\"_size === 'md'\"\r\n [class.sd-sm]=\"_size === 'sm'\"\r\n [removable]=\"_removable\"\r\n (removed)=\"onRemove(item)\"\r\n [disabled]=\"inputControl.disabled\"\r\n (click)=\"onClickChip($event, item)\"\r\n [value]=\"item\">\r\n <span>{{ item | date: 'dd/MM/yyyy' }}</span>\r\n @if (!inputControl.disabled && item | sdRemovableChip: _removable) {\r\n <sd-icon matChipRemove name=\"cancel\"></sd-icon>\r\n }\r\n </mat-chip-row>\r\n }\r\n }\r\n\r\n <input\r\n class=\"sd-chip-input\"\r\n [formControl]=\"inputControl\"\r\n [id]=\"inputId\"\r\n [placeholder]=\"placeholder() || (_labelTop ? '' : _label)\"\r\n [matChipInputFor]=\"chipList\"\r\n autocomplete=\"off\"\r\n [errorStateMatcher]=\"matcher\"\r\n [matMenuTriggerFor]=\"calendarMenu\"\r\n [required]=\"_required\"\r\n matInput\r\n [attr.data-autoId]=\"autoId()\"\r\n [attr.data-disabled]=\"dataDisabled()\"\r\n [attr.data-empty]=\"dataEmpty()\"\r\n [attr.data-value]=\"dataValue()\"\r\n [attr.data-count]=\"dataCount()\"\r\n [attr.data-required]=\"dataRequired()\"\r\n [attr.data-error-message]=\"dataErrorMessage()\"\r\n [attr.aria-invalid]=\"_errorVisible ? 'true' : null\"\r\n [attr.aria-describedby]=\"_errorMessage ? errorId : null\"\r\n readonly\r\n #input />\r\n </mat-chip-grid>\r\n\r\n <mat-menu #calendarMenu=\"matMenu\" overlapTrigger=\"false\" (closed)=\"onCloseCalendar()\">\r\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,\r\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\r\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\r\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. -->\r\n <div style=\"width: 280px\" role=\"presentation\" (click)=\"$event.stopPropagation()\">\r\n <mat-calendar (selectedChange)=\"onSelectDate($event)\" [dateClass]=\"dateClass\"> </mat-calendar>\r\n </div>\r\n </mat-menu>\r\n @if (_hideInlineError && _errorVisible) {\r\n <sd-icon matSuffix class=\"sd-error-icon\" [matTooltip]=\"_errorMessage\" matTooltipPosition=\"above\" name=\"error\"></sd-icon>\n }\r\n @if (_hideInlineError && _errorVisible) {\r\n <span class=\"sd-visually-hidden\" [id]=\"errorId\" matSuffix>{{ _errorMessage }}</span>\r\r\n }\r\n\r\n @if (_showInlineError) {\r\n <mat-error [id]=\"errorId\">{{ _errorMessage }}</mat-error>\r\n }\r\n </mat-form-field>\r\n }\r\n </div>\r\n}\r\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: "pipe", type: i1.DatePipe, name: "date" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[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"], 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: SdRemovableChipPipe, name: "sdRemovableChip" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
705
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", 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();\r\n@let _appearance = appearance();\r\n@let _required = required();\r\n@let _isViewed = isViewed();\r\n@let _hideInlineError = hideInlineError();\r\n@let _sdViewDef = sdViewDef();\r\n@let _labelTemplate = (sdLabelTemplate() ?? sdLabelDef()?.templateRef) || undefined;\r\n@let _valueTemplate = (sdValueTemplate() ?? _sdViewDef?.templateRef) || undefined;\r\n@let _errorMessage = errorMessage();\r\n@let _size = size();\r\n@let _labelTop = labelPlacement() === 'top';\r\n@let _icons = iconSizes();\r\n<!-- why: m\u1ED9t c\u1ED5ng gate duy nh\u1EA5t cho <mat-error>, aria-invalid v\u00E0 aria-describedby. -->\r\n@let _errorVisible = isErrorShown();\r\n@let _showInlineError = !_hideInlineError && _errorVisible;\r\n@let _viewTemplate = _sdViewDef?.templateRef;\r\n\r\n@if (_isViewed) {\r\n <sd-view\r\n [label]=\"_label\"\r\n [labelTemplate]=\"_labelTemplate\"\r\n [value]=\"formControl.value\"\r\n [display]=\"viewText()\"\r\n [hyperlink]=\"hyperlink()\"\r\n [valueTemplate]=\"_valueTemplate\">\r\n </sd-view>\r\n} @else {\r\n @if ((!_appearance || _labelTop) && _labelTemplate) {\r\n <ng-container *ngTemplateOutlet=\"_labelTemplate\"></ng-container>\r\n }\r\n @if ((!_appearance || _labelTop) && _label && !_labelTemplate) {\r\n <sd-label [label]=\"_label\" [required]=\"_required\" [for]=\"_labelTop ? inputId : null\"></sd-label>\r\n }\r\n\r\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>)\r\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:\r\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\r\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\r\n role=\"button\" + tabindex=\"0\" + keydown Enter/Space; div ngo\u00E0i kh\u00F4ng c\u00F2n handler n\u00E0o. -->\r\n <div\r\n class=\"d-flex align-items-center\"\r\n [class.sd-view]=\"!!_viewTemplate\"\r\n [class.c-focused]=\"isFocused\"\r\n [class.c-disabled]=\"formControl.disabled\">\r\n @if (_viewTemplate && !isFocused) {\r\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\r\n s\u1EBD ghi \u0111\u00E8 v\u00E0 l\u00E0m AT \u0111\u1ECDc kh\u00E1c ch\u1EEF tr\u00EAn m\u00E0n h\u00ECnh. -->\r\n <div\r\n class=\"sd-chip-calendar__view-trigger\"\r\n role=\"button\"\r\n tabindex=\"0\"\r\n (click)=\"onClick()\"\r\n (keydown.enter)=\"onViewKeydown($event)\"\r\n (keydown.space)=\"onViewKeydown($event)\">\r\n <ng-container *ngTemplateOutlet=\"_viewTemplate; context: { value: formControl.value }\"></ng-container>\r\n </div>\r\n } @else {\r\n <mat-form-field\r\n class=\"sd-chip-calendar-field\"\r\n [class.sd-md]=\"_size === 'md'\"\r\n [class.sd-sm]=\"_size === 'sm'\"\r\n [class.sd-lg]=\"_size === 'lg'\"\r\n [class.sd-chip-calendar-field--open]=\"isOpen()\"\r\n [class.hide-inline-error]=\"_hideInlineError\"\r\n [class.sd-label-top]=\"_labelTop\"\r\n [appearance]=\"_appearance\"\r\n [floatLabel]=\"floatLabel()\"\r\n (click)=\"onFieldClick()\">\r\n @if (_appearance && _label && !_labelTop) {\r\n <mat-label>{{ _label }}</mat-label>\r\n }\r\n <mat-chip-grid [formControl]=\"formControl\" #chipList [class.sd-md]=\"_size === 'md'\" [class.sd-sm]=\"_size === 'sm'\">\r\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\r\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). -->\r\n @for (item of visibleDays(); track item) {\r\n @let _itemRemovable = isRemovable(item);\r\n <mat-chip-row\r\n class=\"sd-chip-calendar__chip\"\r\n [class.sd-chip-calendar__chip--locked]=\"!_itemRemovable\"\r\n [removable]=\"_itemRemovable\"\r\n [aria-label]=\"chipLabel(item)\"\r\n (removed)=\"onRemove(item)\"\r\n [disabled]=\"inputControl.disabled\"\r\n (click)=\"onClickChip($event, item)\"\r\n [value]=\"item\">\r\n <span class=\"sd-chip-calendar__chip-text\">{{ formatDay(item) }}</span>\r\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]). -->\r\n @if (!inputControl.disabled && _itemRemovable) {\r\n <sd-icon matChipRemove name=\"close\" [size]=\"_icons.chip\" [ariaLabel]=\"removeLabel(item)\"></sd-icon>\r\n }\r\n @if (!inputControl.disabled && !_itemRemovable) {\r\n <sd-icon\r\n class=\"sd-chip-calendar__lock\"\r\n name=\"lock\"\r\n [size]=\"_icons.chip\"\r\n [matTooltip]=\"'core.form.chip-calendar.locked' | sdTranslate\"></sd-icon>\r\n }\r\n </mat-chip-row>\r\n }\r\n @if (hiddenCount() > 0) {\r\n <button\r\n type=\"button\"\r\n class=\"sd-chip-calendar__more\"\r\n [attr.aria-label]=\"'core.form.chip-calendar.more' | sdTranslate: { count: hiddenCount() }\"\r\n [attr.data-autoid]=\"autoId() ? autoId() + '-more' : null\"\r\n (click)=\"onMoreClick($event)\">\r\n +{{ hiddenCount() }}\r\n </button>\r\n }\r\n\r\n <input\r\n class=\"sd-chip-input\"\r\n [formControl]=\"inputControl\"\r\n [id]=\"inputId\"\r\n [placeholder]=\"effectivePlaceholder()\"\r\n [matChipInputFor]=\"chipList\"\r\n autocomplete=\"off\"\r\n [errorStateMatcher]=\"matcher\"\r\n [required]=\"_required\"\r\n aria-haspopup=\"dialog\"\r\n [attr.aria-expanded]=\"isOpen()\"\r\n [attr.aria-controls]=\"isOpen() ? panelId : null\"\r\n (keydown)=\"onInputKeydown($event)\"\r\n matInput\r\n [attr.data-autoId]=\"autoId()\"\r\n [attr.data-disabled]=\"dataDisabled()\"\r\n [attr.data-empty]=\"dataEmpty()\"\r\n [attr.data-value]=\"dataValue()\"\r\n [attr.data-count]=\"dataCount()\"\r\n [attr.data-required]=\"dataRequired()\"\r\n [attr.data-error-message]=\"dataErrorMessage()\"\r\n [attr.aria-invalid]=\"_errorVisible ? 'true' : null\"\r\n [attr.aria-describedby]=\"_errorMessage ? errorId : null\"\r\n readonly\r\n #input />\r\n </mat-chip-grid>\r\n\r\n @if (_hideInlineError && _errorVisible) {\r\n <sd-icon matSuffix class=\"sd-error-icon\" [matTooltip]=\"_errorMessage\" matTooltipPosition=\"above\" name=\"error\"></sd-icon>\r\n }\r\n @if (_hideInlineError && _errorVisible) {\r\n <span class=\"sd-visually-hidden\" [id]=\"errorId\" matSuffix>{{ _errorMessage }}</span>\r\n }\r\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. -->\r\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. -->\r\n @if (!formControl.disabled && clearable() && !_required && hasRemovable()) {\r\n <button\r\n type=\"button\"\r\n matSuffix\r\n class=\"sd-clear-btn sd-chip-calendar__suffix\"\r\n [class.sd-hover]=\"!isOpen()\"\r\n [attr.aria-label]=\"'core.form.chip-calendar.clear' | sdTranslate\"\r\n [attr.data-autoid]=\"autoId() ? autoId() + '-clear' : null\"\r\n (click)=\"onClear($event)\">\r\n <sd-icon name=\"close\" [size]=\"_icons.clear\"></sd-icon>\r\n </button>\r\n }\r\n @if (!formControl.disabled) {\r\n <button\r\n type=\"button\"\r\n matSuffix\r\n class=\"sd-chip-calendar__open sd-chip-calendar__suffix\"\r\n [class.sd-chip-calendar__open--active]=\"isOpen()\"\r\n data-chip-calendar-open\r\n [attr.aria-label]=\"'core.form.date.open-picker' | sdTranslate\"\r\n aria-haspopup=\"dialog\"\r\n [attr.aria-expanded]=\"isOpen()\"\r\n [attr.aria-controls]=\"isOpen() ? panelId : null\"\r\n [attr.data-autoid]=\"autoId() ? autoId() + '-open' : null\"\r\n (click)=\"onToggleClick($event)\">\r\n <sd-icon name=\"calendar_month\" [size]=\"_icons.open\"></sd-icon>\r\n </button>\r\n }\r\n\r\n @if (_showInlineError) {\r\n <mat-error [id]=\"errorId\">{{ _errorMessage }}</mat-error>\r\n }\r\n </mat-form-field>\r\n\r\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\r\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:\r\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. -->\r\n <ng-template\r\n cdkConnectedOverlay\r\n [cdkConnectedOverlayOrigin]=\"overlayOrigin()!\"\r\n [cdkConnectedOverlayOpen]=\"isOpen()\"\r\n [cdkConnectedOverlayPositions]=\"positions\"\r\n [cdkConnectedOverlayPush]=\"true\"\r\n [cdkConnectedOverlayViewportMargin]=\"8\"\r\n cdkConnectedOverlayPanelClass=\"sd-chip-calendar-pane\"\r\n (attach)=\"onAttach()\"\r\n (overlayOutsideClick)=\"onOutsideClick($event)\"\r\n (overlayKeydown)=\"onOverlayKeydown($event)\">\r\n @let _days = days();\r\n @let _maxCount = effectiveMaxCount();\r\n @let _full = full();\r\n <div\r\n class=\"sd-chip-calendar-panel\"\r\n role=\"dialog\"\r\n cdkTrapFocus\r\n [id]=\"panelId\"\r\n [attr.aria-label]=\"_label || ('core.form.chip-calendar.dialog-label' | sdTranslate)\"\r\n [attr.data-autoid]=\"autoId() ? autoId() + '-panel' : null\">\r\n <div class=\"sd-chip-calendar-panel__head\">\r\n <div class=\"sd-chip-calendar-panel__summary\">\r\n <span class=\"sd-chip-calendar-panel__count\">{{\r\n 'core.form.chip-calendar.selected-count' | sdTranslate: { count: _days.length }\r\n }}</span>\r\n <span class=\"sd-chip-calendar-panel__limit\">\r\n {{\r\n _maxCount > 0\r\n ? ('core.form.chip-calendar.max-count' | sdTranslate: { max: _maxCount })\r\n : ('core.form.chip-calendar.no-limit' | sdTranslate)\r\n }}\r\n </span>\r\n </div>\r\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. -->\r\n <p class=\"sd-chip-calendar-panel__full\" aria-live=\"polite\">\r\n @if (_full) {\r\n {{ 'core.form.chip-calendar.full' | sdTranslate: { max: _maxCount } }}\r\n }\r\n </p>\r\n </div>\r\n\r\n <mat-calendar\r\n [headerComponent]=\"calendarHeader\"\r\n [startAt]=\"openAt()\"\r\n [minDate]=\"resolvedMinDate()\"\r\n [maxDate]=\"resolvedMaxDate()\"\r\n [dateFilter]=\"calendarFilter()\"\r\n [dateClass]=\"calendarDateClass()\"\r\n (selectedChange)=\"onSelectDate($event)\">\r\n </mat-calendar>\r\n\r\n <div class=\"sd-chip-calendar-panel__footer\">\r\n @if (clearable()) {\r\n <sd-button\r\n data-chip-calendar-clear-all\r\n type=\"text\"\r\n color=\"primary\"\r\n size=\"sm\"\r\n [disabled]=\"!hasRemovable()\"\r\n [autoId]=\"autoId() ? autoId() + '-clear-all' : undefined\"\r\n [title]=\"'core.form.chip-calendar.clear-all' | sdTranslate\"\r\n (click)=\"onClear()\"></sd-button>\r\n } @else {\r\n <span></span>\r\n }\r\n <sd-button\r\n data-chip-calendar-done\r\n type=\"fill\"\r\n color=\"primary\"\r\n size=\"sm\"\r\n [autoId]=\"autoId() ? autoId() + '-done' : undefined\"\r\n [title]=\"'core.form.chip-calendar.done' | sdTranslate\"\r\n (click)=\"close(true)\"></sd-button>\r\n </div>\r\n </div>\r\n </ng-template>\r\n }\r\n </div>\r\n}\r\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}}:host ::ng-deep .mat-mdc-form-field.sd-chip-calendar-field{--sd-chip-calendar-field-height: var(--sd-control-height-md, 40px);--sd-chip-calendar-chip-height: 24px;--sd-chip-calendar-chip-font-size: var(--sd-font-size-13, 13px);--sd-chip-calendar-chip-padding: 8px;--sd-chip-calendar-suffix-size: 28px;--mat-form-field-container-height: var(--sd-chip-calendar-field-height)}:host ::ng-deep .mat-mdc-form-field.sd-chip-calendar-field.sd-sm{--sd-chip-calendar-field-height: var(--sd-control-height-sm, 32px);--sd-chip-calendar-chip-height: 20px;--sd-chip-calendar-chip-font-size: var(--sd-font-size-12, 12px);--sd-chip-calendar-suffix-size: 24px}:host ::ng-deep .mat-mdc-form-field.sd-chip-calendar-field.sd-lg{--sd-chip-calendar-field-height: var(--sd-control-height-lg, 48px);--sd-chip-calendar-chip-height: 28px;--sd-chip-calendar-chip-font-size: var(--sd-font-size-14, 14px);--sd-chip-calendar-chip-padding: 10px;--sd-chip-calendar-suffix-size: 32px}:host ::ng-deep .mat-mdc-form-field.sd-chip-calendar-field .mat-mdc-form-field-infix{min-height:var(--sd-chip-calendar-field-height);padding-top:calc((var(--sd-chip-calendar-field-height) - var(--sd-chip-calendar-chip-height)) / 2);padding-bottom:calc((var(--sd-chip-calendar-field-height) - var(--sd-chip-calendar-chip-height)) / 2);border-top-width:0}:host ::ng-deep .mat-mdc-form-field.sd-chip-calendar-field .mdc-evolution-chip-set__chips{gap:4px;margin:0}:host ::ng-deep .mat-mdc-form-field.sd-chip-calendar-field .mat-mdc-chip-set .mdc-evolution-chip{margin:0}:host ::ng-deep .mat-mdc-form-field.sd-chip-calendar-field .mat-mdc-form-field-infix input.mat-mdc-chip-input.mat-mdc-input-element{flex:1 1 0;min-width:0;height:var(--sd-chip-calendar-chip-height);margin:0}:host ::ng-deep .mat-mdc-form-field.sd-chip-calendar-field .sd-chip-calendar__chip.mat-mdc-chip-row{--mdc-chip-container-height: var(--sd-chip-calendar-chip-height);--mat-chip-container-height: var(--sd-chip-calendar-chip-height);--mdc-chip-container-shape-radius: var(--sd-radius-6, 6px);--mat-chip-container-shape-radius: var(--sd-radius-6, 6px);--mdc-chip-outline-width: 1px;--mat-chip-outline-width: 1px;--mdc-chip-outline-color: var(--sd-border);--mat-chip-outline-color: var(--sd-border);--mdc-chip-elevated-container-color: var(--sd-surface);--mat-chip-elevated-container-color: var(--sd-surface);--mdc-chip-label-text-color: var(--sd-text);--mat-chip-label-text-color: var(--sd-text);--mdc-chip-label-text-size: var(--sd-chip-calendar-chip-font-size);--mat-chip-label-text-size: var(--sd-chip-calendar-chip-font-size);--mdc-chip-label-text-weight: var(--sd-font-weight-regular, 400);--mat-chip-label-text-weight: var(--sd-font-weight-regular, 400);--mdc-chip-with-trailing-icon-trailing-icon-color: var(--sd-text-secondary);--mat-chip-with-trailing-icon-trailing-icon-color: var(--sd-text-secondary);--mdc-chip-trailing-action-state-layer-color: transparent;--mat-chip-trailing-action-state-layer-color: transparent;--mdc-chip-selected-trailing-action-state-layer-color: transparent;--mat-chip-selected-trailing-action-state-layer-color: transparent}:host ::ng-deep .mat-mdc-form-field.sd-chip-calendar-field .sd-chip-calendar__chip.mat-mdc-chip-row .mdc-evolution-chip__action--primary{padding-left:var(--sd-chip-calendar-chip-padding);padding-right:2px}:host ::ng-deep .mat-mdc-form-field.sd-chip-calendar-field .sd-chip-calendar__chip.mat-mdc-chip-row .mdc-evolution-chip__action--trailing{padding-left:0;padding-right:3px}:host ::ng-deep .mat-mdc-form-field.sd-chip-calendar-field .sd-chip-calendar__chip.mat-mdc-chip-row .sd-chip-calendar__chip-text{font-variant-numeric:tabular-nums;white-space:nowrap}:host ::ng-deep .mat-mdc-form-field.sd-chip-calendar-field .sd-chip-calendar__chip.mat-mdc-chip-row .mat-mdc-chip-remove,:host ::ng-deep .mat-mdc-form-field.sd-chip-calendar-field .sd-chip-calendar__chip.mat-mdc-chip-row .mat-mdc-chip-remove .mat-icon{width:var(--sd-icon-size);height:var(--sd-icon-size);font-size:var(--sd-icon-size);line-height:var(--sd-icon-size)}:host ::ng-deep .mat-mdc-form-field.sd-chip-calendar-field .sd-chip-calendar__chip.mat-mdc-chip-row .mat-mdc-chip-remove{position:relative;box-sizing:content-box;margin-right:3px;padding:2px;border-radius:50%;color:var(--sd-text-secondary);opacity:1}:host ::ng-deep .mat-mdc-form-field.sd-chip-calendar-field .sd-chip-calendar__chip.mat-mdc-chip-row .mat-mdc-chip-remove:hover{background-color:var(--sd-surface-muted);color:var(--sd-text)}:host ::ng-deep .mat-mdc-form-field.sd-chip-calendar-field .sd-chip-calendar__chip--locked.mat-mdc-chip-row{--mdc-chip-elevated-container-color: var(--sd-chip-calendar-chip-locked-bg);--mat-chip-elevated-container-color: var(--sd-chip-calendar-chip-locked-bg)}:host ::ng-deep .mat-mdc-form-field.sd-chip-calendar-field .sd-chip-calendar__chip--locked.mat-mdc-chip-row .mdc-evolution-chip__text-label{display:inline-flex;align-items:center}:host ::ng-deep .mat-mdc-form-field.sd-chip-calendar-field .sd-chip-calendar__chip--locked.mat-mdc-chip-row .mdc-evolution-chip__action--primary{padding-right:3px}:host ::ng-deep .mat-mdc-form-field.sd-chip-calendar-field .sd-chip-calendar__lock{box-sizing:content-box;margin-left:2px;padding:2px;color:var(--sd-text-muted)}:host ::ng-deep .mat-mdc-form-field.sd-chip-calendar-field .sd-chip-calendar__more{display:inline-flex;align-items:center;box-sizing:border-box;height:var(--sd-chip-calendar-chip-height);padding:0 8px;border:0;border-radius:var(--sd-radius-6, 6px);background-color:var(--sd-surface-muted);color:var(--sd-text-secondary);font:inherit;font-size:var(--sd-chip-calendar-chip-font-size);font-weight:var(--sd-font-weight-medium, 500);cursor:pointer}:host ::ng-deep .mat-mdc-form-field.sd-chip-calendar-field .sd-chip-calendar__more:hover{background-color:var(--sd-chip-calendar-more-hover-bg)}:host ::ng-deep .mat-mdc-form-field.sd-chip-calendar-field .sd-chip-calendar__more:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color);outline-offset:1px}:host ::ng-deep .mat-mdc-form-field.sd-chip-calendar-field .sd-chip-calendar__suffix.sd-clear-btn,:host ::ng-deep .mat-mdc-form-field.sd-chip-calendar-field .sd-chip-calendar__open{width:var(--sd-chip-calendar-suffix-size);height:var(--sd-chip-calendar-suffix-size)}:host ::ng-deep .mat-mdc-form-field.sd-chip-calendar-field .sd-chip-calendar__open{display:inline-flex;align-items:center;justify-content:center;padding:0;border:0;border-radius:var(--sd-radius-6, 6px);background:transparent;color:var(--sd-text-secondary);cursor:pointer}:host ::ng-deep .mat-mdc-form-field.sd-chip-calendar-field .sd-chip-calendar__open:hover{background-color:color-mix(in srgb,var(--sd-text) 5%,transparent)}:host ::ng-deep .mat-mdc-form-field.sd-chip-calendar-field .sd-chip-calendar__open:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color);outline-offset:1px}:host ::ng-deep .mat-mdc-form-field.sd-chip-calendar-field .sd-chip-calendar__open--active{color:var(--sd-primary)}:host ::ng-deep .mat-mdc-form-field.sd-chip-calendar-field.sd-chip-calendar-field--open{--mdc-outlined-text-field-outline-color: var(--sd-primary);--mat-form-field-outlined-outline-color: var(--sd-primary);--mdc-outlined-text-field-hover-outline-color: var(--sd-primary);--mat-form-field-outlined-hover-outline-color: var(--sd-primary);--mdc-outlined-text-field-label-text-color: var(--sd-primary);--mat-form-field-outlined-label-text-color: var(--sd-primary);--mdc-outlined-text-field-hover-label-text-color: var(--sd-primary);--mat-form-field-outlined-hover-label-text-color: var(--sd-primary)}:host ::ng-deep .mat-mdc-form-field.sd-chip-calendar-field.sd-chip-calendar-field--open .mat-mdc-text-field-wrapper{box-shadow:var(--sd-control-ring, none)}@media(pointer:coarse){:host ::ng-deep .mat-mdc-form-field.sd-chip-calendar-field .mat-mdc-chip-remove:after{content:\"\";position:absolute;inset:50% auto auto 50%;width:24px;height:24px;transform:translate(-50%,-50%)}}@media(prefers-reduced-motion:no-preference){:host ::ng-deep .mat-mdc-form-field.sd-chip-calendar-field .sd-chip-calendar__more,:host ::ng-deep .mat-mdc-form-field.sd-chip-calendar-field .sd-chip-calendar__open,:host ::ng-deep .mat-mdc-form-field.sd-chip-calendar-field .mat-mdc-chip-remove{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])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[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"], 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"], 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: "pipe", type: SdTranslatePipe, name: "sdTranslate" }, { 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
371
706
|
}
|
|
372
707
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: SdChipCalendar, decorators: [{
|
|
373
708
|
type: Component,
|
|
@@ -383,16 +718,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImpo
|
|
|
383
718
|
MatInputModule,
|
|
384
719
|
MatTooltipModule,
|
|
385
720
|
MatFormFieldModule,
|
|
386
|
-
MatAutocompleteModule,
|
|
387
|
-
MatProgressSpinnerModule,
|
|
388
721
|
MatChipsModule,
|
|
389
722
|
MatDatepickerModule,
|
|
390
723
|
MatNativeDateModule,
|
|
391
|
-
|
|
724
|
+
OverlayModule,
|
|
725
|
+
A11yModule,
|
|
726
|
+
SdButton,
|
|
727
|
+
SdTranslatePipe,
|
|
392
728
|
SdLabel,
|
|
393
729
|
SdView,
|
|
394
|
-
SdRemovableChipPipe,
|
|
395
|
-
], template: "@let _label = label();\r\n@let _appearance = appearance();\r\n@let _required = required();\r\n@let _isViewed = isViewed();\r\n@let _hideInlineError = hideInlineError();\r\n@let _sdViewDef = sdViewDef();\r\n@let _labelTemplate = (sdLabelTemplate() ?? sdLabelDef()?.templateRef) || undefined;\r\n@let _valueTemplate = (sdValueTemplate() ?? _sdViewDef?.templateRef) || undefined;\r\n@let _errorMessage = errorMessage();\r\n@let _size = size();\r\n@let _removable = removable();\r\n@let _labelTop = labelPlacement() === 'top';\r\n<!-- why: m\u1ED9t c\u1ED5ng gate duy nh\u1EA5t cho <mat-error>, aria-invalid v\u00E0 aria-describedby. -->\r\n@let _errorVisible = !!_errorMessage && formControl.touched;\r\n@let _showInlineError = !_hideInlineError && _errorVisible;\r\n@let _viewTemplate = _sdViewDef?.templateRef;\r\n\r\n@if (_isViewed) {\r\n <sd-view\r\n [label]=\"_label\"\r\n [labelTemplate]=\"_labelTemplate\"\r\n [value]=\"formControl.value\"\r\n [display]=\"formControl.value\"\r\n [hyperlink]=\"hyperlink()\"\r\n [valueTemplate]=\"_valueTemplate\">\r\n </sd-view>\r\n} @else {\r\n @if ((!_appearance || _labelTop) && _labelTemplate) {\r\n <ng-container *ngTemplateOutlet=\"_labelTemplate\"></ng-container>\r\n }\r\n @if ((!_appearance || _labelTop) && _label && !_labelTemplate) {\r\n <sd-label [label]=\"_label\" [required]=\"_required\" [for]=\"_labelTop ? inputId : null\"></sd-label>\r\n }\r\n\r\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>)\r\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:\r\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\r\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\r\n role=\"button\" + tabindex=\"0\" + keydown Enter/Space; div ngo\u00E0i kh\u00F4ng c\u00F2n handler n\u00E0o. -->\r\n <div\r\n class=\"d-flex align-items-center\"\r\n [class.sd-view]=\"!!_viewTemplate\"\r\n [class.c-focused]=\"isFocused\"\r\n [class.c-disabled]=\"formControl.disabled\">\r\n @if (_viewTemplate && !isFocused) {\r\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\r\n s\u1EBD ghi \u0111\u00E8 v\u00E0 l\u00E0m AT \u0111\u1ECDc kh\u00E1c ch\u1EEF tr\u00EAn m\u00E0n h\u00ECnh. -->\r\n <div\r\n class=\"sd-chip-calendar__view-trigger\"\r\n role=\"button\"\r\n tabindex=\"0\"\r\n (click)=\"onClick()\"\r\n (keydown.enter)=\"onViewKeydown($event)\"\r\n (keydown.space)=\"onViewKeydown($event)\">\r\n <ng-container *ngTemplateOutlet=\"_viewTemplate; context: { value: formControl.value }\"></ng-container>\r\n </div>\r\n } @else {\r\n <mat-form-field\r\n [class.sd-md]=\"_size === 'md'\"\r\n [class.sd-sm]=\"_size === 'sm'\"\r\n [class.hide-inline-error]=\"_hideInlineError\"\r\n [class.sd-label-top]=\"_labelTop\"\r\n [appearance]=\"_appearance\"\r\n [floatLabel]=\"floatLabel()\">\r\n @if (_appearance && _label && !_labelTop) {\r\n <mat-label>{{ _label }}</mat-label>\r\n }\r\n <mat-chip-grid [formControl]=\"formControl\" #chipList [class.sd-md]=\"_size === 'md'\" [class.sd-sm]=\"_size === 'sm'\">\r\n @for (item of formControl.value; track item) {\r\n @if (item) {\r\n <mat-chip-row\r\n [class.sd-md]=\"_size === 'md'\"\r\n [class.sd-sm]=\"_size === 'sm'\"\r\n [removable]=\"_removable\"\r\n (removed)=\"onRemove(item)\"\r\n [disabled]=\"inputControl.disabled\"\r\n (click)=\"onClickChip($event, item)\"\r\n [value]=\"item\">\r\n <span>{{ item | date: 'dd/MM/yyyy' }}</span>\r\n @if (!inputControl.disabled && item | sdRemovableChip: _removable) {\r\n <sd-icon matChipRemove name=\"cancel\"></sd-icon>\r\n }\r\n </mat-chip-row>\r\n }\r\n }\r\n\r\n <input\r\n class=\"sd-chip-input\"\r\n [formControl]=\"inputControl\"\r\n [id]=\"inputId\"\r\n [placeholder]=\"placeholder() || (_labelTop ? '' : _label)\"\r\n [matChipInputFor]=\"chipList\"\r\n autocomplete=\"off\"\r\n [errorStateMatcher]=\"matcher\"\r\n [matMenuTriggerFor]=\"calendarMenu\"\r\n [required]=\"_required\"\r\n matInput\r\n [attr.data-autoId]=\"autoId()\"\r\n [attr.data-disabled]=\"dataDisabled()\"\r\n [attr.data-empty]=\"dataEmpty()\"\r\n [attr.data-value]=\"dataValue()\"\r\n [attr.data-count]=\"dataCount()\"\r\n [attr.data-required]=\"dataRequired()\"\r\n [attr.data-error-message]=\"dataErrorMessage()\"\r\n [attr.aria-invalid]=\"_errorVisible ? 'true' : null\"\r\n [attr.aria-describedby]=\"_errorMessage ? errorId : null\"\r\n readonly\r\n #input />\r\n </mat-chip-grid>\r\n\r\n <mat-menu #calendarMenu=\"matMenu\" overlapTrigger=\"false\" (closed)=\"onCloseCalendar()\">\r\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,\r\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\r\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\r\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. -->\r\n <div style=\"width: 280px\" role=\"presentation\" (click)=\"$event.stopPropagation()\">\r\n <mat-calendar (selectedChange)=\"onSelectDate($event)\" [dateClass]=\"dateClass\"> </mat-calendar>\r\n </div>\r\n </mat-menu>\r\n @if (_hideInlineError && _errorVisible) {\r\n <sd-icon matSuffix class=\"sd-error-icon\" [matTooltip]=\"_errorMessage\" matTooltipPosition=\"above\" name=\"error\"></sd-icon>\n }\r\n @if (_hideInlineError && _errorVisible) {\r\n <span class=\"sd-visually-hidden\" [id]=\"errorId\" matSuffix>{{ _errorMessage }}</span>\r\r\n }\r\n\r\n @if (_showInlineError) {\r\n <mat-error [id]=\"errorId\">{{ _errorMessage }}</mat-error>\r\n }\r\n </mat-form-field>\r\n }\r\n </div>\r\n}\r\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"] }]
|
|
730
|
+
], template: "@let _label = label();\r\n@let _appearance = appearance();\r\n@let _required = required();\r\n@let _isViewed = isViewed();\r\n@let _hideInlineError = hideInlineError();\r\n@let _sdViewDef = sdViewDef();\r\n@let _labelTemplate = (sdLabelTemplate() ?? sdLabelDef()?.templateRef) || undefined;\r\n@let _valueTemplate = (sdValueTemplate() ?? _sdViewDef?.templateRef) || undefined;\r\n@let _errorMessage = errorMessage();\r\n@let _size = size();\r\n@let _labelTop = labelPlacement() === 'top';\r\n@let _icons = iconSizes();\r\n<!-- why: m\u1ED9t c\u1ED5ng gate duy nh\u1EA5t cho <mat-error>, aria-invalid v\u00E0 aria-describedby. -->\r\n@let _errorVisible = isErrorShown();\r\n@let _showInlineError = !_hideInlineError && _errorVisible;\r\n@let _viewTemplate = _sdViewDef?.templateRef;\r\n\r\n@if (_isViewed) {\r\n <sd-view\r\n [label]=\"_label\"\r\n [labelTemplate]=\"_labelTemplate\"\r\n [value]=\"formControl.value\"\r\n [display]=\"viewText()\"\r\n [hyperlink]=\"hyperlink()\"\r\n [valueTemplate]=\"_valueTemplate\">\r\n </sd-view>\r\n} @else {\r\n @if ((!_appearance || _labelTop) && _labelTemplate) {\r\n <ng-container *ngTemplateOutlet=\"_labelTemplate\"></ng-container>\r\n }\r\n @if ((!_appearance || _labelTop) && _label && !_labelTemplate) {\r\n <sd-label [label]=\"_label\" [required]=\"_required\" [for]=\"_labelTop ? inputId : null\"></sd-label>\r\n }\r\n\r\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>)\r\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:\r\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\r\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\r\n role=\"button\" + tabindex=\"0\" + keydown Enter/Space; div ngo\u00E0i kh\u00F4ng c\u00F2n handler n\u00E0o. -->\r\n <div\r\n class=\"d-flex align-items-center\"\r\n [class.sd-view]=\"!!_viewTemplate\"\r\n [class.c-focused]=\"isFocused\"\r\n [class.c-disabled]=\"formControl.disabled\">\r\n @if (_viewTemplate && !isFocused) {\r\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\r\n s\u1EBD ghi \u0111\u00E8 v\u00E0 l\u00E0m AT \u0111\u1ECDc kh\u00E1c ch\u1EEF tr\u00EAn m\u00E0n h\u00ECnh. -->\r\n <div\r\n class=\"sd-chip-calendar__view-trigger\"\r\n role=\"button\"\r\n tabindex=\"0\"\r\n (click)=\"onClick()\"\r\n (keydown.enter)=\"onViewKeydown($event)\"\r\n (keydown.space)=\"onViewKeydown($event)\">\r\n <ng-container *ngTemplateOutlet=\"_viewTemplate; context: { value: formControl.value }\"></ng-container>\r\n </div>\r\n } @else {\r\n <mat-form-field\r\n class=\"sd-chip-calendar-field\"\r\n [class.sd-md]=\"_size === 'md'\"\r\n [class.sd-sm]=\"_size === 'sm'\"\r\n [class.sd-lg]=\"_size === 'lg'\"\r\n [class.sd-chip-calendar-field--open]=\"isOpen()\"\r\n [class.hide-inline-error]=\"_hideInlineError\"\r\n [class.sd-label-top]=\"_labelTop\"\r\n [appearance]=\"_appearance\"\r\n [floatLabel]=\"floatLabel()\"\r\n (click)=\"onFieldClick()\">\r\n @if (_appearance && _label && !_labelTop) {\r\n <mat-label>{{ _label }}</mat-label>\r\n }\r\n <mat-chip-grid [formControl]=\"formControl\" #chipList [class.sd-md]=\"_size === 'md'\" [class.sd-sm]=\"_size === 'sm'\">\r\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\r\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). -->\r\n @for (item of visibleDays(); track item) {\r\n @let _itemRemovable = isRemovable(item);\r\n <mat-chip-row\r\n class=\"sd-chip-calendar__chip\"\r\n [class.sd-chip-calendar__chip--locked]=\"!_itemRemovable\"\r\n [removable]=\"_itemRemovable\"\r\n [aria-label]=\"chipLabel(item)\"\r\n (removed)=\"onRemove(item)\"\r\n [disabled]=\"inputControl.disabled\"\r\n (click)=\"onClickChip($event, item)\"\r\n [value]=\"item\">\r\n <span class=\"sd-chip-calendar__chip-text\">{{ formatDay(item) }}</span>\r\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]). -->\r\n @if (!inputControl.disabled && _itemRemovable) {\r\n <sd-icon matChipRemove name=\"close\" [size]=\"_icons.chip\" [ariaLabel]=\"removeLabel(item)\"></sd-icon>\r\n }\r\n @if (!inputControl.disabled && !_itemRemovable) {\r\n <sd-icon\r\n class=\"sd-chip-calendar__lock\"\r\n name=\"lock\"\r\n [size]=\"_icons.chip\"\r\n [matTooltip]=\"'core.form.chip-calendar.locked' | sdTranslate\"></sd-icon>\r\n }\r\n </mat-chip-row>\r\n }\r\n @if (hiddenCount() > 0) {\r\n <button\r\n type=\"button\"\r\n class=\"sd-chip-calendar__more\"\r\n [attr.aria-label]=\"'core.form.chip-calendar.more' | sdTranslate: { count: hiddenCount() }\"\r\n [attr.data-autoid]=\"autoId() ? autoId() + '-more' : null\"\r\n (click)=\"onMoreClick($event)\">\r\n +{{ hiddenCount() }}\r\n </button>\r\n }\r\n\r\n <input\r\n class=\"sd-chip-input\"\r\n [formControl]=\"inputControl\"\r\n [id]=\"inputId\"\r\n [placeholder]=\"effectivePlaceholder()\"\r\n [matChipInputFor]=\"chipList\"\r\n autocomplete=\"off\"\r\n [errorStateMatcher]=\"matcher\"\r\n [required]=\"_required\"\r\n aria-haspopup=\"dialog\"\r\n [attr.aria-expanded]=\"isOpen()\"\r\n [attr.aria-controls]=\"isOpen() ? panelId : null\"\r\n (keydown)=\"onInputKeydown($event)\"\r\n matInput\r\n [attr.data-autoId]=\"autoId()\"\r\n [attr.data-disabled]=\"dataDisabled()\"\r\n [attr.data-empty]=\"dataEmpty()\"\r\n [attr.data-value]=\"dataValue()\"\r\n [attr.data-count]=\"dataCount()\"\r\n [attr.data-required]=\"dataRequired()\"\r\n [attr.data-error-message]=\"dataErrorMessage()\"\r\n [attr.aria-invalid]=\"_errorVisible ? 'true' : null\"\r\n [attr.aria-describedby]=\"_errorMessage ? errorId : null\"\r\n readonly\r\n #input />\r\n </mat-chip-grid>\r\n\r\n @if (_hideInlineError && _errorVisible) {\r\n <sd-icon matSuffix class=\"sd-error-icon\" [matTooltip]=\"_errorMessage\" matTooltipPosition=\"above\" name=\"error\"></sd-icon>\r\n }\r\n @if (_hideInlineError && _errorVisible) {\r\n <span class=\"sd-visually-hidden\" [id]=\"errorId\" matSuffix>{{ _errorMessage }}</span>\r\n }\r\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. -->\r\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. -->\r\n @if (!formControl.disabled && clearable() && !_required && hasRemovable()) {\r\n <button\r\n type=\"button\"\r\n matSuffix\r\n class=\"sd-clear-btn sd-chip-calendar__suffix\"\r\n [class.sd-hover]=\"!isOpen()\"\r\n [attr.aria-label]=\"'core.form.chip-calendar.clear' | sdTranslate\"\r\n [attr.data-autoid]=\"autoId() ? autoId() + '-clear' : null\"\r\n (click)=\"onClear($event)\">\r\n <sd-icon name=\"close\" [size]=\"_icons.clear\"></sd-icon>\r\n </button>\r\n }\r\n @if (!formControl.disabled) {\r\n <button\r\n type=\"button\"\r\n matSuffix\r\n class=\"sd-chip-calendar__open sd-chip-calendar__suffix\"\r\n [class.sd-chip-calendar__open--active]=\"isOpen()\"\r\n data-chip-calendar-open\r\n [attr.aria-label]=\"'core.form.date.open-picker' | sdTranslate\"\r\n aria-haspopup=\"dialog\"\r\n [attr.aria-expanded]=\"isOpen()\"\r\n [attr.aria-controls]=\"isOpen() ? panelId : null\"\r\n [attr.data-autoid]=\"autoId() ? autoId() + '-open' : null\"\r\n (click)=\"onToggleClick($event)\">\r\n <sd-icon name=\"calendar_month\" [size]=\"_icons.open\"></sd-icon>\r\n </button>\r\n }\r\n\r\n @if (_showInlineError) {\r\n <mat-error [id]=\"errorId\">{{ _errorMessage }}</mat-error>\r\n }\r\n </mat-form-field>\r\n\r\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\r\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:\r\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. -->\r\n <ng-template\r\n cdkConnectedOverlay\r\n [cdkConnectedOverlayOrigin]=\"overlayOrigin()!\"\r\n [cdkConnectedOverlayOpen]=\"isOpen()\"\r\n [cdkConnectedOverlayPositions]=\"positions\"\r\n [cdkConnectedOverlayPush]=\"true\"\r\n [cdkConnectedOverlayViewportMargin]=\"8\"\r\n cdkConnectedOverlayPanelClass=\"sd-chip-calendar-pane\"\r\n (attach)=\"onAttach()\"\r\n (overlayOutsideClick)=\"onOutsideClick($event)\"\r\n (overlayKeydown)=\"onOverlayKeydown($event)\">\r\n @let _days = days();\r\n @let _maxCount = effectiveMaxCount();\r\n @let _full = full();\r\n <div\r\n class=\"sd-chip-calendar-panel\"\r\n role=\"dialog\"\r\n cdkTrapFocus\r\n [id]=\"panelId\"\r\n [attr.aria-label]=\"_label || ('core.form.chip-calendar.dialog-label' | sdTranslate)\"\r\n [attr.data-autoid]=\"autoId() ? autoId() + '-panel' : null\">\r\n <div class=\"sd-chip-calendar-panel__head\">\r\n <div class=\"sd-chip-calendar-panel__summary\">\r\n <span class=\"sd-chip-calendar-panel__count\">{{\r\n 'core.form.chip-calendar.selected-count' | sdTranslate: { count: _days.length }\r\n }}</span>\r\n <span class=\"sd-chip-calendar-panel__limit\">\r\n {{\r\n _maxCount > 0\r\n ? ('core.form.chip-calendar.max-count' | sdTranslate: { max: _maxCount })\r\n : ('core.form.chip-calendar.no-limit' | sdTranslate)\r\n }}\r\n </span>\r\n </div>\r\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. -->\r\n <p class=\"sd-chip-calendar-panel__full\" aria-live=\"polite\">\r\n @if (_full) {\r\n {{ 'core.form.chip-calendar.full' | sdTranslate: { max: _maxCount } }}\r\n }\r\n </p>\r\n </div>\r\n\r\n <mat-calendar\r\n [headerComponent]=\"calendarHeader\"\r\n [startAt]=\"openAt()\"\r\n [minDate]=\"resolvedMinDate()\"\r\n [maxDate]=\"resolvedMaxDate()\"\r\n [dateFilter]=\"calendarFilter()\"\r\n [dateClass]=\"calendarDateClass()\"\r\n (selectedChange)=\"onSelectDate($event)\">\r\n </mat-calendar>\r\n\r\n <div class=\"sd-chip-calendar-panel__footer\">\r\n @if (clearable()) {\r\n <sd-button\r\n data-chip-calendar-clear-all\r\n type=\"text\"\r\n color=\"primary\"\r\n size=\"sm\"\r\n [disabled]=\"!hasRemovable()\"\r\n [autoId]=\"autoId() ? autoId() + '-clear-all' : undefined\"\r\n [title]=\"'core.form.chip-calendar.clear-all' | sdTranslate\"\r\n (click)=\"onClear()\"></sd-button>\r\n } @else {\r\n <span></span>\r\n }\r\n <sd-button\r\n data-chip-calendar-done\r\n type=\"fill\"\r\n color=\"primary\"\r\n size=\"sm\"\r\n [autoId]=\"autoId() ? autoId() + '-done' : undefined\"\r\n [title]=\"'core.form.chip-calendar.done' | sdTranslate\"\r\n (click)=\"close(true)\"></sd-button>\r\n </div>\r\n </div>\r\n </ng-template>\r\n }\r\n </div>\r\n}\r\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}}:host ::ng-deep .mat-mdc-form-field.sd-chip-calendar-field{--sd-chip-calendar-field-height: var(--sd-control-height-md, 40px);--sd-chip-calendar-chip-height: 24px;--sd-chip-calendar-chip-font-size: var(--sd-font-size-13, 13px);--sd-chip-calendar-chip-padding: 8px;--sd-chip-calendar-suffix-size: 28px;--mat-form-field-container-height: var(--sd-chip-calendar-field-height)}:host ::ng-deep .mat-mdc-form-field.sd-chip-calendar-field.sd-sm{--sd-chip-calendar-field-height: var(--sd-control-height-sm, 32px);--sd-chip-calendar-chip-height: 20px;--sd-chip-calendar-chip-font-size: var(--sd-font-size-12, 12px);--sd-chip-calendar-suffix-size: 24px}:host ::ng-deep .mat-mdc-form-field.sd-chip-calendar-field.sd-lg{--sd-chip-calendar-field-height: var(--sd-control-height-lg, 48px);--sd-chip-calendar-chip-height: 28px;--sd-chip-calendar-chip-font-size: var(--sd-font-size-14, 14px);--sd-chip-calendar-chip-padding: 10px;--sd-chip-calendar-suffix-size: 32px}:host ::ng-deep .mat-mdc-form-field.sd-chip-calendar-field .mat-mdc-form-field-infix{min-height:var(--sd-chip-calendar-field-height);padding-top:calc((var(--sd-chip-calendar-field-height) - var(--sd-chip-calendar-chip-height)) / 2);padding-bottom:calc((var(--sd-chip-calendar-field-height) - var(--sd-chip-calendar-chip-height)) / 2);border-top-width:0}:host ::ng-deep .mat-mdc-form-field.sd-chip-calendar-field .mdc-evolution-chip-set__chips{gap:4px;margin:0}:host ::ng-deep .mat-mdc-form-field.sd-chip-calendar-field .mat-mdc-chip-set .mdc-evolution-chip{margin:0}:host ::ng-deep .mat-mdc-form-field.sd-chip-calendar-field .mat-mdc-form-field-infix input.mat-mdc-chip-input.mat-mdc-input-element{flex:1 1 0;min-width:0;height:var(--sd-chip-calendar-chip-height);margin:0}:host ::ng-deep .mat-mdc-form-field.sd-chip-calendar-field .sd-chip-calendar__chip.mat-mdc-chip-row{--mdc-chip-container-height: var(--sd-chip-calendar-chip-height);--mat-chip-container-height: var(--sd-chip-calendar-chip-height);--mdc-chip-container-shape-radius: var(--sd-radius-6, 6px);--mat-chip-container-shape-radius: var(--sd-radius-6, 6px);--mdc-chip-outline-width: 1px;--mat-chip-outline-width: 1px;--mdc-chip-outline-color: var(--sd-border);--mat-chip-outline-color: var(--sd-border);--mdc-chip-elevated-container-color: var(--sd-surface);--mat-chip-elevated-container-color: var(--sd-surface);--mdc-chip-label-text-color: var(--sd-text);--mat-chip-label-text-color: var(--sd-text);--mdc-chip-label-text-size: var(--sd-chip-calendar-chip-font-size);--mat-chip-label-text-size: var(--sd-chip-calendar-chip-font-size);--mdc-chip-label-text-weight: var(--sd-font-weight-regular, 400);--mat-chip-label-text-weight: var(--sd-font-weight-regular, 400);--mdc-chip-with-trailing-icon-trailing-icon-color: var(--sd-text-secondary);--mat-chip-with-trailing-icon-trailing-icon-color: var(--sd-text-secondary);--mdc-chip-trailing-action-state-layer-color: transparent;--mat-chip-trailing-action-state-layer-color: transparent;--mdc-chip-selected-trailing-action-state-layer-color: transparent;--mat-chip-selected-trailing-action-state-layer-color: transparent}:host ::ng-deep .mat-mdc-form-field.sd-chip-calendar-field .sd-chip-calendar__chip.mat-mdc-chip-row .mdc-evolution-chip__action--primary{padding-left:var(--sd-chip-calendar-chip-padding);padding-right:2px}:host ::ng-deep .mat-mdc-form-field.sd-chip-calendar-field .sd-chip-calendar__chip.mat-mdc-chip-row .mdc-evolution-chip__action--trailing{padding-left:0;padding-right:3px}:host ::ng-deep .mat-mdc-form-field.sd-chip-calendar-field .sd-chip-calendar__chip.mat-mdc-chip-row .sd-chip-calendar__chip-text{font-variant-numeric:tabular-nums;white-space:nowrap}:host ::ng-deep .mat-mdc-form-field.sd-chip-calendar-field .sd-chip-calendar__chip.mat-mdc-chip-row .mat-mdc-chip-remove,:host ::ng-deep .mat-mdc-form-field.sd-chip-calendar-field .sd-chip-calendar__chip.mat-mdc-chip-row .mat-mdc-chip-remove .mat-icon{width:var(--sd-icon-size);height:var(--sd-icon-size);font-size:var(--sd-icon-size);line-height:var(--sd-icon-size)}:host ::ng-deep .mat-mdc-form-field.sd-chip-calendar-field .sd-chip-calendar__chip.mat-mdc-chip-row .mat-mdc-chip-remove{position:relative;box-sizing:content-box;margin-right:3px;padding:2px;border-radius:50%;color:var(--sd-text-secondary);opacity:1}:host ::ng-deep .mat-mdc-form-field.sd-chip-calendar-field .sd-chip-calendar__chip.mat-mdc-chip-row .mat-mdc-chip-remove:hover{background-color:var(--sd-surface-muted);color:var(--sd-text)}:host ::ng-deep .mat-mdc-form-field.sd-chip-calendar-field .sd-chip-calendar__chip--locked.mat-mdc-chip-row{--mdc-chip-elevated-container-color: var(--sd-chip-calendar-chip-locked-bg);--mat-chip-elevated-container-color: var(--sd-chip-calendar-chip-locked-bg)}:host ::ng-deep .mat-mdc-form-field.sd-chip-calendar-field .sd-chip-calendar__chip--locked.mat-mdc-chip-row .mdc-evolution-chip__text-label{display:inline-flex;align-items:center}:host ::ng-deep .mat-mdc-form-field.sd-chip-calendar-field .sd-chip-calendar__chip--locked.mat-mdc-chip-row .mdc-evolution-chip__action--primary{padding-right:3px}:host ::ng-deep .mat-mdc-form-field.sd-chip-calendar-field .sd-chip-calendar__lock{box-sizing:content-box;margin-left:2px;padding:2px;color:var(--sd-text-muted)}:host ::ng-deep .mat-mdc-form-field.sd-chip-calendar-field .sd-chip-calendar__more{display:inline-flex;align-items:center;box-sizing:border-box;height:var(--sd-chip-calendar-chip-height);padding:0 8px;border:0;border-radius:var(--sd-radius-6, 6px);background-color:var(--sd-surface-muted);color:var(--sd-text-secondary);font:inherit;font-size:var(--sd-chip-calendar-chip-font-size);font-weight:var(--sd-font-weight-medium, 500);cursor:pointer}:host ::ng-deep .mat-mdc-form-field.sd-chip-calendar-field .sd-chip-calendar__more:hover{background-color:var(--sd-chip-calendar-more-hover-bg)}:host ::ng-deep .mat-mdc-form-field.sd-chip-calendar-field .sd-chip-calendar__more:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color);outline-offset:1px}:host ::ng-deep .mat-mdc-form-field.sd-chip-calendar-field .sd-chip-calendar__suffix.sd-clear-btn,:host ::ng-deep .mat-mdc-form-field.sd-chip-calendar-field .sd-chip-calendar__open{width:var(--sd-chip-calendar-suffix-size);height:var(--sd-chip-calendar-suffix-size)}:host ::ng-deep .mat-mdc-form-field.sd-chip-calendar-field .sd-chip-calendar__open{display:inline-flex;align-items:center;justify-content:center;padding:0;border:0;border-radius:var(--sd-radius-6, 6px);background:transparent;color:var(--sd-text-secondary);cursor:pointer}:host ::ng-deep .mat-mdc-form-field.sd-chip-calendar-field .sd-chip-calendar__open:hover{background-color:color-mix(in srgb,var(--sd-text) 5%,transparent)}:host ::ng-deep .mat-mdc-form-field.sd-chip-calendar-field .sd-chip-calendar__open:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color);outline-offset:1px}:host ::ng-deep .mat-mdc-form-field.sd-chip-calendar-field .sd-chip-calendar__open--active{color:var(--sd-primary)}:host ::ng-deep .mat-mdc-form-field.sd-chip-calendar-field.sd-chip-calendar-field--open{--mdc-outlined-text-field-outline-color: var(--sd-primary);--mat-form-field-outlined-outline-color: var(--sd-primary);--mdc-outlined-text-field-hover-outline-color: var(--sd-primary);--mat-form-field-outlined-hover-outline-color: var(--sd-primary);--mdc-outlined-text-field-label-text-color: var(--sd-primary);--mat-form-field-outlined-label-text-color: var(--sd-primary);--mdc-outlined-text-field-hover-label-text-color: var(--sd-primary);--mat-form-field-outlined-hover-label-text-color: var(--sd-primary)}:host ::ng-deep .mat-mdc-form-field.sd-chip-calendar-field.sd-chip-calendar-field--open .mat-mdc-text-field-wrapper{box-shadow:var(--sd-control-ring, none)}@media(pointer:coarse){:host ::ng-deep .mat-mdc-form-field.sd-chip-calendar-field .mat-mdc-chip-remove:after{content:\"\";position:absolute;inset:50% auto auto 50%;width:24px;height:24px;transform:translate(-50%,-50%)}}@media(prefers-reduced-motion:no-preference){:host ::ng-deep .mat-mdc-form-field.sd-chip-calendar-field .sd-chip-calendar__more,:host ::ng-deep .mat-mdc-form-field.sd-chip-calendar-field .sd-chip-calendar__open,:host ::ng-deep .mat-mdc-form-field.sd-chip-calendar-field .mat-mdc-chip-remove{transition:background-color var(--sd-duration-fast, .12s) ease}}\n"] }]
|
|
396
731
|
}], ctorParameters: () => [] });
|
|
397
732
|
|
|
398
733
|
/**
|