openxiangda 1.0.17 → 1.0.19
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/openxiangda-skills/skills/openxiangda-page/SKILL.md +3 -0
- package/package.json +1 -1
- package/packages/sdk/dist/components/index.cjs +140 -62
- package/packages/sdk/dist/components/index.cjs.map +1 -1
- package/packages/sdk/dist/components/index.d.mts +2 -0
- package/packages/sdk/dist/components/index.d.ts +2 -0
- package/packages/sdk/dist/components/index.mjs +140 -62
- package/packages/sdk/dist/components/index.mjs.map +1 -1
- package/packages/sdk/dist/runtime/index.cjs +14 -13
- package/packages/sdk/dist/runtime/index.cjs.map +1 -1
- package/packages/sdk/dist/runtime/index.mjs +14 -13
- package/packages/sdk/dist/runtime/index.mjs.map +1 -1
- package/packages/sdk/dist/styles/antd-theme.cjs +14 -13
- package/packages/sdk/dist/styles/antd-theme.cjs.map +1 -1
- package/packages/sdk/dist/styles/antd-theme.mjs +14 -13
- package/packages/sdk/dist/styles/antd-theme.mjs.map +1 -1
|
@@ -1975,6 +1975,7 @@ interface DataManagementListProps {
|
|
|
1975
1975
|
submitRenderer?: SubmitRenderer;
|
|
1976
1976
|
requestOverride?: FormRuntimeApi['request'] | FormRuntimeApiConfig;
|
|
1977
1977
|
rowActions?: DataManagementRowAction[];
|
|
1978
|
+
maxVisibleRowActions?: number;
|
|
1978
1979
|
}
|
|
1979
1980
|
declare const DataManagementList: React__default.FC<DataManagementListProps>;
|
|
1980
1981
|
|
|
@@ -2062,6 +2063,7 @@ interface StandardFormPageProps {
|
|
|
2062
2063
|
mode?: StandardFormPageMode;
|
|
2063
2064
|
initialValues?: Record<string, any> | null;
|
|
2064
2065
|
permissions?: FormEngineConfig['permissions'];
|
|
2066
|
+
api?: FormEngineConfig['api'];
|
|
2065
2067
|
formUuid?: string;
|
|
2066
2068
|
appType?: string;
|
|
2067
2069
|
formInstanceId?: string;
|
|
@@ -1975,6 +1975,7 @@ interface DataManagementListProps {
|
|
|
1975
1975
|
submitRenderer?: SubmitRenderer;
|
|
1976
1976
|
requestOverride?: FormRuntimeApi['request'] | FormRuntimeApiConfig;
|
|
1977
1977
|
rowActions?: DataManagementRowAction[];
|
|
1978
|
+
maxVisibleRowActions?: number;
|
|
1978
1979
|
}
|
|
1979
1980
|
declare const DataManagementList: React__default.FC<DataManagementListProps>;
|
|
1980
1981
|
|
|
@@ -2062,6 +2063,7 @@ interface StandardFormPageProps {
|
|
|
2062
2063
|
mode?: StandardFormPageMode;
|
|
2063
2064
|
initialValues?: Record<string, any> | null;
|
|
2064
2065
|
permissions?: FormEngineConfig['permissions'];
|
|
2066
|
+
api?: FormEngineConfig['api'];
|
|
2065
2067
|
formUuid?: string;
|
|
2066
2068
|
appType?: string;
|
|
2067
2069
|
formInstanceId?: string;
|
|
@@ -30714,26 +30714,35 @@ var secondOptions = Array.from({ length: 60 }, (_, second) => ({
|
|
|
30714
30714
|
label: `${second}\u79D2`,
|
|
30715
30715
|
value: pad2(second)
|
|
30716
30716
|
}));
|
|
30717
|
-
function
|
|
30718
|
-
return
|
|
30717
|
+
function resolveTimePickerPrecision(dateFormat) {
|
|
30718
|
+
return dateFormat && /s/i.test(dateFormat) ? "second" : "minute";
|
|
30719
30719
|
}
|
|
30720
|
-
function
|
|
30721
|
-
return
|
|
30720
|
+
function formatMobileTime(date4, dateFormat) {
|
|
30721
|
+
return dayjs14(date4).format(resolveTimePickerPrecision(dateFormat) === "second" ? "HH:mm:ss" : "HH:mm");
|
|
30722
30722
|
}
|
|
30723
|
-
function
|
|
30723
|
+
function getTimePickerColumns(precision = "second") {
|
|
30724
|
+
return precision === "second" ? [hourOptions, minuteOptions, secondOptions] : [hourOptions, minuteOptions];
|
|
30725
|
+
}
|
|
30726
|
+
function getTimePickerValue(date4, precision = "second") {
|
|
30727
|
+
const base = [dayjs14(date4).format("HH"), dayjs14(date4).format("mm")];
|
|
30728
|
+
return precision === "second" ? [...base, dayjs14(date4).format("ss")] : base;
|
|
30729
|
+
}
|
|
30730
|
+
function applyTimePickerValue(base, value, precision = "second") {
|
|
30724
30731
|
const [hour, minute, second] = value;
|
|
30725
|
-
return dayjs14(base).hour(Number(hour ?? 0)).minute(Number(minute ?? 0)).second(Number(second ?? 0)).millisecond(0).toDate();
|
|
30732
|
+
return dayjs14(base).hour(Number(hour ?? 0)).minute(Number(minute ?? 0)).second(precision === "second" ? Number(second ?? 0) : 0).millisecond(0).toDate();
|
|
30726
30733
|
}
|
|
30727
30734
|
function MobileTimePickerView({
|
|
30728
30735
|
value,
|
|
30736
|
+
dateFormat,
|
|
30729
30737
|
onChange
|
|
30730
30738
|
}) {
|
|
30739
|
+
const precision = resolveTimePickerPrecision(dateFormat);
|
|
30731
30740
|
return /* @__PURE__ */ jsx34(
|
|
30732
30741
|
picker_view_default,
|
|
30733
30742
|
{
|
|
30734
|
-
columns:
|
|
30735
|
-
value: getTimePickerValue(value),
|
|
30736
|
-
onChange: (nextValue) => onChange(applyTimePickerValue(value, nextValue)),
|
|
30743
|
+
columns: getTimePickerColumns(precision),
|
|
30744
|
+
value: getTimePickerValue(value, precision),
|
|
30745
|
+
onChange: (nextValue) => onChange(applyTimePickerValue(value, nextValue, precision)),
|
|
30737
30746
|
className: "sy-mobile-time-picker",
|
|
30738
30747
|
renderLabel: (item) => item.label
|
|
30739
30748
|
}
|
|
@@ -30770,30 +30779,32 @@ function getDateOptions(center, min2, max2) {
|
|
|
30770
30779
|
};
|
|
30771
30780
|
});
|
|
30772
30781
|
}
|
|
30773
|
-
function getDateTimePickerValue(date4) {
|
|
30774
|
-
return [dayjs14(date4).format("YYYY-MM-DD"), ...getTimePickerValue(date4)];
|
|
30782
|
+
function getDateTimePickerValue(date4, precision = "second") {
|
|
30783
|
+
return [dayjs14(date4).format("YYYY-MM-DD"), ...getTimePickerValue(date4, precision)];
|
|
30775
30784
|
}
|
|
30776
|
-
function applyDateTimePickerValue(base, value) {
|
|
30785
|
+
function applyDateTimePickerValue(base, value, precision = "second") {
|
|
30777
30786
|
const [dateValue, hour, minute, second] = value;
|
|
30778
30787
|
const date4 = dayjs14(String(dateValue || dayjs14(base).format("YYYY-MM-DD")));
|
|
30779
|
-
return date4.hour(Number(hour ?? 0)).minute(Number(minute ?? 0)).second(Number(second ?? 0)).millisecond(0).toDate();
|
|
30788
|
+
return date4.hour(Number(hour ?? 0)).minute(Number(minute ?? 0)).second(precision === "second" ? Number(second ?? 0) : 0).millisecond(0).toDate();
|
|
30780
30789
|
}
|
|
30781
30790
|
function MobileDateTimePickerView({
|
|
30782
30791
|
value,
|
|
30792
|
+
dateFormat,
|
|
30783
30793
|
min: min2,
|
|
30784
30794
|
max: max2,
|
|
30785
30795
|
onChange
|
|
30786
30796
|
}) {
|
|
30797
|
+
const precision = resolveTimePickerPrecision(dateFormat);
|
|
30787
30798
|
const columns = React202.useMemo(
|
|
30788
|
-
() => [getDateOptions(value, min2, max2),
|
|
30789
|
-
[value, min2, max2]
|
|
30799
|
+
() => [getDateOptions(value, min2, max2), ...getTimePickerColumns(precision)],
|
|
30800
|
+
[value, min2, max2, precision]
|
|
30790
30801
|
);
|
|
30791
30802
|
return /* @__PURE__ */ jsx34(
|
|
30792
30803
|
picker_view_default,
|
|
30793
30804
|
{
|
|
30794
30805
|
columns,
|
|
30795
|
-
value: getDateTimePickerValue(value),
|
|
30796
|
-
onChange: (nextValue) => onChange(applyDateTimePickerValue(value, nextValue)),
|
|
30806
|
+
value: getDateTimePickerValue(value, precision),
|
|
30807
|
+
onChange: (nextValue) => onChange(applyDateTimePickerValue(value, nextValue, precision)),
|
|
30797
30808
|
className: "sy-mobile-time-picker sy-mobile-date-time-picker",
|
|
30798
30809
|
renderLabel: (item) => item.label
|
|
30799
30810
|
}
|
|
@@ -30874,10 +30885,10 @@ function DateFieldMobile({
|
|
|
30874
30885
|
}
|
|
30875
30886
|
),
|
|
30876
30887
|
mode === "time" ? /* @__PURE__ */ jsxs9(Fragment5, { children: [
|
|
30877
|
-
/* @__PURE__ */ jsx35(MobileTimePickerView, { value: tempDate, onChange: setTempDate }),
|
|
30888
|
+
/* @__PURE__ */ jsx35(MobileTimePickerView, { value: tempDate, dateFormat: format2, onChange: setTempDate }),
|
|
30878
30889
|
/* @__PURE__ */ jsxs9("div", { className: "sy-mobile-date-time-footer", children: [
|
|
30879
30890
|
/* @__PURE__ */ jsx35("span", { children: "\u9009\u62E9\u65F6\u95F4" }),
|
|
30880
|
-
/* @__PURE__ */ jsx35("button", { type: "button", className: "sy-mobile-time-pill is-active", children: formatMobileTime(tempDate) })
|
|
30891
|
+
/* @__PURE__ */ jsx35("button", { type: "button", className: "sy-mobile-time-pill is-active", children: formatMobileTime(tempDate, format2) })
|
|
30881
30892
|
] })
|
|
30882
30893
|
] }) : /* @__PURE__ */ jsxs9(Fragment5, { children: [
|
|
30883
30894
|
/* @__PURE__ */ jsx35(
|
|
@@ -30908,7 +30919,7 @@ function DateFieldMobile({
|
|
|
30908
30919
|
type: "button",
|
|
30909
30920
|
className: "sy-mobile-time-pill",
|
|
30910
30921
|
onClick: () => setMode("time"),
|
|
30911
|
-
children: formatMobileTime(tempDate)
|
|
30922
|
+
children: formatMobileTime(tempDate, format2)
|
|
30912
30923
|
}
|
|
30913
30924
|
)
|
|
30914
30925
|
] }) : null
|
|
@@ -31164,6 +31175,7 @@ function CascadeDateFieldMobile({
|
|
|
31164
31175
|
MobileDateTimePickerView,
|
|
31165
31176
|
{
|
|
31166
31177
|
value: timeStep === "start" ? tempStart : tempEnd,
|
|
31178
|
+
dateFormat: format2,
|
|
31167
31179
|
min: timeStep === "start" ? min2 : endMin,
|
|
31168
31180
|
max: max2,
|
|
31169
31181
|
onChange: timeStep === "start" ? updateTempStart : updateTempEnd
|
|
@@ -45095,6 +45107,7 @@ var StandardFormPage = ({
|
|
|
45095
45107
|
mode,
|
|
45096
45108
|
initialValues,
|
|
45097
45109
|
permissions,
|
|
45110
|
+
api: externalApi,
|
|
45098
45111
|
formUuid,
|
|
45099
45112
|
appType,
|
|
45100
45113
|
formInstanceId,
|
|
@@ -45108,7 +45121,7 @@ var StandardFormPage = ({
|
|
|
45108
45121
|
const formType = normalizeStandardFormType(
|
|
45109
45122
|
schema.template?.formType || (resolvedMode === "process" ? "process" : "form")
|
|
45110
45123
|
);
|
|
45111
|
-
const
|
|
45124
|
+
const submitApi = useMemo60(() => {
|
|
45112
45125
|
if (!onSubmit) return void 0;
|
|
45113
45126
|
return {
|
|
45114
45127
|
submitFormData: async (payload) => onSubmit(
|
|
@@ -45121,6 +45134,13 @@ var StandardFormPage = ({
|
|
|
45121
45134
|
}
|
|
45122
45135
|
};
|
|
45123
45136
|
}, [formType, onSubmit]);
|
|
45137
|
+
const api = useMemo60(() => {
|
|
45138
|
+
if (!externalApi && !submitApi) return void 0;
|
|
45139
|
+
return {
|
|
45140
|
+
...externalApi ?? {},
|
|
45141
|
+
...submitApi ?? {}
|
|
45142
|
+
};
|
|
45143
|
+
}, [externalApi, submitApi]);
|
|
45124
45144
|
if (resolvedMode === "process") {
|
|
45125
45145
|
return /* @__PURE__ */ jsx100(
|
|
45126
45146
|
ProcessDetailTemplate,
|
|
@@ -45176,6 +45196,17 @@ var StandardFormPage = ({
|
|
|
45176
45196
|
|
|
45177
45197
|
// packages/sdk/src/components/modules/DataManagementList.tsx
|
|
45178
45198
|
import { jsx as jsx101, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
45199
|
+
var DEFAULT_MAX_VISIBLE_ROW_ACTIONS = 4;
|
|
45200
|
+
var ACTION_COLUMN_MIN_WIDTH = 96;
|
|
45201
|
+
var ACTION_BUTTON_ESTIMATED_WIDTH = 56;
|
|
45202
|
+
var ACTION_MORE_BUTTON_WIDTH = 36;
|
|
45203
|
+
var ACTION_COLUMN_HORIZONTAL_PADDING = 24;
|
|
45204
|
+
function normalizeMaxVisibleRowActions(maxVisibleRowActions) {
|
|
45205
|
+
if (typeof maxVisibleRowActions !== "number" || !Number.isFinite(maxVisibleRowActions)) {
|
|
45206
|
+
return DEFAULT_MAX_VISIBLE_ROW_ACTIONS;
|
|
45207
|
+
}
|
|
45208
|
+
return Math.max(0, Math.floor(maxVisibleRowActions));
|
|
45209
|
+
}
|
|
45179
45210
|
var createGroup = () => ({
|
|
45180
45211
|
id: `group_${Date.now()}_${Math.random().toString(36).slice(2)}`,
|
|
45181
45212
|
logic: "AND",
|
|
@@ -46108,7 +46139,8 @@ var DataManagementList = ({
|
|
|
46108
46139
|
detailPageUrlBuilder,
|
|
46109
46140
|
submitRenderer,
|
|
46110
46141
|
requestOverride,
|
|
46111
|
-
rowActions = []
|
|
46142
|
+
rowActions = [],
|
|
46143
|
+
maxVisibleRowActions
|
|
46112
46144
|
}) => {
|
|
46113
46145
|
const rootRef = useRef96(null);
|
|
46114
46146
|
const api = useMemo61(() => {
|
|
@@ -46538,6 +46570,12 @@ var DataManagementList = ({
|
|
|
46538
46570
|
setImportBase64("");
|
|
46539
46571
|
await loadData({ current: 1, pageSize });
|
|
46540
46572
|
};
|
|
46573
|
+
const visibleRowActionLimit = normalizeMaxVisibleRowActions(maxVisibleRowActions);
|
|
46574
|
+
const rowActionCount = 1 + rowActions.length + (readonly ? 0 : 1) + (isProcessForm ? 1 : 0);
|
|
46575
|
+
const actionColumnWidth = Math.max(
|
|
46576
|
+
ACTION_COLUMN_MIN_WIDTH,
|
|
46577
|
+
Math.min(rowActionCount, visibleRowActionLimit) * ACTION_BUTTON_ESTIMATED_WIDTH + (rowActionCount > visibleRowActionLimit ? ACTION_MORE_BUTTON_WIDTH : 0) + ACTION_COLUMN_HORIZONTAL_PADDING
|
|
46578
|
+
);
|
|
46541
46579
|
const columns = useMemo61(() => {
|
|
46542
46580
|
const baseColumns = visibleFields.map((field) => {
|
|
46543
46581
|
const columnWidth = widths[field.fieldId] || field.width || 160;
|
|
@@ -46564,53 +46602,88 @@ var DataManagementList = ({
|
|
|
46564
46602
|
{
|
|
46565
46603
|
title: "\u64CD\u4F5C",
|
|
46566
46604
|
key: "__actions",
|
|
46567
|
-
width:
|
|
46605
|
+
width: actionColumnWidth,
|
|
46568
46606
|
fixed: "right",
|
|
46569
|
-
render: (_, record2) =>
|
|
46570
|
-
|
|
46571
|
-
/* @__PURE__ */ jsx101(
|
|
46572
|
-
Dropdown4,
|
|
46607
|
+
render: (_, record2) => {
|
|
46608
|
+
const actions = [
|
|
46573
46609
|
{
|
|
46574
|
-
|
|
46575
|
-
|
|
46576
|
-
|
|
46577
|
-
|
|
46578
|
-
|
|
46579
|
-
|
|
46580
|
-
|
|
46581
|
-
|
|
46582
|
-
|
|
46583
|
-
|
|
46584
|
-
|
|
46585
|
-
|
|
46586
|
-
|
|
46587
|
-
|
|
46588
|
-
|
|
46589
|
-
|
|
46590
|
-
|
|
46591
|
-
|
|
46610
|
+
key: "detail",
|
|
46611
|
+
label: "\u8BE6\u60C5",
|
|
46612
|
+
onClick: () => handleDetail(record2)
|
|
46613
|
+
},
|
|
46614
|
+
...rowActions.map((action) => ({
|
|
46615
|
+
key: action.key,
|
|
46616
|
+
label: action.label,
|
|
46617
|
+
danger: action.danger,
|
|
46618
|
+
onClick: () => action.onClick(record2)
|
|
46619
|
+
})),
|
|
46620
|
+
...!readonly ? [
|
|
46621
|
+
{
|
|
46622
|
+
key: "delete",
|
|
46623
|
+
label: "\u5220\u9664",
|
|
46624
|
+
danger: true,
|
|
46625
|
+
icon: /* @__PURE__ */ jsx101(DeleteOutlined, {}),
|
|
46626
|
+
onClick: () => confirmDanger(
|
|
46627
|
+
"\u786E\u8BA4\u5220\u9664",
|
|
46628
|
+
"\u5220\u9664\u540E\u4E0D\u53EF\u6062\u590D\uFF0C\u786E\u8BA4\u7EE7\u7EED\u5417\uFF1F",
|
|
46629
|
+
() => handleDelete([String(getRecordId(record2))])
|
|
46630
|
+
)
|
|
46631
|
+
}
|
|
46632
|
+
] : [],
|
|
46633
|
+
...isProcessForm ? [
|
|
46634
|
+
{
|
|
46635
|
+
key: "workflow",
|
|
46636
|
+
label: "\u6D41\u7A0B\u65E5\u5FD7",
|
|
46637
|
+
icon: /* @__PURE__ */ jsx101(HistoryOutlined2, {}),
|
|
46638
|
+
onClick: () => message5.info("\u8BF7\u901A\u8FC7 detailRenderer \u63A5\u5165\u6D41\u7A0B\u65E5\u5FD7\u6216\u6D41\u7A0B\u56FE\u5165\u53E3")
|
|
46639
|
+
}
|
|
46640
|
+
] : []
|
|
46641
|
+
];
|
|
46642
|
+
const visibleActions = actions.slice(0, visibleRowActionLimit);
|
|
46643
|
+
const moreActions = actions.slice(visibleRowActionLimit);
|
|
46644
|
+
return /* @__PURE__ */ jsxs55(Space10, { size: 4, children: [
|
|
46645
|
+
visibleActions.map((action) => /* @__PURE__ */ jsx101(
|
|
46646
|
+
Button18,
|
|
46647
|
+
{
|
|
46648
|
+
type: "link",
|
|
46649
|
+
size: "small",
|
|
46650
|
+
danger: action.danger,
|
|
46651
|
+
onClick: action.onClick,
|
|
46652
|
+
children: action.label
|
|
46653
|
+
},
|
|
46654
|
+
action.key
|
|
46655
|
+
)),
|
|
46656
|
+
moreActions.length > 0 && /* @__PURE__ */ jsx101(
|
|
46657
|
+
Dropdown4,
|
|
46658
|
+
{
|
|
46659
|
+
trigger: ["click"],
|
|
46660
|
+
getPopupContainer,
|
|
46661
|
+
menu: {
|
|
46662
|
+
items: moreActions.map((action) => ({
|
|
46592
46663
|
key: action.key,
|
|
46593
46664
|
label: action.label,
|
|
46594
46665
|
danger: action.danger,
|
|
46595
|
-
|
|
46596
|
-
|
|
46597
|
-
|
|
46598
|
-
|
|
46599
|
-
|
|
46600
|
-
|
|
46601
|
-
|
|
46602
|
-
|
|
46603
|
-
|
|
46604
|
-
|
|
46605
|
-
|
|
46606
|
-
|
|
46607
|
-
|
|
46608
|
-
|
|
46609
|
-
|
|
46610
|
-
|
|
46666
|
+
icon: action.icon,
|
|
46667
|
+
onClick: action.onClick
|
|
46668
|
+
}))
|
|
46669
|
+
},
|
|
46670
|
+
children: /* @__PURE__ */ jsx101(
|
|
46671
|
+
Button18,
|
|
46672
|
+
{
|
|
46673
|
+
type: "text",
|
|
46674
|
+
size: "small",
|
|
46675
|
+
icon: /* @__PURE__ */ jsx101(MoreOutlined3, {}),
|
|
46676
|
+
"aria-label": "\u66F4\u591A\u64CD\u4F5C"
|
|
46677
|
+
}
|
|
46678
|
+
)
|
|
46679
|
+
}
|
|
46680
|
+
)
|
|
46681
|
+
] });
|
|
46682
|
+
}
|
|
46611
46683
|
}
|
|
46612
46684
|
];
|
|
46613
46685
|
}, [
|
|
46686
|
+
actionColumnWidth,
|
|
46614
46687
|
confirmDanger,
|
|
46615
46688
|
commitColumnWidth,
|
|
46616
46689
|
getPopupContainer,
|
|
@@ -46621,13 +46694,17 @@ var DataManagementList = ({
|
|
|
46621
46694
|
readonly,
|
|
46622
46695
|
rowActions,
|
|
46623
46696
|
updateColumnWidth,
|
|
46697
|
+
visibleRowActionLimit,
|
|
46624
46698
|
visibleFields,
|
|
46625
46699
|
widths
|
|
46626
46700
|
]);
|
|
46627
46701
|
const tableSize = density === "compact" ? "small" : density === "loose" ? "large" : "middle";
|
|
46628
46702
|
const tableScrollX = Math.max(
|
|
46629
46703
|
900,
|
|
46630
|
-
visibleFields.reduce(
|
|
46704
|
+
visibleFields.reduce(
|
|
46705
|
+
(sum, field) => sum + (widths[field.fieldId] || field.width || 160),
|
|
46706
|
+
actionColumnWidth
|
|
46707
|
+
)
|
|
46631
46708
|
);
|
|
46632
46709
|
const importPreviewColumns = useMemo61(() => {
|
|
46633
46710
|
const keys2 = Array.from(
|
|
@@ -47275,6 +47352,7 @@ function LowcodePageRenderer({ schema, context }) {
|
|
|
47275
47352
|
configScope: "personal",
|
|
47276
47353
|
forcedConfig: props.forcedConfig,
|
|
47277
47354
|
showForcedConfig: props.showForcedConfig,
|
|
47355
|
+
maxVisibleRowActions: props.maxVisibleRowActions,
|
|
47278
47356
|
requestOverride
|
|
47279
47357
|
},
|
|
47280
47358
|
node.id
|