@mohamed-karawia/library 0.1.11 → 0.1.15

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/Enrollment/Admin/ViewForms/ViewForms.js +3 -3
  2. package/dist/stories/Events/Event/Event.js +5 -9
  3. package/dist/stories/Events/EventsList/EventsList.js +2 -19
  4. package/dist/stories/Library/Folders/Folders.js +3 -8
  5. package/dist/stories/Library/Notes/Notes.js +2 -19
  6. package/dist/stories/Music Album/ViewAlbum/ViewAlbum.js +2 -10
  7. package/dist/stories/Music Album/ViewAlbums/ViewAlbums.js +1 -12
  8. package/dist/stories/Pages/Chat/Chat.js +3 -0
  9. package/dist/stories/Pages/Enrollment/Forms/Forms.js +6 -1
  10. package/dist/stories/Pages/Events/Event/Event.js +9 -3
  11. package/dist/stories/Pages/Events/Events/Events.js +19 -1
  12. package/dist/stories/Pages/Library/Folders/Library.js +4 -0
  13. package/dist/stories/Pages/Library/Notes/Notes.js +20 -1
  14. package/dist/stories/Pages/Music/MusicAlbum/Music.js +9 -1
  15. package/dist/stories/Pages/Music/MusicAlbums/MusicAlbums.js +15 -1
  16. package/dist/stories/Pages/Photos/Albums/Albums.js +6 -1
  17. package/dist/stories/Pages/Video/DetailedVideo/DetailedVideo.js +2 -1
  18. package/dist/stories/Pages/Video/VideoAlbum/Video.js +14 -1
  19. package/dist/stories/Pages/ViewWorld/constatnts.js +9 -5
  20. package/dist/stories/Photo Album/ViewAlbums/ViewAlbums.js +0 -3
  21. package/dist/stories/Reusable Components/Cards/Card-style-11/CardStyle11.js +7 -1
  22. package/dist/stories/Reusable Components/Cards/Card-style-3/CardStyle3.js +7 -1
  23. package/dist/stories/Reusable Components/Cards/Card-style-9/CardStyle9.js +5 -1
  24. package/dist/stories/Reusable Components/Gallery/Gallery.js +2 -2
  25. package/dist/stories/Reusable Components/ReusableList/ReusableList.js +2 -2
  26. package/dist/stories/Reusable Components/WidgetContainer/WidgetContainer.js +7 -2
  27. package/dist/stories/VideoAlbum/VideoSpace/VideoSpace.js +5 -3
  28. package/dist/stories/VideoAlbum/ViewAlbum/ViewAlbum.js +0 -11
  29. package/dist/stories/helpers/util.js +13 -6
  30. package/package.json +4 -4
  31. package/src/stories/Enrollment/Admin/ViewForms/ViewForms.jsx +2 -1
  32. package/src/stories/Events/Event/Event.jsx +3 -6
  33. package/src/stories/Events/EventsList/EventsList.jsx +1 -17
  34. package/src/stories/Library/Folders/Folders.jsx +2 -6
  35. package/src/stories/Library/Notes/Notes.jsx +1 -17
  36. package/src/stories/Music Album/ViewAlbum/ViewAlbum.jsx +1 -8
  37. package/src/stories/Music Album/ViewAlbums/ViewAlbums.jsx +2 -10
  38. package/src/stories/Pages/Chat/Chat.jsx +1 -0
  39. package/src/stories/Pages/Enrollment/Forms/Forms.jsx +7 -1
  40. package/src/stories/Pages/Events/Event/Event.jsx +8 -2
  41. package/src/stories/Pages/Events/Events/Events.jsx +18 -0
  42. package/src/stories/Pages/Library/Folders/Library.jsx +7 -1
  43. package/src/stories/Pages/Library/Notes/Notes.jsx +30 -11
  44. package/src/stories/Pages/Music/MusicAlbum/Music.jsx +9 -1
  45. package/src/stories/Pages/Music/MusicAlbums/MusicAlbums.jsx +16 -1
  46. package/src/stories/Pages/Photos/Albums/Albums.jsx +5 -0
  47. package/src/stories/Pages/Video/DetailedVideo/DetailedVideo.jsx +2 -1
  48. package/src/stories/Pages/Video/VideoAlbum/Video.jsx +13 -1
  49. package/src/stories/Pages/ViewWorld/constatnts.js +6 -6
  50. package/src/stories/Photo Album/ViewAlbums/ViewAlbums.jsx +0 -1
  51. package/src/stories/Reusable Components/Cards/Card-style-11/CardStyle11.jsx +5 -0
  52. package/src/stories/Reusable Components/Cards/Card-style-3/CardStyle3.jsx +5 -1
  53. package/src/stories/Reusable Components/Cards/Card-style-9/CardStyle9.jsx +3 -1
  54. package/src/stories/Reusable Components/Gallery/Gallery.jsx +2 -2
  55. package/src/stories/Reusable Components/ReusableList/ReusableList.jsx +2 -2
  56. package/src/stories/Reusable Components/WidgetContainer/WidgetContainer.jsx +7 -1
  57. package/src/stories/VideoAlbum/VideoSpace/VideoSpace.jsx +3 -1
  58. package/src/stories/VideoAlbum/ViewAlbum/ViewAlbum.jsx +0 -9
  59. package/src/stories/helpers/util.js +6 -6
@@ -18,7 +18,9 @@ const CardStyle9 = ({ username, answered, img, status, ...props }) => {
18
18
  }
19
19
 
20
20
  return (
21
- <Card {...props}>
21
+ <Card
22
+ onClick={() => props.cardClicked()}
23
+ {...props}>
22
24
  <ImgWrapper {...props}>
23
25
  <Img src={img} />
24
26
  </ImgWrapper>
@@ -14,8 +14,8 @@ const Gallery = ({ data, cardStyle, customCardStyles, type, cardControls = null,
14
14
  props.iconClicked(action)
15
15
  }
16
16
 
17
- const clicked = (index) => {
18
- props.cardClicked(index)
17
+ const clicked = (index, cardProps) => {
18
+ props.cardClicked(index, cardProps)
19
19
  }
20
20
 
21
21
  const cardIconClicked = (action, index) => {
@@ -14,8 +14,8 @@ const ReusableList = ({ data, cardStyle, customCardStyles, type, cardControls =
14
14
  props.iconClicked(action)
15
15
  }
16
16
 
17
- const clicked = (index) => {
18
- props.cardClicked(index)
17
+ const clicked = (index, cardProps) => {
18
+ props.cardClicked(index, cardProps)
19
19
  }
20
20
 
21
21
  const cardIconClicked = (action, index) => {
@@ -13,7 +13,12 @@ const WidgetContainer = ({
13
13
  ...props
14
14
  }) => {
15
15
 
16
- const child = getWidgetType(widgetType, widgetProps)
16
+ const cardClicked = (path) => {
17
+ props.cardClicked(path)
18
+ }
19
+
20
+ const child = getWidgetType(widgetType, widgetProps, cardClicked)
21
+
17
22
 
18
23
  const iconCliked = (action) => {
19
24
  console.log(action)
@@ -39,6 +44,7 @@ const WidgetContainer = ({
39
44
  const Container = styled.div`
40
45
  display: flex;
41
46
  flex-direction: column;
47
+ width: 100%;
42
48
  `
43
49
 
44
50
  const Body = styled.div`
@@ -7,6 +7,7 @@ import Comments from '../Comments/Comments';
7
7
  import RichTextInput from '../../Common Inputs/RichTextInput/RichTextInput';
8
8
 
9
9
  const VideoSpace = ({
10
+ videoSrc,
10
11
  title,
11
12
  discription,
12
13
  date,
@@ -29,7 +30,8 @@ const VideoSpace = ({
29
30
  return (
30
31
  <Container backgroundColor={backgroundColor}>
31
32
  <VideoPlayer
32
- iconsColor={iconsColor} />
33
+ iconsColor={iconsColor}
34
+ src={videoSrc} />
33
35
  <VideoDetails detailsPadding={detailsPadding}>
34
36
  <Top>
35
37
  <Title titleFontSize={titleFontSize} titleColor={titleColor}>{title}</Title>
@@ -79,21 +79,12 @@ const ViewAlbum = ({
79
79
  data={album}
80
80
  type="flat"
81
81
  cardStyle="card-style-6"
82
- headerStyles={{
83
- padding: 10,
84
- headerBackground: 'black',
85
- titleColor: '#ffff',
86
- controlsStyles: {
87
- iconSize: 25
88
- }
89
- }}
90
82
  columnsNumber={3}
91
83
  galleryColumnGap={10}
92
84
  galleryRowGap={20}
93
85
  galleryControls={galleryControls}
94
86
  iconClicked={onHeaderIconClicked}
95
87
  cardControls={cardControls}
96
- cardClicked={() => null}
97
88
  cardIconClicked={cardIconClicked}
98
89
  customCardStyles={cardStyles}
99
90
  {...props}
@@ -44,21 +44,21 @@ export const getCardStyle = (cardProps, cardType, customCardStyles, cardControls
44
44
  const cardTypes = {
45
45
  'card-style-1': (<CardStyle1 key={index} {...cardProps} {...customCardStyles} cardControls={cardControls} />),
46
46
  'card-style-2': (<CardStyle2 key={index} {...cardProps} {...customCardStyles} cardControls={cardControls}/>),
47
- 'card-style-3': (<CardStyle3 key={index} {...cardProps} {...customCardStyles} cardControls={cardControls}/>),
47
+ 'card-style-3': (<CardStyle3 key={index} {...cardProps} {...customCardStyles} cardControls={cardControls} cardClicked={(path) => clicked(path)}/>),
48
48
  'card-style-4': (<CardStyle4 key={index} {...cardProps} {...customCardStyles} cardControls={cardControls}/>),
49
- 'card-style-6': (<CardStyle6 key={index} {...cardProps} {...customCardStyles} cardControls={cardControls} cardClicked={() => clicked(index)} iconClicked={(action) => cardIconClicked(action, index)} />),
49
+ 'card-style-6': (<CardStyle6 key={index} {...cardProps} {...customCardStyles} cardControls={cardControls} cardClicked={() => clicked(index, cardProps)} iconClicked={(action) => cardIconClicked(action, index)} />),
50
50
  'card-style-7': (<CardStyle7 key={index} {...cardProps} {...customCardStyles} cardControls={cardControls} cardClicked={() => clicked(index)} iconClicked={(action) => cardIconClicked(action, index)} />),
51
51
  'card-style-8': (<CardStyle8 key={index} {...cardProps} {...customCardStyles} cardControls={cardControls} cardClicked={() => clicked(index)} iconClicked={(action) => cardIconClicked(action, index)} />),
52
- 'card-style-9': (<CardStyle9 key={index} {...cardProps} {...customCardStyles} cardControls={cardControls} cardClicked={() => clicked(index)} iconClicked={(action) => cardIconClicked(action, index)} />),
52
+ 'card-style-9': (<CardStyle9 key={index} {...cardProps} {...customCardStyles} cardControls={cardControls} cardClicked={() => clicked(index, cardProps)} iconClicked={(action) => cardIconClicked(action, index)} />),
53
53
  'card-style-10': (<CardStyle10 key={index} {...cardProps} {...customCardStyles} cardControls={cardControls} cardClicked={() => clicked(index)} iconClicked={(action) => cardIconClicked(action, index)} />),
54
- 'card-style-11': (<CardStyle11 key={index} {...cardProps} {...customCardStyles} cardControls={cardControls} cardClicked={() => clicked(index)} iconClicked={(action) => cardIconClicked(action, index)} />),
54
+ 'card-style-11': (<CardStyle11 key={index} {...cardProps} {...customCardStyles} cardControls={cardControls} cardClicked={() => clicked(index, cardProps)} iconClicked={(action) => cardIconClicked(action, index)} />),
55
55
  }
56
56
  return cardTypes[cardType]
57
57
  };
58
58
 
59
- export const getWidgetType = (widgetType, props) => {
59
+ export const getWidgetType = (widgetType, props, cardClicked) => {
60
60
  const widgetTypes = {
61
- 'list': (<ReusableList {...props}/>),
61
+ 'list': (<ReusableList cardClicked={(path) => cardClicked(path)} {...props}/>),
62
62
  'music player': (<MusicPlayerWidget {...props} />),
63
63
  'logo': (<LogoWidget {...props}/>),
64
64
  'video player': (<VideoPlayer {...props}/>)