@mohamed-karawia/library 0.1.15 → 0.1.16
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/stories/Chat/Chat.js +5 -26
- package/dist/stories/Enrollment/Admin/CreateForm/CreateForm.js +1 -1
- package/dist/stories/Enrollment/Admin/DetailedForm/DetailedForm.js +2 -12
- package/dist/stories/Enrollment/Admin/ViewForms/ViewForms.js +1 -16
- package/dist/stories/Library/Folders/Folders.js +1 -2
- package/dist/stories/Library/ViewNote/ViewNote.js +7 -10
- package/dist/stories/Music Album/ViewAlbum/ViewAlbum.js +1 -8
- package/dist/stories/Music Album/ViewAlbums/ViewAlbums.js +3 -6
- package/dist/stories/Navbar/Navbar.js +14 -44
- package/dist/stories/Pages/Chat/Chat.js +13 -1
- package/dist/stories/Pages/Enrollment/DetailedForm/DetailedForm.js +11 -1
- package/dist/stories/Pages/Enrollment/Forms/Forms.js +21 -1
- package/dist/stories/Pages/Library/Folders/Library.js +5 -0
- package/dist/stories/Pages/Music/MusicAlbum/Music.js +5 -0
- package/dist/stories/Pages/Music/MusicAlbums/MusicAlbums.js +43 -1
- package/dist/stories/Pages/Photos/Album/Album.js +7 -1
- package/dist/stories/Pages/Photos/Albums/Albums.js +34 -1
- package/dist/stories/Photo Album/ViewAlbum/ViewAlbum.js +0 -8
- package/dist/stories/Photo Album/ViewAlbums/ViewAlbums.js +3 -36
- package/dist/stories/Reusable Components/Cards/Card-style-10/CardStyle10.js +7 -3
- package/dist/stories/Reusable Components/Cards/Card-style-3/CardStyle3.js +3 -2
- package/dist/stories/Reusable Components/Cards/Card-style-9/CardStyle9.js +26 -15
- package/dist/stories/Reusable Components/Cards/globalCardStyles.js +1 -1
- package/dist/stories/Reusable Components/ReusableList/ReusableList.js +6 -4
- package/dist/stories/Sections/Sections.js +61 -0
- package/dist/stories/helpers/util.js +11 -5
- package/package.json +1 -1
- package/src/stories/Chat/Chat.jsx +3 -25
- package/src/stories/Enrollment/Admin/CreateForm/CreateForm.jsx +1 -0
- package/src/stories/Enrollment/Admin/DetailedForm/DetailedForm.jsx +1 -10
- package/src/stories/Enrollment/Admin/ViewForms/ViewForms.jsx +0 -15
- package/src/stories/Library/Folders/Folders.jsx +1 -3
- package/src/stories/Library/ViewNote/ViewNote.jsx +1 -12
- package/src/stories/Music Album/ViewAlbum/ViewAlbum.jsx +0 -7
- package/src/stories/Music Album/ViewAlbums/ViewAlbums.jsx +1 -4
- package/src/stories/Navbar/Navbar.jsx +50 -48
- package/src/stories/Pages/Chat/Chat.jsx +17 -4
- package/src/stories/Pages/Enrollment/DetailedForm/DetailedForm.jsx +11 -1
- package/src/stories/Pages/Enrollment/Forms/Forms.jsx +20 -0
- package/src/stories/Pages/Library/Folders/Library.jsx +5 -0
- package/src/stories/Pages/Music/MusicAlbum/Music.jsx +9 -3
- package/src/stories/Pages/Music/MusicAlbums/MusicAlbums.jsx +38 -24
- package/src/stories/Pages/Photos/Album/Album.jsx +7 -1
- package/src/stories/Pages/Photos/Albums/Albums.jsx +22 -20
- package/src/stories/Photo Album/ViewAlbum/ViewAlbum.jsx +0 -8
- package/src/stories/Photo Album/ViewAlbums/ViewAlbums.jsx +1 -35
- package/src/stories/Reusable Components/Cards/Card-style-10/CardStyle10.jsx +8 -4
- package/src/stories/Reusable Components/Cards/Card-style-3/CardStyle3.jsx +5 -2
- package/src/stories/Reusable Components/Cards/Card-style-9/CardStyle9.jsx +12 -8
- package/src/stories/Reusable Components/Cards/globalCardStyles.js +1 -1
- package/src/stories/Reusable Components/ReusableList/ReusableList.jsx +15 -4
- package/src/stories/Sections/Sections.jsx +53 -0
- package/src/stories/helpers/util.js +9 -5
@@ -47,14 +47,19 @@ var CardStyle10 = function CardStyle10(_ref) {
|
|
47
47
|
props.iconClicked(action, props.index);
|
48
48
|
};
|
49
49
|
|
50
|
+
var cardClicked = function cardClicked() {
|
51
|
+
props.cardClicked();
|
52
|
+
};
|
53
|
+
|
50
54
|
return /*#__PURE__*/_react.default.createElement(Card, Object.assign({
|
55
|
+
onClick: cardClicked,
|
51
56
|
onMouseEnter: function onMouseEnter(e) {
|
52
57
|
return setShowIcons(true);
|
53
58
|
},
|
54
59
|
onMouseLeave: function onMouseLeave(e) {
|
55
60
|
return setShowIcons(false);
|
56
61
|
}
|
57
|
-
}, props), /*#__PURE__*/_react.default.createElement(SvgWrapper, props, /*#__PURE__*/_react.default.createElement(_ai.AiFillFolderOpen,
|
62
|
+
}, props), /*#__PURE__*/_react.default.createElement(SvgWrapper, props, /*#__PURE__*/_react.default.createElement(_ai.AiFillFolderOpen, props)), /*#__PURE__*/_react.default.createElement(Content, props, /*#__PURE__*/_react.default.createElement(_globalCardStyles.Title, props, title), /*#__PURE__*/_react.default.createElement(_globalCardStyles.Description, props, description)), /*#__PURE__*/_react.default.createElement(_Controls.default, Object.assign({
|
58
63
|
controls: cardControls,
|
59
64
|
show: showIcons,
|
60
65
|
onIconClicked: iconCliked,
|
@@ -64,7 +69,6 @@ var CardStyle10 = function CardStyle10(_ref) {
|
|
64
69
|
iconSize: 20,
|
65
70
|
iconsGap: 10,
|
66
71
|
maxIcons: 0,
|
67
|
-
iconColor: "#FE1744",
|
68
72
|
dropdownFontSize: 10
|
69
73
|
}, props.controlsStyles)));
|
70
74
|
};
|
@@ -72,7 +76,7 @@ var CardStyle10 = function CardStyle10(_ref) {
|
|
72
76
|
var Card = (0, _styledComponents.default)(_globalCardStyles.MainCard)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n flex-direction: column;\n row-gap: 10px;\n"])));
|
73
77
|
var Content = (0, _styledComponents.default)(_globalCardStyles.globalContent)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n align-items: center;\n justify-content: space-between;\n\n"])));
|
74
78
|
|
75
|
-
var SvgWrapper = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n\n svg{\n width: 70px;\n height: 70px;\n fill: ", "\n }\n"])), function (props) {
|
79
|
+
var SvgWrapper = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n\n & svg{\n width: 70px;\n height: 70px;\n fill: ", "\n }\n"])), function (props) {
|
76
80
|
return props.iconColor;
|
77
81
|
});
|
78
82
|
|
@@ -21,7 +21,7 @@ var _Controls = _interopRequireDefault(require("../../Controls/Controls"));
|
|
21
21
|
|
22
22
|
var _globalCardStyles = require("../globalCardStyles");
|
23
23
|
|
24
|
-
var _templateObject;
|
24
|
+
var _templateObject, _templateObject2;
|
25
25
|
|
26
26
|
var _excluded = ["title", "description", "path"];
|
27
27
|
|
@@ -48,7 +48,7 @@ var CardStyle3 = function CardStyle3(_ref) {
|
|
48
48
|
props.cardClicked(path);
|
49
49
|
};
|
50
50
|
|
51
|
-
return /*#__PURE__*/_react.default.createElement(
|
51
|
+
return /*#__PURE__*/_react.default.createElement(Card, Object.assign({
|
52
52
|
onClick: cardClicked,
|
53
53
|
onMouseEnter: function onMouseEnter(e) {
|
54
54
|
return setShowIcons(true);
|
@@ -66,6 +66,7 @@ var CardStyle3 = function CardStyle3(_ref) {
|
|
66
66
|
var Content = (0, _styledComponents.default)(_globalCardStyles.globalContent)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n row-gap: ", "px;\n"])), function (props) {
|
67
67
|
return props.rowGap;
|
68
68
|
});
|
69
|
+
var Card = (0, _styledComponents.default)(_globalCardStyles.MainCard)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n cursor: pointer;\n"])));
|
69
70
|
CardStyle3.defaultProps = {};
|
70
71
|
var _default = CardStyle3;
|
71
72
|
exports.default = _default;
|
@@ -17,7 +17,7 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
17
17
|
|
18
18
|
var _globalCardStyles = require("../globalCardStyles");
|
19
19
|
|
20
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9;
|
20
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10;
|
21
21
|
|
22
22
|
var _excluded = ["username", "answered", "img", "status"];
|
23
23
|
|
@@ -33,19 +33,29 @@ var CardStyle9 = function CardStyle9(_ref) {
|
|
33
33
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
34
34
|
console.log(props);
|
35
35
|
|
36
|
-
var
|
37
|
-
|
36
|
+
var onAction = function onAction(action) {
|
37
|
+
props.iconClicked(action);
|
38
38
|
};
|
39
39
|
|
40
|
-
return /*#__PURE__*/_react.default.createElement(Card,
|
40
|
+
return /*#__PURE__*/_react.default.createElement(Card, props, /*#__PURE__*/_react.default.createElement(ImgWrapper, props, /*#__PURE__*/_react.default.createElement(_globalCardStyles.Img, {
|
41
|
+
src: img
|
42
|
+
})), /*#__PURE__*/_react.default.createElement(Content, props, /*#__PURE__*/_react.default.createElement(Title, Object.assign({
|
41
43
|
onClick: function onClick() {
|
42
44
|
return props.cardClicked();
|
43
45
|
}
|
44
|
-
}, props), /*#__PURE__*/_react.default.createElement(
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
}, "Accept"), /*#__PURE__*/_react.default.createElement(Decline,
|
46
|
+
}, props), username), /*#__PURE__*/_react.default.createElement(Answered, null, "Questions Answered: ", answered), /*#__PURE__*/_react.default.createElement(Buttons, null, /*#__PURE__*/_react.default.createElement(Accept, {
|
47
|
+
onClick: function onClick() {
|
48
|
+
return onAction('accept');
|
49
|
+
}
|
50
|
+
}, "Accept"), /*#__PURE__*/_react.default.createElement(Decline, {
|
51
|
+
onClick: function onClick() {
|
52
|
+
return onAction('decline');
|
53
|
+
}
|
54
|
+
}, "Decline"), status === 'pending' && /*#__PURE__*/_react.default.createElement(Review, {
|
55
|
+
onClick: function onClick() {
|
56
|
+
return onAction('review');
|
57
|
+
}
|
58
|
+
}, "In Review"))));
|
49
59
|
};
|
50
60
|
|
51
61
|
var Card = (0, _styledComponents.default)(_globalCardStyles.MainCard)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n align-items: center;\n gap: 20px;\n padding: 10px;\n"])));
|
@@ -57,15 +67,16 @@ var ImgWrapper = _styledComponents.default.div(_templateObject2 || (_templateObj
|
|
57
67
|
});
|
58
68
|
|
59
69
|
var Content = (0, _styledComponents.default)(_globalCardStyles.globalContent)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n height: 100%;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n"])));
|
70
|
+
var Title = (0, _styledComponents.default)(_globalCardStyles.Title)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n cursor: pointer;\n"])));
|
60
71
|
|
61
|
-
var Answered = _styledComponents.default.h5(
|
72
|
+
var Answered = _styledComponents.default.h5(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 300;\n"])));
|
62
73
|
|
63
|
-
var Buttons = _styledComponents.default.div(
|
74
|
+
var Buttons = _styledComponents.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n gap: 10px;\n"])));
|
64
75
|
|
65
|
-
var Button = _styledComponents.default.button(
|
76
|
+
var Button = _styledComponents.default.button(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n padding: 7px 20px;\n border: none;\n color: white;\n cursor: pointer;\n"])));
|
66
77
|
|
67
|
-
var Accept = (0, _styledComponents.default)(Button)(
|
68
|
-
var Decline = (0, _styledComponents.default)(Button)(
|
69
|
-
var Review = (0, _styledComponents.default)(Button)(
|
78
|
+
var Accept = (0, _styledComponents.default)(Button)(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n background-color: #69d869;\n"])));
|
79
|
+
var Decline = (0, _styledComponents.default)(Button)(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n background-color: #e24848;\n"])));
|
80
|
+
var Review = (0, _styledComponents.default)(Button)(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n background-color: #18b8e9;\n"])));
|
70
81
|
var _default = CardStyle9;
|
71
82
|
exports.default = _default;
|
@@ -14,7 +14,7 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
14
14
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
15
15
|
|
16
16
|
var MainCard = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n* {\n margin: 0;\n padding: 0;\n }\n font-family: sans-serif;\n display: flex;\n background-color: ", ";\n border-radius: ", "px;\n border: ", ";\n align-items: center;\n padding: ", " !important;\n order: ", ";\n &:hover {\n box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2);\n -webkit-filter: ", ";\n transition: all .2s ease;\n background-color: ", ";\n }\n"])), function (props) {
|
17
|
-
return props.cardBackgroundColor || '
|
17
|
+
return props.cardBackgroundColor || 'transparent';
|
18
18
|
}, function (props) {
|
19
19
|
return props.cardRadius;
|
20
20
|
}, function (props) {
|
@@ -23,7 +23,7 @@ var _ReusableHeader = _interopRequireDefault(require("../ReusableHeader/Reusable
|
|
23
23
|
|
24
24
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
25
25
|
|
26
|
-
var _excluded = ["data", "cardStyle", "customCardStyles", "type", "cardControls"];
|
26
|
+
var _excluded = ["data", "cardStyle", "customCardStyles", "type", "cardControls", "headerStyles", "sectionHeaderStyles"];
|
27
27
|
|
28
28
|
var ReusableList = function ReusableList(_ref) {
|
29
29
|
var data = _ref.data,
|
@@ -32,6 +32,8 @@ var ReusableList = function ReusableList(_ref) {
|
|
32
32
|
type = _ref.type,
|
33
33
|
_ref$cardControls = _ref.cardControls,
|
34
34
|
cardControls = _ref$cardControls === void 0 ? null : _ref$cardControls,
|
35
|
+
headerStyles = _ref.headerStyles,
|
36
|
+
sectionHeaderStyles = _ref.sectionHeaderStyles,
|
35
37
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
36
38
|
var child;
|
37
39
|
|
@@ -59,9 +61,9 @@ var ReusableList = function ReusableList(_ref) {
|
|
59
61
|
child = data.map(function (section) {
|
60
62
|
return /*#__PURE__*/_react.default.createElement(Section, {
|
61
63
|
priority: section.priority
|
62
|
-
}, /*#__PURE__*/_react.default.createElement(
|
64
|
+
}, /*#__PURE__*/_react.default.createElement(_ReusableHeader.default, Object.assign({
|
63
65
|
title: section.title
|
64
|
-
},
|
66
|
+
}, sectionHeaderStyles)), /*#__PURE__*/_react.default.createElement(SectionBody, null, mapOverCardsData(section.data)));
|
65
67
|
});
|
66
68
|
}
|
67
69
|
|
@@ -69,7 +71,7 @@ var ReusableList = function ReusableList(_ref) {
|
|
69
71
|
title: props.listTitle,
|
70
72
|
controls: props.listControls,
|
71
73
|
iconClicked: iconCliked
|
72
|
-
},
|
74
|
+
}, headerStyles)), /*#__PURE__*/_react.default.createElement(ListBody, props, child));
|
73
75
|
};
|
74
76
|
|
75
77
|
var List = _styledComponents.default.ul(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: column;\n font-family: sans-serif;\n width: ", ";\n padding: 0;\n > * {\n padding: 0;\n margin: 0;\n }\n"])), function (props) {
|
@@ -0,0 +1,61 @@
|
|
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 _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
15
|
+
|
16
|
+
var _react = _interopRequireWildcard(require("react"));
|
17
|
+
|
18
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
19
|
+
|
20
|
+
var _ReusableList = _interopRequireDefault(require("../Reusable Components/ReusableList/ReusableList"));
|
21
|
+
|
22
|
+
var _templateObject, _templateObject2, _templateObject3;
|
23
|
+
|
24
|
+
var _excluded = ["sections"];
|
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 Sections = function Sections(_ref) {
|
31
|
+
var sections = _ref.sections,
|
32
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
33
|
+
|
34
|
+
var _useState = (0, _react.useState)(sections[0].data[0].component),
|
35
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
36
|
+
center = _useState2[0],
|
37
|
+
setCenter = _useState2[1];
|
38
|
+
|
39
|
+
var cardClicked = function cardClicked(index, cardProps) {
|
40
|
+
setCenter(cardProps.component);
|
41
|
+
};
|
42
|
+
|
43
|
+
return /*#__PURE__*/_react.default.createElement(Container, props, /*#__PURE__*/_react.default.createElement(Left, null, /*#__PURE__*/_react.default.createElement(_ReusableList.default, Object.assign({
|
44
|
+
type: "sectioned",
|
45
|
+
data: sections,
|
46
|
+
cardStyle: "card-style-3",
|
47
|
+
cardClicked: cardClicked
|
48
|
+
}, props))), /*#__PURE__*/_react.default.createElement(Center, null, center));
|
49
|
+
};
|
50
|
+
|
51
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background-color: ", ";\n background-color: #414141;\n display: flex;\n"])), function (props) {
|
52
|
+
return props.backgroundColor;
|
53
|
+
});
|
54
|
+
|
55
|
+
var Left = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n flex: 1;\n"])));
|
56
|
+
|
57
|
+
var Center = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n flex: 3;\n"])));
|
58
|
+
|
59
|
+
Sections.defaultProps = {};
|
60
|
+
var _default = Sections;
|
61
|
+
exports.default = _default;
|
@@ -39,6 +39,10 @@ var _LogoWidget = _interopRequireDefault(require("../Widgets/LogoWidget/LogoWidg
|
|
39
39
|
|
40
40
|
var _VideoPlayer = _interopRequireDefault(require("../VideoAlbum/VideoPlayer/VideoPlayer"));
|
41
41
|
|
42
|
+
var _Notes = _interopRequireDefault(require("../Library/Notes/Notes"));
|
43
|
+
|
44
|
+
var _Folders = _interopRequireDefault(require("../Library/Folders/Folders"));
|
45
|
+
|
42
46
|
// Cards
|
43
47
|
// Widgets
|
44
48
|
var stringSearch = function stringSearch(str, word) {
|
@@ -73,7 +77,7 @@ var addObjectToArray = function addObjectToArray(arr, obj) {
|
|
73
77
|
|
74
78
|
exports.addObjectToArray = addObjectToArray;
|
75
79
|
|
76
|
-
var getCardStyle = function getCardStyle(cardProps, cardType, customCardStyles, cardControls, index, clicked, cardIconClicked) {
|
80
|
+
var getCardStyle = function getCardStyle(cardProps, cardType, customCardStyles, cardControls, index, clicked, cardIconClicked, onAction) {
|
77
81
|
var cardTypes = {
|
78
82
|
'card-style-1': /*#__PURE__*/_react.default.createElement(_CardStyle.default, Object.assign({
|
79
83
|
key: index
|
@@ -89,8 +93,8 @@ var getCardStyle = function getCardStyle(cardProps, cardType, customCardStyles,
|
|
89
93
|
key: index
|
90
94
|
}, cardProps, customCardStyles, {
|
91
95
|
cardControls: cardControls,
|
92
|
-
cardClicked: function cardClicked(
|
93
|
-
return clicked(
|
96
|
+
cardClicked: function cardClicked() {
|
97
|
+
return clicked(index, cardProps);
|
94
98
|
}
|
95
99
|
})),
|
96
100
|
'card-style-4': /*#__PURE__*/_react.default.createElement(_CardStyle4.default, Object.assign({
|
@@ -147,7 +151,7 @@ var getCardStyle = function getCardStyle(cardProps, cardType, customCardStyles,
|
|
147
151
|
}, cardProps, customCardStyles, {
|
148
152
|
cardControls: cardControls,
|
149
153
|
cardClicked: function cardClicked() {
|
150
|
-
return clicked(index);
|
154
|
+
return clicked(index, cardProps);
|
151
155
|
},
|
152
156
|
iconClicked: function iconClicked(action) {
|
153
157
|
return cardIconClicked(action, index);
|
@@ -179,7 +183,9 @@ var getWidgetType = function getWidgetType(widgetType, props, _cardClicked) {
|
|
179
183
|
}, props)),
|
180
184
|
'music player': /*#__PURE__*/_react.default.createElement(_MusicPlayerWidget.default, props),
|
181
185
|
'logo': /*#__PURE__*/_react.default.createElement(_LogoWidget.default, props),
|
182
|
-
'video player': /*#__PURE__*/_react.default.createElement(_VideoPlayer.default, props)
|
186
|
+
'video player': /*#__PURE__*/_react.default.createElement(_VideoPlayer.default, props),
|
187
|
+
'notes': /*#__PURE__*/_react.default.createElement(_Notes.default, props),
|
188
|
+
'folders': /*#__PURE__*/_react.default.createElement(_Folders.default, props)
|
183
189
|
};
|
184
190
|
return widgetTypes[widgetType];
|
185
191
|
};
|
package/package.json
CHANGED
@@ -10,38 +10,19 @@ import RichTextInput from '../Common Inputs/RichTextInput/RichTextInput';
|
|
10
10
|
const Chat = ({
|
11
11
|
data,
|
12
12
|
title,
|
13
|
-
titleColor,
|
14
|
-
headerBackground,
|
15
|
-
headerPadding,
|
16
13
|
cardBackgroundColor,
|
17
|
-
cardTitleColor,
|
18
14
|
textColor,
|
19
15
|
users,
|
20
16
|
...props }) => {
|
21
17
|
|
22
18
|
return (
|
23
|
-
<Container
|
24
|
-
cardBackgroundColor={cardBackgroundColor}>
|
25
|
-
<ReusableHeader
|
26
|
-
title={title}
|
27
|
-
titleColor={titleColor}
|
28
|
-
controls={controls}
|
29
|
-
controlsStyles={{
|
30
|
-
iconColor: 'white',
|
31
|
-
maxIcons: 4,
|
32
|
-
dropdownBackground: 'white'
|
33
|
-
}}
|
34
|
-
headerBackground={headerBackground}
|
35
|
-
padding={headerPadding} />
|
19
|
+
<Container>
|
36
20
|
<List
|
21
|
+
listTitle={title}
|
37
22
|
type="flat"
|
38
23
|
data={data}
|
39
24
|
cardStyle="card-style-8"
|
40
|
-
|
41
|
-
cardBackgroundColor,
|
42
|
-
cardTitleColor,
|
43
|
-
cardDescriptionColor: textColor
|
44
|
-
}}
|
25
|
+
{...props}
|
45
26
|
/>
|
46
27
|
<RichTextInput
|
47
28
|
users={users}
|
@@ -63,9 +44,6 @@ Chat.defaultProps = {
|
|
63
44
|
Chat.propTypes = {
|
64
45
|
data: PropTypes.array.isRequired,
|
65
46
|
title: PropTypes.string,
|
66
|
-
titleColor: PropTypes.string,
|
67
|
-
headerBackground: PropTypes.string,
|
68
|
-
headerPadding: PropTypes.number,
|
69
47
|
cardBackgroundColor: PropTypes.string,
|
70
48
|
cardTitleColor: PropTypes.string,
|
71
49
|
textColor: PropTypes.string
|
@@ -34,19 +34,10 @@ const DetailedForm = ({
|
|
34
34
|
data={questions}
|
35
35
|
type='flat'
|
36
36
|
cardStyle='card-style-3'
|
37
|
-
headerStyles={{
|
38
|
-
padding: 10,
|
39
|
-
headerBackground: '#FE1744',
|
40
|
-
titleColor: '#ffff',
|
41
|
-
controlsStyles: {
|
42
|
-
dropdownBackground: 'black',
|
43
|
-
dropdownFontColor: 'white',
|
44
|
-
dropdownItemHoverColor: '#FE1744'
|
45
|
-
},
|
46
|
-
}}
|
47
37
|
customCardStyles={{
|
48
38
|
cardPadding: 10
|
49
39
|
}}
|
40
|
+
{...props}
|
50
41
|
/>
|
51
42
|
<Buttons>
|
52
43
|
<Accept onClick={onAccept}>Accept</Accept>
|
@@ -12,21 +12,6 @@ const ViewForms = ({
|
|
12
12
|
data={data}
|
13
13
|
cardStyle="card-style-9"
|
14
14
|
type="sectioned"
|
15
|
-
sectionHeaderStyles={{
|
16
|
-
cardTitleColor: 'white',
|
17
|
-
cardBackgroundColor: 'black',
|
18
|
-
cardPadding: 10
|
19
|
-
}}
|
20
|
-
headerStyles={{
|
21
|
-
padding: 10,
|
22
|
-
headerBackground: '#FE1744',
|
23
|
-
titleColor: '#ffff',
|
24
|
-
controlsStyles: {
|
25
|
-
dropdownBackground: 'black',
|
26
|
-
dropdownFontColor: 'white',
|
27
|
-
dropdownItemHoverColor: '#FE1744'
|
28
|
-
},
|
29
|
-
}}
|
30
15
|
{...props}
|
31
16
|
/>
|
32
17
|
)
|
@@ -50,8 +50,6 @@ const Folders = ({
|
|
50
50
|
setShowModal(false)
|
51
51
|
}
|
52
52
|
|
53
|
-
console.log(props)
|
54
|
-
|
55
53
|
return (
|
56
54
|
<Container>
|
57
55
|
<Gallery
|
@@ -87,7 +85,7 @@ const Folders = ({
|
|
87
85
|
}
|
88
86
|
|
89
87
|
const Container = styled.div`
|
90
|
-
|
88
|
+
background-color: black;
|
91
89
|
`
|
92
90
|
|
93
91
|
Folders.defaultProps = {};
|
@@ -2,19 +2,8 @@ import React from 'react';
|
|
2
2
|
|
3
3
|
import Editor from '../../Common Inputs/EditorComponent/EditorComponent';
|
4
4
|
|
5
|
-
const ViewNote = () => {
|
5
|
+
const ViewNote = ({data, ...props}) => {
|
6
6
|
|
7
|
-
const data = {
|
8
|
-
blocks: [
|
9
|
-
{
|
10
|
-
type: "header",
|
11
|
-
data: {
|
12
|
-
text: "New Note",
|
13
|
-
level: 1
|
14
|
-
}
|
15
|
-
}
|
16
|
-
]
|
17
|
-
}
|
18
7
|
|
19
8
|
return (
|
20
9
|
<Editor data={data}/>
|
@@ -59,13 +59,6 @@ const ViewAlbum = ({
|
|
59
59
|
listControls={listControls}
|
60
60
|
cardControls={cardControls}
|
61
61
|
cardIconClicked={cardIconClicked}
|
62
|
-
customCardStyles={{
|
63
|
-
cardBackgroundColor: cardBackgroundColor,
|
64
|
-
cardTitleColor: songTitleColor,
|
65
|
-
controlsStyles: {
|
66
|
-
iconColor: 'black'
|
67
|
-
}
|
68
|
-
}}
|
69
62
|
{...props}
|
70
63
|
/>
|
71
64
|
<Modal
|
@@ -21,14 +21,12 @@ const galleryControls = [
|
|
21
21
|
|
22
22
|
const ViewAlbums = ({
|
23
23
|
albums,
|
24
|
-
cardBackgroundColor,
|
25
24
|
albumTitleColor,
|
26
25
|
descColor,
|
27
26
|
...props
|
28
27
|
}) => {
|
29
28
|
const cardStyles = {
|
30
29
|
darkOnHover: true,
|
31
|
-
cardBackgroundColor: cardBackgroundColor,
|
32
30
|
cardTitleColor: albumTitleColor,
|
33
31
|
descColor,
|
34
32
|
controlsStyles: {
|
@@ -87,7 +85,6 @@ const ViewAlbums = ({
|
|
87
85
|
iconClicked={onHeaderIconClicked}
|
88
86
|
cardControls={cardControls}
|
89
87
|
cardIconClicked={cardIconClicked}
|
90
|
-
customCardStyles={cardStyles}
|
91
88
|
{...props}
|
92
89
|
/>
|
93
90
|
<Modal
|
@@ -106,7 +103,7 @@ const ViewAlbums = ({
|
|
106
103
|
)
|
107
104
|
}
|
108
105
|
const Container = styled.div`
|
109
|
-
|
106
|
+
width: 100%;
|
110
107
|
`
|
111
108
|
|
112
109
|
ViewAlbums.defaultProps = {
|