@skopon-cool/form-sdk 0.1.6 → 0.1.7

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.
@@ -1 +1 @@
1
- {"version":3,"file":"AskUserFormCard.d.ts","sourceRoot":"","sources":["../../src/components/AskUserFormCard.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAc,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAY9E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAChE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAiBpE,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,OAAO,CAAA;IAChB,oDAAoD;IACpD,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,UAAU,CAAC,EAAE,UAAU,CAAA;IACvB,gCAAgC;IAChC,eAAe,EAAE,CAAC,GAAG,EAAE;QAAE,YAAY,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAC,gBAAgB,CAAC,CAAA;IAC7E,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IAC/D,oBAAoB;IACpB,YAAY,CAAC,EAAE,cAAc,GAAG,IAAI,CAAA;IACpC,oBAAoB;IACpB,UAAU,CAAC,EAAE,YAAY,GAAG,IAAI,CAAA;CACjC;AAED,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EACtC,OAAO,EACP,YAAY,EACZ,WAAW,EACX,UAAmB,EACnB,eAAe,EACf,QAAQ,EACR,YAAmB,EACnB,UAAiB,GAClB,EAAE,oBAAoB,+BA4LtB"}
1
+ {"version":3,"file":"AskUserFormCard.d.ts","sourceRoot":"","sources":["../../src/components/AskUserFormCard.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAc,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAY9E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAChE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAiBpE,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,OAAO,CAAA;IAChB,oDAAoD;IACpD,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,UAAU,CAAC,EAAE,UAAU,CAAA;IACvB,gCAAgC;IAChC,eAAe,EAAE,CAAC,GAAG,EAAE;QAAE,YAAY,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAC,gBAAgB,CAAC,CAAA;IAC7E,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IAC/D,oBAAoB;IACpB,YAAY,CAAC,EAAE,cAAc,GAAG,IAAI,CAAA;IACpC,oBAAoB;IACpB,UAAU,CAAC,EAAE,YAAY,GAAG,IAAI,CAAA;CACjC;AAED,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EACtC,OAAO,EACP,YAAY,EACZ,WAAW,EACX,UAAmB,EACnB,eAAe,EACf,QAAQ,EACR,YAAmB,EACnB,UAAiB,GAClB,EAAE,oBAAoB,+BA6LtB"}
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import './form-sdk.css';
2
2
  import { jsx as s, jsxs as x, Fragment as De } from "react/jsx-runtime";
3
- import { createContext as Me, useContext as Ee, useCallback as W, useSyncExternalStore as bt, useMemo as z, useState as E, useRef as B, useEffect as V, forwardRef as St, useImperativeHandle as kt } from "react";
3
+ import { createContext as Pe, useContext as Ee, useCallback as W, useSyncExternalStore as bt, useMemo as z, useState as E, useRef as B, useEffect as V, forwardRef as St, useImperativeHandle as kt } from "react";
4
4
  import { Spin as _e, Button as ue, Typography as L, Avatar as xt, Tag as Q, Select as Ce, Checkbox as At, Radio as Tt, Switch as Ct, TimePicker as It, DatePicker as Nt, Upload as ge, Input as ye, InputNumber as Ft, Tooltip as Z } from "antd";
5
- import { ReloadOutlined as Ke, FileTextOutlined as Je, UserOutlined as Pt, FileImageOutlined as Mt, FileExcelOutlined as Et, FileOutlined as He, PictureOutlined as _t, SoundOutlined as Ut, VideoCameraOutlined as zt } from "@ant-design/icons";
5
+ import { ReloadOutlined as Ke, FileTextOutlined as Je, UserOutlined as Mt, FileImageOutlined as Pt, FileExcelOutlined as Et, FileOutlined as He, PictureOutlined as _t, SoundOutlined as Ut, VideoCameraOutlined as zt } from "@ant-design/icons";
6
6
  import { createBinderlessComponentImplementation as R, basicCatalog as le, A2uiSurface as Ye } from "@a2ui/react/v0_9";
7
7
  import { z as d } from "zod";
8
8
  import { Catalog as Rt, MessageProcessor as Xe } from "@a2ui/web_core/v0_9";
@@ -338,7 +338,7 @@ function dn(e, t, n) {
338
338
  const i = n.asLiteral(e.help);
339
339
  return i && (o.help = i), e.caseFilter && typeof e.caseFilter == "object" && (o.caseFilter = pn(e.caseFilter)), o;
340
340
  }
341
- const Qe = Me({ interactive: !0 });
341
+ const Qe = Pe({ interactive: !0 });
342
342
  function et({
343
343
  interactive: e,
344
344
  children: t
@@ -383,7 +383,7 @@ function ee(e) {
383
383
  function j(e) {
384
384
  return Array.isArray(e) ? e.map(String) : typeof e == "string" && e ? [e] : [];
385
385
  }
386
- const nt = Me(null);
386
+ const nt = Pe(null);
387
387
  function rt({
388
388
  caseSearch: e,
389
389
  children: t
@@ -450,9 +450,9 @@ function yn({
450
450
  );
451
451
  }
452
452
  function vn({ context: e }) {
453
- const { interactive: t } = $(), n = fn(), { value: r, setValue: o } = D(e), a = e.componentModel.properties, i = ve(a.label), l = ve(a.placeholder), c = ve(a.help), u = a.enableRefresh !== !1, m = z(() => be(a.caseFilter), [a.caseFilter]), p = hn(m), [y, S] = E(1), [C, F] = E(!1), [T, f] = E(""), [h, k] = E([]), [v, b] = E(0), [M, w] = E(m.pageSize ?? 20), U = B(0), O = j(r), q = z(() => n ? Se(m) ? T || l || "暂无匹配的案例" : "未配置案例列表筛选条件" : "未配置案例搜索服务", [n, m, T, l]), K = W(
453
+ const { interactive: t } = $(), n = fn(), { value: r, setValue: o } = D(e), a = e.componentModel.properties, i = ve(a.label), l = ve(a.placeholder), c = ve(a.help), u = a.enableRefresh !== !1, m = z(() => be(a.caseFilter), [a.caseFilter]), p = hn(m), [y, S] = E(1), [C, F] = E(!1), [T, f] = E(""), [h, k] = E([]), [v, b] = E(0), [P, w] = E(m.pageSize ?? 20), U = B(0), O = j(r), q = z(() => n ? Se(m) ? T || l || "暂无匹配的案例" : "未配置案例列表筛选条件" : "未配置案例搜索服务", [n, m, T, l]), K = W(
454
454
  async (g) => {
455
- const A = be(JSON.parse(p)), P = ++U.current;
455
+ const A = be(JSON.parse(p)), M = ++U.current;
456
456
  if (!n || !Se(A)) {
457
457
  k([]), b(0), f("");
458
458
  return;
@@ -460,13 +460,13 @@ function vn({ context: e }) {
460
460
  F(!0), f("");
461
461
  try {
462
462
  const I = await n({ filter: A, page: g });
463
- if (P !== U.current) return;
463
+ if (M !== U.current) return;
464
464
  k(I.list), b(I.total), S(I.page), w(I.pageSize);
465
465
  } catch (I) {
466
- if (P !== U.current) return;
466
+ if (M !== U.current) return;
467
467
  k([]), b(0), f(I instanceof Error ? I.message : "加载案例列表失败");
468
468
  } finally {
469
- P === U.current && F(!1);
469
+ M === U.current && F(!1);
470
470
  }
471
471
  },
472
472
  [n, p]
@@ -476,10 +476,10 @@ function vn({ context: e }) {
476
476
  }, [p, K]);
477
477
  const Y = (g) => {
478
478
  if (!t) return;
479
- const A = O.includes(g) ? O.filter((P) => P !== g) : [...O, g];
479
+ const A = O.includes(g) ? O.filter((M) => M !== g) : [...O, g];
480
480
  o(A);
481
481
  }, X = () => {
482
- const g = be(JSON.parse(p)), A = M || g.pageSize || 20, P = Math.max(1, Math.ceil(v / A)), I = y >= P ? 1 : y + 1;
482
+ const g = be(JSON.parse(p)), A = P || g.pageSize || 20, M = Math.max(1, Math.ceil(v / A)), I = y >= M ? 1 : y + 1;
483
483
  K(I);
484
484
  };
485
485
  return /* @__PURE__ */ x("div", { className: "form-block-preview skopon-resume-select", children: [
@@ -562,7 +562,7 @@ function xn(e, t, n) {
562
562
  }
563
563
  return o;
564
564
  }
565
- const ot = Me(null);
565
+ const ot = Pe(null);
566
566
  function at({
567
567
  resumeSearch: e,
568
568
  children: t
@@ -614,13 +614,13 @@ function Fn(e) {
614
614
  /* @__PURE__ */ s("span", { className: "skopon-resume-select-card-field-value", children: typeof e == "number" ? `${e}%` : "暂无" })
615
615
  ] });
616
616
  }
617
- function Pn({ work: e }) {
617
+ function Mn({ work: e }) {
618
618
  return /* @__PURE__ */ x("div", { className: "skopon-resume-select-card-work", children: [
619
- /* @__PURE__ */ s("div", { className: "skopon-resume-select-card-work-cover", children: e.coverUrl ? /* @__PURE__ */ s("img", { src: e.coverUrl, alt: "", className: "skopon-resume-select-card-work-img" }) : /* @__PURE__ */ s(Mt, { className: "skopon-resume-select-card-work-placeholder" }) }),
619
+ /* @__PURE__ */ s("div", { className: "skopon-resume-select-card-work-cover", children: e.coverUrl ? /* @__PURE__ */ s("img", { src: e.coverUrl, alt: "", className: "skopon-resume-select-card-work-img" }) : /* @__PURE__ */ s(Pt, { className: "skopon-resume-select-card-work-placeholder" }) }),
620
620
  /* @__PURE__ */ s("div", { className: "skopon-resume-select-card-work-title", children: e.title || "未命名作品" })
621
621
  ] });
622
622
  }
623
- function Mn({
623
+ function Pn({
624
624
  item: e,
625
625
  selected: t,
626
626
  disabled: n,
@@ -640,7 +640,7 @@ function Mn({
640
640
  {
641
641
  size: 48,
642
642
  src: e.avatarUrl || void 0,
643
- icon: e.avatarUrl ? void 0 : /* @__PURE__ */ s(Pt, {}),
643
+ icon: e.avatarUrl ? void 0 : /* @__PURE__ */ s(Mt, {}),
644
644
  className: "skopon-resume-select-card-avatar"
645
645
  }
646
646
  ),
@@ -652,7 +652,7 @@ function Mn({
652
652
  Ae("擅长领域", e.traits),
653
653
  /* @__PURE__ */ x("div", { className: "skopon-resume-select-card-works", children: [
654
654
  /* @__PURE__ */ s("span", { className: "skopon-resume-select-card-works-label", children: "过往作品" }),
655
- o.length > 0 ? /* @__PURE__ */ s("div", { className: "skopon-resume-select-card-works-list", children: o.map((a, i) => /* @__PURE__ */ s(Pn, { work: a }, `${a.title}-${i}`)) }) : /* @__PURE__ */ s("div", { className: "skopon-resume-select-card-works-empty", children: "暂无作品" })
655
+ o.length > 0 ? /* @__PURE__ */ s("div", { className: "skopon-resume-select-card-works-list", children: o.map((a, i) => /* @__PURE__ */ s(Mn, { work: a }, `${a.title}-${i}`)) }) : /* @__PURE__ */ s("div", { className: "skopon-resume-select-card-works-empty", children: "暂无作品" })
656
656
  ] })
657
657
  ] })
658
658
  ]
@@ -660,9 +660,9 @@ function Mn({
660
660
  );
661
661
  }
662
662
  function En({ context: e }) {
663
- const { interactive: t } = $(), n = An(), { value: r, setValue: o } = D(e), a = e.componentModel.properties, i = ke(a.label), l = ke(a.placeholder), c = ke(a.help), u = a.enableRefresh !== !1, m = z(() => xe(a.resumeFilter), [a.resumeFilter]), p = Tn(m), [y, S] = E(1), [C, F] = E(!1), [T, f] = E(""), [h, k] = E([]), [v, b] = E(0), [M, w] = E(m.pageSize ?? 20), U = B(0), O = j(r), q = W(
663
+ const { interactive: t } = $(), n = An(), { value: r, setValue: o } = D(e), a = e.componentModel.properties, i = ke(a.label), l = ke(a.placeholder), c = ke(a.help), u = a.enableRefresh !== !1, m = z(() => xe(a.resumeFilter), [a.resumeFilter]), p = Tn(m), [y, S] = E(1), [C, F] = E(!1), [T, f] = E(""), [h, k] = E([]), [v, b] = E(0), [P, w] = E(m.pageSize ?? 20), U = B(0), O = j(r), q = W(
664
664
  async (g) => {
665
- const A = xe(JSON.parse(p)), P = ++U.current;
665
+ const A = xe(JSON.parse(p)), M = ++U.current;
666
666
  if (!n) {
667
667
  k([]), b(0), f("未配置简历搜索服务");
668
668
  return;
@@ -670,13 +670,13 @@ function En({ context: e }) {
670
670
  F(!0), f("");
671
671
  try {
672
672
  const I = await n({ filter: A, page: g });
673
- if (P !== U.current) return;
673
+ if (M !== U.current) return;
674
674
  k(I.list), b(I.total), S(I.page), w(I.pageSize);
675
675
  } catch (I) {
676
- if (P !== U.current) return;
676
+ if (M !== U.current) return;
677
677
  k([]), b(0), f(I instanceof Error ? I.message : "加载简历列表失败");
678
678
  } finally {
679
- P === U.current && F(!1);
679
+ M === U.current && F(!1);
680
680
  }
681
681
  },
682
682
  [n, p]
@@ -686,10 +686,10 @@ function En({ context: e }) {
686
686
  }, [p, q]);
687
687
  const K = (g) => {
688
688
  if (!t) return;
689
- const A = O.includes(g) ? O.filter((P) => P !== g) : [...O, g];
689
+ const A = O.includes(g) ? O.filter((M) => M !== g) : [...O, g];
690
690
  o(A);
691
691
  }, Y = () => {
692
- const g = xe(JSON.parse(p)), A = M || g.pageSize || 20, P = Math.max(1, Math.ceil(v / A)), I = y >= P ? 1 : y + 1;
692
+ const g = xe(JSON.parse(p)), A = P || g.pageSize || 20, M = Math.max(1, Math.ceil(v / A)), I = y >= M ? 1 : y + 1;
693
693
  q(I);
694
694
  }, X = l || "暂无匹配的简历";
695
695
  return /* @__PURE__ */ x("div", { className: "form-block-preview skopon-resume-select", children: [
@@ -701,7 +701,7 @@ function En({ context: e }) {
701
701
  !C && T ? /* @__PURE__ */ s(L.Text, { type: "danger", className: "skopon-resume-select-status", children: T }) : null,
702
702
  !C && !T && h.length === 0 ? /* @__PURE__ */ s("div", { className: "skopon-resume-select-empty", children: X }) : null,
703
703
  h.length > 0 ? /* @__PURE__ */ s("div", { className: "skopon-resume-select-list", children: h.map((g) => /* @__PURE__ */ s(
704
- Mn,
704
+ Pn,
705
705
  {
706
706
  item: g,
707
707
  selected: O.includes(g.resumeUniqueId),
@@ -939,7 +939,7 @@ function Dn(e) {
939
939
  return { node: null };
940
940
  }
941
941
  }
942
- function Pe(e) {
942
+ function Me(e) {
943
943
  if (!e || !Array.isArray(e.components) || e.components.length === 0) return !0;
944
944
  const t = e.components.find((r) => r.id === ce);
945
945
  if (!t) return e.components.length === 0;
@@ -1102,7 +1102,7 @@ function ct(e) {
1102
1102
  function Gn(e, t) {
1103
1103
  if (!e || typeof e != "object") return null;
1104
1104
  const n = e, r = ct(n.a2ui) ? n.a2ui : void 0;
1105
- if (r && !Pe(r)) return r;
1105
+ if (r && !Me(r)) return r;
1106
1106
  const o = Array.isArray(n.blocks) ? n.blocks : [];
1107
1107
  if (o.length === 0) return null;
1108
1108
  const a = H({
@@ -1110,7 +1110,7 @@ function Gn(e, t) {
1110
1110
  description: typeof n.description == "string" ? n.description : "",
1111
1111
  blocks: o
1112
1112
  }), i = lt(a, t);
1113
- return Pe(i) ? null : i;
1113
+ return Me(i) ? null : i;
1114
1114
  }
1115
1115
  function Wn(e, t, n) {
1116
1116
  return lt(
@@ -1618,7 +1618,7 @@ function Fr(e, t, n) {
1618
1618
  const o = qe(r);
1619
1619
  return o.isValid() ? o : void 0;
1620
1620
  }
1621
- function Pr({ context: e }) {
1621
+ function Mr({ context: e }) {
1622
1622
  const { interactive: t } = $(), { value: n, setValue: r } = D(e), o = e.componentModel.properties, a = N(o.label), i = N(o.placeholder), l = o.enableDate === !0, c = o.enableTime === !0, u = Fr(n, l, c), m = (p) => {
1623
1623
  if (!p) {
1624
1624
  r("");
@@ -1660,7 +1660,7 @@ function Pr({ context: e }) {
1660
1660
  )
1661
1661
  ] });
1662
1662
  }
1663
- const Mr = R(
1663
+ const Pr = R(
1664
1664
  {
1665
1665
  name: "DateTimeInput",
1666
1666
  schema: d.object({
@@ -1673,7 +1673,7 @@ const Mr = R(
1673
1673
  max: d.any().optional()
1674
1674
  }).passthrough()
1675
1675
  },
1676
- Pr
1676
+ Mr
1677
1677
  ), Er = {
1678
1678
  name: "FileUpload",
1679
1679
  schema: d.object({
@@ -1712,7 +1712,7 @@ function _r({ context: e }) {
1712
1712
  return r(k), !1;
1713
1713
  },
1714
1714
  onRemove: (f) => {
1715
- const h = j(Le(e)), k = /^(\d+)-/.exec(f.uid ?? ""), v = k ? Number(k[1]) : -1, b = v >= 0 && v < h.length ? h.filter((M, w) => w !== v) : h.filter((M) => M !== f.name);
1715
+ const h = j(Le(e)), k = /^(\d+)-/.exec(f.uid ?? ""), v = k ? Number(k[1]) : -1, b = v >= 0 && v < h.length ? h.filter((P, w) => w !== v) : h.filter((P) => P !== f.name);
1716
1716
  if (b.length < p) return !1;
1717
1717
  r(b);
1718
1718
  },
@@ -1820,7 +1820,7 @@ function vt() {
1820
1820
  Sr,
1821
1821
  Cr,
1822
1822
  Nr,
1823
- Mr,
1823
+ Pr,
1824
1824
  Ur,
1825
1825
  Rr,
1826
1826
  Or,
@@ -1844,7 +1844,7 @@ const Br = St(
1844
1844
  const u = B(null), m = B(a);
1845
1845
  m.current = a;
1846
1846
  const p = z(() => {
1847
- if (Pe(t)) return "";
1847
+ if (Me(t)) return "";
1848
1848
  try {
1849
1849
  return JSON.stringify(t);
1850
1850
  } catch {
@@ -1933,15 +1933,15 @@ function Qr({
1933
1933
  let f = !1;
1934
1934
  const h = m.current !== t;
1935
1935
  if (m.current = t, h) {
1936
- const M = ie();
1937
- return Array.isArray(e) && e.length > 0 ? (M.processMessages(e), f || p(M, e)) : (i.current = M, l.current = 0, c.current = "", f || (C(M), T([]))), () => {
1936
+ const P = ie();
1937
+ return Array.isArray(e) && e.length > 0 ? (P.processMessages(e), f || p(P, e)) : (i.current = P, l.current = 0, c.current = "", f || (C(P), T([]))), () => {
1938
1938
  f = !0;
1939
1939
  };
1940
1940
  }
1941
1941
  if (!Array.isArray(e) || e.length === 0) {
1942
1942
  if (l.current > 0) {
1943
- const M = ie();
1944
- i.current = M, l.current = 0, c.current = "", f || (C(M), T([]));
1943
+ const P = ie();
1944
+ i.current = P, l.current = 0, c.current = "", f || (C(P), T([]));
1945
1945
  }
1946
1946
  return () => {
1947
1947
  f = !0;
@@ -1949,8 +1949,8 @@ function Qr({
1949
1949
  }
1950
1950
  const k = i.current, v = l.current;
1951
1951
  if (e.length < v || y(e, v)) {
1952
- const M = ie();
1953
- return M.processMessages(e), f || p(M, e), () => {
1952
+ const P = ie();
1953
+ return P.processMessages(e), f || p(P, e), () => {
1954
1954
  f = !0;
1955
1955
  };
1956
1956
  }
@@ -2023,11 +2023,11 @@ function eo({
2023
2023
  return k ? (S(!0), p(!1), o({ formUniqueId: k }).then((A) => {
2024
2024
  g || (p(!!A.disabled), u(A.formDefinition ?? null));
2025
2025
  }).catch((A) => {
2026
- var P;
2026
+ var M;
2027
2027
  if (!g) {
2028
2028
  p(!1), u(null);
2029
2029
  const I = A instanceof Error ? A.message : "获取表单定义失败";
2030
- (P = h.current) == null || P.call(h, "error", I);
2030
+ (M = h.current) == null || M.call(h, "error", I);
2031
2031
  }
2032
2032
  }).finally(() => {
2033
2033
  g || S(!1);
@@ -2037,7 +2037,7 @@ function eo({
2037
2037
  g = !0;
2038
2038
  });
2039
2039
  }, [k, o]);
2040
- const v = z(() => ut(e), [e]), b = z(() => v ? rr(v, c ?? void 0) : null, [v, c]), M = (b == null ? void 0 : b.matchedBlocks) ?? [], w = !!(v && ar(v) && M.length === 0), U = z(() => w && v ? ir(v) : b && b.renderBlocks.length > 0 ? b.renderBlocks : [], [b, w, v]), O = z(
2040
+ const v = z(() => ut(e), [e]), b = z(() => v ? rr(v, c ?? void 0) : null, [v, c]), P = (b == null ? void 0 : b.matchedBlocks) ?? [], w = !!(v && ar(v) && P.length === 0), U = z(() => w && v ? ir(v) : b && b.renderBlocks.length > 0 ? b.renderBlocks : [], [b, w, v]), O = z(
2041
2041
  () => w ? {} : pt((b == null ? void 0 : b.extraBlocks) ?? []),
2042
2042
  [w, b]
2043
2043
  ), q = z(() => w && v ? lr(v) : U.filter((g) => {
@@ -2056,12 +2056,13 @@ function eo({
2056
2056
  {
2057
2057
  payload: e,
2058
2058
  callbackUrl: n,
2059
+ copyMode: "submitFields",
2059
2060
  unpublishedFormId: m && k ? k : void 0,
2060
2061
  onNotify: a
2061
2062
  }
2062
2063
  );
2063
2064
  async function X() {
2064
- var g, A, P, I, Oe, Be;
2065
+ var g, A, M, I, Oe, Be;
2065
2066
  if (!C) {
2066
2067
  F(!0);
2067
2068
  try {
@@ -2074,7 +2075,7 @@ function eo({
2074
2075
  }
2075
2076
  const he = await ur(Ve, fe);
2076
2077
  if (!f.current) return;
2077
- he.ok ? (P = h.current) == null || P.call(h, "success", "提交成功") : (I = h.current) == null || I.call(h, "error", qr(he.status, he.body));
2078
+ he.ok ? (M = h.current) == null || M.call(h, "success", "提交成功") : (I = h.current) == null || I.call(h, "error", qr(he.status, he.body));
2078
2079
  return;
2079
2080
  }
2080
2081
  if (await ht(
@@ -2140,7 +2141,7 @@ export {
2140
2141
  lr as getPayloadInputFieldNames,
2141
2142
  ir as getPayloadRenderableBlocks,
2142
2143
  rr as intersectPayloadBlocksWithForm,
2143
- Pe as isA2uiSurfaceEmpty,
2144
+ Me as isA2uiSurfaceEmpty,
2144
2145
  J as isInputBlockType,
2145
2146
  Ue as isLayoutBlockType,
2146
2147
  Ie as isMediaBlockType,
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.1.6",
6
+ "version": "0.1.7",
7
7
  "description": "Skopon form rendering SDK (A2UI + form_definition) with submit helpers",
8
8
  "type": "module",
9
9
  "sideEffects": [
@@ -165,6 +165,7 @@ export default function AskUserFormCard({
165
165
  <CurlSubmitBlock
166
166
  payload={payload}
167
167
  callbackUrl={callbackUrl}
168
+ copyMode="submitFields"
168
169
  unpublishedFormId={formDisabled && resolvedFormUniqueId ? resolvedFormUniqueId : undefined}
169
170
  onNotify={onNotify}
170
171
  />