@acuteinfo/common-screens 1.0.35 → 1.0.37
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.d.ts +1 -0
- package/dist/index.js +72 -64
- package/dist/index.js.map +1 -1
- package/dist/pages/types.d.ts +32 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -29,6 +29,36 @@ import { library } from '@fortawesome/fontawesome-svg-core';
|
|
|
29
29
|
import { faHandsHelping, faUsers, faBars, faBalanceScale, faHandHoldingHeart, faTasks, faCog, faHome, faTh, faUsersCog, faCircle, faUserCircle, faHashtag, faThumbtack, faSquare, faLink, faQuestion, faPlus, faTable, faLocationArrow, faHeadset, faGears, faArrowDown, faArrowUp, faSpinner, faCircleExclamation, faRotateRight, faUserLock, faUserClock, faGripHorizontal, faFileLines, faGear, faHeadphones, faUsersGear, faMessage, faUnlock, faUserPlus, faUserCheck, faKey, faIdCard, faIdBadge, faCheck, faCheckDouble, faCircleCheck, faCircleXmark, faUserTag, faAddressCard, faChartColumn, faUserPen, faHandHolding, faHandHoldingMedical, faObjectGroup, faTowerCell, faTowerObservation, faBuilding, faMailBulk, faLandmarkFlag, faCreditCard, faHospitalSymbol, faPlugCircleBolt, faCodeBranch, faPersonCircleCheck, faBank, faServer, faNotesMedical, faA, faB, faC, faD, faE, faF, faG, faH, faI, faJ, faK, faL, faM, faN, faO, faP, faQ, faR, faS, faT, faU, faV, faW, faX, faY, faZ } from '@fortawesome/free-solid-svg-icons';
|
|
30
30
|
import 'lodash';
|
|
31
31
|
|
|
32
|
+
function styleInject(css, ref) {
|
|
33
|
+
if ( ref === void 0 ) ref = {};
|
|
34
|
+
var insertAt = ref.insertAt;
|
|
35
|
+
|
|
36
|
+
if (!css || typeof document === 'undefined') { return; }
|
|
37
|
+
|
|
38
|
+
var head = document.head || document.getElementsByTagName('head')[0];
|
|
39
|
+
var style = document.createElement('style');
|
|
40
|
+
style.type = 'text/css';
|
|
41
|
+
|
|
42
|
+
if (insertAt === 'top') {
|
|
43
|
+
if (head.firstChild) {
|
|
44
|
+
head.insertBefore(style, head.firstChild);
|
|
45
|
+
} else {
|
|
46
|
+
head.appendChild(style);
|
|
47
|
+
}
|
|
48
|
+
} else {
|
|
49
|
+
head.appendChild(style);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
if (style.styleSheet) {
|
|
53
|
+
style.styleSheet.cssText = css;
|
|
54
|
+
} else {
|
|
55
|
+
style.appendChild(document.createTextNode(css));
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
var css_248z$2 = ":root{--theme-color1:#07288e;--theme-color2:#fff;--theme-color3:#4263c7;--theme-color4:#eceff9;--theme-color5:linear-gradient(71.66deg,#4285f4 -2.97%,#885df5 111.3%);--theme-color6:#949597}";
|
|
60
|
+
styleInject(css_248z$2);
|
|
61
|
+
|
|
32
62
|
const useStyles$3 = makeStyles((theme) => ({
|
|
33
63
|
wrapper: {
|
|
34
64
|
minHeight: "100vh",
|
|
@@ -570,8 +600,8 @@ const OTPModelForm = ({ classes, OTPResendRequest, handleClose, loginState, Veri
|
|
|
570
600
|
width: "60%",
|
|
571
601
|
}, children: [jsx(GradientButton, { fullWidth: true, disabled: loginState.otploading, onClick: handleCloseEvent, className: classes.otpButtons, starticon: "West", textColor: "var(--theme-color3) !important", sx: {
|
|
572
602
|
"&:disabled": {
|
|
573
|
-
color: "var(-theme-color3) !important"
|
|
574
|
-
}
|
|
603
|
+
color: "var(-theme-color3) !important",
|
|
604
|
+
},
|
|
575
605
|
}, rotateIcon: "scale(1.4) rotateX(360deg)", style: {
|
|
576
606
|
border: "var(--theme-color3)1px solid",
|
|
577
607
|
// color: "var(--theme-color2)",
|
|
@@ -588,33 +618,6 @@ const OTPModelForm = ({ classes, OTPResendRequest, handleClose, loginState, Veri
|
|
|
588
618
|
disabled: loginState.loading, onClick: ClickEventHandler, ref: inputButtonRef, className: classes.otpButtons, children: loginState.otploading ? (jsx(CircularProgress, { size: 25, thickness: 4.6 })) : (t("otp.VerifyOTP")) })] })] }) }) }));
|
|
589
619
|
};
|
|
590
620
|
|
|
591
|
-
function styleInject(css, ref) {
|
|
592
|
-
if ( ref === void 0 ) ref = {};
|
|
593
|
-
var insertAt = ref.insertAt;
|
|
594
|
-
|
|
595
|
-
if (!css || typeof document === 'undefined') { return; }
|
|
596
|
-
|
|
597
|
-
var head = document.head || document.getElementsByTagName('head')[0];
|
|
598
|
-
var style = document.createElement('style');
|
|
599
|
-
style.type = 'text/css';
|
|
600
|
-
|
|
601
|
-
if (insertAt === 'top') {
|
|
602
|
-
if (head.firstChild) {
|
|
603
|
-
head.insertBefore(style, head.firstChild);
|
|
604
|
-
} else {
|
|
605
|
-
head.appendChild(style);
|
|
606
|
-
}
|
|
607
|
-
} else {
|
|
608
|
-
head.appendChild(style);
|
|
609
|
-
}
|
|
610
|
-
|
|
611
|
-
if (style.styleSheet) {
|
|
612
|
-
style.styleSheet.cssText = css;
|
|
613
|
-
} else {
|
|
614
|
-
style.appendChild(document.createTextNode(css));
|
|
615
|
-
}
|
|
616
|
-
}
|
|
617
|
-
|
|
618
621
|
var css_248z$1 = ".spinner-wrap{position:relative}.spinner-item{animation:zoom 2s linear .75s infinite;border:1px solid #949597;border-radius:50%;height:250px;left:50%;opacity:0;position:absolute;top:50%;transform:translate(-50%,-50%);width:250px}.spinner-item--2{animation-delay:1.25s}.spinner-item--3{animation-delay:1.75s}@keyframes zoom{0%{opacity:0;transform:translate(-50%,-50%) scale(.1)}50%{opacity:1}to{opacity:0;transform:translate(-50%,-50%) scale(.6)}}.image{height:50px;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.progress{backdrop-filter:blur(2px) brightness(101%);border:1px solid #b0b0b0;border-radius:4px;box-shadow:0 0 3px #b0b0;margin:0 auto;width:20em}.bar{background:#4263c7;height:4px;width:65%}";
|
|
619
622
|
styleInject(css_248z$1);
|
|
620
623
|
|
|
@@ -1241,42 +1244,47 @@ const AuthControllerWrapper = ({ bannerDetails, logoUrl, logoTitle, loginFn, vei
|
|
|
1241
1244
|
const verifyUsernamePassword = async (username, password) => {
|
|
1242
1245
|
if (Boolean(username) && Boolean(password)) {
|
|
1243
1246
|
dispath({ type: "inititatePasswordVerification" });
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1247
|
+
try {
|
|
1248
|
+
const { status = "", data = null, message = "", responseType = "", access_token = null } = await veirfyUsernameandPassword(username, password);
|
|
1249
|
+
if (status === "0" && responseType === "S") {
|
|
1250
|
+
dispath({
|
|
1251
|
+
type: "passwordRotation",
|
|
1252
|
+
payload: {
|
|
1253
|
+
username: username,
|
|
1254
|
+
access_token: access_token?.access_token || "",
|
|
1255
|
+
token_type: access_token?.token_type || "",
|
|
1256
|
+
},
|
|
1257
|
+
});
|
|
1258
|
+
setOpenPwdReset(true);
|
|
1259
|
+
}
|
|
1260
|
+
else if (status === "0") {
|
|
1261
|
+
dispath({
|
|
1262
|
+
type: "passwordVerificationSuccessful",
|
|
1263
|
+
payload: {
|
|
1264
|
+
transactionID: data?.REQUEST_CD,
|
|
1265
|
+
username: username,
|
|
1266
|
+
access_token: access_token?.access_token,
|
|
1267
|
+
token_type: access_token?.token_type,
|
|
1268
|
+
authType: data?.AUTH_TYPE,
|
|
1269
|
+
auth_data: [
|
|
1270
|
+
{
|
|
1271
|
+
company_ID: data?.BASE_COMP_CD ?? "",
|
|
1272
|
+
branch_cd: data?.BASE_BRANCH_CD,
|
|
1273
|
+
},
|
|
1274
|
+
],
|
|
1275
|
+
otpValidFor: data?.OTP_VALID,
|
|
1276
|
+
},
|
|
1277
|
+
});
|
|
1278
|
+
}
|
|
1279
|
+
else {
|
|
1280
|
+
dispath({
|
|
1281
|
+
type: "passwordVerificationFailure",
|
|
1282
|
+
payload: { error: message, errorPassword: message },
|
|
1283
|
+
});
|
|
1284
|
+
}
|
|
1274
1285
|
}
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
type: "passwordVerificationFailure",
|
|
1278
|
-
payload: { error: message, errorPassword: message },
|
|
1279
|
-
});
|
|
1286
|
+
catch (err) {
|
|
1287
|
+
throw new Error("Error occurred while verifying username and password: " + err);
|
|
1280
1288
|
}
|
|
1281
1289
|
}
|
|
1282
1290
|
else if (!Boolean(username) && !Boolean(password)) {
|