@mohamed-karawia/library 0.1.18 → 0.1.22
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/stories/Chat/Chat.js +114 -4
- 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 +159 -0
- package/dist/stories/Events/Event/Event.js +123 -4
- package/dist/stories/Events/EventsList/EventsList.js +98 -16
- package/dist/stories/Forms/CreateSpace/CreateSpace.js +75 -0
- package/dist/stories/Library/Folders/Folders.js +94 -9
- package/dist/stories/Library/Notes/Notes.js +94 -9
- package/dist/stories/Modals/NavbarPreviewModal/NavbarPreviewModal.js +54 -0
- package/dist/stories/Music Album/ViewAlbum/ViewAlbum.js +98 -10
- package/dist/stories/Music Album/ViewAlbums/ViewAlbums.js +96 -34
- 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 +94 -17
- package/dist/stories/Photo Album/ViewAlbums/ViewAlbums.js +88 -10
- 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 +53 -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 +85 -19
- package/dist/stories/VideoAlbum/VideoSpace/VideoSpace.js +108 -4
- package/dist/stories/VideoAlbum/ViewAlbum/ViewAlbum.js +84 -9
- 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 +941 -0
- package/dist/stories/store/store.js +44 -0
- package/package.json +5 -2
- package/src/stories/Chat/Chat.jsx +110 -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 +109 -0
- package/src/stories/Events/Event/Event.jsx +105 -4
- package/src/stories/Events/EventsList/EventsList.jsx +98 -17
- package/src/stories/Forms/CreateSpace/CreateSpace.jsx +73 -0
- package/src/stories/Library/Folders/Folders.jsx +94 -7
- package/src/stories/Library/Notes/Notes.jsx +73 -7
- package/src/stories/Modals/NavbarPreviewModal/NavbarPreviewModal.jsx +31 -0
- package/src/stories/Music Album/ViewAlbum/ViewAlbum.jsx +81 -11
- package/src/stories/Music Album/ViewAlbums/ViewAlbums.jsx +78 -34
- 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 +68 -6
- package/src/stories/Photo Album/ViewAlbums/ViewAlbums.jsx +69 -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 +47 -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 +64 -16
- package/src/stories/VideoAlbum/VideoSpace/VideoSpace.jsx +77 -1
- package/src/stories/VideoAlbum/ViewAlbum/ViewAlbum.jsx +64 -9
- 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 +703 -0
- package/src/stories/store/store.js +33 -0
- package/src/stories/styling.json +92 -0
@@ -55,7 +55,7 @@ var CardStyle8 = function CardStyle8(_ref) {
|
|
55
55
|
}
|
56
56
|
}, props), /*#__PURE__*/_react.default.createElement(ImgWrapper, props, /*#__PURE__*/_react.default.createElement(_globalCardStyles.Img, {
|
57
57
|
src: img
|
58
|
-
})), /*#__PURE__*/_react.default.createElement(Content, props, /*#__PURE__*/_react.default.createElement(Header, null, /*#__PURE__*/_react.default.createElement(_globalCardStyles.Title, props, username), /*#__PURE__*/_react.default.createElement(Date,
|
58
|
+
})), /*#__PURE__*/_react.default.createElement(Content, props, /*#__PURE__*/_react.default.createElement(Header, null, /*#__PURE__*/_react.default.createElement(_globalCardStyles.Title, props, username), /*#__PURE__*/_react.default.createElement(Date, props, date)), /*#__PURE__*/_react.default.createElement(_globalCardStyles.Description, props, text), media && /*#__PURE__*/_react.default.createElement(Media, null, media)), props.cardControls && /*#__PURE__*/_react.default.createElement(_Controls.default, Object.assign({
|
59
59
|
controls: props.cardControls,
|
60
60
|
show: showIcons,
|
61
61
|
onIconClicked: iconCliked
|
@@ -74,7 +74,9 @@ var Content = (0, _styledComponents.default)(_globalCardStyles.globalContent)(_t
|
|
74
74
|
|
75
75
|
var Header = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n gap: 20px;\n"])));
|
76
76
|
|
77
|
-
var Date = _styledComponents.default.p(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n font-size: 14px;\n color:
|
77
|
+
var Date = _styledComponents.default.p(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n font-size: 14px;\n color: ", ";\n"])), function (props) {
|
78
|
+
return props.dateColor || 'gray';
|
79
|
+
});
|
78
80
|
|
79
81
|
var Media = _styledComponents.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n max-width: 300px;\n\n *{\n width: 100%;\n }\n"])));
|
80
82
|
|
@@ -32,12 +32,12 @@ var MainCard = _styledComponents.default.div(_templateObject || (_templateObject
|
|
32
32
|
exports.MainCard = MainCard;
|
33
33
|
|
34
34
|
var globalContent = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n gap: ", "px;\n"])), function (props) {
|
35
|
-
return props.contentGap;
|
35
|
+
return props.contentGap || 10;
|
36
36
|
});
|
37
37
|
|
38
38
|
exports.globalContent = globalContent;
|
39
39
|
|
40
|
-
var Title = _styledComponents.default.h3(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n text-transform: capitalize;\n color: ", ";\n font-size: ", "px;\n font-weight: ", ";\n"])), function (props) {
|
40
|
+
var Title = _styledComponents.default.h3(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n text-transform: capitalize;\n color: ", ";\n font-size: ", "px;\n font-weight: ", ";\n cursor: pointer;\n"])), function (props) {
|
41
41
|
return props.cardTitleColor || 'black';
|
42
42
|
}, function (props) {
|
43
43
|
return props.cardTitleFontSize;
|
@@ -0,0 +1,53 @@
|
|
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 _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
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 _Navbar = _interopRequireDefault(require("../../Navbar/Navbar"));
|
19
|
+
|
20
|
+
var _Body = _interopRequireDefault(require("../../Layout/Body/Body"));
|
21
|
+
|
22
|
+
var _Left = _interopRequireDefault(require("../../Layout/Left/Left"));
|
23
|
+
|
24
|
+
var _Center = _interopRequireDefault(require("../../Layout/Center/Center"));
|
25
|
+
|
26
|
+
var _Right = _interopRequireDefault(require("../../Layout/Right/Right"));
|
27
|
+
|
28
|
+
var _WidgetContainer = _interopRequireDefault(require("../../Reusable Components/WidgetContainer/WidgetContainer"));
|
29
|
+
|
30
|
+
var _BaseMaterial = _interopRequireDefault(require("../../Containers/BaseMaterial"));
|
31
|
+
|
32
|
+
var _excluded = ["context", "community"];
|
33
|
+
|
34
|
+
// import styles from '../../styling.json'
|
35
|
+
var Community = function Community(_ref) {
|
36
|
+
var context = _ref.context,
|
37
|
+
community = _ref.community,
|
38
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
39
|
+
var spacesWidget = community.spacesListWidget.widgetSpacesList;
|
40
|
+
return /*#__PURE__*/_react.default.createElement(_BaseMaterial.default, community.styles, /*#__PURE__*/_react.default.createElement(_Navbar.default, community.navbarStyles), /*#__PURE__*/_react.default.createElement(_Body.default, null, /*#__PURE__*/_react.default.createElement(_Left.default, null, /*#__PURE__*/_react.default.createElement(_WidgetContainer.default, {
|
41
|
+
widgetType: "spaces-list",
|
42
|
+
widgetProps: (0, _objectSpread2.default)({
|
43
|
+
listTitle: spacesWidget.listTitle,
|
44
|
+
spaces: spacesWidget.spaces,
|
45
|
+
cardClicked: function cardClicked() {
|
46
|
+
return null;
|
47
|
+
}
|
48
|
+
}, spacesWidget.styles)
|
49
|
+
})), /*#__PURE__*/_react.default.createElement(_Center.default, null, props.center), /*#__PURE__*/_react.default.createElement(_Right.default, null, props.right)));
|
50
|
+
};
|
51
|
+
|
52
|
+
var _default = Community;
|
53
|
+
exports.default = _default;
|
@@ -36,15 +36,21 @@ var Gallery = function Gallery(_ref) {
|
|
36
36
|
var child;
|
37
37
|
|
38
38
|
var iconCliked = function iconCliked(action) {
|
39
|
-
props.
|
39
|
+
if (!props.preview) {
|
40
|
+
props.iconClicked(action);
|
41
|
+
}
|
40
42
|
};
|
41
43
|
|
42
44
|
var clicked = function clicked(index, cardProps) {
|
43
|
-
props.
|
45
|
+
if (!props.preview) {
|
46
|
+
props.cardClicked(index, cardProps);
|
47
|
+
}
|
44
48
|
};
|
45
49
|
|
46
50
|
var cardIconClicked = function cardIconClicked(action, index) {
|
47
|
-
props.
|
51
|
+
if (!props.preview) {
|
52
|
+
props.cardIconClicked(action, index);
|
53
|
+
}
|
48
54
|
};
|
49
55
|
|
50
56
|
var mapOverCardsData = function mapOverCardsData(data) {
|
@@ -79,7 +85,7 @@ var GalleryContainer = _styledComponents.default.div(_templateObject || (_templa
|
|
79
85
|
return props.galleryWidth + 'px' || '100%';
|
80
86
|
});
|
81
87
|
|
82
|
-
var GalleryBody = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n padding: ", "px;\n display: ", ";\n flex-direction: column;\n grid-template-columns: ", ";\n grid-auto-rows: ", "
|
88
|
+
var GalleryBody = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n padding: ", "px;\n display: ", ";\n flex-direction: column;\n grid-template-columns: ", ";\n grid-auto-rows: ", ";\n column-gap: ", "px;\n row-gap: ", "px;\n"])), function (props) {
|
83
89
|
return props.galleryBodyPadding;
|
84
90
|
}, function (_ref2) {
|
85
91
|
var type = _ref2.type;
|
@@ -87,9 +93,7 @@ var GalleryBody = _styledComponents.default.div(_templateObject2 || (_templateOb
|
|
87
93
|
}, function (props) {
|
88
94
|
return 'repeat(' + props.columnsNumber + ', 1fr)';
|
89
95
|
}, function (props) {
|
90
|
-
return props.rowsHeight
|
91
|
-
}, function (props) {
|
92
|
-
return props.rowsHeight + 'px' || 'minmax(min-content, 400px)';
|
96
|
+
return props.rowsHeight ? "".concat(props.rowsHeight, "px") : '1fr';
|
93
97
|
}, function (props) {
|
94
98
|
return props.galleryColumnGap;
|
95
99
|
}, function (props) {
|
@@ -105,16 +109,7 @@ var Section = _styledComponents.default.div(_templateObject3 || (_templateObject
|
|
105
109
|
return props.galleryRowGap;
|
106
110
|
});
|
107
111
|
|
108
|
-
var SectionBody = _styledComponents.default
|
109
|
-
return props.galleryBodyPadding;
|
110
|
-
}, function (props) {
|
111
|
-
return 'repeat(' + props.columnsNumber + ', 1fr)';
|
112
|
-
}, function (props) {
|
113
|
-
return props.galleryColumnGap;
|
114
|
-
}, function (props) {
|
115
|
-
return props.galleryRowGap;
|
116
|
-
});
|
117
|
-
|
112
|
+
var SectionBody = (0, _styledComponents.default)(GalleryBody)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n display: grid;\n"])));
|
118
113
|
Gallery.defaultProps = {
|
119
114
|
columnsNumber: 3,
|
120
115
|
galleryColumnGap: 10,
|
@@ -31,25 +31,14 @@ var ReactModalComponent = function ReactModalComponent(_ref) {
|
|
31
31
|
closeModal = _ref.closeModal,
|
32
32
|
children = _ref.children,
|
33
33
|
exitModalButton = _ref.exitModalButton,
|
34
|
-
|
35
|
-
return /*#__PURE__*/_react.default.createElement(
|
34
|
+
shouldCloseOnOverlayClick = _ref.shouldCloseOnOverlayClick;
|
35
|
+
return /*#__PURE__*/_react.default.createElement(_reactModal.default, {
|
36
36
|
isOpen: modalIsOpen,
|
37
|
-
onRequestClose: closeModal
|
38
|
-
|
39
|
-
contentLabel: title,
|
40
|
-
shouldCloseOnOverlayClick: onOverlayCloseClick === 'true',
|
41
|
-
borderColor: borderColor,
|
42
|
-
boxShadow: boxShadow,
|
43
|
-
backgroundColor: backgroundColor,
|
44
|
-
padding: padding,
|
45
|
-
height: height,
|
46
|
-
width: width,
|
47
|
-
color: color,
|
48
|
-
borderRadius: borderRadius
|
49
|
-
}, children, exitModalButton(closeModal));
|
37
|
+
onRequestClose: closeModal
|
38
|
+
}, children);
|
50
39
|
};
|
51
40
|
|
52
|
-
var ModalContainer = (0, _styledComponents.default)(_reactModal.default)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n
|
41
|
+
var ModalContainer = (0, _styledComponents.default)(_reactModal.default)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background-color: ", ";\n border-radius: ", "px;\n box-shadow: ", ";\n color: ", ";\n border-color: ", ";\n padding: ", "px;\n"])), function (_ref2) {
|
53
42
|
var backgroundColor = _ref2.backgroundColor;
|
54
43
|
return backgroundColor;
|
55
44
|
}, function (_ref3) {
|
@@ -59,25 +48,17 @@ var ModalContainer = (0, _styledComponents.default)(_reactModal.default)(_templa
|
|
59
48
|
var boxShadow = _ref4.boxShadow;
|
60
49
|
return boxShadow;
|
61
50
|
}, function (_ref5) {
|
62
|
-
var
|
63
|
-
return height;
|
64
|
-
}, function (_ref6) {
|
65
|
-
var width = _ref6.width;
|
66
|
-
return width;
|
67
|
-
}, function (_ref7) {
|
68
|
-
var color = _ref7.color;
|
51
|
+
var color = _ref5.color;
|
69
52
|
return color;
|
70
|
-
}, function (
|
71
|
-
var borderColor =
|
53
|
+
}, function (_ref6) {
|
54
|
+
var borderColor = _ref6.borderColor;
|
72
55
|
return borderColor;
|
73
|
-
}, function (
|
74
|
-
var padding =
|
56
|
+
}, function (_ref7) {
|
57
|
+
var padding = _ref7.padding;
|
75
58
|
return padding;
|
76
59
|
});
|
77
60
|
ReactModalComponent.defaultProps = {
|
78
|
-
title: ""
|
79
|
-
height: "80vh",
|
80
|
-
width: "50vw"
|
61
|
+
title: ""
|
81
62
|
};
|
82
63
|
var _default = ReactModalComponent;
|
83
64
|
exports.default = _default;
|
@@ -11,7 +11,7 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
|
|
11
11
|
|
12
12
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
13
13
|
|
14
|
-
var _react =
|
14
|
+
var _react = _interopRequireWildcard(require("react"));
|
15
15
|
|
16
16
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
17
17
|
|
@@ -25,12 +25,29 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _temp
|
|
25
25
|
|
26
26
|
var _excluded = ["formTitle", "sections", "initialValues"];
|
27
27
|
|
28
|
+
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); }
|
29
|
+
|
30
|
+
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; }
|
31
|
+
|
28
32
|
var ReusableForm = function ReusableForm(_ref) {
|
29
33
|
var formTitle = _ref.formTitle,
|
30
34
|
sections = _ref.sections,
|
31
35
|
initialValues = _ref.initialValues,
|
32
36
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
33
37
|
|
38
|
+
var AutoSubmitToken = function AutoSubmitToken() {
|
39
|
+
var _useFormikContext = (0, _formik.useFormikContext)(),
|
40
|
+
values = _useFormikContext.values,
|
41
|
+
submitForm = _useFormikContext.submitForm;
|
42
|
+
|
43
|
+
(0, _react.useEffect)(function () {
|
44
|
+
if (props.handleChange) {
|
45
|
+
props.handleChange(values);
|
46
|
+
}
|
47
|
+
}, [values, submitForm]);
|
48
|
+
return null;
|
49
|
+
};
|
50
|
+
|
34
51
|
var submitHandler = function submitHandler(values) {
|
35
52
|
props.saveHandler(values);
|
36
53
|
};
|
@@ -69,7 +86,7 @@ var ReusableForm = function ReusableForm(_ref) {
|
|
69
86
|
size: "md",
|
70
87
|
variant: "secondary",
|
71
88
|
buttonClicked: handleCancel
|
72
|
-
}))));
|
89
|
+
})), /*#__PURE__*/_react.default.createElement(AutoSubmitToken, null)));
|
73
90
|
};
|
74
91
|
|
75
92
|
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) {
|
@@ -17,8 +17,6 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
17
17
|
|
18
18
|
var _util = require("../../helpers/util");
|
19
19
|
|
20
|
-
var _CardStyle = _interopRequireDefault(require("../Cards/Card-style-3/CardStyle3"));
|
21
|
-
|
22
20
|
var _ReusableHeader = _interopRequireDefault(require("../ReusableHeader/ReusableHeader"));
|
23
21
|
|
24
22
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
@@ -38,15 +36,21 @@ var ReusableList = function ReusableList(_ref) {
|
|
38
36
|
var child;
|
39
37
|
|
40
38
|
var iconCliked = function iconCliked(action) {
|
41
|
-
props.iconClicked
|
39
|
+
if (props.iconClicked) {
|
40
|
+
props.iconClicked(action);
|
41
|
+
}
|
42
42
|
};
|
43
43
|
|
44
44
|
var clicked = function clicked(index, cardProps) {
|
45
|
-
props.cardClicked
|
45
|
+
if (props.cardClicked) {
|
46
|
+
props.cardClicked(index, cardProps);
|
47
|
+
}
|
46
48
|
};
|
47
49
|
|
48
50
|
var cardIconClicked = function cardIconClicked(action, index) {
|
49
|
-
props.cardIconClicked
|
51
|
+
if (props.cardIconClicked) {
|
52
|
+
props.cardIconClicked(action, index);
|
53
|
+
}
|
50
54
|
};
|
51
55
|
|
52
56
|
var mapOverCardsData = function mapOverCardsData(data) {
|
@@ -0,0 +1,68 @@
|
|
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 _ReusableHeader = _interopRequireDefault(require("../ReusableHeader/ReusableHeader"));
|
21
|
+
|
22
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
23
|
+
|
24
|
+
var _excluded = ["title", "tabs"];
|
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 Tabs = function Tabs(_ref) {
|
31
|
+
var title = _ref.title,
|
32
|
+
tabs = _ref.tabs,
|
33
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
34
|
+
|
35
|
+
var _useState = (0, _react.useState)(props.children[0]),
|
36
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
37
|
+
child = _useState2[0],
|
38
|
+
setChild = _useState2[1];
|
39
|
+
|
40
|
+
var tabClicked = function tabClicked(tab) {
|
41
|
+
var renderedComponent = props.children.find(function (child) {
|
42
|
+
return child.props.id === tab.id;
|
43
|
+
});
|
44
|
+
setChild(renderedComponent);
|
45
|
+
};
|
46
|
+
|
47
|
+
return /*#__PURE__*/_react.default.createElement(Container, null, /*#__PURE__*/_react.default.createElement(_ReusableHeader.default, Object.assign({
|
48
|
+
title: title
|
49
|
+
}, props.headerStyles)), /*#__PURE__*/_react.default.createElement(TabsContainer, null, /*#__PURE__*/_react.default.createElement(Menu, null, tabs.map(function (tab) {
|
50
|
+
return /*#__PURE__*/_react.default.createElement(Tab, {
|
51
|
+
onClick: function onClick() {
|
52
|
+
return tabClicked(tab);
|
53
|
+
}
|
54
|
+
}, tab.title);
|
55
|
+
})), child));
|
56
|
+
};
|
57
|
+
|
58
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n font-family: sans-serif;\n"])));
|
59
|
+
|
60
|
+
var TabsContainer = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n \n"])));
|
61
|
+
|
62
|
+
var Menu = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: center;\n gap: 10px;\n background-color: white;\n"])));
|
63
|
+
|
64
|
+
var Tab = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n padding: 5px 8px;\n cursor: pointer;\n background-color: white;\n border: 1px solid gray;\n color: #414141;\n transition: all .3s;\n &:hover {\n background-color: #414141;\n color: white;\n }\n"])));
|
65
|
+
|
66
|
+
Tabs.defaultProps = {};
|
67
|
+
var _default = Tabs;
|
68
|
+
exports.default = _default;
|
@@ -31,13 +31,19 @@ var Sections = function Sections(_ref) {
|
|
31
31
|
var sections = _ref.sections,
|
32
32
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
33
33
|
|
34
|
-
var _useState = (0, _react.useState)(
|
34
|
+
var _useState = (0, _react.useState)(props.children[0] || props.children),
|
35
35
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
36
36
|
center = _useState2[0],
|
37
37
|
setCenter = _useState2[1];
|
38
38
|
|
39
|
+
console.log('renders');
|
40
|
+
|
39
41
|
var cardClicked = function cardClicked(index, cardProps) {
|
40
|
-
|
42
|
+
var child = props.children.find(function (child) {
|
43
|
+
return child.props.id === cardProps.id;
|
44
|
+
});
|
45
|
+
setCenter(child);
|
46
|
+
console.log(child);
|
41
47
|
};
|
42
48
|
|
43
49
|
return /*#__PURE__*/_react.default.createElement(Container, props, /*#__PURE__*/_react.default.createElement(Left, null, /*#__PURE__*/_react.default.createElement(_ReusableList.default, Object.assign({
|
@@ -23,11 +23,21 @@ var _ReactModal = _interopRequireDefault(require("../../Reusable Components/Reac
|
|
23
23
|
|
24
24
|
var _CreateVideoAlbum = _interopRequireDefault(require("../../Forms/CreateVideoAlbum/CreateVideoAlbum"));
|
25
25
|
|
26
|
+
var _Tabs = _interopRequireDefault(require("../../Reusable Components/Tabs/Tabs"));
|
27
|
+
|
28
|
+
var _Sections = _interopRequireDefault(require("../../Sections/Sections"));
|
29
|
+
|
30
|
+
var _VideoAlbumsPreview = _interopRequireDefault(require("../../PreviewComponents/VideoAlbumsPreview/VideoAlbumsPreview"));
|
31
|
+
|
32
|
+
var _Community = _interopRequireDefault(require("../../Reusable Components/Community/Community"));
|
33
|
+
|
26
34
|
var _ai = require("react-icons/ai");
|
27
35
|
|
36
|
+
var _bs = require("react-icons/bs");
|
37
|
+
|
28
38
|
var _templateObject;
|
29
39
|
|
30
|
-
var _excluded = ["videoAlbums", "cardBackgroundColor", "cardTitleColor", "cardTitleFontSize", "countColor", "countFontSize"];
|
40
|
+
var _excluded = ["videoAlbums", "cardBackgroundColor", "cardTitleColor", "cardTitleFontSize", "countColor", "countFontSize", "community"];
|
31
41
|
|
32
42
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
33
43
|
|
@@ -42,6 +52,10 @@ var galleryControls = [{
|
|
42
52
|
icon: /*#__PURE__*/_react.default.createElement(_ai.AiOutlineFileAdd, null),
|
43
53
|
action: 'add',
|
44
54
|
name: 'Add Album'
|
55
|
+
}, {
|
56
|
+
icon: /*#__PURE__*/_react.default.createElement(_bs.BsGear, null),
|
57
|
+
action: 'config',
|
58
|
+
name: 'Config'
|
45
59
|
}];
|
46
60
|
|
47
61
|
var AlbumsGallery = function AlbumsGallery(_ref) {
|
@@ -51,6 +65,7 @@ var AlbumsGallery = function AlbumsGallery(_ref) {
|
|
51
65
|
cardTitleFontSize = _ref.cardTitleFontSize,
|
52
66
|
countColor = _ref.countColor,
|
53
67
|
countFontSize = _ref.countFontSize,
|
68
|
+
community = _ref.community,
|
54
69
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
55
70
|
|
56
71
|
var _useState = (0, _react.useState)(false),
|
@@ -58,6 +73,33 @@ var AlbumsGallery = function AlbumsGallery(_ref) {
|
|
58
73
|
showModal = _useState2[0],
|
59
74
|
setShowModal = _useState2[1];
|
60
75
|
|
76
|
+
var _useState3 = (0, _react.useState)(false),
|
77
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
78
|
+
showConfigModal = _useState4[0],
|
79
|
+
setShowConfigModal = _useState4[1];
|
80
|
+
|
81
|
+
var _useState5 = (0, _react.useState)( /*#__PURE__*/_react.default.createElement(AlbumsGallery, {
|
82
|
+
preview: true,
|
83
|
+
videoAlbums: videoAlbums
|
84
|
+
})),
|
85
|
+
_useState6 = (0, _slicedToArray2.default)(_useState5, 2),
|
86
|
+
centerContext = _useState6[0],
|
87
|
+
setCenterContext = _useState6[1];
|
88
|
+
|
89
|
+
var formChanged = function formChanged(values) {
|
90
|
+
setCenterContext( /*#__PURE__*/_react.default.createElement(AlbumsGallery, Object.assign({
|
91
|
+
preview: true,
|
92
|
+
videoAlbums: videoAlbums
|
93
|
+
}, values)));
|
94
|
+
};
|
95
|
+
|
96
|
+
var tabs = [{
|
97
|
+
title: 'New',
|
98
|
+
id: 'preview'
|
99
|
+
}, {
|
100
|
+
title: 'Context',
|
101
|
+
id: 'community'
|
102
|
+
}];
|
61
103
|
var cardStyles = {
|
62
104
|
cardBackgroundColor: cardBackgroundColor,
|
63
105
|
cardTitleColor: cardTitleColor,
|
@@ -83,13 +125,19 @@ var AlbumsGallery = function AlbumsGallery(_ref) {
|
|
83
125
|
};
|
84
126
|
|
85
127
|
var onIconClicked = function onIconClicked(action) {
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
128
|
+
if (!props.preview) {
|
129
|
+
switch (action) {
|
130
|
+
case 'add':
|
131
|
+
setShowModal(true);
|
132
|
+
break;
|
133
|
+
|
134
|
+
case 'config':
|
135
|
+
setShowConfigModal(true);
|
136
|
+
break;
|
137
|
+
|
138
|
+
default:
|
139
|
+
break;
|
140
|
+
}
|
93
141
|
}
|
94
142
|
};
|
95
143
|
|
@@ -106,20 +154,17 @@ var AlbumsGallery = function AlbumsGallery(_ref) {
|
|
106
154
|
setShowModal(false);
|
107
155
|
};
|
108
156
|
|
109
|
-
|
157
|
+
var cancelConfig = function cancelConfig() {
|
158
|
+
setShowConfigModal(false);
|
159
|
+
localStorage.removeItem('formStyles');
|
160
|
+
};
|
161
|
+
|
162
|
+
return /*#__PURE__*/_react.default.createElement(Container, null, /*#__PURE__*/_react.default.createElement(_Gallery.default, Object.assign({
|
110
163
|
galleryTitle: "Video Albums",
|
111
164
|
data: videoAlbums,
|
112
165
|
type: "flat",
|
113
166
|
cardStyle: "card-style-6",
|
114
167
|
columnsNumber: 3,
|
115
|
-
headerStyles: {
|
116
|
-
padding: 10,
|
117
|
-
headerBackground: '#FE1744',
|
118
|
-
titleColor: '#ffff',
|
119
|
-
controlsStyles: {
|
120
|
-
iconSize: 25
|
121
|
-
}
|
122
|
-
},
|
123
168
|
iconClicked: onIconClicked,
|
124
169
|
galleryColumnGap: 10,
|
125
170
|
galleryRowGap: 20,
|
@@ -130,7 +175,7 @@ var AlbumsGallery = function AlbumsGallery(_ref) {
|
|
130
175
|
},
|
131
176
|
cardIconClicked: cardIconClicked,
|
132
177
|
customCardStyles: cardStyles
|
133
|
-
}), /*#__PURE__*/_react.default.createElement(_ReactModal.default, {
|
178
|
+
}, props)), /*#__PURE__*/_react.default.createElement(_ReactModal.default, {
|
134
179
|
modalIsOpen: showModal,
|
135
180
|
closeModal: function closeModal() {
|
136
181
|
return setShowModal(false);
|
@@ -141,7 +186,28 @@ var AlbumsGallery = function AlbumsGallery(_ref) {
|
|
141
186
|
}, /*#__PURE__*/_react.default.createElement(_CreateVideoAlbum.default, {
|
142
187
|
saveHandler: onAddAlbum,
|
143
188
|
cancelHandler: cancelHandler
|
144
|
-
}))
|
189
|
+
})), /*#__PURE__*/_react.default.createElement(_ReactModal.default, {
|
190
|
+
modalIsOpen: showConfigModal,
|
191
|
+
closeModal: cancelConfig,
|
192
|
+
exitModalButton: function exitModalButton(e) {
|
193
|
+
return /*#__PURE__*/_react.default.createElement("div", null);
|
194
|
+
}
|
195
|
+
}, /*#__PURE__*/_react.default.createElement(_Tabs.default, {
|
196
|
+
title: "Video Gallery Config",
|
197
|
+
tabs: tabs,
|
198
|
+
id: "styling"
|
199
|
+
}, /*#__PURE__*/_react.default.createElement(_VideoAlbumsPreview.default, {
|
200
|
+
componentProps: {
|
201
|
+
videoAlbums: videoAlbums,
|
202
|
+
preview: true
|
203
|
+
},
|
204
|
+
formChanged: formChanged,
|
205
|
+
id: "preview"
|
206
|
+
}), /*#__PURE__*/_react.default.createElement(_Community.default, {
|
207
|
+
center: centerContext,
|
208
|
+
community: community,
|
209
|
+
id: "community"
|
210
|
+
}))));
|
145
211
|
};
|
146
212
|
|
147
213
|
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n \n"])));
|