@mohamed-karawia/library 0.1.21 → 0.1.24

Sign up to get free protection for your applications and to get access to all the features.
Files changed (172) hide show
  1. package/dist/index.js +26 -26
  2. package/dist/stories/Chat/Chat.js +24 -31
  3. package/dist/stories/Community/Community.js +54 -34
  4. package/dist/stories/Events/Event/Event.js +12 -4
  5. package/dist/stories/Events/EventsList/EventsList.js +14 -7
  6. package/dist/stories/Forms/AddPhoto/AddPhoto.js +8 -7
  7. package/dist/stories/Forms/CreateEvent/CreateEvent.js +115 -0
  8. package/dist/stories/Forms/CreateFolder/CreateFolder.js +87 -0
  9. package/dist/stories/Forms/CreateSong/CreateSong.js +98 -0
  10. package/dist/stories/Library/Folders/Folders.js +27 -17
  11. package/dist/stories/Library/Notes/Notes.js +29 -18
  12. package/dist/stories/Modals/AddPhotoAlbum/AddPhotoAlbum.js +38 -0
  13. package/dist/stories/Modals/AddPhotoModal/AddPhotoModal.js +40 -0
  14. package/dist/stories/Modals/AddSongModal/AddSongModal.js +41 -0
  15. package/dist/stories/Modals/AddVideoAlbumModal/AddVideoAlbumModal.js +41 -0
  16. package/dist/stories/Modals/AddVideoModal/AddVideoModal.js +39 -0
  17. package/dist/stories/Modals/ChatConfigModal/ChatContifgModal.js +93 -0
  18. package/dist/stories/Modals/CreateEventModal/CreateEventModal.js +42 -0
  19. package/dist/stories/Modals/CreateFolderModal/CreateFolderModal.js +36 -0
  20. package/dist/stories/Modals/CreateMusicAlbumModal/CreateMusicAlbumModal.js +41 -0
  21. package/dist/stories/Modals/CreateNoteModal/CreateNoteModal.js +42 -0
  22. package/dist/stories/Modals/EventConfigModal/EventConfigModal.js +99 -0
  23. package/dist/stories/Modals/EventsConfigModal/EventsConfigModal.js +87 -0
  24. package/dist/stories/Modals/FoldersConfigModal/FoldersConfigModal.js +87 -0
  25. package/dist/stories/Modals/MusicAlbumConfigModal/MusicAlbumConfigModal.js +88 -0
  26. package/dist/stories/Modals/MusicAlbumsConfigModal/MusicAlbumsConfigModal.js +87 -0
  27. package/dist/stories/Modals/NotesConfigModal/NotesConfigModal.js +87 -0
  28. package/dist/stories/Modals/PhotoAlbumConfigModal/PhotoAlbumConfigModal.js +88 -0
  29. package/dist/stories/Modals/PhotoAlbumsConfigModal/PhotoAlbumsConfigModal.js +88 -0
  30. package/dist/stories/Modals/ShowImgModal/ShowImgModal.js +62 -0
  31. package/dist/stories/Modals/VideoAlbumConfigModal/VideoAlbumConfigModal.js +88 -0
  32. package/dist/stories/Modals/VideoAlbumsConfigModal/VideoAlbumsConfigModal.js +89 -0
  33. package/dist/stories/Modals/VideoConfigModal/VideoConfigModal.js +99 -0
  34. package/dist/stories/Music Album/ViewAlbum/ViewAlbum.js +8 -44
  35. package/dist/stories/Music Album/ViewAlbums/ViewAlbums.js +57 -37
  36. package/dist/stories/Pages/Chat/Chat.js +1 -1
  37. package/dist/stories/Pages/Events/Event/Event.js +1 -1
  38. package/dist/stories/Pages/Events/Events/Events.js +1 -1
  39. package/dist/stories/Pages/Library/Folders/Library.js +2 -2
  40. package/dist/stories/Pages/Library/Notes/Notes.js +2 -2
  41. package/dist/stories/Pages/Music/MusicAlbum/Music.js +2 -2
  42. package/dist/stories/Pages/Music/MusicAlbums/MusicAlbums.js +2 -2
  43. package/dist/stories/Pages/Photos/Album/Album.js +2 -2
  44. package/dist/stories/Pages/Photos/Albums/Albums.js +2 -2
  45. package/dist/stories/Pages/Video/DetailedVideo/DetailedVideo.js +2 -2
  46. package/dist/stories/Pages/Video/VideoAlbum/Video.js +2 -2
  47. package/dist/stories/Photo Album/ViewAlbum/ViewAlbum.js +26 -16
  48. package/dist/stories/Photo Album/ViewAlbums/ViewAlbums.js +11 -4
  49. package/dist/stories/PreviewComponents/ChatPreview/ChatPreview.js +7 -5
  50. package/dist/stories/PreviewComponents/EventPreview/EventPreview.js +7 -5
  51. package/dist/stories/PreviewComponents/EventsPreview/EventsPreview.js +7 -5
  52. package/dist/stories/PreviewComponents/FoldersPreview/FoldersPreview.js +7 -5
  53. package/dist/stories/PreviewComponents/MusicAlbumPreview/MusicAlbumPreview.js +6 -4
  54. package/dist/stories/PreviewComponents/MusicAlbumsPreview/MusicAlbumsPreview.js +8 -7
  55. package/dist/stories/PreviewComponents/MusicPlayerPreview/MusicPlayerPreview.js +7 -5
  56. package/dist/stories/PreviewComponents/NavbarPreview/NavbarPreview.js +7 -5
  57. package/dist/stories/PreviewComponents/NotesPreview/NotesPreview.js +7 -5
  58. package/dist/stories/PreviewComponents/PhotoAlbumPreview/PhotoAlbumPreview.js +7 -5
  59. package/dist/stories/PreviewComponents/PhotoAlbumsPreview/PhotoAlbumsPreview.js +7 -5
  60. package/dist/stories/PreviewComponents/SpacesListPreview/SpacesListPreview.js +7 -5
  61. package/dist/stories/PreviewComponents/VideoAlbumPreview/VideoAlbumPreview.js +7 -5
  62. package/dist/stories/PreviewComponents/VideoAlbumsPreview/VideoAlbumsPreview.js +7 -5
  63. package/dist/stories/PreviewComponents/VideoPreview/VideoPreview.js +7 -5
  64. package/dist/stories/Reusable Components/Comments/Comments.js +58 -0
  65. package/dist/stories/Reusable Components/Community/Community.js +12 -34
  66. package/dist/stories/Reusable Components/Sections/Sections.js +67 -0
  67. package/dist/stories/Spaces/Chat/Chat.js +103 -0
  68. package/dist/stories/Spaces/EventsList/EventsList.js +140 -0
  69. package/dist/stories/Spaces/NotesList/NotesList.js +144 -0
  70. package/dist/stories/Spaces/ViewDetailedPhoto/ViewDetailedPhoto.js +24 -0
  71. package/dist/stories/Spaces/ViewEvent/Event.js +146 -0
  72. package/dist/stories/Spaces/ViewFolders/ViewFolders.js +136 -0
  73. package/dist/stories/Spaces/ViewMusicAlbumList/ViewMusicAlbumList.js +136 -0
  74. package/dist/stories/Spaces/ViewMusicAlbums/ViewMusicAlbums.js +130 -0
  75. package/dist/stories/Spaces/ViewNote/ViewNote.js +27 -0
  76. package/dist/stories/Spaces/ViewPhotoAlbumList/ViewPhotoAlbumList.js +231 -0
  77. package/dist/stories/Spaces/ViewPhotoAlbums/ViewPhotoAlbums.js +131 -0
  78. package/dist/stories/Spaces/ViewVideo/ViewVideo.js +169 -0
  79. package/dist/stories/Spaces/ViewVideoAlbumList/ViewVideoAlbumList.js +157 -0
  80. package/dist/stories/Spaces/ViewVideoAlbums/ViewVideoAlbums.js +164 -0
  81. package/dist/stories/VideoAlbum/AlbumsGallery/AlbumsGallery.js +11 -4
  82. package/dist/stories/VideoAlbum/VideoSpace/VideoSpace.js +17 -6
  83. package/dist/stories/VideoAlbum/ViewAlbum/ViewAlbum.js +24 -25
  84. package/dist/stories/Widgets/VideoPlayer/VideoPlayer.js +235 -0
  85. package/dist/stories/helpers/util.js +24 -24
  86. package/dist/stories/store/actions/actions.js +16 -0
  87. package/dist/stories/store/communities.js +27 -29
  88. package/dist/stories/store/community.js +941 -0
  89. package/dist/stories/store/store.js +9 -4
  90. package/package.json +1 -1
  91. package/src/index.js +16 -16
  92. package/src/stories/Community/Community.jsx +31 -32
  93. package/src/stories/Forms/AddPhoto/AddPhoto.jsx +72 -72
  94. package/src/stories/{Events → Forms}/CreateEvent/CreateEvent.jsx +5 -1
  95. package/src/stories/{Library → Forms}/CreateFolder/CreateFolder.jsx +0 -0
  96. package/src/stories/Forms/{AddSong/AddSong.jsx → CreateSong/CreateSong.jsx} +0 -0
  97. package/src/stories/Modals/AddPhotoAlbum/AddPhotoAlbum.jsx +27 -0
  98. package/src/stories/Modals/AddPhotoModal/AddPhotoModal.jsx +29 -0
  99. package/src/stories/Modals/AddSongModal/AddSongModal.jsx +37 -0
  100. package/src/stories/Modals/AddVideoAlbumModal/AddVideoAlbumModal.jsx +38 -0
  101. package/src/stories/Modals/AddVideoModal/AddVideoModal.jsx +35 -0
  102. package/src/stories/Modals/ChatConfigModal/ChatContifgModal.jsx +77 -0
  103. package/src/stories/Modals/CreateEventModal/CreateEventModal.jsx +30 -0
  104. package/src/stories/Modals/CreateFolderModal/CreateFolderModal.jsx +39 -0
  105. package/src/stories/Modals/CreateMusicAlbumModal/CreateMusicAlbumModal.jsx +37 -0
  106. package/src/stories/Modals/CreateNoteModal/CreateNoteModal.jsx +43 -0
  107. package/src/stories/Modals/EventConfigModal/EventConfigModal.jsx +74 -0
  108. package/src/stories/Modals/EventsConfigModal/EventsConfigModal.jsx +67 -0
  109. package/src/stories/Modals/FoldersConfigModal/FoldersConfigModal.jsx +66 -0
  110. package/src/stories/Modals/MusicAlbumConfigModal/MusicAlbumConfigModal.jsx +69 -0
  111. package/src/stories/Modals/MusicAlbumsConfigModal/MusicAlbumsConfigModal.jsx +73 -0
  112. package/src/stories/Modals/NotesConfigModal/NotesConfigModal.jsx +65 -0
  113. package/src/stories/Modals/PhotoAlbumConfigModal/PhotoAlbumConfigModal.jsx +71 -0
  114. package/src/stories/Modals/PhotoAlbumsConfigModal/PhotoAlbumsConfigModal.jsx +69 -0
  115. package/src/stories/Modals/ShowImgModal/ShowImgModal.jsx +87 -0
  116. package/src/stories/Modals/VideoAlbumConfigModal/VideoAlbumConfigModal.jsx +67 -0
  117. package/src/stories/Modals/VideoAlbumsConfigModal/VideoAlbumsConfigModal.jsx +67 -0
  118. package/src/stories/Modals/VideoConfigModal/VideoConfigModal.jsx +78 -0
  119. package/src/stories/Pages/Chat/Chat.jsx +1 -1
  120. package/src/stories/Pages/Events/Event/Event.jsx +1 -1
  121. package/src/stories/Pages/Events/Events/Events.jsx +1 -1
  122. package/src/stories/Pages/Library/Folders/Library.jsx +1 -1
  123. package/src/stories/Pages/Library/Notes/Notes.jsx +1 -1
  124. package/src/stories/Pages/Music/MusicAlbum/Music.jsx +1 -1
  125. package/src/stories/Pages/Music/MusicAlbums/MusicAlbums.jsx +1 -1
  126. package/src/stories/Pages/Photos/Album/Album.jsx +1 -1
  127. package/src/stories/Pages/Photos/Albums/Albums.jsx +1 -1
  128. package/src/stories/Pages/Video/DetailedVideo/DetailedVideo.jsx +1 -1
  129. package/src/stories/Pages/Video/VideoAlbum/Video.jsx +1 -1
  130. package/src/stories/PreviewComponents/ChatPreview/ChatPreview.jsx +106 -104
  131. package/src/stories/PreviewComponents/EventPreview/EventPreview.jsx +7 -5
  132. package/src/stories/PreviewComponents/EventsPreview/EventsPreview.jsx +106 -104
  133. package/src/stories/PreviewComponents/FoldersPreview/FoldersPreview.jsx +8 -6
  134. package/src/stories/PreviewComponents/MusicAlbumPreview/MusicAlbumPreview.jsx +6 -4
  135. package/src/stories/PreviewComponents/MusicAlbumsPreview/MusicAlbumsPreview.jsx +13 -11
  136. package/src/stories/PreviewComponents/MusicPlayerPreview/MusicPlayerPreview.jsx +36 -34
  137. package/src/stories/PreviewComponents/NavbarPreview/NavbarPreview.jsx +18 -16
  138. package/src/stories/PreviewComponents/NotesPreview/NotesPreview.jsx +7 -5
  139. package/src/stories/PreviewComponents/PhotoAlbumPreview/PhotoAlbumPreview.jsx +105 -103
  140. package/src/stories/PreviewComponents/PhotoAlbumsPreview/PhotoAlbumsPreview.jsx +8 -6
  141. package/src/stories/PreviewComponents/SpacesListPreview/SpacesListPreview.jsx +10 -8
  142. package/src/stories/PreviewComponents/VideoAlbumPreview/VideoAlbumPreview.jsx +7 -5
  143. package/src/stories/PreviewComponents/VideoAlbumsPreview/VideoAlbumsPreview.jsx +7 -5
  144. package/src/stories/PreviewComponents/VideoPreview/VideoPreview.jsx +7 -5
  145. package/src/stories/{VideoAlbum → Reusable Components}/Comments/Comments.jsx +0 -0
  146. package/src/stories/Reusable Components/Community/Community.jsx +10 -33
  147. package/src/stories/{Sections/Sections.jsx → Reusable Components/Sections/Sections.jsx } +1 -1
  148. package/src/stories/Spaces/Chat/Chat.jsx +77 -0
  149. package/src/stories/Spaces/EventsList/EventsList.jsx +118 -0
  150. package/src/stories/Spaces/NotesList/NotesList.jsx +125 -0
  151. package/src/stories/{Photo Album/DetailedPhoto/DetailedPhoto.jsx → Spaces/ViewDetailedPhoto/ViewDetailedPhoto.jsx} +1 -1
  152. package/src/stories/{Events/Event → Spaces/ViewEvent}/Event.jsx +17 -73
  153. package/src/stories/Spaces/ViewFolders/ViewFolders.jsx +122 -0
  154. package/src/stories/Spaces/ViewMusicAlbumList/ViewMusicAlbumList.jsx +118 -0
  155. package/src/stories/Spaces/ViewMusicAlbums/ViewMusicAlbums.jsx +108 -0
  156. package/src/stories/{Library → Spaces}/ViewNote/ViewNote.jsx +0 -0
  157. package/src/stories/{Photo Album/ViewAlbum/ViewAlbum.jsx → Spaces/ViewPhotoAlbumList/ViewPhotoAlbumList.jsx} +48 -134
  158. package/src/stories/{Photo Album/ViewAlbums/ViewAlbums.jsx → Spaces/ViewPhotoAlbums/ViewPhotoAlbums.jsx} +22 -54
  159. package/src/stories/{VideoAlbum/VideoSpace/VideoSpace.jsx → Spaces/ViewVideo/ViewVideo.jsx} +21 -47
  160. package/src/stories/{VideoAlbum/ViewAlbum/ViewAlbum.jsx → Spaces/ViewVideoAlbumList/ViewVideoAlbumList.jsx} +31 -78
  161. package/src/stories/{VideoAlbum/AlbumsGallery/AlbumsGallery.jsx → Spaces/ViewVideoAlbums/ViewVideoAlbums.jsx} +20 -51
  162. package/src/stories/{VideoAlbum → Widgets}/VideoPlayer/VideoPlayer.jsx +0 -0
  163. package/src/stories/helpers/util.js +13 -13
  164. package/src/stories/store/actions/actions.js +7 -0
  165. package/src/stories/store/{communities.js → community.js} +27 -29
  166. package/src/stories/store/store.js +3 -4
  167. package/src/stories/Chat/Chat.jsx +0 -148
  168. package/src/stories/Events/EventsList/EventsList.jsx +0 -180
  169. package/src/stories/Library/Folders/Folders.jsx +0 -187
  170. package/src/stories/Library/Notes/Notes.jsx +0 -161
  171. package/src/stories/Music Album/ViewAlbum/ViewAlbum.jsx +0 -216
  172. 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 _communities = require("./communities");
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: _communities.community,
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]); // console.log(action)
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
@@ -10,7 +10,7 @@
10
10
  ]
11
11
  ]
12
12
  },
13
- "version": "0.1.21",
13
+ "version": "0.1.24",
14
14
  "private": false,
15
15
  "dependencies": {
16
16
  "@babel/cli": "^7.16.7",
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/Events/CreateEvent/CreateEvent';
10
- import Event from './stories/Events/Event/Event';
11
- import EventsList from './stories/Events/EventsList/EventsList';
9
+ import CreateEvent from './stories/Forms/CreateEvent/CreateEvent';
10
+ import Event from './stories/Spaces/ViewEvent/Event';
11
+ import EventsList from './stories/Spaces/EventsList/EventsList';
12
12
  // Library
13
- import CreateLibraryFolder from './stories/Library/CreateFolder/CreateFolder';
14
- import LibraryFolders from './stories/Library/Folders/Folders';
15
- import LibraryNotes from './stories/Library/Notes/Notes';
16
- import ViewLibraryNote from './stories/Library/ViewNote/ViewNote';
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/AddSong/AddSong';
18
+ import CreateMusic from './stories/Forms/CreateSong/CreateSong';
19
19
  import CreateMusicAlbum from './stories/Forms/CreateMusicAlbum/CreateMusicAlbum';
20
- import MusicAlbum from './stories/Music Album/ViewAlbum/ViewAlbum';
21
- import MusicAlbums from './stories/Music Album/ViewAlbums/ViewAlbums';
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/Photo Album/ViewAlbum/ViewAlbum';
26
- import PhotoAlbums from './stories/Photo Album/ViewAlbums/ViewAlbums';
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/VideoAlbum/AlbumsGallery/AlbumsGallery';
46
- import VidepSpace from './stories/VideoAlbum/VideoSpace/VideoSpace';
47
- import VideoAlbum from './stories/VideoAlbum/ViewAlbum/ViewAlbum';
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 { useDispatch, useSelector } from 'react-redux';
4
- import { addEvent, deleteEvent } from '../store/store';
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 '../Events/Event/Event';
16
- import EventsList from '../Events/EventsList/EventsList';
17
- import Folders from '../Library/Folders/Folders';
18
- import Notes from '../Library/Notes/Notes';
19
- import MusicAlbum from '../Music Album/ViewAlbum/ViewAlbum';
20
- import MusicAlbums from '../Music Album/ViewAlbums/ViewAlbums';
21
- import PhotoAlbum from '../Photo Album/ViewAlbum/ViewAlbum';
22
- import PhotoAlbums from '../Photo Album/ViewAlbums/ViewAlbums';
23
- import VideoAlbums from '../VideoAlbum/AlbumsGallery/AlbumsGallery';
24
- import VideoAlbum from '../VideoAlbum/ViewAlbum/ViewAlbum';
25
- import VideoSpace from '../VideoAlbum/VideoSpace/VideoSpace';
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(space)
40
+ // console.log(community)
41
41
 
42
42
  const eventIconClicked = (action, index) => {
43
43
  switch (action) {
44
44
  case 'delete':
45
- dispatch(deleteEvent(index))
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
- headerStyles: spacesWidget.styles.header,
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 {...space.spaceProps} {...space.styles}/>,
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 'react';
2
- import PropTypes from 'prop-types';
3
- import * as Yup from 'yup';
4
- import styled from 'styled-components';
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 '../../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';
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
- const initialValues = {
13
- img: null,
14
- title: '',
15
- description: ''
16
- }
11
+ const AddPhoto = ({ saveBtnText, cancelBtnText, ...props }) => {
12
+ const initialValues = {
13
+ img: null,
14
+ title: "",
15
+ description: "",
16
+ };
17
17
 
18
- const formSchema = Yup.object().shape({
19
- title: Yup.string()
20
- .required("Required"),
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
- const sections = [
24
- {
25
- title: "Upload Photo",
26
- body: [
27
- (<CustomDropZone label="Image" name="cover" />),
28
- (<TextField label="Title" name="title" />),
29
- (<CustomTextarea label="Description" name="description" />)
30
- ],
31
- hideTitle: true
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
- const onCreate = (values) => {
36
- const photo = {...values}
37
- const date = new Date()
38
- photo.date = date.toISOString().split('T')[0]
39
- props.saveHandler(photo)
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
- const cancelHandler = () => {
43
- props.cancelHandler()
44
- }
44
+ const cancelHandler = () => {
45
+ props.cancelHandler();
46
+ };
45
47
 
46
- return (
47
- <Container>
48
- <ReusableForm
49
- formTitle="Add Photo"
50
- initialValues={initialValues}
51
- formSchema={formSchema}
52
- sections={sections}
53
- headerStyles={props.headerStyles}
54
- saveBtnText={saveBtnText}
55
- cancelBtnText={cancelBtnText}
56
- saveHandler={onCreate}
57
- cancelHandler={cancelHandler}
58
- headerStyles={{
59
- padding: 10,
60
- headerBackground: 'black',
61
- titleColor: '#ffff',
62
- }}
63
- sectionPadding={10}
64
- bodyRowGap={10}
65
- {...props.formStyles}
66
- />
67
- </Container>
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
- saveHandler: PropTypes.func,
79
- cancelHandler: PropTypes.func,
80
- saveBtnText: PropTypes.string,
81
- cancelBtnText: PropTypes.string,
82
- formStyles: PropTypes.object
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
- props.saveHandler(event)
57
+ dispatch(actions.addEvent(event))
58
+ props.cancelHandler()
55
59
  }
56
60
 
57
61
  const cancelHandler = () => {
@@ -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