@sdcorejs/angular 20.3.1 → 20.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 +67 -2
- package/components/badge/index.d.ts +188 -6
- package/components/button/index.d.ts +20 -1
- package/components/ckeditor-styles/index.d.ts +3 -18
- package/components/editor/index.d.ts +20 -17
- package/components/editor-engine/index.d.ts +246 -0
- package/components/file-explorer/index.d.ts +4 -2
- package/components/form-generic/index.d.ts +246 -35
- package/components/index.d.ts +1 -0
- package/components/mini-editor/index.d.ts +33 -70
- package/components/modal-resizable/index.d.ts +1 -124
- package/components/operator/index.d.ts +137 -8
- package/components/tab-router/index.d.ts +31 -18
- package/components/table/index.d.ts +84 -6
- package/components/window/index.d.ts +81 -0
- package/configurations/index.d.ts +8 -1
- 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 +142 -11
- package/fesm2022/sdcorejs-angular-components-avatar.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-badge.mjs +548 -24
- package/fesm2022/sdcorejs-angular-components-badge.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-button.mjs +33 -3
- package/fesm2022/sdcorejs-angular-components-button.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-ckeditor-styles.mjs +5 -20
- package/fesm2022/sdcorejs-angular-components-ckeditor-styles.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-data-state.mjs +1 -1
- package/fesm2022/sdcorejs-angular-components-data-state.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-editor-engine.mjs +1872 -0
- package/fesm2022/sdcorejs-angular-components-editor-engine.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-components-editor.mjs +457 -756
- 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 +2115 -1156
- 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 +177 -283
- 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 +262 -43
- 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 +192 -42
- 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 +460 -125
- package/fesm2022/sdcorejs-angular-forms-chip-calendar.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-date-range.mjs +75 -13
- package/fesm2022/sdcorejs-angular-forms-date-range.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-date.mjs +71 -18
- 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 +40 -5
- package/fesm2022/sdcorejs-angular-forms-input-number.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-input.mjs +50 -7
- package/fesm2022/sdcorejs-angular-forms-input.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-models.mjs +88 -5
- package/fesm2022/sdcorejs-angular-forms-models.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-radio.mjs +2 -2
- package/fesm2022/sdcorejs-angular-forms-radio.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-segmented.mjs +5 -4
- package/fesm2022/sdcorejs-angular-forms-segmented.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-select.mjs +63 -15
- 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-DnbDCdcz.mjs +478 -0
- package/fesm2022/sdcorejs-angular-modules-generic-generic-configuration.page-DnbDCdcz.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-generic-generic-form-host.page-EBHM4kx2.mjs +214 -0
- package/fesm2022/sdcorejs-angular-modules-generic-generic-form-host.page-EBHM4kx2.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-generic-generic-list.page-BtHe8YIW.mjs +277 -0
- package/fesm2022/sdcorejs-angular-modules-generic-generic-list.page-BtHe8YIW.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-generic-sdcorejs-angular-modules-generic-eFshU7ew.mjs +1556 -0
- package/fesm2022/sdcorejs-angular-modules-generic-sdcorejs-angular-modules-generic-eFshU7ew.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 +1825 -62
- 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/index.d.ts +5 -0
- package/forms/chip-calendar/index.d.ts +163 -18
- package/forms/date/index.d.ts +23 -2
- package/forms/date-range/index.d.ts +24 -2
- package/forms/directives/index.d.ts +47 -2
- package/forms/input/index.d.ts +23 -2
- package/forms/input-number/index.d.ts +23 -2
- package/forms/models/index.d.ts +38 -3
- package/forms/select/index.d.ts +32 -2
- package/i18n/index.d.ts +302 -2
- package/modules/generic/index.d.ts +316 -0
- package/modules/icon/index.d.ts +37 -6
- package/modules/index.d.ts +1 -0
- package/modules/layout/index.d.ts +536 -86
- package/package.json +41 -8
- package/pipes/index.d.ts +2 -0
- package/services/date-time/index.d.ts +57 -0
- package/services/index.d.ts +1 -0
- package/services/storage/index.d.ts +8 -1
- package/utilities/read-state/index.d.ts +2 -0
- package/utilities/theme/index.d.ts +1 -1
|
@@ -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: "20.3.25", ngImport: i0, type:
|
|
41
|
-
static
|
|
51
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ɵSdChipCalendarHeader, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
52
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.25", 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: "20.3.25", ngImport: i0, type:
|
|
44
|
-
type:
|
|
45
|
-
args: [{
|
|
46
|
-
|
|
47
|
-
}]
|
|
48
|
-
}], ctorParameters: () => [] });
|
|
54
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", 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, ...(ngDevMode ? [{ debugName: "menuTrigger" }] : []));
|
|
73
102
|
calendar = viewChild(MatCalendar, ...(ngDevMode ? [{ debugName: "calendar" }] : []));
|
|
103
|
+
// why: query signal không đặt được trên field ES private (#).
|
|
104
|
+
field = viewChild(MatFormField, ...(ngDevMode ? [{ debugName: "field" }] : []));
|
|
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, ...(ngDevMode ? [{ debugName: "isOpen" }] : []));
|
|
110
|
+
/** Month the popup opened at (4.2), fixed for one opening. */
|
|
111
|
+
openAt = signal(null, ...(ngDevMode ? [{ debugName: "openAt" }] : []));
|
|
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, ...(ngDevMode ? [{ debugName: "overlayOrigin" }] : []));
|
|
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, ...(ngDevMode ? [{ debugName: "autoIdInput", alias: 'autoId',
|
|
75
125
|
transform: (v) => v ?? undefined }] : [{
|
|
76
126
|
alias: 'autoId',
|
|
@@ -145,20 +195,60 @@ class SdChipCalendar {
|
|
|
145
195
|
placeholder = input(undefined, ...(ngDevMode ? [{ debugName: "placeholder", transform: (v) => v ?? undefined }] : [{
|
|
146
196
|
transform: (v) => v ?? undefined,
|
|
147
197
|
}]));
|
|
198
|
+
/**
|
|
199
|
+
* `true` / `false` for every chip, or a predicate. The predicate receives the normalised `yyyy/MM/dd` day and is
|
|
200
|
+
* applied on every removal path: the ✕ button, Backspace / Delete on a chip, pressing the day again in the
|
|
201
|
+
* calendar and clearing.
|
|
202
|
+
*/
|
|
148
203
|
removable = input(true, ...(ngDevMode ? [{ debugName: "removable", transform: (v) => v ?? true }] : [{
|
|
149
204
|
transform: (v) => v ?? true,
|
|
150
205
|
}]));
|
|
151
206
|
hideInlineError = input(false, ...(ngDevMode ? [{ debugName: "hideInlineError", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
152
207
|
required = input(false, ...(ngDevMode ? [{ debugName: "required", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
208
|
+
/** Fewest days to pick; > 0 adds `Validators.minLength`. Replaces `min`. */
|
|
209
|
+
minCount = input(undefined, ...(ngDevMode ? [{ debugName: "minCount", transform: (v) => v ?? undefined }] : [{
|
|
210
|
+
transform: (v) => v ?? undefined,
|
|
211
|
+
}]));
|
|
212
|
+
/** Most days to pick; > 0 adds `Validators.maxLength` and blocks picking more in the calendar (4.3). Replaces `max`. */
|
|
213
|
+
maxCount = input(undefined, ...(ngDevMode ? [{ debugName: "maxCount", transform: (v) => v ?? undefined }] : [{
|
|
214
|
+
transform: (v) => v ?? undefined,
|
|
215
|
+
}]));
|
|
216
|
+
/** @deprecated Use `minCount`; `minCount` wins when both are set. */
|
|
153
217
|
min = input(0, ...(ngDevMode ? [{ debugName: "min", transform: (v) => v ?? 0 }] : [{
|
|
154
218
|
transform: (v) => v ?? 0,
|
|
155
219
|
}]));
|
|
220
|
+
/** @deprecated Use `maxCount`; `maxCount` wins when both are set. */
|
|
156
221
|
max = input(0, ...(ngDevMode ? [{ debugName: "max", transform: (v) => v ?? 0 }] : [{
|
|
157
222
|
transform: (v) => v ?? 0,
|
|
158
223
|
}]));
|
|
224
|
+
/** Earliest day that can be picked; same reading as `minDate` of `<sd-date>` (`'TODAY'` = today in the zone). */
|
|
225
|
+
minDate = input(null, ...(ngDevMode ? [{ debugName: "minDate" }] : []));
|
|
226
|
+
/** Latest day that can be picked; same reading as `maxDate` of `<sd-date>`. */
|
|
227
|
+
maxDate = input(null, ...(ngDevMode ? [{ debugName: "maxDate" }] : []));
|
|
228
|
+
/** `false` makes a day unpickable. A chosen day stays removable even when the filter refuses it. Name of `mat-calendar`. */
|
|
229
|
+
dateFilter = input(null, ...(ngDevMode ? [{ debugName: "dateFilter" }] : []));
|
|
230
|
+
/** Month the popup opens at; without it, the chosen day nearest to today, else today (4.2). */
|
|
231
|
+
startAt = input(null, ...(ngDevMode ? [{ debugName: "startAt" }] : []));
|
|
232
|
+
/** Shows “Xoá hết” in the popup (and the clear button of the field). Off by default, like `clearable` of `<sd-date>`. */
|
|
233
|
+
clearable = input(false, ...(ngDevMode ? [{ debugName: "clearable", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
234
|
+
/**
|
|
235
|
+
* Chips shown while the popup is closed; the rest fold into a “+N” button that opens it. `null` shows them all.
|
|
236
|
+
* `2` is the suggestion inside `<sd-table>` filters.
|
|
237
|
+
*/
|
|
238
|
+
maxVisible = input(null, ...(ngDevMode ? [{ debugName: "maxVisible" }] : []));
|
|
239
|
+
/** Date format of the chips and of the viewed text, in Angular `DatePipe` syntax. */
|
|
240
|
+
displayFormat = input('dd/MM/yyyy', ...(ngDevMode ? [{ debugName: "displayFormat", transform: (v) => v || 'dd/MM/yyyy' }] : [{
|
|
241
|
+
transform: (v) => v || 'dd/MM/yyyy',
|
|
242
|
+
}]));
|
|
159
243
|
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
160
244
|
/** Display mode: `false` edit · `true` static view · `'inline'` interactive (disabled `'inline'` → static). */
|
|
161
245
|
viewed = input(false, ...(ngDevMode ? [{ debugName: "viewed", transform: sdViewedTransform }] : [{ transform: sdViewedTransform }]));
|
|
246
|
+
/**
|
|
247
|
+
* String form of each day when the value leaves the component, same contract as `<sd-date>`: `undefined` →
|
|
248
|
+
* `yyyy/MM/dd`, `'ISOString'` / `'UTCString'` → the start of the day (in `ISdCoreConfiguration.timeZone` when
|
|
249
|
+
* configured). Display is not affected.
|
|
250
|
+
*/
|
|
251
|
+
transform = input(...(ngDevMode ? [undefined, { debugName: "transform" }] : []));
|
|
162
252
|
// why: tri-state viewed — `'inline'` keeps it interactive; disabled `'inline'` falls back to static.
|
|
163
253
|
#viewedState = sdViewedInline(this.viewed, undefined, this.disabled);
|
|
164
254
|
/** `true` when the static view should render (`viewed===true`, or disabled `'inline'`). */
|
|
@@ -166,7 +256,10 @@ class SdChipCalendar {
|
|
|
166
256
|
hyperlink = input(undefined, ...(ngDevMode ? [{ debugName: "hyperlink", transform: (v) => v ?? undefined }] : [{
|
|
167
257
|
transform: (v) => v ?? undefined,
|
|
168
258
|
}]));
|
|
169
|
-
|
|
259
|
+
/**
|
|
260
|
+
* Two-way model. Read wide (each item `string | number | Date`, like `<sd-date>`), written back only on a user
|
|
261
|
+
* action, as `string[]`. A model from the parent is never rewritten.
|
|
262
|
+
*/
|
|
170
263
|
model = model(undefined, ...(ngDevMode ? [{ debugName: "model" }] : []));
|
|
171
264
|
// Outputs (modelChange auto-generated by model() signal)
|
|
172
265
|
sdChange = output();
|
|
@@ -177,46 +270,135 @@ class SdChipCalendar {
|
|
|
177
270
|
sdValueTemplate = contentChild('sdValue', ...(ngDevMode ? [{ debugName: "sdValueTemplate" }] : []));
|
|
178
271
|
isFocused = false;
|
|
179
272
|
#inputControl = new FormControl();
|
|
273
|
+
/** Holds the normalised days (`yyyy/MM/dd`, no duplicates, model order); the parent form gets this control
|
|
274
|
+
* unless a `transform` is set. */
|
|
180
275
|
#formControl = new SdFormControl();
|
|
181
276
|
// why: `min`/`max` là validator do CHÍNH component sở hữu; `required` đi qua option riêng của
|
|
182
277
|
// connector. Connector chỉ add/remove đúng phần này nên validator do consumer tự gắn vào
|
|
183
278
|
// `formControl` public không bị xoá — trước đây `clearValidators()` + `setValidators()` xoá sạch.
|
|
279
|
+
/** `minCount`, else the deprecated `min`. */
|
|
280
|
+
effectiveMinCount = computed(() => this.minCount() ?? this.min() ?? 0, ...(ngDevMode ? [{ debugName: "effectiveMinCount" }] : []));
|
|
281
|
+
/** `maxCount`, else the deprecated `max`. */
|
|
282
|
+
effectiveMaxCount = computed(() => this.maxCount() ?? this.max() ?? 0, ...(ngDevMode ? [{ debugName: "effectiveMaxCount" }] : []));
|
|
184
283
|
#validators = computed(() => {
|
|
185
284
|
const validators = [];
|
|
186
|
-
const min = this.
|
|
187
|
-
const max = this.
|
|
285
|
+
const min = this.effectiveMinCount();
|
|
286
|
+
const max = this.effectiveMaxCount();
|
|
188
287
|
if (min > 0)
|
|
189
288
|
validators.push(Validators.minLength(min));
|
|
190
289
|
if (max > 0)
|
|
191
290
|
validators.push(Validators.maxLength(max));
|
|
192
291
|
return validators;
|
|
193
292
|
}, ...(ngDevMode ? [{ debugName: "#validators" }] : []));
|
|
293
|
+
/**
|
|
294
|
+
* why: with a `transform` the model holds ISO / RFC-1123 strings while the control keeps `yyyy/MM/dd`. Like
|
|
295
|
+
* `<sd-date>`, the parent form then gets a control that carries the model, so `form.value` equals `modelChange`.
|
|
296
|
+
*/
|
|
297
|
+
#modelFacing = _sdModelFacingControl({
|
|
298
|
+
active: computed(() => !!this.transform()),
|
|
299
|
+
model: this.model,
|
|
300
|
+
writeModel: value => this.#writeModel(value),
|
|
301
|
+
source: computed(() => this.#formControl),
|
|
302
|
+
modelEquals: (left, right) => this.#modelsEqual(left, right),
|
|
303
|
+
});
|
|
194
304
|
#formConnector = _sdFormControlConnector({
|
|
195
305
|
form: this.form,
|
|
196
306
|
name: computed(() => this.name() || this.#name),
|
|
197
307
|
control: computed(() => this.#formControl),
|
|
308
|
+
registeredControl: this.#modelFacing.registered,
|
|
309
|
+
model: this.model,
|
|
310
|
+
writeModel: value => this.#writeModel(value),
|
|
311
|
+
modelToControl: value => this.#days(value),
|
|
312
|
+
controlToModel: days => this.#serializeDays(days),
|
|
313
|
+
modelEquals: (left, right) => this.#modelsEqual(left, right),
|
|
314
|
+
controlEquals: sameDays,
|
|
198
315
|
validators: this.#validators,
|
|
199
316
|
required: this.required,
|
|
200
317
|
});
|
|
201
318
|
#matcher;
|
|
202
|
-
|
|
319
|
+
#fullDate = computed(() => new Intl.DateTimeFormat(this.#i18n.locale(), FULL_DATE), ...(ngDevMode ? [{ debugName: "#fullDate" }] : []));
|
|
320
|
+
/** Chosen days, normalised (`yyyy/MM/dd`, model order). */
|
|
321
|
+
days = computed(() => this.#days(this.model()) ?? [], ...(ngDevMode ? [{ debugName: "days" }] : []));
|
|
322
|
+
/** `maxCount` reached: unchosen days are disabled and the popup says so (4.3). */
|
|
323
|
+
full = computed(() => {
|
|
324
|
+
const max = this.effectiveMaxCount();
|
|
325
|
+
return max > 0 && this.days().length >= max;
|
|
326
|
+
}, ...(ngDevMode ? [{ debugName: "full" }] : []));
|
|
327
|
+
/** At least one chosen day may be removed (enables “Xoá hết”). */
|
|
328
|
+
hasRemovable = computed(() => {
|
|
329
|
+
void this.removable();
|
|
330
|
+
return this.days().some(day => this.isRemovable(day));
|
|
331
|
+
}, ...(ngDevMode ? [{ debugName: "hasRemovable" }] : []));
|
|
332
|
+
/** Chosen days by date (B2). Display only: the model keeps its order. `yyyy/MM/dd` sorts as text in date order. */
|
|
333
|
+
sortedDays = computed(() => [...this.days()].sort(), ...(ngDevMode ? [{ debugName: "sortedDays" }] : []));
|
|
334
|
+
/** Chips on screen: all while the popup is open, else at most `maxVisible` (B3). */
|
|
335
|
+
visibleDays = computed(() => {
|
|
336
|
+
const days = this.sortedDays();
|
|
337
|
+
const max = this.maxVisible();
|
|
338
|
+
if (this.isOpen() || max === null || max === undefined || max < 0 || days.length <= max)
|
|
339
|
+
return days;
|
|
340
|
+
return days.slice(0, max);
|
|
341
|
+
}, ...(ngDevMode ? [{ debugName: "visibleDays" }] : []));
|
|
342
|
+
/** Icon sizes of the chips and suffix buttons for the current size. */
|
|
343
|
+
iconSizes = computed(() => FIELD_ICONS[this.size() === 'sm' || this.size() === 'lg' ? this.size() : 'md'], ...(ngDevMode ? [{ debugName: "iconSizes" }] : []));
|
|
344
|
+
/** Days folded into “+N”. */
|
|
345
|
+
hiddenCount = computed(() => this.sortedDays().length - this.visibleDays().length, ...(ngDevMode ? [{ debugName: "hiddenCount" }] : []));
|
|
346
|
+
/** Viewed text: days by date in `displayFormat`, joined by “, ” (C3). */
|
|
347
|
+
viewText = computed(() => this.sortedDays()
|
|
348
|
+
.map(day => this.formatDay(day))
|
|
349
|
+
.join(', '), ...(ngDevMode ? [{ debugName: "viewText" }] : []));
|
|
350
|
+
/** Placeholder while no day is chosen: the input, else “Chọn ngày” — no longer the label (B1). Empty once there are chips. */
|
|
351
|
+
effectivePlaceholder = computed(() => this.days().length ? '' : this.placeholder() || this.#i18n.t('core.form.chip-calendar.placeholder'), ...(ngDevMode ? [{ debugName: "effectivePlaceholder" }] : []));
|
|
352
|
+
resolvedMinDate = computed(() => this.#toDate(this.minDate()), ...(ngDevMode ? [{ debugName: "resolvedMinDate" }] : []));
|
|
353
|
+
resolvedMaxDate = computed(() => this.#toDate(this.maxDate()), ...(ngDevMode ? [{ debugName: "resolvedMaxDate" }] : []));
|
|
354
|
+
/**
|
|
355
|
+
* `dateFilter` handed to `mat-calendar` (4.1): a chosen day is pickable exactly when it may be removed (even against the
|
|
356
|
+
* consumer filter), an unchosen one when the limit is not reached and the consumer filter allows it. A new function on
|
|
357
|
+
* every change makes `mat-calendar` render its cells again.
|
|
358
|
+
*/
|
|
359
|
+
calendarFilter = computed(() => {
|
|
360
|
+
const chosen = new Set(this.days());
|
|
361
|
+
const full = this.full();
|
|
362
|
+
const consumer = this.dateFilter();
|
|
363
|
+
void this.removable();
|
|
364
|
+
return (date) => {
|
|
365
|
+
if (!date)
|
|
366
|
+
return false;
|
|
367
|
+
const day = DateUtilities.toFormat(date, 'yyyy/MM/dd');
|
|
368
|
+
if (chosen.has(day))
|
|
369
|
+
return this.isRemovable(day);
|
|
370
|
+
return !full && (!consumer || consumer(date));
|
|
371
|
+
};
|
|
372
|
+
}, ...(ngDevMode ? [{ debugName: "calendarFilter" }] : []));
|
|
373
|
+
/** Cell classes: `sd-chip-calendar-selected`, plus `sd-chip-calendar-locked` for a chosen day that cannot go. */
|
|
374
|
+
calendarDateClass = computed(() => {
|
|
375
|
+
const chosen = new Set(this.days());
|
|
376
|
+
void this.removable();
|
|
377
|
+
return (date, view = 'month') => {
|
|
378
|
+
if (view !== 'month')
|
|
379
|
+
return '';
|
|
380
|
+
const day = DateUtilities.toFormat(date, 'yyyy/MM/dd');
|
|
381
|
+
if (!chosen.has(day))
|
|
382
|
+
return '';
|
|
383
|
+
return this.isRemovable(day) ? 'sd-chip-calendar-selected' : 'sd-chip-calendar-selected sd-chip-calendar-locked';
|
|
384
|
+
};
|
|
385
|
+
}, ...(ngDevMode ? [{ debugName: "calendarDateClass" }] : []));
|
|
203
386
|
constructor() {
|
|
204
|
-
effect(() => {
|
|
205
|
-
const values = this.model();
|
|
206
|
-
if (Array.isArray(values)) {
|
|
207
|
-
this.#formControl.setValue(values);
|
|
208
|
-
}
|
|
209
|
-
});
|
|
210
387
|
effect(() => {
|
|
211
388
|
const isDisabled = this.disabled();
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
389
|
+
// why: `enable()` / `disable()` phát `valueChanges`; connector sẽ coi đó là thao tác và ghi model (đã
|
|
390
|
+
// transform) ngược lên cha. Chỉ đổi khi trạng thái thật sự khác, và không phát event.
|
|
391
|
+
if (isDisabled !== this.#formControl.disabled) {
|
|
392
|
+
if (isDisabled)
|
|
393
|
+
this.#formControl.disable({ emitEvent: false });
|
|
394
|
+
else
|
|
395
|
+
this.#formControl.enable({ emitEvent: false });
|
|
396
|
+
this.#ref.markForCheck();
|
|
215
397
|
}
|
|
216
|
-
|
|
217
|
-
this.#
|
|
398
|
+
if (isDisabled)
|
|
399
|
+
this.#inputControl.disable();
|
|
400
|
+
else
|
|
218
401
|
this.#inputControl.enable();
|
|
219
|
-
}
|
|
220
402
|
});
|
|
221
403
|
effect(() => {
|
|
222
404
|
const nameVal = this.name();
|
|
@@ -224,7 +406,15 @@ class SdChipCalendar {
|
|
|
224
406
|
this.#name = nameVal;
|
|
225
407
|
}
|
|
226
408
|
});
|
|
227
|
-
|
|
409
|
+
effect(() => {
|
|
410
|
+
if ((this.min() > 0 || this.max() > 0) && !this.#warnedDeprecated && isDevMode()) {
|
|
411
|
+
this.#warnedDeprecated = true;
|
|
412
|
+
console.warn('[sd-chip-calendar] `min` / `max` are deprecated; use `minCount` / `maxCount`.');
|
|
413
|
+
}
|
|
414
|
+
});
|
|
415
|
+
// why: `submitted` của form cha không phải signal; submit phải vẽ lại lỗi dưới OnPush.
|
|
416
|
+
this.#parentForm?.ngSubmit.pipe(takeUntilDestroyed(inject(DestroyRef))).subscribe(() => this.#ref.markForCheck());
|
|
417
|
+
this.#matcher = { isErrorState: (_control, form) => this.#errorGate(form) };
|
|
228
418
|
}
|
|
229
419
|
get formControl() {
|
|
230
420
|
return this.#formControl;
|
|
@@ -241,8 +431,8 @@ class SdChipCalendar {
|
|
|
241
431
|
errorMessage = computed(() => {
|
|
242
432
|
void this.#state();
|
|
243
433
|
void this.required();
|
|
244
|
-
const min = this.
|
|
245
|
-
const max = this.
|
|
434
|
+
const min = this.effectiveMinCount();
|
|
435
|
+
const max = this.effectiveMaxCount();
|
|
246
436
|
const errors = this.#formControl.errors;
|
|
247
437
|
if (!errors)
|
|
248
438
|
return undefined;
|
|
@@ -257,6 +447,97 @@ class SdChipCalendar {
|
|
|
257
447
|
get matcher() {
|
|
258
448
|
return this.#matcher;
|
|
259
449
|
}
|
|
450
|
+
/**
|
|
451
|
+
* The one place that decides whether the error shows (A4): `ErrorStateMatcher`, `<mat-error>`, `aria-invalid` and
|
|
452
|
+
* the `hideInlineError` icon all read it. Invalid and touched, or the parent form was submitted; a selection that
|
|
453
|
+
* is still too short while the user picks (dirty only) shows nothing.
|
|
454
|
+
*/
|
|
455
|
+
isErrorShown() {
|
|
456
|
+
return !!this.errorMessage() && this.#errorGate();
|
|
457
|
+
}
|
|
458
|
+
#errorGate(form) {
|
|
459
|
+
const control = this.#formControl;
|
|
460
|
+
return control.invalid && (control.touched || !!(form ?? this.#parentForm)?.submitted);
|
|
461
|
+
}
|
|
462
|
+
/** Whether `day` (`yyyy/MM/dd`) may be removed, per `removable`. */
|
|
463
|
+
isRemovable(day) {
|
|
464
|
+
const removable = this.removable();
|
|
465
|
+
return typeof removable === 'function' ? !!removable(day) : removable;
|
|
466
|
+
}
|
|
467
|
+
/** Accessible name of a chip: the full date in the current locale, plus the locked note. */
|
|
468
|
+
chipLabel(day) {
|
|
469
|
+
const full = this.#fullDate().format(dayToDate(day));
|
|
470
|
+
return this.isRemovable(day) ? full : `${full}, ${this.#i18n.t('core.form.chip-calendar.locked')}`;
|
|
471
|
+
}
|
|
472
|
+
/** A chip day in `displayFormat` (Angular `DatePipe` / `formatDate` syntax, as the chips used before). */
|
|
473
|
+
formatDay(day) {
|
|
474
|
+
return formatDate(dayToDate(day), this.displayFormat(), this.#locale);
|
|
475
|
+
}
|
|
476
|
+
/** Accessible name of the ✕ button of a chip. */
|
|
477
|
+
removeLabel(day) {
|
|
478
|
+
return this.#i18n.t('core.form.chip-calendar.remove', { date: this.#fullDate().format(dayToDate(day)) });
|
|
479
|
+
}
|
|
480
|
+
/** Opens the popup at the month of 4.2. No-op when disabled, viewed or already open. */
|
|
481
|
+
open() {
|
|
482
|
+
if (this.#formControl.disabled || this.isViewed() || this.isOpen())
|
|
483
|
+
return;
|
|
484
|
+
this.openAt.set(this.#firstMonth());
|
|
485
|
+
this.overlayOrigin.set(this.field()?.getConnectedOverlayOrigin());
|
|
486
|
+
this.isOpen.set(true);
|
|
487
|
+
this.#ref.markForCheck();
|
|
488
|
+
}
|
|
489
|
+
/** Closes the popup and marks the field touched (A4); `returnFocus` puts focus back on the input (Esc, “Xong”). */
|
|
490
|
+
close(returnFocus = false) {
|
|
491
|
+
if (!this.isOpen())
|
|
492
|
+
return;
|
|
493
|
+
this.isOpen.set(false);
|
|
494
|
+
this.isFocused = false;
|
|
495
|
+
this.#formConnector.markAsTouched();
|
|
496
|
+
this.#ref.markForCheck();
|
|
497
|
+
if (returnFocus)
|
|
498
|
+
this.input()?.nativeElement.focus();
|
|
499
|
+
}
|
|
500
|
+
/** Focus goes to the active day of the grid once the panel is attached. */
|
|
501
|
+
onAttach() {
|
|
502
|
+
this.#timers.schedule(() => this.calendar()?.focusActiveCell(), 0);
|
|
503
|
+
}
|
|
504
|
+
onOverlayKeydown(event) {
|
|
505
|
+
if (event.key === 'Escape' || event.key === 'Esc') {
|
|
506
|
+
event.preventDefault();
|
|
507
|
+
this.close(true);
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
/** A click outside closes; a click on the field itself is left to the field (it keeps the popup open). */
|
|
511
|
+
onOutsideClick(event) {
|
|
512
|
+
const target = event.target;
|
|
513
|
+
if (target && this.#host.contains(target))
|
|
514
|
+
return;
|
|
515
|
+
this.close();
|
|
516
|
+
}
|
|
517
|
+
/** Click on the empty part of the field or on the input opens the popup; chips stop the click (3 · 2). */
|
|
518
|
+
onFieldClick() {
|
|
519
|
+
this.open();
|
|
520
|
+
}
|
|
521
|
+
/** Calendar button of the suffix: opens or closes the popup without the field click opening it again. */
|
|
522
|
+
onToggleClick(event) {
|
|
523
|
+
event.stopPropagation();
|
|
524
|
+
if (this.isOpen())
|
|
525
|
+
this.close();
|
|
526
|
+
else
|
|
527
|
+
this.open();
|
|
528
|
+
}
|
|
529
|
+
/** “+N” opens the popup, where every chip shows. */
|
|
530
|
+
onMoreClick(event) {
|
|
531
|
+
event.stopPropagation();
|
|
532
|
+
this.open();
|
|
533
|
+
}
|
|
534
|
+
/** Enter, Space, ArrowDown and Alt+ArrowDown on the input open the popup. */
|
|
535
|
+
onInputKeydown(event) {
|
|
536
|
+
if (event.key === 'Enter' || event.key === ' ' || event.key === 'ArrowDown') {
|
|
537
|
+
event.preventDefault();
|
|
538
|
+
this.open();
|
|
539
|
+
}
|
|
540
|
+
}
|
|
260
541
|
ngAfterViewInit() {
|
|
261
542
|
this.#subscription.add(this.#formControl.sdChanges.subscribe(() => {
|
|
262
543
|
this.#ref.markForCheck();
|
|
@@ -265,6 +546,89 @@ class SdChipCalendar {
|
|
|
265
546
|
ngOnDestroy() {
|
|
266
547
|
this.#subscription.unsubscribe();
|
|
267
548
|
}
|
|
549
|
+
/** Normalised days of a model: one `yyyy/MM/dd` per calendar day, model order, unreadable items skipped. */
|
|
550
|
+
#days(value) {
|
|
551
|
+
if (!Array.isArray(value))
|
|
552
|
+
return null;
|
|
553
|
+
const zone = this.#zoned ? this.#dateTime : null;
|
|
554
|
+
const days = [];
|
|
555
|
+
let unreadable = false;
|
|
556
|
+
for (const item of value) {
|
|
557
|
+
const day = _sdNormalizeCalendarDay(item, zone);
|
|
558
|
+
if (!day) {
|
|
559
|
+
unreadable = true;
|
|
560
|
+
continue;
|
|
561
|
+
}
|
|
562
|
+
if (!days.includes(day))
|
|
563
|
+
days.push(day);
|
|
564
|
+
}
|
|
565
|
+
if (unreadable && !this.#warnedUnreadable && isDevMode()) {
|
|
566
|
+
this.#warnedUnreadable = true;
|
|
567
|
+
console.warn('[sd-chip-calendar] Skipped model items that are not dates:', value);
|
|
568
|
+
}
|
|
569
|
+
return days;
|
|
570
|
+
}
|
|
571
|
+
/** Days → the model written back: `yyyy/MM/dd`, or the start of each day per `transform` (like `<sd-date>`). */
|
|
572
|
+
#serializeDays(days) {
|
|
573
|
+
if (!days)
|
|
574
|
+
return days;
|
|
575
|
+
const transform = this.transform();
|
|
576
|
+
if (!transform)
|
|
577
|
+
return [...days];
|
|
578
|
+
return days.map(day => {
|
|
579
|
+
const startOfDay = sdLocalStartOfDay(dayToDate(day));
|
|
580
|
+
return sdSerializeTemporalValue(this.#zoned ? this.#dateTime.fromWallClock(startOfDay) : startOfDay, transform) ?? day;
|
|
581
|
+
});
|
|
582
|
+
}
|
|
583
|
+
/**
|
|
584
|
+
* 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
|
|
585
|
+
* 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.
|
|
586
|
+
*/
|
|
587
|
+
#modelsEqual(left, right) {
|
|
588
|
+
if (this.transform())
|
|
589
|
+
return sameDays(left, right);
|
|
590
|
+
return sameDays(this.#days(left), this.#days(right));
|
|
591
|
+
}
|
|
592
|
+
#writeModel(value) {
|
|
593
|
+
this.model.set(value);
|
|
594
|
+
this.sdChange.emit(value ? value : []);
|
|
595
|
+
}
|
|
596
|
+
#currentDays() {
|
|
597
|
+
const value = this.#formControl.value;
|
|
598
|
+
return Array.isArray(value) ? value : [];
|
|
599
|
+
}
|
|
600
|
+
/** Today as a local-midnight carrier: in the configured zone, else the machine's. */
|
|
601
|
+
#today() {
|
|
602
|
+
return this.#zoned ? this.#dateTime.today() : sdLocalStartOfDay(new Date());
|
|
603
|
+
}
|
|
604
|
+
/** `minDate` / `maxDate` / `startAt` → local-midnight carrier, read like a model item. */
|
|
605
|
+
#toDate(value) {
|
|
606
|
+
if (value === 'TODAY')
|
|
607
|
+
return this.#today();
|
|
608
|
+
const day = _sdNormalizeCalendarDay(value, this.#zoned ? this.#dateTime : null);
|
|
609
|
+
return day ? dayToDate(day) : null;
|
|
610
|
+
}
|
|
611
|
+
/** 4.2: `startAt`; else the chosen day nearest to today (a later one on a tie); else today. */
|
|
612
|
+
#firstMonth() {
|
|
613
|
+
const start = this.#toDate(this.startAt());
|
|
614
|
+
if (start)
|
|
615
|
+
return start;
|
|
616
|
+
const today = this.#today().getTime();
|
|
617
|
+
let best = null;
|
|
618
|
+
for (const day of this.days()) {
|
|
619
|
+
const date = dayToDate(day);
|
|
620
|
+
const distance = Math.abs(date.getTime() - today);
|
|
621
|
+
const bestDistance = best ? Math.abs(best.getTime() - today) : Infinity;
|
|
622
|
+
if (distance < bestDistance || (distance === bestDistance && best !== null && date > best))
|
|
623
|
+
best = date;
|
|
624
|
+
}
|
|
625
|
+
return best ?? this.#today();
|
|
626
|
+
}
|
|
627
|
+
/** Every user action ends here: a new array of days, written once (the connector writes the model). */
|
|
628
|
+
#commit(next) {
|
|
629
|
+
this.#formControl.setValue(next);
|
|
630
|
+
this.#ref.markForCheck();
|
|
631
|
+
}
|
|
268
632
|
#clickChip = (event, item) => {
|
|
269
633
|
event.stopPropagation();
|
|
270
634
|
event.stopImmediatePropagation();
|
|
@@ -272,41 +636,16 @@ class SdChipCalendar {
|
|
|
272
636
|
this.#focus();
|
|
273
637
|
}
|
|
274
638
|
};
|
|
275
|
-
#remove = (
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
// why: `filter` đã trả mảng mới nên reference đổi →
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
this.model.set(next);
|
|
282
|
-
this.sdChange.emit(next);
|
|
639
|
+
#remove = (day) => {
|
|
640
|
+
if (typeof day === 'string' && this.isRemovable(day)) {
|
|
641
|
+
const days = this.#currentDays();
|
|
642
|
+
// why: `filter` đã trả mảng mới nên reference đổi → model ghi một lần.
|
|
643
|
+
if (days.includes(day))
|
|
644
|
+
this.#commit(days.filter(value => value !== day));
|
|
283
645
|
}
|
|
284
646
|
this.#inputControl.setValue('');
|
|
285
647
|
this.#focus();
|
|
286
648
|
};
|
|
287
|
-
#select = (event) => {
|
|
288
|
-
const item = event.option.value;
|
|
289
|
-
const values = this.#formControl.value ?? [];
|
|
290
|
-
if (item) {
|
|
291
|
-
if (typeof item === 'string' || typeof item === 'number') {
|
|
292
|
-
if (!values.includes(item)) {
|
|
293
|
-
// why: PHẢI tạo mảng MỚI. `values` là chính mảng của consumer (model đi thẳng vào
|
|
294
|
-
// formControl), nên `push` vừa sửa trộm mảng của họ, vừa giữ nguyên reference —
|
|
295
|
-
// `model()` dùng equality Object.is nên `model.set(sameRef)` KHÔNG phát `modelChange`.
|
|
296
|
-
const next = [...values, item];
|
|
297
|
-
this.#formControl.setValue(next);
|
|
298
|
-
this.model.set(next);
|
|
299
|
-
this.sdChange.emit(next);
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
|
-
const inputEl = this.input();
|
|
303
|
-
if (inputEl)
|
|
304
|
-
inputEl.nativeElement.value = '';
|
|
305
|
-
this.#inputControl.setValue('', {
|
|
306
|
-
emitEvent: false,
|
|
307
|
-
});
|
|
308
|
-
}
|
|
309
|
-
};
|
|
310
649
|
#onClick = () => {
|
|
311
650
|
if (this.sdViewDef()?.templateRef) {
|
|
312
651
|
if (!this.#formControl.disabled && !this.isFocused) {
|
|
@@ -316,7 +655,6 @@ class SdChipCalendar {
|
|
|
316
655
|
};
|
|
317
656
|
#focus = () => {
|
|
318
657
|
this.isFocused = true;
|
|
319
|
-
this.#isBlurring = false;
|
|
320
658
|
// why: vẫn 100ms như cũ — chỉ scope handle theo DestroyRef.
|
|
321
659
|
this.#timers.schedule(() => {
|
|
322
660
|
if (this.isFocused) {
|
|
@@ -324,44 +662,39 @@ class SdChipCalendar {
|
|
|
324
662
|
}
|
|
325
663
|
}, 100);
|
|
326
664
|
};
|
|
665
|
+
/** Removes every day the predicate allows; kept days stay. One change, none when nothing goes. */
|
|
327
666
|
#clear = (evt) => {
|
|
328
667
|
evt?.stopPropagation();
|
|
329
668
|
this.#inputControl.setValue('');
|
|
330
|
-
this.#
|
|
331
|
-
|
|
332
|
-
|
|
669
|
+
const days = this.#currentDays();
|
|
670
|
+
const kept = days.filter(day => !this.isRemovable(day));
|
|
671
|
+
if (kept.length !== days.length)
|
|
672
|
+
this.#commit(kept);
|
|
333
673
|
this.#ref.detectChanges();
|
|
334
674
|
};
|
|
335
675
|
#selectDate = (date) => {
|
|
336
|
-
|
|
337
|
-
const
|
|
338
|
-
if (
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
this
|
|
344
|
-
|
|
345
|
-
this.sdChange.emit(next);
|
|
346
|
-
this.calendar()?.updateTodaysDate();
|
|
347
|
-
this.#ref.markForCheck();
|
|
676
|
+
// 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ố.
|
|
677
|
+
const day = DateUtilities.toFormat(date, 'yyyy/MM/dd');
|
|
678
|
+
if (!day)
|
|
679
|
+
return;
|
|
680
|
+
const days = this.#currentDays();
|
|
681
|
+
if (days.includes(day)) {
|
|
682
|
+
// A1: bấm lại ngày đã chọn chỉ bỏ khi predicate cho phép.
|
|
683
|
+
if (this.isRemovable(day))
|
|
684
|
+
this.#commit(days.filter(value => value !== day));
|
|
348
685
|
}
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
const selected = dates.some(date => date === DateUtilities.toFormat(cellDate, 'yyyy/MM/dd'));
|
|
358
|
-
return selected ? 'sd-chip-calendar-selected-date' : '';
|
|
686
|
+
else {
|
|
687
|
+
this.#commit([...days, day]);
|
|
688
|
+
}
|
|
689
|
+
// 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.
|
|
690
|
+
const calendar = this.calendar();
|
|
691
|
+
if (calendar && date) {
|
|
692
|
+
calendar.activeDate = date;
|
|
693
|
+
this.#timers.schedule(() => this.calendar()?.focusActiveCell(), 0);
|
|
359
694
|
}
|
|
360
|
-
return '';
|
|
361
695
|
};
|
|
362
696
|
onClickChip = (event, item) => this.#clickChip(event, item);
|
|
363
697
|
onRemove = (item) => this.#remove(item);
|
|
364
|
-
onSelect = (event) => this.#select(event);
|
|
365
698
|
onClick = () => this.#onClick();
|
|
366
699
|
/**
|
|
367
700
|
* why: khi `sdViewDef` đang hiển thị thì bên trong KHÔNG còn phần tử nào focus được, nên
|
|
@@ -375,10 +708,12 @@ class SdChipCalendar {
|
|
|
375
708
|
};
|
|
376
709
|
onClear = (evt) => this.#clear(evt);
|
|
377
710
|
onSelectDate = (date) => this.#selectDate(date);
|
|
378
|
-
|
|
379
|
-
|
|
711
|
+
/** Closes the popup without moving focus (outside click); marks the field touched. */
|
|
712
|
+
onCloseCalendar = () => this.close();
|
|
713
|
+
/** Classes of a month-view cell; see `calendarDateClass`. */
|
|
714
|
+
dateClass = (cellDate) => this.calendarDateClass()(cellDate);
|
|
380
715
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdChipCalendar, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
381
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", 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: "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", "readonly", "matChipInputDisabledInteractive"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { kind: "directive", type: i5.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: i5.MatChipRow, selector: "mat-chip-row, [mat-chip-row], mat-basic-chip-row, [mat-basic-chip-row]", inputs: ["editable"], outputs: ["edited"] }, { kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i6.MatCalendar, selector: "mat-calendar", inputs: ["headerComponent", "startAt", "startView", "selected", "minDate", "maxDate", "dateFilter", "dateClass", "comparisonStart", "comparisonEnd", "startDateAccessibleName", "endDateAccessibleName"], outputs: ["selectedChange", "yearSelected", "monthSelected", "viewChanged", "_userSelection", "_userDragDrop"], exportAs: ["matCalendar"] }, { kind: "ngmodule", type: MatNativeDateModule }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i7.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "directive", type: i7.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "component", type: SdLabel, selector: "sd-label", inputs: ["label", "description", "required", "helperText", "for", "labelId"] }, { kind: "component", type: SdView, selector: "sd-view", inputs: ["label", "value", "display", "hyperlink", "labelTemplate", "valueTemplate", "selectedItems"] }, { kind: "pipe", type: i1.DatePipe, name: "date" }, { kind: "pipe", type: SdRemovableChipPipe, name: "sdRemovableChip" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
716
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", 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", "readonly", "matChipInputDisabledInteractive"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { kind: "directive", type: i5.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: i5.MatChipRow, selector: "mat-chip-row, [mat-chip-row], mat-basic-chip-row, [mat-basic-chip-row]", inputs: ["editable"], outputs: ["edited"] }, { kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i6.MatCalendar, selector: "mat-calendar", inputs: ["headerComponent", "startAt", "startView", "selected", "minDate", "maxDate", "dateFilter", "dateClass", "comparisonStart", "comparisonEnd", "startDateAccessibleName", "endDateAccessibleName"], outputs: ["selectedChange", "yearSelected", "monthSelected", "viewChanged", "_userSelection", "_userDragDrop"], exportAs: ["matCalendar"] }, { kind: "ngmodule", type: MatNativeDateModule }, { kind: "ngmodule", type: OverlayModule }, { kind: "directive", type: i7.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i8.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "component", type: SdButton, selector: "sd-button", inputs: ["autoId", "type", "color", "size", "fontSet", "title", "width", "tooltip", "prefixIcon", "suffixIcon", "disabled", "openOnHover", "loading", "block", "htmlType", "indicator", "indicatorColor", "indicatorMax", "indicatorLabel"], outputs: ["click"] }, { kind: "component", type: SdLabel, selector: "sd-label", inputs: ["label", "description", "required", "helperText", "for", "labelId"] }, { kind: "component", type: SdView, selector: "sd-view", inputs: ["label", "value", "display", "hyperlink", "labelTemplate", "valueTemplate", "selectedItems"] }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
382
717
|
}
|
|
383
718
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdChipCalendar, decorators: [{
|
|
384
719
|
type: Component,
|
|
@@ -394,17 +729,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
394
729
|
MatInputModule,
|
|
395
730
|
MatTooltipModule,
|
|
396
731
|
MatFormFieldModule,
|
|
397
|
-
MatAutocompleteModule,
|
|
398
|
-
MatProgressSpinnerModule,
|
|
399
732
|
MatChipsModule,
|
|
400
733
|
MatDatepickerModule,
|
|
401
734
|
MatNativeDateModule,
|
|
402
|
-
|
|
735
|
+
OverlayModule,
|
|
736
|
+
A11yModule,
|
|
737
|
+
SdButton,
|
|
738
|
+
SdTranslatePipe,
|
|
403
739
|
SdLabel,
|
|
404
740
|
SdView,
|
|
405
|
-
SdRemovableChipPipe,
|
|
406
|
-
], 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"] }]
|
|
407
|
-
}], ctorParameters: () => [], propDecorators: { menuTrigger: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatMenuTrigger), { isSignal: true }] }], calendar: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatCalendar), { isSignal: true }] }], autoIdInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoId", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], labelPlacement: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelPlacement", required: false }] }], floatLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "floatLabel", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], form: [{ type: i0.Input, args: [{ isSignal: true, alias: "form", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], removable: [{ type: i0.Input, args: [{ isSignal: true, alias: "removable", required: false }] }], hideInlineError: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideInlineError", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], viewed: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewed", required: false }] }], hyperlink: [{ type: i0.Input, args: [{ isSignal: true, alias: "hyperlink", required: false }] }], model: [{ type: i0.Input, args: [{ isSignal: true, alias: "model", required: false }] }, { type: i0.Output, args: ["modelChange"] }], sdChange: [{ type: i0.Output, args: ["sdChange"] }], input: [{ type: i0.ViewChild, args: ['input', { isSignal: true }] }], sdViewDef: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SdViewDefDirective), { isSignal: true }] }], sdLabelDef: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SdLabelDefDirective), { isSignal: true }] }], sdLabelTemplate: [{ type: i0.ContentChild, args: ['sdLabel', { isSignal: true }] }], sdValueTemplate: [{ type: i0.ContentChild, args: ['sdValue', { isSignal: true }] }] } });
|
|
741
|
+
], 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"] }]
|
|
742
|
+
}], ctorParameters: () => [], propDecorators: { calendar: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatCalendar), { isSignal: true }] }], field: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatFormField), { isSignal: true }] }], autoIdInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoId", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], labelPlacement: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelPlacement", required: false }] }], floatLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "floatLabel", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], form: [{ type: i0.Input, args: [{ isSignal: true, alias: "form", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], removable: [{ type: i0.Input, args: [{ isSignal: true, alias: "removable", required: false }] }], hideInlineError: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideInlineError", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], minCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "minCount", required: false }] }], maxCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxCount", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], minDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "minDate", required: false }] }], maxDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDate", required: false }] }], dateFilter: [{ type: i0.Input, args: [{ isSignal: true, alias: "dateFilter", required: false }] }], startAt: [{ type: i0.Input, args: [{ isSignal: true, alias: "startAt", required: false }] }], clearable: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearable", required: false }] }], maxVisible: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxVisible", required: false }] }], displayFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayFormat", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], viewed: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewed", required: false }] }], transform: [{ type: i0.Input, args: [{ isSignal: true, alias: "transform", required: false }] }], hyperlink: [{ type: i0.Input, args: [{ isSignal: true, alias: "hyperlink", required: false }] }], model: [{ type: i0.Input, args: [{ isSignal: true, alias: "model", required: false }] }, { type: i0.Output, args: ["modelChange"] }], sdChange: [{ type: i0.Output, args: ["sdChange"] }], input: [{ type: i0.ViewChild, args: ['input', { isSignal: true }] }], sdViewDef: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SdViewDefDirective), { isSignal: true }] }], sdLabelDef: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SdLabelDefDirective), { isSignal: true }] }], sdLabelTemplate: [{ type: i0.ContentChild, args: ['sdLabel', { isSignal: true }] }], sdValueTemplate: [{ type: i0.ContentChild, args: ['sdValue', { isSignal: true }] }] } });
|
|
408
743
|
|
|
409
744
|
/**
|
|
410
745
|
* Generated bundle index. Do not edit.
|