@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
@@ -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
|
|
@@ -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) => {
|
@@ -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 = {};
|
@@ -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
|
|
@@ -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
|
|
@@ -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
|
@@ -0,0 +1,77 @@
|
|
1
|
+
import React, { useState } from "react";
|
2
|
+
import PropTypes from "prop-types";
|
3
|
+
import styled from "styled-components";
|
4
|
+
import { BsGear } from "react-icons/bs";
|
5
|
+
|
6
|
+
import List from "../../Reusable Components/ReusableList/ReusableList";
|
7
|
+
import RichTextInput from "../../Common Inputs/RichTextInput/RichTextInput";
|
8
|
+
import ChatContifgModal from "../../Modals/ChatConfigModal/ChatContifgModal";
|
9
|
+
|
10
|
+
const listControls = [{ icon: <BsGear />, action: "config", name: "Config" }];
|
11
|
+
|
12
|
+
const Chat = ({ data, users, title, backgroundColor, community, ...props }) => {
|
13
|
+
const [showConfigModal, setShowConfigModal] = useState(false);
|
14
|
+
|
15
|
+
|
16
|
+
const onIconClicked = (action) => {
|
17
|
+
if (!props.preview) {
|
18
|
+
switch (action) {
|
19
|
+
case "config":
|
20
|
+
setShowConfigModal(true);
|
21
|
+
break;
|
22
|
+
default:
|
23
|
+
break;
|
24
|
+
}
|
25
|
+
}
|
26
|
+
};
|
27
|
+
|
28
|
+
const cancelConfig = () => {
|
29
|
+
setShowConfigModal(false);
|
30
|
+
localStorage.removeItem("formStyles");
|
31
|
+
};
|
32
|
+
|
33
|
+
return (
|
34
|
+
<Container backgroundColor={backgroundColor}>
|
35
|
+
<List
|
36
|
+
listTitle={title || "Chat"}
|
37
|
+
type="flat"
|
38
|
+
data={data}
|
39
|
+
cardStyle="card-style-8"
|
40
|
+
iconClicked={onIconClicked}
|
41
|
+
listControls={listControls}
|
42
|
+
{...props}
|
43
|
+
/>
|
44
|
+
<RichTextInput users={users} />
|
45
|
+
<ChatContifgModal
|
46
|
+
title={props.title}
|
47
|
+
showConfigModal={showConfigModal}
|
48
|
+
cancelConfig={cancelConfig}
|
49
|
+
community={community}
|
50
|
+
data={data}
|
51
|
+
users={users}
|
52
|
+
/>
|
53
|
+
</Container>
|
54
|
+
);
|
55
|
+
};
|
56
|
+
|
57
|
+
const Container = styled.div`
|
58
|
+
width: 100%;
|
59
|
+
background-color: ${({ backgroundColor }) =>
|
60
|
+
backgroundColor || "transparent"};
|
61
|
+
`;
|
62
|
+
|
63
|
+
Chat.defaultProps = {
|
64
|
+
title: "Chat Space",
|
65
|
+
};
|
66
|
+
|
67
|
+
Chat.propTypes = {
|
68
|
+
data: PropTypes.array.isRequired,
|
69
|
+
title: PropTypes.string,
|
70
|
+
users: PropTypes.array,
|
71
|
+
backgroundColor: PropTypes.string,
|
72
|
+
customCardStyles: PropTypes.object,
|
73
|
+
headerStyles: PropTypes.object,
|
74
|
+
preview: PropTypes.bool,
|
75
|
+
};
|
76
|
+
|
77
|
+
export default Chat;
|
@@ -0,0 +1,118 @@
|
|
1
|
+
import React, { useState } from 'react';
|
2
|
+
import PropTypes from 'prop-types';
|
3
|
+
import styled from 'styled-components';
|
4
|
+
|
5
|
+
import { AiOutlineFileAdd, AiFillDelete } from "react-icons/ai";
|
6
|
+
import { BsGear } from "react-icons/bs";
|
7
|
+
import List from '../../Reusable Components/ReusableList/ReusableList';
|
8
|
+
import CreateEventModal from '../../Modals/CreateEventModal/CreateEventModal';
|
9
|
+
import EventsConfigModal from '../../Modals/EventsConfigModal/EventsConfigModal';
|
10
|
+
|
11
|
+
const listControls = [
|
12
|
+
{ icon: (<AiOutlineFileAdd />), action: 'add', name: 'Add Photo' },
|
13
|
+
{ icon: (<BsGear />), action: 'config', name: 'Config' },
|
14
|
+
]
|
15
|
+
|
16
|
+
const cardControls = [
|
17
|
+
{ icon: (<AiFillDelete />), action: 'delete', name: 'Delete Image' },
|
18
|
+
]
|
19
|
+
|
20
|
+
const EventsList = ({
|
21
|
+
events,
|
22
|
+
community,
|
23
|
+
actions,
|
24
|
+
...props
|
25
|
+
}) => {
|
26
|
+
|
27
|
+
const [showModal, setShowModal] = useState(false);
|
28
|
+
const [showConfigModal, setShowConfigModal] = useState(false);
|
29
|
+
|
30
|
+
const onIconClicked = (action) => {
|
31
|
+
if (!props.preview) {
|
32
|
+
switch (action) {
|
33
|
+
case 'add':
|
34
|
+
setShowModal(true)
|
35
|
+
break;
|
36
|
+
case 'config':
|
37
|
+
setShowConfigModal(true)
|
38
|
+
break;
|
39
|
+
default:
|
40
|
+
break;
|
41
|
+
}
|
42
|
+
}
|
43
|
+
}
|
44
|
+
|
45
|
+
const cardIconClicked = (action, index) => {
|
46
|
+
if (!props.preview) {
|
47
|
+
props.cardIconClicked(action, index)
|
48
|
+
}
|
49
|
+
}
|
50
|
+
|
51
|
+
const cardClicked = (index, props) => {
|
52
|
+
if (!props.preview) {
|
53
|
+
props.cardClicked(props)
|
54
|
+
}
|
55
|
+
}
|
56
|
+
|
57
|
+
const onAddFolder = (event) => {
|
58
|
+
setShowModal(false)
|
59
|
+
props.onAddEvent(event)
|
60
|
+
}
|
61
|
+
|
62
|
+
const closeModal = () => {
|
63
|
+
setShowModal(false);
|
64
|
+
}
|
65
|
+
|
66
|
+
const cancelConfig = () => {
|
67
|
+
setShowConfigModal(false);
|
68
|
+
localStorage.removeItem('formStyles')
|
69
|
+
}
|
70
|
+
|
71
|
+
return (
|
72
|
+
<Container>
|
73
|
+
<List
|
74
|
+
listTitle={props.title || "My Events"}
|
75
|
+
data={events}
|
76
|
+
type='flat'
|
77
|
+
cardStyle="card-style-11"
|
78
|
+
listControls={listControls}
|
79
|
+
cardControls={cardControls}
|
80
|
+
iconClicked={onIconClicked}
|
81
|
+
cardClicked={cardClicked}
|
82
|
+
cardIconClicked={cardIconClicked}
|
83
|
+
{...props}
|
84
|
+
/>
|
85
|
+
<CreateEventModal
|
86
|
+
showModal={showModal}
|
87
|
+
onAddFolder={onAddFolder}
|
88
|
+
closeModal={closeModal}
|
89
|
+
actions={actions}
|
90
|
+
/>
|
91
|
+
<EventsConfigModal
|
92
|
+
title={props.title}
|
93
|
+
events={events}
|
94
|
+
showConfigModal={showConfigModal}
|
95
|
+
cancelConfig={cancelConfig}
|
96
|
+
community={community}
|
97
|
+
/>
|
98
|
+
</Container>
|
99
|
+
)
|
100
|
+
}
|
101
|
+
|
102
|
+
const Container = styled.div`
|
103
|
+
width: 100%;
|
104
|
+
`
|
105
|
+
|
106
|
+
EventsList.defaultProps = {};
|
107
|
+
|
108
|
+
EventsList.propTypes = {
|
109
|
+
notes: PropTypes.array.isRequired,
|
110
|
+
title: PropTypes.string,
|
111
|
+
headerStyles: PropTypes.object,
|
112
|
+
customCardStyles: PropTypes.object,
|
113
|
+
saveBtnText: PropTypes.string,
|
114
|
+
cancelBtnText: PropTypes.string,
|
115
|
+
preview: PropTypes.bool
|
116
|
+
}
|
117
|
+
|
118
|
+
export default EventsList
|
@@ -5,12 +5,8 @@ import styled from 'styled-components';
|
|
5
5
|
import { AiOutlineFileAdd, AiFillDelete } from "react-icons/ai";
|
6
6
|
import { BsGear } from "react-icons/bs";
|
7
7
|
import List from '../../Reusable Components/ReusableList/ReusableList';
|
8
|
-
import
|
9
|
-
import
|
10
|
-
import Tabs from '../../Reusable Components/Tabs/Tabs';
|
11
|
-
import Sections from '../../Sections/Sections'
|
12
|
-
import NotesPreview from '../../PreviewComponents/NotesPreview/NotesPreview';
|
13
|
-
import Community from '../../Reusable Components/Community/Community';
|
8
|
+
import CreateNoteModal from '../../Modals/CreateNoteModal/CreateNoteModal';
|
9
|
+
import NotesConfigModal from '../../Modals/NotesConfigModal/NotesConfigModal';
|
14
10
|
|
15
11
|
const listControls = [
|
16
12
|
{ icon: (<AiOutlineFileAdd />), action: 'add', name: 'Add Photo' },
|
@@ -32,34 +28,8 @@ const Notes = ({
|
|
32
28
|
}) => {
|
33
29
|
const [showModal, setShowModal] = useState(false);
|
34
30
|
const [showConfigModal, setShowConfigModal] = useState(false);
|
35
|
-
const [centerContext, setCenterContext] = useState(<Notes preview={true} notes={notes} />)
|
36
31
|
|
37
|
-
const formChanged = (values) => {
|
38
|
-
setCenterContext(<Notes preview={true} notes={notes} {...values} />)
|
39
|
-
}
|
40
32
|
|
41
|
-
let tabs = [
|
42
|
-
{
|
43
|
-
title: 'New', id: 'preview'
|
44
|
-
},
|
45
|
-
{
|
46
|
-
title: 'Context', id: 'community'
|
47
|
-
}
|
48
|
-
]
|
49
|
-
|
50
|
-
const sections = [
|
51
|
-
{
|
52
|
-
title: 'Styles',
|
53
|
-
data: [
|
54
|
-
{
|
55
|
-
title: 'Styling', component: (<Tabs
|
56
|
-
title="Notes Config"
|
57
|
-
tabs={tabs}
|
58
|
-
/>)
|
59
|
-
}
|
60
|
-
]
|
61
|
-
}
|
62
|
-
]
|
63
33
|
|
64
34
|
const onIconClicked = (action) => {
|
65
35
|
if (!props.preview) {
|
@@ -93,6 +63,10 @@ const Notes = ({
|
|
93
63
|
setShowModal(false)
|
94
64
|
}
|
95
65
|
|
66
|
+
const closeModal = () => {
|
67
|
+
setShowModal(false);
|
68
|
+
}
|
69
|
+
|
96
70
|
const cancelConfig = () => {
|
97
71
|
setShowConfigModal(false);
|
98
72
|
localStorage.removeItem('formStyles')
|
@@ -112,40 +86,20 @@ const Notes = ({
|
|
112
86
|
cardIconClicked={cardIconClicked}
|
113
87
|
{...props}
|
114
88
|
/>
|
115
|
-
<
|
116
|
-
|
117
|
-
closeModal={
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
modalIsOpen={showConfigModal}
|
130
|
-
closeModal={cancelConfig}
|
131
|
-
exitModalButton={(e) => (
|
132
|
-
<div></div>
|
133
|
-
)}
|
134
|
-
>
|
135
|
-
<Tabs
|
136
|
-
title="Notes Config"
|
137
|
-
tabs={tabs}>
|
138
|
-
<NotesPreview
|
139
|
-
componentProps={{ notes, title: props.title || "Your Notes" , preview: true}}
|
140
|
-
formChanged={formChanged}
|
141
|
-
id="preview"
|
142
|
-
/>
|
143
|
-
<Community
|
144
|
-
center={centerContext}
|
145
|
-
community={community}
|
146
|
-
id="community" />
|
147
|
-
</Tabs>
|
148
|
-
</Modal>
|
89
|
+
<CreateNoteModal
|
90
|
+
showModal={showModal}
|
91
|
+
closeModal={closeModal}
|
92
|
+
onAddFolder={onAddFolder}
|
93
|
+
cancelHandler={cancelHandler}
|
94
|
+
saveBtnText={props.saveBtnText}
|
95
|
+
cancelBtnText={props.cancelBtnText}
|
96
|
+
/>
|
97
|
+
<NotesConfigModal
|
98
|
+
showConfigModal={showConfigModal}
|
99
|
+
cancelConfig={cancelConfig}
|
100
|
+
notes={notes}
|
101
|
+
community={community}
|
102
|
+
/>
|
149
103
|
</Container>
|
150
104
|
)
|
151
105
|
}
|