udp-stencil-component-library 26.9.0-beta.30 → 26.9.0-beta.32

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.
@@ -4465,6 +4465,8 @@ async function performServerSideSearch(text, signal, searchFunction, datasource)
4465
4465
 
4466
4466
  const udpAutocompleteCss = () => `:host{display:block;width:100%}fluent-field{width:100%;grid-template-columns:minmax(0, 1fr)}.selected-items{display:flex;flex-wrap:wrap;gap:4px;width:100%;max-height:0;opacity:0;margin-top:0;margin-bottom:0;overflow:hidden;transition:max-height 0.2s cubic-bezier(0.33, 1, 0.68, 1), opacity 0.2s ease-out,}.selected-items.has-items{max-height:500px;opacity:1}fluent-label[disabled]{color:var(--colorNeutralForeground1)}fluent-field.no-label::part(label){display:none}fluent-field.no-message::part(message){display:none}fluent-dropdown{width:100%;max-width:100%}fluent-dropdown[appearance="outline"],fluent-dropdown[appearance="transparent"]{--borderRadiusMedium:5px}fluent-dropdown>button,fluent-dropdown>input{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.clear-button{display:none;color:var(--colorNeutralForeground3)}.clear-button.is-visible{display:inline-flex}.indicator-wrapper{height:20px;display:flex;align-items:center}fluent-dropdown[size='small'] .indicator-wrapper{height:16px}.message{color:var(--colorNeutralForeground3)}.message-wrapper{display:flex;flex-direction:column;width:100%}.message-wrapper.includeErrorPadding{min-height:var(--lineHeightBase200)}.message.error{color:var(--colorPaletteRedForeground1)}.popup-hint-icon{margin-left:2px}fluent-dropdown[appearance="outline"]:focus-within{--colorStrokeFocus1:var(--colorNeutralStroke1);--colorStrokeFocus2:transparent}fluent-dropdown[appearance="filled-darker"]:focus-within,fluent-dropdown[appearance="filled-lighter"]:focus-within,fluent-dropdown[appearance="transparent"]:focus-within{--colorStrokeFocus1:transparent;--colorStrokeFocus2:transparent}:host(.has-error) fluent-dropdown:not(:focus-within){--colorNeutralStroke1:var(--colorPaletteRedBorder2);--colorNeutralStroke1Hover:var(--colorPaletteRedBorder2);--colorNeutralStrokeAccessible:var(--colorPaletteRedBorder2);--colorNeutralStrokeAccessibleHover:var(--colorPaletteRedBorder2)}fluent-option:state(active){border:2px solid var(--colorNeutralStrokeAccessible)}fluent-dropdown[appearance="filled-darker"],fluent-dropdown[appearance="filled-lighter"]{--spacingVerticalSNudge:5px;box-shadow:var(--shadow2);border-radius:var(--borderRadiusMedium)}fluent-dropdown[appearance="filled-darker"][size='small'],fluent-dropdown[appearance="filled-lighter"][size='small']{--spacingVerticalXS:3px}fluent-dropdown[appearance="outline"][size='large'],fluent-dropdown[appearance="transparent"][size='large']{--spacingVerticalS:9px}.label-content{display:inline-flex;flex-wrap:wrap;align-items:flex-start;width:100%}.label-content fluent-label{flex:0 0 auto;order:1}.label-content::after{order:2;flex:0 0 auto}.label-content .selected-items{flex:0 0 100%;order:3}fluent-option{min-height:32px;box-sizing:border-box;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}fluent-option::part(content){display:flex;align-items:center;gap:6px}.option-badges{display:inline-flex;align-items:center;gap:4px;flex-shrink:0;pointer-events:none}.option-two-line{display:flex;flex-direction:column;gap:2px;min-width:0;pointer-events:none}.option-two-line .option-primary{display:flex;align-items:center;gap:6px;min-width:0;overflow:hidden}.option-two-line .option-label-text{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.option-two-line .option-secondary{font-size:var(--fontSizeBase200);font-weight:var(--fontWeightRegular);line-height:var(--lineHeightBase200);color:var(--colorNeutralForeground2);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}fluent-option:has(.option-two-line){height:auto;min-height:52px}fluent-option:has(.option-two-line)::part(content){align-items:flex-start}fluent-option.option-group-header{pointer-events:none;color:var(--colorNeutralForeground2);font-size:var(--fontSizeBase200);font-weight:var(--fontWeightSemibold);text-transform:uppercase;letter-spacing:0.04em;line-height:24px;opacity:1;padding-top:10px}fluent-option.option-group-header:first-child{padding-top:0}fluent-option.option-group-header::part(content){min-height:24px;align-items:center}fluent-option.option-group-header:state(active){border:none}.input-wrapper{position:relative;display:block;width:100%}.selected-overlay{position:absolute;top:0;bottom:0;inset-inline-start:0;inset-inline-end:60px;display:flex;align-items:center;gap:6px;padding-inline-start:10px;pointer-events:none;overflow:hidden;font:inherit;color:var(--colorNeutralForeground1);z-index:1}.selected-overlay .selected-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.input-wrapper.has-overlay fluent-dropdown>input{color:transparent;caret-color:var(--colorNeutralForeground1)}`;
4467
4467
 
4468
+ /** Number of matching options rendered per chunk; more are appended as the list scrolls. */
4469
+ const RENDER_CHUNK = 100;
4468
4470
  const UdpAutocomplete = class {
4469
4471
  constructor(hostRef) {
4470
4472
  index.registerInstance(this, hostRef);
@@ -4593,10 +4595,52 @@ const UdpAutocomplete = class {
4593
4595
  * class of bug in form contexts.
4594
4596
  */
4595
4597
  this.valueAs = 'option';
4598
+ /**
4599
+ * Render large option lists incrementally. Only options matching the filter
4600
+ * are rendered, 100 at a time, and more load as the listbox is scrolled (or
4601
+ * arrowed) near the bottom. Off by default, in which case every option is
4602
+ * rendered and non-matches are hidden.
4603
+ */
4604
+ this.virtualize = false;
4596
4605
  // --- State ---
4597
4606
  this.internalLoading = false;
4598
4607
  this.filterText = '';
4599
4608
  this.fetchedOptions = [];
4609
+ /** How many matching options are rendered (with `virtualize`); grows by RENDER_CHUNK on scroll. */
4610
+ this.renderLimit = RENDER_CHUNK;
4611
+ /** Matching option count from the last render, read by the scroll/keyboard handlers. */
4612
+ this.matchCount = 0;
4613
+ /** Set when the filter changes, so the next render moves fluent's active row to the first match. */
4614
+ this.filterChanged = false;
4615
+ /**
4616
+ * With `virtualize`, rows are added/removed rather than hidden, so fluent's
4617
+ * `activeIndex` (set against the previous DOM, e.g. by its input handler or on
4618
+ * open) can land on a retained-but-hidden selection or on the wrong row. Point it
4619
+ * at the first shown option when the filter changed or the active row isn't shown.
4620
+ */
4621
+ this.syncActiveIndex = () => {
4622
+ var _a;
4623
+ const force = this.filterChanged;
4624
+ this.filterChanged = false;
4625
+ const dropdown = this.dropdownRef;
4626
+ if (!this.virtualize || !(dropdown === null || dropdown === void 0 ? void 0 : dropdown.open))
4627
+ return;
4628
+ const enabled = (_a = dropdown.enabledOptions) !== null && _a !== void 0 ? _a : [];
4629
+ const active = dropdown.activeIndex;
4630
+ // -1 (nothing active) is fluent's own choice; leave it unless the filter changed.
4631
+ if (!force && (active < 0 || this.isShownOption(enabled[active])))
4632
+ return;
4633
+ dropdown.activeIndex = enabled.findIndex(o => this.isShownOption(o));
4634
+ };
4635
+ this.handleListboxScroll = (ev) => {
4636
+ if (!this.virtualize)
4637
+ return;
4638
+ const el = ev.target;
4639
+ // Within ~a few rows of the bottom → render the next chunk.
4640
+ if (el.scrollTop + el.clientHeight >= el.scrollHeight - 200) {
4641
+ this.loadNextChunk();
4642
+ }
4643
+ };
4600
4644
  /** Tracks single-select selection so the overlay works uncontrolled. */
4601
4645
  this.selectionForOverlay = null;
4602
4646
  this.handleInput = (ev) => {
@@ -4675,19 +4719,29 @@ const UdpAutocomplete = class {
4675
4719
  }
4676
4720
  };
4677
4721
  this.handleKeyDownCapture = (ev) => {
4678
- var _a, _b;
4722
+ var _a, _b, _c;
4679
4723
  // Arrow navigation: skip filter-hidden options. activeIndex is indexed into
4680
4724
  // fluent's enabledOptions, so match that space — not displayOptions — or
4681
4725
  // group headers shift everything and highlight the wrong row.
4682
4726
  if (ev.key === 'ArrowUp' || ev.key === 'ArrowDown') {
4683
4727
  if (!this.dropdownRef || !this.dropdownRef.open)
4684
4728
  return;
4685
- if (!this.filterText)
4729
+ const enabled = this.dropdownRef.enabledOptions;
4730
+ // Within the last few shown options → render the next chunk so ArrowDown keeps
4731
+ // going. Count shown rows only: hidden retained selections would skew the threshold.
4732
+ if (this.virtualize && ev.key === 'ArrowDown' && enabled) {
4733
+ const shownAfter = enabled
4734
+ .slice(this.dropdownRef.activeIndex + 1)
4735
+ .filter(o => this.isShownOption(o)).length;
4736
+ if (shownAfter < 3)
4737
+ this.loadNextChunk();
4738
+ }
4739
+ // Fluent's default navigation is fine unless some rendered options are hidden.
4740
+ if (!(enabled === null || enabled === void 0 ? void 0 : enabled.some(o => o.style.display === 'none')))
4686
4741
  return;
4687
4742
  ev.preventDefault();
4688
4743
  ev.stopPropagation();
4689
- const enabled = this.dropdownRef.enabledOptions;
4690
- if (!(enabled === null || enabled === void 0 ? void 0 : enabled.length))
4744
+ if (!enabled.length)
4691
4745
  return;
4692
4746
  const direction = ev.key === 'ArrowDown' ? 1 : -1;
4693
4747
  let nextIndex = this.dropdownRef.activeIndex + direction;
@@ -4697,7 +4751,7 @@ const UdpAutocomplete = class {
4697
4751
  if (nextIndex >= enabled.length)
4698
4752
  nextIndex = 0;
4699
4753
  const el = enabled[nextIndex];
4700
- if (el && el.style.display !== 'none') {
4754
+ if (el && el.style.display !== 'none' && !el.hidden) {
4701
4755
  this.dropdownRef.activeIndex = nextIndex;
4702
4756
  return;
4703
4757
  }
@@ -4722,15 +4776,12 @@ const UdpAutocomplete = class {
4722
4776
  if (this.dropdownRef && this.dropdownRef.open) {
4723
4777
  if (this.multiple) {
4724
4778
  const dropdown = this.dropdownRef;
4725
- const idx = dropdown.activeIndex;
4726
- const displayOpts = this.getDisplayOptions();
4727
- if (!this.loading &&
4728
- !this.internalLoading &&
4729
- displayOpts.length > 0 &&
4730
- idx >= 0 &&
4731
- idx < displayOpts.length) {
4732
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
4733
- const item = displayOpts[idx];
4779
+ // activeIndex indexes fluent's enabledOptions (only rendered rows), so
4780
+ // resolve the item through the DOM option, not displayOptions[idx].
4781
+ const activeOpt = (_c = dropdown.enabledOptions) === null || _c === void 0 ? void 0 : _c[dropdown.activeIndex];
4782
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
4783
+ const item = (activeOpt === null || activeOpt === void 0 ? void 0 : activeOpt.value) ? this.findOptionByValue(activeOpt.value) : undefined;
4784
+ if (!this.loading && !this.internalLoading && item !== undefined) {
4734
4785
  const itemVal = this.getOptionValue(item);
4735
4786
  const currentVal = Array.isArray(this.value) ? this.value : [];
4736
4787
  const exists = currentVal.some(i => this.getOptionValue(i) === itemVal);
@@ -4859,6 +4910,42 @@ const UdpAutocomplete = class {
4859
4910
  }
4860
4911
  };
4861
4912
  }
4913
+ resetRenderLimit(next, prev, prop) {
4914
+ // A new `options` array with the same contents (e.g. `items.map(...)` on every
4915
+ // React render) shouldn't throw away the rows the user has scrolled to.
4916
+ if (prop === 'options' && this.sameOptions(next, prev))
4917
+ return;
4918
+ if (prop === 'filterText')
4919
+ this.filterChanged = true;
4920
+ this.renderLimit = RENDER_CHUNK;
4921
+ }
4922
+ sameOptions(a, b) {
4923
+ if (a === b)
4924
+ return true;
4925
+ if (!a || !b || a.length !== b.length)
4926
+ return false;
4927
+ return a.every((opt, i) => this.getOptionValue(opt) === this.getOptionValue(b[i]));
4928
+ }
4929
+ loadNextChunk() {
4930
+ if (this.virtualize && this.renderLimit < this.matchCount) {
4931
+ this.renderLimit += RENDER_CHUNK;
4932
+ }
4933
+ }
4934
+ isShownOption(el) {
4935
+ return !!el && el.style.display !== 'none' && !el.hidden;
4936
+ }
4937
+ componentDidRender() {
4938
+ // rAF: fluent refreshes `enabledOptions` from the listbox's slotchange, after our patch.
4939
+ if (this.virtualize)
4940
+ requestAnimationFrame(this.syncActiveIndex);
4941
+ }
4942
+ /** Option values that must stay rendered (hidden if needed) so fluent keeps their selected state. */
4943
+ getSelectedValueSet() {
4944
+ const vals = Array.isArray(this.value)
4945
+ ? this.value
4946
+ : [this.value, this.selectionForOverlay];
4947
+ return new Set(vals.filter(v => v != null && v !== '').map(v => this.getOptionValue(v)));
4948
+ }
4862
4949
  syncSelectionForOverlay() {
4863
4950
  // '' → no selection. Without this, the clear-button visibility check would stay truthy after clear.
4864
4951
  if (Array.isArray(this.value) || this.value == null || this.value === '') {
@@ -5146,23 +5233,23 @@ const UdpAutocomplete = class {
5146
5233
  const hasError = !!this.error;
5147
5234
  const message = this.error || this.hint;
5148
5235
  const displayOptions = this.getDisplayOptions();
5149
- // Pre-compute visibility (avoids two passes) and per-group visible counts
5150
- // so we can hide group headers whose options are all filtered out.
5151
- const visibilityMap = new Map();
5152
- const groupVisibleCount = new Map();
5236
+ // Without `virtualize`, every option is rendered and non-matches are hidden.
5237
+ // With it, only the first `renderLimit` matching options are shown; selected
5238
+ // options beyond that stay rendered but hidden so fluent keeps their
5239
+ // selected state (multi-select merge, single-select revert).
5240
+ const selectedValues = this.getSelectedValueSet();
5241
+ const rows = [];
5153
5242
  let visibleCount = 0;
5154
5243
  displayOptions === null || displayOptions === void 0 ? void 0 : displayOptions.forEach(opt => {
5155
- var _a;
5156
- const key = this.getOptionValue(opt);
5157
- const isVisible = this.isOptionVisible(opt);
5158
- visibilityMap.set(key, isVisible);
5159
- if (isVisible) {
5244
+ const isMatch = this.isOptionVisible(opt);
5245
+ const shown = isMatch && (!this.virtualize || visibleCount < this.renderLimit);
5246
+ if (isMatch)
5160
5247
  visibleCount++;
5161
- const group = this.getOptionGroup(opt);
5162
- if (group)
5163
- groupVisibleCount.set(group, ((_a = groupVisibleCount.get(group)) !== null && _a !== void 0 ? _a : 0) + 1);
5248
+ if (shown || !this.virtualize || selectedValues.has(this.getOptionValue(opt))) {
5249
+ rows.push({ option: opt, shown });
5164
5250
  }
5165
5251
  });
5252
+ this.matchCount = visibleCount;
5166
5253
  const mappedAppearance = this.appearance === 'underline' ? 'transparent' : this.appearance;
5167
5254
  const selectedItems = this.multiple && Array.isArray(this.value) ? this.value : [];
5168
5255
  const overlayOption = this.getSelectedOverlayOption();
@@ -5170,10 +5257,10 @@ const UdpAutocomplete = class {
5170
5257
  ? this.resolveProp(overlayOption, this.optionLabel, true)
5171
5258
  : null;
5172
5259
  const overlayBadges = overlayOption ? this.getOptionBadges(overlayOption) : [];
5173
- return (index.h(index.Host, { key: '41b58b9428f2a8c9f155cef92268a5ef950bd8fa', class: { 'has-error': hasError } }, index.h("fluent-field", { key: '4f07c34e825f56bbc1e0706add450c3ae4793fc3', class: {
5260
+ return (index.h(index.Host, { key: '76ee1b4a76ec516cc100c9db846b1ea07cc3813d', class: { 'has-error': hasError } }, index.h("fluent-field", { key: 'adae686e6559c567c7e38512818e10f06812464d', class: {
5174
5261
  'no-label': !this.label && !this.multiple,
5175
5262
  'no-message': !message && !this.includeErrorPadding,
5176
- } }, index.h("div", { key: '669ef2dd7723af468728fa1b45f5bf5748a10775', class: "label-content", onClick: () => this.handleTogglePopover(false), slot: "label" }, this.label && (index.h("fluent-label", { key: '6bf435ce0a60103cdb7814df5bd1c197d2c19a8a', disabled: this.disabled, style: { paddingTop: '2px', paddingBottom: '2px' } }, this.label, this.popupHint && (index.h("udp-tooltip", { key: '0b7cd46fc4a19b04cb136c107b7d97f22eb3c671', content: this.popupHint, positioning: "above" }, index.h("udp-fluent-icon", { key: 'b2e3c5eabad1323d6e50aab05a139ecb3950afb5', name: "info", size: "xs", class: "popup-hint-icon" }))))), this.multiple && (index.h("div", { key: '9375ee46ee1d3e7bb67f032a5212842af8e3ebd8', class: {
5263
+ } }, index.h("div", { key: 'a220aa31aa890712459d9ee486aecd1ee94945bf', class: "label-content", onClick: () => this.handleTogglePopover(false), slot: "label" }, this.label && (index.h("fluent-label", { key: '64929039f9bfda0927e99bbb1b287306969f2530', disabled: this.disabled, style: { paddingTop: '2px', paddingBottom: '2px' } }, this.label, this.popupHint && (index.h("udp-tooltip", { key: '2defc3f489dbcfac00ad48f278f725aa915f5007', content: this.popupHint, positioning: "above" }, index.h("udp-fluent-icon", { key: 'b354aaad3f87e2e67342136b187a70430e975057', name: "info", size: "xs", class: "popup-hint-icon" }))))), this.multiple && (index.h("div", { key: 'fc86adb109e9eaa41070209c85bf4379cf0cf3a3', class: {
5177
5264
  'selected-items': true,
5178
5265
  'has-items': selectedItems.length > 0,
5179
5266
  } }, selectedItems.map(item => {
@@ -5183,28 +5270,27 @@ const UdpAutocomplete = class {
5183
5270
  // mode `item` is already the object, so this is a no-op.
5184
5271
  const opt = (_a = this.findOptionByValue(this.getOptionValue(item))) !== null && _a !== void 0 ? _a : item;
5185
5272
  return (index.h("udp-fluent-badge", { color: "brand", shape: "circular", dismissible: !this.disabled, onDismiss: () => this.handleChipDelete(item) }, this.resolveProp(opt, this.optionLabel, true)));
5186
- })))), index.h("div", { key: '4c2ea28f1784c4f3cb54a5828af8bf9ca97cf811', slot: "input", class: {
5273
+ })))), index.h("div", { key: '79951c7f4ef669f4b93f8878f04e8314b3f49ad4', slot: "input", class: {
5187
5274
  'input-wrapper': true,
5188
5275
  'has-overlay': !!overlayOption,
5189
- } }, index.h("fluent-dropdown", { key: '641e550ad106a048c6ed1846bf07bc6e465ca12f', type: "combobox", name: this.name, appearance: mappedAppearance, size: this.controlSize, disabled: this.disabled, required: this.required, placeholder: this.placeholder, multiple: this.multiple,
5276
+ } }, index.h("fluent-dropdown", { key: 'a99f032f1fd6fdb5765b5a286495a816c82fddaa', type: "combobox", name: this.name, appearance: mappedAppearance, size: this.controlSize, disabled: this.disabled, required: this.required, placeholder: this.placeholder, multiple: this.multiple,
5190
5277
  // Events
5191
5278
  onInput: this.handleInput, onChange: this.handleChange, onFocusout: this.handleBlur, onFocusin: this.handleFocusIn,
5192
5279
  // Suppress native invalid popup
5193
- onInvalid: (e) => e.preventDefault(), exportparts: "control, listbox", ref: el => (this.dropdownRef = el) }, index.h("fluent-listbox", { key: '1bca6b2057765e9f602f4f5f19beb0f815517d6a' }, (this.loading || this.internalLoading) && (index.h("fluent-option", { key: 'cc3b0d1be8ba90d1dfcea78c6eb01e77b8e3db56', disabled: true, ref: (el) => el === null || el === void 0 ? void 0 : el.toggleAttribute('disabled', true) }, index.h("span", { key: '613f179e5c78991e4cbbe4410fa89fe21902f5c2' }, "Loading..."), index.h("span", { key: '373efef0bf10844ed599242da7597d2e5eab1e18', slot: "indicator" }))), !this.loading && !this.internalLoading && visibleCount === 0 && !this.freeForm && (index.h("fluent-option", { key: 'b1969f76607daf1c32a7b0f77b9ee5e09bef9290', disabled: true, value: "empty", ref: (el) => el === null || el === void 0 ? void 0 : el.toggleAttribute('disabled', true) }, "No options available")), !this.loading &&
5280
+ onInvalid: (e) => e.preventDefault(), exportparts: "control, listbox", ref: el => (this.dropdownRef = el) }, index.h("fluent-listbox", { key: '71114c64866a249427e8a67d8404328b7e35ec6e', onScroll: this.handleListboxScroll,
5281
+ // On open fluent sets activeIndex to the first selected row, which may be hidden.
5282
+ onToggle: this.syncActiveIndex }, (this.loading || this.internalLoading) && (index.h("fluent-option", { key: '71512ecef3220ad620858bbe597a0da3e3693b99', disabled: true, ref: (el) => el === null || el === void 0 ? void 0 : el.toggleAttribute('disabled', true) }, index.h("span", { key: '16727d34f635a03e41fc9236db7b5ae7c33227b2' }, "Loading..."), index.h("span", { key: '809c7bf2e8c72e9debfd49246dfa4ed518fb8290', slot: "indicator" }))), !this.loading && !this.internalLoading && visibleCount === 0 && !this.freeForm && (index.h("fluent-option", { key: '7fd2f2b1c6668cd7f13af373452110cb25c7e75f', disabled: true, value: "empty", ref: (el) => el === null || el === void 0 ? void 0 : el.toggleAttribute('disabled', true) }, "No options available")), !this.loading &&
5194
5283
  !this.internalLoading &&
5195
- (displayOptions === null || displayOptions === void 0 ? void 0 : displayOptions.length) > 0 &&
5284
+ rows.length > 0 &&
5196
5285
  (() => {
5197
5286
  const nodes = [];
5198
5287
  let lastGroup;
5199
- displayOptions.forEach(option => {
5200
- var _a, _b;
5201
- const group = this.getOptionGroup(option);
5288
+ rows.forEach(({ option, shown: isVisible }) => {
5289
+ // Headers follow shown options only, so a group whose options
5290
+ // are all filtered out (or not yet rendered) gets no header.
5291
+ const group = isVisible ? this.getOptionGroup(option) : lastGroup;
5202
5292
  if (group && group !== lastGroup) {
5203
- // Hide the header if every option in the group is filtered out.
5204
- const hasVisible = ((_a = groupVisibleCount.get(group)) !== null && _a !== void 0 ? _a : 0) > 0;
5205
- if (hasVisible) {
5206
- nodes.push(index.h("fluent-option", { key: `__group_${group}`, class: "option-group-header", disabled: true, "aria-hidden": "true", ref: (el) => el === null || el === void 0 ? void 0 : el.toggleAttribute('disabled', true) }, group));
5207
- }
5293
+ nodes.push(index.h("fluent-option", { key: `__group_${group}`, class: "option-group-header", disabled: true, "aria-hidden": "true", ref: (el) => el === null || el === void 0 ? void 0 : el.toggleAttribute('disabled', true) }, group));
5208
5294
  lastGroup = group;
5209
5295
  }
5210
5296
  const optLabel = this.resolveProp(option, this.optionLabel, true);
@@ -5213,7 +5299,6 @@ const UdpAutocomplete = class {
5213
5299
  const optIcon = this.resolveProp(option, this.optionIcon);
5214
5300
  const optBadges = this.getOptionBadges(option);
5215
5301
  const safeValue = optValue !== undefined && optValue !== null ? String(optValue) : '';
5216
- const isVisible = (_b = visibilityMap.get(safeValue)) !== null && _b !== void 0 ? _b : true;
5217
5302
  nodes.push(index.h("fluent-option", { key: safeValue, disabled: !!optDisabled, value: safeValue, multiple: this.multiple, style: { display: isVisible ? undefined : 'none' }, ref: (el) => {
5218
5303
  if (el) {
5219
5304
  el.toggleAttribute('disabled', !!optDisabled);
@@ -5221,7 +5306,7 @@ const UdpAutocomplete = class {
5221
5306
  } }, optIcon && this.iconPosition === 'start' && (index.h("span", { slot: "start", class: "option-icon-slot" }, index.h("udp-fluent-icon", { name: optIcon, size: "sm" }))), this.renderOptionContent(optLabel, optIcon, optBadges, this.getOptionSecondaryText(option))));
5222
5307
  });
5223
5308
  return nodes;
5224
- })(), this.freeForm && (index.h("fluent-option", { key: '63d467e3ee2166b2d0bbbbfa75ece2c187656a07', freeform: true }, index.h("output", { key: 'eea33d6791ba4298b580dd4ea25e4628306f4ed8' })))), index.h("div", { key: 'eb3fdaf70c848ba4c69fe448a4da5d497779a10b', slot: "indicator", class: "indicator-wrapper" }, index.h("udp-fluent-icon-button", { key: '1b85a59b3f94e9c089a65b54bb16c45fa5369a7a', class: {
5309
+ })(), this.freeForm && (index.h("fluent-option", { key: 'ee56cf146228c924cee5a95b2bdec3867993840a', freeform: true }, index.h("output", { key: 'db8556880ece0f658647b585a80d179b66cd5c9a' })))), index.h("div", { key: 'b061ad8ec298394794e469664d866c464e6666e8', slot: "indicator", class: "indicator-wrapper" }, index.h("udp-fluent-icon-button", { key: '25e10ddd4f0c00ce6792984e3045014c1d9bc8f1', class: {
5225
5310
  'clear-button': true,
5226
5311
  'is-visible': this.clearable &&
5227
5312
  !this.disabled &&
@@ -5230,10 +5315,10 @@ const UdpAutocomplete = class {
5230
5315
  (this.multiple &&
5231
5316
  Array.isArray(this.value) &&
5232
5317
  this.value.length > 0)),
5233
- }, slot: "indicator", iconName: "dismiss", appearance: "transparent", size: "small", onClick: this.handleClear, onMouseDown: e => e.preventDefault(), ariaLabel: "Clear", tabIndex: -1 }), index.h("udp-fluent-icon", { key: '1d442a00b18f54cb3dbc31e969582f6d891e9a08', name: "chevron-down", size: "sm", class: "chevron-down", onClick: () => this.handleTogglePopover(false) }))), overlayOption && (index.h("div", { key: '86e25f0406501ae90c2c18bfc45439ecaabde552', class: "selected-overlay", "aria-hidden": "true" }, index.h("span", { key: '1141ec0652db41ab4f47d6f011d255d337dd9d6e', class: "selected-label" }, overlayLabel), this.renderBadges(overlayBadges)))), index.h("div", { key: 'a0fe9404433887a0412fa0b88741b3d7199f58cc', class: {
5318
+ }, slot: "indicator", iconName: "dismiss", appearance: "transparent", size: "small", onClick: this.handleClear, onMouseDown: e => e.preventDefault(), ariaLabel: "Clear", tabIndex: -1 }), index.h("udp-fluent-icon", { key: '9cd695399d0e18227d85f12567aaff080916960e', name: "chevron-down", size: "sm", class: "chevron-down", onClick: () => this.handleTogglePopover(false) }))), overlayOption && (index.h("div", { key: '3ede0dd1a30c823b92a6864bf944d0114f773580', class: "selected-overlay", "aria-hidden": "true" }, index.h("span", { key: 'c86ded6df555171a810e64e8d456d604c6034a92', class: "selected-label" }, overlayLabel), this.renderBadges(overlayBadges)))), index.h("div", { key: 'f913ff870c8a6a52540e62b227f88e3172e240c3', class: {
5234
5319
  'message-wrapper': true,
5235
5320
  'includeErrorPadding': this.includeErrorPadding,
5236
- }, slot: "message", onClick: () => this.handleTogglePopover(true) }, index.h("udp-text", { key: '8c3aaf37f8e570c41fd19d569f329b2741c42c25', variant: "caption1", class: {
5321
+ }, slot: "message", onClick: () => this.handleTogglePopover(true) }, index.h("udp-text", { key: 'fcdb32ac48858abf7a3bfdac0ac87a1cfdddcbc6', variant: "caption1", class: {
5237
5322
  message: true,
5238
5323
  error: hasError,
5239
5324
  } }, message)))));
@@ -5241,12 +5326,23 @@ const UdpAutocomplete = class {
5241
5326
  static get delegatesFocus() { return true; }
5242
5327
  get el() { return index.getElement(this); }
5243
5328
  static get watchers() { return {
5244
- "value": [{
5245
- "syncSelectionForOverlay": 0
5329
+ "filterText": [{
5330
+ "resetRenderLimit": 0
5331
+ }],
5332
+ "options": [{
5333
+ "resetRenderLimit": 0
5246
5334
  }, {
5247
5335
  "valueHandler": 0
5248
5336
  }],
5249
- "options": [{
5337
+ "fetchedOptions": [{
5338
+ "resetRenderLimit": 0
5339
+ }],
5340
+ "virtualize": [{
5341
+ "resetRenderLimit": 0
5342
+ }],
5343
+ "value": [{
5344
+ "syncSelectionForOverlay": 0
5345
+ }, {
5250
5346
  "valueHandler": 0
5251
5347
  }]
5252
5348
  }; }