@magicx-eng/ai-autocomplete-angular 0.53.0 → 0.55.0
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/REFERENCE.md +4 -2
- package/esm2020/lib/ai-autocomplete-dropdown/ai-autocomplete-dropdown.component.mjs +2 -1
- package/esm2020/lib/controller/ai-autocomplete.controller.mjs +2 -1
- package/esm2020/lib/internal/date-grid/date-grid.component.mjs +11 -3
- package/esm2020/lib/shared/types.mjs +1 -1
- package/fesm2015/magicx-eng-ai-autocomplete-angular.mjs +16 -6
- package/fesm2015/magicx-eng-ai-autocomplete-angular.mjs.map +1 -1
- package/fesm2020/magicx-eng-ai-autocomplete-angular.mjs +12 -2
- package/fesm2020/magicx-eng-ai-autocomplete-angular.mjs.map +1 -1
- package/lib/ai-autocomplete-dropdown/ai-autocomplete-dropdown.component.d.ts.map +1 -1
- package/lib/internal/date-grid/date-grid.component.d.ts +2 -0
- package/lib/internal/date-grid/date-grid.component.d.ts.map +1 -1
- package/lib/shared/types.d.ts +2 -0
- package/lib/shared/types.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -71,6 +71,14 @@ class DateGridComponent {
|
|
|
71
71
|
range: this.paintedRange,
|
|
72
72
|
}).inRange;
|
|
73
73
|
}
|
|
74
|
+
/** A day another answer already holds: boxed for reference, still pickable. */
|
|
75
|
+
isReference(option) {
|
|
76
|
+
return dateCellMarks$1(cellIso$1(option), {
|
|
77
|
+
selectedIso: this.selection.selectedIso,
|
|
78
|
+
range: this.paintedRange,
|
|
79
|
+
references: this.selection.references,
|
|
80
|
+
}).reference;
|
|
81
|
+
}
|
|
74
82
|
/**
|
|
75
83
|
* While a start is pending, the span runs to whatever cell is highlighted —
|
|
76
84
|
* the hover/arrow preview that tells the user the first tap registered.
|
|
@@ -106,10 +114,10 @@ class DateGridComponent {
|
|
|
106
114
|
}
|
|
107
115
|
}
|
|
108
116
|
DateGridComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DateGridComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
109
|
-
DateGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DateGridComponent, isStandalone: true, selector: "aia-date-grid", inputs: { options: "options", activeIndex: "activeIndex", listboxId: "listboxId", view: "view", selection: "selection" }, outputs: { select: "select", highlight: "highlight", unhighlight: "unhighlight", previousMonth: "previousMonth", nextMonth: "nextMonth" }, ngImport: i0, template: "<div class=\"magicx-aia-datepicker\" data-aia-datepicker=\"\">\n <div class=\"magicx-aia-datepicker-header\">\n <!-- tabIndex -1 for the same reason the skip button is: Tab is already\n bound to walking the dropdown's options. -->\n <button\n type=\"button\"\n tabindex=\"-1\"\n class=\"magicx-aia-datepicker-nav\"\n data-aia-date-prev=\"\"\n aria-label=\"Previous month\"\n (mousedown)=\"preventBlur($event)\"\n (click)=\"previousMonth.emit()\"\n >\n ‹\n </button>\n <span class=\"magicx-aia-datepicker-month\" data-aia-date-month=\"\" aria-live=\"polite\">\n {{ monthLabel }}\n </span>\n <button\n type=\"button\"\n tabindex=\"-1\"\n class=\"magicx-aia-datepicker-nav\"\n data-aia-date-next=\"\"\n aria-label=\"Next month\"\n (mousedown)=\"preventBlur($event)\"\n (click)=\"nextMonth.emit()\"\n >\n ›\n </button>\n </div>\n\n <!-- Decorative: each cell announces its own full date, so repeating the\n column letters to AT adds noise \u2014 and the duplicate T/S would be\n meaningless read aloud anyway. -->\n <div class=\"magicx-aia-datepicker-weekdays\" aria-hidden=\"true\">\n <span class=\"magicx-aia-datepicker-weekday\" *ngFor=\"let label of weekdays\">{{ label }}</span>\n </div>\n\n <div class=\"magicx-aia-datepicker-grid\" data-aia-date-grid=\"\">\n <ng-container *ngFor=\"let option of options; trackBy: trackByCell; let i = index\">\n <!-- Padding for the days before the 1st / after the last. Non-tappable,\n so arrow navigation skips it; hidden from AT so the month reads as\n its own days and nothing else. -->\n <div\n *ngIf=\"dayOf(option) === null; else dayCell\"\n [id]=\"listboxId + '-option-' + i\"\n role=\"option\"\n data-aia-option=\"\"\n data-aia-date-cell=\"\"\n aria-hidden=\"true\"\n [attr.aria-selected]=\"false\"\n tabindex=\"-1\"\n class=\"magicx-aia-date-cell magicx-aia-date-cell--blank\"\n ></div>\n\n <ng-template #dayCell>\n <!-- A day already gone by is de-emphasized, not disabled: it renders\n dimmed but stays every bit as pickable as the rest of the month. -->\n <div\n [id]=\"listboxId + '-option-' + i\"\n role=\"option\"\n data-aia-option=\"\"\n data-aia-date-cell=\"\"\n [attr.aria-selected]=\"i === activeIndex\"\n [attr.aria-label]=\"option.text\"\n tabindex=\"0\"\n class=\"magicx-aia-date-cell magicx-aia-date-cell--day\"\n [class.magicx-aia-date-cell--past]=\"isPast(option)\"\n [class.magicx-aia-date-cell--highlighted]=\"i === activeIndex\"\n [class.magicx-aia-date-cell--today]=\"isToday(option)\"\n [class.magicx-aia-date-cell--in-range]=\"isInRange(option)\"\n [class.magicx-aia-date-cell--selected]=\"isSelected(option)\"\n [class.magicx-aia-date-cell--pressed]=\"i === pressedIndex\"\n (click)=\"onSelect(option, i)\"\n (keydown)=\"onKeyDown($event, option, i)\"\n (mouseenter)=\"highlight.emit(i)\"\n (mouseleave)=\"unhighlight.emit(i)\"\n >\n <!-- The cell paints the day number; `option.text` is the full\n committed value (\"March 23 2026\") and is what AT announces,\n since that is what selecting it puts in the input. -->\n <span class=\"magicx-aia-date-cell-number\">{{ dayOf(option) }}</span>\n </div>\n </ng-template>\n </ng-container>\n </div>\n</div>\n", styles: [".magicx-aia-datepicker{display:flex;flex-direction:column;gap:4px;padding:4px 2px}.magicx-aia-datepicker-header{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:2px 6px 6px}.magicx-aia-datepicker-month{font-family:inherit;font-size:var(--aia-date-month-font-size, 14px);font-weight:500;line-height:20px;color:var(--aia-option-color-selected, var(--aia-color-text-default, #fff))}.magicx-aia-datepicker-nav{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:none;border-radius:6px;background:transparent;font-family:inherit;font-size:16px;line-height:1;color:var(--aia-option-color, var(--aia-color-text-muted, #c1c4cb));cursor:pointer;transition:color .15s ease-out,background-color .15s ease-out}.magicx-aia-datepicker-nav:hover{color:var(--aia-option-color-selected, var(--aia-color-text-default, #fff));background:var(--aia-option-bg, transparent)}.magicx-aia-datepicker-weekdays,.magicx-aia-datepicker-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}.magicx-aia-datepicker-grid{flex:1 1 auto;min-height:0;grid-auto-rows:minmax(min(var(--aia-date-row-min-height, 20px),var(--aia-date-row-height, 28px)),var(--aia-date-row-height, 28px))}.magicx-aia-datepicker-weekday{padding:2px 0;text-align:center;font-family:inherit;font-size:var(--aia-date-weekday-font-size, 11px);font-weight:500;line-height:16px;color:var(--aia-option-color, var(--aia-color-text-muted, #c1c4cb));opacity:.7}.magicx-aia-date-cell{display:flex;align-items:center;justify-content:center;min-width:0;font-family:inherit;font-size:var(--aia-date-cell-font-size, 13px);font-weight:450;line-height:20px;color:var(--aia-option-color, var(--aia-color-text-muted, #c1c4cb))}.magicx-aia-date-cell-number{display:flex;align-items:center;justify-content:center;width:var(--aia-date-cell-size, 26px);height:var(--aia-date-cell-size, 26px);max-height:100%;border-radius:6px}.magicx-aia-date-cell--day{cursor:pointer}.magicx-aia-date-cell--blank{cursor:default}.magicx-aia-date-cell--past{opacity:.35}.magicx-aia-date-cell--day:hover .magicx-aia-date-cell-number,.magicx-aia-date-cell--highlighted .magicx-aia-date-cell-number{color:var(--aia-option-color-selected, var(--aia-color-text-default, #fff));background:var(--aia-option-bg, transparent);font-weight:500}.magicx-aia-date-cell--today .magicx-aia-date-cell-number{box-shadow:inset 0 0 0 1px var(--aia-date-today-ring, var(--aia-option-color, var(--aia-color-text-muted, #c1c4cb)))}.magicx-aia-date-cell--in-range{background:var(--aia-date-range-bg, rgba(var(--aia-streak-rgb, 255, 255, 255), .06))}.magicx-aia-date-cell--selected .magicx-aia-date-cell-number{color:var(--aia-option-color-selected, var(--aia-color-text-default, #fff));background:var(--aia-date-selected-bg, rgba(var(--aia-streak-rgb, 255, 255, 255), .12));font-weight:500}.magicx-aia-date-cell--pressed .magicx-aia-date-cell-number{opacity:.8;background:rgba(var(--aia-streak-rgb, 255, 255, 255),.06)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
117
|
+
DateGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DateGridComponent, isStandalone: true, selector: "aia-date-grid", inputs: { options: "options", activeIndex: "activeIndex", listboxId: "listboxId", view: "view", selection: "selection" }, outputs: { select: "select", highlight: "highlight", unhighlight: "unhighlight", previousMonth: "previousMonth", nextMonth: "nextMonth" }, ngImport: i0, template: "<div class=\"magicx-aia-datepicker\" data-aia-datepicker=\"\">\n <div class=\"magicx-aia-datepicker-header\">\n <!-- tabIndex -1 for the same reason the skip button is: Tab is already\n bound to walking the dropdown's options. -->\n <button\n type=\"button\"\n tabindex=\"-1\"\n class=\"magicx-aia-datepicker-nav\"\n data-aia-date-prev=\"\"\n aria-label=\"Previous month\"\n (mousedown)=\"preventBlur($event)\"\n (click)=\"previousMonth.emit()\"\n >\n ‹\n </button>\n <span class=\"magicx-aia-datepicker-month\" data-aia-date-month=\"\" aria-live=\"polite\">\n {{ monthLabel }}\n </span>\n <button\n type=\"button\"\n tabindex=\"-1\"\n class=\"magicx-aia-datepicker-nav\"\n data-aia-date-next=\"\"\n aria-label=\"Next month\"\n (mousedown)=\"preventBlur($event)\"\n (click)=\"nextMonth.emit()\"\n >\n ›\n </button>\n </div>\n\n <!-- Decorative: each cell announces its own full date, so repeating the\n column letters to AT adds noise \u2014 and the duplicate T/S would be\n meaningless read aloud anyway. -->\n <div class=\"magicx-aia-datepicker-weekdays\" aria-hidden=\"true\">\n <span class=\"magicx-aia-datepicker-weekday\" *ngFor=\"let label of weekdays\">{{ label }}</span>\n </div>\n\n <div class=\"magicx-aia-datepicker-grid\" data-aia-date-grid=\"\">\n <ng-container *ngFor=\"let option of options; trackBy: trackByCell; let i = index\">\n <!-- Padding for the days before the 1st / after the last. Non-tappable,\n so arrow navigation skips it; hidden from AT so the month reads as\n its own days and nothing else. -->\n <div\n *ngIf=\"dayOf(option) === null; else dayCell\"\n [id]=\"listboxId + '-option-' + i\"\n role=\"option\"\n data-aia-option=\"\"\n data-aia-date-cell=\"\"\n aria-hidden=\"true\"\n [attr.aria-selected]=\"false\"\n tabindex=\"-1\"\n class=\"magicx-aia-date-cell magicx-aia-date-cell--blank\"\n ></div>\n\n <ng-template #dayCell>\n <!-- A day already gone by is de-emphasized, not disabled: it renders\n dimmed but stays every bit as pickable as the rest of the month. -->\n <div\n [id]=\"listboxId + '-option-' + i\"\n role=\"option\"\n data-aia-option=\"\"\n data-aia-date-cell=\"\"\n [attr.aria-selected]=\"i === activeIndex\"\n [attr.aria-label]=\"option.text\"\n tabindex=\"0\"\n class=\"magicx-aia-date-cell magicx-aia-date-cell--day\"\n [class.magicx-aia-date-cell--past]=\"isPast(option)\"\n [class.magicx-aia-date-cell--highlighted]=\"i === activeIndex\"\n [class.magicx-aia-date-cell--today]=\"isToday(option)\"\n [class.magicx-aia-date-cell--in-range]=\"isInRange(option)\"\n [class.magicx-aia-date-cell--selected]=\"isSelected(option)\"\n [class.magicx-aia-date-cell--reference]=\"isReference(option)\"\n [class.magicx-aia-date-cell--pressed]=\"i === pressedIndex\"\n (click)=\"onSelect(option, i)\"\n (keydown)=\"onKeyDown($event, option, i)\"\n (mouseenter)=\"highlight.emit(i)\"\n (mouseleave)=\"unhighlight.emit(i)\"\n >\n <!-- The cell paints the day number; `option.text` is the full\n committed value (\"March 23 2026\") and is what AT announces,\n since that is what selecting it puts in the input. -->\n <span class=\"magicx-aia-date-cell-number\">{{ dayOf(option) }}</span>\n </div>\n </ng-template>\n </ng-container>\n </div>\n</div>\n", styles: [".magicx-aia-datepicker{display:flex;flex-direction:column;gap:4px;padding:4px 2px}.magicx-aia-datepicker-header{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:2px 6px 6px}.magicx-aia-datepicker-month{font-family:inherit;font-size:var(--aia-date-month-font-size, 14px);font-weight:500;line-height:20px;color:var(--aia-option-color-selected, var(--aia-color-text-default, #fff))}.magicx-aia-datepicker-nav{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:none;border-radius:6px;background:transparent;font-family:inherit;font-size:16px;line-height:1;color:var(--aia-option-color, var(--aia-color-text-muted, #c1c4cb));cursor:pointer;transition:color .15s ease-out,background-color .15s ease-out}.magicx-aia-datepicker-nav:hover{color:var(--aia-option-color-selected, var(--aia-color-text-default, #fff));background:var(--aia-option-bg, transparent)}.magicx-aia-datepicker-weekdays,.magicx-aia-datepicker-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}.magicx-aia-datepicker-grid{flex:1 1 auto;min-height:0;grid-auto-rows:minmax(min(var(--aia-date-row-min-height, 20px),var(--aia-date-row-height, 28px)),var(--aia-date-row-height, 28px))}.magicx-aia-datepicker-weekday{padding:2px 0;text-align:center;font-family:inherit;font-size:var(--aia-date-weekday-font-size, 11px);font-weight:500;line-height:16px;color:var(--aia-option-color, var(--aia-color-text-muted, #c1c4cb));opacity:.7}.magicx-aia-date-cell{display:flex;align-items:center;justify-content:center;min-width:0;font-family:inherit;font-size:var(--aia-date-cell-font-size, 13px);font-weight:450;line-height:20px;color:var(--aia-option-color, var(--aia-color-text-muted, #c1c4cb))}.magicx-aia-date-cell-number{display:flex;align-items:center;justify-content:center;width:var(--aia-date-cell-size, 26px);height:var(--aia-date-cell-size, 26px);max-height:100%;border-radius:6px}.magicx-aia-date-cell--day{cursor:pointer}.magicx-aia-date-cell--blank{cursor:default}.magicx-aia-date-cell--past{opacity:.35}.magicx-aia-date-cell--day:hover .magicx-aia-date-cell-number,.magicx-aia-date-cell--highlighted .magicx-aia-date-cell-number{color:var(--aia-option-color-selected, var(--aia-color-text-default, #fff));background:var(--aia-option-bg, transparent);font-weight:500}.magicx-aia-date-cell--today .magicx-aia-date-cell-number{box-shadow:inset 0 0 0 1px var(--aia-date-today-ring, var(--aia-option-color, var(--aia-color-text-muted, #c1c4cb)))}.magicx-aia-date-cell--in-range{background:var(--aia-date-range-bg, rgba(var(--aia-streak-rgb, 255, 255, 255), .06))}.magicx-aia-date-cell--selected .magicx-aia-date-cell-number{color:var(--aia-option-color-selected, var(--aia-color-text-default, #fff));background:var(--aia-date-selected-bg, rgba(var(--aia-streak-rgb, 255, 255, 255), .12));font-weight:500}.magicx-aia-date-cell--reference .magicx-aia-date-cell-number{background:var(--aia-date-reference-bg, rgba(var(--aia-streak-rgb, 255, 255, 255), .07))}.magicx-aia-date-cell--pressed .magicx-aia-date-cell-number{opacity:.8;background:rgba(var(--aia-streak-rgb, 255, 255, 255),.06)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
110
118
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DateGridComponent, decorators: [{
|
|
111
119
|
type: Component,
|
|
112
|
-
args: [{ selector: "aia-date-grid", standalone: true, imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div class=\"magicx-aia-datepicker\" data-aia-datepicker=\"\">\n <div class=\"magicx-aia-datepicker-header\">\n <!-- tabIndex -1 for the same reason the skip button is: Tab is already\n bound to walking the dropdown's options. -->\n <button\n type=\"button\"\n tabindex=\"-1\"\n class=\"magicx-aia-datepicker-nav\"\n data-aia-date-prev=\"\"\n aria-label=\"Previous month\"\n (mousedown)=\"preventBlur($event)\"\n (click)=\"previousMonth.emit()\"\n >\n ‹\n </button>\n <span class=\"magicx-aia-datepicker-month\" data-aia-date-month=\"\" aria-live=\"polite\">\n {{ monthLabel }}\n </span>\n <button\n type=\"button\"\n tabindex=\"-1\"\n class=\"magicx-aia-datepicker-nav\"\n data-aia-date-next=\"\"\n aria-label=\"Next month\"\n (mousedown)=\"preventBlur($event)\"\n (click)=\"nextMonth.emit()\"\n >\n ›\n </button>\n </div>\n\n <!-- Decorative: each cell announces its own full date, so repeating the\n column letters to AT adds noise \u2014 and the duplicate T/S would be\n meaningless read aloud anyway. -->\n <div class=\"magicx-aia-datepicker-weekdays\" aria-hidden=\"true\">\n <span class=\"magicx-aia-datepicker-weekday\" *ngFor=\"let label of weekdays\">{{ label }}</span>\n </div>\n\n <div class=\"magicx-aia-datepicker-grid\" data-aia-date-grid=\"\">\n <ng-container *ngFor=\"let option of options; trackBy: trackByCell; let i = index\">\n <!-- Padding for the days before the 1st / after the last. Non-tappable,\n so arrow navigation skips it; hidden from AT so the month reads as\n its own days and nothing else. -->\n <div\n *ngIf=\"dayOf(option) === null; else dayCell\"\n [id]=\"listboxId + '-option-' + i\"\n role=\"option\"\n data-aia-option=\"\"\n data-aia-date-cell=\"\"\n aria-hidden=\"true\"\n [attr.aria-selected]=\"false\"\n tabindex=\"-1\"\n class=\"magicx-aia-date-cell magicx-aia-date-cell--blank\"\n ></div>\n\n <ng-template #dayCell>\n <!-- A day already gone by is de-emphasized, not disabled: it renders\n dimmed but stays every bit as pickable as the rest of the month. -->\n <div\n [id]=\"listboxId + '-option-' + i\"\n role=\"option\"\n data-aia-option=\"\"\n data-aia-date-cell=\"\"\n [attr.aria-selected]=\"i === activeIndex\"\n [attr.aria-label]=\"option.text\"\n tabindex=\"0\"\n class=\"magicx-aia-date-cell magicx-aia-date-cell--day\"\n [class.magicx-aia-date-cell--past]=\"isPast(option)\"\n [class.magicx-aia-date-cell--highlighted]=\"i === activeIndex\"\n [class.magicx-aia-date-cell--today]=\"isToday(option)\"\n [class.magicx-aia-date-cell--in-range]=\"isInRange(option)\"\n [class.magicx-aia-date-cell--selected]=\"isSelected(option)\"\n [class.magicx-aia-date-cell--pressed]=\"i === pressedIndex\"\n (click)=\"onSelect(option, i)\"\n (keydown)=\"onKeyDown($event, option, i)\"\n (mouseenter)=\"highlight.emit(i)\"\n (mouseleave)=\"unhighlight.emit(i)\"\n >\n <!-- The cell paints the day number; `option.text` is the full\n committed value (\"March 23 2026\") and is what AT announces,\n since that is what selecting it puts in the input. -->\n <span class=\"magicx-aia-date-cell-number\">{{ dayOf(option) }}</span>\n </div>\n </ng-template>\n </ng-container>\n </div>\n</div>\n", styles: [".magicx-aia-datepicker{display:flex;flex-direction:column;gap:4px;padding:4px 2px}.magicx-aia-datepicker-header{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:2px 6px 6px}.magicx-aia-datepicker-month{font-family:inherit;font-size:var(--aia-date-month-font-size, 14px);font-weight:500;line-height:20px;color:var(--aia-option-color-selected, var(--aia-color-text-default, #fff))}.magicx-aia-datepicker-nav{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:none;border-radius:6px;background:transparent;font-family:inherit;font-size:16px;line-height:1;color:var(--aia-option-color, var(--aia-color-text-muted, #c1c4cb));cursor:pointer;transition:color .15s ease-out,background-color .15s ease-out}.magicx-aia-datepicker-nav:hover{color:var(--aia-option-color-selected, var(--aia-color-text-default, #fff));background:var(--aia-option-bg, transparent)}.magicx-aia-datepicker-weekdays,.magicx-aia-datepicker-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}.magicx-aia-datepicker-grid{flex:1 1 auto;min-height:0;grid-auto-rows:minmax(min(var(--aia-date-row-min-height, 20px),var(--aia-date-row-height, 28px)),var(--aia-date-row-height, 28px))}.magicx-aia-datepicker-weekday{padding:2px 0;text-align:center;font-family:inherit;font-size:var(--aia-date-weekday-font-size, 11px);font-weight:500;line-height:16px;color:var(--aia-option-color, var(--aia-color-text-muted, #c1c4cb));opacity:.7}.magicx-aia-date-cell{display:flex;align-items:center;justify-content:center;min-width:0;font-family:inherit;font-size:var(--aia-date-cell-font-size, 13px);font-weight:450;line-height:20px;color:var(--aia-option-color, var(--aia-color-text-muted, #c1c4cb))}.magicx-aia-date-cell-number{display:flex;align-items:center;justify-content:center;width:var(--aia-date-cell-size, 26px);height:var(--aia-date-cell-size, 26px);max-height:100%;border-radius:6px}.magicx-aia-date-cell--day{cursor:pointer}.magicx-aia-date-cell--blank{cursor:default}.magicx-aia-date-cell--past{opacity:.35}.magicx-aia-date-cell--day:hover .magicx-aia-date-cell-number,.magicx-aia-date-cell--highlighted .magicx-aia-date-cell-number{color:var(--aia-option-color-selected, var(--aia-color-text-default, #fff));background:var(--aia-option-bg, transparent);font-weight:500}.magicx-aia-date-cell--today .magicx-aia-date-cell-number{box-shadow:inset 0 0 0 1px var(--aia-date-today-ring, var(--aia-option-color, var(--aia-color-text-muted, #c1c4cb)))}.magicx-aia-date-cell--in-range{background:var(--aia-date-range-bg, rgba(var(--aia-streak-rgb, 255, 255, 255), .06))}.magicx-aia-date-cell--selected .magicx-aia-date-cell-number{color:var(--aia-option-color-selected, var(--aia-color-text-default, #fff));background:var(--aia-date-selected-bg, rgba(var(--aia-streak-rgb, 255, 255, 255), .12));font-weight:500}.magicx-aia-date-cell--pressed .magicx-aia-date-cell-number{opacity:.8;background:rgba(var(--aia-streak-rgb, 255, 255, 255),.06)}\n"] }]
|
|
120
|
+
args: [{ selector: "aia-date-grid", standalone: true, imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div class=\"magicx-aia-datepicker\" data-aia-datepicker=\"\">\n <div class=\"magicx-aia-datepicker-header\">\n <!-- tabIndex -1 for the same reason the skip button is: Tab is already\n bound to walking the dropdown's options. -->\n <button\n type=\"button\"\n tabindex=\"-1\"\n class=\"magicx-aia-datepicker-nav\"\n data-aia-date-prev=\"\"\n aria-label=\"Previous month\"\n (mousedown)=\"preventBlur($event)\"\n (click)=\"previousMonth.emit()\"\n >\n ‹\n </button>\n <span class=\"magicx-aia-datepicker-month\" data-aia-date-month=\"\" aria-live=\"polite\">\n {{ monthLabel }}\n </span>\n <button\n type=\"button\"\n tabindex=\"-1\"\n class=\"magicx-aia-datepicker-nav\"\n data-aia-date-next=\"\"\n aria-label=\"Next month\"\n (mousedown)=\"preventBlur($event)\"\n (click)=\"nextMonth.emit()\"\n >\n ›\n </button>\n </div>\n\n <!-- Decorative: each cell announces its own full date, so repeating the\n column letters to AT adds noise \u2014 and the duplicate T/S would be\n meaningless read aloud anyway. -->\n <div class=\"magicx-aia-datepicker-weekdays\" aria-hidden=\"true\">\n <span class=\"magicx-aia-datepicker-weekday\" *ngFor=\"let label of weekdays\">{{ label }}</span>\n </div>\n\n <div class=\"magicx-aia-datepicker-grid\" data-aia-date-grid=\"\">\n <ng-container *ngFor=\"let option of options; trackBy: trackByCell; let i = index\">\n <!-- Padding for the days before the 1st / after the last. Non-tappable,\n so arrow navigation skips it; hidden from AT so the month reads as\n its own days and nothing else. -->\n <div\n *ngIf=\"dayOf(option) === null; else dayCell\"\n [id]=\"listboxId + '-option-' + i\"\n role=\"option\"\n data-aia-option=\"\"\n data-aia-date-cell=\"\"\n aria-hidden=\"true\"\n [attr.aria-selected]=\"false\"\n tabindex=\"-1\"\n class=\"magicx-aia-date-cell magicx-aia-date-cell--blank\"\n ></div>\n\n <ng-template #dayCell>\n <!-- A day already gone by is de-emphasized, not disabled: it renders\n dimmed but stays every bit as pickable as the rest of the month. -->\n <div\n [id]=\"listboxId + '-option-' + i\"\n role=\"option\"\n data-aia-option=\"\"\n data-aia-date-cell=\"\"\n [attr.aria-selected]=\"i === activeIndex\"\n [attr.aria-label]=\"option.text\"\n tabindex=\"0\"\n class=\"magicx-aia-date-cell magicx-aia-date-cell--day\"\n [class.magicx-aia-date-cell--past]=\"isPast(option)\"\n [class.magicx-aia-date-cell--highlighted]=\"i === activeIndex\"\n [class.magicx-aia-date-cell--today]=\"isToday(option)\"\n [class.magicx-aia-date-cell--in-range]=\"isInRange(option)\"\n [class.magicx-aia-date-cell--selected]=\"isSelected(option)\"\n [class.magicx-aia-date-cell--reference]=\"isReference(option)\"\n [class.magicx-aia-date-cell--pressed]=\"i === pressedIndex\"\n (click)=\"onSelect(option, i)\"\n (keydown)=\"onKeyDown($event, option, i)\"\n (mouseenter)=\"highlight.emit(i)\"\n (mouseleave)=\"unhighlight.emit(i)\"\n >\n <!-- The cell paints the day number; `option.text` is the full\n committed value (\"March 23 2026\") and is what AT announces,\n since that is what selecting it puts in the input. -->\n <span class=\"magicx-aia-date-cell-number\">{{ dayOf(option) }}</span>\n </div>\n </ng-template>\n </ng-container>\n </div>\n</div>\n", styles: [".magicx-aia-datepicker{display:flex;flex-direction:column;gap:4px;padding:4px 2px}.magicx-aia-datepicker-header{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:2px 6px 6px}.magicx-aia-datepicker-month{font-family:inherit;font-size:var(--aia-date-month-font-size, 14px);font-weight:500;line-height:20px;color:var(--aia-option-color-selected, var(--aia-color-text-default, #fff))}.magicx-aia-datepicker-nav{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:none;border-radius:6px;background:transparent;font-family:inherit;font-size:16px;line-height:1;color:var(--aia-option-color, var(--aia-color-text-muted, #c1c4cb));cursor:pointer;transition:color .15s ease-out,background-color .15s ease-out}.magicx-aia-datepicker-nav:hover{color:var(--aia-option-color-selected, var(--aia-color-text-default, #fff));background:var(--aia-option-bg, transparent)}.magicx-aia-datepicker-weekdays,.magicx-aia-datepicker-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}.magicx-aia-datepicker-grid{flex:1 1 auto;min-height:0;grid-auto-rows:minmax(min(var(--aia-date-row-min-height, 20px),var(--aia-date-row-height, 28px)),var(--aia-date-row-height, 28px))}.magicx-aia-datepicker-weekday{padding:2px 0;text-align:center;font-family:inherit;font-size:var(--aia-date-weekday-font-size, 11px);font-weight:500;line-height:16px;color:var(--aia-option-color, var(--aia-color-text-muted, #c1c4cb));opacity:.7}.magicx-aia-date-cell{display:flex;align-items:center;justify-content:center;min-width:0;font-family:inherit;font-size:var(--aia-date-cell-font-size, 13px);font-weight:450;line-height:20px;color:var(--aia-option-color, var(--aia-color-text-muted, #c1c4cb))}.magicx-aia-date-cell-number{display:flex;align-items:center;justify-content:center;width:var(--aia-date-cell-size, 26px);height:var(--aia-date-cell-size, 26px);max-height:100%;border-radius:6px}.magicx-aia-date-cell--day{cursor:pointer}.magicx-aia-date-cell--blank{cursor:default}.magicx-aia-date-cell--past{opacity:.35}.magicx-aia-date-cell--day:hover .magicx-aia-date-cell-number,.magicx-aia-date-cell--highlighted .magicx-aia-date-cell-number{color:var(--aia-option-color-selected, var(--aia-color-text-default, #fff));background:var(--aia-option-bg, transparent);font-weight:500}.magicx-aia-date-cell--today .magicx-aia-date-cell-number{box-shadow:inset 0 0 0 1px var(--aia-date-today-ring, var(--aia-option-color, var(--aia-color-text-muted, #c1c4cb)))}.magicx-aia-date-cell--in-range{background:var(--aia-date-range-bg, rgba(var(--aia-streak-rgb, 255, 255, 255), .06))}.magicx-aia-date-cell--selected .magicx-aia-date-cell-number{color:var(--aia-option-color-selected, var(--aia-color-text-default, #fff));background:var(--aia-date-selected-bg, rgba(var(--aia-streak-rgb, 255, 255, 255), .12));font-weight:500}.magicx-aia-date-cell--reference .magicx-aia-date-cell-number{background:var(--aia-date-reference-bg, rgba(var(--aia-streak-rgb, 255, 255, 255), .07))}.magicx-aia-date-cell--pressed .magicx-aia-date-cell-number{opacity:.8;background:rgba(var(--aia-streak-rgb, 255, 255, 255),.06)}\n"] }]
|
|
113
121
|
}], propDecorators: { options: [{
|
|
114
122
|
type: Input
|
|
115
123
|
}], activeIndex: [{
|
|
@@ -1938,6 +1946,7 @@ class AIAutocompleteDropdownComponent {
|
|
|
1938
1946
|
selectedRange: dd.selectedDateRange ?? null,
|
|
1939
1947
|
rangeStart: dd.dateRangeStart ?? null,
|
|
1940
1948
|
floor: dateFloorFor(dd.formatType, dd.dateRangeStart),
|
|
1949
|
+
references: dd.dateReferences ?? [],
|
|
1941
1950
|
},
|
|
1942
1951
|
showsTimeWheel,
|
|
1943
1952
|
timeView: dd.timeView ?? null,
|
|
@@ -2621,6 +2630,7 @@ function computeDropdown(s, optionsPosition, hasProductAddToCart) {
|
|
|
2621
2630
|
selectedDateIso: dateSelection.selectedIso,
|
|
2622
2631
|
selectedDateRange: dateSelection.selectedRange,
|
|
2623
2632
|
dateRangeStart: dateSelection.rangeStart,
|
|
2633
|
+
dateReferences: dateSelection.references,
|
|
2624
2634
|
// Time wheel. As for a calendar, `s.filteredOptions` is empty — the wheel
|
|
2625
2635
|
// is drawn from `timeView`, not from the suggestion's options.
|
|
2626
2636
|
timeView: s.timeView,
|