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.
- package/README.md +8 -1
- package/openxiangda-skills/references/forms/component-registry.md +1 -0
- package/openxiangda-skills/skills/openxiangda-form/SKILL.md +1 -0
- package/package.json +3 -2
- package/packages/sdk/dist/{ProcessPreview-DRJwSXYG.d.mts → ProcessPreview-DSUIJi5V.d.mts} +19 -2
- package/packages/sdk/dist/{ProcessPreview-DRJwSXYG.d.ts → ProcessPreview-DSUIJi5V.d.ts} +19 -2
- package/packages/sdk/dist/components/index.cjs +417 -248
- package/packages/sdk/dist/components/index.cjs.map +1 -1
- package/packages/sdk/dist/components/index.d.mts +10 -4
- package/packages/sdk/dist/components/index.d.ts +10 -4
- package/packages/sdk/dist/components/index.mjs +582 -413
- package/packages/sdk/dist/components/index.mjs.map +1 -1
- package/packages/sdk/dist/{dataManagementApi-DwZ13_9n.d.ts → dataManagementApi-Ro9itwm8.d.ts} +1 -1
- package/packages/sdk/dist/{dataManagementApi-COXXyOK-.d.mts → dataManagementApi-p_HOhQnA.d.mts} +1 -1
- package/packages/sdk/dist/runtime/index.cjs +392 -223
- package/packages/sdk/dist/runtime/index.cjs.map +1 -1
- package/packages/sdk/dist/runtime/index.d.mts +2 -2
- package/packages/sdk/dist/runtime/index.d.ts +2 -2
- package/packages/sdk/dist/runtime/index.mjs +508 -339
- package/packages/sdk/dist/runtime/index.mjs.map +1 -1
- package/packages/sdk/dist/runtime/react.d.mts +1 -1
- package/packages/sdk/dist/runtime/react.d.ts +1 -1
- package/templates/sy-lowcode-app-workspace/AGENTS.md +1 -0
|
@@ -46022,12 +46022,12 @@ init_cjs_shims();
|
|
|
46022
46022
|
// packages/sdk/src/runtime/host/builtinRouteRenderer.tsx
|
|
46023
46023
|
init_cjs_shims();
|
|
46024
46024
|
var import_react89 = require("react");
|
|
46025
|
-
var
|
|
46025
|
+
var import_antd46 = require("antd");
|
|
46026
46026
|
|
|
46027
46027
|
// packages/sdk/src/components/modules/DataManagementList.tsx
|
|
46028
46028
|
init_cjs_shims();
|
|
46029
46029
|
var import_react88 = require("react");
|
|
46030
|
-
var
|
|
46030
|
+
var import_antd45 = require("antd");
|
|
46031
46031
|
var import_dayjs12 = __toESM(require("dayjs"));
|
|
46032
46032
|
var import_icons21 = require("@ant-design/icons");
|
|
46033
46033
|
|
|
@@ -46064,10 +46064,14 @@ function ComponentRegistryProvider({
|
|
|
46064
46064
|
components,
|
|
46065
46065
|
children
|
|
46066
46066
|
}) {
|
|
46067
|
-
const [
|
|
46067
|
+
const [registeredComponents, setRegisteredComponents] = import_react23.default.useState({});
|
|
46068
46068
|
const register = import_react23.default.useCallback((name, component) => {
|
|
46069
|
-
|
|
46069
|
+
setRegisteredComponents((prev) => ({ ...prev, [name]: component }));
|
|
46070
46070
|
}, []);
|
|
46071
|
+
const registry = import_react23.default.useMemo(
|
|
46072
|
+
() => ({ ...components, ...registeredComponents }),
|
|
46073
|
+
[components, registeredComponents]
|
|
46074
|
+
);
|
|
46071
46075
|
const value = import_react23.default.useMemo(() => ({ registry, register }), [registry, register]);
|
|
46072
46076
|
return import_react23.default.createElement(ComponentRegistryContext.Provider, { value }, children);
|
|
46073
46077
|
}
|
|
@@ -54793,16 +54797,33 @@ function DigitalSignatureField(props) {
|
|
|
54793
54797
|
// packages/sdk/src/components/fields/JSONField/index.tsx
|
|
54794
54798
|
init_cjs_shims();
|
|
54795
54799
|
var import_react68 = require("react");
|
|
54800
|
+
var import_antd35 = require("antd");
|
|
54796
54801
|
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
54797
|
-
var formatJson = (value) => {
|
|
54802
|
+
var formatJson = (value, indent = 2) => {
|
|
54798
54803
|
if (value === void 0 || value === null || value === "") return "--";
|
|
54799
54804
|
if (typeof value === "string") return value;
|
|
54800
54805
|
try {
|
|
54801
|
-
return JSON.stringify(value, null,
|
|
54806
|
+
return JSON.stringify(value, null, indent);
|
|
54802
54807
|
} catch {
|
|
54803
54808
|
return String(value);
|
|
54804
54809
|
}
|
|
54805
54810
|
};
|
|
54811
|
+
var formatJsonForEditing = (value, indent = 2) => {
|
|
54812
|
+
if (value === void 0 || value === null || value === "") return "";
|
|
54813
|
+
try {
|
|
54814
|
+
return JSON.stringify(value, null, indent);
|
|
54815
|
+
} catch {
|
|
54816
|
+
return String(value);
|
|
54817
|
+
}
|
|
54818
|
+
};
|
|
54819
|
+
var parseJson = (text) => {
|
|
54820
|
+
if (!text.trim()) return { value: void 0, error: void 0 };
|
|
54821
|
+
try {
|
|
54822
|
+
return { value: JSON.parse(text), error: void 0 };
|
|
54823
|
+
} catch {
|
|
54824
|
+
return { value: void 0, error: "\u8BF7\u8F93\u5165\u6709\u6548\u7684 JSON" };
|
|
54825
|
+
}
|
|
54826
|
+
};
|
|
54806
54827
|
function JSONField(props) {
|
|
54807
54828
|
const {
|
|
54808
54829
|
fieldId,
|
|
@@ -54814,11 +54835,22 @@ function JSONField(props) {
|
|
|
54814
54835
|
labelClassName,
|
|
54815
54836
|
tipsClassName,
|
|
54816
54837
|
readonlyClassName,
|
|
54817
|
-
|
|
54838
|
+
inputClassName,
|
|
54839
|
+
placeholder = "\u8BF7\u8F93\u5165\u6709\u6548\u7684 JSON",
|
|
54840
|
+
defaultValue,
|
|
54841
|
+
indent = 2,
|
|
54842
|
+
rows = 8,
|
|
54843
|
+
renderer,
|
|
54844
|
+
editor,
|
|
54845
|
+
onChange,
|
|
54846
|
+
onBlur
|
|
54818
54847
|
} = props;
|
|
54819
|
-
const { formData, fieldBehaviors, setFieldValue, registerField, unregisterField } = useFormContext();
|
|
54820
|
-
const behavior = propBehavior ?? fieldBehaviors[fieldId] ?? "
|
|
54848
|
+
const { formData, fieldBehaviors, setFieldValue, setFieldError, registerField, unregisterField } = useFormContext();
|
|
54849
|
+
const behavior = propBehavior ?? fieldBehaviors[fieldId] ?? "NORMAL";
|
|
54821
54850
|
const value = formData[fieldId];
|
|
54851
|
+
const [editorText, setEditorText] = (0, import_react68.useState)(() => formatJsonForEditing(value, indent));
|
|
54852
|
+
const [parseError, setParseError] = (0, import_react68.useState)();
|
|
54853
|
+
const editingRef = (0, import_react68.useRef)(false);
|
|
54822
54854
|
(0, import_react68.useEffect)(() => {
|
|
54823
54855
|
registerField(fieldId);
|
|
54824
54856
|
if (defaultValue !== void 0 && formData[fieldId] === void 0) {
|
|
@@ -54826,7 +54858,55 @@ function JSONField(props) {
|
|
|
54826
54858
|
}
|
|
54827
54859
|
return () => unregisterField(fieldId);
|
|
54828
54860
|
}, [fieldId]);
|
|
54861
|
+
(0, import_react68.useEffect)(() => {
|
|
54862
|
+
if (editingRef.current) return;
|
|
54863
|
+
setEditorText(formatJsonForEditing(value, indent));
|
|
54864
|
+
setParseError(void 0);
|
|
54865
|
+
}, [indent, value]);
|
|
54829
54866
|
if (behavior === "HIDDEN") return null;
|
|
54867
|
+
const renderContext = {
|
|
54868
|
+
fieldId,
|
|
54869
|
+
label,
|
|
54870
|
+
value,
|
|
54871
|
+
formattedValue: formatJson(value, indent),
|
|
54872
|
+
behavior
|
|
54873
|
+
};
|
|
54874
|
+
const updateValue = (nextValue) => {
|
|
54875
|
+
setFieldValue(fieldId, nextValue);
|
|
54876
|
+
onChange?.(nextValue);
|
|
54877
|
+
};
|
|
54878
|
+
const handleTextChange = (event) => {
|
|
54879
|
+
const nextText = event.target.value;
|
|
54880
|
+
editingRef.current = true;
|
|
54881
|
+
setEditorText(nextText);
|
|
54882
|
+
const parsed = parseJson(nextText);
|
|
54883
|
+
setParseError(parsed.error);
|
|
54884
|
+
setFieldError(fieldId, parsed.error);
|
|
54885
|
+
if (!parsed.error) updateValue(parsed.value);
|
|
54886
|
+
};
|
|
54887
|
+
const handleStructuredChange = (nextValue) => {
|
|
54888
|
+
editingRef.current = true;
|
|
54889
|
+
setEditorText(formatJsonForEditing(nextValue, indent));
|
|
54890
|
+
setParseError(void 0);
|
|
54891
|
+
setFieldError(fieldId, null);
|
|
54892
|
+
updateValue(nextValue);
|
|
54893
|
+
};
|
|
54894
|
+
const handleEditorError = (error) => {
|
|
54895
|
+
setParseError(error);
|
|
54896
|
+
setFieldError(fieldId, error);
|
|
54897
|
+
};
|
|
54898
|
+
const handleBlur = () => {
|
|
54899
|
+
editingRef.current = false;
|
|
54900
|
+
const parsed = parseJson(editorText);
|
|
54901
|
+
setParseError(parsed.error);
|
|
54902
|
+
setFieldError(fieldId, parsed.error);
|
|
54903
|
+
if (!parsed.error) {
|
|
54904
|
+
setEditorText(formatJsonForEditing(parsed.value, indent));
|
|
54905
|
+
onBlur?.(parsed.value);
|
|
54906
|
+
return;
|
|
54907
|
+
}
|
|
54908
|
+
onBlur?.(value);
|
|
54909
|
+
};
|
|
54830
54910
|
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
54831
54911
|
FieldWrapper,
|
|
54832
54912
|
{
|
|
@@ -54837,14 +54917,41 @@ function JSONField(props) {
|
|
|
54837
54917
|
className,
|
|
54838
54918
|
labelClassName,
|
|
54839
54919
|
tipsClassName,
|
|
54840
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
54920
|
+
children: behavior === "READONLY" ? renderer ? renderer(renderContext) : /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
54841
54921
|
"pre",
|
|
54842
54922
|
{
|
|
54843
54923
|
className: readonlyClassName || "sy-field-readonly-value",
|
|
54844
54924
|
"data-testid": `jsonfield-readonly-${fieldId}`,
|
|
54845
|
-
children:
|
|
54846
|
-
}
|
|
54847
|
-
)
|
|
54925
|
+
children: renderContext.formattedValue
|
|
54926
|
+
}
|
|
54927
|
+
) : editor ? editor({
|
|
54928
|
+
...renderContext,
|
|
54929
|
+
disabled: behavior === "DISABLED",
|
|
54930
|
+
error: parseError,
|
|
54931
|
+
onChange: handleStructuredChange,
|
|
54932
|
+
onError: handleEditorError
|
|
54933
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { children: [
|
|
54934
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
54935
|
+
import_antd35.Input.TextArea,
|
|
54936
|
+
{
|
|
54937
|
+
className: inputClassName,
|
|
54938
|
+
"data-testid": `jsonfield-input-${fieldId}`,
|
|
54939
|
+
value: editorText,
|
|
54940
|
+
placeholder,
|
|
54941
|
+
rows,
|
|
54942
|
+
disabled: behavior === "DISABLED",
|
|
54943
|
+
status: parseError ? "error" : void 0,
|
|
54944
|
+
"aria-invalid": Boolean(parseError),
|
|
54945
|
+
spellCheck: false,
|
|
54946
|
+
onFocus: () => {
|
|
54947
|
+
editingRef.current = true;
|
|
54948
|
+
},
|
|
54949
|
+
onChange: handleTextChange,
|
|
54950
|
+
onBlur: handleBlur
|
|
54951
|
+
}
|
|
54952
|
+
),
|
|
54953
|
+
parseError && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: "sy-field-error", role: "alert", "data-testid": `jsonfield-error-${fieldId}`, children: parseError })
|
|
54954
|
+
] })
|
|
54848
54955
|
}
|
|
54849
54956
|
);
|
|
54850
54957
|
}
|
|
@@ -55327,6 +55434,7 @@ function FormProvider({
|
|
|
55327
55434
|
const initialValuesRef = (0, import_react69.useRef)(computedInitialValues);
|
|
55328
55435
|
const [formData, setFormData] = (0, import_react69.useState)({ ...computedInitialValues });
|
|
55329
55436
|
const [fieldErrors, setFieldErrors] = (0, import_react69.useState)({});
|
|
55437
|
+
const [componentFieldErrors, setComponentFieldErrors] = (0, import_react69.useState)({});
|
|
55330
55438
|
const [registeredFields] = (0, import_react69.useState)(/* @__PURE__ */ new Set());
|
|
55331
55439
|
(0, import_react69.useEffect)(() => {
|
|
55332
55440
|
if (!schema.fields.some((field) => needsCurrentUserRuntime(field.defaultShortcut?.type)))
|
|
@@ -55418,10 +55526,16 @@ function FormProvider({
|
|
|
55418
55526
|
if (changed) {
|
|
55419
55527
|
setFormData(nextData);
|
|
55420
55528
|
setFieldErrors(nextErrors);
|
|
55529
|
+
setComponentFieldErrors((prev) => {
|
|
55530
|
+
const next = { ...prev };
|
|
55531
|
+
for (const action of valueActions) delete next[action.fieldId];
|
|
55532
|
+
return next;
|
|
55533
|
+
});
|
|
55421
55534
|
}
|
|
55422
55535
|
}, [effects, formData, fieldErrors]);
|
|
55423
55536
|
const setFieldValue = (0, import_react69.useCallback)((fieldId, value) => {
|
|
55424
55537
|
setFormData((prev) => ({ ...prev, [fieldId]: value }));
|
|
55538
|
+
setComponentFieldErrors((prev) => replaceSingleFieldError(prev, fieldId, null));
|
|
55425
55539
|
setFieldErrors((prev) => {
|
|
55426
55540
|
if (prev[fieldId]) {
|
|
55427
55541
|
const next = { ...prev };
|
|
@@ -55431,6 +55545,10 @@ function FormProvider({
|
|
|
55431
55545
|
return prev;
|
|
55432
55546
|
});
|
|
55433
55547
|
}, []);
|
|
55548
|
+
const setFieldError = (0, import_react69.useCallback)((fieldId, error) => {
|
|
55549
|
+
setComponentFieldErrors((prev) => replaceSingleFieldError(prev, fieldId, error || null));
|
|
55550
|
+
setFieldErrors((prev) => replaceSingleFieldError(prev, fieldId, error || null));
|
|
55551
|
+
}, []);
|
|
55434
55552
|
const getFieldValue = (0, import_react69.useCallback)((fieldId) => formData[fieldId], [formData]);
|
|
55435
55553
|
const getFormData2 = (0, import_react69.useCallback)(() => ({ ...formData }), [formData]);
|
|
55436
55554
|
const validateFieldById = (0, import_react69.useCallback)(
|
|
@@ -55441,6 +55559,9 @@ function FormProvider({
|
|
|
55441
55559
|
if (!scopedField) return true;
|
|
55442
55560
|
const parentBehavior = fieldBehaviors[scopedField.parent.fieldId] ?? scopedField.parent.behavior ?? "NORMAL";
|
|
55443
55561
|
if (isInactiveBehavior(parentBehavior) || isInactiveBehavior(scopedField.column.behavior)) {
|
|
55562
|
+
setComponentFieldErrors(
|
|
55563
|
+
(prev) => replaceSingleFieldError(prev, scopedField.scopedFieldId, null)
|
|
55564
|
+
);
|
|
55444
55565
|
setFieldErrors((prev) => replaceSingleFieldError(prev, scopedField.scopedFieldId, null));
|
|
55445
55566
|
return true;
|
|
55446
55567
|
}
|
|
@@ -55460,6 +55581,7 @@ function FormProvider({
|
|
|
55460
55581
|
}
|
|
55461
55582
|
const behavior = fieldBehaviors[fieldId] ?? field.behavior ?? "NORMAL";
|
|
55462
55583
|
if (isInactiveBehavior(behavior)) {
|
|
55584
|
+
setComponentFieldErrors((prev) => clearFieldAndChildrenErrors(prev, fieldId));
|
|
55463
55585
|
setFieldErrors((prev) => {
|
|
55464
55586
|
return clearFieldAndChildrenErrors(prev, fieldId);
|
|
55465
55587
|
});
|
|
@@ -55484,7 +55606,7 @@ function FormProvider({
|
|
|
55484
55606
|
}
|
|
55485
55607
|
if (rules.length === 0 && Object.keys(errors).length === 0) {
|
|
55486
55608
|
if (field.componentName !== "SubFormField") {
|
|
55487
|
-
return
|
|
55609
|
+
return !componentFieldErrors[fieldId];
|
|
55488
55610
|
}
|
|
55489
55611
|
}
|
|
55490
55612
|
setFieldErrors((prev) => {
|
|
@@ -55492,16 +55614,18 @@ function FormProvider({
|
|
|
55492
55614
|
});
|
|
55493
55615
|
return Object.keys(errors).length === 0;
|
|
55494
55616
|
},
|
|
55495
|
-
[schema, formData, fieldBehaviors, fieldOverrides]
|
|
55617
|
+
[schema, formData, fieldBehaviors, componentFieldErrors, fieldOverrides]
|
|
55496
55618
|
);
|
|
55497
55619
|
const validateAllWithErrors = (0, import_react69.useCallback)(async () => {
|
|
55498
55620
|
const fieldRules = {};
|
|
55499
55621
|
const validationData = { ...formData };
|
|
55622
|
+
const activeFieldIds = /* @__PURE__ */ new Set();
|
|
55500
55623
|
for (const field of schema.fields) {
|
|
55501
55624
|
const behavior = fieldBehaviors[field.fieldId] ?? field.behavior ?? "NORMAL";
|
|
55502
55625
|
if (isInactiveBehavior(behavior)) {
|
|
55503
55626
|
continue;
|
|
55504
55627
|
}
|
|
55628
|
+
activeFieldIds.add(field.fieldId);
|
|
55505
55629
|
const rules = buildValidationRules(
|
|
55506
55630
|
field.label,
|
|
55507
55631
|
fieldOverrides[field.fieldId]?.required ?? field.required,
|
|
@@ -55514,10 +55638,20 @@ function FormProvider({
|
|
|
55514
55638
|
collectSubFormValidationRules(field, formData, validationData, fieldRules);
|
|
55515
55639
|
}
|
|
55516
55640
|
}
|
|
55517
|
-
const
|
|
55641
|
+
const componentErrors = Object.fromEntries(
|
|
55642
|
+
Object.entries(componentFieldErrors).filter(
|
|
55643
|
+
([fieldId]) => [...activeFieldIds].some(
|
|
55644
|
+
(activeFieldId) => fieldId === activeFieldId || fieldId.startsWith(`${activeFieldId}.`)
|
|
55645
|
+
)
|
|
55646
|
+
)
|
|
55647
|
+
);
|
|
55648
|
+
const errors = {
|
|
55649
|
+
...componentErrors,
|
|
55650
|
+
...await validateAllFields(validationData, fieldRules)
|
|
55651
|
+
};
|
|
55518
55652
|
setFieldErrors(errors);
|
|
55519
55653
|
return errors;
|
|
55520
|
-
}, [schema, formData, fieldBehaviors, fieldOverrides]);
|
|
55654
|
+
}, [schema, formData, fieldBehaviors, componentFieldErrors, fieldOverrides]);
|
|
55521
55655
|
const validateAll = (0, import_react69.useCallback)(async () => {
|
|
55522
55656
|
const errors = await validateAllWithErrors();
|
|
55523
55657
|
return Object.keys(errors).length === 0;
|
|
@@ -55525,6 +55659,7 @@ function FormProvider({
|
|
|
55525
55659
|
const resetForm = (0, import_react69.useCallback)(() => {
|
|
55526
55660
|
setFormData({ ...initialValuesRef.current });
|
|
55527
55661
|
setFieldErrors({});
|
|
55662
|
+
setComponentFieldErrors({});
|
|
55528
55663
|
}, []);
|
|
55529
55664
|
const registerField = (0, import_react69.useCallback)(
|
|
55530
55665
|
(fieldId) => {
|
|
@@ -55637,6 +55772,7 @@ function FormProvider({
|
|
|
55637
55772
|
submit: config.submit
|
|
55638
55773
|
},
|
|
55639
55774
|
setFieldValue,
|
|
55775
|
+
setFieldError,
|
|
55640
55776
|
getFieldValue,
|
|
55641
55777
|
getFormData: getFormData2,
|
|
55642
55778
|
validateField: validateFieldById,
|
|
@@ -55662,6 +55798,7 @@ function FormProvider({
|
|
|
55662
55798
|
config.formInstanceId,
|
|
55663
55799
|
config.submit,
|
|
55664
55800
|
setFieldValue,
|
|
55801
|
+
setFieldError,
|
|
55665
55802
|
getFieldValue,
|
|
55666
55803
|
getFormData2,
|
|
55667
55804
|
validateFieldById,
|
|
@@ -55672,7 +55809,10 @@ function FormProvider({
|
|
|
55672
55809
|
unregisterField
|
|
55673
55810
|
]
|
|
55674
55811
|
);
|
|
55675
|
-
const registryComponents =
|
|
55812
|
+
const registryComponents = (0, import_react69.useMemo)(
|
|
55813
|
+
() => components ? { ...defaultComponentRegistry, ...components } : defaultComponentRegistry,
|
|
55814
|
+
[components]
|
|
55815
|
+
);
|
|
55676
55816
|
return import_react69.default.createElement(
|
|
55677
55817
|
FormContext.Provider,
|
|
55678
55818
|
{ value: contextValue },
|
|
@@ -56068,7 +56208,7 @@ var sizeClassMap = {
|
|
|
56068
56208
|
default: "sy-gap-y-6 sy-gap-x-6",
|
|
56069
56209
|
large: "sy-gap-y-8 sy-gap-x-8"
|
|
56070
56210
|
};
|
|
56071
|
-
var defaultFullWidthComponents = /* @__PURE__ */ new Set(["SubFormField", "EditorField"]);
|
|
56211
|
+
var defaultFullWidthComponents = /* @__PURE__ */ new Set(["SubFormField", "EditorField", "JSONField"]);
|
|
56072
56212
|
function getDefaultFieldWrapperClass(field, renderContext, hasExplicitGridColumn = false) {
|
|
56073
56213
|
if (renderContext === "grid" || hasExplicitGridColumn) return void 0;
|
|
56074
56214
|
return defaultFullWidthComponents.has(field.componentName) ? "sy-layout-field-full" : "sy-layout-field";
|
|
@@ -56411,7 +56551,7 @@ function FormShell({ children, appearance, className }) {
|
|
|
56411
56551
|
|
|
56412
56552
|
// packages/sdk/src/components/core/validationFeedback.ts
|
|
56413
56553
|
init_cjs_shims();
|
|
56414
|
-
var
|
|
56554
|
+
var import_antd36 = require("antd");
|
|
56415
56555
|
function escapeCss(value) {
|
|
56416
56556
|
return typeof CSS !== "undefined" && CSS.escape ? CSS.escape(value) : value.replace(/["\\]/g, "\\$&");
|
|
56417
56557
|
}
|
|
@@ -56426,7 +56566,7 @@ function scrollToFirstError(errors) {
|
|
|
56426
56566
|
function notifyValidationErrors(errors) {
|
|
56427
56567
|
const firstMessage = Object.values(errors)[0] || "\u8BF7\u5B8C\u5584\u5FC5\u586B\u9879";
|
|
56428
56568
|
try {
|
|
56429
|
-
|
|
56569
|
+
import_antd36.message?.error?.(firstMessage);
|
|
56430
56570
|
} catch {
|
|
56431
56571
|
}
|
|
56432
56572
|
scrollToFirstError(errors);
|
|
@@ -56843,7 +56983,7 @@ function useChangeRecords(options) {
|
|
|
56843
56983
|
|
|
56844
56984
|
// packages/sdk/src/components/modules/RuntimePageShell.tsx
|
|
56845
56985
|
init_cjs_shims();
|
|
56846
|
-
var
|
|
56986
|
+
var import_antd37 = require("antd");
|
|
56847
56987
|
var import_jsx_runtime95 = require("react/jsx-runtime");
|
|
56848
56988
|
var RuntimePageShell = ({
|
|
56849
56989
|
children,
|
|
@@ -56861,13 +57001,13 @@ var RuntimePageShell = ({
|
|
|
56861
57001
|
const maxWidthStyle = typeof maxWidth === "number" ? `${maxWidth}px` : maxWidth;
|
|
56862
57002
|
const renderState = () => {
|
|
56863
57003
|
if (loading) {
|
|
56864
|
-
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "min-h-[360px] flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
57004
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "min-h-[360px] flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_antd37.Spin, { tip: loadingTip }) });
|
|
56865
57005
|
}
|
|
56866
57006
|
if (accessDenied) {
|
|
56867
|
-
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
57007
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_antd37.Empty, { description: "\u65E0\u6743\u9650\u67E5\u770B\u8BE6\u60C5" });
|
|
56868
57008
|
}
|
|
56869
57009
|
if (error) {
|
|
56870
|
-
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
57010
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_antd37.Alert, { type: "error", showIcon: true, message: "\u9875\u9762\u52A0\u8F7D\u5931\u8D25", description: error });
|
|
56871
57011
|
}
|
|
56872
57012
|
if (empty) {
|
|
56873
57013
|
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_jsx_runtime95.Fragment, { children: empty });
|
|
@@ -56895,7 +57035,7 @@ var RuntimePageShell = ({
|
|
|
56895
57035
|
|
|
56896
57036
|
// packages/sdk/src/components/modules/SummaryPanel.tsx
|
|
56897
57037
|
init_cjs_shims();
|
|
56898
|
-
var
|
|
57038
|
+
var import_antd38 = require("antd");
|
|
56899
57039
|
var import_icons16 = require("@ant-design/icons");
|
|
56900
57040
|
var import_jsx_runtime96 = require("react/jsx-runtime");
|
|
56901
57041
|
var toneClasses2 = {
|
|
@@ -56921,7 +57061,7 @@ var SummaryPanel = ({
|
|
|
56921
57061
|
key: "creator",
|
|
56922
57062
|
label: "\u521B\u5EFA\u4EBA",
|
|
56923
57063
|
value: creator?.name || "\u672A\u77E5\u7528\u6237",
|
|
56924
|
-
icon: creator?.avatar ? /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
57064
|
+
icon: creator?.avatar ? /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_antd38.Avatar, { size: 24, src: creator.avatar }) : /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_antd38.Avatar, { size: 24, children: creator?.name?.slice(0, 1) || "\u8868" })
|
|
56925
57065
|
},
|
|
56926
57066
|
{
|
|
56927
57067
|
key: "department",
|
|
@@ -56961,7 +57101,7 @@ var SummaryPanel = ({
|
|
|
56961
57101
|
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("h1", { className: "sy-summary-title m-0 break-words text-2xl font-semibold leading-9 text-ant-text md:text-[28px]", children: title }),
|
|
56962
57102
|
showMobileIdentity && /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "sy-summary-mobile-identity", children: [
|
|
56963
57103
|
creator && /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "sy-summary-mobile-person", children: [
|
|
56964
|
-
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("span", { className: "sy-summary-mobile-avatar", children: creator.avatar ? /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
57104
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("span", { className: "sy-summary-mobile-avatar", children: creator.avatar ? /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_antd38.Avatar, { size: 22, src: creator.avatar }) : /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_antd38.Avatar, { size: 22, children: creator.name?.slice(0, 1) || "\u8868" }) }),
|
|
56965
57105
|
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("span", { className: "sy-summary-mobile-person-name", children: mobileCreatorText })
|
|
56966
57106
|
] }),
|
|
56967
57107
|
createdAt && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "sy-summary-mobile-time", children: createdAt })
|
|
@@ -56982,7 +57122,7 @@ var SummaryPanel = ({
|
|
|
56982
57122
|
// packages/sdk/src/components/modules/RecordChangePanel.tsx
|
|
56983
57123
|
init_cjs_shims();
|
|
56984
57124
|
var import_react77 = require("react");
|
|
56985
|
-
var
|
|
57125
|
+
var import_antd39 = require("antd");
|
|
56986
57126
|
var import_icons17 = require("@ant-design/icons");
|
|
56987
57127
|
var import_jsx_runtime97 = require("react/jsx-runtime");
|
|
56988
57128
|
var sourceLabels = {
|
|
@@ -57000,7 +57140,7 @@ function formatValue(value) {
|
|
|
57000
57140
|
if (value === null || value === void 0 || value === "")
|
|
57001
57141
|
return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { className: "text-ant-text-tertiary", children: "\u7A7A" });
|
|
57002
57142
|
if (Array.isArray(value)) {
|
|
57003
|
-
return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { className: "inline-flex flex-wrap gap-1", children: value.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
57143
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { className: "inline-flex flex-wrap gap-1", children: value.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_antd39.Tag, { className: "m-0", children: String(
|
|
57004
57144
|
typeof item === "object" ? item.label || item.value || JSON.stringify(item) : item
|
|
57005
57145
|
) }, `${index}-${String(item)}`)) });
|
|
57006
57146
|
}
|
|
@@ -57058,7 +57198,7 @@ var RecordChangePanel = ({
|
|
|
57058
57198
|
}
|
|
57059
57199
|
),
|
|
57060
57200
|
expanded && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
57061
|
-
|
|
57201
|
+
import_antd39.Button,
|
|
57062
57202
|
{
|
|
57063
57203
|
type: "text",
|
|
57064
57204
|
size: "small",
|
|
@@ -57070,7 +57210,7 @@ var RecordChangePanel = ({
|
|
|
57070
57210
|
)
|
|
57071
57211
|
] }),
|
|
57072
57212
|
expanded ? /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "p-5", children: [
|
|
57073
|
-
loading && records.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
57213
|
+
loading && records.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_antd39.Skeleton, { active: true, paragraph: { rows: 3 } }) : records.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_antd39.Empty, { description: "\u6682\u65E0\u53D8\u66F4\u8BB0\u5F55" }) : /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "space-y-4", children: records.map((record) => {
|
|
57074
57214
|
const changes = record.changes && record.changes.length > 0 ? record.changes : [
|
|
57075
57215
|
{
|
|
57076
57216
|
fieldKey: record.fieldId,
|
|
@@ -57103,9 +57243,9 @@ var RecordChangePanel = ({
|
|
|
57103
57243
|
] })
|
|
57104
57244
|
] }),
|
|
57105
57245
|
/* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("span", { className: "flex flex-wrap justify-end gap-2", children: [
|
|
57106
|
-
record.changeType && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
57107
|
-
record.changeSource && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
57108
|
-
record.operationId && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
57246
|
+
record.changeType && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_antd39.Tag, { children: typeLabels[record.changeType] || record.changeType }),
|
|
57247
|
+
record.changeSource && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_antd39.Tag, { color: "blue", children: sourceLabels[record.changeSource] || record.changeSource }),
|
|
57248
|
+
record.operationId && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_antd39.Tooltip, { title: `\u64CD\u4F5CID\uFF1A${record.operationId}`, children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_antd39.Tag, { children: record.operationId.slice(0, 8) }) })
|
|
57109
57249
|
] })
|
|
57110
57250
|
] }),
|
|
57111
57251
|
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "mt-4 space-y-3", children: changes.map((change) => /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
|
|
@@ -57129,7 +57269,7 @@ var RecordChangePanel = ({
|
|
|
57129
57269
|
);
|
|
57130
57270
|
}) }),
|
|
57131
57271
|
onPageChange && count > pageSize ? /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "mt-4 flex justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
57132
|
-
|
|
57272
|
+
import_antd39.Pagination,
|
|
57133
57273
|
{
|
|
57134
57274
|
size: "small",
|
|
57135
57275
|
current: page,
|
|
@@ -57138,7 +57278,7 @@ var RecordChangePanel = ({
|
|
|
57138
57278
|
onChange: onPageChange,
|
|
57139
57279
|
showSizeChanger: true
|
|
57140
57280
|
}
|
|
57141
|
-
) }) : hasMore ? /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
57281
|
+
) }) : hasMore ? /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_antd39.Button, { block: true, className: "mt-4", onClick: onLoadMore, loading, children: "\u52A0\u8F7D\u66F4\u591A" }) : null
|
|
57142
57282
|
] }) : /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "px-5 py-4 text-sm text-ant-text-tertiary", children: "\u70B9\u51FB\u5C55\u5F00\u67E5\u770B\u53D8\u66F4\u8BB0\u5F55" })
|
|
57143
57283
|
]
|
|
57144
57284
|
}
|
|
@@ -57147,46 +57287,46 @@ var RecordChangePanel = ({
|
|
|
57147
57287
|
|
|
57148
57288
|
// packages/sdk/src/components/templates/PageSkeleton.tsx
|
|
57149
57289
|
init_cjs_shims();
|
|
57150
|
-
var
|
|
57290
|
+
var import_antd40 = require("antd");
|
|
57151
57291
|
var import_jsx_runtime98 = require("react/jsx-runtime");
|
|
57152
57292
|
var CardSkeleton = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "bg-white rounded-xl shadow-sm border border-gray-100 p-6", children });
|
|
57153
57293
|
var SummaryCardSkeleton = () => /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(CardSkeleton, { children: [
|
|
57154
57294
|
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "flex items-start justify-between", children: [
|
|
57155
57295
|
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "flex-1", children: [
|
|
57156
|
-
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
57157
|
-
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "mt-2", children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
57296
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_antd40.Skeleton.Input, { active: true, size: "large", style: { width: 200 } }),
|
|
57297
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "mt-2", children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_antd40.Skeleton.Input, { active: true, size: "small", style: { width: 80 } }) })
|
|
57158
57298
|
] }),
|
|
57159
|
-
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
57299
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_antd40.Skeleton.Button, { active: true, size: "small", shape: "round", style: { width: 60 } })
|
|
57160
57300
|
] }),
|
|
57161
57301
|
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "flex items-center gap-3 mt-4", children: [
|
|
57162
|
-
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
57163
|
-
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
57302
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_antd40.Skeleton.Avatar, { active: true, size: "small" }),
|
|
57303
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_antd40.Skeleton.Input, { active: true, size: "small", style: { width: 120 } })
|
|
57164
57304
|
] })
|
|
57165
57305
|
] });
|
|
57166
57306
|
var FormGridSkeleton = () => /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(CardSkeleton, { children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-5", children: Array.from({ length: 6 }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "space-y-2", children: [
|
|
57167
|
-
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
57168
|
-
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
57307
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_antd40.Skeleton.Input, { active: true, size: "small", style: { width: 80 } }),
|
|
57308
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_antd40.Skeleton.Input, { active: true, block: true, style: { width: "100%" } })
|
|
57169
57309
|
] }, i)) }) });
|
|
57170
57310
|
var ActionBarSkeleton = () => /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("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__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "flex items-center justify-end gap-3", children: [
|
|
57171
|
-
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
57172
|
-
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
57311
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_antd40.Skeleton.Button, { active: true, style: { width: 80 } }),
|
|
57312
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_antd40.Skeleton.Button, { active: true, style: { width: 80 } })
|
|
57173
57313
|
] }) });
|
|
57174
57314
|
var TimelineSkeleton = () => /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(CardSkeleton, { children: [
|
|
57175
|
-
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
57315
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_antd40.Skeleton.Input, { active: true, size: "medium", style: { width: 100, marginBottom: 16 } }),
|
|
57176
57316
|
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "space-y-4", children: Array.from({ length: 3 }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "flex gap-4", children: [
|
|
57177
57317
|
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "flex flex-col items-center", children: [
|
|
57178
57318
|
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "w-3 h-3 rounded-full bg-gray-200 animate-pulse" }),
|
|
57179
57319
|
i < 2 && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "w-0.5 flex-1 bg-gray-200 mt-1" })
|
|
57180
57320
|
] }),
|
|
57181
|
-
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "flex-1 pb-4", children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
57321
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "flex-1 pb-4", children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_antd40.Skeleton, { active: true, paragraph: { rows: 1 }, title: { width: "60%" } }) })
|
|
57182
57322
|
] }, i)) })
|
|
57183
57323
|
] });
|
|
57184
57324
|
var PageSkeleton = ({ type }) => {
|
|
57185
57325
|
if (type === "submit") {
|
|
57186
57326
|
return /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "space-y-6", children: [
|
|
57187
57327
|
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)("div", { className: "space-y-2", children: [
|
|
57188
|
-
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
57189
|
-
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
57328
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_antd40.Skeleton.Input, { active: true, size: "large", style: { width: 200 } }),
|
|
57329
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_antd40.Skeleton.Input, { active: true, size: "small", style: { width: 300 } })
|
|
57190
57330
|
] }),
|
|
57191
57331
|
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(FormGridSkeleton, {}),
|
|
57192
57332
|
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(ActionBarSkeleton, {})
|
|
@@ -57237,6 +57377,7 @@ var InnerDetailContent = ({
|
|
|
57237
57377
|
renderActions,
|
|
57238
57378
|
onDelete,
|
|
57239
57379
|
onSave,
|
|
57380
|
+
components,
|
|
57240
57381
|
inDrawer = false
|
|
57241
57382
|
}) => {
|
|
57242
57383
|
const formDataRef = (0, import_react78.useRef)(void 0);
|
|
@@ -57378,16 +57519,25 @@ var InnerDetailContent = ({
|
|
|
57378
57519
|
] }) }),
|
|
57379
57520
|
/* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "sy-detail-main", children: [
|
|
57380
57521
|
mode === "edit" && /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("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" }),
|
|
57381
|
-
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "sy-detail-card", children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
57382
|
-
|
|
57383
|
-
|
|
57384
|
-
|
|
57385
|
-
|
|
57386
|
-
|
|
57387
|
-
|
|
57388
|
-
|
|
57389
|
-
|
|
57390
|
-
|
|
57522
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "sy-detail-card", children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
57523
|
+
FormProvider,
|
|
57524
|
+
{
|
|
57525
|
+
schema,
|
|
57526
|
+
config: formConfig,
|
|
57527
|
+
initialValues: formData ?? void 0,
|
|
57528
|
+
components,
|
|
57529
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(FormShell, { appearance: schema.template?.appearance, className: "sy-form-shell", children: [
|
|
57530
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(FormDataBridge, { formDataRef, validateRef }),
|
|
57531
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
57532
|
+
FormRenderer,
|
|
57533
|
+
{
|
|
57534
|
+
columns: schema.template?.appearance?.columns ?? 2,
|
|
57535
|
+
size: schema.template?.appearance?.rendererSize ?? "default"
|
|
57536
|
+
}
|
|
57537
|
+
)
|
|
57538
|
+
] })
|
|
57539
|
+
}
|
|
57540
|
+
) }),
|
|
57391
57541
|
enableChangeRecords && canViewChangeRecords && /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "mt-6", children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
57392
57542
|
RecordChangePanel,
|
|
57393
57543
|
{
|
|
@@ -57408,20 +57558,20 @@ var InnerDetailContent = ({
|
|
|
57408
57558
|
);
|
|
57409
57559
|
};
|
|
57410
57560
|
var FormDetailTemplate = (props) => {
|
|
57411
|
-
const { schema, formUuid, appType, formInstanceId } = props;
|
|
57561
|
+
const { schema, formUuid, appType, formInstanceId, components } = props;
|
|
57412
57562
|
const wrapperConfig = {
|
|
57413
57563
|
mode: "readonly",
|
|
57414
57564
|
formUuid,
|
|
57415
57565
|
appType,
|
|
57416
57566
|
formInstanceId
|
|
57417
57567
|
};
|
|
57418
|
-
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(FormProvider, { schema, config: wrapperConfig, children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(InnerDetailContent, { ...props }) });
|
|
57568
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(FormProvider, { schema, config: wrapperConfig, components, children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(InnerDetailContent, { ...props }) });
|
|
57419
57569
|
};
|
|
57420
57570
|
|
|
57421
57571
|
// packages/sdk/src/components/templates/FormSubmitTemplate.tsx
|
|
57422
57572
|
init_cjs_shims();
|
|
57423
57573
|
var import_react81 = require("react");
|
|
57424
|
-
var
|
|
57574
|
+
var import_antd42 = require("antd");
|
|
57425
57575
|
var import_icons19 = require("@ant-design/icons");
|
|
57426
57576
|
|
|
57427
57577
|
// packages/sdk/src/components/hooks/useDraftStorage.ts
|
|
@@ -57647,7 +57797,7 @@ function useFormNavigation(options) {
|
|
|
57647
57797
|
|
|
57648
57798
|
// packages/sdk/src/components/modules/DraftManager.tsx
|
|
57649
57799
|
init_cjs_shims();
|
|
57650
|
-
var
|
|
57800
|
+
var import_antd41 = require("antd");
|
|
57651
57801
|
var import_icons18 = require("@ant-design/icons");
|
|
57652
57802
|
var import_jsx_runtime100 = require("react/jsx-runtime");
|
|
57653
57803
|
function formatRelativeTime(timestamp) {
|
|
@@ -57687,8 +57837,8 @@ var DraftManager = ({
|
|
|
57687
57837
|
] })
|
|
57688
57838
|
] }),
|
|
57689
57839
|
/* @__PURE__ */ (0, import_jsx_runtime100.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
57690
|
-
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
57691
|
-
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
57840
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(import_antd41.Button, { type: "text", size: "small", onClick: onDiscard, className: "!text-gray-500", children: "\u4E22\u5F03" }),
|
|
57841
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(import_antd41.Button, { type: "primary", size: "small", onClick: onRestore, children: "\u6062\u590D\u586B\u5199" })
|
|
57692
57842
|
] })
|
|
57693
57843
|
] })
|
|
57694
57844
|
}
|
|
@@ -57792,8 +57942,8 @@ var SubmitSuccessCard = ({
|
|
|
57792
57942
|
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)("h2", { className: "text-lg font-semibold text-gray-900 mb-1", children: "\u63D0\u4EA4\u6210\u529F" }),
|
|
57793
57943
|
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)("p", { className: "text-sm text-gray-500 mb-6", children: info.message || "\u5DF2\u6210\u529F\u521B\u5EFA\u4E00\u6761\u65B0\u8BB0\u5F55" }),
|
|
57794
57944
|
/* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: "flex gap-3", children: [
|
|
57795
|
-
(mode === "stay" || mode === "redirect") && /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
57796
|
-
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
57945
|
+
(mode === "stay" || mode === "redirect") && /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_antd42.Button, { onClick: onContinue, children: "\u7EE7\u7EED\u63D0\u4EA4" }),
|
|
57946
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_antd42.Button, { type: "primary", onClick: onViewDetail, children: "\u67E5\u770B\u8BE6\u60C5" })
|
|
57797
57947
|
] }),
|
|
57798
57948
|
isRedirecting && /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: "mt-6 w-48", children: [
|
|
57799
57949
|
/* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: "text-xs text-gray-400 text-center mb-1", children: [
|
|
@@ -57898,7 +58048,7 @@ var InnerFormContent = ({
|
|
|
57898
58048
|
const loadedUser = runtimeUser || unwrapRuntimePayload3(await api.getUserById("current"));
|
|
57899
58049
|
const departments = normalizeDepartmentOptions(loadedUser?.departments);
|
|
57900
58050
|
if (departments.length === 0) {
|
|
57901
|
-
|
|
58051
|
+
import_antd42.message.error("\u5F53\u524D\u8D26\u53F7\u672A\u5206\u914D\u90E8\u95E8\uFF0C\u65E0\u6CD5\u53D1\u8D77\u4E3B\u7BA1\u5BA1\u6279\u6D41\u7A0B");
|
|
57902
58052
|
return null;
|
|
57903
58053
|
}
|
|
57904
58054
|
if (departments.length === 1) {
|
|
@@ -57967,7 +58117,7 @@ var InnerFormContent = ({
|
|
|
57967
58117
|
}
|
|
57968
58118
|
} catch (error) {
|
|
57969
58119
|
console.error("[FormSubmitTemplate] Submit failed:", error);
|
|
57970
|
-
|
|
58120
|
+
import_antd42.message.error(error instanceof Error ? error.message : "\u63D0\u4EA4\u5931\u8D25");
|
|
57971
58121
|
} finally {
|
|
57972
58122
|
setSubmitting(false);
|
|
57973
58123
|
}
|
|
@@ -58033,7 +58183,7 @@ var InnerFormContent = ({
|
|
|
58033
58183
|
try {
|
|
58034
58184
|
submissionDepartmentId = saveDraftSubmit ? void 0 : await resolveSubmissionDepartmentId();
|
|
58035
58185
|
} catch (error) {
|
|
58036
|
-
|
|
58186
|
+
import_antd42.message.error(error instanceof Error ? error.message : "\u63D0\u4EA4\u5931\u8D25");
|
|
58037
58187
|
return;
|
|
58038
58188
|
}
|
|
58039
58189
|
if (submissionDepartmentId === null) {
|
|
@@ -58059,7 +58209,7 @@ var InnerFormContent = ({
|
|
|
58059
58209
|
}
|
|
58060
58210
|
} catch (error) {
|
|
58061
58211
|
console.error("[FormSubmitTemplate] Load initiator approver requirements failed:", error);
|
|
58062
|
-
|
|
58212
|
+
import_antd42.message.error(error instanceof Error ? error.message : "\u52A0\u8F7D\u5BA1\u6279\u4EBA\u9009\u62E9\u8981\u6C42\u5931\u8D25");
|
|
58063
58213
|
return;
|
|
58064
58214
|
}
|
|
58065
58215
|
}
|
|
@@ -58164,7 +58314,7 @@ var InnerFormContent = ({
|
|
|
58164
58314
|
onChange: setDepartmentId,
|
|
58165
58315
|
options: departmentOptions
|
|
58166
58316
|
}) : /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
58167
|
-
|
|
58317
|
+
import_antd42.Select,
|
|
58168
58318
|
{
|
|
58169
58319
|
allowClear: true,
|
|
58170
58320
|
className: "w-full",
|
|
@@ -58274,7 +58424,7 @@ var InnerFormContent = ({
|
|
|
58274
58424
|
}
|
|
58275
58425
|
),
|
|
58276
58426
|
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
58277
|
-
|
|
58427
|
+
import_antd42.Modal,
|
|
58278
58428
|
{
|
|
58279
58429
|
getContainer: false,
|
|
58280
58430
|
open: submissionDepartmentModalOpen,
|
|
@@ -58283,7 +58433,7 @@ var InnerFormContent = ({
|
|
|
58283
58433
|
cancelText: "\u53D6\u6D88",
|
|
58284
58434
|
onOk: () => {
|
|
58285
58435
|
if (!selectedSubmissionDepartmentId) {
|
|
58286
|
-
|
|
58436
|
+
import_antd42.message.error("\u8BF7\u9009\u62E9\u63D0\u4EA4\u90E8\u95E8");
|
|
58287
58437
|
return;
|
|
58288
58438
|
}
|
|
58289
58439
|
setDepartmentId(selectedSubmissionDepartmentId);
|
|
@@ -58292,7 +58442,7 @@ var InnerFormContent = ({
|
|
|
58292
58442
|
onCancel: () => closeSubmissionDepartmentModal(null),
|
|
58293
58443
|
destroyOnHidden: true,
|
|
58294
58444
|
children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
58295
|
-
|
|
58445
|
+
import_antd42.Select,
|
|
58296
58446
|
{
|
|
58297
58447
|
className: "w-full",
|
|
58298
58448
|
placeholder: "\u8BF7\u9009\u62E9\u63D0\u4EA4\u90E8\u95E8",
|
|
@@ -58325,39 +58475,49 @@ var FormSubmitTemplate = ({
|
|
|
58325
58475
|
renderSuccess,
|
|
58326
58476
|
onSubmitSuccess,
|
|
58327
58477
|
initialValues,
|
|
58478
|
+
components,
|
|
58328
58479
|
inDrawer = false
|
|
58329
58480
|
}) => {
|
|
58330
58481
|
const resolvedFormType = normalizeSubmitFormType(formType);
|
|
58331
58482
|
const resolvedEnableProcessPreview = enableProcessPreview ?? schema.template?.enableProcessPreview ?? resolvedFormType === "process";
|
|
58332
|
-
return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
58333
|
-
|
|
58483
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
58484
|
+
FormProvider,
|
|
58334
58485
|
{
|
|
58335
58486
|
schema,
|
|
58336
58487
|
config,
|
|
58337
|
-
|
|
58338
|
-
|
|
58339
|
-
|
|
58340
|
-
|
|
58341
|
-
|
|
58342
|
-
|
|
58343
|
-
|
|
58344
|
-
|
|
58345
|
-
|
|
58346
|
-
|
|
58347
|
-
|
|
58348
|
-
|
|
58349
|
-
|
|
58350
|
-
|
|
58351
|
-
|
|
58488
|
+
initialValues,
|
|
58489
|
+
components,
|
|
58490
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
58491
|
+
InnerFormContent,
|
|
58492
|
+
{
|
|
58493
|
+
schema,
|
|
58494
|
+
config,
|
|
58495
|
+
formType: resolvedFormType,
|
|
58496
|
+
submitSuccessMode,
|
|
58497
|
+
enableDraft,
|
|
58498
|
+
enableProcessPreview: resolvedEnableProcessPreview,
|
|
58499
|
+
enableSubmissionDepartmentSelect,
|
|
58500
|
+
departmentOptions,
|
|
58501
|
+
header,
|
|
58502
|
+
footer,
|
|
58503
|
+
beforeForm,
|
|
58504
|
+
afterForm,
|
|
58505
|
+
renderDepartmentSelector,
|
|
58506
|
+
renderForm,
|
|
58507
|
+
renderSuccess,
|
|
58508
|
+
onSubmitSuccess,
|
|
58509
|
+
inDrawer
|
|
58510
|
+
}
|
|
58511
|
+
)
|
|
58352
58512
|
}
|
|
58353
|
-
)
|
|
58513
|
+
);
|
|
58354
58514
|
};
|
|
58355
58515
|
|
|
58356
58516
|
// packages/sdk/src/components/templates/ProcessDetailTemplate.tsx
|
|
58357
58517
|
init_cjs_shims();
|
|
58358
58518
|
var import_react86 = require("react");
|
|
58359
58519
|
var import_dayjs11 = __toESM(require("dayjs"));
|
|
58360
|
-
var
|
|
58520
|
+
var import_antd44 = require("antd");
|
|
58361
58521
|
|
|
58362
58522
|
// packages/sdk/src/components/hooks/useProcessDetail.ts
|
|
58363
58523
|
init_cjs_shims();
|
|
@@ -58935,7 +59095,7 @@ function useApprovalActions(options) {
|
|
|
58935
59095
|
// packages/sdk/src/components/modules/ApprovalActionBar.tsx
|
|
58936
59096
|
init_cjs_shims();
|
|
58937
59097
|
var import_react85 = __toESM(require("react"));
|
|
58938
|
-
var
|
|
59098
|
+
var import_antd43 = require("antd");
|
|
58939
59099
|
var import_icons20 = require("@ant-design/icons");
|
|
58940
59100
|
var import_jsx_runtime102 = require("react/jsx-runtime");
|
|
58941
59101
|
var actionPriority2 = {
|
|
@@ -58996,7 +59156,7 @@ function DefaultTransferSelector({
|
|
|
58996
59156
|
const selectedLabel = selectedUsers[0] ? getUserName(selectedUsers[0]) : value;
|
|
58997
59157
|
return /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(import_jsx_runtime102.Fragment, { children: [
|
|
58998
59158
|
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
58999
|
-
|
|
59159
|
+
import_antd43.Input,
|
|
59000
59160
|
{
|
|
59001
59161
|
readOnly: true,
|
|
59002
59162
|
value: selectedLabel,
|
|
@@ -59046,7 +59206,7 @@ var ApprovalActionBar = ({
|
|
|
59046
59206
|
inDrawer = false,
|
|
59047
59207
|
maxWidth
|
|
59048
59208
|
}) => {
|
|
59049
|
-
const [form] =
|
|
59209
|
+
const [form] = import_antd43.Form.useForm();
|
|
59050
59210
|
const [modalAction, setModalAction] = (0, import_react85.useState)(null);
|
|
59051
59211
|
const [activeAction, setActiveAction] = (0, import_react85.useState)(null);
|
|
59052
59212
|
const [loading, setLoading] = (0, import_react85.useState)(false);
|
|
@@ -59151,7 +59311,7 @@ var ApprovalActionBar = ({
|
|
|
59151
59311
|
}
|
|
59152
59312
|
),
|
|
59153
59313
|
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
59154
|
-
|
|
59314
|
+
import_antd43.Modal,
|
|
59155
59315
|
{
|
|
59156
59316
|
getContainer: false,
|
|
59157
59317
|
title: getModalTitle2(modalAction),
|
|
@@ -59166,9 +59326,9 @@ var ApprovalActionBar = ({
|
|
|
59166
59326
|
form.resetFields();
|
|
59167
59327
|
},
|
|
59168
59328
|
destroyOnHidden: true,
|
|
59169
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(
|
|
59329
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(import_antd43.Form, { form, layout: "vertical", children: [
|
|
59170
59330
|
modalAction === "transfer" && /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
59171
|
-
|
|
59331
|
+
import_antd43.Form.Item,
|
|
59172
59332
|
{
|
|
59173
59333
|
name: "userId",
|
|
59174
59334
|
label: "\u8F6C\u4EA4\u7ED9",
|
|
@@ -59191,13 +59351,13 @@ var ApprovalActionBar = ({
|
|
|
59191
59351
|
formatReturnPolicy(returnPolicy)
|
|
59192
59352
|
] }),
|
|
59193
59353
|
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
59194
|
-
|
|
59354
|
+
import_antd43.Form.Item,
|
|
59195
59355
|
{
|
|
59196
59356
|
name: "nodeId",
|
|
59197
59357
|
label: "\u9000\u56DE\u5230\u8282\u70B9",
|
|
59198
59358
|
rules: [{ required: true, message: "\u8BF7\u9009\u62E9\u9000\u56DE\u8282\u70B9" }],
|
|
59199
59359
|
children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
59200
|
-
|
|
59360
|
+
import_antd43.Select,
|
|
59201
59361
|
{
|
|
59202
59362
|
placeholder: "\u8BF7\u9009\u62E9\u9000\u56DE\u8282\u70B9",
|
|
59203
59363
|
getPopupContainer: (triggerNode) => triggerNode.parentElement || document.body,
|
|
@@ -59211,12 +59371,12 @@ var ApprovalActionBar = ({
|
|
|
59211
59371
|
)
|
|
59212
59372
|
] }),
|
|
59213
59373
|
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
59214
|
-
|
|
59374
|
+
import_antd43.Form.Item,
|
|
59215
59375
|
{
|
|
59216
59376
|
name: modalAction === "withdraw" || modalAction === "transfer" || modalAction === "return" ? "reason" : "comments",
|
|
59217
59377
|
label: modalAction === "withdraw" ? "\u64A4\u9500\u539F\u56E0" : modalAction === "transfer" ? "\u8F6C\u4EA4\u539F\u56E0" : modalAction === "return" ? "\u9000\u56DE\u539F\u56E0" : "\u5BA1\u6279\u610F\u89C1",
|
|
59218
59378
|
rules: [{ required: requiredComment, message: "\u8BF7\u586B\u5199\u8BF4\u660E" }],
|
|
59219
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
59379
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_antd43.Input.TextArea, { rows: 4, maxLength: 500, showCount: true, placeholder: "\u8BF7\u8F93\u5165\u8BF4\u660E" })
|
|
59220
59380
|
}
|
|
59221
59381
|
),
|
|
59222
59382
|
activeAction && renderActionModalExtra?.(activeAction)
|
|
@@ -59315,11 +59475,12 @@ var InnerProcessContent = ({
|
|
|
59315
59475
|
onActionComplete,
|
|
59316
59476
|
onSave,
|
|
59317
59477
|
onDelete,
|
|
59478
|
+
components,
|
|
59318
59479
|
inDrawer = false
|
|
59319
59480
|
}) => {
|
|
59320
59481
|
const formDataRef = (0, import_react86.useRef)(void 0);
|
|
59321
59482
|
const validateRef = (0, import_react86.useRef)(void 0);
|
|
59322
|
-
const [withdrawForm] =
|
|
59483
|
+
const [withdrawForm] = import_antd44.Form.useForm();
|
|
59323
59484
|
const [withdrawOpen, setWithdrawOpen] = (0, import_react86.useState)(false);
|
|
59324
59485
|
const [withdrawLoading, setWithdrawLoading] = (0, import_react86.useState)(false);
|
|
59325
59486
|
const [saveLoading, setSaveLoading] = (0, import_react86.useState)(false);
|
|
@@ -59438,7 +59599,7 @@ var InnerProcessContent = ({
|
|
|
59438
59599
|
if (!await validateForm()) return;
|
|
59439
59600
|
const values = formDataRef.current?.() ?? formData ?? {};
|
|
59440
59601
|
if (!currentTaskId) {
|
|
59441
|
-
|
|
59602
|
+
import_antd44.message.error("\u672A\u627E\u5230\u53D1\u8D77\u4EBA\u4FEE\u6539\u4EFB\u52A1");
|
|
59442
59603
|
return;
|
|
59443
59604
|
}
|
|
59444
59605
|
let requirements = [];
|
|
@@ -59454,7 +59615,7 @@ var InnerProcessContent = ({
|
|
|
59454
59615
|
"[ProcessDetailTemplate] Load resubmit initiator approver requirements failed:",
|
|
59455
59616
|
error
|
|
59456
59617
|
);
|
|
59457
|
-
|
|
59618
|
+
import_antd44.message.error(error instanceof Error ? error.message : "\u52A0\u8F7D\u5BA1\u6279\u4EBA\u9009\u62E9\u8981\u6C42\u5931\u8D25");
|
|
59458
59619
|
return;
|
|
59459
59620
|
}
|
|
59460
59621
|
if (requirements.length > 0) {
|
|
@@ -59754,6 +59915,7 @@ var InnerProcessContent = ({
|
|
|
59754
59915
|
schema,
|
|
59755
59916
|
config: formConfig,
|
|
59756
59917
|
initialValues: formData ?? void 0,
|
|
59918
|
+
components,
|
|
59757
59919
|
children: /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(FormShell, { appearance: schema.template?.appearance, className: "sy-form-shell", children: [
|
|
59758
59920
|
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(FormDataBridge2, { formDataRef, validateRef }),
|
|
59759
59921
|
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
@@ -59797,7 +59959,7 @@ var InnerProcessContent = ({
|
|
|
59797
59959
|
)
|
|
59798
59960
|
] }),
|
|
59799
59961
|
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
59800
|
-
|
|
59962
|
+
import_antd44.Modal,
|
|
59801
59963
|
{
|
|
59802
59964
|
getContainer: false,
|
|
59803
59965
|
title: "\u64A4\u9500\u6D41\u7A0B",
|
|
@@ -59809,13 +59971,13 @@ var InnerProcessContent = ({
|
|
|
59809
59971
|
onOk: handleFooterWithdraw,
|
|
59810
59972
|
onCancel: handleFooterWithdrawCancel,
|
|
59811
59973
|
destroyOnHidden: true,
|
|
59812
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
59813
|
-
|
|
59974
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_antd44.Form, { form: withdrawForm, layout: "vertical", children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
59975
|
+
import_antd44.Form.Item,
|
|
59814
59976
|
{
|
|
59815
59977
|
name: "reason",
|
|
59816
59978
|
label: "\u64A4\u9500\u539F\u56E0",
|
|
59817
59979
|
rules: [{ required: true, message: "\u8BF7\u586B\u5199\u64A4\u9500\u539F\u56E0" }],
|
|
59818
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
59980
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_antd44.Input.TextArea, { rows: 4, maxLength: 500, showCount: true, placeholder: "\u8BF7\u8F93\u5165\u64A4\u9500\u539F\u56E0" })
|
|
59819
59981
|
}
|
|
59820
59982
|
) })
|
|
59821
59983
|
}
|
|
@@ -59837,14 +59999,14 @@ var InnerProcessContent = ({
|
|
|
59837
59999
|
);
|
|
59838
60000
|
};
|
|
59839
60001
|
var ProcessDetailTemplate = (props) => {
|
|
59840
|
-
const { schema, formUuid, appType, formInstanceId } = props;
|
|
60002
|
+
const { schema, formUuid, appType, formInstanceId, components } = props;
|
|
59841
60003
|
const wrapperConfig = {
|
|
59842
60004
|
mode: "readonly",
|
|
59843
60005
|
formUuid,
|
|
59844
60006
|
appType,
|
|
59845
60007
|
formInstanceId
|
|
59846
60008
|
};
|
|
59847
|
-
return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(FormProvider, { schema, config: wrapperConfig, children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(InnerProcessContent, { ...props }) });
|
|
60009
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(FormProvider, { schema, config: wrapperConfig, components, children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(InnerProcessContent, { ...props }) });
|
|
59848
60010
|
};
|
|
59849
60011
|
|
|
59850
60012
|
// packages/sdk/src/components/templates/StandardFormPage.tsx
|
|
@@ -59868,6 +60030,7 @@ var StandardFormPage = ({
|
|
|
59868
60030
|
compatibility,
|
|
59869
60031
|
onSubmit,
|
|
59870
60032
|
onSubmitSuccess,
|
|
60033
|
+
components,
|
|
59871
60034
|
inDrawer
|
|
59872
60035
|
}) => {
|
|
59873
60036
|
const resolvedMode = mode || schema.template?.defaultMode || "submit";
|
|
@@ -59908,6 +60071,7 @@ var StandardFormPage = ({
|
|
|
59908
60071
|
enableEdit: schema.template?.enableEdit,
|
|
59909
60072
|
enableDelete: schema.template?.enableDelete,
|
|
59910
60073
|
enableChangeRecords: schema.template?.enableChangeRecords,
|
|
60074
|
+
components,
|
|
59911
60075
|
inDrawer
|
|
59912
60076
|
}
|
|
59913
60077
|
);
|
|
@@ -59923,6 +60087,7 @@ var StandardFormPage = ({
|
|
|
59923
60087
|
enableEdit: schema.template?.enableEdit,
|
|
59924
60088
|
enableDelete: schema.template?.enableDelete,
|
|
59925
60089
|
enableChangeRecords: schema.template?.enableChangeRecords,
|
|
60090
|
+
components,
|
|
59926
60091
|
inDrawer
|
|
59927
60092
|
}
|
|
59928
60093
|
);
|
|
@@ -59948,6 +60113,7 @@ var StandardFormPage = ({
|
|
|
59948
60113
|
enableProcessPreview: schema.template?.enableProcessPreview,
|
|
59949
60114
|
initialValues: initialValues ?? void 0,
|
|
59950
60115
|
onSubmitSuccess,
|
|
60116
|
+
components,
|
|
59951
60117
|
inDrawer
|
|
59952
60118
|
}
|
|
59953
60119
|
);
|
|
@@ -60737,7 +60903,7 @@ var renderStatusTag = (value, fieldId) => {
|
|
|
60737
60903
|
};
|
|
60738
60904
|
if (fieldId !== "processInstanceStatus" && fieldId !== "approvalResult") return null;
|
|
60739
60905
|
const meta = statusMap[raw];
|
|
60740
|
-
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
60906
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_antd45.Tag, { color: meta?.color, children: meta?.label || raw || "--" });
|
|
60741
60907
|
};
|
|
60742
60908
|
var renderCellValue = (value, field) => {
|
|
60743
60909
|
const status = renderStatusTag(value, field.fieldId);
|
|
@@ -60759,17 +60925,17 @@ var renderCellValue = (value, field) => {
|
|
|
60759
60925
|
)) });
|
|
60760
60926
|
}
|
|
60761
60927
|
if (field.componentName === "AttachmentField") {
|
|
60762
|
-
return /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(
|
|
60763
|
-
value.slice(0, 3).map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
60764
|
-
value.length > 3 && /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(
|
|
60928
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(import_antd45.Space, { size: 4, wrap: true, children: [
|
|
60929
|
+
value.slice(0, 3).map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_antd45.Tag, { children: item?.name || item?.originalName || `\u9644\u4EF6${index + 1}` }, item?.uid || item?.id || index)),
|
|
60930
|
+
value.length > 3 && /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(import_antd45.Tag, { children: [
|
|
60765
60931
|
"+",
|
|
60766
60932
|
value.length - 3
|
|
60767
60933
|
] })
|
|
60768
60934
|
] });
|
|
60769
60935
|
}
|
|
60770
|
-
return /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(
|
|
60771
|
-
value.slice(0, 4).map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
60772
|
-
value.length > 4 && /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(
|
|
60936
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(import_antd45.Space, { size: 4, wrap: true, children: [
|
|
60937
|
+
value.slice(0, 4).map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_antd45.Tag, { children: pickOptionLabel(field, item) }, `${field.fieldId}_${index}`)),
|
|
60938
|
+
value.length > 4 && /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(import_antd45.Tag, { children: [
|
|
60773
60939
|
"+",
|
|
60774
60940
|
value.length - 4
|
|
60775
60941
|
] })
|
|
@@ -60785,7 +60951,7 @@ var renderCellValue = (value, field) => {
|
|
|
60785
60951
|
if (value.label || value.name || value.value) {
|
|
60786
60952
|
return pickOptionLabel(field, value);
|
|
60787
60953
|
}
|
|
60788
|
-
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
60954
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_antd45.Tooltip, { title: JSON.stringify(value), children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("span", { className: "text-ant-color-text-secondary", children: "\u5BF9\u8C61\u6570\u636E" }) });
|
|
60789
60955
|
}
|
|
60790
60956
|
if (["SelectField", "RadioField", "CheckboxField", "MultiSelectField"].includes(field.componentName)) {
|
|
60791
60957
|
return pickOptionLabel(field, value);
|
|
@@ -61054,7 +61220,7 @@ function AsyncEntityFilterSelect({
|
|
|
61054
61220
|
void loadOptions();
|
|
61055
61221
|
}, [loadOptions]);
|
|
61056
61222
|
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
61057
|
-
|
|
61223
|
+
import_antd45.Select,
|
|
61058
61224
|
{
|
|
61059
61225
|
showSearch: true,
|
|
61060
61226
|
allowClear: true,
|
|
@@ -61086,7 +61252,7 @@ function FilterValueEditor({
|
|
|
61086
61252
|
const range = Array.isArray(value) ? value : [void 0, void 0];
|
|
61087
61253
|
return /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { className: "flex w-full gap-2", children: [
|
|
61088
61254
|
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
61089
|
-
|
|
61255
|
+
import_antd45.InputNumber,
|
|
61090
61256
|
{
|
|
61091
61257
|
className: "w-full",
|
|
61092
61258
|
placeholder: "\u6700\u5C0F\u503C",
|
|
@@ -61095,7 +61261,7 @@ function FilterValueEditor({
|
|
|
61095
61261
|
}
|
|
61096
61262
|
),
|
|
61097
61263
|
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
61098
|
-
|
|
61264
|
+
import_antd45.InputNumber,
|
|
61099
61265
|
{
|
|
61100
61266
|
className: "w-full",
|
|
61101
61267
|
placeholder: "\u6700\u5927\u503C",
|
|
@@ -61106,7 +61272,7 @@ function FilterValueEditor({
|
|
|
61106
61272
|
] });
|
|
61107
61273
|
}
|
|
61108
61274
|
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
61109
|
-
|
|
61275
|
+
import_antd45.InputNumber,
|
|
61110
61276
|
{
|
|
61111
61277
|
className: "w-full",
|
|
61112
61278
|
value: value === "" || value === void 0 ? null : Number(value),
|
|
@@ -61119,7 +61285,7 @@ function FilterValueEditor({
|
|
|
61119
61285
|
if (normalizedOperator === "BETWEEN") {
|
|
61120
61286
|
const range = Array.isArray(value) ? value : [];
|
|
61121
61287
|
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
61122
|
-
|
|
61288
|
+
import_antd45.DatePicker.RangePicker,
|
|
61123
61289
|
{
|
|
61124
61290
|
className: "w-full",
|
|
61125
61291
|
locale: antdDatePickerChineseLocale,
|
|
@@ -61132,7 +61298,7 @@ function FilterValueEditor({
|
|
|
61132
61298
|
);
|
|
61133
61299
|
}
|
|
61134
61300
|
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
61135
|
-
|
|
61301
|
+
import_antd45.DatePicker,
|
|
61136
61302
|
{
|
|
61137
61303
|
className: "w-full",
|
|
61138
61304
|
locale: antdDatePickerChineseLocale,
|
|
@@ -61146,7 +61312,7 @@ function FilterValueEditor({
|
|
|
61146
61312
|
if (kind === "singleOption" || kind === "multiOption") {
|
|
61147
61313
|
const multiple = normalizedOperator === "IN" || kind === "multiOption";
|
|
61148
61314
|
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
61149
|
-
|
|
61315
|
+
import_antd45.Select,
|
|
61150
61316
|
{
|
|
61151
61317
|
allowClear: true,
|
|
61152
61318
|
mode: multiple ? "multiple" : void 0,
|
|
@@ -61161,7 +61327,7 @@ function FilterValueEditor({
|
|
|
61161
61327
|
const cascadeOptions = normalizeCascadeOptions(field);
|
|
61162
61328
|
if (normalizedOperator === "IN") {
|
|
61163
61329
|
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
61164
|
-
|
|
61330
|
+
import_antd45.Select,
|
|
61165
61331
|
{
|
|
61166
61332
|
allowClear: true,
|
|
61167
61333
|
mode: "multiple",
|
|
@@ -61173,7 +61339,7 @@ function FilterValueEditor({
|
|
|
61173
61339
|
);
|
|
61174
61340
|
}
|
|
61175
61341
|
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
61176
|
-
|
|
61342
|
+
import_antd45.Cascader,
|
|
61177
61343
|
{
|
|
61178
61344
|
className: "w-full",
|
|
61179
61345
|
allowClear: true,
|
|
@@ -61201,7 +61367,7 @@ function FilterValueEditor({
|
|
|
61201
61367
|
}
|
|
61202
61368
|
if (normalizedOperator === "IN") {
|
|
61203
61369
|
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
61204
|
-
|
|
61370
|
+
import_antd45.Select,
|
|
61205
61371
|
{
|
|
61206
61372
|
mode: "tags",
|
|
61207
61373
|
tokenSeparators: [",", "\uFF0C"],
|
|
@@ -61212,7 +61378,7 @@ function FilterValueEditor({
|
|
|
61212
61378
|
);
|
|
61213
61379
|
}
|
|
61214
61380
|
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
61215
|
-
|
|
61381
|
+
import_antd45.Input,
|
|
61216
61382
|
{
|
|
61217
61383
|
value: value ?? "",
|
|
61218
61384
|
placeholder: "\u8F93\u5165\u7B5B\u9009\u503C",
|
|
@@ -61247,7 +61413,7 @@ function FilterGroupEditor({
|
|
|
61247
61413
|
children: [
|
|
61248
61414
|
/* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
61249
61415
|
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
61250
|
-
|
|
61416
|
+
import_antd45.Segmented,
|
|
61251
61417
|
{
|
|
61252
61418
|
size: "small",
|
|
61253
61419
|
value: group.logic,
|
|
@@ -61258,9 +61424,9 @@ function FilterGroupEditor({
|
|
|
61258
61424
|
onChange: (value) => onChange({ ...group, logic: value })
|
|
61259
61425
|
}
|
|
61260
61426
|
),
|
|
61261
|
-
/* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(
|
|
61427
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(import_antd45.Space, { children: [
|
|
61262
61428
|
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
61263
|
-
|
|
61429
|
+
import_antd45.Button,
|
|
61264
61430
|
{
|
|
61265
61431
|
size: "small",
|
|
61266
61432
|
onClick: () => onChange({ ...group, rules: [...group.rules, createRule(fields[0])] }),
|
|
@@ -61268,7 +61434,7 @@ function FilterGroupEditor({
|
|
|
61268
61434
|
}
|
|
61269
61435
|
),
|
|
61270
61436
|
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
61271
|
-
|
|
61437
|
+
import_antd45.Button,
|
|
61272
61438
|
{
|
|
61273
61439
|
size: "small",
|
|
61274
61440
|
onClick: () => onChange({ ...group, conditions: [...group.conditions, createGroup()] }),
|
|
@@ -61283,7 +61449,7 @@ function FilterGroupEditor({
|
|
|
61283
61449
|
className: "grid grid-cols-[minmax(140px,1fr)_132px_minmax(180px,1.4fr)_auto] gap-2",
|
|
61284
61450
|
children: [
|
|
61285
61451
|
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
61286
|
-
|
|
61452
|
+
import_antd45.Select,
|
|
61287
61453
|
{
|
|
61288
61454
|
showSearch: true,
|
|
61289
61455
|
placeholder: "\u5B57\u6BB5",
|
|
@@ -61303,7 +61469,7 @@ function FilterGroupEditor({
|
|
|
61303
61469
|
}
|
|
61304
61470
|
),
|
|
61305
61471
|
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
61306
|
-
|
|
61472
|
+
import_antd45.Select,
|
|
61307
61473
|
{
|
|
61308
61474
|
value: normalizeOperator(rule.operator),
|
|
61309
61475
|
options: getOperatorOptions(fields.find((field) => field.fieldId === rule.key)),
|
|
@@ -61324,7 +61490,7 @@ function FilterGroupEditor({
|
|
|
61324
61490
|
}
|
|
61325
61491
|
),
|
|
61326
61492
|
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
61327
|
-
|
|
61493
|
+
import_antd45.Button,
|
|
61328
61494
|
{
|
|
61329
61495
|
danger: true,
|
|
61330
61496
|
type: "text",
|
|
@@ -61350,7 +61516,7 @@ function FilterGroupEditor({
|
|
|
61350
61516
|
},
|
|
61351
61517
|
child.id
|
|
61352
61518
|
)),
|
|
61353
|
-
group.rules.length === 0 && group.conditions.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
61519
|
+
group.rules.length === 0 && group.conditions.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_antd45.Empty, { image: import_antd45.Empty.PRESENTED_IMAGE_SIMPLE, description: "\u6682\u65E0\u7B5B\u9009\u6761\u4EF6" })
|
|
61354
61520
|
]
|
|
61355
61521
|
}
|
|
61356
61522
|
);
|
|
@@ -61418,6 +61584,7 @@ var DataManagementList = ({
|
|
|
61418
61584
|
formTitle,
|
|
61419
61585
|
formType: propFormType,
|
|
61420
61586
|
schema: providedSchema,
|
|
61587
|
+
components,
|
|
61421
61588
|
forcedConfig,
|
|
61422
61589
|
showForcedConfig = true,
|
|
61423
61590
|
detailRenderer,
|
|
@@ -61619,7 +61786,7 @@ var DataManagementList = ({
|
|
|
61619
61786
|
setPageSize(nextPageSize);
|
|
61620
61787
|
} catch (error) {
|
|
61621
61788
|
console.error("[DataManagementList] loadData failed:", error);
|
|
61622
|
-
|
|
61789
|
+
import_antd45.message.error("\u52A0\u8F7D\u6570\u636E\u5931\u8D25");
|
|
61623
61790
|
} finally {
|
|
61624
61791
|
setLoading(false);
|
|
61625
61792
|
}
|
|
@@ -61696,7 +61863,7 @@ var DataManagementList = ({
|
|
|
61696
61863
|
});
|
|
61697
61864
|
} catch (error) {
|
|
61698
61865
|
console.error("[DataManagementList] load schema failed:", error);
|
|
61699
|
-
|
|
61866
|
+
import_antd45.message.error(error instanceof Error ? error.message : "\u52A0\u8F7D\u8868\u5355\u914D\u7F6E\u5931\u8D25");
|
|
61700
61867
|
} finally {
|
|
61701
61868
|
if (mounted) setSchemaLoading(false);
|
|
61702
61869
|
}
|
|
@@ -61731,7 +61898,7 @@ var DataManagementList = ({
|
|
|
61731
61898
|
config: nextConfig
|
|
61732
61899
|
}).catch((error) => {
|
|
61733
61900
|
console.error("[DataManagementList] save config failed:", error);
|
|
61734
|
-
|
|
61901
|
+
import_antd45.message.warning("\u914D\u7F6E\u4FDD\u5B58\u5931\u8D25\uFF0C\u672C\u6B21\u4EC5\u5728\u5F53\u524D\u9875\u9762\u751F\u6548");
|
|
61735
61902
|
});
|
|
61736
61903
|
},
|
|
61737
61904
|
[appType, config, forcedConfig, formUuid, menuFormUuid, request]
|
|
@@ -61781,7 +61948,7 @@ var DataManagementList = ({
|
|
|
61781
61948
|
(record) => {
|
|
61782
61949
|
const formInstanceId = getRecordId(record);
|
|
61783
61950
|
if (!formInstanceId) {
|
|
61784
|
-
|
|
61951
|
+
import_antd45.message.warning("\u5F53\u524D\u8BB0\u5F55\u7F3A\u5C11\u5B9E\u4F8B ID\uFF0C\u65E0\u6CD5\u6253\u5F00\u8BE6\u60C5");
|
|
61785
61952
|
return;
|
|
61786
61953
|
}
|
|
61787
61954
|
if (detailOpenMode === "newPage" && typeof window !== "undefined") {
|
|
@@ -61806,7 +61973,7 @@ var DataManagementList = ({
|
|
|
61806
61973
|
async (ids) => {
|
|
61807
61974
|
if (ids.length === 0) return;
|
|
61808
61975
|
if (!canDelete) {
|
|
61809
|
-
|
|
61976
|
+
import_antd45.message.error("\u65E0\u6743\u9650\u5220\u9664\u6570\u636E");
|
|
61810
61977
|
return;
|
|
61811
61978
|
}
|
|
61812
61979
|
await deleteDataManagementRows(request, { appType, formUuid, formInstanceIds: ids });
|
|
@@ -61839,7 +62006,7 @@ var DataManagementList = ({
|
|
|
61839
62006
|
action: batchApprovalAction,
|
|
61840
62007
|
comments: batchApprovalComments || void 0
|
|
61841
62008
|
});
|
|
61842
|
-
|
|
62009
|
+
import_antd45.message.success(`\u6279\u91CF${batchApprovalAction === "approved" ? "\u901A\u8FC7" : "\u62D2\u7EDD"}\u5DF2\u63D0\u4EA4`);
|
|
61843
62010
|
setSelectedRowKeys([]);
|
|
61844
62011
|
setBatchApprovalOpen(false);
|
|
61845
62012
|
setBatchApprovalAction("approved");
|
|
@@ -61847,19 +62014,19 @@ var DataManagementList = ({
|
|
|
61847
62014
|
await loadData({ current, pageSize });
|
|
61848
62015
|
} catch (error) {
|
|
61849
62016
|
console.error("[DataManagementList] batch approval failed:", error);
|
|
61850
|
-
|
|
62017
|
+
import_antd45.message.error("\u6279\u91CF\u5BA1\u6279\u5931\u8D25");
|
|
61851
62018
|
} finally {
|
|
61852
62019
|
setBatchApproving(false);
|
|
61853
62020
|
}
|
|
61854
62021
|
};
|
|
61855
62022
|
const handleExport = async (scope) => {
|
|
61856
62023
|
if (!canExport) {
|
|
61857
|
-
|
|
62024
|
+
import_antd45.message.error("\u65E0\u6743\u9650\u5BFC\u51FA\u6570\u636E");
|
|
61858
62025
|
return;
|
|
61859
62026
|
}
|
|
61860
62027
|
const selectedIds = scope === "selected" ? getSelectedRecordIds() : [];
|
|
61861
62028
|
if (scope === "selected" && selectedIds.length === 0) {
|
|
61862
|
-
|
|
62029
|
+
import_antd45.message.warning("\u8BF7\u5148\u9009\u62E9\u8981\u5BFC\u51FA\u7684\u8BB0\u5F55");
|
|
61863
62030
|
return;
|
|
61864
62031
|
}
|
|
61865
62032
|
const selectedFilterGroup = createSelectedIdFilterGroup(selectedIds);
|
|
@@ -61889,24 +62056,24 @@ var DataManagementList = ({
|
|
|
61889
62056
|
setExportOpen(false);
|
|
61890
62057
|
} catch (error) {
|
|
61891
62058
|
console.error("[DataManagementList] export failed:", error);
|
|
61892
|
-
|
|
62059
|
+
import_antd45.message.error("\u5BFC\u51FA\u5931\u8D25");
|
|
61893
62060
|
} finally {
|
|
61894
62061
|
setExporting(false);
|
|
61895
62062
|
}
|
|
61896
62063
|
};
|
|
61897
62064
|
const handleDownloadTemplate = async () => {
|
|
61898
62065
|
if (!canImport) {
|
|
61899
|
-
|
|
62066
|
+
import_antd45.message.error("\u65E0\u6743\u9650\u5BFC\u5165\u6570\u636E");
|
|
61900
62067
|
return;
|
|
61901
62068
|
}
|
|
61902
62069
|
setTemplateDownloading(true);
|
|
61903
62070
|
try {
|
|
61904
62071
|
const response = await downloadDataManagementImportTemplate(request, { appType, formUuid });
|
|
61905
62072
|
await downloadBlobResponse(response, `\u5BFC\u5165\u6A21\u677F-${formUuid}.xlsx`);
|
|
61906
|
-
|
|
62073
|
+
import_antd45.message.success("\u6A21\u677F\u4E0B\u8F7D\u5DF2\u5F00\u59CB");
|
|
61907
62074
|
} catch (error) {
|
|
61908
62075
|
console.error("[DataManagementList] download template failed:", error);
|
|
61909
|
-
|
|
62076
|
+
import_antd45.message.error(error instanceof Error ? error.message : "\u4E0B\u8F7D\u5BFC\u5165\u6A21\u677F\u5931\u8D25");
|
|
61910
62077
|
} finally {
|
|
61911
62078
|
setTemplateDownloading(false);
|
|
61912
62079
|
}
|
|
@@ -61927,8 +62094,8 @@ var DataManagementList = ({
|
|
|
61927
62094
|
};
|
|
61928
62095
|
const handleImportPreview = async (file) => {
|
|
61929
62096
|
if (!canImport) {
|
|
61930
|
-
|
|
61931
|
-
return
|
|
62097
|
+
import_antd45.message.error("\u65E0\u6743\u9650\u5BFC\u5165\u6570\u636E");
|
|
62098
|
+
return import_antd45.Upload.LIST_IGNORE;
|
|
61932
62099
|
}
|
|
61933
62100
|
const base64 = await fileToBase64(file);
|
|
61934
62101
|
setImportBase64(base64);
|
|
@@ -61944,11 +62111,11 @@ var DataManagementList = ({
|
|
|
61944
62111
|
const handleImportConfirm = async () => {
|
|
61945
62112
|
if (!importBase64) return;
|
|
61946
62113
|
if (!canImport) {
|
|
61947
|
-
|
|
62114
|
+
import_antd45.message.error("\u65E0\u6743\u9650\u5BFC\u5165\u6570\u636E");
|
|
61948
62115
|
return;
|
|
61949
62116
|
}
|
|
61950
62117
|
await importDataManagementRows(request, { appType, formUuid, fileBase64: importBase64 });
|
|
61951
|
-
|
|
62118
|
+
import_antd45.message.success("\u5BFC\u5165\u4EFB\u52A1\u5DF2\u521B\u5EFA");
|
|
61952
62119
|
setImportOpen(false);
|
|
61953
62120
|
setImportPreview([]);
|
|
61954
62121
|
setImportBase64("");
|
|
@@ -62019,15 +62186,15 @@ var DataManagementList = ({
|
|
|
62019
62186
|
key: "workflow",
|
|
62020
62187
|
label: "\u6D41\u7A0B\u65E5\u5FD7",
|
|
62021
62188
|
icon: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_icons21.HistoryOutlined, {}),
|
|
62022
|
-
onClick: () =>
|
|
62189
|
+
onClick: () => import_antd45.message.info("\u8BF7\u901A\u8FC7 detailRenderer \u63A5\u5165\u6D41\u7A0B\u65E5\u5FD7\u6216\u6D41\u7A0B\u56FE\u5165\u53E3")
|
|
62023
62190
|
}
|
|
62024
62191
|
] : []
|
|
62025
62192
|
];
|
|
62026
62193
|
const visibleActions = actions.slice(0, visibleRowActionLimit);
|
|
62027
62194
|
const moreActions = actions.slice(visibleRowActionLimit);
|
|
62028
|
-
return /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(
|
|
62195
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(import_antd45.Space, { size: 4, children: [
|
|
62029
62196
|
visibleActions.map((action) => /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
62030
|
-
|
|
62197
|
+
import_antd45.Button,
|
|
62031
62198
|
{
|
|
62032
62199
|
type: "link",
|
|
62033
62200
|
size: "small",
|
|
@@ -62038,7 +62205,7 @@ var DataManagementList = ({
|
|
|
62038
62205
|
action.key
|
|
62039
62206
|
)),
|
|
62040
62207
|
moreActions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
62041
|
-
|
|
62208
|
+
import_antd45.Dropdown,
|
|
62042
62209
|
{
|
|
62043
62210
|
trigger: ["click"],
|
|
62044
62211
|
getPopupContainer,
|
|
@@ -62052,7 +62219,7 @@ var DataManagementList = ({
|
|
|
62052
62219
|
}))
|
|
62053
62220
|
},
|
|
62054
62221
|
children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
62055
|
-
|
|
62222
|
+
import_antd45.Button,
|
|
62056
62223
|
{
|
|
62057
62224
|
type: "text",
|
|
62058
62225
|
size: "small",
|
|
@@ -62108,7 +62275,7 @@ var DataManagementList = ({
|
|
|
62108
62275
|
};
|
|
62109
62276
|
});
|
|
62110
62277
|
}, [fields, importPreview]);
|
|
62111
|
-
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
62278
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_antd45.ConfigProvider, { getPopupContainer, locale: antdChineseLocale, children: /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(
|
|
62112
62279
|
"div",
|
|
62113
62280
|
{
|
|
62114
62281
|
ref: rootRef,
|
|
@@ -62116,10 +62283,10 @@ var DataManagementList = ({
|
|
|
62116
62283
|
children: [
|
|
62117
62284
|
/* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { className: "mx-auto flex min-h-0 w-full max-w-[1440px] flex-col px-4 py-4 md:px-6", children: [
|
|
62118
62285
|
title && /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: "mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("h2", { className: "m-0 text-xl font-semibold text-ant-color-text", children: title }) }),
|
|
62119
|
-
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: "mb-4 flex flex-col gap-3 md:flex-row md:items-center", children: /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(
|
|
62120
|
-
canCreate && (submitRenderer || runtimeFormSchema) && /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
62286
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: "mb-4 flex flex-col gap-3 md:flex-row md:items-center", children: /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(import_antd45.Space, { wrap: true, children: [
|
|
62287
|
+
canCreate && (submitRenderer || runtimeFormSchema) && /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_antd45.Button, { icon: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_icons21.PlusOutlined, {}), type: "primary", onClick: () => setSubmitOpen(true), children: "\u65B0\u589E" }),
|
|
62121
62288
|
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
62122
|
-
|
|
62289
|
+
import_antd45.Input.Search,
|
|
62123
62290
|
{
|
|
62124
62291
|
allowClear: true,
|
|
62125
62292
|
className: "w-[260px]",
|
|
@@ -62141,10 +62308,10 @@ var DataManagementList = ({
|
|
|
62141
62308
|
}
|
|
62142
62309
|
}
|
|
62143
62310
|
),
|
|
62144
|
-
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
62145
|
-
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
62311
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_antd45.Button, { icon: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_icons21.FilterOutlined, {}), onClick: () => setFilterOpen(true), children: "\u7B5B\u9009" }),
|
|
62312
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_antd45.Button, { icon: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_icons21.SettingOutlined, {}), onClick: () => setColumnOpen(true), children: "\u5217\u8BBE\u7F6E" }),
|
|
62146
62313
|
canExport && /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
62147
|
-
|
|
62314
|
+
import_antd45.Dropdown,
|
|
62148
62315
|
{
|
|
62149
62316
|
getPopupContainer,
|
|
62150
62317
|
menu: {
|
|
@@ -62165,11 +62332,11 @@ var DataManagementList = ({
|
|
|
62165
62332
|
}
|
|
62166
62333
|
]
|
|
62167
62334
|
},
|
|
62168
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
62335
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_antd45.Button, { icon: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_icons21.DownloadOutlined, {}), children: "\u5BFC\u51FA" })
|
|
62169
62336
|
}
|
|
62170
62337
|
),
|
|
62171
62338
|
canImport && /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
62172
|
-
|
|
62339
|
+
import_antd45.Dropdown,
|
|
62173
62340
|
{
|
|
62174
62341
|
getPopupContainer,
|
|
62175
62342
|
menu: {
|
|
@@ -62182,10 +62349,10 @@ var DataManagementList = ({
|
|
|
62182
62349
|
}
|
|
62183
62350
|
]
|
|
62184
62351
|
},
|
|
62185
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
62352
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_antd45.Button, { icon: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_icons21.ImportOutlined, {}), children: "\u5BFC\u5165" })
|
|
62186
62353
|
}
|
|
62187
62354
|
),
|
|
62188
|
-
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
62355
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_antd45.Button, { icon: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_icons21.ReloadOutlined, {}), onClick: () => loadData({ current, pageSize }) })
|
|
62189
62356
|
] }) }),
|
|
62190
62357
|
selectedRowKeys.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("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: [
|
|
62191
62358
|
/* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("span", { className: "text-sm text-ant-color-text-secondary", children: [
|
|
@@ -62193,9 +62360,9 @@ var DataManagementList = ({
|
|
|
62193
62360
|
selectedRowKeys.length,
|
|
62194
62361
|
" \u6761"
|
|
62195
62362
|
] }),
|
|
62196
|
-
/* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(
|
|
62363
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(import_antd45.Space, { wrap: true, children: [
|
|
62197
62364
|
canExport && /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
62198
|
-
|
|
62365
|
+
import_antd45.Button,
|
|
62199
62366
|
{
|
|
62200
62367
|
icon: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_icons21.DownloadOutlined, {}),
|
|
62201
62368
|
onClick: () => {
|
|
@@ -62206,9 +62373,9 @@ var DataManagementList = ({
|
|
|
62206
62373
|
children: "\u5BFC\u51FA\u9009\u4E2D"
|
|
62207
62374
|
}
|
|
62208
62375
|
),
|
|
62209
|
-
isProcessForm && canWorkflow && /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
62376
|
+
isProcessForm && canWorkflow && /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_antd45.Button, { icon: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_icons21.SwapOutlined, {}), onClick: handleBatchApprove, children: "\u6279\u91CF\u5BA1\u6279" }),
|
|
62210
62377
|
canDelete && /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
62211
|
-
|
|
62378
|
+
import_antd45.Button,
|
|
62212
62379
|
{
|
|
62213
62380
|
danger: true,
|
|
62214
62381
|
icon: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_icons21.DeleteOutlined, {}),
|
|
@@ -62220,11 +62387,11 @@ var DataManagementList = ({
|
|
|
62220
62387
|
children: "\u6279\u91CF\u5220\u9664"
|
|
62221
62388
|
}
|
|
62222
62389
|
),
|
|
62223
|
-
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
62390
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_antd45.Button, { type: "link", onClick: () => setSelectedRowKeys([]), children: "\u53D6\u6D88\u9009\u62E9" })
|
|
62224
62391
|
] })
|
|
62225
62392
|
] }),
|
|
62226
62393
|
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: "relative flex-1 overflow-hidden rounded-lg border border-ant-border-secondary bg-ant-bg-container", children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
62227
|
-
|
|
62394
|
+
import_antd45.Table,
|
|
62228
62395
|
{
|
|
62229
62396
|
rowKey: (record) => String(getRecordId(record)),
|
|
62230
62397
|
loading: loading || schemaLoading,
|
|
@@ -62257,7 +62424,7 @@ var DataManagementList = ({
|
|
|
62257
62424
|
) })
|
|
62258
62425
|
] }),
|
|
62259
62426
|
/* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(
|
|
62260
|
-
|
|
62427
|
+
import_antd45.Modal,
|
|
62261
62428
|
{
|
|
62262
62429
|
getContainer: getOverlayContainer,
|
|
62263
62430
|
title: "\u9AD8\u7EA7\u7B5B\u9009",
|
|
@@ -62272,7 +62439,7 @@ var DataManagementList = ({
|
|
|
62272
62439
|
okText: "\u5E94\u7528\u7B5B\u9009",
|
|
62273
62440
|
children: [
|
|
62274
62441
|
showForcedConfig && hasFilterContent(forcedConfig?.filter?.group) && /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
62275
|
-
|
|
62442
|
+
import_antd45.Alert,
|
|
62276
62443
|
{
|
|
62277
62444
|
className: "mb-4",
|
|
62278
62445
|
type: "info",
|
|
@@ -62294,7 +62461,7 @@ var DataManagementList = ({
|
|
|
62294
62461
|
}
|
|
62295
62462
|
),
|
|
62296
62463
|
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
62297
|
-
|
|
62464
|
+
import_antd45.Modal,
|
|
62298
62465
|
{
|
|
62299
62466
|
getContainer: getOverlayContainer,
|
|
62300
62467
|
title: "\u5217\u8BBE\u7F6E",
|
|
@@ -62306,7 +62473,7 @@ var DataManagementList = ({
|
|
|
62306
62473
|
/* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { children: [
|
|
62307
62474
|
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: "mb-2 text-sm font-medium text-ant-color-text", children: "\u663E\u793A\u5217" }),
|
|
62308
62475
|
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
62309
|
-
|
|
62476
|
+
import_antd45.Checkbox.Group,
|
|
62310
62477
|
{
|
|
62311
62478
|
className: "grid grid-cols-2 gap-2 md:grid-cols-3",
|
|
62312
62479
|
value: showFields,
|
|
@@ -62324,7 +62491,7 @@ var DataManagementList = ({
|
|
|
62324
62491
|
/* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { children: [
|
|
62325
62492
|
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: "mb-2 text-sm font-medium text-ant-color-text", children: "\u51BB\u7ED3\u5217" }),
|
|
62326
62493
|
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
62327
|
-
|
|
62494
|
+
import_antd45.Select,
|
|
62328
62495
|
{
|
|
62329
62496
|
mode: "multiple",
|
|
62330
62497
|
className: "w-full",
|
|
@@ -62341,15 +62508,15 @@ var DataManagementList = ({
|
|
|
62341
62508
|
}
|
|
62342
62509
|
)
|
|
62343
62510
|
] }),
|
|
62344
|
-
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
62511
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_antd45.Divider, { className: "my-1" }),
|
|
62345
62512
|
/* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { children: [
|
|
62346
62513
|
/* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { className: "mb-2 flex items-center justify-between gap-3", children: [
|
|
62347
62514
|
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)("span", { className: "text-sm font-medium text-ant-color-text", children: "\u6392\u5E8F\u89C4\u5219" }),
|
|
62348
|
-
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
62515
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_antd45.Button, { size: "small", onClick: handleAddSort, disabled: fields.length === 0, children: "\u6DFB\u52A0\u6392\u5E8F" })
|
|
62349
62516
|
] }),
|
|
62350
62517
|
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: "space-y-2", children: sort.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("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__ */ (0, import_jsx_runtime105.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
62351
62518
|
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
62352
|
-
|
|
62519
|
+
import_antd45.Select,
|
|
62353
62520
|
{
|
|
62354
62521
|
className: "min-w-0 flex-1",
|
|
62355
62522
|
value: item.id,
|
|
@@ -62361,7 +62528,7 @@ var DataManagementList = ({
|
|
|
62361
62528
|
}
|
|
62362
62529
|
),
|
|
62363
62530
|
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
62364
|
-
|
|
62531
|
+
import_antd45.Segmented,
|
|
62365
62532
|
{
|
|
62366
62533
|
value: item.isAsc,
|
|
62367
62534
|
options: [
|
|
@@ -62372,7 +62539,7 @@ var DataManagementList = ({
|
|
|
62372
62539
|
}
|
|
62373
62540
|
),
|
|
62374
62541
|
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
62375
|
-
|
|
62542
|
+
import_antd45.Button,
|
|
62376
62543
|
{
|
|
62377
62544
|
danger: true,
|
|
62378
62545
|
type: "text",
|
|
@@ -62386,7 +62553,7 @@ var DataManagementList = ({
|
|
|
62386
62553
|
/* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { children: [
|
|
62387
62554
|
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: "mb-2 text-sm font-medium text-ant-color-text", children: "\u8868\u683C\u5BC6\u5EA6" }),
|
|
62388
62555
|
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
62389
|
-
|
|
62556
|
+
import_antd45.Segmented,
|
|
62390
62557
|
{
|
|
62391
62558
|
block: true,
|
|
62392
62559
|
value: density,
|
|
@@ -62402,7 +62569,7 @@ var DataManagementList = ({
|
|
|
62402
62569
|
/* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { children: [
|
|
62403
62570
|
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: "mb-2 text-sm font-medium text-ant-color-text", children: "\u8BE6\u60C5\u6253\u5F00\u65B9\u5F0F" }),
|
|
62404
62571
|
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
62405
|
-
|
|
62572
|
+
import_antd45.Segmented,
|
|
62406
62573
|
{
|
|
62407
62574
|
block: true,
|
|
62408
62575
|
value: detailOpenMode,
|
|
@@ -62417,7 +62584,7 @@ var DataManagementList = ({
|
|
|
62417
62584
|
/* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { children: [
|
|
62418
62585
|
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: "mb-2 text-sm font-medium text-ant-color-text", children: "\u9875\u5927\u5C0F" }),
|
|
62419
62586
|
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
62420
|
-
|
|
62587
|
+
import_antd45.Select,
|
|
62421
62588
|
{
|
|
62422
62589
|
className: "w-full",
|
|
62423
62590
|
value: pageSize,
|
|
@@ -62431,16 +62598,16 @@ var DataManagementList = ({
|
|
|
62431
62598
|
}
|
|
62432
62599
|
),
|
|
62433
62600
|
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
62434
|
-
|
|
62601
|
+
import_antd45.Modal,
|
|
62435
62602
|
{
|
|
62436
62603
|
getContainer: getOverlayContainer,
|
|
62437
62604
|
title: exportScope === "selected" ? "\u5BFC\u51FA\u9009\u4E2D\u6570\u636E" : "\u5BFC\u51FA\u5168\u90E8\u6570\u636E",
|
|
62438
62605
|
open: exportOpen,
|
|
62439
62606
|
onCancel: () => setExportOpen(false),
|
|
62440
|
-
footer: /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(
|
|
62441
|
-
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
62607
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(import_antd45.Space, { children: [
|
|
62608
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_antd45.Button, { onClick: () => setExportOpen(false), children: "\u53D6\u6D88" }),
|
|
62442
62609
|
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
62443
|
-
|
|
62610
|
+
import_antd45.Button,
|
|
62444
62611
|
{
|
|
62445
62612
|
type: "primary",
|
|
62446
62613
|
loading: exporting,
|
|
@@ -62451,7 +62618,7 @@ var DataManagementList = ({
|
|
|
62451
62618
|
)
|
|
62452
62619
|
] }),
|
|
62453
62620
|
children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
62454
|
-
|
|
62621
|
+
import_antd45.Checkbox.Group,
|
|
62455
62622
|
{
|
|
62456
62623
|
className: "grid grid-cols-2 gap-2",
|
|
62457
62624
|
value: exportFields,
|
|
@@ -62462,7 +62629,7 @@ var DataManagementList = ({
|
|
|
62462
62629
|
}
|
|
62463
62630
|
),
|
|
62464
62631
|
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
62465
|
-
|
|
62632
|
+
import_antd45.Modal,
|
|
62466
62633
|
{
|
|
62467
62634
|
getContainer: getOverlayContainer,
|
|
62468
62635
|
title: "\u6279\u91CF\u5BA1\u6279",
|
|
@@ -62478,7 +62645,7 @@ var DataManagementList = ({
|
|
|
62478
62645
|
" \u6761\u8BB0\u5F55"
|
|
62479
62646
|
] }),
|
|
62480
62647
|
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
62481
|
-
|
|
62648
|
+
import_antd45.Segmented,
|
|
62482
62649
|
{
|
|
62483
62650
|
block: true,
|
|
62484
62651
|
value: batchApprovalAction,
|
|
@@ -62490,7 +62657,7 @@ var DataManagementList = ({
|
|
|
62490
62657
|
}
|
|
62491
62658
|
),
|
|
62492
62659
|
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
62493
|
-
|
|
62660
|
+
import_antd45.Input.TextArea,
|
|
62494
62661
|
{
|
|
62495
62662
|
value: batchApprovalComments,
|
|
62496
62663
|
rows: 4,
|
|
@@ -62504,7 +62671,7 @@ var DataManagementList = ({
|
|
|
62504
62671
|
}
|
|
62505
62672
|
),
|
|
62506
62673
|
/* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(
|
|
62507
|
-
|
|
62674
|
+
import_antd45.Modal,
|
|
62508
62675
|
{
|
|
62509
62676
|
getContainer: getOverlayContainer,
|
|
62510
62677
|
title: "\u5BFC\u5165\u6570\u636E",
|
|
@@ -62521,7 +62688,7 @@ var DataManagementList = ({
|
|
|
62521
62688
|
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)("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" })
|
|
62522
62689
|
] }),
|
|
62523
62690
|
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
62524
|
-
|
|
62691
|
+
import_antd45.Button,
|
|
62525
62692
|
{
|
|
62526
62693
|
icon: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_icons21.DownloadOutlined, {}),
|
|
62527
62694
|
loading: templateDownloading,
|
|
@@ -62532,7 +62699,7 @@ var DataManagementList = ({
|
|
|
62532
62699
|
)
|
|
62533
62700
|
] }),
|
|
62534
62701
|
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
62535
|
-
|
|
62702
|
+
import_antd45.Upload.Dragger,
|
|
62536
62703
|
{
|
|
62537
62704
|
accept: ".xlsx,.xls",
|
|
62538
62705
|
maxCount: 1,
|
|
@@ -62547,7 +62714,7 @@ var DataManagementList = ({
|
|
|
62547
62714
|
importPreview.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { className: "mt-4", children: [
|
|
62548
62715
|
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: "mb-2 text-sm font-medium text-ant-color-text", children: "\u5BFC\u5165\u9884\u89C8" }),
|
|
62549
62716
|
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
62550
|
-
|
|
62717
|
+
import_antd45.Table,
|
|
62551
62718
|
{
|
|
62552
62719
|
size: "small",
|
|
62553
62720
|
dataSource: importPreview,
|
|
@@ -62562,7 +62729,7 @@ var DataManagementList = ({
|
|
|
62562
62729
|
}
|
|
62563
62730
|
),
|
|
62564
62731
|
/* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(
|
|
62565
|
-
|
|
62732
|
+
import_antd45.Drawer,
|
|
62566
62733
|
{
|
|
62567
62734
|
styles: { body: { padding: 24, overflow: "auto" } },
|
|
62568
62735
|
getContainer: getOverlayContainer,
|
|
@@ -62572,7 +62739,7 @@ var DataManagementList = ({
|
|
|
62572
62739
|
onClose: () => setRecordsOpen(false),
|
|
62573
62740
|
children: [
|
|
62574
62741
|
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
62575
|
-
|
|
62742
|
+
import_antd45.Segmented,
|
|
62576
62743
|
{
|
|
62577
62744
|
value: recordTab,
|
|
62578
62745
|
options: [
|
|
@@ -62583,7 +62750,7 @@ var DataManagementList = ({
|
|
|
62583
62750
|
}
|
|
62584
62751
|
),
|
|
62585
62752
|
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
62586
|
-
|
|
62753
|
+
import_antd45.Table,
|
|
62587
62754
|
{
|
|
62588
62755
|
className: "mt-4",
|
|
62589
62756
|
size: "small",
|
|
@@ -62595,7 +62762,7 @@ var DataManagementList = ({
|
|
|
62595
62762
|
}
|
|
62596
62763
|
),
|
|
62597
62764
|
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
62598
|
-
|
|
62765
|
+
import_antd45.Drawer,
|
|
62599
62766
|
{
|
|
62600
62767
|
styles: { body: { padding: 0, overflow: "auto" } },
|
|
62601
62768
|
getContainer: getOverlayContainer,
|
|
@@ -62617,13 +62784,14 @@ var DataManagementList = ({
|
|
|
62617
62784
|
formUuid,
|
|
62618
62785
|
formInstanceId: String(getRecordId(activeRecord)),
|
|
62619
62786
|
api,
|
|
62787
|
+
components,
|
|
62620
62788
|
inDrawer: true
|
|
62621
62789
|
}
|
|
62622
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
62790
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_antd45.Empty, { description: "\u8BF7\u901A\u8FC7 detailRenderer \u63A5\u5165\u8BE6\u60C5\u6A21\u677F" })
|
|
62623
62791
|
}
|
|
62624
62792
|
),
|
|
62625
62793
|
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
62626
|
-
|
|
62794
|
+
import_antd45.Drawer,
|
|
62627
62795
|
{
|
|
62628
62796
|
styles: { body: { padding: 0, overflow: "auto" } },
|
|
62629
62797
|
getContainer: getOverlayContainer,
|
|
@@ -62646,13 +62814,14 @@ var DataManagementList = ({
|
|
|
62646
62814
|
appType,
|
|
62647
62815
|
formUuid,
|
|
62648
62816
|
api,
|
|
62817
|
+
components,
|
|
62649
62818
|
inDrawer: true,
|
|
62650
62819
|
onSubmitSuccess: () => {
|
|
62651
62820
|
setSubmitOpen(false);
|
|
62652
62821
|
loadData({ current: 1, pageSize });
|
|
62653
62822
|
}
|
|
62654
62823
|
}
|
|
62655
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
62824
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_antd45.Empty, { description: "\u8BF7\u901A\u8FC7 submitRenderer \u63A5\u5165\u63D0\u4EA4\u6A21\u677F" })
|
|
62656
62825
|
}
|
|
62657
62826
|
)
|
|
62658
62827
|
]
|
|
@@ -62821,14 +62990,14 @@ var getDetailBasePath = (appType, formUuid, formType) => {
|
|
|
62821
62990
|
var BuiltinRouteError = ({
|
|
62822
62991
|
error,
|
|
62823
62992
|
onRetry
|
|
62824
|
-
}) => /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
62825
|
-
|
|
62993
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_antd46.Card, { style: { margin: 16 }, children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
62994
|
+
import_antd46.Alert,
|
|
62826
62995
|
{
|
|
62827
62996
|
type: "error",
|
|
62828
62997
|
showIcon: true,
|
|
62829
62998
|
title: "\u5185\u7F6E\u9875\u9762\u52A0\u8F7D\u5931\u8D25",
|
|
62830
62999
|
description: error,
|
|
62831
|
-
action: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
63000
|
+
action: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_antd46.Button, { size: "small", onClick: onRetry, children: "\u91CD\u8BD5" })
|
|
62832
63001
|
}
|
|
62833
63002
|
) });
|
|
62834
63003
|
var getRuntimePermission = (route) => {
|
|
@@ -62929,7 +63098,7 @@ function BuiltinRouteRenderer({
|
|
|
62929
63098
|
if (!route) return null;
|
|
62930
63099
|
if (permissionDenied) {
|
|
62931
63100
|
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className, style, "data-openxiangda-builtin-route": route.kind, children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
62932
|
-
|
|
63101
|
+
import_antd46.Alert,
|
|
62933
63102
|
{
|
|
62934
63103
|
type: "warning",
|
|
62935
63104
|
showIcon: true,
|
|
@@ -62939,7 +63108,7 @@ function BuiltinRouteRenderer({
|
|
|
62939
63108
|
) });
|
|
62940
63109
|
}
|
|
62941
63110
|
if (route.mode !== "builtin-route") {
|
|
62942
|
-
return route.message ? /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
63111
|
+
return route.message ? /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_antd46.Alert, { type: "info", showIcon: true, title: route.message, style: { margin: 16 } }) : null;
|
|
62943
63112
|
}
|
|
62944
63113
|
let defaultNode;
|
|
62945
63114
|
if (route.kind === "file-preview") {
|
|
@@ -62953,7 +63122,7 @@ function BuiltinRouteRenderer({
|
|
|
62953
63122
|
);
|
|
62954
63123
|
} else if (route.kind === "data-manage-list") {
|
|
62955
63124
|
if (!appType || !formUuid) {
|
|
62956
|
-
defaultNode = /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
63125
|
+
defaultNode = /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_antd46.Card, { style: { margin: 16 }, children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_antd46.Empty, { description: "\u6570\u636E\u7BA1\u7406\u9875\u7F3A\u5C11 formUuid\uFF0C\u8BF7\u5728 URL \u6216 resolver params \u4E2D\u63D0\u4F9B formUuid" }) });
|
|
62957
63126
|
} else {
|
|
62958
63127
|
const formType = routeConfig.formType || route.params?.formType || pickQueryValue(route.query, "formType") || route.runtime?.formType;
|
|
62959
63128
|
defaultNode = /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
@@ -62976,11 +63145,11 @@ function BuiltinRouteRenderer({
|
|
|
62976
63145
|
);
|
|
62977
63146
|
}
|
|
62978
63147
|
} else if (loading) {
|
|
62979
|
-
defaultNode = /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
63148
|
+
defaultNode = /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_antd46.Spin, { style: { margin: 32 } });
|
|
62980
63149
|
} else if (error) {
|
|
62981
63150
|
defaultNode = /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(BuiltinRouteError, { error, onRetry: reload });
|
|
62982
63151
|
} else if (!schema) {
|
|
62983
|
-
defaultNode = /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
63152
|
+
defaultNode = /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_antd46.Card, { style: { margin: 16 }, children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_antd46.Empty, { description: "\u5F53\u524D\u5185\u7F6E\u9875\u9762\u6CA1\u6709\u53EF\u6E32\u67D3\u7684 schema" }) });
|
|
62984
63153
|
} else {
|
|
62985
63154
|
defaultNode = /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
62986
63155
|
StandardFormPage,
|
|
@@ -63017,7 +63186,7 @@ function BuiltinRouteRenderer({
|
|
|
63017
63186
|
) : defaultNode;
|
|
63018
63187
|
return /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("div", { className, style, "data-openxiangda-builtin-route": route.kind, children: [
|
|
63019
63188
|
route.message && route.runtime?.permission ? /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
63020
|
-
|
|
63189
|
+
import_antd46.Alert,
|
|
63021
63190
|
{
|
|
63022
63191
|
type: "warning",
|
|
63023
63192
|
showIcon: true,
|
|
@@ -63026,7 +63195,7 @@ function BuiltinRouteRenderer({
|
|
|
63026
63195
|
}
|
|
63027
63196
|
) : null,
|
|
63028
63197
|
content,
|
|
63029
|
-
route.kind === "data-manage-list" && !formUuid ? /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
63198
|
+
route.kind === "data-manage-list" && !formUuid ? /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_antd46.Typography.Text, { type: "secondary", style: { display: "block", margin: 16 }, children: "\u63D0\u793A\uFF1A\u672C\u5730\u6570\u636E\u7BA1\u7406\u9875\u53EF\u4F7F\u7528 ?formUuid=xxx \u6307\u5B9A\u8868\u5355\u3002" }) : null
|
|
63030
63199
|
] });
|
|
63031
63200
|
}
|
|
63032
63201
|
/*! Bundled license information:
|