@mohamed-karawia/library 0.1.15 → 0.1.19

Sign up to get free protection for your applications and to get access to all the features.
Files changed (147) hide show
  1. package/dist/stories/Chat/Chat.js +127 -33
  2. package/dist/stories/Common Inputs/EditorComponent/EditorComponent.js +4 -2
  3. package/dist/stories/Common Inputs/Picker/Picker.js +61 -0
  4. package/dist/stories/Common Inputs/TextField/TextField.js +3 -1
  5. package/dist/stories/Community/Community.js +137 -0
  6. package/dist/stories/Enrollment/Admin/CreateForm/CreateForm.js +1 -1
  7. package/dist/stories/Enrollment/Admin/DetailedForm/DetailedForm.js +11 -23
  8. package/dist/stories/Enrollment/Admin/ViewForms/ViewForms.js +2 -17
  9. package/dist/stories/Enrollment/Guest/FillForm/FillForm.js +4 -17
  10. package/dist/stories/Events/Event/Event.js +117 -5
  11. package/dist/stories/Events/EventsList/EventsList.js +98 -19
  12. package/dist/stories/Forms/CreateSpace/CreateSpace.js +75 -0
  13. package/dist/stories/Library/Folders/Folders.js +82 -7
  14. package/dist/stories/Library/Notes/Notes.js +78 -4
  15. package/dist/stories/Library/ViewNote/ViewNote.js +7 -10
  16. package/dist/stories/Modals/NavbarPreviewModal/NavbarPreviewModal.js +54 -0
  17. package/dist/stories/Music Album/ViewAlbum/ViewAlbum.js +139 -23
  18. package/dist/stories/Music Album/ViewAlbums/ViewAlbums.js +70 -34
  19. package/dist/stories/Navbar/Navbar.js +15 -45
  20. package/dist/stories/Pages/Chat/Chat.js +13 -1
  21. package/dist/stories/Pages/Enrollment/DetailedForm/DetailedForm.js +19 -1
  22. package/dist/stories/Pages/Enrollment/FillForm/FillForm.js +7 -1
  23. package/dist/stories/Pages/Enrollment/Forms/Forms.js +24 -2
  24. package/dist/stories/Pages/Events/Event/Event.js +14 -5
  25. package/dist/stories/Pages/Events/Events/Events.js +1 -0
  26. package/dist/stories/Pages/Library/Folders/Library.js +7 -1
  27. package/dist/stories/Pages/Music/MusicAlbum/Music.js +12 -5
  28. package/dist/stories/Pages/Music/MusicAlbums/MusicAlbums.js +34 -5
  29. package/dist/stories/Pages/Photos/Album/Album.js +7 -1
  30. package/dist/stories/Pages/Photos/Albums/Albums.js +38 -2
  31. package/dist/stories/Photo Album/ViewAlbum/ViewAlbum.js +80 -27
  32. package/dist/stories/Photo Album/ViewAlbums/ViewAlbums.js +85 -60
  33. package/dist/stories/Preview/Preview.js +37 -0
  34. package/dist/stories/PreviewComponents/ChatPreview/ChatPreview.js +193 -0
  35. package/dist/stories/PreviewComponents/EventPreview/EventPreview.js +158 -0
  36. package/dist/stories/PreviewComponents/EventsPreview/EventsPreview.js +192 -0
  37. package/dist/stories/PreviewComponents/FoldersPreview/FoldersPreview.js +182 -0
  38. package/dist/stories/PreviewComponents/MusicAlbumPreview/MusicAlbumPreview.js +177 -0
  39. package/dist/stories/PreviewComponents/MusicAlbumsPreview/MusicAlbumsPreview.js +181 -0
  40. package/dist/stories/PreviewComponents/MusicPlayerPreview/MusicPlayerPreview.js +153 -0
  41. package/dist/stories/PreviewComponents/NavbarPreview/NavbarPreview.js +112 -0
  42. package/dist/stories/PreviewComponents/NotesPreview/NotesPreview.js +173 -0
  43. package/dist/stories/PreviewComponents/PhotoAlbumPreview/PhotoAlbumPreview.js +189 -0
  44. package/dist/stories/PreviewComponents/PhotoAlbumsPreview/PhotoAlbumsPreview.js +189 -0
  45. package/dist/stories/PreviewComponents/SpacesListPreview/SpacesListPreview.js +197 -0
  46. package/dist/stories/PreviewComponents/VideoAlbumPreview/VideoAlbumPreview.js +189 -0
  47. package/dist/stories/PreviewComponents/VideoAlbumsPreview/VideoAlbumsPreview.js +175 -0
  48. package/dist/stories/PreviewComponents/VideoPreview/VideoPreview.js +172 -0
  49. package/dist/stories/PreviewComponents/globalStyles.js +26 -0
  50. package/dist/stories/Reusable Components/Cards/Card-style-10/CardStyle10.js +10 -5
  51. package/dist/stories/Reusable Components/Cards/Card-style-11/CardStyle11.js +8 -4
  52. package/dist/stories/Reusable Components/Cards/Card-style-3/CardStyle3.js +3 -2
  53. package/dist/stories/Reusable Components/Cards/Card-style-6/CardStyle6.js +10 -4
  54. package/dist/stories/Reusable Components/Cards/Card-style-8/CardStyle8.js +4 -2
  55. package/dist/stories/Reusable Components/Cards/Card-style-9/CardStyle9.js +26 -15
  56. package/dist/stories/Reusable Components/Cards/globalCardStyles.js +3 -3
  57. package/dist/stories/Reusable Components/Community/Community.js +76 -0
  58. package/dist/stories/Reusable Components/Gallery/Gallery.js +17 -18
  59. package/dist/stories/Reusable Components/ReactModal/ReactModal.js +11 -30
  60. package/dist/stories/Reusable Components/ReusableForm/ReusableForm.js +20 -3
  61. package/dist/stories/Reusable Components/ReusableList/ReusableList.js +15 -9
  62. package/dist/stories/Reusable Components/Tabs/Tabs.js +68 -0
  63. package/dist/stories/Sections/Sections.js +67 -0
  64. package/dist/stories/VideoAlbum/AlbumsGallery/AlbumsGallery.js +77 -18
  65. package/dist/stories/VideoAlbum/VideoSpace/VideoSpace.js +96 -3
  66. package/dist/stories/VideoAlbum/ViewAlbum/ViewAlbum.js +78 -5
  67. package/dist/stories/Widgets/MusicPlayerWidget/MusicPlayerWidget.js +17 -11
  68. package/dist/stories/Widgets/SpacesListWidget/SpacesListWidget.js +115 -0
  69. package/dist/stories/Widgets/UsersWidget/UsersWidget.js +30 -0
  70. package/dist/stories/helpers/util.js +70 -7
  71. package/dist/stories/store/communities.js +943 -0
  72. package/dist/stories/store/store.js +44 -0
  73. package/package.json +5 -2
  74. package/src/stories/Chat/Chat.jsx +109 -35
  75. package/src/stories/Common Inputs/EditorComponent/EditorComponent.jsx +3 -3
  76. package/src/stories/Common Inputs/Picker/Picker.jsx +47 -0
  77. package/src/stories/Common Inputs/TextField/TextField.jsx +1 -1
  78. package/src/stories/Community/Community.jsx +110 -0
  79. package/src/stories/Enrollment/Admin/CreateForm/CreateForm.jsx +1 -0
  80. package/src/stories/Enrollment/Admin/DetailedForm/DetailedForm.jsx +8 -19
  81. package/src/stories/Enrollment/Admin/ViewForms/ViewForms.jsx +3 -17
  82. package/src/stories/Enrollment/Guest/FillForm/FillForm.jsx +6 -16
  83. package/src/stories/Events/Event/Event.jsx +98 -5
  84. package/src/stories/Events/EventsList/EventsList.jsx +101 -22
  85. package/src/stories/Forms/CreateSpace/CreateSpace.jsx +73 -0
  86. package/src/stories/Library/Folders/Folders.jsx +82 -8
  87. package/src/stories/Library/Notes/Notes.jsx +65 -5
  88. package/src/stories/Library/ViewNote/ViewNote.jsx +1 -12
  89. package/src/stories/Modals/NavbarPreviewModal/NavbarPreviewModal.jsx +31 -0
  90. package/src/stories/Music Album/ViewAlbum/ViewAlbum.jsx +133 -21
  91. package/src/stories/Music Album/ViewAlbums/ViewAlbums.jsx +62 -36
  92. package/src/stories/Navbar/Navbar.jsx +51 -49
  93. package/src/stories/Pages/Chat/Chat.jsx +17 -4
  94. package/src/stories/Pages/Enrollment/DetailedForm/DetailedForm.jsx +20 -1
  95. package/src/stories/Pages/Enrollment/FillForm/FillForm.jsx +6 -0
  96. package/src/stories/Pages/Enrollment/Forms/Forms.jsx +23 -1
  97. package/src/stories/Pages/Events/Event/Event.jsx +12 -4
  98. package/src/stories/Pages/Events/Events/Events.jsx +75 -74
  99. package/src/stories/Pages/Library/Folders/Library.jsx +7 -1
  100. package/src/stories/Pages/Music/MusicAlbum/Music.jsx +16 -8
  101. package/src/stories/Pages/Music/MusicAlbums/MusicAlbums.jsx +28 -27
  102. package/src/stories/Pages/Photos/Album/Album.jsx +7 -1
  103. package/src/stories/Pages/Photos/Albums/Albums.jsx +25 -20
  104. package/src/stories/Photo Album/ViewAlbum/ViewAlbum.jsx +63 -21
  105. package/src/stories/Photo Album/ViewAlbums/ViewAlbums.jsx +65 -66
  106. package/src/stories/Preview/Preview.jsx +35 -0
  107. package/src/stories/PreviewComponents/ChatPreview/ChatPreview.jsx +132 -0
  108. package/src/stories/PreviewComponents/EventPreview/EventPreview.jsx +116 -0
  109. package/src/stories/PreviewComponents/EventsPreview/EventsPreview.jsx +132 -0
  110. package/src/stories/PreviewComponents/FoldersPreview/FoldersPreview.jsx +127 -0
  111. package/src/stories/PreviewComponents/MusicAlbumPreview/MusicAlbumPreview.jsx +124 -0
  112. package/src/stories/PreviewComponents/MusicAlbumsPreview/MusicAlbumsPreview.jsx +126 -0
  113. package/src/stories/PreviewComponents/MusicPlayerPreview/MusicPlayerPreview.jsx +113 -0
  114. package/src/stories/PreviewComponents/NavbarPreview/NavbarPreview.jsx +93 -0
  115. package/src/stories/PreviewComponents/NotesPreview/NotesPreview.jsx +122 -0
  116. package/src/stories/PreviewComponents/PhotoAlbumPreview/PhotoAlbumPreview.jsx +129 -0
  117. package/src/stories/PreviewComponents/PhotoAlbumsPreview/PhotoAlbumsPreview.jsx +129 -0
  118. package/src/stories/PreviewComponents/SpacesListPreview/SpacesListPreview.jsx +138 -0
  119. package/src/stories/PreviewComponents/VideoAlbumPreview/VideoAlbumPreview.jsx +129 -0
  120. package/src/stories/PreviewComponents/VideoAlbumsPreview/VideoAlbumsPreview.jsx +124 -0
  121. package/src/stories/PreviewComponents/VideoPreview/VideoPreview.jsx +125 -0
  122. package/src/stories/PreviewComponents/globalStyles.js +20 -0
  123. package/src/stories/Reusable Components/Cards/Card-style-10/CardStyle10.jsx +13 -6
  124. package/src/stories/Reusable Components/Cards/Card-style-11/CardStyle11.jsx +5 -5
  125. package/src/stories/Reusable Components/Cards/Card-style-3/CardStyle3.jsx +5 -2
  126. package/src/stories/Reusable Components/Cards/Card-style-6/CardStyle6.jsx +12 -6
  127. package/src/stories/Reusable Components/Cards/Card-style-8/CardStyle8.jsx +2 -2
  128. package/src/stories/Reusable Components/Cards/Card-style-9/CardStyle9.jsx +12 -8
  129. package/src/stories/Reusable Components/Cards/globalCardStyles.js +3 -2
  130. package/src/stories/Reusable Components/Community/Community.jsx +70 -0
  131. package/src/stories/Reusable Components/Gallery/Gallery.jsx +15 -10
  132. package/src/stories/Reusable Components/ReactModal/ReactModal.jsx +3 -25
  133. package/src/stories/Reusable Components/ReusableForm/ReusableForm.jsx +19 -7
  134. package/src/stories/Reusable Components/ReusableHeader/ReusableHeader.jsx +0 -2
  135. package/src/stories/Reusable Components/ReusableList/ReusableList.jsx +24 -8
  136. package/src/stories/Reusable Components/Tabs/Tabs.jsx +67 -0
  137. package/src/stories/Sections/Sections.jsx +56 -0
  138. package/src/stories/VideoAlbum/AlbumsGallery/AlbumsGallery.jsx +57 -16
  139. package/src/stories/VideoAlbum/VideoSpace/VideoSpace.jsx +70 -1
  140. package/src/stories/VideoAlbum/ViewAlbum/ViewAlbum.jsx +65 -8
  141. package/src/stories/Widgets/MusicPlayerWidget/MusicPlayerWidget.jsx +14 -7
  142. package/src/stories/Widgets/SpacesListWidget/SpacesListWidget.jsx +78 -0
  143. package/src/stories/Widgets/UsersWidget/UsersWidget.jsx +20 -0
  144. package/src/stories/helpers/util.js +50 -6
  145. package/src/stories/store/communities.js +705 -0
  146. package/src/stories/store/store.js +33 -0
  147. package/src/stories/styling.json +92 -0
@@ -23,8 +23,18 @@ var _ReactModal = _interopRequireDefault(require("../../Reusable Components/Reac
23
23
 
24
24
  var _CreateVideoAlbum = _interopRequireDefault(require("../../Forms/CreateVideoAlbum/CreateVideoAlbum"));
25
25
 
26
+ var _Tabs = _interopRequireDefault(require("../../Reusable Components/Tabs/Tabs"));
27
+
28
+ var _Sections = _interopRequireDefault(require("../../Sections/Sections"));
29
+
30
+ var _VideoAlbumsPreview = _interopRequireDefault(require("../../PreviewComponents/VideoAlbumsPreview/VideoAlbumsPreview"));
31
+
32
+ var _Community = _interopRequireDefault(require("../../Reusable Components/Community/Community"));
33
+
26
34
  var _ai = require("react-icons/ai");
27
35
 
36
+ var _bs = require("react-icons/bs");
37
+
28
38
  var _templateObject;
29
39
 
30
40
  var _excluded = ["videoAlbums", "cardBackgroundColor", "cardTitleColor", "cardTitleFontSize", "countColor", "countFontSize"];
@@ -42,6 +52,10 @@ var galleryControls = [{
42
52
  icon: /*#__PURE__*/_react.default.createElement(_ai.AiOutlineFileAdd, null),
43
53
  action: 'add',
44
54
  name: 'Add Album'
55
+ }, {
56
+ icon: /*#__PURE__*/_react.default.createElement(_bs.BsGear, null),
57
+ action: 'config',
58
+ name: 'Config'
45
59
  }];
46
60
 
47
61
  var AlbumsGallery = function AlbumsGallery(_ref) {
@@ -58,6 +72,31 @@ var AlbumsGallery = function AlbumsGallery(_ref) {
58
72
  showModal = _useState2[0],
59
73
  setShowModal = _useState2[1];
60
74
 
75
+ var _useState3 = (0, _react.useState)(false),
76
+ _useState4 = (0, _slicedToArray2.default)(_useState3, 2),
77
+ showConfigModal = _useState4[0],
78
+ setShowConfigModal = _useState4[1];
79
+
80
+ var _useState5 = (0, _react.useState)( /*#__PURE__*/_react.default.createElement(AlbumsGallery, {
81
+ videoAlbums: videoAlbums
82
+ })),
83
+ _useState6 = (0, _slicedToArray2.default)(_useState5, 2),
84
+ centerContext = _useState6[0],
85
+ setCenterContext = _useState6[1];
86
+
87
+ var formChanged = function formChanged(values) {
88
+ setCenterContext( /*#__PURE__*/_react.default.createElement(AlbumsGallery, Object.assign({
89
+ videoAlbums: videoAlbums
90
+ }, values)));
91
+ };
92
+
93
+ var tabs = [{
94
+ title: 'New',
95
+ id: 'preview'
96
+ }, {
97
+ title: 'Context',
98
+ id: 'community'
99
+ }];
61
100
  var cardStyles = {
62
101
  cardBackgroundColor: cardBackgroundColor,
63
102
  cardTitleColor: cardTitleColor,
@@ -83,13 +122,19 @@ var AlbumsGallery = function AlbumsGallery(_ref) {
83
122
  };
84
123
 
85
124
  var onIconClicked = function onIconClicked(action) {
86
- switch (action) {
87
- case 'add':
88
- setShowModal(true);
89
- break;
90
-
91
- default:
92
- break;
125
+ if (!props.preview) {
126
+ switch (action) {
127
+ case 'add':
128
+ setShowModal(true);
129
+ break;
130
+
131
+ case 'config':
132
+ setShowConfigModal(true);
133
+ break;
134
+
135
+ default:
136
+ break;
137
+ }
93
138
  }
94
139
  };
95
140
 
@@ -106,20 +151,12 @@ var AlbumsGallery = function AlbumsGallery(_ref) {
106
151
  setShowModal(false);
107
152
  };
108
153
 
109
- return /*#__PURE__*/_react.default.createElement(Container, null, /*#__PURE__*/_react.default.createElement(_Gallery.default, {
154
+ return /*#__PURE__*/_react.default.createElement(Container, null, /*#__PURE__*/_react.default.createElement(_Gallery.default, Object.assign({
110
155
  galleryTitle: "Video Albums",
111
156
  data: videoAlbums,
112
157
  type: "flat",
113
158
  cardStyle: "card-style-6",
114
159
  columnsNumber: 3,
115
- headerStyles: {
116
- padding: 10,
117
- headerBackground: '#FE1744',
118
- titleColor: '#ffff',
119
- controlsStyles: {
120
- iconSize: 25
121
- }
122
- },
123
160
  iconClicked: onIconClicked,
124
161
  galleryColumnGap: 10,
125
162
  galleryRowGap: 20,
@@ -130,7 +167,7 @@ var AlbumsGallery = function AlbumsGallery(_ref) {
130
167
  },
131
168
  cardIconClicked: cardIconClicked,
132
169
  customCardStyles: cardStyles
133
- }), /*#__PURE__*/_react.default.createElement(_ReactModal.default, {
170
+ }, props)), /*#__PURE__*/_react.default.createElement(_ReactModal.default, {
134
171
  modalIsOpen: showModal,
135
172
  closeModal: function closeModal() {
136
173
  return setShowModal(false);
@@ -141,7 +178,29 @@ var AlbumsGallery = function AlbumsGallery(_ref) {
141
178
  }, /*#__PURE__*/_react.default.createElement(_CreateVideoAlbum.default, {
142
179
  saveHandler: onAddAlbum,
143
180
  cancelHandler: cancelHandler
144
- })));
181
+ })), /*#__PURE__*/_react.default.createElement(_ReactModal.default, {
182
+ modalIsOpen: showConfigModal,
183
+ closeModal: function closeModal() {
184
+ return setShowConfigModal(false);
185
+ },
186
+ exitModalButton: function exitModalButton(e) {
187
+ return /*#__PURE__*/_react.default.createElement("div", null);
188
+ }
189
+ }, /*#__PURE__*/_react.default.createElement(_Tabs.default, {
190
+ title: "Video Gallery Config",
191
+ tabs: tabs,
192
+ id: "styling"
193
+ }, /*#__PURE__*/_react.default.createElement(_VideoAlbumsPreview.default, {
194
+ componentProps: {
195
+ videoAlbums: videoAlbums,
196
+ preview: true
197
+ },
198
+ formChanged: formChanged,
199
+ id: "preview"
200
+ }), /*#__PURE__*/_react.default.createElement(_Community.default, {
201
+ center: centerContext,
202
+ id: "community"
203
+ }))));
145
204
  };
146
205
 
147
206
  var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n \n"])));
@@ -9,22 +9,46 @@ exports.default = void 0;
9
9
 
10
10
  var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
11
11
 
12
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
13
+
12
14
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
13
15
 
14
- var _react = _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
  }
@@ -106,13 +160,10 @@ var ViewAlbum = function ViewAlbum(_ref) {
106
160
  };
107
161
 
108
162
  return /*#__PURE__*/_react.default.createElement(Container, null, /*#__PURE__*/_react.default.createElement(_Gallery.default, Object.assign({
109
- galleryTitle: "Video Album",
163
+ galleryTitle: props.title || "Video Album",
110
164
  data: album,
111
165
  type: "flat",
112
166
  cardStyle: "card-style-6",
113
- columnsNumber: 3,
114
- galleryColumnGap: 10,
115
- galleryRowGap: 20,
116
167
  galleryControls: galleryControls,
117
168
  iconClicked: onHeaderIconClicked,
118
169
  cardControls: cardControls,
@@ -129,7 +180,29 @@ var ViewAlbum = function ViewAlbum(_ref) {
129
180
  }, /*#__PURE__*/_react.default.createElement(_AddVideo.default, {
130
181
  saveHandler: onAddVideo,
131
182
  cancelHandler: cancelHandler
132
- })));
183
+ })), /*#__PURE__*/_react.default.createElement(_ReactModal.default, {
184
+ modalIsOpen: showConfigModal,
185
+ closeModal: function closeModal() {
186
+ return setShowConfigModal(false);
187
+ },
188
+ exitModalButton: function exitModalButton(e) {
189
+ return /*#__PURE__*/_react.default.createElement("div", null);
190
+ }
191
+ }, /*#__PURE__*/_react.default.createElement(_Tabs.default, {
192
+ title: "Video Album Config",
193
+ tabs: tabs,
194
+ id: "styling"
195
+ }, /*#__PURE__*/_react.default.createElement(_VideoAlbumPreview.default, {
196
+ componentProps: {
197
+ album: album,
198
+ preview: true
199
+ },
200
+ formChanged: formChanged,
201
+ id: "preview"
202
+ }), /*#__PURE__*/_react.default.createElement(_Community.default, {
203
+ center: centerContext,
204
+ id: "community"
205
+ }))));
133
206
  };
134
207
 
135
208
  var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\n"])));
@@ -19,7 +19,9 @@ var _reactH5AudioPlayer = _interopRequireDefault(require("react-h5-audio-player"
19
19
 
20
20
  require("react-h5-audio-player/lib/styles.css");
21
21
 
22
- var _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,13 +56,15 @@ var MusicPlayerWidget = function MusicPlayerWidget(_ref) {
52
56
  onClickNext: function onClickNext() {
53
57
  return props.nextSong();
54
58
  }
55
- }, props));
59
+ }, props)));
56
60
  };
57
61
 
58
- var 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
- return props.backgroundColor || 'inherit';
67
+ return props.backgroundColor || 'transparent';
62
68
  }, function (props) {
63
69
  return props.borderRadius ? props.borderRadius + 'px' : 'inherit';
64
70
  }, function (props) {
@@ -75,19 +81,19 @@ var MusicPlayer = (0, _styledComponents.default)(_reactH5AudioPlayer.default)(_t
75
81
  return props.primaryColor;
76
82
  });
77
83
 
78
- var Header = _styledComponents.default.header(_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;