@magicx-eng/ai-autocomplete-angular 0.61.1 → 0.63.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.
@@ -2386,6 +2386,35 @@ class AIAutocompleteController {
2386
2386
  return;
2387
2387
  this.core.endSubmitProgress();
2388
2388
  }
2389
+ /**
2390
+ * The search in progress, to send with your own events from it. Undefined
2391
+ * until the feature is enabled for your account. Read it in your submit or
2392
+ * product handler: the shopper's next input starts another search.
2393
+ */
2394
+ getSearchId() {
2395
+ if (this.isDestroyed)
2396
+ return undefined;
2397
+ return this.core.getSearchId();
2398
+ }
2399
+ /**
2400
+ * The visitor id the events carry right now, to send with your own events.
2401
+ * Undefined while there is none: before the first response, or without
2402
+ * `visitorId` and without consent.
2403
+ */
2404
+ getVisitorId() {
2405
+ if (this.isDestroyed)
2406
+ return undefined;
2407
+ return this.core.getVisitorId();
2408
+ }
2409
+ /**
2410
+ * Reads `analyticsConsent` again now. Call it when the visitor changes their
2411
+ * choice, so a declined one removes the stored id at once.
2412
+ */
2413
+ refreshAnalyticsConsent() {
2414
+ if (this.isDestroyed)
2415
+ return;
2416
+ this.core.refreshAnalyticsConsent();
2417
+ }
2389
2418
  /**
2390
2419
  * Pick a dropdown option (or replace the re-edited param if in re-edit mode).
2391
2420
  * In a multi_select question this ticks the option; pass `{ commit: true }`
@@ -3296,6 +3325,7 @@ class AIAutocompleteComponent {
3296
3325
  currency: this.currency,
3297
3326
  productId: this.productId,
3298
3327
  visitorId: this.visitorId,
3328
+ analyticsConsent: this.analyticsConsent,
3299
3329
  optionOverrides: this.optionOverrides,
3300
3330
  maskCompletedText: this.maskCompletedText,
3301
3331
  columns: this.columns,
@@ -3398,6 +3428,7 @@ class AIAutocompleteComponent {
3398
3428
  changes["currency"] ||
3399
3429
  changes["productId"] ||
3400
3430
  changes["visitorId"] ||
3431
+ changes["analyticsConsent"] ||
3401
3432
  changes["optionOverrides"] ||
3402
3433
  changes["dropdownTrigger"] ||
3403
3434
  changes["optionsPosition"] ||
@@ -3417,6 +3448,7 @@ class AIAutocompleteComponent {
3417
3448
  currency: this.currency,
3418
3449
  productId: this.productId,
3419
3450
  visitorId: this.visitorId,
3451
+ analyticsConsent: this.analyticsConsent,
3420
3452
  optionOverrides: this.optionOverrides,
3421
3453
  dropdownTrigger: this.dropdownTrigger,
3422
3454
  optionsPosition: this.optionsPosition,
@@ -3480,6 +3512,18 @@ class AIAutocompleteComponent {
3480
3512
  endSubmitProgress() {
3481
3513
  this.controller?.endSubmitProgress();
3482
3514
  }
3515
+ /** The search in progress, or `undefined` until the feature is enabled for your account. */
3516
+ getSearchId() {
3517
+ return this.controller?.getSearchId();
3518
+ }
3519
+ /** The visitor id the events carry right now, or `undefined` while there is none. */
3520
+ getVisitorId() {
3521
+ return this.controller?.getVisitorId();
3522
+ }
3523
+ /** Reads `analyticsConsent` again now, after the visitor changes their choice. */
3524
+ refreshAnalyticsConsent() {
3525
+ this.controller?.refreshAnalyticsConsent();
3526
+ }
3483
3527
  /**
3484
3528
  * Skip the active pill — same action as the dropdown's skip button / →.
3485
3529
  * Lets a consumer who hides the built-in button (`showSkipButton=false`)
@@ -3652,7 +3696,7 @@ class AIAutocompleteComponent {
3652
3696
  }
3653
3697
  }
3654
3698
  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: [
3699
+ 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
3700
  {
3657
3701
  provide: NG_VALUE_ACCESSOR,
3658
3702
  // eslint-disable-next-line @typescript-eslint/no-use-before-define
@@ -3688,6 +3732,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
3688
3732
  type: Input
3689
3733
  }], visitorId: [{
3690
3734
  type: Input
3735
+ }], analyticsConsent: [{
3736
+ type: Input
3691
3737
  }], optionOverrides: [{
3692
3738
  type: Input
3693
3739
  }], maskCompletedText: [{