@tap-payments/auth-jsconnect 1.0.89 → 1.0.93-test
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/README.md +86 -135
- package/build/@types/app.d.ts +9 -0
- package/build/@types/app.js +9 -0
- package/build/@types/form.d.ts +2 -0
- package/build/api/availabilityServices.d.ts +2 -0
- package/build/api/axios.js +1 -2
- package/build/api/index.d.ts +2 -2
- package/build/api/index.js +2 -2
- package/build/app/rootReducer.d.ts +0 -1
- package/build/app/rootReducer.js +1 -3
- package/build/app/store.d.ts +0 -2
- package/build/components/AnimationFlow/BottomSheet.js +1 -1
- package/build/components/Button/Button.d.ts +6 -1
- package/build/components/Button/Button.js +61 -23
- package/build/components/Footer/Footer.d.ts +0 -2
- package/build/components/Footer/Footer.js +0 -1
- package/build/constants/api.d.ts +3 -1
- package/build/constants/api.js +6 -2
- package/build/constants/app.d.ts +0 -1
- package/build/constants/app.js +0 -8
- package/build/features/app/bank/bankStore.d.ts +5 -1
- package/build/features/app/bank/bankStore.js +38 -1
- package/build/features/app/business/businessStore.d.ts +5 -1
- package/build/features/app/business/businessStore.js +40 -5
- package/build/features/app/connect/connectStore.d.ts +2 -1
- package/build/features/app/connect/connectStore.js +19 -8
- package/build/features/app/individual/individualStore.d.ts +5 -1
- package/build/features/app/individual/individualStore.js +36 -0
- package/build/features/app/password/passwordStore.d.ts +5 -1
- package/build/features/app/password/passwordStore.js +37 -1
- package/build/features/app/tax/taxStore.d.ts +5 -1
- package/build/features/app/tax/taxStore.js +39 -2
- package/build/features/bank/Bank.js +9 -4
- package/build/features/bank/screens/BankDetails/BankDetails.js +6 -1
- package/build/features/bank/screens/BankDetails/ConfirmPolicy.d.ts +3 -0
- package/build/features/bank/screens/BankDetails/ConfirmPolicy.js +67 -0
- package/build/features/bank/screens/BankDetails/validation.d.ts +3 -0
- package/build/features/bank/screens/BankDetails/validation.js +2 -1
- package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/bank/screens/Verify/OTPInput.d.ts +3 -1
- package/build/features/bank/screens/Verify/OTPInput.js +6 -1
- package/build/features/bank/screens/Verify/Verify.js +3 -2
- package/build/features/business/Business.js +9 -4
- package/build/features/business/screens/Activities/ActivitiesList.d.ts +1 -1
- package/build/features/business/screens/Customers/CustomerLocations.d.ts +2 -2
- package/build/features/business/screens/Customers/RefundPolicy.d.ts +1 -1
- package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -1
- package/build/features/business/screens/Verify/OTPInput.d.ts +3 -1
- package/build/features/business/screens/Verify/OTPInput.js +6 -1
- package/build/features/business/screens/Verify/Verify.js +3 -2
- package/build/features/connect/Connect.js +5 -3
- package/build/features/connect/screens/Mobile/Mobile.js +1 -1
- package/build/features/connect/screens/NID/NID.js +1 -1
- package/build/features/featuresScreens.d.ts +0 -1
- package/build/features/featuresScreens.js +0 -7
- package/build/features/individual/Individual.js +9 -4
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +3 -3
- package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/individual/screens/Verify/OTPInput.d.ts +3 -1
- package/build/features/individual/screens/Verify/OTPInput.js +6 -1
- package/build/features/individual/screens/Verify/Verify.js +3 -2
- package/build/features/password/Password.js +9 -4
- package/build/features/password/screens/CreatePassword/CreatePassword.js +5 -1
- package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/password/screens/Verify/OTPInput.d.ts +3 -1
- package/build/features/password/screens/Verify/OTPInput.js +6 -1
- package/build/features/password/screens/Verify/Verify.js +3 -2
- package/build/features/shared/AcceptancePayouts/AcceptancePayouts.js +1 -1
- package/build/features/shared/Background/Background.js +3 -3
- package/build/features/shared/Background/LogoBackground.js +1 -4
- package/build/features/shared/Button/AbsherButton.d.ts +1 -2
- package/build/features/shared/Button/AbsherButton.js +5 -32
- package/build/features/shared/Button/EmailProvidersButtons.js +13 -48
- package/build/features/shared/Button/FlowsButtons.d.ts +4 -1
- package/build/features/shared/Button/FlowsButtons.js +51 -46
- package/build/features/shared/Button/MobileButton.d.ts +1 -2
- package/build/features/shared/Button/MobileButton.js +3 -29
- package/build/features/shared/Button/SuccessButton.js +18 -16
- package/build/features/shared/Footer/Footer.js +1 -1
- package/build/features/shared/OTP/OTP.d.ts +2 -1
- package/build/features/shared/OTP/OTP.js +10 -2
- package/build/features/tax/Tax.js +9 -4
- package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -2
- package/build/features/tax/screens/TaxDetails/ConfirmPolicy.d.ts +3 -0
- package/build/features/tax/screens/TaxDetails/ConfirmPolicy.js +66 -0
- package/build/features/tax/screens/TaxDetails/TaxDetails.js +9 -2
- package/build/features/tax/screens/TaxDetails/VATId.js +13 -2
- package/build/features/tax/screens/TaxDetails/validation.d.ts +3 -0
- package/build/features/tax/screens/TaxDetails/validation.js +2 -1
- package/build/features/tax/screens/Verify/OTPInput.d.ts +3 -1
- package/build/features/tax/screens/Verify/OTPInput.js +6 -1
- package/build/features/tax/screens/Verify/Verify.js +3 -2
- package/build/hooks/index.d.ts +1 -0
- package/build/hooks/index.js +1 -0
- package/build/hooks/useAppConfig.js +11 -1
- package/build/hooks/useAppDispatch.d.ts +0 -1
- package/build/hooks/useErrorListener.d.ts +1 -1
- package/build/hooks/useErrorListener.js +4 -6
- package/build/hooks/useStepStartedListener.d.ts +1 -0
- package/build/hooks/useStepStartedListener.js +10 -0
- package/build/index.d.ts +2 -3
- package/build/index.js +2 -5
- package/build/theme/theme.js +10 -0
- package/build/utils/locale.js +2 -2
- package/build/utils/string.d.ts +3 -1
- package/build/utils/string.js +35 -2
- package/package.json +127 -126
- package/build/features/Landing/Landing.d.ts +0 -7
- package/build/features/Landing/Landing.js +0 -55
- package/build/features/Landing/index.d.ts +0 -1
- package/build/features/Landing/index.js +0 -1
- package/build/features/Landing/screens/VerifyAndRedirect/VerifyAndRedirect.d.ts +0 -5
- package/build/features/Landing/screens/VerifyAndRedirect/VerifyAndRedirect.js +0 -41
- package/build/features/Landing/screens/VerifyAndRedirect/index.d.ts +0 -2
- package/build/features/Landing/screens/VerifyAndRedirect/index.js +0 -2
- package/build/features/app/landing/landingStore.d.ts +0 -22
- package/build/features/app/landing/landingStore.js +0 -103
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
11
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
12
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
13
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
|
-
function step(op) {
|
|
15
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
-
while (_) try {
|
|
17
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
|
-
switch (op[0]) {
|
|
20
|
-
case 0: case 1: t = op; break;
|
|
21
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
22
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
23
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
24
|
-
default:
|
|
25
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
26
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
27
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
28
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
29
|
-
if (t[2]) _.ops.pop();
|
|
30
|
-
_.trys.pop(); continue;
|
|
31
|
-
}
|
|
32
|
-
op = body.call(thisArg, _);
|
|
33
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
34
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
var _a;
|
|
38
|
-
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
39
|
-
import API from '../../../api';
|
|
40
|
-
export var verifyAuthToken = createAsyncThunk('verifyAuthToken', function (token, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
41
|
-
var payload, data;
|
|
42
|
-
return __generator(this, function (_a) {
|
|
43
|
-
switch (_a.label) {
|
|
44
|
-
case 0:
|
|
45
|
-
payload = {
|
|
46
|
-
service_name: 'tap_email',
|
|
47
|
-
verify_token: token
|
|
48
|
-
};
|
|
49
|
-
return [4, API.leadService.verifyLeadToken(payload)];
|
|
50
|
-
case 1:
|
|
51
|
-
data = (_a.sent()).data;
|
|
52
|
-
return [2, { data: data, token: token }];
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
}); });
|
|
56
|
-
var initialState = {
|
|
57
|
-
error: null,
|
|
58
|
-
loading: false,
|
|
59
|
-
data: {
|
|
60
|
-
verify: {
|
|
61
|
-
token: ''
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
export var landingSlice = createSlice({
|
|
66
|
-
name: 'landing/store',
|
|
67
|
-
initialState: initialState,
|
|
68
|
-
reducers: {
|
|
69
|
-
clearError: function (state) {
|
|
70
|
-
state.error = null;
|
|
71
|
-
},
|
|
72
|
-
stopLoader: function (state) {
|
|
73
|
-
state.loading = false;
|
|
74
|
-
}
|
|
75
|
-
},
|
|
76
|
-
extraReducers: function (builder) {
|
|
77
|
-
builder
|
|
78
|
-
.addCase(verifyAuthToken.fulfilled, function (state, action) {
|
|
79
|
-
var _a;
|
|
80
|
-
state.loading = false;
|
|
81
|
-
state.error = null;
|
|
82
|
-
var _b = action.payload, data = _b.data, token = _b.token;
|
|
83
|
-
var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
|
|
84
|
-
if (description) {
|
|
85
|
-
state.error = description;
|
|
86
|
-
return;
|
|
87
|
-
}
|
|
88
|
-
state.data.verify.responseBody = data;
|
|
89
|
-
state.data.verify.token = token;
|
|
90
|
-
})
|
|
91
|
-
.addCase(verifyAuthToken.rejected, function (state, action) {
|
|
92
|
-
state.error = action.error.message;
|
|
93
|
-
state.loading = false;
|
|
94
|
-
})
|
|
95
|
-
.addCase(verifyAuthToken.pending, function (state) {
|
|
96
|
-
state.loading = true;
|
|
97
|
-
state.error = null;
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
});
|
|
101
|
-
export var clearError = (_a = landingSlice.actions, _a.clearError), stopLoader = _a.stopLoader;
|
|
102
|
-
export default landingSlice.reducer;
|
|
103
|
-
export var landingSelector = function (state) { return state.landing; };
|