dccxx-s3-explorer 1.0.60 → 1.0.61

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.
@@ -15764,55 +15764,56 @@ const ot = {
15764
15764
  return (e[t] || []).forEach((o) => {
15765
15765
  n.push(o.key), o.isFolder && n.push(...xo(e, o.key));
15766
15766
  }), n;
15767
- }, iR = (e, t, n = [], r, o, i) => {
15768
- const [a, s] = oe({}), [c, l] = oe(!1), [u, m] = oe(null), [g, p] = oe(0), h = Xe(t);
15767
+ }, iR = (e, t, n = [], r, o, i, a) => {
15768
+ const [s, c] = oe({}), [l, u] = oe(!1), [m, g] = oe(null), [p, h] = oe(0), v = Xe(t);
15769
15769
  Me(() => {
15770
- h.current = t;
15770
+ v.current = t;
15771
15771
  }, [t]);
15772
- const v = async () => {
15773
- l(!0);
15772
+ const y = async () => {
15773
+ u(!0);
15774
15774
  try {
15775
- const b = await he.get(`${e}/api/files`, {
15775
+ const w = await he.get(`${e}/api/files`, {
15776
15776
  params: {
15777
15777
  cache: !1,
15778
15778
  displayPrefixes: JSON.stringify(n),
15779
- prefix: h.current
15779
+ prefix: v.current,
15780
+ excludePrivateFiles: a ? "false" : "true"
15780
15781
  },
15781
15782
  timeout: 3e5
15782
15783
  });
15783
- s(b.data), m(null);
15784
- } catch (b) {
15785
- m(b instanceof Error ? b : new Error("Failed to fetch files"));
15784
+ c(w.data), g(null);
15785
+ } catch (w) {
15786
+ g(w instanceof Error ? w : new Error("Failed to fetch files"));
15786
15787
  } finally {
15787
- l(!1), p(0), i("");
15788
+ u(!1), h(0), i("");
15788
15789
  }
15789
- }, y = async (b) => {
15790
- var w, C;
15790
+ }, b = async (w) => {
15791
+ var C, E;
15791
15792
  try {
15792
- if (!b)
15793
+ if (!w)
15793
15794
  return;
15794
- l(!0);
15795
- const E = await he.get(
15796
- `${e}/api/search-db?query=${b}&rootPrefix=${t}&offset=${(o - 1) * 20}&limit=20`,
15795
+ u(!0);
15796
+ const x = await he.get(
15797
+ `${e}/api/search-db?query=${w}&rootPrefix=${t}&offset=${(o - 1) * 20}&limit=20`,
15797
15798
  {
15798
15799
  timeout: 3e5
15799
15800
  }
15800
15801
  );
15801
- return s({ [t]: ((w = E == null ? void 0 : E.data) == null ? void 0 : w.result) || [] }), p(((C = E == null ? void 0 : E.data) == null ? void 0 : C.estimatedTotalHits) || 0), E;
15802
- } catch (E) {
15803
- m(E instanceof Error ? E : new Error("Failed to fetch files"));
15802
+ return c({ [t]: ((C = x == null ? void 0 : x.data) == null ? void 0 : C.result) || [] }), h(((E = x == null ? void 0 : x.data) == null ? void 0 : E.estimatedTotalHits) || 0), x;
15803
+ } catch (x) {
15804
+ g(x instanceof Error ? x : new Error("Failed to fetch files"));
15804
15805
  } finally {
15805
- l(!1);
15806
+ u(!1);
15806
15807
  }
15807
15808
  };
15808
15809
  return Me(() => {
15809
- !r && !c && v(), r && !c && y(r);
15810
+ !r && !l && y(), r && !l && b(r);
15810
15811
  }, [r, o]), {
15811
- data: a,
15812
- isLoading: c,
15813
- error: u,
15814
- estimatedTotalHits: g,
15815
- refetch: v
15812
+ data: s,
15813
+ isLoading: l,
15814
+ error: m,
15815
+ estimatedTotalHits: p,
15816
+ refetch: y
15816
15817
  };
15817
15818
  }, Sr = (e) => {
15818
15819
  var r, o, i;
@@ -15855,7 +15856,8 @@ const ot = {
15855
15856
  i,
15856
15857
  u,
15857
15858
  qe,
15858
- m
15859
+ m,
15860
+ s
15859
15861
  ), im = qm({
15860
15862
  onSuccess: (R) => {
15861
15863
  rm(R.access_token), localStorage.setItem("google_access_token", R.access_token), am(R.access_token);