@mohamed-karawia/library 0.1.21 → 0.1.24

Sign up to get free protection for your applications and to get access to all the features.
Files changed (172) hide show
  1. package/dist/index.js +26 -26
  2. package/dist/stories/Chat/Chat.js +24 -31
  3. package/dist/stories/Community/Community.js +54 -34
  4. package/dist/stories/Events/Event/Event.js +12 -4
  5. package/dist/stories/Events/EventsList/EventsList.js +14 -7
  6. package/dist/stories/Forms/AddPhoto/AddPhoto.js +8 -7
  7. package/dist/stories/Forms/CreateEvent/CreateEvent.js +115 -0
  8. package/dist/stories/Forms/CreateFolder/CreateFolder.js +87 -0
  9. package/dist/stories/Forms/CreateSong/CreateSong.js +98 -0
  10. package/dist/stories/Library/Folders/Folders.js +27 -17
  11. package/dist/stories/Library/Notes/Notes.js +29 -18
  12. package/dist/stories/Modals/AddPhotoAlbum/AddPhotoAlbum.js +38 -0
  13. package/dist/stories/Modals/AddPhotoModal/AddPhotoModal.js +40 -0
  14. package/dist/stories/Modals/AddSongModal/AddSongModal.js +41 -0
  15. package/dist/stories/Modals/AddVideoAlbumModal/AddVideoAlbumModal.js +41 -0
  16. package/dist/stories/Modals/AddVideoModal/AddVideoModal.js +39 -0
  17. package/dist/stories/Modals/ChatConfigModal/ChatContifgModal.js +93 -0
  18. package/dist/stories/Modals/CreateEventModal/CreateEventModal.js +42 -0
  19. package/dist/stories/Modals/CreateFolderModal/CreateFolderModal.js +36 -0
  20. package/dist/stories/Modals/CreateMusicAlbumModal/CreateMusicAlbumModal.js +41 -0
  21. package/dist/stories/Modals/CreateNoteModal/CreateNoteModal.js +42 -0
  22. package/dist/stories/Modals/EventConfigModal/EventConfigModal.js +99 -0
  23. package/dist/stories/Modals/EventsConfigModal/EventsConfigModal.js +87 -0
  24. package/dist/stories/Modals/FoldersConfigModal/FoldersConfigModal.js +87 -0
  25. package/dist/stories/Modals/MusicAlbumConfigModal/MusicAlbumConfigModal.js +88 -0
  26. package/dist/stories/Modals/MusicAlbumsConfigModal/MusicAlbumsConfigModal.js +87 -0
  27. package/dist/stories/Modals/NotesConfigModal/NotesConfigModal.js +87 -0
  28. package/dist/stories/Modals/PhotoAlbumConfigModal/PhotoAlbumConfigModal.js +88 -0
  29. package/dist/stories/Modals/PhotoAlbumsConfigModal/PhotoAlbumsConfigModal.js +88 -0
  30. package/dist/stories/Modals/ShowImgModal/ShowImgModal.js +62 -0
  31. package/dist/stories/Modals/VideoAlbumConfigModal/VideoAlbumConfigModal.js +88 -0
  32. package/dist/stories/Modals/VideoAlbumsConfigModal/VideoAlbumsConfigModal.js +89 -0
  33. package/dist/stories/Modals/VideoConfigModal/VideoConfigModal.js +99 -0
  34. package/dist/stories/Music Album/ViewAlbum/ViewAlbum.js +8 -44
  35. package/dist/stories/Music Album/ViewAlbums/ViewAlbums.js +57 -37
  36. package/dist/stories/Pages/Chat/Chat.js +1 -1
  37. package/dist/stories/Pages/Events/Event/Event.js +1 -1
  38. package/dist/stories/Pages/Events/Events/Events.js +1 -1
  39. package/dist/stories/Pages/Library/Folders/Library.js +2 -2
  40. package/dist/stories/Pages/Library/Notes/Notes.js +2 -2
  41. package/dist/stories/Pages/Music/MusicAlbum/Music.js +2 -2
  42. package/dist/stories/Pages/Music/MusicAlbums/MusicAlbums.js +2 -2
  43. package/dist/stories/Pages/Photos/Album/Album.js +2 -2
  44. package/dist/stories/Pages/Photos/Albums/Albums.js +2 -2
  45. package/dist/stories/Pages/Video/DetailedVideo/DetailedVideo.js +2 -2
  46. package/dist/stories/Pages/Video/VideoAlbum/Video.js +2 -2
  47. package/dist/stories/Photo Album/ViewAlbum/ViewAlbum.js +26 -16
  48. package/dist/stories/Photo Album/ViewAlbums/ViewAlbums.js +11 -4
  49. package/dist/stories/PreviewComponents/ChatPreview/ChatPreview.js +7 -5
  50. package/dist/stories/PreviewComponents/EventPreview/EventPreview.js +7 -5
  51. package/dist/stories/PreviewComponents/EventsPreview/EventsPreview.js +7 -5
  52. package/dist/stories/PreviewComponents/FoldersPreview/FoldersPreview.js +7 -5
  53. package/dist/stories/PreviewComponents/MusicAlbumPreview/MusicAlbumPreview.js +6 -4
  54. package/dist/stories/PreviewComponents/MusicAlbumsPreview/MusicAlbumsPreview.js +8 -7
  55. package/dist/stories/PreviewComponents/MusicPlayerPreview/MusicPlayerPreview.js +7 -5
  56. package/dist/stories/PreviewComponents/NavbarPreview/NavbarPreview.js +7 -5
  57. package/dist/stories/PreviewComponents/NotesPreview/NotesPreview.js +7 -5
  58. package/dist/stories/PreviewComponents/PhotoAlbumPreview/PhotoAlbumPreview.js +7 -5
  59. package/dist/stories/PreviewComponents/PhotoAlbumsPreview/PhotoAlbumsPreview.js +7 -5
  60. package/dist/stories/PreviewComponents/SpacesListPreview/SpacesListPreview.js +7 -5
  61. package/dist/stories/PreviewComponents/VideoAlbumPreview/VideoAlbumPreview.js +7 -5
  62. package/dist/stories/PreviewComponents/VideoAlbumsPreview/VideoAlbumsPreview.js +7 -5
  63. package/dist/stories/PreviewComponents/VideoPreview/VideoPreview.js +7 -5
  64. package/dist/stories/Reusable Components/Comments/Comments.js +58 -0
  65. package/dist/stories/Reusable Components/Community/Community.js +12 -34
  66. package/dist/stories/Reusable Components/Sections/Sections.js +67 -0
  67. package/dist/stories/Spaces/Chat/Chat.js +103 -0
  68. package/dist/stories/Spaces/EventsList/EventsList.js +140 -0
  69. package/dist/stories/Spaces/NotesList/NotesList.js +144 -0
  70. package/dist/stories/Spaces/ViewDetailedPhoto/ViewDetailedPhoto.js +24 -0
  71. package/dist/stories/Spaces/ViewEvent/Event.js +146 -0
  72. package/dist/stories/Spaces/ViewFolders/ViewFolders.js +136 -0
  73. package/dist/stories/Spaces/ViewMusicAlbumList/ViewMusicAlbumList.js +136 -0
  74. package/dist/stories/Spaces/ViewMusicAlbums/ViewMusicAlbums.js +130 -0
  75. package/dist/stories/Spaces/ViewNote/ViewNote.js +27 -0
  76. package/dist/stories/Spaces/ViewPhotoAlbumList/ViewPhotoAlbumList.js +231 -0
  77. package/dist/stories/Spaces/ViewPhotoAlbums/ViewPhotoAlbums.js +131 -0
  78. package/dist/stories/Spaces/ViewVideo/ViewVideo.js +169 -0
  79. package/dist/stories/Spaces/ViewVideoAlbumList/ViewVideoAlbumList.js +157 -0
  80. package/dist/stories/Spaces/ViewVideoAlbums/ViewVideoAlbums.js +164 -0
  81. package/dist/stories/VideoAlbum/AlbumsGallery/AlbumsGallery.js +11 -4
  82. package/dist/stories/VideoAlbum/VideoSpace/VideoSpace.js +17 -6
  83. package/dist/stories/VideoAlbum/ViewAlbum/ViewAlbum.js +24 -25
  84. package/dist/stories/Widgets/VideoPlayer/VideoPlayer.js +235 -0
  85. package/dist/stories/helpers/util.js +24 -24
  86. package/dist/stories/store/actions/actions.js +16 -0
  87. package/dist/stories/store/communities.js +27 -29
  88. package/dist/stories/store/community.js +941 -0
  89. package/dist/stories/store/store.js +9 -4
  90. package/package.json +1 -1
  91. package/src/index.js +16 -16
  92. package/src/stories/Community/Community.jsx +31 -32
  93. package/src/stories/Forms/AddPhoto/AddPhoto.jsx +72 -72
  94. package/src/stories/{Events → Forms}/CreateEvent/CreateEvent.jsx +5 -1
  95. package/src/stories/{Library → Forms}/CreateFolder/CreateFolder.jsx +0 -0
  96. package/src/stories/Forms/{AddSong/AddSong.jsx → CreateSong/CreateSong.jsx} +0 -0
  97. package/src/stories/Modals/AddPhotoAlbum/AddPhotoAlbum.jsx +27 -0
  98. package/src/stories/Modals/AddPhotoModal/AddPhotoModal.jsx +29 -0
  99. package/src/stories/Modals/AddSongModal/AddSongModal.jsx +37 -0
  100. package/src/stories/Modals/AddVideoAlbumModal/AddVideoAlbumModal.jsx +38 -0
  101. package/src/stories/Modals/AddVideoModal/AddVideoModal.jsx +35 -0
  102. package/src/stories/Modals/ChatConfigModal/ChatContifgModal.jsx +77 -0
  103. package/src/stories/Modals/CreateEventModal/CreateEventModal.jsx +30 -0
  104. package/src/stories/Modals/CreateFolderModal/CreateFolderModal.jsx +39 -0
  105. package/src/stories/Modals/CreateMusicAlbumModal/CreateMusicAlbumModal.jsx +37 -0
  106. package/src/stories/Modals/CreateNoteModal/CreateNoteModal.jsx +43 -0
  107. package/src/stories/Modals/EventConfigModal/EventConfigModal.jsx +74 -0
  108. package/src/stories/Modals/EventsConfigModal/EventsConfigModal.jsx +67 -0
  109. package/src/stories/Modals/FoldersConfigModal/FoldersConfigModal.jsx +66 -0
  110. package/src/stories/Modals/MusicAlbumConfigModal/MusicAlbumConfigModal.jsx +69 -0
  111. package/src/stories/Modals/MusicAlbumsConfigModal/MusicAlbumsConfigModal.jsx +73 -0
  112. package/src/stories/Modals/NotesConfigModal/NotesConfigModal.jsx +65 -0
  113. package/src/stories/Modals/PhotoAlbumConfigModal/PhotoAlbumConfigModal.jsx +71 -0
  114. package/src/stories/Modals/PhotoAlbumsConfigModal/PhotoAlbumsConfigModal.jsx +69 -0
  115. package/src/stories/Modals/ShowImgModal/ShowImgModal.jsx +87 -0
  116. package/src/stories/Modals/VideoAlbumConfigModal/VideoAlbumConfigModal.jsx +67 -0
  117. package/src/stories/Modals/VideoAlbumsConfigModal/VideoAlbumsConfigModal.jsx +67 -0
  118. package/src/stories/Modals/VideoConfigModal/VideoConfigModal.jsx +78 -0
  119. package/src/stories/Pages/Chat/Chat.jsx +1 -1
  120. package/src/stories/Pages/Events/Event/Event.jsx +1 -1
  121. package/src/stories/Pages/Events/Events/Events.jsx +1 -1
  122. package/src/stories/Pages/Library/Folders/Library.jsx +1 -1
  123. package/src/stories/Pages/Library/Notes/Notes.jsx +1 -1
  124. package/src/stories/Pages/Music/MusicAlbum/Music.jsx +1 -1
  125. package/src/stories/Pages/Music/MusicAlbums/MusicAlbums.jsx +1 -1
  126. package/src/stories/Pages/Photos/Album/Album.jsx +1 -1
  127. package/src/stories/Pages/Photos/Albums/Albums.jsx +1 -1
  128. package/src/stories/Pages/Video/DetailedVideo/DetailedVideo.jsx +1 -1
  129. package/src/stories/Pages/Video/VideoAlbum/Video.jsx +1 -1
  130. package/src/stories/PreviewComponents/ChatPreview/ChatPreview.jsx +106 -104
  131. package/src/stories/PreviewComponents/EventPreview/EventPreview.jsx +7 -5
  132. package/src/stories/PreviewComponents/EventsPreview/EventsPreview.jsx +106 -104
  133. package/src/stories/PreviewComponents/FoldersPreview/FoldersPreview.jsx +8 -6
  134. package/src/stories/PreviewComponents/MusicAlbumPreview/MusicAlbumPreview.jsx +6 -4
  135. package/src/stories/PreviewComponents/MusicAlbumsPreview/MusicAlbumsPreview.jsx +13 -11
  136. package/src/stories/PreviewComponents/MusicPlayerPreview/MusicPlayerPreview.jsx +36 -34
  137. package/src/stories/PreviewComponents/NavbarPreview/NavbarPreview.jsx +18 -16
  138. package/src/stories/PreviewComponents/NotesPreview/NotesPreview.jsx +7 -5
  139. package/src/stories/PreviewComponents/PhotoAlbumPreview/PhotoAlbumPreview.jsx +105 -103
  140. package/src/stories/PreviewComponents/PhotoAlbumsPreview/PhotoAlbumsPreview.jsx +8 -6
  141. package/src/stories/PreviewComponents/SpacesListPreview/SpacesListPreview.jsx +10 -8
  142. package/src/stories/PreviewComponents/VideoAlbumPreview/VideoAlbumPreview.jsx +7 -5
  143. package/src/stories/PreviewComponents/VideoAlbumsPreview/VideoAlbumsPreview.jsx +7 -5
  144. package/src/stories/PreviewComponents/VideoPreview/VideoPreview.jsx +7 -5
  145. package/src/stories/{VideoAlbum → Reusable Components}/Comments/Comments.jsx +0 -0
  146. package/src/stories/Reusable Components/Community/Community.jsx +10 -33
  147. package/src/stories/{Sections/Sections.jsx → Reusable Components/Sections/Sections.jsx } +1 -1
  148. package/src/stories/Spaces/Chat/Chat.jsx +77 -0
  149. package/src/stories/Spaces/EventsList/EventsList.jsx +118 -0
  150. package/src/stories/Spaces/NotesList/NotesList.jsx +125 -0
  151. package/src/stories/{Photo Album/DetailedPhoto/DetailedPhoto.jsx → Spaces/ViewDetailedPhoto/ViewDetailedPhoto.jsx} +1 -1
  152. package/src/stories/{Events/Event → Spaces/ViewEvent}/Event.jsx +17 -73
  153. package/src/stories/Spaces/ViewFolders/ViewFolders.jsx +122 -0
  154. package/src/stories/Spaces/ViewMusicAlbumList/ViewMusicAlbumList.jsx +118 -0
  155. package/src/stories/Spaces/ViewMusicAlbums/ViewMusicAlbums.jsx +108 -0
  156. package/src/stories/{Library → Spaces}/ViewNote/ViewNote.jsx +0 -0
  157. package/src/stories/{Photo Album/ViewAlbum/ViewAlbum.jsx → Spaces/ViewPhotoAlbumList/ViewPhotoAlbumList.jsx} +48 -134
  158. package/src/stories/{Photo Album/ViewAlbums/ViewAlbums.jsx → Spaces/ViewPhotoAlbums/ViewPhotoAlbums.jsx} +22 -54
  159. package/src/stories/{VideoAlbum/VideoSpace/VideoSpace.jsx → Spaces/ViewVideo/ViewVideo.jsx} +21 -47
  160. package/src/stories/{VideoAlbum/ViewAlbum/ViewAlbum.jsx → Spaces/ViewVideoAlbumList/ViewVideoAlbumList.jsx} +31 -78
  161. package/src/stories/{VideoAlbum/AlbumsGallery/AlbumsGallery.jsx → Spaces/ViewVideoAlbums/ViewVideoAlbums.jsx} +20 -51
  162. package/src/stories/{VideoAlbum → Widgets}/VideoPlayer/VideoPlayer.jsx +0 -0
  163. package/src/stories/helpers/util.js +13 -13
  164. package/src/stories/store/actions/actions.js +7 -0
  165. package/src/stories/store/{communities.js → community.js} +27 -29
  166. package/src/stories/store/store.js +3 -4
  167. package/src/stories/Chat/Chat.jsx +0 -148
  168. package/src/stories/Events/EventsList/EventsList.jsx +0 -180
  169. package/src/stories/Library/Folders/Folders.jsx +0 -187
  170. package/src/stories/Library/Notes/Notes.jsx +0 -161
  171. package/src/stories/Music Album/ViewAlbum/ViewAlbum.jsx +0 -216
  172. package/src/stories/Music Album/ViewAlbums/ViewAlbums.jsx +0 -152
@@ -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 _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/defineProperty"));
13
+
14
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
15
+
16
+ var _react = _interopRequireDefault(require("react"));
17
+
18
+ var Yup = _interopRequireWildcard(require("yup"));
19
+
20
+ var _styledComponents = _interopRequireDefault(require("styled-components"));
21
+
22
+ var _reactRedux = require("react-redux");
23
+
24
+ var _ReusableForm = _interopRequireDefault(require("../../Reusable Components/ReusableForm/ReusableForm"));
25
+
26
+ var _TextField = _interopRequireDefault(require("../../Common Inputs/TextField/TextField"));
27
+
28
+ var _DatePicker = _interopRequireDefault(require("../../Common Inputs/DatePicker/DatePicker"));
29
+
30
+ var _CustomDropZone = _interopRequireDefault(require("../../Common Inputs/CustomDropzone/CustomDropZone"));
31
+
32
+ var _CustomTextarea = _interopRequireDefault(require("../../Common Inputs/CustomTextarea/CustomTextarea"));
33
+
34
+ var _templateObject;
35
+
36
+ var _excluded = ["saveBtnText", "cancelBtnText", "actions"];
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 CreateEvent = function CreateEvent(_ref) {
43
+ var _Object$assign;
44
+
45
+ var saveBtnText = _ref.saveBtnText,
46
+ cancelBtnText = _ref.cancelBtnText,
47
+ actions = _ref.actions,
48
+ props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
49
+ var dispatch = (0, _reactRedux.useDispatch)();
50
+ var initialValues = {
51
+ cover: null,
52
+ name: '',
53
+ disc: '',
54
+ date: {
55
+ startDate: null,
56
+ endDate: null
57
+ }
58
+ };
59
+ var formSchema = Yup.object().shape({
60
+ name: Yup.string().required("Required"),
61
+ disc: Yup.string().required("Required")
62
+ });
63
+ var sections = [{
64
+ title: "Create Event",
65
+ body: [/*#__PURE__*/_react.default.createElement(_CustomDropZone.default, {
66
+ label: "Cover",
67
+ name: "cover"
68
+ }), /*#__PURE__*/_react.default.createElement(_TextField.default, {
69
+ label: "Title",
70
+ name: "name"
71
+ }), /*#__PURE__*/_react.default.createElement(_CustomTextarea.default, {
72
+ label: "Discription",
73
+ name: "disc"
74
+ }), /*#__PURE__*/_react.default.createElement(_DatePicker.default, {
75
+ label: "Date Range",
76
+ name: "date"
77
+ })],
78
+ hideTitle: true
79
+ }];
80
+
81
+ var onCreate = function onCreate(values) {
82
+ var event = {
83
+ title: values.name,
84
+ date: "".concat(values.date.startDate._d.toISOString().split('T')[0], " : ").concat(values.date.endDate._d.toISOString().split('T')[0])
85
+ };
86
+ dispatch(actions.addEvent(event));
87
+ props.cancelHandler();
88
+ };
89
+
90
+ var cancelHandler = function cancelHandler() {
91
+ props.cancelHandler();
92
+ };
93
+
94
+ return /*#__PURE__*/_react.default.createElement(Container, null, /*#__PURE__*/_react.default.createElement(_ReusableForm.default, Object.assign((_Object$assign = {
95
+ formTitle: "Create Event",
96
+ initialValues: initialValues,
97
+ formSchema: formSchema,
98
+ sections: sections,
99
+ headerStyles: props.headerStyles,
100
+ saveBtnText: saveBtnText,
101
+ cancelBtnText: cancelBtnText,
102
+ saveHandler: onCreate,
103
+ cancelHandler: cancelHandler
104
+ }, (0, _defineProperty2.default)(_Object$assign, "headerStyles", {
105
+ padding: 10,
106
+ headerBackground: 'black',
107
+ titleColor: '#ffff'
108
+ }), (0, _defineProperty2.default)(_Object$assign, "sectionPadding", 10), (0, _defineProperty2.default)(_Object$assign, "bodyRowGap", 10), _Object$assign), props.formStyles)));
109
+ };
110
+
111
+ var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\n"])));
112
+
113
+ CreateEvent.defaultProps = {};
114
+ var _default = CreateEvent;
115
+ exports.default = _default;
@@ -0,0 +1,87 @@
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 _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/defineProperty"));
11
+
12
+ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
13
+
14
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
15
+
16
+ var _react = _interopRequireDefault(require("react"));
17
+
18
+ var Yup = _interopRequireWildcard(require("yup"));
19
+
20
+ var _ReusableForm = _interopRequireDefault(require("../../Reusable Components/ReusableForm/ReusableForm"));
21
+
22
+ var _TextField = _interopRequireDefault(require("../../Common Inputs/TextField/TextField"));
23
+
24
+ var _CustomTextarea = _interopRequireDefault(require("../../Common Inputs/CustomTextarea/CustomTextarea"));
25
+
26
+ var _excluded = ["saveBtnText", "cancelBtnText"];
27
+
28
+ 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); }
29
+
30
+ 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; }
31
+
32
+ var CreateFolder = function CreateFolder(_ref) {
33
+ var _Object$assign;
34
+
35
+ var saveBtnText = _ref.saveBtnText,
36
+ cancelBtnText = _ref.cancelBtnText,
37
+ props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
38
+ var initialValues = {
39
+ title: '',
40
+ description: ''
41
+ };
42
+ var formSchema = Yup.object().shape({
43
+ title: Yup.string().required("Required")
44
+ });
45
+ var sections = [{
46
+ title: "Folder Name",
47
+ body: [/*#__PURE__*/_react.default.createElement(_TextField.default, {
48
+ label: "Title",
49
+ name: "title"
50
+ }), /*#__PURE__*/_react.default.createElement(_CustomTextarea.default, {
51
+ label: "Discription",
52
+ name: "description"
53
+ })],
54
+ hideTitle: true
55
+ }];
56
+
57
+ var onCreate = function onCreate(values) {
58
+ var folder = (0, _objectSpread2.default)({}, values);
59
+ var date = new Date();
60
+ folder.date = date.toISOString().split('T')[0];
61
+ props.saveHandler(folder);
62
+ };
63
+
64
+ var cancelHandler = function cancelHandler() {
65
+ props.cancelHandler();
66
+ };
67
+
68
+ return /*#__PURE__*/_react.default.createElement(_ReusableForm.default, Object.assign((_Object$assign = {
69
+ formTitle: "Add Photo",
70
+ initialValues: initialValues,
71
+ formSchema: formSchema,
72
+ sections: sections,
73
+ headerStyles: props.headerStyles,
74
+ saveBtnText: saveBtnText,
75
+ cancelBtnText: cancelBtnText,
76
+ saveHandler: onCreate,
77
+ cancelHandler: cancelHandler
78
+ }, (0, _defineProperty2.default)(_Object$assign, "headerStyles", {
79
+ padding: 10,
80
+ headerBackground: 'black',
81
+ titleColor: '#ffff'
82
+ }), (0, _defineProperty2.default)(_Object$assign, "sectionPadding", 10), (0, _defineProperty2.default)(_Object$assign, "bodyRowGap", 10), _Object$assign), props.formStyles));
83
+ };
84
+
85
+ CreateFolder.defaultProps = {};
86
+ var _default = CreateFolder;
87
+ exports.default = _default;
@@ -0,0 +1,98 @@
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 _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
13
+
14
+ var _react = _interopRequireDefault(require("react"));
15
+
16
+ var Yup = _interopRequireWildcard(require("yup"));
17
+
18
+ var _styledComponents = _interopRequireDefault(require("styled-components"));
19
+
20
+ var _ReusableForm = _interopRequireDefault(require("../../Reusable Components/ReusableForm/ReusableForm"));
21
+
22
+ var _TextField = _interopRequireDefault(require("../../Common Inputs/TextField/TextField"));
23
+
24
+ var _CustomDropZone = _interopRequireDefault(require("../../Common Inputs/CustomDropzone/CustomDropZone"));
25
+
26
+ var _templateObject;
27
+
28
+ 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); }
29
+
30
+ 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; }
31
+
32
+ var AddSong = function AddSong(props) {
33
+ var initialValues = {
34
+ song: null,
35
+ cover: null,
36
+ title: '',
37
+ artist: ''
38
+ };
39
+ var formSchema = Yup.object().shape({
40
+ title: Yup.string().required("Required"),
41
+ artist: Yup.string().required('Required')
42
+ });
43
+ var sections = [{
44
+ title: "Announcment Details",
45
+ body: [/*#__PURE__*/_react.default.createElement(_CustomDropZone.default, {
46
+ fileType: "audio/*",
47
+ inputContent: "Insert Song",
48
+ label: "Upload Song",
49
+ name: "song"
50
+ }), /*#__PURE__*/_react.default.createElement(_CustomDropZone.default, {
51
+ inputContent: "Song Cover",
52
+ label: "Upload Cover",
53
+ name: "cover"
54
+ }), /*#__PURE__*/_react.default.createElement(_TextField.default, {
55
+ label: "Title",
56
+ name: "title"
57
+ }), /*#__PURE__*/_react.default.createElement(_TextField.default, {
58
+ label: "Artist",
59
+ name: "artist"
60
+ })],
61
+ hideTitle: true
62
+ }];
63
+
64
+ var onCreate = function onCreate(values) {
65
+ var album = (0, _objectSpread2.default)({}, values);
66
+ var date = new Date();
67
+ album.date = date;
68
+ props.saveHandler(album);
69
+ };
70
+
71
+ var cancelHandler = function cancelHandler() {
72
+ props.cancelHandler();
73
+ };
74
+
75
+ return /*#__PURE__*/_react.default.createElement(Container, null, /*#__PURE__*/_react.default.createElement(_ReusableForm.default, Object.assign({
76
+ formTitle: "Create Album",
77
+ initialValues: initialValues,
78
+ formSchema: formSchema,
79
+ sections: sections,
80
+ saveBtnText: props.saveBtnText,
81
+ cancelBtnText: props.cancelBtnText,
82
+ saveHandler: onCreate,
83
+ cancelHandler: cancelHandler,
84
+ headerStyles: {
85
+ padding: 10,
86
+ headerBackground: 'black',
87
+ titleColor: '#ffff'
88
+ },
89
+ sectionPadding: 10,
90
+ bodyRowGap: 10
91
+ }, props.formStyles)));
92
+ };
93
+
94
+ var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\n"])));
95
+
96
+ AddSong.defaultProps = {};
97
+ var _default = AddSong;
98
+ exports.default = _default;
@@ -37,7 +37,7 @@ var _Community = _interopRequireDefault(require("../../Reusable Components/Commu
37
37
 
38
38
  var _templateObject;
39
39
 
40
- var _excluded = ["folders", "folderTitle", "columnsNumber", "columnGap", "rowGap", "cardClicked", "iconColor"];
40
+ var _excluded = ["folders", "folderTitle", "columnsNumber", "columnGap", "rowGap", "cardClicked", "iconColor", "community"];
41
41
 
42
42
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
43
43
 
@@ -66,6 +66,7 @@ var Folders = function Folders(_ref) {
66
66
  rowGap = _ref.rowGap,
67
67
  cardClicked = _ref.cardClicked,
68
68
  iconColor = _ref.iconColor,
69
+ community = _ref.community,
69
70
  props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
70
71
 
71
72
  var _useState = (0, _react.useState)(false),
@@ -79,6 +80,7 @@ var Folders = function Folders(_ref) {
79
80
  setShowConfigModal = _useState4[1];
80
81
 
81
82
  var _useState5 = (0, _react.useState)( /*#__PURE__*/_react.default.createElement(Folders, {
83
+ preview: true,
82
84
  folders: folders
83
85
  })),
84
86
  _useState6 = (0, _slicedToArray2.default)(_useState5, 2),
@@ -87,6 +89,7 @@ var Folders = function Folders(_ref) {
87
89
 
88
90
  var formChanged = function formChanged(values) {
89
91
  setCenterContext( /*#__PURE__*/_react.default.createElement(Folders, Object.assign({
92
+ preview: true,
90
93
  folders: folders
91
94
  }, values)));
92
95
  };
@@ -109,18 +112,25 @@ var Folders = function Folders(_ref) {
109
112
  }]
110
113
  }];
111
114
 
112
- var onIconClicked = function onIconClicked(action) {
113
- switch (action) {
114
- case 'add':
115
- setShowModal(true);
116
- break;
117
-
118
- case 'config':
119
- setShowConfigModal(true);
120
- break;
115
+ var cancelConfig = function cancelConfig() {
116
+ setShowConfigModal(false);
117
+ localStorage.removeItem('formStyles');
118
+ };
121
119
 
122
- default:
123
- break;
120
+ var onIconClicked = function onIconClicked(action) {
121
+ if (!props.preview) {
122
+ switch (action) {
123
+ case 'add':
124
+ setShowModal(true);
125
+ break;
126
+
127
+ case 'config':
128
+ setShowConfigModal(true);
129
+ break;
130
+
131
+ default:
132
+ break;
133
+ }
124
134
  }
125
135
  };
126
136
 
@@ -163,24 +173,24 @@ var Folders = function Folders(_ref) {
163
173
  cancelHandler: cancelHandler
164
174
  })), /*#__PURE__*/_react.default.createElement(_ReactModal.default, {
165
175
  modalIsOpen: showConfigModal,
166
- closeModal: function closeModal() {
167
- return setShowConfigModal(false);
168
- },
176
+ closeModal: cancelConfig,
169
177
  exitModalButton: function exitModalButton(e) {
170
178
  return /*#__PURE__*/_react.default.createElement("div", null);
171
179
  }
172
180
  }, /*#__PURE__*/_react.default.createElement(_Tabs.default, {
173
- title: "Event Config",
181
+ title: "Folders Config",
174
182
  tabs: tabs
175
183
  }, /*#__PURE__*/_react.default.createElement(_FoldersPreview.default, {
176
184
  componentProps: {
177
185
  folders: folders,
178
- title: props.title || "Your Folders"
186
+ title: props.title || "Your Folders",
187
+ preview: true
179
188
  },
180
189
  formChanged: formChanged,
181
190
  id: "preview"
182
191
  }), /*#__PURE__*/_react.default.createElement(_Community.default, {
183
192
  center: centerContext,
193
+ community: community,
184
194
  id: "community"
185
195
  }))));
186
196
  };
@@ -37,7 +37,7 @@ var _Community = _interopRequireDefault(require("../../Reusable Components/Commu
37
37
 
38
38
  var _templateObject;
39
39
 
40
- var _excluded = ["notes", "iconColor", "cardTitleFontSize", "cardTitleColor", "cardPadding"];
40
+ var _excluded = ["notes", "iconColor", "cardTitleFontSize", "cardTitleColor", "cardPadding", "community"];
41
41
 
42
42
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
43
43
 
@@ -64,6 +64,7 @@ var Notes = function Notes(_ref) {
64
64
  cardTitleFontSize = _ref.cardTitleFontSize,
65
65
  cardTitleColor = _ref.cardTitleColor,
66
66
  cardPadding = _ref.cardPadding,
67
+ community = _ref.community,
67
68
  props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
68
69
 
69
70
  var _useState = (0, _react.useState)(false),
@@ -77,6 +78,7 @@ var Notes = function Notes(_ref) {
77
78
  setShowConfigModal = _useState4[1];
78
79
 
79
80
  var _useState5 = (0, _react.useState)( /*#__PURE__*/_react.default.createElement(Notes, {
81
+ preview: true,
80
82
  notes: notes
81
83
  })),
82
84
  _useState6 = (0, _slicedToArray2.default)(_useState5, 2),
@@ -85,6 +87,7 @@ var Notes = function Notes(_ref) {
85
87
 
86
88
  var formChanged = function formChanged(values) {
87
89
  setCenterContext( /*#__PURE__*/_react.default.createElement(Notes, Object.assign({
90
+ preview: true,
88
91
  notes: notes
89
92
  }, values)));
90
93
  };
@@ -108,17 +111,19 @@ var Notes = function Notes(_ref) {
108
111
  }];
109
112
 
110
113
  var onIconClicked = function onIconClicked(action) {
111
- switch (action) {
112
- case 'add':
113
- setShowModal(true);
114
- break;
115
-
116
- case 'config':
117
- setShowConfigModal(true);
118
- break;
119
-
120
- default:
121
- break;
114
+ if (!props.preview) {
115
+ switch (action) {
116
+ case 'add':
117
+ setShowModal(true);
118
+ break;
119
+
120
+ case 'config':
121
+ setShowConfigModal(true);
122
+ break;
123
+
124
+ default:
125
+ break;
126
+ }
122
127
  }
123
128
  };
124
129
 
@@ -139,6 +144,11 @@ var Notes = function Notes(_ref) {
139
144
  setShowModal(false);
140
145
  };
141
146
 
147
+ var cancelConfig = function cancelConfig() {
148
+ setShowConfigModal(false);
149
+ localStorage.removeItem('formStyles');
150
+ };
151
+
142
152
  return /*#__PURE__*/_react.default.createElement(Container, null, /*#__PURE__*/_react.default.createElement(_ReusableList.default, Object.assign({
143
153
  listTitle: props.title || "My Notes",
144
154
  data: notes,
@@ -164,23 +174,24 @@ var Notes = function Notes(_ref) {
164
174
  cancelHandler: cancelHandler
165
175
  })), /*#__PURE__*/_react.default.createElement(_ReactModal.default, {
166
176
  modalIsOpen: showConfigModal,
167
- closeModal: function closeModal() {
168
- return setShowConfigModal(false);
169
- },
177
+ closeModal: cancelConfig,
170
178
  exitModalButton: function exitModalButton(e) {
171
179
  return /*#__PURE__*/_react.default.createElement("div", null);
172
180
  }
173
181
  }, /*#__PURE__*/_react.default.createElement(_Tabs.default, {
174
- title: "Event Config",
182
+ title: "Notes Config",
175
183
  tabs: tabs
176
184
  }, /*#__PURE__*/_react.default.createElement(_NotesPreview.default, {
177
185
  componentProps: {
178
186
  notes: notes,
179
- title: props.title || "Your Notes"
187
+ title: props.title || "Your Notes",
188
+ preview: true
180
189
  },
181
- formChanged: formChanged
190
+ formChanged: formChanged,
191
+ id: "preview"
182
192
  }), /*#__PURE__*/_react.default.createElement(_Community.default, {
183
193
  center: centerContext,
194
+ community: community,
184
195
  id: "community"
185
196
  }))));
186
197
  };
@@ -0,0 +1,38 @@
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 _CreateAlbum = _interopRequireDefault(require("../../Forms/CreateAlbum/CreateAlbum"));
15
+
16
+ var _ReactModal = _interopRequireDefault(require("../../Reusable Components/ReactModal/ReactModal"));
17
+
18
+ var _excluded = ["showModal", "onAddAlbum", "closeModal"];
19
+
20
+ var AddPhotoAlbum = function AddPhotoAlbum(_ref) {
21
+ var showModal = _ref.showModal,
22
+ onAddAlbum = _ref.onAddAlbum,
23
+ closeModal = _ref.closeModal,
24
+ props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
25
+ return /*#__PURE__*/_react.default.createElement(_ReactModal.default, {
26
+ modalIsOpen: showModal,
27
+ closeModal: closeModal,
28
+ exitModalButton: function exitModalButton(e) {
29
+ return /*#__PURE__*/_react.default.createElement("div", null);
30
+ }
31
+ }, /*#__PURE__*/_react.default.createElement(_CreateAlbum.default, {
32
+ saveHandler: onAddAlbum,
33
+ cancelHandler: closeModal
34
+ }));
35
+ };
36
+
37
+ var _default = AddPhotoAlbum;
38
+ exports.default = _default;
@@ -0,0 +1,40 @@
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 _ReactModal = _interopRequireDefault(require("../../Reusable Components/ReactModal/ReactModal"));
15
+
16
+ var _AddPhoto = _interopRequireDefault(require("../../Forms/AddPhoto/AddPhoto"));
17
+
18
+ var _excluded = ["showModal", "onAddPhoto", "closeModal"];
19
+
20
+ var AddPhotoModal = function AddPhotoModal(_ref) {
21
+ var showModal = _ref.showModal,
22
+ onAddPhoto = _ref.onAddPhoto,
23
+ closeModal = _ref.closeModal,
24
+ props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
25
+ return /*#__PURE__*/_react.default.createElement(_ReactModal.default, {
26
+ modalIsOpen: showModal,
27
+ closeModal: closeModal,
28
+ exitModalButton: function exitModalButton(e) {
29
+ return /*#__PURE__*/_react.default.createElement("div", null);
30
+ }
31
+ }, /*#__PURE__*/_react.default.createElement(_AddPhoto.default, {
32
+ saveHandler: onAddPhoto,
33
+ cancelHandler: closeModal,
34
+ saveBtnText: props.saveBtnText || 'Add',
35
+ cancelBtnText: props.cancelBtnText || 'Cancel'
36
+ }));
37
+ };
38
+
39
+ var _default = AddPhotoModal;
40
+ exports.default = _default;
@@ -0,0 +1,41 @@
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 _ReactModal = _interopRequireDefault(require("../../Reusable Components/ReactModal/ReactModal"));
15
+
16
+ var _CreateSong = _interopRequireDefault(require("../../Forms/CreateSong/CreateSong"));
17
+
18
+ var _excluded = ["showModal", "closeModal", "onAddSong"];
19
+
20
+ var AddSongModal = function AddSongModal(_ref) {
21
+ var showModal = _ref.showModal,
22
+ closeModal = _ref.closeModal,
23
+ onAddSong = _ref.onAddSong,
24
+ props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
25
+ return /*#__PURE__*/_react.default.createElement(_ReactModal.default, {
26
+ modalIsOpen: showModal,
27
+ closeModal: closeModal,
28
+ exitModalButton: function exitModalButton(e) {
29
+ return /*#__PURE__*/_react.default.createElement("div", null);
30
+ }
31
+ }, /*#__PURE__*/_react.default.createElement(_CreateSong.default, {
32
+ saveHandler: onAddSong,
33
+ cancelHandler: closeModal,
34
+ saveBtnText: props.saveBtnText || "Create",
35
+ cancelBtnText: props.cancelBtnText || "Cancel"
36
+ }));
37
+ };
38
+
39
+ AddSongModal.defaultProps = {};
40
+ var _default = AddSongModal;
41
+ exports.default = _default;
@@ -0,0 +1,41 @@
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 _ReactModal = _interopRequireDefault(require("../../Reusable Components/ReactModal/ReactModal"));
15
+
16
+ var _CreateVideoAlbum = _interopRequireDefault(require("../../Forms/CreateVideoAlbum/CreateVideoAlbum"));
17
+
18
+ var _excluded = ["showModal", "onAddAlbum", "closeModal"];
19
+
20
+ var AddVideoAlbumModal = function AddVideoAlbumModal(_ref) {
21
+ var showModal = _ref.showModal,
22
+ onAddAlbum = _ref.onAddAlbum,
23
+ closeModal = _ref.closeModal,
24
+ props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
25
+ return /*#__PURE__*/_react.default.createElement(_ReactModal.default, {
26
+ modalIsOpen: showModal,
27
+ closeModal: closeModal,
28
+ exitModalButton: function exitModalButton(e) {
29
+ return /*#__PURE__*/_react.default.createElement("div", null);
30
+ }
31
+ }, /*#__PURE__*/_react.default.createElement(_CreateVideoAlbum.default, {
32
+ saveHandler: onAddAlbum,
33
+ cancelHandler: closeModal,
34
+ saveBtnText: "Create",
35
+ cancelBtnText: "Cancel"
36
+ }));
37
+ };
38
+
39
+ AddVideoAlbumModal.defaultProps = {};
40
+ var _default = AddVideoAlbumModal;
41
+ exports.default = _default;