@magicx-eng/ai-autocomplete-angular 0.30.0 → 0.31.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.
@@ -232,7 +232,7 @@ class PillListComponent {
232
232
  this.selectPill = new EventEmitter();
233
233
  /** Fallback widths when loading with zero cached pills (matches React). */
234
234
  this.fallbackSkeletonWidths = [125, 69];
235
- this.trackByType = (_, pill) => pill.type;
235
+ this.trackByType = (_, pill) => pill.parameter;
236
236
  this.trackByWidth = (_, w) => w;
237
237
  }
238
238
  /** The active pill is "selected" only when `activeSelected` is set. */
@@ -1095,7 +1095,9 @@ class AIAutocompleteDropdownComponent {
1095
1095
  },
1096
1096
  showsFallbackSkeleton,
1097
1097
  products: dd.products,
1098
- groupKey: activeSuggestion ? `${activeSuggestion.type} ${activeSuggestion.text}` : "",
1098
+ groupKey: activeSuggestion
1099
+ ? `${activeSuggestion.parameter} ${activeSuggestion.text}`
1100
+ : "",
1099
1101
  footerKey,
1100
1102
  footerHint,
1101
1103
  optionsPosition: dd.optionsPosition,
@@ -1586,7 +1588,7 @@ function computeDropdown(s, optionsPosition) {
1586
1588
  const activeSuggestion = s.actionableSuggestions[0];
1587
1589
  const dropdownPill = editingParam
1588
1590
  ? {
1589
- type: editingParam.suggestionType,
1591
+ parameter: editingParam.suggestionParameter,
1590
1592
  text: editingParam.suggestionPlaceholder,
1591
1593
  required: true,
1592
1594
  options: editingParam.options,
@@ -1595,8 +1597,8 @@ function computeDropdown(s, optionsPosition) {
1595
1597
  ? // Answering a span the user wrote themselves: the pill names the
1596
1598
  // parameter the server matched it to, so the calendar isn't unlabelled.
1597
1599
  {
1598
- type: editingIdentified.type,
1599
- text: identifiedParamLabel(editingIdentified.type),
1600
+ parameter: editingIdentified.parameter,
1601
+ text: identifiedParamLabel(editingIdentified.parameter),
1600
1602
  required: true,
1601
1603
  options: [],
1602
1604
  }