@mohamed-karawia/library 0.1.22 → 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/Community/Community.js +27 -29
- 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/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/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/PreviewComponents/ChatPreview/ChatPreview.js +6 -4
- package/dist/stories/PreviewComponents/EventPreview/EventPreview.js +6 -4
- package/dist/stories/PreviewComponents/EventsPreview/EventsPreview.js +6 -4
- package/dist/stories/PreviewComponents/FoldersPreview/FoldersPreview.js +6 -4
- package/dist/stories/PreviewComponents/MusicAlbumPreview/MusicAlbumPreview.js +6 -4
- package/dist/stories/PreviewComponents/MusicAlbumsPreview/MusicAlbumsPreview.js +7 -6
- package/dist/stories/PreviewComponents/MusicPlayerPreview/MusicPlayerPreview.js +6 -4
- package/dist/stories/PreviewComponents/NavbarPreview/NavbarPreview.js +6 -4
- package/dist/stories/PreviewComponents/NotesPreview/NotesPreview.js +6 -4
- package/dist/stories/PreviewComponents/PhotoAlbumPreview/PhotoAlbumPreview.js +6 -4
- package/dist/stories/PreviewComponents/PhotoAlbumsPreview/PhotoAlbumsPreview.js +6 -4
- package/dist/stories/PreviewComponents/SpacesListPreview/SpacesListPreview.js +6 -4
- package/dist/stories/PreviewComponents/VideoAlbumPreview/VideoAlbumPreview.js +6 -4
- package/dist/stories/PreviewComponents/VideoAlbumsPreview/VideoAlbumsPreview.js +6 -4
- package/dist/stories/PreviewComponents/VideoPreview/VideoPreview.js +6 -4
- package/dist/stories/Reusable Components/Comments/Comments.js +58 -0
- 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/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/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 +19 -19
- 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 +6 -4
- package/src/stories/PreviewComponents/EventsPreview/EventsPreview.jsx +106 -104
- package/src/stories/PreviewComponents/FoldersPreview/FoldersPreview.jsx +7 -5
- 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 +35 -33
- package/src/stories/PreviewComponents/NavbarPreview/NavbarPreview.jsx +17 -15
- package/src/stories/PreviewComponents/NotesPreview/NotesPreview.jsx +6 -4
- package/src/stories/PreviewComponents/PhotoAlbumPreview/PhotoAlbumPreview.jsx +105 -103
- package/src/stories/PreviewComponents/PhotoAlbumsPreview/PhotoAlbumsPreview.jsx +7 -5
- package/src/stories/PreviewComponents/SpacesListPreview/SpacesListPreview.jsx +9 -7
- package/src/stories/PreviewComponents/VideoAlbumPreview/VideoAlbumPreview.jsx +6 -4
- package/src/stories/PreviewComponents/VideoAlbumsPreview/VideoAlbumsPreview.jsx +6 -4
- package/src/stories/PreviewComponents/VideoPreview/VideoPreview.jsx +6 -4
- package/src/stories/{VideoAlbum → Reusable Components}/Comments/Comments.jsx +0 -0
- 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/{Library/Notes/Notes.jsx → Spaces/NotesList/NotesList.jsx} +20 -66
- package/src/stories/{Photo Album/DetailedPhoto/DetailedPhoto.jsx → Spaces/ViewDetailedPhoto/ViewDetailedPhoto.jsx} +1 -1
- package/src/stories/{Events/Event → Spaces/ViewEvent}/Event.jsx +10 -74
- 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} +42 -137
- package/src/stories/{Photo Album/ViewAlbums/ViewAlbums.jsx → Spaces/ViewPhotoAlbums/ViewPhotoAlbums.jsx} +16 -55
- package/src/stories/{VideoAlbum/VideoSpace/VideoSpace.jsx → Spaces/ViewVideo/ViewVideo.jsx} +15 -48
- package/src/stories/{VideoAlbum/ViewAlbum/ViewAlbum.jsx → Spaces/ViewVideoAlbumList/ViewVideoAlbumList.jsx} +14 -57
- package/src/stories/{VideoAlbum/AlbumsGallery/AlbumsGallery.jsx → Spaces/ViewVideoAlbums/ViewVideoAlbums.jsx} +14 -52
- 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} +0 -0
- package/src/stories/store/store.js +3 -4
- package/src/stories/Chat/Chat.jsx +0 -154
- package/src/stories/Events/EventsList/EventsList.jsx +0 -187
- package/src/stories/Library/Folders/Folders.jsx +0 -196
- package/src/stories/Music Album/ViewAlbum/ViewAlbum.jsx +0 -172
- package/src/stories/Music Album/ViewAlbums/ViewAlbums.jsx +0 -166
package/dist/index.js
CHANGED
@@ -44,7 +44,7 @@ Object.defineProperty(exports, "CreateEvent", {
|
|
44
44
|
Object.defineProperty(exports, "Event", {
|
45
45
|
enumerable: true,
|
46
46
|
get: function get() {
|
47
|
-
return
|
47
|
+
return _ViewEvent.default;
|
48
48
|
}
|
49
49
|
});
|
50
50
|
Object.defineProperty(exports, "EventsList", {
|
@@ -62,13 +62,13 @@ Object.defineProperty(exports, "CreateLibraryFolder", {
|
|
62
62
|
Object.defineProperty(exports, "LibraryFolders", {
|
63
63
|
enumerable: true,
|
64
64
|
get: function get() {
|
65
|
-
return
|
65
|
+
return _ViewFolders.default;
|
66
66
|
}
|
67
67
|
});
|
68
68
|
Object.defineProperty(exports, "LibraryNotes", {
|
69
69
|
enumerable: true,
|
70
70
|
get: function get() {
|
71
|
-
return
|
71
|
+
return _NotesList.default;
|
72
72
|
}
|
73
73
|
});
|
74
74
|
Object.defineProperty(exports, "ViewLibraryNote", {
|
@@ -80,7 +80,7 @@ Object.defineProperty(exports, "ViewLibraryNote", {
|
|
80
80
|
Object.defineProperty(exports, "CreateMusic", {
|
81
81
|
enumerable: true,
|
82
82
|
get: function get() {
|
83
|
-
return
|
83
|
+
return _CreateSong.default;
|
84
84
|
}
|
85
85
|
});
|
86
86
|
Object.defineProperty(exports, "CreateMusicAlbum", {
|
@@ -92,13 +92,13 @@ Object.defineProperty(exports, "CreateMusicAlbum", {
|
|
92
92
|
Object.defineProperty(exports, "MusicAlbum", {
|
93
93
|
enumerable: true,
|
94
94
|
get: function get() {
|
95
|
-
return
|
95
|
+
return _ViewMusicAlbumList.default;
|
96
96
|
}
|
97
97
|
});
|
98
98
|
Object.defineProperty(exports, "MusicAlbums", {
|
99
99
|
enumerable: true,
|
100
100
|
get: function get() {
|
101
|
-
return
|
101
|
+
return _ViewMusicAlbums.default;
|
102
102
|
}
|
103
103
|
});
|
104
104
|
Object.defineProperty(exports, "CreatePhotoAlbum", {
|
@@ -116,13 +116,13 @@ Object.defineProperty(exports, "CreatePhoto", {
|
|
116
116
|
Object.defineProperty(exports, "PhotoAlbum", {
|
117
117
|
enumerable: true,
|
118
118
|
get: function get() {
|
119
|
-
return
|
119
|
+
return _ViewPhotoAlbumList.default;
|
120
120
|
}
|
121
121
|
});
|
122
122
|
Object.defineProperty(exports, "PhotoAlbums", {
|
123
123
|
enumerable: true,
|
124
124
|
get: function get() {
|
125
|
-
return
|
125
|
+
return _ViewPhotoAlbums.default;
|
126
126
|
}
|
127
127
|
});
|
128
128
|
Object.defineProperty(exports, "BaseMaterial", {
|
@@ -218,23 +218,23 @@ Object.defineProperty(exports, "CreateVideo", {
|
|
218
218
|
Object.defineProperty(exports, "VideoAlbums", {
|
219
219
|
enumerable: true,
|
220
220
|
get: function get() {
|
221
|
-
return
|
221
|
+
return _ViewVideoAlbums.default;
|
222
222
|
}
|
223
223
|
});
|
224
224
|
Object.defineProperty(exports, "VidepSpace", {
|
225
225
|
enumerable: true,
|
226
226
|
get: function get() {
|
227
|
-
return
|
227
|
+
return _ViewVideo.default;
|
228
228
|
}
|
229
229
|
});
|
230
230
|
Object.defineProperty(exports, "VideoAlbum", {
|
231
231
|
enumerable: true,
|
232
232
|
get: function get() {
|
233
|
-
return
|
233
|
+
return _ViewVideoAlbumList.default;
|
234
234
|
}
|
235
235
|
});
|
236
236
|
|
237
|
-
var _Chat = _interopRequireDefault(require("./stories/Chat/Chat"));
|
237
|
+
var _Chat = _interopRequireDefault(require("./stories/Spaces/Chat/Chat"));
|
238
238
|
|
239
239
|
var _CreateForm = _interopRequireDefault(require("./stories/Enrollment/Admin/CreateForm/CreateForm"));
|
240
240
|
|
@@ -244,35 +244,35 @@ var _ViewForms = _interopRequireDefault(require("./stories/Enrollment/Admin/View
|
|
244
244
|
|
245
245
|
var _FillForm = _interopRequireDefault(require("./stories/Enrollment/Guest/FillForm/FillForm"));
|
246
246
|
|
247
|
-
var _CreateEvent = _interopRequireDefault(require("./stories/
|
247
|
+
var _CreateEvent = _interopRequireDefault(require("./stories/Forms/CreateEvent/CreateEvent"));
|
248
248
|
|
249
|
-
var
|
249
|
+
var _ViewEvent = _interopRequireDefault(require("./stories/Spaces/ViewEvent/ViewEvent"));
|
250
250
|
|
251
|
-
var _EventsList = _interopRequireDefault(require("./stories/
|
251
|
+
var _EventsList = _interopRequireDefault(require("./stories/Spaces/EventsList/EventsList"));
|
252
252
|
|
253
|
-
var _CreateFolder = _interopRequireDefault(require("./stories/
|
253
|
+
var _CreateFolder = _interopRequireDefault(require("./stories/Forms/CreateFolder/CreateFolder"));
|
254
254
|
|
255
|
-
var
|
255
|
+
var _ViewFolders = _interopRequireDefault(require("./stories/Spaces/ViewFolders/ViewFolders"));
|
256
256
|
|
257
|
-
var
|
257
|
+
var _NotesList = _interopRequireDefault(require("./stories/Spaces/NotesList/NotesList"));
|
258
258
|
|
259
|
-
var _ViewNote = _interopRequireDefault(require("./stories/
|
259
|
+
var _ViewNote = _interopRequireDefault(require("./stories/Spaces/ViewNote/ViewNote"));
|
260
260
|
|
261
|
-
var
|
261
|
+
var _CreateSong = _interopRequireDefault(require("./stories/Forms/CreateSong/CreateSong"));
|
262
262
|
|
263
263
|
var _CreateMusicAlbum = _interopRequireDefault(require("./stories/Forms/CreateMusicAlbum/CreateMusicAlbum"));
|
264
264
|
|
265
|
-
var
|
265
|
+
var _ViewMusicAlbumList = _interopRequireDefault(require("./stories/Spaces/ViewMusicAlbumList/ViewMusicAlbumList"));
|
266
266
|
|
267
|
-
var
|
267
|
+
var _ViewMusicAlbums = _interopRequireDefault(require("./stories/Spaces/ViewMusicAlbums/ViewMusicAlbums"));
|
268
268
|
|
269
269
|
var _CreateAlbum = _interopRequireDefault(require("./stories/Forms/CreateAlbum/CreateAlbum"));
|
270
270
|
|
271
271
|
var _AddPhoto = _interopRequireDefault(require("./stories/Forms/AddPhoto/AddPhoto"));
|
272
272
|
|
273
|
-
var
|
273
|
+
var _ViewPhotoAlbumList = _interopRequireDefault(require("./stories/Spaces/ViewPhotoAlbumList/ViewPhotoAlbumList"));
|
274
274
|
|
275
|
-
var
|
275
|
+
var _ViewPhotoAlbums = _interopRequireDefault(require("./stories/Spaces/ViewPhotoAlbums/ViewPhotoAlbums"));
|
276
276
|
|
277
277
|
var _BaseMaterial = _interopRequireDefault(require("./stories/Containers/BaseMaterial"));
|
278
278
|
|
@@ -304,8 +304,8 @@ var _CreateVideoAlbum = _interopRequireDefault(require("./stories/Forms/CreateVi
|
|
304
304
|
|
305
305
|
var _AddVideo = _interopRequireDefault(require("./stories/Forms/AddVideo/AddVideo"));
|
306
306
|
|
307
|
-
var
|
307
|
+
var _ViewVideoAlbums = _interopRequireDefault(require("./stories/Spaces/ViewVideoAlbums/ViewVideoAlbums"));
|
308
308
|
|
309
|
-
var
|
309
|
+
var _ViewVideo = _interopRequireDefault(require("./stories/Spaces/ViewVideo/ViewVideo"));
|
310
310
|
|
311
|
-
var
|
311
|
+
var _ViewVideoAlbumList = _interopRequireDefault(require("./stories/Spaces/ViewVideoAlbumList/ViewVideoAlbumList"));
|
@@ -17,7 +17,7 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
17
17
|
|
18
18
|
var _reactRedux = require("react-redux");
|
19
19
|
|
20
|
-
var
|
20
|
+
var actions = _interopRequireWildcard(require("../store/store"));
|
21
21
|
|
22
22
|
var _Navbar = _interopRequireDefault(require("../Navbar/Navbar"));
|
23
23
|
|
@@ -33,29 +33,29 @@ var _BaseMaterial = _interopRequireDefault(require("../Containers/BaseMaterial")
|
|
33
33
|
|
34
34
|
var _WidgetContainer = _interopRequireDefault(require("../Reusable Components/WidgetContainer/WidgetContainer"));
|
35
35
|
|
36
|
-
var _Chat = _interopRequireDefault(require("../Chat/Chat"));
|
36
|
+
var _Chat = _interopRequireDefault(require("../Spaces/Chat/Chat"));
|
37
37
|
|
38
|
-
var _Event = _interopRequireDefault(require("../
|
38
|
+
var _Event = _interopRequireDefault(require("../Spaces/ViewEvent/Event"));
|
39
39
|
|
40
|
-
var _EventsList = _interopRequireDefault(require("../
|
40
|
+
var _EventsList = _interopRequireDefault(require("../Spaces/EventsList/EventsList"));
|
41
41
|
|
42
|
-
var
|
42
|
+
var _ViewFolders = _interopRequireDefault(require("../Spaces/ViewFolders/ViewFolders"));
|
43
43
|
|
44
|
-
var
|
44
|
+
var _NotesList = _interopRequireDefault(require("../Spaces/NotesList/NotesList"));
|
45
45
|
|
46
|
-
var
|
46
|
+
var _ViewMusicAlbumList = _interopRequireDefault(require("../Spaces/ViewMusicAlbumList/ViewMusicAlbumList"));
|
47
47
|
|
48
|
-
var
|
48
|
+
var _ViewMusicAlbums = _interopRequireDefault(require("../Spaces/ViewMusicAlbums/ViewMusicAlbums"));
|
49
49
|
|
50
|
-
var
|
50
|
+
var _ViewPhotoAlbumList = _interopRequireDefault(require("../Spaces/ViewPhotoAlbumList/ViewPhotoAlbumList"));
|
51
51
|
|
52
|
-
var
|
52
|
+
var _ViewPhotoAlbums = _interopRequireDefault(require("../Spaces/ViewPhotoAlbums/ViewPhotoAlbums"));
|
53
53
|
|
54
|
-
var
|
54
|
+
var _ViewVideoAlbums = _interopRequireDefault(require("../Spaces/ViewVideoAlbums/ViewVideoAlbums"));
|
55
55
|
|
56
|
-
var
|
56
|
+
var _ViewVideoAlbumList = _interopRequireDefault(require("../Spaces/ViewVideoAlbumList/ViewVideoAlbumList"));
|
57
57
|
|
58
|
-
var
|
58
|
+
var _ViewVideo = _interopRequireDefault(require("../Spaces/ViewVideo/ViewVideo"));
|
59
59
|
|
60
60
|
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); }
|
61
61
|
|
@@ -77,19 +77,16 @@ var Community = function Community(props) {
|
|
77
77
|
});
|
78
78
|
var spacesWidget = (0, _reactRedux.useSelector)(function (state) {
|
79
79
|
return state.communities.spacesListWidget.widgetSpacesList;
|
80
|
-
});
|
81
|
-
var dispatch = (0, _reactRedux.useDispatch)();
|
80
|
+
}); // const dispatch = useDispatch();
|
82
81
|
|
83
|
-
var onAddEvent = function onAddEvent(event) {
|
84
|
-
|
85
|
-
};
|
82
|
+
var onAddEvent = function onAddEvent(event) {// dispatch(actions.addEvent(event))
|
83
|
+
}; // console.log(community)
|
86
84
|
|
87
|
-
console.log(community);
|
88
85
|
|
89
86
|
var eventIconClicked = function eventIconClicked(action, index) {
|
90
87
|
switch (action) {
|
91
88
|
case 'delete':
|
92
|
-
dispatch(
|
89
|
+
// dispatch(actions.addEvent)
|
93
90
|
break;
|
94
91
|
|
95
92
|
default:
|
@@ -116,35 +113,36 @@ var Community = function Community(props) {
|
|
116
113
|
community: community
|
117
114
|
}, space.spaceProps, space.styles)),
|
118
115
|
'events_list': /*#__PURE__*/_react.default.createElement(_EventsList.default, Object.assign({
|
116
|
+
actions: actions,
|
119
117
|
community: community,
|
120
118
|
cardIconClicked: eventIconClicked,
|
121
119
|
onAddEvent: onAddEvent
|
122
120
|
}, space.spaceProps, space.styles)),
|
123
|
-
'folders': /*#__PURE__*/_react.default.createElement(
|
121
|
+
'folders': /*#__PURE__*/_react.default.createElement(_ViewFolders.default, Object.assign({
|
124
122
|
community: community
|
125
123
|
}, space.spaceProps, space.styles)),
|
126
|
-
'notes': /*#__PURE__*/_react.default.createElement(
|
124
|
+
'notes': /*#__PURE__*/_react.default.createElement(_NotesList.default, Object.assign({
|
127
125
|
community: community
|
128
126
|
}, space.spaceProps, space.styles)),
|
129
|
-
'music_album': /*#__PURE__*/_react.default.createElement(
|
127
|
+
'music_album': /*#__PURE__*/_react.default.createElement(_ViewMusicAlbumList.default, Object.assign({
|
130
128
|
community: community
|
131
129
|
}, space.spaceProps, space.styles)),
|
132
|
-
'music_albums': /*#__PURE__*/_react.default.createElement(
|
130
|
+
'music_albums': /*#__PURE__*/_react.default.createElement(_ViewMusicAlbums.default, Object.assign({
|
133
131
|
community: community
|
134
132
|
}, space.spaceProps, space.styles)),
|
135
|
-
'photo_album': /*#__PURE__*/_react.default.createElement(
|
133
|
+
'photo_album': /*#__PURE__*/_react.default.createElement(_ViewPhotoAlbumList.default, Object.assign({
|
136
134
|
community: community
|
137
135
|
}, space.spaceProps, space.styles)),
|
138
|
-
'photo_albums': /*#__PURE__*/_react.default.createElement(
|
136
|
+
'photo_albums': /*#__PURE__*/_react.default.createElement(_ViewPhotoAlbums.default, Object.assign({
|
139
137
|
community: community
|
140
138
|
}, space.spaceProps, space.styles)),
|
141
|
-
'video_albums': /*#__PURE__*/_react.default.createElement(
|
139
|
+
'video_albums': /*#__PURE__*/_react.default.createElement(_ViewVideoAlbums.default, Object.assign({
|
142
140
|
community: community
|
143
141
|
}, space.spaceProps, space.styles)),
|
144
|
-
'video_album': /*#__PURE__*/_react.default.createElement(
|
142
|
+
'video_album': /*#__PURE__*/_react.default.createElement(_ViewVideoAlbumList.default, Object.assign({
|
145
143
|
community: community
|
146
144
|
}, space.spaceProps, space.styles)),
|
147
|
-
'video_space': /*#__PURE__*/_react.default.createElement(
|
145
|
+
'video_space': /*#__PURE__*/_react.default.createElement(_ViewVideo.default, Object.assign({
|
148
146
|
community: community
|
149
147
|
}, space.spaceProps, space.styles))
|
150
148
|
}[spaceType]), /*#__PURE__*/_react.default.createElement(_Right.default, null, space.widgets && space.widgets.map(function (widget) {
|
@@ -45,11 +45,12 @@ var AddPhoto = function AddPhoto(_ref) {
|
|
45
45
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
46
46
|
var initialValues = {
|
47
47
|
img: null,
|
48
|
-
title:
|
49
|
-
description:
|
48
|
+
title: "",
|
49
|
+
description: ""
|
50
50
|
};
|
51
51
|
var formSchema = Yup.object().shape({
|
52
|
-
title: Yup.string().required("
|
52
|
+
title: Yup.string().required("Your photo must have a title"),
|
53
|
+
description: Yup.string().required("You must also have a description for your photo!")
|
53
54
|
});
|
54
55
|
var sections = [{
|
55
56
|
title: "Upload Photo",
|
@@ -69,7 +70,7 @@ var AddPhoto = function AddPhoto(_ref) {
|
|
69
70
|
var onCreate = function onCreate(values) {
|
70
71
|
var photo = (0, _objectSpread2.default)({}, values);
|
71
72
|
var date = new Date();
|
72
|
-
photo.date = date.toISOString().split(
|
73
|
+
photo.date = date.toISOString().split("T")[0];
|
73
74
|
props.saveHandler(photo);
|
74
75
|
};
|
75
76
|
|
@@ -89,12 +90,12 @@ var AddPhoto = function AddPhoto(_ref) {
|
|
89
90
|
cancelHandler: cancelHandler
|
90
91
|
}, (0, _defineProperty2.default)(_Object$assign, "headerStyles", {
|
91
92
|
padding: 10,
|
92
|
-
headerBackground:
|
93
|
-
titleColor:
|
93
|
+
headerBackground: "black",
|
94
|
+
titleColor: "#ffff"
|
94
95
|
}), (0, _defineProperty2.default)(_Object$assign, "sectionPadding", 10), (0, _defineProperty2.default)(_Object$assign, "bodyRowGap", 10), _Object$assign), props.formStyles)));
|
95
96
|
};
|
96
97
|
|
97
|
-
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["
|
98
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)([""])));
|
98
99
|
|
99
100
|
AddPhoto.defaultProps = {};
|
100
101
|
var _default = AddPhoto;
|
@@ -0,0 +1,115 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
+
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
6
|
+
value: true
|
7
|
+
});
|
8
|
+
exports.default = void 0;
|
9
|
+
|
10
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
|
11
|
+
|
12
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/defineProperty"));
|
13
|
+
|
14
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
15
|
+
|
16
|
+
var _react = _interopRequireDefault(require("react"));
|
17
|
+
|
18
|
+
var Yup = _interopRequireWildcard(require("yup"));
|
19
|
+
|
20
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
21
|
+
|
22
|
+
var _reactRedux = require("react-redux");
|
23
|
+
|
24
|
+
var _ReusableForm = _interopRequireDefault(require("../../Reusable Components/ReusableForm/ReusableForm"));
|
25
|
+
|
26
|
+
var _TextField = _interopRequireDefault(require("../../Common Inputs/TextField/TextField"));
|
27
|
+
|
28
|
+
var _DatePicker = _interopRequireDefault(require("../../Common Inputs/DatePicker/DatePicker"));
|
29
|
+
|
30
|
+
var _CustomDropZone = _interopRequireDefault(require("../../Common Inputs/CustomDropzone/CustomDropZone"));
|
31
|
+
|
32
|
+
var _CustomTextarea = _interopRequireDefault(require("../../Common Inputs/CustomTextarea/CustomTextarea"));
|
33
|
+
|
34
|
+
var _templateObject;
|
35
|
+
|
36
|
+
var _excluded = ["saveBtnText", "cancelBtnText", "actions"];
|
37
|
+
|
38
|
+
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); }
|
39
|
+
|
40
|
+
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; }
|
41
|
+
|
42
|
+
var CreateEvent = function CreateEvent(_ref) {
|
43
|
+
var _Object$assign;
|
44
|
+
|
45
|
+
var saveBtnText = _ref.saveBtnText,
|
46
|
+
cancelBtnText = _ref.cancelBtnText,
|
47
|
+
actions = _ref.actions,
|
48
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
49
|
+
var dispatch = (0, _reactRedux.useDispatch)();
|
50
|
+
var initialValues = {
|
51
|
+
cover: null,
|
52
|
+
name: '',
|
53
|
+
disc: '',
|
54
|
+
date: {
|
55
|
+
startDate: null,
|
56
|
+
endDate: null
|
57
|
+
}
|
58
|
+
};
|
59
|
+
var formSchema = Yup.object().shape({
|
60
|
+
name: Yup.string().required("Required"),
|
61
|
+
disc: Yup.string().required("Required")
|
62
|
+
});
|
63
|
+
var sections = [{
|
64
|
+
title: "Create Event",
|
65
|
+
body: [/*#__PURE__*/_react.default.createElement(_CustomDropZone.default, {
|
66
|
+
label: "Cover",
|
67
|
+
name: "cover"
|
68
|
+
}), /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
69
|
+
label: "Title",
|
70
|
+
name: "name"
|
71
|
+
}), /*#__PURE__*/_react.default.createElement(_CustomTextarea.default, {
|
72
|
+
label: "Discription",
|
73
|
+
name: "disc"
|
74
|
+
}), /*#__PURE__*/_react.default.createElement(_DatePicker.default, {
|
75
|
+
label: "Date Range",
|
76
|
+
name: "date"
|
77
|
+
})],
|
78
|
+
hideTitle: true
|
79
|
+
}];
|
80
|
+
|
81
|
+
var onCreate = function onCreate(values) {
|
82
|
+
var event = {
|
83
|
+
title: values.name,
|
84
|
+
date: "".concat(values.date.startDate._d.toISOString().split('T')[0], " : ").concat(values.date.endDate._d.toISOString().split('T')[0])
|
85
|
+
};
|
86
|
+
dispatch(actions.addEvent(event));
|
87
|
+
props.cancelHandler();
|
88
|
+
};
|
89
|
+
|
90
|
+
var cancelHandler = function cancelHandler() {
|
91
|
+
props.cancelHandler();
|
92
|
+
};
|
93
|
+
|
94
|
+
return /*#__PURE__*/_react.default.createElement(Container, null, /*#__PURE__*/_react.default.createElement(_ReusableForm.default, Object.assign((_Object$assign = {
|
95
|
+
formTitle: "Create Event",
|
96
|
+
initialValues: initialValues,
|
97
|
+
formSchema: formSchema,
|
98
|
+
sections: sections,
|
99
|
+
headerStyles: props.headerStyles,
|
100
|
+
saveBtnText: saveBtnText,
|
101
|
+
cancelBtnText: cancelBtnText,
|
102
|
+
saveHandler: onCreate,
|
103
|
+
cancelHandler: cancelHandler
|
104
|
+
}, (0, _defineProperty2.default)(_Object$assign, "headerStyles", {
|
105
|
+
padding: 10,
|
106
|
+
headerBackground: 'black',
|
107
|
+
titleColor: '#ffff'
|
108
|
+
}), (0, _defineProperty2.default)(_Object$assign, "sectionPadding", 10), (0, _defineProperty2.default)(_Object$assign, "bodyRowGap", 10), _Object$assign), props.formStyles)));
|
109
|
+
};
|
110
|
+
|
111
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\n"])));
|
112
|
+
|
113
|
+
CreateEvent.defaultProps = {};
|
114
|
+
var _default = CreateEvent;
|
115
|
+
exports.default = _default;
|
@@ -0,0 +1,87 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
+
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
6
|
+
value: true
|
7
|
+
});
|
8
|
+
exports.default = void 0;
|
9
|
+
|
10
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/defineProperty"));
|
11
|
+
|
12
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
13
|
+
|
14
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
15
|
+
|
16
|
+
var _react = _interopRequireDefault(require("react"));
|
17
|
+
|
18
|
+
var Yup = _interopRequireWildcard(require("yup"));
|
19
|
+
|
20
|
+
var _ReusableForm = _interopRequireDefault(require("../../Reusable Components/ReusableForm/ReusableForm"));
|
21
|
+
|
22
|
+
var _TextField = _interopRequireDefault(require("../../Common Inputs/TextField/TextField"));
|
23
|
+
|
24
|
+
var _CustomTextarea = _interopRequireDefault(require("../../Common Inputs/CustomTextarea/CustomTextarea"));
|
25
|
+
|
26
|
+
var _excluded = ["saveBtnText", "cancelBtnText"];
|
27
|
+
|
28
|
+
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); }
|
29
|
+
|
30
|
+
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; }
|
31
|
+
|
32
|
+
var CreateFolder = function CreateFolder(_ref) {
|
33
|
+
var _Object$assign;
|
34
|
+
|
35
|
+
var saveBtnText = _ref.saveBtnText,
|
36
|
+
cancelBtnText = _ref.cancelBtnText,
|
37
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
38
|
+
var initialValues = {
|
39
|
+
title: '',
|
40
|
+
description: ''
|
41
|
+
};
|
42
|
+
var formSchema = Yup.object().shape({
|
43
|
+
title: Yup.string().required("Required")
|
44
|
+
});
|
45
|
+
var sections = [{
|
46
|
+
title: "Folder Name",
|
47
|
+
body: [/*#__PURE__*/_react.default.createElement(_TextField.default, {
|
48
|
+
label: "Title",
|
49
|
+
name: "title"
|
50
|
+
}), /*#__PURE__*/_react.default.createElement(_CustomTextarea.default, {
|
51
|
+
label: "Discription",
|
52
|
+
name: "description"
|
53
|
+
})],
|
54
|
+
hideTitle: true
|
55
|
+
}];
|
56
|
+
|
57
|
+
var onCreate = function onCreate(values) {
|
58
|
+
var folder = (0, _objectSpread2.default)({}, values);
|
59
|
+
var date = new Date();
|
60
|
+
folder.date = date.toISOString().split('T')[0];
|
61
|
+
props.saveHandler(folder);
|
62
|
+
};
|
63
|
+
|
64
|
+
var cancelHandler = function cancelHandler() {
|
65
|
+
props.cancelHandler();
|
66
|
+
};
|
67
|
+
|
68
|
+
return /*#__PURE__*/_react.default.createElement(_ReusableForm.default, Object.assign((_Object$assign = {
|
69
|
+
formTitle: "Add Photo",
|
70
|
+
initialValues: initialValues,
|
71
|
+
formSchema: formSchema,
|
72
|
+
sections: sections,
|
73
|
+
headerStyles: props.headerStyles,
|
74
|
+
saveBtnText: saveBtnText,
|
75
|
+
cancelBtnText: cancelBtnText,
|
76
|
+
saveHandler: onCreate,
|
77
|
+
cancelHandler: cancelHandler
|
78
|
+
}, (0, _defineProperty2.default)(_Object$assign, "headerStyles", {
|
79
|
+
padding: 10,
|
80
|
+
headerBackground: 'black',
|
81
|
+
titleColor: '#ffff'
|
82
|
+
}), (0, _defineProperty2.default)(_Object$assign, "sectionPadding", 10), (0, _defineProperty2.default)(_Object$assign, "bodyRowGap", 10), _Object$assign), props.formStyles));
|
83
|
+
};
|
84
|
+
|
85
|
+
CreateFolder.defaultProps = {};
|
86
|
+
var _default = CreateFolder;
|
87
|
+
exports.default = _default;
|
@@ -0,0 +1,98 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
+
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
6
|
+
value: true
|
7
|
+
});
|
8
|
+
exports.default = void 0;
|
9
|
+
|
10
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
|
11
|
+
|
12
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
13
|
+
|
14
|
+
var _react = _interopRequireDefault(require("react"));
|
15
|
+
|
16
|
+
var Yup = _interopRequireWildcard(require("yup"));
|
17
|
+
|
18
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
19
|
+
|
20
|
+
var _ReusableForm = _interopRequireDefault(require("../../Reusable Components/ReusableForm/ReusableForm"));
|
21
|
+
|
22
|
+
var _TextField = _interopRequireDefault(require("../../Common Inputs/TextField/TextField"));
|
23
|
+
|
24
|
+
var _CustomDropZone = _interopRequireDefault(require("../../Common Inputs/CustomDropzone/CustomDropZone"));
|
25
|
+
|
26
|
+
var _templateObject;
|
27
|
+
|
28
|
+
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); }
|
29
|
+
|
30
|
+
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; }
|
31
|
+
|
32
|
+
var AddSong = function AddSong(props) {
|
33
|
+
var initialValues = {
|
34
|
+
song: null,
|
35
|
+
cover: null,
|
36
|
+
title: '',
|
37
|
+
artist: ''
|
38
|
+
};
|
39
|
+
var formSchema = Yup.object().shape({
|
40
|
+
title: Yup.string().required("Required"),
|
41
|
+
artist: Yup.string().required('Required')
|
42
|
+
});
|
43
|
+
var sections = [{
|
44
|
+
title: "Announcment Details",
|
45
|
+
body: [/*#__PURE__*/_react.default.createElement(_CustomDropZone.default, {
|
46
|
+
fileType: "audio/*",
|
47
|
+
inputContent: "Insert Song",
|
48
|
+
label: "Upload Song",
|
49
|
+
name: "song"
|
50
|
+
}), /*#__PURE__*/_react.default.createElement(_CustomDropZone.default, {
|
51
|
+
inputContent: "Song Cover",
|
52
|
+
label: "Upload Cover",
|
53
|
+
name: "cover"
|
54
|
+
}), /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
55
|
+
label: "Title",
|
56
|
+
name: "title"
|
57
|
+
}), /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
58
|
+
label: "Artist",
|
59
|
+
name: "artist"
|
60
|
+
})],
|
61
|
+
hideTitle: true
|
62
|
+
}];
|
63
|
+
|
64
|
+
var onCreate = function onCreate(values) {
|
65
|
+
var album = (0, _objectSpread2.default)({}, values);
|
66
|
+
var date = new Date();
|
67
|
+
album.date = date;
|
68
|
+
props.saveHandler(album);
|
69
|
+
};
|
70
|
+
|
71
|
+
var cancelHandler = function cancelHandler() {
|
72
|
+
props.cancelHandler();
|
73
|
+
};
|
74
|
+
|
75
|
+
return /*#__PURE__*/_react.default.createElement(Container, null, /*#__PURE__*/_react.default.createElement(_ReusableForm.default, Object.assign({
|
76
|
+
formTitle: "Create Album",
|
77
|
+
initialValues: initialValues,
|
78
|
+
formSchema: formSchema,
|
79
|
+
sections: sections,
|
80
|
+
saveBtnText: props.saveBtnText,
|
81
|
+
cancelBtnText: props.cancelBtnText,
|
82
|
+
saveHandler: onCreate,
|
83
|
+
cancelHandler: cancelHandler,
|
84
|
+
headerStyles: {
|
85
|
+
padding: 10,
|
86
|
+
headerBackground: 'black',
|
87
|
+
titleColor: '#ffff'
|
88
|
+
},
|
89
|
+
sectionPadding: 10,
|
90
|
+
bodyRowGap: 10
|
91
|
+
}, props.formStyles)));
|
92
|
+
};
|
93
|
+
|
94
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\n"])));
|
95
|
+
|
96
|
+
AddSong.defaultProps = {};
|
97
|
+
var _default = AddSong;
|
98
|
+
exports.default = _default;
|
@@ -0,0 +1,38 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
+
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
6
|
+
value: true
|
7
|
+
});
|
8
|
+
exports.default = void 0;
|
9
|
+
|
10
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
11
|
+
|
12
|
+
var _react = _interopRequireDefault(require("react"));
|
13
|
+
|
14
|
+
var _CreateAlbum = _interopRequireDefault(require("../../Forms/CreateAlbum/CreateAlbum"));
|
15
|
+
|
16
|
+
var _ReactModal = _interopRequireDefault(require("../../Reusable Components/ReactModal/ReactModal"));
|
17
|
+
|
18
|
+
var _excluded = ["showModal", "onAddAlbum", "closeModal"];
|
19
|
+
|
20
|
+
var AddPhotoAlbum = function AddPhotoAlbum(_ref) {
|
21
|
+
var showModal = _ref.showModal,
|
22
|
+
onAddAlbum = _ref.onAddAlbum,
|
23
|
+
closeModal = _ref.closeModal,
|
24
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
25
|
+
return /*#__PURE__*/_react.default.createElement(_ReactModal.default, {
|
26
|
+
modalIsOpen: showModal,
|
27
|
+
closeModal: closeModal,
|
28
|
+
exitModalButton: function exitModalButton(e) {
|
29
|
+
return /*#__PURE__*/_react.default.createElement("div", null);
|
30
|
+
}
|
31
|
+
}, /*#__PURE__*/_react.default.createElement(_CreateAlbum.default, {
|
32
|
+
saveHandler: onAddAlbum,
|
33
|
+
cancelHandler: closeModal
|
34
|
+
}));
|
35
|
+
};
|
36
|
+
|
37
|
+
var _default = AddPhotoAlbum;
|
38
|
+
exports.default = _default;
|