@mohamed-karawia/library 0.1.17 → 0.1.18
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/stories/Chat/Chat.js +10 -12
- package/dist/stories/Enrollment/Admin/DetailedForm/DetailedForm.js +10 -12
- package/dist/stories/Enrollment/Admin/ViewForms/ViewForms.js +1 -1
- package/dist/stories/Enrollment/Guest/FillForm/FillForm.js +4 -17
- package/dist/stories/Events/Event/Event.js +1 -1
- package/dist/stories/Events/EventsList/EventsList.js +3 -3
- package/dist/stories/Library/Folders/Folders.js +1 -4
- package/dist/stories/Library/Notes/Notes.js +3 -3
- package/dist/stories/Music Album/ViewAlbum/ViewAlbum.js +4 -6
- package/dist/stories/Music Album/ViewAlbums/ViewAlbums.js +3 -6
- package/dist/stories/Pages/Enrollment/DetailedForm/DetailedForm.js +8 -0
- package/dist/stories/Pages/Enrollment/FillForm/FillForm.js +7 -1
- package/dist/stories/Pages/Enrollment/Forms/Forms.js +3 -1
- package/dist/stories/Pages/Events/Events/Events.js +1 -0
- package/dist/stories/Pages/Music/MusicAlbum/Music.js +8 -6
- package/dist/stories/Pages/Photos/Albums/Albums.js +4 -1
- package/dist/stories/Photo Album/ViewAlbum/ViewAlbum.js +4 -10
- package/dist/stories/Photo Album/ViewAlbums/ViewAlbums.js +3 -16
- package/dist/stories/Preview/Preview.js +36 -0
- package/dist/stories/Reusable Components/Gallery/Gallery.js +5 -1
- package/dist/stories/Reusable Components/ReusableForm/ReusableForm.js +1 -1
- package/dist/stories/VideoAlbum/ViewAlbum/ViewAlbum.js +1 -4
- package/dist/stories/Widgets/MusicPlayerWidget/MusicPlayerWidget.js +1 -1
- package/dist/stories/helpers/util.js +26 -2
- package/package.json +1 -1
- package/src/stories/Chat/Chat.jsx +9 -12
- package/src/stories/Enrollment/Admin/DetailedForm/DetailedForm.jsx +7 -9
- package/src/stories/Enrollment/Admin/ViewForms/ViewForms.jsx +3 -2
- package/src/stories/Enrollment/Guest/FillForm/FillForm.jsx +6 -16
- package/src/stories/Events/Event/Event.jsx +1 -1
- package/src/stories/Events/EventsList/EventsList.jsx +11 -6
- package/src/stories/Library/Folders/Folders.jsx +2 -4
- package/src/stories/Library/Notes/Notes.jsx +8 -4
- package/src/stories/Music Album/ViewAlbum/ViewAlbum.jsx +9 -4
- package/src/stories/Music Album/ViewAlbums/ViewAlbums.jsx +6 -7
- package/src/stories/Pages/Enrollment/DetailedForm/DetailedForm.jsx +10 -1
- package/src/stories/Pages/Enrollment/FillForm/FillForm.jsx +6 -0
- package/src/stories/Pages/Enrollment/Forms/Forms.jsx +3 -1
- package/src/stories/Pages/Events/Events/Events.jsx +75 -74
- package/src/stories/Pages/Library/Folders/Library.jsx +1 -1
- package/src/stories/Pages/Music/MusicAlbum/Music.jsx +8 -6
- package/src/stories/Pages/Photos/Albums/Albums.jsx +3 -0
- package/src/stories/Pages/ViewWorld/styles.json +1 -1
- package/src/stories/Photo Album/ViewAlbum/ViewAlbum.jsx +6 -9
- package/src/stories/Photo Album/ViewAlbums/ViewAlbums.jsx +5 -25
- package/src/stories/Preview/Preview.jsx +27 -0
- package/src/stories/Reusable Components/Gallery/Gallery.jsx +5 -1
- package/src/stories/Reusable Components/ReusableForm/ReusableForm.jsx +1 -1
- package/src/stories/Reusable Components/ReusableHeader/ReusableHeader.jsx +0 -2
- package/src/stories/VideoAlbum/ViewAlbum/ViewAlbum.jsx +3 -5
- package/src/stories/Widgets/MusicPlayerWidget/MusicPlayerWidget.jsx +1 -1
- package/src/stories/helpers/util.js +19 -1
@@ -15,27 +15,24 @@ var _react = _interopRequireDefault(require("react"));
|
|
15
15
|
|
16
16
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
17
17
|
|
18
|
-
var _fakeData = require("../Reusable Components/fakeData");
|
19
|
-
|
20
|
-
var _ReusableHeader = _interopRequireDefault(require("../Reusable Components/ReusableHeader/ReusableHeader"));
|
21
|
-
|
22
18
|
var _ReusableList = _interopRequireDefault(require("../Reusable Components/ReusableList/ReusableList"));
|
23
19
|
|
24
20
|
var _RichTextInput = _interopRequireDefault(require("../Common Inputs/RichTextInput/RichTextInput"));
|
25
21
|
|
26
22
|
var _templateObject;
|
27
23
|
|
28
|
-
var _excluded = ["data", "
|
24
|
+
var _excluded = ["data", "users", "title", "backgroundColor"];
|
29
25
|
|
30
26
|
var Chat = function Chat(_ref) {
|
31
27
|
var data = _ref.data,
|
32
|
-
title = _ref.title,
|
33
|
-
cardBackgroundColor = _ref.cardBackgroundColor,
|
34
|
-
textColor = _ref.textColor,
|
35
28
|
users = _ref.users,
|
29
|
+
title = _ref.title,
|
30
|
+
backgroundColor = _ref.backgroundColor,
|
36
31
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
37
|
-
return /*#__PURE__*/_react.default.createElement(Container,
|
38
|
-
|
32
|
+
return /*#__PURE__*/_react.default.createElement(Container, {
|
33
|
+
backgroundColor: backgroundColor
|
34
|
+
}, /*#__PURE__*/_react.default.createElement(_ReusableList.default, Object.assign({
|
35
|
+
listTitle: title || 'Chat',
|
39
36
|
type: "flat",
|
40
37
|
data: data,
|
41
38
|
cardStyle: "card-style-8"
|
@@ -44,8 +41,9 @@ var Chat = function Chat(_ref) {
|
|
44
41
|
}));
|
45
42
|
};
|
46
43
|
|
47
|
-
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n
|
48
|
-
|
44
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n background-color: ", ";\n"])), function (_ref2) {
|
45
|
+
var backgroundColor = _ref2.backgroundColor;
|
46
|
+
return backgroundColor || 'transparent';
|
49
47
|
});
|
50
48
|
|
51
49
|
Chat.defaultProps = {
|
@@ -30,25 +30,21 @@ var DetailedForm = function DetailedForm(_ref) {
|
|
30
30
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
31
31
|
|
32
32
|
var onAccept = function onAccept() {
|
33
|
-
|
33
|
+
props.onAccept();
|
34
34
|
};
|
35
35
|
|
36
36
|
var onDecline = function onDecline() {
|
37
|
-
|
37
|
+
props.onDecline();
|
38
38
|
};
|
39
39
|
|
40
|
-
return /*#__PURE__*/_react.default.createElement(Container, null, /*#__PURE__*/_react.default.createElement(User, null, /*#__PURE__*/_react.default.createElement(_CardStyle.default, {
|
40
|
+
return /*#__PURE__*/_react.default.createElement(Container, null, /*#__PURE__*/_react.default.createElement(User, null, /*#__PURE__*/_react.default.createElement(_CardStyle.default, Object.assign({
|
41
41
|
title: userName,
|
42
|
-
img: userImg
|
43
|
-
|
44
|
-
|
45
|
-
listTitle: "Form",
|
42
|
+
img: userImg
|
43
|
+
}, props.userHeaderStyles))), /*#__PURE__*/_react.default.createElement(_ReusableList.default, Object.assign({
|
44
|
+
listTitle: props.title || "Form",
|
46
45
|
data: questions,
|
47
46
|
type: "flat",
|
48
|
-
cardStyle: "card-style-3"
|
49
|
-
customCardStyles: {
|
50
|
-
cardPadding: 10
|
51
|
-
}
|
47
|
+
cardStyle: "card-style-3"
|
52
48
|
}, props)), /*#__PURE__*/_react.default.createElement(Buttons, null, /*#__PURE__*/_react.default.createElement(Accept, {
|
53
49
|
onClick: onAccept
|
54
50
|
}, "Accept"), /*#__PURE__*/_react.default.createElement(Decline, {
|
@@ -56,7 +52,9 @@ var DetailedForm = function DetailedForm(_ref) {
|
|
56
52
|
}, "Decline")));
|
57
53
|
};
|
58
54
|
|
59
|
-
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background-color:
|
55
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background-color: ", ";\n padding: 10px 0;\n width: 100%;\n"])), function (props) {
|
56
|
+
return props.backgroundColor || 'transparent';
|
57
|
+
});
|
60
58
|
|
61
59
|
var User = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n\n"])));
|
62
60
|
|
@@ -19,7 +19,7 @@ var ViewForms = function ViewForms(_ref) {
|
|
19
19
|
var data = _ref.data,
|
20
20
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
21
21
|
return /*#__PURE__*/_react.default.createElement(_ReusableList.default, Object.assign({
|
22
|
-
listTitle: "Submitted Forms",
|
22
|
+
listTitle: props.title || "Submitted Forms",
|
23
23
|
data: data,
|
24
24
|
cardStyle: "card-style-9",
|
25
25
|
type: "sectioned"
|
@@ -25,13 +25,6 @@ var FillForm = function FillForm(_ref) {
|
|
25
25
|
var sections = _ref.sections,
|
26
26
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
27
27
|
|
28
|
-
// const initialValues = {
|
29
|
-
// question0: '',
|
30
|
-
// question1: '',
|
31
|
-
// question2: '',
|
32
|
-
// question3: '',
|
33
|
-
// question4: '',
|
34
|
-
// }
|
35
28
|
var onCreate = function onCreate(values) {
|
36
29
|
console.log(values);
|
37
30
|
};
|
@@ -40,21 +33,15 @@ var FillForm = function FillForm(_ref) {
|
|
40
33
|
console.log('Canceled');
|
41
34
|
};
|
42
35
|
|
43
|
-
return /*#__PURE__*/_react.default.createElement(Container, null, /*#__PURE__*/_react.default.createElement(_ReusableForm.default
|
44
|
-
|
45
|
-
formTitle: "Join Community Form",
|
36
|
+
return /*#__PURE__*/_react.default.createElement(Container, null, /*#__PURE__*/_react.default.createElement(_ReusableForm.default, Object.assign({
|
37
|
+
formTitle: props.formTitle || 'Join Community Form',
|
46
38
|
sections: sections,
|
47
39
|
saveBtnText: props.saveBtnText,
|
48
40
|
cancelBtnText: props.cancelBtnText,
|
49
41
|
saveHandler: onCreate,
|
50
42
|
cancelHandler: cancelHandler,
|
51
|
-
|
52
|
-
|
53
|
-
headerBackground: 'black',
|
54
|
-
titleColor: '#ffff'
|
55
|
-
},
|
56
|
-
bodyRowGap: 10
|
57
|
-
}));
|
43
|
+
bodyRowGap: props.bodyRowGap || 10
|
44
|
+
}, props)));
|
58
45
|
};
|
59
46
|
|
60
47
|
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n"])));
|
@@ -50,7 +50,7 @@ var Event = function Event(_ref) {
|
|
50
50
|
|
51
51
|
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n font-family: sans-serif;\n background-color: ", ";\n"])), function (_ref2) {
|
52
52
|
var backgroundColor = _ref2.backgroundColor;
|
53
|
-
return backgroundColor;
|
53
|
+
return backgroundColor || 'transparent';
|
54
54
|
});
|
55
55
|
|
56
56
|
var CoverWrapper = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n height: 300px;\n"])));
|
@@ -86,7 +86,7 @@ var EventsList = function EventsList(_ref) {
|
|
86
86
|
};
|
87
87
|
|
88
88
|
return /*#__PURE__*/_react.default.createElement(Container, null, /*#__PURE__*/_react.default.createElement(_ReusableList.default, Object.assign({
|
89
|
-
listTitle: "My Events",
|
89
|
+
listTitle: props.title || "My Events",
|
90
90
|
data: events,
|
91
91
|
type: "flat",
|
92
92
|
cardStyle: "card-style-11",
|
@@ -104,8 +104,8 @@ var EventsList = function EventsList(_ref) {
|
|
104
104
|
return /*#__PURE__*/_react.default.createElement("div", null);
|
105
105
|
}
|
106
106
|
}, /*#__PURE__*/_react.default.createElement(_CreateEvent.default, {
|
107
|
-
saveBtnText:
|
108
|
-
cancelBtnText: "Cancel",
|
107
|
+
saveBtnText: props.saveBtnText || 'Create',
|
108
|
+
cancelBtnText: props.cancelBtnText || "Cancel",
|
109
109
|
saveHandler: onAddFolder,
|
110
110
|
cancelHandler: cancelHandler
|
111
111
|
})));
|
@@ -84,13 +84,10 @@ var Folders = function Folders(_ref) {
|
|
84
84
|
};
|
85
85
|
|
86
86
|
return /*#__PURE__*/_react.default.createElement(Container, null, /*#__PURE__*/_react.default.createElement(_Gallery.default, Object.assign({
|
87
|
-
galleryTitle: "Your Folders",
|
87
|
+
galleryTitle: props.title || "Your Folders",
|
88
88
|
data: folders,
|
89
89
|
type: "flat",
|
90
90
|
cardStyle: "card-style-10",
|
91
|
-
columnsNumber: columnsNumber,
|
92
|
-
galleryColumnGap: columnGap,
|
93
|
-
galleryRowGap: rowGap,
|
94
91
|
galleryControls: galleryControls,
|
95
92
|
iconClicked: onIconClicked,
|
96
93
|
cardClicked: cardClicked,
|
@@ -86,7 +86,7 @@ var Notes = function Notes(_ref) {
|
|
86
86
|
};
|
87
87
|
|
88
88
|
return /*#__PURE__*/_react.default.createElement(Container, null, /*#__PURE__*/_react.default.createElement(_ReusableList.default, Object.assign({
|
89
|
-
listTitle: "My Notes",
|
89
|
+
listTitle: props.title || "My Notes",
|
90
90
|
data: notes,
|
91
91
|
type: "flat",
|
92
92
|
cardStyle: "card-style-11",
|
@@ -104,8 +104,8 @@ var Notes = function Notes(_ref) {
|
|
104
104
|
return /*#__PURE__*/_react.default.createElement("div", null);
|
105
105
|
}
|
106
106
|
}, /*#__PURE__*/_react.default.createElement(_CreateFolder.default, {
|
107
|
-
saveBtnText: "Create",
|
108
|
-
cancelBtnText: "Cancel",
|
107
|
+
saveBtnText: props.saveBtnText || "Create",
|
108
|
+
cancelBtnText: props.cancelBtnText || "Cancel",
|
109
109
|
saveHandler: onAddFolder,
|
110
110
|
cancelHandler: cancelHandler
|
111
111
|
})));
|
@@ -80,7 +80,7 @@ var ViewAlbum = function ViewAlbum(_ref) {
|
|
80
80
|
};
|
81
81
|
|
82
82
|
return /*#__PURE__*/_react.default.createElement(Container, null, /*#__PURE__*/_react.default.createElement(_ReusableList.default, Object.assign({
|
83
|
-
listTitle: "My Album",
|
83
|
+
listTitle: props.title || "My Album",
|
84
84
|
data: album,
|
85
85
|
cardStyle: "card-style-7",
|
86
86
|
type: "flat",
|
@@ -102,15 +102,13 @@ var ViewAlbum = function ViewAlbum(_ref) {
|
|
102
102
|
}, /*#__PURE__*/_react.default.createElement(_AddSong.default, {
|
103
103
|
saveHandler: onAddSong,
|
104
104
|
cancelHandler: cancelHandler,
|
105
|
-
saveBtnText: "Create",
|
106
|
-
cancelBtnText: "Cancel"
|
105
|
+
saveBtnText: props.saveBtnText || "Create",
|
106
|
+
cancelBtnText: props.cancelBtnText || "Cancel"
|
107
107
|
})));
|
108
108
|
};
|
109
109
|
|
110
110
|
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n"])));
|
111
111
|
|
112
|
-
ViewAlbum.defaultProps = {
|
113
|
-
cardBackgroundColor: 'white'
|
114
|
-
};
|
112
|
+
ViewAlbum.defaultProps = {};
|
115
113
|
var _default = ViewAlbum;
|
116
114
|
exports.default = _default;
|
@@ -99,13 +99,10 @@ var ViewAlbums = function ViewAlbums(_ref) {
|
|
99
99
|
};
|
100
100
|
|
101
101
|
return /*#__PURE__*/_react.default.createElement(Container, null, /*#__PURE__*/_react.default.createElement(_Gallery.default, Object.assign({
|
102
|
-
galleryTitle: props.title,
|
102
|
+
galleryTitle: props.title || 'musicAlbums',
|
103
103
|
data: albums,
|
104
104
|
type: "flat",
|
105
105
|
cardStyle: "card-style-6",
|
106
|
-
columnsNumber: 3,
|
107
|
-
galleryColumnGap: 10,
|
108
|
-
galleryRowGap: 20,
|
109
106
|
galleryControls: galleryControls,
|
110
107
|
iconClicked: onHeaderIconClicked,
|
111
108
|
cardControls: cardControls,
|
@@ -121,8 +118,8 @@ var ViewAlbums = function ViewAlbums(_ref) {
|
|
121
118
|
}, /*#__PURE__*/_react.default.createElement(_CreateMusicAlbum.default, {
|
122
119
|
saveHandler: onAddAlbum,
|
123
120
|
cancelHandler: cancelHandler,
|
124
|
-
saveBtnText: "Create",
|
125
|
-
cancelBtnText: "Cancel"
|
121
|
+
saveBtnText: props.saveBtnText || "Create",
|
122
|
+
cancelBtnText: props.cancelBtnText || "Cancel"
|
126
123
|
})));
|
127
124
|
};
|
128
125
|
|
@@ -98,6 +98,14 @@ var DetailedForm = function DetailedForm(props) {
|
|
98
98
|
dropdownFontColor: 'white',
|
99
99
|
dropdownItemHoverColor: '#FE1744'
|
100
100
|
}
|
101
|
+
},
|
102
|
+
userHeaderStyles: {
|
103
|
+
cardBackgroundColor: '#FE1744',
|
104
|
+
cardImageRadius: "100",
|
105
|
+
cardTitleColor: 'white'
|
106
|
+
},
|
107
|
+
customCardStyles: {
|
108
|
+
cardPadding: 10
|
101
109
|
}
|
102
110
|
}))), /*#__PURE__*/_react.default.createElement(_Right.default, null)));
|
103
111
|
};
|
@@ -92,9 +92,15 @@ var FillForm = function FillForm(props) {
|
|
92
92
|
discription: "Lorem ipsum dolor sit amet consectetur.",
|
93
93
|
hideTitle: true
|
94
94
|
}, /*#__PURE__*/_react.default.createElement(_FillForm.default, {
|
95
|
+
formTitle: "Community Form",
|
95
96
|
sections: sections,
|
96
97
|
saveBtnText: 'Submit',
|
97
|
-
cancelBtnText: "Cancel"
|
98
|
+
cancelBtnText: "Cancel",
|
99
|
+
headerStyles: {
|
100
|
+
padding: 10,
|
101
|
+
headerBackground: 'black',
|
102
|
+
titleColor: '#ffff'
|
103
|
+
}
|
98
104
|
}))), /*#__PURE__*/_react.default.createElement(_Right.default, null)));
|
99
105
|
};
|
100
106
|
|
@@ -121,7 +121,6 @@ var Forms = function Forms(props) {
|
|
121
121
|
}
|
122
122
|
}
|
123
123
|
})), /*#__PURE__*/_react.default.createElement(_Center.default, null, /*#__PURE__*/_react.default.createElement(_SpaceContainer.default, {
|
124
|
-
title: "Music Album",
|
125
124
|
discription: "Lorem ipsum dolor sit amet consectetur.",
|
126
125
|
hideTitle: true
|
127
126
|
}, /*#__PURE__*/_react.default.createElement(_ViewForms.default, {
|
@@ -142,6 +141,9 @@ var Forms = function Forms(props) {
|
|
142
141
|
cardTitleColor: 'white',
|
143
142
|
cardBackgroundColor: 'black',
|
144
143
|
cardPadding: 10
|
144
|
+
},
|
145
|
+
customCardStyles: {
|
146
|
+
cardBackgroundColor: 'white'
|
145
147
|
}
|
146
148
|
}))), /*#__PURE__*/_react.default.createElement(_Right.default, null)));
|
147
149
|
};
|
@@ -60,7 +60,7 @@ var Music = function Music(props) {
|
|
60
60
|
var _useState3 = (0, _react.useState)([{
|
61
61
|
index: 0,
|
62
62
|
cover: _music4.default,
|
63
|
-
musicSrc: 'https://www.pacdv.com/sounds/free-music/
|
63
|
+
musicSrc: 'https://www.pacdv.com/sounds/free-music/gentle-thoughts-1.mp3',
|
64
64
|
title: 'Plans We Made',
|
65
65
|
description: 'Son Lux',
|
66
66
|
time: '5:20'
|
@@ -74,7 +74,7 @@ var Music = function Music(props) {
|
|
74
74
|
}, {
|
75
75
|
index: 1,
|
76
76
|
cover: _music5.default,
|
77
|
-
musicSrc: 'https://www.pacdv.com/sounds/free-music/
|
77
|
+
musicSrc: 'https://www.pacdv.com/sounds/free-music/glow-in-the-dark.mp3',
|
78
78
|
title: 'Night',
|
79
79
|
description: 'Frank Ocean',
|
80
80
|
time: '5:20'
|
@@ -88,14 +88,14 @@ var Music = function Music(props) {
|
|
88
88
|
}, {
|
89
89
|
index: 4,
|
90
90
|
cover: _music3.default,
|
91
|
-
musicSrc: 'https://www.pacdv.com/sounds/free-music/
|
91
|
+
musicSrc: 'https://www.pacdv.com/sounds/free-music/gentle-thoughts-1.mp3',
|
92
92
|
title: 'Enter Sandman',
|
93
93
|
description: 'Metallica',
|
94
94
|
time: '5:20'
|
95
95
|
}, {
|
96
96
|
index: 5,
|
97
97
|
cover: _music2.default,
|
98
|
-
musicSrc: 'https://www.pacdv.com/sounds/free-music/
|
98
|
+
musicSrc: 'https://www.pacdv.com/sounds/free-music/glow-in-the-dark.mp3',
|
99
99
|
title: 'November Rain',
|
100
100
|
description: "Guns N' Roses",
|
101
101
|
time: '5:20'
|
@@ -193,8 +193,9 @@ var Music = function Music(props) {
|
|
193
193
|
}
|
194
194
|
},
|
195
195
|
customCardStyles: {
|
196
|
+
cardBackgroundColor: 'white',
|
196
197
|
controlsStyles: {
|
197
|
-
iconColor: '
|
198
|
+
iconColor: 'black'
|
198
199
|
}
|
199
200
|
}
|
200
201
|
}))), /*#__PURE__*/_react.default.createElement(_Right.default, null, /*#__PURE__*/_react.default.createElement(_WidgetContainer.default, {
|
@@ -210,7 +211,8 @@ var Music = function Music(props) {
|
|
210
211
|
prevSong: prevSong,
|
211
212
|
currentSong: currentSong,
|
212
213
|
borderRadius: '10',
|
213
|
-
primaryColor: 'black'
|
214
|
+
primaryColor: 'black',
|
215
|
+
backgroundColor: 'white'
|
214
216
|
},
|
215
217
|
headerStyles: {
|
216
218
|
controlsStyles: {
|
@@ -168,7 +168,10 @@ var Albums = function Albums(props) {
|
|
168
168
|
onDeleteAlbum: onDeleteAlbum,
|
169
169
|
onAddAlbum: onAddAlbum,
|
170
170
|
columnsNumber: 2,
|
171
|
-
cardClicked: cardClicked
|
171
|
+
cardClicked: cardClicked,
|
172
|
+
customCardStyles: {
|
173
|
+
cardBackgroundColor: 'white'
|
174
|
+
}
|
172
175
|
}))), /*#__PURE__*/_react.default.createElement(_Right.default, null, /*#__PURE__*/_react.default.createElement(_WidgetContainer.default, {
|
173
176
|
widgetType: "folders",
|
174
177
|
widgetProps: {
|
@@ -29,7 +29,7 @@ var _ai = require("react-icons/ai");
|
|
29
29
|
|
30
30
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
31
31
|
|
32
|
-
var _excluded = ["album", "cardBackgroundColor", "imgTitleColor", "
|
32
|
+
var _excluded = ["album", "cardBackgroundColor", "imgTitleColor", "descColor"];
|
33
33
|
|
34
34
|
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
35
|
|
@@ -50,9 +50,6 @@ var ViewAlbum = function ViewAlbum(_ref) {
|
|
50
50
|
var album = _ref.album,
|
51
51
|
cardBackgroundColor = _ref.cardBackgroundColor,
|
52
52
|
imgTitleColor = _ref.imgTitleColor,
|
53
|
-
columnsNumber = _ref.columnsNumber,
|
54
|
-
columnGap = _ref.columnGap,
|
55
|
-
rowGap = _ref.rowGap,
|
56
53
|
descColor = _ref.descColor,
|
57
54
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
58
55
|
var cardStyles = {
|
@@ -157,13 +154,10 @@ var ViewAlbum = function ViewAlbum(_ref) {
|
|
157
154
|
};
|
158
155
|
|
159
156
|
return /*#__PURE__*/_react.default.createElement(Container, null, /*#__PURE__*/_react.default.createElement(_Gallery.default, Object.assign({
|
160
|
-
galleryTitle: "Photo Album",
|
157
|
+
galleryTitle: props.title || "Photo Album",
|
161
158
|
data: album,
|
162
159
|
type: "flat",
|
163
160
|
cardStyle: "card-style-6",
|
164
|
-
columnsNumber: columnsNumber,
|
165
|
-
galleryColumnGap: columnGap,
|
166
|
-
galleryRowGap: rowGap,
|
167
161
|
galleryControls: galleryControls,
|
168
162
|
iconClicked: onIconClicked,
|
169
163
|
cardClicked: cardClicked,
|
@@ -181,8 +175,8 @@ var ViewAlbum = function ViewAlbum(_ref) {
|
|
181
175
|
}, /*#__PURE__*/_react.default.createElement(_AddPhoto.default, {
|
182
176
|
saveHandler: onAddPhoto,
|
183
177
|
cancelHandler: cancelHandler,
|
184
|
-
saveBtnText: 'Add',
|
185
|
-
cancelBtnText: 'Cancel'
|
178
|
+
saveBtnText: props.saveBtnText || 'Add',
|
179
|
+
cancelBtnText: props.saveBtnText || 'Cancel'
|
186
180
|
})), /*#__PURE__*/_react.default.createElement(_ReactModal.default, {
|
187
181
|
modalIsOpen: showImgModal,
|
188
182
|
closeModal: function closeModal() {
|
@@ -27,7 +27,7 @@ var _ai = require("react-icons/ai");
|
|
27
27
|
|
28
28
|
var _templateObject;
|
29
29
|
|
30
|
-
var _excluded = ["albums"
|
30
|
+
var _excluded = ["albums"];
|
31
31
|
|
32
32
|
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
33
|
|
@@ -46,9 +46,6 @@ var galleryControls = [{
|
|
46
46
|
|
47
47
|
var ViewAlbums = function ViewAlbums(_ref) {
|
48
48
|
var albums = _ref.albums,
|
49
|
-
columnsNumber = _ref.columnsNumber,
|
50
|
-
columnGap = _ref.columnGap,
|
51
|
-
rowGap = _ref.rowGap,
|
52
49
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
53
50
|
|
54
51
|
var _useState = (0, _react.useState)(false),
|
@@ -81,13 +78,10 @@ var ViewAlbums = function ViewAlbums(_ref) {
|
|
81
78
|
};
|
82
79
|
|
83
80
|
return /*#__PURE__*/_react.default.createElement(Container, null, /*#__PURE__*/_react.default.createElement(_Gallery.default, Object.assign({
|
84
|
-
galleryTitle: "Photo Albums",
|
81
|
+
galleryTitle: props.title || "Photo Albums",
|
85
82
|
data: albums,
|
86
83
|
type: "flat",
|
87
84
|
cardStyle: "card-style-6",
|
88
|
-
columnsNumber: columnsNumber,
|
89
|
-
galleryColumnGap: columnGap,
|
90
|
-
galleryRowGap: rowGap,
|
91
85
|
galleryControls: galleryControls,
|
92
86
|
iconClicked: onIconClicked,
|
93
87
|
cardControls: cardControls,
|
@@ -108,13 +102,6 @@ var ViewAlbums = function ViewAlbums(_ref) {
|
|
108
102
|
|
109
103
|
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n"])));
|
110
104
|
|
111
|
-
ViewAlbums.defaultProps = {
|
112
|
-
columnsNumber: 3,
|
113
|
-
headerBackground: '#FE1744',
|
114
|
-
titleColor: 'white',
|
115
|
-
cardBackgroundColor: 'white',
|
116
|
-
columnGap: 10,
|
117
|
-
rowGap: 20
|
118
|
-
};
|
105
|
+
ViewAlbums.defaultProps = {};
|
119
106
|
var _default = ViewAlbums;
|
120
107
|
exports.default = _default;
|
@@ -0,0 +1,36 @@
|
|
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 _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
13
|
+
|
14
|
+
var _react = _interopRequireDefault(require("react"));
|
15
|
+
|
16
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
17
|
+
|
18
|
+
var _util = require("../helpers/util");
|
19
|
+
|
20
|
+
var _templateObject;
|
21
|
+
|
22
|
+
var _excluded = ["type", "componentProps", "stylingProps"];
|
23
|
+
|
24
|
+
var Preview = function Preview(_ref) {
|
25
|
+
var type = _ref.type,
|
26
|
+
componentProps = _ref.componentProps,
|
27
|
+
stylingProps = _ref.stylingProps,
|
28
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
29
|
+
var child = (0, _util.getComponentType)(type, componentProps, stylingProps);
|
30
|
+
return /*#__PURE__*/_react.default.createElement(Container, null, child);
|
31
|
+
};
|
32
|
+
|
33
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n"])));
|
34
|
+
|
35
|
+
var _default = Preview;
|
36
|
+
exports.default = _default;
|
@@ -115,6 +115,10 @@ var SectionBody = _styledComponents.default.div(_templateObject4 || (_templateOb
|
|
115
115
|
return props.galleryRowGap;
|
116
116
|
});
|
117
117
|
|
118
|
-
Gallery.defaultProps = {
|
118
|
+
Gallery.defaultProps = {
|
119
|
+
columnsNumber: 3,
|
120
|
+
galleryColumnGap: 10,
|
121
|
+
galleryRowGap: 20
|
122
|
+
};
|
119
123
|
var _default = Gallery;
|
120
124
|
exports.default = _default;
|
@@ -73,7 +73,7 @@ var ReusableForm = function ReusableForm(_ref) {
|
|
73
73
|
};
|
74
74
|
|
75
75
|
var CreateForm = (0, _styledComponents.default)(_formik.Form)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background-color: ", ";\n display: flex;\n flex-direction: column;\n\n"])), function (props) {
|
76
|
-
return props.formBackgroundColor || '
|
76
|
+
return props.formBackgroundColor || 'transparent';
|
77
77
|
});
|
78
78
|
|
79
79
|
var FormSection = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n padding: ", "px;\n"])), function (props) {
|
@@ -106,13 +106,10 @@ var ViewAlbum = function ViewAlbum(_ref) {
|
|
106
106
|
};
|
107
107
|
|
108
108
|
return /*#__PURE__*/_react.default.createElement(Container, null, /*#__PURE__*/_react.default.createElement(_Gallery.default, Object.assign({
|
109
|
-
galleryTitle: "Video Album",
|
109
|
+
galleryTitle: props.title || "Video Album",
|
110
110
|
data: album,
|
111
111
|
type: "flat",
|
112
112
|
cardStyle: "card-style-6",
|
113
|
-
columnsNumber: 3,
|
114
|
-
galleryColumnGap: 10,
|
115
|
-
galleryRowGap: 20,
|
116
113
|
galleryControls: galleryControls,
|
117
114
|
iconClicked: onHeaderIconClicked,
|
118
115
|
cardControls: cardControls,
|
@@ -58,7 +58,7 @@ var MusicPlayerWidget = function MusicPlayerWidget(_ref) {
|
|
58
58
|
var MusicPlayer = (0, _styledComponents.default)(_reactH5AudioPlayer.default)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\n font-family: ", ";\n background-color: ", ";\n border-radius: ", ";\n padding: ", "px;\n width: ", "px;\n box-shadow: ", ";\n\n .rhap_progress-filled,\n .rhap_progress-indicator {\n background-color: ", ";\n }\n \n .rhap_repeat-button,\n .rhap_main-controls-button,\n .rhap_volume-button,\n .rhap_time {\n color: ", ";\n }\n \n .rhap_download-progress,\n .rhap_volume-bar {\n background-color: gray ;\n }\n \n\n .rhap_volume-indicator {\n background: ", ";\n }\n\n"])), function (props) {
|
59
59
|
return props.fontFamily || 'inherit';
|
60
60
|
}, function (props) {
|
61
|
-
return props.backgroundColor || '
|
61
|
+
return props.backgroundColor || 'transparent';
|
62
62
|
}, function (props) {
|
63
63
|
return props.borderRadius ? props.borderRadius + 'px' : 'inherit';
|
64
64
|
}, function (props) {
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
6
6
|
value: true
|
7
7
|
});
|
8
|
-
exports.getWidgetType = exports.getCardStyle = exports.addObjectToArray = exports.deleteFromArrayByIndex = exports.stringSearch = void 0;
|
8
|
+
exports.getComponentType = exports.getWidgetType = exports.getCardStyle = exports.addObjectToArray = exports.deleteFromArrayByIndex = exports.stringSearch = void 0;
|
9
9
|
|
10
10
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/toConsumableArray"));
|
11
11
|
|
@@ -43,8 +43,19 @@ var _Notes = _interopRequireDefault(require("../Library/Notes/Notes"));
|
|
43
43
|
|
44
44
|
var _Folders = _interopRequireDefault(require("../Library/Folders/Folders"));
|
45
45
|
|
46
|
+
var _Navbar = _interopRequireDefault(require("../Navbar/Navbar"));
|
47
|
+
|
48
|
+
var _ViewAlbums = _interopRequireDefault(require("../Music Album/ViewAlbums/ViewAlbums"));
|
49
|
+
|
50
|
+
var _ViewAlbum = _interopRequireDefault(require("../Music Album/ViewAlbum/ViewAlbum"));
|
51
|
+
|
52
|
+
var _ViewAlbums2 = _interopRequireDefault(require("../Photo Album/ViewAlbums/ViewAlbums"));
|
53
|
+
|
54
|
+
var _ViewAlbum2 = _interopRequireDefault(require("../Photo Album/ViewAlbum/ViewAlbum"));
|
55
|
+
|
46
56
|
// Cards
|
47
57
|
// Widgets
|
58
|
+
// Components
|
48
59
|
var stringSearch = function stringSearch(str, word) {
|
49
60
|
str = str.toUpperCase();
|
50
61
|
word = word.toUpperCase();
|
@@ -190,4 +201,17 @@ var getWidgetType = function getWidgetType(widgetType, props, _cardClicked) {
|
|
190
201
|
return widgetTypes[widgetType];
|
191
202
|
};
|
192
203
|
|
193
|
-
exports.getWidgetType = getWidgetType;
|
204
|
+
exports.getWidgetType = getWidgetType;
|
205
|
+
|
206
|
+
var getComponentType = function getComponentType(componentType, componentProps, stylingProps) {
|
207
|
+
var componentTypes = {
|
208
|
+
'Navbar': /*#__PURE__*/_react.default.createElement(_Navbar.default, Object.assign({}, componentProps, stylingProps)),
|
209
|
+
'MusicAlbums': /*#__PURE__*/_react.default.createElement(_ViewAlbums.default, Object.assign({}, componentProps, stylingProps)),
|
210
|
+
'MusicAlbum': /*#__PURE__*/_react.default.createElement(_ViewAlbum.default, Object.assign({}, componentProps, stylingProps)),
|
211
|
+
'PhotoAlbum': /*#__PURE__*/_react.default.createElement(_ViewAlbum2.default, Object.assign({}, componentProps, stylingProps)),
|
212
|
+
'PhotoAlbums': /*#__PURE__*/_react.default.createElement(_ViewAlbums2.default, Object.assign({}, componentProps, stylingProps))
|
213
|
+
};
|
214
|
+
return componentTypes[componentType];
|
215
|
+
};
|
216
|
+
|
217
|
+
exports.getComponentType = getComponentType;
|