@wzyjs/uis 0.3.28 → 0.3.30
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/dist/advanced/Com2Canvas/index.d.ts +8 -0
- package/dist/advanced/Com2Canvas/index.js +39 -0
- package/dist/advanced/Crud/components/CardList/index.d.ts +2 -0
- package/dist/advanced/Crud/components/CardList/index.js +90 -0
- package/dist/advanced/Crud/components/CreateUpdate/index.d.ts +2 -0
- package/dist/advanced/Crud/components/CreateUpdate/index.js +78 -0
- package/dist/advanced/Crud/components/ListTabs/index.d.ts +8 -0
- package/dist/advanced/Crud/components/ListTabs/index.js +7 -0
- package/dist/advanced/Crud/components/Provider/index.d.ts +7 -0
- package/dist/advanced/Crud/components/Provider/index.js +42 -0
- package/dist/advanced/Crud/components/QuickFilters/index.d.ts +8 -0
- package/dist/advanced/Crud/components/QuickFilters/index.js +20 -0
- package/dist/advanced/Crud/components/Remove/index.d.ts +2 -0
- package/dist/advanced/Crud/components/Remove/index.js +18 -0
- package/dist/advanced/Crud/components/index.d.ts +6 -0
- package/dist/advanced/Crud/components/index.js +6 -0
- package/dist/advanced/Crud/hooks/index.d.ts +5 -0
- package/dist/advanced/Crud/hooks/index.js +5 -0
- package/dist/advanced/Crud/hooks/useColumns.d.ts +11 -0
- package/dist/advanced/Crud/hooks/useColumns.js +111 -0
- package/dist/advanced/Crud/hooks/useList.d.ts +12 -0
- package/dist/advanced/Crud/hooks/useList.js +53 -0
- package/dist/advanced/Crud/hooks/useListFilters.d.ts +11 -0
- package/dist/advanced/Crud/hooks/useListFilters.js +159 -0
- package/dist/advanced/Crud/hooks/useOrderable.d.ts +15 -0
- package/dist/advanced/Crud/hooks/useOrderable.js +75 -0
- package/dist/advanced/Crud/hooks/useRequest.d.ts +13 -0
- package/dist/advanced/Crud/hooks/useRequest.js +27 -0
- package/dist/advanced/Crud/index.d.ts +3 -0
- package/dist/advanced/Crud/index.js +46 -0
- package/dist/advanced/Crud/types/index.d.ts +176 -0
- package/dist/advanced/Crud/types/index.js +1 -0
- package/dist/advanced/Crud/utils/index.d.ts +7 -0
- package/dist/advanced/Crud/utils/index.js +80 -0
- package/dist/advanced/Crud/utils/query.d.ts +3 -0
- package/dist/advanced/Crud/utils/query.js +34 -0
- package/dist/advanced/MindMap/context.d.ts +12 -0
- package/dist/advanced/MindMap/context.js +12 -0
- package/dist/advanced/MindMap/hooks/useAlignmentSnap.d.ts +15 -0
- package/dist/advanced/MindMap/hooks/useAlignmentSnap.js +164 -0
- package/dist/advanced/MindMap/hooks/useCopyPaste.d.ts +11 -0
- package/dist/advanced/MindMap/hooks/useCopyPaste.js +209 -0
- package/dist/advanced/MindMap/hooks/useDropToReparent.d.ts +21 -0
- package/dist/advanced/MindMap/hooks/useDropToReparent.js +216 -0
- package/dist/advanced/MindMap/hooks/useExpandCollapse.d.ts +18 -0
- package/dist/advanced/MindMap/hooks/useExpandCollapse.js +108 -0
- package/dist/advanced/MindMap/hooks/useMoveDescendants.d.ts +12 -0
- package/dist/advanced/MindMap/hooks/useMoveDescendants.js +98 -0
- package/dist/advanced/MindMap/hooks/useUndoRedo.d.ts +14 -0
- package/dist/advanced/MindMap/hooks/useUndoRedo.js +181 -0
- package/dist/advanced/MindMap/index.d.ts +29 -0
- package/dist/advanced/MindMap/index.js +52 -0
- package/dist/advanced/index.d.ts +5 -0
- package/dist/advanced/index.js +5 -0
- package/dist/antd/index.d.ts +6 -0
- package/dist/antd/index.js +5 -0
- package/dist/buttons/ButtonGroup/index.d.ts +8 -0
- package/dist/buttons/ButtonGroup/index.js +13 -0
- package/dist/buttons/ConfirmButton/index.d.ts +5 -0
- package/dist/buttons/ConfirmButton/index.js +9 -0
- package/dist/buttons/CopyButton/index.d.ts +6 -0
- package/dist/buttons/CopyButton/index.js +26 -0
- package/dist/buttons/DrawerButton/index.d.ts +6 -0
- package/dist/buttons/DrawerButton/index.js +13 -0
- package/dist/buttons/ProgressButton/index.css +63 -0
- package/dist/buttons/ProgressButton/index.d.ts +17 -0
- package/dist/buttons/ProgressButton/index.js +31 -0
- package/dist/buttons/SectorButton/index.d.ts +20 -0
- package/dist/buttons/SectorButton/index.js +130 -0
- package/dist/buttons/index.d.ts +6 -0
- package/dist/buttons/index.js +6 -0
- package/dist/display/CodeView/index.d.ts +26 -0
- package/dist/display/CodeView/index.js +60 -0
- package/dist/display/EnumTag/index.d.ts +12 -0
- package/dist/display/EnumTag/index.js +10 -0
- package/dist/display/HtmlDataRenderer/index.d.ts +6 -0
- package/dist/display/HtmlDataRenderer/index.js +15 -0
- package/dist/display/HtmlView/index.d.ts +6 -0
- package/dist/display/HtmlView/index.js +6 -0
- package/dist/display/IframePro/index.d.ts +8 -0
- package/dist/display/IframePro/index.js +24 -0
- package/dist/display/JsonSchemaRenderer/index.d.ts +11 -0
- package/dist/display/JsonSchemaRenderer/index.js +62 -0
- package/dist/display/JsonView/index.d.ts +3 -0
- package/dist/display/JsonView/index.js +7 -0
- package/dist/display/MarkdownView/index.d.ts +7 -0
- package/dist/display/MarkdownView/index.js +80 -0
- package/dist/display/MarkdownView/style.d.ts +1 -0
- package/{src/components/Markdown/style.ts → dist/display/MarkdownView/style.js} +1 -1
- package/dist/display/VideoPro/index.d.ts +9 -0
- package/dist/display/VideoPro/index.js +15 -0
- package/dist/display/index.d.ts +9 -0
- package/dist/display/index.js +9 -0
- package/dist/inputs/CheckboxButton/index.css +22 -0
- package/dist/inputs/CheckboxButton/index.d.ts +12 -0
- package/dist/inputs/CheckboxButton/index.js +9 -0
- package/dist/inputs/DateSwitcher/index.css +10 -0
- package/dist/inputs/DateSwitcher/index.d.ts +8 -0
- package/dist/inputs/DateSwitcher/index.js +29 -0
- package/dist/inputs/FetchSelect/index.d.ts +3 -0
- package/dist/inputs/FetchSelect/index.js +121 -0
- package/dist/inputs/FetchSelect/types.d.ts +33 -0
- package/dist/inputs/FetchSelect/types.js +1 -0
- package/dist/inputs/FetchSelect/utils.d.ts +21 -0
- package/dist/inputs/FetchSelect/utils.js +67 -0
- package/dist/inputs/FileUploader/index.d.ts +22 -0
- package/dist/inputs/FileUploader/index.js +79 -0
- package/dist/inputs/IconSelect/index.d.ts +89 -0
- package/dist/inputs/IconSelect/index.js +54 -0
- package/dist/inputs/ImageUploader/index.d.ts +12 -0
- package/dist/inputs/ImageUploader/index.js +192 -0
- package/dist/inputs/RadioButton/index.d.ts +15 -0
- package/dist/inputs/RadioButton/index.js +11 -0
- package/dist/inputs/RangeInput/index.d.ts +8 -0
- package/dist/inputs/RangeInput/index.js +17 -0
- package/dist/inputs/TextInput/index.d.ts +6 -0
- package/dist/inputs/TextInput/index.js +30 -0
- package/dist/inputs/index.d.ts +9 -0
- package/dist/inputs/index.js +9 -0
- package/dist/layout/DragSort/index.d.ts +16 -0
- package/dist/layout/DragSort/index.js +12 -0
- package/dist/layout/FoldCard/index.d.ts +9 -0
- package/dist/layout/FoldCard/index.js +69 -0
- package/dist/layout/PageBase/index.d.ts +6 -0
- package/dist/layout/PageBase/index.js +6 -0
- package/dist/layout/ResizableGridLayout/index.d.ts +11 -0
- package/dist/layout/ResizableGridLayout/index.js +13 -0
- package/dist/layout/SideMenu/index.d.ts +27 -0
- package/dist/layout/SideMenu/index.js +40 -0
- package/dist/layout/TabsPro/index.d.ts +9 -0
- package/dist/layout/TabsPro/index.js +87 -0
- package/dist/layout/index.d.ts +6 -0
- package/dist/layout/index.js +6 -0
- package/dist/web.d.ts +6 -0
- package/dist/web.js +6 -0
- package/package.json +28 -12
- package/src/antd/form/CheckboxButton/index.module.scss +0 -24
- package/src/antd/form/CheckboxButton/index.tsx +0 -31
- package/src/antd/form/FileUploader/index.tsx +0 -163
- package/src/antd/form/RadioButton/index.tsx +0 -32
- package/src/antd/form/Upload/index.tsx +0 -65
- package/src/antd/form/UploadImage/index.tsx +0 -338
- package/src/antd/form/index.ts +0 -6
- package/src/antd/index.ts +0 -46
- package/src/antd/pro/Alert/index.tsx +0 -24
- package/src/antd/pro/Button/components/Confirm.tsx +0 -24
- package/src/antd/pro/Button/components/Copy.tsx +0 -47
- package/src/antd/pro/Button/components/Drawer.tsx +0 -37
- package/src/antd/pro/Button/components/Group.tsx +0 -26
- package/src/antd/pro/Button/index.tsx +0 -11
- package/src/antd/pro/Card/index.tsx +0 -92
- package/src/antd/pro/Collapse/components/Item.tsx +0 -30
- package/src/antd/pro/Collapse/index.tsx +0 -27
- package/src/antd/pro/Image/index.tsx +0 -17
- package/src/antd/pro/Input/components/Range.tsx +0 -46
- package/src/antd/pro/Input/index.tsx +0 -61
- package/src/antd/pro/Popconfirm/index.tsx +0 -16
- package/src/antd/pro/Radio/components/Cancel.tsx +0 -30
- package/src/antd/pro/Radio/index.tsx +0 -7
- package/src/antd/pro/Space/index.tsx +0 -15
- package/src/antd/pro/Tabs/index.tsx +0 -135
- package/src/antd/pro/Typography/components/String.tsx +0 -72
- package/src/antd/pro/Typography/index.tsx +0 -9
- package/src/antd/pro/index.ts +0 -11
- package/src/components/BottomBar/index.tsx +0 -28
- package/src/components/CodeView/index.tsx +0 -85
- package/src/components/Collapse/index.tsx +0 -26
- package/src/components/Com2Canvas/index.tsx +0 -60
- package/src/components/CompileHtml/index.tsx +0 -26
- package/src/components/Crud/components/CardList/index.tsx +0 -174
- package/src/components/Crud/components/CreateUpdate/index.tsx +0 -179
- package/src/components/Crud/components/Provider/index.tsx +0 -83
- package/src/components/Crud/components/Remove/index.tsx +0 -56
- package/src/components/Crud/components/index.ts +0 -4
- package/src/components/Crud/hooks/index.ts +0 -4
- package/src/components/Crud/hooks/useColumns.tsx +0 -169
- package/src/components/Crud/hooks/useList.ts +0 -65
- package/src/components/Crud/hooks/useOrderable.tsx +0 -107
- package/src/components/Crud/hooks/useRequest.ts +0 -41
- package/src/components/Crud/index.tsx +0 -91
- package/src/components/Crud/types/index.ts +0 -188
- package/src/components/Crud/utils/index.ts +0 -87
- package/src/components/DateSwitcher/index.module.scss +0 -10
- package/src/components/DateSwitcher/index.tsx +0 -75
- package/src/components/DownloadLink/index.tsx +0 -36
- package/src/components/DragSort/index.tsx +0 -77
- package/src/components/DynamicSelect/index.tsx +0 -74
- package/src/components/DynamicSelect/utils.ts +0 -45
- package/src/components/EnumTag/index.tsx +0 -24
- package/src/components/FetchSelect/index.tsx +0 -57
- package/src/components/Fold/index.tsx +0 -52
- package/src/components/FormPro/index.tsx +0 -28
- package/src/components/GroupLayout/index.tsx +0 -45
- package/src/components/HtmlPro/index.tsx +0 -18
- package/src/components/IframePro/index.tsx +0 -52
- package/src/components/JsonRenderer/index.tsx +0 -114
- package/src/components/JsonView/index.tsx +0 -21
- package/src/components/Markdown/index.tsx +0 -152
- package/src/components/MindMap/context.tsx +0 -29
- package/src/components/MindMap/hooks/useAlignmentSnap.ts +0 -220
- package/src/components/MindMap/hooks/useCopyPaste.ts +0 -272
- package/src/components/MindMap/hooks/useDropToReparent.ts +0 -288
- package/src/components/MindMap/hooks/useExpandCollapse.ts +0 -146
- package/src/components/MindMap/hooks/useMoveDescendants.ts +0 -136
- package/src/components/MindMap/hooks/useUndoRedo.ts +0 -232
- package/src/components/MindMap/index.tsx +0 -117
- package/src/components/MultiImageDisplay/index.tsx +0 -63
- package/src/components/ProgressButton/index.module.scss +0 -65
- package/src/components/ProgressButton/index.tsx +0 -96
- package/src/components/SectorButton/index.tsx +0 -247
- package/src/components/TextInput/index.tsx +0 -61
- package/src/components/TimelineBar/components/CurrentWeekHighlight/index.tsx +0 -64
- package/src/components/TimelineBar/components/Guides/index.tsx +0 -61
- package/src/components/TimelineBar/components/Ticks/index.tsx +0 -56
- package/src/components/TimelineBar/components/TodayIndicator/index.tsx +0 -54
- package/src/components/TimelineBar/components/index.ts +0 -4
- package/src/components/TimelineBar/const.ts +0 -3
- package/src/components/TimelineBar/hooks/index.ts +0 -5
- package/src/components/TimelineBar/hooks/useHighlightRange.ts +0 -21
- package/src/components/TimelineBar/hooks/useMonthGuides.ts +0 -40
- package/src/components/TimelineBar/hooks/useTickValues.ts +0 -18
- package/src/components/TimelineBar/hooks/useVisibleRange.ts +0 -43
- package/src/components/TimelineBar/hooks/useWeekGuides.ts +0 -39
- package/src/components/TimelineBar/index.tsx +0 -63
- package/src/components/TimelineBar/utils.ts +0 -27
- package/src/components/Video/index.tsx +0 -37
- package/src/components/index.ts +0 -27
- package/src/rn.ts +0 -1
- package/src/rns/index.ts +0 -0
- package/src/web.ts +0 -2
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { useState, useEffect, useMemo } from 'react'
|
|
2
|
-
import type { CrudProps } from '../types'
|
|
3
|
-
|
|
4
|
-
interface UseTabsStateParams {
|
|
5
|
-
list: CrudProps['list']
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export const useList = ({ list }: UseTabsStateParams) => {
|
|
9
|
-
// 初始化 activeTabKey 状态
|
|
10
|
-
const [activeTabKey, setTabActiveKey] = useState<string | undefined>(() => {
|
|
11
|
-
const tabs = list?.toolbar?.tabs as any
|
|
12
|
-
if (!tabs) {
|
|
13
|
-
return
|
|
14
|
-
}
|
|
15
|
-
return tabs.activeKey ?? tabs.items?.[0]?.key
|
|
16
|
-
})
|
|
17
|
-
|
|
18
|
-
// 同步外部传入的 activeKey
|
|
19
|
-
useEffect(() => {
|
|
20
|
-
const tabs = list?.toolbar?.tabs as any
|
|
21
|
-
if (tabs && tabs.activeKey !== undefined && tabs.activeKey !== activeTabKey) {
|
|
22
|
-
setTabActiveKey(tabs.activeKey)
|
|
23
|
-
}
|
|
24
|
-
}, [list?.toolbar?.tabs])
|
|
25
|
-
|
|
26
|
-
// 当 Tab 变化时,将最新的类型通过 onChangeQuery 回传给父组件
|
|
27
|
-
useEffect(() => {
|
|
28
|
-
if (activeTabKey !== undefined) {
|
|
29
|
-
list?.onChangeQuery?.({
|
|
30
|
-
where: { type: activeTabKey },
|
|
31
|
-
})
|
|
32
|
-
}
|
|
33
|
-
}, [activeTabKey])
|
|
34
|
-
|
|
35
|
-
// 构造最终传递给 ProTable 的 list 配置
|
|
36
|
-
const finalList = useMemo(() => {
|
|
37
|
-
if (!list?.toolbar?.tabs) return list ?? {}
|
|
38
|
-
|
|
39
|
-
const originalTabs: any = list.toolbar.tabs
|
|
40
|
-
|
|
41
|
-
const enhancedTabs = {
|
|
42
|
-
...originalTabs,
|
|
43
|
-
activeKey: activeTabKey,
|
|
44
|
-
onChange: (key: string) => {
|
|
45
|
-
setTabActiveKey(key)
|
|
46
|
-
originalTabs.onChange?.(key)
|
|
47
|
-
},
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
return {
|
|
51
|
-
...list,
|
|
52
|
-
toolbar: {
|
|
53
|
-
...list.toolbar,
|
|
54
|
-
multipleLine: list.toolbar.multipleLine ?? !!list.toolbar.tabs.items?.length,
|
|
55
|
-
tabs: enhancedTabs,
|
|
56
|
-
},
|
|
57
|
-
}
|
|
58
|
-
}, [activeTabKey, list])
|
|
59
|
-
|
|
60
|
-
return {
|
|
61
|
-
activeTabKey,
|
|
62
|
-
setTabActiveKey,
|
|
63
|
-
finalList,
|
|
64
|
-
}
|
|
65
|
-
}
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import { useEffect, useMemo, useState } from 'react'
|
|
2
|
-
import type { CrudProps, ProColumnsPro } from '../types'
|
|
3
|
-
|
|
4
|
-
const dragSortKey = '__drag_sort__'
|
|
5
|
-
|
|
6
|
-
const getOrderableConfig = (
|
|
7
|
-
orderable: CrudProps['orderable'],
|
|
8
|
-
): Exclude<CrudProps['orderable'], boolean | undefined> => {
|
|
9
|
-
if (orderable && typeof orderable === 'object') {
|
|
10
|
-
return orderable
|
|
11
|
-
}
|
|
12
|
-
return {}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
const sortByOrderField = <T extends Record<string, unknown>>(list: T[], orderField: string): T[] => {
|
|
16
|
-
const indexed = list.map((item, index) => ({ item, index }))
|
|
17
|
-
indexed.sort((a, b) => {
|
|
18
|
-
const av = a.item[orderField] as number | undefined
|
|
19
|
-
const bv = b.item[orderField] as number | undefined
|
|
20
|
-
|
|
21
|
-
const an = typeof av === 'number' && Number.isFinite(av) ? av : Number.POSITIVE_INFINITY
|
|
22
|
-
const bn = typeof bv === 'number' && Number.isFinite(bv) ? bv : Number.POSITIVE_INFINITY
|
|
23
|
-
|
|
24
|
-
return an - bn
|
|
25
|
-
})
|
|
26
|
-
return indexed.map(i => i.item)
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export const useOrderable = <T extends Record<string, unknown>>(params: {
|
|
30
|
-
orderable: CrudProps['orderable']
|
|
31
|
-
columns: ProColumnsPro<T>[]
|
|
32
|
-
crud: CrudProps['crud']
|
|
33
|
-
update: CrudProps['update']
|
|
34
|
-
readonly?: boolean
|
|
35
|
-
cardMode?: boolean
|
|
36
|
-
}) => {
|
|
37
|
-
const { orderable, columns, crud, update, readonly, cardMode } = params
|
|
38
|
-
|
|
39
|
-
const enabledFeature = !!orderable && !cardMode
|
|
40
|
-
const config = useMemo(() => getOrderableConfig(orderable), [orderable])
|
|
41
|
-
|
|
42
|
-
const orderField = config.orderField ?? 'sort'
|
|
43
|
-
const start = config.start ?? 0
|
|
44
|
-
|
|
45
|
-
const canUpdate = enabledFeature && !readonly && update !== false && !!crud.updateState?.mutateAsync
|
|
46
|
-
|
|
47
|
-
const [dataSource, setDataSource] = useState<T[]>([])
|
|
48
|
-
|
|
49
|
-
useEffect(() => {
|
|
50
|
-
if (!enabledFeature) return
|
|
51
|
-
const list = (crud.listState.data as T[]) || []
|
|
52
|
-
setDataSource(sortByOrderField(list, orderField))
|
|
53
|
-
}, [enabledFeature, crud.listState.data, orderField])
|
|
54
|
-
|
|
55
|
-
const tableColumns = useMemo((): ProColumnsPro<T>[] => {
|
|
56
|
-
if (!enabledFeature) return columns
|
|
57
|
-
|
|
58
|
-
return [
|
|
59
|
-
{
|
|
60
|
-
title: '',
|
|
61
|
-
key: dragSortKey,
|
|
62
|
-
dataIndex: dragSortKey,
|
|
63
|
-
width: 48,
|
|
64
|
-
fixed: 'left',
|
|
65
|
-
hideInSearch: true,
|
|
66
|
-
hideInForm: true,
|
|
67
|
-
render: () => null,
|
|
68
|
-
} as ProColumnsPro<T>,
|
|
69
|
-
...columns,
|
|
70
|
-
]
|
|
71
|
-
}, [columns, enabledFeature])
|
|
72
|
-
|
|
73
|
-
const onDragSortEnd = async (
|
|
74
|
-
_beforeIndex: number,
|
|
75
|
-
_afterIndex: number,
|
|
76
|
-
newDataSource: T[],
|
|
77
|
-
) => {
|
|
78
|
-
const next = newDataSource.map((row, index) => ({
|
|
79
|
-
...row,
|
|
80
|
-
[orderField]: start + index,
|
|
81
|
-
})) as T[]
|
|
82
|
-
|
|
83
|
-
setDataSource(next)
|
|
84
|
-
|
|
85
|
-
if (!canUpdate) return
|
|
86
|
-
|
|
87
|
-
await Promise.allSettled(
|
|
88
|
-
next.map((row) => {
|
|
89
|
-
const id = row.id
|
|
90
|
-
if (typeof id !== 'string' || !id) {
|
|
91
|
-
return Promise.resolve()
|
|
92
|
-
}
|
|
93
|
-
return crud.updateState.mutateAsync(id, { [orderField]: row[orderField] })
|
|
94
|
-
}),
|
|
95
|
-
)
|
|
96
|
-
|
|
97
|
-
await crud.listState.refetch()
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
return {
|
|
101
|
-
enabledFeature,
|
|
102
|
-
tableColumns,
|
|
103
|
-
dragSortKey: enabledFeature ? dragSortKey : undefined,
|
|
104
|
-
dataSource: enabledFeature ? dataSource : (crud.listState.data as T[] | undefined),
|
|
105
|
-
onDragSortEnd: enabledFeature ? onDragSortEnd : undefined,
|
|
106
|
-
}
|
|
107
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import type { CrudProps, PaginationState } from '../types'
|
|
2
|
-
import { transformOrder, transformPagination, transformWhere } from '../utils'
|
|
3
|
-
|
|
4
|
-
interface UseRequest {
|
|
5
|
-
columns: CrudProps['columns']
|
|
6
|
-
list: CrudProps['list']
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export const useRequest = ({ columns, list }: UseRequest) => {
|
|
10
|
-
const request = async (params: PaginationState, sort: any, filter: any) => {
|
|
11
|
-
const { current, pageSize, ...search } = params
|
|
12
|
-
|
|
13
|
-
// 转换分页参数
|
|
14
|
-
const pagination = transformPagination({ current, pageSize })
|
|
15
|
-
|
|
16
|
-
// 转换排序参数
|
|
17
|
-
const orderBy = transformOrder(sort)
|
|
18
|
-
|
|
19
|
-
// 转换过滤参数
|
|
20
|
-
const where = transformWhere(search, columns)
|
|
21
|
-
|
|
22
|
-
const query = {
|
|
23
|
-
...pagination,
|
|
24
|
-
...(orderBy && { orderBy }),
|
|
25
|
-
...(where && { where }),
|
|
26
|
-
}
|
|
27
|
-
console.log(666, 35, params, sort, search, filter, where, query)
|
|
28
|
-
|
|
29
|
-
list?.onChangeQuery?.(query)
|
|
30
|
-
|
|
31
|
-
return {
|
|
32
|
-
data: [],
|
|
33
|
-
total: 0,
|
|
34
|
-
success: true,
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
return {
|
|
39
|
-
request,
|
|
40
|
-
}
|
|
41
|
-
}
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
|
|
3
|
-
import { Space } from 'antd'
|
|
4
|
-
import { DragSortTable, ProTable } from '@ant-design/pro-components'
|
|
5
|
-
|
|
6
|
-
import { CardList, CreateUpdate, Provider } from './components'
|
|
7
|
-
|
|
8
|
-
import { useColumns, useList, useOrderable, useRequest } from './hooks'
|
|
9
|
-
|
|
10
|
-
export type { ProColumnsPro } from './types'
|
|
11
|
-
import type { CrudProps } from './types'
|
|
12
|
-
|
|
13
|
-
export const Crud = (props_: CrudProps) => {
|
|
14
|
-
const props = { ...props_ }
|
|
15
|
-
|
|
16
|
-
if (props.readonly) {
|
|
17
|
-
props.create = props.create ?? false
|
|
18
|
-
props.update = props.update ?? false
|
|
19
|
-
props.remove = props.remove ?? false
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
const { crud, columns, list, create, update, remove, orderable } = props
|
|
23
|
-
|
|
24
|
-
const { tableColumns, dataSource, dragSortKey, onDragSortEnd } = useOrderable({
|
|
25
|
-
orderable,
|
|
26
|
-
columns,
|
|
27
|
-
crud,
|
|
28
|
-
update,
|
|
29
|
-
readonly: props.readonly,
|
|
30
|
-
cardMode: !!list?.cardConfig,
|
|
31
|
-
})
|
|
32
|
-
|
|
33
|
-
const { finalColumns } = useColumns({ columns: tableColumns, crud, update, remove })
|
|
34
|
-
|
|
35
|
-
const { finalList } = useList({ list })
|
|
36
|
-
|
|
37
|
-
const { request } = useRequest({ list, columns })
|
|
38
|
-
|
|
39
|
-
const TableComponent = dragSortKey ? DragSortTable : ProTable
|
|
40
|
-
|
|
41
|
-
return (
|
|
42
|
-
<Provider crud={crud}>
|
|
43
|
-
<TableComponent
|
|
44
|
-
rowKey='id'
|
|
45
|
-
loading={crud.listState.isLoading}
|
|
46
|
-
columns={finalColumns as any}
|
|
47
|
-
scroll={{ x: 'max-content' }}
|
|
48
|
-
search={{
|
|
49
|
-
labelWidth: 'auto',
|
|
50
|
-
}}
|
|
51
|
-
dataSource={dataSource}
|
|
52
|
-
request={request}
|
|
53
|
-
dragSortKey={dragSortKey}
|
|
54
|
-
onDragSortEnd={onDragSortEnd as any}
|
|
55
|
-
pagination={{
|
|
56
|
-
total: crud.countState.data,
|
|
57
|
-
showSizeChanger: true,
|
|
58
|
-
showQuickJumper: true,
|
|
59
|
-
defaultPageSize: 10,
|
|
60
|
-
pageSizeOptions: ['10', '15', '20', '30', '50'],
|
|
61
|
-
showTotal: (total, range) => `第 ${range[0]}-${range[1]} 条/总共 ${total} 条`,
|
|
62
|
-
}}
|
|
63
|
-
toolBarRender={() => [
|
|
64
|
-
create !== false ? (
|
|
65
|
-
<CreateUpdate
|
|
66
|
-
key='create'
|
|
67
|
-
crud={crud}
|
|
68
|
-
columns={tableColumns}
|
|
69
|
-
config={create || {}}
|
|
70
|
-
/>
|
|
71
|
-
) : null,
|
|
72
|
-
].filter(Boolean)}
|
|
73
|
-
tableRender={list?.cardConfig ? (props, dom, domList) => (
|
|
74
|
-
<Space style={{ width: '100%' }}>
|
|
75
|
-
{domList.toolbar}
|
|
76
|
-
<CardList
|
|
77
|
-
crud={crud}
|
|
78
|
-
columns={columns}
|
|
79
|
-
list={list}
|
|
80
|
-
create={create}
|
|
81
|
-
update={update}
|
|
82
|
-
remove={remove}
|
|
83
|
-
/>
|
|
84
|
-
</Space>
|
|
85
|
-
) : undefined}
|
|
86
|
-
{...finalList}
|
|
87
|
-
options={{ ...(finalList as CrudProps['list'])?.options, reload: () => (crud.countState.refetch(), crud.listState.refetch()) }}
|
|
88
|
-
/>
|
|
89
|
-
</Provider>
|
|
90
|
-
)
|
|
91
|
-
}
|
|
@@ -1,188 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from 'react'
|
|
2
|
-
import type { ButtonProps } from 'antd'
|
|
3
|
-
import type { ProTableProps, ProFormProps, ProColumns } from '@ant-design/pro-components'
|
|
4
|
-
|
|
5
|
-
// 扩展 ProColumns 类型,添加自定义的 valueType
|
|
6
|
-
export type ProColumnsPro<T = any> = Omit<ProColumns<T>, 'valueType'> & {
|
|
7
|
-
valueType?: ProColumns<T>['valueType'] | 'tags' | 'enabled'
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
// 前端分页状态类型
|
|
11
|
-
export interface PaginationState {
|
|
12
|
-
current: number
|
|
13
|
-
pageSize: number
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
// CRUD Hook 返回值类型(基于实际 tRPC hooks 的返回值)
|
|
17
|
-
export interface Crud {
|
|
18
|
-
listState: {
|
|
19
|
-
data?: any[]
|
|
20
|
-
isLoading?: boolean
|
|
21
|
-
error?: any
|
|
22
|
-
refetch: () => any
|
|
23
|
-
}
|
|
24
|
-
countState: {
|
|
25
|
-
data?: any
|
|
26
|
-
isLoading?: boolean
|
|
27
|
-
error?: any
|
|
28
|
-
refetch: () => any
|
|
29
|
-
}
|
|
30
|
-
createState: {
|
|
31
|
-
mutate: (data: any) => void
|
|
32
|
-
mutateAsync: (data: any) => Promise<any>
|
|
33
|
-
isLoading?: boolean
|
|
34
|
-
error?: any
|
|
35
|
-
}
|
|
36
|
-
updateState: {
|
|
37
|
-
mutate: (id: string, data: any) => void
|
|
38
|
-
mutateAsync: (id: string, data: any) => Promise<any>
|
|
39
|
-
isLoading?: boolean
|
|
40
|
-
error?: any
|
|
41
|
-
}
|
|
42
|
-
removeState: {
|
|
43
|
-
mutate: (id: string) => void
|
|
44
|
-
mutateAsync: (id: string) => Promise<any>
|
|
45
|
-
isLoading?: boolean
|
|
46
|
-
error?: any
|
|
47
|
-
}
|
|
48
|
-
deleteState: {
|
|
49
|
-
mutate: (id: string) => void
|
|
50
|
-
mutateAsync: (id: string) => Promise<any>
|
|
51
|
-
isLoading?: boolean
|
|
52
|
-
error?: any
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
// 卡片字段值类型:可以是字段名或自定义渲染内容
|
|
57
|
-
type CardFieldValue = string | ReactNode
|
|
58
|
-
|
|
59
|
-
// 卡片配置项
|
|
60
|
-
interface CardItem {
|
|
61
|
-
title?: CardFieldValue
|
|
62
|
-
extra?: CardFieldValue
|
|
63
|
-
content?: CardFieldValue
|
|
64
|
-
cover?: CardFieldValue
|
|
65
|
-
actions?: CardFieldValue[]
|
|
66
|
-
meta?: {
|
|
67
|
-
title?: CardFieldValue
|
|
68
|
-
description?: CardFieldValue
|
|
69
|
-
avatar?: CardFieldValue
|
|
70
|
-
}
|
|
71
|
-
props?: any // Card 组件的额外属性
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
interface CardConfig {
|
|
75
|
-
gutter?: [number, number] // 卡片间距
|
|
76
|
-
col?: {
|
|
77
|
-
xs?: number
|
|
78
|
-
sm?: number
|
|
79
|
-
md?: number
|
|
80
|
-
lg?: number
|
|
81
|
-
xl?: number
|
|
82
|
-
xxl?: number
|
|
83
|
-
} // 栅格配置
|
|
84
|
-
height?: string // 卡片列表容器高度
|
|
85
|
-
|
|
86
|
-
// 完全自定义渲染
|
|
87
|
-
render?: (record: any, index: number, defaultActions: ReactNode[]) => ReactNode
|
|
88
|
-
|
|
89
|
-
// 或者使用配置式渲染
|
|
90
|
-
card: CardItem | ((record: any, index: number) => CardItem)
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
// 列表配置
|
|
94
|
-
export interface List extends Omit<ProTableProps<any, any>, 'columns' | 'dataSource' | 'loading'> {
|
|
95
|
-
onChangeQuery?: (query: any) => void // 用于更新查询参数
|
|
96
|
-
cardConfig?: CardConfig
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
// 创建配置
|
|
100
|
-
export interface Create {
|
|
101
|
-
mode?: 'modal' | 'drawer' // 创建模式,默认为 'drawer'
|
|
102
|
-
buttonProps?: ButtonProps // 创建按钮的属性
|
|
103
|
-
formProps?: ProFormProps // 创建表单的属性
|
|
104
|
-
transformData?: (values: Record<string, unknown>) => Record<string, unknown> | Promise<Record<string, unknown>> // 提交前转换 coverData?: (record: any) => Record<string, unknown> // 转换 record 用于表单回填
|
|
105
|
-
coverData?: (record: any) => Record<string, unknown> // 转换 record 用于表单回填
|
|
106
|
-
title?: string // 弹窗标题
|
|
107
|
-
width?: number | string // 弹窗宽度
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
// 更新配置
|
|
111
|
-
export interface Update {
|
|
112
|
-
mode?: 'modal' | 'drawer' // 更新模式,默认为 'drawer'
|
|
113
|
-
buttonProps?: ButtonProps // 更新按钮的属性
|
|
114
|
-
formProps?: ProFormProps // 更新表单的属性
|
|
115
|
-
transformData?: (values: Record<string, unknown>, record: any) => Record<string, unknown> | Promise<Record<string, unknown>> // 提交前转换
|
|
116
|
-
coverData?: (record: any) => Record<string, unknown> // 转换 record 用于表单回填
|
|
117
|
-
title?: string // 弹窗标题
|
|
118
|
-
width?: number | string // 弹窗宽度
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
// 删除配置
|
|
122
|
-
export interface Remove {
|
|
123
|
-
confirm?: boolean // 删除前是否需要确认,默认为 true
|
|
124
|
-
buttonProps?: ButtonProps // 删除按钮的属性
|
|
125
|
-
title?: string // 确认弹窗标题
|
|
126
|
-
content?: string // 确认弹窗内容
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
export interface Orderable {
|
|
130
|
-
orderField?: string
|
|
131
|
-
start?: number
|
|
132
|
-
label?: string
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
// 主组件 Props
|
|
136
|
-
export interface CrudProps {
|
|
137
|
-
// 接口
|
|
138
|
-
crud: Crud // useHabitGroupCRUD() 的返回值
|
|
139
|
-
// 列表展示配置
|
|
140
|
-
columns: ProColumnsPro[]
|
|
141
|
-
// 列表配置
|
|
142
|
-
list?: List
|
|
143
|
-
// 创建配置
|
|
144
|
-
create?: false | Create // 为 false 时不显示创建按钮
|
|
145
|
-
// 更新配置
|
|
146
|
-
update?: false | Update // 为 false 时不显示更新按钮
|
|
147
|
-
// 删除配置
|
|
148
|
-
remove?: false | Remove // 为 false 时不显示删除按钮
|
|
149
|
-
// 排序配置
|
|
150
|
-
orderable?: boolean | Orderable
|
|
151
|
-
// 只读模式,开启后上述 create/update/remove 均等同于 false
|
|
152
|
-
readonly?: boolean
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
export interface ListProps {
|
|
156
|
-
crud: Crud
|
|
157
|
-
columns: ProColumnsPro[]
|
|
158
|
-
list: List
|
|
159
|
-
create?: false | Create
|
|
160
|
-
update?: false | Update
|
|
161
|
-
remove?: false | Remove
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
// export interface CreateProps {
|
|
165
|
-
// crud: Crud
|
|
166
|
-
// columns: ProColumnsPro[]
|
|
167
|
-
// config: Create
|
|
168
|
-
// }
|
|
169
|
-
//
|
|
170
|
-
// export interface UpdateProps {
|
|
171
|
-
// crud: Crud
|
|
172
|
-
// columns: ProColumnsPro[]
|
|
173
|
-
// config: Update
|
|
174
|
-
// record: any
|
|
175
|
-
// }
|
|
176
|
-
|
|
177
|
-
export interface RemoveProps {
|
|
178
|
-
crud: Crud
|
|
179
|
-
config: Remove
|
|
180
|
-
record: any
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
export interface CreateUpdateProps {
|
|
184
|
-
crud: Crud
|
|
185
|
-
columns: ProColumnsPro[]
|
|
186
|
-
config: Create | Update
|
|
187
|
-
record?: any // 可选,有值时为编辑模式,无值时为创建模式
|
|
188
|
-
}
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import type { PaginationState, ProColumnsPro } from '../types'
|
|
2
|
-
|
|
3
|
-
export const transformPagination = (pagination: PaginationState) => {
|
|
4
|
-
return {
|
|
5
|
-
skip: (pagination.current - 1) * pagination.pageSize,
|
|
6
|
-
take: pagination.pageSize,
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export const transformOrder = (sort: Record<string, 'ascend' | 'descend'>) => {
|
|
11
|
-
const orderByFields: Array<Record<string, 'asc' | 'desc'>> = []
|
|
12
|
-
|
|
13
|
-
Object.keys(sort).forEach((key) => {
|
|
14
|
-
if (sort[key]) {
|
|
15
|
-
orderByFields.push({
|
|
16
|
-
[key]: sort[key] === 'ascend' ? 'asc' : 'desc',
|
|
17
|
-
})
|
|
18
|
-
}
|
|
19
|
-
})
|
|
20
|
-
|
|
21
|
-
// 始终返回数组格式以支持多重排序
|
|
22
|
-
return orderByFields.length > 0 ? orderByFields : undefined
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export const transformWhere = (filter: Record<string, (string | number)[] | null>, columns: ProColumnsPro[]) => {
|
|
26
|
-
const where: Record<string, any> = {}
|
|
27
|
-
|
|
28
|
-
Object.keys(filter).forEach((key) => {
|
|
29
|
-
const value = filter[key]
|
|
30
|
-
if (value !== null && value !== undefined) {
|
|
31
|
-
const column = columns.find(col => col.dataIndex === key)
|
|
32
|
-
|
|
33
|
-
// 根据字段类型转换过滤条件
|
|
34
|
-
if (column) {
|
|
35
|
-
switch (column.valueType) {
|
|
36
|
-
case 'text':
|
|
37
|
-
case 'textarea':
|
|
38
|
-
// 文本类型使用 contains 搜索
|
|
39
|
-
if (typeof value === 'string') {
|
|
40
|
-
where[key] = { contains: value }
|
|
41
|
-
}
|
|
42
|
-
break
|
|
43
|
-
case 'select':
|
|
44
|
-
case 'option':
|
|
45
|
-
if ((column?.fieldProps as any)?.multiple) {
|
|
46
|
-
where[key] = { in: value }
|
|
47
|
-
} else {
|
|
48
|
-
where[key] = { equals: value }
|
|
49
|
-
}
|
|
50
|
-
break
|
|
51
|
-
case 'dateRange':
|
|
52
|
-
case 'dateTimeRange':
|
|
53
|
-
// 日期范围搜索
|
|
54
|
-
if (value.length >= 2) {
|
|
55
|
-
where[key] = {
|
|
56
|
-
gte: value[0],
|
|
57
|
-
lte: value[1],
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
break
|
|
61
|
-
case 'digit':
|
|
62
|
-
case 'money':
|
|
63
|
-
// 数字类型
|
|
64
|
-
if (typeof value === 'number') {
|
|
65
|
-
where[key] = { equals: value }
|
|
66
|
-
}
|
|
67
|
-
break
|
|
68
|
-
case 'switch':
|
|
69
|
-
// 布尔类型
|
|
70
|
-
if (typeof value === 'boolean') {
|
|
71
|
-
where[key] = { equals: value }
|
|
72
|
-
}
|
|
73
|
-
break
|
|
74
|
-
case 'tags':
|
|
75
|
-
where[key] = { equals: value }
|
|
76
|
-
break
|
|
77
|
-
default:
|
|
78
|
-
where[key] = { equals: value }
|
|
79
|
-
}
|
|
80
|
-
} else {
|
|
81
|
-
where[key] = { equals: value }
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
})
|
|
85
|
-
|
|
86
|
-
return Object.keys(where).length > 0 ? where : undefined
|
|
87
|
-
}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
|
|
3
|
-
import React, { useState } from 'react'
|
|
4
|
-
|
|
5
|
-
import { DatePicker, Button } from 'antd'
|
|
6
|
-
import { LeftOutlined, RightOutlined } from '@ant-design/icons'
|
|
7
|
-
|
|
8
|
-
import { dayjs, type Dayjs } from '@wzyjs/utils/web'
|
|
9
|
-
|
|
10
|
-
import styles from './index.module.scss'
|
|
11
|
-
|
|
12
|
-
interface DateSwitcherProps {
|
|
13
|
-
value?: Dayjs
|
|
14
|
-
onChange?: (date: Dayjs) => void
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export const DateSwitcher = (props: DateSwitcherProps) => {
|
|
18
|
-
const { value = dayjs(), onChange } = props
|
|
19
|
-
|
|
20
|
-
const [selectedDate, setSelectedDate] = useState(value)
|
|
21
|
-
|
|
22
|
-
const handleDateChange = (date: Dayjs | null) => {
|
|
23
|
-
if (date) {
|
|
24
|
-
setSelectedDate(date)
|
|
25
|
-
onChange?.(date)
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
const handlePrevDay = () => {
|
|
30
|
-
const newDate = selectedDate.subtract(1, 'day')
|
|
31
|
-
handleDateChange(newDate)
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
const handleNextDay = () => {
|
|
35
|
-
const newDate = selectedDate.add(1, 'day')
|
|
36
|
-
handleDateChange(newDate)
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
const isToday = selectedDate.isSame(dayjs(), 'day')
|
|
40
|
-
|
|
41
|
-
return (
|
|
42
|
-
<div className={styles.picker}>
|
|
43
|
-
<Button
|
|
44
|
-
type='text'
|
|
45
|
-
icon={<LeftOutlined />}
|
|
46
|
-
onClick={handlePrevDay}
|
|
47
|
-
className='flex items-center justify-center'
|
|
48
|
-
/>
|
|
49
|
-
<DatePicker
|
|
50
|
-
value={selectedDate}
|
|
51
|
-
onChange={handleDateChange}
|
|
52
|
-
allowClear={false}
|
|
53
|
-
suffixIcon={null}
|
|
54
|
-
className='w-40 text-center cursor-pointer'
|
|
55
|
-
style={{ border: 'none' }}
|
|
56
|
-
components={{
|
|
57
|
-
input: props => (
|
|
58
|
-
<div {...props} className={isToday ? 'text-green-600' : ''}>
|
|
59
|
-
<span>{selectedDate.format('YYYY-MM-DD')}</span>
|
|
60
|
-
<span style={{ marginLeft: 5 }}>
|
|
61
|
-
(周{['日', '一', '二', '三', '四', '五', '六'][dayjs(selectedDate).day()]})
|
|
62
|
-
</span>
|
|
63
|
-
</div>
|
|
64
|
-
),
|
|
65
|
-
}}
|
|
66
|
-
/>
|
|
67
|
-
<Button
|
|
68
|
-
type='text'
|
|
69
|
-
icon={<RightOutlined />}
|
|
70
|
-
onClick={handleNextDay}
|
|
71
|
-
className='flex items-center justify-center'
|
|
72
|
-
/>
|
|
73
|
-
</div>
|
|
74
|
-
)
|
|
75
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
|
|
3
|
-
import React from 'react'
|
|
4
|
-
|
|
5
|
-
interface DownloadLinkProps {
|
|
6
|
-
url: string
|
|
7
|
-
filename?: string
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export const DownloadLink = ({ url, filename }: DownloadLinkProps) => {
|
|
11
|
-
const handleDownload = (e: any) => {
|
|
12
|
-
e.preventDefault()
|
|
13
|
-
fetch(url, { method: 'GET' })
|
|
14
|
-
.then(response => response.blob())
|
|
15
|
-
.then(blob => {
|
|
16
|
-
const downloadUrl = window.URL.createObjectURL(blob)
|
|
17
|
-
const a = document.createElement('a')
|
|
18
|
-
a.href = downloadUrl
|
|
19
|
-
a.download = filename || '下载文件'
|
|
20
|
-
document.body.appendChild(a)
|
|
21
|
-
a.click()
|
|
22
|
-
a.remove()
|
|
23
|
-
window.URL.revokeObjectURL(downloadUrl)
|
|
24
|
-
})
|
|
25
|
-
.catch((err) => {
|
|
26
|
-
console.log(666, err)
|
|
27
|
-
alert('下载失败')
|
|
28
|
-
})
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
return (
|
|
32
|
-
<a href={url} onClick={handleDownload}>
|
|
33
|
-
下载
|
|
34
|
-
</a>
|
|
35
|
-
)
|
|
36
|
-
}
|