@mohamed-karawia/library 0.1.18 → 0.1.19
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/stories/Chat/Chat.js +120 -3
- package/dist/stories/Common Inputs/Picker/Picker.js +61 -0
- package/dist/stories/Common Inputs/TextField/TextField.js +3 -1
- package/dist/stories/Community/Community.js +137 -0
- package/dist/stories/Events/Event/Event.js +116 -4
- package/dist/stories/Events/EventsList/EventsList.js +95 -16
- package/dist/stories/Forms/CreateSpace/CreateSpace.js +75 -0
- package/dist/stories/Library/Folders/Folders.js +80 -1
- package/dist/stories/Library/Notes/Notes.js +75 -1
- package/dist/stories/Modals/NavbarPreviewModal/NavbarPreviewModal.js +54 -0
- package/dist/stories/Music Album/ViewAlbum/ViewAlbum.js +134 -9
- package/dist/stories/Music Album/ViewAlbums/ViewAlbums.js +65 -23
- package/dist/stories/Navbar/Navbar.js +1 -1
- package/dist/stories/Pages/Events/Event/Event.js +14 -5
- package/dist/stories/Pages/Music/MusicAlbums/MusicAlbums.js +2 -15
- package/dist/stories/Photo Album/ViewAlbum/ViewAlbum.js +76 -9
- package/dist/stories/Photo Album/ViewAlbums/ViewAlbums.js +80 -9
- package/dist/stories/Preview/Preview.js +1 -0
- package/dist/stories/PreviewComponents/ChatPreview/ChatPreview.js +193 -0
- package/dist/stories/PreviewComponents/EventPreview/EventPreview.js +158 -0
- package/dist/stories/PreviewComponents/EventsPreview/EventsPreview.js +192 -0
- package/dist/stories/PreviewComponents/FoldersPreview/FoldersPreview.js +182 -0
- package/dist/stories/PreviewComponents/MusicAlbumPreview/MusicAlbumPreview.js +177 -0
- package/dist/stories/PreviewComponents/MusicAlbumsPreview/MusicAlbumsPreview.js +181 -0
- package/dist/stories/PreviewComponents/MusicPlayerPreview/MusicPlayerPreview.js +153 -0
- package/dist/stories/PreviewComponents/NavbarPreview/NavbarPreview.js +112 -0
- package/dist/stories/PreviewComponents/NotesPreview/NotesPreview.js +173 -0
- package/dist/stories/PreviewComponents/PhotoAlbumPreview/PhotoAlbumPreview.js +189 -0
- package/dist/stories/PreviewComponents/PhotoAlbumsPreview/PhotoAlbumsPreview.js +189 -0
- package/dist/stories/PreviewComponents/SpacesListPreview/SpacesListPreview.js +197 -0
- package/dist/stories/PreviewComponents/VideoAlbumPreview/VideoAlbumPreview.js +189 -0
- package/dist/stories/PreviewComponents/VideoAlbumsPreview/VideoAlbumsPreview.js +175 -0
- package/dist/stories/PreviewComponents/VideoPreview/VideoPreview.js +172 -0
- package/dist/stories/PreviewComponents/globalStyles.js +26 -0
- package/dist/stories/Reusable Components/Cards/Card-style-10/CardStyle10.js +4 -3
- package/dist/stories/Reusable Components/Cards/Card-style-11/CardStyle11.js +8 -4
- package/dist/stories/Reusable Components/Cards/Card-style-6/CardStyle6.js +10 -4
- package/dist/stories/Reusable Components/Cards/Card-style-8/CardStyle8.js +4 -2
- package/dist/stories/Reusable Components/Cards/globalCardStyles.js +2 -2
- package/dist/stories/Reusable Components/Community/Community.js +76 -0
- package/dist/stories/Reusable Components/Gallery/Gallery.js +12 -17
- package/dist/stories/Reusable Components/ReactModal/ReactModal.js +11 -30
- package/dist/stories/Reusable Components/ReusableForm/ReusableForm.js +19 -2
- package/dist/stories/Reusable Components/ReusableList/ReusableList.js +9 -5
- package/dist/stories/Reusable Components/Tabs/Tabs.js +68 -0
- package/dist/stories/Sections/Sections.js +8 -2
- package/dist/stories/VideoAlbum/AlbumsGallery/AlbumsGallery.js +77 -18
- package/dist/stories/VideoAlbum/VideoSpace/VideoSpace.js +96 -3
- package/dist/stories/VideoAlbum/ViewAlbum/ViewAlbum.js +77 -1
- package/dist/stories/Widgets/MusicPlayerWidget/MusicPlayerWidget.js +16 -10
- package/dist/stories/Widgets/SpacesListWidget/SpacesListWidget.js +115 -0
- package/dist/stories/Widgets/UsersWidget/UsersWidget.js +30 -0
- package/dist/stories/helpers/util.js +36 -3
- package/dist/stories/store/communities.js +943 -0
- package/dist/stories/store/store.js +44 -0
- package/package.json +5 -2
- package/src/stories/Chat/Chat.jsx +104 -5
- package/src/stories/Common Inputs/Picker/Picker.jsx +47 -0
- package/src/stories/Common Inputs/TextField/TextField.jsx +1 -1
- package/src/stories/Community/Community.jsx +110 -0
- package/src/stories/Events/Event/Event.jsx +97 -4
- package/src/stories/Events/EventsList/EventsList.jsx +91 -17
- package/src/stories/Forms/CreateSpace/CreateSpace.jsx +73 -0
- package/src/stories/Library/Folders/Folders.jsx +79 -1
- package/src/stories/Library/Notes/Notes.jsx +57 -1
- package/src/stories/Modals/NavbarPreviewModal/NavbarPreviewModal.jsx +31 -0
- package/src/stories/Music Album/ViewAlbum/ViewAlbum.jsx +125 -11
- package/src/stories/Music Album/ViewAlbums/ViewAlbums.jsx +56 -26
- package/src/stories/Navbar/Navbar.jsx +1 -1
- package/src/stories/Pages/Events/Event/Event.jsx +12 -4
- package/src/stories/Pages/Music/MusicAlbums/MusicAlbums.jsx +0 -13
- package/src/stories/Pages/ViewWorld/styles.json +1 -1
- package/src/stories/Photo Album/ViewAlbum/ViewAlbum.jsx +57 -4
- package/src/stories/Photo Album/ViewAlbums/ViewAlbums.jsx +62 -9
- package/src/stories/Preview/Preview.jsx +9 -1
- package/src/stories/PreviewComponents/ChatPreview/ChatPreview.jsx +132 -0
- package/src/stories/PreviewComponents/EventPreview/EventPreview.jsx +116 -0
- package/src/stories/PreviewComponents/EventsPreview/EventsPreview.jsx +132 -0
- package/src/stories/PreviewComponents/FoldersPreview/FoldersPreview.jsx +127 -0
- package/src/stories/PreviewComponents/MusicAlbumPreview/MusicAlbumPreview.jsx +124 -0
- package/src/stories/PreviewComponents/MusicAlbumsPreview/MusicAlbumsPreview.jsx +126 -0
- package/src/stories/PreviewComponents/MusicPlayerPreview/MusicPlayerPreview.jsx +113 -0
- package/src/stories/PreviewComponents/NavbarPreview/NavbarPreview.jsx +93 -0
- package/src/stories/PreviewComponents/NotesPreview/NotesPreview.jsx +122 -0
- package/src/stories/PreviewComponents/PhotoAlbumPreview/PhotoAlbumPreview.jsx +129 -0
- package/src/stories/PreviewComponents/PhotoAlbumsPreview/PhotoAlbumsPreview.jsx +129 -0
- package/src/stories/PreviewComponents/SpacesListPreview/SpacesListPreview.jsx +138 -0
- package/src/stories/PreviewComponents/VideoAlbumPreview/VideoAlbumPreview.jsx +129 -0
- package/src/stories/PreviewComponents/VideoAlbumsPreview/VideoAlbumsPreview.jsx +124 -0
- package/src/stories/PreviewComponents/VideoPreview/VideoPreview.jsx +125 -0
- package/src/stories/PreviewComponents/globalStyles.js +20 -0
- package/src/stories/Reusable Components/Cards/Card-style-10/CardStyle10.jsx +5 -2
- package/src/stories/Reusable Components/Cards/Card-style-11/CardStyle11.jsx +5 -5
- package/src/stories/Reusable Components/Cards/Card-style-6/CardStyle6.jsx +12 -6
- package/src/stories/Reusable Components/Cards/Card-style-8/CardStyle8.jsx +2 -2
- package/src/stories/Reusable Components/Cards/globalCardStyles.js +2 -1
- package/src/stories/Reusable Components/Community/Community.jsx +70 -0
- package/src/stories/Reusable Components/Gallery/Gallery.jsx +10 -9
- package/src/stories/Reusable Components/ReactModal/ReactModal.jsx +3 -25
- package/src/stories/Reusable Components/ReusableForm/ReusableForm.jsx +18 -6
- package/src/stories/Reusable Components/ReusableList/ReusableList.jsx +9 -4
- package/src/stories/Reusable Components/Tabs/Tabs.jsx +67 -0
- package/src/stories/Sections/Sections.jsx +5 -2
- package/src/stories/VideoAlbum/AlbumsGallery/AlbumsGallery.jsx +57 -16
- package/src/stories/VideoAlbum/VideoSpace/VideoSpace.jsx +70 -1
- package/src/stories/VideoAlbum/ViewAlbum/ViewAlbum.jsx +62 -3
- package/src/stories/Widgets/MusicPlayerWidget/MusicPlayerWidget.jsx +13 -6
- package/src/stories/Widgets/SpacesListWidget/SpacesListWidget.jsx +78 -0
- package/src/stories/Widgets/UsersWidget/UsersWidget.jsx +20 -0
- package/src/stories/helpers/util.js +24 -2
- package/src/stories/store/communities.js +705 -0
- package/src/stories/store/store.js +33 -0
- package/src/stories/styling.json +92 -0
@@ -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
|
}
|
@@ -107,7 +165,28 @@ var Folders = function Folders(_ref) {
|
|
107
165
|
cancelBtnText: "Cancel",
|
108
166
|
saveHandler: onAddFolder,
|
109
167
|
cancelHandler: cancelHandler
|
110
|
-
}))
|
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
|
+
}))));
|
111
190
|
};
|
112
191
|
|
113
192
|
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background-color: transparent;\n"])));
|
@@ -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
|
}
|
@@ -108,7 +162,27 @@ var Notes = function Notes(_ref) {
|
|
108
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;
|
@@ -23,8 +23,24 @@ 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
|
+
|
42
|
+
var _styling = _interopRequireDefault(require("../../styling.json"));
|
43
|
+
|
28
44
|
var _templateObject;
|
29
45
|
|
30
46
|
var _excluded = ["album", "cardBackgroundColor", "songTitleColor"];
|
@@ -37,6 +53,10 @@ var listControls = [{
|
|
37
53
|
icon: /*#__PURE__*/_react.default.createElement(_ai.AiOutlineFileAdd, null),
|
38
54
|
action: 'add',
|
39
55
|
name: 'Add Album'
|
56
|
+
}, {
|
57
|
+
icon: /*#__PURE__*/_react.default.createElement(_bs.BsGear, null),
|
58
|
+
action: 'config',
|
59
|
+
name: 'Config'
|
40
60
|
}];
|
41
61
|
var cardControls = [{
|
42
62
|
icon: /*#__PURE__*/_react.default.createElement(_ai.AiOutlineDelete, null),
|
@@ -55,19 +75,61 @@ var ViewAlbum = function ViewAlbum(_ref) {
|
|
55
75
|
showModal = _useState2[0],
|
56
76
|
setShowModal = _useState2[1];
|
57
77
|
|
58
|
-
var
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
78
|
+
var _useState3 = (0, _react.useState)(false),
|
79
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
80
|
+
showConfigModal = _useState4[0],
|
81
|
+
setShowConfigModal = _useState4[1];
|
82
|
+
|
83
|
+
var _useState5 = (0, _react.useState)( /*#__PURE__*/_react.default.createElement(ViewAlbum, {
|
84
|
+
album: album
|
85
|
+
})),
|
86
|
+
_useState6 = (0, _slicedToArray2.default)(_useState5, 2),
|
87
|
+
centerContext = _useState6[0],
|
88
|
+
setCenterContext = _useState6[1];
|
89
|
+
|
90
|
+
var formChanged = function formChanged(values) {
|
91
|
+
console.log('context changed');
|
92
|
+
setCenterContext( /*#__PURE__*/_react.default.createElement(ViewAlbum, Object.assign({
|
93
|
+
album: album
|
94
|
+
}, values)));
|
95
|
+
};
|
96
|
+
|
97
|
+
var tabs = [{
|
98
|
+
title: 'New',
|
99
|
+
id: 'preview'
|
100
|
+
}, {
|
101
|
+
title: 'Context',
|
102
|
+
id: 'community'
|
103
|
+
}];
|
104
|
+
var sections = [{
|
105
|
+
title: 'Styles',
|
106
|
+
data: [{
|
107
|
+
title: 'Styling',
|
108
|
+
id: 'styling'
|
109
|
+
}]
|
110
|
+
}];
|
63
111
|
|
64
|
-
|
65
|
-
|
112
|
+
var onIconClicked = function onIconClicked(action) {
|
113
|
+
if (!props.preview) {
|
114
|
+
switch (action) {
|
115
|
+
case 'add':
|
116
|
+
setShowModal(true);
|
117
|
+
break;
|
118
|
+
|
119
|
+
case 'config':
|
120
|
+
setShowConfigModal(true);
|
121
|
+
break;
|
122
|
+
|
123
|
+
default:
|
124
|
+
break;
|
125
|
+
}
|
66
126
|
}
|
67
127
|
};
|
68
128
|
|
69
129
|
var cardIconClicked = function cardIconClicked(action, index) {
|
70
|
-
props.
|
130
|
+
if (!props.preview) {
|
131
|
+
props.cardIconClicked(action, index);
|
132
|
+
}
|
71
133
|
};
|
72
134
|
|
73
135
|
var onAddSong = function onAddSong(song) {
|
@@ -104,7 +166,70 @@ var ViewAlbum = function ViewAlbum(_ref) {
|
|
104
166
|
cancelHandler: cancelHandler,
|
105
167
|
saveBtnText: props.saveBtnText || "Create",
|
106
168
|
cancelBtnText: props.cancelBtnText || "Cancel"
|
107
|
-
}))
|
169
|
+
})), /*#__PURE__*/_react.default.createElement(_ReactModal.default, {
|
170
|
+
modalIsOpen: showConfigModal,
|
171
|
+
closeModal: function closeModal() {
|
172
|
+
localStorage.removeItem('formStyles');
|
173
|
+
setShowConfigModal(false);
|
174
|
+
},
|
175
|
+
exitModalButton: function exitModalButton(e) {
|
176
|
+
return /*#__PURE__*/_react.default.createElement("div", null);
|
177
|
+
}
|
178
|
+
}, /*#__PURE__*/_react.default.createElement(_Sections.default, {
|
179
|
+
sections: sections,
|
180
|
+
backgroundColor: 'white',
|
181
|
+
sectionHeaderStyles: {
|
182
|
+
titleColor: 'white',
|
183
|
+
headerBackground: 'transparent'
|
184
|
+
},
|
185
|
+
customCardStyles: {
|
186
|
+
cardPadding: 6,
|
187
|
+
cardTitleFontSize: 15,
|
188
|
+
cardBackgroundColor: '#2c2c2c',
|
189
|
+
cardTitleColor: 'white',
|
190
|
+
onHoverBackgroundColor: '#555555',
|
191
|
+
controlsStyles: {
|
192
|
+
showOnHover: true
|
193
|
+
}
|
194
|
+
}
|
195
|
+
}, /*#__PURE__*/_react.default.createElement(_Tabs.default, {
|
196
|
+
title: "Music Album Config",
|
197
|
+
tabs: tabs,
|
198
|
+
id: "styling"
|
199
|
+
}, /*#__PURE__*/_react.default.createElement(_MusicAlbumPreview.default, {
|
200
|
+
componentProps: {
|
201
|
+
album: album,
|
202
|
+
title: props.title || "My Album",
|
203
|
+
preview: true
|
204
|
+
},
|
205
|
+
formChanged: formChanged,
|
206
|
+
id: "preview"
|
207
|
+
}), /*#__PURE__*/_react.default.createElement(_Community.default, {
|
208
|
+
right: /*#__PURE__*/_react.default.createElement(_WidgetContainer.default, {
|
209
|
+
widgetType: "music player",
|
210
|
+
widgetProps: {
|
211
|
+
playlist: album,
|
212
|
+
currentSong: 1
|
213
|
+
}
|
214
|
+
}),
|
215
|
+
left: /*#__PURE__*/_react.default.createElement(_WidgetContainer.default, {
|
216
|
+
widgetType: "spaces-list",
|
217
|
+
widgetProps: {
|
218
|
+
listTitle: 'Your Spaces',
|
219
|
+
type: 'sectioned',
|
220
|
+
spaces: _constatnts.SPACES,
|
221
|
+
cardStyle: 'card-style-3',
|
222
|
+
cardClicked: function cardClicked() {
|
223
|
+
return alert('clicked');
|
224
|
+
},
|
225
|
+
headerStyles: _styling.default.widgetContainer.header,
|
226
|
+
sectionHeaderStyles: _styling.default.widgetContainer.body.sectionHeaderStyles,
|
227
|
+
customCardStyles: _styling.default.widgetContainer.body.customCardStyles
|
228
|
+
}
|
229
|
+
}),
|
230
|
+
center: centerContext,
|
231
|
+
id: "community"
|
232
|
+
})))));
|
108
233
|
};
|
109
234
|
|
110
235
|
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n"])));
|
@@ -23,8 +23,16 @@ 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
|
+
|
26
32
|
var _ai = require("react-icons/ai");
|
27
33
|
|
34
|
+
var _bs = require("react-icons/bs");
|
35
|
+
|
28
36
|
var _templateObject;
|
29
37
|
|
30
38
|
var _excluded = ["albums", "albumTitleColor", "descColor"];
|
@@ -42,6 +50,10 @@ var galleryControls = [{
|
|
42
50
|
icon: /*#__PURE__*/_react.default.createElement(_ai.AiOutlineFileAdd, null),
|
43
51
|
action: 'add',
|
44
52
|
name: 'Add Album'
|
53
|
+
}, {
|
54
|
+
icon: /*#__PURE__*/_react.default.createElement(_bs.BsGear, null),
|
55
|
+
action: 'config',
|
56
|
+
name: 'Config'
|
45
57
|
}];
|
46
58
|
|
47
59
|
var ViewAlbums = function ViewAlbums(_ref) {
|
@@ -49,37 +61,47 @@ var ViewAlbums = function ViewAlbums(_ref) {
|
|
49
61
|
albumTitleColor = _ref.albumTitleColor,
|
50
62
|
descColor = _ref.descColor,
|
51
63
|
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
64
|
|
72
65
|
var _useState = (0, _react.useState)(false),
|
73
66
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
74
67
|
showModal = _useState2[0],
|
75
68
|
setShowModal = _useState2[1];
|
76
69
|
|
70
|
+
var _useState3 = (0, _react.useState)(false),
|
71
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
72
|
+
showConfigModal = _useState4[0],
|
73
|
+
setShowConfigModal = _useState4[1];
|
74
|
+
|
75
|
+
var tabs = [{
|
76
|
+
title: 'New',
|
77
|
+
component: /*#__PURE__*/_react.default.createElement(_MusicAlbumsPreview.default, {
|
78
|
+
componentProps: {
|
79
|
+
albums: albums,
|
80
|
+
title: props.title || 'Music Albums'
|
81
|
+
}
|
82
|
+
})
|
83
|
+
}];
|
84
|
+
var sections = [{
|
85
|
+
title: 'Styles',
|
86
|
+
data: [{
|
87
|
+
title: 'Styling',
|
88
|
+
component: /*#__PURE__*/_react.default.createElement(_Tabs.default, {
|
89
|
+
title: "Music Albums Config",
|
90
|
+
tabs: tabs
|
91
|
+
})
|
92
|
+
}]
|
93
|
+
}];
|
94
|
+
|
77
95
|
var onHeaderIconClicked = function onHeaderIconClicked(action) {
|
78
96
|
switch (action) {
|
79
97
|
case 'add':
|
80
98
|
setShowModal(true);
|
81
99
|
break;
|
82
100
|
|
101
|
+
case 'config':
|
102
|
+
setShowConfigModal(true);
|
103
|
+
break;
|
104
|
+
|
83
105
|
default:
|
84
106
|
break;
|
85
107
|
}
|
@@ -99,7 +121,7 @@ var ViewAlbums = function ViewAlbums(_ref) {
|
|
99
121
|
};
|
100
122
|
|
101
123
|
return /*#__PURE__*/_react.default.createElement(Container, null, /*#__PURE__*/_react.default.createElement(_Gallery.default, Object.assign({
|
102
|
-
galleryTitle: props.title || '
|
124
|
+
galleryTitle: props.title || 'Music Albums',
|
103
125
|
data: albums,
|
104
126
|
type: "flat",
|
105
127
|
cardStyle: "card-style-6",
|
@@ -120,13 +142,33 @@ var ViewAlbums = function ViewAlbums(_ref) {
|
|
120
142
|
cancelHandler: cancelHandler,
|
121
143
|
saveBtnText: props.saveBtnText || "Create",
|
122
144
|
cancelBtnText: props.cancelBtnText || "Cancel"
|
145
|
+
})), /*#__PURE__*/_react.default.createElement(_ReactModal.default, {
|
146
|
+
modalIsOpen: showConfigModal,
|
147
|
+
closeModal: function closeModal() {
|
148
|
+
return setShowConfigModal(false);
|
149
|
+
},
|
150
|
+
exitModalButton: function exitModalButton(e) {
|
151
|
+
return /*#__PURE__*/_react.default.createElement("div", null);
|
152
|
+
}
|
153
|
+
}, /*#__PURE__*/_react.default.createElement(_Sections.default, {
|
154
|
+
sections: sections,
|
155
|
+
backgroundColor: 'white',
|
156
|
+
sectionHeaderStyles: {
|
157
|
+
titleColor: 'white',
|
158
|
+
headerBackground: 'transparent'
|
159
|
+
},
|
160
|
+
customCardStyles: {
|
161
|
+
cardPadding: 6,
|
162
|
+
cardTitleFontSize: 15,
|
163
|
+
cardBackgroundColor: '#2c2c2c',
|
164
|
+
cardTitleColor: 'white',
|
165
|
+
onHoverBackgroundColor: '#555555'
|
166
|
+
}
|
123
167
|
})));
|
124
168
|
};
|
125
169
|
|
126
170
|
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n"])));
|
127
171
|
|
128
|
-
ViewAlbums.defaultProps = {
|
129
|
-
cardBackgroundColor: 'white'
|
130
|
-
};
|
172
|
+
ViewAlbums.defaultProps = {};
|
131
173
|
var _default = ViewAlbums;
|
132
174
|
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: '
|
222
|
+
width: '100%',
|
223
223
|
height: '72px',
|
224
224
|
display: 'flex',
|
225
225
|
'align-items': 'center',
|