@treely/strapi-slices 6.0.1 → 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.
- package/dist/components/portfolio/SmallCheckout/messages.de.d.ts +1 -4
- package/dist/components/portfolio/SmallCheckout/messages.en.d.ts +1 -4
- package/dist/constants/domain.d.ts +1 -1
- package/dist/models/forms/SmallCheckoutForm.d.ts +1 -1
- package/dist/rootMessages.de.d.ts +1 -4
- package/dist/rootMessages.en.d.ts +1 -4
- package/dist/strapi-slices.cjs.development.js +15 -21
- package/dist/strapi-slices.cjs.development.js.map +1 -1
- package/dist/strapi-slices.cjs.production.min.js +1 -1
- package/dist/strapi-slices.cjs.production.min.js.map +1 -1
- package/dist/strapi-slices.esm.js +15 -21
- package/dist/strapi-slices.esm.js.map +1 -1
- package/dist/utils/getMessages.d.ts +2 -8
- package/package.json +2 -2
- package/src/components/portfolio/SmallCheckout/SmallCheckout.test.tsx +3 -3
- package/src/components/portfolio/SmallCheckout/SmallCheckout.tsx +9 -9
- package/src/components/portfolio/SmallCheckout/messages.de.ts +2 -8
- package/src/components/portfolio/SmallCheckout/messages.en.ts +2 -7
- package/src/constants/domain.ts +1 -1
- package/src/models/forms/SmallCheckoutForm.ts +1 -1
|
@@ -9,10 +9,7 @@ declare const messagesDe: {
|
|
|
9
9
|
'portfolio.smallCheckout.contributionValueCurrency.validation.tooLow.EUR': string;
|
|
10
10
|
'portfolio.smallCheckout.contributionValueCurrency.validation.empty': string;
|
|
11
11
|
'portfolio.smallCheckout.contributionValueCurrency.validation.tooHigh': string;
|
|
12
|
-
'portfolio.smallCheckout.
|
|
12
|
+
'portfolio.smallCheckout.contributionValueTons.label': string;
|
|
13
13
|
'portfolio.smallCheckout.submitButton': string;
|
|
14
|
-
'portfolio.smallCheckout.cta.title': string;
|
|
15
|
-
'portfolio.smallCheckout.cta.subTitle': string;
|
|
16
|
-
'portfolio.smallCheckout.cta.button': string;
|
|
17
14
|
};
|
|
18
15
|
export default messagesDe;
|
|
@@ -9,10 +9,7 @@ declare const messagesEn: {
|
|
|
9
9
|
'portfolio.smallCheckout.contributionValueCurrency.validation.tooLow.EUR': string;
|
|
10
10
|
'portfolio.smallCheckout.contributionValueCurrency.validation.empty': string;
|
|
11
11
|
'portfolio.smallCheckout.contributionValueCurrency.validation.tooHigh': string;
|
|
12
|
-
'portfolio.smallCheckout.
|
|
12
|
+
'portfolio.smallCheckout.contributionValueTons.label': string;
|
|
13
13
|
'portfolio.smallCheckout.submitButton': string;
|
|
14
|
-
'portfolio.smallCheckout.cta.title': string;
|
|
15
|
-
'portfolio.smallCheckout.cta.subTitle': string;
|
|
16
|
-
'portfolio.smallCheckout.cta.button': string;
|
|
17
14
|
};
|
|
18
15
|
export default messagesEn;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const MINIMUM_CONTRIBUTION_VALUE_IN_MONEY = 10;
|
|
2
|
-
export declare const MAXIMUM_CONTRIBUTION_VALUE_IN_MONEY =
|
|
2
|
+
export declare const MAXIMUM_CONTRIBUTION_VALUE_IN_MONEY = 10000;
|
|
@@ -41,11 +41,8 @@ declare const rootMessagesDe: {
|
|
|
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.
|
|
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;
|
|
@@ -41,11 +41,8 @@ declare const rootMessagesEn: {
|
|
|
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.
|
|
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;
|
|
@@ -2359,12 +2359,9 @@ var messagesDe$5 = {
|
|
|
2359
2359
|
'portfolio.smallCheckout.contributionValueCurrency.validation.tooLow.CHF': 'Der Wert muss mindestens 10 CHF betragen',
|
|
2360
2360
|
'portfolio.smallCheckout.contributionValueCurrency.validation.tooLow.EUR': 'Der Wert muss mindestens 10 Euro betragen.',
|
|
2361
2361
|
'portfolio.smallCheckout.contributionValueCurrency.validation.empty': 'Bitte geben Sie einen Wert ein',
|
|
2362
|
-
'portfolio.smallCheckout.contributionValueCurrency.validation.tooHigh': 'Für größere Einkäufe kontaktieren Sie bitte unser Verkaufsteam
|
|
2363
|
-
'portfolio.smallCheckout.
|
|
2364
|
-
'portfolio.smallCheckout.submitButton': 'Credits kaufen'
|
|
2365
|
-
'portfolio.smallCheckout.cta.title': 'Möchten Sie mehr als 10.000 tCO₂ kaufen?',
|
|
2366
|
-
'portfolio.smallCheckout.cta.subTitle': 'Für Unternehmenskunden bieten wir individuelle Lösungen an. Kontaktieren Sie uns.',
|
|
2367
|
-
'portfolio.smallCheckout.cta.button': 'Unser Vertriebsteam kontaktieren'
|
|
2362
|
+
'portfolio.smallCheckout.contributionValueCurrency.validation.tooHigh': 'Für größere Einkäufe kontaktieren Sie bitte unser Verkaufsteam',
|
|
2363
|
+
'portfolio.smallCheckout.contributionValueTons.label': 'Beitrag in Tonnen',
|
|
2364
|
+
'portfolio.smallCheckout.submitButton': 'Credits kaufen'
|
|
2368
2365
|
};
|
|
2369
2366
|
|
|
2370
2367
|
var messagesDe$4 = {
|
|
@@ -2476,12 +2473,9 @@ var messagesEn$2 = {
|
|
|
2476
2473
|
'portfolio.smallCheckout.contributionValueCurrency.validation.tooLow.CHF': 'The value must be at least 10 CHF',
|
|
2477
2474
|
'portfolio.smallCheckout.contributionValueCurrency.validation.tooLow.EUR': 'The value must be at least 10 Euro',
|
|
2478
2475
|
'portfolio.smallCheckout.contributionValueCurrency.validation.empty': 'Please enter a value',
|
|
2479
|
-
'portfolio.smallCheckout.contributionValueCurrency.validation.tooHigh': 'For bigger purchases please contact our sales team
|
|
2480
|
-
'portfolio.smallCheckout.
|
|
2481
|
-
'portfolio.smallCheckout.submitButton': 'Buy credits'
|
|
2482
|
-
'portfolio.smallCheckout.cta.title': 'Looking to buy more than 10.000 tCO₂?',
|
|
2483
|
-
'portfolio.smallCheckout.cta.subTitle': 'For enterprise-customers we offer custom solutions. Feel free to contact us.',
|
|
2484
|
-
'portfolio.smallCheckout.cta.button': 'Contact our Sales Team'
|
|
2476
|
+
'portfolio.smallCheckout.contributionValueCurrency.validation.tooHigh': 'For bigger purchases please contact our sales team',
|
|
2477
|
+
'portfolio.smallCheckout.contributionValueTons.label': 'Contribution Amount in Tons',
|
|
2478
|
+
'portfolio.smallCheckout.submitButton': 'Buy credits'
|
|
2485
2479
|
};
|
|
2486
2480
|
|
|
2487
2481
|
var messagesEn$1 = {
|
|
@@ -4102,7 +4096,7 @@ var Glossary = function Glossary(_ref) {
|
|
|
4102
4096
|
};
|
|
4103
4097
|
|
|
4104
4098
|
var MINIMUM_CONTRIBUTION_VALUE_IN_MONEY = 10;
|
|
4105
|
-
var MAXIMUM_CONTRIBUTION_VALUE_IN_MONEY =
|
|
4099
|
+
var MAXIMUM_CONTRIBUTION_VALUE_IN_MONEY = 10000;
|
|
4106
4100
|
|
|
4107
4101
|
var ShopCheckout = function ShopCheckout(_ref) {
|
|
4108
4102
|
var slice = _ref.slice;
|
|
@@ -4582,7 +4576,7 @@ var SmallCheckout = function SmallCheckout(_ref) {
|
|
|
4582
4576
|
}))), React__default.default.createElement(formik.Formik, {
|
|
4583
4577
|
initialValues: {
|
|
4584
4578
|
contributionValueCurrency: initialContributionValue.toString(),
|
|
4585
|
-
|
|
4579
|
+
contributionValueTons: (initialContributionValue / pricePerKg / 1000).toString()
|
|
4586
4580
|
},
|
|
4587
4581
|
validate: validateForm,
|
|
4588
4582
|
onSubmit: onSubmit
|
|
@@ -4612,7 +4606,7 @@ var SmallCheckout = function SmallCheckout(_ref) {
|
|
|
4612
4606
|
var value = e.target.valueAsNumber;
|
|
4613
4607
|
setValues({
|
|
4614
4608
|
contributionValueCurrency: value.toString(),
|
|
4615
|
-
|
|
4609
|
+
contributionValueTons: (value / pricePerKg / 1000).toString()
|
|
4616
4610
|
});
|
|
4617
4611
|
}
|
|
4618
4612
|
},
|
|
@@ -4630,11 +4624,11 @@ var SmallCheckout = function SmallCheckout(_ref) {
|
|
|
4630
4624
|
})), React__default.default.createElement(boemly.Box, {
|
|
4631
4625
|
width: "full"
|
|
4632
4626
|
}, React__default.default.createElement(formik.Field, {
|
|
4633
|
-
name: "
|
|
4627
|
+
name: "contributionValueTons"
|
|
4634
4628
|
}, function (_ref6) {
|
|
4635
4629
|
var field = _ref6.field;
|
|
4636
4630
|
return React__default.default.createElement(boemly.BoemlyFormControl, {
|
|
4637
|
-
id: "
|
|
4631
|
+
id: "contributionValueTons",
|
|
4638
4632
|
size: "md",
|
|
4639
4633
|
inputProps: {
|
|
4640
4634
|
type: 'number',
|
|
@@ -4643,18 +4637,18 @@ var SmallCheckout = function SmallCheckout(_ref) {
|
|
|
4643
4637
|
var value = e.target.valueAsNumber;
|
|
4644
4638
|
setValues({
|
|
4645
4639
|
contributionValueCurrency: (value * pricePerKg * 1000).toString(),
|
|
4646
|
-
|
|
4640
|
+
contributionValueTons: value.toString()
|
|
4647
4641
|
});
|
|
4648
4642
|
}
|
|
4649
4643
|
},
|
|
4650
4644
|
label: formatMessage({
|
|
4651
|
-
id: 'portfolio.smallCheckout.
|
|
4645
|
+
id: 'portfolio.smallCheckout.contributionValueTons.label'
|
|
4652
4646
|
}),
|
|
4653
4647
|
rightAddonsOrElements: [React__default.default.createElement(boemly.InputRightAddon, {
|
|
4654
4648
|
key: "tCO\u2082"
|
|
4655
4649
|
}, "tCO\u2082")],
|
|
4656
|
-
isInvalid: !!errors.
|
|
4657
|
-
errorMessage: errors.
|
|
4650
|
+
isInvalid: !!errors.contributionValueTons && touched.contributionValueTons,
|
|
4651
|
+
errorMessage: errors.contributionValueTons
|
|
4658
4652
|
});
|
|
4659
4653
|
}))), values.contributionValueCurrency && taxInPercent && taxInPercent > 0 && React__default.default.createElement(boemly.Text, {
|
|
4660
4654
|
size: "smLowNormal",
|