@mohamed-karawia/library 0.1.16 → 0.1.20
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/stories/Chat/Chat.js +129 -14
- package/dist/stories/Common Inputs/EditorComponent/EditorComponent.js +4 -2
- 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 +137 -0
- package/dist/stories/Enrollment/Admin/DetailedForm/DetailedForm.js +10 -12
- package/dist/stories/Enrollment/Admin/ViewForms/ViewForms.js +1 -1
- package/dist/stories/Enrollment/Guest/FillForm/FillForm.js +4 -17
- package/dist/stories/Events/Event/Event.js +117 -5
- package/dist/stories/Events/EventsList/EventsList.js +98 -19
- package/dist/stories/Forms/CreateSpace/CreateSpace.js +75 -0
- package/dist/stories/Library/Folders/Folders.js +82 -6
- package/dist/stories/Library/Notes/Notes.js +78 -4
- package/dist/stories/Modals/NavbarPreviewModal/NavbarPreviewModal.js +54 -0
- package/dist/stories/Music Album/ViewAlbum/ViewAlbum.js +138 -15
- package/dist/stories/Music Album/ViewAlbums/ViewAlbums.js +67 -28
- package/dist/stories/Navbar/Navbar.js +1 -1
- package/dist/stories/Pages/Enrollment/DetailedForm/DetailedForm.js +8 -0
- package/dist/stories/Pages/Enrollment/FillForm/FillForm.js +7 -1
- package/dist/stories/Pages/Enrollment/Forms/Forms.js +3 -1
- package/dist/stories/Pages/Events/Event/Event.js +14 -5
- package/dist/stories/Pages/Events/Events/Events.js +1 -0
- package/dist/stories/Pages/Library/Folders/Library.js +2 -1
- package/dist/stories/Pages/Music/MusicAlbum/Music.js +8 -6
- package/dist/stories/Pages/Music/MusicAlbums/MusicAlbums.js +2 -15
- package/dist/stories/Pages/Photos/Albums/Albums.js +4 -1
- package/dist/stories/Photo Album/ViewAlbum/ViewAlbum.js +80 -19
- package/dist/stories/Photo Album/ViewAlbums/ViewAlbums.js +83 -25
- package/dist/stories/Preview/Preview.js +37 -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 +76 -0
- package/dist/stories/Reusable Components/Gallery/Gallery.js +17 -18
- package/dist/stories/Reusable Components/ReactModal/ReactModal.js +11 -30
- package/dist/stories/Reusable Components/ReusableForm/ReusableForm.js +20 -3
- 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 +77 -18
- package/dist/stories/VideoAlbum/VideoSpace/VideoSpace.js +96 -3
- package/dist/stories/VideoAlbum/ViewAlbum/ViewAlbum.js +78 -5
- package/dist/stories/Widgets/MusicPlayerWidget/MusicPlayerWidget.js +17 -11
- package/dist/stories/Widgets/SpacesListWidget/SpacesListWidget.js +115 -0
- package/dist/stories/Widgets/UsersWidget/UsersWidget.js +30 -0
- package/dist/stories/helpers/util.js +60 -3
- package/dist/stories/store/communities.js +943 -0
- package/dist/stories/store/store.js +44 -0
- package/package.json +5 -2
- package/src/stories/Chat/Chat.jsx +109 -13
- package/src/stories/Common Inputs/EditorComponent/EditorComponent.jsx +3 -3
- 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 +110 -0
- package/src/stories/Enrollment/Admin/DetailedForm/DetailedForm.jsx +7 -9
- package/src/stories/Enrollment/Admin/ViewForms/ViewForms.jsx +3 -2
- package/src/stories/Enrollment/Guest/FillForm/FillForm.jsx +6 -16
- package/src/stories/Events/Event/Event.jsx +98 -5
- package/src/stories/Events/EventsList/EventsList.jsx +101 -22
- package/src/stories/Forms/CreateSpace/CreateSpace.jsx +73 -0
- package/src/stories/Library/Folders/Folders.jsx +82 -6
- package/src/stories/Library/Notes/Notes.jsx +65 -5
- package/src/stories/Modals/NavbarPreviewModal/NavbarPreviewModal.jsx +31 -0
- package/src/stories/Music Album/ViewAlbum/ViewAlbum.jsx +133 -14
- package/src/stories/Music Album/ViewAlbums/ViewAlbums.jsx +61 -32
- package/src/stories/Navbar/Navbar.jsx +1 -1
- package/src/stories/Pages/Enrollment/DetailedForm/DetailedForm.jsx +10 -1
- package/src/stories/Pages/Enrollment/FillForm/FillForm.jsx +6 -0
- package/src/stories/Pages/Enrollment/Forms/Forms.jsx +3 -1
- package/src/stories/Pages/Events/Event/Event.jsx +12 -4
- package/src/stories/Pages/Events/Events/Events.jsx +75 -74
- package/src/stories/Pages/Library/Folders/Library.jsx +2 -1
- package/src/stories/Pages/Music/MusicAlbum/Music.jsx +8 -6
- package/src/stories/Pages/Music/MusicAlbums/MusicAlbums.jsx +0 -13
- package/src/stories/Pages/Photos/Albums/Albums.jsx +3 -0
- package/src/stories/Photo Album/ViewAlbum/ViewAlbum.jsx +63 -13
- package/src/stories/Photo Album/ViewAlbums/ViewAlbums.jsx +66 -33
- package/src/stories/Preview/Preview.jsx +35 -0
- 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 +70 -0
- package/src/stories/Reusable Components/Gallery/Gallery.jsx +15 -10
- package/src/stories/Reusable Components/ReactModal/ReactModal.jsx +3 -25
- package/src/stories/Reusable Components/ReusableForm/ReusableForm.jsx +19 -7
- package/src/stories/Reusable Components/ReusableHeader/ReusableHeader.jsx +0 -2
- 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 +57 -16
- package/src/stories/VideoAlbum/VideoSpace/VideoSpace.jsx +70 -1
- package/src/stories/VideoAlbum/ViewAlbum/ViewAlbum.jsx +65 -8
- package/src/stories/Widgets/MusicPlayerWidget/MusicPlayerWidget.jsx +14 -7
- package/src/stories/Widgets/SpacesListWidget/SpacesListWidget.jsx +78 -0
- package/src/stories/Widgets/UsersWidget/UsersWidget.jsx +20 -0
- package/src/stories/helpers/util.js +42 -2
- package/src/stories/store/communities.js +705 -0
- package/src/stories/store/store.js +33 -0
- package/src/stories/styling.json +92 -0
@@ -0,0 +1,68 @@
|
|
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 _ReusableHeader = _interopRequireDefault(require("../ReusableHeader/ReusableHeader"));
|
21
|
+
|
22
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
23
|
+
|
24
|
+
var _excluded = ["title", "tabs"];
|
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 Tabs = function Tabs(_ref) {
|
31
|
+
var title = _ref.title,
|
32
|
+
tabs = _ref.tabs,
|
33
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
34
|
+
|
35
|
+
var _useState = (0, _react.useState)(props.children[0]),
|
36
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
37
|
+
child = _useState2[0],
|
38
|
+
setChild = _useState2[1];
|
39
|
+
|
40
|
+
var tabClicked = function tabClicked(tab) {
|
41
|
+
var renderedComponent = props.children.find(function (child) {
|
42
|
+
return child.props.id === tab.id;
|
43
|
+
});
|
44
|
+
setChild(renderedComponent);
|
45
|
+
};
|
46
|
+
|
47
|
+
return /*#__PURE__*/_react.default.createElement(Container, null, /*#__PURE__*/_react.default.createElement(_ReusableHeader.default, Object.assign({
|
48
|
+
title: title
|
49
|
+
}, props.headerStyles)), /*#__PURE__*/_react.default.createElement(TabsContainer, null, /*#__PURE__*/_react.default.createElement(Menu, null, tabs.map(function (tab) {
|
50
|
+
return /*#__PURE__*/_react.default.createElement(Tab, {
|
51
|
+
onClick: function onClick() {
|
52
|
+
return tabClicked(tab);
|
53
|
+
}
|
54
|
+
}, tab.title);
|
55
|
+
})), child));
|
56
|
+
};
|
57
|
+
|
58
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n font-family: sans-serif;\n"])));
|
59
|
+
|
60
|
+
var TabsContainer = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n \n"])));
|
61
|
+
|
62
|
+
var Menu = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: center;\n gap: 10px;\n background-color: white;\n"])));
|
63
|
+
|
64
|
+
var Tab = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n padding: 5px 8px;\n cursor: pointer;\n background-color: white;\n border: 1px solid gray;\n color: #414141;\n transition: all .3s;\n &:hover {\n background-color: #414141;\n color: white;\n }\n"])));
|
65
|
+
|
66
|
+
Tabs.defaultProps = {};
|
67
|
+
var _default = Tabs;
|
68
|
+
exports.default = _default;
|
@@ -31,13 +31,19 @@ var Sections = function Sections(_ref) {
|
|
31
31
|
var sections = _ref.sections,
|
32
32
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
33
33
|
|
34
|
-
var _useState = (0, _react.useState)(
|
34
|
+
var _useState = (0, _react.useState)(props.children[0] || props.children),
|
35
35
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
36
36
|
center = _useState2[0],
|
37
37
|
setCenter = _useState2[1];
|
38
38
|
|
39
|
+
console.log('renders');
|
40
|
+
|
39
41
|
var cardClicked = function cardClicked(index, cardProps) {
|
40
|
-
|
42
|
+
var child = props.children.find(function (child) {
|
43
|
+
return child.props.id === cardProps.id;
|
44
|
+
});
|
45
|
+
setCenter(child);
|
46
|
+
console.log(child);
|
41
47
|
};
|
42
48
|
|
43
49
|
return /*#__PURE__*/_react.default.createElement(Container, props, /*#__PURE__*/_react.default.createElement(Left, null, /*#__PURE__*/_react.default.createElement(_ReusableList.default, Object.assign({
|
@@ -23,8 +23,18 @@ var _ReactModal = _interopRequireDefault(require("../../Reusable Components/Reac
|
|
23
23
|
|
24
24
|
var _CreateVideoAlbum = _interopRequireDefault(require("../../Forms/CreateVideoAlbum/CreateVideoAlbum"));
|
25
25
|
|
26
|
+
var _Tabs = _interopRequireDefault(require("../../Reusable Components/Tabs/Tabs"));
|
27
|
+
|
28
|
+
var _Sections = _interopRequireDefault(require("../../Sections/Sections"));
|
29
|
+
|
30
|
+
var _VideoAlbumsPreview = _interopRequireDefault(require("../../PreviewComponents/VideoAlbumsPreview/VideoAlbumsPreview"));
|
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
40
|
var _excluded = ["videoAlbums", "cardBackgroundColor", "cardTitleColor", "cardTitleFontSize", "countColor", "countFontSize"];
|
@@ -42,6 +52,10 @@ var galleryControls = [{
|
|
42
52
|
icon: /*#__PURE__*/_react.default.createElement(_ai.AiOutlineFileAdd, null),
|
43
53
|
action: 'add',
|
44
54
|
name: 'Add Album'
|
55
|
+
}, {
|
56
|
+
icon: /*#__PURE__*/_react.default.createElement(_bs.BsGear, null),
|
57
|
+
action: 'config',
|
58
|
+
name: 'Config'
|
45
59
|
}];
|
46
60
|
|
47
61
|
var AlbumsGallery = function AlbumsGallery(_ref) {
|
@@ -58,6 +72,31 @@ var AlbumsGallery = function AlbumsGallery(_ref) {
|
|
58
72
|
showModal = _useState2[0],
|
59
73
|
setShowModal = _useState2[1];
|
60
74
|
|
75
|
+
var _useState3 = (0, _react.useState)(false),
|
76
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
77
|
+
showConfigModal = _useState4[0],
|
78
|
+
setShowConfigModal = _useState4[1];
|
79
|
+
|
80
|
+
var _useState5 = (0, _react.useState)( /*#__PURE__*/_react.default.createElement(AlbumsGallery, {
|
81
|
+
videoAlbums: videoAlbums
|
82
|
+
})),
|
83
|
+
_useState6 = (0, _slicedToArray2.default)(_useState5, 2),
|
84
|
+
centerContext = _useState6[0],
|
85
|
+
setCenterContext = _useState6[1];
|
86
|
+
|
87
|
+
var formChanged = function formChanged(values) {
|
88
|
+
setCenterContext( /*#__PURE__*/_react.default.createElement(AlbumsGallery, Object.assign({
|
89
|
+
videoAlbums: videoAlbums
|
90
|
+
}, values)));
|
91
|
+
};
|
92
|
+
|
93
|
+
var tabs = [{
|
94
|
+
title: 'New',
|
95
|
+
id: 'preview'
|
96
|
+
}, {
|
97
|
+
title: 'Context',
|
98
|
+
id: 'community'
|
99
|
+
}];
|
61
100
|
var cardStyles = {
|
62
101
|
cardBackgroundColor: cardBackgroundColor,
|
63
102
|
cardTitleColor: cardTitleColor,
|
@@ -83,13 +122,19 @@ var AlbumsGallery = function AlbumsGallery(_ref) {
|
|
83
122
|
};
|
84
123
|
|
85
124
|
var onIconClicked = function onIconClicked(action) {
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
125
|
+
if (!props.preview) {
|
126
|
+
switch (action) {
|
127
|
+
case 'add':
|
128
|
+
setShowModal(true);
|
129
|
+
break;
|
130
|
+
|
131
|
+
case 'config':
|
132
|
+
setShowConfigModal(true);
|
133
|
+
break;
|
134
|
+
|
135
|
+
default:
|
136
|
+
break;
|
137
|
+
}
|
93
138
|
}
|
94
139
|
};
|
95
140
|
|
@@ -106,20 +151,12 @@ var AlbumsGallery = function AlbumsGallery(_ref) {
|
|
106
151
|
setShowModal(false);
|
107
152
|
};
|
108
153
|
|
109
|
-
return /*#__PURE__*/_react.default.createElement(Container, null, /*#__PURE__*/_react.default.createElement(_Gallery.default, {
|
154
|
+
return /*#__PURE__*/_react.default.createElement(Container, null, /*#__PURE__*/_react.default.createElement(_Gallery.default, Object.assign({
|
110
155
|
galleryTitle: "Video Albums",
|
111
156
|
data: videoAlbums,
|
112
157
|
type: "flat",
|
113
158
|
cardStyle: "card-style-6",
|
114
159
|
columnsNumber: 3,
|
115
|
-
headerStyles: {
|
116
|
-
padding: 10,
|
117
|
-
headerBackground: '#FE1744',
|
118
|
-
titleColor: '#ffff',
|
119
|
-
controlsStyles: {
|
120
|
-
iconSize: 25
|
121
|
-
}
|
122
|
-
},
|
123
160
|
iconClicked: onIconClicked,
|
124
161
|
galleryColumnGap: 10,
|
125
162
|
galleryRowGap: 20,
|
@@ -130,7 +167,7 @@ var AlbumsGallery = function AlbumsGallery(_ref) {
|
|
130
167
|
},
|
131
168
|
cardIconClicked: cardIconClicked,
|
132
169
|
customCardStyles: cardStyles
|
133
|
-
}), /*#__PURE__*/_react.default.createElement(_ReactModal.default, {
|
170
|
+
}, props)), /*#__PURE__*/_react.default.createElement(_ReactModal.default, {
|
134
171
|
modalIsOpen: showModal,
|
135
172
|
closeModal: function closeModal() {
|
136
173
|
return setShowModal(false);
|
@@ -141,7 +178,29 @@ var AlbumsGallery = function AlbumsGallery(_ref) {
|
|
141
178
|
}, /*#__PURE__*/_react.default.createElement(_CreateVideoAlbum.default, {
|
142
179
|
saveHandler: onAddAlbum,
|
143
180
|
cancelHandler: cancelHandler
|
144
|
-
}))
|
181
|
+
})), /*#__PURE__*/_react.default.createElement(_ReactModal.default, {
|
182
|
+
modalIsOpen: showConfigModal,
|
183
|
+
closeModal: function closeModal() {
|
184
|
+
return setShowConfigModal(false);
|
185
|
+
},
|
186
|
+
exitModalButton: function exitModalButton(e) {
|
187
|
+
return /*#__PURE__*/_react.default.createElement("div", null);
|
188
|
+
}
|
189
|
+
}, /*#__PURE__*/_react.default.createElement(_Tabs.default, {
|
190
|
+
title: "Video Gallery Config",
|
191
|
+
tabs: tabs,
|
192
|
+
id: "styling"
|
193
|
+
}, /*#__PURE__*/_react.default.createElement(_VideoAlbumsPreview.default, {
|
194
|
+
componentProps: {
|
195
|
+
videoAlbums: videoAlbums,
|
196
|
+
preview: true
|
197
|
+
},
|
198
|
+
formChanged: formChanged,
|
199
|
+
id: "preview"
|
200
|
+
}), /*#__PURE__*/_react.default.createElement(_Community.default, {
|
201
|
+
center: centerContext,
|
202
|
+
id: "community"
|
203
|
+
}))));
|
145
204
|
};
|
146
205
|
|
147
206
|
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n \n"])));
|
@@ -9,22 +9,46 @@ 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
40
|
var _excluded = ["videoSrc", "title", "discription", "date", "users", "iconsColor", "backgroundColor", "detailsPadding", "titleFontSize", "titleColor", "dateFontSize", "dateColor", "discFontSize", "discColor", "comments", "commentBackgroundColor", "commentTitleColor", "commentTitleFontSize"];
|
27
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
|
+
}];
|
51
|
+
|
28
52
|
var VideoSpace = function VideoSpace(_ref) {
|
29
53
|
var videoSrc = _ref.videoSrc,
|
30
54
|
title = _ref.title,
|
@@ -45,9 +69,53 @@ var VideoSpace = function VideoSpace(_ref) {
|
|
45
69
|
commentTitleColor = _ref.commentTitleColor,
|
46
70
|
commentTitleFontSize = _ref.commentTitleFontSize,
|
47
71
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
72
|
+
|
73
|
+
var _useState = (0, _react.useState)(false),
|
74
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
75
|
+
showConfigModal = _useState2[0],
|
76
|
+
setShowConfigModal = _useState2[1];
|
77
|
+
|
78
|
+
var _useState3 = (0, _react.useState)( /*#__PURE__*/_react.default.createElement(VideoSpace, {
|
79
|
+
videoSrc: videoSrc
|
80
|
+
})),
|
81
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
82
|
+
centerContext = _useState4[0],
|
83
|
+
setCenterContext = _useState4[1];
|
84
|
+
|
85
|
+
var formChanged = function formChanged(values) {
|
86
|
+
setCenterContext( /*#__PURE__*/_react.default.createElement(VideoSpace, Object.assign({
|
87
|
+
videoSrc: videoSrc
|
88
|
+
}, values)));
|
89
|
+
};
|
90
|
+
|
91
|
+
var tabs = [{
|
92
|
+
title: 'New',
|
93
|
+
id: 'preview'
|
94
|
+
}, {
|
95
|
+
title: 'Context',
|
96
|
+
id: 'community'
|
97
|
+
}];
|
98
|
+
|
99
|
+
var iconClicked = function iconClicked(action) {
|
100
|
+
if (!props.preview) {
|
101
|
+
switch (action) {
|
102
|
+
case 'config':
|
103
|
+
setShowConfigModal(true);
|
104
|
+
break;
|
105
|
+
|
106
|
+
default:
|
107
|
+
break;
|
108
|
+
}
|
109
|
+
}
|
110
|
+
};
|
111
|
+
|
48
112
|
return /*#__PURE__*/_react.default.createElement(Container, {
|
49
113
|
backgroundColor: backgroundColor
|
50
|
-
}, /*#__PURE__*/_react.default.createElement(
|
114
|
+
}, /*#__PURE__*/_react.default.createElement(_ReusableHeader.default, Object.assign({
|
115
|
+
title: title || 'Video Space',
|
116
|
+
controls: controls,
|
117
|
+
iconClicked: iconClicked
|
118
|
+
}, props.headerStyles)), /*#__PURE__*/_react.default.createElement(_VideoPlayer.default, {
|
51
119
|
iconsColor: iconsColor,
|
52
120
|
src: videoSrc
|
53
121
|
}), /*#__PURE__*/_react.default.createElement(VideoDetails, {
|
@@ -68,7 +136,32 @@ var VideoSpace = function VideoSpace(_ref) {
|
|
68
136
|
cardTitleFontSize: commentTitleFontSize
|
69
137
|
}), /*#__PURE__*/_react.default.createElement(_RichTextInput.default, {
|
70
138
|
users: users
|
71
|
-
})
|
139
|
+
}), /*#__PURE__*/_react.default.createElement(_ReactModal.default, {
|
140
|
+
modalIsOpen: showConfigModal,
|
141
|
+
closeModal: function closeModal() {
|
142
|
+
return setShowConfigModal(false);
|
143
|
+
},
|
144
|
+
exitModalButton: function exitModalButton(e) {
|
145
|
+
return /*#__PURE__*/_react.default.createElement("div", null);
|
146
|
+
}
|
147
|
+
}, /*#__PURE__*/_react.default.createElement(_Tabs.default, {
|
148
|
+
title: "Video Space Config",
|
149
|
+
tabs: tabs,
|
150
|
+
id: "styling"
|
151
|
+
}, /*#__PURE__*/_react.default.createElement(_VideoPreview.default, {
|
152
|
+
componentProps: {
|
153
|
+
title: title,
|
154
|
+
discription: discription,
|
155
|
+
comments: comments,
|
156
|
+
date: date,
|
157
|
+
preview: true
|
158
|
+
},
|
159
|
+
formChanged: formChanged,
|
160
|
+
id: "preview"
|
161
|
+
}), /*#__PURE__*/_react.default.createElement(_Community.default, {
|
162
|
+
center: centerContext,
|
163
|
+
id: "community"
|
164
|
+
}))));
|
72
165
|
};
|
73
166
|
|
74
167
|
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n font-family: sans-serif;\n background-color: ", ";\n"])), function (_ref2) {
|
@@ -23,8 +23,18 @@ 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
40
|
var _excluded = ["album", "cardBackgroundColor", "cardTitleColor", "cardTitleFontSize", "descColor"];
|
@@ -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) {
|
@@ -61,6 +75,42 @@ var ViewAlbum = function ViewAlbum(_ref) {
|
|
61
75
|
showModal = _useState2[0],
|
62
76
|
setShowModal = _useState2[1];
|
63
77
|
|
78
|
+
var _useState3 = (0, _react.useState)(false),
|
79
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
80
|
+
showConfigModal = _useState4[0],
|
81
|
+
setShowConfigModal = _useState4[1];
|
82
|
+
|
83
|
+
var _useState5 = (0, _react.useState)( /*#__PURE__*/_react.default.createElement(ViewAlbum, {
|
84
|
+
album: album
|
85
|
+
})),
|
86
|
+
_useState6 = (0, _slicedToArray2.default)(_useState5, 2),
|
87
|
+
centerContext = _useState6[0],
|
88
|
+
setCenterContext = _useState6[1];
|
89
|
+
|
90
|
+
var formChanged = function formChanged(values) {
|
91
|
+
console.log('context changed');
|
92
|
+
setCenterContext( /*#__PURE__*/_react.default.createElement(ViewAlbum, Object.assign({
|
93
|
+
album: album
|
94
|
+
}, values)));
|
95
|
+
};
|
96
|
+
|
97
|
+
var tabs = [{
|
98
|
+
title: 'New',
|
99
|
+
id: 'preview'
|
100
|
+
}, {
|
101
|
+
title: 'Context',
|
102
|
+
id: 'community'
|
103
|
+
}];
|
104
|
+
var sections = [{
|
105
|
+
title: 'Styles',
|
106
|
+
data: [{
|
107
|
+
title: 'Styling',
|
108
|
+
component: /*#__PURE__*/_react.default.createElement(_Tabs.default, {
|
109
|
+
title: "Video Album Config",
|
110
|
+
tabs: tabs
|
111
|
+
})
|
112
|
+
}]
|
113
|
+
}];
|
64
114
|
var cardStyles = {
|
65
115
|
darkOnHover: true,
|
66
116
|
cardBackgroundColor: cardBackgroundColor,
|
@@ -87,6 +137,10 @@ var ViewAlbum = function ViewAlbum(_ref) {
|
|
87
137
|
setShowModal(true);
|
88
138
|
break;
|
89
139
|
|
140
|
+
case 'config':
|
141
|
+
setShowConfigModal(true);
|
142
|
+
break;
|
143
|
+
|
90
144
|
default:
|
91
145
|
break;
|
92
146
|
}
|
@@ -106,13 +160,10 @@ var ViewAlbum = function ViewAlbum(_ref) {
|
|
106
160
|
};
|
107
161
|
|
108
162
|
return /*#__PURE__*/_react.default.createElement(Container, null, /*#__PURE__*/_react.default.createElement(_Gallery.default, Object.assign({
|
109
|
-
galleryTitle: "Video Album",
|
163
|
+
galleryTitle: props.title || "Video Album",
|
110
164
|
data: album,
|
111
165
|
type: "flat",
|
112
166
|
cardStyle: "card-style-6",
|
113
|
-
columnsNumber: 3,
|
114
|
-
galleryColumnGap: 10,
|
115
|
-
galleryRowGap: 20,
|
116
167
|
galleryControls: galleryControls,
|
117
168
|
iconClicked: onHeaderIconClicked,
|
118
169
|
cardControls: cardControls,
|
@@ -129,7 +180,29 @@ var ViewAlbum = function ViewAlbum(_ref) {
|
|
129
180
|
}, /*#__PURE__*/_react.default.createElement(_AddVideo.default, {
|
130
181
|
saveHandler: onAddVideo,
|
131
182
|
cancelHandler: cancelHandler
|
132
|
-
}))
|
183
|
+
})), /*#__PURE__*/_react.default.createElement(_ReactModal.default, {
|
184
|
+
modalIsOpen: showConfigModal,
|
185
|
+
closeModal: function closeModal() {
|
186
|
+
return setShowConfigModal(false);
|
187
|
+
},
|
188
|
+
exitModalButton: function exitModalButton(e) {
|
189
|
+
return /*#__PURE__*/_react.default.createElement("div", null);
|
190
|
+
}
|
191
|
+
}, /*#__PURE__*/_react.default.createElement(_Tabs.default, {
|
192
|
+
title: "Video Album Config",
|
193
|
+
tabs: tabs,
|
194
|
+
id: "styling"
|
195
|
+
}, /*#__PURE__*/_react.default.createElement(_VideoAlbumPreview.default, {
|
196
|
+
componentProps: {
|
197
|
+
album: album,
|
198
|
+
preview: true
|
199
|
+
},
|
200
|
+
formChanged: formChanged,
|
201
|
+
id: "preview"
|
202
|
+
}), /*#__PURE__*/_react.default.createElement(_Community.default, {
|
203
|
+
center: centerContext,
|
204
|
+
id: "community"
|
205
|
+
}))));
|
133
206
|
};
|
134
207
|
|
135
208
|
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,13 +56,15 @@ 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
|
-
return props.backgroundColor || '
|
67
|
+
return props.backgroundColor || 'transparent';
|
62
68
|
}, function (props) {
|
63
69
|
return props.borderRadius ? props.borderRadius + 'px' : 'inherit';
|
64
70
|
}, 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;
|