hplx-feature-library 1.0.177 → 1.0.179
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/{APIAction-owCQeK4h.js → APIAction-CyDmLDGJ.js} +1 -1
- package/dist/{APIAction-GKwgCFa7.cjs → APIAction-CygaXp73.cjs} +1 -1
- package/dist/CommonConstant-BL0tq5l_.js +436 -0
- package/dist/CommonConstant-X6DHVEfC.cjs +1 -0
- package/dist/NineDots/index.js +1 -1
- package/dist/{NineDots-Q7DH5xQq.js → NineDots-sOxfzp6L.js} +15 -14
- package/dist/NineDots-wBuj1tLD.cjs +3 -0
- package/dist/PatientAddEdit/index.js +1 -1
- package/dist/PatientAddEdit-CATkoJRU.cjs +7 -0
- package/dist/{PatientAddEdit-MgBWiJqX.js → PatientAddEdit-Cg2AXnbZ.js} +17 -16
- package/dist/PatientPopup/index.js +1 -1
- package/dist/{PatientPopupContainer-BREW2AZX.cjs → PatientPopupContainer-BPAU-J2G.cjs} +7 -7
- package/dist/{PatientPopupContainer-CyTTjYhk.js → PatientPopupContainer-w3gWr1DY.js} +46 -45
- package/dist/{PrintModal-CaqANEG3.cjs → PrintModal-AyvmVaFS.cjs} +5 -5
- package/dist/{PrintModal-BR_tTgyn.js → PrintModal-CjHcvcfq.js} +2 -1
- package/dist/SearchPatients/index.js +1 -1
- package/dist/{SearchPatients-BEQ0kjtj.js → SearchPatients-BRtrWjT9.js} +2 -2
- package/dist/{SearchPatients-eiOJOnND.cjs → SearchPatients-GDi5ZvNl.cjs} +1 -1
- package/dist/UserProfile/index.js +1 -1
- package/dist/{UserProfile-Bs3EzSqu.js → UserProfile-C7U9iJ6G.js} +1 -1
- package/dist/{UserProfile-C4cNhkeg.cjs → UserProfile-CjBsl-R3.cjs} +1 -1
- package/dist/common-utils-Bo5b1GnC.js +1900 -0
- package/dist/common-utils-DviOTrwv.cjs +6 -0
- package/dist/constants/CommonConstant.d.ts +19 -0
- package/dist/index.js +5 -5
- package/dist/print-pdf/index.js +1 -1
- package/dist/types/NineDotsTypes.d.ts +2 -2
- package/package.json +3 -3
- package/dist/NineDots-Cy5GdMqh.cjs +0 -3
- package/dist/PatientAddEdit-D-PuyA4h.cjs +0 -7
- package/dist/common-utils-CDvwCtzy.js +0 -2328
- package/dist/common-utils-lI6oOpoS.cjs +0 -6
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { j as jsxRuntimeExports, K as Ku, A as Ap, P as Ps, g as getDefaultExportFromCjs$2, f as getAugmentedNamespace$2, d as commonjsGlobal$1, i as requireObjectAssign, l as PropTypes, b as bs } from "./index-BUI6-03D.js";
|
|
2
2
|
import React__default, { useState, useEffect, useRef, useCallback, Fragment, memo, createContext, useReducer, forwardRef, useImperativeHandle, useMemo, useContext, useLayoutEffect } from "react";
|
|
3
|
-
import { h as hplxAPI,
|
|
3
|
+
import { h as hplxAPI, n as E_ENVIRONMENT, o as getDurationFormat, j as isValidDate, m as capitalizeFirstLetter, i as isJson, d as debounceFn } from "./common-utils-Bo5b1GnC.js";
|
|
4
4
|
import { d as dayjs } from "./dayjs.min-B2cg6pUo.js";
|
|
5
|
+
import { g as genderList, D as DefinedLanguages } from "./CommonConstant-BL0tq5l_.js";
|
|
5
6
|
import { c as create$6 } from "./index.esm-Bn1Rklqj.js";
|
|
6
7
|
import { r as requireWarning } from "./warning-BozzKWdr.js";
|
|
7
8
|
import { c as clsx } from "./clsx-OuTLNxxd.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { j as t, b as r, q as X, K as Y } from "./index-BUI6-03D.js";
|
|
2
2
|
import { useState as o, useRef as k, useCallback as y, useMemo as Z, useEffect as C } from "react";
|
|
3
|
-
import { g as ee } from "./APIAction-
|
|
3
|
+
import { g as ee } from "./APIAction-CyDmLDGJ.js";
|
|
4
4
|
import { u as te } from "./useMediaQuery-CZAbdJzN.js";
|
|
5
|
-
import { d as ne, g as re, a as D, E as le } from "./common-utils-
|
|
5
|
+
import { d as ne, g as re, a as D, E as le } from "./common-utils-Bo5b1GnC.js";
|
|
6
6
|
const se = Math.abs(window.orientation || 0) === 90, fe = (T) => {
|
|
7
7
|
const { addPatientHandler: G, disabled: p, manipulateExistingDOM: R, showSearchBar: A, setShowSearchBar: h, variable: L } = T, { window_var: i, token: v, envName: b } = L, [c, d] = o(!1), x = k(null), m = k(null), [U, F] = o(0), [B, a] = o([]), $ = 6, [S, j] = o(""), [z, H] = o([]), [O, N] = o(!0), [M, P] = o([]), f = te("(max-width: 1024px)"), u = (e, n, l, s) => {
|
|
8
8
|
H([{ id: 1, title: e, description: n, type: l, duration: s }]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const t=require("./index-DQlbIHh3.cjs"),n=require("react"),K=require("./APIAction-
|
|
1
|
+
"use strict";const t=require("./index-DQlbIHh3.cjs"),n=require("react"),K=require("./APIAction-CygaXp73.cjs"),W=require("./useMediaQuery-D4SIgdMW.cjs"),p=require("./common-utils-DviOTrwv.cjs"),J=Math.abs(window.orientation||0)===90,V=N=>{const{addPatientHandler:P,disabled:x,manipulateExistingDOM:k,showSearchBar:C,setShowSearchBar:a,variable:D}=N,{window_var:o,token:w,envName:y}=D,[c,f]=n.useState(!1),d=n.useRef(null),u=n.useRef(null),[T,A]=n.useState(0),[G,l]=n.useState([]),L=6,[v,E]=n.useState(""),[U,F]=n.useState([]),[B,b]=n.useState(!0),[$,R]=n.useState([]),h=W.useMediaQuery("(max-width: 1024px)"),m=(e,s,r,i)=>{F([{id:1,title:e,description:s,type:r,duration:i}])},_=n.useCallback(async e=>{try{const s={branch_id:o?.org_branch_id_for_seg||"",doctor_id:o?.person_id_for_seg||"",doctor_role_id:o?.doctor_role_id_for_seg||"",term:encodeURIComponent(e),limit:30},r=await K.getPatientList(s,{envName:y,token:w});if(!r){l([]),m("Error","No response received from server","Error",3e3);return}const i=r,S=window.filteredUpcomingAppts||[];if(i.apiError){l([]),m("Error",i.apiError,"Error",3e3);return}i?.persons?.length?(l(i.persons),f(!0),A(Number(i.total_persons))):l([]),S?.length?(b(!1),R(S.slice(0,5))):(b(!0),R([]))}catch(s){console.error(s),m("Error","Something went wrong while fetching patients","Error",3e3)}},[y,w,o?.doctor_role_id_for_seg,o?.org_branch_id_for_seg,o?.person_id_for_seg]),q=n.useMemo(()=>p.debounceFn(e=>{_(e)},500),[_]),z=e=>{const s=e.currentTarget.value.trim();(!isNaN(Number(s.charAt(0)))||s.length>=2)&&q(s)},H=()=>{c||_(v)},O=()=>{x||f(e=>!e)},g=n.useCallback(e=>{u.current&&c&&!u.current.contains(e.target)&&(f(!1),l([]))},[c]);n.useEffect(()=>(document.addEventListener("mousedown",g),()=>document.removeEventListener("mousedown",g)),[g,c]);const M=e=>{window.location.href.includes("/frontdesk")?window.patientPopupHandlerFromFD(e.patient_role_id,e.patient_person_id):p.goToPage(`viewPatientDashboard.php?pid=${e.patient_role_id}`)},Q=async e=>{let s=!0;if(typeof window.beforePatientChange=="function"&&window.location.pathname==p.EAPP_ROUTES.visitpad&&(s=window.beforePatientChange()),f(!1),l([]),s){window.patient_role_id=e.person_role_id!="0"?e.person_role_id.toString():"0",window.patient_person_id=e.person_id!="0"?e.person_id.toString():"0";const r=(e.person_role_id=="0",e.person_role_id);if(r&&(k(),window.location.href.indexOf("/frontdesk")!==-1)){window.patientPopupHandlerFromFD(r,e.person_id);return}p.goToPage(`viewPatientDashboard.php?pid=${r}`)}},I=()=>{O(),P(),E("")},j=n.useCallback(e=>{d.current&&!d.current.contains(e.target)&&h&&a(!1)},[h,a]);return n.useEffect(()=>(document.addEventListener("mousedown",j),()=>document.removeEventListener("mousedown",j)),[j]),t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[C?t.jsxRuntimeExports.jsxs("div",{className:`hfl-flex hfl-items-center hfl-justify-center hfl-rounded-full hfl-bg-Blue-900 hfl-text-White ${x?"hfl-pointer-events-none hfl-opacity-60":""}`,title:x?"Low internet speed. Feature available only in online mode":"Search Patient",children:[t.jsxRuntimeExports.jsx("input",{ref:d,type:"text",placeholder:"Search Patient 🔍",className:`hfl-rounded-full hfl-border-none hfl-bg-Blue-900 hfl-py-2 hfl-pl-4 ${h&&!J?"xxs:hfl-w-[400px]":"hfl-min-w-[150px]"} sm:hfl-w-full`,"data-qa":"testid_patientSearch",value:v,onKeyUp:z,onChange:e=>E(e.target.value),onClick:H,onBlur:()=>h&&a(!1)}),h&&t.jsxRuntimeExports.jsx("div",{className:"hx_close hfl-cursor-pointer hfl-pr-4",onClick:()=>a(e=>!e)})]}):t.jsxRuntimeExports.jsxs("div",{onClick:()=>a(e=>!e),className:"hfl-flex hfl-cursor-pointer hfl-flex-col hfl-items-center xs:hfl-mr-1 md:hfl-mr-0",children:[t.jsxRuntimeExports.jsx("i",{className:"hx_search",style:{fontSize:"18px"}}),t.jsxRuntimeExports.jsx(t.bs,{variant:"Regular",type:"Text md",children:"Search"})]}),t.jsxRuntimeExports.jsx(t.qh,{toastList:U}),t.jsxRuntimeExports.jsxs("div",{ref:u,className:`hfl-absolute hfl-right-[255px] hfl-top-[50px] hfl-max-h-[400px] hfl-w-[430px] hfl-overflow-y-auto hfl-rounded-lg hfl-border hfl-border-Gray-300 hfl-bg-White hfl-shadow-md ${c?"hfl-block":"hfl-hidden"}`,children:[!B&&t.jsxRuntimeExports.jsxs("div",{className:"hfl-flex hfl-flex-col",children:[t.jsxRuntimeExports.jsxs("div",{className:"hfl-flex hfl-items-center hfl-py-[10px] ",children:[t.jsxRuntimeExports.jsx(t.bs,{className:"hfl-px-[12px] hfl-text-Gray-400",variant:"Semibold",type:"Text xs",children:"Upcoming Appointments"}),t.jsxRuntimeExports.jsx("a",{href:"viewPatientAppointments.php",children:t.jsxRuntimeExports.jsx("i",{className:"hx_r-open hfl-text-Primary-700"})})]}),$.map((e,s)=>t.jsxRuntimeExports.jsxs("div",{className:`hfl-flex hfl-cursor-pointer hfl-justify-between hfl-px-[12px] hfl-py-[4px] hover:hfl-bg-Blue_gray-200 ${s%2===1?"":"hfl-bg-Gray-100"}`,onClick:()=>M(e),children:[t.jsxRuntimeExports.jsx("div",{className:"hfl-flex hfl-min-w-[92px] hfl-items-center hfl-justify-center hfl-rounded-lg hfl-border hfl-border-Gray-100 hfl-bg-White_20 hfl-p-2",children:t.jsxRuntimeExports.jsx(t.bs,{className:"hfl-whitespace-nowrap hfl-text-Gray-500",variant:"Regular",type:"Text lg",children:e.appnt_time})}),t.jsxRuntimeExports.jsxs("div",{className:"hfl-flex hfl-w-full hfl-flex-col hfl-px-3",children:[t.jsxRuntimeExports.jsx(t.bs,{variant:"Regular",type:"Text md",className:"hfl-text-Gray-700",children:e.org_person_name}),t.jsxRuntimeExports.jsx(t.bs,{variant:"Regular",type:"Text sm",className:"hfl-text-Gray-500",children:e.org_person_phone})]}),t.jsxRuntimeExports.jsx("div",{className:"hfl-flex hfl-items-center",children:t.jsxRuntimeExports.jsx("i",{className:"hx_play-filled hfl-text-Gray-300"})})]},e.patient_role_id))]}),t.jsxRuntimeExports.jsxs("div",{className:"hfl-flex hfl-flex-col",children:[t.jsxRuntimeExports.jsx(t.bs,{style:{fontSize:"14px"},variant:"Semibold",type:"Text sm",className:"hfl-px-[12px] hfl-py-[8px] hfl-text-Primary-600",children:"Patients List"}),t.jsxRuntimeExports.jsx("div",{className:"hfl-max-h-[40vh] hfl-overflow-y-auto scrollbar-hide",children:G.map((e,s)=>t.jsxRuntimeExports.jsxs("div",{className:`hfl-cursor-pointer hfl-px-[11px] hfl-py-[12px] hfl-leading-9 hover:hfl-bg-Blue_gray-200 ${s%2===1?"":"hfl-bg-Gray-100"}`,onClick:()=>Q(e),children:[t.jsxRuntimeExports.jsx(t.bs,{variant:"Regular",type:"Text sm",className:"hfl-inline hfl-uppercase hfl-text-Gray-700",style:{fontSize:"14px"},children:e.org_person_bid_str?e.org_person_bid_str+": ":""}),t.jsxRuntimeExports.jsxs(t.bs,{variant:"Medium",type:"Text sm",className:" hfl-inline hfl-capitalize hfl-text-Gray-700",style:{fontSize:"14px"},children:[e.org_person_name," ",t.jsxRuntimeExports.jsxs("div",{className:"hfl-inline-block",children:["(",e.ageStr.split(" ")[0],", ",p.getGender(Number(e.org_person_gender)),")"]})," "]}),t.jsxRuntimeExports.jsx(t.bs,{variant:"Regular",type:"Text sm",className:"hfl-inline-block hfl-text-Gray-700",style:{fontSize:"14px"},children:e.org_person_phone?`Ph: ${e.org_person_phone}`:""})]},e.person_role_id))})]}),T<L&&t.jsxRuntimeExports.jsx("div",{className:"hfl-flex hfl-justify-center",id:"newPatientAdd",children:t.jsxRuntimeExports.jsx(t.Ku,{hierarchy:"Secondary",icon:"Left",iconFile:"hx_add",onClick:I,size:"lg",textField:"Create New Patient",className:"hfl-flex hfl-w-full hfl-justify-center"})})]})]})};exports.SearchPatients=V;
|
|
@@ -2,7 +2,7 @@ import { j as i, b as Z, P as _, K as l, t as TA } from "./index-BUI6-03D.js";
|
|
|
2
2
|
import * as w from "react";
|
|
3
3
|
import { useState as K, useEffect as r, useMemo as xA, useRef as PA } from "react";
|
|
4
4
|
import { M as nA } from "./index-DXvmjJBJ.js";
|
|
5
|
-
import { h as LA,
|
|
5
|
+
import { h as LA, m as sA, r as NA, R as SA, E as $ } from "./common-utils-Bo5b1GnC.js";
|
|
6
6
|
import { d as lA } from "./dayjs.min-B2cg6pUo.js";
|
|
7
7
|
const XA = "../modelChangePassword.php", uA = async (A, E) => {
|
|
8
8
|
try {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const c=require("./index-DQlbIHh3.cjs"),m=require("react"),UA=require("./index-DkA8S5IK.cjs"),L=require("./common-utils-
|
|
1
|
+
"use strict";const c=require("./index-DQlbIHh3.cjs"),m=require("react"),UA=require("./index-DkA8S5IK.cjs"),L=require("./common-utils-DviOTrwv.cjs"),KA=require("./dayjs.min-DXp74Ozx.cjs");function oA(A){const E=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(A){for(const I in A)if(I!=="default"){const g=Object.getOwnPropertyDescriptor(A,I);Object.defineProperty(E,I,g.get?g:{enumerable:!0,get:()=>A[I]})}}return E.default=A,Object.freeze(E)}const w=oA(m),zA="../modelChangePassword.php",eA=async(A,E)=>{try{return(await L.hplxAPI(E.token,E.env).post(zA,A))?.data}catch(I){return console.error(I),Promise.reject(I)}},TA=A=>{const{closeModel:E,modalIsOpen:I,showToast:g,variable:B}=A,[M,C]=m.useState(""),[Q,Y]=m.useState(""),[D,G]=m.useState(""),[x,j]=m.useState({password:"",confirmPassword:"",oldPassword:""}),[H,J]=m.useState(!1),R=()=>{Y(""),C(""),G(""),j({password:"",confirmPassword:"",oldPassword:""})},O=async()=>{const i=new FormData;i.append("oldPassword",x.oldPassword),i.append("pass1",x.password),i.append("pass2",x.confirmPassword),i.append("recaptcha-token","");const k=await eA(i,B),{apierror:y}=k||{};y?(g("Change Password",y,"Error",1500),C(y)):(g("Password Changed","Password Changed Successfully","Success",1500),R(),E())},h=(i,k)=>{const y=i.target.value.trim(),T={...x,[k]:y};j(T)};return m.useEffect(()=>{const i=/(?=.*?[A-Z])/,k=/(?=.*?[a-z])/,y=/(?=.*?[0-9])/,U=/(?=.*?[#?!@$%^&*-])/,T=/.{8,}/,P=x.password.length,S=i.test(x.password),Z=k.test(x.password),n=y.test(x.password),f=U.test(x.password),ZA=T.test(x.password);let d="";P===0||!S||!Z||!n||!f||!ZA?d="Password must be 8-20 characters and must contains uppercase, lowercase and numerals!":(d="",J(x.password===x.confirmPassword)),Y(P>0?d:""),x.confirmPassword.length>0&&(x.confirmPassword!==x.password?G("Confirm password is not matched"):G(""))},[x]),c.jsxRuntimeExports.jsx("div",{children:c.jsxRuntimeExports.jsx(UA.Modal,{isOpen:I,shouldCloseOnOverlayClick:!0,style:{overlay:{backgroundColor:"rgba(52, 64, 84, 0.5)",position:"fixed",alignContent:"center",justifyContent:"center",zIndex:1060},content:{zIndex:10,boxShadow:"0px 8px 8px -4px #101828",padding:"24px",width:"400px",height:"500px",margin:"auto",borderRadius:"12px"}},children:c.jsxRuntimeExports.jsxs("div",{children:[c.jsxRuntimeExports.jsxs("div",{className:"hfl-mb-4 hfl-flex hfl-flex-col hfl-items-center hfl-justify-items-center",children:[c.jsxRuntimeExports.jsx("div",{className:"hx_lock-closed hfl-mb-4 hfl-flex hfl-h-10 hfl-w-10 hfl-items-center hfl-justify-center hfl-rounded-full hfl-border-8 hfl-border-Blue-50 hfl-bg-Blue-100 hfl-text-4 hfl-text-Blue-600"}),c.jsxRuntimeExports.jsx(c.bs,{variant:"Medium",type:"Text lg",className:"hfl-text-Gray-900",children:"Change Login Password"}),c.jsxRuntimeExports.jsx(c.bs,{variant:"Regular",type:"Text sm",className:"hfl-text-center hfl-text-Gray-500",children:"When you login next time, please enter the new password you saved."})]}),c.jsxRuntimeExports.jsxs("div",{children:[c.jsxRuntimeExports.jsx("div",{className:"hfl-my-2",children:c.jsxRuntimeExports.jsx(c.Ps,{width:"11em",height:"hfl-h-10",label:"Old Password",labelColor:"hfl-text-Gray-700",labelSize:"Text sm",errorMsg:M,inputProps:{type:"password",placeholder:"Old Password",value:x.oldPassword,autoComplete:"new-password",name:"OldUserPassword",onChange:i=>{h(i,"oldPassword")}}})}),c.jsxRuntimeExports.jsx("div",{className:"hfl-my-2",children:c.jsxRuntimeExports.jsx(c.Ps,{width:"11em",height:"hfl-h-10",label:"New Password",labelColor:"hfl-text-Gray-700",labelSize:"Text sm",errorMsg:Q,inputProps:{type:"password",placeholder:"New Password",value:x.password,autoComplete:"off",onChange:i=>{h(i,"password")}}})}),c.jsxRuntimeExports.jsx("div",{className:"hfl-my-2",children:c.jsxRuntimeExports.jsx(c.Ps,{width:"11em",height:"hfl-h-10",label:"Confirm New Password",labelColor:"hfl-text-Gray-700",labelSize:"Text sm",errorMsg:D,inputProps:{type:"password",placeholder:"Confirm New Password",value:x.confirmPassword,autoComplete:"off",onChange:i=>{h(i,"confirmPassword")}}})})]}),c.jsxRuntimeExports.jsxs("div",{className:"hfl-mt-[30px] hfl-flex hfl-justify-center hfl-gap-[15px] ",children:[c.jsxRuntimeExports.jsx(c.Ku,{hierarchy:"Secondary-Grey",size:"xl",textField:"Cancel",onClick:()=>{R(),E()},className:"hfl-px-[61.5px] hfl-py-[10px]"}),c.jsxRuntimeExports.jsx(c.Ku,{hierarchy:"Primary",className:"hfl-bg-Primary-600 hfl-px-[57px] hfl-py-[10px] hover:hfl-bg-Primary-700",size:"xl",textField:"Confirm",onClick:()=>{H&&O()}})]})]})})})};/**
|
|
2
2
|
* react-router v7.9.4
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|