@magicx-eng/ai-autocomplete-angular 0.12.0 → 0.13.1
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/README.md +34 -15
- package/esm2020/lib/ai-autocomplete/ai-autocomplete.component.mjs +3 -3
- package/esm2020/lib/ai-autocomplete-dropdown/ai-autocomplete-dropdown.component.mjs +44 -5
- package/esm2020/lib/controller/ai-autocomplete.controller.mjs +3 -3
- package/esm2020/lib/internal/date-grid/date-grid.component.mjs +9 -3
- package/esm2020/lib/internal/layout/grid.component.mjs +10 -4
- package/esm2020/lib/internal/suggestion-grid/suggestion-grid.component.mjs +79 -18
- package/esm2020/lib/internal/suggestion-item/suggestion-item.component.mjs +25 -4
- package/esm2020/lib/shared/types.mjs +1 -1
- package/fesm2015/magicx-eng-ai-autocomplete-angular.mjs +165 -29
- package/fesm2015/magicx-eng-ai-autocomplete-angular.mjs.map +1 -1
- package/fesm2020/magicx-eng-ai-autocomplete-angular.mjs +162 -29
- package/fesm2020/magicx-eng-ai-autocomplete-angular.mjs.map +1 -1
- package/lib/ai-autocomplete-dropdown/ai-autocomplete-dropdown.component.d.ts +17 -2
- package/lib/ai-autocomplete-dropdown/ai-autocomplete-dropdown.component.d.ts.map +1 -1
- package/lib/controller/ai-autocomplete.controller.d.ts +1 -1
- package/lib/controller/ai-autocomplete.controller.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/internal/layout/grid.component.d.ts +10 -2
- package/lib/internal/layout/grid.component.d.ts.map +1 -1
- package/lib/internal/suggestion-grid/suggestion-grid.component.d.ts +30 -9
- package/lib/internal/suggestion-grid/suggestion-grid.component.d.ts.map +1 -1
- package/lib/internal/suggestion-item/suggestion-item.component.d.ts +16 -2
- package/lib/internal/suggestion-item/suggestion-item.component.d.ts.map +1 -1
- package/lib/shared/types.d.ts +1 -1
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type OnChanges, type OnDestroy, type OnInit, type SimpleChanges } from "@angular/core";
|
|
1
|
+
import { type AfterViewChecked, type OnChanges, type OnDestroy, type OnInit, type SimpleChanges } from "@angular/core";
|
|
2
2
|
import { type AppearanceMode, type DateMonthView, type Product, type Suggestion, type SuggestionOption } from "@magicx-eng/ai-autocomplete-vanilla";
|
|
3
3
|
import { type Observable } from "rxjs";
|
|
4
4
|
import type { AIAutocompleteController } from "../controller/ai-autocomplete.controller";
|
|
@@ -51,7 +51,7 @@ interface DropdownVm {
|
|
|
51
51
|
*
|
|
52
52
|
* @public
|
|
53
53
|
*/
|
|
54
|
-
export declare class AIAutocompleteDropdownComponent implements OnInit, OnChanges, OnDestroy {
|
|
54
|
+
export declare class AIAutocompleteDropdownComponent implements OnInit, OnChanges, AfterViewChecked, OnDestroy {
|
|
55
55
|
/** The controller that owns the autocomplete state. Required. */
|
|
56
56
|
controller: AIAutocompleteController;
|
|
57
57
|
/** Whether to render the pillbar above the options grid. Default: true. */
|
|
@@ -83,6 +83,12 @@ export declare class AIAutocompleteDropdownComponent implements OnInit, OnChange
|
|
|
83
83
|
get rootClass(): string;
|
|
84
84
|
/** Fallback skeleton-bar widths used when loading with zero cached options. */
|
|
85
85
|
readonly fallbackSkeletonBarWidths: number[];
|
|
86
|
+
/** Accessible name of the "more below" scroll arrow. */
|
|
87
|
+
readonly scrollArrowLabel = "Scroll down for more options";
|
|
88
|
+
private dropdownRootRef?;
|
|
89
|
+
private scrollArrowRef?;
|
|
90
|
+
/** The grid the scroll-arrow controller is currently bound to. */
|
|
91
|
+
private scrollArrowBinding;
|
|
86
92
|
/**
|
|
87
93
|
* Attribution/branding link URL for the footer, with a `utm_source` derived
|
|
88
94
|
* from the embedding page's hostname (see {@link buildAttributionUrl}).
|
|
@@ -105,6 +111,15 @@ export declare class AIAutocompleteDropdownComponent implements OnInit, OnChange
|
|
|
105
111
|
private lastVisibleContent;
|
|
106
112
|
ngOnInit(): void;
|
|
107
113
|
ngOnChanges(changes: SimpleChanges): void;
|
|
114
|
+
/**
|
|
115
|
+
* Keep the core's "more below" arrow controller bound to whichever options
|
|
116
|
+
* grid is currently rendered — the Angular analogue of React's
|
|
117
|
+
* useScrollArrow. The controller owns the behaviour (measuring, visibility,
|
|
118
|
+
* the page-scroll on click — see the core's scrollArrow.ts); this only hands
|
|
119
|
+
* it the live elements after each view check, re-attaching when the grid
|
|
120
|
+
* element is replaced and tearing down when there is no grid.
|
|
121
|
+
*/
|
|
122
|
+
ngAfterViewChecked(): void;
|
|
108
123
|
ngOnDestroy(): void;
|
|
109
124
|
/**
|
|
110
125
|
* Resolve the `mode` input into `resolvedMode`. Unset → null (the dropdown
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-autocomplete-dropdown.component.d.ts","sourceRoot":"","sources":["../../../src/lib/ai-autocomplete-dropdown/ai-autocomplete-dropdown.component.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"ai-autocomplete-dropdown.component.d.ts","sourceRoot":"","sources":["../../../src/lib/ai-autocomplete-dropdown/ai-autocomplete-dropdown.component.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,gBAAgB,EAOrB,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,MAAM,EACX,KAAK,aAAa,EAGnB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,KAAK,cAAc,EAGnB,KAAK,aAAa,EAElB,KAAK,OAAO,EAGZ,KAAK,UAAU,EACf,KAAK,gBAAgB,EACtB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAkC,KAAK,UAAU,EAAE,MAAM,MAAM,CAAC;AAEvE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;;AAQzF,UAAU,UAAU;IAClB,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAC5B,WAAW,EAAE,MAA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AA+B;CAiT3C"}
|
|
@@ -48,7 +48,7 @@ export declare class AIAutocompleteController {
|
|
|
48
48
|
/** Currently highlighted dropdown option index. -1 = none. */
|
|
49
49
|
readonly activeIndex$: Observable<number>;
|
|
50
50
|
/**
|
|
51
|
-
* UI-visible loading flag — suppressed during the post-select
|
|
51
|
+
* UI-visible loading flag — suppressed during the post-select press
|
|
52
52
|
* animation and during re-edit (cached options stay visible there). Use
|
|
53
53
|
* this instead of the raw core state for any loading-skeleton binding.
|
|
54
54
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-autocomplete.controller.d.ts","sourceRoot":"","sources":["../../../src/lib/controller/ai-autocomplete.controller.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,mBAAmB,
|
|
1
|
+
{"version":3,"file":"ai-autocomplete.controller.d.ts","sourceRoot":"","sources":["../../../src/lib/controller/ai-autocomplete.controller.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,mBAAmB,EAIxB,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,iBAAiB,EACtB,KAAK,UAAU,EACf,KAAK,gBAAgB,EAEtB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAuC,KAAK,UAAU,EAAe,MAAM,MAAM,CAAC;AACzF,OAAO,KAAK,EACV,+BAA+B,EAC/B,6BAA6B,EAC7B,8BAA8B,EAC9B,2BAA2B,EAC5B,MAAM,iBAAiB,CAAC;AAGzB;;;;;;;;;;;;GAYG;AACH,qBAAa,wBAAwB;IACnC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAqB;IAC1C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA6B;IAIvD,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAmD;IACpF,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAa;IAC7C,OAAO,CAAC,WAAW,CAAS;IAM5B,wCAAwC;IACxC,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC,MAAM,CAA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a,GAAG,IAAI;IAKzC,sCAAsC;IACtC,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;IAKlC,+DAA+D;IAC/D,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAKxC,yDAAyD;IACzD,YAAY,IAAI,IAAI;IAKpB,iEAAiE;IACjE,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAKlD,6DAA6D;IAC7D,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAK5C,yEAAyE;IACzE,mBAAmB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO;IAKjD,oEAAoE;IACpE,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAK3C,8EAA8E;IAC9E,iBAAiB,IAAI,IAAI;IAKzB,iFAAiF;IACjF,aAAa,IAAI,IAAI;IAOrB;;;;;;OAMG;IACH,MAAM,CAAC,IAAI,EAAE,8BAA8B,GAAG,IAAI;IAQlD;;;;OAIG;IACH,OAAO,IAAI,IAAI;CAOhB"}
|
|
@@ -34,6 +34,8 @@ export declare class DateGridComponent {
|
|
|
34
34
|
get monthLabel(): string;
|
|
35
35
|
dayOf(option: SuggestionOption): number | null;
|
|
36
36
|
isToday(option: SuggestionOption): boolean;
|
|
37
|
+
/** Before today: rendered dimmed, but every bit as pickable as the rest. */
|
|
38
|
+
isPast(option: SuggestionOption): boolean;
|
|
37
39
|
isSelected(option: SuggestionOption): boolean;
|
|
38
40
|
onSelect(option: SuggestionOption, index: number): void;
|
|
39
41
|
onKeyDown(event: KeyboardEvent, option: SuggestionOption, index: number): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-grid.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/internal/date-grid/date-grid.component.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,YAAY,EAIb,MAAM,eAAe,CAAC;AACvB,OAAO,EAGL,KAAK,aAAa,EAGlB,KA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;;;;;;;GAcG;AACH,qBASa,iBAAiB;IAC5B,uFAAuF;IAC9E,OAAO,EAAE,gBAAgB,EAAE,CAAM;IACjC,WAAW,SAAM;IACjB,SAAS,SAAM;IACf,IAAI,EAAE,aAAa,GAAG,IAAI,CAAQ;IAC3C,qEAAqE;IAC5D,WAAW,EAAE,MAAM,GAAG,IAAI,CAAQ;IAEjC,QAAQ,CAAC,MAAM,iCAAwC;IACvD,QAAQ,CAAC,SAAS,uBAA8B;IAChD,QAAQ,CAAC,aAAa,qBAA4B;IAClD,QAAQ,CAAC,SAAS,qBAA4B;IAExD,QAAQ,CAAC,QAAQ,WAAkB;IAEnC,gEAAgE;IAChE,YAAY,SAAM;IAElB,IAAI,UAAU,IAAI,MAAM,CAEvB;IAED,KAAK,CAAC,MAAM,EAAE,gBAAgB,GAAG,MAAM,GAAG,IAAI;IAI9C,OAAO,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO;IAI1C,4EAA4E;IAC5E,MAAM,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO;IAMzC,UAAU,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO;IAK7C,QAAQ,CAAC,MAAM,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAQvD,SAAS,CAAC,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAO9E,gFAAgF;IAChF,WAAW,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI;IAKpC,WAAW,UAAW,MAAM,UAAU,gBAAgB,KAAG,MAAM,CAC3B;yCAjEzB,iBAAiB;2CAAjB,iBAAiB;CAkE7B"}
|
|
@@ -24,10 +24,18 @@ export declare class GridComponent implements OnChanges {
|
|
|
24
24
|
scrollResetKey?: string;
|
|
25
25
|
/** Fixed column count. Overrides the intrinsic auto-fit when set; rows fill left-to-right. */
|
|
26
26
|
cols?: number;
|
|
27
|
+
/** Explicit `grid-template-columns` value. Overrides `cols` when set. */
|
|
28
|
+
template?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Identity of the content group on screen, mirrored onto `data-aia-group`.
|
|
31
|
+
* The core's scroll-arrow controller reads it to tell a new set of options
|
|
32
|
+
* (rising in) from the same set re-rendered.
|
|
33
|
+
*/
|
|
34
|
+
group?: string;
|
|
27
35
|
/**
|
|
28
36
|
* Explicit column template overrides the intrinsic auto-fit (inline wins).
|
|
29
37
|
* The track string is built by the core so all three packages emit the same
|
|
30
|
-
* one.
|
|
38
|
+
* one; a measured template (the two-column split) wins over the count.
|
|
31
39
|
*/
|
|
32
40
|
get templateColumns(): string | null;
|
|
33
41
|
gridRef?: ElementRef<HTMLDivElement>;
|
|
@@ -38,6 +46,6 @@ export declare class GridComponent implements OnChanges {
|
|
|
38
46
|
*/
|
|
39
47
|
ngOnChanges(changes: SimpleChanges): void;
|
|
40
48
|
static ɵfac: i0.ɵɵFactoryDeclaration<GridComponent, never>;
|
|
41
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<GridComponent, "aia-grid", never, { "min": "min"; "max": "max"; "gap": "gap"; "scroll": "scroll"; "maxHeight": "maxHeight"; "scrollResetKey": "scrollResetKey"; "cols": "cols"; }, {}, never, ["*"], true, never>;
|
|
49
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<GridComponent, "aia-grid", never, { "min": "min"; "max": "max"; "gap": "gap"; "scroll": "scroll"; "maxHeight": "maxHeight"; "scrollResetKey": "scrollResetKey"; "cols": "cols"; "template": "template"; "group": "group"; }, {}, never, ["*"], true, never>;
|
|
42
50
|
}
|
|
43
51
|
//# sourceMappingURL=grid.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grid.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/internal/layout/grid.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,UAAU,EAEf,KAAK,SAAS,EACd,KAAK,aAAa,EAGnB,MAAM,eAAe,CAAC;;AAGvB;;;;;;;;GAQG;AACH,qBAQa,aAAc,YAAW,SAAS;IAC7C,iFAAiF;IACxE,GAAG,SAAW;IACvB,6EAA6E;IACpE,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,yBAAyB;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,mEAAmE;IAC1D,MAAM,UAAS;IACxB,yEAAyE;IAChE,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,wEAAwE;IAC/D,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC,8FAA8F;IACrF,IAAI,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"grid.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/internal/layout/grid.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,UAAU,EAEf,KAAK,SAAS,EACd,KAAK,aAAa,EAGnB,MAAM,eAAe,CAAC;;AAGvB;;;;;;;;GAQG;AACH,qBAQa,aAAc,YAAW,SAAS;IAC7C,iFAAiF;IACxE,GAAG,SAAW;IACvB,6EAA6E;IACpE,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,yBAAyB;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,mEAAmE;IAC1D,MAAM,UAAS;IACxB,yEAAyE;IAChE,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,wEAAwE;IAC/D,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC,8FAA8F;IACrF,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,yEAAyE;IAChE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B;;;;OAIG;IACM,KAAK,CAAC,EAAE,MAAM,CAAC;IAExB;;;;OAIG;IACH,IAAI,eAAe,IAAI,MAAM,GAAG,IAAI,CAGnC;IAEqC,OAAO,CAAC,EAAE,UAAU,CAAC,cAAc,CAAC,CAAC;IAE3E;;;;OAIG;IACH,WAAW,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI;yCAzC9B,aAAa;2CAAb,aAAa;CA+CzB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { EventEmitter } from "@angular/core";
|
|
2
|
-
import { type SuggestionOption } from "@magicx-eng/ai-autocomplete-vanilla";
|
|
1
|
+
import { type AfterViewChecked, EventEmitter, type OnChanges, type SimpleChanges } from "@angular/core";
|
|
2
|
+
import { type OptionsGridPlan, type SuggestionOption } from "@magicx-eng/ai-autocomplete-vanilla";
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
/**
|
|
5
5
|
* Internal grid of suggestion options. Mirrors
|
|
@@ -10,7 +10,7 @@ import * as i0 from "@angular/core";
|
|
|
10
10
|
*
|
|
11
11
|
* @internal
|
|
12
12
|
*/
|
|
13
|
-
export declare class SuggestionGridComponent {
|
|
13
|
+
export declare class SuggestionGridComponent implements OnChanges, AfterViewChecked {
|
|
14
14
|
options: SuggestionOption[];
|
|
15
15
|
activeIndex: number;
|
|
16
16
|
listboxId: string;
|
|
@@ -21,19 +21,40 @@ export declare class SuggestionGridComponent {
|
|
|
21
21
|
* from the first one instead of from the previous list's scroll offset.
|
|
22
22
|
*/
|
|
23
23
|
groupKey: string;
|
|
24
|
+
/**
|
|
25
|
+
* Which side of the input the dropdown opens on. The rows' entrance starts
|
|
26
|
+
* from the input's side outward, so "above" reverses the order.
|
|
27
|
+
*/
|
|
28
|
+
optionsPosition: "above" | "below";
|
|
24
29
|
readonly select: EventEmitter<SuggestionOption>;
|
|
25
30
|
readonly highlight: EventEmitter<number>;
|
|
26
31
|
private readonly cdr;
|
|
32
|
+
private gridComp?;
|
|
33
|
+
/**
|
|
34
|
+
* The measured layout plan. Starts as the measurement-free baseline (one
|
|
35
|
+
* column); after each view update the rendered rows are measured and the
|
|
36
|
+
* plan upgrades to two columns when they provably fit — same two-pass the
|
|
37
|
+
* React grid does with its layout effect, all through `planOptionsGrid`.
|
|
38
|
+
*/
|
|
39
|
+
plan: OptionsGridPlan;
|
|
40
|
+
private needsMeasure;
|
|
27
41
|
onResize(): void;
|
|
42
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
43
|
+
ngAfterViewChecked(): void;
|
|
44
|
+
isScrollHint(index: number): boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Start delay of row `index`'s entrance — each row rises in a beat after
|
|
47
|
+
* the one nearer the input. Skeleton rows fade in together (they're
|
|
48
|
+
* placeholders, not content arriving).
|
|
49
|
+
*/
|
|
50
|
+
enterDelayMs(index: number): number;
|
|
28
51
|
/**
|
|
29
|
-
*
|
|
30
|
-
*
|
|
52
|
+
* The group is part of the identity: a new suggestion's options are new
|
|
53
|
+
* rows and get the entrance animation even when one spells the same as a
|
|
54
|
+
* row already on screen.
|
|
31
55
|
*/
|
|
32
|
-
private get layout();
|
|
33
|
-
get gridCols(): number;
|
|
34
|
-
get gridMaxHeight(): string;
|
|
35
56
|
trackByOptionText: (_: number, opt: SuggestionOption) => string;
|
|
36
57
|
static ɵfac: i0.ɵɵFactoryDeclaration<SuggestionGridComponent, never>;
|
|
37
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SuggestionGridComponent, "aia-suggestion-grid", never, { "options": "options"; "activeIndex": "activeIndex"; "listboxId": "listboxId"; "loading": "loading"; "groupKey": "groupKey"; }, { "select": "select"; "highlight": "highlight"; }, never, never, true, never>;
|
|
58
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SuggestionGridComponent, "aia-suggestion-grid", never, { "options": "options"; "activeIndex": "activeIndex"; "listboxId": "listboxId"; "loading": "loading"; "groupKey": "groupKey"; "optionsPosition": "optionsPosition"; }, { "select": "select"; "highlight": "highlight"; }, never, never, true, never>;
|
|
38
59
|
}
|
|
39
60
|
//# sourceMappingURL=suggestion-grid.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"suggestion-grid.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/internal/suggestion-grid/suggestion-grid.component.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"suggestion-grid.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/internal/suggestion-grid/suggestion-grid.component.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,gBAAgB,EAIrB,YAAY,EAIZ,KAAK,SAAS,EAEd,KAAK,aAAa,EAGnB,MAAM,eAAe,CAAC;AACvB,OAAO,EAIL,KAAK,eAAe,EAGpB,KAAK,gBAAgB,EACtB,MAAM,qCAAqC,CAAC;;AAI7C;;;;;;;;GAQG;AACH,qBAQa,uBAAwB,YAAW,SAAS,EAAE,gBAAgB;IAChE,OAAO,EAAE,gBAAgB,EAAE,CAAM;IACjC,WAAW,SAAM;IACjB,SAAS,SAAM;IACf,OAAO,UAAS;IACzB;;;;OAIG;IACM,QAAQ,SAAM;IACvB;;;OAGG;IACM,eAAe,EAAE,OAAO,GAAG,OAAO,CAAW;IAE5C,QAAQ,CAAC,MAAM,iCAAwC;IACvD,QAAQ,CAAC,SAAS,uBAA8B;IAE1D,OAAO,CAAC,QAAQ,CAAC,GAAG,CAA6B;IAEJ,OAAO,CAAC,QAAQ,CAAC,CAAgB;IAE9E;;;;;OAKG;IACH,IAAI,EAAE,eAAe,CAAyC;IAC9D,OAAO,CAAC,YAAY,CAAQ;IAK5B,QAAQ,IAAI,IAAI;IAKhB,WAAW,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI;IAWzC,kBAAkB,IAAI,IAAI;IA8B1B,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;IAIpC;;;;OAIG;IACH,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAOnC;;;;OAIG;IACH,iBAAiB,MAAO,MAAM,OAAO,gBAAgB,KAAG,MAAM,CAAoC;yCAvGvF,uBAAuB;2CAAvB,uBAAuB;CAwGnC"}
|
|
@@ -6,7 +6,7 @@ import * as i0 from "@angular/core";
|
|
|
6
6
|
* `packages/react/src/components/SuggestionItem.tsx`. Handles:
|
|
7
7
|
*
|
|
8
8
|
* - Tappable vs non-tappable cursor + hover styling
|
|
9
|
-
* - Pressed-state
|
|
9
|
+
* - Pressed-state compress animation (500ms, single-flight)
|
|
10
10
|
* - Keyboard activation (Enter/Space)
|
|
11
11
|
* - ARIA `role="option"` + `aria-selected` for the listbox pattern
|
|
12
12
|
* - Loading skeleton when `loading=true`
|
|
@@ -18,6 +18,20 @@ export declare class SuggestionItemComponent implements OnDestroy {
|
|
|
18
18
|
isHighlighted: boolean;
|
|
19
19
|
id: string;
|
|
20
20
|
loading: boolean;
|
|
21
|
+
/** Fade this option's text toward its bottom edge (last visible row of a scrollable grid). */
|
|
22
|
+
scrollHint: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Start delay of this row's entrance animation (ms) — each row rises in a
|
|
25
|
+
* beat after the one nearer the input. Captured once, on first render, so a
|
|
26
|
+
* later change-detection pass can't restart a row mid-rise.
|
|
27
|
+
*/
|
|
28
|
+
set enterDelayMs(value: number);
|
|
29
|
+
/**
|
|
30
|
+
* The captured delay; `null` until the first `enterDelayMs` binding lands.
|
|
31
|
+
* The template binds it to `--aia-option-enter-delay` (the core's
|
|
32
|
+
* OPTION_ENTER_DELAY_VAR), which the stylesheet's entrance rule reads.
|
|
33
|
+
*/
|
|
34
|
+
enterDelay: number | null;
|
|
21
35
|
readonly select: EventEmitter<SuggestionOption>;
|
|
22
36
|
readonly highlight: EventEmitter<void>;
|
|
23
37
|
pressed: boolean;
|
|
@@ -28,6 +42,6 @@ export declare class SuggestionItemComponent implements OnDestroy {
|
|
|
28
42
|
onMouseEnter(): void;
|
|
29
43
|
onKeyDown(event: KeyboardEvent): void;
|
|
30
44
|
static ɵfac: i0.ɵɵFactoryDeclaration<SuggestionItemComponent, never>;
|
|
31
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SuggestionItemComponent, "aia-suggestion-item", never, { "option": "option"; "isHighlighted": "isHighlighted"; "id": "id"; "loading": "loading"; }, { "select": "select"; "highlight": "highlight"; }, never, never, true, never>;
|
|
45
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SuggestionItemComponent, "aia-suggestion-item", never, { "option": "option"; "isHighlighted": "isHighlighted"; "id": "id"; "loading": "loading"; "scrollHint": "scrollHint"; "enterDelayMs": "enterDelayMs"; }, { "select": "select"; "highlight": "highlight"; }, never, never, true, never>;
|
|
32
46
|
}
|
|
33
47
|
//# sourceMappingURL=suggestion-item.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"suggestion-item.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/internal/suggestion-item/suggestion-item.component.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,YAAY,EAGZ,KAAK,SAAS,EAGf,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;;AAE5E;;;;;;;;;;;GAWG;AACH,qBASa,uBAAwB,YAAW,SAAS;IAC9C,MAAM,EAAG,gBAAgB,CAAC;IAC1B,aAAa,UAAS;IACtB,EAAE,SAAM;IACR,OAAO,UAAS;
|
|
1
|
+
{"version":3,"file":"suggestion-item.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/internal/suggestion-item/suggestion-item.component.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,YAAY,EAGZ,KAAK,SAAS,EAGf,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;;AAE5E;;;;;;;;;;;GAWG;AACH,qBASa,uBAAwB,YAAW,SAAS;IAC9C,MAAM,EAAG,gBAAgB,CAAC;IAC1B,aAAa,UAAS;IACtB,EAAE,SAAM;IACR,OAAO,UAAS;IACzB,8FAA8F;IACrF,UAAU,UAAS;IAC5B;;;;OAIG;IACH,IAAa,YAAY,CAAC,KAAK,EAAE,MAAM,EAEtC;IACD;;;;OAIG;IACH,UAAU,EAAE,MAAM,GAAG,IAAI,CAAQ;IAEvB,QAAQ,CAAC,MAAM,iCAAwC;IACvD,QAAQ,CAAC,SAAS,qBAA4B;IAExD,OAAO,UAAS;IAEhB,OAAO,CAAC,QAAQ,CAAC,GAAG,CAA6B;IACjD,OAAO,CAAC,YAAY,CAA4C;IAEhE,WAAW,IAAI,IAAI;IAInB,QAAQ,IAAI,IAAI;IAYhB,YAAY,IAAI,IAAI;IAKpB,SAAS,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI;yCAnD1B,uBAAuB;2CAAvB,uBAAuB;CA0DnC"}
|
package/lib/shared/types.d.ts
CHANGED
|
@@ -99,7 +99,7 @@ export type AIAutocompleteControllerUpdate = Partial<Omit<AIAutocompleteControll
|
|
|
99
99
|
*
|
|
100
100
|
* `suggestionPills` mirrors React's `suggestionPills` — the actionable
|
|
101
101
|
* subset of `suggestions` ready for pill rendering. `isLoading` is the
|
|
102
|
-
* UI-visible loading flag (suppressed during the post-select
|
|
102
|
+
* UI-visible loading flag (suppressed during the post-select press
|
|
103
103
|
* animation and during re-edit, where cached options stay visible).
|
|
104
104
|
*
|
|
105
105
|
* @public
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@magicx-eng/ai-autocomplete-angular",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.1",
|
|
4
4
|
"description": "AI Autocomplete Angular SDK — guided autocomplete with pill-based input and dropdown suggestions",
|
|
5
5
|
"module": "fesm2015/magicx-eng-ai-autocomplete-angular.mjs",
|
|
6
6
|
"es2020": "fesm2020/magicx-eng-ai-autocomplete-angular.mjs",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"tslib": "^2.3.0",
|
|
24
|
-
"@magicx-eng/ai-autocomplete-vanilla": "0.
|
|
24
|
+
"@magicx-eng/ai-autocomplete-vanilla": "0.16.0"
|
|
25
25
|
},
|
|
26
26
|
"keywords": [
|
|
27
27
|
"angular",
|