@magicx-eng/ai-autocomplete-angular 0.61.1 → 0.62.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/README.md +1 -1
- package/REFERENCE.md +17 -0
- package/esm2020/lib/ai-autocomplete/ai-autocomplete.component.mjs +15 -2
- package/esm2020/lib/controller/ai-autocomplete.controller.mjs +20 -1
- package/esm2020/lib/shared/types.mjs +1 -1
- package/fesm2015/magicx-eng-ai-autocomplete-angular.mjs +35 -1
- package/fesm2015/magicx-eng-ai-autocomplete-angular.mjs.map +1 -1
- package/fesm2020/magicx-eng-ai-autocomplete-angular.mjs +33 -1
- package/fesm2020/magicx-eng-ai-autocomplete-angular.mjs.map +1 -1
- package/lib/ai-autocomplete/ai-autocomplete.component.d.ts +15 -1
- package/lib/ai-autocomplete/ai-autocomplete.component.d.ts.map +1 -1
- package/lib/controller/ai-autocomplete.controller.d.ts +11 -0
- package/lib/controller/ai-autocomplete.controller.d.ts.map +1 -1
- package/lib/shared/types.d.ts +10 -0
- package/lib/shared/types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -2386,6 +2386,25 @@ class AIAutocompleteController {
|
|
|
2386
2386
|
return;
|
|
2387
2387
|
this.core.endSubmitProgress();
|
|
2388
2388
|
}
|
|
2389
|
+
/**
|
|
2390
|
+
* The visitor id the events carry right now, to send with your own events.
|
|
2391
|
+
* Undefined while there is none: before the first response, or without
|
|
2392
|
+
* `visitorId` and without consent.
|
|
2393
|
+
*/
|
|
2394
|
+
getVisitorId() {
|
|
2395
|
+
if (this.isDestroyed)
|
|
2396
|
+
return undefined;
|
|
2397
|
+
return this.core.getVisitorId();
|
|
2398
|
+
}
|
|
2399
|
+
/**
|
|
2400
|
+
* Reads `analyticsConsent` again now. Call it when the visitor changes their
|
|
2401
|
+
* choice, so a declined one removes the stored id at once.
|
|
2402
|
+
*/
|
|
2403
|
+
refreshAnalyticsConsent() {
|
|
2404
|
+
if (this.isDestroyed)
|
|
2405
|
+
return;
|
|
2406
|
+
this.core.refreshAnalyticsConsent();
|
|
2407
|
+
}
|
|
2389
2408
|
/**
|
|
2390
2409
|
* Pick a dropdown option (or replace the re-edited param if in re-edit mode).
|
|
2391
2410
|
* In a multi_select question this ticks the option; pass `{ commit: true }`
|
|
@@ -3296,6 +3315,7 @@ class AIAutocompleteComponent {
|
|
|
3296
3315
|
currency: this.currency,
|
|
3297
3316
|
productId: this.productId,
|
|
3298
3317
|
visitorId: this.visitorId,
|
|
3318
|
+
analyticsConsent: this.analyticsConsent,
|
|
3299
3319
|
optionOverrides: this.optionOverrides,
|
|
3300
3320
|
maskCompletedText: this.maskCompletedText,
|
|
3301
3321
|
columns: this.columns,
|
|
@@ -3398,6 +3418,7 @@ class AIAutocompleteComponent {
|
|
|
3398
3418
|
changes["currency"] ||
|
|
3399
3419
|
changes["productId"] ||
|
|
3400
3420
|
changes["visitorId"] ||
|
|
3421
|
+
changes["analyticsConsent"] ||
|
|
3401
3422
|
changes["optionOverrides"] ||
|
|
3402
3423
|
changes["dropdownTrigger"] ||
|
|
3403
3424
|
changes["optionsPosition"] ||
|
|
@@ -3417,6 +3438,7 @@ class AIAutocompleteComponent {
|
|
|
3417
3438
|
currency: this.currency,
|
|
3418
3439
|
productId: this.productId,
|
|
3419
3440
|
visitorId: this.visitorId,
|
|
3441
|
+
analyticsConsent: this.analyticsConsent,
|
|
3420
3442
|
optionOverrides: this.optionOverrides,
|
|
3421
3443
|
dropdownTrigger: this.dropdownTrigger,
|
|
3422
3444
|
optionsPosition: this.optionsPosition,
|
|
@@ -3480,6 +3502,14 @@ class AIAutocompleteComponent {
|
|
|
3480
3502
|
endSubmitProgress() {
|
|
3481
3503
|
this.controller?.endSubmitProgress();
|
|
3482
3504
|
}
|
|
3505
|
+
/** The visitor id the events carry right now, or `undefined` while there is none. */
|
|
3506
|
+
getVisitorId() {
|
|
3507
|
+
return this.controller?.getVisitorId();
|
|
3508
|
+
}
|
|
3509
|
+
/** Reads `analyticsConsent` again now, after the visitor changes their choice. */
|
|
3510
|
+
refreshAnalyticsConsent() {
|
|
3511
|
+
this.controller?.refreshAnalyticsConsent();
|
|
3512
|
+
}
|
|
3483
3513
|
/**
|
|
3484
3514
|
* Skip the active pill — same action as the dropdown's skip button / →.
|
|
3485
3515
|
* Lets a consumer who hides the built-in button (`showSkipButton=false`)
|
|
@@ -3652,7 +3682,7 @@ class AIAutocompleteComponent {
|
|
|
3652
3682
|
}
|
|
3653
3683
|
}
|
|
3654
3684
|
AIAutocompleteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AIAutocompleteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3655
|
-
AIAutocompleteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: AIAutocompleteComponent, isStandalone: true, selector: "ai-autocomplete", inputs: { apiConfig: "apiConfig", additionalContext: "additionalContext", language: "language", currency: "currency", productId: "productId", visitorId: "visitorId", optionOverrides: "optionOverrides", maskCompletedText: "maskCompletedText", columns: "columns", pillPlacement: "pillPlacement", mode: "mode", optionsPosition: "optionsPosition", animations: "animations", optionsStyle: "optionsStyle", dropdownTrigger: "dropdownTrigger", closeDropdownOnBlur: "closeDropdownOnBlur", prependPlaceholder: "prependPlaceholder", showNonTappableOptions: "showNonTappableOptions", allOption: "allOption", locationSearch: "locationSearch", showSkipButton: "showSkipButton", showOptionIcons: "showOptionIcons", showOptionImages: "showOptionImages", showOptionCounts: "showOptionCounts", productsLayout: "productsLayout", productImageFallback: "productImageFallback", showProductVendor: "showProductVendor", showChipIcons: "showChipIcons", showChipImages: "showChipImages", showChipRemove: "showChipRemove", autoFocus: "autoFocus", value: "value", completedParams: "completedParams", showProducts: "showProducts", submitProgress: "submitProgress", products: "products", mapProducts: "mapProducts", onProductAddToCart: "onProductAddToCart", submitButton: "submitButton", resetOnSubmit: "resetOnSubmit" }, outputs: { submitted: "submitted", resultChange: "resultChange", errored: "errored", valueChange: "valueChange", completedParamsChange: "completedParamsChange", focused: "focused", blurred: "blurred", productSelect: "productSelect" }, providers: [
|
|
3685
|
+
AIAutocompleteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: AIAutocompleteComponent, isStandalone: true, selector: "ai-autocomplete", inputs: { apiConfig: "apiConfig", additionalContext: "additionalContext", language: "language", currency: "currency", productId: "productId", visitorId: "visitorId", analyticsConsent: "analyticsConsent", optionOverrides: "optionOverrides", maskCompletedText: "maskCompletedText", columns: "columns", pillPlacement: "pillPlacement", mode: "mode", optionsPosition: "optionsPosition", animations: "animations", optionsStyle: "optionsStyle", dropdownTrigger: "dropdownTrigger", closeDropdownOnBlur: "closeDropdownOnBlur", prependPlaceholder: "prependPlaceholder", showNonTappableOptions: "showNonTappableOptions", allOption: "allOption", locationSearch: "locationSearch", showSkipButton: "showSkipButton", showOptionIcons: "showOptionIcons", showOptionImages: "showOptionImages", showOptionCounts: "showOptionCounts", productsLayout: "productsLayout", productImageFallback: "productImageFallback", showProductVendor: "showProductVendor", showChipIcons: "showChipIcons", showChipImages: "showChipImages", showChipRemove: "showChipRemove", autoFocus: "autoFocus", value: "value", completedParams: "completedParams", showProducts: "showProducts", submitProgress: "submitProgress", products: "products", mapProducts: "mapProducts", onProductAddToCart: "onProductAddToCart", submitButton: "submitButton", resetOnSubmit: "resetOnSubmit" }, outputs: { submitted: "submitted", resultChange: "resultChange", errored: "errored", valueChange: "valueChange", completedParamsChange: "completedParamsChange", focused: "focused", blurred: "blurred", productSelect: "productSelect" }, providers: [
|
|
3656
3686
|
{
|
|
3657
3687
|
provide: NG_VALUE_ACCESSOR,
|
|
3658
3688
|
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
|
@@ -3688,6 +3718,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
3688
3718
|
type: Input
|
|
3689
3719
|
}], visitorId: [{
|
|
3690
3720
|
type: Input
|
|
3721
|
+
}], analyticsConsent: [{
|
|
3722
|
+
type: Input
|
|
3691
3723
|
}], optionOverrides: [{
|
|
3692
3724
|
type: Input
|
|
3693
3725
|
}], maskCompletedText: [{
|