@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
@@ -0,0 +1,189 @@
|
|
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 _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
11
|
+
|
12
|
+
var _react = _interopRequireWildcard(require("react"));
|
13
|
+
|
14
|
+
var _Preview = _interopRequireDefault(require("../../Preview/Preview"));
|
15
|
+
|
16
|
+
var _ReusableForm = _interopRequireDefault(require("../../Reusable Components/ReusableForm/ReusableForm"));
|
17
|
+
|
18
|
+
var _globalStyles = require("../globalStyles");
|
19
|
+
|
20
|
+
var _Picker = _interopRequireDefault(require("../../Common Inputs/Picker/Picker"));
|
21
|
+
|
22
|
+
var _TextField = _interopRequireDefault(require("../../Common Inputs/TextField/TextField"));
|
23
|
+
|
24
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
25
|
+
|
26
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
27
|
+
|
28
|
+
var PhotoAlbumPreview = function PhotoAlbumPreview(props) {
|
29
|
+
var _useState = (0, _react.useState)({}),
|
30
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
31
|
+
photoAlbumStyles = _useState2[0],
|
32
|
+
setPhotoAlbumStyles = _useState2[1];
|
33
|
+
|
34
|
+
var initialValues = JSON.parse(localStorage.getItem('formStyles')) || {
|
35
|
+
headerStyles: {
|
36
|
+
headerBackground: '',
|
37
|
+
padding: 0,
|
38
|
+
titleColor: '',
|
39
|
+
titleFontSize: '',
|
40
|
+
titleFontWeight: '',
|
41
|
+
controlsStyles: {
|
42
|
+
iconSize: '',
|
43
|
+
iconColor: ''
|
44
|
+
}
|
45
|
+
},
|
46
|
+
customCardStyles: {
|
47
|
+
cardBackgroundColor: '',
|
48
|
+
onHoverBackgroundColor: '',
|
49
|
+
cardRadius: '',
|
50
|
+
cardTitleFontSize: '',
|
51
|
+
cardTitleFontWeight: '',
|
52
|
+
cardTitleColor: '',
|
53
|
+
cardImageRadius: '',
|
54
|
+
cardDescriptionFontSize: '',
|
55
|
+
cardDescriptionColor: '',
|
56
|
+
cardPadding: 0,
|
57
|
+
imgSize: 0,
|
58
|
+
cardBorderSize: 0,
|
59
|
+
cardBorderColor: ''
|
60
|
+
}
|
61
|
+
};
|
62
|
+
var sections = [{
|
63
|
+
title: "Header Styles",
|
64
|
+
body: [/*#__PURE__*/_react.default.createElement(_Picker.default, {
|
65
|
+
label: "Header Background",
|
66
|
+
name: "headerStyles.headerBackground"
|
67
|
+
}), /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
68
|
+
type: "number",
|
69
|
+
label: "Padding",
|
70
|
+
name: "headerStyles.padding"
|
71
|
+
}), /*#__PURE__*/_react.default.createElement(_Picker.default, {
|
72
|
+
label: "Title Color",
|
73
|
+
name: "headerStyles.titleColor"
|
74
|
+
}), /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
75
|
+
type: "number",
|
76
|
+
label: "Title Font Size",
|
77
|
+
name: "headerStyles.titleFontSize"
|
78
|
+
}), /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
79
|
+
type: "number",
|
80
|
+
label: "Title Font Weight",
|
81
|
+
name: "headerStyles.titleFontWeight"
|
82
|
+
}), /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
83
|
+
type: "number",
|
84
|
+
label: "Controls Size",
|
85
|
+
name: "headerStyles.controlsStyles.iconSize"
|
86
|
+
}), /*#__PURE__*/_react.default.createElement(_Picker.default, {
|
87
|
+
label: "Controls Color",
|
88
|
+
name: "headerStyles.controlsStyles.iconColor"
|
89
|
+
})]
|
90
|
+
}, {
|
91
|
+
title: "Card Styles",
|
92
|
+
body: [/*#__PURE__*/_react.default.createElement(_Picker.default, {
|
93
|
+
label: "Card Background",
|
94
|
+
name: "customCardStyles.cardBackgroundColor"
|
95
|
+
}), /*#__PURE__*/_react.default.createElement(_Picker.default, {
|
96
|
+
label: "Hover Color",
|
97
|
+
name: "customCardStyles.onHoverBackgroundColor"
|
98
|
+
}), /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
99
|
+
type: "number",
|
100
|
+
label: "Card Radius",
|
101
|
+
name: "customCardStyles.cardRadius"
|
102
|
+
}), /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
103
|
+
type: "number",
|
104
|
+
label: "Title Font Size",
|
105
|
+
name: "customCardStyles.cardTitleFontSize"
|
106
|
+
}), /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
107
|
+
type: "number",
|
108
|
+
label: "Title Font Weight",
|
109
|
+
name: "customCardStyles.cardTitleFontWeight"
|
110
|
+
}), /*#__PURE__*/_react.default.createElement(_Picker.default, {
|
111
|
+
label: "Title Color",
|
112
|
+
name: "customCardStyles.cardTitleColor"
|
113
|
+
}), /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
114
|
+
type: "number",
|
115
|
+
label: "Card Image Radius",
|
116
|
+
name: "customCardStyles.cardImageRadius"
|
117
|
+
}), /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
118
|
+
type: "number",
|
119
|
+
label: "Discription Font Size",
|
120
|
+
name: "customCardStyles.cardDescriptionFontSize"
|
121
|
+
}), /*#__PURE__*/_react.default.createElement(_Picker.default, {
|
122
|
+
label: "Discription Font Color",
|
123
|
+
name: "customCardStyles.cardDescriptionColor"
|
124
|
+
}), /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
125
|
+
type: "number",
|
126
|
+
label: "Card Padding",
|
127
|
+
name: "customCardStyles.cardPadding"
|
128
|
+
}), /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
129
|
+
type: "number",
|
130
|
+
label: "Image Size",
|
131
|
+
name: "customCardStyles.imgSize"
|
132
|
+
}), /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
133
|
+
type: "number",
|
134
|
+
label: "Border Size",
|
135
|
+
name: "customCardStyles.cardBorderSize"
|
136
|
+
}), /*#__PURE__*/_react.default.createElement(_Picker.default, {
|
137
|
+
label: "Border Color",
|
138
|
+
name: "customCardStyles.cardBorderColor"
|
139
|
+
})]
|
140
|
+
}];
|
141
|
+
|
142
|
+
var handleChange = function handleChange(values) {
|
143
|
+
if (values) {
|
144
|
+
props.formChanged(values);
|
145
|
+
setPhotoAlbumStyles(values);
|
146
|
+
localStorage.setItem('formStyles', JSON.stringify(values));
|
147
|
+
}
|
148
|
+
};
|
149
|
+
|
150
|
+
var submitHandler = function submitHandler(values) {
|
151
|
+
console.log(values);
|
152
|
+
};
|
153
|
+
|
154
|
+
var cancelHandler = function cancelHandler() {
|
155
|
+
console.log('Canceled');
|
156
|
+
};
|
157
|
+
|
158
|
+
return /*#__PURE__*/_react.default.createElement(_globalStyles.Container, null, /*#__PURE__*/_react.default.createElement(_globalStyles.Left, null, /*#__PURE__*/_react.default.createElement(_ReusableForm.default, {
|
159
|
+
formTitle: "Photo Album Styles",
|
160
|
+
initialValues: initialValues,
|
161
|
+
sections: sections,
|
162
|
+
headerStyles: {
|
163
|
+
padding: 10,
|
164
|
+
headerBackground: 'black',
|
165
|
+
titleColor: '#ffff'
|
166
|
+
},
|
167
|
+
sectionHeaderStyles: {
|
168
|
+
padding: 6,
|
169
|
+
headerBackground: '#FE1744',
|
170
|
+
titleColor: '#ffff'
|
171
|
+
},
|
172
|
+
bodyPadding: 10,
|
173
|
+
saveBtnText: "Save",
|
174
|
+
cancelBtnText: "Cancel",
|
175
|
+
saveBtnHandle: submitHandler,
|
176
|
+
cancelHandler: cancelHandler,
|
177
|
+
handleChange: handleChange,
|
178
|
+
bodyRowGap: 20,
|
179
|
+
bodyColumnGap: 10
|
180
|
+
})), /*#__PURE__*/_react.default.createElement(_globalStyles.Right, null, /*#__PURE__*/_react.default.createElement(_Preview.default, {
|
181
|
+
type: 'PhotoAlbum',
|
182
|
+
componentProps: props.componentProps,
|
183
|
+
stylingProps: photoAlbumStyles
|
184
|
+
})));
|
185
|
+
};
|
186
|
+
|
187
|
+
PhotoAlbumPreview.defaultProps = {};
|
188
|
+
var _default = PhotoAlbumPreview;
|
189
|
+
exports.default = _default;
|
@@ -0,0 +1,189 @@
|
|
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 _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
11
|
+
|
12
|
+
var _react = _interopRequireWildcard(require("react"));
|
13
|
+
|
14
|
+
var _Preview = _interopRequireDefault(require("../../Preview/Preview"));
|
15
|
+
|
16
|
+
var _ReusableForm = _interopRequireDefault(require("../../Reusable Components/ReusableForm/ReusableForm"));
|
17
|
+
|
18
|
+
var _globalStyles = require("../globalStyles");
|
19
|
+
|
20
|
+
var _Picker = _interopRequireDefault(require("../../Common Inputs/Picker/Picker"));
|
21
|
+
|
22
|
+
var _TextField = _interopRequireDefault(require("../../Common Inputs/TextField/TextField"));
|
23
|
+
|
24
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
25
|
+
|
26
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
27
|
+
|
28
|
+
var PhotoAlbumsPreview = function PhotoAlbumsPreview(props) {
|
29
|
+
var _useState = (0, _react.useState)({}),
|
30
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
31
|
+
photoAlbumsStyles = _useState2[0],
|
32
|
+
setPhotoAlbumsStyles = _useState2[1];
|
33
|
+
|
34
|
+
var initialValues = JSON.parse(localStorage.getItem('formStyles')) || {
|
35
|
+
headerStyles: {
|
36
|
+
headerBackground: '',
|
37
|
+
padding: 0,
|
38
|
+
titleColor: '',
|
39
|
+
titleFontSize: '',
|
40
|
+
titleFontWeight: '',
|
41
|
+
controlsStyles: {
|
42
|
+
iconSize: '',
|
43
|
+
iconColor: ''
|
44
|
+
}
|
45
|
+
},
|
46
|
+
customCardStyles: {
|
47
|
+
cardBackgroundColor: '',
|
48
|
+
onHoverBackgroundColor: '',
|
49
|
+
cardRadius: '',
|
50
|
+
cardTitleFontSize: '',
|
51
|
+
cardTitleFontWeight: '',
|
52
|
+
cardTitleColor: '',
|
53
|
+
countColor: '',
|
54
|
+
countFontSize: '',
|
55
|
+
cardImageRadius: '',
|
56
|
+
cardPadding: 0,
|
57
|
+
imgSize: 0,
|
58
|
+
cardBorderSize: 0,
|
59
|
+
cardBorderColor: 'purple'
|
60
|
+
}
|
61
|
+
};
|
62
|
+
var sections = [{
|
63
|
+
title: "Header Styles",
|
64
|
+
body: [/*#__PURE__*/_react.default.createElement(_Picker.default, {
|
65
|
+
label: "Header Background",
|
66
|
+
name: "headerStyles.headerBackground"
|
67
|
+
}), /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
68
|
+
type: "number",
|
69
|
+
label: "Padding",
|
70
|
+
name: "headerStyles.padding"
|
71
|
+
}), /*#__PURE__*/_react.default.createElement(_Picker.default, {
|
72
|
+
label: "Title Color",
|
73
|
+
name: "headerStyles.titleColor"
|
74
|
+
}), /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
75
|
+
type: "number",
|
76
|
+
label: "Title Font Size",
|
77
|
+
name: "headerStyles.titleFontSize"
|
78
|
+
}), /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
79
|
+
type: "number",
|
80
|
+
label: "Title Font Weight",
|
81
|
+
name: "headerStyles.titleFontWeight"
|
82
|
+
}), /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
83
|
+
type: "number",
|
84
|
+
label: "Controls Size",
|
85
|
+
name: "headerStyles.controlsStyles.iconSize"
|
86
|
+
}), /*#__PURE__*/_react.default.createElement(_Picker.default, {
|
87
|
+
label: "Controls Color",
|
88
|
+
name: "headerStyles.controlsStyles.iconColor"
|
89
|
+
})]
|
90
|
+
}, {
|
91
|
+
title: "Card Styles",
|
92
|
+
body: [/*#__PURE__*/_react.default.createElement(_Picker.default, {
|
93
|
+
label: "Card Background",
|
94
|
+
name: "customCardStyles.cardBackgroundColor"
|
95
|
+
}), /*#__PURE__*/_react.default.createElement(_Picker.default, {
|
96
|
+
label: "Hover Color",
|
97
|
+
name: "customCardStyles.onHoverBackgroundColor"
|
98
|
+
}), /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
99
|
+
type: "number",
|
100
|
+
label: "Card Radius",
|
101
|
+
name: "customCardStyles.cardRadius"
|
102
|
+
}), /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
103
|
+
type: "number",
|
104
|
+
label: "Title Font Size",
|
105
|
+
name: "customCardStyles.cardTitleFontSize"
|
106
|
+
}), /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
107
|
+
type: "number",
|
108
|
+
label: "Title Font Weight",
|
109
|
+
name: "customCardStyles.cardTitleFontWeight"
|
110
|
+
}), /*#__PURE__*/_react.default.createElement(_Picker.default, {
|
111
|
+
label: "Title Color",
|
112
|
+
name: "customCardStyles.cardTitleColor"
|
113
|
+
}), /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
114
|
+
type: "number",
|
115
|
+
label: "Card Image Radius",
|
116
|
+
name: "customCardStyles.cardImageRadius"
|
117
|
+
}), /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
118
|
+
type: "number",
|
119
|
+
label: "Count Font Size",
|
120
|
+
name: "customCardStyles.countFontSize"
|
121
|
+
}), /*#__PURE__*/_react.default.createElement(_Picker.default, {
|
122
|
+
label: "Count Font Color",
|
123
|
+
name: "customCardStyles.countColor"
|
124
|
+
}), /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
125
|
+
type: "number",
|
126
|
+
label: "Card Padding",
|
127
|
+
name: "customCardStyles.cardPadding"
|
128
|
+
}), /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
129
|
+
type: "number",
|
130
|
+
label: "Image Size",
|
131
|
+
name: "customCardStyles.imgSize"
|
132
|
+
}), /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
133
|
+
type: "number",
|
134
|
+
label: "Border Size",
|
135
|
+
name: "customCardStyles.cardBorderSize"
|
136
|
+
}), /*#__PURE__*/_react.default.createElement(_Picker.default, {
|
137
|
+
label: "Border Color",
|
138
|
+
name: "customCardStyles.cardBorderColor"
|
139
|
+
})]
|
140
|
+
}];
|
141
|
+
|
142
|
+
var handleChange = function handleChange(values) {
|
143
|
+
if (values) {
|
144
|
+
props.formChanged(values);
|
145
|
+
setPhotoAlbumsStyles(values);
|
146
|
+
localStorage.setItem('formStyles', JSON.stringify(values));
|
147
|
+
}
|
148
|
+
};
|
149
|
+
|
150
|
+
var submitHandler = function submitHandler(values) {
|
151
|
+
console.log(values);
|
152
|
+
};
|
153
|
+
|
154
|
+
var cancelHandler = function cancelHandler() {
|
155
|
+
console.log('Canceled');
|
156
|
+
};
|
157
|
+
|
158
|
+
return /*#__PURE__*/_react.default.createElement(_globalStyles.Container, null, /*#__PURE__*/_react.default.createElement(_globalStyles.Left, null, /*#__PURE__*/_react.default.createElement(_ReusableForm.default, {
|
159
|
+
formTitle: "Photo Albums Styles",
|
160
|
+
initialValues: initialValues,
|
161
|
+
sections: sections,
|
162
|
+
headerStyles: {
|
163
|
+
padding: 10,
|
164
|
+
headerBackground: 'black',
|
165
|
+
titleColor: '#ffff'
|
166
|
+
},
|
167
|
+
sectionHeaderStyles: {
|
168
|
+
padding: 6,
|
169
|
+
headerBackground: '#FE1744',
|
170
|
+
titleColor: '#ffff'
|
171
|
+
},
|
172
|
+
bodyPadding: 10,
|
173
|
+
saveBtnText: "Save",
|
174
|
+
cancelBtnText: "Cancel",
|
175
|
+
saveBtnHandle: submitHandler,
|
176
|
+
cancelHandler: cancelHandler,
|
177
|
+
handleChange: handleChange,
|
178
|
+
bodyRowGap: 20,
|
179
|
+
bodyColumnGap: 10
|
180
|
+
})), /*#__PURE__*/_react.default.createElement(_globalStyles.Right, null, /*#__PURE__*/_react.default.createElement(_Preview.default, {
|
181
|
+
type: 'PhotoAlbums',
|
182
|
+
componentProps: props.componentProps,
|
183
|
+
stylingProps: photoAlbumsStyles
|
184
|
+
})));
|
185
|
+
};
|
186
|
+
|
187
|
+
PhotoAlbumsPreview.defaultProps = {};
|
188
|
+
var _default = PhotoAlbumsPreview;
|
189
|
+
exports.default = _default;
|
@@ -0,0 +1,197 @@
|
|
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 _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
11
|
+
|
12
|
+
var _react = _interopRequireWildcard(require("react"));
|
13
|
+
|
14
|
+
var _Preview = _interopRequireDefault(require("../../Preview/Preview"));
|
15
|
+
|
16
|
+
var _ReusableForm = _interopRequireDefault(require("../../Reusable Components/ReusableForm/ReusableForm"));
|
17
|
+
|
18
|
+
var _globalStyles = require("../globalStyles");
|
19
|
+
|
20
|
+
var _Picker = _interopRequireDefault(require("../../Common Inputs/Picker/Picker"));
|
21
|
+
|
22
|
+
var _TextField = _interopRequireDefault(require("../../Common Inputs/TextField/TextField"));
|
23
|
+
|
24
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
25
|
+
|
26
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
27
|
+
|
28
|
+
var SpacesListPreview = function SpacesListPreview(props) {
|
29
|
+
var _useState = (0, _react.useState)({}),
|
30
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
31
|
+
spacesStyles = _useState2[0],
|
32
|
+
setSpacesStyles = _useState2[1];
|
33
|
+
|
34
|
+
var initialValues = JSON.parse(localStorage.getItem('formStyles')) || {
|
35
|
+
headerStyles: {
|
36
|
+
headerBackground: '',
|
37
|
+
padding: 0,
|
38
|
+
titleColor: '',
|
39
|
+
titleFontSize: '',
|
40
|
+
titleFontWeight: ''
|
41
|
+
},
|
42
|
+
sectionHeaderStyles: {
|
43
|
+
headerBackground: '',
|
44
|
+
padding: 0,
|
45
|
+
titleColor: '',
|
46
|
+
titleFontSize: '',
|
47
|
+
titleFontWeight: ''
|
48
|
+
},
|
49
|
+
customCardStyles: {
|
50
|
+
cardBackgroundColor: '',
|
51
|
+
onHoverBackgroundColor: '',
|
52
|
+
cardRadius: '',
|
53
|
+
cardTitleFontSize: '',
|
54
|
+
cardTitleFontWeight: '',
|
55
|
+
cardTitleColor: '',
|
56
|
+
cardImageRadius: '',
|
57
|
+
cardPadding: 0,
|
58
|
+
imgSize: 0,
|
59
|
+
cardBorderSize: 0,
|
60
|
+
cardBorderColor: 'purple'
|
61
|
+
}
|
62
|
+
};
|
63
|
+
var sections = [{
|
64
|
+
title: "Header Styles",
|
65
|
+
body: [/*#__PURE__*/_react.default.createElement(_Picker.default, {
|
66
|
+
label: "Header Background",
|
67
|
+
name: "headerStyles.headerBackground"
|
68
|
+
}), /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
69
|
+
type: "number",
|
70
|
+
label: "Padding",
|
71
|
+
name: "headerStyles.padding"
|
72
|
+
}), /*#__PURE__*/_react.default.createElement(_Picker.default, {
|
73
|
+
label: "Title Color",
|
74
|
+
name: "headerStyles.titleColor"
|
75
|
+
}), /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
76
|
+
type: "number",
|
77
|
+
label: "Title Font Size",
|
78
|
+
name: "headerStyles.titleFontSize"
|
79
|
+
}), /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
80
|
+
type: "number",
|
81
|
+
label: "Title Font Weight",
|
82
|
+
name: "headerStyles.titleFontWeight"
|
83
|
+
})]
|
84
|
+
}, {
|
85
|
+
title: "Section Header Styles",
|
86
|
+
body: [/*#__PURE__*/_react.default.createElement(_Picker.default, {
|
87
|
+
label: "Header Background",
|
88
|
+
name: "sectionHeaderStyles.headerBackground"
|
89
|
+
}), /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
90
|
+
type: "number",
|
91
|
+
label: "Padding",
|
92
|
+
name: "sectionHeaderStyles.padding"
|
93
|
+
}), /*#__PURE__*/_react.default.createElement(_Picker.default, {
|
94
|
+
label: "Title Color",
|
95
|
+
name: "sectionHeaderStyles.titleColor"
|
96
|
+
}), /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
97
|
+
type: "number",
|
98
|
+
label: "Title Font Size",
|
99
|
+
name: "sectionHeaderStyles.titleFontSize"
|
100
|
+
}), /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
101
|
+
type: "number",
|
102
|
+
label: "Title Font Weight",
|
103
|
+
name: "sectionHeaderStyles.titleFontWeight"
|
104
|
+
})]
|
105
|
+
}, {
|
106
|
+
title: "Card Styles",
|
107
|
+
body: [/*#__PURE__*/_react.default.createElement(_Picker.default, {
|
108
|
+
label: "Card Background",
|
109
|
+
name: "customCardStyles.cardBackgroundColor"
|
110
|
+
}), /*#__PURE__*/_react.default.createElement(_Picker.default, {
|
111
|
+
label: "Hover Color",
|
112
|
+
name: "customCardStyles.onHoverBackgroundColor"
|
113
|
+
}), /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
114
|
+
type: "number",
|
115
|
+
label: "Card Radius",
|
116
|
+
name: "customCardStyles.cardRadius"
|
117
|
+
}), /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
118
|
+
type: "number",
|
119
|
+
label: "Title Font Size",
|
120
|
+
name: "customCardStyles.cardTitleFontSize"
|
121
|
+
}), /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
122
|
+
type: "number",
|
123
|
+
label: "Title Font Weight",
|
124
|
+
name: "customCardStyles.cardTitleFontWeight"
|
125
|
+
}), /*#__PURE__*/_react.default.createElement(_Picker.default, {
|
126
|
+
label: "Title Color",
|
127
|
+
name: "customCardStyles.cardTitleColor"
|
128
|
+
}), /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
129
|
+
type: "number",
|
130
|
+
label: "Card Image Radius",
|
131
|
+
name: "customCardStyles.cardImageRadius"
|
132
|
+
}), /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
133
|
+
type: "number",
|
134
|
+
label: "Card Padding",
|
135
|
+
name: "customCardStyles.cardPadding"
|
136
|
+
}), /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
137
|
+
type: "number",
|
138
|
+
label: "Image Size",
|
139
|
+
name: "customCardStyles.imgSize"
|
140
|
+
}), /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
141
|
+
type: "number",
|
142
|
+
label: "Border Size",
|
143
|
+
name: "customCardStyles.cardBorderSize"
|
144
|
+
}), /*#__PURE__*/_react.default.createElement(_Picker.default, {
|
145
|
+
label: "Border Color",
|
146
|
+
name: "customCardStyles.cardBorderColor"
|
147
|
+
})]
|
148
|
+
}];
|
149
|
+
|
150
|
+
var handleChange = function handleChange(values) {
|
151
|
+
if (values) {
|
152
|
+
props.formChanged(values);
|
153
|
+
setSpacesStyles(values);
|
154
|
+
localStorage.setItem('formStyles', JSON.stringify(values));
|
155
|
+
}
|
156
|
+
};
|
157
|
+
|
158
|
+
var submitHandler = function submitHandler(values) {
|
159
|
+
console.log(values);
|
160
|
+
};
|
161
|
+
|
162
|
+
var cancelHandler = function cancelHandler() {
|
163
|
+
console.log('Canceled');
|
164
|
+
};
|
165
|
+
|
166
|
+
return /*#__PURE__*/_react.default.createElement(_globalStyles.Container, null, /*#__PURE__*/_react.default.createElement(_globalStyles.Left, null, /*#__PURE__*/_react.default.createElement(_ReusableForm.default, {
|
167
|
+
formTitle: "Spaces List Styles",
|
168
|
+
initialValues: initialValues,
|
169
|
+
sections: sections,
|
170
|
+
headerStyles: {
|
171
|
+
padding: 10,
|
172
|
+
headerBackground: 'black',
|
173
|
+
titleColor: '#ffff'
|
174
|
+
},
|
175
|
+
sectionHeaderStyles: {
|
176
|
+
padding: 6,
|
177
|
+
headerBackground: '#FE1744',
|
178
|
+
titleColor: '#ffff'
|
179
|
+
},
|
180
|
+
bodyPadding: 10,
|
181
|
+
saveBtnText: "Save",
|
182
|
+
cancelBtnText: "Cancel",
|
183
|
+
saveBtnHandle: submitHandler,
|
184
|
+
cancelHandler: cancelHandler,
|
185
|
+
handleChange: handleChange,
|
186
|
+
bodyRowGap: 20,
|
187
|
+
bodyColumnGap: 10
|
188
|
+
})), /*#__PURE__*/_react.default.createElement(_globalStyles.Right, null, /*#__PURE__*/_react.default.createElement(_Preview.default, {
|
189
|
+
type: 'Spaces-List',
|
190
|
+
componentProps: props.componentProps,
|
191
|
+
stylingProps: spacesStyles
|
192
|
+
})));
|
193
|
+
};
|
194
|
+
|
195
|
+
SpacesListPreview.defaultProps = {};
|
196
|
+
var _default = SpacesListPreview;
|
197
|
+
exports.default = _default;
|