@mohamed-karawia/library 0.1.16 → 0.1.20

Sign up to get free protection for your applications and to get access to all the features.
Files changed (135) hide show
  1. package/dist/stories/Chat/Chat.js +129 -14
  2. package/dist/stories/Common Inputs/EditorComponent/EditorComponent.js +4 -2
  3. package/dist/stories/Common Inputs/Picker/Picker.js +61 -0
  4. package/dist/stories/Common Inputs/TextField/TextField.js +3 -1
  5. package/dist/stories/Community/Community.js +137 -0
  6. package/dist/stories/Enrollment/Admin/DetailedForm/DetailedForm.js +10 -12
  7. package/dist/stories/Enrollment/Admin/ViewForms/ViewForms.js +1 -1
  8. package/dist/stories/Enrollment/Guest/FillForm/FillForm.js +4 -17
  9. package/dist/stories/Events/Event/Event.js +117 -5
  10. package/dist/stories/Events/EventsList/EventsList.js +98 -19
  11. package/dist/stories/Forms/CreateSpace/CreateSpace.js +75 -0
  12. package/dist/stories/Library/Folders/Folders.js +82 -6
  13. package/dist/stories/Library/Notes/Notes.js +78 -4
  14. package/dist/stories/Modals/NavbarPreviewModal/NavbarPreviewModal.js +54 -0
  15. package/dist/stories/Music Album/ViewAlbum/ViewAlbum.js +138 -15
  16. package/dist/stories/Music Album/ViewAlbums/ViewAlbums.js +67 -28
  17. package/dist/stories/Navbar/Navbar.js +1 -1
  18. package/dist/stories/Pages/Enrollment/DetailedForm/DetailedForm.js +8 -0
  19. package/dist/stories/Pages/Enrollment/FillForm/FillForm.js +7 -1
  20. package/dist/stories/Pages/Enrollment/Forms/Forms.js +3 -1
  21. package/dist/stories/Pages/Events/Event/Event.js +14 -5
  22. package/dist/stories/Pages/Events/Events/Events.js +1 -0
  23. package/dist/stories/Pages/Library/Folders/Library.js +2 -1
  24. package/dist/stories/Pages/Music/MusicAlbum/Music.js +8 -6
  25. package/dist/stories/Pages/Music/MusicAlbums/MusicAlbums.js +2 -15
  26. package/dist/stories/Pages/Photos/Albums/Albums.js +4 -1
  27. package/dist/stories/Photo Album/ViewAlbum/ViewAlbum.js +80 -19
  28. package/dist/stories/Photo Album/ViewAlbums/ViewAlbums.js +83 -25
  29. package/dist/stories/Preview/Preview.js +37 -0
  30. package/dist/stories/PreviewComponents/ChatPreview/ChatPreview.js +193 -0
  31. package/dist/stories/PreviewComponents/EventPreview/EventPreview.js +158 -0
  32. package/dist/stories/PreviewComponents/EventsPreview/EventsPreview.js +192 -0
  33. package/dist/stories/PreviewComponents/FoldersPreview/FoldersPreview.js +182 -0
  34. package/dist/stories/PreviewComponents/MusicAlbumPreview/MusicAlbumPreview.js +177 -0
  35. package/dist/stories/PreviewComponents/MusicAlbumsPreview/MusicAlbumsPreview.js +181 -0
  36. package/dist/stories/PreviewComponents/MusicPlayerPreview/MusicPlayerPreview.js +153 -0
  37. package/dist/stories/PreviewComponents/NavbarPreview/NavbarPreview.js +112 -0
  38. package/dist/stories/PreviewComponents/NotesPreview/NotesPreview.js +173 -0
  39. package/dist/stories/PreviewComponents/PhotoAlbumPreview/PhotoAlbumPreview.js +189 -0
  40. package/dist/stories/PreviewComponents/PhotoAlbumsPreview/PhotoAlbumsPreview.js +189 -0
  41. package/dist/stories/PreviewComponents/SpacesListPreview/SpacesListPreview.js +197 -0
  42. package/dist/stories/PreviewComponents/VideoAlbumPreview/VideoAlbumPreview.js +189 -0
  43. package/dist/stories/PreviewComponents/VideoAlbumsPreview/VideoAlbumsPreview.js +175 -0
  44. package/dist/stories/PreviewComponents/VideoPreview/VideoPreview.js +172 -0
  45. package/dist/stories/PreviewComponents/globalStyles.js +26 -0
  46. package/dist/stories/Reusable Components/Cards/Card-style-10/CardStyle10.js +4 -3
  47. package/dist/stories/Reusable Components/Cards/Card-style-11/CardStyle11.js +8 -4
  48. package/dist/stories/Reusable Components/Cards/Card-style-6/CardStyle6.js +10 -4
  49. package/dist/stories/Reusable Components/Cards/Card-style-8/CardStyle8.js +4 -2
  50. package/dist/stories/Reusable Components/Cards/globalCardStyles.js +2 -2
  51. package/dist/stories/Reusable Components/Community/Community.js +76 -0
  52. package/dist/stories/Reusable Components/Gallery/Gallery.js +17 -18
  53. package/dist/stories/Reusable Components/ReactModal/ReactModal.js +11 -30
  54. package/dist/stories/Reusable Components/ReusableForm/ReusableForm.js +20 -3
  55. package/dist/stories/Reusable Components/ReusableList/ReusableList.js +9 -5
  56. package/dist/stories/Reusable Components/Tabs/Tabs.js +68 -0
  57. package/dist/stories/Sections/Sections.js +8 -2
  58. package/dist/stories/VideoAlbum/AlbumsGallery/AlbumsGallery.js +77 -18
  59. package/dist/stories/VideoAlbum/VideoSpace/VideoSpace.js +96 -3
  60. package/dist/stories/VideoAlbum/ViewAlbum/ViewAlbum.js +78 -5
  61. package/dist/stories/Widgets/MusicPlayerWidget/MusicPlayerWidget.js +17 -11
  62. package/dist/stories/Widgets/SpacesListWidget/SpacesListWidget.js +115 -0
  63. package/dist/stories/Widgets/UsersWidget/UsersWidget.js +30 -0
  64. package/dist/stories/helpers/util.js +60 -3
  65. package/dist/stories/store/communities.js +943 -0
  66. package/dist/stories/store/store.js +44 -0
  67. package/package.json +5 -2
  68. package/src/stories/Chat/Chat.jsx +109 -13
  69. package/src/stories/Common Inputs/EditorComponent/EditorComponent.jsx +3 -3
  70. package/src/stories/Common Inputs/Picker/Picker.jsx +47 -0
  71. package/src/stories/Common Inputs/TextField/TextField.jsx +1 -1
  72. package/src/stories/Community/Community.jsx +110 -0
  73. package/src/stories/Enrollment/Admin/DetailedForm/DetailedForm.jsx +7 -9
  74. package/src/stories/Enrollment/Admin/ViewForms/ViewForms.jsx +3 -2
  75. package/src/stories/Enrollment/Guest/FillForm/FillForm.jsx +6 -16
  76. package/src/stories/Events/Event/Event.jsx +98 -5
  77. package/src/stories/Events/EventsList/EventsList.jsx +101 -22
  78. package/src/stories/Forms/CreateSpace/CreateSpace.jsx +73 -0
  79. package/src/stories/Library/Folders/Folders.jsx +82 -6
  80. package/src/stories/Library/Notes/Notes.jsx +65 -5
  81. package/src/stories/Modals/NavbarPreviewModal/NavbarPreviewModal.jsx +31 -0
  82. package/src/stories/Music Album/ViewAlbum/ViewAlbum.jsx +133 -14
  83. package/src/stories/Music Album/ViewAlbums/ViewAlbums.jsx +61 -32
  84. package/src/stories/Navbar/Navbar.jsx +1 -1
  85. package/src/stories/Pages/Enrollment/DetailedForm/DetailedForm.jsx +10 -1
  86. package/src/stories/Pages/Enrollment/FillForm/FillForm.jsx +6 -0
  87. package/src/stories/Pages/Enrollment/Forms/Forms.jsx +3 -1
  88. package/src/stories/Pages/Events/Event/Event.jsx +12 -4
  89. package/src/stories/Pages/Events/Events/Events.jsx +75 -74
  90. package/src/stories/Pages/Library/Folders/Library.jsx +2 -1
  91. package/src/stories/Pages/Music/MusicAlbum/Music.jsx +8 -6
  92. package/src/stories/Pages/Music/MusicAlbums/MusicAlbums.jsx +0 -13
  93. package/src/stories/Pages/Photos/Albums/Albums.jsx +3 -0
  94. package/src/stories/Photo Album/ViewAlbum/ViewAlbum.jsx +63 -13
  95. package/src/stories/Photo Album/ViewAlbums/ViewAlbums.jsx +66 -33
  96. package/src/stories/Preview/Preview.jsx +35 -0
  97. package/src/stories/PreviewComponents/ChatPreview/ChatPreview.jsx +132 -0
  98. package/src/stories/PreviewComponents/EventPreview/EventPreview.jsx +116 -0
  99. package/src/stories/PreviewComponents/EventsPreview/EventsPreview.jsx +132 -0
  100. package/src/stories/PreviewComponents/FoldersPreview/FoldersPreview.jsx +127 -0
  101. package/src/stories/PreviewComponents/MusicAlbumPreview/MusicAlbumPreview.jsx +124 -0
  102. package/src/stories/PreviewComponents/MusicAlbumsPreview/MusicAlbumsPreview.jsx +126 -0
  103. package/src/stories/PreviewComponents/MusicPlayerPreview/MusicPlayerPreview.jsx +113 -0
  104. package/src/stories/PreviewComponents/NavbarPreview/NavbarPreview.jsx +93 -0
  105. package/src/stories/PreviewComponents/NotesPreview/NotesPreview.jsx +122 -0
  106. package/src/stories/PreviewComponents/PhotoAlbumPreview/PhotoAlbumPreview.jsx +129 -0
  107. package/src/stories/PreviewComponents/PhotoAlbumsPreview/PhotoAlbumsPreview.jsx +129 -0
  108. package/src/stories/PreviewComponents/SpacesListPreview/SpacesListPreview.jsx +138 -0
  109. package/src/stories/PreviewComponents/VideoAlbumPreview/VideoAlbumPreview.jsx +129 -0
  110. package/src/stories/PreviewComponents/VideoAlbumsPreview/VideoAlbumsPreview.jsx +124 -0
  111. package/src/stories/PreviewComponents/VideoPreview/VideoPreview.jsx +125 -0
  112. package/src/stories/PreviewComponents/globalStyles.js +20 -0
  113. package/src/stories/Reusable Components/Cards/Card-style-10/CardStyle10.jsx +5 -2
  114. package/src/stories/Reusable Components/Cards/Card-style-11/CardStyle11.jsx +5 -5
  115. package/src/stories/Reusable Components/Cards/Card-style-6/CardStyle6.jsx +12 -6
  116. package/src/stories/Reusable Components/Cards/Card-style-8/CardStyle8.jsx +2 -2
  117. package/src/stories/Reusable Components/Cards/globalCardStyles.js +2 -1
  118. package/src/stories/Reusable Components/Community/Community.jsx +70 -0
  119. package/src/stories/Reusable Components/Gallery/Gallery.jsx +15 -10
  120. package/src/stories/Reusable Components/ReactModal/ReactModal.jsx +3 -25
  121. package/src/stories/Reusable Components/ReusableForm/ReusableForm.jsx +19 -7
  122. package/src/stories/Reusable Components/ReusableHeader/ReusableHeader.jsx +0 -2
  123. package/src/stories/Reusable Components/ReusableList/ReusableList.jsx +9 -4
  124. package/src/stories/Reusable Components/Tabs/Tabs.jsx +67 -0
  125. package/src/stories/Sections/Sections.jsx +5 -2
  126. package/src/stories/VideoAlbum/AlbumsGallery/AlbumsGallery.jsx +57 -16
  127. package/src/stories/VideoAlbum/VideoSpace/VideoSpace.jsx +70 -1
  128. package/src/stories/VideoAlbum/ViewAlbum/ViewAlbum.jsx +65 -8
  129. package/src/stories/Widgets/MusicPlayerWidget/MusicPlayerWidget.jsx +14 -7
  130. package/src/stories/Widgets/SpacesListWidget/SpacesListWidget.jsx +78 -0
  131. package/src/stories/Widgets/UsersWidget/UsersWidget.jsx +20 -0
  132. package/src/stories/helpers/util.js +42 -2
  133. package/src/stories/store/communities.js +705 -0
  134. package/src/stories/store/store.js +33 -0
  135. package/src/stories/styling.json +92 -0
@@ -19,15 +19,29 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
19
19
 
20
20
  var _ai = require("react-icons/ai");
21
21
 
22
+ var _bs = require("react-icons/bs");
23
+
22
24
  var _ReusableList = _interopRequireDefault(require("../../Reusable Components/ReusableList/ReusableList"));
23
25
 
24
26
  var _ReactModal = _interopRequireDefault(require("../../Reusable Components/ReactModal/ReactModal"));
25
27
 
26
28
  var _CreateEvent = _interopRequireDefault(require("../CreateEvent/CreateEvent"));
27
29
 
30
+ var _EventsPreview = _interopRequireDefault(require("../../PreviewComponents/EventsPreview/EventsPreview"));
31
+
32
+ var _EventsList = require("./EventsList.stories");
33
+
34
+ var _Events = require("../../Pages/Events/Events/Events.stories");
35
+
36
+ var _Tabs = _interopRequireDefault(require("../../Reusable Components/Tabs/Tabs"));
37
+
38
+ var _Sections = _interopRequireDefault(require("../../Sections/Sections"));
39
+
40
+ var _Community = _interopRequireDefault(require("../../Reusable Components/Community/Community"));
41
+
28
42
  var _templateObject;
29
43
 
30
- var _excluded = ["events", "iconColor", "cardTitleFontSize", "cardTitleColor", "cardPadding"];
44
+ var _excluded = ["events"];
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
 
@@ -37,6 +51,10 @@ var listControls = [{
37
51
  icon: /*#__PURE__*/_react.default.createElement(_ai.AiOutlineFileAdd, null),
38
52
  action: 'add',
39
53
  name: 'Add Photo'
54
+ }, {
55
+ icon: /*#__PURE__*/_react.default.createElement(_bs.BsGear, null),
56
+ action: 'config',
57
+ name: 'Config'
40
58
  }];
41
59
  var cardControls = [{
42
60
  icon: /*#__PURE__*/_react.default.createElement(_ai.AiFillDelete, null),
@@ -46,10 +64,6 @@ var cardControls = [{
46
64
 
47
65
  var EventsList = function EventsList(_ref) {
48
66
  var events = _ref.events,
49
- iconColor = _ref.iconColor,
50
- cardTitleFontSize = _ref.cardTitleFontSize,
51
- cardTitleColor = _ref.cardTitleColor,
52
- cardPadding = _ref.cardPadding,
53
67
  props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
54
68
 
55
69
  var _useState = (0, _react.useState)(false),
@@ -57,23 +71,66 @@ var EventsList = function EventsList(_ref) {
57
71
  showModal = _useState2[0],
58
72
  setShowModal = _useState2[1];
59
73
 
60
- var onIconClicked = function onIconClicked(action) {
61
- switch (action) {
62
- case 'add':
63
- setShowModal(true);
64
- break;
74
+ var _useState3 = (0, _react.useState)(false),
75
+ _useState4 = (0, _slicedToArray2.default)(_useState3, 2),
76
+ showConfigModal = _useState4[0],
77
+ setShowConfigModal = _useState4[1];
78
+
79
+ var _useState5 = (0, _react.useState)( /*#__PURE__*/_react.default.createElement(EventsList, {
80
+ events: events
81
+ })),
82
+ _useState6 = (0, _slicedToArray2.default)(_useState5, 2),
83
+ centerContext = _useState6[0],
84
+ setCenterContext = _useState6[1];
85
+
86
+ var formChanged = function formChanged(values) {
87
+ setCenterContext( /*#__PURE__*/_react.default.createElement(EventsList, Object.assign({
88
+ events: events
89
+ }, values)));
90
+ };
91
+
92
+ var tabs = [{
93
+ title: 'New',
94
+ id: 'preview'
95
+ }, {
96
+ title: 'Context',
97
+ id: 'community'
98
+ }];
99
+ var sections = [{
100
+ title: 'Styles',
101
+ data: [{
102
+ title: 'Styling',
103
+ id: 'styling'
104
+ }]
105
+ }];
65
106
 
66
- default:
67
- break;
107
+ var onIconClicked = function onIconClicked(action) {
108
+ if (!props.preview) {
109
+ switch (action) {
110
+ case 'add':
111
+ setShowModal(true);
112
+ break;
113
+
114
+ case 'config':
115
+ setShowConfigModal(true);
116
+ break;
117
+
118
+ default:
119
+ break;
120
+ }
68
121
  }
69
122
  };
70
123
 
71
124
  var cardIconClicked = function cardIconClicked(action, index) {
72
- props.cardIconClicked(action, index);
125
+ if (!props.preview) {
126
+ props.cardIconClicked(action, index);
127
+ }
73
128
  };
74
129
 
75
- var cardClicked = function cardClicked() {
76
- console.log('test');
130
+ var cardClicked = function cardClicked(index, props) {
131
+ if (!props.preview) {
132
+ props.cardClicked(props);
133
+ }
77
134
  };
78
135
 
79
136
  var cancelHandler = function cancelHandler() {
@@ -86,7 +143,7 @@ var EventsList = function EventsList(_ref) {
86
143
  };
87
144
 
88
145
  return /*#__PURE__*/_react.default.createElement(Container, null, /*#__PURE__*/_react.default.createElement(_ReusableList.default, Object.assign({
89
- listTitle: "My Events",
146
+ listTitle: props.title || "My Events",
90
147
  data: events,
91
148
  type: "flat",
92
149
  cardStyle: "card-style-11",
@@ -104,11 +161,33 @@ var EventsList = function EventsList(_ref) {
104
161
  return /*#__PURE__*/_react.default.createElement("div", null);
105
162
  }
106
163
  }, /*#__PURE__*/_react.default.createElement(_CreateEvent.default, {
107
- saveBtnText: "Create",
108
- cancelBtnText: "Cancel",
164
+ saveBtnText: props.saveBtnText || 'Create',
165
+ cancelBtnText: props.cancelBtnText || "Cancel",
109
166
  saveHandler: onAddFolder,
110
167
  cancelHandler: cancelHandler
111
- })));
168
+ })), /*#__PURE__*/_react.default.createElement(_ReactModal.default, {
169
+ modalIsOpen: showConfigModal,
170
+ closeModal: function closeModal() {
171
+ return setShowConfigModal(false);
172
+ },
173
+ exitModalButton: function exitModalButton(e) {
174
+ return /*#__PURE__*/_react.default.createElement("div", null);
175
+ }
176
+ }, /*#__PURE__*/_react.default.createElement(_Tabs.default, {
177
+ title: "Event Config",
178
+ tabs: tabs
179
+ }, /*#__PURE__*/_react.default.createElement(_EventsPreview.default, {
180
+ componentProps: {
181
+ events: events,
182
+ title: props.title || "My Events",
183
+ preview: true
184
+ },
185
+ formChanged: formChanged,
186
+ id: "preview"
187
+ }), /*#__PURE__*/_react.default.createElement(_Community.default, {
188
+ center: centerContext,
189
+ id: "community"
190
+ }))));
112
191
  };
113
192
 
114
193
  var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n"])));
@@ -0,0 +1,75 @@
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 _react = _interopRequireDefault(require("react"));
13
+
14
+ var Yup = _interopRequireWildcard(require("yup"));
15
+
16
+ var _styledComponents = _interopRequireDefault(require("styled-components"));
17
+
18
+ var _ReusableForm = _interopRequireDefault(require("../../Reusable Components/ReusableForm/ReusableForm"));
19
+
20
+ var _TextField = _interopRequireDefault(require("../../Common Inputs/TextField/TextField"));
21
+
22
+ var _templateObject;
23
+
24
+ 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); }
25
+
26
+ 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; }
27
+
28
+ var CreateSpace = function CreateSpace(props) {
29
+ var initialValues = {
30
+ title: ''
31
+ };
32
+ var formSchema = Yup.object().shape({
33
+ title: Yup.string().required("Required")
34
+ });
35
+ var sections = [{
36
+ title: "Space Details",
37
+ body: [/*#__PURE__*/_react.default.createElement(_TextField.default, {
38
+ label: "Title",
39
+ name: "title"
40
+ })],
41
+ hideTitle: false
42
+ }];
43
+
44
+ var onCreate = function onCreate(values) {
45
+ props.saveHandler(values);
46
+ };
47
+
48
+ var cancelHandler = function cancelHandler() {
49
+ props.cancelHandler();
50
+ };
51
+
52
+ return /*#__PURE__*/_react.default.createElement(Container, null, /*#__PURE__*/_react.default.createElement(_ReusableForm.default, Object.assign({
53
+ formTitle: props.title || "Create Space",
54
+ initialValues: initialValues,
55
+ formSchema: formSchema,
56
+ sections: sections,
57
+ saveBtnText: props.saveBtnText || 'Create',
58
+ cancelBtnText: props.cancelBtnText || 'Cancel',
59
+ saveHandler: onCreate,
60
+ cancelHandler: cancelHandler,
61
+ headerStyles: {
62
+ padding: 10,
63
+ headerBackground: 'black',
64
+ titleColor: '#ffff'
65
+ },
66
+ sectionPadding: 10,
67
+ bodyRowGap: 10
68
+ }, props.formStyles)));
69
+ };
70
+
71
+ var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\n"])));
72
+
73
+ CreateSpace.defaultProps = {};
74
+ var _default = CreateSpace;
75
+ exports.default = _default;
@@ -19,12 +19,26 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
19
19
 
20
20
  var _ai = require("react-icons/ai");
21
21
 
22
+ var _bs = require("react-icons/bs");
23
+
22
24
  var _Gallery = _interopRequireDefault(require("../../Reusable Components/Gallery/Gallery"));
23
25
 
24
26
  var _ReactModal = _interopRequireDefault(require("../../Reusable Components/ReactModal/ReactModal"));
25
27
 
26
28
  var _CreateFolder = _interopRequireDefault(require("../CreateFolder/CreateFolder"));
27
29
 
30
+ var _Tabs = _interopRequireDefault(require("../../Reusable Components/Tabs/Tabs"));
31
+
32
+ var _Sections = _interopRequireDefault(require("../../Sections/Sections"));
33
+
34
+ var _FoldersPreview = _interopRequireDefault(require("../../PreviewComponents/FoldersPreview/FoldersPreview"));
35
+
36
+ var _Library = require("../../Pages/Library/Folders/Library.stories");
37
+
38
+ var _Folders = require("./Folders.stories");
39
+
40
+ var _Community = _interopRequireDefault(require("../../Reusable Components/Community/Community"));
41
+
28
42
  var _templateObject;
29
43
 
30
44
  var _excluded = ["folders", "folderTitle", "columnsNumber", "columnGap", "rowGap", "cardClicked", "iconColor"];
@@ -37,6 +51,10 @@ var galleryControls = [{
37
51
  icon: /*#__PURE__*/_react.default.createElement(_ai.AiOutlineFileAdd, null),
38
52
  action: 'add',
39
53
  name: 'Add Photo'
54
+ }, {
55
+ icon: /*#__PURE__*/_react.default.createElement(_bs.BsGear, null),
56
+ action: 'config',
57
+ name: 'Config'
40
58
  }];
41
59
  var cardControls = [{
42
60
  icon: /*#__PURE__*/_react.default.createElement(_ai.AiFillDelete, null),
@@ -59,12 +77,52 @@ var Folders = function Folders(_ref) {
59
77
  showModal = _useState2[0],
60
78
  setShowModal = _useState2[1];
61
79
 
80
+ var _useState3 = (0, _react.useState)(false),
81
+ _useState4 = (0, _slicedToArray2.default)(_useState3, 2),
82
+ showConfigModal = _useState4[0],
83
+ setShowConfigModal = _useState4[1];
84
+
85
+ var _useState5 = (0, _react.useState)( /*#__PURE__*/_react.default.createElement(Folders, {
86
+ folders: folders
87
+ })),
88
+ _useState6 = (0, _slicedToArray2.default)(_useState5, 2),
89
+ centerContext = _useState6[0],
90
+ setCenterContext = _useState6[1];
91
+
92
+ var formChanged = function formChanged(values) {
93
+ setCenterContext( /*#__PURE__*/_react.default.createElement(Folders, Object.assign({
94
+ folders: folders
95
+ }, values)));
96
+ };
97
+
98
+ var tabs = [{
99
+ title: 'New',
100
+ id: 'preview'
101
+ }, {
102
+ title: 'Context',
103
+ id: 'community'
104
+ }];
105
+ var sections = [{
106
+ title: 'Styles',
107
+ data: [{
108
+ title: 'Styling',
109
+ component: /*#__PURE__*/_react.default.createElement(_Tabs.default, {
110
+ title: "Folders Config",
111
+ tabs: tabs
112
+ })
113
+ }]
114
+ }];
115
+
62
116
  var onIconClicked = function onIconClicked(action) {
63
117
  switch (action) {
64
118
  case 'add':
65
119
  setShowModal(true);
66
120
  break;
67
121
 
122
+ case 'config':
123
+ setShowConfigModal(true);
124
+ break;
125
+
68
126
  default:
69
127
  break;
70
128
  }
@@ -84,13 +142,10 @@ var Folders = function Folders(_ref) {
84
142
  };
85
143
 
86
144
  return /*#__PURE__*/_react.default.createElement(Container, null, /*#__PURE__*/_react.default.createElement(_Gallery.default, Object.assign({
87
- galleryTitle: "Your Folders",
145
+ galleryTitle: props.title || "Your Folders",
88
146
  data: folders,
89
147
  type: "flat",
90
148
  cardStyle: "card-style-10",
91
- columnsNumber: columnsNumber,
92
- galleryColumnGap: columnGap,
93
- galleryRowGap: rowGap,
94
149
  galleryControls: galleryControls,
95
150
  iconClicked: onIconClicked,
96
151
  cardClicked: cardClicked,
@@ -110,10 +165,31 @@ var Folders = function Folders(_ref) {
110
165
  cancelBtnText: "Cancel",
111
166
  saveHandler: onAddFolder,
112
167
  cancelHandler: cancelHandler
113
- })));
168
+ })), /*#__PURE__*/_react.default.createElement(_ReactModal.default, {
169
+ modalIsOpen: showConfigModal,
170
+ closeModal: function closeModal() {
171
+ return setShowConfigModal(false);
172
+ },
173
+ exitModalButton: function exitModalButton(e) {
174
+ return /*#__PURE__*/_react.default.createElement("div", null);
175
+ }
176
+ }, /*#__PURE__*/_react.default.createElement(_Tabs.default, {
177
+ title: "Event Config",
178
+ tabs: tabs
179
+ }, /*#__PURE__*/_react.default.createElement(_FoldersPreview.default, {
180
+ componentProps: {
181
+ folders: folders,
182
+ title: props.title || "Your Folders"
183
+ },
184
+ formChanged: formChanged,
185
+ id: "preview"
186
+ }), /*#__PURE__*/_react.default.createElement(_Community.default, {
187
+ center: centerContext,
188
+ id: "community"
189
+ }))));
114
190
  };
115
191
 
116
- var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background-color: black;\n"])));
192
+ var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background-color: transparent;\n"])));
117
193
 
118
194
  Folders.defaultProps = {};
119
195
  var _default = Folders;
@@ -19,12 +19,22 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
19
19
 
20
20
  var _ai = require("react-icons/ai");
21
21
 
22
+ var _bs = require("react-icons/bs");
23
+
22
24
  var _ReusableList = _interopRequireDefault(require("../../Reusable Components/ReusableList/ReusableList"));
23
25
 
24
26
  var _ReactModal = _interopRequireDefault(require("../../Reusable Components/ReactModal/ReactModal"));
25
27
 
26
28
  var _CreateFolder = _interopRequireDefault(require("../CreateFolder/CreateFolder"));
27
29
 
30
+ var _Tabs = _interopRequireDefault(require("../../Reusable Components/Tabs/Tabs"));
31
+
32
+ var _Sections = _interopRequireDefault(require("../../Sections/Sections"));
33
+
34
+ var _NotesPreview = _interopRequireDefault(require("../../PreviewComponents/NotesPreview/NotesPreview"));
35
+
36
+ var _Community = _interopRequireDefault(require("../../Reusable Components/Community/Community"));
37
+
28
38
  var _templateObject;
29
39
 
30
40
  var _excluded = ["notes", "iconColor", "cardTitleFontSize", "cardTitleColor", "cardPadding"];
@@ -37,6 +47,10 @@ var listControls = [{
37
47
  icon: /*#__PURE__*/_react.default.createElement(_ai.AiOutlineFileAdd, null),
38
48
  action: 'add',
39
49
  name: 'Add Photo'
50
+ }, {
51
+ icon: /*#__PURE__*/_react.default.createElement(_bs.BsGear, null),
52
+ action: 'config',
53
+ name: 'Config'
40
54
  }];
41
55
  var cardControls = [{
42
56
  icon: /*#__PURE__*/_react.default.createElement(_ai.AiFillDelete, null),
@@ -57,12 +71,52 @@ var Notes = function Notes(_ref) {
57
71
  showModal = _useState2[0],
58
72
  setShowModal = _useState2[1];
59
73
 
74
+ var _useState3 = (0, _react.useState)(false),
75
+ _useState4 = (0, _slicedToArray2.default)(_useState3, 2),
76
+ showConfigModal = _useState4[0],
77
+ setShowConfigModal = _useState4[1];
78
+
79
+ var _useState5 = (0, _react.useState)( /*#__PURE__*/_react.default.createElement(Notes, {
80
+ notes: notes
81
+ })),
82
+ _useState6 = (0, _slicedToArray2.default)(_useState5, 2),
83
+ centerContext = _useState6[0],
84
+ setCenterContext = _useState6[1];
85
+
86
+ var formChanged = function formChanged(values) {
87
+ setCenterContext( /*#__PURE__*/_react.default.createElement(Notes, Object.assign({
88
+ notes: notes
89
+ }, values)));
90
+ };
91
+
92
+ var tabs = [{
93
+ title: 'New',
94
+ id: 'preview'
95
+ }, {
96
+ title: 'Context',
97
+ id: 'community'
98
+ }];
99
+ var sections = [{
100
+ title: 'Styles',
101
+ data: [{
102
+ title: 'Styling',
103
+ component: /*#__PURE__*/_react.default.createElement(_Tabs.default, {
104
+ title: "Notes Config",
105
+ tabs: tabs
106
+ })
107
+ }]
108
+ }];
109
+
60
110
  var onIconClicked = function onIconClicked(action) {
61
111
  switch (action) {
62
112
  case 'add':
63
113
  setShowModal(true);
64
114
  break;
65
115
 
116
+ case 'config':
117
+ setShowConfigModal(true);
118
+ break;
119
+
66
120
  default:
67
121
  break;
68
122
  }
@@ -86,7 +140,7 @@ var Notes = function Notes(_ref) {
86
140
  };
87
141
 
88
142
  return /*#__PURE__*/_react.default.createElement(Container, null, /*#__PURE__*/_react.default.createElement(_ReusableList.default, Object.assign({
89
- listTitle: "My Notes",
143
+ listTitle: props.title || "My Notes",
90
144
  data: notes,
91
145
  type: "flat",
92
146
  cardStyle: "card-style-11",
@@ -104,11 +158,31 @@ var Notes = function Notes(_ref) {
104
158
  return /*#__PURE__*/_react.default.createElement("div", null);
105
159
  }
106
160
  }, /*#__PURE__*/_react.default.createElement(_CreateFolder.default, {
107
- saveBtnText: "Create",
108
- cancelBtnText: "Cancel",
161
+ saveBtnText: props.saveBtnText || "Create",
162
+ cancelBtnText: props.cancelBtnText || "Cancel",
109
163
  saveHandler: onAddFolder,
110
164
  cancelHandler: cancelHandler
111
- })));
165
+ })), /*#__PURE__*/_react.default.createElement(_ReactModal.default, {
166
+ modalIsOpen: showConfigModal,
167
+ closeModal: function closeModal() {
168
+ return setShowConfigModal(false);
169
+ },
170
+ exitModalButton: function exitModalButton(e) {
171
+ return /*#__PURE__*/_react.default.createElement("div", null);
172
+ }
173
+ }, /*#__PURE__*/_react.default.createElement(_Tabs.default, {
174
+ title: "Event Config",
175
+ tabs: tabs
176
+ }, /*#__PURE__*/_react.default.createElement(_NotesPreview.default, {
177
+ componentProps: {
178
+ notes: notes,
179
+ title: props.title || "Your Notes"
180
+ },
181
+ formChanged: formChanged
182
+ }), /*#__PURE__*/_react.default.createElement(_Community.default, {
183
+ center: centerContext,
184
+ id: "community"
185
+ }))));
112
186
  };
113
187
 
114
188
  var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n"])));
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.default = void 0;
9
+
10
+ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
11
+
12
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
13
+
14
+ var _react = _interopRequireWildcard(require("react"));
15
+
16
+ var _styledComponents = _interopRequireDefault(require("styled-components"));
17
+
18
+ var _ReactModal = _interopRequireDefault(require("../../Reusable Components/ReactModal/ReactModal"));
19
+
20
+ var _NavbarPreview = _interopRequireDefault(require("../../PreviewComponents/NavbarPreview/NavbarPreview"));
21
+
22
+ var _Buttons = _interopRequireDefault(require("../../Buttons/Buttons/Buttons"));
23
+
24
+ var _templateObject;
25
+
26
+ 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); }
27
+
28
+ 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; }
29
+
30
+ var SectionedPreview = function SectionedPreview() {
31
+ var _useState = (0, _react.useState)(false),
32
+ _useState2 = (0, _slicedToArray2.default)(_useState, 2),
33
+ showModal = _useState2[0],
34
+ setShowModal = _useState2[1];
35
+
36
+ return /*#__PURE__*/_react.default.createElement(Container, null, /*#__PURE__*/_react.default.createElement(_Buttons.default, {
37
+ label: 'Open Configurator',
38
+ size: "md",
39
+ variant: "primary",
40
+ buttonClicked: function buttonClicked() {
41
+ setShowModal(true);
42
+ }
43
+ }), /*#__PURE__*/_react.default.createElement(_ReactModal.default, {
44
+ modalIsOpen: showModal,
45
+ closeModal: function closeModal() {
46
+ return setShowModal(false);
47
+ }
48
+ }, /*#__PURE__*/_react.default.createElement(_NavbarPreview.default, null)));
49
+ };
50
+
51
+ var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\n"])));
52
+
53
+ var _default = SectionedPreview;
54
+ exports.default = _default;