@wzyjs/uis 0.3.29 → 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 -11
- 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/FoldCard/index.tsx +0 -131
- package/src/antd/pro/RangeInput/index.tsx +0 -46
- 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/buttons/ButtonGroup.tsx +0 -26
- package/src/antd/pro/buttons/ConfirmButton.tsx +0 -24
- package/src/antd/pro/buttons/CopyButton.tsx +0 -47
- package/src/antd/pro/buttons/DrawerButton.tsx +0 -37
- package/src/antd/pro/buttons/index.tsx +0 -4
- package/src/antd/pro/index.ts +0 -5
- 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 -76
- package/src/components/DynamicSelect/types.ts +0 -8
- package/src/components/DynamicSelect/utils.ts +0 -47
- package/src/components/EnumTag/index.tsx +0 -24
- package/src/components/FetchSelect/index.tsx +0 -57
- 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 -26
- package/src/rn.ts +0 -1
- package/src/rns/index.ts +0 -0
- package/src/web.ts +0 -2
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { dayjs } from '@/utils'
|
|
2
|
-
import { calcOffsetByTime } from '../utils'
|
|
3
|
-
|
|
4
|
-
interface GuideLine {
|
|
5
|
-
key: string
|
|
6
|
-
offset: number
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
interface WeekGuidesOption {
|
|
10
|
-
originTime: number
|
|
11
|
-
visibleDates: Date[]
|
|
12
|
-
timePxPerDay: number
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export const useWeekGuides = (option: WeekGuidesOption): GuideLine[] => {
|
|
16
|
-
const { originTime, visibleDates, timePxPerDay } = option
|
|
17
|
-
|
|
18
|
-
if (!visibleDates.length) {
|
|
19
|
-
return []
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
const result: GuideLine[] = []
|
|
23
|
-
|
|
24
|
-
for (const date of visibleDates) {
|
|
25
|
-
const d = dayjs(date)
|
|
26
|
-
if (d.day() !== 1) {
|
|
27
|
-
continue
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
const time: number = d.startOf('day').valueOf()
|
|
31
|
-
const offset = calcOffsetByTime({ originTime, time, timePxPerDay })
|
|
32
|
-
result.push({
|
|
33
|
-
key: d.format('YYYY-MM-DD'),
|
|
34
|
-
offset,
|
|
35
|
-
})
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
return result
|
|
39
|
-
}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { Ticks, Guides, TodayIndicator, CurrentWeekHighlight } from './components'
|
|
2
|
-
|
|
3
|
-
import { useElement } from '@/hooks'
|
|
4
|
-
import { useVisibleRange } from './hooks'
|
|
5
|
-
|
|
6
|
-
import { HEIGHT } from './const'
|
|
7
|
-
|
|
8
|
-
interface TimelineBarProps {
|
|
9
|
-
x?: number
|
|
10
|
-
minTime?: number
|
|
11
|
-
maxTime?: number
|
|
12
|
-
originTime: number
|
|
13
|
-
timePxPerDay?: number
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export const TimelineBar = (props: TimelineBarProps) => {
|
|
17
|
-
const { originTime, x = 0, timePxPerDay = 30, minTime, maxTime } = props
|
|
18
|
-
|
|
19
|
-
const { elementRef, elementStyles } = useElement()
|
|
20
|
-
|
|
21
|
-
const { visibleDates } = useVisibleRange({
|
|
22
|
-
x,
|
|
23
|
-
originTime,
|
|
24
|
-
minTime,
|
|
25
|
-
maxTime,
|
|
26
|
-
timePxPerDay,
|
|
27
|
-
containerWidth: Number(elementStyles?.width),
|
|
28
|
-
})
|
|
29
|
-
|
|
30
|
-
return (
|
|
31
|
-
<div ref={elementRef} className='w-full border-b border-gray-200 bg-white/90 backdrop-blur overflow-hidden'>
|
|
32
|
-
<div
|
|
33
|
-
style={{
|
|
34
|
-
transform: `translateX(${x}px)`,
|
|
35
|
-
height: HEIGHT,
|
|
36
|
-
width: elementStyles?.width
|
|
37
|
-
}}
|
|
38
|
-
>
|
|
39
|
-
<Ticks
|
|
40
|
-
originTime={originTime}
|
|
41
|
-
timePxPerDay={timePxPerDay}
|
|
42
|
-
visibleDates={visibleDates}
|
|
43
|
-
/>
|
|
44
|
-
|
|
45
|
-
<TodayIndicator
|
|
46
|
-
originTime={originTime}
|
|
47
|
-
timePxPerDay={timePxPerDay}
|
|
48
|
-
/>
|
|
49
|
-
|
|
50
|
-
<Guides
|
|
51
|
-
originTime={originTime}
|
|
52
|
-
timePxPerDay={timePxPerDay}
|
|
53
|
-
visibleDates={visibleDates}
|
|
54
|
-
/>
|
|
55
|
-
|
|
56
|
-
<CurrentWeekHighlight
|
|
57
|
-
originTime={originTime}
|
|
58
|
-
timePxPerDay={timePxPerDay}
|
|
59
|
-
/>
|
|
60
|
-
</div>
|
|
61
|
-
</div>
|
|
62
|
-
)
|
|
63
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { ONE_DAY_MS } from './const'
|
|
2
|
-
|
|
3
|
-
interface ScreenOffsetOption {
|
|
4
|
-
x: number
|
|
5
|
-
screenOffset: number
|
|
6
|
-
originTime: number
|
|
7
|
-
timePxPerDay: number
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export const calcTimeByScreenOffset = (option: ScreenOffsetOption): number => {
|
|
11
|
-
const { screenOffset, x, originTime, timePxPerDay } = option
|
|
12
|
-
const center = screenOffset - x
|
|
13
|
-
const diffDays = center / timePxPerDay
|
|
14
|
-
return originTime + diffDays * ONE_DAY_MS
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
interface TimeToOffsetOption {
|
|
18
|
-
time: number
|
|
19
|
-
originTime: number
|
|
20
|
-
timePxPerDay: number
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export const calcOffsetByTime = (option: TimeToOffsetOption): number => {
|
|
24
|
-
const { originTime, time, timePxPerDay } = option
|
|
25
|
-
const diffDays = (time - originTime) / ONE_DAY_MS
|
|
26
|
-
return diffDays * timePxPerDay
|
|
27
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
|
|
3
|
-
import React, { CSSProperties, useRef } from 'react'
|
|
4
|
-
|
|
5
|
-
interface VideoProps {
|
|
6
|
-
url: string,
|
|
7
|
-
width?: number,
|
|
8
|
-
height?: number,
|
|
9
|
-
style?: CSSProperties
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export const Video = (props: VideoProps) => {
|
|
13
|
-
const { url, width = 175, height = 310, style } = props
|
|
14
|
-
|
|
15
|
-
const videoRef = useRef<HTMLVideoElement>(null)
|
|
16
|
-
|
|
17
|
-
if (!url) {
|
|
18
|
-
return null
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
return (
|
|
22
|
-
<video
|
|
23
|
-
ref={videoRef}
|
|
24
|
-
width={width}
|
|
25
|
-
height={height}
|
|
26
|
-
style={style}
|
|
27
|
-
onMouseEnter={() => {
|
|
28
|
-
videoRef.current?.play()
|
|
29
|
-
}}
|
|
30
|
-
onMouseLeave={() => {
|
|
31
|
-
videoRef.current?.pause()
|
|
32
|
-
}}
|
|
33
|
-
>
|
|
34
|
-
<source src={url} type='video/mp4' />
|
|
35
|
-
</video>
|
|
36
|
-
)
|
|
37
|
-
}
|
package/src/components/index.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
export * from './CodeView'
|
|
2
|
-
export * from './HtmlPro'
|
|
3
|
-
export * from './IframePro'
|
|
4
|
-
export * from './FormPro'
|
|
5
|
-
export * from './Com2Canvas'
|
|
6
|
-
export * from './Video'
|
|
7
|
-
export * from './MultiImageDisplay'
|
|
8
|
-
export * from './DownloadLink'
|
|
9
|
-
export * from './DragSort'
|
|
10
|
-
export * from './DateSwitcher'
|
|
11
|
-
export * from './GroupLayout'
|
|
12
|
-
export * from './TextInput'
|
|
13
|
-
export * from './SectorButton'
|
|
14
|
-
export * from './Markdown'
|
|
15
|
-
export * from './DynamicSelect'
|
|
16
|
-
export * from './JsonRenderer'
|
|
17
|
-
export * from './EnumTag'
|
|
18
|
-
export * from './MindMap'
|
|
19
|
-
export * from './ProgressButton'
|
|
20
|
-
export * from './TimelineBar'
|
|
21
|
-
export * from './Crud'
|
|
22
|
-
export * from './Crud/components/CreateUpdate'
|
|
23
|
-
|
|
24
|
-
// export * from './JsonView'
|
|
25
|
-
|
|
26
|
-
export { default as ReactEchart } from 'echarts-for-react'
|
package/src/rn.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './rns';
|
package/src/rns/index.ts
DELETED
|
File without changes
|
package/src/web.ts
DELETED