@mohamed-karawia/library 0.1.20 → 0.1.23
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.js +27 -27
- package/dist/stories/Chat/Chat.js +24 -31
- package/dist/stories/Community/Community.js +54 -34
- package/dist/stories/Events/Event/Event.js +13 -6
- package/dist/stories/Events/EventsList/EventsList.js +14 -11
- package/dist/stories/Forms/AddPhoto/AddPhoto.js +8 -7
- package/dist/stories/Forms/CreateEvent/CreateEvent.js +115 -0
- package/dist/stories/Forms/CreateFolder/CreateFolder.js +87 -0
- package/dist/stories/Forms/CreateSong/CreateSong.js +98 -0
- package/dist/stories/Library/Folders/Folders.js +27 -21
- package/dist/stories/Library/Notes/Notes.js +29 -18
- package/dist/stories/Modals/AddPhotoAlbum/AddPhotoAlbum.js +38 -0
- package/dist/stories/Modals/AddPhotoModal/AddPhotoModal.js +40 -0
- package/dist/stories/Modals/AddSongModal/AddSongModal.js +41 -0
- package/dist/stories/Modals/AddVideoAlbumModal/AddVideoAlbumModal.js +41 -0
- package/dist/stories/Modals/AddVideoModal/AddVideoModal.js +39 -0
- package/dist/stories/Modals/ChatConfigModal/ChatContifgModal.js +93 -0
- package/dist/stories/Modals/CreateEventModal/CreateEventModal.js +42 -0
- package/dist/stories/Modals/CreateFolderModal/CreateFolderModal.js +36 -0
- package/dist/stories/Modals/CreateMusicAlbumModal/CreateMusicAlbumModal.js +41 -0
- package/dist/stories/Modals/CreateNoteModal/CreateNoteModal.js +42 -0
- package/dist/stories/Modals/EventConfigModal/EventConfigModal.js +99 -0
- package/dist/stories/Modals/EventsConfigModal/EventsConfigModal.js +87 -0
- package/dist/stories/Modals/FoldersConfigModal/FoldersConfigModal.js +87 -0
- package/dist/stories/Modals/MusicAlbumConfigModal/MusicAlbumConfigModal.js +88 -0
- package/dist/stories/Modals/MusicAlbumsConfigModal/MusicAlbumsConfigModal.js +87 -0
- package/dist/stories/Modals/NotesConfigModal/NotesConfigModal.js +87 -0
- package/dist/stories/Modals/PhotoAlbumConfigModal/PhotoAlbumConfigModal.js +88 -0
- package/dist/stories/Modals/PhotoAlbumsConfigModal/PhotoAlbumsConfigModal.js +88 -0
- package/dist/stories/Modals/ShowImgModal/ShowImgModal.js +62 -0
- package/dist/stories/Modals/VideoAlbumConfigModal/VideoAlbumConfigModal.js +88 -0
- package/dist/stories/Modals/VideoAlbumsConfigModal/VideoAlbumsConfigModal.js +89 -0
- package/dist/stories/Modals/VideoConfigModal/VideoConfigModal.js +99 -0
- package/dist/stories/Music Album/ViewAlbum/ViewAlbum.js +9 -46
- package/dist/stories/Music Album/ViewAlbums/ViewAlbums.js +57 -37
- package/dist/stories/Pages/Chat/Chat.js +1 -1
- package/dist/stories/Pages/Events/Event/Event.js +1 -1
- package/dist/stories/Pages/Events/Events/Events.js +1 -1
- package/dist/stories/Pages/Library/Folders/Library.js +2 -2
- package/dist/stories/Pages/Library/Notes/Notes.js +2 -2
- package/dist/stories/Pages/Music/MusicAlbum/Music.js +2 -2
- package/dist/stories/Pages/Music/MusicAlbums/MusicAlbums.js +2 -2
- package/dist/stories/Pages/Photos/Album/Album.js +2 -2
- package/dist/stories/Pages/Photos/Albums/Albums.js +2 -2
- package/dist/stories/Pages/Video/DetailedVideo/DetailedVideo.js +2 -2
- package/dist/stories/Pages/Video/VideoAlbum/Video.js +2 -2
- package/dist/stories/Photo Album/ViewAlbum/ViewAlbum.js +26 -16
- package/dist/stories/Photo Album/ViewAlbums/ViewAlbums.js +11 -4
- package/dist/stories/PreviewComponents/ChatPreview/ChatPreview.js +7 -5
- package/dist/stories/PreviewComponents/EventPreview/EventPreview.js +7 -5
- package/dist/stories/PreviewComponents/EventsPreview/EventsPreview.js +7 -5
- package/dist/stories/PreviewComponents/FoldersPreview/FoldersPreview.js +7 -5
- package/dist/stories/PreviewComponents/MusicAlbumPreview/MusicAlbumPreview.js +6 -4
- package/dist/stories/PreviewComponents/MusicAlbumsPreview/MusicAlbumsPreview.js +8 -7
- package/dist/stories/PreviewComponents/MusicPlayerPreview/MusicPlayerPreview.js +7 -5
- package/dist/stories/PreviewComponents/NavbarPreview/NavbarPreview.js +7 -5
- package/dist/stories/PreviewComponents/NotesPreview/NotesPreview.js +7 -5
- package/dist/stories/PreviewComponents/PhotoAlbumPreview/PhotoAlbumPreview.js +7 -5
- package/dist/stories/PreviewComponents/PhotoAlbumsPreview/PhotoAlbumsPreview.js +7 -5
- package/dist/stories/PreviewComponents/SpacesListPreview/SpacesListPreview.js +7 -5
- package/dist/stories/PreviewComponents/VideoAlbumPreview/VideoAlbumPreview.js +7 -5
- package/dist/stories/PreviewComponents/VideoAlbumsPreview/VideoAlbumsPreview.js +7 -5
- package/dist/stories/PreviewComponents/VideoPreview/VideoPreview.js +7 -5
- package/dist/stories/Reusable Components/Comments/Comments.js +58 -0
- package/dist/stories/Reusable Components/Community/Community.js +13 -36
- package/dist/stories/Reusable Components/Sections/Sections.js +67 -0
- package/dist/stories/Spaces/Chat/Chat.js +103 -0
- package/dist/stories/Spaces/EventsList/EventsList.js +140 -0
- package/dist/stories/Spaces/NotesList/NotesList.js +144 -0
- package/dist/stories/Spaces/ViewDetailedPhoto/ViewDetailedPhoto.js +24 -0
- package/dist/stories/Spaces/ViewEvent/Event.js +146 -0
- package/dist/stories/Spaces/ViewFolders/ViewFolders.js +136 -0
- package/dist/stories/Spaces/ViewMusicAlbumList/ViewMusicAlbumList.js +136 -0
- package/dist/stories/Spaces/ViewMusicAlbums/ViewMusicAlbums.js +130 -0
- package/dist/stories/Spaces/ViewNote/ViewNote.js +27 -0
- package/dist/stories/Spaces/ViewPhotoAlbumList/ViewPhotoAlbumList.js +231 -0
- package/dist/stories/Spaces/ViewPhotoAlbums/ViewPhotoAlbums.js +131 -0
- package/dist/stories/Spaces/ViewVideo/ViewVideo.js +169 -0
- package/dist/stories/Spaces/ViewVideoAlbumList/ViewVideoAlbumList.js +157 -0
- package/dist/stories/Spaces/ViewVideoAlbums/ViewVideoAlbums.js +164 -0
- package/dist/stories/VideoAlbum/AlbumsGallery/AlbumsGallery.js +11 -4
- package/dist/stories/VideoAlbum/VideoSpace/VideoSpace.js +17 -6
- package/dist/stories/VideoAlbum/ViewAlbum/ViewAlbum.js +24 -25
- package/dist/stories/Widgets/VideoPlayer/VideoPlayer.js +235 -0
- package/dist/stories/helpers/util.js +24 -24
- package/dist/stories/store/actions/actions.js +16 -0
- package/dist/stories/store/communities.js +27 -29
- package/dist/stories/store/community.js +941 -0
- package/dist/stories/store/store.js +9 -4
- package/package.json +1 -1
- package/src/index.js +16 -16
- package/src/stories/Community/Community.jsx +31 -32
- package/src/stories/Forms/AddPhoto/AddPhoto.jsx +72 -72
- package/src/stories/{Events → Forms}/CreateEvent/CreateEvent.jsx +5 -1
- package/src/stories/{Library → Forms}/CreateFolder/CreateFolder.jsx +0 -0
- package/src/stories/Forms/{AddSong/AddSong.jsx → CreateSong/CreateSong.jsx} +0 -0
- package/src/stories/Modals/AddPhotoAlbum/AddPhotoAlbum.jsx +27 -0
- package/src/stories/Modals/AddPhotoModal/AddPhotoModal.jsx +29 -0
- package/src/stories/Modals/AddSongModal/AddSongModal.jsx +37 -0
- package/src/stories/Modals/AddVideoAlbumModal/AddVideoAlbumModal.jsx +38 -0
- package/src/stories/Modals/AddVideoModal/AddVideoModal.jsx +35 -0
- package/src/stories/Modals/ChatConfigModal/ChatContifgModal.jsx +77 -0
- package/src/stories/Modals/CreateEventModal/CreateEventModal.jsx +30 -0
- package/src/stories/Modals/CreateFolderModal/CreateFolderModal.jsx +39 -0
- package/src/stories/Modals/CreateMusicAlbumModal/CreateMusicAlbumModal.jsx +37 -0
- package/src/stories/Modals/CreateNoteModal/CreateNoteModal.jsx +43 -0
- package/src/stories/Modals/EventConfigModal/EventConfigModal.jsx +74 -0
- package/src/stories/Modals/EventsConfigModal/EventsConfigModal.jsx +67 -0
- package/src/stories/Modals/FoldersConfigModal/FoldersConfigModal.jsx +66 -0
- package/src/stories/Modals/MusicAlbumConfigModal/MusicAlbumConfigModal.jsx +69 -0
- package/src/stories/Modals/MusicAlbumsConfigModal/MusicAlbumsConfigModal.jsx +73 -0
- package/src/stories/Modals/NotesConfigModal/NotesConfigModal.jsx +65 -0
- package/src/stories/Modals/PhotoAlbumConfigModal/PhotoAlbumConfigModal.jsx +71 -0
- package/src/stories/Modals/PhotoAlbumsConfigModal/PhotoAlbumsConfigModal.jsx +69 -0
- package/src/stories/Modals/ShowImgModal/ShowImgModal.jsx +87 -0
- package/src/stories/Modals/VideoAlbumConfigModal/VideoAlbumConfigModal.jsx +67 -0
- package/src/stories/Modals/VideoAlbumsConfigModal/VideoAlbumsConfigModal.jsx +67 -0
- package/src/stories/Modals/VideoConfigModal/VideoConfigModal.jsx +78 -0
- package/src/stories/Pages/Chat/Chat.jsx +1 -1
- package/src/stories/Pages/Events/Event/Event.jsx +1 -1
- package/src/stories/Pages/Events/Events/Events.jsx +1 -1
- package/src/stories/Pages/Library/Folders/Library.jsx +1 -1
- package/src/stories/Pages/Library/Notes/Notes.jsx +1 -1
- package/src/stories/Pages/Music/MusicAlbum/Music.jsx +1 -1
- package/src/stories/Pages/Music/MusicAlbums/MusicAlbums.jsx +1 -1
- package/src/stories/Pages/Photos/Album/Album.jsx +1 -1
- package/src/stories/Pages/Photos/Albums/Albums.jsx +1 -1
- package/src/stories/Pages/Video/DetailedVideo/DetailedVideo.jsx +1 -1
- package/src/stories/Pages/Video/VideoAlbum/Video.jsx +1 -1
- package/src/stories/PreviewComponents/ChatPreview/ChatPreview.jsx +106 -104
- package/src/stories/PreviewComponents/EventPreview/EventPreview.jsx +7 -5
- package/src/stories/PreviewComponents/EventsPreview/EventsPreview.jsx +106 -104
- package/src/stories/PreviewComponents/FoldersPreview/FoldersPreview.jsx +8 -6
- package/src/stories/PreviewComponents/MusicAlbumPreview/MusicAlbumPreview.jsx +6 -4
- package/src/stories/PreviewComponents/MusicAlbumsPreview/MusicAlbumsPreview.jsx +13 -11
- package/src/stories/PreviewComponents/MusicPlayerPreview/MusicPlayerPreview.jsx +36 -34
- package/src/stories/PreviewComponents/NavbarPreview/NavbarPreview.jsx +18 -16
- package/src/stories/PreviewComponents/NotesPreview/NotesPreview.jsx +7 -5
- package/src/stories/PreviewComponents/PhotoAlbumPreview/PhotoAlbumPreview.jsx +105 -103
- package/src/stories/PreviewComponents/PhotoAlbumsPreview/PhotoAlbumsPreview.jsx +8 -6
- package/src/stories/PreviewComponents/SpacesListPreview/SpacesListPreview.jsx +10 -8
- package/src/stories/PreviewComponents/VideoAlbumPreview/VideoAlbumPreview.jsx +7 -5
- package/src/stories/PreviewComponents/VideoAlbumsPreview/VideoAlbumsPreview.jsx +7 -5
- package/src/stories/PreviewComponents/VideoPreview/VideoPreview.jsx +7 -5
- package/src/stories/{VideoAlbum → Reusable Components}/Comments/Comments.jsx +0 -0
- package/src/stories/Reusable Components/Community/Community.jsx +10 -33
- package/src/stories/{Sections/Sections.jsx → Reusable Components/Sections/Sections.jsx } +1 -1
- package/src/stories/Spaces/Chat/Chat.jsx +77 -0
- package/src/stories/Spaces/EventsList/EventsList.jsx +118 -0
- package/src/stories/Spaces/NotesList/NotesList.jsx +125 -0
- package/src/stories/{Photo Album/DetailedPhoto/DetailedPhoto.jsx → Spaces/ViewDetailedPhoto/ViewDetailedPhoto.jsx} +1 -1
- package/src/stories/{Events/Event → Spaces/ViewEvent}/Event.jsx +17 -73
- package/src/stories/Spaces/ViewFolders/ViewFolders.jsx +122 -0
- package/src/stories/Spaces/ViewMusicAlbumList/ViewMusicAlbumList.jsx +118 -0
- package/src/stories/Spaces/ViewMusicAlbums/ViewMusicAlbums.jsx +108 -0
- package/src/stories/{Library → Spaces}/ViewNote/ViewNote.jsx +0 -0
- package/src/stories/{Photo Album/ViewAlbum/ViewAlbum.jsx → Spaces/ViewPhotoAlbumList/ViewPhotoAlbumList.jsx} +48 -134
- package/src/stories/{Photo Album/ViewAlbums/ViewAlbums.jsx → Spaces/ViewPhotoAlbums/ViewPhotoAlbums.jsx} +22 -54
- package/src/stories/{VideoAlbum/VideoSpace/VideoSpace.jsx → Spaces/ViewVideo/ViewVideo.jsx} +21 -47
- package/src/stories/{VideoAlbum/ViewAlbum/ViewAlbum.jsx → Spaces/ViewVideoAlbumList/ViewVideoAlbumList.jsx} +31 -78
- package/src/stories/{VideoAlbum/AlbumsGallery/AlbumsGallery.jsx → Spaces/ViewVideoAlbums/ViewVideoAlbums.jsx} +20 -51
- package/src/stories/{VideoAlbum → Widgets}/VideoPlayer/VideoPlayer.jsx +0 -0
- package/src/stories/helpers/util.js +13 -13
- package/src/stories/store/actions/actions.js +7 -0
- package/src/stories/store/{communities.js → community.js} +27 -29
- package/src/stories/store/store.js +3 -4
- package/src/stories/Chat/Chat.jsx +0 -148
- package/src/stories/Events/EventsList/EventsList.jsx +0 -180
- package/src/stories/Library/Folders/Folders.jsx +0 -187
- package/src/stories/Library/Notes/Notes.jsx +0 -161
- package/src/stories/Music Album/ViewAlbum/ViewAlbum.jsx +0 -216
- package/src/stories/Music Album/ViewAlbums/ViewAlbums.jsx +0 -152
@@ -0,0 +1,131 @@
|
|
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 _Gallery = _interopRequireDefault(require("../../Reusable Components/Gallery/Gallery"));
|
21
|
+
|
22
|
+
var _AddPhotoAlbum = _interopRequireDefault(require("../../Modals/AddPhotoAlbum/AddPhotoAlbum"));
|
23
|
+
|
24
|
+
var _PhotoAlbumsConfigModal = _interopRequireDefault(require("../../Modals/PhotoAlbumsConfigModal/PhotoAlbumsConfigModal"));
|
25
|
+
|
26
|
+
var _ai = require("react-icons/ai");
|
27
|
+
|
28
|
+
var _bs = require("react-icons/bs");
|
29
|
+
|
30
|
+
var _templateObject;
|
31
|
+
|
32
|
+
var _excluded = ["albums", "community"];
|
33
|
+
|
34
|
+
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); }
|
35
|
+
|
36
|
+
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; }
|
37
|
+
|
38
|
+
var cardControls = [{
|
39
|
+
icon: /*#__PURE__*/_react.default.createElement(_ai.AiFillDelete, null),
|
40
|
+
action: 'delete',
|
41
|
+
name: 'Delete album'
|
42
|
+
}];
|
43
|
+
var galleryControls = [{
|
44
|
+
icon: /*#__PURE__*/_react.default.createElement(_ai.AiOutlineFileAdd, null),
|
45
|
+
action: 'add',
|
46
|
+
name: 'Add Album'
|
47
|
+
}, {
|
48
|
+
icon: /*#__PURE__*/_react.default.createElement(_bs.BsGear, null),
|
49
|
+
action: 'config',
|
50
|
+
name: 'Config'
|
51
|
+
}];
|
52
|
+
|
53
|
+
var ViewAlbums = function ViewAlbums(_ref) {
|
54
|
+
var albums = _ref.albums,
|
55
|
+
community = _ref.community,
|
56
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
57
|
+
|
58
|
+
var _useState = (0, _react.useState)(false),
|
59
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
60
|
+
showModal = _useState2[0],
|
61
|
+
setShowModal = _useState2[1];
|
62
|
+
|
63
|
+
var _useState3 = (0, _react.useState)(false),
|
64
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
65
|
+
showConfigModal = _useState4[0],
|
66
|
+
setShowConfigModal = _useState4[1];
|
67
|
+
|
68
|
+
var onIconClicked = function onIconClicked(action) {
|
69
|
+
if (!props.preview) {
|
70
|
+
switch (action) {
|
71
|
+
case 'add':
|
72
|
+
setShowModal(true);
|
73
|
+
break;
|
74
|
+
|
75
|
+
case 'config':
|
76
|
+
setShowConfigModal(true);
|
77
|
+
break;
|
78
|
+
|
79
|
+
default:
|
80
|
+
break;
|
81
|
+
}
|
82
|
+
}
|
83
|
+
};
|
84
|
+
|
85
|
+
var cardIconClicked = function cardIconClicked(action, index) {
|
86
|
+
if (!props.preview) {
|
87
|
+
props.cardIconClicked(action, index);
|
88
|
+
}
|
89
|
+
};
|
90
|
+
|
91
|
+
var onAddAlbum = function onAddAlbum(album) {
|
92
|
+
props.onAddAlbum(album);
|
93
|
+
setShowModal(false);
|
94
|
+
};
|
95
|
+
|
96
|
+
var closeModal = function closeModal() {
|
97
|
+
setShowModal(false);
|
98
|
+
};
|
99
|
+
|
100
|
+
var cancelConfig = function cancelConfig() {
|
101
|
+
setShowConfigModal(false);
|
102
|
+
localStorage.removeItem('formStyles');
|
103
|
+
};
|
104
|
+
|
105
|
+
return /*#__PURE__*/_react.default.createElement(Container, null, /*#__PURE__*/_react.default.createElement(_Gallery.default, Object.assign({
|
106
|
+
galleryTitle: props.title || "Photo Albums",
|
107
|
+
data: albums,
|
108
|
+
type: "flat",
|
109
|
+
cardStyle: "card-style-6",
|
110
|
+
galleryControls: galleryControls,
|
111
|
+
iconClicked: onIconClicked,
|
112
|
+
cardControls: cardControls,
|
113
|
+
cardIconClicked: cardIconClicked
|
114
|
+
}, props)), /*#__PURE__*/_react.default.createElement(_AddPhotoAlbum.default, {
|
115
|
+
showModal: showModal,
|
116
|
+
onAddAlbum: onAddAlbum,
|
117
|
+
closeModal: closeModal
|
118
|
+
}), /*#__PURE__*/_react.default.createElement(_PhotoAlbumsConfigModal.default, {
|
119
|
+
showConfigModal: showConfigModal,
|
120
|
+
cancelConfig: cancelConfig,
|
121
|
+
albums: albums,
|
122
|
+
community: community,
|
123
|
+
title: props.title
|
124
|
+
}));
|
125
|
+
};
|
126
|
+
|
127
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n"])));
|
128
|
+
|
129
|
+
ViewAlbums.defaultProps = {};
|
130
|
+
var _default = ViewAlbums;
|
131
|
+
exports.default = _default;
|
@@ -0,0 +1,169 @@
|
|
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 _VideoPlayer = _interopRequireDefault(require("../../Widgets/VideoPlayer/VideoPlayer"));
|
21
|
+
|
22
|
+
var _VideoConfigModal = _interopRequireDefault(require("../../Modals/VideoConfigModal/VideoConfigModal"));
|
23
|
+
|
24
|
+
var _Comments = _interopRequireDefault(require("../../Reusable Components/Comments/Comments"));
|
25
|
+
|
26
|
+
var _RichTextInput = _interopRequireDefault(require("../../Common Inputs/RichTextInput/RichTextInput"));
|
27
|
+
|
28
|
+
var _ReusableHeader = _interopRequireDefault(require("../../Reusable Components/ReusableHeader/ReusableHeader"));
|
29
|
+
|
30
|
+
var _bs = require("react-icons/bs");
|
31
|
+
|
32
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
33
|
+
|
34
|
+
var _excluded = ["videoSrc", "title", "discription", "date", "users", "iconsColor", "backgroundColor", "detailsPadding", "titleFontSize", "titleColor", "dateFontSize", "dateColor", "discFontSize", "discColor", "comments", "commentBackgroundColor", "commentTitleColor", "commentTitleFontSize", "community"];
|
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 controls = [{
|
41
|
+
icon: /*#__PURE__*/_react.default.createElement(_bs.BsGear, null),
|
42
|
+
action: 'config',
|
43
|
+
name: 'Config'
|
44
|
+
}];
|
45
|
+
|
46
|
+
var VideoSpace = function VideoSpace(_ref) {
|
47
|
+
var videoSrc = _ref.videoSrc,
|
48
|
+
title = _ref.title,
|
49
|
+
discription = _ref.discription,
|
50
|
+
date = _ref.date,
|
51
|
+
users = _ref.users,
|
52
|
+
iconsColor = _ref.iconsColor,
|
53
|
+
backgroundColor = _ref.backgroundColor,
|
54
|
+
detailsPadding = _ref.detailsPadding,
|
55
|
+
titleFontSize = _ref.titleFontSize,
|
56
|
+
titleColor = _ref.titleColor,
|
57
|
+
dateFontSize = _ref.dateFontSize,
|
58
|
+
dateColor = _ref.dateColor,
|
59
|
+
discFontSize = _ref.discFontSize,
|
60
|
+
discColor = _ref.discColor,
|
61
|
+
comments = _ref.comments,
|
62
|
+
commentBackgroundColor = _ref.commentBackgroundColor,
|
63
|
+
commentTitleColor = _ref.commentTitleColor,
|
64
|
+
commentTitleFontSize = _ref.commentTitleFontSize,
|
65
|
+
community = _ref.community,
|
66
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
67
|
+
|
68
|
+
var _useState = (0, _react.useState)(false),
|
69
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
70
|
+
showConfigModal = _useState2[0],
|
71
|
+
setShowConfigModal = _useState2[1];
|
72
|
+
|
73
|
+
var iconClicked = function iconClicked(action) {
|
74
|
+
if (!props.preview) {
|
75
|
+
switch (action) {
|
76
|
+
case 'config':
|
77
|
+
setShowConfigModal(true);
|
78
|
+
break;
|
79
|
+
|
80
|
+
default:
|
81
|
+
break;
|
82
|
+
}
|
83
|
+
}
|
84
|
+
};
|
85
|
+
|
86
|
+
var cancelConfig = function cancelConfig() {
|
87
|
+
setShowConfigModal(false);
|
88
|
+
localStorage.removeItem('formStyles');
|
89
|
+
};
|
90
|
+
|
91
|
+
return /*#__PURE__*/_react.default.createElement(Container, {
|
92
|
+
backgroundColor: backgroundColor
|
93
|
+
}, /*#__PURE__*/_react.default.createElement(_ReusableHeader.default, Object.assign({
|
94
|
+
title: title || 'Video Space',
|
95
|
+
controls: controls,
|
96
|
+
iconClicked: iconClicked
|
97
|
+
}, props.headerStyles)), /*#__PURE__*/_react.default.createElement(_VideoPlayer.default, {
|
98
|
+
iconsColor: iconsColor,
|
99
|
+
src: videoSrc
|
100
|
+
}), /*#__PURE__*/_react.default.createElement(VideoDetails, {
|
101
|
+
detailsPadding: detailsPadding
|
102
|
+
}, /*#__PURE__*/_react.default.createElement(Top, null, /*#__PURE__*/_react.default.createElement(Title, {
|
103
|
+
titleFontSize: titleFontSize,
|
104
|
+
titleColor: titleColor
|
105
|
+
}, title), /*#__PURE__*/_react.default.createElement(Date, {
|
106
|
+
dateFontSize: dateFontSize,
|
107
|
+
dateColor: dateColor
|
108
|
+
}, date)), /*#__PURE__*/_react.default.createElement(Discription, {
|
109
|
+
discFontSize: discFontSize,
|
110
|
+
discColor: discColor
|
111
|
+
}, discription)), /*#__PURE__*/_react.default.createElement(_Comments.default, {
|
112
|
+
cardBackgroundColor: commentBackgroundColor,
|
113
|
+
comments: comments,
|
114
|
+
cardTitleColor: commentTitleColor,
|
115
|
+
cardTitleFontSize: commentTitleFontSize
|
116
|
+
}), /*#__PURE__*/_react.default.createElement(_RichTextInput.default, {
|
117
|
+
users: users
|
118
|
+
}), /*#__PURE__*/_react.default.createElement(_VideoConfigModal.default, {
|
119
|
+
showConfigModal: showConfigModal,
|
120
|
+
cancelConfig: cancelConfig,
|
121
|
+
community: community,
|
122
|
+
videoSrc: videoSrc,
|
123
|
+
title: title,
|
124
|
+
discription: discription,
|
125
|
+
date: date,
|
126
|
+
users: users,
|
127
|
+
comments: comments
|
128
|
+
}));
|
129
|
+
};
|
130
|
+
|
131
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n font-family: sans-serif;\n background-color: ", ";\n"])), function (_ref2) {
|
132
|
+
var backgroundColor = _ref2.backgroundColor;
|
133
|
+
return backgroundColor;
|
134
|
+
});
|
135
|
+
|
136
|
+
var VideoDetails = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n padding: ", "px;\n"])), function (_ref3) {
|
137
|
+
var detailsPadding = _ref3.detailsPadding;
|
138
|
+
return detailsPadding;
|
139
|
+
});
|
140
|
+
|
141
|
+
var Top = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n"])));
|
142
|
+
|
143
|
+
var Title = _styledComponents.default.h3(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n font-size: ", "px;\n color: ", ";\n flex-grow: 1;\n margin: 0;\n"])), function (_ref4) {
|
144
|
+
var titleFontSize = _ref4.titleFontSize;
|
145
|
+
return titleFontSize;
|
146
|
+
}, function (_ref5) {
|
147
|
+
var titleColor = _ref5.titleColor;
|
148
|
+
return titleColor;
|
149
|
+
});
|
150
|
+
|
151
|
+
var Date = _styledComponents.default.p(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n font-size: ", "px;\n color: ", ";\n"])), function (_ref6) {
|
152
|
+
var dateFontSize = _ref6.dateFontSize;
|
153
|
+
return dateFontSize;
|
154
|
+
}, function (_ref7) {
|
155
|
+
var dateColor = _ref7.dateColor;
|
156
|
+
return dateColor;
|
157
|
+
});
|
158
|
+
|
159
|
+
var Discription = _styledComponents.default.p(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n font-size: ", "px;\n color: ", ";\n"])), function (_ref8) {
|
160
|
+
var discFontSize = _ref8.discFontSize;
|
161
|
+
return discFontSize;
|
162
|
+
}, function (_ref9) {
|
163
|
+
var discColor = _ref9.discColor;
|
164
|
+
return discColor;
|
165
|
+
});
|
166
|
+
|
167
|
+
VideoSpace.defaultProps = {};
|
168
|
+
var _default = VideoSpace;
|
169
|
+
exports.default = _default;
|
@@ -0,0 +1,157 @@
|
|
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 _Gallery = _interopRequireDefault(require("../../Reusable Components/Gallery/Gallery"));
|
21
|
+
|
22
|
+
var _VideoAlbumConfigModal = _interopRequireDefault(require("../../Modals/VideoAlbumConfigModal/VideoAlbumConfigModal"));
|
23
|
+
|
24
|
+
var _AddVideoModal = _interopRequireDefault(require("../../Modals/AddVideoModal/AddVideoModal"));
|
25
|
+
|
26
|
+
var _ai = require("react-icons/ai");
|
27
|
+
|
28
|
+
var _bs = require("react-icons/bs");
|
29
|
+
|
30
|
+
var _templateObject;
|
31
|
+
|
32
|
+
var _excluded = ["album", "cardBackgroundColor", "cardTitleColor", "cardTitleFontSize", "descColor", "community"];
|
33
|
+
|
34
|
+
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); }
|
35
|
+
|
36
|
+
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; }
|
37
|
+
|
38
|
+
var cardControls = [{
|
39
|
+
icon: /*#__PURE__*/_react.default.createElement(_ai.AiFillPlayCircle, null),
|
40
|
+
action: 'play',
|
41
|
+
name: 'play video'
|
42
|
+
}, {
|
43
|
+
icon: /*#__PURE__*/_react.default.createElement(_ai.AiFillDelete, null),
|
44
|
+
action: 'delete',
|
45
|
+
name: 'Delete video'
|
46
|
+
}];
|
47
|
+
var galleryControls = [{
|
48
|
+
icon: /*#__PURE__*/_react.default.createElement(_ai.AiOutlineFileAdd, null),
|
49
|
+
action: 'add',
|
50
|
+
name: 'Add Album'
|
51
|
+
}, {
|
52
|
+
icon: /*#__PURE__*/_react.default.createElement(_bs.BsGear, null),
|
53
|
+
action: 'config',
|
54
|
+
name: 'Config'
|
55
|
+
}];
|
56
|
+
|
57
|
+
var ViewAlbum = function ViewAlbum(_ref) {
|
58
|
+
var album = _ref.album,
|
59
|
+
cardBackgroundColor = _ref.cardBackgroundColor,
|
60
|
+
cardTitleColor = _ref.cardTitleColor,
|
61
|
+
cardTitleFontSize = _ref.cardTitleFontSize,
|
62
|
+
descColor = _ref.descColor,
|
63
|
+
community = _ref.community,
|
64
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
65
|
+
|
66
|
+
var _useState = (0, _react.useState)(false),
|
67
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
68
|
+
showModal = _useState2[0],
|
69
|
+
setShowModal = _useState2[1];
|
70
|
+
|
71
|
+
var _useState3 = (0, _react.useState)(false),
|
72
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
73
|
+
showConfigModal = _useState4[0],
|
74
|
+
setShowConfigModal = _useState4[1];
|
75
|
+
|
76
|
+
var cardStyles = {
|
77
|
+
darkOnHover: true,
|
78
|
+
cardBackgroundColor: cardBackgroundColor,
|
79
|
+
cardTitleFontSize: cardTitleFontSize,
|
80
|
+
cardTitleColor: cardTitleColor,
|
81
|
+
descColor: descColor,
|
82
|
+
controlsStyles: {
|
83
|
+
showOnHover: true,
|
84
|
+
position: 'center',
|
85
|
+
iconBackground: "transparent",
|
86
|
+
dropdownBackground: "#272727",
|
87
|
+
dropdownFontColor: "white",
|
88
|
+
dropdownItemHoverColor: "#414141",
|
89
|
+
iconBorderRadius: 100,
|
90
|
+
iconSize: 25,
|
91
|
+
iconsGap: 10,
|
92
|
+
iconColor: 'white'
|
93
|
+
}
|
94
|
+
};
|
95
|
+
|
96
|
+
var onHeaderIconClicked = function onHeaderIconClicked(action) {
|
97
|
+
if (!props.preview) {
|
98
|
+
switch (action) {
|
99
|
+
case 'add':
|
100
|
+
setShowModal(true);
|
101
|
+
break;
|
102
|
+
|
103
|
+
case 'config':
|
104
|
+
setShowConfigModal(true);
|
105
|
+
break;
|
106
|
+
|
107
|
+
default:
|
108
|
+
break;
|
109
|
+
}
|
110
|
+
}
|
111
|
+
};
|
112
|
+
|
113
|
+
var cardIconClicked = function cardIconClicked(action, index) {
|
114
|
+
props.cardIconClicked(action, index);
|
115
|
+
};
|
116
|
+
|
117
|
+
var onAddVideo = function onAddVideo(album) {
|
118
|
+
setShowModal(false);
|
119
|
+
props.onAddVideo(album);
|
120
|
+
};
|
121
|
+
|
122
|
+
var closeModal = function closeModal() {
|
123
|
+
setShowModal(false);
|
124
|
+
};
|
125
|
+
|
126
|
+
var cancelConfig = function cancelConfig() {
|
127
|
+
setShowConfigModal(false);
|
128
|
+
localStorage.removeItem('formStyles');
|
129
|
+
};
|
130
|
+
|
131
|
+
return /*#__PURE__*/_react.default.createElement(Container, null, /*#__PURE__*/_react.default.createElement(_Gallery.default, Object.assign({
|
132
|
+
galleryTitle: props.title || "Video Album",
|
133
|
+
data: album,
|
134
|
+
type: "flat",
|
135
|
+
cardStyle: "card-style-6",
|
136
|
+
galleryControls: galleryControls,
|
137
|
+
iconClicked: onHeaderIconClicked,
|
138
|
+
cardControls: cardControls,
|
139
|
+
cardIconClicked: cardIconClicked,
|
140
|
+
customCardStyles: cardStyles
|
141
|
+
}, props)), /*#__PURE__*/_react.default.createElement(_AddVideoModal.default, {
|
142
|
+
showModal: showModal,
|
143
|
+
onAddVideo: onAddVideo,
|
144
|
+
closeModal: closeModal
|
145
|
+
}), /*#__PURE__*/_react.default.createElement(_VideoAlbumConfigModal.default, {
|
146
|
+
showConfigModal: showConfigModal,
|
147
|
+
cancelConfig: cancelConfig,
|
148
|
+
album: album,
|
149
|
+
community: community
|
150
|
+
}));
|
151
|
+
};
|
152
|
+
|
153
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\n"])));
|
154
|
+
|
155
|
+
ViewAlbum.defaultProps = {};
|
156
|
+
var _default = ViewAlbum;
|
157
|
+
exports.default = _default;
|
@@ -0,0 +1,164 @@
|
|
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 _Gallery = _interopRequireDefault(require("../../Reusable Components/Gallery/Gallery"));
|
21
|
+
|
22
|
+
var _AddVideoAlbumModal = _interopRequireDefault(require("../../Modals/AddVideoAlbumModal/AddVideoAlbumModal"));
|
23
|
+
|
24
|
+
var _VideoAlbumsConfigModal = _interopRequireDefault(require("../../Modals/VideoAlbumsConfigModal/VideoAlbumsConfigModal"));
|
25
|
+
|
26
|
+
var _ai = require("react-icons/ai");
|
27
|
+
|
28
|
+
var _bs = require("react-icons/bs");
|
29
|
+
|
30
|
+
var _templateObject;
|
31
|
+
|
32
|
+
var _excluded = ["videoAlbums", "cardBackgroundColor", "cardTitleColor", "cardTitleFontSize", "countColor", "countFontSize", "community"];
|
33
|
+
|
34
|
+
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); }
|
35
|
+
|
36
|
+
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; }
|
37
|
+
|
38
|
+
var cardControls = [{
|
39
|
+
icon: /*#__PURE__*/_react.default.createElement(_ai.AiFillDelete, null),
|
40
|
+
action: 'delete',
|
41
|
+
name: 'Delete album'
|
42
|
+
}];
|
43
|
+
var galleryControls = [{
|
44
|
+
icon: /*#__PURE__*/_react.default.createElement(_ai.AiOutlineFileAdd, null),
|
45
|
+
action: 'add',
|
46
|
+
name: 'Add Album'
|
47
|
+
}, {
|
48
|
+
icon: /*#__PURE__*/_react.default.createElement(_bs.BsGear, null),
|
49
|
+
action: 'config',
|
50
|
+
name: 'Config'
|
51
|
+
}];
|
52
|
+
|
53
|
+
var AlbumsGallery = function AlbumsGallery(_ref) {
|
54
|
+
var videoAlbums = _ref.videoAlbums,
|
55
|
+
cardBackgroundColor = _ref.cardBackgroundColor,
|
56
|
+
cardTitleColor = _ref.cardTitleColor,
|
57
|
+
cardTitleFontSize = _ref.cardTitleFontSize,
|
58
|
+
countColor = _ref.countColor,
|
59
|
+
countFontSize = _ref.countFontSize,
|
60
|
+
community = _ref.community,
|
61
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
62
|
+
|
63
|
+
var _useState = (0, _react.useState)(false),
|
64
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
65
|
+
showModal = _useState2[0],
|
66
|
+
setShowModal = _useState2[1];
|
67
|
+
|
68
|
+
var _useState3 = (0, _react.useState)(false),
|
69
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
70
|
+
showConfigModal = _useState4[0],
|
71
|
+
setShowConfigModal = _useState4[1];
|
72
|
+
|
73
|
+
var cardStyles = {
|
74
|
+
cardBackgroundColor: cardBackgroundColor,
|
75
|
+
cardTitleColor: cardTitleColor,
|
76
|
+
cardTitleFontSize: cardTitleFontSize,
|
77
|
+
countColor: countColor,
|
78
|
+
countFontSize: countFontSize,
|
79
|
+
controlsStyles: {
|
80
|
+
showOnHover: true,
|
81
|
+
position: 'absolute',
|
82
|
+
iconBackground: "transparent",
|
83
|
+
dropdownBackground: "white",
|
84
|
+
dropdownFontColor: "#FE1744",
|
85
|
+
dropdownItemHoverColor: "#FE1744",
|
86
|
+
iconBackgroundHover: "white",
|
87
|
+
iconBorderRadius: 100,
|
88
|
+
iconSize: 20,
|
89
|
+
iconsGap: 10,
|
90
|
+
maxIcons: 0,
|
91
|
+
iconColor: '#FE1744',
|
92
|
+
iconHoverColor: 'white',
|
93
|
+
dropdownFontSize: 10
|
94
|
+
}
|
95
|
+
};
|
96
|
+
|
97
|
+
var onIconClicked = function onIconClicked(action) {
|
98
|
+
if (!props.preview) {
|
99
|
+
switch (action) {
|
100
|
+
case 'add':
|
101
|
+
setShowModal(true);
|
102
|
+
break;
|
103
|
+
|
104
|
+
case 'config':
|
105
|
+
setShowConfigModal(true);
|
106
|
+
break;
|
107
|
+
|
108
|
+
default:
|
109
|
+
break;
|
110
|
+
}
|
111
|
+
}
|
112
|
+
};
|
113
|
+
|
114
|
+
var cardIconClicked = function cardIconClicked(action, index) {
|
115
|
+
props.cardIconClicked(action, index);
|
116
|
+
};
|
117
|
+
|
118
|
+
var onAddAlbum = function onAddAlbum(album) {
|
119
|
+
setShowModal(false);
|
120
|
+
props.onAddAlbum(album);
|
121
|
+
};
|
122
|
+
|
123
|
+
var closeModal = function closeModal() {
|
124
|
+
setShowModal(false);
|
125
|
+
};
|
126
|
+
|
127
|
+
var cancelConfig = function cancelConfig() {
|
128
|
+
setShowConfigModal(false);
|
129
|
+
localStorage.removeItem('formStyles');
|
130
|
+
};
|
131
|
+
|
132
|
+
return /*#__PURE__*/_react.default.createElement(Container, null, /*#__PURE__*/_react.default.createElement(_Gallery.default, Object.assign({
|
133
|
+
galleryTitle: "Video Albums",
|
134
|
+
data: videoAlbums,
|
135
|
+
type: "flat",
|
136
|
+
cardStyle: "card-style-6",
|
137
|
+
columnsNumber: 3,
|
138
|
+
iconClicked: onIconClicked,
|
139
|
+
galleryColumnGap: 10,
|
140
|
+
galleryRowGap: 20,
|
141
|
+
galleryControls: galleryControls,
|
142
|
+
cardControls: cardControls,
|
143
|
+
cardClicked: function cardClicked() {
|
144
|
+
return null;
|
145
|
+
},
|
146
|
+
cardIconClicked: cardIconClicked,
|
147
|
+
customCardStyles: cardStyles
|
148
|
+
}, props)), /*#__PURE__*/_react.default.createElement(_AddVideoAlbumModal.default, {
|
149
|
+
showModal: showModal,
|
150
|
+
onAddAlbum: onAddAlbum,
|
151
|
+
closeModal: closeModal
|
152
|
+
}), /*#__PURE__*/_react.default.createElement(_VideoAlbumsConfigModal.default, {
|
153
|
+
videoAlbums: videoAlbums,
|
154
|
+
showConfigModal: showConfigModal,
|
155
|
+
cancelConfig: cancelConfig,
|
156
|
+
community: community
|
157
|
+
}));
|
158
|
+
};
|
159
|
+
|
160
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n \n"])));
|
161
|
+
|
162
|
+
AlbumsGallery.defaultProps = {};
|
163
|
+
var _default = AlbumsGallery;
|
164
|
+
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
|
};
|