@tap-payments/apple-pay-button 0.0.58-development → 0.0.60-development

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.
Binary file
Binary file
@@ -52,20 +52,20 @@ import { ApplePayVersion } from '../constants';
52
52
  import { Scope } from '../@types/enums';
53
53
  import { prepareApplePayRequest } from '../utils/config';
54
54
  import { useMerchantApplePay } from './useMerchantApplePay';
55
- import { getApplePayPaymentMethod, getDefaultThemeMode, getDefaultValues, getFullThemeMode } from '../utils';
55
+ import { getApplePayPaymentMethod, getDefaultLocale, getDefaultThemeMode, getDefaultValues, getFullThemeMode } from '../utils';
56
56
  export var useApplePay = function (_a) {
57
- var _b, _c, _d, _e, _f;
57
+ var _b, _c, _d, _e;
58
58
  var buttonProps = _a.buttonProps;
59
- var _g = useState(), applePayRequestData = _g[0], setApplePayRequestData = _g[1];
60
- var _h = useState(), applePayRequestConfiguration = _h[0], setApplePayRequestConfiguration = _h[1];
61
- var _j = useState(), profileData = _j[0], setProfile = _j[1];
62
- var _k = useState(false), disabled = _k[0], setDisabled = _k[1];
63
- var _l = useState(null), tapTheme = _l[0], setTapTheme = _l[1];
64
- var _m = useState(), tapLocalization = _m[0], setTapLocalization = _m[1];
65
- var _o = useState(false), error = _o[0], setError = _o[1];
66
- var _p = useState(false), success = _p[0], setSuccess = _p[1];
67
- var _q = useState(false), loading = _q[0], setLoading = _q[1];
68
- var _r = useState(false), isRounded = _r[0], setIsRounded = _r[1];
59
+ var _f = useState(), applePayRequestData = _f[0], setApplePayRequestData = _f[1];
60
+ var _g = useState(), applePayRequestConfiguration = _g[0], setApplePayRequestConfiguration = _g[1];
61
+ var _h = useState(), profileData = _h[0], setProfile = _h[1];
62
+ var _j = useState(false), disabled = _j[0], setDisabled = _j[1];
63
+ var _k = useState(null), tapTheme = _k[0], setTapTheme = _k[1];
64
+ var _l = useState(), tapLocalization = _l[0], setTapLocalization = _l[1];
65
+ var _m = useState(false), error = _m[0], setError = _m[1];
66
+ var _o = useState(false), success = _o[0], setSuccess = _o[1];
67
+ var _p = useState(false), loading = _p[0], setLoading = _p[1];
68
+ var _q = useState(false), isRounded = _q[0], setIsRounded = _q[1];
69
69
  var mappedProps = getDefaultValues(buttonProps);
70
70
  var environment = mappedProps.environment, interfaceObj = mappedProps.interface, merchant = mappedProps.merchant, customer = mappedProps.customer, acceptance = mappedProps.acceptance, scope = mappedProps.scope, debug = mappedProps.debug, onError = mappedProps.onError, onSuccess = mappedProps.onSuccess, onCancel = mappedProps.onCancel, onReady = mappedProps.onReady, metaData = mappedProps.metaData, headers = mappedProps.headers, operator = mappedProps.operator, order = mappedProps.order, onOrderCreated = mappedProps.onOrderCreated, integration = mappedProps.integration, transaction = mappedProps.transaction, post = mappedProps.post, redirect = mappedProps.redirect;
71
71
  var isIframeIntegration = buttonProps.integration === 'iframe';
@@ -86,8 +86,8 @@ export var useApplePay = function (_a) {
86
86
  setSuccess: setSuccess,
87
87
  setIsRounded: setIsRounded
88
88
  });
89
- var lang = (_c = (_b = mappedProps.interface) === null || _b === void 0 ? void 0 : _b.locale) !== null && _c !== void 0 ? _c : 'en';
90
- var theme = getDefaultThemeMode((_d = mappedProps.interface) === null || _d === void 0 ? void 0 : _d.theme);
89
+ var lang = getDefaultLocale((_b = mappedProps.interface) === null || _b === void 0 ? void 0 : _b.locale);
90
+ var theme = getDefaultThemeMode((_c = mappedProps.interface) === null || _c === void 0 ? void 0 : _c.theme);
91
91
  var applePayPaymentMethodOptions = useMemo(function () {
92
92
  if (!profileData)
93
93
  return null;
@@ -120,8 +120,8 @@ export var useApplePay = function (_a) {
120
120
  applePayPaymentMethodOptions,
121
121
  lang,
122
122
  profileData === null || profileData === void 0 ? void 0 : profileData.payment_options.payment_methods,
123
- (_e = buttonProps.interface) === null || _e === void 0 ? void 0 : _e.colorStyle,
124
- (_f = buttonProps.interface) === null || _f === void 0 ? void 0 : _f.theme
123
+ (_d = buttonProps.interface) === null || _d === void 0 ? void 0 : _d.colorStyle,
124
+ (_e = buttonProps.interface) === null || _e === void 0 ? void 0 : _e.theme
125
125
  ]);
126
126
  var showLoader = useMemo(function () {
127
127
  var _a;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tap-payments/apple-pay-button",
3
- "version": "0.0.58-development",
3
+ "version": "0.0.60-development",
4
4
  "description": "Apple Pay Button React Component",
5
5
  "main": "build/index.js",
6
6
  "module": "build/index.js",
@@ -16,9 +16,9 @@
16
16
  "prettier:fix": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,md,css,json}\" *.json *.js",
17
17
  "lint": "eslint src --color --ext .js,.jsx,.ts,.tsx,.json",
18
18
  "lint:fix": "eslint src --ext .js,.jsx,.ts,.tsx --fix",
19
- "copy:files": "copyfiles -u 1 src/**/*.css build/",
20
- "tsc:alias": "tsc-alias -p tsconfig.json",
21
19
  "build": "cross-env NODE_ENV=production webpack",
20
+ "copy:files": "copyfiles -u 1 src/**/*.gif build/ && copyfiles -u 1 src/**/*.css build/",
21
+ "tsc:alias": "tsc-alias -p tsconfig.json",
22
22
  "ts:build": "rm -rf build && tsc && yarn tsc:alias && yarn copy:files",
23
23
  "push": "npm publish --access public --tag development"
24
24
  },