@mohamed-karawia/library 0.1.21 → 0.1.24
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.js +26 -26
- package/dist/stories/Chat/Chat.js +24 -31
- package/dist/stories/Community/Community.js +54 -34
- package/dist/stories/Events/Event/Event.js +12 -4
- package/dist/stories/Events/EventsList/EventsList.js +14 -7
- 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 -17
- 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 +8 -44
- 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 +12 -34
- 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
@@ -37,7 +37,7 @@ var _bs = require("react-icons/bs");
|
|
37
37
|
|
38
38
|
var _templateObject;
|
39
39
|
|
40
|
-
var _excluded = ["albums"];
|
40
|
+
var _excluded = ["albums", "community"];
|
41
41
|
|
42
42
|
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); }
|
43
43
|
|
@@ -60,6 +60,7 @@ var galleryControls = [{
|
|
60
60
|
|
61
61
|
var ViewAlbums = function ViewAlbums(_ref) {
|
62
62
|
var albums = _ref.albums,
|
63
|
+
community = _ref.community,
|
63
64
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
64
65
|
|
65
66
|
var _useState = (0, _react.useState)(false),
|
@@ -73,6 +74,7 @@ var ViewAlbums = function ViewAlbums(_ref) {
|
|
73
74
|
setShowConfigModal = _useState4[1];
|
74
75
|
|
75
76
|
var _useState5 = (0, _react.useState)( /*#__PURE__*/_react.default.createElement(ViewAlbums, {
|
77
|
+
preview: true,
|
76
78
|
albums: albums
|
77
79
|
})),
|
78
80
|
_useState6 = (0, _slicedToArray2.default)(_useState5, 2),
|
@@ -81,6 +83,7 @@ var ViewAlbums = function ViewAlbums(_ref) {
|
|
81
83
|
|
82
84
|
var formChanged = function formChanged(values) {
|
83
85
|
setCenterContext( /*#__PURE__*/_react.default.createElement(ViewAlbums, Object.assign({
|
86
|
+
preview: true,
|
84
87
|
albums: albums
|
85
88
|
}, values)));
|
86
89
|
};
|
@@ -125,6 +128,11 @@ var ViewAlbums = function ViewAlbums(_ref) {
|
|
125
128
|
setShowModal(false);
|
126
129
|
};
|
127
130
|
|
131
|
+
var cancelConfig = function cancelConfig() {
|
132
|
+
setShowConfigModal(false);
|
133
|
+
localStorage.removeItem('formStyles');
|
134
|
+
};
|
135
|
+
|
128
136
|
return /*#__PURE__*/_react.default.createElement(Container, null, /*#__PURE__*/_react.default.createElement(_Gallery.default, Object.assign({
|
129
137
|
galleryTitle: props.title || "Photo Albums",
|
130
138
|
data: albums,
|
@@ -147,9 +155,7 @@ var ViewAlbums = function ViewAlbums(_ref) {
|
|
147
155
|
cancelHandler: cancelHandler
|
148
156
|
})), /*#__PURE__*/_react.default.createElement(_ReactModal.default, {
|
149
157
|
modalIsOpen: showConfigModal,
|
150
|
-
closeModal:
|
151
|
-
return setShowConfigModal(false);
|
152
|
-
},
|
158
|
+
closeModal: cancelConfig,
|
153
159
|
exitModalButton: function exitModalButton(e) {
|
154
160
|
return /*#__PURE__*/_react.default.createElement("div", null);
|
155
161
|
}
|
@@ -167,6 +173,7 @@ var ViewAlbums = function ViewAlbums(_ref) {
|
|
167
173
|
id: "preview"
|
168
174
|
}), /*#__PURE__*/_react.default.createElement(_Community.default, {
|
169
175
|
center: centerContext,
|
176
|
+
community: community,
|
170
177
|
id: "community"
|
171
178
|
}))));
|
172
179
|
};
|
@@ -31,7 +31,7 @@ var ChatPreview = function ChatPreview(props) {
|
|
31
31
|
chatStyles = _useState2[0],
|
32
32
|
setChatStyles = _useState2[1];
|
33
33
|
|
34
|
-
var initialValues = {
|
34
|
+
var initialValues = JSON.parse(localStorage.getItem('formStyles')) || {
|
35
35
|
headerStyles: {
|
36
36
|
headerBackground: '',
|
37
37
|
padding: 0,
|
@@ -144,10 +144,12 @@ var ChatPreview = function ChatPreview(props) {
|
|
144
144
|
}];
|
145
145
|
|
146
146
|
var handleChange = function handleChange(values) {
|
147
|
-
if (
|
148
|
-
|
149
|
-
|
150
|
-
|
147
|
+
if (props.formChanged) {
|
148
|
+
if (values) {
|
149
|
+
props.formChanged(values);
|
150
|
+
setChatStyles(values);
|
151
|
+
localStorage.setItem('formStyles', JSON.stringify(values));
|
152
|
+
}
|
151
153
|
}
|
152
154
|
};
|
153
155
|
|
@@ -31,7 +31,7 @@ var EventPreview = function EventPreview(props) {
|
|
31
31
|
eventStyles = _useState2[0],
|
32
32
|
setEventStyles = _useState2[1];
|
33
33
|
|
34
|
-
var initialValues = {
|
34
|
+
var initialValues = JSON.parse(localStorage.getItem('formStyles')) || {
|
35
35
|
headerStyles: {
|
36
36
|
headerBackground: '',
|
37
37
|
padding: 0,
|
@@ -109,10 +109,12 @@ var EventPreview = function EventPreview(props) {
|
|
109
109
|
}];
|
110
110
|
|
111
111
|
var handleChange = function handleChange(values) {
|
112
|
-
if (
|
113
|
-
|
114
|
-
|
115
|
-
|
112
|
+
if (props.formChanged) {
|
113
|
+
if (values) {
|
114
|
+
props.formChanged(values);
|
115
|
+
setEventStyles(values);
|
116
|
+
localStorage.setItem('formStyles', JSON.stringify(values));
|
117
|
+
}
|
116
118
|
}
|
117
119
|
};
|
118
120
|
|
@@ -31,7 +31,7 @@ var EventsPreview = function EventsPreview(props) {
|
|
31
31
|
eventsStyles = _useState2[0],
|
32
32
|
setEventsStyles = _useState2[1];
|
33
33
|
|
34
|
-
var initialValues = {
|
34
|
+
var initialValues = JSON.parse(localStorage.getItem('formStyles')) || {
|
35
35
|
headerStyles: {
|
36
36
|
headerBackground: '',
|
37
37
|
padding: 0,
|
@@ -143,10 +143,12 @@ var EventsPreview = function EventsPreview(props) {
|
|
143
143
|
}];
|
144
144
|
|
145
145
|
var handleChange = function handleChange(values) {
|
146
|
-
if (
|
147
|
-
|
148
|
-
|
149
|
-
|
146
|
+
if (props.formChanged) {
|
147
|
+
if (values) {
|
148
|
+
props.formChanged(values);
|
149
|
+
setEventsStyles(values);
|
150
|
+
localStorage.setItem('formStyles', JSON.stringify(values));
|
151
|
+
}
|
150
152
|
}
|
151
153
|
};
|
152
154
|
|
@@ -31,7 +31,7 @@ var FoldersPreview = function FoldersPreview(props) {
|
|
31
31
|
foldersStyles = _useState2[0],
|
32
32
|
setFoldersStyles = _useState2[1];
|
33
33
|
|
34
|
-
var initialValues = {
|
34
|
+
var initialValues = JSON.parse(localStorage.getItem('formStyles')) || {
|
35
35
|
headerStyles: {
|
36
36
|
headerBackground: '',
|
37
37
|
padding: 0,
|
@@ -133,10 +133,12 @@ var FoldersPreview = function FoldersPreview(props) {
|
|
133
133
|
}];
|
134
134
|
|
135
135
|
var handleChange = function handleChange(values) {
|
136
|
-
if (
|
137
|
-
|
138
|
-
|
139
|
-
|
136
|
+
if (props.formChanged) {
|
137
|
+
if (values) {
|
138
|
+
props.formChanged(values);
|
139
|
+
setFoldersStyles(values);
|
140
|
+
localStorage.setItem('formStyles', JSON.stringify(values));
|
141
|
+
}
|
140
142
|
}
|
141
143
|
};
|
142
144
|
|
@@ -128,10 +128,12 @@ var MusicAlbum = function MusicAlbum(props) {
|
|
128
128
|
}];
|
129
129
|
|
130
130
|
var handleChange = function handleChange(values) {
|
131
|
-
if (
|
132
|
-
|
133
|
-
|
134
|
-
|
131
|
+
if (props.formChanged) {
|
132
|
+
if (values) {
|
133
|
+
props.formChanged(values);
|
134
|
+
setMusicAlbumStyles(values);
|
135
|
+
localStorage.setItem('formStyles', JSON.stringify(values));
|
136
|
+
}
|
135
137
|
}
|
136
138
|
};
|
137
139
|
|
@@ -33,7 +33,7 @@ var MusicAlbumsPreview = function MusicAlbumsPreview(props) {
|
|
33
33
|
musicAlbumsStyles = _useState2[0],
|
34
34
|
setMusicAlbumsStyles = _useState2[1];
|
35
35
|
|
36
|
-
var initialValues = {
|
36
|
+
var initialValues = JSON.parse(localStorage.getItem('formStyles')) || {
|
37
37
|
headerStyles: {
|
38
38
|
headerBackground: '',
|
39
39
|
padding: 0,
|
@@ -131,10 +131,12 @@ var MusicAlbumsPreview = function MusicAlbumsPreview(props) {
|
|
131
131
|
}];
|
132
132
|
|
133
133
|
var handleChange = function handleChange(values) {
|
134
|
-
if (
|
135
|
-
|
136
|
-
|
137
|
-
|
134
|
+
if (props.formChanged) {
|
135
|
+
if (values) {
|
136
|
+
props.formChanged(values);
|
137
|
+
setMusicAlbumsStyles(values);
|
138
|
+
localStorage.setItem('formStyles', JSON.stringify(values));
|
139
|
+
}
|
138
140
|
}
|
139
141
|
};
|
140
142
|
|
@@ -171,8 +173,7 @@ var MusicAlbumsPreview = function MusicAlbumsPreview(props) {
|
|
171
173
|
})), /*#__PURE__*/_react.default.createElement(_globalStyles.Right, null, /*#__PURE__*/_react.default.createElement(_Preview.default, {
|
172
174
|
type: 'MusicAlbums',
|
173
175
|
componentProps: props.componentProps,
|
174
|
-
stylingProps: musicAlbumsStyles
|
175
|
-
da: true
|
176
|
+
stylingProps: musicAlbumsStyles
|
176
177
|
})));
|
177
178
|
};
|
178
179
|
|
@@ -33,7 +33,7 @@ var MusicPlayerPreview = function MusicPlayerPreview(props) {
|
|
33
33
|
musicPlayerStyles = _useState2[0],
|
34
34
|
setMusicPlayerStyles = _useState2[1];
|
35
35
|
|
36
|
-
var initialValues = {
|
36
|
+
var initialValues = JSON.parse(localStorage.getItem('formStyles')) || {
|
37
37
|
headerStyles: {
|
38
38
|
headerBackground: '',
|
39
39
|
padding: 0,
|
@@ -103,10 +103,12 @@ var MusicPlayerPreview = function MusicPlayerPreview(props) {
|
|
103
103
|
}];
|
104
104
|
|
105
105
|
var handleChange = function handleChange(values) {
|
106
|
-
if (
|
107
|
-
|
108
|
-
|
109
|
-
|
106
|
+
if (props.formChanged) {
|
107
|
+
if (values) {
|
108
|
+
props.formChanged(values);
|
109
|
+
setMusicPlayerStyles(values);
|
110
|
+
localStorage.setItem('formStyles', JSON.stringify(values));
|
111
|
+
}
|
110
112
|
}
|
111
113
|
};
|
112
114
|
|
@@ -31,7 +31,7 @@ var NavbarPreview = function NavbarPreview(props) {
|
|
31
31
|
navbarStyles = _useState2[0],
|
32
32
|
setNavbarStyles = _useState2[1];
|
33
33
|
|
34
|
-
var initialValues = {
|
34
|
+
var initialValues = JSON.parse(localStorage.getItem('formStyles')) || {
|
35
35
|
iconSize: 'md',
|
36
36
|
iconBackgroundColor: 'black',
|
37
37
|
navbarColor: 'white'
|
@@ -64,10 +64,12 @@ var NavbarPreview = function NavbarPreview(props) {
|
|
64
64
|
}];
|
65
65
|
|
66
66
|
var handleChange = function handleChange(values) {
|
67
|
-
if (
|
68
|
-
|
69
|
-
|
70
|
-
|
67
|
+
if (props.formChanged) {
|
68
|
+
if (values) {
|
69
|
+
props.formChanged(values);
|
70
|
+
setNavbarStyles(values);
|
71
|
+
localStorage.setItem('formStyles', JSON.stringify(values));
|
72
|
+
}
|
71
73
|
}
|
72
74
|
};
|
73
75
|
|
@@ -31,7 +31,7 @@ var NotesPreview = function NotesPreview(props) {
|
|
31
31
|
notesStyles = _useState2[0],
|
32
32
|
setNotesStyles = _useState2[1];
|
33
33
|
|
34
|
-
var initialValues = {
|
34
|
+
var initialValues = JSON.parse(localStorage.getItem('formStyles')) || {
|
35
35
|
headerStyles: {
|
36
36
|
headerBackground: '',
|
37
37
|
padding: 0,
|
@@ -124,10 +124,12 @@ var NotesPreview = function NotesPreview(props) {
|
|
124
124
|
}];
|
125
125
|
|
126
126
|
var handleChange = function handleChange(values) {
|
127
|
-
if (
|
128
|
-
|
129
|
-
|
130
|
-
|
127
|
+
if (props.formChanged) {
|
128
|
+
if (values) {
|
129
|
+
props.formChanged(values);
|
130
|
+
setNotesStyles(values);
|
131
|
+
localStorage.setItem('formStyles', JSON.stringify(values));
|
132
|
+
}
|
131
133
|
}
|
132
134
|
};
|
133
135
|
|
@@ -31,7 +31,7 @@ var PhotoAlbumPreview = function PhotoAlbumPreview(props) {
|
|
31
31
|
photoAlbumStyles = _useState2[0],
|
32
32
|
setPhotoAlbumStyles = _useState2[1];
|
33
33
|
|
34
|
-
var initialValues = {
|
34
|
+
var initialValues = JSON.parse(localStorage.getItem('formStyles')) || {
|
35
35
|
headerStyles: {
|
36
36
|
headerBackground: '',
|
37
37
|
padding: 0,
|
@@ -140,10 +140,12 @@ var PhotoAlbumPreview = function PhotoAlbumPreview(props) {
|
|
140
140
|
}];
|
141
141
|
|
142
142
|
var handleChange = function handleChange(values) {
|
143
|
-
if (
|
144
|
-
|
145
|
-
|
146
|
-
|
143
|
+
if (props.formChanged) {
|
144
|
+
if (values) {
|
145
|
+
props.formChanged(values);
|
146
|
+
setPhotoAlbumStyles(values);
|
147
|
+
localStorage.setItem('formStyles', JSON.stringify(values));
|
148
|
+
}
|
147
149
|
}
|
148
150
|
};
|
149
151
|
|
@@ -31,7 +31,7 @@ var PhotoAlbumsPreview = function PhotoAlbumsPreview(props) {
|
|
31
31
|
photoAlbumsStyles = _useState2[0],
|
32
32
|
setPhotoAlbumsStyles = _useState2[1];
|
33
33
|
|
34
|
-
var initialValues = {
|
34
|
+
var initialValues = JSON.parse(localStorage.getItem('formStyles')) || {
|
35
35
|
headerStyles: {
|
36
36
|
headerBackground: '',
|
37
37
|
padding: 0,
|
@@ -140,10 +140,12 @@ var PhotoAlbumsPreview = function PhotoAlbumsPreview(props) {
|
|
140
140
|
}];
|
141
141
|
|
142
142
|
var handleChange = function handleChange(values) {
|
143
|
-
if (
|
144
|
-
|
145
|
-
|
146
|
-
|
143
|
+
if (props.formChanged) {
|
144
|
+
if (values) {
|
145
|
+
props.formChanged(values);
|
146
|
+
setPhotoAlbumsStyles(values);
|
147
|
+
localStorage.setItem('formStyles', JSON.stringify(values));
|
148
|
+
}
|
147
149
|
}
|
148
150
|
};
|
149
151
|
|
@@ -31,7 +31,7 @@ var SpacesListPreview = function SpacesListPreview(props) {
|
|
31
31
|
spacesStyles = _useState2[0],
|
32
32
|
setSpacesStyles = _useState2[1];
|
33
33
|
|
34
|
-
var initialValues = {
|
34
|
+
var initialValues = JSON.parse(localStorage.getItem('formStyles')) || {
|
35
35
|
headerStyles: {
|
36
36
|
headerBackground: '',
|
37
37
|
padding: 0,
|
@@ -148,10 +148,12 @@ var SpacesListPreview = function SpacesListPreview(props) {
|
|
148
148
|
}];
|
149
149
|
|
150
150
|
var handleChange = function handleChange(values) {
|
151
|
-
if (
|
152
|
-
|
153
|
-
|
154
|
-
|
151
|
+
if (props.formChanged) {
|
152
|
+
if (values) {
|
153
|
+
props.formChanged(values);
|
154
|
+
setSpacesStyles(values);
|
155
|
+
localStorage.setItem('formStyles', JSON.stringify(values));
|
156
|
+
}
|
155
157
|
}
|
156
158
|
};
|
157
159
|
|
@@ -31,7 +31,7 @@ var VideoAlbumPreview = function VideoAlbumPreview(props) {
|
|
31
31
|
videoAlbumStyles = _useState2[0],
|
32
32
|
setVideoAlbumStyles = _useState2[1];
|
33
33
|
|
34
|
-
var initialValues = {
|
34
|
+
var initialValues = JSON.parse(localStorage.getItem('formStyles')) || {
|
35
35
|
headerStyles: {
|
36
36
|
headerBackground: '',
|
37
37
|
padding: 0,
|
@@ -140,10 +140,12 @@ var VideoAlbumPreview = function VideoAlbumPreview(props) {
|
|
140
140
|
}];
|
141
141
|
|
142
142
|
var handleChange = function handleChange(values) {
|
143
|
-
if (
|
144
|
-
|
145
|
-
|
146
|
-
|
143
|
+
if (props.formChanged) {
|
144
|
+
if (values) {
|
145
|
+
props.formChanged(values);
|
146
|
+
setVideoAlbumStyles(values);
|
147
|
+
localStorage.setItem('formStyles', JSON.stringify(values));
|
148
|
+
}
|
147
149
|
}
|
148
150
|
};
|
149
151
|
|
@@ -31,7 +31,7 @@ var VideoAlbumsPreview = function VideoAlbumsPreview(props) {
|
|
31
31
|
videoAlbumsStyles = _useState2[0],
|
32
32
|
setVideoAlbumsStyles = _useState2[1];
|
33
33
|
|
34
|
-
var initialValues = {
|
34
|
+
var initialValues = JSON.parse(localStorage.getItem('formStyles')) || {
|
35
35
|
headerStyles: {
|
36
36
|
headerBackground: '',
|
37
37
|
padding: 0,
|
@@ -126,10 +126,12 @@ var VideoAlbumsPreview = function VideoAlbumsPreview(props) {
|
|
126
126
|
}];
|
127
127
|
|
128
128
|
var handleChange = function handleChange(values) {
|
129
|
-
if (
|
130
|
-
|
131
|
-
|
132
|
-
|
129
|
+
if (props.formChanged) {
|
130
|
+
if (values) {
|
131
|
+
props.formChanged(values);
|
132
|
+
setVideoAlbumsStyles(values);
|
133
|
+
localStorage.setItem('formStyles', JSON.stringify(values));
|
134
|
+
}
|
133
135
|
}
|
134
136
|
};
|
135
137
|
|
@@ -31,7 +31,7 @@ var VideoPreview = function VideoPreview(props) {
|
|
31
31
|
videoStyles = _useState2[0],
|
32
32
|
setVideoStyles = _useState2[1];
|
33
33
|
|
34
|
-
var initialValues = {
|
34
|
+
var initialValues = JSON.parse(localStorage.getItem('formStyles')) || {
|
35
35
|
headerStyles: {
|
36
36
|
headerBackground: '',
|
37
37
|
padding: 0,
|
@@ -123,10 +123,12 @@ var VideoPreview = function VideoPreview(props) {
|
|
123
123
|
}];
|
124
124
|
|
125
125
|
var handleChange = function handleChange(values) {
|
126
|
-
if (
|
127
|
-
|
128
|
-
|
129
|
-
|
126
|
+
if (props.formChanged) {
|
127
|
+
if (values) {
|
128
|
+
props.formChanged(values);
|
129
|
+
setVideoStyles(values);
|
130
|
+
localStorage.setItem('formStyles', JSON.stringify(values));
|
131
|
+
}
|
130
132
|
}
|
131
133
|
};
|
132
134
|
|
@@ -0,0 +1,58 @@
|
|
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 _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
13
|
+
|
14
|
+
var _react = _interopRequireDefault(require("react"));
|
15
|
+
|
16
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
17
|
+
|
18
|
+
var _ReusableList = _interopRequireDefault(require("../../Reusable Components/ReusableList/ReusableList"));
|
19
|
+
|
20
|
+
var _templateObject;
|
21
|
+
|
22
|
+
var _excluded = ["comments", "cardPadding", "imgSize", "cardTitleFontSize", "cardTitleColor", "contentGap", "cardBackgroundColor"];
|
23
|
+
|
24
|
+
var Comments = function Comments(_ref) {
|
25
|
+
var comments = _ref.comments,
|
26
|
+
cardPadding = _ref.cardPadding,
|
27
|
+
imgSize = _ref.imgSize,
|
28
|
+
cardTitleFontSize = _ref.cardTitleFontSize,
|
29
|
+
cardTitleColor = _ref.cardTitleColor,
|
30
|
+
contentGap = _ref.contentGap,
|
31
|
+
cardBackgroundColor = _ref.cardBackgroundColor,
|
32
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
33
|
+
return /*#__PURE__*/_react.default.createElement(Container, null, /*#__PURE__*/_react.default.createElement(_ReusableList.default, {
|
34
|
+
data: comments,
|
35
|
+
type: "flat",
|
36
|
+
cardStyle: "card-style-1",
|
37
|
+
customCardStyles: {
|
38
|
+
cardPadding: cardPadding,
|
39
|
+
imgSize: imgSize,
|
40
|
+
cardTitleFontSize: cardTitleFontSize,
|
41
|
+
cardTitleColor: cardTitleColor,
|
42
|
+
contentGap: contentGap,
|
43
|
+
cardBackgroundColor: cardBackgroundColor
|
44
|
+
}
|
45
|
+
}));
|
46
|
+
};
|
47
|
+
|
48
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\n"])));
|
49
|
+
|
50
|
+
Comments.defaultProps = {
|
51
|
+
cardPadding: 10,
|
52
|
+
imgSize: 50,
|
53
|
+
cardTitleFontSize: 12,
|
54
|
+
cardTitleColor: '#353535',
|
55
|
+
cardBackgroundColor: 'white'
|
56
|
+
};
|
57
|
+
var _default = Comments;
|
58
|
+
exports.default = _default;
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
7
7
|
});
|
8
8
|
exports.default = void 0;
|
9
9
|
|
10
|
-
var
|
10
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
11
11
|
|
12
12
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
13
13
|
|
@@ -27,49 +27,27 @@ var _Right = _interopRequireDefault(require("../../Layout/Right/Right"));
|
|
27
27
|
|
28
28
|
var _WidgetContainer = _interopRequireDefault(require("../../Reusable Components/WidgetContainer/WidgetContainer"));
|
29
29
|
|
30
|
-
var
|
30
|
+
var _BaseMaterial = _interopRequireDefault(require("../../Containers/BaseMaterial"));
|
31
31
|
|
32
|
-
var _excluded = ["context"];
|
32
|
+
var _excluded = ["context", "community"];
|
33
33
|
|
34
34
|
// import styles from '../../styling.json'
|
35
35
|
var Community = function Community(_ref) {
|
36
36
|
var context = _ref.context,
|
37
|
+
community = _ref.community,
|
37
38
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
38
|
-
var
|
39
|
-
|
40
|
-
data: [{
|
41
|
-
title: 'Cargo Sprint',
|
42
|
-
path: 'cago'
|
43
|
-
}, {
|
44
|
-
title: 'Movies',
|
45
|
-
path: 'movies'
|
46
|
-
}]
|
47
|
-
}, {
|
48
|
-
title: 'Entertainment',
|
49
|
-
data: [{
|
50
|
-
title: 'Gaming',
|
51
|
-
path: 'games'
|
52
|
-
}, {
|
53
|
-
title: 'Music',
|
54
|
-
path: 'music'
|
55
|
-
}]
|
56
|
-
}];
|
57
|
-
return /*#__PURE__*/_react.default.createElement(Container, null, /*#__PURE__*/_react.default.createElement(_Navbar.default, null), /*#__PURE__*/_react.default.createElement(_Body.default, null, /*#__PURE__*/_react.default.createElement(_Left.default, null, /*#__PURE__*/_react.default.createElement(_WidgetContainer.default, {
|
39
|
+
var spacesWidget = community.spacesListWidget.widgetSpacesList;
|
40
|
+
return /*#__PURE__*/_react.default.createElement(_BaseMaterial.default, community.styles, /*#__PURE__*/_react.default.createElement(_Navbar.default, community.navbarStyles), /*#__PURE__*/_react.default.createElement(_Body.default, null, /*#__PURE__*/_react.default.createElement(_Left.default, null, /*#__PURE__*/_react.default.createElement(_WidgetContainer.default, {
|
58
41
|
widgetType: "spaces-list",
|
59
|
-
widgetProps: {
|
60
|
-
listTitle:
|
61
|
-
spaces: spaces,
|
42
|
+
widgetProps: (0, _objectSpread2.default)({
|
43
|
+
listTitle: spacesWidget.listTitle,
|
44
|
+
spaces: spacesWidget.spaces,
|
62
45
|
cardClicked: function cardClicked() {
|
63
|
-
return
|
64
|
-
}
|
65
|
-
|
66
|
-
// customCardStyles: styles.widgetContainer.body.customCardStyles,
|
67
|
-
|
68
|
-
}
|
46
|
+
return null;
|
47
|
+
}
|
48
|
+
}, spacesWidget.styles)
|
69
49
|
})), /*#__PURE__*/_react.default.createElement(_Center.default, null, props.center), /*#__PURE__*/_react.default.createElement(_Right.default, null, props.right)));
|
70
50
|
};
|
71
51
|
|
72
|
-
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n height: auto;\n display: flex;\n min-height: 100vh;\n flex-direction: column;\n"])));
|
73
|
-
|
74
52
|
var _default = Community;
|
75
53
|
exports.default = _default;
|
@@ -0,0 +1,67 @@
|
|
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 _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
13
|
+
|
14
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
15
|
+
|
16
|
+
var _react = _interopRequireWildcard(require("react"));
|
17
|
+
|
18
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
19
|
+
|
20
|
+
var _ReusableList = _interopRequireDefault(require("../ReusableList/ReusableList"));
|
21
|
+
|
22
|
+
var _templateObject, _templateObject2, _templateObject3;
|
23
|
+
|
24
|
+
var _excluded = ["sections"];
|
25
|
+
|
26
|
+
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); }
|
27
|
+
|
28
|
+
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; }
|
29
|
+
|
30
|
+
var Sections = function Sections(_ref) {
|
31
|
+
var sections = _ref.sections,
|
32
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
33
|
+
|
34
|
+
var _useState = (0, _react.useState)(props.children[0] || props.children),
|
35
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
36
|
+
center = _useState2[0],
|
37
|
+
setCenter = _useState2[1];
|
38
|
+
|
39
|
+
console.log('renders');
|
40
|
+
|
41
|
+
var cardClicked = function cardClicked(index, cardProps) {
|
42
|
+
var child = props.children.find(function (child) {
|
43
|
+
return child.props.id === cardProps.id;
|
44
|
+
});
|
45
|
+
setCenter(child);
|
46
|
+
console.log(child);
|
47
|
+
};
|
48
|
+
|
49
|
+
return /*#__PURE__*/_react.default.createElement(Container, props, /*#__PURE__*/_react.default.createElement(Left, null, /*#__PURE__*/_react.default.createElement(_ReusableList.default, Object.assign({
|
50
|
+
type: "sectioned",
|
51
|
+
data: sections,
|
52
|
+
cardStyle: "card-style-3",
|
53
|
+
cardClicked: cardClicked
|
54
|
+
}, props))), /*#__PURE__*/_react.default.createElement(Center, null, center));
|
55
|
+
};
|
56
|
+
|
57
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background-color: ", ";\n background-color: #414141;\n display: flex;\n"])), function (props) {
|
58
|
+
return props.backgroundColor;
|
59
|
+
});
|
60
|
+
|
61
|
+
var Left = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n flex: 1;\n"])));
|
62
|
+
|
63
|
+
var Center = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n flex: 3;\n"])));
|
64
|
+
|
65
|
+
Sections.defaultProps = {};
|
66
|
+
var _default = Sections;
|
67
|
+
exports.default = _default;
|