@pelcro/react-pelcro-js 4.0.0-alpha.97 → 4.0.0-alpha.98

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
@@ -29824,12 +29824,15 @@ const PaymentMethodContainerWithoutStripe = ({
29824
29824
  notifyBugsnag(() => {
29825
29825
  // eslint-disable-next-line no-undef
29826
29826
  Bugsnag.notify(`Payment ${res.error}`, event => {
29827
- var _error$response, _error$response$data, _error$response$data$;
29827
+ var _error$response, _error$response$data, _error$response$data$, _window$Pelcro3, _window$Pelcro3$site, _window$Pelcro4, _window$Pelcro4$user, _window$Pelcro5;
29828
29828
  event.addMetadata("Stripe Error MetaData", {
29829
29829
  message: res.error.message,
29830
29830
  type: res.error.type,
29831
29831
  code: res.error.code,
29832
- error_message: error === null || error === void 0 ? void 0 : (_error$response = error.response) === null || _error$response === void 0 ? void 0 : (_error$response$data = _error$response.data) === null || _error$response$data === void 0 ? void 0 : (_error$response$data$ = _error$response$data.error) === null || _error$response$data$ === void 0 ? void 0 : _error$response$data$.message
29832
+ error_message: error === null || error === void 0 ? void 0 : (_error$response = error.response) === null || _error$response === void 0 ? void 0 : (_error$response$data = _error$response.data) === null || _error$response$data === void 0 ? void 0 : (_error$response$data$ = _error$response$data.error) === null || _error$response$data$ === void 0 ? void 0 : _error$response$data$.message,
29833
+ site: (_window$Pelcro3 = window.Pelcro) === null || _window$Pelcro3 === void 0 ? void 0 : (_window$Pelcro3$site = _window$Pelcro3.site) === null || _window$Pelcro3$site === void 0 ? void 0 : _window$Pelcro3$site.read(),
29834
+ user: (_window$Pelcro4 = window.Pelcro) === null || _window$Pelcro4 === void 0 ? void 0 : (_window$Pelcro4$user = _window$Pelcro4.user) === null || _window$Pelcro4$user === void 0 ? void 0 : _window$Pelcro4$user.read(),
29835
+ environment: (_window$Pelcro5 = window.Pelcro) === null || _window$Pelcro5 === void 0 ? void 0 : _window$Pelcro5.environment
29833
29836
  });
29834
29837
  });
29835
29838
  });
@@ -29862,21 +29865,6 @@ const PaymentMethodContainerWithoutStripe = ({
29862
29865
  content: isSubCreate ? t("messages.tryAgainFromInvoice") : t("messages.cardAuthFailed")
29863
29866
  }
29864
29867
  });
29865
- } else if ((paymentIntent === null || paymentIntent === void 0 ? void 0 : paymentIntent.status) === "processing" && paymentIntent !== null && paymentIntent !== void 0 && paymentIntent.client_secret) {
29866
- if (!isSubCreate) {
29867
- dispatch({
29868
- type: DISABLE_SUBMIT,
29869
- payload: false
29870
- });
29871
- }
29872
- dispatch({
29873
- type: LOADING,
29874
- payload: false
29875
- });
29876
- set({
29877
- isProcessingInvoice: true
29878
- });
29879
- onSuccess(response);
29880
29868
  } else {
29881
29869
  onSuccess(response);
29882
29870
  }
@@ -29893,14 +29881,17 @@ const PaymentMethodContainerWithoutStripe = ({
29893
29881
  notifyBugsnag(() => {
29894
29882
  // eslint-disable-next-line no-undef
29895
29883
  Bugsnag.notify(`Payment ${error}`, event => {
29896
- var _error$response2, _error$response3, _error$response3$data, _error$response3$data2;
29884
+ var _error$response2, _error$response3, _error$response3$data, _error$response3$data2, _window$Pelcro6, _window$Pelcro6$site, _window$Pelcro7, _window$Pelcro7$user, _window$Pelcro8;
29897
29885
  event.addMetadata("MetaData", {
29898
29886
  name: error === null || error === void 0 ? void 0 : error.name,
29899
29887
  message: error === null || error === void 0 ? void 0 : error.message,
29900
29888
  type: error === null || error === void 0 ? void 0 : error.type,
29901
29889
  code: error === null || error === void 0 ? void 0 : error.code,
29902
29890
  status: error === null || error === void 0 ? void 0 : (_error$response2 = error.response) === null || _error$response2 === void 0 ? void 0 : _error$response2.status,
29903
- error_message: error === null || error === void 0 ? void 0 : (_error$response3 = error.response) === null || _error$response3 === void 0 ? void 0 : (_error$response3$data = _error$response3.data) === null || _error$response3$data === void 0 ? void 0 : (_error$response3$data2 = _error$response3$data.error) === null || _error$response3$data2 === void 0 ? void 0 : _error$response3$data2.message
29891
+ error_message: error === null || error === void 0 ? void 0 : (_error$response3 = error.response) === null || _error$response3 === void 0 ? void 0 : (_error$response3$data = _error$response3.data) === null || _error$response3$data === void 0 ? void 0 : (_error$response3$data2 = _error$response3$data.error) === null || _error$response3$data2 === void 0 ? void 0 : _error$response3$data2.message,
29892
+ site: (_window$Pelcro6 = window.Pelcro) === null || _window$Pelcro6 === void 0 ? void 0 : (_window$Pelcro6$site = _window$Pelcro6.site) === null || _window$Pelcro6$site === void 0 ? void 0 : _window$Pelcro6$site.read(),
29893
+ user: (_window$Pelcro7 = window.Pelcro) === null || _window$Pelcro7 === void 0 ? void 0 : (_window$Pelcro7$user = _window$Pelcro7.user) === null || _window$Pelcro7$user === void 0 ? void 0 : _window$Pelcro7$user.read(),
29894
+ environment: (_window$Pelcro8 = window.Pelcro) === null || _window$Pelcro8 === void 0 ? void 0 : _window$Pelcro8.environment
29904
29895
  });
29905
29896
  });
29906
29897
  });
@@ -29919,11 +29910,14 @@ const PaymentMethodContainerWithoutStripe = ({
29919
29910
  notifyBugsnag(() => {
29920
29911
  // eslint-disable-next-line no-undef
29921
29912
  Bugsnag.notify(`Payment ${error}`, event => {
29922
- var _error$response4, _error$response4$data, _error$response4$data2;
29913
+ var _error$response4, _error$response4$data, _error$response4$data2, _window$Pelcro9, _window$Pelcro9$site, _window$Pelcro10, _window$Pelcro10$user, _window$Pelcro11;
29923
29914
  event.addMetadata("UnexpectedError", {
29924
29915
  message: error.message,
29925
29916
  stack: error.stack,
29926
- error_message: error === null || error === void 0 ? void 0 : (_error$response4 = error.response) === null || _error$response4 === void 0 ? void 0 : (_error$response4$data = _error$response4.data) === null || _error$response4$data === void 0 ? void 0 : (_error$response4$data2 = _error$response4$data.error) === null || _error$response4$data2 === void 0 ? void 0 : _error$response4$data2.message
29917
+ error_message: error === null || error === void 0 ? void 0 : (_error$response4 = error.response) === null || _error$response4 === void 0 ? void 0 : (_error$response4$data = _error$response4.data) === null || _error$response4$data === void 0 ? void 0 : (_error$response4$data2 = _error$response4$data.error) === null || _error$response4$data2 === void 0 ? void 0 : _error$response4$data2.message,
29918
+ site: (_window$Pelcro9 = window.Pelcro) === null || _window$Pelcro9 === void 0 ? void 0 : (_window$Pelcro9$site = _window$Pelcro9.site) === null || _window$Pelcro9$site === void 0 ? void 0 : _window$Pelcro9$site.read(),
29919
+ user: (_window$Pelcro10 = window.Pelcro) === null || _window$Pelcro10 === void 0 ? void 0 : (_window$Pelcro10$user = _window$Pelcro10.user) === null || _window$Pelcro10$user === void 0 ? void 0 : _window$Pelcro10$user.read(),
29920
+ environment: (_window$Pelcro11 = window.Pelcro) === null || _window$Pelcro11 === void 0 ? void 0 : _window$Pelcro11.environment
29927
29921
  });
29928
29922
  });
29929
29923
  });
@@ -30173,7 +30167,7 @@ const PaymentMethodContainerWithoutStripe = ({
30173
30167
  addressId: selectedAddressId,
30174
30168
  couponCode
30175
30169
  }, (err, orderResponse) => {
30176
- var _window$Pelcro3, _window$Pelcro3$user, _window$Pelcro3$user$;
30170
+ var _window$Pelcro12, _window$Pelcro12$user, _window$Pelcro12$user2;
30177
30171
  if (err) {
30178
30172
  toggleAuthenticationSuccessPendingView(false);
30179
30173
  dispatch({
@@ -30204,7 +30198,7 @@ const PaymentMethodContainerWithoutStripe = ({
30204
30198
  });
30205
30199
  }
30206
30200
  window.Pelcro.user.refresh({
30207
- auth_token: (_window$Pelcro3 = window.Pelcro) === null || _window$Pelcro3 === void 0 ? void 0 : (_window$Pelcro3$user = _window$Pelcro3.user) === null || _window$Pelcro3$user === void 0 ? void 0 : (_window$Pelcro3$user$ = _window$Pelcro3$user.read()) === null || _window$Pelcro3$user$ === void 0 ? void 0 : _window$Pelcro3$user$.auth_token
30201
+ auth_token: (_window$Pelcro12 = window.Pelcro) === null || _window$Pelcro12 === void 0 ? void 0 : (_window$Pelcro12$user = _window$Pelcro12.user) === null || _window$Pelcro12$user === void 0 ? void 0 : (_window$Pelcro12$user2 = _window$Pelcro12$user.read()) === null || _window$Pelcro12$user2 === void 0 ? void 0 : _window$Pelcro12$user2.auth_token
30208
30202
  }, (err, res) => {
30209
30203
  dispatch({
30210
30204
  type: DISABLE_SUBMIT,
package/dist/index.esm.js CHANGED
@@ -29794,12 +29794,15 @@ const PaymentMethodContainerWithoutStripe = ({
29794
29794
  notifyBugsnag(() => {
29795
29795
  // eslint-disable-next-line no-undef
29796
29796
  Bugsnag.notify(`Payment ${res.error}`, event => {
29797
- var _error$response, _error$response$data, _error$response$data$;
29797
+ var _error$response, _error$response$data, _error$response$data$, _window$Pelcro3, _window$Pelcro3$site, _window$Pelcro4, _window$Pelcro4$user, _window$Pelcro5;
29798
29798
  event.addMetadata("Stripe Error MetaData", {
29799
29799
  message: res.error.message,
29800
29800
  type: res.error.type,
29801
29801
  code: res.error.code,
29802
- error_message: error === null || error === void 0 ? void 0 : (_error$response = error.response) === null || _error$response === void 0 ? void 0 : (_error$response$data = _error$response.data) === null || _error$response$data === void 0 ? void 0 : (_error$response$data$ = _error$response$data.error) === null || _error$response$data$ === void 0 ? void 0 : _error$response$data$.message
29802
+ error_message: error === null || error === void 0 ? void 0 : (_error$response = error.response) === null || _error$response === void 0 ? void 0 : (_error$response$data = _error$response.data) === null || _error$response$data === void 0 ? void 0 : (_error$response$data$ = _error$response$data.error) === null || _error$response$data$ === void 0 ? void 0 : _error$response$data$.message,
29803
+ site: (_window$Pelcro3 = window.Pelcro) === null || _window$Pelcro3 === void 0 ? void 0 : (_window$Pelcro3$site = _window$Pelcro3.site) === null || _window$Pelcro3$site === void 0 ? void 0 : _window$Pelcro3$site.read(),
29804
+ user: (_window$Pelcro4 = window.Pelcro) === null || _window$Pelcro4 === void 0 ? void 0 : (_window$Pelcro4$user = _window$Pelcro4.user) === null || _window$Pelcro4$user === void 0 ? void 0 : _window$Pelcro4$user.read(),
29805
+ environment: (_window$Pelcro5 = window.Pelcro) === null || _window$Pelcro5 === void 0 ? void 0 : _window$Pelcro5.environment
29803
29806
  });
29804
29807
  });
29805
29808
  });
@@ -29832,21 +29835,6 @@ const PaymentMethodContainerWithoutStripe = ({
29832
29835
  content: isSubCreate ? t("messages.tryAgainFromInvoice") : t("messages.cardAuthFailed")
29833
29836
  }
29834
29837
  });
29835
- } else if ((paymentIntent === null || paymentIntent === void 0 ? void 0 : paymentIntent.status) === "processing" && paymentIntent !== null && paymentIntent !== void 0 && paymentIntent.client_secret) {
29836
- if (!isSubCreate) {
29837
- dispatch({
29838
- type: DISABLE_SUBMIT,
29839
- payload: false
29840
- });
29841
- }
29842
- dispatch({
29843
- type: LOADING,
29844
- payload: false
29845
- });
29846
- set({
29847
- isProcessingInvoice: true
29848
- });
29849
- onSuccess(response);
29850
29838
  } else {
29851
29839
  onSuccess(response);
29852
29840
  }
@@ -29863,14 +29851,17 @@ const PaymentMethodContainerWithoutStripe = ({
29863
29851
  notifyBugsnag(() => {
29864
29852
  // eslint-disable-next-line no-undef
29865
29853
  Bugsnag.notify(`Payment ${error}`, event => {
29866
- var _error$response2, _error$response3, _error$response3$data, _error$response3$data2;
29854
+ var _error$response2, _error$response3, _error$response3$data, _error$response3$data2, _window$Pelcro6, _window$Pelcro6$site, _window$Pelcro7, _window$Pelcro7$user, _window$Pelcro8;
29867
29855
  event.addMetadata("MetaData", {
29868
29856
  name: error === null || error === void 0 ? void 0 : error.name,
29869
29857
  message: error === null || error === void 0 ? void 0 : error.message,
29870
29858
  type: error === null || error === void 0 ? void 0 : error.type,
29871
29859
  code: error === null || error === void 0 ? void 0 : error.code,
29872
29860
  status: error === null || error === void 0 ? void 0 : (_error$response2 = error.response) === null || _error$response2 === void 0 ? void 0 : _error$response2.status,
29873
- error_message: error === null || error === void 0 ? void 0 : (_error$response3 = error.response) === null || _error$response3 === void 0 ? void 0 : (_error$response3$data = _error$response3.data) === null || _error$response3$data === void 0 ? void 0 : (_error$response3$data2 = _error$response3$data.error) === null || _error$response3$data2 === void 0 ? void 0 : _error$response3$data2.message
29861
+ error_message: error === null || error === void 0 ? void 0 : (_error$response3 = error.response) === null || _error$response3 === void 0 ? void 0 : (_error$response3$data = _error$response3.data) === null || _error$response3$data === void 0 ? void 0 : (_error$response3$data2 = _error$response3$data.error) === null || _error$response3$data2 === void 0 ? void 0 : _error$response3$data2.message,
29862
+ site: (_window$Pelcro6 = window.Pelcro) === null || _window$Pelcro6 === void 0 ? void 0 : (_window$Pelcro6$site = _window$Pelcro6.site) === null || _window$Pelcro6$site === void 0 ? void 0 : _window$Pelcro6$site.read(),
29863
+ user: (_window$Pelcro7 = window.Pelcro) === null || _window$Pelcro7 === void 0 ? void 0 : (_window$Pelcro7$user = _window$Pelcro7.user) === null || _window$Pelcro7$user === void 0 ? void 0 : _window$Pelcro7$user.read(),
29864
+ environment: (_window$Pelcro8 = window.Pelcro) === null || _window$Pelcro8 === void 0 ? void 0 : _window$Pelcro8.environment
29874
29865
  });
29875
29866
  });
29876
29867
  });
@@ -29889,11 +29880,14 @@ const PaymentMethodContainerWithoutStripe = ({
29889
29880
  notifyBugsnag(() => {
29890
29881
  // eslint-disable-next-line no-undef
29891
29882
  Bugsnag.notify(`Payment ${error}`, event => {
29892
- var _error$response4, _error$response4$data, _error$response4$data2;
29883
+ var _error$response4, _error$response4$data, _error$response4$data2, _window$Pelcro9, _window$Pelcro9$site, _window$Pelcro10, _window$Pelcro10$user, _window$Pelcro11;
29893
29884
  event.addMetadata("UnexpectedError", {
29894
29885
  message: error.message,
29895
29886
  stack: error.stack,
29896
- error_message: error === null || error === void 0 ? void 0 : (_error$response4 = error.response) === null || _error$response4 === void 0 ? void 0 : (_error$response4$data = _error$response4.data) === null || _error$response4$data === void 0 ? void 0 : (_error$response4$data2 = _error$response4$data.error) === null || _error$response4$data2 === void 0 ? void 0 : _error$response4$data2.message
29887
+ error_message: error === null || error === void 0 ? void 0 : (_error$response4 = error.response) === null || _error$response4 === void 0 ? void 0 : (_error$response4$data = _error$response4.data) === null || _error$response4$data === void 0 ? void 0 : (_error$response4$data2 = _error$response4$data.error) === null || _error$response4$data2 === void 0 ? void 0 : _error$response4$data2.message,
29888
+ site: (_window$Pelcro9 = window.Pelcro) === null || _window$Pelcro9 === void 0 ? void 0 : (_window$Pelcro9$site = _window$Pelcro9.site) === null || _window$Pelcro9$site === void 0 ? void 0 : _window$Pelcro9$site.read(),
29889
+ user: (_window$Pelcro10 = window.Pelcro) === null || _window$Pelcro10 === void 0 ? void 0 : (_window$Pelcro10$user = _window$Pelcro10.user) === null || _window$Pelcro10$user === void 0 ? void 0 : _window$Pelcro10$user.read(),
29890
+ environment: (_window$Pelcro11 = window.Pelcro) === null || _window$Pelcro11 === void 0 ? void 0 : _window$Pelcro11.environment
29897
29891
  });
29898
29892
  });
29899
29893
  });
@@ -30143,7 +30137,7 @@ const PaymentMethodContainerWithoutStripe = ({
30143
30137
  addressId: selectedAddressId,
30144
30138
  couponCode
30145
30139
  }, (err, orderResponse) => {
30146
- var _window$Pelcro3, _window$Pelcro3$user, _window$Pelcro3$user$;
30140
+ var _window$Pelcro12, _window$Pelcro12$user, _window$Pelcro12$user2;
30147
30141
  if (err) {
30148
30142
  toggleAuthenticationSuccessPendingView(false);
30149
30143
  dispatch({
@@ -30174,7 +30168,7 @@ const PaymentMethodContainerWithoutStripe = ({
30174
30168
  });
30175
30169
  }
30176
30170
  window.Pelcro.user.refresh({
30177
- auth_token: (_window$Pelcro3 = window.Pelcro) === null || _window$Pelcro3 === void 0 ? void 0 : (_window$Pelcro3$user = _window$Pelcro3.user) === null || _window$Pelcro3$user === void 0 ? void 0 : (_window$Pelcro3$user$ = _window$Pelcro3$user.read()) === null || _window$Pelcro3$user$ === void 0 ? void 0 : _window$Pelcro3$user$.auth_token
30171
+ auth_token: (_window$Pelcro12 = window.Pelcro) === null || _window$Pelcro12 === void 0 ? void 0 : (_window$Pelcro12$user = _window$Pelcro12.user) === null || _window$Pelcro12$user === void 0 ? void 0 : (_window$Pelcro12$user2 = _window$Pelcro12$user.read()) === null || _window$Pelcro12$user2 === void 0 ? void 0 : _window$Pelcro12$user2.auth_token
30178
30172
  }, (err, res) => {
30179
30173
  dispatch({
30180
30174
  type: DISABLE_SUBMIT,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pelcro/react-pelcro-js",
3
3
  "description": "Pelcro's React UI Elements",
4
- "version": "4.0.0-alpha.97",
4
+ "version": "4.0.0-alpha.98",
5
5
  "license": "MIT",
6
6
  "private": false,
7
7
  "main": "dist/index.cjs.js",