diff --git a/.env b/.env index ebc0ebd5be3..b5db3d0088f 100644 --- a/.env +++ b/.env @@ -14,4 +14,4 @@ ESLINT_NO_DEV_ERRORS=true CARE_CDN_URL="https://egov-s3-facility-10bedicu.s3.amazonaws.com https://egov-s3-patient-data-10bedicu.s3.amazonaws.com http://localhost:4566" REACT_ALLOWED_LOCALES="en,hi,ta,ml,mr,kn" -REACT_ENABLED_APPS="ohcnetwork/care_livekit_fe@main" +REACT_ENABLED_APPS="" diff --git a/.prettierrc.json b/.prettierrc.json index ba722afdd73..22765ca5aa1 100644 --- a/.prettierrc.json +++ b/.prettierrc.json @@ -6,5 +6,8 @@ "jsxSingleQuote": false, "arrowParens": "always", "tailwindFunctions": ["classNames"], - "plugins": ["prettier-plugin-tailwindcss"] -} + "importOrder": ["", "^@/lib/(.*)$", "^@/CAREUI/(.*)$", "^@/components/ui/(.*)$", "^@/components/(.*)$", "^@/hooks/(.*)$", "^@/common/(.*)$", "^@/(.*)$", "^[./]"], + "importOrderSeparation": true, + "importOrderSortSpecifiers": true, + "plugins": ["prettier-plugin-tailwindcss", "@trivago/prettier-plugin-sort-imports"] +} \ No newline at end of file diff --git a/cypress.config.ts b/cypress.config.ts index 0c939ce50b3..b6e8fadd462 100644 --- a/cypress.config.ts +++ b/cypress.config.ts @@ -1,6 +1,6 @@ import { defineConfig } from "cypress"; -import fs from "fs"; import cypressSplit from "cypress-split"; +import fs from "fs"; export default defineConfig({ projectId: "wf7d2m", @@ -30,7 +30,6 @@ export default defineConfig({ baseUrl: "http://localhost:4000", retries: 2, requestTimeout: 15000, - excludeSpecPattern: "**/*roles.cy.ts", }, env: { API_URL: process.env.REACT_CARE_API_URL ?? "http://localhost:9000", diff --git a/cypress/e2e/auth_spec/roles.cy.ts b/cypress/e2e/auth_spec/roles.cy.ts deleted file mode 100644 index c84679de943..00000000000 --- a/cypress/e2e/auth_spec/roles.cy.ts +++ /dev/null @@ -1,19 +0,0 @@ -import * as users from "../../fixtures/users.json"; - -describe("authentication", () => { - users.forEach((user) => { - it("Login as " + user.username + " - " + user.rolename, () => { - cy.loginByApi(user.username, "passwordR0FL"); - cy.awaitUrl("/user/profile"); - cy.get("dd").should("contain", user.username); - cy.get("dd").should("contain", user.rolename); - }); - }); - afterEach(() => { - cy.log("Logging out"); - cy.get("#sign-out-button").contains("Sign Out").click(); - cy.getLocalStorage("care_access_token").should("be.null"); - cy.getLocalStorage("care_refresh_token").should("be.null"); - cy.url().should("include", "/"); - }); -}); diff --git a/cypress/fixtures/users.json b/cypress/fixtures/users.json deleted file mode 100644 index 3a935589846..00000000000 --- a/cypress/fixtures/users.json +++ /dev/null @@ -1,38 +0,0 @@ -[ - { - "username": "karadmin", - "rolename": "DistrictAdmin" - }, - { - "username": "karadminro", - "rolename": "DistrictReadOnlyAdmin" - }, - { - "username": "karstaff1", - "rolename": "Staff" - }, - { - "username": "karstaffro", - "rolename": "StaffReadOnly" - }, - { - "username": "karlocal", - "rolename": "LocalBodyAdmin" - }, - { - "username": "karward", - "rolename": "WardAdmin" - }, - { - "username": "kardoc1", - "rolename": "Doctor" - }, - { - "username": "karpharma1", - "rolename": "Pharmacist" - }, - { - "username": "karvol", - "rolename": "Volunteer" - } -] diff --git a/package-lock.json b/package-lock.json index 93c8f142e0d..46a7ccfbd3b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -64,6 +64,7 @@ "@tailwindcss/container-queries": "^0.1.1", "@tailwindcss/forms": "^0.5.7", "@tailwindcss/typography": "^0.5.13", + "@trivago/prettier-plugin-sort-imports": "^4.3.0", "@types/events": "^3.0.3", "@types/google.maps": "^3.55.8", "@types/lodash-es": "^4.17.12", @@ -110,6 +111,7 @@ "apps/care_livekit_fe": { "name": "care-livekit", "version": "0.0.1", + "extraneous": true, "license": "ISC", "dependencies": { "@livekit/components-react": "^2.6.2", @@ -419,6 +421,46 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/@babel/helper-environment-visitor": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.7.tgz", + "integrity": "sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-function-name": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.24.7.tgz", + "integrity": "sha512-FyoJTsj/PEUWu1/TYRiXTIHc8lbw+TDYkZuoE43opPS5TrI7MyONBE1oNvfguEXAD9yhQRrVBnXdXzSLQl9XnA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/template": "^7.24.7", + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-hoist-variables": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.24.7.tgz", + "integrity": "sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/helper-member-expression-to-functions": { "version": "7.25.7", "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.25.7.tgz", @@ -553,10 +595,23 @@ "node": ">=6.9.0" } }, + "node_modules/@babel/helper-split-export-declaration": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.7.tgz", + "integrity": "sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/helper-string-parser": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.7.tgz", - "integrity": "sha512-CbkjYdsJNHFk8uqpEkpCvRs3YRp9tY6FmFY7wLMSYuGYkrdUi7r2lc4/wqsvlHoMznX3WJ9IP8giGPq68T/Y6g==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz", + "integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==", "dev": true, "license": "MIT", "engines": { @@ -564,9 +619,9 @@ } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.7.tgz", - "integrity": "sha512-AM6TzwYqGChO45oiuPqwL2t20/HdMC1rTPAesnBCgPCSF1x3oN9MVUwQV2iyz4xqWrctwK5RNC8LV22kaQCNYg==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", + "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", "license": "MIT", "engines": { "node": ">=6.9.0" @@ -698,13 +753,13 @@ } }, "node_modules/@babel/parser": { - "version": "7.25.8", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.25.8.tgz", - "integrity": "sha512-HcttkxzdPucv3nNFmfOOMfFf64KgdJVqm1KaCm25dPGMLElo9nsLvXeJECQg8UzPuBGLyTSA0ZzqCtDSzKTEoQ==", + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.2.tgz", + "integrity": "sha512-DWMCZH9WA4Maitz2q21SRKHo9QXZxkDsbNZoVD62gusNtNBBqDg9i7uOhASfTfIGNzW+O+r7+jAlM8dwphcJKQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.25.8" + "@babel/types": "^7.26.0" }, "bin": { "parser": "bin/babel-parser.js" @@ -1872,26 +1927,19 @@ } }, "node_modules/@babel/types": { - "version": "7.25.8", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.25.8.tgz", - "integrity": "sha512-JWtuCu8VQsMladxVz/P4HzHUGCAwpuqacmowgXFs5XjxIgKuNjnLokQzuVjlTvIzODaDmpjT3oxcC48vyk9EWg==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.0.tgz", + "integrity": "sha512-Z/yiTPj+lDVnF7lWeKCIJzaIkI0vYO87dMpZ4bg4TDrFe4XXLFWL1TbXU27gBP3QccxV9mZICCrnjnYlJjXHOA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-string-parser": "^7.25.7", - "@babel/helper-validator-identifier": "^7.25.7", - "to-fast-properties": "^2.0.0" + "@babel/helper-string-parser": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@bufbuild/protobuf": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/@bufbuild/protobuf/-/protobuf-1.10.0.tgz", - "integrity": "sha512-QDdVFLoN93Zjg36NoQPZfsVH9tZew7wKDKyV5qRdj8ntT4wQCOradQjRaTdwMhWUYsgKsvCINKKm87FdEk96Ag==", - "license": "(Apache-2.0 AND BSD-3-Clause)" - }, "node_modules/@colors/colors": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", @@ -2792,74 +2840,6 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, - "node_modules/@livekit/components-core": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/@livekit/components-core/-/components-core-0.11.10.tgz", - "integrity": "sha512-PvFlKq1W64b9GfFjG7L4/o7ulAl5yFFpDTvG+JHQiXkaPaecMPt/qPbs6zdvUlC7om1TGMuW/pIN7o585Xz9Fg==", - "license": "Apache-2.0", - "dependencies": { - "@floating-ui/dom": "1.6.11", - "loglevel": "1.9.1", - "rxjs": "7.8.1" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "livekit-client": "^2.5.7", - "tslib": "^2.6.2" - } - }, - "node_modules/@livekit/components-react": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/@livekit/components-react/-/components-react-2.6.7.tgz", - "integrity": "sha512-z8dgrBrRXIe7oagwFyjehdwL/4zpySJyPdAjeMDXZVbTXYNAugb3a88Ws9yQz4PZFECLkIPXJCN3C3YR+bgh5Q==", - "license": "Apache-2.0", - "dependencies": { - "@livekit/components-core": "0.11.10", - "clsx": "2.1.1", - "usehooks-ts": "3.1.0" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "@livekit/krisp-noise-filter": "^0.2.12", - "livekit-client": "^2.5.7", - "react": ">=18", - "react-dom": ">=18", - "tslib": "^2.6.2" - }, - "peerDependenciesMeta": { - "@livekit/krisp-noise-filter": { - "optional": true - } - } - }, - "node_modules/@livekit/components-styles": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/@livekit/components-styles/-/components-styles-1.1.4.tgz", - "integrity": "sha512-QCupn7tQ/dy/WZclrfsgtDe8peiGYS6Ied1IGkKOysaXo04l90t62SIUTKyxgd0dNDhUDC0p34qCggGZs/44lQ==", - "license": "Apache-2.0", - "engines": { - "node": ">=18" - } - }, - "node_modules/@livekit/mutex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@livekit/mutex/-/mutex-1.0.0.tgz", - "integrity": "sha512-aiUhoThBNF9UyGTxEURFzJLhhPLIVTnQiEVMjRhPnfHNKLfo2JY9xovHKIus7B78UD5hsP6DlgpmAsjrz4U0Iw==", - "license": "Apache-2.0" - }, - "node_modules/@livekit/protocol": { - "version": "1.24.0", - "resolved": "https://registry.npmjs.org/@livekit/protocol/-/protocol-1.24.0.tgz", - "integrity": "sha512-9dCsqnkMn7lvbI4NGh18zhLDsrXyUcpS++TEFgEk5Xv1WM3R2kT3EzqgL1P/mr3jaabM6rJ8wZA/KJLuQNpF5w==", - "license": "Apache-2.0", - "dependencies": { - "@bufbuild/protobuf": "^1.10.0" - } - }, "node_modules/@mapbox/node-pre-gyp": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.11.tgz", @@ -4954,6 +4934,158 @@ "url": "https://github.com/sponsors/tannerlinsley" } }, + "node_modules/@trivago/prettier-plugin-sort-imports": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@trivago/prettier-plugin-sort-imports/-/prettier-plugin-sort-imports-4.3.0.tgz", + "integrity": "sha512-r3n0onD3BTOVUNPhR4lhVK4/pABGpbA7bW3eumZnYdKaHkf1qEC+Mag6DPbGNuuh0eG8AaYj+YqmVHSiGslaTQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@babel/generator": "7.17.7", + "@babel/parser": "^7.20.5", + "@babel/traverse": "7.23.2", + "@babel/types": "7.17.0", + "javascript-natural-sort": "0.7.1", + "lodash": "^4.17.21" + }, + "peerDependencies": { + "@vue/compiler-sfc": "3.x", + "prettier": "2.x - 3.x" + }, + "peerDependenciesMeta": { + "@vue/compiler-sfc": { + "optional": true + } + } + }, + "node_modules/@trivago/prettier-plugin-sort-imports/node_modules/@babel/generator": { + "version": "7.17.7", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.7.tgz", + "integrity": "sha512-oLcVCTeIFadUoArDTwpluncplrYBmTCCZZgXCbgNGvOBBiSDDK3eWO4b/+eOTli5tKv1lg+a5/NAXg+nTcei1w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.17.0", + "jsesc": "^2.5.1", + "source-map": "^0.5.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@trivago/prettier-plugin-sort-imports/node_modules/@babel/traverse": { + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", + "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.22.13", + "@babel/generator": "^7.23.0", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.23.0", + "@babel/types": "^7.23.0", + "debug": "^4.1.0", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@trivago/prettier-plugin-sort-imports/node_modules/@babel/traverse/node_modules/@babel/generator": { + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.26.2.tgz", + "integrity": "sha512-zevQbhbau95nkoxSq3f/DC/SC+EEOUZd3DYqfSkMhY2/wfSeaHV1Ew4vk8e+x8lja31IbyuUa2uQ3JONqKbysw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.26.2", + "@babel/types": "^7.26.0", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", + "jsesc": "^3.0.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@trivago/prettier-plugin-sort-imports/node_modules/@babel/traverse/node_modules/@babel/types": { + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.0.tgz", + "integrity": "sha512-Z/yiTPj+lDVnF7lWeKCIJzaIkI0vYO87dMpZ4bg4TDrFe4XXLFWL1TbXU27gBP3QccxV9mZICCrnjnYlJjXHOA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@trivago/prettier-plugin-sort-imports/node_modules/@babel/traverse/node_modules/jsesc": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.0.2.tgz", + "integrity": "sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==", + "dev": true, + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@trivago/prettier-plugin-sort-imports/node_modules/@babel/types": { + "version": "7.17.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.17.0.tgz", + "integrity": "sha512-TmKSNO4D5rzhL5bjWFcVHHLETzfQ/AmbKpKPOSjlP0WoHZ6L911fgoOKY4Alp/emzG4cHJdyN49zpgkbXFEHHw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.16.7", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@trivago/prettier-plugin-sort-imports/node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/@trivago/prettier-plugin-sort-imports/node_modules/jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true, + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@trivago/prettier-plugin-sort-imports/node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/@types/acorn": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/@types/acorn/-/acorn-4.0.6.tgz", @@ -6604,10 +6736,6 @@ "node": ">=6" } }, - "node_modules/care-livekit": { - "resolved": "apps/care_livekit_fe", - "link": true - }, "node_modules/caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", @@ -10943,6 +11071,13 @@ "node": "*" } }, + "node_modules/javascript-natural-sort": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/javascript-natural-sort/-/javascript-natural-sort-0.7.1.tgz", + "integrity": "sha512-nO6jcEfZWQXDhOiBtG2KvKyEptz7RVbpGP4vTD2hLBdmNQSsCiicO2Ioinv6UI4y9ukqnBpy+XZ9H6uLNgJTlw==", + "dev": true, + "license": "MIT" + }, "node_modules/jest-worker": { "version": "27.5.1", "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", @@ -11703,29 +11838,6 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/livekit-client": { - "version": "2.5.10", - "resolved": "https://registry.npmjs.org/livekit-client/-/livekit-client-2.5.10.tgz", - "integrity": "sha512-H7EeIb19LAH8ejlvhh0JWtWkvXDan6Yf3bpFGlDMb54uPmyRgBY+McfgQsFgJCB9WJL0X+GYUoV1Cmnn8iAoIQ==", - "license": "Apache-2.0", - "dependencies": { - "@livekit/mutex": "1.0.0", - "@livekit/protocol": "1.24.0", - "events": "^3.3.0", - "loglevel": "^1.8.0", - "sdp-transform": "^2.14.1", - "ts-debounce": "^4.0.0", - "tslib": "2.7.0", - "typed-emitter": "^2.1.0", - "webrtc-adapter": "^9.0.0" - } - }, - "node_modules/livekit-client/node_modules/tslib": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz", - "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==", - "license": "0BSD" - }, "node_modules/load-plugin": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/load-plugin/-/load-plugin-6.0.3.tgz", @@ -11837,6 +11949,7 @@ "version": "4.0.8", "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==", + "dev": true, "license": "MIT" }, "node_modules/lodash.isplainobject": { @@ -11931,19 +12044,6 @@ "node": ">=8" } }, - "node_modules/loglevel": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.9.1.tgz", - "integrity": "sha512-hP3I3kCrDIMuRwAwHltphhDM1r8i55H33GgqjXbrisuJhF4kRhW1dNuxsRklp4bXl8DSdLaNLuiL4A/LWRfxvg==", - "license": "MIT", - "engines": { - "node": ">= 0.6.0" - }, - "funding": { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/loglevel" - } - }, "node_modules/long": { "version": "5.2.3", "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", @@ -17199,15 +17299,6 @@ "integrity": "sha512-d7wDPgDV3DDiqulJjKiV2865wKsJ34YI+NDREbm+FySq6WuKOikwyNQcm+doLAZ1O6ltdO0SeKle2xMpN3Brgw==", "license": "MIT" }, - "node_modules/sdp-transform": { - "version": "2.14.2", - "resolved": "https://registry.npmjs.org/sdp-transform/-/sdp-transform-2.14.2.tgz", - "integrity": "sha512-icY6jVao7MfKCieyo1AyxFYm1baiM+fA00qW/KrNNVlkxHAd34riEKuEkUe4bBb3gJwLJZM+xT60Yj1QL8rHiA==", - "license": "MIT", - "bin": { - "sdp-verify": "checker.js" - } - }, "node_modules/semver": { "version": "7.6.3", "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", @@ -18533,12 +18624,6 @@ "typescript": ">=4.2.0" } }, - "node_modules/ts-debounce": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/ts-debounce/-/ts-debounce-4.0.0.tgz", - "integrity": "sha512-+1iDGY6NmOGidq7i7xZGA4cm8DAa6fqdYcvO5Z6yBevH++Bdo9Qt/mN0TzHUgcCcKv1gmh9+W5dHqz8pMWbCbg==", - "license": "MIT" - }, "node_modules/ts-interface-checker": { "version": "0.1.13", "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", @@ -18719,15 +18804,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/typed-emitter": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/typed-emitter/-/typed-emitter-2.1.0.tgz", - "integrity": "sha512-g/KzbYKbH5C2vPkaXGu8DJlHrGKHLsM25Zg9WuC9pMGfuvT+X25tZQWo5fK1BjBm8+UrVE9LDCvaY0CQk+fXDA==", - "license": "MIT", - "optionalDependencies": { - "rxjs": "*" - } - }, "node_modules/typedarray": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", @@ -19305,21 +19381,6 @@ "react": "^16.8.0 || ^17.0.0 || ^18.0.0" } }, - "node_modules/usehooks-ts": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/usehooks-ts/-/usehooks-ts-3.1.0.tgz", - "integrity": "sha512-bBIa7yUyPhE1BCc0GmR96VU/15l/9gP1Ch5mYdLcFBaFGQsdmXkvjV0TtOqW1yUd6VjIwDunm+flSciCQXujiw==", - "license": "MIT", - "dependencies": { - "lodash.debounce": "^4.0.8" - }, - "engines": { - "node": ">=16.15.0" - }, - "peerDependencies": { - "react": "^16.8.0 || ^17 || ^18" - } - }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -21330,4 +21391,4 @@ } } } -} \ No newline at end of file +} diff --git a/package.json b/package.json index e779081dc4b..fbddcc91cbb 100644 --- a/package.json +++ b/package.json @@ -103,6 +103,7 @@ "@tailwindcss/container-queries": "^0.1.1", "@tailwindcss/forms": "^0.5.7", "@tailwindcss/typography": "^0.5.13", + "@trivago/prettier-plugin-sort-imports": "^4.3.0", "@types/events": "^3.0.3", "@types/google.maps": "^3.55.8", "@types/lodash-es": "^4.17.12", @@ -168,4 +169,4 @@ "node": ">=20.12.0" }, "packageManager": "npm@10.5.0" -} \ No newline at end of file +} diff --git a/src/App.tsx b/src/App.tsx index eea75d84c1a..62a173c8409 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,13 +1,16 @@ import { Suspense } from "react"; -import Routers from "./Routers"; -import Integrations from "./Integrations"; -import Loading from "@/components/Common/Loading"; -import HistoryAPIProvider from "./Providers/HistoryAPIProvider"; -import AuthUserProvider from "./Providers/AuthUserProvider"; -import PluginEngine from "./PluginEngine"; -import { FeatureFlagsProvider } from "./Utils/featureFlags"; + import { Toaster } from "@/components/ui/toaster"; +import Loading from "@/components/Common/Loading"; + +import Integrations from "@/Integrations"; +import PluginEngine from "@/PluginEngine"; +import AuthUserProvider from "@/Providers/AuthUserProvider"; +import HistoryAPIProvider from "@/Providers/HistoryAPIProvider"; +import Routers from "@/Routers"; +import { FeatureFlagsProvider } from "@/Utils/featureFlags"; + const App = () => { return ( }> diff --git a/src/CAREUI/display/Chip.tsx b/src/CAREUI/display/Chip.tsx index 14f98da8506..a2bacf8bd61 100644 --- a/src/CAREUI/display/Chip.tsx +++ b/src/CAREUI/display/Chip.tsx @@ -1,6 +1,8 @@ -import CareIcon, { IconName } from "../icons/CareIcon"; -import { ButtonVariant } from "@/components/Common/components/ButtonV2"; -import { classNames } from "../../Utils/utils"; +import CareIcon, { IconName } from "@/CAREUI/icons/CareIcon"; + +import { ButtonVariant } from "@/components/Common/ButtonV2"; + +import { classNames } from "@/Utils/utils"; interface Props { size?: "small" | "medium" | "large"; diff --git a/src/CAREUI/display/Count.tsx b/src/CAREUI/display/Count.tsx index 6b28ca4f962..1f43325d010 100644 --- a/src/CAREUI/display/Count.tsx +++ b/src/CAREUI/display/Count.tsx @@ -1,5 +1,6 @@ -import { classNames } from "../../Utils/utils"; -import CareIcon, { IconName } from "../icons/CareIcon"; +import CareIcon, { IconName } from "@/CAREUI/icons/CareIcon"; + +import { classNames } from "@/Utils/utils"; interface Props { count: number; diff --git a/src/CAREUI/display/FilterBadge.tsx b/src/CAREUI/display/FilterBadge.tsx index 0259439a4b8..3a5d40f26f2 100644 --- a/src/CAREUI/display/FilterBadge.tsx +++ b/src/CAREUI/display/FilterBadge.tsx @@ -1,4 +1,4 @@ -import CareIcon from "../icons/CareIcon"; +import CareIcon from "@/CAREUI/icons/CareIcon"; export interface FilterBadgeProps { name: string; diff --git a/src/CAREUI/display/NetworkSignal.tsx b/src/CAREUI/display/NetworkSignal.tsx index d241a37674a..6cc212f2f0a 100644 --- a/src/CAREUI/display/NetworkSignal.tsx +++ b/src/CAREUI/display/NetworkSignal.tsx @@ -1,5 +1,6 @@ -import { classNames } from "../../Utils/utils"; -import CareIcon from "../icons/CareIcon"; +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import { classNames } from "@/Utils/utils"; interface Props { /** diff --git a/src/CAREUI/display/PopupModal.tsx b/src/CAREUI/display/PopupModal.tsx index b0b40f2dc7d..6410addbcc2 100644 --- a/src/CAREUI/display/PopupModal.tsx +++ b/src/CAREUI/display/PopupModal.tsx @@ -1,10 +1,13 @@ import { ReactNode, useEffect, useRef, useState } from "react"; -import { Cancel, Submit } from "@/components/Common/components/ButtonV2"; -import { classNames } from "../../Utils/utils"; import { useTranslation } from "react-i18next"; -import useBreakpoints from "@/common/hooks/useBreakpoints"; + +import { Cancel, Submit } from "@/components/Common/ButtonV2"; import DialogModal from "@/components/Common/Dialog"; +import useBreakpoints from "@/hooks/useBreakpoints"; + +import { classNames } from "@/Utils/utils"; + type Props = { show: boolean; onHide: () => void; diff --git a/src/CAREUI/display/RecordMeta.tsx b/src/CAREUI/display/RecordMeta.tsx index 2363ddbd551..6d04c9b8def 100644 --- a/src/CAREUI/display/RecordMeta.tsx +++ b/src/CAREUI/display/RecordMeta.tsx @@ -1,11 +1,13 @@ -import CareIcon from "../icons/CareIcon"; +import { ReactNode } from "react"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + import { formatDateTime, formatName, isUserOnline, relativeTime, -} from "../../Utils/utils"; -import { ReactNode } from "react"; +} from "@/Utils/utils"; interface Props { time?: string; diff --git a/src/CAREUI/display/SubHeading.tsx b/src/CAREUI/display/SubHeading.tsx index 1161ecd8e55..67072fd9e02 100644 --- a/src/CAREUI/display/SubHeading.tsx +++ b/src/CAREUI/display/SubHeading.tsx @@ -1,6 +1,7 @@ import { ReactNode } from "react"; -import CareIcon from "../icons/CareIcon"; -import RecordMeta from "./RecordMeta"; + +import RecordMeta from "@/CAREUI/display/RecordMeta"; +import CareIcon from "@/CAREUI/icons/CareIcon"; interface Props { title: ReactNode; diff --git a/src/CAREUI/display/Timeline.tsx b/src/CAREUI/display/Timeline.tsx index aa3fd06e7de..2b029ff526f 100644 --- a/src/CAREUI/display/Timeline.tsx +++ b/src/CAREUI/display/Timeline.tsx @@ -1,10 +1,12 @@ -import CareIcon, { IconName } from "../icons/CareIcon"; -import { classNames, formatName } from "../../Utils/utils"; import { createContext, useContext } from "react"; +import { useTranslation } from "react-i18next"; + +import RecordMeta from "@/CAREUI/display/RecordMeta"; +import CareIcon, { IconName } from "@/CAREUI/icons/CareIcon"; -import RecordMeta from "./RecordMeta"; import { UserBareMinimum } from "@/components/Users/models"; -import { useTranslation } from "react-i18next"; + +import { classNames, formatName } from "@/Utils/utils"; export interface TimelineEvent { type: TType; diff --git a/src/CAREUI/icons/CareIcon.tsx b/src/CAREUI/icons/CareIcon.tsx index a45117cc675..80b57085615 100644 --- a/src/CAREUI/icons/CareIcon.tsx +++ b/src/CAREUI/icons/CareIcon.tsx @@ -1,5 +1,5 @@ -import iconData from "./UniconPaths.json"; -import "./icon.css"; +import iconData from "@/CAREUI/icons/UniconPaths.json"; +import "@/CAREUI/icons/icon.css"; export type IconName = keyof typeof iconData; diff --git a/src/CAREUI/icons/Index.tsx b/src/CAREUI/icons/Index.tsx index 527bdfd0a4c..c7f553512aa 100644 --- a/src/CAREUI/icons/Index.tsx +++ b/src/CAREUI/icons/Index.tsx @@ -1,10 +1,13 @@ /* eslint-disable i18next/no-literal-string */ -import React, { useState } from "react"; -import CareIcon, { IconName } from "./CareIcon"; -import iconPaths from "./UniconPaths.json"; import { t } from "i18next"; +import React, { useState } from "react"; + +import CareIcon, { IconName } from "@/CAREUI/icons/CareIcon"; +import iconPaths from "@/CAREUI/icons/UniconPaths.json"; + import PageTitle from "@/components/Common/PageTitle"; -import { useToast } from "@/hooks/use-toast"; + +import { useToast } from "@/hooks/useToast"; const IconIndex: React.FC = () => { const { toast } = useToast(); diff --git a/src/CAREUI/interactive/FiltersSlideover.tsx b/src/CAREUI/interactive/FiltersSlideover.tsx index 4330486e9bc..959fd0621e8 100644 --- a/src/CAREUI/interactive/FiltersSlideover.tsx +++ b/src/CAREUI/interactive/FiltersSlideover.tsx @@ -1,9 +1,12 @@ -import { useTranslation } from "react-i18next"; -import useFilters from "@/common/hooks/useFilters"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import CareIcon from "../icons/CareIcon"; -import SlideOver from "./SlideOver"; import { ReactNode } from "react"; +import { useTranslation } from "react-i18next"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import SlideOver from "@/CAREUI/interactive/SlideOver"; + +import ButtonV2 from "@/components/Common/ButtonV2"; + +import useFilters from "@/hooks/useFilters"; type AdvancedFilter = ReturnType["advancedFilter"]; diff --git a/src/CAREUI/interactive/HumanChart.tsx b/src/CAREUI/interactive/HumanChart.tsx index 63552d28682..1f6d87f31b3 100644 --- a/src/CAREUI/interactive/HumanChart.tsx +++ b/src/CAREUI/interactive/HumanChart.tsx @@ -1,4 +1,5 @@ import { Fragment } from "react/jsx-runtime"; + import { HumanBodyPaths, HumanBodyRegion } from "@/common/constants"; type Props = { diff --git a/src/CAREUI/interactive/KeyboardShortcut.tsx b/src/CAREUI/interactive/KeyboardShortcut.tsx index 4ad46c99387..07f3af6a429 100644 --- a/src/CAREUI/interactive/KeyboardShortcut.tsx +++ b/src/CAREUI/interactive/KeyboardShortcut.tsx @@ -1,5 +1,6 @@ import useKeyboardShortcut from "use-keyboard-shortcut"; -import { classNames, isAppleDevice } from "../../Utils/utils"; + +import { classNames, isAppleDevice } from "@/Utils/utils"; interface Props { children?: React.ReactNode; diff --git a/src/CAREUI/interactive/LegendInput.tsx b/src/CAREUI/interactive/LegendInput.tsx index 83486095f7a..cb415d76ab1 100644 --- a/src/CAREUI/interactive/LegendInput.tsx +++ b/src/CAREUI/interactive/LegendInput.tsx @@ -1,8 +1,10 @@ -import CareIcon from "../icons/CareIcon"; -import { classNames } from "../../Utils/utils"; -import { RefObject, useRef, useState, useEffect } from "react"; +import { RefObject, useEffect, useRef, useState } from "react"; import { useTranslation } from "react-i18next"; +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import { classNames } from "@/Utils/utils"; + type InputProps = { id?: string; name: string; diff --git a/src/CAREUI/interactive/ScrollOverlay.tsx b/src/CAREUI/interactive/ScrollOverlay.tsx index 7389f313e7c..47d3048e2aa 100644 --- a/src/CAREUI/interactive/ScrollOverlay.tsx +++ b/src/CAREUI/interactive/ScrollOverlay.tsx @@ -1,5 +1,6 @@ -import useVisibility from "../../Utils/useVisibility"; -import { classNames } from "../../Utils/utils"; +import useVisibility from "@/hooks/useVisibility"; + +import { classNames } from "@/Utils/utils"; interface Props { className?: string; diff --git a/src/CAREUI/interactive/SlideOver.tsx b/src/CAREUI/interactive/SlideOver.tsx index 78982efc39d..d979be77f99 100644 --- a/src/CAREUI/interactive/SlideOver.tsx +++ b/src/CAREUI/interactive/SlideOver.tsx @@ -4,8 +4,10 @@ import { Transition, TransitionChild, } from "@headlessui/react"; -import { classNames } from "../../Utils/utils"; -import CareIcon from "../icons/CareIcon"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import { classNames } from "@/Utils/utils"; export type SlideFromEdges = "left" | "top" | "right" | "bottom"; diff --git a/src/CAREUI/interactive/Switch.tsx b/src/CAREUI/interactive/Switch.tsx index 495722a0f39..a30f85fbc14 100644 --- a/src/CAREUI/interactive/Switch.tsx +++ b/src/CAREUI/interactive/Switch.tsx @@ -1,4 +1,4 @@ -import { classNames } from "../../Utils/utils"; +import { classNames } from "@/Utils/utils"; interface Props { tabs: Record; diff --git a/src/CAREUI/interactive/Zoom.tsx b/src/CAREUI/interactive/Zoom.tsx index c88412dca1e..0d6513efbba 100644 --- a/src/CAREUI/interactive/Zoom.tsx +++ b/src/CAREUI/interactive/Zoom.tsx @@ -1,6 +1,8 @@ -import { createContext, ReactNode, useContext, useState } from "react"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import CareIcon from "../icons/CareIcon"; +import { ReactNode, createContext, useContext, useState } from "react"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import ButtonV2 from "@/components/Common/ButtonV2"; type ProviderValue = { scale: number; diff --git a/src/CAREUI/misc/AuthorizedChild.tsx b/src/CAREUI/misc/AuthorizedChild.tsx index e71a4f64b5e..5805ed5f44c 100644 --- a/src/CAREUI/misc/AuthorizedChild.tsx +++ b/src/CAREUI/misc/AuthorizedChild.tsx @@ -1,8 +1,10 @@ import { ReactNode } from "react"; -import useAuthUser from "@/common/hooks/useAuthUser"; -import { useIsAuthorized } from "@/common/hooks/useIsAuthorized"; -import useSlug from "@/common/hooks/useSlug"; -import { AuthorizedForCB } from "../../Utils/AuthorizeFor"; + +import useAuthUser from "@/hooks/useAuthUser"; +import { useIsAuthorized } from "@/hooks/useIsAuthorized"; +import useSlug from "@/hooks/useSlug"; + +import { AuthorizedForCB } from "@/Utils/AuthorizeFor"; interface Props { children: (value: { isAuthorized: boolean }) => JSX.Element; diff --git a/src/CAREUI/misc/PaginatedList.tsx b/src/CAREUI/misc/PaginatedList.tsx index 93a3685b394..1c5f9db99a2 100644 --- a/src/CAREUI/misc/PaginatedList.tsx +++ b/src/CAREUI/misc/PaginatedList.tsx @@ -1,13 +1,14 @@ import { createContext, useContext, useEffect, useState } from "react"; -import { PaginatedResponse, QueryRoute } from "../../Utils/request/types"; -import useQuery, { QueryOptions } from "../../Utils/request/useQuery"; -import ButtonV2, { - CommonButtonProps, -} from "@/components/Common/components/ButtonV2"; -import CareIcon from "../icons/CareIcon"; -import { classNames } from "../../Utils/utils"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import ButtonV2, { CommonButtonProps } from "@/components/Common/ButtonV2"; import Pagination from "@/components/Common/Pagination"; +import { PaginatedResponse, QueryRoute } from "@/Utils/request/types"; +import useQuery, { QueryOptions } from "@/Utils/request/useQuery"; +import { classNames } from "@/Utils/utils"; + const DEFAULT_PER_PAGE_LIMIT = 14; interface PaginatedListContext diff --git a/src/CAREUI/misc/PrintPreview.tsx b/src/CAREUI/misc/PrintPreview.tsx index 9efa11cc01b..53eda1339ac 100644 --- a/src/CAREUI/misc/PrintPreview.tsx +++ b/src/CAREUI/misc/PrintPreview.tsx @@ -1,11 +1,19 @@ import { ReactNode } from "react"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import CareIcon from "../icons/CareIcon"; -import { classNames } from "../../Utils/utils"; -import Page from "@/components/Common/components/Page"; -import useBreakpoints from "@/common/hooks/useBreakpoints"; import { useTranslation } from "react-i18next"; -import { ZoomControls, ZoomProvider, ZoomTransform } from "../interactive/Zoom"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import { + ZoomControls, + ZoomProvider, + ZoomTransform, +} from "@/CAREUI/interactive/Zoom"; + +import ButtonV2 from "@/components/Common/ButtonV2"; +import Page from "@/components/Common/Page"; + +import useBreakpoints from "@/hooks/useBreakpoints"; + +import { classNames } from "@/Utils/utils"; type Props = { children: ReactNode; diff --git a/src/Integrations/Plausible.tsx b/src/Integrations/Plausible.tsx index e6c4d2fa42a..dfbb2942e5d 100644 --- a/src/Integrations/Plausible.tsx +++ b/src/Integrations/Plausible.tsx @@ -1,7 +1,8 @@ +import careConfig from "@careConfig"; import { useLocationChange } from "raviger"; -import Script from "@/components/Common/Script"; import { useEffect } from "react"; -import careConfig from "@careConfig"; + +import Script from "@/components/Common/Script"; export default function Plausible() { useLocationChange(() => { diff --git a/src/Integrations/index.tsx b/src/Integrations/index.tsx index 9b2b1e156fd..5582a58bc8e 100644 --- a/src/Integrations/index.tsx +++ b/src/Integrations/index.tsx @@ -1,5 +1,5 @@ -import Sentry from "./Sentry"; -import Plausible from "./Plausible"; +import Plausible from "@/Integrations/Plausible"; +import Sentry from "@/Integrations/Sentry"; const Integrations = { Sentry, Plausible }; diff --git a/src/Locale/hi.json b/src/Locale/hi.json index 20a822323bf..0eb0cc28cfd 100644 --- a/src/Locale/hi.json +++ b/src/Locale/hi.json @@ -809,4 +809,4 @@ "you_need_at_least_a_location_to_create_an_assest": "संपत्ति बनाने के लिए आपको कम से कम एक स्थान की आवश्यकता होगी।", "zoom_in": "ज़ूम इन", "zoom_out": "ज़ूम आउट" -} \ No newline at end of file +} diff --git a/src/Locale/kn.json b/src/Locale/kn.json index 0fa96427b85..be18432e0ce 100644 --- a/src/Locale/kn.json +++ b/src/Locale/kn.json @@ -809,4 +809,4 @@ "you_need_at_least_a_location_to_create_an_assest": "ಆಸ್ತಿಯನ್ನು ರಚಿಸಲು ನಿಮಗೆ ಕನಿಷ್ಠ ಸ್ಥಳದ ಅಗತ್ಯವಿದೆ.", "zoom_in": "ಜೂಮ್ ಇನ್", "zoom_out": "ಜೂಮ್ ಔಟ್" -} \ No newline at end of file +} diff --git a/src/Locale/ml.json b/src/Locale/ml.json index b9a45ca73fb..cf381c32c0e 100644 --- a/src/Locale/ml.json +++ b/src/Locale/ml.json @@ -809,4 +809,4 @@ "you_need_at_least_a_location_to_create_an_assest": "ഒരു അസസ്‌റ്റ് സൃഷ്‌ടിക്കാൻ നിങ്ങൾക്ക് ഒരു ലൊക്കേഷനെങ്കിലും ആവശ്യമാണ്.", "zoom_in": "സൂം ഇൻ ചെയ്യുക", "zoom_out": "സൂം ഔട്ട്" -} \ No newline at end of file +} diff --git a/src/Locale/ta.json b/src/Locale/ta.json index fb5dd0a72c8..694efd52e20 100644 --- a/src/Locale/ta.json +++ b/src/Locale/ta.json @@ -809,4 +809,4 @@ "you_need_at_least_a_location_to_create_an_assest": "ஒரு அசெஸ்ட்டை உருவாக்க குறைந்தபட்சம் ஒரு இருப்பிடமாவது தேவை.", "zoom_in": "பெரிதாக்கவும்", "zoom_out": "பெரிதாக்கவும்" -} \ No newline at end of file +} diff --git a/src/Locale/update_locale.js b/src/Locale/update_locale.js index 61f5e32cf84..204fef3a80a 100644 --- a/src/Locale/update_locale.js +++ b/src/Locale/update_locale.js @@ -1,11 +1,10 @@ /* eslint-disable no-undef */ - import { existsSync, mkdirSync, + readFileSync, readdirSync, writeFileSync, - readFileSync, } from "fs"; const DEFAULT_LOCALE = "en"; diff --git a/src/PluginEngine.tsx b/src/PluginEngine.tsx index a56fe21b5b8..ddceda5a5bd 100644 --- a/src/PluginEngine.tsx +++ b/src/PluginEngine.tsx @@ -1,10 +1,12 @@ -import { CareAppsContext, useCareApps } from "@/common/hooks/useCareApps"; /* eslint-disable i18next/no-literal-string */ import React, { Suspense } from "react"; -import { SupportedPluginComponents, pluginMap } from "./pluginTypes"; import ErrorBoundary from "@/components/Common/ErrorBoundary"; +import { CareAppsContext, useCareApps } from "@/hooks/useCareApps"; + +import { SupportedPluginComponents, pluginMap } from "@/pluginTypes"; + export default function PluginEngine({ children, }: { diff --git a/src/Providers/AuthUserProvider.tsx b/src/Providers/AuthUserProvider.tsx index 43263b98dab..1e4545f64a2 100644 --- a/src/Providers/AuthUserProvider.tsx +++ b/src/Providers/AuthUserProvider.tsx @@ -1,12 +1,16 @@ +import careConfig from "@careConfig"; +import { navigate } from "raviger"; import { useCallback, useEffect } from "react"; -import { AuthUserContext } from "@/common/hooks/useAuthUser"; + import Loading from "@/components/Common/Loading"; -import routes from "../Redux/api"; -import useQuery from "../Utils/request/useQuery"; + +import { AuthUserContext } from "@/hooks/useAuthUser"; + import { LocalStorageKeys } from "@/common/constants"; -import request from "../Utils/request/request"; -import { navigate } from "raviger"; -import careConfig from "@careConfig"; + +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import useQuery from "@/Utils/request/useQuery"; interface Props { children: React.ReactNode; diff --git a/src/Providers/HistoryAPIProvider.tsx b/src/Providers/HistoryAPIProvider.tsx index 0f60437360d..20077733b01 100644 --- a/src/Providers/HistoryAPIProvider.tsx +++ b/src/Providers/HistoryAPIProvider.tsx @@ -1,5 +1,5 @@ import { useLocationChange } from "raviger"; -import { createContext, ReactNode, useState } from "react"; +import { ReactNode, createContext, useState } from "react"; export const HistoryContext = createContext([]); // eslint-disable-next-line @typescript-eslint/no-empty-function diff --git a/src/Routers/AppRouter.tsx b/src/Routers/AppRouter.tsx index 7275c7c2860..c8f6fbec83e 100644 --- a/src/Routers/AppRouter.tsx +++ b/src/Routers/AppRouter.tsx @@ -1,30 +1,34 @@ +import careConfig from "@careConfig"; +import { Redirect, usePath, useRedirect, useRoutes } from "raviger"; +import { useEffect, useState } from "react"; + +import IconIndex from "@/CAREUI/icons/Index"; + +import ABDMFacilityRecords from "@/components/ABDM/ABDMFacilityRecords"; +import HealthInformation from "@/components/ABDM/HealthInformation"; import { DesktopSidebar, MobileSidebar, SIDEBAR_SHRINK_PREFERENCE_KEY, SidebarShrinkContext, } from "@/components/Common/Sidebar/Sidebar"; -import { Redirect, usePath, useRedirect, useRoutes } from "raviger"; -import { useEffect, useState } from "react"; - -import ABDMFacilityRecords from "@/components/ABDM/ABDMFacilityRecords"; -import AssetRoutes from "./routes/AssetRoutes"; -import { BLACKLISTED_PATHS } from "@/common/constants"; -import ConsultationRoutes from "./routes/ConsultationRoutes"; import Error404 from "@/components/ErrorPages/404"; -import FacilityRoutes from "./routes/FacilityRoutes"; -import HealthInformation from "@/components/ABDM/HealthInformation"; -import IconIndex from "../CAREUI/icons/Index"; -import { NoticeBoard } from "@/components/Notifications/NoticeBoard"; -import PatientRoutes from "./routes/PatientRoutes"; -import ResourceRoutes from "./routes/ResourceRoutes"; -import SampleRoutes from "./routes/SampleRoutes"; import SessionExpired from "@/components/ErrorPages/SessionExpired"; -import ShiftingRoutes from "./routes/ShiftingRoutes"; +import { NoticeBoard } from "@/components/Notifications/NoticeBoard"; import ShowPushNotification from "@/components/Notifications/ShowPushNotification"; -import UserRoutes from "./routes/UserRoutes"; -import careConfig from "@careConfig"; -import { usePluginRoutes } from "@/common/hooks/useCareApps"; + +import { usePluginRoutes } from "@/hooks/useCareApps"; + +import { BLACKLISTED_PATHS } from "@/common/constants"; + +import AssetRoutes from "@/Routers/routes/AssetRoutes"; +import ConsultationRoutes from "@/Routers/routes/ConsultationRoutes"; +import FacilityRoutes from "@/Routers/routes/FacilityRoutes"; +import PatientRoutes from "@/Routers/routes/PatientRoutes"; +import ResourceRoutes from "@/Routers/routes/ResourceRoutes"; +import SampleRoutes from "@/Routers/routes/SampleRoutes"; +import ShiftingRoutes from "@/Routers/routes/ShiftingRoutes"; +import UserRoutes from "@/Routers/routes/UserRoutes"; export type RouteParams = T extends `${string}:${infer Param}/${infer Rest}` diff --git a/src/Routers/SessionRouter.tsx b/src/Routers/SessionRouter.tsx index f6556b38c39..fb6e097a243 100644 --- a/src/Routers/SessionRouter.tsx +++ b/src/Routers/SessionRouter.tsx @@ -1,7 +1,8 @@ -import { Login, ResetPassword } from "@/components/Auth"; import { useRoutes } from "raviger"; -import SessionExpired from "@/components/ErrorPages/SessionExpired"; + +import { Login, ResetPassword } from "@/components/Auth"; import InvalidReset from "@/components/ErrorPages/InvalidReset"; +import SessionExpired from "@/components/ErrorPages/SessionExpired"; import LicensesPage from "@/components/Licenses/LicensesPage"; const routes = { diff --git a/src/Routers/index.tsx b/src/Routers/index.tsx index 8a27df7b59d..e1b507dbde0 100644 --- a/src/Routers/index.tsx +++ b/src/Routers/index.tsx @@ -1,5 +1,5 @@ -import SessionRouter from "./SessionRouter"; -import AppRouter from "./AppRouter"; +import AppRouter from "@/Routers/AppRouter"; +import SessionRouter from "@/Routers/SessionRouter"; const routers = { SessionRouter, AppRouter }; diff --git a/src/Routers/routes/AssetRoutes.tsx b/src/Routers/routes/AssetRoutes.tsx index 4c32df55069..8a54e465c79 100644 --- a/src/Routers/routes/AssetRoutes.tsx +++ b/src/Routers/routes/AssetRoutes.tsx @@ -2,7 +2,8 @@ import AssetConfigure from "@/components/Assets/AssetConfigure"; import AssetManage from "@/components/Assets/AssetManage"; import AssetsList from "@/components/Assets/AssetsList"; import AssetCreate from "@/components/Facility/AssetCreate"; -import { AppRoutes } from "../AppRouter"; + +import { AppRoutes } from "@/Routers/AppRouter"; const AssetRoutes: AppRoutes = { "/assets": () => , diff --git a/src/Routers/routes/ConsultationRoutes.tsx b/src/Routers/routes/ConsultationRoutes.tsx index bb804bd7613..2d283df27d7 100644 --- a/src/Routers/routes/ConsultationRoutes.tsx +++ b/src/Routers/routes/ConsultationRoutes.tsx @@ -1,19 +1,20 @@ +import { ConsultationDetails } from "@/components/Facility/ConsultationDetails"; +import ConsultationDoctorNotes from "@/components/Facility/ConsultationDoctorNotes"; import { ConsultationForm } from "@/components/Facility/ConsultationForm"; import Investigation from "@/components/Facility/Investigations"; +import InvestigationPrintPreview from "@/components/Facility/Investigations/InvestigationsPrintPreview"; import ShowInvestigation from "@/components/Facility/Investigations/ShowInvestigation"; -import ManagePrescriptions from "@/components/Medicine/ManagePrescriptions"; -import { DailyRoundListDetails } from "@/components/Patient/DailyRoundListDetails"; -import { DailyRounds } from "@/components/Patient/DailyRounds"; -import { ConsultationDetails } from "@/components/Facility/ConsultationDetails"; import TreatmentSummary from "@/components/Facility/TreatmentSummary"; -import ConsultationDoctorNotes from "@/components/Facility/ConsultationDoctorNotes"; -import PatientConsentRecords from "@/components/Patient/PatientConsentRecords"; import CriticalCareEditor from "@/components/LogUpdate/CriticalCareEditor"; -import PrescriptionsPrintPreview from "@/components/Medicine/PrintPreview"; import CriticalCarePreview from "@/components/LogUpdate/CriticalCarePreview"; +import ManagePrescriptions from "@/components/Medicine/ManagePrescriptions"; +import PrescriptionsPrintPreview from "@/components/Medicine/PrintPreview"; +import { DailyRoundListDetails } from "@/components/Patient/DailyRoundListDetails"; +import { DailyRounds } from "@/components/Patient/DailyRounds"; import FileUploadPage from "@/components/Patient/FileUploadPage"; -import InvestigationPrintPreview from "@/components/Facility/Investigations/InvestigationsPrintPreview"; -import { AppRoutes } from "../AppRouter"; +import PatientConsentRecords from "@/components/Patient/PatientConsentRecords"; + +import { AppRoutes } from "@/Routers/AppRouter"; const consultationRoutes: AppRoutes = { "/facility/:facilityId/patient/:patientId/consultation": ({ diff --git a/src/Routers/routes/FacilityInventoryRoutes.tsx b/src/Routers/routes/FacilityInventoryRoutes.tsx index 3de193ffe08..e096460ed46 100644 --- a/src/Routers/routes/FacilityInventoryRoutes.tsx +++ b/src/Routers/routes/FacilityInventoryRoutes.tsx @@ -1,9 +1,11 @@ import { Redirect } from "raviger"; + import InventoryList from "@/components/Facility/InventoryList"; import InventoryLog from "@/components/Facility/InventoryLog"; import MinQuantityList from "@/components/Facility/MinQuantityList"; import { SetInventoryForm } from "@/components/Facility/SetInventoryForm"; -import { AppRoutes } from "../AppRouter"; + +import { AppRoutes } from "@/Routers/AppRouter"; const FacilityInventoryRoutes: AppRoutes = { "/facility/:facilityId/inventory": ({ facilityId }) => ( diff --git a/src/Routers/routes/FacilityLocationRoutes.tsx b/src/Routers/routes/FacilityLocationRoutes.tsx index e2f574664ce..c142ed5ed01 100644 --- a/src/Routers/routes/FacilityLocationRoutes.tsx +++ b/src/Routers/routes/FacilityLocationRoutes.tsx @@ -1,12 +1,13 @@ +import CentralLiveMonitoring from "@/components/CameraFeed/CentralLiveMonitoring"; import { AddBedForm } from "@/components/Facility/AddBedForm"; import { AddInventoryForm } from "@/components/Facility/AddInventoryForm"; import { AddLocationForm } from "@/components/Facility/AddLocationForm"; import { BedManagement } from "@/components/Facility/BedManagement"; import LocationManagement from "@/components/Facility/LocationManagement"; -import CentralLiveMonitoring from "@/components/CameraFeed/CentralLiveMonitoring"; -import { AuthorizeUserRoute } from "../../Utils/AuthorizeFor"; -import { CameraFeedPermittedUserTypes } from "../../Utils/permissions"; -import { AppRoutes } from "../AppRouter"; + +import { AppRoutes } from "@/Routers/AppRouter"; +import { AuthorizeUserRoute } from "@/Utils/AuthorizeFor"; +import { CameraFeedPermittedUserTypes } from "@/Utils/permissions"; const FacilityLocationRoutes: AppRoutes = { "/facility/:facilityId/location": ({ facilityId }) => ( diff --git a/src/Routers/routes/FacilityRoutes.tsx b/src/Routers/routes/FacilityRoutes.tsx index e3b787abd9f..8c942518996 100644 --- a/src/Routers/routes/FacilityRoutes.tsx +++ b/src/Routers/routes/FacilityRoutes.tsx @@ -1,15 +1,16 @@ +import CentralNursingStation from "@/components/Facility/CentralNursingStation"; +import DischargedPatientsList from "@/components/Facility/DischargedPatientsList"; import { FacilityConfigure } from "@/components/Facility/FacilityConfigure"; import { FacilityCreate } from "@/components/Facility/FacilityCreate"; import { FacilityHome } from "@/components/Facility/FacilityHome"; -import FacilityUsers from "@/components/Facility/FacilityUsers"; import { FacilityList } from "@/components/Facility/FacilityList"; +import FacilityUsers from "@/components/Facility/FacilityUsers"; import { TriageForm } from "@/components/Facility/TriageForm"; import ResourceCreate from "@/components/Resource/ResourceCreate"; -import CentralNursingStation from "@/components/Facility/CentralNursingStation"; -import FacilityLocationRoutes from "./FacilityLocationRoutes"; -import FacilityInventoryRoutes from "./FacilityInventoryRoutes"; -import DischargedPatientsList from "@/components/Facility/DischargedPatientsList"; -import { AppRoutes } from "../AppRouter"; + +import { AppRoutes } from "@/Routers/AppRouter"; +import FacilityInventoryRoutes from "@/Routers/routes/FacilityInventoryRoutes"; +import FacilityLocationRoutes from "@/Routers/routes/FacilityLocationRoutes"; const FacilityRoutes: AppRoutes = { "/facility": () => , diff --git a/src/Routers/routes/PatientRoutes.tsx b/src/Routers/routes/PatientRoutes.tsx index 8f9d8bd460f..0a46190cfd1 100644 --- a/src/Routers/routes/PatientRoutes.tsx +++ b/src/Routers/routes/PatientRoutes.tsx @@ -1,12 +1,13 @@ +import DeathReport from "@/components/DeathReport/DeathReport"; import InvestigationReports from "@/components/Facility/Investigations/Reports"; +import FileUploadPage from "@/components/Patient/FileUploadPage"; +import { InsuranceDetails } from "@/components/Patient/InsuranceDetails"; import { PatientManager } from "@/components/Patient/ManagePatients"; import { PatientHome } from "@/components/Patient/PatientHome"; import PatientNotes from "@/components/Patient/PatientNotes"; import { PatientRegister } from "@/components/Patient/PatientRegister"; -import DeathReport from "@/components/DeathReport/DeathReport"; -import { InsuranceDetails } from "@/components/Patient/InsuranceDetails"; -import FileUploadPage from "@/components/Patient/FileUploadPage"; -import { AppRoutes } from "../AppRouter"; + +import { AppRoutes } from "@/Routers/AppRouter"; const PatientRoutes: AppRoutes = { "/patients": () => , diff --git a/src/Routers/routes/ResourceRoutes.tsx b/src/Routers/routes/ResourceRoutes.tsx index 24e60ec5ad9..547aeb53610 100644 --- a/src/Routers/routes/ResourceRoutes.tsx +++ b/src/Routers/routes/ResourceRoutes.tsx @@ -1,10 +1,12 @@ -import ResourceDetails from "@/components/Resource/ResourceDetails"; -import { ResourceDetailsUpdate } from "@/components/Resource/ResourceDetailsUpdate"; import { Redirect } from "raviger"; -import { AppRoutes } from "../AppRouter"; + import BoardView from "@/components/Resource/ResourceBoard"; +import ResourceDetails from "@/components/Resource/ResourceDetails"; +import { ResourceDetailsUpdate } from "@/components/Resource/ResourceDetailsUpdate"; import ListView from "@/components/Resource/ResourceList"; +import { AppRoutes } from "@/Routers/AppRouter"; + const getDefaultView = () => localStorage.getItem("defaultResourceView") === "list" ? "list" : "board"; diff --git a/src/Routers/routes/SampleRoutes.tsx b/src/Routers/routes/SampleRoutes.tsx index a09f5603a62..d9d3162cdd9 100644 --- a/src/Routers/routes/SampleRoutes.tsx +++ b/src/Routers/routes/SampleRoutes.tsx @@ -2,7 +2,8 @@ import { SampleDetails } from "@/components/Patient/SampleDetails"; import SampleReport from "@/components/Patient/SamplePreview"; import { SampleTest } from "@/components/Patient/SampleTest"; import SampleViewAdmin from "@/components/Patient/SampleViewAdmin"; -import { AppRoutes } from "../AppRouter"; + +import { AppRoutes } from "@/Routers/AppRouter"; const SampleRoutes: AppRoutes = { "/sample": () => , diff --git a/src/Routers/routes/ShiftingRoutes.tsx b/src/Routers/routes/ShiftingRoutes.tsx index b5448cc527f..68131390f50 100644 --- a/src/Routers/routes/ShiftingRoutes.tsx +++ b/src/Routers/routes/ShiftingRoutes.tsx @@ -1,10 +1,12 @@ +import { Redirect } from "raviger"; + import { ShiftCreate } from "@/components/Patient/ShiftCreate"; import ShiftDetails from "@/components/Shifting/ShiftDetails"; import { ShiftDetailsUpdate } from "@/components/Shifting/ShiftDetailsUpdate"; -import ListView from "@/components/Shifting/ShiftingList"; import BoardView from "@/components/Shifting/ShiftingBoard"; -import { Redirect } from "raviger"; -import { AppRoutes } from "../AppRouter"; +import ListView from "@/components/Shifting/ShiftingList"; + +import { AppRoutes } from "@/Routers/AppRouter"; const getDefaultView = () => localStorage.getItem("defaultShiftView") === "list" ? "list" : "board"; diff --git a/src/Routers/routes/UserRoutes.tsx b/src/Routers/routes/UserRoutes.tsx index d7542c15a15..ff7212a02e2 100644 --- a/src/Routers/routes/UserRoutes.tsx +++ b/src/Routers/routes/UserRoutes.tsx @@ -1,7 +1,8 @@ import ManageUsers from "@/components/Users/ManageUsers"; import { UserAdd } from "@/components/Users/UserAdd"; import UserProfile from "@/components/Users/UserProfile"; -import { AppRoutes } from "../AppRouter"; + +import { AppRoutes } from "@/Routers/AppRouter"; const UserRoutes: AppRoutes = { "/users": () => , diff --git a/src/Utils/AuthorizeFor.tsx b/src/Utils/AuthorizeFor.tsx index 6e1e048ee4e..6324dd9909e 100644 --- a/src/Utils/AuthorizeFor.tsx +++ b/src/Utils/AuthorizeFor.tsx @@ -1,8 +1,11 @@ -import { UserRole } from "@/common/constants"; import React from "react"; -import useAuthUser from "@/common/hooks/useAuthUser"; + import Error404 from "@/components/ErrorPages/404"; +import useAuthUser from "@/hooks/useAuthUser"; + +import { UserRole } from "@/common/constants"; + export type AuthorizedForCB = (userType: UserRole) => boolean; interface AuthorizeUserRouteProps { diff --git a/src/Utils/AutoSave.tsx b/src/Utils/AutoSave.tsx index 45217dd51b4..f621a58802d 100644 --- a/src/Utils/AutoSave.tsx +++ b/src/Utils/AutoSave.tsx @@ -1,16 +1,20 @@ import React, { - useReducer, + Dispatch, + ReactNode, + useContext, useEffect, + useReducer, useRef, useState, - Dispatch, - useContext, - ReactNode, } from "react"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + import { Button } from "@/components/ui/button"; + import { FormAction, FormReducer, FormState } from "@/components/Form/Utils"; -import { relativeTime } from "./utils"; -import CareIcon from "@/CAREUI/icons/CareIcon"; + +import { relativeTime } from "@/Utils/utils"; type Draft = { timestamp: number; diff --git a/src/Utils/Notifications.js b/src/Utils/Notifications.js index ce57ab5edd9..5b3ecdf143c 100644 --- a/src/Utils/Notifications.js +++ b/src/Utils/Notifications.js @@ -1,6 +1,6 @@ -import { alert, Stack, defaultModules } from "@pnotify/core"; +import { Stack, alert, defaultModules } from "@pnotify/core"; import * as PNotifyMobile from "@pnotify/mobile"; -import { startCase, camelCase } from "lodash-es"; +import { camelCase, startCase } from "lodash-es"; defaultModules.set(PNotifyMobile, {}); diff --git a/src/Utils/dayjs.ts b/src/Utils/dayjs.ts index b70c2fc044b..a053cd1ffbb 100644 --- a/src/Utils/dayjs.ts +++ b/src/Utils/dayjs.ts @@ -1,8 +1,8 @@ import dayjs from "dayjs"; -import relativeTime from "dayjs/plugin/relativeTime"; -import duration from "dayjs/plugin/duration"; import customParseFormat from "dayjs/plugin/customParseFormat"; +import duration from "dayjs/plugin/duration"; import isBetween from "dayjs/plugin/isBetween"; +import relativeTime from "dayjs/plugin/relativeTime"; dayjs.extend(relativeTime); dayjs.extend(duration); diff --git a/src/Utils/featureFlags.tsx b/src/Utils/featureFlags.tsx index 7a1fd85e28b..a475bee57d6 100644 --- a/src/Utils/featureFlags.tsx +++ b/src/Utils/featureFlags.tsx @@ -1,9 +1,12 @@ -import { createContext, useContext, useState, useEffect } from "react"; -import useQuery from "./request/useQuery"; -import routes from "../Redux/api"; -import useAuthUser from "@/common/hooks/useAuthUser"; +import { createContext, useContext, useEffect, useState } from "react"; + import { FacilityModel } from "@/components/Facility/models"; +import useAuthUser from "@/hooks/useAuthUser"; + +import routes from "@/Utils/request/api"; +import useQuery from "@/Utils/request/useQuery"; + export type FeatureFlag = "SCRIBE_ENABLED"; // "HCX_ENABLED" | "ABDM_ENABLED" | export interface FeatureFlagsResponse { diff --git a/src/Utils/permissions.ts b/src/Utils/permissions.ts index 3037f23c9f7..35f12715eff 100644 --- a/src/Utils/permissions.ts +++ b/src/Utils/permissions.ts @@ -1,6 +1,7 @@ -import { USER_TYPES, UserRole } from "@/common/constants"; import { UserModel } from "@/components/Users/models"; +import { USER_TYPES, UserRole } from "@/common/constants"; + export const showUserDelete = (authUser: UserModel, targetUser: UserModel) => { // Auth user should be higher in hierarchy than target user if ( diff --git a/src/Redux/api.tsx b/src/Utils/request/api.tsx similarity index 99% rename from src/Redux/api.tsx rename to src/Utils/request/api.tsx index a2794e35203..441b9a3d8c8 100644 --- a/src/Redux/api.tsx +++ b/src/Utils/request/api.tsx @@ -1,7 +1,13 @@ +import { AbhaNumberModel } from "@/components/ABDM/types/abha"; import { ConsentRequestModel, CreateConsentTBody, } from "@/components/ABDM/types/consent"; +import { + IHealthFacility, + IcreateHealthFacilityTBody, + IpartialUpdateHealthFacilityTBody, +} from "@/components/ABDM/types/health-facility"; import { HealthInformationModel } from "@/components/ABDM/types/health-information"; import { AssetBedBody, @@ -14,6 +20,22 @@ import { AvailabilityRecord, PatientAssetBed, } from "@/components/Assets/AssetTypes"; +import { ICD11DiagnosisModel } from "@/components/Diagnosis/types"; +import { + IDeleteBedCapacity, + ILocalBodies, + ILocalBodyByDistrict, +} from "@/components/ExternalResult/models"; +import { + EventGeneric, + type Type, +} from "@/components/Facility/ConsultationDetails/Events/types"; +import { + InvestigationGroup, + InvestigationType, +} from "@/components/Facility/Investigations"; +import { Investigation } from "@/components/Facility/Investigations/Reports/types"; +import { InvestigationSessionType } from "@/components/Facility/Investigations/investigationsTab"; import { BedModel, CapacityModal, @@ -47,40 +69,30 @@ import { StateModel, WardModel, } from "@/components/Facility/models"; -import { - DailyRoundsModel, - PatientModel, - SampleReportModel, - SampleTestModel, -} from "@/components/Patient/models"; -import { - IDeleteBedCapacity, - ILocalBodies, - ILocalBodyByDistrict, -} from "@/components/ExternalResult/models"; -import { - InvestigationGroup, - InvestigationType, -} from "@/components/Facility/Investigations"; import { DupPatientModel, PatientConsentModel, PatientTransferRequest, } from "@/components/Facility/models"; +import { InsurerOptionModel } from "@/components/HCX/InsurerAutocomplete"; +import { HCXPolicyModel } from "@/components/HCX/models"; import { MedibaseMedicine, Prescription } from "@/components/Medicine/models"; import { NotificationData, PNconfigData, } from "@/components/Notifications/models"; -import { HCXPolicyModel } from "@/components/HCX/models"; -import { ICD11DiagnosisModel } from "@/components/Diagnosis/types"; -import { Investigation } from "@/components/Facility/Investigations/Reports/types"; -import { PaginatedResponse } from "../Utils/request/types"; +import { + DailyRoundsModel, + PatientModel, + SampleReportModel, + SampleTestModel, +} from "@/components/Patient/models"; import { CreateFileRequest, CreateFileResponse, FileUploadModel, } from "@/components/Patient/models"; +import { ScribeModel } from "@/components/Scribe/Scribe"; import { SkillModel, SkillObjectModel, @@ -88,19 +100,8 @@ import { UserAssignedModel, UserModel, } from "@/components/Users/models"; -import { - EventGeneric, - type Type, -} from "@/components/Facility/ConsultationDetails/Events/types"; -import { InvestigationSessionType } from "@/components/Facility/Investigations/investigationsTab"; -import { AbhaNumberModel } from "@/components/ABDM/types/abha"; -import { ScribeModel } from "@/components/Scribe/Scribe"; -import { - IcreateHealthFacilityTBody, - IHealthFacility, - IpartialUpdateHealthFacilityTBody, -} from "@/components/ABDM/types/health-facility"; -import { InsurerOptionModel } from "@/components/HCX/InsurerAutocomplete"; + +import { PaginatedResponse } from "@/Utils/request/types"; /** * A fake function that returns an empty object casted to type T diff --git a/src/Utils/request/handleResponse.ts b/src/Utils/request/handleResponse.ts index 905417ad0e2..339d5559b6b 100644 --- a/src/Utils/request/handleResponse.ts +++ b/src/Utils/request/handleResponse.ts @@ -1,7 +1,8 @@ -import { RequestResult } from "./types"; -import * as Notifications from "../Notifications"; import { navigate } from "raviger"; +import * as Notifications from "@/Utils/Notifications"; +import { RequestResult } from "@/Utils/request/types"; + export default function handleResponse( { res, error }: RequestResult, silent?: boolean, diff --git a/src/Utils/request/request.ts b/src/Utils/request/request.ts index 3fa648316af..d036ad49750 100644 --- a/src/Utils/request/request.ts +++ b/src/Utils/request/request.ts @@ -1,7 +1,8 @@ import careConfig from "@careConfig"; -import handleResponse from "./handleResponse"; -import { RequestOptions, RequestResult, Route } from "./types"; -import { makeHeaders, makeUrl } from "./utils"; + +import handleResponse from "@/Utils/request/handleResponse"; +import { RequestOptions, RequestResult, Route } from "@/Utils/request/types"; +import { makeHeaders, makeUrl } from "@/Utils/request/utils"; type ControllerXORControllerRef = | { diff --git a/src/Utils/request/uploadFile.ts b/src/Utils/request/uploadFile.ts index ca62672f642..005eeaf92aa 100644 --- a/src/Utils/request/uploadFile.ts +++ b/src/Utils/request/uploadFile.ts @@ -1,6 +1,7 @@ import { Dispatch, SetStateAction } from "react"; -import { handleUploadPercentage } from "./utils"; -import * as Notification from "../../Utils/Notifications"; + +import * as Notification from "@/Utils/Notifications"; +import { handleUploadPercentage } from "@/Utils/request/utils"; const uploadFile = ( url: string, diff --git a/src/Utils/request/useMutation.ts b/src/Utils/request/useMutation.ts index 737b32a2237..fbc6edc3940 100644 --- a/src/Utils/request/useMutation.ts +++ b/src/Utils/request/useMutation.ts @@ -1,3 +1,5 @@ +import React from "react"; + import request from "@/Utils/request/request"; import { MutationRoute, @@ -5,7 +7,6 @@ import { RequestResult, } from "@/Utils/request/types"; import { mergeRequestOptions } from "@/Utils/request/utils"; -import React from "react"; export default function useMutation( route: MutationRoute, diff --git a/src/Utils/request/useQuery.ts b/src/Utils/request/useQuery.ts index d9bec8f7a05..109ff0bb2f1 100644 --- a/src/Utils/request/useQuery.ts +++ b/src/Utils/request/useQuery.ts @@ -1,7 +1,12 @@ import { useCallback, useEffect, useRef, useState } from "react"; -import { QueryRoute, RequestOptions, RequestResult } from "./types"; -import request from "./request"; -import { mergeRequestOptions } from "./utils"; + +import request from "@/Utils/request/request"; +import { + QueryRoute, + RequestOptions, + RequestResult, +} from "@/Utils/request/types"; +import { mergeRequestOptions } from "@/Utils/request/utils"; export interface QueryOptions extends RequestOptions { prefetch?: boolean; diff --git a/src/Utils/request/utils.ts b/src/Utils/request/utils.ts index 2734625e196..8fd7bc96bea 100644 --- a/src/Utils/request/utils.ts +++ b/src/Utils/request/utils.ts @@ -1,7 +1,9 @@ import { Dispatch, SetStateAction } from "react"; + import { LocalStorageKeys } from "@/common/constants"; -import * as Notification from "../Notifications"; -import { QueryParams, RequestOptions } from "./types"; + +import * as Notification from "@/Utils/Notifications"; +import { QueryParams, RequestOptions } from "@/Utils/request/types"; export function makeUrl( path: string, diff --git a/src/Utils/useRecorder.d.ts b/src/Utils/useRecorder.d.ts deleted file mode 100644 index ed253a47646..00000000000 --- a/src/Utils/useRecorder.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import useRecorder from "./useRecorder"; -export default useRecorder as any; diff --git a/src/Utils/useSegmentedRecorder.ts b/src/Utils/useSegmentedRecorder.ts index fe38afb3b06..c10379a9d12 100644 --- a/src/Utils/useSegmentedRecorder.ts +++ b/src/Utils/useSegmentedRecorder.ts @@ -1,7 +1,8 @@ -import { useState, useEffect } from "react"; -import * as Notify from "./Notifications"; +import { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; +import * as Notify from "@/Utils/Notifications"; + const useSegmentedRecording = () => { const [isRecording, setIsRecording] = useState(false); const [recorder, setRecorder] = useState(null); diff --git a/src/Utils/utils.ts b/src/Utils/utils.ts index 4ba10746d61..3888406ad29 100644 --- a/src/Utils/utils.ts +++ b/src/Utils/utils.ts @@ -1,7 +1,9 @@ +import { PatientModel } from "@/components/Patient/models"; + import { AREACODES, IN_LANDLINE_AREA_CODES } from "@/common/constants"; import phoneCodesJson from "@/common/static/countryPhoneAndFlags.json"; -import dayjs from "./dayjs"; -import { PatientModel } from "@/components/Patient/models"; + +import dayjs from "@/Utils/dayjs"; interface ApacheParams { age: number; diff --git a/src/common/constants.tsx b/src/common/constants.tsx index 87432fcaadb..b917ea1aa68 100644 --- a/src/common/constants.tsx +++ b/src/common/constants.tsx @@ -1,13 +1,16 @@ +import { IconName } from "@/CAREUI/icons/CareIcon"; + +import { ConsentHIType, ConsentPurpose } from "@/components/ABDM/types/consent"; +import { SortOption } from "@/components/Common/SortDropdown"; import { PatientCategory, SpokeRelationship, } from "@/components/Facility/models"; -import { SortOption } from "@/components/Common/SortDropdown"; -import { dateQueryString } from "../Utils/utils"; -import { IconName } from "../CAREUI/icons/CareIcon"; import { PhoneNumberValidator } from "@/components/Form/FieldValidators"; -import { SchemaType } from "./schemaParser"; -import { ConsentHIType, ConsentPurpose } from "@/components/ABDM/types/consent"; + +import { SchemaType } from "@/common/schemaParser"; + +import { dateQueryString } from "@/Utils/utils"; export const RESULTS_PER_PAGE_LIMIT = 14; export const PAGINATION_LIMIT = 36; diff --git a/src/common/utils.tsx b/src/common/utils.tsx index 4e14e3bf5ba..7089851a018 100644 --- a/src/common/utils.tsx +++ b/src/common/utils.tsx @@ -1,7 +1,9 @@ /* eslint-disable react-hooks/exhaustive-deps */ import { useEffect } from "react"; -import { OptionsType } from "./constants"; -import { humanizeStrings } from "../Utils/utils"; + +import { OptionsType } from "@/common/constants"; + +import { humanizeStrings } from "@/Utils/utils"; export interface statusType { aborted?: boolean; diff --git a/src/components/ABDM/ABDMFacilityRecords.tsx b/src/components/ABDM/ABDMFacilityRecords.tsx index 3e23e82fc8f..50fcbeb863a 100644 --- a/src/components/ABDM/ABDMFacilityRecords.tsx +++ b/src/components/ABDM/ABDMFacilityRecords.tsx @@ -1,13 +1,16 @@ import { Link } from "raviger"; -import routes from "../../Redux/api"; -import useQuery from "../../Utils/request/useQuery"; -import { classNames, formatDateTime } from "../../Utils/utils"; -import Loading from "@/components/Common/Loading"; -import Page from "@/components/Common/components/Page"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; import { useTranslation } from "react-i18next"; +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import ButtonV2 from "@/components/Common/ButtonV2"; +import Loading from "@/components/Common/Loading"; +import Page from "@/components/Common/Page"; + +import routes from "@/Utils/request/api"; +import useQuery from "@/Utils/request/useQuery"; +import { classNames, formatDateTime } from "@/Utils/utils"; + interface IProps { facilityId: string; } diff --git a/src/components/ABDM/ABDMRecordsTab.tsx b/src/components/ABDM/ABDMRecordsTab.tsx index d97edbb0cc2..3b6f2493fb4 100644 --- a/src/components/ABDM/ABDMRecordsTab.tsx +++ b/src/components/ABDM/ABDMRecordsTab.tsx @@ -1,16 +1,22 @@ -import { ConsentArtefactModel, ConsentRequestModel } from "./types/consent"; import dayjs from "dayjs"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import * as Notification from "../../Utils/Notifications"; -import Loading from "@/components/Common/Loading"; -import { classNames, formatName } from "../../Utils/utils"; import { Link } from "raviger"; -import routes from "../../Redux/api"; -import request from "../../Utils/request/request"; -import useQuery from "../../Utils/request/useQuery"; import { useTranslation } from "react-i18next"; +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import { + ConsentArtefactModel, + ConsentRequestModel, +} from "@/components/ABDM/types/consent"; +import ButtonV2 from "@/components/Common/ButtonV2"; +import Loading from "@/components/Common/Loading"; + +import * as Notification from "@/Utils/Notifications"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import useQuery from "@/Utils/request/useQuery"; +import { classNames, formatName } from "@/Utils/utils"; + interface IConsentArtefactCardProps { artefact: ConsentArtefactModel; } diff --git a/src/components/ABDM/ABHAProfileModal.tsx b/src/components/ABDM/ABHAProfileModal.tsx index f242a1e2fa8..1e348a40778 100644 --- a/src/components/ABDM/ABHAProfileModal.tsx +++ b/src/components/ABDM/ABHAProfileModal.tsx @@ -1,15 +1,17 @@ -import * as Notify from "../../Utils/Notifications"; - -import CareIcon from "../../CAREUI/icons/CareIcon"; -import DialogModal from "@/components/Common/Dialog"; import QRCode from "qrcode.react"; -import { formatDateTime } from "../../Utils/utils"; import { useRef } from "react"; -import request from "../../Utils/request/request"; -import routes from "../../Redux/api"; -import { AbhaNumberModel } from "./types/abha"; import { useTranslation } from "react-i18next"; +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import { AbhaNumberModel } from "@/components/ABDM/types/abha"; +import DialogModal from "@/components/Common/Dialog"; + +import * as Notify from "@/Utils/Notifications"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import { formatDateTime } from "@/Utils/utils"; + interface IProps { patientId?: string; abha?: AbhaNumberModel; diff --git a/src/components/ABDM/ConfigureHealthFacility.tsx b/src/components/ABDM/ConfigureHealthFacility.tsx index 78b71e58bc3..ba3eb325dec 100644 --- a/src/components/ABDM/ConfigureHealthFacility.tsx +++ b/src/components/ABDM/ConfigureHealthFacility.tsx @@ -1,17 +1,19 @@ -import { useReducer, useState } from "react"; -import * as Notification from "../../Utils/Notifications"; import { navigate } from "raviger"; -import { Submit } from "@/components/Common/components/ButtonV2"; -import TextFormField from "../Form/FormFields/TextFormField"; -import { classNames } from "../../Utils/utils"; -import useQuery from "../../Utils/request/useQuery"; -import routes from "../../Redux/api"; -import request from "../../Utils/request/request"; -import { FieldChangeEvent } from "../Form/FormFields/Utils"; -import { IHealthFacility } from "./types/health-facility"; +import { useReducer, useState } from "react"; import { useTranslation } from "react-i18next"; +import { IHealthFacility } from "@/components/ABDM/types/health-facility"; +import { Submit } from "@/components/Common/ButtonV2"; import Loading from "@/components/Common/Loading"; +import TextFormField from "@/components/Form/FormFields/TextFormField"; +import { FieldChangeEvent } from "@/components/Form/FormFields/Utils"; + +import * as Notification from "@/Utils/Notifications"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import useQuery from "@/Utils/request/useQuery"; +import { classNames } from "@/Utils/utils"; + const initForm = { health_facility: null as IHealthFacility | null, hf_id: "", diff --git a/src/components/ABDM/FetchRecordsModal.tsx b/src/components/ABDM/FetchRecordsModal.tsx index 441bee0ddbd..9433374f931 100644 --- a/src/components/ABDM/FetchRecordsModal.tsx +++ b/src/components/ABDM/FetchRecordsModal.tsx @@ -1,24 +1,27 @@ -import * as Notification from "../../Utils/Notifications"; +import dayjs from "dayjs"; +import { navigate } from "raviger"; +import { useState } from "react"; +import { useTranslation } from "react-i18next"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; +import { AbhaNumberModel } from "@/components/ABDM/types/abha"; +import { ConsentHIType, ConsentPurpose } from "@/components/ABDM/types/consent"; +import ButtonV2 from "@/components/Common/ButtonV2"; import DialogModal from "@/components/Common/Dialog"; -import TextFormField from "../Form/FormFields/TextFormField"; -import { useState } from "react"; +import DateFormField from "@/components/Form/FormFields/DateFormField"; +import DateRangeFormField from "@/components/Form/FormFields/DateRangeFormField"; import { MultiSelectFormField, SelectFormField, -} from "../Form/FormFields/SelectFormField"; +} from "@/components/Form/FormFields/SelectFormField"; +import TextFormField from "@/components/Form/FormFields/TextFormField"; + +import { useMessageListener } from "@/hooks/useMessageListener"; + import { ABDM_CONSENT_PURPOSE, ABDM_HI_TYPE } from "@/common/constants"; -import DateRangeFormField from "../Form/FormFields/DateRangeFormField"; -import dayjs from "dayjs"; -import { navigate } from "raviger"; -import DateFormField from "../Form/FormFields/DateFormField"; -import request from "../../Utils/request/request"; -import routes from "../../Redux/api"; -import { useMessageListener } from "@/common/hooks/useMessageListener"; -import { AbhaNumberModel } from "./types/abha"; -import { ConsentHIType, ConsentPurpose } from "./types/consent"; -import { useTranslation } from "react-i18next"; + +import * as Notification from "@/Utils/Notifications"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; const getDate = (value: string | Date) => (value && dayjs(value).isValid() && dayjs(value).toDate()) || undefined; diff --git a/src/components/ABDM/HealthInformation.tsx b/src/components/ABDM/HealthInformation.tsx index e3571c90d9f..e147f050131 100644 --- a/src/components/ABDM/HealthInformation.tsx +++ b/src/components/ABDM/HealthInformation.tsx @@ -1,9 +1,11 @@ +import { HIProfile } from "hi-profiles"; import { useTranslation } from "react-i18next"; -import routes from "../../Redux/api"; -import useQuery from "../../Utils/request/useQuery"; + import Loading from "@/components/Common/Loading"; -import Page from "@/components/Common/components/Page"; -import { HIProfile } from "hi-profiles"; +import Page from "@/components/Common/Page"; + +import routes from "@/Utils/request/api"; +import useQuery from "@/Utils/request/useQuery"; interface IProps { artefactId: string; diff --git a/src/components/ABDM/LinkAbhaNumber/CreateWithAadhaar.tsx b/src/components/ABDM/LinkAbhaNumber/CreateWithAadhaar.tsx index dc2b5ff7ef6..ce34b026fee 100644 --- a/src/components/ABDM/LinkAbhaNumber/CreateWithAadhaar.tsx +++ b/src/components/ABDM/LinkAbhaNumber/CreateWithAadhaar.tsx @@ -1,19 +1,21 @@ -import { useTranslation } from "react-i18next"; -import useMultiStepForm, { InjectedStepProps } from "./useMultiStepForm"; -import { classNames } from "../../../Utils/utils"; -import TextFormField from "../../Form/FormFields/TextFormField"; import { useEffect, useState } from "react"; -import ButtonV2, { - ButtonWithTimer, -} from "@/components/Common/components/ButtonV2"; -import OtpFormField from "../../Form/FormFields/OtpFormField"; -import PhoneNumberFormField from "../../Form/FormFields/PhoneNumberFormField"; -import { AbhaNumberModel } from "../types/abha"; -import { validateRule } from "../../Users/UserAdd"; -import request from "../../../Utils/request/request"; -import routes from "../../../Redux/api"; -import * as Notify from "../../../Utils/Notifications"; -import CheckBoxFormField from "../../Form/FormFields/CheckBoxFormField"; +import { useTranslation } from "react-i18next"; + +import useMultiStepForm, { + InjectedStepProps, +} from "@/components/ABDM/LinkAbhaNumber/useMultiStepForm"; +import { AbhaNumberModel } from "@/components/ABDM/types/abha"; +import ButtonV2, { ButtonWithTimer } from "@/components/Common/ButtonV2"; +import CheckBoxFormField from "@/components/Form/FormFields/CheckBoxFormField"; +import OtpFormField from "@/components/Form/FormFields/OtpFormField"; +import PhoneNumberFormField from "@/components/Form/FormFields/PhoneNumberFormField"; +import TextFormField from "@/components/Form/FormFields/TextFormField"; +import { validateRule } from "@/components/Users/UserAdd"; + +import * as Notify from "@/Utils/Notifications"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import { classNames } from "@/Utils/utils"; const MAX_OTP_RESEND_ALLOWED = 2; diff --git a/src/components/ABDM/LinkAbhaNumber/LinkWithOtp.tsx b/src/components/ABDM/LinkAbhaNumber/LinkWithOtp.tsx index 2ca9dbfc5f4..9b8150dee86 100644 --- a/src/components/ABDM/LinkAbhaNumber/LinkWithOtp.tsx +++ b/src/components/ABDM/LinkAbhaNumber/LinkWithOtp.tsx @@ -1,18 +1,20 @@ -import { useTranslation } from "react-i18next"; -import { AbhaNumberModel } from "../types/abha"; -import useMultiStepForm, { InjectedStepProps } from "./useMultiStepForm"; import { useMemo, useState } from "react"; -import TextFormField from "../../Form/FormFields/TextFormField"; -import { classNames } from "../../../Utils/utils"; -import ButtonV2, { - ButtonWithTimer, -} from "@/components/Common/components/ButtonV2"; -import Dropdown, { DropdownItem } from "@/components/Common/components/Menu"; -import OtpFormField from "../../Form/FormFields/OtpFormField"; -import * as Notify from "../../../Utils/Notifications"; -import request from "../../../Utils/request/request"; -import routes from "../../../Redux/api"; -import CheckBoxFormField from "../../Form/FormFields/CheckBoxFormField"; +import { useTranslation } from "react-i18next"; + +import useMultiStepForm, { + InjectedStepProps, +} from "@/components/ABDM/LinkAbhaNumber/useMultiStepForm"; +import { AbhaNumberModel } from "@/components/ABDM/types/abha"; +import ButtonV2, { ButtonWithTimer } from "@/components/Common/ButtonV2"; +import Dropdown, { DropdownItem } from "@/components/Common/Menu"; +import CheckBoxFormField from "@/components/Form/FormFields/CheckBoxFormField"; +import OtpFormField from "@/components/Form/FormFields/OtpFormField"; +import TextFormField from "@/components/Form/FormFields/TextFormField"; + +import * as Notify from "@/Utils/Notifications"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import { classNames } from "@/Utils/utils"; const MAX_OTP_RESEND_ALLOWED = 2; diff --git a/src/components/ABDM/LinkAbhaNumber/LinkWithQr.tsx b/src/components/ABDM/LinkAbhaNumber/LinkWithQr.tsx index 4e91f89b384..712d28943b4 100644 --- a/src/components/ABDM/LinkAbhaNumber/LinkWithQr.tsx +++ b/src/components/ABDM/LinkAbhaNumber/LinkWithQr.tsx @@ -1,11 +1,12 @@ +import { IDetectedBarcode, Scanner } from "@yudiel/react-qr-scanner"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; -import { AbhaNumberModel, ABHAQRContent } from "../types/abha"; -import * as Notification from "../../../Utils/Notifications"; -import { Scanner, IDetectedBarcode } from "@yudiel/react-qr-scanner"; -import request from "../../../Utils/request/request"; -import routes from "../../../Redux/api"; -import { useState } from "react"; +import { ABHAQRContent, AbhaNumberModel } from "@/components/ABDM/types/abha"; + +import * as Notification from "@/Utils/Notifications"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; type ILoginWithQrProps = { onSuccess: (abhaNumber: AbhaNumberModel) => void; diff --git a/src/components/ABDM/LinkAbhaNumber/index.tsx b/src/components/ABDM/LinkAbhaNumber/index.tsx index d8e4e955be2..45cd0b34d02 100644 --- a/src/components/ABDM/LinkAbhaNumber/index.tsx +++ b/src/components/ABDM/LinkAbhaNumber/index.tsx @@ -1,12 +1,14 @@ import { useState } from "react"; -import DialogModal from "@/components/Common/Dialog"; -import { AbhaNumberModel } from "../types/abha"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import { classNames } from "../../../Utils/utils"; -import CreateWithAadhaar from "./CreateWithAadhaar"; import { useTranslation } from "react-i18next"; -import LinkWithOtp from "./LinkWithOtp"; -import LinkWithQr from "./LinkWithQr"; + +import CreateWithAadhaar from "@/components/ABDM/LinkAbhaNumber/CreateWithAadhaar"; +import LinkWithOtp from "@/components/ABDM/LinkAbhaNumber/LinkWithOtp"; +import LinkWithQr from "@/components/ABDM/LinkAbhaNumber/LinkWithQr"; +import { AbhaNumberModel } from "@/components/ABDM/types/abha"; +import ButtonV2 from "@/components/Common/ButtonV2"; +import DialogModal from "@/components/Common/Dialog"; + +import { classNames } from "@/Utils/utils"; interface ILinkAbhaNumberProps { show: boolean; diff --git a/src/components/ABDM/LinkAbhaNumber/useMultiStepForm.ts b/src/components/ABDM/LinkAbhaNumber/useMultiStepForm.ts index 8107fff8370..79bc9ec71c6 100644 --- a/src/components/ABDM/LinkAbhaNumber/useMultiStepForm.ts +++ b/src/components/ABDM/LinkAbhaNumber/useMultiStepForm.ts @@ -1,8 +1,8 @@ import { - cloneElement, Dispatch, ReactElement, SetStateAction, + cloneElement, useCallback, useMemo, useState, diff --git a/src/components/ABDM/types/abha.ts b/src/components/ABDM/types/abha.ts index d94549e2242..f189bd111cb 100644 --- a/src/components/ABDM/types/abha.ts +++ b/src/components/ABDM/types/abha.ts @@ -1,4 +1,4 @@ -import { PatientModel } from "../../Patient/models"; +import { PatientModel } from "@/components/Patient/models"; export type AbhaNumberModel = { id: number; diff --git a/src/components/ABDM/types/consent.ts b/src/components/ABDM/types/consent.ts index 9ca60c7bd99..a5041f5767d 100644 --- a/src/components/ABDM/types/consent.ts +++ b/src/components/ABDM/types/consent.ts @@ -1,5 +1,5 @@ -import { UserBaseModel } from "../../Users/models"; -import { AbhaNumberModel } from "./abha"; +import { AbhaNumberModel } from "@/components/ABDM/types/abha"; +import { UserBaseModel } from "@/components/Users/models"; export type ConsentPurpose = | "CAREMGT" diff --git a/src/components/Assets/AssetConfigure.tsx b/src/components/Assets/AssetConfigure.tsx index 9f04bddc321..d0d3e4f9420 100644 --- a/src/components/Assets/AssetConfigure.tsx +++ b/src/components/Assets/AssetConfigure.tsx @@ -1,9 +1,10 @@ +import HL7Monitor from "@/components/Assets/AssetType/HL7Monitor"; +import ConfigureCamera from "@/components/CameraFeed/ConfigureCamera"; import Loading from "@/components/Common/Loading"; -import HL7Monitor from "./AssetType/HL7Monitor"; -import ConfigureCamera from "../CameraFeed/ConfigureCamera"; -import Page from "@/components/Common/components/Page"; -import useQuery from "../../Utils/request/useQuery"; -import routes from "../../Redux/api"; +import Page from "@/components/Common/Page"; + +import routes from "@/Utils/request/api"; +import useQuery from "@/Utils/request/useQuery"; interface AssetConfigureProps { assetId: string; diff --git a/src/components/Assets/AssetFilter.tsx b/src/components/Assets/AssetFilter.tsx index 8095b96389e..fda9d0cfdf2 100644 --- a/src/components/Assets/AssetFilter.tsx +++ b/src/components/Assets/AssetFilter.tsx @@ -1,19 +1,22 @@ -import { useState, useEffect } from "react"; +import dayjs from "dayjs"; import { useQueryParams } from "raviger"; +import { useEffect, useState } from "react"; + +import FiltersSlideover from "@/CAREUI/interactive/FiltersSlideover"; + +import { AssetClass } from "@/components/Assets/AssetTypes"; +import { DateRange } from "@/components/Common/DateRangeInputV2"; import { FacilitySelect } from "@/components/Common/FacilitySelect"; -import { FacilityModel } from "../Facility/models"; import { LocationSelect } from "@/components/Common/LocationSelect"; -import { AssetClass } from "./AssetTypes"; -import { FieldLabel } from "../Form/FormFields/FormField"; -import { SelectFormField } from "../Form/FormFields/SelectFormField"; -import FiltersSlideover from "../../CAREUI/interactive/FiltersSlideover"; -import routes from "../../Redux/api"; -import useQuery from "../../Utils/request/useQuery"; -import DateRangeFormField from "../Form/FormFields/DateRangeFormField"; -import dayjs from "dayjs"; -import { FieldChangeEvent } from "../Form/FormFields/Utils"; -import { DateRange } from "@/components/Common/DateRangeInputV2"; -import { dateQueryString } from "../../Utils/utils"; +import { FacilityModel } from "@/components/Facility/models"; +import DateRangeFormField from "@/components/Form/FormFields/DateRangeFormField"; +import { FieldLabel } from "@/components/Form/FormFields/FormField"; +import { SelectFormField } from "@/components/Form/FormFields/SelectFormField"; +import { FieldChangeEvent } from "@/components/Form/FormFields/Utils"; + +import routes from "@/Utils/request/api"; +import useQuery from "@/Utils/request/useQuery"; +import { dateQueryString } from "@/Utils/utils"; const getDate = (value: any) => value && dayjs(value).isValid() && dayjs(value).toDate(); diff --git a/src/components/Assets/AssetImportModal.tsx b/src/components/Assets/AssetImportModal.tsx index 08fd4891078..beb0dd2c2c1 100644 --- a/src/components/Assets/AssetImportModal.tsx +++ b/src/components/Assets/AssetImportModal.tsx @@ -1,17 +1,20 @@ -import { lazy, useState } from "react"; -import { sleep } from "../../Utils/utils"; -import { FacilityModel } from "../Facility/models"; -import { AssetData } from "./AssetTypes"; -import * as Notification from "../../Utils/Notifications"; -import { Cancel } from "@/components/Common/components/ButtonV2"; +import careConfig from "@careConfig"; import { Link } from "raviger"; -import { AssetImportSchema } from "@/common/constants"; +import { lazy, useState } from "react"; + +import { AssetData } from "@/components/Assets/AssetTypes"; +import { Cancel } from "@/components/Common/ButtonV2"; import DialogModal from "@/components/Common/Dialog"; -import useQuery from "../../Utils/request/useQuery"; -import routes from "../../Redux/api"; -import { SelectFormField } from "../Form/FormFields/SelectFormField"; -import careConfig from "@careConfig"; -import request from "../../Utils/request/request"; +import { FacilityModel } from "@/components/Facility/models"; +import { SelectFormField } from "@/components/Form/FormFields/SelectFormField"; + +import { AssetImportSchema } from "@/common/constants"; + +import * as Notification from "@/Utils/Notifications"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import useQuery from "@/Utils/request/useQuery"; +import { sleep } from "@/Utils/utils"; const ExcelFileDragAndDrop = lazy( () => import("@/components/Common/ExcelFIleDragAndDrop"), diff --git a/src/components/Assets/AssetManage.tsx b/src/components/Assets/AssetManage.tsx index 0ee4f107d40..b56cb908c42 100644 --- a/src/components/Assets/AssetManage.tsx +++ b/src/components/Assets/AssetManage.tsx @@ -1,36 +1,41 @@ -import { useState, useEffect, ReactElement } from "react"; +import dayjs from "dayjs"; +import QRCode from "qrcode.react"; +import { navigate } from "raviger"; +import { ReactElement, useEffect, useState } from "react"; +import { useTranslation } from "react-i18next"; + +import Chip from "@/CAREUI/display/Chip"; +import RecordMeta from "@/CAREUI/display/RecordMeta"; +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import { AssetServiceEditModal } from "@/components/Assets/AssetServiceEditModal"; import { AssetClass, - assetClassProps, AssetData, AssetService, AssetTransaction, -} from "./AssetTypes"; -import Pagination from "@/components/Common/Pagination"; -import { navigate } from "raviger"; -import QRCode from "qrcode.react"; -import AssetWarrantyCard from "./AssetWarrantyCard"; -import { formatDate, formatDateTime, formatName } from "../../Utils/utils"; -import Chip from "../../CAREUI/display/Chip"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import { UserRole, USER_TYPES } from "@/common/constants"; + assetClassProps, +} from "@/components/Assets/AssetTypes"; +import AssetWarrantyCard from "@/components/Assets/AssetWarrantyCard"; +import { warrantyAmcValidityChip } from "@/components/Assets/AssetsList"; +import ButtonV2 from "@/components/Common/ButtonV2"; import ConfirmDialog from "@/components/Common/ConfirmDialog"; -import RecordMeta from "../../CAREUI/display/RecordMeta"; -import { useTranslation } from "react-i18next"; import Loading from "@/components/Common/Loading"; -import * as Notification from "../../Utils/Notifications"; -import { NonReadOnlyUsers } from "../../Utils/AuthorizeFor"; -import Uptime from "@/components/Common/Uptime"; -import useAuthUser from "@/common/hooks/useAuthUser"; -import dayjs from "dayjs"; +import Page from "@/components/Common/Page"; +import Pagination from "@/components/Common/Pagination"; import RelativeDateUserMention from "@/components/Common/RelativeDateUserMention"; -import { AssetServiceEditModal } from "./AssetServiceEditModal"; -import { warrantyAmcValidityChip } from "./AssetsList"; -import Page from "@/components/Common/components/Page"; -import request from "../../Utils/request/request"; -import routes from "../../Redux/api"; -import useQuery from "../../Utils/request/useQuery"; +import Uptime from "@/components/Common/Uptime"; + +import useAuthUser from "@/hooks/useAuthUser"; + +import { USER_TYPES, UserRole } from "@/common/constants"; + +import { NonReadOnlyUsers } from "@/Utils/AuthorizeFor"; +import * as Notification from "@/Utils/Notifications"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import useQuery from "@/Utils/request/useQuery"; +import { formatDate, formatDateTime, formatName } from "@/Utils/utils"; interface AssetManageProps { assetId: string; diff --git a/src/components/Assets/AssetServiceEditModal.tsx b/src/components/Assets/AssetServiceEditModal.tsx index fecea8ad124..b946ea03e31 100644 --- a/src/components/Assets/AssetServiceEditModal.tsx +++ b/src/components/Assets/AssetServiceEditModal.tsx @@ -1,19 +1,23 @@ -import { useEffect, useState } from "react"; -import * as Notification from "../../Utils/Notifications"; -import ButtonV2, { - Cancel, - Submit, -} from "@/components/Common/components/ButtonV2"; -import DialogModal from "@/components/Common/Dialog"; -import { AssetData, AssetService, AssetServiceEdit } from "./AssetTypes"; import dayjs from "dayjs"; -import TextAreaFormField from "../Form/FormFields/TextAreaFormField"; -import { formatDate, formatDateTime } from "../../Utils/utils"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import request from "../../Utils/request/request"; -import routes from "../../Redux/api"; -import DateFormField from "../Form/FormFields/DateFormField"; import { t } from "i18next"; +import { useEffect, useState } from "react"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import { + AssetData, + AssetService, + AssetServiceEdit, +} from "@/components/Assets/AssetTypes"; +import ButtonV2, { Cancel, Submit } from "@/components/Common/ButtonV2"; +import DialogModal from "@/components/Common/Dialog"; +import DateFormField from "@/components/Form/FormFields/DateFormField"; +import TextAreaFormField from "@/components/Form/FormFields/TextAreaFormField"; + +import * as Notification from "@/Utils/Notifications"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import { formatDate, formatDateTime } from "@/Utils/utils"; export const AssetServiceEditModal = (props: { asset?: AssetData; diff --git a/src/components/Assets/AssetType/HL7Monitor.tsx b/src/components/Assets/AssetType/HL7Monitor.tsx index 43e968f33eb..76d761383bd 100644 --- a/src/components/Assets/AssetType/HL7Monitor.tsx +++ b/src/components/Assets/AssetType/HL7Monitor.tsx @@ -1,21 +1,30 @@ import { SyntheticEvent, useEffect, useState } from "react"; -import { AssetClass, AssetData, ResolvedMiddleware } from "../AssetTypes"; -import * as Notification from "../../../Utils/Notifications"; + +import Card from "@/CAREUI/display/Card"; +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import { + AssetClass, + AssetData, + ResolvedMiddleware, +} from "@/components/Assets/AssetTypes"; +import { BedSelect } from "@/components/Common/BedSelect"; +import { Submit } from "@/components/Common/ButtonV2"; import Loading from "@/components/Common/Loading"; +import { BedModel } from "@/components/Facility/models"; +import { FieldLabel } from "@/components/Form/FormFields/FormField"; +import TextFormField from "@/components/Form/FormFields/TextFormField"; +import HL7PatientVitalsMonitor from "@/components/VitalsMonitor/HL7PatientVitalsMonitor"; +import VentilatorPatientVitalsMonitor from "@/components/VitalsMonitor/VentilatorPatientVitalsMonitor"; + +import useAuthUser from "@/hooks/useAuthUser"; + import { checkIfValidIP } from "@/common/validation"; -import Card from "../../../CAREUI/display/Card"; -import { Submit } from "@/components/Common/components/ButtonV2"; -import CareIcon from "../../../CAREUI/icons/CareIcon"; -import TextFormField from "../../Form/FormFields/TextFormField"; -import HL7PatientVitalsMonitor from "../../VitalsMonitor/HL7PatientVitalsMonitor"; -import VentilatorPatientVitalsMonitor from "../../VitalsMonitor/VentilatorPatientVitalsMonitor"; -import useAuthUser from "@/common/hooks/useAuthUser"; -import request from "../../../Utils/request/request"; -import routes from "../../../Redux/api"; -import { BedModel } from "../../Facility/models"; -import useQuery from "../../../Utils/request/useQuery"; -import { FieldLabel } from "../../Form/FormFields/FormField"; -import { BedSelect } from "@/components/Common/BedSelect"; + +import * as Notification from "@/Utils/Notifications"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import useQuery from "@/Utils/request/useQuery"; interface HL7MonitorProps { assetId: string; diff --git a/src/components/Assets/AssetTypes.tsx b/src/components/Assets/AssetTypes.tsx index 24f3f3e9352..14d1e40afe0 100644 --- a/src/components/Assets/AssetTypes.tsx +++ b/src/components/Assets/AssetTypes.tsx @@ -1,6 +1,7 @@ -import { BedModel } from "../Facility/models"; -import { IconName } from "../../CAREUI/icons/CareIcon"; -import { PatientModel } from "../Patient/models"; +import { IconName } from "@/CAREUI/icons/CareIcon"; + +import { BedModel } from "@/components/Facility/models"; +import { PatientModel } from "@/components/Patient/models"; import { UserBareMinimum } from "@/components/Users/models"; export enum AssetLocationType { diff --git a/src/components/Assets/AssetWarrantyCard.tsx b/src/components/Assets/AssetWarrantyCard.tsx index e26575f712b..ebaaca7e6c8 100644 --- a/src/components/Assets/AssetWarrantyCard.tsx +++ b/src/components/Assets/AssetWarrantyCard.tsx @@ -1,9 +1,12 @@ -import CareIcon, { IconName } from "../../CAREUI/icons/CareIcon"; -import { AssetData } from "./AssetTypes"; -import { formatDate } from "../../Utils/utils"; -import CopyToClipboard from "react-copy-to-clipboard"; import { t } from "i18next"; import { useEffect, useState } from "react"; +import CopyToClipboard from "react-copy-to-clipboard"; + +import CareIcon, { IconName } from "@/CAREUI/icons/CareIcon"; + +import { AssetData } from "@/components/Assets/AssetTypes"; + +import { formatDate } from "@/Utils/utils"; export default function AssetWarrantyCard(props: { asset: AssetData }) { const { asset } = props; diff --git a/src/components/Assets/AssetsList.tsx b/src/components/Assets/AssetsList.tsx index 613b87e5ea5..bddddeedc42 100644 --- a/src/components/Assets/AssetsList.tsx +++ b/src/components/Assets/AssetsList.tsx @@ -1,30 +1,34 @@ import { IDetectedBarcode, Scanner } from "@yudiel/react-qr-scanner"; -import * as Notification from "../../Utils/Notifications"; -import { assetClassProps, AssetData } from "./AssetTypes"; -import { useState, useEffect } from "react"; import { Link, navigate } from "raviger"; -import AssetFilter from "./AssetFilter"; -import { parseQueryParams } from "../../Utils/primitives"; -import Chip from "../../CAREUI/display/Chip"; -import SearchInput from "../Form/SearchInput"; -import useFilters from "@/common/hooks/useFilters"; -import { FacilityModel } from "../Facility/models"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import { useIsAuthorized } from "@/common/hooks/useIsAuthorized"; -import AuthorizeFor, { NonReadOnlyUsers } from "../../Utils/AuthorizeFor"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import FacilitiesSelectDialogue from "../ExternalResult/FacilitiesSelectDialogue"; -import ExportMenu from "@/components/Common/Export"; -import CountBlock from "../../CAREUI/display/Count"; -import AssetImportModal from "./AssetImportModal"; -import Page from "@/components/Common/components/Page"; -import { AdvancedFilterButton } from "../../CAREUI/interactive/FiltersSlideover"; +import { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; -import request from "../../Utils/request/request"; -import routes from "../../Redux/api"; -import useQuery from "../../Utils/request/useQuery"; +import Chip from "@/CAREUI/display/Chip"; +import CountBlock from "@/CAREUI/display/Count"; +import CareIcon from "@/CAREUI/icons/CareIcon"; +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 SearchInput from "@/components/Form/SearchInput"; + +import useFilters from "@/hooks/useFilters"; +import { useIsAuthorized } from "@/hooks/useIsAuthorized"; + +import AuthorizeFor, { NonReadOnlyUsers } from "@/Utils/AuthorizeFor"; +import * as Notification from "@/Utils/Notifications"; +import { parseQueryParams } from "@/Utils/primitives"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import useQuery from "@/Utils/request/useQuery"; + const AssetsList = () => { const { t } = useTranslation(); const { diff --git a/src/components/Auth/Login.tsx b/src/components/Auth/Login.tsx index 403b133757f..e9750ff6c6d 100644 --- a/src/components/Auth/Login.tsx +++ b/src/components/Auth/Login.tsx @@ -1,20 +1,24 @@ +import careConfig from "@careConfig"; import { useEffect, useState } from "react"; -import request from "../../Utils/request/request"; -import routes from "../../Redux/api"; -import { useTranslation } from "react-i18next"; import ReCaptcha from "react-google-recaptcha"; -import * as Notification from "../../Utils/Notifications"; -import LegendInput from "../../CAREUI/interactive/LegendInput"; -import LanguageSelectorLogin from "@/components/Common/LanguageSelectorLogin"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import CircularProgress from "@/components/Common/components/CircularProgress"; +import { useTranslation } from "react-i18next"; import ReactMarkdown from "react-markdown"; import rehypeRaw from "rehype-raw"; -import { useAuthContext } from "@/common/hooks/useAuthUser"; -import FiltersCache from "../../Utils/FiltersCache"; -import { classNames } from "../../Utils/utils"; -import BrowserWarning from "../ErrorPages/BrowserWarning"; -import careConfig from "@careConfig"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import LegendInput from "@/CAREUI/interactive/LegendInput"; + +import CircularProgress from "@/components/Common/CircularProgress"; +import LanguageSelectorLogin from "@/components/Common/LanguageSelectorLogin"; +import BrowserWarning from "@/components/ErrorPages/BrowserWarning"; + +import { useAuthContext } from "@/hooks/useAuthUser"; + +import FiltersCache from "@/Utils/FiltersCache"; +import * as Notification from "@/Utils/Notifications"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import { classNames } from "@/Utils/utils"; export const Login = (props: { forgot?: boolean }) => { const { signIn } = useAuthContext(); diff --git a/src/components/Auth/ResetPassword.tsx b/src/components/Auth/ResetPassword.tsx index 15fc6cbac69..3c242952957 100644 --- a/src/components/Auth/ResetPassword.tsx +++ b/src/components/Auth/ResetPassword.tsx @@ -1,14 +1,17 @@ -import { useEffect, useState } from "react"; -import request from "../../Utils/request/request"; -import * as Notification from "../../Utils/Notifications"; import { navigate } from "raviger"; +import { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; + +import { Cancel, Submit } from "@/components/Common/ButtonV2"; +import TextFormField from "@/components/Form/FormFields/TextFormField"; +import { validateRule } from "@/components/Users/UserAdd"; + import { LocalStorageKeys } from "@/common/constants"; -import { Cancel, Submit } from "@/components/Common/components/ButtonV2"; -import TextFormField from "../Form/FormFields/TextFormField"; -import { validateRule } from "../Users/UserAdd"; import { validatePassword } from "@/common/validation"; -import routes from "../../Redux/api"; + +import * as Notification from "@/Utils/Notifications"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; export const ResetPassword = (props: any) => { const initForm: any = { diff --git a/src/components/CameraFeed/CameraFeed.tsx b/src/components/CameraFeed/CameraFeed.tsx index daa237cd851..9646e0354bf 100644 --- a/src/components/CameraFeed/CameraFeed.tsx +++ b/src/components/CameraFeed/CameraFeed.tsx @@ -1,19 +1,27 @@ import { useCallback, useEffect, useRef, useState } from "react"; -import { AssetData } from "../Assets/AssetTypes"; -import useOperateCamera, { PTZPayload } from "./useOperateCamera"; -import { getStreamUrl } from "./utils"; -import { classNames, isIOS } from "../../Utils/utils"; -import FeedAlert, { FeedAlertState, StreamStatus } from "./FeedAlert"; -import FeedNetworkSignal from "./FeedNetworkSignal"; -import NoFeedAvailable from "./NoFeedAvailable"; -import FeedControls from "./FeedControls"; -import FeedWatermark from "./FeedWatermark"; -import useFullscreen from "@/common/hooks/useFullscreen"; -import useBreakpoints from "@/common/hooks/useBreakpoints"; -import { GetPresetsResponse } from "./routes"; -import VideoPlayer from "./videoPlayer"; + +import { AssetData } from "@/components/Assets/AssetTypes"; +import FeedAlert, { + FeedAlertState, + StreamStatus, +} from "@/components/CameraFeed/FeedAlert"; +import FeedControls from "@/components/CameraFeed/FeedControls"; +import FeedNetworkSignal from "@/components/CameraFeed/FeedNetworkSignal"; +import FeedWatermark from "@/components/CameraFeed/FeedWatermark"; +import NoFeedAvailable from "@/components/CameraFeed/NoFeedAvailable"; +import { GetPresetsResponse } from "@/components/CameraFeed/routes"; +import useOperateCamera, { + PTZPayload, +} from "@/components/CameraFeed/useOperateCamera"; +import { getStreamUrl } from "@/components/CameraFeed/utils"; +import VideoPlayer from "@/components/CameraFeed/videoPlayer"; import AssetInfoPopover from "@/components/Common/AssetInfoPopover"; +import useBreakpoints from "@/hooks/useBreakpoints"; +import useFullscreen from "@/hooks/useFullscreen"; + +import { classNames, isIOS } from "@/Utils/utils"; + interface Props { children?: React.ReactNode; asset: AssetData; diff --git a/src/components/CameraFeed/CameraFeedWithBedPresets.tsx b/src/components/CameraFeed/CameraFeedWithBedPresets.tsx index 3e447e34e21..be43fe3f810 100644 --- a/src/components/CameraFeed/CameraFeedWithBedPresets.tsx +++ b/src/components/CameraFeed/CameraFeedWithBedPresets.tsx @@ -1,11 +1,13 @@ import { useState } from "react"; -import { AssetData } from "../Assets/AssetTypes"; -import CameraFeed from "./CameraFeed"; -import useQuery from "../../Utils/request/useQuery"; -import { CameraPresetDropdown } from "./CameraPresetSelect"; -import useOperateCamera from "./useOperateCamera"; -import { classNames } from "../../Utils/utils"; -import { CameraPreset, FeedRoutes } from "./routes"; + +import { AssetData } from "@/components/Assets/AssetTypes"; +import CameraFeed from "@/components/CameraFeed/CameraFeed"; +import { CameraPresetDropdown } from "@/components/CameraFeed/CameraPresetSelect"; +import { CameraPreset, FeedRoutes } from "@/components/CameraFeed/routes"; +import useOperateCamera from "@/components/CameraFeed/useOperateCamera"; + +import useQuery from "@/Utils/request/useQuery"; +import { classNames } from "@/Utils/utils"; interface Props { asset: AssetData; diff --git a/src/components/CameraFeed/CameraPresetSelect.tsx b/src/components/CameraFeed/CameraPresetSelect.tsx index 95b6d195688..7b21a236493 100644 --- a/src/components/CameraFeed/CameraPresetSelect.tsx +++ b/src/components/CameraFeed/CameraPresetSelect.tsx @@ -4,11 +4,14 @@ import { ListboxOption, ListboxOptions, } from "@headlessui/react"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import { classNames } from "../../Utils/utils"; -import { dropdownOptionClassNames } from "../Form/MultiSelectMenuV2"; -import { CameraPreset } from "./routes"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import { CameraPreset } from "@/components/CameraFeed/routes"; +import ButtonV2 from "@/components/Common/ButtonV2"; +import { dropdownOptionClassNames } from "@/components/Form/MultiSelectMenuV2"; + +import { classNames } from "@/Utils/utils"; interface Props { disabled?: boolean; diff --git a/src/components/CameraFeed/CentralLiveMonitoring/LiveMonitoringFilters.tsx b/src/components/CameraFeed/CentralLiveMonitoring/LiveMonitoringFilters.tsx index 837a351fff5..ee91ccd7fea 100644 --- a/src/components/CameraFeed/CentralLiveMonitoring/LiveMonitoringFilters.tsx +++ b/src/components/CameraFeed/CentralLiveMonitoring/LiveMonitoringFilters.tsx @@ -4,14 +4,17 @@ import { PopoverPanel, Transition, } from "@headlessui/react"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import { FieldLabel } from "../../Form/FormFields/FormField"; +import { useTranslation } from "react-i18next"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import ButtonV2 from "@/components/Common/ButtonV2"; import { LocationSelect } from "@/components/Common/LocationSelect"; import Pagination from "@/components/Common/Pagination"; -import useFilters from "@/common/hooks/useFilters"; -import CareIcon from "../../../CAREUI/icons/CareIcon"; -import useSlug from "@/common/hooks/useSlug"; -import { useTranslation } from "react-i18next"; +import { FieldLabel } from "@/components/Form/FormFields/FormField"; + +import useFilters from "@/hooks/useFilters"; +import useSlug from "@/hooks/useSlug"; interface Props { perPageLimit: number; diff --git a/src/components/CameraFeed/CentralLiveMonitoring/index.tsx b/src/components/CameraFeed/CentralLiveMonitoring/index.tsx index 987289ef74d..4a65480054d 100644 --- a/src/components/CameraFeed/CentralLiveMonitoring/index.tsx +++ b/src/components/CameraFeed/CentralLiveMonitoring/index.tsx @@ -1,14 +1,18 @@ +import { useQueryParams } from "raviger"; import { useState } from "react"; + +import Fullscreen from "@/CAREUI/misc/Fullscreen"; + +import LocationFeedTile from "@/components/CameraFeed/CameraFeedWithBedPresets"; +import LiveMonitoringFilters from "@/components/CameraFeed/CentralLiveMonitoring/LiveMonitoringFilters"; +import StillWatching from "@/components/CameraFeed/StillWatching"; import Loading from "@/components/Common/Loading"; -import Page from "@/components/Common/components/Page"; -import useQuery from "../../../Utils/request/useQuery"; -import routes from "../../../Redux/api"; -import LocationFeedTile from "../CameraFeedWithBedPresets"; -import Fullscreen from "../../../CAREUI/misc/Fullscreen"; -import useBreakpoints from "@/common/hooks/useBreakpoints"; -import { useQueryParams } from "raviger"; -import LiveMonitoringFilters from "./LiveMonitoringFilters"; -import StillWatching from "../StillWatching"; +import Page from "@/components/Common/Page"; + +import useBreakpoints from "@/hooks/useBreakpoints"; + +import routes from "@/Utils/request/api"; +import useQuery from "@/Utils/request/useQuery"; export default function CentralLiveMonitoring(props: { facilityId: string }) { const [isFullscreen, setFullscreen] = useState(false); diff --git a/src/components/CameraFeed/ConfigureCamera.tsx b/src/components/CameraFeed/ConfigureCamera.tsx index c0cb19e6a23..f969ed2b0ca 100644 --- a/src/components/CameraFeed/ConfigureCamera.tsx +++ b/src/components/CameraFeed/ConfigureCamera.tsx @@ -1,37 +1,43 @@ -import { useEffect, useState } from "react"; -import { AssetData } from "../Assets/AssetTypes"; -import { getCameraConfig, makeAccessKey } from "../../Utils/transformUtils"; -import TextFormField from "../Form/FormFields/TextFormField"; -import ButtonV2, { - Cancel, - Submit, -} from "@/components/Common/components/ButtonV2"; -import useAuthUser from "@/common/hooks/useAuthUser"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import useOperateCamera from "./useOperateCamera"; -import CameraFeed from "./CameraFeed"; -import { useTranslation } from "react-i18next"; -import request from "../../Utils/request/request"; -import routes from "../../Redux/api"; -import { Error, Success } from "../../Utils/Notifications"; -import { useQueryParams } from "raviger"; -import useQuery from "../../Utils/request/useQuery"; -import { classNames, compareBy } from "../../Utils/utils"; -import RecordMeta from "../../CAREUI/display/RecordMeta"; -import { CameraPreset, FeedRoutes, GetStatusResponse } from "./routes"; -import DialogModal from "@/components/Common/Dialog"; import { Listbox, ListboxButton, ListboxOption, ListboxOptions, } from "@headlessui/react"; -import { dropdownOptionClassNames } from "../Form/MultiSelectMenuV2"; -import Loading from "@/components/Common/Loading"; +import { useQueryParams } from "raviger"; +import { useEffect, useState } from "react"; +import { useTranslation } from "react-i18next"; + +import RecordMeta from "@/CAREUI/display/RecordMeta"; +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import { AssetData } from "@/components/Assets/AssetTypes"; +import CameraFeed from "@/components/CameraFeed/CameraFeed"; +import { + CameraPreset, + FeedRoutes, + GetStatusResponse, +} from "@/components/CameraFeed/routes"; +import useOperateCamera from "@/components/CameraFeed/useOperateCamera"; +import ButtonV2, { Cancel, Submit } from "@/components/Common/ButtonV2"; import ConfirmDialog from "@/components/Common/ConfirmDialog"; -import { FieldLabel } from "../Form/FormFields/FormField"; +import DialogModal from "@/components/Common/Dialog"; +import Loading from "@/components/Common/Loading"; +import CheckBoxFormField from "@/components/Form/FormFields/CheckBoxFormField"; +import { FieldLabel } from "@/components/Form/FormFields/FormField"; +import TextFormField from "@/components/Form/FormFields/TextFormField"; +import { dropdownOptionClassNames } from "@/components/Form/MultiSelectMenuV2"; + +import useAuthUser from "@/hooks/useAuthUser"; + import { checkIfValidIP } from "@/common/validation"; -import CheckBoxFormField from "../Form/FormFields/CheckBoxFormField"; + +import { Error, Success } from "@/Utils/Notifications"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import useQuery from "@/Utils/request/useQuery"; +import { getCameraConfig, makeAccessKey } from "@/Utils/transformUtils"; +import { classNames, compareBy } from "@/Utils/utils"; interface Props { asset: AssetData; diff --git a/src/components/CameraFeed/FeedAlert.tsx b/src/components/CameraFeed/FeedAlert.tsx index 86c5468decf..5c42677611f 100644 --- a/src/components/CameraFeed/FeedAlert.tsx +++ b/src/components/CameraFeed/FeedAlert.tsx @@ -1,7 +1,10 @@ import { Transition } from "@headlessui/react"; import { useEffect, useState } from "react"; -import CareIcon, { IconName } from "../../CAREUI/icons/CareIcon"; -import { classNames } from "../../Utils/utils"; + +import CareIcon, { IconName } from "@/CAREUI/icons/CareIcon"; + +import { classNames } from "@/Utils/utils"; + export type StreamStatus = "playing" | "stop" | "loading" | "offline"; export type FeedAlertState = diff --git a/src/components/CameraFeed/FeedButton.tsx b/src/components/CameraFeed/FeedButton.tsx index e2ae2a8fe9e..c5d591955d9 100644 --- a/src/components/CameraFeed/FeedButton.tsx +++ b/src/components/CameraFeed/FeedButton.tsx @@ -1,5 +1,6 @@ -import KeyboardShortcut from "../../CAREUI/interactive/KeyboardShortcut"; -import { classNames } from "../../Utils/utils"; +import KeyboardShortcut from "@/CAREUI/interactive/KeyboardShortcut"; + +import { classNames } from "@/Utils/utils"; interface Props { className?: string; diff --git a/src/components/CameraFeed/FeedControls.tsx b/src/components/CameraFeed/FeedControls.tsx index 36d3aa96cd2..4b7add78a1d 100644 --- a/src/components/CameraFeed/FeedControls.tsx +++ b/src/components/CameraFeed/FeedControls.tsx @@ -1,8 +1,11 @@ import { useState } from "react"; -import FeedButton from "./FeedButton"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import { PTZPayload } from "./useOperateCamera"; -import { isAppleDevice } from "../../Utils/utils"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import FeedButton from "@/components/CameraFeed/FeedButton"; +import { PTZPayload } from "@/components/CameraFeed/useOperateCamera"; + +import { isAppleDevice } from "@/Utils/utils"; const Actions = { UP: 1 << 0, diff --git a/src/components/CameraFeed/FeedNetworkSignal.tsx b/src/components/CameraFeed/FeedNetworkSignal.tsx index 4b1e6c7fbe3..bb187ca8167 100644 --- a/src/components/CameraFeed/FeedNetworkSignal.tsx +++ b/src/components/CameraFeed/FeedNetworkSignal.tsx @@ -1,7 +1,9 @@ import { useEffect, useState } from "react"; -import { calculateVideoDelay } from "./utils"; -import NetworkSignal from "../../CAREUI/display/NetworkSignal"; -import { StreamStatus } from "./FeedAlert"; + +import NetworkSignal from "@/CAREUI/display/NetworkSignal"; + +import { StreamStatus } from "@/components/CameraFeed/FeedAlert"; +import { calculateVideoDelay } from "@/components/CameraFeed/utils"; interface Props { playerRef: React.RefObject; diff --git a/src/components/CameraFeed/FeedWatermark.tsx b/src/components/CameraFeed/FeedWatermark.tsx index f71bab24ac6..eb129b7db72 100644 --- a/src/components/CameraFeed/FeedWatermark.tsx +++ b/src/components/CameraFeed/FeedWatermark.tsx @@ -1,5 +1,6 @@ import { useEffect, useRef } from "react"; -import useAuthUser from "@/common/hooks/useAuthUser"; + +import useAuthUser from "@/hooks/useAuthUser"; export default function FeedWatermark() { const me = useAuthUser(); diff --git a/src/components/CameraFeed/NoFeedAvailable.tsx b/src/components/CameraFeed/NoFeedAvailable.tsx index 05e07327458..ae70f7abbc0 100644 --- a/src/components/CameraFeed/NoFeedAvailable.tsx +++ b/src/components/CameraFeed/NoFeedAvailable.tsx @@ -1,7 +1,9 @@ -import CareIcon, { IconName } from "../../CAREUI/icons/CareIcon"; -import { classNames } from "../../Utils/utils"; -import { AssetData } from "../Assets/AssetTypes"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; +import CareIcon, { IconName } from "@/CAREUI/icons/CareIcon"; + +import { AssetData } from "@/components/Assets/AssetTypes"; +import ButtonV2 from "@/components/Common/ButtonV2"; + +import { classNames } from "@/Utils/utils"; interface Props { className?: string; diff --git a/src/components/CameraFeed/StillWatching.tsx b/src/components/CameraFeed/StillWatching.tsx index 8993d0344d7..b9c565ccd8a 100644 --- a/src/components/CameraFeed/StillWatching.tsx +++ b/src/components/CameraFeed/StillWatching.tsx @@ -1,10 +1,13 @@ +import careConfig from "@careConfig"; import { useEffect, useState } from "react"; -import ConfirmDialog from "@/components/Common/ConfirmDialog"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import CareIcon from "../../CAREUI/icons/CareIcon"; import { useTranslation } from "react-i18next"; -import { useTimer } from "../../Utils/useTimer"; -import careConfig from "@careConfig"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import ButtonV2 from "@/components/Common/ButtonV2"; +import ConfirmDialog from "@/components/Common/ConfirmDialog"; + +import { useTimer } from "@/hooks/useTimer"; type State = "watching" | "prompted" | "timed-out"; diff --git a/src/components/CameraFeed/routes.ts b/src/components/CameraFeed/routes.ts index bffcb0fc9b0..e5a0ef72491 100644 --- a/src/components/CameraFeed/routes.ts +++ b/src/components/CameraFeed/routes.ts @@ -1,10 +1,13 @@ -import { OperationAction, PTZPayload } from "./useOperateCamera"; - -import { AssetBedModel } from "../Assets/AssetTypes"; -import { PaginatedResponse } from "../../Utils/request/types"; -import { Type } from "../../Redux/api"; +import { AssetBedModel } from "@/components/Assets/AssetTypes"; +import { + OperationAction, + PTZPayload, +} from "@/components/CameraFeed/useOperateCamera"; import { UserBareMinimum } from "@/components/Users/models"; -import { WritableOnly } from "../../Utils/types"; + +import { Type } from "@/Utils/request/api"; +import { PaginatedResponse } from "@/Utils/request/types"; +import { WritableOnly } from "@/Utils/types"; export type GetStatusResponse = { result: { diff --git a/src/components/CameraFeed/useOperateCamera.ts b/src/components/CameraFeed/useOperateCamera.ts index 0e65fb0130c..6fcc2436ac3 100644 --- a/src/components/CameraFeed/useOperateCamera.ts +++ b/src/components/CameraFeed/useOperateCamera.ts @@ -1,6 +1,8 @@ import { useState } from "react"; -import request from "../../Utils/request/request"; -import { FeedRoutes } from "./routes"; + +import { FeedRoutes } from "@/components/CameraFeed/routes"; + +import request from "@/Utils/request/request"; export interface PTZPayload { x: number; diff --git a/src/components/CameraFeed/utils.ts b/src/components/CameraFeed/utils.ts index 1cb721ebcc3..e13934c301b 100644 --- a/src/components/CameraFeed/utils.ts +++ b/src/components/CameraFeed/utils.ts @@ -1,6 +1,8 @@ import { MutableRefObject } from "react"; -import { AssetClass, AssetData } from "../Assets/AssetTypes"; -import { getCameraConfig } from "../../Utils/transformUtils"; + +import { AssetClass, AssetData } from "@/components/Assets/AssetTypes"; + +import { getCameraConfig } from "@/Utils/transformUtils"; export const calculateVideoDelay = ( ref: MutableRefObject, diff --git a/src/components/Common/components/AccordionV2.tsx b/src/components/Common/AccordionV2.tsx similarity index 100% rename from src/components/Common/components/AccordionV2.tsx rename to src/components/Common/AccordionV2.tsx diff --git a/src/components/Common/AssetInfoPopover.tsx b/src/components/Common/AssetInfoPopover.tsx index 986bed795c9..034073f473d 100644 --- a/src/components/Common/AssetInfoPopover.tsx +++ b/src/components/Common/AssetInfoPopover.tsx @@ -1,14 +1,16 @@ -import CareIcon from "../../CAREUI/icons/CareIcon"; -import { AssetData, assetClassProps } from "../Assets/AssetTypes"; -import ButtonV2 from "./components/ButtonV2"; -import { navigate } from "raviger"; -import { useTranslation } from "react-i18next"; import { Popover, PopoverButton, PopoverPanel, Transition, } from "@headlessui/react"; +import { navigate } from "raviger"; +import { useTranslation } from "react-i18next"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import { AssetData, assetClassProps } from "@/components/Assets/AssetTypes"; +import ButtonV2 from "@/components/Common/ButtonV2"; interface AssetInfoPopoverProps { asset?: AssetData; diff --git a/src/components/Common/AssetSelect.tsx b/src/components/Common/AssetSelect.tsx index 0db7b46b67c..b1feb8fc839 100644 --- a/src/components/Common/AssetSelect.tsx +++ b/src/components/Common/AssetSelect.tsx @@ -1,7 +1,9 @@ import { useCallback } from "react"; -import AutoCompleteAsync from "../Form/AutoCompleteAsync"; -import routes from "../../Redux/api"; -import request from "../../Utils/request/request"; + +import AutoCompleteAsync from "@/components/Form/AutoCompleteAsync"; + +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; interface AssetSelectProps { name: string; diff --git a/src/components/Common/Avatar.tsx b/src/components/Common/Avatar.tsx index 7a7ded17265..2c463fa093b 100644 --- a/src/components/Common/Avatar.tsx +++ b/src/components/Common/Avatar.tsx @@ -1,6 +1,7 @@ -import { cn } from "@/lib/utils"; import React from "react"; +import { cn } from "@/lib/utils"; + const colors: string[] = [ "#E6F3FF", // Light Blue "#FFF0E6", // Light Peach diff --git a/src/components/Common/AvatarEditModal.tsx b/src/components/Common/AvatarEditModal.tsx index 8884b62e3c2..38b54b1f1d2 100644 --- a/src/components/Common/AvatarEditModal.tsx +++ b/src/components/Common/AvatarEditModal.tsx @@ -1,17 +1,21 @@ import React, { - useState, ChangeEventHandler, useCallback, useEffect, useRef, + useState, } from "react"; -import { Warn } from "@/Utils/Notifications"; -import useDragAndDrop from "@/Utils/useDragAndDrop"; -import ButtonV2, { Cancel, Submit } from "./components/ButtonV2"; +import { useTranslation } from "react-i18next"; import Webcam from "react-webcam"; + import CareIcon from "@/CAREUI/icons/CareIcon"; -import { useTranslation } from "react-i18next"; -import DialogModal from "./Dialog"; + +import ButtonV2, { Cancel, Submit } from "@/components/Common/ButtonV2"; +import DialogModal from "@/components/Common/Dialog"; + +import useDragAndDrop from "@/hooks/useDragAndDrop"; + +import { Warn } from "@/Utils/Notifications"; interface Props { title: string; diff --git a/src/components/Common/AvatarEditable.tsx b/src/components/Common/AvatarEditable.tsx index f8c0f4885bb..bbf3ab6c35f 100644 --- a/src/components/Common/AvatarEditable.tsx +++ b/src/components/Common/AvatarEditable.tsx @@ -1,7 +1,10 @@ -import CareIcon from "@/CAREUI/icons/CareIcon"; -import { cn } from "@/lib/utils"; import { useTranslation } from "react-i18next"; -import { AvatarProps, Avatar } from "@/components/Common/Avatar"; + +import { cn } from "@/lib/utils"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import { Avatar, AvatarProps } from "@/components/Common/Avatar"; interface AvatarEditableProps extends AvatarProps { id?: string; diff --git a/src/components/Common/BedSelect.tsx b/src/components/Common/BedSelect.tsx index 7ed741061ee..741049e7d74 100644 --- a/src/components/Common/BedSelect.tsx +++ b/src/components/Common/BedSelect.tsx @@ -1,10 +1,12 @@ import { useCallback } from "react"; -import { BedModel } from "../Facility/models"; -import AutoCompleteAsync from "../Form/AutoCompleteAsync"; import { useTranslation } from "react-i18next"; -import request from "../../Utils/request/request"; -import routes from "../../Redux/api"; -import { AssetClass } from "../Assets/AssetTypes"; + +import { AssetClass } from "@/components/Assets/AssetTypes"; +import { BedModel } from "@/components/Facility/models"; +import AutoCompleteAsync from "@/components/Form/AutoCompleteAsync"; + +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; interface BedSelectProps { name: string; diff --git a/src/components/Common/BloodPressureFormField.tsx b/src/components/Common/BloodPressureFormField.tsx index beddd34cf38..77ef37fe5d7 100644 --- a/src/components/Common/BloodPressureFormField.tsx +++ b/src/components/Common/BloodPressureFormField.tsx @@ -1,13 +1,14 @@ import { useTranslation } from "react-i18next"; -import { FieldValidator } from "../Form/FieldValidators"; -import FormField from "../Form/FormFields/FormField"; + +import { FieldValidator } from "@/components/Form/FieldValidators"; +import FormField from "@/components/Form/FormFields/FormField"; +import TextFormField from "@/components/Form/FormFields/TextFormField"; import { FieldChangeEvent, FormFieldBaseProps, useFormFieldPropsResolver, -} from "../Form/FormFields/Utils"; -import { BloodPressure } from "../Patient/models"; -import TextFormField from "../Form/FormFields/TextFormField"; +} from "@/components/Form/FormFields/Utils"; +import { BloodPressure } from "@/components/Patient/models"; type Props = FormFieldBaseProps; diff --git a/src/components/Common/Breadcrumbs.tsx b/src/components/Common/Breadcrumbs.tsx index 4ccbbfd717e..410df597a5d 100644 --- a/src/components/Common/Breadcrumbs.tsx +++ b/src/components/Common/Breadcrumbs.tsx @@ -1,9 +1,13 @@ -import { usePath, Link } from "raviger"; +import { Link, usePath } from "raviger"; import { useState } from "react"; -import { classNames } from "../../Utils/utils"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + import { Button } from "@/components/ui/button"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import useAppHistory from "@/common/hooks/useAppHistory"; + +import useAppHistory from "@/hooks/useAppHistory"; + +import { classNames } from "@/Utils/utils"; const MENU_TAGS: { [key: string]: string } = { facility: "Facilities", diff --git a/src/components/Common/components/ButtonV2.tsx b/src/components/Common/ButtonV2.tsx similarity index 96% rename from src/components/Common/components/ButtonV2.tsx rename to src/components/Common/ButtonV2.tsx index b7eab5f29d7..11b6aa95d20 100644 --- a/src/components/Common/components/ButtonV2.tsx +++ b/src/components/Common/ButtonV2.tsx @@ -1,11 +1,14 @@ -import AuthorizedChild from "../../../CAREUI/misc/AuthorizedChild"; -import { AuthorizedElementProps } from "../../../Utils/AuthorizeFor"; -import CareIcon from "../../../CAREUI/icons/CareIcon"; import { Link } from "raviger"; -import { classNames } from "../../../Utils/utils"; -import { useTranslation } from "react-i18next"; import { useEffect, useState } from "react"; -import Spinner from "../Spinner"; +import { useTranslation } from "react-i18next"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import AuthorizedChild from "@/CAREUI/misc/AuthorizedChild"; + +import Spinner from "@/components/Common/Spinner"; + +import { AuthorizedElementProps } from "@/Utils/AuthorizeFor"; +import { classNames } from "@/Utils/utils"; export type ButtonSize = "small" | "default" | "large"; export type ButtonShape = "square" | "circle"; diff --git a/src/components/Common/components/CircularProgress.tsx b/src/components/Common/CircularProgress.tsx similarity index 100% rename from src/components/Common/components/CircularProgress.tsx rename to src/components/Common/CircularProgress.tsx diff --git a/src/components/Common/components/CollapseV2.tsx b/src/components/Common/CollapseV2.tsx similarity index 100% rename from src/components/Common/components/CollapseV2.tsx rename to src/components/Common/CollapseV2.tsx diff --git a/src/components/Common/ConfirmDialog.tsx b/src/components/Common/ConfirmDialog.tsx index a6bc14e8d4f..0183fc1d651 100644 --- a/src/components/Common/ConfirmDialog.tsx +++ b/src/components/Common/ConfirmDialog.tsx @@ -1,5 +1,5 @@ -import DialogModal from "./Dialog"; -import { ButtonVariant, Cancel, Submit } from "./components/ButtonV2"; +import { ButtonVariant, Cancel, Submit } from "@/components/Common/ButtonV2"; +import DialogModal from "@/components/Common/Dialog"; type ConfirmDialogProps = { className?: string; diff --git a/src/components/Common/components/ContactLink.tsx b/src/components/Common/ContactLink.tsx similarity index 91% rename from src/components/Common/components/ContactLink.tsx rename to src/components/Common/ContactLink.tsx index ee834b3f2a9..c8115b42a1f 100644 --- a/src/components/Common/components/ContactLink.tsx +++ b/src/components/Common/ContactLink.tsx @@ -1,4 +1,4 @@ -import CareIcon from "../../../CAREUI/icons/CareIcon"; +import CareIcon from "@/CAREUI/icons/CareIcon"; type ContactLinkProps = | { mailto: string; tel?: undefined } diff --git a/src/components/Common/DateInputV2.tsx b/src/components/Common/DateInputV2.tsx index 87a29debe5b..522b3715c55 100644 --- a/src/components/Common/DateInputV2.tsx +++ b/src/components/Common/DateInputV2.tsx @@ -1,12 +1,14 @@ -import { MutableRefObject, useEffect, useRef, useState } from "react"; - -import CareIcon from "../../CAREUI/icons/CareIcon"; import { Popover, PopoverButton, PopoverPanel } from "@headlessui/react"; -import { classNames } from "../../Utils/utils"; -import dayjs from "../../Utils/dayjs"; -import * as Notification from "../../Utils/Notifications"; import { t } from "i18next"; -import DateTextInput from "./DateTextInput"; +import { MutableRefObject, useEffect, useRef, useState } from "react"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import DateTextInput from "@/components/Common/DateTextInput"; + +import * as Notification from "@/Utils/Notifications"; +import dayjs from "@/Utils/dayjs"; +import { classNames } from "@/Utils/utils"; type DatePickerType = "date" | "month" | "year"; diff --git a/src/components/Common/DateRangeInputV2.tsx b/src/components/Common/DateRangeInputV2.tsx index aa426ad0cb2..d3f57e59884 100644 --- a/src/components/Common/DateRangeInputV2.tsx +++ b/src/components/Common/DateRangeInputV2.tsx @@ -1,5 +1,6 @@ import { useState } from "react"; -import DateInputV2 from "./DateInputV2"; + +import DateInputV2 from "@/components/Common/DateInputV2"; export type DateRange = { start: Date | undefined; diff --git a/src/components/Common/DateTextInput.tsx b/src/components/Common/DateTextInput.tsx index 38e13b23283..f2cd4844a1c 100644 --- a/src/components/Common/DateTextInput.tsx +++ b/src/components/Common/DateTextInput.tsx @@ -1,8 +1,10 @@ -import CareIcon from "@/CAREUI/icons/CareIcon"; -import { classNames } from "@/Utils/utils"; import dayjs from "dayjs"; import { Fragment, KeyboardEvent, useEffect, useState } from "react"; +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import { classNames } from "@/Utils/utils"; + /** * DateTextInput component. * diff --git a/src/components/Common/Dialog.tsx b/src/components/Common/Dialog.tsx index 07722daf793..a67981dd3f8 100644 --- a/src/components/Common/Dialog.tsx +++ b/src/components/Common/Dialog.tsx @@ -5,7 +5,8 @@ import { Transition, TransitionChild, } from "@headlessui/react"; -import { classNames } from "../../Utils/utils"; + +import { classNames } from "@/Utils/utils"; type DialogProps = { title: React.ReactNode; diff --git a/src/components/Common/DistrictAutocompleteFormField.tsx b/src/components/Common/DistrictAutocompleteFormField.tsx index 25fef151f2a..91f1c9389f8 100644 --- a/src/components/Common/DistrictAutocompleteFormField.tsx +++ b/src/components/Common/DistrictAutocompleteFormField.tsx @@ -1,8 +1,9 @@ -import { FormFieldBaseProps } from "../Form/FormFields/Utils"; -import AutocompleteFormField from "../Form/FormFields/Autocomplete"; -import useQuery from "../../Utils/request/useQuery"; -import routes from "../../Redux/api"; -import { DistrictModel, StateModel } from "../Facility/models"; +import { DistrictModel, StateModel } from "@/components/Facility/models"; +import AutocompleteFormField from "@/components/Form/FormFields/Autocomplete"; +import { FormFieldBaseProps } from "@/components/Form/FormFields/Utils"; + +import routes from "@/Utils/request/api"; +import useQuery from "@/Utils/request/useQuery"; type Props = FormFieldBaseProps & { placeholder?: string; diff --git a/src/components/Common/ExcelFIleDragAndDrop.tsx b/src/components/Common/ExcelFIleDragAndDrop.tsx index d79cab62d34..67c64f0f433 100644 --- a/src/components/Common/ExcelFIleDragAndDrop.tsx +++ b/src/components/Common/ExcelFIleDragAndDrop.tsx @@ -1,18 +1,23 @@ import { forIn } from "lodash-es"; import { useEffect, useRef, useState } from "react"; -import * as Notification from "../../Utils/Notifications"; import { useTranslation } from "react-i18next"; -import { Cancel, Submit } from "./components/ButtonV2"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import useDragAndDrop from "../../Utils/useDragAndDrop"; -import ExcelViewer from "./ExcelViewer"; import * as XLSX from "xlsx"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import { Cancel, Submit } from "@/components/Common/ButtonV2"; +import ExcelViewer from "@/components/Common/ExcelViewer"; + +import useDragAndDrop from "@/hooks/useDragAndDrop"; + import schemaParser, { - SchemaType, ErrorData, ParsedData, + SchemaType, } from "@/common/schemaParser"; +import * as Notification from "@/Utils/Notifications"; + interface Props { handleSubmit: (data: any) => void; loading: boolean; diff --git a/src/components/Common/ExcelViewer.tsx b/src/components/Common/ExcelViewer.tsx index 4705d23c733..d35c98a6cc8 100644 --- a/src/components/Common/ExcelViewer.tsx +++ b/src/components/Common/ExcelViewer.tsx @@ -1,8 +1,11 @@ import { ReactNode, useEffect, useState } from "react"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import ButtonV2, { Cancel, Submit } from "./components/ButtonV2"; -import DialogModal from "./Dialog"; -import Pagination from "./Pagination"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import ButtonV2, { Cancel, Submit } from "@/components/Common/ButtonV2"; +import DialogModal from "@/components/Common/Dialog"; +import Pagination from "@/components/Common/Pagination"; + import { ParsedData } from "@/common/schemaParser"; type FilePreviewProps = { diff --git a/src/components/Common/Export.tsx b/src/components/Common/Export.tsx index c34e3f6b5d9..6cd786977ed 100644 --- a/src/components/Common/Export.tsx +++ b/src/components/Common/Export.tsx @@ -1,13 +1,15 @@ +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import ButtonV2 from "@/components/Common/ButtonV2"; import DropdownMenu, { DropdownItem, DropdownItemProps, -} from "@/components/Common/components/Menu"; +} from "@/components/Common/Menu"; + +import useExport from "@/hooks/useExport"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import useExport from "@/common/hooks/useExport"; -import { Route } from "../../Utils/request/types"; -import request from "../../Utils/request/request"; +import request from "@/Utils/request/request"; +import { Route } from "@/Utils/request/types"; interface ExportItem { options?: DropdownItemProps; diff --git a/src/components/Common/FacilitySelect.tsx b/src/components/Common/FacilitySelect.tsx index d91b9a7f8fc..e4397cbcb9c 100644 --- a/src/components/Common/FacilitySelect.tsx +++ b/src/components/Common/FacilitySelect.tsx @@ -1,9 +1,11 @@ -import { useCallback } from "react"; -import AutoCompleteAsync from "../Form/AutoCompleteAsync"; -import { FacilityModel } from "../Facility/models"; -import request from "../../Utils/request/request"; -import routes from "../../Redux/api"; import { t } from "i18next"; +import { useCallback } from "react"; + +import { FacilityModel } from "@/components/Facility/models"; +import AutoCompleteAsync from "@/components/Form/AutoCompleteAsync"; + +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; interface FacilitySelectProps { name: string; diff --git a/src/components/Common/FilePreviewDialog.tsx b/src/components/Common/FilePreviewDialog.tsx index 13768a0cf04..c3775664822 100644 --- a/src/components/Common/FilePreviewDialog.tsx +++ b/src/components/Common/FilePreviewDialog.tsx @@ -1,11 +1,13 @@ -import CircularProgress from "./components/CircularProgress"; -import { useTranslation } from "react-i18next"; -import { StateInterface } from "../Files/FileUpload"; import { Dispatch, ReactNode, SetStateAction, useState } from "react"; -import CareIcon, { IconName } from "../../CAREUI/icons/CareIcon"; -import ButtonV2, { Cancel } from "./components/ButtonV2"; -import DialogModal from "./Dialog"; -import PDFViewer from "./PDFViewer"; +import { useTranslation } from "react-i18next"; + +import CareIcon, { IconName } from "@/CAREUI/icons/CareIcon"; + +import ButtonV2, { Cancel } from "@/components/Common/ButtonV2"; +import CircularProgress from "@/components/Common/CircularProgress"; +import DialogModal from "@/components/Common/Dialog"; +import PDFViewer from "@/components/Common/PDFViewer"; +import { StateInterface } from "@/components/Files/FileUpload"; export const zoom_values = [ "scale-25", diff --git a/src/components/Common/GLocationPicker.tsx b/src/components/Common/GLocationPicker.tsx index 9b740e55d38..cee05ce4245 100644 --- a/src/components/Common/GLocationPicker.tsx +++ b/src/components/Common/GLocationPicker.tsx @@ -1,11 +1,14 @@ -import React from "react"; -import { Wrapper, Status } from "@googlemaps/react-wrapper"; -import { deepEqual } from "@/common/utils"; +import careConfig from "@careConfig"; +import { Status, Wrapper } from "@googlemaps/react-wrapper"; import { isLatLngLiteral } from "@googlemaps/typescript-guards"; -import Spinner from "./Spinner"; -import CareIcon from "../../CAREUI/icons/CareIcon"; import { PopoverButton } from "@headlessui/react"; -import careConfig from "@careConfig"; +import React from "react"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import Spinner from "@/components/Common/Spinner"; + +import { deepEqual } from "@/common/utils"; interface GLocationPickerProps { lat: number; diff --git a/src/components/Common/components/HelperComponents.tsx b/src/components/Common/HelperComponents.tsx similarity index 100% rename from src/components/Common/components/HelperComponents.tsx rename to src/components/Common/HelperComponents.tsx diff --git a/src/components/Common/LanguageSelector.tsx b/src/components/Common/LanguageSelector.tsx index a015d6fd609..5904f2cf7c7 100644 --- a/src/components/Common/LanguageSelector.tsx +++ b/src/components/Common/LanguageSelector.tsx @@ -1,9 +1,11 @@ +import careConfig from "@careConfig"; import { useEffect } from "react"; import { useTranslation } from "react-i18next"; -import { classNames } from "../../Utils/utils"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import careConfig from "@careConfig"; -import { LANGUAGES } from "../../i18n"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import { classNames } from "@/Utils/utils"; +import { LANGUAGES } from "@/i18n"; export const LanguageSelector = (props: any) => { const { i18n } = useTranslation(); diff --git a/src/components/Common/LanguageSelectorLogin.tsx b/src/components/Common/LanguageSelectorLogin.tsx index 905b97a734c..0c2ccc6e7a6 100644 --- a/src/components/Common/LanguageSelectorLogin.tsx +++ b/src/components/Common/LanguageSelectorLogin.tsx @@ -1,8 +1,9 @@ +import careConfig from "@careConfig"; import { useEffect } from "react"; import { useTranslation } from "react-i18next"; -import { classNames } from "../../Utils/utils"; -import careConfig from "@careConfig"; -import { LANGUAGES } from "../../i18n"; + +import { classNames } from "@/Utils/utils"; +import { LANGUAGES } from "@/i18n"; export const LanguageSelectorLogin = () => { const { i18n, t } = useTranslation(); diff --git a/src/components/Common/LocalBodyAutocompleteFormField.tsx b/src/components/Common/LocalBodyAutocompleteFormField.tsx index 8d0821cb43c..1ed5a997007 100644 --- a/src/components/Common/LocalBodyAutocompleteFormField.tsx +++ b/src/components/Common/LocalBodyAutocompleteFormField.tsx @@ -1,8 +1,9 @@ -import { FormFieldBaseProps } from "../Form/FormFields/Utils"; -import AutocompleteFormField from "../Form/FormFields/Autocomplete"; -import { DistrictModel, LocalBodyModel } from "../Facility/models"; -import useQuery from "../../Utils/request/useQuery"; -import routes from "../../Redux/api"; +import { DistrictModel, LocalBodyModel } from "@/components/Facility/models"; +import AutocompleteFormField from "@/components/Form/FormFields/Autocomplete"; +import { FormFieldBaseProps } from "@/components/Form/FormFields/Utils"; + +import routes from "@/Utils/request/api"; +import useQuery from "@/Utils/request/useQuery"; type Props = FormFieldBaseProps & { placeholder?: string; diff --git a/src/components/Common/LocationSelect.tsx b/src/components/Common/LocationSelect.tsx index cb1b7514ac0..48a8f927a48 100644 --- a/src/components/Common/LocationSelect.tsx +++ b/src/components/Common/LocationSelect.tsx @@ -1,7 +1,9 @@ -import AutocompleteFormField from "../Form/FormFields/Autocomplete"; -import AutocompleteMultiSelectFormField from "../Form/FormFields/AutocompleteMultiselect"; -import useQuery from "../../Utils/request/useQuery"; -import routes from "../../Redux/api"; +import AutocompleteFormField from "@/components/Form/FormFields/Autocomplete"; +import AutocompleteMultiSelectFormField from "@/components/Form/FormFields/AutocompleteMultiselect"; + +import routes from "@/Utils/request/api"; +import useQuery from "@/Utils/request/useQuery"; + interface LocationSelectProps { name: string; disabled?: boolean; diff --git a/src/components/Common/components/Menu.tsx b/src/components/Common/Menu.tsx similarity index 91% rename from src/components/Common/components/Menu.tsx rename to src/components/Common/Menu.tsx index cd2f80d0546..035b6f2f342 100644 --- a/src/components/Common/components/Menu.tsx +++ b/src/components/Common/Menu.tsx @@ -1,11 +1,14 @@ -import { Anyone, AuthorizedElementProps } from "../../../Utils/AuthorizeFor"; -import { ButtonSize, ButtonVariant } from "./ButtonV2"; -import { DetailedHTMLProps, HTMLAttributes, ReactNode } from "react"; import { Menu, MenuButton, MenuItem, MenuItems } from "@headlessui/react"; +import { DetailedHTMLProps, HTMLAttributes, ReactNode } from "react"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import { ButtonSize, ButtonVariant } from "@/components/Common/ButtonV2"; + +import { useIsAuthorized } from "@/hooks/useIsAuthorized"; -import CareIcon from "../../../CAREUI/icons/CareIcon"; -import { classNames } from "../../../Utils/utils"; -import { useIsAuthorized } from "@/common/hooks/useIsAuthorized"; +import { Anyone, AuthorizedElementProps } from "@/Utils/AuthorizeFor"; +import { classNames } from "@/Utils/utils"; interface DropdownMenuProps { id?: string; diff --git a/src/components/Common/PDFViewer.tsx b/src/components/Common/PDFViewer.tsx index a9566a01fc7..1a20fa9e133 100644 --- a/src/components/Common/PDFViewer.tsx +++ b/src/components/Common/PDFViewer.tsx @@ -1,7 +1,6 @@ -import { pdfjs, Document, Page } from "react-pdf"; - -import "react-pdf/dist/esm/Page/TextLayer.css"; +import { Document, Page, pdfjs } from "react-pdf"; import "react-pdf/dist/esm/Page/AnnotationLayer.css"; +import "react-pdf/dist/esm/Page/TextLayer.css"; export default function PDFViewer( props: Readonly<{ diff --git a/src/components/Common/components/Page.tsx b/src/components/Common/Page.tsx similarity index 89% rename from src/components/Common/components/Page.tsx rename to src/components/Common/Page.tsx index 79e5348b120..5d542a4fcbc 100644 --- a/src/components/Common/components/Page.tsx +++ b/src/components/Common/Page.tsx @@ -1,7 +1,9 @@ import { RefObject, useContext, useEffect } from "react"; -import PageTitle, { PageTitleProps } from "../PageTitle"; -import { classNames } from "../../../Utils/utils"; -import { SidebarShrinkContext } from "../Sidebar/Sidebar"; + +import PageTitle, { PageTitleProps } from "@/components/Common/PageTitle"; +import { SidebarShrinkContext } from "@/components/Common/Sidebar/Sidebar"; + +import { classNames } from "@/Utils/utils"; interface PageProps extends PageTitleProps { children: React.ReactNode | React.ReactNode[]; diff --git a/src/components/Common/PageTitle.tsx b/src/components/Common/PageTitle.tsx index f3ca0146f3e..ecdadec2d62 100644 --- a/src/components/Common/PageTitle.tsx +++ b/src/components/Common/PageTitle.tsx @@ -1,7 +1,9 @@ import { ReactNode, useEffect, useRef } from "react"; -import Breadcrumbs from "./Breadcrumbs"; -import PageHeadTitle from "./PageHeadTitle"; -import { classNames } from "../../Utils/utils"; + +import Breadcrumbs from "@/components/Common/Breadcrumbs"; +import PageHeadTitle from "@/components/Common/PageHeadTitle"; + +import { classNames } from "@/Utils/utils"; export interface PageTitleProps { title: string; diff --git a/src/components/Common/Pagination.tsx b/src/components/Common/Pagination.tsx index 1f7a68b333e..fc6ed04447d 100644 --- a/src/components/Common/Pagination.tsx +++ b/src/components/Common/Pagination.tsx @@ -1,7 +1,10 @@ import { useState } from "react"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import { useAbortableEffect, statusType } from "@/common/utils"; -import ButtonV2 from "./components/ButtonV2"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import ButtonV2 from "@/components/Common/ButtonV2"; + +import { statusType, useAbortableEffect } from "@/common/utils"; interface PaginationProps { data: { totalCount: number }; diff --git a/src/components/Common/PatientCategoryBadge.tsx b/src/components/Common/PatientCategoryBadge.tsx index a756a639241..466a46aa9a9 100644 --- a/src/components/Common/PatientCategoryBadge.tsx +++ b/src/components/Common/PatientCategoryBadge.tsx @@ -1,5 +1,6 @@ +import { PatientCategory } from "@/components/Facility/models"; + import { PATIENT_CATEGORIES } from "@/common/constants"; -import { PatientCategory } from "../Facility/models"; const PatientCategoryBadge = ({ category }: { category?: PatientCategory }) => { const categoryClass = category diff --git a/src/components/Common/QRScanner.tsx b/src/components/Common/QRScanner.tsx index f840c94cf2e..b81a6a5ca44 100644 --- a/src/components/Common/QRScanner.tsx +++ b/src/components/Common/QRScanner.tsx @@ -1,10 +1,12 @@ -import * as Notification from "../../Utils/Notifications"; - -import CareIcon from "../../CAREUI/icons/CareIcon"; -import DialogModal from "./Dialog"; -import TextFormField from "../Form/FormFields/TextFormField"; -import { useState } from "react"; import { IDetectedBarcode, Scanner } from "@yudiel/react-qr-scanner"; +import { useState } from "react"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import DialogModal from "@/components/Common/Dialog"; +import TextFormField from "@/components/Form/FormFields/TextFormField"; + +import * as Notification from "@/Utils/Notifications"; interface IQRScannerModalProps { show: boolean; diff --git a/src/components/Common/components/Readmore.tsx b/src/components/Common/Readmore.tsx similarity index 100% rename from src/components/Common/components/Readmore.tsx rename to src/components/Common/Readmore.tsx diff --git a/src/components/Common/RelativeDateUserMention.tsx b/src/components/Common/RelativeDateUserMention.tsx index f68f002eee5..70e820a6962 100644 --- a/src/components/Common/RelativeDateUserMention.tsx +++ b/src/components/Common/RelativeDateUserMention.tsx @@ -1,8 +1,9 @@ -import { formatDateTime, formatName, relativeDate } from "../../Utils/utils"; +import CareIcon from "@/CAREUI/icons/CareIcon"; -import CareIcon from "../../CAREUI/icons/CareIcon"; import { UserBareMinimum } from "@/components/Users/models"; +import { formatDateTime, formatName, relativeDate } from "@/Utils/utils"; + function RelativeDateUserMention(props: { actionDate?: string; user?: UserBareMinimum; diff --git a/src/components/Common/RouteToFacilitySelect.tsx b/src/components/Common/RouteToFacilitySelect.tsx index 56ba5c528dc..1bfb17140a7 100644 --- a/src/components/Common/RouteToFacilitySelect.tsx +++ b/src/components/Common/RouteToFacilitySelect.tsx @@ -1,8 +1,8 @@ -import { SelectFormField } from "../Form/FormFields/SelectFormField"; +import { SelectFormField } from "@/components/Form/FormFields/SelectFormField"; import { FormFieldBaseProps, useFormFieldPropsResolver, -} from "../Form/FormFields/Utils"; +} from "@/components/Form/FormFields/Utils"; export const ROUTE_TO_FACILITY_OPTIONS = { 10: "Outpatient/Emergency Room", diff --git a/src/components/Common/Sidebar/Sidebar.tsx b/src/components/Common/Sidebar/Sidebar.tsx index 2b117562fc9..6612555a908 100644 --- a/src/components/Common/Sidebar/Sidebar.tsx +++ b/src/components/Common/Sidebar/Sidebar.tsx @@ -1,21 +1,29 @@ -import { createContext, useContext, useEffect, useRef, useState } from "react"; -import { SidebarItem, ShrinkedSidebarItem } from "./SidebarItem"; -import SidebarUserCard from "./SidebarUserCard"; -import NotificationItem from "../../Notifications/NotificationsList"; -import useActiveLink from "@/common/hooks/useActiveLink"; -import CareIcon, { IconName } from "../../../CAREUI/icons/CareIcon"; -import SlideOver from "../../../CAREUI/interactive/SlideOver"; -import { classNames } from "../../../Utils/utils"; -import { Link } from "raviger"; import careConfig from "@careConfig"; +import { Link } from "raviger"; +import { createContext, useContext, useEffect, useRef, useState } from "react"; +import { useTranslation } from "react-i18next"; + +import CareIcon, { IconName } from "@/CAREUI/icons/CareIcon"; +import SlideOver from "@/CAREUI/interactive/SlideOver"; + import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, } from "@/components/ui/tooltip"; -import { useTranslation } from "react-i18next"; -import { useCareAppNavItems } from "@/common/hooks/useCareApps"; + +import { + ShrinkedSidebarItem, + SidebarItem, +} from "@/components/Common/Sidebar/SidebarItem"; +import SidebarUserCard from "@/components/Common/Sidebar/SidebarUserCard"; +import NotificationItem from "@/components/Notifications/NotificationsList"; + +import useActiveLink from "@/hooks/useActiveLink"; +import { useCareAppNavItems } from "@/hooks/useCareApps"; + +import { classNames } from "@/Utils/utils"; export const SIDEBAR_SHRINK_PREFERENCE_KEY = "sidebarShrinkPreference"; diff --git a/src/components/Common/Sidebar/SidebarItem.tsx b/src/components/Common/Sidebar/SidebarItem.tsx index 14a7445c358..31f64754ffd 100644 --- a/src/components/Common/Sidebar/SidebarItem.tsx +++ b/src/components/Common/Sidebar/SidebarItem.tsx @@ -1,8 +1,10 @@ import { Link } from "raviger"; +import React, { Ref, forwardRef } from "react"; import { useTranslation } from "react-i18next"; -import CareIcon from "../../../CAREUI/icons/CareIcon"; -import useAppHistory from "@/common/hooks/useAppHistory"; -import React, { forwardRef, Ref } from "react"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import useAppHistory from "@/hooks/useAppHistory"; export type SidebarIcon = React.ReactNode; diff --git a/src/components/Common/Sidebar/SidebarUserCard.tsx b/src/components/Common/Sidebar/SidebarUserCard.tsx index b73b97771f5..58bd0e6be4c 100644 --- a/src/components/Common/Sidebar/SidebarUserCard.tsx +++ b/src/components/Common/Sidebar/SidebarUserCard.tsx @@ -1,10 +1,9 @@ -import React from "react"; import { Link } from "raviger"; +import React from "react"; import { useTranslation } from "react-i18next"; -import CareIcon from "../../../CAREUI/icons/CareIcon"; -import { formatName, formatDisplayName } from "../../../Utils/utils"; -import useAuthUser, { useAuthContext } from "@/common/hooks/useAuthUser"; -import { Avatar } from "@/components/Common/Avatar"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + import { Button } from "@/components/ui/button"; import { DropdownMenu, @@ -13,6 +12,12 @@ import { DropdownMenuTrigger, } from "@/components/ui/dropdown-menu"; +import { Avatar } from "@/components/Common/Avatar"; + +import useAuthUser, { useAuthContext } from "@/hooks/useAuthUser"; + +import { formatDisplayName, formatName } from "@/Utils/utils"; + interface SidebarUserCardProps { shrinked: boolean; } diff --git a/src/components/Common/SkillSelect.tsx b/src/components/Common/SkillSelect.tsx index 117df4f536d..74ddbba5d83 100644 --- a/src/components/Common/SkillSelect.tsx +++ b/src/components/Common/SkillSelect.tsx @@ -1,8 +1,10 @@ import { useCallback } from "react"; -import AutoCompleteAsync from "../Form/AutoCompleteAsync"; -import { SkillModel, SkillObjectModel } from "../Users/models"; -import request from "../../Utils/request/request"; -import routes from "../../Redux/api"; + +import AutoCompleteAsync from "@/components/Form/AutoCompleteAsync"; +import { SkillModel, SkillObjectModel } from "@/components/Users/models"; + +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; interface SkillSelectProps { id?: string; diff --git a/src/components/Common/SortDropdown.tsx b/src/components/Common/SortDropdown.tsx index 7f190fde646..cf4193deaea 100644 --- a/src/components/Common/SortDropdown.tsx +++ b/src/components/Common/SortDropdown.tsx @@ -1,6 +1,8 @@ import { useTranslation } from "react-i18next"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import DropdownMenu, { DropdownItem } from "./components/Menu"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import DropdownMenu, { DropdownItem } from "@/components/Common/Menu"; export interface SortOption { isAscending: boolean; diff --git a/src/components/Common/StateAutocompleteFormField.tsx b/src/components/Common/StateAutocompleteFormField.tsx index 77d52768198..e184ae0ffd7 100644 --- a/src/components/Common/StateAutocompleteFormField.tsx +++ b/src/components/Common/StateAutocompleteFormField.tsx @@ -1,8 +1,9 @@ -import AutocompleteFormField from "../Form/FormFields/Autocomplete"; -import { FormFieldBaseProps } from "../Form/FormFields/Utils"; -import { StateModel } from "../Facility/models"; -import useQuery from "../../Utils/request/useQuery"; -import routes from "../../Redux/api"; +import { StateModel } from "@/components/Facility/models"; +import AutocompleteFormField from "@/components/Form/FormFields/Autocomplete"; +import { FormFieldBaseProps } from "@/components/Form/FormFields/Utils"; + +import routes from "@/Utils/request/api"; +import useQuery from "@/Utils/request/useQuery"; type Props = FormFieldBaseProps & { placeholder?: string; diff --git a/src/components/Common/Steps.tsx b/src/components/Common/Steps.tsx index 31c5145835f..bf1cc52d5b9 100644 --- a/src/components/Common/Steps.tsx +++ b/src/components/Common/Steps.tsx @@ -1,4 +1,4 @@ -import CareIcon from "../../CAREUI/icons/CareIcon"; +import CareIcon from "@/CAREUI/icons/CareIcon"; export interface Step { id: number; diff --git a/src/components/Common/components/Switch.tsx b/src/components/Common/Switch.tsx similarity index 95% rename from src/components/Common/components/Switch.tsx rename to src/components/Common/Switch.tsx index 7be7490f7b1..44d09146ef5 100644 --- a/src/components/Common/components/Switch.tsx +++ b/src/components/Common/Switch.tsx @@ -1,4 +1,7 @@ -import { FieldErrorText, FieldLabel } from "../../Form/FormFields/FormField"; +import { + FieldErrorText, + FieldLabel, +} from "@/components/Form/FormFields/FormField"; type SwitchProps = { name?: string; diff --git a/src/components/Common/components/Table.tsx b/src/components/Common/Table.tsx similarity index 100% rename from src/components/Common/components/Table.tsx rename to src/components/Common/Table.tsx diff --git a/src/components/Common/components/Tabs.tsx b/src/components/Common/Tabs.tsx similarity index 92% rename from src/components/Common/components/Tabs.tsx rename to src/components/Common/Tabs.tsx index e59f0d1f645..9a549cfabcf 100644 --- a/src/components/Common/components/Tabs.tsx +++ b/src/components/Common/Tabs.tsx @@ -1,6 +1,8 @@ -import { useEffect, useRef, type ReactNode } from "react"; -import { classNames } from "../../../Utils/utils"; -import useWindowDimensions from "@/common/hooks/useWindowDimensions"; +import { type ReactNode, useEffect, useRef } from "react"; + +import useWindowDimensions from "@/hooks/useWindowDimensions"; + +import { classNames } from "@/Utils/utils"; export default function Tabs(props: { className?: string; diff --git a/src/components/Common/TemperatureFormField.tsx b/src/components/Common/TemperatureFormField.tsx index 7b2d7124f09..af4e65833f6 100644 --- a/src/components/Common/TemperatureFormField.tsx +++ b/src/components/Common/TemperatureFormField.tsx @@ -1,9 +1,15 @@ -import { useState, useEffect } from "react"; -import { FieldChangeEvent, FormFieldBaseProps } from "../Form/FormFields/Utils"; -import { fahrenheitToCelsius, celsiusToFahrenheit } from "@/Utils/utils"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import ButtonV2 from "./components/ButtonV2"; -import TextFormField from "../Form/FormFields/TextFormField"; +import { useEffect, useState } from "react"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import ButtonV2 from "@/components/Common/ButtonV2"; +import TextFormField from "@/components/Form/FormFields/TextFormField"; +import { + FieldChangeEvent, + FormFieldBaseProps, +} from "@/components/Form/FormFields/Utils"; + +import { celsiusToFahrenheit, fahrenheitToCelsius } from "@/Utils/utils"; type TemperatureUnit = "celsius" | "fahrenheit"; diff --git a/src/components/Common/UpdatableApp.tsx b/src/components/Common/UpdatableApp.tsx index 27f6a735357..d27c778830f 100644 --- a/src/components/Common/UpdatableApp.tsx +++ b/src/components/Common/UpdatableApp.tsx @@ -1,8 +1,11 @@ import { Popover, Transition } from "@headlessui/react"; import { ReactNode, useEffect, useState } from "react"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import { classNames } from "../../Utils/utils"; -import ButtonV2 from "./components/ButtonV2"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import ButtonV2 from "@/components/Common/ButtonV2"; + +import { classNames } from "@/Utils/utils"; const META_URL = "/build-meta.json"; const APP_VERSION_KEY = "app-version"; diff --git a/src/components/Common/Uptime.tsx b/src/components/Common/Uptime.tsx index c9335b6f62a..1217d7e2b2c 100644 --- a/src/components/Common/Uptime.tsx +++ b/src/components/Common/Uptime.tsx @@ -1,10 +1,15 @@ import { Popover, PopoverPanel } from "@headlessui/react"; import { useEffect, useRef, useState } from "react"; -import { AssetStatus, AvailabilityRecord } from "../Assets/AssetTypes"; -import { classNames } from "../../Utils/utils"; -import dayjs from "../../Utils/dayjs"; -import useQuery from "../../Utils/request/useQuery"; -import { PaginatedResponse, QueryRoute } from "../../Utils/request/types"; + +import { + AssetStatus, + AvailabilityRecord, +} from "@/components/Assets/AssetTypes"; + +import dayjs from "@/Utils/dayjs"; +import { PaginatedResponse, QueryRoute } from "@/Utils/request/types"; +import useQuery from "@/Utils/request/useQuery"; +import { classNames } from "@/Utils/utils"; const STATUS_COLORS = { Operational: "bg-green-500", diff --git a/src/components/Common/UserAutocompleteFormField.tsx b/src/components/Common/UserAutocompleteFormField.tsx index 2bf5c49ffc8..f6e10e14870 100644 --- a/src/components/Common/UserAutocompleteFormField.tsx +++ b/src/components/Common/UserAutocompleteFormField.tsx @@ -1,20 +1,23 @@ -import { Autocomplete } from "../Form/FormFields/Autocomplete"; -import FormField from "../Form/FormFields/FormField"; +import { useEffect, useState } from "react"; + +import { Autocomplete } from "@/components/Form/FormFields/Autocomplete"; +import FormField from "@/components/Form/FormFields/FormField"; import { FormFieldBaseProps, useFormFieldPropsResolver, -} from "../Form/FormFields/Utils"; +} from "@/components/Form/FormFields/Utils"; +import { UserBareMinimum } from "@/components/Users/models"; + +import { UserRole } from "@/common/constants"; + +import routes from "@/Utils/request/api"; +import useQuery from "@/Utils/request/useQuery"; import { classNames, formatName, isUserOnline, mergeQueryOptions, -} from "../../Utils/utils"; -import { UserRole } from "@/common/constants"; -import { useEffect, useState } from "react"; -import useQuery from "../../Utils/request/useQuery"; -import routes from "../../Redux/api"; -import { UserBareMinimum } from "../Users/models"; +} from "@/Utils/utils"; type BaseProps = FormFieldBaseProps & { placeholder?: string; diff --git a/src/components/Common/UserDetailsComponet.tsx b/src/components/Common/UserDetailsComponet.tsx index 44aff851917..b1e5cce3ed8 100644 --- a/src/components/Common/UserDetailsComponet.tsx +++ b/src/components/Common/UserDetailsComponet.tsx @@ -1,4 +1,4 @@ -import UserDetails from "./UserDetails"; +import UserDetails from "@/components/Common/UserDetails"; const UserDetailComponent = ({ id, diff --git a/src/components/Common/prescription-builder/InvestigationBuilder.tsx b/src/components/Common/prescription-builder/InvestigationBuilder.tsx index 8bee74b9067..7a136649bcd 100644 --- a/src/components/Common/prescription-builder/InvestigationBuilder.tsx +++ b/src/components/Common/prescription-builder/InvestigationBuilder.tsx @@ -1,12 +1,15 @@ -import { useEffect, useState } from "react"; -import { PrescriptionDropdown } from "./PrescriptionDropdown"; -import { PrescriptionMultiDropdown } from "./PrescriptionMultiselect"; -import CareIcon from "../../../CAREUI/icons/CareIcon"; -import request from "../../../Utils/request/request"; -import routes from "../../../Redux/api"; -import { humanizeStrings } from "../../../Utils/utils"; -import DateFormField from "../../Form/FormFields/DateFormField"; import dayjs from "dayjs"; +import { useEffect, useState } from "react"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import { PrescriptionDropdown } from "@/components/Common/prescription-builder/PrescriptionDropdown"; +import { PrescriptionMultiDropdown } from "@/components/Common/prescription-builder/PrescriptionMultiselect"; +import DateFormField from "@/components/Form/FormFields/DateFormField"; + +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import { humanizeStrings } from "@/Utils/utils"; export type InvestigationType = { type?: string[]; diff --git a/src/components/Common/prescription-builder/PrescriptionDropdown.tsx b/src/components/Common/prescription-builder/PrescriptionDropdown.tsx index 6d122d00a5a..901fe1db9d6 100644 --- a/src/components/Common/prescription-builder/PrescriptionDropdown.tsx +++ b/src/components/Common/prescription-builder/PrescriptionDropdown.tsx @@ -1,6 +1,8 @@ import { useEffect, useRef, useState } from "react"; -import { classNames } from "../../../Utils/utils"; -import CareIcon from "../../../CAREUI/icons/CareIcon"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import { classNames } from "@/Utils/utils"; export function PrescriptionDropdown(props: { options: string[] | number[]; diff --git a/src/components/Common/prescription-builder/PrescriptionMultiselect.tsx b/src/components/Common/prescription-builder/PrescriptionMultiselect.tsx index 4f744bcbae7..4235615cee8 100644 --- a/src/components/Common/prescription-builder/PrescriptionMultiselect.tsx +++ b/src/components/Common/prescription-builder/PrescriptionMultiselect.tsx @@ -1,6 +1,8 @@ import { useEffect, useRef, useState } from "react"; -import { classNames } from "../../../Utils/utils"; -import CareIcon from "../../../CAREUI/icons/CareIcon"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import { classNames } from "@/Utils/utils"; export function PrescriptionMultiDropdown(props: { options: string[]; diff --git a/src/components/Common/prescription-builder/ProcedureBuilder.tsx b/src/components/Common/prescription-builder/ProcedureBuilder.tsx index 36536c2435b..e4ea132424b 100644 --- a/src/components/Common/prescription-builder/ProcedureBuilder.tsx +++ b/src/components/Common/prescription-builder/ProcedureBuilder.tsx @@ -1,8 +1,10 @@ -import { useState } from "react"; -import { PrescriptionDropdown } from "./PrescriptionDropdown"; -import CareIcon from "../../../CAREUI/icons/CareIcon"; import dayjs from "dayjs"; -import DateFormField from "../../Form/FormFields/DateFormField"; +import { useState } from "react"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import { PrescriptionDropdown } from "@/components/Common/prescription-builder/PrescriptionDropdown"; +import DateFormField from "@/components/Form/FormFields/DateFormField"; export type ProcedureType = { procedure?: string; diff --git a/src/components/DeathReport/DeathReport.tsx b/src/components/DeathReport/DeathReport.tsx index 00f6d6bd773..7f2b3cddfcc 100644 --- a/src/components/DeathReport/DeathReport.tsx +++ b/src/components/DeathReport/DeathReport.tsx @@ -1,22 +1,26 @@ +import dayjs from "dayjs"; +import { navigate } from "raviger"; import { useState } from "react"; +import { useTranslation } from "react-i18next"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import Page from "@/components/Common/Page"; +import Form from "@/components/Form/Form"; +import DateFormField from "@/components/Form/FormFields/DateFormField"; +import PhoneNumberFormField from "@/components/Form/FormFields/PhoneNumberFormField"; +import TextAreaFormField from "@/components/Form/FormFields/TextAreaFormField"; +import TextFormField from "@/components/Form/FormFields/TextFormField"; + import { GENDER_TYPES } from "@/common/constants"; -import TextFormField from "../Form/FormFields/TextFormField"; -import TextAreaFormField from "../Form/FormFields/TextAreaFormField"; -import DateFormField from "../Form/FormFields/DateFormField"; -import PhoneNumberFormField from "../Form/FormFields/PhoneNumberFormField"; + +import routes from "@/Utils/request/api"; +import useQuery from "@/Utils/request/useQuery"; import { formatDateTime, formatPatientAge, humanizeStrings, -} from "../../Utils/utils"; -import Page from "@/components/Common/components/Page"; -import Form from "../Form/Form"; -import { useTranslation } from "react-i18next"; -import { navigate } from "raviger"; -import dayjs from "dayjs"; -import useQuery from "../../Utils/request/useQuery"; -import routes from "../../Redux/api"; -import CareIcon from "../../CAREUI/icons/CareIcon"; +} from "@/Utils/utils"; type DeathReport = { name?: string; diff --git a/src/components/Diagnosis/ConditionVerificationStatusMenu.tsx b/src/components/Diagnosis/ConditionVerificationStatusMenu.tsx index 121ff258195..608e2d06dff 100644 --- a/src/components/Diagnosis/ConditionVerificationStatusMenu.tsx +++ b/src/components/Diagnosis/ConditionVerificationStatusMenu.tsx @@ -1,14 +1,15 @@ import { useTranslation } from "react-i18next"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import DropdownMenu, { - DropdownItem, -} from "@/components/Common/components/Menu"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import { ButtonSize } from "@/components/Common/ButtonV2"; +import DropdownMenu, { DropdownItem } from "@/components/Common/Menu"; import { ConditionVerificationStatus, InactiveConditionVerificationStatuses, -} from "./types"; -import { classNames } from "../../Utils/utils"; -import { ButtonSize } from "@/components/Common/components/ButtonV2"; +} from "@/components/Diagnosis/types"; + +import { classNames } from "@/Utils/utils"; interface Props { disabled?: boolean; diff --git a/src/components/Diagnosis/ConsultationDiagnosisBuilder/AddICD11Diagnosis.tsx b/src/components/Diagnosis/ConsultationDiagnosisBuilder/AddICD11Diagnosis.tsx index 6bc309f5716..e864ed139c5 100644 --- a/src/components/Diagnosis/ConsultationDiagnosisBuilder/AddICD11Diagnosis.tsx +++ b/src/components/Diagnosis/ConsultationDiagnosisBuilder/AddICD11Diagnosis.tsx @@ -1,16 +1,18 @@ import { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; -import AutocompleteFormField from "../../Form/FormFields/Autocomplete"; + +import ConditionVerificationStatusMenu from "@/components/Diagnosis/ConditionVerificationStatusMenu"; import { ActiveConditionVerificationStatuses, CreateDiagnosis, ICD11DiagnosisModel, -} from "../types"; -import ConditionVerificationStatusMenu from "../ConditionVerificationStatusMenu"; -import { classNames, mergeQueryOptions } from "../../../Utils/utils"; -import useQuery from "../../../Utils/request/useQuery"; -import routes from "../../../Redux/api"; -import { Error } from "../../../Utils/Notifications"; +} from "@/components/Diagnosis/types"; +import AutocompleteFormField from "@/components/Form/FormFields/Autocomplete"; + +import { Error } from "@/Utils/Notifications"; +import routes from "@/Utils/request/api"; +import useQuery from "@/Utils/request/useQuery"; +import { classNames, mergeQueryOptions } from "@/Utils/utils"; interface AddICD11DiagnosisProps { className?: string; diff --git a/src/components/Diagnosis/ConsultationDiagnosisBuilder/ConsultationDiagnosisBuilder.tsx b/src/components/Diagnosis/ConsultationDiagnosisBuilder/ConsultationDiagnosisBuilder.tsx index ee716039364..a9d086a8bb2 100644 --- a/src/components/Diagnosis/ConsultationDiagnosisBuilder/ConsultationDiagnosisBuilder.tsx +++ b/src/components/Diagnosis/ConsultationDiagnosisBuilder/ConsultationDiagnosisBuilder.tsx @@ -1,17 +1,21 @@ import { useEffect, useState } from "react"; -import useSlug from "@/common/hooks/useSlug"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import AddICD11Diagnosis from "@/components/Diagnosis/ConsultationDiagnosisBuilder/AddICD11Diagnosis"; +import ConsultationDiagnosisEntry from "@/components/Diagnosis/ConsultationDiagnosisBuilder/ConsultationDiagnosisEntry"; +import PrincipalDiagnosisSelect from "@/components/Diagnosis/ConsultationDiagnosisBuilder/PrincipalDiagnosisSelect"; +import DiagnosesRoutes from "@/components/Diagnosis/routes"; import { ConsultationDiagnosis, CreateDiagnosis, ICD11DiagnosisModel, -} from "../types"; -import AddICD11Diagnosis from "./AddICD11Diagnosis"; -import ConsultationDiagnosisEntry from "./ConsultationDiagnosisEntry"; -import request from "../../../Utils/request/request"; -import DiagnosesRoutes from "../routes"; -import * as Notification from "../../../Utils/Notifications"; -import PrincipalDiagnosisSelect from "./PrincipalDiagnosisSelect"; -import CareIcon from "../../../CAREUI/icons/CareIcon"; +} from "@/components/Diagnosis/types"; + +import useSlug from "@/hooks/useSlug"; + +import * as Notification from "@/Utils/Notifications"; +import request from "@/Utils/request/request"; interface CreateDiagnosesProps { className?: string; diff --git a/src/components/Diagnosis/ConsultationDiagnosisBuilder/ConsultationDiagnosisEntry.tsx b/src/components/Diagnosis/ConsultationDiagnosisBuilder/ConsultationDiagnosisEntry.tsx index bbe9ff31b9a..efef63cfd1c 100644 --- a/src/components/Diagnosis/ConsultationDiagnosisBuilder/ConsultationDiagnosisEntry.tsx +++ b/src/components/Diagnosis/ConsultationDiagnosisBuilder/ConsultationDiagnosisEntry.tsx @@ -1,14 +1,16 @@ -import ConditionVerificationStatusMenu from "../ConditionVerificationStatusMenu"; +import { useState } from "react"; + +import ConditionVerificationStatusMenu from "@/components/Diagnosis/ConditionVerificationStatusMenu"; +import DiagnosesRoutes from "@/components/Diagnosis/routes"; import { ActiveConditionVerificationStatuses, ConditionVerificationStatuses, ConsultationDiagnosis, CreateDiagnosis, -} from "../types"; -import DiagnosesRoutes from "../routes"; -import { useState } from "react"; -import request from "../../../Utils/request/request"; -import { classNames } from "../../../Utils/utils"; +} from "@/components/Diagnosis/types"; + +import request from "@/Utils/request/request"; +import { classNames } from "@/Utils/utils"; interface RemoveAction { type: "remove"; diff --git a/src/components/Diagnosis/ConsultationDiagnosisBuilder/PrincipalDiagnosisSelect.tsx b/src/components/Diagnosis/ConsultationDiagnosisBuilder/PrincipalDiagnosisSelect.tsx index 768b5eac019..2f9c46431b9 100644 --- a/src/components/Diagnosis/ConsultationDiagnosisBuilder/PrincipalDiagnosisSelect.tsx +++ b/src/components/Diagnosis/ConsultationDiagnosisBuilder/PrincipalDiagnosisSelect.tsx @@ -1,10 +1,11 @@ import { useState } from "react"; + import { ActiveConditionVerificationStatuses, ConsultationDiagnosis, CreateDiagnosis, -} from "../types"; -import { SelectFormField } from "../../Form/FormFields/SelectFormField"; +} from "@/components/Diagnosis/types"; +import { SelectFormField } from "@/components/Form/FormFields/SelectFormField"; type Option = CreateDiagnosis | ConsultationDiagnosis; diff --git a/src/components/Diagnosis/DiagnosesListAccordion.tsx b/src/components/Diagnosis/DiagnosesListAccordion.tsx index 534f4f0bf6f..c42916f0578 100644 --- a/src/components/Diagnosis/DiagnosesListAccordion.tsx +++ b/src/components/Diagnosis/DiagnosesListAccordion.tsx @@ -1,13 +1,16 @@ +import { useState } from "react"; +import { useTranslation } from "react-i18next"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import ButtonV2 from "@/components/Common/ButtonV2"; import { ActiveConditionVerificationStatuses, ConditionVerificationStatus, ConsultationDiagnosis, -} from "./types"; -import { useTranslation } from "react-i18next"; -import { classNames, compareBy } from "../../Utils/utils"; -import { useState } from "react"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; +} from "@/components/Diagnosis/types"; + +import { classNames, compareBy } from "@/Utils/utils"; interface Props { diagnoses: ConsultationDiagnosis[]; diff --git a/src/components/Diagnosis/routes.ts b/src/components/Diagnosis/routes.ts index 159999fac5f..8364a555d11 100644 --- a/src/components/Diagnosis/routes.ts +++ b/src/components/Diagnosis/routes.ts @@ -1,6 +1,10 @@ -import { Type } from "../../Redux/api"; -import { PaginatedResponse } from "../../Utils/request/types"; -import { ConsultationDiagnosis, CreateDiagnosis } from "./types"; +import { + ConsultationDiagnosis, + CreateDiagnosis, +} from "@/components/Diagnosis/types"; + +import { Type } from "@/Utils/request/api"; +import { PaginatedResponse } from "@/Utils/request/types"; const DiagnosesRoutes = { // ICD-11 diff --git a/src/components/Diagnosis/utils.ts b/src/components/Diagnosis/utils.ts index 1cac3cecbca..24109996878 100644 --- a/src/components/Diagnosis/utils.ts +++ b/src/components/Diagnosis/utils.ts @@ -1,6 +1,7 @@ -import routes from "../../Redux/api"; -import request from "../../Utils/request/request"; -import { ICD11DiagnosisModel } from "./types"; +import { ICD11DiagnosisModel } from "@/components/Diagnosis/types"; + +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; export const getDiagnosisById = async (id: ICD11DiagnosisModel["id"]) => { return (await request(routes.getICD11Diagnosis, { pathParams: { id } })).data; diff --git a/src/components/ErrorPages/404.tsx b/src/components/ErrorPages/404.tsx index ebb6b5cb789..ba34a107adc 100644 --- a/src/components/ErrorPages/404.tsx +++ b/src/components/ErrorPages/404.tsx @@ -1,8 +1,9 @@ import { Link } from "raviger"; -import * as Notification from "../../Utils/Notifications"; import { useEffect } from "react"; import { useTranslation } from "react-i18next"; +import * as Notification from "@/Utils/Notifications"; + export default function Error404() { const { t } = useTranslation(); useEffect(() => { diff --git a/src/components/ErrorPages/BrowserWarning.tsx b/src/components/ErrorPages/BrowserWarning.tsx index 4eb0b7c7e10..48f9aadb1ae 100644 --- a/src/components/ErrorPages/BrowserWarning.tsx +++ b/src/components/ErrorPages/BrowserWarning.tsx @@ -1,8 +1,9 @@ -import React from "react"; -import supportedBrowsers from "../../supportedBrowsers"; import bowser from "bowser"; +import React from "react"; import { useTranslation } from "react-i18next"; +import supportedBrowsers from "@/supportedBrowsers"; + const BrowserWarning = () => { const { t } = useTranslation(); const notSupported = React.useMemo(() => { diff --git a/src/components/ErrorPages/InvalidReset.tsx b/src/components/ErrorPages/InvalidReset.tsx index a64894bab3c..7755e56f4bd 100644 --- a/src/components/ErrorPages/InvalidReset.tsx +++ b/src/components/ErrorPages/InvalidReset.tsx @@ -1,8 +1,9 @@ -import * as Notification from "../../Utils/Notifications"; -import { useEffect } from "react"; import { Link } from "raviger"; +import { useEffect } from "react"; import { useTranslation } from "react-i18next"; +import * as Notification from "@/Utils/Notifications"; + export default function InvalidReset() { const { t } = useTranslation(); useEffect(() => { diff --git a/src/components/ErrorPages/SessionExpired.tsx b/src/components/ErrorPages/SessionExpired.tsx index 2b50a8bcc6e..67916cbdd16 100644 --- a/src/components/ErrorPages/SessionExpired.tsx +++ b/src/components/ErrorPages/SessionExpired.tsx @@ -1,7 +1,9 @@ -import * as Notification from "../../Utils/Notifications"; import { useEffect } from "react"; import { useTranslation } from "react-i18next"; -import { useAuthContext } from "@/common/hooks/useAuthUser"; + +import { useAuthContext } from "@/hooks/useAuthUser"; + +import * as Notification from "@/Utils/Notifications"; export default function SessionExpired() { const { signOut } = useAuthContext(); diff --git a/src/components/ExternalResult/FacilitiesSelectDialogue.tsx b/src/components/ExternalResult/FacilitiesSelectDialogue.tsx index 3f15e35e992..66e290c069d 100644 --- a/src/components/ExternalResult/FacilitiesSelectDialogue.tsx +++ b/src/components/ExternalResult/FacilitiesSelectDialogue.tsx @@ -1,9 +1,11 @@ -import { Cancel, Submit } from "@/components/Common/components/ButtonV2"; +import { useTranslation } from "react-i18next"; + +import { Cancel, Submit } from "@/components/Common/ButtonV2"; import DialogModal from "@/components/Common/Dialog"; import { FacilitySelect } from "@/components/Common/FacilitySelect"; -import { FacilityModel } from "../Facility/models"; -import { useTranslation } from "react-i18next"; -import useAuthUser from "@/common/hooks/useAuthUser"; +import { FacilityModel } from "@/components/Facility/models"; + +import useAuthUser from "@/hooks/useAuthUser"; interface Props { show: boolean; diff --git a/src/components/Facility/AddBedForm.tsx b/src/components/Facility/AddBedForm.tsx index ee607587195..74b65284b02 100644 --- a/src/components/Facility/AddBedForm.tsx +++ b/src/components/Facility/AddBedForm.tsx @@ -1,21 +1,25 @@ -import Card from "../../CAREUI/display/Card"; - -import { useState, SyntheticEvent } from "react"; -import * as Notification from "../../Utils/Notifications"; -import CheckBoxFormField from "../Form/FormFields/CheckBoxFormField"; -import { SelectFormField } from "../Form/FormFields/SelectFormField"; -import { LOCATION_BED_TYPES } from "@/common/constants"; -import { Cancel, Submit } from "@/components/Common/components/ButtonV2"; -import TextFormField from "../Form/FormFields/TextFormField"; -import TextAreaFormField from "../Form/FormFields/TextAreaFormField"; -import Page from "@/components/Common/components/Page"; -import useQuery from "../../Utils/request/useQuery"; -import routes from "../../Redux/api"; -import useAppHistory from "@/common/hooks/useAppHistory"; -import request from "../../Utils/request/request"; +import { SyntheticEvent, useState } from "react"; import { useTranslation } from "react-i18next"; +import Card from "@/CAREUI/display/Card"; + +import { Cancel, Submit } from "@/components/Common/ButtonV2"; import Loading from "@/components/Common/Loading"; +import Page from "@/components/Common/Page"; +import CheckBoxFormField from "@/components/Form/FormFields/CheckBoxFormField"; +import { SelectFormField } from "@/components/Form/FormFields/SelectFormField"; +import TextAreaFormField from "@/components/Form/FormFields/TextAreaFormField"; +import TextFormField from "@/components/Form/FormFields/TextFormField"; + +import useAppHistory from "@/hooks/useAppHistory"; + +import { LOCATION_BED_TYPES } from "@/common/constants"; + +import * as Notification from "@/Utils/Notifications"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import useQuery from "@/Utils/request/useQuery"; + interface Props { facilityId: string; locationId: string; diff --git a/src/components/Facility/AddInventoryForm.tsx b/src/components/Facility/AddInventoryForm.tsx index d48a2f39653..0ab873a3cd5 100644 --- a/src/components/Facility/AddInventoryForm.tsx +++ b/src/components/Facility/AddInventoryForm.tsx @@ -1,17 +1,21 @@ -import { useReducer, useState, useEffect } from "react"; -import Card from "../../CAREUI/display/Card"; -import * as Notification from "../../Utils/Notifications"; -import Page from "@/components/Common/components/Page"; -import { FieldLabel } from "../Form/FormFields/FormField"; -import { SelectFormField } from "../Form/FormFields/SelectFormField"; -import TextFormField from "../Form/FormFields/TextFormField"; -import { Cancel, Submit } from "@/components/Common/components/ButtonV2"; -import useAppHistory from "@/common/hooks/useAppHistory"; -import useQuery from "../../Utils/request/useQuery"; -import routes from "../../Redux/api"; -import request from "../../Utils/request/request"; +import { useEffect, useReducer, useState } from "react"; +import Card from "@/CAREUI/display/Card"; + +import { Cancel, Submit } from "@/components/Common/ButtonV2"; import Loading from "@/components/Common/Loading"; +import Page from "@/components/Common/Page"; +import { FieldLabel } from "@/components/Form/FormFields/FormField"; +import { SelectFormField } from "@/components/Form/FormFields/SelectFormField"; +import TextFormField from "@/components/Form/FormFields/TextFormField"; + +import useAppHistory from "@/hooks/useAppHistory"; + +import * as Notification from "@/Utils/Notifications"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import useQuery from "@/Utils/request/useQuery"; + const initForm = { id: "", quantity: "", diff --git a/src/components/Facility/AddLocationForm.tsx b/src/components/Facility/AddLocationForm.tsx index d3ae0f57955..beea5e80d4d 100644 --- a/src/components/Facility/AddLocationForm.tsx +++ b/src/components/Facility/AddLocationForm.tsx @@ -1,17 +1,19 @@ -import { useState, SyntheticEvent } from "react"; -import * as Notification from "../../Utils/Notifications"; import { navigate } from "raviger"; -import { Submit, Cancel } from "@/components/Common/components/ButtonV2"; -import TextFormField from "../Form/FormFields/TextFormField"; -import TextAreaFormField from "../Form/FormFields/TextAreaFormField"; -import Page from "@/components/Common/components/Page"; -import { SelectFormField } from "../Form/FormFields/SelectFormField"; -import { AssetLocationType } from "../Assets/AssetTypes"; -import useQuery from "../../Utils/request/useQuery"; -import routes from "../../Redux/api"; -import request from "../../Utils/request/request"; +import { SyntheticEvent, useState } from "react"; +import { AssetLocationType } from "@/components/Assets/AssetTypes"; +import { Cancel, Submit } from "@/components/Common/ButtonV2"; import Loading from "@/components/Common/Loading"; +import Page from "@/components/Common/Page"; +import { SelectFormField } from "@/components/Form/FormFields/SelectFormField"; +import TextAreaFormField from "@/components/Form/FormFields/TextAreaFormField"; +import TextFormField from "@/components/Form/FormFields/TextFormField"; + +import * as Notification from "@/Utils/Notifications"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import useQuery from "@/Utils/request/useQuery"; + interface Props { facilityId: string; locationId?: string; diff --git a/src/components/Facility/AssetCreate.tsx b/src/components/Facility/AssetCreate.tsx index 60676f9ca18..5c507bb0a18 100644 --- a/src/components/Facility/AssetCreate.tsx +++ b/src/components/Facility/AssetCreate.tsx @@ -1,7 +1,5 @@ -import * as Notification from "../../Utils/Notifications"; - -import { AssetClass, AssetType } from "../Assets/AssetTypes"; -import { Cancel, Submit } from "@/components/Common/components/ButtonV2"; +import { IDetectedBarcode, Scanner } from "@yudiel/react-qr-scanner"; +import { navigate } from "raviger"; import { LegacyRef, MutableRefObject, @@ -11,32 +9,39 @@ import { useReducer, useState, } from "react"; +import { useTranslation } from "react-i18next"; -import CareIcon, { IconName } from "../../CAREUI/icons/CareIcon"; -import { FieldErrorText, FieldLabel } from "../Form/FormFields/FormField"; +import CareIcon, { IconName } from "@/CAREUI/icons/CareIcon"; + +import { AssetClass, AssetType } from "@/components/Assets/AssetTypes"; +import { Cancel, Submit } from "@/components/Common/ButtonV2"; +import Loading from "@/components/Common/Loading"; import { LocationSelect } from "@/components/Common/LocationSelect"; -import Page from "@/components/Common/components/Page"; -import PhoneNumberFormField from "../Form/FormFields/PhoneNumberFormField"; -import { IDetectedBarcode, Scanner } from "@yudiel/react-qr-scanner"; -import { SelectFormField } from "../Form/FormFields/SelectFormField"; -import SwitchV2 from "@/components/Common/components/Switch"; -import TextAreaFormField from "../Form/FormFields/TextAreaFormField"; -import TextFormField from "../Form/FormFields/TextFormField"; +import Page from "@/components/Common/Page"; +import SwitchV2 from "@/components/Common/Switch"; +import DateFormField from "@/components/Form/FormFields/DateFormField"; +import { + FieldErrorText, + FieldLabel, +} from "@/components/Form/FormFields/FormField"; +import PhoneNumberFormField from "@/components/Form/FormFields/PhoneNumberFormField"; +import { SelectFormField } from "@/components/Form/FormFields/SelectFormField"; +import TextAreaFormField from "@/components/Form/FormFields/TextAreaFormField"; +import TextFormField from "@/components/Form/FormFields/TextFormField"; + +import useAppHistory from "@/hooks/useAppHistory"; +import useVisibility from "@/hooks/useVisibility"; -import { navigate } from "raviger"; -import { parseQueryParams } from "../../Utils/primitives"; -import useAppHistory from "@/common/hooks/useAppHistory"; -import useVisibility from "../../Utils/useVisibility"; import { validateEmailAddress } from "@/common/validation"; -import { dateQueryString, parsePhoneNumber } from "../../Utils/utils"; -import dayjs from "../../Utils/dayjs"; -import DateFormField from "../Form/FormFields/DateFormField"; -import useQuery from "../../Utils/request/useQuery"; -import routes from "../../Redux/api"; -import request from "../../Utils/request/request"; -import { useTranslation } from "react-i18next"; -import Loading from "@/components/Common/Loading"; +import * as Notification from "@/Utils/Notifications"; +import dayjs from "@/Utils/dayjs"; +import { parseQueryParams } from "@/Utils/primitives"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import useQuery from "@/Utils/request/useQuery"; +import { dateQueryString, parsePhoneNumber } from "@/Utils/utils"; + const formErrorKeys = [ "name", "asset_class", diff --git a/src/components/Facility/BedCapacity.tsx b/src/components/Facility/BedCapacity.tsx index 2b47abfcda0..4b4ef16bd4c 100644 --- a/src/components/Facility/BedCapacity.tsx +++ b/src/components/Facility/BedCapacity.tsx @@ -1,12 +1,16 @@ import { useEffect, useReducer, useState } from "react"; -import * as Notification from "../../Utils/Notifications"; -import { CapacityModal, OptionsType } from "./models"; -import TextFormField from "../Form/FormFields/TextFormField"; -import { SelectFormField } from "../Form/FormFields/SelectFormField"; -import { BED_TYPES } from "@/common/constants"; -import routes from "../../Redux/api"; -import request from "../../Utils/request/request"; import { useTranslation } from "react-i18next"; + +import { CapacityModal, OptionsType } from "@/components/Facility/models"; +import { SelectFormField } from "@/components/Form/FormFields/SelectFormField"; +import TextFormField from "@/components/Form/FormFields/TextFormField"; + +import { BED_TYPES } from "@/common/constants"; + +import * as Notification from "@/Utils/Notifications"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; + import Form from "../Form/Form"; interface BedCapacityProps extends CapacityModal { diff --git a/src/components/Facility/BedDeleteDialog.tsx b/src/components/Facility/BedDeleteDialog.tsx index 58e9e97028d..8413fd58786 100644 --- a/src/components/Facility/BedDeleteDialog.tsx +++ b/src/components/Facility/BedDeleteDialog.tsx @@ -1,4 +1,5 @@ import { useState } from "react"; + import ConfirmDialog from "@/components/Common/ConfirmDialog"; interface ConfirmDialogProps { diff --git a/src/components/Facility/BedManagement.tsx b/src/components/Facility/BedManagement.tsx index d7b47d89cce..acb2aad709e 100644 --- a/src/components/Facility/BedManagement.tsx +++ b/src/components/Facility/BedManagement.tsx @@ -1,20 +1,26 @@ import { useState } from "react"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import { BedModel } from "./models"; -import * as Notification from "../../Utils/Notifications"; -import { LOCATION_BED_TYPES } from "@/common/constants"; -import BedDeleteDialog from "./BedDeleteDialog"; -import AuthorizeFor, { NonReadOnlyUsers } from "../../Utils/AuthorizeFor"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import Page from "@/components/Common/components/Page"; -import request from "../../Utils/request/request"; -import routes from "../../Redux/api"; -import useQuery from "../../Utils/request/useQuery"; -import useFilters from "@/common/hooks/useFilters"; -import useAuthUser from "@/common/hooks/useAuthUser"; -import Loading from "@/components/Common/Loading"; -import PaginatedList from "@/CAREUI/misc/PaginatedList"; import { useTranslation } from "react-i18next"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import PaginatedList from "@/CAREUI/misc/PaginatedList"; + +import ButtonV2 from "@/components/Common/ButtonV2"; +import Loading from "@/components/Common/Loading"; +import Page from "@/components/Common/Page"; +import BedDeleteDialog from "@/components/Facility/BedDeleteDialog"; +import { BedModel } from "@/components/Facility/models"; + +import useAuthUser from "@/hooks/useAuthUser"; +import useFilters from "@/hooks/useFilters"; + +import { LOCATION_BED_TYPES } from "@/common/constants"; + +import AuthorizeFor, { NonReadOnlyUsers } from "@/Utils/AuthorizeFor"; +import * as Notification from "@/Utils/Notifications"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import useQuery from "@/Utils/request/useQuery"; + interface BedManagementProps { facilityId: string; locationId: string; diff --git a/src/components/Facility/BedTypeCard.tsx b/src/components/Facility/BedTypeCard.tsx index ba95b9eb1f6..99244bd7eb1 100644 --- a/src/components/Facility/BedTypeCard.tsx +++ b/src/components/Facility/BedTypeCard.tsx @@ -1,14 +1,17 @@ import { useEffect, useState } from "react"; -import * as Notification from "../../Utils/Notifications"; -import { BedCapacity } from "./BedCapacity"; -import DialogModal from "@/components/Common/Dialog"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import { NonReadOnlyUsers } from "../../Utils/AuthorizeFor"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import RecordMeta from "../../CAREUI/display/RecordMeta"; + +import RecordMeta from "@/CAREUI/display/RecordMeta"; +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import ButtonV2 from "@/components/Common/ButtonV2"; import ConfirmDialog from "@/components/Common/ConfirmDialog"; -import routes from "../../Redux/api"; -import request from "../../Utils/request/request"; +import DialogModal from "@/components/Common/Dialog"; +import { BedCapacity } from "@/components/Facility/BedCapacity"; + +import { NonReadOnlyUsers } from "@/Utils/AuthorizeFor"; +import * as Notification from "@/Utils/Notifications"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; interface BedTypeCardProps { facilityId?: string; diff --git a/src/components/Facility/CentralNursingStation.tsx b/src/components/Facility/CentralNursingStation.tsx index 860de7e897a..6c5d1381064 100644 --- a/src/components/Facility/CentralNursingStation.tsx +++ b/src/components/Facility/CentralNursingStation.tsx @@ -1,27 +1,31 @@ -import useFullscreen from "@/common/hooks/useFullscreen"; -import HL7PatientVitalsMonitor from "../VitalsMonitor/HL7PatientVitalsMonitor"; -import useFilters from "@/common/hooks/useFilters"; -import Loading from "@/components/Common/Loading"; -import Page from "@/components/Common/components/Page"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import { LocationSelect } from "@/components/Common/LocationSelect"; -import Pagination from "@/components/Common/Pagination"; import { Popover, PopoverButton, PopoverPanel, Transition, } from "@headlessui/react"; -import { FieldLabel } from "../Form/FormFields/FormField"; -import CheckBoxFormField from "../Form/FormFields/CheckBoxFormField"; import { useTranslation } from "react-i18next"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import ButtonV2 from "@/components/Common/ButtonV2"; +import Loading from "@/components/Common/Loading"; +import { LocationSelect } from "@/components/Common/LocationSelect"; +import Page from "@/components/Common/Page"; +import Pagination from "@/components/Common/Pagination"; import { SortOption } from "@/components/Common/SortDropdown"; -import { SelectFormField } from "../Form/FormFields/SelectFormField"; -import useVitalsAspectRatioConfig from "../VitalsMonitor/useVitalsAspectRatioConfig"; -import useQuery from "../../Utils/request/useQuery"; -import routes from "../../Redux/api"; -import { getVitalsMonitorSocketUrl } from "../VitalsMonitor/utils"; +import CheckBoxFormField from "@/components/Form/FormFields/CheckBoxFormField"; +import { FieldLabel } from "@/components/Form/FormFields/FormField"; +import { SelectFormField } from "@/components/Form/FormFields/SelectFormField"; +import HL7PatientVitalsMonitor from "@/components/VitalsMonitor/HL7PatientVitalsMonitor"; +import useVitalsAspectRatioConfig from "@/components/VitalsMonitor/useVitalsAspectRatioConfig"; +import { getVitalsMonitorSocketUrl } from "@/components/VitalsMonitor/utils"; + +import useFilters from "@/hooks/useFilters"; +import useFullscreen from "@/hooks/useFullscreen"; + +import routes from "@/Utils/request/api"; +import useQuery from "@/Utils/request/useQuery"; const PER_PAGE_LIMIT = 6; diff --git a/src/components/Facility/ConsultationCard.tsx b/src/components/Facility/ConsultationCard.tsx index f52353d5410..11fce3fbe28 100644 --- a/src/components/Facility/ConsultationCard.tsx +++ b/src/components/Facility/ConsultationCard.tsx @@ -1,15 +1,18 @@ +import careConfig from "@careConfig"; import { navigate } from "raviger"; -import { ConsultationModel } from "./models"; -import { formatDateTime } from "../../Utils/utils"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import { NonReadOnlyUsers } from "../../Utils/AuthorizeFor"; -import RelativeDateUserMention from "@/components/Common/RelativeDateUserMention"; -import Chip from "../../CAREUI/display/Chip"; -import * as Notification from "../../Utils/Notifications"; import { useState } from "react"; + +import Chip from "@/CAREUI/display/Chip"; + +import ButtonV2 from "@/components/Common/ButtonV2"; import DialogModal from "@/components/Common/Dialog"; -import Beds from "./Consultations/Beds"; -import careConfig from "@careConfig"; +import RelativeDateUserMention from "@/components/Common/RelativeDateUserMention"; +import Beds from "@/components/Facility/Consultations/Beds"; +import { ConsultationModel } from "@/components/Facility/models"; + +import { NonReadOnlyUsers } from "@/Utils/AuthorizeFor"; +import * as Notification from "@/Utils/Notifications"; +import { formatDateTime } from "@/Utils/utils"; interface ConsultationProps { itemData: ConsultationModel; diff --git a/src/components/Facility/ConsultationDetails/ConsultationABGTab.tsx b/src/components/Facility/ConsultationDetails/ConsultationABGTab.tsx index a2163e823f0..b936a89dca6 100644 --- a/src/components/Facility/ConsultationDetails/ConsultationABGTab.tsx +++ b/src/components/Facility/ConsultationDetails/ConsultationABGTab.tsx @@ -1,7 +1,6 @@ -import { ConsultationTabProps } from "./index"; -import { ABGPlots } from "../Consultations/ABGPlots"; - import PageTitle from "@/components/Common/PageTitle"; +import { ConsultationTabProps } from "@/components/Facility/ConsultationDetails/index"; +import { ABGPlots } from "@/components/Facility/Consultations/ABGPlots"; export const ConsultationABGTab = (props: ConsultationTabProps) => { return ( diff --git a/src/components/Facility/ConsultationDetails/ConsultationDialysisTab.tsx b/src/components/Facility/ConsultationDetails/ConsultationDialysisTab.tsx index 0ead59404b9..73a62c435c8 100644 --- a/src/components/Facility/ConsultationDetails/ConsultationDialysisTab.tsx +++ b/src/components/Facility/ConsultationDetails/ConsultationDialysisTab.tsx @@ -1,7 +1,6 @@ -import { ConsultationTabProps } from "./index"; -import { DialysisPlots } from "../Consultations/DialysisPlots"; - import PageTitle from "@/components/Common/PageTitle"; +import { ConsultationTabProps } from "@/components/Facility/ConsultationDetails/index"; +import { DialysisPlots } from "@/components/Facility/Consultations/DialysisPlots"; export const ConsultationDialysisTab = (props: ConsultationTabProps) => { return ( diff --git a/src/components/Facility/ConsultationDetails/ConsultationFeedTab.tsx b/src/components/Facility/ConsultationDetails/ConsultationFeedTab.tsx index 9810b0bab85..21c6f304cb5 100644 --- a/src/components/Facility/ConsultationDetails/ConsultationFeedTab.tsx +++ b/src/components/Facility/ConsultationDetails/ConsultationFeedTab.tsx @@ -1,28 +1,32 @@ import { useEffect, useRef, useState } from "react"; -import { ConsultationTabProps } from "./index"; -import useQuery from "../../../Utils/request/useQuery"; -import CameraFeed from "../../CameraFeed/CameraFeed"; -import Loading from "@/components/Common/Loading"; -import CameraPresetSelect from "../../CameraFeed/CameraPresetSelect"; -import { triggerGoal } from "../../../Integrations/Plausible"; -import useAuthUser from "@/common/hooks/useAuthUser"; -import CareIcon from "../../../CAREUI/icons/CareIcon"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import useOperateCamera, { - PTZPayload, -} from "../../CameraFeed/useOperateCamera"; -import request from "../../../Utils/request/request"; -import { classNames, isIOS } from "../../../Utils/utils"; -import ConfirmDialog from "@/components/Common/ConfirmDialog"; -import useBreakpoints from "@/common/hooks/useBreakpoints"; -import { Warn } from "../../../Utils/Notifications"; import { useTranslation } from "react-i18next"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import CameraFeed from "@/components/CameraFeed/CameraFeed"; +import CameraPresetSelect from "@/components/CameraFeed/CameraPresetSelect"; +import StillWatching from "@/components/CameraFeed/StillWatching"; import { CameraPreset, FeedRoutes, GetStatusResponse, -} from "../../CameraFeed/routes"; -import StillWatching from "../../CameraFeed/StillWatching"; +} from "@/components/CameraFeed/routes"; +import useOperateCamera, { + PTZPayload, +} from "@/components/CameraFeed/useOperateCamera"; +import ButtonV2 from "@/components/Common/ButtonV2"; +import ConfirmDialog from "@/components/Common/ConfirmDialog"; +import Loading from "@/components/Common/Loading"; +import { ConsultationTabProps } from "@/components/Facility/ConsultationDetails/index"; + +import useAuthUser from "@/hooks/useAuthUser"; +import useBreakpoints from "@/hooks/useBreakpoints"; + +import { triggerGoal } from "@/Integrations/Plausible"; +import { Warn } from "@/Utils/Notifications"; +import request from "@/Utils/request/request"; +import useQuery from "@/Utils/request/useQuery"; +import { classNames, isIOS } from "@/Utils/utils"; export const ConsultationFeedTab = (props: ConsultationTabProps) => { const { t } = useTranslation(); diff --git a/src/components/Facility/ConsultationDetails/ConsultationFilesTab.tsx b/src/components/Facility/ConsultationDetails/ConsultationFilesTab.tsx index 1941b29904d..c90de5274eb 100644 --- a/src/components/Facility/ConsultationDetails/ConsultationFilesTab.tsx +++ b/src/components/Facility/ConsultationDetails/ConsultationFilesTab.tsx @@ -1,5 +1,5 @@ -import { ConsultationTabProps } from "./index"; -import { FileUpload } from "../../Files/FileUpload"; +import { ConsultationTabProps } from "@/components/Facility/ConsultationDetails/index"; +import { FileUpload } from "@/components/Files/FileUpload"; export const ConsultationFilesTab = (props: ConsultationTabProps) => { return ( diff --git a/src/components/Facility/ConsultationDetails/ConsultationInvestigationsTab.tsx b/src/components/Facility/ConsultationDetails/ConsultationInvestigationsTab.tsx index 967d987414e..ed1157f2c95 100644 --- a/src/components/Facility/ConsultationDetails/ConsultationInvestigationsTab.tsx +++ b/src/components/Facility/ConsultationDetails/ConsultationInvestigationsTab.tsx @@ -1,12 +1,15 @@ -import { ConsultationTabProps } from "./index"; -import { NonReadOnlyUsers } from "../../../Utils/AuthorizeFor"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import { navigate } from "raviger"; -import CareIcon from "../../../CAREUI/icons/CareIcon"; -import InvestigationTab from "../Investigations/investigationsTab"; import { t } from "i18next"; +import { navigate } from "raviger"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import ButtonV2 from "@/components/Common/ButtonV2"; import PageTitle from "@/components/Common/PageTitle"; +import { ConsultationTabProps } from "@/components/Facility/ConsultationDetails/index"; +import InvestigationTab from "@/components/Facility/Investigations/investigationsTab"; + +import { NonReadOnlyUsers } from "@/Utils/AuthorizeFor"; + export const ConsultationInvestigationsTab = (props: ConsultationTabProps) => { return (
diff --git a/src/components/Facility/ConsultationDetails/ConsultationMedicinesTab.tsx b/src/components/Facility/ConsultationDetails/ConsultationMedicinesTab.tsx index 9bd7b662d4b..f17154712a0 100644 --- a/src/components/Facility/ConsultationDetails/ConsultationMedicinesTab.tsx +++ b/src/components/Facility/ConsultationDetails/ConsultationMedicinesTab.tsx @@ -1,7 +1,7 @@ -import { ConsultationTabProps } from "./index"; import PageTitle from "@/components/Common/PageHeadTitle"; -import MedicineAdministrationSheet from "../../Medicine/MedicineAdministrationSheet"; -import { MedicinePrescriptionSummary } from "../../Medicine/MedicinePrescriptionSummary"; +import { ConsultationTabProps } from "@/components/Facility/ConsultationDetails/index"; +import MedicineAdministrationSheet from "@/components/Medicine/MedicineAdministrationSheet"; +import { MedicinePrescriptionSummary } from "@/components/Medicine/MedicinePrescriptionSummary"; export const ConsultationMedicinesTab = (props: ConsultationTabProps) => { return ( diff --git a/src/components/Facility/ConsultationDetails/ConsultationNeurologicalMonitoringTab.tsx b/src/components/Facility/ConsultationDetails/ConsultationNeurologicalMonitoringTab.tsx index 86afc562e91..0eb15167ad7 100644 --- a/src/components/Facility/ConsultationDetails/ConsultationNeurologicalMonitoringTab.tsx +++ b/src/components/Facility/ConsultationDetails/ConsultationNeurologicalMonitoringTab.tsx @@ -1,7 +1,6 @@ -import { NeurologicalTable } from "../Consultations/NeurologicalTables"; -import { ConsultationTabProps } from "./index"; - import PageTitle from "@/components/Common/PageTitle"; +import { ConsultationTabProps } from "@/components/Facility/ConsultationDetails/index"; +import { NeurologicalTable } from "@/components/Facility/Consultations/NeurologicalTables"; export const ConsultationNeurologicalMonitoringTab = ( props: ConsultationTabProps, diff --git a/src/components/Facility/ConsultationDetails/ConsultationNursingTab.tsx b/src/components/Facility/ConsultationDetails/ConsultationNursingTab.tsx index 6203377892d..81078197a45 100644 --- a/src/components/Facility/ConsultationDetails/ConsultationNursingTab.tsx +++ b/src/components/Facility/ConsultationDetails/ConsultationNursingTab.tsx @@ -1,16 +1,21 @@ import { useEffect, useState } from "react"; -import { ConsultationTabProps } from "./index"; -import { NursingPlot } from "../Consultations/NursingPlot"; import { useTranslation } from "react-i18next"; -import request from "../../../Utils/request/request"; -import routes from "../../../Redux/api"; -import { RoutineAnalysisRes, RoutineFields } from "../models"; + import Loading from "@/components/Common/Loading"; -import { classNames, formatDate, formatTime } from "../../../Utils/utils"; +import PageTitle from "@/components/Common/PageTitle"; import Pagination from "@/components/Common/Pagination"; +import { ConsultationTabProps } from "@/components/Facility/ConsultationDetails/index"; +import { NursingPlot } from "@/components/Facility/Consultations/NursingPlot"; +import { + RoutineAnalysisRes, + RoutineFields, +} from "@/components/Facility/models"; + import { PAGINATION_LIMIT } from "@/common/constants"; -import PageTitle from "@/components/Common/PageTitle"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import { classNames, formatDate, formatTime } from "@/Utils/utils"; export default function ConsultationNursingTab(props: ConsultationTabProps) { const { t } = useTranslation(); diff --git a/src/components/Facility/ConsultationDetails/ConsultationNutritionTab.tsx b/src/components/Facility/ConsultationDetails/ConsultationNutritionTab.tsx index faad29f0908..3c5f330a399 100644 --- a/src/components/Facility/ConsultationDetails/ConsultationNutritionTab.tsx +++ b/src/components/Facility/ConsultationDetails/ConsultationNutritionTab.tsx @@ -1,7 +1,6 @@ -import { ConsultationTabProps } from "./index"; -import { NutritionPlots } from "../Consultations/NutritionPlots"; - import PageTitle from "@/components/Common/PageTitle"; +import { ConsultationTabProps } from "@/components/Facility/ConsultationDetails/index"; +import { NutritionPlots } from "@/components/Facility/Consultations/NutritionPlots"; export const ConsultationNutritionTab = (props: ConsultationTabProps) => { return ( diff --git a/src/components/Facility/ConsultationDetails/ConsultationPressureSoreTab.tsx b/src/components/Facility/ConsultationDetails/ConsultationPressureSoreTab.tsx index 6f055144618..7aa6e9b4210 100644 --- a/src/components/Facility/ConsultationDetails/ConsultationPressureSoreTab.tsx +++ b/src/components/Facility/ConsultationDetails/ConsultationPressureSoreTab.tsx @@ -1,7 +1,6 @@ -import { ConsultationTabProps } from "./index"; -import { PressureSoreDiagrams } from "../Consultations/PressureSoreDiagrams"; - import PageTitle from "@/components/Common/PageTitle"; +import { ConsultationTabProps } from "@/components/Facility/ConsultationDetails/index"; +import { PressureSoreDiagrams } from "@/components/Facility/Consultations/PressureSoreDiagrams"; export const ConsultationPressureSoreTab = (props: ConsultationTabProps) => { return ( diff --git a/src/components/Facility/ConsultationDetails/ConsultationSummaryTab.tsx b/src/components/Facility/ConsultationDetails/ConsultationSummaryTab.tsx index 25d27dcf6b0..0adc3b7a4e8 100644 --- a/src/components/Facility/ConsultationDetails/ConsultationSummaryTab.tsx +++ b/src/components/Facility/ConsultationDetails/ConsultationSummaryTab.tsx @@ -1,7 +1,6 @@ -import { ConsultationTabProps } from "./index"; -import { PrimaryParametersPlot } from "../Consultations/PrimaryParametersPlot"; - import PageTitle from "@/components/Common/PageTitle"; +import { ConsultationTabProps } from "@/components/Facility/ConsultationDetails/index"; +import { PrimaryParametersPlot } from "@/components/Facility/Consultations/PrimaryParametersPlot"; export const ConsultationSummaryTab = (props: ConsultationTabProps) => { return ( diff --git a/src/components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx b/src/components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx index 66cc40e4c71..e70b142d663 100644 --- a/src/components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx +++ b/src/components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx @@ -1,44 +1,50 @@ -import { useState } from "react"; -import { ConsultationTabProps } from "./index"; -import { AssetBedModel, AssetClass, AssetData } from "../../Assets/AssetTypes"; -import { BedModel } from "../models"; -import HL7PatientVitalsMonitor from "../../VitalsMonitor/HL7PatientVitalsMonitor"; -import VentilatorPatientVitalsMonitor from "../../VitalsMonitor/VentilatorPatientVitalsMonitor"; -import useVitalsAspectRatioConfig from "../../VitalsMonitor/useVitalsAspectRatioConfig"; -import { DISCHARGE_REASONS } from "@/common/constants"; -import PrescriptionsTable from "../../Medicine/PrescriptionsTable"; -import Chip from "../../../CAREUI/display/Chip"; -import { - formatDate, - formatDateTime, - formatPatientAge, - isAntenatal, - isPostPartum, -} from "../../../Utils/utils"; -import ReadMore from "@/components/Common/components/Readmore"; -import DailyRoundsList from "../Consultations/DailyRoundsList"; -import EventsList from "./Events/EventsList"; -import { getVitalsMonitorSocketUrl } from "../../VitalsMonitor/utils"; -import useQuery from "../../../Utils/request/useQuery"; -import routes from "../../../Redux/api"; -import CareIcon from "../../../CAREUI/icons/CareIcon"; -import EncounterSymptomsCard from "../../Symptoms/SymptomsCard"; -import { QueryParams } from "../../../Utils/request/types"; -import { EVENTS_SORT_OPTIONS } from "@/common/constants"; -import DailyRoundsFilter from "../Consultations/DailyRoundsFilter"; -import ButtonV2 from "../../Common/components/ButtonV2"; -import { classNames } from "../../../Utils/utils"; - -import { useTranslation } from "react-i18next"; import { Popover, PopoverButton, PopoverPanel, Transition, } from "@headlessui/react"; -import Tabs from "@/components/Common/components/Tabs"; +import { useState } from "react"; +import { useTranslation } from "react-i18next"; +import Chip from "@/CAREUI/display/Chip"; +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import { + AssetBedModel, + AssetClass, + AssetData, +} from "@/components/Assets/AssetTypes"; +import ButtonV2 from "@/components/Common/ButtonV2"; import PageTitle from "@/components/Common/PageTitle"; +import ReadMore from "@/components/Common/Readmore"; +import Tabs from "@/components/Common/Tabs"; +import EventsList from "@/components/Facility/ConsultationDetails/Events/EventsList"; +import { ConsultationTabProps } from "@/components/Facility/ConsultationDetails/index"; +import DailyRoundsFilter from "@/components/Facility/Consultations/DailyRoundsFilter"; +import DailyRoundsList from "@/components/Facility/Consultations/DailyRoundsList"; +import { BedModel } from "@/components/Facility/models"; +import PrescriptionsTable from "@/components/Medicine/PrescriptionsTable"; +import EncounterSymptomsCard from "@/components/Symptoms/SymptomsCard"; +import HL7PatientVitalsMonitor from "@/components/VitalsMonitor/HL7PatientVitalsMonitor"; +import VentilatorPatientVitalsMonitor from "@/components/VitalsMonitor/VentilatorPatientVitalsMonitor"; +import useVitalsAspectRatioConfig from "@/components/VitalsMonitor/useVitalsAspectRatioConfig"; +import { getVitalsMonitorSocketUrl } from "@/components/VitalsMonitor/utils"; + +import { DISCHARGE_REASONS } from "@/common/constants"; +import { EVENTS_SORT_OPTIONS } from "@/common/constants"; + +import routes from "@/Utils/request/api"; +import { QueryParams } from "@/Utils/request/types"; +import useQuery from "@/Utils/request/useQuery"; +import { + formatDate, + formatDateTime, + formatPatientAge, + isAntenatal, + isPostPartum, +} from "@/Utils/utils"; +import { classNames } from "@/Utils/utils"; export const ConsultationUpdatesTab = (props: ConsultationTabProps) => { const [hl7SocketUrl, setHL7SocketUrl] = useState(); diff --git a/src/components/Facility/ConsultationDetails/ConsultationVentilatorTab.tsx b/src/components/Facility/ConsultationDetails/ConsultationVentilatorTab.tsx index 23f5852cad1..1ded0ba7684 100644 --- a/src/components/Facility/ConsultationDetails/ConsultationVentilatorTab.tsx +++ b/src/components/Facility/ConsultationDetails/ConsultationVentilatorTab.tsx @@ -1,7 +1,6 @@ -import { ConsultationTabProps } from "./index"; -import { VentilatorPlot } from "../Consultations/VentilatorPlot"; - import PageTitle from "@/components/Common/PageTitle"; +import { ConsultationTabProps } from "@/components/Facility/ConsultationDetails/index"; +import { VentilatorPlot } from "@/components/Facility/Consultations/VentilatorPlot"; export const ConsultationVentilatorTab = (props: ConsultationTabProps) => { return ( diff --git a/src/components/Facility/ConsultationDetails/Events/EventsList.tsx b/src/components/Facility/ConsultationDetails/Events/EventsList.tsx index 02c0c5131dd..e3f7072391e 100644 --- a/src/components/Facility/ConsultationDetails/Events/EventsList.tsx +++ b/src/components/Facility/ConsultationDetails/Events/EventsList.tsx @@ -1,13 +1,17 @@ import { useTranslation } from "react-i18next"; -import { TimelineNode } from "../../../../CAREUI/display/Timeline"; -import PaginatedList from "../../../../CAREUI/misc/PaginatedList"; -import { useSlugs } from "@/common/hooks/useSlug"; -import routes from "../../../../Redux/api"; -import LoadingLogUpdateCard from "../../Consultations/DailyRounds/LoadingCard"; -import GenericEvent from "./GenericEvent"; -import { getEventIcon } from "./iconMap"; -import { EventGeneric } from "./types"; -import { QueryParams } from "../../../../Utils/request/types"; + +import { TimelineNode } from "@/CAREUI/display/Timeline"; +import PaginatedList from "@/CAREUI/misc/PaginatedList"; + +import GenericEvent from "@/components/Facility/ConsultationDetails/Events/GenericEvent"; +import { getEventIcon } from "@/components/Facility/ConsultationDetails/Events/iconMap"; +import { EventGeneric } from "@/components/Facility/ConsultationDetails/Events/types"; +import LoadingLogUpdateCard from "@/components/Facility/Consultations/DailyRounds/LoadingCard"; + +import { useSlugs } from "@/hooks/useSlug"; + +import routes from "@/Utils/request/api"; +import { QueryParams } from "@/Utils/request/types"; export default function EventsList({ query }: { query: QueryParams }) { const [consultationId] = useSlugs("consultation"); diff --git a/src/components/Facility/ConsultationDetails/Events/iconMap.ts b/src/components/Facility/ConsultationDetails/Events/iconMap.ts index edf097def22..fe100908f37 100644 --- a/src/components/Facility/ConsultationDetails/Events/iconMap.ts +++ b/src/components/Facility/ConsultationDetails/Events/iconMap.ts @@ -1,4 +1,4 @@ -import { IconName } from "../../../../CAREUI/icons/CareIcon"; +import { IconName } from "@/CAREUI/icons/CareIcon"; const eventIconMap: Record = { INTERNAL_TRANSFER: "l-exchange-alt", diff --git a/src/components/Facility/ConsultationDetails/Events/types.ts b/src/components/Facility/ConsultationDetails/Events/types.ts index 053450ea346..2c234b843ec 100644 --- a/src/components/Facility/ConsultationDetails/Events/types.ts +++ b/src/components/Facility/ConsultationDetails/Events/types.ts @@ -1,6 +1,7 @@ -import routes from "../../../../Redux/api"; -import request from "../../../../Utils/request/request"; -import { UserBareMinimum } from "../../../Users/models"; +import { UserBareMinimum } from "@/components/Users/models"; + +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; export type Type = { id: number; diff --git a/src/components/Facility/ConsultationDetails/index.tsx b/src/components/Facility/ConsultationDetails/index.tsx index 148411a6e06..496fd8f5d02 100644 --- a/src/components/Facility/ConsultationDetails/index.tsx +++ b/src/components/Facility/ConsultationDetails/index.tsx @@ -1,46 +1,48 @@ -import { GENDER_TYPES } from "@/common/constants"; -import { ConsultationModel } from "../models"; +import { Link, navigate, useQueryParams } from "raviger"; import { useCallback, useEffect, useState } from "react"; -import DoctorVideoSlideover from "../DoctorVideoSlideover"; -import { PatientModel } from "../../Patient/models"; +import { useTranslation } from "react-i18next"; + +import ABDMRecordsTab from "@/components/ABDM/ABDMRecordsTab"; +import { AbhaNumberModel } from "@/components/ABDM/types/abha"; +import Loading from "@/components/Common/Loading"; +import PageTitle from "@/components/Common/PageTitle"; +import RelativeDateUserMention from "@/components/Common/RelativeDateUserMention"; +import DiagnosesListAccordion from "@/components/Diagnosis/DiagnosesListAccordion"; +import Error404 from "@/components/ErrorPages/404"; +import { ConsultationABGTab } from "@/components/Facility/ConsultationDetails/ConsultationABGTab"; +import { ConsultationDialysisTab } from "@/components/Facility/ConsultationDetails/ConsultationDialysisTab"; +import { ConsultationFeedTab } from "@/components/Facility/ConsultationDetails/ConsultationFeedTab"; +import { ConsultationFilesTab } from "@/components/Facility/ConsultationDetails/ConsultationFilesTab"; +import { ConsultationInvestigationsTab } from "@/components/Facility/ConsultationDetails/ConsultationInvestigationsTab"; +import { ConsultationMedicinesTab } from "@/components/Facility/ConsultationDetails/ConsultationMedicinesTab"; +import { ConsultationNeurologicalMonitoringTab } from "@/components/Facility/ConsultationDetails/ConsultationNeurologicalMonitoringTab"; +import ConsultationNursingTab from "@/components/Facility/ConsultationDetails/ConsultationNursingTab"; +import { ConsultationNutritionTab } from "@/components/Facility/ConsultationDetails/ConsultationNutritionTab"; +import { ConsultationPressureSoreTab } from "@/components/Facility/ConsultationDetails/ConsultationPressureSoreTab"; +import { ConsultationSummaryTab } from "@/components/Facility/ConsultationDetails/ConsultationSummaryTab"; +import { ConsultationUpdatesTab } from "@/components/Facility/ConsultationDetails/ConsultationUpdatesTab"; +import { ConsultationVentilatorTab } from "@/components/Facility/ConsultationDetails/ConsultationVentilatorTab"; +import DoctorVideoSlideover from "@/components/Facility/DoctorVideoSlideover"; +import PatientNotesSlideover from "@/components/Facility/PatientNotesSlideover"; +import { ConsultationModel } from "@/components/Facility/models"; +import PatientInfoCard from "@/components/Patient/PatientInfoCard"; +import { PatientModel } from "@/components/Patient/models"; + +import useAuthUser from "@/hooks/useAuthUser"; + +import { GENDER_TYPES } from "@/common/constants"; + +import { triggerGoal } from "@/Integrations/Plausible"; +import { CameraFeedPermittedUserTypes } from "@/Utils/permissions"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import useQuery from "@/Utils/request/useQuery"; import { formatDateTime, humanizeStrings, keysOf, relativeTime, -} from "../../../Utils/utils"; - -import { Link, navigate, useQueryParams } from "raviger"; -import { triggerGoal } from "../../../Integrations/Plausible"; -import useAuthUser from "@/common/hooks/useAuthUser"; -import { ConsultationUpdatesTab } from "./ConsultationUpdatesTab"; -import { ConsultationABGTab } from "./ConsultationABGTab"; -import ConsultationNursingTab from "./ConsultationNursingTab"; -import { ConsultationFeedTab } from "./ConsultationFeedTab"; -import { ConsultationSummaryTab } from "./ConsultationSummaryTab"; -import { ConsultationFilesTab } from "./ConsultationFilesTab"; -import { ConsultationMedicinesTab } from "./ConsultationMedicinesTab"; -import { ConsultationInvestigationsTab } from "./ConsultationInvestigationsTab"; -import { ConsultationVentilatorTab } from "./ConsultationVentilatorTab"; -import { ConsultationPressureSoreTab } from "./ConsultationPressureSoreTab"; -import { ConsultationDialysisTab } from "./ConsultationDialysisTab"; -import { ConsultationNeurologicalMonitoringTab } from "./ConsultationNeurologicalMonitoringTab"; -import ABDMRecordsTab from "../../ABDM/ABDMRecordsTab"; -import { ConsultationNutritionTab } from "./ConsultationNutritionTab"; -import PatientNotesSlideover from "../PatientNotesSlideover"; -import PatientInfoCard from "../../Patient/PatientInfoCard"; -import RelativeDateUserMention from "@/components/Common/RelativeDateUserMention"; -import DiagnosesListAccordion from "../../Diagnosis/DiagnosesListAccordion"; -import { AbhaNumberModel } from "../../ABDM/types/abha"; -import routes from "../../../Redux/api"; -import request from "../../../Utils/request/request"; -import { CameraFeedPermittedUserTypes } from "../../../Utils/permissions"; -import Error404 from "../../ErrorPages/404"; -import { useTranslation } from "react-i18next"; -import useQuery from "../../../Utils/request/useQuery"; - -import Loading from "@/components/Common/Loading"; -import PageTitle from "@/components/Common/PageTitle"; +} from "@/Utils/utils"; export interface ConsultationTabProps { consultationId: string; diff --git a/src/components/Facility/ConsultationDoctorNotes/index.tsx b/src/components/Facility/ConsultationDoctorNotes/index.tsx index 517c3eca619..098a4b392e3 100644 --- a/src/components/Facility/ConsultationDoctorNotes/index.tsx +++ b/src/components/Facility/ConsultationDoctorNotes/index.tsx @@ -1,22 +1,30 @@ +import { t } from "i18next"; import { useState } from "react"; -import * as Notification from "../../../Utils/Notifications"; -import Page from "@/components/Common/components/Page"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import CareIcon from "../../../CAREUI/icons/CareIcon"; -import { NonReadOnlyUsers } from "../../../Utils/AuthorizeFor"; -import { useMessageListener } from "@/common/hooks/useMessageListener"; -import PatientConsultationNotesList from "../PatientConsultationNotesList"; -import { PatientNoteStateType, PaitentNotesReplyModel } from "../models"; -import routes from "../../../Redux/api"; -import request from "../../../Utils/request/request"; -import useQuery from "../../../Utils/request/useQuery"; import useKeyboardShortcut from "use-keyboard-shortcut"; -import { classNames, isAppleDevice, keysOf } from "../../../Utils/utils"; -import AutoExpandingTextInputFormField from "../../Form/FormFields/AutoExpandingTextInputFormField"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import ButtonV2 from "@/components/Common/ButtonV2"; +import Page from "@/components/Common/Page"; +import DoctorNoteReplyPreviewCard from "@/components/Facility/DoctorNoteReplyPreviewCard"; +import PatientConsultationNotesList from "@/components/Facility/PatientConsultationNotesList"; +import { + PaitentNotesReplyModel, + PatientNoteStateType, +} from "@/components/Facility/models"; +import AutoExpandingTextInputFormField from "@/components/Form/FormFields/AutoExpandingTextInputFormField"; + +import useAuthUser from "@/hooks/useAuthUser"; +import { useMessageListener } from "@/hooks/useMessageListener"; + import { PATIENT_NOTES_THREADS } from "@/common/constants"; -import useAuthUser from "@/common/hooks/useAuthUser"; -import DoctorNoteReplyPreviewCard from "../DoctorNoteReplyPreviewCard"; -import { t } from "i18next"; + +import { NonReadOnlyUsers } from "@/Utils/AuthorizeFor"; +import * as Notification from "@/Utils/Notifications"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import useQuery from "@/Utils/request/useQuery"; +import { classNames, isAppleDevice, keysOf } from "@/Utils/utils"; interface ConsultationDoctorNotesProps { patientId: string; diff --git a/src/components/Facility/ConsultationForm.tsx b/src/components/Facility/ConsultationForm.tsx index 9fe281635f2..34cc5973832 100644 --- a/src/components/Facility/ConsultationForm.tsx +++ b/src/components/Facility/ConsultationForm.tsx @@ -1,74 +1,79 @@ -import * as Notification from "../../Utils/Notifications"; +import careConfig from "@careConfig"; +import { t } from "i18next"; +import { navigate } from "raviger"; +import { LegacyRef, createRef, useEffect, useRef, useState } from "react"; -import { BedModel, FacilityModel } from "./models"; -import { - CONSULTATION_SUGGESTION, - DISCHARGE_REASONS, - ConsultationSuggestionValue, - PATIENT_CATEGORIES, - REVIEW_AT_CHOICES, - TELEMEDICINE_ACTIONS, -} from "@/common/constants"; -import { Cancel, Submit } from "@/components/Common/components/ButtonV2"; -import { DraftSection, useAutoSaveReducer } from "../../Utils/AutoSave"; -import { FieldErrorText, FieldLabel } from "../Form/FormFields/FormField"; +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import { BedSelect } from "@/components/Common/BedSelect"; +import { Cancel, Submit } from "@/components/Common/ButtonV2"; +import { FacilitySelect } from "@/components/Common/FacilitySelect"; +import Loading from "@/components/Common/Loading"; +import { LocationSelect } from "@/components/Common/LocationSelect"; +import PageTitle from "@/components/Common/PageTitle"; +import RouteToFacilitySelect, { + RouteToFacility, +} from "@/components/Common/RouteToFacilitySelect"; +import UserAutocomplete from "@/components/Common/UserAutocompleteFormField"; import InvestigationBuilder, { InvestigationType, } from "@/components/Common/prescription-builder/InvestigationBuilder"; -import { LegacyRef, createRef, useEffect, useRef, useState } from "react"; import ProcedureBuilder, { ProcedureType, } from "@/components/Common/prescription-builder/ProcedureBuilder"; -import { BedSelect } from "@/components/Common/BedSelect"; -import Beds from "./Consultations/Beds"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import CheckBoxFormField from "../Form/FormFields/CheckBoxFormField"; -import { FacilitySelect } from "@/components/Common/FacilitySelect"; import { - FieldChangeEvent, - FieldChangeEventHandler, -} from "../Form/FormFields/Utils"; -import { FormAction } from "../Form/Utils"; -import PatientCategorySelect from "../Patient/PatientCategorySelect"; -import { SelectFormField } from "../Form/FormFields/SelectFormField"; -import TextAreaFormField from "../Form/FormFields/TextAreaFormField"; -import TextFormField from "../Form/FormFields/TextFormField"; -import UserAutocomplete from "@/components/Common/UserAutocompleteFormField"; -import { UserBareMinimum } from "../Users/models"; - -import { navigate } from "raviger"; -import useAppHistory from "@/common/hooks/useAppHistory"; -import useVisibility from "../../Utils/useVisibility"; -import dayjs from "../../Utils/dayjs"; -import RouteToFacilitySelect, { - RouteToFacility, -} from "@/components/Common/RouteToFacilitySelect"; -import { LocationSelect } from "@/components/Common/LocationSelect"; -import { classNames } from "../../Utils/utils"; + CreateDiagnosesBuilder, + EditDiagnosesBuilder, +} from "@/components/Diagnosis/ConsultationDiagnosisBuilder/ConsultationDiagnosisBuilder"; import { ConditionVerificationStatuses, ConsultationDiagnosis, CreateDiagnosis, -} from "../Diagnosis/types"; +} from "@/components/Diagnosis/types"; +import Beds from "@/components/Facility/Consultations/Beds"; +import { BedModel, FacilityModel } from "@/components/Facility/models"; +import CheckBoxFormField from "@/components/Form/FormFields/CheckBoxFormField"; +import DateFormField from "@/components/Form/FormFields/DateFormField.js"; import { - CreateDiagnosesBuilder, - EditDiagnosesBuilder, -} from "../Diagnosis/ConsultationDiagnosisBuilder/ConsultationDiagnosisBuilder"; -import request from "../../Utils/request/request"; -import routes from "../../Redux/api"; -import useQuery from "../../Utils/request/useQuery"; -import { t } from "i18next"; -import { Writable } from "../../Utils/types"; -import { EncounterSymptom } from "../Symptoms/types"; + FieldErrorText, + FieldLabel, +} from "@/components/Form/FormFields/FormField"; +import { SelectFormField } from "@/components/Form/FormFields/SelectFormField"; +import TextAreaFormField from "@/components/Form/FormFields/TextAreaFormField"; +import TextFormField from "@/components/Form/FormFields/TextFormField"; +import { + FieldChangeEvent, + FieldChangeEventHandler, +} from "@/components/Form/FormFields/Utils"; +import { FormAction } from "@/components/Form/Utils"; +import PatientCategorySelect from "@/components/Patient/PatientCategorySelect"; import { - EncounterSymptomsBuilder, CreateSymptomsBuilder, -} from "../Symptoms/SymptomsBuilder"; -import careConfig from "@careConfig"; -import DateFormField from "../Form/FormFields/DateFormField.js"; + EncounterSymptomsBuilder, +} from "@/components/Symptoms/SymptomsBuilder"; +import { EncounterSymptom } from "@/components/Symptoms/types"; +import { UserBareMinimum } from "@/components/Users/models"; -import Loading from "@/components/Common/Loading"; -import PageTitle from "@/components/Common/PageTitle"; +import useAppHistory from "@/hooks/useAppHistory"; +import useVisibility from "@/hooks/useVisibility"; + +import { + CONSULTATION_SUGGESTION, + ConsultationSuggestionValue, + DISCHARGE_REASONS, + PATIENT_CATEGORIES, + REVIEW_AT_CHOICES, + TELEMEDICINE_ACTIONS, +} from "@/common/constants"; + +import { DraftSection, useAutoSaveReducer } from "@/Utils/AutoSave"; +import * as Notification from "@/Utils/Notifications"; +import dayjs from "@/Utils/dayjs"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import useQuery from "@/Utils/request/useQuery"; +import { Writable } from "@/Utils/types"; +import { classNames } from "@/Utils/utils"; type BooleanStrings = "true" | "false"; diff --git a/src/components/Facility/Consultations/ABGPlots.tsx b/src/components/Facility/Consultations/ABGPlots.tsx index 36f4d934254..324e00af85d 100644 --- a/src/components/Facility/Consultations/ABGPlots.tsx +++ b/src/components/Facility/Consultations/ABGPlots.tsx @@ -1,11 +1,14 @@ import { useEffect, useState } from "react"; -import { LinePlot } from "./components/LinePlot"; + import Pagination from "@/components/Common/Pagination"; +import { LinePlot } from "@/components/Facility/Consultations/components/LinePlot"; +import { ABGPlotsFields } from "@/components/Facility/models"; + import { PAGINATION_LIMIT } from "@/common/constants"; -import { formatDateTime } from "../../../Utils/utils"; -import routes from "../../../Redux/api"; -import request from "../../../Utils/request/request"; -import { ABGPlotsFields } from "../models"; + +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import { formatDateTime } from "@/Utils/utils"; export const ABGPlots = (props: any) => { const { consultationId } = props; diff --git a/src/components/Facility/Consultations/BedActivityTimeline.tsx b/src/components/Facility/Consultations/BedActivityTimeline.tsx index d9db520192a..57267bc5ef0 100644 --- a/src/components/Facility/Consultations/BedActivityTimeline.tsx +++ b/src/components/Facility/Consultations/BedActivityTimeline.tsx @@ -1,20 +1,23 @@ -import { useTranslation } from "react-i18next"; -import Chip from "../../../CAREUI/display/Chip"; -import Timeline, { - TimelineEvent, - TimelineNode, - TimelineNodeTitle, -} from "../../../CAREUI/display/Timeline"; -import CareIcon from "../../../CAREUI/icons/CareIcon"; -import { classNames, formatDateTime, relativeTime } from "../../../Utils/utils"; -import { AssetData } from "../../Assets/AssetTypes"; -import { CurrentBed } from "../models"; import { Popover, PopoverButton, PopoverPanel, Transition, } from "@headlessui/react"; +import { useTranslation } from "react-i18next"; + +import Chip from "@/CAREUI/display/Chip"; +import Timeline, { + TimelineEvent, + TimelineNode, + TimelineNodeTitle, +} from "@/CAREUI/display/Timeline"; +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import { AssetData } from "@/components/Assets/AssetTypes"; +import { CurrentBed } from "@/components/Facility/models"; + +import { classNames, formatDateTime, relativeTime } from "@/Utils/utils"; interface AssetDiff { newlyLinkedAssets: AssetData[]; diff --git a/src/components/Facility/Consultations/Beds.tsx b/src/components/Facility/Consultations/Beds.tsx index 5d43ffff7fd..38d905b8349 100644 --- a/src/components/Facility/Consultations/Beds.tsx +++ b/src/components/Facility/Consultations/Beds.tsx @@ -1,29 +1,30 @@ -import * as Notification from "../../../Utils/Notifications"; - -import { BedModel, CurrentBed } from "../models"; +import { Link } from "raviger"; import { Dispatch, SetStateAction, useState } from "react"; -import routes from "../../../Redux/api"; -import request from "../../../Utils/request/request"; -import useQuery from "../../../Utils/request/useQuery"; -import { BedSelect } from "@/components/Common/BedSelect"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import CareIcon from "../../../CAREUI/icons/CareIcon"; -import CircularProgress from "@/components/Common/components/CircularProgress"; -import { FieldLabel } from "../../Form/FormFields/FormField"; -import Loading from "@/components/Common/Loading"; -import dayjs from "../../../Utils/dayjs"; -import { AssetSelect } from "@/components/Common/AssetSelect"; -import DialogModal from "@/components/Common/Dialog"; -import { Link } from "raviger"; +import Chip from "@/CAREUI/display/Chip"; +import CareIcon from "@/CAREUI/icons/CareIcon"; + import { AssetClass, - assetClassProps, AssetData, -} from "../../Assets/AssetTypes"; -import Chip from "../../../CAREUI/display/Chip"; -import BedActivityTimeline from "./BedActivityTimeline"; -import DateFormField from "../../Form/FormFields/DateFormField.js"; + assetClassProps, +} from "@/components/Assets/AssetTypes"; +import { AssetSelect } from "@/components/Common/AssetSelect"; +import { BedSelect } from "@/components/Common/BedSelect"; +import ButtonV2 from "@/components/Common/ButtonV2"; +import CircularProgress from "@/components/Common/CircularProgress"; +import DialogModal from "@/components/Common/Dialog"; +import Loading from "@/components/Common/Loading"; +import BedActivityTimeline from "@/components/Facility/Consultations/BedActivityTimeline"; +import { BedModel, CurrentBed } from "@/components/Facility/models"; +import DateFormField from "@/components/Form/FormFields/DateFormField.js"; +import { FieldLabel } from "@/components/Form/FormFields/FormField"; + +import * as Notification from "@/Utils/Notifications"; +import dayjs from "@/Utils/dayjs"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import useQuery from "@/Utils/request/useQuery"; interface BedsProps { facilityId: string; diff --git a/src/components/Facility/Consultations/DailyRounds/DefaultLogUpdateCard.tsx b/src/components/Facility/Consultations/DailyRounds/DefaultLogUpdateCard.tsx index 467d9d980e6..8a436c07393 100644 --- a/src/components/Facility/Consultations/DailyRounds/DefaultLogUpdateCard.tsx +++ b/src/components/Facility/Consultations/DailyRounds/DefaultLogUpdateCard.tsx @@ -1,10 +1,13 @@ import { useTranslation } from "react-i18next"; -import CareIcon from "../../../../CAREUI/icons/CareIcon"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import { DailyRoundsModel } from "../../../Patient/models"; -import LogUpdateCardAttribute from "./LogUpdateCardAttribute"; -import { ConsultationModel } from "../../models"; -import { useSlugs } from "@/common/hooks/useSlug"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import ButtonV2 from "@/components/Common/ButtonV2"; +import LogUpdateCardAttribute from "@/components/Facility/Consultations/DailyRounds/LogUpdateCardAttribute"; +import { ConsultationModel } from "@/components/Facility/models"; +import { DailyRoundsModel } from "@/components/Patient/models"; + +import { useSlugs } from "@/hooks/useSlug"; interface Props { round: DailyRoundsModel; diff --git a/src/components/Facility/Consultations/DailyRounds/LogUpdateCardAttribute.tsx b/src/components/Facility/Consultations/DailyRounds/LogUpdateCardAttribute.tsx index d433710a787..20856b414a9 100644 --- a/src/components/Facility/Consultations/DailyRounds/LogUpdateCardAttribute.tsx +++ b/src/components/Facility/Consultations/DailyRounds/LogUpdateCardAttribute.tsx @@ -1,7 +1,8 @@ import { useTranslation } from "react-i18next"; + import PatientCategoryBadge from "@/components/Common/PatientCategoryBadge"; -import { DailyRoundsModel, NameQuantity } from "../../../Patient/models"; -import { PatientCategory } from "../../models"; +import { PatientCategory } from "@/components/Facility/models"; +import { DailyRoundsModel, NameQuantity } from "@/components/Patient/models"; interface Props { attributeKey: T; diff --git a/src/components/Facility/Consultations/DailyRounds/VirtualNursingAssistantLogUpdateCard.tsx b/src/components/Facility/Consultations/DailyRounds/VirtualNursingAssistantLogUpdateCard.tsx index 01c45d996ae..b8a8e9fd814 100644 --- a/src/components/Facility/Consultations/DailyRounds/VirtualNursingAssistantLogUpdateCard.tsx +++ b/src/components/Facility/Consultations/DailyRounds/VirtualNursingAssistantLogUpdateCard.tsx @@ -1,6 +1,7 @@ import { useTranslation } from "react-i18next"; -import { DailyRoundsModel } from "../../../Patient/models"; -import LogUpdateCardAttribute from "./LogUpdateCardAttribute"; + +import LogUpdateCardAttribute from "@/components/Facility/Consultations/DailyRounds/LogUpdateCardAttribute"; +import { DailyRoundsModel } from "@/components/Patient/models"; // TODO: remove this method once events module is ready const getDeepDiff = (a: any, b?: any): Partial => { diff --git a/src/components/Facility/Consultations/DailyRoundsFilter.tsx b/src/components/Facility/Consultations/DailyRoundsFilter.tsx index 503952eacc1..90e7908ac16 100644 --- a/src/components/Facility/Consultations/DailyRoundsFilter.tsx +++ b/src/components/Facility/Consultations/DailyRoundsFilter.tsx @@ -4,15 +4,17 @@ import { PopoverPanel, Transition, } from "@headlessui/react"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import { SelectFormField } from "../../Form/FormFields/SelectFormField"; -import CareIcon from "../../../CAREUI/icons/CareIcon"; import dayjs from "dayjs"; import { useState } from "react"; import { useTranslation } from "react-i18next"; -import { DailyRoundTypes, DailyRoundsModel } from "../../Patient/models"; -import { FieldChangeEvent } from "../../Form/FormFields/Utils"; -import DateFormField from "../../Form/FormFields/DateFormField"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import ButtonV2 from "@/components/Common/ButtonV2"; +import DateFormField from "@/components/Form/FormFields/DateFormField"; +import { SelectFormField } from "@/components/Form/FormFields/SelectFormField"; +import { FieldChangeEvent } from "@/components/Form/FormFields/Utils"; +import { DailyRoundTypes, DailyRoundsModel } from "@/components/Patient/models"; type FilterState = { rounds_type?: DailyRoundsModel["rounds_type"]; diff --git a/src/components/Facility/Consultations/DailyRoundsList.tsx b/src/components/Facility/Consultations/DailyRoundsList.tsx index a91764e581b..037556e6dda 100644 --- a/src/components/Facility/Consultations/DailyRoundsList.tsx +++ b/src/components/Facility/Consultations/DailyRoundsList.tsx @@ -1,17 +1,21 @@ -import { DailyRoundsModel } from "../../Patient/models"; -import VirtualNursingAssistantLogUpdateCard from "./DailyRounds/VirtualNursingAssistantLogUpdateCard"; -import DefaultLogUpdateCard from "./DailyRounds/DefaultLogUpdateCard"; import { useTranslation } from "react-i18next"; -import LoadingLogUpdateCard from "./DailyRounds/LoadingCard"; -import routes from "../../../Redux/api"; -import PaginatedList from "../../../CAREUI/misc/PaginatedList"; -import { ConsultationModel } from "../models"; -import { useSlugs } from "@/common/hooks/useSlug"; -import Timeline, { TimelineNode } from "../../../CAREUI/display/Timeline"; -import { QueryParams } from "../../../Utils/request/types"; +import Timeline, { TimelineNode } from "@/CAREUI/display/Timeline"; +import PaginatedList from "@/CAREUI/misc/PaginatedList"; + +import DefaultLogUpdateCard from "@/components/Facility/Consultations/DailyRounds/DefaultLogUpdateCard"; +import LoadingLogUpdateCard from "@/components/Facility/Consultations/DailyRounds/LoadingCard"; +import VirtualNursingAssistantLogUpdateCard from "@/components/Facility/Consultations/DailyRounds/VirtualNursingAssistantLogUpdateCard"; +import { ConsultationModel } from "@/components/Facility/models"; +import { DailyRoundsModel } from "@/components/Patient/models"; + +import { useSlugs } from "@/hooks/useSlug"; + import { UserRole } from "@/common/constants"; +import routes from "@/Utils/request/api"; +import { QueryParams } from "@/Utils/request/types"; + interface Props { consultation: ConsultationModel; query: QueryParams; diff --git a/src/components/Facility/Consultations/DialysisPlots.tsx b/src/components/Facility/Consultations/DialysisPlots.tsx index a99a9d43ffb..4c6f1024626 100644 --- a/src/components/Facility/Consultations/DialysisPlots.tsx +++ b/src/components/Facility/Consultations/DialysisPlots.tsx @@ -1,11 +1,14 @@ import { useEffect, useState } from "react"; -import routes from "../../../Redux/api"; -import request from "../../../Utils/request/request"; -import { LinePlot } from "./components/LinePlot"; + import Pagination from "@/components/Common/Pagination"; +import { LinePlot } from "@/components/Facility/Consultations/components/LinePlot"; +import { DialysisPlotsFields } from "@/components/Facility/models"; + import { PAGINATION_LIMIT } from "@/common/constants"; -import { formatDateTime } from "../../../Utils/utils"; -import { DialysisPlotsFields } from "../models"; + +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import { formatDateTime } from "@/Utils/utils"; export const DialysisPlots = (props: any) => { const { consultationId } = props; diff --git a/src/components/Facility/Consultations/Mews.tsx b/src/components/Facility/Consultations/Mews.tsx index 91473a9a4ce..2018a052d22 100644 --- a/src/components/Facility/Consultations/Mews.tsx +++ b/src/components/Facility/Consultations/Mews.tsx @@ -1,5 +1,6 @@ -import { DailyRoundsModel } from "../../Patient/models"; -import { formatDateTime, humanizeStrings } from "../../../Utils/utils"; +import { DailyRoundsModel } from "@/components/Patient/models"; + +import { formatDateTime, humanizeStrings } from "@/Utils/utils"; const getRespScore = (value?: number) => { if (typeof value !== "number") return; diff --git a/src/components/Facility/Consultations/NeurologicalTables.tsx b/src/components/Facility/Consultations/NeurologicalTables.tsx index bbf6d529c08..75d435a8584 100644 --- a/src/components/Facility/Consultations/NeurologicalTables.tsx +++ b/src/components/Facility/Consultations/NeurologicalTables.tsx @@ -1,9 +1,9 @@ import { useEffect, useState } from "react"; - -import routes from "../../../Redux/api"; -import request from "../../../Utils/request/request"; +import { useTranslation } from "react-i18next"; import Pagination from "@/components/Common/Pagination"; +import { NeurologicalTablesFields } from "@/components/Facility/models"; + import { CONSCIOUSNESS_LEVEL, EYE_OPEN_SCALE, @@ -13,9 +13,10 @@ import { PUPIL_REACTION_OPTIONS, VERBAL_RESPONSE_SCALE, } from "@/common/constants"; -import { formatDateTime } from "../../../Utils/utils"; -import { useTranslation } from "react-i18next"; -import { NeurologicalTablesFields } from "../models"; + +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import { formatDateTime } from "@/Utils/utils"; const DataTable = (props: any) => { const { title, data } = props; diff --git a/src/components/Facility/Consultations/NursingPlot.tsx b/src/components/Facility/Consultations/NursingPlot.tsx index 5797be27737..13f5bb64201 100644 --- a/src/components/Facility/Consultations/NursingPlot.tsx +++ b/src/components/Facility/Consultations/NursingPlot.tsx @@ -1,12 +1,14 @@ import { useEffect, useState } from "react"; -import routes from "../../../Redux/api"; -import request from "../../../Utils/request/request"; -import { NURSING_CARE_PROCEDURES, PAGINATION_LIMIT } from "@/common/constants"; +import { useTranslation } from "react-i18next"; import Pagination from "@/components/Common/Pagination"; -import { formatDateTime } from "../../../Utils/utils"; -import { useTranslation } from "react-i18next"; -import { NursingPlotFields } from "../models"; +import { NursingPlotFields } from "@/components/Facility/models"; + +import { NURSING_CARE_PROCEDURES, PAGINATION_LIMIT } from "@/common/constants"; + +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import { formatDateTime } from "@/Utils/utils"; export const NursingPlot = ({ consultationId }: any) => { const { t } = useTranslation(); diff --git a/src/components/Facility/Consultations/NutritionPlots.tsx b/src/components/Facility/Consultations/NutritionPlots.tsx index dea0f351a2c..53b72a3ed3f 100644 --- a/src/components/Facility/Consultations/NutritionPlots.tsx +++ b/src/components/Facility/Consultations/NutritionPlots.tsx @@ -1,14 +1,17 @@ import { useEffect, useState } from "react"; -import routes from "../../../Redux/api"; -import request from "../../../Utils/request/request"; -import { LinePlot } from "./components/LinePlot"; -import { StackedLinePlot } from "./components/StackedLinePlot"; +import CareIcon from "@/CAREUI/icons/CareIcon"; + import Pagination from "@/components/Common/Pagination"; +import { LinePlot } from "@/components/Facility/Consultations/components/LinePlot"; +import { StackedLinePlot } from "@/components/Facility/Consultations/components/StackedLinePlot"; +import { NutritionPlotsFields } from "@/components/Facility/models"; + import { PAGINATION_LIMIT } from "@/common/constants"; -import { formatDateTime } from "../../../Utils/utils"; -import CareIcon from "../../../CAREUI/icons/CareIcon"; -import { NutritionPlotsFields } from "../models"; + +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import { formatDateTime } from "@/Utils/utils"; export const NutritionPlots = (props: any) => { const { consultationId } = props; diff --git a/src/components/Facility/Consultations/PainDiagrams.tsx b/src/components/Facility/Consultations/PainDiagrams.tsx index c5c6d06864f..147a2bdd852 100644 --- a/src/components/Facility/Consultations/PainDiagrams.tsx +++ b/src/components/Facility/Consultations/PainDiagrams.tsx @@ -1,8 +1,10 @@ import { useEffect, useState } from "react"; -import { formatDateTime } from "../../../Utils/utils"; -import PainChart from "../../LogUpdate/components/PainChart"; import { useTranslation } from "react-i18next"; +import PainChart from "@/components/LogUpdate/components/PainChart"; + +import { formatDateTime } from "@/Utils/utils"; + export const PainDiagrams = (props: any) => { const { dailyRound } = props; const [results, setResults] = useState({}); diff --git a/src/components/Facility/Consultations/PressureSoreDiagrams.tsx b/src/components/Facility/Consultations/PressureSoreDiagrams.tsx index 4da3dedc60d..fe96f802df6 100644 --- a/src/components/Facility/Consultations/PressureSoreDiagrams.tsx +++ b/src/components/Facility/Consultations/PressureSoreDiagrams.tsx @@ -1,12 +1,17 @@ import { useEffect, useState } from "react"; -import routes from "../../../Redux/api"; -import request from "../../../Utils/request/request"; + import Pagination from "@/components/Common/Pagination"; +import { + PressureSoreDiagramsFields, + PressureSoreDiagramsRes, +} from "@/components/Facility/models"; +import PressureSore from "@/components/LogUpdate/Sections/PressureSore/PressureSore"; + import { PAGINATION_LIMIT } from "@/common/constants"; -import { formatDateTime } from "../../../Utils/utils"; -import { PressureSoreDiagramsFields, PressureSoreDiagramsRes } from "../models"; -import PressureSore from "../../LogUpdate/Sections/PressureSore/PressureSore"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import { formatDateTime } from "@/Utils/utils"; export const PressureSoreDiagrams = (props: any) => { const { consultationId } = props; diff --git a/src/components/Facility/Consultations/PrimaryParametersPlot.tsx b/src/components/Facility/Consultations/PrimaryParametersPlot.tsx index 067e197e374..fcaa30997ba 100644 --- a/src/components/Facility/Consultations/PrimaryParametersPlot.tsx +++ b/src/components/Facility/Consultations/PrimaryParametersPlot.tsx @@ -1,17 +1,21 @@ import { useEffect, useState } from "react"; -import routes from "../../../Redux/api"; -import request from "../../../Utils/request/request"; -import { LinePlot } from "./components/LinePlot"; -import { StackedLinePlot } from "./components/StackedLinePlot"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import { meanArterialPressure } from "@/components/Common/BloodPressureFormField"; +import PageTitle from "@/components/Common/PageTitle"; import Pagination from "@/components/Common/Pagination"; +import { PainDiagrams } from "@/components/Facility/Consultations/PainDiagrams"; +import { LinePlot } from "@/components/Facility/Consultations/components/LinePlot"; +import { StackedLinePlot } from "@/components/Facility/Consultations/components/StackedLinePlot"; +import { PrimaryParametersPlotFields } from "@/components/Facility/models"; + import { PAGINATION_LIMIT } from "@/common/constants"; -import { formatDateTime } from "../../../Utils/utils"; -import CareIcon from "../../../CAREUI/icons/CareIcon"; -import { PainDiagrams } from "./PainDiagrams"; -import PageTitle from "@/components/Common/PageTitle"; -import dayjs from "../../../Utils/dayjs"; -import { meanArterialPressure } from "@/components/Common/BloodPressureFormField"; -import { PrimaryParametersPlotFields } from "../models"; + +import dayjs from "@/Utils/dayjs"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import { formatDateTime } from "@/Utils/utils"; interface PrimaryParametersPlotProps { facilityId: string; diff --git a/src/components/Facility/Consultations/VentilatorPlot.tsx b/src/components/Facility/Consultations/VentilatorPlot.tsx index db672f5de7d..da536e641ea 100644 --- a/src/components/Facility/Consultations/VentilatorPlot.tsx +++ b/src/components/Facility/Consultations/VentilatorPlot.tsx @@ -1,12 +1,15 @@ import { useEffect, useState } from "react"; -import routes from "../../../Redux/api"; -import request from "../../../Utils/request/request"; -import { LinePlot } from "./components/LinePlot"; + import Pagination from "@/components/Common/Pagination"; +import BinaryChronologicalChart from "@/components/Facility/Consultations/components/BinaryChronologicalChart"; +import { LinePlot } from "@/components/Facility/Consultations/components/LinePlot"; +import { VentilatorPlotFields } from "@/components/Facility/models"; + import { PAGINATION_LIMIT } from "@/common/constants"; -import { formatDateTime } from "../../../Utils/utils"; -import BinaryChronologicalChart from "./components/BinaryChronologicalChart"; -import { VentilatorPlotFields } from "../models"; + +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import { formatDateTime } from "@/Utils/utils"; /* interface ModalityType { diff --git a/src/components/Facility/Consultations/components/BinaryChronologicalChart.tsx b/src/components/Facility/Consultations/components/BinaryChronologicalChart.tsx index 47ff5b8e33b..82eb7f3da4d 100644 --- a/src/components/Facility/Consultations/components/BinaryChronologicalChart.tsx +++ b/src/components/Facility/Consultations/components/BinaryChronologicalChart.tsx @@ -1,5 +1,6 @@ -import CareIcon from "../../../../CAREUI/icons/CareIcon"; -import { formatDateTime } from "../../../../Utils/utils"; +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import { formatDateTime } from "@/Utils/utils"; export default function BinaryChronologicalChart(props: { data: { diff --git a/src/components/Facility/Consultations/components/LinePlot.tsx b/src/components/Facility/Consultations/components/LinePlot.tsx index 667240428e5..12fd72fae72 100644 --- a/src/components/Facility/Consultations/components/LinePlot.tsx +++ b/src/components/Facility/Consultations/components/LinePlot.tsx @@ -10,10 +10,11 @@ import { VisualMapComponent, VisualMapPiecewiseComponent, } from "echarts/components"; - import * as echarts from "echarts/core"; import { CanvasRenderer } from "echarts/renderers"; -import { properRoundOf } from "../../../../Utils/utils"; + +import { properRoundOf } from "@/Utils/utils"; + echarts.use([ BarChart, LineChart, diff --git a/src/components/Facility/Consultations/components/StackedLinePlot.tsx b/src/components/Facility/Consultations/components/StackedLinePlot.tsx index 97b7547c83d..6ca94370091 100644 --- a/src/components/Facility/Consultations/components/StackedLinePlot.tsx +++ b/src/components/Facility/Consultations/components/StackedLinePlot.tsx @@ -10,9 +10,9 @@ import { VisualMapComponent, VisualMapPiecewiseComponent, } from "echarts/components"; - import * as echarts from "echarts/core"; import { CanvasRenderer } from "echarts/renderers"; + echarts.use([ BarChart, LineChart, diff --git a/src/components/Facility/DischargeModal.tsx b/src/components/Facility/DischargeModal.tsx index e3240c08751..359e6437931 100644 --- a/src/components/Facility/DischargeModal.tsx +++ b/src/components/Facility/DischargeModal.tsx @@ -1,32 +1,35 @@ -import * as Notification from "../../Utils/Notifications"; - -import { Cancel, Submit } from "@/components/Common/components/ButtonV2"; import { useEffect, useState } from "react"; +import { useTranslation } from "react-i18next"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import CircularProgress from "@/components/Common/components/CircularProgress"; +import { Cancel, Submit } from "@/components/Common/ButtonV2"; +import CircularProgress from "@/components/Common/CircularProgress"; import ConfirmDialog from "@/components/Common/ConfirmDialog"; -import { ConsultationModel } from "./models"; -import { DISCHARGE_REASONS } from "@/common/constants"; -import DateFormField from "../Form/FormFields/DateFormField"; import DialogModal from "@/components/Common/Dialog"; -import { EditDiagnosesBuilder } from "../Diagnosis/ConsultationDiagnosisBuilder/ConsultationDiagnosisBuilder"; -import { FacilityModel } from "./models"; import { FacilitySelect } from "@/components/Common/FacilitySelect"; -import { FieldError } from "../Form/FieldValidators"; -import { FieldLabel } from "../Form/FormFields/FormField"; import Loading from "@/components/Common/Loading"; +import { EditDiagnosesBuilder } from "@/components/Diagnosis/ConsultationDiagnosisBuilder/ConsultationDiagnosisBuilder"; +import { ConsultationModel } from "@/components/Facility/models"; +import { FacilityModel } from "@/components/Facility/models"; +import { FieldError } from "@/components/Form/FieldValidators"; +import DateFormField from "@/components/Form/FormFields/DateFormField"; +import { FieldLabel } from "@/components/Form/FormFields/FormField"; +import { SelectFormField } from "@/components/Form/FormFields/SelectFormField"; +import TextAreaFormField from "@/components/Form/FormFields/TextAreaFormField"; +import TextFormField from "@/components/Form/FormFields/TextFormField"; +import PrescriptionBuilder from "@/components/Medicine/PrescriptionBuilder"; + +import useConfirmedAction from "@/hooks/useConfirmedAction"; + +import { DISCHARGE_REASONS } from "@/common/constants"; + import { PLUGIN_Component } from "@/PluginEngine"; -import PrescriptionBuilder from "../Medicine/PrescriptionBuilder"; -import { SelectFormField } from "../Form/FormFields/SelectFormField"; -import TextAreaFormField from "../Form/FormFields/TextAreaFormField"; -import TextFormField from "../Form/FormFields/TextFormField"; -import dayjs from "../../Utils/dayjs"; -import request from "../../Utils/request/request"; -import routes from "../../Redux/api"; -import useConfirmedAction from "@/common/hooks/useConfirmedAction"; -import useQuery from "../../Utils/request/useQuery"; -import { useTranslation } from "react-i18next"; +import * as Notification from "@/Utils/Notifications"; +import dayjs from "@/Utils/dayjs"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import useQuery from "@/Utils/request/useQuery"; interface PreDischargeFormInterface { new_discharge_reason: number | null; diff --git a/src/components/Facility/DischargeSummaryModal.tsx b/src/components/Facility/DischargeSummaryModal.tsx index 37609d84e89..45eeaf5de0f 100644 --- a/src/components/Facility/DischargeSummaryModal.tsx +++ b/src/components/Facility/DischargeSummaryModal.tsx @@ -1,19 +1,22 @@ import { useState } from "react"; +import { useTranslation } from "react-i18next"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import { Cancel, Submit } from "@/components/Common/ButtonV2"; import DialogModal from "@/components/Common/Dialog"; -import TextFormField from "../Form/FormFields/TextFormField"; -import { ConsultationModel } from "./models"; -import { Cancel, Submit } from "@/components/Common/components/ButtonV2"; -import CareIcon from "../../CAREUI/icons/CareIcon"; +import { ConsultationModel } from "@/components/Facility/models"; import { EmailValidator, MultiValidator, RequiredFieldValidator, -} from "../Form/FieldValidators"; -import { Error, Success } from "../../Utils/Notifications"; -import { useTranslation } from "react-i18next"; -import CheckBoxFormField from "../Form/FormFields/CheckBoxFormField"; -import request from "../../Utils/request/request"; -import routes from "../../Redux/api"; +} from "@/components/Form/FieldValidators"; +import CheckBoxFormField from "@/components/Form/FormFields/CheckBoxFormField"; +import TextFormField from "@/components/Form/FormFields/TextFormField"; + +import { Error, Success } from "@/Utils/Notifications"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; interface Props { show: boolean; diff --git a/src/components/Facility/DischargedPatientsList.tsx b/src/components/Facility/DischargedPatientsList.tsx index d9a7ac9aae7..f3010db7046 100644 --- a/src/components/Facility/DischargedPatientsList.tsx +++ b/src/components/Facility/DischargedPatientsList.tsx @@ -1,11 +1,33 @@ import { Link, navigate } from "raviger"; -import routes from "../../Redux/api"; -import Page from "@/components/Common/components/Page"; -import PaginatedList from "../../CAREUI/misc/PaginatedList"; +import { useEffect, useState } from "react"; +import { useTranslation } from "react-i18next"; + +import CountBlock from "@/CAREUI/display/Count"; +import FilterBadge from "@/CAREUI/display/FilterBadge"; +import RecordMeta from "@/CAREUI/display/RecordMeta"; +import CareIcon from "@/CAREUI/icons/CareIcon"; +import { AdvancedFilterButton } from "@/CAREUI/interactive/FiltersSlideover"; +import PaginatedList from "@/CAREUI/misc/PaginatedList"; + import Loading from "@/components/Common/Loading"; -import { PatientModel } from "../Patient/models"; -import useQuery from "../../Utils/request/useQuery"; -import SearchInput from "../Form/SearchInput"; +import Page from "@/components/Common/Page"; +import SortDropdownMenu from "@/components/Common/SortDropdown"; +import Tabs from "@/components/Common/Tabs"; +import { getDiagnosesByIds } from "@/components/Diagnosis/utils"; +import { ICD11DiagnosisModel } from "@/components/Facility/models"; +import PhoneNumberFormField from "@/components/Form/FormFields/PhoneNumberFormField"; +import { FieldChangeEvent } from "@/components/Form/FormFields/Utils"; +import SearchInput from "@/components/Form/SearchInput"; +import { + DIAGNOSES_FILTER_LABELS, + DiagnosesFilterKey, + FILTER_BY_DIAGNOSES_KEYS, +} from "@/components/Patient/DiagnosesFilter"; +import PatientFilter from "@/components/Patient/PatientFilter"; +import { PatientModel } from "@/components/Patient/models"; + +import useFilters from "@/hooks/useFilters"; + import { ADMITTED_TO, CONSENT_TYPE_CHOICES, @@ -14,28 +36,11 @@ import { GENDER_TYPES, PATIENT_CATEGORIES, } from "@/common/constants"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import RecordMeta from "../../CAREUI/display/RecordMeta"; -import { formatPatientAge, humanizeStrings } from "../../Utils/utils"; -import { useTranslation } from "react-i18next"; -import SortDropdownMenu from "@/components/Common/SortDropdown"; -import useFilters from "@/common/hooks/useFilters"; -import PatientFilter from "../Patient/PatientFilter"; -import { AdvancedFilterButton } from "../../CAREUI/interactive/FiltersSlideover"; -import CountBlock from "../../CAREUI/display/Count"; -import { FieldChangeEvent } from "../Form/FormFields/Utils"; -import PhoneNumberFormField from "../Form/FormFields/PhoneNumberFormField"; -import { useEffect, useState } from "react"; import { parseOptionId } from "@/common/utils"; -import { - DIAGNOSES_FILTER_LABELS, - DiagnosesFilterKey, - FILTER_BY_DIAGNOSES_KEYS, -} from "../Patient/DiagnosesFilter"; -import { getDiagnosesByIds } from "../Diagnosis/utils"; -import { ICD11DiagnosisModel } from "./models"; -import FilterBadge from "../../CAREUI/display/FilterBadge"; -import Tabs from "@/components/Common/components/Tabs"; + +import routes from "@/Utils/request/api"; +import useQuery from "@/Utils/request/useQuery"; +import { formatPatientAge, humanizeStrings } from "@/Utils/utils"; const DischargedPatientsList = ({ facility_external_id, diff --git a/src/components/Facility/DoctorNote.tsx b/src/components/Facility/DoctorNote.tsx index 456eab075c3..ce6fe955182 100644 --- a/src/components/Facility/DoctorNote.tsx +++ b/src/components/Facility/DoctorNote.tsx @@ -1,8 +1,12 @@ import InfiniteScroll from "react-infinite-scroll-component"; -import CircularProgress from "@/components/Common/components/CircularProgress"; -import PatientNoteCard from "./PatientNoteCard"; -import { PatientNoteStateType, PatientNotesModel } from "./models"; -import DoctorNoteReplyPreviewCard from "./DoctorNoteReplyPreviewCard"; + +import CircularProgress from "@/components/Common/CircularProgress"; +import DoctorNoteReplyPreviewCard from "@/components/Facility/DoctorNoteReplyPreviewCard"; +import PatientNoteCard from "@/components/Facility/PatientNoteCard"; +import { + PatientNoteStateType, + PatientNotesModel, +} from "@/components/Facility/models"; interface DoctorNoteProps { state: PatientNoteStateType; diff --git a/src/components/Facility/DoctorNoteReplyPreviewCard.tsx b/src/components/Facility/DoctorNoteReplyPreviewCard.tsx index 8e9009ed1a5..118b529a646 100644 --- a/src/components/Facility/DoctorNoteReplyPreviewCard.tsx +++ b/src/components/Facility/DoctorNoteReplyPreviewCard.tsx @@ -1,7 +1,10 @@ import React from "react"; -import { PaitentNotesReplyModel } from "./models"; + +import { PaitentNotesReplyModel } from "@/components/Facility/models"; + import { USER_TYPES_MAP } from "@/common/constants"; -import { formatDateTime, relativeDate } from "../../Utils/utils"; + +import { formatDateTime, relativeDate } from "@/Utils/utils"; interface Props { parentNote: PaitentNotesReplyModel | undefined; diff --git a/src/components/Facility/DoctorVideoSlideover.tsx b/src/components/Facility/DoctorVideoSlideover.tsx index 0ed5e7df877..73349624780 100644 --- a/src/components/Facility/DoctorVideoSlideover.tsx +++ b/src/components/Facility/DoctorVideoSlideover.tsx @@ -1,23 +1,26 @@ -import CareIcon, { IconName } from "../../CAREUI/icons/CareIcon"; import React, { useState } from "react"; + +import CareIcon, { IconName } from "@/CAREUI/icons/CareIcon"; +import SlideOver from "@/CAREUI/interactive/SlideOver"; +import Switch from "@/CAREUI/interactive/Switch"; + +import Loading from "@/components/Common/Loading"; +import { SkillObjectModel } from "@/components/Users/models"; +import { UserAssignedModel } from "@/components/Users/models"; + +import useAuthUser from "@/hooks/useAuthUser"; + +import { triggerGoal } from "@/Integrations/Plausible"; +import { PLUGIN_Component } from "@/PluginEngine"; +import { Warn } from "@/Utils/Notifications"; +import routes from "@/Utils/request/api"; +import useQuery from "@/Utils/request/useQuery"; import { classNames, formatName, isUserOnline, relativeTime, -} from "../../Utils/utils"; - -import Loading from "@/components/Common/Loading"; -import { PLUGIN_Component } from "@/PluginEngine"; -import { SkillObjectModel } from "../Users/models"; -import SlideOver from "../../CAREUI/interactive/SlideOver"; -import Switch from "../../CAREUI/interactive/Switch"; -import { UserAssignedModel } from "../Users/models"; -import { Warn } from "../../Utils/Notifications"; -import routes from "../../Redux/api"; -import { triggerGoal } from "../../Integrations/Plausible"; -import useAuthUser from "@/common/hooks/useAuthUser"; -import useQuery from "../../Utils/request/useQuery"; +} from "@/Utils/utils"; const UserGroups = { ALL: "All", diff --git a/src/components/Facility/DuplicatePatientDialog.tsx b/src/components/Facility/DuplicatePatientDialog.tsx index 92da71a1321..241750cec6b 100644 --- a/src/components/Facility/DuplicatePatientDialog.tsx +++ b/src/components/Facility/DuplicatePatientDialog.tsx @@ -1,9 +1,10 @@ import { useState } from "react"; -import { Cancel, Submit } from "@/components/Common/components/ButtonV2"; -import DialogModal from "@/components/Common/Dialog"; -import { DupPatientModel } from "./models"; import { useTranslation } from "react-i18next"; +import { Cancel, Submit } from "@/components/Common/ButtonV2"; +import DialogModal from "@/components/Common/Dialog"; +import { DupPatientModel } from "@/components/Facility/models"; + interface Props { patientList: Array; handleOk: (action: string) => void; diff --git a/src/components/Facility/FacilityBedCapacity.tsx b/src/components/Facility/FacilityBedCapacity.tsx index 6794f3e69e9..6170c57033c 100644 --- a/src/components/Facility/FacilityBedCapacity.tsx +++ b/src/components/Facility/FacilityBedCapacity.tsx @@ -1,15 +1,19 @@ import { useState } from "react"; -import { BED_TYPES } from "@/common/constants"; -import routes from "../../Redux/api"; -import { NonReadOnlyUsers } from "../../Utils/AuthorizeFor"; -import useQuery from "../../Utils/request/useQuery"; -import DialogModal from "@/components/Common/Dialog"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import { BedCapacity } from "./BedCapacity"; -import BedTypeCard from "./BedTypeCard"; -import CareIcon from "../../CAREUI/icons/CareIcon"; import { useTranslation } from "react-i18next"; +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import ButtonV2 from "@/components/Common/ButtonV2"; +import DialogModal from "@/components/Common/Dialog"; +import { BedCapacity } from "@/components/Facility/BedCapacity"; +import BedTypeCard from "@/components/Facility/BedTypeCard"; + +import { BED_TYPES } from "@/common/constants"; + +import { NonReadOnlyUsers } from "@/Utils/AuthorizeFor"; +import routes from "@/Utils/request/api"; +import useQuery from "@/Utils/request/useQuery"; + export const FacilityBedCapacity = (props: any) => { const { t } = useTranslation(); diff --git a/src/components/Facility/FacilityBlock.tsx b/src/components/Facility/FacilityBlock.tsx index 34e6b442b4c..df4f284aee8 100644 --- a/src/components/Facility/FacilityBlock.tsx +++ b/src/components/Facility/FacilityBlock.tsx @@ -1,7 +1,8 @@ import { Link } from "raviger"; -import { FacilityModel } from "./models"; import { ReactNode } from "react"; + import { Avatar } from "@/components/Common/Avatar"; +import { FacilityModel } from "@/components/Facility/models"; export default function FacilityBlock(props: { facility: FacilityModel; diff --git a/src/components/Facility/FacilityCard.tsx b/src/components/Facility/FacilityCard.tsx index e7cc25f2494..d91bd624a88 100644 --- a/src/components/Facility/FacilityCard.tsx +++ b/src/components/Facility/FacilityCard.tsx @@ -1,22 +1,23 @@ -import { useState } from "react"; +import careConfig from "@careConfig"; import { Link } from "raviger"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; -import { FACILITY_FEATURE_TYPES } from "@/common/constants"; -import ButtonV2, { - Cancel, - Submit, -} from "@/components/Common/components/ButtonV2"; -import * as Notification from "../../Utils/Notifications"; -import Chip from "../../CAREUI/display/Chip"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import { formatPhoneNumber, parsePhoneNumber } from "../../Utils/utils"; -import DialogModal from "@/components/Common/Dialog"; -import TextAreaFormField from "../Form/FormFields/TextAreaFormField"; -import request from "../../Utils/request/request"; -import routes from "../../Redux/api"; -import careConfig from "@careConfig"; -import { FacilityModel } from "./models"; + +import Chip from "@/CAREUI/display/Chip"; +import CareIcon from "@/CAREUI/icons/CareIcon"; + import { Avatar } from "@/components/Common/Avatar"; +import ButtonV2, { Cancel, Submit } from "@/components/Common/ButtonV2"; +import DialogModal from "@/components/Common/Dialog"; +import { FacilityModel } from "@/components/Facility/models"; +import TextAreaFormField from "@/components/Form/FormFields/TextAreaFormField"; + +import { FACILITY_FEATURE_TYPES } from "@/common/constants"; + +import * as Notification from "@/Utils/Notifications"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import { formatPhoneNumber, parsePhoneNumber } from "@/Utils/utils"; export const FacilityCard = (props: { facility: FacilityModel; diff --git a/src/components/Facility/FacilityConfigure.tsx b/src/components/Facility/FacilityConfigure.tsx index a8068692545..78d2edd3058 100644 --- a/src/components/Facility/FacilityConfigure.tsx +++ b/src/components/Facility/FacilityConfigure.tsx @@ -1,16 +1,19 @@ -import { useReducer, useState } from "react"; -import * as Notification from "../../Utils/Notifications"; -import { navigate } from "raviger"; -import { Submit } from "@/components/Common/components/ButtonV2"; -import TextFormField from "../Form/FormFields/TextFormField"; -import Page from "@/components/Common/components/Page"; -import { ConfigureHealthFacility } from "../ABDM/ConfigureHealthFacility"; -import useQuery from "../../Utils/request/useQuery"; -import routes from "../../Redux/api"; -import request from "../../Utils/request/request"; -import { FieldChangeEvent } from "../Form/FormFields/Utils"; import { t } from "i18next"; +import { navigate } from "raviger"; +import { useReducer, useState } from "react"; + +import { ConfigureHealthFacility } from "@/components/ABDM/ConfigureHealthFacility"; +import { Submit } from "@/components/Common/ButtonV2"; import Loading from "@/components/Common/Loading"; +import Page from "@/components/Common/Page"; +import TextFormField from "@/components/Form/FormFields/TextFormField"; +import { FieldChangeEvent } from "@/components/Form/FormFields/Utils"; + +import * as Notification from "@/Utils/Notifications"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import useQuery from "@/Utils/request/useQuery"; + const initForm = { name: "", state: 0, diff --git a/src/components/Facility/FacilityCreate.tsx b/src/components/Facility/FacilityCreate.tsx index 08939932840..d0548e15769 100644 --- a/src/components/Facility/FacilityCreate.tsx +++ b/src/components/Facility/FacilityCreate.tsx @@ -1,39 +1,53 @@ -import * as Notification from "../../Utils/Notifications"; +import careConfig from "@careConfig"; +import { + Popover, + PopoverButton, + PopoverPanel, + Transition, +} from "@headlessui/react"; +import { navigate } from "raviger"; +import { useEffect, useState } from "react"; +import { useTranslation } from "react-i18next"; + +import Card from "@/CAREUI/display/Card"; +import CareIcon from "@/CAREUI/icons/CareIcon"; -import ButtonV2, { - Cancel, - Submit, -} from "@/components/Common/components/ButtonV2"; +import ButtonV2, { Cancel, Submit } from "@/components/Common/ButtonV2"; +import GLocationPicker from "@/components/Common/GLocationPicker"; +import Loading from "@/components/Common/Loading"; +import Page from "@/components/Common/Page"; +import Steps, { Step } from "@/components/Common/Steps"; +import { BedCapacity } from "@/components/Facility/BedCapacity"; +import BedTypeCard from "@/components/Facility/BedTypeCard"; +import SpokeFacilityEditor from "@/components/Facility/SpokeFacilityEditor"; +import { StaffCapacity } from "@/components/Facility/StaffCapacity"; +import StaffCountCard from "@/components/Facility/StaffCountCard"; import { CapacityModal, DistrictModel, DoctorModal, FacilityRequest, -} from "./models"; -import { DraftSection, useAutoSaveReducer } from "../../Utils/AutoSave"; +} from "@/components/Facility/models"; +import { PhoneNumberValidator } from "@/components/Form/FieldValidators"; +import PhoneNumberFormField from "@/components/Form/FormFields/PhoneNumberFormField"; +import RadioFormField from "@/components/Form/FormFields/RadioFormField"; +import { + MultiSelectFormField, + SelectFormField, +} from "@/components/Form/FormFields/SelectFormField"; +import TextAreaFormField from "@/components/Form/FormFields/TextAreaFormField"; +import TextFormField from "@/components/Form/FormFields/TextFormField"; +import { FieldChangeEvent } from "@/components/Form/FormFields/Utils"; +import { FormAction } from "@/components/Form/Utils"; + +import useAppHistory from "@/hooks/useAppHistory"; +import useAuthUser from "@/hooks/useAuthUser"; + import { BED_TYPES, FACILITY_FEATURE_TYPES, FACILITY_TYPES, } from "@/common/constants"; -import { - MultiSelectFormField, - SelectFormField, -} from "../Form/FormFields/SelectFormField"; -import { - Popover, - PopoverButton, - PopoverPanel, - Transition, -} from "@headlessui/react"; -import { useEffect, useState } from "react"; -import Steps, { Step } from "@/components/Common/Steps"; -import { - getPincodeDetails, - includesIgnoreCase, - parsePhoneNumber, - compareBy, -} from "../../Utils/utils"; import { phonePreg, validateLatitude, @@ -41,34 +55,19 @@ import { validatePincode, } from "@/common/validation"; -import { BedCapacity } from "./BedCapacity"; -import BedTypeCard from "./BedTypeCard"; -import Card from "../../CAREUI/display/Card"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import { StaffCapacity } from "./StaffCapacity"; -import StaffCountCard from "./StaffCountCard"; -import { FieldChangeEvent } from "../Form/FormFields/Utils"; -import { FormAction } from "../Form/Utils"; -import GLocationPicker from "@/components/Common/GLocationPicker"; -import Page from "@/components/Common/components/Page"; -import PhoneNumberFormField from "../Form/FormFields/PhoneNumberFormField"; -import RadioFormField from "../Form/FormFields/RadioFormField"; -import TextAreaFormField from "../Form/FormFields/TextAreaFormField"; -import TextFormField from "../Form/FormFields/TextFormField"; - -import { navigate } from "raviger"; -import useAppHistory from "@/common/hooks/useAppHistory"; -import { useTranslation } from "react-i18next"; -import { PhoneNumberValidator } from "../Form/FieldValidators"; -import request from "../../Utils/request/request"; -import routes from "../../Redux/api"; -import useQuery from "../../Utils/request/useQuery"; -import { RequestResult } from "../../Utils/request/types"; -import useAuthUser from "@/common/hooks/useAuthUser"; -import SpokeFacilityEditor from "./SpokeFacilityEditor"; -import careConfig from "@careConfig"; +import { DraftSection, useAutoSaveReducer } from "@/Utils/AutoSave"; +import * as Notification from "@/Utils/Notifications"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import { RequestResult } from "@/Utils/request/types"; +import useQuery from "@/Utils/request/useQuery"; +import { + compareBy, + getPincodeDetails, + includesIgnoreCase, + parsePhoneNumber, +} from "@/Utils/utils"; -import Loading from "@/components/Common/Loading"; interface FacilityProps { facilityId?: string; } diff --git a/src/components/Facility/FacilityFilter/DistrictSelect.tsx b/src/components/Facility/FacilityFilter/DistrictSelect.tsx index 633927efdb8..31508002ab5 100644 --- a/src/components/Facility/FacilityFilter/DistrictSelect.tsx +++ b/src/components/Facility/FacilityFilter/DistrictSelect.tsx @@ -1,6 +1,7 @@ -import routes from "../../../Redux/api"; -import request from "../../../Utils/request/request"; -import AutoCompleteAsync from "../../Form/AutoCompleteAsync"; +import AutoCompleteAsync from "@/components/Form/AutoCompleteAsync"; + +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; interface DistrictSelectProps { name: string; diff --git a/src/components/Facility/FacilityFilter/index.tsx b/src/components/Facility/FacilityFilter/index.tsx index b9c5586ccf8..011a1bf3bbd 100644 --- a/src/components/Facility/FacilityFilter/index.tsx +++ b/src/components/Facility/FacilityFilter/index.tsx @@ -1,12 +1,16 @@ -import { FACILITY_TYPES } from "@/common/constants"; -import useMergeState from "@/common/hooks/useMergeState"; -import FiltersSlideover from "../../../CAREUI/interactive/FiltersSlideover"; import { useTranslation } from "react-i18next"; -import StateAutocompleteFormField from "@/components/Common/StateAutocompleteFormField"; -import { FieldChangeEvent } from "../../Form/FormFields/Utils"; + +import FiltersSlideover from "@/CAREUI/interactive/FiltersSlideover"; + import DistrictAutocompleteFormField from "@/components/Common/DistrictAutocompleteFormField"; import LocalBodyAutocompleteFormField from "@/components/Common/LocalBodyAutocompleteFormField"; -import { SelectFormField } from "../../Form/FormFields/SelectFormField"; +import StateAutocompleteFormField from "@/components/Common/StateAutocompleteFormField"; +import { SelectFormField } from "@/components/Form/FormFields/SelectFormField"; +import { FieldChangeEvent } from "@/components/Form/FormFields/Utils"; + +import useMergeState from "@/hooks/useMergeState"; + +import { FACILITY_TYPES } from "@/common/constants"; function FacilityFilter(props: any) { const { t } = useTranslation(); diff --git a/src/components/Facility/FacilityHome.tsx b/src/components/Facility/FacilityHome.tsx index 030763b24c4..843b958c67b 100644 --- a/src/components/Facility/FacilityHome.tsx +++ b/src/components/Facility/FacilityHome.tsx @@ -1,51 +1,50 @@ -import * as Notification from "../../Utils/Notifications"; - -import { NonReadOnlyUsers } from "../../Utils/AuthorizeFor"; -import { - FACILITY_FEATURE_TYPES, - LocalStorageKeys, - USER_TYPES, -} from "@/common/constants"; -import DropdownMenu, { - DropdownItem, -} from "@/components/Common/components/Menu"; -import { useState } from "react"; - -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import Chip from "../../CAREUI/display/Chip"; -import ConfirmDialog from "@/components/Common/ConfirmDialog"; -import ContactLink from "@/components/Common/components/ContactLink"; - -import Page from "@/components/Common/components/Page"; -import RecordMeta from "../../CAREUI/display/RecordMeta"; -import Table from "@/components/Common/components/Table"; - -import { navigate } from "raviger"; -import { useTranslation } from "react-i18next"; -import useAuthUser from "@/common/hooks/useAuthUser"; -import request from "../../Utils/request/request"; -import routes from "../../Redux/api"; -import useQuery from "../../Utils/request/useQuery"; -import { FacilityHomeTriage } from "./FacilityHomeTriage"; -import { FacilityBedCapacity } from "./FacilityBedCapacity"; -import useSlug from "@/common/hooks/useSlug"; +import careConfig from "@careConfig"; import { Popover, PopoverButton, PopoverPanel, Transition, } from "@headlessui/react"; -import { FieldLabel } from "../Form/FormFields/FormField"; -import { LocationSelect } from "@/components/Common/LocationSelect"; -import { CameraFeedPermittedUserTypes } from "../../Utils/permissions"; -import { FacilityStaffList } from "./FacilityStaffList"; -import FacilityBlock from "./FacilityBlock"; -import Loading from "@/components/Common/Loading"; -import AvatarEditable from "@/components/Common/AvatarEditable"; +import { navigate } from "raviger"; +import { useState } from "react"; +import { useTranslation } from "react-i18next"; + +import Chip from "@/CAREUI/display/Chip"; +import RecordMeta from "@/CAREUI/display/RecordMeta"; +import CareIcon from "@/CAREUI/icons/CareIcon"; + import AvatarEditModal from "@/components/Common/AvatarEditModal"; -import careConfig from "@careConfig"; +import AvatarEditable from "@/components/Common/AvatarEditable"; +import ButtonV2 from "@/components/Common/ButtonV2"; +import ConfirmDialog from "@/components/Common/ConfirmDialog"; +import ContactLink from "@/components/Common/ContactLink"; +import Loading from "@/components/Common/Loading"; +import { LocationSelect } from "@/components/Common/LocationSelect"; +import DropdownMenu, { DropdownItem } from "@/components/Common/Menu"; +import Page from "@/components/Common/Page"; +import Table from "@/components/Common/Table"; +import { FacilityBedCapacity } from "@/components/Facility/FacilityBedCapacity"; +import FacilityBlock from "@/components/Facility/FacilityBlock"; +import { FacilityHomeTriage } from "@/components/Facility/FacilityHomeTriage"; +import { FacilityStaffList } from "@/components/Facility/FacilityStaffList"; +import { FieldLabel } from "@/components/Form/FormFields/FormField"; + +import useAuthUser from "@/hooks/useAuthUser"; +import useSlug from "@/hooks/useSlug"; + +import { + FACILITY_FEATURE_TYPES, + LocalStorageKeys, + USER_TYPES, +} from "@/common/constants"; + +import { NonReadOnlyUsers } from "@/Utils/AuthorizeFor"; +import * as Notification from "@/Utils/Notifications"; +import { CameraFeedPermittedUserTypes } from "@/Utils/permissions"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; import uploadFile from "@/Utils/request/uploadFile"; +import useQuery from "@/Utils/request/useQuery"; import { sleep } from "@/Utils/utils"; type Props = { diff --git a/src/components/Facility/FacilityHomeTriage.tsx b/src/components/Facility/FacilityHomeTriage.tsx index 43f4e39f4e5..7349ccfcb38 100644 --- a/src/components/Facility/FacilityHomeTriage.tsx +++ b/src/components/Facility/FacilityHomeTriage.tsx @@ -1,9 +1,12 @@ import { navigate } from "raviger"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import Table from "@/components/Common/components/Table"; -import useQuery from "../../Utils/request/useQuery"; -import routes from "../../Redux/api"; -import CareIcon from "../../CAREUI/icons/CareIcon"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import ButtonV2 from "@/components/Common/ButtonV2"; +import Table from "@/components/Common/Table"; + +import routes from "@/Utils/request/api"; +import useQuery from "@/Utils/request/useQuery"; export const FacilityHomeTriage = (props: any) => { const triageQuery = useQuery(routes.getTriage, { diff --git a/src/components/Facility/FacilityList.tsx b/src/components/Facility/FacilityList.tsx index 7c38923ef5f..6570bf7ea58 100644 --- a/src/components/Facility/FacilityList.tsx +++ b/src/components/Facility/FacilityList.tsx @@ -1,23 +1,27 @@ +import { navigate } from "raviger"; import { useEffect } from "react"; -import { AdvancedFilterButton } from "../../CAREUI/interactive/FiltersSlideover"; -import CountBlock from "../../CAREUI/display/Count"; +import { useTranslation } from "react-i18next"; + +import CountBlock from "@/CAREUI/display/Count"; +import CareIcon from "@/CAREUI/icons/CareIcon"; +import { AdvancedFilterButton } from "@/CAREUI/interactive/FiltersSlideover"; + import ExportMenu from "@/components/Common/Export"; +import Loading from "@/components/Common/Loading"; +import Page from "@/components/Common/Page"; +import { FacilityCard } from "@/components/Facility/FacilityCard"; +import FacilityFilter from "@/components/Facility/FacilityFilter"; +import { FacilityModel } from "@/components/Facility/models"; +import SearchInput from "@/components/Form/SearchInput"; + +import useAuthUser from "@/hooks/useAuthUser"; +import useFilters from "@/hooks/useFilters"; + import { FACILITY_TYPES } from "@/common/constants"; -import { FacilityCard } from "./FacilityCard"; -import FacilityFilter from "./FacilityFilter"; -import { FacilityModel } from "./models"; -import Page from "@/components/Common/components/Page"; -import SearchInput from "../Form/SearchInput"; -import { navigate } from "raviger"; -import useFilters from "@/common/hooks/useFilters"; -import { useTranslation } from "react-i18next"; -import useAuthUser from "@/common/hooks/useAuthUser"; -import useQuery from "../../Utils/request/useQuery"; -import routes from "../../Redux/api"; -import CareIcon from "../../CAREUI/icons/CareIcon"; +import routes from "@/Utils/request/api"; +import useQuery from "@/Utils/request/useQuery"; -import Loading from "@/components/Common/Loading"; export const FacilityList = () => { const { qParams, diff --git a/src/components/Facility/FacilityStaffList.tsx b/src/components/Facility/FacilityStaffList.tsx index 2d116e0789f..e7a2ea08f10 100644 --- a/src/components/Facility/FacilityStaffList.tsx +++ b/src/components/Facility/FacilityStaffList.tsx @@ -1,18 +1,23 @@ import { useState } from "react"; -import { DOCTOR_SPECIALIZATION } from "@/common/constants"; -import { NonReadOnlyUsers } from "../../Utils/AuthorizeFor"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import DialogModal from "@/components/Common/Dialog"; -import { StaffCapacity } from "./StaffCapacity"; -import useQuery from "../../Utils/request/useQuery"; -import routes from "../../Redux/api"; -import { DoctorModal } from "./models"; -import DoctorsCountCard from "./StaffCountCard"; -import { DoctorIcon } from "../TeleIcu/Icons/DoctorIcon"; -import CareIcon from "../../CAREUI/icons/CareIcon"; import { useTranslation } from "react-i18next"; -import useFilters from "@/common/hooks/useFilters"; -import Pagination from "../Common/Pagination"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import ButtonV2 from "@/components/Common/ButtonV2"; +import DialogModal from "@/components/Common/Dialog"; +import Pagination from "@/components/Common/Pagination"; +import { StaffCapacity } from "@/components/Facility/StaffCapacity"; +import DoctorsCountCard from "@/components/Facility/StaffCountCard"; +import { DoctorModal } from "@/components/Facility/models"; +import { DoctorIcon } from "@/components/TeleIcu/Icons/DoctorIcon"; + +import useFilters from "@/hooks/useFilters"; + +import { DOCTOR_SPECIALIZATION } from "@/common/constants"; + +import { NonReadOnlyUsers } from "@/Utils/AuthorizeFor"; +import routes from "@/Utils/request/api"; +import useQuery from "@/Utils/request/useQuery"; export const FacilityStaffList = (props: any) => { const { t } = useTranslation(); diff --git a/src/components/Facility/FacilityUsers.tsx b/src/components/Facility/FacilityUsers.tsx index 06367f05238..c8682b516f8 100644 --- a/src/components/Facility/FacilityUsers.tsx +++ b/src/components/Facility/FacilityUsers.tsx @@ -1,23 +1,27 @@ import { useState } from "react"; -import CountBlock from "../../CAREUI/display/Count"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import { RESULTS_PER_PAGE_LIMIT } from "@/common/constants"; -import * as Notification from "../../Utils/Notifications"; -import { formatName, isUserOnline, relativeTime } from "../../Utils/utils"; -import SlideOver from "../../CAREUI/interactive/SlideOver"; -import Pagination from "@/components/Common/Pagination"; -import UserDetails from "@/components/Common/UserDetails"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import Page from "@/components/Common/components/Page"; -import LinkFacilityDialog from "../Users/LinkFacilityDialog"; -import UserDeleteDialog from "../Users/UserDeleteDialog"; -import request from "../../Utils/request/request"; -import routes from "../../Redux/api"; -import useQuery from "../../Utils/request/useQuery"; -import { UserFacilities } from "../Users/ManageUsers"; import { useTranslation } from "react-i18next"; +import CountBlock from "@/CAREUI/display/Count"; +import CareIcon from "@/CAREUI/icons/CareIcon"; +import SlideOver from "@/CAREUI/interactive/SlideOver"; + +import ButtonV2 from "@/components/Common/ButtonV2"; import Loading from "@/components/Common/Loading"; +import Page from "@/components/Common/Page"; +import Pagination from "@/components/Common/Pagination"; +import UserDetails from "@/components/Common/UserDetails"; +import LinkFacilityDialog from "@/components/Users/LinkFacilityDialog"; +import { UserFacilities } from "@/components/Users/ManageUsers"; +import UserDeleteDialog from "@/components/Users/UserDeleteDialog"; + +import { RESULTS_PER_PAGE_LIMIT } from "@/common/constants"; + +import * as Notification from "@/Utils/Notifications"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import useQuery from "@/Utils/request/useQuery"; +import { formatName, isUserOnline, relativeTime } from "@/Utils/utils"; + export default function FacilityUsers(props: any) { const { t } = useTranslation(); const { facilityId } = props; diff --git a/src/components/Facility/InventoryList.tsx b/src/components/Facility/InventoryList.tsx index 3aeb3af4ea5..ef077a287d7 100644 --- a/src/components/Facility/InventoryList.tsx +++ b/src/components/Facility/InventoryList.tsx @@ -1,13 +1,16 @@ -import { useState } from "react"; import { navigate } from "raviger"; -import Pagination from "@/components/Common/Pagination"; -import { classNames } from "../../Utils/utils"; -import Page from "@/components/Common/components/Page"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import { NonReadOnlyUsers } from "../../Utils/AuthorizeFor"; -import useQuery from "../../Utils/request/useQuery"; -import routes from "../../Redux/api"; +import { useState } from "react"; + +import ButtonV2 from "@/components/Common/ButtonV2"; import Loading from "@/components/Common/Loading"; +import Page from "@/components/Common/Page"; +import Pagination from "@/components/Common/Pagination"; + +import { NonReadOnlyUsers } from "@/Utils/AuthorizeFor"; +import routes from "@/Utils/request/api"; +import useQuery from "@/Utils/request/useQuery"; +import { classNames } from "@/Utils/utils"; + export default function InventoryList(props: any) { const { facilityId }: any = props; let inventoryItem: any = null; diff --git a/src/components/Facility/InventoryLog.tsx b/src/components/Facility/InventoryLog.tsx index a1bd8e3ce81..abd8532d953 100644 --- a/src/components/Facility/InventoryLog.tsx +++ b/src/components/Facility/InventoryLog.tsx @@ -1,16 +1,18 @@ import { useState } from "react"; -import * as Notification from "../../Utils/Notifications"; -import Pagination from "@/components/Common/Pagination"; -import { formatDateTime } from "../../Utils/utils"; -import Page from "@/components/Common/components/Page"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import useQuery from "../../Utils/request/useQuery"; -import routes from "../../Redux/api"; -import request from "../../Utils/request/request"; +import CareIcon from "@/CAREUI/icons/CareIcon"; +import ButtonV2 from "@/components/Common/ButtonV2"; import Loading from "@/components/Common/Loading"; +import Page from "@/components/Common/Page"; +import Pagination from "@/components/Common/Pagination"; + +import * as Notification from "@/Utils/Notifications"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import useQuery from "@/Utils/request/useQuery"; +import { formatDateTime } from "@/Utils/utils"; + export default function InventoryLog(props: any) { const { facilityId, inventoryId }: any = props; const [saving, setSaving] = useState(false); diff --git a/src/components/Facility/Investigations/InvestigationSuggestions.tsx b/src/components/Facility/Investigations/InvestigationSuggestions.tsx index e574f17ffe3..3ad3ea72675 100644 --- a/src/components/Facility/Investigations/InvestigationSuggestions.tsx +++ b/src/components/Facility/Investigations/InvestigationSuggestions.tsx @@ -1,11 +1,14 @@ import { useTranslation } from "react-i18next"; -import CareIcon from "../../../CAREUI/icons/CareIcon"; -import routes from "../../../Redux/api"; -import dayjs from "../../../Utils/dayjs"; -import useQuery from "../../../Utils/request/useQuery"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import ButtonV2 from "@/components/Common/ButtonV2"; import Loading from "@/components/Common/Loading"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import { InvestigationResponse } from "./Reports/types"; +import { InvestigationResponse } from "@/components/Facility/Investigations/Reports/types"; + +import dayjs from "@/Utils/dayjs"; +import routes from "@/Utils/request/api"; +import useQuery from "@/Utils/request/useQuery"; export default function ViewInvestigationSuggestions(props: { consultationId: string; diff --git a/src/components/Facility/Investigations/InvestigationTable.tsx b/src/components/Facility/Investigations/InvestigationTable.tsx index 09a29eb992a..5b3041fed6c 100644 --- a/src/components/Facility/Investigations/InvestigationTable.tsx +++ b/src/components/Facility/Investigations/InvestigationTable.tsx @@ -1,11 +1,14 @@ -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import CareIcon from "../../../CAREUI/icons/CareIcon"; -import { SelectFormField } from "../../Form/FormFields/SelectFormField"; -import TextFormField from "../../Form/FormFields/TextFormField"; -import { classNames } from "../../../Utils/utils"; +import { navigate } from "raviger"; import { useState } from "react"; import { useTranslation } from "react-i18next"; -import { navigate } from "raviger"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import ButtonV2 from "@/components/Common/ButtonV2"; +import { SelectFormField } from "@/components/Form/FormFields/SelectFormField"; +import TextFormField from "@/components/Form/FormFields/TextFormField"; + +import { classNames } from "@/Utils/utils"; const TestRow = ({ data, i, onChange, showForm, value, isChanged }: any) => { const { t } = useTranslation(); diff --git a/src/components/Facility/Investigations/InvestigationsPrintPreview.tsx b/src/components/Facility/Investigations/InvestigationsPrintPreview.tsx index 56f6f4a14e5..3c37cd42801 100644 --- a/src/components/Facility/Investigations/InvestigationsPrintPreview.tsx +++ b/src/components/Facility/Investigations/InvestigationsPrintPreview.tsx @@ -1,11 +1,15 @@ +import careConfig from "@careConfig"; import { lazy } from "react"; -import routes from "../../../Redux/api"; -import useQuery from "../../../Utils/request/useQuery"; -import PrintPreview from "../../../CAREUI/misc/PrintPreview"; import { useTranslation } from "react-i18next"; + +import PrintPreview from "@/CAREUI/misc/PrintPreview"; + +import { Investigation } from "@/components/Facility/Investigations/Reports/types"; + +import routes from "@/Utils/request/api"; +import useQuery from "@/Utils/request/useQuery"; + const Loading = lazy(() => import("@/components/Common/Loading")); -import { Investigation } from "./Reports/types"; -import careConfig from "@careConfig"; const InvestigationEntry = ({ investigation, diff --git a/src/components/Facility/Investigations/Reports/ReportTable.tsx b/src/components/Facility/Investigations/Reports/ReportTable.tsx index aedbbc8da51..bca22c8cb69 100644 --- a/src/components/Facility/Investigations/Reports/ReportTable.tsx +++ b/src/components/Facility/Investigations/Reports/ReportTable.tsx @@ -1,10 +1,15 @@ -import { getColorIndex, rowColor, transformData } from "./utils"; - -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import { InvestigationResponse } from "./types"; -import { formatDateTime } from "../../../../Utils/utils"; import { FC } from "react"; +import ButtonV2 from "@/components/Common/ButtonV2"; +import { InvestigationResponse } from "@/components/Facility/Investigations/Reports/types"; +import { + getColorIndex, + rowColor, + transformData, +} from "@/components/Facility/Investigations/Reports/utils"; + +import { formatDateTime } from "@/Utils/utils"; + const ReportRow = ({ data, name, min, max }: any) => { return ( diff --git a/src/components/Facility/Investigations/Reports/index.tsx b/src/components/Facility/Investigations/Reports/index.tsx index 246d50f94bd..15273294325 100644 --- a/src/components/Facility/Investigations/Reports/index.tsx +++ b/src/components/Facility/Investigations/Reports/index.tsx @@ -1,22 +1,29 @@ -import { useCallback, useReducer, useState } from "react"; -import { InvestigationGroup, InvestigationType } from ".."; - import { chain } from "lodash-es"; +import { useCallback, useReducer, useState } from "react"; import { useTranslation } from "react-i18next"; -import routes from "../../../../Redux/api"; -import * as Notification from "../../../../Utils/Notifications"; -import request from "../../../../Utils/request/request"; -import { PaginatedResponse } from "../../../../Utils/request/types"; -import useQuery from "../../../../Utils/request/useQuery"; + +import ButtonV2 from "@/components/Common/ButtonV2"; +import CircularProgress from "@/components/Common/CircularProgress"; import Loading from "@/components/Common/Loading"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import CircularProgress from "@/components/Common/components/CircularProgress"; -import Page from "@/components/Common/components/Page"; -import AutocompleteMultiSelectFormField from "../../../Form/FormFields/AutocompleteMultiselect"; -import { FieldChangeEvent } from "../../../Form/FormFields/Utils"; -import ReportTable from "./ReportTable"; -import { Investigation, InvestigationResponse } from "./types"; -import { formatPatientAge } from "../../../../Utils/utils"; +import Page from "@/components/Common/Page"; +import { + InvestigationGroup, + InvestigationType, +} from "@/components/Facility/Investigations"; +import ReportTable from "@/components/Facility/Investigations/Reports/ReportTable"; +import { + Investigation, + InvestigationResponse, +} from "@/components/Facility/Investigations/Reports/types"; +import AutocompleteMultiSelectFormField from "@/components/Form/FormFields/AutocompleteMultiselect"; +import { FieldChangeEvent } from "@/components/Form/FormFields/Utils"; + +import * as Notification from "@/Utils/Notifications"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import { PaginatedResponse } from "@/Utils/request/types"; +import useQuery from "@/Utils/request/useQuery"; +import { formatPatientAge } from "@/Utils/utils"; const RESULT_PER_PAGE = 14; interface InitialState { diff --git a/src/components/Facility/Investigations/Reports/types.ts b/src/components/Facility/Investigations/Reports/types.ts index 7bb88428896..5519854f643 100644 --- a/src/components/Facility/Investigations/Reports/types.ts +++ b/src/components/Facility/Investigations/Reports/types.ts @@ -1,5 +1,5 @@ -import { InvestigationValueType } from ".."; -import { ConsultationModel } from "../../models"; +import { InvestigationValueType } from "@/components/Facility/Investigations"; +import { ConsultationModel } from "@/components/Facility/models"; export interface Investigation { id: string; diff --git a/src/components/Facility/Investigations/Reports/utils.tsx b/src/components/Facility/Investigations/Reports/utils.tsx index eed1afc571e..d6f5966d637 100644 --- a/src/components/Facility/Investigations/Reports/utils.tsx +++ b/src/components/Facility/Investigations/Reports/utils.tsx @@ -1,5 +1,6 @@ -import { memoize, chain, findIndex } from "lodash-es"; -import { InvestigationResponse } from "./types"; +import { chain, findIndex, memoize } from "lodash-es"; + +import { InvestigationResponse } from "@/components/Facility/Investigations/Reports/types"; export const transformData = memoize((data: InvestigationResponse) => { const sessions = chain(data) diff --git a/src/components/Facility/Investigations/ShowInvestigation.tsx b/src/components/Facility/Investigations/ShowInvestigation.tsx index 00fe2c33549..84d3f733c4b 100644 --- a/src/components/Facility/Investigations/ShowInvestigation.tsx +++ b/src/components/Facility/Investigations/ShowInvestigation.tsx @@ -1,13 +1,16 @@ -import { set, chain } from "lodash-es"; +import { chain, set } from "lodash-es"; import { useCallback, useReducer } from "react"; -import routes from "../../../Redux/api"; -import * as Notification from "../../../Utils/Notifications"; -import request from "../../../Utils/request/request"; -import useQuery from "../../../Utils/request/useQuery"; -import InvestigationTable from "./InvestigationTable"; import { useTranslation } from "react-i18next"; -import Page from "@/components/Common/components/Page"; + import Loading from "@/components/Common/Loading"; +import Page from "@/components/Common/Page"; +import InvestigationTable from "@/components/Facility/Investigations/InvestigationTable"; + +import * as Notification from "@/Utils/Notifications"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import useQuery from "@/Utils/request/useQuery"; + const initialState = { changedFields: {}, initialValues: {}, diff --git a/src/components/Facility/Investigations/Table.tsx b/src/components/Facility/Investigations/Table.tsx index e2a1a9395fc..3a267279eb7 100644 --- a/src/components/Facility/Investigations/Table.tsx +++ b/src/components/Facility/Investigations/Table.tsx @@ -1,9 +1,10 @@ -import { FieldChangeEvent } from "../../Form/FormFields/Utils"; -import { SelectFormField } from "../../Form/FormFields/SelectFormField"; -import TextFormField from "../../Form/FormFields/TextFormField"; import { set } from "lodash-es"; import { useState } from "react"; +import { SelectFormField } from "@/components/Form/FormFields/SelectFormField"; +import TextFormField from "@/components/Form/FormFields/TextFormField"; +import { FieldChangeEvent } from "@/components/Form/FormFields/Utils"; + const TestRow = ({ data, value, onChange, i }: any) => { return ( diff --git a/src/components/Facility/Investigations/ViewInvestigations.tsx b/src/components/Facility/Investigations/ViewInvestigations.tsx index 1798664949e..162fd6d87e0 100644 --- a/src/components/Facility/Investigations/ViewInvestigations.tsx +++ b/src/components/Facility/Investigations/ViewInvestigations.tsx @@ -1,14 +1,16 @@ import { navigate } from "raviger"; -import ReportTable from "./Reports/ReportTable"; - import { useTranslation } from "react-i18next"; -import { formatDateTime } from "../../../Utils/utils"; -import { InvestigationResponse } from "./Reports/types"; -import { InvestigationSessionType } from "./investigationsTab"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import CareIcon from "../../../CAREUI/icons/CareIcon"; +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import ButtonV2 from "@/components/Common/ButtonV2"; import Loading from "@/components/Common/Loading"; +import ReportTable from "@/components/Facility/Investigations/Reports/ReportTable"; +import { InvestigationResponse } from "@/components/Facility/Investigations/Reports/types"; +import { InvestigationSessionType } from "@/components/Facility/Investigations/investigationsTab"; + +import { formatDateTime } from "@/Utils/utils"; + export default function ViewInvestigations(props: { isLoading: boolean; investigations: InvestigationResponse; diff --git a/src/components/Facility/Investigations/index.tsx b/src/components/Facility/Investigations/index.tsx index 386f6f45db4..41266e5b848 100644 --- a/src/components/Facility/Investigations/index.tsx +++ b/src/components/Facility/Investigations/index.tsx @@ -1,18 +1,20 @@ import { navigate, useQueryParams } from "raviger"; import { useEffect, useReducer, useState } from "react"; -import * as Notification from "../../../Utils/Notifications"; -import { TestTable } from "./Table"; - import { useTranslation } from "react-i18next"; -import Card from "../../../CAREUI/display/Card"; -import routes from "../../../Redux/api"; -import request from "../../../Utils/request/request"; -import useQuery from "../../../Utils/request/useQuery"; -import { Submit } from "@/components/Common/components/ButtonV2"; -import Page from "@/components/Common/components/Page"; -import AutocompleteMultiSelectFormField from "../../Form/FormFields/AutocompleteMultiselect"; +import Card from "@/CAREUI/display/Card"; + +import { Submit } from "@/components/Common/ButtonV2"; import Loading from "@/components/Common/Loading"; +import Page from "@/components/Common/Page"; +import { TestTable } from "@/components/Facility/Investigations/Table"; +import AutocompleteMultiSelectFormField from "@/components/Form/FormFields/AutocompleteMultiselect"; + +import * as Notification from "@/Utils/Notifications"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import useQuery from "@/Utils/request/useQuery"; + const initialState = { form: {}, }; diff --git a/src/components/Facility/Investigations/investigationsTab.tsx b/src/components/Facility/Investigations/investigationsTab.tsx index c4e5863686d..d6abba46f55 100644 --- a/src/components/Facility/Investigations/investigationsTab.tsx +++ b/src/components/Facility/Investigations/investigationsTab.tsx @@ -1,8 +1,9 @@ -import routes from "../../../Redux/api"; -import useQuery from "../../../Utils/request/useQuery"; -import { PatientModel } from "../../Patient/models"; -import ViewInvestigationSuggestions from "./InvestigationSuggestions"; -import ViewInvestigations from "./ViewInvestigations"; +import ViewInvestigationSuggestions from "@/components/Facility/Investigations/InvestigationSuggestions"; +import ViewInvestigations from "@/components/Facility/Investigations/ViewInvestigations"; +import { PatientModel } from "@/components/Patient/models"; + +import routes from "@/Utils/request/api"; +import useQuery from "@/Utils/request/useQuery"; export interface InvestigationSessionType { session_external_id: string; diff --git a/src/components/Facility/LocationManagement.tsx b/src/components/Facility/LocationManagement.tsx index 6933a760969..12e70d1fa14 100644 --- a/src/components/Facility/LocationManagement.tsx +++ b/src/components/Facility/LocationManagement.tsx @@ -1,20 +1,24 @@ import { useState } from "react"; -import ButtonV2, { Cancel } from "@/components/Common/components/ButtonV2"; -import AuthorizeFor, { NonReadOnlyUsers } from "../../Utils/AuthorizeFor"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import Page from "@/components/Common/components/Page"; -import routes from "../../Redux/api"; -import PaginatedList from "../../CAREUI/misc/PaginatedList"; -import { LocationModel } from "./models"; -import RecordMeta from "../../CAREUI/display/RecordMeta"; -import request from "../../Utils/request/request"; -import * as Notification from "../../Utils/Notifications"; + +import RecordMeta from "@/CAREUI/display/RecordMeta"; +import CareIcon from "@/CAREUI/icons/CareIcon"; +import PaginatedList from "@/CAREUI/misc/PaginatedList"; + +import ButtonV2, { Cancel } from "@/components/Common/ButtonV2"; import ConfirmDialog from "@/components/Common/ConfirmDialog"; import DialogModal from "@/components/Common/Dialog"; -import Uptime from "@/components/Common/Uptime"; -import useAuthUser from "@/common/hooks/useAuthUser"; -import useQuery from "../../Utils/request/useQuery"; import Loading from "@/components/Common/Loading"; +import Page from "@/components/Common/Page"; +import Uptime from "@/components/Common/Uptime"; +import { LocationModel } from "@/components/Facility/models"; + +import useAuthUser from "@/hooks/useAuthUser"; + +import AuthorizeFor, { NonReadOnlyUsers } from "@/Utils/AuthorizeFor"; +import * as Notification from "@/Utils/Notifications"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import useQuery from "@/Utils/request/useQuery"; interface Props { facilityId: string; diff --git a/src/components/Facility/MinQuantityList.tsx b/src/components/Facility/MinQuantityList.tsx index 5486cb0abab..32ec4a9f8c1 100644 --- a/src/components/Facility/MinQuantityList.tsx +++ b/src/components/Facility/MinQuantityList.tsx @@ -1,12 +1,15 @@ import { useState } from "react"; -import Pagination from "@/components/Common/Pagination"; -import { MinQuantityRequiredModal } from "./MinQuantityRequiredModal"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import { NonReadOnlyUsers } from "../../Utils/AuthorizeFor"; -import Page from "@/components/Common/components/Page"; -import useQuery from "../../Utils/request/useQuery"; -import routes from "../../Redux/api"; + +import ButtonV2 from "@/components/Common/ButtonV2"; import Loading from "@/components/Common/Loading"; +import Page from "@/components/Common/Page"; +import Pagination from "@/components/Common/Pagination"; +import { MinQuantityRequiredModal } from "@/components/Facility/MinQuantityRequiredModal"; + +import { NonReadOnlyUsers } from "@/Utils/AuthorizeFor"; +import routes from "@/Utils/request/api"; +import useQuery from "@/Utils/request/useQuery"; + export default function MinQuantityList(props: any) { const { facilityId }: any = props; let inventoryItem: any = null; diff --git a/src/components/Facility/MinQuantityRequiredModal.tsx b/src/components/Facility/MinQuantityRequiredModal.tsx index 0663ccfa3bf..8fc3f7abd47 100644 --- a/src/components/Facility/MinQuantityRequiredModal.tsx +++ b/src/components/Facility/MinQuantityRequiredModal.tsx @@ -1,11 +1,13 @@ import { useReducer, useState } from "react"; -import * as Notification from "../../Utils/Notifications"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; + +import ButtonV2 from "@/components/Common/ButtonV2"; import DialogModal from "@/components/Common/Dialog"; -import TextFormField from "../Form/FormFields/TextFormField"; -import useQuery from "../../Utils/request/useQuery"; -import routes from "../../Redux/api"; -import request from "../../Utils/request/request"; +import TextFormField from "@/components/Form/FormFields/TextFormField"; + +import * as Notification from "@/Utils/Notifications"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import useQuery from "@/Utils/request/useQuery"; const initForm = { id: "", diff --git a/src/components/Facility/PatientConsultationNotesList.tsx b/src/components/Facility/PatientConsultationNotesList.tsx index 99069927660..243821b7d6d 100644 --- a/src/components/Facility/PatientConsultationNotesList.tsx +++ b/src/components/Facility/PatientConsultationNotesList.tsx @@ -1,11 +1,18 @@ import { Dispatch, SetStateAction, useEffect, useState } from "react"; + +import CircularProgress from "@/components/Common/CircularProgress"; +import DoctorNote from "@/components/Facility/DoctorNote"; +import { + PatientNoteStateType, + PatientNotesModel, +} from "@/components/Facility/models"; + +import useSlug from "@/hooks/useSlug"; + import { RESULTS_PER_PAGE_LIMIT } from "@/common/constants"; -import CircularProgress from "@/components/Common/components/CircularProgress"; -import routes from "../../Redux/api"; -import { PatientNoteStateType, PatientNotesModel } from "./models"; -import useSlug from "@/common/hooks/useSlug"; -import DoctorNote from "./DoctorNote"; -import request from "../../Utils/request/request"; + +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; interface PatientNotesProps { state: PatientNoteStateType; diff --git a/src/components/Facility/PatientNoteCard.tsx b/src/components/Facility/PatientNoteCard.tsx index 26d16edcea3..7896cbada4d 100644 --- a/src/components/Facility/PatientNoteCard.tsx +++ b/src/components/Facility/PatientNoteCard.tsx @@ -1,23 +1,31 @@ -import { - relativeDate, - formatDateTime, - classNames, - formatName, -} from "../../Utils/utils"; -import { USER_TYPES_MAP } from "@/common/constants"; -import { PatientNotesEditModel, PatientNotesModel } from "./models"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import CareIcon from "../../CAREUI/icons/CareIcon"; +import dayjs from "dayjs"; +import { t } from "i18next"; import { useState } from "react"; -import { Error, Success } from "../../Utils/Notifications"; -import request from "../../Utils/request/request"; -import routes from "../../Redux/api"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import ButtonV2 from "@/components/Common/ButtonV2"; import DialogModal from "@/components/Common/Dialog"; -import { t } from "i18next"; -import dayjs from "dayjs"; import Spinner from "@/components/Common/Spinner"; -import useAuthUser from "@/common/hooks/useAuthUser"; -import useSlug from "@/common/hooks/useSlug"; +import { + PatientNotesEditModel, + PatientNotesModel, +} from "@/components/Facility/models"; + +import useAuthUser from "@/hooks/useAuthUser"; +import useSlug from "@/hooks/useSlug"; + +import { USER_TYPES_MAP } from "@/common/constants"; + +import { Error, Success } from "@/Utils/Notifications"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import { + classNames, + formatDateTime, + formatName, + relativeDate, +} from "@/Utils/utils"; const PatientNoteCard = ({ note, diff --git a/src/components/Facility/PatientNotesList.tsx b/src/components/Facility/PatientNotesList.tsx index 77100fe7e3d..dcf84e8b708 100644 --- a/src/components/Facility/PatientNotesList.tsx +++ b/src/components/Facility/PatientNotesList.tsx @@ -1,10 +1,16 @@ -import { useState, useEffect } from "react"; +import { useEffect, useState } from "react"; + +import CircularProgress from "@/components/Common/CircularProgress"; +import DoctorNote from "@/components/Facility/DoctorNote"; +import { + PatientNoteStateType, + PatientNotesModel, +} from "@/components/Facility/models"; + import { RESULTS_PER_PAGE_LIMIT } from "@/common/constants"; -import CircularProgress from "@/components/Common/components/CircularProgress"; -import DoctorNote from "./DoctorNote"; -import { PatientNoteStateType, PatientNotesModel } from "./models"; -import routes from "../../Redux/api"; -import request from "../../Utils/request/request"; + +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; interface PatientNotesProps { state: PatientNoteStateType; diff --git a/src/components/Facility/PatientNotesSlideover.tsx b/src/components/Facility/PatientNotesSlideover.tsx index 779782b2dc7..05deef36b91 100644 --- a/src/components/Facility/PatientNotesSlideover.tsx +++ b/src/components/Facility/PatientNotesSlideover.tsx @@ -1,22 +1,30 @@ -import { useState, useEffect, Dispatch, SetStateAction } from "react"; -import * as Notification from "../../Utils/Notifications"; -import { NonReadOnlyUsers } from "../../Utils/AuthorizeFor"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import { classNames, isAppleDevice, keysOf } from "../../Utils/utils"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import { useMessageListener } from "@/common/hooks/useMessageListener"; -import PatientConsultationNotesList from "./PatientConsultationNotesList"; -import request from "../../Utils/request/request"; -import routes from "../../Redux/api"; -import { PatientNoteStateType, PaitentNotesReplyModel } from "./models"; +import { t } from "i18next"; +import { Link } from "raviger"; +import { Dispatch, SetStateAction, useEffect, useState } from "react"; import useKeyboardShortcut from "use-keyboard-shortcut"; -import AutoExpandingTextInputFormField from "../Form/FormFields/AutoExpandingTextInputFormField"; -import useAuthUser from "@/common/hooks/useAuthUser"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import ButtonV2 from "@/components/Common/ButtonV2"; +import DoctorNoteReplyPreviewCard from "@/components/Facility/DoctorNoteReplyPreviewCard"; +import PatientConsultationNotesList from "@/components/Facility/PatientConsultationNotesList"; +import { + PaitentNotesReplyModel, + PatientNoteStateType, +} from "@/components/Facility/models"; +import AutoExpandingTextInputFormField from "@/components/Form/FormFields/AutoExpandingTextInputFormField"; + +import useAuthUser from "@/hooks/useAuthUser"; +import { useMessageListener } from "@/hooks/useMessageListener"; +import useNotificationSubscriptionState from "@/hooks/useNotificationSubscriptionState"; + import { PATIENT_NOTES_THREADS } from "@/common/constants"; -import DoctorNoteReplyPreviewCard from "./DoctorNoteReplyPreviewCard"; -import useNotificationSubscriptionState from "@/common/hooks/useNotificationSubscriptionState"; -import { Link } from "raviger"; -import { t } from "i18next"; + +import { NonReadOnlyUsers } from "@/Utils/AuthorizeFor"; +import * as Notification from "@/Utils/Notifications"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import { classNames, isAppleDevice, keysOf } from "@/Utils/utils"; interface PatientNotesProps { patientId: string; diff --git a/src/components/Facility/SetInventoryForm.tsx b/src/components/Facility/SetInventoryForm.tsx index ef354331c3b..9c401eab0bd 100644 --- a/src/components/Facility/SetInventoryForm.tsx +++ b/src/components/Facility/SetInventoryForm.tsx @@ -1,16 +1,20 @@ -import { useReducer, useState, useEffect } from "react"; -import * as Notification from "../../Utils/Notifications"; -import { InventoryItemsModel } from "./models"; -import { Cancel, Submit } from "@/components/Common/components/ButtonV2"; -import useAppHistory from "@/common/hooks/useAppHistory"; -import Page from "@/components/Common/components/Page"; -import Card from "../../CAREUI/display/Card"; -import { FieldChangeEvent } from "../Form/FormFields/Utils"; -import { SelectFormField } from "../Form/FormFields/SelectFormField"; -import TextFormField from "../Form/FormFields/TextFormField"; -import useQuery from "../../Utils/request/useQuery"; -import routes from "../../Redux/api"; -import request from "../../Utils/request/request"; +import { useEffect, useReducer, useState } from "react"; + +import Card from "@/CAREUI/display/Card"; + +import { Cancel, Submit } from "@/components/Common/ButtonV2"; +import Page from "@/components/Common/Page"; +import { InventoryItemsModel } from "@/components/Facility/models"; +import { SelectFormField } from "@/components/Form/FormFields/SelectFormField"; +import TextFormField from "@/components/Form/FormFields/TextFormField"; +import { FieldChangeEvent } from "@/components/Form/FormFields/Utils"; + +import useAppHistory from "@/hooks/useAppHistory"; + +import * as Notification from "@/Utils/Notifications"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import useQuery from "@/Utils/request/useQuery"; const initForm = { id: "", diff --git a/src/components/Facility/SpokeFacilityEditor.tsx b/src/components/Facility/SpokeFacilityEditor.tsx index bf07ec4e9bb..124e31a375a 100644 --- a/src/components/Facility/SpokeFacilityEditor.tsx +++ b/src/components/Facility/SpokeFacilityEditor.tsx @@ -1,20 +1,23 @@ -import routes from "../../Redux/api"; -import request from "../../Utils/request/request"; -import useQuery from "../../Utils/request/useQuery"; -import { SelectFormField } from "../Form/FormFields/SelectFormField"; +import { useEffect, useState } from "react"; +import { useTranslation } from "react-i18next"; + +import { FacilitySelect } from "@/components/Common/FacilitySelect"; +import FacilityBlock from "@/components/Facility/FacilityBlock"; import { FacilityModel, FacilitySpokeErrors, FacilitySpokeModel, FacilitySpokeRequest, SpokeRelationship, -} from "./models"; -import ModelCrudEditor from "../Form/ModelCrudEditor"; -import { FacilitySelect } from "@/components/Common/FacilitySelect"; -import { useEffect, useState } from "react"; +} from "@/components/Facility/models"; +import { SelectFormField } from "@/components/Form/FormFields/SelectFormField"; +import ModelCrudEditor from "@/components/Form/ModelCrudEditor"; + import { SPOKE_RELATION_TYPES } from "@/common/constants"; -import FacilityBlock from "./FacilityBlock"; -import { useTranslation } from "react-i18next"; + +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import useQuery from "@/Utils/request/useQuery"; export interface SpokeFacilityEditorProps { facility: Omit & { id: string }; diff --git a/src/components/Facility/StaffCapacity.tsx b/src/components/Facility/StaffCapacity.tsx index b75227886ba..d5b4c4b0e20 100644 --- a/src/components/Facility/StaffCapacity.tsx +++ b/src/components/Facility/StaffCapacity.tsx @@ -1,15 +1,18 @@ import { useReducer, useState } from "react"; +import { useTranslation } from "react-i18next"; + import { DOCTOR_SPECIALIZATION } from "@/common/constants"; + +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import useQuery from "@/Utils/request/useQuery"; + import * as Notification from "../../Utils/Notifications"; -import SelectMenuV2 from "../Form/SelectMenuV2"; -import TextFormField from "../Form/FormFields/TextFormField"; -import { useTranslation } from "react-i18next"; import Form from "../Form/Form"; -import { DoctorModal } from "./models"; -import useQuery from "../../Utils/request/useQuery"; -import routes from "../../Redux/api"; -import request from "../../Utils/request/request"; import { FieldErrorText, FieldLabel } from "../Form/FormFields/FormField"; +import TextFormField from "../Form/FormFields/TextFormField"; +import SelectMenuV2 from "../Form/SelectMenuV2"; +import { DoctorModal } from "./models"; interface DoctorCapacityProps extends DoctorModal { facilityId: string; diff --git a/src/components/Facility/StaffCountCard.tsx b/src/components/Facility/StaffCountCard.tsx index d45ad979a9e..0c0984172b1 100644 --- a/src/components/Facility/StaffCountCard.tsx +++ b/src/components/Facility/StaffCountCard.tsx @@ -1,15 +1,18 @@ import { useState } from "react"; -import { DoctorModal } from "./models"; -import { DOCTOR_SPECIALIZATION } from "@/common/constants"; -import * as Notification from "../../Utils/Notifications"; -import { DoctorIcon } from "../TeleIcu/Icons/DoctorIcon"; -import { StaffCapacity } from "./StaffCapacity"; -import DialogModal from "@/components/Common/Dialog"; + +import ButtonV2 from "@/components/Common/ButtonV2"; import ConfirmDialog from "@/components/Common/ConfirmDialog"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import { NonReadOnlyUsers } from "../../Utils/AuthorizeFor"; -import request from "../../Utils/request/request"; -import routes from "../../Redux/api"; +import DialogModal from "@/components/Common/Dialog"; +import { StaffCapacity } from "@/components/Facility/StaffCapacity"; +import { DoctorModal } from "@/components/Facility/models"; +import { DoctorIcon } from "@/components/TeleIcu/Icons/DoctorIcon"; + +import { DOCTOR_SPECIALIZATION } from "@/common/constants"; + +import { NonReadOnlyUsers } from "@/Utils/AuthorizeFor"; +import * as Notification from "@/Utils/Notifications"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; interface DoctorsCountProps extends DoctorModal { facilityId: string; diff --git a/src/components/Facility/TransferPatientDialog.tsx b/src/components/Facility/TransferPatientDialog.tsx index f6e3dec5a42..530bc513f0d 100644 --- a/src/components/Facility/TransferPatientDialog.tsx +++ b/src/components/Facility/TransferPatientDialog.tsx @@ -1,16 +1,19 @@ -import * as Notification from "../../Utils/Notifications"; -import { Cancel, Submit } from "@/components/Common/components/ButtonV2"; -import { useReducer, useState } from "react"; -import { DupPatientModel } from "./models"; -import { OptionsType } from "@/common/constants"; -import { SelectFormField } from "../Form/FormFields/SelectFormField"; import { navigate } from "raviger"; -import request from "../../Utils/request/request"; -import routes from "../../Redux/api"; -import TextFormField from "../Form/FormFields/TextFormField"; -import { FieldChangeEvent } from "../Form/FormFields/Utils"; +import { useReducer, useState } from "react"; import { useTranslation } from "react-i18next"; +import { Cancel, Submit } from "@/components/Common/ButtonV2"; +import { DupPatientModel } from "@/components/Facility/models"; +import { SelectFormField } from "@/components/Form/FormFields/SelectFormField"; +import TextFormField from "@/components/Form/FormFields/TextFormField"; +import { FieldChangeEvent } from "@/components/Form/FormFields/Utils"; + +import { OptionsType } from "@/common/constants"; + +import * as Notification from "@/Utils/Notifications"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; + interface Props { patientList: Array; handleOk: () => void; diff --git a/src/components/Facility/TreatmentSummary.tsx b/src/components/Facility/TreatmentSummary.tsx index ba40dbeb5ae..904534123c5 100644 --- a/src/components/Facility/TreatmentSummary.tsx +++ b/src/components/Facility/TreatmentSummary.tsx @@ -1,23 +1,23 @@ -import { GENDER_TYPES } from "@/common/constants"; -import { - formatDate, - formatDateTime, - formatPatientAge, -} from "../../Utils/utils"; -import routes from "../../Redux/api"; -import useQuery from "../../Utils/request/useQuery"; -import { ConsultationModel } from "./models"; +import careConfig from "@careConfig"; import { useMemo } from "react"; +import { useTranslation } from "react-i18next"; + +import PrintPreview from "@/CAREUI/misc/PrintPreview"; + +import PageHeadTitle from "@/components/Common/PageHeadTitle"; import { ActiveConditionVerificationStatuses, ConsultationDiagnosis, -} from "../Diagnosis/types"; -import PageHeadTitle from "@/components/Common/PageHeadTitle"; -import { useTranslation } from "react-i18next"; -import { PatientModel } from "../Patient/models"; -import MedicineRoutes from "../Medicine/routes"; -import PrintPreview from "../../CAREUI/misc/PrintPreview"; -import careConfig from "@careConfig"; +} from "@/components/Diagnosis/types"; +import { ConsultationModel } from "@/components/Facility/models"; +import MedicineRoutes from "@/components/Medicine/routes"; +import { PatientModel } from "@/components/Patient/models"; + +import { GENDER_TYPES } from "@/common/constants"; + +import routes from "@/Utils/request/api"; +import useQuery from "@/Utils/request/useQuery"; +import { formatDate, formatDateTime, formatPatientAge } from "@/Utils/utils"; export interface ITreatmentSummaryProps { consultationId: string; diff --git a/src/components/Facility/TriageForm.tsx b/src/components/Facility/TriageForm.tsx index fe4499e3758..472b779170a 100644 --- a/src/components/Facility/TriageForm.tsx +++ b/src/components/Facility/TriageForm.tsx @@ -1,24 +1,27 @@ -import ConfirmDialog from "@/components/Common/ConfirmDialog"; -import Card from "../../CAREUI/display/Card"; - -import CareIcon from "../../CAREUI/icons/CareIcon"; -import { useReducer, useState } from "react"; -import * as Notification from "../../Utils/Notifications"; -import TextFormField from "../Form/FormFields/TextFormField"; -import { PatientStatsModel } from "./models"; -import { Cancel, Submit } from "@/components/Common/components/ButtonV2"; -import useAppHistory from "@/common/hooks/useAppHistory"; -import DateFormField from "../Form/FormFields/DateFormField"; -import { FieldChangeEvent } from "../Form/FormFields/Utils"; -import Loading from "@/components/Common/Loading"; -import Page from "@/components/Common/components/Page"; import dayjs from "dayjs"; -import { dateQueryString, scrollTo } from "../../Utils/utils"; -import useQuery from "../../Utils/request/useQuery"; -import routes from "../../Redux/api"; -import request from "../../Utils/request/request"; +import { useReducer, useState } from "react"; import { useTranslation } from "react-i18next"; +import Card from "@/CAREUI/display/Card"; +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import { Cancel, Submit } from "@/components/Common/ButtonV2"; +import ConfirmDialog from "@/components/Common/ConfirmDialog"; +import Loading from "@/components/Common/Loading"; +import Page from "@/components/Common/Page"; +import { PatientStatsModel } from "@/components/Facility/models"; +import DateFormField from "@/components/Form/FormFields/DateFormField"; +import TextFormField from "@/components/Form/FormFields/TextFormField"; +import { FieldChangeEvent } from "@/components/Form/FormFields/Utils"; + +import useAppHistory from "@/hooks/useAppHistory"; + +import * as Notification from "@/Utils/Notifications"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import useQuery from "@/Utils/request/useQuery"; +import { dateQueryString, scrollTo } from "@/Utils/utils"; + interface Props extends PatientStatsModel { facilityId: string; id?: string; diff --git a/src/components/Facility/models.tsx b/src/components/Facility/models.tsx index 84617e35ed7..79272ac3de7 100644 --- a/src/components/Facility/models.tsx +++ b/src/components/Facility/models.tsx @@ -1,4 +1,22 @@ -import { AssetData, AssetLocationType } from "../Assets/AssetTypes"; +import { AssetData, AssetLocationType } from "@/components/Assets/AssetTypes"; +import { RouteToFacility } from "@/components/Common/RouteToFacilitySelect"; +import { InvestigationType } from "@/components/Common/prescription-builder/InvestigationBuilder"; +import { ProcedureType } from "@/components/Common/prescription-builder/ProcedureBuilder"; +import { + ConsultationDiagnosis, + CreateDiagnosis, +} from "@/components/Diagnosis/types"; +import { + AssignedToObjectModel, + BloodPressure, + DailyRoundsModel, + FacilityNameModel, + FileUploadModel, + PatientModel, +} from "@/components/Patient/models"; +import { EncounterSymptom } from "@/components/Symptoms/types"; +import { UserBareMinimum } from "@/components/Users/models"; + import { CONSENT_PATIENT_CODE_STATUS_CHOICES, CONSENT_TYPE_CHOICES, @@ -8,21 +26,8 @@ import { SHIFTING_CHOICES_PEACETIME, UserRole, } from "@/common/constants"; -import { FeatureFlag } from "../../Utils/featureFlags"; -import { ConsultationDiagnosis, CreateDiagnosis } from "../Diagnosis/types"; -import { - AssignedToObjectModel, - BloodPressure, - DailyRoundsModel, - FacilityNameModel, - FileUploadModel, - PatientModel, -} from "../Patient/models"; -import { EncounterSymptom } from "../Symptoms/types"; -import { UserBareMinimum } from "../Users/models"; -import { InvestigationType } from "@/components/Common/prescription-builder/InvestigationBuilder"; -import { ProcedureType } from "@/components/Common/prescription-builder/ProcedureBuilder"; -import { RouteToFacility } from "@/components/Common/RouteToFacilitySelect"; + +import { FeatureFlag } from "@/Utils/featureFlags"; export interface LocalBodyModel { id: number; diff --git a/src/components/Files/AudioCaptureDialog.tsx b/src/components/Files/AudioCaptureDialog.tsx index f84fc01c28b..9a409e4724b 100644 --- a/src/components/Files/AudioCaptureDialog.tsx +++ b/src/components/Files/AudioCaptureDialog.tsx @@ -1,10 +1,13 @@ -import { useEffect, useState } from "react"; -import useRecorder from "../../Utils/useRecorder"; import { Link } from "raviger"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import { useTimer } from "../../Utils/useTimer"; +import { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; -import * as Notify from "../../Utils/Notifications"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import useRecorder from "@/hooks/useRecorder"; +import { useTimer } from "@/hooks/useTimer"; + +import * as Notify from "@/Utils/Notifications"; export interface AudioCaptureDialogProps { show: boolean; diff --git a/src/components/Files/CameraCaptureDialog.tsx b/src/components/Files/CameraCaptureDialog.tsx index 81981c9bf3a..91b158bcb44 100644 --- a/src/components/Files/CameraCaptureDialog.tsx +++ b/src/components/Files/CameraCaptureDialog.tsx @@ -1,11 +1,15 @@ -import Webcam from "react-webcam"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import DialogModal from "@/components/Common/Dialog"; -import ButtonV2, { Submit } from "@/components/Common/components/ButtonV2"; import { t } from "i18next"; import { useCallback, useEffect, useRef, useState } from "react"; -import useWindowDimensions from "@/common/hooks/useWindowDimensions"; -import * as Notify from "../../Utils/Notifications"; +import Webcam from "react-webcam"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import ButtonV2, { Submit } from "@/components/Common/ButtonV2"; +import DialogModal from "@/components/Common/Dialog"; + +import useWindowDimensions from "@/hooks/useWindowDimensions"; + +import * as Notify from "@/Utils/Notifications"; export interface CameraCaptureDialogProps { show: boolean; diff --git a/src/components/Files/FileBlock.tsx b/src/components/Files/FileBlock.tsx index 732ac0c0faf..794cdedd1d3 100644 --- a/src/components/Files/FileBlock.tsx +++ b/src/components/Files/FileBlock.tsx @@ -1,13 +1,18 @@ import dayjs from "dayjs"; -import CareIcon, { IconName } from "../../CAREUI/icons/CareIcon"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import { FileUploadModel } from "../Patient/models"; -import { FileManagerResult } from "../../Utils/useFileManager"; -import useQuery from "../../Utils/request/useQuery"; -import routes from "../../Redux/api"; -import { FILE_EXTENSIONS } from "@/common/constants"; import { t } from "i18next"; +import CareIcon, { IconName } from "@/CAREUI/icons/CareIcon"; + +import ButtonV2 from "@/components/Common/ButtonV2"; +import { FileUploadModel } from "@/components/Patient/models"; + +import { FileManagerResult } from "@/hooks/useFileManager"; + +import { FILE_EXTENSIONS } from "@/common/constants"; + +import routes from "@/Utils/request/api"; +import useQuery from "@/Utils/request/useQuery"; + export interface FileBlockProps { file: FileUploadModel; fileManager: FileManagerResult; diff --git a/src/components/Files/FileUpload.tsx b/src/components/Files/FileUpload.tsx index 30af4d1b0d8..d98df131863 100644 --- a/src/components/Files/FileUpload.tsx +++ b/src/components/Files/FileUpload.tsx @@ -1,20 +1,25 @@ -import { useState, ReactNode } from "react"; -import { FileUploadModel } from "../Patient/models"; +import { ReactNode, useState } from "react"; +import { useTranslation } from "react-i18next"; + +import CareIcon, { IconName } from "@/CAREUI/icons/CareIcon"; +import AuthorizedChild from "@/CAREUI/misc/AuthorizedChild"; + +import ButtonV2 from "@/components/Common/ButtonV2"; import Pagination from "@/components/Common/Pagination"; +import Tabs from "@/components/Common/Tabs"; +import FileBlock from "@/components/Files/FileBlock"; +import TextFormField from "@/components/Form/FormFields/TextFormField"; +import { FileUploadModel } from "@/components/Patient/models"; + +import useAuthUser from "@/hooks/useAuthUser"; +import useFileManager from "@/hooks/useFileManager"; +import useFileUpload from "@/hooks/useFileUpload"; + import { RESULTS_PER_PAGE_LIMIT } from "@/common/constants"; -import { useTranslation } from "react-i18next"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import CareIcon, { IconName } from "../../CAREUI/icons/CareIcon"; -import TextFormField from "../Form/FormFields/TextFormField"; -import { NonReadOnlyUsers } from "../../Utils/AuthorizeFor"; -import AuthorizedChild from "../../CAREUI/misc/AuthorizedChild"; -import useAuthUser from "@/common/hooks/useAuthUser"; -import useQuery from "../../Utils/request/useQuery"; -import routes from "../../Redux/api"; -import useFileUpload from "../../Utils/useFileUpload"; -import useFileManager from "../../Utils/useFileManager"; -import Tabs from "@/components/Common/components/Tabs"; -import FileBlock from "./FileBlock"; + +import { NonReadOnlyUsers } from "@/Utils/AuthorizeFor"; +import routes from "@/Utils/request/api"; +import useQuery from "@/Utils/request/useQuery"; export const LinearProgressWithLabel = (props: { value: number }) => { return ( diff --git a/src/components/Form/AutoCompleteAsync.tsx b/src/components/Form/AutoCompleteAsync.tsx index 839a74c880c..b0cb9208d73 100644 --- a/src/components/Form/AutoCompleteAsync.tsx +++ b/src/components/Form/AutoCompleteAsync.tsx @@ -5,17 +5,19 @@ import { ComboboxOption, ComboboxOptions, } from "@headlessui/react"; +import { debounce } from "lodash-es"; +import { useEffect, useMemo, useState } from "react"; +import { useTranslation } from "react-i18next"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import { DropdownTransition } from "@/components/Common/HelperComponents"; import { MultiSelectOptionChip, dropdownOptionClassNames, -} from "./MultiSelectMenuV2"; -import { useEffect, useMemo, useState } from "react"; +} from "@/components/Form/MultiSelectMenuV2"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import { DropdownTransition } from "@/components/Common/components/HelperComponents"; -import { classNames } from "../../Utils/utils"; -import { debounce } from "lodash-es"; -import { useTranslation } from "react-i18next"; +import { classNames } from "@/Utils/utils"; interface Props { id?: string; diff --git a/src/components/Form/Form.tsx b/src/components/Form/Form.tsx index 25484bdc473..88932d2a7ee 100644 --- a/src/components/Form/Form.tsx +++ b/src/components/Form/Form.tsx @@ -1,13 +1,23 @@ import { isEmpty, omitBy } from "lodash-es"; import { useEffect, useMemo, useState } from "react"; -import { classNames } from "../../Utils/utils"; -import { Cancel, Submit } from "@/components/Common/components/ButtonV2"; -import { FieldValidator } from "./FieldValidators"; -import { FormContextValue, createFormContext } from "./FormContext"; -import { FieldChangeEvent } from "./FormFields/Utils"; -import { FormDetails, FormErrors, FormState, formReducer } from "./Utils"; -import { DraftSection, useAutoSaveReducer } from "../../Utils/AutoSave"; -import * as Notification from "../../Utils/Notifications"; + +import { Cancel, Submit } from "@/components/Common/ButtonV2"; +import { FieldValidator } from "@/components/Form/FieldValidators"; +import { + FormContextValue, + createFormContext, +} from "@/components/Form/FormContext"; +import { FieldChangeEvent } from "@/components/Form/FormFields/Utils"; +import { + FormDetails, + FormErrors, + FormState, + formReducer, +} from "@/components/Form/Utils"; + +import { DraftSection, useAutoSaveReducer } from "@/Utils/AutoSave"; +import * as Notification from "@/Utils/Notifications"; +import { classNames } from "@/Utils/utils"; type Props = { className?: string; diff --git a/src/components/Form/FormContext.ts b/src/components/Form/FormContext.ts index 19d2b548e87..2be5c12234c 100644 --- a/src/components/Form/FormContext.ts +++ b/src/components/Form/FormContext.ts @@ -1,6 +1,7 @@ import { createContext } from "react"; -import { FieldError, FieldValidator } from "./FieldValidators"; -import { FormDetails } from "./Utils"; + +import { FieldError, FieldValidator } from "@/components/Form/FieldValidators"; +import { FormDetails } from "@/components/Form/Utils"; export type FormContextValue = ( name: keyof T, diff --git a/src/components/Form/FormFields/AutoExpandingTextInputFormField.tsx b/src/components/Form/FormFields/AutoExpandingTextInputFormField.tsx index f13ec863a91..9354d349d50 100644 --- a/src/components/Form/FormFields/AutoExpandingTextInputFormField.tsx +++ b/src/components/Form/FormFields/AutoExpandingTextInputFormField.tsx @@ -1,5 +1,8 @@ import { useEffect, useRef } from "react"; -import TextAreaFormField, { TextAreaFormFieldProps } from "./TextAreaFormField"; + +import TextAreaFormField, { + TextAreaFormFieldProps, +} from "@/components/Form/FormFields/TextAreaFormField"; type AutoExpandingTextInputFormFieldProps = TextAreaFormFieldProps & { maxHeight?: number; diff --git a/src/components/Form/FormFields/Autocomplete.tsx b/src/components/Form/FormFields/Autocomplete.tsx index 0ed6bd4d1f1..f66eafe6e36 100644 --- a/src/components/Form/FormFields/Autocomplete.tsx +++ b/src/components/Form/FormFields/Autocomplete.tsx @@ -5,15 +5,21 @@ import { ComboboxOption, ComboboxOptions, } from "@headlessui/react"; -import { FormFieldBaseProps, useFormFieldPropsResolver } from "./Utils"; import { useEffect, useState } from "react"; - -import CareIcon from "../../../CAREUI/icons/CareIcon"; -import { DropdownTransition } from "@/components/Common/components/HelperComponents"; -import FormField from "./FormField"; -import { classNames } from "../../../Utils/utils"; -import { dropdownOptionClassNames } from "../MultiSelectMenuV2"; import { useTranslation } from "react-i18next"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import { DropdownTransition } from "@/components/Common/HelperComponents"; +import FormField from "@/components/Form/FormFields/FormField"; +import { + FormFieldBaseProps, + useFormFieldPropsResolver, +} from "@/components/Form/FormFields/Utils"; +import { dropdownOptionClassNames } from "@/components/Form/MultiSelectMenuV2"; + +import { classNames } from "@/Utils/utils"; + type OptionCallback = (option: T) => R; type AutocompleteFormFieldProps = FormFieldBaseProps & { diff --git a/src/components/Form/FormFields/AutocompleteMultiselect.tsx b/src/components/Form/FormFields/AutocompleteMultiselect.tsx index 3a67dbb05f4..0a833485dbf 100644 --- a/src/components/Form/FormFields/AutocompleteMultiselect.tsx +++ b/src/components/Form/FormFields/AutocompleteMultiselect.tsx @@ -5,17 +5,22 @@ import { ComboboxOption, ComboboxOptions, } from "@headlessui/react"; -import { FormFieldBaseProps, useFormFieldPropsResolver } from "./Utils"; +import { ReactNode, useEffect, useRef, useState } from "react"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import { DropdownTransition } from "@/components/Common/HelperComponents"; +import FormField from "@/components/Form/FormFields/FormField"; +import { + FormFieldBaseProps, + useFormFieldPropsResolver, +} from "@/components/Form/FormFields/Utils"; import { MultiSelectOptionChip, dropdownOptionClassNames, -} from "../MultiSelectMenuV2"; -import { ReactNode, useEffect, useRef, useState } from "react"; +} from "@/components/Form/MultiSelectMenuV2"; -import CareIcon from "../../../CAREUI/icons/CareIcon"; -import { DropdownTransition } from "@/components/Common/components/HelperComponents"; -import FormField from "./FormField"; -import { classNames } from "../../../Utils/utils"; +import { classNames } from "@/Utils/utils"; type OptionCallback = (option: T) => R; diff --git a/src/components/Form/FormFields/CheckBoxFormField.tsx b/src/components/Form/FormFields/CheckBoxFormField.tsx index c9ff52c23aa..8689d6809cc 100644 --- a/src/components/Form/FormFields/CheckBoxFormField.tsx +++ b/src/components/Form/FormFields/CheckBoxFormField.tsx @@ -1,5 +1,11 @@ -import { FieldErrorText, FieldLabel } from "./FormField"; -import { FormFieldBaseProps, useFormFieldPropsResolver } from "./Utils"; +import { + FieldErrorText, + FieldLabel, +} from "@/components/Form/FormFields/FormField"; +import { + FormFieldBaseProps, + useFormFieldPropsResolver, +} from "@/components/Form/FormFields/Utils"; export default function CheckBoxFormField(props: FormFieldBaseProps) { const field = useFormFieldPropsResolver(props); diff --git a/src/components/Form/FormFields/DateFormField.tsx b/src/components/Form/FormFields/DateFormField.tsx index c27e7421cbb..e867c24dd51 100644 --- a/src/components/Form/FormFields/DateFormField.tsx +++ b/src/components/Form/FormFields/DateFormField.tsx @@ -1,8 +1,11 @@ import DateInputV2 from "@/components/Common/DateInputV2"; -import { FormFieldBaseProps, useFormFieldPropsResolver } from "./Utils"; +import FormField from "@/components/Form/FormFields/FormField"; +import { + FormFieldBaseProps, + useFormFieldPropsResolver, +} from "@/components/Form/FormFields/Utils"; -import FormField from "./FormField"; -import { classNames } from "../../../Utils/utils"; +import { classNames } from "@/Utils/utils"; type Props = FormFieldBaseProps & { containerClassName?: string; diff --git a/src/components/Form/FormFields/DateRangeFormField.tsx b/src/components/Form/FormFields/DateRangeFormField.tsx index a5e814278b8..d478e770042 100644 --- a/src/components/Form/FormFields/DateRangeFormField.tsx +++ b/src/components/Form/FormFields/DateRangeFormField.tsx @@ -1,9 +1,13 @@ -import { classNames } from "../../../Utils/utils"; import DateRangeInputV2, { DateRange, } from "@/components/Common/DateRangeInputV2"; -import FormField from "./FormField"; -import { FormFieldBaseProps, useFormFieldPropsResolver } from "./Utils"; +import FormField from "@/components/Form/FormFields/FormField"; +import { + FormFieldBaseProps, + useFormFieldPropsResolver, +} from "@/components/Form/FormFields/Utils"; + +import { classNames } from "@/Utils/utils"; type Props = FormFieldBaseProps & { max?: Date; diff --git a/src/components/Form/FormFields/DosageFormField.tsx b/src/components/Form/FormFields/DosageFormField.tsx index 14afc18806b..1550e4427b2 100644 --- a/src/components/Form/FormFields/DosageFormField.tsx +++ b/src/components/Form/FormFields/DosageFormField.tsx @@ -1,6 +1,6 @@ -import { DOSAGE_UNITS, DosageValue } from "../../Medicine/models"; -import NumericWithUnitsFormField from "./NumericWithUnitsFormField"; -import { FormFieldBaseProps } from "./Utils"; +import NumericWithUnitsFormField from "@/components/Form/FormFields/NumericWithUnitsFormField"; +import { FormFieldBaseProps } from "@/components/Form/FormFields/Utils"; +import { DOSAGE_UNITS, DosageValue } from "@/components/Medicine/models"; type Props = FormFieldBaseProps & { placeholder?: string; diff --git a/src/components/Form/FormFields/FormField.tsx b/src/components/Form/FormFields/FormField.tsx index 9c2903682b6..7f9c2699d64 100644 --- a/src/components/Form/FormFields/FormField.tsx +++ b/src/components/Form/FormFields/FormField.tsx @@ -1,6 +1,7 @@ -import { classNames } from "../../../Utils/utils"; -import { FieldError } from "../FieldValidators"; -import { FormFieldBaseProps } from "./Utils"; +import { FieldError } from "@/components/Form/FieldValidators"; +import { FormFieldBaseProps } from "@/components/Form/FormFields/Utils"; + +import { classNames } from "@/Utils/utils"; type LabelProps = { id?: string | undefined; diff --git a/src/components/Form/FormFields/Month.tsx b/src/components/Form/FormFields/Month.tsx index 96b44531c76..a1f8b335805 100644 --- a/src/components/Form/FormFields/Month.tsx +++ b/src/components/Form/FormFields/Month.tsx @@ -1,8 +1,12 @@ import { useEffect, useState } from "react"; -import AutocompleteFormField from "./Autocomplete"; -import FormField from "./FormField"; -import TextFormField from "./TextFormField"; -import { FormFieldBaseProps, useFormFieldPropsResolver } from "./Utils"; + +import AutocompleteFormField from "@/components/Form/FormFields/Autocomplete"; +import FormField from "@/components/Form/FormFields/FormField"; +import TextFormField from "@/components/Form/FormFields/TextFormField"; +import { + FormFieldBaseProps, + useFormFieldPropsResolver, +} from "@/components/Form/FormFields/Utils"; type Props = FormFieldBaseProps & { suffix?: (value?: Date) => React.ReactNode; diff --git a/src/components/Form/FormFields/NumericWithUnitsFormField.tsx b/src/components/Form/FormFields/NumericWithUnitsFormField.tsx index e595e1d697a..789766043af 100644 --- a/src/components/Form/FormFields/NumericWithUnitsFormField.tsx +++ b/src/components/Form/FormFields/NumericWithUnitsFormField.tsx @@ -1,6 +1,10 @@ -import FormField from "./FormField"; -import { FormFieldBaseProps, useFormFieldPropsResolver } from "./Utils"; -import { classNames } from "../../../Utils/utils"; +import FormField from "@/components/Form/FormFields/FormField"; +import { + FormFieldBaseProps, + useFormFieldPropsResolver, +} from "@/components/Form/FormFields/Utils"; + +import { classNames } from "@/Utils/utils"; type Props = FormFieldBaseProps & { placeholder?: string; diff --git a/src/components/Form/FormFields/OtpFormField.tsx b/src/components/Form/FormFields/OtpFormField.tsx index 4446a7032f1..1ce6f058699 100644 --- a/src/components/Form/FormFields/OtpFormField.tsx +++ b/src/components/Form/FormFields/OtpFormField.tsx @@ -1,6 +1,7 @@ import { useRef } from "react"; -import FormField from "./FormField"; -import { FormFieldBaseProps } from "./Utils"; + +import FormField from "@/components/Form/FormFields/FormField"; +import { FormFieldBaseProps } from "@/components/Form/FormFields/Utils"; type TextAreaFormFieldProps = { length?: number; diff --git a/src/components/Form/FormFields/PhoneNumberFormField.tsx b/src/components/Form/FormFields/PhoneNumberFormField.tsx index 92bca8126ea..f96854f4a4a 100644 --- a/src/components/Form/FormFields/PhoneNumberFormField.tsx +++ b/src/components/Form/FormFields/PhoneNumberFormField.tsx @@ -1,23 +1,30 @@ -import { FormFieldBaseProps, useFormFieldPropsResolver } from "./Utils"; -import FormField from "./FormField"; +import { Popover, PopoverButton, PopoverPanel } from "@headlessui/react"; import { useCallback, useEffect, useMemo, useState } from "react"; +import { useTranslation } from "react-i18next"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import { + FieldError, + PhoneNumberType, + PhoneNumberValidator, +} from "@/components/Form/FieldValidators"; +import FormField from "@/components/Form/FormFields/FormField"; +import { + FormFieldBaseProps, + useFormFieldPropsResolver, +} from "@/components/Form/FormFields/Utils"; + +import phoneCodesJson from "@/common/static/countryPhoneAndFlags.json"; + import { + CountryData, classNames, - parsePhoneNumber, formatPhoneNumber as formatPhoneNumberUtil, getCountryCode, - CountryData, humanizeStrings, -} from "../../../Utils/utils"; -import phoneCodesJson from "@/common/static/countryPhoneAndFlags.json"; -import { - FieldError, - PhoneNumberValidator, - PhoneNumberType, -} from "../FieldValidators"; -import CareIcon from "../../../CAREUI/icons/CareIcon"; -import { Popover, PopoverButton, PopoverPanel } from "@headlessui/react"; -import { useTranslation } from "react-i18next"; + parsePhoneNumber, +} from "@/Utils/utils"; const phoneCodes: Record = phoneCodesJson; diff --git a/src/components/Form/FormFields/RadioFormField.tsx b/src/components/Form/FormFields/RadioFormField.tsx index ddb9178c6e9..23ecf4c1376 100644 --- a/src/components/Form/FormFields/RadioFormField.tsx +++ b/src/components/Form/FormFields/RadioFormField.tsx @@ -1,7 +1,12 @@ import { ChangeEventHandler, ReactNode } from "react"; -import { classNames } from "../../../Utils/utils"; -import FormField from "./FormField"; -import { FormFieldBaseProps, useFormFieldPropsResolver } from "./Utils"; + +import FormField from "@/components/Form/FormFields/FormField"; +import { + FormFieldBaseProps, + useFormFieldPropsResolver, +} from "@/components/Form/FormFields/Utils"; + +import { classNames } from "@/Utils/utils"; type Props = FormFieldBaseProps & { options: readonly T[]; diff --git a/src/components/Form/FormFields/RangeAutocompleteFormField.tsx b/src/components/Form/FormFields/RangeAutocompleteFormField.tsx index 968f78019e5..c2f6b37575c 100644 --- a/src/components/Form/FormFields/RangeAutocompleteFormField.tsx +++ b/src/components/Form/FormFields/RangeAutocompleteFormField.tsx @@ -1,8 +1,10 @@ import { useMemo } from "react"; -import AutocompleteFormField from "./Autocomplete"; -import { FormFieldBaseProps } from "./Utils"; -import { classNames, compareBy } from "../../../Utils/utils"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; + +import ButtonV2 from "@/components/Common/ButtonV2"; +import AutocompleteFormField from "@/components/Form/FormFields/Autocomplete"; +import { FormFieldBaseProps } from "@/components/Form/FormFields/Utils"; + +import { classNames, compareBy } from "@/Utils/utils"; interface Threshold { value: number; diff --git a/src/components/Form/FormFields/RangeFormField.tsx b/src/components/Form/FormFields/RangeFormField.tsx index c09cbfb2293..f60ddd2955c 100644 --- a/src/components/Form/FormFields/RangeFormField.tsx +++ b/src/components/Form/FormFields/RangeFormField.tsx @@ -1,13 +1,14 @@ import { useState } from "react"; -import { FormFieldBaseProps, useFormFieldPropsResolver } from "./Utils"; -import FormField from "./FormField"; + +import FormField from "@/components/Form/FormFields/FormField"; +import { SelectFormField } from "@/components/Form/FormFields/SelectFormField"; +import TextFormField from "@/components/Form/FormFields/TextFormField"; import { - classNames, - properRoundOf, - ValueDescription, -} from "../../../Utils/utils"; -import TextFormField from "./TextFormField"; -import { SelectFormField } from "./SelectFormField"; + FormFieldBaseProps, + useFormFieldPropsResolver, +} from "@/components/Form/FormFields/Utils"; + +import { ValueDescription, classNames, properRoundOf } from "@/Utils/utils"; type BaseProps = FormFieldBaseProps & { min: number; diff --git a/src/components/Form/FormFields/SelectFormField.tsx b/src/components/Form/FormFields/SelectFormField.tsx index 9607e26bbdf..5cf992d8bdd 100644 --- a/src/components/Form/FormFields/SelectFormField.tsx +++ b/src/components/Form/FormFields/SelectFormField.tsx @@ -1,7 +1,10 @@ -import MultiSelectMenuV2 from "../MultiSelectMenuV2"; -import SelectMenuV2 from "../SelectMenuV2"; -import FormField from "./FormField"; -import { FormFieldBaseProps, useFormFieldPropsResolver } from "./Utils"; +import FormField from "@/components/Form/FormFields/FormField"; +import { + FormFieldBaseProps, + useFormFieldPropsResolver, +} from "@/components/Form/FormFields/Utils"; +import MultiSelectMenuV2 from "@/components/Form/MultiSelectMenuV2"; +import SelectMenuV2 from "@/components/Form/SelectMenuV2"; type OptionCallback = (option: T) => R; diff --git a/src/components/Form/FormFields/TextAreaFormField.tsx b/src/components/Form/FormFields/TextAreaFormField.tsx index 1f929217f1a..f26717810d4 100644 --- a/src/components/Form/FormFields/TextAreaFormField.tsx +++ b/src/components/Form/FormFields/TextAreaFormField.tsx @@ -1,7 +1,12 @@ import { forwardRef } from "react"; -import FormField from "./FormField"; -import { FormFieldBaseProps, useFormFieldPropsResolver } from "./Utils"; -import { classNames } from "../../../Utils/utils"; + +import FormField from "@/components/Form/FormFields/FormField"; +import { + FormFieldBaseProps, + useFormFieldPropsResolver, +} from "@/components/Form/FormFields/Utils"; + +import { classNames } from "@/Utils/utils"; export type TextAreaFormFieldProps = FormFieldBaseProps & { placeholder?: string; diff --git a/src/components/Form/FormFields/TextFormField.tsx b/src/components/Form/FormFields/TextFormField.tsx index 81e1edea9d0..c104b09feaa 100644 --- a/src/components/Form/FormFields/TextFormField.tsx +++ b/src/components/Form/FormFields/TextFormField.tsx @@ -1,4 +1,3 @@ -import { FormFieldBaseProps, useFormFieldPropsResolver } from "./Utils"; import { DetailedHTMLProps, InputHTMLAttributes, @@ -6,9 +5,15 @@ import { useState, } from "react"; -import CareIcon from "../../../CAREUI/icons/CareIcon"; -import FormField from "./FormField"; -import { classNames } from "../../../Utils/utils"; +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import FormField from "@/components/Form/FormFields/FormField"; +import { + FormFieldBaseProps, + useFormFieldPropsResolver, +} from "@/components/Form/FormFields/Utils"; + +import { classNames } from "@/Utils/utils"; export type TextFormFieldProps = FormFieldBaseProps & Omit< diff --git a/src/components/Form/FormFields/Utils.ts b/src/components/Form/FormFields/Utils.ts index d7d2848a51e..1e88bcbd6a0 100644 --- a/src/components/Form/FormFields/Utils.ts +++ b/src/components/Form/FormFields/Utils.ts @@ -1,5 +1,6 @@ import { FocusEvent } from "react"; -import { FieldError } from "../FieldValidators"; + +import { FieldError } from "@/components/Form/FieldValidators"; export type FieldChangeEvent = { name: string; value: T }; export type FieldChangeEventHandler = (event: FieldChangeEvent) => void; diff --git a/src/components/Form/ModelCrudEditor.tsx b/src/components/Form/ModelCrudEditor.tsx index f9e000732d3..209695be265 100644 --- a/src/components/Form/ModelCrudEditor.tsx +++ b/src/components/Form/ModelCrudEditor.tsx @@ -1,9 +1,12 @@ import { useEffect, useState } from "react"; -import { classNames } from "../../Utils/utils"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import CareIcon from "../../CAREUI/icons/CareIcon"; import { useTranslation } from "react-i18next"; +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import ButtonV2 from "@/components/Common/ButtonV2"; + +import { classNames } from "@/Utils/utils"; + interface Identifier { id: string; } diff --git a/src/components/Form/MultiSelectMenuV2.tsx b/src/components/Form/MultiSelectMenuV2.tsx index 2cf47584dda..302b4132230 100644 --- a/src/components/Form/MultiSelectMenuV2.tsx +++ b/src/components/Form/MultiSelectMenuV2.tsx @@ -7,8 +7,9 @@ import { } from "@headlessui/react"; import { ReactNode, useRef } from "react"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import { classNames } from "../../Utils/utils"; +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import { classNames } from "@/Utils/utils"; type OptionCallback = (option: T) => R; diff --git a/src/components/Form/SearchInput.tsx b/src/components/Form/SearchInput.tsx index 1dbea589de6..bbf59305a0a 100644 --- a/src/components/Form/SearchInput.tsx +++ b/src/components/Form/SearchInput.tsx @@ -1,8 +1,13 @@ import { createRef, useEffect, useState } from "react"; import useKeyboardShortcut from "use-keyboard-shortcut"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import { isAppleDevice } from "../../Utils/utils"; -import TextFormField, { TextFormFieldProps } from "./FormFields/TextFormField"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import TextFormField, { + TextFormFieldProps, +} from "@/components/Form/FormFields/TextFormField"; + +import { isAppleDevice } from "@/Utils/utils"; type SearchInputProps = TextFormFieldProps & { debouncePeriod?: number; diff --git a/src/components/Form/SelectMenuV2.tsx b/src/components/Form/SelectMenuV2.tsx index cea890b7330..a13d03607c6 100644 --- a/src/components/Form/SelectMenuV2.tsx +++ b/src/components/Form/SelectMenuV2.tsx @@ -5,11 +5,13 @@ import { ListboxOption, ListboxOptions, } from "@headlessui/react"; - -import CareIcon from "../../CAREUI/icons/CareIcon"; import { ReactNode } from "react"; -import { classNames } from "../../Utils/utils"; -import { dropdownOptionClassNames } from "./MultiSelectMenuV2"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import { dropdownOptionClassNames } from "@/components/Form/MultiSelectMenuV2"; + +import { classNames } from "@/Utils/utils"; type OptionCallback = (option: T) => R; diff --git a/src/components/Form/Utils.ts b/src/components/Form/Utils.ts index 03b150600fe..457c3fc9dd3 100644 --- a/src/components/Form/Utils.ts +++ b/src/components/Form/Utils.ts @@ -1,4 +1,4 @@ -import { FieldError } from "./FieldValidators"; +import { FieldError } from "@/components/Form/FieldValidators"; export type FormDetails = { [key: string]: any }; export type FormErrors = Partial< diff --git a/src/components/HCX/InsuranceDetailsBuilder.tsx b/src/components/HCX/InsuranceDetailsBuilder.tsx index ca7473c9dc1..730981593ad 100644 --- a/src/components/HCX/InsuranceDetailsBuilder.tsx +++ b/src/components/HCX/InsuranceDetailsBuilder.tsx @@ -1,20 +1,22 @@ +import careConfig from "@careConfig"; +import { useTranslation } from "react-i18next"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import ButtonV2 from "@/components/Common/ButtonV2"; +import FormField, { FieldLabel } from "@/components/Form/FormFields/FormField"; +import TextFormField from "@/components/Form/FormFields/TextFormField"; import { FieldChangeEvent, FormFieldBaseProps, useFormFieldPropsResolver, -} from "../Form/FormFields/Utils"; -import FormField, { FieldLabel } from "../Form/FormFields/FormField"; +} from "@/components/Form/FormFields/Utils"; +import InsurerAutocomplete from "@/components/HCX/InsurerAutocomplete"; +import { HCXPolicyModel } from "@/components/HCX/models"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import { HCXPolicyModel } from "./models"; -import InsurerAutocomplete from "./InsurerAutocomplete"; -import TextFormField from "../Form/FormFields/TextFormField"; -import careConfig from "@careConfig"; -import { classNames } from "../../Utils/utils"; -import request from "../../Utils/request/request"; -import routes from "../../Redux/api"; -import { useTranslation } from "react-i18next"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import { classNames } from "@/Utils/utils"; type Props = FormFieldBaseProps & { gridView?: boolean }; diff --git a/src/components/HCX/InsurerAutocomplete.tsx b/src/components/HCX/InsurerAutocomplete.tsx index 1105642629f..4c450fcd34e 100644 --- a/src/components/HCX/InsurerAutocomplete.tsx +++ b/src/components/HCX/InsurerAutocomplete.tsx @@ -1,14 +1,15 @@ +import { useState } from "react"; + +import { Autocomplete } from "@/components/Form/FormFields/Autocomplete"; +import FormField from "@/components/Form/FormFields/FormField"; import { FormFieldBaseProps, useFormFieldPropsResolver, -} from "../Form/FormFields/Utils"; +} from "@/components/Form/FormFields/Utils"; -import { Autocomplete } from "../Form/FormFields/Autocomplete"; -import FormField from "../Form/FormFields/FormField"; -import routes from "../../Redux/api"; -import { mergeQueryOptions } from "../../Utils/utils"; -import useQuery from "../../Utils/request/useQuery"; -import { useState } from "react"; +import routes from "@/Utils/request/api"; +import useQuery from "@/Utils/request/useQuery"; +import { mergeQueryOptions } from "@/Utils/utils"; export type InsurerOptionModel = { name: string; diff --git a/src/components/HCX/PatientInsuranceDetailsEditor.tsx b/src/components/HCX/PatientInsuranceDetailsEditor.tsx index 1c6803d7a1e..9d960411b18 100644 --- a/src/components/HCX/PatientInsuranceDetailsEditor.tsx +++ b/src/components/HCX/PatientInsuranceDetailsEditor.tsx @@ -1,18 +1,17 @@ -import ButtonV2, { - Cancel, - Submit, -} from "@/components/Common/components/ButtonV2"; - -import CareIcon from "../../CAREUI/icons/CareIcon"; -import { HCXPolicyModel } from "./models"; -import HCXPolicyValidator from "./validators"; -import InsuranceDetailsBuilder from "./InsuranceDetailsBuilder"; -import request from "../../Utils/request/request"; -import routes from "../../Redux/api"; -import useQuery from "../../Utils/request/useQuery"; import { useState } from "react"; import { useTranslation } from "react-i18next"; +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import ButtonV2, { Cancel, Submit } from "@/components/Common/ButtonV2"; +import InsuranceDetailsBuilder from "@/components/HCX/InsuranceDetailsBuilder"; +import { HCXPolicyModel } from "@/components/HCX/models"; +import HCXPolicyValidator from "@/components/HCX/validators"; + +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import useQuery from "@/Utils/request/useQuery"; + interface Props { patient: string; onSubmitted?: () => void; diff --git a/src/components/HCX/PolicyEligibilityCheck.tsx b/src/components/HCX/PolicyEligibilityCheck.tsx index fa02baaea30..48c63f3ca74 100644 --- a/src/components/HCX/PolicyEligibilityCheck.tsx +++ b/src/components/HCX/PolicyEligibilityCheck.tsx @@ -1,17 +1,19 @@ -import * as Notification from "../../Utils/Notifications"; - import { useEffect, useState } from "react"; - -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import { HCXPolicyModel } from "./models"; -import { SelectFormField } from "../Form/FormFields/SelectFormField"; -import request from "../../Utils/request/request"; -import routes from "../../Redux/api"; -import { useMessageListener } from "@/common/hooks/useMessageListener"; -import useQuery from "../../Utils/request/useQuery"; import { useTranslation } from "react-i18next"; +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import ButtonV2 from "@/components/Common/ButtonV2"; +import { SelectFormField } from "@/components/Form/FormFields/SelectFormField"; +import { HCXPolicyModel } from "@/components/HCX/models"; + +import { useMessageListener } from "@/hooks/useMessageListener"; + +import * as Notification from "@/Utils/Notifications"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import useQuery from "@/Utils/request/useQuery"; + interface Props { className?: string; patient: string; diff --git a/src/components/HCX/validators.ts b/src/components/HCX/validators.ts index 3f10ac156d1..2dfb5bacc19 100644 --- a/src/components/HCX/validators.ts +++ b/src/components/HCX/validators.ts @@ -1,7 +1,8 @@ -import { FieldValidator } from "../Form/FieldValidators"; -import { HCXPolicyModel } from "./models"; import { t } from "i18next"; +import { FieldValidator } from "@/components/Form/FieldValidators"; +import { HCXPolicyModel } from "@/components/HCX/models"; + const HCXPolicyValidator: FieldValidator = ( value, enable_hcx, diff --git a/src/components/Kanban/Board.tsx b/src/components/Kanban/Board.tsx index d2ab5da998f..70bb6f2d7da 100644 --- a/src/components/Kanban/Board.tsx +++ b/src/components/Kanban/Board.tsx @@ -5,12 +5,14 @@ import { OnDragEndResponder, } from "@hello-pangea/dnd"; import { ReactNode, RefObject, useEffect, useRef, useState } from "react"; -import { QueryRoute } from "../../Utils/request/types"; -import { QueryOptions } from "../../Utils/request/useQuery"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import request from "../../Utils/request/request"; import { useTranslation } from "react-i18next"; +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import request from "@/Utils/request/request"; +import { QueryRoute } from "@/Utils/request/types"; +import { QueryOptions } from "@/Utils/request/useQuery"; + interface KanbanBoardProps { title?: ReactNode; onDragEnd: OnDragEndResponder; diff --git a/src/components/Licenses/LicensesPage.tsx b/src/components/Licenses/LicensesPage.tsx index 560b45a0b74..ec656ad0c0e 100644 --- a/src/components/Licenses/LicensesPage.tsx +++ b/src/components/Licenses/LicensesPage.tsx @@ -1,5 +1,6 @@ import React from "react"; -import BOMDisplay from "./SBOMViewer"; + +import BOMDisplay from "@/components/Licenses/SBOMViewer"; const LicensesPage: React.FC = () => { return ( diff --git a/src/components/Licenses/SBOMViewer.tsx b/src/components/Licenses/SBOMViewer.tsx index 17b502495c1..d8a7cdc93df 100644 --- a/src/components/Licenses/SBOMViewer.tsx +++ b/src/components/Licenses/SBOMViewer.tsx @@ -1,11 +1,13 @@ -import React, { useState } from "react"; -import Card from "../../CAREUI/display/Card"; -import CareIcon from "../../CAREUI/icons/CareIcon"; import dayjs from "dayjs"; +import React, { useState } from "react"; import { CopyToClipboard } from "react-copy-to-clipboard"; -import licenseUrls from "./licenseUrls.json"; -import feBomData from "./fe-sbom.json"; -import beBomData from "./be-sbom.json"; + +import Card from "@/CAREUI/display/Card"; +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import beBomData from "@/components/Licenses/be-sbom.json"; +import feBomData from "@/components/Licenses/fe-sbom.json"; +import licenseUrls from "@/components/Licenses/licenseUrls.json"; const getLicenseUrl = (licenseId: string | undefined): string | null => { if (!licenseId) return null; diff --git a/src/components/Licenses/fe-sbom.json b/src/components/Licenses/fe-sbom.json index 3ec4f703736..8de8dd7d59e 100644 --- a/src/components/Licenses/fe-sbom.json +++ b/src/components/Licenses/fe-sbom.json @@ -75921,19 +75921,14 @@ }, { "ref": "@googlemaps/react-wrapper@1.1.42", - "dependsOn": [ - "@googlemaps/js-api-loader@1.16.8", - "react@18.3.1" - ] + "dependsOn": ["@googlemaps/js-api-loader@1.16.8", "react@18.3.1"] }, { "ref": "@googlemaps/js-api-loader@1.16.8" }, { "ref": "react@18.3.1", - "dependsOn": [ - "loose-envify@1.4.0" - ] + "dependsOn": ["loose-envify@1.4.0"] }, { "ref": "@googlemaps/typescript-guards@2.0.3" @@ -75969,27 +75964,18 @@ }, { "ref": "@floating-ui/dom@1.6.11", - "dependsOn": [ - "@floating-ui/core@1.6.8", - "@floating-ui/utils@0.2.8" - ] + "dependsOn": ["@floating-ui/core@1.6.8", "@floating-ui/utils@0.2.8"] }, { "ref": "@floating-ui/core@1.6.8", - "dependsOn": [ - "@floating-ui/utils@0.2.8" - ] + "dependsOn": ["@floating-ui/utils@0.2.8"] }, { "ref": "@floating-ui/utils@0.2.8" }, { "ref": "react-dom@18.3.1", - "dependsOn": [ - "loose-envify@1.4.0", - "react@18.3.1", - "scheduler@0.23.2" - ] + "dependsOn": ["loose-envify@1.4.0", "react@18.3.1", "scheduler@0.23.2"] }, { "ref": "tabbable@6.2.0" @@ -76028,29 +76014,19 @@ }, { "ref": "@react-aria/ssr@3.9.6", - "dependsOn": [ - "@swc/helpers@0.5.13", - "react@18.3.1" - ] + "dependsOn": ["@swc/helpers@0.5.13", "react@18.3.1"] }, { "ref": "@react-stately/utils@3.10.4", - "dependsOn": [ - "@swc/helpers@0.5.13", - "react@18.3.1" - ] + "dependsOn": ["@swc/helpers@0.5.13", "react@18.3.1"] }, { "ref": "@swc/helpers@0.5.13", - "dependsOn": [ - "tslib@2.7.0" - ] + "dependsOn": ["tslib@2.7.0"] }, { "ref": "@react-types/shared@3.25.0", - "dependsOn": [ - "react@18.3.1" - ] + "dependsOn": ["react@18.3.1"] }, { "ref": "clsx@2.1.1" @@ -76074,15 +76050,11 @@ }, { "ref": "@pnotify/mobile@5.2.0", - "dependsOn": [ - "@pnotify/core@5.2.0" - ] + "dependsOn": ["@pnotify/core@5.2.0"] }, { "ref": "@radix-ui/react-icons@1.3.0", - "dependsOn": [ - "react@18.3.1" - ] + "dependsOn": ["react@18.3.1"] }, { "ref": "@radix-ui/react-slot@1.1.0", @@ -76094,17 +76066,11 @@ }, { "ref": "@radix-ui/react-compose-refs@1.1.0", - "dependsOn": [ - "@types/react@18.3.2", - "react@18.3.1" - ] + "dependsOn": ["@types/react@18.3.2", "react@18.3.1"] }, { "ref": "@types/react@18.3.2", - "dependsOn": [ - "@types/prop-types@15.7.13", - "csstype@3.1.3" - ] + "dependsOn": ["@types/prop-types@15.7.13", "csstype@3.1.3"] }, { "ref": "@radix-ui/react-toast@1.2.2", @@ -76145,10 +76111,7 @@ }, { "ref": "@radix-ui/react-collection@1.1.0|@radix-ui/react-context@1.1.0", - "dependsOn": [ - "@types/react@18.3.2", - "react@18.3.1" - ] + "dependsOn": ["@types/react@18.3.2", "react@18.3.1"] }, { "ref": "@radix-ui/react-primitive@2.0.0", @@ -76162,16 +76125,11 @@ }, { "ref": "@types/react-dom@18.3.0", - "dependsOn": [ - "@types/react@18.3.2" - ] + "dependsOn": ["@types/react@18.3.2"] }, { "ref": "@radix-ui/react-context@1.1.1", - "dependsOn": [ - "@types/react@18.3.2", - "react@18.3.1" - ] + "dependsOn": ["@types/react@18.3.2", "react@18.3.1"] }, { "ref": "@radix-ui/react-dismissable-layer@1.1.1", @@ -76189,10 +76147,7 @@ }, { "ref": "@radix-ui/react-use-callback-ref@1.1.0", - "dependsOn": [ - "@types/react@18.3.2", - "react@18.3.1" - ] + "dependsOn": ["@types/react@18.3.2", "react@18.3.1"] }, { "ref": "@radix-ui/react-use-escape-keydown@1.1.0", @@ -76215,10 +76170,7 @@ }, { "ref": "@radix-ui/react-use-layout-effect@1.1.0", - "dependsOn": [ - "@types/react@18.3.2", - "react@18.3.1" - ] + "dependsOn": ["@types/react@18.3.2", "react@18.3.1"] }, { "ref": "@radix-ui/react-presence@1.1.1", @@ -76271,19 +76223,14 @@ }, { "ref": "@sentry/core@8.33.1", - "dependsOn": [ - "@sentry/types@8.33.1", - "@sentry/utils@8.33.1" - ] + "dependsOn": ["@sentry/types@8.33.1", "@sentry/utils@8.33.1"] }, { "ref": "@sentry/types@8.33.1" }, { "ref": "@sentry/utils@8.33.1", - "dependsOn": [ - "@sentry/types@8.33.1" - ] + "dependsOn": ["@sentry/types@8.33.1"] }, { "ref": "@sentry-internal/feedback@8.33.1", @@ -76313,9 +76260,7 @@ }, { "ref": "@tailwindcss/container-queries@0.1.1", - "dependsOn": [ - "tailwindcss@3.4.13" - ] + "dependsOn": ["tailwindcss@3.4.13"] }, { "ref": "tailwindcss@3.4.13", @@ -76346,10 +76291,7 @@ }, { "ref": "tailwindcss@3.4.13|postcss-selector-parser@6.1.2", - "dependsOn": [ - "cssesc@3.0.0", - "util-deprecate@1.0.2" - ] + "dependsOn": ["cssesc@3.0.0", "util-deprecate@1.0.2"] }, { "ref": "tailwindcss@3.4.13|resolve@1.22.8", @@ -76361,10 +76303,7 @@ }, { "ref": "@tailwindcss/forms@0.5.9", - "dependsOn": [ - "mini-svg-data-uri@1.4.4", - "tailwindcss@3.4.13" - ] + "dependsOn": ["mini-svg-data-uri@1.4.4", "tailwindcss@3.4.13"] }, { "ref": "mini-svg-data-uri@1.4.4" @@ -76390,10 +76329,7 @@ }, { "ref": "postcss-selector-parser@6.0.10", - "dependsOn": [ - "cssesc@3.0.0", - "util-deprecate@1.0.2" - ] + "dependsOn": ["cssesc@3.0.0", "util-deprecate@1.0.2"] }, { "ref": "cssesc@3.0.0" @@ -76403,9 +76339,7 @@ }, { "ref": "@types/cypress@1.1.3", - "dependsOn": [ - "cypress@13.15.0" - ] + "dependsOn": ["cypress@13.15.0"] }, { "ref": "cypress@13.15.0", @@ -76465,45 +76399,33 @@ }, { "ref": "@types/lodash-es@4.17.12", - "dependsOn": [ - "@types/lodash@4.17.10" - ] + "dependsOn": ["@types/lodash@4.17.10"] }, { "ref": "@types/lodash@4.17.10" }, { "ref": "@types/node@22.7.5", - "dependsOn": [ - "undici-types@6.19.8" - ] + "dependsOn": ["undici-types@6.19.8"] }, { "ref": "undici-types@6.19.8" }, { "ref": "@types/qrcode.react@1.0.5", - "dependsOn": [ - "@types/react@18.3.2" - ] + "dependsOn": ["@types/react@18.3.2"] }, { "ref": "@types/react-copy-to-clipboard@5.0.7", - "dependsOn": [ - "@types/react@18.3.2" - ] + "dependsOn": ["@types/react@18.3.2"] }, { "ref": "@types/react-csv@1.1.10", - "dependsOn": [ - "@types/react@18.3.2" - ] + "dependsOn": ["@types/react@18.3.2"] }, { "ref": "@types/react-google-recaptcha@2.1.9", - "dependsOn": [ - "@types/react@18.3.2" - ] + "dependsOn": ["@types/react@18.3.2"] }, { "ref": "@types/prop-types@15.7.13" @@ -76573,9 +76495,7 @@ }, { "ref": "debug@4.3.7", - "dependsOn": [ - "ms@2.1.3" - ] + "dependsOn": ["ms@2.1.3"] }, { "ref": "globby@11.1.0", @@ -76590,30 +76510,22 @@ }, { "ref": "is-glob@4.0.3", - "dependsOn": [ - "is-extglob@2.1.1" - ] + "dependsOn": ["is-extglob@2.1.1"] }, { "ref": "minimatch@9.0.5", - "dependsOn": [ - "brace-expansion@2.0.1" - ] + "dependsOn": ["brace-expansion@2.0.1"] }, { "ref": "brace-expansion@2.0.1", - "dependsOn": [ - "balanced-match@1.0.2" - ] + "dependsOn": ["balanced-match@1.0.2"] }, { "ref": "semver@7.6.3" }, { "ref": "ts-api-utils@1.3.0", - "dependsOn": [ - "typescript@5.6.2" - ] + "dependsOn": ["typescript@5.6.2"] }, { "ref": "eslint@8.57.1", @@ -76660,16 +76572,11 @@ }, { "ref": "eslint@8.57.1|minimatch@3.1.2", - "dependsOn": [ - "eslint@8.57.1|brace-expansion@1.1.11" - ] + "dependsOn": ["eslint@8.57.1|brace-expansion@1.1.11"] }, { "ref": "eslint@8.57.1|brace-expansion@1.1.11", - "dependsOn": [ - "balanced-match@1.0.2", - "concat-map@0.0.1" - ] + "dependsOn": ["balanced-match@1.0.2", "concat-map@0.0.1"] }, { "ref": "@typescript-eslint/type-utils@7.18.0", @@ -76693,10 +76600,7 @@ }, { "ref": "@eslint-community/eslint-utils@4.4.0", - "dependsOn": [ - "eslint-visitor-keys@3.4.3", - "eslint@8.57.1" - ] + "dependsOn": ["eslint-visitor-keys@3.4.3", "eslint@8.57.1"] }, { "ref": "eslint-visitor-keys@3.4.3" @@ -76717,16 +76621,11 @@ }, { "ref": "@eslint/eslintrc@2.1.4|minimatch@3.1.2", - "dependsOn": [ - "@eslint/eslintrc@2.1.4|brace-expansion@1.1.11" - ] + "dependsOn": ["@eslint/eslintrc@2.1.4|brace-expansion@1.1.11"] }, { "ref": "@eslint/eslintrc@2.1.4|brace-expansion@1.1.11", - "dependsOn": [ - "balanced-match@1.0.2", - "concat-map@0.0.1" - ] + "dependsOn": ["balanced-match@1.0.2", "concat-map@0.0.1"] }, { "ref": "ajv@6.12.6", @@ -76747,25 +76646,18 @@ }, { "ref": "globals@13.24.0", - "dependsOn": [ - "type-fest@0.20.2" - ] + "dependsOn": ["type-fest@0.20.2"] }, { "ref": "ignore@5.3.2" }, { "ref": "import-fresh@3.3.0", - "dependsOn": [ - "parent-module@1.0.1", - "resolve-from@4.0.0" - ] + "dependsOn": ["parent-module@1.0.1", "resolve-from@4.0.0"] }, { "ref": "js-yaml@4.1.0", - "dependsOn": [ - "argparse@2.0.1" - ] + "dependsOn": ["argparse@2.0.1"] }, { "ref": "balanced-match@1.0.2" @@ -76789,16 +76681,11 @@ }, { "ref": "@humanwhocodes/config-array@0.13.0|minimatch@3.1.2", - "dependsOn": [ - "@humanwhocodes/config-array@0.13.0|brace-expansion@1.1.11" - ] + "dependsOn": ["@humanwhocodes/config-array@0.13.0|brace-expansion@1.1.11"] }, { "ref": "@humanwhocodes/config-array@0.13.0|brace-expansion@1.1.11", - "dependsOn": [ - "balanced-match@1.0.2", - "concat-map@0.0.1" - ] + "dependsOn": ["balanced-match@1.0.2", "concat-map@0.0.1"] }, { "ref": "@humanwhocodes/object-schema@2.0.3" @@ -76808,35 +76695,25 @@ }, { "ref": "@nodelib/fs.walk@1.2.8", - "dependsOn": [ - "@nodelib/fs.scandir@2.1.5", - "fastq@1.17.1" - ] + "dependsOn": ["@nodelib/fs.scandir@2.1.5", "fastq@1.17.1"] }, { "ref": "@nodelib/fs.scandir@2.1.5", - "dependsOn": [ - "@nodelib/fs.stat@2.0.5", - "run-parallel@1.2.0" - ] + "dependsOn": ["@nodelib/fs.stat@2.0.5", "run-parallel@1.2.0"] }, { "ref": "@nodelib/fs.stat@2.0.5" }, { "ref": "run-parallel@1.2.0", - "dependsOn": [ - "queue-microtask@1.2.3" - ] + "dependsOn": ["queue-microtask@1.2.3"] }, { "ref": "queue-microtask@1.2.3" }, { "ref": "fastq@1.17.1", - "dependsOn": [ - "reusify@1.0.4" - ] + "dependsOn": ["reusify@1.0.4"] }, { "ref": "reusify@1.0.4" @@ -76855,39 +76732,26 @@ }, { "ref": "uri-js@4.4.1", - "dependsOn": [ - "punycode@2.3.1" - ] + "dependsOn": ["punycode@2.3.1"] }, { "ref": "punycode@2.3.1" }, { "ref": "chalk@4.1.2", - "dependsOn": [ - "ansi-styles@4.3.0", - "chalk@4.1.2|supports-color@7.2.0" - ] + "dependsOn": ["ansi-styles@4.3.0", "chalk@4.1.2|supports-color@7.2.0"] }, { "ref": "chalk@4.1.2|supports-color@7.2.0", - "dependsOn": [ - "has-flag@4.0.0" - ] + "dependsOn": ["has-flag@4.0.0"] }, { "ref": "cross-spawn@7.0.3", - "dependsOn": [ - "path-key@3.1.1", - "shebang-command@2.0.0", - "which@2.0.2" - ] + "dependsOn": ["path-key@3.1.1", "shebang-command@2.0.0", "which@2.0.2"] }, { "ref": "doctrine@3.0.0", - "dependsOn": [ - "esutils@2.0.3" - ] + "dependsOn": ["esutils@2.0.3"] }, { "ref": "esutils@2.0.3" @@ -76897,66 +76761,47 @@ }, { "ref": "eslint-scope@7.2.2", - "dependsOn": [ - "esrecurse@4.3.0", - "estraverse@5.3.0" - ] + "dependsOn": ["esrecurse@4.3.0", "estraverse@5.3.0"] }, { "ref": "esrecurse@4.3.0", - "dependsOn": [ - "estraverse@5.3.0" - ] + "dependsOn": ["estraverse@5.3.0"] }, { "ref": "estraverse@5.3.0" }, { "ref": "acorn-jsx@5.3.2", - "dependsOn": [ - "acorn@8.12.1" - ] + "dependsOn": ["acorn@8.12.1"] }, { "ref": "acorn@8.12.1" }, { "ref": "esquery@1.6.0", - "dependsOn": [ - "estraverse@5.3.0" - ] + "dependsOn": ["estraverse@5.3.0"] }, { "ref": "file-entry-cache@6.0.1", - "dependsOn": [ - "flat-cache@3.2.0" - ] + "dependsOn": ["flat-cache@3.2.0"] }, { "ref": "flat-cache@3.2.0", - "dependsOn": [ - "flatted@3.3.1", - "keyv@4.5.4", - "rimraf@3.0.2" - ] + "dependsOn": ["flatted@3.3.1", "keyv@4.5.4", "rimraf@3.0.2"] }, { "ref": "flatted@3.3.1" }, { "ref": "keyv@4.5.4", - "dependsOn": [ - "json-buffer@3.0.1" - ] + "dependsOn": ["json-buffer@3.0.1"] }, { "ref": "json-buffer@3.0.1" }, { "ref": "rimraf@3.0.2", - "dependsOn": [ - "rimraf@3.0.2|glob@7.2.3" - ] + "dependsOn": ["rimraf@3.0.2|glob@7.2.3"] }, { "ref": "rimraf@3.0.2|glob@7.2.3", @@ -76971,63 +76816,44 @@ }, { "ref": "rimraf@3.0.2|minimatch@3.1.2", - "dependsOn": [ - "rimraf@3.0.2|brace-expansion@1.1.11" - ] + "dependsOn": ["rimraf@3.0.2|brace-expansion@1.1.11"] }, { "ref": "rimraf@3.0.2|brace-expansion@1.1.11", - "dependsOn": [ - "balanced-match@1.0.2", - "concat-map@0.0.1" - ] + "dependsOn": ["balanced-match@1.0.2", "concat-map@0.0.1"] }, { "ref": "fs.realpath@1.0.0" }, { "ref": "inflight@1.0.6", - "dependsOn": [ - "once@1.4.0", - "wrappy@1.0.2" - ] + "dependsOn": ["once@1.4.0", "wrappy@1.0.2"] }, { "ref": "inherits@2.0.4" }, { "ref": "once@1.4.0", - "dependsOn": [ - "wrappy@1.0.2" - ] + "dependsOn": ["wrappy@1.0.2"] }, { "ref": "path-is-absolute@1.0.1" }, { "ref": "find-up@5.0.0", - "dependsOn": [ - "locate-path@6.0.0", - "path-exists@4.0.0" - ] + "dependsOn": ["locate-path@6.0.0", "path-exists@4.0.0"] }, { "ref": "locate-path@6.0.0", - "dependsOn": [ - "p-locate@5.0.0" - ] + "dependsOn": ["p-locate@5.0.0"] }, { "ref": "p-locate@5.0.0", - "dependsOn": [ - "p-limit@3.1.0" - ] + "dependsOn": ["p-limit@3.1.0"] }, { "ref": "p-limit@3.1.0", - "dependsOn": [ - "yocto-queue@0.1.0" - ] + "dependsOn": ["yocto-queue@0.1.0"] }, { "ref": "yocto-queue@0.1.0" @@ -77037,9 +76863,7 @@ }, { "ref": "glob-parent@6.0.2", - "dependsOn": [ - "is-glob@4.0.3" - ] + "dependsOn": ["is-glob@4.0.3"] }, { "ref": "type-fest@0.20.2" @@ -77061,19 +76885,14 @@ }, { "ref": "levn@0.4.1", - "dependsOn": [ - "prelude-ls@1.2.1", - "type-check@0.4.0" - ] + "dependsOn": ["prelude-ls@1.2.1", "type-check@0.4.0"] }, { "ref": "prelude-ls@1.2.1" }, { "ref": "type-check@0.4.0", - "dependsOn": [ - "prelude-ls@1.2.1" - ] + "dependsOn": ["prelude-ls@1.2.1"] }, { "ref": "natural-compare@1.4.0" @@ -77091,9 +76910,7 @@ }, { "ref": "strip-ansi@6.0.1", - "dependsOn": [ - "ansi-regex@5.0.1" - ] + "dependsOn": ["ansi-regex@5.0.1"] }, { "ref": "text-table@0.2.0" @@ -77103,10 +76920,7 @@ }, { "ref": "@vitejs/plugin-react-swc@3.7.1", - "dependsOn": [ - "@swc/core@1.7.26", - "vite@5.4.8" - ] + "dependsOn": ["@swc/core@1.7.26", "vite@5.4.8"] }, { "ref": "@swc/core@1.7.26", @@ -77129,9 +76943,7 @@ }, { "ref": "@swc/types@0.1.12", - "dependsOn": [ - "@swc/counter@0.1.3" - ] + "dependsOn": ["@swc/counter@0.1.3"] }, { "ref": "vite@5.4.8", @@ -77145,9 +76957,7 @@ }, { "ref": "vite@5.4.8|esbuild@0.21.5", - "dependsOn": [ - "vite@5.4.8|@esbuild/linux-x64@0.21.5" - ] + "dependsOn": ["vite@5.4.8|@esbuild/linux-x64@0.21.5"] }, { "ref": "vite@5.4.8|@esbuild/linux-x64@0.21.5" @@ -77163,28 +76973,21 @@ }, { "ref": "barcode-detector@2.2.10", - "dependsOn": [ - "@types/dom-webcodecs@0.1.12", - "zxing-wasm@1.2.14" - ] + "dependsOn": ["@types/dom-webcodecs@0.1.12", "zxing-wasm@1.2.14"] }, { "ref": "@types/dom-webcodecs@0.1.12" }, { "ref": "zxing-wasm@1.2.14", - "dependsOn": [ - "@types/emscripten@1.39.13" - ] + "dependsOn": ["@types/emscripten@1.39.13"] }, { "ref": "@types/emscripten@1.39.13" }, { "ref": "webrtc-adapter@9.0.1", - "dependsOn": [ - "sdp@3.2.0" - ] + "dependsOn": ["sdp@3.2.0"] }, { "ref": "sdp@3.2.0" @@ -77221,11 +77024,7 @@ }, { "ref": "update-browserslist-db@1.1.1", - "dependsOn": [ - "browserslist@4.24.0", - "escalade@3.2.0", - "picocolors@1.1.0" - ] + "dependsOn": ["browserslist@4.24.0", "escalade@3.2.0", "picocolors@1.1.0"] }, { "ref": "escalade@3.2.0" @@ -77244,11 +77043,7 @@ }, { "ref": "postcss@8.4.47", - "dependsOn": [ - "nanoid@3.3.7", - "picocolors@1.1.0", - "source-map-js@1.2.1" - ] + "dependsOn": ["nanoid@3.3.7", "picocolors@1.1.0", "source-map-js@1.2.1"] }, { "ref": "axios@1.7.7", @@ -77274,18 +77069,14 @@ }, { "ref": "combined-stream@1.0.8", - "dependsOn": [ - "delayed-stream@1.0.0" - ] + "dependsOn": ["delayed-stream@1.0.0"] }, { "ref": "delayed-stream@1.0.0" }, { "ref": "mime-types@2.1.35", - "dependsOn": [ - "mime-db@1.52.0" - ] + "dependsOn": ["mime-db@1.52.0"] }, { "ref": "mime-db@1.52.0" @@ -77298,9 +77089,7 @@ }, { "ref": "browser-image-compression@2.0.2", - "dependsOn": [ - "uzip@0.20201231.0" - ] + "dependsOn": ["uzip@0.20201231.0"] }, { "ref": "uzip@0.20201231.0" @@ -77321,25 +77110,18 @@ }, { "ref": "easy-table@1.2.0", - "dependsOn": [ - "ansi-regex@5.0.1", - "wcwidth@1.0.1" - ] + "dependsOn": ["ansi-regex@5.0.1", "wcwidth@1.0.1"] }, { "ref": "ansi-regex@5.0.1" }, { "ref": "wcwidth@1.0.1", - "dependsOn": [ - "defaults@1.0.4" - ] + "dependsOn": ["defaults@1.0.4"] }, { "ref": "defaults@1.0.4", - "dependsOn": [ - "clone@1.0.4" - ] + "dependsOn": ["clone@1.0.4"] }, { "ref": "clone@1.0.4" @@ -77352,45 +77134,35 @@ }, { "ref": "class-variance-authority@0.7.0", - "dependsOn": [ - "class-variance-authority@0.7.0|clsx@2.0.0" - ] + "dependsOn": ["class-variance-authority@0.7.0|clsx@2.0.0"] }, { "ref": "class-variance-authority@0.7.0|clsx@2.0.0" }, { "ref": "cross-env@7.0.3", - "dependsOn": [ - "cross-spawn@7.0.3" - ] + "dependsOn": ["cross-spawn@7.0.3"] }, { "ref": "path-key@3.1.1" }, { "ref": "shebang-command@2.0.0", - "dependsOn": [ - "shebang-regex@3.0.0" - ] + "dependsOn": ["shebang-regex@3.0.0"] }, { "ref": "shebang-regex@3.0.0" }, { "ref": "which@2.0.2", - "dependsOn": [ - "isexe@2.0.0" - ] + "dependsOn": ["isexe@2.0.0"] }, { "ref": "isexe@2.0.0" }, { "ref": "cypress-localstorage-commands@2.2.6", - "dependsOn": [ - "cypress@13.15.0" - ] + "dependsOn": ["cypress@13.15.0"] }, { "ref": "cypress-split@1.24.0", @@ -77407,35 +77179,25 @@ }, { "ref": "@actions/core@1.11.1", - "dependsOn": [ - "@actions/exec@1.1.1", - "@actions/http-client@2.2.3" - ] + "dependsOn": ["@actions/exec@1.1.1", "@actions/http-client@2.2.3"] }, { "ref": "@actions/exec@1.1.1", - "dependsOn": [ - "@actions/io@1.1.3" - ] + "dependsOn": ["@actions/io@1.1.3"] }, { "ref": "@actions/io@1.1.3" }, { "ref": "@actions/http-client@2.2.3", - "dependsOn": [ - "tunnel@0.0.6", - "undici@5.28.4" - ] + "dependsOn": ["tunnel@0.0.6", "undici@5.28.4"] }, { "ref": "tunnel@0.0.6" }, { "ref": "undici@5.28.4", - "dependsOn": [ - "@fastify/busboy@2.1.1" - ] + "dependsOn": ["@fastify/busboy@2.1.1"] }, { "ref": "@fastify/busboy@2.1.1" @@ -77445,31 +77207,22 @@ }, { "ref": "console.table@0.10.0", - "dependsOn": [ - "console.table@0.10.0|easy-table@1.1.0" - ] + "dependsOn": ["console.table@0.10.0|easy-table@1.1.0"] }, { "ref": "console.table@0.10.0|easy-table@1.1.0", - "dependsOn": [ - "wcwidth@1.0.1" - ] + "dependsOn": ["wcwidth@1.0.1"] }, { "ref": "ms@2.1.3" }, { "ref": "fast-shuffle@6.1.0", - "dependsOn": [ - "pcg@1.0.0" - ] + "dependsOn": ["pcg@1.0.0"] }, { "ref": "pcg@1.0.0", - "dependsOn": [ - "long@5.2.3", - "ramda@0.29.0" - ] + "dependsOn": ["long@5.2.3", "ramda@0.29.0"] }, { "ref": "long@5.2.3" @@ -77496,16 +77249,11 @@ }, { "ref": "find-cypress-specs@1.43.4|minimatch@3.1.2", - "dependsOn": [ - "find-cypress-specs@1.43.4|brace-expansion@1.1.11" - ] + "dependsOn": ["find-cypress-specs@1.43.4|brace-expansion@1.1.11"] }, { "ref": "find-cypress-specs@1.43.4|brace-expansion@1.1.11", - "dependsOn": [ - "balanced-match@1.0.2", - "concat-map@0.0.1" - ] + "dependsOn": ["balanced-match@1.0.2", "concat-map@0.0.1"] }, { "ref": "find-test-names@1.28.18", @@ -77520,9 +77268,7 @@ }, { "ref": "@babel/parser@7.25.7", - "dependsOn": [ - "@babel/types@7.25.7" - ] + "dependsOn": ["@babel/types@7.25.7"] }, { "ref": "@babel/types@7.25.7", @@ -77534,10 +77280,7 @@ }, { "ref": "@babel/plugin-syntax-jsx@7.25.7", - "dependsOn": [ - "@babel/core@7.25.7", - "@babel/helper-plugin-utils@7.25.7" - ] + "dependsOn": ["@babel/core@7.25.7", "@babel/helper-plugin-utils@7.25.7"] }, { "ref": "@babel/core@7.25.7", @@ -77567,9 +77310,7 @@ }, { "ref": "acorn-walk@8.3.4", - "dependsOn": [ - "acorn@8.12.1" - ] + "dependsOn": ["acorn@8.12.1"] }, { "ref": "simple-bin-help@1.8.0" @@ -77579,15 +77320,11 @@ }, { "ref": "require-and-forget@1.0.1", - "dependsOn": [ - "require-and-forget@1.0.1|debug@4.3.4" - ] + "dependsOn": ["require-and-forget@1.0.1|debug@4.3.4"] }, { "ref": "require-and-forget@1.0.1|debug@4.3.4", - "dependsOn": [ - "require-and-forget@1.0.1|ms@2.1.2" - ] + "dependsOn": ["require-and-forget@1.0.1|ms@2.1.2"] }, { "ref": "require-and-forget@1.0.1|ms@2.1.2" @@ -77613,25 +77350,18 @@ }, { "ref": "shelljs@0.8.5|minimatch@3.1.2", - "dependsOn": [ - "shelljs@0.8.5|brace-expansion@1.1.11" - ] + "dependsOn": ["shelljs@0.8.5|brace-expansion@1.1.11"] }, { "ref": "shelljs@0.8.5|brace-expansion@1.1.11", - "dependsOn": [ - "balanced-match@1.0.2", - "concat-map@0.0.1" - ] + "dependsOn": ["balanced-match@1.0.2", "concat-map@0.0.1"] }, { "ref": "interpret@1.4.0" }, { "ref": "rechoir@0.6.2", - "dependsOn": [ - "rechoir@0.6.2|resolve@1.22.8" - ] + "dependsOn": ["rechoir@0.6.2|resolve@1.22.8"] }, { "ref": "rechoir@0.6.2|resolve@1.22.8", @@ -77643,9 +77373,7 @@ }, { "ref": "is-core-module@2.15.1", - "dependsOn": [ - "hasown@2.0.2" - ] + "dependsOn": ["hasown@2.0.2"] }, { "ref": "path-parse@1.0.7" @@ -77692,10 +77420,7 @@ }, { "ref": "array-buffer-byte-length@1.0.1", - "dependsOn": [ - "call-bind@1.0.7", - "is-array-buffer@3.0.4" - ] + "dependsOn": ["call-bind@1.0.7", "is-array-buffer@3.0.4"] }, { "ref": "call-bind@1.0.7", @@ -77736,10 +77461,7 @@ }, { "ref": "is-arguments@1.1.1", - "dependsOn": [ - "call-bind@1.0.7", - "has-tostringtag@1.0.2" - ] + "dependsOn": ["call-bind@1.0.7", "has-tostringtag@1.0.2"] }, { "ref": "is-map@2.0.3" @@ -77749,65 +77471,42 @@ }, { "ref": "is-string@1.0.7", - "dependsOn": [ - "has-tostringtag@1.0.2" - ] + "dependsOn": ["has-tostringtag@1.0.2"] }, { "ref": "isarray@2.0.5" }, { "ref": "stop-iteration-iterator@1.0.0", - "dependsOn": [ - "internal-slot@1.0.7" - ] + "dependsOn": ["internal-slot@1.0.7"] }, { "ref": "internal-slot@1.0.7", - "dependsOn": [ - "es-errors@1.3.0", - "hasown@2.0.2", - "side-channel@1.0.6" - ] + "dependsOn": ["es-errors@1.3.0", "hasown@2.0.2", "side-channel@1.0.6"] }, { "ref": "has-tostringtag@1.0.2", - "dependsOn": [ - "has-symbols@1.0.3" - ] + "dependsOn": ["has-symbols@1.0.3"] }, { "ref": "is-array-buffer@3.0.4", - "dependsOn": [ - "call-bind@1.0.7", - "get-intrinsic@1.2.4" - ] + "dependsOn": ["call-bind@1.0.7", "get-intrinsic@1.2.4"] }, { "ref": "is-date-object@1.0.5", - "dependsOn": [ - "has-tostringtag@1.0.2" - ] + "dependsOn": ["has-tostringtag@1.0.2"] }, { "ref": "is-regex@1.1.4", - "dependsOn": [ - "call-bind@1.0.7", - "has-tostringtag@1.0.2" - ] + "dependsOn": ["call-bind@1.0.7", "has-tostringtag@1.0.2"] }, { "ref": "is-shared-array-buffer@1.0.3", - "dependsOn": [ - "call-bind@1.0.7" - ] + "dependsOn": ["call-bind@1.0.7"] }, { "ref": "object-is@1.1.6", - "dependsOn": [ - "call-bind@1.0.7", - "define-properties@1.2.1" - ] + "dependsOn": ["call-bind@1.0.7", "define-properties@1.2.1"] }, { "ref": "define-properties@1.2.1", @@ -77859,31 +77558,22 @@ }, { "ref": "is-bigint@1.0.4", - "dependsOn": [ - "has-bigints@1.0.2" - ] + "dependsOn": ["has-bigints@1.0.2"] }, { "ref": "has-bigints@1.0.2" }, { "ref": "is-boolean-object@1.1.2", - "dependsOn": [ - "call-bind@1.0.7", - "has-tostringtag@1.0.2" - ] + "dependsOn": ["call-bind@1.0.7", "has-tostringtag@1.0.2"] }, { "ref": "is-number-object@1.0.7", - "dependsOn": [ - "has-tostringtag@1.0.2" - ] + "dependsOn": ["has-tostringtag@1.0.2"] }, { "ref": "is-symbol@1.0.4", - "dependsOn": [ - "has-symbols@1.0.3" - ] + "dependsOn": ["has-symbols@1.0.3"] }, { "ref": "which-collection@1.0.2", @@ -77899,10 +77589,7 @@ }, { "ref": "is-weakset@2.0.3", - "dependsOn": [ - "call-bind@1.0.7", - "get-intrinsic@1.2.4" - ] + "dependsOn": ["call-bind@1.0.7", "get-intrinsic@1.2.4"] }, { "ref": "which-typed-array@1.1.15", @@ -77958,26 +77645,18 @@ }, { "ref": "enhanced-resolve@5.17.1", - "dependsOn": [ - "graceful-fs@4.2.11", - "tapable@2.2.1" - ] + "dependsOn": ["graceful-fs@4.2.11", "tapable@2.2.1"] }, { "ref": "module-definition@6.0.0", - "dependsOn": [ - "ast-module-types@6.0.0", - "node-source-walk@7.0.0" - ] + "dependsOn": ["ast-module-types@6.0.0", "node-source-walk@7.0.0"] }, { "ref": "ast-module-types@6.0.0" }, { "ref": "node-source-walk@7.0.0", - "dependsOn": [ - "@babel/parser@7.25.7" - ] + "dependsOn": ["@babel/parser@7.25.7"] }, { "ref": "module-lookup-amd@9.0.2", @@ -78004,23 +77683,15 @@ }, { "ref": "module-lookup-amd@9.0.2|minimatch@3.1.2", - "dependsOn": [ - "module-lookup-amd@9.0.2|brace-expansion@1.1.11" - ] + "dependsOn": ["module-lookup-amd@9.0.2|brace-expansion@1.1.11"] }, { "ref": "module-lookup-amd@9.0.2|brace-expansion@1.1.11", - "dependsOn": [ - "balanced-match@1.0.2", - "concat-map@0.0.1" - ] + "dependsOn": ["balanced-match@1.0.2", "concat-map@0.0.1"] }, { "ref": "requirejs-config-file@4.0.0", - "dependsOn": [ - "esprima@4.0.1", - "stringify-object@3.3.0" - ] + "dependsOn": ["esprima@4.0.1", "stringify-object@3.3.0"] }, { "ref": "esprima@4.0.1" @@ -78041,29 +77712,21 @@ }, { "ref": "sass-lookup@6.0.1", - "dependsOn": [ - "sass-lookup@6.0.1|commander@12.1.0" - ] + "dependsOn": ["sass-lookup@6.0.1|commander@12.1.0"] }, { "ref": "sass-lookup@6.0.1|commander@12.1.0" }, { "ref": "stylus-lookup@6.0.0", - "dependsOn": [ - "stylus-lookup@6.0.0|commander@12.1.0" - ] + "dependsOn": ["stylus-lookup@6.0.0|commander@12.1.0"] }, { "ref": "stylus-lookup@6.0.0|commander@12.1.0" }, { "ref": "tsconfig-paths@4.2.0", - "dependsOn": [ - "json5@2.2.3", - "minimist@1.2.8", - "strip-bom@3.0.0" - ] + "dependsOn": ["json5@2.2.3", "minimist@1.2.8", "strip-bom@3.0.0"] }, { "ref": "json5@2.2.3" @@ -78099,16 +77762,11 @@ }, { "ref": "@dependents/detective-less@5.0.0", - "dependsOn": [ - "gonzales-pe@4.3.0", - "node-source-walk@7.0.0" - ] + "dependsOn": ["gonzales-pe@4.3.0", "node-source-walk@7.0.0"] }, { "ref": "gonzales-pe@4.3.0", - "dependsOn": [ - "minimist@1.2.8" - ] + "dependsOn": ["minimist@1.2.8"] }, { "ref": "detective-amd@6.0.0", @@ -78133,23 +77791,15 @@ }, { "ref": "get-amd-module-type@6.0.0", - "dependsOn": [ - "ast-module-types@6.0.0", - "node-source-walk@7.0.0" - ] + "dependsOn": ["ast-module-types@6.0.0", "node-source-walk@7.0.0"] }, { "ref": "detective-cjs@6.0.0", - "dependsOn": [ - "ast-module-types@6.0.0", - "node-source-walk@7.0.0" - ] + "dependsOn": ["ast-module-types@6.0.0", "node-source-walk@7.0.0"] }, { "ref": "detective-es6@5.0.0", - "dependsOn": [ - "node-source-walk@7.0.0" - ] + "dependsOn": ["node-source-walk@7.0.0"] }, { "ref": "detective-postcss@7.0.0", @@ -78182,17 +77832,11 @@ }, { "ref": "detective-sass@6.0.0", - "dependsOn": [ - "gonzales-pe@4.3.0", - "node-source-walk@7.0.0" - ] + "dependsOn": ["gonzales-pe@4.3.0", "node-source-walk@7.0.0"] }, { "ref": "detective-scss@5.0.0", - "dependsOn": [ - "gonzales-pe@4.3.0", - "node-source-walk@7.0.0" - ] + "dependsOn": ["gonzales-pe@4.3.0", "node-source-walk@7.0.0"] }, { "ref": "detective-stylus@5.0.0" @@ -78256,23 +77900,15 @@ }, { "ref": "@vue/compiler-dom@3.5.11", - "dependsOn": [ - "@vue/compiler-core@3.5.11", - "@vue/shared@3.5.11" - ] + "dependsOn": ["@vue/compiler-core@3.5.11", "@vue/shared@3.5.11"] }, { "ref": "@vue/compiler-ssr@3.5.11", - "dependsOn": [ - "@vue/compiler-dom@3.5.11", - "@vue/shared@3.5.11" - ] + "dependsOn": ["@vue/compiler-dom@3.5.11", "@vue/shared@3.5.11"] }, { "ref": "magic-string@0.30.11", - "dependsOn": [ - "@jridgewell/sourcemap-codec@1.5.0" - ] + "dependsOn": ["@jridgewell/sourcemap-codec@1.5.0"] }, { "ref": "@jridgewell/sourcemap-codec@1.5.0" @@ -78286,34 +77922,25 @@ }, { "ref": "tinyglobby@0.2.9|fdir@6.4.0", - "dependsOn": [ - "tinyglobby@0.2.9|picomatch@4.0.2" - ] + "dependsOn": ["tinyglobby@0.2.9|picomatch@4.0.2"] }, { "ref": "tinyglobby@0.2.9|picomatch@4.0.2" }, { "ref": "tsx@4.19.1", - "dependsOn": [ - "esbuild@0.23.1", - "get-tsconfig@4.8.1" - ] + "dependsOn": ["esbuild@0.23.1", "get-tsconfig@4.8.1"] }, { "ref": "esbuild@0.23.1", - "dependsOn": [ - "@esbuild/linux-x64@0.23.1" - ] + "dependsOn": ["@esbuild/linux-x64@0.23.1"] }, { "ref": "@esbuild/linux-x64@0.23.1" }, { "ref": "get-tsconfig@4.8.1", - "dependsOn": [ - "resolve-pkg-maps@1.0.0" - ] + "dependsOn": ["resolve-pkg-maps@1.0.0"] }, { "ref": "resolve-pkg-maps@1.0.0" @@ -78323,9 +77950,7 @@ }, { "ref": "dir-glob@3.0.1", - "dependsOn": [ - "path-type@4.0.0" - ] + "dependsOn": ["path-type@4.0.0"] }, { "ref": "path-type@4.0.0" @@ -78342,9 +77967,7 @@ }, { "ref": "fast-glob@3.3.2|glob-parent@5.1.2", - "dependsOn": [ - "is-glob@4.0.3" - ] + "dependsOn": ["is-glob@4.0.3"] }, { "ref": "merge2@1.4.1" @@ -78398,11 +78021,7 @@ }, { "ref": "http-signature@1.4.0", - "dependsOn": [ - "assert-plus@1.0.0", - "jsprim@2.0.2", - "sshpk@1.18.0" - ] + "dependsOn": ["assert-plus@1.0.0", "jsprim@2.0.2", "sshpk@1.18.0"] }, { "ref": "assert-plus@1.0.0" @@ -78449,43 +78068,32 @@ }, { "ref": "asn1@0.2.6", - "dependsOn": [ - "safer-buffer@2.1.2" - ] + "dependsOn": ["safer-buffer@2.1.2"] }, { "ref": "safer-buffer@2.1.2" }, { "ref": "bcrypt-pbkdf@1.0.2", - "dependsOn": [ - "tweetnacl@0.14.5" - ] + "dependsOn": ["tweetnacl@0.14.5"] }, { "ref": "tweetnacl@0.14.5" }, { "ref": "dashdash@1.14.1", - "dependsOn": [ - "assert-plus@1.0.0" - ] + "dependsOn": ["assert-plus@1.0.0"] }, { "ref": "ecc-jsbn@0.1.2", - "dependsOn": [ - "jsbn@0.1.1", - "safer-buffer@2.1.2" - ] + "dependsOn": ["jsbn@0.1.1", "safer-buffer@2.1.2"] }, { "ref": "jsbn@0.1.1" }, { "ref": "getpass@0.1.7", - "dependsOn": [ - "assert-plus@1.0.0" - ] + "dependsOn": ["assert-plus@1.0.0"] }, { "ref": "is-typedarray@1.0.0" @@ -78501,9 +78109,7 @@ }, { "ref": "qs@6.13.0", - "dependsOn": [ - "side-channel@1.0.6" - ] + "dependsOn": ["side-channel@1.0.6"] }, { "ref": "safe-buffer@5.2.1" @@ -78525,10 +78131,7 @@ }, { "ref": "url-parse@1.5.10", - "dependsOn": [ - "querystringify@2.2.0", - "requires-port@1.0.0" - ] + "dependsOn": ["querystringify@2.2.0", "requires-port@1.0.0"] }, { "ref": "querystringify@2.2.0" @@ -78538,22 +78141,15 @@ }, { "ref": "tunnel-agent@0.6.0", - "dependsOn": [ - "safe-buffer@5.2.1" - ] + "dependsOn": ["safe-buffer@5.2.1"] }, { "ref": "@cypress/xvfb@1.2.4", - "dependsOn": [ - "@cypress/xvfb@1.2.4|debug@3.2.7", - "lodash.once@4.1.1" - ] + "dependsOn": ["@cypress/xvfb@1.2.4|debug@3.2.7", "lodash.once@4.1.1"] }, { "ref": "@cypress/xvfb@1.2.4|debug@3.2.7", - "dependsOn": [ - "ms@2.1.3" - ] + "dependsOn": ["ms@2.1.3"] }, { "ref": "lodash.once@4.1.1" @@ -78575,10 +78171,7 @@ }, { "ref": "buffer@5.7.1", - "dependsOn": [ - "base64-js@1.5.1", - "ieee754@1.2.1" - ] + "dependsOn": ["base64-js@1.5.1", "ieee754@1.2.1"] }, { "ref": "base64-js@1.5.1" @@ -78591,15 +78184,11 @@ }, { "ref": "ansi-styles@4.3.0", - "dependsOn": [ - "color-convert@2.0.1" - ] + "dependsOn": ["color-convert@2.0.1"] }, { "ref": "color-convert@2.0.1", - "dependsOn": [ - "color-name@1.1.4" - ] + "dependsOn": ["color-name@1.1.4"] }, { "ref": "has-flag@4.0.0" @@ -78609,32 +78198,22 @@ }, { "ref": "cli-cursor@3.1.0", - "dependsOn": [ - "restore-cursor@3.1.0" - ] + "dependsOn": ["restore-cursor@3.1.0"] }, { "ref": "restore-cursor@3.1.0", - "dependsOn": [ - "onetime@5.1.2", - "signal-exit@3.0.7" - ] + "dependsOn": ["onetime@5.1.2", "signal-exit@3.0.7"] }, { "ref": "onetime@5.1.2", - "dependsOn": [ - "mimic-fn@2.1.0" - ] + "dependsOn": ["mimic-fn@2.1.0"] }, { "ref": "signal-exit@3.0.7" }, { "ref": "cli-table3@0.6.5", - "dependsOn": [ - "@colors/colors@1.5.0", - "string-width@4.2.3" - ] + "dependsOn": ["@colors/colors@1.5.0", "string-width@4.2.3"] }, { "ref": "@colors/colors@1.5.0" @@ -78664,10 +78243,7 @@ }, { "ref": "enquirer@2.4.1", - "dependsOn": [ - "ansi-colors@4.1.3", - "strip-ansi@6.0.1" - ] + "dependsOn": ["ansi-colors@4.1.3", "strip-ansi@6.0.1"] }, { "ref": "ansi-colors@4.1.3" @@ -78691,22 +78267,15 @@ }, { "ref": "get-stream@5.2.0", - "dependsOn": [ - "pump@3.0.2" - ] + "dependsOn": ["pump@3.0.2"] }, { "ref": "pump@3.0.2", - "dependsOn": [ - "end-of-stream@1.4.4", - "once@1.4.0" - ] + "dependsOn": ["end-of-stream@1.4.4", "once@1.4.0"] }, { "ref": "end-of-stream@1.4.4", - "dependsOn": [ - "once@1.4.0" - ] + "dependsOn": ["once@1.4.0"] }, { "ref": "human-signals@1.1.1" @@ -78719,9 +78288,7 @@ }, { "ref": "npm-run-path@4.0.1", - "dependsOn": [ - "path-key@3.1.1" - ] + "dependsOn": ["path-key@3.1.1"] }, { "ref": "mimic-fn@2.1.0" @@ -78731,9 +78298,7 @@ }, { "ref": "executable@4.1.1", - "dependsOn": [ - "pify@2.3.0" - ] + "dependsOn": ["pify@2.3.0"] }, { "ref": "pify@2.3.0" @@ -78749,22 +78314,15 @@ }, { "ref": "@types/yauzl@2.10.3", - "dependsOn": [ - "@types/node@22.7.5" - ] + "dependsOn": ["@types/node@22.7.5"] }, { "ref": "yauzl@2.10.0", - "dependsOn": [ - "buffer-crc32@0.2.13", - "fd-slicer@1.1.0" - ] + "dependsOn": ["buffer-crc32@0.2.13", "fd-slicer@1.1.0"] }, { "ref": "figures@3.2.0", - "dependsOn": [ - "figures@3.2.0|escape-string-regexp@1.0.5" - ] + "dependsOn": ["figures@3.2.0|escape-string-regexp@1.0.5"] }, { "ref": "figures@3.2.0|escape-string-regexp@1.0.5" @@ -78786,44 +78344,32 @@ }, { "ref": "jsonfile@6.1.0", - "dependsOn": [ - "graceful-fs@4.2.11", - "universalify@2.0.1" - ] + "dependsOn": ["graceful-fs@4.2.11", "universalify@2.0.1"] }, { "ref": "universalify@2.0.1" }, { "ref": "getos@3.2.1", - "dependsOn": [ - "async@3.2.6" - ] + "dependsOn": ["async@3.2.6"] }, { "ref": "async@3.2.6" }, { "ref": "is-ci@3.0.1", - "dependsOn": [ - "ci-info@3.9.0" - ] + "dependsOn": ["ci-info@3.9.0"] }, { "ref": "ci-info@3.9.0" }, { "ref": "is-installed-globally@0.4.0", - "dependsOn": [ - "global-dirs@3.0.1", - "is-path-inside@3.0.3" - ] + "dependsOn": ["global-dirs@3.0.1", "is-path-inside@3.0.3"] }, { "ref": "global-dirs@3.0.1", - "dependsOn": [ - "ini@2.0.0" - ] + "dependsOn": ["ini@2.0.0"] }, { "ref": "ini@2.0.0" @@ -78855,10 +78401,7 @@ }, { "ref": "cli-truncate@2.1.0", - "dependsOn": [ - "slice-ansi@3.0.0", - "string-width@4.2.3" - ] + "dependsOn": ["slice-ansi@3.0.0", "string-width@4.2.3"] }, { "ref": "slice-ansi@3.0.0", @@ -78901,25 +78444,18 @@ }, { "ref": "ansi-escapes@4.3.2", - "dependsOn": [ - "ansi-escapes@4.3.2|type-fest@0.21.3" - ] + "dependsOn": ["ansi-escapes@4.3.2|type-fest@0.21.3"] }, { "ref": "ansi-escapes@4.3.2|type-fest@0.21.3" }, { - "ref": "p-map@4.0.0", - "dependsOn": [ - "aggregate-error@3.1.0" - ] + "ref": "p-map@4.0.0", + "dependsOn": ["aggregate-error@3.1.0"] }, { "ref": "aggregate-error@3.1.0", - "dependsOn": [ - "clean-stack@2.2.0", - "indent-string@4.0.0" - ] + "dependsOn": ["clean-stack@2.2.0", "indent-string@4.0.0"] }, { "ref": "clean-stack@2.2.0" @@ -78932,9 +78468,7 @@ }, { "ref": "rxjs@7.8.1", - "dependsOn": [ - "tslib@2.7.0" - ] + "dependsOn": ["tslib@2.7.0"] }, { "ref": "through@2.3.8" @@ -78944,10 +78478,7 @@ }, { "ref": "log-symbols@4.1.0", - "dependsOn": [ - "chalk@4.1.2", - "is-unicode-supported@0.1.0" - ] + "dependsOn": ["chalk@4.1.2", "is-unicode-supported@0.1.0"] }, { "ref": "is-unicode-supported@0.1.0" @@ -78963,18 +78494,14 @@ }, { "ref": "request-progress@3.0.0", - "dependsOn": [ - "throttleit@1.0.1" - ] + "dependsOn": ["throttleit@1.0.1"] }, { "ref": "throttleit@1.0.1" }, { "ref": "supports-color@8.1.1", - "dependsOn": [ - "has-flag@4.0.0" - ] + "dependsOn": ["has-flag@4.0.0"] }, { "ref": "tmp@0.2.3" @@ -78987,9 +78514,7 @@ }, { "ref": "fd-slicer@1.1.0", - "dependsOn": [ - "pend@1.2.0" - ] + "dependsOn": ["pend@1.2.0"] }, { "ref": "pend@1.2.0" @@ -79005,10 +78530,7 @@ }, { "ref": "echarts@5.5.1", - "dependsOn": [ - "echarts@5.5.1|tslib@2.3.0", - "zrender@5.6.0" - ] + "dependsOn": ["echarts@5.5.1|tslib@2.3.0", "zrender@5.6.0"] }, { "ref": "echarts@5.5.1|tslib@2.3.0" @@ -79018,25 +78540,18 @@ }, { "ref": "zrender@5.6.0", - "dependsOn": [ - "zrender@5.6.0|tslib@2.3.0" - ] + "dependsOn": ["zrender@5.6.0|tslib@2.3.0"] }, { "ref": "zrender@5.6.0|tslib@2.3.0" }, { "ref": "eslint-config-prettier@9.1.0", - "dependsOn": [ - "eslint@8.57.1" - ] + "dependsOn": ["eslint@8.57.1"] }, { "ref": "eslint-plugin-i18next@6.1.0", - "dependsOn": [ - "lodash@4.17.21", - "requireindex@1.1.0" - ] + "dependsOn": ["lodash@4.17.21", "requireindex@1.1.0"] }, { "ref": "requireindex@1.1.0" @@ -79077,16 +78592,11 @@ }, { "ref": "estree-util-visit@2.0.0", - "dependsOn": [ - "@types/estree-jsx@1.0.5", - "@types/unist@3.0.3" - ] + "dependsOn": ["@types/estree-jsx@1.0.5", "@types/unist@3.0.3"] }, { "ref": "@types/estree-jsx@1.0.5", - "dependsOn": [ - "@types/estree@1.0.6" - ] + "dependsOn": ["@types/estree@1.0.6"] }, { "ref": "@types/estree@1.0.6" @@ -79096,10 +78606,7 @@ }, { "ref": "remark-mdx@3.0.1", - "dependsOn": [ - "mdast-util-mdx@3.0.0", - "micromark-extension-mdxjs@3.0.0" - ] + "dependsOn": ["mdast-util-mdx@3.0.0", "micromark-extension-mdxjs@3.0.0"] }, { "ref": "remark-parse@11.0.0", @@ -79112,9 +78619,7 @@ }, { "ref": "remark-parse@11.0.0|@types/mdast@4.0.4", - "dependsOn": [ - "@types/unist@3.0.3" - ] + "dependsOn": ["@types/unist@3.0.3"] }, { "ref": "remark-parse@11.0.0|mdast-util-from-markdown@2.0.1", @@ -79135,9 +78640,7 @@ }, { "ref": "remark-parse@11.0.0|mdast-util-to-string@4.0.0", - "dependsOn": [ - "remark-parse@11.0.0|@types/mdast@4.0.4" - ] + "dependsOn": ["remark-parse@11.0.0|@types/mdast@4.0.4"] }, { "ref": "remark-parse@11.0.0|micromark@4.0.0", @@ -79174,9 +78677,7 @@ }, { "ref": "remark-parse@11.0.0|unist-util-stringify-position@4.0.0", - "dependsOn": [ - "@types/unist@3.0.3" - ] + "dependsOn": ["@types/unist@3.0.3"] }, { "ref": "remark-stringify@11.0.0", @@ -79188,16 +78689,11 @@ }, { "ref": "remark-stringify@11.0.0|@types/mdast@4.0.4", - "dependsOn": [ - "@types/unist@3.0.3" - ] + "dependsOn": ["@types/unist@3.0.3"] }, { "ref": "synckit@0.9.2", - "dependsOn": [ - "@pkgr/core@0.1.1", - "tslib@2.7.0" - ] + "dependsOn": ["@pkgr/core@0.1.1", "tslib@2.7.0"] }, { "ref": "unified-engine@11.2.1", @@ -79227,9 +78723,7 @@ }, { "ref": "unified-engine@11.2.1|@types/node@20.16.11", - "dependsOn": [ - "undici-types@6.19.8" - ] + "dependsOn": ["undici-types@6.19.8"] }, { "ref": "unified-engine@11.2.1|glob@10.4.5", @@ -79244,17 +78738,11 @@ }, { "ref": "unified-engine@11.2.1|jackspeak@3.4.3", - "dependsOn": [ - "@isaacs/cliui@8.0.2", - "@pkgjs/parseargs@0.11.0" - ] + "dependsOn": ["@isaacs/cliui@8.0.2", "@pkgjs/parseargs@0.11.0"] }, { "ref": "unified-engine@11.2.1|path-scurry@1.11.1", - "dependsOn": [ - "unified-engine@11.2.1|lru-cache@10.4.3", - "minipass@7.1.2" - ] + "dependsOn": ["unified-engine@11.2.1|lru-cache@10.4.3", "minipass@7.1.2"] }, { "ref": "unified-engine@11.2.1|lru-cache@10.4.3" @@ -79280,15 +78768,11 @@ }, { "ref": "@types/concat-stream@2.0.3", - "dependsOn": [ - "@types/node@22.7.5" - ] + "dependsOn": ["@types/node@22.7.5"] }, { "ref": "@types/debug@4.1.12", - "dependsOn": [ - "@types/ms@0.7.34" - ] + "dependsOn": ["@types/ms@0.7.34"] }, { "ref": "@types/ms@0.7.34" @@ -79318,9 +78802,7 @@ }, { "ref": "string_decoder@1.3.0", - "dependsOn": [ - "safe-buffer@5.2.1" - ] + "dependsOn": ["safe-buffer@5.2.1"] }, { "ref": "typedarray@0.0.6" @@ -79359,9 +78841,7 @@ }, { "ref": "@isaacs/cliui@8.0.2|strip-ansi@7.1.0", - "dependsOn": [ - "@isaacs/cliui@8.0.2|ansi-regex@6.1.0" - ] + "dependsOn": ["@isaacs/cliui@8.0.2|ansi-regex@6.1.0"] }, { "ref": "@isaacs/cliui@8.0.2|ansi-regex@6.1.0" @@ -79383,10 +78863,7 @@ }, { "ref": "load-plugin@6.0.3", - "dependsOn": [ - "@npmcli/config@8.3.4", - "import-meta-resolve@4.1.0" - ] + "dependsOn": ["@npmcli/config@8.3.4", "import-meta-resolve@4.1.0"] }, { "ref": "@npmcli/config@8.3.4", @@ -79409,9 +78886,7 @@ }, { "ref": "@npmcli/config@8.3.4|nopt@7.2.1", - "dependsOn": [ - "@npmcli/config@8.3.4|abbrev@2.0.0" - ] + "dependsOn": ["@npmcli/config@8.3.4|abbrev@2.0.0"] }, { "ref": "@npmcli/config@8.3.4|abbrev@2.0.0" @@ -79438,10 +78913,7 @@ }, { "ref": "@npmcli/map-workspaces@3.0.6|jackspeak@3.4.3", - "dependsOn": [ - "@isaacs/cliui@8.0.2", - "@pkgjs/parseargs@0.11.0" - ] + "dependsOn": ["@isaacs/cliui@8.0.2", "@pkgjs/parseargs@0.11.0"] }, { "ref": "@npmcli/map-workspaces@3.0.6|path-scurry@1.11.1", @@ -79494,10 +78966,7 @@ }, { "ref": "@npmcli/package-json@5.2.1|jackspeak@3.4.3", - "dependsOn": [ - "@isaacs/cliui@8.0.2", - "@pkgjs/parseargs@0.11.0" - ] + "dependsOn": ["@isaacs/cliui@8.0.2", "@pkgjs/parseargs@0.11.0"] }, { "ref": "@npmcli/package-json@5.2.1|path-scurry@1.11.1", @@ -79534,24 +79003,18 @@ }, { "ref": "@npmcli/git@5.0.8|which@4.0.0", - "dependsOn": [ - "@npmcli/git@5.0.8|isexe@3.1.1" - ] + "dependsOn": ["@npmcli/git@5.0.8|isexe@3.1.1"] }, { "ref": "@npmcli/git@5.0.8|isexe@3.1.1" }, { "ref": "@npmcli/promise-spawn@7.0.2", - "dependsOn": [ - "@npmcli/promise-spawn@7.0.2|which@4.0.0" - ] + "dependsOn": ["@npmcli/promise-spawn@7.0.2|which@4.0.0"] }, { "ref": "@npmcli/promise-spawn@7.0.2|which@4.0.0", - "dependsOn": [ - "@npmcli/promise-spawn@7.0.2|isexe@3.1.1" - ] + "dependsOn": ["@npmcli/promise-spawn@7.0.2|isexe@3.1.1"] }, { "ref": "@npmcli/promise-spawn@7.0.2|isexe@3.1.1" @@ -79567,9 +79030,7 @@ }, { "ref": "npm-install-checks@6.3.0", - "dependsOn": [ - "semver@7.6.3" - ] + "dependsOn": ["semver@7.6.3"] }, { "ref": "npm-package-arg@11.0.3", @@ -79582,9 +79043,7 @@ }, { "ref": "hosted-git-info@7.0.2", - "dependsOn": [ - "hosted-git-info@7.0.2|lru-cache@10.4.3" - ] + "dependsOn": ["hosted-git-info@7.0.2|lru-cache@10.4.3"] }, { "ref": "hosted-git-info@7.0.2|lru-cache@10.4.3" @@ -79600,10 +79059,7 @@ }, { "ref": "promise-retry@2.0.1", - "dependsOn": [ - "err-code@2.0.3", - "retry@0.12.0" - ] + "dependsOn": ["err-code@2.0.3", "retry@0.12.0"] }, { "ref": "err-code@2.0.3" @@ -79621,24 +79077,15 @@ }, { "ref": "validate-npm-package-license@3.0.4", - "dependsOn": [ - "spdx-correct@3.2.0", - "spdx-expression-parse@3.0.1" - ] + "dependsOn": ["spdx-correct@3.2.0", "spdx-expression-parse@3.0.1"] }, { "ref": "spdx-correct@3.2.0", - "dependsOn": [ - "spdx-expression-parse@3.0.1", - "spdx-license-ids@3.0.20" - ] + "dependsOn": ["spdx-expression-parse@3.0.1", "spdx-license-ids@3.0.20"] }, { "ref": "spdx-expression-parse@3.0.1", - "dependsOn": [ - "spdx-exceptions@2.5.0", - "spdx-license-ids@3.0.20" - ] + "dependsOn": ["spdx-exceptions@2.5.0", "spdx-license-ids@3.0.20"] }, { "ref": "spdx-license-ids@3.0.20" @@ -79654,25 +79101,18 @@ }, { "ref": "@babel/code-frame@7.25.7", - "dependsOn": [ - "@babel/highlight@7.25.7", - "picocolors@1.1.0" - ] + "dependsOn": ["@babel/highlight@7.25.7", "picocolors@1.1.0"] }, { "ref": "error-ex@1.3.2", - "dependsOn": [ - "is-arrayish@0.2.1" - ] + "dependsOn": ["is-arrayish@0.2.1"] }, { "ref": "trough@2.2.0" }, { "ref": "unist-util-inspect@8.1.0", - "dependsOn": [ - "@types/unist@3.0.3" - ] + "dependsOn": ["@types/unist@3.0.3"] }, { "ref": "vfile-message@4.0.2", @@ -79683,9 +79123,7 @@ }, { "ref": "vfile-message@4.0.2|unist-util-stringify-position@4.0.0", - "dependsOn": [ - "@types/unist@3.0.3" - ] + "dependsOn": ["@types/unist@3.0.3"] }, { "ref": "vfile-reporter@8.1.1", @@ -79713,9 +79151,7 @@ }, { "ref": "vfile-reporter@8.1.1|strip-ansi@7.1.0", - "dependsOn": [ - "vfile-reporter@8.1.1|ansi-regex@6.1.0" - ] + "dependsOn": ["vfile-reporter@8.1.1|ansi-regex@6.1.0"] }, { "ref": "vfile-reporter@8.1.1|ansi-regex@6.1.0" @@ -79725,9 +79161,7 @@ }, { "ref": "vfile-reporter@8.1.1|unist-util-stringify-position@4.0.0", - "dependsOn": [ - "@types/unist@3.0.3" - ] + "dependsOn": ["@types/unist@3.0.3"] }, { "ref": "@types/supports-color@8.1.3" @@ -79737,24 +79171,15 @@ }, { "ref": "vfile-sort@4.0.0", - "dependsOn": [ - "vfile-message@4.0.2", - "vfile@6.0.3" - ] + "dependsOn": ["vfile-message@4.0.2", "vfile@6.0.3"] }, { "ref": "vfile@6.0.3", - "dependsOn": [ - "@types/unist@3.0.3", - "vfile-message@4.0.2" - ] + "dependsOn": ["@types/unist@3.0.3", "vfile-message@4.0.2"] }, { "ref": "vfile-statistics@3.0.0", - "dependsOn": [ - "vfile-message@4.0.2", - "vfile@6.0.3" - ] + "dependsOn": ["vfile-message@4.0.2", "vfile@6.0.3"] }, { "ref": "yaml@2.3.1" @@ -79781,25 +79206,15 @@ }, { "ref": "unist-util-is@6.0.0", - "dependsOn": [ - "@types/unist@3.0.3" - ] + "dependsOn": ["@types/unist@3.0.3"] }, { "ref": "unist-util-visit-parents@6.0.1", - "dependsOn": [ - "@types/unist@3.0.3", - "unist-util-is@6.0.0" - ] + "dependsOn": ["@types/unist@3.0.3", "unist-util-is@6.0.0"] }, { "ref": "uvu@0.5.6", - "dependsOn": [ - "dequal@2.0.3", - "diff@5.2.0", - "kleur@4.1.5", - "sade@1.8.1" - ] + "dependsOn": ["dequal@2.0.3", "diff@5.2.0", "kleur@4.1.5", "sade@1.8.1"] }, { "ref": "dequal@2.0.3" @@ -79812,19 +79227,14 @@ }, { "ref": "sade@1.8.1", - "dependsOn": [ - "mri@1.2.0" - ] + "dependsOn": ["mri@1.2.0"] }, { "ref": "mri@1.2.0" }, { "ref": "eslint-plugin-markdown@3.0.1", - "dependsOn": [ - "eslint@8.57.1", - "mdast-util-from-markdown@0.8.5" - ] + "dependsOn": ["eslint@8.57.1", "mdast-util-from-markdown@0.8.5"] }, { "ref": "mdast-util-from-markdown@0.8.5", @@ -79838,9 +79248,7 @@ }, { "ref": "@types/mdast@3.0.15", - "dependsOn": [ - "@types/mdast@3.0.15|@types/unist@2.0.11" - ] + "dependsOn": ["@types/mdast@3.0.15|@types/unist@2.0.11"] }, { "ref": "@types/mdast@3.0.15|@types/unist@2.0.11" @@ -79850,10 +79258,7 @@ }, { "ref": "micromark@2.11.4", - "dependsOn": [ - "debug@4.3.7", - "parse-entities@2.0.0" - ] + "dependsOn": ["debug@4.3.7", "parse-entities@2.0.0"] }, { "ref": "parse-entities@2.0.0", @@ -79877,10 +79282,7 @@ }, { "ref": "is-alphanumerical@1.0.4", - "dependsOn": [ - "is-alphabetical@1.0.4", - "is-decimal@1.0.4" - ] + "dependsOn": ["is-alphabetical@1.0.4", "is-decimal@1.0.4"] }, { "ref": "is-alphabetical@1.0.4" @@ -79893,9 +79295,7 @@ }, { "ref": "unist-util-stringify-position@2.0.3", - "dependsOn": [ - "unist-util-stringify-position@2.0.3|@types/unist@2.0.11" - ] + "dependsOn": ["unist-util-stringify-position@2.0.3|@types/unist@2.0.11"] }, { "ref": "unist-util-stringify-position@2.0.3|@types/unist@2.0.11" @@ -79929,15 +79329,11 @@ }, { "ref": "mdast-util-mdx@3.0.0|@types/mdast@4.0.4", - "dependsOn": [ - "@types/unist@3.0.3" - ] + "dependsOn": ["@types/unist@3.0.3"] }, { "ref": "mdast-util-mdx@3.0.0|mdast-util-to-string@4.0.0", - "dependsOn": [ - "mdast-util-mdx@3.0.0|@types/mdast@4.0.4" - ] + "dependsOn": ["mdast-util-mdx@3.0.0|@types/mdast@4.0.4"] }, { "ref": "mdast-util-mdx@3.0.0|micromark@4.0.0", @@ -79974,9 +79370,7 @@ }, { "ref": "mdast-util-mdx@3.0.0|unist-util-stringify-position@4.0.0", - "dependsOn": [ - "@types/unist@3.0.3" - ] + "dependsOn": ["@types/unist@3.0.3"] }, { "ref": "decode-named-character-reference@1.0.2", @@ -79989,15 +79383,11 @@ }, { "ref": "devlop@1.1.0", - "dependsOn": [ - "dequal@2.0.3" - ] + "dependsOn": ["dequal@2.0.3"] }, { "ref": "micromark-util-decode-numeric-character-reference@2.0.1", - "dependsOn": [ - "micromark-util-symbol@2.0.0" - ] + "dependsOn": ["micromark-util-symbol@2.0.0"] }, { "ref": "micromark-util-decode-string@2.0.0", @@ -80010,9 +79400,7 @@ }, { "ref": "micromark-util-normalize-identifier@2.0.0", - "dependsOn": [ - "micromark-util-symbol@2.0.0" - ] + "dependsOn": ["micromark-util-symbol@2.0.0"] }, { "ref": "micromark-util-symbol@2.0.0" @@ -80050,16 +79438,11 @@ }, { "ref": "micromark-util-character@2.1.0", - "dependsOn": [ - "micromark-util-symbol@2.0.0", - "micromark-util-types@2.0.0" - ] + "dependsOn": ["micromark-util-symbol@2.0.0", "micromark-util-types@2.0.0"] }, { "ref": "micromark-util-chunked@2.0.0", - "dependsOn": [ - "micromark-util-symbol@2.0.0" - ] + "dependsOn": ["micromark-util-symbol@2.0.0"] }, { "ref": "micromark-util-combine-extensions@2.0.0", @@ -80070,9 +79453,7 @@ }, { "ref": "micromark-util-resolve-all@2.0.0", - "dependsOn": [ - "micromark-util-types@2.0.0" - ] + "dependsOn": ["micromark-util-types@2.0.0"] }, { "ref": "micromark-util-subtokenize@2.0.1", @@ -80096,15 +79477,11 @@ }, { "ref": "mdast-util-mdx-expression@2.0.1|@types/hast@3.0.4", - "dependsOn": [ - "@types/unist@3.0.3" - ] + "dependsOn": ["@types/unist@3.0.3"] }, { "ref": "mdast-util-mdx-expression@2.0.1|@types/mdast@4.0.4", - "dependsOn": [ - "@types/unist@3.0.3" - ] + "dependsOn": ["@types/unist@3.0.3"] }, { "ref": "mdast-util-mdx-expression@2.0.1|mdast-util-from-markdown@2.0.1", @@ -80125,9 +79502,7 @@ }, { "ref": "mdast-util-mdx-expression@2.0.1|mdast-util-to-string@4.0.0", - "dependsOn": [ - "mdast-util-mdx-expression@2.0.1|@types/mdast@4.0.4" - ] + "dependsOn": ["mdast-util-mdx-expression@2.0.1|@types/mdast@4.0.4"] }, { "ref": "mdast-util-mdx-expression@2.0.1|micromark@4.0.0", @@ -80164,9 +79539,7 @@ }, { "ref": "mdast-util-mdx-expression@2.0.1|unist-util-stringify-position@4.0.0", - "dependsOn": [ - "@types/unist@3.0.3" - ] + "dependsOn": ["@types/unist@3.0.3"] }, { "ref": "mdast-util-to-markdown@2.1.0", @@ -80183,15 +79556,11 @@ }, { "ref": "mdast-util-to-markdown@2.1.0|@types/mdast@4.0.4", - "dependsOn": [ - "@types/unist@3.0.3" - ] + "dependsOn": ["@types/unist@3.0.3"] }, { "ref": "mdast-util-to-markdown@2.1.0|mdast-util-to-string@4.0.0", - "dependsOn": [ - "mdast-util-to-markdown@2.1.0|@types/mdast@4.0.4" - ] + "dependsOn": ["mdast-util-to-markdown@2.1.0|@types/mdast@4.0.4"] }, { "ref": "mdast-util-mdx-jsx@3.1.3", @@ -80212,15 +79581,11 @@ }, { "ref": "mdast-util-mdx-jsx@3.1.3|@types/hast@3.0.4", - "dependsOn": [ - "@types/unist@3.0.3" - ] + "dependsOn": ["@types/unist@3.0.3"] }, { "ref": "mdast-util-mdx-jsx@3.1.3|@types/mdast@4.0.4", - "dependsOn": [ - "@types/unist@3.0.3" - ] + "dependsOn": ["@types/unist@3.0.3"] }, { "ref": "mdast-util-mdx-jsx@3.1.3|mdast-util-from-markdown@2.0.1", @@ -80241,9 +79606,7 @@ }, { "ref": "mdast-util-mdx-jsx@3.1.3|mdast-util-to-string@4.0.0", - "dependsOn": [ - "mdast-util-mdx-jsx@3.1.3|@types/mdast@4.0.4" - ] + "dependsOn": ["mdast-util-mdx-jsx@3.1.3|@types/mdast@4.0.4"] }, { "ref": "mdast-util-mdx-jsx@3.1.3|micromark@4.0.0", @@ -80280,9 +79643,7 @@ }, { "ref": "mdast-util-mdx-jsx@3.1.3|unist-util-stringify-position@4.0.0", - "dependsOn": [ - "@types/unist@3.0.3" - ] + "dependsOn": ["@types/unist@3.0.3"] }, { "ref": "mdast-util-mdx-jsx@3.1.3|parse-entities@4.0.1", @@ -80354,15 +79715,11 @@ }, { "ref": "mdast-util-mdxjs-esm@2.0.1|@types/hast@3.0.4", - "dependsOn": [ - "@types/unist@3.0.3" - ] + "dependsOn": ["@types/unist@3.0.3"] }, { "ref": "mdast-util-mdxjs-esm@2.0.1|@types/mdast@4.0.4", - "dependsOn": [ - "@types/unist@3.0.3" - ] + "dependsOn": ["@types/unist@3.0.3"] }, { "ref": "mdast-util-mdxjs-esm@2.0.1|mdast-util-from-markdown@2.0.1", @@ -80383,9 +79740,7 @@ }, { "ref": "mdast-util-mdxjs-esm@2.0.1|mdast-util-to-string@4.0.0", - "dependsOn": [ - "mdast-util-mdxjs-esm@2.0.1|@types/mdast@4.0.4" - ] + "dependsOn": ["mdast-util-mdxjs-esm@2.0.1|@types/mdast@4.0.4"] }, { "ref": "mdast-util-mdxjs-esm@2.0.1|micromark@4.0.0", @@ -80422,9 +79777,7 @@ }, { "ref": "mdast-util-mdxjs-esm@2.0.1|unist-util-stringify-position@4.0.0", - "dependsOn": [ - "@types/unist@3.0.3" - ] + "dependsOn": ["@types/unist@3.0.3"] }, { "ref": "micromark-extension-mdxjs@3.0.0", @@ -80481,15 +79834,11 @@ }, { "ref": "unist-util-position-from-estree@2.0.0", - "dependsOn": [ - "@types/unist@3.0.3" - ] + "dependsOn": ["@types/unist@3.0.3"] }, { "ref": "@types/acorn@4.0.6", - "dependsOn": [ - "@types/estree@1.0.6" - ] + "dependsOn": ["@types/estree@1.0.6"] }, { "ref": "micromark-extension-mdx-jsx@3.0.1", @@ -80512,9 +79861,7 @@ }, { "ref": "micromark-extension-mdx-md@2.0.0", - "dependsOn": [ - "micromark-util-types@2.0.0" - ] + "dependsOn": ["micromark-util-types@2.0.0"] }, { "ref": "micromark-extension-mdxjs-esm@3.0.0", @@ -80588,9 +79935,7 @@ }, { "ref": "mdast-util-phrasing@4.1.0|@types/mdast@4.0.4", - "dependsOn": [ - "@types/unist@3.0.3" - ] + "dependsOn": ["@types/unist@3.0.3"] }, { "ref": "zwitch@2.0.4" @@ -80610,9 +79955,7 @@ }, { "ref": "prettier-linter-helpers@1.0.0", - "dependsOn": [ - "fast-diff@1.3.0" - ] + "dependsOn": ["fast-diff@1.3.0"] }, { "ref": "fast-diff@1.3.0" @@ -80625,9 +79968,7 @@ }, { "ref": "eslint-plugin-react-hooks@4.6.2", - "dependsOn": [ - "eslint@8.57.1" - ] + "dependsOn": ["eslint@8.57.1"] }, { "ref": "eslint-plugin-react@7.37.1", @@ -80655,22 +79996,15 @@ }, { "ref": "eslint-plugin-react@7.37.1|doctrine@2.1.0", - "dependsOn": [ - "esutils@2.0.3" - ] + "dependsOn": ["esutils@2.0.3"] }, { "ref": "eslint-plugin-react@7.37.1|minimatch@3.1.2", - "dependsOn": [ - "eslint-plugin-react@7.37.1|brace-expansion@1.1.11" - ] + "dependsOn": ["eslint-plugin-react@7.37.1|brace-expansion@1.1.11"] }, { "ref": "eslint-plugin-react@7.37.1|brace-expansion@1.1.11", - "dependsOn": [ - "balanced-match@1.0.2", - "concat-map@0.0.1" - ] + "dependsOn": ["balanced-match@1.0.2", "concat-map@0.0.1"] }, { "ref": "eslint-plugin-react@7.37.1|semver@6.3.1" @@ -80688,9 +80022,7 @@ }, { "ref": "es-define-property@1.0.0", - "dependsOn": [ - "get-intrinsic@1.2.4" - ] + "dependsOn": ["get-intrinsic@1.2.4"] }, { "ref": "es-errors@1.3.0" @@ -80711,23 +80043,15 @@ }, { "ref": "define-data-property@1.1.4", - "dependsOn": [ - "es-define-property@1.0.0", - "es-errors@1.3.0", - "gopd@1.0.1" - ] + "dependsOn": ["es-define-property@1.0.0", "es-errors@1.3.0", "gopd@1.0.1"] }, { "ref": "gopd@1.0.1", - "dependsOn": [ - "get-intrinsic@1.2.4" - ] + "dependsOn": ["get-intrinsic@1.2.4"] }, { "ref": "has-property-descriptors@1.0.2", - "dependsOn": [ - "es-define-property@1.0.0" - ] + "dependsOn": ["es-define-property@1.0.0"] }, { "ref": "es-abstract@1.23.3", @@ -80795,48 +80119,30 @@ }, { "ref": "available-typed-arrays@1.0.7", - "dependsOn": [ - "possible-typed-array-names@1.0.0" - ] + "dependsOn": ["possible-typed-array-names@1.0.0"] }, { "ref": "possible-typed-array-names@1.0.0" }, { "ref": "data-view-buffer@1.0.1", - "dependsOn": [ - "call-bind@1.0.7", - "es-errors@1.3.0", - "is-data-view@1.0.1" - ] + "dependsOn": ["call-bind@1.0.7", "es-errors@1.3.0", "is-data-view@1.0.1"] }, { "ref": "is-data-view@1.0.1", - "dependsOn": [ - "is-typed-array@1.1.13" - ] + "dependsOn": ["is-typed-array@1.1.13"] }, { "ref": "data-view-byte-length@1.0.1", - "dependsOn": [ - "call-bind@1.0.7", - "es-errors@1.3.0", - "is-data-view@1.0.1" - ] + "dependsOn": ["call-bind@1.0.7", "es-errors@1.3.0", "is-data-view@1.0.1"] }, { "ref": "data-view-byte-offset@1.0.0", - "dependsOn": [ - "call-bind@1.0.7", - "es-errors@1.3.0", - "is-data-view@1.0.1" - ] + "dependsOn": ["call-bind@1.0.7", "es-errors@1.3.0", "is-data-view@1.0.1"] }, { "ref": "es-object-atoms@1.0.0", - "dependsOn": [ - "es-errors@1.3.0" - ] + "dependsOn": ["es-errors@1.3.0"] }, { "ref": "es-set-tostringtag@2.0.3", @@ -80871,42 +80177,29 @@ }, { "ref": "get-symbol-description@1.0.2", - "dependsOn": [ - "call-bind@1.0.7", - "es-errors@1.3.0", - "get-intrinsic@1.2.4" - ] + "dependsOn": ["call-bind@1.0.7", "es-errors@1.3.0", "get-intrinsic@1.2.4"] }, { "ref": "globalthis@1.0.4", - "dependsOn": [ - "define-properties@1.2.1", - "gopd@1.0.1" - ] + "dependsOn": ["define-properties@1.2.1", "gopd@1.0.1"] }, { "ref": "has-proto@1.0.3" }, { "ref": "hasown@2.0.2", - "dependsOn": [ - "function-bind@1.1.2" - ] + "dependsOn": ["function-bind@1.1.2"] }, { "ref": "is-typed-array@1.1.13", - "dependsOn": [ - "which-typed-array@1.1.15" - ] + "dependsOn": ["which-typed-array@1.1.15"] }, { "ref": "is-negative-zero@2.0.3" }, { "ref": "is-weakref@1.0.2", - "dependsOn": [ - "call-bind@1.0.7" - ] + "dependsOn": ["call-bind@1.0.7"] }, { "ref": "object-inspect@1.13.2" @@ -80922,11 +80215,7 @@ }, { "ref": "safe-regex-test@1.0.3", - "dependsOn": [ - "call-bind@1.0.7", - "es-errors@1.3.0", - "is-regex@1.1.4" - ] + "dependsOn": ["call-bind@1.0.7", "es-errors@1.3.0", "is-regex@1.1.4"] }, { "ref": "string.prototype.trim@1.2.9", @@ -80973,9 +80262,7 @@ }, { "ref": "for-each@0.3.3", - "dependsOn": [ - "is-callable@1.2.7" - ] + "dependsOn": ["is-callable@1.2.7"] }, { "ref": "typed-array-byte-offset@1.0.2", @@ -81021,9 +80308,7 @@ }, { "ref": "es-shim-unscopables@1.0.2", - "dependsOn": [ - "hasown@2.0.2" - ] + "dependsOn": ["hasown@2.0.2"] }, { "ref": "array.prototype.flatmap@1.3.2", @@ -81104,21 +80389,15 @@ }, { "ref": "is-async-function@2.0.0", - "dependsOn": [ - "has-tostringtag@1.0.2" - ] + "dependsOn": ["has-tostringtag@1.0.2"] }, { "ref": "is-finalizationregistry@1.0.2", - "dependsOn": [ - "call-bind@1.0.7" - ] + "dependsOn": ["call-bind@1.0.7"] }, { "ref": "is-generator-function@1.0.10", - "dependsOn": [ - "has-tostringtag@1.0.2" - ] + "dependsOn": ["has-tostringtag@1.0.2"] }, { "ref": "set-function-name@2.0.2", @@ -81207,10 +80486,7 @@ }, { "ref": "string.prototype.repeat@1.0.0", - "dependsOn": [ - "define-properties@1.2.1", - "es-abstract@1.23.3" - ] + "dependsOn": ["define-properties@1.2.1", "es-abstract@1.23.3"] }, { "ref": "events@3.3.0" @@ -81231,15 +80507,11 @@ }, { "ref": "glob@11.0.0|minimatch@10.0.1", - "dependsOn": [ - "brace-expansion@2.0.1" - ] + "dependsOn": ["brace-expansion@2.0.1"] }, { "ref": "jackspeak@4.0.2", - "dependsOn": [ - "@isaacs/cliui@8.0.2" - ] + "dependsOn": ["@isaacs/cliui@8.0.2"] }, { "ref": "BomRef.qgrhp0ekde8.abe968v9i38", @@ -81251,9 +80523,7 @@ }, { "ref": "BomRef.d9l57m837oo.ge6autjksu8", - "dependsOn": [ - "ansi-regex@5.0.1" - ] + "dependsOn": ["ansi-regex@5.0.1"] }, { "ref": "wrap-ansi@7.0.0", @@ -81287,60 +80557,43 @@ }, { "ref": "wrap-ansi@8.1.0|strip-ansi@7.1.0", - "dependsOn": [ - "wrap-ansi@8.1.0|ansi-regex@6.1.0" - ] + "dependsOn": ["wrap-ansi@8.1.0|ansi-regex@6.1.0"] }, { "ref": "wrap-ansi@8.1.0|ansi-regex@6.1.0" }, { "ref": "path-scurry@2.0.0", - "dependsOn": [ - "path-scurry@2.0.0|lru-cache@11.0.1", - "minipass@7.1.2" - ] + "dependsOn": ["path-scurry@2.0.0|lru-cache@11.0.1", "minipass@7.1.2"] }, { "ref": "path-scurry@2.0.0|lru-cache@11.0.1" }, { "ref": "hi-profiles@1.1.0", - "dependsOn": [ - "react-dom@18.3.1", - "react-icons@4.12.0", - "react@18.3.1" - ] + "dependsOn": ["react-dom@18.3.1", "react-icons@4.12.0", "react@18.3.1"] }, { "ref": "react-icons@4.12.0", - "dependsOn": [ - "react@18.3.1" - ] + "dependsOn": ["react@18.3.1"] }, { "ref": "husky@8.0.3" }, { "ref": "i18next-browser-languagedetector@7.2.1", - "dependsOn": [ - "@babel/runtime@7.25.7" - ] + "dependsOn": ["@babel/runtime@7.25.7"] }, { "ref": "@babel/runtime@7.25.7", - "dependsOn": [ - "regenerator-runtime@0.14.1" - ] + "dependsOn": ["regenerator-runtime@0.14.1"] }, { "ref": "regenerator-runtime@0.14.1" }, { "ref": "i18next@23.15.2", - "dependsOn": [ - "@babel/runtime@7.25.7" - ] + "dependsOn": ["@babel/runtime@7.25.7"] }, { "ref": "lint-staged@13.3.0", @@ -81365,9 +80618,7 @@ }, { "ref": "lint-staged@13.3.0|debug@4.3.4", - "dependsOn": [ - "lint-staged@13.3.0|ms@2.1.2" - ] + "dependsOn": ["lint-staged@13.3.0|ms@2.1.2"] }, { "ref": "lint-staged@13.3.0|ms@2.1.2" @@ -81397,18 +80648,14 @@ }, { "ref": "lint-staged@13.3.0|npm-run-path@5.3.0", - "dependsOn": [ - "lint-staged@13.3.0|path-key@4.0.0" - ] + "dependsOn": ["lint-staged@13.3.0|path-key@4.0.0"] }, { "ref": "lint-staged@13.3.0|path-key@4.0.0" }, { "ref": "lint-staged@13.3.0|onetime@6.0.0", - "dependsOn": [ - "lint-staged@13.3.0|mimic-fn@4.0.0" - ] + "dependsOn": ["lint-staged@13.3.0|mimic-fn@4.0.0"] }, { "ref": "lint-staged@13.3.0|mimic-fn@4.0.0" @@ -81461,9 +80708,7 @@ }, { "ref": "lint-staged@13.3.0|strip-ansi@7.1.0", - "dependsOn": [ - "lint-staged@13.3.0|ansi-regex@6.1.0" - ] + "dependsOn": ["lint-staged@13.3.0|ansi-regex@6.1.0"] }, { "ref": "lint-staged@13.3.0|log-update@5.0.1", @@ -81477,18 +80722,14 @@ }, { "ref": "lint-staged@13.3.0|ansi-escapes@5.0.0", - "dependsOn": [ - "lint-staged@13.3.0|type-fest@1.4.0" - ] + "dependsOn": ["lint-staged@13.3.0|type-fest@1.4.0"] }, { "ref": "lint-staged@13.3.0|type-fest@1.4.0" }, { "ref": "lint-staged@13.3.0|cli-cursor@4.0.0", - "dependsOn": [ - "lint-staged@13.3.0|restore-cursor@4.0.0" - ] + "dependsOn": ["lint-staged@13.3.0|restore-cursor@4.0.0"] }, { "ref": "lint-staged@13.3.0|restore-cursor@4.0.0", @@ -81499,9 +80740,7 @@ }, { "ref": "lint-staged@13.3.0|restore-cursor@4.0.0|onetime@5.1.2", - "dependsOn": [ - "lint-staged@13.3.0|restore-cursor@4.0.0|mimic-fn@2.1.0" - ] + "dependsOn": ["lint-staged@13.3.0|restore-cursor@4.0.0|mimic-fn@2.1.0"] }, { "ref": "lint-staged@13.3.0|restore-cursor@4.0.0|mimic-fn@2.1.0" @@ -81511,10 +80750,7 @@ }, { "ref": "lint-staged@13.3.0|micromatch@4.0.5", - "dependsOn": [ - "braces@3.0.3", - "picomatch@2.3.1" - ] + "dependsOn": ["braces@3.0.3", "picomatch@2.3.1"] }, { "ref": "lilconfig@2.1.0" @@ -81524,21 +80760,15 @@ }, { "ref": "braces@3.0.3", - "dependsOn": [ - "fill-range@7.1.1" - ] + "dependsOn": ["fill-range@7.1.1"] }, { "ref": "fill-range@7.1.1", - "dependsOn": [ - "to-regex-range@5.0.1" - ] + "dependsOn": ["to-regex-range@5.0.1"] }, { "ref": "to-regex-range@5.0.1", - "dependsOn": [ - "is-number@7.0.0" - ] + "dependsOn": ["is-number@7.0.0"] }, { "ref": "is-number@7.0.0" @@ -81554,15 +80784,11 @@ }, { "ref": "local-cypress@1.2.6", - "dependsOn": [ - "local-cypress@1.2.6|debug@4.3.4" - ] + "dependsOn": ["local-cypress@1.2.6|debug@4.3.4"] }, { "ref": "local-cypress@1.2.6|debug@4.3.4", - "dependsOn": [ - "local-cypress@1.2.6|ms@2.1.2" - ] + "dependsOn": ["local-cypress@1.2.6|ms@2.1.2"] }, { "ref": "local-cypress@1.2.6|ms@2.1.2" @@ -81572,9 +80798,7 @@ }, { "ref": "lucide-react@0.446.0", - "dependsOn": [ - "react@18.3.1" - ] + "dependsOn": ["react@18.3.1"] }, { "ref": "postcss-loader@7.3.4", @@ -81598,9 +80822,7 @@ }, { "ref": "parent-module@1.0.1", - "dependsOn": [ - "callsites@3.1.0" - ] + "dependsOn": ["callsites@3.1.0"] }, { "ref": "callsites@3.1.0" @@ -81659,10 +80881,7 @@ }, { "ref": "webpack@5.95.0|eslint-scope@5.1.1", - "dependsOn": [ - "esrecurse@4.3.0", - "webpack@5.95.0|estraverse@4.3.0" - ] + "dependsOn": ["esrecurse@4.3.0", "webpack@5.95.0|estraverse@4.3.0"] }, { "ref": "webpack@5.95.0|estraverse@4.3.0" @@ -81731,15 +80950,11 @@ }, { "ref": "@webassemblyjs/ieee754@1.11.6", - "dependsOn": [ - "@xtuc/ieee754@1.2.0" - ] + "dependsOn": ["@xtuc/ieee754@1.2.0"] }, { "ref": "@webassemblyjs/leb128@1.11.6", - "dependsOn": [ - "@xtuc/long@4.2.2" - ] + "dependsOn": ["@xtuc/long@4.2.2"] }, { "ref": "@webassemblyjs/utf8@1.11.6" @@ -81766,19 +80981,14 @@ }, { "ref": "@webassemblyjs/wast-printer@1.12.1", - "dependsOn": [ - "@webassemblyjs/ast@1.12.1", - "@xtuc/long@4.2.2" - ] + "dependsOn": ["@webassemblyjs/ast@1.12.1", "@xtuc/long@4.2.2"] }, { "ref": "@xtuc/ieee754@1.2.0" }, { "ref": "acorn-import-attributes@1.9.5", - "dependsOn": [ - "acorn@8.12.1" - ] + "dependsOn": ["acorn@8.12.1"] }, { "ref": "chrome-trace-event@1.0.4" @@ -81811,9 +81021,7 @@ }, { "ref": "ajv-keywords@3.5.2", - "dependsOn": [ - "ajv@6.12.6" - ] + "dependsOn": ["ajv@6.12.6"] }, { "ref": "terser-webpack-plugin@5.3.10", @@ -81846,15 +81054,11 @@ }, { "ref": "serialize-javascript@6.0.2", - "dependsOn": [ - "randombytes@2.1.0" - ] + "dependsOn": ["randombytes@2.1.0"] }, { "ref": "randombytes@2.1.0", - "dependsOn": [ - "safe-buffer@5.2.1" - ] + "dependsOn": ["safe-buffer@5.2.1"] }, { "ref": "terser@5.34.1", @@ -81870,10 +81074,7 @@ }, { "ref": "watchpack@2.4.2", - "dependsOn": [ - "glob-to-regexp@0.4.1", - "graceful-fs@4.2.11" - ] + "dependsOn": ["glob-to-regexp@0.4.1", "graceful-fs@4.2.11"] }, { "ref": "webpack-sources@3.2.3" @@ -81883,15 +81084,11 @@ }, { "ref": "prettier-plugin-tailwindcss@0.6.8", - "dependsOn": [ - "prettier@3.3.3" - ] + "dependsOn": ["prettier@3.3.3"] }, { "ref": "loose-envify@1.4.0", - "dependsOn": [ - "js-tokens@4.0.0" - ] + "dependsOn": ["js-tokens@4.0.0"] }, { "ref": "js-tokens@4.0.0" @@ -81904,15 +81101,11 @@ }, { "ref": "qrcode.react@3.2.0", - "dependsOn": [ - "react@18.3.1" - ] + "dependsOn": ["react@18.3.1"] }, { "ref": "raviger@4.1.2", - "dependsOn": [ - "react@18.3.1" - ] + "dependsOn": ["react@18.3.1"] }, { "ref": "react-copy-to-clipboard@5.1.0", @@ -81924,18 +81117,14 @@ }, { "ref": "copy-to-clipboard@3.3.3", - "dependsOn": [ - "toggle-selection@1.0.6" - ] + "dependsOn": ["toggle-selection@1.0.6"] }, { "ref": "toggle-selection@1.0.6" }, { "ref": "react-dnd-html5-backend@16.0.1", - "dependsOn": [ - "dnd-core@16.0.1" - ] + "dependsOn": ["dnd-core@16.0.1"] }, { "ref": "dnd-core@16.0.1", @@ -81953,9 +81142,7 @@ }, { "ref": "redux@4.2.1", - "dependsOn": [ - "@babel/runtime@7.25.7" - ] + "dependsOn": ["@babel/runtime@7.25.7"] }, { "ref": "react-dnd-scrolling@1.3.10", @@ -81971,18 +81158,14 @@ }, { "ref": "hoist-non-react-statics@3.3.2", - "dependsOn": [ - "react-is@16.13.1" - ] + "dependsOn": ["react-is@16.13.1"] }, { "ref": "lodash.throttle@4.1.1" }, { "ref": "raf@3.4.1", - "dependsOn": [ - "performance-now@2.1.0" - ] + "dependsOn": ["performance-now@2.1.0"] }, { "ref": "react-dnd@16.0.1", @@ -82003,16 +81186,11 @@ }, { "ref": "@types/hoist-non-react-statics@3.3.5", - "dependsOn": [ - "@types/react@18.3.2", - "hoist-non-react-statics@3.3.2" - ] + "dependsOn": ["@types/react@18.3.2", "hoist-non-react-statics@3.3.2"] }, { "ref": "scheduler@0.23.2", - "dependsOn": [ - "loose-envify@1.4.0" - ] + "dependsOn": ["loose-envify@1.4.0"] }, { "ref": "react-google-recaptcha@3.1.0", @@ -82041,19 +81219,14 @@ }, { "ref": "html-parse-stringify@3.0.1", - "dependsOn": [ - "void-elements@3.1.0" - ] + "dependsOn": ["void-elements@3.1.0"] }, { "ref": "void-elements@3.1.0" }, { "ref": "react-infinite-scroll-component@6.1.0", - "dependsOn": [ - "react@18.3.1", - "throttle-debounce@2.3.0" - ] + "dependsOn": ["react@18.3.1", "throttle-debounce@2.3.0"] }, { "ref": "throttle-debounce@2.3.0" @@ -82113,15 +81286,11 @@ }, { "ref": "react-markdown@8.0.7|mdast-util-to-string@3.2.0", - "dependsOn": [ - "@types/mdast@3.0.15" - ] + "dependsOn": ["@types/mdast@3.0.15"] }, { "ref": "react-markdown@8.0.7|micromark-util-decode-numeric-character-reference@1.1.0", - "dependsOn": [ - "react-markdown@8.0.7|micromark-util-symbol@1.1.0" - ] + "dependsOn": ["react-markdown@8.0.7|micromark-util-symbol@1.1.0"] }, { "ref": "react-markdown@8.0.7|micromark-util-symbol@1.1.0" @@ -82147,9 +81316,7 @@ }, { "ref": "react-markdown@8.0.7|micromark-util-normalize-identifier@1.1.0", - "dependsOn": [ - "react-markdown@8.0.7|micromark-util-symbol@1.1.0" - ] + "dependsOn": ["react-markdown@8.0.7|micromark-util-symbol@1.1.0"] }, { "ref": "react-markdown@8.0.7|micromark@3.2.0", @@ -82238,9 +81405,7 @@ }, { "ref": "react-markdown@8.0.7|micromark-util-chunked@1.1.0", - "dependsOn": [ - "react-markdown@8.0.7|micromark-util-symbol@1.1.0" - ] + "dependsOn": ["react-markdown@8.0.7|micromark-util-symbol@1.1.0"] }, { "ref": "react-markdown@8.0.7|micromark-util-classify-character@1.1.0", @@ -82255,9 +81420,7 @@ }, { "ref": "react-markdown@8.0.7|micromark-util-resolve-all@1.1.0", - "dependsOn": [ - "react-markdown@8.0.7|micromark-util-types@1.1.0" - ] + "dependsOn": ["react-markdown@8.0.7|micromark-util-types@1.1.0"] }, { "ref": "react-markdown@8.0.7|micromark-util-subtokenize@1.1.0", @@ -82277,9 +81440,7 @@ }, { "ref": "react-markdown@8.0.7|unist-util-stringify-position@3.0.3", - "dependsOn": [ - "react-markdown@8.0.7|@types/unist@2.0.11" - ] + "dependsOn": ["react-markdown@8.0.7|@types/unist@2.0.11"] }, { "ref": "react-markdown@8.0.7|unified@10.1.2", @@ -82312,9 +81473,7 @@ }, { "ref": "react-markdown@8.0.7|unist-util-is@5.2.1", - "dependsOn": [ - "react-markdown@8.0.7|@types/unist@2.0.11" - ] + "dependsOn": ["react-markdown@8.0.7|@types/unist@2.0.11"] }, { "ref": "react-markdown@8.0.7|unist-util-visit-parents@5.1.3", @@ -82332,9 +81491,7 @@ }, { "ref": "@types/hast@2.3.10", - "dependsOn": [ - "@types/hast@2.3.10|@types/unist@2.0.11" - ] + "dependsOn": ["@types/hast@2.3.10|@types/unist@2.0.11"] }, { "ref": "@types/hast@2.3.10|@types/unist@2.0.11" @@ -82407,9 +81564,7 @@ }, { "ref": "remark-rehype@10.1.0|unist-util-stringify-position@3.0.3", - "dependsOn": [ - "remark-rehype@10.1.0|@types/unist@2.0.11" - ] + "dependsOn": ["remark-rehype@10.1.0|@types/unist@2.0.11"] }, { "ref": "remark-rehype@10.1.0|vfile-message@3.1.4", @@ -82444,9 +81599,7 @@ }, { "ref": "mdast-util-to-hast@12.3.0|unist-util-is@5.2.1", - "dependsOn": [ - "mdast-util-to-hast@12.3.0|@types/unist@2.0.11" - ] + "dependsOn": ["mdast-util-to-hast@12.3.0|@types/unist@2.0.11"] }, { "ref": "mdast-util-to-hast@12.3.0|unist-util-visit-parents@5.1.3", @@ -82476,9 +81629,7 @@ }, { "ref": "mdast-util-definitions@5.1.2|unist-util-is@5.2.1", - "dependsOn": [ - "mdast-util-definitions@5.1.2|@types/unist@2.0.11" - ] + "dependsOn": ["mdast-util-definitions@5.1.2|@types/unist@2.0.11"] }, { "ref": "mdast-util-definitions@5.1.2|unist-util-visit-parents@5.1.3", @@ -82495,9 +81646,7 @@ }, { "ref": "unist-util-position@4.0.4", - "dependsOn": [ - "unist-util-position@4.0.4|@types/unist@2.0.11" - ] + "dependsOn": ["unist-util-position@4.0.4|@types/unist@2.0.11"] }, { "ref": "unist-util-position@4.0.4|@types/unist@2.0.11" @@ -82510,9 +81659,7 @@ }, { "ref": "style-to-object@0.4.4", - "dependsOn": [ - "inline-style-parser@0.1.1" - ] + "dependsOn": ["inline-style-parser@0.1.1"] }, { "ref": "inline-style-parser@0.1.1" @@ -82541,16 +81688,11 @@ }, { "ref": "merge-refs@1.3.0", - "dependsOn": [ - "@types/react@18.3.2" - ] + "dependsOn": ["@types/react@18.3.2"] }, { "ref": "pdfjs-dist@4.4.168", - "dependsOn": [ - "canvas@2.11.2", - "path2d@0.2.1" - ] + "dependsOn": ["canvas@2.11.2", "path2d@0.2.1"] }, { "ref": "canvas@2.11.2", @@ -82579,38 +81721,26 @@ }, { "ref": "https-proxy-agent@5.0.1", - "dependsOn": [ - "agent-base@6.0.2", - "debug@4.3.7" - ] + "dependsOn": ["agent-base@6.0.2", "debug@4.3.7"] }, { "ref": "agent-base@6.0.2", - "dependsOn": [ - "debug@4.3.7" - ] + "dependsOn": ["debug@4.3.7"] }, { "ref": "make-dir@3.1.0", - "dependsOn": [ - "make-dir@3.1.0|semver@6.3.1" - ] + "dependsOn": ["make-dir@3.1.0|semver@6.3.1"] }, { "ref": "make-dir@3.1.0|semver@6.3.1" }, { "ref": "node-fetch@2.7.0", - "dependsOn": [ - "whatwg-url@5.0.0" - ] + "dependsOn": ["whatwg-url@5.0.0"] }, { "ref": "whatwg-url@5.0.0", - "dependsOn": [ - "tr46@0.0.3", - "webidl-conversions@3.0.1" - ] + "dependsOn": ["tr46@0.0.3", "webidl-conversions@3.0.1"] }, { "ref": "tr46@0.0.3" @@ -82620,9 +81750,7 @@ }, { "ref": "nopt@5.0.0", - "dependsOn": [ - "abbrev@1.1.1" - ] + "dependsOn": ["abbrev@1.1.1"] }, { "ref": "abbrev@1.1.1" @@ -82638,10 +81766,7 @@ }, { "ref": "are-we-there-yet@2.0.0", - "dependsOn": [ - "delegates@1.0.0", - "readable-stream@3.6.2" - ] + "dependsOn": ["delegates@1.0.0", "readable-stream@3.6.2"] }, { "ref": "delegates@1.0.0" @@ -82674,9 +81799,7 @@ }, { "ref": "wide-align@1.1.5", - "dependsOn": [ - "string-width@4.2.3" - ] + "dependsOn": ["string-width@4.2.3"] }, { "ref": "set-blocking@2.0.0" @@ -82703,15 +81826,11 @@ }, { "ref": "fs-minipass@2.1.0", - "dependsOn": [ - "fs-minipass@2.1.0|minipass@3.3.6" - ] + "dependsOn": ["fs-minipass@2.1.0|minipass@3.3.6"] }, { "ref": "fs-minipass@2.1.0|minipass@3.3.6", - "dependsOn": [ - "fs-minipass@2.1.0|yallist@4.0.0" - ] + "dependsOn": ["fs-minipass@2.1.0|yallist@4.0.0"] }, { "ref": "fs-minipass@2.1.0|yallist@4.0.0" @@ -82725,9 +81844,7 @@ }, { "ref": "minizlib@2.1.2|minipass@3.3.6", - "dependsOn": [ - "minizlib@2.1.2|yallist@4.0.0" - ] + "dependsOn": ["minizlib@2.1.2|yallist@4.0.0"] }, { "ref": "minizlib@2.1.2|yallist@4.0.0" @@ -82748,9 +81865,7 @@ }, { "ref": "decompress-response@4.2.1", - "dependsOn": [ - "mimic-response@2.1.0" - ] + "dependsOn": ["mimic-response@2.1.0"] }, { "ref": "mimic-response@2.1.0" @@ -82766,9 +81881,7 @@ }, { "ref": "warning@4.0.3", - "dependsOn": [ - "loose-envify@1.4.0" - ] + "dependsOn": ["loose-envify@1.4.0"] }, { "ref": "react-redux@8.1.3", @@ -82794,28 +81907,19 @@ }, { "ref": "use-sync-external-store@1.2.2", - "dependsOn": [ - "react@18.3.1" - ] + "dependsOn": ["react@18.3.1"] }, { "ref": "react-webcam@7.2.0", - "dependsOn": [ - "react-dom@18.3.1", - "react@18.3.1" - ] + "dependsOn": ["react-dom@18.3.1", "react@18.3.1"] }, { "ref": "redux-devtools-extension@2.13.9", - "dependsOn": [ - "redux@4.2.1" - ] + "dependsOn": ["redux@4.2.1"] }, { "ref": "redux-thunk@2.4.2", - "dependsOn": [ - "redux@4.2.1" - ] + "dependsOn": ["redux@4.2.1"] }, { "ref": "rehype-raw@6.1.1", @@ -82851,9 +81955,7 @@ }, { "ref": "rehype-raw@6.1.1|unist-util-stringify-position@3.0.3", - "dependsOn": [ - "rehype-raw@6.1.1|@types/unist@2.0.11" - ] + "dependsOn": ["rehype-raw@6.1.1|@types/unist@2.0.11"] }, { "ref": "rehype-raw@6.1.1|vfile-message@3.1.4", @@ -82891,9 +81993,7 @@ }, { "ref": "hast-util-raw@7.2.3|unist-util-is@5.2.1", - "dependsOn": [ - "hast-util-raw@7.2.3|@types/unist@2.0.11" - ] + "dependsOn": ["hast-util-raw@7.2.3|@types/unist@2.0.11"] }, { "ref": "hast-util-raw@7.2.3|unist-util-visit-parents@5.1.3", @@ -82913,9 +82013,7 @@ }, { "ref": "hast-util-raw@7.2.3|unist-util-stringify-position@3.0.3", - "dependsOn": [ - "hast-util-raw@7.2.3|@types/unist@2.0.11" - ] + "dependsOn": ["hast-util-raw@7.2.3|@types/unist@2.0.11"] }, { "ref": "hast-util-raw@7.2.3|vfile-message@3.1.4", @@ -82953,9 +82051,7 @@ }, { "ref": "hast-util-from-parse5@7.1.2|unist-util-stringify-position@3.0.3", - "dependsOn": [ - "hast-util-from-parse5@7.1.2|@types/unist@2.0.11" - ] + "dependsOn": ["hast-util-from-parse5@7.1.2|@types/unist@2.0.11"] }, { "ref": "hast-util-from-parse5@7.1.2|vfile-message@3.1.4", @@ -82976,9 +82072,7 @@ }, { "ref": "hast-util-parse-selector@3.1.1", - "dependsOn": [ - "@types/hast@2.3.10" - ] + "dependsOn": ["@types/hast@2.3.10"] }, { "ref": "vfile-location@4.1.0", @@ -83001,9 +82095,7 @@ }, { "ref": "vfile-location@4.1.0|unist-util-stringify-position@3.0.3", - "dependsOn": [ - "vfile-location@4.1.0|@types/unist@2.0.11" - ] + "dependsOn": ["vfile-location@4.1.0|@types/unist@2.0.11"] }, { "ref": "vfile-location@4.1.0|vfile-message@3.1.4", @@ -83034,10 +82126,7 @@ }, { "ref": "snyk@1.1293.1", - "dependsOn": [ - "@sentry/node@7.119.1", - "global-agent@3.0.0" - ] + "dependsOn": ["@sentry/node@7.119.1", "global-agent@3.0.0"] }, { "ref": "@sentry/node@7.119.1", @@ -83061,9 +82150,7 @@ }, { "ref": "@sentry/node@7.119.1|@sentry/utils@7.119.1", - "dependsOn": [ - "@sentry/node@7.119.1|@sentry/types@7.119.1" - ] + "dependsOn": ["@sentry/node@7.119.1|@sentry/types@7.119.1"] }, { "ref": "@sentry-internal/tracing@7.119.1", @@ -83085,9 +82172,7 @@ }, { "ref": "@sentry-internal/tracing@7.119.1|@sentry/utils@7.119.1", - "dependsOn": [ - "@sentry-internal/tracing@7.119.1|@sentry/types@7.119.1" - ] + "dependsOn": ["@sentry-internal/tracing@7.119.1|@sentry/types@7.119.1"] }, { "ref": "@sentry/integrations@7.119.1", @@ -83110,21 +82195,15 @@ }, { "ref": "@sentry/integrations@7.119.1|@sentry/utils@7.119.1", - "dependsOn": [ - "@sentry/integrations@7.119.1|@sentry/types@7.119.1" - ] + "dependsOn": ["@sentry/integrations@7.119.1|@sentry/types@7.119.1"] }, { "ref": "localforage@1.10.0", - "dependsOn": [ - "lie@3.1.1" - ] + "dependsOn": ["lie@3.1.1"] }, { "ref": "lie@3.1.1", - "dependsOn": [ - "immediate@3.0.6" - ] + "dependsOn": ["immediate@3.0.6"] }, { "ref": "immediate@3.0.6" @@ -83148,9 +82227,7 @@ }, { "ref": "matcher@3.0.0", - "dependsOn": [ - "escape-string-regexp@4.0.0" - ] + "dependsOn": ["escape-string-regexp@4.0.0"] }, { "ref": "roarr@2.15.4", @@ -83174,9 +82251,7 @@ }, { "ref": "serialize-error@7.0.1", - "dependsOn": [ - "serialize-error@7.0.1|type-fest@0.13.1" - ] + "dependsOn": ["serialize-error@7.0.1|type-fest@0.13.1"] }, { "ref": "serialize-error@7.0.1|type-fest@0.13.1" @@ -83186,9 +82261,7 @@ }, { "ref": "tailwindcss-animate@1.0.7", - "dependsOn": [ - "tailwindcss@3.4.13" - ] + "dependsOn": ["tailwindcss@3.4.13"] }, { "ref": "@alloc/quick-lru@5.2.0" @@ -83207,34 +82280,25 @@ }, { "ref": "chokidar@3.6.0|glob-parent@5.1.2", - "dependsOn": [ - "is-glob@4.0.3" - ] + "dependsOn": ["is-glob@4.0.3"] }, { "ref": "anymatch@3.1.3", - "dependsOn": [ - "normalize-path@3.0.0", - "picomatch@2.3.1" - ] + "dependsOn": ["normalize-path@3.0.0", "picomatch@2.3.1"] }, { "ref": "normalize-path@3.0.0" }, { "ref": "is-binary-path@2.1.0", - "dependsOn": [ - "binary-extensions@2.3.0" - ] + "dependsOn": ["binary-extensions@2.3.0"] }, { "ref": "binary-extensions@2.3.0" }, { "ref": "readdirp@3.6.0", - "dependsOn": [ - "picomatch@2.3.1" - ] + "dependsOn": ["picomatch@2.3.1"] }, { "ref": "didyoumean@1.2.2" @@ -83244,10 +82308,7 @@ }, { "ref": "micromatch@4.0.8", - "dependsOn": [ - "braces@3.0.3", - "picomatch@2.3.1" - ] + "dependsOn": ["braces@3.0.3", "picomatch@2.3.1"] }, { "ref": "is-extglob@2.1.1" @@ -83274,16 +82335,11 @@ }, { "ref": "read-cache@1.0.0", - "dependsOn": [ - "pify@2.3.0" - ] + "dependsOn": ["pify@2.3.0"] }, { "ref": "postcss-js@4.0.1", - "dependsOn": [ - "camelcase-css@2.0.1", - "postcss@8.4.47" - ] + "dependsOn": ["camelcase-css@2.0.1", "postcss@8.4.47"] }, { "ref": "camelcase-css@2.0.1" @@ -83311,10 +82367,7 @@ }, { "ref": "postcss-nested@6.2.0|postcss-selector-parser@6.1.2", - "dependsOn": [ - "cssesc@3.0.0", - "util-deprecate@1.0.2" - ] + "dependsOn": ["cssesc@3.0.0", "util-deprecate@1.0.2"] }, { "ref": "sucrase@3.35.0", @@ -83344,17 +82397,11 @@ }, { "ref": "sucrase@3.35.0|jackspeak@3.4.3", - "dependsOn": [ - "@isaacs/cliui@8.0.2", - "@pkgjs/parseargs@0.11.0" - ] + "dependsOn": ["@isaacs/cliui@8.0.2", "@pkgjs/parseargs@0.11.0"] }, { "ref": "sucrase@3.35.0|path-scurry@1.11.1", - "dependsOn": [ - "sucrase@3.35.0|lru-cache@10.4.3", - "minipass@7.1.2" - ] + "dependsOn": ["sucrase@3.35.0|lru-cache@10.4.3", "minipass@7.1.2"] }, { "ref": "sucrase@3.35.0|lru-cache@10.4.3" @@ -83383,15 +82430,11 @@ }, { "ref": "thenify-all@1.6.0", - "dependsOn": [ - "thenify@3.3.1" - ] + "dependsOn": ["thenify@3.3.1"] }, { "ref": "thenify@3.3.1", - "dependsOn": [ - "any-promise@1.3.0" - ] + "dependsOn": ["any-promise@1.3.0"] }, { "ref": "pirates@4.0.6" @@ -83401,10 +82444,7 @@ }, { "ref": "use-keyboard-shortcut@1.1.6", - "dependsOn": [ - "react-dom@18.3.1", - "react@18.3.1" - ] + "dependsOn": ["react-dom@18.3.1", "react@18.3.1"] }, { "ref": "uuid@10.0.0" @@ -83463,15 +82503,11 @@ }, { "ref": "@babel/highlight@7.25.7|ansi-styles@3.2.1", - "dependsOn": [ - "@babel/highlight@7.25.7|color-convert@1.9.3" - ] + "dependsOn": ["@babel/highlight@7.25.7|color-convert@1.9.3"] }, { "ref": "@babel/highlight@7.25.7|color-convert@1.9.3", - "dependsOn": [ - "@babel/highlight@7.25.7|color-name@1.1.3" - ] + "dependsOn": ["@babel/highlight@7.25.7|color-name@1.1.3"] }, { "ref": "@babel/highlight@7.25.7|color-name@1.1.3" @@ -83481,9 +82517,7 @@ }, { "ref": "@babel/highlight@7.25.7|supports-color@5.5.0", - "dependsOn": [ - "@babel/highlight@7.25.7|has-flag@3.0.0" - ] + "dependsOn": ["@babel/highlight@7.25.7|has-flag@3.0.0"] }, { "ref": "@babel/highlight@7.25.7|has-flag@3.0.0" @@ -83510,16 +82544,11 @@ }, { "ref": "vscode-languageclient@7.0.0|minimatch@3.1.2", - "dependsOn": [ - "vscode-languageclient@7.0.0|brace-expansion@1.1.11" - ] + "dependsOn": ["vscode-languageclient@7.0.0|brace-expansion@1.1.11"] }, { "ref": "vscode-languageclient@7.0.0|brace-expansion@1.1.11", - "dependsOn": [ - "balanced-match@1.0.2", - "concat-map@0.0.1" - ] + "dependsOn": ["balanced-match@1.0.2", "concat-map@0.0.1"] }, { "ref": "vscode-languageserver-protocol@3.16.0", @@ -83539,9 +82568,7 @@ }, { "ref": "vscode-languageserver@7.0.0", - "dependsOn": [ - "vscode-languageserver-protocol@3.16.0" - ] + "dependsOn": ["vscode-languageserver-protocol@3.16.0"] }, { "ref": "vscode-uri@3.0.8" @@ -83657,9 +82684,7 @@ }, { "ref": "workbox-build@7.1.1|magic-string@0.25.9", - "dependsOn": [ - "sourcemap-codec@1.4.8" - ] + "dependsOn": ["sourcemap-codec@1.4.8"] }, { "ref": "workbox-build@7.1.1|json-schema-traverse@1.0.0" @@ -83677,22 +82702,15 @@ }, { "ref": "workbox-build@7.1.1|minimatch@3.1.2", - "dependsOn": [ - "workbox-build@7.1.1|brace-expansion@1.1.11" - ] + "dependsOn": ["workbox-build@7.1.1|brace-expansion@1.1.11"] }, { "ref": "workbox-build@7.1.1|brace-expansion@1.1.11", - "dependsOn": [ - "balanced-match@1.0.2", - "concat-map@0.0.1" - ] + "dependsOn": ["balanced-match@1.0.2", "concat-map@0.0.1"] }, { "ref": "workbox-build@7.1.1|source-map@0.8.0-beta.0", - "dependsOn": [ - "workbox-build@7.1.1|whatwg-url@7.1.0" - ] + "dependsOn": ["workbox-build@7.1.1|whatwg-url@7.1.0"] }, { "ref": "workbox-build@7.1.1|whatwg-url@7.1.0", @@ -83704,9 +82722,7 @@ }, { "ref": "workbox-build@7.1.1|tr46@1.0.1", - "dependsOn": [ - "punycode@2.3.1" - ] + "dependsOn": ["punycode@2.3.1"] }, { "ref": "workbox-build@7.1.1|webidl-conversions@4.0.2" @@ -83757,9 +82773,7 @@ }, { "ref": "lru-cache@5.1.1", - "dependsOn": [ - "yallist@3.1.1" - ] + "dependsOn": ["yallist@3.1.1"] }, { "ref": "yallist@3.1.1" @@ -83776,17 +82790,11 @@ }, { "ref": "@babel/helper-module-imports@7.25.7", - "dependsOn": [ - "@babel/traverse@7.25.7", - "@babel/types@7.25.7" - ] + "dependsOn": ["@babel/traverse@7.25.7", "@babel/types@7.25.7"] }, { "ref": "@babel/helper-simple-access@7.25.7", - "dependsOn": [ - "@babel/traverse@7.25.7", - "@babel/types@7.25.7" - ] + "dependsOn": ["@babel/traverse@7.25.7", "@babel/types@7.25.7"] }, { "ref": "@babel/traverse@7.25.7", @@ -83805,10 +82813,7 @@ }, { "ref": "@babel/helpers@7.25.7", - "dependsOn": [ - "@babel/template@7.25.7", - "@babel/types@7.25.7" - ] + "dependsOn": ["@babel/template@7.25.7", "@babel/types@7.25.7"] }, { "ref": "@babel/template@7.25.7", @@ -83932,17 +82937,11 @@ }, { "ref": "@babel/plugin-bugfix-safari-class-field-initializer-scope@7.25.7", - "dependsOn": [ - "@babel/core@7.25.7", - "@babel/helper-plugin-utils@7.25.7" - ] + "dependsOn": ["@babel/core@7.25.7", "@babel/helper-plugin-utils@7.25.7"] }, { "ref": "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.25.7", - "dependsOn": [ - "@babel/core@7.25.7", - "@babel/helper-plugin-utils@7.25.7" - ] + "dependsOn": ["@babel/core@7.25.7", "@babel/helper-plugin-utils@7.25.7"] }, { "ref": "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.25.7", @@ -83955,10 +82954,7 @@ }, { "ref": "@babel/helper-skip-transparent-expression-wrappers@7.25.7", - "dependsOn": [ - "@babel/traverse@7.25.7", - "@babel/types@7.25.7" - ] + "dependsOn": ["@babel/traverse@7.25.7", "@babel/types@7.25.7"] }, { "ref": "@babel/plugin-transform-optional-chaining@7.25.7", @@ -83979,128 +82975,75 @@ }, { "ref": "@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2", - "dependsOn": [ - "@babel/core@7.25.7" - ] + "dependsOn": ["@babel/core@7.25.7"] }, { "ref": "@babel/plugin-syntax-async-generators@7.8.4", - "dependsOn": [ - "@babel/core@7.25.7", - "@babel/helper-plugin-utils@7.25.7" - ] + "dependsOn": ["@babel/core@7.25.7", "@babel/helper-plugin-utils@7.25.7"] }, { "ref": "@babel/plugin-syntax-class-properties@7.12.13", - "dependsOn": [ - "@babel/core@7.25.7", - "@babel/helper-plugin-utils@7.25.7" - ] + "dependsOn": ["@babel/core@7.25.7", "@babel/helper-plugin-utils@7.25.7"] }, { "ref": "@babel/plugin-syntax-class-static-block@7.14.5", - "dependsOn": [ - "@babel/core@7.25.7", - "@babel/helper-plugin-utils@7.25.7" - ] + "dependsOn": ["@babel/core@7.25.7", "@babel/helper-plugin-utils@7.25.7"] }, { "ref": "@babel/plugin-syntax-dynamic-import@7.8.3", - "dependsOn": [ - "@babel/core@7.25.7", - "@babel/helper-plugin-utils@7.25.7" - ] + "dependsOn": ["@babel/core@7.25.7", "@babel/helper-plugin-utils@7.25.7"] }, { "ref": "@babel/plugin-syntax-export-namespace-from@7.8.3", - "dependsOn": [ - "@babel/core@7.25.7", - "@babel/helper-plugin-utils@7.25.7" - ] + "dependsOn": ["@babel/core@7.25.7", "@babel/helper-plugin-utils@7.25.7"] }, { "ref": "@babel/plugin-syntax-import-assertions@7.25.7", - "dependsOn": [ - "@babel/core@7.25.7", - "@babel/helper-plugin-utils@7.25.7" - ] + "dependsOn": ["@babel/core@7.25.7", "@babel/helper-plugin-utils@7.25.7"] }, { "ref": "@babel/plugin-syntax-import-attributes@7.25.7", - "dependsOn": [ - "@babel/core@7.25.7", - "@babel/helper-plugin-utils@7.25.7" - ] + "dependsOn": ["@babel/core@7.25.7", "@babel/helper-plugin-utils@7.25.7"] }, { "ref": "@babel/plugin-syntax-import-meta@7.10.4", - "dependsOn": [ - "@babel/core@7.25.7", - "@babel/helper-plugin-utils@7.25.7" - ] + "dependsOn": ["@babel/core@7.25.7", "@babel/helper-plugin-utils@7.25.7"] }, { "ref": "@babel/plugin-syntax-json-strings@7.8.3", - "dependsOn": [ - "@babel/core@7.25.7", - "@babel/helper-plugin-utils@7.25.7" - ] + "dependsOn": ["@babel/core@7.25.7", "@babel/helper-plugin-utils@7.25.7"] }, { "ref": "@babel/plugin-syntax-logical-assignment-operators@7.10.4", - "dependsOn": [ - "@babel/core@7.25.7", - "@babel/helper-plugin-utils@7.25.7" - ] + "dependsOn": ["@babel/core@7.25.7", "@babel/helper-plugin-utils@7.25.7"] }, { "ref": "@babel/plugin-syntax-nullish-coalescing-operator@7.8.3", - "dependsOn": [ - "@babel/core@7.25.7", - "@babel/helper-plugin-utils@7.25.7" - ] + "dependsOn": ["@babel/core@7.25.7", "@babel/helper-plugin-utils@7.25.7"] }, { "ref": "@babel/plugin-syntax-numeric-separator@7.10.4", - "dependsOn": [ - "@babel/core@7.25.7", - "@babel/helper-plugin-utils@7.25.7" - ] + "dependsOn": ["@babel/core@7.25.7", "@babel/helper-plugin-utils@7.25.7"] }, { "ref": "@babel/plugin-syntax-object-rest-spread@7.8.3", - "dependsOn": [ - "@babel/core@7.25.7", - "@babel/helper-plugin-utils@7.25.7" - ] + "dependsOn": ["@babel/core@7.25.7", "@babel/helper-plugin-utils@7.25.7"] }, { "ref": "@babel/plugin-syntax-optional-catch-binding@7.8.3", - "dependsOn": [ - "@babel/core@7.25.7", - "@babel/helper-plugin-utils@7.25.7" - ] + "dependsOn": ["@babel/core@7.25.7", "@babel/helper-plugin-utils@7.25.7"] }, { "ref": "@babel/plugin-syntax-optional-chaining@7.8.3", - "dependsOn": [ - "@babel/core@7.25.7", - "@babel/helper-plugin-utils@7.25.7" - ] + "dependsOn": ["@babel/core@7.25.7", "@babel/helper-plugin-utils@7.25.7"] }, { "ref": "@babel/plugin-syntax-private-property-in-object@7.14.5", - "dependsOn": [ - "@babel/core@7.25.7", - "@babel/helper-plugin-utils@7.25.7" - ] + "dependsOn": ["@babel/core@7.25.7", "@babel/helper-plugin-utils@7.25.7"] }, { "ref": "@babel/plugin-syntax-top-level-await@7.14.5", - "dependsOn": [ - "@babel/core@7.25.7", - "@babel/helper-plugin-utils@7.25.7" - ] + "dependsOn": ["@babel/core@7.25.7", "@babel/helper-plugin-utils@7.25.7"] }, { "ref": "@babel/plugin-syntax-unicode-sets-regex@7.18.6", @@ -84124,9 +83067,7 @@ }, { "ref": "@babel/helper-annotate-as-pure@7.25.7", - "dependsOn": [ - "@babel/types@7.25.7" - ] + "dependsOn": ["@babel/types@7.25.7"] }, { "ref": "regexpu-core@6.1.1", @@ -84141,9 +83082,7 @@ }, { "ref": "regenerate-unicode-properties@10.2.0", - "dependsOn": [ - "regenerate@1.4.2" - ] + "dependsOn": ["regenerate@1.4.2"] }, { "ref": "regenerate@1.4.2" @@ -84153,9 +83092,7 @@ }, { "ref": "regjsparser@0.11.1", - "dependsOn": [ - "jsesc@3.0.2" - ] + "dependsOn": ["jsesc@3.0.2"] }, { "ref": "unicode-match-property-ecmascript@2.0.0", @@ -84175,10 +83112,7 @@ }, { "ref": "@babel/plugin-transform-arrow-functions@7.25.7", - "dependsOn": [ - "@babel/core@7.25.7", - "@babel/helper-plugin-utils@7.25.7" - ] + "dependsOn": ["@babel/core@7.25.7", "@babel/helper-plugin-utils@7.25.7"] }, { "ref": "@babel/plugin-transform-async-generator-functions@7.25.7", @@ -84218,17 +83152,11 @@ }, { "ref": "@babel/plugin-transform-block-scoped-functions@7.25.7", - "dependsOn": [ - "@babel/core@7.25.7", - "@babel/helper-plugin-utils@7.25.7" - ] + "dependsOn": ["@babel/core@7.25.7", "@babel/helper-plugin-utils@7.25.7"] }, { "ref": "@babel/plugin-transform-block-scoping@7.25.7", - "dependsOn": [ - "@babel/core@7.25.7", - "@babel/helper-plugin-utils@7.25.7" - ] + "dependsOn": ["@babel/core@7.25.7", "@babel/helper-plugin-utils@7.25.7"] }, { "ref": "@babel/plugin-transform-class-properties@7.25.7", @@ -84256,16 +83184,11 @@ }, { "ref": "@babel/helper-member-expression-to-functions@7.25.7", - "dependsOn": [ - "@babel/traverse@7.25.7", - "@babel/types@7.25.7" - ] + "dependsOn": ["@babel/traverse@7.25.7", "@babel/types@7.25.7"] }, { "ref": "@babel/helper-optimise-call-expression@7.25.7", - "dependsOn": [ - "@babel/types@7.25.7" - ] + "dependsOn": ["@babel/types@7.25.7"] }, { "ref": "@babel/helper-replace-supers@7.25.7", @@ -84310,10 +83233,7 @@ }, { "ref": "@babel/plugin-transform-destructuring@7.25.7", - "dependsOn": [ - "@babel/core@7.25.7", - "@babel/helper-plugin-utils@7.25.7" - ] + "dependsOn": ["@babel/core@7.25.7", "@babel/helper-plugin-utils@7.25.7"] }, { "ref": "@babel/plugin-transform-dotall-regex@7.25.7", @@ -84325,10 +83245,7 @@ }, { "ref": "@babel/plugin-transform-duplicate-keys@7.25.7", - "dependsOn": [ - "@babel/core@7.25.7", - "@babel/helper-plugin-utils@7.25.7" - ] + "dependsOn": ["@babel/core@7.25.7", "@babel/helper-plugin-utils@7.25.7"] }, { "ref": "@babel/plugin-transform-duplicate-named-capturing-groups-regex@7.25.7", @@ -84356,10 +83273,7 @@ }, { "ref": "@babel/helper-builder-binary-assignment-operator-visitor@7.25.7", - "dependsOn": [ - "@babel/traverse@7.25.7", - "@babel/types@7.25.7" - ] + "dependsOn": ["@babel/traverse@7.25.7", "@babel/types@7.25.7"] }, { "ref": "@babel/plugin-transform-export-namespace-from@7.25.7", @@ -84396,10 +83310,7 @@ }, { "ref": "@babel/plugin-transform-literals@7.25.7", - "dependsOn": [ - "@babel/core@7.25.7", - "@babel/helper-plugin-utils@7.25.7" - ] + "dependsOn": ["@babel/core@7.25.7", "@babel/helper-plugin-utils@7.25.7"] }, { "ref": "@babel/plugin-transform-logical-assignment-operators@7.25.7", @@ -84411,10 +83322,7 @@ }, { "ref": "@babel/plugin-transform-member-expression-literals@7.25.7", - "dependsOn": [ - "@babel/core@7.25.7", - "@babel/helper-plugin-utils@7.25.7" - ] + "dependsOn": ["@babel/core@7.25.7", "@babel/helper-plugin-utils@7.25.7"] }, { "ref": "@babel/plugin-transform-modules-amd@7.25.7", @@ -84461,10 +83369,7 @@ }, { "ref": "@babel/plugin-transform-new-target@7.25.7", - "dependsOn": [ - "@babel/core@7.25.7", - "@babel/helper-plugin-utils@7.25.7" - ] + "dependsOn": ["@babel/core@7.25.7", "@babel/helper-plugin-utils@7.25.7"] }, { "ref": "@babel/plugin-transform-nullish-coalescing-operator@7.25.7", @@ -84494,10 +83399,7 @@ }, { "ref": "@babel/plugin-transform-parameters@7.25.7", - "dependsOn": [ - "@babel/core@7.25.7", - "@babel/helper-plugin-utils@7.25.7" - ] + "dependsOn": ["@babel/core@7.25.7", "@babel/helper-plugin-utils@7.25.7"] }, { "ref": "@babel/plugin-transform-object-super@7.25.7", @@ -84535,10 +83437,7 @@ }, { "ref": "@babel/plugin-transform-property-literals@7.25.7", - "dependsOn": [ - "@babel/core@7.25.7", - "@babel/helper-plugin-utils@7.25.7" - ] + "dependsOn": ["@babel/core@7.25.7", "@babel/helper-plugin-utils@7.25.7"] }, { "ref": "@babel/plugin-transform-regenerator@7.25.7", @@ -84550,23 +83449,15 @@ }, { "ref": "regenerator-transform@0.15.2", - "dependsOn": [ - "@babel/runtime@7.25.7" - ] + "dependsOn": ["@babel/runtime@7.25.7"] }, { "ref": "@babel/plugin-transform-reserved-words@7.25.7", - "dependsOn": [ - "@babel/core@7.25.7", - "@babel/helper-plugin-utils@7.25.7" - ] + "dependsOn": ["@babel/core@7.25.7", "@babel/helper-plugin-utils@7.25.7"] }, { "ref": "@babel/plugin-transform-shorthand-properties@7.25.7", - "dependsOn": [ - "@babel/core@7.25.7", - "@babel/helper-plugin-utils@7.25.7" - ] + "dependsOn": ["@babel/core@7.25.7", "@babel/helper-plugin-utils@7.25.7"] }, { "ref": "@babel/plugin-transform-spread@7.25.7", @@ -84578,31 +83469,19 @@ }, { "ref": "@babel/plugin-transform-sticky-regex@7.25.7", - "dependsOn": [ - "@babel/core@7.25.7", - "@babel/helper-plugin-utils@7.25.7" - ] + "dependsOn": ["@babel/core@7.25.7", "@babel/helper-plugin-utils@7.25.7"] }, { "ref": "@babel/plugin-transform-template-literals@7.25.7", - "dependsOn": [ - "@babel/core@7.25.7", - "@babel/helper-plugin-utils@7.25.7" - ] + "dependsOn": ["@babel/core@7.25.7", "@babel/helper-plugin-utils@7.25.7"] }, { "ref": "@babel/plugin-transform-typeof-symbol@7.25.7", - "dependsOn": [ - "@babel/core@7.25.7", - "@babel/helper-plugin-utils@7.25.7" - ] + "dependsOn": ["@babel/core@7.25.7", "@babel/helper-plugin-utils@7.25.7"] }, { "ref": "@babel/plugin-transform-unicode-escapes@7.25.7", - "dependsOn": [ - "@babel/core@7.25.7", - "@babel/helper-plugin-utils@7.25.7" - ] + "dependsOn": ["@babel/core@7.25.7", "@babel/helper-plugin-utils@7.25.7"] }, { "ref": "@babel/plugin-transform-unicode-property-regex@7.25.7", @@ -84681,9 +83560,7 @@ }, { "ref": "core-js-compat@3.38.1", - "dependsOn": [ - "browserslist@4.24.0" - ] + "dependsOn": ["browserslist@4.24.0"] }, { "ref": "babel-plugin-polyfill-regenerator@0.6.2", @@ -84763,15 +83640,11 @@ }, { "ref": "@surma/rollup-plugin-off-main-thread@2.2.3|magic-string@0.25.9", - "dependsOn": [ - "sourcemap-codec@1.4.8" - ] + "dependsOn": ["sourcemap-codec@1.4.8"] }, { "ref": "ejs@3.1.10", - "dependsOn": [ - "jake@10.9.2" - ] + "dependsOn": ["jake@10.9.2"] }, { "ref": "jake@10.9.2", @@ -84784,28 +83657,19 @@ }, { "ref": "jake@10.9.2|minimatch@3.1.2", - "dependsOn": [ - "jake@10.9.2|brace-expansion@1.1.11" - ] + "dependsOn": ["jake@10.9.2|brace-expansion@1.1.11"] }, { "ref": "jake@10.9.2|brace-expansion@1.1.11", - "dependsOn": [ - "balanced-match@1.0.2", - "concat-map@0.0.1" - ] + "dependsOn": ["balanced-match@1.0.2", "concat-map@0.0.1"] }, { "ref": "filelist@1.0.4", - "dependsOn": [ - "filelist@1.0.4|minimatch@5.1.6" - ] + "dependsOn": ["filelist@1.0.4|minimatch@5.1.6"] }, { "ref": "filelist@1.0.4|minimatch@5.1.6", - "dependsOn": [ - "brace-expansion@2.0.1" - ] + "dependsOn": ["brace-expansion@2.0.1"] }, { "ref": "fast-uri@3.0.2" @@ -84848,9 +83712,7 @@ }, { "ref": "unique-string@2.0.0", - "dependsOn": [ - "crypto-random-string@2.0.0" - ] + "dependsOn": ["crypto-random-string@2.0.0"] }, { "ref": "crypto-random-string@2.0.0" @@ -84860,10 +83722,7 @@ }, { "ref": "workbox-background-sync@7.1.0", - "dependsOn": [ - "idb@7.1.1", - "workbox-core@7.1.0" - ] + "dependsOn": ["idb@7.1.1", "workbox-core@7.1.0"] }, { "ref": "idb@7.1.1" @@ -84873,22 +83732,15 @@ }, { "ref": "workbox-broadcast-update@7.1.0", - "dependsOn": [ - "workbox-core@7.1.0" - ] + "dependsOn": ["workbox-core@7.1.0"] }, { "ref": "workbox-cacheable-response@7.1.0", - "dependsOn": [ - "workbox-core@7.1.0" - ] + "dependsOn": ["workbox-core@7.1.0"] }, { "ref": "workbox-expiration@7.1.0", - "dependsOn": [ - "idb@7.1.1", - "workbox-core@7.1.0" - ] + "dependsOn": ["idb@7.1.1", "workbox-core@7.1.0"] }, { "ref": "workbox-google-analytics@7.1.0", @@ -84901,21 +83753,15 @@ }, { "ref": "workbox-routing@7.1.0", - "dependsOn": [ - "workbox-core@7.1.0" - ] + "dependsOn": ["workbox-core@7.1.0"] }, { "ref": "workbox-strategies@7.1.0", - "dependsOn": [ - "workbox-core@7.1.0" - ] + "dependsOn": ["workbox-core@7.1.0"] }, { "ref": "workbox-navigation-preload@7.1.0", - "dependsOn": [ - "workbox-core@7.1.0" - ] + "dependsOn": ["workbox-core@7.1.0"] }, { "ref": "workbox-precaching@7.1.0", @@ -84927,9 +83773,7 @@ }, { "ref": "workbox-range-requests@7.1.0", - "dependsOn": [ - "workbox-core@7.1.0" - ] + "dependsOn": ["workbox-core@7.1.0"] }, { "ref": "workbox-recipes@7.1.0", @@ -84944,20 +83788,14 @@ }, { "ref": "workbox-streams@7.1.0", - "dependsOn": [ - "workbox-core@7.1.0", - "workbox-routing@7.1.0" - ] + "dependsOn": ["workbox-core@7.1.0", "workbox-routing@7.1.0"] }, { "ref": "workbox-sw@7.1.0" }, { "ref": "workbox-window@7.1.0", - "dependsOn": [ - "@types/trusted-types@2.0.7", - "workbox-core@7.1.0" - ] + "dependsOn": ["@types/trusted-types@2.0.7", "workbox-core@7.1.0"] }, { "ref": "@types/trusted-types@2.0.7" @@ -84995,10 +83833,7 @@ }, { "ref": "source-map-support@0.5.21", - "dependsOn": [ - "buffer-from@1.1.2", - "source-map@0.6.1" - ] + "dependsOn": ["buffer-from@1.1.2", "source-map@0.6.1"] }, { "ref": "xlsx@0.18.5", @@ -85017,10 +83852,7 @@ }, { "ref": "cfb@1.2.2", - "dependsOn": [ - "adler-32@1.3.1", - "crc-32@1.2.2" - ] + "dependsOn": ["adler-32@1.3.1", "crc-32@1.2.2"] }, { "ref": "crc-32@1.2.2" @@ -85030,9 +83862,7 @@ }, { "ref": "ssf@0.11.2", - "dependsOn": [ - "frac@1.1.2" - ] + "dependsOn": ["frac@1.1.2"] }, { "ref": "frac@1.1.2" @@ -85044,4 +83874,4 @@ "ref": "word@0.3.0" } ] -} \ No newline at end of file +} diff --git a/src/components/Licenses/licenseUrls.json b/src/components/Licenses/licenseUrls.json index 88713d0865f..0c86f312b4d 100644 --- a/src/components/Licenses/licenseUrls.json +++ b/src/components/Licenses/licenseUrls.json @@ -1,51 +1,51 @@ - { - "MIT": "https://opensource.org/licenses/MIT", - "GPL-3.0": "https://www.gnu.org/licenses/gpl-3.0.en.html", - "GPL-3.0-or-later": "https://www.gnu.org/licenses/gpl-3.0.en.html", - "Apache-2.0": "https://www.apache.org/licenses/LICENSE-2.0", - "ISC": "https://opensource.org/licenses/ISC", - "0BSD": "https://opensource.org/licenses/0BSD", - "OFL-1.1": "https://opensource.org/licenses/OFL-1.1", - "BSD-3-Clause": "https://opensource.org/licenses/BSD-3-Clause", - "BSD-2-Clause": "https://opensource.org/licenses/BSD-2-Clause", - "LGPL-2.1": "https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html", - "LGPL-3.0": "https://www.gnu.org/licenses/lgpl-3.0.en.html", - "AGPL-3.0": "https://www.gnu.org/licenses/agpl-3.0.en.html", - "MPL-2.0": "https://www.mozilla.org/en-US/MPL/2.0/", - "EPL-2.0": "https://www.eclipse.org/legal/epl-2.0/", - "CC-BY-4.0": "https://creativecommons.org/licenses/by/4.0/", - "Unlicense": "https://unlicense.org/", - "BlueOak-1.0.0": "https://blueoakcouncil.org/license/1.0.0", - "GPL-2.0": "https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html", - "GPL-2.0-or-later": "https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html", - "LGPL-2.0": "https://www.gnu.org/licenses/old-licenses/lgpl-2.0.en.html", - "LGPL-2.0-or-later": "https://www.gnu.org/licenses/old-licenses/lgpl-2.0.en.html", - "AGPL-1.0": "https://www.gnu.org/licenses/agpl-1.0.html", - "AGPL-1.0-or-later": "https://www.gnu.org/licenses/agpl-1.0.html", - "AGPL-2.0": "https://www.gnu.org/licenses/agpl-2.0.html", - "AGPL-2.0-or-later": "https://www.gnu.org/licenses/agpl-2.0.html", - "AGPL-3.0-or-later": "https://www.gnu.org/licenses/agpl-3.0.en.html", - "MPL-1.1": "https://www.mozilla.org/MPL/MPL-1.1.html", - "MPL-1.0": "https://www.mozilla.org/MPL/MPL-1.0.html", - "EPL-1.0": "https://www.eclipse.org/legal/epl-v10.html", - "CC-BY-SA-4.0": "https://creativecommons.org/licenses/by-sa/4.0/", - "CC-BY-NC-4.0": "https://creativecommons.org/licenses/by-nc/4.0/", - "CC-BY-ND-4.0": "https://creativecommons.org/licenses/by-nd/4.0/", - "CC-BY-NC-SA-4.0": "https://creativecommons.org/licenses/by-nc-sa/4.0/", - "CC-BY-NC-ND-4.0": "https://creativecommons.org/licenses/by-nc-nd/4.0/", - "CC0-1.0": "https://creativecommons.org/publicdomain/zero/1.0/", - "Artistic-2.0": "https://opensource.org/licenses/Artistic-2.0", - "EUPL-1.2": "https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12", - "EUPL-1.1": "https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-11", - "EUPL-1.0": "https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-10", - "Zlib": "https://opensource.org/licenses/Zlib", - "BSL-1.0": "https://opensource.org/licenses/BSL-1.0", - "Apache-1.1": "https://opensource.org/licenses/Apache-1.1", - "Apache-1.0": "https://opensource.org/licenses/Apache-1.0", - "AFL-3.0": "https://opensource.org/licenses/AFL-3.0", - "AFL-2.1": "https://opensource.org/licenses/AFL-2.1", - "AFL-2.0": "https://opensource.org/licenses/AFL-2.0", - "AFL-1.2": "https://opensource.org/licenses/AFL-1.2", - "AFL-1.1": "https://opensource.org/licenses/AFL-1.1", - "AFL-1.0": "https://opensource.org/licenses/AFL-1.0" - } +{ + "MIT": "https://opensource.org/licenses/MIT", + "GPL-3.0": "https://www.gnu.org/licenses/gpl-3.0.en.html", + "GPL-3.0-or-later": "https://www.gnu.org/licenses/gpl-3.0.en.html", + "Apache-2.0": "https://www.apache.org/licenses/LICENSE-2.0", + "ISC": "https://opensource.org/licenses/ISC", + "0BSD": "https://opensource.org/licenses/0BSD", + "OFL-1.1": "https://opensource.org/licenses/OFL-1.1", + "BSD-3-Clause": "https://opensource.org/licenses/BSD-3-Clause", + "BSD-2-Clause": "https://opensource.org/licenses/BSD-2-Clause", + "LGPL-2.1": "https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html", + "LGPL-3.0": "https://www.gnu.org/licenses/lgpl-3.0.en.html", + "AGPL-3.0": "https://www.gnu.org/licenses/agpl-3.0.en.html", + "MPL-2.0": "https://www.mozilla.org/en-US/MPL/2.0/", + "EPL-2.0": "https://www.eclipse.org/legal/epl-2.0/", + "CC-BY-4.0": "https://creativecommons.org/licenses/by/4.0/", + "Unlicense": "https://unlicense.org/", + "BlueOak-1.0.0": "https://blueoakcouncil.org/license/1.0.0", + "GPL-2.0": "https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html", + "GPL-2.0-or-later": "https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html", + "LGPL-2.0": "https://www.gnu.org/licenses/old-licenses/lgpl-2.0.en.html", + "LGPL-2.0-or-later": "https://www.gnu.org/licenses/old-licenses/lgpl-2.0.en.html", + "AGPL-1.0": "https://www.gnu.org/licenses/agpl-1.0.html", + "AGPL-1.0-or-later": "https://www.gnu.org/licenses/agpl-1.0.html", + "AGPL-2.0": "https://www.gnu.org/licenses/agpl-2.0.html", + "AGPL-2.0-or-later": "https://www.gnu.org/licenses/agpl-2.0.html", + "AGPL-3.0-or-later": "https://www.gnu.org/licenses/agpl-3.0.en.html", + "MPL-1.1": "https://www.mozilla.org/MPL/MPL-1.1.html", + "MPL-1.0": "https://www.mozilla.org/MPL/MPL-1.0.html", + "EPL-1.0": "https://www.eclipse.org/legal/epl-v10.html", + "CC-BY-SA-4.0": "https://creativecommons.org/licenses/by-sa/4.0/", + "CC-BY-NC-4.0": "https://creativecommons.org/licenses/by-nc/4.0/", + "CC-BY-ND-4.0": "https://creativecommons.org/licenses/by-nd/4.0/", + "CC-BY-NC-SA-4.0": "https://creativecommons.org/licenses/by-nc-sa/4.0/", + "CC-BY-NC-ND-4.0": "https://creativecommons.org/licenses/by-nc-nd/4.0/", + "CC0-1.0": "https://creativecommons.org/publicdomain/zero/1.0/", + "Artistic-2.0": "https://opensource.org/licenses/Artistic-2.0", + "EUPL-1.2": "https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12", + "EUPL-1.1": "https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-11", + "EUPL-1.0": "https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-10", + "Zlib": "https://opensource.org/licenses/Zlib", + "BSL-1.0": "https://opensource.org/licenses/BSL-1.0", + "Apache-1.1": "https://opensource.org/licenses/Apache-1.1", + "Apache-1.0": "https://opensource.org/licenses/Apache-1.0", + "AFL-3.0": "https://opensource.org/licenses/AFL-3.0", + "AFL-2.1": "https://opensource.org/licenses/AFL-2.1", + "AFL-2.0": "https://opensource.org/licenses/AFL-2.0", + "AFL-1.2": "https://opensource.org/licenses/AFL-1.2", + "AFL-1.1": "https://opensource.org/licenses/AFL-1.1", + "AFL-1.0": "https://opensource.org/licenses/AFL-1.0" +} diff --git a/src/components/LogUpdate/CriticalCareEditor.tsx b/src/components/LogUpdate/CriticalCareEditor.tsx index 5a3e7f896d4..42de82b51b8 100644 --- a/src/components/LogUpdate/CriticalCareEditor.tsx +++ b/src/components/LogUpdate/CriticalCareEditor.tsx @@ -1,18 +1,24 @@ -import useQuery from "../../Utils/request/useQuery"; -import routes from "../../Redux/api"; -import LogUpdateSections, { RoundTypeSections } from "./Sections"; -import React, { useState } from "react"; -import Loading from "@/components/Common/Loading"; -import { DailyRoundsModel } from "../Patient/models"; -import ButtonV2, { Submit } from "@/components/Common/components/ButtonV2"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import Card from "../../CAREUI/display/Card"; import { navigate } from "raviger"; -import { classNames } from "../../Utils/utils"; -import request from "../../Utils/request/request"; -import { useSlugs } from "@/common/hooks/useSlug"; +import React, { useState } from "react"; import { useTranslation } from "react-i18next"; -import { Success } from "../../Utils/Notifications"; + +import Card from "@/CAREUI/display/Card"; +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import ButtonV2, { Submit } from "@/components/Common/ButtonV2"; +import Loading from "@/components/Common/Loading"; +import LogUpdateSections, { + RoundTypeSections, +} from "@/components/LogUpdate/Sections"; +import { DailyRoundsModel } from "@/components/Patient/models"; + +import { useSlugs } from "@/hooks/useSlug"; + +import { Success } from "@/Utils/Notifications"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import useQuery from "@/Utils/request/useQuery"; +import { classNames } from "@/Utils/utils"; type Props = { facilityId: string; diff --git a/src/components/LogUpdate/CriticalCarePreview.tsx b/src/components/LogUpdate/CriticalCarePreview.tsx index 8546a7501f4..1c95f051526 100644 --- a/src/components/LogUpdate/CriticalCarePreview.tsx +++ b/src/components/LogUpdate/CriticalCarePreview.tsx @@ -1,23 +1,26 @@ +import React, { useEffect } from "react"; import { useTranslation } from "react-i18next"; -import routes from "../../Redux/api"; -import useQuery from "../../Utils/request/useQuery"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; + +import Card from "@/CAREUI/display/Card"; + +import { meanArterialPressure } from "@/components/Common/BloodPressureFormField"; +import ButtonV2 from "@/components/Common/ButtonV2"; import Loading from "@/components/Common/Loading"; -import Card from "../../CAREUI/display/Card"; -import React, { useEffect } from "react"; -import { ABGAnalysisFields } from "./Sections/ABGAnalysis"; +import { ABGAnalysisFields } from "@/components/LogUpdate/Sections/ABGAnalysis"; +import { IOBalanceSections } from "@/components/LogUpdate/Sections/IOBalance"; +import PressureSore from "@/components/LogUpdate/Sections/PressureSore/PressureSore"; +import { VentilatorFields } from "@/components/LogUpdate/Sections/RespiratorySupport/Ventilator"; +import PainChart from "@/components/LogUpdate/components/PainChart"; +import { DailyRoundsModel } from "@/components/Patient/models"; + +import routes from "@/Utils/request/api"; +import useQuery from "@/Utils/request/useQuery"; import { + ValueDescription, classNames, properRoundOf, rangeValueDescription, - ValueDescription, -} from "../../Utils/utils"; -import { VentilatorFields } from "./Sections/RespiratorySupport/Ventilator"; -import PressureSore from "./Sections/PressureSore/PressureSore"; -import { IOBalanceSections } from "./Sections/IOBalance"; -import PainChart from "./components/PainChart"; -import { meanArterialPressure } from "@/components/Common/BloodPressureFormField"; -import { DailyRoundsModel } from "../Patient/models"; +} from "@/Utils/utils"; type Props = { facilityId: string; diff --git a/src/components/LogUpdate/Sections/ABGAnalysis.tsx b/src/components/LogUpdate/Sections/ABGAnalysis.tsx index c0d8d32b5ba..4a432368909 100644 --- a/src/components/LogUpdate/Sections/ABGAnalysis.tsx +++ b/src/components/LogUpdate/Sections/ABGAnalysis.tsx @@ -1,8 +1,13 @@ import { ReactNode } from "react"; -import { rangeValueDescription, ValueDescription } from "../../../Utils/utils"; -import RangeFormField from "../../Form/FormFields/RangeFormField"; -import { LogUpdateSectionMeta, LogUpdateSectionProps } from "../utils"; -import { DailyRoundsModel } from "../../Patient/models"; + +import RangeFormField from "@/components/Form/FormFields/RangeFormField"; +import { + LogUpdateSectionMeta, + LogUpdateSectionProps, +} from "@/components/LogUpdate/utils"; +import { DailyRoundsModel } from "@/components/Patient/models"; + +import { ValueDescription, rangeValueDescription } from "@/Utils/utils"; export const ABGAnalysisFields = [ { diff --git a/src/components/LogUpdate/Sections/BloodSugar.tsx b/src/components/LogUpdate/Sections/BloodSugar.tsx index 9af7ad32069..8be63fb680f 100644 --- a/src/components/LogUpdate/Sections/BloodSugar.tsx +++ b/src/components/LogUpdate/Sections/BloodSugar.tsx @@ -1,10 +1,16 @@ import { useTranslation } from "react-i18next"; -import { rangeValueDescription } from "../../../Utils/utils"; -import RadioFormField from "../../Form/FormFields/RadioFormField"; -import RangeFormField from "../../Form/FormFields/RangeFormField"; -import { LogUpdateSectionMeta, LogUpdateSectionProps } from "../utils"; + +import RadioFormField from "@/components/Form/FormFields/RadioFormField"; +import RangeFormField from "@/components/Form/FormFields/RangeFormField"; +import { + LogUpdateSectionMeta, + LogUpdateSectionProps, +} from "@/components/LogUpdate/utils"; + import { INSULIN_INTAKE_FREQUENCY_OPTIONS } from "@/common/constants"; +import { rangeValueDescription } from "@/Utils/utils"; + const BloodSugar = ({ log, onChange }: LogUpdateSectionProps) => { const { t } = useTranslation(); diff --git a/src/components/LogUpdate/Sections/Dialysis.tsx b/src/components/LogUpdate/Sections/Dialysis.tsx index 2a6ed1988c1..784152d4ece 100644 --- a/src/components/LogUpdate/Sections/Dialysis.tsx +++ b/src/components/LogUpdate/Sections/Dialysis.tsx @@ -1,5 +1,8 @@ -import RangeFormField from "../../Form/FormFields/RangeFormField"; -import { LogUpdateSectionMeta, LogUpdateSectionProps } from "../utils"; +import RangeFormField from "@/components/Form/FormFields/RangeFormField"; +import { + LogUpdateSectionMeta, + LogUpdateSectionProps, +} from "@/components/LogUpdate/utils"; const Dialysis = ({ log, onChange }: LogUpdateSectionProps) => { return ( diff --git a/src/components/LogUpdate/Sections/IOBalance.tsx b/src/components/LogUpdate/Sections/IOBalance.tsx index 044b00c7b5f..91d5e577d06 100644 --- a/src/components/LogUpdate/Sections/IOBalance.tsx +++ b/src/components/LogUpdate/Sections/IOBalance.tsx @@ -1,10 +1,15 @@ import { Fragment } from "react/jsx-runtime"; -import { DailyRoundsModel } from "../../Patient/models"; -import TextFormField from "../../Form/FormFields/TextFormField"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import CareIcon from "../../../CAREUI/icons/CareIcon"; -import { LogUpdateSectionMeta, LogUpdateSectionProps } from "../utils"; -import { SelectFormField } from "../../Form/FormFields/SelectFormField"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import ButtonV2 from "@/components/Common/ButtonV2"; +import { SelectFormField } from "@/components/Form/FormFields/SelectFormField"; +import TextFormField from "@/components/Form/FormFields/TextFormField"; +import { + LogUpdateSectionMeta, + LogUpdateSectionProps, +} from "@/components/LogUpdate/utils"; +import { DailyRoundsModel } from "@/components/Patient/models"; export const IOBalanceSections = [ { diff --git a/src/components/LogUpdate/Sections/NeurologicalMonitoring.tsx b/src/components/LogUpdate/Sections/NeurologicalMonitoring.tsx index a49a61b8848..64a800a4e39 100644 --- a/src/components/LogUpdate/Sections/NeurologicalMonitoring.tsx +++ b/src/components/LogUpdate/Sections/NeurologicalMonitoring.tsx @@ -1,4 +1,14 @@ import { useTranslation } from "react-i18next"; + +import CheckBoxFormField from "@/components/Form/FormFields/CheckBoxFormField"; +import RadioFormField from "@/components/Form/FormFields/RadioFormField"; +import TextAreaFormField from "@/components/Form/FormFields/TextAreaFormField"; +import PupilSizeSelect from "@/components/LogUpdate/components/PupilSizeSelect"; +import { + LogUpdateSectionMeta, + LogUpdateSectionProps, +} from "@/components/LogUpdate/utils"; + import { CONSCIOUSNESS_LEVEL, EYE_OPEN_SCALE, @@ -7,11 +17,6 @@ import { PUPIL_REACTION_OPTIONS, VERBAL_RESPONSE_SCALE, } from "@/common/constants"; -import CheckBoxFormField from "../../Form/FormFields/CheckBoxFormField"; -import RadioFormField from "../../Form/FormFields/RadioFormField"; -import TextAreaFormField from "../../Form/FormFields/TextAreaFormField"; -import PupilSizeSelect from "../components/PupilSizeSelect"; -import { LogUpdateSectionMeta, LogUpdateSectionProps } from "../utils"; const NeurologicalMonitoring = ({ log, onChange }: LogUpdateSectionProps) => { const { t } = useTranslation(); diff --git a/src/components/LogUpdate/Sections/NursingCare.tsx b/src/components/LogUpdate/Sections/NursingCare.tsx index 280152db744..52bc72372e5 100644 --- a/src/components/LogUpdate/Sections/NursingCare.tsx +++ b/src/components/LogUpdate/Sections/NursingCare.tsx @@ -1,8 +1,13 @@ import { useTranslation } from "react-i18next"; + +import AutoExpandingTextInputFormField from "@/components/Form/FormFields/AutoExpandingTextInputFormField"; +import AutocompleteMultiSelectFormField from "@/components/Form/FormFields/AutocompleteMultiselect"; +import { + LogUpdateSectionMeta, + LogUpdateSectionProps, +} from "@/components/LogUpdate/utils"; + import { NURSING_CARE_PROCEDURES } from "@/common/constants"; -import { LogUpdateSectionMeta, LogUpdateSectionProps } from "../utils"; -import AutoExpandingTextInputFormField from "../../Form/FormFields/AutoExpandingTextInputFormField"; -import AutocompleteMultiSelectFormField from "../../Form/FormFields/AutocompleteMultiselect"; const NursingCare = ({ log, onChange }: LogUpdateSectionProps) => { const { t } = useTranslation(); diff --git a/src/components/LogUpdate/Sections/PressureSore/PressureSore.tsx b/src/components/LogUpdate/Sections/PressureSore/PressureSore.tsx index a632191a609..e34b62aa74e 100644 --- a/src/components/LogUpdate/Sections/PressureSore/PressureSore.tsx +++ b/src/components/LogUpdate/Sections/PressureSore/PressureSore.tsx @@ -1,20 +1,27 @@ import { useEffect, useRef, useState } from "react"; -import PopupModal from "../../../../CAREUI/display/PopupModal"; -import HumanBodyChart from "../../../../CAREUI/interactive/HumanChart"; -import { SelectFormField } from "../../../Form/FormFields/SelectFormField"; -import TextFormField from "../../../Form/FormFields/TextFormField"; -import TextAreaFormField from "../../../Form/FormFields/TextAreaFormField"; -import { LogUpdateSectionMeta, LogUpdateSectionProps } from "../../utils"; +import { useTranslation } from "react-i18next"; + +import PopupModal from "@/CAREUI/display/PopupModal"; +import HumanBodyChart from "@/CAREUI/interactive/HumanChart"; + +import { SelectFormField } from "@/components/Form/FormFields/SelectFormField"; +import TextAreaFormField from "@/components/Form/FormFields/TextAreaFormField"; +import TextFormField from "@/components/Form/FormFields/TextFormField"; +import { calculatePushScore } from "@/components/LogUpdate/Sections/PressureSore/utils"; +import { + LogUpdateSectionMeta, + LogUpdateSectionProps, +} from "@/components/LogUpdate/utils"; +import { IPressureSore } from "@/components/Patient/models"; + import { HumanBodyRegion, PressureSoreExudateAmountOptions, PressureSoreTissueTypeOptions, } from "@/common/constants"; -import { IPressureSore } from "../../../Patient/models"; -import { Error } from "../../../../Utils/Notifications"; -import { classNames, getValueDescription } from "../../../../Utils/utils"; -import { calculatePushScore } from "./utils"; -import { useTranslation } from "react-i18next"; + +import { Error } from "@/Utils/Notifications"; +import { classNames, getValueDescription } from "@/Utils/utils"; const PressureSore = ({ log, onChange, readonly }: LogUpdateSectionProps) => { const value = log.pressure_sore ?? []; diff --git a/src/components/LogUpdate/Sections/PressureSore/utils.ts b/src/components/LogUpdate/Sections/PressureSore/utils.ts index 64aed7342a7..144b3fac0d9 100644 --- a/src/components/LogUpdate/Sections/PressureSore/utils.ts +++ b/src/components/LogUpdate/Sections/PressureSore/utils.ts @@ -1,8 +1,9 @@ +import { IPressureSore } from "@/components/Patient/models"; + import { PressureSoreExudateAmountOptions, PressureSoreTissueTypeOptions, } from "@/common/constants"; -import { IPressureSore } from "../../../Patient/models"; const areaIntervalPoints = [0.0, 0.3, 0.6, 1.0, 2.2, 3.0, 4.0, 8.0, 12.0, 24.0]; diff --git a/src/components/LogUpdate/Sections/RespiratorySupport/OxygenSupport.tsx b/src/components/LogUpdate/Sections/RespiratorySupport/OxygenSupport.tsx index 45d339bae04..dfc9b4eeb89 100644 --- a/src/components/LogUpdate/Sections/RespiratorySupport/OxygenSupport.tsx +++ b/src/components/LogUpdate/Sections/RespiratorySupport/OxygenSupport.tsx @@ -1,10 +1,13 @@ import { useTranslation } from "react-i18next"; -import { rangeValueDescription } from "../../../../Utils/utils"; -import RadioFormField from "../../../Form/FormFields/RadioFormField"; -import RangeFormField from "../../../Form/FormFields/RangeFormField"; -import { LogUpdateSectionProps } from "../../utils"; + +import RadioFormField from "@/components/Form/FormFields/RadioFormField"; +import RangeFormField from "@/components/Form/FormFields/RangeFormField"; +import { LogUpdateSectionProps } from "@/components/LogUpdate/utils"; + import { OXYGEN_MODALITY_OPTIONS } from "@/common/constants"; +import { rangeValueDescription } from "@/Utils/utils"; + const OxygenRespiratorySupport = ({ log, onChange }: LogUpdateSectionProps) => { const { t } = useTranslation(); diff --git a/src/components/LogUpdate/Sections/RespiratorySupport/Ventilator.tsx b/src/components/LogUpdate/Sections/RespiratorySupport/Ventilator.tsx index 4af1dc0fea7..96315bdcf69 100644 --- a/src/components/LogUpdate/Sections/RespiratorySupport/Ventilator.tsx +++ b/src/components/LogUpdate/Sections/RespiratorySupport/Ventilator.tsx @@ -1,11 +1,9 @@ -import { - rangeValueDescription, - ValueDescription, -} from "../../../../Utils/utils"; -import RangeFormField from "../../../Form/FormFields/RangeFormField"; -import { DailyRoundsModel } from "../../../Patient/models"; -import { LogUpdateSectionProps } from "../../utils"; -import VentilatorModeSelector from "./VentilatorModeSelector"; +import RangeFormField from "@/components/Form/FormFields/RangeFormField"; +import VentilatorModeSelector from "@/components/LogUpdate/Sections/RespiratorySupport/VentilatorModeSelector"; +import { LogUpdateSectionProps } from "@/components/LogUpdate/utils"; +import { DailyRoundsModel } from "@/components/Patient/models"; + +import { ValueDescription, rangeValueDescription } from "@/Utils/utils"; export const VentilatorFields = [ { diff --git a/src/components/LogUpdate/Sections/RespiratorySupport/VentilatorModeSelector.tsx b/src/components/LogUpdate/Sections/RespiratorySupport/VentilatorModeSelector.tsx index 36e8bbce6a6..6214fa2e0c7 100644 --- a/src/components/LogUpdate/Sections/RespiratorySupport/VentilatorModeSelector.tsx +++ b/src/components/LogUpdate/Sections/RespiratorySupport/VentilatorModeSelector.tsx @@ -1,6 +1,7 @@ import { useTranslation } from "react-i18next"; -import { RadioInput } from "../../../Form/FormFields/RadioFormField"; -import { DailyRoundsModel } from "../../../Patient/models"; + +import { RadioInput } from "@/components/Form/FormFields/RadioFormField"; +import { DailyRoundsModel } from "@/components/Patient/models"; type Value = DailyRoundsModel["ventilator_mode"]; diff --git a/src/components/LogUpdate/Sections/RespiratorySupport/index.tsx b/src/components/LogUpdate/Sections/RespiratorySupport/index.tsx index c53d5f61108..d8641dd135a 100644 --- a/src/components/LogUpdate/Sections/RespiratorySupport/index.tsx +++ b/src/components/LogUpdate/Sections/RespiratorySupport/index.tsx @@ -1,20 +1,27 @@ import { useEffect } from "react"; -import { useSlugs } from "@/common/hooks/useSlug"; -import routes from "../../../../Redux/api"; -import useQuery from "../../../../Utils/request/useQuery"; -import { rangeValueDescription } from "../../../../Utils/utils"; -import { AssetClass } from "../../../Assets/AssetTypes"; -import DialogModal from "@/components/Common/Dialog"; -import Beds from "../../../Facility/Consultations/Beds"; -import RadioFormField from "../../../Form/FormFields/RadioFormField"; -import RangeFormField from "../../../Form/FormFields/RangeFormField"; -import { LogUpdateSectionMeta, LogUpdateSectionProps } from "../../utils"; -import OxygenRespiratorySupport from "./OxygenSupport"; -import VentilatorRespiratorySupport from "./Ventilator"; -import { Warn } from "../../../../Utils/Notifications"; import { useTranslation } from "react-i18next"; + +import { AssetClass } from "@/components/Assets/AssetTypes"; +import DialogModal from "@/components/Common/Dialog"; +import Beds from "@/components/Facility/Consultations/Beds"; +import RadioFormField from "@/components/Form/FormFields/RadioFormField"; +import RangeFormField from "@/components/Form/FormFields/RangeFormField"; +import OxygenRespiratorySupport from "@/components/LogUpdate/Sections/RespiratorySupport/OxygenSupport"; +import VentilatorRespiratorySupport from "@/components/LogUpdate/Sections/RespiratorySupport/Ventilator"; +import { + LogUpdateSectionMeta, + LogUpdateSectionProps, +} from "@/components/LogUpdate/utils"; + +import { useSlugs } from "@/hooks/useSlug"; + import { RESPIRATORY_SUPPORT } from "@/common/constants"; +import { Warn } from "@/Utils/Notifications"; +import routes from "@/Utils/request/api"; +import useQuery from "@/Utils/request/useQuery"; +import { rangeValueDescription } from "@/Utils/utils"; + const RespiratorySupport = ({ log, onChange }: LogUpdateSectionProps) => { const { t } = useTranslation(); const [facilityId, consultationId] = useSlugs("facility", "consultation"); diff --git a/src/components/LogUpdate/Sections/Vitals.tsx b/src/components/LogUpdate/Sections/Vitals.tsx index 4612ced6da1..dab997bf126 100644 --- a/src/components/LogUpdate/Sections/Vitals.tsx +++ b/src/components/LogUpdate/Sections/Vitals.tsx @@ -1,17 +1,23 @@ import { useTranslation } from "react-i18next"; + +import { meanArterialPressure } from "@/components/Common/BloodPressureFormField"; +import RadioFormField from "@/components/Form/FormFields/RadioFormField"; +import RangeFormField from "@/components/Form/FormFields/RangeFormField"; +import TextAreaFormField from "@/components/Form/FormFields/TextAreaFormField"; +import PainChart from "@/components/LogUpdate/components/PainChart"; +import { + LogUpdateSectionMeta, + LogUpdateSectionProps, +} from "@/components/LogUpdate/utils"; +import { BloodPressure } from "@/components/Patient/models"; + +import { HEARTBEAT_RHYTHM_CHOICES } from "@/common/constants"; + import { celsiusToFahrenheit, fahrenheitToCelsius, rangeValueDescription, -} from "../../../Utils/utils"; -import { meanArterialPressure } from "@/components/Common/BloodPressureFormField"; -import RadioFormField from "../../Form/FormFields/RadioFormField"; -import RangeFormField from "../../Form/FormFields/RangeFormField"; -import TextAreaFormField from "../../Form/FormFields/TextAreaFormField"; -import PainChart from "../components/PainChart"; -import { LogUpdateSectionMeta, LogUpdateSectionProps } from "../utils"; -import { HEARTBEAT_RHYTHM_CHOICES } from "@/common/constants"; -import { BloodPressure } from "../../Patient/models"; +} from "@/Utils/utils"; const Vitals = ({ log, onChange }: LogUpdateSectionProps) => { const { t } = useTranslation(); diff --git a/src/components/LogUpdate/Sections/index.tsx b/src/components/LogUpdate/Sections/index.tsx index 97328f74c92..94df5e05640 100644 --- a/src/components/LogUpdate/Sections/index.tsx +++ b/src/components/LogUpdate/Sections/index.tsx @@ -1,15 +1,19 @@ import React from "react"; -import ABGAnalysis from "./ABGAnalysis"; -import BloodSugar from "./BloodSugar"; -import Dialysis from "./Dialysis"; -import IOBalance from "./IOBalance"; -import NeurologicalMonitoring from "./NeurologicalMonitoring"; -import NursingCare from "./NursingCare"; -import PressureSore from "./PressureSore/PressureSore"; -import RespiratorySupport from "./RespiratorySupport"; -import Vitals from "./Vitals"; -import { LogUpdateSectionMeta, LogUpdateSectionProps } from "../utils"; -import { DailyRoundTypes } from "../../Patient/models"; + +import ABGAnalysis from "@/components/LogUpdate/Sections/ABGAnalysis"; +import BloodSugar from "@/components/LogUpdate/Sections/BloodSugar"; +import Dialysis from "@/components/LogUpdate/Sections/Dialysis"; +import IOBalance from "@/components/LogUpdate/Sections/IOBalance"; +import NeurologicalMonitoring from "@/components/LogUpdate/Sections/NeurologicalMonitoring"; +import NursingCare from "@/components/LogUpdate/Sections/NursingCare"; +import PressureSore from "@/components/LogUpdate/Sections/PressureSore/PressureSore"; +import RespiratorySupport from "@/components/LogUpdate/Sections/RespiratorySupport"; +import Vitals from "@/components/LogUpdate/Sections/Vitals"; +import { + LogUpdateSectionMeta, + LogUpdateSectionProps, +} from "@/components/LogUpdate/utils"; +import { DailyRoundTypes } from "@/components/Patient/models"; const LogUpdateSections = { Vitals, diff --git a/src/components/LogUpdate/components/PainChart.tsx b/src/components/LogUpdate/components/PainChart.tsx index 3ba2ce0a650..e5ee128944f 100644 --- a/src/components/LogUpdate/components/PainChart.tsx +++ b/src/components/LogUpdate/components/PainChart.tsx @@ -1,12 +1,16 @@ import { useEffect, useRef, useState } from "react"; -import { IPainScale } from "../../Patient/models"; -import RangeFormField from "../../Form/FormFields/RangeFormField"; -import HumanBodyChart from "../../../CAREUI/interactive/HumanChart"; -import PopupModal from "../../../CAREUI/display/PopupModal"; -import TextAreaFormField from "../../Form/FormFields/TextAreaFormField"; -import { classNames, getValueDescription } from "../../../Utils/utils"; + +import PopupModal from "@/CAREUI/display/PopupModal"; +import HumanBodyChart from "@/CAREUI/interactive/HumanChart"; + +import RangeFormField from "@/components/Form/FormFields/RangeFormField"; +import TextAreaFormField from "@/components/Form/FormFields/TextAreaFormField"; +import { IPainScale } from "@/components/Patient/models"; + import { HumanBodyRegion } from "@/common/constants"; -import { Error } from "../../../Utils/Notifications"; + +import { Error } from "@/Utils/Notifications"; +import { classNames, getValueDescription } from "@/Utils/utils"; type Props = { pain: IPainScale[]; diff --git a/src/components/LogUpdate/components/PupilSizeSelect.tsx b/src/components/LogUpdate/components/PupilSizeSelect.tsx index 14c2f0fc7e3..24b6ad04a15 100644 --- a/src/components/LogUpdate/components/PupilSizeSelect.tsx +++ b/src/components/LogUpdate/components/PupilSizeSelect.tsx @@ -1,7 +1,8 @@ -import { classNames, getValueDescription } from "../../../Utils/utils"; -import CheckBoxFormField from "../../Form/FormFields/CheckBoxFormField"; -import TextAreaFormField from "../../Form/FormFields/TextAreaFormField"; -import { LogUpdateSectionProps } from "../utils"; +import CheckBoxFormField from "@/components/Form/FormFields/CheckBoxFormField"; +import TextAreaFormField from "@/components/Form/FormFields/TextAreaFormField"; +import { LogUpdateSectionProps } from "@/components/LogUpdate/utils"; + +import { classNames, getValueDescription } from "@/Utils/utils"; const PupilSizeValueDescriptions = [ { till: 2, text: "Constricted", color: "red" }, diff --git a/src/components/LogUpdate/utils.ts b/src/components/LogUpdate/utils.ts index 96fdb1bce64..06dbb559ac2 100644 --- a/src/components/LogUpdate/utils.ts +++ b/src/components/LogUpdate/utils.ts @@ -1,5 +1,6 @@ -import { IconName } from "../../CAREUI/icons/CareIcon"; -import { DailyRoundsModel } from "../Patient/models"; +import { IconName } from "@/CAREUI/icons/CareIcon"; + +import { DailyRoundsModel } from "@/components/Patient/models"; export type LogUpdateSectionProps = { log: DailyRoundsModel; diff --git a/src/components/Medicine/AdministerMedicine.tsx b/src/components/Medicine/AdministerMedicine.tsx index 13c6f4bab1a..8344b4b122c 100644 --- a/src/components/Medicine/AdministerMedicine.tsx +++ b/src/components/Medicine/AdministerMedicine.tsx @@ -1,20 +1,24 @@ import { useState } from "react"; -import ConfirmDialog from "@/components/Common/ConfirmDialog"; -import { DosageValue, Prescription } from "./models"; -import TextAreaFormField from "../Form/FormFields/TextAreaFormField"; -import { Success } from "../../Utils/Notifications"; -import PrescriptionDetailCard from "./PrescriptionDetailCard"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import { formatDateTime } from "../../Utils/utils"; import { useTranslation } from "react-i18next"; -import CheckBoxFormField from "../Form/FormFields/CheckBoxFormField"; -import dayjs from "../../Utils/dayjs"; -import useSlug from "@/common/hooks/useSlug"; -import request from "../../Utils/request/request"; -import MedicineRoutes from "./routes"; -import DosageFormField from "../Form/FormFields/DosageFormField"; -import { AdministrationDosageValidator } from "./validators"; -import DateFormField from "../Form/FormFields/DateFormField"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import ConfirmDialog from "@/components/Common/ConfirmDialog"; +import CheckBoxFormField from "@/components/Form/FormFields/CheckBoxFormField"; +import DateFormField from "@/components/Form/FormFields/DateFormField"; +import DosageFormField from "@/components/Form/FormFields/DosageFormField"; +import TextAreaFormField from "@/components/Form/FormFields/TextAreaFormField"; +import PrescriptionDetailCard from "@/components/Medicine/PrescriptionDetailCard"; +import { DosageValue, Prescription } from "@/components/Medicine/models"; +import MedicineRoutes from "@/components/Medicine/routes"; +import { AdministrationDosageValidator } from "@/components/Medicine/validators"; + +import useSlug from "@/hooks/useSlug"; + +import { Success } from "@/Utils/Notifications"; +import dayjs from "@/Utils/dayjs"; +import request from "@/Utils/request/request"; +import { formatDateTime } from "@/Utils/utils"; interface Props { prescription: Prescription; diff --git a/src/components/Medicine/CreatePrescriptionForm.tsx b/src/components/Medicine/CreatePrescriptionForm.tsx index 7709889e9e3..c80e96094ae 100644 --- a/src/components/Medicine/CreatePrescriptionForm.tsx +++ b/src/components/Medicine/CreatePrescriptionForm.tsx @@ -1,6 +1,6 @@ +import dayjs from "dayjs"; import { useTranslation } from "react-i18next"; -import useSlug from "@/common/hooks/useSlug"; import { RequiredFieldValidator } from "@/components/Form/FieldValidators"; import Form from "@/components/Form/Form"; import CheckBoxFormField from "@/components/Form/FormFields/CheckBoxFormField"; @@ -15,9 +15,11 @@ import { } from "@/components/Medicine/models"; import MedicineRoutes from "@/components/Medicine/routes"; import { PrescriptionFormValidator } from "@/components/Medicine/validators"; + +import useSlug from "@/hooks/useSlug"; + import { Success } from "@/Utils/Notifications"; import useMutation from "@/Utils/request/useMutation"; -import dayjs from "dayjs"; export default function CreatePrescriptionForm(props: { prescription: Prescription; diff --git a/src/components/Medicine/DiscontinuePrescription.tsx b/src/components/Medicine/DiscontinuePrescription.tsx index c71d18ee2d9..78a5ee2fecd 100644 --- a/src/components/Medicine/DiscontinuePrescription.tsx +++ b/src/components/Medicine/DiscontinuePrescription.tsx @@ -1,13 +1,16 @@ import { useState } from "react"; -import ConfirmDialog from "@/components/Common/ConfirmDialog"; -import { Prescription } from "./models"; -import TextAreaFormField from "../Form/FormFields/TextAreaFormField"; -import { Success } from "../../Utils/Notifications"; -import PrescriptionDetailCard from "./PrescriptionDetailCard"; import { useTranslation } from "react-i18next"; -import request from "../../Utils/request/request"; -import MedicineRoutes from "./routes"; -import useSlug from "@/common/hooks/useSlug"; + +import ConfirmDialog from "@/components/Common/ConfirmDialog"; +import TextAreaFormField from "@/components/Form/FormFields/TextAreaFormField"; +import PrescriptionDetailCard from "@/components/Medicine/PrescriptionDetailCard"; +import { Prescription } from "@/components/Medicine/models"; +import MedicineRoutes from "@/components/Medicine/routes"; + +import useSlug from "@/hooks/useSlug"; + +import { Success } from "@/Utils/Notifications"; +import request from "@/Utils/request/request"; interface Props { prescription: Prescription; diff --git a/src/components/Medicine/EditPrescriptionForm.tsx b/src/components/Medicine/EditPrescriptionForm.tsx index 5552ca1d635..fe5eccae982 100644 --- a/src/components/Medicine/EditPrescriptionForm.tsx +++ b/src/components/Medicine/EditPrescriptionForm.tsx @@ -1,22 +1,25 @@ import { useState } from "react"; -import Form from "../Form/Form"; -import { Prescription } from "./models"; -import request from "../../Utils/request/request"; -import * as Notification from "../../Utils/Notifications"; -import useSlug from "@/common/hooks/useSlug"; -import { RequiredFieldValidator } from "../Form/FieldValidators"; import { useTranslation } from "react-i18next"; -import { SelectFormField } from "../Form/FormFields/SelectFormField"; + +import { RequiredFieldValidator } from "@/components/Form/FieldValidators"; +import Form from "@/components/Form/Form"; +import CheckBoxFormField from "@/components/Form/FormFields/CheckBoxFormField"; +import DosageFormField from "@/components/Form/FormFields/DosageFormField"; +import { SelectFormField } from "@/components/Form/FormFields/SelectFormField"; +import TextAreaFormField from "@/components/Form/FormFields/TextAreaFormField"; +import TextFormField from "@/components/Form/FormFields/TextFormField"; import { PRESCRIPTION_FREQUENCIES, PRESCRIPTION_ROUTES, -} from "./CreatePrescriptionForm"; -import TextFormField from "../Form/FormFields/TextFormField"; -import TextAreaFormField from "../Form/FormFields/TextAreaFormField"; -import { EditPrescriptionFormValidator } from "./validators"; -import MedicineRoutes from "./routes"; -import CheckBoxFormField from "../Form/FormFields/CheckBoxFormField"; -import DosageFormField from "../Form/FormFields/DosageFormField"; +} from "@/components/Medicine/CreatePrescriptionForm"; +import { Prescription } from "@/components/Medicine/models"; +import MedicineRoutes from "@/components/Medicine/routes"; +import { EditPrescriptionFormValidator } from "@/components/Medicine/validators"; + +import useSlug from "@/hooks/useSlug"; + +import * as Notification from "@/Utils/Notifications"; +import request from "@/Utils/request/request"; interface Props { initial: Prescription; diff --git a/src/components/Medicine/ManagePrescriptions.tsx b/src/components/Medicine/ManagePrescriptions.tsx index d80d5733071..dfdbbe3e325 100644 --- a/src/components/Medicine/ManagePrescriptions.tsx +++ b/src/components/Medicine/ManagePrescriptions.tsx @@ -1,9 +1,12 @@ import { useTranslation } from "react-i18next"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import useAppHistory from "@/common/hooks/useAppHistory"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import Page from "@/components/Common/components/Page"; -import PrescriptionBuilder from "./PrescriptionBuilder"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import ButtonV2 from "@/components/Common/ButtonV2"; +import Page from "@/components/Common/Page"; +import PrescriptionBuilder from "@/components/Medicine/PrescriptionBuilder"; + +import useAppHistory from "@/hooks/useAppHistory"; export default function ManagePrescriptions() { const { t } = useTranslation(); diff --git a/src/components/Medicine/MedibaseAutocompleteFormField.tsx b/src/components/Medicine/MedibaseAutocompleteFormField.tsx index 55361d20258..daca53f08ff 100644 --- a/src/components/Medicine/MedibaseAutocompleteFormField.tsx +++ b/src/components/Medicine/MedibaseAutocompleteFormField.tsx @@ -1,15 +1,18 @@ import { useState } from "react"; -import Switch from "../../CAREUI/interactive/Switch"; -import { Autocomplete } from "../Form/FormFields/Autocomplete"; -import FormField from "../Form/FormFields/FormField"; + +import Switch from "@/CAREUI/interactive/Switch"; + +import { Autocomplete } from "@/components/Form/FormFields/Autocomplete"; +import FormField from "@/components/Form/FormFields/FormField"; import { FormFieldBaseProps, useFormFieldPropsResolver, -} from "../Form/FormFields/Utils"; -import { MedibaseMedicine } from "./models"; -import useQuery from "../../Utils/request/useQuery"; -import routes from "../../Redux/api"; -import { mergeQueryOptions } from "../../Utils/utils"; +} from "@/components/Form/FormFields/Utils"; +import { MedibaseMedicine } from "@/components/Medicine/models"; + +import routes from "@/Utils/request/api"; +import useQuery from "@/Utils/request/useQuery"; +import { mergeQueryOptions } from "@/Utils/utils"; export default function MedibaseAutocompleteFormField( props: FormFieldBaseProps, diff --git a/src/components/Medicine/MedicineAdministration.tsx b/src/components/Medicine/MedicineAdministration.tsx index d2daf370207..e94ffe57040 100644 --- a/src/components/Medicine/MedicineAdministration.tsx +++ b/src/components/Medicine/MedicineAdministration.tsx @@ -1,20 +1,27 @@ import { useEffect, useMemo, useState } from "react"; -import PrescriptionDetailCard from "./PrescriptionDetailCard"; -import { MedicineAdministrationRecord, Prescription } from "./models"; -import TextAreaFormField from "../Form/FormFields/TextAreaFormField"; -import CheckBoxFormField from "../Form/FormFields/CheckBoxFormField"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import { Error, Success } from "../../Utils/Notifications"; -import { formatDateTime } from "../../Utils/utils"; import { useTranslation } from "react-i18next"; -import dayjs from "../../Utils/dayjs"; -import request from "../../Utils/request/request"; -import MedicineRoutes from "./routes"; -import useSlug from "@/common/hooks/useSlug"; -import DosageFormField from "../Form/FormFields/DosageFormField"; -import { AdministrationDosageValidator } from "./validators"; -import DateFormField from "../Form/FormFields/DateFormField"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import ButtonV2 from "@/components/Common/ButtonV2"; +import CheckBoxFormField from "@/components/Form/FormFields/CheckBoxFormField"; +import DateFormField from "@/components/Form/FormFields/DateFormField"; +import DosageFormField from "@/components/Form/FormFields/DosageFormField"; +import TextAreaFormField from "@/components/Form/FormFields/TextAreaFormField"; +import PrescriptionDetailCard from "@/components/Medicine/PrescriptionDetailCard"; +import { + MedicineAdministrationRecord, + Prescription, +} from "@/components/Medicine/models"; +import MedicineRoutes from "@/components/Medicine/routes"; +import { AdministrationDosageValidator } from "@/components/Medicine/validators"; + +import useSlug from "@/hooks/useSlug"; + +import { Error, Success } from "@/Utils/Notifications"; +import dayjs from "@/Utils/dayjs"; +import request from "@/Utils/request/request"; +import { formatDateTime } from "@/Utils/utils"; interface Props { prescriptions: Prescription[]; diff --git a/src/components/Medicine/MedicineAdministrationSheet/AdministrationEventCell.tsx b/src/components/Medicine/MedicineAdministrationSheet/AdministrationEventCell.tsx index b460e90e87e..a8b2d06f7dd 100644 --- a/src/components/Medicine/MedicineAdministrationSheet/AdministrationEventCell.tsx +++ b/src/components/Medicine/MedicineAdministrationSheet/AdministrationEventCell.tsx @@ -1,11 +1,17 @@ -import dayjs from "../../../Utils/dayjs"; -import { MedicineAdministrationRecord, Prescription } from "../models"; -import CareIcon from "../../../CAREUI/icons/CareIcon"; -import { classNames, formatDateTime } from "../../../Utils/utils"; -import DialogModal from "@/components/Common/Dialog"; -import PrescrpitionActivityTimeline from "../PrescrpitionTimeline"; import { useState } from "react"; -import PrescriptionDetailCard from "../PrescriptionDetailCard"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import DialogModal from "@/components/Common/Dialog"; +import PrescriptionDetailCard from "@/components/Medicine/PrescriptionDetailCard"; +import PrescrpitionActivityTimeline from "@/components/Medicine/PrescrpitionTimeline"; +import { + MedicineAdministrationRecord, + Prescription, +} from "@/components/Medicine/models"; + +import dayjs from "@/Utils/dayjs"; +import { classNames, formatDateTime } from "@/Utils/utils"; interface Props { administrations: MedicineAdministrationRecord[]; diff --git a/src/components/Medicine/MedicineAdministrationSheet/AdministrationEventSeperator.tsx b/src/components/Medicine/MedicineAdministrationSheet/AdministrationEventSeperator.tsx index b52f1ed85f5..52823d799da 100644 --- a/src/components/Medicine/MedicineAdministrationSheet/AdministrationEventSeperator.tsx +++ b/src/components/Medicine/MedicineAdministrationSheet/AdministrationEventSeperator.tsx @@ -1,4 +1,4 @@ -import { formatDateTime } from "../../../Utils/utils"; +import { formatDateTime } from "@/Utils/utils"; export default function AdministrationEventSeperator({ date }: { date: Date }) { // Show date if it's 00:00 diff --git a/src/components/Medicine/MedicineAdministrationSheet/AdministrationTable.tsx b/src/components/Medicine/MedicineAdministrationSheet/AdministrationTable.tsx index f7442c3a51b..86db7353832 100644 --- a/src/components/Medicine/MedicineAdministrationSheet/AdministrationTable.tsx +++ b/src/components/Medicine/MedicineAdministrationSheet/AdministrationTable.tsx @@ -1,10 +1,14 @@ import { useTranslation } from "react-i18next"; -import CareIcon from "../../../CAREUI/icons/CareIcon"; -import useRangePagination from "@/common/hooks/useRangePagination"; -import { classNames, formatDateTime } from "../../../Utils/utils"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import { Prescription } from "../models"; -import MedicineAdministrationTableRow from "./AdministrationTableRow"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import ButtonV2 from "@/components/Common/ButtonV2"; +import MedicineAdministrationTableRow from "@/components/Medicine/MedicineAdministrationSheet/AdministrationTableRow"; +import { Prescription } from "@/components/Medicine/models"; + +import useRangePagination from "@/hooks/useRangePagination"; + +import { classNames, formatDateTime } from "@/Utils/utils"; interface Props { prescriptions: Prescription[]; diff --git a/src/components/Medicine/MedicineAdministrationSheet/AdministrationTableRow.tsx b/src/components/Medicine/MedicineAdministrationSheet/AdministrationTableRow.tsx index 5c2bc100c9a..d08506d7fbe 100644 --- a/src/components/Medicine/MedicineAdministrationSheet/AdministrationTableRow.tsx +++ b/src/components/Medicine/MedicineAdministrationSheet/AdministrationTableRow.tsx @@ -1,23 +1,24 @@ -import { useTranslation } from "react-i18next"; -import { Prescription } from "../models"; import { useState } from "react"; -import useQuery from "../../../Utils/request/useQuery"; -import MedicineRoutes from "../routes"; -import { classNames, formatDateTime } from "../../../Utils/utils"; -import useSlug from "@/common/hooks/useSlug"; -import DiscontinuePrescription from "../DiscontinuePrescription"; -import AdministerMedicine from "../AdministerMedicine"; +import { useTranslation } from "react-i18next"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import { AuthorizedForConsultationRelatedActions } from "@/CAREUI/misc/AuthorizedChild"; + +import ButtonV2, { Cancel, Submit } from "@/components/Common/ButtonV2"; import DialogModal from "@/components/Common/Dialog"; -import PrescriptionDetailCard from "../PrescriptionDetailCard"; -import ButtonV2, { - Cancel, - Submit, -} from "@/components/Common/components/ButtonV2"; -import CareIcon from "../../../CAREUI/icons/CareIcon"; -import EditPrescriptionForm from "../EditPrescriptionForm"; -import AdministrationEventSeperator from "./AdministrationEventSeperator"; -import AdministrationEventCell from "./AdministrationEventCell"; -import { AuthorizedForConsultationRelatedActions } from "../../../CAREUI/misc/AuthorizedChild"; +import AdministerMedicine from "@/components/Medicine/AdministerMedicine"; +import DiscontinuePrescription from "@/components/Medicine/DiscontinuePrescription"; +import EditPrescriptionForm from "@/components/Medicine/EditPrescriptionForm"; +import AdministrationEventCell from "@/components/Medicine/MedicineAdministrationSheet/AdministrationEventCell"; +import AdministrationEventSeperator from "@/components/Medicine/MedicineAdministrationSheet/AdministrationEventSeperator"; +import PrescriptionDetailCard from "@/components/Medicine/PrescriptionDetailCard"; +import { Prescription } from "@/components/Medicine/models"; +import MedicineRoutes from "@/components/Medicine/routes"; + +import useSlug from "@/hooks/useSlug"; + +import useQuery from "@/Utils/request/useQuery"; +import { classNames, formatDateTime } from "@/Utils/utils"; interface Props { prescription: Prescription; diff --git a/src/components/Medicine/MedicineAdministrationSheet/BulkAdminister.tsx b/src/components/Medicine/MedicineAdministrationSheet/BulkAdminister.tsx index d3844125e83..b139cd666f1 100644 --- a/src/components/Medicine/MedicineAdministrationSheet/BulkAdminister.tsx +++ b/src/components/Medicine/MedicineAdministrationSheet/BulkAdminister.tsx @@ -1,10 +1,12 @@ -import { useTranslation } from "react-i18next"; -import { Prescription } from "../models"; import { useState } from "react"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import CareIcon from "../../../CAREUI/icons/CareIcon"; -import SlideOver from "../../../CAREUI/interactive/SlideOver"; -import MedicineAdministration from "../MedicineAdministration"; +import { useTranslation } from "react-i18next"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import SlideOver from "@/CAREUI/interactive/SlideOver"; + +import ButtonV2 from "@/components/Common/ButtonV2"; +import MedicineAdministration from "@/components/Medicine/MedicineAdministration"; +import { Prescription } from "@/components/Medicine/models"; interface Props { prescriptions: Prescription[]; diff --git a/src/components/Medicine/MedicineAdministrationSheet/index.tsx b/src/components/Medicine/MedicineAdministrationSheet/index.tsx index 9a7325163bc..b9c8e695457 100644 --- a/src/components/Medicine/MedicineAdministrationSheet/index.tsx +++ b/src/components/Medicine/MedicineAdministrationSheet/index.tsx @@ -1,19 +1,23 @@ -import { useTranslation } from "react-i18next"; -import useSlug from "@/common/hooks/useSlug"; -import useQuery from "../../../Utils/request/useQuery"; -import MedicineRoutes from "../routes"; import { useMemo, useState } from "react"; -import { computeActivityBounds } from "./utils"; -import useBreakpoints from "@/common/hooks/useBreakpoints"; -import SubHeading from "../../../CAREUI/display/SubHeading"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import CareIcon from "../../../CAREUI/icons/CareIcon"; -import BulkAdminister from "./BulkAdminister"; -import useRangePagination from "@/common/hooks/useRangePagination"; -import MedicineAdministrationTable from "./AdministrationTable"; +import { useTranslation } from "react-i18next"; + +import SubHeading from "@/CAREUI/display/SubHeading"; +import CareIcon from "@/CAREUI/icons/CareIcon"; +import ScrollOverlay from "@/CAREUI/interactive/ScrollOverlay"; +import { AuthorizedForConsultationRelatedActions } from "@/CAREUI/misc/AuthorizedChild"; + +import ButtonV2 from "@/components/Common/ButtonV2"; import Loading from "@/components/Common/Loading"; -import ScrollOverlay from "../../../CAREUI/interactive/ScrollOverlay"; -import { AuthorizedForConsultationRelatedActions } from "../../../CAREUI/misc/AuthorizedChild"; +import MedicineAdministrationTable from "@/components/Medicine/MedicineAdministrationSheet/AdministrationTable"; +import BulkAdminister from "@/components/Medicine/MedicineAdministrationSheet/BulkAdminister"; +import { computeActivityBounds } from "@/components/Medicine/MedicineAdministrationSheet/utils"; +import MedicineRoutes from "@/components/Medicine/routes"; + +import useBreakpoints from "@/hooks/useBreakpoints"; +import useRangePagination from "@/hooks/useRangePagination"; +import useSlug from "@/hooks/useSlug"; + +import useQuery from "@/Utils/request/useQuery"; interface Props { readonly?: boolean; diff --git a/src/components/Medicine/MedicineAdministrationSheet/utils.ts b/src/components/Medicine/MedicineAdministrationSheet/utils.ts index 6c712c0aa97..1b76ddf54e3 100644 --- a/src/components/Medicine/MedicineAdministrationSheet/utils.ts +++ b/src/components/Medicine/MedicineAdministrationSheet/utils.ts @@ -1,4 +1,4 @@ -import { Prescription } from "../models"; +import { Prescription } from "@/components/Medicine/models"; export function computeActivityBounds(prescriptions: Prescription[]) { // get start by finding earliest of all presciption's created_date diff --git a/src/components/Medicine/MedicinePrescriptionSummary.tsx b/src/components/Medicine/MedicinePrescriptionSummary.tsx index eb1c0b9ad03..13481a4f1ff 100644 --- a/src/components/Medicine/MedicinePrescriptionSummary.tsx +++ b/src/components/Medicine/MedicinePrescriptionSummary.tsx @@ -1,13 +1,16 @@ -import MedicineRoutes from "./routes"; -import useQuery from "../../Utils/request/useQuery"; -import DialogModal from "@/components/Common/Dialog"; import { useState } from "react"; -import Timeline, { TimelineNode } from "../../CAREUI/display/Timeline"; -import { MedibaseMedicine, Prescription } from "./models"; import { useTranslation } from "react-i18next"; -import { humanizeStrings } from "../../Utils/utils"; +import Timeline, { TimelineNode } from "@/CAREUI/display/Timeline"; + +import DialogModal from "@/components/Common/Dialog"; import Loading from "@/components/Common/Loading"; +import { MedibaseMedicine, Prescription } from "@/components/Medicine/models"; +import MedicineRoutes from "@/components/Medicine/routes"; + +import useQuery from "@/Utils/request/useQuery"; +import { humanizeStrings } from "@/Utils/utils"; + interface MedicinePrescriptionSummaryProps { consultation: string; } diff --git a/src/components/Medicine/PrescriptionBuilder.tsx b/src/components/Medicine/PrescriptionBuilder.tsx index 8cb0d7ecda6..9de905d3071 100644 --- a/src/components/Medicine/PrescriptionBuilder.tsx +++ b/src/components/Medicine/PrescriptionBuilder.tsx @@ -1,18 +1,26 @@ import { useState } from "react"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import { NormalPrescription, Prescription, PRNPrescription } from "./models"; -import DialogModal from "@/components/Common/Dialog"; -import CreatePrescriptionForm from "./CreatePrescriptionForm"; -import PrescriptionDetailCard from "./PrescriptionDetailCard"; -import DiscontinuePrescription from "./DiscontinuePrescription"; -import AdministerMedicine from "./AdministerMedicine"; import { useTranslation } from "react-i18next"; -import useQuery from "../../Utils/request/useQuery"; -import MedicineRoutes from "./routes"; -import useSlug from "@/common/hooks/useSlug"; -import { AuthorizedForConsultationRelatedActions } from "../../CAREUI/misc/AuthorizedChild"; -import { compareBy } from "../../Utils/utils"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import { AuthorizedForConsultationRelatedActions } from "@/CAREUI/misc/AuthorizedChild"; + +import ButtonV2 from "@/components/Common/ButtonV2"; +import DialogModal from "@/components/Common/Dialog"; +import AdministerMedicine from "@/components/Medicine/AdministerMedicine"; +import CreatePrescriptionForm from "@/components/Medicine/CreatePrescriptionForm"; +import DiscontinuePrescription from "@/components/Medicine/DiscontinuePrescription"; +import PrescriptionDetailCard from "@/components/Medicine/PrescriptionDetailCard"; +import { + NormalPrescription, + PRNPrescription, + Prescription, +} from "@/components/Medicine/models"; +import MedicineRoutes from "@/components/Medicine/routes"; + +import useSlug from "@/hooks/useSlug"; + +import useQuery from "@/Utils/request/useQuery"; +import { compareBy } from "@/Utils/utils"; interface Props { prescription_type?: Prescription["prescription_type"]; diff --git a/src/components/Medicine/PrescriptionDetailCard.tsx b/src/components/Medicine/PrescriptionDetailCard.tsx index 98430c23c1a..0164ac72c68 100644 --- a/src/components/Medicine/PrescriptionDetailCard.tsx +++ b/src/components/Medicine/PrescriptionDetailCard.tsx @@ -1,12 +1,15 @@ -import { Prescription } from "./models"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import { classNames } from "../../Utils/utils"; -import ReadMore from "@/components/Common/components/Readmore"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import { useTranslation } from "react-i18next"; -import RecordMeta from "../../CAREUI/display/RecordMeta"; import { useState } from "react"; -import { AuthorizedForConsultationRelatedActions } from "../../CAREUI/misc/AuthorizedChild"; +import { useTranslation } from "react-i18next"; + +import RecordMeta from "@/CAREUI/display/RecordMeta"; +import CareIcon from "@/CAREUI/icons/CareIcon"; +import { AuthorizedForConsultationRelatedActions } from "@/CAREUI/misc/AuthorizedChild"; + +import ButtonV2 from "@/components/Common/ButtonV2"; +import ReadMore from "@/components/Common/Readmore"; +import { Prescription } from "@/components/Medicine/models"; + +import { classNames } from "@/Utils/utils"; interface Props { prescription: Prescription; diff --git a/src/components/Medicine/PrescriptionsTable.tsx b/src/components/Medicine/PrescriptionsTable.tsx index 0121acf7159..72393199e32 100644 --- a/src/components/Medicine/PrescriptionsTable.tsx +++ b/src/components/Medicine/PrescriptionsTable.tsx @@ -1,16 +1,20 @@ import { useState } from "react"; -import ResponsiveMedicineTable from "./ResponsiveMedicineTables"; -import { formatDateTime } from "../../Utils/utils"; -import { Prescription } from "./models"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import { Cancel } from "@/components/Common/components/ButtonV2"; -import RecordMeta from "../../CAREUI/display/RecordMeta"; -import DialogModal from "@/components/Common/Dialog"; -import PrescriptionDetailCard from "./PrescriptionDetailCard"; import { useTranslation } from "react-i18next"; -import useSlug from "@/common/hooks/useSlug"; -import useQuery from "../../Utils/request/useQuery"; -import MedicineRoutes from "./routes"; + +import RecordMeta from "@/CAREUI/display/RecordMeta"; +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import { Cancel } from "@/components/Common/ButtonV2"; +import DialogModal from "@/components/Common/Dialog"; +import PrescriptionDetailCard from "@/components/Medicine/PrescriptionDetailCard"; +import ResponsiveMedicineTable from "@/components/Medicine/ResponsiveMedicineTables"; +import { Prescription } from "@/components/Medicine/models"; +import MedicineRoutes from "@/components/Medicine/routes"; + +import useSlug from "@/hooks/useSlug"; + +import useQuery from "@/Utils/request/useQuery"; +import { formatDateTime } from "@/Utils/utils"; interface Props { is_prn?: boolean; diff --git a/src/components/Medicine/PrescrpitionTimeline.tsx b/src/components/Medicine/PrescrpitionTimeline.tsx index 08d81457d6c..29b72775eb9 100644 --- a/src/components/Medicine/PrescrpitionTimeline.tsx +++ b/src/components/Medicine/PrescrpitionTimeline.tsx @@ -1,21 +1,28 @@ -import dayjs from "../../Utils/dayjs"; -import useSlug from "@/common/hooks/useSlug"; -import useQuery from "../../Utils/request/useQuery"; -import { classNames, formatDateTime, formatTime } from "../../Utils/utils"; -import { MedicineAdministrationRecord, Prescription } from "./models"; -import MedicineRoutes from "./routes"; +import { useState } from "react"; + +import RecordMeta from "@/CAREUI/display/RecordMeta"; import Timeline, { TimelineEvent, TimelineNode, TimelineNodeNotes, -} from "../../CAREUI/display/Timeline"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import { useState } from "react"; +} from "@/CAREUI/display/Timeline"; +import CareIcon from "@/CAREUI/icons/CareIcon"; +import { AuthorizedForConsultationRelatedActions } from "@/CAREUI/misc/AuthorizedChild"; + +import ButtonV2 from "@/components/Common/ButtonV2"; import ConfirmDialog from "@/components/Common/ConfirmDialog"; -import request from "../../Utils/request/request"; -import RecordMeta from "../../CAREUI/display/RecordMeta"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import { AuthorizedForConsultationRelatedActions } from "../../CAREUI/misc/AuthorizedChild"; +import { + MedicineAdministrationRecord, + Prescription, +} from "@/components/Medicine/models"; +import MedicineRoutes from "@/components/Medicine/routes"; + +import useSlug from "@/hooks/useSlug"; + +import dayjs from "@/Utils/dayjs"; +import request from "@/Utils/request/request"; +import useQuery from "@/Utils/request/useQuery"; +import { classNames, formatDateTime, formatTime } from "@/Utils/utils"; interface MedicineAdministeredEvent extends TimelineEvent<"administered"> { administration: MedicineAdministrationRecord; diff --git a/src/components/Medicine/PrintPreview.tsx b/src/components/Medicine/PrintPreview.tsx index fdc586b2ccc..a5af06e7735 100644 --- a/src/components/Medicine/PrintPreview.tsx +++ b/src/components/Medicine/PrintPreview.tsx @@ -1,19 +1,23 @@ +import careConfig from "@careConfig"; +import { ReactNode } from "react"; import { useTranslation } from "react-i18next"; -import PrintPreview from "../../CAREUI/misc/PrintPreview"; -import { useSlugs } from "@/common/hooks/useSlug"; -import routes from "../../Redux/api"; -import useQuery from "../../Utils/request/useQuery"; + +import PrintPreview from "@/CAREUI/misc/PrintPreview"; + +import { Prescription } from "@/components/Medicine/models"; +import MedicineRoutes from "@/components/Medicine/routes"; + +import { useSlugs } from "@/hooks/useSlug"; + +import routes from "@/Utils/request/api"; +import useQuery from "@/Utils/request/useQuery"; import { classNames, formatDate, formatDateTime, formatName, patientAgeInYears, -} from "../../Utils/utils"; -import MedicineRoutes from "./routes"; -import { Prescription } from "./models"; -import { ReactNode } from "react"; -import careConfig from "@careConfig"; +} from "@/Utils/utils"; export default function PrescriptionsPrintPreview() { const { t } = useTranslation(); diff --git a/src/components/Medicine/ResponsiveMedicineTables.tsx b/src/components/Medicine/ResponsiveMedicineTables.tsx index 5337f1cd20f..45fa18e57d6 100644 --- a/src/components/Medicine/ResponsiveMedicineTables.tsx +++ b/src/components/Medicine/ResponsiveMedicineTables.tsx @@ -1,6 +1,8 @@ import { useEffect, useState } from "react"; -import AccordionV2 from "@/components/Common/components/AccordionV2"; -import { classNames } from "../../Utils/utils"; + +import AccordionV2 from "@/components/Common/AccordionV2"; + +import { classNames } from "@/Utils/utils"; function getWindowSize() { const { innerWidth, innerHeight } = window; diff --git a/src/components/Medicine/models.ts b/src/components/Medicine/models.ts index 68e34d09798..bd98853e68b 100644 --- a/src/components/Medicine/models.ts +++ b/src/components/Medicine/models.ts @@ -1,4 +1,4 @@ -import { PRESCRIPTION_ROUTES } from "./CreatePrescriptionForm"; +import { PRESCRIPTION_ROUTES } from "@/components/Medicine/CreatePrescriptionForm"; import { UserBareMinimum } from "@/components/Users/models"; export const DOSAGE_UNITS = [ diff --git a/src/components/Medicine/routes.ts b/src/components/Medicine/routes.ts index c0c4a602227..b414680d83b 100644 --- a/src/components/Medicine/routes.ts +++ b/src/components/Medicine/routes.ts @@ -1,6 +1,10 @@ -import { Type } from "../../Redux/api"; -import { PaginatedResponse } from "../../Utils/request/types"; -import { MedicineAdministrationRecord, Prescription } from "./models"; +import { + MedicineAdministrationRecord, + Prescription, +} from "@/components/Medicine/models"; + +import { Type } from "@/Utils/request/api"; +import { PaginatedResponse } from "@/Utils/request/types"; const MedicineRoutes = { listPrescriptions: { diff --git a/src/components/Medicine/validators.ts b/src/components/Medicine/validators.ts index c1cbe560ae9..95696da95a1 100644 --- a/src/components/Medicine/validators.ts +++ b/src/components/Medicine/validators.ts @@ -1,7 +1,11 @@ import { t } from "i18next"; -import { FieldError, RequiredFieldValidator } from "../Form/FieldValidators"; -import { FormErrors } from "../Form/Utils"; -import { Prescription } from "./models"; + +import { + FieldError, + RequiredFieldValidator, +} from "@/components/Form/FieldValidators"; +import { FormErrors } from "@/components/Form/Utils"; +import { Prescription } from "@/components/Medicine/models"; export const PrescriptionFormValidator = () => { return (form: Prescription): FormErrors => { diff --git a/src/components/Notifications/NoticeBoard.tsx b/src/components/Notifications/NoticeBoard.tsx index 1981a989588..e4472107c8f 100644 --- a/src/components/Notifications/NoticeBoard.tsx +++ b/src/components/Notifications/NoticeBoard.tsx @@ -1,10 +1,13 @@ -import Page from "@/components/Common/components/Page"; -import Loading from "@/components/Common/Loading"; -import { formatDateTime, formatName } from "../../Utils/utils"; import { useTranslation } from "react-i18next"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import useQuery from "../../Utils/request/useQuery"; -import routes from "../../Redux/api"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import Loading from "@/components/Common/Loading"; +import Page from "@/components/Common/Page"; + +import routes from "@/Utils/request/api"; +import useQuery from "@/Utils/request/useQuery"; +import { formatDateTime, formatName } from "@/Utils/utils"; export const NoticeBoard = () => { const { t } = useTranslation(); diff --git a/src/components/Notifications/NotificationsList.tsx b/src/components/Notifications/NotificationsList.tsx index f15d5e8cb2a..5d88cc8d603 100644 --- a/src/components/Notifications/NotificationsList.tsx +++ b/src/components/Notifications/NotificationsList.tsx @@ -1,23 +1,28 @@ +import * as Sentry from "@sentry/browser"; import { navigate } from "raviger"; import { useEffect, useRef, useState } from "react"; -import Spinner from "@/components/Common/Spinner"; -import { NOTIFICATION_EVENTS } from "@/common/constants"; -import { Error, Success, Warn } from "../../Utils/Notifications"; -import { classNames, formatDateTime } from "../../Utils/utils"; -import CareIcon, { IconName } from "../../CAREUI/icons/CareIcon"; -import * as Sentry from "@sentry/browser"; +import { useTranslation } from "react-i18next"; + +import CareIcon, { IconName } from "@/CAREUI/icons/CareIcon"; +import SlideOver from "@/CAREUI/interactive/SlideOver"; + +import ButtonV2 from "@/components/Common/ButtonV2"; +import CircularProgress from "@/components/Common/CircularProgress"; import { ShrinkedSidebarItem, SidebarItem, } from "@/components/Common/Sidebar/SidebarItem"; -import SlideOver from "../../CAREUI/interactive/SlideOver"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import SelectMenuV2 from "../Form/SelectMenuV2"; -import { useTranslation } from "react-i18next"; -import CircularProgress from "@/components/Common/components/CircularProgress"; -import useAuthUser from "@/common/hooks/useAuthUser"; -import request from "../../Utils/request/request"; -import routes from "../../Redux/api"; +import Spinner from "@/components/Common/Spinner"; +import SelectMenuV2 from "@/components/Form/SelectMenuV2"; + +import useAuthUser from "@/hooks/useAuthUser"; + +import { NOTIFICATION_EVENTS } from "@/common/constants"; + +import { Error, Success, Warn } from "@/Utils/Notifications"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import { classNames, formatDateTime } from "@/Utils/utils"; const RESULT_LIMIT = 14; diff --git a/src/components/Notifications/ShowPushNotification.tsx b/src/components/Notifications/ShowPushNotification.tsx index ca465f98df7..490c44ea649 100644 --- a/src/components/Notifications/ShowPushNotification.tsx +++ b/src/components/Notifications/ShowPushNotification.tsx @@ -1,6 +1,7 @@ -import useQuery from "../../Utils/request/useQuery"; -import routes from "../../Redux/api"; -import { NotificationData } from "./models"; +import { NotificationData } from "@/components/Notifications/models"; + +import routes from "@/Utils/request/api"; +import useQuery from "@/Utils/request/useQuery"; export default function ShowPushNotification({ id }: { id: string }) { useQuery(routes.getNotificationData, { diff --git a/src/components/Patient/DailyRoundListDetails.tsx b/src/components/Patient/DailyRoundListDetails.tsx index 727658d7146..b7bc8964f65 100644 --- a/src/components/Patient/DailyRoundListDetails.tsx +++ b/src/components/Patient/DailyRoundListDetails.tsx @@ -1,12 +1,15 @@ import { useState } from "react"; -import { DailyRoundsModel } from "./models"; -import Page from "@/components/Common/components/Page"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import { formatDateTime } from "../../Utils/utils"; -import useQuery from "../../Utils/request/useQuery"; -import routes from "../../Redux/api"; import { useTranslation } from "react-i18next"; + +import ButtonV2 from "@/components/Common/ButtonV2"; import Loading from "@/components/Common/Loading"; +import Page from "@/components/Common/Page"; +import { DailyRoundsModel } from "@/components/Patient/models"; + +import routes from "@/Utils/request/api"; +import useQuery from "@/Utils/request/useQuery"; +import { formatDateTime } from "@/Utils/utils"; + export const DailyRoundListDetails = (props: any) => { const { t } = useTranslation(); const { facilityId, patientId, consultationId, id } = props; diff --git a/src/components/Patient/DailyRounds.tsx b/src/components/Patient/DailyRounds.tsx index f6ac117c2ec..1c8209e7d95 100644 --- a/src/components/Patient/DailyRounds.tsx +++ b/src/components/Patient/DailyRounds.tsx @@ -1,6 +1,44 @@ -import { navigate } from "raviger"; +import { error } from "@pnotify/core"; import dayjs from "dayjs"; +import { navigate } from "raviger"; import { useCallback, useEffect, useState } from "react"; +import { useTranslation } from "react-i18next"; + +import BloodPressureFormField, { + BloodPressureValidator, +} from "@/components/Common/BloodPressureFormField"; +import { Cancel, Submit } from "@/components/Common/ButtonV2"; +import Loading from "@/components/Common/Loading"; +import Page from "@/components/Common/Page"; +import TemperatureFormField from "@/components/Common/TemperatureFormField"; +import InvestigationBuilder from "@/components/Common/prescription-builder/InvestigationBuilder"; +import { EditDiagnosesBuilder } from "@/components/Diagnosis/ConsultationDiagnosisBuilder/ConsultationDiagnosisBuilder"; +import { + ConditionVerificationStatuses, + ConsultationDiagnosis, +} from "@/components/Diagnosis/types"; +import { ICD11DiagnosisModel } from "@/components/Facility/models"; +import CheckBoxFormField from "@/components/Form/FormFields/CheckBoxFormField"; +import DateFormField from "@/components/Form/FormFields/DateFormField"; +import { FieldErrorText } from "@/components/Form/FormFields/FormField"; +import { FieldLabel } from "@/components/Form/FormFields/FormField"; +import RadioFormField from "@/components/Form/FormFields/RadioFormField"; +import RangeAutocompleteFormField from "@/components/Form/FormFields/RangeAutocompleteFormField"; +import { SelectFormField } from "@/components/Form/FormFields/SelectFormField"; +import TextAreaFormField from "@/components/Form/FormFields/TextAreaFormField"; +import { FieldChangeEvent } from "@/components/Form/FormFields/Utils"; +import NursingCare from "@/components/LogUpdate/Sections/NursingCare"; +import PrescriptionBuilder from "@/components/Medicine/PrescriptionBuilder"; +import PatientCategorySelect from "@/components/Patient/PatientCategorySelect"; +import { DailyRoundTypes, DailyRoundsModel } from "@/components/Patient/models"; +import { Scribe } from "@/components/Scribe/Scribe"; +import { SCRIBE_FORMS } from "@/components/Scribe/formDetails"; +import { EncounterSymptomsBuilder } from "@/components/Symptoms/SymptomsBuilder"; +import SymptomsApi from "@/components/Symptoms/api"; + +import useAppHistory from "@/hooks/useAppHistory"; +import useAuthUser from "@/hooks/useAuthUser"; + import { APPETITE_CHOICES, BLADDER_DRAINAGE_CHOICES, @@ -16,48 +54,14 @@ import { TELEMEDICINE_ACTIONS, URINATION_FREQUENCY_CHOICES, } from "@/common/constants"; -import useAppHistory from "@/common/hooks/useAppHistory"; -import { DraftSection, useAutoSaveReducer } from "../../Utils/AutoSave"; -import * as Notification from "../../Utils/Notifications"; -import { formatDateTime } from "../../Utils/utils"; -import BloodPressureFormField, { - BloodPressureValidator, -} from "@/components/Common/BloodPressureFormField"; -import TemperatureFormField from "@/components/Common/TemperatureFormField"; -import { Cancel, Submit } from "@/components/Common/components/ButtonV2"; -import Page from "@/components/Common/components/Page"; -import RangeAutocompleteFormField from "../Form/FormFields/RangeAutocompleteFormField"; -import { SelectFormField } from "../Form/FormFields/SelectFormField"; -import TextAreaFormField from "../Form/FormFields/TextAreaFormField"; -import { FieldChangeEvent } from "../Form/FormFields/Utils"; -import PatientCategorySelect from "./PatientCategorySelect"; -import RadioFormField from "../Form/FormFields/RadioFormField"; -import request from "../../Utils/request/request"; -import routes from "../../Redux/api"; -import { Scribe } from "../Scribe/Scribe"; -import { SCRIBE_FORMS } from "../Scribe/formDetails"; -import { DailyRoundsModel, DailyRoundTypes } from "./models"; -import InvestigationBuilder from "@/components/Common/prescription-builder/InvestigationBuilder"; -import { FieldErrorText } from "../Form/FormFields/FormField"; -import { error } from "@pnotify/core"; -import { useTranslation } from "react-i18next"; -import PrescriptionBuilder from "../Medicine/PrescriptionBuilder"; -import { EditDiagnosesBuilder } from "../Diagnosis/ConsultationDiagnosisBuilder/ConsultationDiagnosisBuilder"; -import { - ConditionVerificationStatuses, - ConsultationDiagnosis, -} from "../Diagnosis/types"; -import { EncounterSymptomsBuilder } from "../Symptoms/SymptomsBuilder"; -import { FieldLabel } from "../Form/FormFields/FormField"; -import useAuthUser from "@/common/hooks/useAuthUser"; -import CheckBoxFormField from "../Form/FormFields/CheckBoxFormField"; -import SymptomsApi from "../Symptoms/api"; -import { scrollTo } from "../../Utils/utils"; -import { ICD11DiagnosisModel } from "../Facility/models"; -import DateFormField from "../Form/FormFields/DateFormField"; -import NursingCare from "../LogUpdate/Sections/NursingCare"; -import Loading from "@/components/Common/Loading"; +import { DraftSection, useAutoSaveReducer } from "@/Utils/AutoSave"; +import * as Notification from "@/Utils/Notifications"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import { formatDateTime } from "@/Utils/utils"; +import { scrollTo } from "@/Utils/utils"; + export const DailyRounds = (props: any) => { const { t } = useTranslation(); const authUser = useAuthUser(); diff --git a/src/components/Patient/DiagnosesFilter.tsx b/src/components/Patient/DiagnosesFilter.tsx index ba58a549dac..c8fc2bc1a44 100644 --- a/src/components/Patient/DiagnosesFilter.tsx +++ b/src/components/Patient/DiagnosesFilter.tsx @@ -1,13 +1,15 @@ +import { debounce } from "lodash-es"; import { useEffect, useState } from "react"; -import { ICD11DiagnosisModel } from "../Diagnosis/types"; -import { getDiagnosesByIds } from "../Diagnosis/utils"; import { useTranslation } from "react-i18next"; -import AutocompleteMultiSelectFormField from "../Form/FormFields/AutocompleteMultiselect"; -import useQuery from "../../Utils/request/useQuery"; -import routes from "../../Redux/api"; -import { mergeQueryOptions } from "../../Utils/utils"; -import { debounce } from "lodash-es"; -import { Error } from "../../Utils/Notifications"; + +import { ICD11DiagnosisModel } from "@/components/Diagnosis/types"; +import { getDiagnosesByIds } from "@/components/Diagnosis/utils"; +import AutocompleteMultiSelectFormField from "@/components/Form/FormFields/AutocompleteMultiselect"; + +import { Error } from "@/Utils/Notifications"; +import routes from "@/Utils/request/api"; +import useQuery from "@/Utils/request/useQuery"; +import { mergeQueryOptions } from "@/Utils/utils"; export const FILTER_BY_DIAGNOSES_KEYS = [ "diagnoses", diff --git a/src/components/Patient/FileUploadPage.tsx b/src/components/Patient/FileUploadPage.tsx index 2fae97dc159..518644f54d7 100644 --- a/src/components/Patient/FileUploadPage.tsx +++ b/src/components/Patient/FileUploadPage.tsx @@ -1,7 +1,8 @@ -import routes from "../../Redux/api"; -import useQuery from "../../Utils/request/useQuery"; -import Page from "@/components/Common/components/Page"; -import { FileUpload } from "../Files/FileUpload"; +import Page from "@/components/Common/Page"; +import { FileUpload } from "@/components/Files/FileUpload"; + +import routes from "@/Utils/request/api"; +import useQuery from "@/Utils/request/useQuery"; export default function FileUploadPage(props: { facilityId: string; diff --git a/src/components/Patient/InsuranceDetails.tsx b/src/components/Patient/InsuranceDetails.tsx index d90c5dbcd27..248c7304bfa 100644 --- a/src/components/Patient/InsuranceDetails.tsx +++ b/src/components/Patient/InsuranceDetails.tsx @@ -1,9 +1,10 @@ -import { HCXPolicyModel } from "../HCX/models"; -import { InsuranceDetialsCard } from "./InsuranceDetailsCard"; import Loading from "@/components/Common/Loading"; -import Page from "@/components/Common/components/Page"; -import routes from "../../Redux/api"; -import useQuery from "../../Utils/request/useQuery"; +import Page from "@/components/Common/Page"; +import { HCXPolicyModel } from "@/components/HCX/models"; +import { InsuranceDetialsCard } from "@/components/Patient/InsuranceDetailsCard"; + +import routes from "@/Utils/request/api"; +import useQuery from "@/Utils/request/useQuery"; interface IProps { facilityId: string; diff --git a/src/components/Patient/InsuranceDetailsCard.tsx b/src/components/Patient/InsuranceDetailsCard.tsx index 132647cc67f..62098fc6a07 100644 --- a/src/components/Patient/InsuranceDetailsCard.tsx +++ b/src/components/Patient/InsuranceDetailsCard.tsx @@ -1,7 +1,8 @@ -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import { HCXPolicyModel } from "../HCX/models"; import { navigate } from "raviger"; +import ButtonV2 from "@/components/Common/ButtonV2"; +import { HCXPolicyModel } from "@/components/HCX/models"; + interface InsuranceDetails { data?: HCXPolicyModel; showViewAllDetails?: boolean; diff --git a/src/components/Patient/ManagePatients.tsx b/src/components/Patient/ManagePatients.tsx index 2c1119be7e8..d42f0072794 100644 --- a/src/components/Patient/ManagePatients.tsx +++ b/src/components/Patient/ManagePatients.tsx @@ -1,4 +1,41 @@ -import * as Notification from "../../Utils/Notifications"; +import dayjs from "dayjs"; +import { Link, navigate } from "raviger"; +import { ReactNode, useEffect, useState } from "react"; +import { useTranslation } from "react-i18next"; + +import Chip from "@/CAREUI/display/Chip"; +import CountBlock from "@/CAREUI/display/Count"; +import FilterBadge from "@/CAREUI/display/FilterBadge"; +import RecordMeta from "@/CAREUI/display/RecordMeta"; +import CareIcon from "@/CAREUI/icons/CareIcon"; +import { AdvancedFilterButton } from "@/CAREUI/interactive/FiltersSlideover"; + +import { Avatar } from "@/components/Common/Avatar"; +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 SortDropdownMenu from "@/components/Common/SortDropdown"; +import Tabs from "@/components/Common/Tabs"; +import { ICD11DiagnosisModel } from "@/components/Diagnosis/types"; +import { getDiagnosesByIds } from "@/components/Diagnosis/utils"; +import FacilitiesSelectDialogue from "@/components/ExternalResult/FacilitiesSelectDialogue"; +import DoctorVideoSlideover from "@/components/Facility/DoctorVideoSlideover"; +import { FacilityModel, PatientCategory } from "@/components/Facility/models"; +import { PhoneNumberValidator } from "@/components/Form/FieldValidators"; +import PhoneNumberFormField from "@/components/Form/FormFields/PhoneNumberFormField"; +import { FieldChangeEvent } from "@/components/Form/FormFields/Utils"; +import SearchInput from "@/components/Form/SearchInput"; +import { + DIAGNOSES_FILTER_LABELS, + DiagnosesFilterKey, + FILTER_BY_DIAGNOSES_KEYS, +} from "@/components/Patient/DiagnosesFilter"; +import PatientFilter from "@/components/Patient/PatientFilter"; +import { isPatientMandatoryDataFilled } from "@/components/Patient/Utils"; + +import useAuthUser from "@/hooks/useAuthUser"; +import useFilters from "@/hooks/useFilters"; import { ADMITTED_TO, @@ -10,54 +47,20 @@ import { RESPIRATORY_SUPPORT, TELEMEDICINE_ACTIONS, } from "@/common/constants"; -import { FacilityModel, PatientCategory } from "../Facility/models"; -import { Link, navigate } from "raviger"; -import { ReactNode, useEffect, useState } from "react"; import { parseOptionId } from "@/common/utils"; -import { AdvancedFilterButton } from "../../CAREUI/interactive/FiltersSlideover"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import Chip from "../../CAREUI/display/Chip"; -import CountBlock from "../../CAREUI/display/Count"; -import DoctorVideoSlideover from "../Facility/DoctorVideoSlideover"; -import { ExportMenu } from "@/components/Common/Export"; -import FacilitiesSelectDialogue from "../ExternalResult/FacilitiesSelectDialogue"; -import { FieldChangeEvent } from "../Form/FormFields/Utils"; -import FilterBadge from "../../CAREUI/display/FilterBadge"; -import PatientFilter from "./PatientFilter"; -import PhoneNumberFormField from "../Form/FormFields/PhoneNumberFormField"; -import RecordMeta from "../../CAREUI/display/RecordMeta"; -import SearchInput from "../Form/SearchInput"; -import SortDropdownMenu from "@/components/Common/SortDropdown"; +import { triggerGoal } from "@/Integrations/Plausible"; +import * as Notification from "@/Utils/Notifications"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import useQuery from "@/Utils/request/useQuery"; import { formatPatientAge, humanizeStrings, isAntenatal, parsePhoneNumber, -} from "../../Utils/utils"; -import useFilters from "@/common/hooks/useFilters"; -import { useTranslation } from "react-i18next"; -import Page from "@/components/Common/components/Page"; -import dayjs from "dayjs"; -import { triggerGoal } from "../../Integrations/Plausible"; -import useAuthUser from "@/common/hooks/useAuthUser"; -import useQuery from "../../Utils/request/useQuery"; -import routes from "../../Redux/api"; -import { - DIAGNOSES_FILTER_LABELS, - DiagnosesFilterKey, - FILTER_BY_DIAGNOSES_KEYS, -} from "./DiagnosesFilter"; -import { ICD11DiagnosisModel } from "../Diagnosis/types"; -import { getDiagnosesByIds } from "../Diagnosis/utils"; -import Tabs from "@/components/Common/components/Tabs"; -import { PhoneNumberValidator } from "../Form/FieldValidators"; -import { isPatientMandatoryDataFilled } from "./Utils"; -import request from "../../Utils/request/request"; -import { Avatar } from "@/components/Common/Avatar"; +} from "@/Utils/utils"; -import Loading from "@/components/Common/Loading"; interface TabPanelProps { children?: ReactNode; dir?: string; diff --git a/src/components/Patient/PatientCategorySelect.tsx b/src/components/Patient/PatientCategorySelect.tsx index 58717a81ca7..0cdb003db77 100644 --- a/src/components/Patient/PatientCategorySelect.tsx +++ b/src/components/Patient/PatientCategorySelect.tsx @@ -1,7 +1,9 @@ -import { PatientCategoryID, PATIENT_CATEGORIES } from "@/common/constants"; -import { classNames } from "../../Utils/utils"; -import { SelectFormField } from "../Form/FormFields/SelectFormField"; -import { FormFieldBaseProps } from "../Form/FormFields/Utils"; +import { SelectFormField } from "@/components/Form/FormFields/SelectFormField"; +import { FormFieldBaseProps } from "@/components/Form/FormFields/Utils"; + +import { PATIENT_CATEGORIES, PatientCategoryID } from "@/common/constants"; + +import { classNames } from "@/Utils/utils"; /** * A `FormField` component to select patient category and is by default a mandatory diff --git a/src/components/Patient/PatientConsentRecordBlock.tsx b/src/components/Patient/PatientConsentRecordBlock.tsx index 4d0fd092ee4..f46648c0bae 100644 --- a/src/components/Patient/PatientConsentRecordBlock.tsx +++ b/src/components/Patient/PatientConsentRecordBlock.tsx @@ -1,17 +1,21 @@ +import { useEffect, useState } from "react"; + +import ButtonV2 from "@/components/Common/ButtonV2"; +import { PatientConsentModel } from "@/components/Facility/models"; +import FileBlock from "@/components/Files/FileBlock"; +import { SelectFormField } from "@/components/Form/FormFields/SelectFormField"; +import { FileUploadModel } from "@/components/Patient/models"; + +import useAuthUser from "@/hooks/useAuthUser"; +import { FileManagerResult } from "@/hooks/useFileManager"; + import { CONSENT_PATIENT_CODE_STATUS_CHOICES, CONSENT_TYPE_CHOICES, } from "@/common/constants"; -import { FileUploadModel } from "./models"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import useAuthUser from "@/common/hooks/useAuthUser"; -import { PatientConsentModel } from "../Facility/models"; -import { SelectFormField } from "../Form/FormFields/SelectFormField"; -import { useEffect, useState } from "react"; -import request from "../../Utils/request/request"; -import routes from "../../Redux/api"; -import FileBlock from "../Files/FileBlock"; -import { FileManagerResult } from "../../Utils/useFileManager"; + +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; export default function PatientConsentRecordBlockGroup(props: { consentRecord: PatientConsentModel; diff --git a/src/components/Patient/PatientConsentRecords.tsx b/src/components/Patient/PatientConsentRecords.tsx index aa6f45b761c..162dcb2ff77 100644 --- a/src/components/Patient/PatientConsentRecords.tsx +++ b/src/components/Patient/PatientConsentRecords.tsx @@ -1,24 +1,29 @@ +import { t } from "i18next"; import { useState } from "react"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import ButtonV2 from "@/components/Common/ButtonV2"; +import ConfirmDialog from "@/components/Common/ConfirmDialog"; +import Page from "@/components/Common/Page"; +import Tabs from "@/components/Common/Tabs"; +import { PatientConsentModel } from "@/components/Facility/models"; +import { SelectFormField } from "@/components/Form/FormFields/SelectFormField"; +import TextFormField from "@/components/Form/FormFields/TextFormField"; +import PatientConsentRecordBlockGroup from "@/components/Patient/PatientConsentRecordBlock"; + +import useFileManager from "@/hooks/useFileManager"; +import useFileUpload from "@/hooks/useFileUpload"; + import { CONSENT_PATIENT_CODE_STATUS_CHOICES, CONSENT_TYPE_CHOICES, } from "@/common/constants"; -import routes from "../../Redux/api"; -import useQuery from "../../Utils/request/useQuery"; -import Page from "@/components/Common/components/Page"; -import request from "../../Utils/request/request"; -import ConfirmDialog from "@/components/Common/ConfirmDialog"; -import { SelectFormField } from "../Form/FormFields/SelectFormField"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import { formatDateTime } from "../../Utils/utils"; -import TextFormField from "../Form/FormFields/TextFormField"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import useFileUpload from "../../Utils/useFileUpload"; -import PatientConsentRecordBlockGroup from "./PatientConsentRecordBlock"; -import useFileManager from "../../Utils/useFileManager"; -import { PatientConsentModel } from "../Facility/models"; -import Tabs from "@/components/Common/components/Tabs"; -import { t } from "i18next"; + +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import useQuery from "@/Utils/request/useQuery"; +import { formatDateTime } from "@/Utils/utils"; export default function PatientConsentRecords(props: { facilityId: string; diff --git a/src/components/Patient/PatientFilter.tsx b/src/components/Patient/PatientFilter.tsx index 2d94aa270fc..4d0e49e9e62 100644 --- a/src/components/Patient/PatientFilter.tsx +++ b/src/components/Patient/PatientFilter.tsx @@ -1,6 +1,33 @@ +import careConfig from "@careConfig"; import dayjs from "dayjs"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import FiltersSlideover from "../../CAREUI/interactive/FiltersSlideover"; +import { useTranslation } from "react-i18next"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import FiltersSlideover from "@/CAREUI/interactive/FiltersSlideover"; + +import AccordionV2 from "@/components/Common/AccordionV2"; +import { DateRange } from "@/components/Common/DateRangeInputV2"; +import { FacilitySelect } from "@/components/Common/FacilitySelect"; +import { LocationSelect } from "@/components/Common/LocationSelect"; +import DistrictSelect from "@/components/Facility/FacilityFilter/DistrictSelect"; +import AutoCompleteAsync from "@/components/Form/AutoCompleteAsync"; +import DateRangeFormField from "@/components/Form/FormFields/DateRangeFormField"; +import { FieldLabel } from "@/components/Form/FormFields/FormField"; +import { SelectFormField } from "@/components/Form/FormFields/SelectFormField"; +import TextFormField from "@/components/Form/FormFields/TextFormField"; +import { + FieldChangeEvent, + FieldChangeEventHandler, +} from "@/components/Form/FormFields/Utils"; +import MultiSelectMenuV2 from "@/components/Form/MultiSelectMenuV2"; +import SelectMenuV2 from "@/components/Form/SelectMenuV2"; +import DiagnosesFilter, { + FILTER_BY_DIAGNOSES_KEYS, +} from "@/components/Patient/DiagnosesFilter"; + +import useAuthUser from "@/hooks/useAuthUser"; +import useMergeState from "@/hooks/useMergeState"; + import { ADMITTED_TO, CONSENT_TYPE_CHOICES, @@ -10,31 +37,11 @@ import { PATIENT_FILTER_CATEGORIES, RATION_CARD_CATEGORY, } from "@/common/constants"; -import useMergeState from "@/common/hooks/useMergeState"; -import { dateQueryString } from "../../Utils/utils"; -import { DateRange } from "@/components/Common/DateRangeInputV2"; -import { FacilitySelect } from "@/components/Common/FacilitySelect"; -import { LocationSelect } from "@/components/Common/LocationSelect"; -import AccordionV2 from "@/components/Common/components/AccordionV2"; -import DistrictSelect from "../Facility/FacilityFilter/DistrictSelect"; -import AutoCompleteAsync from "../Form/AutoCompleteAsync"; -import DateRangeFormField from "../Form/FormFields/DateRangeFormField"; -import { FieldLabel } from "../Form/FormFields/FormField"; -import TextFormField from "../Form/FormFields/TextFormField"; -import { - FieldChangeEvent, - FieldChangeEventHandler, -} from "../Form/FormFields/Utils"; -import MultiSelectMenuV2 from "../Form/MultiSelectMenuV2"; -import SelectMenuV2 from "../Form/SelectMenuV2"; -import DiagnosesFilter, { FILTER_BY_DIAGNOSES_KEYS } from "./DiagnosesFilter"; -import useQuery from "../../Utils/request/useQuery"; -import routes from "../../Redux/api"; -import request from "../../Utils/request/request"; -import useAuthUser from "@/common/hooks/useAuthUser"; -import { SelectFormField } from "../Form/FormFields/SelectFormField"; -import { useTranslation } from "react-i18next"; -import careConfig from "@careConfig"; + +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import useQuery from "@/Utils/request/useQuery"; +import { dateQueryString } from "@/Utils/utils"; const getDate = (value: any) => value && dayjs(value).isValid() && dayjs(value).toDate(); diff --git a/src/components/Patient/PatientHome.tsx b/src/components/Patient/PatientHome.tsx index fe91bc4e17d..e5f6166ce1e 100644 --- a/src/components/Patient/PatientHome.tsx +++ b/src/components/Patient/PatientHome.tsx @@ -1,6 +1,28 @@ import { navigate } from "raviger"; import { useEffect, useState } from "react"; -import * as Notification from "../../Utils/Notifications"; +import { useTranslation } from "react-i18next"; + +import Chip from "@/CAREUI/display/Chip"; +import CareIcon from "@/CAREUI/icons/CareIcon"; +import PaginatedList from "@/CAREUI/misc/PaginatedList"; + +import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"; +import { Button } from "@/components/ui/button"; + +import ButtonV2 from "@/components/Common/ButtonV2"; +import CircularProgress from "@/components/Common/CircularProgress"; +import ConfirmDialog from "@/components/Common/ConfirmDialog"; +import Loading from "@/components/Common/Loading"; +import Page from "@/components/Common/Page"; +import RelativeDateUserMention from "@/components/Common/RelativeDateUserMention"; +import UserAutocomplete from "@/components/Common/UserAutocompleteFormField"; +import { ConsultationCard } from "@/components/Facility/ConsultationCard"; +import { ConsultationModel } from "@/components/Facility/models"; +import { InsuranceDetialsCard } from "@/components/Patient/InsuranceDetailsCard"; +import { SampleTestCard } from "@/components/Patient/SampleTestCard"; +import { PatientModel, SampleTestModel } from "@/components/Patient/models"; + +import useAuthUser from "@/hooks/useAuthUser"; import { DISCHARGE_REASONS, @@ -8,7 +30,14 @@ import { OCCUPATION_TYPES, SAMPLE_TEST_STATUS, } from "@/common/constants"; -import { PatientModel, SampleTestModel } from "./models"; + +import { triggerGoal } from "@/Integrations/Plausible"; +import { NonReadOnlyUsers } from "@/Utils/AuthorizeFor"; +import * as Notification from "@/Utils/Notifications"; +import dayjs from "@/Utils/dayjs"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import useQuery from "@/Utils/request/useQuery"; import { classNames, formatDate, @@ -17,32 +46,7 @@ import { formatPatientAge, isAntenatal, isPostPartum, -} from "../../Utils/utils"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; - -import CareIcon from "../../CAREUI/icons/CareIcon"; -import Chip from "../../CAREUI/display/Chip"; -import CircularProgress from "@/components/Common/components/CircularProgress"; -import ConfirmDialog from "@/components/Common/ConfirmDialog"; -import { ConsultationCard } from "../Facility/ConsultationCard"; -import { ConsultationModel } from "../Facility/models"; -import { NonReadOnlyUsers } from "../../Utils/AuthorizeFor"; -import Page from "@/components/Common/components/Page"; -import RelativeDateUserMention from "@/components/Common/RelativeDateUserMention"; -import { SampleTestCard } from "./SampleTestCard"; -import UserAutocomplete from "@/components/Common/UserAutocompleteFormField"; -import dayjs from "../../Utils/dayjs"; -import { triggerGoal } from "../../Integrations/Plausible"; -import useAuthUser from "@/common/hooks/useAuthUser"; -import useQuery from "../../Utils/request/useQuery"; -import routes from "../../Redux/api"; -import { InsuranceDetialsCard } from "./InsuranceDetailsCard"; -import request from "../../Utils/request/request"; -import PaginatedList from "../../CAREUI/misc/PaginatedList"; -import { useTranslation } from "react-i18next"; -import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"; -import { Button } from "@/components/ui/button"; -import Loading from "@/components/Common/Loading"; +} from "@/Utils/utils"; export const parseOccupation = (occupation: string | undefined) => { return OCCUPATION_TYPES.find((i) => i.value === occupation)?.text; diff --git a/src/components/Patient/PatientInfoCard.tsx b/src/components/Patient/PatientInfoCard.tsx index f5bae4aba54..c0c2eec80ec 100644 --- a/src/components/Patient/PatientInfoCard.tsx +++ b/src/components/Patient/PatientInfoCard.tsx @@ -1,21 +1,56 @@ -import * as Notification from "../../Utils/Notifications"; - -import { - CONSULTATION_SUGGESTION, - DISCHARGE_REASONS, - PATIENT_CATEGORIES, - RESPIRATORY_SUPPORT, - TELEMEDICINE_ACTIONS, -} from "@/common/constants"; -import { ConsultationModel, PatientCategory } from "../Facility/models"; +import careConfig from "@careConfig"; import { Field, Label, MenuItem, Switch } from "@headlessui/react"; import { Link, navigate } from "raviger"; +import { useState } from "react"; +import { useTranslation } from "react-i18next"; + +import { cn } from "@/lib/utils.js"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import { AuthorizedForConsultationRelatedActions } from "@/CAREUI/misc/AuthorizedChild"; + import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, } from "@/components/ui/tooltip"; + +import ABHAProfileModal from "@/components/ABDM/ABHAProfileModal"; +import FetchRecordsModal from "@/components/ABDM/FetchRecordsModal"; +import LinkAbhaNumber from "@/components/ABDM/LinkAbhaNumber/index"; +import { AbhaNumberModel } from "@/components/ABDM/types/abha"; +import ButtonV2 from "@/components/Common/ButtonV2"; +import DialogModal from "@/components/Common/Dialog"; +import DropdownMenu from "@/components/Common/Menu"; +import Beds from "@/components/Facility/Consultations/Beds"; +import { Mews } from "@/components/Facility/Consultations/Mews"; +import DischargeModal from "@/components/Facility/DischargeModal"; +import DischargeSummaryModal from "@/components/Facility/DischargeSummaryModal"; +import { + ConsultationModel, + PatientCategory, +} from "@/components/Facility/models"; +import { PatientModel } from "@/components/Patient/models"; +import { SkillModel } from "@/components/Users/models"; + +import useAuthUser from "@/hooks/useAuthUser"; + +import { + CONSULTATION_SUGGESTION, + DISCHARGE_REASONS, + PATIENT_CATEGORIES, + RESPIRATORY_SUPPORT, + TELEMEDICINE_ACTIONS, +} from "@/common/constants"; + +import { triggerGoal } from "@/Integrations/Plausible"; +import { PLUGIN_Component } from "@/PluginEngine"; +import * as Notification from "@/Utils/Notifications"; +import dayjs from "@/Utils/dayjs"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import useQuery from "@/Utils/request/useQuery"; import { classNames, formatDate, @@ -23,34 +58,7 @@ import { formatName, formatPatientAge, humanizeStrings, -} from "../../Utils/utils"; - -import ABHAProfileModal from "../ABDM/ABHAProfileModal"; -import { AbhaNumberModel } from "../ABDM/types/abha"; -import { AuthorizedForConsultationRelatedActions } from "../../CAREUI/misc/AuthorizedChild"; -import Beds from "../Facility/Consultations/Beds"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import DialogModal from "@/components/Common/Dialog"; -import DischargeModal from "../Facility/DischargeModal"; -import DischargeSummaryModal from "../Facility/DischargeSummaryModal"; -import DropdownMenu from "@/components/Common/components/Menu"; -import FetchRecordsModal from "../ABDM/FetchRecordsModal"; -import LinkAbhaNumber from "../ABDM/LinkAbhaNumber/index"; -import { Mews } from "../Facility/Consultations/Mews"; -import { PLUGIN_Component } from "@/PluginEngine"; -import { PatientModel } from "./models"; -import { SkillModel } from "../Users/models"; -import careConfig from "@careConfig"; -import { cn } from "@/lib/utils.js"; -import dayjs from "../../Utils/dayjs"; -import request from "../../Utils/request/request"; -import routes from "../../Redux/api"; -import { triggerGoal } from "../../Integrations/Plausible"; -import useAuthUser from "@/common/hooks/useAuthUser"; -import useQuery from "../../Utils/request/useQuery"; -import { useState } from "react"; -import { useTranslation } from "react-i18next"; +} from "@/Utils/utils"; const formatSkills = (arr: SkillModel[]) => { const skills = arr.map((skill) => skill.skill_object.name); diff --git a/src/components/Patient/PatientNotes.tsx b/src/components/Patient/PatientNotes.tsx index 9aaa4e79d42..70dfcd6c426 100644 --- a/src/components/Patient/PatientNotes.tsx +++ b/src/components/Patient/PatientNotes.tsx @@ -1,20 +1,28 @@ -import { useState, useEffect } from "react"; -import * as Notification from "../../Utils/Notifications"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import { NonReadOnlyUsers } from "../../Utils/AuthorizeFor"; -import PatientNotesList from "../Facility/PatientNotesList"; -import Page from "@/components/Common/components/Page"; -import { useMessageListener } from "@/common/hooks/useMessageListener"; -import { PatientNoteStateType, PatientNotesModel } from "../Facility/models"; -import request from "../../Utils/request/request"; -import routes from "../../Redux/api"; -import { PATIENT_NOTES_THREADS } from "@/common/constants"; -import useAuthUser from "@/common/hooks/useAuthUser"; -import DoctorNoteReplyPreviewCard from "../Facility/DoctorNoteReplyPreviewCard"; -import { classNames, keysOf } from "../../Utils/utils"; -import AutoExpandingTextInputFormField from "../Form/FormFields/AutoExpandingTextInputFormField"; import { t } from "i18next"; +import { useEffect, useState } from "react"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import ButtonV2 from "@/components/Common/ButtonV2"; +import Page from "@/components/Common/Page"; +import DoctorNoteReplyPreviewCard from "@/components/Facility/DoctorNoteReplyPreviewCard"; +import PatientNotesList from "@/components/Facility/PatientNotesList"; +import { + PatientNoteStateType, + PatientNotesModel, +} from "@/components/Facility/models"; +import AutoExpandingTextInputFormField from "@/components/Form/FormFields/AutoExpandingTextInputFormField"; + +import useAuthUser from "@/hooks/useAuthUser"; +import { useMessageListener } from "@/hooks/useMessageListener"; + +import { PATIENT_NOTES_THREADS } from "@/common/constants"; + +import { NonReadOnlyUsers } from "@/Utils/AuthorizeFor"; +import * as Notification from "@/Utils/Notifications"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import { classNames, keysOf } from "@/Utils/utils"; interface PatientNotesProps { patientId: any; diff --git a/src/components/Patient/PatientRegister.tsx b/src/components/Patient/PatientRegister.tsx index bd5b1a2fab8..4dc8b4965bc 100644 --- a/src/components/Patient/PatientRegister.tsx +++ b/src/components/Patient/PatientRegister.tsx @@ -1,4 +1,70 @@ -import * as Notification from "../../Utils/Notifications"; +import careConfig from "@careConfig"; +import { startCase, toLower } from "lodash-es"; +import { debounce } from "lodash-es"; +import { navigate } from "raviger"; +import { useCallback, useReducer, useRef, useState } from "react"; +import { useTranslation } from "react-i18next"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import { Button } from "@/components/ui/button"; +import { + Tooltip, + TooltipContent, + TooltipProvider, + TooltipTrigger, +} from "@/components/ui/tooltip"; + +import LinkAbhaNumber from "@/components/ABDM/LinkAbhaNumber/index"; +import { AbhaNumberModel } from "@/components/ABDM/types/abha"; +import AccordionV2 from "@/components/Common/AccordionV2"; +import ButtonV2 from "@/components/Common/ButtonV2"; +import CollapseV2 from "@/components/Common/CollapseV2"; +import ConfirmDialog from "@/components/Common/ConfirmDialog"; +import DialogModal from "@/components/Common/Dialog"; +import Loading from "@/components/Common/Loading"; +import PageTitle from "@/components/Common/PageTitle"; +import Spinner from "@/components/Common/Spinner"; +import Error404 from "@/components/ErrorPages/404"; +import { ILocalBodies } from "@/components/ExternalResult/models"; +import DuplicatePatientDialog from "@/components/Facility/DuplicatePatientDialog"; +import TransferPatientDialog from "@/components/Facility/TransferPatientDialog"; +import { + DistrictModel, + DupPatientModel, + WardModel, +} from "@/components/Facility/models"; +import { + FieldError, + PhoneNumberValidator, + RequiredFieldValidator, +} from "@/components/Form/FieldValidators"; +import Form from "@/components/Form/Form"; +import { FormContextValue } from "@/components/Form/FormContext"; +import AutocompleteFormField from "@/components/Form/FormFields/Autocomplete"; +import CheckBoxFormField from "@/components/Form/FormFields/CheckBoxFormField"; +import DateFormField from "@/components/Form/FormFields/DateFormField"; +import { + FieldErrorText, + FieldLabel, +} from "@/components/Form/FormFields/FormField"; +import PhoneNumberFormField from "@/components/Form/FormFields/PhoneNumberFormField"; +import RadioFormField from "@/components/Form/FormFields/RadioFormField"; +import { SelectFormField } from "@/components/Form/FormFields/SelectFormField"; +import TextAreaFormField from "@/components/Form/FormFields/TextAreaFormField"; +import TextFormField from "@/components/Form/FormFields/TextFormField"; +import SelectMenuV2 from "@/components/Form/SelectMenuV2"; +import InsuranceDetailsBuilder from "@/components/HCX/InsuranceDetailsBuilder"; +import { HCXPolicyModel } from "@/components/HCX/models"; +import HCXPolicyValidator from "@/components/HCX/validators"; +import { + Occupation, + PatientMeta, + PatientModel, +} from "@/components/Patient/models"; + +import useAppHistory from "@/hooks/useAppHistory"; +import useAuthUser from "@/hooks/useAuthUser"; import { BLOOD_GROUPS, @@ -10,20 +76,15 @@ import { SOCIOECONOMIC_STATUS_CHOICES, VACCINES, } from "@/common/constants"; -import { DistrictModel, DupPatientModel, WardModel } from "../Facility/models"; -import { - FieldError, - PhoneNumberValidator, - RequiredFieldValidator, -} from "../Form/FieldValidators"; -import { FieldErrorText, FieldLabel } from "../Form/FormFields/FormField"; -import { Occupation, PatientMeta, PatientModel } from "./models"; -import { - Tooltip, - TooltipContent, - TooltipProvider, - TooltipTrigger, -} from "@/components/ui/tooltip"; +import countryList from "@/common/static/countries.json"; +import { statusType, useAbortableEffect } from "@/common/utils"; +import { validatePincode } from "@/common/validation"; + +import { RestoreDraftButton } from "@/Utils/AutoSave"; +import * as Notification from "@/Utils/Notifications"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import useQuery from "@/Utils/request/useQuery"; import { compareBy, dateQueryString, @@ -31,53 +92,7 @@ import { includesIgnoreCase, parsePhoneNumber, scrollTo, -} from "../../Utils/utils"; -import { statusType, useAbortableEffect } from "@/common/utils"; -import { useCallback, useReducer, useRef, useState } from "react"; - -import { AbhaNumberModel } from "../ABDM/types/abha"; -import AccordionV2 from "@/components/Common/components/AccordionV2"; -import AutocompleteFormField from "../Form/FormFields/Autocomplete"; -import { Button } from "@/components/ui/button"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import CheckBoxFormField from "../Form/FormFields/CheckBoxFormField"; -import CollapseV2 from "@/components/Common/components/CollapseV2"; -import ConfirmDialog from "@/components/Common/ConfirmDialog"; -import DateFormField from "../Form/FormFields/DateFormField"; -import DialogModal from "@/components/Common/Dialog"; -import DuplicatePatientDialog from "../Facility/DuplicatePatientDialog"; -import Error404 from "../ErrorPages/404"; -import Form from "../Form/Form"; -import { FormContextValue } from "../Form/FormContext"; -import { HCXPolicyModel } from "../HCX/models"; -import HCXPolicyValidator from "../HCX/validators"; -import { ILocalBodies } from "../ExternalResult/models"; -import InsuranceDetailsBuilder from "../HCX/InsuranceDetailsBuilder"; -import LinkAbhaNumber from "../ABDM/LinkAbhaNumber/index"; -import Loading from "@/components/Common/Loading"; -import PageTitle from "@/components/Common/PageTitle"; -import PhoneNumberFormField from "../Form/FormFields/PhoneNumberFormField"; -import RadioFormField from "../Form/FormFields/RadioFormField"; -import { RestoreDraftButton } from "@/Utils/AutoSave"; -import { SelectFormField } from "../Form/FormFields/SelectFormField"; -import SelectMenuV2 from "../Form/SelectMenuV2"; -import Spinner from "@/components/Common/Spinner"; -import TextAreaFormField from "../Form/FormFields/TextAreaFormField"; -import TextFormField from "../Form/FormFields/TextFormField"; -import TransferPatientDialog from "../Facility/TransferPatientDialog"; -import careConfig from "@careConfig"; -import { startCase, toLower } from "lodash-es"; -import countryList from "@/common/static/countries.json"; -import { debounce } from "lodash-es"; -import { navigate } from "raviger"; -import request from "../../Utils/request/request"; -import routes from "../../Redux/api"; -import useAppHistory from "@/common/hooks/useAppHistory"; -import useAuthUser from "@/common/hooks/useAuthUser"; -import useQuery from "../../Utils/request/useQuery"; -import { useTranslation } from "react-i18next"; -import { validatePincode } from "@/common/validation"; +} from "@/Utils/utils"; type PatientForm = PatientModel & PatientMeta & { age?: number; is_postpartum?: boolean }; diff --git a/src/components/Patient/SampleDetails.tsx b/src/components/Patient/SampleDetails.tsx index d74b83dff67..c556177ec13 100644 --- a/src/components/Patient/SampleDetails.tsx +++ b/src/components/Patient/SampleDetails.tsx @@ -1,19 +1,21 @@ -import { FlowModel } from "./models"; -import { GENDER_TYPES, TEST_TYPE_CHOICES } from "@/common/constants"; - -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import Card from "../../CAREUI/display/Card"; -import { FileUpload } from "../Files/FileUpload"; -import Page from "@/components/Common/components/Page"; -import { startCase, camelCase, capitalize } from "lodash-es"; -import { formatDateTime, formatPatientAge } from "../../Utils/utils"; - +import { camelCase, capitalize, startCase } from "lodash-es"; import { navigate } from "raviger"; -import { DetailRoute } from "../../Routers/types"; -import useQuery from "../../Utils/request/useQuery"; -import routes from "../../Redux/api"; +import Card from "@/CAREUI/display/Card"; + +import ButtonV2 from "@/components/Common/ButtonV2"; import Loading from "@/components/Common/Loading"; +import Page from "@/components/Common/Page"; +import { FileUpload } from "@/components/Files/FileUpload"; +import { FlowModel } from "@/components/Patient/models"; + +import { GENDER_TYPES, TEST_TYPE_CHOICES } from "@/common/constants"; + +import { DetailRoute } from "@/Routers/types"; +import routes from "@/Utils/request/api"; +import useQuery from "@/Utils/request/useQuery"; +import { formatDateTime, formatPatientAge } from "@/Utils/utils"; + export const SampleDetails = ({ id }: DetailRoute) => { const { loading: isLoading, data: sampleDetails } = useQuery( routes.getTestSample, diff --git a/src/components/Patient/SampleFilters.tsx b/src/components/Patient/SampleFilters.tsx index 0cbb3056baa..b44f6fa3575 100644 --- a/src/components/Patient/SampleFilters.tsx +++ b/src/components/Patient/SampleFilters.tsx @@ -1,18 +1,22 @@ +import FiltersSlideover from "@/CAREUI/interactive/FiltersSlideover"; + +import CircularProgress from "@/components/Common/CircularProgress"; +import { FacilitySelect } from "@/components/Common/FacilitySelect"; +import { FacilityModel } from "@/components/Facility/models"; +import { FieldLabel } from "@/components/Form/FormFields/FormField"; +import { SelectFormField } from "@/components/Form/FormFields/SelectFormField"; +import { FieldChangeEvent } from "@/components/Form/FormFields/Utils"; + +import useMergeState from "@/hooks/useMergeState"; + import { - SAMPLE_TEST_STATUS, SAMPLE_TEST_RESULT, + SAMPLE_TEST_STATUS, SAMPLE_TYPE_CHOICES, } from "@/common/constants"; -import { FacilitySelect } from "@/components/Common/FacilitySelect"; -import { FacilityModel } from "../Facility/models"; -import useMergeState from "@/common/hooks/useMergeState"; -import FiltersSlideover from "../../CAREUI/interactive/FiltersSlideover"; -import CircularProgress from "@/components/Common/components/CircularProgress"; -import { FieldLabel } from "../Form/FormFields/FormField"; -import { SelectFormField } from "../Form/FormFields/SelectFormField"; -import { FieldChangeEvent } from "../Form/FormFields/Utils"; -import useQuery from "../../Utils/request/useQuery"; -import routes from "../../Redux/api"; + +import routes from "@/Utils/request/api"; +import useQuery from "@/Utils/request/useQuery"; export default function UserFilter(props: any) { const { filter, onChange, closeFilter, removeFilters } = props; diff --git a/src/components/Patient/SamplePreview.tsx b/src/components/Patient/SamplePreview.tsx index f1c8489bed9..877d6113a59 100644 --- a/src/components/Patient/SamplePreview.tsx +++ b/src/components/Patient/SamplePreview.tsx @@ -1,11 +1,11 @@ -import { classNames, formatDateTime, humanizeStrings } from "../../Utils/utils"; +import ButtonV2 from "@/components/Common/ButtonV2"; +import Loading from "@/components/Common/Loading"; +import Page from "@/components/Common/Page"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import Page from "@/components/Common/components/Page"; -import useQuery from "../../Utils/request/useQuery"; -import routes from "../../Redux/api"; +import routes from "@/Utils/request/api"; +import useQuery from "@/Utils/request/useQuery"; +import { classNames, formatDateTime, humanizeStrings } from "@/Utils/utils"; -import Loading from "@/components/Common/Loading"; interface ISamplePreviewProps { id: string; sampleId: string; diff --git a/src/components/Patient/SampleTest.tsx b/src/components/Patient/SampleTest.tsx index 4c158ff7189..afddb81b654 100644 --- a/src/components/Patient/SampleTest.tsx +++ b/src/components/Patient/SampleTest.tsx @@ -1,23 +1,27 @@ import { navigate } from "raviger"; - import { useReducer, useState } from "react"; -import { SAMPLE_TYPE_CHOICES, ICMR_CATEGORY } from "@/common/constants"; -import * as Notification from "../../Utils/Notifications"; -import { SampleTestModel } from "./models"; -import { Cancel, Submit } from "@/components/Common/components/ButtonV2"; -import { FieldLabel } from "../Form/FormFields/FormField"; -import TextAreaFormField from "../Form/FormFields/TextAreaFormField"; -import useAppHistory from "@/common/hooks/useAppHistory"; -import { SelectFormField } from "../Form/FormFields/SelectFormField"; -import TextFormField from "../Form/FormFields/TextFormField"; -import CheckBoxFormField from "../Form/FormFields/CheckBoxFormField"; -import { FieldChangeEvent } from "../Form/FormFields/Utils"; -import Page from "@/components/Common/components/Page"; + +import { Cancel, Submit } from "@/components/Common/ButtonV2"; import { FacilitySelect } from "@/components/Common/FacilitySelect"; -import request from "../../Utils/request/request"; -import routes from "../../Redux/api"; -import useQuery from "../../Utils/request/useQuery"; import Loading from "@/components/Common/Loading"; +import Page from "@/components/Common/Page"; +import CheckBoxFormField from "@/components/Form/FormFields/CheckBoxFormField"; +import { FieldLabel } from "@/components/Form/FormFields/FormField"; +import { SelectFormField } from "@/components/Form/FormFields/SelectFormField"; +import TextAreaFormField from "@/components/Form/FormFields/TextAreaFormField"; +import TextFormField from "@/components/Form/FormFields/TextFormField"; +import { FieldChangeEvent } from "@/components/Form/FormFields/Utils"; +import { SampleTestModel } from "@/components/Patient/models"; + +import useAppHistory from "@/hooks/useAppHistory"; + +import { ICMR_CATEGORY, SAMPLE_TYPE_CHOICES } from "@/common/constants"; + +import * as Notification from "@/Utils/Notifications"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import useQuery from "@/Utils/request/useQuery"; + const initForm: SampleTestModel = { isFastTrack: false, fast_track: "", diff --git a/src/components/Patient/SampleTestCard.tsx b/src/components/Patient/SampleTestCard.tsx index e4b29350ff8..34af3df6de7 100644 --- a/src/components/Patient/SampleTestCard.tsx +++ b/src/components/Patient/SampleTestCard.tsx @@ -1,16 +1,19 @@ +import { camelCase, startCase } from "lodash-es"; import { navigate } from "raviger"; import { useState } from "react"; -import { SampleTestModel } from "./models"; -import { SAMPLE_TEST_STATUS } from "@/common/constants"; -import * as Notification from "../../Utils/Notifications"; -import UpdateStatusDialog from "./UpdateStatusDialog"; -import { startCase, camelCase } from "lodash-es"; -import { formatDateTime } from "../../Utils/utils"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import { NonReadOnlyUsers } from "../../Utils/AuthorizeFor"; + +import ButtonV2 from "@/components/Common/ButtonV2"; import RelativeDateUserMention from "@/components/Common/RelativeDateUserMention"; -import request from "../../Utils/request/request"; -import routes from "../../Redux/api"; +import UpdateStatusDialog from "@/components/Patient/UpdateStatusDialog"; +import { SampleTestModel } from "@/components/Patient/models"; + +import { SAMPLE_TEST_STATUS } from "@/common/constants"; + +import { NonReadOnlyUsers } from "@/Utils/AuthorizeFor"; +import * as Notification from "@/Utils/Notifications"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import { formatDateTime } from "@/Utils/utils"; interface SampleDetailsProps { facilityId: number; diff --git a/src/components/Patient/SampleViewAdmin.tsx b/src/components/Patient/SampleViewAdmin.tsx index 5b84059d6bc..43d03ad1d12 100644 --- a/src/components/Patient/SampleViewAdmin.tsx +++ b/src/components/Patient/SampleViewAdmin.tsx @@ -1,28 +1,33 @@ -import SampleFilter from "./SampleFilters"; import { navigate } from "raviger"; import { useState } from "react"; + +import CountBlock from "@/CAREUI/display/Count"; +import CareIcon from "@/CAREUI/icons/CareIcon"; +import { AdvancedFilterButton } from "@/CAREUI/interactive/FiltersSlideover"; + +import { ExportButton } from "@/components/Common/Export"; +import Loading from "@/components/Common/Loading"; +import Page from "@/components/Common/Page"; +import SearchInput from "@/components/Form/SearchInput"; +import SampleFilter from "@/components/Patient/SampleFilters"; +import UpdateStatusDialog from "@/components/Patient/UpdateStatusDialog"; +import { SampleTestModel } from "@/components/Patient/models"; + +import useFilters from "@/hooks/useFilters"; + import { - SAMPLE_TEST_STATUS, - SAMPLE_TEST_RESULT, SAMPLE_FLOW_RULES, + SAMPLE_TEST_RESULT, + SAMPLE_TEST_STATUS, SAMPLE_TYPE_CHOICES, } from "@/common/constants"; -import * as Notification from "../../Utils/Notifications"; -import { SampleTestModel } from "./models"; -import UpdateStatusDialog from "./UpdateStatusDialog"; -import { formatDateTime } from "../../Utils/utils"; -import SearchInput from "../Form/SearchInput"; -import useFilters from "@/common/hooks/useFilters"; -import { ExportButton } from "@/components/Common/Export"; -import CountBlock from "../../CAREUI/display/Count"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import { AdvancedFilterButton } from "../../CAREUI/interactive/FiltersSlideover"; -import Page from "@/components/Common/components/Page"; -import useQuery from "../../Utils/request/useQuery"; -import routes from "../../Redux/api"; -import request from "../../Utils/request/request"; -import Loading from "@/components/Common/Loading"; +import * as Notification from "@/Utils/Notifications"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import useQuery from "@/Utils/request/useQuery"; +import { formatDateTime } from "@/Utils/utils"; + export default function SampleViewAdmin() { const { qParams, diff --git a/src/components/Patient/ShiftCreate.tsx b/src/components/Patient/ShiftCreate.tsx index 350ebe4ccee..5c11f6cf161 100644 --- a/src/components/Patient/ShiftCreate.tsx +++ b/src/components/Patient/ShiftCreate.tsx @@ -1,4 +1,25 @@ -import * as Notification from "../../Utils/Notifications"; +import careConfig from "@careConfig"; +import { navigate } from "raviger"; +import { useReducer, useState } from "react"; +import { useTranslation } from "react-i18next"; + +import Card from "@/CAREUI/display/Card"; + +import { Cancel, Submit } from "@/components/Common/ButtonV2"; +import { FacilitySelect } from "@/components/Common/FacilitySelect"; +import Loading from "@/components/Common/Loading"; +import Page from "@/components/Common/Page"; +import { PhoneNumberValidator } from "@/components/Form/FieldValidators"; +import CheckBoxFormField from "@/components/Form/FormFields/CheckBoxFormField"; +import { FieldLabel } from "@/components/Form/FormFields/FormField"; +import PhoneNumberFormField from "@/components/Form/FormFields/PhoneNumberFormField"; +import { SelectFormField } from "@/components/Form/FormFields/SelectFormField"; +import TextAreaFormField from "@/components/Form/FormFields/TextAreaFormField"; +import TextFormField from "@/components/Form/FormFields/TextFormField"; +import { FieldChangeEvent } from "@/components/Form/FormFields/Utils"; +import PatientCategorySelect from "@/components/Patient/PatientCategorySelect"; + +import useAppHistory from "@/hooks/useAppHistory"; import { BREATHLESSNESS_LEVEL, @@ -6,32 +27,14 @@ import { PATIENT_CATEGORIES, SHIFTING_VEHICLE_CHOICES, } from "@/common/constants"; -import { Cancel, Submit } from "@/components/Common/components/ButtonV2"; -import { useReducer, useState } from "react"; - -import { FacilitySelect } from "@/components/Common/FacilitySelect"; -import { FieldChangeEvent } from "../Form/FormFields/Utils"; -import { FieldLabel } from "../Form/FormFields/FormField"; -import PatientCategorySelect from "./PatientCategorySelect"; -import PhoneNumberFormField from "../Form/FormFields/PhoneNumberFormField"; -import TextAreaFormField from "../Form/FormFields/TextAreaFormField"; -import TextFormField from "../Form/FormFields/TextFormField"; -import { navigate } from "raviger"; -import { parsePhoneNumber } from "../../Utils/utils"; import { phonePreg } from "@/common/validation"; -import useAppHistory from "@/common/hooks/useAppHistory"; -import { useTranslation } from "react-i18next"; -import Page from "@/components/Common/components/Page"; -import Card from "../../CAREUI/display/Card"; -import CheckBoxFormField from "../Form/FormFields/CheckBoxFormField"; -import { SelectFormField } from "../Form/FormFields/SelectFormField"; -import { PhoneNumberValidator } from "../Form/FieldValidators"; -import useQuery from "../../Utils/request/useQuery"; -import routes from "../../Redux/api"; -import request from "../../Utils/request/request"; -import careConfig from "@careConfig"; -import Loading from "@/components/Common/Loading"; +import * as Notification from "@/Utils/Notifications"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import useQuery from "@/Utils/request/useQuery"; +import { parsePhoneNumber } from "@/Utils/utils"; + interface patientShiftProps { facilityId: string; patientId: string; diff --git a/src/components/Patient/UpdateStatusDialog.tsx b/src/components/Patient/UpdateStatusDialog.tsx index eb75722c7e4..9414ba9bb95 100644 --- a/src/components/Patient/UpdateStatusDialog.tsx +++ b/src/components/Patient/UpdateStatusDialog.tsx @@ -1,24 +1,31 @@ -import { useEffect, useState, useReducer } from "react"; +import { useEffect, useReducer, useState } from "react"; +import { useTranslation } from "react-i18next"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import { Submit } from "@/components/Common/ButtonV2"; +import ConfirmDialog from "@/components/Common/ConfirmDialog"; +import { LinearProgressWithLabel } from "@/components/Files/FileUpload"; +import CheckBoxFormField from "@/components/Form/FormFields/CheckBoxFormField"; +import { SelectFormField } from "@/components/Form/FormFields/SelectFormField"; +import TextFormField from "@/components/Form/FormFields/TextFormField"; +import { FieldChangeEvent } from "@/components/Form/FormFields/Utils"; +import { + CreateFileResponse, + SampleTestModel, +} from "@/components/Patient/models"; + import { - SAMPLE_TEST_STATUS, - SAMPLE_TEST_RESULT, - SAMPLE_FLOW_RULES, HEADER_CONTENT_TYPES, + SAMPLE_FLOW_RULES, + SAMPLE_TEST_RESULT, + SAMPLE_TEST_STATUS, } from "@/common/constants"; -import { CreateFileResponse, SampleTestModel } from "./models"; -import * as Notification from "../../Utils/Notifications"; -import { LinearProgressWithLabel } from "../Files/FileUpload"; -import { Submit } from "@/components/Common/components/ButtonV2"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import ConfirmDialog from "@/components/Common/ConfirmDialog"; -import { SelectFormField } from "../Form/FormFields/SelectFormField"; -import { FieldChangeEvent } from "../Form/FormFields/Utils"; -import TextFormField from "../Form/FormFields/TextFormField"; -import CheckBoxFormField from "../Form/FormFields/CheckBoxFormField"; -import { useTranslation } from "react-i18next"; -import request from "../../Utils/request/request"; -import routes from "../../Redux/api"; -import uploadFile from "../../Utils/request/uploadFile"; + +import * as Notification from "@/Utils/Notifications"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import uploadFile from "@/Utils/request/uploadFile"; interface Props { sample: SampleTestModel; diff --git a/src/components/Patient/Utils.ts b/src/components/Patient/Utils.ts index 96e05e63232..1f3be3162ef 100644 --- a/src/components/Patient/Utils.ts +++ b/src/components/Patient/Utils.ts @@ -1,4 +1,4 @@ -import { PatientModel } from "./models"; +import { PatientModel } from "@/components/Patient/models"; export function isPatientMandatoryDataFilled(patient: PatientModel) { return ( diff --git a/src/components/Patient/models.tsx b/src/components/Patient/models.tsx index b4f35c4dc9b..15063be4e9c 100644 --- a/src/components/Patient/models.tsx +++ b/src/components/Patient/models.tsx @@ -1,3 +1,9 @@ +import { + ConsultationModel, + PatientCategory, +} from "@/components/Facility/models"; +import { UserBareMinimum } from "@/components/Users/models"; + import { APPETITE_CHOICES, BLADDER_DRAINAGE_CHOICES, @@ -23,9 +29,6 @@ import { URINATION_FREQUENCY_CHOICES, VENTILATOR_MODE_OPTIONS, } from "@/common/constants"; -import { ConsultationModel, PatientCategory } from "../Facility/models"; - -import { UserBareMinimum } from "@/components/Users/models"; export interface FlowModel { id?: number; diff --git a/src/components/Resource/ResourceBadges.tsx b/src/components/Resource/ResourceBadges.tsx index f32a204e733..36d14d74252 100644 --- a/src/components/Resource/ResourceBadges.tsx +++ b/src/components/Resource/ResourceBadges.tsx @@ -1,6 +1,7 @@ import { SHIFTING_FILTER_ORDER } from "@/common/constants"; -import routes from "../../Redux/api"; -import useQuery from "../../Utils/request/useQuery"; + +import routes from "@/Utils/request/api"; +import useQuery from "@/Utils/request/useQuery"; export function useFacilityQuery(facilityId: string | undefined) { return useQuery(routes.getAnyFacility, { diff --git a/src/components/Resource/ResourceBlock.tsx b/src/components/Resource/ResourceBlock.tsx index df6fa14934f..10838566217 100644 --- a/src/components/Resource/ResourceBlock.tsx +++ b/src/components/Resource/ResourceBlock.tsx @@ -1,9 +1,12 @@ -import { useTranslation } from "react-i18next"; -import { ResourceModel } from "../Facility/models"; -import { classNames, formatDateTime, formatName } from "@/Utils/utils"; import dayjs from "dayjs"; -import CareIcon from "@/CAREUI/icons/CareIcon"; import { Link } from "raviger"; +import { useTranslation } from "react-i18next"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import { ResourceModel } from "@/components/Facility/models"; + +import { classNames, formatDateTime, formatName } from "@/Utils/utils"; export default function ResourceBlock(props: { resource: ResourceModel }) { const { resource } = props; diff --git a/src/components/Resource/ResourceBoard.tsx b/src/components/Resource/ResourceBoard.tsx index f69fd02b555..31743210f4e 100644 --- a/src/components/Resource/ResourceBoard.tsx +++ b/src/components/Resource/ResourceBoard.tsx @@ -1,24 +1,29 @@ -import { useState } from "react"; import { navigate } from "raviger"; -import ListFilter from "./ResourceFilter"; -import { RESOURCE_CHOICES } from "@/common/constants"; -import BadgesList from "./ResourceBadges"; -import { formatFilter } from "./ResourceCommons"; -import useFilters from "@/common/hooks/useFilters"; -import { ExportButton } from "@/components/Common/Export"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; -import { AdvancedFilterButton } from "../../CAREUI/interactive/FiltersSlideover"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import SearchInput from "../Form/SearchInput"; -import Tabs from "@/components/Common/components/Tabs"; -import request from "../../Utils/request/request"; -import routes from "../../Redux/api"; -import KanbanBoard from "../Kanban/Board"; -import { ResourceModel } from "../Facility/models"; +import CareIcon from "@/CAREUI/icons/CareIcon"; +import { AdvancedFilterButton } from "@/CAREUI/interactive/FiltersSlideover"; + +import ButtonV2 from "@/components/Common/ButtonV2"; +import { ExportButton } from "@/components/Common/Export"; import PageTitle from "@/components/Common/PageTitle"; -import ResourceBlock from "./ResourceBlock"; +import Tabs from "@/components/Common/Tabs"; +import { ResourceModel } from "@/components/Facility/models"; +import SearchInput from "@/components/Form/SearchInput"; +import KanbanBoard from "@/components/Kanban/Board"; +import BadgesList from "@/components/Resource/ResourceBadges"; +import ResourceBlock from "@/components/Resource/ResourceBlock"; +import { formatFilter } from "@/components/Resource/ResourceCommons"; +import ListFilter from "@/components/Resource/ResourceFilter"; + +import useFilters from "@/hooks/useFilters"; + +import { RESOURCE_CHOICES } from "@/common/constants"; + +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; + const resourceStatusOptions = RESOURCE_CHOICES.map((obj) => obj.text); const COMPLETED = ["COMPLETED", "REJECTED"]; diff --git a/src/components/Resource/ResourceCommentSection.tsx b/src/components/Resource/ResourceCommentSection.tsx index a2c10864b3b..d1c935cf109 100644 --- a/src/components/Resource/ResourceCommentSection.tsx +++ b/src/components/Resource/ResourceCommentSection.tsx @@ -1,13 +1,16 @@ import { useState } from "react"; -import * as Notification from "../../Utils/Notifications"; -import { formatDateTime, formatName } from "../../Utils/utils"; -import CircularProgress from "@/components/Common/components/CircularProgress"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import TextAreaFormField from "../Form/FormFields/TextAreaFormField"; -import routes from "../../Redux/api"; -import PaginatedList from "../../CAREUI/misc/PaginatedList"; -import request from "../../Utils/request/request"; -import { CommentModel } from "../Facility/models"; + +import PaginatedList from "@/CAREUI/misc/PaginatedList"; + +import ButtonV2 from "@/components/Common/ButtonV2"; +import CircularProgress from "@/components/Common/CircularProgress"; +import { CommentModel } from "@/components/Facility/models"; +import TextAreaFormField from "@/components/Form/FormFields/TextAreaFormField"; + +import * as Notification from "@/Utils/Notifications"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import { formatDateTime, formatName } from "@/Utils/utils"; const CommentSection = (props: { id: string }) => { const [commentBox, setCommentBox] = useState(""); diff --git a/src/components/Resource/ResourceCreate.tsx b/src/components/Resource/ResourceCreate.tsx index d7e9dcd7e45..078b2f84c0c 100644 --- a/src/components/Resource/ResourceCreate.tsx +++ b/src/components/Resource/ResourceCreate.tsx @@ -1,33 +1,37 @@ +import { navigate } from "raviger"; import { useReducer, useState } from "react"; +import { useTranslation } from "react-i18next"; + +import Card from "@/CAREUI/display/Card"; +import { Cancel, Submit } from "@/components/Common/ButtonV2"; import { FacilitySelect } from "@/components/Common/FacilitySelect"; -import * as Notification from "../../Utils/Notifications"; -import { navigate } from "raviger"; +import Loading from "@/components/Common/Loading"; +import Page from "@/components/Common/Page"; +import { PhoneNumberValidator } from "@/components/Form/FieldValidators"; +import { FieldLabel } from "@/components/Form/FormFields/FormField"; +import PhoneNumberFormField from "@/components/Form/FormFields/PhoneNumberFormField"; +import RadioFormField from "@/components/Form/FormFields/RadioFormField"; +import { SelectFormField } from "@/components/Form/FormFields/SelectFormField"; +import TextAreaFormField from "@/components/Form/FormFields/TextAreaFormField"; +import TextFormField from "@/components/Form/FormFields/TextFormField"; +import { FieldChangeEvent } from "@/components/Form/FormFields/Utils"; + +import useAppHistory from "@/hooks/useAppHistory"; + import { OptionsType, RESOURCE_CATEGORY_CHOICES, RESOURCE_SUBCATEGORIES, } from "@/common/constants"; -import { parsePhoneNumber } from "../../Utils/utils"; import { phonePreg } from "@/common/validation"; -import { Cancel, Submit } from "@/components/Common/components/ButtonV2"; -import PhoneNumberFormField from "../Form/FormFields/PhoneNumberFormField"; -import { FieldChangeEvent } from "../Form/FormFields/Utils"; -import useAppHistory from "@/common/hooks/useAppHistory"; -import { useTranslation } from "react-i18next"; -import TextFormField from "../Form/FormFields/TextFormField"; -import { SelectFormField } from "../Form/FormFields/SelectFormField"; -import TextAreaFormField from "../Form/FormFields/TextAreaFormField"; -import RadioFormField from "../Form/FormFields/RadioFormField"; -import { FieldLabel } from "../Form/FormFields/FormField"; -import Card from "../../CAREUI/display/Card"; -import Page from "@/components/Common/components/Page"; -import { PhoneNumberValidator } from "../Form/FieldValidators"; -import useQuery from "../../Utils/request/useQuery"; -import routes from "../../Redux/api"; -import request from "../../Utils/request/request"; -import Loading from "@/components/Common/Loading"; +import * as Notification from "@/Utils/Notifications"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import useQuery from "@/Utils/request/useQuery"; +import { parsePhoneNumber } from "@/Utils/utils"; + interface resourceProps { facilityId: number; } diff --git a/src/components/Resource/ResourceDetails.tsx b/src/components/Resource/ResourceDetails.tsx index f3c318102a6..2495c64433d 100644 --- a/src/components/Resource/ResourceDetails.tsx +++ b/src/components/Resource/ResourceDetails.tsx @@ -1,16 +1,20 @@ -import { useState } from "react"; -import { classNames, formatDateTime, formatName } from "../../Utils/utils"; import { navigate } from "raviger"; -import * as Notification from "../../Utils/Notifications"; -import CommentSection from "./ResourceCommentSection"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import Page from "@/components/Common/components/Page"; +import { useState } from "react"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import ButtonV2 from "@/components/Common/ButtonV2"; import ConfirmDialog from "@/components/Common/ConfirmDialog"; -import useQuery from "../../Utils/request/useQuery"; -import routes from "../../Redux/api"; -import request from "../../Utils/request/request"; -import CareIcon from "../../CAREUI/icons/CareIcon"; import Loading from "@/components/Common/Loading"; +import Page from "@/components/Common/Page"; +import CommentSection from "@/components/Resource/ResourceCommentSection"; + +import * as Notification from "@/Utils/Notifications"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import useQuery from "@/Utils/request/useQuery"; +import { classNames, formatDateTime, formatName } from "@/Utils/utils"; + export default function ResourceDetails(props: { id: string }) { const [isPrintMode, setIsPrintMode] = useState(false); const [openDeleteResourceDialog, setOpenDeleteResourceDialog] = diff --git a/src/components/Resource/ResourceDetailsUpdate.tsx b/src/components/Resource/ResourceDetailsUpdate.tsx index 7587ff7a83d..7e52471177d 100644 --- a/src/components/Resource/ResourceDetailsUpdate.tsx +++ b/src/components/Resource/ResourceDetailsUpdate.tsx @@ -1,24 +1,30 @@ -import * as Notification from "../../Utils/Notifications"; -import { useReducer, useState } from "react"; import { navigate, useQueryParams } from "raviger"; -import Card from "../../CAREUI/display/Card"; -import CircularProgress from "@/components/Common/components/CircularProgress"; +import { useReducer, useState } from "react"; + +import Card from "@/CAREUI/display/Card"; + +import CircularProgress from "@/components/Common/CircularProgress"; import { FacilitySelect } from "@/components/Common/FacilitySelect"; -import { FieldLabel } from "../Form/FormFields/FormField"; -import Page from "@/components/Common/components/Page"; +import Loading from "@/components/Common/Loading"; +import Page from "@/components/Common/Page"; +import RadioFormField from "@/components/Form/FormFields/RadioFormField"; +import { SelectFormField } from "@/components/Form/FormFields/SelectFormField"; +import TextAreaFormField from "@/components/Form/FormFields/TextAreaFormField"; +import TextFormField from "@/components/Form/FormFields/TextFormField"; + +import useAppHistory from "@/hooks/useAppHistory"; + import { RESOURCE_CHOICES } from "@/common/constants"; -import RadioFormField from "../Form/FormFields/RadioFormField"; -import { SelectFormField } from "../Form/FormFields/SelectFormField"; -import TextAreaFormField from "../Form/FormFields/TextAreaFormField"; -import TextFormField from "../Form/FormFields/TextFormField"; -import UserAutocomplete from "@/components/Common/UserAutocompleteFormField"; -import useAppHistory from "@/common/hooks/useAppHistory"; -import useQuery from "../../Utils/request/useQuery"; -import routes from "../../Redux/api"; -import request from "../../Utils/request/request"; -import Loading from "@/components/Common/Loading"; +import * as Notification from "@/Utils/Notifications"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import useQuery from "@/Utils/request/useQuery"; + +import UserAutocomplete from "../Common/UserAutocompleteFormField"; import Form from "../Form/Form"; +import { FieldLabel } from "../Form/FormFields/FormField"; + interface resourceProps { id: string; } diff --git a/src/components/Resource/ResourceFilter.tsx b/src/components/Resource/ResourceFilter.tsx index 6e9fb54a5e2..10649a0990c 100644 --- a/src/components/Resource/ResourceFilter.tsx +++ b/src/components/Resource/ResourceFilter.tsx @@ -1,18 +1,23 @@ +import dayjs from "dayjs"; + +import FiltersSlideover from "@/CAREUI/interactive/FiltersSlideover"; + +import CircularProgress from "@/components/Common/CircularProgress"; +import { DateRange } from "@/components/Common/DateRangeInputV2"; import { FacilitySelect } from "@/components/Common/FacilitySelect"; +import DateRangeFormField from "@/components/Form/FormFields/DateRangeFormField"; +import { FieldLabel } from "@/components/Form/FormFields/FormField"; +import { SelectFormField } from "@/components/Form/FormFields/SelectFormField"; +import { FieldChangeEvent } from "@/components/Form/FormFields/Utils"; + +import useMergeState from "@/hooks/useMergeState"; + import { RESOURCE_FILTER_ORDER } from "@/common/constants"; import { RESOURCE_CHOICES } from "@/common/constants"; -import useMergeState from "@/common/hooks/useMergeState"; -import FiltersSlideover from "../../CAREUI/interactive/FiltersSlideover"; -import { FieldLabel } from "../Form/FormFields/FormField"; -import CircularProgress from "@/components/Common/components/CircularProgress"; -import { FieldChangeEvent } from "../Form/FormFields/Utils"; -import { SelectFormField } from "../Form/FormFields/SelectFormField"; -import { DateRange } from "@/components/Common/DateRangeInputV2"; -import DateRangeFormField from "../Form/FormFields/DateRangeFormField"; -import dayjs from "dayjs"; -import { dateQueryString } from "../../Utils/utils"; -import useQuery from "../../Utils/request/useQuery"; -import routes from "../../Redux/api"; + +import routes from "@/Utils/request/api"; +import useQuery from "@/Utils/request/useQuery"; +import { dateQueryString } from "@/Utils/utils"; const getDate = (value: any) => value && dayjs(value).isValid() && dayjs(value).toDate(); diff --git a/src/components/Resource/ResourceList.tsx b/src/components/Resource/ResourceList.tsx index e7dffb1dfe2..8a12545d7d1 100644 --- a/src/components/Resource/ResourceList.tsx +++ b/src/components/Resource/ResourceList.tsx @@ -1,21 +1,26 @@ import { navigate } from "raviger"; -import ListFilter from "./ResourceFilter"; -import { formatFilter } from "./ResourceCommons"; -import BadgesList from "./ResourceBadges"; -import useFilters from "@/common/hooks/useFilters"; -import { ExportButton } from "@/components/Common/Export"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; import { useTranslation } from "react-i18next"; -import { AdvancedFilterButton } from "../../CAREUI/interactive/FiltersSlideover"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import useQuery from "../../Utils/request/useQuery"; -import routes from "../../Redux/api"; -import Page from "@/components/Common/components/Page"; -import SearchInput from "../Form/SearchInput"; -import request from "../../Utils/request/request"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import { AdvancedFilterButton } from "@/CAREUI/interactive/FiltersSlideover"; + +import ButtonV2 from "@/components/Common/ButtonV2"; +import { ExportButton } from "@/components/Common/Export"; import Loading from "@/components/Common/Loading"; -import { ResourceModel } from "../Facility/models"; -import ResourceBlock from "./ResourceBlock"; +import Page from "@/components/Common/Page"; +import { ResourceModel } from "@/components/Facility/models"; +import SearchInput from "@/components/Form/SearchInput"; +import BadgesList from "@/components/Resource/ResourceBadges"; +import ResourceBlock from "@/components/Resource/ResourceBlock"; +import { formatFilter } from "@/components/Resource/ResourceCommons"; +import ListFilter from "@/components/Resource/ResourceFilter"; + +import useFilters from "@/hooks/useFilters"; + +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import useQuery from "@/Utils/request/useQuery"; + export default function ListView() { const { qParams, diff --git a/src/components/Scribe/Scribe.tsx b/src/components/Scribe/Scribe.tsx index 6d9bbe7c812..3317baa04e9 100644 --- a/src/components/Scribe/Scribe.tsx +++ b/src/components/Scribe/Scribe.tsx @@ -1,14 +1,17 @@ -import React, { useState, useEffect, useRef } from "react"; import { Popover, PopoverButton, PopoverPanel } from "@headlessui/react"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import routes from "../../Redux/api"; -import * as Notify from "../../Utils/Notifications"; -import request from "../../Utils/request/request"; -import { UserModel } from "../Users/models"; -import useSegmentedRecording from "../../Utils/useSegmentedRecorder"; -import uploadFile from "../../Utils/request/uploadFile"; -import { useFeatureFlags } from "../../Utils/featureFlags"; +import React, { useEffect, useRef, useState } from "react"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import ButtonV2 from "@/components/Common/ButtonV2"; +import { UserModel } from "@/components/Users/models"; + +import * as Notify from "@/Utils/Notifications"; +import { useFeatureFlags } from "@/Utils/featureFlags"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import uploadFile from "@/Utils/request/uploadFile"; +import useSegmentedRecording from "@/Utils/useSegmentedRecorder"; interface FieldOption { id: string | number; diff --git a/src/components/Scribe/formDetails.ts b/src/components/Scribe/formDetails.ts index ca56ff1b176..9c31b6aedf0 100644 --- a/src/components/Scribe/formDetails.ts +++ b/src/components/Scribe/formDetails.ts @@ -1,3 +1,7 @@ +import { loadInvestigations } from "@/components/Common/prescription-builder/InvestigationBuilder"; +import { Field, ScribeForm } from "@/components/Scribe/Scribe"; +import { SYMPTOM_CHOICES } from "@/components/Symptoms/types"; + import { CONSCIOUSNESS_LEVEL, PATIENT_CATEGORIES, @@ -5,9 +9,6 @@ import { RHYTHM_CHOICES, TELEMEDICINE_ACTIONS, } from "@/common/constants"; -import { loadInvestigations } from "@/components/Common/prescription-builder/InvestigationBuilder"; -import { SYMPTOM_CHOICES } from "../Symptoms/types"; -import { Field, ScribeForm } from "./Scribe"; const DAILY_ROUND_FORM_SCRIBE_DATA: Field[] = [ { diff --git a/src/components/Shifting/ShiftDetails.tsx b/src/components/Shifting/ShiftDetails.tsx index 77250f71e17..d5b251eeb8d 100644 --- a/src/components/Shifting/ShiftDetails.tsx +++ b/src/components/Shifting/ShiftDetails.tsx @@ -1,35 +1,33 @@ -import * as Notification from "../../Utils/Notifications"; +import careConfig from "@careConfig"; +import QRCode from "qrcode.react"; +import { Link, navigate } from "raviger"; +import { useState } from "react"; +import { CopyToClipboard } from "react-copy-to-clipboard"; +import { useTranslation } from "react-i18next"; + +import RecordMeta from "@/CAREUI/display/RecordMeta"; +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import ButtonV2 from "@/components/Common/ButtonV2"; +import ConfirmDialog from "@/components/Common/ConfirmDialog"; +import Loading from "@/components/Common/Loading"; +import Page from "@/components/Common/Page"; +import { ConsultationModel } from "@/components/Facility/models"; +import { PatientModel } from "@/components/Patient/models"; +import CommentSection from "@/components/Shifting/ShiftingCommentsSection"; import { GENDER_TYPES, SHIFTING_CHOICES_PEACETIME, SHIFTING_CHOICES_WARTIME, } from "@/common/constants"; -import { Link, navigate } from "raviger"; -import { useState } from "react"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import CommentSection from "./ShiftingCommentsSection"; -import ConfirmDialog from "@/components/Common/ConfirmDialog"; -import { CopyToClipboard } from "react-copy-to-clipboard"; -import Page from "@/components/Common/components/Page"; -import QRCode from "qrcode.react"; -import RecordMeta from "../../CAREUI/display/RecordMeta"; -import { - formatDateTime, - formatName, - formatPatientAge, -} from "../../Utils/utils"; -import { useTranslation } from "react-i18next"; -import useQuery from "../../Utils/request/useQuery"; -import routes from "../../Redux/api"; -import request from "../../Utils/request/request"; -import { ConsultationModel } from "../Facility/models"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import { PatientModel } from "../Patient/models"; -import careConfig from "@careConfig"; +import * as Notification from "@/Utils/Notifications"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import useQuery from "@/Utils/request/useQuery"; +import { formatDateTime, formatName, formatPatientAge } from "@/Utils/utils"; -import Loading from "@/components/Common/Loading"; export default function ShiftDetails(props: { id: string }) { const [isPrintMode, setIsPrintMode] = useState(false); const [isCopied, setIsCopied] = useState(false); diff --git a/src/components/Shifting/ShiftDetailsUpdate.tsx b/src/components/Shifting/ShiftDetailsUpdate.tsx index 129d937a592..ecd21543394 100644 --- a/src/components/Shifting/ShiftDetailsUpdate.tsx +++ b/src/components/Shifting/ShiftDetailsUpdate.tsx @@ -1,4 +1,14 @@ -import * as Notification from "../../Utils/Notifications"; +import careConfig from "@careConfig"; +import { navigate, useQueryParams } from "raviger"; +import { useReducer, useState } from "react"; +import { useTranslation } from "react-i18next"; + +import { FacilitySelect } from "@/components/Common/FacilitySelect"; +import Loading from "@/components/Common/Loading"; +import { LinkedFacilityUsers } from "@/components/Common/UserAutocompleteFormField"; + +import useAppHistory from "@/hooks/useAppHistory"; +import useAuthUser from "@/hooks/useAuthUser"; import { BREATHLESSNESS_LEVEL, @@ -10,34 +20,28 @@ import { SHIFTING_VEHICLE_CHOICES, USER_TYPES, } from "@/common/constants"; -import { navigate, useQueryParams } from "raviger"; -import { useReducer, useState } from "react"; -import { ConsultationModel, ShiftingModel } from "../Facility/models"; + +import * as Notification from "@/Utils/Notifications"; +import routes from "@/Utils/request/api"; + +import Card from "../../CAREUI/display/Card"; +import request from "../../Utils/request/request"; +import useQuery from "../../Utils/request/useQuery"; +import { parsePhoneNumber } from "../../Utils/utils"; +import CircularProgress from "../Common/CircularProgress"; +import Page from "../Common/Page"; import DischargeModal from "../Facility/DischargeModal"; -import { FacilitySelect } from "@/components/Common/FacilitySelect"; +import { ConsultationModel, ShiftingModel } from "../Facility/models"; +import Form from "../Form/Form"; import { FieldLabel } from "../Form/FormFields/FormField"; -import PatientCategorySelect from "../Patient/PatientCategorySelect"; import PhoneNumberFormField from "../Form/FormFields/PhoneNumberFormField"; +import RadioFormField from "../Form/FormFields/RadioFormField"; import { SelectFormField } from "../Form/FormFields/SelectFormField"; import TextAreaFormField from "../Form/FormFields/TextAreaFormField"; import TextFormField from "../Form/FormFields/TextFormField"; -import { parsePhoneNumber } from "../../Utils/utils"; -import useAppHistory from "@/common/hooks/useAppHistory"; -import { useTranslation } from "react-i18next"; -import CircularProgress from "@/components/Common/components/CircularProgress"; -import Card from "../../CAREUI/display/Card"; -import RadioFormField from "../Form/FormFields/RadioFormField"; -import Page from "@/components/Common/components/Page"; -import { LinkedFacilityUsers } from "@/components/Common/UserAutocompleteFormField"; -import useQuery from "../../Utils/request/useQuery"; -import routes from "../../Redux/api"; -import request from "../../Utils/request/request"; +import PatientCategorySelect from "../Patient/PatientCategorySelect"; import { PatientModel } from "../Patient/models"; -import useAuthUser from "@/common/hooks/useAuthUser"; -import careConfig from "@careConfig"; -import Loading from "@/components/Common/Loading"; -import Form from "../Form/Form"; interface patientShiftProps { id: string; } diff --git a/src/components/Shifting/ShiftingBadges.tsx b/src/components/Shifting/ShiftingBadges.tsx index adc3bcd7752..396935a68c1 100644 --- a/src/components/Shifting/ShiftingBadges.tsx +++ b/src/components/Shifting/ShiftingBadges.tsx @@ -1,9 +1,13 @@ -import { SHIFTING_FILTER_ORDER } from "@/common/constants"; -import { useFacilityQuery } from "../Resource/ResourceBadges"; import { useTranslation } from "react-i18next"; -import useQuery from "../../Utils/request/useQuery"; -import routes from "../../Redux/api"; -import { formatName } from "../../Utils/utils"; + +import { useFacilityQuery } from "@/components/Resource/ResourceBadges"; + +import { SHIFTING_FILTER_ORDER } from "@/common/constants"; + +import routes from "@/Utils/request/api"; +import useQuery from "@/Utils/request/useQuery"; +import { formatName } from "@/Utils/utils"; + export default function BadgesList(props: any) { const { qParams, FilterBadges } = props; diff --git a/src/components/Shifting/ShiftingBlock.tsx b/src/components/Shifting/ShiftingBlock.tsx index 20cd431d9f6..09bbcfb3b9f 100644 --- a/src/components/Shifting/ShiftingBlock.tsx +++ b/src/components/Shifting/ShiftingBlock.tsx @@ -1,11 +1,15 @@ -import { useTranslation } from "react-i18next"; -import { ShiftingModel } from "../Facility/models"; import careConfig from "@careConfig"; -import { classNames, formatDateTime, formatName } from "@/Utils/utils"; import dayjs from "dayjs"; -import CareIcon from "@/CAREUI/icons/CareIcon"; import { Link } from "raviger"; -import useAuthUser from "@/common/hooks/useAuthUser"; +import { useTranslation } from "react-i18next"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import { ShiftingModel } from "@/components/Facility/models"; + +import useAuthUser from "@/hooks/useAuthUser"; + +import { classNames, formatDateTime, formatName } from "@/Utils/utils"; export default function ShiftingBlock(props: { shift: ShiftingModel; diff --git a/src/components/Shifting/ShiftingBoard.tsx b/src/components/Shifting/ShiftingBoard.tsx index ee65090191a..6f3d490ccaf 100644 --- a/src/components/Shifting/ShiftingBoard.tsx +++ b/src/components/Shifting/ShiftingBoard.tsx @@ -1,31 +1,33 @@ -import { - SHIFTING_CHOICES_PEACETIME, - SHIFTING_CHOICES_WARTIME, -} from "@/common/constants"; - -import BadgesList from "./ShiftingBadges"; -import { ExportButton } from "@/components/Common/Export"; -import ListFilter from "./ShiftingFilters"; -import SearchInput from "../Form/SearchInput"; -import { formatFilter } from "./ShiftingCommons"; - +import careConfig from "@careConfig"; import { navigate } from "raviger"; -import useFilters from "@/common/hooks/useFilters"; import { useState } from "react"; import { useTranslation } from "react-i18next"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import { AdvancedFilterButton } from "../../CAREUI/interactive/FiltersSlideover"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import Tabs from "@/components/Common/components/Tabs"; -import careConfig from "@careConfig"; -import KanbanBoard from "../Kanban/Board"; +import CareIcon from "@/CAREUI/icons/CareIcon"; +import { AdvancedFilterButton } from "@/CAREUI/interactive/FiltersSlideover"; + +import ButtonV2 from "@/components/Common/ButtonV2"; import ConfirmDialog from "@/components/Common/ConfirmDialog"; -import { ShiftingModel } from "../Facility/models"; -import request from "../../Utils/request/request"; -import routes from "../../Redux/api"; +import { ExportButton } from "@/components/Common/Export"; import PageTitle from "@/components/Common/PageTitle"; -import ShiftingBlock from "./ShiftingBlock"; +import Tabs from "@/components/Common/Tabs"; +import { ShiftingModel } from "@/components/Facility/models"; +import SearchInput from "@/components/Form/SearchInput"; +import KanbanBoard from "@/components/Kanban/Board"; +import BadgesList from "@/components/Shifting/ShiftingBadges"; +import ShiftingBlock from "@/components/Shifting/ShiftingBlock"; +import { formatFilter } from "@/components/Shifting/ShiftingCommons"; +import ListFilter from "@/components/Shifting/ShiftingFilters"; + +import useFilters from "@/hooks/useFilters"; + +import { + SHIFTING_CHOICES_PEACETIME, + SHIFTING_CHOICES_WARTIME, +} from "@/common/constants"; + +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; export default function BoardView() { const { qParams, updateQuery, FilterBadges, advancedFilter } = useFilters({ diff --git a/src/components/Shifting/ShiftingCommentsSection.tsx b/src/components/Shifting/ShiftingCommentsSection.tsx index 9453052d2d9..f406316d758 100644 --- a/src/components/Shifting/ShiftingCommentsSection.tsx +++ b/src/components/Shifting/ShiftingCommentsSection.tsx @@ -1,13 +1,16 @@ import { useState } from "react"; -import CircularProgress from "@/components/Common/components/CircularProgress"; -import * as Notification from "../../Utils/Notifications"; -import { formatDateTime, formatName } from "../../Utils/utils"; import { useTranslation } from "react-i18next"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import routes from "../../Redux/api"; -import PaginatedList from "../../CAREUI/misc/PaginatedList"; -import request from "../../Utils/request/request"; -import { CommentModel } from "../Facility/models"; + +import PaginatedList from "@/CAREUI/misc/PaginatedList"; + +import ButtonV2 from "@/components/Common/ButtonV2"; +import CircularProgress from "@/components/Common/CircularProgress"; +import { CommentModel } from "@/components/Facility/models"; + +import * as Notification from "@/Utils/Notifications"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import { formatDateTime, formatName } from "@/Utils/utils"; interface CommentSectionProps { id: string; diff --git a/src/components/Shifting/ShiftingFilters.tsx b/src/components/Shifting/ShiftingFilters.tsx index 8d447acddca..f73f42d5710 100644 --- a/src/components/Shifting/ShiftingFilters.tsx +++ b/src/components/Shifting/ShiftingFilters.tsx @@ -1,31 +1,33 @@ +import careConfig from "@careConfig"; +import dayjs from "dayjs"; +import { useTranslation } from "react-i18next"; + +import FiltersSlideover from "@/CAREUI/interactive/FiltersSlideover"; + +import CircularProgress from "@/components/Common/CircularProgress"; +import { DateRange } from "@/components/Common/DateRangeInputV2"; +import { FacilitySelect } from "@/components/Common/FacilitySelect"; +import UserAutocomplete from "@/components/Common/UserAutocompleteFormField"; +import DateRangeFormField from "@/components/Form/FormFields/DateRangeFormField"; +import { FieldLabel } from "@/components/Form/FormFields/FormField"; +import PhoneNumberFormField from "@/components/Form/FormFields/PhoneNumberFormField"; +import { SelectFormField } from "@/components/Form/FormFields/SelectFormField"; +import { FieldChangeEvent } from "@/components/Form/FormFields/Utils"; + +import useMergeState from "@/hooks/useMergeState"; + import { BREATHLESSNESS_LEVEL, SHIFTING_FILTER_ORDER, } from "@/common/constants"; -import { DateRange } from "@/components/Common/DateRangeInputV2"; - import { SHIFTING_CHOICES_PEACETIME, SHIFTING_CHOICES_WARTIME, } from "@/common/constants"; -import CircularProgress from "@/components/Common/components/CircularProgress"; -import { FacilitySelect } from "@/components/Common/FacilitySelect"; -import { FieldChangeEvent } from "../Form/FormFields/Utils"; -import { FieldLabel } from "../Form/FormFields/FormField"; -import DateRangeFormField from "../Form/FormFields/DateRangeFormField"; -import FiltersSlideover from "../../CAREUI/interactive/FiltersSlideover"; -import { SelectFormField } from "../Form/FormFields/SelectFormField"; -import PhoneNumberFormField from "../Form/FormFields/PhoneNumberFormField"; - -import useMergeState from "@/common/hooks/useMergeState"; -import { useTranslation } from "react-i18next"; -import UserAutocomplete from "@/components/Common/UserAutocompleteFormField"; -import { dateQueryString, parsePhoneNumber } from "../../Utils/utils"; -import dayjs from "dayjs"; -import useQuery from "../../Utils/request/useQuery"; -import routes from "../../Redux/api"; -import careConfig from "@careConfig"; +import routes from "@/Utils/request/api"; +import useQuery from "@/Utils/request/useQuery"; +import { dateQueryString, parsePhoneNumber } from "@/Utils/utils"; const getDate = (value: any) => value && dayjs(value).isValid() && dayjs(value).toDate(); diff --git a/src/components/Shifting/ShiftingList.tsx b/src/components/Shifting/ShiftingList.tsx index fda6d6fcaa6..3af77809d7c 100644 --- a/src/components/Shifting/ShiftingList.tsx +++ b/src/components/Shifting/ShiftingList.tsx @@ -1,23 +1,27 @@ +import { navigate } from "raviger"; import { useState } from "react"; -import BadgesList from "./ShiftingBadges"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; +import { useTranslation } from "react-i18next"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; +import { AdvancedFilterButton } from "@/CAREUI/interactive/FiltersSlideover"; + +import ButtonV2 from "@/components/Common/ButtonV2"; import ConfirmDialog from "@/components/Common/ConfirmDialog"; import { ExportButton } from "@/components/Common/Export"; -import ListFilter from "./ShiftingFilters"; -import Page from "@/components/Common/components/Page"; -import SearchInput from "../Form/SearchInput"; -import { formatFilter } from "./ShiftingCommons"; -import { navigate } from "raviger"; -import useFilters from "@/common/hooks/useFilters"; -import { useTranslation } from "react-i18next"; -import { AdvancedFilterButton } from "../../CAREUI/interactive/FiltersSlideover"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import request from "../../Utils/request/request"; -import routes from "../../Redux/api"; -import useQuery from "../../Utils/request/useQuery"; import Loading from "@/components/Common/Loading"; -import { ShiftingModel } from "../Facility/models"; -import ShiftingBlock from "./ShiftingBlock"; +import Page from "@/components/Common/Page"; +import { ShiftingModel } from "@/components/Facility/models"; +import SearchInput from "@/components/Form/SearchInput"; +import BadgesList from "@/components/Shifting/ShiftingBadges"; +import ShiftingBlock from "@/components/Shifting/ShiftingBlock"; +import { formatFilter } from "@/components/Shifting/ShiftingCommons"; +import ListFilter from "@/components/Shifting/ShiftingFilters"; + +import useFilters from "@/hooks/useFilters"; + +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import useQuery from "@/Utils/request/useQuery"; export default function ListView() { const { diff --git a/src/components/Symptoms/SymptomsBuilder.tsx b/src/components/Symptoms/SymptomsBuilder.tsx index 3676e2ad607..3a87d418a61 100644 --- a/src/components/Symptoms/SymptomsBuilder.tsx +++ b/src/components/Symptoms/SymptomsBuilder.tsx @@ -1,23 +1,27 @@ import { useState } from "react"; -import { Writable } from "../../Utils/types"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import ButtonV2 from "@/components/Common/ButtonV2"; +import AutocompleteMultiSelectFormField from "@/components/Form/FormFields/AutocompleteMultiselect"; +import DateFormField from "@/components/Form/FormFields/DateFormField"; +import TextAreaFormField from "@/components/Form/FormFields/TextAreaFormField"; +import { FieldChangeEvent } from "@/components/Form/FormFields/Utils"; +import SymptomsApi from "@/components/Symptoms/api"; import { EncounterSymptom, OTHER_SYMPTOM_CHOICE, SYMPTOM_CHOICES, -} from "./types"; -import AutocompleteMultiSelectFormField from "../Form/FormFields/AutocompleteMultiselect"; -import DateFormField from "../Form/FormFields/DateFormField"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import TextAreaFormField from "../Form/FormFields/TextAreaFormField"; -import { classNames, dateQueryString } from "../../Utils/utils"; -import { FieldChangeEvent } from "../Form/FormFields/Utils"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import useSlug from "@/common/hooks/useSlug"; -import useQuery from "../../Utils/request/useQuery"; -import SymptomsApi from "./api"; -import request from "../../Utils/request/request"; -import { Success } from "../../Utils/Notifications"; -import { sortByOnsetDate } from "./utils"; +} from "@/components/Symptoms/types"; +import { sortByOnsetDate } from "@/components/Symptoms/utils"; + +import useSlug from "@/hooks/useSlug"; + +import { Success } from "@/Utils/Notifications"; +import request from "@/Utils/request/request"; +import useQuery from "@/Utils/request/useQuery"; +import { Writable } from "@/Utils/types"; +import { classNames, dateQueryString } from "@/Utils/utils"; export const CreateSymptomsBuilder = (props: { value: Writable[]; diff --git a/src/components/Symptoms/SymptomsCard.tsx b/src/components/Symptoms/SymptomsCard.tsx index bbce57dfbbf..2f3287a67e3 100644 --- a/src/components/Symptoms/SymptomsCard.tsx +++ b/src/components/Symptoms/SymptomsCard.tsx @@ -1,11 +1,14 @@ -import RecordMeta from "../../CAREUI/display/RecordMeta"; -import useSlug from "@/common/hooks/useSlug"; -import useQuery from "../../Utils/request/useQuery"; -import { SymptomText } from "./SymptomsBuilder"; -import SymptomsApi from "./api"; -import { type EncounterSymptom } from "./types"; -import { groupAndSortSymptoms } from "./utils"; -import CareIcon from "../../CAREUI/icons/CareIcon"; +import RecordMeta from "@/CAREUI/display/RecordMeta"; +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import { SymptomText } from "@/components/Symptoms/SymptomsBuilder"; +import SymptomsApi from "@/components/Symptoms/api"; +import { type EncounterSymptom } from "@/components/Symptoms/types"; +import { groupAndSortSymptoms } from "@/components/Symptoms/utils"; + +import useSlug from "@/hooks/useSlug"; + +import useQuery from "@/Utils/request/useQuery"; // TODO: switch to list from events as timeline view instead once filter event by event type name is done const EncounterSymptomsCard = () => { diff --git a/src/components/Symptoms/api.ts b/src/components/Symptoms/api.ts index 1cce062cb1e..550b7f96e18 100644 --- a/src/components/Symptoms/api.ts +++ b/src/components/Symptoms/api.ts @@ -1,7 +1,8 @@ -import { Type } from "../../Redux/api"; -import { PaginatedResponse } from "../../Utils/request/types"; -import { WritableOnly } from "../../Utils/types"; -import { EncounterSymptom } from "./types"; +import { EncounterSymptom } from "@/components/Symptoms/types"; + +import { Type } from "@/Utils/request/api"; +import { PaginatedResponse } from "@/Utils/request/types"; +import { WritableOnly } from "@/Utils/types"; const SymptomsApi = { list: { diff --git a/src/components/Symptoms/types.ts b/src/components/Symptoms/types.ts index 78e769ce9a9..aae031b1044 100644 --- a/src/components/Symptoms/types.ts +++ b/src/components/Symptoms/types.ts @@ -1,4 +1,4 @@ -import { BaseModel } from "../../Utils/types"; +import { BaseModel } from "@/Utils/types"; export const OTHER_SYMPTOM_CHOICE = { id: 9, text: "Other Symptom" } as const; diff --git a/src/components/Symptoms/utils.ts b/src/components/Symptoms/utils.ts index 997acfc914b..28ddfd213dd 100644 --- a/src/components/Symptoms/utils.ts +++ b/src/components/Symptoms/utils.ts @@ -1,6 +1,7 @@ -import { Writable } from "../../Utils/types"; -import { compareByDateString } from "../../Utils/utils"; -import { EncounterSymptom } from "./types"; +import { EncounterSymptom } from "@/components/Symptoms/types"; + +import { Writable } from "@/Utils/types"; +import { compareByDateString } from "@/Utils/utils"; // TODO: switch to using Object.groupBy(...) instead once upgraded to node v22 export const groupAndSortSymptoms = < diff --git a/src/components/Users/ConfirmHomeFacilityUpdateDialog.tsx b/src/components/Users/ConfirmHomeFacilityUpdateDialog.tsx index d31c281fb4e..429e7370366 100644 --- a/src/components/Users/ConfirmHomeFacilityUpdateDialog.tsx +++ b/src/components/Users/ConfirmHomeFacilityUpdateDialog.tsx @@ -1,4 +1,5 @@ import { useState } from "react"; + import ConfirmDialog from "@/components/Common/ConfirmDialog"; interface ConfirmDialogProps { diff --git a/src/components/Users/LinkFacilityDialog.tsx b/src/components/Users/LinkFacilityDialog.tsx index 73cce761e12..523965803b2 100644 --- a/src/components/Users/LinkFacilityDialog.tsx +++ b/src/components/Users/LinkFacilityDialog.tsx @@ -1,7 +1,8 @@ import { useState } from "react"; -import { FacilitySelect } from "@/components/Common/FacilitySelect"; -import { FacilityModel } from "../Facility/models"; + import ConfirmDialog from "@/components/Common/ConfirmDialog"; +import { FacilitySelect } from "@/components/Common/FacilitySelect"; +import { FacilityModel } from "@/components/Facility/models"; interface Props { username: string; diff --git a/src/components/Users/ManageUsers.tsx b/src/components/Users/ManageUsers.tsx index 6860a52f236..93eeda6be9a 100644 --- a/src/components/Users/ManageUsers.tsx +++ b/src/components/Users/ManageUsers.tsx @@ -2,43 +2,49 @@ import dayjs from "dayjs"; import { navigate } from "raviger"; import { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; -import CountBlock from "../../CAREUI/display/Count"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import { AdvancedFilterButton } from "../../CAREUI/interactive/FiltersSlideover"; -import SlideOverCustom from "../../CAREUI/interactive/SlideOver"; + +import CountBlock from "@/CAREUI/display/Count"; +import CareIcon from "@/CAREUI/icons/CareIcon"; +import { AdvancedFilterButton } from "@/CAREUI/interactive/FiltersSlideover"; +import SlideOverCustom from "@/CAREUI/interactive/SlideOver"; + +import { Avatar } from "@/components/Common/Avatar"; +import ButtonV2, { Submit } from "@/components/Common/ButtonV2"; +import CircularProgress from "@/components/Common/CircularProgress"; +import { FacilitySelect } from "@/components/Common/FacilitySelect"; +import Loading from "@/components/Common/Loading"; +import Page from "@/components/Common/Page"; +import Pagination from "@/components/Common/Pagination"; +import UserDetails from "@/components/Common/UserDetails"; +import UserDetailComponent from "@/components/Common/UserDetailsComponet"; +import { FacilityModel } from "@/components/Facility/models"; +import TextFormField from "@/components/Form/FormFields/TextFormField"; +import SearchInput from "@/components/Form/SearchInput"; +import ConfirmHomeFacilityUpdateDialog from "@/components/Users/ConfirmHomeFacilityUpdateDialog"; +import SkillsSlideOver from "@/components/Users/SkillsSlideOver"; +import UnlinkFacilityDialog from "@/components/Users/UnlinkFacilityDialog"; +import UserDeleteDialog from "@/components/Users/UserDeleteDialog"; +import UserFilter from "@/components/Users/UserFilter"; + +import useAuthUser from "@/hooks/useAuthUser"; +import useFilters from "@/hooks/useFilters"; +import useWindowDimensions from "@/hooks/useWindowDimensions"; + import { USER_TYPES } from "@/common/constants"; -import useAuthUser from "@/common/hooks/useAuthUser"; -import useFilters from "@/common/hooks/useFilters"; -import useWindowDimensions from "@/common/hooks/useWindowDimensions"; -import routes from "../../Redux/api"; -import * as Notification from "../../Utils/Notifications"; -import request from "../../Utils/request/request"; -import useQuery from "../../Utils/request/useQuery"; + +import * as Notification from "@/Utils/Notifications"; +import { showUserDelete } from "@/Utils/permissions"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import useQuery from "@/Utils/request/useQuery"; import { classNames, formatDisplayName, formatName, isUserOnline, relativeTime, -} from "../../Utils/utils"; -import { FacilitySelect } from "@/components/Common/FacilitySelect"; -import Pagination from "@/components/Common/Pagination"; -import UserDetails from "@/components/Common/UserDetails"; -import UserDetailComponent from "@/components/Common/UserDetailsComponet"; -import ButtonV2, { Submit } from "@/components/Common/components/ButtonV2"; -import CircularProgress from "@/components/Common/components/CircularProgress"; -import Page from "@/components/Common/components/Page"; -import { FacilityModel } from "../Facility/models"; -import TextFormField from "../Form/FormFields/TextFormField"; -import SearchInput from "../Form/SearchInput"; -import ConfirmHomeFacilityUpdateDialog from "./ConfirmHomeFacilityUpdateDialog"; -import SkillsSlideOver from "./SkillsSlideOver"; -import UnlinkFacilityDialog from "./UnlinkFacilityDialog"; -import UserDeleteDialog from "./UserDeleteDialog"; -import UserFilter from "./UserFilter"; -import { showUserDelete } from "../../Utils/permissions"; -import { Avatar } from "../Common/Avatar"; -import Loading from "@/components/Common/Loading"; +} from "@/Utils/utils"; + export default function ManageUsers() { const { t } = useTranslation(); const { width } = useWindowDimensions(); diff --git a/src/components/Users/SkillsSlideOver.tsx b/src/components/Users/SkillsSlideOver.tsx index 40f9a29e905..57e1c8359bb 100644 --- a/src/components/Users/SkillsSlideOver.tsx +++ b/src/components/Users/SkillsSlideOver.tsx @@ -1,18 +1,25 @@ import { useCallback, useState } from "react"; -import SlideOverCustom from "../../CAREUI/interactive/SlideOver"; -import { SkillModel, SkillObjectModel } from "./models"; -import { SkillSelect } from "@/components/Common/SkillSelect"; -import UnlinkSkillDialog from "./UnlinkSkillDialog"; -import * as Notification from "../../Utils/Notifications"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import AuthorizeFor from "../../Utils/AuthorizeFor"; -import { useIsAuthorized } from "@/common/hooks/useIsAuthorized"; -import { AddSkillsPlaceholder, SkillsArray } from "./SkillsSlideOverComponents"; import { useTranslation } from "react-i18next"; -import CircularProgress from "@/components/Common/components/CircularProgress"; -import useQuery from "../../Utils/request/useQuery"; -import request from "../../Utils/request/request"; -import routes from "../../Redux/api"; + +import SlideOverCustom from "@/CAREUI/interactive/SlideOver"; + +import ButtonV2 from "@/components/Common/ButtonV2"; +import CircularProgress from "@/components/Common/CircularProgress"; +import { SkillSelect } from "@/components/Common/SkillSelect"; +import { + AddSkillsPlaceholder, + SkillsArray, +} from "@/components/Users/SkillsSlideOverComponents"; +import UnlinkSkillDialog from "@/components/Users/UnlinkSkillDialog"; +import { SkillModel, SkillObjectModel } from "@/components/Users/models"; + +import { useIsAuthorized } from "@/hooks/useIsAuthorized"; + +import AuthorizeFor from "@/Utils/AuthorizeFor"; +import * as Notification from "@/Utils/Notifications"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import useQuery from "@/Utils/request/useQuery"; interface IProps { username: string; diff --git a/src/components/Users/SkillsSlideOverComponents.tsx b/src/components/Users/SkillsSlideOverComponents.tsx index 0593718588e..bb91d4cbfd3 100644 --- a/src/components/Users/SkillsSlideOverComponents.tsx +++ b/src/components/Users/SkillsSlideOverComponents.tsx @@ -1,9 +1,12 @@ -import { useTranslation } from "react-i18next"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import { classNames } from "../../Utils/utils"; -import ButtonV2 from "@/components/Common/components/ButtonV2"; -import { SkillModel } from "./models"; import { Fragment } from "react"; +import { useTranslation } from "react-i18next"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import ButtonV2 from "@/components/Common/ButtonV2"; +import { SkillModel } from "@/components/Users/models"; + +import { classNames } from "@/Utils/utils"; export const AddSkillsPlaceholder = () => { const { t } = useTranslation(); diff --git a/src/components/Users/UnlinkFacilityDialog.tsx b/src/components/Users/UnlinkFacilityDialog.tsx index d496870e567..ff729150fbf 100644 --- a/src/components/Users/UnlinkFacilityDialog.tsx +++ b/src/components/Users/UnlinkFacilityDialog.tsx @@ -1,4 +1,5 @@ import { useState } from "react"; + import ConfirmDialog from "@/components/Common/ConfirmDialog"; interface ConfirmDialogProps { diff --git a/src/components/Users/UnlinkSkillDialog.tsx b/src/components/Users/UnlinkSkillDialog.tsx index f93e3d45045..c52e72b30ca 100644 --- a/src/components/Users/UnlinkSkillDialog.tsx +++ b/src/components/Users/UnlinkSkillDialog.tsx @@ -1,4 +1,5 @@ import { useState } from "react"; + import ConfirmDialog from "@/components/Common/ConfirmDialog"; interface Props { diff --git a/src/components/Users/UserAdd.tsx b/src/components/Users/UserAdd.tsx index 0059f87390b..43a2d16567b 100644 --- a/src/components/Users/UserAdd.tsx +++ b/src/components/Users/UserAdd.tsx @@ -1,5 +1,28 @@ import { Link, navigate } from "raviger"; import { useEffect, useState } from "react"; +import { useTranslation } from "react-i18next"; + +import Card from "@/CAREUI/display/Card"; +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import { Cancel, Submit } from "@/components/Common/ButtonV2"; +import CircularProgress from "@/components/Common/CircularProgress"; +import { FacilitySelect } from "@/components/Common/FacilitySelect"; +import Loading from "@/components/Common/Loading"; +import Page from "@/components/Common/Page"; +import { FacilityModel } from "@/components/Facility/models"; +import { PhoneNumberValidator } from "@/components/Form/FieldValidators"; +import CheckBoxFormField from "@/components/Form/FormFields/CheckBoxFormField"; +import DateFormField from "@/components/Form/FormFields/DateFormField"; +import { FieldLabel } from "@/components/Form/FormFields/FormField"; +import PhoneNumberFormField from "@/components/Form/FormFields/PhoneNumberFormField"; +import { SelectFormField } from "@/components/Form/FormFields/SelectFormField"; +import TextFormField from "@/components/Form/FormFields/TextFormField"; +import { FieldChangeEvent } from "@/components/Form/FormFields/Utils"; + +import useAppHistory from "@/hooks/useAppHistory"; +import useAuthUser from "@/hooks/useAuthUser"; + import { GENDER_TYPES, USER_TYPES, @@ -12,38 +35,20 @@ import { validatePassword, validateUsername, } from "@/common/validation"; -import * as Notification from "../../Utils/Notifications"; -import { FacilitySelect } from "@/components/Common/FacilitySelect"; -import { FacilityModel } from "../Facility/models"; + +import { DraftSection, useAutoSaveReducer } from "@/Utils/AutoSave"; +import * as Notification from "@/Utils/Notifications"; +import dayjs from "@/Utils/dayjs"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import useQuery from "@/Utils/request/useQuery"; import { classNames, dateQueryString, parsePhoneNumber, scrollTo, -} from "../../Utils/utils"; -import { Cancel, Submit } from "@/components/Common/components/ButtonV2"; -import PhoneNumberFormField from "../Form/FormFields/PhoneNumberFormField"; -import TextFormField from "../Form/FormFields/TextFormField"; -import { FieldChangeEvent } from "../Form/FormFields/Utils"; -import { SelectFormField } from "../Form/FormFields/SelectFormField"; -import DateFormField from "../Form/FormFields/DateFormField"; -import { FieldLabel } from "../Form/FormFields/FormField"; -import useAppHistory from "@/common/hooks/useAppHistory"; -import Page from "@/components/Common/components/Page"; -import Card from "../../CAREUI/display/Card"; -import CircularProgress from "@/components/Common/components/CircularProgress"; -import { DraftSection, useAutoSaveReducer } from "../../Utils/AutoSave"; -import dayjs from "../../Utils/dayjs"; -import useAuthUser from "@/common/hooks/useAuthUser"; -import { PhoneNumberValidator } from "../Form/FieldValidators"; -import routes from "../../Redux/api"; -import request from "../../Utils/request/request"; -import useQuery from "../../Utils/request/useQuery"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import CheckBoxFormField from "../Form/FormFields/CheckBoxFormField"; -import { useTranslation } from "react-i18next"; +} from "@/Utils/utils"; -import Loading from "@/components/Common/Loading"; interface UserProps { userId?: number; } diff --git a/src/components/Users/UserFilter.tsx b/src/components/Users/UserFilter.tsx index b6a0cae6bf9..30ddd90f939 100644 --- a/src/components/Users/UserFilter.tsx +++ b/src/components/Users/UserFilter.tsx @@ -1,22 +1,27 @@ -import { parsePhoneNumber } from "../../Utils/utils"; -import TextFormField from "../Form/FormFields/TextFormField"; -import SelectMenuV2 from "../Form/SelectMenuV2"; -import { FieldLabel } from "../Form/FormFields/FormField"; +import { useTranslation } from "react-i18next"; + +import FiltersSlideover from "@/CAREUI/interactive/FiltersSlideover"; + +import DistrictAutocompleteFormField from "@/components/Common/DistrictAutocompleteFormField"; +import { FacilitySelect } from "@/components/Common/FacilitySelect"; +import StateAutocompleteFormField from "@/components/Common/StateAutocompleteFormField"; +import { FacilityModel } from "@/components/Facility/models"; +import { FieldLabel } from "@/components/Form/FormFields/FormField"; +import PhoneNumberFormField from "@/components/Form/FormFields/PhoneNumberFormField"; +import TextFormField from "@/components/Form/FormFields/TextFormField"; +import SelectMenuV2 from "@/components/Form/SelectMenuV2"; + +import useMergeState from "@/hooks/useMergeState"; + import { USER_LAST_ACTIVE_OPTIONS, USER_TYPE_OPTIONS, } from "@/common/constants"; -import useMergeState from "@/common/hooks/useMergeState"; -import PhoneNumberFormField from "../Form/FormFields/PhoneNumberFormField"; -import FiltersSlideover from "../../CAREUI/interactive/FiltersSlideover"; -import DistrictAutocompleteFormField from "@/components/Common/DistrictAutocompleteFormField"; -import StateAutocompleteFormField from "@/components/Common/StateAutocompleteFormField"; -import { useTranslation } from "react-i18next"; -import * as Notify from "../../Utils/Notifications"; -import { FacilitySelect } from "@/components/Common/FacilitySelect"; -import { FacilityModel } from "../Facility/models"; -import useQuery from "../../Utils/request/useQuery"; -import routes from "../../Redux/api"; + +import * as Notify from "@/Utils/Notifications"; +import routes from "@/Utils/request/api"; +import useQuery from "@/Utils/request/useQuery"; +import { parsePhoneNumber } from "@/Utils/utils"; const parsePhoneNumberForFilterParam = (phoneNumber: string) => { if (!phoneNumber) return ""; diff --git a/src/components/Users/UserProfile.tsx b/src/components/Users/UserProfile.tsx index edbb5dafdfa..ba18cefe70e 100644 --- a/src/components/Users/UserProfile.tsx +++ b/src/components/Users/UserProfile.tsx @@ -1,10 +1,40 @@ -import { useState, useReducer, FormEvent } from "react"; +import careConfig from "@careConfig"; +import { FormEvent, useReducer, useState } from "react"; +import { useTranslation } from "react-i18next"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import AvatarEditModal from "@/components/Common/AvatarEditModal"; +import AvatarEditable from "@/components/Common/AvatarEditable"; +import ButtonV2, { Submit } from "@/components/Common/ButtonV2"; +import LanguageSelector from "@/components/Common/LanguageSelector"; +import Loading from "@/components/Common/Loading"; +import Page from "@/components/Common/Page"; +import UpdatableApp, { checkForUpdate } from "@/components/Common/UpdatableApp"; +import { PhoneNumberValidator } from "@/components/Form/FieldValidators"; +import DateFormField from "@/components/Form/FormFields/DateFormField"; +import PhoneNumberFormField from "@/components/Form/FormFields/PhoneNumberFormField"; +import { SelectFormField } from "@/components/Form/FormFields/SelectFormField"; +import TextFormField from "@/components/Form/FormFields/TextFormField"; +import { FieldChangeEvent } from "@/components/Form/FormFields/Utils"; +import { validateRule } from "@/components/Users/UserAdd"; +import { + GenderType, + SkillModel, + UpdatePasswordForm, +} from "@/components/Users/models"; + +import useAuthUser, { useAuthContext } from "@/hooks/useAuthUser"; + import { GENDER_TYPES, LocalStorageKeys } from "@/common/constants"; import { validateEmailAddress } from "@/common/validation"; -import * as Notification from "../../Utils/Notifications"; -import LanguageSelector from "@/components/Common/LanguageSelector"; -import TextFormField from "../Form/FormFields/TextFormField"; -import ButtonV2, { Submit } from "@/components/Common/components/ButtonV2"; + +import * as Notification from "@/Utils/Notifications"; +import dayjs from "@/Utils/dayjs"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import uploadFile from "@/Utils/request/uploadFile"; +import useQuery from "@/Utils/request/useQuery"; import { classNames, dateQueryString, @@ -14,27 +44,6 @@ import { parsePhoneNumber, sleep, } from "@/Utils/utils"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import PhoneNumberFormField from "../Form/FormFields/PhoneNumberFormField"; -import { FieldChangeEvent } from "../Form/FormFields/Utils"; -import { SelectFormField } from "../Form/FormFields/SelectFormField"; -import { GenderType, SkillModel, UpdatePasswordForm } from "./models"; -import UpdatableApp, { checkForUpdate } from "@/components/Common/UpdatableApp"; -import dayjs from "../../Utils/dayjs"; -import useAuthUser, { useAuthContext } from "@/common/hooks/useAuthUser"; -import { PhoneNumberValidator } from "../Form/FieldValidators"; -import useQuery from "../../Utils/request/useQuery"; -import routes from "../../Redux/api"; -import request from "../../Utils/request/request"; -import DateFormField from "../Form/FormFields/DateFormField"; -import { validateRule } from "./UserAdd"; -import { useTranslation } from "react-i18next"; -import AvatarEditable from "@/components/Common/AvatarEditable"; -import Page from "@/components/Common/components/Page"; -import Loading from "@/components/Common/Loading"; -import AvatarEditModal from "@/components/Common/AvatarEditModal"; -import uploadFile from "@/Utils/request/uploadFile"; -import careConfig from "@careConfig"; type EditForm = { firstName: string; diff --git a/src/components/Users/models.tsx b/src/components/Users/models.tsx index db448dbfb38..f359c11599e 100644 --- a/src/components/Users/models.tsx +++ b/src/components/Users/models.tsx @@ -1,6 +1,12 @@ +import { + DistrictModel, + LocalBodyModel, + StateModel, +} from "@/components/Facility/models"; + import { GENDER_TYPES, UserRole } from "@/common/constants"; -import { FeatureFlag } from "../../Utils/featureFlags"; -import { DistrictModel, LocalBodyModel, StateModel } from "../Facility/models"; + +import { FeatureFlag } from "@/Utils/featureFlags"; interface HomeFacilityObjectModel { id?: string; diff --git a/src/components/VitalsMonitor/HL7DeviceClient.ts b/src/components/VitalsMonitor/HL7DeviceClient.ts index b566d3227d1..28279b8bbe2 100644 --- a/src/components/VitalsMonitor/HL7DeviceClient.ts +++ b/src/components/VitalsMonitor/HL7DeviceClient.ts @@ -1,5 +1,10 @@ import { EventEmitter } from "events"; -import { VitalsDataBase, VitalsValueBase, VitalsWaveformBase } from "./types"; + +import { + VitalsDataBase, + VitalsValueBase, + VitalsWaveformBase, +} from "@/components/VitalsMonitor/types"; const ECG_WAVENAME_KEYS = [ "I", diff --git a/src/components/VitalsMonitor/HL7PatientVitalsMonitor.tsx b/src/components/VitalsMonitor/HL7PatientVitalsMonitor.tsx index 3acf8f5d81d..662d2786a32 100644 --- a/src/components/VitalsMonitor/HL7PatientVitalsMonitor.tsx +++ b/src/components/VitalsMonitor/HL7PatientVitalsMonitor.tsx @@ -1,14 +1,21 @@ -import { useEffect } from "react"; -import useHL7VitalsMonitor from "./useHL7VitalsMonitor"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import WaveformLabels from "./WaveformLabels"; -import { classNames } from "../../Utils/utils"; -import { IVitalsComponentProps, VitalsValueBase } from "./types"; -import { triggerGoal } from "../../Integrations/Plausible"; -import useAuthUser from "@/common/hooks/useAuthUser"; import dayjs from "dayjs"; -import VitalsMonitorHeader from "./VitalsMonitorHeader"; -import VitalsMonitorFooter from "./VitalsMonitorFooter"; +import { useEffect } from "react"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import VitalsMonitorFooter from "@/components/VitalsMonitor/VitalsMonitorFooter"; +import VitalsMonitorHeader from "@/components/VitalsMonitor/VitalsMonitorHeader"; +import WaveformLabels from "@/components/VitalsMonitor/WaveformLabels"; +import { + IVitalsComponentProps, + VitalsValueBase, +} from "@/components/VitalsMonitor/types"; +import useHL7VitalsMonitor from "@/components/VitalsMonitor/useHL7VitalsMonitor"; + +import useAuthUser from "@/hooks/useAuthUser"; + +import { triggerGoal } from "@/Integrations/Plausible"; +import { classNames } from "@/Utils/utils"; const minutesAgo = (timestamp: string) => { return `${dayjs().diff(dayjs(timestamp), "minute")}m ago`; diff --git a/src/components/VitalsMonitor/HL7VitalsRenderer.ts b/src/components/VitalsMonitor/HL7VitalsRenderer.ts index c77aa854cfc..20e9eb94acf 100644 --- a/src/components/VitalsMonitor/HL7VitalsRenderer.ts +++ b/src/components/VitalsMonitor/HL7VitalsRenderer.ts @@ -1,5 +1,5 @@ -import { ChannelOptions } from "./types"; -import { lerp } from "./utils"; +import { ChannelOptions } from "@/components/VitalsMonitor/types"; +import { lerp } from "@/components/VitalsMonitor/utils"; interface ChannelState { buffer: number[]; diff --git a/src/components/VitalsMonitor/VentilatorDeviceClient.ts b/src/components/VitalsMonitor/VentilatorDeviceClient.ts index 0418740dcc7..899a015958d 100644 --- a/src/components/VitalsMonitor/VentilatorDeviceClient.ts +++ b/src/components/VitalsMonitor/VentilatorDeviceClient.ts @@ -1,5 +1,10 @@ import { EventEmitter } from "events"; -import { VitalsDataBase, VitalsValueBase, VitalsWaveformBase } from "./types"; + +import { + VitalsDataBase, + VitalsValueBase, + VitalsWaveformBase, +} from "@/components/VitalsMonitor/types"; const WAVEFORM_KEY_MAP: Record = { P: "pressure-waveform", diff --git a/src/components/VitalsMonitor/VentilatorPatientVitalsMonitor.tsx b/src/components/VitalsMonitor/VentilatorPatientVitalsMonitor.tsx index a1375726448..c75ee5f2510 100644 --- a/src/components/VitalsMonitor/VentilatorPatientVitalsMonitor.tsx +++ b/src/components/VitalsMonitor/VentilatorPatientVitalsMonitor.tsx @@ -1,12 +1,18 @@ import { useEffect } from "react"; -import CareIcon from "../../CAREUI/icons/CareIcon"; -import useVentilatorVitalsMonitor from "./useVentilatorVitalsMonitor"; -import { IVitalsComponentProps, VitalsValueBase } from "./types"; -import { classNames } from "../../Utils/utils"; -import WaveformLabels from "./WaveformLabels"; -import { VitalsNonWaveformContent } from "./HL7PatientVitalsMonitor"; -import VitalsMonitorHeader from "./VitalsMonitorHeader"; -import VitalsMonitorFooter from "./VitalsMonitorFooter"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import { VitalsNonWaveformContent } from "@/components/VitalsMonitor/HL7PatientVitalsMonitor"; +import VitalsMonitorFooter from "@/components/VitalsMonitor/VitalsMonitorFooter"; +import VitalsMonitorHeader from "@/components/VitalsMonitor/VitalsMonitorHeader"; +import WaveformLabels from "@/components/VitalsMonitor/WaveformLabels"; +import { + IVitalsComponentProps, + VitalsValueBase, +} from "@/components/VitalsMonitor/types"; +import useVentilatorVitalsMonitor from "@/components/VitalsMonitor/useVentilatorVitalsMonitor"; + +import { classNames } from "@/Utils/utils"; export default function VentilatorPatientVitalsMonitor( props: IVitalsComponentProps, diff --git a/src/components/VitalsMonitor/VentilatorWaveformsRenderer.ts b/src/components/VitalsMonitor/VentilatorWaveformsRenderer.ts index c98b26ab152..2d1f94a58ad 100644 --- a/src/components/VitalsMonitor/VentilatorWaveformsRenderer.ts +++ b/src/components/VitalsMonitor/VentilatorWaveformsRenderer.ts @@ -1,5 +1,5 @@ -import { ChannelOptions } from "./types"; -import { lerp } from "./utils"; +import { ChannelOptions } from "@/components/VitalsMonitor/types"; +import { lerp } from "@/components/VitalsMonitor/utils"; interface ChannelState { buffer: number[]; diff --git a/src/components/VitalsMonitor/VitalsMonitorFooter.tsx b/src/components/VitalsMonitor/VitalsMonitorFooter.tsx index 29bfe7999d5..c7077f79372 100644 --- a/src/components/VitalsMonitor/VitalsMonitorFooter.tsx +++ b/src/components/VitalsMonitor/VitalsMonitorFooter.tsx @@ -1,4 +1,4 @@ -import { AssetData } from "../Assets/AssetTypes"; +import { AssetData } from "@/components/Assets/AssetTypes"; import AssetInfoPopover from "@/components/Common/AssetInfoPopover"; interface IVitalsMonitorFooterProps { diff --git a/src/components/VitalsMonitor/VitalsMonitorHeader.tsx b/src/components/VitalsMonitor/VitalsMonitorHeader.tsx index 4e6e3172036..2d9fceb8cf5 100644 --- a/src/components/VitalsMonitor/VitalsMonitorHeader.tsx +++ b/src/components/VitalsMonitor/VitalsMonitorHeader.tsx @@ -1,8 +1,12 @@ -import { PatientAssetBed } from "../Assets/AssetTypes"; import { Link } from "raviger"; -import CareIcon from "../../CAREUI/icons/CareIcon"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import { PatientAssetBed } from "@/components/Assets/AssetTypes"; + import { GENDER_TYPES } from "@/common/constants"; -import { formatPatientAge } from "../../Utils/utils"; + +import { formatPatientAge } from "@/Utils/utils"; interface VitalsMonitorHeaderProps { patientAssetBed?: PatientAssetBed; diff --git a/src/components/VitalsMonitor/WaveformLabels.tsx b/src/components/VitalsMonitor/WaveformLabels.tsx index 5e3fdf09bef..3fac3d53880 100644 --- a/src/components/VitalsMonitor/WaveformLabels.tsx +++ b/src/components/VitalsMonitor/WaveformLabels.tsx @@ -1,4 +1,4 @@ -import { classNames } from "../../Utils/utils"; +import { classNames } from "@/Utils/utils"; interface Props { labels: Record; diff --git a/src/components/VitalsMonitor/types.ts b/src/components/VitalsMonitor/types.ts index d6812d273d6..1e6b3427479 100644 --- a/src/components/VitalsMonitor/types.ts +++ b/src/components/VitalsMonitor/types.ts @@ -1,5 +1,5 @@ -import { PatientAssetBed } from "../Assets/AssetTypes"; -import { getVitalsCanvasSizeAndDuration } from "./utils"; +import { PatientAssetBed } from "@/components/Assets/AssetTypes"; +import { getVitalsCanvasSizeAndDuration } from "@/components/VitalsMonitor/utils"; export interface VitalsDataBase { device_id: string; diff --git a/src/components/VitalsMonitor/useHL7VitalsMonitor.ts b/src/components/VitalsMonitor/useHL7VitalsMonitor.ts index 20f9b9a9a59..49843c0662f 100644 --- a/src/components/VitalsMonitor/useHL7VitalsMonitor.ts +++ b/src/components/VitalsMonitor/useHL7VitalsMonitor.ts @@ -1,17 +1,22 @@ import { useCallback, useRef, useState } from "react"; + import HL7DeviceClient, { HL7MonitorData, HL7VitalsWaveformData, -} from "./HL7DeviceClient"; -import HL7VitalsRenderer from "./HL7VitalsRenderer"; -import useCanvas from "@/common/hooks/useCanvas"; +} from "@/components/VitalsMonitor/HL7DeviceClient"; +import HL7VitalsRenderer from "@/components/VitalsMonitor/HL7VitalsRenderer"; import { ChannelOptions, IVitalsComponentProps, VitalsDataBase, VitalsValueBase as VitalsValue, -} from "./types"; -import { getChannel, getVitalsCanvasSizeAndDuration } from "./utils"; +} from "@/components/VitalsMonitor/types"; +import { + getChannel, + getVitalsCanvasSizeAndDuration, +} from "@/components/VitalsMonitor/utils"; + +import useCanvas from "@/hooks/useCanvas"; interface VitalsBPValue extends VitalsDataBase { systolic: VitalsValue; diff --git a/src/components/VitalsMonitor/useVentilatorVitalsMonitor.ts b/src/components/VitalsMonitor/useVentilatorVitalsMonitor.ts index 6f24ae50bf7..e52bced2a4b 100644 --- a/src/components/VitalsMonitor/useVentilatorVitalsMonitor.ts +++ b/src/components/VitalsMonitor/useVentilatorVitalsMonitor.ts @@ -1,16 +1,21 @@ import { useCallback, useRef, useState } from "react"; -import useCanvas from "@/common/hooks/useCanvas"; + +import VentilatorDeviceClient, { + VentilatorData, + VentilatorVitalsWaveformData, +} from "@/components/VitalsMonitor/VentilatorDeviceClient"; +import VentilatorVitalsRenderer from "@/components/VitalsMonitor/VentilatorWaveformsRenderer"; import { ChannelOptions, IVitalsComponentProps, VitalsValueBase as VitalsValue, -} from "./types"; -import VentilatorDeviceClient, { - VentilatorData, - VentilatorVitalsWaveformData, -} from "./VentilatorDeviceClient"; -import VentilatorVitalsRenderer from "./VentilatorWaveformsRenderer"; -import { getChannel, getVitalsCanvasSizeAndDuration } from "./utils"; +} from "@/components/VitalsMonitor/types"; +import { + getChannel, + getVitalsCanvasSizeAndDuration, +} from "@/components/VitalsMonitor/utils"; + +import useCanvas from "@/hooks/useCanvas"; export default function useVentilatorVitalsMonitor( config?: IVitalsComponentProps["config"], diff --git a/src/components/VitalsMonitor/useVitalsAspectRatioConfig.ts b/src/components/VitalsMonitor/useVitalsAspectRatioConfig.ts index 6de68c6abbc..92271ba1d12 100644 --- a/src/components/VitalsMonitor/useVitalsAspectRatioConfig.ts +++ b/src/components/VitalsMonitor/useVitalsAspectRatioConfig.ts @@ -1,5 +1,6 @@ -import useBreakpoints from "@/common/hooks/useBreakpoints"; -import { getVitalsCanvasSizeAndDuration } from "./utils"; +import { getVitalsCanvasSizeAndDuration } from "@/components/VitalsMonitor/utils"; + +import useBreakpoints from "@/hooks/useBreakpoints"; export default function useVitalsAspectRatioConfig( breakpointsMap: Parameters>[0], diff --git a/src/components/VitalsMonitor/utils.ts b/src/components/VitalsMonitor/utils.ts index bd3ee7793b9..9f9ec0ac023 100644 --- a/src/components/VitalsMonitor/utils.ts +++ b/src/components/VitalsMonitor/utils.ts @@ -1,5 +1,8 @@ -import { AssetClass, AssetData } from "../Assets/AssetTypes"; -import { ChannelOptions, VitalsWaveformBase } from "./types"; +import { AssetClass, AssetData } from "@/components/Assets/AssetTypes"; +import { + ChannelOptions, + VitalsWaveformBase, +} from "@/components/VitalsMonitor/types"; /** * Maps a value from one range to another. diff --git a/src/components/ui/alert.tsx b/src/components/ui/alert.tsx index ad2b6c32f64..c7b5bff5bdc 100644 --- a/src/components/ui/alert.tsx +++ b/src/components/ui/alert.tsx @@ -1,5 +1,5 @@ +import { type VariantProps, cva } from "class-variance-authority"; import * as React from "react"; -import { cva, type VariantProps } from "class-variance-authority"; import { cn } from "@/lib/utils"; diff --git a/src/components/ui/button.tsx b/src/components/ui/button.tsx index 972879cb6e1..f49a7052a78 100644 --- a/src/components/ui/button.tsx +++ b/src/components/ui/button.tsx @@ -1,6 +1,6 @@ -import * as React from "react"; import { Slot } from "@radix-ui/react-slot"; -import { cva, type VariantProps } from "class-variance-authority"; +import { type VariantProps, cva } from "class-variance-authority"; +import * as React from "react"; import { cn } from "@/lib/utils"; diff --git a/src/components/ui/dropdown-menu.tsx b/src/components/ui/dropdown-menu.tsx index d019b2893d6..6a9a9fcadb9 100644 --- a/src/components/ui/dropdown-menu.tsx +++ b/src/components/ui/dropdown-menu.tsx @@ -1,10 +1,10 @@ -import * as React from "react"; import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu"; import { CheckIcon, ChevronRightIcon, DotFilledIcon, } from "@radix-ui/react-icons"; +import * as React from "react"; import { cn } from "@/lib/utils"; diff --git a/src/components/ui/toast.tsx b/src/components/ui/toast.tsx index 59dd7fc4645..dbf76c76a37 100644 --- a/src/components/ui/toast.tsx +++ b/src/components/ui/toast.tsx @@ -1,7 +1,7 @@ -import * as React from "react"; import { Cross2Icon } from "@radix-ui/react-icons"; import * as ToastPrimitives from "@radix-ui/react-toast"; -import { cva, type VariantProps } from "class-variance-authority"; +import { type VariantProps, cva } from "class-variance-authority"; +import * as React from "react"; import { cn } from "@/lib/utils"; diff --git a/src/components/ui/toaster.tsx b/src/components/ui/toaster.tsx index 5887f0804da..e3582e7ff0b 100644 --- a/src/components/ui/toaster.tsx +++ b/src/components/ui/toaster.tsx @@ -1,4 +1,3 @@ -import { useToast } from "@/hooks/use-toast"; import { Toast, ToastClose, @@ -8,6 +7,8 @@ import { ToastViewport, } from "@/components/ui/toast"; +import { useToast } from "@/hooks/useToast"; + export function Toaster() { const { toasts } = useToast(); diff --git a/src/components/ui/tooltip.tsx b/src/components/ui/tooltip.tsx index be192b1fb66..0f4a817dec4 100644 --- a/src/components/ui/tooltip.tsx +++ b/src/components/ui/tooltip.tsx @@ -1,5 +1,5 @@ -import * as React from "react"; import * as TooltipPrimitive from "@radix-ui/react-tooltip"; +import * as React from "react"; import { cn } from "@/lib/utils"; diff --git a/src/common/hooks/useActiveLink.ts b/src/hooks/useActiveLink.ts similarity index 100% rename from src/common/hooks/useActiveLink.ts rename to src/hooks/useActiveLink.ts diff --git a/src/common/hooks/useAppHistory.ts b/src/hooks/useAppHistory.ts similarity index 94% rename from src/common/hooks/useAppHistory.ts rename to src/hooks/useAppHistory.ts index a4605db082b..a17598e8a36 100644 --- a/src/common/hooks/useAppHistory.ts +++ b/src/hooks/useAppHistory.ts @@ -1,9 +1,10 @@ import { navigate } from "raviger"; import { useContext } from "react"; + import { HistoryContext, ResetHistoryContext, -} from "../../Providers/HistoryAPIProvider"; +} from "@/Providers/HistoryAPIProvider"; export default function useAppHistory() { const history = useContext(HistoryContext); diff --git a/src/common/hooks/useAuthUser.ts b/src/hooks/useAuthUser.ts similarity index 86% rename from src/common/hooks/useAuthUser.ts rename to src/hooks/useAuthUser.ts index 2b492c23a54..2a44575072f 100644 --- a/src/common/hooks/useAuthUser.ts +++ b/src/hooks/useAuthUser.ts @@ -1,7 +1,9 @@ import { createContext, useContext } from "react"; + import { UserModel } from "@/components/Users/models"; -import { RequestResult } from "../../Utils/request/types"; -import { JwtTokenObtainPair, LoginCredentials } from "../../Redux/api"; + +import { JwtTokenObtainPair, LoginCredentials } from "@/Utils/request/api"; +import { RequestResult } from "@/Utils/request/types"; type SignInReturnType = RequestResult; diff --git a/src/common/hooks/useBreakpoints.ts b/src/hooks/useBreakpoints.ts similarity index 93% rename from src/common/hooks/useBreakpoints.ts rename to src/hooks/useBreakpoints.ts index 19b5f89ba94..bba811ab88e 100644 --- a/src/common/hooks/useBreakpoints.ts +++ b/src/hooks/useBreakpoints.ts @@ -1,4 +1,4 @@ -import useWindowDimensions from "./useWindowDimensions"; +import useWindowDimensions from "@/hooks/useWindowDimensions"; type Breakpoints = "sm" | "md" | "lg" | "xl" | "2xl" | "3xl"; diff --git a/src/common/hooks/useCanvas.ts b/src/hooks/useCanvas.ts similarity index 100% rename from src/common/hooks/useCanvas.ts rename to src/hooks/useCanvas.ts diff --git a/src/common/hooks/useCareApps.ts b/src/hooks/useCareApps.ts similarity index 99% rename from src/common/hooks/useCareApps.ts rename to src/hooks/useCareApps.ts index 758a4ac4349..5d0de6f3b9f 100644 --- a/src/common/hooks/useCareApps.ts +++ b/src/hooks/useCareApps.ts @@ -1,7 +1,9 @@ import { createContext, useContext } from "react"; -import { PluginManifest } from "@/pluginTypes"; + import { INavItem } from "@/components/Common/Sidebar/Sidebar"; +import { PluginManifest } from "@/pluginTypes"; + export const CareAppsContext = createContext([]); export const useCareApps = () => { diff --git a/src/common/hooks/useConfirmedAction.ts b/src/hooks/useConfirmedAction.ts similarity index 100% rename from src/common/hooks/useConfirmedAction.ts rename to src/hooks/useConfirmedAction.ts diff --git a/src/Utils/useDragAndDrop.ts b/src/hooks/useDragAndDrop.ts similarity index 100% rename from src/Utils/useDragAndDrop.ts rename to src/hooks/useDragAndDrop.ts diff --git a/src/common/hooks/useExport.tsx b/src/hooks/useExport.tsx similarity index 98% rename from src/common/hooks/useExport.tsx rename to src/hooks/useExport.tsx index 1e7540e6525..729b4d907c8 100644 --- a/src/common/hooks/useExport.tsx +++ b/src/hooks/useExport.tsx @@ -1,6 +1,7 @@ -import dayjs from "../../Utils/dayjs"; import { useState } from "react"; +import dayjs from "@/Utils/dayjs"; + export default function useExport() { const [isExporting, setIsExporting] = useState(false); diff --git a/src/Utils/useFileManager.tsx b/src/hooks/useFileManager.tsx similarity index 97% rename from src/Utils/useFileManager.tsx rename to src/hooks/useFileManager.tsx index ef935446689..727c92a6261 100644 --- a/src/Utils/useFileManager.tsx +++ b/src/hooks/useFileManager.tsx @@ -1,21 +1,25 @@ import { useState } from "react"; + +import CareIcon from "@/CAREUI/icons/CareIcon"; + +import { Cancel, Submit } from "@/components/Common/ButtonV2"; +import DialogModal from "@/components/Common/Dialog"; import FilePreviewDialog from "@/components/Common/FilePreviewDialog"; -import { FileUploadModel } from "@/components/Patient/models"; import { StateInterface } from "@/components/Files/FileUpload"; -import request from "./request/request"; -import routes from "../Redux/api"; -import DialogModal from "@/components/Common/Dialog"; -import CareIcon from "../CAREUI/icons/CareIcon"; import TextAreaFormField from "@/components/Form/FormFields/TextAreaFormField"; -import { Cancel, Submit } from "@/components/Common/components/ButtonV2"; -import { formatDateTime } from "./utils"; -import * as Notification from "./Notifications"; import TextFormField from "@/components/Form/FormFields/TextFormField"; +import { FileUploadModel } from "@/components/Patient/models"; + import { FILE_EXTENSIONS, PREVIEWABLE_FILE_EXTENSIONS, } from "@/common/constants"; +import * as Notification from "@/Utils/Notifications"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import { formatDateTime } from "@/Utils/utils"; + export interface FileManagerOptions { type: string; onArchive?: () => void; diff --git a/src/Utils/useFileUpload.tsx b/src/hooks/useFileUpload.tsx similarity index 97% rename from src/Utils/useFileUpload.tsx rename to src/hooks/useFileUpload.tsx index 3181abad9b9..56f0d337a5e 100644 --- a/src/Utils/useFileUpload.tsx +++ b/src/hooks/useFileUpload.tsx @@ -1,3 +1,5 @@ +import imageCompression from "browser-image-compression"; +import { t } from "i18next"; import { ChangeEvent, DetailedHTMLProps, @@ -5,20 +7,21 @@ import { useEffect, useState, } from "react"; + +import AudioCaptureDialog from "@/components/Files/AudioCaptureDialog"; +import CameraCaptureDialog from "@/components/Files/CameraCaptureDialog"; import { CreateFileResponse, FileCategory, FileUploadModel, } from "@/components/Patient/models"; -import request from "./request/request"; -import routes from "../Redux/api"; -import uploadFile from "./request/uploadFile"; -import * as Notification from "./Notifications"; -import imageCompression from "browser-image-compression"; + import { DEFAULT_ALLOWED_EXTENSIONS } from "@/common/constants"; -import CameraCaptureDialog from "@/components/Files/CameraCaptureDialog"; -import AudioCaptureDialog from "@/components/Files/AudioCaptureDialog"; -import { t } from "i18next"; + +import * as Notification from "@/Utils/Notifications"; +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; +import uploadFile from "@/Utils/request/uploadFile"; export type FileUploadOptions = { multiple?: boolean; diff --git a/src/common/hooks/useFilters.tsx b/src/hooks/useFilters.tsx similarity index 97% rename from src/common/hooks/useFilters.tsx rename to src/hooks/useFilters.tsx index 49e1d9fe0e2..b67474045ef 100644 --- a/src/common/hooks/useFilters.tsx +++ b/src/hooks/useFilters.tsx @@ -1,12 +1,15 @@ +import careConfig from "@careConfig"; import { QueryParam, setQueryParamsOptions, useQueryParams } from "raviger"; import { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; -import GenericFilterBadge from "../../CAREUI/display/FilterBadge"; + +import GenericFilterBadge from "@/CAREUI/display/FilterBadge"; + import PaginationComponent from "@/components/Common/Pagination"; -import { classNames, humanizeStrings } from "../../Utils/utils"; -import FiltersCache from "../../Utils/FiltersCache"; -import careConfig from "@careConfig"; -import { triggerGoal } from "../../Integrations/Plausible"; + +import { triggerGoal } from "@/Integrations/Plausible"; +import FiltersCache from "@/Utils/FiltersCache"; +import { classNames, humanizeStrings } from "@/Utils/utils"; export type FilterState = Record; diff --git a/src/common/hooks/useFullscreen.ts b/src/hooks/useFullscreen.ts similarity index 100% rename from src/common/hooks/useFullscreen.ts rename to src/hooks/useFullscreen.ts diff --git a/src/common/hooks/useIsAuthorized.ts b/src/hooks/useIsAuthorized.ts similarity index 58% rename from src/common/hooks/useIsAuthorized.ts rename to src/hooks/useIsAuthorized.ts index 922a17b7498..8c8e24a0eb7 100644 --- a/src/common/hooks/useIsAuthorized.ts +++ b/src/hooks/useIsAuthorized.ts @@ -1,5 +1,6 @@ -import { AuthorizedForCB } from "../../Utils/AuthorizeFor"; -import useAuthUser from "./useAuthUser"; +import useAuthUser from "@/hooks/useAuthUser"; + +import { AuthorizedForCB } from "@/Utils/AuthorizeFor"; export const useIsAuthorized = (authorizeFor: AuthorizedForCB) => { const authUser = useAuthUser(); diff --git a/src/common/hooks/useMergeState.js b/src/hooks/useMergeState.js similarity index 100% rename from src/common/hooks/useMergeState.js rename to src/hooks/useMergeState.js diff --git a/src/common/hooks/useMessageListener.ts b/src/hooks/useMessageListener.ts similarity index 100% rename from src/common/hooks/useMessageListener.ts rename to src/hooks/useMessageListener.ts diff --git a/src/common/hooks/useNotificationSubscriptionState.ts b/src/hooks/useNotificationSubscriptionState.ts similarity index 91% rename from src/common/hooks/useNotificationSubscriptionState.ts rename to src/hooks/useNotificationSubscriptionState.ts index b7927e0cc70..61aa4be9b9b 100644 --- a/src/common/hooks/useNotificationSubscriptionState.ts +++ b/src/hooks/useNotificationSubscriptionState.ts @@ -1,8 +1,10 @@ -import { useEffect, useState } from "react"; -import routes from "../../Redux/api"; -import request from "../../Utils/request/request"; -import useAuthUser from "./useAuthUser"; import * as Sentry from "@sentry/browser"; +import { useEffect, useState } from "react"; + +import useAuthUser from "@/hooks/useAuthUser"; + +import routes from "@/Utils/request/api"; +import request from "@/Utils/request/request"; export type NotificationSubscriptionState = | "unsubscribed" diff --git a/src/common/hooks/useRangePagination.ts b/src/hooks/useRangePagination.ts similarity index 100% rename from src/common/hooks/useRangePagination.ts rename to src/hooks/useRangePagination.ts diff --git a/src/hooks/useRecorder.d.ts b/src/hooks/useRecorder.d.ts new file mode 100644 index 00000000000..7ff05af668e --- /dev/null +++ b/src/hooks/useRecorder.d.ts @@ -0,0 +1,3 @@ +import useRecorder from "@/hooks/useRecorder"; + +export default useRecorder as any; diff --git a/src/Utils/useRecorder.js b/src/hooks/useRecorder.js similarity index 97% rename from src/Utils/useRecorder.js rename to src/hooks/useRecorder.js index 8ad90ebe8cb..ba7105c5186 100644 --- a/src/Utils/useRecorder.js +++ b/src/hooks/useRecorder.js @@ -1,9 +1,9 @@ // why is this file in js? can we convert to ts? - import { useEffect, useState } from "react"; -import { Error } from "./Notifications"; import { useTranslation } from "react-i18next"; +import { Error } from "@/Utils/Notifications"; + const useRecorder = (handleMicPermission) => { const [audioURL, setAudioURL] = useState(""); const [isRecording, setIsRecording] = useState(false); diff --git a/src/common/hooks/useSlug.ts b/src/hooks/useSlug.ts similarity index 100% rename from src/common/hooks/useSlug.ts rename to src/hooks/useSlug.ts diff --git a/src/Utils/useTimer.tsx b/src/hooks/useTimer.tsx similarity index 100% rename from src/Utils/useTimer.tsx rename to src/hooks/useTimer.tsx diff --git a/src/hooks/use-toast.ts b/src/hooks/useToast.ts similarity index 100% rename from src/hooks/use-toast.ts rename to src/hooks/useToast.ts diff --git a/src/Utils/useVisibility.ts b/src/hooks/useVisibility.ts similarity index 94% rename from src/Utils/useVisibility.ts rename to src/hooks/useVisibility.ts index 050b6a3f49a..252d4174711 100644 --- a/src/Utils/useVisibility.ts +++ b/src/hooks/useVisibility.ts @@ -1,4 +1,4 @@ -import { useRef, useEffect, useState, MutableRefObject } from "react"; +import { MutableRefObject, useEffect, useRef, useState } from "react"; /** * Check if an element is in viewport diff --git a/src/common/hooks/useWindowDimensions.ts b/src/hooks/useWindowDimensions.ts similarity index 93% rename from src/common/hooks/useWindowDimensions.ts rename to src/hooks/useWindowDimensions.ts index 372ea62f7e1..9ec425decfa 100644 --- a/src/common/hooks/useWindowDimensions.ts +++ b/src/hooks/useWindowDimensions.ts @@ -1,4 +1,4 @@ -import { useState, useEffect } from "react"; +import { useEffect, useState } from "react"; const getWindowDimensions = () => { return { diff --git a/src/i18n.ts b/src/i18n.ts index cce26d71b2c..09afa94aad6 100644 --- a/src/i18n.ts +++ b/src/i18n.ts @@ -1,13 +1,13 @@ import i18n from "i18next"; -import { initReactI18next } from "react-i18next"; import LanguageDetector from "i18next-browser-languagedetector"; +import { initReactI18next } from "react-i18next"; -import en from "./Locale/en.json"; -import ta from "./Locale/ta.json"; -import ml from "./Locale/ml.json"; -import mr from "./Locale/mr.json"; -import kn from "./Locale/kn.json"; -import hi from "./Locale/hi.json"; +import en from "@/Locale/en.json"; +import hi from "@/Locale/hi.json"; +import kn from "@/Locale/kn.json"; +import ml from "@/Locale/ml.json"; +import mr from "@/Locale/mr.json"; +import ta from "@/Locale/ta.json"; export const LANGUAGES: { [key: string]: any } = { en: "English", diff --git a/src/index.tsx b/src/index.tsx index 355d985724a..cfef8691acb 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1,10 +1,11 @@ -import { createRoot } from "react-dom/client"; -import App from "./App"; -import "./i18n"; import * as Sentry from "@sentry/browser"; -import "./style/index.css"; +import { createRoot } from "react-dom/client"; import { registerSW } from "virtual:pwa-register"; +import App from "@/App"; +import "@/i18n"; +import "@/style/index.css"; + if ("serviceWorker" in navigator) { registerSW({ immediate: false }); } diff --git a/src/pluginTypes.ts b/src/pluginTypes.ts index a8d6abb7fb2..13886b5b7d5 100644 --- a/src/pluginTypes.ts +++ b/src/pluginTypes.ts @@ -1,10 +1,12 @@ -import { AppRoutes } from "./Routers/AppRouter"; -import { ConsultationModel } from "@/components/Facility/models"; -import { INavItem } from "@/components/Common/Sidebar/Sidebar"; import { LazyExoticComponent } from "react"; + +import { INavItem } from "@/components/Common/Sidebar/Sidebar"; +import { ConsultationModel } from "@/components/Facility/models"; import { PatientModel } from "@/components/Patient/models"; import { UserAssignedModel } from "@/components/Users/models"; -import { pluginMap } from "./pluginMap"; + +import { AppRoutes } from "@/Routers/AppRouter"; +import { pluginMap } from "@/pluginMap"; // Define the available plugins export type AvailablePlugin = "@apps/care_livekit_fe" | "@apps/care_hcx_fe"; diff --git a/src/service-worker.ts b/src/service-worker.ts index 426f6b90621..078e4237c28 100644 --- a/src/service-worker.ts +++ b/src/service-worker.ts @@ -1,13 +1,12 @@ /// -/* eslint-disable no-restricted-globals */ +/* eslint-disable no-restricted-globals */ // This service worker can be customized! // See https://developers.google.com/web/tools/workbox/modules // for the list of available Workbox modules, or add any other // code you'd like. // You can also remove this file if you'd prefer not to use a // service worker, and the Workbox build step will be skipped. - import { clientsClaim } from "workbox-core"; // eslint-disable-next-line @typescript-eslint/no-unused-vars import { precacheAndRoute } from "workbox-precaching";