@gemafajarramadhan/dynamic-ui 1.2.33 → 1.2.35

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",
@@ -25655,7 +25655,7 @@ const ND = { class: "flex flex-col gap-3 w-full" }, HD = {
25655
25655
  if (!a.path) return null;
25656
25656
  const q = a.path.match(/\/edit\/([^\/]+)$/);
25657
25657
  return q ? q[1] : null;
25658
- }), h = X({}), m = X(null), b = X(!0), g = X(!1), y = "http://110.239.67.31:9101/api/auto-layout/form/form-dynamic?code=", A = "http://110.239.67.31:9101/api/auto-layout/datatable/form-dynamic?code=", C = X(n.layoutCode), _ = O(() => {
25658
+ }), h = X({}), m = X(null), b = X(!0), g = X(!1), y = "https://dcodedynamic.skyworx.co.id/api/auto-layout/form/form-dynamic?code=", A = "https://dcodedynamic.skyworx.co.id/api/auto-layout/datatable/form-dynamic?code=", C = X(n.layoutCode), _ = O(() => {
25659
25659
  var K;
25660
25660
  if (!m.value) return "";
25661
25661
  const q = ((K = c == null ? void 0 : c.value) == null ? void 0 : K.toLowerCase()) || "en";
@@ -25861,7 +25861,7 @@ const ND = { class: "flex flex-col gap-3 w-full" }, HD = {
25861
25861
  } catch {
25862
25862
  console.warn("useRouter not available, using fallback");
25863
25863
  }
25864
- const l = Ir("hasActionAccess", () => !1), c = Ir("userPermissions", null), d = X(null), u = X(!0), f = X(null), h = "http://110.239.67.31:9101/api/auto-layout/datatable/form-dynamic?code=", m = O(() => `${h}${n.layoutCode}`), b = async () => {
25864
+ const l = Ir("hasActionAccess", () => !1), c = Ir("userPermissions", null), d = X(null), u = X(!0), f = X(null), h = "https://dcodedynamic.skyworx.co.id/api/auto-layout/datatable/form-dynamic?code=", m = O(() => `${h}${n.layoutCode}`), b = async () => {
25865
25865
  var v;
25866
25866
  u.value = !0;
25867
25867
  try {