@voplus/morpho-workspace 1.0.0-dev01
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/LICENSE +1 -0
- package/es/MySpace.d.ts +7 -0
- package/es/MySpace.js +14 -0
- package/es/MySpace.js.map +1 -0
- package/es/components/ActivityLog/index.d.ts +5 -0
- package/es/components/ActivityLog/index.js +82 -0
- package/es/components/ActivityLog/index.js.map +1 -0
- package/es/components/ActivityLog/index.less +35 -0
- package/es/components/AssignPeople/index.d.ts +3 -0
- package/es/components/AssignPeople/index.js +23 -0
- package/es/components/AssignPeople/index.js.map +1 -0
- package/es/components/AssignPeople/index.less +0 -0
- package/es/components/AvatarList/index.d.ts +14 -0
- package/es/components/AvatarList/index.js +61 -0
- package/es/components/AvatarList/index.js.map +1 -0
- package/es/components/AvatarList/index.less +48 -0
- package/es/components/AvatarList/state.d.ts +6 -0
- package/es/components/AvatarList/state.js +23 -0
- package/es/components/AvatarList/state.js.map +1 -0
- package/es/components/Comments/ChartInput.d.ts +5 -0
- package/es/components/Comments/ChartInput.js +42 -0
- package/es/components/Comments/ChartInput.js.map +1 -0
- package/es/components/Comments/Message.d.ts +7 -0
- package/es/components/Comments/Message.js +64 -0
- package/es/components/Comments/Message.js.map +1 -0
- package/es/components/Comments/Message.less +202 -0
- package/es/components/Comments/index.d.ts +5 -0
- package/es/components/Comments/index.js +124 -0
- package/es/components/Comments/index.js.map +1 -0
- package/es/components/Comments/index.less +63 -0
- package/es/components/DocumentList/index.d.ts +13 -0
- package/es/components/DocumentList/index.js +116 -0
- package/es/components/DocumentList/index.js.map +1 -0
- package/es/components/DocumentList/index.less +66 -0
- package/es/components/ListHeader/index.d.ts +20 -0
- package/es/components/ListHeader/index.js +38 -0
- package/es/components/ListHeader/index.js.map +1 -0
- package/es/components/ListHeader/index.less +23 -0
- package/es/components/PageListView/data/index.d.ts +9 -0
- package/es/components/PageListView/data/index.js +29 -0
- package/es/components/PageListView/data/index.js.map +1 -0
- package/es/components/PageListView/index.d.ts +25 -0
- package/es/components/PageListView/index.js +42 -0
- package/es/components/PageListView/index.js.map +1 -0
- package/es/components/PageListView/index.less +4 -0
- package/es/components/SortDnD/Card.d.ts +18 -0
- package/es/components/SortDnD/Card.js +55 -0
- package/es/components/SortDnD/Card.js.map +1 -0
- package/es/components/SortDnD/Container.d.ts +14 -0
- package/es/components/SortDnD/Container.js +32 -0
- package/es/components/SortDnD/Container.js.map +1 -0
- package/es/components/SortDnD/index.d.ts +8 -0
- package/es/components/SortDnD/index.js +12 -0
- package/es/components/SortDnD/index.js.map +1 -0
- package/es/components/SortDnD/index.less +21 -0
- package/es/components/SortDnD/type.d.ts +4 -0
- package/es/components/SortDnD/type.js +4 -0
- package/es/components/SortDnD/type.js.map +1 -0
- package/es/components/TimeLog/index.d.ts +3 -0
- package/es/components/TimeLog/index.js +72 -0
- package/es/components/TimeLog/index.js.map +1 -0
- package/es/components/TimeLog/index.less +87 -0
- package/es/components/ToolBar/index.d.ts +13 -0
- package/es/components/ToolBar/index.js +100 -0
- package/es/components/ToolBar/index.js.map +1 -0
- package/es/components/ToolBar/index.less +55 -0
- package/es/components/VoLayout/index.d.ts +18 -0
- package/es/components/VoLayout/index.js +57 -0
- package/es/components/VoLayout/index.js.map +1 -0
- package/es/components/VoLayout/index.less +64 -0
- package/es/controls/DocumentStatusLabel/index.d.ts +12 -0
- package/es/controls/DocumentStatusLabel/index.js +39 -0
- package/es/controls/DocumentStatusLabel/index.js.map +1 -0
- package/es/controls/DocumentStatusLabel/index.less +47 -0
- package/es/controls/FilterListDropdown/index.d.ts +3 -0
- package/es/controls/FilterListDropdown/index.js +104 -0
- package/es/controls/FilterListDropdown/index.js.map +1 -0
- package/es/controls/FilterListDropdown/index.less +64 -0
- package/es/controls/FilterViewsDropdown/index.d.ts +3 -0
- package/es/controls/FilterViewsDropdown/index.js +90 -0
- package/es/controls/FilterViewsDropdown/index.js.map +1 -0
- package/es/controls/FilterViewsDropdown/index.less +64 -0
- package/es/controls/MoreOperateDropdown/index.d.ts +18 -0
- package/es/controls/MoreOperateDropdown/index.js +46 -0
- package/es/controls/MoreOperateDropdown/index.js.map +1 -0
- package/es/controls/MoreOperateDropdown/index.less +12 -0
- package/es/controls/SortViewDropdown/index.d.ts +3 -0
- package/es/controls/SortViewDropdown/index.js +57 -0
- package/es/controls/SortViewDropdown/index.js.map +1 -0
- package/es/controls/SortViewDropdown/index.less +63 -0
- package/es/controls/StarIcon/index.d.ts +9 -0
- package/es/controls/StarIcon/index.js +12 -0
- package/es/controls/StarIcon/index.js.map +1 -0
- package/es/data/contexts/SortContext/index.d.ts +13 -0
- package/es/data/contexts/SortContext/index.js +45 -0
- package/es/data/contexts/SortContext/index.js.map +1 -0
- package/es/data/contexts/StoreContext/index.d.ts +6 -0
- package/es/data/contexts/StoreContext/index.js +41 -0
- package/es/data/contexts/StoreContext/index.js.map +1 -0
- package/es/data/contexts/index.d.ts +1 -0
- package/es/data/contexts/index.js +2 -0
- package/es/data/contexts/index.js.map +1 -0
- package/es/data/meeting/MeetingStore.d.ts +54 -0
- package/es/data/meeting/MeetingStore.js +65 -0
- package/es/data/meeting/MeetingStore.js.map +1 -0
- package/es/data/meeting/hooks.d.ts +11 -0
- package/es/data/meeting/hooks.js +24 -0
- package/es/data/meeting/hooks.js.map +1 -0
- package/es/data/meeting/index.d.ts +3 -0
- package/es/data/meeting/index.js +3 -0
- package/es/data/meeting/index.js.map +1 -0
- package/es/data/meeting/interfaces.d.ts +16 -0
- package/es/data/meeting/interfaces.js +1 -0
- package/es/data/meeting/interfaces.js.map +1 -0
- package/es/data/task/TaskStore.d.ts +71 -0
- package/es/data/task/TaskStore.js +71 -0
- package/es/data/task/TaskStore.js.map +1 -0
- package/es/data/task/hooks.d.ts +11 -0
- package/es/data/task/hooks.js +24 -0
- package/es/data/task/hooks.js.map +1 -0
- package/es/data/task/index.d.ts +3 -0
- package/es/data/task/index.js +3 -0
- package/es/data/task/index.js.map +1 -0
- package/es/data/task/interfaces.d.ts +26 -0
- package/es/data/task/interfaces.js +1 -0
- package/es/data/task/interfaces.js.map +1 -0
- package/es/index.d.ts +1 -0
- package/es/index.js +13 -0
- package/es/index.js.map +1 -0
- package/es/modules/BoardView/components/Add/index.d.ts +7 -0
- package/es/modules/BoardView/components/Add/index.js +80 -0
- package/es/modules/BoardView/components/Add/index.js.map +1 -0
- package/es/modules/BoardView/components/Add/index.less +26 -0
- package/es/modules/BoardView/components/BoardViewItem/index.d.ts +3 -0
- package/es/modules/BoardView/components/BoardViewItem/index.js +198 -0
- package/es/modules/BoardView/components/BoardViewItem/index.js.map +1 -0
- package/es/modules/BoardView/components/BoardViewItem/index.less +84 -0
- package/es/modules/BoardView/pages/BoardViewList/index.d.ts +5 -0
- package/es/modules/BoardView/pages/BoardViewList/index.js +27 -0
- package/es/modules/BoardView/pages/BoardViewList/index.js.map +1 -0
- package/es/modules/BoardView/pages/BoardViewList/index.less +15 -0
- package/es/modules/BoardView/pages/BoardViewRoutes.d.ts +3 -0
- package/es/modules/BoardView/pages/BoardViewRoutes.js +8 -0
- package/es/modules/BoardView/pages/BoardViewRoutes.js.map +1 -0
- package/es/modules/document/components/Add/index.d.ts +7 -0
- package/es/modules/document/components/Add/index.js +80 -0
- package/es/modules/document/components/Add/index.js.map +1 -0
- package/es/modules/document/components/Add/index.less +26 -0
- package/es/modules/document/components/AdvanceSearch/index.d.ts +3 -0
- package/es/modules/document/components/AdvanceSearch/index.js +129 -0
- package/es/modules/document/components/AdvanceSearch/index.js.map +1 -0
- package/es/modules/document/components/AdvanceSearch/index.less +21 -0
- package/es/modules/document/components/DocumentDetail/index.d.ts +5 -0
- package/es/modules/document/components/DocumentDetail/index.js +79 -0
- package/es/modules/document/components/DocumentDetail/index.js.map +1 -0
- package/es/modules/document/components/DocumentDetail/index.less +56 -0
- package/es/modules/document/components/DocumentItem/index.d.ts +7 -0
- package/es/modules/document/components/DocumentItem/index.js +56 -0
- package/es/modules/document/components/DocumentItem/index.js.map +1 -0
- package/es/modules/document/components/DocumentItem/index.less +128 -0
- package/es/modules/document/pages/DocumentListView/index.d.ts +3 -0
- package/es/modules/document/pages/DocumentListView/index.js +141 -0
- package/es/modules/document/pages/DocumentListView/index.js.map +1 -0
- package/es/modules/document/pages/DocumentRoutes.d.ts +3 -0
- package/es/modules/document/pages/DocumentRoutes.js +12 -0
- package/es/modules/document/pages/DocumentRoutes.js.map +1 -0
- package/es/modules/document/pages/DocumentTabView/index.d.ts +3 -0
- package/es/modules/document/pages/DocumentTabView/index.js +237 -0
- package/es/modules/document/pages/DocumentTabView/index.js.map +1 -0
- package/es/modules/document/pages/DocumentTabView/index.less +63 -0
- package/es/modules/meeting/components/AgendaList/AgendaHeader/index.d.ts +6 -0
- package/es/modules/meeting/components/AgendaList/AgendaHeader/index.js +12 -0
- package/es/modules/meeting/components/AgendaList/AgendaHeader/index.js.map +1 -0
- package/es/modules/meeting/components/AgendaList/AgendaHeader/index.less +14 -0
- package/es/modules/meeting/components/AgendaList/AgendaItem/index.d.ts +6 -0
- package/es/modules/meeting/components/AgendaList/AgendaItem/index.js +28 -0
- package/es/modules/meeting/components/AgendaList/AgendaItem/index.js.map +1 -0
- package/es/modules/meeting/components/AgendaList/AgendaItem/index.less +28 -0
- package/es/modules/meeting/components/AgendaList/AgendaNewForm/index.d.ts +7 -0
- package/es/modules/meeting/components/AgendaList/AgendaNewForm/index.js +42 -0
- package/es/modules/meeting/components/AgendaList/AgendaNewForm/index.js.map +1 -0
- package/es/modules/meeting/components/AgendaList/AgendaNewForm/index.less +47 -0
- package/es/modules/meeting/components/AgendaList/AgendaNewForm/state.d.ts +3 -0
- package/es/modules/meeting/components/AgendaList/AgendaNewForm/state.js +11 -0
- package/es/modules/meeting/components/AgendaList/AgendaNewForm/state.js.map +1 -0
- package/es/modules/meeting/components/AgendaList/TaskItem/index.d.ts +5 -0
- package/es/modules/meeting/components/AgendaList/TaskItem/index.js +42 -0
- package/es/modules/meeting/components/AgendaList/TaskItem/index.js.map +1 -0
- package/es/modules/meeting/components/AgendaList/TaskItem/index.less +50 -0
- package/es/modules/meeting/components/AgendaList/index.d.ts +9 -0
- package/es/modules/meeting/components/AgendaList/index.js +63 -0
- package/es/modules/meeting/components/AgendaList/index.js.map +1 -0
- package/es/modules/meeting/components/AgendaList/index.less +95 -0
- package/es/modules/meeting/components/AgendaList/state.d.ts +9 -0
- package/es/modules/meeting/components/AgendaList/state.js +38 -0
- package/es/modules/meeting/components/AgendaList/state.js.map +1 -0
- package/es/modules/meeting/components/MeetingDetail/index.d.ts +5 -0
- package/es/modules/meeting/components/MeetingDetail/index.js +40 -0
- package/es/modules/meeting/components/MeetingDetail/index.js.map +1 -0
- package/es/modules/meeting/components/MeetingItem/index.d.ts +7 -0
- package/es/modules/meeting/components/MeetingItem/index.js +84 -0
- package/es/modules/meeting/components/MeetingItem/index.js.map +1 -0
- package/es/modules/meeting/components/MeetingItem/index.less +131 -0
- package/es/modules/meeting/components/MeetingItem/state.d.ts +5 -0
- package/es/modules/meeting/components/MeetingItem/state.js +14 -0
- package/es/modules/meeting/components/MeetingItem/state.js.map +1 -0
- package/es/modules/meeting/components/MeetingList/index.d.ts +3 -0
- package/es/modules/meeting/components/MeetingList/index.js +36 -0
- package/es/modules/meeting/components/MeetingList/index.js.map +1 -0
- package/es/modules/meeting/components/MeetingList/state.d.ts +11 -0
- package/es/modules/meeting/components/MeetingList/state.js +34 -0
- package/es/modules/meeting/components/MeetingList/state.js.map +1 -0
- package/es/modules/meeting/components/NewMeetingForm/index.d.ts +5 -0
- package/es/modules/meeting/components/NewMeetingForm/index.js +137 -0
- package/es/modules/meeting/components/NewMeetingForm/index.js.map +1 -0
- package/es/modules/meeting/components/NewMeetingForm/index.less +26 -0
- package/es/modules/meeting/components/NewMeetingForm/state.d.ts +6 -0
- package/es/modules/meeting/components/NewMeetingForm/state.js +30 -0
- package/es/modules/meeting/components/NewMeetingForm/state.js.map +1 -0
- package/es/modules/meeting/components/VoEditor/index.d.ts +13 -0
- package/es/modules/meeting/components/VoEditor/index.js +46 -0
- package/es/modules/meeting/components/VoEditor/index.js.map +1 -0
- package/es/modules/meeting/components/VoEditor/index.less +12 -0
- package/es/modules/meeting/pages/MeetingListView/index.d.ts +3 -0
- package/es/modules/meeting/pages/MeetingListView/index.js +8 -0
- package/es/modules/meeting/pages/MeetingListView/index.js.map +1 -0
- package/es/modules/meeting/pages/MeetingRoutes.d.ts +3 -0
- package/es/modules/meeting/pages/MeetingRoutes.js +10 -0
- package/es/modules/meeting/pages/MeetingRoutes.js.map +1 -0
- package/es/modules/meeting/pages/MeetingTabView/index.d.ts +3 -0
- package/es/modules/meeting/pages/MeetingTabView/index.js +48 -0
- package/es/modules/meeting/pages/MeetingTabView/index.js.map +1 -0
- package/es/modules/meeting/styles/MeetingMinView.less +32 -0
- package/es/modules/menus/components/Access/index.d.ts +6 -0
- package/es/modules/menus/components/Access/index.js +19 -0
- package/es/modules/menus/components/Access/index.js.map +1 -0
- package/es/modules/menus/components/Account/index.d.ts +6 -0
- package/es/modules/menus/components/Account/index.js +19 -0
- package/es/modules/menus/components/Account/index.js.map +1 -0
- package/es/modules/menus/components/AddUsers/index.d.ts +3 -0
- package/es/modules/menus/components/AddUsers/index.js +41 -0
- package/es/modules/menus/components/AddUsers/index.js.map +1 -0
- package/es/modules/menus/components/AddUsers/index.less +7 -0
- package/es/modules/menus/components/Status/index.d.ts +6 -0
- package/es/modules/menus/components/Status/index.js +19 -0
- package/es/modules/menus/components/Status/index.js.map +1 -0
- package/es/modules/menus/components/UsersList/index.d.ts +3 -0
- package/es/modules/menus/components/UsersList/index.js +130 -0
- package/es/modules/menus/components/UsersList/index.js.map +1 -0
- package/es/modules/menus/components/UsersList/index.less +66 -0
- package/es/modules/menus/pages/ListOptions/Company/index.d.ts +3 -0
- package/es/modules/menus/pages/ListOptions/Company/index.js +116 -0
- package/es/modules/menus/pages/ListOptions/Company/index.js.map +1 -0
- package/es/modules/menus/pages/ListOptions/Company/index.less +20 -0
- package/es/modules/menus/pages/ListOptions/Config/index.d.ts +3 -0
- package/es/modules/menus/pages/ListOptions/Config/index.js +5 -0
- package/es/modules/menus/pages/ListOptions/Config/index.js.map +1 -0
- package/es/modules/menus/pages/ListOptions/Teams/index.d.ts +3 -0
- package/es/modules/menus/pages/ListOptions/Teams/index.js +70 -0
- package/es/modules/menus/pages/ListOptions/Teams/index.js.map +1 -0
- package/es/modules/menus/pages/ListOptions/Teams/index.less +46 -0
- package/es/modules/menus/pages/ListOptions/Users/index.d.ts +3 -0
- package/es/modules/menus/pages/ListOptions/Users/index.js +33 -0
- package/es/modules/menus/pages/ListOptions/Users/index.js.map +1 -0
- package/es/modules/menus/pages/ListOptions/Users/index.less +44 -0
- package/es/modules/menus/pages/ListOptions/index.d.ts +3 -0
- package/es/modules/menus/pages/ListOptions/index.js +52 -0
- package/es/modules/menus/pages/ListOptions/index.js.map +1 -0
- package/es/modules/menus/pages/MenusRoutes.d.ts +3 -0
- package/es/modules/menus/pages/MenusRoutes.js +8 -0
- package/es/modules/menus/pages/MenusRoutes.js.map +1 -0
- package/es/modules/routes.d.ts +4 -0
- package/es/modules/routes.js +8 -0
- package/es/modules/routes.js.map +1 -0
- package/es/modules/tasks/TasksRoutes.d.ts +17 -0
- package/es/modules/tasks/TasksRoutes.js +39 -0
- package/es/modules/tasks/TasksRoutes.js.map +1 -0
- package/es/modules/tasks/components/NewTaskForm/index.d.ts +9 -0
- package/es/modules/tasks/components/NewTaskForm/index.js +107 -0
- package/es/modules/tasks/components/NewTaskForm/index.js.map +1 -0
- package/es/modules/tasks/components/NewTaskForm/index.less +43 -0
- package/es/modules/tasks/components/NewTaskForm/state.d.ts +16 -0
- package/es/modules/tasks/components/NewTaskForm/state.js +33 -0
- package/es/modules/tasks/components/NewTaskForm/state.js.map +1 -0
- package/es/modules/tasks/components/SubTaskList/index.d.ts +5 -0
- package/es/modules/tasks/components/SubTaskList/index.js +91 -0
- package/es/modules/tasks/components/SubTaskList/index.js.map +1 -0
- package/es/modules/tasks/components/SubTaskList/index.less +43 -0
- package/es/modules/tasks/components/SubTaskList/state.d.ts +23 -0
- package/es/modules/tasks/components/SubTaskList/state.js +60 -0
- package/es/modules/tasks/components/SubTaskList/state.js.map +1 -0
- package/es/modules/tasks/components/TaskDetail/index.d.ts +6 -0
- package/es/modules/tasks/components/TaskDetail/index.js +62 -0
- package/es/modules/tasks/components/TaskDetail/index.js.map +1 -0
- package/es/modules/tasks/components/TaskItem/TaskItem.d.ts +9 -0
- package/es/modules/tasks/components/TaskItem/TaskItem.js +119 -0
- package/es/modules/tasks/components/TaskItem/TaskItem.js.map +1 -0
- package/es/modules/tasks/components/TaskItem/index.d.ts +6 -0
- package/es/modules/tasks/components/TaskItem/index.js +7 -0
- package/es/modules/tasks/components/TaskItem/index.js.map +1 -0
- package/es/modules/tasks/components/TaskItem/index.less +76 -0
- package/es/modules/tasks/components/TaskItem/state.d.ts +5 -0
- package/es/modules/tasks/components/TaskItem/state.js +14 -0
- package/es/modules/tasks/components/TaskItem/state.js.map +1 -0
- package/es/modules/tasks/components/TaskList/index.d.ts +3 -0
- package/es/modules/tasks/components/TaskList/index.js +42 -0
- package/es/modules/tasks/components/TaskList/index.js.map +1 -0
- package/es/modules/tasks/components/TaskList/state.d.ts +7 -0
- package/es/modules/tasks/components/TaskList/state.js +23 -0
- package/es/modules/tasks/components/TaskList/state.js.map +1 -0
- package/es/modules/tasks/pages/TaskListView/index.d.ts +3 -0
- package/es/modules/tasks/pages/TaskListView/index.js +8 -0
- package/es/modules/tasks/pages/TaskListView/index.js.map +1 -0
- package/es/modules/tasks/pages/TaskTabView/index.d.ts +3 -0
- package/es/modules/tasks/pages/TaskTabView/index.js +53 -0
- package/es/modules/tasks/pages/TaskTabView/index.js.map +1 -0
- package/es/modules/tasks/pages/TaskTestView/index.d.ts +3 -0
- package/es/modules/tasks/pages/TaskTestView/index.js +55 -0
- package/es/modules/tasks/pages/TaskTestView/index.js.map +1 -0
- package/es/modules/tasks/pages/TaskTestView/index.less +51 -0
- package/es/modules/user/pages/Positions/index.d.ts +3 -0
- package/es/modules/user/pages/Positions/index.js +94 -0
- package/es/modules/user/pages/Positions/index.js.map +1 -0
- package/es/modules/user/pages/Positions/index.less +60 -0
- package/es/modules/user/pages/Profile/index.d.ts +11 -0
- package/es/modules/user/pages/Profile/index.js +79 -0
- package/es/modules/user/pages/Profile/index.js.map +1 -0
- package/es/modules/user/pages/Profile/index.less +45 -0
- package/es/modules/workspaces/components/Access/index.d.ts +6 -0
- package/es/modules/workspaces/components/Access/index.js +19 -0
- package/es/modules/workspaces/components/Access/index.js.map +1 -0
- package/es/modules/workspaces/components/Account/index.d.ts +6 -0
- package/es/modules/workspaces/components/Account/index.js +19 -0
- package/es/modules/workspaces/components/Account/index.js.map +1 -0
- package/es/modules/workspaces/components/AddUsers/index.d.ts +3 -0
- package/es/modules/workspaces/components/AddUsers/index.js +41 -0
- package/es/modules/workspaces/components/AddUsers/index.js.map +1 -0
- package/es/modules/workspaces/components/AddUsers/index.less +7 -0
- package/es/modules/workspaces/components/ListHeard/index.d.ts +5 -0
- package/es/modules/workspaces/components/ListHeard/index.js +24 -0
- package/es/modules/workspaces/components/ListHeard/index.js.map +1 -0
- package/es/modules/workspaces/components/ListHeard/index.less +33 -0
- package/es/modules/workspaces/components/Status/index.d.ts +6 -0
- package/es/modules/workspaces/components/Status/index.js +19 -0
- package/es/modules/workspaces/components/Status/index.js.map +1 -0
- package/es/modules/workspaces/components/UsersList/index.d.ts +3 -0
- package/es/modules/workspaces/components/UsersList/index.js +131 -0
- package/es/modules/workspaces/components/UsersList/index.js.map +1 -0
- package/es/modules/workspaces/components/UsersList/index.less +74 -0
- package/es/modules/workspaces/pages/BoardView/index.d.ts +3 -0
- package/es/modules/workspaces/pages/BoardView/index.js +68 -0
- package/es/modules/workspaces/pages/BoardView/index.js.map +1 -0
- package/es/modules/workspaces/pages/BoardView/index.less +57 -0
- package/es/modules/workspaces/pages/ListView/index.d.ts +3 -0
- package/es/modules/workspaces/pages/ListView/index.js +78 -0
- package/es/modules/workspaces/pages/ListView/index.js.map +1 -0
- package/es/modules/workspaces/pages/ListView/index.less +92 -0
- package/es/modules/workspaces/pages/Users/index.d.ts +3 -0
- package/es/modules/workspaces/pages/Users/index.js +37 -0
- package/es/modules/workspaces/pages/Users/index.js.map +1 -0
- package/es/modules/workspaces/pages/Users/index.less +47 -0
- package/es/modules/workspaces/pages/WorkSpacesRoutes.d.ts +3 -0
- package/es/modules/workspaces/pages/WorkSpacesRoutes.js +12 -0
- package/es/modules/workspaces/pages/WorkSpacesRoutes.js.map +1 -0
- package/es/styles/ScrollBar.less +30 -0
- package/es/styles/common.less +187 -0
- package/es/styles/index.less +13 -0
- package/package.json +132 -0
- package/readme.md +146 -0
@@ -0,0 +1,202 @@
|
|
1
|
+
@import "../../styles/common.less";
|
2
|
+
.message-me,
|
3
|
+
.message-other {
|
4
|
+
display: flex;
|
5
|
+
:global {
|
6
|
+
.message-main {
|
7
|
+
max-width: 49%;
|
8
|
+
.message-content {
|
9
|
+
display: flex;
|
10
|
+
padding: 0 0 5px 10px;
|
11
|
+
.ant-avatar {
|
12
|
+
flex-shrink: 0;
|
13
|
+
}
|
14
|
+
.on-msg {
|
15
|
+
display: inline-block;
|
16
|
+
text-align: right;
|
17
|
+
.read,
|
18
|
+
.unread {
|
19
|
+
font-weight: bold;
|
20
|
+
font-size: 12px;
|
21
|
+
color: #000;
|
22
|
+
}
|
23
|
+
.unread {
|
24
|
+
color: #f00;
|
25
|
+
}
|
26
|
+
.bubble {
|
27
|
+
display: inline-block;
|
28
|
+
position: relative;
|
29
|
+
max-width: 320px;
|
30
|
+
border-radius: 6px;
|
31
|
+
img {
|
32
|
+
width: 100%;
|
33
|
+
border-radius: 4px;
|
34
|
+
}
|
35
|
+
}
|
36
|
+
.bubble-text {
|
37
|
+
padding: 10px 15px;
|
38
|
+
line-height: 18px;
|
39
|
+
}
|
40
|
+
.bubble-img {
|
41
|
+
padding: 2px;
|
42
|
+
}
|
43
|
+
.bubble:before,
|
44
|
+
.bubble:after {
|
45
|
+
position: absolute;
|
46
|
+
content: "";
|
47
|
+
border-width: 5px;
|
48
|
+
top: 12px;
|
49
|
+
border-style: dashed solid solid dashed;
|
50
|
+
}
|
51
|
+
.reply-operate {
|
52
|
+
display: flex;
|
53
|
+
justify-content: space-between;
|
54
|
+
align-items: center;
|
55
|
+
font-size: 13px;
|
56
|
+
color: #666;
|
57
|
+
cursor: pointer;
|
58
|
+
.date {
|
59
|
+
padding: 2px;
|
60
|
+
font-size: 12px;
|
61
|
+
background: #f8f6ff;
|
62
|
+
color: #514c6a;
|
63
|
+
}
|
64
|
+
}
|
65
|
+
}
|
66
|
+
}
|
67
|
+
.reply-me {
|
68
|
+
display: flex;
|
69
|
+
justify-content: flex-end;
|
70
|
+
}
|
71
|
+
.reply-list {
|
72
|
+
position: relative;
|
73
|
+
transition: opacity 0.4s;
|
74
|
+
.reply-message {
|
75
|
+
position: relative;
|
76
|
+
display: flex;
|
77
|
+
align-items: center;
|
78
|
+
padding-left: 15px;
|
79
|
+
line-height: 18px;
|
80
|
+
.ant-avatar {
|
81
|
+
flex-shrink: 0;
|
82
|
+
margin-right: 10px;
|
83
|
+
}
|
84
|
+
.ant-input {
|
85
|
+
border: 0;
|
86
|
+
border-radius: 15px;
|
87
|
+
background: rgba(248, 248, 250, 1);
|
88
|
+
}
|
89
|
+
}
|
90
|
+
.reply-message + .reply-message {
|
91
|
+
margin-top: 10px;
|
92
|
+
}
|
93
|
+
}
|
94
|
+
.show_out {
|
95
|
+
position: absolute;
|
96
|
+
opacity: 0;
|
97
|
+
// height: 0;
|
98
|
+
z-index: -1;
|
99
|
+
top: -99999px;
|
100
|
+
}
|
101
|
+
.show_in {
|
102
|
+
// height: auto;
|
103
|
+
opacity: 1;
|
104
|
+
}
|
105
|
+
.reply-list:before {
|
106
|
+
position: absolute;
|
107
|
+
content: "";
|
108
|
+
width: 5px;
|
109
|
+
height: 100%;
|
110
|
+
background: #edb74a;
|
111
|
+
left: 0;
|
112
|
+
right: 0;
|
113
|
+
border-radius: 2px;
|
114
|
+
}
|
115
|
+
|
116
|
+
.reply-collapse {
|
117
|
+
display: flex;
|
118
|
+
height: 32px;
|
119
|
+
align-items: center;
|
120
|
+
justify-content: center;
|
121
|
+
cursor: pointer;
|
122
|
+
font-weight: bold;
|
123
|
+
.ant-avatar {
|
124
|
+
margin: 0 10px;
|
125
|
+
}
|
126
|
+
.show-more {
|
127
|
+
opacity: 1;
|
128
|
+
transition: opacity 0.6s 0.1s;
|
129
|
+
}
|
130
|
+
.hide-more {
|
131
|
+
position: absolute;
|
132
|
+
left: -99999px;
|
133
|
+
opacity: 0;
|
134
|
+
}
|
135
|
+
.svg-inline--fa {
|
136
|
+
transition: transform 0.6s;
|
137
|
+
}
|
138
|
+
.up {
|
139
|
+
transform: rotate(-180deg);
|
140
|
+
}
|
141
|
+
}
|
142
|
+
}
|
143
|
+
}
|
144
|
+
}
|
145
|
+
.message-other {
|
146
|
+
:global {
|
147
|
+
.message-content .ant-avatar {
|
148
|
+
margin: 15px 10px 0 0;
|
149
|
+
}
|
150
|
+
.bubble {
|
151
|
+
background: #765fee;
|
152
|
+
color: #d6cbfd;
|
153
|
+
}
|
154
|
+
.bubble:before,
|
155
|
+
.bubble:after {
|
156
|
+
left: -10px;
|
157
|
+
border-color: transparent #765fee transparent transparent;
|
158
|
+
}
|
159
|
+
}
|
160
|
+
}
|
161
|
+
.message-me {
|
162
|
+
justify-content: flex-end;
|
163
|
+
:global {
|
164
|
+
.message-content {
|
165
|
+
flex-direction: row-reverse;
|
166
|
+
.ant-avatar {
|
167
|
+
margin-left: 10px;
|
168
|
+
}
|
169
|
+
.bubble {
|
170
|
+
border: 1px solid #e4e7ed;
|
171
|
+
color: #514c6a;
|
172
|
+
}
|
173
|
+
.bubble:before {
|
174
|
+
right: -11px;
|
175
|
+
border-color: transparent transparent transparent #e4e7ed;
|
176
|
+
}
|
177
|
+
.bubble:after {
|
178
|
+
right: -10px;
|
179
|
+
border-color: transparent transparent transparent #fff;
|
180
|
+
}
|
181
|
+
}
|
182
|
+
}
|
183
|
+
}
|
184
|
+
.message-me {
|
185
|
+
margin-top: -50px;
|
186
|
+
}
|
187
|
+
.message-me + .message-me,
|
188
|
+
.message-other + .message-other {
|
189
|
+
margin-top: 10px;
|
190
|
+
}
|
191
|
+
|
192
|
+
.reply-menu {
|
193
|
+
:global {
|
194
|
+
.svg-inline--fa {
|
195
|
+
margin-right: 10px;
|
196
|
+
}
|
197
|
+
.ant-dropdown-menu-item,
|
198
|
+
.ant-dropdown-menu-submenu-title {
|
199
|
+
color: #000;
|
200
|
+
}
|
201
|
+
}
|
202
|
+
}
|
@@ -0,0 +1,124 @@
|
|
1
|
+
import React, { useState, useEffect, useRef } from "react";
|
2
|
+
import { Empty } from "@voplus/antd";
|
3
|
+
import Message from "./Message";
|
4
|
+
import CommentInput from "./ChartInput";
|
5
|
+
import styles from "./index.less";
|
6
|
+
// import { ContextProvider } from "./data";
|
7
|
+
const generateUid = () => {
|
8
|
+
return new Date().getTime() + "" + Math.floor(Math.random() * 999 + 1);
|
9
|
+
};
|
10
|
+
const generateMsgId = () => {
|
11
|
+
return new Date().getTime() + "" + Math.floor(Math.random() * 899 + 100);
|
12
|
+
};
|
13
|
+
const headImg = "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1560534287675&di=fe324c5498e64a4a54d87bdee56a52b7&imgtype=0&src=http%3A%2F%2Fn.sinaimg.cn%2Fent%2Ftransform%2F20170818%2FIAPS-fykcppx9377606.jpg";
|
14
|
+
export default (props) => {
|
15
|
+
// const uid = generateUid();
|
16
|
+
const uid = "2";
|
17
|
+
const messages = [
|
18
|
+
{
|
19
|
+
msgId: generateMsgId(),
|
20
|
+
userName: "HaHa1",
|
21
|
+
headImg: headImg,
|
22
|
+
action: "Did you go to The Blue Pumpkin",
|
23
|
+
uid: "1",
|
24
|
+
status: "read",
|
25
|
+
messages: [
|
26
|
+
{ msgId: generateMsgId(), userName: "HaHa2", action: "We had a fantastic tiem", uid: "2" },
|
27
|
+
{
|
28
|
+
msgId: generateMsgId(),
|
29
|
+
userName: "HaHa2",
|
30
|
+
headImg: headImg,
|
31
|
+
action: "We had a fantastic tiem",
|
32
|
+
uid: "1"
|
33
|
+
}
|
34
|
+
]
|
35
|
+
},
|
36
|
+
{
|
37
|
+
msgId: generateMsgId(),
|
38
|
+
userName: "HaHa2",
|
39
|
+
headImg: headImg,
|
40
|
+
action: "We had a fantastic tiem",
|
41
|
+
uid: "33"
|
42
|
+
},
|
43
|
+
{
|
44
|
+
msgId: generateMsgId(),
|
45
|
+
userName: "HaHa2",
|
46
|
+
headImg: headImg,
|
47
|
+
// action: "We had a fantastic tiem",
|
48
|
+
uid: "2",
|
49
|
+
type: "image",
|
50
|
+
images: headImg,
|
51
|
+
messages: [
|
52
|
+
{ msgId: generateMsgId(), userName: "HaHa2", action: "We had a fantastic tiem", uid: "4" }
|
53
|
+
]
|
54
|
+
},
|
55
|
+
{
|
56
|
+
msgId: generateMsgId(),
|
57
|
+
userName: "HaHa1",
|
58
|
+
headImg: headImg,
|
59
|
+
action: "Did you go to The Blue Pumpkin",
|
60
|
+
uid: "3",
|
61
|
+
status: "unRead",
|
62
|
+
messages: [
|
63
|
+
{ msgId: generateMsgId(), userName: "HaHa2", action: "We had a fantastic tiem", uid: "7" },
|
64
|
+
{
|
65
|
+
msgId: generateMsgId(),
|
66
|
+
userName: "HaHa2",
|
67
|
+
headImg: headImg,
|
68
|
+
action: "We had a fantastic tiem",
|
69
|
+
uid: "5"
|
70
|
+
},
|
71
|
+
{ msgId: generateMsgId(), userName: "HaHa2", action: "We had a fantastic tiem", uid: "7" },
|
72
|
+
{
|
73
|
+
msgId: generateMsgId(),
|
74
|
+
userName: "HaHa2",
|
75
|
+
headImg: headImg,
|
76
|
+
action: "We had a fantastic tiem",
|
77
|
+
uid: "4"
|
78
|
+
}
|
79
|
+
]
|
80
|
+
},
|
81
|
+
{
|
82
|
+
msgId: generateMsgId(),
|
83
|
+
userName: "HaHa2",
|
84
|
+
headImg: headImg,
|
85
|
+
action: "We had a fantastic tiem",
|
86
|
+
uid: "2",
|
87
|
+
messages: [
|
88
|
+
{ msgId: generateMsgId(), userName: "HaHa2", action: "We had a fantastic tiem", uid: "3" }
|
89
|
+
]
|
90
|
+
},
|
91
|
+
{
|
92
|
+
msgId: generateMsgId(),
|
93
|
+
userName: "HaHa2",
|
94
|
+
headImg: headImg,
|
95
|
+
action: "We had a fantastic tiem",
|
96
|
+
uid: "2"
|
97
|
+
}
|
98
|
+
];
|
99
|
+
const [messageList, setMessageList] = useState(messages);
|
100
|
+
const onReloadData = (info) => {
|
101
|
+
setMessageList([...messageList, info]);
|
102
|
+
};
|
103
|
+
// useEffect(() => setMessageList(messages));
|
104
|
+
const [loading, setLoading] = useState(true);
|
105
|
+
useEffect(() => {
|
106
|
+
setLoading(false);
|
107
|
+
});
|
108
|
+
const commentRef = useRef(document.createElement("div"));
|
109
|
+
useEffect(() => {
|
110
|
+
// console.log(loading, "loading");
|
111
|
+
// console.log(commentRef, "commentRef");
|
112
|
+
// if (!loading) {
|
113
|
+
commentRef.current.scrollTop = commentRef.current.scrollHeight;
|
114
|
+
// }
|
115
|
+
});
|
116
|
+
return (
|
117
|
+
// <ContextProvider>
|
118
|
+
React.createElement("div", { className: styles["comment-list-view"] },
|
119
|
+
messageList ? (React.createElement("div", { className: "comment-list", ref: commentRef }, messageList.map((message) => (React.createElement(Message, { key: message.msgId, message: message, isMe: uid === message.uid ? true : false, commentRef: commentRef }))))) : (React.createElement(Empty, { imageStyle: { marginTop: "200px" } })),
|
120
|
+
messageList && React.createElement(CommentInput, { onReload: onReloadData }))
|
121
|
+
// </ContextProvider>
|
122
|
+
);
|
123
|
+
};
|
124
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Comments/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAA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,CAAC,GAAG,CAAC,CAAC,OAAY,EAAE,EAAE,CAAC,CAClC,oBAAC,OAAO,IACP,GAAG,EAAE,OAAO,CAAC,KAAK,EAClB,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,GAAG,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,EACxC,UAAU,EAAE,UAAU,GACrB,CACF,CAAC,CACG,CACN,CAAC,CAAC,CAAC,CACH,oBAAC,KAAK,IAAC,UAAU,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,GAAI,CAC7C;QACA,WAAW,IAAI,oBAAC,YAAY,IAAC,QAAQ,EAAE,YAAY,GAAI,CACnD;IACN,qBAAqB;KACrB,CAAC;AACH,CAAC,CAAC"}
|
@@ -0,0 +1,63 @@
|
|
1
|
+
@import "~@voplus/antd/es/style/themes/default.less";
|
2
|
+
@import "../../styles/common.less";
|
3
|
+
.comment-list-view {
|
4
|
+
position: relative;
|
5
|
+
display: flex;
|
6
|
+
flex-direction: column;
|
7
|
+
height: 100%;
|
8
|
+
overflow: hidden;
|
9
|
+
// padding: 10px 20px;
|
10
|
+
:global {
|
11
|
+
.comment-view-header {
|
12
|
+
margin: 10px 20px 0 20px;
|
13
|
+
}
|
14
|
+
.comment-list {
|
15
|
+
position: relative;
|
16
|
+
padding: 10px 20px;
|
17
|
+
overflow-x: hidden;
|
18
|
+
scrollbar-color: transparent transparent;
|
19
|
+
-ms-overflow-style: none;
|
20
|
+
}
|
21
|
+
.comment-list::-webkit-scrollbar {
|
22
|
+
width: 8px;
|
23
|
+
}
|
24
|
+
.comment-list:hover {
|
25
|
+
scrollbar-color: auto;
|
26
|
+
-ms-overflow-style: -ms-autohiding-scrollbar;
|
27
|
+
scrollbar-shadow-color: rgba(0, 0, 0, 0.5);
|
28
|
+
}
|
29
|
+
.comment-list:hover::-webkit-scrollbar {
|
30
|
+
width: 8px;
|
31
|
+
background-color: #f5f5f5;
|
32
|
+
}
|
33
|
+
.comment-list:hover::-webkit-scrollbar-track {
|
34
|
+
-webkit-box-shadow: inset 0 0 4px rgba(0, 0, 0, 0);
|
35
|
+
border-radius: 10px;
|
36
|
+
background-color: #f5f5f5;
|
37
|
+
}
|
38
|
+
.comment-list:hover::-webkit-scrollbar-thumb {
|
39
|
+
border-radius: 10px;
|
40
|
+
-webkit-box-shadow: inset 0 0 4px rgba(0, 0, 0, 0);
|
41
|
+
background-color: rgba(0, 0, 0, 0.5);
|
42
|
+
}
|
43
|
+
.comment-input {
|
44
|
+
display: flex;
|
45
|
+
align-items: center;
|
46
|
+
border-top: 1px solid #e4e7ed;
|
47
|
+
padding: 10px 15px;
|
48
|
+
:global {
|
49
|
+
.anticon {
|
50
|
+
font-size: 16px;
|
51
|
+
color: #666;
|
52
|
+
cursor: pointer;
|
53
|
+
}
|
54
|
+
.ant-input {
|
55
|
+
border-radius: 15px;
|
56
|
+
}
|
57
|
+
.ant-input:focus {
|
58
|
+
box-shadow: none;
|
59
|
+
}
|
60
|
+
}
|
61
|
+
}
|
62
|
+
}
|
63
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
declare const DocumentList: {
|
3
|
+
(props: {
|
4
|
+
size?: string | undefined;
|
5
|
+
showHeader?: Boolean | undefined;
|
6
|
+
onClick?: ((e: any) => void) | undefined;
|
7
|
+
}): JSX.Element;
|
8
|
+
defaultProps: {
|
9
|
+
size: string;
|
10
|
+
showHeader: boolean;
|
11
|
+
};
|
12
|
+
};
|
13
|
+
export default DocumentList;
|
@@ -0,0 +1,116 @@
|
|
1
|
+
import React, { useState } from "react";
|
2
|
+
import { Upload, Icon, Row } from "@voplus/antd";
|
3
|
+
import { faTrashAlt, faFilePlus, faUndoAlt } from "@fortawesome/pro-light-svg-icons";
|
4
|
+
import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
|
5
|
+
import styles from "./index.less";
|
6
|
+
const DocumentList = (props) => {
|
7
|
+
const fileList = [
|
8
|
+
{
|
9
|
+
uid: "1",
|
10
|
+
name: "abc.docx",
|
11
|
+
type: "done",
|
12
|
+
url: "https://i.zhaopin.com/resume/uploadextend/ResumeExport?resumeId=302446392&resumeNumber=JM163534531R90500004000&language=1&at=275ec6d379894fc99a1f1f75ba5123ae&rt=b706093593ad4903adcf784a431b1ca3",
|
13
|
+
thumbUrl: "https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=3758464476,2579359185&fm=26&gp=0.jpg",
|
14
|
+
size: 55
|
15
|
+
},
|
16
|
+
{
|
17
|
+
uid: "2",
|
18
|
+
name: "1111.docx",
|
19
|
+
type: "done",
|
20
|
+
url: "https://i.zhaopin.com/resume/uploadextend/ResumeExport?resumeId=302446392&resumeNumber=JM163534531R90500004000&language=1&at=275ec6d379894fc99a1f1f75ba5123ae&rt=b706093593ad4903adcf784a431b1ca3",
|
21
|
+
thumbUrl: "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1558505605980&di=c0e8334f6e11efd2504ae918a0f66f58&imgtype=0&src=http%3A%2F%2Fimgsa.baidu.com%2Fexp%2Fw%3D500%2Fsign%3D5762f68bc4177f3e1034fc0d40ce3bb9%2Fd50735fae6cd7b8918fb5ebe022442a7d9330e73.jpg",
|
22
|
+
size: 55
|
23
|
+
},
|
24
|
+
{
|
25
|
+
uid: "3",
|
26
|
+
name: "1111.docx",
|
27
|
+
type: "done",
|
28
|
+
url: "https://i.zhaopin.com/resume/uploadextend/ResumeExport?resumeId=302446392&resumeNumber=JM163534531R90500004000&language=1&at=275ec6d379894fc99a1f1f75ba5123ae&rt=b706093593ad4903adcf784a431b1ca3",
|
29
|
+
thumbUrl: "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1558505605980&di=c0e8334f6e11efd2504ae918a0f66f58&imgtype=0&src=http%3A%2F%2Fimgsa.baidu.com%2Fexp%2Fw%3D500%2Fsign%3D5762f68bc4177f3e1034fc0d40ce3bb9%2Fd50735fae6cd7b8918fb5ebe022442a7d9330e73.jpg",
|
30
|
+
size: 55
|
31
|
+
},
|
32
|
+
{
|
33
|
+
uid: "4",
|
34
|
+
name: "1111.docx",
|
35
|
+
type: "done",
|
36
|
+
url: "https://i.zhaopin.com/resume/uploadextend/ResumeExport?resumeId=302446392&resumeNumber=JM163534531R90500004000&language=1&at=275ec6d379894fc99a1f1f75ba5123ae&rt=b706093593ad4903adcf784a431b1ca3",
|
37
|
+
thumbUrl: "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1558505605980&di=c0e8334f6e11efd2504ae918a0f66f58&imgtype=0&src=http%3A%2F%2Fimgsa.baidu.com%2Fexp%2Fw%3D500%2Fsign%3D5762f68bc4177f3e1034fc0d40ce3bb9%2Fd50735fae6cd7b8918fb5ebe022442a7d9330e73.jpg",
|
38
|
+
size: 55
|
39
|
+
},
|
40
|
+
{
|
41
|
+
uid: "5",
|
42
|
+
name: "1111.docx",
|
43
|
+
type: "done",
|
44
|
+
url: "https://i.zhaopin.com/resume/uploadextend/ResumeExport?resumeId=302446392&resumeNumber=JM163534531R90500004000&language=1&at=275ec6d379894fc99a1f1f75ba5123ae&rt=b706093593ad4903adcf784a431b1ca3",
|
45
|
+
thumbUrl: "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1558505605980&di=c0e8334f6e11efd2504ae918a0f66f58&imgtype=0&src=http%3A%2F%2Fimgsa.baidu.com%2Fexp%2Fw%3D500%2Fsign%3D5762f68bc4177f3e1034fc0d40ce3bb9%2Fd50735fae6cd7b8918fb5ebe022442a7d9330e73.jpg",
|
46
|
+
size: 55
|
47
|
+
},
|
48
|
+
{
|
49
|
+
uid: "-6",
|
50
|
+
name: "1111.docx",
|
51
|
+
type: "done",
|
52
|
+
url: "https://i.zhaopin.com/resume/uploadextend/ResumeExport?resumeId=302446392&resumeNumber=JM163534531R90500004000&language=1&at=275ec6d379894fc99a1f1f75ba5123ae&rt=b706093593ad4903adcf784a431b1ca3",
|
53
|
+
thumbUrl: "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1558505605980&di=c0e8334f6e11efd2504ae918a0f66f58&imgtype=0&src=http%3A%2F%2Fimgsa.baidu.com%2Fexp%2Fw%3D500%2Fsign%3D5762f68bc4177f3e1034fc0d40ce3bb9%2Fd50735fae6cd7b8918fb5ebe022442a7d9330e73.jpg",
|
54
|
+
size: 55
|
55
|
+
},
|
56
|
+
{
|
57
|
+
uid: "7",
|
58
|
+
name: "1111.docx",
|
59
|
+
type: "done",
|
60
|
+
url: "https://i.zhaopin.com/resume/uploadextend/ResumeExport?resumeId=302446392&resumeNumber=JM163534531R90500004000&language=1&at=275ec6d379894fc99a1f1f75ba5123ae&rt=b706093593ad4903adcf784a431b1ca3",
|
61
|
+
thumbUrl: "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1558505605980&di=c0e8334f6e11efd2504ae918a0f66f58&imgtype=0&src=http%3A%2F%2Fimgsa.baidu.com%2Fexp%2Fw%3D500%2Fsign%3D5762f68bc4177f3e1034fc0d40ce3bb9%2Fd50735fae6cd7b8918fb5ebe022442a7d9330e73.jpg",
|
62
|
+
size: 55
|
63
|
+
},
|
64
|
+
{
|
65
|
+
uid: "8",
|
66
|
+
name: "1111.docx",
|
67
|
+
type: "done",
|
68
|
+
url: "https://i.zhaopin.com/resume/uploadextend/ResumeExport?resumeId=302446392&resumeNumber=JM163534531R90500004000&language=1&at=275ec6d379894fc99a1f1f75ba5123ae&rt=b706093593ad4903adcf784a431b1ca3",
|
69
|
+
thumbUrl: "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1558505605980&di=c0e8334f6e11efd2504ae918a0f66f58&imgtype=0&src=http%3A%2F%2Fimgsa.baidu.com%2Fexp%2Fw%3D500%2Fsign%3D5762f68bc4177f3e1034fc0d40ce3bb9%2Fd50735fae6cd7b8918fb5ebe022442a7d9330e73.jpg",
|
70
|
+
size: 55
|
71
|
+
},
|
72
|
+
{
|
73
|
+
uid: "9",
|
74
|
+
name: "1111.docx1111.docx1111.docx1111.docx",
|
75
|
+
type: "done",
|
76
|
+
url: "https://i.zhaopin.com/resume/uploadextend/ResumeExport?resumeId=302446392&resumeNumber=JM163534531R90500004000&language=1&at=275ec6d379894fc99a1f1f75ba5123ae&rt=b706093593ad4903adcf784a431b1ca3",
|
77
|
+
thumbUrl: "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1558505605980&di=c0e8334f6e11efd2504ae918a0f66f58&imgtype=0&src=http%3A%2F%2Fimgsa.baidu.com%2Fexp%2Fw%3D500%2Fsign%3D5762f68bc4177f3e1034fc0d40ce3bb9%2Fd50735fae6cd7b8918fb5ebe022442a7d9330e73.jpg",
|
78
|
+
size: 55
|
79
|
+
},
|
80
|
+
{
|
81
|
+
uid: "10",
|
82
|
+
name: "1111.docx",
|
83
|
+
type: "done",
|
84
|
+
url: "https://i.zhaopin.com/resume/uploadextend/ResumeExport?resumeId=302446392&resumeNumber=JM163534531R90500004000&language=1&at=275ec6d379894fc99a1f1f75ba5123ae&rt=b706093593ad4903adcf784a431b1ca3",
|
85
|
+
thumbUrl: "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1558505605980&di=c0e8334f6e11efd2504ae918a0f66f58&imgtype=0&src=http%3A%2F%2Fimgsa.baidu.com%2Fexp%2Fw%3D500%2Fsign%3D5762f68bc4177f3e1034fc0d40ce3bb9%2Fd50735fae6cd7b8918fb5ebe022442a7d9330e73.jpg",
|
86
|
+
size: 55
|
87
|
+
}
|
88
|
+
];
|
89
|
+
const [list, setList] = useState(fileList);
|
90
|
+
const [delShow, setDelShow] = useState(false);
|
91
|
+
// 文件确认删除
|
92
|
+
const deleteFile = (id) => {
|
93
|
+
setList(list.filter(item => item.uid !== id));
|
94
|
+
};
|
95
|
+
const { size, showHeader, onClick } = props;
|
96
|
+
return (React.createElement("div", { className: styles["document-list"], onClick: e => onClick && onClick(e) },
|
97
|
+
showHeader && (React.createElement(Row, { type: "flex", justify: "space-between", className: styles["module-header-title"] },
|
98
|
+
React.createElement("div", null, "Document"),
|
99
|
+
React.createElement("div", { onClick: () => setDelShow(!delShow) },
|
100
|
+
React.createElement(FAIcon, { icon: delShow ? faUndoAlt : faTrashAlt, className: "del-operate" })))),
|
101
|
+
React.createElement("div", { className: "file-list" },
|
102
|
+
list.map((item, index) => (React.createElement("a", { key: index, className: size === "small" ? "file-item-small" : "file-item" },
|
103
|
+
React.createElement("img", { src: item.thumbUrl, alt: "item.name" }),
|
104
|
+
React.createElement("span", { className: "document-name" }, item.name),
|
105
|
+
delShow && (React.createElement(Icon, { type: "close-circle", className: "del-file", onClick: deleteFile.bind(event, item.uid) }))))),
|
106
|
+
!delShow && size !== "small" && (React.createElement("span", { className: "file-item" },
|
107
|
+
React.createElement(FAIcon, { icon: faFilePlus })))),
|
108
|
+
!delShow && (React.createElement(Upload.Dragger, { action: "https://www.mocky.io/v2/5cc8019d300000980a055e76", listType: "picture-card", fileList: fileList, showUploadList: false, onChange: ({ fileList }) => setList(fileList) },
|
109
|
+
React.createElement("div", null, "Drag & Drop files here")))));
|
110
|
+
};
|
111
|
+
DocumentList.defaultProps = {
|
112
|
+
size: "default" || "small",
|
113
|
+
showHeader: true
|
114
|
+
};
|
115
|
+
export default DocumentList;
|
116
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/DocumentList/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAExC,OAAO,EAAE,MAAM,EAAW,IAAI,EAAU,GAAG,EAAE,MAAM,cAAc,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AACrF,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAE3E,OAAO,MAAM,MAAM,cA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I;CAChB,CAAC;AACF,eAAe,YAAY,CAAC"}
|
@@ -0,0 +1,66 @@
|
|
1
|
+
@import "~@voplus/antd/es/style/themes/default.less";
|
2
|
+
@import "../../styles/common.less";
|
3
|
+
.document-list {
|
4
|
+
:global {
|
5
|
+
.del-operate {
|
6
|
+
color: #666;
|
7
|
+
cursor: pointer;
|
8
|
+
}
|
9
|
+
.ant-upload.ant-upload-drag {
|
10
|
+
width: 80%;
|
11
|
+
margin: 10px auto;
|
12
|
+
background-color: #fff;
|
13
|
+
.ant-upload {
|
14
|
+
padding: 8px 0;
|
15
|
+
}
|
16
|
+
}
|
17
|
+
.file-list {
|
18
|
+
display: flex;
|
19
|
+
flex-wrap: wrap;
|
20
|
+
align-items: center;
|
21
|
+
padding: 10px 0;
|
22
|
+
.file-item,
|
23
|
+
.file-item-small {
|
24
|
+
position: relative;
|
25
|
+
margin: 5px;
|
26
|
+
text-align: center;
|
27
|
+
color: #666;
|
28
|
+
img {
|
29
|
+
display: block;
|
30
|
+
margin: 0 auto 5px auto;
|
31
|
+
}
|
32
|
+
.document-name {
|
33
|
+
display: block;
|
34
|
+
overflow: hidden;
|
35
|
+
white-space: nowrap;
|
36
|
+
text-overflow: ellipsis;
|
37
|
+
font-size: 12px;
|
38
|
+
}
|
39
|
+
.fa-file-plus {
|
40
|
+
font-size: 40px;
|
41
|
+
color: #999;
|
42
|
+
cursor: pointer;
|
43
|
+
}
|
44
|
+
.del-file {
|
45
|
+
position: absolute;
|
46
|
+
top: 0;
|
47
|
+
right: 0;
|
48
|
+
}
|
49
|
+
}
|
50
|
+
.file-item {
|
51
|
+
width: 80px;
|
52
|
+
img {
|
53
|
+
width: 54px;
|
54
|
+
height: 54px;
|
55
|
+
}
|
56
|
+
}
|
57
|
+
.file-item-small {
|
58
|
+
width: 60px;
|
59
|
+
img {
|
60
|
+
width: 32px;
|
61
|
+
height: 32px;
|
62
|
+
}
|
63
|
+
}
|
64
|
+
}
|
65
|
+
}
|
66
|
+
}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
declare const ListHeader: {
|
3
|
+
(props: {
|
4
|
+
onAddNewForm?: (() => void) | undefined;
|
5
|
+
onSortByFilter?: (() => void) | undefined;
|
6
|
+
sort?: boolean | undefined;
|
7
|
+
sortView?: boolean | undefined;
|
8
|
+
filterList?: boolean | undefined;
|
9
|
+
filterView?: boolean | undefined;
|
10
|
+
form?: boolean | undefined;
|
11
|
+
}): JSX.Element;
|
12
|
+
defaultProps: {
|
13
|
+
sort: boolean;
|
14
|
+
sortView: boolean;
|
15
|
+
filterList: boolean;
|
16
|
+
filterView: boolean;
|
17
|
+
form: boolean;
|
18
|
+
};
|
19
|
+
};
|
20
|
+
export default ListHeader;
|
@@ -0,0 +1,38 @@
|
|
1
|
+
import React from "react";
|
2
|
+
import { Row, Tooltip } from "@voplus/antd";
|
3
|
+
import { faPlus, faExpandArrows } from "@fortawesome/pro-light-svg-icons";
|
4
|
+
import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
|
5
|
+
import SortViewDropdown from "../../controls/SortViewDropdown";
|
6
|
+
import FilterListDropdown from "../../controls/FilterListDropdown";
|
7
|
+
import FilterViewsDropdown from "../../controls/FilterViewsDropdown";
|
8
|
+
import { useSort } from "../../data/contexts/SortContext";
|
9
|
+
import styles from "./index.less";
|
10
|
+
const ListHeader = (props) => {
|
11
|
+
const onAddNewForm = () => {
|
12
|
+
props.onAddNewForm();
|
13
|
+
};
|
14
|
+
const sortStore = useSort();
|
15
|
+
const isCanDrag = !!(sortStore && sortStore.canDrag);
|
16
|
+
const { sort, sortView, filterList, filterView, form } = props;
|
17
|
+
return (React.createElement(Row, { type: "flex", justify: "space-between", align: "middle", className: styles["list-header"] },
|
18
|
+
React.createElement("div", null, filterView && React.createElement(FilterViewsDropdown, null)),
|
19
|
+
React.createElement("div", null,
|
20
|
+
sort && (React.createElement(Tooltip, { title: isCanDrag ? "Cancel drag sort" : "Drag and drop sort" },
|
21
|
+
React.createElement("span", { onClick: () => sortStore.setCanDrag(sortStore ? !sortStore.canDrag : false) },
|
22
|
+
React.createElement(FAIcon, { icon: faExpandArrows })))),
|
23
|
+
sortView && (React.createElement("span", { className: "icon-margin" },
|
24
|
+
React.createElement(SortViewDropdown, null))),
|
25
|
+
filterList && (React.createElement("span", { className: "icon-margin" },
|
26
|
+
React.createElement(FilterListDropdown, null))),
|
27
|
+
form && (React.createElement("span", { onClick: onAddNewForm, className: "plus-icon" },
|
28
|
+
React.createElement(FAIcon, { icon: faPlus, color: "#fff" }))))));
|
29
|
+
};
|
30
|
+
ListHeader.defaultProps = {
|
31
|
+
sort: true,
|
32
|
+
sortView: true,
|
33
|
+
filterList: true,
|
34
|
+
filterView: true,
|
35
|
+
form: true
|
36
|
+
};
|
37
|
+
export default ListHeader;
|
38
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/ListHeader/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAc,cAAc,EAAE,MAAM,kCAAkC,CAAC;AACtF,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,gBAAgB,MAAM,iCAAiC,CAAC;AAC/D,OAAO,kBAAkB,MAAM,mCAAmC,CAAC;AACnE,OAAO,mBAAmB,MAAM,oCAAoC,CAAC;AAErE,OAAO,EAAE,OAAO,EAAE,MAAM,iCAAiC,CAAC;AAE1D,OAAO,MAAM,MAAM,cAAc,CAAC;AAElC,MAAM,UAAU,GAAG,CAAC,KAQnB,EAAE,EAAE;IACJ,MAAM,YAAY,GAAG,GAAG,EAAE;QACzB,KAAK,CAAC,YAAa,EAAE,CAAC;IACvB,CAAC,CAAC;IACF,MAAM,SAAS,GA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