@mohamed-karawia/library 0.1.21 → 0.1.22
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/stories/Chat/Chat.js +24 -31
- package/dist/stories/Community/Community.js +37 -15
- package/dist/stories/Events/Event/Event.js +12 -4
- package/dist/stories/Events/EventsList/EventsList.js +14 -7
- package/dist/stories/Library/Folders/Folders.js +27 -17
- package/dist/stories/Library/Notes/Notes.js +29 -18
- package/dist/stories/Music Album/ViewAlbum/ViewAlbum.js +8 -44
- package/dist/stories/Music Album/ViewAlbums/ViewAlbums.js +57 -37
- 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 +1 -1
- package/dist/stories/PreviewComponents/EventPreview/EventPreview.js +1 -1
- package/dist/stories/PreviewComponents/EventsPreview/EventsPreview.js +1 -1
- package/dist/stories/PreviewComponents/FoldersPreview/FoldersPreview.js +1 -1
- package/dist/stories/PreviewComponents/MusicAlbumsPreview/MusicAlbumsPreview.js +1 -1
- package/dist/stories/PreviewComponents/MusicPlayerPreview/MusicPlayerPreview.js +1 -1
- package/dist/stories/PreviewComponents/NavbarPreview/NavbarPreview.js +1 -1
- package/dist/stories/PreviewComponents/NotesPreview/NotesPreview.js +1 -1
- package/dist/stories/PreviewComponents/PhotoAlbumPreview/PhotoAlbumPreview.js +1 -1
- package/dist/stories/PreviewComponents/PhotoAlbumsPreview/PhotoAlbumsPreview.js +1 -1
- package/dist/stories/PreviewComponents/SpacesListPreview/SpacesListPreview.js +1 -1
- package/dist/stories/PreviewComponents/VideoAlbumPreview/VideoAlbumPreview.js +1 -1
- package/dist/stories/PreviewComponents/VideoAlbumsPreview/VideoAlbumsPreview.js +1 -1
- package/dist/stories/PreviewComponents/VideoPreview/VideoPreview.js +1 -1
- package/dist/stories/Reusable Components/Community/Community.js +12 -34
- 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/store/communities.js +27 -29
- package/package.json +1 -1
- package/src/stories/Chat/Chat.jsx +25 -19
- package/src/stories/Community/Community.jsx +14 -15
- package/src/stories/Events/Event/Event.jsx +11 -3
- package/src/stories/Events/EventsList/EventsList.jsx +11 -4
- package/src/stories/Library/Folders/Folders.jsx +23 -14
- package/src/stories/Library/Notes/Notes.jsx +25 -15
- package/src/stories/Music Album/ViewAlbum/ViewAlbum.jsx +17 -61
- package/src/stories/Music Album/ViewAlbums/ViewAlbums.jsx +44 -30
- package/src/stories/Photo Album/ViewAlbum/ViewAlbum.jsx +14 -5
- package/src/stories/Photo Album/ViewAlbums/ViewAlbums.jsx +10 -3
- package/src/stories/PreviewComponents/ChatPreview/ChatPreview.jsx +1 -1
- package/src/stories/PreviewComponents/EventPreview/EventPreview.jsx +1 -1
- package/src/stories/PreviewComponents/EventsPreview/EventsPreview.jsx +1 -1
- package/src/stories/PreviewComponents/FoldersPreview/FoldersPreview.jsx +1 -1
- package/src/stories/PreviewComponents/MusicAlbumsPreview/MusicAlbumsPreview.jsx +1 -1
- package/src/stories/PreviewComponents/MusicPlayerPreview/MusicPlayerPreview.jsx +1 -1
- package/src/stories/PreviewComponents/NavbarPreview/NavbarPreview.jsx +1 -1
- package/src/stories/PreviewComponents/NotesPreview/NotesPreview.jsx +1 -1
- package/src/stories/PreviewComponents/PhotoAlbumPreview/PhotoAlbumPreview.jsx +1 -1
- package/src/stories/PreviewComponents/PhotoAlbumsPreview/PhotoAlbumsPreview.jsx +1 -1
- package/src/stories/PreviewComponents/SpacesListPreview/SpacesListPreview.jsx +1 -1
- package/src/stories/PreviewComponents/VideoAlbumPreview/VideoAlbumPreview.jsx +1 -1
- package/src/stories/PreviewComponents/VideoAlbumsPreview/VideoAlbumsPreview.jsx +1 -1
- package/src/stories/PreviewComponents/VideoPreview/VideoPreview.jsx +1 -1
- package/src/stories/Reusable Components/Community/Community.jsx +10 -33
- package/src/stories/VideoAlbum/AlbumsGallery/AlbumsGallery.jsx +10 -3
- package/src/stories/VideoAlbum/VideoSpace/VideoSpace.jsx +10 -3
- package/src/stories/VideoAlbum/ViewAlbum/ViewAlbum.jsx +30 -34
- package/src/stories/store/communities.js +27 -29
@@ -29,13 +29,15 @@ var _Sections = _interopRequireDefault(require("../../Sections/Sections"));
|
|
29
29
|
|
30
30
|
var _MusicAlbumsPreview = _interopRequireDefault(require("../../PreviewComponents/MusicAlbumsPreview/MusicAlbumsPreview"));
|
31
31
|
|
32
|
+
var _Community = _interopRequireDefault(require("../../Reusable Components/Community/Community"));
|
33
|
+
|
32
34
|
var _ai = require("react-icons/ai");
|
33
35
|
|
34
36
|
var _bs = require("react-icons/bs");
|
35
37
|
|
36
38
|
var _templateObject;
|
37
39
|
|
38
|
-
var _excluded = ["albums", "
|
40
|
+
var _excluded = ["albums", "community"];
|
39
41
|
|
40
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); }
|
41
43
|
|
@@ -58,8 +60,7 @@ var galleryControls = [{
|
|
58
60
|
|
59
61
|
var ViewAlbums = function ViewAlbums(_ref) {
|
60
62
|
var albums = _ref.albums,
|
61
|
-
|
62
|
-
descColor = _ref.descColor,
|
63
|
+
community = _ref.community,
|
63
64
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
64
65
|
|
65
66
|
var _useState = (0, _react.useState)(false),
|
@@ -72,14 +73,20 @@ var ViewAlbums = function ViewAlbums(_ref) {
|
|
72
73
|
showConfigModal = _useState4[0],
|
73
74
|
setShowConfigModal = _useState4[1];
|
74
75
|
|
76
|
+
var _useState5 = (0, _react.useState)( /*#__PURE__*/_react.default.createElement(ViewAlbums, {
|
77
|
+
preview: true,
|
78
|
+
albums: albums
|
79
|
+
})),
|
80
|
+
_useState6 = (0, _slicedToArray2.default)(_useState5, 2),
|
81
|
+
centerContext = _useState6[0],
|
82
|
+
setCenterContext = _useState6[1];
|
83
|
+
|
75
84
|
var tabs = [{
|
76
85
|
title: 'New',
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
}
|
82
|
-
})
|
86
|
+
id: 'preview'
|
87
|
+
}, {
|
88
|
+
title: 'Context',
|
89
|
+
id: 'community'
|
83
90
|
}];
|
84
91
|
var sections = [{
|
85
92
|
title: 'Styles',
|
@@ -93,17 +100,19 @@ var ViewAlbums = function ViewAlbums(_ref) {
|
|
93
100
|
}];
|
94
101
|
|
95
102
|
var onHeaderIconClicked = function onHeaderIconClicked(action) {
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
103
|
+
if (!props.preview) {
|
104
|
+
switch (action) {
|
105
|
+
case 'add':
|
106
|
+
setShowModal(true);
|
107
|
+
break;
|
108
|
+
|
109
|
+
case 'config':
|
110
|
+
setShowConfigModal(true);
|
111
|
+
break;
|
112
|
+
|
113
|
+
default:
|
114
|
+
break;
|
115
|
+
}
|
107
116
|
}
|
108
117
|
};
|
109
118
|
|
@@ -111,6 +120,13 @@ var ViewAlbums = function ViewAlbums(_ref) {
|
|
111
120
|
props.cardIconClicked(action, index);
|
112
121
|
};
|
113
122
|
|
123
|
+
var formChanged = function formChanged(values) {
|
124
|
+
setCenterContext( /*#__PURE__*/_react.default.createElement(ViewAlbums, Object.assign({
|
125
|
+
preview: true,
|
126
|
+
albums: albums
|
127
|
+
}, values)));
|
128
|
+
};
|
129
|
+
|
114
130
|
var onAddAlbum = function onAddAlbum(album) {
|
115
131
|
setShowModal(false);
|
116
132
|
props.onAddAlbum(album);
|
@@ -120,6 +136,11 @@ var ViewAlbums = function ViewAlbums(_ref) {
|
|
120
136
|
setShowModal(false);
|
121
137
|
};
|
122
138
|
|
139
|
+
var cancelConfig = function cancelConfig() {
|
140
|
+
setShowConfigModal(false);
|
141
|
+
localStorage.removeItem('formStyles');
|
142
|
+
};
|
143
|
+
|
123
144
|
return /*#__PURE__*/_react.default.createElement(Container, null, /*#__PURE__*/_react.default.createElement(_Gallery.default, Object.assign({
|
124
145
|
galleryTitle: props.title || 'Music Albums',
|
125
146
|
data: albums,
|
@@ -144,27 +165,26 @@ var ViewAlbums = function ViewAlbums(_ref) {
|
|
144
165
|
cancelBtnText: props.cancelBtnText || "Cancel"
|
145
166
|
})), /*#__PURE__*/_react.default.createElement(_ReactModal.default, {
|
146
167
|
modalIsOpen: showConfigModal,
|
147
|
-
closeModal:
|
148
|
-
return setShowConfigModal(false);
|
149
|
-
},
|
168
|
+
closeModal: cancelConfig,
|
150
169
|
exitModalButton: function exitModalButton(e) {
|
151
170
|
return /*#__PURE__*/_react.default.createElement("div", null);
|
152
171
|
}
|
153
|
-
}, /*#__PURE__*/_react.default.createElement(
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
172
|
+
}, /*#__PURE__*/_react.default.createElement(_Tabs.default, {
|
173
|
+
title: "Albums Config",
|
174
|
+
tabs: tabs
|
175
|
+
}, /*#__PURE__*/_react.default.createElement(_MusicAlbumsPreview.default, {
|
176
|
+
componentProps: {
|
177
|
+
albums: albums,
|
178
|
+
title: 'Music Albums',
|
179
|
+
preview: true
|
159
180
|
},
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
})));
|
181
|
+
formChanged: formChanged,
|
182
|
+
id: "preview"
|
183
|
+
}), /*#__PURE__*/_react.default.createElement(_Community.default, {
|
184
|
+
center: centerContext,
|
185
|
+
community: community,
|
186
|
+
id: "community"
|
187
|
+
}))));
|
168
188
|
};
|
169
189
|
|
170
190
|
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n"])));
|
@@ -39,7 +39,7 @@ var _bs = require("react-icons/bs");
|
|
39
39
|
|
40
40
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
41
41
|
|
42
|
-
var _excluded = ["album", "cardBackgroundColor", "imgTitleColor", "descColor"];
|
42
|
+
var _excluded = ["album", "cardBackgroundColor", "imgTitleColor", "descColor", "community"];
|
43
43
|
|
44
44
|
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); }
|
45
45
|
|
@@ -65,6 +65,7 @@ var ViewAlbum = function ViewAlbum(_ref) {
|
|
65
65
|
cardBackgroundColor = _ref.cardBackgroundColor,
|
66
66
|
imgTitleColor = _ref.imgTitleColor,
|
67
67
|
descColor = _ref.descColor,
|
68
|
+
community = _ref.community,
|
68
69
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
69
70
|
var cardStyles = {
|
70
71
|
cardBackgroundColor: cardBackgroundColor,
|
@@ -114,6 +115,7 @@ var ViewAlbum = function ViewAlbum(_ref) {
|
|
114
115
|
setOpenedImg = _useState10[1];
|
115
116
|
|
116
117
|
var _useState11 = (0, _react.useState)( /*#__PURE__*/_react.default.createElement(ViewAlbum, {
|
118
|
+
preview: true,
|
117
119
|
album: album
|
118
120
|
})),
|
119
121
|
_useState12 = (0, _slicedToArray2.default)(_useState11, 2),
|
@@ -122,6 +124,7 @@ var ViewAlbum = function ViewAlbum(_ref) {
|
|
122
124
|
|
123
125
|
var formChanged = function formChanged(values) {
|
124
126
|
setCenterContext( /*#__PURE__*/_react.default.createElement(ViewAlbum, Object.assign({
|
127
|
+
preview: true,
|
125
128
|
album: album
|
126
129
|
}, values)));
|
127
130
|
};
|
@@ -152,17 +155,19 @@ var ViewAlbum = function ViewAlbum(_ref) {
|
|
152
155
|
}, [openedImgIndex, handleUserKeyPress]);
|
153
156
|
|
154
157
|
var onIconClicked = function onIconClicked(action) {
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
158
|
+
if (!props.preview) {
|
159
|
+
switch (action) {
|
160
|
+
case 'add':
|
161
|
+
setShowModal(true);
|
162
|
+
break;
|
163
|
+
|
164
|
+
case 'config':
|
165
|
+
setShowConfigModal(true);
|
166
|
+
break;
|
167
|
+
|
168
|
+
default:
|
169
|
+
break;
|
170
|
+
}
|
166
171
|
}
|
167
172
|
};
|
168
173
|
|
@@ -198,6 +203,11 @@ var ViewAlbum = function ViewAlbum(_ref) {
|
|
198
203
|
}
|
199
204
|
};
|
200
205
|
|
206
|
+
var cancelConfig = function cancelConfig() {
|
207
|
+
setShowConfigModal(false);
|
208
|
+
localStorage.removeItem('formStyles');
|
209
|
+
};
|
210
|
+
|
201
211
|
return /*#__PURE__*/_react.default.createElement(Container, null, /*#__PURE__*/_react.default.createElement(_Gallery.default, Object.assign({
|
202
212
|
galleryTitle: props.title || "Photo Album",
|
203
213
|
data: album,
|
@@ -246,9 +256,7 @@ var ViewAlbum = function ViewAlbum(_ref) {
|
|
246
256
|
onClick: nextPhoto
|
247
257
|
}, /*#__PURE__*/_react.default.createElement(_ai.AiOutlineArrowRight, null))), /*#__PURE__*/_react.default.createElement(_ReactModal.default, {
|
248
258
|
modalIsOpen: showConfigModal,
|
249
|
-
closeModal:
|
250
|
-
return setShowConfigModal(false);
|
251
|
-
},
|
259
|
+
closeModal: cancelConfig,
|
252
260
|
exitModalButton: function exitModalButton(e) {
|
253
261
|
return /*#__PURE__*/_react.default.createElement("div", null);
|
254
262
|
}
|
@@ -262,9 +270,11 @@ var ViewAlbum = function ViewAlbum(_ref) {
|
|
262
270
|
title: props.title || 'Photo Album',
|
263
271
|
preview: true
|
264
272
|
},
|
265
|
-
formChanged: formChanged
|
273
|
+
formChanged: formChanged,
|
274
|
+
id: "preview"
|
266
275
|
}), /*#__PURE__*/_react.default.createElement(_Community.default, {
|
267
276
|
center: centerContext,
|
277
|
+
community: community,
|
268
278
|
id: "community"
|
269
279
|
}))));
|
270
280
|
};
|
@@ -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,
|
@@ -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,
|
@@ -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,
|
@@ -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,
|
@@ -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,
|
@@ -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,
|
@@ -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'
|
@@ -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,
|
@@ -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,
|
@@ -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,
|
@@ -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,
|
@@ -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,
|
@@ -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,
|
@@ -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,
|
@@ -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;
|
@@ -37,7 +37,7 @@ var _bs = require("react-icons/bs");
|
|
37
37
|
|
38
38
|
var _templateObject;
|
39
39
|
|
40
|
-
var _excluded = ["videoAlbums", "cardBackgroundColor", "cardTitleColor", "cardTitleFontSize", "countColor", "countFontSize"];
|
40
|
+
var _excluded = ["videoAlbums", "cardBackgroundColor", "cardTitleColor", "cardTitleFontSize", "countColor", "countFontSize", "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
|
|
@@ -65,6 +65,7 @@ var AlbumsGallery = function AlbumsGallery(_ref) {
|
|
65
65
|
cardTitleFontSize = _ref.cardTitleFontSize,
|
66
66
|
countColor = _ref.countColor,
|
67
67
|
countFontSize = _ref.countFontSize,
|
68
|
+
community = _ref.community,
|
68
69
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
69
70
|
|
70
71
|
var _useState = (0, _react.useState)(false),
|
@@ -78,6 +79,7 @@ var AlbumsGallery = function AlbumsGallery(_ref) {
|
|
78
79
|
setShowConfigModal = _useState4[1];
|
79
80
|
|
80
81
|
var _useState5 = (0, _react.useState)( /*#__PURE__*/_react.default.createElement(AlbumsGallery, {
|
82
|
+
preview: true,
|
81
83
|
videoAlbums: videoAlbums
|
82
84
|
})),
|
83
85
|
_useState6 = (0, _slicedToArray2.default)(_useState5, 2),
|
@@ -86,6 +88,7 @@ var AlbumsGallery = function AlbumsGallery(_ref) {
|
|
86
88
|
|
87
89
|
var formChanged = function formChanged(values) {
|
88
90
|
setCenterContext( /*#__PURE__*/_react.default.createElement(AlbumsGallery, Object.assign({
|
91
|
+
preview: true,
|
89
92
|
videoAlbums: videoAlbums
|
90
93
|
}, values)));
|
91
94
|
};
|
@@ -151,6 +154,11 @@ var AlbumsGallery = function AlbumsGallery(_ref) {
|
|
151
154
|
setShowModal(false);
|
152
155
|
};
|
153
156
|
|
157
|
+
var cancelConfig = function cancelConfig() {
|
158
|
+
setShowConfigModal(false);
|
159
|
+
localStorage.removeItem('formStyles');
|
160
|
+
};
|
161
|
+
|
154
162
|
return /*#__PURE__*/_react.default.createElement(Container, null, /*#__PURE__*/_react.default.createElement(_Gallery.default, Object.assign({
|
155
163
|
galleryTitle: "Video Albums",
|
156
164
|
data: videoAlbums,
|
@@ -180,9 +188,7 @@ var AlbumsGallery = function AlbumsGallery(_ref) {
|
|
180
188
|
cancelHandler: cancelHandler
|
181
189
|
})), /*#__PURE__*/_react.default.createElement(_ReactModal.default, {
|
182
190
|
modalIsOpen: showConfigModal,
|
183
|
-
closeModal:
|
184
|
-
return setShowConfigModal(false);
|
185
|
-
},
|
191
|
+
closeModal: cancelConfig,
|
186
192
|
exitModalButton: function exitModalButton(e) {
|
187
193
|
return /*#__PURE__*/_react.default.createElement("div", null);
|
188
194
|
}
|
@@ -199,6 +205,7 @@ var AlbumsGallery = function AlbumsGallery(_ref) {
|
|
199
205
|
id: "preview"
|
200
206
|
}), /*#__PURE__*/_react.default.createElement(_Community.default, {
|
201
207
|
center: centerContext,
|
208
|
+
community: community,
|
202
209
|
id: "community"
|
203
210
|
}))));
|
204
211
|
};
|
@@ -37,7 +37,7 @@ var _Tabs = _interopRequireDefault(require("../../Reusable Components/Tabs/Tabs"
|
|
37
37
|
|
38
38
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
39
39
|
|
40
|
-
var _excluded = ["videoSrc", "title", "discription", "date", "users", "iconsColor", "backgroundColor", "detailsPadding", "titleFontSize", "titleColor", "dateFontSize", "dateColor", "discFontSize", "discColor", "comments", "commentBackgroundColor", "commentTitleColor", "commentTitleFontSize"];
|
40
|
+
var _excluded = ["videoSrc", "title", "discription", "date", "users", "iconsColor", "backgroundColor", "detailsPadding", "titleFontSize", "titleColor", "dateFontSize", "dateColor", "discFontSize", "discColor", "comments", "commentBackgroundColor", "commentTitleColor", "commentTitleFontSize", "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
|
|
@@ -68,6 +68,7 @@ var VideoSpace = function VideoSpace(_ref) {
|
|
68
68
|
commentBackgroundColor = _ref.commentBackgroundColor,
|
69
69
|
commentTitleColor = _ref.commentTitleColor,
|
70
70
|
commentTitleFontSize = _ref.commentTitleFontSize,
|
71
|
+
community = _ref.community,
|
71
72
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
72
73
|
|
73
74
|
var _useState = (0, _react.useState)(false),
|
@@ -76,7 +77,10 @@ var VideoSpace = function VideoSpace(_ref) {
|
|
76
77
|
setShowConfigModal = _useState2[1];
|
77
78
|
|
78
79
|
var _useState3 = (0, _react.useState)( /*#__PURE__*/_react.default.createElement(VideoSpace, {
|
79
|
-
|
80
|
+
users: users,
|
81
|
+
preview: true,
|
82
|
+
videoSrc: videoSrc,
|
83
|
+
comments: comments
|
80
84
|
})),
|
81
85
|
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
82
86
|
centerContext = _useState4[0],
|
@@ -84,7 +88,10 @@ var VideoSpace = function VideoSpace(_ref) {
|
|
84
88
|
|
85
89
|
var formChanged = function formChanged(values) {
|
86
90
|
setCenterContext( /*#__PURE__*/_react.default.createElement(VideoSpace, Object.assign({
|
87
|
-
|
91
|
+
users: users,
|
92
|
+
preview: true,
|
93
|
+
videoSrc: videoSrc,
|
94
|
+
comments: comments
|
88
95
|
}, values)));
|
89
96
|
};
|
90
97
|
|
@@ -109,6 +116,11 @@ var VideoSpace = function VideoSpace(_ref) {
|
|
109
116
|
}
|
110
117
|
};
|
111
118
|
|
119
|
+
var cancelConfig = function cancelConfig() {
|
120
|
+
setShowConfigModal(false);
|
121
|
+
localStorage.removeItem('formStyles');
|
122
|
+
};
|
123
|
+
|
112
124
|
return /*#__PURE__*/_react.default.createElement(Container, {
|
113
125
|
backgroundColor: backgroundColor
|
114
126
|
}, /*#__PURE__*/_react.default.createElement(_ReusableHeader.default, Object.assign({
|
@@ -138,9 +150,7 @@ var VideoSpace = function VideoSpace(_ref) {
|
|
138
150
|
users: users
|
139
151
|
}), /*#__PURE__*/_react.default.createElement(_ReactModal.default, {
|
140
152
|
modalIsOpen: showConfigModal,
|
141
|
-
closeModal:
|
142
|
-
return setShowConfigModal(false);
|
143
|
-
},
|
153
|
+
closeModal: cancelConfig,
|
144
154
|
exitModalButton: function exitModalButton(e) {
|
145
155
|
return /*#__PURE__*/_react.default.createElement("div", null);
|
146
156
|
}
|
@@ -160,6 +170,7 @@ var VideoSpace = function VideoSpace(_ref) {
|
|
160
170
|
id: "preview"
|
161
171
|
}), /*#__PURE__*/_react.default.createElement(_Community.default, {
|
162
172
|
center: centerContext,
|
173
|
+
community: community,
|
163
174
|
id: "community"
|
164
175
|
}))));
|
165
176
|
};
|