openxiangda 1.0.220 → 1.0.221
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/package.json +1 -1
- package/packages/sdk/dist/runtime/index.cjs +239 -170
- package/packages/sdk/dist/runtime/index.cjs.map +1 -1
- package/packages/sdk/dist/runtime/index.mjs +210 -133
- package/packages/sdk/dist/runtime/index.mjs.map +1 -1
- package/packages/sdk/dist/runtime/react.cjs +177 -108
- package/packages/sdk/dist/runtime/react.cjs.map +1 -1
- package/packages/sdk/dist/runtime/react.mjs +186 -109
- package/packages/sdk/dist/runtime/react.mjs.map +1 -1
- package/packages/sdk/source/admin-list/AdminList.tsx +144 -84
|
@@ -44141,7 +44141,6 @@ var isUnauthorizedPublicSessionError = (error) => {
|
|
|
44141
44141
|
import {
|
|
44142
44142
|
Alert as Alert5,
|
|
44143
44143
|
Button as Button9,
|
|
44144
|
-
Card as Card2,
|
|
44145
44144
|
Checkbox as Checkbox2,
|
|
44146
44145
|
DatePicker,
|
|
44147
44146
|
Drawer,
|
|
@@ -44162,6 +44161,16 @@ import {
|
|
|
44162
44161
|
message as message3,
|
|
44163
44162
|
notification
|
|
44164
44163
|
} from "antd";
|
|
44164
|
+
import {
|
|
44165
|
+
DeleteOutlined,
|
|
44166
|
+
DownOutlined,
|
|
44167
|
+
DownloadOutlined as DownloadOutlined5,
|
|
44168
|
+
HolderOutlined,
|
|
44169
|
+
PlusOutlined as PlusOutlined2,
|
|
44170
|
+
ReloadOutlined as ReloadOutlined5,
|
|
44171
|
+
SettingOutlined,
|
|
44172
|
+
UpOutlined
|
|
44173
|
+
} from "@ant-design/icons";
|
|
44165
44174
|
import {
|
|
44166
44175
|
useCallback as useCallback12,
|
|
44167
44176
|
useEffect as useEffect14,
|
|
@@ -44317,7 +44326,8 @@ function renderSearchControl(field) {
|
|
|
44317
44326
|
disabled: field.disabled,
|
|
44318
44327
|
mode: field.type === "multiSelect" ? "multiple" : void 0,
|
|
44319
44328
|
options: field.options,
|
|
44320
|
-
placeholder
|
|
44329
|
+
placeholder,
|
|
44330
|
+
showSearch: { optionFilterProp: "label" }
|
|
44321
44331
|
}
|
|
44322
44332
|
);
|
|
44323
44333
|
}
|
|
@@ -44393,6 +44403,7 @@ function AdminList(props) {
|
|
|
44393
44403
|
const [form] = Form3.useForm();
|
|
44394
44404
|
const [messageApi, messageHolder] = message3.useMessage();
|
|
44395
44405
|
const [notificationApi, notificationHolder] = notification.useNotification();
|
|
44406
|
+
const [modalApi, modalHolder] = Modal6.useModal();
|
|
44396
44407
|
const sourceKey = dataSource.key || "anonymous";
|
|
44397
44408
|
const [rawPreference, setRawPreference] = useState15(null);
|
|
44398
44409
|
const [preference, setPreference] = useState15(
|
|
@@ -44436,7 +44447,11 @@ function AdminList(props) {
|
|
|
44436
44447
|
const [draggedSearchKey, setDraggedSearchKey] = useState15("");
|
|
44437
44448
|
const selectedKeysRef = useRef8([]);
|
|
44438
44449
|
const dataSourceRef = useRef8(dataSource);
|
|
44450
|
+
const onQueryChangeRef = useRef8(onQueryChange);
|
|
44451
|
+
const onSelectionChangeRef = useRef8(onSelectionChange);
|
|
44439
44452
|
dataSourceRef.current = dataSource;
|
|
44453
|
+
onQueryChangeRef.current = onQueryChange;
|
|
44454
|
+
onSelectionChangeRef.current = onSelectionChange;
|
|
44440
44455
|
const definitionFingerprint = JSON.stringify({
|
|
44441
44456
|
columns: columns.map((column) => ({
|
|
44442
44457
|
key: column.key,
|
|
@@ -44465,9 +44480,9 @@ function AdminList(props) {
|
|
|
44465
44480
|
selectedRowsRef.current.clear();
|
|
44466
44481
|
selectedKeysRef.current = [];
|
|
44467
44482
|
setSelectedKeys([]);
|
|
44468
|
-
|
|
44483
|
+
onSelectionChangeRef.current?.({ rowKeys: [], rows: [] });
|
|
44469
44484
|
},
|
|
44470
|
-
[messageApi
|
|
44485
|
+
[messageApi]
|
|
44471
44486
|
);
|
|
44472
44487
|
useEffect14(() => {
|
|
44473
44488
|
if (!controlledSelectedKeys) return;
|
|
@@ -44498,11 +44513,11 @@ function AdminList(props) {
|
|
|
44498
44513
|
for (const key of disabledKeys) selectedRowsRef.current.delete(key);
|
|
44499
44514
|
selectedKeysRef.current = nextKeys;
|
|
44500
44515
|
setSelectedKeys(nextKeys);
|
|
44501
|
-
|
|
44516
|
+
onSelectionChangeRef.current?.({
|
|
44502
44517
|
rowKeys: nextKeys,
|
|
44503
44518
|
rows: nextKeys.map((key) => selectedRowsRef.current.get(key)).filter(Boolean)
|
|
44504
44519
|
});
|
|
44505
|
-
}, [
|
|
44520
|
+
}, [rowKey, rowSelectable, rows]);
|
|
44506
44521
|
useEffect14(() => {
|
|
44507
44522
|
let active = true;
|
|
44508
44523
|
setReady(false);
|
|
@@ -44586,7 +44601,7 @@ function AdminList(props) {
|
|
|
44586
44601
|
if (!ready) return;
|
|
44587
44602
|
setLoading(true);
|
|
44588
44603
|
setError(null);
|
|
44589
|
-
|
|
44604
|
+
onQueryChangeRef.current?.(query);
|
|
44590
44605
|
try {
|
|
44591
44606
|
const result = await dataSourceRef.current.query(query);
|
|
44592
44607
|
setRows(result.rows || []);
|
|
@@ -44602,7 +44617,7 @@ function AdminList(props) {
|
|
|
44602
44617
|
} finally {
|
|
44603
44618
|
setLoading(false);
|
|
44604
44619
|
}
|
|
44605
|
-
}, [
|
|
44620
|
+
}, [query, ready]);
|
|
44606
44621
|
useEffect14(() => {
|
|
44607
44622
|
if (!ready) return;
|
|
44608
44623
|
const fingerprint = queryFingerprint(query, sourceKey);
|
|
@@ -44651,7 +44666,7 @@ function AdminList(props) {
|
|
|
44651
44666
|
);
|
|
44652
44667
|
const title = definition.sortable ? /* @__PURE__ */ jsxs13(Space4, { size: 4, children: [
|
|
44653
44668
|
/* @__PURE__ */ jsx17("span", { children: definition.title }),
|
|
44654
|
-
sortablePriority.has(sortField) ? /* @__PURE__ */ jsx17(Tag4, {
|
|
44669
|
+
sortablePriority.has(sortField) ? /* @__PURE__ */ jsx17(Tag4, { color: "blue", variant: "filled", children: sortablePriority.get(sortField) }) : null
|
|
44655
44670
|
] }) : definition.title;
|
|
44656
44671
|
return {
|
|
44657
44672
|
key: definition.key,
|
|
@@ -44749,7 +44764,7 @@ function AdminList(props) {
|
|
|
44749
44764
|
}
|
|
44750
44765
|
setSelectedKeys(nextKeys);
|
|
44751
44766
|
selectedKeysRef.current = nextKeys;
|
|
44752
|
-
|
|
44767
|
+
onSelectionChangeRef.current?.({
|
|
44753
44768
|
rowKeys: nextKeys,
|
|
44754
44769
|
rows: nextKeys.map((key) => selectedRowsRef.current.get(key)).filter(Boolean)
|
|
44755
44770
|
});
|
|
@@ -44949,7 +44964,7 @@ function AdminList(props) {
|
|
|
44949
44964
|
{
|
|
44950
44965
|
key: "search",
|
|
44951
44966
|
label: "\u641C\u7D22\u9879",
|
|
44952
|
-
children: /* @__PURE__ */ jsxs13(Space4, {
|
|
44967
|
+
children: /* @__PURE__ */ jsxs13(Space4, { orientation: "vertical", size: 12, style: { width: "100%" }, children: [
|
|
44953
44968
|
/* @__PURE__ */ jsxs13(Space4, { children: [
|
|
44954
44969
|
/* @__PURE__ */ jsx17("span", { children: "\u9ED8\u8BA4\u5C55\u793A" }),
|
|
44955
44970
|
/* @__PURE__ */ jsx17(
|
|
@@ -44985,12 +45000,11 @@ function AdminList(props) {
|
|
|
44985
45000
|
),
|
|
44986
45001
|
style: {
|
|
44987
45002
|
alignItems: "center",
|
|
44988
|
-
|
|
44989
|
-
borderRadius: 8,
|
|
45003
|
+
borderBottom: "1px solid rgba(5, 5, 5, 0.06)",
|
|
44990
45004
|
display: "grid",
|
|
44991
|
-
gap:
|
|
44992
|
-
gridTemplateColumns: "
|
|
44993
|
-
padding: "
|
|
45005
|
+
gap: 12,
|
|
45006
|
+
gridTemplateColumns: "24px 1fr auto",
|
|
45007
|
+
padding: "12px 4px"
|
|
44994
45008
|
},
|
|
44995
45009
|
children: [
|
|
44996
45010
|
/* @__PURE__ */ jsx17(
|
|
@@ -44998,7 +45012,7 @@ function AdminList(props) {
|
|
|
44998
45012
|
{
|
|
44999
45013
|
"aria-label": `\u62D6\u52A8\u7B2C ${index + 1} \u9879`,
|
|
45000
45014
|
style: { color: "#8c8c8c", cursor: "grab" },
|
|
45001
|
-
children:
|
|
45015
|
+
children: /* @__PURE__ */ jsx17(HolderOutlined, {})
|
|
45002
45016
|
}
|
|
45003
45017
|
),
|
|
45004
45018
|
/* @__PURE__ */ jsx17("span", { children: definition.label }),
|
|
@@ -45029,7 +45043,7 @@ function AdminList(props) {
|
|
|
45029
45043
|
{
|
|
45030
45044
|
key: "columns",
|
|
45031
45045
|
label: "\u5217\u8BBE\u7F6E",
|
|
45032
|
-
children: /* @__PURE__ */ jsxs13(Space4, {
|
|
45046
|
+
children: /* @__PURE__ */ jsxs13(Space4, { orientation: "vertical", size: 12, style: { width: "100%" }, children: [
|
|
45033
45047
|
/* @__PURE__ */ jsx17(
|
|
45034
45048
|
Input4,
|
|
45035
45049
|
{
|
|
@@ -45063,12 +45077,11 @@ function AdminList(props) {
|
|
|
45063
45077
|
),
|
|
45064
45078
|
style: {
|
|
45065
45079
|
alignItems: "center",
|
|
45066
|
-
|
|
45067
|
-
borderRadius: 8,
|
|
45080
|
+
borderBottom: "1px solid rgba(5, 5, 5, 0.06)",
|
|
45068
45081
|
display: "grid",
|
|
45069
|
-
gap:
|
|
45070
|
-
gridTemplateColumns: "
|
|
45071
|
-
padding: "
|
|
45082
|
+
gap: 12,
|
|
45083
|
+
gridTemplateColumns: "24px minmax(0, 1fr) 76px 116px",
|
|
45084
|
+
padding: "12px 4px"
|
|
45072
45085
|
},
|
|
45073
45086
|
children: [
|
|
45074
45087
|
/* @__PURE__ */ jsx17(
|
|
@@ -45076,7 +45089,7 @@ function AdminList(props) {
|
|
|
45076
45089
|
{
|
|
45077
45090
|
"aria-label": `\u62D6\u52A8\u7B2C ${index + 1} \u5217`,
|
|
45078
45091
|
style: { color: "#8c8c8c", cursor: "grab" },
|
|
45079
|
-
children:
|
|
45092
|
+
children: /* @__PURE__ */ jsx17(HolderOutlined, {})
|
|
45080
45093
|
}
|
|
45081
45094
|
),
|
|
45082
45095
|
/* @__PURE__ */ jsxs13(
|
|
@@ -45089,7 +45102,7 @@ function AdminList(props) {
|
|
|
45089
45102
|
}),
|
|
45090
45103
|
children: [
|
|
45091
45104
|
definition.title,
|
|
45092
|
-
locked ? /* @__PURE__ */ jsx17(Tag4, {
|
|
45105
|
+
locked ? /* @__PURE__ */ jsx17(Tag4, { variant: "filled", style: { marginInlineStart: 4 }, children: "\u9501\u5B9A" }) : null
|
|
45093
45106
|
]
|
|
45094
45107
|
}
|
|
45095
45108
|
),
|
|
@@ -45130,7 +45143,7 @@ function AdminList(props) {
|
|
|
45130
45143
|
{
|
|
45131
45144
|
key: "sort",
|
|
45132
45145
|
label: "\u6392\u5E8F",
|
|
45133
|
-
children: /* @__PURE__ */ jsxs13(Space4, {
|
|
45146
|
+
children: /* @__PURE__ */ jsxs13(Space4, { orientation: "vertical", size: 12, style: { width: "100%" }, children: [
|
|
45134
45147
|
/* @__PURE__ */ jsx17(
|
|
45135
45148
|
Alert5,
|
|
45136
45149
|
{
|
|
@@ -45144,15 +45157,14 @@ function AdminList(props) {
|
|
|
45144
45157
|
{
|
|
45145
45158
|
style: {
|
|
45146
45159
|
alignItems: "center",
|
|
45147
|
-
|
|
45148
|
-
borderRadius: 8,
|
|
45160
|
+
borderBottom: "1px solid rgba(5, 5, 5, 0.06)",
|
|
45149
45161
|
display: "grid",
|
|
45150
|
-
gap:
|
|
45162
|
+
gap: 12,
|
|
45151
45163
|
gridTemplateColumns: "28px 1fr 100px auto",
|
|
45152
|
-
padding:
|
|
45164
|
+
padding: "12px 4px"
|
|
45153
45165
|
},
|
|
45154
45166
|
children: [
|
|
45155
|
-
/* @__PURE__ */ jsx17(Tag4, {
|
|
45167
|
+
/* @__PURE__ */ jsx17(Tag4, { color: "blue", variant: "filled", children: index + 1 }),
|
|
45156
45168
|
/* @__PURE__ */ jsx17(
|
|
45157
45169
|
Select3,
|
|
45158
45170
|
{
|
|
@@ -45189,8 +45201,9 @@ function AdminList(props) {
|
|
|
45189
45201
|
Button9,
|
|
45190
45202
|
{
|
|
45191
45203
|
danger: true,
|
|
45204
|
+
icon: /* @__PURE__ */ jsx17(DeleteOutlined, {}),
|
|
45192
45205
|
size: "small",
|
|
45193
|
-
type: "
|
|
45206
|
+
type: "text",
|
|
45194
45207
|
onClick: () => setSettingsDraft((current) => ({
|
|
45195
45208
|
...current,
|
|
45196
45209
|
sorts: (current.sorts || []).filter(
|
|
@@ -45209,6 +45222,8 @@ function AdminList(props) {
|
|
|
45209
45222
|
{
|
|
45210
45223
|
block: true,
|
|
45211
45224
|
disabled: (settingsDraft.sorts || []).length >= columns.filter((column) => column.sortable).length,
|
|
45225
|
+
icon: /* @__PURE__ */ jsx17(PlusOutlined2, {}),
|
|
45226
|
+
type: "text",
|
|
45212
45227
|
onClick: () => {
|
|
45213
45228
|
const used = new Set(
|
|
45214
45229
|
(settingsDraft.sorts || []).map((sort) => sort.field)
|
|
@@ -45236,8 +45251,8 @@ function AdminList(props) {
|
|
|
45236
45251
|
{
|
|
45237
45252
|
key: "display",
|
|
45238
45253
|
label: "\u663E\u793A",
|
|
45239
|
-
children: /* @__PURE__ */ jsxs13(Space4, {
|
|
45240
|
-
/* @__PURE__ */ jsxs13(Space4, {
|
|
45254
|
+
children: /* @__PURE__ */ jsxs13(Space4, { orientation: "vertical", size: 20, style: { width: "100%" }, children: [
|
|
45255
|
+
/* @__PURE__ */ jsxs13(Space4, { orientation: "vertical", children: [
|
|
45241
45256
|
/* @__PURE__ */ jsx17("span", { children: "\u8868\u683C\u5BC6\u5EA6" }),
|
|
45242
45257
|
/* @__PURE__ */ jsx17(
|
|
45243
45258
|
Segmented,
|
|
@@ -45255,7 +45270,7 @@ function AdminList(props) {
|
|
|
45255
45270
|
}
|
|
45256
45271
|
)
|
|
45257
45272
|
] }),
|
|
45258
|
-
/* @__PURE__ */ jsxs13(Space4, {
|
|
45273
|
+
/* @__PURE__ */ jsxs13(Space4, { orientation: "vertical", children: [
|
|
45259
45274
|
/* @__PURE__ */ jsx17("span", { children: "\u9ED8\u8BA4\u6BCF\u9875" }),
|
|
45260
45275
|
/* @__PURE__ */ jsx17(
|
|
45261
45276
|
Segmented,
|
|
@@ -45353,59 +45368,87 @@ function AdminList(props) {
|
|
|
45353
45368
|
return /* @__PURE__ */ jsxs13("div", { className, style, children: [
|
|
45354
45369
|
messageHolder,
|
|
45355
45370
|
notificationHolder,
|
|
45356
|
-
|
|
45357
|
-
|
|
45358
|
-
|
|
45371
|
+
modalHolder,
|
|
45372
|
+
/* @__PURE__ */ jsxs13(Space4, { orientation: "vertical", size: 16, style: { width: "100%" }, children: [
|
|
45373
|
+
searchFields.length ? /* @__PURE__ */ jsx17(
|
|
45374
|
+
"div",
|
|
45359
45375
|
{
|
|
45360
|
-
|
|
45361
|
-
|
|
45362
|
-
|
|
45363
|
-
|
|
45364
|
-
"
|
|
45376
|
+
style: {
|
|
45377
|
+
background: "#fff",
|
|
45378
|
+
border: "1px solid #e8edf3",
|
|
45379
|
+
borderRadius: 8,
|
|
45380
|
+
overflowX: "auto",
|
|
45381
|
+
padding: "18px 20px"
|
|
45382
|
+
},
|
|
45383
|
+
children: /* @__PURE__ */ jsx17(
|
|
45384
|
+
Form3,
|
|
45365
45385
|
{
|
|
45366
|
-
|
|
45367
|
-
|
|
45368
|
-
|
|
45369
|
-
|
|
45370
|
-
|
|
45371
|
-
|
|
45372
|
-
|
|
45373
|
-
|
|
45374
|
-
|
|
45375
|
-
|
|
45376
|
-
|
|
45377
|
-
|
|
45378
|
-
style: { marginBottom: 0 },
|
|
45379
|
-
children: field.render ? /* @__PURE__ */ jsx17(Form3.Item, { noStyle: true, shouldUpdate: true, children: () => field.render?.({
|
|
45380
|
-
disabled: field.disabled,
|
|
45381
|
-
value: form.getFieldValue(field.key),
|
|
45382
|
-
onChange: (value) => form.setFieldValue(field.key, value)
|
|
45383
|
-
}) }) : renderSearchControl(field)
|
|
45386
|
+
form,
|
|
45387
|
+
layout: "vertical",
|
|
45388
|
+
onFinish: applySearch,
|
|
45389
|
+
children: /* @__PURE__ */ jsxs13(
|
|
45390
|
+
"div",
|
|
45391
|
+
{
|
|
45392
|
+
style: {
|
|
45393
|
+
alignItems: "end",
|
|
45394
|
+
display: "grid",
|
|
45395
|
+
gap: 12,
|
|
45396
|
+
gridTemplateColumns: "repeat(4, minmax(180px, 1fr)) minmax(256px, auto)",
|
|
45397
|
+
minWidth: 1040
|
|
45384
45398
|
},
|
|
45385
|
-
|
|
45386
|
-
|
|
45387
|
-
|
|
45388
|
-
|
|
45389
|
-
|
|
45390
|
-
|
|
45391
|
-
|
|
45392
|
-
|
|
45393
|
-
|
|
45394
|
-
|
|
45395
|
-
|
|
45396
|
-
|
|
45397
|
-
|
|
45398
|
-
|
|
45399
|
-
|
|
45399
|
+
children: [
|
|
45400
|
+
visibleSearchFields.map((field) => /* @__PURE__ */ jsx17(
|
|
45401
|
+
Form3.Item,
|
|
45402
|
+
{
|
|
45403
|
+
label: field.label,
|
|
45404
|
+
name: field.render ? void 0 : field.key,
|
|
45405
|
+
style: { marginBottom: 0 },
|
|
45406
|
+
children: field.render ? /* @__PURE__ */ jsx17(Form3.Item, { noStyle: true, shouldUpdate: true, children: () => field.render?.({
|
|
45407
|
+
disabled: field.disabled,
|
|
45408
|
+
value: form.getFieldValue(field.key),
|
|
45409
|
+
onChange: (value) => form.setFieldValue(field.key, value)
|
|
45410
|
+
}) }) : renderSearchControl(field)
|
|
45411
|
+
},
|
|
45412
|
+
field.key
|
|
45413
|
+
)),
|
|
45414
|
+
/* @__PURE__ */ jsx17(
|
|
45415
|
+
Form3.Item,
|
|
45416
|
+
{
|
|
45417
|
+
style: {
|
|
45418
|
+
justifySelf: "end",
|
|
45419
|
+
gridColumn: 5,
|
|
45420
|
+
marginBottom: 0,
|
|
45421
|
+
minWidth: 256
|
|
45422
|
+
},
|
|
45423
|
+
children: /* @__PURE__ */ jsxs13(Space4, { size: 8, children: [
|
|
45424
|
+
/* @__PURE__ */ jsx17(Button9, { htmlType: "submit", type: "primary", children: "\u67E5\u8BE2" }),
|
|
45425
|
+
/* @__PURE__ */ jsx17(Button9, { onClick: resetSearch, children: "\u91CD\u7F6E" }),
|
|
45426
|
+
searchFields.length > (preference.defaultVisibleSearchCount || defaultVisibleSearchCount) ? /* @__PURE__ */ jsx17(
|
|
45427
|
+
Button9,
|
|
45428
|
+
{
|
|
45429
|
+
icon: expanded ? /* @__PURE__ */ jsx17(UpOutlined, {}) : /* @__PURE__ */ jsx17(DownOutlined, {}),
|
|
45430
|
+
iconPlacement: "end",
|
|
45431
|
+
type: "link",
|
|
45432
|
+
onClick: () => setExpanded((current) => !current),
|
|
45433
|
+
children: expanded ? "\u6536\u8D77" : "\u66F4\u591A\u7B5B\u9009"
|
|
45434
|
+
}
|
|
45435
|
+
) : null
|
|
45436
|
+
] })
|
|
45437
|
+
}
|
|
45438
|
+
)
|
|
45439
|
+
]
|
|
45440
|
+
}
|
|
45441
|
+
)
|
|
45400
45442
|
}
|
|
45401
45443
|
)
|
|
45402
45444
|
}
|
|
45403
|
-
)
|
|
45445
|
+
) : null,
|
|
45404
45446
|
/* @__PURE__ */ jsx17(
|
|
45405
|
-
|
|
45447
|
+
"div",
|
|
45406
45448
|
{
|
|
45407
|
-
|
|
45408
|
-
|
|
45449
|
+
style: {
|
|
45450
|
+
padding: "2px 0 0"
|
|
45451
|
+
},
|
|
45409
45452
|
children: /* @__PURE__ */ jsxs13(
|
|
45410
45453
|
Space4,
|
|
45411
45454
|
{
|
|
@@ -45432,14 +45475,37 @@ function AdminList(props) {
|
|
|
45432
45475
|
)
|
|
45433
45476
|
}))
|
|
45434
45477
|
},
|
|
45478
|
+
trigger: ["click"],
|
|
45435
45479
|
children: /* @__PURE__ */ jsx17(Button9, { disabled: selectedKeys.length === 0, children: "\u6279\u91CF\u64CD\u4F5C" })
|
|
45436
45480
|
}
|
|
45437
45481
|
) : null,
|
|
45438
|
-
exportable && dataSource.createExportTask ? /* @__PURE__ */ jsx17(Dropdown2, { menu: { items: exportMenuItems }, children: /* @__PURE__ */ jsx17(
|
|
45482
|
+
exportable && dataSource.createExportTask ? /* @__PURE__ */ jsx17(Dropdown2, { menu: { items: exportMenuItems }, trigger: ["click"], children: /* @__PURE__ */ jsx17(
|
|
45483
|
+
Button9,
|
|
45484
|
+
{
|
|
45485
|
+
icon: /* @__PURE__ */ jsx17(DownloadOutlined5, {}),
|
|
45486
|
+
loading: exporting,
|
|
45487
|
+
children: "\u5BFC\u51FA"
|
|
45488
|
+
}
|
|
45489
|
+
) }) : null
|
|
45439
45490
|
] }),
|
|
45440
45491
|
/* @__PURE__ */ jsxs13(Space4, { children: [
|
|
45441
|
-
/* @__PURE__ */ jsx17(
|
|
45442
|
-
|
|
45492
|
+
/* @__PURE__ */ jsx17(
|
|
45493
|
+
Button9,
|
|
45494
|
+
{
|
|
45495
|
+
"aria-label": "\u5237\u65B0\u5217\u8868",
|
|
45496
|
+
icon: /* @__PURE__ */ jsx17(ReloadOutlined5, {}),
|
|
45497
|
+
title: "\u5237\u65B0",
|
|
45498
|
+
onClick: () => void loadData()
|
|
45499
|
+
}
|
|
45500
|
+
),
|
|
45501
|
+
/* @__PURE__ */ jsx17(
|
|
45502
|
+
Button9,
|
|
45503
|
+
{
|
|
45504
|
+
icon: /* @__PURE__ */ jsx17(SettingOutlined, {}),
|
|
45505
|
+
onClick: openSettings,
|
|
45506
|
+
children: "\u5217\u8868\u8BBE\u7F6E"
|
|
45507
|
+
}
|
|
45508
|
+
)
|
|
45443
45509
|
] })
|
|
45444
45510
|
]
|
|
45445
45511
|
}
|
|
@@ -45473,29 +45539,40 @@ function AdminList(props) {
|
|
|
45473
45539
|
}
|
|
45474
45540
|
) : null,
|
|
45475
45541
|
/* @__PURE__ */ jsx17(
|
|
45476
|
-
|
|
45542
|
+
"div",
|
|
45477
45543
|
{
|
|
45478
|
-
|
|
45479
|
-
|
|
45480
|
-
|
|
45481
|
-
|
|
45482
|
-
|
|
45483
|
-
|
|
45484
|
-
|
|
45485
|
-
|
|
45486
|
-
|
|
45487
|
-
|
|
45488
|
-
|
|
45489
|
-
|
|
45490
|
-
|
|
45491
|
-
|
|
45492
|
-
|
|
45493
|
-
|
|
45494
|
-
|
|
45495
|
-
|
|
45496
|
-
|
|
45497
|
-
|
|
45498
|
-
|
|
45544
|
+
style: {
|
|
45545
|
+
background: "#fff",
|
|
45546
|
+
border: "1px solid #edf0f4",
|
|
45547
|
+
borderRadius: 8,
|
|
45548
|
+
overflow: "hidden"
|
|
45549
|
+
},
|
|
45550
|
+
children: /* @__PURE__ */ jsx17(
|
|
45551
|
+
Table2,
|
|
45552
|
+
{
|
|
45553
|
+
bordered: preference.showBorders,
|
|
45554
|
+
columns: resolvedColumns,
|
|
45555
|
+
dataSource: rows,
|
|
45556
|
+
loading,
|
|
45557
|
+
locale: { emptyText: localeEmpty },
|
|
45558
|
+
pagination: tablePagination,
|
|
45559
|
+
rowClassName: (_row, index) => preference.striped && index % 2 === 1 ? "admin-list-row-striped" : "",
|
|
45560
|
+
rowKey: (row) => getRowKey(rowKey, row),
|
|
45561
|
+
rowSelection: selectable ? {
|
|
45562
|
+
preserveSelectedRowKeys: preserveSelectionAcrossPages,
|
|
45563
|
+
selectedRowKeys: selectedKeys,
|
|
45564
|
+
getCheckboxProps: (row) => ({
|
|
45565
|
+
disabled: rowSelectable ? !rowSelectable(row) : false,
|
|
45566
|
+
title: rowSelectionReason?.(row)
|
|
45567
|
+
}),
|
|
45568
|
+
onChange: handleSelectionChange
|
|
45569
|
+
} : void 0,
|
|
45570
|
+
scroll: { x: "max-content" },
|
|
45571
|
+
size: preference.density,
|
|
45572
|
+
onChange: handleTableChange,
|
|
45573
|
+
onRow
|
|
45574
|
+
}
|
|
45575
|
+
)
|
|
45499
45576
|
}
|
|
45500
45577
|
)
|
|
45501
45578
|
] }),
|
|
@@ -45511,7 +45588,7 @@ function AdminList(props) {
|
|
|
45511
45588
|
/* @__PURE__ */ jsx17(
|
|
45512
45589
|
Button9,
|
|
45513
45590
|
{
|
|
45514
|
-
onClick: () =>
|
|
45591
|
+
onClick: () => modalApi.confirm({
|
|
45515
45592
|
title: "\u6062\u590D\u7CFB\u7EDF\u9ED8\u8BA4\u8BBE\u7F6E\uFF1F",
|
|
45516
45593
|
content: "\u5F53\u524D\u8D26\u53F7\u4FDD\u5B58\u7684\u5217\u8868\u914D\u7F6E\u5C06\u88AB\u6E05\u9664\u3002",
|
|
45517
45594
|
okText: "\u6062\u590D",
|
|
@@ -45544,10 +45621,10 @@ function AdminList(props) {
|
|
|
45544
45621
|
}
|
|
45545
45622
|
)
|
|
45546
45623
|
] }),
|
|
45547
|
-
|
|
45624
|
+
size: 420,
|
|
45548
45625
|
onClose: () => {
|
|
45549
45626
|
if (JSON.stringify(settingsDraft) !== JSON.stringify(preference)) {
|
|
45550
|
-
|
|
45627
|
+
modalApi.confirm({
|
|
45551
45628
|
title: "\u653E\u5F03\u672A\u4FDD\u5B58\u7684\u8BBE\u7F6E\uFF1F",
|
|
45552
45629
|
content: "\u5F53\u524D\u8C03\u6574\u5C1A\u672A\u5E94\u7528\uFF0C\u5173\u95ED\u540E\u5C06\u4E22\u5931\u3002",
|
|
45553
45630
|
okText: "\u653E\u5F03\u4FEE\u6539",
|
|
@@ -45571,7 +45648,7 @@ function AdminList(props) {
|
|
|
45571
45648
|
title: "\u5BFC\u51FA\u5168\u90E8\u6570\u636E",
|
|
45572
45649
|
onCancel: () => setExportConfirmOpen(false),
|
|
45573
45650
|
onOk: () => void executeExport("all"),
|
|
45574
|
-
children: /* @__PURE__ */ jsxs13(Space4, {
|
|
45651
|
+
children: /* @__PURE__ */ jsxs13(Space4, { orientation: "vertical", size: 12, style: { width: "100%" }, children: [
|
|
45575
45652
|
/* @__PURE__ */ jsx17("div", { children: "\u6570\u636E\u8303\u56F4\uFF1A\u5F53\u524D\u67E5\u8BE2\u7ED3\u679C" }),
|
|
45576
45653
|
/* @__PURE__ */ jsxs13("div", { children: [
|
|
45577
45654
|
"\u9884\u8BA1\u6570\u91CF\uFF1A",
|
|
@@ -45750,7 +45827,7 @@ function createFunctionAdminListSource(options) {
|
|
|
45750
45827
|
|
|
45751
45828
|
// packages/sdk/src/runtime/host/builtinRouteRenderer.tsx
|
|
45752
45829
|
import { useCallback as useCallback30, useEffect as useEffect55, useMemo as useMemo42, useState as useState47 } from "react";
|
|
45753
|
-
import { Alert as Alert8, Button as Button20, Card as
|
|
45830
|
+
import { Alert as Alert8, Button as Button20, Card as Card2, Empty as Empty12, Spin as Spin9, Typography as Typography6 } from "antd";
|
|
45754
45831
|
|
|
45755
45832
|
// packages/sdk/src/components/modules/DataManagementList.tsx
|
|
45756
45833
|
import { useCallback as useCallback29, useEffect as useEffect54, useMemo as useMemo41, useRef as useRef25, useState as useState46 } from "react";
|
|
@@ -45779,15 +45856,15 @@ import {
|
|
|
45779
45856
|
} from "antd";
|
|
45780
45857
|
import dayjs12 from "dayjs";
|
|
45781
45858
|
import {
|
|
45782
|
-
DeleteOutlined,
|
|
45783
|
-
DownloadOutlined as
|
|
45859
|
+
DeleteOutlined as DeleteOutlined2,
|
|
45860
|
+
DownloadOutlined as DownloadOutlined6,
|
|
45784
45861
|
FilterOutlined,
|
|
45785
45862
|
HistoryOutlined as HistoryOutlined2,
|
|
45786
45863
|
ImportOutlined,
|
|
45787
45864
|
MoreOutlined as MoreOutlined2,
|
|
45788
|
-
PlusOutlined as
|
|
45789
|
-
ReloadOutlined as
|
|
45790
|
-
SettingOutlined,
|
|
45865
|
+
PlusOutlined as PlusOutlined3,
|
|
45866
|
+
ReloadOutlined as ReloadOutlined7,
|
|
45867
|
+
SettingOutlined as SettingOutlined2,
|
|
45791
45868
|
SwapOutlined as SwapOutlined3
|
|
45792
45869
|
} from "@ant-design/icons";
|
|
45793
45870
|
|
|
@@ -56651,10 +56728,10 @@ import { useState as useState37 } from "react";
|
|
|
56651
56728
|
import { Button as Button16, Empty as Empty10, Pagination as Pagination2, Skeleton as Skeleton2, Tag as Tag8, Tooltip as Tooltip4 } from "antd";
|
|
56652
56729
|
import {
|
|
56653
56730
|
ArrowRightOutlined,
|
|
56654
|
-
DownOutlined,
|
|
56731
|
+
DownOutlined as DownOutlined2,
|
|
56655
56732
|
HistoryOutlined,
|
|
56656
|
-
ReloadOutlined as
|
|
56657
|
-
UpOutlined
|
|
56733
|
+
ReloadOutlined as ReloadOutlined6,
|
|
56734
|
+
UpOutlined as UpOutlined2
|
|
56658
56735
|
} from "@ant-design/icons";
|
|
56659
56736
|
import { jsx as jsx97, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
56660
56737
|
var sourceLabels = {
|
|
@@ -56725,7 +56802,7 @@ var RecordChangePanel = ({
|
|
|
56725
56802
|
count,
|
|
56726
56803
|
" \u6761"
|
|
56727
56804
|
] }),
|
|
56728
|
-
expanded ? /* @__PURE__ */ jsx97(
|
|
56805
|
+
expanded ? /* @__PURE__ */ jsx97(UpOutlined2, { className: "text-xs" }) : /* @__PURE__ */ jsx97(DownOutlined2, { className: "text-xs" })
|
|
56729
56806
|
]
|
|
56730
56807
|
}
|
|
56731
56808
|
),
|
|
@@ -56734,7 +56811,7 @@ var RecordChangePanel = ({
|
|
|
56734
56811
|
{
|
|
56735
56812
|
type: "text",
|
|
56736
56813
|
size: "small",
|
|
56737
|
-
icon: /* @__PURE__ */ jsx97(
|
|
56814
|
+
icon: /* @__PURE__ */ jsx97(ReloadOutlined6, {}),
|
|
56738
56815
|
onClick: onRefresh,
|
|
56739
56816
|
disabled: loading,
|
|
56740
56817
|
children: "\u5237\u65B0"
|
|
@@ -60972,7 +61049,7 @@ function FilterGroupEditor({
|
|
|
60972
61049
|
{
|
|
60973
61050
|
danger: true,
|
|
60974
61051
|
type: "text",
|
|
60975
|
-
icon: /* @__PURE__ */ jsx105(
|
|
61052
|
+
icon: /* @__PURE__ */ jsx105(DeleteOutlined2, {}),
|
|
60976
61053
|
onClick: () => onChange({ ...group, rules: group.rules.filter((item) => item.id !== rule.id) })
|
|
60977
61054
|
}
|
|
60978
61055
|
)
|
|
@@ -61650,7 +61727,7 @@ var DataManagementList = ({
|
|
|
61650
61727
|
key: "delete",
|
|
61651
61728
|
label: "\u5220\u9664",
|
|
61652
61729
|
danger: true,
|
|
61653
|
-
icon: /* @__PURE__ */ jsx105(
|
|
61730
|
+
icon: /* @__PURE__ */ jsx105(DeleteOutlined2, {}),
|
|
61654
61731
|
onClick: () => confirmDanger(
|
|
61655
61732
|
"\u786E\u8BA4\u5220\u9664",
|
|
61656
61733
|
"\u5220\u9664\u540E\u4E0D\u53EF\u6062\u590D\uFF0C\u786E\u8BA4\u7EE7\u7EED\u5417\uFF1F",
|
|
@@ -61761,7 +61838,7 @@ var DataManagementList = ({
|
|
|
61761
61838
|
/* @__PURE__ */ jsxs55("div", { className: "mx-auto flex min-h-0 w-full max-w-[1440px] flex-col px-4 py-4 md:px-6", children: [
|
|
61762
61839
|
title && /* @__PURE__ */ jsx105("div", { className: "mb-4", children: /* @__PURE__ */ jsx105("h2", { className: "m-0 text-xl font-semibold text-ant-color-text", children: title }) }),
|
|
61763
61840
|
/* @__PURE__ */ jsx105("div", { className: "mb-4 flex flex-col gap-3 md:flex-row md:items-center", children: /* @__PURE__ */ jsxs55(Space11, { wrap: true, children: [
|
|
61764
|
-
canCreate && (submitRenderer || runtimeFormSchema) && /* @__PURE__ */ jsx105(Button19, { icon: /* @__PURE__ */ jsx105(
|
|
61841
|
+
canCreate && (submitRenderer || runtimeFormSchema) && /* @__PURE__ */ jsx105(Button19, { icon: /* @__PURE__ */ jsx105(PlusOutlined3, {}), type: "primary", onClick: () => setSubmitOpen(true), children: "\u65B0\u589E" }),
|
|
61765
61842
|
/* @__PURE__ */ jsx105(
|
|
61766
61843
|
Input16.Search,
|
|
61767
61844
|
{
|
|
@@ -61786,7 +61863,7 @@ var DataManagementList = ({
|
|
|
61786
61863
|
}
|
|
61787
61864
|
),
|
|
61788
61865
|
/* @__PURE__ */ jsx105(Button19, { icon: /* @__PURE__ */ jsx105(FilterOutlined, {}), onClick: () => setFilterOpen(true), children: "\u7B5B\u9009" }),
|
|
61789
|
-
/* @__PURE__ */ jsx105(Button19, { icon: /* @__PURE__ */ jsx105(
|
|
61866
|
+
/* @__PURE__ */ jsx105(Button19, { icon: /* @__PURE__ */ jsx105(SettingOutlined2, {}), onClick: () => setColumnOpen(true), children: "\u5217\u8BBE\u7F6E" }),
|
|
61790
61867
|
canExport && /* @__PURE__ */ jsx105(
|
|
61791
61868
|
Dropdown3,
|
|
61792
61869
|
{
|
|
@@ -61809,7 +61886,7 @@ var DataManagementList = ({
|
|
|
61809
61886
|
}
|
|
61810
61887
|
]
|
|
61811
61888
|
},
|
|
61812
|
-
children: /* @__PURE__ */ jsx105(Button19, { icon: /* @__PURE__ */ jsx105(
|
|
61889
|
+
children: /* @__PURE__ */ jsx105(Button19, { icon: /* @__PURE__ */ jsx105(DownloadOutlined6, {}), children: "\u5BFC\u51FA" })
|
|
61813
61890
|
}
|
|
61814
61891
|
),
|
|
61815
61892
|
canImport && /* @__PURE__ */ jsx105(
|
|
@@ -61829,7 +61906,7 @@ var DataManagementList = ({
|
|
|
61829
61906
|
children: /* @__PURE__ */ jsx105(Button19, { icon: /* @__PURE__ */ jsx105(ImportOutlined, {}), children: "\u5BFC\u5165" })
|
|
61830
61907
|
}
|
|
61831
61908
|
),
|
|
61832
|
-
/* @__PURE__ */ jsx105(Button19, { icon: /* @__PURE__ */ jsx105(
|
|
61909
|
+
/* @__PURE__ */ jsx105(Button19, { icon: /* @__PURE__ */ jsx105(ReloadOutlined7, {}), onClick: () => loadData({ current, pageSize }) })
|
|
61833
61910
|
] }) }),
|
|
61834
61911
|
selectedRowKeys.length > 0 && /* @__PURE__ */ jsxs55("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: [
|
|
61835
61912
|
/* @__PURE__ */ jsxs55("span", { className: "text-sm text-ant-color-text-secondary", children: [
|
|
@@ -61841,7 +61918,7 @@ var DataManagementList = ({
|
|
|
61841
61918
|
canExport && /* @__PURE__ */ jsx105(
|
|
61842
61919
|
Button19,
|
|
61843
61920
|
{
|
|
61844
|
-
icon: /* @__PURE__ */ jsx105(
|
|
61921
|
+
icon: /* @__PURE__ */ jsx105(DownloadOutlined6, {}),
|
|
61845
61922
|
onClick: () => {
|
|
61846
61923
|
setExportScope("selected");
|
|
61847
61924
|
setExportFields(showFields);
|
|
@@ -61855,7 +61932,7 @@ var DataManagementList = ({
|
|
|
61855
61932
|
Button19,
|
|
61856
61933
|
{
|
|
61857
61934
|
danger: true,
|
|
61858
|
-
icon: /* @__PURE__ */ jsx105(
|
|
61935
|
+
icon: /* @__PURE__ */ jsx105(DeleteOutlined2, {}),
|
|
61859
61936
|
onClick: () => confirmDanger(
|
|
61860
61937
|
"\u786E\u8BA4\u6279\u91CF\u5220\u9664",
|
|
61861
61938
|
`\u5C06\u5220\u9664 ${selectedRowKeys.length} \u6761\u6570\u636E\uFF0C\u786E\u8BA4\u7EE7\u7EED\u5417\uFF1F`,
|
|
@@ -62020,7 +62097,7 @@ var DataManagementList = ({
|
|
|
62020
62097
|
{
|
|
62021
62098
|
danger: true,
|
|
62022
62099
|
type: "text",
|
|
62023
|
-
icon: /* @__PURE__ */ jsx105(
|
|
62100
|
+
icon: /* @__PURE__ */ jsx105(DeleteOutlined2, {}),
|
|
62024
62101
|
onClick: () => handleRemoveSort(index)
|
|
62025
62102
|
}
|
|
62026
62103
|
)
|
|
@@ -62167,7 +62244,7 @@ var DataManagementList = ({
|
|
|
62167
62244
|
/* @__PURE__ */ jsx105(
|
|
62168
62245
|
Button19,
|
|
62169
62246
|
{
|
|
62170
|
-
icon: /* @__PURE__ */ jsx105(
|
|
62247
|
+
icon: /* @__PURE__ */ jsx105(DownloadOutlined6, {}),
|
|
62171
62248
|
loading: templateDownloading,
|
|
62172
62249
|
disabled: !canImport,
|
|
62173
62250
|
onClick: handleDownloadTemplate,
|
|
@@ -62464,7 +62541,7 @@ var getDetailBasePath = (appType, formUuid, formType) => {
|
|
|
62464
62541
|
var BuiltinRouteError = ({
|
|
62465
62542
|
error,
|
|
62466
62543
|
onRetry
|
|
62467
|
-
}) => /* @__PURE__ */ jsx106(
|
|
62544
|
+
}) => /* @__PURE__ */ jsx106(Card2, { style: { margin: 16 }, children: /* @__PURE__ */ jsx106(
|
|
62468
62545
|
Alert8,
|
|
62469
62546
|
{
|
|
62470
62547
|
type: "error",
|
|
@@ -62596,7 +62673,7 @@ function BuiltinRouteRenderer({
|
|
|
62596
62673
|
);
|
|
62597
62674
|
} else if (route.kind === "data-manage-list") {
|
|
62598
62675
|
if (!appType || !formUuid) {
|
|
62599
|
-
defaultNode = /* @__PURE__ */ jsx106(
|
|
62676
|
+
defaultNode = /* @__PURE__ */ jsx106(Card2, { style: { margin: 16 }, children: /* @__PURE__ */ jsx106(Empty12, { description: "\u6570\u636E\u7BA1\u7406\u9875\u7F3A\u5C11 formUuid\uFF0C\u8BF7\u5728 URL \u6216 resolver params \u4E2D\u63D0\u4F9B formUuid" }) });
|
|
62600
62677
|
} else {
|
|
62601
62678
|
const formType = routeConfig.formType || route.params?.formType || pickQueryValue(route.query, "formType") || route.runtime?.formType;
|
|
62602
62679
|
defaultNode = /* @__PURE__ */ jsx106(
|
|
@@ -62623,7 +62700,7 @@ function BuiltinRouteRenderer({
|
|
|
62623
62700
|
} else if (error) {
|
|
62624
62701
|
defaultNode = /* @__PURE__ */ jsx106(BuiltinRouteError, { error, onRetry: reload });
|
|
62625
62702
|
} else if (!schema) {
|
|
62626
|
-
defaultNode = /* @__PURE__ */ jsx106(
|
|
62703
|
+
defaultNode = /* @__PURE__ */ jsx106(Card2, { style: { margin: 16 }, children: /* @__PURE__ */ jsx106(Empty12, { description: "\u5F53\u524D\u5185\u7F6E\u9875\u9762\u6CA1\u6709\u53EF\u6E32\u67D3\u7684 schema" }) });
|
|
62627
62704
|
} else {
|
|
62628
62705
|
defaultNode = /* @__PURE__ */ jsx106(
|
|
62629
62706
|
StandardFormPage,
|