@mohamed-karawia/library 0.1.18 → 0.1.19

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. package/dist/stories/Chat/Chat.js +120 -3
  2. package/dist/stories/Common Inputs/Picker/Picker.js +61 -0
  3. package/dist/stories/Common Inputs/TextField/TextField.js +3 -1
  4. package/dist/stories/Community/Community.js +137 -0
  5. package/dist/stories/Events/Event/Event.js +116 -4
  6. package/dist/stories/Events/EventsList/EventsList.js +95 -16
  7. package/dist/stories/Forms/CreateSpace/CreateSpace.js +75 -0
  8. package/dist/stories/Library/Folders/Folders.js +80 -1
  9. package/dist/stories/Library/Notes/Notes.js +75 -1
  10. package/dist/stories/Modals/NavbarPreviewModal/NavbarPreviewModal.js +54 -0
  11. package/dist/stories/Music Album/ViewAlbum/ViewAlbum.js +134 -9
  12. package/dist/stories/Music Album/ViewAlbums/ViewAlbums.js +65 -23
  13. package/dist/stories/Navbar/Navbar.js +1 -1
  14. package/dist/stories/Pages/Events/Event/Event.js +14 -5
  15. package/dist/stories/Pages/Music/MusicAlbums/MusicAlbums.js +2 -15
  16. package/dist/stories/Photo Album/ViewAlbum/ViewAlbum.js +76 -9
  17. package/dist/stories/Photo Album/ViewAlbums/ViewAlbums.js +80 -9
  18. package/dist/stories/Preview/Preview.js +1 -0
  19. package/dist/stories/PreviewComponents/ChatPreview/ChatPreview.js +193 -0
  20. package/dist/stories/PreviewComponents/EventPreview/EventPreview.js +158 -0
  21. package/dist/stories/PreviewComponents/EventsPreview/EventsPreview.js +192 -0
  22. package/dist/stories/PreviewComponents/FoldersPreview/FoldersPreview.js +182 -0
  23. package/dist/stories/PreviewComponents/MusicAlbumPreview/MusicAlbumPreview.js +177 -0
  24. package/dist/stories/PreviewComponents/MusicAlbumsPreview/MusicAlbumsPreview.js +181 -0
  25. package/dist/stories/PreviewComponents/MusicPlayerPreview/MusicPlayerPreview.js +153 -0
  26. package/dist/stories/PreviewComponents/NavbarPreview/NavbarPreview.js +112 -0
  27. package/dist/stories/PreviewComponents/NotesPreview/NotesPreview.js +173 -0
  28. package/dist/stories/PreviewComponents/PhotoAlbumPreview/PhotoAlbumPreview.js +189 -0
  29. package/dist/stories/PreviewComponents/PhotoAlbumsPreview/PhotoAlbumsPreview.js +189 -0
  30. package/dist/stories/PreviewComponents/SpacesListPreview/SpacesListPreview.js +197 -0
  31. package/dist/stories/PreviewComponents/VideoAlbumPreview/VideoAlbumPreview.js +189 -0
  32. package/dist/stories/PreviewComponents/VideoAlbumsPreview/VideoAlbumsPreview.js +175 -0
  33. package/dist/stories/PreviewComponents/VideoPreview/VideoPreview.js +172 -0
  34. package/dist/stories/PreviewComponents/globalStyles.js +26 -0
  35. package/dist/stories/Reusable Components/Cards/Card-style-10/CardStyle10.js +4 -3
  36. package/dist/stories/Reusable Components/Cards/Card-style-11/CardStyle11.js +8 -4
  37. package/dist/stories/Reusable Components/Cards/Card-style-6/CardStyle6.js +10 -4
  38. package/dist/stories/Reusable Components/Cards/Card-style-8/CardStyle8.js +4 -2
  39. package/dist/stories/Reusable Components/Cards/globalCardStyles.js +2 -2
  40. package/dist/stories/Reusable Components/Community/Community.js +76 -0
  41. package/dist/stories/Reusable Components/Gallery/Gallery.js +12 -17
  42. package/dist/stories/Reusable Components/ReactModal/ReactModal.js +11 -30
  43. package/dist/stories/Reusable Components/ReusableForm/ReusableForm.js +19 -2
  44. package/dist/stories/Reusable Components/ReusableList/ReusableList.js +9 -5
  45. package/dist/stories/Reusable Components/Tabs/Tabs.js +68 -0
  46. package/dist/stories/Sections/Sections.js +8 -2
  47. package/dist/stories/VideoAlbum/AlbumsGallery/AlbumsGallery.js +77 -18
  48. package/dist/stories/VideoAlbum/VideoSpace/VideoSpace.js +96 -3
  49. package/dist/stories/VideoAlbum/ViewAlbum/ViewAlbum.js +77 -1
  50. package/dist/stories/Widgets/MusicPlayerWidget/MusicPlayerWidget.js +16 -10
  51. package/dist/stories/Widgets/SpacesListWidget/SpacesListWidget.js +115 -0
  52. package/dist/stories/Widgets/UsersWidget/UsersWidget.js +30 -0
  53. package/dist/stories/helpers/util.js +36 -3
  54. package/dist/stories/store/communities.js +943 -0
  55. package/dist/stories/store/store.js +44 -0
  56. package/package.json +5 -2
  57. package/src/stories/Chat/Chat.jsx +104 -5
  58. package/src/stories/Common Inputs/Picker/Picker.jsx +47 -0
  59. package/src/stories/Common Inputs/TextField/TextField.jsx +1 -1
  60. package/src/stories/Community/Community.jsx +110 -0
  61. package/src/stories/Events/Event/Event.jsx +97 -4
  62. package/src/stories/Events/EventsList/EventsList.jsx +91 -17
  63. package/src/stories/Forms/CreateSpace/CreateSpace.jsx +73 -0
  64. package/src/stories/Library/Folders/Folders.jsx +79 -1
  65. package/src/stories/Library/Notes/Notes.jsx +57 -1
  66. package/src/stories/Modals/NavbarPreviewModal/NavbarPreviewModal.jsx +31 -0
  67. package/src/stories/Music Album/ViewAlbum/ViewAlbum.jsx +125 -11
  68. package/src/stories/Music Album/ViewAlbums/ViewAlbums.jsx +56 -26
  69. package/src/stories/Navbar/Navbar.jsx +1 -1
  70. package/src/stories/Pages/Events/Event/Event.jsx +12 -4
  71. package/src/stories/Pages/Music/MusicAlbums/MusicAlbums.jsx +0 -13
  72. package/src/stories/Pages/ViewWorld/styles.json +1 -1
  73. package/src/stories/Photo Album/ViewAlbum/ViewAlbum.jsx +57 -4
  74. package/src/stories/Photo Album/ViewAlbums/ViewAlbums.jsx +62 -9
  75. package/src/stories/Preview/Preview.jsx +9 -1
  76. package/src/stories/PreviewComponents/ChatPreview/ChatPreview.jsx +132 -0
  77. package/src/stories/PreviewComponents/EventPreview/EventPreview.jsx +116 -0
  78. package/src/stories/PreviewComponents/EventsPreview/EventsPreview.jsx +132 -0
  79. package/src/stories/PreviewComponents/FoldersPreview/FoldersPreview.jsx +127 -0
  80. package/src/stories/PreviewComponents/MusicAlbumPreview/MusicAlbumPreview.jsx +124 -0
  81. package/src/stories/PreviewComponents/MusicAlbumsPreview/MusicAlbumsPreview.jsx +126 -0
  82. package/src/stories/PreviewComponents/MusicPlayerPreview/MusicPlayerPreview.jsx +113 -0
  83. package/src/stories/PreviewComponents/NavbarPreview/NavbarPreview.jsx +93 -0
  84. package/src/stories/PreviewComponents/NotesPreview/NotesPreview.jsx +122 -0
  85. package/src/stories/PreviewComponents/PhotoAlbumPreview/PhotoAlbumPreview.jsx +129 -0
  86. package/src/stories/PreviewComponents/PhotoAlbumsPreview/PhotoAlbumsPreview.jsx +129 -0
  87. package/src/stories/PreviewComponents/SpacesListPreview/SpacesListPreview.jsx +138 -0
  88. package/src/stories/PreviewComponents/VideoAlbumPreview/VideoAlbumPreview.jsx +129 -0
  89. package/src/stories/PreviewComponents/VideoAlbumsPreview/VideoAlbumsPreview.jsx +124 -0
  90. package/src/stories/PreviewComponents/VideoPreview/VideoPreview.jsx +125 -0
  91. package/src/stories/PreviewComponents/globalStyles.js +20 -0
  92. package/src/stories/Reusable Components/Cards/Card-style-10/CardStyle10.jsx +5 -2
  93. package/src/stories/Reusable Components/Cards/Card-style-11/CardStyle11.jsx +5 -5
  94. package/src/stories/Reusable Components/Cards/Card-style-6/CardStyle6.jsx +12 -6
  95. package/src/stories/Reusable Components/Cards/Card-style-8/CardStyle8.jsx +2 -2
  96. package/src/stories/Reusable Components/Cards/globalCardStyles.js +2 -1
  97. package/src/stories/Reusable Components/Community/Community.jsx +70 -0
  98. package/src/stories/Reusable Components/Gallery/Gallery.jsx +10 -9
  99. package/src/stories/Reusable Components/ReactModal/ReactModal.jsx +3 -25
  100. package/src/stories/Reusable Components/ReusableForm/ReusableForm.jsx +18 -6
  101. package/src/stories/Reusable Components/ReusableList/ReusableList.jsx +9 -4
  102. package/src/stories/Reusable Components/Tabs/Tabs.jsx +67 -0
  103. package/src/stories/Sections/Sections.jsx +5 -2
  104. package/src/stories/VideoAlbum/AlbumsGallery/AlbumsGallery.jsx +57 -16
  105. package/src/stories/VideoAlbum/VideoSpace/VideoSpace.jsx +70 -1
  106. package/src/stories/VideoAlbum/ViewAlbum/ViewAlbum.jsx +62 -3
  107. package/src/stories/Widgets/MusicPlayerWidget/MusicPlayerWidget.jsx +13 -6
  108. package/src/stories/Widgets/SpacesListWidget/SpacesListWidget.jsx +78 -0
  109. package/src/stories/Widgets/UsersWidget/UsersWidget.jsx +20 -0
  110. package/src/stories/helpers/util.js +24 -2
  111. package/src/stories/store/communities.js +705 -0
  112. package/src/stories/store/store.js +33 -0
  113. package/src/stories/styling.json +92 -0
@@ -27,8 +27,6 @@ var _WidgetContainer = _interopRequireDefault(require("../../../Reusable Compone
27
27
 
28
28
  var _Event = _interopRequireDefault(require("../../../Events/Event/Event"));
29
29
 
30
- var _util = require("../../../helpers/util");
31
-
32
30
  var _styles = _interopRequireDefault(require("../../ViewWorld/styles.json"));
33
31
 
34
32
  var _constatnts = require("../../ViewWorld/constatnts");
@@ -44,16 +42,27 @@ var Event = function Event(props) {
44
42
  imgUrl: props.imgUrl
45
43
  }
46
44
  }), /*#__PURE__*/_react.default.createElement(_WidgetContainer.default, {
47
- widgetType: "list",
45
+ widgetType: "spaces-list",
48
46
  widgetProps: {
49
47
  listTitle: 'Your Spaces',
50
48
  type: 'sectioned',
51
- data: _constatnts.SPACES,
49
+ spaces: _constatnts.SPACES,
52
50
  cardStyle: 'card-style-3',
51
+ cardClicked: function cardClicked() {
52
+ return alert('clicked');
53
+ },
54
+ headerStyles: {
55
+ headerBackground: 'purple',
56
+ padding: 3,
57
+ controlsStyles: {
58
+ iconColor: 'white',
59
+ iconsGap: 5
60
+ }
61
+ },
53
62
  sectionHeaderStyles: {
54
63
  cardBorderSize: 2,
55
64
  cardPadding: 2,
56
- cardBackgroundColor: '#fff',
65
+ headerBackground: 'red',
57
66
  cardBorderColor: 'black'
58
67
  },
59
68
  customCardStyles: {
@@ -154,10 +154,7 @@ var MusicAlbums = function MusicAlbums(props) {
154
154
  cardTitleFontSize: 15,
155
155
  cardBackgroundColor: 'black',
156
156
  cardTitleColor: 'white',
157
- onHoverBackgroundColor: '#F6891F',
158
- controlsStyles: {
159
- showOnHover: true
160
- }
157
+ onHoverBackgroundColor: '#F6891F'
161
158
  }
162
159
  }
163
160
  })), /*#__PURE__*/_react.default.createElement(_Center.default, null, /*#__PURE__*/_react.default.createElement(_SpaceContainer.default, {
@@ -178,17 +175,7 @@ var MusicAlbums = function MusicAlbums(props) {
178
175
  }
179
176
  },
180
177
  customCardStyles: {
181
- darkOnHover: true,
182
- controlsStyles: {
183
- showOnHover: true,
184
- position: 'center',
185
- dropdownFontColor: "white",
186
- iconBorderRadius: 100,
187
- iconSize: 40,
188
- iconsGap: 10,
189
- iconColor: 'white',
190
- containerPadding: 20
191
- }
178
+ darkOnHover: true
192
179
  },
193
180
  cardClicked: cardClicked
194
181
  }))), /*#__PURE__*/_react.default.createElement(_Right.default, null, /*#__PURE__*/_react.default.createElement(_WidgetContainer.default, {
@@ -25,8 +25,18 @@ var _ReactModal = _interopRequireDefault(require("../../Reusable Components/Reac
25
25
 
26
26
  var _DetailedPhoto = _interopRequireDefault(require("../DetailedPhoto/DetailedPhoto"));
27
27
 
28
+ var _PhotoAlbumPreview = _interopRequireDefault(require("../../PreviewComponents/PhotoAlbumPreview/PhotoAlbumPreview"));
29
+
30
+ var _Tabs = _interopRequireDefault(require("../../Reusable Components/Tabs/Tabs"));
31
+
32
+ var _Sections = _interopRequireDefault(require("../../Sections/Sections"));
33
+
34
+ var _Community = _interopRequireDefault(require("../../Reusable Components/Community/Community"));
35
+
28
36
  var _ai = require("react-icons/ai");
29
37
 
38
+ var _bs = require("react-icons/bs");
39
+
30
40
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
31
41
 
32
42
  var _excluded = ["album", "cardBackgroundColor", "imgTitleColor", "descColor"];
@@ -39,6 +49,10 @@ var galleryControls = [{
39
49
  icon: /*#__PURE__*/_react.default.createElement(_ai.AiOutlineFileAdd, null),
40
50
  action: 'add',
41
51
  name: 'Add Photo'
52
+ }, {
53
+ icon: /*#__PURE__*/_react.default.createElement(_bs.BsGear, null),
54
+ action: 'config',
55
+ name: 'Config'
42
56
  }];
43
57
  var cardControls = [{
44
58
  icon: /*#__PURE__*/_react.default.createElement(_ai.AiFillDelete, null),
@@ -81,19 +95,44 @@ var ViewAlbum = function ViewAlbum(_ref) {
81
95
 
82
96
  var _useState3 = (0, _react.useState)(false),
83
97
  _useState4 = (0, _slicedToArray2.default)(_useState3, 2),
84
- showImgModal = _useState4[0],
85
- setShowImgModal = _useState4[1];
98
+ showConfigModal = _useState4[0],
99
+ setShowConfigModal = _useState4[1];
86
100
 
87
- var _useState5 = (0, _react.useState)(null),
101
+ var _useState5 = (0, _react.useState)(false),
88
102
  _useState6 = (0, _slicedToArray2.default)(_useState5, 2),
89
- openedImgIndex = _useState6[0],
90
- setOpenedImgIndex = _useState6[1];
103
+ showImgModal = _useState6[0],
104
+ setShowImgModal = _useState6[1];
91
105
 
92
106
  var _useState7 = (0, _react.useState)(null),
93
107
  _useState8 = (0, _slicedToArray2.default)(_useState7, 2),
94
- openedImg = _useState8[0],
95
- setOpenedImg = _useState8[1];
108
+ openedImgIndex = _useState8[0],
109
+ setOpenedImgIndex = _useState8[1];
110
+
111
+ var _useState9 = (0, _react.useState)(null),
112
+ _useState10 = (0, _slicedToArray2.default)(_useState9, 2),
113
+ openedImg = _useState10[0],
114
+ setOpenedImg = _useState10[1];
115
+
116
+ var _useState11 = (0, _react.useState)( /*#__PURE__*/_react.default.createElement(ViewAlbum, {
117
+ album: album
118
+ })),
119
+ _useState12 = (0, _slicedToArray2.default)(_useState11, 2),
120
+ centerContext = _useState12[0],
121
+ setCenterContext = _useState12[1];
122
+
123
+ var formChanged = function formChanged(values) {
124
+ setCenterContext( /*#__PURE__*/_react.default.createElement(ViewAlbum, Object.assign({
125
+ album: album
126
+ }, values)));
127
+ };
96
128
 
129
+ var tabs = [{
130
+ title: 'New',
131
+ id: 'preview'
132
+ }, {
133
+ title: 'Context',
134
+ id: 'community'
135
+ }];
97
136
  var handleUserKeyPress = (0, _react.useCallback)(function (event) {
98
137
  var key = event.key;
99
138
 
@@ -118,13 +157,19 @@ var ViewAlbum = function ViewAlbum(_ref) {
118
157
  setShowModal(true);
119
158
  break;
120
159
 
160
+ case 'config':
161
+ setShowConfigModal(true);
162
+ break;
163
+
121
164
  default:
122
165
  break;
123
166
  }
124
167
  };
125
168
 
126
169
  var cardIconClicked = function cardIconClicked(action, index) {
127
- props.cardIconClicked(action, index);
170
+ if (!props.preview) {
171
+ props.cardIconClicked(action, index);
172
+ }
128
173
  };
129
174
 
130
175
  var onAddPhoto = function onAddPhoto(photo) {
@@ -199,7 +244,29 @@ var ViewAlbum = function ViewAlbum(_ref) {
199
244
  img: openedImg
200
245
  }), /*#__PURE__*/_react.default.createElement(RightIconContainer, {
201
246
  onClick: nextPhoto
202
- }, /*#__PURE__*/_react.default.createElement(_ai.AiOutlineArrowRight, null))));
247
+ }, /*#__PURE__*/_react.default.createElement(_ai.AiOutlineArrowRight, null))), /*#__PURE__*/_react.default.createElement(_ReactModal.default, {
248
+ modalIsOpen: showConfigModal,
249
+ closeModal: function closeModal() {
250
+ return setShowConfigModal(false);
251
+ },
252
+ exitModalButton: function exitModalButton(e) {
253
+ return /*#__PURE__*/_react.default.createElement("div", null);
254
+ }
255
+ }, /*#__PURE__*/_react.default.createElement(_Tabs.default, {
256
+ title: "Photo Album Config",
257
+ tabs: tabs,
258
+ id: "styling"
259
+ }, /*#__PURE__*/_react.default.createElement(_PhotoAlbumPreview.default, {
260
+ componentProps: {
261
+ album: album,
262
+ title: props.title || 'Photo Album',
263
+ preview: true
264
+ },
265
+ formChanged: formChanged
266
+ }), /*#__PURE__*/_react.default.createElement(_Community.default, {
267
+ center: centerContext,
268
+ id: "community"
269
+ }))));
203
270
  };
204
271
 
205
272
  var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\n"])));
@@ -23,8 +23,18 @@ var _Gallery = _interopRequireDefault(require("../../Reusable Components/Gallery
23
23
 
24
24
  var _ReactModal = _interopRequireDefault(require("../../Reusable Components/ReactModal/ReactModal"));
25
25
 
26
+ var _PhotoAlbumsPreview = _interopRequireDefault(require("../../PreviewComponents/PhotoAlbumsPreview/PhotoAlbumsPreview"));
27
+
28
+ var _Tabs = _interopRequireDefault(require("../../Reusable Components/Tabs/Tabs"));
29
+
30
+ var _Sections = _interopRequireDefault(require("../../Sections/Sections"));
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
40
  var _excluded = ["albums"];
@@ -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 ViewAlbums = function ViewAlbums(_ref) {
@@ -53,19 +67,53 @@ var ViewAlbums = function ViewAlbums(_ref) {
53
67
  showModal = _useState2[0],
54
68
  setShowModal = _useState2[1];
55
69
 
56
- var onIconClicked = function onIconClicked(action) {
57
- switch (action) {
58
- case 'add':
59
- setShowModal(true);
60
- break;
70
+ var _useState3 = (0, _react.useState)(false),
71
+ _useState4 = (0, _slicedToArray2.default)(_useState3, 2),
72
+ showConfigModal = _useState4[0],
73
+ setShowConfigModal = _useState4[1];
74
+
75
+ var _useState5 = (0, _react.useState)( /*#__PURE__*/_react.default.createElement(ViewAlbums, {
76
+ albums: albums
77
+ })),
78
+ _useState6 = (0, _slicedToArray2.default)(_useState5, 2),
79
+ centerContext = _useState6[0],
80
+ setCenterContext = _useState6[1];
81
+
82
+ var formChanged = function formChanged(values) {
83
+ setCenterContext( /*#__PURE__*/_react.default.createElement(ViewAlbums, Object.assign({
84
+ albums: albums
85
+ }, values)));
86
+ };
87
+
88
+ var tabs = [{
89
+ title: 'New',
90
+ id: 'preview'
91
+ }, {
92
+ title: 'Context',
93
+ id: 'community'
94
+ }];
61
95
 
62
- default:
63
- break;
96
+ var onIconClicked = function onIconClicked(action) {
97
+ if (!props.preview) {
98
+ switch (action) {
99
+ case 'add':
100
+ setShowModal(true);
101
+ break;
102
+
103
+ case 'config':
104
+ setShowConfigModal(true);
105
+ break;
106
+
107
+ default:
108
+ break;
109
+ }
64
110
  }
65
111
  };
66
112
 
67
113
  var cardIconClicked = function cardIconClicked(action, index) {
68
- props.cardIconClicked(action, index);
114
+ if (!props.preview) {
115
+ props.cardIconClicked(action, index);
116
+ }
69
117
  };
70
118
 
71
119
  var onAddAlbum = function onAddAlbum(album) {
@@ -97,7 +145,30 @@ var ViewAlbums = function ViewAlbums(_ref) {
97
145
  }, /*#__PURE__*/_react.default.createElement(_CreateAlbum.default, {
98
146
  saveHandler: onAddAlbum,
99
147
  cancelHandler: cancelHandler
100
- })));
148
+ })), /*#__PURE__*/_react.default.createElement(_ReactModal.default, {
149
+ modalIsOpen: showConfigModal,
150
+ closeModal: function closeModal() {
151
+ return setShowConfigModal(false);
152
+ },
153
+ exitModalButton: function exitModalButton(e) {
154
+ return /*#__PURE__*/_react.default.createElement("div", null);
155
+ }
156
+ }, /*#__PURE__*/_react.default.createElement(_Tabs.default, {
157
+ title: "Photo Albums Config",
158
+ tabs: tabs,
159
+ id: "styling"
160
+ }, /*#__PURE__*/_react.default.createElement(_PhotoAlbumsPreview.default, {
161
+ componentProps: {
162
+ albums: albums,
163
+ title: props.title || 'Photo Albums',
164
+ preview: true
165
+ },
166
+ formChanged: formChanged,
167
+ id: "preview"
168
+ }), /*#__PURE__*/_react.default.createElement(_Community.default, {
169
+ center: centerContext,
170
+ id: "community"
171
+ }))));
101
172
  };
102
173
 
103
174
  var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n"])));
@@ -32,5 +32,6 @@ var Preview = function Preview(_ref) {
32
32
 
33
33
  var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n"])));
34
34
 
35
+ Preview.defaultProps = {};
35
36
  var _default = Preview;
36
37
  exports.default = _default;
@@ -0,0 +1,193 @@
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 ChatPreview = function ChatPreview(props) {
29
+ var _useState = (0, _react.useState)({}),
30
+ _useState2 = (0, _slicedToArray2.default)(_useState, 2),
31
+ chatStyles = _useState2[0],
32
+ setChatStyles = _useState2[1];
33
+
34
+ var initialValues = {
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: 'purple',
60
+ dateColor: ''
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
+ }), /*#__PURE__*/_react.default.createElement(_TextField.default, {
84
+ type: "number",
85
+ label: "Controls Size",
86
+ name: "headerStyles.controlsStyles.iconSize"
87
+ }), /*#__PURE__*/_react.default.createElement(_Picker.default, {
88
+ label: "Controls Color",
89
+ name: "headerStyles.controlsStyles.iconColor"
90
+ })]
91
+ }, {
92
+ title: "Card Styles",
93
+ body: [/*#__PURE__*/_react.default.createElement(_Picker.default, {
94
+ label: "Card Background",
95
+ name: "customCardStyles.cardBackgroundColor"
96
+ }), /*#__PURE__*/_react.default.createElement(_Picker.default, {
97
+ label: "Hover Color",
98
+ name: "customCardStyles.onHoverBackgroundColor"
99
+ }), /*#__PURE__*/_react.default.createElement(_TextField.default, {
100
+ type: "number",
101
+ label: "Card Radius",
102
+ name: "customCardStyles.cardRadius"
103
+ }), /*#__PURE__*/_react.default.createElement(_TextField.default, {
104
+ type: "number",
105
+ label: "Title Font Size",
106
+ name: "customCardStyles.cardTitleFontSize"
107
+ }), /*#__PURE__*/_react.default.createElement(_TextField.default, {
108
+ type: "number",
109
+ label: "Title Font Weight",
110
+ name: "customCardStyles.cardTitleFontWeight"
111
+ }), /*#__PURE__*/_react.default.createElement(_Picker.default, {
112
+ label: "Title Color",
113
+ name: "customCardStyles.cardTitleColor"
114
+ }), /*#__PURE__*/_react.default.createElement(_TextField.default, {
115
+ type: "number",
116
+ label: "Card Image Radius",
117
+ name: "customCardStyles.cardImageRadius"
118
+ }), /*#__PURE__*/_react.default.createElement(_TextField.default, {
119
+ type: "number",
120
+ label: "Text Font Size",
121
+ name: "customCardStyles.cardDescriptionFontSize"
122
+ }), /*#__PURE__*/_react.default.createElement(_Picker.default, {
123
+ label: "Text Font Color",
124
+ name: "customCardStyles.cardDescriptionColor"
125
+ }), /*#__PURE__*/_react.default.createElement(_TextField.default, {
126
+ type: "number",
127
+ label: "Card Padding",
128
+ name: "customCardStyles.cardPadding"
129
+ }), /*#__PURE__*/_react.default.createElement(_TextField.default, {
130
+ type: "number",
131
+ label: "Image Size",
132
+ name: "customCardStyles.imgSize"
133
+ }), /*#__PURE__*/_react.default.createElement(_TextField.default, {
134
+ type: "number",
135
+ label: "Border Size",
136
+ name: "customCardStyles.cardBorderSize"
137
+ }), /*#__PURE__*/_react.default.createElement(_Picker.default, {
138
+ label: "Border Color",
139
+ name: "customCardStyles.cardBorderColor"
140
+ }), /*#__PURE__*/_react.default.createElement(_Picker.default, {
141
+ label: "Date Color",
142
+ name: "customCardStyles.dateColor"
143
+ })]
144
+ }];
145
+
146
+ var handleChange = function handleChange(values) {
147
+ if (values) {
148
+ props.formChanged(values);
149
+ setChatStyles(values);
150
+ localStorage.setItem('formStyles', JSON.stringify(values));
151
+ }
152
+ };
153
+
154
+ var submitHandler = function submitHandler(values) {
155
+ console.log(values);
156
+ };
157
+
158
+ var cancelHandler = function cancelHandler() {
159
+ console.log('Canceled');
160
+ };
161
+
162
+ return /*#__PURE__*/_react.default.createElement(_globalStyles.Container, null, /*#__PURE__*/_react.default.createElement(_globalStyles.Left, null, /*#__PURE__*/_react.default.createElement(_ReusableForm.default, {
163
+ formTitle: "Chat Styles",
164
+ initialValues: initialValues,
165
+ sections: sections,
166
+ headerStyles: {
167
+ padding: 10,
168
+ headerBackground: 'black',
169
+ titleColor: '#ffff'
170
+ },
171
+ sectionHeaderStyles: {
172
+ padding: 6,
173
+ headerBackground: '#FE1744',
174
+ titleColor: '#ffff'
175
+ },
176
+ bodyPadding: 10,
177
+ saveBtnText: "Save",
178
+ cancelBtnText: "Cancel",
179
+ saveBtnHandle: submitHandler,
180
+ cancelHandler: cancelHandler,
181
+ handleChange: handleChange,
182
+ bodyRowGap: 20,
183
+ bodyColumnGap: 10
184
+ })), /*#__PURE__*/_react.default.createElement(_globalStyles.Right, null, /*#__PURE__*/_react.default.createElement(_Preview.default, {
185
+ type: 'Chat',
186
+ componentProps: props.componentProps,
187
+ stylingProps: chatStyles
188
+ })));
189
+ };
190
+
191
+ ChatPreview.defaultProps = {};
192
+ var _default = ChatPreview;
193
+ exports.default = _default;
@@ -0,0 +1,158 @@
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 EventPreview = function EventPreview(props) {
29
+ var _useState = (0, _react.useState)({}),
30
+ _useState2 = (0, _slicedToArray2.default)(_useState, 2),
31
+ eventStyles = _useState2[0],
32
+ setEventStyles = _useState2[1];
33
+
34
+ var initialValues = {
35
+ headerStyles: {
36
+ headerBackground: '',
37
+ padding: 0,
38
+ titleColor: '',
39
+ titleFontSize: '',
40
+ titleFontWeight: '',
41
+ controlsStyles: {
42
+ iconSize: '',
43
+ iconColor: ''
44
+ }
45
+ },
46
+ backgroundColor: '',
47
+ titleColor: '',
48
+ titleSize: '',
49
+ dateColor: '',
50
+ dateSize: '',
51
+ discColor: '',
52
+ discSize: ''
53
+ };
54
+ var sections = [{
55
+ title: "Header Styles",
56
+ body: [/*#__PURE__*/_react.default.createElement(_Picker.default, {
57
+ label: "Header Background",
58
+ name: "headerStyles.headerBackground"
59
+ }), /*#__PURE__*/_react.default.createElement(_TextField.default, {
60
+ type: "number",
61
+ label: "Padding",
62
+ name: "headerStyles.padding"
63
+ }), /*#__PURE__*/_react.default.createElement(_Picker.default, {
64
+ label: "Title Color",
65
+ name: "headerStyles.titleColor"
66
+ }), /*#__PURE__*/_react.default.createElement(_TextField.default, {
67
+ type: "number",
68
+ label: "Title Font Size",
69
+ name: "headerStyles.titleFontSize"
70
+ }), /*#__PURE__*/_react.default.createElement(_TextField.default, {
71
+ type: "number",
72
+ label: "Title Font Weight",
73
+ name: "headerStyles.titleFontWeight"
74
+ }), /*#__PURE__*/_react.default.createElement(_TextField.default, {
75
+ type: "number",
76
+ label: "Controls Size",
77
+ name: "headerStyles.controlsStyles.iconSize"
78
+ }), /*#__PURE__*/_react.default.createElement(_Picker.default, {
79
+ label: "Controls Color",
80
+ name: "headerStyles.controlsStyles.iconColor"
81
+ })]
82
+ }, {
83
+ title: "Event Styles",
84
+ body: [/*#__PURE__*/_react.default.createElement(_Picker.default, {
85
+ label: "Background Color",
86
+ name: "backgroundColor"
87
+ }), /*#__PURE__*/_react.default.createElement(_Picker.default, {
88
+ label: "Title Color",
89
+ name: "titleColor"
90
+ }), /*#__PURE__*/_react.default.createElement(_TextField.default, {
91
+ type: "number",
92
+ label: "Title Size",
93
+ name: "titleSize"
94
+ }), /*#__PURE__*/_react.default.createElement(_Picker.default, {
95
+ label: "Date Color",
96
+ name: "dateColor"
97
+ }), /*#__PURE__*/_react.default.createElement(_TextField.default, {
98
+ type: "number",
99
+ label: "Date Size",
100
+ name: "dateSize"
101
+ }), /*#__PURE__*/_react.default.createElement(_Picker.default, {
102
+ label: "Discription Color",
103
+ name: "discColor"
104
+ }), /*#__PURE__*/_react.default.createElement(_TextField.default, {
105
+ type: "number",
106
+ label: "Discription Size",
107
+ name: "discSize"
108
+ })]
109
+ }];
110
+
111
+ var handleChange = function handleChange(values) {
112
+ if (values) {
113
+ props.formChanged(values);
114
+ setEventStyles(values);
115
+ localStorage.setItem('formStyles', JSON.stringify(values));
116
+ }
117
+ };
118
+
119
+ var submitHandler = function submitHandler(values) {
120
+ console.log(values);
121
+ };
122
+
123
+ var cancelHandler = function cancelHandler() {
124
+ console.log('Canceled');
125
+ };
126
+
127
+ return /*#__PURE__*/_react.default.createElement(_globalStyles.Container, null, /*#__PURE__*/_react.default.createElement(_globalStyles.Left, null, /*#__PURE__*/_react.default.createElement(_ReusableForm.default, {
128
+ formTitle: "Events Styles",
129
+ initialValues: initialValues,
130
+ sections: sections,
131
+ headerStyles: {
132
+ padding: 10,
133
+ headerBackground: 'black',
134
+ titleColor: '#ffff'
135
+ },
136
+ sectionHeaderStyles: {
137
+ padding: 6,
138
+ headerBackground: '#FE1744',
139
+ titleColor: '#ffff'
140
+ },
141
+ bodyPadding: 10,
142
+ saveBtnText: "Save",
143
+ cancelBtnText: "Cancel",
144
+ saveBtnHandle: submitHandler,
145
+ cancelHandler: cancelHandler,
146
+ handleChange: handleChange,
147
+ bodyRowGap: 20,
148
+ bodyColumnGap: 10
149
+ })), /*#__PURE__*/_react.default.createElement(_globalStyles.Right, null, /*#__PURE__*/_react.default.createElement(_Preview.default, {
150
+ type: 'Event',
151
+ componentProps: props.componentProps,
152
+ stylingProps: eventStyles
153
+ })));
154
+ };
155
+
156
+ EventPreview.defaultProps = {};
157
+ var _default = EventPreview;
158
+ exports.default = _default;