@pelcro/react-pelcro-js 3.26.0-beta.57 → 3.26.0-beta.58
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 +23 -0
- package/dist/index.esm.js +23 -0
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -9926,6 +9926,19 @@ function generatePassword() {
|
|
|
9926
9926
|
}
|
|
9927
9927
|
return retVal;
|
|
9928
9928
|
}
|
|
9929
|
+
const refreshUser = () => {
|
|
9930
|
+
var _window$Pelcro6, _window$Pelcro6$user, _window$Pelcro6$user$;
|
|
9931
|
+
window.Pelcro.user.refresh({
|
|
9932
|
+
auth_token: (_window$Pelcro6 = window.Pelcro) === null || _window$Pelcro6 === void 0 ? void 0 : (_window$Pelcro6$user = _window$Pelcro6.user) === null || _window$Pelcro6$user === void 0 ? void 0 : (_window$Pelcro6$user$ = _window$Pelcro6$user.read()) === null || _window$Pelcro6$user$ === void 0 ? void 0 : _window$Pelcro6$user$.auth_token
|
|
9933
|
+
}, (err, res) => {
|
|
9934
|
+
if (err) {
|
|
9935
|
+
console.error(err);
|
|
9936
|
+
}
|
|
9937
|
+
if (res) {
|
|
9938
|
+
return res.data;
|
|
9939
|
+
}
|
|
9940
|
+
});
|
|
9941
|
+
};
|
|
9929
9942
|
|
|
9930
9943
|
const resources = {
|
|
9931
9944
|
en: {
|
|
@@ -19655,6 +19668,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
|
|
|
19655
19668
|
content: t("messages.sourceCreated")
|
|
19656
19669
|
}
|
|
19657
19670
|
});
|
|
19671
|
+
refreshUser();
|
|
19658
19672
|
onSuccess(res);
|
|
19659
19673
|
});
|
|
19660
19674
|
}
|
|
@@ -19709,6 +19723,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
|
|
|
19709
19723
|
}
|
|
19710
19724
|
});
|
|
19711
19725
|
}
|
|
19726
|
+
refreshUser();
|
|
19712
19727
|
onSuccess(res);
|
|
19713
19728
|
});
|
|
19714
19729
|
}, 2000);
|
|
@@ -19770,6 +19785,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
|
|
|
19770
19785
|
content: t("messages.sourceUpdated")
|
|
19771
19786
|
}
|
|
19772
19787
|
});
|
|
19788
|
+
refreshUser();
|
|
19773
19789
|
onSuccess(res);
|
|
19774
19790
|
});
|
|
19775
19791
|
}
|
|
@@ -20356,6 +20372,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
|
|
|
20356
20372
|
type: LOADING,
|
|
20357
20373
|
payload: false
|
|
20358
20374
|
});
|
|
20375
|
+
refreshUser();
|
|
20359
20376
|
onSuccess(res);
|
|
20360
20377
|
return;
|
|
20361
20378
|
}
|
|
@@ -20371,6 +20388,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
|
|
|
20371
20388
|
content: t("messages.sourceCreated")
|
|
20372
20389
|
}
|
|
20373
20390
|
});
|
|
20391
|
+
refreshUser();
|
|
20374
20392
|
onSuccess(res);
|
|
20375
20393
|
return;
|
|
20376
20394
|
}
|
|
@@ -20390,6 +20408,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
|
|
|
20390
20408
|
content: t("messages.sourceUpdated")
|
|
20391
20409
|
}
|
|
20392
20410
|
});
|
|
20411
|
+
refreshUser();
|
|
20393
20412
|
onSuccess(res);
|
|
20394
20413
|
return;
|
|
20395
20414
|
}
|
|
@@ -20417,6 +20436,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
|
|
|
20417
20436
|
}
|
|
20418
20437
|
});
|
|
20419
20438
|
}
|
|
20439
|
+
refreshUser();
|
|
20420
20440
|
onSuccess(res);
|
|
20421
20441
|
});
|
|
20422
20442
|
}, 2000);
|
|
@@ -20771,6 +20791,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
|
|
|
20771
20791
|
content: t("messages.sourceCreated")
|
|
20772
20792
|
}
|
|
20773
20793
|
});
|
|
20794
|
+
refreshUser();
|
|
20774
20795
|
onSuccess(res);
|
|
20775
20796
|
}
|
|
20776
20797
|
});
|
|
@@ -20822,6 +20843,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
|
|
|
20822
20843
|
content: t("messages.sourceUpdated")
|
|
20823
20844
|
}
|
|
20824
20845
|
});
|
|
20846
|
+
refreshUser();
|
|
20825
20847
|
onSuccess(res);
|
|
20826
20848
|
}
|
|
20827
20849
|
});
|
|
@@ -20891,6 +20913,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
|
|
|
20891
20913
|
}
|
|
20892
20914
|
});
|
|
20893
20915
|
}
|
|
20916
|
+
refreshUser();
|
|
20894
20917
|
onSuccess(res);
|
|
20895
20918
|
});
|
|
20896
20919
|
}, 2000);
|
package/dist/index.esm.js
CHANGED
|
@@ -9896,6 +9896,19 @@ function generatePassword() {
|
|
|
9896
9896
|
}
|
|
9897
9897
|
return retVal;
|
|
9898
9898
|
}
|
|
9899
|
+
const refreshUser = () => {
|
|
9900
|
+
var _window$Pelcro6, _window$Pelcro6$user, _window$Pelcro6$user$;
|
|
9901
|
+
window.Pelcro.user.refresh({
|
|
9902
|
+
auth_token: (_window$Pelcro6 = window.Pelcro) === null || _window$Pelcro6 === void 0 ? void 0 : (_window$Pelcro6$user = _window$Pelcro6.user) === null || _window$Pelcro6$user === void 0 ? void 0 : (_window$Pelcro6$user$ = _window$Pelcro6$user.read()) === null || _window$Pelcro6$user$ === void 0 ? void 0 : _window$Pelcro6$user$.auth_token
|
|
9903
|
+
}, (err, res) => {
|
|
9904
|
+
if (err) {
|
|
9905
|
+
console.error(err);
|
|
9906
|
+
}
|
|
9907
|
+
if (res) {
|
|
9908
|
+
return res.data;
|
|
9909
|
+
}
|
|
9910
|
+
});
|
|
9911
|
+
};
|
|
9899
9912
|
|
|
9900
9913
|
const resources = {
|
|
9901
9914
|
en: {
|
|
@@ -19625,6 +19638,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
|
|
|
19625
19638
|
content: t("messages.sourceCreated")
|
|
19626
19639
|
}
|
|
19627
19640
|
});
|
|
19641
|
+
refreshUser();
|
|
19628
19642
|
onSuccess(res);
|
|
19629
19643
|
});
|
|
19630
19644
|
}
|
|
@@ -19679,6 +19693,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
|
|
|
19679
19693
|
}
|
|
19680
19694
|
});
|
|
19681
19695
|
}
|
|
19696
|
+
refreshUser();
|
|
19682
19697
|
onSuccess(res);
|
|
19683
19698
|
});
|
|
19684
19699
|
}, 2000);
|
|
@@ -19740,6 +19755,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
|
|
|
19740
19755
|
content: t("messages.sourceUpdated")
|
|
19741
19756
|
}
|
|
19742
19757
|
});
|
|
19758
|
+
refreshUser();
|
|
19743
19759
|
onSuccess(res);
|
|
19744
19760
|
});
|
|
19745
19761
|
}
|
|
@@ -20326,6 +20342,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
|
|
|
20326
20342
|
type: LOADING,
|
|
20327
20343
|
payload: false
|
|
20328
20344
|
});
|
|
20345
|
+
refreshUser();
|
|
20329
20346
|
onSuccess(res);
|
|
20330
20347
|
return;
|
|
20331
20348
|
}
|
|
@@ -20341,6 +20358,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
|
|
|
20341
20358
|
content: t("messages.sourceCreated")
|
|
20342
20359
|
}
|
|
20343
20360
|
});
|
|
20361
|
+
refreshUser();
|
|
20344
20362
|
onSuccess(res);
|
|
20345
20363
|
return;
|
|
20346
20364
|
}
|
|
@@ -20360,6 +20378,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
|
|
|
20360
20378
|
content: t("messages.sourceUpdated")
|
|
20361
20379
|
}
|
|
20362
20380
|
});
|
|
20381
|
+
refreshUser();
|
|
20363
20382
|
onSuccess(res);
|
|
20364
20383
|
return;
|
|
20365
20384
|
}
|
|
@@ -20387,6 +20406,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
|
|
|
20387
20406
|
}
|
|
20388
20407
|
});
|
|
20389
20408
|
}
|
|
20409
|
+
refreshUser();
|
|
20390
20410
|
onSuccess(res);
|
|
20391
20411
|
});
|
|
20392
20412
|
}, 2000);
|
|
@@ -20741,6 +20761,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
|
|
|
20741
20761
|
content: t("messages.sourceCreated")
|
|
20742
20762
|
}
|
|
20743
20763
|
});
|
|
20764
|
+
refreshUser();
|
|
20744
20765
|
onSuccess(res);
|
|
20745
20766
|
}
|
|
20746
20767
|
});
|
|
@@ -20792,6 +20813,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
|
|
|
20792
20813
|
content: t("messages.sourceUpdated")
|
|
20793
20814
|
}
|
|
20794
20815
|
});
|
|
20816
|
+
refreshUser();
|
|
20795
20817
|
onSuccess(res);
|
|
20796
20818
|
}
|
|
20797
20819
|
});
|
|
@@ -20861,6 +20883,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
|
|
|
20861
20883
|
}
|
|
20862
20884
|
});
|
|
20863
20885
|
}
|
|
20886
|
+
refreshUser();
|
|
20864
20887
|
onSuccess(res);
|
|
20865
20888
|
});
|
|
20866
20889
|
}, 2000);
|