@factoringplus/pl-components-pack-v3 0.1.54 → 0.1.55

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.
@@ -17,7 +17,7 @@ var __spreadValues = (a, b) => {
17
17
  return a;
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- import { getCurrentScope, onScopeDispose, ref, unref, watch, defineComponent, openBlock, createElementBlock, createElementVNode, warn as warn$1, getCurrentInstance, computed, inject, provide, onMounted, watchEffect, onBeforeUnmount, isRef, onBeforeMount, mergeProps, renderSlot, shallowRef, nextTick, onUpdated, resolveComponent, withDirectives, normalizeClass, normalizeStyle, createCommentVNode, Fragment, createBlock, withCtx, resolveDynamicComponent, withModifiers, createVNode, toDisplayString, vShow, toRef, Transition, reactive, cloneVNode, h, Text, Comment, Teleport, createTextVNode, readonly, useSlots, resolveDirective, renderList, toRefs, toRaw, triggerRef, withKeys, vModelText, createSlots, createApp, isVNode, render, onUnmounted } from "vue";
20
+ import { ref, unref, getCurrentScope, onScopeDispose, watch, defineComponent, openBlock, createElementBlock, createElementVNode, warn as warn$1, getCurrentInstance, computed, inject, provide, onMounted, watchEffect, onBeforeUnmount, isRef, onBeforeMount, mergeProps, renderSlot, shallowRef, nextTick, onUpdated, resolveComponent, withDirectives, normalizeClass, normalizeStyle, createCommentVNode, Fragment, createBlock, withCtx, resolveDynamicComponent, withModifiers, createVNode, toDisplayString, vShow, toRef, Transition, reactive, cloneVNode, h, Text, Comment, Teleport, createTextVNode, readonly, useSlots, resolveDirective, renderList, toRefs, toRaw, triggerRef, withKeys, vModelText, createSlots, createApp, isVNode, render, onUnmounted } from "vue";
21
21
  var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
22
22
  var freeGlobal$1 = freeGlobal;
23
23
  var freeSelf = typeof self == "object" && self && self.Object === Object && self;
@@ -29703,28 +29703,18 @@ const __default__ = {
29703
29703
  };
29704
29704
  const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
29705
29705
  props: {
29706
- showDialog: {
29707
- type: Boolean,
29708
- default: false
29709
- },
29710
29706
  singleDoc: {
29711
29707
  type: Boolean,
29712
29708
  default: false
29713
- },
29714
- files: {
29715
- type: Array,
29716
- default: () => []
29717
29709
  }
29718
29710
  },
29719
29711
  emits: ["cert-selected"],
29720
- setup(__props, { emit }) {
29721
- const props = __props;
29712
+ setup(__props, { expose, emit }) {
29722
29713
  const form2 = ref(null);
29723
29714
  const visible = ref(false);
29724
29715
  const loading2 = ref(false);
29725
29716
  const certs = ref([]);
29726
29717
  const fileList = ref([]);
29727
- const { showDialog } = toRefs(props);
29728
29718
  const dataForm = reactive({
29729
29719
  file: null,
29730
29720
  thumbprint: ""
@@ -29786,23 +29776,20 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
29786
29776
  valid: hooks().isSameOrBefore(hooks(item.validTo).toISOString())
29787
29777
  };
29788
29778
  };
29789
- watch(showDialog, () => {
29790
- getCertInfo();
29791
- });
29792
- const getCertInfo = () => {
29779
+ const show = (files) => {
29793
29780
  loading2.value = true;
29794
- fileList.value = props.files;
29781
+ fileList.value = files;
29795
29782
  cryptoPro.exports.getUserCertificates().then((response2) => {
29796
29783
  certs.value = _.chain(response2).map(formatCertInfo).filter((cert) => `${_.get(cert, "companyInn", "")}`.indexOf("\u043E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442") === -1).value();
29797
29784
  visible.value = true;
29798
29785
  }).catch((ex2) => {
29799
- emit("cert-selected", ex2);
29800
29786
  ElMessage.error(getErrorMessage(ex2));
29801
29787
  }).then(() => {
29802
29788
  loading2.value = false;
29803
29789
  nextTick(() => {
29804
- form2.value.resetFields();
29805
- form2.value.clearValidate(["file", "thumbprint"]);
29790
+ var _a2, _b2;
29791
+ (_a2 = form2 == null ? void 0 : form2.value) == null ? void 0 : _a2.resetFields();
29792
+ (_b2 = form2 == null ? void 0 : form2.value) == null ? void 0 : _b2.clearValidate(["file", "thumbprint"]);
29806
29793
  });
29807
29794
  });
29808
29795
  };
@@ -29840,6 +29827,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
29840
29827
  }
29841
29828
  });
29842
29829
  };
29830
+ const onCancelClick = () => hide2();
29831
+ expose({ form: form2, show });
29843
29832
  return (_ctx, _cache) => {
29844
29833
  const _component_el_option = ElOption;
29845
29834
  const _component_el_select = ElSelect;
@@ -29848,11 +29837,9 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
29848
29837
  const _component_el_button = ElButton;
29849
29838
  const _component_el_dialog = ElDialog;
29850
29839
  const _directive_loading = ElLoadingDirective;
29851
- return openBlock(), createBlock(_component_el_dialog, mergeProps({
29852
- "custom-class": "sell-plus-dialog-sm select-cert-dialog",
29840
+ return openBlock(), createBlock(_component_el_dialog, mergeProps({ "custom-class": "sell-plus-dialog-sm select-cert-dialog" }, _ctx.$attrs, {
29853
29841
  modelValue: visible.value,
29854
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => visible.value = $event)
29855
- }, _ctx.$attrs, {
29842
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => visible.value = $event),
29856
29843
  "close-on-press-escape": false,
29857
29844
  "show-close": false,
29858
29845
  "close-on-click-modal": false
@@ -29874,7 +29861,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
29874
29861
  ]),
29875
29862
  _: 1
29876
29863
  }, 8, ["disabled"]),
29877
- createVNode(_component_el_button, { onClick: hide2 }, {
29864
+ createVNode(_component_el_button, { onClick: onCancelClick }, {
29878
29865
  default: withCtx(() => [
29879
29866
  _hoisted_6
29880
29867
  ]),
@@ -29890,7 +29877,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
29890
29877
  ]),
29891
29878
  _: 1
29892
29879
  }),
29893
- createVNode(_component_el_button, { onClick: hide2 }, {
29880
+ createVNode(_component_el_button, { onClick: onCancelClick }, {
29894
29881
  default: withCtx(() => [
29895
29882
  _hoisted_9
29896
29883
  ]),