@mohamed-karawia/library 0.1.18 → 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 +114 -4
- package/dist/stories/Common Inputs/Picker/Picker.js +61 -0
- package/dist/stories/Common Inputs/TextField/TextField.js +3 -1
- package/dist/stories/Community/Community.js +159 -0
- package/dist/stories/Events/Event/Event.js +123 -4
- package/dist/stories/Events/EventsList/EventsList.js +98 -16
- package/dist/stories/Forms/CreateSpace/CreateSpace.js +75 -0
- package/dist/stories/Library/Folders/Folders.js +94 -9
- package/dist/stories/Library/Notes/Notes.js +94 -9
- package/dist/stories/Modals/NavbarPreviewModal/NavbarPreviewModal.js +54 -0
- package/dist/stories/Music Album/ViewAlbum/ViewAlbum.js +98 -10
- package/dist/stories/Music Album/ViewAlbums/ViewAlbums.js +96 -34
- package/dist/stories/Navbar/Navbar.js +1 -1
- package/dist/stories/Pages/Events/Event/Event.js +14 -5
- package/dist/stories/Pages/Music/MusicAlbums/MusicAlbums.js +2 -15
- package/dist/stories/Photo Album/ViewAlbum/ViewAlbum.js +94 -17
- package/dist/stories/Photo Album/ViewAlbums/ViewAlbums.js +88 -10
- package/dist/stories/Preview/Preview.js +1 -0
- package/dist/stories/PreviewComponents/ChatPreview/ChatPreview.js +193 -0
- package/dist/stories/PreviewComponents/EventPreview/EventPreview.js +158 -0
- package/dist/stories/PreviewComponents/EventsPreview/EventsPreview.js +192 -0
- package/dist/stories/PreviewComponents/FoldersPreview/FoldersPreview.js +182 -0
- package/dist/stories/PreviewComponents/MusicAlbumPreview/MusicAlbumPreview.js +177 -0
- package/dist/stories/PreviewComponents/MusicAlbumsPreview/MusicAlbumsPreview.js +181 -0
- package/dist/stories/PreviewComponents/MusicPlayerPreview/MusicPlayerPreview.js +153 -0
- package/dist/stories/PreviewComponents/NavbarPreview/NavbarPreview.js +112 -0
- package/dist/stories/PreviewComponents/NotesPreview/NotesPreview.js +173 -0
- package/dist/stories/PreviewComponents/PhotoAlbumPreview/PhotoAlbumPreview.js +189 -0
- package/dist/stories/PreviewComponents/PhotoAlbumsPreview/PhotoAlbumsPreview.js +189 -0
- package/dist/stories/PreviewComponents/SpacesListPreview/SpacesListPreview.js +197 -0
- package/dist/stories/PreviewComponents/VideoAlbumPreview/VideoAlbumPreview.js +189 -0
- package/dist/stories/PreviewComponents/VideoAlbumsPreview/VideoAlbumsPreview.js +175 -0
- package/dist/stories/PreviewComponents/VideoPreview/VideoPreview.js +172 -0
- package/dist/stories/PreviewComponents/globalStyles.js +26 -0
- package/dist/stories/Reusable Components/Cards/Card-style-10/CardStyle10.js +4 -3
- package/dist/stories/Reusable Components/Cards/Card-style-11/CardStyle11.js +8 -4
- package/dist/stories/Reusable Components/Cards/Card-style-6/CardStyle6.js +10 -4
- package/dist/stories/Reusable Components/Cards/Card-style-8/CardStyle8.js +4 -2
- package/dist/stories/Reusable Components/Cards/globalCardStyles.js +2 -2
- package/dist/stories/Reusable Components/Community/Community.js +53 -0
- package/dist/stories/Reusable Components/Gallery/Gallery.js +12 -17
- package/dist/stories/Reusable Components/ReactModal/ReactModal.js +11 -30
- package/dist/stories/Reusable Components/ReusableForm/ReusableForm.js +19 -2
- package/dist/stories/Reusable Components/ReusableList/ReusableList.js +9 -5
- package/dist/stories/Reusable Components/Tabs/Tabs.js +68 -0
- package/dist/stories/Sections/Sections.js +8 -2
- package/dist/stories/VideoAlbum/AlbumsGallery/AlbumsGallery.js +85 -19
- package/dist/stories/VideoAlbum/VideoSpace/VideoSpace.js +108 -4
- package/dist/stories/VideoAlbum/ViewAlbum/ViewAlbum.js +84 -9
- package/dist/stories/Widgets/MusicPlayerWidget/MusicPlayerWidget.js +16 -10
- package/dist/stories/Widgets/SpacesListWidget/SpacesListWidget.js +115 -0
- package/dist/stories/Widgets/UsersWidget/UsersWidget.js +30 -0
- package/dist/stories/helpers/util.js +36 -3
- package/dist/stories/store/communities.js +941 -0
- package/dist/stories/store/store.js +44 -0
- package/package.json +5 -2
- package/src/stories/Chat/Chat.jsx +110 -5
- package/src/stories/Common Inputs/Picker/Picker.jsx +47 -0
- package/src/stories/Common Inputs/TextField/TextField.jsx +1 -1
- package/src/stories/Community/Community.jsx +109 -0
- package/src/stories/Events/Event/Event.jsx +105 -4
- package/src/stories/Events/EventsList/EventsList.jsx +98 -17
- package/src/stories/Forms/CreateSpace/CreateSpace.jsx +73 -0
- package/src/stories/Library/Folders/Folders.jsx +94 -7
- package/src/stories/Library/Notes/Notes.jsx +73 -7
- package/src/stories/Modals/NavbarPreviewModal/NavbarPreviewModal.jsx +31 -0
- package/src/stories/Music Album/ViewAlbum/ViewAlbum.jsx +81 -11
- package/src/stories/Music Album/ViewAlbums/ViewAlbums.jsx +78 -34
- package/src/stories/Navbar/Navbar.jsx +1 -1
- package/src/stories/Pages/Events/Event/Event.jsx +12 -4
- package/src/stories/Pages/Music/MusicAlbums/MusicAlbums.jsx +0 -13
- package/src/stories/Pages/ViewWorld/styles.json +1 -1
- package/src/stories/Photo Album/ViewAlbum/ViewAlbum.jsx +68 -6
- package/src/stories/Photo Album/ViewAlbums/ViewAlbums.jsx +69 -9
- package/src/stories/Preview/Preview.jsx +9 -1
- package/src/stories/PreviewComponents/ChatPreview/ChatPreview.jsx +132 -0
- package/src/stories/PreviewComponents/EventPreview/EventPreview.jsx +116 -0
- package/src/stories/PreviewComponents/EventsPreview/EventsPreview.jsx +132 -0
- package/src/stories/PreviewComponents/FoldersPreview/FoldersPreview.jsx +127 -0
- package/src/stories/PreviewComponents/MusicAlbumPreview/MusicAlbumPreview.jsx +124 -0
- package/src/stories/PreviewComponents/MusicAlbumsPreview/MusicAlbumsPreview.jsx +126 -0
- package/src/stories/PreviewComponents/MusicPlayerPreview/MusicPlayerPreview.jsx +113 -0
- package/src/stories/PreviewComponents/NavbarPreview/NavbarPreview.jsx +93 -0
- package/src/stories/PreviewComponents/NotesPreview/NotesPreview.jsx +122 -0
- package/src/stories/PreviewComponents/PhotoAlbumPreview/PhotoAlbumPreview.jsx +129 -0
- package/src/stories/PreviewComponents/PhotoAlbumsPreview/PhotoAlbumsPreview.jsx +129 -0
- package/src/stories/PreviewComponents/SpacesListPreview/SpacesListPreview.jsx +138 -0
- package/src/stories/PreviewComponents/VideoAlbumPreview/VideoAlbumPreview.jsx +129 -0
- package/src/stories/PreviewComponents/VideoAlbumsPreview/VideoAlbumsPreview.jsx +124 -0
- package/src/stories/PreviewComponents/VideoPreview/VideoPreview.jsx +125 -0
- package/src/stories/PreviewComponents/globalStyles.js +20 -0
- package/src/stories/Reusable Components/Cards/Card-style-10/CardStyle10.jsx +5 -2
- package/src/stories/Reusable Components/Cards/Card-style-11/CardStyle11.jsx +5 -5
- package/src/stories/Reusable Components/Cards/Card-style-6/CardStyle6.jsx +12 -6
- package/src/stories/Reusable Components/Cards/Card-style-8/CardStyle8.jsx +2 -2
- package/src/stories/Reusable Components/Cards/globalCardStyles.js +2 -1
- package/src/stories/Reusable Components/Community/Community.jsx +47 -0
- package/src/stories/Reusable Components/Gallery/Gallery.jsx +10 -9
- package/src/stories/Reusable Components/ReactModal/ReactModal.jsx +3 -25
- package/src/stories/Reusable Components/ReusableForm/ReusableForm.jsx +18 -6
- package/src/stories/Reusable Components/ReusableList/ReusableList.jsx +9 -4
- package/src/stories/Reusable Components/Tabs/Tabs.jsx +67 -0
- package/src/stories/Sections/Sections.jsx +5 -2
- package/src/stories/VideoAlbum/AlbumsGallery/AlbumsGallery.jsx +64 -16
- package/src/stories/VideoAlbum/VideoSpace/VideoSpace.jsx +77 -1
- package/src/stories/VideoAlbum/ViewAlbum/ViewAlbum.jsx +64 -9
- package/src/stories/Widgets/MusicPlayerWidget/MusicPlayerWidget.jsx +13 -6
- package/src/stories/Widgets/SpacesListWidget/SpacesListWidget.jsx +78 -0
- package/src/stories/Widgets/UsersWidget/UsersWidget.jsx +20 -0
- package/src/stories/helpers/util.js +24 -2
- package/src/stories/store/communities.js +703 -0
- package/src/stories/store/store.js +33 -0
- package/src/stories/styling.json +92 -0
@@ -9,21 +9,45 @@ exports.default = void 0;
|
|
9
9
|
|
10
10
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
|
11
11
|
|
12
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
13
|
+
|
12
14
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
13
15
|
|
14
|
-
var _react =
|
16
|
+
var _react = _interopRequireWildcard(require("react"));
|
15
17
|
|
16
18
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
17
19
|
|
20
|
+
var _ReactModal = _interopRequireDefault(require("../../Reusable Components/ReactModal/ReactModal"));
|
21
|
+
|
18
22
|
var _VideoPlayer = _interopRequireDefault(require("../VideoPlayer/VideoPlayer"));
|
19
23
|
|
20
24
|
var _Comments = _interopRequireDefault(require("../Comments/Comments"));
|
21
25
|
|
22
26
|
var _RichTextInput = _interopRequireDefault(require("../../Common Inputs/RichTextInput/RichTextInput"));
|
23
27
|
|
28
|
+
var _ReusableHeader = _interopRequireDefault(require("../../Reusable Components/ReusableHeader/ReusableHeader"));
|
29
|
+
|
30
|
+
var _bs = require("react-icons/bs");
|
31
|
+
|
32
|
+
var _VideoPreview = _interopRequireDefault(require("../../PreviewComponents/VideoPreview/VideoPreview"));
|
33
|
+
|
34
|
+
var _Community = _interopRequireDefault(require("../../Reusable Components/Community/Community"));
|
35
|
+
|
36
|
+
var _Tabs = _interopRequireDefault(require("../../Reusable Components/Tabs/Tabs"));
|
37
|
+
|
24
38
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
25
39
|
|
26
|
-
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
|
+
|
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
|
+
|
44
|
+
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; }
|
45
|
+
|
46
|
+
var controls = [{
|
47
|
+
icon: /*#__PURE__*/_react.default.createElement(_bs.BsGear, null),
|
48
|
+
action: 'config',
|
49
|
+
name: 'Config'
|
50
|
+
}];
|
27
51
|
|
28
52
|
var VideoSpace = function VideoSpace(_ref) {
|
29
53
|
var videoSrc = _ref.videoSrc,
|
@@ -44,10 +68,66 @@ var VideoSpace = function VideoSpace(_ref) {
|
|
44
68
|
commentBackgroundColor = _ref.commentBackgroundColor,
|
45
69
|
commentTitleColor = _ref.commentTitleColor,
|
46
70
|
commentTitleFontSize = _ref.commentTitleFontSize,
|
71
|
+
community = _ref.community,
|
47
72
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
73
|
+
|
74
|
+
var _useState = (0, _react.useState)(false),
|
75
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
76
|
+
showConfigModal = _useState2[0],
|
77
|
+
setShowConfigModal = _useState2[1];
|
78
|
+
|
79
|
+
var _useState3 = (0, _react.useState)( /*#__PURE__*/_react.default.createElement(VideoSpace, {
|
80
|
+
users: users,
|
81
|
+
preview: true,
|
82
|
+
videoSrc: videoSrc,
|
83
|
+
comments: comments
|
84
|
+
})),
|
85
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
86
|
+
centerContext = _useState4[0],
|
87
|
+
setCenterContext = _useState4[1];
|
88
|
+
|
89
|
+
var formChanged = function formChanged(values) {
|
90
|
+
setCenterContext( /*#__PURE__*/_react.default.createElement(VideoSpace, Object.assign({
|
91
|
+
users: users,
|
92
|
+
preview: true,
|
93
|
+
videoSrc: videoSrc,
|
94
|
+
comments: comments
|
95
|
+
}, values)));
|
96
|
+
};
|
97
|
+
|
98
|
+
var tabs = [{
|
99
|
+
title: 'New',
|
100
|
+
id: 'preview'
|
101
|
+
}, {
|
102
|
+
title: 'Context',
|
103
|
+
id: 'community'
|
104
|
+
}];
|
105
|
+
|
106
|
+
var iconClicked = function iconClicked(action) {
|
107
|
+
if (!props.preview) {
|
108
|
+
switch (action) {
|
109
|
+
case 'config':
|
110
|
+
setShowConfigModal(true);
|
111
|
+
break;
|
112
|
+
|
113
|
+
default:
|
114
|
+
break;
|
115
|
+
}
|
116
|
+
}
|
117
|
+
};
|
118
|
+
|
119
|
+
var cancelConfig = function cancelConfig() {
|
120
|
+
setShowConfigModal(false);
|
121
|
+
localStorage.removeItem('formStyles');
|
122
|
+
};
|
123
|
+
|
48
124
|
return /*#__PURE__*/_react.default.createElement(Container, {
|
49
125
|
backgroundColor: backgroundColor
|
50
|
-
}, /*#__PURE__*/_react.default.createElement(
|
126
|
+
}, /*#__PURE__*/_react.default.createElement(_ReusableHeader.default, Object.assign({
|
127
|
+
title: title || 'Video Space',
|
128
|
+
controls: controls,
|
129
|
+
iconClicked: iconClicked
|
130
|
+
}, props.headerStyles)), /*#__PURE__*/_react.default.createElement(_VideoPlayer.default, {
|
51
131
|
iconsColor: iconsColor,
|
52
132
|
src: videoSrc
|
53
133
|
}), /*#__PURE__*/_react.default.createElement(VideoDetails, {
|
@@ -68,7 +148,31 @@ var VideoSpace = function VideoSpace(_ref) {
|
|
68
148
|
cardTitleFontSize: commentTitleFontSize
|
69
149
|
}), /*#__PURE__*/_react.default.createElement(_RichTextInput.default, {
|
70
150
|
users: users
|
71
|
-
})
|
151
|
+
}), /*#__PURE__*/_react.default.createElement(_ReactModal.default, {
|
152
|
+
modalIsOpen: showConfigModal,
|
153
|
+
closeModal: cancelConfig,
|
154
|
+
exitModalButton: function exitModalButton(e) {
|
155
|
+
return /*#__PURE__*/_react.default.createElement("div", null);
|
156
|
+
}
|
157
|
+
}, /*#__PURE__*/_react.default.createElement(_Tabs.default, {
|
158
|
+
title: "Video Space Config",
|
159
|
+
tabs: tabs,
|
160
|
+
id: "styling"
|
161
|
+
}, /*#__PURE__*/_react.default.createElement(_VideoPreview.default, {
|
162
|
+
componentProps: {
|
163
|
+
title: title,
|
164
|
+
discription: discription,
|
165
|
+
comments: comments,
|
166
|
+
date: date,
|
167
|
+
preview: true
|
168
|
+
},
|
169
|
+
formChanged: formChanged,
|
170
|
+
id: "preview"
|
171
|
+
}), /*#__PURE__*/_react.default.createElement(_Community.default, {
|
172
|
+
center: centerContext,
|
173
|
+
community: community,
|
174
|
+
id: "community"
|
175
|
+
}))));
|
72
176
|
};
|
73
177
|
|
74
178
|
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n font-family: sans-serif;\n background-color: ", ";\n"])), function (_ref2) {
|
@@ -23,11 +23,21 @@ var _ReactModal = _interopRequireDefault(require("../../Reusable Components/Reac
|
|
23
23
|
|
24
24
|
var _AddVideo = _interopRequireDefault(require("../../Forms/AddVideo/AddVideo"));
|
25
25
|
|
26
|
+
var _Tabs = _interopRequireDefault(require("../../Reusable Components/Tabs/Tabs"));
|
27
|
+
|
28
|
+
var _Sections = _interopRequireDefault(require("../../Sections/Sections"));
|
29
|
+
|
30
|
+
var _VideoAlbumPreview = _interopRequireDefault(require("../../PreviewComponents/VideoAlbumPreview/VideoAlbumPreview"));
|
31
|
+
|
32
|
+
var _Community = _interopRequireDefault(require("../../Reusable Components/Community/Community"));
|
33
|
+
|
26
34
|
var _ai = require("react-icons/ai");
|
27
35
|
|
36
|
+
var _bs = require("react-icons/bs");
|
37
|
+
|
28
38
|
var _templateObject;
|
29
39
|
|
30
|
-
var _excluded = ["album", "cardBackgroundColor", "cardTitleColor", "cardTitleFontSize", "descColor"];
|
40
|
+
var _excluded = ["album", "cardBackgroundColor", "cardTitleColor", "cardTitleFontSize", "descColor", "community"];
|
31
41
|
|
32
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); }
|
33
43
|
|
@@ -46,6 +56,10 @@ var galleryControls = [{
|
|
46
56
|
icon: /*#__PURE__*/_react.default.createElement(_ai.AiOutlineFileAdd, null),
|
47
57
|
action: 'add',
|
48
58
|
name: 'Add Album'
|
59
|
+
}, {
|
60
|
+
icon: /*#__PURE__*/_react.default.createElement(_bs.BsGear, null),
|
61
|
+
action: 'config',
|
62
|
+
name: 'Config'
|
49
63
|
}];
|
50
64
|
|
51
65
|
var ViewAlbum = function ViewAlbum(_ref) {
|
@@ -54,6 +68,7 @@ var ViewAlbum = function ViewAlbum(_ref) {
|
|
54
68
|
cardTitleColor = _ref.cardTitleColor,
|
55
69
|
cardTitleFontSize = _ref.cardTitleFontSize,
|
56
70
|
descColor = _ref.descColor,
|
71
|
+
community = _ref.community,
|
57
72
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
58
73
|
|
59
74
|
var _useState = (0, _react.useState)(false),
|
@@ -61,6 +76,34 @@ var ViewAlbum = function ViewAlbum(_ref) {
|
|
61
76
|
showModal = _useState2[0],
|
62
77
|
setShowModal = _useState2[1];
|
63
78
|
|
79
|
+
var _useState3 = (0, _react.useState)(false),
|
80
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
81
|
+
showConfigModal = _useState4[0],
|
82
|
+
setShowConfigModal = _useState4[1];
|
83
|
+
|
84
|
+
var _useState5 = (0, _react.useState)( /*#__PURE__*/_react.default.createElement(ViewAlbum, {
|
85
|
+
preview: true,
|
86
|
+
album: album
|
87
|
+
})),
|
88
|
+
_useState6 = (0, _slicedToArray2.default)(_useState5, 2),
|
89
|
+
centerContext = _useState6[0],
|
90
|
+
setCenterContext = _useState6[1];
|
91
|
+
|
92
|
+
var formChanged = function formChanged(values) {
|
93
|
+
console.log('context changed');
|
94
|
+
setCenterContext( /*#__PURE__*/_react.default.createElement(ViewAlbum, Object.assign({
|
95
|
+
preview: true,
|
96
|
+
album: album
|
97
|
+
}, values)));
|
98
|
+
};
|
99
|
+
|
100
|
+
var tabs = [{
|
101
|
+
title: 'New',
|
102
|
+
id: 'preview'
|
103
|
+
}, {
|
104
|
+
title: 'Context',
|
105
|
+
id: 'community'
|
106
|
+
}];
|
64
107
|
var cardStyles = {
|
65
108
|
darkOnHover: true,
|
66
109
|
cardBackgroundColor: cardBackgroundColor,
|
@@ -82,13 +125,19 @@ var ViewAlbum = function ViewAlbum(_ref) {
|
|
82
125
|
};
|
83
126
|
|
84
127
|
var onHeaderIconClicked = function onHeaderIconClicked(action) {
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
128
|
+
if (!props.preview) {
|
129
|
+
switch (action) {
|
130
|
+
case 'add':
|
131
|
+
setShowModal(true);
|
132
|
+
break;
|
133
|
+
|
134
|
+
case 'config':
|
135
|
+
setShowConfigModal(true);
|
136
|
+
break;
|
137
|
+
|
138
|
+
default:
|
139
|
+
break;
|
140
|
+
}
|
92
141
|
}
|
93
142
|
};
|
94
143
|
|
@@ -105,6 +154,11 @@ var ViewAlbum = function ViewAlbum(_ref) {
|
|
105
154
|
setShowModal(false);
|
106
155
|
};
|
107
156
|
|
157
|
+
var cancelConfig = function cancelConfig() {
|
158
|
+
setShowConfigModal(false);
|
159
|
+
localStorage.removeItem('formStyles');
|
160
|
+
};
|
161
|
+
|
108
162
|
return /*#__PURE__*/_react.default.createElement(Container, null, /*#__PURE__*/_react.default.createElement(_Gallery.default, Object.assign({
|
109
163
|
galleryTitle: props.title || "Video Album",
|
110
164
|
data: album,
|
@@ -126,7 +180,28 @@ var ViewAlbum = function ViewAlbum(_ref) {
|
|
126
180
|
}, /*#__PURE__*/_react.default.createElement(_AddVideo.default, {
|
127
181
|
saveHandler: onAddVideo,
|
128
182
|
cancelHandler: cancelHandler
|
129
|
-
}))
|
183
|
+
})), /*#__PURE__*/_react.default.createElement(_ReactModal.default, {
|
184
|
+
modalIsOpen: showConfigModal,
|
185
|
+
closeModal: cancelConfig,
|
186
|
+
exitModalButton: function exitModalButton(e) {
|
187
|
+
return /*#__PURE__*/_react.default.createElement("div", null);
|
188
|
+
}
|
189
|
+
}, /*#__PURE__*/_react.default.createElement(_Tabs.default, {
|
190
|
+
title: "Video Album Config",
|
191
|
+
tabs: tabs,
|
192
|
+
id: "styling"
|
193
|
+
}, /*#__PURE__*/_react.default.createElement(_VideoAlbumPreview.default, {
|
194
|
+
componentProps: {
|
195
|
+
album: album,
|
196
|
+
preview: true
|
197
|
+
},
|
198
|
+
formChanged: formChanged,
|
199
|
+
id: "preview"
|
200
|
+
}), /*#__PURE__*/_react.default.createElement(_Community.default, {
|
201
|
+
center: centerContext,
|
202
|
+
community: community,
|
203
|
+
id: "community"
|
204
|
+
}))));
|
130
205
|
};
|
131
206
|
|
132
207
|
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\n"])));
|
@@ -19,7 +19,9 @@ var _reactH5AudioPlayer = _interopRequireDefault(require("react-h5-audio-player"
|
|
19
19
|
|
20
20
|
require("react-h5-audio-player/lib/styles.css");
|
21
21
|
|
22
|
-
var
|
22
|
+
var _ReusableHeader = _interopRequireDefault(require("../../Reusable Components/ReusableHeader/ReusableHeader"));
|
23
|
+
|
24
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
|
23
25
|
|
24
26
|
var _excluded = ["currentSong"];
|
25
27
|
|
@@ -37,7 +39,9 @@ var MusicPlayerWidget = function MusicPlayerWidget(_ref) {
|
|
37
39
|
borderRadius: props.borderRadius
|
38
40
|
})), /*#__PURE__*/_react.default.createElement(MusicName, props, props.playlist[currentSong].title), /*#__PURE__*/_react.default.createElement(ArtistName, null, props.playlist[currentSong].description));
|
39
41
|
|
40
|
-
return /*#__PURE__*/_react.default.createElement(
|
42
|
+
return /*#__PURE__*/_react.default.createElement(Container, null, /*#__PURE__*/_react.default.createElement(_ReusableHeader.default, Object.assign({
|
43
|
+
title: props.title || 'Music Player'
|
44
|
+
}, props.headerStyles)), /*#__PURE__*/_react.default.createElement(MusicPlayer, Object.assign({
|
41
45
|
autoPlay: "none",
|
42
46
|
src: props.playlist[currentSong].musicSrc,
|
43
47
|
onPlay: function onPlay(e) {
|
@@ -52,11 +56,13 @@ var MusicPlayerWidget = function MusicPlayerWidget(_ref) {
|
|
52
56
|
onClickNext: function onClickNext() {
|
53
57
|
return props.nextSong();
|
54
58
|
}
|
55
|
-
}, props));
|
59
|
+
}, props)));
|
56
60
|
};
|
57
61
|
|
58
|
-
var
|
59
|
-
|
62
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n"])));
|
63
|
+
|
64
|
+
var MusicPlayer = (0, _styledComponents.default)(_reactH5AudioPlayer.default)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n\n font-family: ", ";\n background-color: ", ";\n border-radius: ", ";\n padding: ", "px;\n width: ", "px;\n box-shadow: ", ";\n\n .rhap_progress-filled,\n .rhap_progress-indicator {\n background-color: ", ";\n }\n \n .rhap_repeat-button,\n .rhap_main-controls-button,\n .rhap_volume-button,\n .rhap_time {\n color: ", ";\n }\n \n .rhap_download-progress,\n .rhap_volume-bar {\n background-color: gray ;\n }\n \n\n .rhap_volume-indicator {\n background: ", ";\n }\n\n"])), function (props) {
|
65
|
+
return props.fontFamily || 'sans-serif';
|
60
66
|
}, function (props) {
|
61
67
|
return props.backgroundColor || 'transparent';
|
62
68
|
}, function (props) {
|
@@ -75,19 +81,19 @@ var MusicPlayer = (0, _styledComponents.default)(_reactH5AudioPlayer.default)(_t
|
|
75
81
|
return props.primaryColor;
|
76
82
|
});
|
77
83
|
|
78
|
-
var Header = _styledComponents.default.header(
|
84
|
+
var Header = _styledComponents.default.header(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: column;\n align-items: center;\n padding: 8px;\n"])));
|
79
85
|
|
80
|
-
var CoverWrapper = _styledComponents.default.div(
|
86
|
+
var CoverWrapper = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n"])));
|
81
87
|
|
82
|
-
var Img = _styledComponents.default.img(
|
88
|
+
var Img = _styledComponents.default.img(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n height: inherit;\n width: 100%;\n max-height: 200px;\n object-fit: cover;\n object-position: center;\n"])));
|
83
89
|
|
84
|
-
var MusicName = _styledComponents.default.h3(
|
90
|
+
var MusicName = _styledComponents.default.h3(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n font-size: ", "px;\n font-weight: 300;\n"])), function (props) {
|
85
91
|
return props.fontColor;
|
86
92
|
}, function (props) {
|
87
93
|
return props.fontSize;
|
88
94
|
});
|
89
95
|
|
90
|
-
var ArtistName = _styledComponents.default.p(
|
96
|
+
var ArtistName = _styledComponents.default.p(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n margin: 0;\n color: #7a7a7a;\n text-transform: capitalize;\n"])));
|
91
97
|
|
92
98
|
var _default = MusicPlayerWidget;
|
93
99
|
exports.default = _default;
|
@@ -0,0 +1,115 @@
|
|
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("../../Reusable Components/ReusableList/ReusableList"));
|
21
|
+
|
22
|
+
var _ai = require("react-icons/ai");
|
23
|
+
|
24
|
+
var _bs = require("react-icons/bs");
|
25
|
+
|
26
|
+
var _ReactModal = _interopRequireDefault(require("../../Reusable Components/ReactModal/ReactModal"));
|
27
|
+
|
28
|
+
var _SpacesListPreview = _interopRequireDefault(require("../../PreviewComponents/SpacesListPreview/SpacesListPreview"));
|
29
|
+
|
30
|
+
var _CreateSpace = _interopRequireDefault(require("../../Forms/CreateSpace/CreateSpace"));
|
31
|
+
|
32
|
+
var _templateObject;
|
33
|
+
|
34
|
+
var _excluded = ["spaces"];
|
35
|
+
|
36
|
+
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); }
|
37
|
+
|
38
|
+
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; }
|
39
|
+
|
40
|
+
var SpacesListWidget = function SpacesListWidget(_ref) {
|
41
|
+
var spaces = _ref.spaces,
|
42
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
43
|
+
|
44
|
+
var _useState = (0, _react.useState)(false),
|
45
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
46
|
+
showCreateModal = _useState2[0],
|
47
|
+
setShowCreateModal = _useState2[1];
|
48
|
+
|
49
|
+
var _useState3 = (0, _react.useState)(false),
|
50
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
51
|
+
showConfigModal = _useState4[0],
|
52
|
+
setShowConfigModal = _useState4[1];
|
53
|
+
|
54
|
+
var listControls = [{
|
55
|
+
icon: /*#__PURE__*/_react.default.createElement(_ai.AiOutlineFileAdd, null),
|
56
|
+
action: 'add',
|
57
|
+
name: 'Create Space'
|
58
|
+
}, {
|
59
|
+
icon: /*#__PURE__*/_react.default.createElement(_bs.BsGear, null),
|
60
|
+
action: 'config',
|
61
|
+
name: 'Config'
|
62
|
+
}];
|
63
|
+
|
64
|
+
var onIconClicked = function onIconClicked(action) {
|
65
|
+
if (!props.preview) {
|
66
|
+
switch (action) {
|
67
|
+
case 'add':
|
68
|
+
setShowCreateModal(true);
|
69
|
+
break;
|
70
|
+
|
71
|
+
case 'config':
|
72
|
+
setShowConfigModal(true);
|
73
|
+
break;
|
74
|
+
|
75
|
+
default:
|
76
|
+
break;
|
77
|
+
}
|
78
|
+
}
|
79
|
+
};
|
80
|
+
|
81
|
+
return /*#__PURE__*/_react.default.createElement(Container, null, /*#__PURE__*/_react.default.createElement(_ReusableList.default, Object.assign({
|
82
|
+
listTitle: props.title || 'My Spaces',
|
83
|
+
type: "sectioned",
|
84
|
+
data: spaces,
|
85
|
+
iconClicked: onIconClicked,
|
86
|
+
listControls: listControls,
|
87
|
+
cardStyle: "card-style-3"
|
88
|
+
}, props)), /*#__PURE__*/_react.default.createElement(_ReactModal.default, {
|
89
|
+
modalIsOpen: showCreateModal,
|
90
|
+
closeModal: function closeModal() {
|
91
|
+
return setShowCreateModal(false);
|
92
|
+
},
|
93
|
+
exitModalButton: function exitModalButton(e) {
|
94
|
+
return /*#__PURE__*/_react.default.createElement("div", null);
|
95
|
+
}
|
96
|
+
}, /*#__PURE__*/_react.default.createElement(_CreateSpace.default, null)), /*#__PURE__*/_react.default.createElement(_ReactModal.default, {
|
97
|
+
modalIsOpen: showConfigModal,
|
98
|
+
closeModal: function closeModal() {
|
99
|
+
return setShowConfigModal(false);
|
100
|
+
},
|
101
|
+
exitModalButton: function exitModalButton(e) {
|
102
|
+
return /*#__PURE__*/_react.default.createElement("div", null);
|
103
|
+
}
|
104
|
+
}, /*#__PURE__*/_react.default.createElement(_SpacesListPreview.default, {
|
105
|
+
componentProps: {
|
106
|
+
spaces: spaces,
|
107
|
+
preview: true
|
108
|
+
}
|
109
|
+
})));
|
110
|
+
};
|
111
|
+
|
112
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n \n"])));
|
113
|
+
|
114
|
+
var _default = SpacesListWidget;
|
115
|
+
exports.default = _default;
|
@@ -0,0 +1,30 @@
|
|
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 _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
11
|
+
|
12
|
+
var _react = _interopRequireDefault(require("react"));
|
13
|
+
|
14
|
+
var _ReusableList = _interopRequireDefault(require("../../Reusable Components/ReusableList/ReusableList"));
|
15
|
+
|
16
|
+
var _excluded = ["users"];
|
17
|
+
|
18
|
+
var UsersWidget = function UsersWidget(_ref) {
|
19
|
+
var users = _ref.users,
|
20
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
21
|
+
return /*#__PURE__*/_react.default.createElement(_ReusableList.default, Object.assign({
|
22
|
+
listTitle: props.title || 'Members List',
|
23
|
+
cardStyle: "card-style-1",
|
24
|
+
data: users,
|
25
|
+
type: "flat"
|
26
|
+
}, props));
|
27
|
+
};
|
28
|
+
|
29
|
+
var _default = UsersWidget;
|
30
|
+
exports.default = _default;
|
@@ -43,6 +43,10 @@ var _Notes = _interopRequireDefault(require("../Library/Notes/Notes"));
|
|
43
43
|
|
44
44
|
var _Folders = _interopRequireDefault(require("../Library/Folders/Folders"));
|
45
45
|
|
46
|
+
var _UsersWidget = _interopRequireDefault(require("../Widgets/UsersWidget/UsersWidget"));
|
47
|
+
|
48
|
+
var _SpacesListWidget = _interopRequireDefault(require("../Widgets/SpacesListWidget/SpacesListWidget"));
|
49
|
+
|
46
50
|
var _Navbar = _interopRequireDefault(require("../Navbar/Navbar"));
|
47
51
|
|
48
52
|
var _ViewAlbums = _interopRequireDefault(require("../Music Album/ViewAlbums/ViewAlbums"));
|
@@ -53,9 +57,21 @@ var _ViewAlbums2 = _interopRequireDefault(require("../Photo Album/ViewAlbums/Vie
|
|
53
57
|
|
54
58
|
var _ViewAlbum2 = _interopRequireDefault(require("../Photo Album/ViewAlbum/ViewAlbum"));
|
55
59
|
|
60
|
+
var _Chat = _interopRequireDefault(require("../Chat/Chat"));
|
61
|
+
|
62
|
+
var _EventsList = _interopRequireDefault(require("../Events/EventsList/EventsList"));
|
63
|
+
|
64
|
+
var _Event = _interopRequireDefault(require("../Events/Event/Event"));
|
65
|
+
|
66
|
+
var _VideoSpace = _interopRequireDefault(require("../VideoAlbum/VideoSpace/VideoSpace"));
|
67
|
+
|
68
|
+
var _AlbumsGallery = _interopRequireDefault(require("../VideoAlbum/AlbumsGallery/AlbumsGallery"));
|
69
|
+
|
70
|
+
var _ViewAlbum3 = _interopRequireDefault(require("../VideoAlbum/ViewAlbum/ViewAlbum"));
|
71
|
+
|
56
72
|
// Cards
|
57
73
|
// Widgets
|
58
|
-
// Components
|
74
|
+
// Preview Components
|
59
75
|
var stringSearch = function stringSearch(str, word) {
|
60
76
|
str = str.toUpperCase();
|
61
77
|
word = word.toUpperCase();
|
@@ -196,7 +212,14 @@ var getWidgetType = function getWidgetType(widgetType, props, _cardClicked) {
|
|
196
212
|
'logo': /*#__PURE__*/_react.default.createElement(_LogoWidget.default, props),
|
197
213
|
'video player': /*#__PURE__*/_react.default.createElement(_VideoPlayer.default, props),
|
198
214
|
'notes': /*#__PURE__*/_react.default.createElement(_Notes.default, props),
|
199
|
-
'folders': /*#__PURE__*/_react.default.createElement(_Folders.default, props)
|
215
|
+
'folders': /*#__PURE__*/_react.default.createElement(_Folders.default, props),
|
216
|
+
'users': /*#__PURE__*/_react.default.createElement(_UsersWidget.default, props),
|
217
|
+
'profile': /*#__PURE__*/_react.default.createElement(_CardStyle2.default, props),
|
218
|
+
'spaces-list': /*#__PURE__*/_react.default.createElement(_SpacesListWidget.default, Object.assign({
|
219
|
+
cardClicked: function cardClicked(path) {
|
220
|
+
return _cardClicked(path);
|
221
|
+
}
|
222
|
+
}, props))
|
200
223
|
};
|
201
224
|
return widgetTypes[widgetType];
|
202
225
|
};
|
@@ -209,7 +232,17 @@ var getComponentType = function getComponentType(componentType, componentProps,
|
|
209
232
|
'MusicAlbums': /*#__PURE__*/_react.default.createElement(_ViewAlbums.default, Object.assign({}, componentProps, stylingProps)),
|
210
233
|
'MusicAlbum': /*#__PURE__*/_react.default.createElement(_ViewAlbum.default, Object.assign({}, componentProps, stylingProps)),
|
211
234
|
'PhotoAlbum': /*#__PURE__*/_react.default.createElement(_ViewAlbum2.default, Object.assign({}, componentProps, stylingProps)),
|
212
|
-
'PhotoAlbums': /*#__PURE__*/_react.default.createElement(_ViewAlbums2.default, Object.assign({}, componentProps, stylingProps))
|
235
|
+
'PhotoAlbums': /*#__PURE__*/_react.default.createElement(_ViewAlbums2.default, Object.assign({}, componentProps, stylingProps)),
|
236
|
+
'MusicPlayer': /*#__PURE__*/_react.default.createElement(_MusicPlayerWidget.default, Object.assign({}, componentProps, stylingProps)),
|
237
|
+
'Folders': /*#__PURE__*/_react.default.createElement(_Folders.default, Object.assign({}, componentProps, stylingProps)),
|
238
|
+
'Notes': /*#__PURE__*/_react.default.createElement(_Notes.default, Object.assign({}, componentProps, stylingProps)),
|
239
|
+
'Spaces-List': /*#__PURE__*/_react.default.createElement(_SpacesListWidget.default, Object.assign({}, componentProps, stylingProps)),
|
240
|
+
'Chat': /*#__PURE__*/_react.default.createElement(_Chat.default, Object.assign({}, componentProps, stylingProps)),
|
241
|
+
'Events': /*#__PURE__*/_react.default.createElement(_EventsList.default, Object.assign({}, componentProps, stylingProps)),
|
242
|
+
'Event': /*#__PURE__*/_react.default.createElement(_Event.default, Object.assign({}, componentProps, stylingProps)),
|
243
|
+
'Video-Space': /*#__PURE__*/_react.default.createElement(_VideoSpace.default, Object.assign({}, componentProps, stylingProps)),
|
244
|
+
'Video-Albums': /*#__PURE__*/_react.default.createElement(_AlbumsGallery.default, Object.assign({}, componentProps, stylingProps)),
|
245
|
+
'Video-Album': /*#__PURE__*/_react.default.createElement(_ViewAlbum3.default, Object.assign({}, componentProps, stylingProps))
|
213
246
|
};
|
214
247
|
return componentTypes[componentType];
|
215
248
|
};
|