@treely/strapi-slices 6.0.0 → 6.0.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.
@@ -41,11 +41,8 @@ declare const getMessages: (locale: string) => {
41
41
  'portfolio.smallCheckout.contributionValueCurrency.validation.tooLow.EUR': string;
42
42
  'portfolio.smallCheckout.contributionValueCurrency.validation.empty': string;
43
43
  'portfolio.smallCheckout.contributionValueCurrency.validation.tooHigh': string;
44
- 'portfolio.smallCheckout.contributionValueKgs.label': string;
44
+ 'portfolio.smallCheckout.contributionValueTons.label': string;
45
45
  'portfolio.smallCheckout.submitButton': string;
46
- 'portfolio.smallCheckout.cta.title': string;
47
- 'portfolio.smallCheckout.cta.subTitle': string;
48
- 'portfolio.smallCheckout.cta.button': string;
49
46
  'features.projectInfo.projectInfo.value': string;
50
47
  'features.projectInfo.properties.area': string;
51
48
  'features.projectInfo.properties.location': string;
@@ -109,11 +106,8 @@ declare const getMessages: (locale: string) => {
109
106
  'portfolio.smallCheckout.contributionValueCurrency.validation.tooLow.EUR': string;
110
107
  'portfolio.smallCheckout.contributionValueCurrency.validation.empty': string;
111
108
  'portfolio.smallCheckout.contributionValueCurrency.validation.tooHigh': string;
112
- 'portfolio.smallCheckout.contributionValueKgs.label': string;
109
+ 'portfolio.smallCheckout.contributionValueTons.label': string;
113
110
  'portfolio.smallCheckout.submitButton': string;
114
- 'portfolio.smallCheckout.cta.title': string;
115
- 'portfolio.smallCheckout.cta.subTitle': string;
116
- 'portfolio.smallCheckout.cta.button': string;
117
111
  'features.projectInfo.projectInfo.value': string;
118
112
  'features.projectInfo.properties.area': string;
119
113
  'features.projectInfo.properties.location': string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@treely/strapi-slices",
3
- "version": "6.0.0",
3
+ "version": "6.0.2",
4
4
  "license": "MIT",
5
5
  "author": "Tree.ly FlexCo",
6
6
  "description": "@treely/strapi-slices is a open source library maintained by Tree.ly.",
@@ -134,7 +134,7 @@
134
134
  "adblock-detect-react": "^1.1.0",
135
135
  "axios": "^1.7.2",
136
136
  "axios-cache-interceptor": "^1.5.3",
137
- "boemly": "^5.10.0",
137
+ "boemly": "^5.13.0",
138
138
  "formik": "^2.4.5",
139
139
  "framer-motion": "^10.16.5",
140
140
  "mapbox-gl": "^2.15.0"
@@ -23,25 +23,25 @@ const CreditsAvailableBadge = ({
23
23
  message: formatMessage({
24
24
  id: 'components.creditsAvailableBadge.text.yes',
25
25
  }),
26
- color: 'var(--boemly-colors-primary-800)',
26
+ color: 'green.600',
27
27
  },
28
28
  [CreditAvailability.NO_CREDITS_AVAILABLE]: {
29
29
  message: formatMessage({
30
30
  id: 'components.creditsAvailableBadge.text.no',
31
31
  }),
32
- color: 'var(--boemly-colors-red-600)',
32
+ color: 'red.600',
33
33
  },
34
34
  [CreditAvailability.SOME_CREDITS_AVAILABLE]: {
35
35
  message: formatMessage({
36
36
  id: 'components.creditsAvailableBadge.text.some',
37
37
  }),
38
- color: 'var(--boemly-colors-orange-500)',
38
+ color: 'orange.500',
39
39
  },
40
40
  [CreditAvailability.SOON_CREDITS_AVAILABLE]: {
41
41
  message: formatMessage({
42
42
  id: 'components.creditsAvailableBadge.text.notYet',
43
43
  }),
44
- color: 'var(--boemly-colors-blue-500)',
44
+ color: 'blue.500',
45
45
  },
46
46
  };
47
47
 
@@ -42,7 +42,7 @@ describe('The SmallCheckout component', () => {
42
42
 
43
43
  expect(
44
44
  screen.getByText(
45
- messagesEn['portfolio.smallCheckout.contributionValueKgs.label']
45
+ messagesEn['portfolio.smallCheckout.contributionValueTons.label']
46
46
  )
47
47
  ).toBeInTheDocument();
48
48
  });
@@ -97,12 +97,12 @@ describe('The SmallCheckout component', () => {
97
97
 
98
98
  await userEvent.clear(
99
99
  screen.getByLabelText(
100
- messagesEn['portfolio.smallCheckout.contributionValueKgs.label']
100
+ messagesEn['portfolio.smallCheckout.contributionValueTons.label']
101
101
  )
102
102
  );
103
103
  await userEvent.type(
104
104
  screen.getByLabelText(
105
- messagesEn['portfolio.smallCheckout.contributionValueKgs.label']
105
+ messagesEn['portfolio.smallCheckout.contributionValueTons.label']
106
106
  ),
107
107
  '3'
108
108
  );
@@ -142,7 +142,7 @@ const SmallCheckout = ({
142
142
  <Formik
143
143
  initialValues={{
144
144
  contributionValueCurrency: initialContributionValue.toString(),
145
- contributionValueKgs: (
145
+ contributionValueTons: (
146
146
  initialContributionValue /
147
147
  pricePerKg /
148
148
  1000
@@ -174,7 +174,7 @@ const SmallCheckout = ({
174
174
 
175
175
  setValues({
176
176
  contributionValueCurrency: value.toString(),
177
- contributionValueKgs: (
177
+ contributionValueTons: (
178
178
  value /
179
179
  pricePerKg /
180
180
  1000
@@ -203,10 +203,10 @@ const SmallCheckout = ({
203
203
  </Box>
204
204
 
205
205
  <Box width="full">
206
- <Field name="contributionValueKgs">
206
+ <Field name="contributionValueTons">
207
207
  {({ field }: FieldProps) => (
208
208
  <BoemlyFormControl
209
- id="contributionValueKgs"
209
+ id="contributionValueTons"
210
210
  size="md"
211
211
  inputProps={{
212
212
  type: 'number',
@@ -219,21 +219,21 @@ const SmallCheckout = ({
219
219
  pricePerKg *
220
220
  1000
221
221
  ).toString(),
222
- contributionValueKgs: value.toString(),
222
+ contributionValueTons: value.toString(),
223
223
  });
224
224
  },
225
225
  }}
226
226
  label={formatMessage({
227
- id: 'portfolio.smallCheckout.contributionValueKgs.label',
227
+ id: 'portfolio.smallCheckout.contributionValueTons.label',
228
228
  })}
229
229
  rightAddonsOrElements={[
230
230
  <InputRightAddon key="tCO₂">tCO₂</InputRightAddon>,
231
231
  ]}
232
232
  isInvalid={
233
- !!errors.contributionValueKgs &&
234
- touched.contributionValueKgs
233
+ !!errors.contributionValueTons &&
234
+ touched.contributionValueTons
235
235
  }
236
- errorMessage={errors.contributionValueKgs}
236
+ errorMessage={errors.contributionValueTons}
237
237
  />
238
238
  )}
239
239
  </Field>
@@ -16,16 +16,10 @@ const messagesDe = {
16
16
  'portfolio.smallCheckout.contributionValueCurrency.validation.empty':
17
17
  'Bitte geben Sie einen Wert ein',
18
18
  'portfolio.smallCheckout.contributionValueCurrency.validation.tooHigh':
19
- 'Für größere Einkäufe kontaktieren Sie bitte unser Verkaufsteam über den unten stehenden Button',
19
+ 'Für größere Einkäufe kontaktieren Sie bitte unser Verkaufsteam',
20
20
 
21
- 'portfolio.smallCheckout.contributionValueKgs.label': 'Beitrag in Tonnen',
21
+ 'portfolio.smallCheckout.contributionValueTons.label': 'Beitrag in Tonnen',
22
22
 
23
23
  'portfolio.smallCheckout.submitButton': 'Credits kaufen',
24
-
25
- 'portfolio.smallCheckout.cta.title':
26
- 'Möchten Sie mehr als 10.000 tCO₂ kaufen?',
27
- 'portfolio.smallCheckout.cta.subTitle':
28
- 'Für Unternehmenskunden bieten wir individuelle Lösungen an. Kontaktieren Sie uns.',
29
- 'portfolio.smallCheckout.cta.button': 'Unser Vertriebsteam kontaktieren',
30
24
  };
31
25
  export default messagesDe;
@@ -15,16 +15,11 @@ const messagesEn = {
15
15
  'portfolio.smallCheckout.contributionValueCurrency.validation.empty':
16
16
  'Please enter a value',
17
17
  'portfolio.smallCheckout.contributionValueCurrency.validation.tooHigh':
18
- 'For bigger purchases please contact our sales team via office@tree.ly',
18
+ 'For bigger purchases please contact our sales team',
19
19
 
20
- 'portfolio.smallCheckout.contributionValueKgs.label':
20
+ 'portfolio.smallCheckout.contributionValueTons.label':
21
21
  'Contribution Amount in Tons',
22
22
 
23
23
  'portfolio.smallCheckout.submitButton': 'Buy credits',
24
-
25
- 'portfolio.smallCheckout.cta.title': 'Looking to buy more than 10.000 tCO₂?',
26
- 'portfolio.smallCheckout.cta.subTitle':
27
- 'For enterprise-customers we offer custom solutions. Feel free to contact us.',
28
- 'portfolio.smallCheckout.cta.button': 'Contact our Sales Team',
29
24
  };
30
25
  export default messagesEn;
@@ -1,3 +1,3 @@
1
1
  export const MINIMUM_CONTRIBUTION_VALUE_IN_MONEY = 10;
2
2
 
3
- export const MAXIMUM_CONTRIBUTION_VALUE_IN_MONEY = 60_000;
3
+ export const MAXIMUM_CONTRIBUTION_VALUE_IN_MONEY = 10_000;
@@ -1,6 +1,6 @@
1
1
  interface SmallCheckoutForm {
2
2
  contributionValueCurrency: string;
3
- contributionValueKgs: string;
3
+ contributionValueTons: string;
4
4
  }
5
5
 
6
6
  export default SmallCheckoutForm;