@treely/strapi-slices 5.0.0 → 5.1.1

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.
Files changed (40) hide show
  1. package/dist/components/CustomerCard/CustomerCard.d.ts +6 -0
  2. package/dist/components/CustomerCard/index.d.ts +2 -0
  3. package/dist/{slices/CustomerStories → components/CustomerCard}/messages.de.d.ts +1 -1
  4. package/dist/{slices/CustomerStories → components/CustomerCard}/messages.en.d.ts +1 -1
  5. package/dist/components/CustomerQuoteCard/CustomerQuoteCard.d.ts +6 -0
  6. package/dist/components/CustomerQuoteCard/index.d.ts +2 -0
  7. package/dist/components/CustomerQuoteCard/messages.de.d.ts +4 -0
  8. package/dist/components/CustomerQuoteCard/messages.en.d.ts +4 -0
  9. package/dist/models/strapi/StrapiCustomerStory.d.ts +6 -3
  10. package/dist/rootMessages.de.d.ts +2 -1
  11. package/dist/rootMessages.en.d.ts +2 -1
  12. package/dist/strapi-slices.cjs.development.js +178 -109
  13. package/dist/strapi-slices.cjs.development.js.map +1 -1
  14. package/dist/strapi-slices.cjs.production.min.js +1 -1
  15. package/dist/strapi-slices.cjs.production.min.js.map +1 -1
  16. package/dist/strapi-slices.esm.js +178 -109
  17. package/dist/strapi-slices.esm.js.map +1 -1
  18. package/dist/test/strapiMocks/strapiCustomerStory.d.ts +1 -0
  19. package/package.json +1 -1
  20. package/src/components/CreditsAvailableBadge/messages.de.ts +1 -2
  21. package/src/components/CreditsAvailableBadge/messages.en.ts +1 -1
  22. package/src/components/CustomerCard/CustomerCard.test.tsx +49 -0
  23. package/src/components/CustomerCard/CustomerCard.tsx +63 -0
  24. package/src/components/CustomerCard/index.ts +3 -0
  25. package/src/{slices/CustomerStories → components/CustomerCard}/messages.de.ts +1 -1
  26. package/src/{slices/CustomerStories → components/CustomerCard}/messages.en.ts +1 -1
  27. package/src/components/CustomerQuoteCard/CustomerQuoteCard.test.tsx +57 -0
  28. package/src/components/CustomerQuoteCard/CustomerQuoteCard.tsx +55 -0
  29. package/src/components/CustomerQuoteCard/index.ts +3 -0
  30. package/src/components/CustomerQuoteCard/messages.de.ts +4 -0
  31. package/src/components/CustomerQuoteCard/messages.en.ts +4 -0
  32. package/src/components/portfolio/PortfolioProjectCard/messages.de.ts +1 -1
  33. package/src/components/portfolio/PortfolioProjectCard/messages.en.ts +1 -1
  34. package/src/models/strapi/StrapiCustomerStory.ts +6 -3
  35. package/src/rootMessages.de.ts +8 -6
  36. package/src/rootMessages.en.ts +8 -6
  37. package/src/slices/CustomerStories/CustomerStories.stories.tsx +32 -3
  38. package/src/slices/CustomerStories/CustomerStories.test.tsx +2 -2
  39. package/src/slices/CustomerStories/CustomerStories.tsx +13 -56
  40. package/src/test/strapiMocks/strapiCustomerStory.ts +30 -164
@@ -1,9 +1,14 @@
1
1
  import IStrapiData from '../../models/strapi/IStrapiData';
2
2
  import StrapiCustomerStory from '../../models/strapi/StrapiCustomerStory';
3
+ import {
4
+ storybookStrapiAvatarMock,
5
+ storybookStrapiTreeIconMock,
6
+ } from '../storybookMocks/storybookStrapiMedia';
3
7
 
4
8
  export const strapiCustomerStoryMock: IStrapiData<StrapiCustomerStory> = {
5
9
  id: 1,
6
10
  attributes: {
11
+ variant: 'customerCard',
7
12
  slug: 'customer-1',
8
13
  createdAt: '2023-10-31T12:10:43.324Z',
9
14
  updatedAt: '2023-10-31T13:10:25.010Z',
@@ -11,172 +16,19 @@ export const strapiCustomerStoryMock: IStrapiData<StrapiCustomerStory> = {
11
16
  metadata: null,
12
17
  title: 'This is the title',
13
18
  customerName: 'Jodok Bals Bau',
14
- customerIndustry: 'Bau',
15
- customerLogo: {
16
- id: 71,
17
- alt: 'Alt',
18
- img: {
19
- data: {
20
- id: 1,
21
- attributes: {
22
- name: 'default_shareimage.jpeg',
23
- alternativeText: '',
24
- caption: '',
25
- width: 1200,
26
- height: 630,
27
- formats: {
28
- thumbnail: {
29
- name: 'thumbnail_default_shareimage.jpeg',
30
- hash: 'thumbnail_default_shareimage_fecd5ccc7e',
31
- ext: '.jpeg',
32
- mime: 'image/jpeg',
33
- width: 245,
34
- height: 129,
35
- size: 9.36,
36
- path: null,
37
- url: 'https://cdn.tree.ly/storybook/v1/icon_tree.png',
38
- },
39
- large: {
40
- name: 'large_default_shareimage.jpeg',
41
- hash: 'large_default_shareimage_fecd5ccc7e',
42
- ext: '.jpeg',
43
- mime: 'image/jpeg',
44
- width: 1000,
45
- height: 525,
46
- size: 132.73,
47
- path: null,
48
- url: 'https://cdn.tree.ly/storybook/v1/icon_tree.png',
49
- },
50
- medium: {
51
- name: 'medium_default_shareimage.jpeg',
52
- hash: 'medium_default_shareimage_fecd5ccc7e',
53
- ext: '.jpeg',
54
- mime: 'image/jpeg',
55
- width: 750,
56
- height: 394,
57
- size: 78.75,
58
- path: null,
59
- url: 'https://cdn.tree.ly/storybook/v1/icon_tree.png',
60
- },
61
- small: {
62
- name: 'small_default_shareimage.jpeg',
63
- hash: 'small_default_shareimage_fecd5ccc7e',
64
- ext: '.jpeg',
65
- mime: 'image/jpeg',
66
- width: 500,
67
- height: 263,
68
- size: 35.08,
69
- path: null,
70
- url: 'https://cdn.tree.ly/storybook/v1/icon_tree.png',
71
- },
72
- xSmall: {
73
- name: 'xSmall_default_shareimage.jpeg',
74
- hash: 'xSmall_default_shareimage_fecd5ccc7e',
75
- ext: '.jpeg',
76
- mime: 'image/jpeg',
77
- width: 64,
78
- height: 34,
79
- size: 1.31,
80
- path: null,
81
- url: 'https://cdn.tree.ly/storybook/v1/icon_tree.png',
82
- },
83
- },
84
- hash: 'default_shareimage_fecd5ccc7e',
85
- ext: '.jpeg',
86
- mime: 'image/jpeg',
87
- size: 188.72,
88
- url: 'https://cdn.tree.ly/storybook/v1/icon_tree.png',
89
- previewUrl: null,
90
- provider: 'local',
91
- provider_metadata: null,
92
- createdAt: '2021-07-26T08:01:15.702Z',
93
- updatedAt: '2021-09-09T12:50:57.817Z',
94
- },
95
- },
96
- },
19
+ customerCardCustomerIndustry: 'Bau',
20
+ quoteCardCustomerTitle: 'Geschäftsführer, mal2 – malen & mehr',
21
+ quoteCardQuote:
22
+ '"Der Kauf von Bäumen in Uganda in der Ferne spricht mich nicht an. Aber als ich über das Leben der Bäume las und meine Frau mir von Tree.ly erzählte, fand ich meine lokale Lösung."',
23
+ cardImage: {
24
+ id: 1,
25
+ alt: 'Icon alt text',
26
+ img: { data: storybookStrapiTreeIconMock },
97
27
  },
98
28
  img: {
99
- id: 71,
100
- alt: 'Alt',
101
- img: {
102
- data: {
103
- id: 1,
104
- attributes: {
105
- name: 'default_shareimage.jpeg',
106
- alternativeText: '',
107
- caption: '',
108
- width: 1200,
109
- height: 630,
110
- formats: {
111
- thumbnail: {
112
- name: 'thumbnail_default_shareimage.jpeg',
113
- hash: 'thumbnail_default_shareimage_fecd5ccc7e',
114
- ext: '.jpeg',
115
- mime: 'image/jpeg',
116
- width: 245,
117
- height: 129,
118
- size: 9.36,
119
- path: null,
120
- url: 'https://cdn.tree.ly/storybook/v1/icon_tree.png',
121
- },
122
- large: {
123
- name: 'large_default_shareimage.jpeg',
124
- hash: 'large_default_shareimage_fecd5ccc7e',
125
- ext: '.jpeg',
126
- mime: 'image/jpeg',
127
- width: 1000,
128
- height: 525,
129
- size: 132.73,
130
- path: null,
131
- url: 'https://cdn.tree.ly/storybook/v1/icon_tree.png',
132
- },
133
- medium: {
134
- name: 'medium_default_shareimage.jpeg',
135
- hash: 'medium_default_shareimage_fecd5ccc7e',
136
- ext: '.jpeg',
137
- mime: 'image/jpeg',
138
- width: 750,
139
- height: 394,
140
- size: 78.75,
141
- path: null,
142
- url: 'https://cdn.tree.ly/storybook/v1/icon_tree.png',
143
- },
144
- small: {
145
- name: 'small_default_shareimage.jpeg',
146
- hash: 'small_default_shareimage_fecd5ccc7e',
147
- ext: '.jpeg',
148
- mime: 'image/jpeg',
149
- width: 500,
150
- height: 263,
151
- size: 35.08,
152
- path: null,
153
- url: 'https://cdn.tree.ly/storybook/v1/icon_tree.png',
154
- },
155
- xSmall: {
156
- name: 'xSmall_default_shareimage.jpeg',
157
- hash: 'xSmall_default_shareimage_fecd5ccc7e',
158
- ext: '.jpeg',
159
- mime: 'image/jpeg',
160
- width: 64,
161
- height: 34,
162
- size: 1.31,
163
- path: null,
164
- url: 'https://cdn.tree.ly/storybook/v1/icon_tree.png',
165
- },
166
- },
167
- hash: 'default_shareimage_fecd5ccc7e',
168
- ext: '.jpeg',
169
- mime: 'image/jpeg',
170
- size: 188.72,
171
- url: 'https://cdn.tree.ly/storybook/v1/icon_tree.png',
172
- previewUrl: null,
173
- provider: 'local',
174
- provider_metadata: null,
175
- createdAt: '2021-07-26T08:01:15.702Z',
176
- updatedAt: '2021-09-09T12:50:57.817Z',
177
- },
178
- },
179
- },
29
+ id: 1,
30
+ alt: 'Icon alt text',
31
+ img: { data: storybookStrapiTreeIconMock },
180
32
  },
181
33
  slices: [
182
34
  {
@@ -193,3 +45,17 @@ export const strapiCustomerStoryMock: IStrapiData<StrapiCustomerStory> = {
193
45
  ],
194
46
  },
195
47
  };
48
+
49
+ export const strapiCustomerStoryMock1: IStrapiData<StrapiCustomerStory> = {
50
+ id: 2,
51
+ attributes: {
52
+ ...strapiCustomerStoryMock.attributes,
53
+ variant: 'quoteCard',
54
+ cardImage: {
55
+ id: 2,
56
+ alt: 'Avatar image alt text',
57
+ img: { data: storybookStrapiAvatarMock },
58
+ objectFit: 'contain',
59
+ },
60
+ },
61
+ };