openxiangda 1.0.255 → 1.0.256

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.
@@ -33994,7 +33994,7 @@ var init_xlsx = __esm({
33994
33994
  });
33995
33995
 
33996
33996
  // packages/sdk/src/components/core/FormProvider.tsx
33997
- import React48, { useCallback as useCallback10, useEffect as useEffect36, useRef as useRef10, useState as useState21, useMemo as useMemo20 } from "react";
33997
+ import React48, { useCallback as useCallback10, useEffect as useEffect36, useRef as useRef11, useState as useState22, useMemo as useMemo20 } from "react";
33998
33998
 
33999
33999
  // packages/sdk/src/components/core/FormContext.ts
34000
34000
  import { createContext, useContext } from "react";
@@ -34014,10 +34014,14 @@ function ComponentRegistryProvider({
34014
34014
  components,
34015
34015
  children
34016
34016
  }) {
34017
- const [registry, setRegistry] = React.useState(components);
34017
+ const [registeredComponents, setRegisteredComponents] = React.useState({});
34018
34018
  const register = React.useCallback((name, component) => {
34019
- setRegistry((prev) => ({ ...prev, [name]: component }));
34019
+ setRegisteredComponents((prev) => ({ ...prev, [name]: component }));
34020
34020
  }, []);
34021
+ const registry = React.useMemo(
34022
+ () => ({ ...components, ...registeredComponents }),
34023
+ [components, registeredComponents]
34024
+ );
34021
34025
  const value = React.useMemo(() => ({ registry, register }), [registry, register]);
34022
34026
  return React.createElement(ComponentRegistryContext.Provider, { value }, children);
34023
34027
  }
@@ -44942,17 +44946,34 @@ function DigitalSignatureField(props) {
44942
44946
  }
44943
44947
 
44944
44948
  // packages/sdk/src/components/fields/JSONField/index.tsx
44945
- import { useEffect as useEffect35 } from "react";
44946
- import { jsx as jsx76 } from "react/jsx-runtime";
44947
- var formatJson = (value) => {
44949
+ import { useEffect as useEffect35, useRef as useRef10, useState as useState21 } from "react";
44950
+ import { Input as Input11 } from "antd";
44951
+ import { jsx as jsx76, jsxs as jsxs35 } from "react/jsx-runtime";
44952
+ var formatJson = (value, indent = 2) => {
44948
44953
  if (value === void 0 || value === null || value === "") return "--";
44949
44954
  if (typeof value === "string") return value;
44950
44955
  try {
44951
- return JSON.stringify(value, null, 2);
44956
+ return JSON.stringify(value, null, indent);
44957
+ } catch {
44958
+ return String(value);
44959
+ }
44960
+ };
44961
+ var formatJsonForEditing = (value, indent = 2) => {
44962
+ if (value === void 0 || value === null || value === "") return "";
44963
+ try {
44964
+ return JSON.stringify(value, null, indent);
44952
44965
  } catch {
44953
44966
  return String(value);
44954
44967
  }
44955
44968
  };
44969
+ var parseJson = (text) => {
44970
+ if (!text.trim()) return { value: void 0, error: void 0 };
44971
+ try {
44972
+ return { value: JSON.parse(text), error: void 0 };
44973
+ } catch {
44974
+ return { value: void 0, error: "\u8BF7\u8F93\u5165\u6709\u6548\u7684 JSON" };
44975
+ }
44976
+ };
44956
44977
  function JSONField(props) {
44957
44978
  const {
44958
44979
  fieldId,
@@ -44964,11 +44985,22 @@ function JSONField(props) {
44964
44985
  labelClassName,
44965
44986
  tipsClassName,
44966
44987
  readonlyClassName,
44967
- defaultValue
44988
+ inputClassName,
44989
+ placeholder = "\u8BF7\u8F93\u5165\u6709\u6548\u7684 JSON",
44990
+ defaultValue,
44991
+ indent = 2,
44992
+ rows = 8,
44993
+ renderer,
44994
+ editor,
44995
+ onChange,
44996
+ onBlur
44968
44997
  } = props;
44969
- const { formData, fieldBehaviors, setFieldValue, registerField, unregisterField } = useFormContext();
44970
- const behavior = propBehavior ?? fieldBehaviors[fieldId] ?? "READONLY";
44998
+ const { formData, fieldBehaviors, setFieldValue, setFieldError, registerField, unregisterField } = useFormContext();
44999
+ const behavior = propBehavior ?? fieldBehaviors[fieldId] ?? "NORMAL";
44971
45000
  const value = formData[fieldId];
45001
+ const [editorText, setEditorText] = useState21(() => formatJsonForEditing(value, indent));
45002
+ const [parseError, setParseError] = useState21();
45003
+ const editingRef = useRef10(false);
44972
45004
  useEffect35(() => {
44973
45005
  registerField(fieldId);
44974
45006
  if (defaultValue !== void 0 && formData[fieldId] === void 0) {
@@ -44976,7 +45008,55 @@ function JSONField(props) {
44976
45008
  }
44977
45009
  return () => unregisterField(fieldId);
44978
45010
  }, [fieldId]);
45011
+ useEffect35(() => {
45012
+ if (editingRef.current) return;
45013
+ setEditorText(formatJsonForEditing(value, indent));
45014
+ setParseError(void 0);
45015
+ }, [indent, value]);
44979
45016
  if (behavior === "HIDDEN") return null;
45017
+ const renderContext = {
45018
+ fieldId,
45019
+ label,
45020
+ value,
45021
+ formattedValue: formatJson(value, indent),
45022
+ behavior
45023
+ };
45024
+ const updateValue = (nextValue) => {
45025
+ setFieldValue(fieldId, nextValue);
45026
+ onChange?.(nextValue);
45027
+ };
45028
+ const handleTextChange = (event) => {
45029
+ const nextText = event.target.value;
45030
+ editingRef.current = true;
45031
+ setEditorText(nextText);
45032
+ const parsed = parseJson(nextText);
45033
+ setParseError(parsed.error);
45034
+ setFieldError(fieldId, parsed.error);
45035
+ if (!parsed.error) updateValue(parsed.value);
45036
+ };
45037
+ const handleStructuredChange = (nextValue) => {
45038
+ editingRef.current = true;
45039
+ setEditorText(formatJsonForEditing(nextValue, indent));
45040
+ setParseError(void 0);
45041
+ setFieldError(fieldId, null);
45042
+ updateValue(nextValue);
45043
+ };
45044
+ const handleEditorError = (error) => {
45045
+ setParseError(error);
45046
+ setFieldError(fieldId, error);
45047
+ };
45048
+ const handleBlur = () => {
45049
+ editingRef.current = false;
45050
+ const parsed = parseJson(editorText);
45051
+ setParseError(parsed.error);
45052
+ setFieldError(fieldId, parsed.error);
45053
+ if (!parsed.error) {
45054
+ setEditorText(formatJsonForEditing(parsed.value, indent));
45055
+ onBlur?.(parsed.value);
45056
+ return;
45057
+ }
45058
+ onBlur?.(value);
45059
+ };
44980
45060
  return /* @__PURE__ */ jsx76(
44981
45061
  FieldWrapper,
44982
45062
  {
@@ -44987,14 +45067,41 @@ function JSONField(props) {
44987
45067
  className,
44988
45068
  labelClassName,
44989
45069
  tipsClassName,
44990
- children: /* @__PURE__ */ jsx76(
45070
+ children: behavior === "READONLY" ? renderer ? renderer(renderContext) : /* @__PURE__ */ jsx76(
44991
45071
  "pre",
44992
45072
  {
44993
45073
  className: readonlyClassName || "sy-field-readonly-value",
44994
45074
  "data-testid": `jsonfield-readonly-${fieldId}`,
44995
- children: formatJson(value)
44996
- }
44997
- )
45075
+ children: renderContext.formattedValue
45076
+ }
45077
+ ) : editor ? editor({
45078
+ ...renderContext,
45079
+ disabled: behavior === "DISABLED",
45080
+ error: parseError,
45081
+ onChange: handleStructuredChange,
45082
+ onError: handleEditorError
45083
+ }) : /* @__PURE__ */ jsxs35("div", { children: [
45084
+ /* @__PURE__ */ jsx76(
45085
+ Input11.TextArea,
45086
+ {
45087
+ className: inputClassName,
45088
+ "data-testid": `jsonfield-input-${fieldId}`,
45089
+ value: editorText,
45090
+ placeholder,
45091
+ rows,
45092
+ disabled: behavior === "DISABLED",
45093
+ status: parseError ? "error" : void 0,
45094
+ "aria-invalid": Boolean(parseError),
45095
+ spellCheck: false,
45096
+ onFocus: () => {
45097
+ editingRef.current = true;
45098
+ },
45099
+ onChange: handleTextChange,
45100
+ onBlur: handleBlur
45101
+ }
45102
+ ),
45103
+ parseError && /* @__PURE__ */ jsx76("div", { className: "sy-field-error", role: "alert", "data-testid": `jsonfield-error-${fieldId}`, children: parseError })
45104
+ ] })
44998
45105
  }
44999
45106
  );
45000
45107
  }
@@ -46323,7 +46430,7 @@ function FormProvider({
46323
46430
  children
46324
46431
  }) {
46325
46432
  const api = useMemo20(() => createFormRuntimeApi(config.api), [config.api]);
46326
- const [runtimeDefaults, setRuntimeDefaults] = useState21({});
46433
+ const [runtimeDefaults, setRuntimeDefaults] = useState22({});
46327
46434
  const effects = useMemo20(
46328
46435
  () => [
46329
46436
  ...schema.rules ?? [],
@@ -46353,10 +46460,11 @@ function FormProvider({
46353
46460
  }
46354
46461
  return { ...values, ...initialValues };
46355
46462
  }, [schema, initialValues, mergedRuntime]);
46356
- const initialValuesRef = useRef10(computedInitialValues);
46357
- const [formData, setFormData] = useState21({ ...computedInitialValues });
46358
- const [fieldErrors, setFieldErrors] = useState21({});
46359
- const [registeredFields] = useState21(/* @__PURE__ */ new Set());
46463
+ const initialValuesRef = useRef11(computedInitialValues);
46464
+ const [formData, setFormData] = useState22({ ...computedInitialValues });
46465
+ const [fieldErrors, setFieldErrors] = useState22({});
46466
+ const [componentFieldErrors, setComponentFieldErrors] = useState22({});
46467
+ const [registeredFields] = useState22(/* @__PURE__ */ new Set());
46360
46468
  useEffect36(() => {
46361
46469
  if (!schema.fields.some((field) => needsCurrentUserRuntime(field.defaultShortcut?.type)))
46362
46470
  return;
@@ -46447,10 +46555,16 @@ function FormProvider({
46447
46555
  if (changed) {
46448
46556
  setFormData(nextData);
46449
46557
  setFieldErrors(nextErrors);
46558
+ setComponentFieldErrors((prev) => {
46559
+ const next = { ...prev };
46560
+ for (const action of valueActions) delete next[action.fieldId];
46561
+ return next;
46562
+ });
46450
46563
  }
46451
46564
  }, [effects, formData, fieldErrors]);
46452
46565
  const setFieldValue = useCallback10((fieldId, value) => {
46453
46566
  setFormData((prev) => ({ ...prev, [fieldId]: value }));
46567
+ setComponentFieldErrors((prev) => replaceSingleFieldError(prev, fieldId, null));
46454
46568
  setFieldErrors((prev) => {
46455
46569
  if (prev[fieldId]) {
46456
46570
  const next = { ...prev };
@@ -46460,6 +46574,10 @@ function FormProvider({
46460
46574
  return prev;
46461
46575
  });
46462
46576
  }, []);
46577
+ const setFieldError = useCallback10((fieldId, error) => {
46578
+ setComponentFieldErrors((prev) => replaceSingleFieldError(prev, fieldId, error || null));
46579
+ setFieldErrors((prev) => replaceSingleFieldError(prev, fieldId, error || null));
46580
+ }, []);
46463
46581
  const getFieldValue = useCallback10((fieldId) => formData[fieldId], [formData]);
46464
46582
  const getFormData2 = useCallback10(() => ({ ...formData }), [formData]);
46465
46583
  const validateFieldById = useCallback10(
@@ -46470,6 +46588,9 @@ function FormProvider({
46470
46588
  if (!scopedField) return true;
46471
46589
  const parentBehavior = fieldBehaviors[scopedField.parent.fieldId] ?? scopedField.parent.behavior ?? "NORMAL";
46472
46590
  if (isInactiveBehavior(parentBehavior) || isInactiveBehavior(scopedField.column.behavior)) {
46591
+ setComponentFieldErrors(
46592
+ (prev) => replaceSingleFieldError(prev, scopedField.scopedFieldId, null)
46593
+ );
46473
46594
  setFieldErrors((prev) => replaceSingleFieldError(prev, scopedField.scopedFieldId, null));
46474
46595
  return true;
46475
46596
  }
@@ -46489,6 +46610,7 @@ function FormProvider({
46489
46610
  }
46490
46611
  const behavior = fieldBehaviors[fieldId] ?? field.behavior ?? "NORMAL";
46491
46612
  if (isInactiveBehavior(behavior)) {
46613
+ setComponentFieldErrors((prev) => clearFieldAndChildrenErrors(prev, fieldId));
46492
46614
  setFieldErrors((prev) => {
46493
46615
  return clearFieldAndChildrenErrors(prev, fieldId);
46494
46616
  });
@@ -46513,7 +46635,7 @@ function FormProvider({
46513
46635
  }
46514
46636
  if (rules.length === 0 && Object.keys(errors).length === 0) {
46515
46637
  if (field.componentName !== "SubFormField") {
46516
- return true;
46638
+ return !componentFieldErrors[fieldId];
46517
46639
  }
46518
46640
  }
46519
46641
  setFieldErrors((prev) => {
@@ -46521,16 +46643,18 @@ function FormProvider({
46521
46643
  });
46522
46644
  return Object.keys(errors).length === 0;
46523
46645
  },
46524
- [schema, formData, fieldBehaviors, fieldOverrides]
46646
+ [schema, formData, fieldBehaviors, componentFieldErrors, fieldOverrides]
46525
46647
  );
46526
46648
  const validateAllWithErrors = useCallback10(async () => {
46527
46649
  const fieldRules = {};
46528
46650
  const validationData = { ...formData };
46651
+ const activeFieldIds = /* @__PURE__ */ new Set();
46529
46652
  for (const field of schema.fields) {
46530
46653
  const behavior = fieldBehaviors[field.fieldId] ?? field.behavior ?? "NORMAL";
46531
46654
  if (isInactiveBehavior(behavior)) {
46532
46655
  continue;
46533
46656
  }
46657
+ activeFieldIds.add(field.fieldId);
46534
46658
  const rules = buildValidationRules(
46535
46659
  field.label,
46536
46660
  fieldOverrides[field.fieldId]?.required ?? field.required,
@@ -46543,10 +46667,20 @@ function FormProvider({
46543
46667
  collectSubFormValidationRules(field, formData, validationData, fieldRules);
46544
46668
  }
46545
46669
  }
46546
- const errors = await validateAllFields(validationData, fieldRules);
46670
+ const componentErrors = Object.fromEntries(
46671
+ Object.entries(componentFieldErrors).filter(
46672
+ ([fieldId]) => [...activeFieldIds].some(
46673
+ (activeFieldId) => fieldId === activeFieldId || fieldId.startsWith(`${activeFieldId}.`)
46674
+ )
46675
+ )
46676
+ );
46677
+ const errors = {
46678
+ ...componentErrors,
46679
+ ...await validateAllFields(validationData, fieldRules)
46680
+ };
46547
46681
  setFieldErrors(errors);
46548
46682
  return errors;
46549
- }, [schema, formData, fieldBehaviors, fieldOverrides]);
46683
+ }, [schema, formData, fieldBehaviors, componentFieldErrors, fieldOverrides]);
46550
46684
  const validateAll = useCallback10(async () => {
46551
46685
  const errors = await validateAllWithErrors();
46552
46686
  return Object.keys(errors).length === 0;
@@ -46554,6 +46688,7 @@ function FormProvider({
46554
46688
  const resetForm = useCallback10(() => {
46555
46689
  setFormData({ ...initialValuesRef.current });
46556
46690
  setFieldErrors({});
46691
+ setComponentFieldErrors({});
46557
46692
  }, []);
46558
46693
  const registerField = useCallback10(
46559
46694
  (fieldId) => {
@@ -46567,7 +46702,7 @@ function FormProvider({
46567
46702
  },
46568
46703
  [registeredFields]
46569
46704
  );
46570
- const [dynamicOptions, setDynamicOptions] = useState21({});
46705
+ const [dynamicOptions, setDynamicOptions] = useState22({});
46571
46706
  useEffect36(() => {
46572
46707
  const loadDynamicOptions = async () => {
46573
46708
  const updates = {};
@@ -46666,6 +46801,7 @@ function FormProvider({
46666
46801
  submit: config.submit
46667
46802
  },
46668
46803
  setFieldValue,
46804
+ setFieldError,
46669
46805
  getFieldValue,
46670
46806
  getFormData: getFormData2,
46671
46807
  validateField: validateFieldById,
@@ -46691,6 +46827,7 @@ function FormProvider({
46691
46827
  config.formInstanceId,
46692
46828
  config.submit,
46693
46829
  setFieldValue,
46830
+ setFieldError,
46694
46831
  getFieldValue,
46695
46832
  getFormData2,
46696
46833
  validateFieldById,
@@ -46701,7 +46838,10 @@ function FormProvider({
46701
46838
  unregisterField
46702
46839
  ]
46703
46840
  );
46704
- const registryComponents = components ?? defaultComponentRegistry;
46841
+ const registryComponents = useMemo20(
46842
+ () => components ? { ...defaultComponentRegistry, ...components } : defaultComponentRegistry,
46843
+ [components]
46844
+ );
46705
46845
  return React48.createElement(
46706
46846
  FormContext.Provider,
46707
46847
  { value: contextValue },
@@ -46825,8 +46965,8 @@ import {
46825
46965
  FileTextOutlined as FileTextOutlined2,
46826
46966
  UserOutlined as UserOutlined2
46827
46967
  } from "@ant-design/icons";
46828
- import { useState as useState22 } from "react";
46829
- import { jsx as jsx77, jsxs as jsxs35 } from "react/jsx-runtime";
46968
+ import { useState as useState23 } from "react";
46969
+ import { jsx as jsx77, jsxs as jsxs36 } from "react/jsx-runtime";
46830
46970
  var sectionIconMap = {
46831
46971
  user: UserOutlined2,
46832
46972
  calendar: CalendarOutlined,
@@ -46850,7 +46990,7 @@ function FormSection({
46850
46990
  contentClassName,
46851
46991
  children
46852
46992
  }) {
46853
- const [collapsed, setCollapsed] = useState22(defaultCollapsed);
46993
+ const [collapsed, setCollapsed] = useState23(defaultCollapsed);
46854
46994
  const handleToggle = () => {
46855
46995
  if (collapsible) {
46856
46996
  setCollapsed((prev) => !prev);
@@ -46865,7 +47005,7 @@ function FormSection({
46865
47005
  };
46866
47006
  const IconComponent = icon === void 0 && iconKey ? sectionIconMap[iconKey] : void 0;
46867
47007
  const resolvedIcon = icon !== void 0 ? icon : IconComponent ? /* @__PURE__ */ jsx77(IconComponent, {}) : void 0;
46868
- return /* @__PURE__ */ jsxs35(
47008
+ return /* @__PURE__ */ jsxs36(
46869
47009
  "section",
46870
47010
  {
46871
47011
  className: cn2(
@@ -46877,7 +47017,7 @@ function FormSection({
46877
47017
  "data-testid": "form-section",
46878
47018
  "data-collapsed": collapsed ? "true" : "false",
46879
47019
  children: [
46880
- /* @__PURE__ */ jsxs35(
47020
+ /* @__PURE__ */ jsxs36(
46881
47021
  "div",
46882
47022
  {
46883
47023
  className: cn2("sy-form-section-header", titleClassName),
@@ -46888,10 +47028,10 @@ function FormSection({
46888
47028
  tabIndex: collapsible ? 0 : void 0,
46889
47029
  "data-testid": "form-section-header",
46890
47030
  children: [
46891
- /* @__PURE__ */ jsxs35("div", { className: "sy-form-section-heading", children: [
47031
+ /* @__PURE__ */ jsxs36("div", { className: "sy-form-section-heading", children: [
46892
47032
  variant === "plain" && /* @__PURE__ */ jsx77("span", { className: "sy-form-section-marker", "data-testid": "form-section-marker" }),
46893
47033
  variant === "card" && resolvedIcon && /* @__PURE__ */ jsx77("span", { className: "sy-form-section-icon", "data-testid": "form-section-icon", children: resolvedIcon }),
46894
- /* @__PURE__ */ jsxs35("div", { className: "sy-form-section-title-block", children: [
47034
+ /* @__PURE__ */ jsxs36("div", { className: "sy-form-section-title-block", children: [
46895
47035
  /* @__PURE__ */ jsx77("h3", { className: "sy-form-section-title", children: title }),
46896
47036
  description && /* @__PURE__ */ jsx77("p", { className: "sy-form-section-description", "data-testid": "form-section-description", children: description })
46897
47037
  ] })
@@ -46979,12 +47119,12 @@ function FormGrid({
46979
47119
  }
46980
47120
 
46981
47121
  // packages/sdk/src/components/layout/FormTabs/index.tsx
46982
- import { useState as useState23 } from "react";
46983
- import { jsx as jsx79, jsxs as jsxs36 } from "react/jsx-runtime";
47122
+ import { useState as useState24 } from "react";
47123
+ import { jsx as jsx79, jsxs as jsxs37 } from "react/jsx-runtime";
46984
47124
  function FormTabs({ items, defaultActiveKey, className, tabClassName }) {
46985
- const [activeKey, setActiveKey] = useState23(defaultActiveKey || items[0]?.key || "");
47125
+ const [activeKey, setActiveKey] = useState24(defaultActiveKey || items[0]?.key || "");
46986
47126
  const activeItem = items.find((item) => item.key === activeKey);
46987
- return /* @__PURE__ */ jsxs36("div", { className: className ?? "w-full", "data-testid": "form-tabs", children: [
47127
+ return /* @__PURE__ */ jsxs37("div", { className: className ?? "w-full", "data-testid": "form-tabs", children: [
46988
47128
  /* @__PURE__ */ jsx79(
46989
47129
  "div",
46990
47130
  {
@@ -47011,10 +47151,10 @@ function FormTabs({ items, defaultActiveKey, className, tabClassName }) {
47011
47151
  }
47012
47152
 
47013
47153
  // packages/sdk/src/components/layout/FormSteps/index.tsx
47014
- import React51, { useState as useState24 } from "react";
47015
- import { jsx as jsx80, jsxs as jsxs37 } from "react/jsx-runtime";
47154
+ import React51, { useState as useState25 } from "react";
47155
+ import { jsx as jsx80, jsxs as jsxs38 } from "react/jsx-runtime";
47016
47156
  function FormSteps({ items, className, onStepChange }) {
47017
- const [currentStep, setCurrentStep] = useState24(0);
47157
+ const [currentStep, setCurrentStep] = useState25(0);
47018
47158
  const goTo = (step) => {
47019
47159
  setCurrentStep(step);
47020
47160
  onStepChange?.(step);
@@ -47029,9 +47169,9 @@ function FormSteps({ items, className, onStepChange }) {
47029
47169
  goTo(currentStep + 1);
47030
47170
  }
47031
47171
  };
47032
- return /* @__PURE__ */ jsxs37("div", { className: className ?? "w-full", "data-testid": "form-steps", children: [
47033
- /* @__PURE__ */ jsx80("div", { className: "flex items-center mb-6", "data-testid": "form-steps-indicator", children: items.map((item, index) => /* @__PURE__ */ jsxs37(React51.Fragment, { children: [
47034
- /* @__PURE__ */ jsxs37("div", { className: "flex items-center", children: [
47172
+ return /* @__PURE__ */ jsxs38("div", { className: className ?? "w-full", "data-testid": "form-steps", children: [
47173
+ /* @__PURE__ */ jsx80("div", { className: "flex items-center mb-6", "data-testid": "form-steps-indicator", children: items.map((item, index) => /* @__PURE__ */ jsxs38(React51.Fragment, { children: [
47174
+ /* @__PURE__ */ jsxs38("div", { className: "flex items-center", children: [
47035
47175
  /* @__PURE__ */ jsx80(
47036
47176
  "div",
47037
47177
  {
@@ -47040,7 +47180,7 @@ function FormSteps({ items, className, onStepChange }) {
47040
47180
  children: index + 1
47041
47181
  }
47042
47182
  ),
47043
- /* @__PURE__ */ jsxs37("div", { className: "ml-2 hidden sm:block", children: [
47183
+ /* @__PURE__ */ jsxs38("div", { className: "ml-2 hidden sm:block", children: [
47044
47184
  /* @__PURE__ */ jsx80("div", { className: "text-sm font-medium text-gray-900", children: item.title }),
47045
47185
  item.description && /* @__PURE__ */ jsx80("div", { className: "text-xs text-gray-500", children: item.description })
47046
47186
  ] })
@@ -47054,7 +47194,7 @@ function FormSteps({ items, className, onStepChange }) {
47054
47194
  )
47055
47195
  ] }, item.key)) }),
47056
47196
  /* @__PURE__ */ jsx80("div", { "data-testid": "form-steps-content", children: items[currentStep]?.children }),
47057
- /* @__PURE__ */ jsxs37("div", { className: "flex justify-between mt-6", "data-testid": "form-steps-actions", children: [
47197
+ /* @__PURE__ */ jsxs38("div", { className: "flex justify-between mt-6", "data-testid": "form-steps-actions", children: [
47058
47198
  /* @__PURE__ */ jsx80(
47059
47199
  "button",
47060
47200
  {
@@ -47094,7 +47234,7 @@ var sizeClassMap = {
47094
47234
  default: "sy-gap-y-6 sy-gap-x-6",
47095
47235
  large: "sy-gap-y-8 sy-gap-x-8"
47096
47236
  };
47097
- var defaultFullWidthComponents = /* @__PURE__ */ new Set(["SubFormField", "EditorField"]);
47237
+ var defaultFullWidthComponents = /* @__PURE__ */ new Set(["SubFormField", "EditorField", "JSONField"]);
47098
47238
  function getDefaultFieldWrapperClass(field, renderContext, hasExplicitGridColumn = false) {
47099
47239
  if (renderContext === "grid" || hasExplicitGridColumn) return void 0;
47100
47240
  return defaultFullWidthComponents.has(field.componentName) ? "sy-layout-field-full" : "sy-layout-field";
@@ -47435,7 +47575,7 @@ function FormShell({ children, appearance, className }) {
47435
47575
  }
47436
47576
 
47437
47577
  // packages/sdk/src/components/core/FormActions.tsx
47438
- import { useState as useState25, useCallback as useCallback11 } from "react";
47578
+ import { useState as useState26, useCallback as useCallback11 } from "react";
47439
47579
  import { Button as Button11 } from "antd";
47440
47580
 
47441
47581
  // packages/sdk/src/components/core/validationFeedback.ts
@@ -47469,7 +47609,7 @@ async function validateAndNotify(validateAllWithErrors) {
47469
47609
  }
47470
47610
 
47471
47611
  // packages/sdk/src/components/core/FormActions.tsx
47472
- import { jsx as jsx83, jsxs as jsxs38 } from "react/jsx-runtime";
47612
+ import { jsx as jsx83, jsxs as jsxs39 } from "react/jsx-runtime";
47473
47613
  function FormActions({
47474
47614
  className,
47475
47615
  submitText = "\u63D0\u4EA4",
@@ -47478,8 +47618,8 @@ function FormActions({
47478
47618
  onSubmit
47479
47619
  }) {
47480
47620
  const { mode, validateAllWithErrors, getFormData: getFormData2, resetForm, api, config } = useFormContext();
47481
- const [isSubmitting, setIsSubmitting] = useState25(false);
47482
- const [submitError, setSubmitError] = useState25(null);
47621
+ const [isSubmitting, setIsSubmitting] = useState26(false);
47622
+ const [submitError, setSubmitError] = useState26(null);
47483
47623
  const handleSubmit = useCallback11(async () => {
47484
47624
  setSubmitError(null);
47485
47625
  const valid = await validateAndNotify(validateAllWithErrors);
@@ -47520,7 +47660,7 @@ function FormActions({
47520
47660
  resetForm();
47521
47661
  }, [resetForm]);
47522
47662
  if (mode === "readonly") return null;
47523
- return /* @__PURE__ */ jsxs38("div", { className: className ?? "sy-form-actions", "data-testid": "form-actions", children: [
47663
+ return /* @__PURE__ */ jsxs39("div", { className: className ?? "sy-form-actions", "data-testid": "form-actions", children: [
47524
47664
  /* @__PURE__ */ jsx83(
47525
47665
  Button11,
47526
47666
  {
@@ -47547,7 +47687,7 @@ function FormActions({
47547
47687
  }
47548
47688
 
47549
47689
  // packages/sdk/src/components/core/FormContainer.tsx
47550
- import { jsx as jsx84, jsxs as jsxs39 } from "react/jsx-runtime";
47690
+ import { jsx as jsx84, jsxs as jsxs40 } from "react/jsx-runtime";
47551
47691
  function cn3(...classes) {
47552
47692
  return classes.filter(Boolean).join(" ");
47553
47693
  }
@@ -47566,8 +47706,8 @@ function FormContainer({
47566
47706
  className
47567
47707
  }) {
47568
47708
  const sizeClass = maxWidthClassMap[maxWidth];
47569
- return /* @__PURE__ */ jsxs39("div", { className: cn3("sy-form-container", sizeClass, className), children: [
47570
- (title || description) && /* @__PURE__ */ jsxs39("div", { className: "sy-form-header", children: [
47709
+ return /* @__PURE__ */ jsxs40("div", { className: cn3("sy-form-container", sizeClass, className), children: [
47710
+ (title || description) && /* @__PURE__ */ jsxs40("div", { className: "sy-form-header", children: [
47571
47711
  title && /* @__PURE__ */ jsx84("h2", { className: "sy-form-title", children: title }),
47572
47712
  description && /* @__PURE__ */ jsx84("p", { className: "sy-form-description", children: description })
47573
47713
  ] }),
@@ -48485,7 +48625,7 @@ async function getDataManagementTransferRecords(request, params) {
48485
48625
  }
48486
48626
 
48487
48627
  // packages/sdk/src/components/display/FormSummary/index.tsx
48488
- import { jsx as jsx85, jsxs as jsxs40 } from "react/jsx-runtime";
48628
+ import { jsx as jsx85, jsxs as jsxs41 } from "react/jsx-runtime";
48489
48629
  var columnClasses2 = {
48490
48630
  1: "grid-cols-1",
48491
48631
  2: "grid-cols-1 md:grid-cols-2",
@@ -48546,7 +48686,7 @@ function FormSummary({
48546
48686
  if (typeof value === "object") return formatObject(value);
48547
48687
  return String(value);
48548
48688
  };
48549
- return /* @__PURE__ */ jsx85("div", { className: className ?? `grid ${colClass} gap-4`, "data-testid": "form-summary", children: displayFields.map((field) => /* @__PURE__ */ jsxs40(
48689
+ return /* @__PURE__ */ jsx85("div", { className: className ?? `grid ${colClass} gap-4`, "data-testid": "form-summary", children: displayFields.map((field) => /* @__PURE__ */ jsxs41(
48550
48690
  "div",
48551
48691
  {
48552
48692
  className: "flex flex-col",
@@ -48561,7 +48701,7 @@ function FormSummary({
48561
48701
  }
48562
48702
 
48563
48703
  // packages/sdk/src/components/hooks/useFormEngine.ts
48564
- import { useState as useState26, useCallback as useCallback12, useMemo as useMemo22, useRef as useRef11 } from "react";
48704
+ import { useState as useState27, useCallback as useCallback12, useMemo as useMemo22, useRef as useRef12 } from "react";
48565
48705
  function useFormEngine(schema, config) {
48566
48706
  const initialValues = useMemo22(() => {
48567
48707
  const values = {};
@@ -48572,9 +48712,9 @@ function useFormEngine(schema, config) {
48572
48712
  }
48573
48713
  return values;
48574
48714
  }, [schema]);
48575
- const initialValuesRef = useRef11(initialValues);
48576
- const [formData, setFormData] = useState26({ ...initialValues });
48577
- const [fieldErrors, setFieldErrors] = useState26({});
48715
+ const initialValuesRef = useRef12(initialValues);
48716
+ const [formData, setFormData] = useState27({ ...initialValues });
48717
+ const [fieldErrors, setFieldErrors] = useState27({});
48578
48718
  const fieldBehaviors = useMemo22(() => {
48579
48719
  const baseBehaviors = {};
48580
48720
  for (const field of schema.fields) {
@@ -48647,11 +48787,11 @@ function useFormEngine(schema, config) {
48647
48787
  }
48648
48788
 
48649
48789
  // packages/sdk/src/components/hooks/useFormData.ts
48650
- import { useState as useState27, useCallback as useCallback13, useRef as useRef12 } from "react";
48790
+ import { useState as useState28, useCallback as useCallback13, useRef as useRef13 } from "react";
48651
48791
  function useFormData(initialValues = {}) {
48652
- const [formData, setFormData] = useState27({ ...initialValues });
48653
- const [dirtyFields, setDirtyFields] = useState27(/* @__PURE__ */ new Set());
48654
- const initialValuesRef = useRef12(initialValues);
48792
+ const [formData, setFormData] = useState28({ ...initialValues });
48793
+ const [dirtyFields, setDirtyFields] = useState28(/* @__PURE__ */ new Set());
48794
+ const initialValuesRef = useRef13(initialValues);
48655
48795
  const setFieldValue = useCallback13((fieldId, value) => {
48656
48796
  setFormData((prev) => ({ ...prev, [fieldId]: value }));
48657
48797
  setDirtyFields((prev) => {
@@ -48706,10 +48846,10 @@ function useFieldBehavior({
48706
48846
  }
48707
48847
 
48708
48848
  // packages/sdk/src/components/hooks/useFormSubmit.ts
48709
- import { useState as useState28, useCallback as useCallback14 } from "react";
48849
+ import { useState as useState29, useCallback as useCallback14 } from "react";
48710
48850
  function useFormSubmit(config) {
48711
- const [isSubmitting, setIsSubmitting] = useState28(false);
48712
- const [submitError, setSubmitError] = useState28(null);
48851
+ const [isSubmitting, setIsSubmitting] = useState29(false);
48852
+ const [submitError, setSubmitError] = useState29(null);
48713
48853
  const submit = useCallback14(
48714
48854
  async (formData, validateFn) => {
48715
48855
  setSubmitError(null);
@@ -48865,7 +49005,7 @@ function useFieldPermission(options) {
48865
49005
  }
48866
49006
 
48867
49007
  // packages/sdk/src/components/hooks/useFormDetail.ts
48868
- import { useState as useState29, useEffect as useEffect38, useCallback as useCallback16, useRef as useRef13 } from "react";
49008
+ import { useState as useState30, useEffect as useEffect38, useCallback as useCallback16, useRef as useRef14 } from "react";
48869
49009
 
48870
49010
  // packages/sdk/src/components/utils/formInstanceData.ts
48871
49011
  var FORM_INSTANCE_METADATA_KEYS = /* @__PURE__ */ new Set([
@@ -49024,13 +49164,13 @@ function useFormDetail(options) {
49024
49164
  const { formUuid, appType, formInstanceId, fieldIds, onPermissionDenied } = options;
49025
49165
  const { api } = useFormContext();
49026
49166
  const request = api.request;
49027
- const [loading, setLoading] = useState29(true);
49028
- const [mode, setMode] = useState29("readonly");
49029
- const [formData, setFormData] = useState29(null);
49030
- const [instanceInfo, setInstanceInfo] = useState29(null);
49031
- const [permissions, setPermissions] = useState29(null);
49032
- const mountedRef = useRef13(true);
49033
- const onPermissionDeniedRef = useRef13(onPermissionDenied);
49167
+ const [loading, setLoading] = useState30(true);
49168
+ const [mode, setMode] = useState30("readonly");
49169
+ const [formData, setFormData] = useState30(null);
49170
+ const [instanceInfo, setInstanceInfo] = useState30(null);
49171
+ const [permissions, setPermissions] = useState30(null);
49172
+ const mountedRef = useRef14(true);
49173
+ const onPermissionDeniedRef = useRef14(onPermissionDenied);
49034
49174
  const fieldIdsKey = fieldIds?.join("") ?? "";
49035
49175
  useEffect38(() => {
49036
49176
  mountedRef.current = true;
@@ -49138,7 +49278,7 @@ function useFormDetail(options) {
49138
49278
  }
49139
49279
 
49140
49280
  // packages/sdk/src/components/hooks/useProcessDetail.ts
49141
- import { useState as useState30, useEffect as useEffect39, useCallback as useCallback17, useRef as useRef14, useMemo as useMemo25 } from "react";
49281
+ import { useState as useState31, useEffect as useEffect39, useCallback as useCallback17, useRef as useRef15, useMemo as useMemo25 } from "react";
49142
49282
  var DEFAULT_APPROVAL_ACTIONS = [
49143
49283
  { action: "agree", name: { zh_CN: "\u540C\u610F" } },
49144
49284
  { action: "rejected", name: { zh_CN: "\u62D2\u7EDD" } }
@@ -49166,21 +49306,21 @@ function useProcessDetail(options) {
49166
49306
  const { formUuid, appType, formInstanceId, fieldIds } = options;
49167
49307
  const { api } = useFormContext();
49168
49308
  const request = api.request;
49169
- const [loading, setLoading] = useState30(true);
49170
- const [mode, setMode] = useState30("readonly");
49171
- const [processInfo, setProcessInfo] = useState30(null);
49172
- const [progressList, setProgressList] = useState30([]);
49173
- const [formData, setFormData] = useState30(null);
49174
- const [instanceInfo, setInstanceInfo] = useState30(null);
49175
- const [accessDenied, setAccessDenied] = useState30(false);
49176
- const [loadError, setLoadError] = useState30(null);
49177
- const [isApprover, setIsApprover] = useState30(false);
49178
- const [canWithdraw, setCanWithdraw] = useState30(false);
49179
- const [approvalTasks, setApprovalTasks] = useState30([]);
49180
- const [permissions, setPermissions] = useState30(null);
49181
- const [processDefinition, setProcessDefinition] = useState30(null);
49182
- const [dataVersion, setDataVersion] = useState30(0);
49183
- const mountedRef = useRef14(true);
49309
+ const [loading, setLoading] = useState31(true);
49310
+ const [mode, setMode] = useState31("readonly");
49311
+ const [processInfo, setProcessInfo] = useState31(null);
49312
+ const [progressList, setProgressList] = useState31([]);
49313
+ const [formData, setFormData] = useState31(null);
49314
+ const [instanceInfo, setInstanceInfo] = useState31(null);
49315
+ const [accessDenied, setAccessDenied] = useState31(false);
49316
+ const [loadError, setLoadError] = useState31(null);
49317
+ const [isApprover, setIsApprover] = useState31(false);
49318
+ const [canWithdraw, setCanWithdraw] = useState31(false);
49319
+ const [approvalTasks, setApprovalTasks] = useState31([]);
49320
+ const [permissions, setPermissions] = useState31(null);
49321
+ const [processDefinition, setProcessDefinition] = useState31(null);
49322
+ const [dataVersion, setDataVersion] = useState31(0);
49323
+ const mountedRef = useRef15(true);
49184
49324
  const fieldIdsKey = fieldIds?.join("") ?? "";
49185
49325
  useEffect39(() => {
49186
49326
  mountedRef.current = true;
@@ -49375,16 +49515,16 @@ function useProcessDetail(options) {
49375
49515
  }
49376
49516
 
49377
49517
  // packages/sdk/src/components/hooks/useApprovalActions.ts
49378
- import { useState as useState31, useCallback as useCallback18, useRef as useRef15, useEffect as useEffect40 } from "react";
49518
+ import { useState as useState32, useCallback as useCallback18, useRef as useRef16, useEffect as useEffect40 } from "react";
49379
49519
  function useApprovalActions(options) {
49380
49520
  const { formInstanceId, formUuid, appType, currentTaskId, onActionComplete, getFormValues } = options;
49381
49521
  const { api } = useFormContext();
49382
49522
  const request = api.request;
49383
- const [isLoading, setIsLoading] = useState31(false);
49384
- const [currentAction, setCurrentAction] = useState31(null);
49385
- const [returnableNodes, setReturnableNodes] = useState31([]);
49386
- const [returnPolicy, setReturnPolicy] = useState31(null);
49387
- const mountedRef = useRef15(true);
49523
+ const [isLoading, setIsLoading] = useState32(false);
49524
+ const [currentAction, setCurrentAction] = useState32(null);
49525
+ const [returnableNodes, setReturnableNodes] = useState32([]);
49526
+ const [returnPolicy, setReturnPolicy] = useState32(null);
49527
+ const mountedRef = useRef16(true);
49388
49528
  useEffect40(() => {
49389
49529
  mountedRef.current = true;
49390
49530
  return () => {
@@ -49623,7 +49763,7 @@ function useApprovalActions(options) {
49623
49763
  }
49624
49764
 
49625
49765
  // packages/sdk/src/components/hooks/useChangeRecords.ts
49626
- import { useState as useState32, useEffect as useEffect41, useCallback as useCallback19, useRef as useRef16 } from "react";
49766
+ import { useState as useState33, useEffect as useEffect41, useCallback as useCallback19, useRef as useRef17 } from "react";
49627
49767
  var normalizeChangeRecordList = (value) => {
49628
49768
  const body = value && typeof value === "object" && !Array.isArray(value) ? Array.isArray(value.data) || Array.isArray(value.records) || Array.isArray(value.list) || Array.isArray(value.items) ? value : value.data ?? value.result ?? value : value;
49629
49769
  const records = Array.isArray(body) ? body : body?.records ?? body?.data ?? body?.list ?? body?.items ?? [];
@@ -49638,11 +49778,11 @@ function useChangeRecords(options) {
49638
49778
  const { formUuid, appType, formInstanceId, pageSize = 20, autoLoad = true } = options;
49639
49779
  const { api } = useFormContext();
49640
49780
  const request = api.request;
49641
- const [records, setRecords] = useState32([]);
49642
- const [loading, setLoading] = useState32(false);
49643
- const [total, setTotal] = useState32(0);
49644
- const [page, setPage] = useState32(1);
49645
- const mountedRef = useRef16(true);
49781
+ const [records, setRecords] = useState33([]);
49782
+ const [loading, setLoading] = useState33(false);
49783
+ const [total, setTotal] = useState33(0);
49784
+ const [page, setPage] = useState33(1);
49785
+ const mountedRef = useRef17(true);
49646
49786
  useEffect41(() => {
49647
49787
  mountedRef.current = true;
49648
49788
  return () => {
@@ -49709,7 +49849,7 @@ function useChangeRecords(options) {
49709
49849
  }
49710
49850
 
49711
49851
  // packages/sdk/src/components/hooks/useFormNavigation.ts
49712
- import { useState as useState33, useCallback as useCallback20, useRef as useRef17, useEffect as useEffect42 } from "react";
49852
+ import { useState as useState34, useCallback as useCallback20, useRef as useRef18, useEffect as useEffect42 } from "react";
49713
49853
  var normalizeBasePath = (basePath) => {
49714
49854
  const normalized = String(basePath || "").replace(/^\/+|\/+$/g, "");
49715
49855
  return normalized ? `/${normalized}` : "";
@@ -49741,11 +49881,11 @@ function useFormNavigation(options) {
49741
49881
  basePath,
49742
49882
  onStay
49743
49883
  } = options;
49744
- const [isRedirecting, setIsRedirecting] = useState33(false);
49745
- const [countdown, setCountdown] = useState33(0);
49746
- const timerRef = useRef17(null);
49747
- const redirectTargetRef = useRef17(null);
49748
- const mountedRef = useRef17(true);
49884
+ const [isRedirecting, setIsRedirecting] = useState34(false);
49885
+ const [countdown, setCountdown] = useState34(0);
49886
+ const timerRef = useRef18(null);
49887
+ const redirectTargetRef = useRef18(null);
49888
+ const mountedRef = useRef18(true);
49749
49889
  useEffect42(() => {
49750
49890
  mountedRef.current = true;
49751
49891
  return () => {
@@ -49848,7 +49988,7 @@ function useFormNavigation(options) {
49848
49988
  }
49849
49989
 
49850
49990
  // packages/sdk/src/components/hooks/useDraftStorage.ts
49851
- import { useState as useState34, useCallback as useCallback21, useEffect as useEffect43 } from "react";
49991
+ import { useState as useState35, useCallback as useCallback21, useEffect as useEffect43 } from "react";
49852
49992
  function getDraftKey(appType, formUuid) {
49853
49993
  return `${appType}__${formUuid}__draft`;
49854
49994
  }
@@ -49868,9 +50008,9 @@ function readDraft(key) {
49868
50008
  function useDraftStorage(options) {
49869
50009
  const { appType, formUuid, autoRestore = false } = options;
49870
50010
  const key = getDraftKey(appType, formUuid);
49871
- const [hasDraft, setHasDraft] = useState34(false);
49872
- const [draftData, setDraftData] = useState34(null);
49873
- const [draftTimestamp, setDraftTimestamp] = useState34(null);
50011
+ const [hasDraft, setHasDraft] = useState35(false);
50012
+ const [draftData, setDraftData] = useState35(null);
50013
+ const [draftTimestamp, setDraftTimestamp] = useState35(null);
49874
50014
  useEffect43(() => {
49875
50015
  const stored = readDraft(key);
49876
50016
  if (stored) {
@@ -49933,7 +50073,7 @@ function defineFormSchema(schema) {
49933
50073
  }
49934
50074
 
49935
50075
  // packages/sdk/src/components/modules/FormSummaryCard.tsx
49936
- import { Fragment as Fragment8, jsx as jsx86, jsxs as jsxs41 } from "react/jsx-runtime";
50076
+ import { Fragment as Fragment8, jsx as jsx86, jsxs as jsxs42 } from "react/jsx-runtime";
49937
50077
  var toneClasses = {
49938
50078
  brand: "bg-blue-50 text-blue-600",
49939
50079
  success: "bg-green-50 text-green-600",
@@ -49966,11 +50106,11 @@ var FormSummaryCard = ({
49966
50106
  const initial = creator.name.charAt(0);
49967
50107
  return /* @__PURE__ */ jsx86("span", { className: "w-7 h-7 rounded-full bg-blue-100 text-blue-600 flex items-center justify-center text-xs font-medium", children: initial });
49968
50108
  };
49969
- return /* @__PURE__ */ jsxs41("div", { className: `bg-white rounded-xl shadow-sm border border-gray-100 p-6 ${className}`, children: [
49970
- /* @__PURE__ */ jsxs41("div", { className: "flex items-start justify-between", children: [
49971
- /* @__PURE__ */ jsxs41("div", { className: "min-w-0 flex-1", children: [
50109
+ return /* @__PURE__ */ jsxs42("div", { className: `bg-white rounded-xl shadow-sm border border-gray-100 p-6 ${className}`, children: [
50110
+ /* @__PURE__ */ jsxs42("div", { className: "flex items-start justify-between", children: [
50111
+ /* @__PURE__ */ jsxs42("div", { className: "min-w-0 flex-1", children: [
49972
50112
  title && /* @__PURE__ */ jsx86("h2", { className: "text-xl font-semibold text-gray-900 truncate", children: title }),
49973
- shortId && /* @__PURE__ */ jsxs41("span", { className: "text-xs text-gray-400 mt-0.5 inline-block", children: [
50113
+ shortId && /* @__PURE__ */ jsxs42("span", { className: "text-xs text-gray-400 mt-0.5 inline-block", children: [
49974
50114
  "#",
49975
50115
  shortId
49976
50116
  ] })
@@ -49983,14 +50123,14 @@ var FormSummaryCard = ({
49983
50123
  }
49984
50124
  )
49985
50125
  ] }),
49986
- creator && /* @__PURE__ */ jsxs41("div", { className: "flex items-center gap-2 mt-4 text-sm text-gray-600", children: [
50126
+ creator && /* @__PURE__ */ jsxs42("div", { className: "flex items-center gap-2 mt-4 text-sm text-gray-600", children: [
49987
50127
  renderAvatar(),
49988
50128
  /* @__PURE__ */ jsx86("span", { className: "font-medium", children: creator.name }),
49989
- creator.department && /* @__PURE__ */ jsxs41(Fragment8, { children: [
50129
+ creator.department && /* @__PURE__ */ jsxs42(Fragment8, { children: [
49990
50130
  /* @__PURE__ */ jsx86("span", { className: "text-gray-300", children: "\xB7" }),
49991
50131
  /* @__PURE__ */ jsx86("span", { children: creator.department })
49992
50132
  ] }),
49993
- createdAt && /* @__PURE__ */ jsxs41(Fragment8, { children: [
50133
+ createdAt && /* @__PURE__ */ jsxs42(Fragment8, { children: [
49994
50134
  /* @__PURE__ */ jsx86("span", { className: "text-gray-300", children: "\xB7" }),
49995
50135
  /* @__PURE__ */ jsx86("span", { className: "text-gray-400", children: createdAt })
49996
50136
  ] })
@@ -50000,7 +50140,7 @@ var FormSummaryCard = ({
50000
50140
  };
50001
50141
 
50002
50142
  // packages/sdk/src/components/modules/RecordChangePanel.tsx
50003
- import { useState as useState35 } from "react";
50143
+ import { useState as useState36 } from "react";
50004
50144
  import { Button as Button12, Empty as Empty5, Pagination as Pagination2, Skeleton, Tag as Tag6, Tooltip as Tooltip3 } from "antd";
50005
50145
  import {
50006
50146
  ArrowRightOutlined,
@@ -50009,7 +50149,7 @@ import {
50009
50149
  ReloadOutlined as ReloadOutlined3,
50010
50150
  UpOutlined
50011
50151
  } from "@ant-design/icons";
50012
- import { jsx as jsx87, jsxs as jsxs42 } from "react/jsx-runtime";
50152
+ import { jsx as jsx87, jsxs as jsxs43 } from "react/jsx-runtime";
50013
50153
  var sourceLabels = {
50014
50154
  frontend: "\u524D\u7AEF",
50015
50155
  integration: "\u96C6\u6210",
@@ -50052,20 +50192,20 @@ var RecordChangePanel = ({
50052
50192
  onPageChange,
50053
50193
  className = ""
50054
50194
  }) => {
50055
- const [expanded, setExpanded] = useState35(defaultExpanded);
50195
+ const [expanded, setExpanded] = useState36(defaultExpanded);
50056
50196
  const count = total ?? records.length;
50057
50197
  const handleToggle = () => {
50058
50198
  const next = !expanded;
50059
50199
  setExpanded(next);
50060
50200
  if (next) onExpand?.();
50061
50201
  };
50062
- return /* @__PURE__ */ jsxs42(
50202
+ return /* @__PURE__ */ jsxs43(
50063
50203
  "section",
50064
50204
  {
50065
50205
  className: `rounded-lg border border-ant-border-secondary bg-ant-bg-container ${className}`,
50066
50206
  children: [
50067
- /* @__PURE__ */ jsxs42("div", { className: "flex items-center justify-between gap-3 border-b border-ant-border-secondary px-5 py-4", children: [
50068
- /* @__PURE__ */ jsxs42(
50207
+ /* @__PURE__ */ jsxs43("div", { className: "flex items-center justify-between gap-3 border-b border-ant-border-secondary px-5 py-4", children: [
50208
+ /* @__PURE__ */ jsxs43(
50069
50209
  "button",
50070
50210
  {
50071
50211
  type: "button",
@@ -50074,7 +50214,7 @@ var RecordChangePanel = ({
50074
50214
  children: [
50075
50215
  /* @__PURE__ */ jsx87(HistoryOutlined, { className: "text-ant-primary" }),
50076
50216
  /* @__PURE__ */ jsx87("span", { className: "font-semibold text-ant-text", children: "\u53D8\u66F4\u8BB0\u5F55" }),
50077
- /* @__PURE__ */ jsxs42("span", { className: "rounded-full bg-gray-100 px-2 py-0.5 text-xs text-ant-text-tertiary", children: [
50217
+ /* @__PURE__ */ jsxs43("span", { className: "rounded-full bg-gray-100 px-2 py-0.5 text-xs text-ant-text-tertiary", children: [
50078
50218
  count,
50079
50219
  " \u6761"
50080
50220
  ] }),
@@ -50094,7 +50234,7 @@ var RecordChangePanel = ({
50094
50234
  }
50095
50235
  )
50096
50236
  ] }),
50097
- expanded ? /* @__PURE__ */ jsxs42("div", { className: "p-5", children: [
50237
+ expanded ? /* @__PURE__ */ jsxs43("div", { className: "p-5", children: [
50098
50238
  loading && records.length === 0 ? /* @__PURE__ */ jsx87(Skeleton, { active: true, paragraph: { rows: 3 } }) : records.length === 0 ? /* @__PURE__ */ jsx87(Empty5, { description: "\u6682\u65E0\u53D8\u66F4\u8BB0\u5F55" }) : /* @__PURE__ */ jsx87("div", { className: "space-y-4", children: records.map((record) => {
50099
50239
  const changes = record.changes && record.changes.length > 0 ? record.changes : [
50100
50240
  {
@@ -50106,20 +50246,20 @@ var RecordChangePanel = ({
50106
50246
  ];
50107
50247
  const operator = record.operatorName || (record.changeSource ? "\u7CFB\u7EDF" : "\u672A\u77E5");
50108
50248
  const operatedAt = record.operatedAt || record.createdAt || "-";
50109
- return /* @__PURE__ */ jsxs42(
50249
+ return /* @__PURE__ */ jsxs43(
50110
50250
  "article",
50111
50251
  {
50112
50252
  className: "rounded-md border border-ant-border-secondary p-4",
50113
50253
  children: [
50114
- /* @__PURE__ */ jsxs42("div", { className: "flex flex-wrap items-start justify-between gap-3", children: [
50115
- /* @__PURE__ */ jsxs42("div", { className: "flex min-w-0 items-center gap-3", children: [
50254
+ /* @__PURE__ */ jsxs43("div", { className: "flex flex-wrap items-start justify-between gap-3", children: [
50255
+ /* @__PURE__ */ jsxs43("div", { className: "flex min-w-0 items-center gap-3", children: [
50116
50256
  /* @__PURE__ */ jsx87("span", { className: "inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-blue-50 text-sm font-semibold text-blue-700", children: getInitial(operator) }),
50117
- /* @__PURE__ */ jsxs42("span", { className: "min-w-0", children: [
50118
- /* @__PURE__ */ jsxs42("span", { className: "block text-sm font-medium text-ant-text", children: [
50257
+ /* @__PURE__ */ jsxs43("span", { className: "min-w-0", children: [
50258
+ /* @__PURE__ */ jsxs43("span", { className: "block text-sm font-medium text-ant-text", children: [
50119
50259
  operator,
50120
50260
  record.operatorDepartmentName && /* @__PURE__ */ jsx87("span", { className: "ml-2 font-normal text-ant-text-tertiary", children: record.operatorDepartmentName })
50121
50261
  ] }),
50122
- /* @__PURE__ */ jsxs42("span", { className: "block text-xs text-ant-text-tertiary", children: [
50262
+ /* @__PURE__ */ jsxs43("span", { className: "block text-xs text-ant-text-tertiary", children: [
50123
50263
  "\u53D8\u66F4 ",
50124
50264
  record.changedCount || changes.length,
50125
50265
  " \u9879 \xB7 ",
@@ -50127,19 +50267,19 @@ var RecordChangePanel = ({
50127
50267
  ] })
50128
50268
  ] })
50129
50269
  ] }),
50130
- /* @__PURE__ */ jsxs42("span", { className: "flex flex-wrap justify-end gap-2", children: [
50270
+ /* @__PURE__ */ jsxs43("span", { className: "flex flex-wrap justify-end gap-2", children: [
50131
50271
  record.changeType && /* @__PURE__ */ jsx87(Tag6, { children: typeLabels[record.changeType] || record.changeType }),
50132
50272
  record.changeSource && /* @__PURE__ */ jsx87(Tag6, { color: "blue", children: sourceLabels[record.changeSource] || record.changeSource }),
50133
50273
  record.operationId && /* @__PURE__ */ jsx87(Tooltip3, { title: `\u64CD\u4F5CID\uFF1A${record.operationId}`, children: /* @__PURE__ */ jsx87(Tag6, { children: record.operationId.slice(0, 8) }) })
50134
50274
  ] })
50135
50275
  ] }),
50136
- /* @__PURE__ */ jsx87("div", { className: "mt-4 space-y-3", children: changes.map((change) => /* @__PURE__ */ jsxs42(
50276
+ /* @__PURE__ */ jsx87("div", { className: "mt-4 space-y-3", children: changes.map((change) => /* @__PURE__ */ jsxs43(
50137
50277
  "div",
50138
50278
  {
50139
50279
  className: "grid gap-2 md:grid-cols-[160px_1fr]",
50140
50280
  children: [
50141
50281
  /* @__PURE__ */ jsx87("div", { className: "text-sm font-medium text-ant-text-secondary", children: change.fieldLabel || change.fieldKey || "-" }),
50142
- /* @__PURE__ */ jsxs42("div", { className: "grid min-w-0 grid-cols-[1fr_auto_1fr] items-start gap-2 text-sm", children: [
50282
+ /* @__PURE__ */ jsxs43("div", { className: "grid min-w-0 grid-cols-[1fr_auto_1fr] items-start gap-2 text-sm", children: [
50143
50283
  /* @__PURE__ */ jsx87("div", { className: "min-w-0 rounded bg-red-50 px-2 py-1 text-red-700", children: formatValue(change.beforeValue) }),
50144
50284
  /* @__PURE__ */ jsx87(ArrowRightOutlined, { className: "mt-1 text-xs text-ant-text-tertiary" }),
50145
50285
  /* @__PURE__ */ jsx87("div", { className: "min-w-0 rounded bg-emerald-50 px-2 py-1 text-emerald-700", children: formatValue(change.afterValue) })
@@ -50171,7 +50311,7 @@ var RecordChangePanel = ({
50171
50311
  };
50172
50312
 
50173
50313
  // packages/sdk/src/components/modules/ChangeRecords.tsx
50174
- import { jsx as jsx88, jsxs as jsxs43 } from "react/jsx-runtime";
50314
+ import { jsx as jsx88, jsxs as jsxs44 } from "react/jsx-runtime";
50175
50315
  var ChangeRecords = ({
50176
50316
  records = [],
50177
50317
  loading = false,
@@ -50183,13 +50323,13 @@ var ChangeRecords = ({
50183
50323
  renderItem
50184
50324
  }) => {
50185
50325
  if (renderItem) {
50186
- return /* @__PURE__ */ jsxs43(
50326
+ return /* @__PURE__ */ jsxs44(
50187
50327
  "section",
50188
50328
  {
50189
50329
  className: `rounded-lg border border-ant-border-secondary bg-ant-bg-container ${className}`,
50190
50330
  children: [
50191
50331
  /* @__PURE__ */ jsx88("div", { className: "border-b border-ant-border-secondary px-5 py-4 font-semibold", children: "\u53D8\u66F4\u8BB0\u5F55" }),
50192
- /* @__PURE__ */ jsxs43("div", { className: "p-5", children: [
50332
+ /* @__PURE__ */ jsxs44("div", { className: "p-5", children: [
50193
50333
  records.length === 0 ? /* @__PURE__ */ jsx88("p", { className: "m-0 text-center text-sm text-ant-text-tertiary", children: loading ? "\u52A0\u8F7D\u4E2D..." : "\u6682\u65E0\u53D8\u66F4\u8BB0\u5F55" }) : /* @__PURE__ */ jsx88("div", { className: "space-y-2", children: records.map((record) => /* @__PURE__ */ jsx88("div", { children: renderItem(record) }, record.id)) }),
50194
50334
  hasMore && /* @__PURE__ */ jsx88(
50195
50335
  "button",
@@ -50238,7 +50378,7 @@ import {
50238
50378
  RollbackOutlined,
50239
50379
  UserOutlined as UserOutlined3
50240
50380
  } from "@ant-design/icons";
50241
- import { jsx as jsx89, jsxs as jsxs44 } from "react/jsx-runtime";
50381
+ import { jsx as jsx89, jsxs as jsxs45 } from "react/jsx-runtime";
50242
50382
  var systemNodeTypes = /* @__PURE__ */ new Set([
50243
50383
  "condition",
50244
50384
  "condition_branch",
@@ -50408,7 +50548,7 @@ var ApprovalTimeline = ({
50408
50548
  const statusMeta = getStatusMeta(node, state, compact);
50409
50549
  const title = getNodeTitle(node);
50410
50550
  const time = node.actionAt || node.createdAt;
50411
- return /* @__PURE__ */ jsxs44(
50551
+ return /* @__PURE__ */ jsxs45(
50412
50552
  "div",
50413
50553
  {
50414
50554
  className: `relative flex gap-4 pb-5 ${isLast ? "pb-0" : ""}`,
@@ -50426,13 +50566,13 @@ var ApprovalTimeline = ({
50426
50566
  children: getIcon(node, state)
50427
50567
  }
50428
50568
  ),
50429
- /* @__PURE__ */ jsx89("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ jsxs44(
50569
+ /* @__PURE__ */ jsx89("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ jsxs45(
50430
50570
  "div",
50431
50571
  {
50432
50572
  className: `rounded-lg border p-4 ${state === "current" ? "border-blue-300 bg-blue-50/60" : state === "future" ? "border-dashed border-gray-200 bg-gray-50/70" : "border-ant-border-secondary bg-ant-bg-container"}`,
50433
50573
  children: [
50434
- /* @__PURE__ */ jsxs44("div", { className: "flex flex-wrap items-start justify-between gap-2", children: [
50435
- /* @__PURE__ */ jsxs44("div", { className: "flex min-w-0 flex-wrap items-center gap-2", children: [
50574
+ /* @__PURE__ */ jsxs45("div", { className: "flex flex-wrap items-start justify-between gap-2", children: [
50575
+ /* @__PURE__ */ jsxs45("div", { className: "flex min-w-0 flex-wrap items-center gap-2", children: [
50436
50576
  /* @__PURE__ */ jsx89("span", { className: "font-medium text-ant-text", children: title }),
50437
50577
  /* @__PURE__ */ jsx89(
50438
50578
  "span",
@@ -50445,15 +50585,15 @@ var ApprovalTimeline = ({
50445
50585
  ] }),
50446
50586
  !isFutureGroup && time && /* @__PURE__ */ jsx89("span", { className: "text-xs text-ant-text-tertiary", children: time })
50447
50587
  ] }),
50448
- showApproverInfo && !compact && group.length > 0 && /* @__PURE__ */ jsxs44("div", { className: "mt-3 flex flex-wrap gap-3", children: [
50588
+ showApproverInfo && !compact && group.length > 0 && /* @__PURE__ */ jsxs45("div", { className: "mt-3 flex flex-wrap gap-3", children: [
50449
50589
  /* @__PURE__ */ jsx89("span", { className: "w-full text-xs font-medium text-ant-text-tertiary", children: state === "current" || state === "waiting" ? "\u5F53\u524D\u5BA1\u6279\u4EBA" : "\u5904\u7406\u4EBA" }),
50450
- group.map((assignee) => /* @__PURE__ */ jsxs44(
50590
+ group.map((assignee) => /* @__PURE__ */ jsxs45(
50451
50591
  "span",
50452
50592
  {
50453
50593
  className: "inline-flex min-w-0 items-center gap-2",
50454
50594
  children: [
50455
50595
  /* @__PURE__ */ jsx89("span", { className: "inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-full bg-blue-50 text-xs font-semibold text-blue-700", children: assignee.assigneeName?.slice(0, 1) || "?" }),
50456
- /* @__PURE__ */ jsxs44("span", { className: "min-w-0", children: [
50596
+ /* @__PURE__ */ jsxs45("span", { className: "min-w-0", children: [
50457
50597
  /* @__PURE__ */ jsx89("span", { className: "block text-sm font-medium text-ant-text", children: assignee.assigneeName || "\u7CFB\u7EDF" }),
50458
50598
  /* @__PURE__ */ jsx89("span", { className: "block text-xs text-ant-text-tertiary", children: assignee.departmentName || assignee.actionAt || assignee.createdAt || "" })
50459
50599
  ] })
@@ -50481,8 +50621,8 @@ var ApprovalTimeline = ({
50481
50621
  };
50482
50622
 
50483
50623
  // packages/sdk/src/components/modules/ApprovalActionBar.tsx
50484
- import React58, { useMemo as useMemo28, useState as useState37 } from "react";
50485
- import { Form as Form3, Input as Input11, Modal as Modal7, Select as Select6 } from "antd";
50624
+ import React58, { useMemo as useMemo28, useState as useState38 } from "react";
50625
+ import { Form as Form3, Input as Input12, Modal as Modal7, Select as Select6 } from "antd";
50486
50626
  import {
50487
50627
  CheckOutlined,
50488
50628
  CloseOutlined as CloseOutlined3,
@@ -50492,7 +50632,7 @@ import {
50492
50632
  } from "@ant-design/icons";
50493
50633
 
50494
50634
  // packages/sdk/src/components/modules/StickyActionBar.tsx
50495
- import { useEffect as useEffect44, useMemo as useMemo27, useState as useState36 } from "react";
50635
+ import { useEffect as useEffect44, useMemo as useMemo27, useState as useState37 } from "react";
50496
50636
  import { Button as Button13, Dropdown, Tooltip as Tooltip4 } from "antd";
50497
50637
  import { MoreOutlined } from "@ant-design/icons";
50498
50638
 
@@ -50510,7 +50650,7 @@ var confirmAction = (title, content) => {
50510
50650
  };
50511
50651
 
50512
50652
  // packages/sdk/src/components/modules/StickyActionBar.tsx
50513
- import { Fragment as Fragment9, jsx as jsx90, jsxs as jsxs45 } from "react/jsx-runtime";
50653
+ import { Fragment as Fragment9, jsx as jsx90, jsxs as jsxs46 } from "react/jsx-runtime";
50514
50654
  var getActionPriority = (action) => {
50515
50655
  const maybePriority = action.priority;
50516
50656
  if (typeof maybePriority === "number") return maybePriority;
@@ -50528,7 +50668,7 @@ var StickyActionBar = ({
50528
50668
  position = "sticky",
50529
50669
  surface = "default"
50530
50670
  }) => {
50531
- const [isMobile, setIsMobile] = useState36(false);
50671
+ const [isMobile, setIsMobile] = useState37(false);
50532
50672
  useEffect44(() => {
50533
50673
  const update = () => setIsMobile(typeof window !== "undefined" && window.innerWidth <= 768);
50534
50674
  update();
@@ -50578,7 +50718,7 @@ var StickyActionBar = ({
50578
50718
  {
50579
50719
  className: `mx-auto flex w-full items-center gap-3 ${!isMobile ? desktopJustifyClass : "justify-end"}`,
50580
50720
  style: { maxWidth: maxWidthStyle },
50581
- children: isMobile ? /* @__PURE__ */ jsxs45(Fragment9, { children: [
50721
+ children: isMobile ? /* @__PURE__ */ jsxs46(Fragment9, { children: [
50582
50722
  /* @__PURE__ */ jsx90("div", { className: "flex flex-1 gap-2", children: primaryMobile.map((action) => renderButton(action, true)) }),
50583
50723
  moreMobile.length > 0 && /* @__PURE__ */ jsx90(
50584
50724
  Dropdown,
@@ -50604,7 +50744,7 @@ var StickyActionBar = ({
50604
50744
  };
50605
50745
 
50606
50746
  // packages/sdk/src/components/modules/ApprovalActionBar.tsx
50607
- import { Fragment as Fragment10, jsx as jsx91, jsxs as jsxs46 } from "react/jsx-runtime";
50747
+ import { Fragment as Fragment10, jsx as jsx91, jsxs as jsxs47 } from "react/jsx-runtime";
50608
50748
  var actionPriority = {
50609
50749
  agree: 10,
50610
50750
  approved: 10,
@@ -50658,12 +50798,12 @@ function DefaultTransferSelector({
50658
50798
  const { isMobile } = useDeviceDetect();
50659
50799
  const fallbackApi = useMemo28(() => createFormRuntimeApi(), []);
50660
50800
  const api = formContext?.api ?? fallbackApi;
50661
- const [open, setOpen] = useState37(false);
50662
- const [selectedUsers, setSelectedUsers] = useState37([]);
50801
+ const [open, setOpen] = useState38(false);
50802
+ const [selectedUsers, setSelectedUsers] = useState38([]);
50663
50803
  const selectedLabel = selectedUsers[0] ? getUserName(selectedUsers[0]) : value;
50664
- return /* @__PURE__ */ jsxs46(Fragment10, { children: [
50804
+ return /* @__PURE__ */ jsxs47(Fragment10, { children: [
50665
50805
  /* @__PURE__ */ jsx91(
50666
- Input11,
50806
+ Input12,
50667
50807
  {
50668
50808
  readOnly: true,
50669
50809
  value: selectedLabel,
@@ -50714,9 +50854,9 @@ var ApprovalActionBar = ({
50714
50854
  maxWidth
50715
50855
  }) => {
50716
50856
  const [form] = Form3.useForm();
50717
- const [modalAction, setModalAction] = useState37(null);
50718
- const [activeAction, setActiveAction] = useState37(null);
50719
- const [loading, setLoading] = useState37(false);
50857
+ const [modalAction, setModalAction] = useState38(null);
50858
+ const [activeAction, setActiveAction] = useState38(null);
50859
+ const [loading, setLoading] = useState38(false);
50720
50860
  const visibleActions = useMemo28(
50721
50861
  () => actions.filter((action) => !action.hidden).sort((a, b) => (actionPriority[a.action] ?? 50) - (actionPriority[b.action] ?? 50)),
50722
50862
  [actions]
@@ -50805,7 +50945,7 @@ var ApprovalActionBar = ({
50805
50945
  };
50806
50946
  });
50807
50947
  const requiredComment = activeAction?.remark?.required || modalAction === "rejected" || modalAction === "withdraw";
50808
- return /* @__PURE__ */ jsxs46(Fragment10, { children: [
50948
+ return /* @__PURE__ */ jsxs47(Fragment10, { children: [
50809
50949
  /* @__PURE__ */ jsx91(
50810
50950
  StickyActionBar,
50811
50951
  {
@@ -50833,7 +50973,7 @@ var ApprovalActionBar = ({
50833
50973
  form.resetFields();
50834
50974
  },
50835
50975
  destroyOnHidden: true,
50836
- children: /* @__PURE__ */ jsxs46(Form3, { form, layout: "vertical", children: [
50976
+ children: /* @__PURE__ */ jsxs47(Form3, { form, layout: "vertical", children: [
50837
50977
  modalAction === "transfer" && /* @__PURE__ */ jsx91(
50838
50978
  Form3.Item,
50839
50979
  {
@@ -50852,8 +50992,8 @@ var ApprovalActionBar = ({
50852
50992
  )
50853
50993
  }
50854
50994
  ),
50855
- modalAction === "return" && /* @__PURE__ */ jsxs46(Fragment10, { children: [
50856
- formatReturnPolicy(returnPolicy) && /* @__PURE__ */ jsxs46("div", { className: "mb-3 text-sm text-gray-500", children: [
50995
+ modalAction === "return" && /* @__PURE__ */ jsxs47(Fragment10, { children: [
50996
+ formatReturnPolicy(returnPolicy) && /* @__PURE__ */ jsxs47("div", { className: "mb-3 text-sm text-gray-500", children: [
50857
50997
  "\u9000\u56DE\u540E\u5BA1\u6279\u903B\u8F91\uFF1A",
50858
50998
  formatReturnPolicy(returnPolicy)
50859
50999
  ] }),
@@ -50883,7 +51023,7 @@ var ApprovalActionBar = ({
50883
51023
  name: modalAction === "withdraw" || modalAction === "transfer" || modalAction === "return" ? "reason" : "comments",
50884
51024
  label: modalAction === "withdraw" ? "\u64A4\u9500\u539F\u56E0" : modalAction === "transfer" ? "\u8F6C\u4EA4\u539F\u56E0" : modalAction === "return" ? "\u9000\u56DE\u539F\u56E0" : "\u5BA1\u6279\u610F\u89C1",
50885
51025
  rules: [{ required: requiredComment, message: "\u8BF7\u586B\u5199\u8BF4\u660E" }],
50886
- children: /* @__PURE__ */ jsx91(Input11.TextArea, { rows: 4, maxLength: 500, showCount: true, placeholder: "\u8BF7\u8F93\u5165\u8BF4\u660E" })
51026
+ children: /* @__PURE__ */ jsx91(Input12.TextArea, { rows: 4, maxLength: 500, showCount: true, placeholder: "\u8BF7\u8F93\u5165\u8BF4\u660E" })
50887
51027
  }
50888
51028
  ),
50889
51029
  activeAction && renderActionModalExtra?.(activeAction)
@@ -50894,10 +51034,10 @@ var ApprovalActionBar = ({
50894
51034
  };
50895
51035
 
50896
51036
  // packages/sdk/src/components/modules/ApprovalActions.tsx
50897
- import { useMemo as useMemo29, useState as useState38 } from "react";
50898
- import { Button as Button14, Dropdown as Dropdown2, Form as Form4, Input as Input12, Modal as Modal8 } from "antd";
51037
+ import { useMemo as useMemo29, useState as useState39 } from "react";
51038
+ import { Button as Button14, Dropdown as Dropdown2, Form as Form4, Input as Input13, Modal as Modal8 } from "antd";
50899
51039
  import { MoreOutlined as MoreOutlined2 } from "@ant-design/icons";
50900
- import { Fragment as Fragment11, jsx as jsx92, jsxs as jsxs47 } from "react/jsx-runtime";
51040
+ import { Fragment as Fragment11, jsx as jsx92, jsxs as jsxs48 } from "react/jsx-runtime";
50901
51041
  var priority = {
50902
51042
  agree: 10,
50903
51043
  approved: 10,
@@ -50922,10 +51062,10 @@ var ApprovalActions = ({
50922
51062
  className = ""
50923
51063
  }) => {
50924
51064
  const [form] = Form4.useForm();
50925
- const [modalAction, setModalAction] = useState38(null);
50926
- const [activeAction, setActiveAction] = useState38(null);
50927
- const [loading, setLoading] = useState38(false);
50928
- const [saveLoading, setSaveLoading] = useState38(false);
51065
+ const [modalAction, setModalAction] = useState39(null);
51066
+ const [activeAction, setActiveAction] = useState39(null);
51067
+ const [loading, setLoading] = useState39(false);
51068
+ const [saveLoading, setSaveLoading] = useState39(false);
50929
51069
  const renderableActions = useMemo29(
50930
51070
  () => actions.filter((action) => !action.hidden).sort((a, b) => (priority[a.action] ?? 50) - (priority[b.action] ?? 50)),
50931
51071
  [actions]
@@ -50994,8 +51134,8 @@ var ApprovalActions = ({
50994
51134
  },
50995
51135
  action.action
50996
51136
  );
50997
- return /* @__PURE__ */ jsxs47(Fragment11, { children: [
50998
- /* @__PURE__ */ jsxs47(
51137
+ return /* @__PURE__ */ jsxs48(Fragment11, { children: [
51138
+ /* @__PURE__ */ jsxs48(
50999
51139
  "div",
51000
51140
  {
51001
51141
  className: `${layout === "horizontal" ? "flex items-center justify-center gap-3" : "flex flex-col items-center gap-2"} ${className}`,
@@ -51047,7 +51187,7 @@ var ApprovalActions = ({
51047
51187
  message: "\u8BF7\u586B\u5199\u8BF4\u660E"
51048
51188
  }
51049
51189
  ],
51050
- children: /* @__PURE__ */ jsx92(Input12.TextArea, { rows: 4, maxLength: 500, showCount: true, placeholder: "\u8BF7\u8F93\u5165\u8BF4\u660E" })
51190
+ children: /* @__PURE__ */ jsx92(Input13.TextArea, { rows: 4, maxLength: 500, showCount: true, placeholder: "\u8BF7\u8F93\u5165\u8BF4\u660E" })
51051
51191
  }
51052
51192
  ) })
51053
51193
  }
@@ -51056,15 +51196,15 @@ var ApprovalActions = ({
51056
51196
  };
51057
51197
 
51058
51198
  // packages/sdk/src/components/modules/FormActionBar.tsx
51059
- import { useState as useState39 } from "react";
51199
+ import { useState as useState40 } from "react";
51060
51200
  import { Button as Button15 } from "antd";
51061
- import { Fragment as Fragment12, jsx as jsx93, jsxs as jsxs48 } from "react/jsx-runtime";
51201
+ import { Fragment as Fragment12, jsx as jsx93, jsxs as jsxs49 } from "react/jsx-runtime";
51062
51202
  var FormActionBar = ({
51063
51203
  actions,
51064
51204
  position = "bottom-fixed",
51065
51205
  className = ""
51066
51206
  }) => {
51067
- const [loadingKeys, setLoadingKeys] = useState39(/* @__PURE__ */ new Set());
51207
+ const [loadingKeys, setLoadingKeys] = useState40(/* @__PURE__ */ new Set());
51068
51208
  const visibleActions = actions.filter((a) => a.visible !== false);
51069
51209
  const sortedActions = [...visibleActions].sort((a, b) => {
51070
51210
  if (a.type === "danger" && b.type !== "danger") return -1;
@@ -51119,7 +51259,7 @@ var FormActionBar = ({
51119
51259
  }
51120
51260
  );
51121
51261
  if (isFixed) {
51122
- return /* @__PURE__ */ jsxs48(Fragment12, { children: [
51262
+ return /* @__PURE__ */ jsxs49(Fragment12, { children: [
51123
51263
  bar,
51124
51264
  /* @__PURE__ */ jsx93("div", { className: "h-16" })
51125
51265
  ] });
@@ -51129,7 +51269,7 @@ var FormActionBar = ({
51129
51269
 
51130
51270
  // packages/sdk/src/components/modules/RuntimePageShell.tsx
51131
51271
  import { Alert as Alert4, Empty as Empty6, Spin as Spin8 } from "antd";
51132
- import { Fragment as Fragment13, jsx as jsx94, jsxs as jsxs49 } from "react/jsx-runtime";
51272
+ import { Fragment as Fragment13, jsx as jsx94, jsxs as jsxs50 } from "react/jsx-runtime";
51133
51273
  var RuntimePageShell = ({
51134
51274
  children,
51135
51275
  actions,
@@ -51159,7 +51299,7 @@ var RuntimePageShell = ({
51159
51299
  }
51160
51300
  return children;
51161
51301
  };
51162
- return /* @__PURE__ */ jsxs49(
51302
+ return /* @__PURE__ */ jsxs50(
51163
51303
  "div",
51164
51304
  {
51165
51305
  className: `sy-runtime-page flex min-h-screen flex-col bg-ant-bg-layout text-ant-text ${className}`,
@@ -51181,7 +51321,7 @@ var RuntimePageShell = ({
51181
51321
  // packages/sdk/src/components/modules/SummaryPanel.tsx
51182
51322
  import { Avatar as Avatar2 } from "antd";
51183
51323
  import { ApartmentOutlined as ApartmentOutlined2, CalendarOutlined as CalendarOutlined2, FileTextOutlined as FileTextOutlined4 } from "@ant-design/icons";
51184
- import { jsx as jsx95, jsxs as jsxs50 } from "react/jsx-runtime";
51324
+ import { jsx as jsx95, jsxs as jsxs51 } from "react/jsx-runtime";
51185
51325
  var toneClasses3 = {
51186
51326
  brand: "bg-blue-50 text-blue-700 border-blue-200",
51187
51327
  success: "bg-emerald-50 text-emerald-700 border-emerald-200",
@@ -51228,9 +51368,9 @@ var SummaryPanel = ({
51228
51368
  "section",
51229
51369
  {
51230
51370
  className: `rounded-lg border border-ant-border-secondary bg-ant-bg-container ${className}`,
51231
- children: /* @__PURE__ */ jsxs50("div", { className: "sy-summary-panel-content p-5 md:p-6", children: [
51232
- (showEyebrow || status) && /* @__PURE__ */ jsxs50("div", { className: "sy-summary-status-row mb-2 flex items-center justify-between gap-3", children: [
51233
- showEyebrow ? /* @__PURE__ */ jsx95("div", { className: "min-w-0 text-sm text-ant-text-tertiary", children: eyebrow || /* @__PURE__ */ jsxs50("span", { className: "inline-flex items-center gap-2", children: [
51371
+ children: /* @__PURE__ */ jsxs51("div", { className: "sy-summary-panel-content p-5 md:p-6", children: [
51372
+ (showEyebrow || status) && /* @__PURE__ */ jsxs51("div", { className: "sy-summary-status-row mb-2 flex items-center justify-between gap-3", children: [
51373
+ showEyebrow ? /* @__PURE__ */ jsx95("div", { className: "min-w-0 text-sm text-ant-text-tertiary", children: eyebrow || /* @__PURE__ */ jsxs51("span", { className: "inline-flex items-center gap-2", children: [
51234
51374
  /* @__PURE__ */ jsx95(FileTextOutlined4, {}),
51235
51375
  "\u6570\u636E\u5B9E\u4F8B"
51236
51376
  ] }) }) : /* @__PURE__ */ jsx95("span", {}),
@@ -51243,16 +51383,16 @@ var SummaryPanel = ({
51243
51383
  )
51244
51384
  ] }),
51245
51385
  /* @__PURE__ */ jsx95("h1", { className: "sy-summary-title m-0 break-words text-2xl font-semibold leading-9 text-ant-text md:text-[28px]", children: title }),
51246
- showMobileIdentity && /* @__PURE__ */ jsxs50("div", { className: "sy-summary-mobile-identity", children: [
51247
- creator && /* @__PURE__ */ jsxs50("div", { className: "sy-summary-mobile-person", children: [
51386
+ showMobileIdentity && /* @__PURE__ */ jsxs51("div", { className: "sy-summary-mobile-identity", children: [
51387
+ creator && /* @__PURE__ */ jsxs51("div", { className: "sy-summary-mobile-person", children: [
51248
51388
  /* @__PURE__ */ jsx95("span", { className: "sy-summary-mobile-avatar", children: creator.avatar ? /* @__PURE__ */ jsx95(Avatar2, { size: 22, src: creator.avatar }) : /* @__PURE__ */ jsx95(Avatar2, { size: 22, children: creator.name?.slice(0, 1) || "\u8868" }) }),
51249
51389
  /* @__PURE__ */ jsx95("span", { className: "sy-summary-mobile-person-name", children: mobileCreatorText })
51250
51390
  ] }),
51251
51391
  createdAt && /* @__PURE__ */ jsx95("div", { className: "sy-summary-mobile-time", children: createdAt })
51252
51392
  ] }),
51253
- items.length > 0 && /* @__PURE__ */ jsx95("div", { className: "sy-summary-meta-list mt-5 grid grid-cols-1 gap-4 md:grid-cols-4", children: items.map((item) => /* @__PURE__ */ jsxs50("div", { className: "sy-summary-meta-item flex min-w-0 items-center gap-3", children: [
51393
+ items.length > 0 && /* @__PURE__ */ jsx95("div", { className: "sy-summary-meta-list mt-5 grid grid-cols-1 gap-4 md:grid-cols-4", children: items.map((item) => /* @__PURE__ */ jsxs51("div", { className: "sy-summary-meta-item flex min-w-0 items-center gap-3", children: [
51254
51394
  item.icon && /* @__PURE__ */ jsx95("span", { className: "sy-summary-meta-icon inline-flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-gray-100 text-ant-text-secondary", children: item.icon }),
51255
- /* @__PURE__ */ jsxs50("span", { className: "sy-summary-meta-body min-w-0", children: [
51395
+ /* @__PURE__ */ jsxs51("span", { className: "sy-summary-meta-body min-w-0", children: [
51256
51396
  /* @__PURE__ */ jsx95("span", { className: "sy-summary-meta-label block text-xs leading-5 text-ant-text-tertiary", children: item.label }),
51257
51397
  /* @__PURE__ */ jsx95("span", { className: "sy-summary-meta-value block break-words text-sm font-medium leading-6 text-ant-text", children: item.value || "-" })
51258
51398
  ] })
@@ -51266,7 +51406,7 @@ var SummaryPanel = ({
51266
51406
  // packages/sdk/src/components/modules/DraftManager.tsx
51267
51407
  import { Button as Button16 } from "antd";
51268
51408
  import { EditOutlined as EditOutlined2 } from "@ant-design/icons";
51269
- import { jsx as jsx96, jsxs as jsxs51 } from "react/jsx-runtime";
51409
+ import { jsx as jsx96, jsxs as jsxs52 } from "react/jsx-runtime";
51270
51410
  function formatRelativeTime(timestamp) {
51271
51411
  const now = Date.now();
51272
51412
  const diff = now - timestamp;
@@ -51291,19 +51431,19 @@ var DraftManager = ({
51291
51431
  "div",
51292
51432
  {
51293
51433
  className: `bg-blue-50 border border-blue-200 rounded-lg p-4 animate-[slideDown_0.3s_ease-out] ${className}`,
51294
- children: /* @__PURE__ */ jsxs51("div", { className: "flex items-center justify-between flex-wrap gap-3", children: [
51295
- /* @__PURE__ */ jsxs51("div", { className: "flex items-center gap-2 text-sm text-blue-700", children: [
51434
+ children: /* @__PURE__ */ jsxs52("div", { className: "flex items-center justify-between flex-wrap gap-3", children: [
51435
+ /* @__PURE__ */ jsxs52("div", { className: "flex items-center gap-2 text-sm text-blue-700", children: [
51296
51436
  /* @__PURE__ */ jsx96(EditOutlined2, { className: "text-blue-500" }),
51297
- /* @__PURE__ */ jsxs51("span", { children: [
51437
+ /* @__PURE__ */ jsxs52("span", { children: [
51298
51438
  "\u68C0\u6D4B\u5230\u672A\u63D0\u4EA4\u7684\u8349\u7A3F",
51299
- timeLabel && /* @__PURE__ */ jsxs51("span", { className: "text-blue-500 ml-1", children: [
51439
+ timeLabel && /* @__PURE__ */ jsxs52("span", { className: "text-blue-500 ml-1", children: [
51300
51440
  "\uFF08\u4FDD\u5B58\u4E8E ",
51301
51441
  timeLabel,
51302
51442
  "\uFF09"
51303
51443
  ] })
51304
51444
  ] })
51305
51445
  ] }),
51306
- /* @__PURE__ */ jsxs51("div", { className: "flex items-center gap-2", children: [
51446
+ /* @__PURE__ */ jsxs52("div", { className: "flex items-center gap-2", children: [
51307
51447
  /* @__PURE__ */ jsx96(Button16, { type: "text", size: "small", onClick: onDiscard, className: "!text-gray-500", children: "\u4E22\u5F03" }),
51308
51448
  /* @__PURE__ */ jsx96(Button16, { type: "primary", size: "small", onClick: onRestore, children: "\u6062\u590D\u586B\u5199" })
51309
51449
  ] })
@@ -51315,7 +51455,7 @@ var DraftManager = ({
51315
51455
  // packages/sdk/src/components/modules/ProcessPreview.tsx
51316
51456
  import { Modal as Modal9, Skeleton as Skeleton2, Button as Button17 } from "antd";
51317
51457
  import { CheckCircleOutlined, UserOutlined as UserOutlined4 } from "@ant-design/icons";
51318
- import { jsx as jsx97, jsxs as jsxs52 } from "react/jsx-runtime";
51458
+ import { jsx as jsx97, jsxs as jsxs53 } from "react/jsx-runtime";
51319
51459
  var ProcessPreview = ({
51320
51460
  open,
51321
51461
  onClose,
@@ -51332,20 +51472,20 @@ var ProcessPreview = ({
51332
51472
  open,
51333
51473
  onCancel: onClose,
51334
51474
  width: 520,
51335
- footer: /* @__PURE__ */ jsxs52("div", { className: "flex justify-end gap-3", children: [
51475
+ footer: /* @__PURE__ */ jsxs53("div", { className: "flex justify-end gap-3", children: [
51336
51476
  /* @__PURE__ */ jsx97(Button17, { onClick: onClose, children: "\u53D6\u6D88" }),
51337
51477
  /* @__PURE__ */ jsx97(Button17, { type: "primary", onClick: onConfirm, loading, children: "\u786E\u8BA4\u63D0\u4EA4" })
51338
51478
  ] }),
51339
51479
  children: loading && routeList.length === 0 ? /* @__PURE__ */ jsx97(Skeleton2, { active: true, paragraph: { rows: 4 } }) : routeList.length === 0 ? /* @__PURE__ */ jsx97("p", { className: "text-sm text-gray-400 text-center py-8", children: "\u6682\u65E0\u6D41\u7A0B\u8282\u70B9" }) : /* @__PURE__ */ jsx97("div", { className: "py-2", children: routeList.map((route, index) => {
51340
51480
  const isLast = index === routeList.length - 1;
51341
- return /* @__PURE__ */ jsxs52("div", { className: "flex gap-3", children: [
51342
- /* @__PURE__ */ jsxs52("div", { className: "flex flex-col items-center", children: [
51481
+ return /* @__PURE__ */ jsxs53("div", { className: "flex gap-3", children: [
51482
+ /* @__PURE__ */ jsxs53("div", { className: "flex flex-col items-center", children: [
51343
51483
  /* @__PURE__ */ jsx97("div", { className: "w-6 h-6 rounded-full bg-blue-50 border-2 border-blue-400 flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ jsx97(CheckCircleOutlined, { className: "text-blue-500 text-xs" }) }),
51344
51484
  !isLast && /* @__PURE__ */ jsx97("div", { className: "w-0.5 flex-1 bg-blue-200 mt-1" })
51345
51485
  ] }),
51346
- /* @__PURE__ */ jsxs52("div", { className: `flex-1 ${isLast ? "pb-0" : "pb-5"}`, children: [
51486
+ /* @__PURE__ */ jsxs53("div", { className: `flex-1 ${isLast ? "pb-0" : "pb-5"}`, children: [
51347
51487
  /* @__PURE__ */ jsx97("div", { className: "text-sm font-medium text-gray-900", children: route.nodeName }),
51348
- route.assignees && route.assignees.length > 0 && /* @__PURE__ */ jsxs52("div", { className: "mt-1 flex items-center gap-1.5 flex-wrap", children: [
51488
+ route.assignees && route.assignees.length > 0 && /* @__PURE__ */ jsxs53("div", { className: "mt-1 flex items-center gap-1.5 flex-wrap", children: [
51349
51489
  /* @__PURE__ */ jsx97(UserOutlined4, { className: "text-gray-400 text-xs" }),
51350
51490
  route.assignees.map((assignee) => /* @__PURE__ */ jsx97(
51351
51491
  "span",
@@ -51364,7 +51504,7 @@ var ProcessPreview = ({
51364
51504
  };
51365
51505
 
51366
51506
  // packages/sdk/src/components/modules/DataManagementList.tsx
51367
- import { useCallback as useCallback26, useEffect as useEffect47, useMemo as useMemo34, useRef as useRef22, useState as useState44 } from "react";
51507
+ import { useCallback as useCallback26, useEffect as useEffect47, useMemo as useMemo34, useRef as useRef23, useState as useState45 } from "react";
51368
51508
  import {
51369
51509
  Alert as Alert5,
51370
51510
  Button as Button20,
@@ -51376,7 +51516,7 @@ import {
51376
51516
  Drawer as Drawer2,
51377
51517
  Dropdown as Dropdown3,
51378
51518
  Empty as Empty8,
51379
- Input as Input14,
51519
+ Input as Input15,
51380
51520
  InputNumber as InputNumber3,
51381
51521
  Modal as Modal13,
51382
51522
  Segmented,
@@ -51406,38 +51546,38 @@ import {
51406
51546
  import { useMemo as useMemo33 } from "react";
51407
51547
 
51408
51548
  // packages/sdk/src/components/templates/FormDetailTemplate.tsx
51409
- import { useCallback as useCallback22, useMemo as useMemo30, useRef as useRef18, useState as useState40 } from "react";
51549
+ import { useCallback as useCallback22, useMemo as useMemo30, useRef as useRef19, useState as useState41 } from "react";
51410
51550
  import dayjs9 from "dayjs";
51411
51551
 
51412
51552
  // packages/sdk/src/components/templates/PageSkeleton.tsx
51413
51553
  import { Skeleton as Skeleton3 } from "antd";
51414
- import { jsx as jsx98, jsxs as jsxs53 } from "react/jsx-runtime";
51554
+ import { jsx as jsx98, jsxs as jsxs54 } from "react/jsx-runtime";
51415
51555
  var CardSkeleton = ({ children }) => /* @__PURE__ */ jsx98("div", { className: "bg-white rounded-xl shadow-sm border border-gray-100 p-6", children });
51416
- var SummaryCardSkeleton = () => /* @__PURE__ */ jsxs53(CardSkeleton, { children: [
51417
- /* @__PURE__ */ jsxs53("div", { className: "flex items-start justify-between", children: [
51418
- /* @__PURE__ */ jsxs53("div", { className: "flex-1", children: [
51556
+ var SummaryCardSkeleton = () => /* @__PURE__ */ jsxs54(CardSkeleton, { children: [
51557
+ /* @__PURE__ */ jsxs54("div", { className: "flex items-start justify-between", children: [
51558
+ /* @__PURE__ */ jsxs54("div", { className: "flex-1", children: [
51419
51559
  /* @__PURE__ */ jsx98(Skeleton3.Input, { active: true, size: "large", style: { width: 200 } }),
51420
51560
  /* @__PURE__ */ jsx98("div", { className: "mt-2", children: /* @__PURE__ */ jsx98(Skeleton3.Input, { active: true, size: "small", style: { width: 80 } }) })
51421
51561
  ] }),
51422
51562
  /* @__PURE__ */ jsx98(Skeleton3.Button, { active: true, size: "small", shape: "round", style: { width: 60 } })
51423
51563
  ] }),
51424
- /* @__PURE__ */ jsxs53("div", { className: "flex items-center gap-3 mt-4", children: [
51564
+ /* @__PURE__ */ jsxs54("div", { className: "flex items-center gap-3 mt-4", children: [
51425
51565
  /* @__PURE__ */ jsx98(Skeleton3.Avatar, { active: true, size: "small" }),
51426
51566
  /* @__PURE__ */ jsx98(Skeleton3.Input, { active: true, size: "small", style: { width: 120 } })
51427
51567
  ] })
51428
51568
  ] });
51429
- var FormGridSkeleton = () => /* @__PURE__ */ jsx98(CardSkeleton, { children: /* @__PURE__ */ jsx98("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-5", children: Array.from({ length: 6 }).map((_, i) => /* @__PURE__ */ jsxs53("div", { className: "space-y-2", children: [
51569
+ var FormGridSkeleton = () => /* @__PURE__ */ jsx98(CardSkeleton, { children: /* @__PURE__ */ jsx98("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-5", children: Array.from({ length: 6 }).map((_, i) => /* @__PURE__ */ jsxs54("div", { className: "space-y-2", children: [
51430
51570
  /* @__PURE__ */ jsx98(Skeleton3.Input, { active: true, size: "small", style: { width: 80 } }),
51431
51571
  /* @__PURE__ */ jsx98(Skeleton3.Input, { active: true, block: true, style: { width: "100%" } })
51432
51572
  ] }, i)) }) });
51433
- var ActionBarSkeleton = () => /* @__PURE__ */ jsx98("div", { className: "fixed bottom-0 left-0 right-0 backdrop-blur-lg bg-white/80 border-t border-gray-200 px-6 py-3", children: /* @__PURE__ */ jsxs53("div", { className: "flex items-center justify-end gap-3", children: [
51573
+ var ActionBarSkeleton = () => /* @__PURE__ */ jsx98("div", { className: "fixed bottom-0 left-0 right-0 backdrop-blur-lg bg-white/80 border-t border-gray-200 px-6 py-3", children: /* @__PURE__ */ jsxs54("div", { className: "flex items-center justify-end gap-3", children: [
51434
51574
  /* @__PURE__ */ jsx98(Skeleton3.Button, { active: true, style: { width: 80 } }),
51435
51575
  /* @__PURE__ */ jsx98(Skeleton3.Button, { active: true, style: { width: 80 } })
51436
51576
  ] }) });
51437
- var TimelineSkeleton = () => /* @__PURE__ */ jsxs53(CardSkeleton, { children: [
51577
+ var TimelineSkeleton = () => /* @__PURE__ */ jsxs54(CardSkeleton, { children: [
51438
51578
  /* @__PURE__ */ jsx98(Skeleton3.Input, { active: true, size: "medium", style: { width: 100, marginBottom: 16 } }),
51439
- /* @__PURE__ */ jsx98("div", { className: "space-y-4", children: Array.from({ length: 3 }).map((_, i) => /* @__PURE__ */ jsxs53("div", { className: "flex gap-4", children: [
51440
- /* @__PURE__ */ jsxs53("div", { className: "flex flex-col items-center", children: [
51579
+ /* @__PURE__ */ jsx98("div", { className: "space-y-4", children: Array.from({ length: 3 }).map((_, i) => /* @__PURE__ */ jsxs54("div", { className: "flex gap-4", children: [
51580
+ /* @__PURE__ */ jsxs54("div", { className: "flex flex-col items-center", children: [
51441
51581
  /* @__PURE__ */ jsx98("div", { className: "w-3 h-3 rounded-full bg-gray-200 animate-pulse" }),
51442
51582
  i < 2 && /* @__PURE__ */ jsx98("div", { className: "w-0.5 flex-1 bg-gray-200 mt-1" })
51443
51583
  ] }),
@@ -51446,8 +51586,8 @@ var TimelineSkeleton = () => /* @__PURE__ */ jsxs53(CardSkeleton, { children: [
51446
51586
  ] });
51447
51587
  var PageSkeleton = ({ type }) => {
51448
51588
  if (type === "submit") {
51449
- return /* @__PURE__ */ jsxs53("div", { className: "space-y-6", children: [
51450
- /* @__PURE__ */ jsxs53("div", { className: "space-y-2", children: [
51589
+ return /* @__PURE__ */ jsxs54("div", { className: "space-y-6", children: [
51590
+ /* @__PURE__ */ jsxs54("div", { className: "space-y-2", children: [
51451
51591
  /* @__PURE__ */ jsx98(Skeleton3.Input, { active: true, size: "large", style: { width: 200 } }),
51452
51592
  /* @__PURE__ */ jsx98(Skeleton3.Input, { active: true, size: "small", style: { width: 300 } })
51453
51593
  ] }),
@@ -51456,13 +51596,13 @@ var PageSkeleton = ({ type }) => {
51456
51596
  ] });
51457
51597
  }
51458
51598
  if (type === "detail") {
51459
- return /* @__PURE__ */ jsxs53("div", { className: "space-y-6", children: [
51599
+ return /* @__PURE__ */ jsxs54("div", { className: "space-y-6", children: [
51460
51600
  /* @__PURE__ */ jsx98(SummaryCardSkeleton, {}),
51461
51601
  /* @__PURE__ */ jsx98(FormGridSkeleton, {}),
51462
51602
  /* @__PURE__ */ jsx98(ActionBarSkeleton, {})
51463
51603
  ] });
51464
51604
  }
51465
- return /* @__PURE__ */ jsxs53("div", { className: "space-y-6", children: [
51605
+ return /* @__PURE__ */ jsxs54("div", { className: "space-y-6", children: [
51466
51606
  /* @__PURE__ */ jsx98(SummaryCardSkeleton, {}),
51467
51607
  /* @__PURE__ */ jsx98(FormGridSkeleton, {}),
51468
51608
  /* @__PURE__ */ jsx98(TimelineSkeleton, {}),
@@ -51471,7 +51611,7 @@ var PageSkeleton = ({ type }) => {
51471
51611
  };
51472
51612
 
51473
51613
  // packages/sdk/src/components/templates/FormDetailTemplate.tsx
51474
- import { jsx as jsx99, jsxs as jsxs54 } from "react/jsx-runtime";
51614
+ import { jsx as jsx99, jsxs as jsxs55 } from "react/jsx-runtime";
51475
51615
  function FormDataBridge({
51476
51616
  formDataRef,
51477
51617
  validateRef
@@ -51500,11 +51640,12 @@ var InnerDetailContent = ({
51500
51640
  renderActions,
51501
51641
  onDelete,
51502
51642
  onSave,
51643
+ components,
51503
51644
  inDrawer = false
51504
51645
  }) => {
51505
- const formDataRef = useRef18(void 0);
51506
- const validateRef = useRef18(void 0);
51507
- const [accessDenied, setAccessDenied] = useState40(false);
51646
+ const formDataRef = useRef19(void 0);
51647
+ const validateRef = useRef19(void 0);
51648
+ const [accessDenied, setAccessDenied] = useState41(false);
51508
51649
  const fieldIds = useMemo30(() => schema.fields.map((field) => field.fieldId), [schema.fields]);
51509
51650
  const {
51510
51651
  loading,
@@ -51595,7 +51736,7 @@ var InnerDetailContent = ({
51595
51736
  return /* @__PURE__ */ jsx99("div", { className: "min-h-screen bg-ant-bg-layout", children: /* @__PURE__ */ jsx99("div", { className: "max-w-4xl mx-auto py-8 px-6 pb-24", children: /* @__PURE__ */ jsx99(PageSkeleton, { type: "detail" }) }) });
51596
51737
  }
51597
51738
  const actionsNode = currentActions.length > 0 ? renderActions ? renderActions(currentActions) : /* @__PURE__ */ jsx99(StickyActionBar, { actions: currentActions, align: "center", inDrawer }) : null;
51598
- return /* @__PURE__ */ jsxs54(
51739
+ return /* @__PURE__ */ jsxs55(
51599
51740
  RuntimePageShell,
51600
51741
  {
51601
51742
  actions: actionsNode,
@@ -51604,7 +51745,7 @@ var InnerDetailContent = ({
51604
51745
  inDrawer,
51605
51746
  maxWidth: "100%",
51606
51747
  children: [
51607
- /* @__PURE__ */ jsx99("div", { className: "sy-detail-header", children: /* @__PURE__ */ jsxs54("div", { className: "sy-detail-header-inner", children: [
51748
+ /* @__PURE__ */ jsx99("div", { className: "sy-detail-header", children: /* @__PURE__ */ jsxs55("div", { className: "sy-detail-header-inner", children: [
51608
51749
  header,
51609
51750
  renderSummary && instanceInfo ? renderSummary(instanceInfo) : /* @__PURE__ */ jsx99(
51610
51751
  SummaryPanel,
@@ -51639,18 +51780,27 @@ var InnerDetailContent = ({
51639
51780
  }
51640
51781
  )
51641
51782
  ] }) }),
51642
- /* @__PURE__ */ jsxs54("div", { className: "sy-detail-main", children: [
51783
+ /* @__PURE__ */ jsxs55("div", { className: "sy-detail-main", children: [
51643
51784
  mode === "edit" && /* @__PURE__ */ jsx99("div", { className: "bg-blue-50 border border-blue-200 rounded-lg px-4 py-3 text-sm text-blue-700 transition-all duration-150", children: "\u6B63\u5728\u7F16\u8F91\uFF0C\u4FEE\u6539\u540E\u8BF7\u4FDD\u5B58" }),
51644
- /* @__PURE__ */ jsx99("div", { className: "sy-detail-card", children: /* @__PURE__ */ jsx99(FormProvider, { schema, config: formConfig, initialValues: formData ?? void 0, children: /* @__PURE__ */ jsxs54(FormShell, { appearance: schema.template?.appearance, className: "sy-form-shell", children: [
51645
- /* @__PURE__ */ jsx99(FormDataBridge, { formDataRef, validateRef }),
51646
- /* @__PURE__ */ jsx99(
51647
- FormRenderer,
51648
- {
51649
- columns: schema.template?.appearance?.columns ?? 2,
51650
- size: schema.template?.appearance?.rendererSize ?? "default"
51651
- }
51652
- )
51653
- ] }) }) }),
51785
+ /* @__PURE__ */ jsx99("div", { className: "sy-detail-card", children: /* @__PURE__ */ jsx99(
51786
+ FormProvider,
51787
+ {
51788
+ schema,
51789
+ config: formConfig,
51790
+ initialValues: formData ?? void 0,
51791
+ components,
51792
+ children: /* @__PURE__ */ jsxs55(FormShell, { appearance: schema.template?.appearance, className: "sy-form-shell", children: [
51793
+ /* @__PURE__ */ jsx99(FormDataBridge, { formDataRef, validateRef }),
51794
+ /* @__PURE__ */ jsx99(
51795
+ FormRenderer,
51796
+ {
51797
+ columns: schema.template?.appearance?.columns ?? 2,
51798
+ size: schema.template?.appearance?.rendererSize ?? "default"
51799
+ }
51800
+ )
51801
+ ] })
51802
+ }
51803
+ ) }),
51654
51804
  enableChangeRecords && canViewChangeRecords && /* @__PURE__ */ jsx99("div", { className: "mt-6", children: /* @__PURE__ */ jsx99(
51655
51805
  RecordChangePanel,
51656
51806
  {
@@ -51671,25 +51821,25 @@ var InnerDetailContent = ({
51671
51821
  );
51672
51822
  };
51673
51823
  var FormDetailTemplate = (props) => {
51674
- const { schema, formUuid, appType, formInstanceId } = props;
51824
+ const { schema, formUuid, appType, formInstanceId, components } = props;
51675
51825
  const wrapperConfig = {
51676
51826
  mode: "readonly",
51677
51827
  formUuid,
51678
51828
  appType,
51679
51829
  formInstanceId
51680
51830
  };
51681
- return /* @__PURE__ */ jsx99(FormProvider, { schema, config: wrapperConfig, children: /* @__PURE__ */ jsx99(InnerDetailContent, { ...props }) });
51831
+ return /* @__PURE__ */ jsx99(FormProvider, { schema, config: wrapperConfig, components, children: /* @__PURE__ */ jsx99(InnerDetailContent, { ...props }) });
51682
51832
  };
51683
51833
 
51684
51834
  // packages/sdk/src/components/templates/FormSubmitTemplate.tsx
51685
- import { useEffect as useEffect46, useRef as useRef20, useState as useState42, useCallback as useCallback24 } from "react";
51835
+ import { useEffect as useEffect46, useRef as useRef21, useState as useState43, useCallback as useCallback24 } from "react";
51686
51836
  import { Button as Button19, message as message3, Modal as Modal11, Select as Select8 } from "antd";
51687
51837
  import { CheckCircleFilled as CheckCircleFilled2 } from "@ant-design/icons";
51688
51838
 
51689
51839
  // packages/sdk/src/components/modules/InitiatorApproverSelector.tsx
51690
- import { useCallback as useCallback23, useEffect as useEffect45, useMemo as useMemo31, useRef as useRef19, useState as useState41 } from "react";
51840
+ import { useCallback as useCallback23, useEffect as useEffect45, useMemo as useMemo31, useRef as useRef20, useState as useState42 } from "react";
51691
51841
  import { Button as Button18, Empty as Empty7, Modal as Modal10, Select as Select7, Space as Space8, Tag as Tag7, Typography as Typography4, message as message2 } from "antd";
51692
- import { jsx as jsx100, jsxs as jsxs55 } from "react/jsx-runtime";
51842
+ import { jsx as jsx100, jsxs as jsxs56 } from "react/jsx-runtime";
51693
51843
  var scopeText = {
51694
51844
  all: "\u5168\u90E8\u6210\u5458",
51695
51845
  members: "\u6307\u5B9A\u6210\u5458",
@@ -51723,13 +51873,13 @@ var RequirementSelect = ({
51723
51873
  selectedUsers,
51724
51874
  onChange
51725
51875
  }) => {
51726
- const [pickerOpen, setPickerOpen] = useState41(false);
51876
+ const [pickerOpen, setPickerOpen] = useState42(false);
51727
51877
  const initialCandidates = useMemo31(
51728
51878
  () => (requirement.candidateUsers || []).map(normalizeCandidate).filter(Boolean),
51729
51879
  [requirement.candidateUsers]
51730
51880
  );
51731
- const [optionsSource, setOptionsSource] = useState41(initialCandidates);
51732
- const [loading, setLoading] = useState41(false);
51881
+ const [optionsSource, setOptionsSource] = useState42(initialCandidates);
51882
+ const [loading, setLoading] = useState42(false);
51733
51883
  useEffect45(() => {
51734
51884
  setOptionsSource(
51735
51885
  (current) => mergeUsers(initialCandidates, mergeUsers(current, selectedUsers))
@@ -51786,11 +51936,11 @@ var RequirementSelect = ({
51786
51936
  [optionsSource]
51787
51937
  );
51788
51938
  if (requirement.scope === "all") {
51789
- return /* @__PURE__ */ jsxs55("div", { className: "rounded-lg border border-ant-border-secondary bg-ant-bg-container p-3", children: [
51790
- /* @__PURE__ */ jsxs55("div", { className: "mb-2 flex items-start justify-between gap-3", children: [
51791
- /* @__PURE__ */ jsxs55("div", { children: [
51939
+ return /* @__PURE__ */ jsxs56("div", { className: "rounded-lg border border-ant-border-secondary bg-ant-bg-container p-3", children: [
51940
+ /* @__PURE__ */ jsxs56("div", { className: "mb-2 flex items-start justify-between gap-3", children: [
51941
+ /* @__PURE__ */ jsxs56("div", { children: [
51792
51942
  /* @__PURE__ */ jsx100(Typography4.Text, { strong: true, children: requirement.nodeName }),
51793
- /* @__PURE__ */ jsxs55("div", { className: "mt-1 text-xs text-ant-color-text-tertiary", children: [
51943
+ /* @__PURE__ */ jsxs56("div", { className: "mt-1 text-xs text-ant-color-text-tertiary", children: [
51794
51944
  "\u9009\u62E9\u8303\u56F4\uFF1A",
51795
51945
  scopeText[requirement.scope] || "\u5168\u90E8\u6210\u5458"
51796
51946
  ] })
@@ -51818,10 +51968,10 @@ var RequirementSelect = ({
51818
51968
  )
51819
51969
  ] });
51820
51970
  }
51821
- return /* @__PURE__ */ jsxs55("div", { className: "rounded-lg border border-ant-border-secondary bg-ant-bg-container p-3", children: [
51822
- /* @__PURE__ */ jsxs55("div", { className: "mb-2", children: [
51971
+ return /* @__PURE__ */ jsxs56("div", { className: "rounded-lg border border-ant-border-secondary bg-ant-bg-container p-3", children: [
51972
+ /* @__PURE__ */ jsxs56("div", { className: "mb-2", children: [
51823
51973
  /* @__PURE__ */ jsx100(Typography4.Text, { strong: true, children: requirement.nodeName }),
51824
- /* @__PURE__ */ jsxs55("div", { className: "mt-1 text-xs text-ant-color-text-tertiary", children: [
51974
+ /* @__PURE__ */ jsxs56("div", { className: "mt-1 text-xs text-ant-color-text-tertiary", children: [
51825
51975
  "\u9009\u62E9\u8303\u56F4\uFF1A",
51826
51976
  scopeText[requirement.scope] || "\u5168\u90E8\u6210\u5458"
51827
51977
  ] })
@@ -51863,8 +52013,8 @@ var InitiatorApproverSelector = ({
51863
52013
  onOk,
51864
52014
  onCancel
51865
52015
  }) => {
51866
- const [selected, setSelected] = useState41({});
51867
- const wasOpenRef = useRef19(false);
52016
+ const [selected, setSelected] = useState42({});
52017
+ const wasOpenRef = useRef20(false);
51868
52018
  useEffect45(() => {
51869
52019
  if (open && !wasOpenRef.current) {
51870
52020
  setSelected(value || EMPTY_SELECTED_MAP);
@@ -51910,7 +52060,7 @@ var InitiatorApproverSelector = ({
51910
52060
  };
51911
52061
 
51912
52062
  // packages/sdk/src/components/templates/FormSubmitTemplate.tsx
51913
- import { Fragment as Fragment14, jsx as jsx101, jsxs as jsxs56 } from "react/jsx-runtime";
52063
+ import { Fragment as Fragment14, jsx as jsx101, jsxs as jsxs57 } from "react/jsx-runtime";
51914
52064
  var SUPERVISOR_APPROVER_TYPE = "ext_target_approval_department_supervisor";
51915
52065
  var unwrapRuntimePayload2 = (value) => value?.data ?? value?.result ?? value;
51916
52066
  var normalizeSubmitFormType = (value) => {
@@ -52001,16 +52151,16 @@ var SubmitSuccessCard = ({
52001
52151
  if (renderSuccess) {
52002
52152
  return /* @__PURE__ */ jsx101(Fragment14, { children: renderSuccess(info) });
52003
52153
  }
52004
- return /* @__PURE__ */ jsx101("div", { className: "bg-white rounded-xl shadow-sm border border-gray-100 p-6", children: /* @__PURE__ */ jsxs56("div", { className: "flex flex-col items-center py-16 animate-[fadeIn_0.3s_ease-out,scaleIn_0.3s_ease-out]", children: [
52154
+ return /* @__PURE__ */ jsx101("div", { className: "bg-white rounded-xl shadow-sm border border-gray-100 p-6", children: /* @__PURE__ */ jsxs57("div", { className: "flex flex-col items-center py-16 animate-[fadeIn_0.3s_ease-out,scaleIn_0.3s_ease-out]", children: [
52005
52155
  /* @__PURE__ */ jsx101("div", { className: "w-12 h-12 rounded-full bg-green-100 flex items-center justify-center mb-4", children: /* @__PURE__ */ jsx101(CheckCircleFilled2, { className: "text-2xl text-green-500" }) }),
52006
52156
  /* @__PURE__ */ jsx101("h2", { className: "text-lg font-semibold text-gray-900 mb-1", children: "\u63D0\u4EA4\u6210\u529F" }),
52007
52157
  /* @__PURE__ */ jsx101("p", { className: "text-sm text-gray-500 mb-6", children: info.message || "\u5DF2\u6210\u529F\u521B\u5EFA\u4E00\u6761\u65B0\u8BB0\u5F55" }),
52008
- /* @__PURE__ */ jsxs56("div", { className: "flex gap-3", children: [
52158
+ /* @__PURE__ */ jsxs57("div", { className: "flex gap-3", children: [
52009
52159
  (mode === "stay" || mode === "redirect") && /* @__PURE__ */ jsx101(Button19, { onClick: onContinue, children: "\u7EE7\u7EED\u63D0\u4EA4" }),
52010
52160
  /* @__PURE__ */ jsx101(Button19, { type: "primary", onClick: onViewDetail, children: "\u67E5\u770B\u8BE6\u60C5" })
52011
52161
  ] }),
52012
- isRedirecting && /* @__PURE__ */ jsxs56("div", { className: "mt-6 w-48", children: [
52013
- /* @__PURE__ */ jsxs56("div", { className: "text-xs text-gray-400 text-center mb-1", children: [
52162
+ isRedirecting && /* @__PURE__ */ jsxs57("div", { className: "mt-6 w-48", children: [
52163
+ /* @__PURE__ */ jsxs57("div", { className: "text-xs text-gray-400 text-center mb-1", children: [
52014
52164
  countdown,
52015
52165
  "\u79D2\u540E\u81EA\u52A8\u8DF3\u8F6C"
52016
52166
  ] }),
@@ -52044,26 +52194,26 @@ var InnerFormContent = ({
52044
52194
  inDrawer = false
52045
52195
  }) => {
52046
52196
  const { validateAllWithErrors, getFormData: getFormData2, setFieldValue, resetForm, api } = useFormContext();
52047
- const [submitted, setSubmitted] = useState42(false);
52048
- const [successInfo, setSuccessInfo] = useState42(null);
52049
- const [submitting, setSubmitting] = useState42(false);
52050
- const [departmentId, setDepartmentId] = useState42();
52051
- const [submissionDepartmentModalOpen, setSubmissionDepartmentModalOpen] = useState42(false);
52052
- const [submissionDepartmentOptions, setSubmissionDepartmentOptions] = useState42([]);
52053
- const [selectedSubmissionDepartmentId, setSelectedSubmissionDepartmentId] = useState42();
52054
- const submissionDepartmentResolverRef = useRef20(null);
52055
- const [previewOpen, setPreviewOpen] = useState42(false);
52056
- const [previewLoading, setPreviewLoading] = useState42(false);
52057
- const [previewRoutes, setPreviewRoutes] = useState42([]);
52058
- const [pendingFormData, setPendingFormData] = useState42(null);
52059
- const [pendingSubmissionDepartmentId, setPendingSubmissionDepartmentId] = useState42();
52060
- const [pendingInitiatorSelectedApprovers, setPendingInitiatorSelectedApprovers] = useState42();
52061
- const pendingSubmissionDepartmentIdRef = useRef20(void 0);
52062
- const pendingInitiatorSelectedApproversRef = useRef20(
52197
+ const [submitted, setSubmitted] = useState43(false);
52198
+ const [successInfo, setSuccessInfo] = useState43(null);
52199
+ const [submitting, setSubmitting] = useState43(false);
52200
+ const [departmentId, setDepartmentId] = useState43();
52201
+ const [submissionDepartmentModalOpen, setSubmissionDepartmentModalOpen] = useState43(false);
52202
+ const [submissionDepartmentOptions, setSubmissionDepartmentOptions] = useState43([]);
52203
+ const [selectedSubmissionDepartmentId, setSelectedSubmissionDepartmentId] = useState43();
52204
+ const submissionDepartmentResolverRef = useRef21(null);
52205
+ const [previewOpen, setPreviewOpen] = useState43(false);
52206
+ const [previewLoading, setPreviewLoading] = useState43(false);
52207
+ const [previewRoutes, setPreviewRoutes] = useState43([]);
52208
+ const [pendingFormData, setPendingFormData] = useState43(null);
52209
+ const [pendingSubmissionDepartmentId, setPendingSubmissionDepartmentId] = useState43();
52210
+ const [pendingInitiatorSelectedApprovers, setPendingInitiatorSelectedApprovers] = useState43();
52211
+ const pendingSubmissionDepartmentIdRef = useRef21(void 0);
52212
+ const pendingInitiatorSelectedApproversRef = useRef21(
52063
52213
  void 0
52064
52214
  );
52065
- const [initiatorApproverOpen, setInitiatorApproverOpen] = useState42(false);
52066
- const [initiatorApproverRequirements, setInitiatorApproverRequirements] = useState42([]);
52215
+ const [initiatorApproverOpen, setInitiatorApproverOpen] = useState43(false);
52216
+ const [initiatorApproverRequirements, setInitiatorApproverRequirements] = useState43([]);
52067
52217
  const { hasDraft, draftTimestamp, saveDraft, restoreDraft, clearDraft } = useDraftStorage({
52068
52218
  appType: config.appType,
52069
52219
  formUuid: config.formUuid
@@ -52371,7 +52521,7 @@ var InnerFormContent = ({
52371
52521
  loading: submitting,
52372
52522
  onClick: prepareSubmit
52373
52523
  });
52374
- const departmentSelector = formType === "process" && enableSubmissionDepartmentSelect ? /* @__PURE__ */ jsxs56("div", { className: "mb-5 rounded-lg border border-ant-border-secondary bg-ant-bg-elevated px-4 py-3", children: [
52524
+ const departmentSelector = formType === "process" && enableSubmissionDepartmentSelect ? /* @__PURE__ */ jsxs57("div", { className: "mb-5 rounded-lg border border-ant-border-secondary bg-ant-bg-elevated px-4 py-3", children: [
52375
52525
  /* @__PURE__ */ jsx101("div", { className: "mb-2 text-sm font-medium text-ant-color-text", children: "\u63D0\u4EA4\u90E8\u95E8" }),
52376
52526
  renderDepartmentSelector ? renderDepartmentSelector({
52377
52527
  value: departmentId,
@@ -52400,7 +52550,7 @@ var InnerFormContent = ({
52400
52550
  className: "mt-auto pt-6"
52401
52551
  }
52402
52552
  ) : null;
52403
- return /* @__PURE__ */ jsxs56(
52553
+ return /* @__PURE__ */ jsxs57(
52404
52554
  RuntimePageShell,
52405
52555
  {
52406
52556
  className: "sy-submit-runtime-page",
@@ -52408,7 +52558,7 @@ var InnerFormContent = ({
52408
52558
  maxWidth: inDrawer ? "100%" : 1240,
52409
52559
  contentClassName: inDrawer ? "md:px-5 md:py-4" : "",
52410
52560
  children: [
52411
- /* @__PURE__ */ jsxs56("div", { className: "sy-submit-page flex min-h-full flex-1 flex-col space-y-6", children: [
52561
+ /* @__PURE__ */ jsxs57("div", { className: "sy-submit-page flex min-h-full flex-1 flex-col space-y-6", children: [
52412
52562
  header,
52413
52563
  enableDraft && hasDraft && !submitted && /* @__PURE__ */ jsx101("div", { children: /* @__PURE__ */ jsx101(
52414
52564
  DraftManager,
@@ -52423,7 +52573,7 @@ var InnerFormContent = ({
52423
52573
  "div",
52424
52574
  {
52425
52575
  className: `sy-submit-card flex flex-1 flex-col rounded-lg border border-ant-border-secondary bg-ant-bg-container ${inDrawer ? "p-5 md:p-6" : "p-6 shadow-sm md:p-8"}`,
52426
- children: /* @__PURE__ */ jsxs56(
52576
+ children: /* @__PURE__ */ jsxs57(
52427
52577
  FormShell,
52428
52578
  {
52429
52579
  appearance: schema.template?.appearance,
@@ -52539,39 +52689,49 @@ var FormSubmitTemplate = ({
52539
52689
  renderSuccess,
52540
52690
  onSubmitSuccess,
52541
52691
  initialValues,
52692
+ components,
52542
52693
  inDrawer = false
52543
52694
  }) => {
52544
52695
  const resolvedFormType = normalizeSubmitFormType(formType);
52545
52696
  const resolvedEnableProcessPreview = enableProcessPreview ?? schema.template?.enableProcessPreview ?? resolvedFormType === "process";
52546
- return /* @__PURE__ */ jsx101(FormProvider, { schema, config, initialValues, children: /* @__PURE__ */ jsx101(
52547
- InnerFormContent,
52697
+ return /* @__PURE__ */ jsx101(
52698
+ FormProvider,
52548
52699
  {
52549
52700
  schema,
52550
52701
  config,
52551
- formType: resolvedFormType,
52552
- submitSuccessMode,
52553
- enableDraft,
52554
- enableProcessPreview: resolvedEnableProcessPreview,
52555
- enableSubmissionDepartmentSelect,
52556
- departmentOptions,
52557
- header,
52558
- footer,
52559
- beforeForm,
52560
- afterForm,
52561
- renderDepartmentSelector,
52562
- renderForm,
52563
- renderSuccess,
52564
- onSubmitSuccess,
52565
- inDrawer
52702
+ initialValues,
52703
+ components,
52704
+ children: /* @__PURE__ */ jsx101(
52705
+ InnerFormContent,
52706
+ {
52707
+ schema,
52708
+ config,
52709
+ formType: resolvedFormType,
52710
+ submitSuccessMode,
52711
+ enableDraft,
52712
+ enableProcessPreview: resolvedEnableProcessPreview,
52713
+ enableSubmissionDepartmentSelect,
52714
+ departmentOptions,
52715
+ header,
52716
+ footer,
52717
+ beforeForm,
52718
+ afterForm,
52719
+ renderDepartmentSelector,
52720
+ renderForm,
52721
+ renderSuccess,
52722
+ onSubmitSuccess,
52723
+ inDrawer
52724
+ }
52725
+ )
52566
52726
  }
52567
- ) });
52727
+ );
52568
52728
  };
52569
52729
 
52570
52730
  // packages/sdk/src/components/templates/ProcessDetailTemplate.tsx
52571
- import { useCallback as useCallback25, useMemo as useMemo32, useRef as useRef21, useState as useState43 } from "react";
52731
+ import { useCallback as useCallback25, useMemo as useMemo32, useRef as useRef22, useState as useState44 } from "react";
52572
52732
  import dayjs10 from "dayjs";
52573
- import { Form as AntForm, Input as Input13, Modal as Modal12, message as message4 } from "antd";
52574
- import { jsx as jsx102, jsxs as jsxs57 } from "react/jsx-runtime";
52733
+ import { Form as AntForm, Input as Input14, Modal as Modal12, message as message4 } from "antd";
52734
+ import { jsx as jsx102, jsxs as jsxs58 } from "react/jsx-runtime";
52575
52735
  function FormDataBridge2({
52576
52736
  formDataRef,
52577
52737
  validateRef
@@ -52622,7 +52782,7 @@ function ProcessStatusStamp({ status }) {
52622
52782
  "aria-label": `\u6D41\u7A0B\u72B6\u6001\uFF1A${stamp.label}`,
52623
52783
  className: `sy-process-status-stamp sy-process-status-stamp-${stamp.tone}`,
52624
52784
  role: "img",
52625
- children: /* @__PURE__ */ jsxs57("span", { className: "sy-process-status-stamp-ring", children: [
52785
+ children: /* @__PURE__ */ jsxs58("span", { className: "sy-process-status-stamp-ring", children: [
52626
52786
  STAMP_STAR_POINTS.map((point, index) => /* @__PURE__ */ jsx102(
52627
52787
  "span",
52628
52788
  {
@@ -52659,18 +52819,19 @@ var InnerProcessContent = ({
52659
52819
  onActionComplete,
52660
52820
  onSave,
52661
52821
  onDelete,
52822
+ components,
52662
52823
  inDrawer = false
52663
52824
  }) => {
52664
- const formDataRef = useRef21(void 0);
52665
- const validateRef = useRef21(void 0);
52825
+ const formDataRef = useRef22(void 0);
52826
+ const validateRef = useRef22(void 0);
52666
52827
  const [withdrawForm] = AntForm.useForm();
52667
- const [withdrawOpen, setWithdrawOpen] = useState43(false);
52668
- const [withdrawLoading, setWithdrawLoading] = useState43(false);
52669
- const [saveLoading, setSaveLoading] = useState43(false);
52670
- const [deleteLoading, setDeleteLoading] = useState43(false);
52671
- const [initiatorApproverOpen, setInitiatorApproverOpen] = useState43(false);
52672
- const [initiatorApproverRequirements, setInitiatorApproverRequirements] = useState43([]);
52673
- const [pendingResubmitComments, setPendingResubmitComments] = useState43();
52828
+ const [withdrawOpen, setWithdrawOpen] = useState44(false);
52829
+ const [withdrawLoading, setWithdrawLoading] = useState44(false);
52830
+ const [saveLoading, setSaveLoading] = useState44(false);
52831
+ const [deleteLoading, setDeleteLoading] = useState44(false);
52832
+ const [initiatorApproverOpen, setInitiatorApproverOpen] = useState44(false);
52833
+ const [initiatorApproverRequirements, setInitiatorApproverRequirements] = useState44([]);
52834
+ const [pendingResubmitComments, setPendingResubmitComments] = useState44();
52674
52835
  const fieldIds = useMemo32(() => schema.fields.map((field) => field.fieldId), [schema.fields]);
52675
52836
  const { api } = useFormContext();
52676
52837
  const {
@@ -53042,7 +53203,7 @@ var InnerProcessContent = ({
53042
53203
  name: submitterName || "\u672A\u77E5\u7528\u6237",
53043
53204
  department: submitterDepartment
53044
53205
  } : void 0;
53045
- return /* @__PURE__ */ jsxs57(
53206
+ return /* @__PURE__ */ jsxs58(
53046
53207
  RuntimePageShell,
53047
53208
  {
53048
53209
  actions: actionsNode,
@@ -53050,9 +53211,9 @@ var InnerProcessContent = ({
53050
53211
  inDrawer,
53051
53212
  maxWidth: "100%",
53052
53213
  children: [
53053
- /* @__PURE__ */ jsx102("div", { className: "sy-detail-header", children: /* @__PURE__ */ jsxs57("div", { className: "sy-detail-header-inner", children: [
53214
+ /* @__PURE__ */ jsx102("div", { className: "sy-detail-header", children: /* @__PURE__ */ jsxs58("div", { className: "sy-detail-header-inner", children: [
53054
53215
  header,
53055
- /* @__PURE__ */ jsxs57(
53216
+ /* @__PURE__ */ jsxs58(
53056
53217
  "div",
53057
53218
  {
53058
53219
  className: `sy-process-summary ${hasStatusStamp ? "sy-process-summary-with-stamp" : ""}`,
@@ -53089,7 +53250,7 @@ var InnerProcessContent = ({
53089
53250
  }
53090
53251
  )
53091
53252
  ] }) }),
53092
- /* @__PURE__ */ jsxs57("div", { className: "sy-detail-main", children: [
53253
+ /* @__PURE__ */ jsxs58("div", { className: "sy-detail-main", children: [
53093
53254
  beforeForm,
53094
53255
  mode === "edit" && /* @__PURE__ */ jsx102("div", { className: "rounded-lg border border-blue-200 bg-blue-50 px-4 py-3 text-sm text-blue-700 transition-all duration-150", children: isProcessCompleted ? "\u6B63\u5728\u7F16\u8F91\uFF0C\u4FEE\u6539\u540E\u8BF7\u4FDD\u5B58" : "\u6B63\u5728\u7F16\u8F91\u8868\u5355\uFF0C\u4FEE\u6539\u540E\u8BF7\u91CD\u65B0\u63D0\u4EA4" }),
53095
53256
  /* @__PURE__ */ jsx102("div", { className: "sy-detail-card", children: /* @__PURE__ */ jsx102(
@@ -53098,7 +53259,8 @@ var InnerProcessContent = ({
53098
53259
  schema,
53099
53260
  config: formConfig,
53100
53261
  initialValues: formData ?? void 0,
53101
- children: /* @__PURE__ */ jsxs57(FormShell, { appearance: schema.template?.appearance, className: "sy-form-shell", children: [
53262
+ components,
53263
+ children: /* @__PURE__ */ jsxs58(FormShell, { appearance: schema.template?.appearance, className: "sy-form-shell", children: [
53102
53264
  /* @__PURE__ */ jsx102(FormDataBridge2, { formDataRef, validateRef }),
53103
53265
  /* @__PURE__ */ jsx102(
53104
53266
  FormRenderer,
@@ -53112,8 +53274,8 @@ var InnerProcessContent = ({
53112
53274
  `${mode}-${dataVersion}`
53113
53275
  ) }),
53114
53276
  afterForm,
53115
- canViewWorkflow && /* @__PURE__ */ jsxs57("div", { className: "sy-detail-card", children: [
53116
- /* @__PURE__ */ jsx102("div", { className: "mb-4 flex items-center justify-between gap-3", children: /* @__PURE__ */ jsxs57("div", { children: [
53277
+ canViewWorkflow && /* @__PURE__ */ jsxs58("div", { className: "sy-detail-card", children: [
53278
+ /* @__PURE__ */ jsx102("div", { className: "mb-4 flex items-center justify-between gap-3", children: /* @__PURE__ */ jsxs58("div", { children: [
53117
53279
  /* @__PURE__ */ jsx102("h3", { className: "text-base font-semibold text-ant-color-text", children: "\u5BA1\u6279\u8FDB\u5EA6" }),
53118
53280
  /* @__PURE__ */ jsx102("p", { className: "mt-1 text-xs text-ant-color-text-tertiary", children: "\u8282\u70B9\u3001\u5BA1\u6279\u4EBA\u3001\u5904\u7406\u610F\u89C1\u548C\u7B49\u5F85\u72B6\u6001" })
53119
53281
  ] }) }),
@@ -53159,7 +53321,7 @@ var InnerProcessContent = ({
53159
53321
  name: "reason",
53160
53322
  label: "\u64A4\u9500\u539F\u56E0",
53161
53323
  rules: [{ required: true, message: "\u8BF7\u586B\u5199\u64A4\u9500\u539F\u56E0" }],
53162
- children: /* @__PURE__ */ jsx102(Input13.TextArea, { rows: 4, maxLength: 500, showCount: true, placeholder: "\u8BF7\u8F93\u5165\u64A4\u9500\u539F\u56E0" })
53324
+ children: /* @__PURE__ */ jsx102(Input14.TextArea, { rows: 4, maxLength: 500, showCount: true, placeholder: "\u8BF7\u8F93\u5165\u64A4\u9500\u539F\u56E0" })
53163
53325
  }
53164
53326
  ) })
53165
53327
  }
@@ -53181,14 +53343,14 @@ var InnerProcessContent = ({
53181
53343
  );
53182
53344
  };
53183
53345
  var ProcessDetailTemplate = (props) => {
53184
- const { schema, formUuid, appType, formInstanceId } = props;
53346
+ const { schema, formUuid, appType, formInstanceId, components } = props;
53185
53347
  const wrapperConfig = {
53186
53348
  mode: "readonly",
53187
53349
  formUuid,
53188
53350
  appType,
53189
53351
  formInstanceId
53190
53352
  };
53191
- return /* @__PURE__ */ jsx102(FormProvider, { schema, config: wrapperConfig, children: /* @__PURE__ */ jsx102(InnerProcessContent, { ...props }) });
53353
+ return /* @__PURE__ */ jsx102(FormProvider, { schema, config: wrapperConfig, components, children: /* @__PURE__ */ jsx102(InnerProcessContent, { ...props }) });
53192
53354
  };
53193
53355
 
53194
53356
  // packages/sdk/src/components/templates/StandardFormPage.tsx
@@ -53212,6 +53374,7 @@ var StandardFormPage = ({
53212
53374
  compatibility,
53213
53375
  onSubmit,
53214
53376
  onSubmitSuccess,
53377
+ components,
53215
53378
  inDrawer
53216
53379
  }) => {
53217
53380
  const resolvedMode = mode || schema.template?.defaultMode || "submit";
@@ -53252,6 +53415,7 @@ var StandardFormPage = ({
53252
53415
  enableEdit: schema.template?.enableEdit,
53253
53416
  enableDelete: schema.template?.enableDelete,
53254
53417
  enableChangeRecords: schema.template?.enableChangeRecords,
53418
+ components,
53255
53419
  inDrawer
53256
53420
  }
53257
53421
  );
@@ -53267,6 +53431,7 @@ var StandardFormPage = ({
53267
53431
  enableEdit: schema.template?.enableEdit,
53268
53432
  enableDelete: schema.template?.enableDelete,
53269
53433
  enableChangeRecords: schema.template?.enableChangeRecords,
53434
+ components,
53270
53435
  inDrawer
53271
53436
  }
53272
53437
  );
@@ -53292,13 +53457,14 @@ var StandardFormPage = ({
53292
53457
  enableProcessPreview: schema.template?.enableProcessPreview,
53293
53458
  initialValues: initialValues ?? void 0,
53294
53459
  onSubmitSuccess,
53460
+ components,
53295
53461
  inDrawer
53296
53462
  }
53297
53463
  );
53298
53464
  };
53299
53465
 
53300
53466
  // packages/sdk/src/components/modules/DataManagementList.tsx
53301
- import { jsx as jsx104, jsxs as jsxs58 } from "react/jsx-runtime";
53467
+ import { jsx as jsx104, jsxs as jsxs59 } from "react/jsx-runtime";
53302
53468
  var DEFAULT_MAX_VISIBLE_ROW_ACTIONS = 4;
53303
53469
  var ACTION_COLUMN_MIN_WIDTH = 96;
53304
53470
  var ACTION_BUTTON_ESTIMATED_WIDTH = 56;
@@ -53580,17 +53746,17 @@ var renderCellValue = (value, field) => {
53580
53746
  )) });
53581
53747
  }
53582
53748
  if (field.componentName === "AttachmentField") {
53583
- return /* @__PURE__ */ jsxs58(Space9, { size: 4, wrap: true, children: [
53749
+ return /* @__PURE__ */ jsxs59(Space9, { size: 4, wrap: true, children: [
53584
53750
  value.slice(0, 3).map((item, index) => /* @__PURE__ */ jsx104(Tag8, { children: item?.name || item?.originalName || `\u9644\u4EF6${index + 1}` }, item?.uid || item?.id || index)),
53585
- value.length > 3 && /* @__PURE__ */ jsxs58(Tag8, { children: [
53751
+ value.length > 3 && /* @__PURE__ */ jsxs59(Tag8, { children: [
53586
53752
  "+",
53587
53753
  value.length - 3
53588
53754
  ] })
53589
53755
  ] });
53590
53756
  }
53591
- return /* @__PURE__ */ jsxs58(Space9, { size: 4, wrap: true, children: [
53757
+ return /* @__PURE__ */ jsxs59(Space9, { size: 4, wrap: true, children: [
53592
53758
  value.slice(0, 4).map((item, index) => /* @__PURE__ */ jsx104(Tag8, { children: pickOptionLabel(field, item) }, `${field.fieldId}_${index}`)),
53593
- value.length > 4 && /* @__PURE__ */ jsxs58(Tag8, { children: [
53759
+ value.length > 4 && /* @__PURE__ */ jsxs59(Tag8, { children: [
53594
53760
  "+",
53595
53761
  value.length - 4
53596
53762
  ] })
@@ -53826,8 +53992,8 @@ function AsyncEntityFilterSelect({
53826
53992
  value,
53827
53993
  onChange
53828
53994
  }) {
53829
- const [options, setOptions] = useState44([]);
53830
- const [fetching, setFetching] = useState44(false);
53995
+ const [options, setOptions] = useState45([]);
53996
+ const [fetching, setFetching] = useState45(false);
53831
53997
  const multiple = normalizeOperator(operator) === "IN";
53832
53998
  const loadOptions = useCallback26(
53833
53999
  async (keyword = "") => {
@@ -53905,7 +54071,7 @@ function FilterValueEditor({
53905
54071
  if (kind === "number") {
53906
54072
  if (normalizedOperator === "BETWEEN") {
53907
54073
  const range = Array.isArray(value) ? value : [void 0, void 0];
53908
- return /* @__PURE__ */ jsxs58("div", { className: "flex w-full gap-2", children: [
54074
+ return /* @__PURE__ */ jsxs59("div", { className: "flex w-full gap-2", children: [
53909
54075
  /* @__PURE__ */ jsx104(
53910
54076
  InputNumber3,
53911
54077
  {
@@ -54033,7 +54199,7 @@ function FilterValueEditor({
54033
54199
  );
54034
54200
  }
54035
54201
  return /* @__PURE__ */ jsx104(
54036
- Input14,
54202
+ Input15,
54037
54203
  {
54038
54204
  value: value ?? "",
54039
54205
  placeholder: "\u8F93\u5165\u7B5B\u9009\u503C",
@@ -54061,12 +54227,12 @@ function FilterGroupEditor({
54061
54227
  )
54062
54228
  });
54063
54229
  };
54064
- return /* @__PURE__ */ jsxs58(
54230
+ return /* @__PURE__ */ jsxs59(
54065
54231
  "div",
54066
54232
  {
54067
54233
  className: `${level > 0 ? "ml-4 border-l border-ant-border-secondary pl-4" : ""} space-y-3`,
54068
54234
  children: [
54069
- /* @__PURE__ */ jsxs58("div", { className: "flex items-center justify-between", children: [
54235
+ /* @__PURE__ */ jsxs59("div", { className: "flex items-center justify-between", children: [
54070
54236
  /* @__PURE__ */ jsx104(
54071
54237
  Segmented,
54072
54238
  {
@@ -54079,7 +54245,7 @@ function FilterGroupEditor({
54079
54245
  onChange: (value) => onChange({ ...group, logic: value })
54080
54246
  }
54081
54247
  ),
54082
- /* @__PURE__ */ jsxs58(Space9, { children: [
54248
+ /* @__PURE__ */ jsxs59(Space9, { children: [
54083
54249
  /* @__PURE__ */ jsx104(
54084
54250
  Button20,
54085
54251
  {
@@ -54098,7 +54264,7 @@ function FilterGroupEditor({
54098
54264
  )
54099
54265
  ] })
54100
54266
  ] }),
54101
- group.rules.map((rule) => /* @__PURE__ */ jsxs58(
54267
+ group.rules.map((rule) => /* @__PURE__ */ jsxs59(
54102
54268
  "div",
54103
54269
  {
54104
54270
  className: "grid grid-cols-[minmax(140px,1fr)_132px_minmax(180px,1.4fr)_auto] gap-2",
@@ -54182,7 +54348,7 @@ function ResizableColumnTitle({
54182
54348
  onResize,
54183
54349
  onResizeEnd
54184
54350
  }) {
54185
- const dragRef = useRef22({ startX: 0, startWidth: width, latestWidth: width });
54351
+ const dragRef = useRef23({ startX: 0, startWidth: width, latestWidth: width });
54186
54352
  const handleMouseDown = (event) => {
54187
54353
  event.preventDefault();
54188
54354
  event.stopPropagation();
@@ -54207,7 +54373,7 @@ function ResizableColumnTitle({
54207
54373
  document.addEventListener("mousemove", handleMouseMove);
54208
54374
  document.addEventListener("mouseup", handleMouseUp);
54209
54375
  };
54210
- return /* @__PURE__ */ jsxs58("span", { className: "relative flex min-w-0 items-center pr-3", children: [
54376
+ return /* @__PURE__ */ jsxs59("span", { className: "relative flex min-w-0 items-center pr-3", children: [
54211
54377
  /* @__PURE__ */ jsx104("span", { className: "min-w-0 truncate", children: label }),
54212
54378
  /* @__PURE__ */ jsx104(
54213
54379
  "span",
@@ -54239,6 +54405,7 @@ var DataManagementList = ({
54239
54405
  formTitle,
54240
54406
  formType: propFormType,
54241
54407
  schema: providedSchema,
54408
+ components,
54242
54409
  forcedConfig,
54243
54410
  showForcedConfig = true,
54244
54411
  detailRenderer,
@@ -54251,59 +54418,59 @@ var DataManagementList = ({
54251
54418
  permissionMode = "auto",
54252
54419
  actionOverrides
54253
54420
  }) => {
54254
- const rootRef = useRef22(null);
54421
+ const rootRef = useRef23(null);
54255
54422
  const api = useMemo34(() => {
54256
54423
  if (typeof requestOverride === "function") {
54257
54424
  return createFormRuntimeApi({ request: requestOverride });
54258
54425
  }
54259
54426
  return createFormRuntimeApi(requestOverride);
54260
54427
  }, [requestOverride]);
54261
- const [fields, setFields] = useState44([]);
54262
- const [runtimeFormSchema, setRuntimeFormSchema] = useState44(null);
54263
- const [config, setConfig] = useState44({});
54264
- const [formType, setFormType] = useState44("form");
54265
- const [showFields, setShowFields] = useState44([]);
54266
- const [lockFieldIds, setLockFieldIds] = useState44([]);
54267
- const [widths, setWidths] = useState44({});
54268
- const widthsRef = useRef22({});
54269
- const [sort, setSort] = useState44([]);
54270
- const [density, setDensity] = useState44("middle");
54271
- const [detailOpenMode, setDetailOpenMode] = useState44("drawer");
54272
- const [searchKeyWord, setSearchKeyWord] = useState44("");
54273
- const [filterGroup, setFilterGroup] = useState44(createGroup);
54274
- const [dataSource, setDataSource] = useState44([]);
54275
- const [total, setTotal] = useState44(0);
54276
- const [current, setCurrent] = useState44(1);
54277
- const [pageSize, setPageSize] = useState44(10);
54278
- const [loading, setLoading] = useState44(false);
54279
- const [schemaLoading, setSchemaLoading] = useState44(true);
54280
- const [selectedRowKeys, setSelectedRowKeys] = useState44([]);
54281
- const [filterOpen, setFilterOpen] = useState44(false);
54282
- const [columnOpen, setColumnOpen] = useState44(false);
54283
- const [exportOpen, setExportOpen] = useState44(false);
54284
- const [exportScope, setExportScope] = useState44("all");
54285
- const [exportFields, setExportFields] = useState44([]);
54286
- const [exporting, setExporting] = useState44(false);
54287
- const [importOpen, setImportOpen] = useState44(false);
54288
- const [importPreview, setImportPreview] = useState44([]);
54289
- const [importBase64, setImportBase64] = useState44("");
54290
- const [templateDownloading, setTemplateDownloading] = useState44(false);
54291
- const [recordsOpen, setRecordsOpen] = useState44(false);
54292
- const [recordTab, setRecordTab] = useState44("export");
54293
- const [transferRecords, setTransferRecords] = useState44([]);
54294
- const [batchApprovalOpen, setBatchApprovalOpen] = useState44(false);
54295
- const [batchApprovalAction, setBatchApprovalAction] = useState44(
54428
+ const [fields, setFields] = useState45([]);
54429
+ const [runtimeFormSchema, setRuntimeFormSchema] = useState45(null);
54430
+ const [config, setConfig] = useState45({});
54431
+ const [formType, setFormType] = useState45("form");
54432
+ const [showFields, setShowFields] = useState45([]);
54433
+ const [lockFieldIds, setLockFieldIds] = useState45([]);
54434
+ const [widths, setWidths] = useState45({});
54435
+ const widthsRef = useRef23({});
54436
+ const [sort, setSort] = useState45([]);
54437
+ const [density, setDensity] = useState45("middle");
54438
+ const [detailOpenMode, setDetailOpenMode] = useState45("drawer");
54439
+ const [searchKeyWord, setSearchKeyWord] = useState45("");
54440
+ const [filterGroup, setFilterGroup] = useState45(createGroup);
54441
+ const [dataSource, setDataSource] = useState45([]);
54442
+ const [total, setTotal] = useState45(0);
54443
+ const [current, setCurrent] = useState45(1);
54444
+ const [pageSize, setPageSize] = useState45(10);
54445
+ const [loading, setLoading] = useState45(false);
54446
+ const [schemaLoading, setSchemaLoading] = useState45(true);
54447
+ const [selectedRowKeys, setSelectedRowKeys] = useState45([]);
54448
+ const [filterOpen, setFilterOpen] = useState45(false);
54449
+ const [columnOpen, setColumnOpen] = useState45(false);
54450
+ const [exportOpen, setExportOpen] = useState45(false);
54451
+ const [exportScope, setExportScope] = useState45("all");
54452
+ const [exportFields, setExportFields] = useState45([]);
54453
+ const [exporting, setExporting] = useState45(false);
54454
+ const [importOpen, setImportOpen] = useState45(false);
54455
+ const [importPreview, setImportPreview] = useState45([]);
54456
+ const [importBase64, setImportBase64] = useState45("");
54457
+ const [templateDownloading, setTemplateDownloading] = useState45(false);
54458
+ const [recordsOpen, setRecordsOpen] = useState45(false);
54459
+ const [recordTab, setRecordTab] = useState45("export");
54460
+ const [transferRecords, setTransferRecords] = useState45([]);
54461
+ const [batchApprovalOpen, setBatchApprovalOpen] = useState45(false);
54462
+ const [batchApprovalAction, setBatchApprovalAction] = useState45(
54296
54463
  "approved"
54297
54464
  );
54298
- const [batchApprovalComments, setBatchApprovalComments] = useState44("");
54299
- const [batchApproving, setBatchApproving] = useState44(false);
54300
- const [activeRecord, setActiveRecord] = useState44(null);
54301
- const [detailOpen, setDetailOpen] = useState44(false);
54302
- const [submitOpen, setSubmitOpen] = useState44(false);
54303
- const [actionSummary, setActionSummary] = useState44(null);
54304
- const [permissionLoading, setPermissionLoading] = useState44(permissionMode === "auto");
54305
- const [permissionError, setPermissionError] = useState44(null);
54306
- const fetchStateRef = useRef22({});
54465
+ const [batchApprovalComments, setBatchApprovalComments] = useState45("");
54466
+ const [batchApproving, setBatchApproving] = useState45(false);
54467
+ const [activeRecord, setActiveRecord] = useState45(null);
54468
+ const [detailOpen, setDetailOpen] = useState45(false);
54469
+ const [submitOpen, setSubmitOpen] = useState45(false);
54470
+ const [actionSummary, setActionSummary] = useState45(null);
54471
+ const [permissionLoading, setPermissionLoading] = useState45(permissionMode === "auto");
54472
+ const [permissionError, setPermissionError] = useState45(null);
54473
+ const fetchStateRef = useRef23({});
54307
54474
  const isProcessForm = isProcessFormType(formType);
54308
54475
  const request = api.request;
54309
54476
  const getPopupContainer = useCallback26(
@@ -54846,7 +55013,7 @@ var DataManagementList = ({
54846
55013
  ];
54847
55014
  const visibleActions = actions.slice(0, visibleRowActionLimit);
54848
55015
  const moreActions = actions.slice(visibleRowActionLimit);
54849
- return /* @__PURE__ */ jsxs58(Space9, { size: 4, children: [
55016
+ return /* @__PURE__ */ jsxs59(Space9, { size: 4, children: [
54850
55017
  visibleActions.map((action) => /* @__PURE__ */ jsx104(
54851
55018
  Button20,
54852
55019
  {
@@ -54929,18 +55096,18 @@ var DataManagementList = ({
54929
55096
  };
54930
55097
  });
54931
55098
  }, [fields, importPreview]);
54932
- return /* @__PURE__ */ jsx104(ConfigProvider, { getPopupContainer, locale: antdChineseLocale, children: /* @__PURE__ */ jsxs58(
55099
+ return /* @__PURE__ */ jsx104(ConfigProvider, { getPopupContainer, locale: antdChineseLocale, children: /* @__PURE__ */ jsxs59(
54933
55100
  "div",
54934
55101
  {
54935
55102
  ref: rootRef,
54936
55103
  className: `relative w-full bg-ant-bg-layout ${fullHeight ? "flex h-[calc(100vh-88px)] min-h-[560px] overflow-hidden" : ""}`,
54937
55104
  children: [
54938
- /* @__PURE__ */ jsxs58("div", { className: "mx-auto flex min-h-0 w-full max-w-[1440px] flex-col px-4 py-4 md:px-6", children: [
55105
+ /* @__PURE__ */ jsxs59("div", { className: "mx-auto flex min-h-0 w-full max-w-[1440px] flex-col px-4 py-4 md:px-6", children: [
54939
55106
  title && /* @__PURE__ */ jsx104("div", { className: "mb-4", children: /* @__PURE__ */ jsx104("h2", { className: "m-0 text-xl font-semibold text-ant-color-text", children: title }) }),
54940
- /* @__PURE__ */ jsx104("div", { className: "mb-4 flex flex-col gap-3 md:flex-row md:items-center", children: /* @__PURE__ */ jsxs58(Space9, { wrap: true, children: [
55107
+ /* @__PURE__ */ jsx104("div", { className: "mb-4 flex flex-col gap-3 md:flex-row md:items-center", children: /* @__PURE__ */ jsxs59(Space9, { wrap: true, children: [
54941
55108
  canCreate && (submitRenderer || runtimeFormSchema) && /* @__PURE__ */ jsx104(Button20, { icon: /* @__PURE__ */ jsx104(PlusOutlined2, {}), type: "primary", onClick: () => setSubmitOpen(true), children: "\u65B0\u589E" }),
54942
55109
  /* @__PURE__ */ jsx104(
54943
- Input14.Search,
55110
+ Input15.Search,
54944
55111
  {
54945
55112
  allowClear: true,
54946
55113
  className: "w-[260px]",
@@ -55008,13 +55175,13 @@ var DataManagementList = ({
55008
55175
  ),
55009
55176
  /* @__PURE__ */ jsx104(Button20, { icon: /* @__PURE__ */ jsx104(ReloadOutlined5, {}), onClick: () => loadData({ current, pageSize }) })
55010
55177
  ] }) }),
55011
- selectedRowKeys.length > 0 && /* @__PURE__ */ jsxs58("div", { className: "mb-3 flex flex-wrap items-center justify-between gap-3 rounded-lg border border-ant-border-secondary bg-ant-bg-container px-4 py-3 shadow-sm", children: [
55012
- /* @__PURE__ */ jsxs58("span", { className: "text-sm text-ant-color-text-secondary", children: [
55178
+ selectedRowKeys.length > 0 && /* @__PURE__ */ jsxs59("div", { className: "mb-3 flex flex-wrap items-center justify-between gap-3 rounded-lg border border-ant-border-secondary bg-ant-bg-container px-4 py-3 shadow-sm", children: [
55179
+ /* @__PURE__ */ jsxs59("span", { className: "text-sm text-ant-color-text-secondary", children: [
55013
55180
  "\u5DF2\u9009 ",
55014
55181
  selectedRowKeys.length,
55015
55182
  " \u6761"
55016
55183
  ] }),
55017
- /* @__PURE__ */ jsxs58(Space9, { wrap: true, children: [
55184
+ /* @__PURE__ */ jsxs59(Space9, { wrap: true, children: [
55018
55185
  canExport && /* @__PURE__ */ jsx104(
55019
55186
  Button20,
55020
55187
  {
@@ -55077,7 +55244,7 @@ var DataManagementList = ({
55077
55244
  }
55078
55245
  ) })
55079
55246
  ] }),
55080
- /* @__PURE__ */ jsxs58(
55247
+ /* @__PURE__ */ jsxs59(
55081
55248
  Modal13,
55082
55249
  {
55083
55250
  getContainer: getOverlayContainer,
@@ -55123,8 +55290,8 @@ var DataManagementList = ({
55123
55290
  width: 920,
55124
55291
  onCancel: () => setColumnOpen(false),
55125
55292
  onOk: handleColumnCommit,
55126
- children: /* @__PURE__ */ jsxs58("div", { className: "space-y-5", children: [
55127
- /* @__PURE__ */ jsxs58("div", { children: [
55293
+ children: /* @__PURE__ */ jsxs59("div", { className: "space-y-5", children: [
55294
+ /* @__PURE__ */ jsxs59("div", { children: [
55128
55295
  /* @__PURE__ */ jsx104("div", { className: "mb-2 text-sm font-medium text-ant-color-text", children: "\u663E\u793A\u5217" }),
55129
55296
  /* @__PURE__ */ jsx104(
55130
55297
  Checkbox4.Group,
@@ -55142,7 +55309,7 @@ var DataManagementList = ({
55142
55309
  }
55143
55310
  )
55144
55311
  ] }),
55145
- /* @__PURE__ */ jsxs58("div", { children: [
55312
+ /* @__PURE__ */ jsxs59("div", { children: [
55146
55313
  /* @__PURE__ */ jsx104("div", { className: "mb-2 text-sm font-medium text-ant-color-text", children: "\u51BB\u7ED3\u5217" }),
55147
55314
  /* @__PURE__ */ jsx104(
55148
55315
  Select9,
@@ -55163,12 +55330,12 @@ var DataManagementList = ({
55163
55330
  )
55164
55331
  ] }),
55165
55332
  /* @__PURE__ */ jsx104(Divider, { className: "my-1" }),
55166
- /* @__PURE__ */ jsxs58("div", { children: [
55167
- /* @__PURE__ */ jsxs58("div", { className: "mb-2 flex items-center justify-between gap-3", children: [
55333
+ /* @__PURE__ */ jsxs59("div", { children: [
55334
+ /* @__PURE__ */ jsxs59("div", { className: "mb-2 flex items-center justify-between gap-3", children: [
55168
55335
  /* @__PURE__ */ jsx104("span", { className: "text-sm font-medium text-ant-color-text", children: "\u6392\u5E8F\u89C4\u5219" }),
55169
55336
  /* @__PURE__ */ jsx104(Button20, { size: "small", onClick: handleAddSort, disabled: fields.length === 0, children: "\u6DFB\u52A0\u6392\u5E8F" })
55170
55337
  ] }),
55171
- /* @__PURE__ */ jsx104("div", { className: "space-y-2", children: sort.length === 0 ? /* @__PURE__ */ jsx104("div", { className: "rounded-lg border border-dashed border-ant-border-secondary px-3 py-4 text-center text-sm text-ant-color-text-tertiary", children: "\u6682\u65E0\u6392\u5E8F\u89C4\u5219" }) : sort.map((item, index) => /* @__PURE__ */ jsxs58("div", { className: "flex items-center gap-2", children: [
55338
+ /* @__PURE__ */ jsx104("div", { className: "space-y-2", children: sort.length === 0 ? /* @__PURE__ */ jsx104("div", { className: "rounded-lg border border-dashed border-ant-border-secondary px-3 py-4 text-center text-sm text-ant-color-text-tertiary", children: "\u6682\u65E0\u6392\u5E8F\u89C4\u5219" }) : sort.map((item, index) => /* @__PURE__ */ jsxs59("div", { className: "flex items-center gap-2", children: [
55172
55339
  /* @__PURE__ */ jsx104(
55173
55340
  Select9,
55174
55341
  {
@@ -55203,8 +55370,8 @@ var DataManagementList = ({
55203
55370
  )
55204
55371
  ] }, `${item.id}_${index}`)) })
55205
55372
  ] }),
55206
- /* @__PURE__ */ jsxs58("div", { className: "grid gap-4 md:grid-cols-3", children: [
55207
- /* @__PURE__ */ jsxs58("div", { children: [
55373
+ /* @__PURE__ */ jsxs59("div", { className: "grid gap-4 md:grid-cols-3", children: [
55374
+ /* @__PURE__ */ jsxs59("div", { children: [
55208
55375
  /* @__PURE__ */ jsx104("div", { className: "mb-2 text-sm font-medium text-ant-color-text", children: "\u8868\u683C\u5BC6\u5EA6" }),
55209
55376
  /* @__PURE__ */ jsx104(
55210
55377
  Segmented,
@@ -55220,7 +55387,7 @@ var DataManagementList = ({
55220
55387
  }
55221
55388
  )
55222
55389
  ] }),
55223
- /* @__PURE__ */ jsxs58("div", { children: [
55390
+ /* @__PURE__ */ jsxs59("div", { children: [
55224
55391
  /* @__PURE__ */ jsx104("div", { className: "mb-2 text-sm font-medium text-ant-color-text", children: "\u8BE6\u60C5\u6253\u5F00\u65B9\u5F0F" }),
55225
55392
  /* @__PURE__ */ jsx104(
55226
55393
  Segmented,
@@ -55235,7 +55402,7 @@ var DataManagementList = ({
55235
55402
  }
55236
55403
  )
55237
55404
  ] }),
55238
- /* @__PURE__ */ jsxs58("div", { children: [
55405
+ /* @__PURE__ */ jsxs59("div", { children: [
55239
55406
  /* @__PURE__ */ jsx104("div", { className: "mb-2 text-sm font-medium text-ant-color-text", children: "\u9875\u5927\u5C0F" }),
55240
55407
  /* @__PURE__ */ jsx104(
55241
55408
  Select9,
@@ -55258,7 +55425,7 @@ var DataManagementList = ({
55258
55425
  title: exportScope === "selected" ? "\u5BFC\u51FA\u9009\u4E2D\u6570\u636E" : "\u5BFC\u51FA\u5168\u90E8\u6570\u636E",
55259
55426
  open: exportOpen,
55260
55427
  onCancel: () => setExportOpen(false),
55261
- footer: /* @__PURE__ */ jsxs58(Space9, { children: [
55428
+ footer: /* @__PURE__ */ jsxs59(Space9, { children: [
55262
55429
  /* @__PURE__ */ jsx104(Button20, { onClick: () => setExportOpen(false), children: "\u53D6\u6D88" }),
55263
55430
  /* @__PURE__ */ jsx104(
55264
55431
  Button20,
@@ -55292,8 +55459,8 @@ var DataManagementList = ({
55292
55459
  onOk: handleBatchApprovalConfirm,
55293
55460
  okText: batchApprovalAction === "approved" ? "\u786E\u8BA4\u901A\u8FC7" : "\u786E\u8BA4\u62D2\u7EDD",
55294
55461
  confirmLoading: batchApproving,
55295
- children: /* @__PURE__ */ jsxs58("div", { className: "space-y-4", children: [
55296
- /* @__PURE__ */ jsxs58("div", { className: "text-sm text-ant-color-text-secondary", children: [
55462
+ children: /* @__PURE__ */ jsxs59("div", { className: "space-y-4", children: [
55463
+ /* @__PURE__ */ jsxs59("div", { className: "text-sm text-ant-color-text-secondary", children: [
55297
55464
  "\u5DF2\u9009\u62E9 ",
55298
55465
  selectedRowKeys.length,
55299
55466
  " \u6761\u8BB0\u5F55"
@@ -55311,7 +55478,7 @@ var DataManagementList = ({
55311
55478
  }
55312
55479
  ),
55313
55480
  /* @__PURE__ */ jsx104(
55314
- Input14.TextArea,
55481
+ Input15.TextArea,
55315
55482
  {
55316
55483
  value: batchApprovalComments,
55317
55484
  rows: 4,
@@ -55324,7 +55491,7 @@ var DataManagementList = ({
55324
55491
  ] })
55325
55492
  }
55326
55493
  ),
55327
- /* @__PURE__ */ jsxs58(
55494
+ /* @__PURE__ */ jsxs59(
55328
55495
  Modal13,
55329
55496
  {
55330
55497
  getContainer: getOverlayContainer,
@@ -55336,8 +55503,8 @@ var DataManagementList = ({
55336
55503
  okButtonProps: { disabled: !importBase64 || !canImport },
55337
55504
  okText: "\u786E\u8BA4\u5BFC\u5165",
55338
55505
  children: [
55339
- /* @__PURE__ */ jsxs58("div", { className: "mb-3 flex flex-col gap-3 rounded-lg border border-ant-border-secondary bg-ant-bg-container px-4 py-3 md:flex-row md:items-center md:justify-between", children: [
55340
- /* @__PURE__ */ jsxs58("div", { children: [
55506
+ /* @__PURE__ */ jsxs59("div", { className: "mb-3 flex flex-col gap-3 rounded-lg border border-ant-border-secondary bg-ant-bg-container px-4 py-3 md:flex-row md:items-center md:justify-between", children: [
55507
+ /* @__PURE__ */ jsxs59("div", { children: [
55341
55508
  /* @__PURE__ */ jsx104("div", { className: "text-sm font-medium text-ant-color-text", children: "\u5BFC\u5165\u6A21\u677F" }),
55342
55509
  /* @__PURE__ */ jsx104("div", { className: "mt-1 text-xs text-ant-color-text-secondary", children: "\u5148\u4E0B\u8F7D\u6A21\u677F\u586B\u5199\u6570\u636E\uFF0C\u518D\u4E0A\u4F20 Excel \u6587\u4EF6\u5BFC\u5165" })
55343
55510
  ] }),
@@ -55365,7 +55532,7 @@ var DataManagementList = ({
55365
55532
  children: /* @__PURE__ */ jsx104("p", { className: "text-ant-color-text-secondary", children: "\u62D6\u62FD Excel \u6587\u4EF6\u5230\u6B64\u5904\uFF0C\u6216\u70B9\u51FB\u9009\u62E9\u6587\u4EF6" })
55366
55533
  }
55367
55534
  ),
55368
- importPreview.length > 0 && /* @__PURE__ */ jsxs58("div", { className: "mt-4", children: [
55535
+ importPreview.length > 0 && /* @__PURE__ */ jsxs59("div", { className: "mt-4", children: [
55369
55536
  /* @__PURE__ */ jsx104("div", { className: "mb-2 text-sm font-medium text-ant-color-text", children: "\u5BFC\u5165\u9884\u89C8" }),
55370
55537
  /* @__PURE__ */ jsx104(
55371
55538
  Table4,
@@ -55382,7 +55549,7 @@ var DataManagementList = ({
55382
55549
  ]
55383
55550
  }
55384
55551
  ),
55385
- /* @__PURE__ */ jsxs58(
55552
+ /* @__PURE__ */ jsxs59(
55386
55553
  Drawer2,
55387
55554
  {
55388
55555
  styles: { body: { padding: 24, overflow: "auto" } },
@@ -55438,6 +55605,7 @@ var DataManagementList = ({
55438
55605
  formUuid,
55439
55606
  formInstanceId: String(getRecordId(activeRecord)),
55440
55607
  api,
55608
+ components,
55441
55609
  inDrawer: true
55442
55610
  }
55443
55611
  ) : /* @__PURE__ */ jsx104(Empty8, { description: "\u8BF7\u901A\u8FC7 detailRenderer \u63A5\u5165\u8BE6\u60C5\u6A21\u677F" })
@@ -55467,6 +55635,7 @@ var DataManagementList = ({
55467
55635
  appType,
55468
55636
  formUuid,
55469
55637
  api,
55638
+ components,
55470
55639
  inDrawer: true,
55471
55640
  onSubmitSuccess: () => {
55472
55641
  setSubmitOpen(false);
@@ -55483,7 +55652,7 @@ var DataManagementList = ({
55483
55652
 
55484
55653
  // packages/sdk/src/components/templates/LowcodePageRenderer.tsx
55485
55654
  import React67, { useMemo as useMemo35 } from "react";
55486
- import { jsx as jsx105, jsxs as jsxs59 } from "react/jsx-runtime";
55655
+ import { jsx as jsx105, jsxs as jsxs60 } from "react/jsx-runtime";
55487
55656
  function nodeChildren(node) {
55488
55657
  if (Array.isArray(node.children)) return node.children;
55489
55658
  if (Array.isArray(node.cells)) return node.cells.flatMap((cell) => cell.children || []);
@@ -55521,8 +55690,8 @@ function LowcodePageRenderer({ schema, context }) {
55521
55690
  const props = node.props || {};
55522
55691
  const children = nodeChildren(node);
55523
55692
  if (node.type === "PageSection") {
55524
- return /* @__PURE__ */ jsxs59("section", { className: "sy-page-section", children: [
55525
- (props.title || props.description) && /* @__PURE__ */ jsxs59("div", { className: "sy-page-section-header", children: [
55693
+ return /* @__PURE__ */ jsxs60("section", { className: "sy-page-section", children: [
55694
+ (props.title || props.description) && /* @__PURE__ */ jsxs60("div", { className: "sy-page-section-header", children: [
55526
55695
  props.title && /* @__PURE__ */ jsx105("h2", { className: "sy-page-section-title", children: props.title }),
55527
55696
  props.description && /* @__PURE__ */ jsx105("p", { className: "sy-page-section-description", children: props.description })
55528
55697
  ] }),