@mohamed-karawia/library 0.1.18 → 0.1.22

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. package/dist/stories/Chat/Chat.js +114 -4
  2. package/dist/stories/Common Inputs/Picker/Picker.js +61 -0
  3. package/dist/stories/Common Inputs/TextField/TextField.js +3 -1
  4. package/dist/stories/Community/Community.js +159 -0
  5. package/dist/stories/Events/Event/Event.js +123 -4
  6. package/dist/stories/Events/EventsList/EventsList.js +98 -16
  7. package/dist/stories/Forms/CreateSpace/CreateSpace.js +75 -0
  8. package/dist/stories/Library/Folders/Folders.js +94 -9
  9. package/dist/stories/Library/Notes/Notes.js +94 -9
  10. package/dist/stories/Modals/NavbarPreviewModal/NavbarPreviewModal.js +54 -0
  11. package/dist/stories/Music Album/ViewAlbum/ViewAlbum.js +98 -10
  12. package/dist/stories/Music Album/ViewAlbums/ViewAlbums.js +96 -34
  13. package/dist/stories/Navbar/Navbar.js +1 -1
  14. package/dist/stories/Pages/Events/Event/Event.js +14 -5
  15. package/dist/stories/Pages/Music/MusicAlbums/MusicAlbums.js +2 -15
  16. package/dist/stories/Photo Album/ViewAlbum/ViewAlbum.js +94 -17
  17. package/dist/stories/Photo Album/ViewAlbums/ViewAlbums.js +88 -10
  18. package/dist/stories/Preview/Preview.js +1 -0
  19. package/dist/stories/PreviewComponents/ChatPreview/ChatPreview.js +193 -0
  20. package/dist/stories/PreviewComponents/EventPreview/EventPreview.js +158 -0
  21. package/dist/stories/PreviewComponents/EventsPreview/EventsPreview.js +192 -0
  22. package/dist/stories/PreviewComponents/FoldersPreview/FoldersPreview.js +182 -0
  23. package/dist/stories/PreviewComponents/MusicAlbumPreview/MusicAlbumPreview.js +177 -0
  24. package/dist/stories/PreviewComponents/MusicAlbumsPreview/MusicAlbumsPreview.js +181 -0
  25. package/dist/stories/PreviewComponents/MusicPlayerPreview/MusicPlayerPreview.js +153 -0
  26. package/dist/stories/PreviewComponents/NavbarPreview/NavbarPreview.js +112 -0
  27. package/dist/stories/PreviewComponents/NotesPreview/NotesPreview.js +173 -0
  28. package/dist/stories/PreviewComponents/PhotoAlbumPreview/PhotoAlbumPreview.js +189 -0
  29. package/dist/stories/PreviewComponents/PhotoAlbumsPreview/PhotoAlbumsPreview.js +189 -0
  30. package/dist/stories/PreviewComponents/SpacesListPreview/SpacesListPreview.js +197 -0
  31. package/dist/stories/PreviewComponents/VideoAlbumPreview/VideoAlbumPreview.js +189 -0
  32. package/dist/stories/PreviewComponents/VideoAlbumsPreview/VideoAlbumsPreview.js +175 -0
  33. package/dist/stories/PreviewComponents/VideoPreview/VideoPreview.js +172 -0
  34. package/dist/stories/PreviewComponents/globalStyles.js +26 -0
  35. package/dist/stories/Reusable Components/Cards/Card-style-10/CardStyle10.js +4 -3
  36. package/dist/stories/Reusable Components/Cards/Card-style-11/CardStyle11.js +8 -4
  37. package/dist/stories/Reusable Components/Cards/Card-style-6/CardStyle6.js +10 -4
  38. package/dist/stories/Reusable Components/Cards/Card-style-8/CardStyle8.js +4 -2
  39. package/dist/stories/Reusable Components/Cards/globalCardStyles.js +2 -2
  40. package/dist/stories/Reusable Components/Community/Community.js +53 -0
  41. package/dist/stories/Reusable Components/Gallery/Gallery.js +12 -17
  42. package/dist/stories/Reusable Components/ReactModal/ReactModal.js +11 -30
  43. package/dist/stories/Reusable Components/ReusableForm/ReusableForm.js +19 -2
  44. package/dist/stories/Reusable Components/ReusableList/ReusableList.js +9 -5
  45. package/dist/stories/Reusable Components/Tabs/Tabs.js +68 -0
  46. package/dist/stories/Sections/Sections.js +8 -2
  47. package/dist/stories/VideoAlbum/AlbumsGallery/AlbumsGallery.js +85 -19
  48. package/dist/stories/VideoAlbum/VideoSpace/VideoSpace.js +108 -4
  49. package/dist/stories/VideoAlbum/ViewAlbum/ViewAlbum.js +84 -9
  50. package/dist/stories/Widgets/MusicPlayerWidget/MusicPlayerWidget.js +16 -10
  51. package/dist/stories/Widgets/SpacesListWidget/SpacesListWidget.js +115 -0
  52. package/dist/stories/Widgets/UsersWidget/UsersWidget.js +30 -0
  53. package/dist/stories/helpers/util.js +36 -3
  54. package/dist/stories/store/communities.js +941 -0
  55. package/dist/stories/store/store.js +44 -0
  56. package/package.json +5 -2
  57. package/src/stories/Chat/Chat.jsx +110 -5
  58. package/src/stories/Common Inputs/Picker/Picker.jsx +47 -0
  59. package/src/stories/Common Inputs/TextField/TextField.jsx +1 -1
  60. package/src/stories/Community/Community.jsx +109 -0
  61. package/src/stories/Events/Event/Event.jsx +105 -4
  62. package/src/stories/Events/EventsList/EventsList.jsx +98 -17
  63. package/src/stories/Forms/CreateSpace/CreateSpace.jsx +73 -0
  64. package/src/stories/Library/Folders/Folders.jsx +94 -7
  65. package/src/stories/Library/Notes/Notes.jsx +73 -7
  66. package/src/stories/Modals/NavbarPreviewModal/NavbarPreviewModal.jsx +31 -0
  67. package/src/stories/Music Album/ViewAlbum/ViewAlbum.jsx +81 -11
  68. package/src/stories/Music Album/ViewAlbums/ViewAlbums.jsx +78 -34
  69. package/src/stories/Navbar/Navbar.jsx +1 -1
  70. package/src/stories/Pages/Events/Event/Event.jsx +12 -4
  71. package/src/stories/Pages/Music/MusicAlbums/MusicAlbums.jsx +0 -13
  72. package/src/stories/Pages/ViewWorld/styles.json +1 -1
  73. package/src/stories/Photo Album/ViewAlbum/ViewAlbum.jsx +68 -6
  74. package/src/stories/Photo Album/ViewAlbums/ViewAlbums.jsx +69 -9
  75. package/src/stories/Preview/Preview.jsx +9 -1
  76. package/src/stories/PreviewComponents/ChatPreview/ChatPreview.jsx +132 -0
  77. package/src/stories/PreviewComponents/EventPreview/EventPreview.jsx +116 -0
  78. package/src/stories/PreviewComponents/EventsPreview/EventsPreview.jsx +132 -0
  79. package/src/stories/PreviewComponents/FoldersPreview/FoldersPreview.jsx +127 -0
  80. package/src/stories/PreviewComponents/MusicAlbumPreview/MusicAlbumPreview.jsx +124 -0
  81. package/src/stories/PreviewComponents/MusicAlbumsPreview/MusicAlbumsPreview.jsx +126 -0
  82. package/src/stories/PreviewComponents/MusicPlayerPreview/MusicPlayerPreview.jsx +113 -0
  83. package/src/stories/PreviewComponents/NavbarPreview/NavbarPreview.jsx +93 -0
  84. package/src/stories/PreviewComponents/NotesPreview/NotesPreview.jsx +122 -0
  85. package/src/stories/PreviewComponents/PhotoAlbumPreview/PhotoAlbumPreview.jsx +129 -0
  86. package/src/stories/PreviewComponents/PhotoAlbumsPreview/PhotoAlbumsPreview.jsx +129 -0
  87. package/src/stories/PreviewComponents/SpacesListPreview/SpacesListPreview.jsx +138 -0
  88. package/src/stories/PreviewComponents/VideoAlbumPreview/VideoAlbumPreview.jsx +129 -0
  89. package/src/stories/PreviewComponents/VideoAlbumsPreview/VideoAlbumsPreview.jsx +124 -0
  90. package/src/stories/PreviewComponents/VideoPreview/VideoPreview.jsx +125 -0
  91. package/src/stories/PreviewComponents/globalStyles.js +20 -0
  92. package/src/stories/Reusable Components/Cards/Card-style-10/CardStyle10.jsx +5 -2
  93. package/src/stories/Reusable Components/Cards/Card-style-11/CardStyle11.jsx +5 -5
  94. package/src/stories/Reusable Components/Cards/Card-style-6/CardStyle6.jsx +12 -6
  95. package/src/stories/Reusable Components/Cards/Card-style-8/CardStyle8.jsx +2 -2
  96. package/src/stories/Reusable Components/Cards/globalCardStyles.js +2 -1
  97. package/src/stories/Reusable Components/Community/Community.jsx +47 -0
  98. package/src/stories/Reusable Components/Gallery/Gallery.jsx +10 -9
  99. package/src/stories/Reusable Components/ReactModal/ReactModal.jsx +3 -25
  100. package/src/stories/Reusable Components/ReusableForm/ReusableForm.jsx +18 -6
  101. package/src/stories/Reusable Components/ReusableList/ReusableList.jsx +9 -4
  102. package/src/stories/Reusable Components/Tabs/Tabs.jsx +67 -0
  103. package/src/stories/Sections/Sections.jsx +5 -2
  104. package/src/stories/VideoAlbum/AlbumsGallery/AlbumsGallery.jsx +64 -16
  105. package/src/stories/VideoAlbum/VideoSpace/VideoSpace.jsx +77 -1
  106. package/src/stories/VideoAlbum/ViewAlbum/ViewAlbum.jsx +64 -9
  107. package/src/stories/Widgets/MusicPlayerWidget/MusicPlayerWidget.jsx +13 -6
  108. package/src/stories/Widgets/SpacesListWidget/SpacesListWidget.jsx +78 -0
  109. package/src/stories/Widgets/UsersWidget/UsersWidget.jsx +20 -0
  110. package/src/stories/helpers/util.js +24 -2
  111. package/src/stories/store/communities.js +703 -0
  112. package/src/stories/store/store.js +33 -0
  113. package/src/stories/styling.json +92 -0
@@ -23,20 +23,39 @@ var _ReactModal = _interopRequireDefault(require("../../Reusable Components/Reac
23
23
 
24
24
  var _ai = require("react-icons/ai");
25
25
 
26
+ var _bs = require("react-icons/bs");
27
+
26
28
  var _AddSong = _interopRequireDefault(require("../../Forms/AddSong/AddSong"));
27
29
 
30
+ var _Tabs = _interopRequireDefault(require("../../Reusable Components/Tabs/Tabs"));
31
+
32
+ var _Sections = _interopRequireDefault(require("../../Sections/Sections"));
33
+
34
+ var _MusicAlbumPreview = _interopRequireDefault(require("../../PreviewComponents/MusicAlbumPreview/MusicAlbumPreview"));
35
+
36
+ var _WidgetContainer = _interopRequireDefault(require("../../Reusable Components/WidgetContainer/WidgetContainer"));
37
+
38
+ var _Community = _interopRequireDefault(require("../../Reusable Components/Community/Community"));
39
+
40
+ var _constatnts = require("../../Pages/ViewWorld/constatnts");
41
+
28
42
  var _templateObject;
29
43
 
30
- var _excluded = ["album", "cardBackgroundColor", "songTitleColor"];
44
+ var _excluded = ["album", "cardBackgroundColor", "songTitleColor", "community"];
31
45
 
32
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); }
33
47
 
34
48
  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; }
35
49
 
50
+ // import styles from '../../styling.json'
36
51
  var listControls = [{
37
52
  icon: /*#__PURE__*/_react.default.createElement(_ai.AiOutlineFileAdd, null),
38
53
  action: 'add',
39
54
  name: 'Add Album'
55
+ }, {
56
+ icon: /*#__PURE__*/_react.default.createElement(_bs.BsGear, null),
57
+ action: 'config',
58
+ name: 'Config'
40
59
  }];
41
60
  var cardControls = [{
42
61
  icon: /*#__PURE__*/_react.default.createElement(_ai.AiOutlineDelete, null),
@@ -48,6 +67,7 @@ var ViewAlbum = function ViewAlbum(_ref) {
48
67
  var album = _ref.album,
49
68
  cardBackgroundColor = _ref.cardBackgroundColor,
50
69
  songTitleColor = _ref.songTitleColor,
70
+ community = _ref.community,
51
71
  props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
52
72
 
53
73
  var _useState = (0, _react.useState)(false),
@@ -55,19 +75,63 @@ var ViewAlbum = function ViewAlbum(_ref) {
55
75
  showModal = _useState2[0],
56
76
  setShowModal = _useState2[1];
57
77
 
58
- var onIconClicked = function onIconClicked(action) {
59
- switch (action) {
60
- case 'add':
61
- setShowModal(true);
62
- break;
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
+ preview: true,
85
+ album: album
86
+ })),
87
+ _useState6 = (0, _slicedToArray2.default)(_useState5, 2),
88
+ centerContext = _useState6[0],
89
+ setCenterContext = _useState6[1];
90
+
91
+ var formChanged = function formChanged(values) {
92
+ console.log('context changed');
93
+ setCenterContext( /*#__PURE__*/_react.default.createElement(ViewAlbum, Object.assign({
94
+ preview: true,
95
+ album: album
96
+ }, values)));
97
+ };
63
98
 
64
- default:
65
- break;
99
+ var tabs = [{
100
+ title: 'New',
101
+ id: 'preview'
102
+ }, {
103
+ title: 'Context',
104
+ id: 'community'
105
+ }];
106
+ var sections = [{
107
+ title: 'Styles',
108
+ data: [{
109
+ title: 'Styling',
110
+ id: 'styling'
111
+ }]
112
+ }];
113
+
114
+ var onIconClicked = function onIconClicked(action) {
115
+ if (!props.preview) {
116
+ switch (action) {
117
+ case 'add':
118
+ setShowModal(true);
119
+ break;
120
+
121
+ case 'config':
122
+ setShowConfigModal(true);
123
+ break;
124
+
125
+ default:
126
+ break;
127
+ }
66
128
  }
67
129
  };
68
130
 
69
131
  var cardIconClicked = function cardIconClicked(action, index) {
70
- props.cardIconClicked(action, index);
132
+ if (!props.preview) {
133
+ props.cardIconClicked(action, index);
134
+ }
71
135
  };
72
136
 
73
137
  var onAddSong = function onAddSong(song) {
@@ -104,7 +168,31 @@ var ViewAlbum = function ViewAlbum(_ref) {
104
168
  cancelHandler: cancelHandler,
105
169
  saveBtnText: props.saveBtnText || "Create",
106
170
  cancelBtnText: props.cancelBtnText || "Cancel"
107
- })));
171
+ })), /*#__PURE__*/_react.default.createElement(_ReactModal.default, {
172
+ modalIsOpen: showConfigModal,
173
+ closeModal: function closeModal() {
174
+ localStorage.removeItem('formStyles');
175
+ setShowConfigModal(false);
176
+ },
177
+ exitModalButton: function exitModalButton(e) {
178
+ return /*#__PURE__*/_react.default.createElement("div", null);
179
+ }
180
+ }, /*#__PURE__*/_react.default.createElement(_Tabs.default, {
181
+ title: "Album Config",
182
+ tabs: tabs
183
+ }, /*#__PURE__*/_react.default.createElement(_MusicAlbumPreview.default, {
184
+ componentProps: {
185
+ album: album,
186
+ title: props.title || "My Album",
187
+ preview: true
188
+ },
189
+ formChanged: formChanged,
190
+ id: "preview"
191
+ }), /*#__PURE__*/_react.default.createElement(_Community.default, {
192
+ center: centerContext,
193
+ community: community,
194
+ id: "community"
195
+ }))));
108
196
  };
109
197
 
110
198
  var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n"])));
@@ -23,11 +23,21 @@ var _ReactModal = _interopRequireDefault(require("../../Reusable Components/Reac
23
23
 
24
24
  var _CreateMusicAlbum = _interopRequireDefault(require("../../Forms/CreateMusicAlbum/CreateMusicAlbum"));
25
25
 
26
+ var _Tabs = _interopRequireDefault(require("../../Reusable Components/Tabs/Tabs"));
27
+
28
+ var _Sections = _interopRequireDefault(require("../../Sections/Sections"));
29
+
30
+ var _MusicAlbumsPreview = _interopRequireDefault(require("../../PreviewComponents/MusicAlbumsPreview/MusicAlbumsPreview"));
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
- var _excluded = ["albums", "albumTitleColor", "descColor"];
40
+ var _excluded = ["albums", "community"];
31
41
 
32
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); }
33
43
 
@@ -42,46 +52,67 @@ 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 ViewAlbums = function ViewAlbums(_ref) {
48
62
  var albums = _ref.albums,
49
- albumTitleColor = _ref.albumTitleColor,
50
- descColor = _ref.descColor,
63
+ community = _ref.community,
51
64
  props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
52
- var cardStyles = {
53
- darkOnHover: true,
54
- cardTitleColor: albumTitleColor,
55
- descColor: descColor,
56
- controlsStyles: {
57
- showOnHover: true,
58
- position: 'center',
59
- iconBackground: "#272727",
60
- dropdownBackground: "#272727",
61
- dropdownFontColor: "white",
62
- dropdownItemHoverColor: "#414141",
63
- iconBackgroundHover: "#414141",
64
- iconBorderRadius: 100,
65
- iconSize: 25,
66
- iconsGap: 10,
67
- iconColor: 'white',
68
- containerPadding: 20
69
- }
70
- };
71
65
 
72
66
  var _useState = (0, _react.useState)(false),
73
67
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
74
68
  showModal = _useState2[0],
75
69
  setShowModal = _useState2[1];
76
70
 
77
- var onHeaderIconClicked = function onHeaderIconClicked(action) {
78
- switch (action) {
79
- case 'add':
80
- setShowModal(true);
81
- break;
71
+ var _useState3 = (0, _react.useState)(false),
72
+ _useState4 = (0, _slicedToArray2.default)(_useState3, 2),
73
+ showConfigModal = _useState4[0],
74
+ setShowConfigModal = _useState4[1];
75
+
76
+ var _useState5 = (0, _react.useState)( /*#__PURE__*/_react.default.createElement(ViewAlbums, {
77
+ preview: true,
78
+ albums: albums
79
+ })),
80
+ _useState6 = (0, _slicedToArray2.default)(_useState5, 2),
81
+ centerContext = _useState6[0],
82
+ setCenterContext = _useState6[1];
83
+
84
+ var tabs = [{
85
+ title: 'New',
86
+ id: 'preview'
87
+ }, {
88
+ title: 'Context',
89
+ id: 'community'
90
+ }];
91
+ var sections = [{
92
+ title: 'Styles',
93
+ data: [{
94
+ title: 'Styling',
95
+ component: /*#__PURE__*/_react.default.createElement(_Tabs.default, {
96
+ title: "Music Albums Config",
97
+ tabs: tabs
98
+ })
99
+ }]
100
+ }];
82
101
 
83
- default:
84
- break;
102
+ var onHeaderIconClicked = function onHeaderIconClicked(action) {
103
+ if (!props.preview) {
104
+ switch (action) {
105
+ case 'add':
106
+ setShowModal(true);
107
+ break;
108
+
109
+ case 'config':
110
+ setShowConfigModal(true);
111
+ break;
112
+
113
+ default:
114
+ break;
115
+ }
85
116
  }
86
117
  };
87
118
 
@@ -89,6 +120,13 @@ var ViewAlbums = function ViewAlbums(_ref) {
89
120
  props.cardIconClicked(action, index);
90
121
  };
91
122
 
123
+ var formChanged = function formChanged(values) {
124
+ setCenterContext( /*#__PURE__*/_react.default.createElement(ViewAlbums, Object.assign({
125
+ preview: true,
126
+ albums: albums
127
+ }, values)));
128
+ };
129
+
92
130
  var onAddAlbum = function onAddAlbum(album) {
93
131
  setShowModal(false);
94
132
  props.onAddAlbum(album);
@@ -98,8 +136,13 @@ var ViewAlbums = function ViewAlbums(_ref) {
98
136
  setShowModal(false);
99
137
  };
100
138
 
139
+ var cancelConfig = function cancelConfig() {
140
+ setShowConfigModal(false);
141
+ localStorage.removeItem('formStyles');
142
+ };
143
+
101
144
  return /*#__PURE__*/_react.default.createElement(Container, null, /*#__PURE__*/_react.default.createElement(_Gallery.default, Object.assign({
102
- galleryTitle: props.title || 'musicAlbums',
145
+ galleryTitle: props.title || 'Music Albums',
103
146
  data: albums,
104
147
  type: "flat",
105
148
  cardStyle: "card-style-6",
@@ -120,13 +163,32 @@ var ViewAlbums = function ViewAlbums(_ref) {
120
163
  cancelHandler: cancelHandler,
121
164
  saveBtnText: props.saveBtnText || "Create",
122
165
  cancelBtnText: props.cancelBtnText || "Cancel"
123
- })));
166
+ })), /*#__PURE__*/_react.default.createElement(_ReactModal.default, {
167
+ modalIsOpen: showConfigModal,
168
+ closeModal: cancelConfig,
169
+ exitModalButton: function exitModalButton(e) {
170
+ return /*#__PURE__*/_react.default.createElement("div", null);
171
+ }
172
+ }, /*#__PURE__*/_react.default.createElement(_Tabs.default, {
173
+ title: "Albums Config",
174
+ tabs: tabs
175
+ }, /*#__PURE__*/_react.default.createElement(_MusicAlbumsPreview.default, {
176
+ componentProps: {
177
+ albums: albums,
178
+ title: 'Music Albums',
179
+ preview: true
180
+ },
181
+ formChanged: formChanged,
182
+ id: "preview"
183
+ }), /*#__PURE__*/_react.default.createElement(_Community.default, {
184
+ center: centerContext,
185
+ community: community,
186
+ id: "community"
187
+ }))));
124
188
  };
125
189
 
126
190
  var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n"])));
127
191
 
128
- ViewAlbums.defaultProps = {
129
- cardBackgroundColor: 'white'
130
- };
192
+ ViewAlbums.defaultProps = {};
131
193
  var _default = ViewAlbums;
132
194
  exports.default = _default;
@@ -219,7 +219,7 @@ var NavBar = _styledComponents.default.div(_templateObject3 || (_templateObject3
219
219
  });
220
220
 
221
221
  var UniverseContainer = (0, _styledComponents.default)('div')({
222
- width: '346px',
222
+ width: '100%',
223
223
  height: '72px',
224
224
  display: 'flex',
225
225
  'align-items': 'center',
@@ -27,8 +27,6 @@ var _WidgetContainer = _interopRequireDefault(require("../../../Reusable Compone
27
27
 
28
28
  var _Event = _interopRequireDefault(require("../../../Events/Event/Event"));
29
29
 
30
- var _util = require("../../../helpers/util");
31
-
32
30
  var _styles = _interopRequireDefault(require("../../ViewWorld/styles.json"));
33
31
 
34
32
  var _constatnts = require("../../ViewWorld/constatnts");
@@ -44,16 +42,27 @@ var Event = function Event(props) {
44
42
  imgUrl: props.imgUrl
45
43
  }
46
44
  }), /*#__PURE__*/_react.default.createElement(_WidgetContainer.default, {
47
- widgetType: "list",
45
+ widgetType: "spaces-list",
48
46
  widgetProps: {
49
47
  listTitle: 'Your Spaces',
50
48
  type: 'sectioned',
51
- data: _constatnts.SPACES,
49
+ spaces: _constatnts.SPACES,
52
50
  cardStyle: 'card-style-3',
51
+ cardClicked: function cardClicked() {
52
+ return alert('clicked');
53
+ },
54
+ headerStyles: {
55
+ headerBackground: 'purple',
56
+ padding: 3,
57
+ controlsStyles: {
58
+ iconColor: 'white',
59
+ iconsGap: 5
60
+ }
61
+ },
53
62
  sectionHeaderStyles: {
54
63
  cardBorderSize: 2,
55
64
  cardPadding: 2,
56
- cardBackgroundColor: '#fff',
65
+ headerBackground: 'red',
57
66
  cardBorderColor: 'black'
58
67
  },
59
68
  customCardStyles: {
@@ -154,10 +154,7 @@ var MusicAlbums = function MusicAlbums(props) {
154
154
  cardTitleFontSize: 15,
155
155
  cardBackgroundColor: 'black',
156
156
  cardTitleColor: 'white',
157
- onHoverBackgroundColor: '#F6891F',
158
- controlsStyles: {
159
- showOnHover: true
160
- }
157
+ onHoverBackgroundColor: '#F6891F'
161
158
  }
162
159
  }
163
160
  })), /*#__PURE__*/_react.default.createElement(_Center.default, null, /*#__PURE__*/_react.default.createElement(_SpaceContainer.default, {
@@ -178,17 +175,7 @@ var MusicAlbums = function MusicAlbums(props) {
178
175
  }
179
176
  },
180
177
  customCardStyles: {
181
- darkOnHover: true,
182
- controlsStyles: {
183
- showOnHover: true,
184
- position: 'center',
185
- dropdownFontColor: "white",
186
- iconBorderRadius: 100,
187
- iconSize: 40,
188
- iconsGap: 10,
189
- iconColor: 'white',
190
- containerPadding: 20
191
- }
178
+ darkOnHover: true
192
179
  },
193
180
  cardClicked: cardClicked
194
181
  }))), /*#__PURE__*/_react.default.createElement(_Right.default, null, /*#__PURE__*/_react.default.createElement(_WidgetContainer.default, {
@@ -25,11 +25,21 @@ var _ReactModal = _interopRequireDefault(require("../../Reusable Components/Reac
25
25
 
26
26
  var _DetailedPhoto = _interopRequireDefault(require("../DetailedPhoto/DetailedPhoto"));
27
27
 
28
+ var _PhotoAlbumPreview = _interopRequireDefault(require("../../PreviewComponents/PhotoAlbumPreview/PhotoAlbumPreview"));
29
+
30
+ var _Tabs = _interopRequireDefault(require("../../Reusable Components/Tabs/Tabs"));
31
+
32
+ var _Sections = _interopRequireDefault(require("../../Sections/Sections"));
33
+
34
+ var _Community = _interopRequireDefault(require("../../Reusable Components/Community/Community"));
35
+
28
36
  var _ai = require("react-icons/ai");
29
37
 
38
+ var _bs = require("react-icons/bs");
39
+
30
40
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
31
41
 
32
- var _excluded = ["album", "cardBackgroundColor", "imgTitleColor", "descColor"];
42
+ var _excluded = ["album", "cardBackgroundColor", "imgTitleColor", "descColor", "community"];
33
43
 
34
44
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
35
45
 
@@ -39,6 +49,10 @@ var galleryControls = [{
39
49
  icon: /*#__PURE__*/_react.default.createElement(_ai.AiOutlineFileAdd, null),
40
50
  action: 'add',
41
51
  name: 'Add Photo'
52
+ }, {
53
+ icon: /*#__PURE__*/_react.default.createElement(_bs.BsGear, null),
54
+ action: 'config',
55
+ name: 'Config'
42
56
  }];
43
57
  var cardControls = [{
44
58
  icon: /*#__PURE__*/_react.default.createElement(_ai.AiFillDelete, null),
@@ -51,6 +65,7 @@ var ViewAlbum = function ViewAlbum(_ref) {
51
65
  cardBackgroundColor = _ref.cardBackgroundColor,
52
66
  imgTitleColor = _ref.imgTitleColor,
53
67
  descColor = _ref.descColor,
68
+ community = _ref.community,
54
69
  props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
55
70
  var cardStyles = {
56
71
  cardBackgroundColor: cardBackgroundColor,
@@ -81,19 +96,46 @@ var ViewAlbum = function ViewAlbum(_ref) {
81
96
 
82
97
  var _useState3 = (0, _react.useState)(false),
83
98
  _useState4 = (0, _slicedToArray2.default)(_useState3, 2),
84
- showImgModal = _useState4[0],
85
- setShowImgModal = _useState4[1];
99
+ showConfigModal = _useState4[0],
100
+ setShowConfigModal = _useState4[1];
86
101
 
87
- var _useState5 = (0, _react.useState)(null),
102
+ var _useState5 = (0, _react.useState)(false),
88
103
  _useState6 = (0, _slicedToArray2.default)(_useState5, 2),
89
- openedImgIndex = _useState6[0],
90
- setOpenedImgIndex = _useState6[1];
104
+ showImgModal = _useState6[0],
105
+ setShowImgModal = _useState6[1];
91
106
 
92
107
  var _useState7 = (0, _react.useState)(null),
93
108
  _useState8 = (0, _slicedToArray2.default)(_useState7, 2),
94
- openedImg = _useState8[0],
95
- setOpenedImg = _useState8[1];
109
+ openedImgIndex = _useState8[0],
110
+ setOpenedImgIndex = _useState8[1];
111
+
112
+ var _useState9 = (0, _react.useState)(null),
113
+ _useState10 = (0, _slicedToArray2.default)(_useState9, 2),
114
+ openedImg = _useState10[0],
115
+ setOpenedImg = _useState10[1];
116
+
117
+ var _useState11 = (0, _react.useState)( /*#__PURE__*/_react.default.createElement(ViewAlbum, {
118
+ preview: true,
119
+ album: album
120
+ })),
121
+ _useState12 = (0, _slicedToArray2.default)(_useState11, 2),
122
+ centerContext = _useState12[0],
123
+ setCenterContext = _useState12[1];
124
+
125
+ var formChanged = function formChanged(values) {
126
+ setCenterContext( /*#__PURE__*/_react.default.createElement(ViewAlbum, Object.assign({
127
+ preview: true,
128
+ album: album
129
+ }, values)));
130
+ };
96
131
 
132
+ var tabs = [{
133
+ title: 'New',
134
+ id: 'preview'
135
+ }, {
136
+ title: 'Context',
137
+ id: 'community'
138
+ }];
97
139
  var handleUserKeyPress = (0, _react.useCallback)(function (event) {
98
140
  var key = event.key;
99
141
 
@@ -113,18 +155,26 @@ var ViewAlbum = function ViewAlbum(_ref) {
113
155
  }, [openedImgIndex, handleUserKeyPress]);
114
156
 
115
157
  var onIconClicked = function onIconClicked(action) {
116
- switch (action) {
117
- case 'add':
118
- setShowModal(true);
119
- break;
120
-
121
- default:
122
- break;
158
+ if (!props.preview) {
159
+ switch (action) {
160
+ case 'add':
161
+ setShowModal(true);
162
+ break;
163
+
164
+ case 'config':
165
+ setShowConfigModal(true);
166
+ break;
167
+
168
+ default:
169
+ break;
170
+ }
123
171
  }
124
172
  };
125
173
 
126
174
  var cardIconClicked = function cardIconClicked(action, index) {
127
- props.cardIconClicked(action, index);
175
+ if (!props.preview) {
176
+ props.cardIconClicked(action, index);
177
+ }
128
178
  };
129
179
 
130
180
  var onAddPhoto = function onAddPhoto(photo) {
@@ -153,6 +203,11 @@ var ViewAlbum = function ViewAlbum(_ref) {
153
203
  }
154
204
  };
155
205
 
206
+ var cancelConfig = function cancelConfig() {
207
+ setShowConfigModal(false);
208
+ localStorage.removeItem('formStyles');
209
+ };
210
+
156
211
  return /*#__PURE__*/_react.default.createElement(Container, null, /*#__PURE__*/_react.default.createElement(_Gallery.default, Object.assign({
157
212
  galleryTitle: props.title || "Photo Album",
158
213
  data: album,
@@ -199,7 +254,29 @@ var ViewAlbum = function ViewAlbum(_ref) {
199
254
  img: openedImg
200
255
  }), /*#__PURE__*/_react.default.createElement(RightIconContainer, {
201
256
  onClick: nextPhoto
202
- }, /*#__PURE__*/_react.default.createElement(_ai.AiOutlineArrowRight, null))));
257
+ }, /*#__PURE__*/_react.default.createElement(_ai.AiOutlineArrowRight, null))), /*#__PURE__*/_react.default.createElement(_ReactModal.default, {
258
+ modalIsOpen: showConfigModal,
259
+ closeModal: cancelConfig,
260
+ exitModalButton: function exitModalButton(e) {
261
+ return /*#__PURE__*/_react.default.createElement("div", null);
262
+ }
263
+ }, /*#__PURE__*/_react.default.createElement(_Tabs.default, {
264
+ title: "Photo Album Config",
265
+ tabs: tabs,
266
+ id: "styling"
267
+ }, /*#__PURE__*/_react.default.createElement(_PhotoAlbumPreview.default, {
268
+ componentProps: {
269
+ album: album,
270
+ title: props.title || 'Photo Album',
271
+ preview: true
272
+ },
273
+ formChanged: formChanged,
274
+ id: "preview"
275
+ }), /*#__PURE__*/_react.default.createElement(_Community.default, {
276
+ center: centerContext,
277
+ community: community,
278
+ id: "community"
279
+ }))));
203
280
  };
204
281
 
205
282
  var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\n"])));