@mohamed-karawia/library 0.1.20 → 0.1.23
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.js +27 -27
- package/dist/stories/Chat/Chat.js +24 -31
- package/dist/stories/Community/Community.js +54 -34
- package/dist/stories/Events/Event/Event.js +13 -6
- package/dist/stories/Events/EventsList/EventsList.js +14 -11
- package/dist/stories/Forms/AddPhoto/AddPhoto.js +8 -7
- package/dist/stories/Forms/CreateEvent/CreateEvent.js +115 -0
- package/dist/stories/Forms/CreateFolder/CreateFolder.js +87 -0
- package/dist/stories/Forms/CreateSong/CreateSong.js +98 -0
- package/dist/stories/Library/Folders/Folders.js +27 -21
- package/dist/stories/Library/Notes/Notes.js +29 -18
- package/dist/stories/Modals/AddPhotoAlbum/AddPhotoAlbum.js +38 -0
- package/dist/stories/Modals/AddPhotoModal/AddPhotoModal.js +40 -0
- package/dist/stories/Modals/AddSongModal/AddSongModal.js +41 -0
- package/dist/stories/Modals/AddVideoAlbumModal/AddVideoAlbumModal.js +41 -0
- package/dist/stories/Modals/AddVideoModal/AddVideoModal.js +39 -0
- package/dist/stories/Modals/ChatConfigModal/ChatContifgModal.js +93 -0
- package/dist/stories/Modals/CreateEventModal/CreateEventModal.js +42 -0
- package/dist/stories/Modals/CreateFolderModal/CreateFolderModal.js +36 -0
- package/dist/stories/Modals/CreateMusicAlbumModal/CreateMusicAlbumModal.js +41 -0
- package/dist/stories/Modals/CreateNoteModal/CreateNoteModal.js +42 -0
- package/dist/stories/Modals/EventConfigModal/EventConfigModal.js +99 -0
- package/dist/stories/Modals/EventsConfigModal/EventsConfigModal.js +87 -0
- package/dist/stories/Modals/FoldersConfigModal/FoldersConfigModal.js +87 -0
- package/dist/stories/Modals/MusicAlbumConfigModal/MusicAlbumConfigModal.js +88 -0
- package/dist/stories/Modals/MusicAlbumsConfigModal/MusicAlbumsConfigModal.js +87 -0
- package/dist/stories/Modals/NotesConfigModal/NotesConfigModal.js +87 -0
- package/dist/stories/Modals/PhotoAlbumConfigModal/PhotoAlbumConfigModal.js +88 -0
- package/dist/stories/Modals/PhotoAlbumsConfigModal/PhotoAlbumsConfigModal.js +88 -0
- package/dist/stories/Modals/ShowImgModal/ShowImgModal.js +62 -0
- package/dist/stories/Modals/VideoAlbumConfigModal/VideoAlbumConfigModal.js +88 -0
- package/dist/stories/Modals/VideoAlbumsConfigModal/VideoAlbumsConfigModal.js +89 -0
- package/dist/stories/Modals/VideoConfigModal/VideoConfigModal.js +99 -0
- package/dist/stories/Music Album/ViewAlbum/ViewAlbum.js +9 -46
- package/dist/stories/Music Album/ViewAlbums/ViewAlbums.js +57 -37
- package/dist/stories/Pages/Chat/Chat.js +1 -1
- package/dist/stories/Pages/Events/Event/Event.js +1 -1
- package/dist/stories/Pages/Events/Events/Events.js +1 -1
- package/dist/stories/Pages/Library/Folders/Library.js +2 -2
- package/dist/stories/Pages/Library/Notes/Notes.js +2 -2
- package/dist/stories/Pages/Music/MusicAlbum/Music.js +2 -2
- package/dist/stories/Pages/Music/MusicAlbums/MusicAlbums.js +2 -2
- package/dist/stories/Pages/Photos/Album/Album.js +2 -2
- package/dist/stories/Pages/Photos/Albums/Albums.js +2 -2
- package/dist/stories/Pages/Video/DetailedVideo/DetailedVideo.js +2 -2
- package/dist/stories/Pages/Video/VideoAlbum/Video.js +2 -2
- package/dist/stories/Photo Album/ViewAlbum/ViewAlbum.js +26 -16
- package/dist/stories/Photo Album/ViewAlbums/ViewAlbums.js +11 -4
- package/dist/stories/PreviewComponents/ChatPreview/ChatPreview.js +7 -5
- package/dist/stories/PreviewComponents/EventPreview/EventPreview.js +7 -5
- package/dist/stories/PreviewComponents/EventsPreview/EventsPreview.js +7 -5
- package/dist/stories/PreviewComponents/FoldersPreview/FoldersPreview.js +7 -5
- package/dist/stories/PreviewComponents/MusicAlbumPreview/MusicAlbumPreview.js +6 -4
- package/dist/stories/PreviewComponents/MusicAlbumsPreview/MusicAlbumsPreview.js +8 -7
- package/dist/stories/PreviewComponents/MusicPlayerPreview/MusicPlayerPreview.js +7 -5
- package/dist/stories/PreviewComponents/NavbarPreview/NavbarPreview.js +7 -5
- package/dist/stories/PreviewComponents/NotesPreview/NotesPreview.js +7 -5
- package/dist/stories/PreviewComponents/PhotoAlbumPreview/PhotoAlbumPreview.js +7 -5
- package/dist/stories/PreviewComponents/PhotoAlbumsPreview/PhotoAlbumsPreview.js +7 -5
- package/dist/stories/PreviewComponents/SpacesListPreview/SpacesListPreview.js +7 -5
- package/dist/stories/PreviewComponents/VideoAlbumPreview/VideoAlbumPreview.js +7 -5
- package/dist/stories/PreviewComponents/VideoAlbumsPreview/VideoAlbumsPreview.js +7 -5
- package/dist/stories/PreviewComponents/VideoPreview/VideoPreview.js +7 -5
- package/dist/stories/Reusable Components/Comments/Comments.js +58 -0
- package/dist/stories/Reusable Components/Community/Community.js +13 -36
- package/dist/stories/Reusable Components/Sections/Sections.js +67 -0
- package/dist/stories/Spaces/Chat/Chat.js +103 -0
- package/dist/stories/Spaces/EventsList/EventsList.js +140 -0
- package/dist/stories/Spaces/NotesList/NotesList.js +144 -0
- package/dist/stories/Spaces/ViewDetailedPhoto/ViewDetailedPhoto.js +24 -0
- package/dist/stories/Spaces/ViewEvent/Event.js +146 -0
- package/dist/stories/Spaces/ViewFolders/ViewFolders.js +136 -0
- package/dist/stories/Spaces/ViewMusicAlbumList/ViewMusicAlbumList.js +136 -0
- package/dist/stories/Spaces/ViewMusicAlbums/ViewMusicAlbums.js +130 -0
- package/dist/stories/Spaces/ViewNote/ViewNote.js +27 -0
- package/dist/stories/Spaces/ViewPhotoAlbumList/ViewPhotoAlbumList.js +231 -0
- package/dist/stories/Spaces/ViewPhotoAlbums/ViewPhotoAlbums.js +131 -0
- package/dist/stories/Spaces/ViewVideo/ViewVideo.js +169 -0
- package/dist/stories/Spaces/ViewVideoAlbumList/ViewVideoAlbumList.js +157 -0
- package/dist/stories/Spaces/ViewVideoAlbums/ViewVideoAlbums.js +164 -0
- package/dist/stories/VideoAlbum/AlbumsGallery/AlbumsGallery.js +11 -4
- package/dist/stories/VideoAlbum/VideoSpace/VideoSpace.js +17 -6
- package/dist/stories/VideoAlbum/ViewAlbum/ViewAlbum.js +24 -25
- package/dist/stories/Widgets/VideoPlayer/VideoPlayer.js +235 -0
- package/dist/stories/helpers/util.js +24 -24
- package/dist/stories/store/actions/actions.js +16 -0
- package/dist/stories/store/communities.js +27 -29
- package/dist/stories/store/community.js +941 -0
- package/dist/stories/store/store.js +9 -4
- package/package.json +1 -1
- package/src/index.js +16 -16
- package/src/stories/Community/Community.jsx +31 -32
- package/src/stories/Forms/AddPhoto/AddPhoto.jsx +72 -72
- package/src/stories/{Events → Forms}/CreateEvent/CreateEvent.jsx +5 -1
- package/src/stories/{Library → Forms}/CreateFolder/CreateFolder.jsx +0 -0
- package/src/stories/Forms/{AddSong/AddSong.jsx → CreateSong/CreateSong.jsx} +0 -0
- package/src/stories/Modals/AddPhotoAlbum/AddPhotoAlbum.jsx +27 -0
- package/src/stories/Modals/AddPhotoModal/AddPhotoModal.jsx +29 -0
- package/src/stories/Modals/AddSongModal/AddSongModal.jsx +37 -0
- package/src/stories/Modals/AddVideoAlbumModal/AddVideoAlbumModal.jsx +38 -0
- package/src/stories/Modals/AddVideoModal/AddVideoModal.jsx +35 -0
- package/src/stories/Modals/ChatConfigModal/ChatContifgModal.jsx +77 -0
- package/src/stories/Modals/CreateEventModal/CreateEventModal.jsx +30 -0
- package/src/stories/Modals/CreateFolderModal/CreateFolderModal.jsx +39 -0
- package/src/stories/Modals/CreateMusicAlbumModal/CreateMusicAlbumModal.jsx +37 -0
- package/src/stories/Modals/CreateNoteModal/CreateNoteModal.jsx +43 -0
- package/src/stories/Modals/EventConfigModal/EventConfigModal.jsx +74 -0
- package/src/stories/Modals/EventsConfigModal/EventsConfigModal.jsx +67 -0
- package/src/stories/Modals/FoldersConfigModal/FoldersConfigModal.jsx +66 -0
- package/src/stories/Modals/MusicAlbumConfigModal/MusicAlbumConfigModal.jsx +69 -0
- package/src/stories/Modals/MusicAlbumsConfigModal/MusicAlbumsConfigModal.jsx +73 -0
- package/src/stories/Modals/NotesConfigModal/NotesConfigModal.jsx +65 -0
- package/src/stories/Modals/PhotoAlbumConfigModal/PhotoAlbumConfigModal.jsx +71 -0
- package/src/stories/Modals/PhotoAlbumsConfigModal/PhotoAlbumsConfigModal.jsx +69 -0
- package/src/stories/Modals/ShowImgModal/ShowImgModal.jsx +87 -0
- package/src/stories/Modals/VideoAlbumConfigModal/VideoAlbumConfigModal.jsx +67 -0
- package/src/stories/Modals/VideoAlbumsConfigModal/VideoAlbumsConfigModal.jsx +67 -0
- package/src/stories/Modals/VideoConfigModal/VideoConfigModal.jsx +78 -0
- package/src/stories/Pages/Chat/Chat.jsx +1 -1
- package/src/stories/Pages/Events/Event/Event.jsx +1 -1
- package/src/stories/Pages/Events/Events/Events.jsx +1 -1
- package/src/stories/Pages/Library/Folders/Library.jsx +1 -1
- package/src/stories/Pages/Library/Notes/Notes.jsx +1 -1
- package/src/stories/Pages/Music/MusicAlbum/Music.jsx +1 -1
- package/src/stories/Pages/Music/MusicAlbums/MusicAlbums.jsx +1 -1
- package/src/stories/Pages/Photos/Album/Album.jsx +1 -1
- package/src/stories/Pages/Photos/Albums/Albums.jsx +1 -1
- package/src/stories/Pages/Video/DetailedVideo/DetailedVideo.jsx +1 -1
- package/src/stories/Pages/Video/VideoAlbum/Video.jsx +1 -1
- package/src/stories/PreviewComponents/ChatPreview/ChatPreview.jsx +106 -104
- package/src/stories/PreviewComponents/EventPreview/EventPreview.jsx +7 -5
- package/src/stories/PreviewComponents/EventsPreview/EventsPreview.jsx +106 -104
- package/src/stories/PreviewComponents/FoldersPreview/FoldersPreview.jsx +8 -6
- package/src/stories/PreviewComponents/MusicAlbumPreview/MusicAlbumPreview.jsx +6 -4
- package/src/stories/PreviewComponents/MusicAlbumsPreview/MusicAlbumsPreview.jsx +13 -11
- package/src/stories/PreviewComponents/MusicPlayerPreview/MusicPlayerPreview.jsx +36 -34
- package/src/stories/PreviewComponents/NavbarPreview/NavbarPreview.jsx +18 -16
- package/src/stories/PreviewComponents/NotesPreview/NotesPreview.jsx +7 -5
- package/src/stories/PreviewComponents/PhotoAlbumPreview/PhotoAlbumPreview.jsx +105 -103
- package/src/stories/PreviewComponents/PhotoAlbumsPreview/PhotoAlbumsPreview.jsx +8 -6
- package/src/stories/PreviewComponents/SpacesListPreview/SpacesListPreview.jsx +10 -8
- package/src/stories/PreviewComponents/VideoAlbumPreview/VideoAlbumPreview.jsx +7 -5
- package/src/stories/PreviewComponents/VideoAlbumsPreview/VideoAlbumsPreview.jsx +7 -5
- package/src/stories/PreviewComponents/VideoPreview/VideoPreview.jsx +7 -5
- package/src/stories/{VideoAlbum → Reusable Components}/Comments/Comments.jsx +0 -0
- package/src/stories/Reusable Components/Community/Community.jsx +10 -33
- package/src/stories/{Sections/Sections.jsx → Reusable Components/Sections/Sections.jsx } +1 -1
- package/src/stories/Spaces/Chat/Chat.jsx +77 -0
- package/src/stories/Spaces/EventsList/EventsList.jsx +118 -0
- package/src/stories/Spaces/NotesList/NotesList.jsx +125 -0
- package/src/stories/{Photo Album/DetailedPhoto/DetailedPhoto.jsx → Spaces/ViewDetailedPhoto/ViewDetailedPhoto.jsx} +1 -1
- package/src/stories/{Events/Event → Spaces/ViewEvent}/Event.jsx +17 -73
- package/src/stories/Spaces/ViewFolders/ViewFolders.jsx +122 -0
- package/src/stories/Spaces/ViewMusicAlbumList/ViewMusicAlbumList.jsx +118 -0
- package/src/stories/Spaces/ViewMusicAlbums/ViewMusicAlbums.jsx +108 -0
- package/src/stories/{Library → Spaces}/ViewNote/ViewNote.jsx +0 -0
- package/src/stories/{Photo Album/ViewAlbum/ViewAlbum.jsx → Spaces/ViewPhotoAlbumList/ViewPhotoAlbumList.jsx} +48 -134
- package/src/stories/{Photo Album/ViewAlbums/ViewAlbums.jsx → Spaces/ViewPhotoAlbums/ViewPhotoAlbums.jsx} +22 -54
- package/src/stories/{VideoAlbum/VideoSpace/VideoSpace.jsx → Spaces/ViewVideo/ViewVideo.jsx} +21 -47
- package/src/stories/{VideoAlbum/ViewAlbum/ViewAlbum.jsx → Spaces/ViewVideoAlbumList/ViewVideoAlbumList.jsx} +31 -78
- package/src/stories/{VideoAlbum/AlbumsGallery/AlbumsGallery.jsx → Spaces/ViewVideoAlbums/ViewVideoAlbums.jsx} +20 -51
- package/src/stories/{VideoAlbum → Widgets}/VideoPlayer/VideoPlayer.jsx +0 -0
- package/src/stories/helpers/util.js +13 -13
- package/src/stories/store/actions/actions.js +7 -0
- package/src/stories/store/{communities.js → community.js} +27 -29
- package/src/stories/store/store.js +3 -4
- package/src/stories/Chat/Chat.jsx +0 -148
- package/src/stories/Events/EventsList/EventsList.jsx +0 -180
- package/src/stories/Library/Folders/Folders.jsx +0 -187
- package/src/stories/Library/Notes/Notes.jsx +0 -161
- package/src/stories/Music Album/ViewAlbum/ViewAlbum.jsx +0 -216
- package/src/stories/Music Album/ViewAlbums/ViewAlbums.jsx +0 -152
@@ -11,7 +11,7 @@ import TextField from '../../Common Inputs/TextField/TextField';
|
|
11
11
|
|
12
12
|
const MusicPlayerPreview = (props) => {
|
13
13
|
const [musicPlayerStyles, setMusicPlayerStyles] = useState({});
|
14
|
-
const initialValues = {
|
14
|
+
const initialValues = JSON.parse(localStorage.getItem('formStyles')) || {
|
15
15
|
headerStyles: {
|
16
16
|
headerBackground: '',
|
17
17
|
padding: 0,
|
@@ -56,10 +56,12 @@ const MusicPlayerPreview = (props) => {
|
|
56
56
|
]
|
57
57
|
|
58
58
|
const handleChange = (values) => {
|
59
|
-
if(
|
60
|
-
|
61
|
-
|
62
|
-
|
59
|
+
if (props.formChanged) {
|
60
|
+
if (values) {
|
61
|
+
props.formChanged(values)
|
62
|
+
setMusicPlayerStyles(values)
|
63
|
+
localStorage.setItem('formStyles', JSON.stringify(values))
|
64
|
+
}
|
63
65
|
}
|
64
66
|
}
|
65
67
|
|
@@ -72,35 +74,35 @@ const MusicPlayerPreview = (props) => {
|
|
72
74
|
}
|
73
75
|
return (
|
74
76
|
<Container>
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
77
|
+
<Left>
|
78
|
+
<ReusableForm
|
79
|
+
formTitle="Music Albums Styles"
|
80
|
+
initialValues={initialValues}
|
81
|
+
sections={sections}
|
82
|
+
headerStyles={{
|
83
|
+
padding: 10,
|
84
|
+
headerBackground: 'black',
|
85
|
+
titleColor: '#ffff',
|
86
|
+
}}
|
87
|
+
sectionHeaderStyles={{
|
88
|
+
padding: 6,
|
89
|
+
headerBackground: '#FE1744',
|
90
|
+
titleColor: '#ffff',
|
91
|
+
}}
|
92
|
+
bodyPadding={10}
|
93
|
+
saveBtnText="Save"
|
94
|
+
cancelBtnText="Cancel"
|
95
|
+
saveBtnHandle={submitHandler}
|
96
|
+
cancelHandler={cancelHandler}
|
97
|
+
handleChange={handleChange}
|
98
|
+
bodyRowGap={20}
|
99
|
+
bodyColumnGap={10}
|
100
|
+
/>
|
101
|
+
</Left>
|
102
|
+
<Right>
|
103
|
+
<Preview type={'MusicPlayer'} componentProps={props.componentProps} stylingProps={musicPlayerStyles} da />
|
104
|
+
</Right>
|
105
|
+
</Container>
|
104
106
|
);
|
105
107
|
};
|
106
108
|
|
@@ -10,7 +10,7 @@ import Picker from '../../Common Inputs/Picker/Picker';
|
|
10
10
|
const NavbarPreview = (props) => {
|
11
11
|
const [navbarStyles, setNavbarStyles] = useState({})
|
12
12
|
|
13
|
-
const initialValues = {
|
13
|
+
const initialValues = JSON.parse(localStorage.getItem('formStyles')) || {
|
14
14
|
iconSize: 'md',
|
15
15
|
iconBackgroundColor: 'black',
|
16
16
|
navbarColor: 'white',
|
@@ -21,24 +21,26 @@ const NavbarPreview = (props) => {
|
|
21
21
|
title: "Navbar Styles",
|
22
22
|
body: [
|
23
23
|
(
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
24
|
+
<CustomSelect label="Icon Size" options={[
|
25
|
+
{ label: 'select an option', value: '' },
|
26
|
+
{ label: 'small', value: 'sm' },
|
27
|
+
{ label: 'medium', value: 'md' },
|
28
|
+
{ label: 'large', value: 'lg' },
|
29
|
+
]} name="iconSize" />
|
30
|
+
),
|
31
|
+
(<Picker label="Icon Color" name="iconBackgroundColor" />),
|
32
|
+
(<Picker label="Background Color" name="navbarColor" />)
|
33
|
+
]
|
34
34
|
},
|
35
35
|
]
|
36
36
|
|
37
37
|
const handleChange = (values) => {
|
38
|
-
if(
|
39
|
-
|
40
|
-
|
41
|
-
|
38
|
+
if (props.formChanged) {
|
39
|
+
if (values) {
|
40
|
+
props.formChanged(values)
|
41
|
+
setNavbarStyles(values)
|
42
|
+
localStorage.setItem('formStyles', JSON.stringify(values))
|
43
|
+
}
|
42
44
|
}
|
43
45
|
}
|
44
46
|
|
@@ -75,7 +77,7 @@ const NavbarPreview = (props) => {
|
|
75
77
|
handleChange={handleChange}
|
76
78
|
bodyRowGap={20}
|
77
79
|
bodyColumnGap={10}
|
78
|
-
|
80
|
+
/>
|
79
81
|
</Left>
|
80
82
|
<Right>
|
81
83
|
<Preview type={'Navbar'} stylingProps={navbarStyles} />
|
@@ -10,7 +10,7 @@ import TextField from '../../Common Inputs/TextField/TextField';
|
|
10
10
|
|
11
11
|
const NotesPreview = (props) => {
|
12
12
|
const [notesStyles, setNotesStyles] = useState({});
|
13
|
-
const initialValues = {
|
13
|
+
const initialValues = JSON.parse(localStorage.getItem('formStyles')) || {
|
14
14
|
headerStyles: {
|
15
15
|
headerBackground: '',
|
16
16
|
padding: 0,
|
@@ -65,10 +65,12 @@ const NotesPreview = (props) => {
|
|
65
65
|
]
|
66
66
|
|
67
67
|
const handleChange = (values) => {
|
68
|
-
if(
|
69
|
-
|
70
|
-
|
71
|
-
|
68
|
+
if (props.formChanged) {
|
69
|
+
if (values) {
|
70
|
+
props.formChanged(values)
|
71
|
+
setNotesStyles(values)
|
72
|
+
localStorage.setItem('formStyles', JSON.stringify(values))
|
73
|
+
}
|
72
74
|
}
|
73
75
|
}
|
74
76
|
|
@@ -8,115 +8,117 @@ import Picker from '../../Common Inputs/Picker/Picker';
|
|
8
8
|
import TextField from '../../Common Inputs/TextField/TextField';
|
9
9
|
|
10
10
|
const PhotoAlbumPreview = (props) => {
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
}
|
23
|
-
},
|
24
|
-
customCardStyles: {
|
25
|
-
cardBackgroundColor: '',
|
26
|
-
onHoverBackgroundColor: '',
|
27
|
-
cardRadius: '',
|
28
|
-
cardTitleFontSize: '',
|
29
|
-
cardTitleFontWeight: '',
|
30
|
-
cardTitleColor: '',
|
31
|
-
cardImageRadius: '',
|
32
|
-
cardDescriptionFontSize: '',
|
33
|
-
cardDescriptionColor: '',
|
34
|
-
cardPadding: 0,
|
35
|
-
imgSize: 0,
|
36
|
-
cardBorderSize: 0,
|
37
|
-
cardBorderColor: ''
|
38
|
-
}
|
11
|
+
const [photoAlbumStyles, setPhotoAlbumStyles] = useState({});
|
12
|
+
const initialValues = JSON.parse(localStorage.getItem('formStyles')) || {
|
13
|
+
headerStyles: {
|
14
|
+
headerBackground: '',
|
15
|
+
padding: 0,
|
16
|
+
titleColor: '',
|
17
|
+
titleFontSize: '',
|
18
|
+
titleFontWeight: '',
|
19
|
+
controlsStyles: {
|
20
|
+
iconSize: '',
|
21
|
+
iconColor: ''
|
39
22
|
}
|
23
|
+
},
|
24
|
+
customCardStyles: {
|
25
|
+
cardBackgroundColor: '',
|
26
|
+
onHoverBackgroundColor: '',
|
27
|
+
cardRadius: '',
|
28
|
+
cardTitleFontSize: '',
|
29
|
+
cardTitleFontWeight: '',
|
30
|
+
cardTitleColor: '',
|
31
|
+
cardImageRadius: '',
|
32
|
+
cardDescriptionFontSize: '',
|
33
|
+
cardDescriptionColor: '',
|
34
|
+
cardPadding: 0,
|
35
|
+
imgSize: 0,
|
36
|
+
cardBorderSize: 0,
|
37
|
+
cardBorderColor: ''
|
38
|
+
}
|
39
|
+
}
|
40
40
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
41
|
+
const sections = [
|
42
|
+
{
|
43
|
+
title: "Header Styles",
|
44
|
+
body: [
|
45
|
+
(<Picker label="Header Background" name="headerStyles.headerBackground" />),
|
46
|
+
(<TextField type="number" label="Padding" name="headerStyles.padding" />),
|
47
|
+
(<Picker label="Title Color" name="headerStyles.titleColor" />),
|
48
|
+
(<TextField type="number" label="Title Font Size" name="headerStyles.titleFontSize" />),
|
49
|
+
(<TextField type="number" label="Title Font Weight" name="headerStyles.titleFontWeight" />),
|
50
|
+
(<TextField type="number" label="Controls Size" name="headerStyles.controlsStyles.iconSize" />),
|
51
|
+
(<Picker label="Controls Color" name="headerStyles.controlsStyles.iconColor" />),
|
52
|
+
]
|
53
|
+
},
|
54
|
+
{
|
55
|
+
title: "Card Styles",
|
56
|
+
body: [
|
57
|
+
(<Picker label="Card Background" name="customCardStyles.cardBackgroundColor" />),
|
58
|
+
(<Picker label="Hover Color" name="customCardStyles.onHoverBackgroundColor" />),
|
59
|
+
(<TextField type="number" label="Card Radius" name="customCardStyles.cardRadius" />),
|
60
|
+
(<TextField type="number" label="Title Font Size" name="customCardStyles.cardTitleFontSize" />),
|
61
|
+
(<TextField type="number" label="Title Font Weight" name="customCardStyles.cardTitleFontWeight" />),
|
62
|
+
(<Picker label="Title Color" name="customCardStyles.cardTitleColor" />),
|
63
|
+
(<TextField type="number" label="Card Image Radius" name="customCardStyles.cardImageRadius" />),
|
64
|
+
(<TextField type="number" label="Discription Font Size" name="customCardStyles.cardDescriptionFontSize" />),
|
65
|
+
(<Picker label="Discription Font Color" name="customCardStyles.cardDescriptionColor" />),
|
66
|
+
(<TextField type="number" label="Card Padding" name="customCardStyles.cardPadding" />),
|
67
|
+
(<TextField type="number" label="Image Size" name="customCardStyles.imgSize" />),
|
68
|
+
(<TextField type="number" label="Border Size" name="customCardStyles.cardBorderSize" />),
|
69
|
+
(<Picker label="Border Color" name="customCardStyles.cardBorderColor" />),
|
70
|
+
]
|
71
|
+
},
|
72
|
+
]
|
73
73
|
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
}
|
81
|
-
|
82
|
-
const submitHandler = (values) => {
|
83
|
-
console.log(values);
|
84
|
-
}
|
85
|
-
|
86
|
-
const cancelHandler = () => {
|
87
|
-
console.log('Canceled')
|
74
|
+
const handleChange = (values) => {
|
75
|
+
if (props.formChanged) {
|
76
|
+
if (values) {
|
77
|
+
props.formChanged(values)
|
78
|
+
setPhotoAlbumStyles(values)
|
79
|
+
localStorage.setItem('formStyles', JSON.stringify(values))
|
88
80
|
}
|
81
|
+
}
|
82
|
+
}
|
83
|
+
|
84
|
+
const submitHandler = (values) => {
|
85
|
+
console.log(values);
|
86
|
+
}
|
87
|
+
|
88
|
+
const cancelHandler = () => {
|
89
|
+
console.log('Canceled')
|
90
|
+
}
|
89
91
|
return (
|
90
92
|
<Container>
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
93
|
+
<Left>
|
94
|
+
<ReusableForm
|
95
|
+
formTitle="Photo Album Styles"
|
96
|
+
initialValues={initialValues}
|
97
|
+
sections={sections}
|
98
|
+
headerStyles={{
|
99
|
+
padding: 10,
|
100
|
+
headerBackground: 'black',
|
101
|
+
titleColor: '#ffff',
|
102
|
+
}}
|
103
|
+
sectionHeaderStyles={{
|
104
|
+
padding: 6,
|
105
|
+
headerBackground: '#FE1744',
|
106
|
+
titleColor: '#ffff',
|
107
|
+
}}
|
108
|
+
bodyPadding={10}
|
109
|
+
saveBtnText="Save"
|
110
|
+
cancelBtnText="Cancel"
|
111
|
+
saveBtnHandle={submitHandler}
|
112
|
+
cancelHandler={cancelHandler}
|
113
|
+
handleChange={handleChange}
|
114
|
+
bodyRowGap={20}
|
115
|
+
bodyColumnGap={10}
|
116
|
+
/>
|
117
|
+
</Left>
|
118
|
+
<Right>
|
119
|
+
<Preview type={'PhotoAlbum'} componentProps={props.componentProps} stylingProps={photoAlbumStyles} />
|
120
|
+
</Right>
|
121
|
+
</Container>
|
120
122
|
);
|
121
123
|
};
|
122
124
|
|
@@ -9,7 +9,7 @@ import TextField from '../../Common Inputs/TextField/TextField';
|
|
9
9
|
|
10
10
|
const PhotoAlbumsPreview = (props) => {
|
11
11
|
const [photoAlbumsStyles, setPhotoAlbumsStyles] = useState({});
|
12
|
-
const initialValues = {
|
12
|
+
const initialValues = JSON.parse(localStorage.getItem('formStyles')) || {
|
13
13
|
headerStyles: {
|
14
14
|
headerBackground: '',
|
15
15
|
padding: 0,
|
@@ -72,11 +72,13 @@ const PhotoAlbumsPreview = (props) => {
|
|
72
72
|
]
|
73
73
|
|
74
74
|
const handleChange = (values) => {
|
75
|
-
if(
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
75
|
+
if (props.formChanged) {
|
76
|
+
if (values) {
|
77
|
+
props.formChanged(values)
|
78
|
+
setPhotoAlbumsStyles(values)
|
79
|
+
localStorage.setItem('formStyles', JSON.stringify(values))
|
80
|
+
}
|
81
|
+
}
|
80
82
|
}
|
81
83
|
|
82
84
|
const submitHandler = (values) => {
|
@@ -9,7 +9,7 @@ import TextField from '../../Common Inputs/TextField/TextField';
|
|
9
9
|
|
10
10
|
const SpacesListPreview = (props) => {
|
11
11
|
const [spacesStyles, setSpacesStyles] = useState({});
|
12
|
-
const initialValues = {
|
12
|
+
const initialValues = JSON.parse(localStorage.getItem('formStyles')) || {
|
13
13
|
headerStyles: {
|
14
14
|
headerBackground: '',
|
15
15
|
padding: 0,
|
@@ -79,10 +79,12 @@ const SpacesListPreview = (props) => {
|
|
79
79
|
]
|
80
80
|
|
81
81
|
const handleChange = (values) => {
|
82
|
-
if(
|
83
|
-
|
84
|
-
|
85
|
-
|
82
|
+
if (props.formChanged) {
|
83
|
+
if (values) {
|
84
|
+
props.formChanged(values)
|
85
|
+
setSpacesStyles(values)
|
86
|
+
localStorage.setItem('formStyles', JSON.stringify(values))
|
87
|
+
}
|
86
88
|
}
|
87
89
|
}
|
88
90
|
|
@@ -95,8 +97,8 @@ const SpacesListPreview = (props) => {
|
|
95
97
|
}
|
96
98
|
|
97
99
|
|
98
|
-
|
99
|
-
|
100
|
+
return (
|
101
|
+
<Container>
|
100
102
|
<Left>
|
101
103
|
<ReusableForm
|
102
104
|
formTitle="Spaces List Styles"
|
@@ -126,7 +128,7 @@ const SpacesListPreview = (props) => {
|
|
126
128
|
<Preview type={'Spaces-List'} componentProps={props.componentProps} stylingProps={spacesStyles} />
|
127
129
|
</Right>
|
128
130
|
</Container>
|
129
|
-
|
131
|
+
);
|
130
132
|
};
|
131
133
|
|
132
134
|
SpacesListPreview.defaultProps = {};
|
@@ -9,7 +9,7 @@ import TextField from '../../Common Inputs/TextField/TextField';
|
|
9
9
|
|
10
10
|
const VideoAlbumPreview = (props) => {
|
11
11
|
const [videoAlbumStyles, setVideoAlbumStyles] = useState({});
|
12
|
-
const initialValues = {
|
12
|
+
const initialValues = JSON.parse(localStorage.getItem('formStyles')) || {
|
13
13
|
headerStyles: {
|
14
14
|
headerBackground: '',
|
15
15
|
padding: 0,
|
@@ -72,10 +72,12 @@ const VideoAlbumPreview = (props) => {
|
|
72
72
|
]
|
73
73
|
|
74
74
|
const handleChange = (values) => {
|
75
|
-
if(
|
76
|
-
|
77
|
-
|
78
|
-
|
75
|
+
if (props.formChanged) {
|
76
|
+
if (values) {
|
77
|
+
props.formChanged(values)
|
78
|
+
setVideoAlbumStyles(values)
|
79
|
+
localStorage.setItem('formStyles', JSON.stringify(values))
|
80
|
+
}
|
79
81
|
}
|
80
82
|
}
|
81
83
|
|
@@ -10,7 +10,7 @@ import TextField from '../../Common Inputs/TextField/TextField';
|
|
10
10
|
|
11
11
|
const VideoAlbumsPreview = (props) => {
|
12
12
|
const [videoAlbumsStyles, setVideoAlbumsStyles] = useState({});
|
13
|
-
const initialValues = {
|
13
|
+
const initialValues = JSON.parse(localStorage.getItem('formStyles')) || {
|
14
14
|
headerStyles: {
|
15
15
|
headerBackground: '',
|
16
16
|
padding: 0,
|
@@ -67,10 +67,12 @@ const VideoAlbumsPreview = (props) => {
|
|
67
67
|
]
|
68
68
|
|
69
69
|
const handleChange = (values) => {
|
70
|
-
if(
|
71
|
-
|
72
|
-
|
73
|
-
|
70
|
+
if (props.formChanged) {
|
71
|
+
if (values) {
|
72
|
+
props.formChanged(values)
|
73
|
+
setVideoAlbumsStyles(values)
|
74
|
+
localStorage.setItem('formStyles', JSON.stringify(values))
|
75
|
+
}
|
74
76
|
}
|
75
77
|
}
|
76
78
|
|
@@ -9,7 +9,7 @@ import TextField from '../../Common Inputs/TextField/TextField';
|
|
9
9
|
|
10
10
|
const VideoPreview = (props) => {
|
11
11
|
const [videoStyles, setVideoStyles] = useState({});
|
12
|
-
const initialValues = {
|
12
|
+
const initialValues = JSON.parse(localStorage.getItem('formStyles')) || {
|
13
13
|
headerStyles: {
|
14
14
|
headerBackground: '',
|
15
15
|
padding: 0,
|
@@ -67,10 +67,12 @@ const VideoPreview = (props) => {
|
|
67
67
|
]
|
68
68
|
|
69
69
|
const handleChange = (values) => {
|
70
|
-
if(
|
71
|
-
|
72
|
-
|
73
|
-
|
70
|
+
if (props.formChanged) {
|
71
|
+
if (values) {
|
72
|
+
props.formChanged(values)
|
73
|
+
setVideoStyles(values)
|
74
|
+
localStorage.setItem('formStyles', JSON.stringify(values))
|
75
|
+
}
|
74
76
|
}
|
75
77
|
}
|
76
78
|
|
File without changes
|
@@ -9,62 +9,39 @@ import Left from '../../Layout/Left/Left'
|
|
9
9
|
import Center from '../../Layout/Center/Center'
|
10
10
|
import Right from '../../Layout/Right/Right'
|
11
11
|
import WidgetContainer from "../../Reusable Components/WidgetContainer/WidgetContainer";
|
12
|
+
import BaseMaterial from '../../Containers/BaseMaterial'
|
12
13
|
// import styles from '../../styling.json'
|
13
14
|
|
14
15
|
|
15
16
|
|
16
17
|
const Community = ({
|
17
18
|
context,
|
19
|
+
community,
|
18
20
|
...props
|
19
21
|
}) => {
|
20
22
|
|
21
|
-
const
|
22
|
-
{
|
23
|
-
title: 'Main List',
|
24
|
-
data: [
|
25
|
-
{ title: 'Cargo Sprint', path: 'cago' },
|
26
|
-
{ title: 'Movies', path: 'movies' }
|
27
|
-
],
|
28
|
-
},
|
29
|
-
{
|
30
|
-
title: 'Entertainment',
|
31
|
-
data: [
|
32
|
-
{ title: 'Gaming', path: 'games' },
|
33
|
-
{ title: 'Music', path: 'music' }
|
34
|
-
]
|
35
|
-
}
|
36
|
-
]
|
23
|
+
const spacesWidget = community.spacesListWidget.widgetSpacesList
|
37
24
|
|
38
25
|
return (
|
39
|
-
<
|
40
|
-
<Navbar />
|
26
|
+
<BaseMaterial {...community.styles}>
|
27
|
+
<Navbar {...community.navbarStyles} />
|
41
28
|
<Body>
|
42
29
|
<Left>
|
43
30
|
<WidgetContainer
|
44
31
|
widgetType='spaces-list'
|
45
32
|
widgetProps={{
|
46
|
-
listTitle:
|
47
|
-
spaces: spaces,
|
48
|
-
cardClicked: () =>
|
49
|
-
|
50
|
-
// sectionHeaderStyles: styles.widgetContainer.body.sectionHeaderStyles,
|
51
|
-
// customCardStyles: styles.widgetContainer.body.customCardStyles,
|
33
|
+
listTitle: spacesWidget.listTitle,
|
34
|
+
spaces: spacesWidget.spaces,
|
35
|
+
cardClicked: () => null,
|
36
|
+
...spacesWidget.styles
|
52
37
|
}}
|
53
38
|
/>
|
54
39
|
</Left>
|
55
40
|
<Center>{props.center}</Center>
|
56
41
|
<Right>{props.right}</Right>
|
57
42
|
</Body>
|
58
|
-
</
|
43
|
+
</BaseMaterial>
|
59
44
|
);
|
60
45
|
};
|
61
46
|
|
62
|
-
const Container = styled.div`
|
63
|
-
width: 100%;
|
64
|
-
height: auto;
|
65
|
-
display: flex;
|
66
|
-
min-height: 100vh;
|
67
|
-
flex-direction: column;
|
68
|
-
`
|
69
|
-
|
70
47
|
export default Community;
|