@mohamed-karawia/library 0.1.21 → 0.1.22

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. package/dist/stories/Chat/Chat.js +24 -31
  2. package/dist/stories/Community/Community.js +37 -15
  3. package/dist/stories/Events/Event/Event.js +12 -4
  4. package/dist/stories/Events/EventsList/EventsList.js +14 -7
  5. package/dist/stories/Library/Folders/Folders.js +27 -17
  6. package/dist/stories/Library/Notes/Notes.js +29 -18
  7. package/dist/stories/Music Album/ViewAlbum/ViewAlbum.js +8 -44
  8. package/dist/stories/Music Album/ViewAlbums/ViewAlbums.js +57 -37
  9. package/dist/stories/Photo Album/ViewAlbum/ViewAlbum.js +26 -16
  10. package/dist/stories/Photo Album/ViewAlbums/ViewAlbums.js +11 -4
  11. package/dist/stories/PreviewComponents/ChatPreview/ChatPreview.js +1 -1
  12. package/dist/stories/PreviewComponents/EventPreview/EventPreview.js +1 -1
  13. package/dist/stories/PreviewComponents/EventsPreview/EventsPreview.js +1 -1
  14. package/dist/stories/PreviewComponents/FoldersPreview/FoldersPreview.js +1 -1
  15. package/dist/stories/PreviewComponents/MusicAlbumsPreview/MusicAlbumsPreview.js +1 -1
  16. package/dist/stories/PreviewComponents/MusicPlayerPreview/MusicPlayerPreview.js +1 -1
  17. package/dist/stories/PreviewComponents/NavbarPreview/NavbarPreview.js +1 -1
  18. package/dist/stories/PreviewComponents/NotesPreview/NotesPreview.js +1 -1
  19. package/dist/stories/PreviewComponents/PhotoAlbumPreview/PhotoAlbumPreview.js +1 -1
  20. package/dist/stories/PreviewComponents/PhotoAlbumsPreview/PhotoAlbumsPreview.js +1 -1
  21. package/dist/stories/PreviewComponents/SpacesListPreview/SpacesListPreview.js +1 -1
  22. package/dist/stories/PreviewComponents/VideoAlbumPreview/VideoAlbumPreview.js +1 -1
  23. package/dist/stories/PreviewComponents/VideoAlbumsPreview/VideoAlbumsPreview.js +1 -1
  24. package/dist/stories/PreviewComponents/VideoPreview/VideoPreview.js +1 -1
  25. package/dist/stories/Reusable Components/Community/Community.js +12 -34
  26. package/dist/stories/VideoAlbum/AlbumsGallery/AlbumsGallery.js +11 -4
  27. package/dist/stories/VideoAlbum/VideoSpace/VideoSpace.js +17 -6
  28. package/dist/stories/VideoAlbum/ViewAlbum/ViewAlbum.js +24 -25
  29. package/dist/stories/store/communities.js +27 -29
  30. package/package.json +1 -1
  31. package/src/stories/Chat/Chat.jsx +25 -19
  32. package/src/stories/Community/Community.jsx +14 -15
  33. package/src/stories/Events/Event/Event.jsx +11 -3
  34. package/src/stories/Events/EventsList/EventsList.jsx +11 -4
  35. package/src/stories/Library/Folders/Folders.jsx +23 -14
  36. package/src/stories/Library/Notes/Notes.jsx +25 -15
  37. package/src/stories/Music Album/ViewAlbum/ViewAlbum.jsx +17 -61
  38. package/src/stories/Music Album/ViewAlbums/ViewAlbums.jsx +44 -30
  39. package/src/stories/Photo Album/ViewAlbum/ViewAlbum.jsx +14 -5
  40. package/src/stories/Photo Album/ViewAlbums/ViewAlbums.jsx +10 -3
  41. package/src/stories/PreviewComponents/ChatPreview/ChatPreview.jsx +1 -1
  42. package/src/stories/PreviewComponents/EventPreview/EventPreview.jsx +1 -1
  43. package/src/stories/PreviewComponents/EventsPreview/EventsPreview.jsx +1 -1
  44. package/src/stories/PreviewComponents/FoldersPreview/FoldersPreview.jsx +1 -1
  45. package/src/stories/PreviewComponents/MusicAlbumsPreview/MusicAlbumsPreview.jsx +1 -1
  46. package/src/stories/PreviewComponents/MusicPlayerPreview/MusicPlayerPreview.jsx +1 -1
  47. package/src/stories/PreviewComponents/NavbarPreview/NavbarPreview.jsx +1 -1
  48. package/src/stories/PreviewComponents/NotesPreview/NotesPreview.jsx +1 -1
  49. package/src/stories/PreviewComponents/PhotoAlbumPreview/PhotoAlbumPreview.jsx +1 -1
  50. package/src/stories/PreviewComponents/PhotoAlbumsPreview/PhotoAlbumsPreview.jsx +1 -1
  51. package/src/stories/PreviewComponents/SpacesListPreview/SpacesListPreview.jsx +1 -1
  52. package/src/stories/PreviewComponents/VideoAlbumPreview/VideoAlbumPreview.jsx +1 -1
  53. package/src/stories/PreviewComponents/VideoAlbumsPreview/VideoAlbumsPreview.jsx +1 -1
  54. package/src/stories/PreviewComponents/VideoPreview/VideoPreview.jsx +1 -1
  55. package/src/stories/Reusable Components/Community/Community.jsx +10 -33
  56. package/src/stories/VideoAlbum/AlbumsGallery/AlbumsGallery.jsx +10 -3
  57. package/src/stories/VideoAlbum/VideoSpace/VideoSpace.jsx +10 -3
  58. package/src/stories/VideoAlbum/ViewAlbum/ViewAlbum.jsx +30 -34
  59. package/src/stories/store/communities.js +27 -29
@@ -35,7 +35,7 @@ var _Sections = _interopRequireDefault(require("../Sections/Sections"));
35
35
 
36
36
  var _templateObject;
37
37
 
38
- var _excluded = ["data", "users", "title", "backgroundColor"];
38
+ var _excluded = ["data", "users", "title", "backgroundColor", "community"];
39
39
 
40
40
  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); }
41
41
 
@@ -52,6 +52,7 @@ var Chat = function Chat(_ref) {
52
52
  users = _ref.users,
53
53
  title = _ref.title,
54
54
  backgroundColor = _ref.backgroundColor,
55
+ community = _ref.community,
55
56
  props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
56
57
 
57
58
  var _useState = (0, _react.useState)(false),
@@ -60,6 +61,7 @@ var Chat = function Chat(_ref) {
60
61
  setShowConfigModal = _useState2[1];
61
62
 
62
63
  var _useState3 = (0, _react.useState)( /*#__PURE__*/_react.default.createElement(Chat, {
64
+ preview: true,
63
65
  users: users,
64
66
  data: data
65
67
  })),
@@ -68,8 +70,8 @@ var Chat = function Chat(_ref) {
68
70
  setCenterContext = _useState4[1];
69
71
 
70
72
  var formChanged = function formChanged(values) {
71
- console.log('context changed');
72
73
  setCenterContext( /*#__PURE__*/_react.default.createElement(Chat, Object.assign({
74
+ preview: true,
73
75
  users: users,
74
76
  data: data
75
77
  }, values)));
@@ -81,14 +83,17 @@ var Chat = function Chat(_ref) {
81
83
  }, {
82
84
  title: 'Context',
83
85
  id: 'community'
84
- }];
85
- var sections = [{
86
- title: 'Styles',
87
- data: [{
88
- title: 'Styling',
89
- id: 'styling'
90
- }]
91
- }];
86
+ }]; // let sections = [
87
+ // {
88
+ // title: 'Styles',
89
+ // data: [
90
+ // {
91
+ // title: 'Styling',
92
+ // id: 'styling'
93
+ // }
94
+ // ]
95
+ // }
96
+ // ]
92
97
 
93
98
  var onIconClicked = function onIconClicked(action) {
94
99
  if (!props.preview) {
@@ -103,6 +108,11 @@ var Chat = function Chat(_ref) {
103
108
  }
104
109
  };
105
110
 
111
+ var cancelConfig = function cancelConfig() {
112
+ setShowConfigModal(false);
113
+ localStorage.removeItem('formStyles');
114
+ };
115
+
106
116
  return /*#__PURE__*/_react.default.createElement(Container, {
107
117
  backgroundColor: backgroundColor
108
118
  }, /*#__PURE__*/_react.default.createElement(_ReusableList.default, Object.assign({
@@ -116,29 +126,11 @@ var Chat = function Chat(_ref) {
116
126
  users: users
117
127
  }), /*#__PURE__*/_react.default.createElement(_ReactModal.default, {
118
128
  modalIsOpen: showConfigModal,
119
- closeModal: function closeModal() {
120
- return setShowConfigModal(false);
121
- },
129
+ closeModal: cancelConfig,
122
130
  exitModalButton: function exitModalButton(e) {
123
131
  return /*#__PURE__*/_react.default.createElement("div", null);
124
- }
125
- }, /*#__PURE__*/_react.default.createElement(_Sections.default, {
126
- sections: sections,
127
- backgroundColor: 'white',
128
- sectionHeaderStyles: {
129
- titleColor: 'white',
130
- headerBackground: 'transparent'
131
132
  },
132
- customCardStyles: {
133
- cardPadding: 6,
134
- cardTitleFontSize: 15,
135
- cardBackgroundColor: '#2c2c2c',
136
- cardTitleColor: 'white',
137
- onHoverBackgroundColor: '#555555',
138
- controlsStyles: {
139
- showOnHover: true
140
- }
141
- }
133
+ preview: true
142
134
  }, /*#__PURE__*/_react.default.createElement(_Tabs.default, {
143
135
  title: "Chat Config",
144
136
  tabs: tabs,
@@ -154,8 +146,9 @@ var Chat = function Chat(_ref) {
154
146
  id: "preview"
155
147
  }), /*#__PURE__*/_react.default.createElement(_Community.default, {
156
148
  center: centerContext,
149
+ community: community,
157
150
  id: "community"
158
- })))));
151
+ }))));
159
152
  };
160
153
 
161
154
  var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n background-color: ", ";\n"])), function (_ref2) {
@@ -84,7 +84,7 @@ var Community = function Community(props) {
84
84
  dispatch((0, _store.addEvent)(event));
85
85
  };
86
86
 
87
- console.log(space);
87
+ console.log(community);
88
88
 
89
89
  var eventIconClicked = function eventIconClicked(action, index) {
90
90
  switch (action) {
@@ -106,25 +106,47 @@ var Community = function Community(props) {
106
106
  widgetProps: (0, _objectSpread2.default)({
107
107
  listTitle: spacesWidget.listTitle,
108
108
  spaces: spacesWidget.spaces,
109
- cardClicked: switchSpace,
110
- headerStyles: spacesWidget.styles.header
111
- }, spacesWidget.styles.body)
109
+ cardClicked: switchSpace
110
+ }, spacesWidget.styles)
112
111
  })), /*#__PURE__*/_react.default.createElement(_Center.default, null, {
113
- 'chat': /*#__PURE__*/_react.default.createElement(_Chat.default, Object.assign({}, space.spaceProps, space.styles)),
114
- 'event': /*#__PURE__*/_react.default.createElement(_Event.default, Object.assign({}, space.spaceProps, space.styles)),
112
+ 'chat': /*#__PURE__*/_react.default.createElement(_Chat.default, Object.assign({
113
+ community: community
114
+ }, space.spaceProps, space.styles)),
115
+ 'event': /*#__PURE__*/_react.default.createElement(_Event.default, Object.assign({
116
+ community: community
117
+ }, space.spaceProps, space.styles)),
115
118
  'events_list': /*#__PURE__*/_react.default.createElement(_EventsList.default, Object.assign({
119
+ community: community,
116
120
  cardIconClicked: eventIconClicked,
117
121
  onAddEvent: onAddEvent
118
122
  }, space.spaceProps, space.styles)),
119
- 'folders': /*#__PURE__*/_react.default.createElement(_Folders.default, Object.assign({}, space.spaceProps, space.styles)),
120
- 'notes': /*#__PURE__*/_react.default.createElement(_Notes.default, Object.assign({}, space.spaceProps, space.styles)),
121
- 'music_album': /*#__PURE__*/_react.default.createElement(_ViewAlbum.default, Object.assign({}, space.spaceProps, space.styles)),
122
- 'music_albums': /*#__PURE__*/_react.default.createElement(_ViewAlbums.default, Object.assign({}, space.spaceProps, space.styles)),
123
- 'photo_album': /*#__PURE__*/_react.default.createElement(_ViewAlbum2.default, Object.assign({}, space.spaceProps, space.styles)),
124
- 'photo_albums': /*#__PURE__*/_react.default.createElement(_ViewAlbums2.default, Object.assign({}, space.spaceProps, space.styles)),
125
- 'video_albums': /*#__PURE__*/_react.default.createElement(_AlbumsGallery.default, Object.assign({}, space.spaceProps, space.styles)),
126
- 'video_album': /*#__PURE__*/_react.default.createElement(_ViewAlbum3.default, Object.assign({}, space.spaceProps, space.styles)),
127
- 'video_space': /*#__PURE__*/_react.default.createElement(_VideoSpace.default, Object.assign({}, space.spaceProps, space.styles))
123
+ 'folders': /*#__PURE__*/_react.default.createElement(_Folders.default, Object.assign({
124
+ community: community
125
+ }, space.spaceProps, space.styles)),
126
+ 'notes': /*#__PURE__*/_react.default.createElement(_Notes.default, Object.assign({
127
+ community: community
128
+ }, space.spaceProps, space.styles)),
129
+ 'music_album': /*#__PURE__*/_react.default.createElement(_ViewAlbum.default, Object.assign({
130
+ community: community
131
+ }, space.spaceProps, space.styles)),
132
+ 'music_albums': /*#__PURE__*/_react.default.createElement(_ViewAlbums.default, Object.assign({
133
+ community: community
134
+ }, space.spaceProps, space.styles)),
135
+ 'photo_album': /*#__PURE__*/_react.default.createElement(_ViewAlbum2.default, Object.assign({
136
+ community: community
137
+ }, space.spaceProps, space.styles)),
138
+ 'photo_albums': /*#__PURE__*/_react.default.createElement(_ViewAlbums2.default, Object.assign({
139
+ community: community
140
+ }, space.spaceProps, space.styles)),
141
+ 'video_albums': /*#__PURE__*/_react.default.createElement(_AlbumsGallery.default, Object.assign({
142
+ community: community
143
+ }, space.spaceProps, space.styles)),
144
+ 'video_album': /*#__PURE__*/_react.default.createElement(_ViewAlbum3.default, Object.assign({
145
+ community: community
146
+ }, space.spaceProps, space.styles)),
147
+ 'video_space': /*#__PURE__*/_react.default.createElement(_VideoSpace.default, Object.assign({
148
+ community: community
149
+ }, space.spaceProps, space.styles))
128
150
  }[spaceType]), /*#__PURE__*/_react.default.createElement(_Right.default, null, space.widgets && space.widgets.map(function (widget) {
129
151
  return /*#__PURE__*/_react.default.createElement(_WidgetContainer.default, {
130
152
  widgetType: widget.widgetType,
@@ -35,7 +35,7 @@ var _Community = _interopRequireDefault(require("../../Reusable Components/Commu
35
35
 
36
36
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
37
37
 
38
- var _excluded = ["cover", "title", "date", "disc", "backgroundColor", "titleColor", "titleSize", "dateColor", "dateSize", "discColor", "discSize", "headerStyles"];
38
+ var _excluded = ["cover", "title", "date", "disc", "backgroundColor", "titleColor", "titleSize", "dateColor", "dateSize", "discColor", "discSize", "headerStyles", "community"];
39
39
 
40
40
  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); }
41
41
 
@@ -61,6 +61,7 @@ var Event = function Event(_ref) {
61
61
  discColor = _ref.discColor,
62
62
  discSize = _ref.discSize,
63
63
  headerStyles = _ref.headerStyles,
64
+ community = _ref.community,
64
65
  props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
65
66
 
66
67
  var _useState = (0, _react.useState)(false),
@@ -69,6 +70,7 @@ var Event = function Event(_ref) {
69
70
  setShowConfigModal = _useState2[1];
70
71
 
71
72
  var _useState3 = (0, _react.useState)( /*#__PURE__*/_react.default.createElement(Event, {
73
+ preview: true,
72
74
  title: title,
73
75
  cover: cover,
74
76
  date: date,
@@ -80,6 +82,7 @@ var Event = function Event(_ref) {
80
82
 
81
83
  var formChanged = function formChanged(values) {
82
84
  setCenterContext( /*#__PURE__*/_react.default.createElement(Event, Object.assign({
85
+ preview: true,
83
86
  title: title,
84
87
  cover: cover,
85
88
  date: date,
@@ -115,6 +118,11 @@ var Event = function Event(_ref) {
115
118
  }
116
119
  };
117
120
 
121
+ var cancelConfig = function cancelConfig() {
122
+ setShowConfigModal(false);
123
+ localStorage.removeItem('formStyles');
124
+ };
125
+
118
126
  return /*#__PURE__*/_react.default.createElement(Container, {
119
127
  backgroundColor: backgroundColor
120
128
  }, /*#__PURE__*/_react.default.createElement(_ReusableHeader.default, Object.assign({
@@ -134,9 +142,7 @@ var Event = function Event(_ref) {
134
142
  discSize: discSize
135
143
  }, disc)), /*#__PURE__*/_react.default.createElement(_ReactModal.default, {
136
144
  modalIsOpen: showConfigModal,
137
- closeModal: function closeModal() {
138
- return setShowConfigModal(false);
139
- },
145
+ closeModal: cancelConfig,
140
146
  exitModalButton: function exitModalButton(e) {
141
147
  return /*#__PURE__*/_react.default.createElement("div", null);
142
148
  }
@@ -155,6 +161,8 @@ var Event = function Event(_ref) {
155
161
  id: "preview"
156
162
  }), /*#__PURE__*/_react.default.createElement(_Community.default, {
157
163
  center: centerContext,
164
+ community: community,
165
+ preview: true,
158
166
  id: "community"
159
167
  }))));
160
168
  };
@@ -37,7 +37,7 @@ var _Community = _interopRequireDefault(require("../../Reusable Components/Commu
37
37
 
38
38
  var _templateObject;
39
39
 
40
- var _excluded = ["events"];
40
+ var _excluded = ["events", "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
 
@@ -60,6 +60,7 @@ var cardControls = [{
60
60
 
61
61
  var EventsList = function EventsList(_ref) {
62
62
  var events = _ref.events,
63
+ community = _ref.community,
63
64
  props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
64
65
 
65
66
  var _useState = (0, _react.useState)(false),
@@ -72,15 +73,17 @@ var EventsList = function EventsList(_ref) {
72
73
  showConfigModal = _useState4[0],
73
74
  setShowConfigModal = _useState4[1];
74
75
 
75
- var _useState5 = (0, _react.useState)( /*#__PURE__*/_react.default.createElement(EventsList, {
76
+ var _useState5 = (0, _react.useState)( /*#__PURE__*/_react.default.createElement(EventsList, Object.assign({
77
+ preview: true,
76
78
  events: events
77
- })),
79
+ }, props))),
78
80
  _useState6 = (0, _slicedToArray2.default)(_useState5, 2),
79
81
  centerContext = _useState6[0],
80
82
  setCenterContext = _useState6[1];
81
83
 
82
84
  var formChanged = function formChanged(values) {
83
85
  setCenterContext( /*#__PURE__*/_react.default.createElement(EventsList, Object.assign({
86
+ preview: true,
84
87
  events: events
85
88
  }, values)));
86
89
  };
@@ -138,6 +141,11 @@ var EventsList = function EventsList(_ref) {
138
141
  props.onAddEvent(event);
139
142
  };
140
143
 
144
+ var cancelConfig = function cancelConfig() {
145
+ setShowConfigModal(false);
146
+ localStorage.removeItem('formStyles');
147
+ };
148
+
141
149
  return /*#__PURE__*/_react.default.createElement(Container, null, /*#__PURE__*/_react.default.createElement(_ReusableList.default, Object.assign({
142
150
  listTitle: props.title || "My Events",
143
151
  data: events,
@@ -163,14 +171,12 @@ var EventsList = function EventsList(_ref) {
163
171
  cancelHandler: cancelHandler
164
172
  })), /*#__PURE__*/_react.default.createElement(_ReactModal.default, {
165
173
  modalIsOpen: showConfigModal,
166
- closeModal: function closeModal() {
167
- return setShowConfigModal(false);
168
- },
174
+ closeModal: cancelConfig,
169
175
  exitModalButton: function exitModalButton(e) {
170
176
  return /*#__PURE__*/_react.default.createElement("div", null);
171
177
  }
172
178
  }, /*#__PURE__*/_react.default.createElement(_Tabs.default, {
173
- title: "Event Config",
179
+ title: "Events Config",
174
180
  tabs: tabs
175
181
  }, /*#__PURE__*/_react.default.createElement(_EventsPreview.default, {
176
182
  componentProps: {
@@ -182,6 +188,7 @@ var EventsList = function EventsList(_ref) {
182
188
  id: "preview"
183
189
  }), /*#__PURE__*/_react.default.createElement(_Community.default, {
184
190
  center: centerContext,
191
+ community: community,
185
192
  id: "community"
186
193
  }))));
187
194
  };
@@ -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
  };
@@ -41,7 +41,7 @@ var _constatnts = require("../../Pages/ViewWorld/constatnts");
41
41
 
42
42
  var _templateObject;
43
43
 
44
- var _excluded = ["album", "cardBackgroundColor", "songTitleColor"];
44
+ var _excluded = ["album", "cardBackgroundColor", "songTitleColor", "community"];
45
45
 
46
46
  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); }
47
47
 
@@ -67,6 +67,7 @@ var ViewAlbum = function ViewAlbum(_ref) {
67
67
  var album = _ref.album,
68
68
  cardBackgroundColor = _ref.cardBackgroundColor,
69
69
  songTitleColor = _ref.songTitleColor,
70
+ community = _ref.community,
70
71
  props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
71
72
 
72
73
  var _useState = (0, _react.useState)(false),
@@ -80,6 +81,7 @@ var ViewAlbum = function ViewAlbum(_ref) {
80
81
  setShowConfigModal = _useState4[1];
81
82
 
82
83
  var _useState5 = (0, _react.useState)( /*#__PURE__*/_react.default.createElement(ViewAlbum, {
84
+ preview: true,
83
85
  album: album
84
86
  })),
85
87
  _useState6 = (0, _slicedToArray2.default)(_useState5, 2),
@@ -89,6 +91,7 @@ var ViewAlbum = function ViewAlbum(_ref) {
89
91
  var formChanged = function formChanged(values) {
90
92
  console.log('context changed');
91
93
  setCenterContext( /*#__PURE__*/_react.default.createElement(ViewAlbum, Object.assign({
94
+ preview: true,
92
95
  album: album
93
96
  }, values)));
94
97
  };
@@ -174,27 +177,9 @@ var ViewAlbum = function ViewAlbum(_ref) {
174
177
  exitModalButton: function exitModalButton(e) {
175
178
  return /*#__PURE__*/_react.default.createElement("div", null);
176
179
  }
177
- }, /*#__PURE__*/_react.default.createElement(_Sections.default, {
178
- sections: sections,
179
- backgroundColor: 'white',
180
- sectionHeaderStyles: {
181
- titleColor: 'white',
182
- headerBackground: 'transparent'
183
- },
184
- customCardStyles: {
185
- cardPadding: 6,
186
- cardTitleFontSize: 15,
187
- cardBackgroundColor: '#2c2c2c',
188
- cardTitleColor: 'white',
189
- onHoverBackgroundColor: '#555555',
190
- controlsStyles: {
191
- showOnHover: true
192
- }
193
- }
194
180
  }, /*#__PURE__*/_react.default.createElement(_Tabs.default, {
195
- title: "Music Album Config",
196
- tabs: tabs,
197
- id: "styling"
181
+ title: "Album Config",
182
+ tabs: tabs
198
183
  }, /*#__PURE__*/_react.default.createElement(_MusicAlbumPreview.default, {
199
184
  componentProps: {
200
185
  album: album,
@@ -204,31 +189,10 @@ var ViewAlbum = function ViewAlbum(_ref) {
204
189
  formChanged: formChanged,
205
190
  id: "preview"
206
191
  }), /*#__PURE__*/_react.default.createElement(_Community.default, {
207
- right: /*#__PURE__*/_react.default.createElement(_WidgetContainer.default, {
208
- widgetType: "music player",
209
- widgetProps: {
210
- playlist: album,
211
- currentSong: 1
212
- }
213
- }),
214
- left: /*#__PURE__*/_react.default.createElement(_WidgetContainer.default, {
215
- widgetType: "spaces-list",
216
- widgetProps: {
217
- listTitle: 'Your Spaces',
218
- type: 'sectioned',
219
- spaces: _constatnts.SPACES,
220
- cardStyle: 'card-style-3',
221
- cardClicked: function cardClicked() {
222
- return alert('clicked');
223
- } // headerStyles: styles.widgetContainer.header,
224
- // sectionHeaderStyles: styles.widgetContainer.body.sectionHeaderStyles,
225
- // customCardStyles: styles.widgetContainer.body.customCardStyles,
226
-
227
- }
228
- }),
229
192
  center: centerContext,
193
+ community: community,
230
194
  id: "community"
231
- })))));
195
+ }))));
232
196
  };
233
197
 
234
198
  var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n"])));