vrfi-design-system 1.0.93 → 1.0.94

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.
package/dist/index.d.ts CHANGED
@@ -678,6 +678,7 @@ declare interface PreviewCardProps {
678
678
  isCandidateDocCard?: boolean;
679
679
  onDelete?: () => void;
680
680
  expiryDate?: string;
681
+ showDownloadIcon?: boolean;
681
682
  }
682
683
 
683
684
  export declare const PreviewDocumentsCard: default_2.FC<PreviewDocumentsCardProps>;
package/dist/main.es.js CHANGED
@@ -62687,20 +62687,21 @@ const Ipe = [".jpg", ".jpeg", ".png"], Dpe = ".pdf", Tpe = "Image Preview", _a =
62687
62687
  isProfileDocCard: o,
62688
62688
  isCandidateDocCard: a,
62689
62689
  onDelete: i,
62690
- expiryDate: l
62690
+ expiryDate: l,
62691
+ showDownloadIcon: s
62691
62692
  }) => {
62692
- const [s, A] = wt(!1), u = () => {
62693
- A((p) => !p);
62694
- }, d = Bpe(e), f = d === $i.PDF, m = St(Wn.previewDocWrapper, r, {
62693
+ const [A, u] = wt(!1), d = () => {
62694
+ u((v) => !v);
62695
+ }, f = Bpe(e), m = f === $i.PDF, g = St(Wn.previewDocWrapper, r, {
62695
62696
  [Wn.profileCard]: o,
62696
62697
  [Wn.candidateDocCard]: a
62697
- }), g = () => {
62698
- t && fetch(t).then((p) => p.blob()).then((p) => {
62699
- const v = document.createElement("a");
62700
- v.href = window.URL.createObjectURL(p), v.download = e, document.body.appendChild(v), v.click(), document.body.removeChild(v), window.URL.revokeObjectURL(v.href);
62701
- }).catch((p) => {
62698
+ }), p = () => {
62699
+ t && fetch(t).then((v) => v.blob()).then((v) => {
62700
+ const h = document.createElement("a");
62701
+ h.href = window.URL.createObjectURL(v), h.download = e, document.body.appendChild(h), h.click(), document.body.removeChild(h), window.URL.revokeObjectURL(h.href);
62702
+ }).catch((v) => {
62702
62703
  D2({
62703
- message: p.message || Npe,
62704
+ message: v.message || Npe,
62704
62705
  description: "",
62705
62706
  type: iA.ERROR
62706
62707
  });
@@ -62711,7 +62712,7 @@ const Ipe = [".jpg", ".jpeg", ".png"], Dpe = ".pdf", Tpe = "Image Preview", _a =
62711
62712
  "div",
62712
62713
  {
62713
62714
  "data-testid": _a.PREVIEW_DOC_WRAPPER,
62714
- className: m,
62715
+ className: g,
62715
62716
  children: [
62716
62717
  /* @__PURE__ */ k.jsxs("div", { className: Wn.leftSide, children: [
62717
62718
  /* @__PURE__ */ k.jsx(
@@ -62746,11 +62747,11 @@ const Ipe = [".jpg", ".jpeg", ".png"], Dpe = ".pdf", Tpe = "Image Preview", _a =
62746
62747
  {
62747
62748
  "data-testid": _a.PREVIEW_ICON,
62748
62749
  className: Wn.previewIcon,
62749
- onClick: u,
62750
+ onClick: d,
62750
62751
  children: /* @__PURE__ */ k.jsx("i", { className: Pt.PREVIEW_ICON })
62751
62752
  }
62752
62753
  ) }),
62753
- t && /* @__PURE__ */ k.jsx("div", { className: Wn.deleteIconWrapper, children: /* @__PURE__ */ k.jsx(
62754
+ t && s && /* @__PURE__ */ k.jsx("div", { className: Wn.deleteIconWrapper, children: /* @__PURE__ */ k.jsx(
62754
62755
  "span",
62755
62756
  {
62756
62757
  "data-testid": _a.DOWNLOAD_ICON,
@@ -62758,7 +62759,7 @@ const Ipe = [".jpg", ".jpeg", ".png"], Dpe = ".pdf", Tpe = "Image Preview", _a =
62758
62759
  children: /* @__PURE__ */ k.jsx(
62759
62760
  "a",
62760
62761
  {
62761
- onClick: g,
62762
+ onClick: p,
62762
62763
  download: e,
62763
62764
  children: /* @__PURE__ */ k.jsx("i", { className: Pt.DOWNLOAD_ICON })
62764
62765
  }
@@ -62781,26 +62782,26 @@ const Ipe = [".jpg", ".jpeg", ".png"], Dpe = ".pdf", Tpe = "Image Preview", _a =
62781
62782
  /* @__PURE__ */ k.jsx(
62782
62783
  qr,
62783
62784
  {
62784
- visible: s,
62785
+ visible: A,
62785
62786
  footer: null,
62786
62787
  maskClosable: !1,
62787
- height: f ? 1e3 : void 0,
62788
+ height: m ? 1e3 : void 0,
62788
62789
  className: Wn.previewCardModal,
62789
62790
  styles: {
62790
62791
  body: {
62791
- height: f ? 600 : void 0
62792
+ height: m ? 600 : void 0
62792
62793
  }
62793
62794
  },
62794
- width: f ? 800 : void 0,
62795
- onCancel: u,
62795
+ width: m ? 800 : void 0,
62796
+ onCancel: d,
62796
62797
  children: /* @__PURE__ */ k.jsxs(
62797
62798
  "div",
62798
62799
  {
62799
62800
  className: St(Wn.previewWrapper, {
62800
- [Wn.pdfPreviewWrapper]: d === $i.PDF
62801
+ [Wn.pdfPreviewWrapper]: f === $i.PDF
62801
62802
  }),
62802
62803
  children: [
62803
- d === $i.IMAGE && /* @__PURE__ */ k.jsx(
62804
+ f === $i.IMAGE && /* @__PURE__ */ k.jsx(
62804
62805
  "img",
62805
62806
  {
62806
62807
  "data-testid": _a.PREVIEW_IMAGE,
@@ -62809,7 +62810,7 @@ const Ipe = [".jpg", ".jpeg", ".png"], Dpe = ".pdf", Tpe = "Image Preview", _a =
62809
62810
  className: Wn.previewDoc
62810
62811
  }
62811
62812
  ),
62812
- d === $i.PDF && /* @__PURE__ */ k.jsx(
62813
+ f === $i.PDF && /* @__PURE__ */ k.jsx(
62813
62814
  "iframe",
62814
62815
  {
62815
62816
  "data-testid": _a.PREVIEW_PDF,