@gemafajarramadhan/dynamic-ui 1.2.33 → 1.2.34

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.
@@ -54,7 +54,7 @@ async function zr(e, t, n, s) {
54
54
  method: r,
55
55
  headers: { ...Bh(), ...s || {} }
56
56
  };
57
- n && !["GET", "DELETE"].includes(r) && (d.body = JSON.stringify(n));
57
+ n && !["GET", "DELETE"].includes(r) && (n instanceof FormData ? (d.body = n, d.headers && d.headers["Content-Type"] && delete d.headers["Content-Type"], d.headers && d.headers["content-type"] && delete d.headers["content-type"]) : d.body = JSON.stringify(n));
58
58
  let u = c;
59
59
  if (n && r === "GET") {
60
60
  const m = new URLSearchParams();
@@ -24908,17 +24908,17 @@ const ND = { class: "flex flex-col gap-3 w-full" }, HD = {
24908
24908
  return;
24909
24909
  }
24910
24910
  try {
24911
- const { apiUrl: A } = bt(), C = (n.endpointReference.apiMethod || "GET").toUpperCase() === "GET", _ = await A(
24911
+ const { apiUrl: A } = bt(), C = await A(
24912
24912
  n.endpointReference.apiUrl,
24913
24913
  n.endpointReference.apiMethod || "GET",
24914
- C ? { page: 1, perPage: 100 } : void 0
24914
+ { page: 1, perPage: 100 }
24915
24915
  );
24916
24916
  if (n.items !== void 0) {
24917
24917
  u.value = !1;
24918
24918
  return;
24919
24919
  }
24920
- let M = (_ == null ? void 0 : _.data) || _;
24921
- Array.isArray(M) || (M = [M]), l.value = M;
24920
+ let _ = (C == null ? void 0 : C.data) || C;
24921
+ Array.isArray(_) || (_ = [_]), l.value = _;
24922
24922
  } catch (A) {
24923
24923
  console.error("Failed to fetch dynamic document list", A);
24924
24924
  } finally {
@@ -24966,7 +24966,7 @@ const ND = { class: "flex flex-col gap-3 w-full" }, HD = {
24966
24966
  d.value.add(A);
24967
24967
  try {
24968
24968
  const { apiUrl: B } = bt(), z = new FormData();
24969
- z.append("file", M), z.append("typeDocument", String(S));
24969
+ z.append("doc", M), z.append("typeDocument", String(S));
24970
24970
  const Q = await B(
24971
24971
  i.value,
24972
24972
  ((v = n.endpoint) == null ? void 0 : v.apiMethod) || "POST",