@mohamed-karawia/library 0.1.18 → 0.1.19

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. package/dist/stories/Chat/Chat.js +120 -3
  2. package/dist/stories/Common Inputs/Picker/Picker.js +61 -0
  3. package/dist/stories/Common Inputs/TextField/TextField.js +3 -1
  4. package/dist/stories/Community/Community.js +137 -0
  5. package/dist/stories/Events/Event/Event.js +116 -4
  6. package/dist/stories/Events/EventsList/EventsList.js +95 -16
  7. package/dist/stories/Forms/CreateSpace/CreateSpace.js +75 -0
  8. package/dist/stories/Library/Folders/Folders.js +80 -1
  9. package/dist/stories/Library/Notes/Notes.js +75 -1
  10. package/dist/stories/Modals/NavbarPreviewModal/NavbarPreviewModal.js +54 -0
  11. package/dist/stories/Music Album/ViewAlbum/ViewAlbum.js +134 -9
  12. package/dist/stories/Music Album/ViewAlbums/ViewAlbums.js +65 -23
  13. package/dist/stories/Navbar/Navbar.js +1 -1
  14. package/dist/stories/Pages/Events/Event/Event.js +14 -5
  15. package/dist/stories/Pages/Music/MusicAlbums/MusicAlbums.js +2 -15
  16. package/dist/stories/Photo Album/ViewAlbum/ViewAlbum.js +76 -9
  17. package/dist/stories/Photo Album/ViewAlbums/ViewAlbums.js +80 -9
  18. package/dist/stories/Preview/Preview.js +1 -0
  19. package/dist/stories/PreviewComponents/ChatPreview/ChatPreview.js +193 -0
  20. package/dist/stories/PreviewComponents/EventPreview/EventPreview.js +158 -0
  21. package/dist/stories/PreviewComponents/EventsPreview/EventsPreview.js +192 -0
  22. package/dist/stories/PreviewComponents/FoldersPreview/FoldersPreview.js +182 -0
  23. package/dist/stories/PreviewComponents/MusicAlbumPreview/MusicAlbumPreview.js +177 -0
  24. package/dist/stories/PreviewComponents/MusicAlbumsPreview/MusicAlbumsPreview.js +181 -0
  25. package/dist/stories/PreviewComponents/MusicPlayerPreview/MusicPlayerPreview.js +153 -0
  26. package/dist/stories/PreviewComponents/NavbarPreview/NavbarPreview.js +112 -0
  27. package/dist/stories/PreviewComponents/NotesPreview/NotesPreview.js +173 -0
  28. package/dist/stories/PreviewComponents/PhotoAlbumPreview/PhotoAlbumPreview.js +189 -0
  29. package/dist/stories/PreviewComponents/PhotoAlbumsPreview/PhotoAlbumsPreview.js +189 -0
  30. package/dist/stories/PreviewComponents/SpacesListPreview/SpacesListPreview.js +197 -0
  31. package/dist/stories/PreviewComponents/VideoAlbumPreview/VideoAlbumPreview.js +189 -0
  32. package/dist/stories/PreviewComponents/VideoAlbumsPreview/VideoAlbumsPreview.js +175 -0
  33. package/dist/stories/PreviewComponents/VideoPreview/VideoPreview.js +172 -0
  34. package/dist/stories/PreviewComponents/globalStyles.js +26 -0
  35. package/dist/stories/Reusable Components/Cards/Card-style-10/CardStyle10.js +4 -3
  36. package/dist/stories/Reusable Components/Cards/Card-style-11/CardStyle11.js +8 -4
  37. package/dist/stories/Reusable Components/Cards/Card-style-6/CardStyle6.js +10 -4
  38. package/dist/stories/Reusable Components/Cards/Card-style-8/CardStyle8.js +4 -2
  39. package/dist/stories/Reusable Components/Cards/globalCardStyles.js +2 -2
  40. package/dist/stories/Reusable Components/Community/Community.js +76 -0
  41. package/dist/stories/Reusable Components/Gallery/Gallery.js +12 -17
  42. package/dist/stories/Reusable Components/ReactModal/ReactModal.js +11 -30
  43. package/dist/stories/Reusable Components/ReusableForm/ReusableForm.js +19 -2
  44. package/dist/stories/Reusable Components/ReusableList/ReusableList.js +9 -5
  45. package/dist/stories/Reusable Components/Tabs/Tabs.js +68 -0
  46. package/dist/stories/Sections/Sections.js +8 -2
  47. package/dist/stories/VideoAlbum/AlbumsGallery/AlbumsGallery.js +77 -18
  48. package/dist/stories/VideoAlbum/VideoSpace/VideoSpace.js +96 -3
  49. package/dist/stories/VideoAlbum/ViewAlbum/ViewAlbum.js +77 -1
  50. package/dist/stories/Widgets/MusicPlayerWidget/MusicPlayerWidget.js +16 -10
  51. package/dist/stories/Widgets/SpacesListWidget/SpacesListWidget.js +115 -0
  52. package/dist/stories/Widgets/UsersWidget/UsersWidget.js +30 -0
  53. package/dist/stories/helpers/util.js +36 -3
  54. package/dist/stories/store/communities.js +943 -0
  55. package/dist/stories/store/store.js +44 -0
  56. package/package.json +5 -2
  57. package/src/stories/Chat/Chat.jsx +104 -5
  58. package/src/stories/Common Inputs/Picker/Picker.jsx +47 -0
  59. package/src/stories/Common Inputs/TextField/TextField.jsx +1 -1
  60. package/src/stories/Community/Community.jsx +110 -0
  61. package/src/stories/Events/Event/Event.jsx +97 -4
  62. package/src/stories/Events/EventsList/EventsList.jsx +91 -17
  63. package/src/stories/Forms/CreateSpace/CreateSpace.jsx +73 -0
  64. package/src/stories/Library/Folders/Folders.jsx +79 -1
  65. package/src/stories/Library/Notes/Notes.jsx +57 -1
  66. package/src/stories/Modals/NavbarPreviewModal/NavbarPreviewModal.jsx +31 -0
  67. package/src/stories/Music Album/ViewAlbum/ViewAlbum.jsx +125 -11
  68. package/src/stories/Music Album/ViewAlbums/ViewAlbums.jsx +56 -26
  69. package/src/stories/Navbar/Navbar.jsx +1 -1
  70. package/src/stories/Pages/Events/Event/Event.jsx +12 -4
  71. package/src/stories/Pages/Music/MusicAlbums/MusicAlbums.jsx +0 -13
  72. package/src/stories/Pages/ViewWorld/styles.json +1 -1
  73. package/src/stories/Photo Album/ViewAlbum/ViewAlbum.jsx +57 -4
  74. package/src/stories/Photo Album/ViewAlbums/ViewAlbums.jsx +62 -9
  75. package/src/stories/Preview/Preview.jsx +9 -1
  76. package/src/stories/PreviewComponents/ChatPreview/ChatPreview.jsx +132 -0
  77. package/src/stories/PreviewComponents/EventPreview/EventPreview.jsx +116 -0
  78. package/src/stories/PreviewComponents/EventsPreview/EventsPreview.jsx +132 -0
  79. package/src/stories/PreviewComponents/FoldersPreview/FoldersPreview.jsx +127 -0
  80. package/src/stories/PreviewComponents/MusicAlbumPreview/MusicAlbumPreview.jsx +124 -0
  81. package/src/stories/PreviewComponents/MusicAlbumsPreview/MusicAlbumsPreview.jsx +126 -0
  82. package/src/stories/PreviewComponents/MusicPlayerPreview/MusicPlayerPreview.jsx +113 -0
  83. package/src/stories/PreviewComponents/NavbarPreview/NavbarPreview.jsx +93 -0
  84. package/src/stories/PreviewComponents/NotesPreview/NotesPreview.jsx +122 -0
  85. package/src/stories/PreviewComponents/PhotoAlbumPreview/PhotoAlbumPreview.jsx +129 -0
  86. package/src/stories/PreviewComponents/PhotoAlbumsPreview/PhotoAlbumsPreview.jsx +129 -0
  87. package/src/stories/PreviewComponents/SpacesListPreview/SpacesListPreview.jsx +138 -0
  88. package/src/stories/PreviewComponents/VideoAlbumPreview/VideoAlbumPreview.jsx +129 -0
  89. package/src/stories/PreviewComponents/VideoAlbumsPreview/VideoAlbumsPreview.jsx +124 -0
  90. package/src/stories/PreviewComponents/VideoPreview/VideoPreview.jsx +125 -0
  91. package/src/stories/PreviewComponents/globalStyles.js +20 -0
  92. package/src/stories/Reusable Components/Cards/Card-style-10/CardStyle10.jsx +5 -2
  93. package/src/stories/Reusable Components/Cards/Card-style-11/CardStyle11.jsx +5 -5
  94. package/src/stories/Reusable Components/Cards/Card-style-6/CardStyle6.jsx +12 -6
  95. package/src/stories/Reusable Components/Cards/Card-style-8/CardStyle8.jsx +2 -2
  96. package/src/stories/Reusable Components/Cards/globalCardStyles.js +2 -1
  97. package/src/stories/Reusable Components/Community/Community.jsx +70 -0
  98. package/src/stories/Reusable Components/Gallery/Gallery.jsx +10 -9
  99. package/src/stories/Reusable Components/ReactModal/ReactModal.jsx +3 -25
  100. package/src/stories/Reusable Components/ReusableForm/ReusableForm.jsx +18 -6
  101. package/src/stories/Reusable Components/ReusableList/ReusableList.jsx +9 -4
  102. package/src/stories/Reusable Components/Tabs/Tabs.jsx +67 -0
  103. package/src/stories/Sections/Sections.jsx +5 -2
  104. package/src/stories/VideoAlbum/AlbumsGallery/AlbumsGallery.jsx +57 -16
  105. package/src/stories/VideoAlbum/VideoSpace/VideoSpace.jsx +70 -1
  106. package/src/stories/VideoAlbum/ViewAlbum/ViewAlbum.jsx +62 -3
  107. package/src/stories/Widgets/MusicPlayerWidget/MusicPlayerWidget.jsx +13 -6
  108. package/src/stories/Widgets/SpacesListWidget/SpacesListWidget.jsx +78 -0
  109. package/src/stories/Widgets/UsersWidget/UsersWidget.jsx +20 -0
  110. package/src/stories/helpers/util.js +24 -2
  111. package/src/stories/store/communities.js +705 -0
  112. package/src/stories/store/store.js +33 -0
  113. package/src/stories/styling.json +92 -0
@@ -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 = _interopRequireDefault(require("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(_VideoPlayer.default, {
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
  }
@@ -126,7 +180,29 @@ var ViewAlbum = function ViewAlbum(_ref) {
126
180
  }, /*#__PURE__*/_react.default.createElement(_AddVideo.default, {
127
181
  saveHandler: onAddVideo,
128
182
  cancelHandler: cancelHandler
129
- })));
183
+ })), /*#__PURE__*/_react.default.createElement(_ReactModal.default, {
184
+ modalIsOpen: showConfigModal,
185
+ closeModal: 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
+ }))));
130
206
  };
131
207
 
132
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 _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
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(MusicPlayer, Object.assign({
42
+ return /*#__PURE__*/_react.default.createElement(Container, null, /*#__PURE__*/_react.default.createElement(_ReusableHeader.default, Object.assign({
43
+ title: props.title || 'Music Player'
44
+ }, props.headerStyles)), /*#__PURE__*/_react.default.createElement(MusicPlayer, Object.assign({
41
45
  autoPlay: "none",
42
46
  src: props.playlist[currentSong].musicSrc,
43
47
  onPlay: function onPlay(e) {
@@ -52,11 +56,13 @@ var MusicPlayerWidget = function MusicPlayerWidget(_ref) {
52
56
  onClickNext: function onClickNext() {
53
57
  return props.nextSong();
54
58
  }
55
- }, props));
59
+ }, props)));
56
60
  };
57
61
 
58
- var MusicPlayer = (0, _styledComponents.default)(_reactH5AudioPlayer.default)(_templateObject || (_templateObject = (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) {
59
- return props.fontFamily || 'inherit';
62
+ var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n"])));
63
+
64
+ var MusicPlayer = (0, _styledComponents.default)(_reactH5AudioPlayer.default)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n\n font-family: ", ";\n background-color: ", ";\n border-radius: ", ";\n padding: ", "px;\n width: ", "px;\n box-shadow: ", ";\n\n .rhap_progress-filled,\n .rhap_progress-indicator {\n background-color: ", ";\n }\n \n .rhap_repeat-button,\n .rhap_main-controls-button,\n .rhap_volume-button,\n .rhap_time {\n color: ", ";\n }\n \n .rhap_download-progress,\n .rhap_volume-bar {\n background-color: gray ;\n }\n \n\n .rhap_volume-indicator {\n background: ", ";\n }\n\n"])), function (props) {
65
+ return props.fontFamily || 'sans-serif';
60
66
  }, function (props) {
61
67
  return props.backgroundColor || 'transparent';
62
68
  }, function (props) {
@@ -75,19 +81,19 @@ var MusicPlayer = (0, _styledComponents.default)(_reactH5AudioPlayer.default)(_t
75
81
  return props.primaryColor;
76
82
  });
77
83
 
78
- var Header = _styledComponents.default.header(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: column;\n align-items: center;\n padding: 8px;\n"])));
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(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n"])));
86
+ var CoverWrapper = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n"])));
81
87
 
82
- var Img = _styledComponents.default.img(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n height: inherit;\n width: 100%;\n max-height: 200px;\n object-fit: cover;\n object-position: center;\n"])));
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(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n font-size: ", "px;\n"])), function (props) {
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(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n margin: 0;\n color: #7a7a7a;\n text-transform: capitalize;\n"])));
96
+ var ArtistName = _styledComponents.default.p(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n margin: 0;\n color: #7a7a7a;\n text-transform: capitalize;\n"])));
91
97
 
92
98
  var _default = MusicPlayerWidget;
93
99
  exports.default = _default;
@@ -0,0 +1,115 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.default = void 0;
9
+
10
+ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
11
+
12
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
13
+
14
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
15
+
16
+ var _react = _interopRequireWildcard(require("react"));
17
+
18
+ var _styledComponents = _interopRequireDefault(require("styled-components"));
19
+
20
+ var _ReusableList = _interopRequireDefault(require("../../Reusable Components/ReusableList/ReusableList"));
21
+
22
+ var _ai = require("react-icons/ai");
23
+
24
+ var _bs = require("react-icons/bs");
25
+
26
+ var _ReactModal = _interopRequireDefault(require("../../Reusable Components/ReactModal/ReactModal"));
27
+
28
+ var _SpacesListPreview = _interopRequireDefault(require("../../PreviewComponents/SpacesListPreview/SpacesListPreview"));
29
+
30
+ var _CreateSpace = _interopRequireDefault(require("../../Forms/CreateSpace/CreateSpace"));
31
+
32
+ var _templateObject;
33
+
34
+ var _excluded = ["spaces"];
35
+
36
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
37
+
38
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
39
+
40
+ var SpacesListWidget = function SpacesListWidget(_ref) {
41
+ var spaces = _ref.spaces,
42
+ props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
43
+
44
+ var _useState = (0, _react.useState)(false),
45
+ _useState2 = (0, _slicedToArray2.default)(_useState, 2),
46
+ showCreateModal = _useState2[0],
47
+ setShowCreateModal = _useState2[1];
48
+
49
+ var _useState3 = (0, _react.useState)(false),
50
+ _useState4 = (0, _slicedToArray2.default)(_useState3, 2),
51
+ showConfigModal = _useState4[0],
52
+ setShowConfigModal = _useState4[1];
53
+
54
+ var listControls = [{
55
+ icon: /*#__PURE__*/_react.default.createElement(_ai.AiOutlineFileAdd, null),
56
+ action: 'add',
57
+ name: 'Create Space'
58
+ }, {
59
+ icon: /*#__PURE__*/_react.default.createElement(_bs.BsGear, null),
60
+ action: 'config',
61
+ name: 'Config'
62
+ }];
63
+
64
+ var onIconClicked = function onIconClicked(action) {
65
+ if (!props.preview) {
66
+ switch (action) {
67
+ case 'add':
68
+ setShowCreateModal(true);
69
+ break;
70
+
71
+ case 'config':
72
+ setShowConfigModal(true);
73
+ break;
74
+
75
+ default:
76
+ break;
77
+ }
78
+ }
79
+ };
80
+
81
+ return /*#__PURE__*/_react.default.createElement(Container, null, /*#__PURE__*/_react.default.createElement(_ReusableList.default, Object.assign({
82
+ listTitle: props.title || 'My Spaces',
83
+ type: "sectioned",
84
+ data: spaces,
85
+ iconClicked: onIconClicked,
86
+ listControls: listControls,
87
+ cardStyle: "card-style-3"
88
+ }, props)), /*#__PURE__*/_react.default.createElement(_ReactModal.default, {
89
+ modalIsOpen: showCreateModal,
90
+ closeModal: function closeModal() {
91
+ return setShowCreateModal(false);
92
+ },
93
+ exitModalButton: function exitModalButton(e) {
94
+ return /*#__PURE__*/_react.default.createElement("div", null);
95
+ }
96
+ }, /*#__PURE__*/_react.default.createElement(_CreateSpace.default, null)), /*#__PURE__*/_react.default.createElement(_ReactModal.default, {
97
+ modalIsOpen: showConfigModal,
98
+ closeModal: function closeModal() {
99
+ return setShowConfigModal(false);
100
+ },
101
+ exitModalButton: function exitModalButton(e) {
102
+ return /*#__PURE__*/_react.default.createElement("div", null);
103
+ }
104
+ }, /*#__PURE__*/_react.default.createElement(_SpacesListPreview.default, {
105
+ componentProps: {
106
+ spaces: spaces,
107
+ preview: true
108
+ }
109
+ })));
110
+ };
111
+
112
+ var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n \n"])));
113
+
114
+ var _default = SpacesListWidget;
115
+ exports.default = _default;
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.default = void 0;
9
+
10
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
11
+
12
+ var _react = _interopRequireDefault(require("react"));
13
+
14
+ var _ReusableList = _interopRequireDefault(require("../../Reusable Components/ReusableList/ReusableList"));
15
+
16
+ var _excluded = ["users"];
17
+
18
+ var UsersWidget = function UsersWidget(_ref) {
19
+ var users = _ref.users,
20
+ props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
21
+ return /*#__PURE__*/_react.default.createElement(_ReusableList.default, Object.assign({
22
+ listTitle: props.title || 'Members List',
23
+ cardStyle: "card-style-1",
24
+ data: users,
25
+ type: "flat"
26
+ }, props));
27
+ };
28
+
29
+ var _default = UsersWidget;
30
+ exports.default = _default;
@@ -43,6 +43,10 @@ var _Notes = _interopRequireDefault(require("../Library/Notes/Notes"));
43
43
 
44
44
  var _Folders = _interopRequireDefault(require("../Library/Folders/Folders"));
45
45
 
46
+ var _UsersWidget = _interopRequireDefault(require("../Widgets/UsersWidget/UsersWidget"));
47
+
48
+ var _SpacesListWidget = _interopRequireDefault(require("../Widgets/SpacesListWidget/SpacesListWidget"));
49
+
46
50
  var _Navbar = _interopRequireDefault(require("../Navbar/Navbar"));
47
51
 
48
52
  var _ViewAlbums = _interopRequireDefault(require("../Music Album/ViewAlbums/ViewAlbums"));
@@ -53,9 +57,21 @@ var _ViewAlbums2 = _interopRequireDefault(require("../Photo Album/ViewAlbums/Vie
53
57
 
54
58
  var _ViewAlbum2 = _interopRequireDefault(require("../Photo Album/ViewAlbum/ViewAlbum"));
55
59
 
60
+ var _Chat = _interopRequireDefault(require("../Chat/Chat"));
61
+
62
+ var _EventsList = _interopRequireDefault(require("../Events/EventsList/EventsList"));
63
+
64
+ var _Event = _interopRequireDefault(require("../Events/Event/Event"));
65
+
66
+ var _VideoSpace = _interopRequireDefault(require("../VideoAlbum/VideoSpace/VideoSpace"));
67
+
68
+ var _AlbumsGallery = _interopRequireDefault(require("../VideoAlbum/AlbumsGallery/AlbumsGallery"));
69
+
70
+ var _ViewAlbum3 = _interopRequireDefault(require("../VideoAlbum/ViewAlbum/ViewAlbum"));
71
+
56
72
  // Cards
57
73
  // Widgets
58
- // Components
74
+ // Preview Components
59
75
  var stringSearch = function stringSearch(str, word) {
60
76
  str = str.toUpperCase();
61
77
  word = word.toUpperCase();
@@ -196,7 +212,14 @@ var getWidgetType = function getWidgetType(widgetType, props, _cardClicked) {
196
212
  'logo': /*#__PURE__*/_react.default.createElement(_LogoWidget.default, props),
197
213
  'video player': /*#__PURE__*/_react.default.createElement(_VideoPlayer.default, props),
198
214
  'notes': /*#__PURE__*/_react.default.createElement(_Notes.default, props),
199
- 'folders': /*#__PURE__*/_react.default.createElement(_Folders.default, props)
215
+ 'folders': /*#__PURE__*/_react.default.createElement(_Folders.default, props),
216
+ 'users': /*#__PURE__*/_react.default.createElement(_UsersWidget.default, props),
217
+ 'profile': /*#__PURE__*/_react.default.createElement(_CardStyle2.default, props),
218
+ 'spaces-list': /*#__PURE__*/_react.default.createElement(_SpacesListWidget.default, Object.assign({
219
+ cardClicked: function cardClicked(path) {
220
+ return _cardClicked(path);
221
+ }
222
+ }, props))
200
223
  };
201
224
  return widgetTypes[widgetType];
202
225
  };
@@ -209,7 +232,17 @@ var getComponentType = function getComponentType(componentType, componentProps,
209
232
  'MusicAlbums': /*#__PURE__*/_react.default.createElement(_ViewAlbums.default, Object.assign({}, componentProps, stylingProps)),
210
233
  'MusicAlbum': /*#__PURE__*/_react.default.createElement(_ViewAlbum.default, Object.assign({}, componentProps, stylingProps)),
211
234
  'PhotoAlbum': /*#__PURE__*/_react.default.createElement(_ViewAlbum2.default, Object.assign({}, componentProps, stylingProps)),
212
- 'PhotoAlbums': /*#__PURE__*/_react.default.createElement(_ViewAlbums2.default, Object.assign({}, componentProps, stylingProps))
235
+ 'PhotoAlbums': /*#__PURE__*/_react.default.createElement(_ViewAlbums2.default, Object.assign({}, componentProps, stylingProps)),
236
+ 'MusicPlayer': /*#__PURE__*/_react.default.createElement(_MusicPlayerWidget.default, Object.assign({}, componentProps, stylingProps)),
237
+ 'Folders': /*#__PURE__*/_react.default.createElement(_Folders.default, Object.assign({}, componentProps, stylingProps)),
238
+ 'Notes': /*#__PURE__*/_react.default.createElement(_Notes.default, Object.assign({}, componentProps, stylingProps)),
239
+ 'Spaces-List': /*#__PURE__*/_react.default.createElement(_SpacesListWidget.default, Object.assign({}, componentProps, stylingProps)),
240
+ 'Chat': /*#__PURE__*/_react.default.createElement(_Chat.default, Object.assign({}, componentProps, stylingProps)),
241
+ 'Events': /*#__PURE__*/_react.default.createElement(_EventsList.default, Object.assign({}, componentProps, stylingProps)),
242
+ 'Event': /*#__PURE__*/_react.default.createElement(_Event.default, Object.assign({}, componentProps, stylingProps)),
243
+ 'Video-Space': /*#__PURE__*/_react.default.createElement(_VideoSpace.default, Object.assign({}, componentProps, stylingProps)),
244
+ 'Video-Albums': /*#__PURE__*/_react.default.createElement(_AlbumsGallery.default, Object.assign({}, componentProps, stylingProps)),
245
+ 'Video-Album': /*#__PURE__*/_react.default.createElement(_ViewAlbum3.default, Object.assign({}, componentProps, stylingProps))
213
246
  };
214
247
  return componentTypes[componentType];
215
248
  };