@thecb/components 3.4.0 → 3.4.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thecb/components",
3
- "version": "3.4.0",
3
+ "version": "3.4.1",
4
4
  "description": "Common lib for CityBase react components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -73,12 +73,12 @@
73
73
  }
74
74
  },
75
75
  "dependencies": {
76
- "ramda": "^0.27.0",
77
76
  "formatted-input": "^0.1.3",
78
77
  "framer-motion": "^1.11.0",
79
78
  "numeral": "^2.0.6",
79
+ "ramda": "^0.27.0",
80
80
  "react-aria-modal": "^4.0.0",
81
81
  "react-pose": "^4.0.10",
82
- "redux-freeform": "^4.1.3"
82
+ "redux-freeform": "^4.1.4"
83
83
  }
84
84
  }
@@ -1,5 +1,9 @@
1
1
  import React from "react";
2
- import { required, numberGreaterThan, numberLessThan } from "redux-freeform";
2
+ import {
3
+ required,
4
+ numberGreaterThan,
5
+ numberLessThanOrEqualTo
6
+ } from "redux-freeform";
3
7
  import { displayCurrency } from "../../../util/general";
4
8
  import Text from "../../atoms/text";
5
9
  import {
@@ -28,7 +32,7 @@ const PartialAmountForm = ({
28
32
  [numberGreaterThan.error]: `Your total payment must be greater than ${displayCurrency(
29
33
  minimum
30
34
  )}`,
31
- [numberLessThan.error]: `Your total payment must be less than ${displayCurrency(
35
+ [numberLessThanOrEqualTo.error]: `Your total payment must be less than ${displayCurrency(
32
36
  maximum
33
37
  )}`
34
38
  };
@@ -4,7 +4,7 @@ import {
4
4
  onlyNaturals,
5
5
  validateSum,
6
6
  numberGreaterThan,
7
- numberLessThan
7
+ numberLessThanOrEqualTo
8
8
  } from "redux-freeform";
9
9
 
10
10
  export const createPartialAmountFormState = (
@@ -25,7 +25,7 @@ export const createPartialAmountFormState = (
25
25
  if (!!maximum) {
26
26
  validators.push(
27
27
  validateSum(
28
- numberLessThan(maximum),
28
+ numberLessThanOrEqualTo(maximum),
29
29
  lineItems
30
30
  .filter(lineItem => lineItem != item)
31
31
  .reduce((acc, curr) => [...acc, curr.id], [])
package/.tool-versions DELETED
@@ -1 +0,0 @@
1
- nodejs 10.13.0