@mohamed-karawia/library 0.1.15 → 0.1.19
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/stories/Chat/Chat.js +127 -33
- package/dist/stories/Common Inputs/EditorComponent/EditorComponent.js +4 -2
- package/dist/stories/Common Inputs/Picker/Picker.js +61 -0
- package/dist/stories/Common Inputs/TextField/TextField.js +3 -1
- package/dist/stories/Community/Community.js +137 -0
- package/dist/stories/Enrollment/Admin/CreateForm/CreateForm.js +1 -1
- package/dist/stories/Enrollment/Admin/DetailedForm/DetailedForm.js +11 -23
- package/dist/stories/Enrollment/Admin/ViewForms/ViewForms.js +2 -17
- package/dist/stories/Enrollment/Guest/FillForm/FillForm.js +4 -17
- package/dist/stories/Events/Event/Event.js +117 -5
- package/dist/stories/Events/EventsList/EventsList.js +98 -19
- package/dist/stories/Forms/CreateSpace/CreateSpace.js +75 -0
- package/dist/stories/Library/Folders/Folders.js +82 -7
- package/dist/stories/Library/Notes/Notes.js +78 -4
- package/dist/stories/Library/ViewNote/ViewNote.js +7 -10
- package/dist/stories/Modals/NavbarPreviewModal/NavbarPreviewModal.js +54 -0
- package/dist/stories/Music Album/ViewAlbum/ViewAlbum.js +139 -23
- package/dist/stories/Music Album/ViewAlbums/ViewAlbums.js +70 -34
- package/dist/stories/Navbar/Navbar.js +15 -45
- package/dist/stories/Pages/Chat/Chat.js +13 -1
- package/dist/stories/Pages/Enrollment/DetailedForm/DetailedForm.js +19 -1
- package/dist/stories/Pages/Enrollment/FillForm/FillForm.js +7 -1
- package/dist/stories/Pages/Enrollment/Forms/Forms.js +24 -2
- package/dist/stories/Pages/Events/Event/Event.js +14 -5
- package/dist/stories/Pages/Events/Events/Events.js +1 -0
- package/dist/stories/Pages/Library/Folders/Library.js +7 -1
- package/dist/stories/Pages/Music/MusicAlbum/Music.js +12 -5
- package/dist/stories/Pages/Music/MusicAlbums/MusicAlbums.js +34 -5
- package/dist/stories/Pages/Photos/Album/Album.js +7 -1
- package/dist/stories/Pages/Photos/Albums/Albums.js +38 -2
- package/dist/stories/Photo Album/ViewAlbum/ViewAlbum.js +80 -27
- package/dist/stories/Photo Album/ViewAlbums/ViewAlbums.js +85 -60
- package/dist/stories/Preview/Preview.js +37 -0
- package/dist/stories/PreviewComponents/ChatPreview/ChatPreview.js +193 -0
- package/dist/stories/PreviewComponents/EventPreview/EventPreview.js +158 -0
- package/dist/stories/PreviewComponents/EventsPreview/EventsPreview.js +192 -0
- package/dist/stories/PreviewComponents/FoldersPreview/FoldersPreview.js +182 -0
- package/dist/stories/PreviewComponents/MusicAlbumPreview/MusicAlbumPreview.js +177 -0
- package/dist/stories/PreviewComponents/MusicAlbumsPreview/MusicAlbumsPreview.js +181 -0
- package/dist/stories/PreviewComponents/MusicPlayerPreview/MusicPlayerPreview.js +153 -0
- package/dist/stories/PreviewComponents/NavbarPreview/NavbarPreview.js +112 -0
- package/dist/stories/PreviewComponents/NotesPreview/NotesPreview.js +173 -0
- package/dist/stories/PreviewComponents/PhotoAlbumPreview/PhotoAlbumPreview.js +189 -0
- package/dist/stories/PreviewComponents/PhotoAlbumsPreview/PhotoAlbumsPreview.js +189 -0
- package/dist/stories/PreviewComponents/SpacesListPreview/SpacesListPreview.js +197 -0
- package/dist/stories/PreviewComponents/VideoAlbumPreview/VideoAlbumPreview.js +189 -0
- package/dist/stories/PreviewComponents/VideoAlbumsPreview/VideoAlbumsPreview.js +175 -0
- package/dist/stories/PreviewComponents/VideoPreview/VideoPreview.js +172 -0
- package/dist/stories/PreviewComponents/globalStyles.js +26 -0
- package/dist/stories/Reusable Components/Cards/Card-style-10/CardStyle10.js +10 -5
- package/dist/stories/Reusable Components/Cards/Card-style-11/CardStyle11.js +8 -4
- package/dist/stories/Reusable Components/Cards/Card-style-3/CardStyle3.js +3 -2
- package/dist/stories/Reusable Components/Cards/Card-style-6/CardStyle6.js +10 -4
- package/dist/stories/Reusable Components/Cards/Card-style-8/CardStyle8.js +4 -2
- package/dist/stories/Reusable Components/Cards/Card-style-9/CardStyle9.js +26 -15
- package/dist/stories/Reusable Components/Cards/globalCardStyles.js +3 -3
- package/dist/stories/Reusable Components/Community/Community.js +76 -0
- package/dist/stories/Reusable Components/Gallery/Gallery.js +17 -18
- package/dist/stories/Reusable Components/ReactModal/ReactModal.js +11 -30
- package/dist/stories/Reusable Components/ReusableForm/ReusableForm.js +20 -3
- package/dist/stories/Reusable Components/ReusableList/ReusableList.js +15 -9
- package/dist/stories/Reusable Components/Tabs/Tabs.js +68 -0
- package/dist/stories/Sections/Sections.js +67 -0
- package/dist/stories/VideoAlbum/AlbumsGallery/AlbumsGallery.js +77 -18
- package/dist/stories/VideoAlbum/VideoSpace/VideoSpace.js +96 -3
- package/dist/stories/VideoAlbum/ViewAlbum/ViewAlbum.js +78 -5
- package/dist/stories/Widgets/MusicPlayerWidget/MusicPlayerWidget.js +17 -11
- package/dist/stories/Widgets/SpacesListWidget/SpacesListWidget.js +115 -0
- package/dist/stories/Widgets/UsersWidget/UsersWidget.js +30 -0
- package/dist/stories/helpers/util.js +70 -7
- package/dist/stories/store/communities.js +943 -0
- package/dist/stories/store/store.js +44 -0
- package/package.json +5 -2
- package/src/stories/Chat/Chat.jsx +109 -35
- package/src/stories/Common Inputs/EditorComponent/EditorComponent.jsx +3 -3
- package/src/stories/Common Inputs/Picker/Picker.jsx +47 -0
- package/src/stories/Common Inputs/TextField/TextField.jsx +1 -1
- package/src/stories/Community/Community.jsx +110 -0
- package/src/stories/Enrollment/Admin/CreateForm/CreateForm.jsx +1 -0
- package/src/stories/Enrollment/Admin/DetailedForm/DetailedForm.jsx +8 -19
- package/src/stories/Enrollment/Admin/ViewForms/ViewForms.jsx +3 -17
- package/src/stories/Enrollment/Guest/FillForm/FillForm.jsx +6 -16
- package/src/stories/Events/Event/Event.jsx +98 -5
- package/src/stories/Events/EventsList/EventsList.jsx +101 -22
- package/src/stories/Forms/CreateSpace/CreateSpace.jsx +73 -0
- package/src/stories/Library/Folders/Folders.jsx +82 -8
- package/src/stories/Library/Notes/Notes.jsx +65 -5
- package/src/stories/Library/ViewNote/ViewNote.jsx +1 -12
- package/src/stories/Modals/NavbarPreviewModal/NavbarPreviewModal.jsx +31 -0
- package/src/stories/Music Album/ViewAlbum/ViewAlbum.jsx +133 -21
- package/src/stories/Music Album/ViewAlbums/ViewAlbums.jsx +62 -36
- package/src/stories/Navbar/Navbar.jsx +51 -49
- package/src/stories/Pages/Chat/Chat.jsx +17 -4
- package/src/stories/Pages/Enrollment/DetailedForm/DetailedForm.jsx +20 -1
- package/src/stories/Pages/Enrollment/FillForm/FillForm.jsx +6 -0
- package/src/stories/Pages/Enrollment/Forms/Forms.jsx +23 -1
- package/src/stories/Pages/Events/Event/Event.jsx +12 -4
- package/src/stories/Pages/Events/Events/Events.jsx +75 -74
- package/src/stories/Pages/Library/Folders/Library.jsx +7 -1
- package/src/stories/Pages/Music/MusicAlbum/Music.jsx +16 -8
- package/src/stories/Pages/Music/MusicAlbums/MusicAlbums.jsx +28 -27
- package/src/stories/Pages/Photos/Album/Album.jsx +7 -1
- package/src/stories/Pages/Photos/Albums/Albums.jsx +25 -20
- package/src/stories/Photo Album/ViewAlbum/ViewAlbum.jsx +63 -21
- package/src/stories/Photo Album/ViewAlbums/ViewAlbums.jsx +65 -66
- package/src/stories/Preview/Preview.jsx +35 -0
- package/src/stories/PreviewComponents/ChatPreview/ChatPreview.jsx +132 -0
- package/src/stories/PreviewComponents/EventPreview/EventPreview.jsx +116 -0
- package/src/stories/PreviewComponents/EventsPreview/EventsPreview.jsx +132 -0
- package/src/stories/PreviewComponents/FoldersPreview/FoldersPreview.jsx +127 -0
- package/src/stories/PreviewComponents/MusicAlbumPreview/MusicAlbumPreview.jsx +124 -0
- package/src/stories/PreviewComponents/MusicAlbumsPreview/MusicAlbumsPreview.jsx +126 -0
- package/src/stories/PreviewComponents/MusicPlayerPreview/MusicPlayerPreview.jsx +113 -0
- package/src/stories/PreviewComponents/NavbarPreview/NavbarPreview.jsx +93 -0
- package/src/stories/PreviewComponents/NotesPreview/NotesPreview.jsx +122 -0
- package/src/stories/PreviewComponents/PhotoAlbumPreview/PhotoAlbumPreview.jsx +129 -0
- package/src/stories/PreviewComponents/PhotoAlbumsPreview/PhotoAlbumsPreview.jsx +129 -0
- package/src/stories/PreviewComponents/SpacesListPreview/SpacesListPreview.jsx +138 -0
- package/src/stories/PreviewComponents/VideoAlbumPreview/VideoAlbumPreview.jsx +129 -0
- package/src/stories/PreviewComponents/VideoAlbumsPreview/VideoAlbumsPreview.jsx +124 -0
- package/src/stories/PreviewComponents/VideoPreview/VideoPreview.jsx +125 -0
- package/src/stories/PreviewComponents/globalStyles.js +20 -0
- package/src/stories/Reusable Components/Cards/Card-style-10/CardStyle10.jsx +13 -6
- package/src/stories/Reusable Components/Cards/Card-style-11/CardStyle11.jsx +5 -5
- package/src/stories/Reusable Components/Cards/Card-style-3/CardStyle3.jsx +5 -2
- package/src/stories/Reusable Components/Cards/Card-style-6/CardStyle6.jsx +12 -6
- package/src/stories/Reusable Components/Cards/Card-style-8/CardStyle8.jsx +2 -2
- package/src/stories/Reusable Components/Cards/Card-style-9/CardStyle9.jsx +12 -8
- package/src/stories/Reusable Components/Cards/globalCardStyles.js +3 -2
- package/src/stories/Reusable Components/Community/Community.jsx +70 -0
- package/src/stories/Reusable Components/Gallery/Gallery.jsx +15 -10
- package/src/stories/Reusable Components/ReactModal/ReactModal.jsx +3 -25
- package/src/stories/Reusable Components/ReusableForm/ReusableForm.jsx +19 -7
- package/src/stories/Reusable Components/ReusableHeader/ReusableHeader.jsx +0 -2
- package/src/stories/Reusable Components/ReusableList/ReusableList.jsx +24 -8
- package/src/stories/Reusable Components/Tabs/Tabs.jsx +67 -0
- package/src/stories/Sections/Sections.jsx +56 -0
- package/src/stories/VideoAlbum/AlbumsGallery/AlbumsGallery.jsx +57 -16
- package/src/stories/VideoAlbum/VideoSpace/VideoSpace.jsx +70 -1
- package/src/stories/VideoAlbum/ViewAlbum/ViewAlbum.jsx +65 -8
- package/src/stories/Widgets/MusicPlayerWidget/MusicPlayerWidget.jsx +14 -7
- package/src/stories/Widgets/SpacesListWidget/SpacesListWidget.jsx +78 -0
- package/src/stories/Widgets/UsersWidget/UsersWidget.jsx +20 -0
- package/src/stories/helpers/util.js +50 -6
- package/src/stories/store/communities.js +705 -0
- package/src/stories/store/store.js +33 -0
- package/src/stories/styling.json +92 -0
@@ -73,6 +73,10 @@ const Forms = (props) => {
|
|
73
73
|
console.log(cardProps)
|
74
74
|
}
|
75
75
|
|
76
|
+
const onAction = (action, index) => {
|
77
|
+
console.log(action)
|
78
|
+
}
|
79
|
+
|
76
80
|
return (
|
77
81
|
<BaseMaterial {...worldStyles.containerStyle} {...props}>
|
78
82
|
<Navbar />
|
@@ -112,13 +116,31 @@ const Forms = (props) => {
|
|
112
116
|
</Left>
|
113
117
|
<Center>
|
114
118
|
<SpaceContainer
|
115
|
-
title="Music Album"
|
116
119
|
discription="Lorem ipsum dolor sit amet consectetur."
|
117
120
|
hideTitle
|
118
121
|
>
|
119
122
|
<ViewForms
|
120
123
|
data={forms}
|
121
124
|
cardClicked={cardClicked}
|
125
|
+
cardIconClicked={onAction}
|
126
|
+
headerStyles={{
|
127
|
+
padding: 10,
|
128
|
+
headerBackground: '#FE1744',
|
129
|
+
titleColor: '#ffff',
|
130
|
+
controlsStyles: {
|
131
|
+
dropdownBackground: 'black',
|
132
|
+
dropdownFontColor: 'white',
|
133
|
+
dropdownItemHoverColor: '#FE1744'
|
134
|
+
},
|
135
|
+
}}
|
136
|
+
sectionHeaderStyles={{
|
137
|
+
cardTitleColor: 'white',
|
138
|
+
cardBackgroundColor: 'black',
|
139
|
+
cardPadding: 10
|
140
|
+
}}
|
141
|
+
customCardStyles={{
|
142
|
+
cardBackgroundColor: 'white'
|
143
|
+
}}
|
122
144
|
/>
|
123
145
|
|
124
146
|
</SpaceContainer>
|
@@ -11,7 +11,6 @@ import BaseMaterial from '../../../Containers/BaseMaterial';
|
|
11
11
|
import SpaceContainer from "../../../Reusable Components/SpaceContainer/SpaceContainer";
|
12
12
|
import WidgetContainer from "../../../Reusable Components/WidgetContainer/WidgetContainer";
|
13
13
|
import DetailedEvent from '../../../Events/Event/Event';
|
14
|
-
import { addObjectToArray, deleteFromArrayByIndex } from '../../../helpers/util';
|
15
14
|
|
16
15
|
import worldStyles from '../../ViewWorld/styles.json';
|
17
16
|
|
@@ -30,16 +29,25 @@ const Event = (props) => {
|
|
30
29
|
}}
|
31
30
|
/>
|
32
31
|
<WidgetContainer
|
33
|
-
widgetType='list'
|
32
|
+
widgetType='spaces-list'
|
34
33
|
widgetProps={{
|
35
34
|
listTitle: 'Your Spaces',
|
36
35
|
type: 'sectioned',
|
37
|
-
|
36
|
+
spaces: SPACES,
|
38
37
|
cardStyle: 'card-style-3',
|
38
|
+
cardClicked: () => alert('clicked'),
|
39
|
+
headerStyles:{
|
40
|
+
headerBackground: 'purple',
|
41
|
+
padding: 3,
|
42
|
+
controlsStyles:{
|
43
|
+
iconColor: 'white',
|
44
|
+
iconsGap: 5
|
45
|
+
}
|
46
|
+
},
|
39
47
|
sectionHeaderStyles: {
|
40
48
|
cardBorderSize: 2,
|
41
49
|
cardPadding: 2,
|
42
|
-
|
50
|
+
headerBackground: 'red',
|
43
51
|
cardBorderColor: 'black',
|
44
52
|
},
|
45
53
|
customCardStyles: {
|
@@ -19,11 +19,11 @@ import { SPACES } from '../../ViewWorld/constatnts';
|
|
19
19
|
const Events = (props) => {
|
20
20
|
|
21
21
|
const [events, setEvents] = useState([
|
22
|
-
{title: 'Event one', date: '15-11-2020 : 5-8-2021'},
|
23
|
-
{title: 'Event two', date: '14-12-2020 : 14-4-2023'},
|
24
|
-
{title: 'Event three', date: '5-6-2021 : 5-8-2021'},
|
25
|
-
{title: 'Event four', date: '14-4-2023'},
|
26
|
-
{title: 'Event five', date: '5-6-2021 : 14-4-2023'},
|
22
|
+
{ title: 'Event one', date: '15-11-2020 : 5-8-2021' },
|
23
|
+
{ title: 'Event two', date: '14-12-2020 : 14-4-2023' },
|
24
|
+
{ title: 'Event three', date: '5-6-2021 : 5-8-2021' },
|
25
|
+
{ title: 'Event four', date: '14-4-2023' },
|
26
|
+
{ title: 'Event five', date: '5-6-2021 : 14-4-2023' },
|
27
27
|
])
|
28
28
|
|
29
29
|
const onAddEvent = (event) => {
|
@@ -35,7 +35,7 @@ const Events = (props) => {
|
|
35
35
|
case 'delete':
|
36
36
|
deleteEvent(index)
|
37
37
|
break;
|
38
|
-
|
38
|
+
|
39
39
|
default:
|
40
40
|
break;
|
41
41
|
}
|
@@ -48,80 +48,81 @@ const Events = (props) => {
|
|
48
48
|
const cardClicked = (index, cardProps) => {
|
49
49
|
console.log(cardProps)
|
50
50
|
}
|
51
|
-
|
51
|
+
|
52
52
|
return (
|
53
53
|
<BaseMaterial {...worldStyles.containerStyle} {...props}>
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
/>
|
88
|
-
</Left>
|
89
|
-
<Center>
|
90
|
-
<SpaceContainer
|
91
|
-
title="Music Album"
|
92
|
-
discription="Lorem ipsum dolor sit amet consectetur."
|
93
|
-
hideTitle
|
94
|
-
>
|
95
|
-
<EventsList
|
96
|
-
events={events}
|
97
|
-
iconColor='#FE1744'
|
98
|
-
cardTitleFontSize={15}
|
99
|
-
onAddEvent={onAddEvent}
|
100
|
-
cardIconClicked={cardIconClicked}
|
101
|
-
cardClicked={cardClicked}
|
102
|
-
headerStyles={{
|
103
|
-
padding: 10,
|
104
|
-
headerBackground: '#FE1744',
|
105
|
-
titleColor: '#ffff',
|
106
|
-
controlsStyles: {
|
107
|
-
iconSize: 25
|
108
|
-
}
|
109
|
-
}}
|
110
|
-
customCardStyles={{
|
111
|
-
controlsStyles: {
|
112
|
-
iconColor: '#FE1744'
|
113
|
-
}
|
114
|
-
}}
|
54
|
+
<Navbar />
|
55
|
+
<Body {...worldStyles.bodyStyle}>
|
56
|
+
<Left>
|
57
|
+
<WidgetContainer
|
58
|
+
widgetType='logo'
|
59
|
+
widgetProps={{
|
60
|
+
imgUrl: props.imgUrl,
|
61
|
+
}}
|
62
|
+
/>
|
63
|
+
<WidgetContainer
|
64
|
+
widgetType='list'
|
65
|
+
widgetProps={{
|
66
|
+
listTitle: 'Your Spaces',
|
67
|
+
type: 'sectioned',
|
68
|
+
data: SPACES,
|
69
|
+
cardStyle: 'card-style-3',
|
70
|
+
sectionHeaderStyles: {
|
71
|
+
cardBorderSize: 2,
|
72
|
+
cardPadding: 2,
|
73
|
+
cardBackgroundColor: '#fff',
|
74
|
+
cardBorderColor: 'black',
|
75
|
+
},
|
76
|
+
customCardStyles: {
|
77
|
+
cardPadding: 6,
|
78
|
+
cardTitleFontSize: 15,
|
79
|
+
cardBackgroundColor: 'black',
|
80
|
+
cardTitleColor: 'white',
|
81
|
+
onHoverBackgroundColor: '#F6891F',
|
82
|
+
controlsStyles: {
|
83
|
+
showOnHover: true,
|
84
|
+
}
|
85
|
+
},
|
86
|
+
}}
|
115
87
|
/>
|
88
|
+
</Left>
|
89
|
+
<Center>
|
90
|
+
<SpaceContainer
|
91
|
+
title="Music Album"
|
92
|
+
discription="Lorem ipsum dolor sit amet consectetur."
|
93
|
+
hideTitle
|
94
|
+
>
|
95
|
+
<EventsList
|
96
|
+
events={events}
|
97
|
+
iconColor='#FE1744'
|
98
|
+
cardTitleFontSize={15}
|
99
|
+
onAddEvent={onAddEvent}
|
100
|
+
cardIconClicked={cardIconClicked}
|
101
|
+
cardClicked={cardClicked}
|
102
|
+
headerStyles={{
|
103
|
+
padding: 10,
|
104
|
+
headerBackground: '#FE1744',
|
105
|
+
titleColor: '#ffff',
|
106
|
+
controlsStyles: {
|
107
|
+
iconSize: 25
|
108
|
+
}
|
109
|
+
}}
|
110
|
+
customCardStyles={{
|
111
|
+
cardBackgroundColor: 'white',
|
112
|
+
controlsStyles: {
|
113
|
+
iconColor: '#FE1744',
|
114
|
+
}
|
115
|
+
}}
|
116
|
+
/>
|
116
117
|
|
117
|
-
|
118
|
+
</SpaceContainer>
|
118
119
|
|
119
|
-
|
120
|
-
|
120
|
+
</Center>
|
121
|
+
<Right>
|
121
122
|
|
122
|
-
|
123
|
-
|
124
|
-
|
123
|
+
</Right>
|
124
|
+
</Body>
|
125
|
+
</BaseMaterial>
|
125
126
|
)
|
126
127
|
}
|
127
128
|
|
@@ -46,6 +46,10 @@ const Library = (props) => {
|
|
46
46
|
setFolders(deleteFromArrayByIndex(folders, index))
|
47
47
|
}
|
48
48
|
|
49
|
+
const cardClicked = (index, cardProps) => {
|
50
|
+
console.log(cardProps)
|
51
|
+
}
|
52
|
+
|
49
53
|
return (
|
50
54
|
<BaseMaterial {...worldStyles.containerStyle} {...props}>
|
51
55
|
<Navbar />
|
@@ -80,6 +84,7 @@ const Library = (props) => {
|
|
80
84
|
showOnHover: true,
|
81
85
|
}
|
82
86
|
},
|
87
|
+
cardClicked
|
83
88
|
}}
|
84
89
|
/>
|
85
90
|
</Left>
|
@@ -95,6 +100,7 @@ const Library = (props) => {
|
|
95
100
|
columnsNumber={3}
|
96
101
|
onAddFolder={onAddFolder}
|
97
102
|
cardIconClicked={cardIconClicked}
|
103
|
+
cardClicked={cardClicked}
|
98
104
|
headerStyles={{
|
99
105
|
padding: 10,
|
100
106
|
headerBackground: '#ff2d2d',
|
@@ -105,7 +111,7 @@ const Library = (props) => {
|
|
105
111
|
}}
|
106
112
|
customCardStyles={{
|
107
113
|
cardPadding: 10,
|
108
|
-
iconColor: '#ff2d2d'
|
114
|
+
iconColor: '#ff2d2d',
|
109
115
|
}}
|
110
116
|
|
111
117
|
/>
|
@@ -26,12 +26,12 @@ import img6 from '../../../assets/images/music6.jpg';
|
|
26
26
|
const Music = (props) => {
|
27
27
|
const [currentSong, setCurrentSong] = useState(0)
|
28
28
|
const [album, setAlbum] = useState([
|
29
|
-
{ index: 0, cover: img4, musicSrc: 'https://www.pacdv.com/sounds/free-music/
|
29
|
+
{ index: 0, cover: img4, musicSrc: 'https://www.pacdv.com/sounds/free-music/gentle-thoughts-1.mp3', title: 'Plans We Made', description: 'Son Lux', time: '5:20' },
|
30
30
|
{ index: 2, cover: img6, musicSrc: 'https://www.pacdv.com/sounds/free-music/kickstarter.mp3', title: 'Still Loving You', description: 'Scorpions', time: '4:20' },
|
31
|
-
{ index: 1, cover: img5, musicSrc: 'https://www.pacdv.com/sounds/free-music/
|
31
|
+
{ index: 1, cover: img5, musicSrc: 'https://www.pacdv.com/sounds/free-music/glow-in-the-dark.mp3', title: 'Night', description: 'Frank Ocean', time: '5:20' },
|
32
32
|
{ index: 3, cover: img1, musicSrc: 'https://www.pacdv.com/sounds/free-music/kickstarter.mp3', title: 'Somebody Else', description: '1975', time: '5:20' },
|
33
|
-
{ index: 4, cover: img3, musicSrc: 'https://www.pacdv.com/sounds/free-music/
|
34
|
-
{ index: 5, cover: img2, musicSrc: 'https://www.pacdv.com/sounds/free-music/
|
33
|
+
{ index: 4, cover: img3, musicSrc: 'https://www.pacdv.com/sounds/free-music/gentle-thoughts-1.mp3', title: 'Enter Sandman', description: 'Metallica', time: '5:20' },
|
34
|
+
{ index: 5, cover: img2, musicSrc: 'https://www.pacdv.com/sounds/free-music/glow-in-the-dark.mp3', title: 'November Rain', description: "Guns N' Roses", time: '5:20' },
|
35
35
|
])
|
36
36
|
|
37
37
|
const nextSong = () => {
|
@@ -66,7 +66,7 @@ const Music = (props) => {
|
|
66
66
|
case 'delete':
|
67
67
|
deleteSonngFromAlbum(index)
|
68
68
|
break;
|
69
|
-
|
69
|
+
|
70
70
|
default:
|
71
71
|
break;
|
72
72
|
}
|
@@ -129,9 +129,16 @@ const Music = (props) => {
|
|
129
129
|
headerBackground: 'black',
|
130
130
|
titleColor: '#ffff',
|
131
131
|
controlsStyles: {
|
132
|
-
|
132
|
+
iconSize: 25
|
133
|
+
}
|
134
|
+
}}
|
135
|
+
customCardStyles={{
|
136
|
+
cardBackgroundColor: 'white',
|
137
|
+
controlsStyles: {
|
138
|
+
iconColor: 'black'
|
133
139
|
}
|
134
|
-
|
140
|
+
}}
|
141
|
+
/>
|
135
142
|
</SpaceContainer>
|
136
143
|
|
137
144
|
</Center>
|
@@ -149,7 +156,8 @@ const Music = (props) => {
|
|
149
156
|
prevSong: prevSong,
|
150
157
|
currentSong: currentSong,
|
151
158
|
borderRadius: '10',
|
152
|
-
primaryColor: 'black'
|
159
|
+
primaryColor: 'black',
|
160
|
+
backgroundColor: 'white'
|
153
161
|
}}
|
154
162
|
headerStyles={{
|
155
163
|
controlsStyles: {
|
@@ -60,6 +60,15 @@ const MusicAlbums = (props) => {
|
|
60
60
|
const cardClicked = (index, cardProps) => {
|
61
61
|
console.log(cardProps)
|
62
62
|
}
|
63
|
+
|
64
|
+
const notes = [
|
65
|
+
{title: 'Study notes', date: '15/11/2020'},
|
66
|
+
{title: 'Music notes', date: '14/12/2020'},
|
67
|
+
{title: 'Workout notes', date: '5/8/2021'},
|
68
|
+
{title: 'Gaming notes', date: '14/4/2023'},
|
69
|
+
{title: 'Working notes', date: '5/6/2021'},
|
70
|
+
]
|
71
|
+
|
63
72
|
return (
|
64
73
|
<BaseMaterial {...worldStyles.containerStyle} {...props}>
|
65
74
|
<Navbar />
|
@@ -90,9 +99,6 @@ const MusicAlbums = (props) => {
|
|
90
99
|
cardBackgroundColor: 'black',
|
91
100
|
cardTitleColor: 'white',
|
92
101
|
onHoverBackgroundColor: '#F6891F',
|
93
|
-
controlsStyles: {
|
94
|
-
showOnHover: true,
|
95
|
-
}
|
96
102
|
},
|
97
103
|
}}
|
98
104
|
/>
|
@@ -104,7 +110,7 @@ const MusicAlbums = (props) => {
|
|
104
110
|
hideTitle
|
105
111
|
>
|
106
112
|
<ViewAlbums
|
107
|
-
|
113
|
+
title="Music Albums"
|
108
114
|
albums={albums}
|
109
115
|
cardIconClicked={cardIconClicked}
|
110
116
|
onAddAlbum={onAddAlbum}
|
@@ -116,34 +122,29 @@ const MusicAlbums = (props) => {
|
|
116
122
|
iconSize: 25
|
117
123
|
}
|
118
124
|
}}
|
125
|
+
customCardStyles={{
|
126
|
+
darkOnHover: true,
|
127
|
+
}}
|
119
128
|
cardClicked={cardClicked}
|
120
|
-
|
129
|
+
/>
|
121
130
|
</SpaceContainer>
|
122
131
|
|
123
132
|
</Center>
|
124
133
|
<Right>
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
}}
|
140
|
-
headerStyles={{
|
141
|
-
controlsStyles: {
|
142
|
-
iconColor: 'red',
|
143
|
-
},
|
144
|
-
}}
|
145
|
-
/> */}
|
146
|
-
|
134
|
+
<WidgetContainer
|
135
|
+
widgetType='notes'
|
136
|
+
widgetProps={{
|
137
|
+
notes,
|
138
|
+
headerStyles:{
|
139
|
+
padding: 10,
|
140
|
+
headerBackground: 'black',
|
141
|
+
titleColor: '#ffff',
|
142
|
+
controlsStyles: {
|
143
|
+
iconSize: 25
|
144
|
+
}
|
145
|
+
}}
|
146
|
+
}
|
147
|
+
/>
|
147
148
|
</Right>
|
148
149
|
</Body>
|
149
150
|
</BaseMaterial>
|
@@ -105,7 +105,13 @@ const Album = (props) => {
|
|
105
105
|
addPhoto={onAddPhoto}
|
106
106
|
deletePhoto={onDeletePhoto}
|
107
107
|
cardIconClicked={cardIconClicked}
|
108
|
-
columnsNumber={2}
|
108
|
+
columnsNumber={2}
|
109
|
+
headerStyles={{
|
110
|
+
padding: 10,
|
111
|
+
controlsStyles: {
|
112
|
+
iconSize: 25
|
113
|
+
}
|
114
|
+
}} />
|
109
115
|
</SpaceContainer>
|
110
116
|
|
111
117
|
</Center>
|
@@ -36,6 +36,15 @@ const Albums = (props) => {
|
|
36
36
|
{ img: img6, title: 'Album 6', count: '24' },
|
37
37
|
])
|
38
38
|
|
39
|
+
const folders = [
|
40
|
+
{ title: 'Folder one', description: 'Discription for folder one' },
|
41
|
+
{ title: 'Folder two', description: 'Discription for folder two' },
|
42
|
+
{ title: 'Folder three', description: 'Discription for folder three' },
|
43
|
+
{ title: 'Folder four', description: 'Discription for folder four' },
|
44
|
+
{ title: 'Folder five', description: 'Discription for folder five' },
|
45
|
+
{ title: 'Folder six', description: 'Discription for folder six' },
|
46
|
+
]
|
47
|
+
|
39
48
|
const cardIconClicked = (action, index) => {
|
40
49
|
switch (action) {
|
41
50
|
case 'delete':
|
@@ -113,32 +122,28 @@ const Albums = (props) => {
|
|
113
122
|
onAddAlbum={onAddAlbum}
|
114
123
|
columnsNumber={2}
|
115
124
|
cardClicked={cardClicked}
|
125
|
+
customCardStyles={{
|
126
|
+
cardBackgroundColor: 'white'
|
127
|
+
}}
|
116
128
|
/>
|
117
129
|
</SpaceContainer>
|
118
130
|
|
119
131
|
</Center>
|
120
132
|
<Right>
|
121
|
-
|
122
|
-
widgetType='
|
123
|
-
controlsStyles={{
|
124
|
-
iconColor: 'black',
|
125
|
-
dropdownBackground: 'black',
|
126
|
-
dropdownFontColor: 'white',
|
127
|
-
}}
|
133
|
+
<WidgetContainer
|
134
|
+
widgetType='folders'
|
128
135
|
widgetProps={{
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
}}
|
141
|
-
/> */}
|
136
|
+
folders,
|
137
|
+
columnsNumber: 3,
|
138
|
+
customCardStyles:{
|
139
|
+
cardPadding: 10,
|
140
|
+
iconColor: '#ff2d2d',
|
141
|
+
controlsStyles: {
|
142
|
+
iconColor:'#FE1744'
|
143
|
+
}
|
144
|
+
}}
|
145
|
+
}
|
146
|
+
/>
|
142
147
|
|
143
148
|
</Right>
|
144
149
|
</Body>
|
@@ -6,10 +6,19 @@ import AddPhoto from '../../Forms/AddPhoto/AddPhoto'
|
|
6
6
|
import Gallery from '../../Reusable Components/Gallery/Gallery';
|
7
7
|
import Modal from '../../Reusable Components/ReactModal/ReactModal';
|
8
8
|
import DetailedPhoto from '../DetailedPhoto/DetailedPhoto';
|
9
|
+
import PhotoAlbumPreview from '../../PreviewComponents/PhotoAlbumPreview/PhotoAlbumPreview';
|
10
|
+
import Tabs from '../../Reusable Components/Tabs/Tabs';
|
11
|
+
import Sections from '../../Sections/Sections';
|
12
|
+
import Community from '../../Reusable Components/Community/Community';
|
13
|
+
|
14
|
+
|
9
15
|
import { AiOutlineArrowLeft, AiOutlineArrowRight, AiOutlineClose, AiOutlineFileAdd, AiFillDelete } from "react-icons/ai";
|
16
|
+
import { BsGear } from "react-icons/bs";
|
17
|
+
|
10
18
|
|
11
19
|
const galleryControls = [
|
12
20
|
{ icon: (<AiOutlineFileAdd />), action: 'add', name: 'Add Photo' },
|
21
|
+
{ icon: (<BsGear />), action: 'config', name: 'Config' },
|
13
22
|
]
|
14
23
|
|
15
24
|
const cardControls = [
|
@@ -20,9 +29,6 @@ const ViewAlbum = ({
|
|
20
29
|
album,
|
21
30
|
cardBackgroundColor,
|
22
31
|
imgTitleColor,
|
23
|
-
columnsNumber,
|
24
|
-
columnGap,
|
25
|
-
rowGap,
|
26
32
|
descColor,
|
27
33
|
...props
|
28
34
|
}) => {
|
@@ -49,10 +55,27 @@ const ViewAlbum = ({
|
|
49
55
|
}
|
50
56
|
}
|
51
57
|
|
52
|
-
const [showModal, setShowModal] = useState(false)
|
53
|
-
const [
|
58
|
+
const [showModal, setShowModal] = useState(false);
|
59
|
+
const [showConfigModal, setShowConfigModal] = useState(false);
|
60
|
+
const [showImgModal, setShowImgModal] = useState(false);
|
54
61
|
const [openedImgIndex, setOpenedImgIndex] = useState(null);
|
55
|
-
const [openedImg, setOpenedImg] = useState(null)
|
62
|
+
const [openedImg, setOpenedImg] = useState(null);
|
63
|
+
|
64
|
+
const [centerContext, setCenterContext] = useState(<ViewAlbum album={album} />)
|
65
|
+
|
66
|
+
const formChanged = (values) => {
|
67
|
+
setCenterContext(<ViewAlbum album={album} {...values} />)
|
68
|
+
}
|
69
|
+
|
70
|
+
let tabs = [
|
71
|
+
{
|
72
|
+
title: 'New', id: 'preview'
|
73
|
+
},
|
74
|
+
{
|
75
|
+
title: 'Context', id: 'community'
|
76
|
+
}
|
77
|
+
]
|
78
|
+
|
56
79
|
|
57
80
|
const handleUserKeyPress = useCallback(event => {
|
58
81
|
const { key } = event;
|
@@ -73,13 +96,18 @@ const ViewAlbum = ({
|
|
73
96
|
case 'add':
|
74
97
|
setShowModal(true)
|
75
98
|
break;
|
99
|
+
case 'config':
|
100
|
+
setShowConfigModal(true)
|
101
|
+
break;
|
76
102
|
default:
|
77
103
|
break;
|
78
104
|
}
|
79
105
|
}
|
80
106
|
|
81
107
|
const cardIconClicked = (action, index) => {
|
82
|
-
props.
|
108
|
+
if (!props.preview) {
|
109
|
+
props.cardIconClicked(action, index)
|
110
|
+
}
|
83
111
|
}
|
84
112
|
|
85
113
|
const onAddPhoto = (photo) => {
|
@@ -111,21 +139,10 @@ const ViewAlbum = ({
|
|
111
139
|
return (
|
112
140
|
<Container>
|
113
141
|
<Gallery
|
114
|
-
galleryTitle="Photo Album"
|
142
|
+
galleryTitle={props.title || "Photo Album"}
|
115
143
|
data={album}
|
116
144
|
type="flat"
|
117
145
|
cardStyle="card-style-6"
|
118
|
-
headerStyles={{
|
119
|
-
padding: 10,
|
120
|
-
headerBackground: props.headerBackground,
|
121
|
-
titleColor: props.titleColor,
|
122
|
-
controlsStyles: {
|
123
|
-
iconSize: 25
|
124
|
-
}
|
125
|
-
}}
|
126
|
-
columnsNumber={columnsNumber}
|
127
|
-
galleryColumnGap={columnGap}
|
128
|
-
galleryRowGap={rowGap}
|
129
146
|
galleryControls={galleryControls}
|
130
147
|
iconClicked={onIconClicked}
|
131
148
|
cardClicked={cardClicked}
|
@@ -143,8 +160,8 @@ const ViewAlbum = ({
|
|
143
160
|
<AddPhoto
|
144
161
|
saveHandler={onAddPhoto}
|
145
162
|
cancelHandler={cancelHandler}
|
146
|
-
saveBtnText={'Add'}
|
147
|
-
cancelBtnText={'Cancel'} />
|
163
|
+
saveBtnText={props.saveBtnText || 'Add'}
|
164
|
+
cancelBtnText={props.saveBtnText || 'Cancel'} />
|
148
165
|
</Modal>
|
149
166
|
<Modal
|
150
167
|
modalIsOpen={showImgModal}
|
@@ -168,6 +185,27 @@ const ViewAlbum = ({
|
|
168
185
|
<AiOutlineArrowRight />
|
169
186
|
</RightIconContainer>
|
170
187
|
</Modal>
|
188
|
+
<Modal
|
189
|
+
modalIsOpen={showConfigModal}
|
190
|
+
closeModal={() => setShowConfigModal(false)}
|
191
|
+
exitModalButton={(e) => (
|
192
|
+
<div></div>
|
193
|
+
)}
|
194
|
+
>
|
195
|
+
<Tabs
|
196
|
+
title="Photo Album Config"
|
197
|
+
tabs={tabs}
|
198
|
+
id='styling'
|
199
|
+
>
|
200
|
+
<PhotoAlbumPreview
|
201
|
+
componentProps={{ album, title: props.title || 'Photo Album', preview: true }}
|
202
|
+
formChanged={formChanged}
|
203
|
+
/>
|
204
|
+
<Community
|
205
|
+
center={centerContext}
|
206
|
+
id="community" />
|
207
|
+
</Tabs>
|
208
|
+
</Modal>
|
171
209
|
</Container>
|
172
210
|
)
|
173
211
|
}
|
@@ -245,6 +283,10 @@ ViewAlbum.propTypes = {
|
|
245
283
|
cardBackgroundColor: PropTypes.string,
|
246
284
|
imgTitleColor: PropTypes.string,
|
247
285
|
descColor: PropTypes.string,
|
286
|
+
title: PropTypes.string,
|
287
|
+
saveBtnText: PropTypes.string,
|
288
|
+
saveBtnText: PropTypes.string,
|
289
|
+
preview: PropTypes.bool
|
248
290
|
}
|
249
291
|
|
250
292
|
export default ViewAlbum;
|