@factoringplus/pl-components-pack-v3 0.5.83-pre-02 → 0.5.83-pre-04

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.
@@ -20050,7 +20050,7 @@ function declOfNum(g, y) {
20050
20050
  const z = g % 10;
20051
20051
  return z > 1 && z < 5 ? y[1] : z == 1 ? y[0] : y[2];
20052
20052
  }
20053
- const plAutocompete_vue_vue_type_style_index_0_scoped_152119b2_lang = "", _hoisted_1$C = { class: "pl-autocomplete__wrapper" }, _hoisted_2$x = {
20053
+ const plAutocompete_vue_vue_type_style_index_0_scoped_19e5987d_lang = "", _hoisted_1$C = { class: "pl-autocomplete__wrapper" }, _hoisted_2$x = {
20054
20054
  key: 0,
20055
20055
  class: "pl-autocomplete__label-container"
20056
20056
  }, _hoisted_3$r = { class: "pl-autocomplete__label-container-text" }, _hoisted_4$m = {
@@ -20149,34 +20149,37 @@ const plAutocompete_vue_vue_type_style_index_0_scoped_152119b2_lang = "", _hoist
20149
20149
  disableMarkerBottom: {
20150
20150
  type: Boolean,
20151
20151
  default: !1
20152
+ },
20153
+ uniqKey: {
20154
+ type: String
20152
20155
  }
20153
20156
  },
20154
20157
  emits: ["update:modelValue", "fetchDadata", "changeValue"],
20155
20158
  setup(g, { emit: y }) {
20156
20159
  const j = g;
20157
- useCssVars((xe) => ({
20158
- "3175f9d2": j.width
20160
+ useCssVars((qe) => ({
20161
+ "214e0ae4": j.width
20159
20162
  }));
20160
20163
  const z = `id-${uniqid()}`, $ = ref([]);
20161
20164
  if (j.prop) {
20162
- const xe = inject("errorsState");
20165
+ const qe = inject("errorsState");
20163
20166
  watch(
20164
- xe,
20167
+ qe,
20165
20168
  () => {
20166
- $.value = xe.value.filter((qe) => qe.field === j.prop), re();
20169
+ $.value = qe.value.filter((At) => At.field === j.prop), re();
20167
20170
  },
20168
20171
  { deep: !0 }
20169
20172
  );
20170
20173
  }
20171
20174
  const V = computed$1(() => $.value.length), re = () => {
20172
20175
  nextTick(() => {
20173
- const xe = document.getElementById(`dropdown-${z}`);
20174
- if (!xe)
20176
+ const qe = document.getElementById(`dropdown-${z}`);
20177
+ if (!qe)
20175
20178
  return;
20176
- const qe = xe.previousSibling.querySelectorAll(
20179
+ const At = qe.previousSibling.querySelectorAll(
20177
20180
  ".pl-autocomplete__label-container"
20178
- )[0], At = qe ? qe.offsetHeight : -4, Dt = xe.previousSibling.offsetHeight;
20179
- xe.style.bottom = "", xe && xe.getBoundingClientRect().bottom > ae.value && (xe.style.bottom = `${Dt - At}px`), xe && xe.getBoundingClientRect().top < 0 && (xe.style.bottom = "");
20181
+ )[0], Dt = At ? At.offsetHeight : -4, Pt = qe.previousSibling.offsetHeight;
20182
+ qe.style.bottom = "", qe && qe.getBoundingClientRect().bottom > ae.value && (qe.style.bottom = `${Pt - Dt}px`), qe && qe.getBoundingClientRect().top < 0 && (qe.style.bottom = "");
20180
20183
  });
20181
20184
  }, ae = useWindowSize().height;
20182
20185
  watch(ae, () => {
@@ -20199,8 +20202,8 @@ const plAutocompete_vue_vue_type_style_index_0_scoped_152119b2_lang = "", _hoist
20199
20202
  ue.value = !1, !j.memoryBlur && !Ie.value.value ? Ne.value = "" : Ie.value.value && (Ne.value = Ie.value.value);
20200
20203
  });
20201
20204
  }, de = ref(!1), Ne = ref("");
20202
- watch(Ne, (xe) => {
20203
- (xe == null ? void 0 : xe.length) >= j.symbolsCountSearch ? (de.value = !0, y("fetchDadata", xe)) : de.value = !1;
20205
+ watch(Ne, (qe) => {
20206
+ (qe == null ? void 0 : qe.length) >= j.symbolsCountSearch ? (de.value = !0, y("fetchDadata", qe)) : de.value = !1;
20204
20207
  }), watch(
20205
20208
  () => j.suggestionList,
20206
20209
  () => {
@@ -20209,28 +20212,28 @@ const plAutocompete_vue_vue_type_style_index_0_scoped_152119b2_lang = "", _hoist
20209
20212
  );
20210
20213
  const Ie = computed$1({
20211
20214
  get: () => j.modelValue,
20212
- set: (xe) => {
20213
- y("update:modelValue", xe);
20215
+ set: (qe) => {
20216
+ y("update:modelValue", qe);
20214
20217
  }
20215
20218
  });
20216
- watch(Ie, (xe) => {
20217
- Ne.value = xe.value;
20218
- const qe = document.getElementById(z);
20219
+ watch(Ie, (qe) => {
20220
+ Ne.value = qe.value;
20221
+ const At = document.getElementById(z);
20219
20222
  if ("createEvent" in document) {
20220
- const At = document.createEvent("HTMLEvents");
20221
- At.initEvent("change", !1, !0), qe.dispatchEvent(At);
20223
+ const Dt = document.createEvent("HTMLEvents");
20224
+ Dt.initEvent("change", !1, !0), At.dispatchEvent(Dt);
20222
20225
  } else
20223
- qe.fireEvent("onchange");
20226
+ At.fireEvent("onchange");
20224
20227
  }), j.default && (Ie.value = JSON.parse(JSON.stringify(j.default)));
20225
- const _e = (xe) => {
20226
- xe.disabled || (pe(), Ie.value = xe, Ne.value = xe.value, y("changeValue", xe));
20228
+ const _e = (qe) => {
20229
+ qe.disabled || (pe(), Ie.value = qe, Ne.value = qe.value, y("changeValue", qe));
20227
20230
  }, Oe = () => {
20228
20231
  Ie.value = {}, Ne.value = "", y("changeValue", {}), document.getElementById(z).focus(), document.getElementById(z).blur(), pe();
20229
- }, Ce = (xe) => j.uniqKey && Ie[j.uniqKey] ? xe[j.uniqKey] === Ie.value[j.uniqKey] : Ie.value.bottomText ? xe.value === Ie.value.value && xe.bottomText === Ie.value.bottomText : xe.value === Ie.value.value, Ue = () => {
20230
- var xe, qe;
20232
+ }, Ce = (qe, At) => qe.split(".").reduce((Dt, Pt) => Dt[Pt], At), Ue = (qe) => j.uniqKey && Ce(j.uniqKey, Ie.value) ? Ce(j.uniqKey, qe) === Ce(j.uniqKey, Ie.value) : Ie.value.bottomText ? qe.value === Ie.value.value && qe.bottomText === Ie.value.bottomText : qe.value === Ie.value.value, ze = () => {
20233
+ var qe, At;
20231
20234
  if (!Ne.value && j.defaultDropText)
20232
20235
  return j.defaultDropText;
20233
- if (!Ne.value || ((xe = Ne.value) == null ? void 0 : xe.length) < j.symbolsCountSearch)
20236
+ if (!Ne.value || ((qe = Ne.value) == null ? void 0 : qe.length) < j.symbolsCountSearch)
20234
20237
  return `Введите минимум ${j.symbolsCountSearch} ${declOfNum(j.symbolsCountSearch, [
20235
20238
  "символ",
20236
20239
  "символа",
@@ -20238,9 +20241,9 @@ const plAutocompete_vue_vue_type_style_index_0_scoped_152119b2_lang = "", _hoist
20238
20241
  ])} `;
20239
20242
  if (!j.suggestionList || de.value)
20240
20243
  return;
20241
- if (((qe = j.suggestionList) == null ? void 0 : qe.length) === 0)
20244
+ if (((At = j.suggestionList) == null ? void 0 : At.length) === 0)
20242
20245
  return j.noData;
20243
- }, ze = () => {
20246
+ }, xe = () => {
20244
20247
  j.memoryBlur && (Ie.value = {
20245
20248
  value: Ne.value,
20246
20249
  data: !1,
@@ -20249,8 +20252,8 @@ const plAutocompete_vue_vue_type_style_index_0_scoped_152119b2_lang = "", _hoist
20249
20252
  y("changeValue", Ie.value);
20250
20253
  }));
20251
20254
  };
20252
- return (xe, qe) => {
20253
- const At = ElScrollbar, Dt = vLoading;
20255
+ return (qe, At) => {
20256
+ const Dt = ElScrollbar, Pt = vLoading;
20254
20257
  return withDirectives((openBlock(), createElementBlock("div", _hoisted_1$C, [
20255
20258
  createElementVNode("div", {
20256
20259
  class: "pl-autocomplete__select-container",
@@ -20275,12 +20278,12 @@ const plAutocompete_vue_vue_type_style_index_0_scoped_152119b2_lang = "", _hoist
20275
20278
  createVNode(_sfc_main$Y, mergeProps(j, {
20276
20279
  id: z,
20277
20280
  focus: ue.value,
20278
- "onUpdate:focus": qe[0] || (qe[0] = (Pt) => ue.value = Pt),
20281
+ "onUpdate:focus": At[0] || (At[0] = (vn) => ue.value = vn),
20279
20282
  modelValue: Ne.value,
20280
- "onUpdate:modelValue": qe[1] || (qe[1] = (Pt) => Ne.value = Pt),
20283
+ "onUpdate:modelValue": At[1] || (At[1] = (vn) => Ne.value = vn),
20281
20284
  "show-error": V.value,
20282
20285
  onReset: Oe,
20283
- onChange: ze,
20286
+ onChange: xe,
20284
20287
  onClickToBlur: pe
20285
20288
  }), null, 16, ["focus", "modelValue", "show-error"]),
20286
20289
  j.helpertext || $.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_6$c, [
@@ -20289,7 +20292,7 @@ const plAutocompete_vue_vue_type_style_index_0_scoped_152119b2_lang = "", _hoist
20289
20292
  ]),
20290
20293
  createVNode(Transition, { name: "fade" }, {
20291
20294
  default: withCtx(() => {
20292
- var Pt;
20295
+ var vn;
20293
20296
  return [
20294
20297
  ue.value ? (openBlock(), createElementBlock("div", {
20295
20298
  key: 0,
@@ -20301,23 +20304,23 @@ const plAutocompete_vue_vue_type_style_index_0_scoped_152119b2_lang = "", _hoist
20301
20304
  }
20302
20305
  ])
20303
20306
  }, [
20304
- de.value || !Ne.value || Ne.value.length < j.symbolsCountSearch || !((Pt = j.suggestionList) != null && Pt.length) ? (openBlock(), createElementBlock("div", _hoisted_10$5, [
20307
+ de.value || !Ne.value || Ne.value.length < j.symbolsCountSearch || !((vn = j.suggestionList) != null && vn.length) ? (openBlock(), createElementBlock("div", _hoisted_10$5, [
20305
20308
  de.value ? withDirectives((openBlock(), createElementBlock("div", _hoisted_11$5, null, 512)), [
20306
- [Dt, de.value]
20307
- ]) : (openBlock(), createElementBlock("span", _hoisted_12$5, toDisplayString(Ue()), 1))
20308
- ])) : (openBlock(), createBlock(At, {
20309
+ [Pt, de.value]
20310
+ ]) : (openBlock(), createElementBlock("span", _hoisted_12$5, toDisplayString(ze()), 1))
20311
+ ])) : (openBlock(), createBlock(Dt, {
20309
20312
  key: 1,
20310
20313
  "max-height": "268px"
20311
20314
  }, {
20312
20315
  default: withCtx(() => [
20313
- (openBlock(!0), createElementBlock(Fragment, null, renderList(j.suggestionList, (vn) => (openBlock(), createBlock(PlOption, {
20314
- key: vn,
20315
- active: Ce(vn),
20316
- description: vn.bottomText,
20317
- label: vn.value,
20316
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(j.suggestionList, (kt) => (openBlock(), createBlock(PlOption, {
20317
+ key: kt,
20318
+ active: Ue(kt),
20319
+ description: kt.bottomText,
20320
+ label: kt.value,
20318
20321
  "search-value": Ne.value,
20319
20322
  "disable-marker-bottom": j.disableMarkerBottom,
20320
- onMousedown: (kt) => _e(vn)
20323
+ onMousedown: (_n) => _e(kt)
20321
20324
  }, null, 8, ["active", "description", "label", "search-value", "disable-marker-bottom", "onMousedown"]))), 128))
20322
20325
  ]),
20323
20326
  _: 1
@@ -20332,7 +20335,7 @@ const plAutocompete_vue_vue_type_style_index_0_scoped_152119b2_lang = "", _hoist
20332
20335
  ]);
20333
20336
  };
20334
20337
  }
20335
- }, PlAutocomplete = /* @__PURE__ */ _export_sfc(_sfc_main$X, [["__scopeId", "data-v-152119b2"]]), PlAutocompletePlugin = {
20338
+ }, PlAutocomplete = /* @__PURE__ */ _export_sfc(_sfc_main$X, [["__scopeId", "data-v-19e5987d"]]), PlAutocompletePlugin = {
20336
20339
  install(g) {
20337
20340
  g.component("PlAutocomplete", PlAutocomplete);
20338
20341
  }