@mohamed-karawia/library 0.1.21 → 0.1.22

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. package/dist/stories/Chat/Chat.js +24 -31
  2. package/dist/stories/Community/Community.js +37 -15
  3. package/dist/stories/Events/Event/Event.js +12 -4
  4. package/dist/stories/Events/EventsList/EventsList.js +14 -7
  5. package/dist/stories/Library/Folders/Folders.js +27 -17
  6. package/dist/stories/Library/Notes/Notes.js +29 -18
  7. package/dist/stories/Music Album/ViewAlbum/ViewAlbum.js +8 -44
  8. package/dist/stories/Music Album/ViewAlbums/ViewAlbums.js +57 -37
  9. package/dist/stories/Photo Album/ViewAlbum/ViewAlbum.js +26 -16
  10. package/dist/stories/Photo Album/ViewAlbums/ViewAlbums.js +11 -4
  11. package/dist/stories/PreviewComponents/ChatPreview/ChatPreview.js +1 -1
  12. package/dist/stories/PreviewComponents/EventPreview/EventPreview.js +1 -1
  13. package/dist/stories/PreviewComponents/EventsPreview/EventsPreview.js +1 -1
  14. package/dist/stories/PreviewComponents/FoldersPreview/FoldersPreview.js +1 -1
  15. package/dist/stories/PreviewComponents/MusicAlbumsPreview/MusicAlbumsPreview.js +1 -1
  16. package/dist/stories/PreviewComponents/MusicPlayerPreview/MusicPlayerPreview.js +1 -1
  17. package/dist/stories/PreviewComponents/NavbarPreview/NavbarPreview.js +1 -1
  18. package/dist/stories/PreviewComponents/NotesPreview/NotesPreview.js +1 -1
  19. package/dist/stories/PreviewComponents/PhotoAlbumPreview/PhotoAlbumPreview.js +1 -1
  20. package/dist/stories/PreviewComponents/PhotoAlbumsPreview/PhotoAlbumsPreview.js +1 -1
  21. package/dist/stories/PreviewComponents/SpacesListPreview/SpacesListPreview.js +1 -1
  22. package/dist/stories/PreviewComponents/VideoAlbumPreview/VideoAlbumPreview.js +1 -1
  23. package/dist/stories/PreviewComponents/VideoAlbumsPreview/VideoAlbumsPreview.js +1 -1
  24. package/dist/stories/PreviewComponents/VideoPreview/VideoPreview.js +1 -1
  25. package/dist/stories/Reusable Components/Community/Community.js +12 -34
  26. package/dist/stories/VideoAlbum/AlbumsGallery/AlbumsGallery.js +11 -4
  27. package/dist/stories/VideoAlbum/VideoSpace/VideoSpace.js +17 -6
  28. package/dist/stories/VideoAlbum/ViewAlbum/ViewAlbum.js +24 -25
  29. package/dist/stories/store/communities.js +27 -29
  30. package/package.json +1 -1
  31. package/src/stories/Chat/Chat.jsx +25 -19
  32. package/src/stories/Community/Community.jsx +14 -15
  33. package/src/stories/Events/Event/Event.jsx +11 -3
  34. package/src/stories/Events/EventsList/EventsList.jsx +11 -4
  35. package/src/stories/Library/Folders/Folders.jsx +23 -14
  36. package/src/stories/Library/Notes/Notes.jsx +25 -15
  37. package/src/stories/Music Album/ViewAlbum/ViewAlbum.jsx +17 -61
  38. package/src/stories/Music Album/ViewAlbums/ViewAlbums.jsx +44 -30
  39. package/src/stories/Photo Album/ViewAlbum/ViewAlbum.jsx +14 -5
  40. package/src/stories/Photo Album/ViewAlbums/ViewAlbums.jsx +10 -3
  41. package/src/stories/PreviewComponents/ChatPreview/ChatPreview.jsx +1 -1
  42. package/src/stories/PreviewComponents/EventPreview/EventPreview.jsx +1 -1
  43. package/src/stories/PreviewComponents/EventsPreview/EventsPreview.jsx +1 -1
  44. package/src/stories/PreviewComponents/FoldersPreview/FoldersPreview.jsx +1 -1
  45. package/src/stories/PreviewComponents/MusicAlbumsPreview/MusicAlbumsPreview.jsx +1 -1
  46. package/src/stories/PreviewComponents/MusicPlayerPreview/MusicPlayerPreview.jsx +1 -1
  47. package/src/stories/PreviewComponents/NavbarPreview/NavbarPreview.jsx +1 -1
  48. package/src/stories/PreviewComponents/NotesPreview/NotesPreview.jsx +1 -1
  49. package/src/stories/PreviewComponents/PhotoAlbumPreview/PhotoAlbumPreview.jsx +1 -1
  50. package/src/stories/PreviewComponents/PhotoAlbumsPreview/PhotoAlbumsPreview.jsx +1 -1
  51. package/src/stories/PreviewComponents/SpacesListPreview/SpacesListPreview.jsx +1 -1
  52. package/src/stories/PreviewComponents/VideoAlbumPreview/VideoAlbumPreview.jsx +1 -1
  53. package/src/stories/PreviewComponents/VideoAlbumsPreview/VideoAlbumsPreview.jsx +1 -1
  54. package/src/stories/PreviewComponents/VideoPreview/VideoPreview.jsx +1 -1
  55. package/src/stories/Reusable Components/Community/Community.jsx +10 -33
  56. package/src/stories/VideoAlbum/AlbumsGallery/AlbumsGallery.jsx +10 -3
  57. package/src/stories/VideoAlbum/VideoSpace/VideoSpace.jsx +10 -3
  58. package/src/stories/VideoAlbum/ViewAlbum/ViewAlbum.jsx +30 -34
  59. package/src/stories/store/communities.js +27 -29
@@ -31,14 +31,15 @@ const ViewAlbum = ({
31
31
  cardTitleColor,
32
32
  cardTitleFontSize,
33
33
  descColor,
34
+ community,
34
35
  ...props }) => {
35
36
  const [showModal, setShowModal] = useState(false);
36
37
  const [showConfigModal, setShowConfigModal] = useState(false);
37
- const [centerContext, setCenterContext] = useState(<ViewAlbum album={album}/>)
38
+ const [centerContext, setCenterContext] = useState(<ViewAlbum preview={true} album={album} />)
38
39
 
39
40
  const formChanged = (values) => {
40
41
  console.log('context changed')
41
- setCenterContext(<ViewAlbum album={album} {...values} />)
42
+ setCenterContext(<ViewAlbum preview={true} album={album} {...values} />)
42
43
  }
43
44
 
44
45
  let tabs = [
@@ -50,19 +51,6 @@ const ViewAlbum = ({
50
51
  }
51
52
  ]
52
53
 
53
- const sections = [
54
- {
55
- title: 'Styles',
56
- data: [
57
- {
58
- title: 'Styling', component: (<Tabs
59
- title="Video Album Config"
60
- tabs={tabs}
61
- />)
62
- }
63
- ]
64
- }
65
- ]
66
54
 
67
55
  const cardStyles = {
68
56
  darkOnHover: true,
@@ -85,15 +73,17 @@ const ViewAlbum = ({
85
73
  }
86
74
 
87
75
  const onHeaderIconClicked = (action) => {
88
- switch (action) {
89
- case 'add':
90
- setShowModal(true)
91
- break;
92
- case 'config':
93
- setShowConfigModal(true)
94
- break;
95
- default:
96
- break;
76
+ if (!props.preview) {
77
+ switch (action) {
78
+ case 'add':
79
+ setShowModal(true)
80
+ break;
81
+ case 'config':
82
+ setShowConfigModal(true)
83
+ break;
84
+ default:
85
+ break;
86
+ }
97
87
  }
98
88
  }
99
89
 
@@ -111,6 +101,11 @@ const ViewAlbum = ({
111
101
  setShowModal(false)
112
102
  }
113
103
 
104
+ const cancelConfig = () => {
105
+ setShowConfigModal(false);
106
+ localStorage.removeItem('formStyles')
107
+ }
108
+
114
109
  return (
115
110
  <Container>
116
111
  <Gallery
@@ -137,23 +132,24 @@ const ViewAlbum = ({
137
132
  </Modal>
138
133
  <Modal
139
134
  modalIsOpen={showConfigModal}
140
- closeModal={() => setShowConfigModal(false)}
135
+ closeModal={cancelConfig}
141
136
  exitModalButton={(e) => (
142
137
  <div></div>
143
138
  )}>
144
139
  <Tabs
145
- title="Video Album Config"
146
- tabs={tabs}
147
- id='styling'
148
- >
149
- <VideoAlbumPreview
140
+ title="Video Album Config"
141
+ tabs={tabs}
142
+ id='styling'
143
+ >
144
+ <VideoAlbumPreview
150
145
  componentProps={{ album, preview: true }}
151
146
  formChanged={formChanged}
152
147
  id="preview" />
153
- <Community
154
- center={centerContext}
155
- id="community" />
156
- </Tabs>
148
+ <Community
149
+ center={centerContext}
150
+ community={community}
151
+ id="community" />
152
+ </Tabs>
157
153
  </Modal>
158
154
  </Container>
159
155
  )
@@ -64,37 +64,35 @@ export const community = {
64
64
  }
65
65
  ],
66
66
  styles: {
67
- header: {
67
+ headerStyles: {
68
68
 
69
69
  },
70
- body: {
71
- sectionHeaderStyles: {
72
- padding: 2,
73
- headerBackground: "#00ADC4",
74
- titleColor: "white"
75
- },
76
- customCardStyles: {
77
- cardPadding: 6,
78
- cardTitleFontSize: 15,
79
- cardBackgroundColor: "white",
80
- cardTitleColor: "#00ADC4",
81
- cardBorderSize: 1,
82
- cardBorderColor: "#00ADC4",
83
- onHoverBackgroundColor: "#d3d3d3",
84
- controlsStyles: {
85
- showOnHover: true,
86
- iconColor: "#00ADC4"
87
- }
88
- },
89
- borderRadius: 10,
90
- primaryColor: "#00ADC4",
91
- iconsColor: "#00ADC4",
92
- backgroundColor: "white",
93
- discColor: "gray",
94
- dateColor: "gray",
95
- iconColor: "#00ADC4",
96
- cardTitleFontSize: 15
70
+ sectionHeaderStyles: {
71
+ padding: 2,
72
+ headerBackground: "#00ADC4",
73
+ titleColor: "white"
97
74
  },
75
+ customCardStyles: {
76
+ cardPadding: 6,
77
+ cardTitleFontSize: 15,
78
+ cardBackgroundColor: "white",
79
+ cardTitleColor: "#00ADC4",
80
+ cardBorderSize: 1,
81
+ cardBorderColor: "#00ADC4",
82
+ onHoverBackgroundColor: "#d3d3d3",
83
+ controlsStyles: {
84
+ showOnHover: true,
85
+ iconColor: "#00ADC4"
86
+ }
87
+ },
88
+ borderRadius: 10,
89
+ primaryColor: "#00ADC4",
90
+ iconsColor: "#00ADC4",
91
+ backgroundColor: "white",
92
+ discColor: "gray",
93
+ dateColor: "gray",
94
+ iconColor: "#00ADC4",
95
+ cardTitleFontSize: 15
98
96
 
99
97
  }
100
98
  }
@@ -487,7 +485,7 @@ export const community = {
487
485
  { img: 'https://images.unsplash.com/photo-1574031493536-05e45f214ab6?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxzZWFyY2h8M3x8em9vfGVufDB8fDB8fA%3D%3D&auto=format&fit=crop&w=500&q=60', title: 'Album 4', count: '24' },
488
486
  { img: 'https://images.unsplash.com/photo-1458832463097-ab73e7b4fc4f?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxzZWFyY2h8MTV8fHpvb3xlbnwwfHwwfHw%3D&auto=format&fit=crop&w=500&q=60', title: 'Album 5', count: '24' },
489
487
  { img: 'https://images.unsplash.com/photo-1610655012457-9cbd66fe510b?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxzZWFyY2h8MTZ8fHpvb3xlbnwwfHwwfHw%3D&auto=format&fit=crop&w=500&q=60', title: 'Album 6', count: '24' },
490
-
488
+
491
489
  ],
492
490
  title: 'My Albums'
493
491
  },