@deskhero/dh_ui 2.88.3 → 2.88.4

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/dist/dh_ui.es.js CHANGED
@@ -65273,7 +65273,7 @@ function SOe(e) {
65273
65273
  }
65274
65274
  function s() {
65275
65275
  if (!e) return;
65276
- e.innerHTML = "", t.forEach((t, r) => {
65276
+ e.innerHTML = "", e.style.display = t.length ? "" : "none", t.forEach((t, r) => {
65277
65277
  let i = document.createElement("div");
65278
65278
  i.className = "dh-mention-item" + (r === n ? " is-active" : ""), i.setAttribute("role", "option"), i.textContent = t.text, i.onclick = () => c(t), e && e.appendChild(i);
65279
65279
  });
@@ -65299,6 +65299,7 @@ function SOe(e) {
65299
65299
  l(e);
65300
65300
  },
65301
65301
  onKeyDown(e) {
65302
+ if (!t.length) return !1;
65302
65303
  if (e.event.key === "ArrowDown") return n = Math.min(n + 1, Math.max(0, t.length - 1)), s(), !0;
65303
65304
  if (e.event.key === "ArrowUp") return n = Math.max(n - 1, 0), s(), !0;
65304
65305
  if (e.event.key === "Enter" || e.event.key === "Tab") {
@@ -98011,7 +98012,7 @@ function aje() {
98011
98012
  r?.command?.(e);
98012
98013
  }
98013
98014
  function s() {
98014
- e && (e.innerHTML = "", t.forEach((t, r) => {
98015
+ e && (e.innerHTML = "", e.style.display = t.length ? "" : "none", t.forEach((t, r) => {
98015
98016
  let i = t ?? {}, a = String(i.emoji || i.char || ""), s = String(i.title || i.name || ""), c = document.createElement("div");
98016
98017
  c.className = "dh-mention-item" + (r === n ? " is-active" : ""), c.setAttribute("role", "option"), c.textContent = `${a} ${s}`.trim(), c.onclick = () => o(t), e?.appendChild(c);
98017
98018
  }), rje(e));
@@ -98031,7 +98032,7 @@ function aje() {
98031
98032
  },
98032
98033
  onKeyDown(e) {
98033
98034
  let r = e.event;
98034
- if (!r) return !1;
98035
+ if (!r || !t.length) return !1;
98035
98036
  if (r.key === "ArrowDown") return n = Math.min(n + 1, Math.max(0, t.length - 1)), s(), !0;
98036
98037
  if (r.key === "ArrowUp") return n = Math.max(n - 1, 0), s(), !0;
98037
98038
  if (r.key === "Enter" || r.key === "Tab") {