@argusoft/medplat-product-management 1.0.0
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/BrandsPage-DCMCVvDY.js +334 -0
- package/dist/BrandsPage-DCMCVvDY.js.map +1 -0
- package/dist/CategoriesPage-BpRhwfrc.js +284 -0
- package/dist/CategoriesPage-BpRhwfrc.js.map +1 -0
- package/dist/DashboardPage-BNKUQj46.js +436 -0
- package/dist/DashboardPage-BNKUQj46.js.map +1 -0
- package/dist/FacilityPicker-Coi8I3yE.js +79 -0
- package/dist/FacilityPicker-Coi8I3yE.js.map +1 -0
- package/dist/InventoryPage-BR6jOzg2.js +517 -0
- package/dist/InventoryPage-BR6jOzg2.js.map +1 -0
- package/dist/MemberProfileCard-DbHZCS5n.js +272 -0
- package/dist/MemberProfileCard-DbHZCS5n.js.map +1 -0
- package/dist/PaymentCreatePage-Ci3ERnby.js +487 -0
- package/dist/PaymentCreatePage-Ci3ERnby.js.map +1 -0
- package/dist/PaymentsPage-sdg902zX.js +157 -0
- package/dist/PaymentsPage-sdg902zX.js.map +1 -0
- package/dist/PickupCreatePage-CieMsgWV.js +310 -0
- package/dist/PickupCreatePage-CieMsgWV.js.map +1 -0
- package/dist/PickupsPage-Ci2Ll0Kn.js +566 -0
- package/dist/PickupsPage-Ci2Ll0Kn.js.map +1 -0
- package/dist/PmGuard-CjJBisaN.js +1195 -0
- package/dist/PmGuard-CjJBisaN.js.map +1 -0
- package/dist/PmTable-BuXZQZCU.js +302 -0
- package/dist/PmTable-BuXZQZCU.js.map +1 -0
- package/dist/ProductEditPage-DL8gy85Y.js +666 -0
- package/dist/ProductEditPage-DL8gy85Y.js.map +1 -0
- package/dist/ProductsPage-BANTKxLb.js +221 -0
- package/dist/ProductsPage-BANTKxLb.js.map +1 -0
- package/dist/PurchaseCreatePage-C3KMfBxJ.js +626 -0
- package/dist/PurchaseCreatePage-C3KMfBxJ.js.map +1 -0
- package/dist/PurchaseRequestDetailPage-C0GYFJDl.js +586 -0
- package/dist/PurchaseRequestDetailPage-C0GYFJDl.js.map +1 -0
- package/dist/PurchaseRequestsPage-DvFH_tWe.js +265 -0
- package/dist/PurchaseRequestsPage-DvFH_tWe.js.map +1 -0
- package/dist/PurchasesPage-BCvLvSp4.js +295 -0
- package/dist/PurchasesPage-BCvLvSp4.js.map +1 -0
- package/dist/SaleCreatePage-DpkQMoTq.js +548 -0
- package/dist/SaleCreatePage-DpkQMoTq.js.map +1 -0
- package/dist/SalesPage-DUwgkEO-.js +315 -0
- package/dist/SalesPage-DUwgkEO-.js.map +1 -0
- package/dist/SettingsPage-CusC0jqJ.js +710 -0
- package/dist/SettingsPage-CusC0jqJ.js.map +1 -0
- package/dist/StorageUnitsPage-BlC2AgrJ.js +469 -0
- package/dist/StorageUnitsPage-BlC2AgrJ.js.map +1 -0
- package/dist/TransactionsPage-DDaK4VyY.js +714 -0
- package/dist/TransactionsPage-DDaK4VyY.js.map +1 -0
- package/dist/TransferCreatePage-BxudLfhS.js +363 -0
- package/dist/TransferCreatePage-BxudLfhS.js.map +1 -0
- package/dist/TransfersPage-zgmt7teZ.js +480 -0
- package/dist/TransfersPage-zgmt7teZ.js.map +1 -0
- package/dist/VialsPage-CjqPfgpV.js +855 -0
- package/dist/VialsPage-CjqPfgpV.js.map +1 -0
- package/dist/constants-BrA_hfAI.js +254 -0
- package/dist/constants-BrA_hfAI.js.map +1 -0
- package/dist/currency-BDDCDgeE.js +169 -0
- package/dist/currency-BDDCDgeE.js.map +1 -0
- package/dist/format-UOyOu75i.js +52 -0
- package/dist/format-UOyOu75i.js.map +1 -0
- package/dist/index.js +45 -0
- package/dist/index.js.map +1 -0
- package/dist/useFieldErrors-hDG8ox_x.js +29 -0
- package/dist/useFieldErrors-hDG8ox_x.js.map +1 -0
- package/dist/validation-Ba7puFIO.js +109 -0
- package/dist/validation-Ba7puFIO.js.map +1 -0
- package/package.json +36 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
//#region src/utils/format.js
|
|
2
|
+
function e(e) {
|
|
3
|
+
return String(e).padStart(2, "0");
|
|
4
|
+
}
|
|
5
|
+
function t(t) {
|
|
6
|
+
if (!t) return "-";
|
|
7
|
+
let n = new Date(t);
|
|
8
|
+
return Number.isNaN(n.getTime()) ? "-" : `${n.getFullYear()}-${e(n.getMonth() + 1)}-${e(n.getDate())}`;
|
|
9
|
+
}
|
|
10
|
+
function n(n) {
|
|
11
|
+
if (!n) return "-";
|
|
12
|
+
let r = new Date(n);
|
|
13
|
+
return Number.isNaN(r.getTime()) ? "-" : `${t(r)} ${e(r.getHours())}:${e(r.getMinutes())}`;
|
|
14
|
+
}
|
|
15
|
+
function r(t) {
|
|
16
|
+
if (t == null || t === "") return null;
|
|
17
|
+
if (typeof t == "string") {
|
|
18
|
+
let e = t.match(/^(\d{4})-(\d{2})-(\d{2})/);
|
|
19
|
+
if (e) return `${e[1]}-${e[2]}-${e[3]}`;
|
|
20
|
+
}
|
|
21
|
+
let n = t instanceof Date ? t : new Date(t);
|
|
22
|
+
return Number.isNaN(n.getTime()) ? null : `${n.getFullYear()}-${e(n.getMonth() + 1)}-${e(n.getDate())}`;
|
|
23
|
+
}
|
|
24
|
+
function i() {
|
|
25
|
+
let t = /* @__PURE__ */ new Date();
|
|
26
|
+
return `${t.getFullYear()}-${e(t.getMonth() + 1)}-${e(t.getDate())}`;
|
|
27
|
+
}
|
|
28
|
+
function a(e) {
|
|
29
|
+
let t = r(e);
|
|
30
|
+
return t ? t < i() : !1;
|
|
31
|
+
}
|
|
32
|
+
function o(e, t = 2) {
|
|
33
|
+
if (e == null || e === "") return "-";
|
|
34
|
+
let n = Number(e);
|
|
35
|
+
return Number.isNaN(n) ? "-" : n.toFixed(t);
|
|
36
|
+
}
|
|
37
|
+
function s(e) {
|
|
38
|
+
switch (e) {
|
|
39
|
+
case "ACTIVE": return "success";
|
|
40
|
+
case "IN_USE": return "info";
|
|
41
|
+
case "EXHAUSTED": return "warning";
|
|
42
|
+
case "EXPIRED": return "error";
|
|
43
|
+
case "QUARANTINED": return "error";
|
|
44
|
+
case "OPEN": return "info";
|
|
45
|
+
case "DISCARDED": return "default";
|
|
46
|
+
default: return "default";
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
//#endregion
|
|
50
|
+
export { s as a, a as i, n, o as r, t };
|
|
51
|
+
|
|
52
|
+
//# sourceMappingURL=format-UOyOu75i.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format-UOyOu75i.js","names":[],"sources":["../src/utils/format.js"],"sourcesContent":["// All PM dates render as YYYY-MM-DD / YYYY-MM-DD HH:mm so the operator sees a\n// single, locale-independent format throughout the module.\nfunction pad(n) { return String(n).padStart(2, '0'); }\n\nexport function formatDate(value) {\n if (!value) return '-';\n const d = new Date(value);\n if (Number.isNaN(d.getTime())) return '-';\n return `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())}`;\n}\n\nexport function formatDateTime(value) {\n if (!value) return '-';\n const d = new Date(value);\n if (Number.isNaN(d.getTime())) return '-';\n return `${formatDate(d)} ${pad(d.getHours())}:${pad(d.getMinutes())}`;\n}\n\n// Extracts the YYYY-MM-DD prefix from a value (ISO string, Date, or epoch ms),\n// always in the operator's local calendar. Date strings like \"2026-05-26\"\n// short-circuit so the operator's timezone can't shift them onto the previous\n// day; everything else goes through Date and is rendered via local getters.\nfunction toLocalDateString(value) {\n if (value == null || value === '') return null;\n if (typeof value === 'string') {\n const m = value.match(/^(\\d{4})-(\\d{2})-(\\d{2})/);\n if (m) return `${m[1]}-${m[2]}-${m[3]}`;\n }\n const d = value instanceof Date ? value : new Date(value);\n if (Number.isNaN(d.getTime())) return null;\n return `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())}`;\n}\n\nfunction todayLocalDateString() {\n const d = new Date();\n return `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())}`;\n}\n\n/**\n * Calendar-date comparison: returns true only when {@code today > expiryDate}.\n * A batch whose expiry is today is still valid — operators print expiry \"valid\n * through\" dates on packaging, so the unit can be administered until end of\n * the printed day. The implementation compares YYYY-MM-DD strings so timezones\n * can't tip a today-expiry batch into the past.\n */\nexport function isPastExpiry(expiryDate) {\n const expiryStr = toLocalDateString(expiryDate);\n if (!expiryStr) return false;\n return expiryStr < todayLocalDateString();\n}\n\nexport function formatNumber(value, fractionDigits = 2) {\n if (value === null || value === undefined || value === '') return '-';\n const n = Number(value);\n if (Number.isNaN(n)) return '-';\n return n.toFixed(fractionDigits);\n}\n\nexport function statusColor(status) {\n switch (status) {\n case 'ACTIVE':\n return 'success';\n case 'IN_USE':\n return 'info';\n case 'EXHAUSTED':\n return 'warning';\n case 'EXPIRED':\n return 'error';\n case 'QUARANTINED':\n return 'error';\n case 'OPEN':\n return 'info';\n case 'DISCARDED':\n return 'default';\n default:\n return 'default';\n }\n}\n"],"mappings":";AAEA,SAAS,EAAI,GAAG;CAAE,OAAO,OAAO,CAAC,EAAE,SAAS,GAAG,GAAG;AAAG;AAErD,SAAgB,EAAW,GAAO;CAChC,IAAI,CAAC,GAAO,OAAO;CACnB,IAAM,IAAI,IAAI,KAAK,CAAK;CAExB,OADI,OAAO,MAAM,EAAE,QAAQ,CAAC,IAAU,MAC/B,GAAG,EAAE,YAAY,EAAE,GAAG,EAAI,EAAE,SAAS,IAAI,CAAC,EAAE,GAAG,EAAI,EAAE,QAAQ,CAAC;AACvE;AAEA,SAAgB,EAAe,GAAO;CACpC,IAAI,CAAC,GAAO,OAAO;CACnB,IAAM,IAAI,IAAI,KAAK,CAAK;CAExB,OADI,OAAO,MAAM,EAAE,QAAQ,CAAC,IAAU,MAC/B,GAAG,EAAW,CAAC,EAAE,GAAG,EAAI,EAAE,SAAS,CAAC,EAAE,GAAG,EAAI,EAAE,WAAW,CAAC;AACpE;AAMA,SAAS,EAAkB,GAAO;CAChC,IAAI,KAAS,QAAQ,MAAU,IAAI,OAAO;CAC1C,IAAI,OAAO,KAAU,UAAU;EAC7B,IAAM,IAAI,EAAM,MAAM,0BAA0B;EAChD,IAAI,GAAG,OAAO,GAAG,EAAE,GAAG,GAAG,EAAE,GAAG,GAAG,EAAE;CACrC;CACA,IAAM,IAAI,aAAiB,OAAO,IAAQ,IAAI,KAAK,CAAK;CAExD,OADI,OAAO,MAAM,EAAE,QAAQ,CAAC,IAAU,OAC/B,GAAG,EAAE,YAAY,EAAE,GAAG,EAAI,EAAE,SAAS,IAAI,CAAC,EAAE,GAAG,EAAI,EAAE,QAAQ,CAAC;AACvE;AAEA,SAAS,IAAuB;CAC9B,IAAM,oBAAI,IAAI,KAAK;CACnB,OAAO,GAAG,EAAE,YAAY,EAAE,GAAG,EAAI,EAAE,SAAS,IAAI,CAAC,EAAE,GAAG,EAAI,EAAE,QAAQ,CAAC;AACvE;AASA,SAAgB,EAAa,GAAY;CACvC,IAAM,IAAY,EAAkB,CAAU;CAE9C,OADK,IACE,IAAY,EAAqB,IADjB;AAEzB;AAEA,SAAgB,EAAa,GAAO,IAAiB,GAAG;CACtD,IAAI,KAAU,QAA+B,MAAU,IAAI,OAAO;CAClE,IAAM,IAAI,OAAO,CAAK;CAEtB,OADI,OAAO,MAAM,CAAC,IAAU,MACrB,EAAE,QAAQ,CAAc;AACjC;AAEA,SAAgB,EAAY,GAAQ;CAClC,QAAQ,GAAR;EACE,KAAK,UACH,OAAO;EACT,KAAK,UACH,OAAO;EACT,KAAK,aACH,OAAO;EACT,KAAK,WACH,OAAO;EACT,KAAK,eACH,OAAO;EACT,KAAK,QACH,OAAO;EACT,KAAK,aACH,OAAO;EACT,SACE,OAAO;CACX;AACF"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { lazy as e } from "react";
|
|
2
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
+
//#region routes/routes.jsx
|
|
4
|
+
var n = e(() => import("@/views/feature-components/VerifyRoute.jsx")), r = e(() => import("./DashboardPage-BNKUQj46.js")), i = e(() => import("./CategoriesPage-BpRhwfrc.js")), a = e(() => import("./BrandsPage-DCMCVvDY.js")), o = e(() => import("./ProductsPage-BANTKxLb.js")), s = e(() => import("./ProductEditPage-DL8gy85Y.js")), c = e(() => import("./StorageUnitsPage-BlC2AgrJ.js")), l = e(() => import("./InventoryPage-BR6jOzg2.js")), u = e(() => import("./PurchasesPage-BCvLvSp4.js")), d = e(() => import("./PurchaseCreatePage-C3KMfBxJ.js")), f = e(() => import("./PurchaseRequestsPage-DvFH_tWe.js")), p = e(() => import("./PurchaseRequestDetailPage-C0GYFJDl.js")), m = e(() => import("./PickupsPage-Ci2Ll0Kn.js")), h = e(() => import("./PickupCreatePage-CieMsgWV.js")), g = e(() => import("./TransfersPage-zgmt7teZ.js")), _ = e(() => import("./TransferCreatePage-BxudLfhS.js")), v = e(() => import("./SalesPage-DUwgkEO-.js")), y = e(() => import("./SaleCreatePage-DpkQMoTq.js")), b = e(() => import("./PaymentsPage-sdg902zX.js")), x = e(() => import("./PaymentCreatePage-Ci3ERnby.js")), S = e(() => import("./VialsPage-CjqPfgpV.js")), C = e(() => import("./TransactionsPage-DDaK4VyY.js")), w = e(() => import("./SettingsPage-CusC0jqJ.js")), T = "Product Management";
|
|
5
|
+
function E(e, r, i = "General") {
|
|
6
|
+
return {
|
|
7
|
+
path: e,
|
|
8
|
+
element: /* @__PURE__ */ t(n, {
|
|
9
|
+
headerTitle: T,
|
|
10
|
+
pageTitle: i,
|
|
11
|
+
url: "medplat/manage/pm",
|
|
12
|
+
component: r
|
|
13
|
+
})
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
var D = [
|
|
17
|
+
E("medplat/manage/pm", r, "Dashboard"),
|
|
18
|
+
E("medplat/manage/pm/categories", i, "Categories"),
|
|
19
|
+
E("medplat/manage/pm/brands", a, "Brands"),
|
|
20
|
+
E("medplat/manage/pm/products", o, "Products"),
|
|
21
|
+
E("medplat/manage/pm/products/:productId", s, "Product"),
|
|
22
|
+
E("medplat/manage/pm/storage-units", c, "Storage Units"),
|
|
23
|
+
E("medplat/manage/pm/inventory", l, "Inventory"),
|
|
24
|
+
E("medplat/manage/pm/purchases", u, "Purchases"),
|
|
25
|
+
E("medplat/manage/pm/purchases/new", d, "New Purchase"),
|
|
26
|
+
E("medplat/manage/pm/purchase-requests", f, "Purchase Requests"),
|
|
27
|
+
E("medplat/manage/pm/purchase-requests/:requestId", p, "Purchase Request"),
|
|
28
|
+
E("medplat/manage/pm/pickups", m, "Pickups"),
|
|
29
|
+
E("medplat/manage/pm/pickups/new", h, "New Pickup"),
|
|
30
|
+
E("medplat/manage/pm/transfers", g, "Transfers"),
|
|
31
|
+
E("medplat/manage/pm/transfers/new", _, "New Transfer"),
|
|
32
|
+
E("medplat/manage/pm/sales", v, "Sales"),
|
|
33
|
+
E("medplat/manage/pm/sales/new", y, "New Sale"),
|
|
34
|
+
E("medplat/manage/pm/sales/new/:memberId", y, "New Sale"),
|
|
35
|
+
E("medplat/manage/pm/payments", b, "Payments"),
|
|
36
|
+
E("medplat/manage/pm/payments/new", x, "Collect Payment"),
|
|
37
|
+
E("medplat/manage/pm/payments/new/:memberId", x, "Collect Payment"),
|
|
38
|
+
E("medplat/manage/pm/vials", S, "Open Vials"),
|
|
39
|
+
E("medplat/manage/pm/transactions", C, "Stock Ledger"),
|
|
40
|
+
E("medplat/manage/pm/settings", w, "Settings")
|
|
41
|
+
];
|
|
42
|
+
//#endregion
|
|
43
|
+
export { D as routes };
|
|
44
|
+
|
|
45
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../routes/routes.jsx"],"sourcesContent":["import { lazy } from 'react';\nconst VerifyRoute = lazy(() => import('@/views/feature-components/VerifyRoute.jsx'));\n\nconst DashboardPage = lazy(() => import('../src/views/DashboardPage.jsx'));\nconst CategoriesPage = lazy(() => import('../src/views/CategoriesPage.jsx'));\nconst BrandsPage = lazy(() => import('../src/views/BrandsPage.jsx'));\nconst ProductsPage = lazy(() => import('../src/views/ProductsPage.jsx'));\nconst ProductEditPage = lazy(() => import('../src/views/ProductEditPage.jsx'));\nconst StorageUnitsPage = lazy(() => import('../src/views/StorageUnitsPage.jsx'));\nconst InventoryPage = lazy(() => import('../src/views/InventoryPage.jsx'));\nconst PurchasesPage = lazy(() => import('../src/views/PurchasesPage.jsx'));\nconst PurchaseCreatePage = lazy(() => import('../src/views/PurchaseCreatePage.jsx'));\nconst PurchaseRequestsPage = lazy(() => import('../src/views/PurchaseRequestsPage.jsx'));\nconst PurchaseRequestDetailPage = lazy(() => import('../src/views/PurchaseRequestDetailPage.jsx'));\nconst PickupsPage = lazy(() => import('../src/views/PickupsPage.jsx'));\nconst PickupCreatePage = lazy(() => import('../src/views/PickupCreatePage.jsx'));\nconst TransfersPage = lazy(() => import('../src/views/TransfersPage.jsx'));\nconst TransferCreatePage = lazy(() => import('../src/views/TransferCreatePage.jsx'));\nconst SalesPage = lazy(() => import('../src/views/SalesPage.jsx'));\nconst SaleCreatePage = lazy(() => import('../src/views/SaleCreatePage.jsx'));\nconst PaymentsPage = lazy(() => import('../src/views/PaymentsPage.jsx'));\nconst PaymentCreatePage = lazy(() => import('../src/views/PaymentCreatePage.jsx'));\nconst VialsPage = lazy(() => import('../src/views/VialsPage.jsx'));\nconst TransactionsPage = lazy(() => import('../src/views/TransactionsPage.jsx'));\nconst SettingsPage = lazy(() => import('../src/views/SettingsPage.jsx'));\n\nconst HEADER = 'Product Management';\n\nfunction pmRoute(path, Component, pageTitle = 'General') {\n return {\n path,\n element: (\n <VerifyRoute\n headerTitle={HEADER}\n pageTitle={pageTitle}\n url={\"medplat/manage/pm\"}\n component={Component}\n />\n ),\n };\n}\n\nconst routes = [\n pmRoute('medplat/manage/pm', DashboardPage, 'Dashboard'),\n pmRoute('medplat/manage/pm/categories', CategoriesPage, 'Categories'),\n pmRoute('medplat/manage/pm/brands', BrandsPage, 'Brands'),\n pmRoute('medplat/manage/pm/products', ProductsPage, 'Products'),\n pmRoute('medplat/manage/pm/products/:productId', ProductEditPage, 'Product'),\n pmRoute('medplat/manage/pm/storage-units', StorageUnitsPage, 'Storage Units'),\n pmRoute('medplat/manage/pm/inventory', InventoryPage, 'Inventory'),\n pmRoute('medplat/manage/pm/purchases', PurchasesPage, 'Purchases'),\n pmRoute('medplat/manage/pm/purchases/new', PurchaseCreatePage, 'New Purchase'),\n pmRoute('medplat/manage/pm/purchase-requests', PurchaseRequestsPage, 'Purchase Requests'),\n pmRoute('medplat/manage/pm/purchase-requests/:requestId', PurchaseRequestDetailPage, 'Purchase Request'),\n pmRoute('medplat/manage/pm/pickups', PickupsPage, 'Pickups'),\n pmRoute('medplat/manage/pm/pickups/new', PickupCreatePage, 'New Pickup'),\n pmRoute('medplat/manage/pm/transfers', TransfersPage, 'Transfers'),\n pmRoute('medplat/manage/pm/transfers/new', TransferCreatePage, 'New Transfer'),\n pmRoute('medplat/manage/pm/sales', SalesPage, 'Sales'),\n // memberId is passed in by the caller — Sales / Payments only render the\n // create flow when they have one. Plain /sales/new or /payments fall back\n // to a friendly \"no member selected\" state.\n pmRoute('medplat/manage/pm/sales/new', SaleCreatePage, 'New Sale'),\n pmRoute('medplat/manage/pm/sales/new/:memberId', SaleCreatePage, 'New Sale'),\n pmRoute('medplat/manage/pm/payments', PaymentsPage, 'Payments'),\n // Payment-collection flow mirrors Sales: the create page receives the\n // member id via the URL (passed in by an upstream flow). The bare /new\n // path lands on a \"no member selected\" warning.\n pmRoute('medplat/manage/pm/payments/new', PaymentCreatePage, 'Collect Payment'),\n pmRoute('medplat/manage/pm/payments/new/:memberId', PaymentCreatePage, 'Collect Payment'),\n pmRoute('medplat/manage/pm/vials', VialsPage, 'Open Vials'),\n pmRoute('medplat/manage/pm/transactions', TransactionsPage, 'Stock Ledger'),\n pmRoute('medplat/manage/pm/settings', SettingsPage, 'Settings'),\n];\n\nexport default routes;\n"],"mappings":";;;AACA,IAAM,IAAc,QAAW,OAAO,6CAA6C,GAE7E,IAA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,uCAAuC,GAAsB,mBAAmB;CACxF,EAAQ,kDAAkD,GAA2B,kBAAkB;CACvG,EAAQ,6BAA6B,GAAa,SAAS;CAC3D,EAAQ,iCAAiC,GAAkB,YAAY;CACvE,EAAQ,+BAA+B,GAAe,WAAW;CACjE,EAAQ,mCAAmC,GAAoB,cAAc;CAC7E,EAAQ,2BAA2B,GAAW,OAAO;CAIrD,EAAQ,+BAA+B,GAAgB,UAAU;CACjE,EAAQ,yCAAyC,GAAgB,UAAU;CAC3E,EAAQ,8BAA8B,GAAc,UAAU;CAI9D,EAAQ,kCAAkC,GAAmB,iBAAiB;CAC9E,EAAQ,4CAA4C,GAAmB,iBAAiB;CACxF,EAAQ,2BAA2B,GAAW,YAAY;CAC1D,EAAQ,kCAAkC,GAAkB,cAAc;CAC1E,EAAQ,8BAA8B,GAAc,UAAU;AAChE"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { useCallback as e, useState as t } from "react";
|
|
2
|
+
//#region src/utils/useFieldErrors.js
|
|
3
|
+
function n() {
|
|
4
|
+
let [n, r] = t({}), [i, a] = t(!1);
|
|
5
|
+
return {
|
|
6
|
+
onBlur: e((e) => () => {
|
|
7
|
+
r((t) => t[e] ? t : {
|
|
8
|
+
...t,
|
|
9
|
+
[e]: !0
|
|
10
|
+
});
|
|
11
|
+
}, []),
|
|
12
|
+
markTouched: e((e) => {
|
|
13
|
+
r((t) => t[e] ? t : {
|
|
14
|
+
...t,
|
|
15
|
+
[e]: !0
|
|
16
|
+
});
|
|
17
|
+
}, []),
|
|
18
|
+
markAllTouched: e(() => a(!0), []),
|
|
19
|
+
reset: e(() => {
|
|
20
|
+
r({}), a(!1);
|
|
21
|
+
}, []),
|
|
22
|
+
show: e((e) => !!(i || n[e]), [i, n]),
|
|
23
|
+
submitAttempted: i
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
//#endregion
|
|
27
|
+
export { n as t };
|
|
28
|
+
|
|
29
|
+
//# sourceMappingURL=useFieldErrors-hDG8ox_x.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFieldErrors-hDG8ox_x.js","names":[],"sources":["../src/utils/useFieldErrors.js"],"sourcesContent":["import { useCallback, useState } from 'react';\n\n/**\n * Tracks which fields the user has interacted with so we can defer showing\n * field-level errors until either:\n * (a) the field has been blurred at least once, or\n * (b) the user has attempted to submit the form.\n *\n * Why: red errors on a brand-new form (before the user has typed anything) is\n * jarring UX. The standard pattern is \"validate-on-blur\" plus \"validate-all-on-\n * submit\". This hook centralises that logic so every form in the module\n * behaves the same way.\n *\n * Usage:\n * const { onBlur, show, markAllTouched, reset } = useFieldErrors();\n *\n * <TextField\n * error={show('name') && !!errors.name}\n * helperText={show('name') ? errors.name : ''}\n * onBlur={onBlur('name')}\n * />\n *\n * async function save() {\n * if (!formIsValid) {\n * markAllTouched(); // reveals every pending error\n * return;\n * }\n * ...\n * }\n *\n * For dialogs that are reused (open / close / re-open), call `reset()` when\n * opening a fresh instance so prior touched-state doesn't leak.\n */\nexport function useFieldErrors() {\n const [touched, setTouched] = useState({});\n const [submitAttempted, setSubmitAttempted] = useState(false);\n\n const onBlur = useCallback(\n (field) => () => {\n setTouched((prev) => (prev[field] ? prev : { ...prev, [field]: true }));\n },\n []\n );\n\n const markTouched = useCallback((field) => {\n setTouched((prev) => (prev[field] ? prev : { ...prev, [field]: true }));\n }, []);\n\n const markAllTouched = useCallback(() => setSubmitAttempted(true), []);\n\n const reset = useCallback(() => {\n setTouched({});\n setSubmitAttempted(false);\n }, []);\n\n const show = useCallback(\n (field) => Boolean(submitAttempted || touched[field]),\n [submitAttempted, touched]\n );\n\n return { onBlur, markTouched, markAllTouched, reset, show, submitAttempted };\n}\n"],"mappings":";;AAiCA,SAAgB,IAAiB;CAC/B,IAAM,CAAC,GAAS,KAAc,EAAS,CAAC,CAAC,GACnC,CAAC,GAAiB,KAAsB,EAAS,EAAK;CAyB5D,OAAO;EAAE,QAvBM,GACZ,YAAgB;GACf,GAAY,MAAU,EAAK,KAAS,IAAO;IAAE,GAAG;KAAO,IAAQ;GAAK,CAAE;EACxE,GACA,CAAC,CAmBW;EAAG,aAhBG,GAAa,MAAU;GACzC,GAAY,MAAU,EAAK,KAAS,IAAO;IAAE,GAAG;KAAO,IAAQ;GAAK,CAAE;EACxE,GAAG,CAAC,CAcuB;EAAG,gBAZP,QAAkB,EAAmB,EAAI,GAAG,CAAC,CAYzB;EAAG,OAVhC,QAAkB;GAE9B,AADA,EAAW,CAAC,CAAC,GACb,EAAmB,EAAK;EAC1B,GAAG,CAAC,CAO8C;EAAG,MALxC,GACV,MAAU,GAAQ,KAAmB,EAAQ,KAC9C,CAAC,GAAiB,CAAO,CAG6B;EAAG;CAAgB;AAC7E"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
//#region src/utils/validation.js
|
|
2
|
+
var e = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, t = /^[A-Z0-9_]+$/;
|
|
3
|
+
function n(e) {
|
|
4
|
+
if (e === "" || e == null) return NaN;
|
|
5
|
+
let t = Number(e);
|
|
6
|
+
return Number.isNaN(t) ? NaN : t;
|
|
7
|
+
}
|
|
8
|
+
function r(e, t = "This field") {
|
|
9
|
+
return e == null || typeof e == "string" && !e.trim() ? `${t} is required` : "";
|
|
10
|
+
}
|
|
11
|
+
function i(e, { required: n = !1 } = {}) {
|
|
12
|
+
return !e || !e.trim() ? n ? "Code is required" : "" : t.test(e.trim()) ? "" : "Code must use uppercase letters, digits, and underscores only";
|
|
13
|
+
}
|
|
14
|
+
function a(t, { required: n = !1 } = {}) {
|
|
15
|
+
return !t || !t.trim() ? n ? "Email is required" : "" : e.test(t.trim()) ? "" : "Enter a valid email address";
|
|
16
|
+
}
|
|
17
|
+
function o(e, t = "Value", { required: r = !1 } = {}) {
|
|
18
|
+
if (e === "" || e == null) return r ? `${t} is required` : "";
|
|
19
|
+
let i = n(e);
|
|
20
|
+
return Number.isNaN(i) ? `${t} must be a number` : i <= 0 ? `${t} must be greater than 0` : "";
|
|
21
|
+
}
|
|
22
|
+
function s(e, t = "Value", { required: r = !1 } = {}) {
|
|
23
|
+
if (e === "" || e == null) return r ? `${t} is required` : "";
|
|
24
|
+
let i = n(e);
|
|
25
|
+
return Number.isNaN(i) ? `${t} must be a number` : i < 0 ? `${t} cannot be negative` : "";
|
|
26
|
+
}
|
|
27
|
+
function c(e, t = "Value", { required: r = !1, min: i, max: a } = {}) {
|
|
28
|
+
if (e === "" || e == null) return r ? `${t} is required` : "";
|
|
29
|
+
let o = n(e);
|
|
30
|
+
return Number.isNaN(o) || !Number.isInteger(o) ? `${t} must be a whole number` : i != null && o < i ? `${t} must be at least ${i}` : a != null && o > a ? `${t} must be at most ${a}` : "";
|
|
31
|
+
}
|
|
32
|
+
function l(e) {
|
|
33
|
+
let t = o(e, "Vial volume", { required: !0 });
|
|
34
|
+
if (t) return t;
|
|
35
|
+
let n = Number(e);
|
|
36
|
+
return n > 100 ? "Vial volume looks too large (>100 ml). Please double-check." : n < .05 ? "Vial volume looks too small (<0.05 ml). Please double-check." : "";
|
|
37
|
+
}
|
|
38
|
+
function u(e, t = "Dose", n) {
|
|
39
|
+
if (e === "" || e == null) return "";
|
|
40
|
+
let r = o(e, t);
|
|
41
|
+
if (r) return r;
|
|
42
|
+
let i = Number(e);
|
|
43
|
+
return i > 10 ? `${t} looks too large (>10 ml). Please double-check.` : n && i > Number(n) ? `${t} cannot exceed vial volume (${n} ml)` : "";
|
|
44
|
+
}
|
|
45
|
+
function d(e) {
|
|
46
|
+
return c(e, "Open vial validity", {
|
|
47
|
+
required: !0,
|
|
48
|
+
min: 0,
|
|
49
|
+
max: 720
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
function f(e, t) {
|
|
53
|
+
return t ? c(e, "Reconstituted validity", {
|
|
54
|
+
required: !0,
|
|
55
|
+
min: 1,
|
|
56
|
+
max: 720
|
|
57
|
+
}) : "";
|
|
58
|
+
}
|
|
59
|
+
function p(e) {
|
|
60
|
+
return c(e, "Max concurrent open vials", {
|
|
61
|
+
required: !0,
|
|
62
|
+
min: 1,
|
|
63
|
+
max: 20
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
var m = -90, h = 30;
|
|
67
|
+
function g(e, t) {
|
|
68
|
+
if (e === "" || e == null) return "";
|
|
69
|
+
let n = Number(e);
|
|
70
|
+
return Number.isNaN(n) ? `${t} must be a number` : n < m ? `${t} cannot be below ${m}°C` : n > h ? `${t} cannot be above ${h}°C` : "";
|
|
71
|
+
}
|
|
72
|
+
function _(e, t) {
|
|
73
|
+
let n = g(e, "Min temperature"), r = g(t, "Max temperature");
|
|
74
|
+
return !n && !r && e !== "" && t !== "" && Number(e) > Number(t) ? {
|
|
75
|
+
min: "Min must be ≤ max",
|
|
76
|
+
max: "Max must be ≥ min"
|
|
77
|
+
} : {
|
|
78
|
+
min: n,
|
|
79
|
+
max: r
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
function v(e) {
|
|
83
|
+
return c(e, "Quantity", {
|
|
84
|
+
required: !0,
|
|
85
|
+
min: 1
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
function y(e, { required: t = !1 } = {}) {
|
|
89
|
+
return s(e, "Price", { required: t });
|
|
90
|
+
}
|
|
91
|
+
function b(e, { required: t = !1, label: n = "Date" } = {}) {
|
|
92
|
+
if (!e) return t ? `${n} is required` : "";
|
|
93
|
+
let r = new Date(e);
|
|
94
|
+
return Number.isNaN(r.getTime()) ? `${n} is not a valid date` : r.getTime() < Date.now() - 1440 * 60 * 1e3 ? `${n} cannot be in the past` : "";
|
|
95
|
+
}
|
|
96
|
+
function x(e, { required: t = !1, label: n = "Date" } = {}) {
|
|
97
|
+
if (!e) return t ? `${n} is required` : "";
|
|
98
|
+
let r = new Date(e);
|
|
99
|
+
if (Number.isNaN(r.getTime())) return `${n} is not a valid date`;
|
|
100
|
+
let i = /* @__PURE__ */ new Date();
|
|
101
|
+
return i.setHours(23, 59, 59, 999), r.getTime() > i.getTime() ? `${n} cannot be in the future` : "";
|
|
102
|
+
}
|
|
103
|
+
function S(e) {
|
|
104
|
+
return Object.values(e || {}).every((e) => !e);
|
|
105
|
+
}
|
|
106
|
+
//#endregion
|
|
107
|
+
export { b as a, d as c, y as d, v as f, l as g, _ as h, a as i, x as l, r as m, i as n, c as o, f as p, u as r, p as s, S as t, o as u };
|
|
108
|
+
|
|
109
|
+
//# sourceMappingURL=validation-Ba7puFIO.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation-Ba7puFIO.js","names":[],"sources":["../src/utils/validation.js"],"sourcesContent":["// Shared field-level validators. Each returns an empty string when the value\n// is valid, otherwise a short human-readable error message. The UI binds these\n// to MUI TextField `error` + `helperText` props so errors surface in red\n// next to the field — the same pattern used by the email field on the Brands\n// dialog.\n\nexport const EMAIL_REGEX = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/;\nexport const CODE_REGEX = /^[A-Z0-9_]+$/;\n\nfunction asNumber(value) {\n if (value === '' || value === null || value === undefined) return NaN;\n const n = Number(value);\n return Number.isNaN(n) ? NaN : n;\n}\n\n// -------- Generic validators --------\nexport function validateRequired(value, label = 'This field') {\n if (value === null || value === undefined) return `${label} is required`;\n if (typeof value === 'string' && !value.trim()) return `${label} is required`;\n return '';\n}\n\nexport function validateMaxLength(value, max, label = 'Value') {\n if (!value) return '';\n return value.length > max ? `${label} must be ${max} characters or fewer` : '';\n}\n\nexport function validateCode(value, { required = false } = {}) {\n if (!value || !value.trim()) {\n return required ? 'Code is required' : '';\n }\n return CODE_REGEX.test(value.trim())\n ? ''\n : 'Code must use uppercase letters, digits, and underscores only';\n}\n\nexport function validateEmail(value, { required = false } = {}) {\n if (!value || !value.trim()) {\n return required ? 'Email is required' : '';\n }\n return EMAIL_REGEX.test(value.trim()) ? '' : 'Enter a valid email address';\n}\n\nexport function validatePhone(value, { required = false } = {}) {\n if (!value || !value.trim()) {\n return required ? 'Contact number is required' : '';\n }\n // Allow digits, spaces, dashes, parentheses, plus sign; 7–20 chars after\n // stripping separators.\n const digits = value.replace(/[^0-9]/g, '');\n if (digits.length < 7 || digits.length > 15) {\n return 'Contact number must contain 7–15 digits';\n }\n if (!/^[0-9+()\\-\\s]+$/.test(value.trim())) {\n return 'Only digits, spaces, +, -, (, ) are allowed';\n }\n return '';\n}\n\n// -------- Numeric validators --------\nexport function validatePositiveNumber(value, label = 'Value', { required = false } = {}) {\n if (value === '' || value === null || value === undefined) {\n return required ? `${label} is required` : '';\n }\n const n = asNumber(value);\n if (Number.isNaN(n)) return `${label} must be a number`;\n if (n <= 0) return `${label} must be greater than 0`;\n return '';\n}\n\nexport function validateNonNegativeNumber(value, label = 'Value', { required = false } = {}) {\n if (value === '' || value === null || value === undefined) {\n return required ? `${label} is required` : '';\n }\n const n = asNumber(value);\n if (Number.isNaN(n)) return `${label} must be a number`;\n if (n < 0) return `${label} cannot be negative`;\n return '';\n}\n\nexport function validateInteger(value, label = 'Value', { required = false, min, max } = {}) {\n if (value === '' || value === null || value === undefined) {\n return required ? `${label} is required` : '';\n }\n const n = asNumber(value);\n if (Number.isNaN(n) || !Number.isInteger(n)) return `${label} must be a whole number`;\n if (min != null && n < min) return `${label} must be at least ${min}`;\n if (max != null && n > max) return `${label} must be at most ${max}`;\n return '';\n}\n\n// -------- Vaccine-specific --------\n// Real-world plausible ranges to catch typos at the field level.\nexport function validateVialVolume(value) {\n const base = validatePositiveNumber(value, 'Vial volume', { required: true });\n if (base) return base;\n const n = Number(value);\n if (n > 100) return 'Vial volume looks too large (>100 ml). Please double-check.';\n if (n < 0.05) return 'Vial volume looks too small (<0.05 ml). Please double-check.';\n return '';\n}\n\nexport function validateDose(value, label = 'Dose', vialVolume) {\n // Dose is optional — leaving it blank means \"not applicable\" for that audience.\n if (value === '' || value === null || value === undefined) return '';\n const base = validatePositiveNumber(value, label);\n if (base) return base;\n const n = Number(value);\n if (n > 10) return `${label} looks too large (>10 ml). Please double-check.`;\n if (vialVolume && n > Number(vialVolume)) {\n return `${label} cannot exceed vial volume (${vialVolume} ml)`;\n }\n return '';\n}\n\nexport function validateOpenVialValidity(value) {\n const base = validateInteger(value, 'Open vial validity', { required: true, min: 0, max: 720 });\n return base;\n}\n\nexport function validateReconstitutedValidity(value, requiresReconstitution) {\n if (!requiresReconstitution) return '';\n return validateInteger(value, 'Reconstituted validity', { required: true, min: 1, max: 720 });\n}\n\nexport function validateMaxConcurrentVials(value) {\n return validateInteger(value, 'Max concurrent open vials', { required: true, min: 1, max: 20 });\n}\n\n// Plausible cold-chain band for any vaccine / pharmaceutical: ultra-low\n// freezer down to ambient max. Anything outside is almost certainly a typo.\nconst TEMP_ABSOLUTE_MIN = -90;\nconst TEMP_ABSOLUTE_MAX = 30;\n\nfunction validateSingleTemp(value, label) {\n if (value === '' || value === null || value === undefined) return '';\n const n = Number(value);\n if (Number.isNaN(n)) return `${label} must be a number`;\n if (n < TEMP_ABSOLUTE_MIN) return `${label} cannot be below ${TEMP_ABSOLUTE_MIN}°C`;\n if (n > TEMP_ABSOLUTE_MAX) return `${label} cannot be above ${TEMP_ABSOLUTE_MAX}°C`;\n return '';\n}\n\nexport function validateTempRange(min, max) {\n const errMin = validateSingleTemp(min, 'Min temperature');\n const errMax = validateSingleTemp(max, 'Max temperature');\n if (!errMin && !errMax && min !== '' && max !== '' && Number(min) > Number(max)) {\n return { min: 'Min must be ≤ max', max: 'Max must be ≥ min' };\n }\n return { min: errMin, max: errMax };\n}\n\n// -------- Inventory --------\nexport function validateQuantity(value) {\n return validateInteger(value, 'Quantity', { required: true, min: 1 });\n}\n\nexport function validatePrice(value, { required = false } = {}) {\n return validateNonNegativeNumber(value, 'Price', { required });\n}\n\n// -------- Dates --------\nexport function validateFutureDate(value, { required = false, label = 'Date' } = {}) {\n if (!value) return required ? `${label} is required` : '';\n const d = new Date(value);\n if (Number.isNaN(d.getTime())) return `${label} is not a valid date`;\n if (d.getTime() < Date.now() - 24 * 60 * 60 * 1000) return `${label} cannot be in the past`;\n return '';\n}\n\nexport function validatePastOrTodayDate(value, { required = false, label = 'Date' } = {}) {\n if (!value) return required ? `${label} is required` : '';\n const d = new Date(value);\n if (Number.isNaN(d.getTime())) return `${label} is not a valid date`;\n const eod = new Date();\n eod.setHours(23, 59, 59, 999);\n if (d.getTime() > eod.getTime()) return `${label} cannot be in the future`;\n return '';\n}\n\n// True if every entry of the object is an empty string (= no errors).\nexport function isClean(errors) {\n return Object.values(errors || {}).every((v) => !v);\n}\n"],"mappings":";AAMA,IAAa,IAAc,8BACd,IAAa;AAE1B,SAAS,EAAS,GAAO;CACvB,IAAI,MAAU,MAAM,KAAU,MAA6B,OAAO;CAClE,IAAM,IAAI,OAAO,CAAK;CACtB,OAAO,OAAO,MAAM,CAAC,IAAI,MAAM;AACjC;AAGA,SAAgB,EAAiB,GAAO,IAAQ,cAAc;CAG5D,OAFI,KAAU,QACV,OAAO,KAAU,YAAY,CAAC,EAAM,KAAK,IAAU,GAAG,EAAM,gBACzD;AACT;AAOA,SAAgB,EAAa,GAAO,EAAE,cAAW,OAAU,CAAC,GAAG;CAI7D,OAHI,CAAC,KAAS,CAAC,EAAM,KAAK,IACjB,IAAW,qBAAqB,KAElC,EAAW,KAAK,EAAM,KAAK,CAAC,IAC/B,KACA;AACN;AAEA,SAAgB,EAAc,GAAO,EAAE,cAAW,OAAU,CAAC,GAAG;CAI9D,OAHI,CAAC,KAAS,CAAC,EAAM,KAAK,IACjB,IAAW,sBAAsB,KAEnC,EAAY,KAAK,EAAM,KAAK,CAAC,IAAI,KAAK;AAC/C;AAmBA,SAAgB,EAAuB,GAAO,IAAQ,SAAS,EAAE,cAAW,OAAU,CAAC,GAAG;CACxF,IAAI,MAAU,MAAM,KAAU,MAC5B,OAAO,IAAW,GAAG,EAAM,gBAAgB;CAE7C,IAAM,IAAI,EAAS,CAAK;CAGxB,OAFI,OAAO,MAAM,CAAC,IAAU,GAAG,EAAM,qBACjC,KAAK,IAAU,GAAG,EAAM,2BACrB;AACT;AAEA,SA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O,MAAM,EAAE,QAAQ,CAAC,IAAU,GAAG,EAAM,wBAC3C,EAAE,QAAQ,IAAI,KAAK,IAAI,IAAI,OAAU,KAAK,MAAa,GAAG,EAAM,0BAC7D;AACT;AAEA,SAAgB,EAAwB,GAAO,EAAE,cAAW,IAAO,WAAQ,WAAW,CAAC,GAAG;CACxF,IAAI,CAAC,GAAO,OAAO,IAAW,GAAG,EAAM,gBAAgB;CACvD,IAAM,IAAI,IAAI,KAAK,CAAK;CACxB,IAAI,OAAO,MAAM,EAAE,QAAQ,CAAC,GAAG,OAAO,GAAG,EAAM;CAC/C,IAAM,oBAAM,IAAI,KAAK;CAGrB,OAFA,EAAI,SAAS,IAAI,IAAI,IAAI,GAAG,GACxB,EAAE,QAAQ,IAAI,EAAI,QAAQ,IAAU,GAAG,EAAM,4BAC1C;AACT;AAGA,SAAgB,EAAQ,GAAQ;CAC9B,OAAO,OAAO,OAAO,KAAU,CAAC,CAAC,EAAE,OAAO,MAAM,CAAC,CAAC;AACpD"}
|
package/package.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@argusoft/medplat-product-management",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"description": "MEDplat Product Management",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "dist/index.js",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": "./dist/index.js",
|
|
10
|
+
"./dist/medplat-product-management.css": "./dist/medplat-product-management.css"
|
|
11
|
+
},
|
|
12
|
+
"files": [
|
|
13
|
+
"dist"
|
|
14
|
+
],
|
|
15
|
+
"scripts": {
|
|
16
|
+
"build": "vite build"
|
|
17
|
+
},
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"uuid": "^9.0.1",
|
|
20
|
+
"vite": "^8.0.16",
|
|
21
|
+
"vite-plugin-lib-inject-css": "^2.2.2"
|
|
22
|
+
},
|
|
23
|
+
"peerDependencies": {
|
|
24
|
+
"@emotion/react": "^11",
|
|
25
|
+
"@mui/icons-material": "^6",
|
|
26
|
+
"@mui/material": "^6",
|
|
27
|
+
"@mui/system": "^6",
|
|
28
|
+
"@reduxjs/toolkit": "^2",
|
|
29
|
+
"react": "^18",
|
|
30
|
+
"react-dom": "^18",
|
|
31
|
+
"react-redux": "^9",
|
|
32
|
+
"react-router": "^6",
|
|
33
|
+
"react-router-dom": "^6",
|
|
34
|
+
"redux": "^5"
|
|
35
|
+
}
|
|
36
|
+
}
|