@treely/strapi-slices 4.1.1 → 4.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@treely/strapi-slices",
3
- "version": "4.1.1",
3
+ "version": "4.1.2",
4
4
  "license": "MIT",
5
5
  "author": "Tree.ly GmbH",
6
6
  "description": "@treely/strapi-slices is a open source library maintained by Tree.ly.",
@@ -3,6 +3,7 @@ import { StoryFn, Meta } from '@storybook/react';
3
3
 
4
4
  import { storybookStrapiCoverMock } from '../../test/storybookMocks/storybookStrapiMedia';
5
5
  import TextWithCard from '.';
6
+ import CreditsAvailableState from '../../models/CreditsAvailableState';
6
7
 
7
8
  export default {
8
9
  title: 'slices/TextWithCard',
@@ -36,6 +37,96 @@ const card = {
36
37
  footerTitle: 'Footer title',
37
38
  footerSubTitle: 'Footer sub title',
38
39
  };
40
+ const portfolioProject = {
41
+ id: '1',
42
+ title: 'Project 1',
43
+ geom: {
44
+ type: 'Point',
45
+ coordinates: [10.036542145100883, 47.42636837845707],
46
+ },
47
+ area: 2000000,
48
+ location: 'Austria',
49
+ start: new Date('2020-01-01'),
50
+ end: new Date('2050-12-31'),
51
+ projectType: {
52
+ title: 'Project Type 1',
53
+ id: '1',
54
+ createdAt: new Date('2020-01-01'),
55
+ updatedAt: new Date('2020-01-01'),
56
+ },
57
+ projectDeveloper: {
58
+ name: 'Project Developer 1',
59
+ id: '1',
60
+ createdAt: new Date('2020-01-01'),
61
+ updatedAt: new Date('2020-01-01'),
62
+ },
63
+ verificationStandard: {
64
+ id: 'SilvaconsultFCSISO14',
65
+ createdAt: new Date('2020-01-01'),
66
+ updatedAt: new Date('2020-01-01'),
67
+ },
68
+ forecastedAmountYearly: 100,
69
+ riskBuffer: 10,
70
+ createdAt: new Date('2020-01-01'),
71
+ updatedAt: new Date('2020-01-01'),
72
+ creditsAvailable: CreditsAvailableState.YES,
73
+ slug: 'portfolio-slug',
74
+ thumbnail: {
75
+ img: { data: storybookStrapiCoverMock },
76
+ alt: 'Project Thumbnail',
77
+ id: 1,
78
+ },
79
+ };
80
+ const project = {
81
+ id: 1,
82
+ attributes: {
83
+ slug: 'slug',
84
+ locale: 'en',
85
+ fpmProjectId: portfolioProject.id,
86
+ creditsAvailable: CreditsAvailableState.YES,
87
+ footerSubTitle: 'Certified, 2023',
88
+ createdAt: '2022-01-10T15:04:32.897Z',
89
+ updatedAt: '2022-01-11T10:21:42.317Z',
90
+ metadata: null,
91
+ slices: [
92
+ {
93
+ __component: 'sections.rich-text',
94
+ id: 6,
95
+ content: '# This is my rich text!',
96
+ },
97
+ ],
98
+ portfolio: {
99
+ data: {
100
+ id: 1,
101
+ attributes: {
102
+ name: 'my-portfolio',
103
+ title: 'My Portfolio',
104
+ locale: 'en',
105
+ createdAt: '2022-01-10T15:04:32.897Z',
106
+ updatedAt: '2022-01-11T10:21:42.317Z',
107
+ slices: [
108
+ {
109
+ __component: 'sections.rich-text',
110
+ id: 6,
111
+ content: '# This is my rich text!',
112
+ },
113
+ ],
114
+ },
115
+ },
116
+ },
117
+ thumbnail: {
118
+ img: { data: storybookStrapiCoverMock },
119
+ alt: 'Project Thumbnail',
120
+ id: 1,
121
+ },
122
+ localizations: [
123
+ {
124
+ id: 2,
125
+ locale: 'de',
126
+ },
127
+ ],
128
+ },
129
+ };
39
130
 
40
131
  export const Minimal = Template.bind({});
41
132
  Minimal.args = {
@@ -43,6 +134,7 @@ Minimal.args = {
43
134
  title: 'Title',
44
135
  cardPosition: 'left',
45
136
  },
137
+ projects: [],
46
138
  };
47
139
 
48
140
  export const WithTagline = Template.bind({});
@@ -52,6 +144,7 @@ WithTagline.args = {
52
144
  title: 'Title',
53
145
  cardPosition: 'left',
54
146
  },
147
+ projects: [],
55
148
  };
56
149
 
57
150
  export const WithTaglineAndText = Template.bind({});
@@ -62,6 +155,7 @@ WithTaglineAndText.args = {
62
155
  text: 'Text',
63
156
  cardPosition: 'left',
64
157
  },
158
+ projects: [],
65
159
  };
66
160
 
67
161
  export const WithList = Template.bind({});
@@ -73,6 +167,7 @@ WithList.args = {
73
167
  listItems,
74
168
  cardPosition: 'left',
75
169
  },
170
+ projects: [],
76
171
  };
77
172
 
78
173
  export const WithButton = Template.bind({});
@@ -85,6 +180,7 @@ WithButton.args = {
85
180
  button,
86
181
  cardPosition: 'left',
87
182
  },
183
+ projects: [],
88
184
  };
89
185
 
90
186
  export const WithCard = Template.bind({});
@@ -98,6 +194,7 @@ WithCard.args = {
98
194
  card,
99
195
  cardPosition: 'left',
100
196
  },
197
+ projects: [],
101
198
  };
102
199
 
103
200
  export const WithCardOnRight = Template.bind({});
@@ -111,4 +208,17 @@ WithCardOnRight.args = {
111
208
  card,
112
209
  cardPosition: 'right',
113
210
  },
211
+ projects: [],
212
+ };
213
+
214
+ export const WithProjects = Template.bind({});
215
+ WithProjects.args = {
216
+ slice: {
217
+ tagline: 'Tagline',
218
+ title: 'Title',
219
+ text: 'Text',
220
+ cardPosition: 'left',
221
+ project: { data: project },
222
+ },
223
+ projects: [portfolioProject],
114
224
  };