@mohamed-karawia/library 0.1.20 → 0.1.23
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.js +27 -27
- package/dist/stories/Chat/Chat.js +24 -31
- package/dist/stories/Community/Community.js +54 -34
- package/dist/stories/Events/Event/Event.js +13 -6
- package/dist/stories/Events/EventsList/EventsList.js +14 -11
- package/dist/stories/Forms/AddPhoto/AddPhoto.js +8 -7
- package/dist/stories/Forms/CreateEvent/CreateEvent.js +115 -0
- package/dist/stories/Forms/CreateFolder/CreateFolder.js +87 -0
- package/dist/stories/Forms/CreateSong/CreateSong.js +98 -0
- package/dist/stories/Library/Folders/Folders.js +27 -21
- package/dist/stories/Library/Notes/Notes.js +29 -18
- package/dist/stories/Modals/AddPhotoAlbum/AddPhotoAlbum.js +38 -0
- package/dist/stories/Modals/AddPhotoModal/AddPhotoModal.js +40 -0
- package/dist/stories/Modals/AddSongModal/AddSongModal.js +41 -0
- package/dist/stories/Modals/AddVideoAlbumModal/AddVideoAlbumModal.js +41 -0
- package/dist/stories/Modals/AddVideoModal/AddVideoModal.js +39 -0
- package/dist/stories/Modals/ChatConfigModal/ChatContifgModal.js +93 -0
- package/dist/stories/Modals/CreateEventModal/CreateEventModal.js +42 -0
- package/dist/stories/Modals/CreateFolderModal/CreateFolderModal.js +36 -0
- package/dist/stories/Modals/CreateMusicAlbumModal/CreateMusicAlbumModal.js +41 -0
- package/dist/stories/Modals/CreateNoteModal/CreateNoteModal.js +42 -0
- package/dist/stories/Modals/EventConfigModal/EventConfigModal.js +99 -0
- package/dist/stories/Modals/EventsConfigModal/EventsConfigModal.js +87 -0
- package/dist/stories/Modals/FoldersConfigModal/FoldersConfigModal.js +87 -0
- package/dist/stories/Modals/MusicAlbumConfigModal/MusicAlbumConfigModal.js +88 -0
- package/dist/stories/Modals/MusicAlbumsConfigModal/MusicAlbumsConfigModal.js +87 -0
- package/dist/stories/Modals/NotesConfigModal/NotesConfigModal.js +87 -0
- package/dist/stories/Modals/PhotoAlbumConfigModal/PhotoAlbumConfigModal.js +88 -0
- package/dist/stories/Modals/PhotoAlbumsConfigModal/PhotoAlbumsConfigModal.js +88 -0
- package/dist/stories/Modals/ShowImgModal/ShowImgModal.js +62 -0
- package/dist/stories/Modals/VideoAlbumConfigModal/VideoAlbumConfigModal.js +88 -0
- package/dist/stories/Modals/VideoAlbumsConfigModal/VideoAlbumsConfigModal.js +89 -0
- package/dist/stories/Modals/VideoConfigModal/VideoConfigModal.js +99 -0
- package/dist/stories/Music Album/ViewAlbum/ViewAlbum.js +9 -46
- package/dist/stories/Music Album/ViewAlbums/ViewAlbums.js +57 -37
- package/dist/stories/Pages/Chat/Chat.js +1 -1
- package/dist/stories/Pages/Events/Event/Event.js +1 -1
- package/dist/stories/Pages/Events/Events/Events.js +1 -1
- package/dist/stories/Pages/Library/Folders/Library.js +2 -2
- package/dist/stories/Pages/Library/Notes/Notes.js +2 -2
- package/dist/stories/Pages/Music/MusicAlbum/Music.js +2 -2
- package/dist/stories/Pages/Music/MusicAlbums/MusicAlbums.js +2 -2
- package/dist/stories/Pages/Photos/Album/Album.js +2 -2
- package/dist/stories/Pages/Photos/Albums/Albums.js +2 -2
- package/dist/stories/Pages/Video/DetailedVideo/DetailedVideo.js +2 -2
- package/dist/stories/Pages/Video/VideoAlbum/Video.js +2 -2
- package/dist/stories/Photo Album/ViewAlbum/ViewAlbum.js +26 -16
- package/dist/stories/Photo Album/ViewAlbums/ViewAlbums.js +11 -4
- package/dist/stories/PreviewComponents/ChatPreview/ChatPreview.js +7 -5
- package/dist/stories/PreviewComponents/EventPreview/EventPreview.js +7 -5
- package/dist/stories/PreviewComponents/EventsPreview/EventsPreview.js +7 -5
- package/dist/stories/PreviewComponents/FoldersPreview/FoldersPreview.js +7 -5
- package/dist/stories/PreviewComponents/MusicAlbumPreview/MusicAlbumPreview.js +6 -4
- package/dist/stories/PreviewComponents/MusicAlbumsPreview/MusicAlbumsPreview.js +8 -7
- package/dist/stories/PreviewComponents/MusicPlayerPreview/MusicPlayerPreview.js +7 -5
- package/dist/stories/PreviewComponents/NavbarPreview/NavbarPreview.js +7 -5
- package/dist/stories/PreviewComponents/NotesPreview/NotesPreview.js +7 -5
- package/dist/stories/PreviewComponents/PhotoAlbumPreview/PhotoAlbumPreview.js +7 -5
- package/dist/stories/PreviewComponents/PhotoAlbumsPreview/PhotoAlbumsPreview.js +7 -5
- package/dist/stories/PreviewComponents/SpacesListPreview/SpacesListPreview.js +7 -5
- package/dist/stories/PreviewComponents/VideoAlbumPreview/VideoAlbumPreview.js +7 -5
- package/dist/stories/PreviewComponents/VideoAlbumsPreview/VideoAlbumsPreview.js +7 -5
- package/dist/stories/PreviewComponents/VideoPreview/VideoPreview.js +7 -5
- package/dist/stories/Reusable Components/Comments/Comments.js +58 -0
- package/dist/stories/Reusable Components/Community/Community.js +13 -36
- package/dist/stories/Reusable Components/Sections/Sections.js +67 -0
- package/dist/stories/Spaces/Chat/Chat.js +103 -0
- package/dist/stories/Spaces/EventsList/EventsList.js +140 -0
- package/dist/stories/Spaces/NotesList/NotesList.js +144 -0
- package/dist/stories/Spaces/ViewDetailedPhoto/ViewDetailedPhoto.js +24 -0
- package/dist/stories/Spaces/ViewEvent/Event.js +146 -0
- package/dist/stories/Spaces/ViewFolders/ViewFolders.js +136 -0
- package/dist/stories/Spaces/ViewMusicAlbumList/ViewMusicAlbumList.js +136 -0
- package/dist/stories/Spaces/ViewMusicAlbums/ViewMusicAlbums.js +130 -0
- package/dist/stories/Spaces/ViewNote/ViewNote.js +27 -0
- package/dist/stories/Spaces/ViewPhotoAlbumList/ViewPhotoAlbumList.js +231 -0
- package/dist/stories/Spaces/ViewPhotoAlbums/ViewPhotoAlbums.js +131 -0
- package/dist/stories/Spaces/ViewVideo/ViewVideo.js +169 -0
- package/dist/stories/Spaces/ViewVideoAlbumList/ViewVideoAlbumList.js +157 -0
- package/dist/stories/Spaces/ViewVideoAlbums/ViewVideoAlbums.js +164 -0
- package/dist/stories/VideoAlbum/AlbumsGallery/AlbumsGallery.js +11 -4
- package/dist/stories/VideoAlbum/VideoSpace/VideoSpace.js +17 -6
- package/dist/stories/VideoAlbum/ViewAlbum/ViewAlbum.js +24 -25
- package/dist/stories/Widgets/VideoPlayer/VideoPlayer.js +235 -0
- package/dist/stories/helpers/util.js +24 -24
- package/dist/stories/store/actions/actions.js +16 -0
- package/dist/stories/store/communities.js +27 -29
- package/dist/stories/store/community.js +941 -0
- package/dist/stories/store/store.js +9 -4
- package/package.json +1 -1
- package/src/index.js +16 -16
- package/src/stories/Community/Community.jsx +31 -32
- package/src/stories/Forms/AddPhoto/AddPhoto.jsx +72 -72
- package/src/stories/{Events → Forms}/CreateEvent/CreateEvent.jsx +5 -1
- package/src/stories/{Library → Forms}/CreateFolder/CreateFolder.jsx +0 -0
- package/src/stories/Forms/{AddSong/AddSong.jsx → CreateSong/CreateSong.jsx} +0 -0
- package/src/stories/Modals/AddPhotoAlbum/AddPhotoAlbum.jsx +27 -0
- package/src/stories/Modals/AddPhotoModal/AddPhotoModal.jsx +29 -0
- package/src/stories/Modals/AddSongModal/AddSongModal.jsx +37 -0
- package/src/stories/Modals/AddVideoAlbumModal/AddVideoAlbumModal.jsx +38 -0
- package/src/stories/Modals/AddVideoModal/AddVideoModal.jsx +35 -0
- package/src/stories/Modals/ChatConfigModal/ChatContifgModal.jsx +77 -0
- package/src/stories/Modals/CreateEventModal/CreateEventModal.jsx +30 -0
- package/src/stories/Modals/CreateFolderModal/CreateFolderModal.jsx +39 -0
- package/src/stories/Modals/CreateMusicAlbumModal/CreateMusicAlbumModal.jsx +37 -0
- package/src/stories/Modals/CreateNoteModal/CreateNoteModal.jsx +43 -0
- package/src/stories/Modals/EventConfigModal/EventConfigModal.jsx +74 -0
- package/src/stories/Modals/EventsConfigModal/EventsConfigModal.jsx +67 -0
- package/src/stories/Modals/FoldersConfigModal/FoldersConfigModal.jsx +66 -0
- package/src/stories/Modals/MusicAlbumConfigModal/MusicAlbumConfigModal.jsx +69 -0
- package/src/stories/Modals/MusicAlbumsConfigModal/MusicAlbumsConfigModal.jsx +73 -0
- package/src/stories/Modals/NotesConfigModal/NotesConfigModal.jsx +65 -0
- package/src/stories/Modals/PhotoAlbumConfigModal/PhotoAlbumConfigModal.jsx +71 -0
- package/src/stories/Modals/PhotoAlbumsConfigModal/PhotoAlbumsConfigModal.jsx +69 -0
- package/src/stories/Modals/ShowImgModal/ShowImgModal.jsx +87 -0
- package/src/stories/Modals/VideoAlbumConfigModal/VideoAlbumConfigModal.jsx +67 -0
- package/src/stories/Modals/VideoAlbumsConfigModal/VideoAlbumsConfigModal.jsx +67 -0
- package/src/stories/Modals/VideoConfigModal/VideoConfigModal.jsx +78 -0
- package/src/stories/Pages/Chat/Chat.jsx +1 -1
- package/src/stories/Pages/Events/Event/Event.jsx +1 -1
- package/src/stories/Pages/Events/Events/Events.jsx +1 -1
- package/src/stories/Pages/Library/Folders/Library.jsx +1 -1
- package/src/stories/Pages/Library/Notes/Notes.jsx +1 -1
- package/src/stories/Pages/Music/MusicAlbum/Music.jsx +1 -1
- package/src/stories/Pages/Music/MusicAlbums/MusicAlbums.jsx +1 -1
- package/src/stories/Pages/Photos/Album/Album.jsx +1 -1
- package/src/stories/Pages/Photos/Albums/Albums.jsx +1 -1
- package/src/stories/Pages/Video/DetailedVideo/DetailedVideo.jsx +1 -1
- package/src/stories/Pages/Video/VideoAlbum/Video.jsx +1 -1
- package/src/stories/PreviewComponents/ChatPreview/ChatPreview.jsx +106 -104
- package/src/stories/PreviewComponents/EventPreview/EventPreview.jsx +7 -5
- package/src/stories/PreviewComponents/EventsPreview/EventsPreview.jsx +106 -104
- package/src/stories/PreviewComponents/FoldersPreview/FoldersPreview.jsx +8 -6
- package/src/stories/PreviewComponents/MusicAlbumPreview/MusicAlbumPreview.jsx +6 -4
- package/src/stories/PreviewComponents/MusicAlbumsPreview/MusicAlbumsPreview.jsx +13 -11
- package/src/stories/PreviewComponents/MusicPlayerPreview/MusicPlayerPreview.jsx +36 -34
- package/src/stories/PreviewComponents/NavbarPreview/NavbarPreview.jsx +18 -16
- package/src/stories/PreviewComponents/NotesPreview/NotesPreview.jsx +7 -5
- package/src/stories/PreviewComponents/PhotoAlbumPreview/PhotoAlbumPreview.jsx +105 -103
- package/src/stories/PreviewComponents/PhotoAlbumsPreview/PhotoAlbumsPreview.jsx +8 -6
- package/src/stories/PreviewComponents/SpacesListPreview/SpacesListPreview.jsx +10 -8
- package/src/stories/PreviewComponents/VideoAlbumPreview/VideoAlbumPreview.jsx +7 -5
- package/src/stories/PreviewComponents/VideoAlbumsPreview/VideoAlbumsPreview.jsx +7 -5
- package/src/stories/PreviewComponents/VideoPreview/VideoPreview.jsx +7 -5
- package/src/stories/{VideoAlbum → Reusable Components}/Comments/Comments.jsx +0 -0
- package/src/stories/Reusable Components/Community/Community.jsx +10 -33
- package/src/stories/{Sections/Sections.jsx → Reusable Components/Sections/Sections.jsx } +1 -1
- package/src/stories/Spaces/Chat/Chat.jsx +77 -0
- package/src/stories/Spaces/EventsList/EventsList.jsx +118 -0
- package/src/stories/Spaces/NotesList/NotesList.jsx +125 -0
- package/src/stories/{Photo Album/DetailedPhoto/DetailedPhoto.jsx → Spaces/ViewDetailedPhoto/ViewDetailedPhoto.jsx} +1 -1
- package/src/stories/{Events/Event → Spaces/ViewEvent}/Event.jsx +17 -73
- package/src/stories/Spaces/ViewFolders/ViewFolders.jsx +122 -0
- package/src/stories/Spaces/ViewMusicAlbumList/ViewMusicAlbumList.jsx +118 -0
- package/src/stories/Spaces/ViewMusicAlbums/ViewMusicAlbums.jsx +108 -0
- package/src/stories/{Library → Spaces}/ViewNote/ViewNote.jsx +0 -0
- package/src/stories/{Photo Album/ViewAlbum/ViewAlbum.jsx → Spaces/ViewPhotoAlbumList/ViewPhotoAlbumList.jsx} +48 -134
- package/src/stories/{Photo Album/ViewAlbums/ViewAlbums.jsx → Spaces/ViewPhotoAlbums/ViewPhotoAlbums.jsx} +22 -54
- package/src/stories/{VideoAlbum/VideoSpace/VideoSpace.jsx → Spaces/ViewVideo/ViewVideo.jsx} +21 -47
- package/src/stories/{VideoAlbum/ViewAlbum/ViewAlbum.jsx → Spaces/ViewVideoAlbumList/ViewVideoAlbumList.jsx} +31 -78
- package/src/stories/{VideoAlbum/AlbumsGallery/AlbumsGallery.jsx → Spaces/ViewVideoAlbums/ViewVideoAlbums.jsx} +20 -51
- package/src/stories/{VideoAlbum → Widgets}/VideoPlayer/VideoPlayer.jsx +0 -0
- package/src/stories/helpers/util.js +13 -13
- package/src/stories/store/actions/actions.js +7 -0
- package/src/stories/store/{communities.js → community.js} +27 -29
- package/src/stories/store/store.js +3 -4
- package/src/stories/Chat/Chat.jsx +0 -148
- package/src/stories/Events/EventsList/EventsList.jsx +0 -180
- package/src/stories/Library/Folders/Folders.jsx +0 -187
- package/src/stories/Library/Notes/Notes.jsx +0 -161
- package/src/stories/Music Album/ViewAlbum/ViewAlbum.jsx +0 -216
- package/src/stories/Music Album/ViewAlbums/ViewAlbums.jsx +0 -152
@@ -11,15 +11,20 @@ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers
|
|
11
11
|
|
12
12
|
var _toolkit = require("@reduxjs/toolkit");
|
13
13
|
|
14
|
-
var
|
14
|
+
var _community = require("./community");
|
15
|
+
|
16
|
+
var actions = _interopRequireWildcard(require("./actions/actions.js"));
|
17
|
+
|
18
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
19
|
+
|
20
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
15
21
|
|
16
22
|
var Community = (0, _toolkit.createSlice)({
|
17
23
|
name: 'community',
|
18
|
-
initialState:
|
24
|
+
initialState: _community.community,
|
19
25
|
reducers: {
|
20
26
|
addEvent: function addEvent(state, action) {
|
21
|
-
state.spaces[1].spaceProps.events = [].concat((0, _toConsumableArray2.default)(state.spaces[1].spaceProps.events), [action.payload]); //
|
22
|
-
// alert
|
27
|
+
state.spaces[1].spaceProps.events = [].concat((0, _toConsumableArray2.default)(state.spaces[1].spaceProps.events), [action.payload]); // alert('tseteattet')
|
23
28
|
|
24
29
|
console.log(action);
|
25
30
|
},
|
package/package.json
CHANGED
package/src/index.js
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
// Chat
|
2
|
-
import Chat from './stories/Chat/Chat';
|
2
|
+
import Chat from './stories/Spaces/Chat/Chat';
|
3
3
|
// Enrollment
|
4
4
|
import CreateEnrollmentForm from './stories/Enrollment/Admin/CreateForm/CreateForm';
|
5
5
|
import DetailedEnrollmentForm from './stories/Enrollment/Admin/DetailedForm/DetailedForm';
|
6
6
|
import ViewEnrollmentForms from './stories/Enrollment/Admin/ViewForms/ViewForms';
|
7
7
|
import FillEnrollmentForm from './stories/Enrollment/Guest/FillForm/FillForm';
|
8
8
|
// Events
|
9
|
-
import CreateEvent from './stories/
|
10
|
-
import Event from './stories/
|
11
|
-
import EventsList from './stories/
|
9
|
+
import CreateEvent from './stories/Forms/CreateEvent/CreateEvent';
|
10
|
+
import Event from './stories/Spaces/ViewEvent/ViewEvent';
|
11
|
+
import EventsList from './stories/Spaces/EventsList/EventsList';
|
12
12
|
// Library
|
13
|
-
import CreateLibraryFolder from './stories/
|
14
|
-
import LibraryFolders from './stories/
|
15
|
-
import LibraryNotes from './stories/
|
16
|
-
import ViewLibraryNote from './stories/
|
13
|
+
import CreateLibraryFolder from './stories/Forms/CreateFolder/CreateFolder';
|
14
|
+
import LibraryFolders from './stories/Spaces/ViewFolders/ViewFolders';
|
15
|
+
import LibraryNotes from './stories/Spaces/NotesList/NotesList';
|
16
|
+
import ViewLibraryNote from './stories/Spaces/ViewNote/ViewNote';
|
17
17
|
// Music
|
18
|
-
import CreateMusic from './stories/Forms/
|
18
|
+
import CreateMusic from './stories/Forms/CreateSong/CreateSong';
|
19
19
|
import CreateMusicAlbum from './stories/Forms/CreateMusicAlbum/CreateMusicAlbum';
|
20
|
-
import MusicAlbum from './stories/
|
21
|
-
import MusicAlbums from './stories/
|
20
|
+
import MusicAlbum from './stories/Spaces/ViewMusicAlbumList/ViewMusicAlbumList';
|
21
|
+
import MusicAlbums from './stories/Spaces/ViewMusicAlbums/ViewMusicAlbums';
|
22
22
|
// Photos
|
23
23
|
import CreatePhotoAlbum from './stories/Forms/CreateAlbum/CreateAlbum';
|
24
24
|
import CreatePhoto from './stories/Forms/AddPhoto/AddPhoto';
|
25
|
-
import PhotoAlbum from './stories/
|
26
|
-
import PhotoAlbums from './stories/
|
25
|
+
import PhotoAlbum from './stories/Spaces/ViewPhotoAlbumList/ViewPhotoAlbumList';
|
26
|
+
import PhotoAlbums from './stories/Spaces/ViewPhotoAlbums/ViewPhotoAlbums';
|
27
27
|
// Layout
|
28
28
|
import BaseMaterial from './stories/Containers/BaseMaterial';
|
29
29
|
import Body from './stories/Layout/Body/Body';
|
@@ -42,9 +42,9 @@ import WidgetContainer from './stories/Reusable Components/WidgetContainer/Widge
|
|
42
42
|
// Video
|
43
43
|
import CreateVideoAlbum from './stories/Forms/CreateVideoAlbum/CreateVideoAlbum';
|
44
44
|
import CreateVideo from './stories/Forms/AddVideo/AddVideo';
|
45
|
-
import VideoAlbums from './stories/
|
46
|
-
import VidepSpace from './stories/
|
47
|
-
import VideoAlbum from './stories/
|
45
|
+
import VideoAlbums from './stories/Spaces/ViewVideoAlbums/ViewVideoAlbums';
|
46
|
+
import VidepSpace from './stories/Spaces/ViewVideo/ViewVideo';
|
47
|
+
import VideoAlbum from './stories/Spaces/ViewVideoAlbumList/ViewVideoAlbumList';
|
48
48
|
/****************Exports****************** */
|
49
49
|
//Chat
|
50
50
|
export { Chat };
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React, { useState, useEffect, useCallback } from 'react';
|
2
2
|
import styled from 'styled-components';
|
3
|
-
import {
|
4
|
-
import
|
3
|
+
import { useSelector } from 'react-redux';
|
4
|
+
import * as actions from '../store/store';
|
5
5
|
|
6
6
|
import Navbar from '../Navbar/Navbar'
|
7
7
|
import Body from '../Layout/Body/Body'
|
@@ -11,18 +11,18 @@ import Right from '../Layout/Right/Right'
|
|
11
11
|
import BaseMaterial from '../Containers/BaseMaterial';
|
12
12
|
import WidgetContainer from "../Reusable Components/WidgetContainer/WidgetContainer";
|
13
13
|
|
14
|
-
import Chat from '../Chat/Chat';
|
15
|
-
import Event from '../
|
16
|
-
import EventsList from '../
|
17
|
-
import Folders from '../
|
18
|
-
import Notes from '../
|
19
|
-
import MusicAlbum from '../
|
20
|
-
import MusicAlbums from '../
|
21
|
-
import PhotoAlbum from '../
|
22
|
-
import PhotoAlbums from '../
|
23
|
-
import VideoAlbums from '../
|
24
|
-
import VideoAlbum from '../
|
25
|
-
import VideoSpace from '../
|
14
|
+
import Chat from '../Spaces/Chat/Chat';
|
15
|
+
import Event from '../Spaces/ViewEvent/Event';
|
16
|
+
import EventsList from '../Spaces/EventsList/EventsList';
|
17
|
+
import Folders from '../Spaces/ViewFolders/ViewFolders';
|
18
|
+
import Notes from '../Spaces/NotesList/NotesList';
|
19
|
+
import MusicAlbum from '../Spaces/ViewMusicAlbumList/ViewMusicAlbumList';
|
20
|
+
import MusicAlbums from '../Spaces/ViewMusicAlbums/ViewMusicAlbums';
|
21
|
+
import PhotoAlbum from '../Spaces/ViewPhotoAlbumList/ViewPhotoAlbumList';
|
22
|
+
import PhotoAlbums from '../Spaces/ViewPhotoAlbums/ViewPhotoAlbums';
|
23
|
+
import VideoAlbums from '../Spaces/ViewVideoAlbums/ViewVideoAlbums';
|
24
|
+
import VideoAlbum from '../Spaces/ViewVideoAlbumList/ViewVideoAlbumList';
|
25
|
+
import VideoSpace from '../Spaces/ViewVideo/ViewVideo';
|
26
26
|
|
27
27
|
const Community = (props) => {
|
28
28
|
const [spaceType, setSpaceType] = useState('chat');
|
@@ -31,18 +31,18 @@ const Community = (props) => {
|
|
31
31
|
return state.communities.spaces.find(x => x.spaceType === spaceType)
|
32
32
|
})
|
33
33
|
const spacesWidget = useSelector(state => state.communities.spacesListWidget.widgetSpacesList)
|
34
|
-
const dispatch = useDispatch();
|
34
|
+
// const dispatch = useDispatch();
|
35
35
|
|
36
36
|
const onAddEvent = (event) => {
|
37
|
-
dispatch(addEvent(event))
|
37
|
+
// dispatch(actions.addEvent(event))
|
38
38
|
}
|
39
39
|
|
40
|
-
console.log(
|
40
|
+
// console.log(community)
|
41
41
|
|
42
42
|
const eventIconClicked = (action, index) => {
|
43
43
|
switch (action) {
|
44
44
|
case 'delete':
|
45
|
-
dispatch(
|
45
|
+
// dispatch(actions.addEvent)
|
46
46
|
break;
|
47
47
|
|
48
48
|
default:
|
@@ -66,26 +66,25 @@ const Community = (props) => {
|
|
66
66
|
listTitle: spacesWidget.listTitle,
|
67
67
|
spaces: spacesWidget.spaces,
|
68
68
|
cardClicked: switchSpace,
|
69
|
-
|
70
|
-
...spacesWidget.styles.body
|
69
|
+
...spacesWidget.styles
|
71
70
|
}}
|
72
71
|
/>
|
73
72
|
</Left>
|
74
73
|
<Center>
|
75
74
|
{
|
76
75
|
{
|
77
|
-
'chat': <Chat {...space.spaceProps} {...space.styles} />,
|
78
|
-
'event': <Event {...space.spaceProps} {...space.styles} />,
|
79
|
-
'events_list': <EventsList cardIconClicked={eventIconClicked} onAddEvent={onAddEvent} {...space.spaceProps} {...space.styles} />,
|
80
|
-
'folders': <Folders {...space.spaceProps} {...space.styles} />,
|
81
|
-
'notes': <Notes {...space.spaceProps} {...space.styles} />,
|
82
|
-
'music_album': <MusicAlbum {...space.spaceProps} {...space.styles} />,
|
83
|
-
'music_albums': <MusicAlbums {...space.spaceProps} {...space.styles} />,
|
84
|
-
'photo_album': <PhotoAlbum {...space.spaceProps} {...space.styles}/>,
|
85
|
-
'photo_albums': <PhotoAlbums {...space.spaceProps} {...space.styles}/>,
|
86
|
-
'video_albums': <VideoAlbums {...space.spaceProps} {...space.styles}/>,
|
87
|
-
'video_album': <VideoAlbum
|
88
|
-
'video_space': <VideoSpace {...space.spaceProps} {...space.styles}/>
|
76
|
+
'chat': <Chat community={community} {...space.spaceProps} {...space.styles} />,
|
77
|
+
'event': <Event community={community} {...space.spaceProps} {...space.styles} />,
|
78
|
+
'events_list': <EventsList actions={actions} community={community} cardIconClicked={eventIconClicked} onAddEvent={onAddEvent} {...space.spaceProps} {...space.styles} />,
|
79
|
+
'folders': <Folders community={community} {...space.spaceProps} {...space.styles} />,
|
80
|
+
'notes': <Notes community={community} {...space.spaceProps} {...space.styles} />,
|
81
|
+
'music_album': <MusicAlbum community={community} {...space.spaceProps} {...space.styles} />,
|
82
|
+
'music_albums': <MusicAlbums community={community} {...space.spaceProps} {...space.styles} />,
|
83
|
+
'photo_album': <PhotoAlbum community={community} {...space.spaceProps} {...space.styles}/>,
|
84
|
+
'photo_albums': <PhotoAlbums community={community} {...space.spaceProps} {...space.styles}/>,
|
85
|
+
'video_albums': <VideoAlbums community={community} {...space.spaceProps} {...space.styles}/>,
|
86
|
+
'video_album': <VideoAlbum community={community} {...space.spaceProps} {...space.styles}/>,
|
87
|
+
'video_space': <VideoSpace community={community} {...space.spaceProps} {...space.styles}/>
|
89
88
|
|
90
89
|
}[spaceType]
|
91
90
|
}
|
@@ -1,85 +1,85 @@
|
|
1
|
-
import React from
|
2
|
-
import PropTypes from
|
3
|
-
import * as Yup from
|
4
|
-
import styled from
|
1
|
+
import React from "react";
|
2
|
+
import PropTypes from "prop-types";
|
3
|
+
import * as Yup from "yup";
|
4
|
+
import styled from "styled-components";
|
5
5
|
|
6
|
-
import ReusableForm from
|
7
|
-
import TextField from
|
8
|
-
import CustomDropZone from
|
9
|
-
import CustomTextarea from
|
6
|
+
import ReusableForm from "../../Reusable Components/ReusableForm/ReusableForm";
|
7
|
+
import TextField from "../../Common Inputs/TextField/TextField";
|
8
|
+
import CustomDropZone from "../../Common Inputs/CustomDropzone/CustomDropZone";
|
9
|
+
import CustomTextarea from "../../Common Inputs/CustomTextarea/CustomTextarea";
|
10
10
|
|
11
|
-
const AddPhoto = ({saveBtnText, cancelBtnText, ...props}) => {
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
11
|
+
const AddPhoto = ({ saveBtnText, cancelBtnText, ...props }) => {
|
12
|
+
const initialValues = {
|
13
|
+
img: null,
|
14
|
+
title: "",
|
15
|
+
description: "",
|
16
|
+
};
|
17
17
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
18
|
+
const formSchema = Yup.object().shape({
|
19
|
+
title: Yup.string().required("Your photo must have a title"),
|
20
|
+
description: Yup.string().required(
|
21
|
+
"You must also have a description for your photo!"
|
22
|
+
),
|
23
|
+
});
|
22
24
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
25
|
+
const sections = [
|
26
|
+
{
|
27
|
+
title: "Upload Photo",
|
28
|
+
body: [
|
29
|
+
<CustomDropZone label="Image" name="cover" />,
|
30
|
+
<TextField label="Title" name="title" />,
|
31
|
+
<CustomTextarea label="Description" name="description" />,
|
32
|
+
],
|
33
|
+
hideTitle: true,
|
34
|
+
},
|
35
|
+
];
|
34
36
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
37
|
+
const onCreate = (values) => {
|
38
|
+
const photo = { ...values };
|
39
|
+
const date = new Date();
|
40
|
+
photo.date = date.toISOString().split("T")[0];
|
41
|
+
props.saveHandler(photo);
|
42
|
+
};
|
41
43
|
|
42
|
-
|
43
|
-
|
44
|
-
|
44
|
+
const cancelHandler = () => {
|
45
|
+
props.cancelHandler();
|
46
|
+
};
|
45
47
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
}
|
48
|
+
return (
|
49
|
+
<Container>
|
50
|
+
<ReusableForm
|
51
|
+
formTitle="Add Photo"
|
52
|
+
initialValues={initialValues}
|
53
|
+
formSchema={formSchema}
|
54
|
+
sections={sections}
|
55
|
+
headerStyles={props.headerStyles}
|
56
|
+
saveBtnText={saveBtnText}
|
57
|
+
cancelBtnText={cancelBtnText}
|
58
|
+
saveHandler={onCreate}
|
59
|
+
cancelHandler={cancelHandler}
|
60
|
+
headerStyles={{
|
61
|
+
padding: 10,
|
62
|
+
headerBackground: "black",
|
63
|
+
titleColor: "#ffff",
|
64
|
+
}}
|
65
|
+
sectionPadding={10}
|
66
|
+
bodyRowGap={10}
|
67
|
+
{...props.formStyles}
|
68
|
+
/>
|
69
|
+
</Container>
|
70
|
+
);
|
71
|
+
};
|
70
72
|
|
71
|
-
const Container = styled.div
|
72
|
-
|
73
|
-
`
|
73
|
+
const Container = styled.div``;
|
74
74
|
|
75
75
|
AddPhoto.defaultProps = {};
|
76
76
|
|
77
77
|
AddPhoto.propTypes = {
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
}
|
78
|
+
saveHandler: PropTypes.func,
|
79
|
+
cancelHandler: PropTypes.func,
|
80
|
+
saveBtnText: PropTypes.string,
|
81
|
+
cancelBtnText: PropTypes.string,
|
82
|
+
formStyles: PropTypes.object,
|
83
|
+
};
|
84
84
|
|
85
|
-
export default AddPhoto
|
85
|
+
export default AddPhoto;
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
3
3
|
import * as Yup from 'yup';
|
4
4
|
import styled from 'styled-components';
|
5
|
+
import { useDispatch } from 'react-redux';
|
5
6
|
|
6
7
|
import ReusableForm from '../../Reusable Components/ReusableForm/ReusableForm';
|
7
8
|
import TextField from '../../Common Inputs/TextField/TextField';
|
@@ -13,8 +14,10 @@ import CustomTextarea from '../../Common Inputs/CustomTextarea/CustomTextarea';
|
|
13
14
|
const CreateEvent = ({
|
14
15
|
saveBtnText,
|
15
16
|
cancelBtnText,
|
17
|
+
actions,
|
16
18
|
...props
|
17
19
|
}) => {
|
20
|
+
const dispatch = useDispatch();
|
18
21
|
|
19
22
|
const initialValues = {
|
20
23
|
cover: null,
|
@@ -51,7 +54,8 @@ const CreateEvent = ({
|
|
51
54
|
title: values.name,
|
52
55
|
date: `${values.date.startDate._d.toISOString().split('T')[0]} : ${values.date.endDate._d.toISOString().split('T')[0]}`
|
53
56
|
}
|
54
|
-
|
57
|
+
dispatch(actions.addEvent(event))
|
58
|
+
props.cancelHandler()
|
55
59
|
}
|
56
60
|
|
57
61
|
const cancelHandler = () => {
|
File without changes
|
File without changes
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import PropTypes from 'prop-types';
|
3
|
+
|
4
|
+
import CreateAlbum from '../../Forms/CreateAlbum/CreateAlbum';
|
5
|
+
import Modal from '../../Reusable Components/ReactModal/ReactModal';
|
6
|
+
|
7
|
+
const AddPhotoAlbum = ({
|
8
|
+
showModal,
|
9
|
+
onAddAlbum,
|
10
|
+
closeModal,
|
11
|
+
...props
|
12
|
+
}) => {
|
13
|
+
return (
|
14
|
+
<Modal
|
15
|
+
modalIsOpen={showModal}
|
16
|
+
closeModal={closeModal}
|
17
|
+
exitModalButton={(e) => (
|
18
|
+
<div></div>
|
19
|
+
)}>
|
20
|
+
<CreateAlbum
|
21
|
+
saveHandler={onAddAlbum}
|
22
|
+
cancelHandler={closeModal} />
|
23
|
+
</Modal>
|
24
|
+
)
|
25
|
+
}
|
26
|
+
|
27
|
+
export default AddPhotoAlbum
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import PropTypes from 'prop-types';
|
3
|
+
|
4
|
+
import Modal from '../../Reusable Components/ReactModal/ReactModal';
|
5
|
+
import AddPhoto from '../../Forms/AddPhoto/AddPhoto'
|
6
|
+
|
7
|
+
const AddPhotoModal = ({
|
8
|
+
showModal,
|
9
|
+
onAddPhoto,
|
10
|
+
closeModal,
|
11
|
+
...props
|
12
|
+
}) => {
|
13
|
+
return (
|
14
|
+
<Modal
|
15
|
+
modalIsOpen={showModal}
|
16
|
+
closeModal={closeModal}
|
17
|
+
exitModalButton={(e) => (
|
18
|
+
<div></div>
|
19
|
+
)}>
|
20
|
+
<AddPhoto
|
21
|
+
saveHandler={onAddPhoto}
|
22
|
+
cancelHandler={closeModal}
|
23
|
+
saveBtnText={props.saveBtnText || 'Add'}
|
24
|
+
cancelBtnText={props.cancelBtnText || 'Cancel'} />
|
25
|
+
</Modal>
|
26
|
+
)
|
27
|
+
}
|
28
|
+
|
29
|
+
export default AddPhotoModal
|
@@ -0,0 +1,37 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import PropTypes from 'prop-types';
|
3
|
+
|
4
|
+
import Modal from '../../Reusable Components/ReactModal/ReactModal';
|
5
|
+
import AddSong from '../../Forms/CreateSong/CreateSong';
|
6
|
+
|
7
|
+
const AddSongModal = ({
|
8
|
+
showModal,
|
9
|
+
closeModal,
|
10
|
+
onAddSong,
|
11
|
+
...props
|
12
|
+
}) => {
|
13
|
+
return (
|
14
|
+
<Modal
|
15
|
+
modalIsOpen={showModal}
|
16
|
+
closeModal={closeModal}
|
17
|
+
exitModalButton={(e) => (
|
18
|
+
<div></div>
|
19
|
+
)}>
|
20
|
+
<AddSong
|
21
|
+
saveHandler={onAddSong}
|
22
|
+
cancelHandler={closeModal}
|
23
|
+
saveBtnText={props.saveBtnText || "Create"}
|
24
|
+
cancelBtnText={props.cancelBtnText || "Cancel"} />
|
25
|
+
</Modal>
|
26
|
+
)
|
27
|
+
}
|
28
|
+
|
29
|
+
AddSongModal.defaultProps = {};
|
30
|
+
|
31
|
+
AddSongModal.propTypes = {
|
32
|
+
showModal: PropTypes.bool,
|
33
|
+
closeModal: PropTypes.func,
|
34
|
+
onAddSong: PropTypes.func,
|
35
|
+
}
|
36
|
+
|
37
|
+
export default AddSongModal
|
@@ -0,0 +1,38 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import PropTypes from 'prop-types';
|
3
|
+
|
4
|
+
import Modal from '../../Reusable Components/ReactModal/ReactModal';
|
5
|
+
import CreateVideoAlbum from '../../Forms/CreateVideoAlbum/CreateVideoAlbum';
|
6
|
+
|
7
|
+
const AddVideoAlbumModal = ({
|
8
|
+
showModal,
|
9
|
+
onAddAlbum,
|
10
|
+
closeModal,
|
11
|
+
...props
|
12
|
+
}) => {
|
13
|
+
return (
|
14
|
+
<Modal
|
15
|
+
modalIsOpen={showModal}
|
16
|
+
closeModal={closeModal}
|
17
|
+
exitModalButton={(e) => (
|
18
|
+
<div></div>
|
19
|
+
)}>
|
20
|
+
<CreateVideoAlbum
|
21
|
+
saveHandler={onAddAlbum}
|
22
|
+
cancelHandler={closeModal}
|
23
|
+
saveBtnText='Create'
|
24
|
+
cancelBtnText='Cancel'
|
25
|
+
/>
|
26
|
+
</Modal>
|
27
|
+
)
|
28
|
+
}
|
29
|
+
|
30
|
+
AddVideoAlbumModal.defaultProps = {};
|
31
|
+
|
32
|
+
AddVideoAlbumModal.propTypes = {
|
33
|
+
showModal: PropTypes.bool,
|
34
|
+
onAddAlbum: PropTypes.func,
|
35
|
+
closeModal: PropTypes.func,
|
36
|
+
};
|
37
|
+
|
38
|
+
export default AddVideoAlbumModal
|
@@ -0,0 +1,35 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import PropTypes from 'prop-types';
|
3
|
+
|
4
|
+
import Modal from '../../Reusable Components/ReactModal/ReactModal';
|
5
|
+
import AddVideo from '../../Forms/AddVideo/AddVideo';
|
6
|
+
|
7
|
+
const AddVideoModal = ({
|
8
|
+
showModal,
|
9
|
+
onAddVideo,
|
10
|
+
closeModal,
|
11
|
+
...props
|
12
|
+
}) => {
|
13
|
+
return (
|
14
|
+
<Modal
|
15
|
+
modalIsOpen={showModal}
|
16
|
+
closeModal={closeModal}
|
17
|
+
exitModalButton={(e) => (
|
18
|
+
<div></div>
|
19
|
+
)}>
|
20
|
+
<AddVideo
|
21
|
+
saveHandler={onAddVideo}
|
22
|
+
cancelHandler={closeModal} />
|
23
|
+
</Modal>
|
24
|
+
)
|
25
|
+
}
|
26
|
+
|
27
|
+
AddVideoModal.defaultProps = {};
|
28
|
+
|
29
|
+
AddVideoModal.propTypes = {
|
30
|
+
showModal: PropTypes.bool,
|
31
|
+
onAddVideo: PropTypes.func,
|
32
|
+
closeModal: PropTypes.func,
|
33
|
+
};
|
34
|
+
|
35
|
+
export default AddVideoModal;
|
@@ -0,0 +1,77 @@
|
|
1
|
+
import React, { useState } from 'react';
|
2
|
+
import PropTypes from 'prop-types';
|
3
|
+
|
4
|
+
import Chat from '../../Spaces/Chat/Chat';
|
5
|
+
import ChatPreview from "../../PreviewComponents/ChatPreview/ChatPreview";
|
6
|
+
import Modal from "../../Reusable Components/ReactModal/ReactModal";
|
7
|
+
import Community from "../../Reusable Components/Community/Community";
|
8
|
+
import Tabs from "../../Reusable Components/Tabs/Tabs";
|
9
|
+
|
10
|
+
const ChatContifgModal = ({
|
11
|
+
showConfigModal,
|
12
|
+
cancelConfig,
|
13
|
+
data,
|
14
|
+
users,
|
15
|
+
community,
|
16
|
+
...props
|
17
|
+
}) => {
|
18
|
+
const [centerContext, setCenterContext] = useState(
|
19
|
+
<Chat preview={true} users={users} data={data} />
|
20
|
+
);
|
21
|
+
|
22
|
+
const formChanged = (values) => {
|
23
|
+
setCenterContext(
|
24
|
+
<Chat preview={true} users={users} data={data} {...values} />
|
25
|
+
);
|
26
|
+
};
|
27
|
+
|
28
|
+
let tabs = [
|
29
|
+
{
|
30
|
+
title: "New",
|
31
|
+
id: "preview",
|
32
|
+
},
|
33
|
+
{
|
34
|
+
title: "Context",
|
35
|
+
id: "community",
|
36
|
+
},
|
37
|
+
];
|
38
|
+
|
39
|
+
return (
|
40
|
+
<Modal
|
41
|
+
modalIsOpen={showConfigModal}
|
42
|
+
closeModal={cancelConfig}
|
43
|
+
exitModalButton={(e) => <div></div>}
|
44
|
+
preview={true}
|
45
|
+
>
|
46
|
+
<Tabs title="Chat Config" tabs={tabs} id="styling">
|
47
|
+
<ChatPreview
|
48
|
+
componentProps={{
|
49
|
+
data,
|
50
|
+
users,
|
51
|
+
title: props.title || "Chat",
|
52
|
+
preview: true,
|
53
|
+
}}
|
54
|
+
formChanged={formChanged}
|
55
|
+
id="preview"
|
56
|
+
/>
|
57
|
+
<Community
|
58
|
+
center={centerContext}
|
59
|
+
community={community}
|
60
|
+
id="community"
|
61
|
+
/>
|
62
|
+
</Tabs>
|
63
|
+
</Modal>
|
64
|
+
)
|
65
|
+
}
|
66
|
+
|
67
|
+
ChatContifgModal.defaultProps = {};
|
68
|
+
|
69
|
+
ChatContifgModal.propTypes = {
|
70
|
+
showConfigModal: PropTypes.bool,
|
71
|
+
cancelConfig: PropTypes.func,
|
72
|
+
data: PropTypes.array,
|
73
|
+
users: PropTypes.array,
|
74
|
+
community: PropTypes.object,
|
75
|
+
}
|
76
|
+
|
77
|
+
export default ChatContifgModal
|