hplx-feature-library 1.0.191 → 1.0.193

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.
@@ -198,7 +198,13 @@ const GET_SERVICE_LIST = "/v1/services", GET_DOCTORS_LIST = "/v1/doctors", GET_B
198
198
  } catch (M) {
199
199
  return console.log(M), Promise.reject(M);
200
200
  }
201
- }, getTranslation = async (N, W) => N, transformString = (N, W) => N ? W ? N.toUpperCase() : N : "", toCapitaliseString = (N, W) => N ? N.charAt(0).toUpperCase() + N.slice(1) : "", getInvestigationTestName = async (N, W, M) => {
201
+ }, getTranslation = async (N, W) => {
202
+ try {
203
+ return await window._getTranslationTemp(N, W);
204
+ } catch {
205
+ return N;
206
+ }
207
+ }, transformString = (N, W) => N ? W ? N.toUpperCase() : N : "", toCapitaliseString = (N, W) => N ? N.charAt(0).toUpperCase() + N.slice(1) : "", getInvestigationTestName = async (N, W, M) => {
202
208
  let Y;
203
209
  return N?.length ? Y = N.find(
204
210
  (X) => X.test_id === W
@@ -7615,7 +7621,7 @@ async function getVisitMappedDataPastVisit(N, W, M, Y, X, I = {}, w = {}, x, D,
7615
7621
  if (it === "en" || !Ee)
7616
7622
  return Ee;
7617
7623
  {
7618
- const Zt = Ee?.toString()?.toLowerCase()?.trim() || "", st = I[Ee] ? I[Ee][it] : await getTranslation(Zt);
7624
+ const Zt = Ee?.toString()?.toLowerCase()?.trim() || "", st = I[Ee] ? I[Ee][it] : await getTranslation(Zt, it);
7619
7625
  if (st)
7620
7626
  return st;
7621
7627
  const pt = Object.keys(translation).find((Xt) => Xt.toLowerCase() === Zt);
@@ -8431,9 +8437,7 @@ const PrintOptionsForm = (N) => {
8431
8437
  let $;
8432
8438
  return x && R > 0 ? $ = setTimeout(() => {
8433
8439
  C((_) => _ - 1);
8434
- }, 1e3) : R === 0 && (D(!1), C(10)), () => {
8435
- $ !== void 0 && clearTimeout($);
8436
- };
8440
+ }, 1e3) : R === 0 && (D(!1), C(10)), () => clearTimeout($);
8437
8441
  }, [x, R]);
8438
8442
  const J = ($) => {
8439
8443
  const { value: _ } = $.target;
@@ -8454,9 +8458,7 @@ const PrintOptionsForm = (N) => {
8454
8458
  N.sendEmailSmsWhatsappHandler("email", N.visitDate);
8455
8459
  },
8456
8460
  iconFile: "hx_mail hfl-text-4 hfl-text-4",
8457
- className: ` hfl-border-Blue-300 hfl-items-center
8458
- hfl-justify-center hfl-border
8459
- ${N.showPhoneInput ? "" : "hfl-px-10"}`
8461
+ className: `hfl-border-Blue-300 hfl-items-center hfl-justify-center hfl-border ${N.showPhoneInput ? "" : "hfl-px-10"}`
8460
8462
  }
8461
8463
  ),
8462
8464
  smsButton: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "hfl-relative hfl-flex hfl-items-center hfl-justify-center", children: [
@@ -8567,7 +8569,7 @@ const PrintOptionsForm = (N) => {
8567
8569
  label: "Email",
8568
8570
  height: "hfl-h-10 hfl-border-Purple-200 hfl-h-10 hfl-border-Purple-200",
8569
8571
  start_icon: "hx_mail",
8570
- errorMsg: W && I !== "email" ? "Email format is wrong" : void 0,
8572
+ errorMsg: W && I !== "email" && "Email format is wrong",
8571
8573
  inputProps: {
8572
8574
  onFocus: () => w("email"),
8573
8575
  onBlur: () => w(""),
@@ -8587,7 +8589,7 @@ const PrintOptionsForm = (N) => {
8587
8589
  label: "Phone Number",
8588
8590
  height: "hfl-h-10 hfl-border-Purple-200 hfl-h-10 hfl-border-Purple-200",
8589
8591
  start_icon: "hx_phone",
8590
- errorMsg: Y && I !== "phone" ? "Invalid Phone Number" : void 0,
8592
+ errorMsg: Y && I !== "phone" && "Invalid Phone Number",
8591
8593
  inputProps: {
8592
8594
  placeholder: "Enter Phone Number",
8593
8595
  onFocus: () => w("phone"),
@@ -8612,8 +8614,8 @@ const PrintOptionsForm = (N) => {
8612
8614
  N.printPreferenceChangeHandler($.value, N.selectedLanguage);
8613
8615
  },
8614
8616
  options: Object.keys(N.printPreferenceList).map(($) => ({
8615
- label: N.printPreferenceList[Number($)],
8616
- value: Number($)
8617
+ label: N.printPreferenceList[$],
8618
+ value: $
8617
8619
  })),
8618
8620
  className: "hfl-w-auto xxs:max-md:hfl-w-[190px]"
8619
8621
  }
@@ -114778,7 +114780,7 @@ async function getVisitMappedData(N, W, M, Y, X, I, w, x, D, R) {
114778
114780
  if (nt === "en" || !tt)
114779
114781
  return tt;
114780
114782
  {
114781
- const qe = tt?.toString()?.toLowerCase()?.trim() || "", Ee = I[tt] ? I[tt][nt] : await getTranslation(qe);
114783
+ const qe = tt?.toString()?.toLowerCase()?.trim() || "", Ee = I[tt] ? I[tt][nt] : await getTranslation(qe, nt);
114782
114784
  if (Ee)
114783
114785
  return Ee;
114784
114786
  const it = Object.keys(translation).find((Zt) => Zt.toLowerCase() === qe);
@@ -120962,14 +120964,14 @@ export {
120962
120964
  GET_APPOINTMENTS as e,
120963
120965
  GET_PAST_DUE as f,
120964
120966
  GET_BILLS as g,
120965
- GET_PATIENT_POPUP_VISIT as h,
120966
- GET_VISIT_ALL as i,
120967
- GET_CUSTOM_TRANSLATIONS as j,
120968
- GET_ONLINE_TEST_RANGES as k,
120969
- GET_REFERREDBY_DOCTOR as l,
120970
- GET_BILL_SUMMARY as m,
120971
- GET_BILL_ITEM as n,
120972
- GET_REFERRAL as o,
120967
+ GET_REFERREDBY_DOCTOR as h,
120968
+ GET_BILL_SUMMARY as i,
120969
+ GET_BILL_ITEM as j,
120970
+ GET_REFERRAL as k,
120971
+ GET_PATIENT_POPUP_VISIT as l,
120972
+ GET_CUSTOM_TRANSLATIONS as m,
120973
+ GET_ONLINE_TEST_RANGES as n,
120974
+ GET_VISIT_ALL as o,
120973
120975
  GET_IPD_CASE as p,
120974
120976
  GET_PATIENT_POPUP_HPLXLAB as q,
120975
120977
  GET_INSURANCE_LIST as r,
package/dist/index.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import { P as r } from "./PediatricsCalculatorTable-G0ttbDpi.js";
2
2
  import { A as e } from "./AllInvestigationsTable-Dg-YXASz.js";
3
- import { P as i } from "./PatientPopupContainer-CHmoFq-V.js";
3
+ import { P as i } from "./PatientPopupContainer-Dr_1ZyDM.js";
4
4
  import { A as P } from "./Attachments-BzZHI8d3.js";
5
5
  import { P as m } from "./PatientAddEdit-CPjv2_ZF.js";
6
6
  import { S as n } from "./SearchPatients-BYGGaUoD.js";
7
7
  import { N as d } from "./NineDots-CCtE2t9I.js";
8
8
  import { U as c } from "./UserProfile-CcEbhDhd.js";
9
- import { P as u } from "./PrintModal-BVQ0vEX3.js";
9
+ import { P as u } from "./PrintModal-C18CHi_f.js";
10
10
  export {
11
11
  e as AllInvestigations,
12
12
  P as Attachments,
@@ -1,4 +1,4 @@
1
- import { P as f } from "../PrintModal-BVQ0vEX3.js";
1
+ import { P as f } from "../PrintModal-C18CHi_f.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -139,7 +139,7 @@ export interface GlobalWindow {
139
139
  removeEventListener: (type: string, listener: (e: Event) => void) => void;
140
140
  user_id: string;
141
141
  orientation: number;
142
- _getTranslation: (word: string, language: string) => Promise<string>;
142
+ _getTranslationTemp: (word: string, language: string) => Promise<string>;
143
143
  }
144
144
  export interface I_PatientData {
145
145
  name: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hplx-feature-library",
3
3
  "private": false,
4
- "version": "1.0.191",
4
+ "version": "1.0.193",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "npm i hplx-react-elements-dev@qa && vite",