@thecb/components 4.2.4 → 4.2.5

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/index.cjs.js CHANGED
@@ -6115,7 +6115,7 @@ var displayCardBrand = function displayCardBrand(number) {
6115
6115
  return "American Express";
6116
6116
  } else return "Unknown Card";
6117
6117
  };
6118
- var checkRestrictedCards = function checkRestrictedCards(name) {
6118
+ var checkDeniedCards = function checkDeniedCards(name) {
6119
6119
  switch (name) {
6120
6120
  case "DISCOVER":
6121
6121
  return /^(?!6011)/;
@@ -6143,7 +6143,7 @@ var general = /*#__PURE__*/Object.freeze({
6143
6143
  generateClickHandler: generateClickHandler,
6144
6144
  checkCardBrand: checkCardBrand,
6145
6145
  displayCardBrand: displayCardBrand,
6146
- checkRestrictedCards: checkRestrictedCards
6146
+ checkDeniedCards: checkDeniedCards
6147
6147
  });
6148
6148
 
6149
6149
  var Text = function Text(_ref) {
@@ -39419,11 +39419,11 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
39419
39419
  showWalletCheckbox = _ref.showWalletCheckbox,
39420
39420
  saveToWallet = _ref.saveToWallet,
39421
39421
  walletCheckboxMarked = _ref.walletCheckboxMarked,
39422
- restrictedCards = _ref.restrictedCards;
39422
+ deniedCards = _ref.deniedCards;
39423
39423
  React.useEffect(function () {
39424
- if (restrictedCards) {
39425
- restrictedCards.map(function (card) {
39426
- return actions.fields.creditCardNumber.addValidator(matchesRegex(checkRestrictedCards(card)));
39424
+ if (deniedCards) {
39425
+ deniedCards.map(function (card) {
39426
+ return actions.fields.creditCardNumber.addValidator(matchesRegex(checkDeniedCards(card)));
39427
39427
  });
39428
39428
  }
39429
39429
  }, []);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thecb/components",
3
- "version": "4.2.4",
3
+ "version": "4.2.5",
4
4
  "description": "Common lib for CityBase react components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -5,7 +5,7 @@ import CountryDropdown from "../../atoms/country-dropdown";
5
5
  import {
6
6
  checkCardBrand,
7
7
  noop,
8
- checkRestrictedCards,
8
+ checkDeniedCards,
9
9
  displayCardBrand
10
10
  } from "../../../util/general";
11
11
  import {
@@ -33,13 +33,13 @@ const PaymentFormCard = ({
33
33
  showWalletCheckbox,
34
34
  saveToWallet,
35
35
  walletCheckboxMarked,
36
- restrictedCards
36
+ deniedCards
37
37
  }) => {
38
38
  useEffect(() => {
39
- if (restrictedCards) {
40
- restrictedCards.map(card =>
39
+ if (deniedCards) {
40
+ deniedCards.map(card =>
41
41
  actions.fields.creditCardNumber.addValidator(
42
- matchesRegex(checkRestrictedCards(card))
42
+ matchesRegex(checkDeniedCards(card))
43
43
  )
44
44
  );
45
45
  }
@@ -58,7 +58,7 @@ export const displayCardBrand = number => {
58
58
  } else return "Unknown Card";
59
59
  };
60
60
 
61
- export const checkRestrictedCards = name => {
61
+ export const checkDeniedCards = name => {
62
62
  switch (name) {
63
63
  case "DISCOVER":
64
64
  return /^(?!6011)/;