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

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 { 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";
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";
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,18 +29703,28 @@ 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
+ },
29706
29710
  singleDoc: {
29707
29711
  type: Boolean,
29708
29712
  default: false
29713
+ },
29714
+ files: {
29715
+ type: Array,
29716
+ default: () => []
29709
29717
  }
29710
29718
  },
29711
29719
  emits: ["cert-selected"],
29712
- setup(__props, { expose, emit }) {
29720
+ setup(__props, { emit }) {
29721
+ const props = __props;
29713
29722
  const form2 = ref(null);
29714
29723
  const visible = ref(false);
29715
29724
  const loading2 = ref(false);
29716
29725
  const certs = ref([]);
29717
29726
  const fileList = ref([]);
29727
+ const { showDialog } = toRefs(props);
29718
29728
  const dataForm = reactive({
29719
29729
  file: null,
29720
29730
  thumbprint: ""
@@ -29776,13 +29786,17 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
29776
29786
  valid: hooks().isSameOrBefore(hooks(item.validTo).toISOString())
29777
29787
  };
29778
29788
  };
29779
- const show = (files) => {
29789
+ watch(showDialog, () => {
29790
+ getCertInfo();
29791
+ });
29792
+ const getCertInfo = () => {
29780
29793
  loading2.value = true;
29781
- fileList.value = files;
29794
+ fileList.value = props.files;
29782
29795
  cryptoPro.exports.getUserCertificates().then((response2) => {
29783
29796
  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();
29784
29797
  visible.value = true;
29785
29798
  }).catch((ex2) => {
29799
+ emit("cert-selected", ex2);
29786
29800
  ElMessage.error(getErrorMessage(ex2));
29787
29801
  }).then(() => {
29788
29802
  loading2.value = false;
@@ -29827,8 +29841,6 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
29827
29841
  }
29828
29842
  });
29829
29843
  };
29830
- const onCancelClick = () => hide2();
29831
- expose({ form: form2, show });
29832
29844
  return (_ctx, _cache) => {
29833
29845
  const _component_el_option = ElOption;
29834
29846
  const _component_el_select = ElSelect;
@@ -29837,9 +29849,11 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
29837
29849
  const _component_el_button = ElButton;
29838
29850
  const _component_el_dialog = ElDialog;
29839
29851
  const _directive_loading = ElLoadingDirective;
29840
- return openBlock(), createBlock(_component_el_dialog, mergeProps({ "custom-class": "sell-plus-dialog-sm select-cert-dialog" }, _ctx.$attrs, {
29852
+ return openBlock(), createBlock(_component_el_dialog, mergeProps({
29853
+ "custom-class": "sell-plus-dialog-sm select-cert-dialog",
29841
29854
  modelValue: visible.value,
29842
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => visible.value = $event),
29855
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => visible.value = $event)
29856
+ }, _ctx.$attrs, {
29843
29857
  "close-on-press-escape": false,
29844
29858
  "show-close": false,
29845
29859
  "close-on-click-modal": false
@@ -29861,7 +29875,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
29861
29875
  ]),
29862
29876
  _: 1
29863
29877
  }, 8, ["disabled"]),
29864
- createVNode(_component_el_button, { onClick: onCancelClick }, {
29878
+ createVNode(_component_el_button, { onClick: hide2 }, {
29865
29879
  default: withCtx(() => [
29866
29880
  _hoisted_6
29867
29881
  ]),
@@ -29877,7 +29891,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
29877
29891
  ]),
29878
29892
  _: 1
29879
29893
  }),
29880
- createVNode(_component_el_button, { onClick: onCancelClick }, {
29894
+ createVNode(_component_el_button, { onClick: hide2 }, {
29881
29895
  default: withCtx(() => [
29882
29896
  _hoisted_9
29883
29897
  ]),