From 45ab4747fa87431682f63216ddcd4a318e9413d2 Mon Sep 17 00:00:00 2001 From: manmeetnagii Date: Thu, 12 Dec 2024 14:00:47 +0530 Subject: [PATCH 1/9] Enhancement: Update the button layout in Assets Page --- src/components/Assets/AssetsList.tsx | 226 +++++++++++++++------------ 1 file changed, 130 insertions(+), 96 deletions(-) diff --git a/src/components/Assets/AssetsList.tsx b/src/components/Assets/AssetsList.tsx index 685d7dfa460..602a2a84105 100644 --- a/src/components/Assets/AssetsList.tsx +++ b/src/components/Assets/AssetsList.tsx @@ -17,7 +17,6 @@ import Loading from "@/components/Common/Loading"; import Page from "@/components/Common/Page"; import FacilitiesSelectDialogue from "@/components/ExternalResult/FacilitiesSelectDialogue"; import { FacilityModel } from "@/components/Facility/models"; -import SearchInput from "@/components/Form/SearchInput"; import useFilters from "@/hooks/useFilters"; import { useIsAuthorized } from "@/hooks/useIsAuthorized"; @@ -29,6 +28,8 @@ import routes from "@/Utils/request/api"; import request from "@/Utils/request/request"; import useQuery from "@/Utils/request/useQuery"; +import SearchByMultipleFields from "../Common/SearchByMultipleFields"; + const AssetsList = () => { const { t } = useTranslation(); const { @@ -38,9 +39,10 @@ const AssetsList = () => { FilterBadges, advancedFilter, resultsPerPage, + clearSearch, } = useFilters({ limit: 18, - cacheBlacklist: ["search"], + cacheBlacklist: ["name", "qr_code_id", "serial_number"], }); const [assets, setAssets] = useState([{} as AssetData]); const [isLoading, setIsLoading] = useState(false); @@ -56,6 +58,9 @@ const AssetsList = () => { const params = { limit: resultsPerPage, page: qParams.page, + qr_code_id: qParams.qr_code_id || undefined, + name: qParams.name || undefined, + serial_number: qParams.serial_number || undefined, offset: (qParams.page ? qParams.page - 1 : 0) * resultsPerPage, search_text: qParams.search || "", facility: qParams.facility || "", @@ -173,6 +178,33 @@ const AssetsList = () => { AuthorizeFor(["DistrictAdmin", "StateAdmin"]), ); + const searchOptions = [ + { + key: "name", + label: "Name", + type: "text" as const, + placeholder: "Search by Name", + value: qParams.name || undefined, + shortcutKey: "n", + }, + { + key: "serial_number", + label: "Serial Number", + type: "text" as const, + placeholder: "Search by Serial Number", + value: qParams.serial_number || undefined, + shortcutKey: "p", + }, + { + key: "asset_qr_id", + label: "QR Code ID", + type: "text" as const, + placeholder: "Search by QR Code ID", + value: qParams.qr_code_id || undefined, + shortcutKey: "u", + }, + ]; + if (isScannerActive) return (
@@ -308,102 +340,11 @@ const AssetsList = () => { breadcrumbs={false} hideBack options={ - <> - {authorizedForImportExport && ( -
- - ), - onClick: () => setImportAssetModalOpen(true), - }, - }, - { - label: "Export Assets (JSON)", - action: async () => { - const { data } = await request(routes.listAssets, { - query: { ...qParams, json: true, limit: totalCount }, - }); - return data ?? null; - }, - type: "json", - filePrefix: `assets_${facility?.name ?? "all"}`, - options: { - icon: , - disabled: totalCount === 0 || !authorizedForImportExport, - id: "export-json-option", - }, - }, - { - label: "Export Assets (CSV)", - action: async () => { - const { data } = await request(routes.listAssets, { - query: { ...qParams, csv: true, limit: totalCount }, - }); - return data ?? null; - }, - type: "csv", - filePrefix: `assets_${facility?.name ?? "all"}`, - options: { - icon: , - disabled: totalCount === 0 || !authorizedForImportExport, - id: "export-csv-option", - }, - }, - ]} - /> -
- )} - - } - > -
- -
- updateQuery({ [e.name]: e.value })} - placeholder="Search by name/serial no./QR code ID" - /> -
-
-
-
- advancedFilter.setShow(true)} - /> -
- setIsScannerActive(true)} - > - Scan Asset - QR - -
-
+
+
{ if (qParams.facility) { navigate(`/facility/${qParams.facility}/assets/new`); @@ -416,7 +357,100 @@ const AssetsList = () => { {t("create_asset")}
+
+
+ advancedFilter.setShow(true)} + /> +
+ setIsScannerActive(true)} + > + Scan Asset + QR + + + {authorizedForImportExport && ( +
+ + ), + onClick: () => setImportAssetModalOpen(true), + }, + }, + { + label: "Export Assets (JSON)", + action: async () => { + const { data } = await request(routes.listAssets, { + query: { ...qParams, json: true, limit: totalCount }, + }); + return data ?? null; + }, + type: "json", + filePrefix: `assets_${facility?.name ?? "all"}`, + options: { + icon: , + disabled: + totalCount === 0 || !authorizedForImportExport, + id: "export-json-option", + }, + }, + { + label: "Export Assets (CSV)", + action: async () => { + const { data } = await request(routes.listAssets, { + query: { ...qParams, csv: true, limit: totalCount }, + }); + return data ?? null; + }, + type: "csv", + filePrefix: `assets_${facility?.name ?? "all"}`, + options: { + icon: , + disabled: + totalCount === 0 || !authorizedForImportExport, + id: "export-csv-option", + }, + }, + ]} + /> +
+ )} +
+ } + > +
+ + + updateQuery({ search: value })} + clearSearch={clearSearch} + className="w-full" + />
{isLoading ? ( From 6a3670d978122e6e7f4aaea43df9c74ce9c8a216 Mon Sep 17 00:00:00 2001 From: manmeetnagii Date: Thu, 12 Dec 2024 19:22:01 +0530 Subject: [PATCH 2/9] Refactored: Updated ButtonV2 to use ShadCN button --- src/CAREUI/interactive/FiltersSlideover.tsx | 12 ++++++----- src/components/Assets/AssetsList.tsx | 24 ++++++++++++++------- src/components/Common/Export.tsx | 18 +++++++--------- 3 files changed, 31 insertions(+), 23 deletions(-) diff --git a/src/CAREUI/interactive/FiltersSlideover.tsx b/src/CAREUI/interactive/FiltersSlideover.tsx index 959fd0621e8..c6ee12e6df3 100644 --- a/src/CAREUI/interactive/FiltersSlideover.tsx +++ b/src/CAREUI/interactive/FiltersSlideover.tsx @@ -4,6 +4,8 @@ import { useTranslation } from "react-i18next"; import CareIcon from "@/CAREUI/icons/CareIcon"; import SlideOver from "@/CAREUI/interactive/SlideOver"; +import { Button } from "@/components/ui/button"; + import ButtonV2 from "@/components/Common/ButtonV2"; import useFilters from "@/hooks/useFilters"; @@ -58,15 +60,15 @@ export default function FiltersSlideover({ export const AdvancedFilterButton = ({ onClick }: { onClick: () => void }) => { const { t } = useTranslation(); return ( - {t("advanced_filters")} - + ); }; diff --git a/src/components/Assets/AssetsList.tsx b/src/components/Assets/AssetsList.tsx index ba70379f855..5e39f3719f3 100644 --- a/src/components/Assets/AssetsList.tsx +++ b/src/components/Assets/AssetsList.tsx @@ -11,13 +11,13 @@ import { AdvancedFilterButton } from "@/CAREUI/interactive/FiltersSlideover"; import AssetFilter from "@/components/Assets/AssetFilter"; import AssetImportModal from "@/components/Assets/AssetImportModal"; import { AssetData, assetClassProps } from "@/components/Assets/AssetTypes"; -import ButtonV2 from "@/components/Common/ButtonV2"; import ExportMenu from "@/components/Common/Export"; import Loading from "@/components/Common/Loading"; import Page from "@/components/Common/Page"; import FacilitiesSelectDialogue from "@/components/ExternalResult/FacilitiesSelectDialogue"; import { FacilityModel } from "@/components/Facility/models"; +import useAuthUser from "@/hooks/useAuthUser"; import useFilters from "@/hooks/useFilters"; import { useIsAuthorized } from "@/hooks/useIsAuthorized"; @@ -29,6 +29,7 @@ import request from "@/Utils/request/request"; import useTanStackQueryInstead from "@/Utils/request/useQuery"; import SearchByMultipleFields from "../Common/SearchByMultipleFields"; +import { Button } from "../ui/button"; const AssetsList = () => { const { t } = useTranslation(); @@ -44,6 +45,7 @@ const AssetsList = () => { limit: 18, cacheBlacklist: ["name", "qr_code_id", "serial_number"], }); + const authUser = useAuthUser(); const [assets, setAssets] = useState([{} as AssetData]); const [isLoading, setIsLoading] = useState(false); const [isScannerActive, setIsScannerActive] = useState(false); @@ -119,6 +121,8 @@ const AssetsList = () => { }, ); + const isDisabled = !NonReadOnlyUsers(authUser.user_type); + function isValidURL(url: string) { try { new URL(url); @@ -351,9 +355,11 @@ const AssetsList = () => { options={
- { if (qParams.facility) { navigate(`/facility/${qParams.facility}/assets/new`); @@ -364,7 +370,7 @@ const AssetsList = () => { > {t("create_asset")} - +
@@ -372,13 +378,15 @@ const AssetsList = () => { onClick={() => advancedFilter.setShow(true)} />
- setIsScannerActive(true)} + className="gap-2" > Scan Asset QR - + {authorizedForImportExport && (
{ let action = item.action; @@ -63,13 +65,11 @@ export const ExportMenu = ({ exportFile(action, item.filePrefix, item.type, item.parse); } }} - border - ghost className="py-2.5" > {isExporting ? "Exporting..." : label} - + ); } @@ -79,7 +79,7 @@ export const ExportMenu = ({ disabled={isExporting || disabled} title={isExporting ? "Exporting..." : label} icon={} - className="tooltip border-primary-500 bg-white text-primary-500 hover:bg-primary-100 enabled:border" + className="tooltip border-primary-700 bg-white text-primary-700 hover:bg-primary-100 enabled:border" > {exportItems.map((item) => ( - { let action = props.action; @@ -132,8 +132,6 @@ export const ExportButton = ({ }} className="tooltip mx-2 p-4 text-lg text-secondary-800 disabled:bg-transparent disabled:text-secondary-500" variant="secondary" - ghost - circle > {isExporting ? ( @@ -143,7 +141,7 @@ export const ExportButton = ({ {props.tooltip || "Export"} - + ); }; From ca130ab1815c2758c7898bc27b38af1e95b069b4 Mon Sep 17 00:00:00 2001 From: manmeetnagii Date: Thu, 12 Dec 2024 19:35:58 +0530 Subject: [PATCH 3/9] fixes mobile view --- src/components/Assets/AssetsList.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Assets/AssetsList.tsx b/src/components/Assets/AssetsList.tsx index 5e39f3719f3..0a1d30155f4 100644 --- a/src/components/Assets/AssetsList.tsx +++ b/src/components/Assets/AssetsList.tsx @@ -359,7 +359,7 @@ const AssetsList = () => { disabled={isDisabled} variant={"primary"} size={"lg"} - className="gap-2" + className="gap-2 w-full" onClick={() => { if (qParams.facility) { navigate(`/facility/${qParams.facility}/assets/new`); @@ -382,7 +382,7 @@ const AssetsList = () => { variant={"primary"} size={"lg"} onClick={() => setIsScannerActive(true)} - className="gap-2" + className="gap-2 w-full" > Scan Asset QR From bac9003d774b7e76f809af12a7cf858821980cf4 Mon Sep 17 00:00:00 2001 From: manmeetnagii Date: Fri, 13 Dec 2024 21:49:39 +0530 Subject: [PATCH 4/9] Checked cypress tests --- src/components/Assets/AssetsList.tsx | 105 ++++++++++++++------------- 1 file changed, 54 insertions(+), 51 deletions(-) diff --git a/src/components/Assets/AssetsList.tsx b/src/components/Assets/AssetsList.tsx index 0a1d30155f4..72611d172c7 100644 --- a/src/components/Assets/AssetsList.tsx +++ b/src/components/Assets/AssetsList.tsx @@ -43,9 +43,8 @@ const AssetsList = () => { clearSearch, } = useFilters({ limit: 18, - cacheBlacklist: ["name", "qr_code_id", "serial_number"], + cacheBlacklist: ["name", "serial_number", "qr_code_id"], }); - const authUser = useAuthUser(); const [assets, setAssets] = useState([{} as AssetData]); const [isLoading, setIsLoading] = useState(false); const [isScannerActive, setIsScannerActive] = useState(false); @@ -60,9 +59,9 @@ const AssetsList = () => { const params = { limit: resultsPerPage, page: qParams.page, - qr_code_id: qParams.qr_code_id || undefined, - name: qParams.name || undefined, - serial_number: qParams.serial_number || undefined, + name: qParams.name || "", + serial_number: qParams.serial_number || "", + qr_code_id: qParams.qr_code_id || "", offset: (qParams.page ? qParams.page - 1 : 0) * resultsPerPage, search_text: qParams.search || "", facility: qParams.facility || "", @@ -121,6 +120,7 @@ const AssetsList = () => { }, ); + const authUser = useAuthUser(); const isDisabled = !NonReadOnlyUsers(authUser.user_type); function isValidURL(url: string) { @@ -191,33 +191,6 @@ const AssetsList = () => { AuthorizeFor(["DistrictAdmin", "StateAdmin"]), ); - const searchOptions = [ - { - key: "name", - label: "Name", - type: "text" as const, - placeholder: "Search by Name", - value: qParams.name || undefined, - shortcutKey: "n", - }, - { - key: "serial_number", - label: "Serial Number", - type: "text" as const, - placeholder: "Search by Serial Number", - value: qParams.serial_number || undefined, - shortcutKey: "p", - }, - { - key: "asset_qr_id", - label: "QR Code ID", - type: "text" as const, - placeholder: "Search by QR Code ID", - value: qParams.qr_code_id || undefined, - shortcutKey: "u", - }, - ]; - if (isScannerActive) return (
@@ -347,19 +320,50 @@ const AssetsList = () => { ); } + const searchOptions = [ + { + key: "name", + label: "Name", + type: "text" as const, + placeholder: "Search by Name", + value: qParams.name || "", + shortcutKey: "n", + }, + { + key: "serial_number", + label: "Serial No.", + type: "text" as const, + placeholder: "Search by Serial No.", + value: qParams.serial_number || "", + shortcutKey: "u", + }, + { + key: "asset_qr_id", + label: "QR Code ID", + type: "text" as const, + placeholder: "Search by QR Code ID", + value: qParams.qr_code_id || "", + shortcutKey: "p", + }, + ]; + return ( -
+
-
- advancedFilter.setShow(true)} - /> -
+ advancedFilter.setShow(true)} + /> + - {authorizedForImportExport && ( -
+
+ {authorizedForImportExport && ( { icon: ( ), onClick: () => setImportAssetModalOpen(true), @@ -446,8 +449,8 @@ const AssetsList = () => { }, ]} /> -
- )} + )} +
} @@ -462,7 +465,7 @@ const AssetsList = () => { /> updateQuery({ search: value })} clearSearch={clearSearch} From 1b02dc22cbdd386a9a2cc2a90e5d3994011808d6 Mon Sep 17 00:00:00 2001 From: manmeetnagii Date: Sat, 14 Dec 2024 13:57:43 +0530 Subject: [PATCH 5/9] changed dropdown to Shadcn dropdown --- src/components/Common/Export.tsx | 78 ++++++++++++++++++++------------ 1 file changed, 48 insertions(+), 30 deletions(-) diff --git a/src/components/Common/Export.tsx b/src/components/Common/Export.tsx index e8a61dde73d..18e7328af7e 100644 --- a/src/components/Common/Export.tsx +++ b/src/components/Common/Export.tsx @@ -1,9 +1,8 @@ +import { cn } from "@/lib/utils"; + import CareIcon from "@/CAREUI/icons/CareIcon"; -import DropdownMenu, { - DropdownItem, - DropdownItemProps, -} from "@/components/Common/Menu"; +import { DropdownItemProps } from "@/components/Common/Menu"; import useExport from "@/hooks/useExport"; @@ -11,6 +10,12 @@ import request from "@/Utils/request/request"; import { Route } from "@/Utils/request/types"; import { Button } from "../ui/button"; +import { + DropdownMenu, + DropdownMenuContent, + DropdownMenuItem, + DropdownMenuTrigger, +} from "../ui/dropdown-menu"; interface ExportItem { options?: DropdownItemProps; @@ -74,33 +79,46 @@ export const ExportMenu = ({ } return ( -
- } - className="tooltip border-primary-700 bg-white text-primary-700 hover:bg-primary-100 enabled:border" - > - {exportItems.map((item) => ( - { - let action = item.action; - if (item.route) { - action = async () => { - const { data } = await request(item.route!); - return data ?? null; - }; - } - if (action) { - exportFile(action, item.filePrefix, item.type, item.parse); - } - }} - {...item.options} +
+ + + + + + {exportItems.map((item) => ( +
{ + let action = item.action; + if (item.route) { + action = async () => { + const { data } = await request(item.route!); + return data ?? null; + }; + } + if (action) { + exportFile(action, item.filePrefix, item.type, item.parse); + } + }} + {...item.options} + > + + {item.label} + +
+ ))} +
); From e011a76693325254d886ea3668cbe9ebc7cf7b0d Mon Sep 17 00:00:00 2001 From: manmeetnagii Date: Sat, 14 Dec 2024 16:02:39 +0530 Subject: [PATCH 6/9] changed dropdown to Shadcn dropdown --- src/components/Assets/AssetsList.tsx | 2 +- src/components/Common/Export.tsx | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/components/Assets/AssetsList.tsx b/src/components/Assets/AssetsList.tsx index 72611d172c7..edb9de0458d 100644 --- a/src/components/Assets/AssetsList.tsx +++ b/src/components/Assets/AssetsList.tsx @@ -407,7 +407,7 @@ const AssetsList = () => { icon: ( ), onClick: () => setImportAssetModalOpen(true), diff --git a/src/components/Common/Export.tsx b/src/components/Common/Export.tsx index 18e7328af7e..2fe4e342bd7 100644 --- a/src/components/Common/Export.tsx +++ b/src/components/Common/Export.tsx @@ -88,10 +88,7 @@ export const ExportMenu = ({ className="w-full gap-2 cursor-pointer" disabled={isExporting || disabled} > - + {isExporting ? "Exporting..." : label} @@ -113,7 +110,8 @@ export const ExportMenu = ({ }} {...item.options} > - + + {item.options?.icon} {item.label}
From c7a2a4d4ebb714147e54d8bdca097e0d30365bad Mon Sep 17 00:00:00 2001 From: manmeetnagii Date: Sun, 15 Dec 2024 12:58:54 +0530 Subject: [PATCH 7/9] changed dropdown to Shadcn dropdown --- src/components/Common/Export.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/Common/Export.tsx b/src/components/Common/Export.tsx index 2fe4e342bd7..c27fb2d58a0 100644 --- a/src/components/Common/Export.tsx +++ b/src/components/Common/Export.tsx @@ -92,7 +92,9 @@ export const ExportMenu = ({ {isExporting ? "Exporting..." : label} - + {exportItems.map((item) => (
Date: Sun, 15 Dec 2024 22:15:09 +0530 Subject: [PATCH 8/9] changed dropdown to Shadcn dropdown --- src/components/Common/Export.tsx | 82 +++-- ....timestamp-1734272200960-c34409c35bb48.mjs | 282 ++++++++++++++++++ 2 files changed, 333 insertions(+), 31 deletions(-) create mode 100644 vite.config.mts.timestamp-1734272200960-c34409c35bb48.mjs diff --git a/src/components/Common/Export.tsx b/src/components/Common/Export.tsx index c27fb2d58a0..42efe38fd27 100644 --- a/src/components/Common/Export.tsx +++ b/src/components/Common/Export.tsx @@ -5,9 +5,12 @@ import CareIcon from "@/CAREUI/icons/CareIcon"; import { DropdownItemProps } from "@/components/Common/Menu"; import useExport from "@/hooks/useExport"; +import { useIsAuthorized } from "@/hooks/useIsAuthorized"; +import { Anyone, AuthorizedForCB } from "@/Utils/AuthorizeFor"; import request from "@/Utils/request/request"; import { Route } from "@/Utils/request/types"; +import { classNames } from "@/Utils/utils"; import { Button } from "../ui/button"; import { @@ -28,9 +31,11 @@ interface ExportItem { } interface ExportMenuProps { + variant?: string; disabled?: boolean | undefined; label?: string; exportItems: ExportItem[]; + authorizeFor?: AuthorizedForCB | undefined; } interface ExportButtonProps { @@ -48,8 +53,10 @@ export const ExportMenu = ({ label = "Export", disabled, exportItems, + authorizeFor = Anyone, }: ExportMenuProps) => { const { isExporting, exportFile } = useExport(); + const isAuthorized = useIsAuthorized(authorizeFor); if (exportItems.length === 1) { const item = exportItems[0]; @@ -79,46 +86,59 @@ export const ExportMenu = ({ } return ( -
+
- + - - {exportItems.map((item) => ( -
{ - let action = item.action; - if (item.route) { - action = async () => { - const { data } = await request(item.route!); - return data ?? null; - }; - } - if (action) { - exportFile(action, item.filePrefix, item.type, item.parse); - } - }} - {...item.options} - > - - {item.options?.icon} - {item.label} - -
- ))} -
+ {label !== "Importing..." && ( + + {exportItems.map((item) => ( +
+ +
{ + let action = item.action; + if (item.route) { + action = async () => { + const { data } = await request(item.route!); + return data ?? null; + }; + } + if (action) { + exportFile( + action, + item.filePrefix, + item.type, + item.parse, + ); + } + }} + > + {item.options?.icon} + {item.label} +
+
+
+ ))} +
+ )}
); diff --git a/vite.config.mts.timestamp-1734272200960-c34409c35bb48.mjs b/vite.config.mts.timestamp-1734272200960-c34409c35bb48.mjs new file mode 100644 index 00000000000..7ab7e31514f --- /dev/null +++ b/vite.config.mts.timestamp-1734272200960-c34409c35bb48.mjs @@ -0,0 +1,282 @@ +// vite.config.mts +import { ValidateEnv } from "file:///D:/dev/New%20folder/care_fe/node_modules/@julr/vite-plugin-validate-env/dist/index.mjs"; +import react from "file:///D:/dev/New%20folder/care_fe/node_modules/@vitejs/plugin-react-swc/index.mjs"; +import DOMPurify from "file:///D:/dev/New%20folder/care_fe/node_modules/dompurify/dist/purify.cjs.js"; +import fs2 from "fs"; +import { JSDOM } from "file:///D:/dev/New%20folder/care_fe/node_modules/jsdom/lib/api.js"; +import { marked } from "file:///D:/dev/New%20folder/care_fe/node_modules/marked/lib/marked.esm.js"; +import { createRequire } from "node:module"; +import path2 from "path"; +import { defineConfig, loadEnv } from "file:///D:/dev/New%20folder/care_fe/node_modules/vite/dist/node/index.js"; +import checker from "file:///D:/dev/New%20folder/care_fe/node_modules/vite-plugin-checker/dist/esm/main.js"; +import { VitePWA } from "file:///D:/dev/New%20folder/care_fe/node_modules/vite-plugin-pwa/dist/index.js"; +import { viteStaticCopy } from "file:///D:/dev/New%20folder/care_fe/node_modules/vite-plugin-static-copy/dist/index.js"; +import { z } from "file:///D:/dev/New%20folder/care_fe/node_modules/zod/lib/index.mjs"; + +// plugins/treeShakeCareIcons.ts +import * as fs from "fs"; +import { globSync } from "file:///D:/dev/New%20folder/care_fe/node_modules/glob/dist/esm/index.js"; +import * as path from "path"; +var __vite_injected_original_dirname = "D:\\dev\\New folder\\care_fe\\plugins"; +function treeShakeCareIcons(options = { iconWhitelist: [] }) { + const rootDir = path.resolve(__vite_injected_original_dirname, ".."); + const lineIconNameRegex = /"l-[a-z]+(?:-[a-z]+)*"/g; + const allUniconPaths = JSON.parse( + fs.readFileSync( + path.resolve(rootDir, "src/CAREUI/icons/UniconPaths.json"), + "utf8" + ) + ); + function extractCareIconNames(file) { + const fileContent = fs.readFileSync(file, "utf8"); + const lineIconNameMatches = fileContent.match(lineIconNameRegex) || []; + const lineIconNames = lineIconNameMatches.map( + (lineIconName) => lineIconName.slice(1, -1) + // remove quotes + ); + return lineIconNames; + } + function getAllUsedIconNames() { + const files = globSync(path.resolve(rootDir, "{apps,src}/**/*.{tsx,res}")); + const usedIconsArray = []; + files.forEach((file) => { + const iconNames = extractCareIconNames(file); + usedIconsArray.push(...iconNames); + }); + return new Set(usedIconsArray); + } + function getTreeShakenUniconPaths() { + const usedIcons = [...getAllUsedIconNames(), ...options.iconWhitelist]; + const treeshakenCareIconPaths = {}; + for (const iconName of usedIcons) { + const path3 = allUniconPaths[iconName]; + if (path3 === void 0) { + throw new Error(`Icon ${iconName} is not found in UniconPaths.json`); + } else { + treeshakenCareIconPaths[iconName] = path3; + } + } + return treeshakenCareIconPaths; + } + return { + name: "tree-shake-care-icons", + transform(_src, id) { + if (process.env.NODE_ENV !== "production") { + return; + } + if (id.endsWith("UniconPaths.json")) { + return { + code: `export default ${JSON.stringify(getTreeShakenUniconPaths())}`, + map: null + }; + } + } + }; +} + +// vite.config.mts +var __vite_injected_original_dirname2 = "D:\\dev\\New folder\\care_fe"; +var __vite_injected_original_import_meta_url = "file:///D:/dev/New%20folder/care_fe/vite.config.mts"; +var pdfWorkerPath = path2.join( + path2.dirname( + createRequire(__vite_injected_original_import_meta_url).resolve("pdfjs-dist/package.json") + ), + "build", + "pdf.worker.min.mjs" +); +function getDescriptionHtml(description) { + const html = marked.parse(description, { + async: false, + gfm: true, + breaks: true + }); + const purify = DOMPurify(new JSDOM("").window); + const sanitizedHtml = purify.sanitize(html); + return JSON.stringify(sanitizedHtml); +} +function getPluginAliases() { + const pluginsDir = path2.resolve(__vite_injected_original_dirname2, "apps"); + if (!fs2.existsSync(pluginsDir)) { + return {}; + } + const pluginFolders = fs2.readdirSync(pluginsDir); + const aliases = {}; + pluginFolders.forEach((pluginFolder) => { + const pluginSrcPath = path2.join(pluginsDir, pluginFolder, "src"); + if (fs2.existsSync(pluginSrcPath)) { + aliases[`@apps/${pluginFolder}`] = pluginSrcPath; + aliases[`@app-manifest/${pluginFolder}`] = path2.join( + pluginSrcPath, + "manifest.ts" + ); + } + }); + return aliases; +} +function getPluginDependencies() { + const pluginsDir = path2.resolve(__vite_injected_original_dirname2, "apps"); + if (!fs2.existsSync(pluginsDir)) { + return []; + } + const pluginFolders = fs2.readdirSync(pluginsDir); + const dependencies = /* @__PURE__ */ new Set(); + pluginFolders.forEach((pluginFolder) => { + const packageJsonPath = path2.join(pluginsDir, pluginFolder, "package.json"); + if (fs2.existsSync(packageJsonPath)) { + const packageJson = JSON.parse(fs2.readFileSync(packageJsonPath, "utf8")); + const pluginDependencies = packageJson.dependencies ? Object.keys(packageJson.dependencies) : []; + pluginDependencies.forEach((dep) => dependencies.add(dep)); + } + }); + return Array.from(dependencies); +} +var vite_config_default = defineConfig(({ mode }) => { + const env = loadEnv(mode, process.cwd(), ""); + const cdnUrls = env.REACT_CDN_URLS || [ + "https://egov-s3-facility-10bedicu.s3.amazonaws.com", + "https://egov-s3-patient-data-10bedicu.s3.amazonaws.com", + "http://localhost:4566" + ].join(" "); + return { + envPrefix: "REACT_", + define: { + __CUSTOM_DESCRIPTION_HTML__: getDescriptionHtml( + env.REACT_CUSTOM_DESCRIPTION || "" + ) + }, + plugins: [ + ValidateEnv({ + validator: "zod", + schema: { + REACT_CARE_API_URL: z.string().url(), + REACT_SENTRY_DSN: z.string().url().optional(), + REACT_SENTRY_ENVIRONMENT: z.string().optional(), + REACT_PLAUSIBLE_SITE_DOMAIN: z.string().regex(/^[a-zA-Z0-9][a-zA-Z0-9-_.]*\.[a-zA-Z]{2,}$/).optional().describe("Domain name without protocol (e.g., sub.domain.com)"), + REACT_PLAUSIBLE_SERVER_URL: z.string().url().optional(), + REACT_CDN_URLS: z.string().optional().transform((val) => val?.split(" ")).pipe(z.array(z.string().url()).optional()).describe("Optional: Space-separated list of CDN URLs") + } + }), + viteStaticCopy({ + targets: [ + { + src: pdfWorkerPath, + dest: "" + } + ] + }), + react(), + checker({ typescript: true }), + treeShakeCareIcons({ + iconWhitelist: ["default"] + }), + VitePWA({ + strategies: "injectManifest", + srcDir: "src", + filename: "service-worker.ts", + injectRegister: "script-defer", + devOptions: { + enabled: true, + type: "module" + }, + injectManifest: { + maximumFileSizeToCacheInBytes: 7e6 + }, + manifest: { + name: "Care", + short_name: "Care", + theme_color: "#0e9f6e", + background_color: "#ffffff", + display: "standalone", + icons: [ + { + src: "images/icons/pwa-64x64.png", + sizes: "64x64", + type: "image/png" + }, + { + src: "images/icons/pwa-192x192.png", + sizes: "192x192", + type: "image/png" + }, + { + src: "images/icons/pwa-512x512.png", + sizes: "512x512", + type: "image/png", + purpose: "any" + }, + { + src: "images/icons/maskable-icon-512x512.png", + sizes: "512x512", + type: "image/png", + purpose: "maskable" + } + ] + } + }) + ], + resolve: { + alias: { + ...getPluginAliases(), + "@": path2.resolve(__vite_injected_original_dirname2, "./src"), + "@careConfig": path2.resolve(__vite_injected_original_dirname2, "./care.config.ts"), + "@core": path2.resolve(__vite_injected_original_dirname2, "src/") + } + }, + optimizeDeps: { + include: getPluginDependencies() + }, + build: { + outDir: "build", + assetsDir: "bundle", + sourcemap: true, + rollupOptions: { + output: { + manualChunks(id, { getModuleInfo }) { + if (id.includes("node_modules")) { + let isStaticallyImportedByEntry2 = function(moduleId, visited = /* @__PURE__ */ new Set()) { + if (visited.has(moduleId)) return false; + visited.add(moduleId); + const modInfo = getModuleInfo(moduleId); + if (!modInfo) return false; + if (modInfo.isEntry) { + return true; + } + for (const importerId of modInfo.importers) { + if (isStaticallyImportedByEntry2(importerId, visited)) { + return true; + } + } + return false; + }; + var isStaticallyImportedByEntry = isStaticallyImportedByEntry2; + const moduleInfo = getModuleInfo(id); + const manualVendorChunks = /tiny-invariant/; + if (manualVendorChunks.test(id) || isStaticallyImportedByEntry2(id)) { + return "vendor"; + } else { + const dynamicImporters = moduleInfo?.dynamicImporters || []; + if (dynamicImporters && dynamicImporters.length > 0) { + const importerChunkName = dynamicImporters[0] ? dynamicImporters[0].split("/").pop() : "vendor".split(".")[0]; + return `chunk-${importerChunkName}`; + } + } + } + } + } + } + }, + server: { + port: 4e3 + }, + preview: { + headers: { + "Content-Security-Policy-Report-Only": `default-src 'self'; script-src 'self' blob: 'nonce-f51b9742' https://plausible.10bedicu.in; style-src 'self' 'unsafe-inline'; connect-src 'self' https://plausible.10bedicu.in; img-src 'self' https://cdn.ohc.network ${cdnUrls}; object-src 'self' ${cdnUrls};` + }, + port: 4e3 + } + }; +}); +export { + vite_config_default as default +}; +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcubXRzIiwgInBsdWdpbnMvdHJlZVNoYWtlQ2FyZUljb25zLnRzIl0sCiAgInNvdXJjZXNDb250ZW50IjogWyJjb25zdCBfX3ZpdGVfaW5qZWN0ZWRfb3JpZ2luYWxfZGlybmFtZSA9IFwiRDpcXFxcZGV2XFxcXE5ldyBmb2xkZXJcXFxcY2FyZV9mZVwiO2NvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9maWxlbmFtZSA9IFwiRDpcXFxcZGV2XFxcXE5ldyBmb2xkZXJcXFxcY2FyZV9mZVxcXFx2aXRlLmNvbmZpZy5tdHNcIjtjb25zdCBfX3ZpdGVfaW5qZWN0ZWRfb3JpZ2luYWxfaW1wb3J0X21ldGFfdXJsID0gXCJmaWxlOi8vL0Q6L2Rldi9OZXclMjBmb2xkZXIvY2FyZV9mZS92aXRlLmNvbmZpZy5tdHNcIjtpbXBvcnQgeyBWYWxpZGF0ZUVudiB9IGZyb20gXCJAanVsci92aXRlLXBsdWdpbi12YWxpZGF0ZS1lbnZcIjtcclxuaW1wb3J0IHJlYWN0IGZyb20gXCJAdml0ZWpzL3BsdWdpbi1yZWFjdC1zd2NcIjtcclxuaW1wb3J0IERPTVB1cmlmeSBmcm9tIF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G4gICAgICApLFxyXG4gICAgfSxcclxuICAgIHBsdWdpbnM6IFtcclxuICAgICAgVmFsaWRhdGVFbnYoe1xyXG4gICAgICAgIHZhbGlkYXRvcjogXCJ6b2RcIixcclxuICAgICAgICBzY2hlbWE6IHtcclxuICAgICAgICAgIFJFQUNUX0NBUkVfQVBJX1VSTDogei5zdHJpbmcoKS51cmwoKSxcclxuXHJcbiAgICAgICAgICBSRUFDVF9TRU5UUllfRFNOOiB6LnN0cmluZygpLnVybCgpLm9wdGlvbmFsKCksXHJcbiAgICAgICAgICBSRUFDVF9TRU5UUllfRU5WSVJPTk1FTlQ6IHouc3RyaW5nKCkub3B0aW9uYWwoKSxcclxuXHJcbiAgICAgICAgICBSRUFDVF9QTEFVU0lCTEVfU0lURV9ET01BSU46IHpcclxuICAgICAgICAgICAgLnN0cmluZygpXHJcbiAgICAgICAgICAgIC5yZWdleCgvXlthLXpBLVowLTldW2EtekEtWjAtOS1fLl0qXFwuW2EtekEtWl17Mix9JC8pXHJcbiAgICAgICAgICAgIC5vcHRpb25hbCgpXHJcbiAgICAgICAgICAgIC5kZXNjcmliZShcIkRvbWFpbiBuYW1lIHdpdGhvdXQgcHJvdG9jb2wgKGUuZy4sIHN1Yi5kb21haW4uY29tKVwiKSxcclxuXHJcbiAgICAgICAgICBSRUFDVF9QTEFVU0lCTEVfU0VSVkVSX1VSTDogei5zdHJpbmcoKS51cmwoKS5vcHRpb25hbCgpLFxyXG4gICAgICAgICAgUkVBQ1RfQ0ROX1VSTFM6IHpcclxuICAgICAgICAgICAgLnN0cmluZygpXHJcbiAgICAgICAgICAgIC5vcHRpb25hbCgpXHJcbiAgICAgICAgICAgIC50cmFuc2Zvcm0oKHZhbCkgPT4gdmFsPy5zcGxpdChcIiBcIikpXHJcbiAgICAgICAgICAgIC5waXBlKHouYXJyYXkoei5zdHJpbmcoKS51cmwoKSkub3B0aW9uYWwoKSlcclxuICAgICAgICAgICAgLmRlc2NyaWJlKFwiT3B0aW9uYWw6IFN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gICAgICB0aGVtZV9jb2xvcjogXCIjMGU5ZjZlXCIsXHJcbiAgICAgICAgICBiYWNrZ3JvdW5kX2NvbG9yOiBcIiNmZmZmZmZcIixcclxuICAgICAgICAgIGRpc3BsYXk6IFwic3RhbmRhbG9uZVwiLFxyXG4gICAgICAgICAgaWNvbnM6IFtcclxuICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgIHNyYzogXCJpbWFnZXMvaWNvbnMvcHdhLTY0eDY0LnBuZ1wiLFxyXG4gICAgICAgICAgICAgIHNpemVzOiBcIjY0eDY0XCIsXHJcbiAgICAgICAgICAgICAgdHlwZTogXCJpbWFnZS9wbmdcIixcclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgIHNyYzogXCJpbWFnZXMvaWNvbnMvcHdhLTE5MngxOTIucG5nXCIsXHJcbiAgICAgICAgICAgICAgc2l6ZXM6IFwiMTkyeDE5MlwiLFxyXG4gICAgICAgICAgICAgIHR5cGU6IFwiaW1hZ2UvcG5nXCIsXHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICBzcmM6IFwiaW1hZ2VzL2ljb25zL3B3YS01MTJ4NTEyLnBuZ1wiLFxyXG4gICAgICAgICAgICAgIHNpemVzOiBcIjUxMng1MTJcIixcclxuICAgICAgICAgICAgICB0eXBlOiBcImltYWdlL3BuZ1wiLFxyXG4gICAgICAgICAgICAgIHB1cnBvc2U6IFwiYW55XCIsXHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICBzcmM6IFwiaW1hZ2VzL2ljb25zL21hc2thYmxlLWljb24tNTEyeDUxMi5wbmdcIixcclxuICAgICAgICAgICAgICBzaXplczogXCI1MTJ4NTEyXCIsXHJcbiAgICAgICAgICAgICAgdHlwZTogXCJpbWFnZS9wbmdcIixcclxuICAgICAgICAgICAgICBwdXJwb3NlOiBcIm1hc2thYmxlXCIsX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pbnRcclxuICAgICAgICAgICAgICBmdW5jdGlvbiBpc1N0YXRpY2FsbHlJbXBvcnRlZEJ5RW50cnkoXHJcbiAgICAgICAgICAgICAgICBtb2R1bGVJZCxcclxuICAgICAgICAgICAgICAgIHZpc2l0ZWQgPSBuZXcgU2V0KCksXHJcbiAgICAgICAgICAgICAgKSB7XHJcbiAgICAgICAgICAgICAgICBpZiAodmlzaXRlZC5oYXMobW9kdWxlSWQpKSByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgICAgICAgICB2aXNpdGVkLmFkZChtb2R1bGVJZCk7XHJcblxyXG4gICAgICAgICAgICAgICAgY29uc3QgbW9kSW5mbyA9IGdldE1vZHVsZUluZm8obW9kdWxlSWQpO1xyXG4gICAgICAgICAgICAgICAgaWYgKCFtb2RJbmZvKSByZXR1cm4gZmFsc2U7XHJcblxyXG4gICAgICAgICAgICAgICAgLy8gQ2hlY2sgaWYgdGhlIG1vZHVsZSBpcyBhbiBlbnRyeSBwb2ludFxyXG4gICAgICAgICAgICAgICAgaWYgKG1vZEluZm8uaXNFbnRyeSkge1xyXG4gICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcclxuICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICAvLyBDaGVjayBhbGwgc3RhdGljIGltcG9ydGVyc1xyXG4gICAgICAgICAgICAgICAgZm9yIChjb25zdCBpbXBvcnRlcklkIG9mIG1vZEluZm8uaW1wb3J0ZXJzKSB7XHJcbiAgICAgICAgICAgICAgICAgIGlmIChpc1N0YXRpY2FsbHlJbXBvcnRlZEJ5RW50cnkoaW1wb3J0ZXJJZCwgdmlzaXRlZCkpIHtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcclxuICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgIC8vIERldGVybWluZSBpZiB0aGUgbW9kdWxlIHNob3VsZCBiZSBpbiB0aGUgJ3ZlbmRvcicgY2h1bmtcclxuICAgICAgICAgICAgICBjb25zdCBtYW51YWxWZW5kb3JDaHVua3MgPSAvdGlueS1pbnZhcmlhbnQvO1xyXG4gICAgICAgICAgICAgIGlmIChcclxuICAgICAgICAgICAgICAgIG1hbnVhbFZlbmRvckNodW5rcy50ZXN0KGlkKSB8fFxyXG4gICAgICAgICAgICAgICAgaXNTdGF0aWNhbGx5SW1wb3J0ZWRCeUVudHJ5KGlkKVxyXG4gICAgICAgICAgICAgICkge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIFwidmVuZG9yXCI7XHJcbiAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgIC8vIGdyb3VwIGxhenktbG9hZGVkIGRlcGVuZGVuY2llcyBieSB0aGVpciBkeW5hbWljIGltcG9ydGVyXHJcbiAgICAgICAgICAgICAgICBjb25zdCBkeW5hbWljSW1wb3J0ZXJzID0gbW9kdWxlSW5mbz8uZHluYW1pY0ltcG9ydGVycyB8fCBbXTtcclxuICAgICAgICAgICAgICAgIGlmIChkeW5hbWljSW1wb3J0ZXJzICYmIGR5bmFtaWNJbXBvcnRlcnMubGVuZ3RoID4gMCkge1xyXG4gICAgICAgICAgICAgICAgICAvLyBVc2UgdGhlIGZpcnN0IGR5bmFtaWMgaW1wb3J0ZXIgdG8gbmFtZSB0aGUgY2h1bmtcclxuICAgICAgICAgICAgICAgICAgY29uc3QgaW1wb3J0ZXJDaHVua05hbWUgPSBkeW5hbWljSW1wb3J0ZXJzWzBdXHJcbiAgICAgICAgICAgICAgICAgICAgPyBkeW5hbWljSW1wb3J0ZXJzWzBdLnNwbGl0KFwiL1wiKS5wb3AoKVxyXG4gICAgICAgICAgICAgICAgICAgIDogXCJ2ZW5kb3JcIi5zcGxpdChcIi5cIilbMF07XHJcbiAgICAgICAgICAgICAgICAgIHJldHVybiBg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UUsS0FDMUJBLDZCQUE0QixFQUFFLEdBQzlCO0FBQ0EsdUJBQU87QUFBQSxjQUNULE9BQU87QUFFTCxzQkFBTSxtQkFBbUIsWUFBWSxvQkFBb0IsQ0FBQztBQUMxRCxvQkFBSSxvQkFBb0IsaUJBQWlCLFNBQVMsR0FBRztBQUVuRCx3QkFBTSxvQkFBb0IsaUJBQWlCLENBQUMsSUFDeEMsaUJBQWlCLENBQUMsRUFBRSxNQUFNLEdBQUcsRUFBRSxJQUFJLElBQ25DLFNBQVMsTUFBTSxHQUFHLEVBQUUsQ0FBQztBQUN6Qix5QkFBTyxTQUFTLGlCQUFpQjtBQUFBLGdCQUNuQztBQUFBLGNBRUY7QUFBQSxZQUNGO0FBQUEsVUFDRjtBQUFBLFFBQ0Y7QUFBQSxNQUNGO0FBQUEsSUFDRjtBQUFBLElBQ0EsUUFBUTtBQUFBLE1BQ04sTUFBTTtBQUFBLElBQ1I7QUFBQSxJQUNBLFNBQVM7QUFBQSxNQUNQLFNBQVM7QUFBQSxRQUNQLHVDQUF1QyxzUEFJRSxPQUFPLDhCQUM1QixPQUFPO0FBQUEsTUFDN0I7QUFBQSxNQUNBLE1BQU07QUFBQSxJQUNSO0FBQUEsRUFDRjtBQUNGLENBQUM7IiwKICAibmFtZXMiOiBbImZzIiwgInBhdGgiLCAicGF0aCIsICJfX3ZpdGVfaW5qZWN0ZWRfb3JpZ2luYWxfZGlybmFtZSIsICJwYXRoIiwgIl9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9kaXJuYW1lIiwgImZzIiwgImlzU3RhdGljYWxseUltcG9ydGVkQnlFbnRyeSJdCn0K From 3225fe5096c5d1e087019fae6b59247b62bd063a Mon Sep 17 00:00:00 2001 From: manmeetnagii Date: Sun, 15 Dec 2024 23:16:52 +0530 Subject: [PATCH 9/9] changed dropdown to Shadcn dropdown --- src/components/Common/Export.tsx | 52 ++-- ....timestamp-1734272200960-c34409c35bb48.mjs | 282 ------------------ 2 files changed, 26 insertions(+), 308 deletions(-) delete mode 100644 vite.config.mts.timestamp-1734272200960-c34409c35bb48.mjs diff --git a/src/components/Common/Export.tsx b/src/components/Common/Export.tsx index 42efe38fd27..2c5f7849057 100644 --- a/src/components/Common/Export.tsx +++ b/src/components/Common/Export.tsx @@ -105,32 +105,32 @@ export const ExportMenu = ({ {label !== "Importing..." && ( {exportItems.map((item) => ( -
- -
{ - let action = item.action; - if (item.route) { - action = async () => { - const { data } = await request(item.route!); - return data ?? null; - }; - } - if (action) { - exportFile( - action, - item.filePrefix, - item.type, - item.parse, - ); - } - }} - > +
{ + let action = item.action; + if (item.route) { + action = async () => { + const { data } = await request(item.route!); + return data ?? null; + }; + } + if (action) { + exportFile(action, item.filePrefix, item.type, item.parse); + } + }} + {...item.options} + > + +
{item.options?.icon} {item.label}
diff --git a/vite.config.mts.timestamp-1734272200960-c34409c35bb48.mjs b/vite.config.mts.timestamp-1734272200960-c34409c35bb48.mjs deleted file mode 100644 index 7ab7e31514f..00000000000 --- a/vite.config.mts.timestamp-1734272200960-c34409c35bb48.mjs +++ /dev/null @@ -1,282 +0,0 @@ -// vite.config.mts -import { ValidateEnv } from "file:///D:/dev/New%20folder/care_fe/node_modules/@julr/vite-plugin-validate-env/dist/index.mjs"; -import react from "file:///D:/dev/New%20folder/care_fe/node_modules/@vitejs/plugin-react-swc/index.mjs"; -import DOMPurify from "file:///D:/dev/New%20folder/care_fe/node_modules/dompurify/dist/purify.cjs.js"; -import fs2 from "fs"; -import { JSDOM } from "file:///D:/dev/New%20folder/care_fe/node_modules/jsdom/lib/api.js"; -import { marked } from "file:///D:/dev/New%20folder/care_fe/node_modules/marked/lib/marked.esm.js"; -import { createRequire } from "node:module"; -import path2 from "path"; -import { defineConfig, loadEnv } from "file:///D:/dev/New%20folder/care_fe/node_modules/vite/dist/node/index.js"; -import checker from "file:///D:/dev/New%20folder/care_fe/node_modules/vite-plugin-checker/dist/esm/main.js"; -import { VitePWA } from "file:///D:/dev/New%20folder/care_fe/node_modules/vite-plugin-pwa/dist/index.js"; -import { viteStaticCopy } from "file:///D:/dev/New%20folder/care_fe/node_modules/vite-plugin-static-copy/dist/index.js"; -import { z } from "file:///D:/dev/New%20folder/care_fe/node_modules/zod/lib/index.mjs"; - -// plugins/treeShakeCareIcons.ts -import * as fs from "fs"; -import { globSync } from "file:///D:/dev/New%20folder/care_fe/node_modules/glob/dist/esm/index.js"; -import * as path from "path"; -var __vite_injected_original_dirname = "D:\\dev\\New folder\\care_fe\\plugins"; -function treeShakeCareIcons(options = { iconWhitelist: [] }) { - const rootDir = path.resolve(__vite_injected_original_dirname, ".."); - const lineIconNameRegex = /"l-[a-z]+(?:-[a-z]+)*"/g; - const allUniconPaths = JSON.parse( - fs.readFileSync( - path.resolve(rootDir, "src/CAREUI/icons/UniconPaths.json"), - "utf8" - ) - ); - function extractCareIconNames(file) { - const fileContent = fs.readFileSync(file, "utf8"); - const lineIconNameMatches = fileContent.match(lineIconNameRegex) || []; - const lineIconNames = lineIconNameMatches.map( - (lineIconName) => lineIconName.slice(1, -1) - // remove quotes - ); - return lineIconNames; - } - function getAllUsedIconNames() { - const files = globSync(path.resolve(rootDir, "{apps,src}/**/*.{tsx,res}")); - const usedIconsArray = []; - files.forEach((file) => { - const iconNames = extractCareIconNames(file); - usedIconsArray.push(...iconNames); - }); - return new Set(usedIconsArray); - } - function getTreeShakenUniconPaths() { - const usedIcons = [...getAllUsedIconNames(), ...options.iconWhitelist]; - const treeshakenCareIconPaths = {}; - for (const iconName of usedIcons) { - const path3 = allUniconPaths[iconName]; - if (path3 === void 0) { - throw new Error(`Icon ${iconName} is not found in UniconPaths.json`); - } else { - treeshakenCareIconPaths[iconName] = path3; - } - } - return treeshakenCareIconPaths; - } - return { - name: "tree-shake-care-icons", - transform(_src, id) { - if (process.env.NODE_ENV !== "production") { - return; - } - if (id.endsWith("UniconPaths.json")) { - return { - code: `export default ${JSON.stringify(getTreeShakenUniconPaths())}`, - map: null - }; - } - } - }; -} - -// vite.config.mts -var __vite_injected_original_dirname2 = "D:\\dev\\New folder\\care_fe"; -var __vite_injected_original_import_meta_url = "file:///D:/dev/New%20folder/care_fe/vite.config.mts"; -var pdfWorkerPath = path2.join( - path2.dirname( - createRequire(__vite_injected_original_import_meta_url).resolve("pdfjs-dist/package.json") - ), - "build", - "pdf.worker.min.mjs" -); -function getDescriptionHtml(description) { - const html = marked.parse(description, { - async: false, - gfm: true, - breaks: true - }); - const purify = DOMPurify(new JSDOM("").window); - const sanitizedHtml = purify.sanitize(html); - return JSON.stringify(sanitizedHtml); -} -function getPluginAliases() { - const pluginsDir = path2.resolve(__vite_injected_original_dirname2, "apps"); - if (!fs2.existsSync(pluginsDir)) { - return {}; - } - const pluginFolders = fs2.readdirSync(pluginsDir); - const aliases = {}; - pluginFolders.forEach((pluginFolder) => { - const pluginSrcPath = path2.join(pluginsDir, pluginFolder, "src"); - if (fs2.existsSync(pluginSrcPath)) { - aliases[`@apps/${pluginFolder}`] = pluginSrcPath; - aliases[`@app-manifest/${pluginFolder}`] = path2.join( - pluginSrcPath, - "manifest.ts" - ); - } - }); - return aliases; -} -function getPluginDependencies() { - const pluginsDir = path2.resolve(__vite_injected_original_dirname2, "apps"); - if (!fs2.existsSync(pluginsDir)) { - return []; - } - const pluginFolders = fs2.readdirSync(pluginsDir); - const dependencies = /* @__PURE__ */ new Set(); - pluginFolders.forEach((pluginFolder) => { - const packageJsonPath = path2.join(pluginsDir, pluginFolder, "package.json"); - if (fs2.existsSync(packageJsonPath)) { - const packageJson = JSON.parse(fs2.readFileSync(packageJsonPath, "utf8")); - const pluginDependencies = packageJson.dependencies ? Object.keys(packageJson.dependencies) : []; - pluginDependencies.forEach((dep) => dependencies.add(dep)); - } - }); - return Array.from(dependencies); -} -var vite_config_default = defineConfig(({ mode }) => { - const env = loadEnv(mode, process.cwd(), ""); - const cdnUrls = env.REACT_CDN_URLS || [ - "https://egov-s3-facility-10bedicu.s3.amazonaws.com", - "https://egov-s3-patient-data-10bedicu.s3.amazonaws.com", - "http://localhost:4566" - ].join(" "); - return { - envPrefix: "REACT_", - define: { - __CUSTOM_DESCRIPTION_HTML__: getDescriptionHtml( - env.REACT_CUSTOM_DESCRIPTION || "" - ) - }, - plugins: [ - ValidateEnv({ - validator: "zod", - schema: { - REACT_CARE_API_URL: z.string().url(), - REACT_SENTRY_DSN: z.string().url().optional(), - REACT_SENTRY_ENVIRONMENT: z.string().optional(), - REACT_PLAUSIBLE_SITE_DOMAIN: z.string().regex(/^[a-zA-Z0-9][a-zA-Z0-9-_.]*\.[a-zA-Z]{2,}$/).optional().describe("Domain name without protocol (e.g., sub.domain.com)"), - REACT_PLAUSIBLE_SERVER_URL: z.string().url().optional(), - REACT_CDN_URLS: z.string().optional().transform((val) => val?.split(" ")).pipe(z.array(z.string().url()).optional()).describe("Optional: Space-separated list of CDN URLs") - } - }), - viteStaticCopy({ - targets: [ - { - src: pdfWorkerPath, - dest: "" - } - ] - }), - react(), - checker({ typescript: true }), - treeShakeCareIcons({ - iconWhitelist: ["default"] - }), - VitePWA({ - strategies: "injectManifest", - srcDir: "src", - filename: "service-worker.ts", - injectRegister: "script-defer", - devOptions: { - enabled: true, - type: "module" - }, - injectManifest: { - maximumFileSizeToCacheInBytes: 7e6 - }, - manifest: { - name: "Care", - short_name: "Care", - theme_color: "#0e9f6e", - background_color: "#ffffff", - display: "standalone", - icons: [ - { - src: "images/icons/pwa-64x64.png", - sizes: "64x64", - type: "image/png" - }, - { - src: "images/icons/pwa-192x192.png", - sizes: "192x192", - type: "image/png" - }, - { - src: "images/icons/pwa-512x512.png", - sizes: "512x512", - type: "image/png", - purpose: "any" - }, - { - src: "images/icons/maskable-icon-512x512.png", - sizes: "512x512", - type: "image/png", - purpose: "maskable" - } - ] - } - }) - ], - resolve: { - alias: { - ...getPluginAliases(), - "@": path2.resolve(__vite_injected_original_dirname2, "./src"), - "@careConfig": path2.resolve(__vite_injected_original_dirname2, "./care.config.ts"), - "@core": path2.resolve(__vite_injected_original_dirname2, "src/") - } - }, - optimizeDeps: { - include: getPluginDependencies() - }, - build: { - outDir: "build", - assetsDir: "bundle", - sourcemap: true, - rollupOptions: { - output: { - manualChunks(id, { getModuleInfo }) { - if (id.includes("node_modules")) { - let isStaticallyImportedByEntry2 = function(moduleId, visited = /* @__PURE__ */ new Set()) { - if (visited.has(moduleId)) return false; - visited.add(moduleId); - const modInfo = getModuleInfo(moduleId); - if (!modInfo) return false; - if (modInfo.isEntry) { - return true; - } - for (const importerId of modInfo.importers) { - if (isStaticallyImportedByEntry2(importerId, visited)) { - return true; - } - } - return false; - }; - var isStaticallyImportedByEntry = isStaticallyImportedByEntry2; - const moduleInfo = getModuleInfo(id); - const manualVendorChunks = /tiny-invariant/; - if (manualVendorChunks.test(id) || isStaticallyImportedByEntry2(id)) { - return "vendor"; - } else { - const dynamicImporters = moduleInfo?.dynamicImporters || []; - if (dynamicImporters && dynamicImporters.length > 0) { - const importerChunkName = dynamicImporters[0] ? dynamicImporters[0].split("/").pop() : "vendor".split(".")[0]; - return `chunk-${importerChunkName}`; - } - } - } - } - } - } - }, - server: { - port: 4e3 - }, - preview: { - headers: { - "Content-Security-Policy-Report-Only": `default-src 'self'; script-src 'self' blob: 'nonce-f51b9742' https://plausible.10bedicu.in; style-src 'self' 'unsafe-inline'; connect-src 'self' https://plausible.10bedicu.in; img-src 'self' https://cdn.ohc.network ${cdnUrls}; object-src 'self' ${cdnUrls};` - }, - port: 4e3 - } - }; -}); -export { - vite_config_default as default -}; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcubXRzIiwgInBsdWdpbnMvdHJlZVNoYWtlQ2FyZUljb25zLnRzIl0sCiAgInNvdXJjZXNDb250ZW50IjogWyJjb25zdCBfX3ZpdGVfaW5qZWN0ZWRfb3JpZ2luYWxfZGlybmFtZSA9IFwiRDpcXFxcZGV2XFxcXE5ldyBmb2xkZXJcXFxcY2FyZV9mZVwiO2NvbnN0IF9fdml0ZV9pb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6Ly9lZ292LXMzLWZhY2lsaXR5LTEwYmVkaWN1LnMzLmFtYXpvbmF3cy5jb21cIixcclxuICAgICAgXCJodHRwczovL2Vnb3YtczMtcGF0aWVudC1kYXRhLTEwYmVkaWN1LnMzLmFtYXpvbmF3cy5jb21cIixcclxuICAgICAgXCJodHRwOi8vbG9jYWxob3N0OjQ1NjZcIixcclxuICAgIF0uam9pbihcIiBcIik7XHJcblxyXG4gIHJldHVybiB7XHJcbiAgICBlbnZQcmVmaXg6IFwiUkVBQ1RfXCIsXHJcbiAgICBkZWZpbmU6IHtcclxuICAgICAgX19DVVNUT01fREVTQ1JJUFRJT05fSFRNTF9fOiBnZXREZXNjcmlwdGlvbkh0bWwoXHJcbiAgICAgICAgZW52LlJFQUNUX0NVU1RPTV9ERVNDUklQVElPTiB8fCBcIlwiLFxyXG4gICAgICApLFxyXG4gICAgfSxcclxuICAgIHBsdWdpbnM6IFtcclxuICAgICAgVmFsaWRhdGVFbnYoe1xyXG4gICAgICAgIHZhbGlkYXRvcjogXCJ6b2RcIixcclxuICAgICAgICBzY2hlbWE6IHtcclxuICAgICAgICAgIFJFQUNUX0NBUkVfQVBJX1VSTDogei5zdHJpbmcoKS51cmwoKSxcclxuXHJcbiAgICAgICAgICBSRUFDVF9TRU5UUllfRFNOOiB6LnN0cmluZygpLnVybCgpLm9wdGlvbmFsKCksXHJcbiAgICAgICAgICBSRUFDVF9TRU5UUllfRU5WSVJPTk1FTlQ6IHouc3RyaW5nKCkub3B0aW9uYWwoKSxcclxuXHJcbiAgICAgICAgICBSRUFDVF9QTEFVU0lCTEVfU0lURV9ET01BSU46IHpcclxuICAgICAgICAgICAgLnN0cmluZygpXHJcbiAgICAgICAgICAgIC5yZWdleCgvXlthLXpBLVowLTldW2EtekEtWjAtOS1fLl0qXFwuW2EtekEtWl17Mix9JC8pXHJcbiAgICAgICAgICAgIC5vcHRpb25hbCgpXHJcbiAgICAgICAgICAgIC5kZXNjcmliZShcIkRvbWFpbiBuYW1lIH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LXdvcmtlci50c1wiLFxyXG4gICAgICAgIGluamVjdFJlZ2lzdGVyOiBcInNjcmlwdC1kZWZlclwiLFxyXG4gICAgICAgIGRldk9wdGlvbnM6IHtcclxuICAgICAgICAgIGVuYWJsZWQ6IHRydWUsXHJcbiAgICAgICAgICB0eXBlOiBcIm1vZHVsZVwiLFxyXG4gICAgICAgIH0sXHJcbiAgICAgICAgaW5qZWN0TWFuaWZlc3Q6IHtcclxuICAgICAgICAgIG1heGltdW1GaWxlU2l6ZVRvQ2FjaGVJbkJ5dGVzOiA3MDAwMDAwLFxyXG4gICAgICAgIH0sXHJcbiAgICAgICAgbWFuaWZlc3Q6IHtcclxuICAgICAgICAgIG5hbWU6IFwiQ2FyZVwiLFxyXG4gICAgICAgICAgc2hvcnRfbmFtZTogXCJDYXJlXCIsXHJcbiAgICAgICAgICB0aGVtZV9jb2xvcjogXCIjMGU5ZjZlXCIsXHJcbiAgICAgICAgICBiYWNrZ3JvdW5kX2NvbG9yOiBcIiNmZmZmZmZcIixcclxuICAgICAgICAgIGRpc3BsYXk6IFwic3RhbmRhbG9uZVwiLFxyXG4gICAgICAgICAgaWNvbnM6IFtcclxuICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgIHNyYzogXCJpbWFnZXMvaWNvbnMvcHdhLTY0eDY0LnBuZ1wiLFxyXG4gICAgICAgICAgICAgIHNpemVzOiBcIjY0eDY0XCIsXHJcbiAgICAgICAgICAgICAgdHlwZTogXCJpbWFnZS9wbmdcIixcclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgIHNyYzogXCJpbWFnZXMvaWNvbnMvcHdhLTE5MngxOTIucG5nXCIsXHJcbiAgICAgICAgICAgICAgc2l6ZXM6IFwiMTkyeDE5MlwiLFxyXG4gICAgICAgICAgICAgIHR5cGU6IFwiaW1hZ2UvcG5nXCIsXHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICBzcmM6IFwiaW1hZ2VzL2ljb25zL3B3YS01MTJ4NTEyLnBuZ1wiLFxyXG4gICAgICAgICAgICAgIHNpemVzOiBcIjUxMng1MTJcIixcclxuICAgICAgICAgICAgICB0eXBlOiBcImltYWdlL3BuZ1wiLFxyXG4gICAgICAgICAgICAgIHB1cnBvc2U6IFwiYW55XCIsXHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICBzcmM6IFwiaW1hZ2VzL2ljb25zL21hc2thYmxlLWljb24tNTEyeDUxMi5wbmdcIixcclxuICAgICAgICAgICAgICBzaXplczogXCI1MTJ4NTEyXCIsXHJcbiAgICAgICAgICAgICAgdHlwZTogXCJpbWFnZS9wbmdcIixcclxuICAgICAgICAgICAgICBwdXJwb3NlOiBcIm1hc2thYmxlXCIsXHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICBdLFxyXG4gICAgICAgIH0sXHJcbiAgICAgIH0pLFxyXG4gICAgXSxcclxuICAgIHJlc29sdmU6IHtcclxuICAgICAgYWxpYXM6IHtcclxuICAgICAgICAuLi5nZXRQbHVnaW5BbGlhc2VzKCksXHJcbiAgICAgICAgXCJAXCI6IHBhdGgucmVzb2x2ZShfX2Rpcm5hbWUsIFwiLi9zcmNcIiksXHJcbiAgICAgICAgXCJAY2FyZUNvbmZpZ1wiOiBwYXRoLnJlc29sdmUoX19kaXJuYW1lLCBcIi4vY2FyZS5jb25maWcudHNcIiksXHJcbiAgICAgICAgXCJAY29yZVwiOiBwYXRoLnJlc29sdmUoX19kaXJuYW1lLCBcInNyYy9cIiksXHJcbiAgICAgIH0sXHJcbiAgICB9LFxyXG4gICAgb3B0aW1pemVEZXBzOiB7XHJcbiAgICAgIGluY2x1ZGU6IGdldFBsdWdpbkRlcGVuZGVuY2llcygpLFxyXG4gICAgfSxcclxuICAgIGJ1aWxkOiB7XHJcbiAgICAgIG91dERpcjogXCJidWlsZFwiLFxyXG4gICAgICBhc3NldHNEaXI6IFwiYnVuZGxlXCIsXHJcbiAgICAgIHNvdXJjZW1hcDogdHJ1ZSxcclxuICAgICAgcm9sbHVwT3B0aW9uczoge1xyXG4gICAgICAgIG91dHB1dDoge1xyXG4gICAgICAgICAgbWFudWFsQ2h1bmtzKGlkLCB7IGdldE1vZHVsZUluZm8gfSkge1xyXG4gICAgICAgICAgICBpZiAoaWQuaW5jbHVkZXMoXCJub2RlX21vZHVsZXNcIikpIHtcclxuICAgICAgICAgICAgICBjb25zdCBtb2R1bGVJbmZvID0gZ2V0TW9kdWxlSW5mbyhpZCk7XHJcblxyXG4gICAgICAgICAgICAgIC8vIFJlY3Vyc2l2ZSBmdW5jdGlvbiB0byBjaGVjayBpZiB0aGUgbW9kdWxlIGlzIHN0YXRpY2FsbHkgaW1wb3J0ZWQgYnkgYW4gZW50cnkgcG9pbnRcclxuICAgICAgICAgICAgICBmdW5jdGlvbiBpc1N0YXRpY2FsbHlJbXBvcnRlZEJ5RW50cnkoXHJcbiAgICAgICAgICAgICAgICBtb2R1bGVJZCxcclxuICAgICAgICAgICAgICAgIHZpc2l0ZWQgPSBuZXcgU2V0KCksXHJcbiAgICAgICAgICAgICAgKSB7XHJcbiAgICAgICAgICAgICAgICBpZiAodmlzaXRlZC5oYXMobW9kdWxlSWQpKSByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgICAgICAgICB2aXNpdGVkLmFkZChtb2R1bGVJZCk7XHJcblxyXG4gICAgICAgICAgICAgICAgY29uc3QgbW9kSW5mbyA9IGdldE1vZHVsZUluZm8obW9kdWxlSWQpO1xyXG4gICAgICAgICAgICAgICAgaWYgKCFtb2RJbmZvKSByZXR1cm4gZmFsc2U7XHJcblxyXG4gICAgICAgICAgICAgICAgLy8gQ2hlY2sgaWYgdGhlIG1vZHVsZSBpcyBhbiBlbnRyeSBwb2ludFxyXG4gICAgICAgICAgICAgICAgaWYgKG1vZEluZm8uaXNFbnRyeSkge1xyXG4gICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcclxuICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICAvLyBDaGVjayBhbGwgc3RhdGljIGltcG9ydGVyc1xyXG4gICAgICAgICAgICAgICAgZm9yIChjb25zdCBpbXBvcnRlcklkIG9mIG1vZEluZm8uaW1wb3J0ZXJzKSB7XHJcbiAgICAgICAgICAgICAgICAgIGlmIChpc1N0YXRpY2FsbHlJbXBvcnRlZEJ5RW50cnkoaW1wb3J0ZXJJZCwgdmlzaXRlZCkpIHtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcclxuICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgIC8vIERldGVybWluZSBpZiB0aGUgbW9kdWxlIHNob3VsZCBiZSBpbiB0aGUgJ3ZlbmRvcicgY2h1bmtcclxuICAgICAgICAgICAgICBjb25zdCBtYW51YWxWZW5kb3JDaHVua3MgPSAvdGlueS1pbnZhcmlhbnQvO1xyXG4gICAgICAgICAgICAgIGlmIChcclxuICAgICAgICAgICAgICAgIG1hbnVhbFZlbmRvckNodW5rcy50ZXN0KGlkKSB8fFxyXG4gICAgICAgICAgICAgICAgaXNTdGF0aWNhbGx5SW1wb3J0ZWRCeUVudHJ5KGlkKVxyXG4gICAgICAgICAgICAgICkge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIFwidmVuZG9yXCI7XHJcbiAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgIC8vIGdyb3VwIGxhenktbG9hZGVkIGRlcGVuZGVuY2llcyBieSB0aGVpciBkeW5hbWljIGltcG9ydGVyXHJcbiAgICAgICAgICAgICAgICBjb25zdCBkeW5hbWljSW1wb3J0ZXJzID0gbW9kdWxlSW5mbz8uZHluYW1pY0ltcG9ydGVycyB8fCBbXTtcclxuICAg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