@egovernments/digit-ui-module-core 1.3.1 → 1.3.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.js +4 -31
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +4 -31
- package/dist/index.modern.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -256,8 +256,6 @@ var SelectName = function SelectName(_ref) {
|
|
|
256
256
|
});
|
|
257
257
|
};
|
|
258
258
|
|
|
259
|
-
var _excluded = ["ResponseInfo", "UserRequest"],
|
|
260
|
-
_excluded2 = ["ResponseInfo", "UserRequest"];
|
|
261
259
|
var TYPE_REGISTER = {
|
|
262
260
|
type: "register"
|
|
263
261
|
};
|
|
@@ -320,7 +318,6 @@ var Login = function Login(_ref) {
|
|
|
320
318
|
}
|
|
321
319
|
|
|
322
320
|
errorTimeout = setTimeout(function () {
|
|
323
|
-
console.log("clearing err");
|
|
324
321
|
setError("");
|
|
325
322
|
}, 5000);
|
|
326
323
|
setErrorTO(errorTimeout);
|
|
@@ -466,7 +463,7 @@ var Login = function Login(_ref) {
|
|
|
466
463
|
|
|
467
464
|
var ResponseInfo = _ref4.ResponseInfo,
|
|
468
465
|
info = _ref4.UserRequest,
|
|
469
|
-
tokens = _objectWithoutPropertiesLoose(_ref4,
|
|
466
|
+
tokens = _objectWithoutPropertiesLoose(_ref4, ["ResponseInfo", "UserRequest"]);
|
|
470
467
|
|
|
471
468
|
if ((_location$state4 = location.state) !== null && _location$state4 !== void 0 && _location$state4.role) {
|
|
472
469
|
var roleInfo = info.roles.find(function (userRole) {
|
|
@@ -498,7 +495,7 @@ var Login = function Login(_ref) {
|
|
|
498
495
|
return Promise.resolve(Digit.UserService.registerUser(_requestData, stateCode)).then(function (_ref5) {
|
|
499
496
|
var ResponseInfo = _ref5.ResponseInfo,
|
|
500
497
|
info = _ref5.UserRequest,
|
|
501
|
-
tokens = _objectWithoutPropertiesLoose(_ref5,
|
|
498
|
+
tokens = _objectWithoutPropertiesLoose(_ref5, ["ResponseInfo", "UserRequest"]);
|
|
502
499
|
|
|
503
500
|
setUser(_extends({
|
|
504
501
|
info: info
|
|
@@ -510,9 +507,8 @@ var Login = function Login(_ref) {
|
|
|
510
507
|
if (_temp2 && _temp2.then) return _temp2.then(function () {});
|
|
511
508
|
}
|
|
512
509
|
}();
|
|
513
|
-
}, function (
|
|
510
|
+
}, function () {
|
|
514
511
|
setIsOtpValid(false);
|
|
515
|
-
console.log(err);
|
|
516
512
|
}));
|
|
517
513
|
} catch (e) {
|
|
518
514
|
return Promise.reject(e);
|
|
@@ -1693,8 +1689,6 @@ var propTypes = createCommonjsModule(function (module) {
|
|
|
1693
1689
|
}
|
|
1694
1690
|
});
|
|
1695
1691
|
|
|
1696
|
-
var _excluded$1 = ["UserRequest"];
|
|
1697
|
-
|
|
1698
1692
|
var Login$1 = function Login(_ref) {
|
|
1699
1693
|
var propsConfig = _ref.config,
|
|
1700
1694
|
t = _ref.t;
|
|
@@ -1742,7 +1736,7 @@ var Login$1 = function Login(_ref) {
|
|
|
1742
1736
|
var _temp2 = _catch(function () {
|
|
1743
1737
|
return Promise.resolve(Digit.UserService.authenticate(requestData)).then(function (_ref2) {
|
|
1744
1738
|
var info = _ref2.UserRequest,
|
|
1745
|
-
tokens = _objectWithoutPropertiesLoose(_ref2,
|
|
1739
|
+
tokens = _objectWithoutPropertiesLoose(_ref2, ["UserRequest"]);
|
|
1746
1740
|
|
|
1747
1741
|
setUser(_extends({
|
|
1748
1742
|
info: info
|
|
@@ -1751,9 +1745,6 @@ var Login$1 = function Login(_ref) {
|
|
|
1751
1745
|
}, function (err) {
|
|
1752
1746
|
var _err$response, _err$response$data;
|
|
1753
1747
|
|
|
1754
|
-
console.log({
|
|
1755
|
-
err: err
|
|
1756
|
-
});
|
|
1757
1748
|
alert((err === null || err === void 0 ? void 0 : (_err$response = err.response) === null || _err$response === void 0 ? void 0 : (_err$response$data = _err$response.data) === null || _err$response$data === void 0 ? void 0 : _err$response$data.error_description) || "Invalid login credentials!");
|
|
1758
1749
|
});
|
|
1759
1750
|
|
|
@@ -1767,9 +1758,6 @@ var Login$1 = function Login(_ref) {
|
|
|
1767
1758
|
history.push("/digit-ui/employee/forgot-password");
|
|
1768
1759
|
};
|
|
1769
1760
|
|
|
1770
|
-
console.log({
|
|
1771
|
-
propsConfig: propsConfig
|
|
1772
|
-
});
|
|
1773
1761
|
var _propsConfig$inputs = propsConfig.inputs,
|
|
1774
1762
|
userId = _propsConfig$inputs[0],
|
|
1775
1763
|
password = _propsConfig$inputs[1],
|
|
@@ -1935,9 +1923,6 @@ var ChangePasswordComponent = function ChangePasswordComponent(_ref) {
|
|
|
1935
1923
|
}, function (err) {
|
|
1936
1924
|
var _err$response, _err$response$data;
|
|
1937
1925
|
|
|
1938
|
-
console.log({
|
|
1939
|
-
err: err
|
|
1940
|
-
});
|
|
1941
1926
|
alert((err === null || err === void 0 ? void 0 : (_err$response = err.response) === null || _err$response === void 0 ? void 0 : (_err$response$data = _err$response.data) === null || _err$response$data === void 0 ? void 0 : _err$response$data.error_description) || "Invalid login credentials!");
|
|
1942
1927
|
});
|
|
1943
1928
|
|
|
@@ -1961,9 +1946,6 @@ var ChangePasswordComponent = function ChangePasswordComponent(_ref) {
|
|
|
1961
1946
|
});
|
|
1962
1947
|
|
|
1963
1948
|
return Promise.resolve(Digit.UserService.changePassword(requestData, tenantId)).then(function (response) {
|
|
1964
|
-
console.log({
|
|
1965
|
-
response: response
|
|
1966
|
-
});
|
|
1967
1949
|
navigateToLogin();
|
|
1968
1950
|
});
|
|
1969
1951
|
}, function (err) {
|
|
@@ -2163,9 +2145,6 @@ var ForgotPassword = function ForgotPassword(_ref) {
|
|
|
2163
2145
|
}, function (err) {
|
|
2164
2146
|
var _err$response, _err$response$data;
|
|
2165
2147
|
|
|
2166
|
-
console.log({
|
|
2167
|
-
err: err
|
|
2168
|
-
});
|
|
2169
2148
|
alert((err === null || err === void 0 ? void 0 : (_err$response = err.response) === null || _err$response === void 0 ? void 0 : (_err$response$data = _err$response.data) === null || _err$response$data === void 0 ? void 0 : _err$response$data.error_description) || "Invalid login credentials!");
|
|
2170
2149
|
});
|
|
2171
2150
|
|
|
@@ -2179,9 +2158,6 @@ var ForgotPassword = function ForgotPassword(_ref) {
|
|
|
2179
2158
|
history.replace("/digit-ui/employee/login");
|
|
2180
2159
|
};
|
|
2181
2160
|
|
|
2182
|
-
console.log({
|
|
2183
|
-
propsConfig: propsConfig
|
|
2184
|
-
});
|
|
2185
2161
|
var _propsConfig$inputs = propsConfig.inputs,
|
|
2186
2162
|
userId = _propsConfig$inputs[0],
|
|
2187
2163
|
city = _propsConfig$inputs[1];
|
|
@@ -2260,9 +2236,6 @@ var EmployeeForgotPassword = function EmployeeForgotPassword() {
|
|
|
2260
2236
|
});
|
|
2261
2237
|
}, [loginConfig$1]);
|
|
2262
2238
|
});
|
|
2263
|
-
console.log({
|
|
2264
|
-
params: params
|
|
2265
|
-
});
|
|
2266
2239
|
return /*#__PURE__*/React__default.createElement(reactRouterDom.Switch, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.AppContainer, null, /*#__PURE__*/React__default.createElement(reactRouterDom.Route, {
|
|
2267
2240
|
path: "" + path,
|
|
2268
2241
|
exact: true
|