@mohamed-karawia/library 0.1.22 → 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/Community/Community.js +27 -29
- 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/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/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/PreviewComponents/ChatPreview/ChatPreview.js +6 -4
- package/dist/stories/PreviewComponents/EventPreview/EventPreview.js +6 -4
- package/dist/stories/PreviewComponents/EventsPreview/EventsPreview.js +6 -4
- package/dist/stories/PreviewComponents/FoldersPreview/FoldersPreview.js +6 -4
- package/dist/stories/PreviewComponents/MusicAlbumPreview/MusicAlbumPreview.js +6 -4
- package/dist/stories/PreviewComponents/MusicAlbumsPreview/MusicAlbumsPreview.js +7 -6
- package/dist/stories/PreviewComponents/MusicPlayerPreview/MusicPlayerPreview.js +6 -4
- package/dist/stories/PreviewComponents/NavbarPreview/NavbarPreview.js +6 -4
- package/dist/stories/PreviewComponents/NotesPreview/NotesPreview.js +6 -4
- package/dist/stories/PreviewComponents/PhotoAlbumPreview/PhotoAlbumPreview.js +6 -4
- package/dist/stories/PreviewComponents/PhotoAlbumsPreview/PhotoAlbumsPreview.js +6 -4
- package/dist/stories/PreviewComponents/SpacesListPreview/SpacesListPreview.js +6 -4
- package/dist/stories/PreviewComponents/VideoAlbumPreview/VideoAlbumPreview.js +6 -4
- package/dist/stories/PreviewComponents/VideoAlbumsPreview/VideoAlbumsPreview.js +6 -4
- package/dist/stories/PreviewComponents/VideoPreview/VideoPreview.js +6 -4
- package/dist/stories/Reusable Components/Comments/Comments.js +58 -0
- 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/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/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 +19 -19
- 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 +6 -4
- package/src/stories/PreviewComponents/EventsPreview/EventsPreview.jsx +106 -104
- package/src/stories/PreviewComponents/FoldersPreview/FoldersPreview.jsx +7 -5
- 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 +35 -33
- package/src/stories/PreviewComponents/NavbarPreview/NavbarPreview.jsx +17 -15
- package/src/stories/PreviewComponents/NotesPreview/NotesPreview.jsx +6 -4
- package/src/stories/PreviewComponents/PhotoAlbumPreview/PhotoAlbumPreview.jsx +105 -103
- package/src/stories/PreviewComponents/PhotoAlbumsPreview/PhotoAlbumsPreview.jsx +7 -5
- package/src/stories/PreviewComponents/SpacesListPreview/SpacesListPreview.jsx +9 -7
- package/src/stories/PreviewComponents/VideoAlbumPreview/VideoAlbumPreview.jsx +6 -4
- package/src/stories/PreviewComponents/VideoAlbumsPreview/VideoAlbumsPreview.jsx +6 -4
- package/src/stories/PreviewComponents/VideoPreview/VideoPreview.jsx +6 -4
- package/src/stories/{VideoAlbum → Reusable Components}/Comments/Comments.jsx +0 -0
- 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/{Library/Notes/Notes.jsx → Spaces/NotesList/NotesList.jsx} +20 -66
- package/src/stories/{Photo Album/DetailedPhoto/DetailedPhoto.jsx → Spaces/ViewDetailedPhoto/ViewDetailedPhoto.jsx} +1 -1
- package/src/stories/{Events/Event → Spaces/ViewEvent}/Event.jsx +10 -74
- 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} +42 -137
- package/src/stories/{Photo Album/ViewAlbums/ViewAlbums.jsx → Spaces/ViewPhotoAlbums/ViewPhotoAlbums.jsx} +16 -55
- package/src/stories/{VideoAlbum/VideoSpace/VideoSpace.jsx → Spaces/ViewVideo/ViewVideo.jsx} +15 -48
- package/src/stories/{VideoAlbum/ViewAlbum/ViewAlbum.jsx → Spaces/ViewVideoAlbumList/ViewVideoAlbumList.jsx} +14 -57
- package/src/stories/{VideoAlbum/AlbumsGallery/AlbumsGallery.jsx → Spaces/ViewVideoAlbums/ViewVideoAlbums.jsx} +14 -52
- 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} +0 -0
- package/src/stories/store/store.js +3 -4
- package/src/stories/Chat/Chat.jsx +0 -154
- package/src/stories/Events/EventsList/EventsList.jsx +0 -187
- package/src/stories/Library/Folders/Folders.jsx +0 -196
- package/src/stories/Music Album/ViewAlbum/ViewAlbum.jsx +0 -172
- package/src/stories/Music Album/ViewAlbums/ViewAlbums.jsx +0 -166
@@ -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;
|
@@ -0,0 +1,235 @@
|
|
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 _reactPlayer = _interopRequireDefault(require("react-player"));
|
21
|
+
|
22
|
+
var _reactTimeSeekSlider = require("react-time-seek-slider");
|
23
|
+
|
24
|
+
require("react-time-seek-slider/lib/ui-time-seek-slider.css");
|
25
|
+
|
26
|
+
var _rcSlider = _interopRequireDefault(require("rc-slider"));
|
27
|
+
|
28
|
+
var _ai = require("react-icons/ai");
|
29
|
+
|
30
|
+
var _bi = require("react-icons/bi");
|
31
|
+
|
32
|
+
var _im = require("react-icons/im");
|
33
|
+
|
34
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
35
|
+
|
36
|
+
var _excluded = ["src", "iconsColor", "onHoverIconsColor"];
|
37
|
+
|
38
|
+
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); }
|
39
|
+
|
40
|
+
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; }
|
41
|
+
|
42
|
+
var VideoPlayer = function VideoPlayer(_ref) {
|
43
|
+
var src = _ref.src,
|
44
|
+
iconsColor = _ref.iconsColor,
|
45
|
+
onHoverIconsColor = _ref.onHoverIconsColor,
|
46
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
47
|
+
var player = (0, _react.useRef)(null);
|
48
|
+
|
49
|
+
var _useState = (0, _react.useState)(false),
|
50
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
51
|
+
play = _useState2[0],
|
52
|
+
setPlay = _useState2[1];
|
53
|
+
|
54
|
+
var _useState3 = (0, _react.useState)(0),
|
55
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
56
|
+
duration = _useState4[0],
|
57
|
+
setDuration = _useState4[1];
|
58
|
+
|
59
|
+
var _useState5 = (0, _react.useState)(0),
|
60
|
+
_useState6 = (0, _slicedToArray2.default)(_useState5, 2),
|
61
|
+
progress = _useState6[0],
|
62
|
+
setProgress = _useState6[1];
|
63
|
+
|
64
|
+
var _useState7 = (0, _react.useState)(1),
|
65
|
+
_useState8 = (0, _slicedToArray2.default)(_useState7, 2),
|
66
|
+
volume = _useState8[0],
|
67
|
+
setVolume = _useState8[1];
|
68
|
+
|
69
|
+
var _useState9 = (0, _react.useState)(false),
|
70
|
+
_useState10 = (0, _slicedToArray2.default)(_useState9, 2),
|
71
|
+
muted = _useState10[0],
|
72
|
+
setMuted = _useState10[1];
|
73
|
+
|
74
|
+
var handleUserKeyPress = (0, _react.useCallback)(function (event) {
|
75
|
+
var keyCode = event.keyCode;
|
76
|
+
|
77
|
+
switch (keyCode) {
|
78
|
+
case 39:
|
79
|
+
goForward();
|
80
|
+
break;
|
81
|
+
|
82
|
+
case 37:
|
83
|
+
goBack();
|
84
|
+
break;
|
85
|
+
|
86
|
+
case 32:
|
87
|
+
setPlay(!play);
|
88
|
+
break;
|
89
|
+
|
90
|
+
default:
|
91
|
+
break;
|
92
|
+
}
|
93
|
+
}, []);
|
94
|
+
(0, _react.useEffect)(function () {
|
95
|
+
window.addEventListener("keydown", handleUserKeyPress);
|
96
|
+
}, [handleUserKeyPress, play]);
|
97
|
+
|
98
|
+
var onProgress = function onProgress(_ref2) {
|
99
|
+
var playedSeconds = _ref2.playedSeconds;
|
100
|
+
setProgress(playedSeconds);
|
101
|
+
};
|
102
|
+
|
103
|
+
var onDuration = function onDuration(duration) {
|
104
|
+
setDuration(duration);
|
105
|
+
};
|
106
|
+
|
107
|
+
var changeTimeStamp = function changeTimeStamp(time) {
|
108
|
+
setProgress(time);
|
109
|
+
player.current.seekTo(time, 'seconds');
|
110
|
+
};
|
111
|
+
|
112
|
+
var onVideoEnd = function onVideoEnd() {
|
113
|
+
props.nextVideo();
|
114
|
+
};
|
115
|
+
|
116
|
+
var goBack = function goBack() {
|
117
|
+
changeTimeStamp(progress - 5);
|
118
|
+
};
|
119
|
+
|
120
|
+
var goForward = function goForward() {
|
121
|
+
changeTimeStamp(progress + 5);
|
122
|
+
};
|
123
|
+
|
124
|
+
var prevVideo = function prevVideo() {
|
125
|
+
props.prevVideo();
|
126
|
+
};
|
127
|
+
|
128
|
+
var nextVideo = function nextVideo() {
|
129
|
+
props.nextVideo();
|
130
|
+
};
|
131
|
+
|
132
|
+
var toggleMute = function toggleMute() {
|
133
|
+
setMuted(!muted);
|
134
|
+
};
|
135
|
+
|
136
|
+
var changeVolume = function changeVolume(value) {
|
137
|
+
setVolume(value / 100);
|
138
|
+
};
|
139
|
+
|
140
|
+
return /*#__PURE__*/_react.default.createElement(Container, {
|
141
|
+
iconsColor: iconsColor
|
142
|
+
}, /*#__PURE__*/_react.default.createElement(_reactPlayer.default, {
|
143
|
+
ref: player,
|
144
|
+
playing: play,
|
145
|
+
volume: volume,
|
146
|
+
muted: muted,
|
147
|
+
onPlay: function onPlay() {
|
148
|
+
return setPlay(true);
|
149
|
+
},
|
150
|
+
onPause: function onPause() {
|
151
|
+
return setPlay(false);
|
152
|
+
},
|
153
|
+
onEnded: onVideoEnd,
|
154
|
+
width: "100%",
|
155
|
+
onProgress: onProgress,
|
156
|
+
onDuration: onDuration,
|
157
|
+
url: src
|
158
|
+
}), /*#__PURE__*/_react.default.createElement(Controls, null, /*#__PURE__*/_react.default.createElement(Left, {
|
159
|
+
iconsColor: iconsColor,
|
160
|
+
onHoverIconsColor: onHoverIconsColor
|
161
|
+
}, /*#__PURE__*/_react.default.createElement(_bi.BiSkipPrevious, {
|
162
|
+
onClick: prevVideo
|
163
|
+
}), /*#__PURE__*/_react.default.createElement(_im.ImBackward2, {
|
164
|
+
onClick: function onClick() {
|
165
|
+
return goBack();
|
166
|
+
}
|
167
|
+
}), /*#__PURE__*/_react.default.createElement(PlayContainer, {
|
168
|
+
onClick: function onClick() {
|
169
|
+
return setPlay(!play);
|
170
|
+
}
|
171
|
+
}, play ? /*#__PURE__*/_react.default.createElement(_ai.AiFillPauseCircle, null) : /*#__PURE__*/_react.default.createElement(_ai.AiFillPlayCircle, null)), /*#__PURE__*/_react.default.createElement(_im.ImForward3, {
|
172
|
+
onClick: function onClick() {
|
173
|
+
return goForward();
|
174
|
+
}
|
175
|
+
}), /*#__PURE__*/_react.default.createElement(_bi.BiSkipNext, {
|
176
|
+
onClick: nextVideo
|
177
|
+
})), /*#__PURE__*/_react.default.createElement(Center, null, /*#__PURE__*/_react.default.createElement(_reactTimeSeekSlider.TimeSeekSlider, {
|
178
|
+
max: duration,
|
179
|
+
currentTime: progress,
|
180
|
+
progress: 400,
|
181
|
+
onSeeking: function onSeeking(time) {
|
182
|
+
changeTimeStamp(time);
|
183
|
+
},
|
184
|
+
offset: 20,
|
185
|
+
secondsPrefix: "00:00:",
|
186
|
+
minutesPrefix: "00:"
|
187
|
+
})), /*#__PURE__*/_react.default.createElement(Right, {
|
188
|
+
iconsColor: iconsColor,
|
189
|
+
onHoverIconsColor: onHoverIconsColor
|
190
|
+
}, !muted ? /*#__PURE__*/_react.default.createElement(_ai.AiFillSound, {
|
191
|
+
onClick: toggleMute
|
192
|
+
}) : /*#__PURE__*/_react.default.createElement(_bi.BiVolumeMute, {
|
193
|
+
onClick: toggleMute
|
194
|
+
}), /*#__PURE__*/_react.default.createElement(_rcSlider.default, {
|
195
|
+
min: 0,
|
196
|
+
max: 100,
|
197
|
+
onChange: changeVolume
|
198
|
+
}))));
|
199
|
+
};
|
200
|
+
|
201
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n\n .ui-time-seek-slider .track .main .connect{\n background-color: ", ";\n }\n\n .ui-time-seek-slider .thumb .handler{\n background-color: ", ";\n }\n"])), function (_ref3) {
|
202
|
+
var iconsColor = _ref3.iconsColor;
|
203
|
+
return iconsColor;
|
204
|
+
}, function (_ref4) {
|
205
|
+
var iconsColor = _ref4.iconsColor;
|
206
|
+
return iconsColor;
|
207
|
+
});
|
208
|
+
|
209
|
+
var Controls = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n box-sizing: border-box;\n width: 100%;\n background-color: #000000c0;\n height: 40px;\n position: absolute;\n bottom: 0;\n display: flex;\n padding: 0 10px;\n gap: 10px;\n"])));
|
210
|
+
|
211
|
+
var Left = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n gap: 10px;\n \n svg{\n width: 25px;\n height: 25px;\n fill: ", ";\n cursor: pointer;\n &:hover{\n fill: ", ";\n }\n }\n"])), function (_ref5) {
|
212
|
+
var iconsColor = _ref5.iconsColor;
|
213
|
+
return iconsColor;
|
214
|
+
}, function (_ref6) {
|
215
|
+
var onHoverIconsColor = _ref6.onHoverIconsColor;
|
216
|
+
return onHoverIconsColor;
|
217
|
+
});
|
218
|
+
|
219
|
+
var PlayContainer = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n"])));
|
220
|
+
|
221
|
+
var Center = _styledComponents.default.div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n width: 70%;\n align-self: center;\n"])));
|
222
|
+
|
223
|
+
var Right = _styledComponents.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n gap: 10px;\n flex: 2;\n \n svg{\n width: 25px;\n height: 25px;\n fill: ", ";\n cursor: pointer;\n &:hover{\n fill: ", ";\n }\n }\n"])), function (_ref7) {
|
224
|
+
var iconsColor = _ref7.iconsColor;
|
225
|
+
return iconsColor;
|
226
|
+
}, function (_ref8) {
|
227
|
+
var onHoverIconsColor = _ref8.onHoverIconsColor;
|
228
|
+
return onHoverIconsColor;
|
229
|
+
});
|
230
|
+
|
231
|
+
VideoPlayer.defaultProps = {
|
232
|
+
src: 'https://www.youtube.com/watch?v=vETUpJ88cfA'
|
233
|
+
};
|
234
|
+
var _default = VideoPlayer;
|
235
|
+
exports.default = _default;
|
@@ -37,11 +37,11 @@ var _MusicPlayerWidget = _interopRequireDefault(require("../Widgets/MusicPlayerW
|
|
37
37
|
|
38
38
|
var _LogoWidget = _interopRequireDefault(require("../Widgets/LogoWidget/LogoWidget"));
|
39
39
|
|
40
|
-
var _VideoPlayer = _interopRequireDefault(require("../
|
40
|
+
var _VideoPlayer = _interopRequireDefault(require("../Widgets/VideoPlayer/VideoPlayer"));
|
41
41
|
|
42
|
-
var
|
42
|
+
var _NotesList = _interopRequireDefault(require("../Spaces/NotesList/NotesList"));
|
43
43
|
|
44
|
-
var
|
44
|
+
var _ViewFolders = _interopRequireDefault(require("../Spaces/ViewFolders/ViewFolders"));
|
45
45
|
|
46
46
|
var _UsersWidget = _interopRequireDefault(require("../Widgets/UsersWidget/UsersWidget"));
|
47
47
|
|
@@ -49,25 +49,25 @@ var _SpacesListWidget = _interopRequireDefault(require("../Widgets/SpacesListWid
|
|
49
49
|
|
50
50
|
var _Navbar = _interopRequireDefault(require("../Navbar/Navbar"));
|
51
51
|
|
52
|
-
var
|
52
|
+
var _ViewMusicAlbums = _interopRequireDefault(require("../Spaces/ViewMusicAlbums/ViewMusicAlbums"));
|
53
53
|
|
54
|
-
var
|
54
|
+
var _ViewMusicAlbumList = _interopRequireDefault(require("../Spaces/ViewMusicAlbumList/ViewMusicAlbumList"));
|
55
55
|
|
56
|
-
var
|
56
|
+
var _ViewPhotoAlbums = _interopRequireDefault(require("../Spaces/ViewPhotoAlbums/ViewPhotoAlbums"));
|
57
57
|
|
58
|
-
var
|
58
|
+
var _ViewPhotoAlbumList = _interopRequireDefault(require("../Spaces/ViewPhotoAlbumList/ViewPhotoAlbumList"));
|
59
59
|
|
60
|
-
var _Chat = _interopRequireDefault(require("../Chat/Chat"));
|
60
|
+
var _Chat = _interopRequireDefault(require("../Spaces/Chat/Chat"));
|
61
61
|
|
62
|
-
var _EventsList = _interopRequireDefault(require("../
|
62
|
+
var _EventsList = _interopRequireDefault(require("../Spaces/EventsList/EventsList"));
|
63
63
|
|
64
|
-
var _Event = _interopRequireDefault(require("../
|
64
|
+
var _Event = _interopRequireDefault(require("../Spaces/ViewEvent/Event"));
|
65
65
|
|
66
|
-
var
|
66
|
+
var _ViewVideo = _interopRequireDefault(require("../Spaces/ViewVideo/ViewVideo"));
|
67
67
|
|
68
|
-
var
|
68
|
+
var _ViewVideoAlbums = _interopRequireDefault(require("../Spaces/ViewVideoAlbums/ViewVideoAlbums"));
|
69
69
|
|
70
|
-
var
|
70
|
+
var _ViewVideoAlbumList = _interopRequireDefault(require("../Spaces/ViewVideoAlbumList/ViewVideoAlbumList"));
|
71
71
|
|
72
72
|
// Cards
|
73
73
|
// Widgets
|
@@ -211,8 +211,8 @@ var getWidgetType = function getWidgetType(widgetType, props, _cardClicked) {
|
|
211
211
|
'music player': /*#__PURE__*/_react.default.createElement(_MusicPlayerWidget.default, props),
|
212
212
|
'logo': /*#__PURE__*/_react.default.createElement(_LogoWidget.default, props),
|
213
213
|
'video player': /*#__PURE__*/_react.default.createElement(_VideoPlayer.default, props),
|
214
|
-
'notes': /*#__PURE__*/_react.default.createElement(
|
215
|
-
'folders': /*#__PURE__*/_react.default.createElement(
|
214
|
+
'notes': /*#__PURE__*/_react.default.createElement(_NotesList.default, props),
|
215
|
+
'folders': /*#__PURE__*/_react.default.createElement(_ViewFolders.default, props),
|
216
216
|
'users': /*#__PURE__*/_react.default.createElement(_UsersWidget.default, props),
|
217
217
|
'profile': /*#__PURE__*/_react.default.createElement(_CardStyle2.default, props),
|
218
218
|
'spaces-list': /*#__PURE__*/_react.default.createElement(_SpacesListWidget.default, Object.assign({
|
@@ -229,20 +229,20 @@ exports.getWidgetType = getWidgetType;
|
|
229
229
|
var getComponentType = function getComponentType(componentType, componentProps, stylingProps) {
|
230
230
|
var componentTypes = {
|
231
231
|
'Navbar': /*#__PURE__*/_react.default.createElement(_Navbar.default, Object.assign({}, componentProps, stylingProps)),
|
232
|
-
'MusicAlbums': /*#__PURE__*/_react.default.createElement(
|
233
|
-
'MusicAlbum': /*#__PURE__*/_react.default.createElement(
|
234
|
-
'PhotoAlbum': /*#__PURE__*/_react.default.createElement(
|
235
|
-
'PhotoAlbums': /*#__PURE__*/_react.default.createElement(
|
232
|
+
'MusicAlbums': /*#__PURE__*/_react.default.createElement(_ViewMusicAlbums.default, Object.assign({}, componentProps, stylingProps)),
|
233
|
+
'MusicAlbum': /*#__PURE__*/_react.default.createElement(_ViewMusicAlbumList.default, Object.assign({}, componentProps, stylingProps)),
|
234
|
+
'PhotoAlbum': /*#__PURE__*/_react.default.createElement(_ViewPhotoAlbumList.default, Object.assign({}, componentProps, stylingProps)),
|
235
|
+
'PhotoAlbums': /*#__PURE__*/_react.default.createElement(_ViewPhotoAlbums.default, Object.assign({}, componentProps, stylingProps)),
|
236
236
|
'MusicPlayer': /*#__PURE__*/_react.default.createElement(_MusicPlayerWidget.default, Object.assign({}, componentProps, stylingProps)),
|
237
|
-
'Folders': /*#__PURE__*/_react.default.createElement(
|
238
|
-
'Notes': /*#__PURE__*/_react.default.createElement(
|
237
|
+
'Folders': /*#__PURE__*/_react.default.createElement(_ViewFolders.default, Object.assign({}, componentProps, stylingProps)),
|
238
|
+
'Notes': /*#__PURE__*/_react.default.createElement(_NotesList.default, Object.assign({}, componentProps, stylingProps)),
|
239
239
|
'Spaces-List': /*#__PURE__*/_react.default.createElement(_SpacesListWidget.default, Object.assign({}, componentProps, stylingProps)),
|
240
240
|
'Chat': /*#__PURE__*/_react.default.createElement(_Chat.default, Object.assign({}, componentProps, stylingProps)),
|
241
241
|
'Events': /*#__PURE__*/_react.default.createElement(_EventsList.default, Object.assign({}, componentProps, stylingProps)),
|
242
242
|
'Event': /*#__PURE__*/_react.default.createElement(_Event.default, Object.assign({}, componentProps, stylingProps)),
|
243
|
-
'Video-Space': /*#__PURE__*/_react.default.createElement(
|
244
|
-
'Video-Albums': /*#__PURE__*/_react.default.createElement(
|
245
|
-
'Video-Album': /*#__PURE__*/_react.default.createElement(
|
243
|
+
'Video-Space': /*#__PURE__*/_react.default.createElement(_ViewVideo.default, Object.assign({}, componentProps, stylingProps)),
|
244
|
+
'Video-Albums': /*#__PURE__*/_react.default.createElement(_ViewVideoAlbums.default, Object.assign({}, componentProps, stylingProps)),
|
245
|
+
'Video-Album': /*#__PURE__*/_react.default.createElement(_ViewVideoAlbumList.default, Object.assign({}, componentProps, stylingProps))
|
246
246
|
};
|
247
247
|
return componentTypes[componentType];
|
248
248
|
};
|
@@ -0,0 +1,16 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.addEvent = void 0;
|
7
|
+
|
8
|
+
var addEvent = function addEvent(state, action) {
|
9
|
+
// state.spaces[1].spaceProps.events = [...state.spaces[1].spaceProps.events, action.payload]
|
10
|
+
alert('testtttt'); // console.log(action)
|
11
|
+
// alert
|
12
|
+
|
13
|
+
console.log(action);
|
14
|
+
};
|
15
|
+
|
16
|
+
exports.addEvent = addEvent;
|