hplx-feature-library 1.0.32 → 1.0.33
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/PediatricsCalculator/components/PediatricsCalculatorTable.d.ts +1 -1
- package/dist/PediatricsCalculator/components/PediatricsCalculatorTableContext.d.ts +2 -2
- package/dist/PediatricsCalculator/index.js +1 -1
- package/dist/{PediatricsCalculatorTable-DPoagS8l.js → PediatricsCalculatorTable-BbAtgJ_a.js} +21 -19
- package/dist/{PediatricsCalculatorTable-BM0JVhBU.cjs → PediatricsCalculatorTable-U3lJnOOI.cjs} +25 -25
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@ interface PediatricsCalculatorTableProps {
|
|
|
5
5
|
externallyTriggeredEditRowIds?: string[];
|
|
6
6
|
externallyTriggeredEditMode?: boolean;
|
|
7
7
|
getMedicineOptions?: (searchTerm: string) => Promise<Medicine[]>;
|
|
8
|
-
onRowChange?: (updatedRow: IMedicineViewData) => void;
|
|
8
|
+
onRowChange?: (updatedRow: IMedicineViewData, updatedKey?: string) => void;
|
|
9
9
|
onRowDelete?: (rowId: string) => Promise<boolean>;
|
|
10
10
|
onRowCopy?: (clickedRow: IMedicineViewData, selectedMedicines: Medicine[]) => Promise<boolean>;
|
|
11
11
|
onSaveRow?: (row: IMedicineViewData[]) => Promise<boolean>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { IMedicineViewData, Medicine } from '../../types/PediatricsCalculatorTypes';
|
|
1
|
+
import { CalcFieldKeys, IMedicineViewData, Medicine } from '../../types/PediatricsCalculatorTypes';
|
|
2
2
|
export interface IPediatricsCalculatorTableContext {
|
|
3
3
|
variant: 'standard' | 'prescription';
|
|
4
4
|
externallyTriggeredEditMode: boolean;
|
|
5
5
|
externallyTriggeredEditRowIds?: string[];
|
|
6
6
|
getMedicineOptions?: (searchTerm: string) => Promise<Medicine[]>;
|
|
7
|
-
onRowChange?: (updatedRow: IMedicineViewData) => void;
|
|
7
|
+
onRowChange?: (updatedRow: IMedicineViewData, updatedKey?: CalcFieldKeys) => void;
|
|
8
8
|
onRowDelete?: (rowId: string) => void;
|
|
9
9
|
onRowCopy?: (clickedRow: IMedicineViewData, selectedMedicines: Medicine[]) => void;
|
|
10
10
|
setRowToDelete?: (id: string | null) => void;
|
package/dist/{PediatricsCalculatorTable-DPoagS8l.js → PediatricsCalculatorTable-BbAtgJ_a.js}
RENAMED
|
@@ -9747,24 +9747,26 @@ const ej = /* @__PURE__ */ ou(Z1), Or = (t) => /^(\d+)?(\.)?(\d*)?$/.test(t), Xt
|
|
|
9747
9747
|
label: M.doctorMedicineName,
|
|
9748
9748
|
value: M
|
|
9749
9749
|
})) || [], P = s || i?.includes(r.rowId) || a, E = Ve.useMemo(() => p.calculation_type === Xi[0] ? p.calculation_fields : null, [p.calculation_fields, p.calculation_type]), _ = Ve.useMemo(() => p.calculation_type === Xi[1] ? p.calculation_fields : null, [p.calculation_fields, p.calculation_type]), C = (w, S) => {
|
|
9750
|
+
let M;
|
|
9750
9751
|
if (w === "calculation_type") {
|
|
9751
|
-
const
|
|
9752
|
+
const R = S, k = {
|
|
9752
9753
|
frequency: p.calculation_fields.frequency,
|
|
9753
9754
|
pedia_dosage: p.calculation_fields.pedia_dosage
|
|
9754
9755
|
};
|
|
9755
|
-
|
|
9756
|
+
M = {
|
|
9756
9757
|
...p,
|
|
9757
|
-
calculation_type:
|
|
9758
|
-
calculation_fields:
|
|
9759
|
-
}
|
|
9758
|
+
calculation_type: R,
|
|
9759
|
+
calculation_fields: R === "mg/kg/dose" ? { ...Yy, ...k } : { ...Uy, ...k }
|
|
9760
|
+
};
|
|
9760
9761
|
} else
|
|
9761
|
-
|
|
9762
|
+
M = {
|
|
9762
9763
|
...p,
|
|
9763
9764
|
[w]: S
|
|
9764
|
-
}
|
|
9765
|
+
};
|
|
9766
|
+
h(M), o === "prescription" && g(M, w);
|
|
9765
9767
|
}, g = Ch(
|
|
9766
|
-
() => ej((w) => {
|
|
9767
|
-
u?.(w);
|
|
9768
|
+
() => ej((w, S) => {
|
|
9769
|
+
u?.(w, S || "");
|
|
9768
9770
|
}, 500),
|
|
9769
9771
|
[u]
|
|
9770
9772
|
);
|
|
@@ -9789,10 +9791,10 @@ const ej = /* @__PURE__ */ ou(Z1), Or = (t) => /^(\d+)?(\.)?(\d*)?$/.test(t), Xt
|
|
|
9789
9791
|
...M,
|
|
9790
9792
|
calculation_fields: R
|
|
9791
9793
|
};
|
|
9792
|
-
return o === "prescription" && g(
|
|
9794
|
+
return o === "prescription" && g(k, w), k;
|
|
9793
9795
|
});
|
|
9794
9796
|
},
|
|
9795
|
-
[
|
|
9797
|
+
[g, o]
|
|
9796
9798
|
), j = async () => {
|
|
9797
9799
|
const w = {
|
|
9798
9800
|
...p,
|
|
@@ -9807,7 +9809,7 @@ const ej = /* @__PURE__ */ ou(Z1), Or = (t) => /^(\d+)?(\.)?(\d*)?$/.test(t), Xt
|
|
|
9807
9809
|
h(r), o === "standard" && e(!1);
|
|
9808
9810
|
}, Q = (w) => o === "prescription" && w === "medicine_name" ? !1 : P, q = () => {
|
|
9809
9811
|
const w = !(p?.isSavedToLibrary ?? !1), S = { ...p, isSavedToLibrary: w };
|
|
9810
|
-
h(S), g(S);
|
|
9812
|
+
h(S), g(S, "isSavedToLibrary");
|
|
9811
9813
|
};
|
|
9812
9814
|
return /* @__PURE__ */ W.jsxs(
|
|
9813
9815
|
"div",
|
|
@@ -11298,11 +11300,11 @@ const xy = /* @__PURE__ */ ou(hj), mj = (t) => {
|
|
|
11298
11300
|
setSearchDisabled: c
|
|
11299
11301
|
}, f) => {
|
|
11300
11302
|
const [d, p] = qt(null), [h, m] = qt(!1), [b, P] = qt(), E = xt(
|
|
11301
|
-
(q, w) => {
|
|
11302
|
-
const
|
|
11303
|
-
if (!
|
|
11304
|
-
const
|
|
11305
|
-
o?.(
|
|
11303
|
+
(q, w, S) => {
|
|
11304
|
+
const M = t.find((k) => k.rowId === q);
|
|
11305
|
+
if (!M) return;
|
|
11306
|
+
const R = { ...M, ...w };
|
|
11307
|
+
o?.(R, S || void 0);
|
|
11306
11308
|
},
|
|
11307
11309
|
[t, o]
|
|
11308
11310
|
), _ = xt(async () => {
|
|
@@ -11364,8 +11366,8 @@ const xy = /* @__PURE__ */ ou(hj), mj = (t) => {
|
|
|
11364
11366
|
externallyTriggeredEditMode: e,
|
|
11365
11367
|
externallyTriggeredEditRowIds: a,
|
|
11366
11368
|
getMedicineOptions: n,
|
|
11367
|
-
onRowChange: (q) => {
|
|
11368
|
-
E(q.rowId, q), o?.(q);
|
|
11369
|
+
onRowChange: (q, w) => {
|
|
11370
|
+
E(q.rowId, q, w), o?.(q, w);
|
|
11369
11371
|
},
|
|
11370
11372
|
onRowDelete: s,
|
|
11371
11373
|
onRowCopy: i,
|