@creatorsn/powereditor3 0.2.7 → 0.2.8

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.
@@ -68452,8 +68452,6 @@ const e6 = /* @__PURE__ */ on(dge, [["render", pge]]), mge = /(\$\s|\\\(\s)$/, g
68452
68452
  }
68453
68453
  t || this.close();
68454
68454
  },
68455
- filterItems: [],
68456
- loading: !1,
68457
68455
  thisTheme: this.editor.storage.defaultStorage.theme,
68458
68456
  thisForeground: this.editor.storage.defaultStorage.mentionItemTools.headerForeground()
68459
68457
  };
@@ -68511,6 +68509,10 @@ const e6 = /* @__PURE__ */ on(dge, [["render", pge]]), mge = /(\$\s|\\\(\s)$/, g
68511
68509
  this.node.attrs.currentItem,
68512
68510
  this.node.attrs.value
68513
68511
  )) || this.node.attrs.placeholder;
68512
+ },
68513
+ thisMentionList() {
68514
+ var n, e;
68515
+ return ((e = (n = this.editor.storage.defaultStorage) == null ? void 0 : n.mentionItemTools) == null ? void 0 : e.mentionList()) || [];
68514
68516
  }
68515
68517
  },
68516
68518
  mounted() {
@@ -68542,18 +68544,10 @@ const e6 = /* @__PURE__ */ on(dge, [["render", pge]]), mge = /(\$\s|\\\(\s)$/, g
68542
68544
  }, 300));
68543
68545
  },
68544
68546
  async getFilterItems(n, e) {
68545
- this.loading = !0;
68546
- let t = [], r = await this.editor.storage.defaultStorage.mentionItemTools.mentionList(
68547
+ await this.editor.storage.defaultStorage.mentionItemTools.filterFunc(
68547
68548
  n,
68548
68549
  e
68549
68550
  );
68550
- for (let i of r)
68551
- await this.editor.storage.defaultStorage.mentionItemTools.filterFunc(
68552
- i,
68553
- n,
68554
- e
68555
- ) && t.push(i);
68556
- this.filterItems = t, this.loading = !1;
68557
68551
  },
68558
68552
  chooseItem(n) {
68559
68553
  this.updateAttributes({
@@ -68615,7 +68609,7 @@ function Age(n, e, t, r, i, o) {
68615
68609
  class: Ye(["power-editor-mention-container", {
68616
68610
  dark: i.thisTheme === "dark",
68617
68611
  selected: t.selected,
68618
- showing: i.showPopper && i.filterItems.length > 0
68612
+ showing: i.showPopper && o.thisMentionList.length > 0
68619
68613
  }]),
68620
68614
  style: ut({
68621
68615
  "--selected-bg": o.focusForeground,
@@ -68639,10 +68633,10 @@ function Age(n, e, t, r, i, o) {
68639
68633
  background: "white"
68640
68634
  }, null, 8, ["foreground"])
68641
68635
  ], 512), [
68642
- [Wt, i.loading || o.isLoading()]
68636
+ [Wt, o.isLoading()]
68643
68637
  ]),
68644
68638
  ae(a, {
68645
- modelValue: i.filterItems,
68639
+ modelValue: o.thisMentionList,
68646
68640
  theme: i.thisTheme,
68647
68641
  class: "power-editor-mention-popper-list-view",
68648
68642
  ref: "list",
@@ -68678,7 +68672,7 @@ function Age(n, e, t, r, i, o) {
68678
68672
  _: 1
68679
68673
  }, 8, ["modelValue", "theme", "onChooseItem"])
68680
68674
  ], 4), [
68681
- [Wt, i.showPopper && i.filterItems.length > 0]
68675
+ [Wt, i.showPopper && o.thisMentionList.length > 0]
68682
68676
  ])
68683
68677
  ]),
68684
68678
  _: 1