@factoringplus/pl-components-pack-v3 0.4.72-pre-3 → 0.4.72-pre-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.
@@ -37597,13 +37597,13 @@ const _sfc_main$n = {
37597
37597
  props: {
37598
37598
  rules: {
37599
37599
  type: Object,
37600
- default: function() {
37600
+ default() {
37601
37601
  return {};
37602
37602
  }
37603
37603
  },
37604
37604
  suggestionList: {
37605
37605
  type: Array,
37606
- default: function() {
37606
+ default() {
37607
37607
  return [];
37608
37608
  }
37609
37609
  },
@@ -37641,9 +37641,21 @@ const _sfc_main$n = {
37641
37641
  data() {
37642
37642
  return {
37643
37643
  selectedValue: "",
37644
- ruleForm: {}
37644
+ ruleForm: {},
37645
+ modelValue: ""
37645
37646
  };
37646
37647
  },
37648
+ computed: {
37649
+ blocks() {
37650
+ if (this.modelValue) {
37651
+ const regex = new RegExp(this.modelValue, "g");
37652
+ return this.suggestionList.map((c2) => ({
37653
+ value: c2.value.replace(regex, `<span class="highlight">${this.modelValue}</span>`)
37654
+ }));
37655
+ }
37656
+ return this.suggestionList;
37657
+ }
37658
+ },
37647
37659
  mounted() {
37648
37660
  const dropElements = document.querySelectorAll(".suggestion .el-select-dropdown");
37649
37661
  this.ruleForm = {
@@ -37654,13 +37666,13 @@ const _sfc_main$n = {
37654
37666
  }
37655
37667
  },
37656
37668
  watch: {
37657
- selectedValue: function(newVal) {
37669
+ selectedValue(newVal) {
37658
37670
  this.ruleForm[this.prop] = newVal;
37659
37671
  },
37660
- selectedItem: function(newVal) {
37672
+ selectedItem(newVal) {
37661
37673
  this.selectedValue = newVal.value;
37662
37674
  },
37663
- getValidate: function(newVal) {
37675
+ getValidate(newVal) {
37664
37676
  if (newVal) {
37665
37677
  this.validateInpBlur();
37666
37678
  this.$emit("setValid");
@@ -37685,18 +37697,16 @@ const _sfc_main$n = {
37685
37697
  }, 300);
37686
37698
  },
37687
37699
  initSuggestion(query) {
37700
+ this.modelValue = query;
37688
37701
  this.$emit("fetchDadata", query);
37689
37702
  }
37690
37703
  }
37691
37704
  };
37692
37705
  const _hoisted_1$n = { class: "suggestion" };
37693
37706
  const _hoisted_2$k = { class: "d-flex flex-column" };
37694
- const _hoisted_3$i = { class: "text-truncate" };
37707
+ const _hoisted_3$i = ["innerHTML"];
37695
37708
  const _hoisted_4$b = { class: "suggestion__item-info text-truncate" };
37696
- const _hoisted_5$8 = {
37697
- key: 0,
37698
- src: _imports_1$2
37699
- };
37709
+ const _hoisted_5$8 = /* @__PURE__ */ createElementVNode("img", { src: _imports_1$2 }, null, -1);
37700
37710
  function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
37701
37711
  const _component_el_option = ElOption;
37702
37712
  const _component_el_select = ElSelect;
@@ -37732,7 +37742,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
37732
37742
  "no-data-text": $props.noData
37733
37743
  }, {
37734
37744
  default: withCtx(() => [
37735
- (openBlock(true), createElementBlock(Fragment, null, renderList($props.suggestionList, (item, index) => {
37745
+ (openBlock(true), createElementBlock(Fragment, null, renderList($options.blocks, (item, index) => {
37736
37746
  return openBlock(), createBlock(_component_el_option, {
37737
37747
  onClick: ($event) => $options.change(item),
37738
37748
  key: index,
@@ -37741,10 +37751,13 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
37741
37751
  }, {
37742
37752
  default: withCtx(() => [
37743
37753
  createElementVNode("div", _hoisted_2$k, [
37744
- createElementVNode("span", _hoisted_3$i, toDisplayString(item.value), 1),
37754
+ createElementVNode("span", {
37755
+ class: "text-truncate",
37756
+ innerHTML: item.value
37757
+ }, null, 8, _hoisted_3$i),
37745
37758
  createElementVNode("span", _hoisted_4$b, toDisplayString(item.bottomText), 1)
37746
37759
  ]),
37747
- item.id === $props.selectedItem.id ? (openBlock(), createElementBlock("img", _hoisted_5$8)) : createCommentVNode("", true)
37760
+ _hoisted_5$8
37748
37761
  ]),
37749
37762
  _: 2
37750
37763
  }, 1032, ["onClick", "value"]);
@@ -38110,7 +38123,7 @@ function _sfc_render$1(_ctx, _cache) {
38110
38123
  var PLChevron = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render$1]]);
38111
38124
  var plSelect_vue_vue_type_style_index_0_lang$1 = "";
38112
38125
  const _hoisted_1$h = { id: "form" };
38113
- const _hoisted_2$f = { class: "flex item-select" };
38126
+ const _hoisted_2$f = { class: "flex item-select text-b2-medium" };
38114
38127
  const _sfc_main$h = {
38115
38128
  __name: "pl-select",
38116
38129
  props: {