@design.estate/dees-catalog 21.41.0 → 21.41.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.
@@ -2617,6 +2617,8 @@ var _DeesInputDropdownPopup = class _DeesInputDropdownPopup extends (_a7 = DeesE
2617
2617
  __privateAdd(this, _visible, __runInitializers(_init9, 68, this, false)), __runInitializers(_init9, 71, this);
2618
2618
  __publicField(this, "windowLayer", null);
2619
2619
  __publicField(this, "isDestroying", false);
2620
+ /** The list's openings so far: a close removes the list after its exit only if none came since. */
2621
+ __publicField(this, "openings", 0);
2620
2622
  __publicField(this, "handleSearch", /* @__PURE__ */ __name((event) => {
2621
2623
  const searchTerm = event.target.value;
2622
2624
  this.searchValue = searchTerm;
@@ -2727,15 +2729,17 @@ var _DeesInputDropdownPopup = class _DeesInputDropdownPopup extends (_a7 = DeesE
2727
2729
  const selectedIndex = this.options.findIndex((option) => option.key === this.selectedKey && !option.disabled);
2728
2730
  this.highlightedIndex = selectedIndex >= 0 ? selectedIndex : firstUsableIndex(this.options);
2729
2731
  this.searchValue = "";
2732
+ this.openings++;
2733
+ this.isDestroying = false;
2730
2734
  this.classList.remove("closing");
2731
2735
  this.windowLayer = await DeesWindowLayer.createAndShow({ dimmed: false, ownerElement: this.ownerComponent });
2732
2736
  this.windowLayer.addEventListener("click", () => {
2733
2737
  this.dispatchEvent(new CustomEvent("close-request"));
2734
2738
  });
2735
2739
  this.menuZIndex = zIndexRegistry.getNextZIndex();
2736
- zIndexRegistry.register(this, this.menuZIndex);
2737
2740
  this.style.zIndex = this.menuZIndex.toString();
2738
2741
  this.windowLayer.parentElement.appendChild(this);
2742
+ zIndexRegistry.register(this, this.menuZIndex);
2739
2743
  await domtools_pluginexports_exports.smartpromise.delayFor(0);
2740
2744
  this.visible = true;
2741
2745
  this.listenForRepositioning();
@@ -2746,6 +2750,7 @@ var _DeesInputDropdownPopup = class _DeesInputDropdownPopup extends (_a7 = DeesE
2746
2750
  return;
2747
2751
  }
2748
2752
  this.isDestroying = true;
2753
+ const opening = this.openings;
2749
2754
  this.classList.add("closing");
2750
2755
  this.searchAbort?.abort();
2751
2756
  this.repositionListeners?.abort();
@@ -2759,6 +2764,7 @@ var _DeesInputDropdownPopup = class _DeesInputDropdownPopup extends (_a7 = DeesE
2759
2764
  }
2760
2765
  this.visible = false;
2761
2766
  await domtools_pluginexports_exports.smartpromise.delayFor(150);
2767
+ if (opening !== this.openings) return;
2762
2768
  if (this.parentElement) {
2763
2769
  this.parentElement.removeChild(this);
2764
2770
  }
@@ -124125,7 +124131,7 @@ var bright = {
124125
124131
  // ts_web/00_commitinfo_data.ts
124126
124132
  var commitinfo = {
124127
124133
  name: "@design.estate/dees-catalog",
124128
- version: "21.41.0",
124134
+ version: "21.41.1",
124129
124135
  description: "A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript."
124130
124136
  };
124131
124137
  export {