From a48515362b662bcbb20bdb6ae6fa9353d3594310 Mon Sep 17 00:00:00 2001 From: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> Date: Fri, 13 Oct 2023 10:54:11 +0530 Subject: [PATCH 01/80] added missions build configs build-config.yml (#12) --- build/build-config.yml | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/build/build-config.yml b/build/build-config.yml index b50ee7558da..e89bf060989 100644 --- a/build/build-config.yml +++ b/build/build-config.yml @@ -46,6 +46,30 @@ config: - name: builds/Digit-Frontend/core-ui build: - work-dir: micro-ui/ - dockerfile: micro-ui/web/docker/Dockerfile + dockerfile: micro-ui/web/core/Dockerfile image-name: core-ui + + - name: builds/Digit-Frontend/mission/urban-ui + build: + - work-dir: micro-ui/ + dockerfile: micro-ui/web/urban/Dockerfile + image-name: urban-ui + + - name: builds/Digit-Frontend/mission/works-ui + build: + - work-dir: micro-ui/ + dockerfile: micro-ui/web/works/Dockerfile + image-name: works-ui + + - name: builds/Digit-Frontend/mission/sanitation-ui + build: + - work-dir: micro-ui/ + dockerfile: micro-ui/web/sanitation/Dockerfile + image-name: sanitation-ui + + - name: builds/Digit-Frontend/mission/health-ui + build: + - work-dir: micro-ui/ + dockerfile: micro-ui/web/health/Dockerfile + image-name: health-ui From 7c83fff57989af8289c42a95157d3ec7f127bfa6 Mon Sep 17 00:00:00 2001 From: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> Date: Tue, 17 Oct 2023 14:26:00 +0530 Subject: [PATCH 02/80] Update build-config.yml (#14) --- build/build-config.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/build/build-config.yml b/build/build-config.yml index e89bf060989..8d66058de79 100644 --- a/build/build-config.yml +++ b/build/build-config.yml @@ -73,3 +73,28 @@ config: dockerfile: micro-ui/web/health/Dockerfile image-name: health-ui + - name: builds/Digit-Frontend/modules/core + build: + - work-dir: micro-ui/ + dockerfile: micro-ui/web/docker/Dockerfile + image-name: core + + - name: builds/Digit-Frontend/modules/dss + build: + - work-dir: micro-ui/ + dockerfile: micro-ui/web/docker/Dockerfile + image-name: dss + + + - name: builds/Digit-Frontend/modules/workbench + build: + - work-dir: micro-ui/ + dockerfile: micro-ui/web/docker/Dockerfile + image-name: workbench + + + - name: builds/Digit-Frontend/modules/hrms + build: + - work-dir: micro-ui/ + dockerfile: micro-ui/web/docker/Dockerfile + image-name: hrms From b51c6810e572e5a3a0744271bf6792a4a8f79cb9 Mon Sep 17 00:00:00 2001 From: Nipun Arora Date: Thu, 2 Nov 2023 16:08:41 +0530 Subject: [PATCH 03/80] how it works (#24) --- .../web/micro-ui-internals/packages/modules/core/README.md | 1 + .../micro-ui-internals/packages/modules/core/package.json | 2 +- .../modules/core/src/pages/citizen/HowItWorks/howItWorks.js | 6 +++--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/micro-ui/web/micro-ui-internals/packages/modules/core/README.md b/micro-ui/web/micro-ui-internals/packages/modules/core/README.md index 67e4df97e42..55818c33362 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/core/README.md +++ b/micro-ui/web/micro-ui-internals/packages/modules/core/README.md @@ -65,6 +65,7 @@ with # Changelog ```bash +1.8.0-beta.9 Updated How It works screen to take header from mdms config and show pdf card only when required 1.8.0-beta.8 redefine addtional component to render only under employee home page 1.8.0-beta.6 added addtional component render for tqm modules 1.8.0-beta.5 fix for login screen alignments diff --git a/micro-ui/web/micro-ui-internals/packages/modules/core/package.json b/micro-ui/web/micro-ui-internals/packages/modules/core/package.json index c3726bf34ff..d6431ab5e7b 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/core/package.json +++ b/micro-ui/web/micro-ui-internals/packages/modules/core/package.json @@ -1,6 +1,6 @@ { "name": "@egovernments/digit-ui-module-core", - "version": "1.8.0-beta.8", + "version": "1.8.0-beta.9", "license": "MIT", "main": "dist/index.js", "module": "dist/index.modern.js", diff --git a/micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/citizen/HowItWorks/howItWorks.js b/micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/citizen/HowItWorks/howItWorks.js index 3897d0d6193..761a4d773ac 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/citizen/HowItWorks/howItWorks.js +++ b/micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/citizen/HowItWorks/howItWorks.js @@ -61,7 +61,7 @@ const HowItWorks = ({ module }) => {
-
{t("HOW_IT_WORKS")}
+
{t(mdmsConfigResult.screenHeader ? mdmsConfigResult.screenHeader : "HOW_IT_WORKS")}
{languages.map((language, index) => ( @@ -89,7 +89,7 @@ const HowItWorks = ({ module }) => {
))} -
+ {mdmsConfigResult.pdfHeader && mdmsConfigResult.pdfDesc &&
@@ -104,7 +104,7 @@ const HowItWorks = ({ module }) => {
-
+
} {videoPlay && (
From 66c859b9a802d49f7b760a09d0749a2b67869eac Mon Sep 17 00:00:00 2001 From: Nipun Arora Date: Mon, 6 Nov 2023 14:28:59 +0530 Subject: [PATCH 04/80] Added some icons for pqm dashboard and updated versions (#28) --- .../packages/modules/dss/package.json | 4 +-- .../packages/react-components/README.md | 1 + .../packages/react-components/package.json | 2 +- .../react-components/src/atoms/svgindex.js | 25 +++++++++++++++++-- .../packages/react-components/src/index.js | 6 ++++- 5 files changed, 32 insertions(+), 6 deletions(-) diff --git a/micro-ui/web/micro-ui-internals/packages/modules/dss/package.json b/micro-ui/web/micro-ui-internals/packages/modules/dss/package.json index 95d2e18129f..c504ae37c13 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/dss/package.json +++ b/micro-ui/web/micro-ui-internals/packages/modules/dss/package.json @@ -1,6 +1,6 @@ { "name": "@egovernments/digit-ui-module-dss", - "version": "1.8.0-beta", + "version": "1.8.0-beta.1", "license": "MIT", "main": "dist/index.js", "module": "dist/index.modern.js", @@ -18,7 +18,7 @@ "react-router-dom": "5.3.0" }, "dependencies": { - "@egovernments/digit-ui-react-components": "1.8.0-beta", + "@egovernments/digit-ui-react-components": "1.8.0-beta.2", "jsonpath": "^1.1.1", "react": "17.0.2", "react-date-range": "1.3.0", diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/README.md b/micro-ui/web/micro-ui-internals/packages/react-components/README.md index 58d8b96a8cc..4d5c93bc114 100644 --- a/micro-ui/web/micro-ui-internals/packages/react-components/README.md +++ b/micro-ui/web/micro-ui-internals/packages/react-components/README.md @@ -88,6 +88,7 @@ Syntax for the FormComposersV2 # Changelog ```bash +1.0.0-beta.2 Added Some icons for pqm dashboard 1.8.0-beta.1 fixed some topbar issues 1.8.0-beta workbench base version beta release 1.7.0 urban 2.9 diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/package.json b/micro-ui/web/micro-ui-internals/packages/react-components/package.json index 6fbbbc7c90b..2101552ef33 100644 --- a/micro-ui/web/micro-ui-internals/packages/react-components/package.json +++ b/micro-ui/web/micro-ui-internals/packages/react-components/package.json @@ -1,6 +1,6 @@ { "name": "@egovernments/digit-ui-react-components", - "version": "1.8.0-beta.1", + "version": "1.8.0-beta.2", "license": "MIT", "main": "dist/index.js", "module": "dist/index.modern.js", diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/svgindex.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/svgindex.js index 90756f4d787..1b4f83e7720 100644 --- a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/svgindex.js +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/svgindex.js @@ -782,11 +782,11 @@ const EventCalendar = () => { ); }; -const NotificationBell = () => ( +const NotificationBell = ({fill="#F47738"}) => ( ); @@ -1809,10 +1809,31 @@ const HelpOutlineIcon = ({ className = "", fill = "", style = {} }) => ( ); +const InputIcon = () => ( + + + +); + +const TreatmentQualityIcon = ({ className = "", fill = "", style = {} }) => ( + + + +); const ExpenditureIcon = BillsIcon; export { + InputIcon, + TreatmentQualityIcon, HelpOutlineIcon, AnnouncementIcon, ReceiptIcon, diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/index.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/index.js index 37e39463971..ed408dc198f 100644 --- a/micro-ui/web/micro-ui-internals/packages/react-components/src/index.js +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/index.js @@ -209,7 +209,9 @@ import { FileIcon, DeleteIconv2, InfoIconOutline, - HelpOutlineIcon + HelpOutlineIcon, + InputIcon, + TreatmentQualityIcon, } from "./atoms/svgindex"; import Table from "./atoms/Table"; import TelePhone from "./atoms/TelePhone"; @@ -290,6 +292,8 @@ import Help from "./hoc/Tutorial/Help"; export { HelpOutlineIcon, + InputIcon, + TreatmentQualityIcon, Help, Tutorial, useTourState, From f1942282bdd232e73ed078a4b3f912de44903c4e Mon Sep 17 00:00:00 2001 From: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> Date: Mon, 6 Nov 2023 16:58:23 +0530 Subject: [PATCH 05/80] added mgramseva web changes --- .../web/micro-ui-internals/packages/modules/core/package.json | 2 +- .../core/src/components/TopBarSideBar/SideBar/SideBar.js | 2 +- micro-ui/web/workbench/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/micro-ui/web/micro-ui-internals/packages/modules/core/package.json b/micro-ui/web/micro-ui-internals/packages/modules/core/package.json index d6431ab5e7b..27aad9753ed 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/core/package.json +++ b/micro-ui/web/micro-ui-internals/packages/modules/core/package.json @@ -1,6 +1,6 @@ { "name": "@egovernments/digit-ui-module-core", - "version": "1.8.0-beta.9", + "version": "1.8.0-beta.10", "license": "MIT", "main": "dist/index.js", "module": "dist/index.modern.js", diff --git a/micro-ui/web/micro-ui-internals/packages/modules/core/src/components/TopBarSideBar/SideBar/SideBar.js b/micro-ui/web/micro-ui-internals/packages/modules/core/src/components/TopBarSideBar/SideBar/SideBar.js index d8cb6446e5e..9a38a79a4a8 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/core/src/components/TopBarSideBar/SideBar/SideBar.js +++ b/micro-ui/web/micro-ui-internals/packages/modules/core/src/components/TopBarSideBar/SideBar/SideBar.js @@ -21,7 +21,7 @@ import { set } from "lodash"; import { useHistory, useLocation, Link } from "react-router-dom"; import { useTranslation } from "react-i18next"; -const DIGIT_UI_CONTEXTS = ["digit-ui", "works-ui", "workbench-ui", "health-ui", "sanitation-ui", "core-ui"]; +const DIGIT_UI_CONTEXTS = ["digit-ui", "works-ui", "workbench-ui", "health-ui", "sanitation-ui", "core-ui","mgramseva-web"]; /* Used to navigate to other mission's ui if user has access */ diff --git a/micro-ui/web/workbench/package.json b/micro-ui/web/workbench/package.json index 00278d3ecc1..75cb3b5a3a1 100644 --- a/micro-ui/web/workbench/package.json +++ b/micro-ui/web/workbench/package.json @@ -16,7 +16,7 @@ "dependencies": { "@egovernments/digit-ui-libraries": "1.8.0-beta", "@egovernments/digit-ui-module-workbench": "1.0.0-beta", - "@egovernments/digit-ui-module-core": "1.8.0-beta.5", + "@egovernments/digit-ui-module-core": "1.8.0-beta.10", "@egovernments/digit-ui-module-hrms": "1.8.0-beta.2", "@egovernments/digit-ui-react-components": "1.8.0-beta.1", "babel-loader": "8.1.0", From 638205e766c0fef7a9b6e799ff9ab3d4f0078bef Mon Sep 17 00:00:00 2001 From: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> Date: Tue, 7 Nov 2023 17:50:32 +0530 Subject: [PATCH 06/80] updated the package version (#33) --- micro-ui/web/core/inter-package.json | 2 +- micro-ui/web/core/package.json | 2 +- micro-ui/web/micro-ui-internals/example/package.json | 2 +- micro-ui/web/micro-ui-internals/package.json | 2 +- micro-ui/web/package.json | 2 +- micro-ui/web/workbench/inter-package.json | 2 +- micro-ui/web/workbench/package.json | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/micro-ui/web/core/inter-package.json b/micro-ui/web/core/inter-package.json index 41a1aaecd38..487e3ee8733 100644 --- a/micro-ui/web/core/inter-package.json +++ b/micro-ui/web/core/inter-package.json @@ -63,7 +63,7 @@ "dependencies": { "lodash": "4.17.21", "microbundle-crl": "0.13.11", - "@egovernments/digit-ui-react-components": "1.8.0-beta.1", + "@egovernments/digit-ui-react-components": "1.8.0-beta.2", "react": "17.0.2", "react-dom": "17.0.2", "react-hook-form": "6.15.8", diff --git a/micro-ui/web/core/package.json b/micro-ui/web/core/package.json index dffae10d6c2..e468f35ee58 100644 --- a/micro-ui/web/core/package.json +++ b/micro-ui/web/core/package.json @@ -18,7 +18,7 @@ "@egovernments/digit-ui-module-workbench": "1.0.0-beta", "@egovernments/digit-ui-module-core": "1.8.0-beta.8", "@egovernments/digit-ui-module-hrms": "1.8.0-beta.2", - "@egovernments/digit-ui-react-components": "1.8.0-beta.1", + "@egovernments/digit-ui-react-components": "1.8.0-beta.2", "@egovernments/digit-ui-module-dss": "1.8.0-beta", "@egovernments/digit-ui-module-common": "1.8.0-beta", "@egovernments/digit-ui-module-utilities": "1.0.0-beta", diff --git a/micro-ui/web/micro-ui-internals/example/package.json b/micro-ui/web/micro-ui-internals/example/package.json index dfe1e6d5196..3688a8fe85d 100644 --- a/micro-ui/web/micro-ui-internals/example/package.json +++ b/micro-ui/web/micro-ui-internals/example/package.json @@ -17,7 +17,7 @@ "@egovernments/digit-ui-module-hrms": "1.8.0-beta.2", "@egovernments/digit-ui-module-utilities": "1.0.0-beta", "@egovernments/digit-ui-module-engagement": "1.5.20", - "@egovernments/digit-ui-react-components": "1.8.0-beta.1", + "@egovernments/digit-ui-react-components": "1.8.0-beta.2", "http-proxy-middleware": "^1.0.5", "react": "17.0.2", "react-dom": "17.0.2", diff --git a/micro-ui/web/micro-ui-internals/package.json b/micro-ui/web/micro-ui-internals/package.json index 41a1aaecd38..487e3ee8733 100644 --- a/micro-ui/web/micro-ui-internals/package.json +++ b/micro-ui/web/micro-ui-internals/package.json @@ -63,7 +63,7 @@ "dependencies": { "lodash": "4.17.21", "microbundle-crl": "0.13.11", - "@egovernments/digit-ui-react-components": "1.8.0-beta.1", + "@egovernments/digit-ui-react-components": "1.8.0-beta.2", "react": "17.0.2", "react-dom": "17.0.2", "react-hook-form": "6.15.8", diff --git a/micro-ui/web/package.json b/micro-ui/web/package.json index fd16a3d49b4..9475c251bff 100644 --- a/micro-ui/web/package.json +++ b/micro-ui/web/package.json @@ -18,7 +18,7 @@ "@egovernments/digit-ui-module-workbench": "1.0.0-beta", "@egovernments/digit-ui-module-core": "1.8.0-beta.8", "@egovernments/digit-ui-module-hrms": "1.8.0-beta.2", - "@egovernments/digit-ui-react-components": "1.8.0-beta.1", + "@egovernments/digit-ui-react-components": "1.8.0-beta.2", "@egovernments/digit-ui-module-dss": "1.8.0-beta", "@egovernments/digit-ui-module-common": "1.8.0-beta", "@egovernments/digit-ui-module-utilities": "1.0.0-beta", diff --git a/micro-ui/web/workbench/inter-package.json b/micro-ui/web/workbench/inter-package.json index f60ad528e32..725b94158e0 100644 --- a/micro-ui/web/workbench/inter-package.json +++ b/micro-ui/web/workbench/inter-package.json @@ -60,7 +60,7 @@ "dependencies": { "lodash": "4.17.21", "microbundle-crl": "0.13.11", - "@egovernments/digit-ui-react-components": "1.8.0-beta.1", + "@egovernments/digit-ui-react-components": "1.8.0-beta.2", "react": "17.0.2", "react-dom": "17.0.2", "react-hook-form": "6.15.8", diff --git a/micro-ui/web/workbench/package.json b/micro-ui/web/workbench/package.json index 75cb3b5a3a1..5ff2af2b30d 100644 --- a/micro-ui/web/workbench/package.json +++ b/micro-ui/web/workbench/package.json @@ -18,7 +18,7 @@ "@egovernments/digit-ui-module-workbench": "1.0.0-beta", "@egovernments/digit-ui-module-core": "1.8.0-beta.10", "@egovernments/digit-ui-module-hrms": "1.8.0-beta.2", - "@egovernments/digit-ui-react-components": "1.8.0-beta.1", + "@egovernments/digit-ui-react-components": "1.8.0-beta.2", "babel-loader": "8.1.0", "react": "17.0.2", "react-dom": "17.0.2", From 547989568cd9d11ae7cc1b272dc18c67a59142d4 Mon Sep 17 00:00:00 2001 From: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> Date: Fri, 10 Nov 2023 14:02:10 +0530 Subject: [PATCH 07/80] Fix :: updated the package version due to some compilation issues (#35) * updated the package version * Update README.md * added utilties for testing * updated the change logs --- micro-ui/web/core/package.json | 16 ++++++++-------- .../web/micro-ui-internals/example/package.json | 16 ++++++++-------- .../web/micro-ui-internals/example/src/index.js | 8 ++++---- .../packages/libraries/package.json | 2 +- .../packages/modules/common/README.md | 1 + .../packages/modules/common/package.json | 2 +- .../packages/modules/core/README.md | 2 ++ .../packages/modules/core/package.json | 4 ++-- .../packages/modules/dss/README.md | 2 ++ .../packages/modules/dss/package.json | 4 ++-- .../packages/modules/hrms/README.md | 2 ++ .../packages/modules/hrms/package.json | 2 +- .../packages/modules/utilities/README.md | 1 + .../packages/modules/utilities/package.json | 4 ++-- .../packages/modules/workbench/README.md | 1 + .../packages/modules/workbench/package.json | 4 ++-- .../packages/react-components/README.md | 3 ++- .../packages/react-components/package.json | 2 +- micro-ui/web/package.json | 16 ++++++++-------- micro-ui/web/workbench/App.js | 2 ++ micro-ui/web/workbench/package.json | 11 ++++++----- 21 files changed, 59 insertions(+), 46 deletions(-) diff --git a/micro-ui/web/core/package.json b/micro-ui/web/core/package.json index e468f35ee58..413bf8e4c86 100644 --- a/micro-ui/web/core/package.json +++ b/micro-ui/web/core/package.json @@ -14,15 +14,15 @@ ], "homepage": "/core-ui", "dependencies": { - "@egovernments/digit-ui-libraries": "1.8.0-beta", - "@egovernments/digit-ui-module-workbench": "1.0.0-beta", - "@egovernments/digit-ui-module-core": "1.8.0-beta.8", - "@egovernments/digit-ui-module-hrms": "1.8.0-beta.2", - "@egovernments/digit-ui-react-components": "1.8.0-beta.2", - "@egovernments/digit-ui-module-dss": "1.8.0-beta", - "@egovernments/digit-ui-module-common": "1.8.0-beta", - "@egovernments/digit-ui-module-utilities": "1.0.0-beta", + "@egovernments/digit-ui-libraries": "1.8.0-beta.1", + "@egovernments/digit-ui-module-workbench": "1.0.0-beta.1", + "@egovernments/digit-ui-module-dss": "1.8.0-beta.2", + "@egovernments/digit-ui-module-core": "1.8.0-beta.11", + "@egovernments/digit-ui-module-common": "1.8.0-beta.1", + "@egovernments/digit-ui-module-hrms": "1.8.0-beta.3", + "@egovernments/digit-ui-module-utilities": "1.0.0-beta.1", "@egovernments/digit-ui-module-engagement": "1.5.20", + "@egovernments/digit-ui-react-components": "1.8.0-beta.3", "babel-loader": "8.1.0", "clean-webpack-plugin": "4.0.0", "react": "17.0.2", diff --git a/micro-ui/web/micro-ui-internals/example/package.json b/micro-ui/web/micro-ui-internals/example/package.json index 3688a8fe85d..31443c22a34 100644 --- a/micro-ui/web/micro-ui-internals/example/package.json +++ b/micro-ui/web/micro-ui-internals/example/package.json @@ -9,15 +9,15 @@ "start": "react-scripts start" }, "devDependencies": { - "@egovernments/digit-ui-libraries": "1.8.0-beta", - "@egovernments/digit-ui-module-workbench": "1.0.0-beta", - "@egovernments/digit-ui-module-dss": "1.8.0-beta", - "@egovernments/digit-ui-module-core": "1.8.0-beta.8", - "@egovernments/digit-ui-module-common": "1.8.0-beta", - "@egovernments/digit-ui-module-hrms": "1.8.0-beta.2", - "@egovernments/digit-ui-module-utilities": "1.0.0-beta", + "@egovernments/digit-ui-libraries": "1.8.0-beta.1", + "@egovernments/digit-ui-module-workbench": "1.0.0-beta.1", + "@egovernments/digit-ui-module-dss": "1.8.0-beta.2", + "@egovernments/digit-ui-module-core": "1.8.0-beta.11", + "@egovernments/digit-ui-module-common": "1.8.0-beta.1", + "@egovernments/digit-ui-module-hrms": "1.8.0-beta.3", + "@egovernments/digit-ui-module-utilities": "1.0.0-beta.1", "@egovernments/digit-ui-module-engagement": "1.5.20", - "@egovernments/digit-ui-react-components": "1.8.0-beta.2", + "@egovernments/digit-ui-react-components": "1.8.0-beta.3", "http-proxy-middleware": "^1.0.5", "react": "17.0.2", "react-dom": "17.0.2", diff --git a/micro-ui/web/micro-ui-internals/example/src/index.js b/micro-ui/web/micro-ui-internals/example/src/index.js index e2946604fc0..a47942f7df2 100644 --- a/micro-ui/web/micro-ui-internals/example/src/index.js +++ b/micro-ui/web/micro-ui-internals/example/src/index.js @@ -7,7 +7,7 @@ import { DigitUI } from "@egovernments/digit-ui-module-core"; import { initDSSComponents } from "@egovernments/digit-ui-module-dss"; import { initEngagementComponents } from "@egovernments/digit-ui-module-engagement"; import { initHRMSComponents } from "@egovernments/digit-ui-module-hrms"; -// import { initUtilitiesComponents } from "@egovernments/digit-ui-module-utilities"; +import { initUtilitiesComponents } from "@egovernments/digit-ui-module-utilities"; import {initWorkbenchComponents} from "@egovernments/digit-ui-module-workbench"; import "@egovernments/digit-ui-css/example/index.css"; @@ -18,9 +18,9 @@ import { UICustomizations } from "./UICustomizations"; var Digit = window.Digit || {}; const enabledModules = [ "DSS", "HRMS", -"Workbench" +"Workbench", // "Engagement", "NDSS","QuickPayLinks", "Payment", - // "Utilities", + "Utilities", //added to check fsm // "FSM" ]; @@ -66,7 +66,7 @@ const initDigitUI = () => { initDSSComponents(); initHRMSComponents(); initEngagementComponents(); - // initUtilitiesComponents(); + initUtilitiesComponents(); initWorkbenchComponents(); diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/package.json b/micro-ui/web/micro-ui-internals/packages/libraries/package.json index c8f1cf4de7d..ec0bbcd84b4 100644 --- a/micro-ui/web/micro-ui-internals/packages/libraries/package.json +++ b/micro-ui/web/micro-ui-internals/packages/libraries/package.json @@ -1,6 +1,6 @@ { "name": "@egovernments/digit-ui-libraries", - "version": "1.8.0-beta", + "version": "1.8.0-beta.1", "main": "dist/index.js", "module": "dist/index.modern.js", "source": "src/index.js", diff --git a/micro-ui/web/micro-ui-internals/packages/modules/common/README.md b/micro-ui/web/micro-ui-internals/packages/modules/common/README.md index dcf4b64180f..38055fafeca 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/common/README.md +++ b/micro-ui/web/micro-ui-internals/packages/modules/common/README.md @@ -56,6 +56,7 @@ const initDigitUI = () => { # Changelog ```bash +1.8.0-beta.1 republished due to some version issues 1.8.0-beta workbench base version beta release 1.7.0 urban 2.9 1.6.0 urban 2.8 diff --git a/micro-ui/web/micro-ui-internals/packages/modules/common/package.json b/micro-ui/web/micro-ui-internals/packages/modules/common/package.json index d6c652f598e..a89bd5df141 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/common/package.json +++ b/micro-ui/web/micro-ui-internals/packages/modules/common/package.json @@ -1,6 +1,6 @@ { "name": "@egovernments/digit-ui-module-common", - "version": "1.8.0-beta", + "version": "1.8.0-beta.1", "license": "MIT", "main": "dist/index.js", "module": "dist/index.modern.js", diff --git a/micro-ui/web/micro-ui-internals/packages/modules/core/README.md b/micro-ui/web/micro-ui-internals/packages/modules/core/README.md index 55818c33362..a54daf3760d 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/core/README.md +++ b/micro-ui/web/micro-ui-internals/packages/modules/core/README.md @@ -65,6 +65,8 @@ with # Changelog ```bash +1.8.0-beta.11 republished due to some version issues +1.8.0-beta.10 Constants updated for mgramsewa 1.8.0-beta.9 Updated How It works screen to take header from mdms config and show pdf card only when required 1.8.0-beta.8 redefine addtional component to render only under employee home page 1.8.0-beta.6 added addtional component render for tqm modules diff --git a/micro-ui/web/micro-ui-internals/packages/modules/core/package.json b/micro-ui/web/micro-ui-internals/packages/modules/core/package.json index 27aad9753ed..fc829eab54d 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/core/package.json +++ b/micro-ui/web/micro-ui-internals/packages/modules/core/package.json @@ -1,6 +1,6 @@ { "name": "@egovernments/digit-ui-module-core", - "version": "1.8.0-beta.10", + "version": "1.8.0-beta.11", "license": "MIT", "main": "dist/index.js", "module": "dist/index.modern.js", @@ -14,7 +14,7 @@ "prepublish": "yarn build" }, "dependencies": { - "@egovernments/digit-ui-react-components": "1.8.0-beta.1", + "@egovernments/digit-ui-react-components": "1.8.0-beta.3", "react": "17.0.2", "react-dom": "17.0.2", "react-i18next": "11.16.2", diff --git a/micro-ui/web/micro-ui-internals/packages/modules/dss/README.md b/micro-ui/web/micro-ui-internals/packages/modules/dss/README.md index e1beda59339..3fa5409f9b4 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/dss/README.md +++ b/micro-ui/web/micro-ui-internals/packages/modules/dss/README.md @@ -153,6 +153,8 @@ const useGetCustomFilterRequestValues = (filterConfigs, config={}) => { # Changelog ```bash +1.8.0-beta.2 republished due to some version issues +1.8.0-beta.1 fixes 1.8.0-beta workbench base version beta release 1.7.0 urban 2.9 1.6.0 urban 2.8 diff --git a/micro-ui/web/micro-ui-internals/packages/modules/dss/package.json b/micro-ui/web/micro-ui-internals/packages/modules/dss/package.json index c504ae37c13..595f1276847 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/dss/package.json +++ b/micro-ui/web/micro-ui-internals/packages/modules/dss/package.json @@ -1,6 +1,6 @@ { "name": "@egovernments/digit-ui-module-dss", - "version": "1.8.0-beta.1", + "version": "1.8.0-beta.2", "license": "MIT", "main": "dist/index.js", "module": "dist/index.modern.js", @@ -18,7 +18,7 @@ "react-router-dom": "5.3.0" }, "dependencies": { - "@egovernments/digit-ui-react-components": "1.8.0-beta.2", + "@egovernments/digit-ui-react-components": "1.8.0-beta.3", "jsonpath": "^1.1.1", "react": "17.0.2", "react-date-range": "1.3.0", diff --git a/micro-ui/web/micro-ui-internals/packages/modules/hrms/README.md b/micro-ui/web/micro-ui-internals/packages/modules/hrms/README.md index dc9df96fe0d..80e8cee0f99 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/hrms/README.md +++ b/micro-ui/web/micro-ui-internals/packages/modules/hrms/README.md @@ -52,6 +52,8 @@ const initDigitUI = () => { # Changelog ```bash +1.8.0-beta.3 republished due to some version issues +1.8.0-beta.2 fixes 1.8.0-beta.01 fixed compilation issue 1.8.0-beta workbench base version beta release 1.7.0 urban 2.9 diff --git a/micro-ui/web/micro-ui-internals/packages/modules/hrms/package.json b/micro-ui/web/micro-ui-internals/packages/modules/hrms/package.json index f2c2c25bd25..623c002e54d 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/hrms/package.json +++ b/micro-ui/web/micro-ui-internals/packages/modules/hrms/package.json @@ -1,6 +1,6 @@ { "name": "@egovernments/digit-ui-module-hrms", - "version": "1.8.0-beta.2", + "version": "1.8.0-beta.3", "description": "HRMS", "license": "MIT", "main": "dist/index.js", diff --git a/micro-ui/web/micro-ui-internals/packages/modules/utilities/README.md b/micro-ui/web/micro-ui-internals/packages/modules/utilities/README.md index fdf705ae919..bb7f48c45fc 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/utilities/README.md +++ b/micro-ui/web/micro-ui-internals/packages/modules/utilities/README.md @@ -124,6 +124,7 @@ _Bill Module # Changelog ```bash +1.0.0-beta.1 republished due to some version issues 1.0.0-beta workbench base version beta release 0.0.8 fix response data for custom compnent in inbox composer 0.0.7 updated the readme content diff --git a/micro-ui/web/micro-ui-internals/packages/modules/utilities/package.json b/micro-ui/web/micro-ui-internals/packages/modules/utilities/package.json index 2554f237af0..ca588d14086 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/utilities/package.json +++ b/micro-ui/web/micro-ui-internals/packages/modules/utilities/package.json @@ -1,6 +1,6 @@ { "name": "@egovernments/digit-ui-module-utilities", - "version": "1.0.0-beta", + "version": "1.0.0-beta.1", "description": "Utilities Module UI", "main": "dist/index.js", "module": "dist/index.modern.js", @@ -18,7 +18,7 @@ "react-router-dom": "5.3.0" }, "dependencies": { - "@egovernments/digit-ui-react-components": "1.8.0-beta", + "@egovernments/digit-ui-react-components": "1.8.0-beta.3", "react": "17.0.2", "react-date-range": "^1.4.0", "react-dom": "17.0.2", diff --git a/micro-ui/web/micro-ui-internals/packages/modules/workbench/README.md b/micro-ui/web/micro-ui-internals/packages/modules/workbench/README.md index 1fe3bf29fca..759fe5efebd 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/workbench/README.md +++ b/micro-ui/web/micro-ui-internals/packages/modules/workbench/README.md @@ -103,6 +103,7 @@ https://github.com/egovernments/DIGIT-OSS/pull/99/commits/6e711bdc005c226c7debd5 ### Changelog ```bash +1.0.0-beta.1 republished due to some version issues 1.0.0-beta workbench base version beta release 0.0.3 readme updated 0.0.2 readme updated diff --git a/micro-ui/web/micro-ui-internals/packages/modules/workbench/package.json b/micro-ui/web/micro-ui-internals/packages/modules/workbench/package.json index fc0cd49d9ac..893f12a5c80 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/workbench/package.json +++ b/micro-ui/web/micro-ui-internals/packages/modules/workbench/package.json @@ -1,6 +1,6 @@ { "name": "@egovernments/digit-ui-module-workbench", - "version": "1.0.0-beta", + "version": "1.0.0-beta.1", "description": "Workbench", "main": "dist/index.js", "module": "dist/index.modern.js", @@ -18,7 +18,7 @@ "react-router-dom": "5.3.0" }, "dependencies": { - "@egovernments/digit-ui-react-components": "1.8.0-beta.1", + "@egovernments/digit-ui-react-components": "1.8.0-beta.3", "@rjsf/core": "5.10.0", "@rjsf/utils": "5.10.0", "@rjsf/validator-ajv8": "5.10.0", diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/README.md b/micro-ui/web/micro-ui-internals/packages/react-components/README.md index 4d5c93bc114..b834ef723a6 100644 --- a/micro-ui/web/micro-ui-internals/packages/react-components/README.md +++ b/micro-ui/web/micro-ui-internals/packages/react-components/README.md @@ -88,7 +88,8 @@ Syntax for the FormComposersV2 # Changelog ```bash -1.0.0-beta.2 Added Some icons for pqm dashboard +1.8.0-beta.3 republished due to some issues +1.8.0-beta.2 Added Some icons for pqm dashboard 1.8.0-beta.1 fixed some topbar issues 1.8.0-beta workbench base version beta release 1.7.0 urban 2.9 diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/package.json b/micro-ui/web/micro-ui-internals/packages/react-components/package.json index 2101552ef33..539891994d5 100644 --- a/micro-ui/web/micro-ui-internals/packages/react-components/package.json +++ b/micro-ui/web/micro-ui-internals/packages/react-components/package.json @@ -1,6 +1,6 @@ { "name": "@egovernments/digit-ui-react-components", - "version": "1.8.0-beta.2", + "version": "1.8.0-beta.3", "license": "MIT", "main": "dist/index.js", "module": "dist/index.modern.js", diff --git a/micro-ui/web/package.json b/micro-ui/web/package.json index 9475c251bff..b0df8deb185 100644 --- a/micro-ui/web/package.json +++ b/micro-ui/web/package.json @@ -14,15 +14,15 @@ ], "homepage": "/digit-ui", "dependencies": { - "@egovernments/digit-ui-libraries": "1.8.0-beta", - "@egovernments/digit-ui-module-workbench": "1.0.0-beta", - "@egovernments/digit-ui-module-core": "1.8.0-beta.8", - "@egovernments/digit-ui-module-hrms": "1.8.0-beta.2", - "@egovernments/digit-ui-react-components": "1.8.0-beta.2", - "@egovernments/digit-ui-module-dss": "1.8.0-beta", - "@egovernments/digit-ui-module-common": "1.8.0-beta", - "@egovernments/digit-ui-module-utilities": "1.0.0-beta", + "@egovernments/digit-ui-libraries": "1.8.0-beta.1", + "@egovernments/digit-ui-module-workbench": "1.0.0-beta.1", + "@egovernments/digit-ui-module-dss": "1.8.0-beta.2", + "@egovernments/digit-ui-module-core": "1.8.0-beta.11", + "@egovernments/digit-ui-module-common": "1.8.0-beta.1", + "@egovernments/digit-ui-module-hrms": "1.8.0-beta.3", + "@egovernments/digit-ui-module-utilities": "1.0.0-beta.1", "@egovernments/digit-ui-module-engagement": "1.5.20", + "@egovernments/digit-ui-react-components": "1.8.0-beta.3", "babel-loader": "8.1.0", "clean-webpack-plugin": "4.0.0", "react": "17.0.2", diff --git a/micro-ui/web/workbench/App.js b/micro-ui/web/workbench/App.js index 7d539bf3eae..9841ae54311 100644 --- a/micro-ui/web/workbench/App.js +++ b/micro-ui/web/workbench/App.js @@ -4,6 +4,7 @@ import { DigitUI } from "@egovernments/digit-ui-module-core"; import { initHRMSComponents } from "@egovernments/digit-ui-module-hrms"; import { UICustomizations } from "./Customisations/UICustomizations"; import { initWorkbenchComponents } from "@egovernments/digit-ui-module-workbench"; +import { initUtilitiesComponents } from "@egovernments/digit-ui-module-utilities"; window.contextPath = window?.globalConfigs?.getConfig("CONTEXT_PATH"); @@ -27,6 +28,7 @@ const initDigitUI = () => { commonUiConfig: UICustomizations, }; initHRMSComponents(); + initUtilitiesComponents(); initWorkbenchComponents(); }; diff --git a/micro-ui/web/workbench/package.json b/micro-ui/web/workbench/package.json index 5ff2af2b30d..c76a6e7f7c3 100644 --- a/micro-ui/web/workbench/package.json +++ b/micro-ui/web/workbench/package.json @@ -14,11 +14,12 @@ ], "homepage": "/workbench-ui", "dependencies": { - "@egovernments/digit-ui-libraries": "1.8.0-beta", - "@egovernments/digit-ui-module-workbench": "1.0.0-beta", - "@egovernments/digit-ui-module-core": "1.8.0-beta.10", - "@egovernments/digit-ui-module-hrms": "1.8.0-beta.2", - "@egovernments/digit-ui-react-components": "1.8.0-beta.2", + "@egovernments/digit-ui-libraries": "1.8.0-beta.1", + "@egovernments/digit-ui-module-workbench": "1.0.0-beta.1", + "@egovernments/digit-ui-module-core": "1.8.0-beta.11", + "@egovernments/digit-ui-module-hrms": "1.8.0-beta.3", + "@egovernments/digit-ui-module-utilities": "1.0.0-beta.1", + "@egovernments/digit-ui-react-components": "1.8.0-beta.3", "babel-loader": "8.1.0", "react": "17.0.2", "react-dom": "17.0.2", From b9ed15849ee6a5424cb20b91fbbbe97e9f723a99 Mon Sep 17 00:00:00 2001 From: Nipun Arora Date: Wed, 15 Nov 2023 20:24:24 +0530 Subject: [PATCH 08/80] ViewComposer: Generic View Component (#27) * updated to latest core version in code * Generic ViewComposer --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> --- .../src/hoc/ViewComposer/Readme.md | 126 ++++++++++++ .../src/hoc/ViewComposer/index.js | 182 ++++++++++++++++++ .../src/hoc/ViewComposer/renderUtils.js | 151 +++++++++++++++ .../packages/react-components/src/index.js | 3 + 4 files changed, 462 insertions(+) create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/hoc/ViewComposer/Readme.md create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/hoc/ViewComposer/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/hoc/ViewComposer/renderUtils.js diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/hoc/ViewComposer/Readme.md b/micro-ui/web/micro-ui-internals/packages/react-components/src/hoc/ViewComposer/Readme.md new file mode 100644 index 00000000000..b4889bd20d6 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/hoc/ViewComposer/Readme.md @@ -0,0 +1,126 @@ +# Intro: + +ViewComposer is basically a replacement of ApplicationDetails component which was a generic component for View Screens. That got very cluttered with custom logic. So to keep the business logic abstract and generic we made this component. + +## High level steps to use: +1. Simply import it from react-components library +2. It expects two things as props -> data,isLoading +3. data contains all the details to show in the view screen with specific format, basically we'll be returning this data object from the hook call. + +### Format of data expected by ViewComposer +Below is an example object: + + + + +4. Basically cards is an array of objects each representing a Card in the View Screen. +5. Each card can have multiple sections with the following types defined: [DATA,DOCUMENTS,WFHISTORY,WFACTIONS,COMPONENT] +6. We can render content based on these types defined. + + +#### Final Summary +1. Import ViewComposer +2. Write hook call that returns data expected by the ViewComposer +3. Pass in the data and isLoading props and Viola! + + + + + diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/hoc/ViewComposer/index.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/hoc/ViewComposer/index.js new file mode 100644 index 00000000000..6658a227b31 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/hoc/ViewComposer/index.js @@ -0,0 +1,182 @@ +import React, { Fragment, useState } from "react"; +import Card from "../../atoms/Card"; +import { Loader } from "../../atoms/Loader"; +import { RenderDataSection, RenderDocumentsSection, RenderWfActions, RenderWfHistorySection } from "./renderUtils"; +import HorizontalNav from "../../atoms/HorizontalNav"; +import CardSubHeader from "../../atoms/CardSubHeader"; + +// format of data expected by this component + +// { +// cards:[ +// { +// sections: [ +// { +// type: "DATA", +// sectionHeader: { value: "Section 1", inlineStyles: {} }, +// cardHeader: { value: "Card 2", inlineStyles: {} }, +// values: [ +// { +// key: "key 1", +// value: "value 1", +// }, +// { +// key: "key 2", +// value: "value 2", +// }, +// { +// key: "key 3", +// value: "value 3", +// }, +// ], +// }, +// { +// type: "DATA", +// sectionHeader: { value: "Section 2", inlineStyles: { marginTop: "2rem" } }, +// // cardHeader:{value:"Card 1",inlineStyles:{}}, +// values: [ +// { +// key: "key 1", +// value: "value 1", +// }, +// { +// key: "key 2", +// value: "value 2", +// }, +// { +// key: "key 3", +// value: "value 3", +// }, +// ], +// }, +// { +// type: "DOCUMENTS", +// documents: [ +// { +// title: "WORKS_RELEVANT_DOCUMENTS", +// BS: "Works", +// values: [ +// { +// title: "Proposal document", +// documentType: "PROJECT_PROPOSAL", +// documentUid: "cfed582b-31b0-42e9-985f-fb9bb4543670", +// fileStoreId: "cfed582b-31b0-42e9-985f-fb9bb4543670", +// }, +// { +// title: "Finalised worklist", +// documentType: "FINALIZED_WORKLIST", +// documentUid: "f7543894-d3a1-4263-acb2-58b1383eebec", +// fileStoreId: "f7543894-d3a1-4263-acb2-58b1383eebec", +// }, +// { +// title: "Feasibility analysis", +// documentType: "FEASIBILITY_ANALYSIS", +// documentUid: "c4fb4f5d-a4c3-472e-8991-e05bc2d671f5", +// fileStoreId: "c4fb4f5d-a4c3-472e-8991-e05bc2d671f5", +// }, +// ], +// }, +// ], +// inlineStyles: { +// marginTop: "1rem", +// }, +// }, +// { +// type: "WFHISTORY", +// businessService: "ESTIMATE", +// applicationNo: "ES/2023-24/000828", +// tenantId: "pg.citya", +// timelineStatusPrefix: "TEST", +// }, +// { +// type: "WFACTIONS", +// forcedActionPrefix: "TEST", +// businessService: "ESTIMATE", +// applicationNo: "ES/2023-24/000828", +// tenantId: "pg.citya", +// applicationDetails: {}, +// url: "/estimate/v1/_update", +// moduleCode: "Estimate", +// editApplicationNumber: undefined, +// }, +// ], +// }, +// ], +// apiResponse:{}, +// additionalDetails:{} +// } + +const renderCardSectionJSX = (section) => { + const { type } = section; + switch (type) { + case "DATA": + return ; + case "DOCUMENTS": + return ; + case "WFHISTORY": + return ; + case "WFACTIONS": + return ; + case "COMPONENT": + const Component = Digit.ComponentRegistryService.getComponent(section.component); + return ( + <> + {section.cardHeader && {section.cardHeader.value}} + + + ); + default: + return null; + } +}; + +//data is the response of the hook call for View Screen +const ViewComposer = ({ isLoading = false, data, ...props }) => { + const { cards } = data; + const [activeNav, setActiveNav] = useState(data?.horizontalNav?.activeByDefault); + + + if (isLoading) return ; + + return ( + <> + {/* This first {} is for rendering cards at the top without navigationKey(out of navbar) */} + {cards + ?.filter((card) => !card?.navigationKey && card?.sections) + ?.map((card, cardIdx) => { + const { sections } = card; + return ( + + {sections?.map((section, sectionIdx) => { + return renderCardSectionJSX(section); + })} + + ); + })} + {/* This second section is for rendering cards that are part of the navBar) */} + + + {cards + ?.filter((card) => card?.navigationKey) + ?.map((card, cardIdx) => { + const { sections } = card; + return ( + + {sections?.map((section, sectionIdx) => { + return renderCardSectionJSX(section); + })} + + ); + })} + + + ); +}; + +export default ViewComposer; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/hoc/ViewComposer/renderUtils.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/hoc/ViewComposer/renderUtils.js new file mode 100644 index 00000000000..78035cfd025 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/hoc/ViewComposer/renderUtils.js @@ -0,0 +1,151 @@ +import React, { Fragment, useState, useEffect } from "react"; +import CardSectionHeader from "../../atoms/CardSectionHeader"; +import { StatusTable, Row } from "../../atoms/StatusTable"; +import CardSubHeader from "../../atoms/CardSubHeader"; +import { useTranslation } from "react-i18next"; +import { PDFSvg } from "../../atoms/svgindex"; +import WorkflowTimeline from "../../atoms/WorkflowTimeline"; +import WorkflowActions from "../../atoms/WorkflowActions"; +import { Link } from "react-router-dom"; + +export const RenderDataSection = ({ section }) => { + const { t } = useTranslation(); + return ( + <> + {section.cardHeader && {section.cardHeader.value}} + + {section.sectionHeader && {section.sectionHeader.value}} + {section.values.map((row, rowIdx) => { + return ( + + + + {row?.value} + + +
+ ) : row?.isSla ? ( + {row?.value} + ) : ( + row.value + ) + } + last={rowIdx === section.values?.length - 1} + caption={row.caption} + className="border-none" + /* privacy object set to the Row Component */ + privacy={row?.value?.privacy} + rowContainerStyle={{}} + textStyle={{}} + labelStyle={{}} + amountStyle={{}} + /> + ); + })} + + + ); +}; + +export const RenderDocumentsSection = ({ section }) => { + const { documents } = section; + const { t } = useTranslation(); + const [filesArray, setFilesArray] = useState(() => []); + const tenantId = Digit.ULBService.getCurrentTenantId(); + const [pdfFiles, setPdfFiles] = useState({}); + + useEffect(() => { + let acc = []; + documents?.forEach((element, index, array) => { + acc = [...acc, ...(element.values ? element.values : [])]; + }); + setFilesArray(acc?.map((value) => value?.fileStoreId)); + }, [documents]); + + useEffect(() => { + if (filesArray?.length && documents?.[0]?.BS === "BillAmend") { + Digit.UploadServices.Filefetch(filesArray, Digit.ULBService.getCurrentTenantId()).then((res) => { + setPdfFiles(res?.data); + }); + } else if (filesArray?.length) { + Digit.UploadServices.Filefetch(filesArray, Digit.ULBService.getCurrentTenantId()).then((res) => { + setPdfFiles(res?.data); + }); + } + }, [filesArray]); + + return ( +
+ {documents?.map((document, index) => ( + + {document?.title ? {t(document?.title)} : null} +
+ {document?.values && document?.values.length > 0 + ? document?.values?.map((value, index) => ( + +
+ +
+

{t(value?.title)}

+
+ )) + : !window.location.href.includes("citizen") && ( +
+

{t("BPA_NO_DOCUMENTS_UPLOADED_LABEL")}

+
+ )} +
+
+ ))} +
+ ); +}; + +export const RenderWfHistorySection = ({ section }) => { + const { businessService, applicationNo, tenantId, timelineStatusPrefix = undefined, statusAttribute = undefined } = section; + return ( + + ); +}; + +export const RenderWfActions = ({ section }) => { + const { + forcedActionPrefix = undefined, + businessService, + applicationNo, + tenantId, + applicationDetails, + url, + moduleCode = "Estimate", + editApplicationNumber, + } = section; + + return ( + + ); +}; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/index.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/index.js index ed408dc198f..904da87c8af 100644 --- a/micro-ui/web/micro-ui-internals/packages/react-components/src/index.js +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/index.js @@ -290,7 +290,10 @@ import Tutorial from "./hoc/Tutorial/Tutorial"; import { useTourState,TourProvider } from "./hoc/Tutorial/TourProvider"; import Help from "./hoc/Tutorial/Help"; +//View Composer +import ViewComposer from "./hoc/ViewComposer"; export { + ViewComposer, HelpOutlineIcon, InputIcon, TreatmentQualityIcon, From 723e3267efe4a2b40fe6f8be8c85adc417861de5 Mon Sep 17 00:00:00 2001 From: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> Date: Thu, 16 Nov 2023 11:13:09 +0530 Subject: [PATCH 09/80] Updated the Help tour for workbench (#36) * help Tour changes added for different screen * added for localisation screen --- .../src/pages/employee/LocalisationSearch.js | 2 +- .../src/pages/employee/MDMSManageMaster.js | 4 +- .../src/pages/employee/MDMSSearchv2.js | 2 +- .../modules/workbench/src/utils/TourSteps.js | 115 +++++++++++++++++- 4 files changed, 114 insertions(+), 9 deletions(-) diff --git a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/LocalisationSearch.js b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/LocalisationSearch.js index b5f28981579..e9c08b90fdf 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/LocalisationSearch.js +++ b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/LocalisationSearch.js @@ -129,7 +129,7 @@ const LocalisationSearch = () => { { Config && Digit.Utils.didEmployeeHasRole(Config?.actionRole) && - { + { history.push(`/${window?.contextPath}/employee/${Config?.actionLink}`); }} label={t("WBH_ADD_LOCALISATION")} /> diff --git a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSManageMaster.js b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSManageMaster.js index a9e524515c4..6b06c599058 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSManageMaster.js +++ b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSManageMaster.js @@ -166,7 +166,7 @@ const MDMSManageMaster = () => { { @@ -183,7 +183,7 @@ const MDMSManageMaster = () => { { diff --git a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSSearchv2.js b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSSearchv2.js index 6dc6373f088..8230fbe9427 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSSearchv2.js +++ b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSSearchv2.js @@ -225,7 +225,7 @@ const MDMSSearchv2 = () => { { updatedConfig && Digit.Utils.didEmployeeHasRole(updatedConfig?.actionRole) && - + } {updatedConfig &&
diff --git a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/utils/TourSteps.js b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/utils/TourSteps.js index 1ab8535be8a..5ab880c52cf 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/utils/TourSteps.js +++ b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/utils/TourSteps.js @@ -3,15 +3,24 @@ export const TourSteps = { { content: 'Welcome to Manage Master Data screen. Here you can search and update any master data that is configured for the logged in user tenant', - target: '.employee-app-wrapper', + target: '.manage-master-wrapper', + disableBeacon: true, + placement: 'bottom', + title:"Manage Master Data" + }, + { + content: + 'Select any module name where the master is present', + target: '.wbh-mdms-module-name', disableBeacon: true, placement: 'center', title:"Manage Master Data" }, + { content: - 'Select a module and master name. This will take you to that particular masters search screen where you can add, search, view and update the master data added under that master', - target: '.manage-master-wrapper', + 'Select any master name where the master is present', + target: '.wbh-mdms-master-name', disableBeacon: true, placement: 'center', title:"Manage Master Data" @@ -21,7 +30,23 @@ export const TourSteps = { { content: 'Welcome to the master data search screen. Here you can search the master data added under this master', - target: '.action-bar-wrap', + target: '.search-wrapper', + disableBeacon: true, + placement: 'bottom', + title:"Manage Master Data" + }, + { + content: + 'Select any field value and enter the text by which data can be filtered', + target: '.label-field-pair', + disableBeacon: true, + placement: 'bottom', + title:"Manage Master Data" + }, + { + content: + 'Filter the master data by clicking on this search by selecting any field and exact value', + target: '.search-button-wrapper', disableBeacon: true, placement: 'bottom', title:"Manage Master Data" @@ -29,11 +54,91 @@ export const TourSteps = { { content: 'To add new master data under this master click on the Add Master Data button', + target: '.mdms-add-btn', + disableBeacon: true, + placement: 'auto', + title:"Manage Master Data" + }, + + ], + '/workbench-ui/employee/workbench/mdms-add-v2':[ + { + content: + 'Welcome to the master data search screen. Here you can search the master data added under this master', + target: '.field-string', + disableBeacon: true, + placement: 'bottom', + title:"Manage Master Data" + }, + { + content: + 'select the Reference master data', + target: '.form-select ', + disableBeacon: true, + placement: 'bottom', + title:"Manage Master Data" + }, + { + content: + 'Fill all the details by clicking on the Add Master Data', + target: '.submit-bar', + disableBeacon: true, + placement: 'auto', + title:"Manage Master Data" + }, + + ], + '/workbench-ui/employee/workbench/mdms-view':[ + { + content: + 'Welcome to the master data search screen. Here you can search the master data added under this master', target: '.action-bar-wrap', disableBeacon: true, + placement: 'bottom', + title:"Manage Master Data" + }, + { + content: + 'select the Reference master data', + target: '.menu-wrap', + disableBeacon: true, + placement: 'bottom', + title:"Manage Master Data" + } + ], + '/workbench-ui/employee/workbench/localisation-search':[ + { + content: + 'Welcome to the master data search screen. Here you can search the master data added under this master', + target: '.search-wrapper', + disableBeacon: true, + placement: 'bottom', + title:"Manage Master Data" + }, + { + content: + 'Select any field value and enter the text by which data can be filtered', + target: '.label-field-pair', + disableBeacon: true, + placement: 'bottom', + title:"Manage Master Data" + }, + { + content: + 'Filter the master data by clicking on this search by selecting any field and exact value', + target: '.search-button-wrapper', + disableBeacon: true, + placement: 'bottom', + title:"Manage Master Data" + }, + { + content: + 'To add new master data under this master click on the Add Master Data button', + target: '.mdms-add-btn', + disableBeacon: true, placement: 'auto', title:"Manage Master Data" }, - ] + ], } From 6e233fa4eb253e2576cd517c152c829e1747524c Mon Sep 17 00:00:00 2001 From: Nipun Arora Date: Fri, 17 Nov 2023 14:38:42 +0530 Subject: [PATCH 10/80] Added custom topbar support (#37) --- micro-ui/web/core/package.json | 2 +- .../micro-ui-internals/example/package.json | 2 +- .../micro-ui-internals/example/src/index.js | 4 ++-- .../packages/modules/core/package.json | 2 +- .../packages/modules/core/src/Module.js | 5 ++++- .../src/components/TopBarSideBar/TopBar.js | 20 +++++++++++++++++++ micro-ui/web/package.json | 2 +- micro-ui/web/src/App.js | 4 ++-- 8 files changed, 32 insertions(+), 9 deletions(-) diff --git a/micro-ui/web/core/package.json b/micro-ui/web/core/package.json index 413bf8e4c86..9400e301c9e 100644 --- a/micro-ui/web/core/package.json +++ b/micro-ui/web/core/package.json @@ -17,7 +17,7 @@ "@egovernments/digit-ui-libraries": "1.8.0-beta.1", "@egovernments/digit-ui-module-workbench": "1.0.0-beta.1", "@egovernments/digit-ui-module-dss": "1.8.0-beta.2", - "@egovernments/digit-ui-module-core": "1.8.0-beta.11", + "@egovernments/digit-ui-module-core": "1.8.0-beta.12", "@egovernments/digit-ui-module-common": "1.8.0-beta.1", "@egovernments/digit-ui-module-hrms": "1.8.0-beta.3", "@egovernments/digit-ui-module-utilities": "1.0.0-beta.1", diff --git a/micro-ui/web/micro-ui-internals/example/package.json b/micro-ui/web/micro-ui-internals/example/package.json index 31443c22a34..f1a32f47ae2 100644 --- a/micro-ui/web/micro-ui-internals/example/package.json +++ b/micro-ui/web/micro-ui-internals/example/package.json @@ -12,7 +12,7 @@ "@egovernments/digit-ui-libraries": "1.8.0-beta.1", "@egovernments/digit-ui-module-workbench": "1.0.0-beta.1", "@egovernments/digit-ui-module-dss": "1.8.0-beta.2", - "@egovernments/digit-ui-module-core": "1.8.0-beta.11", + "@egovernments/digit-ui-module-core": "1.8.0-beta.12", "@egovernments/digit-ui-module-common": "1.8.0-beta.1", "@egovernments/digit-ui-module-hrms": "1.8.0-beta.3", "@egovernments/digit-ui-module-utilities": "1.0.0-beta.1", diff --git a/micro-ui/web/micro-ui-internals/example/src/index.js b/micro-ui/web/micro-ui-internals/example/src/index.js index a47942f7df2..1f2a9535c51 100644 --- a/micro-ui/web/micro-ui-internals/example/src/index.js +++ b/micro-ui/web/micro-ui-internals/example/src/index.js @@ -3,7 +3,7 @@ import ReactDOM from "react-dom"; import { initLibraries } from "@egovernments/digit-ui-libraries"; // import { paymentConfigs, PaymentLinks, PaymentModule } from "@egovernments/digit-ui-module-common"; -import { DigitUI } from "@egovernments/digit-ui-module-core"; +import { DigitUI, initCoreComponents } from "@egovernments/digit-ui-module-core"; import { initDSSComponents } from "@egovernments/digit-ui-module-dss"; import { initEngagementComponents } from "@egovernments/digit-ui-module-engagement"; import { initHRMSComponents } from "@egovernments/digit-ui-module-hrms"; @@ -62,7 +62,7 @@ const initDigitUI = () => { // ...paymentConfigs, // PaymentLinks, }); - + initCoreComponents(); initDSSComponents(); initHRMSComponents(); initEngagementComponents(); diff --git a/micro-ui/web/micro-ui-internals/packages/modules/core/package.json b/micro-ui/web/micro-ui-internals/packages/modules/core/package.json index fc829eab54d..8c743429269 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/core/package.json +++ b/micro-ui/web/micro-ui-internals/packages/modules/core/package.json @@ -1,6 +1,6 @@ { "name": "@egovernments/digit-ui-module-core", - "version": "1.8.0-beta.11", + "version": "1.8.0-beta.12", "license": "MIT", "main": "dist/index.js", "module": "dist/index.modern.js", diff --git a/micro-ui/web/micro-ui-internals/packages/modules/core/src/Module.js b/micro-ui/web/micro-ui-internals/packages/modules/core/src/Module.js index 95a29d9877a..631bf4ca839 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/core/src/Module.js +++ b/micro-ui/web/micro-ui-internals/packages/modules/core/src/Module.js @@ -6,7 +6,8 @@ import { Provider } from "react-redux"; import { BrowserRouter as Router } from "react-router-dom"; import { DigitApp } from "./App"; import SelectOtp from "./pages/citizen/Login/SelectOtp"; - +import ChangeCity from "./components/ChangeCity"; +import ChangeLanguage from "./components/ChangeLanguage"; import { useState } from "react"; import ErrorBoundary from "./components/ErrorBoundaries"; import getStore from "./redux/store"; @@ -109,6 +110,8 @@ export const DigitUI = ({ stateCode, registry, enabledModules, moduleReducers ,d const componentsToRegister = { SelectOtp, + ChangeCity, + ChangeLanguage }; export const initCoreComponents = () => { diff --git a/micro-ui/web/micro-ui-internals/packages/modules/core/src/components/TopBarSideBar/TopBar.js b/micro-ui/web/micro-ui-internals/packages/modules/core/src/components/TopBarSideBar/TopBar.js index 35c42afb6d8..8ad73980407 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/core/src/components/TopBarSideBar/TopBar.js +++ b/micro-ui/web/micro-ui-internals/packages/modules/core/src/components/TopBarSideBar/TopBar.js @@ -98,6 +98,26 @@ const TopBar = ({ ); } const loggedin = userDetails?.access_token ? true : false; + + //checking for custom topbar components + const CustomEmployeeTopBar = Digit.ComponentRegistryService?.getComponent("CustomEmployeeTopBar") + + if(CustomEmployeeTopBar) { + return + } return (
{mobileView ? : null} diff --git a/micro-ui/web/package.json b/micro-ui/web/package.json index b0df8deb185..08a398acc6f 100644 --- a/micro-ui/web/package.json +++ b/micro-ui/web/package.json @@ -17,7 +17,7 @@ "@egovernments/digit-ui-libraries": "1.8.0-beta.1", "@egovernments/digit-ui-module-workbench": "1.0.0-beta.1", "@egovernments/digit-ui-module-dss": "1.8.0-beta.2", - "@egovernments/digit-ui-module-core": "1.8.0-beta.11", + "@egovernments/digit-ui-module-core": "1.8.0-beta.12", "@egovernments/digit-ui-module-common": "1.8.0-beta.1", "@egovernments/digit-ui-module-hrms": "1.8.0-beta.3", "@egovernments/digit-ui-module-utilities": "1.0.0-beta.1", diff --git a/micro-ui/web/src/App.js b/micro-ui/web/src/App.js index 26a4f11a8ed..dcd063a5449 100644 --- a/micro-ui/web/src/App.js +++ b/micro-ui/web/src/App.js @@ -5,7 +5,7 @@ import { PaymentLinks, PaymentModule, } from "@egovernments/digit-ui-module-common"; -import { DigitUI } from "@egovernments/digit-ui-module-core"; +import { DigitUI,initCoreComponents } from "@egovernments/digit-ui-module-core"; import { initDSSComponents } from "@egovernments/digit-ui-module-dss"; import { initEngagementComponents } from "@egovernments/digit-ui-module-engagement"; import { initHRMSComponents } from "@egovernments/digit-ui-module-hrms"; @@ -34,7 +34,7 @@ const initDigitUI = () => { ...paymentConfigs, PaymentLinks, }); - + initCoreComponents(); initDSSComponents(); initHRMSComponents(); initEngagementComponents(); From e8f62d0764a0319fd2faed8cd42c89dac97585a3 Mon Sep 17 00:00:00 2001 From: Nipun Arora Date: Tue, 21 Nov 2023 09:55:39 +0530 Subject: [PATCH 11/80] core enhancement for citizen sidebar for tqm (#39) --- micro-ui/web/core/package.json | 2 +- micro-ui/web/micro-ui-internals/example/package.json | 2 +- .../micro-ui-internals/packages/modules/core/package.json | 2 +- .../src/components/TopBarSideBar/SideBar/CitizenSideBar.js | 5 ++++- micro-ui/web/package.json | 2 +- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/micro-ui/web/core/package.json b/micro-ui/web/core/package.json index 9400e301c9e..a650f53dbbf 100644 --- a/micro-ui/web/core/package.json +++ b/micro-ui/web/core/package.json @@ -17,7 +17,7 @@ "@egovernments/digit-ui-libraries": "1.8.0-beta.1", "@egovernments/digit-ui-module-workbench": "1.0.0-beta.1", "@egovernments/digit-ui-module-dss": "1.8.0-beta.2", - "@egovernments/digit-ui-module-core": "1.8.0-beta.12", + "@egovernments/digit-ui-module-core": "1.8.0-beta.13", "@egovernments/digit-ui-module-common": "1.8.0-beta.1", "@egovernments/digit-ui-module-hrms": "1.8.0-beta.3", "@egovernments/digit-ui-module-utilities": "1.0.0-beta.1", diff --git a/micro-ui/web/micro-ui-internals/example/package.json b/micro-ui/web/micro-ui-internals/example/package.json index f1a32f47ae2..584cf374211 100644 --- a/micro-ui/web/micro-ui-internals/example/package.json +++ b/micro-ui/web/micro-ui-internals/example/package.json @@ -12,7 +12,7 @@ "@egovernments/digit-ui-libraries": "1.8.0-beta.1", "@egovernments/digit-ui-module-workbench": "1.0.0-beta.1", "@egovernments/digit-ui-module-dss": "1.8.0-beta.2", - "@egovernments/digit-ui-module-core": "1.8.0-beta.12", + "@egovernments/digit-ui-module-core": "1.8.0-beta.13", "@egovernments/digit-ui-module-common": "1.8.0-beta.1", "@egovernments/digit-ui-module-hrms": "1.8.0-beta.3", "@egovernments/digit-ui-module-utilities": "1.0.0-beta.1", diff --git a/micro-ui/web/micro-ui-internals/packages/modules/core/package.json b/micro-ui/web/micro-ui-internals/packages/modules/core/package.json index 8c743429269..0a561b762b5 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/core/package.json +++ b/micro-ui/web/micro-ui-internals/packages/modules/core/package.json @@ -1,6 +1,6 @@ { "name": "@egovernments/digit-ui-module-core", - "version": "1.8.0-beta.12", + "version": "1.8.0-beta.13", "license": "MIT", "main": "dist/index.js", "module": "dist/index.modern.js", diff --git a/micro-ui/web/micro-ui-internals/packages/modules/core/src/components/TopBarSideBar/SideBar/CitizenSideBar.js b/micro-ui/web/micro-ui-internals/packages/modules/core/src/components/TopBarSideBar/SideBar/CitizenSideBar.js index b82356e0553..a8139463aec 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/core/src/components/TopBarSideBar/SideBar/CitizenSideBar.js +++ b/micro-ui/web/micro-ui-internals/packages/modules/core/src/components/TopBarSideBar/SideBar/CitizenSideBar.js @@ -25,6 +25,9 @@ const Profile = ({ info, stateName, t }) => { } } }, [profilePic !== null]); + + const CustomEmployeeTopBar = Digit.ComponentRegistryService?.getComponent("CustomEmployeeTopBar") + return (
@@ -48,7 +51,7 @@ const Profile = ({ info, stateName, t }) => {
{window.location.href.includes("/employee") && !window.location.href.includes("/employee/user/login") && - !window.location.href.includes("employee/user/language-selection") && } + !window.location.href.includes("employee/user/language-selection") && !CustomEmployeeTopBar && }
); }; diff --git a/micro-ui/web/package.json b/micro-ui/web/package.json index 08a398acc6f..895eb2ae7c0 100644 --- a/micro-ui/web/package.json +++ b/micro-ui/web/package.json @@ -17,7 +17,7 @@ "@egovernments/digit-ui-libraries": "1.8.0-beta.1", "@egovernments/digit-ui-module-workbench": "1.0.0-beta.1", "@egovernments/digit-ui-module-dss": "1.8.0-beta.2", - "@egovernments/digit-ui-module-core": "1.8.0-beta.12", + "@egovernments/digit-ui-module-core": "1.8.0-beta.13", "@egovernments/digit-ui-module-common": "1.8.0-beta.1", "@egovernments/digit-ui-module-hrms": "1.8.0-beta.3", "@egovernments/digit-ui-module-utilities": "1.0.0-beta.1", From befea085ff7bb43e20f9ff741b86d7834729a265 Mon Sep 17 00:00:00 2001 From: ashish-egov <137176738+ashish-egov@users.noreply.github.com> Date: Wed, 22 Nov 2023 11:35:11 +0530 Subject: [PATCH 12/80] Workbench dropdown enhancement (#15) * linked latest digit-frontend * Update DIGIT-Frontend * added option to add Formatted id always * update the css * Updated the field Names from unique identifier to array and made default dropdown as 50 for reference masters * Update MDMSAddV2.js * PFM-4305 Login page & other alignment issues (#257) * PFM-4305 Login page & other alignment issues * PFM-4305 updated readme file * PFM-4795 aligment issue in edit and logout (#258) * Removed sublink * PFM-4305 fixed issues in login and home page (#259) * updated the package versions * updated the login screen styling * Update webpack.config.js * Made the default schemas to load as 100 * feat: Added details popup for selected options * added the custom epoc conversion if format is mentioned * feat : implemented popup enhancements * Delete .gitmodules * DPG-1908: Implement pop-up interactions and navigation features * Refactor : Used localisation for message * Design : Updated designs of popup modals * Update workbench.scss * feat: Implement modal for option details in create and view pages * style: Updated stylings * Increment CSS version in package.json, update README with details. * Update SearchComponent.js --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> Co-authored-by: vamshikrishnakole-wtt-egov <57343517+vamshikrishnakole-wtt-egov@users.noreply.github.com> --- .../micro-ui-internals/example/package.json | 2 +- micro-ui/web/micro-ui-internals/package.json | 2 +- .../micro-ui-internals/packages/css/README.md | 2 + .../packages/css/package.json | 4 +- .../src/digitv2/pages/employee/workbench.scss | 1027 ++++++++++------- .../css/src/pages/employee/login.scss | 111 +- .../workbench/src/components/DigitJSONForm.js | 13 +- .../workbench/src/components/MultiSelect.js | 234 +++- .../workbench/src/configs/UICustomizations.js | 223 +++- .../src/configs/searchMDMSConfigPopup.js | 141 +++ .../src/pages/employee/MDMSSearchv2Popup.js | 222 ++++ .../react-components/src/atoms/Dropdown.js | 40 +- .../src/atoms/SearchComponent.js | 61 +- micro-ui/web/package.json | 6 +- micro-ui/web/public/index.html | 48 +- 15 files changed, 1556 insertions(+), 580 deletions(-) create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/workbench/src/configs/searchMDMSConfigPopup.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSSearchv2Popup.js diff --git a/micro-ui/web/micro-ui-internals/example/package.json b/micro-ui/web/micro-ui-internals/example/package.json index 584cf374211..4c6aef80838 100644 --- a/micro-ui/web/micro-ui-internals/example/package.json +++ b/micro-ui/web/micro-ui-internals/example/package.json @@ -37,4 +37,4 @@ "last 1 safari version" ] } -} +} \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/package.json b/micro-ui/web/micro-ui-internals/package.json index 487e3ee8733..4eb06273421 100644 --- a/micro-ui/web/micro-ui-internals/package.json +++ b/micro-ui/web/micro-ui-internals/package.json @@ -71,4 +71,4 @@ "react-query": "3.6.1", "react-router-dom": "5.3.0" } -} +} \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/css/README.md b/micro-ui/web/micro-ui-internals/packages/css/README.md index 7355a0e4761..dad29ad9538 100644 --- a/micro-ui/web/micro-ui-internals/packages/css/README.md +++ b/micro-ui/web/micro-ui-internals/packages/css/README.md @@ -42,6 +42,8 @@ frontend/micro-ui/web/public/index.html # Changelog ```bash +1.8.0-beta.16 styles for detail modals +1.8.0-beta.15 styles for multiselect dropdowns 1.8.0-beta.14 added tour help styles 1.8.0-beta.13 fixed the login text styling issue 1.8.0-beta.1 styles for login dropdown and homepage dropdowns diff --git a/micro-ui/web/micro-ui-internals/packages/css/package.json b/micro-ui/web/micro-ui-internals/packages/css/package.json index afa3b61c72f..672e777e8c2 100644 --- a/micro-ui/web/micro-ui-internals/packages/css/package.json +++ b/micro-ui/web/micro-ui-internals/packages/css/package.json @@ -1,6 +1,6 @@ { "name": "@egovernments/digit-ui-css", - "version": "1.8.0-beta.14", + "version": "1.8.0-beta.16", "license": "MIT", "main": "dist/index.css", "author": "Jagankumar ", @@ -62,4 +62,4 @@ "digit-ui", "css" ] -} +} \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/pages/employee/workbench.scss b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/pages/employee/workbench.scss index 2e6f685f512..d00b496e7e5 100644 --- a/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/pages/employee/workbench.scss +++ b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/pages/employee/workbench.scss @@ -1,561 +1,577 @@ @import url("../../index.scss"); -.bread-crumb.workbench-bredcrumb{ -a{ - color: theme(digitv2.lightTheme.primary); -} +.bread-crumb.workbench-bredcrumb { + a { + color: theme(digitv2.lightTheme.primary); + } } -.workbench{ -.workbench-create-form { - display: inherit; - padding-top: 1.5rem; - .digit-form-composer-sub-header { - @extend .typography.text-heading-m; - padding-left: 1rem; - @media (max-width: theme(digitv2.screens.mobile)) { - padding-left: 0; - } + +.workbench { + &.app-container { + margin-top: 0.75rem; } - form { - #label_digit_root { - display: none; + .workbench-create-form { + display: inherit; + padding-top: 1.5rem; + + .digit-form-composer-sub-header { + @extend .typography.text-heading-m; + padding-left: 1rem; + + @media (max-width: theme(digitv2.screens.mobile)) { + padding-left: 0; + } } - #digit_root { - width: 100%; + form { + #label_digit_root { + display: none; + } - .field-wrapper { - .form-group.field { - display: flex; - padding: 1em 0 0 1em; + #digit_root { + width: 100%; - @media (max-width: theme(digitv2.screens.mobile)) { - flex-direction: column; - } + .field-wrapper { + .form-group.field { + display: flex; + padding: 1em 0 0 1em; - &.field-error.has-error.has-danger { - .control-label { - @extend .alert-error; + @media (max-width: theme(digitv2.screens.mobile)) { + flex-direction: column; } - .form-control { - @extend .alert-error-border; - } + &.field-error.has-error.has-danger { + .control-label { + @extend .alert-error; + } - .card-label-error { - display: inline; - position: relative; - margin: 0px; - padding: 0px; - top: -0.7rem; - font-weight: normal; + .form-control { + @extend .alert-error-border; + } + + .card-label-error { + display: inline; + position: relative; + margin: 0px; + padding: 0px; + top: -0.7rem; + font-weight: normal; + } } - } - &.field-boolean.field-error.has-error.has-danger { + &.field-boolean.field-error.has-error.has-danger { - .card-label-error { - position: initial; - display: block; - margin-top: 0.5rem; + .card-label-error { + position: initial; + display: block; + margin-top: 0.5rem; + } } - } - .control-label { - max-width: 12.5rem; - margin-right: 2.5rem; - @extend .card-label; - display: inline-flex; - /* align-self: center; */ - line-height: 3rem; - @extend .typography.text-heading-s; - /* web view*/ - @apply w-1/3; + .control-label { + max-width: 12.5rem; + margin-right: 2.5rem; + @extend .card-label; + display: inline-flex; + /* align-self: center; */ + line-height: 3rem; + @extend .typography.text-heading-s; + /* web view*/ + @apply w-1/3; + + /* tablet view*/ - /* tablet view*/ + @media (max-width: theme(digitv2.screens.tablet)) { + max-width: 11rem; + margin-right: 1.5rem; - @media (max-width: theme(digitv2.screens.tablet)) { - max-width: 11rem; - margin-right: 1.5rem; + } - } + /* mobile view*/ - /* mobile view*/ + @media (max-width: theme(digitv2.screens.mobile)) { + /*max-width: 10.2rem;*/ + @apply w-full; - @media (max-width: theme(digitv2.screens.mobile)) { - /*max-width: 10.2rem;*/ - @apply w-full; + } } - } + .all-input-field-wrapper { - .all-input-field-wrapper { + @apply w-3/5; - @apply w-3/5; - @media (max-width: theme(digitv2.screens.mobile)) { - @apply w-full; - } + @media (max-width: theme(digitv2.screens.mobile)) { + @apply w-full; + } - .form-control { - @extend .light-input-border; - @extend .employee-card-input; - font-style: inherit; - font-family: inherit; - /* web view*/ - max-width: 37.5rem; - min-width: 20.5rem; - margin-bottom: 1rem; - /* tablet view*/ + .form-control { + @extend .light-input-border; + @extend .employee-card-input; + font-style: inherit; + font-family: inherit; + /* web view*/ + max-width: 37.5rem; + min-width: 20.5rem; + margin-bottom: 1rem; + /* tablet view*/ + + @media (max-width: theme(digitv2.screens.tablet)) { + max-width: 27.5rem; + min-width: 12.5rem; - @media (max-width: theme(digitv2.screens.tablet)) { - max-width: 27.5rem; - min-width: 12.5rem; + } - } + /* mobile view*/ - /* mobile view*/ + @media (max-width: theme(digitv2.screens.mobile)) { + max-width: 20.5rem; + min-width: 9.5rem; + @apply w-full; - @media (max-width: theme(digitv2.screens.mobile)) { - max-width: 20.5rem; - min-width: 9.5rem; - @apply w-full; + } - } + &.form-select { + padding: 0%; + border: 0px; - &.form-select { - padding: 0%; - border: 0px; + .digit__control { + @apply outline-none; - .digit__control { - @apply outline-none; + .digit__value-container:in-range { + border-color: unset; + box-shadow: none; + box-sizing: unset; + @apply outline-none; + } + } - .digit__value-container:in-range { - border-color: unset; + .digit__control--is-focused { + border-color: theme(digitv2.lightTheme.primary) !important; box-shadow: none; box-sizing: unset; @apply outline-none; } - } - .digit__control--is-focused { - border-color: theme(digitv2.lightTheme.primary) !important; - box-shadow: none; - box-sizing: unset; - @apply outline-none; - } + .digit__control:hover { + + border-color: unset; + box-shadow: none; + box-sizing: unset; + @apply outline-none; + } + + .digit__control:focus { + border-color: theme(digitv2.lightTheme.primary); - .digit__control:hover { + .digit__value-container:focus { + border-color: theme(digitv2.lightTheme.primary); - border-color: unset; - box-shadow: none; - box-sizing: unset; - @apply outline-none; + } + } } - .digit__control:focus { + &.form-select:focus { + @apply outline-none; border-color: theme(digitv2.lightTheme.primary); - .digit__value-container:focus { - border-color: theme(digitv2.lightTheme.primary); - - } } } - &.form-select:focus { - @apply outline-none; - border-color: theme(digitv2.lightTheme.primary); - + .form-control:read-only { + background-color: theme(digitv2.lightTheme.background); + color: theme(digitv2.lightTheme["text-color-secondary"]); } - } - .form-control:read-only { - background-color: theme(digitv2.lightTheme.background); - color: theme(digitv2.lightTheme["text-color-secondary"]); - } + .form-control:focus { - .form-control:focus { + @apply outline-none; + border-color: theme(digitv2.lightTheme.primary); + } - @apply outline-none; - border-color: theme(digitv2.lightTheme.primary); + textarea.form-control { + height: 5rem; + } } - textarea.form-control { - height: 5rem; + &.field-string { + align-self: center; } - } - &.field-string { - align-self: center; - } + &.field-boolean { + padding-top: 0rem; + padding-bottom: 1rem; - &.field-boolean { - padding-top: 0rem; - padding-bottom: 1rem; + .custom-checkbox { + display: inline-flex; + align-items: end; - .custom-checkbox { - display: inline-flex; - align-items: end; - - &.custom-checkbox-disabled { - pointer-events: none; - opacity: 0.6; - } + &.custom-checkbox-disabled { + pointer-events: none; + opacity: 0.6; + } - .custom-checkbox-label { - @extend .typography.text-body-s; - @apply pl-sm; + .custom-checkbox-label { + @extend .typography.text-body-s; + @apply pl-sm; + } } - } - .checkbox { - width: 28rem; + .checkbox { + width: 28rem; - label { - float: left; + label { + float: left; - /* display: flex; + /* display: flex; flex-direction: row-reverse; */ - span { - width: 17rem; - display: none; - @extend .card-label; - } + span { + width: 17rem; + display: none; + @extend .card-label; + } - input[type="checkbox"] { - @extend .light-input-border; - @extend .employee-card-input; - height: 1.5rem; - /* @apply ml-sm;*/ - } - - input[type="checkbox"]#digit_root_active { - accent-color: theme(digitv2.lightTheme.primary); - } + input[type="checkbox"] { + @extend .light-input-border; + @extend .employee-card-input; + height: 1.5rem; + /* @apply ml-sm;*/ + } - input:checked, - input:hover { - @apply border-2; - @extend .light-input-border; + input[type="checkbox"]#digit_root_active { + accent-color: theme(digitv2.lightTheme.primary); + } + + input:checked, + input:hover { + @apply border-2; + @extend .light-input-border; + } } } - } - .field-radio-group { - display: inline-flex; - height: 2.5rem; - align-items: center; + .field-radio-group { + display: inline-flex; + height: 2.5rem; + align-items: center; - .radio { - @apply mr-sm; + .radio { + @apply mr-sm; + } } - } - } + } - &.field-object>.control-label { - margin-left: 0.5rem; - } + &.field-object>.control-label { + margin-left: 0.5rem; + } - &.field-object { - display: block; - @extend .light-background; - @extend .light-paper-border; - padding: 1rem; - margin: 1rem; + &.field-object { + display: block; + @extend .light-background; + @extend .light-paper-border; + padding: 1rem; + margin: 1rem; - .digit-expand-collapse-wrapper { - margin-top: 0px; - } + .digit-expand-collapse-wrapper { + margin-top: 0px; + } - .digit-icon-toggle { - top: -1.5rem; - right: 1.5em; - } + .digit-icon-toggle { + top: -1.5rem; + right: 1.5em; + } - .object-wrapper { - .array-remove-button-wrapper { - position: relative; + .object-wrapper { + .array-remove-button-wrapper { + position: relative; + } } - } - /* have to revisit for objects + /* have to revisit for objects [id^="root_"] { @extend .light-background; } */ - } - - &.field-array { - display: block; - @extend .light-paper-secondary; - @extend .light-paper-border; - padding: 2rem; - margin: 1rem; - padding-top: 1rem; + } - .array-wrapper .array-item { - &.jk-array-objects>.array-remove-button-wrapper { - display: block; - } + &.field-array { + display: block; + @extend .light-paper-secondary; + @extend .light-paper-border; + padding: 2rem; + margin: 1rem; + padding-top: 1rem; + + .array-wrapper .array-item { + &.jk-array-objects>.array-remove-button-wrapper { + display: block; + } - &.jk-array-objects { - margin-bottom: 2rem; + &.jk-array-objects { + margin-bottom: 2rem; - .array-children>span .form-group.field.field-object { - padding-bottom: 3rem; - } + .array-children>span .form-group.field.field-object { + padding-bottom: 3rem; + } - .array-obj { - position: absolute; - bottom: 1.5rem; - left: 2rem; + .array-obj { + position: absolute; + bottom: 1.5rem; + left: 2rem; - >.array-remove-button-wrapper { - position: unset; + >.array-remove-button-wrapper { + position: unset; + } } + } - } + &.jk-array-of-non-objects>.array-remove-button-wrapper { + display: inline; + left: 38.5rem; + right: unset; + top: 0.7rem; + } - &.jk-array-of-non-objects>.array-remove-button-wrapper { - display: inline; - left: 38.5rem; - right: unset; - top: 0.7rem; - } + &.jk-array-of-non-objects .array-children { + span .form-group { + padding-left: 0%; - &.jk-array-of-non-objects .array-children { - span .form-group { - padding-left: 0%; + .control-label { + display: none; + } - .control-label { - display: none; } - } - } - /* it has been removed since we dont need diff color for array items @extend .light-background;*/ - position: relative; - - .field-object { - margin-left: 0; - margin-right: 0; - } + /* it has been removed since we dont need diff color for array items @extend .light-background;*/ + position: relative; + .field-object { + margin-left: 0; + margin-right: 0; + } - .array-remove-button-wrapper { - position: absolute; - right: 1.3em; - top: 1.3em; - background-color: inherit !important; - .array-remove-button { - cursor: pointer; + .array-remove-button-wrapper { + position: absolute; + right: 1.3em; + top: 1.3em; background-color: inherit !important; - @media (max-width: theme(digitv2.screens.mobile)) { - padding:0px; - } - h2{ + + .array-remove-button { + cursor: pointer; + background-color: inherit !important; + @media (max-width: theme(digitv2.screens.mobile)) { + padding: 0px; + } + + h2 { + @media (max-width: theme(digitv2.screens.mobile)) { display: none; + } } + } - } - } - span.all-input-field-wrapper { - @apply w-3/5; + span.all-input-field-wrapper { + @apply w-3/5; - .form-control { - @apply w-full; + .form-control { + @apply w-full; + } } - } - .control-label { - @apply w-1/3; + .control-label { + @apply w-1/3; + } } - } - .jk-digit-secondary-btn { - height: 1.7em; - margin-top: 0.5rem; + .jk-digit-secondary-btn { + height: 1.7em; + margin-top: 0.5rem; - @media (max-width: theme(digitv2.screens.mobile)) { - height: auto; - width: 100%; - } + @media (max-width: theme(digitv2.screens.mobile)) { + height: auto; + width: 100%; + } - h2 { - font-size: 1rem; + h2 { + font-size: 1rem; + } } - } - .all-input-field-wrapper { - .card-label-error { - position: unset !important; + .all-input-field-wrapper { + .card-label-error { + position: unset !important; + } } - } - } + } - .digit-expand-collapse-header { - border: 0; - background-color: inherit; - padding: 0; + .digit-expand-collapse-header { + border: 0; + background-color: inherit; + padding: 0; + } } } } } - } - div.action-bar-wrap { - @extend .action-bar-wrap; + div.action-bar-wrap { + @extend .action-bar-wrap; - .submit-bar { - @extend .submit-bar; - cursor: pointer; - @apply font-rc font-medium text-legend text-white leading-10; + .submit-bar { + @extend .submit-bar; + cursor: pointer; + @apply font-rc font-medium text-legend text-white leading-10; + } } } -} - -.workbench-no-schema-found { - @apply flex justify-items-center flex-col; - align-items: center; -} - -.jk-digit-loader { - position: absolute; - z-index: 10000; - width: 100vw; - background-color: rgba(189, 189, 189, 0.5); - height: 100vh; - left: 0; - top: 0; - .jk-spinner-wrapper { - width: 100%; - display: flex; + .workbench-no-schema-found { + @apply flex justify-items-center flex-col; align-items: center; - justify-content: center; - height: 100%; + } - .jk-spinner { - border: 0.4em solid #fe7a51; - border-radius: 50%; - border-top: 0.4em solid #ffffff; - width: 4em; - height: 4em; - -webkit-animation: spin 2s linear infinite; - /* Safari */ - animation: spin 1s linear infinite; + .jk-digit-loader { + position: absolute; + z-index: 10000; + width: 100vw; + background-color: rgba(189, 189, 189, 0.5); + height: 100vh; + left: 0; + top: 0; + + .jk-spinner-wrapper { + width: 100%; + display: flex; + align-items: center; + justify-content: center; + height: 100%; + + .jk-spinner { + border: 0.4em solid #fe7a51; + border-radius: 50%; + border-top: 0.4em solid #ffffff; + width: 4em; + height: 4em; + -webkit-animation: spin 2s linear infinite; + /* Safari */ + animation: spin 1s linear infinite; + } } } -} -.jk-sm-inbox-loader { - border: 0.2em solid #fe7a51; - border-radius: 50%; - border-top: 0.2em solid #ffffff; - width: 2em; - height: 2em; - -webkit-animation: spin 2s linear infinite; + .jk-sm-inbox-loader { + border: 0.2em solid #fe7a51; + border-radius: 50%; + border-top: 0.2em solid #ffffff; + width: 2em; + height: 2em; + -webkit-animation: spin 2s linear infinite; + /* Safari */ + animation: spin 1s linear infinite; + } + /* Safari */ - animation: spin 1s linear infinite; -} + @-webkit-keyframes spin { + 0% { + -webkit-transform: rotate(0deg); + } -/* Safari */ -@-webkit-keyframes spin { - 0% { - -webkit-transform: rotate(0deg); + 100% { + -webkit-transform: rotate(360deg); + } } - 100% { - -webkit-transform: rotate(360deg); - } -} + @keyframes spin { + 0% { + transform: rotate(0deg); + } -@keyframes spin { - 0% { - transform: rotate(0deg); + 100% { + transform: rotate(360deg); + } } - 100% { - transform: rotate(360deg); + .no-data-found { + height: 100%; + width: 100%; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + + .digit-error-msg { + margin-top: 2rem; + } } -} -.no-data-found { - height: 100%; - width: 100%; - display: flex; - flex-direction: column; - justify-content: center; - align-items: center; - .digit-error-msg { - margin-top: 2rem; + .tooltip .tooltiptext { + + top: 2rem; + left: 0; + margin-left: 0rem; + width: fit-content; + height: max-content; + white-space: normal; + + .tooltiptextvalue { + font-size: 14px; + font-weight: 400px; + color: white; + } } -} + .employeeCard.manage-master-wrapper { + width: 100%; + display: flex; + padding-top: 2.1rem; -.tooltip .tooltiptext { + @media (max-width: theme(digitv2.screens.mobile)) { + flex-direction: column; + } - top: 2rem; - left: 0; - margin-left: 0rem; - width: fit-content; - height: max-content; - white-space: normal; - - .tooltiptextvalue { - font-size: 14px; - font-weight: 400px; - color: white; - } -} -.employeeCard.manage-master-wrapper { - width: 100%; - display: flex; - padding-top: 2.1rem; - @media (max-width: theme(digitv2.screens.mobile)) { - flex-direction: column; - } - .employee-select-wrap.form-field{ - @apply w-1/4; - margin-right:1rem ; - @media (max-width: theme(digitv2.screens.mobile)) { - @apply w-full; - } + .employee-select-wrap.form-field { + @apply w-1/4; + margin-right: 1rem; + + @media (max-width: theme(digitv2.screens.mobile)) { + @apply w-full; + } + } } -} -.table{ - padding-left:0.8rem ; - padding-right:0.8rem ; - &-row-mdms:hover{ - background-color: theme(digitv2.lightTheme.primary-bg); /* Change this to the desired hover color */ - cursor: pointer; + .table { + padding-left: 0.8rem; + padding-right: 0.8rem; + + &-row-mdms:hover { + background-color: theme(digitv2.lightTheme.primary-bg); + /* Change this to the desired hover color */ + cursor: pointer; + } } } -} -.header-btn{ +.header-btn { width: 12rem; } @@ -563,7 +579,7 @@ a{ background-color: #FAFAFA; border: 1.5px dashed #D6D5D4; border-radius: 5px; - margin:-1rem 1rem 1rem 1rem; + margin: -1rem 1rem 1rem 1rem; padding: 1rem 1rem 1rem 1rem; display: flex; align-items: center; @@ -571,15 +587,17 @@ a{ .drag-drop-text { text-decoration: none; + .browse-text { text-decoration: none; - color: #F47738; + color: #F47738; transition: color 0.3s; } + .browse-text:hover { - color: #F47738; - text-decoration: underline; - cursor: pointer; + color: #F47738; + text-decoration: underline; + cursor: pointer; } } @@ -589,7 +607,7 @@ a{ background-color: #FAFAFA; border: 1.5px solid #D6D5D4; border-radius: 5px; - margin:0.5rem 1rem 2rem 1rem; + margin: 0.5rem 1rem 2rem 1rem; display: flex; flex-direction: row; align-items: center; @@ -599,7 +617,7 @@ a{ .uploaded-file-container-sub { display: flex; align-items: center; - + .icon:hover { cursor: pointer; } @@ -613,3 +631,212 @@ button:hover { .popup-header-fix { margin-top: -0.5rem !important; } + +.option-details { + position: fixed; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + z-index: 999; + border: 1px solid #D6D5D4; + /* Border color and width */ + background-color: #fff; + padding: 2em; + border-radius: 5px; + display: flex; + flex-direction: column; + width: 40%; + + .details-container { + margin-top: 20px; + overflow-y: auto; + max-height: 50vh; + + .detail-item { + margin: 10px 0; + display: flex; + align-items: center; + + .key { + flex-basis: 30%; + margin-right: 10px; + font-weight: bold; + text-align: start !important; + } + + .value { + flex-basis: 70%; + text-align: start !important; + } + } + + .separator { + margin: 10px 0; + border: none; + border-bottom: 1px solid #ccc; + } + + .view-more { + display: flex; + justify-content: flex-start; + margin-top: 1.5em; + } + + .select { + display: flex; + justify-content: flex-start; + margin-top: 1.5em; + } + } +} + + +.close-button { + align-self: flex-end; + cursor: pointer; + font-weight: bold; + position: absolute; + padding: 7px; + top: 0; + right: 0; + border: 1px solid black; + margin-bottom: 20px; +} + + + +.option-details-dropdown { + position: absolute; + z-index: 999; + border: #D6D5D4 1px solid; + background-color: #fff; + padding: 10px; + border-radius: 5px; + width: 250px; + margin-left: -250px; +} + + +.modal-wrapper { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + display: flex; + justify-content: center; + align-items: center; + background-color: rgba(0, 0, 0, 0.5); + z-index: 9999; + overflow: auto; + /* Enable scrolling if content exceeds the viewport */ +} + +.modal-content { + background-color: #fff; + padding: 20px; + border: 1px solid #ccc; + border-radius: 4px; + max-width: 80%; + /* Adjust the maximum width as needed */ + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); + max-height: 80vh; + /* Limit the maximum height to 80% of the viewport height */ + display: flex; + flex-direction: column; + justify-content: space-between; +} + +.modal-inner { + overflow-y: auto; + /* Enable scrolling within the modal */ +} + +.modal-content .employee-select-wrap .select input { + width: calc(100% - 32px); + background-color: initial; + position: relative !important; + z-index: 10; + width: 100%; + height: 100%; + outline: 2px solid transparent; + outline-offset: 2px; + padding-left: 8px; +} + +.modal-content .employee-select-wrap .select-active { + position: absolute; + display: block; + width: 100%; + height: 2.5rem; + --border-opacity: 1; + border: 1px solid #f47738; + border-color: rgba(244, 119, 56, var(--border-opacity)); +} + +.modal-content .label-field-pair { + display: -ms-flexbox; + display: block !important; + -ms-flex-align: center; + align-items: center; +} + +.modal-content .employee-select-wrap { + margin-bottom: 24px; +} + +.inbox-search-wrapper { + .add-new-container { + width: 100%; + display: flex; + flex-direction: row-reverse; + + .add-new { + position: relative; + color: #F47738; + cursor: pointer; + margin-right: 1em; + font-weight: bolder; + font-size: 23px; + } + } +} + +.multiselect { + display: flex; + align-items: center; + + @media (max-width: 588px) { + .info-icon-container { + position: absolute; + right: 2px; + margin-right: 0px !important; + margin-left: 0px !important; + } + } + + .info-icon-container { + margin-left: 0.7em; + margin-right: -2em; + } + + .info-icon-container .info-icon { + cursor: pointer; + } +} + +.link-container { + flex: 1; + display: flex; + align-items: center; + padding: 10px; + background-color: #bdc5d1; + + .view-all-link { + background-color: #bdc5d1; + color: #f47738; + font-size: 16px; + text-decoration: underline; + cursor: pointer; + } +} \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/login.scss b/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/login.scss index 2ec40a63ca1..0d359441ef9 100644 --- a/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/login.scss +++ b/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/login.scss @@ -5,23 +5,30 @@ } } } -.banner .bannerCard{ + +.banner .bannerCard { min-width: 420px !important; } + .employeeForgotPassword .employeeCard .field .field-container .component-in-front { margin-top: 0; border: 1px solid; border-right: none; padding: 7px; } + @screen dt { .employeeForgotPassword .employeeCard .field .field-container .component-in-front { padding: 7px; } - .loginFormStyleEmployee .employeeCard, .banner .bannerCard{ + + .loginFormStyleEmployee .employeeCard, + .banner .bannerCard { min-width: 420px !important; } - .employeeForgotPassword .employeeCard, .employeeChangePassword .employeeCard{ + + .employeeForgotPassword .employeeCard, + .employeeChangePassword .employeeCard { max-width: 420px !important; min-width: 420px !important; } @@ -35,51 +42,63 @@ .employeeForgotPassword .field-container { margin: 10px 0; } + .employeeForgotPassword { .submit-bar { @apply w-full; } } + .employeeChangePassword .submit-bar { width: 100% !important; } + .employeeChangePassword .card-text { text-align: center; } + .employeeChangePassword .input-otp-wrap { text-align: center; } + .submit-bar { .submit-bar { @apply w-full; } } + .loginFormStyleEmployee .bannerHeader p, .employeeForgotPassword .bannerHeader p, .employeeChangePassword .bannerHeader p { font-size: 19px; } + .employeeCard .card-sub-header { font-size: 24px; } -.loginFormStyleEmployee .employeeCard .card-label, .employeeForgotPassword .employeeCard .card-label{ + +.loginFormStyleEmployee .employeeCard .card-label, +.employeeForgotPassword .employeeCard .card-label { font-weight: normal; font-size: 16px; line-height: 19px; color: theme(colors.text.primary); margin-top: 20px; } + .banner .bannerHeader { margin-bottom: 20px; } -.employeeCard .card-label{ + +.employeeCard .card-label { font-weight: normal; font-size: 16px; line-height: 19px; color: theme(colors.text.primary); } -.profile-label-margin{ - margin-top: 10px; + +.profile-label-margin { + margin-top: 10px; } .employeeForgotPassword .employeeCard .card-label-desc { @@ -89,128 +108,158 @@ color: theme(colors.text.secondary); margin-top: 15px; } + .employeeChangePassword .employeeCard .card-text { margin-bottom: 15px; font-size: 16px; color: theme(colors.text.secondary); } + @media screen and (max-width: 768px) { .employeeChangePassword .employeeCard .card-text { margin-top: 7px; } + .employeeCard .card-sub-header { font-size: 18px; } } + .employeeChangePassword .employeeCard .card-text-button { text-align: center !important; margin-bottom: 12px !important; } + .employeeChangePassword .employeeCard .input-otp-wrap { margin-bottom: 10px; } + .employee .loginContainer { padding-top: 0px !important; } + .banner { - height: calc(100vh ) !important; + height: calc(100vh) !important; } -.employeeChangePassword .employeeCard .field .field-container{ +.employeeChangePassword .employeeCard .field .field-container { margin-bottom: 24px; } -.employeeForgotPassword .employeeCard .employee-card-sub-header, .employeeChangePassword .employeeCard .employee-card-sub-header, .loginFormStyleEmployee .employeeCard .employee-card-sub-header{ +.employeeForgotPassword .employeeCard .employee-card-sub-header, +.employeeChangePassword .employeeCard .employee-card-sub-header, +.loginFormStyleEmployee .employeeCard .employee-card-sub-header { font-size: 24px !important; line-height: 28px !important; margin-bottom: 0px !important; } -@media screen and (max-width : 768px){ - .employeeForgotPassword .employeeCard .employee-card-sub-header, .employeeChangePassword .employeeCard .employee-card-sub-header, .loginFormStyleEmployee .employeeCard .employee-card-sub-header{ + +@media screen and (max-width : 768px) { + + .employeeForgotPassword .employeeCard .employee-card-sub-header, + .employeeChangePassword .employeeCard .employee-card-sub-header, + .loginFormStyleEmployee .employeeCard .employee-card-sub-header { font-size: 18px !important; line-height: 21px !important; margin-bottom: 0px !important; } - .loginFormStyleEmployee .employeeCard, .banner .bannerCard{ + + .loginFormStyleEmployee .employeeCard, + .banner .bannerCard { min-width: 340px !important; margin: 10px !important; } - .employeeForgotPassword .employeeCard, .employeeChangePassword .employeeCard{ + + .employeeForgotPassword .employeeCard, + .employeeChangePassword .employeeCard { max-width: 360px !important; min-width: 340px !important; margin: 10px !important; } } -.employeeChangePassword .employeeCard .card-text{ + +.employeeChangePassword .employeeCard .card-text { margin-top: 18px !important; margin-bottom: 20px !important; } -.employeeBackbuttonAlign{ + +.employeeBackbuttonAlign { display: none; } -.resend-otp{ + +.resend-otp { cursor: pointer; } .employee-select-wrap.login-city-dd { - .options-card{ - max-height: 200px; + .options-card { + max-height: 200px; } } -@media screen and (max-width: 768px){ - .employeeBackbuttonAlign{ + +@media screen and (max-width: 768px) { + .employeeBackbuttonAlign { display: block; position: absolute; top: 20px; left: 20px; } - .banner{ + + .banner { align-items: flex-end; padding-bottom: 40px; height: 100vh !important; } - .topbar{ + + .topbar { background: rgba(34, 57, 77, var(--bg-opacity)) !important; color: white; } - .employee .loginContainer{ + + .employee .loginContainer { padding-top: 0px !important; } - .removeBottomMargin{ + + .removeBottomMargin { margin-bottom: 0px !important; } + .employee-select-wrap.login-city-dd { - .options-card{ - max-height: 160px; + .options-card { + max-height: 160px; } } } .loginFormStyleEmployee { - .loginCardSubHeaderClassName { text-align: center !important; } + .loginCardClassName { - margin: auto !important; + margin: auto !important; min-width: 408px !important; - header.employee-card-sub-header{ + + header.employee-card-sub-header { text-align: center; margin-top: 10px; } } + .buttonClassName { max-width: 100% !important; width: 100% !important } + .field .field-container .text-input input { margin-bottom: 5px !important; } + .bannerHeader { margin-bottom: 0px !important; } - + .primary-label-btn { margin: 20px auto 0 auto !important; } diff --git a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/components/DigitJSONForm.js b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/components/DigitJSONForm.js index 4cf868e6751..d18f6229e59 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/components/DigitJSONForm.js +++ b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/components/DigitJSONForm.js @@ -82,7 +82,7 @@ const getArrayWrapperClassName = (type) => { default: return "jk-array-of-non-objects"; } -}; +} function ArrayFieldItemTemplate(props) { const { t } = useTranslation(); @@ -122,9 +122,10 @@ function ArrayFieldItemTemplate(props) { isDisabled={disabled} />
+ ) )} -
+
); } @@ -257,8 +258,8 @@ const DigitJSONForm = ({ useEffect(() => { onFormChange({ formData: Digit.Utils.workbench.postProcessData(formData, inputUiSchema) }); }, []); - const onSubmitV2 = async({ formData }) => { - const updatedData=await Digit.Utils.workbench.preProcessData(formData, inputUiSchema); + const onSubmitV2 = async ({ formData }) => { + const updatedData = await Digit.Utils.workbench.preProcessData(formData, inputUiSchema); onSubmit(updatedData); }; @@ -309,7 +310,7 @@ const DigitJSONForm = ({ // focusOnFirstError={true} /* added logic to show live validations after form submit is clicked */ liveValidate={liveValidate} - // liveValidate={formData && Object.keys(formData) && Object.keys(formData)?.length > 0} + // liveValidate={formData && Object.keys(formData) && Object.keys(formData)?.length > 0} > {(screenType === "add" || screenType === "edit") && ( @@ -344,7 +345,7 @@ const DigitJSONForm = ({ isDleteBtn={true} > )} - + ); }; diff --git a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/components/MultiSelect.js b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/components/MultiSelect.js index 5ac74df30e4..914ae0319a7 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/components/MultiSelect.js +++ b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/components/MultiSelect.js @@ -1,7 +1,9 @@ -import React from "react"; -import Select from "react-select"; +import React, { useState, useEffect } from "react"; +import Select, { components } from "react-select"; import { useTranslation } from "react-i18next"; -import { Loader } from "@egovernments/digit-ui-react-components"; +import { useHistory } from "react-router-dom"; +import { Loader, InfoBannerIcon, Button, Close } from "@egovernments/digit-ui-react-components"; +import MDMSSearchv2Popup from "../pages/employee/MDMSSearchv2Popup"; const customStyles = { control: (provided, state) => ({ @@ -12,11 +14,20 @@ const customStyles = { borderColor: "#f47738", }, }), + option: (provided, state) => ({ + ...provided, + backgroundColor: state.isSelected ? "#f47738" : "white", // Background color for selected options + color: state.isSelected ? "white" : "black", // Text color for selected options + "&:hover": { + backgroundColor: "#ffe6cc", // Very light orange background color on hover + }, + }), }; /* Multiple support not added TODO jagan to fix this issue */ const CustomSelectWidget = (props) => { const { t } = useTranslation(); + const history = useHistory(); const { moduleName, masterName } = Digit.Hooks.useQueryParams(); const { options, @@ -31,7 +42,9 @@ const CustomSelectWidget = (props) => { schema = { schemaCode: "", fieldPath: "" }, } = props; const { schemaCode = `${moduleName}.${masterName}`, tenantId, fieldPath } = schema; - const handleChange = (selectedValue) => onChange(multiple ? selectedValue?.value : selectedValue?.value); + const [showTooltipFlag, setShowTooltipFlag] = useState(false); + + const [mainData, setMainData] = useState([]); /* logic added to fetch data of schemas in each component itself */ @@ -58,6 +71,7 @@ const CustomSelectWidget = (props) => { respData?.map((e) => e.value) ); } + setMainData(data?.mdms); return respData; }, }, @@ -66,31 +80,211 @@ const CustomSelectWidget = (props) => { const { isLoading, data } = Digit.Hooks.useCustomAPIHook(reqCriteriaForData); const optionsList = data || options?.enumOptions || options || []; - + const optionsLimit = 10; const formattedOptions = React.useMemo( () => optionsList.map((e) => ({ label: t(Digit.Utils.locale.getTransformedLocale(`${schemaCode}_${e?.label}`)), value: e.value })), [optionsList, schemaCode, data] ); + const [limitedOptions, setLimitedOptions] = useState([]); + const [selectedDetails, setSelectedDetails] = useState(null); + const [showDetails, setShowDetails] = useState(null); + const [isSelect, setIsSelect] = useState(false); + const [showModal, setShowModal] = useState(false); + const [isSeeAll, setIsSeeAll] = useState(false); + + const handleSeeAll = () => { + setShowModal(true); + } + const handleCloseModal = () => { + setShowModal(false); + }; + const SelectMenuButton = (props) => { + return ( +
+ + {props.children} + +
+
+ View All +
+
+
+ ) + } const selectedOption = formattedOptions?.filter((obj) => (multiple ? value?.includes(obj.value) : obj.value == value)); + const handleChange = (selectedValue) => { + setShowTooltipFlag(true); + setIsSelect(true); + setShowDetails(mainData?.filter((obj) => (multiple ? selectedValue.value?.includes(obj.data.code) : obj.data.code == selectedValue.value))) + }; + const handleSelect = (detail) => { + setShowTooltipFlag(false); + setIsSelect(false); + onChange(detail.data.code); + setSelectedDetails([detail]) + } + + useEffect(() => { + setLimitedOptions(formattedOptions.slice(0, optionsLimit)); + if (optionsLimit < formattedOptions.length) { + setIsSeeAll(true); + } + setSelectedDetails(mainData?.filter((obj) => (multiple ? value?.includes(obj.data.code) : obj.data.code == value))); + }, [formattedOptions, optionsLimit]); + const onClickSelect = (selectedValue) => { + selectedValue = { "value": selectedValue.code, "label": selectedValue.description }; + onChange(multiple ? selectedValue?.value : selectedValue?.value); + setSelectedDetails(mainData?.filter((obj) => (multiple ? selectedValue.value?.includes(obj.data.code) : obj.data.code == selectedValue.value))) + setShowModal(false); + }; + const handleViewMoreClick = (detail) => { + const schemaCode = detail?.schemaCode; + const [moduleName, masterName] = schemaCode.split("."); + const uniqueIdentifier = detail?.uniqueIdentifier; + history.push(`/${window.contextPath}/employee/workbench/mdms-view?moduleName=${moduleName}&masterName=${masterName}&uniqueIdentifier=${uniqueIdentifier}`); + }; + const OptionWithInfo = (props) => { + const { data } = props; + + // Find the index of the selected option within limitedOptions + const index = limitedOptions.findIndex(option => option.value === data.value); + + const handleInfoBannerClick = () => { + // Create a singleton array with the selected detail + const selectedDetail = mainData[index]; + setSelectedDetails([selectedDetail]); + setShowTooltipFlag(true); + }; + + return ( + +
+ {data.label} + {/* + + */} +
+
+ ); + }; + if (isLoading) { return ; } return ( - + +
+
{ setShowTooltipFlag(true) }} + > + {selectedDetails && selectedDetails.length > 0 && ( + + + + )} + +
+ +
+ {showTooltipFlag && ( +
+ {isSelect && +
+ {showDetails?.map((detail) => ( +
+
+ {Object.keys(detail.data).map((key) => { + const value = detail.data[key]; + if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') { + return ( +
+
{t(Digit.Utils.locale.getTransformedLocale(key))}
+
{String(value)}
+
+ ); + } + return null; + })} +
+
+
+
+ ))} +
+ } + {!isSelect && +
+ {selectedDetails?.map((detail) => ( +
+
+ {Object.keys(detail.data).map((key) => { + const value = detail.data[key]; + if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') { + return ( +
+
{t(Digit.Utils.locale.getTransformedLocale(key))}
+
{String(value)}
+
+ ); + } + return null; + })} +
+
+
+
+ ))} +
+ } +
{ setShowTooltipFlag(false); setIsSelect(false); }}> + +
+
+ ) + } + + + { + showModal && ( +
+
+
+ +
+ +
+
+ ) + } +
+ ); }; export default CustomSelectWidget; + + + + diff --git a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/configs/UICustomizations.js b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/configs/UICustomizations.js index abc215beced..a47534f3b6f 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/configs/UICustomizations.js +++ b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/configs/UICustomizations.js @@ -1,6 +1,7 @@ -import { Link,useHistory } from "react-router-dom"; +import { Link, useHistory } from "react-router-dom"; import _ from "lodash"; import React from 'react'; +import { Button } from "@egovernments/digit-ui-react-components"; //create functions here based on module name set in mdms(eg->SearchProjectConfig) //how to call these -> Digit?.Customizations?.[masterName]?.[moduleName] @@ -251,9 +252,8 @@ export const UICustomizations = { return ( {String(value ? (column.translate ? t(column.prefix ? `${column.prefix}${value}` : value) : value) : t("ES_COMMON_NA"))} @@ -421,43 +421,40 @@ export const UICustomizations = { SearchMDMSConfig: { customValidationCheck: (data) => { //checking both to and from date are present - - const { createdFrom, createdTo,field,value } = data; + const { createdFrom, createdTo, field, value } = data; if ((createdFrom === "" && createdTo !== "") || (createdFrom !== "" && createdTo === "")) return { warning: true, label: "ES_COMMON_ENTER_DATE_RANGE" }; - if((field && !value) || (!field && value)){ + if ((field && !value) || (!field && value)) { return { warning: true, label: "WBH_MDMS_SEARCH_VALIDATION_FIELD_VALUE_PAIR" }; } return false; }, - preProcess: (data,additionalDetails) => { - + preProcess: (data, additionalDetails) => { const tenantId = Digit.ULBService.getCurrentTenantId(); - data.body.MdmsCriteria.tenantId = tenantId - + data.body.MdmsCriteria.tenantId = tenantId const filters = {} const custom = data.body.MdmsCriteria.custom - const {field,value,isActive} = custom || {} + const { field, value, isActive } = custom || {} filters[field?.code] = value - if(isActive){ - if(isActive.value==="all") delete data.body.MdmsCriteria.isActive + if (isActive) { + if (isActive.value === "all") delete data.body.MdmsCriteria.isActive else data.body.MdmsCriteria.isActive = isActive?.value - }else{ + } else { delete data.body.MdmsCriteria.isActive } data.body.MdmsCriteria.filters = filters data.body.MdmsCriteria.schemaCode = additionalDetails?.currentSchemaCode delete data.body.MdmsCriteria.custom // const {field,value} = data.body.MdmsCriteria.moduleDetails[0].masterDetails[0].custom || {} - + // const tenantId = Digit.ULBService.getCurrentTenantId() // data.body.MdmsCriteria.tenantId = tenantId // //generate filter // const filter = `[?(@.${field?.code}=='${value}')]` - + // data.body.MdmsCriteria.moduleDetails[0].masterDetails[0].filter = filter // delete data.body.MdmsCriteria.moduleDetails[0].masterDetails[0].custom @@ -509,7 +506,7 @@ export const UICustomizations = { //first we can identify which column it belongs to then we can return relevant result switch (key) { case "WBH_UNIQUE_IDENTIFIER": - const [moduleName,masterName] = row.schemaCode.split(".") + const [moduleName, masterName] = row.schemaCode.split(".") return ( @@ -538,7 +535,153 @@ export const UICustomizations = { t("ES_COMMON_NA") ); case "WBH_ISACTIVE": - return value ? {t("WBH_COMMON_YES")} : {t("WBH_COMMON_NO")} + return value ? {t("WBH_COMMON_YES")} : {t("WBH_COMMON_NO")} + default: + return t("ES_COMMON_NA"); + } + }, + MobileDetailsOnClick: (row, tenantId) => { + let link; + Object.keys(row).map((key) => { + if (key === "MASTERS_WAGESEEKER_ID") + link = `/${window.contextPath}/employee/masters/view-wageseeker?tenantId=${tenantId}&wageseekerId=${row[key]}`; + }); + return link; + }, + additionalValidations: (type, data, keys) => { + if (type === "date") { + return data[keys.start] && data[keys.end] ? () => new Date(data[keys.start]).getTime() <= new Date(data[keys.end]).getTime() : true; + } + } + }, + SearchMDMSConfigPopup: { + customValidationCheck: (data) => { + //checking both to and from date are present + const { createdFrom, createdTo, field, value } = data; + if ((createdFrom === "" && createdTo !== "") || (createdFrom !== "" && createdTo === "")) + return { warning: true, label: "ES_COMMON_ENTER_DATE_RANGE" }; + + if ((field && !value) || (!field && value)) { + return { warning: true, label: "WBH_MDMS_SEARCH_VALIDATION_FIELD_VALUE_PAIR" }; + } + + return false; + }, + preProcess: (data, additionalDetails) => { + const tenantId = Digit.ULBService.getCurrentTenantId(); + data.body.MdmsCriteria.tenantId = tenantId + const filters = {} + const custom = data.body.MdmsCriteria.custom + const { field, value, isActive } = custom || {} + filters[field?.code] = value + if (isActive) { + if (isActive.value === "all") delete data.body.MdmsCriteria.isActive + else data.body.MdmsCriteria.isActive = isActive?.value + } else { + delete data.body.MdmsCriteria.isActive + } + data.body.MdmsCriteria.filters = filters + data.body.MdmsCriteria.isActive = true; + data.body.MdmsCriteria.schemaCode = additionalDetails?.currentSchemaCode + delete data.body.MdmsCriteria.custom + // const {field,value} = data.body.MdmsCriteria.moduleDetails[0].masterDetails[0].custom || {} + + // const tenantId = Digit.ULBService.getCurrentTenantId() + // data.body.MdmsCriteria.tenantId = tenantId + + // //generate filter + // const filter = `[?(@.${field?.code}=='${value}')]` + + + // data.body.MdmsCriteria.moduleDetails[0].masterDetails[0].filter = filter + // delete data.body.MdmsCriteria.moduleDetails[0].masterDetails[0].custom + //we simply + // data.params = { ...data.params, tenantId: Digit.ULBService.getCurrentTenantId() }; + + // let requestBody = { ...data.body.Individual }; + // const pathConfig = { + // name: "name.givenName", + // }; + // const dateConfig = { + // createdFrom: "daystart", + // createdTo: "dayend", + // }; + // const selectConfig = { + // wardCode: "wardCode[0].code", + // socialCategory: "socialCategory.code", + // }; + // const textConfig = ["name", "individualId"]; + // let Individual = Object.keys(requestBody) + // .map((key) => { + // if (selectConfig[key]) { + // requestBody[key] = _.get(requestBody, selectConfig[key], null); + // } else if (typeof requestBody[key] == "object") { + // requestBody[key] = requestBody[key]?.code; + // } else if (textConfig?.includes(key)) { + // requestBody[key] = requestBody[key]?.trim(); + // } + // return key; + // }) + // .filter((key) => requestBody[key]) + // .reduce((acc, curr) => { + // if (pathConfig[curr]) { + // _.set(acc, pathConfig[curr], requestBody[curr]); + // } else if (dateConfig[curr] && dateConfig[curr]?.includes("day")) { + // _.set(acc, curr, Digit.Utils.date.convertDateToEpoch(requestBody[curr], dateConfig[curr])); + // } else { + // _.set(acc, curr, requestBody[curr]); + // } + // return acc; + // }, {}); + + // data.body.Individual = { ...Individual }; + return data; + }, + additionalCustomizations: (row, key, column, value, t, searchResult) => { + //here we can add multiple conditions + //like if a cell is link then we return link + //first we can identify which column it belongs to then we can return relevant result + switch (key) { + case " ": + return ( +
+ + + )} + + ); +}; + +export default MDMSSearchv2Popup; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Dropdown.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Dropdown.js index 9958174f10d..9dd0cac9e5e 100644 --- a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Dropdown.js +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Dropdown.js @@ -1,16 +1,15 @@ import PropTypes from "prop-types"; import React, { useEffect, useRef, useState } from "react"; -import { ArrowDown,SearchIcon } from "./svgindex"; +import { ArrowDown, SearchIcon } from "./svgindex"; const TextField = (props) => { const [value, setValue] = useState(props.selectedVal ? props.selectedVal : ""); useEffect(() => { if (!props.keepNull) - if( props.selectedVal) + if (props.selectedVal) setValue(props.selectedVal) - else - { setValue(""); props.setFilter("") } + else { setValue(""); props.setFilter("") } else setValue(""); }, [props.selectedVal, props.forceSet]); @@ -149,10 +148,9 @@ const Dropdown = (props) => { onSelect(filteredOption[ind]); } - if(props.isBPAREG && selectedOption) - { + if (props.isBPAREG && selectedOption) { let isSelectedSameAsOptions = props.option?.filter((ob) => ob?.code === selectedOption?.code)?.length > 0; - if(!isSelectedSameAsOptions) setSelectedOption(null) + if (!isSelectedSameAsOptions) setSelectedOption(null) } return ( @@ -185,8 +183,8 @@ const Dropdown = (props) => { ? `${selectedOption} ${t("BPA_SELECTED_TEXT")}` : props.t(props.optionKey ? selectedOption[props.optionKey] : selectedOption) : props.optionKey - ? selectedOption[props.optionKey] - : selectedOption + ? selectedOption[props.optionKey] + : selectedOption : null } filterVal={filterVal} @@ -200,8 +198,8 @@ const Dropdown = (props) => { onBlur={props?.onBlur} inputRef={props.ref} /> - {props.showSearchIcon ?null:} - {props.showSearchIcon ?:null} + {props.showSearchIcon ? null : } + {props.showSearchIcon ? : null} )} {dropdownStatus ? ( @@ -220,23 +218,23 @@ const Dropdown = (props) => { style={ index === optionIndex ? { - opacity: 1, - backgroundColor: "rgba(238, 238, 238, var(--bg-opacity))", - } + opacity: 1, + backgroundColor: "rgba(238, 238, 238, var(--bg-opacity))", + } : {} } key={index} onClick={() => onSelect(option)} > {option.icon && {option.icon} } - {props.isPropertyAssess?
{props.t ? props.t(option[props.optionKey]) : option[props.optionKey]}
: - {props.t ? props.t(option[props.optionKey]) : option[props.optionKey]}} + {props.isPropertyAssess ?
{props.t ? props.t(option[props.optionKey]) : option[props.optionKey]}
: + {props.t ? props.t(option[props.optionKey]) : option[props.optionKey]}} ); })} {filteredOption && filteredOption.length === 0 && ( -
{ - +
{ + }}> { {props.t ? props.t("CMN_NOOPTION") : "CMN_NOOPTION"}}
@@ -258,9 +256,9 @@ const Dropdown = (props) => { style={ index === optionIndex ? { - opacity: 1, - backgroundColor: "rgba(238, 238, 238, var(--bg-opacity))", - } + opacity: 1, + backgroundColor: "rgba(238, 238, 238, var(--bg-opacity))", + } : {} } onClick={() => onSelect(option)} diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/SearchComponent.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/SearchComponent.js index 1b10c02ab7b..7024ed1f9fe 100644 --- a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/SearchComponent.js +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/SearchComponent.js @@ -9,16 +9,16 @@ import SubmitBar from "../atoms/SubmitBar"; import Toast from "../atoms/Toast"; import { FilterIcon, RefreshIcon } from "./svgindex"; -const SearchComponent = ({ uiConfig, header = "", screenType = "search", fullConfig, data}) => { +const SearchComponent = ({ uiConfig, header = "", screenType = "search", fullConfig, data }) => { const { t } = useTranslation(); const { state, dispatch } = useContext(InboxContext) - const [showToast,setShowToast] = useState(null) + const [showToast, setShowToast] = useState(null) let updatedFields = []; - const {apiDetails} = fullConfig + const { apiDetails } = fullConfig - if (fullConfig?.postProcessResult){ + if (fullConfig?.postProcessResult) { //conditions can be added while calling postprocess function to pass different params - Digit?.Customizations?.[apiDetails?.masterName]?.[apiDetails?.moduleName]?.postProcess(data, uiConfig) + Digit?.Customizations?.[apiDetails?.masterName]?.[apiDetails?.moduleName]?.postProcess(data, uiConfig) } const { @@ -50,18 +50,19 @@ const SearchComponent = ({ uiConfig, header = "", screenType = "search", fullCon updatedFields = Object.values(formState?.dirtyFields) }, [formState]) - const onSubmit = (data) => { - + const onSubmit = (data, e) => { + + e?.preventDefault?.(); //here -> added a custom validator function, if required add in UICustomizations - const isAnyError = Digit?.Customizations?.[apiDetails?.masterName]?.[apiDetails?.moduleName]?.customValidationCheck ? Digit?.Customizations?.[apiDetails?.masterName]?.[apiDetails?.moduleName]?.customValidationCheck(data) : false - if(isAnyError) { + const isAnyError = Digit?.Customizations?.[apiDetails?.masterName]?.[apiDetails?.moduleName]?.customValidationCheck ? Digit?.Customizations?.[apiDetails?.masterName]?.[apiDetails?.moduleName]?.customValidationCheck(data) : false + if (isAnyError) { setShowToast(isAnyError) - setTimeout(closeToast,3000) + setTimeout(closeToast, 3000) return } - if(updatedFields.length >= uiConfig?.minReqFields) { - // here based on screenType call respective dispatch fn + if (updatedFields.length >= uiConfig?.minReqFields) { + // here based on screenType call respective dispatch fn dispatch({ type: uiConfig?.type === "filter" ? "filterForm" : "searchForm", state: { @@ -82,10 +83,10 @@ const SearchComponent = ({ uiConfig, header = "", screenType = "search", fullCon //need to pass form with empty strings }) dispatch({ - type:"clearTableForm" + type: "clearTableForm" }) } - + const closeToast = () => { setShowToast(null); } @@ -100,8 +101,8 @@ const SearchComponent = ({ uiConfig, header = "", screenType = "search", fullCon } const renderHeader = () => { - switch(uiConfig?.type) { - case "filter" : { + switch (uiConfig?.type) { + case "filter": { return (
@@ -110,7 +111,7 @@ const SearchComponent = ({ uiConfig, header = "", screenType = "search", fullCon
) } - default : { + default: { return
{t(header)}
} } @@ -123,10 +124,10 @@ const SearchComponent = ({ uiConfig, header = "", screenType = "search", fullCon
checkKeyDown(e)}>
{uiConfig?.showFormInstruction &&

{t(uiConfig?.showFormInstruction)}

} -
- + + />
- { uiConfig?.secondaryLabel && {t(uiConfig?.secondaryLabel)} } - { uiConfig?.primaryLabel && } + {uiConfig?.secondaryLabel && {t(uiConfig?.secondaryLabel)}} + {uiConfig?.isPopUp && uiConfig?.primaryLabel && { + handleSubmit(onSubmit)(e); + // onSubmit(formData, e) + }} disabled={false} />} + {!uiConfig?.isPopUp && uiConfig?.primaryLabel && }
-
+
- { showToast && - - - - - - - - DIGIT - - - - - -
- + + + + +
+ - - + + + \ No newline at end of file From 4d4bf2a7061be848c1131c12294c529ebfba2e1d Mon Sep 17 00:00:00 2001 From: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> Date: Thu, 23 Nov 2023 10:06:11 +0530 Subject: [PATCH 13/80] updated the core ui build to have the latest workbench --- micro-ui/web/core/App.js | 27 ++++++--------------------- micro-ui/web/core/inter-package.json | 20 +++++++++----------- micro-ui/web/core/package.json | 20 ++++++-------------- 3 files changed, 21 insertions(+), 46 deletions(-) diff --git a/micro-ui/web/core/App.js b/micro-ui/web/core/App.js index 26a4f11a8ed..9841ae54311 100644 --- a/micro-ui/web/core/App.js +++ b/micro-ui/web/core/App.js @@ -1,17 +1,10 @@ import React from "react"; import { initLibraries } from "@egovernments/digit-ui-libraries"; -import { - paymentConfigs, - PaymentLinks, - PaymentModule, -} from "@egovernments/digit-ui-module-common"; import { DigitUI } from "@egovernments/digit-ui-module-core"; -import { initDSSComponents } from "@egovernments/digit-ui-module-dss"; -import { initEngagementComponents } from "@egovernments/digit-ui-module-engagement"; import { initHRMSComponents } from "@egovernments/digit-ui-module-hrms"; -import { initUtilitiesComponents } from "@egovernments/digit-ui-module-utilities"; import { UICustomizations } from "./Customisations/UICustomizations"; import { initWorkbenchComponents } from "@egovernments/digit-ui-module-workbench"; +import { initUtilitiesComponents } from "@egovernments/digit-ui-module-utilities"; window.contextPath = window?.globalConfigs?.getConfig("CONTEXT_PATH"); @@ -29,22 +22,14 @@ const moduleReducers = (initData) => ({ }); const initDigitUI = () => { - window.Digit.ComponentRegistryService.setupRegistry({ - PaymentModule, - ...paymentConfigs, - PaymentLinks, - }); - - initDSSComponents(); - initHRMSComponents(); - initEngagementComponents(); - initUtilitiesComponents(); - initWorkbenchComponents(); - + window.Digit.ComponentRegistryService.setupRegistry({}); window.Digit.Customizations = { PGR: {}, commonUiConfig: UICustomizations, }; + initHRMSComponents(); + initUtilitiesComponents(); + initWorkbenchComponents(); }; initLibraries().then(() => { @@ -64,7 +49,7 @@ function App() { stateCode={stateCode} enabledModules={enabledModules} moduleReducers={moduleReducers} - // defaultLanding="employee" + defaultLanding="employee" /> ); } diff --git a/micro-ui/web/core/inter-package.json b/micro-ui/web/core/inter-package.json index 487e3ee8733..6faddd59b0d 100644 --- a/micro-ui/web/core/inter-package.json +++ b/micro-ui/web/core/inter-package.json @@ -4,10 +4,9 @@ "main": "index.js", "workspaces": [ "packages/libraries", - "example", - "packages/css", "packages/react-components", - "packages/modules/*" + "packages/modules/core", + "packages/modules/workbench" ], "author": "JaganKumar ", "license": "MIT", @@ -28,20 +27,19 @@ "dev:core": "cd packages/modules/core && yarn start", "dev:dss": "cd packages/modules/dss && yarn start", "dev:hrms": "cd packages/modules/hrms && yarn start", - "devD:common": "cd packages/modules/common && yarn start", - "devD:utilities": "cd packages/modules/utilities && yarn start", + "dev:common": "cd packages/modules/common && yarn start", + "dev:utilities": "cd packages/modules/utilities && yarn start", "dev:workbench": "cd packages/modules/workbench && yarn start", "dev:engagement": "cd packages/modules/engagement && yarn start", "build": "run-p build:**", "build:libraries": "cd packages/libraries && yarn build", "build:components": "cd packages/react-components && yarn build", - "build:svgcomponents": "cd packages/svg-components && yarn build", - "build:dss": "cd packages/modules/dss && yarn build", + "buildD:dss": "cd packages/modules/dss && yarn build", "build:core": "cd packages/modules/core && yarn build", - "build:hrms": "cd packages/modules/hrms && yarn build", - "build:common": "cd packages/modules/common && yarn build", - "build:utilities": "cd packages/modules/utilities && yarn build", - "build:engagement": "cd packages/modules/engagement && yarn build", + "buildD:hrms": "cd packages/modules/hrms && yarn build", + "buildD:common": "cd packages/modules/common && yarn build", + "buildD:utilities": "cd packages/modules/utilities && yarn build", + "buildD:engagement": "cd packages/modules/engagement && yarn build", "build:workbench": "cd packages/modules/workbench && yarn build", "deploy:jenkins": "./scripts/jenkins.sh", "clean": "rm -rf node_modules" diff --git a/micro-ui/web/core/package.json b/micro-ui/web/core/package.json index a650f53dbbf..1f0a1b52027 100644 --- a/micro-ui/web/core/package.json +++ b/micro-ui/web/core/package.json @@ -10,37 +10,29 @@ "workspaces": [ "micro-ui-internals/packages/libraries", "micro-ui-internals/packages/react-components", - "micro-ui-internals/packages/modules/*" + "micro-ui-internals/packages/modules/core", + "micro-ui-internals/packages/modules/workbench" ], "homepage": "/core-ui", "dependencies": { "@egovernments/digit-ui-libraries": "1.8.0-beta.1", "@egovernments/digit-ui-module-workbench": "1.0.0-beta.1", - "@egovernments/digit-ui-module-dss": "1.8.0-beta.2", - "@egovernments/digit-ui-module-core": "1.8.0-beta.13", - "@egovernments/digit-ui-module-common": "1.8.0-beta.1", + "@egovernments/digit-ui-module-core": "1.8.0-beta.11", "@egovernments/digit-ui-module-hrms": "1.8.0-beta.3", "@egovernments/digit-ui-module-utilities": "1.0.0-beta.1", - "@egovernments/digit-ui-module-engagement": "1.5.20", "@egovernments/digit-ui-react-components": "1.8.0-beta.3", "babel-loader": "8.1.0", - "clean-webpack-plugin": "4.0.0", "react": "17.0.2", "react-dom": "17.0.2", - "jsonpath": "^1.1.1", + "clean-webpack-plugin": "4.0.0", "react-router-dom": "5.3.0", - "react-scripts": "4.0.1", + "webpack-cli": "4.10.0", "web-vitals": "1.1.2", - "terser-brunch": "^4.1.0", "react-hook-form": "6.15.8", "react-i18next": "11.16.2", - "react-query": "3.6.1", - "css-loader":"5.2.6", - "style-loader": "2.0.0", - "webpack-cli": "4.10.0" + "react-query": "3.6.1" }, "devDependencies": { - "@babel/plugin-proposal-private-property-in-object": "7.21.0", "http-proxy-middleware": "1.3.1", "lodash": "4.17.21", "microbundle-crl": "0.13.11", From a5928f2c00aa4aa5e66f7548c617e41491327066 Mon Sep 17 00:00:00 2001 From: ashish-egov <137176738+ashish-egov@users.noreply.github.com> Date: Fri, 24 Nov 2023 11:17:55 +0530 Subject: [PATCH 14/80] Fix : Fixed dropdown enumOptions issues (#41) * Fix : Fixed dropdown enumOptions issues * Feat : fixed label localisation issue in details modal * Incremented CSS Version --- .../micro-ui-internals/packages/css/README.md | 1 + .../packages/css/package.json | 2 +- .../src/digitv2/pages/employee/workbench.scss | 9 +++++- .../workbench/src/components/MultiSelect.js | 28 +++++++++---------- .../src/pages/employee/MDMSSearchv2Popup.js | 8 +++--- micro-ui/web/public/index.html | 2 +- node_modules/.yarn-integrity | 10 +++++++ 7 files changed, 38 insertions(+), 22 deletions(-) create mode 100644 node_modules/.yarn-integrity diff --git a/micro-ui/web/micro-ui-internals/packages/css/README.md b/micro-ui/web/micro-ui-internals/packages/css/README.md index dad29ad9538..cf2a647abae 100644 --- a/micro-ui/web/micro-ui-internals/packages/css/README.md +++ b/micro-ui/web/micro-ui-internals/packages/css/README.md @@ -42,6 +42,7 @@ frontend/micro-ui/web/public/index.html # Changelog ```bash +1.8.0-beta.17 fiexed mobile view issue for detail modals 1.8.0-beta.16 styles for detail modals 1.8.0-beta.15 styles for multiselect dropdowns 1.8.0-beta.14 added tour help styles diff --git a/micro-ui/web/micro-ui-internals/packages/css/package.json b/micro-ui/web/micro-ui-internals/packages/css/package.json index 672e777e8c2..1ad7e12037d 100644 --- a/micro-ui/web/micro-ui-internals/packages/css/package.json +++ b/micro-ui/web/micro-ui-internals/packages/css/package.json @@ -1,6 +1,6 @@ { "name": "@egovernments/digit-ui-css", - "version": "1.8.0-beta.16", + "version": "1.8.0-beta.17", "license": "MIT", "main": "dist/index.css", "author": "Jagankumar ", diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/pages/employee/workbench.scss b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/pages/employee/workbench.scss index d00b496e7e5..d6d30d8b712 100644 --- a/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/pages/employee/workbench.scss +++ b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/pages/employee/workbench.scss @@ -646,8 +646,9 @@ button:hover { display: flex; flex-direction: column; width: 40%; + min-width: 300px; - .details-container { + .detail-container { margin-top: 20px; overflow-y: auto; max-height: 50vh; @@ -812,12 +813,18 @@ button:hover { right: 2px; margin-right: 0px !important; margin-left: 0px !important; + display: flex; + justify-content: center; + margin-bottom: 0.7em; } } .info-icon-container { margin-left: 0.7em; margin-right: -2em; + display: flex; + justify-content: center; + margin-bottom: 0.7em; } .info-icon-container .info-icon { diff --git a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/components/MultiSelect.js b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/components/MultiSelect.js index 914ae0319a7..5250b5ae879 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/components/MultiSelect.js +++ b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/components/MultiSelect.js @@ -77,7 +77,6 @@ const CustomSelectWidget = (props) => { }, changeQueryName: `data-${schemaCode}`, }; - const { isLoading, data } = Digit.Hooks.useCustomAPIHook(reqCriteriaForData); const optionsList = data || options?.enumOptions || options || []; const optionsLimit = 10; @@ -91,7 +90,6 @@ const CustomSelectWidget = (props) => { const [isSelect, setIsSelect] = useState(false); const [showModal, setShowModal] = useState(false); const [isSeeAll, setIsSeeAll] = useState(false); - const handleSeeAll = () => { setShowModal(true); } @@ -116,12 +114,12 @@ const CustomSelectWidget = (props) => { const handleChange = (selectedValue) => { setShowTooltipFlag(true); setIsSelect(true); - setShowDetails(mainData?.filter((obj) => (multiple ? selectedValue.value?.includes(obj.data.code) : obj.data.code == selectedValue.value))) + setShowDetails(mainData?.filter((obj) => (multiple ? selectedValue.value?.includes(obj.uniqueIdentifier) : obj.uniqueIdentifier == selectedValue.value))) }; const handleSelect = (detail) => { setShowTooltipFlag(false); setIsSelect(false); - onChange(detail.data.code); + onChange(data ? detail.uniqueIdentifier : detail.value); setSelectedDetails([detail]) } @@ -130,12 +128,12 @@ const CustomSelectWidget = (props) => { if (optionsLimit < formattedOptions.length) { setIsSeeAll(true); } - setSelectedDetails(mainData?.filter((obj) => (multiple ? value?.includes(obj.data.code) : obj.data.code == value))); + setSelectedDetails(mainData?.filter((obj) => (multiple ? value?.includes(obj.uniqueIdentifier) : obj.uniqueIdentifier == value))); }, [formattedOptions, optionsLimit]); const onClickSelect = (selectedValue) => { - selectedValue = { "value": selectedValue.code, "label": selectedValue.description }; - onChange(multiple ? selectedValue?.value : selectedValue?.value); - setSelectedDetails(mainData?.filter((obj) => (multiple ? selectedValue.value?.includes(obj.data.code) : obj.data.code == selectedValue.value))) + selectedValue = { ...selectedValue, "value": selectedValue.uniqueIdentifier, "label": selectedValue.description }; + onChange(selectedValue.uniqueIdentifier); + setSelectedDetails(mainData?.filter((obj) => (multiple ? selectedValue.value?.includes(obj.uniqueIdentifier) : obj.uniqueIdentifier == selectedValue.value))) setShowModal(false); }; const handleViewMoreClick = (detail) => { @@ -180,14 +178,14 @@ const CustomSelectWidget = (props) => { + ); +}; +export default CustomSelectWidget; diff --git a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/hooks/index.js b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/hooks/index.js index ba4a9c9c65d..6c2b545bc2c 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/hooks/index.js +++ b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/hooks/index.js @@ -1,7 +1,8 @@ import { logoutV1 } from "./logout"; -import { UICreateConfigGenerator, getMDMSContextPath } from "./workbench"; +import { UICreateConfigGenerator , getMDMSContextPath,getMDMSSchema } from "./workbench"; import utils from "../utils"; import useLocalisationSearch from "./useLocalisationSearch"; +import {useWorkbenchFormContext} from "./useWorkbenchFormContext"; import usePureSchemaDefinition from "./fetchPureSchemaDefinition"; const UserService = { @@ -11,8 +12,10 @@ const UserService = { const workbench = { UICreateConfigGenerator, useLocalisationSearch, - usePureSchemaDefinition, - getMDMSContextPath + getMDMSContextPath, + useWorkbenchFormContext, + getMDMSSchema, + usePureSchemaDefinition }; const contracts = {}; diff --git a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/hooks/useWorkbenchFormContext.js b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/hooks/useWorkbenchFormContext.js new file mode 100644 index 00000000000..dfba7430910 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/hooks/useWorkbenchFormContext.js @@ -0,0 +1,19 @@ +import React, { useContext } from "react"; +export const WorkbenchProvider = React.createContext({}); + +/** + * Custom hook which can gives the workbench functions to access + * + * @author jagankumar-egov + * + * Feature :: Workbench + * + * @example + * const { configs , updateConfigs } = Digit.Hooks.workbench.useWorkbenchFormContext() + * + * @returns {Object} Returns the object which contains configs state and updateConfigs method + */ +export const useWorkbenchFormContext = () => { + const { configs , updateConfigs, ...rest } = useContext(WorkbenchProvider); + return { configs , updateConfigs, ...rest }; +}; diff --git a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/hooks/workbench.js b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/hooks/workbench.js index cab3ec1ad0b..4aa917aec14 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/hooks/workbench.js +++ b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/hooks/workbench.js @@ -1,3 +1,6 @@ +import { useQuery } from "react-query"; +import _ from "lodash"; + /** * Custom util to get the config based on the JSON Schema and UI Schema. * @@ -71,4 +74,114 @@ const getMDMSContextPath = () => { return window?.globalConfigs?.getConfig("MDMS_CONTEXT_PATH") || "mdms-v2"; }; -export { UICreateConfigGenerator, getMDMSContextPath }; + + + + +/** + * Custom function to get the schema of the screen to be rendered + * + * @author jagankumar-egov + * + * @example + * Digit.Hooks.workbench.getMDMSSchema(schemaCode,tenantId) + * + * @returns schema object + */ + +const getMDMSSchema = (schemaCode, tenantId = Digit.ULBService.getCurrentTenantId()) => { + const reqCriteria = { + url: `/${Digit.Hooks.workbench.getMDMSContextPath()}/schema/v1/_search`, + params: {}, + body: { + SchemaDefCriteria: { + tenantId: tenantId, + codes: [schemaCode], + }, + }, + }; + const { isLoading: schemaLoading, data: schemaData, error: schemaError } = useQuery( + ["API_SCHEMA", schemaCode, tenantId].filter((e) => e), + () => Digit.CustomService.getResponse({ ...reqCriteria }), + { + cacheTime: 0, + enabled: schemaCode && true, + select: (data) => { + return data?.SchemaDefinitions?.[0] || { noSchemaFound: true }; + }, + } + ); + const reqCriteriaData = { + url: `/${Digit.Hooks.workbench.getMDMSContextPath()}/v2/_search`, + params: {}, + body: { + MdmsCriteria: { + tenantId: tenantId, + filters: { + schemaCode: schemaCode, + }, + schemaCode: "Workbench.UISchema", + }, + }, + }; + const { isLoading: uiSchemaLoading, error, data } = useQuery( + ["UI_SCHEMA", schemaCode, tenantId], + () => Digit.CustomService.getResponse({ ...reqCriteriaData }), + { + cacheTime: 0, + enabled: schemaCode && true, + select: (data) => { + const customUiConfigs = data?.mdms?.[0]?.data; + const responseData = {}; + if (customUiConfigs) { + responseData["customUiConfigs"] = customUiConfigs; + responseData["uiSchema"] = { "ui:order": [...customUiConfigs?.order, "*"] }; + } + return responseData; + }, + } + ); + let finalResponse = {}; + if (!uiSchemaLoading && !schemaLoading) { + finalResponse = { ...data }; + if(schemaData?.definition){ + schemaData.definition = Digit.Utils.workbench.updateTitleToLocalisationCodeForObject(schemaData?.definition, schemaData?.code); + } + if (schemaData?.definition?.["x-ref-schema"]?.length > 0) { + schemaData?.definition?.["x-ref-schema"]?.map((dependent) => { + if (dependent?.fieldPath) { + let updatedPath = Digit.Utils.workbench.getUpdatedPath(dependent?.fieldPath); + if (_.get(schemaData?.definition?.properties, updatedPath)) { + _.set(schemaData?.definition?.properties, updatedPath, { + ..._.get(schemaData?.definition?.properties, updatedPath, {}), + enum: [], + schemaCode: dependent?.schemaCode, + fieldPath: dependent?.fieldPath, + tenantId, + }); + } + } + }); + } + if (schemaData && finalResponse?.customUiConfigs?.custom?.length > 0) { + finalResponse?.customUiConfigs?.custom?.map((dependent) => { + if (dependent?.fieldPath && dependent?.dataSource) { + let updatedPath = Digit.Utils.workbench.getUpdatedPath(dependent?.fieldPath); + if (_.get(schemaData?.definition?.properties, updatedPath)) { + _.set(schemaData?.definition?.properties, updatedPath, { + ..._.get(schemaData?.definition?.properties, updatedPath, {}), + enum: [{label:"WBH_NULL",value:null}], + schemaCode: "CUSTOM", + fieldPath: dependent?.fieldPath, + tenantId, + }); + } + } + }); + } + finalResponse["schema"] = { ...schemaData }; + } + return { isLoading: uiSchemaLoading || schemaLoading, error: schemaError || error, data: finalResponse }; +}; + +export { UICreateConfigGenerator, getMDMSContextPath, getMDMSSchema }; diff --git a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSAddV2.js b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSAddV2.js index 55ee6deb78b..7ecb603c840 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSAddV2.js +++ b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSAddV2.js @@ -222,4 +222,4 @@ const MDMSAdd = ({ defaultFormData, updatesToUISchema, screenType = "add", onVie ); }; -export default MDMSAdd; +export default MDMSAdd; \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSAddV4.js b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSAddV4.js new file mode 100644 index 00000000000..6c44bdab3c4 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSAddV4.js @@ -0,0 +1,195 @@ +import { Card, Loader, SVG } from "@egovernments/digit-ui-react-components"; +import React, { useState, useEffect } from "react"; +import { useTranslation } from "react-i18next"; +import { useHistory } from "react-router-dom"; +import { DigitJSONForm } from "../../Module"; +import _ from "lodash"; +import { DigitLoader } from "../../components/DigitLoader"; +import { WorkbenchProvider } from "../../hooks/useWorkbenchFormContext"; +/* + +created the foem using rjfs json form + +https://rjsf-team.github.io/react-jsonschema-form/docs/ + +*/ +const onFormError = (errors) => console.log("I have", errors.length, "errors to fix"); + +const MDMSAdd = ({ defaultFormData, updatesToUISchema, screenType = "add", onViewActionsSelect, viewActions, onSubmitEditAction, ...props }) => { + const tenantId = Digit.ULBService.getCurrentTenantId(); + const [spinner, toggleSpinner] = useState(false); + // const stateId = Digit.ULBService.getStateId(); + const FormSession = Digit.Hooks.useSessionStorage(`MDMS_${screenType}`, {}); + const [sessionFormData, setSessionFormData, clearSessionFormData] = FormSession; + const [session, setSession] = useState(sessionFormData); + const [formSchema, setFormSchema] = useState({}); + const [uiSchema, setUiSchema] = useState({}); + const [uiConfigs, setUiConfigs] = useState({}); + + const [noSchema, setNoSchema] = useState(false); + const [showErrorToast, setShowErrorToast] = useState(false); + const [disableForm, setDisableForm] = useState(false); + const [showToast, setShowToast] = useState(false); + const { moduleName, masterName } = Digit.Hooks.useQueryParams(); + const updateFormSchema = (schema) => { + setFormSchema({ ...schema }); + /* added disable to get the complete form re rendered to get the enum values reflected */ + setDisableForm(true); + setTimeout(() => { + setDisableForm(false); + }); + }; + useEffect(() => { + setSession({ ...session, ...defaultFormData }); + }, [defaultFormData]); + + const { t } = useTranslation(); + const history = useHistory(); + /* logics about the schema fetching and overriding with UI Schema */ + const { isLoading: isSchemaLoading, data: schemaData } = Digit.Hooks.workbench.getMDMSSchema(`${moduleName}.${masterName}`, tenantId); + + useEffect(() => { + if (schemaData?.schema?.definition) { + setFormSchema({ ...schemaData?.schema }); + } + if (schemaData?.uiSchema) { + setUiSchema({ ...schemaData?.uiSchema }); + } + if (schemaData?.schema?.noSchemaFound) { + setNoSchema(true); + } + if (schemaData?.customUiConfigs) { + setUiConfigs({ customUiConfigs: schemaData?.customUiConfigs }); + } + }, [isSchemaLoading]); +const addAPI=uiConfigs?.customUiConfigs?.addAPI; + const body = addAPI?.requestBody + ? { ...addAPI?.requestBody } + : { + Mdms: { + tenantId: tenantId, + schemaCode: `${moduleName}.${masterName}`, + uniqueIdentifier: null, + data: {}, + isActive: true, + }, + }; + + const reqCriteriaAdd = { + url: addAPI ? addAPI?.url : `/${Digit.Hooks.workbench.getMDMSContextPath()}/v2/_create/${moduleName}.${masterName}`, + params: {}, + body: { ...body }, + config: { + enabled: formSchema ? true : false, + select: (data) => { + return data?.SchemaDefinitions?.[0] || {}; + }, + }, + }; + + const mutation = Digit.Hooks.useCustomAPIMutationHook(reqCriteriaAdd); + const onSubmit = (data) => { + toggleSpinner(true); + const onSuccess = (resp) => { + toggleSpinner(false); + setSessionFormData({}); + setSession({}); + setShowErrorToast(false); + const jsonPath = addAPI?.responseJson ? addAPI?.responseJson : "mdms[0].id"; + setShowToast(`${t("WBH_SUCCESS_MDMS_MSG")} ${_.get(resp, jsonPath, "NA")}`); + closeToast(); + + //here redirect to search screen(check if it's required cos user might want add multiple masters in one go) + }; + const onError = (resp) => { + toggleSpinner(false); + setShowToast(`${t("WBH_ERROR_MDMS_DATA")} ${t(resp?.response?.data?.Errors?.[0]?.code)}`); + setShowErrorToast(true); + closeToast(); + }; + + _.set(body, addAPI?.requestJson ? addAPI?.requestJson : "Mdms.data", { ...data }); + mutation.mutate( + { + params: {}, + body: { + ...body, + }, + }, + { + onError, + onSuccess, + } + ); + }; + const onFormValueChange = (updatedSchema, element) => { + const { formData } = updatedSchema; + + if (!_.isEqual(session, formData)) { + setSession({ ...session, ...formData }); + } + }; + + useEffect(() => { + if (!_.isEqual(sessionFormData, session)) { + const timer = setTimeout(() => { + setSessionFormData({ ...sessionFormData, ...session }); + }, 1000); + return () => { + clearTimeout(timer); + }; + } + }, [session]); + + if (noSchema) { + return ( + + +

{t("WBH_NO_SCHEMA_FOUND")}

+ +
+
+ ); + } + + const closeToast = () => { + setTimeout(() => { + setShowToast(null); + }, 5000); + }; + + /* use newConfig instead of commonFields for local development in case needed */ + if (isSchemaLoading || !formSchema || Object.keys(formSchema) == 0) { + return ; + } + const uiJSONSchema = formSchema?.["definition"]?.["x-ui-schema"]; + return ( + + + {spinner && } + {formSchema && ( + + )} + + + ); +}; + +export default MDMSAdd; diff --git a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/index.js b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/index.js index 5c4f3f99801..cfb905956ad 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/index.js +++ b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/index.js @@ -6,6 +6,7 @@ import LocalisationSearch from "./LocalisationSearch"; import MDMSSearch from "./MDMSSearch"; import MDMSAdd from "./MDMSAdd"; import MDMSAddV2 from "./MDMSAddV2"; +import MDMSAddV4 from "./MDMSAddV4"; import MDMSEdit from "./MDMSEdit"; import MDMSView from "./MDMSView"; import MDMSSearchv2 from "./MDMSSearchv2"; @@ -93,6 +94,7 @@ const App = ({ path }) => { } /> } /> } /> + } /> } /> } /> } /> diff --git a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/utils/index.js b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/utils/index.js index 24a0ff92a27..4327183cfff 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/utils/index.js +++ b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/utils/index.js @@ -1,3 +1,6 @@ +import _ from "lodash"; + + const CONFIGS_TEMPLATE = { string: { inline: true, @@ -252,7 +255,9 @@ const preProcessData = async (data = {}, schema = {}) => { return { ...data }; }; -/* postprocess the data received from mdms search api to the form */ +/* postprocess the data received from mdms search api to the form + Digit.Utils.workbench.postProcessData(formData, inputUiSchema) +*/ const postProcessData = (data = {}, schema = {}) => { Object.keys(schema).map((key) => { if ( @@ -268,4 +273,128 @@ const postProcessData = (data = {}, schema = {}) => { return { ...data }; }; -export default { getConfig, getMDMSLabel, getFormattedData, getUpdatedPath, updateTitleToLocalisationCodeForObject, preProcessData, postProcessData }; + + + +/** + * Custom function to get the CriteriaForSelectData + * + * @author jagankumar-egov + * + * @example + * Digit.Utils.workbench.getCriteriaForSelectData(allProps) + * + * @returns schema object + */ +const getCriteriaForSelectData = (allProps)=>{ + const { configs, updateConfigs, updateSchema, schema: formSchema, formData } = Digit.Hooks.workbench.useWorkbenchFormContext(); + + const { moduleName, masterName } = Digit.Hooks.useQueryParams(); + + const {schema} = allProps; + const { schemaCode = `${moduleName}.${masterName}`, tenantId, fieldPath } = schema; + const reqCriteriaForData = { + url: `/${Digit.Hooks.workbench.getMDMSContextPath()}/v2/_search`, + params: {}, + body: { + MdmsCriteria: { + tenantId: tenantId, + schemaCode: schemaCode, + limit: 100, + offset: 0, + }, + }, + config: { + enabled: schemaCode && schemaCode?.length > 0, + select: (data) => { + const respData = data?.mdms?.map((e) => ({ label: e?.uniqueIdentifier, value: e?.uniqueIdentifier })); + const finalJSONPath = `registry.rootSchema.properties.${Digit.Utils.workbench.getUpdatedPath(fieldPath)}.enum`; + if (_.has(allProps, finalJSONPath)) { + _.set( + allProps, + finalJSONPath, + respData?.map((e) => e.value) + ); + const path = `definition.properties.${Digit.Utils.workbench.getUpdatedPath(fieldPath)}.enum`; + const newSchema = _.cloneDeep(formSchema); + _.set( + newSchema, + path, + respData?.map((e) => e.value) + ); + updateSchema(newSchema); + } + return respData; + }, + }, + changeQueryName: `data-${schemaCode}`, + }; + console.log(schemaCode,"schemaCode"); + if (schemaCode === "CUSTOM" && configs?.customUiConfigs?.custom?.length > 0) { + const customConfig = configs?.customUiConfigs?.custom?.filter((data) => data?.fieldPath == fieldPath)?.[0] || {}; + reqCriteriaForData.url = customConfig?.dataSource?.API; + reqCriteriaForData.body = JSON.parse(customConfig?.dataSource?.requestBody); + reqCriteriaForData.params = JSON.parse(customConfig?.dataSource?.requestParams); + reqCriteriaForData.changeQueryName = `CUSTOM_DATA-${schemaCode}-${fieldPath}`; + + /* It has dependency Fields*/ + if (customConfig?.dataSource?.dependentPath?.length > 0) { + // const dependentValue=customConfig?.dataSource?.dependentPath?.length>0?:true; + customConfig?.dataSource?.dependentPath?.every((obj) => obj.fieldPath && _.get(formData, obj.fieldPath)); + const dependencyObj = customConfig?.dataSource?.dependentPath?.reduce((acc, curr) => { + acc[curr.depdendentKey] = _.get(formData, curr.fieldPath); + return acc; + }, {}); + const isEnabled = Object.keys(dependencyObj).every((key) => dependencyObj?.[key]); + reqCriteriaForData.config.enabled = isEnabled; + if (isEnabled) { + let newQuery = ""; + Object.keys(dependencyObj).map((key) => { + const dependencyConfig=customConfig?.dataSource?.dependentPath?.filter(obj=>obj.depdendentKey==key)?.[0]; + if(dependencyConfig?.dependencyFor=="REQ_BODY" || dependencyConfig?.dependencyFor=="BOTH"){ + reqCriteriaForData.body = JSON.parse(customConfig?.dataSource?.requestBody?.replace(key, dependencyObj?.[key])); + } + if(dependencyConfig?.dependencyFor=="REQ_PARAM" || dependencyConfig?.dependencyFor=="BOTH"){ + reqCriteriaForData.params = JSON.parse(customConfig?.dataSource?.params?.replace(key, dependencyObj?.[key])); + } + newQuery += `-${dependencyObj?.[key]}`; + }); + reqCriteriaForData.changeQueryName = `CUSTOM_DATA-${schemaCode}-${fieldPath}${newQuery}`; + } + } + + reqCriteriaForData.config.select = (data) => { + let respData = []; + if (data) { + respData = data; + } + if (customConfig?.dataSource?.responseJSON) { + respData = _.get(data, customConfig?.dataSource?.responseJSON, []); + } + if (customConfig?.dataSource?.customFunction) { + const customFun = Digit.Utils.createFunction(customConfig?.dataSource?.customFunction); + respData = customFun?.(data); + } + const finalJSONPath = `registry.rootSchema.properties.${Digit.Utils.workbench.getUpdatedPath(fieldPath)}.enum`; + if (_.has(allProps, finalJSONPath)) { + _.set( + allProps, + finalJSONPath, + respData?.map((item) => ({ label: item, value: item })) + ); + const path = `definition.properties.${Digit.Utils.workbench.getUpdatedPath(fieldPath)}.enum`; + const newSchema = _.cloneDeep(formSchema); + _.set( + newSchema, + path, + respData?.map((e) => e) + ); + updateSchema(newSchema); + } + return respData?.map((item) => ({ label: item, value: item })); + }; + } + return reqCriteriaForData; + +} +export default { getConfig, getMDMSLabel, getFormattedData, getUpdatedPath, updateTitleToLocalisationCodeForObject, preProcessData, postProcessData ,getCriteriaForSelectData}; diff --git a/micro-ui/web/workbench/package.json b/micro-ui/web/workbench/package.json index c76a6e7f7c3..2ff3292afbd 100644 --- a/micro-ui/web/workbench/package.json +++ b/micro-ui/web/workbench/package.json @@ -15,7 +15,7 @@ "homepage": "/workbench-ui", "dependencies": { "@egovernments/digit-ui-libraries": "1.8.0-beta.1", - "@egovernments/digit-ui-module-workbench": "1.0.0-beta.1", + "@egovernments/digit-ui-module-workbench": "1.0.0-beta.2", "@egovernments/digit-ui-module-core": "1.8.0-beta.11", "@egovernments/digit-ui-module-hrms": "1.8.0-beta.3", "@egovernments/digit-ui-module-utilities": "1.0.0-beta.1", From 3e829a6ed9990b72eddd0ebd86280af6e906d3d6 Mon Sep 17 00:00:00 2001 From: ashish-egov <137176738+ashish-egov@users.noreply.github.com> Date: Tue, 5 Dec 2023 12:16:21 +0530 Subject: [PATCH 18/80] Dpg 1897 bulk upload UI 2 (#47) * Feat : Added a bulk upload button in mdms create * Feat : integrated fileUploaderModal for bulk mdms create * Feat : Added manual Validation and Craetion of data * Feat : Added Ajv validator for MDMS Bulk upload * Feat : Integrated json bulk uploader with progress bar * Feat : integrated with xlsx upload * style: update progress bar design * feat: Enhanced ProgressBar and Toast for improved information display * Incremented CSS Version * feat: added index visibility in toast for bulk upload * feat: Redesigned Bulk Upload Modal --- .../micro-ui-internals/packages/css/README.md | 3 +- .../packages/css/package.json | 4 +- .../src/digitv2/pages/employee/workbench.scss | 87 ++++++++++++-- .../workbench/src/components/BulkModal.js | 109 ++++++++++------- .../workbench/src/utils/BulkUploadUtils.js | 111 ++++++++++-------- micro-ui/web/public/index.html | 4 +- 6 files changed, 204 insertions(+), 114 deletions(-) diff --git a/micro-ui/web/micro-ui-internals/packages/css/README.md b/micro-ui/web/micro-ui-internals/packages/css/README.md index 3839d571894..0befc12a4c8 100644 --- a/micro-ui/web/micro-ui-internals/packages/css/README.md +++ b/micro-ui/web/micro-ui-internals/packages/css/README.md @@ -42,8 +42,9 @@ frontend/micro-ui/web/public/index.html # Changelog ```bash +1.8.0-beta.19 Improved Bulk Upload and Bulk Upload Toast CSS 1.8.0-beta.18 added bulk upload css -1.8.0-beta.17 fixed mobile view issue for detail modals +1.8.0-beta.17 fiexed mobile view issue for detail modals 1.8.0-beta.16 styles for detail modals 1.8.0-beta.15 styles for multi select dropdowns 1.8.0-beta.14 added tour help styles diff --git a/micro-ui/web/micro-ui-internals/packages/css/package.json b/micro-ui/web/micro-ui-internals/packages/css/package.json index 57b29990c98..4aeb0de5cb1 100644 --- a/micro-ui/web/micro-ui-internals/packages/css/package.json +++ b/micro-ui/web/micro-ui-internals/packages/css/package.json @@ -1,6 +1,6 @@ { "name": "@egovernments/digit-ui-css", - "version": "1.8.0-beta.18", + "version": "1.8.0-beta.19", "license": "MIT", "main": "dist/index.css", "author": "Jagankumar ", @@ -62,4 +62,4 @@ "digit-ui", "css" ] -} +} \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/pages/employee/workbench.scss b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/pages/employee/workbench.scss index bb963b651d7..f1758cfc086 100644 --- a/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/pages/employee/workbench.scss +++ b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/pages/employee/workbench.scss @@ -860,9 +860,8 @@ button:hover { .progressBarContainer { position: fixed; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); + bottom: 20px; + right: 20px; background-color: #fff; padding: 45px 45px 20px 20px; border-radius: 8px; @@ -872,6 +871,11 @@ button:hover { @media (max-width: 768px) { width: 70vw; + position: fixed; + bottom: 20px; + right: auto; + left: 50%; + transform: translateX(-50%); } .progressBar { @@ -880,21 +884,32 @@ button:hover { border-radius: 4px; overflow: hidden; border: 1px solid #ccc; - - .progressSegment { - height: 20px; - cursor: pointer; - border-right: 1px solid #ccc; - - &:last-child { - border-right: none; - } - } + height: 20px; + background-color: #4CAF50; } .progressHeading { margin: 8px 0; font-size: 16px; + + .success-container { + display: flex; + flex-direction: row; + background-color: #00703C; + color: #fff; + padding: 5px 10px; + border-radius: 5px; + width: fit-content; + align-items: center; + + .success-count { + background-color: #fff; + color: #00703C; + padding: 3px 5px; + border-radius: 3px; + margin-left: 5px; + } + } } .closeButton { @@ -906,6 +921,52 @@ button:hover { border: 1px solid #ccc; border-radius: 1px; } + + .no-uploads { + margin-top: 1em; + } +} + +.results-container-orange { + max-height: 50vh; + overflow: auto; + margin-top: 1em; + border: 1px solid #ccc; + border-radius: 4px; + padding: 1em; + background-color: #ea8a3b !important; + + .no-errors { + background-color: #ea8a3b !important; + } +} + +.results-container { + max-height: 50vh; + overflow: auto; + margin-top: 1em; + border: 1px solid #ccc; + border-radius: 4px; + padding: 1em; + + .results-list-item { + border-bottom: 1px solid #ddd; + padding: 0.5em; + cursor: pointer; + + &:hover { + background-color: #D4351C; + color: white; + /* Yellowish color on hover */ + } + } + + .results-details { + white-space: pre-wrap; + border: 1px solid #ccc; + border-radius: 4px; + padding: 1em; + } } .overlay { diff --git a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/components/BulkModal.js b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/components/BulkModal.js index 6cecfcc4487..063f38ed63c 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/components/BulkModal.js +++ b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/components/BulkModal.js @@ -1,48 +1,80 @@ -import React, { useState } from "react"; +import React, { useState, useEffect } from "react"; import { onConfirm, generateJsonTemplate, downloadTemplate } from "../utils/BulkUploadUtils"; import Ajv from "ajv"; import { useTranslation } from "react-i18next"; import { FileUploadModal, Toast } from "@egovernments/digit-ui-react-components"; import { CloseSvg } from "@egovernments/digit-ui-react-components"; -const ProgressBar = ({ progress, results, onClick, onClose }) => { +const ProgressBar = ({ progress, onClose, results }) => { + const [selectedErrorIndex, setSelectedErrorIndex] = useState(null); + + results.forEach((result, index) => { + result.i = index; + }); + + const errorResults = results.filter((result) => !result.success); + const successCount = results.length - errorResults.length; + + const handleErrorClick = (index) => { + setSelectedErrorIndex((prevIndex) => (prevIndex === index ? null : index)); + }; + + return (
-
- {results.map((result, index) => ( -
onClick(index)} - style={{ - width: `${(1 / results.length) * 100}%`, - backgroundColor: result.success ? "#4CAF50" : "#FF0000", - }} - >
- ))} -
+
{progress === 100 ? ( -
- Done - - ✅ - +
+ Succeeded
+ {successCount} +
) : ( `Processing: ${progress}%` )}
-
- -
+ {progress === 100 && ( +
+ +
+ )} + {errorResults.length === 0 ? ( +
+
No errors found
+
+ ) : + ( +
+
+ {errorResults.map((result, index) => ( +
handleErrorClick(index)}> + {' Error at item ' + (parseInt(result.i) + 1) + ': '} + {result.error} + {selectedErrorIndex === index && ( +
+ {JSON.stringify(result?.data?.Mdms?.data, null, 2)} +
+ )} +
+ ))} +
+
+ ) + }
); }; + + export const BulkModal = ({ showBulkUploadModal, setShowBulkUploadModal, moduleName, masterName, uploadFileTypeXlsx = true }) => { const [showToast, setShowToast] = useState(null); const [showErrorToast, setShowErrorToast] = useState(false); @@ -52,7 +84,7 @@ export const BulkModal = ({ showBulkUploadModal, setShowBulkUploadModal, moduleN const [results, setResults] = useState([]); const [template, setTemplate] = useState(["Error in template"]); const ajv = new Ajv(); - ajv.addVocabulary(["x-unique", "x-ref-schema"]) + ajv.addVocabulary(["x-unique", "x-ref-schema", "x-ui-schema"]) const tenantId = Digit.ULBService.getCurrentTenantId(); const reqCriteria = { @@ -127,7 +159,7 @@ export const BulkModal = ({ showBulkUploadModal, setShowBulkUploadModal, moduleN if (resp?.mdms[0]?.id) { id = resp?.mdms[0]?.id } - updatedResults.push({ index, success: true, response: id, error: null }); + updatedResults.push({ index, success: true, response: id, error: null, data: resp?.mdms[0]?.data }); const currentProgress = Math.floor(((index + 1) / dataArray.length) * 100); setResults(updatedResults); setProgress(currentProgress); @@ -139,7 +171,7 @@ export const BulkModal = ({ showBulkUploadModal, setShowBulkUploadModal, moduleN if (resp?.response?.data?.Errors && resp?.response?.data?.Errors.length > 0) { err = resp?.response?.data?.Errors[0]?.code } - updatedResults.push({ index, success: false, error: err, response: null }); + updatedResults.push({ index, success: false, error: err, response: null, data: JSON.parse(resp?.response?.config?.data) }); const currentProgress = Math.floor(((index + 1) / dataArray.length) * 100); setResults(updatedResults); setProgress(currentProgress); @@ -173,19 +205,6 @@ export const BulkModal = ({ showBulkUploadModal, setShowBulkUploadModal, moduleN } }; - const handleProgressClick = (index) => { - const result = results[index]; - const { success, error, response } = result; - - // Display toast with corresponding details - setShowToast( - success - ? `Request at index ${index} succeeded with Id: ${response}` - : `Request at index ${index} failed. Error: ${error}` - ); - setShowErrorToast(!success); - }; - const onCloseProgresbar = () => { setProgress(0); setResults([]); @@ -195,16 +214,16 @@ export const BulkModal = ({ showBulkUploadModal, setShowBulkUploadModal, moduleN return } - if (pureSchemaDefinition) { - if (typeof template[0] === "string") { - setTemplate(generateJsonTemplate(pureSchemaDefinition)) + useEffect(() => { + if (pureSchemaDefinition && typeof template[0] === "string") { + setTemplate(generateJsonTemplate(pureSchemaDefinition)); } - } + }, [pureSchemaDefinition, template]); return (
{progress > 0 && progress <= 100 && ( - + )} {showBulkUploadModal && ( )} -
+
); } \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/utils/BulkUploadUtils.js b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/utils/BulkUploadUtils.js index 97619b79d12..8708fd0bcfc 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/utils/BulkUploadUtils.js +++ b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/utils/BulkUploadUtils.js @@ -11,66 +11,75 @@ export const onConfirm = ( ) => { const validate = ajv.compile(SchemaDefinitions); - if (file && file.type === 'application/json') { - const reader = new FileReader(); + try { + if (file && file.type === 'application/json') { + const reader = new FileReader(); - reader.onload = (event) => { - const jsonContent = JSON.parse(event.target.result); - var validationError = false; - jsonContent.forEach((data, index) => { - const valid = validate(data); - if (!valid) { - validationError = true; - fileValidator(validate.errors[0]?.message + " on index " + index); - setProgress(0); - return; + reader.onload = (event) => { + var jsonContent = []; + try { + jsonContent = JSON.parse(event.target.result); + } catch (error) { + fileValidator(error.message) } - }); - if (!validationError) { - // Call onSubmitBulk with setProgress - onSubmitBulk(jsonContent, setProgress); - } - }; + var validationError = false; + jsonContent.forEach((data, index) => { + const valid = validate(data); + if (!valid) { + validationError = true; + fileValidator(validate.errors[0]?.message + " on index " + index); + setProgress(0); + return; + } + }); + if (!validationError) { + // Call onSubmitBulk with setProgress + onSubmitBulk(jsonContent, setProgress); + } + }; - reader.readAsText(file); - } - else if (file && file.type === - 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' || - 'application/vnd.ms-excel' - ) { + reader.readAsText(file); + } + else if (file && file.type === + 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' || + 'application/vnd.ms-excel' + ) { - // Sheet would have first row as headings of columns and then each column contain values. Make array of objects from that sheet. Each object would have key as column name and value as column value - const reader = new FileReader(); + // Sheet would have first row as headings of columns and then each column contain values. Make array of objects from that sheet. Each object would have key as column name and value as column value + const reader = new FileReader(); - reader.onload = (event) => { - const data = new Uint8Array(event.target.result); - const workbook = XLSX.read(data, { type: 'array' }); - const sheetName = workbook.SheetNames[0]; // Assuming you are interested in the first sheet - const worksheet = workbook.Sheets[sheetName]; - const jsonArray = XLSX.utils.sheet_to_json(worksheet); - var validationError = false; - jsonArray.forEach((data, index) => { - const valid = validate(data); - if (!valid) { - validationError = true; - fileValidator(validate.errors[0]?.message + " on index " + index); - setProgress(0); - return; + reader.onload = (event) => { + const data = new Uint8Array(event.target.result); + const workbook = XLSX.read(data, { type: 'array' }); + const sheetName = workbook.SheetNames[0]; // Assuming you are interested in the first sheet + const worksheet = workbook.Sheets[sheetName]; + const jsonArray = XLSX.utils.sheet_to_json(worksheet); + var validationError = false; + jsonArray.forEach((data, index) => { + const valid = validate(data); + if (!valid) { + validationError = true; + fileValidator(validate.errors[0]?.message + " on index " + index); + setProgress(0); + return; + } + }); + if (!validationError) { + // Call onSubmitBulk with setProgress + onSubmitBulk(jsonArray, setProgress); } - }); - if (!validationError) { - // Call onSubmitBulk with setProgress - onSubmitBulk(jsonArray, setProgress); } + reader.readAsArrayBuffer(file); } - reader.readAsArrayBuffer(file); - } - else { - fileValidator(t('WBH_ERROR_FILE_NOT_SUPPORTED')); - setProgress(0); + else { + fileValidator(t('WBH_ERROR_FILE_NOT_SUPPORTED')); + setProgress(0); + } + setShowBulkUploadModal(false); + } catch (error) { + fileValidator(error.message) + setShowBulkUploadModal(false); } - - setShowBulkUploadModal(false); }; export const generateJsonTemplate = (schema) => { diff --git a/micro-ui/web/public/index.html b/micro-ui/web/public/index.html index 695de6bef6a..a21c99ce923 100644 --- a/micro-ui/web/public/index.html +++ b/micro-ui/web/public/index.html @@ -7,7 +7,7 @@ - + DIGIT @@ -30,4 +30,4 @@ --> - + \ No newline at end of file From 902e68cb58ddc0cd02197a91001bd7732f53dba6 Mon Sep 17 00:00:00 2001 From: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> Date: Tue, 5 Dec 2023 13:49:37 +0530 Subject: [PATCH 19/80] Incremented the workbench version --- micro-ui/web/core/package.json | 2 +- micro-ui/web/micro-ui-internals/example/package.json | 2 +- .../micro-ui-internals/packages/modules/workbench/package.json | 2 +- .../packages/modules/workbench/src/components/BulkModal.js | 2 +- micro-ui/web/workbench/package.json | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/micro-ui/web/core/package.json b/micro-ui/web/core/package.json index 6d1add8edda..2437316b1c6 100644 --- a/micro-ui/web/core/package.json +++ b/micro-ui/web/core/package.json @@ -16,7 +16,7 @@ "homepage": "/core-ui", "dependencies": { "@egovernments/digit-ui-libraries": "1.8.0-beta.1", - "@egovernments/digit-ui-module-workbench": "1.0.0-beta.2", + "@egovernments/digit-ui-module-workbench": "1.0.0-beta.3", "@egovernments/digit-ui-module-core": "1.8.0-beta.11", "@egovernments/digit-ui-module-hrms": "1.8.0-beta.3", "@egovernments/digit-ui-module-utilities": "1.0.0-beta.1", diff --git a/micro-ui/web/micro-ui-internals/example/package.json b/micro-ui/web/micro-ui-internals/example/package.json index fc9811e5d22..154bcd9b1a3 100644 --- a/micro-ui/web/micro-ui-internals/example/package.json +++ b/micro-ui/web/micro-ui-internals/example/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "@egovernments/digit-ui-libraries": "1.8.0-beta.1", - "@egovernments/digit-ui-module-workbench": "1.0.0-beta.2", + "@egovernments/digit-ui-module-workbench": "1.0.0-beta.3", "@egovernments/digit-ui-module-dss": "1.8.0-beta.2", "@egovernments/digit-ui-module-core": "1.8.0-beta.13", "@egovernments/digit-ui-module-common": "1.8.0-beta.1", diff --git a/micro-ui/web/micro-ui-internals/packages/modules/workbench/package.json b/micro-ui/web/micro-ui-internals/packages/modules/workbench/package.json index 001f5a126b8..045cdccc54e 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/workbench/package.json +++ b/micro-ui/web/micro-ui-internals/packages/modules/workbench/package.json @@ -1,6 +1,6 @@ { "name": "@egovernments/digit-ui-module-workbench", - "version": "1.0.0-beta.2", + "version": "1.0.0-beta.3", "description": "Workbench", "main": "dist/index.js", "module": "dist/index.modern.js", diff --git a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/components/BulkModal.js b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/components/BulkModal.js index 063f38ed63c..3453d1f2398 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/components/BulkModal.js +++ b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/components/BulkModal.js @@ -2,7 +2,7 @@ import React, { useState, useEffect } from "react"; import { onConfirm, generateJsonTemplate, downloadTemplate } from "../utils/BulkUploadUtils"; import Ajv from "ajv"; import { useTranslation } from "react-i18next"; -import { FileUploadModal, Toast } from "@egovernments/digit-ui-react-components"; +import { FileUploadModal, Toast,Loader } from "@egovernments/digit-ui-react-components"; import { CloseSvg } from "@egovernments/digit-ui-react-components"; const ProgressBar = ({ progress, onClose, results }) => { diff --git a/micro-ui/web/workbench/package.json b/micro-ui/web/workbench/package.json index 2ff3292afbd..2dbaea8a363 100644 --- a/micro-ui/web/workbench/package.json +++ b/micro-ui/web/workbench/package.json @@ -15,7 +15,7 @@ "homepage": "/workbench-ui", "dependencies": { "@egovernments/digit-ui-libraries": "1.8.0-beta.1", - "@egovernments/digit-ui-module-workbench": "1.0.0-beta.2", + "@egovernments/digit-ui-module-workbench": "1.0.0-beta.3", "@egovernments/digit-ui-module-core": "1.8.0-beta.11", "@egovernments/digit-ui-module-hrms": "1.8.0-beta.3", "@egovernments/digit-ui-module-utilities": "1.0.0-beta.1", From 8a53cbf458c9458548cf700f8831f2700904d91e Mon Sep 17 00:00:00 2001 From: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> Date: Tue, 5 Dec 2023 13:57:04 +0530 Subject: [PATCH 20/80] Updated the order of build commands --- micro-ui/web/micro-ui-internals/publish-workbench.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/micro-ui/web/micro-ui-internals/publish-workbench.sh b/micro-ui/web/micro-ui-internals/publish-workbench.sh index e1d13d55024..bd8911b7644 100644 --- a/micro-ui/web/micro-ui-internals/publish-workbench.sh +++ b/micro-ui/web/micro-ui-internals/publish-workbench.sh @@ -14,6 +14,11 @@ msg() { msg "Building and publishing css" cd "$BASEDIR/packages/css" && rm -rf dist && yarn && npm publish --access public + +# msg "Building and publishing Utilities module" +cd "$BASEDIR/packages/modules/workbench" && rm -rf dist && yarn&& npm publish --tag workbench-1.0 + + # msg "Building and publishing svg components" cd "$BASEDIR/packages/svg-components" && rm -rf dist && yarn && npm publish --tag workbench-1.0 @@ -48,6 +53,3 @@ cd "$BASEDIR/packages/modules/core" && rm -rf dist && yarn&& npm publish --tag # msg "Building and publishing Utilities module" cd "$BASEDIR/packages/modules/utilities" && rm -rf dist && yarn&& npm publish --tag workbench-1.0 - -# msg "Building and publishing Utilities module" -cd "$BASEDIR/packages/modules/workbench" && rm -rf dist && yarn&& npm publish --tag workbench-1.0 From 67f0c95f2448333a1f83604a27879fd8ac999473 Mon Sep 17 00:00:00 2001 From: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> Date: Tue, 5 Dec 2023 15:03:39 +0530 Subject: [PATCH 21/80] Updated the packages version --- micro-ui/web/core/inter-package.json | 2 +- micro-ui/web/core/package.json | 4 ++-- micro-ui/web/micro-ui-internals/example/package.json | 4 ++-- micro-ui/web/micro-ui-internals/package.json | 2 +- .../web/micro-ui-internals/packages/modules/core/package.json | 4 ++-- .../web/micro-ui-internals/packages/modules/dss/package.json | 2 +- .../packages/modules/utilities/package.json | 2 +- .../packages/modules/workbench/package.json | 2 +- .../micro-ui-internals/packages/react-components/README.md | 1 + .../micro-ui-internals/packages/react-components/package.json | 2 +- micro-ui/web/package.json | 4 ++-- micro-ui/web/workbench/inter-package.json | 2 +- micro-ui/web/workbench/package.json | 4 ++-- 13 files changed, 18 insertions(+), 17 deletions(-) diff --git a/micro-ui/web/core/inter-package.json b/micro-ui/web/core/inter-package.json index 6faddd59b0d..edc70eb6bbe 100644 --- a/micro-ui/web/core/inter-package.json +++ b/micro-ui/web/core/inter-package.json @@ -61,7 +61,7 @@ "dependencies": { "lodash": "4.17.21", "microbundle-crl": "0.13.11", - "@egovernments/digit-ui-react-components": "1.8.0-beta.2", + "@egovernments/digit-ui-react-components": "1.8.0-beta.4", "react": "17.0.2", "react-dom": "17.0.2", "react-hook-form": "6.15.8", diff --git a/micro-ui/web/core/package.json b/micro-ui/web/core/package.json index 2437316b1c6..6b9ede5ff4f 100644 --- a/micro-ui/web/core/package.json +++ b/micro-ui/web/core/package.json @@ -17,10 +17,10 @@ "dependencies": { "@egovernments/digit-ui-libraries": "1.8.0-beta.1", "@egovernments/digit-ui-module-workbench": "1.0.0-beta.3", - "@egovernments/digit-ui-module-core": "1.8.0-beta.11", + "@egovernments/digit-ui-module-core": "1.8.0-beta.14", "@egovernments/digit-ui-module-hrms": "1.8.0-beta.3", "@egovernments/digit-ui-module-utilities": "1.0.0-beta.1", - "@egovernments/digit-ui-react-components": "1.8.0-beta.3", + "@egovernments/digit-ui-react-components": "1.8.0-beta.4", "babel-loader": "8.1.0", "react": "17.0.2", "react-dom": "17.0.2", diff --git a/micro-ui/web/micro-ui-internals/example/package.json b/micro-ui/web/micro-ui-internals/example/package.json index 154bcd9b1a3..306cf099386 100644 --- a/micro-ui/web/micro-ui-internals/example/package.json +++ b/micro-ui/web/micro-ui-internals/example/package.json @@ -12,12 +12,12 @@ "@egovernments/digit-ui-libraries": "1.8.0-beta.1", "@egovernments/digit-ui-module-workbench": "1.0.0-beta.3", "@egovernments/digit-ui-module-dss": "1.8.0-beta.2", - "@egovernments/digit-ui-module-core": "1.8.0-beta.13", + "@egovernments/digit-ui-module-core": "1.8.0-beta.14", "@egovernments/digit-ui-module-common": "1.8.0-beta.1", "@egovernments/digit-ui-module-hrms": "1.8.0-beta.3", "@egovernments/digit-ui-module-utilities": "1.0.0-beta.1", "@egovernments/digit-ui-module-engagement": "1.5.20", - "@egovernments/digit-ui-react-components": "1.8.0-beta.3", + "@egovernments/digit-ui-react-components": "1.8.0-beta.4", "http-proxy-middleware": "^1.0.5", "react": "17.0.2", "react-dom": "17.0.2", diff --git a/micro-ui/web/micro-ui-internals/package.json b/micro-ui/web/micro-ui-internals/package.json index 4eb06273421..38ced337eee 100644 --- a/micro-ui/web/micro-ui-internals/package.json +++ b/micro-ui/web/micro-ui-internals/package.json @@ -63,7 +63,7 @@ "dependencies": { "lodash": "4.17.21", "microbundle-crl": "0.13.11", - "@egovernments/digit-ui-react-components": "1.8.0-beta.2", + "@egovernments/digit-ui-react-components": "1.8.0-beta.4", "react": "17.0.2", "react-dom": "17.0.2", "react-hook-form": "6.15.8", diff --git a/micro-ui/web/micro-ui-internals/packages/modules/core/package.json b/micro-ui/web/micro-ui-internals/packages/modules/core/package.json index 0a561b762b5..a0bb78cccf3 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/core/package.json +++ b/micro-ui/web/micro-ui-internals/packages/modules/core/package.json @@ -1,6 +1,6 @@ { "name": "@egovernments/digit-ui-module-core", - "version": "1.8.0-beta.13", + "version": "1.8.0-beta.14", "license": "MIT", "main": "dist/index.js", "module": "dist/index.modern.js", @@ -14,7 +14,7 @@ "prepublish": "yarn build" }, "dependencies": { - "@egovernments/digit-ui-react-components": "1.8.0-beta.3", + "@egovernments/digit-ui-react-components": "1.8.0-beta.4", "react": "17.0.2", "react-dom": "17.0.2", "react-i18next": "11.16.2", diff --git a/micro-ui/web/micro-ui-internals/packages/modules/dss/package.json b/micro-ui/web/micro-ui-internals/packages/modules/dss/package.json index 595f1276847..f62ee5d0666 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/dss/package.json +++ b/micro-ui/web/micro-ui-internals/packages/modules/dss/package.json @@ -18,7 +18,7 @@ "react-router-dom": "5.3.0" }, "dependencies": { - "@egovernments/digit-ui-react-components": "1.8.0-beta.3", + "@egovernments/digit-ui-react-components": "1.8.0-beta.4", "jsonpath": "^1.1.1", "react": "17.0.2", "react-date-range": "1.3.0", diff --git a/micro-ui/web/micro-ui-internals/packages/modules/utilities/package.json b/micro-ui/web/micro-ui-internals/packages/modules/utilities/package.json index ca588d14086..6b96f0410b4 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/utilities/package.json +++ b/micro-ui/web/micro-ui-internals/packages/modules/utilities/package.json @@ -18,7 +18,7 @@ "react-router-dom": "5.3.0" }, "dependencies": { - "@egovernments/digit-ui-react-components": "1.8.0-beta.3", + "@egovernments/digit-ui-react-components": "1.8.0-beta.4", "react": "17.0.2", "react-date-range": "^1.4.0", "react-dom": "17.0.2", diff --git a/micro-ui/web/micro-ui-internals/packages/modules/workbench/package.json b/micro-ui/web/micro-ui-internals/packages/modules/workbench/package.json index 045cdccc54e..d83673baa99 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/workbench/package.json +++ b/micro-ui/web/micro-ui-internals/packages/modules/workbench/package.json @@ -18,7 +18,7 @@ "react-router-dom": "5.3.0" }, "dependencies": { - "@egovernments/digit-ui-react-components": "1.8.0-beta.3", + "@egovernments/digit-ui-react-components": "1.8.0-beta.4", "@rjsf/core": "5.10.0", "@rjsf/utils": "5.10.0", "@rjsf/validator-ajv8": "5.10.0", diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/README.md b/micro-ui/web/micro-ui-internals/packages/react-components/README.md index b834ef723a6..6b20573f74d 100644 --- a/micro-ui/web/micro-ui-internals/packages/react-components/README.md +++ b/micro-ui/web/micro-ui-internals/packages/react-components/README.md @@ -88,6 +88,7 @@ Syntax for the FormComposersV2 # Changelog ```bash +1.8.0-beta.4 republished 1.8.0-beta.3 republished due to some issues 1.8.0-beta.2 Added Some icons for pqm dashboard 1.8.0-beta.1 fixed some topbar issues diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/package.json b/micro-ui/web/micro-ui-internals/packages/react-components/package.json index 539891994d5..53f0882baec 100644 --- a/micro-ui/web/micro-ui-internals/packages/react-components/package.json +++ b/micro-ui/web/micro-ui-internals/packages/react-components/package.json @@ -1,6 +1,6 @@ { "name": "@egovernments/digit-ui-react-components", - "version": "1.8.0-beta.3", + "version": "1.8.0-beta.4", "license": "MIT", "main": "dist/index.js", "module": "dist/index.modern.js", diff --git a/micro-ui/web/package.json b/micro-ui/web/package.json index 8a8ad0c658d..8897c9caedb 100644 --- a/micro-ui/web/package.json +++ b/micro-ui/web/package.json @@ -17,12 +17,12 @@ "@egovernments/digit-ui-libraries": "1.8.0-beta.1", "@egovernments/digit-ui-module-workbench": "1.0.0-beta.1", "@egovernments/digit-ui-module-dss": "1.8.0-beta.2", - "@egovernments/digit-ui-module-core": "1.8.0-beta.13", + "@egovernments/digit-ui-module-core": "1.8.0-beta.14", "@egovernments/digit-ui-module-common": "1.8.0-beta.1", "@egovernments/digit-ui-module-hrms": "1.8.0-beta.3", "@egovernments/digit-ui-module-utilities": "1.0.0-beta.1", "@egovernments/digit-ui-module-engagement": "1.5.20", - "@egovernments/digit-ui-react-components": "1.8.0-beta.3", + "@egovernments/digit-ui-react-components": "1.8.0-beta.4", "babel-loader": "8.1.0", "clean-webpack-plugin": "4.0.0", "react": "17.0.2", diff --git a/micro-ui/web/workbench/inter-package.json b/micro-ui/web/workbench/inter-package.json index 725b94158e0..e6aa74603f4 100644 --- a/micro-ui/web/workbench/inter-package.json +++ b/micro-ui/web/workbench/inter-package.json @@ -60,7 +60,7 @@ "dependencies": { "lodash": "4.17.21", "microbundle-crl": "0.13.11", - "@egovernments/digit-ui-react-components": "1.8.0-beta.2", + "@egovernments/digit-ui-react-components": "1.8.0-beta.4", "react": "17.0.2", "react-dom": "17.0.2", "react-hook-form": "6.15.8", diff --git a/micro-ui/web/workbench/package.json b/micro-ui/web/workbench/package.json index 2dbaea8a363..7edfdabb437 100644 --- a/micro-ui/web/workbench/package.json +++ b/micro-ui/web/workbench/package.json @@ -16,10 +16,10 @@ "dependencies": { "@egovernments/digit-ui-libraries": "1.8.0-beta.1", "@egovernments/digit-ui-module-workbench": "1.0.0-beta.3", - "@egovernments/digit-ui-module-core": "1.8.0-beta.11", + "@egovernments/digit-ui-module-core": "1.8.0-beta.14", "@egovernments/digit-ui-module-hrms": "1.8.0-beta.3", "@egovernments/digit-ui-module-utilities": "1.0.0-beta.1", - "@egovernments/digit-ui-react-components": "1.8.0-beta.3", + "@egovernments/digit-ui-react-components": "1.8.0-beta.4", "babel-loader": "8.1.0", "react": "17.0.2", "react-dom": "17.0.2", From f847b3ebd24d7827e00d1174360437559c30e55a Mon Sep 17 00:00:00 2001 From: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> Date: Tue, 5 Dec 2023 15:13:05 +0530 Subject: [PATCH 22/80] updated the workbench version --- micro-ui/web/core/package.json | 2 +- micro-ui/web/micro-ui-internals/example/package.json | 2 +- .../micro-ui-internals/packages/modules/workbench/package.json | 2 +- micro-ui/web/package.json | 2 +- micro-ui/web/workbench/package.json | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/micro-ui/web/core/package.json b/micro-ui/web/core/package.json index 6b9ede5ff4f..e67d25eb951 100644 --- a/micro-ui/web/core/package.json +++ b/micro-ui/web/core/package.json @@ -16,7 +16,7 @@ "homepage": "/core-ui", "dependencies": { "@egovernments/digit-ui-libraries": "1.8.0-beta.1", - "@egovernments/digit-ui-module-workbench": "1.0.0-beta.3", + "@egovernments/digit-ui-module-workbench": "1.0.0-beta.4", "@egovernments/digit-ui-module-core": "1.8.0-beta.14", "@egovernments/digit-ui-module-hrms": "1.8.0-beta.3", "@egovernments/digit-ui-module-utilities": "1.0.0-beta.1", diff --git a/micro-ui/web/micro-ui-internals/example/package.json b/micro-ui/web/micro-ui-internals/example/package.json index 306cf099386..96b13c31b53 100644 --- a/micro-ui/web/micro-ui-internals/example/package.json +++ b/micro-ui/web/micro-ui-internals/example/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "@egovernments/digit-ui-libraries": "1.8.0-beta.1", - "@egovernments/digit-ui-module-workbench": "1.0.0-beta.3", + "@egovernments/digit-ui-module-workbench": "1.0.0-beta.4", "@egovernments/digit-ui-module-dss": "1.8.0-beta.2", "@egovernments/digit-ui-module-core": "1.8.0-beta.14", "@egovernments/digit-ui-module-common": "1.8.0-beta.1", diff --git a/micro-ui/web/micro-ui-internals/packages/modules/workbench/package.json b/micro-ui/web/micro-ui-internals/packages/modules/workbench/package.json index d83673baa99..ee98deaaace 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/workbench/package.json +++ b/micro-ui/web/micro-ui-internals/packages/modules/workbench/package.json @@ -1,6 +1,6 @@ { "name": "@egovernments/digit-ui-module-workbench", - "version": "1.0.0-beta.3", + "version": "1.0.0-beta.4", "description": "Workbench", "main": "dist/index.js", "module": "dist/index.modern.js", diff --git a/micro-ui/web/package.json b/micro-ui/web/package.json index 8897c9caedb..9e6fbcd9230 100644 --- a/micro-ui/web/package.json +++ b/micro-ui/web/package.json @@ -15,7 +15,7 @@ "homepage": "/digit-ui", "dependencies": { "@egovernments/digit-ui-libraries": "1.8.0-beta.1", - "@egovernments/digit-ui-module-workbench": "1.0.0-beta.1", + "@egovernments/digit-ui-module-workbench": "1.0.0-beta.4", "@egovernments/digit-ui-module-dss": "1.8.0-beta.2", "@egovernments/digit-ui-module-core": "1.8.0-beta.14", "@egovernments/digit-ui-module-common": "1.8.0-beta.1", diff --git a/micro-ui/web/workbench/package.json b/micro-ui/web/workbench/package.json index 7edfdabb437..2e8360ef5de 100644 --- a/micro-ui/web/workbench/package.json +++ b/micro-ui/web/workbench/package.json @@ -15,7 +15,7 @@ "homepage": "/workbench-ui", "dependencies": { "@egovernments/digit-ui-libraries": "1.8.0-beta.1", - "@egovernments/digit-ui-module-workbench": "1.0.0-beta.3", + "@egovernments/digit-ui-module-workbench": "1.0.0-beta.4", "@egovernments/digit-ui-module-core": "1.8.0-beta.14", "@egovernments/digit-ui-module-hrms": "1.8.0-beta.3", "@egovernments/digit-ui-module-utilities": "1.0.0-beta.1", From 4e38dbc6b893416ab3c1e7d6a96e70c362dd42e6 Mon Sep 17 00:00:00 2001 From: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> Date: Tue, 5 Dec 2023 16:52:57 +0530 Subject: [PATCH 23/80] updated the jsonform issues related to bulkupload --- .vscode/settings.json | 3 +++ micro-ui/web/core/package.json | 2 +- micro-ui/web/micro-ui-internals/example/package.json | 2 +- .../micro-ui-internals/packages/modules/workbench/README.md | 1 + .../micro-ui-internals/packages/modules/workbench/package.json | 2 +- .../packages/modules/workbench/src/components/DigitJSONForm.js | 2 +- micro-ui/web/package.json | 2 +- micro-ui/web/workbench/package.json | 2 +- 8 files changed, 10 insertions(+), 6 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000000..14f60307eb1 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "editor.inlineSuggest.showToolbar": "onHover" +} \ No newline at end of file diff --git a/micro-ui/web/core/package.json b/micro-ui/web/core/package.json index e67d25eb951..3b9962e8cb2 100644 --- a/micro-ui/web/core/package.json +++ b/micro-ui/web/core/package.json @@ -16,7 +16,7 @@ "homepage": "/core-ui", "dependencies": { "@egovernments/digit-ui-libraries": "1.8.0-beta.1", - "@egovernments/digit-ui-module-workbench": "1.0.0-beta.4", + "@egovernments/digit-ui-module-workbench": "1.0.0-beta.5", "@egovernments/digit-ui-module-core": "1.8.0-beta.14", "@egovernments/digit-ui-module-hrms": "1.8.0-beta.3", "@egovernments/digit-ui-module-utilities": "1.0.0-beta.1", diff --git a/micro-ui/web/micro-ui-internals/example/package.json b/micro-ui/web/micro-ui-internals/example/package.json index 96b13c31b53..152167b979e 100644 --- a/micro-ui/web/micro-ui-internals/example/package.json +++ b/micro-ui/web/micro-ui-internals/example/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "@egovernments/digit-ui-libraries": "1.8.0-beta.1", - "@egovernments/digit-ui-module-workbench": "1.0.0-beta.4", + "@egovernments/digit-ui-module-workbench": "1.0.0-beta.5", "@egovernments/digit-ui-module-dss": "1.8.0-beta.2", "@egovernments/digit-ui-module-core": "1.8.0-beta.14", "@egovernments/digit-ui-module-common": "1.8.0-beta.1", diff --git a/micro-ui/web/micro-ui-internals/packages/modules/workbench/README.md b/micro-ui/web/micro-ui-internals/packages/modules/workbench/README.md index 96c41fcc16a..5b5d28d7f38 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/workbench/README.md +++ b/micro-ui/web/micro-ui-internals/packages/modules/workbench/README.md @@ -103,6 +103,7 @@ https://github.com/egovernments/DIGIT-OSS/pull/99/commits/6e711bdc005c226c7debd5 ### Changelog ```bash +1.0.0-beta.5 Fixed some loading issue 1.0.0-beta.2 custom api support added 1.0.0-beta.1 republished due to some version issues 1.0.0-beta workbench base version beta release diff --git a/micro-ui/web/micro-ui-internals/packages/modules/workbench/package.json b/micro-ui/web/micro-ui-internals/packages/modules/workbench/package.json index ee98deaaace..c0e755079c3 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/workbench/package.json +++ b/micro-ui/web/micro-ui-internals/packages/modules/workbench/package.json @@ -1,6 +1,6 @@ { "name": "@egovernments/digit-ui-module-workbench", - "version": "1.0.0-beta.4", + "version": "1.0.0-beta.5", "description": "Workbench", "main": "dist/index.js", "module": "dist/index.modern.js", diff --git a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/components/DigitJSONForm.js b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/components/DigitJSONForm.js index 141f989fdd5..1b1ef8ce160 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/components/DigitJSONForm.js +++ b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/components/DigitJSONForm.js @@ -284,7 +284,7 @@ const DigitJSONForm = ({
{screenType === "add" ? t("WBH_ADD_MDMS") : screenType === "view" ? t("WBH_VIEW_MDMS") : t("WBH_EDIT_MDMS")}
- + {showBulkUploadModal&&}
{t(Digit.Utils.workbench.getMDMSLabel(`SCHEMA_` + schema?.code))}
Date: Wed, 6 Dec 2023 10:06:04 +0530 Subject: [PATCH 24/80] Fix : Fixed BulkModal Ui for MDMSAddv4 (#49) * Fix : Fixed BulkModal Ui for MDMSAddv4 * Incremented Workbench Version --- micro-ui/web/core/package.json | 6 +++--- micro-ui/web/micro-ui-internals/example/package.json | 4 ++-- .../packages/modules/workbench/README.md | 1 + .../packages/modules/workbench/package.json | 4 ++-- .../modules/workbench/src/components/BulkModal.js | 11 +++++------ .../modules/workbench/src/components/DigitJSONForm.js | 6 +++--- .../packages/modules/workbench/src/hooks/workbench.js | 6 +++--- micro-ui/web/package.json | 2 +- micro-ui/web/workbench/package.json | 6 +++--- 9 files changed, 23 insertions(+), 23 deletions(-) diff --git a/micro-ui/web/core/package.json b/micro-ui/web/core/package.json index 3b9962e8cb2..b75826f3842 100644 --- a/micro-ui/web/core/package.json +++ b/micro-ui/web/core/package.json @@ -16,7 +16,7 @@ "homepage": "/core-ui", "dependencies": { "@egovernments/digit-ui-libraries": "1.8.0-beta.1", - "@egovernments/digit-ui-module-workbench": "1.0.0-beta.5", + "@egovernments/digit-ui-module-workbench": "1.0.0-beta.6", "@egovernments/digit-ui-module-core": "1.8.0-beta.14", "@egovernments/digit-ui-module-hrms": "1.8.0-beta.3", "@egovernments/digit-ui-module-utilities": "1.0.0-beta.1", @@ -53,7 +53,7 @@ "build:prepare": "./build.sh", "build:libraries": "cd micro-ui-internals && yarn build", "build:prod": "webpack --mode production", - "build:webpack":"yarn build:libraries &&cd .. && ls && cd ./web && ls && yarn build:prod", + "build:webpack": "yarn build:libraries &&cd .. && ls && cd ./web && ls && yarn build:prod", "clean": "rm -rf node_modules" }, "eslintConfig": { @@ -73,4 +73,4 @@ "last 1 safari version" ] } -} +} \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/example/package.json b/micro-ui/web/micro-ui-internals/example/package.json index 152167b979e..37881a3aa24 100644 --- a/micro-ui/web/micro-ui-internals/example/package.json +++ b/micro-ui/web/micro-ui-internals/example/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "@egovernments/digit-ui-libraries": "1.8.0-beta.1", - "@egovernments/digit-ui-module-workbench": "1.0.0-beta.5", + "@egovernments/digit-ui-module-workbench": "1.0.0-beta.6", "@egovernments/digit-ui-module-dss": "1.8.0-beta.2", "@egovernments/digit-ui-module-core": "1.8.0-beta.14", "@egovernments/digit-ui-module-common": "1.8.0-beta.1", @@ -37,4 +37,4 @@ "last 1 safari version" ] } -} +} \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/modules/workbench/README.md b/micro-ui/web/micro-ui-internals/packages/modules/workbench/README.md index 5b5d28d7f38..fa466c9302c 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/workbench/README.md +++ b/micro-ui/web/micro-ui-internals/packages/modules/workbench/README.md @@ -103,6 +103,7 @@ https://github.com/egovernments/DIGIT-OSS/pull/99/commits/6e711bdc005c226c7debd5 ### Changelog ```bash +1.0.0-beta.6 Added Bulk Upload Ui for MDMS Add 1.0.0-beta.5 Fixed some loading issue 1.0.0-beta.2 custom api support added 1.0.0-beta.1 republished due to some version issues diff --git a/micro-ui/web/micro-ui-internals/packages/modules/workbench/package.json b/micro-ui/web/micro-ui-internals/packages/modules/workbench/package.json index c0e755079c3..20f37fec2d4 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/workbench/package.json +++ b/micro-ui/web/micro-ui-internals/packages/modules/workbench/package.json @@ -1,6 +1,6 @@ { "name": "@egovernments/digit-ui-module-workbench", - "version": "1.0.0-beta.5", + "version": "1.0.0-beta.6", "description": "Workbench", "main": "dist/index.js", "module": "dist/index.modern.js", @@ -42,4 +42,4 @@ "digit-ui", "workbench" ] -} +} \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/components/BulkModal.js b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/components/BulkModal.js index 3453d1f2398..f01e252e3f5 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/components/BulkModal.js +++ b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/components/BulkModal.js @@ -2,7 +2,7 @@ import React, { useState, useEffect } from "react"; import { onConfirm, generateJsonTemplate, downloadTemplate } from "../utils/BulkUploadUtils"; import Ajv from "ajv"; import { useTranslation } from "react-i18next"; -import { FileUploadModal, Toast,Loader } from "@egovernments/digit-ui-react-components"; +import { FileUploadModal, Toast, Loader } from "@egovernments/digit-ui-react-components"; import { CloseSvg } from "@egovernments/digit-ui-react-components"; const ProgressBar = ({ progress, onClose, results }) => { @@ -209,17 +209,16 @@ export const BulkModal = ({ showBulkUploadModal, setShowBulkUploadModal, moduleN setProgress(0); setResults([]); } - - if (loading || isLoading) { - return - } - useEffect(() => { if (pureSchemaDefinition && typeof template[0] === "string") { setTemplate(generateJsonTemplate(pureSchemaDefinition)); } }, [pureSchemaDefinition, template]); + if (loading || isLoading) { + return + } + return (
{progress > 0 && progress <= 100 && ( diff --git a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/components/DigitJSONForm.js b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/components/DigitJSONForm.js index 1b1ef8ce160..76d8af0b5bc 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/components/DigitJSONForm.js +++ b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/components/DigitJSONForm.js @@ -255,7 +255,7 @@ const DigitJSONForm = ({ disabled = false, setShowToast, setShowErrorToast, - v2=true + v2 = true }) => { const { t } = useTranslation(); useEffect(() => { @@ -266,7 +266,7 @@ const DigitJSONForm = ({ onSubmit(updatedData); }; - const customWidgets = { SelectWidget:v2? CustomDropdown:CustomDropdownV2, CheckboxWidget: CustomCheckbox }; + const customWidgets = { SelectWidget: v2 ? CustomDropdown : CustomDropdownV2, CheckboxWidget: CustomCheckbox }; const [displayMenu, setDisplayMenu] = useState(false); const [liveValidate, setLiveValidate] = useState(false); @@ -284,7 +284,7 @@ const DigitJSONForm = ({
{screenType === "add" ? t("WBH_ADD_MDMS") : screenType === "view" ? t("WBH_VIEW_MDMS") : t("WBH_EDIT_MDMS")}
- {showBulkUploadModal&&} +
{t(Digit.Utils.workbench.getMDMSLabel(`SCHEMA_` + schema?.code))}
0) { @@ -170,7 +170,7 @@ const getMDMSSchema = (schemaCode, tenantId = Digit.ULBService.getCurrentTenantI if (_.get(schemaData?.definition?.properties, updatedPath)) { _.set(schemaData?.definition?.properties, updatedPath, { ..._.get(schemaData?.definition?.properties, updatedPath, {}), - enum: [{label:"WBH_NULL",value:null}], + enum: [{ label: "WBH_NULL", value: null }], schemaCode: "CUSTOM", fieldPath: dependent?.fieldPath, tenantId, diff --git a/micro-ui/web/package.json b/micro-ui/web/package.json index 28743061827..513169d665a 100644 --- a/micro-ui/web/package.json +++ b/micro-ui/web/package.json @@ -15,7 +15,7 @@ "homepage": "/digit-ui", "dependencies": { "@egovernments/digit-ui-libraries": "1.8.0-beta.1", - "@egovernments/digit-ui-module-workbench": "1.0.0-beta.5", + "@egovernments/digit-ui-module-workbench": "1.0.0-beta.6", "@egovernments/digit-ui-module-dss": "1.8.0-beta.2", "@egovernments/digit-ui-module-core": "1.8.0-beta.14", "@egovernments/digit-ui-module-common": "1.8.0-beta.1", diff --git a/micro-ui/web/workbench/package.json b/micro-ui/web/workbench/package.json index 3edbb9d3a94..43d343c6460 100644 --- a/micro-ui/web/workbench/package.json +++ b/micro-ui/web/workbench/package.json @@ -15,7 +15,7 @@ "homepage": "/workbench-ui", "dependencies": { "@egovernments/digit-ui-libraries": "1.8.0-beta.1", - "@egovernments/digit-ui-module-workbench": "1.0.0-beta.5", + "@egovernments/digit-ui-module-workbench": "1.0.0-beta.6", "@egovernments/digit-ui-module-core": "1.8.0-beta.14", "@egovernments/digit-ui-module-hrms": "1.8.0-beta.3", "@egovernments/digit-ui-module-utilities": "1.0.0-beta.1", @@ -52,7 +52,7 @@ "build:prepare": "./build.sh", "build:libraries": "cd micro-ui-internals && yarn build", "build:prod": "webpack --mode production", - "build:webpack":"yarn build:libraries &&cd .. && ls && cd ./web && ls && yarn build:prod", + "build:webpack": "yarn build:libraries &&cd .. && ls && cd ./web && ls && yarn build:prod", "clean": "rm -rf node_modules" }, "eslintConfig": { @@ -72,4 +72,4 @@ "last 1 safari version" ] } -} +} \ No newline at end of file From d34209abb7f8bb104dcd66439901538a83d17e0d Mon Sep 17 00:00:00 2001 From: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> Date: Wed, 6 Dec 2023 19:57:13 +0530 Subject: [PATCH 25/80] Updated the limit of schema fetch to 200 --- .../modules/workbench/src/pages/employee/MDMSManageMaster.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSManageMaster.js b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSManageMaster.js index 6b06c599058..6453013a0c5 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSManageMaster.js +++ b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSManageMaster.js @@ -40,7 +40,7 @@ const MDMSManageMaster = () => { tenantId = tenantId || Digit.ULBService.getCurrentTenantId(); const SchemaDefCriteria = { tenantId:tenantId , - limit:100 + limit:200 } if(master && modulee ) { SchemaDefCriteria.codes = [`${master}.${modulee}`] From 844883d95722c35dae825aa8630286d536c20a81 Mon Sep 17 00:00:00 2001 From: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> Date: Mon, 11 Dec 2023 09:45:15 +0530 Subject: [PATCH 26/80] Added the default customisation config changes required for the HCM search screen --- .../example/.env-workbench-mz-uat | 8 + .../micro-ui-internals/example/package.json | 2 +- .../example/src/UICustomizations.js | 203 ++++++++++++++++++ .../packages/modules/utilities/package.json | 2 +- .../employee/DynamicSearchComponent/index.js | 3 +- micro-ui/web/workbench/package.json | 2 +- 6 files changed, 216 insertions(+), 4 deletions(-) create mode 100644 micro-ui/web/micro-ui-internals/example/.env-workbench-mz-uat diff --git a/micro-ui/web/micro-ui-internals/example/.env-workbench-mz-uat b/micro-ui/web/micro-ui-internals/example/.env-workbench-mz-uat new file mode 100644 index 00000000000..bf5c185befe --- /dev/null +++ b/micro-ui/web/micro-ui-internals/example/.env-workbench-mz-uat @@ -0,0 +1,8 @@ +SKIP_PREFLIGHT_CHECK=true +REACT_APP_USER_TYPE=EMPLOYEE +REACT_APP_EMPLOYEE_TOKEN=c835932f-2ad4-4d05-83d6-49e0b8c59f8a +REACT_APP_CITIZEN_TOKEN=7cd58aae-30b3-41ed-a1b3-3417107a993c +REACT_APP_PROXY_API=https://unified-uat.digit.org +REACT_APP_PROXY_ASSETS=https://unified-uat.digit.org +REACT_APP_GLOBAL=https://egov-uat-assets.s3.ap-south-1.amazonaws.com/globalConfigsWorkbench.js +REACT_APP_CONTEXT=works \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/example/package.json b/micro-ui/web/micro-ui-internals/example/package.json index 37881a3aa24..6dc9b1b7183 100644 --- a/micro-ui/web/micro-ui-internals/example/package.json +++ b/micro-ui/web/micro-ui-internals/example/package.json @@ -15,7 +15,7 @@ "@egovernments/digit-ui-module-core": "1.8.0-beta.14", "@egovernments/digit-ui-module-common": "1.8.0-beta.1", "@egovernments/digit-ui-module-hrms": "1.8.0-beta.3", - "@egovernments/digit-ui-module-utilities": "1.0.0-beta.1", + "@egovernments/digit-ui-module-utilities": "1.0.0-beta.2", "@egovernments/digit-ui-module-engagement": "1.5.20", "@egovernments/digit-ui-react-components": "1.8.0-beta.4", "http-proxy-middleware": "^1.0.5", diff --git a/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js b/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js index 140c4664d72..d0d90e70d94 100644 --- a/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js +++ b/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js @@ -1,5 +1,7 @@ import { Link } from "react-router-dom"; import _ from "lodash"; +import { useLocation, useHistory } from "react-router-dom"; +import { useParams } from "react-router-dom"; //create functions here based on module name set in mdms(eg->SearchProjectConfig) //how to call these -> Digit?.Customizations?.[masterName]?.[moduleName] @@ -417,4 +419,205 @@ export const UICustomizations = { } }, }, + SearchDefaultConfig: { + + customValidationCheck: (data) => { + //checking both to and from date are present + const { createdFrom, createdTo } = data; + if ((createdFrom === "" && createdTo !== "") || (createdFrom !== "" && createdTo === "")) + return { warning: true, label: "ES_COMMON_ENTER_DATE_RANGE" }; + + return false; + }, + preProcess: (data) => { + const location = useLocation(); + data.params = { ...data.params }; + const { masterName } = useParams(); + + const searchParams = new URLSearchParams(location.search); + const paths = { + "SearchProjectConfig": { + basePath: "Projects", + pathConfig: { + tenantId: "tenantId", + }, + dateConfig: { + }, + selectConfig: { + wardCode: "wardCode[0].code", + socialCategory: "socialCategory.code", + }, + textConfig :["id", "tenantId"] + }, + "SearchProductConfig": { + basePath: "Product", + pathConfig: { + id: "id[0]", + }, + dateConfig: { + }, + selectConfig: { + }, + textConfig :["id", "manufacturer", "name", "type"] + }, + "SearchHouseholdConfig": { + basePath: "Household", + pathConfig: { + id: "id[0]", + clientReferenceId: "clientReferenceId[0]", + }, + dateConfig: { + }, + selectConfig: { + }, + textConfig :["boundaryCode", "clientReferenceId", "id"] + }, + "SearchProductVariantConfig": { + basePath: "ProductVariant", + pathConfig: { + id: "id[0]", + }, + dateConfig: { + }, + selectConfig: { + }, + textConfig :["productId", "sku", "variation"] + }, + "SearchProjectBeneficiaryConfig": { + basePath: "ProjectBeneficiary", + pathConfig: { + id: "id[0]", + clientReferenceId: "clientReferenceId[0]", + + }, + dateConfig: { + dateOfRegistration: "daystart" + }, + selectConfig: { + }, + textConfig :["beneficiaryId", "projectId"] + }, + "SearchProjectStaffConfig": { + basePath: "ProjectStaff", + pathConfig: { + id: "id[0]", + }, + dateConfig: { + startDate: "daystart", + endDate: "dayend", + }, + selectConfig: { + }, + textConfig :["projectId", "userId"] + }, + "SearchProjectTaskConfig": { + basePath: "Task", + pathConfig: { + id: "id[0]", + clientReferenceId: "clientReferenceId[0]", + }, + dateConfig: { + plannedEndDate: "dayend", + plannedStartDate: "daystart", + actualEndDate: "dayend", + actualStartDate: "daystart", + }, + selectConfig: { + }, + textConfig :["projectId","localityCode", "projectBeneficiaryId", "status"] + } + } + + const id = searchParams.get("config")|| masterName; + + let requestBody = { ...data.body[paths[id].basePath] }; + const pathConfig = paths[id].pathConfig; + const dateConfig = paths[id].dateConfig; + const selectConfig = paths[id].selectConfig; + const textConfig = paths[id].textConfig + + if(paths[id].basePath == "Projects"){ + data.state.searchForm={...data.state.searchForm,tenantId:"mz"} + } + let Product = Object.keys(requestBody) + .map((key) => { + if (selectConfig[key]) { + requestBody[key] = _.get(requestBody, selectConfig[key], null); + } else if (typeof requestBody[key] == "object") { + requestBody[key] = requestBody[key]?.code; + } else if (textConfig?.includes(key)) { + requestBody[key] = requestBody[key]?.trim(); + } + return key; + }) + .filter((key) => requestBody[key]) + .reduce((acc, curr) => { + if (pathConfig[curr]) { + _.set(acc, pathConfig[curr], requestBody[curr]); + } else if (dateConfig[curr] && dateConfig[curr]?.includes("day")) { + _.set(acc, curr, Digit.Utils.date.convertDateToEpoch(requestBody[curr], dateConfig[curr])); + } else { + _.set(acc, curr, requestBody[curr]); + } + return acc; + }, {}); + + if(paths[id].basePath == "Projects"){ + + data.body[paths[id].basePath] = [{ ...Product}]; + } + else data.body[paths[id].basePath] = { ...Product}; + return data; + }, + additionalCustomizations: (row, key, column, value, t, searchResult) => { + //here we can add multiple conditions + //like if a cell is link then we return link + //first we can identify which column it belongs to then we can return relevant result + switch (key) { + case "MASTERS_WAGESEEKER_ID": + return ( + + + {String(value ? (column.translate ? t(column.prefix ? `${column.prefix}${value}` : value) : value) : t("ES_COMMON_NA"))} + + + ); + + case "MASTERS_SOCIAL_CATEGORY": + return value ? {String(t(`MASTERS_${value}`))} : t("ES_COMMON_NA"); + + case "CORE_COMMON_PROFILE_CITY": + return value ? {String(t(Digit.Utils.locale.getCityLocale(value)))} : t("ES_COMMON_NA"); + + case "MASTERS_WARD": + return value ? ( + {String(t(Digit.Utils.locale.getMohallaLocale(value, row?.tenantId)))} + ) : ( + t("ES_COMMON_NA") + ); + + case "MASTERS_LOCALITY": + return value ? ( + {String(t(Digit.Utils.locale.getMohallaLocale(value, row?.tenantId)))} + ) : ( + t("ES_COMMON_NA") + ); + default: + return t("ES_COMMON_NA"); + } + }, + MobileDetailsOnClick: (row, tenantId) => { + let link; + Object.keys(row).map((key) => { + if (key === "MASTERS_WAGESEEKER_ID") + link = `/${window.contextPath}/employee/masters/view-wageseeker?tenantId=${tenantId}&wageseekerId=${row[key]}`; + }); + return link; + }, + additionalValidations: (type, data, keys) => { + if (type === "date") { + return data[keys.start] && data[keys.end] ? () => new Date(data[keys.start]).getTime() <= new Date(data[keys.end]).getTime() : true; + } + }, + } }; diff --git a/micro-ui/web/micro-ui-internals/packages/modules/utilities/package.json b/micro-ui/web/micro-ui-internals/packages/modules/utilities/package.json index 6b96f0410b4..69faa09f039 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/utilities/package.json +++ b/micro-ui/web/micro-ui-internals/packages/modules/utilities/package.json @@ -1,6 +1,6 @@ { "name": "@egovernments/digit-ui-module-utilities", - "version": "1.0.0-beta.1", + "version": "1.0.0-beta.2", "description": "Utilities Module UI", "main": "dist/index.js", "module": "dist/index.modern.js", diff --git a/micro-ui/web/micro-ui-internals/packages/modules/utilities/src/pages/employee/DynamicSearchComponent/index.js b/micro-ui/web/micro-ui-internals/packages/modules/utilities/src/pages/employee/DynamicSearchComponent/index.js index daa764edfbf..7f376ddeda1 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/utilities/src/pages/employee/DynamicSearchComponent/index.js +++ b/micro-ui/web/micro-ui-internals/packages/modules/utilities/src/pages/employee/DynamicSearchComponent/index.js @@ -46,7 +46,8 @@ const DynamicSearchComponent = () => { variation="secondary" icon={} onButtonClick={() => { - history.push(`/${window?.contextPath}/employee/${updatedConfig?.actionLink}`); + history.push(`/${updatedConfig?.actionLink}`); + // history.push(`/${window?.contextPath}/employee/${updatedConfig?.actionLink}`); }} type="button" /> diff --git a/micro-ui/web/workbench/package.json b/micro-ui/web/workbench/package.json index 43d343c6460..c66fdbbd283 100644 --- a/micro-ui/web/workbench/package.json +++ b/micro-ui/web/workbench/package.json @@ -18,7 +18,7 @@ "@egovernments/digit-ui-module-workbench": "1.0.0-beta.6", "@egovernments/digit-ui-module-core": "1.8.0-beta.14", "@egovernments/digit-ui-module-hrms": "1.8.0-beta.3", - "@egovernments/digit-ui-module-utilities": "1.0.0-beta.1", + "@egovernments/digit-ui-module-utilities": "1.0.0-beta.2", "@egovernments/digit-ui-react-components": "1.8.0-beta.4", "babel-loader": "8.1.0", "react": "17.0.2", From 586882bde29892b4d74720b8bd48eedc7e8c82e7 Mon Sep 17 00:00:00 2001 From: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> Date: Tue, 12 Dec 2023 15:32:43 +0530 Subject: [PATCH 27/80] added custom config for facility (#57) --- .../example/src/UICustomizations.js | 24 +++++++++++++++---- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js b/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js index d0d90e70d94..91241339cd6 100644 --- a/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js +++ b/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js @@ -510,6 +510,17 @@ export const UICustomizations = { }, textConfig :["projectId", "userId"] }, + "SearchFacilityConfig": { + basePath: "Facility", + pathConfig: { + id: "id[0]" + }, + dateConfig: { + }, + selectConfig: { + }, + textConfig :["faciltyUsage","localityCode", "storageCapacity"] + }, "SearchProjectTaskConfig": { basePath: "Task", pathConfig: { @@ -530,11 +541,14 @@ export const UICustomizations = { const id = searchParams.get("config")|| masterName; - let requestBody = { ...data.body[paths[id].basePath] }; - const pathConfig = paths[id].pathConfig; - const dateConfig = paths[id].dateConfig; - const selectConfig = paths[id].selectConfig; - const textConfig = paths[id].textConfig + if(paths[id]?.basepath == null){ + return data; + } + let requestBody = { ...data.body[paths[id]?.basePath] }; + const pathConfig = paths[id]?.pathConfig; + const dateConfig = paths[id]?.dateConfig; + const selectConfig = paths[id]?.selectConfig; + const textConfig = paths[id]?.textConfig if(paths[id].basePath == "Projects"){ data.state.searchForm={...data.state.searchForm,tenantId:"mz"} From 46b538386f4f85fcea0af9d26032392403565583 Mon Sep 17 00:00:00 2001 From: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> Date: Tue, 12 Dec 2023 17:41:18 +0530 Subject: [PATCH 28/80] corrected the customisation logic --- micro-ui/web/micro-ui-internals/example/src/UICustomizations.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js b/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js index 91241339cd6..a4ac8226c35 100644 --- a/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js +++ b/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js @@ -541,7 +541,7 @@ export const UICustomizations = { const id = searchParams.get("config")|| masterName; - if(paths[id]?.basepath == null){ + if(!paths||!paths?.[id]){ return data; } let requestBody = { ...data.body[paths[id]?.basePath] }; From 7cb0444cf4728b5420889dc189f6bac34e5f3cbd Mon Sep 17 00:00:00 2001 From: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> Date: Tue, 12 Dec 2023 18:08:50 +0530 Subject: [PATCH 29/80] added a fix for default request criteria --- .../packages/modules/workbench/src/pages/employee/MDMSAddV4.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSAddV4.js b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSAddV4.js index 6c44bdab3c4..57c9038d4c6 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSAddV4.js +++ b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSAddV4.js @@ -64,7 +64,8 @@ const MDMSAdd = ({ defaultFormData, updatesToUISchema, screenType = "add", onVie }, [isSchemaLoading]); const addAPI=uiConfigs?.customUiConfigs?.addAPI; const body = addAPI?.requestBody - ? { ...addAPI?.requestBody } + ? { ...(JSON.parse(addAPI?.requestBody)||{}), + } : { Mdms: { tenantId: tenantId, From 13b71c7b93e3f0d3f09fb5d6fd8afcd7dc3089ad Mon Sep 17 00:00:00 2001 From: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> Date: Wed, 13 Dec 2023 14:51:30 +0530 Subject: [PATCH 30/80] Updated UICustomizations for project and facility #60 --- .../example/src/UICustomizations.js | 29 ++++++++++--------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js b/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js index a4ac8226c35..967223a8660 100644 --- a/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js +++ b/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js @@ -439,15 +439,16 @@ export const UICustomizations = { "SearchProjectConfig": { basePath: "Projects", pathConfig: { + // id: "id[0]", tenantId: "tenantId", }, dateConfig: { + endDate: "dayend", + startDate: "daystart" }, selectConfig: { - wardCode: "wardCode[0].code", - socialCategory: "socialCategory.code", }, - textConfig :["id", "tenantId"] + textConfig :["id", "tenantId", "name", "projectNumber", "projectSubType" , "projectType"] }, "SearchProductConfig": { basePath: "Product", @@ -510,17 +511,6 @@ export const UICustomizations = { }, textConfig :["projectId", "userId"] }, - "SearchFacilityConfig": { - basePath: "Facility", - pathConfig: { - id: "id[0]" - }, - dateConfig: { - }, - selectConfig: { - }, - textConfig :["faciltyUsage","localityCode", "storageCapacity"] - }, "SearchProjectTaskConfig": { basePath: "Task", pathConfig: { @@ -536,6 +526,17 @@ export const UICustomizations = { selectConfig: { }, textConfig :["projectId","localityCode", "projectBeneficiaryId", "status"] + }, + "SearchFacilityConfig": { + basePath: "Facility", + pathConfig: { + id: "id[0]" + }, + dateConfig: { + }, + selectConfig: { + }, + textConfig :["faciltyUsage","localityCode", "storageCapacity","id"] } } From 2695b09927528ae5670fe335cf93740df8810b1b Mon Sep 17 00:00:00 2001 From: ashish-egov <137176738+ashish-egov@users.noreply.github.com> Date: Wed, 13 Dec 2023 16:52:24 +0530 Subject: [PATCH 31/80] Fix : Fixed duplicate caching issue in add screen (#59) * Fix : Fixed duplicate caching issue in add screen * Fix : Fixed caching issue in MDMSAddV4 screen * feat: implemented cache deletion for specific screens --- .../workbench/src/pages/employee/MDMSAddV2.js | 10 +-- .../workbench/src/pages/employee/MDMSAddV4.js | 36 +++++---- .../workbench/src/pages/employee/index.js | 81 ++++++++++++------- 3 files changed, 75 insertions(+), 52 deletions(-) diff --git a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSAddV2.js b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSAddV2.js index 7ecb603c840..c5887018e80 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSAddV2.js +++ b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSAddV2.js @@ -19,18 +19,18 @@ const MDMSAdd = ({ defaultFormData, updatesToUISchema, screenType = "add", onVie const tenantId = Digit.ULBService.getCurrentTenantId(); const [spinner, toggleSpinner] = useState(false); // const stateId = Digit.ULBService.getStateId(); - const FormSession = Digit.Hooks.useSessionStorage(`MDMS_${screenType}`, {}); - const [sessionFormData, setSessionFormData, clearSessionFormData] = FormSession; - const [session, setSession] = useState(sessionFormData); - const [formSchema, setFormSchema] = useState({}); + const [uiSchema, setUiSchema] = useState({}); const [api, setAPI] = useState(false); const [noSchema, setNoSchema] = useState(false); const [showErrorToast, setShowErrorToast] = useState(false); const [disableForm, setDisableForm] = useState(false); - const [showToast, setShowToast] = useState(false); const { moduleName, masterName } = Digit.Hooks.useQueryParams(); + const FormSession = Digit.Hooks.useSessionStorage(`MDMS_${screenType}_${moduleName}_${masterName}`, {}); + const [sessionFormData, setSessionFormData, clearSessionFormData] = FormSession; + const [formSchema, setFormSchema] = useState({}); + const [session, setSession] = useState(sessionFormData); useEffect(() => { setSession({ ...session, ...defaultFormData }); diff --git a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSAddV4.js b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSAddV4.js index 57c9038d4c6..8a8524d6cbc 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSAddV4.js +++ b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSAddV4.js @@ -19,18 +19,19 @@ const MDMSAdd = ({ defaultFormData, updatesToUISchema, screenType = "add", onVie const tenantId = Digit.ULBService.getCurrentTenantId(); const [spinner, toggleSpinner] = useState(false); // const stateId = Digit.ULBService.getStateId(); - const FormSession = Digit.Hooks.useSessionStorage(`MDMS_${screenType}`, {}); - const [sessionFormData, setSessionFormData, clearSessionFormData] = FormSession; - const [session, setSession] = useState(sessionFormData); - const [formSchema, setFormSchema] = useState({}); + const [uiSchema, setUiSchema] = useState({}); const [uiConfigs, setUiConfigs] = useState({}); - const [noSchema, setNoSchema] = useState(false); const [showErrorToast, setShowErrorToast] = useState(false); const [disableForm, setDisableForm] = useState(false); const [showToast, setShowToast] = useState(false); const { moduleName, masterName } = Digit.Hooks.useQueryParams(); + const [formSchema, setFormSchema] = useState({}); + const FormSession = Digit.Hooks.useSessionStorage(`MDMS_${screenType}_${moduleName}_${masterName}`, {}); + const [sessionFormData, setSessionFormData, clearSessionFormData] = FormSession; + const [session, setSession] = useState(sessionFormData); + const updateFormSchema = (schema) => { setFormSchema({ ...schema }); /* added disable to get the complete form re rendered to get the enum values reflected */ @@ -62,19 +63,20 @@ const MDMSAdd = ({ defaultFormData, updatesToUISchema, screenType = "add", onVie setUiConfigs({ customUiConfigs: schemaData?.customUiConfigs }); } }, [isSchemaLoading]); -const addAPI=uiConfigs?.customUiConfigs?.addAPI; + const addAPI = uiConfigs?.customUiConfigs?.addAPI; const body = addAPI?.requestBody - ? { ...(JSON.parse(addAPI?.requestBody)||{}), - } + ? { + ...(JSON.parse(addAPI?.requestBody) || {}), + } : { - Mdms: { - tenantId: tenantId, - schemaCode: `${moduleName}.${masterName}`, - uniqueIdentifier: null, - data: {}, - isActive: true, - }, - }; + Mdms: { + tenantId: tenantId, + schemaCode: `${moduleName}.${masterName}`, + uniqueIdentifier: null, + data: {}, + isActive: true, + }, + }; const reqCriteriaAdd = { url: addAPI ? addAPI?.url : `/${Digit.Hooks.workbench.getMDMSContextPath()}/v2/_create/${moduleName}.${masterName}`, @@ -166,7 +168,7 @@ const addAPI=uiConfigs?.customUiConfigs?.addAPI; const uiJSONSchema = formSchema?.["definition"]?.["x-ui-schema"]; return ( - + {spinner && } {formSchema && ( { +const WorkbenchBreadCrumb = ({ location, defaultPath }) => { const { t } = useTranslation(); const search = useLocation().search; const fromScreen = new URLSearchParams(search).get("from") || null; - const pathVar=location.pathname.replace(defaultPath+'/',"").split("?")?.[0]; - const {masterName,moduleName,uniqueIdentifier} = Digit.Hooks.useQueryParams() + const pathVar = location.pathname.replace(defaultPath + '/', "").split("?")?.[0]; + const { masterName, moduleName, uniqueIdentifier } = Digit.Hooks.useQueryParams() const crumbs = [ { @@ -29,37 +29,37 @@ const WorkbenchBreadCrumb = ({ location ,defaultPath}) => { }, { path: `/${window.contextPath}/employee/workbench/manage-master-data`, - content: t(`WBH_MANAGE_MASTER_DATA`) , - show: pathVar.includes("mdms-")?true: false, + content: t(`WBH_MANAGE_MASTER_DATA`), + show: pathVar.includes("mdms-") ? true : false, // query:`moduleName=${moduleName}&masterName=${masterName}` }, { path: `/${window.contextPath}/employee/workbench/localisation-search`, - content: t(`LOCALISATION_SEARCH`) , - show: pathVar.includes("localisation-")?true: false, - isBack:pathVar.includes("localisation-search") ? true : false + content: t(`LOCALISATION_SEARCH`), + show: pathVar.includes("localisation-") ? true : false, + isBack: pathVar.includes("localisation-search") ? true : false // query:`moduleName=${moduleName}&masterName=${masterName}` }, - + { path: `/${window.contextPath}/employee/workbench/mdms-search-v2`, - query:`moduleName=${moduleName}&masterName=${masterName}`, - content: t(`${Digit.Utils.workbench.getMDMSLabel(pathVar,masterName,moduleName)}`) , + query: `moduleName=${moduleName}&masterName=${masterName}`, + content: t(`${Digit.Utils.workbench.getMDMSLabel(pathVar, masterName, moduleName)}`), show: (masterName && moduleName) ? true : false, - isBack:pathVar.includes("mdms-search-v2") ? true : false + isBack: pathVar.includes("mdms-search-v2") ? true : false }, { path: `/${window.contextPath}/employee/workbench/mdms-view`, - content: t(`MDMS_VIEW`) , - show: pathVar.includes("mdms-edit")?true: false, - query:`moduleName=${moduleName}&masterName=${masterName}&uniqueIdentifier=${uniqueIdentifier}` + content: t(`MDMS_VIEW`), + show: pathVar.includes("mdms-edit") ? true : false, + query: `moduleName=${moduleName}&masterName=${masterName}&uniqueIdentifier=${uniqueIdentifier}` }, { path: `/${window.contextPath}/employee/masters/response`, - content:t(`${Digit.Utils.workbench.getMDMSLabel(pathVar,"","")}`) , - show: Digit.Utils.workbench.getMDMSLabel(pathVar,"","",["mdms-search-v2","localisation-search"])? true:false, + content: t(`${Digit.Utils.workbench.getMDMSLabel(pathVar, "", "")}`), + show: Digit.Utils.workbench.getMDMSLabel(pathVar, "", "", ["mdms-search-v2", "localisation-search"]) ? true : false, }, - + ]; return ; }; @@ -68,15 +68,36 @@ const App = ({ path }) => { const location = useLocation(); const MDMSCreateSession = Digit.Hooks.useSessionStorage("MDMS_add", {}); const [sessionFormData, setSessionFormData, clearSessionFormData] = MDMSCreateSession; - + const MDMSViewSession = Digit.Hooks.useSessionStorage("MDMS_view", {}); - const [sessionFormDataView,setSessionFormDataView,clearSessionFormDataView] = MDMSViewSession + const [sessionFormDataView, setSessionFormDataView, clearSessionFormDataView] = MDMSViewSession + + useEffect(() => { + // Function to clear session storage for keys with specific prefixes + const clearSessionStorageWithPrefix = (prefix) => { + Object.keys(sessionStorage).forEach((key) => { + if (key.startsWith(`Digit.${prefix}`)) { + sessionStorage.removeItem(key); + } + }); + }; + const currentUrl = window.location.href; + if (!currentUrl.includes("mdms-add-v2") && !currentUrl.includes("mdms-add-v4") && !currentUrl.includes("mdms-view")) { + clearSessionStorageWithPrefix('MDMS_add'); + } + if (!currentUrl.includes("mdms-view")) { + clearSessionStorageWithPrefix('MDMS_view'); + } + if (!currentUrl.includes("mdms-edit")) { + clearSessionStorageWithPrefix('MDMS_edit'); + } + }, [window.location.href]); useEffect(() => { if (!window.location.href.includes("mdms-add-v2") && sessionFormData && Object.keys(sessionFormData) != 0) { clearSessionFormData(); } - if (!window.location.href.includes("mdms-view") && sessionFormDataView ) { + if (!window.location.href.includes("mdms-view") && sessionFormDataView) { clearSessionFormDataView(); } }, [location]); @@ -92,15 +113,15 @@ const App = ({ path }) => {
Sample Screen loaded
} /> } /> } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> +
From acf260594fc0cffe5f1bb6aaf67853e0498c2199 Mon Sep 17 00:00:00 2001 From: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> Date: Wed, 13 Dec 2023 18:31:25 +0530 Subject: [PATCH 32/80] exported request from libraries --- .../web/micro-ui-internals/packages/libraries/package.json | 2 +- .../web/micro-ui-internals/packages/libraries/src/index.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/package.json b/micro-ui/web/micro-ui-internals/packages/libraries/package.json index ec0bbcd84b4..bb04783751d 100644 --- a/micro-ui/web/micro-ui-internals/packages/libraries/package.json +++ b/micro-ui/web/micro-ui-internals/packages/libraries/package.json @@ -1,6 +1,6 @@ { "name": "@egovernments/digit-ui-libraries", - "version": "1.8.0-beta.1", + "version": "1.8.0-beta.2", "main": "dist/index.js", "module": "dist/index.modern.js", "source": "src/index.js", diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/index.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/index.js index 5a7d61a4d9f..1a1b885c738 100644 --- a/micro-ui/web/micro-ui-internals/packages/libraries/src/index.js +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/index.js @@ -3,6 +3,7 @@ import Enums from "./enums/index"; import mergeConfig from "./config/mergeConfig"; import { useStore } from "./services/index"; import { initI18n } from "./translations/index"; +import { Request } from "./services/atoms/Utils/Request"; import { Storage, PersistantStorage } from "./services/atoms/Utils/Storage"; import { UploadServices } from "./services/atoms/UploadServices"; @@ -87,4 +88,4 @@ const initLibraries = () => { }); }; -export { initLibraries, Enums, Hooks, subFormRegistry }; +export { initLibraries, Enums, Hooks, subFormRegistry ,Request}; From b7582dfb25edee2d1f858f43ad3a5ffc2a47ea71 Mon Sep 17 00:00:00 2001 From: ashish-egov <137176738+ashish-egov@users.noreply.github.com> Date: Thu, 14 Dec 2023 12:39:22 +0530 Subject: [PATCH 33/80] Used Global Digit criteria in MDMSsearch screen (#62) --- .../packages/modules/workbench/src/configs/UICustomizations.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/configs/UICustomizations.js b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/configs/UICustomizations.js index a47534f3b6f..c02b9ed31fc 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/configs/UICustomizations.js +++ b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/configs/UICustomizations.js @@ -6,7 +6,7 @@ import { Button } from "@egovernments/digit-ui-react-components"; //create functions here based on module name set in mdms(eg->SearchProjectConfig) //how to call these -> Digit?.Customizations?.[masterName]?.[moduleName] // these functions will act as middlewares -var Digit = window.Digit || {}; +// var Digit = window.Digit || {}; const businessServiceMap = { "muster roll": "MR", From 7ca4ac71f54a44d0cc6c9034680394c000c6c0b0 Mon Sep 17 00:00:00 2001 From: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> Date: Thu, 14 Dec 2023 13:46:25 +0530 Subject: [PATCH 34/80] Updated the package version --- micro-ui/web/core/package.json | 2 +- micro-ui/web/micro-ui-internals/example/package.json | 2 +- .../web/micro-ui-internals/packages/modules/workbench/README.md | 1 + .../micro-ui-internals/packages/modules/workbench/package.json | 2 +- micro-ui/web/package.json | 2 +- micro-ui/web/workbench/package.json | 2 +- 6 files changed, 6 insertions(+), 5 deletions(-) diff --git a/micro-ui/web/core/package.json b/micro-ui/web/core/package.json index b75826f3842..8ce9ff4e263 100644 --- a/micro-ui/web/core/package.json +++ b/micro-ui/web/core/package.json @@ -16,7 +16,7 @@ "homepage": "/core-ui", "dependencies": { "@egovernments/digit-ui-libraries": "1.8.0-beta.1", - "@egovernments/digit-ui-module-workbench": "1.0.0-beta.6", + "@egovernments/digit-ui-module-workbench": "1.0.0-beta.7", "@egovernments/digit-ui-module-core": "1.8.0-beta.14", "@egovernments/digit-ui-module-hrms": "1.8.0-beta.3", "@egovernments/digit-ui-module-utilities": "1.0.0-beta.1", diff --git a/micro-ui/web/micro-ui-internals/example/package.json b/micro-ui/web/micro-ui-internals/example/package.json index 6dc9b1b7183..b8d4f416165 100644 --- a/micro-ui/web/micro-ui-internals/example/package.json +++ b/micro-ui/web/micro-ui-internals/example/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "@egovernments/digit-ui-libraries": "1.8.0-beta.1", - "@egovernments/digit-ui-module-workbench": "1.0.0-beta.6", + "@egovernments/digit-ui-module-workbench": "1.0.0-beta.7", "@egovernments/digit-ui-module-dss": "1.8.0-beta.2", "@egovernments/digit-ui-module-core": "1.8.0-beta.14", "@egovernments/digit-ui-module-common": "1.8.0-beta.1", diff --git a/micro-ui/web/micro-ui-internals/packages/modules/workbench/README.md b/micro-ui/web/micro-ui-internals/packages/modules/workbench/README.md index fa466c9302c..36c8f2e3c8e 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/workbench/README.md +++ b/micro-ui/web/micro-ui-internals/packages/modules/workbench/README.md @@ -103,6 +103,7 @@ https://github.com/egovernments/DIGIT-OSS/pull/99/commits/6e711bdc005c226c7debd5 ### Changelog ```bash +1.0.0-beta.7 Added Bulk Upload Ui for MDMS Add 1.0.0-beta.6 Added Bulk Upload Ui for MDMS Add 1.0.0-beta.5 Fixed some loading issue 1.0.0-beta.2 custom api support added diff --git a/micro-ui/web/micro-ui-internals/packages/modules/workbench/package.json b/micro-ui/web/micro-ui-internals/packages/modules/workbench/package.json index 20f37fec2d4..875a27560fb 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/workbench/package.json +++ b/micro-ui/web/micro-ui-internals/packages/modules/workbench/package.json @@ -1,6 +1,6 @@ { "name": "@egovernments/digit-ui-module-workbench", - "version": "1.0.0-beta.6", + "version": "1.0.0-beta.7", "description": "Workbench", "main": "dist/index.js", "module": "dist/index.modern.js", diff --git a/micro-ui/web/package.json b/micro-ui/web/package.json index 513169d665a..e97e4866361 100644 --- a/micro-ui/web/package.json +++ b/micro-ui/web/package.json @@ -15,7 +15,7 @@ "homepage": "/digit-ui", "dependencies": { "@egovernments/digit-ui-libraries": "1.8.0-beta.1", - "@egovernments/digit-ui-module-workbench": "1.0.0-beta.6", + "@egovernments/digit-ui-module-workbench": "1.0.0-beta.7", "@egovernments/digit-ui-module-dss": "1.8.0-beta.2", "@egovernments/digit-ui-module-core": "1.8.0-beta.14", "@egovernments/digit-ui-module-common": "1.8.0-beta.1", diff --git a/micro-ui/web/workbench/package.json b/micro-ui/web/workbench/package.json index c66fdbbd283..5ce90704859 100644 --- a/micro-ui/web/workbench/package.json +++ b/micro-ui/web/workbench/package.json @@ -15,7 +15,7 @@ "homepage": "/workbench-ui", "dependencies": { "@egovernments/digit-ui-libraries": "1.8.0-beta.1", - "@egovernments/digit-ui-module-workbench": "1.0.0-beta.6", + "@egovernments/digit-ui-module-workbench": "1.0.0-beta.7", "@egovernments/digit-ui-module-core": "1.8.0-beta.14", "@egovernments/digit-ui-module-hrms": "1.8.0-beta.3", "@egovernments/digit-ui-module-utilities": "1.0.0-beta.2", From b3be3a4d0c4cb89369ada0cf1c9e8dcdcffb5779 Mon Sep 17 00:00:00 2001 From: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> Date: Thu, 14 Dec 2023 16:14:40 +0530 Subject: [PATCH 35/80] added ui customisation for Project Resource --- .../example/src/UICustomizations.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js b/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js index 967223a8660..c7a5381cbfe 100644 --- a/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js +++ b/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js @@ -511,6 +511,17 @@ export const UICustomizations = { }, textConfig :["projectId", "userId"] }, + "SearchProjectResourceConfig": { + basePath: "ProjectResource", + pathConfig: { + id: "id[0]" + }, + dateConfig: { + }, + selectConfig: { + }, + textConfig : [] + } "SearchProjectTaskConfig": { basePath: "Task", pathConfig: { From b390fb280639d401d9736433b85f4162d44d62bf Mon Sep 17 00:00:00 2001 From: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> Date: Thu, 14 Dec 2023 16:15:11 +0530 Subject: [PATCH 36/80] Update UICustomizations.js --- micro-ui/web/micro-ui-internals/example/src/UICustomizations.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js b/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js index c7a5381cbfe..0d95d15a19e 100644 --- a/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js +++ b/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js @@ -521,7 +521,7 @@ export const UICustomizations = { selectConfig: { }, textConfig : [] - } + }, "SearchProjectTaskConfig": { basePath: "Task", pathConfig: { From 42764949b4c38d916903e827d2f770cd10e89679 Mon Sep 17 00:00:00 2001 From: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> Date: Fri, 15 Dec 2023 15:10:10 +0530 Subject: [PATCH 37/80] Updated the library version of Workbench library --- micro-ui/web/core/package.json | 2 +- micro-ui/web/micro-ui-internals/example/package.json | 2 +- micro-ui/web/package.json | 2 +- micro-ui/web/workbench/package.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/micro-ui/web/core/package.json b/micro-ui/web/core/package.json index 8ce9ff4e263..c9d042bc3a5 100644 --- a/micro-ui/web/core/package.json +++ b/micro-ui/web/core/package.json @@ -15,7 +15,7 @@ ], "homepage": "/core-ui", "dependencies": { - "@egovernments/digit-ui-libraries": "1.8.0-beta.1", + "@egovernments/digit-ui-libraries": "1.8.0-beta.2", "@egovernments/digit-ui-module-workbench": "1.0.0-beta.7", "@egovernments/digit-ui-module-core": "1.8.0-beta.14", "@egovernments/digit-ui-module-hrms": "1.8.0-beta.3", diff --git a/micro-ui/web/micro-ui-internals/example/package.json b/micro-ui/web/micro-ui-internals/example/package.json index b8d4f416165..6b5ca2282fc 100644 --- a/micro-ui/web/micro-ui-internals/example/package.json +++ b/micro-ui/web/micro-ui-internals/example/package.json @@ -9,7 +9,7 @@ "start": "react-scripts start" }, "devDependencies": { - "@egovernments/digit-ui-libraries": "1.8.0-beta.1", + "@egovernments/digit-ui-libraries": "1.8.0-beta.2", "@egovernments/digit-ui-module-workbench": "1.0.0-beta.7", "@egovernments/digit-ui-module-dss": "1.8.0-beta.2", "@egovernments/digit-ui-module-core": "1.8.0-beta.14", diff --git a/micro-ui/web/package.json b/micro-ui/web/package.json index e97e4866361..d98e166783d 100644 --- a/micro-ui/web/package.json +++ b/micro-ui/web/package.json @@ -14,7 +14,7 @@ ], "homepage": "/digit-ui", "dependencies": { - "@egovernments/digit-ui-libraries": "1.8.0-beta.1", + "@egovernments/digit-ui-libraries": "1.8.0-beta.2", "@egovernments/digit-ui-module-workbench": "1.0.0-beta.7", "@egovernments/digit-ui-module-dss": "1.8.0-beta.2", "@egovernments/digit-ui-module-core": "1.8.0-beta.14", diff --git a/micro-ui/web/workbench/package.json b/micro-ui/web/workbench/package.json index 5ce90704859..43e6a94f3e8 100644 --- a/micro-ui/web/workbench/package.json +++ b/micro-ui/web/workbench/package.json @@ -14,7 +14,7 @@ ], "homepage": "/workbench-ui", "dependencies": { - "@egovernments/digit-ui-libraries": "1.8.0-beta.1", + "@egovernments/digit-ui-libraries": "1.8.0-beta.2", "@egovernments/digit-ui-module-workbench": "1.0.0-beta.7", "@egovernments/digit-ui-module-core": "1.8.0-beta.14", "@egovernments/digit-ui-module-hrms": "1.8.0-beta.3", From bb285f75281abdc49e211503039102e2bcb2f023 Mon Sep 17 00:00:00 2001 From: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> Date: Sat, 16 Dec 2023 13:40:03 +0530 Subject: [PATCH 38/80] added build-config for bff sevice --- build/build-config.yml | 51 +++--------------------------------------- 1 file changed, 3 insertions(+), 48 deletions(-) diff --git a/build/build-config.yml b/build/build-config.yml index 8d66058de79..e243dfec3cc 100644 --- a/build/build-config.yml +++ b/build/build-config.yml @@ -48,53 +48,8 @@ config: - work-dir: micro-ui/ dockerfile: micro-ui/web/core/Dockerfile image-name: core-ui - - - name: builds/Digit-Frontend/mission/urban-ui - build: - - work-dir: micro-ui/ - dockerfile: micro-ui/web/urban/Dockerfile - image-name: urban-ui - - name: builds/Digit-Frontend/mission/works-ui + - name: builds/Digit-Frontend/utilities/egov-bff build: - - work-dir: micro-ui/ - dockerfile: micro-ui/web/works/Dockerfile - image-name: works-ui - - - name: builds/Digit-Frontend/mission/sanitation-ui - build: - - work-dir: micro-ui/ - dockerfile: micro-ui/web/sanitation/Dockerfile - image-name: sanitation-ui - - - name: builds/Digit-Frontend/mission/health-ui - build: - - work-dir: micro-ui/ - dockerfile: micro-ui/web/health/Dockerfile - image-name: health-ui - - - name: builds/Digit-Frontend/modules/core - build: - - work-dir: micro-ui/ - dockerfile: micro-ui/web/docker/Dockerfile - image-name: core - - - name: builds/Digit-Frontend/modules/dss - build: - - work-dir: micro-ui/ - dockerfile: micro-ui/web/docker/Dockerfile - image-name: dss - - - - name: builds/Digit-Frontend/modules/workbench - build: - - work-dir: micro-ui/ - dockerfile: micro-ui/web/docker/Dockerfile - image-name: workbench - - - - name: builds/Digit-Frontend/modules/hrms - build: - - work-dir: micro-ui/ - dockerfile: micro-ui/web/docker/Dockerfile - image-name: hrms + - work-dir: utilities/egov-bff + image-name: egov-bff From fcb1ab079184bd473a33b3f40d5f2b136aa6a441 Mon Sep 17 00:00:00 2001 From: ashish-egov <137176738+ashish-egov@users.noreply.github.com> Date: Sat, 16 Dec 2023 18:12:06 +0530 Subject: [PATCH 39/80] =?UTF-8?q?Feat:=20Implement=20updated=20bulk=20uplo?= =?UTF-8?q?ad=20logic=20in=20alignment=20with=20mdmsaddv4=E2=80=A6=20(#56)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Feat: Implement updated bulk upload logic in alignment with mdmsaddv4 specifications * Feat : Integrating Bulk Upload for custom API * Feat : implemented generate template for complex object * Used localization for error messages --- .../example/src/setupProxy.js | 10 +- .../workbench/src/components/BulkModal.js | 98 +++++++++---------- .../workbench/src/utils/BulkUploadUtils.js | 72 ++++++++------ .../modules/workbench/src/utils/index.js | 66 +++++++++++-- 4 files changed, 157 insertions(+), 89 deletions(-) diff --git a/micro-ui/web/micro-ui-internals/example/src/setupProxy.js b/micro-ui/web/micro-ui-internals/example/src/setupProxy.js index cf3a6f7c26c..af0e441e058 100644 --- a/micro-ui/web/micro-ui-internals/example/src/setupProxy.js +++ b/micro-ui/web/micro-ui-internals/example/src/setupProxy.js @@ -5,17 +5,17 @@ const createProxy = createProxyMiddleware({ // target: process.env.REACT_APP_PROXY_API || "https://qa.digit.org", target: process.env.REACT_APP_PROXY_API || "https://works-dev.digit.org", changeOrigin: true, - secure:false + secure: false }); const assetsProxy = createProxyMiddleware({ target: process.env.REACT_APP_PROXY_ASSETS || "https://works-dev.digit.org", changeOrigin: true, - secure:false + secure: false }); const mdmsProxy = createProxyMiddleware({ target: process.env.REACT_APP_PROXY_ASSETS || "http://localhost:8080", changeOrigin: true, - secure:false + secure: false }); module.exports = function (app) { ["/mdms-v2/v2/_create"].forEach((location) => app.use(location, mdmsProxy)); @@ -80,7 +80,9 @@ module.exports = function (app) { "/egov-pdf/download/WORKSESTIMATE/estimatepdf", "/muster-roll", "/individual", - "/mdms-v2" + "/mdms-v2", + "/project/staff/v1/_create", + "/product/v1/_create" ].forEach((location) => app.use(location, createProxy)); ["/pb-egov-assets"].forEach((location) => app.use(location, assetsProxy)); ["/mdms-v2/v2/_create"].forEach((location) => app.use(location, mdmsProxy)); diff --git a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/components/BulkModal.js b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/components/BulkModal.js index f01e252e3f5..550ea6a20ac 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/components/BulkModal.js +++ b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/components/BulkModal.js @@ -2,7 +2,7 @@ import React, { useState, useEffect } from "react"; import { onConfirm, generateJsonTemplate, downloadTemplate } from "../utils/BulkUploadUtils"; import Ajv from "ajv"; import { useTranslation } from "react-i18next"; -import { FileUploadModal, Toast, Loader } from "@egovernments/digit-ui-react-components"; +import { FileUploadModal, Toast, Loader, Card, SVG } from "@egovernments/digit-ui-react-components"; import { CloseSvg } from "@egovernments/digit-ui-react-components"; const ProgressBar = ({ progress, onClose, results }) => { @@ -59,7 +59,7 @@ const ProgressBar = ({ progress, onClose, results }) => { {result.error} {selectedErrorIndex === index && (
- {JSON.stringify(result?.data?.Mdms?.data, null, 2)} + {JSON.stringify(result.data, null, 2)}
)}
@@ -80,43 +80,45 @@ export const BulkModal = ({ showBulkUploadModal, setShowBulkUploadModal, moduleN const [showErrorToast, setShowErrorToast] = useState(false); const { t } = useTranslation(); const [progress, setProgress] = useState(0); - const [api, setAPI] = useState(false); const [results, setResults] = useState([]); const [template, setTemplate] = useState(["Error in template"]); + const [uiConfigs, setUiConfigs] = useState({}); + const [noSchema, setNoSchema] = useState(false); + + const ajv = new Ajv(); ajv.addVocabulary(["x-unique", "x-ref-schema", "x-ui-schema"]) const tenantId = Digit.ULBService.getCurrentTenantId(); + const { isLoading: isSchemaLoading, data: schemaData } = Digit.Hooks.workbench.getMDMSSchema(`${moduleName}.${masterName}`, tenantId); + const { loading, pureSchemaDefinition } = Digit.Hooks.workbench.usePureSchemaDefinition(); - const reqCriteria = { - url: `/${Digit.Hooks.workbench.getMDMSContextPath()}/schema/v1/_search`, - params: {}, - body: { - SchemaDefCriteria: { - tenantId: tenantId, - codes: [`${moduleName}.${masterName}`], - }, - }, - config: { - enabled: moduleName && masterName && true, - select: (data) => { - if (data?.SchemaDefinitions?.length == 0) { - setNoSchema(true); - } - if (data?.SchemaDefinitions?.[0]?.definition?.["x-ui-schema"]?.["ui-apidetails"]) { - setAPI(data?.SchemaDefinitions?.[0]?.definition?.["x-ui-schema"]?.["ui-apidetails"]); - } - return data?.SchemaDefinitions?.[0] || {}; - }, - }, - changeQueryName: "schema", - }; + useEffect(() => { + if (schemaData?.customUiConfigs) { + setUiConfigs({ customUiConfigs: schemaData?.customUiConfigs }); + } + if (schemaData?.schema?.noSchemaFound) { + setNoSchema(true); + } + }, [isSchemaLoading]); - const { isLoading, data: schema } = Digit.Hooks.useCustomAPIHook(reqCriteria); - const { loading, pureSchemaDefinition } = Digit.Hooks.workbench.usePureSchemaDefinition(); + useEffect(() => { + if (pureSchemaDefinition && typeof template[0] === "string") { + setTemplate(generateJsonTemplate(pureSchemaDefinition)); + } + else if (pureSchemaDefinition && typeof template[0] === "object" && uploadFileTypeXlsx) { + for (const property in template[0]) { + if (typeof template[0][property] != "string") { + fileValidator(t('WBH_SCHEMA_NOT_SUITABLE')); + return; + } + } + } + }, [pureSchemaDefinition, template]); - const body = api?.requestBody - ? { ...api?.requestBody } + const addAPI = uiConfigs?.customUiConfigs?.addAPI; + const body = addAPI?.requestBody + ? { ...addAPI?.requestBody } : { Mdms: { tenantId: tenantId, @@ -127,17 +129,16 @@ export const BulkModal = ({ showBulkUploadModal, setShowBulkUploadModal, moduleN }, }; const reqCriteriaAdd = { - url: api ? api?.url : `/${Digit.Hooks.workbench.getMDMSContextPath()}/v2/_create/${moduleName}.${masterName}`, + url: addAPI ? addAPI?.url : `/${Digit.Hooks.workbench.getMDMSContextPath()}/v2/_create/${moduleName}.${masterName}`, params: {}, body: { ...body }, config: { - enabled: schema ? true : false, + enabled: pureSchemaDefinition ? true : false, select: (data) => { return data?.SchemaDefinitions?.[0] || {}; }, }, }; - const mutation = Digit.Hooks.useCustomAPIMutationHook(reqCriteriaAdd); const fileValidator = (errMsg) => { @@ -153,15 +154,8 @@ export const BulkModal = ({ showBulkUploadModal, setShowBulkUploadModal, moduleN const onSubmitBulk = async (dataArray, setProgress) => { setProgress(0); const updatedResults = [...results]; - const onSuccess = (index, resp) => { - // Handle success for the specific index - var id = "Unknown Id"; - if (resp?.mdms[0]?.id) { - id = resp?.mdms[0]?.id - } - updatedResults.push({ index, success: true, response: id, error: null, data: resp?.mdms[0]?.data }); + const onSuccess = (index) => { const currentProgress = Math.floor(((index + 1) / dataArray.length) * 100); - setResults(updatedResults); setProgress(currentProgress); }; @@ -171,7 +165,7 @@ export const BulkModal = ({ showBulkUploadModal, setShowBulkUploadModal, moduleN if (resp?.response?.data?.Errors && resp?.response?.data?.Errors.length > 0) { err = resp?.response?.data?.Errors[0]?.code } - updatedResults.push({ index, success: false, error: err, response: null, data: JSON.parse(resp?.response?.config?.data) }); + updatedResults.push({ index, success: false, error: err, response: null, data: dataArray[index] }); const currentProgress = Math.floor(((index + 1) / dataArray.length) * 100); setResults(updatedResults); setProgress(currentProgress); @@ -183,7 +177,7 @@ export const BulkModal = ({ showBulkUploadModal, setShowBulkUploadModal, moduleN const data = dataArray[i]; const bodyCopy = _.cloneDeep(body); // Create a deep copy of the body to avoid modifying the original - _.set(bodyCopy, api?.requestJson ? api?.requestJson : "Mdms.data", { ...data }); + _.set(bodyCopy, addAPI?.requestJson ? addAPI?.requestJson : "Mdms.data", { ...data }); try { const response = await mutation.mutateAsync({ @@ -204,18 +198,24 @@ export const BulkModal = ({ showBulkUploadModal, setShowBulkUploadModal, moduleN await delay(1000); } }; + if (noSchema) { + return ( + + +

{t("WBH_NO_SCHEMA_FOUND")}

+ +
+
+ ); + } + const onCloseProgresbar = () => { setProgress(0); setResults([]); } - useEffect(() => { - if (pureSchemaDefinition && typeof template[0] === "string") { - setTemplate(generateJsonTemplate(pureSchemaDefinition)); - } - }, [pureSchemaDefinition, template]); - if (loading || isLoading) { + if (loading || isSchemaLoading) { return } diff --git a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/utils/BulkUploadUtils.js b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/utils/BulkUploadUtils.js index 8708fd0bcfc..faeee6d7e55 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/utils/BulkUploadUtils.js +++ b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/utils/BulkUploadUtils.js @@ -9,6 +9,7 @@ export const onConfirm = ( onSubmitBulk, setProgress ) => { + SchemaDefinitions["$schema"] = "http://json-schema.org/draft-07/schema#" const validate = ajv.compile(SchemaDefinitions); try { @@ -27,7 +28,7 @@ export const onConfirm = ( const valid = validate(data); if (!valid) { validationError = true; - fileValidator(validate.errors[0]?.message + " on index " + index); + fileValidator((validate?.errors[0]?.instancePath ? "InctancePath : " + validate.errors[0].instancePath + " " : "") + validate.errors[0]?.message + " on index " + index); setProgress(0); return; } @@ -82,35 +83,43 @@ export const onConfirm = ( } }; -export const generateJsonTemplate = (schema) => { - const template = { - type: "object", - title: schema.title, - $schema: schema.$schema, - required: schema.required || [], - "x-unique": schema["x-unique"] || [], - properties: {}, - "x-ref-schema": schema["x-ref-schema"] || [], - }; - - for (const propertyKey in schema.properties) { - const property = schema.properties[propertyKey]; - template.properties[propertyKey] = { - type: property.type, - }; +export const generateJsonTemplate = (schema, isArray = true) => { + var propertyTemplateObject = {} + if (schema.properties) { + propertyTemplateObject = Object.keys(schema.properties).reduce((acc, property) => { + var isRequired = false; + if (schema?.required) { + isRequired = schema.required.includes(property); + } + if (schema.properties[property].type == "object") { + acc[property] = generateJsonTemplate(schema.properties[property], false); + } + else if (schema.properties[property].type == "array") { + if (schema.properties[property].items) { + if (Array.isArray(schema.properties[property].items) && schema.properties[property].items.length > 0 && schema.properties[property]?.items[0]) { + acc[property] = generateJsonTemplate(schema.properties[property].items[0], true); + } + else { + acc[property] = generateJsonTemplate(schema.properties[property].items, true); + } + } + } + else { + if (schema.properties[property].type) { + acc[property] = `${schema.properties[property].type}${isRequired ? " required" : ""}`; + } + else { + acc[property] = `${schema.type}${isRequired ? " required" : ""}`; + } - if (property.enum) { - template.properties[propertyKey].enum = property.enum; - } + } + return acc; + }, {}); } - - const propertyTemplateObject = Object.keys(template.properties).reduce((acc, property) => { - const isRequired = template.required.includes(property); - acc[property] = `${template.properties[property].type}${isRequired ? " required" : ""}`; - return acc; - }, {}); - - return [propertyTemplateObject]; + else { + propertyTemplateObject = `${schema.type}` + } + return isArray ? [propertyTemplateObject] : propertyTemplateObject; } export const downloadTemplate = (template, isJson, fileValidator, t) => { @@ -126,6 +135,13 @@ export const downloadTemplate = (template, isJson, fileValidator, t) => { URL.revokeObjectURL(url); } else { + // if any property of template is not string then fileValidator(t('WBH_ERROR_TEMPLATE')) and return + for (const property in template[0]) { + if (typeof template[0][property] != "string") { + fileValidator(t('WBH_SCHEMA_NOT_SUITABLE')); + return; + } + } const ws = XLSX.utils.json_to_sheet(template); ws['!cols'] = Array(XLSX.utils.decode_range(ws['!ref']).e.c + 1).fill({ width: 15 }); const wb = XLSX.utils.book_new(); diff --git a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/utils/index.js b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/utils/index.js index 4327183cfff..63c3b6d0371 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/utils/index.js +++ b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/utils/index.js @@ -273,6 +273,55 @@ const postProcessData = (data = {}, schema = {}) => { return { ...data }; }; +const getValueByPath = (obj, path) => { + const result = []; + + const traverseObject = (currentObj, keys) => { + const key = keys.shift(); + + if (!key) { + // End of the path, add the current object to the result + result.push(currentObj); + return; + } + + if (key === '*') { + // Handle wildcard '*' case + for (const prop in currentObj) { + traverseObject(currentObj[prop], keys.slice()); + } + } else if (currentObj.hasOwnProperty(key)) { + // Move to the next level in the object + traverseObject(currentObj[key], keys.slice()); + } + }; + + const keys = path.split('.'); + traverseObject(obj, keys); + + return result; +}; + +const get = (path = "") => { + let tempPath = path; + if (!tempPath?.includes(".")) { + return tempPath; + } + if (tempPath?.includes(".*.")) { + tempPath = Digit.Utils.locale.stringReplaceAll(tempPath, ".*.", "_ARRAY_OBJECT_"); + } + if (tempPath?.includes(".*")) { + tempPath = Digit.Utils.locale.stringReplaceAll(tempPath, ".*", "_ARRAY_"); + } + if (tempPath?.includes(".")) { + tempPath = Digit.Utils.locale.stringReplaceAll(tempPath, ".", "_OBJECT_"); + } + let updatedPath = Digit.Utils.locale.stringReplaceAll(tempPath, "_ARRAY_OBJECT_", ".items.properties."); + updatedPath = Digit.Utils.locale.stringReplaceAll(updatedPath, "_ARRAY_", ".items"); + updatedPath = Digit.Utils.locale.stringReplaceAll(updatedPath, "_OBJECT_", ".properties."); + return updatedPath; +}; + @@ -286,12 +335,12 @@ const postProcessData = (data = {}, schema = {}) => { * * @returns schema object */ -const getCriteriaForSelectData = (allProps)=>{ +const getCriteriaForSelectData = (allProps) => { const { configs, updateConfigs, updateSchema, schema: formSchema, formData } = Digit.Hooks.workbench.useWorkbenchFormContext(); const { moduleName, masterName } = Digit.Hooks.useQueryParams(); - const {schema} = allProps; + const { schema } = allProps; const { schemaCode = `${moduleName}.${masterName}`, tenantId, fieldPath } = schema; const reqCriteriaForData = { url: `/${Digit.Hooks.workbench.getMDMSContextPath()}/v2/_search`, @@ -329,14 +378,14 @@ const getCriteriaForSelectData = (allProps)=>{ }, changeQueryName: `data-${schemaCode}`, }; - console.log(schemaCode,"schemaCode"); + console.log(schemaCode, "schemaCode"); if (schemaCode === "CUSTOM" && configs?.customUiConfigs?.custom?.length > 0) { const customConfig = configs?.customUiConfigs?.custom?.filter((data) => data?.fieldPath == fieldPath)?.[0] || {}; reqCriteriaForData.url = customConfig?.dataSource?.API; reqCriteriaForData.body = JSON.parse(customConfig?.dataSource?.requestBody); reqCriteriaForData.params = JSON.parse(customConfig?.dataSource?.requestParams); reqCriteriaForData.changeQueryName = `CUSTOM_DATA-${schemaCode}-${fieldPath}`; - + /* It has dependency Fields*/ if (customConfig?.dataSource?.dependentPath?.length > 0) { // const dependentValue=customConfig?.dataSource?.dependentPath?.length>0?:true; @@ -350,11 +399,11 @@ const getCriteriaForSelectData = (allProps)=>{ if (isEnabled) { let newQuery = ""; Object.keys(dependencyObj).map((key) => { - const dependencyConfig=customConfig?.dataSource?.dependentPath?.filter(obj=>obj.depdendentKey==key)?.[0]; - if(dependencyConfig?.dependencyFor=="REQ_BODY" || dependencyConfig?.dependencyFor=="BOTH"){ + const dependencyConfig = customConfig?.dataSource?.dependentPath?.filter(obj => obj.depdendentKey == key)?.[0]; + if (dependencyConfig?.dependencyFor == "REQ_BODY" || dependencyConfig?.dependencyFor == "BOTH") { reqCriteriaForData.body = JSON.parse(customConfig?.dataSource?.requestBody?.replace(key, dependencyObj?.[key])); } - if(dependencyConfig?.dependencyFor=="REQ_PARAM" || dependencyConfig?.dependencyFor=="BOTH"){ + if (dependencyConfig?.dependencyFor == "REQ_PARAM" || dependencyConfig?.dependencyFor == "BOTH") { reqCriteriaForData.params = JSON.parse(customConfig?.dataSource?.params?.replace(key, dependencyObj?.[key])); } newQuery += `-${dependencyObj?.[key]}`; @@ -397,4 +446,5 @@ const getCriteriaForSelectData = (allProps)=>{ return reqCriteriaForData; } -export default { getConfig, getMDMSLabel, getFormattedData, getUpdatedPath, updateTitleToLocalisationCodeForObject, preProcessData, postProcessData ,getCriteriaForSelectData}; + +export default { getConfig, getMDMSLabel, getFormattedData, getUpdatedPath, updateTitleToLocalisationCodeForObject, preProcessData, postProcessData, getValueByPath, getCriteriaForSelectData }; \ No newline at end of file From 508cd2968fa034550c932d7668bdeece1187495f Mon Sep 17 00:00:00 2001 From: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> Date: Sat, 16 Dec 2023 18:25:49 +0530 Subject: [PATCH 40/80] Added a new capability to view any Document (#66) * Added a new capability to view any Document using plugin https://www.npmjs.com/package/@cyntler/react-doc-viewer/v/1.10.3#config * updated package version --- micro-ui/web/core/package.json | 2 +- .../micro-ui-internals/example/package.json | 2 +- .../example/src/setupProxy.js | 1 + micro-ui/web/micro-ui-internals/package.json | 8 +- .../packages/modules/utilities/README.md | 14 ++ .../packages/modules/utilities/package.json | 5 +- .../utilities/src/pages/employee/DocViewer.js | 148 ++++++++++++++++++ .../utilities/src/pages/employee/index.js | 4 + micro-ui/web/package.json | 2 +- micro-ui/web/workbench/package.json | 2 +- 10 files changed, 178 insertions(+), 10 deletions(-) create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/utilities/src/pages/employee/DocViewer.js diff --git a/micro-ui/web/core/package.json b/micro-ui/web/core/package.json index c9d042bc3a5..2a2aecc7c7c 100644 --- a/micro-ui/web/core/package.json +++ b/micro-ui/web/core/package.json @@ -19,7 +19,7 @@ "@egovernments/digit-ui-module-workbench": "1.0.0-beta.7", "@egovernments/digit-ui-module-core": "1.8.0-beta.14", "@egovernments/digit-ui-module-hrms": "1.8.0-beta.3", - "@egovernments/digit-ui-module-utilities": "1.0.0-beta.1", + "@egovernments/digit-ui-module-utilities": "1.0.0-beta.3", "@egovernments/digit-ui-react-components": "1.8.0-beta.4", "babel-loader": "8.1.0", "react": "17.0.2", diff --git a/micro-ui/web/micro-ui-internals/example/package.json b/micro-ui/web/micro-ui-internals/example/package.json index 6b5ca2282fc..d2e19ae61dd 100644 --- a/micro-ui/web/micro-ui-internals/example/package.json +++ b/micro-ui/web/micro-ui-internals/example/package.json @@ -15,7 +15,7 @@ "@egovernments/digit-ui-module-core": "1.8.0-beta.14", "@egovernments/digit-ui-module-common": "1.8.0-beta.1", "@egovernments/digit-ui-module-hrms": "1.8.0-beta.3", - "@egovernments/digit-ui-module-utilities": "1.0.0-beta.2", + "@egovernments/digit-ui-module-utilities": "1.0.0-beta.3", "@egovernments/digit-ui-module-engagement": "1.5.20", "@egovernments/digit-ui-react-components": "1.8.0-beta.4", "http-proxy-middleware": "^1.0.5", diff --git a/micro-ui/web/micro-ui-internals/example/src/setupProxy.js b/micro-ui/web/micro-ui-internals/example/src/setupProxy.js index af0e441e058..b342e94b4db 100644 --- a/micro-ui/web/micro-ui-internals/example/src/setupProxy.js +++ b/micro-ui/web/micro-ui-internals/example/src/setupProxy.js @@ -59,6 +59,7 @@ module.exports = function (app) { "/tl-calculator", "/org-services", "/edcr", + "/hcm-moz-impl", "/bpa-services", "/noc-services", "/egov-user-event", diff --git a/micro-ui/web/micro-ui-internals/package.json b/micro-ui/web/micro-ui-internals/package.json index 38ced337eee..fdf1944b39b 100644 --- a/micro-ui/web/micro-ui-internals/package.json +++ b/micro-ui/web/micro-ui-internals/package.json @@ -26,12 +26,12 @@ "dev:components": "cd packages/react-components && yarn start", "dev:example": "cd example && yarn start", "dev:core": "cd packages/modules/core && yarn start", - "dev:dss": "cd packages/modules/dss && yarn start", - "dev:hrms": "cd packages/modules/hrms && yarn start", + "devD:dss": "cd packages/modules/dss && yarn start", + "devD:hrms": "cd packages/modules/hrms && yarn start", "devD:common": "cd packages/modules/common && yarn start", - "devD:utilities": "cd packages/modules/utilities && yarn start", + "dev:utilities": "cd packages/modules/utilities && yarn start", "dev:workbench": "cd packages/modules/workbench && yarn start", - "dev:engagement": "cd packages/modules/engagement && yarn start", + "devD:engagement": "cd packages/modules/engagement && yarn start", "build": "run-p build:**", "build:libraries": "cd packages/libraries && yarn build", "build:components": "cd packages/react-components && yarn build", diff --git a/micro-ui/web/micro-ui-internals/packages/modules/utilities/README.md b/micro-ui/web/micro-ui-internals/packages/modules/utilities/README.md index bb7f48c45fc..b1986c6af63 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/utilities/README.md +++ b/micro-ui/web/micro-ui-internals/packages/modules/utilities/README.md @@ -112,7 +112,19 @@ _Bill Module works-ui/employee/utilities/workflow?tenantId=pg.citya&applicationNo=PB/2023-24/000379&businessService=EXPENSE.PURCHASE&moduleCode=wages.purchase ``` +4. View Document + Upload and view + + ```bash + works-ui/employee/utilities/doc-viewer + ``` + + view from url + + ```bash + works-ui/employee/utilities/doc-viewer?fileUrl=https://egov-uat-assets.s3.ap-south-1.amazonaws.com/hcm/logo-image.jpeg&fileName=logo-image.jpeg + ``` ## Coming Soon @@ -124,6 +136,8 @@ _Bill Module # Changelog ```bash +1.0.0-beta.3 added new support to view any document +1.0.0-beta.2 republished due to some iframe issue 1.0.0-beta.1 republished due to some version issues 1.0.0-beta workbench base version beta release 0.0.8 fix response data for custom compnent in inbox composer diff --git a/micro-ui/web/micro-ui-internals/packages/modules/utilities/package.json b/micro-ui/web/micro-ui-internals/packages/modules/utilities/package.json index 69faa09f039..076215fddc8 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/utilities/package.json +++ b/micro-ui/web/micro-ui-internals/packages/modules/utilities/package.json @@ -1,6 +1,6 @@ { "name": "@egovernments/digit-ui-module-utilities", - "version": "1.0.0-beta.2", + "version": "1.0.0-beta.3", "description": "Utilities Module UI", "main": "dist/index.js", "module": "dist/index.modern.js", @@ -18,6 +18,7 @@ "react-router-dom": "5.3.0" }, "dependencies": { + "@cyntler/react-doc-viewer": "1.10.3", "@egovernments/digit-ui-react-components": "1.8.0-beta.4", "react": "17.0.2", "react-date-range": "^1.4.0", @@ -36,4 +37,4 @@ "digit-ui", "utilities" ] -} \ No newline at end of file +} diff --git a/micro-ui/web/micro-ui-internals/packages/modules/utilities/src/pages/employee/DocViewer.js b/micro-ui/web/micro-ui-internals/packages/modules/utilities/src/pages/employee/DocViewer.js new file mode 100644 index 00000000000..77cd09922e6 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/modules/utilities/src/pages/employee/DocViewer.js @@ -0,0 +1,148 @@ +import { Card, Header, Label, UploadFile } from "@egovernments/digit-ui-react-components"; +import React, { Fragment, useState } from "react"; +import DocViewer, { DocViewerRenderers } from "@cyntler/react-doc-viewer"; + +const SUPPORTED_FILE_FORMATS = [ + ".pdf", + ".bmp", + ".xlsx", + ".csv", + ".doc", + ".docx", + ".gif", + ".htm", + ".html", + ".jpg", + ".jpeg", + ".png", + ".ppt", + ".pptx", + ".tiff", + ".txt", + ".xls", +]; + +const DocViewerWrapper = (props) => { + const { fileUrl, fileName = "Unknown File" } = Digit.Hooks.useQueryParams(); + + const [selectedDocs, setSelectedDocs] = useState([]); + const documents = fileUrl + ? [{ uri: fileUrl, fileName }] + : selectedDocs.map((file) => ({ + uri: window.URL.createObjectURL(file), + fileName: file?.name || fileName, + })); + + return ( + +
File Viewer
+ {!fileUrl && ( + setSelectedDocs([])} + // removeTargetedFile={(file) => setSelectedDocs(selectedDocs.filter((el) => el !== file))} + showHintBelow={true} + hintText={`Supported File Formats : ${SUPPORTED_FILE_FORMATS.join(", ")} `} + onUpload={(el) => el.target.files?.length && setSelectedDocs(Array.from(el.target.files))} + /> + )} + {documents?.length != 0 && ( + <> + {" "} + + {" "} + + )} +
+ ); +}; + +export default DocViewerWrapper; + +// const docs = [ +// { uri: "https://url-to-my-pdf.pdf" }, // Remote file +// { uri: require("./example-files/pdf.pdf") }, // Local File +// ]; + +// return ( +// +// ); + +// theme={{ +// primary: "#5296d8", +// secondary: "#ffffff", +// tertiary: "#5296d899", +// textPrimary: "#ffffff", +// textSecondary: "#5296d8", +// textTertiary: "#00000099", +// disableThemeScrollbar: false, +// }} + +// Custom Request Headers +// Provide request headers, i.e. for authenticating with an API etc. + +// const headers = { +// "X-Access-Token": "1234567890", +// "My-Custom-Header": "my-custom-value", +// }; + +// ; + +// Internationalization (i18n) +// From v1.6.0 you can pass the language prop to the DocViewer component to get translated sentences and words that can be displayed by this library. + +// + +// Styling +// Any styling applied to the component, is directly applied to the main div container. + +// CSS Class +// +// CSS Class Default Override +// Each component / div already has a DOM id that can be used to style any part of the document viewer. + +// #react-doc-viewer #header-bar { +// background-color: #faf; +// } +// React Inline +// + +// refer more here +// https://www.npmjs.com/package/@cyntler/react-doc-viewer/v/1.10.3#config + +// bmp image/bmp +// csv text/csv +// doc application/msword +// docx application/vnd.openxmlformats-officedocument.wordprocessingml.document +// gif image/gif +// htm text/htm +// html text/html +// jpg image/jpg +// jpeg image/jpeg +// pdf application/pdf +// png image/png +// ppt application/vnd.ms-powerpoint +// pptx applicatiapplication/vnd.openxmlformats-officedocument.presentationml.presentation +// tiff image/tiff +// txt text/plain +// xls application/vnd.ms-excel +// xlsx diff --git a/micro-ui/web/micro-ui-internals/packages/modules/utilities/src/pages/employee/index.js b/micro-ui/web/micro-ui-internals/packages/modules/utilities/src/pages/employee/index.js index eed98b2f70b..965878045e6 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/utilities/src/pages/employee/index.js +++ b/micro-ui/web/micro-ui-internals/packages/modules/utilities/src/pages/employee/index.js @@ -5,6 +5,7 @@ import { Route, Switch } from "react-router-dom"; import DynamicSearchComponent from "./DynamicSearchComponent"; import IFrameInterface from "./IFrameInterface"; import WorkflowCompTest from "./WorkflowComponentTest"; +import DocViewer from "./DocViewer.js"; const ProjectBreadCrumb = ({ location }) => { const { t } = useTranslation(); @@ -37,6 +38,9 @@ const App = ({ path, stateCode, userType, tenants }) => { + + + } /> diff --git a/micro-ui/web/package.json b/micro-ui/web/package.json index d98e166783d..1449dcca17c 100644 --- a/micro-ui/web/package.json +++ b/micro-ui/web/package.json @@ -20,7 +20,7 @@ "@egovernments/digit-ui-module-core": "1.8.0-beta.14", "@egovernments/digit-ui-module-common": "1.8.0-beta.1", "@egovernments/digit-ui-module-hrms": "1.8.0-beta.3", - "@egovernments/digit-ui-module-utilities": "1.0.0-beta.1", + "@egovernments/digit-ui-module-utilities": "1.0.0-beta.3", "@egovernments/digit-ui-module-engagement": "1.5.20", "@egovernments/digit-ui-react-components": "1.8.0-beta.4", "babel-loader": "8.1.0", diff --git a/micro-ui/web/workbench/package.json b/micro-ui/web/workbench/package.json index 43e6a94f3e8..de58eb7f737 100644 --- a/micro-ui/web/workbench/package.json +++ b/micro-ui/web/workbench/package.json @@ -18,7 +18,7 @@ "@egovernments/digit-ui-module-workbench": "1.0.0-beta.7", "@egovernments/digit-ui-module-core": "1.8.0-beta.14", "@egovernments/digit-ui-module-hrms": "1.8.0-beta.3", - "@egovernments/digit-ui-module-utilities": "1.0.0-beta.2", + "@egovernments/digit-ui-module-utilities": "1.0.0-beta.3", "@egovernments/digit-ui-react-components": "1.8.0-beta.4", "babel-loader": "8.1.0", "react": "17.0.2", From b76d50b6e4e5d206d32a9ea3defd7046a8b71cbd Mon Sep 17 00:00:00 2001 From: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> Date: Sat, 16 Dec 2023 18:31:51 +0530 Subject: [PATCH 41/80] incremented package version of workbench (#67) * Update package.json * Update package.json * Update package.json * Delete micro-ui/web/micro-ui-internals/example/maspackage.json * Update package.json --- .../example/maspackage.json | 31 ------------------- .../micro-ui-internals/example/package.json | 4 +-- .../packages/modules/workbench/package.json | 4 +-- micro-ui/web/workbench/package.json | 4 +-- 4 files changed, 6 insertions(+), 37 deletions(-) delete mode 100644 micro-ui/web/micro-ui-internals/example/maspackage.json diff --git a/micro-ui/web/micro-ui-internals/example/maspackage.json b/micro-ui/web/micro-ui-internals/example/maspackage.json deleted file mode 100644 index 1f54328562b..00000000000 --- a/micro-ui/web/micro-ui-internals/example/maspackage.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "name": "@egovernments/digit-ui-example", - "version": "1.3.0", - "main": "index.js", - "license": "MIT", - "private": true, - "homepage": "digit-ui/", - "scripts": { - "start": "react-scripts start" - }, - "devDependencies": { - "http-proxy-middleware": "^1.0.5", - "react": "17.0.2", - "react-dom": "17.0.2", - "react-i18next": "11.16.2", - "react-router-dom": "5.3.0", - "react-scripts": "^4.0.1" - }, - "browserslist": { - "production": [ - ">0.2%", - "not dead", - "not op_mini all" - ], - "development": [ - "last 1 chrome version", - "last 1 firefox version", - "last 1 safari version" - ] - } -} diff --git a/micro-ui/web/micro-ui-internals/example/package.json b/micro-ui/web/micro-ui-internals/example/package.json index d2e19ae61dd..2eca20e4ad7 100644 --- a/micro-ui/web/micro-ui-internals/example/package.json +++ b/micro-ui/web/micro-ui-internals/example/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "@egovernments/digit-ui-libraries": "1.8.0-beta.2", - "@egovernments/digit-ui-module-workbench": "1.0.0-beta.7", + "@egovernments/digit-ui-module-workbench": "1.0.0-beta.8", "@egovernments/digit-ui-module-dss": "1.8.0-beta.2", "@egovernments/digit-ui-module-core": "1.8.0-beta.14", "@egovernments/digit-ui-module-common": "1.8.0-beta.1", @@ -37,4 +37,4 @@ "last 1 safari version" ] } -} \ No newline at end of file +} diff --git a/micro-ui/web/micro-ui-internals/packages/modules/workbench/package.json b/micro-ui/web/micro-ui-internals/packages/modules/workbench/package.json index 875a27560fb..1a782b47eb8 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/workbench/package.json +++ b/micro-ui/web/micro-ui-internals/packages/modules/workbench/package.json @@ -1,6 +1,6 @@ { "name": "@egovernments/digit-ui-module-workbench", - "version": "1.0.0-beta.7", + "version": "1.0.0-beta.8", "description": "Workbench", "main": "dist/index.js", "module": "dist/index.modern.js", @@ -42,4 +42,4 @@ "digit-ui", "workbench" ] -} \ No newline at end of file +} diff --git a/micro-ui/web/workbench/package.json b/micro-ui/web/workbench/package.json index de58eb7f737..7dae4368dde 100644 --- a/micro-ui/web/workbench/package.json +++ b/micro-ui/web/workbench/package.json @@ -15,7 +15,7 @@ "homepage": "/workbench-ui", "dependencies": { "@egovernments/digit-ui-libraries": "1.8.0-beta.2", - "@egovernments/digit-ui-module-workbench": "1.0.0-beta.7", + "@egovernments/digit-ui-module-workbench": "1.0.0-beta.8", "@egovernments/digit-ui-module-core": "1.8.0-beta.14", "@egovernments/digit-ui-module-hrms": "1.8.0-beta.3", "@egovernments/digit-ui-module-utilities": "1.0.0-beta.3", @@ -72,4 +72,4 @@ "last 1 safari version" ] } -} \ No newline at end of file +} From 5a7cefc4d2151e1c8deec767a43e437f10ae03eb Mon Sep 17 00:00:00 2001 From: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> Date: Thu, 4 Jan 2024 16:58:42 +0530 Subject: [PATCH 42/80] fixed the sidebar issue in core module 1.8.0-beta.15 fixed the sidebar sort order issue --- .gitignore | 1 + .vscode/settings.json | 2 +- .../packages/modules/core/README.md | 17 +++++++ .../packages/modules/core/package.json | 2 +- .../TopBarSideBar/SideBar/EmployeeSideBar.js | 18 +++++--- .../TopBarSideBar/SideBar/SideBar.js | 45 ++++++++++++++++++- 6 files changed, 75 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index 24c70a1c173..f58a596c176 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ accelerators/frontend/micro-ui-internals/node_modules/* .idea index.lock +utilities/egov-bff/node_modules/ diff --git a/.vscode/settings.json b/.vscode/settings.json index 14f60307eb1..2b8c08a8854 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,3 +1,3 @@ { - "editor.inlineSuggest.showToolbar": "onHover" + "editor.inlineSuggest.showToolbar": "always" } \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/modules/core/README.md b/micro-ui/web/micro-ui-internals/packages/modules/core/README.md index a54daf3760d..a04c50cf68b 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/core/README.md +++ b/micro-ui/web/micro-ui-internals/packages/modules/core/README.md @@ -61,10 +61,27 @@ with .filter((opt) => (opt?.hasOwnProperty("active") ? opt.active : true)) ``` + * Digit.Hooks.Utils.getDefaultLanguage() + +``` +from 1.8.0 beta version add the following utility method in micro-ui/web/micro-ui-internals/packages/libraries/src/utils/index.js + +const getDefaultLanguage = () => { + return `${getLocaleDefault()}_${getLocaleRegion()}`; +}; + +and add its related functions + +``` + # Changelog ```bash +1.8.0-beta.15 fixed the sidebar sort order issue +1.8.0-beta.14 +1.8.0-beta.13 +1.8.0-beta.12 1.8.0-beta.11 republished due to some version issues 1.8.0-beta.10 Constants updated for mgramsewa 1.8.0-beta.9 Updated How It works screen to take header from mdms config and show pdf card only when required diff --git a/micro-ui/web/micro-ui-internals/packages/modules/core/package.json b/micro-ui/web/micro-ui-internals/packages/modules/core/package.json index a0bb78cccf3..33a5ade4936 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/core/package.json +++ b/micro-ui/web/micro-ui-internals/packages/modules/core/package.json @@ -1,6 +1,6 @@ { "name": "@egovernments/digit-ui-module-core", - "version": "1.8.0-beta.14", + "version": "1.8.0-beta.15", "license": "MIT", "main": "dist/index.js", "module": "dist/index.modern.js", diff --git a/micro-ui/web/micro-ui-internals/packages/modules/core/src/components/TopBarSideBar/SideBar/EmployeeSideBar.js b/micro-ui/web/micro-ui-internals/packages/modules/core/src/components/TopBarSideBar/SideBar/EmployeeSideBar.js index 3314ef65184..724aa98f760 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/core/src/components/TopBarSideBar/SideBar/EmployeeSideBar.js +++ b/micro-ui/web/micro-ui-internals/packages/modules/core/src/components/TopBarSideBar/SideBar/EmployeeSideBar.js @@ -96,14 +96,18 @@ const EmployeeSideBar = () => { const objectArray = Object.entries(configEmployeeSideBar); // Sort the array based on the 'orderNumber' or the length of the object if 'orderNumber' is not present + // sort logic updated to sort the parent item by alphabetical objectArray.sort((a, b) => { - const orderNumberA = a[1].item - ? a[1].item.orderNumber || Object.keys(configEmployeeSideBar).length + 1 - : Object.keys(configEmployeeSideBar).length + 1; - const orderNumberB = b[1].item - ? b[1].item.orderNumber || Object.keys(configEmployeeSideBar).length + 1 - : Object.keys(configEmployeeSideBar).length + 1; - return orderNumberA - orderNumberB; + if(a[0] < b[0]) { return -1; } + if(a[0] > b[0]) { return 1; } + return 0; + // const orderNumberA = a[1].item + // ? a[1].item.orderNumber || Object.keys(configEmployeeSideBar).length + 1 + // : Object.keys(configEmployeeSideBar).length + 1; + // const orderNumberB = b[1].item + // ? b[1].item.orderNumber || Object.keys(configEmployeeSideBar).length + 1 + // : Object.keys(configEmployeeSideBar).length + 1; + // return orderNumberA - orderNumberB; }); const sortedObject = Object.fromEntries(objectArray); configEmployeeSideBar = sortedObject; diff --git a/micro-ui/web/micro-ui-internals/packages/modules/core/src/components/TopBarSideBar/SideBar/SideBar.js b/micro-ui/web/micro-ui-internals/packages/modules/core/src/components/TopBarSideBar/SideBar/SideBar.js index 9a38a79a4a8..8b37d6abf02 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/core/src/components/TopBarSideBar/SideBar/SideBar.js +++ b/micro-ui/web/micro-ui-internals/packages/modules/core/src/components/TopBarSideBar/SideBar/SideBar.js @@ -22,6 +22,32 @@ import { useHistory, useLocation, Link } from "react-router-dom"; import { useTranslation } from "react-i18next"; const DIGIT_UI_CONTEXTS = ["digit-ui", "works-ui", "workbench-ui", "health-ui", "sanitation-ui", "core-ui","mgramseva-web"]; + +// Function to recursively get the key of a nested object based on a parent key +const getKey = (obj, parent) => { + // Use Object.keys to get an array of keys in the object + const key = Object.keys(obj).map((key) => + // Check if the object has an 'item' property with a 'path' property + obj[key]?.item?.path?.split(parent ? `${parent}.${key}` : `.${key}`) || + // If not, recursively call getKey on the nested object + getKey(obj[key], key) + ); + // Return the first element of the array (the key) + return key?.[0]; +}; + +// Function to find the last key in a dot-separated key string +const findKey = (key = "") => { + // Split the key string into an array using dot as a separator + const newSplitedList = key?.split("."); + // Check if the key string ends with a dot + return key?.endsWith?.(".") ? + // If it ends with a dot, return the first element of the array + newSplitedList[0] : + // If not, return the last element of the array + newSplitedList[newSplitedList?.length - 1]; +}; + /* Used to navigate to other mission's ui if user has access */ @@ -101,9 +127,26 @@ const Sidebar = ({ data }) => { return null; // Return null if no non-empty leftIcon is found } const renderSidebarItems = (items, parentKey = null, flag = true, level = 0) => { + /* added the logic to sort the side bar items based on the ordernumber */ + const keysArray = Object.values(items) + .sort((x, y) => { + if (x?.item && y?.item) { + return x?.item?.orderNumber - y?.item?.orderNumber; + } else { + if (x?.[0] < y?.[0]) { + return -1; + } + if (x?.[0] > y?.[0]) { + return 1; + } + return 0; + } + }) + .map((x) => (x?.item?.path && findKey(x?.item?.path)) || findKey(getKey(x)?.[0])); + return (
- {Object.keys(items).map((key, index) => { + {keysArray.map((key, index) => { const subItems = items[key]; const subItemKeys = Object.keys(subItems)[0] === "item"; const isSubItemOpen = openItems[key] || false; From 0f2c58cfdbbbf713df041914ed786b7986bfa51b Mon Sep 17 00:00:00 2001 From: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> Date: Fri, 5 Jan 2024 12:00:04 +0530 Subject: [PATCH 43/80] Added new role to support hcm manage masters Added new role to support hcm manage masters --- micro-ui/web/core/package.json | 2 +- .../micro-ui-internals/example/package.json | 2 +- .../packages/modules/workbench/README.md | 2 + .../packages/modules/workbench/package.json | 2 +- .../workbench/src/configs/searchMDMSConfig.js | 2 +- .../src/pages/employee/MDMSSearch.js | 3 +- .../src/pages/employee/MDMSSearchv2.js | 52 +------------------ micro-ui/web/package.json | 2 +- micro-ui/web/workbench/package.json | 2 +- 9 files changed, 10 insertions(+), 59 deletions(-) diff --git a/micro-ui/web/core/package.json b/micro-ui/web/core/package.json index 2a2aecc7c7c..47a487432a2 100644 --- a/micro-ui/web/core/package.json +++ b/micro-ui/web/core/package.json @@ -16,7 +16,7 @@ "homepage": "/core-ui", "dependencies": { "@egovernments/digit-ui-libraries": "1.8.0-beta.2", - "@egovernments/digit-ui-module-workbench": "1.0.0-beta.7", + "@egovernments/digit-ui-module-workbench": "1.0.0-beta.9", "@egovernments/digit-ui-module-core": "1.8.0-beta.14", "@egovernments/digit-ui-module-hrms": "1.8.0-beta.3", "@egovernments/digit-ui-module-utilities": "1.0.0-beta.3", diff --git a/micro-ui/web/micro-ui-internals/example/package.json b/micro-ui/web/micro-ui-internals/example/package.json index 2eca20e4ad7..10a1640a235 100644 --- a/micro-ui/web/micro-ui-internals/example/package.json +++ b/micro-ui/web/micro-ui-internals/example/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "@egovernments/digit-ui-libraries": "1.8.0-beta.2", - "@egovernments/digit-ui-module-workbench": "1.0.0-beta.8", + "@egovernments/digit-ui-module-workbench": "1.0.0-beta.9", "@egovernments/digit-ui-module-dss": "1.8.0-beta.2", "@egovernments/digit-ui-module-core": "1.8.0-beta.14", "@egovernments/digit-ui-module-common": "1.8.0-beta.1", diff --git a/micro-ui/web/micro-ui-internals/packages/modules/workbench/README.md b/micro-ui/web/micro-ui-internals/packages/modules/workbench/README.md index 36c8f2e3c8e..619c2505929 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/workbench/README.md +++ b/micro-ui/web/micro-ui-internals/packages/modules/workbench/README.md @@ -103,6 +103,8 @@ https://github.com/egovernments/DIGIT-OSS/pull/99/commits/6e711bdc005c226c7debd5 ### Changelog ```bash +1.0.0-beta.9 Added new role to support hcm manage masters +1.0.0-beta.8 minor fixes 1.0.0-beta.7 Added Bulk Upload Ui for MDMS Add 1.0.0-beta.6 Added Bulk Upload Ui for MDMS Add 1.0.0-beta.5 Fixed some loading issue diff --git a/micro-ui/web/micro-ui-internals/packages/modules/workbench/package.json b/micro-ui/web/micro-ui-internals/packages/modules/workbench/package.json index 1a782b47eb8..628fa3525f0 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/workbench/package.json +++ b/micro-ui/web/micro-ui-internals/packages/modules/workbench/package.json @@ -1,6 +1,6 @@ { "name": "@egovernments/digit-ui-module-workbench", - "version": "1.0.0-beta.8", + "version": "1.0.0-beta.9", "description": "Workbench", "main": "dist/index.js", "module": "dist/index.modern.js", diff --git a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/configs/searchMDMSConfig.js b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/configs/searchMDMSConfig.js index 64340780f13..84edeb4b8f5 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/configs/searchMDMSConfig.js +++ b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/configs/searchMDMSConfig.js @@ -2,7 +2,7 @@ export const Config = { label: "WBH_SEARCH_MDMS", type: "search", actionLabel: "WBH_ADD_MDMS", - actionRole: "MDMS_ADMIN", + actionRoles: ["MDMS_ADMIN","CAMPAIGN_ADMIN"], actionLink: "workbench/mdms-add-v2", apiDetails: { serviceName: `/mdms-v2/v2/_search`, diff --git a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSSearch.js b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSSearch.js index d40830fd4cc..7951348ae85 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSSearch.js +++ b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSSearch.js @@ -69,12 +69,11 @@ const MDMSSearch = () => { // }, [data]); if (isLoading ) return ; - return (
{t(updatedConfig?.label)}
- {Digit.Utils.didEmployeeHasRole(updatedConfig?.actionRole) && ( + {Digit.Utils.didEmployeeHasAtleastOneRole(updatedConfig?.actionRoles) && (
*/} { - updatedConfig && Digit.Utils.didEmployeeHasRole(updatedConfig?.actionRole) && + updatedConfig && Digit.Utils.didEmployeeHasAtleastOneRole(updatedConfig?.actionRoles) && diff --git a/micro-ui/web/package.json b/micro-ui/web/package.json index 1449dcca17c..daf7c08d403 100644 --- a/micro-ui/web/package.json +++ b/micro-ui/web/package.json @@ -15,7 +15,7 @@ "homepage": "/digit-ui", "dependencies": { "@egovernments/digit-ui-libraries": "1.8.0-beta.2", - "@egovernments/digit-ui-module-workbench": "1.0.0-beta.7", + "@egovernments/digit-ui-module-workbench": "1.0.0-beta.9", "@egovernments/digit-ui-module-dss": "1.8.0-beta.2", "@egovernments/digit-ui-module-core": "1.8.0-beta.14", "@egovernments/digit-ui-module-common": "1.8.0-beta.1", diff --git a/micro-ui/web/workbench/package.json b/micro-ui/web/workbench/package.json index 7dae4368dde..5919e4fba5e 100644 --- a/micro-ui/web/workbench/package.json +++ b/micro-ui/web/workbench/package.json @@ -15,7 +15,7 @@ "homepage": "/workbench-ui", "dependencies": { "@egovernments/digit-ui-libraries": "1.8.0-beta.2", - "@egovernments/digit-ui-module-workbench": "1.0.0-beta.8", + "@egovernments/digit-ui-module-workbench": "1.0.0-beta.9", "@egovernments/digit-ui-module-core": "1.8.0-beta.14", "@egovernments/digit-ui-module-hrms": "1.8.0-beta.3", "@egovernments/digit-ui-module-utilities": "1.0.0-beta.3", From 673e45e229977fc9ab442ebf6dc8fbc9667bc188 Mon Sep 17 00:00:00 2001 From: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> Date: Fri, 5 Jan 2024 12:33:40 +0530 Subject: [PATCH 44/80] fixed the dropdown undefined issue fixed the dropdown undefined issue --- micro-ui/web/core/package.json | 2 +- micro-ui/web/micro-ui-internals/example/package.json | 2 +- .../micro-ui-internals/packages/modules/workbench/README.md | 1 + .../packages/modules/workbench/package.json | 2 +- .../modules/workbench/src/components/MultiSelectV2.js | 4 ++-- micro-ui/web/package.json | 2 +- micro-ui/web/workbench/package.json | 2 +- 7 files changed, 8 insertions(+), 7 deletions(-) diff --git a/micro-ui/web/core/package.json b/micro-ui/web/core/package.json index 47a487432a2..bfc2e6d9d10 100644 --- a/micro-ui/web/core/package.json +++ b/micro-ui/web/core/package.json @@ -16,7 +16,7 @@ "homepage": "/core-ui", "dependencies": { "@egovernments/digit-ui-libraries": "1.8.0-beta.2", - "@egovernments/digit-ui-module-workbench": "1.0.0-beta.9", + "@egovernments/digit-ui-module-workbench": "1.0.0-beta.10", "@egovernments/digit-ui-module-core": "1.8.0-beta.14", "@egovernments/digit-ui-module-hrms": "1.8.0-beta.3", "@egovernments/digit-ui-module-utilities": "1.0.0-beta.3", diff --git a/micro-ui/web/micro-ui-internals/example/package.json b/micro-ui/web/micro-ui-internals/example/package.json index 10a1640a235..357d8476b70 100644 --- a/micro-ui/web/micro-ui-internals/example/package.json +++ b/micro-ui/web/micro-ui-internals/example/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "@egovernments/digit-ui-libraries": "1.8.0-beta.2", - "@egovernments/digit-ui-module-workbench": "1.0.0-beta.9", + "@egovernments/digit-ui-module-workbench": "1.0.0-beta.10", "@egovernments/digit-ui-module-dss": "1.8.0-beta.2", "@egovernments/digit-ui-module-core": "1.8.0-beta.14", "@egovernments/digit-ui-module-common": "1.8.0-beta.1", diff --git a/micro-ui/web/micro-ui-internals/packages/modules/workbench/README.md b/micro-ui/web/micro-ui-internals/packages/modules/workbench/README.md index 619c2505929..afba38ee854 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/workbench/README.md +++ b/micro-ui/web/micro-ui-internals/packages/modules/workbench/README.md @@ -103,6 +103,7 @@ https://github.com/egovernments/DIGIT-OSS/pull/99/commits/6e711bdc005c226c7debd5 ### Changelog ```bash +1.0.0-beta.10 fixed the dropdown undefined issue 1.0.0-beta.9 Added new role to support hcm manage masters 1.0.0-beta.8 minor fixes 1.0.0-beta.7 Added Bulk Upload Ui for MDMS Add diff --git a/micro-ui/web/micro-ui-internals/packages/modules/workbench/package.json b/micro-ui/web/micro-ui-internals/packages/modules/workbench/package.json index 628fa3525f0..f6456058a72 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/workbench/package.json +++ b/micro-ui/web/micro-ui-internals/packages/modules/workbench/package.json @@ -1,6 +1,6 @@ { "name": "@egovernments/digit-ui-module-workbench", - "version": "1.0.0-beta.9", + "version": "1.0.0-beta.10", "description": "Workbench", "main": "dist/index.js", "module": "dist/index.modern.js", diff --git a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/components/MultiSelectV2.js b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/components/MultiSelectV2.js index fa92ca654fc..3d827d7307a 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/components/MultiSelectV2.js +++ b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/components/MultiSelectV2.js @@ -36,7 +36,7 @@ const CustomSelectWidget = (props) => { const { configs, updateConfigs, updateSchema, schema: formSchema, formData } = Digit.Hooks.workbench.useWorkbenchFormContext(); useEffect(()=>{ const customConfig = configs?.customUiConfigs?.custom?.filter((data) => data?.fieldPath == fieldPath)?.[0] || {}; - const newPrefix = customConfig?.prefix; + const newPrefix = customConfig?.prefix || prefix; const suffix = customConfig?.suffix; newPrefix != prefix && setPrefix(newPrefix); @@ -48,7 +48,7 @@ useEffect(()=>{ const { isLoading, data } = Digit.Hooks.useCustomAPIHook(Digit.Utils.workbench.getCriteriaForSelectData(props) ); const optionsList = data || options?.enumOptions || options || []; const formattedOptions = React.useMemo( - () => optionsList.map((e) => ({ label: t(Digit.Utils.locale.getTransformedLocale(`${prefix}_${e?.label}`)), value: e.value })), + () => optionsList.map((e) => ({ label: t(Digit.Utils.locale.getTransformedLocale(prefix?.trim?.()!=""?`${prefix}_${e?.label}`:e?.label)), value: e.value })), [optionsList, prefix, data] ); const selectedOption = formattedOptions?.filter((obj) => (multiple ? value?.includes(obj.value) : obj.value == value)); diff --git a/micro-ui/web/package.json b/micro-ui/web/package.json index daf7c08d403..0bfe855f5cd 100644 --- a/micro-ui/web/package.json +++ b/micro-ui/web/package.json @@ -15,7 +15,7 @@ "homepage": "/digit-ui", "dependencies": { "@egovernments/digit-ui-libraries": "1.8.0-beta.2", - "@egovernments/digit-ui-module-workbench": "1.0.0-beta.9", + "@egovernments/digit-ui-module-workbench": "1.0.0-beta.10", "@egovernments/digit-ui-module-dss": "1.8.0-beta.2", "@egovernments/digit-ui-module-core": "1.8.0-beta.14", "@egovernments/digit-ui-module-common": "1.8.0-beta.1", diff --git a/micro-ui/web/workbench/package.json b/micro-ui/web/workbench/package.json index 5919e4fba5e..a98240f99d8 100644 --- a/micro-ui/web/workbench/package.json +++ b/micro-ui/web/workbench/package.json @@ -15,7 +15,7 @@ "homepage": "/workbench-ui", "dependencies": { "@egovernments/digit-ui-libraries": "1.8.0-beta.2", - "@egovernments/digit-ui-module-workbench": "1.0.0-beta.9", + "@egovernments/digit-ui-module-workbench": "1.0.0-beta.10", "@egovernments/digit-ui-module-core": "1.8.0-beta.14", "@egovernments/digit-ui-module-hrms": "1.8.0-beta.3", "@egovernments/digit-ui-module-utilities": "1.0.0-beta.3", From acfdd8a8950f13644d2b5806cb4ed7b6894fb6c4 Mon Sep 17 00:00:00 2001 From: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> Date: Fri, 5 Jan 2024 17:07:58 +0530 Subject: [PATCH 45/80] 1.0.0-beta.11 Added customisable label for custom dropdown through workbench ui schema --- micro-ui/web/core/package.json | 2 +- micro-ui/web/micro-ui-internals/example/package.json | 2 +- .../web/micro-ui-internals/example/src/setupProxy.js | 1 + .../packages/modules/workbench/README.md | 1 + .../packages/modules/workbench/package.json | 2 +- .../modules/workbench/src/components/MultiSelectV2.js | 2 +- .../packages/modules/workbench/src/utils/index.js | 9 +++++---- micro-ui/web/package.json | 2 +- micro-ui/web/workbench/package.json | 2 +- 9 files changed, 13 insertions(+), 10 deletions(-) diff --git a/micro-ui/web/core/package.json b/micro-ui/web/core/package.json index bfc2e6d9d10..b48e537bdf0 100644 --- a/micro-ui/web/core/package.json +++ b/micro-ui/web/core/package.json @@ -16,7 +16,7 @@ "homepage": "/core-ui", "dependencies": { "@egovernments/digit-ui-libraries": "1.8.0-beta.2", - "@egovernments/digit-ui-module-workbench": "1.0.0-beta.10", + "@egovernments/digit-ui-module-workbench": "1.0.0-beta.11", "@egovernments/digit-ui-module-core": "1.8.0-beta.14", "@egovernments/digit-ui-module-hrms": "1.8.0-beta.3", "@egovernments/digit-ui-module-utilities": "1.0.0-beta.3", diff --git a/micro-ui/web/micro-ui-internals/example/package.json b/micro-ui/web/micro-ui-internals/example/package.json index 357d8476b70..ecee2db6d6d 100644 --- a/micro-ui/web/micro-ui-internals/example/package.json +++ b/micro-ui/web/micro-ui-internals/example/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "@egovernments/digit-ui-libraries": "1.8.0-beta.2", - "@egovernments/digit-ui-module-workbench": "1.0.0-beta.10", + "@egovernments/digit-ui-module-workbench": "1.0.0-beta.11", "@egovernments/digit-ui-module-dss": "1.8.0-beta.2", "@egovernments/digit-ui-module-core": "1.8.0-beta.14", "@egovernments/digit-ui-module-common": "1.8.0-beta.1", diff --git a/micro-ui/web/micro-ui-internals/example/src/setupProxy.js b/micro-ui/web/micro-ui-internals/example/src/setupProxy.js index b342e94b4db..a9abf61cabe 100644 --- a/micro-ui/web/micro-ui-internals/example/src/setupProxy.js +++ b/micro-ui/web/micro-ui-internals/example/src/setupProxy.js @@ -82,6 +82,7 @@ module.exports = function (app) { "/muster-roll", "/individual", "/mdms-v2", + "/facility/v1/_search", "/project/staff/v1/_create", "/product/v1/_create" ].forEach((location) => app.use(location, createProxy)); diff --git a/micro-ui/web/micro-ui-internals/packages/modules/workbench/README.md b/micro-ui/web/micro-ui-internals/packages/modules/workbench/README.md index afba38ee854..d04138e7d1e 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/workbench/README.md +++ b/micro-ui/web/micro-ui-internals/packages/modules/workbench/README.md @@ -103,6 +103,7 @@ https://github.com/egovernments/DIGIT-OSS/pull/99/commits/6e711bdc005c226c7debd5 ### Changelog ```bash +1.0.0-beta.11 Added customisable label for custom dropdown through workbench ui schema 1.0.0-beta.10 fixed the dropdown undefined issue 1.0.0-beta.9 Added new role to support hcm manage masters 1.0.0-beta.8 minor fixes diff --git a/micro-ui/web/micro-ui-internals/packages/modules/workbench/package.json b/micro-ui/web/micro-ui-internals/packages/modules/workbench/package.json index f6456058a72..a7ffde08d98 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/workbench/package.json +++ b/micro-ui/web/micro-ui-internals/packages/modules/workbench/package.json @@ -1,6 +1,6 @@ { "name": "@egovernments/digit-ui-module-workbench", - "version": "1.0.0-beta.10", + "version": "1.0.0-beta.11", "description": "Workbench", "main": "dist/index.js", "module": "dist/index.modern.js", diff --git a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/components/MultiSelectV2.js b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/components/MultiSelectV2.js index 3d827d7307a..bd8e7accebd 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/components/MultiSelectV2.js +++ b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/components/MultiSelectV2.js @@ -48,7 +48,7 @@ useEffect(()=>{ const { isLoading, data } = Digit.Hooks.useCustomAPIHook(Digit.Utils.workbench.getCriteriaForSelectData(props) ); const optionsList = data || options?.enumOptions || options || []; const formattedOptions = React.useMemo( - () => optionsList.map((e) => ({ label: t(Digit.Utils.locale.getTransformedLocale(prefix?.trim?.()!=""?`${prefix}_${e?.label}`:e?.label)), value: e.value })), + () => optionsList.map((e) => ({ label: t(Digit.Utils.locale.getTransformedLocale(prefix?.trim?.()!=""?`${prefix}_${e?.label}`:e?.label)), value: e?.value })), [optionsList, prefix, data] ); const selectedOption = formattedOptions?.filter((obj) => (multiple ? value?.includes(obj.value) : obj.value == value)); diff --git a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/utils/index.js b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/utils/index.js index 63c3b6d0371..fcc69de0a16 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/utils/index.js +++ b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/utils/index.js @@ -378,7 +378,6 @@ const getCriteriaForSelectData = (allProps) => { }, changeQueryName: `data-${schemaCode}`, }; - console.log(schemaCode, "schemaCode"); if (schemaCode === "CUSTOM" && configs?.customUiConfigs?.custom?.length > 0) { const customConfig = configs?.customUiConfigs?.custom?.filter((data) => data?.fieldPath == fieldPath)?.[0] || {}; reqCriteriaForData.url = customConfig?.dataSource?.API; @@ -425,22 +424,24 @@ const getCriteriaForSelectData = (allProps) => { respData = customFun?.(data); } const finalJSONPath = `registry.rootSchema.properties.${Digit.Utils.workbench.getUpdatedPath(fieldPath)}.enum`; + /* enahanced to support both string values and object label value*/ + const keyValuePairs= respData?.map((item) => ({ label: item?.label|| item, value: item?.value||item })) if (_.has(allProps, finalJSONPath)) { _.set( allProps, finalJSONPath, - respData?.map((item) => ({ label: item, value: item })) + keyValuePairs ); const path = `definition.properties.${Digit.Utils.workbench.getUpdatedPath(fieldPath)}.enum`; const newSchema = _.cloneDeep(formSchema); _.set( newSchema, path, - respData?.map((e) => e) + keyValuePairs ); updateSchema(newSchema); } - return respData?.map((item) => ({ label: item, value: item })); + return keyValuePairs; }; } return reqCriteriaForData; diff --git a/micro-ui/web/package.json b/micro-ui/web/package.json index 0bfe855f5cd..c20272809c8 100644 --- a/micro-ui/web/package.json +++ b/micro-ui/web/package.json @@ -15,7 +15,7 @@ "homepage": "/digit-ui", "dependencies": { "@egovernments/digit-ui-libraries": "1.8.0-beta.2", - "@egovernments/digit-ui-module-workbench": "1.0.0-beta.10", + "@egovernments/digit-ui-module-workbench": "1.0.0-beta.11", "@egovernments/digit-ui-module-dss": "1.8.0-beta.2", "@egovernments/digit-ui-module-core": "1.8.0-beta.14", "@egovernments/digit-ui-module-common": "1.8.0-beta.1", diff --git a/micro-ui/web/workbench/package.json b/micro-ui/web/workbench/package.json index a98240f99d8..f2f78c9b324 100644 --- a/micro-ui/web/workbench/package.json +++ b/micro-ui/web/workbench/package.json @@ -15,7 +15,7 @@ "homepage": "/workbench-ui", "dependencies": { "@egovernments/digit-ui-libraries": "1.8.0-beta.2", - "@egovernments/digit-ui-module-workbench": "1.0.0-beta.10", + "@egovernments/digit-ui-module-workbench": "1.0.0-beta.11", "@egovernments/digit-ui-module-core": "1.8.0-beta.14", "@egovernments/digit-ui-module-hrms": "1.8.0-beta.3", "@egovernments/digit-ui-module-utilities": "1.0.0-beta.3", From a5b2f6309a6dee712040beebe26bd520d5b4576c Mon Sep 17 00:00:00 2001 From: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> Date: Fri, 5 Jan 2024 17:32:47 +0530 Subject: [PATCH 46/80] 1.0.0-beta.12 Fixes added for dropdown of custom --- micro-ui/web/core/package.json | 2 +- micro-ui/web/micro-ui-internals/example/package.json | 2 +- .../web/micro-ui-internals/packages/modules/workbench/README.md | 1 + .../packages/modules/workbench/src/utils/index.js | 2 +- micro-ui/web/package.json | 2 +- micro-ui/web/workbench/package.json | 2 +- 6 files changed, 6 insertions(+), 5 deletions(-) diff --git a/micro-ui/web/core/package.json b/micro-ui/web/core/package.json index b48e537bdf0..4064bb29c30 100644 --- a/micro-ui/web/core/package.json +++ b/micro-ui/web/core/package.json @@ -16,7 +16,7 @@ "homepage": "/core-ui", "dependencies": { "@egovernments/digit-ui-libraries": "1.8.0-beta.2", - "@egovernments/digit-ui-module-workbench": "1.0.0-beta.11", + "@egovernments/digit-ui-module-workbench": "1.0.0-beta.12", "@egovernments/digit-ui-module-core": "1.8.0-beta.14", "@egovernments/digit-ui-module-hrms": "1.8.0-beta.3", "@egovernments/digit-ui-module-utilities": "1.0.0-beta.3", diff --git a/micro-ui/web/micro-ui-internals/example/package.json b/micro-ui/web/micro-ui-internals/example/package.json index ecee2db6d6d..27eb55f0699 100644 --- a/micro-ui/web/micro-ui-internals/example/package.json +++ b/micro-ui/web/micro-ui-internals/example/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "@egovernments/digit-ui-libraries": "1.8.0-beta.2", - "@egovernments/digit-ui-module-workbench": "1.0.0-beta.11", + "@egovernments/digit-ui-module-workbench": "1.0.0-beta.12", "@egovernments/digit-ui-module-dss": "1.8.0-beta.2", "@egovernments/digit-ui-module-core": "1.8.0-beta.14", "@egovernments/digit-ui-module-common": "1.8.0-beta.1", diff --git a/micro-ui/web/micro-ui-internals/packages/modules/workbench/README.md b/micro-ui/web/micro-ui-internals/packages/modules/workbench/README.md index d04138e7d1e..ea9b823d520 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/workbench/README.md +++ b/micro-ui/web/micro-ui-internals/packages/modules/workbench/README.md @@ -103,6 +103,7 @@ https://github.com/egovernments/DIGIT-OSS/pull/99/commits/6e711bdc005c226c7debd5 ### Changelog ```bash +1.0.0-beta.12 Added customisable label for custom dropdown through workbench ui schema 1.0.0-beta.11 Added customisable label for custom dropdown through workbench ui schema 1.0.0-beta.10 fixed the dropdown undefined issue 1.0.0-beta.9 Added new role to support hcm manage masters diff --git a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/utils/index.js b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/utils/index.js index fcc69de0a16..f2cb190dec5 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/utils/index.js +++ b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/utils/index.js @@ -437,7 +437,7 @@ const getCriteriaForSelectData = (allProps) => { _.set( newSchema, path, - keyValuePairs + keyValuePairs?.map((item) => item.value) ); updateSchema(newSchema); } diff --git a/micro-ui/web/package.json b/micro-ui/web/package.json index c20272809c8..3e0daf5bd75 100644 --- a/micro-ui/web/package.json +++ b/micro-ui/web/package.json @@ -15,7 +15,7 @@ "homepage": "/digit-ui", "dependencies": { "@egovernments/digit-ui-libraries": "1.8.0-beta.2", - "@egovernments/digit-ui-module-workbench": "1.0.0-beta.11", + "@egovernments/digit-ui-module-workbench": "1.0.0-beta.12", "@egovernments/digit-ui-module-dss": "1.8.0-beta.2", "@egovernments/digit-ui-module-core": "1.8.0-beta.14", "@egovernments/digit-ui-module-common": "1.8.0-beta.1", diff --git a/micro-ui/web/workbench/package.json b/micro-ui/web/workbench/package.json index f2f78c9b324..5c5c2f516d0 100644 --- a/micro-ui/web/workbench/package.json +++ b/micro-ui/web/workbench/package.json @@ -15,7 +15,7 @@ "homepage": "/workbench-ui", "dependencies": { "@egovernments/digit-ui-libraries": "1.8.0-beta.2", - "@egovernments/digit-ui-module-workbench": "1.0.0-beta.11", + "@egovernments/digit-ui-module-workbench": "1.0.0-beta.12", "@egovernments/digit-ui-module-core": "1.8.0-beta.14", "@egovernments/digit-ui-module-hrms": "1.8.0-beta.3", "@egovernments/digit-ui-module-utilities": "1.0.0-beta.3", From 8b4cd88520ffc93c740a1444f4235a6d7a1dc146 Mon Sep 17 00:00:00 2001 From: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> Date: Fri, 5 Jan 2024 17:53:30 +0530 Subject: [PATCH 47/80] Update package.json --- .../micro-ui-internals/packages/modules/workbench/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/micro-ui/web/micro-ui-internals/packages/modules/workbench/package.json b/micro-ui/web/micro-ui-internals/packages/modules/workbench/package.json index a7ffde08d98..d5cd3e64db5 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/workbench/package.json +++ b/micro-ui/web/micro-ui-internals/packages/modules/workbench/package.json @@ -1,6 +1,6 @@ { "name": "@egovernments/digit-ui-module-workbench", - "version": "1.0.0-beta.11", + "version": "1.0.0-beta.12", "description": "Workbench", "main": "dist/index.js", "module": "dist/index.modern.js", From a0261e59ea80e1f826fe1254ecdca64d9ae7c31c Mon Sep 17 00:00:00 2001 From: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> Date: Mon, 8 Jan 2024 12:46:31 +0530 Subject: [PATCH 48/80] updated all the readme contents --- micro-ui/web/micro-ui-internals/packages/css/README.md | 4 ++-- .../web/micro-ui-internals/packages/modules/common/README.md | 4 ++-- .../web/micro-ui-internals/packages/modules/core/README.md | 4 ++-- .../web/micro-ui-internals/packages/modules/dss/README.md | 4 ++-- .../micro-ui-internals/packages/modules/engagement/README.md | 4 ++-- .../web/micro-ui-internals/packages/modules/hrms/README.md | 4 ++-- .../micro-ui-internals/packages/modules/utilities/README.md | 4 ++-- .../micro-ui-internals/packages/modules/workbench/README.md | 5 +++-- .../micro-ui-internals/packages/react-components/README.md | 4 ++-- .../web/micro-ui-internals/packages/svg-components/README.md | 4 ++-- 10 files changed, 21 insertions(+), 20 deletions(-) diff --git a/micro-ui/web/micro-ui-internals/packages/css/README.md b/micro-ui/web/micro-ui-internals/packages/css/README.md index 0befc12a4c8..15b77f8b1c2 100644 --- a/micro-ui/web/micro-ui-internals/packages/css/README.md +++ b/micro-ui/web/micro-ui-internals/packages/css/README.md @@ -76,8 +76,8 @@ frontend/micro-ui/web/public/index.html [jagankumar-egov] [nipunarora-eGov] [Tulika-eGov] [Ramkrishna-egov] [nabeelmd-eGov] [anil-egov] [vamshikrishnakole-wtt-egov] -## Published from DIGIT Core -Digit Core Repo (https://github.com/egovernments/Digit-Frontend/tree/develop) +### Published from DIGIT Frontend +DIGIT Frontend Repo (https://github.com/egovernments/Digit-Frontend/tree/develop) ## License diff --git a/micro-ui/web/micro-ui-internals/packages/modules/common/README.md b/micro-ui/web/micro-ui-internals/packages/modules/common/README.md index 38055fafeca..ebb89c37b3e 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/common/README.md +++ b/micro-ui/web/micro-ui-internals/packages/modules/common/README.md @@ -70,8 +70,8 @@ const initDigitUI = () => { [jagankumar-egov] [Tulika-eGov] [vamshikrishnakole-wtt-egov] [nabeelmd-eGov] [anil-egov] -## Published from DIGIT Core -Digit Dev Repo (https://github.com/egovernments/Digit-Core/tree/digit-ui-core) +### Published from DIGIT Frontend +DIGIT Frontend Repo (https://github.com/egovernments/Digit-Frontend/tree/develop) ## License diff --git a/micro-ui/web/micro-ui-internals/packages/modules/core/README.md b/micro-ui/web/micro-ui-internals/packages/modules/core/README.md index a04c50cf68b..f18bd493f8c 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/core/README.md +++ b/micro-ui/web/micro-ui-internals/packages/modules/core/README.md @@ -117,9 +117,9 @@ and add its related functions [jagankumar-egov] [nipunarora-eGov] [Tulika-eGov] [Ramkrishna-egov] [nabeelmd-eGov] [anil-egov] [vamshikrishnakole-wtt-egov] -## Published from DIGIT Core +### Published from DIGIT Frontend -Digit Dev Repo () +DIGIT Frontend Repo () ## License diff --git a/micro-ui/web/micro-ui-internals/packages/modules/dss/README.md b/micro-ui/web/micro-ui-internals/packages/modules/dss/README.md index 3fa5409f9b4..03e50ce98d0 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/dss/README.md +++ b/micro-ui/web/micro-ui-internals/packages/modules/dss/README.md @@ -187,8 +187,8 @@ const useGetCustomFilterRequestValues = (filterConfigs, config={}) => { [jagankumar-egov] [nipunarora-eGov] [Tulika-eGov] [Ramkrishna-egov] [nabeelmd-eGov] -## Published from DIGIT Core -Digit Dev Repo (https://github.com/egovernments/Digit-Core/tree/digit-ui-core) +### Published from DIGIT Frontend +DIGIT Frontend Repo (https://github.com/egovernments/Digit-Frontend/tree/develop) ## License diff --git a/micro-ui/web/micro-ui-internals/packages/modules/engagement/README.md b/micro-ui/web/micro-ui-internals/packages/modules/engagement/README.md index 62e4997d83d..a56a883e314 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/engagement/README.md +++ b/micro-ui/web/micro-ui-internals/packages/modules/engagement/README.md @@ -64,8 +64,8 @@ const initDigitUI = () => { [jagankumar-egov] [nipunarora-eGov] [Tulika-eGov] [Ramkrishna-egov] [vamshikrishnakole-wtt-egov] -## Published from DIGIT Core -Digit Dev Repo (https://github.com/egovernments/Digit-Core/tree/digit-ui-core) +### Published from DIGIT Frontend +DIGIT Frontend Repo (https://github.com/egovernments/Digit-Frontend/tree/develop) ## License diff --git a/micro-ui/web/micro-ui-internals/packages/modules/hrms/README.md b/micro-ui/web/micro-ui-internals/packages/modules/hrms/README.md index 80e8cee0f99..c6c7ba01b23 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/hrms/README.md +++ b/micro-ui/web/micro-ui-internals/packages/modules/hrms/README.md @@ -69,8 +69,8 @@ const initDigitUI = () => { [jagankumar-egov] [naveen-egov] [nipunarora-eGov] [Tulika-eGov] [Ramkrishna-egov] [vamshikrishnakole-wtt-egov] -## Published from DIGIT Core -Digit Dev Repo (https://github.com/egovernments/DIGIT-Dev/tree/digit-ui-core) +### Published from DIGIT Frontend +DIGIT Frontend Repo (https://github.com/egovernments/Digit-Frontend/tree/develop) ## License diff --git a/micro-ui/web/micro-ui-internals/packages/modules/utilities/README.md b/micro-ui/web/micro-ui-internals/packages/modules/utilities/README.md index b1986c6af63..0929eec16e8 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/utilities/README.md +++ b/micro-ui/web/micro-ui-internals/packages/modules/utilities/README.md @@ -154,8 +154,8 @@ _Bill Module [jagankumar-egov] -## Published from DIGIT Core -Digit Dev Repo (https://github.com/egovernments/Digit-Core/tree/digit-ui-core) +#### Published from DIGIT Frontend +Digit Frontend Repo (https://github.com/egovernments/Digit-Frontend/tree/develop) ## License diff --git a/micro-ui/web/micro-ui-internals/packages/modules/workbench/README.md b/micro-ui/web/micro-ui-internals/packages/modules/workbench/README.md index ea9b823d520..8517f58fc59 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/workbench/README.md +++ b/micro-ui/web/micro-ui-internals/packages/modules/workbench/README.md @@ -135,8 +135,9 @@ https://github.com/egovernments/DIGIT-OSS/pull/99/commits/6e711bdc005c226c7debd5 - [jagankumar-egov](https://www.github.com/jagankumar-egov) -### Published from -[Digit Core Repo](https://github.com/egovernments/Digit-Core/tree/digit-ui-core) + +### Published from DIGIT Frontend +DIGIT Frontend Repo (https://github.com/egovernments/Digit-Frontend/tree/develop) diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/README.md b/micro-ui/web/micro-ui-internals/packages/react-components/README.md index 6b20573f74d..fa408bcea4c 100644 --- a/micro-ui/web/micro-ui-internals/packages/react-components/README.md +++ b/micro-ui/web/micro-ui-internals/packages/react-components/README.md @@ -110,8 +110,8 @@ Syntax for the FormComposersV2 [jagankumar-egov] [nipunarora-eGov] [Tulika-eGov] [Ramkrishna-egov] [nabeelmd-eGov] [anil-egov] [vamshikrishnakole-wtt-egov] -## Published from DIGIT Core -Digit Dev Repo (https://github.com/egovernments/DIGIT-Dev/tree/digit-ui-core) +### Published from DIGIT Frontend +DIGIT Frontend Repo (https://github.com/egovernments/Digit-Frontend/tree/develop) ## License diff --git a/micro-ui/web/micro-ui-internals/packages/svg-components/README.md b/micro-ui/web/micro-ui-internals/packages/svg-components/README.md index 58c1dcc353b..84b09c1b57f 100644 --- a/micro-ui/web/micro-ui-internals/packages/svg-components/README.md +++ b/micro-ui/web/micro-ui-internals/packages/svg-components/README.md @@ -73,9 +73,9 @@ const { Accessibility } = SVG; 0.0.1 base version ``` -## Published from DIGIT Core +### Published from DIGIT Frontend -Digit Core Repo (https://github.com/egovernments/Core-Platform/tree/digit-ui-core) +DIGIT Frontend Repo (https://github.com/egovernments/Core-Platform/tree/digit-ui-core) # Contributors From f7b09123f91cc682a54338d941d2e7e2a0f0f031 Mon Sep 17 00:00:00 2001 From: Bhavya-egov <137176879+Bhavya-egov@users.noreply.github.com> Date: Tue, 9 Jan 2024 11:08:20 +0530 Subject: [PATCH 49/80] HLM-4752 added excel file type in multiUpload (#96) * HLM-4752 added excel file type in multiUpload * HLM-4752 updated all the package versions * Delete micro-ui/web/micro-ui-internals/packages/modules/workbench-hcm/package.json --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> --- micro-ui/web/core/inter-package.json | 2 +- micro-ui/web/core/package.json | 2 +- micro-ui/web/micro-ui-internals/example/package.json | 2 +- micro-ui/web/micro-ui-internals/package.json | 2 +- .../web/micro-ui-internals/packages/modules/core/package.json | 2 +- .../web/micro-ui-internals/packages/modules/dss/package.json | 2 +- .../micro-ui-internals/packages/modules/utilities/package.json | 2 +- .../micro-ui-internals/packages/modules/workbench/package.json | 2 +- .../web/micro-ui-internals/packages/react-components/README.md | 1 + .../micro-ui-internals/packages/react-components/package.json | 2 +- .../react-components/src/molecules/MultiUploadWrapper.js | 2 +- micro-ui/web/package.json | 2 +- micro-ui/web/workbench/inter-package.json | 2 +- micro-ui/web/workbench/package.json | 2 +- 14 files changed, 14 insertions(+), 13 deletions(-) diff --git a/micro-ui/web/core/inter-package.json b/micro-ui/web/core/inter-package.json index edc70eb6bbe..35e45295b49 100644 --- a/micro-ui/web/core/inter-package.json +++ b/micro-ui/web/core/inter-package.json @@ -61,7 +61,7 @@ "dependencies": { "lodash": "4.17.21", "microbundle-crl": "0.13.11", - "@egovernments/digit-ui-react-components": "1.8.0-beta.4", + "@egovernments/digit-ui-react-components": "1.8.0-beta.5", "react": "17.0.2", "react-dom": "17.0.2", "react-hook-form": "6.15.8", diff --git a/micro-ui/web/core/package.json b/micro-ui/web/core/package.json index 4064bb29c30..4a705c5e901 100644 --- a/micro-ui/web/core/package.json +++ b/micro-ui/web/core/package.json @@ -20,7 +20,7 @@ "@egovernments/digit-ui-module-core": "1.8.0-beta.14", "@egovernments/digit-ui-module-hrms": "1.8.0-beta.3", "@egovernments/digit-ui-module-utilities": "1.0.0-beta.3", - "@egovernments/digit-ui-react-components": "1.8.0-beta.4", + "@egovernments/digit-ui-react-components": "1.8.0-beta.5", "babel-loader": "8.1.0", "react": "17.0.2", "react-dom": "17.0.2", diff --git a/micro-ui/web/micro-ui-internals/example/package.json b/micro-ui/web/micro-ui-internals/example/package.json index 27eb55f0699..6e81473c85f 100644 --- a/micro-ui/web/micro-ui-internals/example/package.json +++ b/micro-ui/web/micro-ui-internals/example/package.json @@ -17,7 +17,7 @@ "@egovernments/digit-ui-module-hrms": "1.8.0-beta.3", "@egovernments/digit-ui-module-utilities": "1.0.0-beta.3", "@egovernments/digit-ui-module-engagement": "1.5.20", - "@egovernments/digit-ui-react-components": "1.8.0-beta.4", + "@egovernments/digit-ui-react-components": "1.8.0-beta.5", "http-proxy-middleware": "^1.0.5", "react": "17.0.2", "react-dom": "17.0.2", diff --git a/micro-ui/web/micro-ui-internals/package.json b/micro-ui/web/micro-ui-internals/package.json index fdf1944b39b..64820c8931b 100644 --- a/micro-ui/web/micro-ui-internals/package.json +++ b/micro-ui/web/micro-ui-internals/package.json @@ -63,7 +63,7 @@ "dependencies": { "lodash": "4.17.21", "microbundle-crl": "0.13.11", - "@egovernments/digit-ui-react-components": "1.8.0-beta.4", + "@egovernments/digit-ui-react-components": "1.8.0-beta.5", "react": "17.0.2", "react-dom": "17.0.2", "react-hook-form": "6.15.8", diff --git a/micro-ui/web/micro-ui-internals/packages/modules/core/package.json b/micro-ui/web/micro-ui-internals/packages/modules/core/package.json index 33a5ade4936..7bb34c1ebb1 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/core/package.json +++ b/micro-ui/web/micro-ui-internals/packages/modules/core/package.json @@ -14,7 +14,7 @@ "prepublish": "yarn build" }, "dependencies": { - "@egovernments/digit-ui-react-components": "1.8.0-beta.4", + "@egovernments/digit-ui-react-components": "1.8.0-beta.5", "react": "17.0.2", "react-dom": "17.0.2", "react-i18next": "11.16.2", diff --git a/micro-ui/web/micro-ui-internals/packages/modules/dss/package.json b/micro-ui/web/micro-ui-internals/packages/modules/dss/package.json index f62ee5d0666..b7549ed22fb 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/dss/package.json +++ b/micro-ui/web/micro-ui-internals/packages/modules/dss/package.json @@ -18,7 +18,7 @@ "react-router-dom": "5.3.0" }, "dependencies": { - "@egovernments/digit-ui-react-components": "1.8.0-beta.4", + "@egovernments/digit-ui-react-components": "1.8.0-beta.5", "jsonpath": "^1.1.1", "react": "17.0.2", "react-date-range": "1.3.0", diff --git a/micro-ui/web/micro-ui-internals/packages/modules/utilities/package.json b/micro-ui/web/micro-ui-internals/packages/modules/utilities/package.json index 076215fddc8..9ad9601ed7d 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/utilities/package.json +++ b/micro-ui/web/micro-ui-internals/packages/modules/utilities/package.json @@ -19,7 +19,7 @@ }, "dependencies": { "@cyntler/react-doc-viewer": "1.10.3", - "@egovernments/digit-ui-react-components": "1.8.0-beta.4", + "@egovernments/digit-ui-react-components": "1.8.0-beta.5", "react": "17.0.2", "react-date-range": "^1.4.0", "react-dom": "17.0.2", diff --git a/micro-ui/web/micro-ui-internals/packages/modules/workbench/package.json b/micro-ui/web/micro-ui-internals/packages/modules/workbench/package.json index d5cd3e64db5..a8bc2374915 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/workbench/package.json +++ b/micro-ui/web/micro-ui-internals/packages/modules/workbench/package.json @@ -18,7 +18,7 @@ "react-router-dom": "5.3.0" }, "dependencies": { - "@egovernments/digit-ui-react-components": "1.8.0-beta.4", + "@egovernments/digit-ui-react-components": "1.8.0-beta.5", "@rjsf/core": "5.10.0", "@rjsf/utils": "5.10.0", "@rjsf/validator-ajv8": "5.10.0", diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/README.md b/micro-ui/web/micro-ui-internals/packages/react-components/README.md index fa408bcea4c..1eed882a084 100644 --- a/micro-ui/web/micro-ui-internals/packages/react-components/README.md +++ b/micro-ui/web/micro-ui-internals/packages/react-components/README.md @@ -88,6 +88,7 @@ Syntax for the FormComposersV2 # Changelog ```bash +1.8.0-beta.5 added file type excel in multiUploadWrapper 1.8.0-beta.4 republished 1.8.0-beta.3 republished due to some issues 1.8.0-beta.2 Added Some icons for pqm dashboard diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/package.json b/micro-ui/web/micro-ui-internals/packages/react-components/package.json index 53f0882baec..2bace39727c 100644 --- a/micro-ui/web/micro-ui-internals/packages/react-components/package.json +++ b/micro-ui/web/micro-ui-internals/packages/react-components/package.json @@ -1,6 +1,6 @@ { "name": "@egovernments/digit-ui-react-components", - "version": "1.8.0-beta.4", + "version": "1.8.0-beta.5", "license": "MIT", "main": "dist/index.js", "module": "dist/index.modern.js", diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/MultiUploadWrapper.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/MultiUploadWrapper.js index 6cca7471a71..a5d27397003 100644 --- a/micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/MultiUploadWrapper.js +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/MultiUploadWrapper.js @@ -54,7 +54,7 @@ const checkIfAllValidFiles = (files, regex, maxSize, t, maxFilesAllowed, state) } // can use react hook form to set validations @neeraj-egov -const MultiUploadWrapper = ({ t, module = "PGR", tenantId = Digit.ULBService.getStateId(), getFormState, requestSpecifcFileRemoval, extraStyleName = "", setuploadedstate = [], showHintBelow, hintText, allowedFileTypesRegex = /(.*?)(jpg|jpeg|webp|aif|png|image|pdf|msword|openxmlformats-officedocument)$/i, allowedMaxSizeInMB = 10, acceptFiles = "image/*, .jpg, .jpeg, .webp, .aif, .png, .image, .pdf, .msword, .openxmlformats-officedocument, .dxf", maxFilesAllowed, customClass="", customErrorMsg,containerStyles }) => { +const MultiUploadWrapper = ({ t, module = "PGR", tenantId = Digit.ULBService.getStateId(), getFormState, requestSpecifcFileRemoval, extraStyleName = "", setuploadedstate = [], showHintBelow, hintText, allowedFileTypesRegex = /(.*?)(jpg|jpeg|webp|aif|png|image|pdf|msword|openxmlformats-officedocument|xls|xlsx|openxmlformats-officedocument|wordprocessingml|document|spreadsheetml|sheet|ms-excel)$/i, allowedMaxSizeInMB = 10, acceptFiles = "image/*, .jpg, .jpeg, .webp, .aif, .png, .image, .pdf, .msword, .openxmlformats-officedocument, .dxf, .xlsx, .xls, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", maxFilesAllowed, customClass="", customErrorMsg,containerStyles }) => { const FILES_UPLOADED = "FILES_UPLOADED" const TARGET_FILE_REMOVAL = "TARGET_FILE_REMOVAL" diff --git a/micro-ui/web/package.json b/micro-ui/web/package.json index 3e0daf5bd75..8a45b9b9f0b 100644 --- a/micro-ui/web/package.json +++ b/micro-ui/web/package.json @@ -22,7 +22,7 @@ "@egovernments/digit-ui-module-hrms": "1.8.0-beta.3", "@egovernments/digit-ui-module-utilities": "1.0.0-beta.3", "@egovernments/digit-ui-module-engagement": "1.5.20", - "@egovernments/digit-ui-react-components": "1.8.0-beta.4", + "@egovernments/digit-ui-react-components": "1.8.0-beta.5", "babel-loader": "8.1.0", "clean-webpack-plugin": "4.0.0", "react": "17.0.2", diff --git a/micro-ui/web/workbench/inter-package.json b/micro-ui/web/workbench/inter-package.json index e6aa74603f4..a9b311b314f 100644 --- a/micro-ui/web/workbench/inter-package.json +++ b/micro-ui/web/workbench/inter-package.json @@ -60,7 +60,7 @@ "dependencies": { "lodash": "4.17.21", "microbundle-crl": "0.13.11", - "@egovernments/digit-ui-react-components": "1.8.0-beta.4", + "@egovernments/digit-ui-react-components": "1.8.0-beta.5", "react": "17.0.2", "react-dom": "17.0.2", "react-hook-form": "6.15.8", diff --git a/micro-ui/web/workbench/package.json b/micro-ui/web/workbench/package.json index 5c5c2f516d0..02e61714b81 100644 --- a/micro-ui/web/workbench/package.json +++ b/micro-ui/web/workbench/package.json @@ -19,7 +19,7 @@ "@egovernments/digit-ui-module-core": "1.8.0-beta.14", "@egovernments/digit-ui-module-hrms": "1.8.0-beta.3", "@egovernments/digit-ui-module-utilities": "1.0.0-beta.3", - "@egovernments/digit-ui-react-components": "1.8.0-beta.4", + "@egovernments/digit-ui-react-components": "1.8.0-beta.5", "babel-loader": "8.1.0", "react": "17.0.2", "react-dom": "17.0.2", From 26a0524ca05f418b6e234d94cada6a825d3b25f3 Mon Sep 17 00:00:00 2001 From: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> Date: Wed, 10 Jan 2024 16:12:05 +0530 Subject: [PATCH 50/80] 1.0.0-beta.13 Added new role to support hcm localisation create --- micro-ui/web/core/package.json | 2 +- micro-ui/web/micro-ui-internals/example/package.json | 2 +- .../micro-ui-internals/packages/modules/workbench/README.md | 3 ++- .../micro-ui-internals/packages/modules/workbench/package.json | 2 +- .../modules/workbench/src/configs/searchLocalisationConfig.js | 2 +- .../modules/workbench/src/pages/employee/LocalisationSearch.js | 2 +- micro-ui/web/package.json | 2 +- micro-ui/web/workbench/package.json | 2 +- 8 files changed, 9 insertions(+), 8 deletions(-) diff --git a/micro-ui/web/core/package.json b/micro-ui/web/core/package.json index 4a705c5e901..06df31ee729 100644 --- a/micro-ui/web/core/package.json +++ b/micro-ui/web/core/package.json @@ -16,7 +16,7 @@ "homepage": "/core-ui", "dependencies": { "@egovernments/digit-ui-libraries": "1.8.0-beta.2", - "@egovernments/digit-ui-module-workbench": "1.0.0-beta.12", + "@egovernments/digit-ui-module-workbench": "1.0.0-beta.13", "@egovernments/digit-ui-module-core": "1.8.0-beta.14", "@egovernments/digit-ui-module-hrms": "1.8.0-beta.3", "@egovernments/digit-ui-module-utilities": "1.0.0-beta.3", diff --git a/micro-ui/web/micro-ui-internals/example/package.json b/micro-ui/web/micro-ui-internals/example/package.json index 6e81473c85f..4e2199b3d80 100644 --- a/micro-ui/web/micro-ui-internals/example/package.json +++ b/micro-ui/web/micro-ui-internals/example/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "@egovernments/digit-ui-libraries": "1.8.0-beta.2", - "@egovernments/digit-ui-module-workbench": "1.0.0-beta.12", + "@egovernments/digit-ui-module-workbench": "1.0.0-beta.13", "@egovernments/digit-ui-module-dss": "1.8.0-beta.2", "@egovernments/digit-ui-module-core": "1.8.0-beta.14", "@egovernments/digit-ui-module-common": "1.8.0-beta.1", diff --git a/micro-ui/web/micro-ui-internals/packages/modules/workbench/README.md b/micro-ui/web/micro-ui-internals/packages/modules/workbench/README.md index 8517f58fc59..93b45c09386 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/workbench/README.md +++ b/micro-ui/web/micro-ui-internals/packages/modules/workbench/README.md @@ -103,7 +103,8 @@ https://github.com/egovernments/DIGIT-OSS/pull/99/commits/6e711bdc005c226c7debd5 ### Changelog ```bash -1.0.0-beta.12 Added customisable label for custom dropdown through workbench ui schema +1.0.0-beta.13 Added new role to support hcm localisation create +1.0.0-beta.13 Added customisable label for custom dropdown through workbench ui schema 1.0.0-beta.11 Added customisable label for custom dropdown through workbench ui schema 1.0.0-beta.10 fixed the dropdown undefined issue 1.0.0-beta.9 Added new role to support hcm manage masters diff --git a/micro-ui/web/micro-ui-internals/packages/modules/workbench/package.json b/micro-ui/web/micro-ui-internals/packages/modules/workbench/package.json index a8bc2374915..ae2499020d4 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/workbench/package.json +++ b/micro-ui/web/micro-ui-internals/packages/modules/workbench/package.json @@ -1,6 +1,6 @@ { "name": "@egovernments/digit-ui-module-workbench", - "version": "1.0.0-beta.12", + "version": "1.0.0-beta.13", "description": "Workbench", "main": "dist/index.js", "module": "dist/index.modern.js", diff --git a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/configs/searchLocalisationConfig.js b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/configs/searchLocalisationConfig.js index b4b4f506e5e..89993b26f68 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/configs/searchLocalisationConfig.js +++ b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/configs/searchLocalisationConfig.js @@ -2,7 +2,7 @@ export const Config = { label: "WBH_SEARCH_LOCALISATION", type: "search", actionLabel: "WBH_ADD_LOCALISATION", - actionRole: "EMPLOYEE", + actionRoles: ["MDMS_ADMIN","EMPLOYEE","CAMPAIGN_ADMIN","LOC_ADMIN"], actionLink: "workbench/add-localisation", apiDetails: { serviceName: "/wms/individual/_search", diff --git a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/LocalisationSearch.js b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/LocalisationSearch.js index e9c08b90fdf..af58cc945be 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/LocalisationSearch.js +++ b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/LocalisationSearch.js @@ -127,7 +127,7 @@ const LocalisationSearch = () => { /> )} */} { - Config && Digit.Utils.didEmployeeHasRole(Config?.actionRole) && + Config && Digit.Utils.didEmployeeHasAtleastOneRole(Config?.actionRoles) && { history.push(`/${window?.contextPath}/employee/${Config?.actionLink}`); diff --git a/micro-ui/web/package.json b/micro-ui/web/package.json index 8a45b9b9f0b..1f6eaf13a87 100644 --- a/micro-ui/web/package.json +++ b/micro-ui/web/package.json @@ -15,7 +15,7 @@ "homepage": "/digit-ui", "dependencies": { "@egovernments/digit-ui-libraries": "1.8.0-beta.2", - "@egovernments/digit-ui-module-workbench": "1.0.0-beta.12", + "@egovernments/digit-ui-module-workbench": "1.0.0-beta.13", "@egovernments/digit-ui-module-dss": "1.8.0-beta.2", "@egovernments/digit-ui-module-core": "1.8.0-beta.14", "@egovernments/digit-ui-module-common": "1.8.0-beta.1", diff --git a/micro-ui/web/workbench/package.json b/micro-ui/web/workbench/package.json index 02e61714b81..32168b0b695 100644 --- a/micro-ui/web/workbench/package.json +++ b/micro-ui/web/workbench/package.json @@ -15,7 +15,7 @@ "homepage": "/workbench-ui", "dependencies": { "@egovernments/digit-ui-libraries": "1.8.0-beta.2", - "@egovernments/digit-ui-module-workbench": "1.0.0-beta.12", + "@egovernments/digit-ui-module-workbench": "1.0.0-beta.13", "@egovernments/digit-ui-module-core": "1.8.0-beta.14", "@egovernments/digit-ui-module-hrms": "1.8.0-beta.3", "@egovernments/digit-ui-module-utilities": "1.0.0-beta.3", From e216bf1db49b2c635c0e9e8349ff76bedbb4e790 Mon Sep 17 00:00:00 2001 From: nabeelmd-eGov <94039229+nabeelmd-eGov@users.noreply.github.com> Date: Wed, 17 Jan 2024 10:36:28 +0530 Subject: [PATCH 51/80] SM-3838: removing harcoded message (#111) * SM-3838: removing harcoded message * SM-3838 package increment * SM-3838 package increment --------- Co-authored-by: nabeelmd-eGov --- micro-ui/web/micro-ui-internals/packages/modules/core/README.md | 1 + .../web/micro-ui-internals/packages/modules/core/package.json | 2 +- .../packages/modules/core/src/components/Dialog/LogoutDialog.js | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/micro-ui/web/micro-ui-internals/packages/modules/core/README.md b/micro-ui/web/micro-ui-internals/packages/modules/core/README.md index f18bd493f8c..acbab6e9424 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/core/README.md +++ b/micro-ui/web/micro-ui-internals/packages/modules/core/README.md @@ -78,6 +78,7 @@ and add its related functions # Changelog ```bash +1.8.0-beta.16 fixed the hardcoded logout message 1.8.0-beta.15 fixed the sidebar sort order issue 1.8.0-beta.14 1.8.0-beta.13 diff --git a/micro-ui/web/micro-ui-internals/packages/modules/core/package.json b/micro-ui/web/micro-ui-internals/packages/modules/core/package.json index 7bb34c1ebb1..02f8fb721db 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/core/package.json +++ b/micro-ui/web/micro-ui-internals/packages/modules/core/package.json @@ -1,6 +1,6 @@ { "name": "@egovernments/digit-ui-module-core", - "version": "1.8.0-beta.15", + "version": "1.8.0-beta.16", "license": "MIT", "main": "dist/index.js", "module": "dist/index.modern.js", diff --git a/micro-ui/web/micro-ui-internals/packages/modules/core/src/components/Dialog/LogoutDialog.js b/micro-ui/web/micro-ui-internals/packages/modules/core/src/components/Dialog/LogoutDialog.js index 0b28ea1a7bd..c36ca264588 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/core/src/components/Dialog/LogoutDialog.js +++ b/micro-ui/web/micro-ui-internals/packages/modules/core/src/components/Dialog/LogoutDialog.js @@ -105,7 +105,7 @@ const LogoutDialog = ({ onSelect, onCancel, onDismiss }) => {
{t("CORE_LOGOUT_WEB_CONFIRMATION_MESSAGE") + " "} - {t("CORE_LOGOUT_MESSAGE")}? + {t("CORE_LOGOUT_MESSAGE")}
From 6bf025b5f68197417849a8655a3a682a5950caf5 Mon Sep 17 00:00:00 2001 From: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> Date: Wed, 17 Jan 2024 14:13:44 +0530 Subject: [PATCH 52/80] Updated all css version to fix compilation --- .../packages/css/package.json | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/micro-ui/web/micro-ui-internals/packages/css/package.json b/micro-ui/web/micro-ui-internals/packages/css/package.json index 4aeb0de5cb1..cfe23230cfe 100644 --- a/micro-ui/web/micro-ui-internals/packages/css/package.json +++ b/micro-ui/web/micro-ui-internals/packages/css/package.json @@ -28,24 +28,24 @@ "tailwindcss": "^1.8.10" }, "devDependencies": { - "autoprefixer": "^10.0.0", - "cssnano": "^4.1.10", - "gh-pages": "^3.1.0", - "gulp": "^4.0.2", - "gulp-clean": "^0.4.0", - "gulp-clean-css": "^4.3.0", - "gulp-livereload": "^4.0.2", - "gulp-postcss": "^9.0.0", - "gulp-rename": "^2.0.0", - "gulp-sass": "^4.1.0", - "postcss": "^8.0.9", - "postcss-cli": "^8.0.0", - "postcss-header": "^2.0.0", - "postcss-import": "^12.0.1", - "postcss-prefixer": "^2.1.2", - "postcss-preset-env": "^6.7.0", - "postcss-scss": "^3.0.1", - "sass": "^1.26.11" + "autoprefixer": "10.4.13", + "cssnano": "5.1.15", + "gh-pages": "3.1.0", + "gulp": "4.0.2", + "gulp-clean": "0.4.0", + "gulp-clean-css": "4.3.0", + "gulp-livereload": "4.0.2", + "gulp-postcss": "9.0.1", + "gulp-rename": "2.0.0", + "gulp-sass": "5.1.0", + "postcss": "8.4.14", + "postcss-cli": "10.1.0", + "postcss-header": "3.0.3", + "postcss-import": "15.1.0", + "postcss-prefixer": "2.1.3", + "postcss-preset-env": "9.3.0", + "postcss-scss": "4.0.9", + "sass": "1.69.5" }, "files": [ "dist/index.min.css", From b4c6c479cedc05d7b389587f793da7ac36152e00 Mon Sep 17 00:00:00 2001 From: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> Date: Mon, 22 Jan 2024 18:04:33 +0530 Subject: [PATCH 53/80] FIxed that css compilation issue --- micro-ui/web/micro-ui-internals/packages/css/gulpfile.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/micro-ui/web/micro-ui-internals/packages/css/gulpfile.js b/micro-ui/web/micro-ui-internals/packages/css/gulpfile.js index 74bc884bf13..17e25e85655 100644 --- a/micro-ui/web/micro-ui-internals/packages/css/gulpfile.js +++ b/micro-ui/web/micro-ui-internals/packages/css/gulpfile.js @@ -15,7 +15,8 @@ const header = require("postcss-header"); const clean = require("gulp-clean"); const postcss = require("gulp-postcss"); -const sass = require("gulp-sass"); +const sass = require('gulp-sass')(require('sass')); + const postcssPresetEnv = require("postcss-preset-env"); const cleanCSS = require("gulp-clean-css"); const rename = require("gulp-rename"); From 656cf4c0446b0a77eafaea8ce4c2d59740b757cc Mon Sep 17 00:00:00 2001 From: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> Date: Tue, 23 Jan 2024 10:07:10 +0530 Subject: [PATCH 54/80] Fixed the css compilation issues --- .../packages/css/gulpfile.js | 2 +- .../packages/css/package.json | 30 +++++++++---------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/micro-ui/web/micro-ui-internals/packages/css/gulpfile.js b/micro-ui/web/micro-ui-internals/packages/css/gulpfile.js index 17e25e85655..5d1a705494a 100644 --- a/micro-ui/web/micro-ui-internals/packages/css/gulpfile.js +++ b/micro-ui/web/micro-ui-internals/packages/css/gulpfile.js @@ -15,7 +15,7 @@ const header = require("postcss-header"); const clean = require("gulp-clean"); const postcss = require("gulp-postcss"); -const sass = require('gulp-sass')(require('sass')); +const sass = require('gulp-sass'); const postcssPresetEnv = require("postcss-preset-env"); const cleanCSS = require("gulp-clean-css"); diff --git a/micro-ui/web/micro-ui-internals/packages/css/package.json b/micro-ui/web/micro-ui-internals/packages/css/package.json index cfe23230cfe..fed2fcf8bf5 100644 --- a/micro-ui/web/micro-ui-internals/packages/css/package.json +++ b/micro-ui/web/micro-ui-internals/packages/css/package.json @@ -22,30 +22,30 @@ ], "style": "./dist/index.css", "dependencies": { - "node-sass": "^4.14.1", - "normalize.css": "^8.0.1", - "postcss-scss": "^3.0.1", - "tailwindcss": "^1.8.10" + "node-sass": "4.14.1", + "normalize.css": "8.0.1", + "postcss-scss": "3.0.5", + "tailwindcss": "1.9.6" }, "devDependencies": { - "autoprefixer": "10.4.13", - "cssnano": "5.1.15", - "gh-pages": "3.1.0", + "autoprefixer": "10.4.14", + "cssnano": "4.1.11", + "gh-pages": "3.2.3", "gulp": "4.0.2", "gulp-clean": "0.4.0", "gulp-clean-css": "4.3.0", "gulp-livereload": "4.0.2", "gulp-postcss": "9.0.1", "gulp-rename": "2.0.0", - "gulp-sass": "5.1.0", - "postcss": "8.4.14", - "postcss-cli": "10.1.0", - "postcss-header": "3.0.3", - "postcss-import": "15.1.0", + "gulp-sass": "4.1.1", + "postcss": "8.4.26", + "postcss-cli": "8.3.1", + "postcss-header": "2.0.0", + "postcss-import": "12.0.1", "postcss-prefixer": "2.1.3", - "postcss-preset-env": "9.3.0", - "postcss-scss": "4.0.9", - "sass": "1.69.5" + "postcss-preset-env": "6.7.1", + "postcss-scss": "3.0.5", + "sass": "^1.26.11" }, "files": [ "dist/index.min.css", From a017563e47857be638e03f9c872a9d5ec3da5c18 Mon Sep 17 00:00:00 2001 From: Bhavya-egov <137176879+Bhavya-egov@users.noreply.github.com> Date: Tue, 23 Jan 2024 11:00:58 +0530 Subject: [PATCH 55/80] HLM-4867 info message in localisation search (#119) --- micro-ui/web/core/package.json | 2 +- .../micro-ui-internals/example/package.json | 2 +- .../micro-ui-internals/packages/css/README.md | 1 + .../packages/css/package.json | 2 +- .../packages/css/src/index.scss | 18 ++++++++++++++++++ .../packages/modules/workbench/README.md | 1 + .../packages/modules/workbench/package.json | 2 +- .../src/pages/employee/LocalisationSearch.js | 5 ++++- micro-ui/web/package.json | 2 +- micro-ui/web/public/index.html | 2 +- micro-ui/web/workbench/package.json | 2 +- 11 files changed, 31 insertions(+), 8 deletions(-) diff --git a/micro-ui/web/core/package.json b/micro-ui/web/core/package.json index 06df31ee729..55791daec9a 100644 --- a/micro-ui/web/core/package.json +++ b/micro-ui/web/core/package.json @@ -16,7 +16,7 @@ "homepage": "/core-ui", "dependencies": { "@egovernments/digit-ui-libraries": "1.8.0-beta.2", - "@egovernments/digit-ui-module-workbench": "1.0.0-beta.13", + "@egovernments/digit-ui-module-workbench": "1.0.0-beta.14", "@egovernments/digit-ui-module-core": "1.8.0-beta.14", "@egovernments/digit-ui-module-hrms": "1.8.0-beta.3", "@egovernments/digit-ui-module-utilities": "1.0.0-beta.3", diff --git a/micro-ui/web/micro-ui-internals/example/package.json b/micro-ui/web/micro-ui-internals/example/package.json index 4e2199b3d80..95d0ecdd5fd 100644 --- a/micro-ui/web/micro-ui-internals/example/package.json +++ b/micro-ui/web/micro-ui-internals/example/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "@egovernments/digit-ui-libraries": "1.8.0-beta.2", - "@egovernments/digit-ui-module-workbench": "1.0.0-beta.13", + "@egovernments/digit-ui-module-workbench": "1.0.0-beta.14", "@egovernments/digit-ui-module-dss": "1.8.0-beta.2", "@egovernments/digit-ui-module-core": "1.8.0-beta.14", "@egovernments/digit-ui-module-common": "1.8.0-beta.1", diff --git a/micro-ui/web/micro-ui-internals/packages/css/README.md b/micro-ui/web/micro-ui-internals/packages/css/README.md index 15b77f8b1c2..1177ba60c8d 100644 --- a/micro-ui/web/micro-ui-internals/packages/css/README.md +++ b/micro-ui/web/micro-ui-internals/packages/css/README.md @@ -42,6 +42,7 @@ frontend/micro-ui/web/public/index.html # Changelog ```bash +1.8.0-beta.20 Added css for info message in localisation screen 1.8.0-beta.19 Improved Bulk Upload and Bulk Upload Toast CSS 1.8.0-beta.18 added bulk upload css 1.8.0-beta.17 fiexed mobile view issue for detail modals diff --git a/micro-ui/web/micro-ui-internals/packages/css/package.json b/micro-ui/web/micro-ui-internals/packages/css/package.json index fed2fcf8bf5..9a24ee0d583 100644 --- a/micro-ui/web/micro-ui-internals/packages/css/package.json +++ b/micro-ui/web/micro-ui-internals/packages/css/package.json @@ -1,6 +1,6 @@ { "name": "@egovernments/digit-ui-css", - "version": "1.8.0-beta.19", + "version": "1.8.0-beta.20", "license": "MIT", "main": "dist/index.css", "author": "Jagankumar ", diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/index.scss b/micro-ui/web/micro-ui-internals/packages/css/src/index.scss index 1bc7479464b..08f093bf10a 100644 --- a/micro-ui/web/micro-ui-internals/packages/css/src/index.scss +++ b/micro-ui/web/micro-ui-internals/packages/css/src/index.scss @@ -787,3 +787,21 @@ input[type="number"] { max-height: 120px; margin-top: 90px; } +.localisation-info { + max-width: 100%; + .info-banner-wrap { + max-width: 100%; + margin: 0%; + margin-bottom: 1rem; + display: flex; + align-items: center; + line-height: unset; + align-content: baseline; + gap: 0.5rem; + height: 5rem; + } +} + +.info-banner-wrap div{ + align-items: center; +} \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/modules/workbench/README.md b/micro-ui/web/micro-ui-internals/packages/modules/workbench/README.md index 93b45c09386..5c164660daf 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/workbench/README.md +++ b/micro-ui/web/micro-ui-internals/packages/modules/workbench/README.md @@ -103,6 +103,7 @@ https://github.com/egovernments/DIGIT-OSS/pull/99/commits/6e711bdc005c226c7debd5 ### Changelog ```bash +1.0.0-beta.14 Added info message in localisation search 1.0.0-beta.13 Added new role to support hcm localisation create 1.0.0-beta.13 Added customisable label for custom dropdown through workbench ui schema 1.0.0-beta.11 Added customisable label for custom dropdown through workbench ui schema diff --git a/micro-ui/web/micro-ui-internals/packages/modules/workbench/package.json b/micro-ui/web/micro-ui-internals/packages/modules/workbench/package.json index ae2499020d4..b69d7e71f96 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/workbench/package.json +++ b/micro-ui/web/micro-ui-internals/packages/modules/workbench/package.json @@ -1,6 +1,6 @@ { "name": "@egovernments/digit-ui-module-workbench", - "version": "1.0.0-beta.13", + "version": "1.0.0-beta.14", "description": "Workbench", "main": "dist/index.js", "module": "dist/index.modern.js", diff --git a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/LocalisationSearch.js b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/LocalisationSearch.js index af58cc945be..a95c44629b4 100644 --- a/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/LocalisationSearch.js +++ b/micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/LocalisationSearch.js @@ -1,4 +1,4 @@ -import { AddFilled, Button, Header, InboxSearchComposer, Loader, Dropdown,Toast,WorkflowModal,ActionBar,SubmitBar } from "@egovernments/digit-ui-react-components"; +import { AddFilled, Button, Header, InboxSearchComposer, Loader, Dropdown,Toast,WorkflowModal,ActionBar,SubmitBar, InfoBanner } from "@egovernments/digit-ui-react-components"; import React, { useState, useEffect, useMemo } from "react"; import { useTranslation } from "react-i18next"; import { useHistory, useParams } from "react-router-dom"; @@ -135,6 +135,9 @@ const LocalisationSearch = () => {
}
+
+ +
{Config &&
- + DIGIT diff --git a/micro-ui/web/workbench/package.json b/micro-ui/web/workbench/package.json index 32168b0b695..20d1e1bd568 100644 --- a/micro-ui/web/workbench/package.json +++ b/micro-ui/web/workbench/package.json @@ -15,7 +15,7 @@ "homepage": "/workbench-ui", "dependencies": { "@egovernments/digit-ui-libraries": "1.8.0-beta.2", - "@egovernments/digit-ui-module-workbench": "1.0.0-beta.13", + "@egovernments/digit-ui-module-workbench": "1.0.0-beta.14", "@egovernments/digit-ui-module-core": "1.8.0-beta.14", "@egovernments/digit-ui-module-hrms": "1.8.0-beta.3", "@egovernments/digit-ui-module-utilities": "1.0.0-beta.3", From 9c7858a487afcb77e3cb75919537f6096d3f1db5 Mon Sep 17 00:00:00 2001 From: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> Date: Tue, 23 Jan 2024 11:15:24 +0530 Subject: [PATCH 56/80] Workbench v1.0 (#121) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Corrected the card css * Update index.html * Added temp solution css fixes (#209) * updated css version * css fixes * css fixes modal (#210) * updated css version * css fixes * Update Modal.js * Update LogoutDialog.js * enhanced the formcomposer with header attribute * added the heading label * Added temp solution css fixes (#209) * updated css version * css fixes * css fixes modal (#210) * updated css version * css fixes * Update Modal.js * Update LogoutDialog.js * enhanced the formcomposer with header attribute * Update FormComposerV2.scss * removed other files * Added and integrated with schema and data apis' for create usecase * fixed loading issue * added toast and dynamic add integration * Update MDMSAdd.js * changes addded for the validation through yup and json schema * Integraeted form with Form from "@rjsf/core" * FOnts updated (#133) * Update FormComposerV2.js * Update FormComposerV2.js * Updated the form behaviour for the create object , array * mdms v2 search screen intial commit (#213) * css fixes * Update LogoutDialog.js * Mdms search v2 initial commit * Fixed State issue * removed external dependencies * Synced up with digit-dev core v2 * Synced up with digit-dev core v2 * updated build pipeline path (#135) Co-authored-by: Harish-egov * fixed some css and changes made to add form * updated css for add * took latest css changes from core-v2 * [DPG-1684] Adding build pipeline for mdms-v2 (#136) * updated the css and fixed the error + card object * v1.2.105 * Added few more conditions and css for delete etc * Update index.html * Workbench :: search screen updated (#216) * css fixes * Update LogoutDialog.js * Mdms search v2 initial commit * Fixed State issue * removed external dependencies * mdms v2 search * Update index.js --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * updated the select compoent and text area added * PFM-4236:: Pie chart denomination and Horizontal bar white spaces fixes (#5691) * PFM-4236:: Pie chart denomination and Horizontal bar white spaces fixes * Updated Read Me * PFM-3778 : Adding changes to handle dynamic mdms config and captcha in login screen (#218) (#140) * PFM-3778 : made changes in login component and formcomposerv2 in order to accept mdms config and captcha component * PFM-3778 : reverting the unnecessary changes in formcomposerV2 * PFM-3778 : removed the duplicate code refarding config in login component * PFM-3778 : added changes in the readme file Co-authored-by: Tulika-eGov <74046137+Tulika-eGov@users.noreply.github.com> * updated back to the old file structure ie ROOT/frontend (#143) * PFM-3778 : Adding changes to handle dynamic mdms config and captcha in login screen (#218) * PFM-3778 : made changes in login component and formcomposerv2 in order to accept mdms config and captcha component * PFM-3778 : reverting the unnecessary changes in formcomposerV2 * PFM-3778 : removed the duplicate code refarding config in login component * PFM-3778 : added changes in the readme file * Delete config.js * updated the folder structure back to root/frontend * added the build config for Frontends, updated build-config.yml (#141) * Updated all the package versions and readme content * dpg 1661: mdms v2 api integration (#145) * fixed search screen add issue * updated the svg pakcgae version * PFM-3778 : updated the MDMS call to handle dynamic loading (#148) * PFM-3778 : updated the MDMS call to handle dynamic loading * PFM-3778 : removed the unwanted code from mdms call * Dgp 1669 view master (#149) * View Master data * corresponding changes for changes in v2 search * Update package.json * Added schema reference type * Update webpack.config.js * Update WorkbenchCard.js * Update package.json * Update searchMDMSConfig.js * updated the localisation code * Update MDMSAddV2.js * Added localisation set and updated the default form validation * localised fields (#152) * fixed the caching issue of view data in add * updated the styling for input fileds on focus and hover * localisation + breadcrumb fix (#154) * v1.2.109 * updated css * Fixed typo in readme.md file (#158) * Fixed core platform repository's readme (#160) * added support for the UI schema and made the support for multiple reference master data * Updated the css for radio and corrected the ui schema * Fixed some stlying issue and updated the form error handling * corrected the remove icon and array alignment * updated the alignment and fixed some logic issues * Solved the x ref for dependency / hierarchy * fixed some dropdown css issue * upgraded css version * Updated the css version * Dpg 1671 edit master data / disable+enable master data (#164) * edit master data * Update MDMSAddV2.js * updated session on url change * updated tenant * Update MDMSEdit.js * Dss bug fixes (#5709) * dss bug fixes pfm-4315 pfm-4311 * updated version * Fixed the alignment and changed the boolean type widget, * Wf centralinstance fix (#170) * Adding changes from Core-Platform to Digit-Core for branch * Modifying pom.xml * WF modifying isTenantIdValid validation logic * Enc centralinstance fix (#171) * ENC-Service adding tenantid in header * ENC-Service adding tenantid in header * ENC-Service adding tenantid in header * Inbox central instance fix (#172) * Updating inbox service with code changes from Core-platform * Updating inbox service with code changes from Digit-dev * Adding code to bypass validation for stakeholder flow (#174) * User otp central instance related changes (#175) * Removed reference to parentlevel (#176) * Added support for string before $ in query params (#177) * added check for '.' before further splitting tenantId and changed if-else structure (#178) * Master upgrade versions central (#179) * Upgrading versions and changelog for central instance merge. * Upgrading versions and changelog for central instance merge. * Upgrading versions and changelog for central instance merge. * Removed duplicate ApplicationProperties (#182) * SM-2880: added responseData for custom component in render field (#183) Co-authored-by: nabeelmd-eGov * DPG-1739 :: Updated the hardcoded messages and css synced with core v2 * updated version * Updated the SVG version * Updated the SVG version * added custom api support * Update MDMSAddV2.js * #UM-6436 added added AMENDMENT business service name (#190) * #UM-6436 added added AMENDMENT business service name * add mdc and updated version * Localisation screens : Search + Add (#187) * localisation search basic * loc add initial commit * Localistion add flow * cleanup * bug fixes dpg-1735 , dpg-1750. * updated css package version * localized one column * added 2 envs * Adding fix for dashboard-analytics (#191) * Update package.json * updated default landing to employee * Fixed DPG-1749 DPG-1751 DPG-1754 issues * dss change for horizontal chart v2 and custom pie chart v2 (#195) * DPG-1754 fixed the data push issue and other alignment issues * Bug fixes nipun + Default value logic in search and add localistaion screens (#199) * default value logic in search screen( need to extract hook to workbench) * default value logic in add localisation screen * Same key validation check in Add Localisation * Added additional breadcrumb for wild search screen * Enabled limit and offset pagination on API call for Search screen * dpg-1747 * switched default value logic in search page Assuming that every message will be there in default locale * Added custom service to Digit + using hook from workbench module * Removed Localisation hook from libraries module * Update LocalisationSearchConfig.js * Bug fixes nipun (#200) * default value logic in search screen( need to extract hook to workbench) * default value logic in add localisation screen * Same key validation check in Add Localisation * Added additional breadcrumb for wild search screen * Enabled limit and offset pagination on API call for Search screen * dpg-1747 * switched default value logic in search page Assuming that every message will be there in default locale * Added custom service to Digit + using hook from workbench module * Removed Localisation hook from libraries module * Update LocalisationSearchConfig.js * Breadcrumb fix for localisations * Added info banner icon for tooltip for default upsert in localisation add * Update UICustomizations.js * css changes * Bug fixes workbench (#202) * disable test checkbox(for view screen) * Added disable logic for custom widgets * Update workbench.scss * disabled add button in view screen * alignment issue fix for array and object type * updated css version * reverted width change (#203) * alignment fixes * updated version * pfm-4442 ui/ux audit changes dashboard * update dss and react-comp version * updated dss * fixed some ux issues and few funtional issues like ref master reload field * #UM-6444 added tenantid in header while api call (#205) * #UM-6444 added mdc * #UM-6444 add mdc at BulkBillGenerationConsumer * #UM-6444 add mdc at BulkBillGenerationConsumer * #UM-6444 add mdc at BulkBillGenerationConsumer * bug fixes * added the delete option to arrays * PFM-4456 : DSS fix for MUKTA fontsize of the line chart and making multilink dropdown clone on outside click (#209) * PFM-4456: updated the react componenet version * PFM-4456 : updated the dss version with new package.json * made the css as 1 rem gap as per design * Revert "made the css as 1 rem gap as per design" fixed the array object padding assuming 2 rem widths * Fixed the styling issues of form screen * incremented the css version * Delete button localisation key added * audit fixes for workbench dpg-1778 (#212) * audit fixes for workbench dpg-1778 * updated css package * dss mukta customisations * code refactoring * update dss and react-component version * Bulk upload feature dpg-1678 (#214) * Update WorkbenchCard.js * Bulk upload feature Handled both use cases: => multiple sheets in excel => multiple modules in any sheet NOTE: Columns with these names must be present ["message","module","local","code"] * Added error handling * updated css version * Added parsing utils in workbench and updated it's location * Build Issue fix for filesystem import error * fixed build issue (#217) * checking * build issue * Update LocalisationAdd.js * Add AttentionListIcon * update react components in dss * AttentionListIcon * update react-components * audit changes * Update localisation feature + some enhancements to InboxSearchComposer (#221) Known issue: table data not updating after upsert success(refetch not working properly) * Bug fixes workbench (#222) * dpg-1780 * dpg-1736 * bug fixes * Updated breadcrumb logic with master & module names (#223) * Updated breadcrumb logic with master & module names * Updated breadcrumbs * updated css package * Update package.json * Updated localisation search hook logic to support refetch properly (#224) * Updated localisation search hook logic to support refetch properly * Update CustomService.js * Update CustomService.js * Update LocalisationAdd.js (#227) * Fixed Build issues (#228) * Update package.json * Update package.json * trying with different import statement * Update index.html * checking with debugger * checking with debug * added debug * trying single sheet result log * test logs * Update LocalisationAdd.js * Update LocalisationAdd.js * converted set to an array * fixed build issue * fixed * Added spinner for add master data * fixed the logic on localisation prefix issue * Update DigitJSONForm.js * v1.2.128 * fixed the text area font issues * added error message * cleaned up the code base * Updated edit localisation flow * Updated package versions for beta release * Update inter-package.json * updated the css package version * Update README.md * Update index.js * updated build commands * updated version * Updated Bulk upload logic since we can upsert multiple modules in one api call(reducing number of calls) (#229) * Updated the readme files * updated the versions * added fix to show the translated options in case of dropdown * updated config for digit-ui * Update App.js * Update package.json * Update index.html * Workbench (#231) * SM-2538: FSM Capacity utilization chart fixes (#5609) * SM-2538: FSM Capacity utilization chart fixes * SM-2538 changes * SM-2538: FSM Capacity utilization chart fixes --------- Co-authored-by: nabeelmd-eGov * PFM-3780::Horizontal Bar chart and Pie chart alignment fixes (#5610) * PFM-3780::Horizontal Bar chart and Pie chart alignment fixes * Updated README.md * Updated dss package.json * Update CODEOWNERS * Pending Bills Count (#5621) * Pending Bills Count * Updated README.md * [DPG-1251] Added custom dynamic filter component for DSS (#5617) * [DPG-1251] Added custom filter component for DSS * [DPG-1251] Added date validation, can not select more then a range * Update dynamicRequestGenerator.js * updated the version * Update README.md * Update README.md * Fixed alignment issues in filter component * Updated the readme files --------- Co-authored-by: Shailesh Pandey Co-authored-by: Nipun Arora * SM-2528: DSS chart tooltip rounding off fixes (#5628) Co-authored-by: nabeelmd-eGov * 1.5.38 :: updated the core component version * added a sample uicustomisationfile for reference * added the build config for the workbench ui * added the build config for the workbench ui (#188) * updated the folder path * removed mono ui * PFM-3740 Show the Toast when password changed and need to logout from profile page (#5637) * Update pom.xml (#190) * SM-2880: FSM Truck Icon fill issue fix and react component package upgrade (#5645) * SM-2880: FSM Truck Icon fill issue fix * SM-2880: Readme update --------- Co-authored-by: nabeelmd-eGov * Corrected the CSS for inbox composers and default core ui * Updated the package versions * Taken the recent fixes https://github.com/egovernments/DIGIT-Dev/commit/bb2173c4fbef4e529df1f85d2396e1237b409b18 https://github.com/egovernments/DIGIT-Dev/commit/567fd8f25543f8a4fd5b4a1885dcf0357ac6e9a1 https://github.com/egovernments/DIGIT-Dev/commit/1186f4c6fe21ada1a602681a219bf07b909c5c1a https://github.com/egovernments/DIGIT-Dev/commit/43f688be31286174f15e9073a7b5c9c4a45bb7bb * Added the Digit-UI-Core (#195) * UM-5258 showing NA of due date when the application is inactive (#4651) * consumercode added to bill with unique constraint (#4653) Co-authored-by: kavi_elrey <25226238+kavi-egov@users.noreply.github.com> * UM-5168 obps notification issues master branch (#4652) * UM-5168 adding logs * UM-5161 adding receipt download button in event notif, fixing email format and placeholder issue * UM-5168 adding changes for links of payment, receipt download, download permit order, download OC * UM-5168 edit variable name * UM-5168 adding url shortened links * UM-5168 changing business service acc to payment for receipt fetching * UM-5168 adding fee business service for DOC_VERIFICATION_INPROGRESS & APPROVED status for fetching receipts. * UM-5168 adding changes for link replacement * UM-5168 adding fee business service for PENDING_SANC_FEE_PAYMENT status * UM-5168 improving event notif button's if clauses * UM-5168 modifying logs, removing constant * UM-5213 TL::Report Issues (#4655) * [UM-5215,5257,5258] : WS unmasking using the user call for bill payment using pay now link, cache issue fix in bill genie (#4656) * UM-5215: corrected the codition for usecustomAPIHook to incorporate data as well as params (#4657) * UM-5168 modifying logs, removing constant (#4659) * UM-5285 PT:: PT Assessment : Payment button is not enabled. (#4660) * asdasd * UM-5285 PT:: PT Assessment : Payment button is not enabled. * UM-5285 PT:: PT Assessment : Payment button is not enabled. * [UM-5238-5239-5240]-Added oldDataEncryption failure tolerance (#4629) * Added oldDataEncryption failure tolerance * Update * Updated Property row mapper * [UM-5161]- Notifications update for W&S (#4637) * [UM-5161]- Notifications update for W&S * Removed commented code & updated isSearchInternal val in getConnectionforUpdate * Updated payment receipt link and removed additional criteria setting * Update * Removed conflicts * Updated param isOldDataEncryption with isOldDataEncryptionRequest * Updated null check validations & added preparedStatements in queries * [UM-5260] : fix for sewerage interchanging of value of proposed disconnection date and connection execution date also added no data card in cancel bill (#4662) * UM-4940 Bill Genie :: Employee :: Group Bills :: Couldnt merge and download all bills in search result. (#4663) * 5270 - umansked bill pi data (#4664) * UM-5290 TL Reports :: UI audit issues (#4665) * [UM-5287,UM-5291] : WS Bills bread crumb issue fixed and modify details issue fixed (#4666) * WnS Calculator changes for notifications (#4667) * [UM-5284]-Updated edit notif,send back notif issues, added plumber decryption (#4661) * Updated edit notif,send back notif issues, added plumber decryption * Removed Plumber decryption from edit Notification flows * UM-5290 OBPS hot fix. (#4668) * UM-5290 OBPS hot fix. * Incremented the Version of OBPS * [UM-5287] : WS & Bill genie Breadcrumbs issue fixed (#4669) * UM-5284 Citizen role condition check added for notification (#4671) * UM-5284 Citizen notification changes * UM-5284 Citizen role condition check for notification * Removed decrypt call from editnotification consumer * Removed decrypt code from editnotification fro water and sewerage * unamsking bill bug fix (#4672) Co-authored-by: kavi_elrey <25226238+kavi-egov@users.noreply.github.com> * [UM-5284]Updated Plumber placerholders, removed notif for demand gen for emp (#4674) * Updated Plumber placerholders, removed notif for demand gen for emp * Plumb changed * migration file renamed (#4676) * UM-5301 : TL updated the mdms and validation condition in units (#4675) * UM-5301 : TL updated the mdms and validation condition in units * UM-5301 : Created new component for inital units code logic * Pay now link changed (#4677) * Master 5270 (#4678) * migration file renamed * migration file fix * UM-5301 : TL UI solved the issue of cache value for new application creation (#4728) * UM-5297 OBPS::citizen::After clicking on view applications by citizen redirecting to something went wrong screen (#4729) * Added permanentAddress for unmasking (#4730) * Updated WnS Modify Application validation condition (#4731) * UM-5315, UM-5311 mCollect::Toast message not showing (#4732) * UM-5315, UM-5311 mCollect::Toast message not showing * UM-5315, UM-5311 updated versions * UM-5134 the disconnection calculation change (#4733) * UM-5314 Added effective date from for dicsonnection * UM-5314 Added math absolute for disconnection calculation * UM-5134 Corrected calculation logic for disconnection (#4734) * UM-5134 Changed the condition for calculation * UM-5314 corrected the calculation logic * UM-5314 chnaged demand search url param * UM-5314 Changed the billing service ulr params fro demand search * Resolved calculation logic for disconnection * Changed the name of constant status * UM-5314 Changed the constant name of the status * Support for (#4742) amendmentreason,reasondocumentnumber,effectivefrom,effectivetill in amendmentUpdateRequest * [UM-5313]-Added changes for AmendmentUpdate query (#4744) * Added changes for AmendmentUpdate query * Update * Update CODEOWNERS * Update CODEOWNERS * Update CODEOWNERS * Update CODEOWNERS * Update CODEOWNERS * [UM-5320]-WnS Payment Notifications For Disconnection (#4749) * WnS Payment Notifications For Disconnection * SW Payment Notif update * Comments updated for condition * Update CODEOWNERS * Update CODEOWNERS * UM-5339,UM-5323, UM-5324 hot fixes (#4753) * [UM-5280]-Changed DonloadReceipt links for notifications (#4754) * Update CODEOWNERS * Update CODEOWNERS * UM-5357, UM-5325 W&S :: Resubmit is not working for WnS new connection (#4760) * UM-5349 W&S :: Connections additional details are not reflected on Citizen (#4762) * [UM-5330,UM-5329,UM-5326,UM-5346] : TL UI employee and citizen, new application and renewal bug fixes (#4769) * Added isAudit condition for property search decryption condition (#4768) * Updated search for consumerCode (#4771) * [UM-5328]-Changes for WnS email notifications. (#4761) * Changes for WnS email notifications. 1.) The email notifications are triggering as expected 2.) Notification/sms/mail is being triggered for the 0 amount in disconnection 3.) If the amount of demand generated or meter reading is added to be collected, then that has to be redirected to my bills -->Bill details ( but it's redirecting to the applications page) * Updated receipt link * Updated application download link with application details link * Removed commented code. * Updated message template for payment email notif * UM-5334 inbox api failing when trying to search for invalid applications (#4767) * UM-5334 replacing stream with for loop for empty processinstance search results. * UM-5345 changing class type * UM-5345 adding null check above for loop * UM-5345 removing comments and empty check for process instance * UM-5345 refractoring code * Updated open rowmapper (#4774) * UM-5345 sending notification for only primary owner (#4764) * Updated connectiondetails old UI link to new UI link (#4775) * UM-5335 moving unique mobileno validation above enrichment call (#4776) * UM-5335 moving unique mobileno validation above enrichment call * UM-5335 moving unique mobileno validation above enrichment call * UM-5333, UM-5344 OBPS::Not showing the application details proper after stake holder registration (#4777) * [UM-5329,UM-5348,UM-5363] : TL fixes for units and acessories for create and renewal flow (#4778) * UM-5333 updated versions of obps (#4779) * UM-5333 OBPS::Not showing the application details proper after stake holder registration (#4780) * UM-5333 updated versions of obps * UM-5333 OBPS::Not showing the application details proper after stake holder registration * Notif ws issues resolved (#4782) * Conditon for 0 payment bill generation * Notif links and disconn edit template issue resolved * [UM-5329,UM-5337,UM-5349] : WS TL UI fixes, billing slab error fixes and connection details changes (#4781) * UM-5327 Disconnection Calculation changes (#4763) * UM-5327 Added the code for disconnection demand creation * UM-5327 Added decimal value in condition * UM-5327 Added else if condition for disconnection demand generation * UM-5327 Changed demand search url for disconnection * UM-5327 Demand generate changes * UM-5327 Added the demand generation calculations for sewerage Co-authored-by: hinamakhija-eGov * Changed the metered billing code for disconnection (#4783) * UM-5458, UM-5470 OBPS::citizen:: showing applications which were created with another number (#4784) * UM-5458 Updated OBPS version (#4788) * Added division logic (#4785) * UM-5458 Updated OBPS versions (#4789) * [UM-5326] : fixed the address component when redirection from property in TL and employee billing slab issue fix while renewal (#4787) * [UM-5332,UM-5459,UM-5445,UM-5480] : PT mutation transferror details fix in check page,OBPS cache issue in bpareg in obps, WS disconnection payment update fix for partial payment, TL fix for workflow documents no present in citizen side (#4790) * UM-5361 : TL accessory input fix while renewal (#4795) * OBPS version upgraded. (#4793) * OBPS version upgrated. * OBPS version updated * [UM-5459,UM-5477,UM-5482] : OBPS Issue rerading worflow timeline, alignment issue in inbox and cache issue are fixed (#4797) * UM-5482 : OBPS Increment version and removed extra console.log (#4803) * Added exception for division logic (#4798) * UM-5489 OBPS & TL:: Report issues (#4806) * [UM-5501,UM-5496] : PGR style issue fixed and obps edit issues fixed for locality (#4807) * [UM-5496,UM-5497,5504] : TL create flow fixes and obps fix for pincode and oc and permit flow (#4809) * UM-5489 OBPS & TL:: Report issues (#4810) * UM-5489 OBPS & TL:: Report issues * UM-5489 OBPS & TL:: Report issues * UM-5489 OBPS & TL:: Report issues (#4813) * [UM-5505,UM-5506] : TL UI fixes for create and renewal (#4815) * [UM-5523,UM-5524,UM-5525,UM-5508] : TL fixes for renewal flow and ws fixes (#4816) * [UM-5524,UM-5526] : TL renewal fixes corrosponding to property and ot… (#4821) * [UM-5524,UM-5526] : TL renewal fixes corrosponding to property and other small fixes * TL Renewal undefined error fix * Calculation update for final charges of W&S disconnection applications (#4824) * UM-5526 : TL fixes for renewal and edit flow from send back from DV (#4825) * UM-5531 OBPS::showing incorrect architect name (#4826) * asasdsad * UM-5531 OBPS::showing incorrect architect name * [UM-5012] : TL UI consumer number integration in inbox (#4828) * Added null checks to Property owner details (#4829) * Updating the select street component from fsm to tl (#4831) * TL Fix for build in components (#4833) * UM-5477 OBPS:: Inbox Application status option not showing the count and not aligned proper (#4834) * UM-5477 OBPS:: Inbox Application status option not showing the count and not aligned proper * UM-5477 OBPS:: Inbox Application status option not showing the count … * Removed Sewerage cess from sewerage disconnection calculation (#4835) * [UM-5012] : added consumer field to bill amendment screen and send back to citizen fixes for TL (#4840) * TL WS fix for send back to citizen and pdf issue (#4842) * [UM-5337,UM-5356] : OBPS fix related to edit if edcr search and 3rd and 4th fix for product sepcific pages (#4847) * [UM-5548,UM-5543,UM-5545] : OBPS alignment and tl renewal issue fix (#4849) * UM-5524 : TL fix for citizen renewal property change and routing (#4859) * [UM-5556,UM-5557] : TL application type update for search result, consumer code change from cronsumer number in Bill Amendment inbox, WS adding of scroll bar in inbox (#4863) * updated consumerCode param for Bill Amendment inbox (#4866) * TL UI fix for edit renewal in citizen side (#4871) * OBPS:StakeHolders Notifications-Event and Email Notifications Changes (#4880) * [UM-5539] : WS APK issues employee side and tl renewal issue (#4881) * UM-5536 TL:Reports::when searching TL Reports screen getting stuck & taking a long time to get search results and navigating to other report screens * UM-5536 :: Fixed Report issue loading issue , incorporated the TL Pending report Elapsed time red color column and show NA if value is null and - in case of Number Null * UM-5531 OBPS::showing incorrect architect name (#4885) * #SM-1705 provision to dso to create application with his number (#4887) * #SM-1705 Submitted applications from ULB side do not show at FSTP account * #SM-1688 and #SM-1705 given provision to dso to create application as a citizen * UM-5536 adding payment link replacement in email notif (#4886) * [UM-5539] : WS APK alignment fix and mobile number redirection (#4889) * [UM-5568] - Updated Payment notifications logic to fetch emails using uuids (#4890) * changed code for payment notifications * Update * Updated Payment notif logic for Sewerage flow * _encryptOldData update- added support for tenantIds search (#4891) * Added tenantId support for oldDataEncryption service. * Updated mdms state search method * Updated finalList response of property and sewerage. * Removed splitting of tenantId in mdms search * Added check for plumberInfo for modify and disconnection flows (#4896) * UM-5570, UM-5573, UM-5575 OBPS::APK::stakeholder flow UI issues (#4897) * [UM-5539,UM-5560,UM-5564] : WS Product Specific pages and Bill Amendm… (#4899) * [UM-5539,UM-5560,UM-5564] : WS Product Specific pages and Bill Amendment APK issues fixes * Update useInboxMobileCardsData.js * SM-1134: UAT Blank page is displayed when FSTPO clicks on Add New Vehicle Entry (#4898) Co-authored-by: nabeelmd-eGov * UM-5511, UM-5536 :: Report loading issue, localisation prefix issue , application status custom logic added * UM-5575 OBPS::APK::Alignment issues in permit & OC flows (#4902) * UM-5511 : Report localisation issue fix to work even with no localisationPrefix * [UM-5539,UM-5560] : WS phone number redirection in apk, & product sepcific pages down arrow alignment (#4904) * enc missing flow fix (#4905) Co-authored-by: kavi_elrey <25226238+kavi-egov@users.noreply.github.com> * UM-5575 updated css version (#4906) * [UM-5565,UM-5539] : WS Fixes in bill amendment and PT fixes in APK (#4907) * [UM-5565,UM-5539] : WS Fixes in bill amendment and PT fixes in APK * TL alignment fix in create screen * UM-5575 OBPS APK issues (#4910) * [UM-5579] - Fuzzy search fix (#4908) * Added data push to fuzzy topic * Push data for fuzzy search * PT fuzzy search url changed * Updated fuzzy search data push for _create api * [UM-5539,UM-5584] : bill amendment amount fix and scrolling fix in inbox tl (#4911) * Added decryption for pt fuzy search (#4912) * UM-5539 : Redirection of mobile number after unmasking (#4914) * [UM-5603,UM-5539] : Bill Amendment removed the redirection link from inbox and redirection of mobile number fix (#4915) * UM-5600 Missing localisation key_permit conditions (#4916) * UM-5600 Missing localisation key_permit conditions (#4917) * UM-5600 Missing localisation key_permit conditions * UM-5600 Missing localisation key_permit conditions * [UM-5607] : able to delete right question, survey details fix (#4920) * [UM-5613] : Survey UI fix for multiple and checkbox option in hindi (#4921) * [UM-5607] : survey edit screen different question (#4922) * UM-5598 removing static URLs from Inapp Notifications for OBPS and Stakeholder Flow (#4913) * UM-5598 removing static links from obps inapp notifications * UM-5598 removing static links from obps stakeholder inapp notifications * UM-5598 adding action button for Portal link * UM-5598 adding action button for Portal link * [UM-5611,UM-5356] : Survey fix for owner in result view and channel from citizen side * UM-5572 :: Download issue fix for download certificate * UM-5592 OBPS and NOC hot fixes (#4930) * [UM-5620,UM-5621] : Survey UI employee side fixes (#4931) * [UM-5620,UM-5621] : Survey UI employee side fixes * [UM-5620] : survey UI updated the width for dropdown question * Update HomePageWrapper.scss Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * UM-5594, UM-5622, UM-5593 eDCR search_disabled if wrong value is entered (#4932) * UM-5596, UM-5622 fire NOC::Issues in create application (#4933) * UM-5622 fire NOC::Issues in create application (#4934) * Initial commit * formatted * deleted micro-ui * moved the core micro ui * Update index.html * Update package.json * Update package.json * removed works * DPG-1197 :: Core Update Password Update index.js (#4938) updated the url for change password * Update index.js * Updated the core Digit ui Version * Update Dockerfile * corrected all the package versions and cleanedup lib and core * fixed other component and import issues * fix for local compile issue * Added other core modules hrms enagagement common(payment) * set default landing as optional * Updated the core package to provide defaultLanding option * updated the localisations and incremented the core versions * UM-5800 Core UI::HRMS Create, View screen issues (#5200) * UM-5800 Core UI::HRMS Create, View screen issues (#5202) * updated the hrms package version * incremented core to 1.5.9 for dynamic sidebar icon support * updated package for react components * Incremented the core package for sidebar component update * Update index.js * Added custom logic to throw error on employee login if invalid roles were present in user response * Revert the sidebar child * Sidebar child issues fixed * Updated hrms UI of assignment Card * fixed some core issues in digit-ui raised in PFM-works * Digit UI css version added for core 1.5.21 (#5518) * Added a base variant * added * Update package.json * Fixed the side bar issues * Common Module Latest changes push (#5521) * Common Module Latest changes push * Update package.json --------- Co-authored-by: nabeelmd-eGov Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * Fixes for Sanitation UI * Added FSM .env changes * Updated common package * added pointer to resend otp * [PFM-3338,PFM-3328] :: Hrms mukta fix (#5530) [PFM-3338,PFM-3328] : HRMS fixes for the deactivate employee popup and table css and dropdowns in create page * SM-1970: Receipt Number Issue fix (#5531) * SM-1970: Receipt Number Issue fix * SM-1970: Receipt Number Issue fix --------- Co-authored-by: nabeelmd-eGov * Update package.json * SM-1970:Added patches for trim and update the package by +1 (#5532) * SM-1970:Added pacthes for trim and updat dthe package by +1 * SM-1970:FIxed identation * Update package.json * Update package.json * PFM-3334 : Deactivation & activation fixes for HRMS (#5535) * updated hrms package fix * 1.5.30 fixed the home routing issue in error screen and added the readme file * dss-1.5.21 added readme for dss * Update package.json * dss-1.5.22 :: corrected the readme template * hrms-1.5.24 :: added the readme file * Added the latest Utiltites module and updated the react components to have inbox and formcomposer of v2 (#5548) * Added Utilities module in core to have Inbox and Formcomposer screens * added new formcomposer * added the latest changes to inbox composer and form composer * Added additional libraries * Integarted and published the Utilities module * Added readme for css and updated the version (#5550) * Added Utilities module in core to have Inbox and Formcomposer screens * added new formcomposer * added the latest changes to inbox composer and form composer * Added additional libraries * Integarted and published the Utilities module * Update package.json * Added readme for UI Css * SM-2466:Removed back button for citizen home card sanitation-ui (#5549) * SM-2466:Removed back button for citizen home card sanitation * core :.1.5.31: updated the package version --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * SM-2420: Added missing t for digit and updated package version (#5552) * SM-2420: Added missing t for digit and updated package version * SM-2420: Updated core package.json & readme * PFM-3346 : CORE UI added the translation method for error codes and l… (#5551) * PFM-3346 : CORE UI added the translation method for error codes and label * PFM-3346 : updated version in package and updated the readme file --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * Create README.md * Update package.json * added the missing imports required for the inbox search composers (#5557) * added a new module * added all missing customisation changes * corrected the import issues * added the latest css changes * removed mukta customistion * Update package.json * updated the css versions * SM-2420:Updated package.json & readme (#5556) * fixed some of the core related issues * 1.5.34 fixed module not found redirection issue * updted the directory (#5562) * updated the directory (#5563) * updted the directory * updated back to utilities * utilities-0.0.3:: updated the directory * utilities-0.0.5:: Updated the depency issues and corrected the utility package dependency issues * Updated all the imports * Added the environment file of UPYOG * dss: 1.5.23 updated the routes in the dss module to have dynamic base context path * SM-2517:Added pacthes for email prefilled, Updated package.json, updated readme (#5587) * Update package.json * Update package.json * Update index.js * Fixed the dss loading issue * added new module for dss localisation * PFM-3498:: New Metric component to show the KPI's in horizontal way (#5594) * PFM-3498:: New Metric component to show the KPI's in horizontal way * Updated lastUpdatedTime to Count * PFM-3498 :: fixed the metric horizontal fixes and other css * Update README.md --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * Horizontal bar mukta (#5596) * Added horizontal Bar chart for mukta * updated key * Added LabelList * Updated version and readme * Update README.md * Update publish.sh * PFM-3498::Alignment fixes for metric chart (#5597) * PFM-3498:: Alignment fixes for metric chart * Updated README.md * PFM-3498 :: added the support for the Metric to have the icon component * PFM-3780:: Metric Chart Tooltip, and Horizontal Bar chart alignment f… (#5600) * PFM-3780:: Metric Chart Tooltip, and Horizontal Bar chart alignment fixes * Updated README.md * 1.5.27 DSS UI alignment fixes for Horizontal Metric and bar chart (#5601) --------- Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com> * SM-2662/SM-2663/SM-2664: FSM Payment screen date validation, card validation cheque validation fixes. (#5599) * SM-2662/SM-2663/SM-2664: FSM Payment screen date validation, card validation cheque validation fixes. * common package version upgrade and readme file update * readme file update --------- Co-authored-by: nabeelmd-eGov * Pie chart enhancement (#5603) * Enhanced pieChart component to have another variant according to mukta requirements * Update package.json * Added flag as variant * Incremented dss version * Update README.md * SM-2692: fixed after clicking on change password and then try to save… (#5605) SM-2692: fixed after clicking on change password and then try to save profile without changing password showing error. Co-authored-by: nabeelmd-eGov * PFM-3780::Horizontal Bar chart Alignment fixes (#5606) * PFM-3780::Horizontal Bar chart Alignment fixes * Update README * Update README.md * SM-2692: Fixed hiding upload drawers icon (#5608) * SM-2692: Fixed hiding upload drawers icon * upgrade core package version by 1 --------- Co-authored-by: nabeelmd-eGov * SM-2538: FSM Capacity utilization chart fixes (#5609) * SM-2538: FSM Capacity utilization chart fixes * SM-2538 changes * SM-2538: FSM Capacity utilization chart fixes --------- Co-authored-by: nabeelmd-eGov * PFM-3780::Horizontal Bar chart and Pie chart alignment fixes (#5610) * PFM-3780::Horizontal Bar chart and Pie chart alignment fixes * Updated README.md * Updated dss package.json * Update CODEOWNERS * Pending Bills Count (#5621) * Pending Bills Count * Updated README.md * [DPG-1251] Added custom dynamic filter component for DSS (#5617) * [DPG-1251] Added custom filter component for DSS * [DPG-1251] Added date validation, can not select more then a range * Update dynamicRequestGenerator.js * updated the version * Update README.md * Update README.md * Fixed alignment issues in filter component * Updated the readme files --------- * SM-2528: DSS chart tooltip rounding off fixes (#5628) Co-authored-by: nabeelmd-eGov * 1.5.38 :: updated the core component version * added a sample uicustomisationfile for reference * added the build config for the workbench ui (#188) * updated the folder path * removed mono ui * Taken the recent fixes https://github.com/egovernments/DIGIT-Dev/commit/bb2173c4fbef4e529df1f85d2396e1237b409b18 https://github.com/egovernments/DIGIT-Dev/commit/567fd8f25543f8a4fd5b4a1885dcf0357ac6e9a1 https://github.com/egovernments/DIGIT-Dev/commit/1186f4c6fe21ada1a602681a219bf07b909c5c1a https://github.com/egovernments/DIGIT-Dev/commit/43f688be31286174f15e9073a7b5c9c4a45bb7bb --------- Co-authored-by: vamshikrishnakole-wtt-egov Co-authored-by: nabeelmd-eGov <94039229+nabeelmd-eGov@users.noreply.github.com> Co-authored-by: nabeelmd-eGov Co-authored-by: Tulika-eGov Co-authored-by: Nipun Arora Co-authored-by: Anil Singha <99383116+anilsingha-eGov@users.noreply.github.com> Co-authored-by: Ramkrishna-egov <85437265+Ramkrishna-egov@users.noreply.github.com> Co-authored-by: Shailesh Pandey * added workbench ui build configs * Update build-config.yml * Update build-config.yml * updated the default configs * updated the scripts and versions * Update Dockerfile * Added workbench module * Updated the build comands * corrected the logic * Update index.html * Update index.js * Update WorkbenchCard.js * Integrated Create Employee with session storage * Updated Edit flow accordingly * DPG-1531: Setup & Initialize new svg-component-library (#5644) * DPG-1531: Set Up SVG library * DPG-1531: SVG library setup * DPG-1531: svg library setup * DPG-1531: svg library set up & code clean up * clean up * Update index.html * Update index.html * Update index.html * Update index.html * Update index.html * Update index.html * Update index.html * cleanup * DPG-1531: Initializing svg-component Icons in react-component * Resolving PR issues, update svg readme file and stories * DPG-1531: Initialized stories for all svgs --------- Co-authored-by: nabeelmd-eGov * Revert "DPG-1531: Setup & Initialize new svg-component-library" (#5656) Revert "DPG-1531: Setup & Initialize new svg-component-library (#5644)" This reverts commit 17e43304017cb85b9cffbcbff4e36e83b6a8c8c5. * DPG-1531: Initializing svg-component Icons in react-component (#5657) * DPG-1531: Set Up SVG library * DPG-1531: SVG library setup * DPG-1531: svg library setup * DPG-1531: svg library set up & code clean up * clean up * Update index.html * Update index.html * Update index.html * Update index.html * Update index.html * Update index.html * Update index.html * cleanup * DPG-1531: Initializing svg-component Icons in react-component * Resolving PR issues, update svg readme file and stories * DPG-1531: Initialized stories for all svgs * added minor fixes and changes * removed env * Update build-config.yml * Update preview.js * dist-storybook * Update Dockerfile * Playground enabled and onclick added * corrected the compilation issue * added reference * Updated the story book compilcation * fixed the compilation issue * correceted * corrected for A * updated the ico * removed the compilation issues * Update preview.js * updated all package versions --------- Co-authored-by: nabeelmd-eGov Co-authored-by: nabeelmd-eGov <94039229+nabeelmd-eGov@users.noreply.github.com> * Update package.json * updated the order * DPG-1531: Setup & Initialize new svg-component-library & taken the la… …test changes from digit-dev (#198) (#199) * Taken the recent fixes https://github.com/egovernments/DIGIT-Dev/commit/bb2173c4fbef4e529df1f85d2396e1237b409b18 https://github.com/egovernments/DIGIT-Dev/commit/567fd8f25543f8a4fd5b4a1885dcf0357ac6e9a1 https://github.com/egovernments/DIGIT-Dev/commit/1186f4c6fe21ada1a602681a219bf07b909c5c1a https://github.com/egovernments/DIGIT-Dev/commit/43f688be31286174f15e9073a7b5c9c4a45bb7bb * DPG-1531: Setup & Initialize new svg-component-library & taken the latest changes from digit-dev (#198) * PFM-3740 Show the Toast when password changed and need to logout from profile page (#5637) * SM-2880: FSM Truck Icon fill issue fix and react component package upgrade (#5645) * SM-2880: FSM Truck Icon fill issue fix * SM-2880: Readme update --------- Co-authored-by: nabeelmd-eGov * Corrected the CSS for inbox composers and default core ui * Updated the package versions * Taken the recent fixes https://github.com/egovernments/DIGIT-Dev/commit/bb2173c4fbef4e529df1f85d2396e1237b409b18 https://github.com/egovernments/DIGIT-Dev/commit/567fd8f25543f8a4fd5b4a1885dcf0357ac6e9a1 https://github.com/egovernments/DIGIT-Dev/commit/1186f4c6fe21ada1a602681a219bf07b909c5c1a https://github.com/egovernments/DIGIT-Dev/commit/43f688be31286174f15e9073a7b5c9c4a45bb7bb * Integrated Create Employee with session storage * Updated Edit flow accordingly * DPG-1531: Setup & Initialize new svg-component-library (#5644) * DPG-1531: Set Up SVG library * DPG-1531: SVG library setup * DPG-1531: svg library setup * DPG-1531: svg library set up & code clean up * clean up * Update index.html * Update index.html * Update index.html * Update index.html * Update index.html * Update index.html * Update index.html * cleanup * DPG-1531: Initializing svg-component Icons in react-component * Resolving PR issues, update svg readme file and stories * DPG-1531: Initialized stories for all svgs --------- Co-authored-by: nabeelmd-eGov * Revert "DPG-1531: Setup & Initialize new svg-component-library" (#5656) Revert "DPG-1531: Setup & Initialize new svg-component-library (#5644)" This reverts commit 17e43304017cb85b9cffbcbff4e36e83b6a8c8c5. * DPG-1531: Initializing svg-component Icons in react-component (#5657) * DPG-1531: Set Up SVG library * DPG-1531: SVG library setup * DPG-1531: svg library setup * DPG-1531: svg library set up & code clean up * clean up * Update index.html * Update index.html * Update index.html * Update index.html * Update index.html * Update index.html * Update index.html * cleanup * DPG-1531: Initializing svg-component Icons in react-component * Resolving PR issues, update svg readme file and stories * DPG-1531: Initialized stories for all svgs * added minor fixes and changes * removed env * Update build-config.yml * Update preview.js * dist-storybook * Update Dockerfile * Playground enabled and onclick added * corrected the compilation issue * added reference * Updated the story book compilcation * fixed the compilation issue * correceted * corrected for A * updated the ico * removed the compilation issues * Update preview.js * updated all package versions --------- Co-authored-by: nabeelmd-eGov Co-authored-by: nabeelmd-eGov <94039229+nabeelmd-eGov@users.noreply.github.com> * Update package.json * updated the order * taken the latest changes from digit-dev --------- Co-authored-by: vamshikrishnakole-wtt-egov <57343517+vamshikrishnakole-wtt-egov@users.noreply.github.com> Co-authored-by: nabeelmd-eGov <94039229+nabeelmd-eGov@users.noreply.github.com> Co-authored-by: nabeelmd-eGov Co-authored-by: Nipun Arora --------- Co-authored-by: vamshikrishnakole-wtt-egov <57343517+vamshikrishnakole-wtt-egov@users.noreply.github.com> Co-authored-by: nabeelmd-eGov <94039229+nabeelmd-eGov@users.noreply.github.com> Co-authored-by: nabeelmd-eGov Co-authored-by: Nipun Arora * Initialised the Workbench screens * Update package.json * added the svg storybook build config (#201) * Updated the build location * Update package.json * DPG-1531: Added playground and propTypes for all SVG and SVG stories (#5658) * Added proptypes in all file * Added playground * Code clean --------- Co-authored-by: nabeelmd-eGov * added stories for remaining components * Updated the package version * removed common and utitlies to compile * Update package.json * Multiple tool tip fix * updated version * Added the basic screen for MDMS Create * Update README.md * Updated the package versions * Added the select data and integrated with the Reference type * formatted data * Digit Components-core created * Revert "Digit Components-core created" This reverts commit 2a0a3bad0c25ff31fe1145cbbf4b841ac835016a. * updated to build from webpack * Update install-deps.sh * Update package.json * formcomposer v2 * added newer styles * added new styles DIGITV2 1.5.32 and svg components added 0.0.2 (#205) * Taken the recent fixes https://github.com/egovernments/DIGIT-Dev/commit/bb2173c4fbef4e529df1f85d2396e1237b409b18 https://github.com/egovernments/DIGIT-Dev/commit/567fd8f25543f8a4fd5b4a1885dcf0357ac6e9a1 https://github.com/egovernments/DIGIT-Dev/commit/1186f4c6fe21ada1a602681a219bf07b909c5c1a https://github.com/egovernments/DIGIT-Dev/commit/43f688be31286174f15e9073a7b5c9c4a45bb7bb * DPG-1531: Setup & Initialize new svg-component-library & taken the latest changes from digit-dev (#198) * PFM-3740 Show the Toast when password changed and need to logout from profile page (#5637) * SM-2880: FSM Truck Icon fill issue fix and react component package upgrade (#5645) * SM-2880: FSM Truck Icon fill issue fix * SM-2880: Readme update --------- Co-authored-by: nabeelmd-eGov * Corrected the CSS for inbox composers and default core ui * Updated the package versions * Taken the recent fixes https://github.com/egovernments/DIGIT-Dev/commit/bb2173c4fbef4e529df1f85d2396e1237b409b18 https://github.com/egovernments/DIGIT-Dev/commit/567fd8f25543f8a4fd5b4a1885dcf0357ac6e9a1 https://github.com/egovernments/DIGIT-Dev/commit/1186f4c6fe21ada1a602681a219bf07b909c5c1a https://github.com/egovernments/DIGIT-Dev/commit/43f688be31286174f15e9073a7b5c9c4a45bb7bb * Integrated Create Employee with session storage * Updated Edit flow accordingly * DPG-1531: Setup & Initialize new svg-component-library (#5644) * DPG-1531: Set Up SVG library * DPG-1531: SVG library setup * DPG-1531: svg library setup * DPG-1531: svg library set up & code clean up * clean up * Update index.html * Update index.html * Update index.html * Update index.html * Update index.html * Update index.html * Update index.html * cleanup * DPG-1531: Initializing svg-component Icons in react-component * Resolving PR issues, update svg readme file and stories * DPG-1531: Initialized stories for all svgs --------- Co-authored-by: nabeelmd-eGov * Revert "DPG-1531: Setup & Initialize new svg-component-library" (#5656) Revert "DPG-1531: Setup & Initialize new svg-component-library (#5644)" This reverts commit 17e43304017cb85b9cffbcbff4e36e83b6a8c8c5. * DPG-1531: Initializing svg-component Icons in react-component (#5657) * DPG-1531: Set Up SVG library * DPG-1531: SVG library setup * DPG-1531: svg library setup * DPG-1531: svg library set up & code clean up * clean up * Update index.html * Update index.html * Update index.html * Update index.html * Update index.html * Update index.html * Update index.html * cleanup * DPG-1531: Initializing svg-component Icons in react-component * Resolving PR issues, update svg readme file and stories * DPG-1531: Initialized stories for all svgs * added minor fixes and changes * removed env * Update build-config.yml * Update preview.js * dist-storybook * Update Dockerfile * Playground enabled and onclick added * corrected the compilation issue * added reference * Updated the story book compilcation * fixed the compilation issue * correceted * corrected for A * updated the ico * removed the compilation issues * Update preview.js * updated all package versions --------- Co-authored-by: nabeelmd-eGov Co-authored-by: nabeelmd-eGov <94039229+nabeelmd-eGov@users.noreply.github.com> * Update package.json * updated the order * taken the latest changes from digit-dev --------- Co-authored-by: vamshikrishnakole-wtt-egov <57343517+vamshikrishnakole-wtt-egov@users.noreply.github.com> Co-authored-by: nabeelmd-eGov <94039229+nabeelmd-eGov@users.noreply.github.com> Co-authored-by: nabeelmd-eGov Co-authored-by: Nipun Arora * updated the svg version and stories * addded the v2 stlyes , svg libraries (#204) * PFM-3740 Show the Toast when password changed and need to logout from profile page (#5637) * SM-2880: FSM Truck Icon fill issue fix and react component package upgrade (#5645) * SM-2880: FSM Truck Icon fill issue fix * SM-2880: Readme update --------- Co-authored-by: nabeelmd-eGov * DPG-1488: Initialized color palette an new classnames * Corrected the CSS for inbox composers and default core ui * Updated the package versions * DPG-1489: Setup work in progress * Taken the recent fixes https://github.com/egovernments/DIGIT-Dev/commit/bb2173c4fbef4e529df1f85d2396e1237b409b18 https://github.com/egovernments/DIGIT-Dev/commit/567fd8f25543f8a4fd5b4a1885dcf0357ac6e9a1 https://github.com/egovernments/DIGIT-Dev/commit/1186f4c6fe21ada1a602681a219bf07b909c5c1a https://github.com/egovernments/DIGIT-Dev/commit/43f688be31286174f15e9073a7b5c9c4a45bb7bb * Integrated Create Employee with session storage * Updated Edit flow accordingly * DPG-1489: Typography setup in progress * SM-DPG:1489:Added typography * SM-DPG:1489:identation * Revert "DPG-1489: Typography setup in progress" This reverts commit 5910c14dd200a92bdb2d83a8aef9fc5be4fed038. * SM-DPG:1489:Updated config for typography * remove comments * DPG-1531: Setup & Initialize new svg-component-library (#5644) * DPG-1531: Set Up SVG library * DPG-1531: SVG library setup * DPG-1531: svg library setup * DPG-1531: svg library set up & code clean up * clean up * Update index.html * Update index.html * Update index.html * Update index.html * Update index.html * Update index.html * Update index.html * cleanup * DPG-1531: Initializing svg-component Icons in react-component * Resolving PR issues, update svg readme file and stories * DPG-1531: Initialized stories for all svgs --------- Co-authored-by: nabeelmd-eGov * Revert "DPG-1531: Setup & Initialize new svg-component-library" (#5656) Revert "DPG-1531: Setup & Initialize new svg-component-library (#5644)" This reverts commit 17e43304017cb85b9cffbcbff4e36e83b6a8c8c5. * DPG-1531: Initializing svg-component Icons in react-component (#5657) * DPG-1531: Set Up SVG library * DPG-1531: SVG library setup * DPG-1531: svg library setup * DPG-1531: svg library set up & code clean up * clean up * Update index.html * Update index.html * Update index.html * Update index.html * Update index.html * Update index.html * Update index.html * cleanup * DPG-1531: Initializing svg-component Icons in react-component * Resolving PR issues, update svg readme file and stories * DPG-1531: Initialized stories for all svgs * added minor fixes and changes * removed env * Update build-config.yml * Update preview.js * dist-storybook * Update Dockerfile * Playground enabled and onclick added * corrected the compilation issue * added reference * Updated the story book compilcation * fixed the compilation issue * correceted * corrected for A * updated the ico * removed the compilation issues * Update preview.js * updated all package versions --------- Co-authored-by: nabeelmd-eGov Co-authored-by: nabeelmd-eGov <94039229+nabeelmd-eGov@users.noreply.github.com> * Update package.json * updated the order * taken the latest changes from digit-dev * DPG-1488: integrated color pallete with formcomposerv2 and inbox search composer * DPG-1489: updated all config * DPG-1531: Added playground and propTypes for all SVG and SVG stories (#5658) * Added proptypes in all file * Added playground * Code clean --------- Co-authored-by: nabeelmd-eGov * Update package.json * Multiple tool tip fix * updated version * Update README.md * DPG-1488: Added fixes and comments * Digit components core library created * redefine comments * added new styles added --------- Co-authored-by: vamshikrishnakole-wtt-egov <57343517+vamshikrishnakole-wtt-egov@users.noreply.github.com> Co-authored-by: nabeelmd-eGov <94039229+nabeelmd-eGov@users.noreply.github.com> Co-authored-by: nabeelmd-eGov Co-authored-by: Anil Singha <99383116+anilsingha-eGov@users.noreply.github.com> Co-authored-by: Nipun Arora Co-authored-by: ajay-egov * updated version and published --------- Co-authored-by: vamshikrishnakole-wtt-egov <57343517+vamshikrishnakole-wtt-egov@users.noreply.github.com> Co-authored-by: nabeelmd-eGov <94039229+nabeelmd-eGov@users.noreply.github.com> Co-authored-by: nabeelmd-eGov Co-authored-by: Nipun Arora Co-authored-by: Anil Singha <99383116+anilsingha-eGov@users.noreply.github.com> Co-authored-by: ajay-egov * Added latest styles and merged with digit-ui-core (#206) * Taken the recent fixes https://github.com/egovernments/DIGIT-Dev/commit/bb2173c4fbef4e529df1f85d2396e1237b409b18 https://github.com/egovernments/DIGIT-Dev/commit/567fd8f25543f8a4fd5b4a1885dcf0357ac6e9a1 https://github.com/egovernments/DIGIT-Dev/commit/1186f4c6fe21ada1a602681a219bf07b909c5c1a https://github.com/egovernments/DIGIT-Dev/commit/43f688be31286174f15e9073a7b5c9c4a45bb7bb * DPG-1531: Setup & Initialize new svg-component-library & taken the latest changes from digit-dev (#198) * PFM-3740 Show the Toast when password changed and need to logout from profile page (#5637) * SM-2880: FSM Truck Icon fill issue fix and react component package upgrade (#5645) * SM-2880: FSM Truck Icon fill issue fix * SM-2880: Readme update --------- Co-authored-by: nabeelmd-eGov * Corrected the CSS for inbox composers and default core ui * Updated the package versions * Taken the recent fixes https://github.com/egovernments/DIGIT-Dev/commit/bb2173c4fbef4e529df1f85d2396e1237b409b18 https://github.com/egovernments/DIGIT-Dev/commit/567fd8f25543f8a4fd5b4a1885dcf0357ac6e9a1 https://github.com/egovernments/DIGIT-Dev/commit/1186f4c6fe21ada1a602681a219bf07b909c5c1a https://github.com/egovernments/DIGIT-Dev/commit/43f688be31286174f15e9073a7b5c9c4a45bb7bb * Integrated Create Employee with session storage * Updated Edit flow accordingly * DPG-1531: Setup & Initialize new svg-component-library (#5644) * DPG-1531: Set Up SVG library * DPG-1531: SVG library setup * DPG-1531: svg library setup * DPG-1531: svg library set up & code clean up * clean up * Update index.html * Update index.html * Update index.html * Update index.html * Update index.html * Update index.html * Update index.html * cleanup * DPG-1531: Initializing svg-component Icons in react-component * Resolving PR issues, update svg readme file and stories * DPG-1531: Initialized stories for all svgs --------- Co-authored-by: nabeelmd-eGov * Revert "DPG-1531: Setup & Initialize new svg-component-library" (#5656) Revert "DPG-1531: Setup & Initialize new svg-component-library (#5644)" This reverts commit 17e43304017cb85b9cffbcbff4e36e83b6a8c8c5. * DPG-1531: Initializing svg-component Icons in react-component (#5657) * DPG-1531: Set Up SVG library * DPG-1531: SVG library setup * DPG-1531: svg library setup * DPG-1531: svg library set up & code clean up * clean up * Update index.html * Update index.html * Update index.html * Update index.html * Update index.html * Update index.html * Update index.html * cleanup * DPG-1531: Initializing svg-component Icons in react-component * Resolving PR issues, update svg readme file and stories * DPG-1531: Initialized stories for all svgs * added minor fixes and changes * removed env * Update build-config.yml * Update preview.js * dist-storybook * Update Dockerfile * Playground enabled and onclick added * corrected the compilation issue * added reference * Updated the story book compilcation * fixed the compilation issue * correceted * corrected for A * updated the ico * removed the compilation issues * Update preview.js * updated all package versions --------- Co-authored-by: nabeelmd-eGov Co-authored-by: nabeelmd-eGov <94039229+nabeelmd-eGov@users.noreply.github.com> * Update package.json * updated the order * taken the latest changes from digit-dev --------- Co-authored-by: vamshikrishnakole-wtt-egov <57343517+vamshikrishnakole-wtt-egov@users.noreply.github.com> Co-authored-by: nabeelmd-eGov <94039229+nabeelmd-eGov@users.noreply.github.com> Co-authored-by: nabeelmd-eGov Co-authored-by: Nipun Arora * added stories for remaining components * Updated the package version * Digit Components-core created * Revert "Digit Components-core created" This reverts commit 2a0a3bad0c25ff31fe1145cbbf4b841ac835016a. * updated the svg version and stories * added newer styles * addded the v2 stlyes , svg libraries (#204) * PFM-3740 Show the Toast when password changed and need to logout from profile page (#5637) * SM-2880: FSM Truck Icon fill issue fix and react component package upgrade (#5645) * SM-2880: FSM Truck Icon fill issue fix * SM-2880: Readme update --------- Co-authored-by: nabeelmd-eGov * DPG-1488: Initialized color palette an new classnames * Corrected the CSS for inbox composers and default core ui * Updated the package versions * DPG-1489: Setup work in progress * Taken the recent fixes https://github.com/egovernments/DIGIT-Dev/commit/bb2173c4fbef4e529df1f85d2396e1237b409b18 https://github.com/egovernments/DIGIT-Dev/commit/567fd8f25543f8a4fd5b4a1885dcf0357ac6e9a1 https://github.com/egovernments/DIGIT-Dev/commit/1186f4c6fe21ada1a602681a219bf07b909c5c1a https://github.com/egovernments/DIGIT-Dev/commit/43f688be31286174f15e9073a7b5c9c4a45bb7bb * Integrated Create Employee with session storage * Updated Edit flow accordingly * DPG-1489: Typography setup in progress * SM-DPG:1489:Added typography * SM-DPG:1489:identation * Revert "DPG-1489: Typography setup in progress" This reverts commit 5910c14dd200a92bdb2d83a8aef9fc5be4fed038. * SM-DPG:1489:Updated config for typography * remove comments * DPG-1531: Setup & Initialize new svg-component-library (#5644) * DPG-1531: Set Up SVG library * DPG-1531: SVG library setup * DPG-1531: svg library setup * DPG-1531: svg library set up & code clean up * clean up * Update index.html * Update index.html * Update index.html * Update index.html * Update index.html * Update index.html * Update index.html * cleanup * DPG-1531: Initializing svg-component Icons in react-component * Resolving PR issues, update svg readme file and stories * DPG-1531: Initialized stories for all svgs --------- Co-authored-by: nabeelmd-eGov * Revert "DPG-1531: Setup & Initialize new svg-component-library" (#5656) Revert "DPG-1531: Setup & Initialize new svg-component-library (#5644)" This reverts commit 17e43304017cb85b9cffbcbff4e36e83b6a8c8c5. * DPG-1531: Initializing svg-component Icons in react-component (#5657) * DPG-1531: Set Up SVG library * DPG-1531: SVG library setup * DPG-1531: svg library setup * DPG-1531: svg library set up & code clean up * clean up * Update index.html * Update index.html * Update index.html * Update index.html * Update index.html * Update index.html * Update index.html * cleanup * DPG-1531: Initializing svg-component Icons in react-component * Resolving PR issues, update svg readme file and stories * DPG-1531: Initialized stories for all svgs * added minor fixes and changes * removed env * Update build-config.yml * Update preview.js * dist-storybook * Update Dockerfile * Playground enabled and onclick added * corrected the compilation issue * added reference * Updated the story book compilcation * fixed the compilation issue * correceted * corrected for A * updated the ico * removed the compilation issues * Update preview.js * updated all package versions --------- Co-authored-by: nabeelmd-eGov Co-authored-by: nabeelmd-eGov <94039229+nabeelmd-eGov@users.noreply.github.com> * Update package.json * updated the order * taken the latest changes from digit-dev * DPG-1488: integrated color pallete with formcomposerv2 and inbox search composer * DPG-1489: updated all config * DPG-1531: Added playground and propTypes for all SVG and SVG stories (#5658) * Added proptypes in all file * Added playground * Code clean --------- Co-authored-by: nabeelmd-eGov * Update package.json * Multiple tool tip fix * updated version * Update README.md * DPG-1488: Added fixes and comments * Digit components core library created * redefine comments * added new styles added --------- Co-authored-by: vamshikrishnakole-wtt-egov <57343517+vamshikrishnakole-wtt-egov@users.noreply.github.com> Co-authored-by: nabeelmd-eGov <94039229+nabeelmd-eGov@users.noreply.github.com> Co-authored-by: nabeelmd-eGov Co-authored-by: Anil Singha <99383116+anilsingha-eGov@users.noreply.github.com> Co-authored-by: Nipun Arora Co-authored-by: ajay-egov * added new styles DIGITV2 1.5.32 and svg components added 0.0.2 (#205) * Taken the recent fixes https://github.com/egovernments/DIGIT-Dev/commit/bb2173c4fbef4e529df1f85d2396e1237b409b18 https://github.com/egovernments/DIGIT-Dev/commit/567fd8f25543f8a4fd5b4a1885dcf0357ac6e9a1 https://github.com/egovernments/DIGIT-Dev/commit/1186f4c6fe21ada1a602681a219bf07b909c5c1a https://github.com/egovernments/DIGIT-Dev/commit/43f688be31286174f15e9073a7b5c9c4a45bb7bb * DPG-1531: Setup & Initialize new svg-component-library & taken the latest changes from digit-dev (#198) * PFM-3740 Show the Toast when password changed and need to logout from profile page (#5637) * SM-2880: FSM Truck Icon fill issue fix and react component package upgrade (#5645) * SM-2880: FSM Truck Icon fill issue fix * SM-2880: Readme update --------- Co-authored-by: nabeelmd-eGov * Corrected the CSS for inbox composers and default core ui * Updated the package versions * Taken the recent fixes https://github.com/egovernments/DIGIT-Dev/commit/bb2173c4fbef4e529df1f85d2396e1237b409b18 https://github.com/egovernments/DIGIT-Dev/commit/567fd8f25543f8a4fd5b4a1885dcf0357ac6e9a1 https://github.com/egovernments/DIGIT-Dev/commit/1186f4c6fe21ada1a602681a219bf07b909c5c1a https://github.com/egovernments/DIGIT-Dev/commit/43f688be31286174f15e9073a7b5c9c4a45bb7bb * Integrated Create Employee with session storage * Updated Edit flow accordingly * DPG-1531: Setup & Initialize new svg-component-library (#5644) * DPG-1531: Set Up SVG library * DPG-1531: SVG library setup * DPG-1531: svg library setup * DPG-1531: svg library set up & code clean up * clean up * Update index.html * Update index.html * Update index.html * Update index.html * Update index.html * Update index.html * Update index.html * cleanup * DPG-1531: Initializing svg-component Icons in react-component * Resolving PR issues, update svg readme file and stories * DPG-1531: Initialized stories for all svgs --------- Co-authored-by: nabeelmd-eGov * Revert "DPG-1531: Setup & Initialize new svg-component-library" (#5656) Revert "DPG-1531: Setup & Initialize new svg-component-library (#5644)" This reverts commit 17e43304017cb85b9cffbcbff4e36e83b6a8c8c5. * DPG-1531: Initializing svg-component Icons in react-component (#5657) * DPG-1531: Set Up SVG library * DPG-1531: SVG library setup * DPG-1531: svg library setup * DPG-1531: svg library set up & code clean up * clean up * Update index.html * Update index.html * Update index.html * Update index.html * Update index.html * Update index.html * Update index.html * cleanup * DPG-1531: Initializing svg-component Icons in react-component * Resolving PR issues, update svg readme file and stories * DPG-1531: Initialized stories for all svgs * added minor fixes and changes * removed env * Update build-config.yml * Update preview.js * dist-storybook * Update Dockerfile * Playground enabled and onclick added * corrected the compilation issue * added reference * Updated the story book compilcation * fixed the compilation issue * correceted * corrected for A * updated the ico * removed the compilation issues * Update preview.js * updated all package versions --------- Co-authored-by: nabeelmd-eGov Co-authored-by: nabeelmd-eGov <94039229+nabeelmd-eGov@users.noreply.github.com> * Update package.json * updated the order * taken the latest changes from digit-dev --------- Co-authored-by: vamshikrishnakole-wtt-egov <57343517+vamshikrishnakole-wtt-egov@users.noreply.github.com> Co-authored-by: nabeelmd-eGov <94039229+nabeelmd-eGov@users.noreply.github.com> Co-authored-by: nabeelmd-eGov Co-authored-by: Nipun Arora * updated the svg version and stories * addded the v2 stlyes , svg libraries (#204) * PFM-3740 Show the Toast when password changed and need to logout from profile page (#5637) * SM-2880: FSM Truck Icon fill issue fix and react component package upgrade (#5645) * SM-2880: FSM Truck Icon fill issue fix * SM-2880: Readme update --------- Co-authored-by: nabeelmd-eGov * DPG-1488: Initialized color palette an new classnames * Corrected the CSS for inbox composers and default core ui * Updated the package versions * DPG-1489: Setup work in progress * Taken the recent fixes https://github.com/egovernments/DIGIT-Dev/commit/bb2173c4fbef4e529df1f85d2396e1237b409b18 https://github.com/egovernments/DIGIT-Dev/commit/567fd8f25543f8a4fd5b4a1885dcf0357ac6e9a1 https://github.com/egovernments/DIGIT-Dev/commit/1186f4c6fe21ada1a602681a219bf07b909c5c1a https://github.com/egovernments/DIGIT-Dev/commit/43f688be31286174f15e9073a7b5c9c4a45bb7bb * Integrated Create Employee with session storage * Updated Edit flow accordingly * DPG-1489: Typography setup in progress * SM-DPG:1489:Added typography * SM-DPG:1489:identation * Revert "DPG-1489: Typography setup in progress" This reverts commit 5910c14dd200a92bdb2d83a8aef9fc5be4fed038. * SM-DPG:1489:Updated config for typography * remove comments * DPG-1531: Setup & Initialize new svg-component-library (#5644) * DPG-1531: Set Up SVG library * DPG-1531: SVG library setup * DPG-1531: svg library setup * DPG-1531: svg library set up & code clean up * clean up * Update index.html * Update index.html * Update index.html * Update index.html * Update index.html * Update index.html * Update index.html * cleanup * DPG-1531: Initializing svg-component Icons in react-component * Resolving PR issues, update svg readme file and stories * DPG-1531: Initialized stories for all svgs --------- Co-authored-by: nabeelmd-eGov * Revert "DPG-1531: Setup & Initialize new svg-component-library" (#5656) Revert "DPG-1531: Setup & Initialize new svg-component-library (#5644)" This reverts commit 17e43304017cb85b9cffbcbff4e36e83b6a8c8c5. * DPG-1531: Initializing svg-component Icons in react-component (#5657) * DPG-1531: Set Up SVG library * DPG-1531: SVG library setup * DPG-1531: svg library setup * DPG-1531: svg library set up & code clean up * clean up * Update index.html * Update index.html * Update index.html * Update index.html * Update index.html * Update index.html * Update index.html * cleanup * DPG-1531: Initializing svg-component Icons in react-component * Resolving PR issues, update svg readme file and stories * DPG-1531: Initialized stories for all svgs * added minor fixes and changes * removed env * Update build-config.yml * Update preview.js * dist-storybook * Update Dockerfile * Playground enabled and onclick added * corrected the compilation issue * added reference * Updated the story book compilcation * fixed the compilation issue * correceted * corrected for A * updated the ico * removed the compilation issues * Update preview.js * updated all package versions --------- Co-authored-by: nabeelmd-eGov Co-authored-by: nabeelmd-eGov <94039229+nabeelmd-eGov@users.noreply.github.com> * Update package.json * updated the order * taken the latest changes from digit-dev * DPG-1488: integrated color pallete with formcomposerv2 and inbox search composer * DPG-1489: updated all config * DPG-1531: Added playground and propTypes for all SVG and SVG stories (#5658) * Added proptypes in all file * Added playground * Code clean --------- Co-authored-by: nabeelmd-eGov * Update package.json * Multiple tool tip fix * updated version * Update README.md * DPG-1488: Added fixes and comments * Digit components core library created * redefine comments * added new styles added --------- Co-authored-by: vamshikrishnakole-wtt-egov <57343517+vamshikrishnakole-wtt-egov@users.noreply.github.com> Co-authored-by: nabeelmd-eGov <94039229+nabeelmd-eGov@users.noreply.github.com> Co-authored-by: nabeelmd-eGov Co-authored-by: Anil Singha <99383116+anilsingha-eGov@users.noreply.github.com> Co-authored-by: Nipun Arora Co-authored-by: ajay-egov * updated version and published --------- Co-authored-by: vamshikrishnakole-wtt-egov <57343517+vamshikrishnakole-wtt-egov@users.noreply.github.com> Co-authored-by: nabeelmd-eGov <94039229+nabeelmd-eGov@users.noreply.github.com> Co-authored-by: nabeelmd-eGov Co-authored-by: Nipun Arora Co-authored-by: Anil Singha <99383116+anilsingha-eGov@users.noreply.github.com> Co-authored-by: ajay-egov * updated the css version --------- Co-authored-by: vamshikrishnakole-wtt-egov <57343517+vamshikrishnakole-wtt-egov@users.noreply.github.com> Co-authored-by: nabeelmd-eGov <94039229+nabeelmd-eGov@users.noreply.github.com> Co-authored-by: nabeelmd-eGov Co-authored-by: Nipun Arora Co-authored-by: Anil Singha <99383116+anilsingha-eGov@users.noreply.github.com> Co-authored-by: ajay-egov * fixeed some css issues * fixeed some css issues * Update index.html * updated css module (#207) * updated css * Update README.md * Update WorkbenchCard.js * updated css module (#207) * updated css * Update README.md * updated css version (#208) * updated the localisation code * Corrected the card css * Corrected the card css * Update index.html * Added temp solution css fixes (#209) * updated cs… * took the latest update from the master * reverted the core and accelerator changes, took latest from master * updated the readme files * build process change * updated packages * updated the package file * updated buil commands and fixed hrms package compilation issue (#233) * updated buil commands * hrms import issue fix * updated the build commands * Update package.json * updated the readme files * build process change * updated packages * updated the package file * updated buil commands and fixed hrms package compilation issue (#233) * updated buil commands * hrms import issue fix * updated the build commands * Update package.json * added fix for empty role issue in selected city * remove the core services code from Digit-core * removed the frontend folder and made micro ui as base directory * DPG-1738 :: Workbench UI/UX Audit changes updated * updated the css version for audit fixes * Workbench audit fixes (#241) * added some fixes * Re-arrange columns of search localisations and removed border on the right of last column * changes in add localization flow -> By default after success we'll show an empty row -> Added delete row functionality -> changed layout of screen(pushed table and add clear table options to separate card) * Update LocalisationAdd.js * updated css version * updated css * updated schema codes param to schemaCode (#245) * Bulk upload revamp (#243) * Bulk upload updated flow * Validating files * Update FileUploadModal.js * Integrated with multiple ref typeed data * Update MDMSAddV2.js * audit fixes + bulk upload sample excel download flow (#246) * audit fixes + bulk upload sample excel download flow * updated css package * some audit fixes (#247) * Few more audit fixes * css changes * SideBar enhancements (#248) * enhanced sidebar component * completed sidebar enhancements * fixed some css * . * fixed the css for sidebar * . * feat: fixed search bar * fixed some styling * reverted package.json and added unified dev env * Sidebar enhancement initial commit * sidebar fixes * updated css package --------- Co-authored-by: ansh-egov * Update WorkbenchCard.js * updated the service name with dynamic attribute made the mdms context as global config, also added locale and region … (#249) * Revert "Integrated with multiple ref typeed data" This reverts commit c96b6d07810bcb279a018213b68302826b58da8c. * Revert "Update MDMSAddV2.js" This reverts commit 59880f846e437cc9d02095f5861d07a032727992. * Revert "updated schema codes param to schemaCode (#245)" This reverts commit ee788e8c9a5d6133dbe733b1719c45a3c2a07a57. * made the mdms context as global config, also added locale and region as constant from environment * Revert "Revert "updated schema codes param to schemaCode (#245)"" This reverts commit 78f3a3a9afe73f74b4a181769d320e012ef979d0. * Revert "Revert "Update MDMSAddV2.js"" This reverts commit 5f9ecca341d4b2b7ad190c44d0be6f8551dadad0. * Revert "Revert "Integrated with multiple ref typeed data"" This reverts commit af504a15a8ba7e34dae2425d5c79ec3ebb7c9f68. * Update MultiSelect.js * updated the service name with dynamic attribute * CSS package version updated (#250) * Revert "Integrated with multiple ref typeed data" This reverts commit c96b6d07810bcb279a018213b68302826b58da8c. * Revert "Update MDMSAddV2.js" This reverts commit 59880f846e437cc9d02095f5861d07a032727992. * Revert "updated schema codes param to schemaCode (#245)" This reverts commit ee788e8c9a5d6133dbe733b1719c45a3c2a07a57. * made the mdms context as global config, also added locale and region as constant from environment * Revert "Revert "updated schema codes param to schemaCode (#245)"" This reverts commit 78f3a3a9afe73f74b4a181769d320e012ef979d0. * Revert "Revert "Update MDMSAddV2.js"" This reverts commit 5f9ecca341d4b2b7ad190c44d0be6f8551dadad0. * Revert "Revert "Integrated with multiple ref typeed data"" This reverts commit af504a15a8ba7e34dae2425d5c79ec3ebb7c9f68. * Update MultiSelect.js * updated the service name with dynamic attribute * v1.8.0-beta.7 * CSS package version updated * CSS updated for readonly text and icon updated * updated package versions * updated css * update core version * Fixed Dependent loading issue * Sidebar fixes * Update README.md * Update README.md * Create publishAllPackages.yml * Update publish-workbench.sh * fixed some issues and added hover on sidebar (#251) * updated core version * Workbench v1.0 fixes (#7) * linked latest digit-frontend * Update DIGIT-Frontend * added option to add Formatted id always * update the css * Updated the field Names from unique identifier to array and made default dropdown as 50 for reference masters * Update MDMSAddV2.js * PFM-4305 Login page & other alignment issues (#257) * PFM-4305 Login page & other alignment issues * PFM-4305 updated readme file * PFM-4795 aligment issue in edit and logout (#258) * Removed sublink * PFM-4305 fixed issues in login and home page (#259) * updated the package versions * updated the login screen styling * Update webpack.config.js * Delete .gitmodules --------- Co-authored-by: vamshikrishnakole-wtt-egov <57343517+vamshikrishnakole-wtt-egov@users.noreply.github.com> * Updated react-comp version (#8) * added the custom epoc conversion if format is mentioned (#9) * Rename checbox.js to Checbox.js * Added support for UI Autogenerate the formatted id if schema has ui schema option (#10) * fixed the null type data issue (#11) * Added support for UI Autogenerate the formatted id if schema has ui schema option * fixed the null type data issue * Added Core Build configs (#13) * added core build and deployement * updated the build commands * Update build-config.yml * Update webpack.config.js * Workbench v1.0 fixes (#17) * linked latest digit-frontend * Update DIGIT-Frontend * added option to add Formatted id always * update the css * Updated the field Names from unique identifier to array and made default dropdown as 50 for reference masters * Update MDMSAddV2.js * PFM-4305 Login page & other alignment issues (#257) * PFM-4305 Login page & other alignment issues * PFM-4305 updated readme file * PFM-4795 aligment issue in edit and logout (#258) * Removed sublink * PFM-4305 fixed issues in login and home page (#259) * updated the package versions * updated the login screen styling * Update webpack.config.js * Made the default schemas to load as 100 * added the custom epoc conversion if format is mentioned * Delete .gitmodules --------- Co-authored-by: vamshikrishnakole-wtt-egov <57343517+vamshikrishnakole-wtt-egov@users.noreply.github.com> * Fix : Fixed duplicate caching issue in add screen (#59) * Fix : Fixed duplicate caching issue in add screen * Fix : Fixed caching issue in MDMSAddV4 screen * feat: implemented cache deletion for specific screens * updated the core build commands --------- Co-authored-by: Nipun Arora Co-authored-by: manastanmay-eGov <118505430+manastanmay-eGov@users.noreply.github.com> Co-authored-by: Harish S <119594385+Harish-egov@users.noreply.github.com> Co-authored-by: Harish-egov Co-authored-by: Shashwat Mishra <71879793+shashwat-egov@users.noreply.github.com> Co-authored-by: Ramkrishna-egov <85437265+Ramkrishna-egov@users.noreply.github.com> Co-authored-by: Tulika-eGov <74046137+Tulika-eGov@users.noreply.github.com> Co-authored-by: Priyanka-eGov <74049060+Priyanka-eGov@users.noreply.github.com> Co-authored-by: JithendarKumar-eGov <103918846+JithendarKumar-eGov@users.noreply.github.com> Co-authored-by: shubhang-eGov <70943369+shubhang-eGov@users.noreply.github.com> Co-authored-by: nabeelmd-eGov <94039229+nabeelmd-eGov@users.noreply.github.com> Co-authored-by: nabeelmd-eGov Co-authored-by: Tulika-eGov Co-authored-by: ajay-egov Co-authored-by: ajay-egov <95418896+ajay-egov@users.noreply.github.com> Co-authored-by: ansh-egov Co-authored-by: vamshikrishnakole-wtt-egov <57343517+vamshikrishnakole-wtt-egov@users.noreply.github.com> Co-authored-by: ashish-egov <137176738+ashish-egov@users.noreply.github.com> --- .gitignore | 4 + CODEOWNERS | 1 + LICENSE | 21 + README.md | 142 +- micro-ui/.gitignore | 32 + micro-ui/CODEOWNERS | 1 + micro-ui/Jenkinsfile | 3 + micro-ui/README.md | 140 ++ micro-ui/package.json | 4 + micro-ui/web/.babelrc | 5 + micro-ui/web/.env.sample | 3 + micro-ui/web/core/App.js | 53 + micro-ui/web/core/Dockerfile | 29 + micro-ui/web/core/install-deps.sh | 18 + micro-ui/web/core/inter-package.json | 72 + micro-ui/web/core/nginx.conf | 12 + micro-ui/web/core/package.json | 80 + micro-ui/web/core/webpack.config.js | 44 + micro-ui/web/docker/Dockerfile | 25 + micro-ui/web/docker/devDockerfile | 26 + micro-ui/web/docker/masDockerfile | 25 + micro-ui/web/docker/nginx.conf | 12 + micro-ui/web/envs.js | 0 micro-ui/web/install-deps.sh | 14 + micro-ui/web/micro-ui-internals/.gitignore | 143 ++ .../web/micro-ui-internals/.prettierignore | 23 + .../web/micro-ui-internals/.prettierrc.json | 3 + micro-ui/web/micro-ui-internals/README.md | 100 + micro-ui/web/micro-ui-internals/clean.sh | 28 + .../web/micro-ui-internals/example/.env-fsm | 7 + .../micro-ui-internals/example/.env-health-qa | 7 + .../micro-ui-internals/example/.env-mz-prod | 7 + .../micro-ui-internals/example/.env-mz-uat | 7 + .../web/micro-ui-internals/example/.env-qa | 7 + .../example/.env-unifiedDev | 8 + .../example/.env-unifieddev | 8 + .../web/micro-ui-internals/example/.env-upyog | 8 + .../micro-ui-internals/example/.env-workbench | 8 + .../example/.env-workbench-qa | 8 + .../micro-ui-internals/example/.env-worksdev | 8 + .../example/maspackage.json | 31 + .../micro-ui-internals/example/package.json | 40 + .../example/public/index.html | 26 + .../example/src/ComponentRegistry.js | 11 + .../example/src/UICustomizations.js | 420 ++++ .../example/src/complaintConfig.js | 31 + .../example/src/components/SelectName.js | 8 + .../web/micro-ui-internals/example/src/fsm.js | 38 + .../micro-ui-internals/example/src/index.js | 84 + .../web/micro-ui-internals/example/src/pgr.js | 15 + .../example/src/setupProxy.js | 87 + micro-ui/web/micro-ui-internals/package.json | 74 + .../packages/config/index.js | 3 + .../packages/config/package.json | 6 + .../micro-ui-internals/packages/css/README.md | 78 + .../packages/css/gulpfile.js | 70 + .../packages/css/img/browser-icon.png | Bin 0 -> 1121 bytes .../packages/css/img/m_seva_white_logo.png | Bin 0 -> 10689 bytes .../packages/css/img/mseva-demo.png | Bin 0 -> 2460 bytes .../packages/css/package.json | 65 + .../packages/css/postcss.config.js | 55 + .../css/src/components/CardBasedOptions.scss | 46 + .../css/src/components/CitizenHomeCard.scss | 56 + .../css/src/components/EllipsisMenu.scss | 17 + .../css/src/components/EventCalendarView.scss | 10 + .../packages/css/src/components/FAQ.scss | 64 + .../css/src/components/OnGroundEventCard.scss | 72 + .../css/src/components/PageBasedInput.scss | 29 + .../css/src/components/PopupHeadingLabel.scss | 15 + .../src/components/PropertySearchForm.scss | 58 + .../css/src/components/SearchForm.scss | 56 + .../src/components/SearchOnRadioButton.scss | 10 + .../src/components/StandaloneSearchBar.scss | 10 + .../packages/css/src/components/TimeLine.scss | 68 + .../css/src/components/WhatsNewCard.scss | 13 + .../css/src/components/actionLink.scss | 3 + .../css/src/components/actionbar.scss | 97 + .../css/src/components/bannercomponents.scss | 136 ++ .../packages/css/src/components/body.scss | 144 ++ .../packages/css/src/components/buttons.scss | 101 + .../packages/css/src/components/card.scss | 391 ++++ .../src/components/cardHeaderWithOptions.scss | 14 + .../css/src/components/changeLanguage.scss | 3 + .../packages/css/src/components/charts.scss | 186 ++ .../packages/css/src/components/checkbox.scss | 53 + .../css/src/components/checkpoint.scss | 63 + .../css/src/components/citizenInfoLabel.scss | 14 + .../css/src/components/custombtn.scss | 11 + .../css/src/components/datatable.scss | 134 ++ .../packages/css/src/components/datewrap.scss | 21 + .../css/src/components/detailscard.scss | 6 + .../css/src/components/detailscontainer.scss | 13 + .../packages/css/src/components/filters.scss | 98 + .../packages/css/src/components/grey.scss | 3 + .../css/src/components/hoc/InboxComposer.scss | 115 + .../css/src/components/hoc/index.scss | 1 + .../css/src/components/howItWorks.scss | 71 + .../css/src/components/imageviewer.scss | 33 + .../src/components/inboxv2/InboxLinks.scss | 59 + .../src/components/inboxv2/horizontalNav.scss | 224 ++ .../src/components/inboxv2/inboxSearch.scss | 116 + .../inboxv2/inboxSearchComposer.scss | 134 ++ .../css/src/components/inboxv2/index.scss | 5 + .../inboxv2/searchComponentTable.scss | 44 + .../css/src/components/info-banner.scss | 35 + .../packages/css/src/components/inputotp.scss | 15 + .../packages/css/src/components/keynote.scss | 27 + .../css/src/components/languageSelector.scss | 23 + .../packages/css/src/components/loader.scss | 96 + .../packages/css/src/components/map.scss | 30 + .../packages/css/src/components/menu.scss | 0 .../css/src/components/metricsTable.scss | 28 + .../css/src/components/multiLink.scss | 88 + .../src/components/multiSelectDropdown.scss | 77 + .../packages/css/src/components/navbar.scss | 312 +++ .../css/src/components/plusMinus.scss | 15 + .../packages/css/src/components/popup.scss | 16 + .../packages/css/src/components/radiobtn.scss | 45 + .../css/src/components/ratingstar.scss | 33 + .../css/src/components/roundedLabel.scss | 10 + .../css/src/components/searchAction.scss | 20 + .../css/src/components/sectionalDropdown.scss | 43 + .../css/src/components/selectdropdown.scss | 174 ++ .../packages/css/src/components/sidebar.scss | 141 ++ .../src/components/staticDynamicMessages.scss | 107 + .../css/src/components/staticSideBar.scss | 27 + .../css/src/components/statushighlight.scss | 17 + .../css/src/components/submiterrors.scss | 11 + .../packages/css/src/components/summary.scss | 29 + .../packages/css/src/components/table.scss | 201 ++ .../packages/css/src/components/tag.scss | 27 + .../css/src/components/telephone.scss | 17 + .../css/src/components/textfields.scss | 96 + .../packages/css/src/components/toast.scss | 31 + .../css/src/components/toggleSwitch.scss | 41 + .../packages/css/src/components/topbar.scss | 153 ++ .../css/src/components/uploadcomponents.scss | 100 + .../src/digitv2/components/ErrorMessage.scss | 6 + .../digitv2/components/FormComposerV2.scss | 120 + .../src/digitv2/components/actionLinkV2.scss | 7 + .../src/digitv2/components/actionbarV2.scss | 110 + .../digitv2/components/appContainerV2.scss | 55 + .../src/digitv2/components/backButtonV2.scss | 26 + .../css/src/digitv2/components/bannerV2.scss | 120 + .../digitv2/components/bodyContainerV2.scss | 39 + .../src/digitv2/components/breadCrumbV2.scss | 31 + .../src/digitv2/components/breakLineV2.scss | 6 + .../css/src/digitv2/components/buttonsV2.scss | 40 + .../css/src/digitv2/components/cardV2.scss | 385 ++++ .../src/digitv2/components/checkboxV2.scss | 61 + .../src/digitv2/components/checkpointV2.scss | 71 + .../components/collapseAndExpandGroups.scss | 60 + .../src/digitv2/components/dateWrapV2.scss | 12 + .../digitv2/components/displayPhotosV2.scss | 33 + .../css/src/digitv2/components/headerV2.scss | 6 + .../src/digitv2/components/infoBannerV2.scss | 37 + .../css/src/digitv2/components/keynoteV2.scss | 35 + .../css/src/digitv2/components/loaderV2.scss | 81 + .../digitv2/components/mobileNumberV2.scss | 33 + .../components/multiSelectDropdownV2.scss | 92 + .../digitv2/components/noresultsfoundV2.scss | 11 + .../src/digitv2/components/otpInputV2.scss | 15 + .../css/src/digitv2/components/popUpV2.scss | 16 + .../src/digitv2/components/radiobtnV2.scss | 51 + .../css/src/digitv2/components/ratingV2.scss | 33 + .../digitv2/components/selectdropdownV2.scss | 170 ++ .../css/src/digitv2/components/tagV2.scss | 28 + .../src/digitv2/components/telephoneV2.scss | 18 + .../src/digitv2/components/textInputV2.scss | 123 ++ .../src/digitv2/components/textareaV2.scss | 11 + .../src/digitv2/components/uploadFileV2.scss | 146 ++ .../packages/css/src/digitv2/index.scss | 168 ++ .../css/src/digitv2/pages/employee/index.scss | 1 + .../src/digitv2/pages/employee/workbench.scss | 615 ++++++ .../packages/css/src/digitv2/typography.scss | 241 ++ .../packages/css/src/index.scss | 762 +++++++ .../CitizenEngagementNotificationWrapper.scss | 8 + .../css/src/pages/citizen/DocumentList.scss | 305 +++ .../css/src/pages/citizen/Events.scss | 47 + .../src/pages/citizen/HomePageWrapper.scss | 158 ++ .../css/src/pages/citizen/SurveyList.scss | 22 + .../src/pages/citizen/citizenDocument.scss | 22 + .../css/src/pages/citizen/container.scss | 19 + .../pages/citizen/payment/payment-type.scss | 3 + .../pages/citizen/updatePropertyNumber.scss | 46 + .../css/src/pages/employee/EmployeeLogin.scss | 7 + .../css/src/pages/employee/cardfix.scss | 13 + .../css/src/pages/employee/container.scss | 72 + .../packages/css/src/pages/employee/dss.scss | 266 +++ .../css/src/pages/employee/form-fields.scss | 13 + .../css/src/pages/employee/iframe.scss | 66 + .../css/src/pages/employee/inbox.scss | 585 +++++ .../css/src/pages/employee/index.scss | 572 +++++ .../css/src/pages/employee/login.scss | 221 ++ .../src/pages/employee/oldMobileInbox.scss | 5 + .../css/src/pages/employee/popupmodule.scss | 34 + .../css/src/pages/employee/response.scss | 3 + .../css/src/pages/employee/scroll-table.scss | 119 + .../css/src/pages/employee/surveys.scss | 273 +++ .../css/src/pages/employee/tooltip.scss | 36 + .../css/src/pages/employee/updateNumber.scss | 13 + .../packages/css/svg/arrowdown.svg | 1 + .../packages/css/svg/arrowleft.svg | 1 + .../packages/css/svg/calendar.svg | 1 + .../packages/css/svg/camera.svg | 4 + .../packages/css/svg/check.svg | 4 + .../packages/css/svg/close.svg | 4 + .../packages/css/svg/error.svg | 4 + .../packages/css/svg/error2.svg | 5 + .../packages/css/svg/searchicon.svg | 4 + .../packages/css/svg/starempty.svg | 4 + .../packages/css/svg/starfilled.svg | 5 + .../packages/css/svg/success.svg | 4 + .../packages/css/tailwind.config.js | 231 ++ .../packages/libraries/README.md | 32 + .../packages/libraries/package.json | 50 + .../libraries/src/config/configUtils.js | 46 + .../packages/libraries/src/config/index.js | 31 + .../libraries/src/config/mergeConfig.js | 157 ++ .../packages/libraries/src/contexts/index.js | 6 + .../libraries/src/enums/ConfigActionTypes.js | 5 + .../libraries/src/enums/FormFields.js | 5 + .../packages/libraries/src/enums/Pages.js | 7 + .../packages/libraries/src/enums/index.js | 7 + .../src/hooks/dss/useDSSDashboard.js | 8 + .../src/hooks/dss/useDashboardConfig.js | 8 + .../libraries/src/hooks/dss/useGetChart.js | 56 + .../dss/useGetCustomFilterRequestValues.js | 8 + .../src/hooks/dss/useGetCustomFilterValues.js | 8 + .../libraries/src/hooks/dss/useMDMS.js | 20 + .../src/hooks/engagement/useCreate.js | 8 + .../src/hooks/engagement/useDelete.js | 8 + .../libraries/src/hooks/engagement/useMdms.js | 19 + .../src/hooks/engagement/useSearch.js | 8 + .../src/hooks/engagement/useUpdate.js | 8 + .../libraries/src/hooks/events/index.js | 185 ++ .../src/hooks/events/useCreateEvent.js | 7 + .../src/hooks/events/useEventDetails.js | 44 + .../src/hooks/events/useEventInbox.js | 23 + .../src/hooks/events/useUpdateEvent.js | 7 + .../libraries/src/hooks/hrms/useHRMSCount.js | 8 + .../libraries/src/hooks/hrms/useHRMSGender.js | 18 + .../src/hooks/hrms/useHRMSGenderMDMS.js | 18 + .../libraries/src/hooks/hrms/useHRMSMDMS.js | 25 + .../libraries/src/hooks/hrms/useHRMSUpdate.js | 8 + .../libraries/src/hooks/hrms/useHRMScreate.js | 8 + .../libraries/src/hooks/hrms/useHRMSsearch.js | 8 + .../packages/libraries/src/hooks/index.js | 216 ++ .../packages/libraries/src/hooks/payment.js | 160 ++ .../src/hooks/pgr/useComplaintDetails.js | 76 + .../src/hooks/pgr/useComplaintList.js | 12 + .../src/hooks/pgr/useComplaintStatus.js | 31 + .../hooks/pgr/useComplaintStatusWithCount.js | 27 + .../src/hooks/pgr/useComplaintSubType.js | 18 + .../src/hooks/pgr/useComplaintTable.js | 23 + .../src/hooks/pgr/useComplaintTypes.js | 20 + .../src/hooks/pgr/useEmployeeFilter.js | 35 + .../libraries/src/hooks/pgr/useInboxData.js | 61 + .../libraries/src/hooks/pgr/useLocalities.js | 34 + .../libraries/src/hooks/pgr/useServiceDefs.js | 23 + .../libraries/src/hooks/pgr/useTenants.js | 9 + .../libraries/src/hooks/revalidateQuery.js | 6 + .../packages/libraries/src/hooks/store.js | 19 + .../libraries/src/hooks/surveys/useCreate.js | 8 + .../libraries/src/hooks/surveys/useDelete.js | 8 + .../libraries/src/hooks/surveys/useSearch.js | 8 + .../src/hooks/surveys/useShowResults.js | 8 + .../src/hooks/surveys/useSubmitResponse.js | 8 + .../src/hooks/surveys/useSurveyInbox.js | 33 + .../libraries/src/hooks/surveys/useUpdate.js | 8 + .../libraries/src/hooks/useAccessControl.js | 13 + .../src/hooks/useApplicationForBillSearch.js | 37 + .../libraries/src/hooks/useClickOutside.js | 23 + .../libraries/src/hooks/useCustomAPIHook.js | 56 + .../src/hooks/useCustomAPIMutationHook.js | 68 + .../libraries/src/hooks/useCustomMDMS.js | 32 + .../libraries/src/hooks/useDocumentSearch.js | 47 + .../libraries/src/hooks/useDynamicData.js | 17 + .../libraries/src/hooks/useEmployeeSearch.js | 10 + .../libraries/src/hooks/useGenderMDMS.js | 18 + .../libraries/src/hooks/useGetDSSAboutJSON.js | 7 + .../libraries/src/hooks/useGetDSSFAQsJSON.js | 7 + .../libraries/src/hooks/useGetFAQsJSON.js | 7 + .../libraries/src/hooks/useHowItWorksJSON.js | 7 + .../packages/libraries/src/hooks/useInbox.js | 11 + .../src/hooks/useInboxGeneral/filterFn.js | 108 + .../src/hooks/useInboxGeneral/newFilterFn.js | 52 + .../src/hooks/useInboxGeneral/searchFields.js | 67 + .../hooks/useInboxGeneral/useInboxGeneral.js | 148 ++ .../src/hooks/useInboxGeneral/useNewInbox.js | 76 + .../libraries/src/hooks/useLocalities.js | 17 + .../libraries/src/hooks/useLocation.js | 15 + .../packages/libraries/src/hooks/useMDMS.js | 44 + .../libraries/src/hooks/useModuleTenants.js | 39 + .../libraries/src/hooks/usePrivacyContext.js | 18 + .../libraries/src/hooks/useQueryParams.js | 11 + .../src/hooks/useRouteSubscription.js | 17 + .../libraries/src/hooks/useSessionStorage.js | 30 + .../libraries/src/hooks/useStaticData.js | 7 + .../libraries/src/hooks/useStatusGeneral.js | 42 + .../packages/libraries/src/hooks/useStore.js | 11 + .../libraries/src/hooks/useTenants.js | 13 + .../libraries/src/hooks/useUpdateCustom.js | 17 + .../src/hooks/useWorkflowDetailsV2.js | 19 + .../libraries/src/hooks/userSearch.js | 8 + .../packages/libraries/src/hooks/workflow.js | 19 + .../packages/libraries/src/index.js | 90 + .../src/services/atoms/ApiCacheService.js | 64 + .../libraries/src/services/atoms/Download.js | 208 ++ .../src/services/atoms/JsDictionary.js | 24 + .../src/services/atoms/UploadServices.js | 51 + .../src/services/atoms/Utils/Date.js | 39 + .../src/services/atoms/Utils/ParsingUtils.js | 53 + .../src/services/atoms/Utils/Request.js | 211 ++ .../src/services/atoms/Utils/Storage.js | 55 + .../libraries/src/services/atoms/urls.js | 225 ++ .../libraries/src/services/elements/Access.js | 21 + .../ApplicationUpdateActionsCustom.js | 14 + .../libraries/src/services/elements/Bill.js | 34 + .../src/services/elements/Complaint.js | 87 + .../services/elements/ComponentRegistry.js | 19 + .../src/services/elements/CustomService.js | 19 + .../libraries/src/services/elements/DSS.js | 45 + .../src/services/elements/Engagement.js | 42 + .../libraries/src/services/elements/Events.js | 64 + .../libraries/src/services/elements/HRMS.js | 46 + .../src/services/elements/InboxService.js | 15 + .../src/services/elements/Localities.js | 25 + .../services/elements/Localization/service.js | 93 + .../src/services/elements/Location.js | 30 + .../libraries/src/services/elements/Login.js | 50 + .../libraries/src/services/elements/MDMS.js | 1730 +++++++++++++++ .../libraries/src/services/elements/PGR.js | 61 + .../src/services/elements/Payment.js | 143 ++ .../src/services/elements/Surveys.js | 61 + .../src/services/elements/UrlShortener.js | 15 + .../src/services/elements/User/index.js | 139 ++ .../src/services/elements/WorkFlow.js | 410 ++++ .../packages/libraries/src/services/index.js | 3 + .../molecules/DSS/getDSSDashboardData.js | 11 + .../services/molecules/ServiceDefinitions.js | 57 + .../src/services/molecules/ShareFiles.js | 75 + .../src/services/molecules/Store/service.js | 119 + .../src/services/molecules/StoreData.js | 8 + .../src/services/molecules/Ulb/index.js | 148 ++ .../src/services/molecules/getLocalities.js | 13 + .../packages/libraries/src/subFormRegistry.js | 43 + .../libraries/src/translations/index.js | 61 + .../packages/libraries/src/utils/browser.js | 35 + .../libraries/src/utils/componentRegistry.js | 23 + .../packages/libraries/src/utils/date.js | 20 + .../src/utils/dss/dynamicRequestGenerator.js | 101 + .../packages/libraries/src/utils/dss/index.js | 153 ++ .../packages/libraries/src/utils/fileType.js | 7 + .../packages/libraries/src/utils/fonts.js | 2 + .../packages/libraries/src/utils/fsm/index.js | 94 + .../packages/libraries/src/utils/index.js | 382 ++++ .../packages/libraries/src/utils/locale.js | 110 + .../libraries/src/utils/obps/index.js | 23 + .../packages/libraries/src/utils/pdf.js | 1083 +++++++++ .../src/utils/preProcessMDMSConfig.js | 128 ++ .../utils/preProcessMDMSConfigInboxSearch.js | 110 + .../packages/libraries/src/utils/privacy.js | 107 + .../packages/libraries/src/utils/pt/index.js | 65 + .../packages/modules/common/README.md | 77 + .../packages/modules/common/package.json | 34 + .../packages/modules/common/src/Module.js | 1 + .../packages/modules/common/src/hoc/index.js | 3 + .../common/src/hoc/subform-composer.js | 72 + .../modules/common/src/hoc/testForm-config.js | 148 ++ .../src/payments/citizen/bills/index.js | 64 + .../routes/bill-details/arrear-summary.js | 105 + .../bills/routes/bill-details/arrear-table.js | 103 + .../bills/routes/bill-details/bill-details.js | 270 +++ .../bills/routes/bill-details/bill-summary.js | 47 + .../bills/routes/bill-details/utils.js | 7 + .../routes/bill-details/yearwise-bills.js | 73 + .../payments/citizen/bills/routes/index.js | 21 + .../citizen/bills/routes/my-bills/my-bill.js | 35 + .../citizen/bills/routes/my-bills/my-bills.js | 94 + .../common/src/payments/citizen/index.js | 39 + .../src/payments/citizen/keynotesConfig.js | 104 + .../payments/citizen/payers-details/index.js | 241 ++ .../payments/citizen/payment-type/index.js | 144 ++ .../src/payments/citizen/response/index.js | 426 ++++ .../employee/IFrameInterface/index.js | 51 + .../common/src/payments/employee/index.js | 52 + .../Bill-details/billDetails.js | 541 +++++ .../Bill-details/billDetailsConfig.js | 231 ++ .../payment-collect/ManualReciept/index.js | 77 + .../employee/payment-collect/card/index.js | 98 + .../employee/payment-collect/cheque/index.js | 145 ++ .../employee/payment-collect/index.js | 369 ++++ .../src/payments/employee/response/index.js | 278 +++ .../modules/common/src/payments/index.js | 33 + .../packages/modules/core/README.md | 104 + .../packages/modules/core/package.json | 36 + .../packages/modules/core/src/App.js | 80 + .../packages/modules/core/src/Module.js | 118 + .../modules/core/src/components/AppModules.js | 59 + .../modules/core/src/components/Background.js | 7 + .../modules/core/src/components/ChangeCity.js | 92 + .../core/src/components/ChangeLanguage.js | 50 + .../src/components/Dialog/LogoutDialog.js | 114 + .../core/src/components/ErrorBoundaries.js | 57 + .../core/src/components/ErrorComponent.js | 46 + .../modules/core/src/components/Header.js | 20 + .../modules/core/src/components/Home.js | 147 ++ .../Search/MobileSearchApplication.js | 174 ++ .../src/components/Search/SearchFields.js | 29 + .../core/src/components/Search/index.js | 208 ++ .../TopBarSideBar/SideBar/CitizenSideBar.js | 249 +++ .../TopBarSideBar/SideBar/EmployeeSideBar.js | 154 ++ .../TopBarSideBar/SideBar/SideBar.js | 230 ++ .../SideBar/StaticCitizenSideBar.js | 247 +++ .../TopBarSideBar/SideBar/SubMenu.js | 195 ++ .../components/TopBarSideBar/SideBar/index.js | 23 + .../src/components/TopBarSideBar/TopBar.js | 157 ++ .../src/components/TopBarSideBar/index.js | 78 + .../modules/core/src/components/utils.js | 22 + .../modules/core/src/config/sidebar-menu.js | 33 + .../modules/core/src/context/index.js | 3 + .../modules/core/src/hooks/useInterval.js | 20 + .../src/pages/citizen/Allservices/index.js | 25 + .../core/src/pages/citizen/FAQs/FAQs.js | 39 + .../src/pages/citizen/FAQs/FaqComponent.js | 27 + .../citizen/Home/ImageUpload/UploadDrawer.js | 96 + .../pages/citizen/Home/LanguageSelection.js | 48 + .../pages/citizen/Home/LocationSelection.js | 64 + .../src/pages/citizen/Home/UserProfile.js | 703 ++++++ .../core/src/pages/citizen/Home/index.js | 173 ++ .../pages/citizen/HowItWorks/howItWorks.js | 123 ++ .../pages/citizen/Login/SelectMobileNumber.js | 18 + .../src/pages/citizen/Login/SelectName.js | 8 + .../core/src/pages/citizen/Login/SelectOtp.js | 51 + .../core/src/pages/citizen/Login/config.js | 52 + .../core/src/pages/citizen/Login/index.js | 270 +++ .../core/src/pages/citizen/SearchApp.js | 88 + .../StaticDynamicCard.js | 269 +++ .../modules/core/src/pages/citizen/index.js | 227 ++ .../employee/ChangePassword/changePassword.js | 168 ++ .../pages/employee/ChangePassword/config.js | 28 + .../pages/employee/ChangePassword/index.js | 33 + .../pages/employee/ForgotPassword/config.js | 23 + .../employee/ForgotPassword/forgotPassword.js | 142 ++ .../pages/employee/ForgotPassword/index.js | 33 + .../pages/employee/LanguageSelection/index.js | 60 + .../core/src/pages/employee/Login/config.js | 46 + .../core/src/pages/employee/Login/index.js | 52 + .../core/src/pages/employee/Login/login.js | 158 ++ .../modules/core/src/pages/employee/index.js | 137 ++ .../modules/core/src/redux/reducers/index.js | 8 + .../packages/modules/core/src/redux/store.js | 24 + .../packages/modules/dss/README.md | 193 ++ .../packages/modules/dss/package.json | 45 + .../packages/modules/dss/src/Module.js | 108 + .../dss/src/components/ArrowDownward.js | 14 + .../modules/dss/src/components/ArrowUpward.js | 14 + .../dss/src/components/CustomAreaChart.js | 353 +++ .../dss/src/components/CustomBarChart.js | 143 ++ .../dss/src/components/CustomFilter.js | 262 +++ .../components/CustomHorizontalBarChart.js | 248 +++ .../dss/src/components/CustomPieChart.js | 306 +++ .../modules/dss/src/components/CustomTable.js | 429 ++++ .../modules/dss/src/components/DSSCard.js | 82 + .../modules/dss/src/components/DateRange.js | 222 ++ .../dss/src/components/FilterContext.js | 4 + .../modules/dss/src/components/Filters.js | 149 ++ .../dss/src/components/FiltersNational.js | 110 + .../dss/src/components/GenericChart.js | 148 ++ .../modules/dss/src/components/Layout.js | 148 ++ .../modules/dss/src/components/MapChart.js | 208 ++ .../modules/dss/src/components/MetricChart.js | 218 ++ .../modules/dss/src/components/NoData.js | 8 + .../modules/dss/src/components/Summary.js | 115 + .../modules/dss/src/components/Switch.js | 30 + .../modules/dss/src/components/common/Icon.js | 77 + .../dss/src/components/india.topo.json | 1 + .../dss/src/components/mapDrillDownTable.js | 133 ++ .../modules/dss/src/images/Arrow_Downward.svg | 18 + .../modules/dss/src/images/Arrow_Right.svg | 3 + .../modules/dss/src/images/Arrow_Upward.svg | 18 + .../packages/modules/dss/src/images/Digit.png | Bin 0 -> 9137 bytes .../modules/dss/src/images/birth_death.svg | 3 + .../dss/src/images/building_permission.svg | 3 + .../modules/dss/src/images/complaints.svg | 4 + .../modules/dss/src/images/dashboards.svg | 18 + .../modules/dss/src/images/download.svg | 6 + .../modules/dss/src/images/finance.svg | 3 + .../modules/dss/src/images/fire-noc.svg | 13 + .../dss/src/images/firenocdashboard.svg | 3 + .../packages/modules/dss/src/images/fsm.svg | 4 + .../packages/modules/dss/src/images/home.svg | 1 + .../modules/dss/src/images/icon-calendar.svg | 6 + .../dss/src/images/icon-department.svg | 6 + .../modules/dss/src/images/icon-districts.svg | 6 + .../modules/dss/src/images/icon-ul-bs.svg | 6 + .../modules/dss/src/images/mcollect.svg | 3 + .../packages/modules/dss/src/images/obps.svg | 4 + .../modules/dss/src/images/property-tax.svg | 3 + .../dss/src/images/propertytax_nurt.svg | 3 + .../packages/modules/dss/src/images/shape.svg | 3 + .../packages/modules/dss/src/images/share.svg | 6 + .../modules/dss/src/images/trade-license.svg | 3 + .../modules/dss/src/images/tradeLic_nurt.svg | 4 + .../modules/dss/src/images/w&s_nurt.svg | 3 + .../modules/dss/src/images/water_sewerage.svg | 3 + .../packages/modules/dss/src/pages/About.js | 43 + .../modules/dss/src/pages/DrillDown.js | 276 +++ .../dss/src/pages/FAQs/FAQComponent.js | 59 + .../modules/dss/src/pages/FAQs/FAQs.js | 32 + .../packages/modules/dss/src/pages/Home.js | 501 +++++ .../modules/dss/src/pages/Overview.js | 25 + .../packages/modules/dss/src/pages/index.js | 491 +++++ .../packages/modules/engagement/README.md | 72 + .../packages/modules/engagement/package.json | 39 + .../packages/modules/engagement/src/Module.js | 308 +++ .../components/Documents/ApplicationCard.js | 108 + .../src/components/Documents/DesktopInbox.js | 115 + .../src/components/Documents/DocumentCard.js | 81 + .../components/Documents/DocumentDetails.js | 130 ++ .../Documents/DocumentNotificationTable.js | 42 + .../components/Documents/EngagementDocsULB.js | 77 + .../Documents/EngagementULBDropdown.js | 28 + .../src/components/Documents/Filter.js | 77 + .../src/components/Documents/MobileInbox.js | 62 + .../src/components/Documents/Search.js | 148 ++ .../src/components/Documents/Searchbar.js | 26 + .../Documents/engagement-doc-category.js | 44 + .../Documents/engagement-doc-description.js | 33 + .../Documents/engagement-doc-documents.js | 131 ++ .../Documents/engagement-doc-name.js | 18 + .../src/components/EngagementCard.js | 168 ++ .../src/components/Events/ApplicationCard.js | 106 + .../src/components/Events/ApplicationTable.js | 40 + .../src/components/Events/DesktopInbox.js | 110 + .../src/components/Events/DocumentDetails.js | 117 + .../src/components/Events/DropdownUlb.js | 10 + .../src/components/Events/EventForm.js | 84 + .../src/components/Events/EventLink.js | 37 + .../src/components/Events/Filter.js | 70 + .../src/components/Events/MobileInbox.js | 51 + .../src/components/Events/Search.js | 139 ++ .../components/Events/SelectGeoLocation.js | 22 + .../src/components/Events/SelectToDate.js | 38 + .../src/components/Events/Status.js | 23 + .../src/components/Events/StatusCount.js | 18 + .../components/Messages/ApplicationCard.js | 114 + .../components/Messages/ApplicationTable.js | 40 + .../Messages/BroadcastWhatsNewCard.js | 76 + .../src/components/Messages/DesktopInbox.js | 108 + .../components/Messages/DocumentDetails.js | 129 ++ .../src/components/Messages/DropdownUlb.js | 10 + .../src/components/Messages/EventLink.js | 37 + .../src/components/Messages/Filter.js | 70 + .../src/components/Messages/MessageForm.js | 165 ++ .../src/components/Messages/MobileInbox.js | 58 + .../src/components/Messages/Search.js | 152 ++ .../components/Messages/SelectGeoLocation.js | 22 + .../src/components/Messages/SelectToDate.js | 38 + .../src/components/Messages/Status.js | 23 + .../src/components/Messages/StatusCount.js | 18 + .../src/components/Modal/Confirmation.js | 58 + .../src/components/Modal/Surveys/Delete.js | 48 + .../components/Modal/Surveys/MarkActive.js | 140 ++ .../components/Modal/Surveys/MarkInActive.js | 60 + .../components/Surveys/CitizenSurveyForm.js | 42 + .../Surveys/CitizenSurveyQuestion.js | 205 ++ .../Surveys/EditSurveyForms/index.js | 78 + .../Surveys/ResultsView/CheckBoxChart.js | 52 + .../Surveys/ResultsView/McqChart.js | 89 + .../Surveys/ResultsView/SurveyDetailsView.js | 66 + .../Surveys/ResultsView/SurveyResultsView.js | 258 +++ .../Surveys/ResultsView/WhoHasResponded.js | 40 + .../Surveys/ResultsView/bindquesansutil.js | 37 + .../SurveyForms/AnswerTypes/Checkboxes.js | 49 + .../SurveyForms/AnswerTypes/MultipleChoice.js | 49 + .../Surveys/SurveyForms/NewSurveyForm.js | 231 ++ .../Surveys/SurveyForms/SurveyDetailsForms.js | 138 ++ .../Surveys/SurveyForms/SurveyFormsMaker.js | 67 + .../Surveys/SurveyForms/SurveySettingsForm.js | 142 ++ .../components/Surveys/SurveyForms/index.js | 63 + .../src/components/Surveys/SurveyListCard.js | 25 + .../engagement/src/config/NewEventConfig.js | 117 + .../engagement/src/config/NewMessageConfig.js | 117 + .../engagement/src/config/doc-create.js | 37 + .../engagement/src/config/doc-update.js | 38 + .../engagement/src/hooks/useDebounce.js | 18 + .../pages/citizen/CitizenSurvey/FillSurvey.js | 47 + .../pages/citizen/CitizenSurvey/Response.js | 74 + .../pages/citizen/CitizenSurvey/ShowSurvey.js | 54 + .../pages/citizen/CitizenSurvey/SurveyList.js | 123 ++ .../citizen/Documents/DocumentCategories.js | 102 + .../pages/citizen/Documents/DocumentList.js | 88 + .../pages/citizen/Documents/ViewDocument.js | 75 + .../EventsListOnGround/EventDetails.js | 65 + .../pages/citizen/EventsListOnGround/index.js | 47 + .../pages/citizen/NotificationsAndWhatsNew.js | 88 + .../engagement/src/pages/citizen/index.js | 40 + .../Inbox/FilterFieldsComponent.js | 31 + .../Inbox/SearchFieldsComponents.js | 71 + .../employee/CitizenSurveys/Inbox/index.js | 137 ++ .../Inbox/useInboxMobileDataCard.js | 22 + .../Inbox/useInboxTableConfig.js | 112 + .../employee/CitizenSurveys/NewSurvey.js | 95 + .../employee/CitizenSurveys/SurveyDetails.js | 244 ++ .../employee/CitizenSurveys/SurveyResults.js | 75 + .../pages/employee/CitizenSurveys/index.js | 28 + .../CitizenSurveys/responses/create.js | 99 + .../CitizenSurveys/responses/delete.js | 70 + .../CitizenSurveys/responses/update.js | 65 + .../pages/employee/Documents/Inbox/index.js | 127 ++ .../employee/Documents/delete-response.js | 59 + .../pages/employee/Documents/doc-update.js | 42 + .../employee/Documents/documents-create.js | 56 + .../employee/Documents/documents-update.js | 68 + .../src/pages/employee/Documents/response.js | 58 + .../employee/Documents/update-response.js | 60 + .../pages/employee/Events/EditEvent/index.js | 99 + .../src/pages/employee/Events/EventDetails.js | 112 + .../src/pages/employee/Events/Inbox/index.js | 141 ++ .../employee/Events/NewEvent/Response.js | 130 ++ .../pages/employee/Events/NewEvent/index.js | 61 + .../pages/employee/Messages/EditMessage.js | 90 + .../src/pages/employee/Messages/Inbox.js | 141 ++ .../src/pages/employee/Messages/Inbox_DEMO.js | 177 ++ .../pages/employee/Messages/MessageDetails.js | 152 ++ .../employee/Messages/NewMessage/Response.js | 113 + .../employee/Messages/NewMessage/index.js | 57 + .../src/pages/employee/Messages/index.js | 23 + .../engagement/src/utils/SurveyInfoLabel.js | 30 + .../modules/engagement/src/utils/index.js | 161 ++ .../packages/modules/hrms/README.md | 75 + .../packages/modules/hrms/package.json | 29 + .../packages/modules/hrms/src/Module.js | 68 + .../hrms/src/components/EmployeeAction.js | 169 ++ .../hrms/src/components/InboxFilter.js | 236 ++ .../components/Modal/EmployeeActivation.js | 72 + .../components/Modal/EmployeeAppliaction.js | 70 + .../hrms/src/components/Modal/index.js | 8 + .../hrms/src/components/Utils/cleanup.js | 14 + .../hrms/src/components/Utils/index.js | 70 + .../hrms/src/components/config/config.js | 112 + .../modules/hrms/src/components/hrmscard.js | 45 + .../src/components/inbox/ApplicationCard.js | 153 ++ .../src/components/inbox/ApplicationLinks.js | 43 + .../src/components/inbox/ApplicationTable.js | 19 + .../hrms/src/components/inbox/DesktopInbox.js | 189 ++ .../hrms/src/components/inbox/MobileInbox.js | 76 + .../hrms/src/components/inbox/search.js | 117 + .../src/components/pageComponents/Banner.js | 15 + .../components/pageComponents/EmployeeDOB.js | 52 + .../pageComponents/EmployeePhoneNumber.js | 73 + .../components/pageComponents/Multiselect.js | 85 + .../pageComponents/SelectDateofEmployment.js | 54 + .../pageComponents/SelectEmailId.js | 53 + .../SelectEmployeeCorrespondenceAddress.js | 54 + .../pageComponents/SelectEmployeeGender.js | 82 + .../pageComponents/SelectEmployeeId.js | 50 + .../pageComponents/SelectEmployeeName.js | 54 + .../pageComponents/SelectEmployeeType.js | 57 + .../components/pageComponents/assignment.js | 307 +++ .../components/pageComponents/jurisdiction.js | 317 +++ .../hrms/src/pages/EditEmployee/EditForm.js | 236 ++ .../hrms/src/pages/EditEmployee/index.js | 16 + .../modules/hrms/src/pages/EmployeeDetails.js | 225 ++ .../packages/modules/hrms/src/pages/Inbox.js | 154 ++ .../modules/hrms/src/pages/Response.js | 116 + .../modules/hrms/src/pages/createEmployee.js | 234 ++ .../packages/modules/hrms/src/pages/index.js | 59 + .../Modal/AttendanceActionModal.js | 133 ++ .../Modal/BPAActionModal.js | 283 +++ .../Modal/BPAREGActionModal.js | 153 ++ .../Modal/ExpenditureActionModal.js | 190 ++ .../Modal/FSMActionModal.js | 298 +++ .../Modal/NOCActionModal.js | 169 ++ .../ApplicationDetails/Modal/PTActionModal.js | 190 ++ .../ApplicationDetails/Modal/TLActionModal.js | 166 ++ .../Modal/WNSActionModal.js | 261 +++ .../Modal/WorksActionModal.js | 262 +++ .../ApplicationDetails/Modal/index.js | 49 + .../components/ApplicationDetailsActionBar.js | 80 + .../components/ApplicationDetailsContent.js | 484 ++++ .../components/ApplicationDetailsToast.js | 74 + .../ApplicationDetailsWarningPopup.js | 54 + .../components/BPADocuments.js | 234 ++ .../components/DocumentsPreview.js | 49 + .../components/InfoDetails.js | 34 + .../components/InspectionReport.js | 49 + .../components/NOCDocuments.js | 202 ++ .../components/PermissionCheck.js | 87 + .../components/PropertyDocuments.js | 83 + .../components/PropertyEstimates.js | 39 + .../components/PropertyFloors.js | 49 + .../components/PropertyOwners.js | 94 + .../ApplicationDetails/components/Reason.js | 10 + .../components/ScruntinyDetails.js | 46 + .../components/SubOccupancyTable.js | 126 ++ .../components/SubWorkTableDetails.js | 77 + .../components/TLCaption.js | 34 + .../components/TLTradeAccessories.js | 52 + .../components/TLTradeUnits.js | 51 + .../components/ViewBreakup.js | 73 + .../components/WSAdditonalDetails.js | 399 ++++ .../components/WSFeeEstimation.js | 346 +++ .../components/WeekDateRange.js | 30 + .../ApplicationDetails/config/AcceptDso.js | 45 + .../ApplicationDetails/config/AssignDso.js | 115 + .../config/BPAApproverApplication.js | 77 + .../config/BPAREGApproverApplication.js | 71 + .../config/CompleteApplication.js | 46 + .../config/NOCApproverApplication.js | 79 + .../config/PTApproverApplication.js | 66 + .../config/PTAssessProperty.js | 26 + .../ApplicationDetails/config/ReassignDso.js | 101 + .../config/RejectApplication.js | 31 + .../config/TLApproverApplication.js | 83 + .../config/WSApproverApplication.js | 73 + .../config/WSDisconnectApplication.js | 89 + .../config/configApproveModal.js | 53 + .../config/configAttendanceApproveModal.js | 27 + .../config/configAttendanceCheckModal.js | 93 + .../config/configAttendanceRejectModal.js | 61 + .../config/configCheckModal.js | 105 + .../config/configRejectModal.js | 127 ++ .../config/configViewBillApproveModal.js | 57 + .../config/configViewBillCheckModal.js | 107 + .../config/configViewBillRejectModal.js | 59 + .../ApplicationDetails/config/index.js | 47 + .../templates/ApplicationDetails/index.js | 368 ++++ .../packages/modules/utilities/README.md | 147 ++ .../packages/modules/utilities/package.json | 39 + .../packages/modules/utilities/src/Module.js | 33 + .../employee/DynamicCreateComponent/index.js | 51 + .../employee/DynamicSearchComponent/index.js | 62 + .../pages/employee/IFrameInterface/index.js | 51 + .../employee/WorkflowComponentTest/index.js | 28 + .../utilities/src/pages/employee/index.js | 46 + .../packages/modules/workbench/README.md | 134 ++ .../packages/modules/workbench/package.json | 44 + .../packages/modules/workbench/src/Module.js | 89 + .../workbench/src/components/Checbox.js | 18 + .../workbench/src/components/DigitJSONForm.js | 351 +++ .../workbench/src/components/DigitLoader.js | 8 + .../workbench/src/components/GenerateXlsx.js | 35 + .../workbench/src/components/HRMSCard.js | 44 + .../workbench/src/components/MultiSelect.js | 96 + .../workbench/src/components/WorkbenchCard.js | 54 + .../workbench/src/configs/EditModalConfig.js | 61 + .../src/configs/LocalisationSearchConfig.js | 140 ++ .../workbench/src/configs/UICustomizations.js | 670 ++++++ .../workbench/src/configs/sampleschema.js | 118 + .../src/configs/searchLocalisationConfig.js | 184 ++ .../workbench/src/configs/searchMDMSConfig.js | 188 ++ .../modules/workbench/src/hooks/index.js | 39 + .../modules/workbench/src/hooks/logout.js | 48 + .../src/hooks/useLocalisationSearch.js | 30 + .../modules/workbench/src/hooks/workbench.js | 74 + .../src/pages/employee/LocalisationAdd.js | 795 +++++++ .../src/pages/employee/LocalisationSearch.js | 155 ++ .../workbench/src/pages/employee/MDMSAdd.js | 141 ++ .../workbench/src/pages/employee/MDMSAddV2.js | 226 ++ .../workbench/src/pages/employee/MDMSEdit.js | 134 ++ .../src/pages/employee/MDMSManageMaster.js | 204 ++ .../src/pages/employee/MDMSSearch.js | 96 + .../src/pages/employee/MDMSSearchv2.js | 242 ++ .../workbench/src/pages/employee/MDMSView.js | 136 ++ .../workbench/src/pages/employee/index.js | 125 ++ .../modules/workbench/src/services/Search.js | 182 ++ .../workbench/src/utils/LocAddReducer.js | 32 + .../workbench/src/utils/LocalisationSearch.js | 44 + .../workbench/src/utils/ParsingUtils.js | 83 + .../modules/workbench/src/utils/index.js | 271 +++ .../react-components/.storybook/main.js | 4 + .../react-components/.storybook/preview.js | 9 + .../packages/react-components/README.md | 115 + .../react-components/docker/Dockerfile | 21 + .../react-components/docker/nginx.conf | 12 + .../packages/react-components/envs.js | 0 .../packages/react-components/package.json | 83 + .../react-components/public/index.html | 28 + .../react-components/src/atoms/ActionBar.js | 11 + .../react-components/src/atoms/ActionLinks.js | 5 + .../react-components/src/atoms/Amount.js | 12 + .../src/atoms/AppContainer.js | 13 + .../src/atoms/ApplyFilterBar.js | 16 + .../react-components/src/atoms/BackButton.js | 16 + .../react-components/src/atoms/Banner.js | 82 + .../src/atoms/Banner.stories.js | 23 + .../react-components/src/atoms/Body.js | 7 + .../react-components/src/atoms/BreadCrumb.js | 43 + .../react-components/src/atoms/BreakLine.js | 7 + .../react-components/src/atoms/Button.js | 76 + .../src/atoms/ButtonSelector.js | 49 + .../src/atoms/ButtonSelector.stories.js | 24 + .../react-components/src/atoms/Card.js | 24 + .../src/atoms/CardBasedOptions.js | 28 + .../react-components/src/atoms/CardCaption.js | 11 + .../react-components/src/atoms/CardHeader.js | 7 + .../react-components/src/atoms/CardLabel.js | 11 + .../src/atoms/CardLabelDesc.js | 11 + .../src/atoms/CardLabelError.js | 11 + .../src/atoms/CardSectionHeader.js | 11 + .../src/atoms/CardSectionSubText.js | 11 + .../src/atoms/CardSubHeader.js | 16 + .../react-components/src/atoms/CardText.js | 11 + .../src/atoms/CardTextButton.js | 7 + .../react-components/src/atoms/CheckBox.js | 93 + .../src/atoms/CheckBox.stories.js | 16 + .../src/atoms/CitizenConsentForm.js | 71 + .../src/atoms/CitizenHomeCard.js | 26 + .../src/atoms/CitizenInfoLabel.js | 22 + .../src/atoms/CollapseAndExpandGroups.js | 46 + .../src/atoms/ConnectingCheckPoints.js | 59 + .../atoms/ConnectingCheckPoints.stories.js | 19 + .../src/atoms/CustomButton.js | 13 + .../react-components/src/atoms/DatePicker.js | 72 + .../react-components/src/atoms/DateWrap.js | 25 + .../src/atoms/DateWrap.stories.js | 19 + .../src/atoms/DescriptionText.js | 23 + .../src/atoms/DescriptionText.stories.js | 16 + .../src/atoms/DisplayPhotos.js | 43 + .../src/atoms/DisplayPhotos.stories.js | 20 + .../react-components/src/atoms/Dropdown.js | 295 +++ .../src/atoms/Dropdown.stories.js | 18 + .../src/atoms/EllipsisMenu.js | 33 + .../src/atoms/EmployeeAppContainer.js | 7 + .../src/atoms/EmployeeModuleCard.js | 85 + .../src/atoms/ErrorMessage.js | 25 + .../src/atoms/EventCalendarView.js | 14 + .../react-components/src/atoms/GreyOutText.js | 5 + .../react-components/src/atoms/Hamburger.js | 10 + .../react-components/src/atoms/Header.js | 11 + .../react-components/src/atoms/HeaderBar.js | 26 + .../src/atoms/HeaderBar.stories.js | 18 + .../react-components/src/atoms/HomeLink.js | 21 + .../src/atoms/HomeLink.stories.js | 22 + .../src/atoms/HorizontalNav.js | 42 + .../src/atoms/ImageUploadHandler.js | 112 + .../react-components/src/atoms/ImageViewer.js | 24 + .../src/atoms/ImageViewer.stories.js | 21 + .../react-components/src/atoms/InboxLinks.js | 33 + .../src/atoms/InboxSearchLinks.js | 43 + .../react-components/src/atoms/InfoBanner.js | 16 + .../src/atoms/InputTextAmount.js | 408 ++++ .../react-components/src/atoms/KeyNote.js | 38 + .../src/atoms/KeyNote.stories.js | 17 + .../react-components/src/atoms/Label.js | 7 + .../src/atoms/LabelFieldPair.js | 11 + .../react-components/src/atoms/LinkButton.js | 25 + .../src/atoms/LinkButton.stories.js | 16 + .../react-components/src/atoms/LinkLabel.js | 11 + .../react-components/src/atoms/Loader.js | 23 + .../src/atoms/Loader.stories.js | 20 + .../src/atoms/LocationSearch.js | 394 ++++ .../react-components/src/atoms/Menu.js | 30 + .../src/atoms/Menu.stories.js | 15 + .../src/atoms/MobileNumber.js | 67 + .../src/atoms/Modals/WorkflowPopup.js | 112 + .../Modals/config/configEstimateModal.js | 400 ++++ .../src/atoms/Modals/index.js | 13 + .../react-components/src/atoms/MultiLink.js | 45 + .../src/atoms/MultiSelectDropdown.js | 142 ++ .../react-components/src/atoms/NavBar.js | 194 ++ .../src/atoms/NoResultsFound.js | 15 + .../react-components/src/atoms/OTPInput.js | 98 + .../src/atoms/OTPInput.stories.js | 16 + .../src/atoms/OpenLinkContainer.js | 29 + .../react-components/src/atoms/Paragraph.js | 11 + .../react-components/src/atoms/PopUp.js | 7 + .../src/atoms/PopupHeadingLabel.js | 20 + .../src/atoms/PrivateRoute.js | 29 + .../src/atoms/RadioButtons.js | 91 + .../src/atoms/RadioButtons.stories.js | 19 + .../react-components/src/atoms/Rating.js | 45 + .../src/atoms/Rating.stories.js | 18 + .../react-components/src/atoms/Reason.js | 29 + .../src/atoms/RemoveableTag.js | 13 + .../src/atoms/RoundedLabel.js | 5 + .../react-components/src/atoms/SVG.js | 1561 +++++++++++++ .../src/atoms/SearchComponent.js | 160 ++ .../src/atoms/SearchableDropdown.js | 312 +++ .../src/atoms/SectionalDropdown.js | 90 + .../src/atoms/StandaloneSearchBar.js | 10 + .../react-components/src/atoms/StatusTable.js | 108 + .../react-components/src/atoms/SubMenu.js | 105 + .../react-components/src/atoms/SubmitBar.js | 41 + .../src/atoms/SubmitBar.stories.js | 28 + .../react-components/src/atoms/TLCaption.js | 40 + .../react-components/src/atoms/Table.js | 274 +++ .../react-components/src/atoms/TelePhone.js | 27 + .../src/atoms/TelePhone.stories.js | 16 + .../react-components/src/atoms/TextArea.js | 45 + .../src/atoms/TextArea.stories.js | 18 + .../react-components/src/atoms/TextInput.js | 152 ++ .../src/atoms/TextInput.stories.js | 19 + .../react-components/src/atoms/Toast.js | 64 + .../src/atoms/Toast.stories.js | 16 + .../src/atoms/ToggleSwitch.js | 37 + .../react-components/src/atoms/TopBar.js | 72 + .../src/atoms/TopBar.stories.js | 16 + .../react-components/src/atoms/ULBHomeCard.js | 38 + .../src/atoms/UnMaskComponent.js | 52 + .../react-components/src/atoms/UploadFile.js | 242 ++ .../src/atoms/UploadImages.js | 50 + .../src/atoms/UploadImages.stories.js | 21 + .../src/atoms/ViewDetailsCard.js | 31 + .../react-components/src/atoms/ViewImages.js | 53 + .../react-components/src/atoms/WeekPicker.js | 12 + .../src/atoms/WhatsNewCard.js | 20 + .../src/atoms/WorkflowActions.js | 212 ++ .../src/atoms/WorkflowTimeline.js | 133 ++ .../src/atoms/amtUtils/index.js | 414 ++++ .../react-components/src/atoms/svgindex.js | 1953 +++++++++++++++++ .../react-components/src/context/index.js | 1 + .../src/hoc/FileUploadModal.js | 77 + .../react-components/src/hoc/FormComposer.js | 646 ++++++ .../src/hoc/FormComposerV2.js | 884 ++++++++ .../InboxComposer/MobileComponentDirectory.js | 59 + .../src/hoc/InboxComposer/index.js | 297 +++ .../src/hoc/InboxSearchComposer.js | 324 +++ .../src/hoc/InboxSearchComposerContext.js | 4 + .../src/hoc/InboxSearchComposerReducer.js | 39 + .../hoc/MobileView/MobileSearchComponent.js | 186 ++ .../src/hoc/MobileView/MobileSearchResults.js | 193 ++ .../react-components/src/hoc/Modal.js | 55 + .../src/hoc/ResponseComposer.js | 61 + .../react-components/src/hoc/ResultsTable.js | 218 ++ .../src/hoc/SubformComposer.js | 38 + .../src/hoc/UploadFileComposer.js | 154 ++ .../react-components/src/hoc/formUtils.js | 26 + .../packages/react-components/src/index.js | 576 +++++ .../src/molecules/ApiDropdown.js | 74 + .../src/molecules/CityMohalla.js | 76 + .../src/molecules/CityMohalla.stories.js | 26 + .../src/molecules/CustomDropdown.js | 144 ++ .../src/molecules/DashboardBox.js | 68 + .../src/molecules/DateRange.js | 171 ++ .../src/molecules/DateRangeNew.js | 167 ++ .../src/molecules/DetailsCard.js | 92 + .../src/molecules/DetailsCard.stories.js | 16 + .../src/molecules/FilterAction.js | 12 + .../src/molecules/FilterForm.js | 74 + .../src/molecules/FormStep.js | 110 + .../src/molecules/FormStep.stories.js | 18 + .../src/molecules/InputCard.js | 60 + .../src/molecules/InputCard.stories.js | 22 + .../src/molecules/Localities.js | 29 + .../src/molecules/LocationDropdownWrapper.js | 97 + .../src/molecules/LocationSearchCard.js | 107 + .../molecules/LocationSearchCard.stories.js | 20 + .../src/molecules/MultiUploadWrapper.js | 145 ++ .../src/molecules/OnGroundEventCard.js | 28 + .../src/molecules/PageBasedInput.js | 19 + .../src/molecules/PitDimension.js | 52 + .../src/molecules/RadioOrSelect.js | 55 + .../src/molecules/RatingCard.js | 108 + .../src/molecules/RatingCard.stories.js | 37 + .../src/molecules/RenderFormFields.js | 349 +++ .../src/molecules/SearchAction.js | 10 + .../src/molecules/SearchForm.js | 44 + .../src/molecules/SearchOnRadioButtons.js | 27 + .../src/molecules/SortAction.js | 12 + .../src/molecules/TextInputCard.js | 58 + .../src/molecules/TextInputCard.stories.js | 23 + .../src/molecules/TypeSelectCard.js | 50 + .../src/molecules/TypeSelectCard.stories.js | 22 + .../src/molecules/UploadPitPhoto.js | 146 ++ .../src/molecules/WorkflowModal.js | 52 + .../src/molecules/WorkflowStatusFilter.js | 56 + .../react-components/src/stories/Button.js | 50 + .../src/stories/Button.stories.js | 36 + .../react-components/src/stories/Header.js | 43 + .../src/stories/Header.stories.js | 18 + .../src/stories/Introduction.stories.mdx | 207 ++ .../react-components/src/stories/Page.js | 64 + .../src/stories/Page.stories.js | 21 + .../src/stories/assets/code-brackets.svg | 1 + .../src/stories/assets/colors.svg | 1 + .../src/stories/assets/comments.svg | 1 + .../src/stories/assets/direction.svg | 1 + .../src/stories/assets/flow.svg | 1 + .../src/stories/assets/plugin.svg | 1 + .../src/stories/assets/repo.svg | 1 + .../src/stories/assets/stackalt.svg | 1 + .../react-components/src/stories/button.css | 30 + .../react-components/src/stories/header.css | 26 + .../react-components/src/stories/page.css | 69 + .../svg-components/.storybook/main.js | 9 + .../svg-components/.storybook/preview.js | 48 + .../packages/svg-components/README.md | 90 + .../packages/svg-components/docker/Dockerfile | 20 + .../packages/svg-components/docker/nginx.conf | 12 + .../packages/svg-components/package.json | 66 + .../packages/svg-components/public/index.html | 40 + .../packages/svg-components/src/index.css | 8 + .../packages/svg-components/src/index.js | 1567 +++++++++++++ .../svg-components/src/svg/Accessibility.js | 45 + .../src/svg/Accessibility.stories.js | 30 + .../src/svg/AccessibilityNew.js | 44 + .../src/svg/AccessibilityNew.stories.js | 29 + .../svg-components/src/svg/Accessible.js | 45 + .../src/svg/Accessible.stories.js | 29 + .../src/svg/AccessibleForward.js | 48 + .../src/svg/AccessibleForward.stories.js | 29 + .../svg-components/src/svg/AccountBalance.js | 45 + .../src/svg/AccountBalance.stories.js | 29 + .../src/svg/AccountBalanceWallet.js | 44 + .../src/svg/AccountBalanceWallet.stories.js | 29 + .../svg-components/src/svg/AccountBox.js | 44 + .../src/svg/AccountBox.stories.js | 29 + .../svg-components/src/svg/AccountCircle.js | 44 + .../src/svg/AccountCircle.stories.js | 29 + .../svg-components/src/svg/AddAlert.js | 35 + .../src/svg/AddAlert.stories.js | 29 + .../svg-components/src/svg/AddBusiness.js | 34 + .../src/svg/AddBusiness.stories.js | 29 + .../svg-components/src/svg/AddChart.js | 35 + .../src/svg/AddChart.stories.js | 29 + .../svg-components/src/svg/AddExpense.js | 36 + .../src/svg/AddExpense.stories.js | 29 + .../svg-components/src/svg/AddExpenseTwo.js | 35 + .../src/svg/AddExpenseTwo.stories.js | 29 + .../svg-components/src/svg/AddIcCall.js | 35 + .../src/svg/AddIcCall.stories.js | 29 + .../svg-components/src/svg/AddLocation.js | 35 + .../src/svg/AddLocation.stories.js | 29 + .../svg-components/src/svg/AddLocationAlt.js | 35 + .../src/svg/AddLocationAlt.stories.js | 29 + .../svg-components/src/svg/AddModerator.js | 35 + .../src/svg/AddModerator.stories.js | 29 + .../svg-components/src/svg/AddRoad.js | 37 + .../svg-components/src/svg/AddRoad.stories.js | 29 + .../svg-components/src/svg/AddShoppingCart.js | 35 + .../src/svg/AddShoppingCart.stories.js | 29 + .../svg-components/src/svg/AddTask.js | 35 + .../svg-components/src/svg/AddTask.stories.js | 29 + .../svg-components/src/svg/AddToDrive.js | 35 + .../src/svg/AddToDrive.stories.js | 29 + .../src/svg/AdminPanelSettings.js | 39 + .../src/svg/AdminPanelSettings.stories.js | 29 + .../svg-components/src/svg/Agriculture.js | 44 + .../src/svg/Agriculture.stories.js | 29 + .../packages/svg-components/src/svg/Alarm.js | 35 + .../svg-components/src/svg/Alarm.stories.js | 29 + .../svg-components/src/svg/AlarmAdd.js | 35 + .../src/svg/AlarmAdd.stories.js | 29 + .../svg-components/src/svg/AlarmOff.js | 35 + .../src/svg/AlarmOff.stories.js | 29 + .../svg-components/src/svg/AlarmOn.js | 35 + .../svg-components/src/svg/AlarmOn.stories.js | 29 + .../svg-components/src/svg/AllInbox.js | 35 + .../src/svg/AllInbox.stories.js | 29 + .../packages/svg-components/src/svg/AllOut.js | 35 + .../svg-components/src/svg/AllOut.stories.js | 29 + .../svg-components/src/svg/AltRoute.js | 35 + .../src/svg/AltRoute.stories.js | 29 + .../svg-components/src/svg/AlternateEmail.js | 35 + .../src/svg/AlternateEmail.stories.js | 29 + .../svg-components/src/svg/Analytics.js | 35 + .../src/svg/Analytics.stories.js | 29 + .../packages/svg-components/src/svg/Anchor.js | 35 + .../svg-components/src/svg/Anchor.stories.js | 29 + .../svg-components/src/svg/Android.js | 35 + .../svg-components/src/svg/Android.stories.js | 29 + .../svg-components/src/svg/Announcement.js | 35 + .../src/svg/Announcement.stories.js | 29 + .../packages/svg-components/src/svg/Api.js | 35 + .../svg-components/src/svg/Api.stories.js | 29 + .../svg-components/src/svg/AppBlocking.js | 35 + .../src/svg/AppBlocking.stories.js | 29 + .../svg-components/src/svg/AppRegistration.js | 42 + .../src/svg/AppRegistration.stories.js | 29 + .../svg-components/src/svg/AppSettingsAlt.js | 35 + .../src/svg/AppSettingsAlt.stories.js | 29 + .../svg-components/src/svg/Approval.js | 35 + .../src/svg/Approval.stories.js | 29 + .../packages/svg-components/src/svg/Apps.js | 35 + .../svg-components/src/svg/Apps.stories.js | 29 + .../svg-components/src/svg/Architecture.js | 40 + .../src/svg/Architecture.stories.js | 29 + .../svg-components/src/svg/ArrowBack.js | 32 + .../src/svg/ArrowBack.stories.js | 29 + .../svg-components/src/svg/ArrowBackIos.js | 32 + .../src/svg/ArrowBackIos.stories.js | 29 + .../svg-components/src/svg/ArrowCircleDown.js | 35 + .../src/svg/ArrowCircleDown.stories.js | 29 + .../svg-components/src/svg/ArrowCircleUp.js | 35 + .../src/svg/ArrowCircleUp.stories.js | 29 + .../svg-components/src/svg/ArrowDownward.js | 32 + .../src/svg/ArrowDownward.stories.js | 29 + .../svg-components/src/svg/ArrowDropDown.js | 32 + .../src/svg/ArrowDropDown.stories.js | 29 + .../src/svg/ArrowDropDownCircle.js | 32 + .../src/svg/ArrowDropDownCircle.stories.js | 29 + .../svg-components/src/svg/ArrowDropUp.js | 32 + .../src/svg/ArrowDropUp.stories.js | 29 + .../svg-components/src/svg/ArrowForward.js | 32 + .../src/svg/ArrowForward.stories.js | 29 + .../svg-components/src/svg/ArrowForwardIos.js | 32 + .../src/svg/ArrowForwardIos.stories.js | 29 + .../src/svg/ArrowForwardIosAlt.js | 32 + .../src/svg/ArrowForwardIosAlt.stories.js | 29 + .../svg-components/src/svg/ArrowLeft.js | 32 + .../src/svg/ArrowLeft.stories.js | 29 + .../svg-components/src/svg/ArrowRight.js | 32 + .../src/svg/ArrowRight.stories.js | 29 + .../svg-components/src/svg/ArrowRightAlt.js | 32 + .../src/svg/ArrowRightAlt.stories.js | 29 + .../svg-components/src/svg/ArrowUpward.js | 32 + .../src/svg/ArrowUpward.stories.js | 29 + .../svg-components/src/svg/Article.js | 35 + .../svg-components/src/svg/Article.stories.js | 29 + .../svg-components/src/svg/AspectRatio.js | 35 + .../src/svg/AspectRatio.stories.js | 29 + .../svg-components/src/svg/Assessment.js | 35 + .../src/svg/Assessment.stories.js | 29 + .../svg-components/src/svg/Assignment.js | 35 + .../src/svg/Assignment.stories.js | 29 + .../svg-components/src/svg/AssignmentInd.js | 35 + .../src/svg/AssignmentInd.stories.js | 29 + .../svg-components/src/svg/AssignmentLate.js | 35 + .../src/svg/AssignmentLate.stories.js | 29 + .../src/svg/AssignmentReturn.js | 35 + .../src/svg/AssignmentReturn.stories.js | 29 + .../src/svg/AssignmentReturned.js | 35 + .../src/svg/AssignmentReturned.stories.js | 29 + .../src/svg/AssignmentTurnedIn.js | 35 + .../src/svg/AssignmentTurnedIn.stories.js | 29 + .../src/svg/AssistantDirection.js | 35 + .../src/svg/AssistantDirection.stories.js | 29 + .../src/svg/AssistantNavigation.js | 35 + .../src/svg/AssistantNavigation.stories.js | 29 + .../packages/svg-components/src/svg/Atm.js | 35 + .../svg-components/src/svg/Atm.stories.js | 29 + .../svg-components/src/svg/AttachEmail.js | 39 + .../src/svg/AttachEmail.stories.js | 29 + .../svg-components/src/svg/Attachment.js | 35 + .../src/svg/Attachment.stories.js | 29 + .../svg-components/src/svg/Attractions.js | 35 + .../src/svg/Attractions.stories.js | 29 + .../svg-components/src/svg/AutoDelete.js | 37 + .../src/svg/AutoDelete.stories.js | 29 + .../svg-components/src/svg/AutoRenew.js | 35 + .../src/svg/AutoRenew.stories.js | 29 + .../packages/svg-components/src/svg/Backup.js | 37 + .../svg-components/src/svg/Backup.stories.js | 30 + .../svg-components/src/svg/BackupTable.js | 38 + .../src/svg/BackupTable.stories.js | 30 + .../packages/svg-components/src/svg/Badge.js | 37 + .../svg-components/src/svg/Badge.stories.js | 30 + .../svg-components/src/svg/BakeryDining.js | 39 + .../src/svg/BakeryDining.stories.js | 30 + .../svg-components/src/svg/BatchPrediction.js | 37 + .../src/svg/BatchPrediction.stories.js | 30 + .../svg-components/src/svg/BeenHere.js | 37 + .../src/svg/BeenHere.stories.js | 30 + .../svg-components/src/svg/BikeScooter.js | 45 + .../src/svg/BikeScooter.stories.js | 30 + .../packages/svg-components/src/svg/Book.js | 37 + .../svg-components/src/svg/Book.stories.js | 30 + .../svg-components/src/svg/BookOnline.js | 37 + .../src/svg/BookOnline.stories.js | 30 + .../svg-components/src/svg/Bookmark.js | 34 + .../src/svg/Bookmark.stories.js | 30 + .../svg-components/src/svg/BookmarkBorder.js | 34 + .../src/svg/BookmarkBorder.stories.js | 30 + .../svg-components/src/svg/Bookmarks.js | 37 + .../src/svg/Bookmarks.stories.js | 30 + .../svg-components/src/svg/BreakfastDining.js | 39 + .../src/svg/BreakfastDining.stories.js | 30 + .../svg-components/src/svg/BrunchDining.js | 39 + .../src/svg/BrunchDining.stories.js | 30 + .../svg-components/src/svg/BugReport.js | 37 + .../src/svg/BugReport.stories.js | 30 + .../packages/svg-components/src/svg/Build.js | 37 + .../svg-components/src/svg/Build.stories.js | 30 + .../svg-components/src/svg/BuildCircle.js | 39 + .../src/svg/BuildCircle.stories.js | 30 + .../svg-components/src/svg/BusAlert.js | 37 + .../src/svg/BusAlert.stories.js | 30 + .../svg-components/src/svg/Business.js | 37 + .../src/svg/Business.stories.js | 30 + .../packages/svg-components/src/svg/Cached.js | 37 + .../svg-components/src/svg/Cached.stories.js | 30 + .../packages/svg-components/src/svg/Cake.js | 37 + .../svg-components/src/svg/Cake.stories.js | 30 + .../svg-components/src/svg/CalendarToday.js | 37 + .../src/svg/CalendarToday.stories.js | 30 + .../svg-components/src/svg/CalendarViewDay.js | 34 + .../src/svg/CalendarViewDay.stories.js | 30 + .../packages/svg-components/src/svg/Call.js | 37 + .../svg-components/src/svg/Call.stories.js | 30 + .../svg-components/src/svg/CallEnd.js | 37 + .../svg-components/src/svg/CallEnd.stories.js | 30 + .../svg-components/src/svg/CallMade.js | 34 + .../src/svg/CallMade.stories.js | 30 + .../svg-components/src/svg/CallMerge.js | 37 + .../src/svg/CallMerge.stories.js | 30 + .../svg-components/src/svg/CallMissed.js | 34 + .../src/svg/CallMissed.stories.js | 30 + .../src/svg/CallMissedOutgoing.js | 34 + .../src/svg/CallMissedOutgoing.stories.js | 30 + .../svg-components/src/svg/CallReceived.js | 34 + .../src/svg/CallReceived.stories.js | 30 + .../svg-components/src/svg/CallSplit.js | 37 + .../src/svg/CallSplit.stories.js | 30 + .../svg-components/src/svg/CameraEnhance.js | 38 + .../src/svg/CameraEnhance.stories.js | 30 + .../svg-components/src/svg/Campaign.js | 37 + .../src/svg/Campaign.stories.js | 30 + .../packages/svg-components/src/svg/Cancel.js | 37 + .../svg-components/src/svg/Cancel.stories.js | 30 + .../src/svg/CancelPresentation.js | 35 + .../src/svg/CancelPresentation.stories.js | 30 + .../src/svg/CancelScheduleSend.js | 41 + .../src/svg/CancelScheduleSend.stories.js | 30 + .../svg-components/src/svg/CarRental.js | 41 + .../src/svg/CarRental.stories.js | 30 + .../svg-components/src/svg/CarRepair.js | 37 + .../src/svg/CarRepair.stories.js | 30 + .../svg-components/src/svg/CardGiftcard.js | 37 + .../src/svg/CardGiftcard.stories.js | 30 + .../svg-components/src/svg/CardMembership.js | 37 + .../src/svg/CardMembership.stories.js | 30 + .../svg-components/src/svg/CardTravel.js | 37 + .../src/svg/CardTravel.stories.js | 30 + .../svg-components/src/svg/Category.js | 39 + .../src/svg/Category.stories.js | 30 + .../svg-components/src/svg/Celebration.js | 50 + .../src/svg/Celebration.stories.js | 30 + .../svg-components/src/svg/CellWifi.js | 37 + .../src/svg/CellWifi.stories.js | 30 + .../svg-components/src/svg/ChangeHistory.js | 34 + .../src/svg/ChangeHistory.stories.js | 30 + .../packages/svg-components/src/svg/Chat.js | 37 + .../svg-components/src/svg/Chat.stories.js | 30 + .../svg-components/src/svg/ChatBubble.js | 34 + .../src/svg/ChatBubble.stories.js | 30 + .../src/svg/ChatBubbleOutline.js | 34 + .../src/svg/ChatBubbleOutline.stories.js | 30 + .../packages/svg-components/src/svg/Check.js | 34 + .../svg-components/src/svg/Check.stories.js | 30 + .../svg-components/src/svg/CheckCircle.js | 37 + .../src/svg/CheckCircle.stories.js | 30 + .../src/svg/CheckCircleOutline.js | 37 + .../src/svg/CheckCircleOutline.stories.js | 30 + .../svg-components/src/svg/ChevronLeft.js | 34 + .../src/svg/ChevronLeft.stories.js | 30 + .../svg-components/src/svg/ChevronRight.js | 34 + .../src/svg/ChevronRight.stories.js | 30 + .../src/svg/ChromeReaderMode.js | 37 + .../src/svg/ChromeReaderMode.stories.js | 30 + .../src/svg/CircleNotifications.js | 37 + .../src/svg/CircleNotifications.stories.js | 30 + .../packages/svg-components/src/svg/Class.js | 37 + .../svg-components/src/svg/Class.stories.js | 30 + .../svg-components/src/svg/CleanHands.js | 37 + .../src/svg/CleanHands.stories.js | 30 + .../src/svg/CleaningServices.js | 37 + .../src/svg/CleaningServices.stories.js | 30 + .../svg-components/src/svg/ClearAll.js | 34 + .../src/svg/ClearAll.stories.js | 30 + .../packages/svg-components/src/svg/Clock.js | 32 + .../svg-components/src/svg/Clock.stories.js | 30 + .../packages/svg-components/src/svg/Close.js | 34 + .../svg-components/src/svg/Close.stories.js | 30 + .../svg-components/src/svg/CloseFullscreen.js | 34 + .../src/svg/CloseFullscreen.stories.js | 30 + .../packages/svg-components/src/svg/Cloud.js | 37 + .../svg-components/src/svg/Cloud.stories.js | 30 + .../svg-components/src/svg/CloudCircle.js | 37 + .../src/svg/CloudCircle.stories.js | 30 + .../svg-components/src/svg/CloudDone.js | 37 + .../src/svg/CloudDone.stories.js | 30 + .../svg-components/src/svg/CloudDownload.js | 37 + .../src/svg/CloudDownload.stories.js | 30 + .../svg-components/src/svg/CloudOff.js | 37 + .../src/svg/CloudOff.stories.js | 30 + .../svg-components/src/svg/CloudQueue.js | 37 + .../src/svg/CloudQueue.stories.js | 30 + .../svg-components/src/svg/CloudUpload.js | 37 + .../src/svg/CloudUpload.stories.js | 30 + .../packages/svg-components/src/svg/Code.js | 34 + .../svg-components/src/svg/Code.stories.js | 30 + .../svg-components/src/svg/Comment.js | 37 + .../svg-components/src/svg/Comment.stories.js | 30 + .../svg-components/src/svg/CommentBank.js | 34 + .../src/svg/CommentBank.stories.js | 30 + .../svg-components/src/svg/Commute.js | 37 + .../svg-components/src/svg/Commute.stories.js | 30 + .../svg-components/src/svg/CompareArrows.js | 34 + .../src/svg/CompareArrows.stories.js | 30 + .../src/svg/CompassCalibration.js | 38 + .../src/svg/CompassCalibration.stories.js | 30 + .../svg-components/src/svg/Compress.js | 35 + .../src/svg/Compress.stories.js | 30 + .../src/svg/ConnectWithoutContact.js | 37 + .../src/svg/ConnectWithoutContact.stories.js | 30 + .../svg-components/src/svg/Construction.js | 38 + .../src/svg/Construction.stories.js | 30 + .../svg-components/src/svg/ContactMail.js | 37 + .../src/svg/ContactMail.stories.js | 30 + .../svg-components/src/svg/ContactPage.js | 37 + .../src/svg/ContactPage.stories.js | 30 + .../svg-components/src/svg/ContactPhone.js | 37 + .../src/svg/ContactPhone.stories.js | 30 + .../svg-components/src/svg/ContactSupport.js | 37 + .../src/svg/ContactSupport.stories.js | 30 + .../svg-components/src/svg/Contactless.js | 37 + .../src/svg/Contactless.stories.js | 30 + .../svg-components/src/svg/Contacts.js | 37 + .../src/svg/Contacts.stories.js | 30 + .../svg-components/src/svg/Copyright.js | 37 + .../src/svg/Copyright.stories.js | 30 + .../svg-components/src/svg/Coronavirus.js | 37 + .../src/svg/Coronavirus.stories.js | 30 + .../svg-components/src/svg/CreateNewFolder.js | 37 + .../src/svg/CreateNewFolder.stories.js | 30 + .../svg-components/src/svg/CreditCard.js | 37 + .../src/svg/CreditCard.stories.js | 30 + .../packages/svg-components/src/svg/Cut.js | 37 + .../svg-components/src/svg/Cut.stories.js | 30 + .../svg-components/src/svg/DSOTruck.js | 43 + .../src/svg/DSOTruck.stories.js | 30 + .../svg-components/src/svg/Dangerous.js | 37 + .../src/svg/Dangerous.stories.js | 30 + .../svg-components/src/svg/Dashboard.js | 34 + .../src/svg/Dashboard.stories.js | 30 + .../src/svg/DashboardCustomize.js | 34 + .../src/svg/DashboardCustomize.stories.js | 30 + .../svg-components/src/svg/DateRange.js | 37 + .../src/svg/DateRange.stories.js | 30 + .../packages/svg-components/src/svg/Deck.js | 36 + .../svg-components/src/svg/Deck.stories.js | 30 + .../packages/svg-components/src/svg/Delete.js | 34 + .../svg-components/src/svg/Delete.stories.js | 30 + .../svg-components/src/svg/DeleteBtn.js | 35 + .../src/svg/DeleteBtn.stories.js | 37 + .../svg-components/src/svg/DeleteForever.js | 37 + .../src/svg/DeleteForever.stories.js | 30 + .../svg-components/src/svg/DeleteOutline.js | 34 + .../src/svg/DeleteOutline.stories.js | 30 + .../svg-components/src/svg/DeliveryDining.js | 42 + .../src/svg/DeliveryDining.stories.js | 30 + .../svg-components/src/svg/DepartureBoard.js | 37 + .../src/svg/DepartureBoard.stories.js | 30 + .../svg-components/src/svg/Description.js | 37 + .../src/svg/Description.stories.js | 30 + .../svg-components/src/svg/DesignServices.js | 41 + .../src/svg/DesignServices.stories.js | 30 + .../src/svg/DesktopAccessDisabled.js | 37 + .../src/svg/DesktopAccessDisabled.stories.js | 30 + .../svg-components/src/svg/DialerSip.js | 37 + .../src/svg/DialerSip.stories.js | 30 + .../svg-components/src/svg/Dialpad.js | 37 + .../svg-components/src/svg/Dialpad.stories.js | 30 + .../svg-components/src/svg/DinnerDining.js | 37 + .../src/svg/DinnerDining.stories.js | 30 + .../svg-components/src/svg/Directions.js | 37 + .../src/svg/Directions.stories.js | 30 + .../svg-components/src/svg/DirectionsBike.js | 37 + .../src/svg/DirectionsBike.stories.js | 30 + .../svg-components/src/svg/DirectionsBoat.js | 37 + .../src/svg/DirectionsBoat.stories.js | 30 + .../svg-components/src/svg/DirectionsBus.js | 37 + .../src/svg/DirectionsBus.stories.js | 30 + .../svg-components/src/svg/DirectionsCar.js | 37 + .../src/svg/DirectionsCar.stories.js | 30 + .../src/svg/DirectionsRailway.js | 37 + .../src/svg/DirectionsRailway.stories.js | 30 + .../svg-components/src/svg/DirectionsRun.js | 37 + .../src/svg/DirectionsRun.stories.js | 30 + .../src/svg/DirectionsSubway.js | 37 + .../src/svg/DirectionsSubway.stories.js | 30 + .../src/svg/DirectionsTransit.js | 37 + .../src/svg/DirectionsTransit.stories.js | 30 + .../svg-components/src/svg/DirectionsWalk.js | 37 + .../src/svg/DirectionsWalk.stories.js | 30 + .../src/svg/DisabledByDefault.js | 37 + .../src/svg/DisabledByDefault.stories.js | 30 + .../packages/svg-components/src/svg/Dns.js | 37 + .../svg-components/src/svg/Dns.stories.js | 30 + .../packages/svg-components/src/svg/Domain.js | 37 + .../svg-components/src/svg/Domain.stories.js | 30 + .../svg-components/src/svg/DomainDisabled.js | 37 + .../src/svg/DomainDisabled.stories.js | 30 + .../src/svg/DomainVerification.js | 35 + .../src/svg/DomainVerification.stories.js | 30 + .../packages/svg-components/src/svg/Done.js | 34 + .../svg-components/src/svg/Done.stories.js | 30 + .../svg-components/src/svg/DoneAll.js | 37 + .../svg-components/src/svg/DoneAll.stories.js | 30 + .../svg-components/src/svg/DoneOutline.js | 37 + .../src/svg/DoneOutline.stories.js | 30 + .../svg-components/src/svg/DonutLarge.js | 37 + .../src/svg/DonutLarge.stories.js | 30 + .../svg-components/src/svg/DonutSmall.js | 37 + .../src/svg/DonutSmall.stories.js | 30 + .../svg-components/src/svg/DoubleArrow.js | 35 + .../src/svg/DoubleArrow.stories.js | 30 + .../svg-components/src/svg/DragIndicator.js | 37 + .../src/svg/DragIndicator.stories.js | 30 + .../svg-components/src/svg/DriveFileMove.js | 37 + .../src/svg/DriveFileMove.stories.js | 30 + .../src/svg/DriveFileMoveOutline.js | 37 + .../src/svg/DriveFileMoveOutline.stories.js | 30 + .../src/svg/DriveFileRenameOutline.js | 37 + .../src/svg/DriveFileRenameOutline.stories.js | 30 + .../src/svg/DriveFolderUpload.js | 37 + .../src/svg/DriveFolderUpload.stories.js | 30 + .../svg-components/src/svg/DryCleaning.js | 37 + .../src/svg/DryCleaning.stories.js | 30 + .../packages/svg-components/src/svg/Duo.js | 37 + .../svg-components/src/svg/Duo.stories.js | 30 + .../svg-components/src/svg/DynamicForm.js | 37 + .../src/svg/DynamicForm.stories.js | 30 + .../packages/svg-components/src/svg/East.js | 34 + .../svg-components/src/svg/East.stories.js | 30 + .../packages/svg-components/src/svg/Eco.js | 37 + .../svg-components/src/svg/Eco.stories.js | 30 + .../packages/svg-components/src/svg/Edit.js | 37 + .../svg-components/src/svg/Edit.stories.js | 30 + .../svg-components/src/svg/EditAttributes.js | 37 + .../src/svg/EditAttributes.stories.js | 30 + .../svg-components/src/svg/EditLocation.js | 37 + .../src/svg/EditLocation.stories.js | 30 + .../svg-components/src/svg/EditOff.js | 37 + .../svg-components/src/svg/EditOff.stories.js | 30 + .../svg-components/src/svg/EditRoad.js | 42 + .../src/svg/EditRoad.stories.js | 30 + .../packages/svg-components/src/svg/Eject.js | 34 + .../svg-components/src/svg/Eject.stories.js | 30 + .../svg-components/src/svg/Elderly.js | 37 + .../svg-components/src/svg/Elderly.stories.js | 30 + .../svg-components/src/svg/ElectricBike.js | 38 + .../src/svg/ElectricBike.stories.js | 30 + .../svg-components/src/svg/ElectricCar.js | 38 + .../src/svg/ElectricCar.stories.js | 30 + .../svg-components/src/svg/ElectricMoped.js | 43 + .../src/svg/ElectricMoped.stories.js | 30 + .../src/svg/ElectricRickshaw.js | 38 + .../src/svg/ElectricRickshaw.stories.js | 30 + .../svg-components/src/svg/ElectricScooter.js | 42 + .../src/svg/ElectricScooter.stories.js | 30 + .../src/svg/ElectricalServices.js | 40 + .../src/svg/ElectricalServices.stories.js | 30 + .../packages/svg-components/src/svg/Email.js | 37 + .../svg-components/src/svg/Email.stories.js | 30 + .../svg-components/src/svg/EmojiEmotions.js | 37 + .../src/svg/EmojiEmotions.stories.js | 30 + .../svg-components/src/svg/EmojiEvents.js | 37 + .../src/svg/EmojiEvents.stories.js | 30 + .../svg-components/src/svg/EmojiFlags.js | 37 + .../src/svg/EmojiFlags.stories.js | 30 + .../src/svg/EmojiFoodBeverage.js | 38 + .../src/svg/EmojiFoodBeverage.stories.js | 30 + .../svg-components/src/svg/EmojiNature.js | 41 + .../src/svg/EmojiNature.stories.js | 30 + .../svg-components/src/svg/EmojiObjects.js | 37 + .../src/svg/EmojiObjects.stories.js | 30 + .../svg-components/src/svg/EmojiPeople.js | 38 + .../src/svg/EmojiPeople.stories.js | 30 + .../svg-components/src/svg/EmojiSymbols.js | 52 + .../src/svg/EmojiSymbols.stories.js | 30 + .../src/svg/EmojiTransportation.js | 42 + .../src/svg/EmojiTransportation.stories.js | 30 + .../svg-components/src/svg/Engineering.js | 47 + .../src/svg/Engineering.stories.js | 30 + .../packages/svg-components/src/svg/Error.js | 37 + .../svg-components/src/svg/Error.stories.js | 30 + .../svg-components/src/svg/ErrorOutline.js | 37 + .../src/svg/ErrorOutline.stories.js | 30 + .../svg-components/src/svg/EuroSymbol.js | 37 + .../src/svg/EuroSymbol.stories.js | 30 + .../svg-components/src/svg/EvStation.js | 37 + .../src/svg/EvStation.stories.js | 30 + .../packages/svg-components/src/svg/Event.js | 37 + .../svg-components/src/svg/Event.stories.js | 30 + .../svg-components/src/svg/EventSeat.js | 37 + .../src/svg/EventSeat.stories.js | 30 + .../svg-components/src/svg/ExitToApp.js | 37 + .../src/svg/ExitToApp.stories.js | 30 + .../packages/svg-components/src/svg/Expand.js | 34 + .../svg-components/src/svg/Expand.stories.js | 30 + .../svg-components/src/svg/ExpandLess.js | 34 + .../src/svg/ExpandLess.stories.js | 30 + .../svg-components/src/svg/ExpandMore.js | 34 + .../src/svg/ExpandMore.stories.js | 30 + .../svg-components/src/svg/Explore.js | 37 + .../svg-components/src/svg/Explore.stories.js | 30 + .../svg-components/src/svg/ExploreOff.js | 37 + .../src/svg/ExploreOff.stories.js | 30 + .../svg-components/src/svg/Extension.js | 37 + .../src/svg/Extension.stories.js | 30 + .../packages/svg-components/src/svg/Face.js | 37 + .../svg-components/src/svg/Face.stories.js | 30 + .../svg-components/src/svg/Facebook.js | 37 + .../src/svg/Facebook.stories.js | 30 + .../svg-components/src/svg/FactCheck.js | 39 + .../src/svg/FactCheck.stories.js | 30 + .../svg-components/src/svg/Fastfood.js | 37 + .../src/svg/Fastfood.stories.js | 30 + .../svg-components/src/svg/Favorite.js | 37 + .../src/svg/Favorite.stories.js | 30 + .../svg-components/src/svg/FavoriteBorder.js | 37 + .../src/svg/FavoriteBorder.stories.js | 30 + .../svg-components/src/svg/Feedback.js | 37 + .../src/svg/Feedback.stories.js | 30 + .../svg-components/src/svg/Festival.js | 34 + .../src/svg/Festival.stories.js | 30 + .../packages/svg-components/src/svg/File.js | 37 + .../svg-components/src/svg/File.stories.js | 30 + .../svg-components/src/svg/FileDownload.js | 34 + .../src/svg/FileDownload.stories.js | 30 + .../src/svg/FileDownloadDone.js | 34 + .../src/svg/FileDownloadDone.stories.js | 30 + .../svg-components/src/svg/FilePresent.js | 37 + .../src/svg/FilePresent.stories.js | 30 + .../svg-components/src/svg/FileUpload.js | 34 + .../src/svg/FileUpload.stories.js | 30 + .../svg-components/src/svg/FilterAlt.js | 37 + .../src/svg/FilterAlt.stories.js | 30 + .../svg-components/src/svg/FilterListAlt.js | 37 + .../src/svg/FilterListAlt.stories.js | 30 + .../svg-components/src/svg/FindInPage.js | 37 + .../src/svg/FindInPage.stories.js | 30 + .../svg-components/src/svg/FindReplace.js | 37 + .../src/svg/FindReplace.stories.js | 30 + .../svg-components/src/svg/Fingerprint.js | 37 + .../src/svg/Fingerprint.stories.js | 30 + .../svg-components/src/svg/Fireplace.js | 37 + .../src/svg/Fireplace.stories.js | 30 + .../svg-components/src/svg/FirstPage.js | 34 + .../src/svg/FirstPage.stories.js | 30 + .../svg-components/src/svg/FirstPageAlt.js | 34 + .../src/svg/FirstPageAlt.stories.js | 30 + .../svg-components/src/svg/FitScreen.js | 37 + .../src/svg/FitScreen.stories.js | 30 + .../packages/svg-components/src/svg/Flaky.js | 39 + .../svg-components/src/svg/Flaky.stories.js | 30 + .../packages/svg-components/src/svg/Flight.js | 37 + .../svg-components/src/svg/Flight.stories.js | 30 + .../svg-components/src/svg/FlightLand.js | 37 + .../src/svg/FlightLand.stories.js | 30 + .../svg-components/src/svg/FlightTakeoff.js | 37 + .../src/svg/FlightTakeoff.stories.js | 30 + .../svg-components/src/svg/FlipToBack.js | 37 + .../src/svg/FlipToBack.stories.js | 30 + .../svg-components/src/svg/FlipToFront.js | 37 + .../src/svg/FlipToFront.stories.js | 30 + .../packages/svg-components/src/svg/Folder.js | 34 + .../svg-components/src/svg/Folder.stories.js | 30 + .../svg-components/src/svg/FolderOpen.js | 37 + .../src/svg/FolderOpen.stories.js | 30 + .../svg-components/src/svg/FolderShared.js | 37 + .../src/svg/FolderShared.stories.js | 30 + .../svg-components/src/svg/FollowTheSigns.js | 37 + .../src/svg/FollowTheSigns.stories.js | 30 + .../packages/svg-components/src/svg/Forum.js | 37 + .../svg-components/src/svg/Forum.stories.js | 30 + .../svg-components/src/svg/ForwardToInbox.js | 37 + .../src/svg/ForwardToInbox.stories.js | 30 + .../svg-components/src/svg/Fullscreen.js | 34 + .../src/svg/Fullscreen.stories.js | 30 + .../svg-components/src/svg/FullscreenExit.js | 34 + .../src/svg/FullscreenExit.stories.js | 30 + .../svg-components/src/svg/GTranslate.js | 37 + .../src/svg/GTranslate.stories.js | 30 + .../packages/svg-components/src/svg/Gavel.js | 37 + .../svg-components/src/svg/Gavel.stories.js | 30 + .../packages/svg-components/src/svg/GetApp.js | 34 + .../svg-components/src/svg/GetApp.stories.js | 30 + .../packages/svg-components/src/svg/Gif.js | 36 + .../svg-components/src/svg/Gif.stories.js | 30 + .../packages/svg-components/src/svg/Grade.js | 34 + .../svg-components/src/svg/Grade.stories.js | 30 + .../svg-components/src/svg/Grading.js | 37 + .../svg-components/src/svg/Grading.stories.js | 30 + .../svg-components/src/svg/GridView.js | 39 + .../src/svg/GridView.stories.js | 30 + .../packages/svg-components/src/svg/Group.js | 37 + .../svg-components/src/svg/Group.stories.js | 30 + .../svg-components/src/svg/GroupAdd.js | 37 + .../src/svg/GroupAdd.stories.js | 30 + .../svg-components/src/svg/GroupWork.js | 37 + .../src/svg/GroupWork.stories.js | 30 + .../packages/svg-components/src/svg/Groups.js | 37 + .../svg-components/src/svg/Groups.stories.js | 30 + .../packages/svg-components/src/svg/Hail.js | 37 + .../svg-components/src/svg/Hail.stories.js | 30 + .../svg-components/src/svg/Handyman.js | 41 + .../src/svg/Handyman.stories.js | 30 + .../svg-components/src/svg/Hardware.js | 35 + .../src/svg/Hardware.stories.js | 30 + .../packages/svg-components/src/svg/Help.js | 37 + .../svg-components/src/svg/Help.stories.js | 30 + .../svg-components/src/svg/HelpCenter.js | 37 + .../src/svg/HelpCenter.stories.js | 30 + .../svg-components/src/svg/HelpOutline.js | 37 + .../src/svg/HelpOutline.stories.js | 30 + .../svg-components/src/svg/HighlightAlt.js | 37 + .../src/svg/HighlightAlt.stories.js | 30 + .../svg-components/src/svg/HighlightOff.js | 37 + .../src/svg/HighlightOff.stories.js | 30 + .../svg-components/src/svg/History.js | 37 + .../svg-components/src/svg/History.stories.js | 30 + .../svg-components/src/svg/HistoryEdu.js | 37 + .../src/svg/HistoryEdu.stories.js | 30 + .../src/svg/HistoryToggleOff.js | 37 + .../src/svg/HistoryToggleOff.stories.js | 30 + .../packages/svg-components/src/svg/Home.js | 34 + .../svg-components/src/svg/Home.stories.js | 30 + .../svg-components/src/svg/HomeFilled.js | 34 + .../src/svg/HomeFilled.stories.js | 30 + .../src/svg/HomeRepairService.js | 38 + .../src/svg/HomeRepairService.stories.js | 30 + .../svg-components/src/svg/HomeWork.js | 35 + .../src/svg/HomeWork.stories.js | 30 + .../svg-components/src/svg/HorizontalSplit.js | 34 + .../src/svg/HorizontalSplit.stories.js | 30 + .../packages/svg-components/src/svg/Hotel.js | 37 + .../svg-components/src/svg/Hotel.stories.js | 30 + .../svg-components/src/svg/HourglassBottom.js | 34 + .../src/svg/HourglassBottom.stories.js | 30 + .../src/svg/HourglassDisabled.js | 38 + .../src/svg/HourglassDisabled.stories.js | 30 + .../svg-components/src/svg/HourglassEmpty.js | 37 + .../src/svg/HourglassEmpty.stories.js | 30 + .../svg-components/src/svg/HourglassFull.js | 34 + .../src/svg/HourglassFull.stories.js | 30 + .../svg-components/src/svg/HourglassTop.js | 34 + .../src/svg/HourglassTop.stories.js | 30 + .../packages/svg-components/src/svg/Http.js | 37 + .../svg-components/src/svg/Http.stories.js | 30 + .../packages/svg-components/src/svg/Https.js | 37 + .../svg-components/src/svg/Https.stories.js | 30 + .../packages/svg-components/src/svg/Hvac.js | 41 + .../svg-components/src/svg/Hvac.stories.js | 30 + .../svg-components/src/svg/Icecream.js | 39 + .../src/svg/Icecream.stories.js | 30 + .../svg-components/src/svg/IconSwerage.js | 30 + .../src/svg/IconSwerage.stories.js | 30 + .../svg-components/src/svg/IconSwerageAlt.js | 32 + .../src/svg/IconSwerageAlt.stories.js | 30 + .../svg-components/src/svg/ImportContacts.js | 37 + .../src/svg/ImportContacts.stories.js | 30 + .../svg-components/src/svg/ImportExport.js | 34 + .../src/svg/ImportExport.stories.js | 30 + .../src/svg/ImportantDevices.js | 37 + .../src/svg/ImportantDevices.stories.js | 30 + .../packages/svg-components/src/svg/Info.js | 37 + .../svg-components/src/svg/Info.stories.js | 30 + .../svg-components/src/svg/InfoBannerIcon.js | 28 + .../src/svg/InfoBannerIcon.stories.js | 30 + .../svg-components/src/svg/InfoOutline.js | 37 + .../src/svg/InfoOutline.stories.js | 30 + .../packages/svg-components/src/svg/Input.js | 37 + .../svg-components/src/svg/Input.stories.js | 30 + .../src/svg/IntegrationInstructions.js | 37 + .../svg/IntegrationInstructions.stories.js | 30 + .../svg-components/src/svg/InvertColors.js | 37 + .../src/svg/InvertColors.stories.js | 30 + .../svg-components/src/svg/InvertColorsOff.js | 37 + .../src/svg/InvertColorsOff.stories.js | 30 + .../svg-components/src/svg/IosShare.js | 37 + .../src/svg/IosShare.stories.js | 30 + .../svg-components/src/svg/KingBed.js | 37 + .../svg-components/src/svg/KingBed.stories.js | 30 + .../packages/svg-components/src/svg/Label.js | 37 + .../svg-components/src/svg/Label.stories.js | 30 + .../svg-components/src/svg/LabelImportant.js | 37 + .../src/svg/LabelImportant.stories.js | 30 + .../src/svg/LabelImportantOutline.js | 37 + .../src/svg/LabelImportantOutline.stories.js | 30 + .../svg-components/src/svg/LabelOff.js | 37 + .../src/svg/LabelOff.stories.js | 30 + .../svg-components/src/svg/LabelOutline.js | 37 + .../src/svg/LabelOutline.stories.js | 30 + .../svg-components/src/svg/Language.js | 37 + .../src/svg/Language.stories.js | 30 + .../svg-components/src/svg/LastPage.js | 34 + .../src/svg/LastPage.stories.js | 30 + .../svg-components/src/svg/LastPageAlt.js | 34 + .../src/svg/LastPageAlt.stories.js | 30 + .../packages/svg-components/src/svg/Launch.js | 37 + .../svg-components/src/svg/Launch.stories.js | 30 + .../packages/svg-components/src/svg/Layers.js | 37 + .../svg-components/src/svg/Layers.stories.js | 30 + .../svg-components/src/svg/LayersClear.js | 37 + .../src/svg/LayersClear.stories.js | 30 + .../svg-components/src/svg/Leaderboard.js | 34 + .../src/svg/Leaderboard.stories.js | 30 + .../svg-components/src/svg/LegendToggle.js | 34 + .../src/svg/LegendToggle.stories.js | 30 + .../svg-components/src/svg/Lightbulb.js | 37 + .../src/svg/Lightbulb.stories.js | 30 + .../src/svg/LightbulbOutline.js | 37 + .../src/svg/LightbulbOutline.stories.js | 30 + .../svg-components/src/svg/LineStyle.js | 37 + .../src/svg/LineStyle.stories.js | 30 + .../svg-components/src/svg/LineWeight.js | 34 + .../src/svg/LineWeight.stories.js | 30 + .../packages/svg-components/src/svg/Liquor.js | 38 + .../svg-components/src/svg/Liquor.stories.js | 30 + .../packages/svg-components/src/svg/List.js | 34 + .../svg-components/src/svg/List.stories.js | 30 + .../svg-components/src/svg/ListAlt.js | 37 + .../svg-components/src/svg/ListAlt.stories.js | 30 + .../svg-components/src/svg/LiveHelp.js | 37 + .../src/svg/LiveHelp.stories.js | 30 + .../svg-components/src/svg/LocalActivity.js | 37 + .../src/svg/LocalActivity.stories.js | 30 + .../svg-components/src/svg/LocalAirport.js | 37 + .../src/svg/LocalAirport.stories.js | 30 + .../svg-components/src/svg/LocalAtm.js | 37 + .../src/svg/LocalAtm.stories.js | 30 + .../svg-components/src/svg/LocalBar.js | 34 + .../src/svg/LocalBar.stories.js | 30 + .../svg-components/src/svg/LocalCafe.js | 37 + .../src/svg/LocalCafe.stories.js | 30 + .../svg-components/src/svg/LocalCarWash.js | 37 + .../src/svg/LocalCarWash.stories.js | 30 + .../src/svg/LocalConvenienceStore.js | 34 + .../src/svg/LocalConvenienceStore.stories.js | 30 + .../svg-components/src/svg/LocalDining.js | 37 + .../src/svg/LocalDining.stories.js | 30 + .../svg-components/src/svg/LocalDrink.js | 37 + .../src/svg/LocalDrink.stories.js | 30 + .../src/svg/LocalFireDepartment.js | 37 + .../src/svg/LocalFireDepartment.stories.js | 30 + .../svg-components/src/svg/LocalFlorist.js | 37 + .../src/svg/LocalFlorist.stories.js | 30 + .../svg-components/src/svg/LocalGasStation.js | 37 + .../src/svg/LocalGasStation.stories.js | 30 + .../src/svg/LocalGroceryStore.js | 37 + .../src/svg/LocalGroceryStore.stories.js | 30 + .../svg-components/src/svg/LocalHospital.js | 37 + .../src/svg/LocalHospital.stories.js | 30 + .../svg-components/src/svg/LocalHotel.js | 37 + .../src/svg/LocalHotel.stories.js | 30 + .../src/svg/LocalLaundryService.js | 37 + .../src/svg/LocalLaundryService.stories.js | 30 + .../svg-components/src/svg/LocalLibrary.js | 37 + .../src/svg/LocalLibrary.stories.js | 30 + .../svg-components/src/svg/LocalMall.js | 37 + .../src/svg/LocalMall.stories.js | 30 + .../svg-components/src/svg/LocalMovies.js | 37 + .../src/svg/LocalMovies.stories.js | 30 + .../svg-components/src/svg/LocalOffer.js | 37 + .../src/svg/LocalOffer.stories.js | 30 + .../svg-components/src/svg/LocalParking.js | 37 + .../src/svg/LocalParking.stories.js | 30 + .../svg-components/src/svg/LocalPharmacy.js | 34 + .../src/svg/LocalPharmacy.stories.js | 30 + .../svg-components/src/svg/LocalPhone.js | 37 + .../src/svg/LocalPhone.stories.js | 30 + .../svg-components/src/svg/LocalPizza.js | 37 + .../src/svg/LocalPizza.stories.js | 30 + .../svg-components/src/svg/LocalPlay.js | 37 + .../src/svg/LocalPlay.stories.js | 30 + .../svg-components/src/svg/LocalPolice.js | 37 + .../src/svg/LocalPolice.stories.js | 30 + .../svg-components/src/svg/LocalPostOffice.js | 37 + .../src/svg/LocalPostOffice.stories.js | 30 + .../svg-components/src/svg/LocalPrintshop.js | 37 + .../src/svg/LocalPrintshop.stories.js | 30 + .../svg-components/src/svg/LocalSee.js | 41 + .../src/svg/LocalSee.stories.js | 30 + .../svg-components/src/svg/LocalShipping.js | 37 + .../src/svg/LocalShipping.stories.js | 30 + .../svg-components/src/svg/LocalTaxi.js | 37 + .../src/svg/LocalTaxi.stories.js | 30 + .../svg-components/src/svg/LocationCity.js | 37 + .../src/svg/LocationCity.stories.js | 30 + .../svg-components/src/svg/LocationOff.js | 37 + .../src/svg/LocationOff.stories.js | 30 + .../svg-components/src/svg/LocationOn.js | 37 + .../src/svg/LocationOn.stories.js | 30 + .../svg-components/src/svg/LocationPin.js | 37 + .../src/svg/LocationPin.stories.js | 30 + .../packages/svg-components/src/svg/Lock.js | 37 + .../svg-components/src/svg/Lock.stories.js | 30 + .../svg-components/src/svg/LockClock.js | 37 + .../src/svg/LockClock.stories.js | 30 + .../svg-components/src/svg/LockOpen.js | 37 + .../src/svg/LockOpen.stories.js | 30 + .../svg-components/src/svg/LockOutline.js | 37 + .../src/svg/LockOutline.stories.js | 30 + .../packages/svg-components/src/svg/Login.js | 37 + .../svg-components/src/svg/Login.stories.js | 30 + .../packages/svg-components/src/svg/Logout.js | 37 + .../svg-components/src/svg/Logout.stories.js | 30 + .../svg-components/src/svg/Loyalty.js | 37 + .../svg-components/src/svg/Loyalty.stories.js | 30 + .../svg-components/src/svg/Luggage.js | 37 + .../svg-components/src/svg/Luggage.stories.js | 30 + .../svg-components/src/svg/LunchDining.js | 46 + .../src/svg/LunchDining.stories.js | 30 + .../svg-components/src/svg/MailOutline.js | 37 + .../src/svg/MailOutline.stories.js | 30 + .../packages/svg-components/src/svg/Map.js | 37 + .../svg-components/src/svg/Map.stories.js | 30 + .../svg-components/src/svg/MapsUgc.js | 39 + .../svg-components/src/svg/MapsUgc.stories.js | 30 + .../svg-components/src/svg/MarkAsUnread.js | 37 + .../src/svg/MarkAsUnread.stories.js | 30 + .../svg-components/src/svg/MarkChatRead.js | 37 + .../src/svg/MarkChatRead.stories.js | 30 + .../svg-components/src/svg/MarkChatUnread.js | 37 + .../src/svg/MarkChatUnread.stories.js | 30 + .../svg-components/src/svg/MarkEmailRead.js | 37 + .../src/svg/MarkEmailRead.stories.js | 30 + .../svg-components/src/svg/MarkEmailUnread.js | 37 + .../src/svg/MarkEmailUnread.stories.js | 30 + .../src/svg/MarkunreadMailbox.js | 34 + .../src/svg/MarkunreadMailbox.stories.js | 30 + .../packages/svg-components/src/svg/Masks.js | 37 + .../svg-components/src/svg/Masks.stories.js | 30 + .../svg-components/src/svg/Maximize.js | 34 + .../src/svg/Maximize.stories.js | 30 + .../svg-components/src/svg/Mediation.js | 37 + .../src/svg/Mediation.stories.js | 30 + .../svg-components/src/svg/MedicalServices.js | 37 + .../src/svg/MedicalServices.stories.js | 30 + .../packages/svg-components/src/svg/Menu.js | 34 + .../svg-components/src/svg/Menu.stories.js | 30 + .../svg-components/src/svg/MenuBook.js | 49 + .../src/svg/MenuBook.stories.js | 30 + .../svg-components/src/svg/MenuOpen.js | 34 + .../src/svg/MenuOpen.stories.js | 30 + .../svg-components/src/svg/Message.js | 37 + .../svg-components/src/svg/Message.stories.js | 30 + .../svg-components/src/svg/MilitaryTech.js | 37 + .../src/svg/MilitaryTech.stories.js | 30 + .../svg-components/src/svg/Minimize.js | 34 + .../src/svg/Minimize.stories.js | 30 + .../src/svg/MiscellaneousServices.js | 41 + .../src/svg/MiscellaneousServices.stories.js | 30 + .../src/svg/MobileScreenShare.js | 37 + .../src/svg/MobileScreenShare.stories.js | 30 + .../svg-components/src/svg/ModelTraining.js | 37 + .../src/svg/ModelTraining.stories.js | 30 + .../packages/svg-components/src/svg/Money.js | 38 + .../svg-components/src/svg/Money.stories.js | 30 + .../packages/svg-components/src/svg/Mood.js | 37 + .../svg-components/src/svg/Mood.stories.js | 30 + .../svg-components/src/svg/MoodBad.js | 37 + .../svg-components/src/svg/MoodBad.stories.js | 30 + .../packages/svg-components/src/svg/Moped.js | 42 + .../svg-components/src/svg/Moped.stories.js | 30 + .../svg-components/src/svg/MoreHoriz.js | 37 + .../src/svg/MoreHoriz.stories.js | 30 + .../svg-components/src/svg/MoreTime.js | 39 + .../src/svg/MoreTime.stories.js | 30 + .../svg-components/src/svg/MoreVert.js | 37 + .../src/svg/MoreVert.stories.js | 30 + .../svg-components/src/svg/MultipleStop.js | 37 + .../src/svg/MultipleStop.stories.js | 30 + .../packages/svg-components/src/svg/Museum.js | 34 + .../svg-components/src/svg/Museum.stories.js | 30 + .../svg-components/src/svg/MyLocation.js | 37 + .../src/svg/MyLocation.stories.js | 30 + .../packages/svg-components/src/svg/Nat.js | 41 + .../svg-components/src/svg/Nat.stories.js | 30 + .../svg-components/src/svg/Navigation.js | 34 + .../src/svg/Navigation.stories.js | 30 + .../packages/svg-components/src/svg/NearMe.js | 34 + .../svg-components/src/svg/NearMe.stories.js | 30 + .../svg-components/src/svg/NearMeDisabled.js | 37 + .../src/svg/NearMeDisabled.stories.js | 30 + .../svg-components/src/svg/NextPlan.js | 37 + .../src/svg/NextPlan.stories.js | 30 + .../svg-components/src/svg/Nightlife.js | 37 + .../src/svg/Nightlife.stories.js | 30 + .../svg-components/src/svg/NightlightRound.js | 37 + .../src/svg/NightlightRound.stories.js | 30 + .../svg-components/src/svg/NightsStay.js | 41 + .../src/svg/NightsStay.stories.js | 30 + .../svg-components/src/svg/NoLuggage.js | 37 + .../src/svg/NoLuggage.stories.js | 30 + .../svg-components/src/svg/NoMeals.js | 37 + .../svg-components/src/svg/NoMeals.stories.js | 30 + .../svg-components/src/svg/NoMealsOuline.js | 37 + .../src/svg/NoMealsOuline.stories.js | 30 + .../src/svg/NoResultsFoundIcon.js | 426 ++++ .../src/svg/NoResultsFoundIcon.stories.js | 30 + .../packages/svg-components/src/svg/NoSim.js | 37 + .../svg-components/src/svg/NoSim.stories.js | 30 + .../svg-components/src/svg/NoTransfer.js | 37 + .../src/svg/NoTransfer.stories.js | 30 + .../packages/svg-components/src/svg/North.js | 34 + .../svg-components/src/svg/North.stories.js | 30 + .../svg-components/src/svg/NorthEast.js | 34 + .../src/svg/NorthEast.stories.js | 30 + .../svg-components/src/svg/NorthWest.js | 34 + .../src/svg/NorthWest.stories.js | 30 + .../svg-components/src/svg/NotAccessible.js | 37 + .../src/svg/NotAccessible.stories.js | 30 + .../src/svg/NotListedLocation.js | 37 + .../src/svg/NotListedLocation.stories.js | 30 + .../svg-components/src/svg/NotStarted.js | 37 + .../src/svg/NotStarted.stories.js | 30 + .../svg-components/src/svg/NoteAdd.js | 37 + .../svg-components/src/svg/NoteAdd.stories.js | 30 + .../src/svg/NotificationImportant.js | 37 + .../src/svg/NotificationImportant.stories.js | 30 + .../svg-components/src/svg/Notifications.js | 30 + .../src/svg/Notifications.stories.js | 30 + .../src/svg/NotificationsActive.js | 37 + .../src/svg/NotificationsActive.stories.js | 30 + .../src/svg/NotificationsNone.js | 37 + .../src/svg/NotificationsNone.stories.js | 30 + .../src/svg/NotificationsOff.js | 37 + .../src/svg/NotificationsOff.stories.js | 30 + .../src/svg/NotificationsPaused.js | 37 + .../src/svg/NotificationsPaused.stories.js | 30 + .../svg-components/src/svg/OfflineBolt.js | 37 + .../src/svg/OfflineBolt.stories.js | 30 + .../svg-components/src/svg/OfflinePin.js | 37 + .../src/svg/OfflinePin.stories.js | 30 + .../svg-components/src/svg/OfflineShare.js | 37 + .../src/svg/OfflineShare.stories.js | 30 + .../src/svg/OnlinePrediction.js | 37 + .../src/svg/OnlinePrediction.stories.js | 30 + .../svg-components/src/svg/Opacity.js | 37 + .../svg-components/src/svg/Opacity.stories.js | 30 + .../svg-components/src/svg/OpenInBrowser.js | 37 + .../src/svg/OpenInBrowser.stories.js | 30 + .../svg-components/src/svg/OpenInFull.js | 34 + .../src/svg/OpenInFull.stories.js | 30 + .../svg-components/src/svg/OpenInNew.js | 37 + .../src/svg/OpenInNew.stories.js | 30 + .../svg-components/src/svg/OpenWith.js | 37 + .../src/svg/OpenWith.stories.js | 30 + .../svg-components/src/svg/Outbond.js | 37 + .../svg-components/src/svg/Outbond.stories.js | 30 + .../packages/svg-components/src/svg/Outbox.js | 37 + .../svg-components/src/svg/Outbox.stories.js | 30 + .../svg-components/src/svg/OutdoorGrill.js | 49 + .../src/svg/OutdoorGrill.stories.js | 30 + .../svg-components/src/svg/OutgoingMail.js | 38 + .../src/svg/OutgoingMail.stories.js | 30 + .../packages/svg-components/src/svg/Outlet.js | 37 + .../svg-components/src/svg/Outlet.stories.js | 30 + .../packages/svg-components/src/svg/Pages.js | 37 + .../svg-components/src/svg/Pages.stories.js | 30 + .../svg-components/src/svg/Pageview.js | 37 + .../src/svg/Pageview.stories.js | 30 + .../svg-components/src/svg/PanTool.js | 37 + .../svg-components/src/svg/PanTool.stories.js | 30 + .../packages/svg-components/src/svg/Park.js | 34 + .../svg-components/src/svg/Park.stories.js | 30 + .../svg-components/src/svg/PartyMode.js | 37 + .../src/svg/PartyMode.stories.js | 30 + .../src/svg/PausePresentation.js | 35 + .../src/svg/PausePresentation.stories.js | 30 + .../svg-components/src/svg/Payment.js | 37 + .../svg-components/src/svg/Payment.stories.js | 30 + .../svg-components/src/svg/Payments.js | 37 + .../src/svg/Payments.stories.js | 30 + .../svg-components/src/svg/PedalBike.js | 37 + .../src/svg/PedalBike.stories.js | 30 + .../svg-components/src/svg/Pending.js | 37 + .../svg-components/src/svg/Pending.stories.js | 30 + .../svg-components/src/svg/PendingActions.js | 37 + .../src/svg/PendingActions.stories.js | 30 + .../packages/svg-components/src/svg/People.js | 37 + .../svg-components/src/svg/People.stories.js | 30 + .../svg-components/src/svg/PeopleAlt.js | 47 + .../src/svg/PeopleAlt.stories.js | 30 + .../svg-components/src/svg/PeopleOutline.js | 37 + .../src/svg/PeopleOutline.stories.js | 30 + .../svg-components/src/svg/PermCameraMic.js | 37 + .../src/svg/PermCameraMic.stories.js | 30 + .../src/svg/PermContactCalendar.js | 37 + .../src/svg/PermContactCalendar.stories.js | 30 + .../svg-components/src/svg/PermDataSetting.js | 37 + .../src/svg/PermDataSetting.stories.js | 30 + .../src/svg/PermDeviceInformation.js | 37 + .../src/svg/PermDeviceInformation.stories.js | 30 + .../svg-components/src/svg/PermIdentity.js | 37 + .../src/svg/PermIdentity.stories.js | 29 + .../svg-components/src/svg/PermMedia.js | 37 + .../src/svg/PermMedia.stories.js | 30 + .../svg-components/src/svg/PermPhoneMsg.js | 37 + .../src/svg/PermPhoneMsg.stories.js | 30 + .../svg-components/src/svg/PermScanWifi.js | 34 + .../src/svg/PermScanWifi.stories.js | 30 + .../packages/svg-components/src/svg/Person.js | 37 + .../svg-components/src/svg/Person.stories.js | 30 + .../svg-components/src/svg/PersonAdd.js | 37 + .../src/svg/PersonAdd.stories.js | 30 + .../svg-components/src/svg/PersonAddAlt.js | 37 + .../src/svg/PersonAddAlt.stories.js | 30 + .../src/svg/PersonAddDisabled.js | 38 + .../src/svg/PersonAddDisabled.stories.js | 30 + .../src/svg/PersonAddSecondary.js | 37 + .../src/svg/PersonAddSecondary.stories.js | 30 + .../svg-components/src/svg/PersonOutline.js | 37 + .../src/svg/PersonOutline.stories.js | 30 + .../svg-components/src/svg/PersonPin.js | 37 + .../src/svg/PersonPin.stories.js | 30 + .../svg-components/src/svg/PersonPinCircle.js | 37 + .../src/svg/PersonPinCircle.stories.js | 30 + .../svg-components/src/svg/PersonRemove.js | 37 + .../src/svg/PersonRemove.stories.js | 30 + .../svg-components/src/svg/PersonRemoveAlt.js | 37 + .../src/svg/PersonRemoveAlt.stories.js | 30 + .../svg-components/src/svg/PersonSearch.js | 39 + .../src/svg/PersonSearch.stories.js | 30 + .../svg-components/src/svg/PestControl.js | 37 + .../src/svg/PestControl.stories.js | 30 + .../src/svg/PestControlRodent.js | 37 + .../src/svg/PestControlRodent.stories.js | 30 + .../packages/svg-components/src/svg/Pets.js | 50 + .../svg-components/src/svg/Pets.stories.js | 30 + .../packages/svg-components/src/svg/Phone.js | 37 + .../svg-components/src/svg/Phone.stories.js | 30 + .../svg-components/src/svg/PhoneDisabled.js | 37 + .../src/svg/PhoneDisabled.stories.js | 30 + .../svg-components/src/svg/PhoneEnabled.js | 37 + .../src/svg/PhoneEnabled.stories.js | 30 + .../svg-components/src/svg/PhonelinkErase.js | 37 + .../src/svg/PhonelinkErase.stories.js | 30 + .../svg-components/src/svg/PhonelinkLock.js | 37 + .../src/svg/PhonelinkLock.stories.js | 30 + .../svg-components/src/svg/PhonelinkRing.js | 37 + .../src/svg/PhonelinkRing.stories.js | 30 + .../svg-components/src/svg/PhonelinkSetup.js | 37 + .../src/svg/PhonelinkSetup.stories.js | 30 + .../src/svg/PictureInPicture.js | 37 + .../src/svg/PictureInPicture.stories.js | 30 + .../src/svg/PictureInPictureAlt.js | 37 + .../src/svg/PictureInPictureAlt.stories.js | 30 + .../svg-components/src/svg/PinDrop.js | 37 + .../svg-components/src/svg/PinDrop.stories.js | 30 + .../svg-components/src/svg/PivotTableChart.js | 38 + .../src/svg/PivotTableChart.stories.js | 30 + .../packages/svg-components/src/svg/Place.js | 37 + .../svg-components/src/svg/Place.stories.js | 30 + .../svg-components/src/svg/Plagiarism.js | 41 + .../src/svg/Plagiarism.stories.js | 30 + .../svg-components/src/svg/PlayForWork.js | 37 + .../src/svg/PlayForWork.stories.js | 30 + .../svg-components/src/svg/Plumbing.js | 45 + .../src/svg/Plumbing.stories.js | 30 + .../svg-components/src/svg/PlusOne.js | 34 + .../svg-components/src/svg/PlusOne.stories.js | 30 + .../packages/svg-components/src/svg/Poll.js | 37 + .../svg-components/src/svg/Poll.stories.js | 30 + .../svg-components/src/svg/Polymer.js | 34 + .../svg-components/src/svg/Polymer.stories.js | 30 + .../svg-components/src/svg/Population.js | 32 + .../src/svg/Population.stories.js | 30 + .../svg-components/src/svg/PortableWifiOff.js | 37 + .../src/svg/PortableWifiOff.stories.js | 30 + .../src/svg/PowerSettingsNew.js | 37 + .../src/svg/PowerSettingsNew.stories.js | 30 + .../svg-components/src/svg/PregnantWoman.js | 37 + .../src/svg/PregnantWoman.stories.js | 30 + .../svg-components/src/svg/PresentToAll.js | 37 + .../src/svg/PresentToAll.stories.js | 30 + .../svg-components/src/svg/Preview.js | 37 + .../svg-components/src/svg/Preview.stories.js | 30 + .../packages/svg-components/src/svg/Print.js | 37 + .../svg-components/src/svg/Print.stories.js | 30 + .../svg-components/src/svg/PrintDisabled.js | 37 + .../src/svg/PrintDisabled.stories.js | 30 + .../svg-components/src/svg/PrivacyTip.js | 34 + .../src/svg/PrivacyTip.stories.js | 30 + .../svg-components/src/svg/Psychology.js | 41 + .../src/svg/Psychology.stories.js | 30 + .../packages/svg-components/src/svg/Public.js | 37 + .../svg-components/src/svg/Public.stories.js | 30 + .../svg-components/src/svg/PublicOff.js | 37 + .../src/svg/PublicOff.stories.js | 30 + .../src/svg/PublishedWithChanges.js | 37 + .../src/svg/PublishedWithChanges.stories.js | 30 + .../packages/svg-components/src/svg/QrCode.js | 44 + .../svg-components/src/svg/QrCode.stories.js | 30 + .../svg-components/src/svg/QrCodeScanner.js | 37 + .../src/svg/QrCodeScanner.stories.js | 30 + .../svg-components/src/svg/QueryBuilder.js | 38 + .../src/svg/QueryBuilder.stories.js | 30 + .../svg-components/src/svg/QuestionAnswer.js | 37 + .../src/svg/QuestionAnswer.stories.js | 30 + .../svg-components/src/svg/Quickreply.js | 35 + .../src/svg/Quickreply.stories.js | 30 + .../svg-components/src/svg/RailwayAlert.js | 37 + .../src/svg/RailwayAlert.stories.js | 30 + .../svg-components/src/svg/RamenDining.js | 37 + .../src/svg/RamenDining.stories.js | 30 + .../svg-components/src/svg/RateReview.js | 37 + .../src/svg/RateReview.stories.js | 30 + .../svg-components/src/svg/ReadMore.js | 37 + .../src/svg/ReadMore.stories.js | 30 + .../svg-components/src/svg/Receipt.js | 37 + .../svg-components/src/svg/Receipt.stories.js | 30 + .../svg-components/src/svg/Recommend.js | 37 + .../src/svg/Recommend.stories.js | 30 + .../svg-components/src/svg/RecordVoiceOver.js | 38 + .../src/svg/RecordVoiceOver.stories.js | 30 + .../packages/svg-components/src/svg/Redeem.js | 37 + .../svg-components/src/svg/Redeem.stories.js | 30 + .../svg-components/src/svg/ReduceCapacity.js | 37 + .../src/svg/ReduceCapacity.stories.js | 30 + .../svg-components/src/svg/Refresh.js | 37 + .../svg-components/src/svg/Refresh.stories.js | 30 + .../svg-components/src/svg/RemoveDone.js | 37 + .../src/svg/RemoveDone.stories.js | 30 + .../svg-components/src/svg/RemoveModerator.js | 37 + .../src/svg/RemoveModerator.stories.js | 30 + .../src/svg/RemoveShoppingCart.js | 37 + .../src/svg/RemoveShoppingCart.stories.js | 30 + .../svg-components/src/svg/Reorder.js | 34 + .../svg-components/src/svg/Reorder.stories.js | 30 + .../svg-components/src/svg/ReportProblem.js | 34 + .../src/svg/ReportProblem.stories.js | 30 + .../svg-components/src/svg/RequestPage.js | 37 + .../src/svg/RequestPage.stories.js | 30 + .../svg-components/src/svg/RequestQuote.js | 37 + .../src/svg/RequestQuote.stories.js | 30 + .../svg-components/src/svg/Restaurant.js | 37 + .../src/svg/Restaurant.stories.js | 30 + .../svg-components/src/svg/RestaurantMenu.js | 37 + .../src/svg/RestaurantMenu.stories.js | 30 + .../svg-components/src/svg/Restore.js | 37 + .../svg-components/src/svg/Restore.stories.js | 30 + .../src/svg/RestoreFromTrash.js | 37 + .../src/svg/RestoreFromTrash.stories.js | 30 + .../svg-components/src/svg/RestorePage.js | 37 + .../src/svg/RestorePage.stories.js | 30 + .../svg-components/src/svg/RingVolume.js | 37 + .../src/svg/RingVolume.stories.js | 30 + .../packages/svg-components/src/svg/Room.js | 37 + .../svg-components/src/svg/Room.stories.js | 30 + .../svg-components/src/svg/Rotate360.js | 37 + .../src/svg/Rotate360.stories.js | 30 + .../svg-components/src/svg/Rotation3D.js | 37 + .../src/svg/Rotation3D.stories.js | 30 + .../svg-components/src/svg/RoundedCheck.js | 26 + .../src/svg/RoundedCheck.stories.js | 37 + .../svg-components/src/svg/RoundedCorner.js | 37 + .../src/svg/RoundedCorner.stories.js | 30 + .../packages/svg-components/src/svg/Rowing.js | 37 + .../svg-components/src/svg/Rowing.stories.js | 30 + .../svg-components/src/svg/RssFeed.js | 41 + .../svg-components/src/svg/RssFeed.stories.js | 30 + .../packages/svg-components/src/svg/Rtt.js | 37 + .../svg-components/src/svg/Rtt.stories.js | 30 + .../packages/svg-components/src/svg/Rule.js | 37 + .../svg-components/src/svg/Rule.stories.js | 30 + .../svg-components/src/svg/RuleFolder.js | 37 + .../src/svg/RuleFolder.stories.js | 30 + .../svg-components/src/svg/RunCircle.js | 37 + .../src/svg/RunCircle.stories.js | 30 + .../svg-components/src/svg/SMSText.js | 37 + .../svg-components/src/svg/SMSText.stories.js | 30 + .../svg-components/src/svg/Sanitizer.js | 37 + .../src/svg/Sanitizer.stories.js | 30 + .../svg-components/src/svg/Satellite.js | 37 + .../src/svg/Satellite.stories.js | 30 + .../svg-components/src/svg/SavedSearch.js | 37 + .../src/svg/SavedSearch.stories.js | 30 + .../svg-components/src/svg/Schedule.js | 38 + .../src/svg/Schedule.stories.js | 30 + .../svg-components/src/svg/ScheduleSend.js | 37 + .../src/svg/ScheduleSend.stories.js | 30 + .../packages/svg-components/src/svg/School.js | 34 + .../svg-components/src/svg/School.stories.js | 30 + .../svg-components/src/svg/Science.js | 37 + .../svg-components/src/svg/Science.stories.js | 30 + .../svg-components/src/svg/ScreenShare.js | 37 + .../src/svg/ScreenShare.stories.js | 30 + .../svg-components/src/svg/ScreenShareStop.js | 37 + .../src/svg/ScreenShareStop.stories.js | 30 + .../packages/svg-components/src/svg/Search.js | 37 + .../svg-components/src/svg/Search.stories.js | 30 + .../svg-components/src/svg/SearchOff.js | 41 + .../src/svg/SearchOff.stories.js | 30 + .../svg-components/src/svg/Segment.js | 34 + .../svg-components/src/svg/Segment.stories.js | 30 + .../svg-components/src/svg/SelfImprovement.js | 38 + .../src/svg/SelfImprovement.stories.js | 30 + .../svg-components/src/svg/SendAndArchive.js | 37 + .../src/svg/SendAndArchive.stories.js | 30 + .../src/svg/SentimentDissatisfied.js | 45 + .../src/svg/SentimentDissatisfied.stories.js | 30 + .../src/svg/SentimentNeutral.js | 46 + .../src/svg/SentimentNeutral.stories.js | 30 + .../src/svg/SentimentSatisfied.js | 45 + .../src/svg/SentimentSatisfied.stories.js | 30 + .../src/svg/SentimentSatisfiedAlt.js | 53 + .../src/svg/SentimentSatisfiedAlt.stories.js | 30 + .../src/svg/SentimentVeryDissatisfied.js | 45 + .../svg/SentimentVeryDissatisfied.stories.js | 30 + .../src/svg/SentimentVerySatisfied.js | 45 + .../src/svg/SentimentVerySatisfied.stories.js | 30 + .../svg-components/src/svg/SetMeal.js | 37 + .../svg-components/src/svg/SetMeal.stories.js | 30 + .../svg-components/src/svg/Settings.js | 37 + .../src/svg/Settings.stories.js | 30 + .../src/svg/SettingsApplications.js | 37 + .../src/svg/SettingsApplications.stories.js | 30 + .../src/svg/SettingsBackupRestore.js | 37 + .../src/svg/SettingsBackupRestore.stories.js | 30 + .../src/svg/SettingsBluetooth.js | 37 + .../src/svg/SettingsBluetooth.stories.js | 30 + .../src/svg/SettingsBrightness.js | 37 + .../src/svg/SettingsBrightness.stories.js | 30 + .../svg-components/src/svg/SettingsCell.js | 37 + .../src/svg/SettingsCell.stories.js | 30 + .../src/svg/SettingsEthernet.js | 37 + .../src/svg/SettingsEthernet.stories.js | 30 + .../src/svg/SettingsInputAntenna.js | 37 + .../src/svg/SettingsInputAntenna.stories.js | 30 + .../src/svg/SettingsInputComponent.js | 37 + .../src/svg/SettingsInputComponent.stories.js | 30 + .../src/svg/SettingsInputComposite.js | 37 + .../src/svg/SettingsInputComposite.stories.js | 30 + .../src/svg/SettingsInputHdmi.js | 34 + .../src/svg/SettingsInputHdmi.stories.js | 30 + .../src/svg/SettingsInputVideo.js | 37 + .../src/svg/SettingsInputVideo.stories.js | 30 + .../src/svg/SettingsOverscan.js | 37 + .../src/svg/SettingsOverscan.stories.js | 30 + .../svg-components/src/svg/SettingsPhone.js | 37 + .../src/svg/SettingsPhone.stories.js | 30 + .../svg-components/src/svg/SettingsPower.js | 37 + .../src/svg/SettingsPower.stories.js | 30 + .../svg-components/src/svg/SettingsRemote.js | 37 + .../src/svg/SettingsRemote.stories.js | 30 + .../svg-components/src/svg/SettingsVoice.js | 37 + .../src/svg/SettingsVoice.stories.js | 30 + .../packages/svg-components/src/svg/Share.js | 37 + .../svg-components/src/svg/Share.stories.js | 30 + .../packages/svg-components/src/svg/Shop.js | 37 + .../svg-components/src/svg/Shop.stories.js | 30 + .../svg-components/src/svg/ShopAlt.js | 37 + .../svg-components/src/svg/ShopAlt.stories.js | 30 + .../svg-components/src/svg/ShoppingBag.js | 37 + .../src/svg/ShoppingBag.stories.js | 30 + .../svg-components/src/svg/ShoppingBasket.js | 37 + .../src/svg/ShoppingBasket.stories.js | 30 + .../svg-components/src/svg/ShoppingCart.js | 37 + .../src/svg/ShoppingCart.stories.js | 30 + .../packages/svg-components/src/svg/Sick.js | 37 + .../svg-components/src/svg/Sick.stories.js | 30 + .../svg-components/src/svg/SingleBed.js | 37 + .../src/svg/SingleBed.stories.js | 30 + .../svg-components/src/svg/SixFtApart.js | 37 + .../src/svg/SixFtApart.stories.js | 30 + .../svg-components/src/svg/SmartButton.js | 37 + .../src/svg/SmartButton.stories.js | 30 + .../svg-components/src/svg/SnippetFolder.js | 37 + .../src/svg/SnippetFolder.stories.js | 30 + .../packages/svg-components/src/svg/Source.js | 37 + .../svg-components/src/svg/Source.stories.js | 30 + .../packages/svg-components/src/svg/South.js | 34 + .../svg-components/src/svg/South.stories.js | 30 + .../svg-components/src/svg/SouthEast.js | 34 + .../src/svg/SouthEast.stories.js | 30 + .../svg-components/src/svg/SouthWest.js | 34 + .../src/svg/SouthWest.stories.js | 30 + .../svg-components/src/svg/SpeakerNotes.js | 37 + .../src/svg/SpeakerNotes.stories.js | 30 + .../svg-components/src/svg/SpeakerNotesOff.js | 37 + .../src/svg/SpeakerNotesOff.stories.js | 30 + .../svg-components/src/svg/SpeakerPhone.js | 37 + .../src/svg/SpeakerPhone.stories.js | 30 + .../svg-components/src/svg/SpellCheck.js | 37 + .../src/svg/SpellCheck.stories.js | 30 + .../packages/svg-components/src/svg/Sports.js | 38 + .../svg-components/src/svg/Sports.stories.js | 30 + .../svg-components/src/svg/SportsBaseball.js | 45 + .../src/svg/SportsBaseball.stories.js | 30 + .../src/svg/SportsBasketball.js | 44 + .../src/svg/SportsBasketball.stories.js | 30 + .../svg-components/src/svg/SportsCricket.js | 39 + .../src/svg/SportsCricket.stories.js | 30 + .../svg-components/src/svg/SportsEsports.js | 37 + .../src/svg/SportsEsports.stories.js | 30 + .../svg-components/src/svg/SportsFootball.js | 45 + .../src/svg/SportsFootball.stories.js | 30 + .../svg-components/src/svg/SportsGolf.js | 41 + .../src/svg/SportsGolf.stories.js | 30 + .../svg-components/src/svg/SportsHandball.js | 45 + .../src/svg/SportsHandball.stories.js | 30 + .../svg-components/src/svg/SportsHockey.js | 40 + .../src/svg/SportsHockey.stories.js | 30 + .../svg-components/src/svg/SportsKabaddi.js | 49 + .../src/svg/SportsKabaddi.stories.js | 30 + .../svg-components/src/svg/SportsMma.js | 38 + .../src/svg/SportsMma.stories.js | 30 + .../src/svg/SportsMotorsports.js | 41 + .../src/svg/SportsMotorsports.stories.js | 30 + .../svg-components/src/svg/SportsRugby.js | 37 + .../src/svg/SportsRugby.stories.js | 30 + .../svg-components/src/svg/SportsSoccer.js | 37 + .../src/svg/SportsSoccer.stories.js | 30 + .../svg-components/src/svg/SportsTennis.js | 41 + .../src/svg/SportsTennis.stories.js | 30 + .../src/svg/SportsVolleyball.js | 39 + .../src/svg/SportsVolleyball.stories.js | 30 + .../svg-components/src/svg/StarEmpty.js | 38 + .../src/svg/StarEmpty.stories.js | 30 + .../svg-components/src/svg/StarFilled.js | 74 + .../src/svg/StarFilled.stories.js | 29 + .../svg-components/src/svg/StarRate.js | 34 + .../src/svg/StarRate.stories.js | 30 + .../packages/svg-components/src/svg/Stars.js | 37 + .../svg-components/src/svg/Stars.stories.js | 30 + .../src/svg/StayCurrentLandscape.js | 37 + .../src/svg/StayCurrentLandscape.stories.js | 30 + .../src/svg/StayCurrentPortrait.js | 37 + .../src/svg/StayCurrentPortrait.stories.js | 30 + .../src/svg/StayPrimaryLandscape.js | 37 + .../src/svg/StayPrimaryLandscape.stories.js | 30 + .../src/svg/StayPrimaryPortrait.js | 37 + .../src/svg/StayPrimaryPortrait.stories.js | 30 + .../src/svg/StickyNotesSecondary.js | 37 + .../src/svg/StickyNotesSecondary.stories.js | 30 + .../packages/svg-components/src/svg/Store.js | 34 + .../svg-components/src/svg/Store.stories.js | 30 + .../src/svg/StoreMallDirectory.js | 34 + .../src/svg/StoreMallDirectory.stories.js | 30 + .../svg-components/src/svg/StreetView.js | 42 + .../src/svg/StreetView.stories.js | 30 + .../src/svg/SubdirectoryArrowLeft.js | 34 + .../src/svg/SubdirectoryArrowLeft.stories.js | 30 + .../src/svg/SubdirectoryArrowRight.js | 34 + .../src/svg/SubdirectoryArrowRight.stories.js | 30 + .../svg-components/src/svg/Subject.js | 34 + .../svg-components/src/svg/Subject.stories.js | 30 + .../svg-components/src/svg/SubtitlesOff.js | 41 + .../src/svg/SubtitlesOff.stories.js | 30 + .../packages/svg-components/src/svg/Subway.js | 45 + .../svg-components/src/svg/Subway.stories.js | 30 + .../svg-components/src/svg/Success.js | 33 + .../svg-components/src/svg/Success.stories.js | 30 + .../src/svg/SupervisedUserCircle.js | 37 + .../src/svg/SupervisedUserCircle.stories.js | 30 + .../src/svg/SupervisorAccount.js | 37 + .../src/svg/SupervisorAccount.stories.js | 30 + .../svg-components/src/svg/Support.js | 35 + .../svg-components/src/svg/Support.stories.js | 29 + .../svg-components/src/svg/SwapCalls.js | 35 + .../src/svg/SwapCalls.stories.js | 30 + .../svg-components/src/svg/SwapHorizontal.js | 32 + .../src/svg/SwapHorizontal.stories.js | 29 + .../src/svg/SwapHorizontalCircle.js | 35 + .../src/svg/SwapHorizontalCircle.stories.js | 29 + .../svg-components/src/svg/SwapVertical.js | 32 + .../src/svg/SwapVertical.stories.js | 30 + .../src/svg/SwapVerticalCircle.js | 35 + .../src/svg/SwapVerticalCircle.stories.js | 29 + .../packages/svg-components/src/svg/Swipe.js | 35 + .../svg-components/src/svg/Swipe.stories.js | 29 + .../svg-components/src/svg/SwitchAccount.js | 35 + .../src/svg/SwitchAccount.stories.js | 29 + .../svg-components/src/svg/SwitchLeft.js | 32 + .../src/svg/SwitchLeft.stories.js | 29 + .../svg-components/src/svg/SwitchRight.js | 32 + .../src/svg/SwitchRight.stories.js | 29 + .../svg-components/src/svg/SyncAlt.js | 33 + .../svg-components/src/svg/SyncAlt.stories.js | 29 + .../svg-components/src/svg/SystemUpdateAlt.js | 35 + .../src/svg/SystemUpdateAlt.stories.js | 29 + .../packages/svg-components/src/svg/Tab.js | 32 + .../svg-components/src/svg/Tab.stories.js | 29 + .../svg-components/src/svg/TabUnselected.js | 35 + .../src/svg/TabUnselected.stories.js | 29 + .../svg-components/src/svg/TableView.js | 35 + .../src/svg/TableView.stories.js | 29 + .../svg-components/src/svg/TakeOutDining.js | 37 + .../src/svg/TakeOutDining.stories.js | 29 + .../svg-components/src/svg/TaxiAlert.js | 35 + .../src/svg/TaxiAlert.stories.js | 29 + .../svg-components/src/svg/Terrain.js | 32 + .../svg-components/src/svg/Terrain.stories.js | 29 + .../svg-components/src/svg/TextRotateUp.js | 35 + .../src/svg/TextRotateUp.stories.js | 29 + .../src/svg/TextRotateVertical.js | 35 + .../src/svg/TextRotateVertical.stories.js | 29 + .../src/svg/TextRotationAngleDown.js | 35 + .../src/svg/TextRotationAngleDown.stories.js | 29 + .../src/svg/TextRotationAngleUp.js | 35 + .../src/svg/TextRotationAngleUp.stories.js | 29 + .../src/svg/TextRotationDown.js | 35 + .../src/svg/TextRotationDown.stories.js | 29 + .../src/svg/TextRotationNone.js | 35 + .../src/svg/TextRotationNone.stories.js | 29 + .../svg-components/src/svg/TextSnippet.js | 35 + .../src/svg/TextSnippet.stories.js | 29 + .../svg-components/src/svg/TheaterComedy.js | 39 + .../src/svg/TheaterComedy.stories.js | 29 + .../svg-components/src/svg/Theaters.js | 35 + .../src/svg/Theaters.stories.js | 29 + .../svg-components/src/svg/ThumbDown.js | 35 + .../src/svg/ThumbDown.stories.js | 29 + .../svg-components/src/svg/ThumbDownAlt.js | 35 + .../src/svg/ThumbDownAlt.stories.js | 29 + .../svg-components/src/svg/ThumbDownOffAlt.js | 35 + .../src/svg/ThumbDownOffAlt.stories.js | 29 + .../svg-components/src/svg/ThumbUp.js | 35 + .../svg-components/src/svg/ThumbUp.stories.js | 29 + .../svg-components/src/svg/ThumbUpAlt.js | 35 + .../src/svg/ThumbUpAlt.stories.js | 29 + .../svg-components/src/svg/ThumbUpOffAlt.js | 35 + .../src/svg/ThumbUpOffAlt.stories.js | 29 + .../svg-components/src/svg/ThumbsUpDown.js | 35 + .../src/svg/ThumbsUpDown.stories.js | 29 + .../svg-components/src/svg/TickMark.js | 32 + .../src/svg/TickMark.stories.js | 30 + .../svg-components/src/svg/Timeline.js | 35 + .../src/svg/Timeline.stories.js | 29 + .../packages/svg-components/src/svg/Toc.js | 32 + .../svg-components/src/svg/Toc.stories.js | 29 + .../packages/svg-components/src/svg/Today.js | 35 + .../svg-components/src/svg/Today.stories.js | 29 + .../packages/svg-components/src/svg/Toll.js | 39 + .../svg-components/src/svg/Toll.stories.js | 29 + .../packages/svg-components/src/svg/Topic.js | 35 + .../svg-components/src/svg/Topic.stories.js | 29 + .../packages/svg-components/src/svg/Torch.js | 48 + .../svg-components/src/svg/Torch.stories.js | 30 + .../svg-components/src/svg/TorchNoun.js | 37 + .../src/svg/TorchNoun.stories.js | 29 + .../svg-components/src/svg/TouchApp.js | 35 + .../src/svg/TouchApp.stories.js | 29 + .../packages/svg-components/src/svg/Tour.js | 35 + .../svg-components/src/svg/Tour.stories.js | 30 + .../svg-components/src/svg/TrackChanges.js | 35 + .../src/svg/TrackChanges.stories.js | 29 + .../svg-components/src/svg/Traffic.js | 35 + .../svg-components/src/svg/Traffic.stories.js | 30 + .../packages/svg-components/src/svg/Train.js | 35 + .../svg-components/src/svg/Train.stories.js | 29 + .../packages/svg-components/src/svg/Tram.js | 35 + .../svg-components/src/svg/Tram.stories.js | 29 + .../src/svg/TransferWithinStation.js | 35 + .../src/svg/TransferWithinStation.stories.js | 30 + .../src/svg/TransitEnterExit.js | 32 + .../src/svg/TransitEnterExit.stories.js | 30 + .../svg-components/src/svg/Translate.js | 35 + .../src/svg/Translate.stories.js | 30 + .../src/svg/TranslateLanguage.js | 38 + .../src/svg/TranslateLanguage.stories.js | 29 + .../svg-components/src/svg/TrendingDown.js | 32 + .../src/svg/TrendingDown.stories.js | 29 + .../svg-components/src/svg/TrendingFlat.js | 32 + .../src/svg/TrendingFlat.stories.js | 29 + .../svg-components/src/svg/TrendingUp.js | 32 + .../src/svg/TrendingUp.stories.js | 29 + .../svg-components/src/svg/TripOrigin.js | 35 + .../src/svg/TripOrigin.stories.js | 29 + .../svg-components/src/svg/TurnedIn.js | 32 + .../src/svg/TurnedIn.stories.js | 29 + .../svg-components/src/svg/TurnedInNot.js | 32 + .../src/svg/TurnedInNot.stories.js | 29 + .../svg-components/src/svg/TwoWheeler.js | 35 + .../src/svg/TwoWheeler.stories.js | 29 + .../svg-components/src/svg/UnfoldLess.js | 35 + .../src/svg/UnfoldLess.stories.js | 29 + .../svg-components/src/svg/UnfoldMore.js | 35 + .../src/svg/UnfoldMore.stories.js | 29 + .../svg-components/src/svg/Unpublished.js | 35 + .../src/svg/Unpublished.stories.js | 29 + .../svg-components/src/svg/Unsubscribe.js | 28 + .../src/svg/Unsubscribe.stories.js | 29 + .../packages/svg-components/src/svg/Update.js | 35 + .../svg-components/src/svg/Update.stories.js | 30 + .../svg-components/src/svg/UpdateExpense.js | 51 + .../src/svg/UpdateExpense.stories.js | 29 + .../src/svg/UpdateExpenseSecondary.js | 28 + .../src/svg/UpdateExpenseSecondary.stories.js | 29 + .../svg-components/src/svg/Upgrade.js | 32 + .../svg-components/src/svg/Upgrade.stories.js | 30 + .../svg-components/src/svg/UploadFile.js | 35 + .../src/svg/UploadFile.stories.js | 29 + .../svg-components/src/svg/Verified.js | 35 + .../src/svg/Verified.stories.js | 29 + .../svg-components/src/svg/VerifiedUser.js | 35 + .../src/svg/VerifiedUser.stories.js | 29 + .../svg-components/src/svg/VerticalSplit.js | 32 + .../src/svg/VerticalSplit.stories.js | 29 + .../svg-components/src/svg/ViewAgenda.js | 35 + .../src/svg/ViewAgenda.stories.js | 29 + .../svg-components/src/svg/ViewArray.js | 32 + .../src/svg/ViewArray.stories.js | 29 + .../svg-components/src/svg/ViewCarousel.js | 32 + .../src/svg/ViewCarousel.stories.js | 29 + .../svg-components/src/svg/ViewColumn.js | 32 + .../src/svg/ViewColumn.stories.js | 29 + .../svg-components/src/svg/ViewDay.js | 35 + .../svg-components/src/svg/ViewDay.stories.js | 29 + .../svg-components/src/svg/ViewHeadline.js | 32 + .../src/svg/ViewHeadline.stories.js | 29 + .../svg-components/src/svg/ViewInAr.js | 35 + .../src/svg/ViewInAr.stories.js | 29 + .../svg-components/src/svg/ViewList.js | 32 + .../src/svg/ViewList.stories.js | 29 + .../svg-components/src/svg/ViewModule.js | 32 + .../src/svg/ViewModule.stories.js | 29 + .../svg-components/src/svg/ViewQuilt.js | 32 + .../src/svg/ViewQuilt.stories.js | 29 + .../svg-components/src/svg/ViewSidebar.js | 32 + .../src/svg/ViewSidebar.stories.js | 29 + .../svg-components/src/svg/ViewStream.js | 32 + .../src/svg/ViewStream.stories.js | 29 + .../svg-components/src/svg/ViewWeek.js | 35 + .../src/svg/ViewWeek.stories.js | 29 + .../svg-components/src/svg/Visibility.js | 35 + .../src/svg/Visibility.stories.js | 29 + .../svg-components/src/svg/VisibilityOff.js | 35 + .../src/svg/VisibilityOff.stories.js | 30 + .../svg-components/src/svg/VoiceOverOff.js | 35 + .../src/svg/VoiceOverOff.stories.js | 29 + .../svg-components/src/svg/Voicemail.js | 35 + .../src/svg/Voicemail.stories.js | 29 + .../src/svg/VolunteerActivism.js | 40 + .../src/svg/VolunteerActivism.stories.js | 29 + .../packages/svg-components/src/svg/VpnKey.js | 35 + .../svg-components/src/svg/VpnKey.stories.js | 29 + .../svg-components/src/svg/Warning.js | 32 + .../svg-components/src/svg/Warning.stories.js | 29 + .../svg-components/src/svg/WatchLater.js | 35 + .../src/svg/WatchLater.stories.js | 29 + .../svg-components/src/svg/WaterfallChart.js | 32 + .../src/svg/WaterfallChart.stories.js | 29 + .../packages/svg-components/src/svg/West.js | 32 + .../svg-components/src/svg/West.stories.js | 29 + .../svg-components/src/svg/Whatsapp.js | 35 + .../src/svg/Whatsapp.stories.js | 29 + .../svg-components/src/svg/Whatshot.js | 35 + .../src/svg/Whatshot.stories.js | 29 + .../svg-components/src/svg/WifiCalling.js | 36 + .../src/svg/WifiCalling.stories.js | 29 + .../src/svg/WifiProtectedSetup.js | 39 + .../src/svg/WifiProtectedSetup.stories.js | 29 + .../svg-components/src/svg/WineBar.js | 32 + .../svg-components/src/svg/WineBar.stories.js | 29 + .../packages/svg-components/src/svg/Work.js | 35 + .../svg-components/src/svg/Work.stories.js | 29 + .../svg-components/src/svg/WorkOff.js | 35 + .../svg-components/src/svg/WorkOff.stories.js | 29 + .../svg-components/src/svg/WorkOutline.js | 37 + .../src/svg/WorkOutline.stories.js | 29 + .../src/svg/WorkspacesFilled.js | 35 + .../src/svg/WorkspacesFilled.stories.js | 30 + .../src/svg/WorkspacesOutline.js | 35 + .../src/svg/WorkspacesOutline.stories.js | 30 + .../svg-components/src/svg/WrongLocation.js | 39 + .../src/svg/WrongLocation.stories.js | 29 + .../svg-components/src/svg/Wysiwyg.js | 35 + .../svg-components/src/svg/Wysiwyg.stories.js | 29 + .../src/svg/YoutubeSearchedFor.js | 35 + .../src/svg/YoutubeSearchedFor.stories.js | 30 + .../packages/svg-components/src/svg/ZoomIn.js | 36 + .../svg-components/src/svg/ZoomIn.stories.js | 29 + .../svg-components/src/svg/ZoomOut.js | 35 + .../svg-components/src/svg/ZoomOut.stories.js | 29 + .../svg-components/src/svg/ZoomOutMap.js | 35 + .../src/svg/ZoomOutMap.stories.js | 29 + .../micro-ui-internals/publish-workbench.sh | 53 + micro-ui/web/micro-ui-internals/publish.sh | 52 + .../web/micro-ui-internals/scripts/create.sh | 3 + .../web/micro-ui-internals/scripts/deploy.sh | 8 + .../web/micro-ui-internals/scripts/jenkins.sh | 3 + .../web/micro-ui-internals/scripts/run.sh | 32 + micro-ui/web/micro-ui-internals/test.js | 30 + micro-ui/web/package.json | 84 + micro-ui/web/public/index.html | 39 + micro-ui/web/public/robots.txt | 3 + micro-ui/web/src/App.js | 72 + micro-ui/web/src/ComponentRegistry.js | 11 + .../src/Customisations/UICustomizations.js | 428 ++++ micro-ui/web/src/Customisations/index.js | 19 + micro-ui/web/src/Customisations/pt/index.js | 13 + .../pt/pageComponents/PTAllotmentDetails.js | 64 + .../pt/pageComponents/PTBusinessDetails.js | 68 + .../pt/pageComponents/PTVasikaDetails.js | 79 + .../pt/pageComponents/PropertyUsageType.js | 134 ++ .../src/Customisations/tl/TLCustomisation.js | 5 + micro-ui/web/src/Customisations/tl/index.js | 7 + .../tl/pageComponents/PropertyUsageType.js | 136 ++ micro-ui/web/src/index.css | 0 micro-ui/web/src/index.js | 62 + micro-ui/web/src/setupProxy.js | 30 + micro-ui/web/webpack.config.js | 43 + micro-ui/web/workbench/App.js | 55 + micro-ui/web/workbench/Dockerfile | 29 + micro-ui/web/workbench/install-deps.sh | 18 + micro-ui/web/workbench/inter-package.json | 71 + micro-ui/web/workbench/nginx.conf | 12 + micro-ui/web/workbench/package.json | 74 + micro-ui/web/workbench/webpack.config.js | 40 + 2598 files changed, 140287 insertions(+), 1 deletion(-) create mode 100644 .gitignore create mode 100644 CODEOWNERS create mode 100644 LICENSE create mode 100644 micro-ui/.gitignore create mode 100644 micro-ui/CODEOWNERS create mode 100644 micro-ui/Jenkinsfile create mode 100644 micro-ui/README.md create mode 100644 micro-ui/package.json create mode 100644 micro-ui/web/.babelrc create mode 100644 micro-ui/web/.env.sample create mode 100644 micro-ui/web/core/App.js create mode 100644 micro-ui/web/core/Dockerfile create mode 100755 micro-ui/web/core/install-deps.sh create mode 100644 micro-ui/web/core/inter-package.json create mode 100644 micro-ui/web/core/nginx.conf create mode 100644 micro-ui/web/core/package.json create mode 100644 micro-ui/web/core/webpack.config.js create mode 100644 micro-ui/web/docker/Dockerfile create mode 100644 micro-ui/web/docker/devDockerfile create mode 100644 micro-ui/web/docker/masDockerfile create mode 100644 micro-ui/web/docker/nginx.conf create mode 100644 micro-ui/web/envs.js create mode 100755 micro-ui/web/install-deps.sh create mode 100644 micro-ui/web/micro-ui-internals/.gitignore create mode 100644 micro-ui/web/micro-ui-internals/.prettierignore create mode 100644 micro-ui/web/micro-ui-internals/.prettierrc.json create mode 100644 micro-ui/web/micro-ui-internals/README.md create mode 100644 micro-ui/web/micro-ui-internals/clean.sh create mode 100644 micro-ui/web/micro-ui-internals/example/.env-fsm create mode 100644 micro-ui/web/micro-ui-internals/example/.env-health-qa create mode 100644 micro-ui/web/micro-ui-internals/example/.env-mz-prod create mode 100644 micro-ui/web/micro-ui-internals/example/.env-mz-uat create mode 100644 micro-ui/web/micro-ui-internals/example/.env-qa create mode 100644 micro-ui/web/micro-ui-internals/example/.env-unifiedDev create mode 100644 micro-ui/web/micro-ui-internals/example/.env-unifieddev create mode 100644 micro-ui/web/micro-ui-internals/example/.env-upyog create mode 100644 micro-ui/web/micro-ui-internals/example/.env-workbench create mode 100644 micro-ui/web/micro-ui-internals/example/.env-workbench-qa create mode 100644 micro-ui/web/micro-ui-internals/example/.env-worksdev create mode 100644 micro-ui/web/micro-ui-internals/example/maspackage.json create mode 100644 micro-ui/web/micro-ui-internals/example/package.json create mode 100644 micro-ui/web/micro-ui-internals/example/public/index.html create mode 100644 micro-ui/web/micro-ui-internals/example/src/ComponentRegistry.js create mode 100644 micro-ui/web/micro-ui-internals/example/src/UICustomizations.js create mode 100644 micro-ui/web/micro-ui-internals/example/src/complaintConfig.js create mode 100644 micro-ui/web/micro-ui-internals/example/src/components/SelectName.js create mode 100644 micro-ui/web/micro-ui-internals/example/src/fsm.js create mode 100644 micro-ui/web/micro-ui-internals/example/src/index.js create mode 100644 micro-ui/web/micro-ui-internals/example/src/pgr.js create mode 100644 micro-ui/web/micro-ui-internals/example/src/setupProxy.js create mode 100644 micro-ui/web/micro-ui-internals/package.json create mode 100644 micro-ui/web/micro-ui-internals/packages/config/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/config/package.json create mode 100644 micro-ui/web/micro-ui-internals/packages/css/README.md create mode 100644 micro-ui/web/micro-ui-internals/packages/css/gulpfile.js create mode 100644 micro-ui/web/micro-ui-internals/packages/css/img/browser-icon.png create mode 100644 micro-ui/web/micro-ui-internals/packages/css/img/m_seva_white_logo.png create mode 100644 micro-ui/web/micro-ui-internals/packages/css/img/mseva-demo.png create mode 100644 micro-ui/web/micro-ui-internals/packages/css/package.json create mode 100644 micro-ui/web/micro-ui-internals/packages/css/postcss.config.js create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/CardBasedOptions.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/CitizenHomeCard.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/EllipsisMenu.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/EventCalendarView.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/FAQ.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/OnGroundEventCard.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/PageBasedInput.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/PopupHeadingLabel.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/PropertySearchForm.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/SearchForm.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/SearchOnRadioButton.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/StandaloneSearchBar.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/TimeLine.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/WhatsNewCard.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/actionLink.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/actionbar.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/bannercomponents.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/body.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/buttons.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/card.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/cardHeaderWithOptions.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/changeLanguage.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/charts.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/checkbox.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/checkpoint.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/citizenInfoLabel.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/custombtn.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/datatable.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/datewrap.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/detailscard.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/detailscontainer.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/filters.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/grey.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/hoc/InboxComposer.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/hoc/index.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/howItWorks.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/imageviewer.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/inboxv2/InboxLinks.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/inboxv2/horizontalNav.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/inboxv2/inboxSearch.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/inboxv2/inboxSearchComposer.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/inboxv2/index.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/inboxv2/searchComponentTable.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/info-banner.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/inputotp.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/keynote.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/languageSelector.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/loader.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/map.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/menu.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/metricsTable.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/multiLink.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/multiSelectDropdown.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/navbar.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/plusMinus.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/popup.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/radiobtn.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/ratingstar.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/roundedLabel.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/searchAction.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/sectionalDropdown.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/selectdropdown.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/sidebar.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/staticDynamicMessages.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/staticSideBar.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/statushighlight.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/submiterrors.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/summary.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/table.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/tag.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/telephone.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/textfields.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/toast.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/toggleSwitch.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/topbar.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/components/uploadcomponents.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/ErrorMessage.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/FormComposerV2.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/actionLinkV2.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/actionbarV2.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/appContainerV2.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/backButtonV2.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/bannerV2.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/bodyContainerV2.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/breadCrumbV2.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/breakLineV2.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/buttonsV2.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/cardV2.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/checkboxV2.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/checkpointV2.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/collapseAndExpandGroups.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/dateWrapV2.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/displayPhotosV2.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/headerV2.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/infoBannerV2.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/keynoteV2.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/loaderV2.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/mobileNumberV2.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/multiSelectDropdownV2.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/noresultsfoundV2.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/otpInputV2.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/popUpV2.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/radiobtnV2.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/ratingV2.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/selectdropdownV2.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/tagV2.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/telephoneV2.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/textInputV2.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/textareaV2.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/uploadFileV2.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/digitv2/index.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/digitv2/pages/employee/index.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/digitv2/pages/employee/workbench.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/digitv2/typography.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/index.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/pages/citizen/CitizenEngagementNotificationWrapper.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/pages/citizen/DocumentList.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/pages/citizen/Events.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/pages/citizen/HomePageWrapper.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/pages/citizen/SurveyList.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/pages/citizen/citizenDocument.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/pages/citizen/container.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/pages/citizen/payment/payment-type.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/pages/citizen/updatePropertyNumber.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/EmployeeLogin.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/cardfix.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/container.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/dss.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/form-fields.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/iframe.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/inbox.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/index.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/login.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/oldMobileInbox.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/popupmodule.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/response.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/scroll-table.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/surveys.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/tooltip.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/updateNumber.scss create mode 100644 micro-ui/web/micro-ui-internals/packages/css/svg/arrowdown.svg create mode 100644 micro-ui/web/micro-ui-internals/packages/css/svg/arrowleft.svg create mode 100644 micro-ui/web/micro-ui-internals/packages/css/svg/calendar.svg create mode 100644 micro-ui/web/micro-ui-internals/packages/css/svg/camera.svg create mode 100644 micro-ui/web/micro-ui-internals/packages/css/svg/check.svg create mode 100644 micro-ui/web/micro-ui-internals/packages/css/svg/close.svg create mode 100644 micro-ui/web/micro-ui-internals/packages/css/svg/error.svg create mode 100644 micro-ui/web/micro-ui-internals/packages/css/svg/error2.svg create mode 100644 micro-ui/web/micro-ui-internals/packages/css/svg/searchicon.svg create mode 100644 micro-ui/web/micro-ui-internals/packages/css/svg/starempty.svg create mode 100644 micro-ui/web/micro-ui-internals/packages/css/svg/starfilled.svg create mode 100644 micro-ui/web/micro-ui-internals/packages/css/svg/success.svg create mode 100644 micro-ui/web/micro-ui-internals/packages/css/tailwind.config.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/README.md create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/package.json create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/config/configUtils.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/config/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/config/mergeConfig.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/contexts/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/enums/ConfigActionTypes.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/enums/FormFields.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/enums/Pages.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/enums/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/dss/useDSSDashboard.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/dss/useDashboardConfig.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/dss/useGetChart.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/dss/useGetCustomFilterRequestValues.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/dss/useGetCustomFilterValues.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/dss/useMDMS.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/engagement/useCreate.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/engagement/useDelete.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/engagement/useMdms.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/engagement/useSearch.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/engagement/useUpdate.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/events/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/events/useCreateEvent.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/events/useEventDetails.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/events/useEventInbox.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/events/useUpdateEvent.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/hrms/useHRMSCount.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/hrms/useHRMSGender.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/hrms/useHRMSGenderMDMS.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/hrms/useHRMSMDMS.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/hrms/useHRMSUpdate.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/hrms/useHRMScreate.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/hrms/useHRMSsearch.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/payment.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/pgr/useComplaintDetails.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/pgr/useComplaintList.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/pgr/useComplaintStatus.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/pgr/useComplaintStatusWithCount.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/pgr/useComplaintSubType.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/pgr/useComplaintTable.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/pgr/useComplaintTypes.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/pgr/useEmployeeFilter.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/pgr/useInboxData.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/pgr/useLocalities.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/pgr/useServiceDefs.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/pgr/useTenants.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/revalidateQuery.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/store.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/surveys/useCreate.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/surveys/useDelete.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/surveys/useSearch.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/surveys/useShowResults.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/surveys/useSubmitResponse.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/surveys/useSurveyInbox.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/surveys/useUpdate.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useAccessControl.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useApplicationForBillSearch.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useClickOutside.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useCustomAPIHook.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useCustomAPIMutationHook.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useCustomMDMS.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useDocumentSearch.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useDynamicData.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useEmployeeSearch.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useGenderMDMS.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useGetDSSAboutJSON.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useGetDSSFAQsJSON.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useGetFAQsJSON.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useHowItWorksJSON.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useInbox.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useInboxGeneral/filterFn.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useInboxGeneral/newFilterFn.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useInboxGeneral/searchFields.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useInboxGeneral/useInboxGeneral.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useInboxGeneral/useNewInbox.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useLocalities.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useLocation.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useMDMS.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useModuleTenants.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/usePrivacyContext.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useQueryParams.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useRouteSubscription.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useSessionStorage.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useStaticData.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useStatusGeneral.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useStore.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useTenants.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useUpdateCustom.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useWorkflowDetailsV2.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/userSearch.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/workflow.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/services/atoms/ApiCacheService.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/services/atoms/Download.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/services/atoms/JsDictionary.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/services/atoms/UploadServices.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/services/atoms/Utils/Date.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/services/atoms/Utils/ParsingUtils.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/services/atoms/Utils/Request.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/services/atoms/Utils/Storage.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/services/atoms/urls.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/Access.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/ApplicationUpdateActionsCustom.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/Bill.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/Complaint.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/ComponentRegistry.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/CustomService.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/DSS.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/Engagement.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/Events.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/HRMS.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/InboxService.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/Localities.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/Localization/service.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/Location.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/Login.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/MDMS.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/PGR.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/Payment.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/Surveys.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/UrlShortener.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/User/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/WorkFlow.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/services/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/services/molecules/DSS/getDSSDashboardData.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/services/molecules/ServiceDefinitions.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/services/molecules/ShareFiles.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/services/molecules/Store/service.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/services/molecules/StoreData.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/services/molecules/Ulb/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/services/molecules/getLocalities.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/subFormRegistry.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/translations/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/utils/browser.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/utils/componentRegistry.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/utils/date.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/utils/dss/dynamicRequestGenerator.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/utils/dss/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/utils/fileType.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/utils/fonts.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/utils/fsm/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/utils/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/utils/locale.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/utils/obps/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/utils/pdf.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/utils/preProcessMDMSConfig.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/utils/preProcessMDMSConfigInboxSearch.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/utils/privacy.js create mode 100644 micro-ui/web/micro-ui-internals/packages/libraries/src/utils/pt/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/common/README.md create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/common/package.json create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/common/src/Module.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/common/src/hoc/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/common/src/hoc/subform-composer.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/common/src/hoc/testForm-config.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/citizen/bills/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/citizen/bills/routes/bill-details/arrear-summary.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/citizen/bills/routes/bill-details/arrear-table.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/citizen/bills/routes/bill-details/bill-details.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/citizen/bills/routes/bill-details/bill-summary.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/citizen/bills/routes/bill-details/utils.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/citizen/bills/routes/bill-details/yearwise-bills.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/citizen/bills/routes/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/citizen/bills/routes/my-bills/my-bill.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/citizen/bills/routes/my-bills/my-bills.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/citizen/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/citizen/keynotesConfig.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/citizen/payers-details/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/citizen/payment-type/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/citizen/response/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/employee/IFrameInterface/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/employee/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/employee/payment-collect/Bill-details/billDetails.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/employee/payment-collect/Bill-details/billDetailsConfig.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/employee/payment-collect/ManualReciept/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/employee/payment-collect/card/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/employee/payment-collect/cheque/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/employee/payment-collect/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/employee/response/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/core/README.md create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/core/package.json create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/core/src/App.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/core/src/Module.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/core/src/components/AppModules.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/core/src/components/Background.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/core/src/components/ChangeCity.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/core/src/components/ChangeLanguage.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/core/src/components/Dialog/LogoutDialog.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/core/src/components/ErrorBoundaries.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/core/src/components/ErrorComponent.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/core/src/components/Header.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/core/src/components/Home.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/core/src/components/Search/MobileSearchApplication.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/core/src/components/Search/SearchFields.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/core/src/components/Search/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/core/src/components/TopBarSideBar/SideBar/CitizenSideBar.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/core/src/components/TopBarSideBar/SideBar/EmployeeSideBar.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/core/src/components/TopBarSideBar/SideBar/SideBar.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/core/src/components/TopBarSideBar/SideBar/StaticCitizenSideBar.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/core/src/components/TopBarSideBar/SideBar/SubMenu.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/core/src/components/TopBarSideBar/SideBar/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/core/src/components/TopBarSideBar/TopBar.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/core/src/components/TopBarSideBar/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/core/src/components/utils.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/core/src/config/sidebar-menu.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/core/src/context/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/core/src/hooks/useInterval.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/citizen/Allservices/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/citizen/FAQs/FAQs.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/citizen/FAQs/FaqComponent.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/citizen/Home/ImageUpload/UploadDrawer.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/citizen/Home/LanguageSelection.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/citizen/Home/LocationSelection.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/citizen/Home/UserProfile.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/citizen/Home/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/citizen/HowItWorks/howItWorks.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/citizen/Login/SelectMobileNumber.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/citizen/Login/SelectName.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/citizen/Login/SelectOtp.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/citizen/Login/config.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/citizen/Login/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/citizen/SearchApp.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/citizen/StaticDynamicComponent/StaticDynamicCard.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/citizen/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/ChangePassword/changePassword.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/ChangePassword/config.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/ChangePassword/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/ForgotPassword/config.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/ForgotPassword/forgotPassword.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/ForgotPassword/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/LanguageSelection/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/Login/config.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/Login/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/Login/login.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/core/src/redux/reducers/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/core/src/redux/store.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/dss/README.md create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/dss/package.json create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/dss/src/Module.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/dss/src/components/ArrowDownward.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/dss/src/components/ArrowUpward.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/dss/src/components/CustomAreaChart.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/dss/src/components/CustomBarChart.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/dss/src/components/CustomFilter.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/dss/src/components/CustomHorizontalBarChart.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/dss/src/components/CustomPieChart.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/dss/src/components/CustomTable.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/dss/src/components/DSSCard.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/dss/src/components/DateRange.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/dss/src/components/FilterContext.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/dss/src/components/Filters.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/dss/src/components/FiltersNational.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/dss/src/components/GenericChart.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/dss/src/components/Layout.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/dss/src/components/MapChart.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/dss/src/components/MetricChart.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/dss/src/components/NoData.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/dss/src/components/Summary.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/dss/src/components/Switch.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/dss/src/components/common/Icon.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/dss/src/components/india.topo.json create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/dss/src/components/mapDrillDownTable.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/dss/src/images/Arrow_Downward.svg create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/dss/src/images/Arrow_Right.svg create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/dss/src/images/Arrow_Upward.svg create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/dss/src/images/Digit.png create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/dss/src/images/birth_death.svg create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/dss/src/images/building_permission.svg create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/dss/src/images/complaints.svg create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/dss/src/images/dashboards.svg create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/dss/src/images/download.svg create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/dss/src/images/finance.svg create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/dss/src/images/fire-noc.svg create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/dss/src/images/firenocdashboard.svg create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/dss/src/images/fsm.svg create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/dss/src/images/home.svg create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/dss/src/images/icon-calendar.svg create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/dss/src/images/icon-department.svg create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/dss/src/images/icon-districts.svg create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/dss/src/images/icon-ul-bs.svg create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/dss/src/images/mcollect.svg create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/dss/src/images/obps.svg create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/dss/src/images/property-tax.svg create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/dss/src/images/propertytax_nurt.svg create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/dss/src/images/shape.svg create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/dss/src/images/share.svg create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/dss/src/images/trade-license.svg create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/dss/src/images/tradeLic_nurt.svg create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/dss/src/images/w&s_nurt.svg create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/dss/src/images/water_sewerage.svg create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/dss/src/pages/About.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/dss/src/pages/DrillDown.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/dss/src/pages/FAQs/FAQComponent.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/dss/src/pages/FAQs/FAQs.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/dss/src/pages/Home.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/dss/src/pages/Overview.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/dss/src/pages/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/README.md create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/package.json create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/Module.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/components/Documents/ApplicationCard.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/components/Documents/DesktopInbox.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/components/Documents/DocumentCard.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/components/Documents/DocumentDetails.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/components/Documents/DocumentNotificationTable.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/components/Documents/EngagementDocsULB.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/components/Documents/EngagementULBDropdown.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/components/Documents/Filter.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/components/Documents/MobileInbox.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/components/Documents/Search.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/components/Documents/Searchbar.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/components/Documents/engagement-doc-category.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/components/Documents/engagement-doc-description.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/components/Documents/engagement-doc-documents.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/components/Documents/engagement-doc-name.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/components/EngagementCard.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/components/Events/ApplicationCard.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/components/Events/ApplicationTable.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/components/Events/DesktopInbox.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/components/Events/DocumentDetails.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/components/Events/DropdownUlb.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/components/Events/EventForm.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/components/Events/EventLink.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/components/Events/Filter.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/components/Events/MobileInbox.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/components/Events/Search.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/components/Events/SelectGeoLocation.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/components/Events/SelectToDate.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/components/Events/Status.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/components/Events/StatusCount.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/components/Messages/ApplicationCard.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/components/Messages/ApplicationTable.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/components/Messages/BroadcastWhatsNewCard.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/components/Messages/DesktopInbox.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/components/Messages/DocumentDetails.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/components/Messages/DropdownUlb.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/components/Messages/EventLink.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/components/Messages/Filter.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/components/Messages/MessageForm.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/components/Messages/MobileInbox.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/components/Messages/Search.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/components/Messages/SelectGeoLocation.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/components/Messages/SelectToDate.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/components/Messages/Status.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/components/Messages/StatusCount.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/components/Modal/Confirmation.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/components/Modal/Surveys/Delete.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/components/Modal/Surveys/MarkActive.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/components/Modal/Surveys/MarkInActive.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/components/Surveys/CitizenSurveyForm.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/components/Surveys/CitizenSurveyQuestion.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/components/Surveys/EditSurveyForms/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/components/Surveys/ResultsView/CheckBoxChart.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/components/Surveys/ResultsView/McqChart.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/components/Surveys/ResultsView/SurveyDetailsView.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/components/Surveys/ResultsView/SurveyResultsView.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/components/Surveys/ResultsView/WhoHasResponded.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/components/Surveys/ResultsView/bindquesansutil.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/components/Surveys/SurveyForms/AnswerTypes/Checkboxes.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/components/Surveys/SurveyForms/AnswerTypes/MultipleChoice.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/components/Surveys/SurveyForms/NewSurveyForm.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/components/Surveys/SurveyForms/SurveyDetailsForms.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/components/Surveys/SurveyForms/SurveyFormsMaker.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/components/Surveys/SurveyForms/SurveySettingsForm.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/components/Surveys/SurveyForms/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/components/Surveys/SurveyListCard.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/config/NewEventConfig.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/config/NewMessageConfig.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/config/doc-create.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/config/doc-update.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/hooks/useDebounce.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/pages/citizen/CitizenSurvey/FillSurvey.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/pages/citizen/CitizenSurvey/Response.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/pages/citizen/CitizenSurvey/ShowSurvey.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/pages/citizen/CitizenSurvey/SurveyList.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/pages/citizen/Documents/DocumentCategories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/pages/citizen/Documents/DocumentList.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/pages/citizen/Documents/ViewDocument.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/pages/citizen/EventsListOnGround/EventDetails.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/pages/citizen/EventsListOnGround/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/pages/citizen/NotificationsAndWhatsNew.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/pages/citizen/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/pages/employee/CitizenSurveys/Inbox/FilterFieldsComponent.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/pages/employee/CitizenSurveys/Inbox/SearchFieldsComponents.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/pages/employee/CitizenSurveys/Inbox/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/pages/employee/CitizenSurveys/Inbox/useInboxMobileDataCard.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/pages/employee/CitizenSurveys/Inbox/useInboxTableConfig.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/pages/employee/CitizenSurveys/NewSurvey.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/pages/employee/CitizenSurveys/SurveyDetails.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/pages/employee/CitizenSurveys/SurveyResults.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/pages/employee/CitizenSurveys/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/pages/employee/CitizenSurveys/responses/create.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/pages/employee/CitizenSurveys/responses/delete.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/pages/employee/CitizenSurveys/responses/update.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/pages/employee/Documents/Inbox/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/pages/employee/Documents/delete-response.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/pages/employee/Documents/doc-update.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/pages/employee/Documents/documents-create.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/pages/employee/Documents/documents-update.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/pages/employee/Documents/response.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/pages/employee/Documents/update-response.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/pages/employee/Events/EditEvent/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/pages/employee/Events/EventDetails.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/pages/employee/Events/Inbox/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/pages/employee/Events/NewEvent/Response.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/pages/employee/Events/NewEvent/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/pages/employee/Messages/EditMessage.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/pages/employee/Messages/Inbox.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/pages/employee/Messages/Inbox_DEMO.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/pages/employee/Messages/MessageDetails.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/pages/employee/Messages/NewMessage/Response.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/pages/employee/Messages/NewMessage/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/pages/employee/Messages/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/utils/SurveyInfoLabel.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/engagement/src/utils/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/hrms/README.md create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/hrms/package.json create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/hrms/src/Module.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/EmployeeAction.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/InboxFilter.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/Modal/EmployeeActivation.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/Modal/EmployeeAppliaction.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/Modal/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/Utils/cleanup.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/Utils/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/config/config.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/hrmscard.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/inbox/ApplicationCard.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/inbox/ApplicationLinks.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/inbox/ApplicationTable.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/inbox/DesktopInbox.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/inbox/MobileInbox.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/inbox/search.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/Banner.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/EmployeeDOB.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/EmployeePhoneNumber.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/Multiselect.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/SelectDateofEmployment.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/SelectEmailId.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/SelectEmployeeCorrespondenceAddress.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/SelectEmployeeGender.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/SelectEmployeeId.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/SelectEmployeeName.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/SelectEmployeeType.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/assignment.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/hrms/src/components/pageComponents/jurisdiction.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/EditEmployee/EditForm.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/EditEmployee/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/EmployeeDetails.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/Inbox.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/Response.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/createEmployee.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/hrms/src/pages/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/Modal/AttendanceActionModal.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/Modal/BPAActionModal.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/Modal/BPAREGActionModal.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/Modal/ExpenditureActionModal.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/Modal/FSMActionModal.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/Modal/NOCActionModal.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/Modal/PTActionModal.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/Modal/TLActionModal.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/Modal/WNSActionModal.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/Modal/WorksActionModal.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/Modal/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/ApplicationDetailsActionBar.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/ApplicationDetailsContent.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/ApplicationDetailsToast.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/ApplicationDetailsWarningPopup.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/BPADocuments.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/DocumentsPreview.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/InfoDetails.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/InspectionReport.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/NOCDocuments.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/PermissionCheck.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/PropertyDocuments.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/PropertyEstimates.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/PropertyFloors.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/PropertyOwners.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/Reason.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/ScruntinyDetails.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/SubOccupancyTable.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/SubWorkTableDetails.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/TLCaption.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/TLTradeAccessories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/TLTradeUnits.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/ViewBreakup.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/WSAdditonalDetails.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/WSFeeEstimation.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/components/WeekDateRange.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/AcceptDso.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/AssignDso.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/BPAApproverApplication.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/BPAREGApproverApplication.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/CompleteApplication.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/NOCApproverApplication.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/PTApproverApplication.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/PTAssessProperty.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/ReassignDso.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/RejectApplication.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/TLApproverApplication.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/WSApproverApplication.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/WSDisconnectApplication.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/configApproveModal.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/configAttendanceApproveModal.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/configAttendanceCheckModal.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/configAttendanceRejectModal.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/configCheckModal.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/configRejectModal.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/configViewBillApproveModal.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/configViewBillCheckModal.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/configViewBillRejectModal.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/config/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/templates/ApplicationDetails/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/utilities/README.md create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/utilities/package.json create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/utilities/src/Module.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/utilities/src/pages/employee/DynamicCreateComponent/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/utilities/src/pages/employee/DynamicSearchComponent/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/utilities/src/pages/employee/IFrameInterface/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/utilities/src/pages/employee/WorkflowComponentTest/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/utilities/src/pages/employee/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/workbench/README.md create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/workbench/package.json create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/workbench/src/Module.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/workbench/src/components/Checbox.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/workbench/src/components/DigitJSONForm.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/workbench/src/components/DigitLoader.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/workbench/src/components/GenerateXlsx.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/workbench/src/components/HRMSCard.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/workbench/src/components/MultiSelect.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/workbench/src/components/WorkbenchCard.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/workbench/src/configs/EditModalConfig.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/workbench/src/configs/LocalisationSearchConfig.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/workbench/src/configs/UICustomizations.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/workbench/src/configs/sampleschema.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/workbench/src/configs/searchLocalisationConfig.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/workbench/src/configs/searchMDMSConfig.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/workbench/src/hooks/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/workbench/src/hooks/logout.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/workbench/src/hooks/useLocalisationSearch.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/workbench/src/hooks/workbench.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/LocalisationAdd.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/LocalisationSearch.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSAdd.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSAddV2.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSEdit.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSManageMaster.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSSearch.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSSearchv2.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/MDMSView.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/workbench/src/pages/employee/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/workbench/src/services/Search.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/workbench/src/utils/LocAddReducer.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/workbench/src/utils/LocalisationSearch.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/workbench/src/utils/ParsingUtils.js create mode 100644 micro-ui/web/micro-ui-internals/packages/modules/workbench/src/utils/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/.storybook/main.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/.storybook/preview.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/README.md create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/docker/Dockerfile create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/docker/nginx.conf create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/envs.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/package.json create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/public/index.html create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/ActionBar.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/ActionLinks.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Amount.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/AppContainer.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/ApplyFilterBar.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/BackButton.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Banner.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Banner.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Body.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/BreadCrumb.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/BreakLine.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Button.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/ButtonSelector.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/ButtonSelector.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Card.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/CardBasedOptions.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/CardCaption.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/CardHeader.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/CardLabel.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/CardLabelDesc.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/CardLabelError.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/CardSectionHeader.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/CardSectionSubText.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/CardSubHeader.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/CardText.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/CardTextButton.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/CheckBox.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/CheckBox.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/CitizenConsentForm.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/CitizenHomeCard.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/CitizenInfoLabel.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/CollapseAndExpandGroups.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/ConnectingCheckPoints.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/ConnectingCheckPoints.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/CustomButton.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/DatePicker.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/DateWrap.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/DateWrap.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/DescriptionText.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/DescriptionText.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/DisplayPhotos.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/DisplayPhotos.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Dropdown.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Dropdown.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/EllipsisMenu.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/EmployeeAppContainer.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/EmployeeModuleCard.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/ErrorMessage.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/EventCalendarView.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/GreyOutText.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Hamburger.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Header.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/HeaderBar.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/HeaderBar.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/HomeLink.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/HomeLink.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/HorizontalNav.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/ImageUploadHandler.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/ImageViewer.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/ImageViewer.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/InboxLinks.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/InboxSearchLinks.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/InfoBanner.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/InputTextAmount.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/KeyNote.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/KeyNote.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Label.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/LabelFieldPair.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/LinkButton.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/LinkButton.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/LinkLabel.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Loader.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Loader.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/LocationSearch.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Menu.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Menu.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/MobileNumber.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Modals/WorkflowPopup.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Modals/config/configEstimateModal.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Modals/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/MultiLink.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/MultiSelectDropdown.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/NavBar.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/NoResultsFound.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/OTPInput.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/OTPInput.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/OpenLinkContainer.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Paragraph.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/PopUp.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/PopupHeadingLabel.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/PrivateRoute.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/RadioButtons.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/RadioButtons.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Rating.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Rating.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Reason.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/RemoveableTag.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/RoundedLabel.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/SVG.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/SearchComponent.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/SearchableDropdown.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/SectionalDropdown.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/StandaloneSearchBar.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/StatusTable.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/SubMenu.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/SubmitBar.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/SubmitBar.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/TLCaption.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Table.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/TelePhone.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/TelePhone.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/TextArea.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/TextArea.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/TextInput.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/TextInput.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Toast.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Toast.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/ToggleSwitch.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/TopBar.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/TopBar.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/ULBHomeCard.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/UnMaskComponent.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/UploadFile.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/UploadImages.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/UploadImages.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/ViewDetailsCard.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/ViewImages.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/WeekPicker.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/WhatsNewCard.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/WorkflowActions.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/WorkflowTimeline.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/amtUtils/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/svgindex.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/context/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/hoc/FileUploadModal.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/hoc/FormComposer.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/hoc/FormComposerV2.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/hoc/InboxComposer/MobileComponentDirectory.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/hoc/InboxComposer/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/hoc/InboxSearchComposer.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/hoc/InboxSearchComposerContext.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/hoc/InboxSearchComposerReducer.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/hoc/MobileView/MobileSearchComponent.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/hoc/MobileView/MobileSearchResults.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/hoc/Modal.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/hoc/ResponseComposer.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/hoc/ResultsTable.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/hoc/SubformComposer.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/hoc/UploadFileComposer.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/hoc/formUtils.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/ApiDropdown.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/CityMohalla.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/CityMohalla.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/CustomDropdown.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/DashboardBox.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/DateRange.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/DateRangeNew.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/DetailsCard.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/DetailsCard.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/FilterAction.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/FilterForm.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/FormStep.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/FormStep.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/InputCard.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/InputCard.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/Localities.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/LocationDropdownWrapper.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/LocationSearchCard.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/LocationSearchCard.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/MultiUploadWrapper.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/OnGroundEventCard.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/PageBasedInput.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/PitDimension.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/RadioOrSelect.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/RatingCard.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/RatingCard.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/RenderFormFields.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/SearchAction.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/SearchForm.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/SearchOnRadioButtons.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/SortAction.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/TextInputCard.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/TextInputCard.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/TypeSelectCard.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/TypeSelectCard.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/UploadPitPhoto.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/WorkflowModal.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/WorkflowStatusFilter.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/stories/Button.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/stories/Button.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/stories/Header.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/stories/Header.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/stories/Introduction.stories.mdx create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/stories/Page.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/stories/Page.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/stories/assets/code-brackets.svg create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/stories/assets/colors.svg create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/stories/assets/comments.svg create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/stories/assets/direction.svg create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/stories/assets/flow.svg create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/stories/assets/plugin.svg create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/stories/assets/repo.svg create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/stories/assets/stackalt.svg create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/stories/button.css create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/stories/header.css create mode 100644 micro-ui/web/micro-ui-internals/packages/react-components/src/stories/page.css create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/.storybook/main.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/.storybook/preview.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/README.md create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/docker/Dockerfile create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/docker/nginx.conf create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/package.json create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/public/index.html create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/index.css create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/index.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Accessibility.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Accessibility.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AccessibilityNew.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AccessibilityNew.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Accessible.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Accessible.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AccessibleForward.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AccessibleForward.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AccountBalance.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AccountBalance.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AccountBalanceWallet.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AccountBalanceWallet.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AccountBox.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AccountBox.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AccountCircle.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AccountCircle.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AddAlert.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AddAlert.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AddBusiness.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AddBusiness.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AddChart.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AddChart.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AddExpense.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AddExpense.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AddExpenseTwo.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AddExpenseTwo.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AddIcCall.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AddIcCall.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AddLocation.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AddLocation.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AddLocationAlt.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AddLocationAlt.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AddModerator.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AddModerator.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AddRoad.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AddRoad.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AddShoppingCart.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AddShoppingCart.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AddTask.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AddTask.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AddToDrive.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AddToDrive.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AdminPanelSettings.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AdminPanelSettings.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Agriculture.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Agriculture.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Alarm.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Alarm.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AlarmAdd.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AlarmAdd.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AlarmOff.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AlarmOff.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AlarmOn.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AlarmOn.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AllInbox.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AllInbox.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AllOut.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AllOut.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AltRoute.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AltRoute.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AlternateEmail.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AlternateEmail.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Analytics.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Analytics.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Anchor.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Anchor.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Android.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Android.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Announcement.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Announcement.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Api.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Api.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AppBlocking.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AppBlocking.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AppRegistration.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AppRegistration.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AppSettingsAlt.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AppSettingsAlt.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Approval.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Approval.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Apps.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Apps.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Architecture.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Architecture.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ArrowBack.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ArrowBack.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ArrowBackIos.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ArrowBackIos.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ArrowCircleDown.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ArrowCircleDown.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ArrowCircleUp.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ArrowCircleUp.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ArrowDownward.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ArrowDownward.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ArrowDropDown.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ArrowDropDown.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ArrowDropDownCircle.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ArrowDropDownCircle.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ArrowDropUp.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ArrowDropUp.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ArrowForward.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ArrowForward.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ArrowForwardIos.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ArrowForwardIos.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ArrowForwardIosAlt.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ArrowForwardIosAlt.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ArrowLeft.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ArrowLeft.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ArrowRight.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ArrowRight.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ArrowRightAlt.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ArrowRightAlt.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ArrowUpward.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ArrowUpward.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Article.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Article.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AspectRatio.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AspectRatio.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Assessment.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Assessment.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Assignment.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Assignment.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AssignmentInd.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AssignmentInd.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AssignmentLate.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AssignmentLate.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AssignmentReturn.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AssignmentReturn.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AssignmentReturned.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AssignmentReturned.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AssignmentTurnedIn.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AssignmentTurnedIn.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AssistantDirection.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AssistantDirection.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AssistantNavigation.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AssistantNavigation.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Atm.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Atm.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AttachEmail.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AttachEmail.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Attachment.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Attachment.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Attractions.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Attractions.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AutoDelete.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AutoDelete.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AutoRenew.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/AutoRenew.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Backup.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Backup.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/BackupTable.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/BackupTable.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Badge.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Badge.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/BakeryDining.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/BakeryDining.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/BatchPrediction.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/BatchPrediction.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/BeenHere.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/BeenHere.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/BikeScooter.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/BikeScooter.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Book.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Book.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/BookOnline.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/BookOnline.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Bookmark.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Bookmark.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/BookmarkBorder.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/BookmarkBorder.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Bookmarks.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Bookmarks.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/BreakfastDining.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/BreakfastDining.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/BrunchDining.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/BrunchDining.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/BugReport.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/BugReport.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Build.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Build.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/BuildCircle.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/BuildCircle.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/BusAlert.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/BusAlert.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Business.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Business.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Cached.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Cached.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Cake.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Cake.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CalendarToday.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CalendarToday.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CalendarViewDay.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CalendarViewDay.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Call.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Call.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CallEnd.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CallEnd.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CallMade.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CallMade.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CallMerge.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CallMerge.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CallMissed.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CallMissed.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CallMissedOutgoing.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CallMissedOutgoing.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CallReceived.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CallReceived.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CallSplit.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CallSplit.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CameraEnhance.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CameraEnhance.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Campaign.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Campaign.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Cancel.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Cancel.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CancelPresentation.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CancelPresentation.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CancelScheduleSend.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CancelScheduleSend.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CarRental.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CarRental.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CarRepair.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CarRepair.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CardGiftcard.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CardGiftcard.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CardMembership.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CardMembership.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CardTravel.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CardTravel.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Category.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Category.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Celebration.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Celebration.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CellWifi.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CellWifi.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ChangeHistory.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ChangeHistory.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Chat.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Chat.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ChatBubble.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ChatBubble.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ChatBubbleOutline.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ChatBubbleOutline.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Check.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Check.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CheckCircle.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CheckCircle.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CheckCircleOutline.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CheckCircleOutline.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ChevronLeft.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ChevronLeft.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ChevronRight.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ChevronRight.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ChromeReaderMode.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ChromeReaderMode.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CircleNotifications.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CircleNotifications.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Class.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Class.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CleanHands.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CleanHands.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CleaningServices.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CleaningServices.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ClearAll.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ClearAll.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Clock.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Clock.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Close.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Close.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CloseFullscreen.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CloseFullscreen.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Cloud.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Cloud.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CloudCircle.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CloudCircle.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CloudDone.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CloudDone.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CloudDownload.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CloudDownload.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CloudOff.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CloudOff.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CloudQueue.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CloudQueue.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CloudUpload.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CloudUpload.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Code.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Code.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Comment.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Comment.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CommentBank.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CommentBank.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Commute.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Commute.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CompareArrows.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CompareArrows.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CompassCalibration.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CompassCalibration.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Compress.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Compress.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ConnectWithoutContact.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ConnectWithoutContact.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Construction.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Construction.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ContactMail.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ContactMail.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ContactPage.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ContactPage.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ContactPhone.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ContactPhone.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ContactSupport.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ContactSupport.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Contactless.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Contactless.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Contacts.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Contacts.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Copyright.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Copyright.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Coronavirus.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Coronavirus.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CreateNewFolder.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CreateNewFolder.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CreditCard.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/CreditCard.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Cut.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Cut.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DSOTruck.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DSOTruck.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Dangerous.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Dangerous.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Dashboard.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Dashboard.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DashboardCustomize.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DashboardCustomize.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DateRange.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DateRange.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Deck.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Deck.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Delete.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Delete.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DeleteBtn.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DeleteBtn.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DeleteForever.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DeleteForever.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DeleteOutline.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DeleteOutline.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DeliveryDining.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DeliveryDining.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DepartureBoard.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DepartureBoard.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Description.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Description.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DesignServices.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DesignServices.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DesktopAccessDisabled.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DesktopAccessDisabled.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DialerSip.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DialerSip.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Dialpad.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Dialpad.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DinnerDining.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DinnerDining.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Directions.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Directions.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DirectionsBike.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DirectionsBike.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DirectionsBoat.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DirectionsBoat.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DirectionsBus.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DirectionsBus.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DirectionsCar.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DirectionsCar.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DirectionsRailway.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DirectionsRailway.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DirectionsRun.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DirectionsRun.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DirectionsSubway.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DirectionsSubway.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DirectionsTransit.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DirectionsTransit.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DirectionsWalk.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DirectionsWalk.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DisabledByDefault.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DisabledByDefault.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Dns.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Dns.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Domain.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Domain.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DomainDisabled.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DomainDisabled.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DomainVerification.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DomainVerification.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Done.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Done.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DoneAll.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DoneAll.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DoneOutline.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DoneOutline.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DonutLarge.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DonutLarge.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DonutSmall.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DonutSmall.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DoubleArrow.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DoubleArrow.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DragIndicator.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DragIndicator.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DriveFileMove.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DriveFileMove.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DriveFileMoveOutline.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DriveFileMoveOutline.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DriveFileRenameOutline.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DriveFileRenameOutline.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DriveFolderUpload.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DriveFolderUpload.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DryCleaning.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DryCleaning.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Duo.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Duo.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DynamicForm.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/DynamicForm.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/East.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/East.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Eco.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Eco.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Edit.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Edit.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/EditAttributes.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/EditAttributes.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/EditLocation.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/EditLocation.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/EditOff.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/EditOff.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/EditRoad.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/EditRoad.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Eject.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Eject.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Elderly.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Elderly.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ElectricBike.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ElectricBike.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ElectricCar.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ElectricCar.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ElectricMoped.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ElectricMoped.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ElectricRickshaw.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ElectricRickshaw.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ElectricScooter.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ElectricScooter.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ElectricalServices.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ElectricalServices.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Email.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Email.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/EmojiEmotions.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/EmojiEmotions.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/EmojiEvents.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/EmojiEvents.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/EmojiFlags.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/EmojiFlags.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/EmojiFoodBeverage.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/EmojiFoodBeverage.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/EmojiNature.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/EmojiNature.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/EmojiObjects.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/EmojiObjects.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/EmojiPeople.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/EmojiPeople.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/EmojiSymbols.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/EmojiSymbols.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/EmojiTransportation.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/EmojiTransportation.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Engineering.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Engineering.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Error.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Error.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ErrorOutline.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ErrorOutline.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/EuroSymbol.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/EuroSymbol.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/EvStation.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/EvStation.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Event.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Event.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/EventSeat.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/EventSeat.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ExitToApp.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ExitToApp.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Expand.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Expand.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ExpandLess.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ExpandLess.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ExpandMore.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ExpandMore.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Explore.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Explore.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ExploreOff.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ExploreOff.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Extension.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Extension.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Face.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Face.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Facebook.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Facebook.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/FactCheck.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/FactCheck.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Fastfood.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Fastfood.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Favorite.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Favorite.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/FavoriteBorder.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/FavoriteBorder.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Feedback.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Feedback.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Festival.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Festival.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/File.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/File.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/FileDownload.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/FileDownload.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/FileDownloadDone.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/FileDownloadDone.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/FilePresent.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/FilePresent.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/FileUpload.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/FileUpload.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/FilterAlt.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/FilterAlt.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/FilterListAlt.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/FilterListAlt.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/FindInPage.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/FindInPage.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/FindReplace.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/FindReplace.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Fingerprint.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Fingerprint.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Fireplace.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Fireplace.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/FirstPage.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/FirstPage.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/FirstPageAlt.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/FirstPageAlt.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/FitScreen.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/FitScreen.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Flaky.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Flaky.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Flight.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Flight.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/FlightLand.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/FlightLand.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/FlightTakeoff.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/FlightTakeoff.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/FlipToBack.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/FlipToBack.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/FlipToFront.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/FlipToFront.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Folder.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Folder.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/FolderOpen.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/FolderOpen.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/FolderShared.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/FolderShared.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/FollowTheSigns.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/FollowTheSigns.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Forum.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Forum.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ForwardToInbox.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ForwardToInbox.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Fullscreen.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Fullscreen.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/FullscreenExit.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/FullscreenExit.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/GTranslate.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/GTranslate.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Gavel.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Gavel.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/GetApp.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/GetApp.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Gif.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Gif.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Grade.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Grade.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Grading.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Grading.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/GridView.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/GridView.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Group.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Group.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/GroupAdd.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/GroupAdd.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/GroupWork.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/GroupWork.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Groups.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Groups.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Hail.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Hail.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Handyman.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Handyman.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Hardware.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Hardware.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Help.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Help.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/HelpCenter.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/HelpCenter.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/HelpOutline.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/HelpOutline.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/HighlightAlt.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/HighlightAlt.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/HighlightOff.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/HighlightOff.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/History.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/History.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/HistoryEdu.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/HistoryEdu.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/HistoryToggleOff.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/HistoryToggleOff.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Home.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Home.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/HomeFilled.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/HomeFilled.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/HomeRepairService.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/HomeRepairService.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/HomeWork.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/HomeWork.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/HorizontalSplit.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/HorizontalSplit.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Hotel.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Hotel.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/HourglassBottom.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/HourglassBottom.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/HourglassDisabled.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/HourglassDisabled.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/HourglassEmpty.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/HourglassEmpty.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/HourglassFull.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/HourglassFull.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/HourglassTop.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/HourglassTop.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Http.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Http.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Https.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Https.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Hvac.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Hvac.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Icecream.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Icecream.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/IconSwerage.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/IconSwerage.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/IconSwerageAlt.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/IconSwerageAlt.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ImportContacts.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ImportContacts.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ImportExport.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ImportExport.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ImportantDevices.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ImportantDevices.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Info.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Info.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/InfoBannerIcon.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/InfoBannerIcon.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/InfoOutline.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/InfoOutline.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Input.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Input.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/IntegrationInstructions.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/IntegrationInstructions.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/InvertColors.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/InvertColors.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/InvertColorsOff.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/InvertColorsOff.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/IosShare.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/IosShare.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/KingBed.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/KingBed.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Label.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Label.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LabelImportant.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LabelImportant.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LabelImportantOutline.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LabelImportantOutline.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LabelOff.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LabelOff.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LabelOutline.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LabelOutline.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Language.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Language.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LastPage.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LastPage.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LastPageAlt.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LastPageAlt.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Launch.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Launch.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Layers.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Layers.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LayersClear.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LayersClear.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Leaderboard.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Leaderboard.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LegendToggle.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LegendToggle.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Lightbulb.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Lightbulb.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LightbulbOutline.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LightbulbOutline.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LineStyle.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LineStyle.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LineWeight.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LineWeight.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Liquor.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Liquor.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/List.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/List.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ListAlt.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ListAlt.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LiveHelp.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LiveHelp.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocalActivity.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocalActivity.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocalAirport.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocalAirport.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocalAtm.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocalAtm.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocalBar.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocalBar.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocalCafe.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocalCafe.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocalCarWash.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocalCarWash.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocalConvenienceStore.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocalConvenienceStore.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocalDining.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocalDining.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocalDrink.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocalDrink.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocalFireDepartment.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocalFireDepartment.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocalFlorist.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocalFlorist.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocalGasStation.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocalGasStation.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocalGroceryStore.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocalGroceryStore.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocalHospital.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocalHospital.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocalHotel.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocalHotel.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocalLaundryService.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocalLaundryService.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocalLibrary.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocalLibrary.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocalMall.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocalMall.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocalMovies.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocalMovies.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocalOffer.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocalOffer.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocalParking.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocalParking.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocalPharmacy.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocalPharmacy.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocalPhone.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocalPhone.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocalPizza.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocalPizza.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocalPlay.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocalPlay.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocalPolice.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocalPolice.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocalPostOffice.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocalPostOffice.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocalPrintshop.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocalPrintshop.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocalSee.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocalSee.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocalShipping.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocalShipping.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocalTaxi.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocalTaxi.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocationCity.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocationCity.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocationOff.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocationOff.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocationOn.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocationOn.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocationPin.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LocationPin.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Lock.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Lock.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LockClock.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LockClock.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LockOpen.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LockOpen.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LockOutline.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LockOutline.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Login.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Login.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Logout.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Logout.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Loyalty.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Loyalty.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Luggage.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Luggage.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LunchDining.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/LunchDining.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/MailOutline.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/MailOutline.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Map.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Map.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/MapsUgc.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/MapsUgc.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/MarkAsUnread.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/MarkAsUnread.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/MarkChatRead.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/MarkChatRead.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/MarkChatUnread.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/MarkChatUnread.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/MarkEmailRead.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/MarkEmailRead.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/MarkEmailUnread.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/MarkEmailUnread.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/MarkunreadMailbox.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/MarkunreadMailbox.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Masks.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Masks.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Maximize.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Maximize.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Mediation.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Mediation.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/MedicalServices.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/MedicalServices.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Menu.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Menu.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/MenuBook.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/MenuBook.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/MenuOpen.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/MenuOpen.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Message.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Message.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/MilitaryTech.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/MilitaryTech.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Minimize.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Minimize.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/MiscellaneousServices.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/MiscellaneousServices.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/MobileScreenShare.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/MobileScreenShare.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ModelTraining.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ModelTraining.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Money.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Money.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Mood.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Mood.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/MoodBad.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/MoodBad.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Moped.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Moped.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/MoreHoriz.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/MoreHoriz.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/MoreTime.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/MoreTime.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/MoreVert.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/MoreVert.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/MultipleStop.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/MultipleStop.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Museum.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Museum.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/MyLocation.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/MyLocation.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Nat.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Nat.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Navigation.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Navigation.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/NearMe.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/NearMe.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/NearMeDisabled.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/NearMeDisabled.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/NextPlan.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/NextPlan.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Nightlife.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Nightlife.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/NightlightRound.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/NightlightRound.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/NightsStay.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/NightsStay.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/NoLuggage.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/NoLuggage.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/NoMeals.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/NoMeals.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/NoMealsOuline.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/NoMealsOuline.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/NoResultsFoundIcon.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/NoResultsFoundIcon.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/NoSim.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/NoSim.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/NoTransfer.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/NoTransfer.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/North.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/North.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/NorthEast.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/NorthEast.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/NorthWest.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/NorthWest.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/NotAccessible.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/NotAccessible.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/NotListedLocation.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/NotListedLocation.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/NotStarted.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/NotStarted.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/NoteAdd.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/NoteAdd.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/NotificationImportant.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/NotificationImportant.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Notifications.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Notifications.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/NotificationsActive.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/NotificationsActive.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/NotificationsNone.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/NotificationsNone.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/NotificationsOff.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/NotificationsOff.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/NotificationsPaused.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/NotificationsPaused.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/OfflineBolt.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/OfflineBolt.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/OfflinePin.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/OfflinePin.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/OfflineShare.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/OfflineShare.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/OnlinePrediction.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/OnlinePrediction.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Opacity.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Opacity.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/OpenInBrowser.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/OpenInBrowser.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/OpenInFull.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/OpenInFull.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/OpenInNew.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/OpenInNew.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/OpenWith.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/OpenWith.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Outbond.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Outbond.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Outbox.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Outbox.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/OutdoorGrill.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/OutdoorGrill.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/OutgoingMail.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/OutgoingMail.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Outlet.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Outlet.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Pages.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Pages.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Pageview.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Pageview.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PanTool.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PanTool.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Park.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Park.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PartyMode.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PartyMode.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PausePresentation.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PausePresentation.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Payment.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Payment.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Payments.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Payments.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PedalBike.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PedalBike.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Pending.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Pending.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PendingActions.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PendingActions.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/People.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/People.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PeopleAlt.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PeopleAlt.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PeopleOutline.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PeopleOutline.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PermCameraMic.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PermCameraMic.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PermContactCalendar.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PermContactCalendar.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PermDataSetting.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PermDataSetting.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PermDeviceInformation.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PermDeviceInformation.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PermIdentity.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PermIdentity.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PermMedia.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PermMedia.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PermPhoneMsg.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PermPhoneMsg.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PermScanWifi.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PermScanWifi.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Person.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Person.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PersonAdd.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PersonAdd.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PersonAddAlt.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PersonAddAlt.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PersonAddDisabled.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PersonAddDisabled.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PersonAddSecondary.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PersonAddSecondary.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PersonOutline.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PersonOutline.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PersonPin.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PersonPin.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PersonPinCircle.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PersonPinCircle.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PersonRemove.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PersonRemove.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PersonRemoveAlt.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PersonRemoveAlt.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PersonSearch.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PersonSearch.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PestControl.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PestControl.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PestControlRodent.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PestControlRodent.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Pets.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Pets.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Phone.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Phone.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PhoneDisabled.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PhoneDisabled.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PhoneEnabled.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PhoneEnabled.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PhonelinkErase.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PhonelinkErase.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PhonelinkLock.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PhonelinkLock.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PhonelinkRing.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PhonelinkRing.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PhonelinkSetup.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PhonelinkSetup.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PictureInPicture.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PictureInPicture.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PictureInPictureAlt.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PictureInPictureAlt.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PinDrop.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PinDrop.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PivotTableChart.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PivotTableChart.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Place.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Place.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Plagiarism.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Plagiarism.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PlayForWork.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PlayForWork.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Plumbing.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Plumbing.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PlusOne.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PlusOne.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Poll.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Poll.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Polymer.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Polymer.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Population.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Population.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PortableWifiOff.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PortableWifiOff.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PowerSettingsNew.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PowerSettingsNew.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PregnantWoman.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PregnantWoman.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PresentToAll.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PresentToAll.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Preview.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Preview.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Print.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Print.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PrintDisabled.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PrintDisabled.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PrivacyTip.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PrivacyTip.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Psychology.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Psychology.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Public.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Public.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PublicOff.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PublicOff.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PublishedWithChanges.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/PublishedWithChanges.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/QrCode.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/QrCode.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/QrCodeScanner.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/QrCodeScanner.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/QueryBuilder.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/QueryBuilder.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/QuestionAnswer.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/QuestionAnswer.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Quickreply.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Quickreply.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/RailwayAlert.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/RailwayAlert.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/RamenDining.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/RamenDining.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/RateReview.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/RateReview.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ReadMore.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ReadMore.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Receipt.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Receipt.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Recommend.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Recommend.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/RecordVoiceOver.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/RecordVoiceOver.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Redeem.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Redeem.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ReduceCapacity.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ReduceCapacity.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Refresh.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Refresh.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/RemoveDone.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/RemoveDone.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/RemoveModerator.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/RemoveModerator.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/RemoveShoppingCart.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/RemoveShoppingCart.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Reorder.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Reorder.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ReportProblem.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ReportProblem.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/RequestPage.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/RequestPage.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/RequestQuote.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/RequestQuote.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Restaurant.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Restaurant.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/RestaurantMenu.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/RestaurantMenu.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Restore.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Restore.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/RestoreFromTrash.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/RestoreFromTrash.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/RestorePage.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/RestorePage.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/RingVolume.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/RingVolume.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Room.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Room.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Rotate360.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Rotate360.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Rotation3D.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Rotation3D.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/RoundedCheck.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/RoundedCheck.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/RoundedCorner.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/RoundedCorner.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Rowing.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Rowing.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/RssFeed.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/RssFeed.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Rtt.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Rtt.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Rule.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Rule.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/RuleFolder.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/RuleFolder.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/RunCircle.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/RunCircle.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SMSText.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SMSText.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Sanitizer.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Sanitizer.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Satellite.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Satellite.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SavedSearch.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SavedSearch.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Schedule.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Schedule.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ScheduleSend.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ScheduleSend.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/School.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/School.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Science.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Science.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ScreenShare.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ScreenShare.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ScreenShareStop.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ScreenShareStop.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Search.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Search.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SearchOff.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SearchOff.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Segment.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Segment.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SelfImprovement.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SelfImprovement.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SendAndArchive.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SendAndArchive.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SentimentDissatisfied.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SentimentDissatisfied.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SentimentNeutral.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SentimentNeutral.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SentimentSatisfied.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SentimentSatisfied.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SentimentSatisfiedAlt.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SentimentSatisfiedAlt.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SentimentVeryDissatisfied.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SentimentVeryDissatisfied.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SentimentVerySatisfied.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SentimentVerySatisfied.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SetMeal.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SetMeal.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Settings.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Settings.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SettingsApplications.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SettingsApplications.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SettingsBackupRestore.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SettingsBackupRestore.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SettingsBluetooth.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SettingsBluetooth.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SettingsBrightness.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SettingsBrightness.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SettingsCell.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SettingsCell.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SettingsEthernet.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SettingsEthernet.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SettingsInputAntenna.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SettingsInputAntenna.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SettingsInputComponent.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SettingsInputComponent.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SettingsInputComposite.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SettingsInputComposite.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SettingsInputHdmi.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SettingsInputHdmi.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SettingsInputVideo.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SettingsInputVideo.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SettingsOverscan.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SettingsOverscan.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SettingsPhone.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SettingsPhone.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SettingsPower.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SettingsPower.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SettingsRemote.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SettingsRemote.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SettingsVoice.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SettingsVoice.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Share.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Share.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Shop.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Shop.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ShopAlt.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ShopAlt.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ShoppingBag.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ShoppingBag.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ShoppingBasket.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ShoppingBasket.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ShoppingCart.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ShoppingCart.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Sick.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Sick.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SingleBed.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SingleBed.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SixFtApart.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SixFtApart.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SmartButton.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SmartButton.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SnippetFolder.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SnippetFolder.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Source.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Source.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/South.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/South.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SouthEast.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SouthEast.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SouthWest.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SouthWest.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SpeakerNotes.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SpeakerNotes.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SpeakerNotesOff.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SpeakerNotesOff.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SpeakerPhone.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SpeakerPhone.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SpellCheck.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SpellCheck.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Sports.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Sports.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SportsBaseball.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SportsBaseball.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SportsBasketball.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SportsBasketball.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SportsCricket.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SportsCricket.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SportsEsports.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SportsEsports.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SportsFootball.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SportsFootball.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SportsGolf.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SportsGolf.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SportsHandball.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SportsHandball.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SportsHockey.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SportsHockey.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SportsKabaddi.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SportsKabaddi.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SportsMma.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SportsMma.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SportsMotorsports.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SportsMotorsports.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SportsRugby.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SportsRugby.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SportsSoccer.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SportsSoccer.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SportsTennis.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SportsTennis.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SportsVolleyball.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SportsVolleyball.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/StarEmpty.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/StarEmpty.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/StarFilled.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/StarFilled.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/StarRate.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/StarRate.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Stars.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Stars.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/StayCurrentLandscape.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/StayCurrentLandscape.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/StayCurrentPortrait.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/StayCurrentPortrait.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/StayPrimaryLandscape.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/StayPrimaryLandscape.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/StayPrimaryPortrait.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/StayPrimaryPortrait.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/StickyNotesSecondary.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/StickyNotesSecondary.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Store.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Store.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/StoreMallDirectory.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/StoreMallDirectory.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/StreetView.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/StreetView.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SubdirectoryArrowLeft.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SubdirectoryArrowLeft.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SubdirectoryArrowRight.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SubdirectoryArrowRight.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Subject.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Subject.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SubtitlesOff.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SubtitlesOff.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Subway.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Subway.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Success.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Success.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SupervisedUserCircle.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SupervisedUserCircle.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SupervisorAccount.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SupervisorAccount.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Support.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Support.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SwapCalls.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SwapCalls.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SwapHorizontal.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SwapHorizontal.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SwapHorizontalCircle.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SwapHorizontalCircle.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SwapVertical.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SwapVertical.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SwapVerticalCircle.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SwapVerticalCircle.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Swipe.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Swipe.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SwitchAccount.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SwitchAccount.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SwitchLeft.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SwitchLeft.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SwitchRight.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SwitchRight.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SyncAlt.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SyncAlt.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SystemUpdateAlt.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/SystemUpdateAlt.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Tab.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Tab.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/TabUnselected.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/TabUnselected.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/TableView.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/TableView.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/TakeOutDining.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/TakeOutDining.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/TaxiAlert.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/TaxiAlert.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Terrain.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Terrain.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/TextRotateUp.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/TextRotateUp.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/TextRotateVertical.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/TextRotateVertical.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/TextRotationAngleDown.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/TextRotationAngleDown.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/TextRotationAngleUp.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/TextRotationAngleUp.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/TextRotationDown.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/TextRotationDown.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/TextRotationNone.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/TextRotationNone.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/TextSnippet.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/TextSnippet.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/TheaterComedy.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/TheaterComedy.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Theaters.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Theaters.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ThumbDown.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ThumbDown.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ThumbDownAlt.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ThumbDownAlt.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ThumbDownOffAlt.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ThumbDownOffAlt.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ThumbUp.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ThumbUp.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ThumbUpAlt.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ThumbUpAlt.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ThumbUpOffAlt.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ThumbUpOffAlt.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ThumbsUpDown.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ThumbsUpDown.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/TickMark.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/TickMark.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Timeline.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Timeline.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Toc.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Toc.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Today.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Today.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Toll.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Toll.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Topic.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Topic.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Torch.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Torch.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/TorchNoun.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/TorchNoun.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/TouchApp.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/TouchApp.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Tour.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Tour.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/TrackChanges.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/TrackChanges.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Traffic.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Traffic.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Train.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Train.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Tram.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Tram.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/TransferWithinStation.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/TransferWithinStation.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/TransitEnterExit.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/TransitEnterExit.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Translate.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Translate.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/TranslateLanguage.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/TranslateLanguage.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/TrendingDown.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/TrendingDown.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/TrendingFlat.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/TrendingFlat.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/TrendingUp.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/TrendingUp.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/TripOrigin.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/TripOrigin.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/TurnedIn.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/TurnedIn.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/TurnedInNot.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/TurnedInNot.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/TwoWheeler.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/TwoWheeler.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/UnfoldLess.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/UnfoldLess.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/UnfoldMore.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/UnfoldMore.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Unpublished.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Unpublished.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Unsubscribe.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Unsubscribe.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Update.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Update.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/UpdateExpense.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/UpdateExpense.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/UpdateExpenseSecondary.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/UpdateExpenseSecondary.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Upgrade.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Upgrade.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/UploadFile.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/UploadFile.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Verified.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Verified.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/VerifiedUser.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/VerifiedUser.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/VerticalSplit.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/VerticalSplit.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ViewAgenda.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ViewAgenda.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ViewArray.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ViewArray.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ViewCarousel.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ViewCarousel.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ViewColumn.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ViewColumn.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ViewDay.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ViewDay.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ViewHeadline.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ViewHeadline.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ViewInAr.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ViewInAr.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ViewList.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ViewList.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ViewModule.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ViewModule.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ViewQuilt.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ViewQuilt.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ViewSidebar.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ViewSidebar.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ViewStream.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ViewStream.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ViewWeek.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ViewWeek.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Visibility.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Visibility.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/VisibilityOff.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/VisibilityOff.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/VoiceOverOff.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/VoiceOverOff.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Voicemail.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Voicemail.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/VolunteerActivism.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/VolunteerActivism.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/VpnKey.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/VpnKey.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Warning.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Warning.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/WatchLater.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/WatchLater.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/WaterfallChart.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/WaterfallChart.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/West.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/West.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Whatsapp.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Whatsapp.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Whatshot.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Whatshot.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/WifiCalling.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/WifiCalling.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/WifiProtectedSetup.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/WifiProtectedSetup.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/WineBar.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/WineBar.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Work.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Work.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/WorkOff.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/WorkOff.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/WorkOutline.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/WorkOutline.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/WorkspacesFilled.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/WorkspacesFilled.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/WorkspacesOutline.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/WorkspacesOutline.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/WrongLocation.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/WrongLocation.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Wysiwyg.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/Wysiwyg.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/YoutubeSearchedFor.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/YoutubeSearchedFor.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ZoomIn.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ZoomIn.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ZoomOut.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ZoomOut.stories.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ZoomOutMap.js create mode 100644 micro-ui/web/micro-ui-internals/packages/svg-components/src/svg/ZoomOutMap.stories.js create mode 100644 micro-ui/web/micro-ui-internals/publish-workbench.sh create mode 100644 micro-ui/web/micro-ui-internals/publish.sh create mode 100755 micro-ui/web/micro-ui-internals/scripts/create.sh create mode 100755 micro-ui/web/micro-ui-internals/scripts/deploy.sh create mode 100755 micro-ui/web/micro-ui-internals/scripts/jenkins.sh create mode 100755 micro-ui/web/micro-ui-internals/scripts/run.sh create mode 100644 micro-ui/web/micro-ui-internals/test.js create mode 100644 micro-ui/web/package.json create mode 100644 micro-ui/web/public/index.html create mode 100644 micro-ui/web/public/robots.txt create mode 100644 micro-ui/web/src/App.js create mode 100644 micro-ui/web/src/ComponentRegistry.js create mode 100644 micro-ui/web/src/Customisations/UICustomizations.js create mode 100644 micro-ui/web/src/Customisations/index.js create mode 100644 micro-ui/web/src/Customisations/pt/index.js create mode 100644 micro-ui/web/src/Customisations/pt/pageComponents/PTAllotmentDetails.js create mode 100644 micro-ui/web/src/Customisations/pt/pageComponents/PTBusinessDetails.js create mode 100644 micro-ui/web/src/Customisations/pt/pageComponents/PTVasikaDetails.js create mode 100644 micro-ui/web/src/Customisations/pt/pageComponents/PropertyUsageType.js create mode 100644 micro-ui/web/src/Customisations/tl/TLCustomisation.js create mode 100644 micro-ui/web/src/Customisations/tl/index.js create mode 100644 micro-ui/web/src/Customisations/tl/pageComponents/PropertyUsageType.js create mode 100644 micro-ui/web/src/index.css create mode 100644 micro-ui/web/src/index.js create mode 100644 micro-ui/web/src/setupProxy.js create mode 100644 micro-ui/web/webpack.config.js create mode 100644 micro-ui/web/workbench/App.js create mode 100644 micro-ui/web/workbench/Dockerfile create mode 100755 micro-ui/web/workbench/install-deps.sh create mode 100644 micro-ui/web/workbench/inter-package.json create mode 100644 micro-ui/web/workbench/nginx.conf create mode 100644 micro-ui/web/workbench/package.json create mode 100644 micro-ui/web/workbench/webpack.config.js diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000000..24c70a1c173 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +.DS_Store +accelerators/frontend/micro-ui-internals/node_modules/* +.idea +index.lock diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 00000000000..0ce19c4b01e --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1 @@ +* @egovernments/core-ui-reviewers diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000000..335fd5f8652 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 eGovernments Foundation + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index e5fa890e62d..457872b5b21 100644 --- a/README.md +++ b/README.md @@ -1 +1,141 @@ -DIGIT-Frontend + +# workbench ui + +A React App built on top of DIGIT UI Core. + +# DIGIT + +DIGIT eGovernance Platform Services + +DIGIT (Digital Infrastructure for Governance, Impact & Transformation) is India's largest platform for governance services. Visit https://core.digit.org/ for more details. + +DIGIT platform is microservices based API platform enabling quick rebundling of services as per specific needs. This is a repo that lays down the core platform on top of which other mission services depend. + + +# DIGIT UI + + +This repository contains source code for web implementation of the new Digit UI modules with dependencies and libraries. + +Workbench module is used to Manage the master data (MDMS V2 Service) used across the DIGIT Services / Applications + +It is also used to manage the Localisation data present in the system (Localisation service) + + +## Run Locally + +Clone the project + +```bash + git clone https://github.com/egovernments/DIGIT-Frontend.git +``` + +Go to the Sub directory to run UI +```bash + cd into micro-ui/web/micro-ui-internals +``` + +Install dependencies + +```bash + yarn install +``` + +Add .env file +```bash + micro-ui/web/micro-ui-internals/example/.env +``` + +Start the server + +```bash + yarn start +``` + + +## Environment Variables + +To run this project, you will need to add the following environment variables to your .env file + +`REACT_APP_PROXY_API` :: `{{server url}}` + +`REACT_APP_GLOBAL` :: `{{server url}}` + +`REACT_APP_PROXY_ASSETS` :: `{{server url}}` + +`REACT_APP_USER_TYPE` :: `{{EMPLOYEE||CITIZEN}}` + +`SKIP_PREFLIGHT_CHECK` :: `true` + +[sample .env file](https://github.com/egovernments/Digit-Core/blob/workbench/frontend/micro-ui/web/micro-ui-internals/example/.env-unifieddev) + +## Tech Stack + +**Libraries:** + +[React](https://react.dev/) + +[React Hook Form](https://www.react-hook-form.com/) + +[React Query](https://tanstack.com/query/v3/) + +[Tailwind CSS](https://tailwindcss.com/) + +[Webpack](https://webpack.js.org/) + +## License + +[MIT](https://choosealicense.com/licenses/mit/) + + +## Author + +- [@jagankumar-egov](https://www.github.com/jagankumar-egov) + + +## Documentation + +[Documentation](https://https://core.digit.org/guides/developer-guide/ui-developer-guide/digit-ui) + + +## Support + +For support, add the issues in https://github.com/egovernments/DIGIT-core/issues. + + +## Modules + + 1. Core + 2. Workbench + 3. HRMS + 4. Dashboard + 5. Engagement + 6. Payment + +## Starting with Digit-UI App (Impelmentation Teams) - MICRO-UI + + +Go to the Sub directory to run UI + +```bash + cd into micro-ui/web +``` + +```bash + yarn install +``` + +Add .env file +```bash + micro-ui/web/.env +``` + +Start the server + +```bash + yarn start +``` + + +![Logo](https://s3.ap-south-1.amazonaws.com/works-dev-asset/mseva-white-logo.png) + diff --git a/micro-ui/.gitignore b/micro-ui/.gitignore new file mode 100644 index 00000000000..feb4cac5c94 --- /dev/null +++ b/micro-ui/.gitignore @@ -0,0 +1,32 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +.env +.eslintcache + +# yarn $ +.yarn +yarn.lock +.yarnrc.yml + +# dependencies +node_modules +.yarn +/.pnp +.pnp.js + +# testing +/coverage + +# production +/web/build +dist +# misc +.DS_Store +.env.local +.env.development.local +.env.test.local +.env.production.local + +npm-debug.log* +yarn-debug.log* +yarn-error.log* diff --git a/micro-ui/CODEOWNERS b/micro-ui/CODEOWNERS new file mode 100644 index 00000000000..ee47f9464c2 --- /dev/null +++ b/micro-ui/CODEOWNERS @@ -0,0 +1 @@ +* @jagankumar-egov @sathishp-eGov diff --git a/micro-ui/Jenkinsfile b/micro-ui/Jenkinsfile new file mode 100644 index 00000000000..1206b9c141d --- /dev/null +++ b/micro-ui/Jenkinsfile @@ -0,0 +1,3 @@ +library 'ci-libs' + +buildPipeline(configFile: './build/build-config.yml') diff --git a/micro-ui/README.md b/micro-ui/README.md new file mode 100644 index 00000000000..9420dbb760d --- /dev/null +++ b/micro-ui/README.md @@ -0,0 +1,140 @@ + +# workbench ui + +A React App built on top of DIGIT UI Core. + +# DIGIT + +DIGIT eGovernance Platform Services + +DIGIT (Digital Infrastructure for Governance, Impact & Transformation) is India's largest platform for governance services. Visit https://core.digit.org/ for more details. + +DIGIT platform is microservices based API platform enabling quick rebundling of services as per specific needs. This is a repo that lays down the core platform on top of which other mission services depend. + + +# DIGIT UI + + +This repository contains source code for web implementation of the new Digit UI modules with dependencies and libraries. + +Workbench module is used to Manage the master data (MDMS V2 Service) used across the DIGIT Services / Applications + +It is also used to manage the Localisation data present in the system (Localisation service) + + +## Run Locally + +Clone the project + +```bash + git clone https://github.com/egovernments/DIGIT-Frontend.git +``` + +Go to the Sub directory to run UI +```bash + cd into micro-ui/web/micro-ui-internals +``` + +Install dependencies + +```bash + yarn install +``` + +Add .env file +```bash + micro-ui/web/micro-ui-internals/example/.env +``` + +Start the server + +```bash + yarn start +``` + + +## Environment Variables + +To run this project, you will need to add the following environment variables to your .env file + +`REACT_APP_PROXY_API` :: `{{server url}}` + +`REACT_APP_GLOBAL` :: `{{server url}}` + +`REACT_APP_PROXY_ASSETS` :: `{{server url}}` + +`REACT_APP_USER_TYPE` :: `{{EMPLOYEE||CITIZEN}}` + +`SKIP_PREFLIGHT_CHECK` :: `true` + +[sample .env file](https://github.com/egovernments/Digit-Core/blob/workbench/frontend/micro-ui/web/micro-ui-internals/example/.env-unifieddev) + +## Tech Stack + +**Libraries:** + +[React](https://react.dev/) + +[React Hook Form](https://www.react-hook-form.com/) + +[React Query](https://tanstack.com/query/v3/) + +[Tailwind CSS](https://tailwindcss.com/) + +[Webpack](https://webpack.js.org/) + +## License + +[MIT](https://choosealicense.com/licenses/mit/) + + +## Author + +- [@jagankumar-egov](https://www.github.com/jagankumar-egov) + + +## Documentation + +[Documentation](https://https://core.digit.org/guides/developer-guide/ui-developer-guide/digit-ui) + + +## Support + +For support, add the issues in https://github.com/egovernments/DIGIT-core/issues. + + +## Modules + + 1. Core + 2. Workbench + 3. HRMS + 4. Dashboard + 5. Engagement + 6. Payment + +## Starting with Digit-UI App (Impelmentation Teams) - MICRO-UI + + +Go to the Sub directory to run UI + +```bash + cd into micro-ui/web +``` + +```bash + yarn install +``` + +Add .env file +```bash + micro-ui/web/.env +``` + +Start the server + +```bash + yarn start +``` + + +![Logo](https://s3.ap-south-1.amazonaws.com/works-dev-asset/mseva-white-logo.png) diff --git a/micro-ui/package.json b/micro-ui/package.json new file mode 100644 index 00000000000..19a3c47d6ee --- /dev/null +++ b/micro-ui/package.json @@ -0,0 +1,4 @@ +{ + "name": "workbench-ui", + "version": "1.0.0" +} \ No newline at end of file diff --git a/micro-ui/web/.babelrc b/micro-ui/web/.babelrc new file mode 100644 index 00000000000..5f90443d15e --- /dev/null +++ b/micro-ui/web/.babelrc @@ -0,0 +1,5 @@ +{ + "presets": [ + "@babel/preset-env","@babel/preset-react" + ] + } \ No newline at end of file diff --git a/micro-ui/web/.env.sample b/micro-ui/web/.env.sample new file mode 100644 index 00000000000..e87c7f586c4 --- /dev/null +++ b/micro-ui/web/.env.sample @@ -0,0 +1,3 @@ +SKIP_PREFLIGHT_CHECK=true +REACT_APP_STATE_LEVEL_TENANT_ID=pb +REACT_APP_PROXY_URL=https://works-dev.digit.org diff --git a/micro-ui/web/core/App.js b/micro-ui/web/core/App.js new file mode 100644 index 00000000000..df812819252 --- /dev/null +++ b/micro-ui/web/core/App.js @@ -0,0 +1,53 @@ +import React from "react"; +import { initLibraries } from "@egovernments/digit-ui-libraries"; +import { DigitUI } from "@egovernments/digit-ui-module-core"; +import { UICustomizations } from "./Customisations/UICustomizations"; +import { initWorkbenchComponents } from "@egovernments/digit-ui-module-workbench"; +import { initUtilitiesComponents } from "@egovernments/digit-ui-module-utilities"; +window.contextPath = window?.globalConfigs?.getConfig("CONTEXT_PATH"); + +const enabledModules = [ + "DSS", + "NDSS", + "Utilities", + "Engagement", + "Workbench", +]; + +const moduleReducers = (initData) => ({ + initData, +}); + +const initDigitUI = () => { + window.Digit.ComponentRegistryService.setupRegistry({}); + window.Digit.Customizations = { + PGR: {}, + commonUiConfig: UICustomizations, + }; + initUtilitiesComponents(); + initWorkbenchComponents(); +}; + +initLibraries().then(() => { + initDigitUI(); +}); + +function App() { + window.contextPath = window?.globalConfigs?.getConfig("CONTEXT_PATH"); + const stateCode = + window.globalConfigs?.getConfig("STATE_LEVEL_TENANT_ID") || + process.env.REACT_APP_STATE_LEVEL_TENANT_ID; + if (!stateCode) { + return

stateCode is not defined

; + } + return ( + + ); +} + +export default App; diff --git a/micro-ui/web/core/Dockerfile b/micro-ui/web/core/Dockerfile new file mode 100644 index 00000000000..0e5c5add33d --- /dev/null +++ b/micro-ui/web/core/Dockerfile @@ -0,0 +1,29 @@ +FROM egovio/alpine-node-builder-14:yarn AS build +#FROM ghcr.io/egovernments/alpine-node-builder-14:yarn AS build +RUN apk update && apk upgrade +RUN apk add --no-cache git>2.30.0 +ARG WORK_DIR +WORKDIR /app +ENV NODE_OPTIONS "--max-old-space-size=4792" + +COPY ${WORK_DIR} . +RUN ls -lah + +#RUN node web/envs.js +RUN cd web/ \ + && node -e 'console.log(v8.getHeapStatistics().heap_size_limit/(1024*1024))' \ + && node -e 'console.log("core only")' \ + && cd core/ \ + && ./install-deps.sh \ + && cd ../ \ + && yarn install \ + && yarn build:webpack + +FROM nginx:mainline-alpine +#FROM ghcr.io/egovernments/nginx:mainline-alpine +ENV WORK_DIR=/var/web/core-ui + +RUN mkdir -p ${WORK_DIR} + +COPY --from=build /app/web/build ${WORK_DIR}/ +COPY --from=build /app/web/core/nginx.conf /etc/nginx/conf.d/default.conf diff --git a/micro-ui/web/core/install-deps.sh b/micro-ui/web/core/install-deps.sh new file mode 100755 index 00000000000..3de106c45f7 --- /dev/null +++ b/micro-ui/web/core/install-deps.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +BRANCH="$(git branch --show-current)" + +echo "Main Branch: $BRANCH" + +INTERNALS="micro-ui-internals" +cd .. + +cp core/App.js src +cp core/package.json package.json +cp core/webpack.config.js webpack.config.js +cp core/inter-package.json $INTERNALS/package.json + +cp $INTERNALS/example/src/UICustomizations.js src/Customisations + +echo "UI :: core " && echo "Branch: $(git branch --show-current)" && echo "$(git log -1 --pretty=%B)" && echo "installing packages" + diff --git a/micro-ui/web/core/inter-package.json b/micro-ui/web/core/inter-package.json new file mode 100644 index 00000000000..d712de83574 --- /dev/null +++ b/micro-ui/web/core/inter-package.json @@ -0,0 +1,72 @@ +{ + "name": "egovernments", + "version": "1.0.0", + "main": "index.js", + "workspaces": [ + "packages/libraries", + "packages/react-components", + "packages/modules/workbench" + ], + "author": "JaganKumar ", + "license": "MIT", + "private": true, + "engines": { + "node": ">=14" + }, + "scripts": { + "start": "SKIP_PREFLIGHT_CHECK=true run-s build start:dev", + "sprint": "SKIP_PREFLIGHT_CHECK=true run-s start:script", + "start:dev": "run-p dev:**", + "start:script": "./scripts/create.sh", + "dev:css": "cd packages/css && yarn start", + "publish:css": "cd packages/css && yarn publish --access public", + "dev:libraries": "cd packages/libraries && yarn start", + "dev:components": "cd packages/react-components && yarn start", + "dev:example": "cd example && yarn start", + "dev:core": "cd packages/modules/core && yarn start", + "dev:dss": "cd packages/modules/dss && yarn start", + "dev:hrms": "cd packages/modules/hrms && yarn start", + "devD:common": "cd packages/modules/common && yarn start", + "devD:utilities": "cd packages/modules/utilities && yarn start", + "dev:workbench": "cd packages/modules/workbench && yarn start", + "dev:engagement": "cd packages/modules/engagement && yarn start", + "build": "run-p build:**", + "build:libraries": "cd packages/libraries && yarn build", + "build:components": "cd packages/react-components && yarn build", + "build:svgcomponents": "cd packages/svg-components && yarn build", + "buildD:dss": "cd packages/modules/dss && yarn build", + "buildD:core": "cd packages/modules/core && yarn build", + "buildD:hrms": "cd packages/modules/hrms && yarn build", + "buildD:common": "cd packages/modules/common && yarn build", + "buildD:utilities": "cd packages/modules/utilities && yarn build", + "buildD:engagement": "cd packages/modules/engagement && yarn build", + "build:workbench": "cd packages/modules/workbench && yarn build", + "deploy:jenkins": "./scripts/jenkins.sh", + "clean": "rm -rf node_modules" + }, + "resolutions": { + "**/@babel/runtime": "7.20.1", + "**/babel-preset-react-app": "10.0.0" + }, + "devDependencies": { + "husky": "7.0.4", + "lint-staged": "12.3.7", + "npm-run-all": "4.1.5", + "prettier": "2.1.2" + }, + "husky": {}, + "lint-staged": { + "*.{js,css,md}": "prettier --write" + }, + "dependencies": { + "lodash": "4.17.21", + "microbundle-crl": "0.13.11", + "@egovernments/digit-ui-react-components": "1.8.0-beta.1", + "react": "17.0.2", + "react-dom": "17.0.2", + "react-hook-form": "6.15.8", + "react-i18next": "11.16.2", + "react-query": "3.6.1", + "react-router-dom": "5.3.0" + } +} diff --git a/micro-ui/web/core/nginx.conf b/micro-ui/web/core/nginx.conf new file mode 100644 index 00000000000..cd96c34913f --- /dev/null +++ b/micro-ui/web/core/nginx.conf @@ -0,0 +1,12 @@ +server +{ + listen 80; + underscores_in_headers on; + + location /core-ui + { + root /var/web; + index index.html index.htm; + try_files $uri $uri/ /core-ui/index.html; + } +} \ No newline at end of file diff --git a/micro-ui/web/core/package.json b/micro-ui/web/core/package.json new file mode 100644 index 00000000000..187567a135f --- /dev/null +++ b/micro-ui/web/core/package.json @@ -0,0 +1,80 @@ +{ + "name": "micro-ui", + "version": "1.0.0", + "author": "Jagankumar ", + "license": "MIT", + "private": true, + "engines": { + "node": ">=14" + }, + "workspaces": [ + "micro-ui-internals/packages/libraries", + "micro-ui-internals/packages/react-components", + "micro-ui-internals/packages/modules/workbench" + ], + "homepage": "/core-ui", + "dependencies": { + "@egovernments/digit-ui-libraries": "1.8.0-beta", + "@egovernments/digit-ui-module-workbench": "1.0.0-beta", + "@egovernments/digit-ui-module-core": "1.8.0-beta.5", + "@egovernments/digit-ui-react-components": "1.8.0-beta.1", + "@egovernments/digit-ui-module-utilities": "1.0.0-beta", + "babel-loader": "8.1.0", + "clean-webpack-plugin": "4.0.0", + "react": "17.0.2", + "react-dom": "17.0.2", + "jsonpath": "^1.1.1", + "react-router-dom": "5.3.0", + "react-scripts": "4.0.1", + "web-vitals": "1.1.2", + "terser-brunch": "^4.1.0", + "react-hook-form": "6.15.8", + "react-i18next": "11.16.2", + "react-query": "3.6.1", + "css-loader":"5.2.6", + "style-loader": "2.0.0", + "webpack-cli": "4.10.0" + }, + "devDependencies": { + "@babel/plugin-proposal-private-property-in-object": "7.21.0", + "http-proxy-middleware": "1.3.1", + "lodash": "4.17.21", + "microbundle-crl": "0.13.11", + "react": "17.0.2", + "react-dom": "17.0.2", + "react-hook-form": "6.15.8", + "react-i18next": "11.16.2", + "react-query": "3.6.1", + "react-router-dom": "5.3.0", + "husky": "7.0.4", + "lint-staged": "12.3.7", + "npm-run-all": "4.1.5", + "prettier": "2.1.2" + }, + "scripts": { + "start": "react-scripts start", + "build": "GENERATE_SOURCEMAP=false SKIP_PREFLIGHT_CHECK=true react-scripts build", + "build:prepare": "./build.sh", + "build:libraries": "cd micro-ui-internals && yarn build", + "build:prod": "webpack --mode production", + "build:webpack":"yarn build:libraries &&cd .. && ls && cd ./web && ls && yarn build:prod", + "clean": "rm -rf node_modules" + }, + "eslintConfig": { + "extends": [ + "react-app" + ] + }, + "browserslist": { + "production": [ + ">0.2%", + "not dead", + "not op_mini all" + ], + "development": [ + "last 1 chrome version", + "last 1 firefox version", + "last 1 safari version" + ] + } +} diff --git a/micro-ui/web/core/webpack.config.js b/micro-ui/web/core/webpack.config.js new file mode 100644 index 00000000000..83428036d3e --- /dev/null +++ b/micro-ui/web/core/webpack.config.js @@ -0,0 +1,44 @@ +const path = require("path"); +const HtmlWebpackPlugin = require("html-webpack-plugin"); +const { CleanWebpackPlugin } = require("clean-webpack-plugin"); +// const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin; + +module.exports = { + // mode: 'development', + entry: "./src/index.js", + devtool: "none", + module: { + rules: [ + { + test: /\.(js)$/, + exclude: /node_modules/, + use: ["babel-loader"], + }, + { + test: /\.css$/i, + use: ["style-loader", "css-loader"], + } + ], + }, + output: { + filename: "[name].bundle.js", + path: path.resolve(__dirname, "build"), + publicPath: "/core-ui/", + }, + optimization: { + splitChunks: { + chunks: 'all', + minSize:20000, + maxSize:50000, + enforceSizeThreshold:50000, + minChunks:1, + maxAsyncRequests:30, + maxInitialRequests:30 + }, + }, + plugins: [ + new CleanWebpackPlugin(), + // new BundleAnalyzerPlugin(), + new HtmlWebpackPlugin({ inject: true, template: "public/index.html" }), + ], +}; \ No newline at end of file diff --git a/micro-ui/web/docker/Dockerfile b/micro-ui/web/docker/Dockerfile new file mode 100644 index 00000000000..8e9b173bb85 --- /dev/null +++ b/micro-ui/web/docker/Dockerfile @@ -0,0 +1,25 @@ +# FROM egovio/alpine-node-builder-14:yarn AS build +FROM ghcr.io/egovernments/alpine-node-builder-14:yarn AS build +RUN apk update && apk upgrade +RUN apk add --no-cache git>2.30.0 +ARG WORK_DIR +WORKDIR /app +ENV NODE_OPTIONS "--max-old-space-size=8168" + +COPY ${WORK_DIR} . +RUN ls -lah + +#RUN node web/envs.js +RUN cd web/ \ + && ./install-deps.sh \ + && yarn install \ + && yarn build:webpack + +FROM nginx:mainline-alpine +#FROM ghcr.io/egovernments/nginx:mainline-alpine +ENV WORK_DIR=/var/web/digit-ui + +RUN mkdir -p ${WORK_DIR} + +COPY --from=build /app/web/build ${WORK_DIR}/ +COPY --from=build /app/web/docker/nginx.conf /etc/nginx/conf.d/default.conf diff --git a/micro-ui/web/docker/devDockerfile b/micro-ui/web/docker/devDockerfile new file mode 100644 index 00000000000..d7b1ba1870a --- /dev/null +++ b/micro-ui/web/docker/devDockerfile @@ -0,0 +1,26 @@ +#FROM egovio/alpine-node-builder-14:yarn AS build +FROM ghcr.io/egovernments/alpine-node-builder-14:yarn AS build +RUN apk update && apk upgrade +RUN apk add --no-cache git>2.30.0 +ARG WORK_DIR +WORKDIR /app +ENV NODE_OPTIONS "--max-old-space-size=1792" + +COPY ${WORK_DIR} . +RUN ls -lah + +#RUN node web/envs.js +RUN cd web/ \ + && node envs.js \ + && ./install-deps.sh \ + && yarn install \ + && yarn build + +#FROM nginx:mainline-alpine +FROM ghcr.io/egovernments/nginx:mainline-alpine +ENV WORK_DIR=/var/web/digit-ui + +RUN mkdir -p ${WORK_DIR} + +COPY --from=build /app/web/build ${WORK_DIR}/ +COPY --from=build /app/web/docker/nginx.conf /etc/nginx/conf.d/default.conf diff --git a/micro-ui/web/docker/masDockerfile b/micro-ui/web/docker/masDockerfile new file mode 100644 index 00000000000..5d7cf45dd87 --- /dev/null +++ b/micro-ui/web/docker/masDockerfile @@ -0,0 +1,25 @@ +#FROM egovio/alpine-node-builder-14:yarn AS build +FROM ghcr.io/egovernments/alpine-node-builder-14:yarn AS build +RUN apk update && apk upgrade +RUN apk add --no-cache git>2.30.0 +ARG WORK_DIR +WORKDIR /app +ENV NODE_OPTIONS "--max-old-space-size=3792" + +COPY ${WORK_DIR} . +RUN ls -lah + +#RUN node web/envs.js +RUN cd web/ \ + && node envs.js \ + && yarn install \ + && yarn build + +#FROM nginx:mainline-alpine +FROM ghcr.io/egovernments/nginx:mainline-alpine +ENV WORK_DIR=/var/web/digit-ui + +RUN mkdir -p ${WORK_DIR} + +COPY --from=build /app/web/build ${WORK_DIR}/ +COPY --from=build /app/web/docker/nginx.conf /etc/nginx/conf.d/default.conf diff --git a/micro-ui/web/docker/nginx.conf b/micro-ui/web/docker/nginx.conf new file mode 100644 index 00000000000..4f532e4a6ed --- /dev/null +++ b/micro-ui/web/docker/nginx.conf @@ -0,0 +1,12 @@ +server +{ + listen 80; + underscores_in_headers on; + + location /digit-ui + { + root /var/web; + index index.html index.htm; + try_files $uri $uri/ /digit-ui/index.html; + } +} \ No newline at end of file diff --git a/micro-ui/web/envs.js b/micro-ui/web/envs.js new file mode 100644 index 00000000000..e69de29bb2d diff --git a/micro-ui/web/install-deps.sh b/micro-ui/web/install-deps.sh new file mode 100755 index 00000000000..efaceaee20d --- /dev/null +++ b/micro-ui/web/install-deps.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +BRANCH="$(git branch --show-current)" + +echo "Main Branch: $BRANCH" + +INTERNALS="micro-ui-internals" + +cp $INTERNALS/example/src/UICustomizations.js src/Customisations + +cd $INTERNALS && echo "Branch: $(git branch --show-current)" && echo "$(git log -1 --pretty=%B)" && echo "installing packages" + + +# yarn install diff --git a/micro-ui/web/micro-ui-internals/.gitignore b/micro-ui/web/micro-ui-internals/.gitignore new file mode 100644 index 00000000000..1747c795d6f --- /dev/null +++ b/micro-ui/web/micro-ui-internals/.gitignore @@ -0,0 +1,143 @@ +# Created by https://www.toptal.com/developers/gitignore/api/node,react +# Edit at https://www.toptal.com/developers/gitignore?templates=node,react + +### eGov ### +packages/css/example/index.css +package-lock.json +locales/ +build/ +packages/**/dist/ + +# yarn # +.yarn +.yarnrc.yml + +### Node ### +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* + +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage +*.lcov + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# TypeScript v1 declaration files +typings/ + +# TypeScript cache +*.tsbuildinfo + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Microbundle cache +.rpt2_cache/ +.rts2_cache_cjs/ +.rts2_cache_es/ +.rts2_cache_umd/ + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env +.env.test +.env*.local + +# parcel-bundler cache (https://parceljs.org/) +.cache +.parcel-cache + +# Next.js build output +.next + +# Nuxt.js build / generate output +.nuxt +dist +dist-storybook + +# Gatsby files +.cache/ +# Comment in the public line in if your project uses Gatsby and not Next.js +# https://nextjs.org/blog/next-9-1#public-directory-support +# public + +# vuepress build output +.vuepress/dist + +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ + +# TernJS port file +.tern-port + +# Stores VSCode versions used for testing VSCode extensions +.vscode-test + +### react ### +.DS_* +**/*.backup.* +**/*.back.* + +node_modules + +*.sublime* + +psd +thumb +sketch + +# vs code +.vscode/ + +# End of https://www.toptal.com/developers/gitignore/api/node,react \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/.prettierignore b/micro-ui/web/micro-ui-internals/.prettierignore new file mode 100644 index 00000000000..d54de016ef0 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/.prettierignore @@ -0,0 +1,23 @@ + +# See https://help.github.com/ignore-files/ for more about ignoring files. +# dependencies +node_modules +# builds +build +dist +.rpt2_cache +# dev +dev.css +index.css +index.compat.css +index.min.css +# misc +.DS_Store +.env +.env.local +.env.development.local +.env.test.local +.env.production.local +npm-debug.log* +yarn-debug.log* +yarn-error.log* diff --git a/micro-ui/web/micro-ui-internals/.prettierrc.json b/micro-ui/web/micro-ui-internals/.prettierrc.json new file mode 100644 index 00000000000..b975008d6f8 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/.prettierrc.json @@ -0,0 +1,3 @@ +{ + "printWidth": 150 +} diff --git a/micro-ui/web/micro-ui-internals/README.md b/micro-ui/web/micro-ui-internals/README.md new file mode 100644 index 00000000000..f23a1fcfe9c --- /dev/null +++ b/micro-ui/web/micro-ui-internals/README.md @@ -0,0 +1,100 @@ + +# workbench ui + +A React App built on top of DIGIT UI Core. + + +# DIGIT UI + +DIGIT (Digital Infrastructure for Governance, Impact & Transformation) is India's largest platform for governance services. Visit https://www.digit.org for more details. + +This repository contains source code for web implementation of the new Digit UI modules with dependencies and libraries. + +Workbench module is used to Manage the master data (MDMS V2 Service) used across the DIGIT Services / Applications + +It is also used to manage the Localisation data present in the system (Localisation service) + + +## Run Locally + +Clone the project + +```bash + git clone https://github.com/egovernments/Digit-Core.git +``` + +Go to the Sub directory to run UI +```bash + cd into frontend/micro-ui/web/micro-ui-internals +``` + +Install dependencies + +```bash + yarn install +``` + +Add .env file +```bash + frontend/micro-ui/web/micro-ui-internals/example/.env +``` + +Start the server + +```bash + yarn start +``` + + +## Environment Variables + +To run this project, you will need to add the following environment variables to your .env file + +`REACT_APP_PROXY_API` :: `{{server url}}` + +`REACT_APP_GLOBAL` :: `{{server url}}` + +`REACT_APP_PROXY_ASSETS` :: `{{server url}}` + +`REACT_APP_USER_TYPE` :: `{{EMPLOYEE||CITIZEN}}` + +`SKIP_PREFLIGHT_CHECK` :: `true` + +[sample .env file](https://github.com/egovernments/Digit-Core/blob/workbench/frontend/micro-ui/web/micro-ui-internals/example/.env-unifieddev) + +## Tech Stack + +**Libraries:** + +[React](https://react.dev/) + +[React Hook Form](https://www.react-hook-form.com/) + +[React Query](https://tanstack.com/query/v3/) + +[Tailwind CSS](https://tailwindcss.com/) + +[Webpack](https://webpack.js.org/) + +## License + +[MIT](https://choosealicense.com/licenses/mit/) + + +## Author + +- [@jagankumar-egov](https://www.github.com/jagankumar-egov) + + +## Documentation + +[Documentation](https://https://core.digit.org/guides/developer-guide/ui-developer-guide/digit-ui) + + +## Support + +For support, add the issues in https://github.com/egovernments/DIGIT-core/issues. + + +![Logo](https://s3.ap-south-1.amazonaws.com/works-dev-asset/mseva-white-logo.png) + diff --git a/micro-ui/web/micro-ui-internals/clean.sh b/micro-ui/web/micro-ui-internals/clean.sh new file mode 100644 index 00000000000..2235ef1c1d0 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/clean.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +BASEDIR="$( cd "$( dirname "$0" )" && pwd )" + +msg() { + echo -e "\n\n\033[32;32m$1\033[0m" +} + +msg "Cleaning root" +rm -rf node_modules + +msg "Cleaning css" +cd "$BASEDIR/packages/css" && rm -rf node_modules + +msg "Cleaning libraries" +cd "$BASEDIR/packages/libraries" && rm -rf node_modules + +msg "Cleaning react-components" +cd "$BASEDIR/packages/react-components" && rm -rf node_modules + +msg "Cleaning PGR module" +cd "$BASEDIR/packages/modules/pgr" && rm -rf node_modules + +msg "Cleaning FSM module" +cd "$BASEDIR/packages/modules/fsm" && rm -rf node_modules + +msg "Cleaning Core module" +cd "$BASEDIR/packages/modules/core" && rm -rf node_modules diff --git a/micro-ui/web/micro-ui-internals/example/.env-fsm b/micro-ui/web/micro-ui-internals/example/.env-fsm new file mode 100644 index 00000000000..1343375f3f7 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/example/.env-fsm @@ -0,0 +1,7 @@ +SKIP_PREFLIGHT_CHECK=true +REACT_APP_USER_TYPE= +REACT_APP_EMPLOYEE_TOKEN= +REACT_APP_CITIZEN_TOKEN= +REACT_APP_PROXY_API=https://unified-dev.digit.org +REACT_APP_PROXY_ASSETS=https://unified-dev.digit.org +REACT_APP_GLOBAL=https://s3.ap-south-1.amazonaws.com/egov-dev-assets/globalConfigsFSM.js diff --git a/micro-ui/web/micro-ui-internals/example/.env-health-qa b/micro-ui/web/micro-ui-internals/example/.env-health-qa new file mode 100644 index 00000000000..73b42b7dfad --- /dev/null +++ b/micro-ui/web/micro-ui-internals/example/.env-health-qa @@ -0,0 +1,7 @@ +SKIP_PREFLIGHT_CHECK=true +REACT_APP_USER_TYPE=EMPLOYEE +REACT_APP_EMPLOYEE_TOKEN=c835932f-2ad4-4d05-83d6-49e0b8c59f8a +REACT_APP_CITIZEN_TOKEN=7cd58aae-30b3-41ed-a1b3-3417107a993c +REACT_APP_PROXY_API=https://health-qa.digit.org +REACT_APP_PROXY_ASSETS=https://health-qa.digit.org +REACT_APP_GLOBAL=https://egov-dev-assets.s3.ap-south-1.amazonaws.com/globalConfigsWorkbenchHCM.js diff --git a/micro-ui/web/micro-ui-internals/example/.env-mz-prod b/micro-ui/web/micro-ui-internals/example/.env-mz-prod new file mode 100644 index 00000000000..2d02707d7eb --- /dev/null +++ b/micro-ui/web/micro-ui-internals/example/.env-mz-prod @@ -0,0 +1,7 @@ +SKIP_PREFLIGHT_CHECK=true +REACT_APP_USER_TYPE=EMPLOYEE +REACT_APP_EMPLOYEE_TOKEN=c835932f-2ad4-4d05-83d6-49e0b8c59f8a +REACT_APP_CITIZEN_TOKEN=7cd58aae-30b3-41ed-a1b3-3417107a993c +REACT_APP_PROXY_API=https://salama.digit.org +REACT_APP_PROXY_ASSETS=https://salama.digit.org +REACT_APP_GLOBAL=https://moz-health-prd.s3.af-south-1.amazonaws.com/globalConfig.js diff --git a/micro-ui/web/micro-ui-internals/example/.env-mz-uat b/micro-ui/web/micro-ui-internals/example/.env-mz-uat new file mode 100644 index 00000000000..bedf28a95b1 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/example/.env-mz-uat @@ -0,0 +1,7 @@ +SKIP_PREFLIGHT_CHECK=true +REACT_APP_USER_TYPE=EMPLOYEE +REACT_APP_EMPLOYEE_TOKEN=c835932f-2ad4-4d05-83d6-49e0b8c59f8a +REACT_APP_CITIZEN_TOKEN=7cd58aae-30b3-41ed-a1b3-3417107a993c +REACT_APP_PROXY_API=https://moz-health-uat.digit.org +REACT_APP_PROXY_ASSETS=https://moz-health-uat.digit.org +REACT_APP_GLOBAL=https://moz-health-uat.s3.ap-south-1.amazonaws.com/globalConfig.js diff --git a/micro-ui/web/micro-ui-internals/example/.env-qa b/micro-ui/web/micro-ui-internals/example/.env-qa new file mode 100644 index 00000000000..fbef1be340a --- /dev/null +++ b/micro-ui/web/micro-ui-internals/example/.env-qa @@ -0,0 +1,7 @@ +SKIP_PREFLIGHT_CHECK=true +REACT_APP_USER_TYPE=EMPLOYEE +REACT_APP_EMPLOYEE_TOKEN=c835932f-2ad4-4d05-83d6-49e0b8c59f8a +REACT_APP_CITIZEN_TOKEN=7cd58aae-30b3-41ed-a1b3-3417107a993c +REACT_APP_PROXY_API=https://qa.digit.org +REACT_APP_PROXY_ASSETS=https://qa.digit.org +REACT_APP_GLOBAL=https://s3.ap-south-1.amazonaws.com/egov-dev-assets/globalConfigs.js \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/example/.env-unifiedDev b/micro-ui/web/micro-ui-internals/example/.env-unifiedDev new file mode 100644 index 00000000000..e443e98e036 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/example/.env-unifiedDev @@ -0,0 +1,8 @@ +SKIP_PREFLIGHT_CHECK=true +REACT_APP_USER_TYPE=EMPLOYEE +REACT_APP_EMPLOYEE_TOKEN=c835932f-2ad4-4d05-83d6-49e0b8c59f8a +REACT_APP_CITIZEN_TOKEN=7cd58aae-30b3-41ed-a1b3-3417107a993c +REACT_APP_PROXY_API=https://unified-dev.digit.org +REACT_APP_PROXY_ASSETS=https://unified-dev.digit.org +REACT_APP_GLOBAL=https://s3.ap-south-1.amazonaws.com/egov-dev-assets/globalConfigsWorkbench.js +REACT_APP_CONTEXT=works \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/example/.env-unifieddev b/micro-ui/web/micro-ui-internals/example/.env-unifieddev new file mode 100644 index 00000000000..e443e98e036 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/example/.env-unifieddev @@ -0,0 +1,8 @@ +SKIP_PREFLIGHT_CHECK=true +REACT_APP_USER_TYPE=EMPLOYEE +REACT_APP_EMPLOYEE_TOKEN=c835932f-2ad4-4d05-83d6-49e0b8c59f8a +REACT_APP_CITIZEN_TOKEN=7cd58aae-30b3-41ed-a1b3-3417107a993c +REACT_APP_PROXY_API=https://unified-dev.digit.org +REACT_APP_PROXY_ASSETS=https://unified-dev.digit.org +REACT_APP_GLOBAL=https://s3.ap-south-1.amazonaws.com/egov-dev-assets/globalConfigsWorkbench.js +REACT_APP_CONTEXT=works \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/example/.env-upyog b/micro-ui/web/micro-ui-internals/example/.env-upyog new file mode 100644 index 00000000000..f434772b7c2 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/example/.env-upyog @@ -0,0 +1,8 @@ +SKIP_PREFLIGHT_CHECK=true +REACT_APP_USER_TYPE=EMPLOYEE +REACT_APP_EMPLOYEE_TOKEN=c835932f-2ad4-4d05-83d6-49e0b8c59f8a +REACT_APP_CITIZEN_TOKEN=7cd58aae-30b3-41ed-a1b3-3417107a993c +REACT_APP_PROXY_API=https://upyog.niua.org +REACT_APP_PROXY_ASSETS=https://upyog.niua.org +REACT_APP_GLOBAL=https://s3.ap-south-1.amazonaws.com/in-egov-assets/globalConfigs.js +REACT_APP_CONTEXT=digit-ui \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/example/.env-workbench b/micro-ui/web/micro-ui-internals/example/.env-workbench new file mode 100644 index 00000000000..2b49a958229 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/example/.env-workbench @@ -0,0 +1,8 @@ +SKIP_PREFLIGHT_CHECK=true +REACT_APP_USER_TYPE=EMPLOYEE +REACT_APP_EMPLOYEE_TOKEN=c835932f-2ad4-4d05-83d6-49e0b8c59f8a +REACT_APP_CITIZEN_TOKEN=7cd58aae-30b3-41ed-a1b3-3417107a993c +REACT_APP_PROXY_API=https://works-dev.digit.org +REACT_APP_PROXY_ASSETS=https://works-dev.digit.org +REACT_APP_GLOBAL=https://s3.ap-south-1.amazonaws.com/works-dev-asset/globalConfigsWorkbench.js +REACT_APP_CONTEXT=works \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/example/.env-workbench-qa b/micro-ui/web/micro-ui-internals/example/.env-workbench-qa new file mode 100644 index 00000000000..ccf4e7ca08f --- /dev/null +++ b/micro-ui/web/micro-ui-internals/example/.env-workbench-qa @@ -0,0 +1,8 @@ +SKIP_PREFLIGHT_CHECK=true +REACT_APP_USER_TYPE=EMPLOYEE +REACT_APP_EMPLOYEE_TOKEN=c835932f-2ad4-4d05-83d6-49e0b8c59f8a +REACT_APP_CITIZEN_TOKEN=7cd58aae-30b3-41ed-a1b3-3417107a993c +REACT_APP_PROXY_API=https://qa.digit.org +REACT_APP_PROXY_ASSETS=https://qa.digit.org +REACT_APP_GLOBAL=https://s3.ap-south-1.amazonaws.com/egov-qa-assets/globalConfigsWorkbench.js +REACT_APP_CONTEXT=works \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/example/.env-worksdev b/micro-ui/web/micro-ui-internals/example/.env-worksdev new file mode 100644 index 00000000000..b42651ee829 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/example/.env-worksdev @@ -0,0 +1,8 @@ +SKIP_PREFLIGHT_CHECK=true +REACT_APP_USER_TYPE=EMPLOYEE +REACT_APP_EMPLOYEE_TOKEN=c835932f-2ad4-4d05-83d6-49e0b8c59f8a +REACT_APP_CITIZEN_TOKEN=7cd58aae-30b3-41ed-a1b3-3417107a993c +REACT_APP_PROXY_API=https://works-dev.digit.org +REACT_APP_PROXY_ASSETS=https://works-dev.digit.org +REACT_APP_GLOBAL=https://s3.ap-south-1.amazonaws.com/works-dev-asset/globalConfigsWorks.js +REACT_APP_CONTEXT=works \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/example/maspackage.json b/micro-ui/web/micro-ui-internals/example/maspackage.json new file mode 100644 index 00000000000..1f54328562b --- /dev/null +++ b/micro-ui/web/micro-ui-internals/example/maspackage.json @@ -0,0 +1,31 @@ +{ + "name": "@egovernments/digit-ui-example", + "version": "1.3.0", + "main": "index.js", + "license": "MIT", + "private": true, + "homepage": "digit-ui/", + "scripts": { + "start": "react-scripts start" + }, + "devDependencies": { + "http-proxy-middleware": "^1.0.5", + "react": "17.0.2", + "react-dom": "17.0.2", + "react-i18next": "11.16.2", + "react-router-dom": "5.3.0", + "react-scripts": "^4.0.1" + }, + "browserslist": { + "production": [ + ">0.2%", + "not dead", + "not op_mini all" + ], + "development": [ + "last 1 chrome version", + "last 1 firefox version", + "last 1 safari version" + ] + } +} diff --git a/micro-ui/web/micro-ui-internals/example/package.json b/micro-ui/web/micro-ui-internals/example/package.json new file mode 100644 index 00000000000..f3753ae0715 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/example/package.json @@ -0,0 +1,40 @@ +{ + "name": "@egovernments/digit-ui-example", + "version": "1.0.0", + "main": "index.js", + "license": "MIT", + "private": true, + "homepage": "digit-ui", + "scripts": { + "start": "react-scripts start" + }, + "devDependencies": { + "@egovernments/digit-ui-libraries": "1.8.0-beta", + "@egovernments/digit-ui-module-workbench": "1.0.0-beta", + "@egovernments/digit-ui-module-dss": "1.8.0-beta", + "@egovernments/digit-ui-module-core": "1.8.0-beta.5", + "@egovernments/digit-ui-module-common": "1.8.0-beta", + "@egovernments/digit-ui-module-hrms": "1.8.0-beta.2", + "@egovernments/digit-ui-module-utilities": "1.0.0-beta", + "@egovernments/digit-ui-module-engagement": "1.5.20", + "@egovernments/digit-ui-react-components": "1.8.0-beta.1", + "http-proxy-middleware": "^1.0.5", + "react": "17.0.2", + "react-dom": "17.0.2", + "react-i18next": "11.16.2", + "react-router-dom": "5.3.0", + "react-scripts": "^4.0.1" + }, + "browserslist": { + "production": [ + ">0.2%", + "not dead", + "not op_mini all" + ], + "development": [ + "last 1 chrome version", + "last 1 firefox version", + "last 1 safari version" + ] + } +} diff --git a/micro-ui/web/micro-ui-internals/example/public/index.html b/micro-ui/web/micro-ui-internals/example/public/index.html new file mode 100644 index 00000000000..b85e17ebfce --- /dev/null +++ b/micro-ui/web/micro-ui-internals/example/public/index.html @@ -0,0 +1,26 @@ + + + + + + + + + + DIGIT + + + + + + + + + + +
+ + + \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/example/src/ComponentRegistry.js b/micro-ui/web/micro-ui-internals/example/src/ComponentRegistry.js new file mode 100644 index 00000000000..9bafce3dc89 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/example/src/ComponentRegistry.js @@ -0,0 +1,11 @@ +class Registry { + constructor(registry = {}) { + this._registry = registry; + } + + getComponent(id) { + return this._registry[id]; + } +} + +export default Registry; diff --git a/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js b/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js new file mode 100644 index 00000000000..140c4664d72 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js @@ -0,0 +1,420 @@ +import { Link } from "react-router-dom"; +import _ from "lodash"; + +//create functions here based on module name set in mdms(eg->SearchProjectConfig) +//how to call these -> Digit?.Customizations?.[masterName]?.[moduleName] +// these functions will act as middlewares +var Digit = window.Digit || {}; + +const businessServiceMap = { + "muster roll": "MR", +}; + +const inboxModuleNameMap = { + "muster-roll-approval": "muster-roll-service", +}; + +export const UICustomizations = { + businessServiceMap, + updatePayload: (applicationDetails, data, action, businessService) => { + if (businessService === businessServiceMap.estimate) { + const workflow = { + comment: data.comments, + documents: data?.documents?.map((document) => { + return { + documentType: action?.action + " DOC", + fileName: document?.[1]?.file?.name, + fileStoreId: document?.[1]?.fileStoreId?.fileStoreId, + documentUid: document?.[1]?.fileStoreId?.fileStoreId, + tenantId: document?.[1]?.fileStoreId?.tenantId, + }; + }), + assignees: data?.assignees?.uuid ? [data?.assignees?.uuid] : null, + action: action.action, + }; + //filtering out the data + Object.keys(workflow).forEach((key, index) => { + if (!workflow[key] || workflow[key]?.length === 0) delete workflow[key]; + }); + + return { + estimate: applicationDetails, + workflow, + }; + } + if (businessService === businessServiceMap.contract) { + const workflow = { + comment: data?.comments, + documents: data?.documents?.map((document) => { + return { + documentType: action?.action + " DOC", + fileName: document?.[1]?.file?.name, + fileStoreId: document?.[1]?.fileStoreId?.fileStoreId, + documentUid: document?.[1]?.fileStoreId?.fileStoreId, + tenantId: document?.[1]?.fileStoreId?.tenantId, + }; + }), + assignees: data?.assignees?.uuid ? [data?.assignees?.uuid] : null, + action: action.action, + }; + //filtering out the data + Object.keys(workflow).forEach((key, index) => { + if (!workflow[key] || workflow[key]?.length === 0) delete workflow[key]; + }); + + return { + contract: applicationDetails, + workflow, + }; + } + if (businessService === businessServiceMap?.["muster roll"]) { + const workflow = { + comment: data?.comments, + documents: data?.documents?.map((document) => { + return { + documentType: action?.action + " DOC", + fileName: document?.[1]?.file?.name, + fileStoreId: document?.[1]?.fileStoreId?.fileStoreId, + documentUid: document?.[1]?.fileStoreId?.fileStoreId, + tenantId: document?.[1]?.fileStoreId?.tenantId, + }; + }), + assignees: data?.assignees?.uuid ? [data?.assignees?.uuid] : null, + action: action.action, + }; + //filtering out the data + Object.keys(workflow).forEach((key, index) => { + if (!workflow[key] || workflow[key]?.length === 0) delete workflow[key]; + }); + + return { + musterRoll: applicationDetails, + workflow, + }; + } + if (businessService === businessServiceMap?.["works.purchase"]) { + const workflow = { + comment: data.comments, + documents: data?.documents?.map((document) => { + return { + documentType: action?.action + " DOC", + fileName: document?.[1]?.file?.name, + fileStoreId: document?.[1]?.fileStoreId?.fileStoreId, + documentUid: document?.[1]?.fileStoreId?.fileStoreId, + tenantId: document?.[1]?.fileStoreId?.tenantId, + }; + }), + assignees: data?.assignees?.uuid ? [data?.assignees?.uuid] : null, + action: action.action, + }; + //filtering out the data + Object.keys(workflow).forEach((key, index) => { + if (!workflow[key] || workflow[key]?.length === 0) delete workflow[key]; + }); + + const additionalFieldsToSet = { + projectId: applicationDetails.additionalDetails.projectId, + invoiceDate: applicationDetails.billDate, + invoiceNumber: applicationDetails.referenceId.split("_")?.[1], + contractNumber: applicationDetails.referenceId.split("_")?.[0], + documents: applicationDetails.additionalDetails.documents, + }; + return { + bill: { ...applicationDetails, ...additionalFieldsToSet }, + workflow, + }; + } + }, + enableModalSubmit: (businessService, action, setModalSubmit, data) => { + if (businessService === businessServiceMap?.["muster roll"] && action.action === "APPROVE") { + setModalSubmit(data?.acceptTerms); + } + }, + enableHrmsSearch: (businessService, action) => { + if (businessService === businessServiceMap.estimate) { + return action.action.includes("TECHNICALSANCTION") || action.action.includes("VERIFYANDFORWARD"); + } + if (businessService === businessServiceMap.contract) { + return action.action.includes("VERIFY_AND_FORWARD"); + } + if (businessService === businessServiceMap?.["muster roll"]) { + return action.action.includes("VERIFY"); + } + if (businessService === businessServiceMap?.["works.purchase"]) { + return action.action.includes("VERIFY_AND_FORWARD"); + } + return false; + }, + getBusinessService: (moduleCode) => { + if (moduleCode?.includes("estimate")) { + return businessServiceMap?.estimate; + } else if (moduleCode?.includes("contract")) { + return businessServiceMap?.contract; + } else if (moduleCode?.includes("muster roll")) { + return businessServiceMap?.["muster roll"]; + } else if (moduleCode?.includes("works.purchase")) { + return businessServiceMap?.["works.purchase"]; + } else if (moduleCode?.includes("works.wages")) { + return businessServiceMap?.["works.wages"]; + } else if (moduleCode?.includes("works.supervision")) { + return businessServiceMap?.["works.supervision"]; + } else { + return businessServiceMap; + } + }, + getInboxModuleName: (moduleCode) => { + if (moduleCode?.includes("estimate")) { + return inboxModuleNameMap?.estimate; + } else if (moduleCode?.includes("contract")) { + return inboxModuleNameMap?.contracts; + } else if (moduleCode?.includes("attendence")) { + return inboxModuleNameMap?.attendencemgmt; + } else { + return inboxModuleNameMap; + } + }, + + AttendanceInboxConfig: { + preProcess: (data) => { + //set tenantId + data.body.inbox.tenantId = Digit.ULBService.getCurrentTenantId(); + data.body.inbox.processSearchCriteria.tenantId = Digit.ULBService.getCurrentTenantId(); + + const musterRollNumber = data?.body?.inbox?.moduleSearchCriteria?.musterRollNumber?.trim(); + if (musterRollNumber) data.body.inbox.moduleSearchCriteria.musterRollNumber = musterRollNumber; + + const attendanceRegisterName = data?.body?.inbox?.moduleSearchCriteria?.attendanceRegisterName?.trim(); + if (attendanceRegisterName) data.body.inbox.moduleSearchCriteria.attendanceRegisterName = attendanceRegisterName; + + // deleting them for now(assignee-> need clarity from pintu,ward-> static for now,not implemented BE side) + const assignee = _.clone(data.body.inbox.moduleSearchCriteria.assignee); + delete data.body.inbox.moduleSearchCriteria.assignee; + if (assignee?.code === "ASSIGNED_TO_ME") { + data.body.inbox.moduleSearchCriteria.assignee = Digit.UserService.getUser().info.uuid; + } + + //cloning locality and workflow states to format them + // let locality = _.clone(data.body.inbox.moduleSearchCriteria.locality ? data.body.inbox.moduleSearchCriteria.locality : []); + + let selectedOrg = _.clone(data.body.inbox.moduleSearchCriteria.orgId ? data.body.inbox.moduleSearchCriteria.orgId : null); + delete data.body.inbox.moduleSearchCriteria.orgId; + if (selectedOrg) { + data.body.inbox.moduleSearchCriteria.orgId = selectedOrg?.[0]?.applicationNumber; + } + + // let selectedWard = _.clone(data.body.inbox.moduleSearchCriteria.ward ? data.body.inbox.moduleSearchCriteria.ward : null); + // delete data.body.inbox.moduleSearchCriteria.ward; + // if(selectedWard) { + // data.body.inbox.moduleSearchCriteria.ward = selectedWard?.[0]?.code; + // } + + let states = _.clone(data.body.inbox.moduleSearchCriteria.state ? data.body.inbox.moduleSearchCriteria.state : []); + let ward = _.clone(data.body.inbox.moduleSearchCriteria.ward ? data.body.inbox.moduleSearchCriteria.ward : []); + // delete data.body.inbox.moduleSearchCriteria.locality; + delete data.body.inbox.moduleSearchCriteria.state; + delete data.body.inbox.moduleSearchCriteria.ward; + + // locality = locality?.map((row) => row?.code); + states = Object.keys(states)?.filter((key) => states[key]); + ward = ward?.map((row) => row?.code); + + // //adding formatted data to these keys + // if (locality.length > 0) data.body.inbox.moduleSearchCriteria.locality = locality; + if (states.length > 0) data.body.inbox.moduleSearchCriteria.status = states; + if (ward.length > 0) data.body.inbox.moduleSearchCriteria.ward = ward; + const projectType = _.clone(data.body.inbox.moduleSearchCriteria.projectType ? data.body.inbox.moduleSearchCriteria.projectType : {}); + if (projectType?.code) data.body.inbox.moduleSearchCriteria.projectType = projectType.code; + + //adding tenantId to moduleSearchCriteria + data.body.inbox.moduleSearchCriteria.tenantId = Digit.ULBService.getCurrentTenantId(); + + //setting limit and offset becoz somehow they are not getting set in muster inbox + data.body.inbox.limit = data.state.tableForm.limit; + data.body.inbox.offset = data.state.tableForm.offset; + delete data.state; + return data; + }, + postProcess: (responseArray, uiConfig) => { + const statusOptions = responseArray?.statusMap + ?.filter((item) => item.applicationstatus) + ?.map((item) => ({ code: item.applicationstatus, i18nKey: `COMMON_MASTERS_${item.applicationstatus}` })); + if (uiConfig?.type === "filter") { + let fieldConfig = uiConfig?.fields?.filter((item) => item.type === "dropdown" && item.populators.name === "musterRollStatus"); + if (fieldConfig.length) { + fieldConfig[0].populators.options = statusOptions; + } + } + }, + additionalCustomizations: (row, key, column, value, t, searchResult) => { + if (key === "ATM_MUSTER_ROLL_ID") { + return ( + + + {String(value ? (column.translate ? t(column.prefix ? `${column.prefix}${value}` : value) : value) : t("ES_COMMON_NA"))} + + + ); + } + if (key === "ATM_ATTENDANCE_WEEK") { + const week = `${Digit.DateUtils.ConvertTimestampToDate(value?.startDate, "dd/MM/yyyy")}-${Digit.DateUtils.ConvertTimestampToDate( + value?.endDate, + "dd/MM/yyyy" + )}`; + return
{week}
; + } + if (key === "ATM_NO_OF_INDIVIDUALS") { + return
{value?.length}
; + } + if (key === "ATM_AMOUNT_IN_RS") { + return {value ? Digit.Utils.dss.formatterWithoutRound(value, "number") : t("ES_COMMON_NA")}; + } + if (key === "ATM_SLA") { + return parseInt(value) > 0 ? ( + {t(value) || ""} + ) : ( + {t(value) || ""} + ); + } + if (key === "COMMON_WORKFLOW_STATES") { + return {t(`WF_MUSTOR_${value}`)}; + } + //added this in case we change the key and not updated here , it'll throw that nothing was returned from cell error if that case is not handled here. To prevent that error putting this default + return {t(`CASE_NOT_HANDLED`)}; + }, + MobileDetailsOnClick: (row, tenantId) => { + let link; + Object.keys(row).map((key) => { + if (key === "ATM_MUSTER_ROLL_ID") + link = `/${window.contextPath}/employee/attendencemgmt/view-attendance?tenantId=${tenantId}&musterRollNumber=${row[key]}`; + }); + return link; + }, + populateReqCriteria: () => { + const tenantId = Digit.ULBService.getCurrentTenantId(); + return { + url: "/org-services/organisation/v1/_search", + params: { limit: 50, offset: 0 }, + body: { + SearchCriteria: { + tenantId: tenantId, + functions: { + type: "CBO", + }, + }, + }, + config: { + enabled: true, + select: (data) => { + return data?.organisations; + }, + }, + }; + }, + }, + SearchWageSeekerConfig: { + customValidationCheck: (data) => { + //checking both to and from date are present + const { createdFrom, createdTo } = data; + if ((createdFrom === "" && createdTo !== "") || (createdFrom !== "" && createdTo === "")) + return { warning: true, label: "ES_COMMON_ENTER_DATE_RANGE" }; + + return false; + }, + preProcess: (data) => { + data.params = { ...data.params, tenantId: Digit.ULBService.getCurrentTenantId() }; + + let requestBody = { ...data.body.Individual }; + const pathConfig = { + name: "name.givenName", + }; + const dateConfig = { + createdFrom: "daystart", + createdTo: "dayend", + }; + const selectConfig = { + wardCode: "wardCode[0].code", + socialCategory: "socialCategory.code", + }; + const textConfig = ["name", "individualId"]; + let Individual = Object.keys(requestBody) + .map((key) => { + if (selectConfig[key]) { + requestBody[key] = _.get(requestBody, selectConfig[key], null); + } else if (typeof requestBody[key] == "object") { + requestBody[key] = requestBody[key]?.code; + } else if (textConfig?.includes(key)) { + requestBody[key] = requestBody[key]?.trim(); + } + return key; + }) + .filter((key) => requestBody[key]) + .reduce((acc, curr) => { + if (pathConfig[curr]) { + _.set(acc, pathConfig[curr], requestBody[curr]); + } else if (dateConfig[curr] && dateConfig[curr]?.includes("day")) { + _.set(acc, curr, Digit.Utils.date.convertDateToEpoch(requestBody[curr], dateConfig[curr])); + } else { + _.set(acc, curr, requestBody[curr]); + } + return acc; + }, {}); + + data.body.Individual = { ...Individual }; + return data; + }, + additionalCustomizations: (row, key, column, value, t, searchResult) => { + //here we can add multiple conditions + //like if a cell is link then we return link + //first we can identify which column it belongs to then we can return relevant result + switch (key) { + case "MASTERS_WAGESEEKER_ID": + return ( + + + {String(value ? (column.translate ? t(column.prefix ? `${column.prefix}${value}` : value) : value) : t("ES_COMMON_NA"))} + + + ); + + case "MASTERS_SOCIAL_CATEGORY": + return value ? {String(t(`MASTERS_${value}`))} : t("ES_COMMON_NA"); + + case "CORE_COMMON_PROFILE_CITY": + return value ? {String(t(Digit.Utils.locale.getCityLocale(value)))} : t("ES_COMMON_NA"); + + case "MASTERS_WARD": + return value ? ( + {String(t(Digit.Utils.locale.getMohallaLocale(value, row?.tenantId)))} + ) : ( + t("ES_COMMON_NA") + ); + + case "MASTERS_LOCALITY": + return value ? ( + {String(t(Digit.Utils.locale.getMohallaLocale(value, row?.tenantId)))} + ) : ( + t("ES_COMMON_NA") + ); + default: + return t("ES_COMMON_NA"); + } + }, + MobileDetailsOnClick: (row, tenantId) => { + let link; + Object.keys(row).map((key) => { + if (key === "MASTERS_WAGESEEKER_ID") + link = `/${window.contextPath}/employee/masters/view-wageseeker?tenantId=${tenantId}&wageseekerId=${row[key]}`; + }); + return link; + }, + additionalValidations: (type, data, keys) => { + if (type === "date") { + return data[keys.start] && data[keys.end] ? () => new Date(data[keys.start]).getTime() <= new Date(data[keys.end]).getTime() : true; + } + }, + }, +}; diff --git a/micro-ui/web/micro-ui-internals/example/src/complaintConfig.js b/micro-ui/web/micro-ui-internals/example/src/complaintConfig.js new file mode 100644 index 00000000000..28c85515205 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/example/src/complaintConfig.js @@ -0,0 +1,31 @@ +export const config = { + routes: { + "complaint-type": { + nextStep: "pincode", + }, + landmark: { + nextStep: "apartment", + }, + apartment: { + component: "SelectName", + texts: { + header: "Apartment or Society", + cardText: "CS_COMPLAINT_SUBTYPE_TEXT", + submitBarLabel: "PT_COMMONS_NEXT", + }, + inputs: [ + { + label: "Apartment", + type: "text", + name: "custom.additionalDetails.apartment", + validation: { + minLength: 6, + maxLength: 7, + }, + error: "CORE_COMMON_PINCODE_INVALID", + }, + ], + nextStep: "upload-photos", + }, + }, +}; diff --git a/micro-ui/web/micro-ui-internals/example/src/components/SelectName.js b/micro-ui/web/micro-ui-internals/example/src/components/SelectName.js new file mode 100644 index 00000000000..56d2a195c12 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/example/src/components/SelectName.js @@ -0,0 +1,8 @@ +import React from "react"; +import { FormStep } from "@egovernments/digit-ui-react-components"; + +const SelectName = ({ config, onSelect, onSkip, t }) => { + return ; +}; + +export default SelectName; diff --git a/micro-ui/web/micro-ui-internals/example/src/fsm.js b/micro-ui/web/micro-ui-internals/example/src/fsm.js new file mode 100644 index 00000000000..271d3ddad56 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/example/src/fsm.js @@ -0,0 +1,38 @@ +const fsmCustomizations = { + getEmployeeApplicationCustomization: (config, t) => { + const employeeConfig = [ + { + name: "applicationDetails", + // fields: ["sanitationType", "applicationChannel"], + // fieldsOrder: {sanitationType: 0, applicationChannel: 1}, // TODO + allFields: true, // for example: If in applicationDetails you have 10 fields and in fieldsOrder you only enter 3 fields name then on browser you will only see 3 fields in that order but if you want to see rest of 7 fields at the bottom. + // removeFields: ["applicantName"], // type the name of the field in camelCase to remove it + addFields: [ + // by default all the custom fields will add at the bottom, you can add "field name" to "fieldsOrder" if you want them in your custom order. + { + name: "example", + label: t("EXAMPLE"), + type: "text", + isMandatory: true, + populators: { + name: "example", + validation: { + required: true, + pattern: /[A-Za-z]/, + }, + }, + }, + ], + }, + ]; + + return { + config: employeeConfig, + defaultConfig: true, // You want to use defaultConfig and you only want to update one field section. The above employeeConfig is also an order for all the field section. So if defaultConfig is false then on browser you will only see those field section who are inside employeeConfig + }; + }, +}; + +const fsmComponents = {}; + +export { fsmCustomizations, fsmComponents }; diff --git a/micro-ui/web/micro-ui-internals/example/src/index.js b/micro-ui/web/micro-ui-internals/example/src/index.js new file mode 100644 index 00000000000..e2946604fc0 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/example/src/index.js @@ -0,0 +1,84 @@ +import React from "react"; +import ReactDOM from "react-dom"; + +import { initLibraries } from "@egovernments/digit-ui-libraries"; +// import { paymentConfigs, PaymentLinks, PaymentModule } from "@egovernments/digit-ui-module-common"; +import { DigitUI } from "@egovernments/digit-ui-module-core"; +import { initDSSComponents } from "@egovernments/digit-ui-module-dss"; +import { initEngagementComponents } from "@egovernments/digit-ui-module-engagement"; +import { initHRMSComponents } from "@egovernments/digit-ui-module-hrms"; +// import { initUtilitiesComponents } from "@egovernments/digit-ui-module-utilities"; +import {initWorkbenchComponents} from "@egovernments/digit-ui-module-workbench"; + +import "@egovernments/digit-ui-css/example/index.css"; + +import { pgrCustomizations } from "./pgr"; +import { UICustomizations } from "./UICustomizations"; + +var Digit = window.Digit || {}; + +const enabledModules = [ "DSS", "HRMS", +"Workbench" +// "Engagement", "NDSS","QuickPayLinks", "Payment", + // "Utilities", +//added to check fsm +// "FSM" +]; + +const initTokens = (stateCode) => { + const userType = window.sessionStorage.getItem("userType") || process.env.REACT_APP_USER_TYPE || "CITIZEN"; + const token = window.localStorage.getItem("token") || process.env[`REACT_APP_${userType}_TOKEN`]; + + const citizenInfo = window.localStorage.getItem("Citizen.user-info"); + + const citizenTenantId = window.localStorage.getItem("Citizen.tenant-id") || stateCode; + + const employeeInfo = window.localStorage.getItem("Employee.user-info"); + const employeeTenantId = window.localStorage.getItem("Employee.tenant-id"); + + const userTypeInfo = userType === "CITIZEN" || userType === "QACT" ? "citizen" : "employee"; + window.Digit.SessionStorage.set("user_type", userTypeInfo); + window.Digit.SessionStorage.set("userType", userTypeInfo); + + if (userType !== "CITIZEN") { + window.Digit.SessionStorage.set("User", { access_token: token, info: userType !== "CITIZEN" ? JSON.parse(employeeInfo) : citizenInfo }); + } else { + // if (!window.Digit.SessionStorage.get("User")?.extraRoleInfo) window.Digit.SessionStorage.set("User", { access_token: token, info: citizenInfo }); + } + + window.Digit.SessionStorage.set("Citizen.tenantId", citizenTenantId); + + if (employeeTenantId && employeeTenantId.length) window.Digit.SessionStorage.set("Employee.tenantId", employeeTenantId); +}; + +const initDigitUI = () => { + window.contextPath = window?.globalConfigs?.getConfig("CONTEXT_PATH") || "digit-ui"; + window.Digit.Customizations = { + PGR: pgrCustomizations, + commonUiConfig: UICustomizations + }; + window?.Digit.ComponentRegistryService.setupRegistry({ + // PaymentModule, + // ...paymentConfigs, + // PaymentLinks, + }); + + initDSSComponents(); + initHRMSComponents(); + initEngagementComponents(); + // initUtilitiesComponents(); + initWorkbenchComponents(); + + + const moduleReducers = (initData) => initData; + + + const stateCode = window?.globalConfigs?.getConfig("STATE_LEVEL_TENANT_ID") || "pb"; + initTokens(stateCode); + + ReactDOM.render(, document.getElementById("root")); +}; + +initLibraries().then(() => { + initDigitUI(); +}); diff --git a/micro-ui/web/micro-ui-internals/example/src/pgr.js b/micro-ui/web/micro-ui-internals/example/src/pgr.js new file mode 100644 index 00000000000..48a498e4582 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/example/src/pgr.js @@ -0,0 +1,15 @@ +import SelectName from "./components/SelectName"; + +// import { config as complaintConfig } from "./complaintConfig"; + +const pgrCustomizations = { + // complaintConfig, + getComplaintDetailsTableRows: ({ id, service, role, t }) => { + return {}; + }, +}; + +const pgrComponents = { + SelectName: SelectName, +}; +export { pgrCustomizations, pgrComponents }; diff --git a/micro-ui/web/micro-ui-internals/example/src/setupProxy.js b/micro-ui/web/micro-ui-internals/example/src/setupProxy.js new file mode 100644 index 00000000000..cf3a6f7c26c --- /dev/null +++ b/micro-ui/web/micro-ui-internals/example/src/setupProxy.js @@ -0,0 +1,87 @@ +const { createProxyMiddleware } = require("http-proxy-middleware"); + +const createProxy = createProxyMiddleware({ + //target: process.env.REACT_APP_PROXY_API || "https://uat.digit.org", + // target: process.env.REACT_APP_PROXY_API || "https://qa.digit.org", + target: process.env.REACT_APP_PROXY_API || "https://works-dev.digit.org", + changeOrigin: true, + secure:false +}); +const assetsProxy = createProxyMiddleware({ + target: process.env.REACT_APP_PROXY_ASSETS || "https://works-dev.digit.org", + changeOrigin: true, + secure:false +}); +const mdmsProxy = createProxyMiddleware({ + target: process.env.REACT_APP_PROXY_ASSETS || "http://localhost:8080", + changeOrigin: true, + secure:false +}); +module.exports = function (app) { + ["/mdms-v2/v2/_create"].forEach((location) => app.use(location, mdmsProxy)); + [ + "/access/v1/actions/mdms", + "/egov-mdms-service", + "/mdms-v2", + "/egov-idgen", + "/egov-location", + "/localization", + "/egov-workflow-v2", + "/pgr-services", + "/filestore", + "/egov-hrms", + "/user-otp", + "/user", + "/fsm", + "/billing-service", + "/collection-services", + "/pdf-service", + "/pg-service", + "/vehicle", + "/vendor", + "/property-services", + "/fsm-calculator/v1/billingSlab/_search", + "/pt-calculator-v2", + "/dashboard-analytics", + "/echallan-services", + "/egov-searcher/bill-genie/mcollectbills/_get", + "/egov-searcher/bill-genie/billswithaddranduser/_get", + "/egov-searcher/bill-genie/waterbills/_get", + "/egov-searcher/bill-genie/seweragebills/_get", + "/egov-pdf/download/UC/mcollect-challan", + "/egov-hrms/employees/_count", + "/tl-services/v1/_create", + "/tl-services/v1/_search", + "/egov-url-shortening/shortener", + "/inbox/v1/_search", + "/inbox/v2/_search", + "/tl-services", + "/tl-calculator", + "/org-services", + "/edcr", + "/bpa-services", + "/noc-services", + "/egov-user-event", + "/egov-document-uploader", + "/egov-pdf", + "/egov-survey-services", + "/ws-services", + "/sw-services", + "/ws-calculator", + "/sw-calculator/", + "/egov-searcher", + "/report", + "/inbox/v1/dss/_search", + "/loi-service", + "/project/v1/", + "/estimate-service", + "/loi-service", + "/works-inbox-service/v2/_search", + "/egov-pdf/download/WORKSESTIMATE/estimatepdf", + "/muster-roll", + "/individual", + "/mdms-v2" + ].forEach((location) => app.use(location, createProxy)); + ["/pb-egov-assets"].forEach((location) => app.use(location, assetsProxy)); + ["/mdms-v2/v2/_create"].forEach((location) => app.use(location, mdmsProxy)); +}; diff --git a/micro-ui/web/micro-ui-internals/package.json b/micro-ui/web/micro-ui-internals/package.json new file mode 100644 index 00000000000..41a1aaecd38 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/package.json @@ -0,0 +1,74 @@ +{ + "name": "egovernments", + "version": "1.0.0", + "main": "index.js", + "workspaces": [ + "packages/libraries", + "example", + "packages/css", + "packages/react-components", + "packages/modules/*" + ], + "author": "JaganKumar ", + "license": "MIT", + "private": true, + "engines": { + "node": ">=14" + }, + "scripts": { + "start": "SKIP_PREFLIGHT_CHECK=true run-s build start:dev", + "sprint": "SKIP_PREFLIGHT_CHECK=true run-s start:script", + "start:dev": "run-p dev:**", + "start:script": "./scripts/create.sh", + "dev:css": "cd packages/css && yarn start", + "publish:css": "cd packages/css && yarn publish --access public", + "dev:libraries": "cd packages/libraries && yarn start", + "dev:components": "cd packages/react-components && yarn start", + "dev:example": "cd example && yarn start", + "dev:core": "cd packages/modules/core && yarn start", + "dev:dss": "cd packages/modules/dss && yarn start", + "dev:hrms": "cd packages/modules/hrms && yarn start", + "devD:common": "cd packages/modules/common && yarn start", + "devD:utilities": "cd packages/modules/utilities && yarn start", + "dev:workbench": "cd packages/modules/workbench && yarn start", + "dev:engagement": "cd packages/modules/engagement && yarn start", + "build": "run-p build:**", + "build:libraries": "cd packages/libraries && yarn build", + "build:components": "cd packages/react-components && yarn build", + "build:svgcomponents": "cd packages/svg-components && yarn build", + "build:dss": "cd packages/modules/dss && yarn build", + "build:core": "cd packages/modules/core && yarn build", + "build:hrms": "cd packages/modules/hrms && yarn build", + "build:common": "cd packages/modules/common && yarn build", + "build:utilities": "cd packages/modules/utilities && yarn build", + "build:engagement": "cd packages/modules/engagement && yarn build", + "build:workbench": "cd packages/modules/workbench && yarn build", + "deploy:jenkins": "./scripts/jenkins.sh", + "clean": "rm -rf node_modules" + }, + "resolutions": { + "**/@babel/runtime": "7.20.1", + "**/babel-preset-react-app": "10.0.0" + }, + "devDependencies": { + "husky": "7.0.4", + "lint-staged": "12.3.7", + "npm-run-all": "4.1.5", + "prettier": "2.1.2" + }, + "husky": {}, + "lint-staged": { + "*.{js,css,md}": "prettier --write" + }, + "dependencies": { + "lodash": "4.17.21", + "microbundle-crl": "0.13.11", + "@egovernments/digit-ui-react-components": "1.8.0-beta.1", + "react": "17.0.2", + "react-dom": "17.0.2", + "react-hook-form": "6.15.8", + "react-i18next": "11.16.2", + "react-query": "3.6.1", + "react-router-dom": "5.3.0" + } +} diff --git a/micro-ui/web/micro-ui-internals/packages/config/index.js b/micro-ui/web/micro-ui-internals/packages/config/index.js new file mode 100644 index 00000000000..87090e08d09 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/config/index.js @@ -0,0 +1,3 @@ +module.exports = { + PORT: "3000", +}; diff --git a/micro-ui/web/micro-ui-internals/packages/config/package.json b/micro-ui/web/micro-ui-internals/packages/config/package.json new file mode 100644 index 00000000000..bb380df1243 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/config/package.json @@ -0,0 +1,6 @@ +{ + "name": "@egovernments/digit-ui-config", + "version": "1.0.1", + "main": "index.js", + "license": "MIT" +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/README.md b/micro-ui/web/micro-ui-internals/packages/css/README.md new file mode 100644 index 00000000000..3749ccd49c4 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/README.md @@ -0,0 +1,78 @@ + + +# digit-ui-css + +## Install + +```bash +npm install --save @egovernments/digit-ui-css +``` + +## Limitation + +```bash +This Package is more specific to DIGIT-UI's can be used across mission's +It is the base css for all Digit UI's +``` + +## Usage + +After adding the dependency make sure you have this dependency in + +```bash +frontend/micro-ui/web/package.json +``` + +```json +"@egovernments/digit-ui-css":"^1.5.0", +``` + +then navigate to App.js + +```bash +frontend/micro-ui/web/public/index.html +``` + +```jsx +/** add this import **/ + + + +``` +# Changelog + +```bash +1.8.0-beta.13 fixed the login text styling issue +1.8.0-beta.1 styles for login dropdown and homepage dropdowns +1.8.0-beta added workbench related css and some new Digit v2 constants based on em +1.7.0 urban 2.9 +1.6.0 urban 2.8 +1.5.41 added styles for login dropdown and homepage dropdowns +1.5.40 aligment issue in edit and logout +1.5.39 updated login scss and alignment issues +1.5.37 updated the readme content +1.5.36 enhanced the formcomposer with header attribute +1.5.35 Fixed the card css issues +1.5.34 Fixed breadcrumb styling issue +1.5.33 fixed some card related css issues due to v2 css +1.5.32 newer css DIGITv2 added and corrected few existing issues +1.5.31 Corrected the CSS for inbox composers and default core ui +1.5.30 Updated the css for dynamic drodown filter dss +1.5.29 layout issues fixed +1.5.28 Horizontal Bar chart alignment fixes +1.5.27 DSS UI alignment fixes for Horizontal Metric and bar chart +1.5.26 added new css class for dss enhancements +1.5.25 added the css of inbox search composers +1.5.24 added the readme file +1.5.23 base version +``` +# Contributors + +[jagankumar-egov] [nipunarora-eGov] [Tulika-eGov] [Ramkrishna-egov] [nabeelmd-eGov] [anil-egov] [vamshikrishnakole-wtt-egov] + +## Published from DIGIT Core +Digit Core Repo (https://github.com/egovernments/Digit-Core/tree/digit-ui-core) + +## License + +MIT © [jagankumar-egov](https://github.com/jagankumar-egov) \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/css/gulpfile.js b/micro-ui/web/micro-ui-internals/packages/css/gulpfile.js new file mode 100644 index 00000000000..74bc884bf13 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/gulpfile.js @@ -0,0 +1,70 @@ +const fs = require("fs"); +const { name, version, author, cssConfig } = JSON.parse(fs.readFileSync("package.json")); + +const headerString = ` +@charset "UTF-8"; +/*! + * ${name} - ${version} + * + * Copyright (c) ${new Date().getFullYear()} ${author} + * + */ + `; +const { series, src, dest, watch, task } = require("gulp"); +const header = require("postcss-header"); + +const clean = require("gulp-clean"); +const postcss = require("gulp-postcss"); +const sass = require("gulp-sass"); +const postcssPresetEnv = require("postcss-preset-env"); +const cleanCSS = require("gulp-clean-css"); +const rename = require("gulp-rename"); +const livereload = require("gulp-livereload"); + +let output = "./example"; +if (process.env.NODE_ENV === "production") { + output = "./dist"; +} + +function cleanStyles() { + return src(`${output}/*.css`, { read: false }).pipe(clean()); +} + +function styles() { + const plugins = [ + require("postcss-import"), + require("tailwindcss"), + postcssPresetEnv({ stage: 2, autoprefixer: { cascade: false }, features: { "custom-properties": true } }), + require("autoprefixer"), + require("cssnano"), + header({ header: headerString }), + ]; + return src("src/index.scss").pipe(postcss(plugins)).pipe(sass()).pipe(dest(output)); +} + +function minify() { + return src(`${output}/index.css`).pipe(cleanCSS()).pipe(rename(`index.min.css`)).pipe(dest(output)); +} + +function stylesLive() { + styles().pipe(livereload({ start: true })); +} + +function livereloadStyles() { + livereload.listen(); + watch("src/**/*.scss", series(stylesLive)); +} + +exports.styles = styles; +exports.default = series(styles); +exports.watch = livereloadStyles; +if (process.env.NODE_ENV === "production") { + exports.build = series(cleanStyles, styles, minify); +} else { + exports.build = series(styles, livereloadStyles); +} + +// gulp.task("watch:styles", function () { +// livereload.listen(); +// gulp.watch("**/*.scss", ["styles"]); +// }); diff --git a/micro-ui/web/micro-ui-internals/packages/css/img/browser-icon.png b/micro-ui/web/micro-ui-internals/packages/css/img/browser-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..32e2488b00e5ca9770bb5485b9d7631bf8705538 GIT binary patch literal 1121 zcmV-n1fKheP)Px(8%ab#R9Fe^S6ygSM--kjcbhfl*IjL)4<%UZOHHx{(TFKA)HLKFFVZB`))-Oj zLlIevib_jfR7^<)5u~N1B+w{PNsDPIskpJRG>NX!NY;|l;vZVn_!GtK=I+k%T)T63 z_U_%EhlRdmUe1~GeRIy4duGnPm$CnOfExeNAy086BK9F-9RV)F{M@0nxxANuS9wyO zI9piQV8E+>(&*l!JPV8|Fp5J&HSyQ)BP4H;tC zk!f&)Prhp&bo6d9baj{skhAwxK-Cec9FLzZi?abF<*PhZ2PW#&xuKg0P@U#kL3Iuo z!?CAPqdgU=cqTe+Bq4^G06puAshsdv93~D;Cn5~NoTpl+Vw}MRb#Caf1Q>iy2PI-9 zL`h${w)tU5YVopYTXaxSHr!2BI!!<5ha4B(ywsVqoW>8MM~_ez_T zuI*!k1g<6gjp8uSjW zUpipNuRJzdf;w(OflH|NH-I}%jjS&pwBu%!KxOBpdcp8G-Qz;l3AO0-VOdW#MKJ9}W9Ax4n$ra&neX`&$xmK(L&Qo)#-Z5^}LD~dzbDh7?slRRpj8i}W@UNw* za8BV*)Shq4xhkm}MmT8Ss5V1So4`QR+s`!M%?XYHW@xo{xW#i`Iz7|$<`a!WGaXG! zdxj7qY#nMTr*c)?0)CWKlJUtojwxc{{M`i)XI!dofq n5_%#xXqPAVtUmjl#8vqM!@pNSmMi>A00000NkvXXu0mjf>1i0J literal 0 HcmV?d00001 diff --git a/micro-ui/web/micro-ui-internals/packages/css/img/m_seva_white_logo.png b/micro-ui/web/micro-ui-internals/packages/css/img/m_seva_white_logo.png new file mode 100644 index 0000000000000000000000000000000000000000..394e483de3afdce3e736232712c02e8ce2bf4975 GIT binary patch literal 10689 zcmdsd_g7Qj6KzN+B2^KQE*~iZ(xo>A5ki%Yv`_@3gbtw-6i}2RL3$GiAYEFJ9;HOO zhE8ZolM;$RC?VnTeSgJU@BT3N+_mmncV^DMXV0413C|3*8Lo3&2LJ#JV4Wu>008i6 z3CO=jePzG%q7AQZlmQxGvujsZ#I+Z1ubv@cW>$eFj)4~=s?#bA4*EfQ6io`LMfWv z{{^7R%E~RJC~AG)kS+Xnj0#}X#`=;|Y$g!^xC;P3d2AMvhhKnYy)e(l9PI5`z>J(8 zv(fXj-Fi%`dpq@^!=qPsU8i>{J)JUl{&4u3XR$xhy5VQX8k|&h7ePr2j2EE)1i$<3 zq2^8cw=7B%Bs_09b(m|LTjf^4b=AYD0yiG!_Qk_sn88B8nCeC(Uo5l6wf|2H#8jS! zQ!TW|ZMN@eS%~z6-YW538&6K~d}Q~Q1><|exzpBL%?9s_ZJDNRg{>G=l+IiHznqRJ zX^VFVn7;d85->q7z%Q$-Nhvh=nAtn^zZ_~%kKIjq4V<{i6P`vvIBi?3?H`I1*SF*~`#&s1(^DI8a+4Ybe}0_Yje{uL8{ z&vZ|Yy>gOzTTbp{5}i-ck@ihzXM2zIZZXw=IYG&1Jre$FUtaD~E8p%rl1W5yRZ5zz%VG=7W`9)5z;mVX02aCe6_Ugrxm)fNOq zlUAQ@GZ~I+moqVT_`DeYxYk=JJtXkoXI3Y#>IbF&=wy<+PCCsGt^5ZCF>`%+-*WDV z=HrXi*=eb-OIb@~{!nu4m+CGYpS_`(m4_Dsj?n~D$^qo43m8?{XOIcZbZ{*+9<7Nc zC0zzrAw88-1FjW?D@jvWMGW>sdYY&8YL?vDbknG&x82562#fM9xjl&1T(0d`DQqIt zLyVA9OEb|=)s0OPGjH6uBbPdMlX<3sQIP8$H)e7I>z5>*Pqok>B<(jSIutQFc1Jz- zr@*Wb;QhKPUS^yo=v1eZq`a%~%<28V*D}d%C%qW~S;PrY8G~WFZ}r24u2Tt9(NEqI z;=M!VysgXF#TPfGZlhon1W+Al1Yi zn%&Ygm+06OpF1%=+;-z?-LG_oY#2em{6?H7R?%FCN?BM86;;Lnx185TN=_%YdBXSX zI!6Sn6TIq}BJPAR?0@7b2l-0)s`@4&O~do`uQ~c_jXJnU?URcwNPn1~NjN%un)&?T z{dCK}Hi6^KOA+_?VJQ;i4_$BO9@Uc^zKMqA>scK>%s7t*av4V3Uhv^%6mFfy;^R>2 zp2W>gLy_1o4PGqpJ|Ulw&kiYhocMm-dm(P)ig~C5K@Eu-_v2i~cE{(8;>Q{G>o=wz zpycZ#1$}RPF|Rw!?hVAgSdK)iqMXMau0;wiU58T#7pPg;$ZyENI9=%z`VQq(krlU| zZW-0F&eihnk~7&w9nYJryQ6g8RBTo?NlNXqD4!_BFn|B|&j7HsW|$wcZeIsFO&^J< zser0lnL_4CDMBU&vGyA`%H(jIGhOLTvp$t)WA;MK8dmmQw2z9!1{t}UB%qXIUjK$# z{!Z3jn!B$a&GVGsD3in)QH@fdHiN{Wr=q@ob!pf59!TIQ9~BpfPK8k0ex3~&j%+%; zRN%DTO6VNDr|-^7L)Zzr2|bTP9){&Vx#k!;D+s9FP&NLN*TyEB`2?2BDQn;m`gPhp zwqk&=9n*56lp@Cff@}rd z;Z&#Y@bj`G*zH&;f%*I3KULuUAk&&3(P!NE(YMsSw>%xY&V8vr0X;anzD$S43U5N- zV&VBusQgZNH3|piC_b~D&+c129}6Y1Zr)j_cD@}^nO(=rBf4uXZ6dydRzX7J90suG z#qQdw5pHz>w5IRzN$|`oAFq>v5v|kUSY|=F528P-=l%?3Ot~$pJR3JGIaaYbpz(AH ztd8n)NDGRbQr&IowvPB$Hcij)H%L#LxT1jm3BSW5)-|=Q^8Mpcgu@|YFE=QPdY<7T zdrj{Z8?y415mf=`A~McTJne{hy^e`5@EM90o*Z&YzQWVRQi*dPBjR0U=8}e_w1v2c zxsN;TFOhXI?wUP&(Ra~*gC2jfrsyf@f*k+$A;_gkYORSA8UYGm?1oKfDn65f1}FiX zqAK{YWyy32%)=QX_+oc|bXj$+t{Oy3LcfH7CzbcDDUKVWriM%QBK4~3xYa^e?!}ie z6tung3X=g)-2CVg`e)erHqTPylkXp0h{g{2`oBl1)$VSRMIL+Yfp(a7fIE+J==E2X zz++X?7T1az8;k%MqYFpuwP)XBic#juDZnSz=e)Jkds#t8-`!erF^Dwzv!$Y#Ink;n z0q;yoP1*XuCKaD4DLO{{?q5d(2ciJ-ySj`_EYSz-GswIlg>s`%P89_1IjuR_?LmV| z`C@`@TA3Oa8V{XT zvMh2Ch%@{@l%=d1nI9VR(Gs5hqh`0@Iv&IS|P?QCX5xl3e`1X zp&(HQc?R;u`&_+MWegK#NmKd3|7t?yYcYH0+Wq>Q=d?0zB)m-6*uCh{)c-|AhX3jw zy;H5~67pc}L%7zXm996xe>FTjP8rSnwsG7=Bxk{pWH%x!nocKoTFzl@E0M}q-B)No zVA&SzY&VF1j#fjXlGLe&y6w$w6c1usl&E_vl(z?ZG~!w8InA(Z^%os z{+{cRdwypNx|J@`!ke=M1lL)Ozc29(nocynm1gES79x#&xHc1Yvw{Xwi(L7LL#R#A zS=*3o32Mx~w7#;EykCo0)NODQl<}XZCOfF-#e%v4+4zk#!xXdGSXsb@Ay(qwi}Z)y zzyhr{^d7Aj(*sf2r7faUHsVOp=3b|~ILI65UD>u#Hr^KI6ty{!+c6;y6L0piP5RM? zmq~g4vsvl)d!wi=(LS`jj?wFeIq}DAK=uE&)FYeZ!pLdKAzyu>W>I4Ra%*3v7=^un zd$ZPiuW05Ox)49k&6+_~Bpu$8-)_kefE%M))SIhDx%baM1*d(yOh1ZC^s{s#>S8^# zSYbLI;k+YeF2q?RhNnF(*(CT6p945d!j>jNdgBS2aJ=eX7}1REl<9TP!K=pj9Gq%3 zzcUr!HkZ{|Ib5DZwiDez3m#)pV(#gO+lbmNY!)9JKR#a|Q7gDRg^G3!ZyGrr3Hw3N z#+`PlLy6xQH&8Q#HI%&P$;o){iJw-y%GjP+6lriX@)C}h?is6lelkN2>EHXEp8e0- zOBthvu<%z`G2NwuS}JKd5%1!rab07=qK~lQ zmGa_T?^iWvp6h-UF$&^JOcvje^CHe%ba!5nCZ|%Wjd}yg5f?qYFH`l00=GA~-&ySz z{jo*(o7gPJM95>o&<5HM5!==6n% z$GmZ&QMAE@g^M$;WyZU;sszdMlM+%v!dq(8_RKm(_3wOPn@XsT2n~!7VJTCU-_y-e08c z0Gd8~sie^PyVpdwpP316r1g5~H&V6n<4x-2Q_&We#F7|I3l1F5(?rLGH}A&%@Lub? zsh(#jD9Q-5xU{V@Wum=$zuS|Tf^>^(O#~EX20rP}vU6;IYJJmZJ3FlKW$R-Eej2#+ zLz0k>P%;5v2;OL>ipAD{DF_khdNWCISyaDs5^n>~)N3oxeNDKeTn1TsKORWPvXoTd zAMAfO^Nw|%!t4>0IX+YT(|)w1+mZ*2PTRIiO0&;RSn=(*qHls2G6NN_^XN{U1xI^v z7T{=Nj~{9w`xZa;!N++r1V-To&XMLU_lmxG+QJx1=H92txU{hY6#%@ZPETxkfWhfU zI9G^6ILmT7(!byQf;}V&$!n3=coV0cYN1d$h;7CaBCzjz%?=I0c6PtF_Gr;kmODxB zOxd~SQ_o)>+C{wM__%iM)NFm&drx!atLO<@Deha5T}4WhTySJyR&mx4xG@}M#?1mR z;Gjm;S-)8zsG-xJOItq&SK6oQTiU1X|{F)-4L;;AI9}FSsRW68+^Lm z5TOnNT~%g1*R@M!S}ja0c_Bx8l*?J7_K&{B-2!bJ%i+dcxr7%|r?u5E;6|HvW}fi1 zsJA}P=v5LLlE$rWPQ*I|hVTTq!H_2NTY>Jt{c9DCOH{~!A*QrNQ$f7%LSZ1%mnE!m zX_W$NTLfGtSMyVG0H)j#a zse$##Z2`OK)2ma7tc6`iYsYv8Binfu?6C0<X?P3bhS_F!UA~p4&!~Nj$ZZqPXo{?YWh1;jZ1eoRig9nvzLcdO zL_hXWw3#%lCKu0CI{#=imco?s&7qUx^9AG#6y3r^<;h@+?2^})FG zH1AmGExGL+avp#SwzhHqU4Dh7D#f@J3U*+a+;yQik`&ojo{FkcK{04i+}d0DQ5F38 zc6FT!kV|}161?QIPL<>~vUm5`a<3^DZmAOnk%2sLuRwypla#nTsNu^6uE+fO26GOR z?jYnj6QqeW-k(g2@|6rtz8J|ga~CK*C^)x|x1AFn4YZE;bNkROh~8y)dT_VqKi7Mk z>KuNV6`)H{2d#oW7RMhc)}yeI7FF0|?kwAJ-!!l6Xo+(9>(I$7X^8t+1LNy))QeB3 zb3twl`K8=cRf8(~bGhJ}3ycay_-+b1*JfdW{_dtSS{vRs+ZZYy9+Nr+o9=(@+dgOmT!}7hE-{4S6^hS&zIdK7X_EB8rLYxl}(U zhDK%;=uWjPobB}ZTyp5N-)pc7T@HoJy+@RymQsby*6wACo=Q~K-EKbYT(gRtX~-{r zk`}@k>aiCspqZGiqeM5OhxN;U+x_Y=2IBTsW{8l%{^wz-x)5Mw_p48a-klus!{m0S zNo9GOkjI3`RB^|bQ>Gz%F6Q$4M{@=UH3XkwEz|LV?y?y;U62joErf^uaI~xRnF~uq zj>pIZ^m%@Jh;3L^L`6HbZ}~M@bO>oC+UV$Y&+44}-}7e0p$>9*DWYo>#L*b(UbqUU z%;m)2@Siu5NC0jjceNpP|CiH&(ox>khL;8aU3++d+B@i%qKQMxL-Y2a7ds8H&p{G4 zBsM~GMkYxJs{o30OSW3MFu}S>_qC;}cK)&sQOUa%Q~x(HP(Jx*KzvpcCK=*c(C@f>063C6cc~{ zq;8UP0fB#jdBE2lTlurxoSYwsodL6z^CFwOi3k1!gVTGP#rbha8XfcTa|>tFW%gCo zwwcNrcq24=i4e^Fwp(m6B~vW*=$LCje|Z|sz-kZq*?;{FlIdCGJ$#tiQfHxaz&dM^ z-I3=z@4a6Y)t7>REi>qU6jigN+4_2liD|ZUb1Mz9GU3etjKe{#BG1z>-%5J4@<72s zd{ew7laad1lPKE?oEvS9{tv@F8_Tb%A;M>?)sEq;tGwDy9#nbDp$1L@dH!oyX;SbR z-|MS@5+8&i@3A@2BF)v+IiDZh&A;D^1pbuxN3;8`6x||&iFg|Un}z8O22sPZGl;1t z8Y_SQc*fX-=MBol_{e#D-}u71zeDfmJ;dy6&Qo!E&fqonawSMHc*IA~1G128X%Y$C zr}=lp^j9d-QY#?n{0q0QAG;QwbwZ}j`!>j-?);if#Wwo`#^Qodf%4CfjfebV%h`A` zJ`%+b?U#+r_ITAal*pMj$%j*Rzy9V&Jub1o7y=u3g{{57jUmjAk(jgr(}J@ydMS%i zkDwu;v?z$4b;QD$jwr;u>bx_(X|vfqX`~RJ=V0|~65*fs@<*+4SZHVe<^07TYO~W`MZdiTJ>>4KVmv zrSMu)hrA9}1K0BGDkaj^du$Edp-T8j5zRzhukN>IuIKE?#k(H!`I`qKj+x4^(k@k>p&jF|xTiaCGSO-=5%v$BXT;Y~%f zkh@=kd%iJ_ogoEK&w6}3h@DE=Vq@uAEG|a^258w`5IeP z%xstOS4ag6&u%E#l6jlo(cKdHRGngcTgd<4`&=85g2pkwk6lt@GtPSTMt>&Q*2N>n z4Q8$11V1WI{&wt>yK`ITTyisYN*&aV|F{1djo}#{GpF1QAE(mAs&Z+b>Za0h9Ke0C~N(`#9l6j<&v+(bKcSA8CwTL^?ZkBO6(%XyEcNN%Gw8 z%}Tb(F#J{*nvh%3C4J}yhE(5i7C@=%I`z989y$j~Aolc2C9I&5N{~}D@ z42d+fkf62~>bjg5VNG=&P~LC{$(wRrPi$v#6~ zDsb-i=dNl#_3!9nd!`|H)FQr^4we)$aF*|uNizM7<&n*7g+ssN`l1im}Q&do2j>&v#a&P$zdG6@TBrM>q|drgRUkebQ>T_gyY< z{-{h_z^|(}uOMe}*`3SS>NQytubI{6&8Lc4`0SKd<}nINvEXvcu7MZ2yqi4Xw|hyX zsI)C=2d1k%3y{C`>&uW?fQOF6z0Qym>zd$@7)F#qjRUi7 zV_Z#YjJ5I7@das5v~+yu*WQ@=X+zZRCpL|$+aGoxR2c%Ob1&M6@a|`wF+)QGU(dYW zol5U-Ua#YgPK0_o9A2+i`gQ7N$x_{lh4f(usvOrNXa=8)vb5a=+f^HAX55LAvicuL`%T=XD z!MAF>i_SPsJn6xOMRNnM9^+`_$en}n8gLvx>623;>zdL@^!VvWa`sN1qCKXM(&47^ zRqhPeo*m$we3zdgDN-^jCVCpwhaQq!^i0KTOsh6|&HU#K*?9H`7GLma1ap4ac->Or z--C$KE^va3L+enZB#zI6`FQ3Oqr6Hpwg)joA{|lEiW!%B*je)YoO|SgsT4&Px|Xfu z#n|`bfOpo=On+q81y!`Ht-Qz`jywxuOTL84vP}MvbajPSbT2`D&O3PAwj4^~mB%*< zu{oVncHi__jCD=D>^L>s??&t7)``LGI4?cnsk%#B4hA4mou~q+@ zLHX4e;T8E7oE#xJn7JKYkNa=7Z~2}wZgk(*X2O374i)viy|0SHoG7th)tR%Qq^jFp z1R8V?d;k1G@T6|A>4*_Hh+?jJN4$NI@~Go_9X@{ETx&!L0HCG#pBBK40MR)QmoDw4 zbf9Xt{c^dfRfJcyt`}&1d{dU8!!7gu$&$;l#I@g2JxB&E34odhQ39pzNSsw2+~Cgs z^DuH=7n|OMa+1u>UR8gyIL*JH7eJLMcu0vOn(41pu|k%>|6Mh5j<1N{Pm1D>Tjn9t z9Mi`dXoa4PBy^d*^03WTs>j-m*(zn?cqbE8*AUr(-+(#$;sW3s>u)Ff%c>L=`>9a% zk*;M{&_*0D7YiEg>9d9c^g&NM9MH^ctLbV%GE2*Pi@ihlibScDHdIc z>eBt5Ie1Mdgg%d!Ybr@fK}Dkmkg&|3+~|g8^+gOa@n*SkHJnZt>%?x)Zk{wd$EQy`54Z>^X^0*lZx^1 z7|s|X7_(3Q{xzW+X^d-6%Xk9gJQ;I+Pk6X8)&xo20aJPU%T>E$;*d+x%0db`c-)s_o2xm_e4{}NMagPtbkscIHKJ>L@V%Fho;7>8 zXFOM!h#+8vewZukIYc@`wHB(I+0M)Y|H*A5M}DMqcyWJIGa!~V*?3k?k|FEyahXI~ z>vQZGzT+8|6%|e2A>yp2{DDB#apUwAa;$}=mtcWD)Zs*<1XOM8)on6Z!C_4Ye}5OY zDR|ka58a-B8b<%Y8MsfmtcQZ71s-j6%@D@HLnI$6vRcon>J`iQVci^sfUkQKM=6;c z)30L@-gWe*elmqfOI%lO2c|k6j)#v!3k~OFFKtYWP7@|{U|6G<7mb!e($+!375x74 zf`UvsZJ*OXI!YMA#(?~DJ0^uef-$n8ujNYwL)@#T^CnJFm~P%bC!l2VyV1NqA0GWR z;-=-%h$a>x^`v{x?o`NWl}Jae6w+lf75IEy`oc1-01H2JJEvNm)r4q<(g9-SN{^m zSCu;p@bb|F&t&T?=*`dW+Z4PR4`&f!L;Rg|FFhr`&FNzYR+ZJ{vpJPJFS-+vhc9a? zU&to`T65`x^z{M#Qf<$hJ6Hf$s*QsmueKL`{gNwP`Se-cbhdiSrl+ypykyb?jC0mN zB8B>v!$m?w%g~DKHYfT<6C}2x>MCACS1NqLogb=hGLU9{m`oFZ4>! zT3;mosKl@r@;b=>vbP7(X6^kPO9NJAIv*%SEMgT75GDCR|2wtwwjsd-(6UqST3t8? z^T#!bRAQ&p(`$+!(O@)DS@A7W9pH11b%u82jB1jDvSx6N`(3*d@8++sEUn3FRjyGe z%Y>%?1OcL1(LdvOAB;3}d?u6_^9|Pf|H?X>xd4e5NRP#8Kt3NU#mGINwintA0hi?S z=wp5Oxv3-GMNIx~D-vRG=3g*q(+Scr5)Vd*gOnPu6U7jnumU7z&`wY3y;*cg-Ib%j zWA}S+CNWzlO~m_;;yzE?(Wv>ad}E6i^$B(q+uybq`dR!wrjtLi9S71=x)~w^J>syU zBQd$RL>W%&waEnxm&wX0jNW5y+lmv_seub&PYOx@qZ0#(wjH(m5J+8klvL-_aUl>T z$Nl?u$vO3{)4YKP!ucZ)tBaC>$z|4h)81d{6b!Kxi1ibZgr~yOns8H{a;Ec1n0vQc zv|KBDE!DHVy9Yu5M^5(FDUxcEz|Ck06ab&0-GBB-b5iWl^ zyIjts&lyoI1&$0EE^P%3D(kXlE`=;>wYFuNr&nd`2^DCwA=@_1*WOB{+AamGbwdzQ zR2L=qATZ}r@ZI#Hh4|fIzV@V}Z?INmU7+852Kbx}r~N@L0sq7Unp>6qOlFs|R=~WP z=tN_)g1VYQdrACfR8p+WZ~WjSP_no6k+GVTrYgYRIoryIOFHPvGv@AM<$?Zc3p6^>?& zdyP`qjsDJ>#PQlJKT82+*H5^|3A2GuVp8x;= literal 0 HcmV?d00001 diff --git a/micro-ui/web/micro-ui-internals/packages/css/img/mseva-demo.png b/micro-ui/web/micro-ui-internals/packages/css/img/mseva-demo.png new file mode 100644 index 0000000000000000000000000000000000000000..50a5251726345fd23f691a1cf1cb7feede260e83 GIT binary patch literal 2460 zcmV;N31jw&P)004R>004l5008;`004mK004C`008P>0026e000+ooVrmw00002 zVoOIv0RM-N%)bBt00(qQO+^Rf2?q!t4}vi3O8@`}q)9|URA@u(nQ4$z)fqs~?b!tf zn8|=3D!VH#At-@h)W}vEvl&BynpC1hjj<|0gBvlJpmB>>QNaQ=Mg&32s8wN6mMEg4 zr4p1ywy_WtS)4(by}M6-^qZa@7#ty3`lC-*SHJsh_ucQ^?cIhfS+Zowk|j%)EC-7P z_H51O%OcjA!PlBLoZFhomqjiZqYp{e1p(|#83M2+eEPY*`^7*{x{|{#)`!a0tp5+f zSNPyP%)4FVYHzm?9O~1oU-CD$Y0cwcvD7PDv-#3+ zto5qa`9t%3&7_SaoY9*1zBt%&8`4n{);Qh6Tk|?NzRJYqaxQrQnn zNbb+IC2YrC976zhQcEd?6mk*oaz|^PhXxDz8@-n$N)z91jsW4B{M0D54jaF@vY<-kQt7k;@d0<44FW z<^=r%J4h|@@+S8-ni*pRU0KV28O4e0W>J_2cHyTSOErs`lUiChmKg8^_tOBBQ_gc7 zPkY)^5k)$ip>$ve^TQGVOE`~0-VDprb)CQ<8kiThf&~m`5XDsR3NMCwS|`S*jOJsC zC}Rv`nCb-sLW9t+&<+Z?^y(V71jQGC%Uj@n2S3?GUicnO0e6y>;&K5sPWY zzH^*yeAlgZ0x)Kwe>d*0GxRZgI>62ulJ<52bL{0AmPN9j4%oM++RH&6YtvK~iSzuW z_xSzj`cm)q2N~L8*V~*LH)oXM4gv5|RkwPX9oYwO-7CgTU|W}~b)FH~oZxPCy`{!{ zd@uVy?-g%j#st8k>D+=#vPs37Q0T>5539jERPzp#hV=)X&wczyW1k&CTDnsCpSGI zds(5zebxy+YeL;=?{sa^^5G4t-Us%!LDfax>RglRCcn|_o?A^EIM;;z0Q{yq-Qta2 z?PB%%NIy&c%&A`O{noh4Wv=uF$NGjkF|z66YLia&N*}br5A2;;;o7Ld&s*U8(e<3P zK9#t-s7H>7vVS3f=UAgIOAR(Jx7H@A{kLaFF|JXQPKZjAR2>VRYL&Xm!@&ZVsr8-- zc66NMy~;uW=c)}3B!e%MxM}K8FwZ$wMJa6S+vx#4Q@t^=y;a?8R{*GG&ecd6Gz zHkYc8q`QNKz7sWdrg`b>+3D(2iTfb6I$Gvt^`q2qw1XSe4YrMJhd9?No2YgSfKRH` zUgl7TJH&A&)mdP!3)H0NgWtAZU6x8#6t9OrcD$?9q{GPI3nlJO^#ZWJNvEf!*Qg@^ zoMqCJBIz)7O4??*J8TD*`k|{+YXF$*GAlhg8tI|diQGqfHgRuga3YiFz$WgYIaSmE zP)8N8n>`t&G~q=Tay$bW%(v)9Aw}Ho%V7;i0EJ8;00IFhg%Ecp=MWg_97d7{%nr3+ zj2>LhP`qIoDI^Az(V1sLs^x^ZZ*w|F z<~CY|r(H{TR)lg0PrHV0tPJHeCqV*$I0+z0vY8YxpBTwd&q`J@)s771PxPdO@3AIT z4br$bOh#XLk*##*yBx<5;8RjlL?33;mn3m&s3MPc954osB1r{s7;qFNQR)+{OW#Km zA^J9!Qnqc$p)$j&0w_)=4#Emnq^^vyk&mf1gadiP8sk^=WUEuc9)Pfo>2~KFGJlB@ zBM|>Q#|(B-OP7pX9EohpNL&WTaR+^Po$L9yMSaUiK38!Pu*XM9QQ#{H2x=Lr<>J4(1cQ~>4Fb2{f0YN%Ist}PG=HV zu$ZX;tYJ21@mo9E!7|41PfF7sdv9tRr2!!9;z7!|#Um`S6F1V6so|5BdfZ_&Zt;%K zkTws#_iWHun#ypFrUN%pPl5tsKm+r56?m1`_zwM;Nd@gF0xH=a1*r5nP6SB3Y611U z$8oghVJc}yAqjHW`z~4{K|3Z>M=4!_d5nvujRq&ug9(ga9bGt^*U}#G^lT>$8Ih7C zqgn281~Qtyyia%fGoQ&Vp8!|$CbcA}PR&5+FqvIDNjx1EBuLrNv>dYXza;^HT;Yz6mceYJfGOBluse`nI~VCP)dw?wuNSUJTR9dDWaB-_CD({ zkD{iSk*pn^2y6=##%M#bc{EG8C`=~HfpRcC?ojd7{n>FSNHm`EWjP?s`SSh<%915Z zmMmGaWcix&KR&LSnF>P{KmY&$C3HntbYx+4WjbSWWnpw>05UK#FfA}SEigA!FgQ9h zF*-3dD=;uRFfg5$@-YAa03~!qSaf7zbY(hiZ)9m^c>ppnGB7PLIV~_ZR4_O?Gch_b aH7hVMIxsNo%1Vs@0000", + "engines": { + "node": ">=14" + }, + "cssConfig": { + "prefix": "" + }, + "scripts": { + "start": "gulp build", + "build:prod": "NODE_ENV=production gulp build", + "prepublish": "yarn build:prod", + "deploy": "gulp && cp -R svg example && cp -R img example && gh-pages -d example" + }, + "browserslist": [ + "> 3%", + "last 2 versions" + ], + "style": "./dist/index.css", + "dependencies": { + "node-sass": "^4.14.1", + "normalize.css": "^8.0.1", + "postcss-scss": "^3.0.1", + "tailwindcss": "^1.8.10" + }, + "devDependencies": { + "autoprefixer": "^10.0.0", + "cssnano": "^4.1.10", + "gh-pages": "^3.1.0", + "gulp": "^4.0.2", + "gulp-clean": "^0.4.0", + "gulp-clean-css": "^4.3.0", + "gulp-livereload": "^4.0.2", + "gulp-postcss": "^9.0.0", + "gulp-rename": "^2.0.0", + "gulp-sass": "^4.1.0", + "postcss": "^8.0.9", + "postcss-cli": "^8.0.0", + "postcss-header": "^2.0.0", + "postcss-import": "^12.0.1", + "postcss-prefixer": "^2.1.2", + "postcss-preset-env": "^6.7.0", + "postcss-scss": "^3.0.1", + "sass": "^1.26.11" + }, + "files": [ + "dist/index.min.css", + "dist/index.css", + "svg/**/*.svg", + "img/**/*.png", + "src/**/*.scss", + "src/**/*.css" + ], + "keywords": [ + "digit", + "egov", + "dpg", + "digit-ui", + "css" + ] +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/postcss.config.js b/micro-ui/web/micro-ui-internals/packages/css/postcss.config.js new file mode 100644 index 00000000000..18485de221e --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/postcss.config.js @@ -0,0 +1,55 @@ +const postcssPresetEnv = require("postcss-preset-env"); + +module.exports = { + parser: require("postcss-scss"), + plugins: [ + require("postcss-import"), + require("postcss-nested").default, + require("tailwindcss"), + require("postcss-preset-env"), + require("autoprefixer"), + // require("cssnano"), + ], +}; + +// const fs = require('fs'); +// const { name, version, author, cssConfig } = JSON.parse(fs.readFileSync('package.json')); + +// const header = ` +// @charset "UTF-8"; +// /*! +// * ${name} - ${version} +// * +// * Copyright (c) ${new Date().getFullYear()} ${author.name} +// */ +// `; + +// module.exports = (ctx) => { +// const prefix = ctx.env === 'compat' ? '' : cssConfig.prefix; +// const devMessage = `🎉🎉🎉🎉 \n${name} ${ctx.env} build was compiled sucessfully! \n`; + + +// return { +// map: ctx.options.map, +// parser: ctx.options.parser, +// plugins: { +// 'postcss-import': { root: ctx.file.dirname }, +// 'postcss-prefixer': { +// prefix, +// ignore: [/\[class\*=.*\]/], +// }, +// 'postcss-preset-env': { +// autoprefixer: { +// cascade: false, +// }, +// features: { +// 'custom-properties': true, +// }, +// }, +// cssnano: ctx.env === 'production' || ctx.env === 'compat' ? {} : false, +// 'postcss-header': { +// header, +// }, +// }, +// }; +// }; diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/CardBasedOptions.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/CardBasedOptions.scss new file mode 100644 index 00000000000..f2607b04638 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/CardBasedOptions.scss @@ -0,0 +1,46 @@ +.CardBasedOptions { + box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.16); + @apply bg-white mb-md px-sm py-md mx-sm rounded w-full; + .headContent { + @apply flex justify-between mb-lg; + h2 { + @apply text-heading-s font-bold text-text-primary; + } + p { + @apply text-link text-primary-main font-medium cursor-pointer; + } + } + + .mainContent { + @apply flex justify-evenly; + .CardBasedOptionsMainChildOption { + width: 25%; + @apply text-center; + .ChildOptionImageWrapper { + margin: auto !important; + background: rgba(244, 119, 56, 0.12); + mix-blend-mode: normal; + padding-top: 14px; + @apply h-12 w-12 rounded-full cursor-pointer; + svg { + height: 20px; + width: 20px; + fill: theme(colors.primary.main); + margin: auto; + } + } + .ChildOptionName { + font-size: 12px; + line-height: 14px; + padding-top: 1rem; + } + } + } +} + +@screen dt { + .CardBasedOptions { + width: calc(50% - 16px); + @apply p-md; + } +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/CitizenHomeCard.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/CitizenHomeCard.scss new file mode 100644 index 00000000000..45df9551f19 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/CitizenHomeCard.scss @@ -0,0 +1,56 @@ +.CitizenHomeCard { + @apply bg-white mx-md p-md mb-lg; + + .header { + @apply flex font-bold text-heading-l text-text-primary justify-between pb-sm; + + svg { + width: 33px; + height: 33px; + } + } + + .links { + @apply text-heading-s text-primary-main; + + a { + @apply block pb-sm; + } + } +} + +@screen dt { + .citizenAllServiceGrid { + display: flex; + flex-direction: column; + justify-content: center; + flex: 1; + } + + .CitizenHomeCard { + @apply p-lg; + .header { + @apply pb-lg text-heading-l-dt; + svg { + @apply w-12 h-12; + } + } + + .links { + @apply grid grid-cols-4 gap-px; + .linksWrapper { + height: 25px; + margin-bottom: 0.5em; + } + a { + @apply pb-md; + padding-left: 0.2em; + margin-bottom: 16px; + width: 100%; + overflow: hidden; + text-overflow: ellipsis; + min-width: 0; + } + } + } +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/EllipsisMenu.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/EllipsisMenu.scss new file mode 100644 index 00000000000..0eb243a266d --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/EllipsisMenu.scss @@ -0,0 +1,17 @@ +.ellipsis-menu-wrap{ + @apply relative; + + .menu{ + box-shadow: 0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 2px rgba(0, 0, 0, 0.12), 0 5px 5px -3px rgba(0, 0, 0, 0.2); + @apply absolute right-0 bg-white z-30; + .item{ + @apply flex items-center justify-between p-sm; + &:hover{ + @apply bg-grey-mid cursor-pointer; + } + svg { + margin-right: 10px; + } + } + } +} \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/EventCalendarView.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/EventCalendarView.scss new file mode 100644 index 00000000000..58e6d3f8a56 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/EventCalendarView.scss @@ -0,0 +1,10 @@ +.EventCalendarView{ + .MonthViewInEventCalendar{ + @apply bg-primary-main text-legend text-white font-medium text-center py-sm; + } + + .DateViewInEventCalendar{ + @apply bg-grey-mid text-heading-l font-bold text-primary-main text-center py-md; + } + +} \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/FAQ.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/FAQ.scss new file mode 100644 index 00000000000..48b65688f56 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/FAQ.scss @@ -0,0 +1,64 @@ +.searchInputFAQs { + @apply mr-lg; + margin-bottom: 10px; + input{ + margin-bottom: 0; + background: border-box; + @apply pr-xl; + } + } + +.faq-page{ + width: 92%; + margin: 16px; +} + +.faqs{ + cursor: pointer; + .faq-question{ + font-weight: 400; + margin: 16px; + background: #fff; + justify-content: space-between; + display: flex; + font-size: 16px; + } + + .faqicon{ + float: right; + } + + .faq-answer{ + background: #fff; + overflow: hidden; + margin: 5px; + @apply text-form-field text-text-secondary mb-sm; + + span { + display: block; + font-size: 14px; + font-weight: 400; + margin: 0px 12px 5px + } + } + .cs-box-border { + height: 1px; + position: relative; + border-bottom: 1px solid lightgray;; + background: lightgray; + margin-left: 16px; + margin-right: 16px; + } +} + +.faq-list{ + background: #fff; + margin: 5px 0; + padding-top: 4px; + padding-bottom: 4px; +} + +.rotate { + transform: rotate(90deg); +} + \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/OnGroundEventCard.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/OnGroundEventCard.scss new file mode 100644 index 00000000000..13468a645cc --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/OnGroundEventCard.scss @@ -0,0 +1,72 @@ +.OnGroundEventCard{ + box-shadow: 0px 1px 2px 0px #00000029; + @apply bg-white mx-sm mb-md p-md cursor-pointer; + + .EventCalendarView{ + width: 100px; + @apply inline-block mr-md; + } + + .EventDetails{ + width: calc( 100% - 116px ); + @apply inline-block align-top; + + h2{ + @apply text-caption-m font-bold mb-md text-text-primary; + } + + .EventLocation{ + @apply flex mb-md; + svg{ + @apply h-4 w-4; + } + p{ + @apply text-body-s text-text-primary ml-sm; + } + } + + .EventTime{ + @apply flex ; + svg{ + @apply h-4 w-4; + } + p{ + @apply text-body-s text-text-primary ml-sm; + } + } + + .EventCategory{ + p{ + @apply text-body-s text-text-primary ; + } + } + + } + + +} + +@screen dt{ + .OnGroundEventCard{ + .EventDetails{ + .EventLocation{ + p{ + @apply text-body-s-dt; + } + } + + .EventTime{ + p{ + @apply text-body-s-dt; + } + } + + .EventCategory{ + p{ + @apply text-body-s-dt; + } + } + + } + } +} \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/PageBasedInput.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/PageBasedInput.scss new file mode 100644 index 00000000000..b2ba959698a --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/PageBasedInput.scss @@ -0,0 +1,29 @@ +.PageBasedInputWrapper { + .SubmitBar { + z-index: 60; + @apply p-sm fixed w-full bottom-0 left-0 text-right bg-white; + } + .SubmitBarInCardInDesktopView { + @apply hidden; + } + label { + margin-left: 0 !important; + } +} + +@screen dt { + .PageBasedInputWrapper { + .SubmitBar { + @apply hidden; + } + .SubmitBarInCardInDesktopView { + @apply block; + } + .card { + max-width: 960px; + } + button { + max-width: 240px; + } + } +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/PopupHeadingLabel.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/PopupHeadingLabel.scss new file mode 100644 index 00000000000..c8e80a5ed18 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/PopupHeadingLabel.scss @@ -0,0 +1,15 @@ +.popupModalHeading{ + @apply flex gap-3 mb-lg; + .headingIconAndLabel{ + @apply flex gap-3 items-center; + svg{ + @apply w-6 h-4; + } + h3{ + @apply text-heading-l font-bold; + } + } + .popupResetFormButton{ + @apply p-sm border border-solid border-text-primary border-opacity-25 self-center; + } +} \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/PropertySearchForm.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/PropertySearchForm.scss new file mode 100644 index 00000000000..47f1f00cd7c --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/PropertySearchForm.scss @@ -0,0 +1,58 @@ +.PropertySearchForm { + .pt-search-action { + @apply w-full; + display: flex; + margin-right: 10px; + justify-content: end; + align-items: center; + .pt-search-action-submit button { + width: 100% !important; + } + .pt-search-action-reset { + text-align: right; + cursor: pointer; + } + } + + .PropertySearchFormSwitcher{ + border-bottom: 1px solid theme(colors.border); + cursor: pointer; + margin-bottom: 20px; + display: flex; + .non-selected { + color: theme(colors.text.secondary); + font-weight: 400; + } + .selected { + color: theme(colors.primary.main); + font-weight: 700; + padding-bottom: 10px; + border-bottom: 2px solid theme(colors.primary.main); + } + span { + margin-right: 20px; + } + } + + + .form-field { + width: 30% !important; + margin-bottom: 20px; + } + @media (min-width: 780px) { + .pt-form-field{ + width: 30% !important; + margin-bottom: 20px; + } + } + @media (max-width: 780px) { + .form-field{ + width: 100% !important; + margin-bottom: 15px; + } + .pt-form-field{ + width: 100% !important; + margin-bottom: 15px; + } + } +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/SearchForm.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/SearchForm.scss new file mode 100644 index 00000000000..41f3b212648 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/SearchForm.scss @@ -0,0 +1,56 @@ +.search-form-wrapper{ + @apply flex flex-wrap justify-between bg-white mb-lg py-lg pl-lg; + .form-field{ + width: calc( 25% - 16px ); + @apply inline-block mr-md align-middle; + } + .SubmitAndClearAllContainer{ + @apply w-full; + .submit{ + right: 36px; + margin-top: 22px; + margin-left: -16px !important; + @apply flex flex-row-reverse items-center w-full align-middle text-center !important; + button{ + margin: 0; + @apply inline-block w-1/4 !important; + } + p{ + @apply cursor-pointer text-link text-focus w-1/4 inline-block ; + } + } + } + .submit{ + right: 36px; + margin-top: 22px; + @apply inline align-middle text-center !important; + button{ + margin: 0; + @apply inline-block w-full !important; + } + p{ + @apply cursor-pointer text-link text-focus w-full inline-block ; + } + } + .pt-property-search{ + justify-content: unset; + } + +} + +@media (min-width: 780px) { + .search-form-wrapper{ + .pt-form-field{ + width: 30% !important; + margin-bottom: 20px; + } + } + } + @media (max-width: 780px) { + .search-form-wrapper{ + .pt-form-field{ + width: 100% !important; + margin-bottom: 15px; + } + } +} \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/SearchOnRadioButton.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/SearchOnRadioButton.scss new file mode 100644 index 00000000000..1f9e2e597aa --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/SearchOnRadioButton.scss @@ -0,0 +1,10 @@ +.SearchOnRadioButton{ + svg{ + fill: theme(colors.text.secondary); + width: 24px; + height: 24px; + top: 8px; + right: 8px; + @apply absolute; + } +} \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/StandaloneSearchBar.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/StandaloneSearchBar.scss new file mode 100644 index 00000000000..69dd018a42d --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/StandaloneSearchBar.scss @@ -0,0 +1,10 @@ +.StandaloneSearchBar{ + @apply bg-white flex rounded-3xl px-md py-sm w-full; + svg{ + fill: theme(colors.text.secondary); + @apply mr-md; + } + input{ + @apply w-full mr-md outline-none; + } +} \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/TimeLine.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/TimeLine.scss new file mode 100644 index 00000000000..8547f22f5cf --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/TimeLine.scss @@ -0,0 +1,68 @@ +.timeline-container { + @apply flex; + margin: 0px 8px 15px; + .timeline-checkpoint { + @apply relative flex-1; + z-index: 1; + } + + .timeline-content { + @apply flex flex-col items-center; + + span { + text-align: center; + color: white; + } + + .secondary-color { + color: theme(colors.text.primary); + padding: 5px; + font-size: small; + } + } + + .line { + @apply absolute; + top: 12px; + left: calc(50% + 8px); + right: calc(-50% + 8px); + border-top: 4px solid theme(colors.border); + z-index: -1; + } + + .circle { + width: 24px; + height: 24px; + background-color: #B1B4B6; + border-radius: 50%; + text-align: center; + } + + .active { + background-color: theme(colors.primary.main); + border-color: theme(colors.primary.main); + } +} + +.TLComments{ + max-width: 360px; + @apply mb-sm p-sm bg-grey-light; + h3{ + @apply font-bold text-caption-m; + } + p{ + @apply text-body-l; + } +} + +@screen dt{ + .TLComments{ + width: 360px; + h3{ + @apply text-caption-m-dt; + } + p{ + @apply text-body-l-dt; + } + } +} \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/WhatsNewCard.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/WhatsNewCard.scss new file mode 100644 index 00000000000..395b2fc4401 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/WhatsNewCard.scss @@ -0,0 +1,13 @@ +.WhatsNewCard{ + box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.16); + @apply rounded bg-white border-primary-main border-l-4 border-solid p-sm; + h2{ + @apply text-body-l text-text-primary font-medium mb-xs; + } + p{ + @apply text-form-field text-text-secondary mb-sm; + } + a{ + @apply block text-form-field text-primary-main mb-sm + } +} \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/actionLink.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/actionLink.scss new file mode 100644 index 00000000000..46a1f449ae1 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/actionLink.scss @@ -0,0 +1,3 @@ +.action-link { + @apply text-primary-main text-text-btn mr-lg !important; +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/actionbar.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/actionbar.scss new file mode 100644 index 00000000000..18c905c20d2 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/actionbar.scss @@ -0,0 +1,97 @@ +.action-bar-wrap { + box-shadow: rgba(0, 0, 0, 0.16) 0 -2px 8px; + max-width: 480px; + z-index: 100; + + @apply left-0 bottom-0 w-full bg-white py-sm px-sm fixed text-right; + + div { + @apply w-full; + } + .menu-wrap { + @apply absolute bg-white text-left mb-xs z-30 cursor-pointer; + bottom: 45px; + box-shadow: rgba(0, 0, 0, 0.14) 0 8px 10px 1px, rgba(0, 0, 0, 0.12) 0 3px 14px 2px, rgba(0, 0, 0, 0.2) 0 5px 5px -3px; + width: calc(100% - 16px); + right: 8px; + + div { + @apply h-12 pl-sm py-md text-body-l text-text-primary; + + &:hover { + @apply bg-grey-mid w-full; + } + } + } +} + +@screen dt { + .action-bar-wrap { + box-shadow: rgba(0, 0, 0, 0.16) 0 -2px 8px; + left: 0; + max-width: none; + z-index: 999; + + @apply fixed bottom-0 bg-white py-sm pr-lg text-right; + + div { + width: calc(100% - 16px); + } + + .menu-wrap { + bottom: 45px; + top: unset; + box-shadow: rgba(0, 0, 0, 0.14) 0 8px 10px 1px, rgba(0, 0, 0, 0.12) 0 3px 14px 2px, rgba(0, 0, 0, 0.2) 0 5px 5px -3px; + @apply absolute h-auto bg-white text-left mb-xs z-30; + width: 240px; + right: 24px; + + div { + @apply h-12 pl-sm py-md text-body-l text-text-primary; + + &:hover { + @apply bg-grey-mid w-full; + } + } + } + } +} + +.action-bar-wrap-registry { + + div { + @apply w-full; + } + .menu-wrap { + @apply absolute bg-white text-left mb-xs z-30 cursor-pointer; + box-shadow: rgba(0, 0, 0, 0.14) 0 8px 10px 1px, rgba(0, 0, 0, 0.12) 0 3px 14px 2px, rgba(0, 0, 0, 0.2) 0 5px 5px -3px; + width: 160px; + right: 60px; + + div { + @apply h-12 pl-sm py-md text-body-l text-text-primary; + + &:hover { + @apply bg-grey-mid w-full; + } + } + } + + .search-add { + padding: 12px 16px; + color: rgb(244, 119, 56); + display: flex; + cursor: pointer; + } + + .search-add-icon { + background: rgb(244, 119, 56); + border-radius: 50%; + height: 24px; + width: 24px; + display: flex; + justify-content: center; + align-items: center; + margin-left: 10px; + } +} \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/bannercomponents.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/bannercomponents.scss new file mode 100644 index 00000000000..0433dc0c320 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/bannercomponents.scss @@ -0,0 +1,136 @@ +.success-wrap, +.emp-success-wrap { + @apply block bg-success w-full text-center text-white pt-md pb-sm mb-md; + + header { + @apply block mb-sm font-rc font-bold text-heading-xl; + } + + div { + img { + padding: 13.67px; + margin-left: auto; + margin-right: auto; + @apply border border-solid border-white rounded-full h-16 w-16 bg-white mb-md; + } + + svg { + padding: 13.67px; + margin-left: auto; + margin-right: auto; + @apply border border-solid border-white rounded-full h-16 w-16 bg-white mb-md; + } + + svg.payment-svg { + border: unset; + background-color: unset; + @apply rounded-full; + } + + h2 { + @apply font-bold text-caption-m mb-sm; + } + + p { + @apply font-bold text-caption-l; + } + } +} + +.error-wrap, +.emp-error-wrap { + @apply block bg-error w-full text-center text-white pt-md pb-sm mb-md; + + header { + @apply block mb-sm font-rc font-bold text-heading-xl; + } + + img { + margin-left: auto; + margin-right: auto; + padding: 13.67px; + @apply border border-solid border-white rounded-full bg-white h-16 w-16 mb-md; + } + + svg { + margin-left: auto; + margin-right: auto; + padding: 13.67px; + @apply border border-solid border-white rounded-full bg-white h-16 w-16 mb-md; + } +} + +@screen dt { + .success-wrap { + header { + @apply text-heading-xl-dt; + } + } + .emp-success-wrap { + width: calc(100%); + header { + @apply text-heading-xl-dt; + } + } + + .error-wrap { + width: 100%; + header { + @apply text-heading-xl-dt; + } + } + + .emp-error-wrap { + width: calc(100%); + header { + @apply text-heading-xl-dt; + } + } +} + +.photos-wrap { + max-width: 640px; + @apply flex pt-md; + + img { + width: calc(33% - 9.333px); + margin-right: 14px; + } + + svg { + width: calc(33% - 9.333px); + margin-right: 14px; + } + + .last { + width: calc(33% - 9.333px); + } +} + +.banner { + @apply flex justify-center items-center; + height: calc(100vh - 80px); + background: linear-gradient(rgba(11, 75, 102, 0.8), rgba(11, 75, 102, 0.8)), var(--banner-url) center center; + + .bannerCard { + min-width: 400px; + } + .bannerLogo { + width: 80px; + height: 40px; + object-fit: contain; + padding-right: 10px; + margin-right: 10px; + border-right: 1px solid theme(colors.text.primary); + } + .bannerHeader { + @apply flex justify-center items-center; + margin-bottom: 24px; + } +} + +.banner-container { + flex-direction: column; + justify-content: center; + align-items: center !important; +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/body.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/body.scss new file mode 100644 index 00000000000..8965c861f45 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/body.scss @@ -0,0 +1,144 @@ +body { + @apply bg-grey-bg; +} + +.body-container { + @apply bg-grey-bg h-full min-h-screen overflow-x-hidden; +} + +.navbar { + @apply text-white bg-secondary p-md w-full mb-md; + img { + height: 24px; + } +} +/* .navbar-header{ + @apply text-navbarheader float-left px-sm +} + +.navbar-subheader{ + @apply font-light px-sm border-solid border-l border-white border-opacity-100 +}*/ + +.h1 { + @apply text-heading-l text-text-primary font-bold mb-md ml-md; +} + +.link-label { + @apply block text-link text-primary-main mb-md ml-md cursor-pointer; + + &:hover { + @apply text-primary-main; + } +} + +.back-btn { + width: fit-content; + @apply block border-solid border-b border-text-primary font-rc text-text-primary text-text-btn ml-sm mt-md; + + label { + @apply inline mr-sm align-middle; + } + + p { + @apply inline float-right; + } +} + +.bread-crumb { + font-size: 14px; + color: theme(colors.text.secondary); + display: flex; + margin-bottom: 10px; + list-style: none; + padding: 0; +} +.bread-crumb--item { + margin-left: 5px; + + &:not(:last-child):after { + content: " /"; + } + + button { + outline: none; + } + + .last { + color: theme(colors.text.primary); + } +} + +.back-btn2 { + cursor: pointer; + width: fit-content; + @apply flex border-solid border-b border-text-primary font-rc text-text-primary text-text-btn ml-sm mb-md; + + img { + @apply flex; + } + + svg { + @apply flex; + } + + p { + @apply flex; + } +} + +@screen dt { + .employee-app-container { + @apply w-full; + } + + .app-container { + width: 100%; + form { + .card { + max-width: 960px; + h2 { + text-align: left; + } + .field-container { + max-width: 540px; + } + button { + max-width: 240px; + } + .input-otp-wrap, + .card-text-button { + text-align: left; + } + } + } + } + + .h1 { + margin-left: 0; + @apply text-heading-l-dt; + } + + .link-label { + margin-left: 0; + } + + .back-btn { + margin-left: 0; + } + + .back-btn2 { + margin-left: 0; + } +} + +.body-container::-webkit-scrollbar { + display: none; +} +.audit-card { + width: 80%; + margin-left: -21%; + margin-right: -27%; + max-height: 120px; + margin-top: 90px; +} \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/buttons.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/buttons.scss new file mode 100644 index 00000000000..14312a25052 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/buttons.scss @@ -0,0 +1,101 @@ +.selector-button-primary { + @apply h-8 bg-primary-main text-center border-b-2 border-input-border border-solid outline-none px-lg; + + &:focus { + @apply outline-none; + } + + h2 { + @apply font-rc font-medium text-legend text-white; + } +} + +.selector-button-border { + @apply h-8 bg-border text-center border-b-2 border-input-border border-solid outline-none px-lg; + + &:focus { + @apply outline-none; + } + + h2 { + @apply font-rc font-medium text-legend text-text-primary; + } +} + +.input-mirror-selector-button{ + @apply h-16 bg-border text-center border-b-2 border-input-border border-solid outline-none px-lg !important; + + &:focus { + @apply outline-none; + } + + h2 { + @apply font-rc font-medium text-legend text-text-primary; + } +} + +.selector-button-primary-disabled { + @apply h-8 bg-primary-main text-center border-b-2 border-input-border border-solid outline-none px-lg opacity-50; + + &:focus { + @apply outline-none; + } + + h2 { + @apply font-rc font-medium text-legend text-white; + } +} +.submit-bar:focus { + @apply outline-none !important; +} + +.jk-digit-secondary-btn { + width: auto; + height: 40px; + background: theme(colors.white); + border: 1px solid theme(colors.primary.main); + padding: 12px; + color: theme(colors.primary.main); + display: flex; + align-items: center; + font-size: 19px; + cursor: pointer; + svg { + margin: 0 10px; + } +} +.jk-digit-primary-btn { + width: auto; + height: 40px; + background: theme(colors.primary.main); + border: 1px solid theme(colors.primary.main); + padding: 6px; + color: theme(colors.white); + display: flex; + align-items: center; + cursor: pointer; + font-size: 19px; + box-shadow: inset 0 -2px 0 #0b0c0c; + svg { + margin: 0 15px; + } +} + +.jk-digit-disabled-btn { + opacity: 0.5; + font-size: 19px; + cursor: not-allowed; +} + +.jk-header-btn-wrapper { + display: flex; + justify-content: space-between; +} + +/* for mobile view */ +@media (max-width: 780px) { + .jk-header-btn-wrapper { + flex-flow: column; + margin-bottom: 15px; + } +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/card.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/card.scss new file mode 100644 index 00000000000..16d6c352cab --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/card.scss @@ -0,0 +1,391 @@ +.card { + @apply bg-white m-sm px-md pt-md pb-lg shadow-card; + border-radius: 4px; + max-width: 960px; + + .card-header { + @apply text-text-primary text-heading-xl font-bold font-rc align-middle text-left mb-md; + } + + .card-sub-header { + @apply text-text-primary text-caption-xl font-bold align-middle text-left mb-sm; + } + + .card-caption { + @apply text-text-secondary text-caption-xl mb-sm; + } + + .card-text { + @apply text-text-secondary text-body-l align-middle text-left mb-lg; + + span { + @apply text-text-primary; + } + } + + .card-text-primary { + @apply text-text-primary text-body-l; + } + + .card-text-button { + @apply text-primary-main text-text-btn; + } + + .card-label { + @apply text-legend text-text-primary mb-sm; + } + + .card-label-error { + @apply block text-body-s text-error mb-md; + } + + .card-label-desc { + @apply font-bold text-text-secondary text-heading-s mb-md; + } + + .card-link { + @apply block text-center text-link text-primary-main mt-md cursor-pointer; + } +} + +.validation-error { + @apply block text-body-s text-error; +} + +.docsDescription { + color: theme(colors.text.primary) !important; +} + +.field-container { + @apply flex items-center; + /*@apply flex justify-center items-center;*/ +} + +.employeeCard { + @apply bg-white shadow-card p-md mb-xl; + border-radius: 4px; + + .card-header { + @apply text-text-primary text-heading-xl font-bold font-rc align-middle text-left mb-md; + } + + .card-sub-header, + .employee-card-sub-header { + @apply text-text-primary text-caption-xl font-bold align-middle text-left; + } + + .card-section-header { + @apply text-text-primary text-heading-m font-bold; + } + + .card-section-sub-text{ + @apply text-text-primary text-body-s; + } + + .card-caption { + @apply text-text-secondary text-caption-xl mb-sm; + } + + .card-text { + @apply text-text-secondary text-body-l align-middle text-left mb-lg; + + span { + @apply text-text-primary; + } + } + + .card-text-primary { + @apply text-text-primary text-body-l; + } + + .card-text-button { + @apply text-primary-main text-text-btn; + } + + .card-label { + @apply text-legend text-text-primary mb-md; + } + + .card-label-error { + @apply block text-body-s text-error mb-md; + } + + .card-label-desc { + @apply font-bold text-text-secondary text-heading-s mb-md; + } + + .card-link { + @apply block text-center text-link text-link-normal mt-md; + } + + .card-search-heading { + margin-right: 0px !important; + margin-left: 0px !important; + margin-bottom: 0px !important; + padding-bottom: 0px; + padding-left: 25px; + } +} + +.header-wrap { + @apply flex mb-md; + + .header-start { + margin-right: auto; + } + + .header-content { + margin-top: 0.2rem; + } + + .header-end { + margin-left: auto; + } +} + +.card-emp { + @extend .card; + padding-right: 0; + padding-top: 0; + padding-left: 0; + @apply bg-white m-sm; +} + +.submit-bar { + @apply h-10 bg-primary-main text-center w-full outline-none; + box-shadow: inset 0px -2px 0px theme(colors.text.primary); + cursor: pointer; + &:focus { + @apply outline-none; + } + + header { + @apply font-rc font-medium text-legend text-white leading-10; + } +} + +.submit-bar-disabled { + @apply h-10 bg-primary-main text-center w-full outline-none opacity-50; + + &:focus { + @apply outline-none; + } + + header { + @apply font-rc font-medium text-legend text-white leading-10; + } +} + +@screen dt { + .submit-bar, + .submit-bar-disabled { + width: 240px; + } + + .card { + display: flex; + flex-direction: column; + + .card-header { + @apply text-heading-xl-dt; + } + + .card-sub-header { + @apply text-heading-l-dt; + } + + .card-caption { + @apply text-caption-xl-dt; + } + + .card-text, + .card-text-primary { + @apply text-body-l-dt; + } + + .card-link { + @apply text-left; + } + } + + .employeeCard { + /* TODO need to revisit that we need mx-md NABEEL/ANIL + @apply mb-md mx-md !important; + */ + @apply mb-md !important; + &.filter { + margin-left: auto; + margin-right: auto; + } + + .card-header { + @apply text-heading-xl-dt; + } + + .card-sub-header { + @apply text-heading-l-dt; + } + + .employee-card-sub-header { + margin-bottom: 40px; + @apply text-heading-l-dt; + } + + .card-section-header { + margin-bottom: 40px; + @apply text-heading-m-dt; + } + + .card-section-sub-text{ + @apply text-text-primary text-body-s-dt; + } + + .card-search-heading { + margin-right: 0px !important; + margin-left: 0px !important; + margin-bottom: 0px !important; + padding-bottom: 0px; + padding-left: 25px; + } + + .card-caption { + @apply text-caption-xl-dt; + } + + .card-text, + .card-text-primary { + @apply text-body-l-dt; + } + + .card-link { + @apply text-left; + } + + .label-field-pair { + @apply flex items-center; + + h2 { + width: 30%; + } + + .field { + width: 50%; + margin-right: 20%; + .field { + margin-right: unset; + } + } + } + + .field-container { + span { + border: 2px solid black; + background: rgb(247, 247, 247); + width: 40px; + height: 40px; + display: flex; + justify-content: center; + align-items: center; + margin-top: -16px; + border-right: none; + } + } + } + + .header-wrap { + @apply flex mb-md; + + .header-start { + margin-right: auto; + } + + .header-content { + } + + .header-end { + margin-left: auto; + } + } +} + +.card-section-header { + @apply text-text-primary text-heading-m font-bold; +} + +.card-search-heading { + margin-right: 0px !important; + margin-left: 0px !important; + margin-bottom: 0px !important; + padding-bottom: 0px; + padding-left: 25px; +} + +.button-sub-text { + width: 100%; +} + +.home-page-info-banner-wrap { + margin: "0px 16px 24px 16px"; +} + +@media (min-width: 780px) { + .button-sub-text { + width: 240px; + } + .home-page-info-banner-wrap { + max-width: 45%; + min-width: 40%; + margin-left: 0; + margin-right: 24px; + margin-bottom: 24px; + } + .info-banner-wrap-citizen-override { + } + .oc-aknowledgement-screen { + width: auto; + min-width: 240px; + max-width: 100%; + padding: 0px 10px; + } +} + +.card-label-error { + @apply block text-body-s text-error mb-md; +} + +.employeeCard-override { + margin-left: 0px !important; +} + +.BPAemployeeCard { + margin-left: 0px !important; + margin-right: 0px !important; + margin-bottom: 64px !important; +} + +.employee-application-details { + display: flex !important; + justify-content: space-between !important; + max-height: 60px !important; + height: 60px !important; +} +.employee-main-application-details { + padding: 10px !important; +} + +.employee-mulitlink-main-div { + z-index: 10 !important; + max-width: 41% !important; +} + +.employee-download-btn-className { + position: unset !important; + display: flex !important; + justify-content: flex-end !important; +} + +.employee-options-btn-className { + position: unset !important; + margin: 0 !important; + width: 100% !important; +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/cardHeaderWithOptions.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/cardHeaderWithOptions.scss new file mode 100644 index 00000000000..a19f1dc164a --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/cardHeaderWithOptions.scss @@ -0,0 +1,14 @@ +.cardHeaderWithOptions{ + @apply flex flex-row justify-between; + .multilinkWrapper{ + @apply relative; + .multilink-labelWrap{ + position: unset; + @apply flex z-10 items-center align-middle text-center m-md; + } + .multilink-optionWrap{ + top: 32px; + right: 0%; + } + } +} \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/changeLanguage.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/changeLanguage.scss new file mode 100644 index 00000000000..f030a38e809 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/changeLanguage.scss @@ -0,0 +1,3 @@ +.language-title { + margin-bottom: "5px"; +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/charts.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/charts.scss new file mode 100644 index 00000000000..e7d398886f6 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/charts.scss @@ -0,0 +1,186 @@ +.chartHeader { + display: flex; + flex-direction: row; + justify-content: space-between; + + .sideContent { + @apply flex justify-around items-center ; + + } +} + +.searchInput { + @apply mr-lg; + input{ + margin-bottom: 0; + @apply pr-xl; + } +} + +.signature-img{ + top: 8px; + right: 8px; + fill: theme(colors.text.secondary); + @apply absolute; +} + +.column-direction { + flex-direction: column; +} + +.chart-wrapper { + padding: 0 10px; + margin-top: 60px; +} + +.chart-row { + @apply flex justify-between flex-wrap; + .chart-item { + flex-grow: 1; + margin-bottom: 15px; + width: 100%; + + &:last-child { + margin-right: 0px; + } + } +} + +.cursorPointer { + @apply cursor-pointer; +} + +.options { + @apply flex justify-between items-center; + div { + display: none; + } +} + +.options-m { + width: 95%; + margin: 0 auto 15px; + @apply flex justify-between; + + svg { + margin-right: 10px; + } +} + +.options-m { + div { + @apply flex; + } +} +.no-data { + @apply flex justify-center items-center; + height: 90%; + margin-bottom: 40px; + white-space:pre; +} + +@screen dt { + .chart-wrapper { + padding-left: 15px; + margin-top: 10px; + + .chart-item { + margin-right: 25px !important; + margin-bottom: 25px !important; + margin-left: 0 !important; + width: 31%; + } + } + .column-direction { + flex-direction: row; + } + .options-m { + display: none; + } + + .options { + div { + @apply flex cursor-pointer; + } + } +} + +.showMore { + @apply text-right cursor-pointer; + color: theme(colors.primary.main); +} + +@media (max-width: 420px) { + .recharts-default-tooltip { + width: 85%; + ul { + width: 100% !important; + } + ul li { + width: 100%; + display: flex !important; + flex-wrap: wrap; + } + } +} + + +@media print{ + .page-break { + margin-top: 1rem; + display: block; + page-break-before: auto; + } + .chart-wrapper { + @media print{ + .chart-row { + @media print{ + @apply flex justify-between flex-wrap; + .chart-item { + @media print{ + flex-grow: 1; + margin-right: 25px; + margin-bottom: 25px; + width: 31%; + + &:last-child { + margin-right: 0px; + } + .chartHeader { + display: flex; + justify-content: space-between; + + .sideContent { + @apply flex justify-around items-center ; + + .searchInput { + @apply mr-lg; + input{ + margin-bottom: 0; + @apply pr-xl; + } + } + + .signature-img{ + top: 8px; + right: 8px; + fill: theme(colors.text.secondary); + @apply absolute; + } + } + } + } + } + } + } + + .options { + @apply flex justify-end; + } + + .options-m { + display: none; + } + } +} +} \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/checkbox.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/checkbox.scss new file mode 100644 index 00000000000..b805530f4d7 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/checkbox.scss @@ -0,0 +1,53 @@ +.checkbox-wrap { + @apply flex mb-md relative items-baseline; + + input { + width: 38px; + height: 38px; + @apply opacity-0 absolute top-0 left-0 z-10; + } + + .input-emp { + @extend input; + width: 24px; + height: 24px; + } + + .custom-checkbox { + width: 38px; + height: 38px; + @apply absolute top-0 left-0 border border-solid border-input-border z-0; + + img { + @apply opacity-0; + } + + svg { + @apply opacity-0; + } + } + + .custom-checkbox-emp { + @extend .custom-checkbox; + width: 24px; + height: 24px; + } + + input:checked ~ .custom-checkbox, + input:hover ~ .custom-checkbox { + @apply border-2 border-primary-main; + } + + input:checked ~ .custom-checkbox img { + @apply opacity-100; + } + + input:checked ~ .custom-checkbox svg { + @apply opacity-100; + } + + .label { + margin-left: 56px; + @apply text-form-field text-text-primary; + } +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/checkpoint.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/checkpoint.scss new file mode 100644 index 00000000000..6d0e3fc7262 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/checkpoint.scss @@ -0,0 +1,63 @@ +.checkpoint-connect-wrap { + padding-bottom: 40px; + @apply relative; +} +.checkpoint-done { + @apply flex; + + h2 { + width: 24px; + height: 24px; + border-radius: 50%; + @apply border-b border-solid border-primary-main bg-primary-main; + } + + header { + @apply text-heading-s ml-md; + + p { + margin-top: 4px; + @apply text-heading-s text-text-secondary; + } + } +} + +.checkpoint { + @apply flex; + + h2 { + width: 24px; + height: 24px; + border-radius: 50%; + --text-opacity: 1; + @apply border-b border-solid border-border bg-border; + } + + header { + @apply text-heading-s ml-md; + + p { + margin-top: 4px; + @apply text-heading-s text-text-secondary; + } + } +} + +.checkpoint-connect { + margin-left: 12px; + margin-top: 22px; + @apply absolute top-0 left-0 h-full border-l border-solid border-border; +} + +.checkpoint-comments-wrap { + max-width: 560px; + @apply bg-grey-mid p-sm mt-sm; + + h4{ + @apply text-text-primary text-heading-s; + } + + p{ + @apply text-text-secondary text-body-s-dt; + } +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/citizenInfoLabel.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/citizenInfoLabel.scss new file mode 100644 index 00000000000..bbb1ce45220 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/citizenInfoLabel.scss @@ -0,0 +1,14 @@ +.citizen-info-label { + @apply p-sm border-4 border-solid border-link-normal text-heading-m m-sm; + max-width: 960px; + + p { + @apply text-link-normal font-bold mt-xs text-heading-s; + } +} + +@screen dt { + .citizen-info-label { + margin: 0; + } +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/custombtn.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/custombtn.scss new file mode 100644 index 00000000000..82b369ab798 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/custombtn.scss @@ -0,0 +1,11 @@ +.customBtn { + @apply bg-white text-text-primary box-border inline-block outline-none px-sm border border-solid border-primary-main; + margin: 0px 4.65% 0px 0px; + height: 30px; + line-height: 30px; +} + +.customBtn-selected { + @extend .customBtn; + @apply bg-primary-main text-white font-medium; +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/datatable.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/datatable.scss new file mode 100644 index 00000000000..b2756a61e96 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/datatable.scss @@ -0,0 +1,134 @@ +.data-table { + @apply text-text-primary; + + .row { + @apply flex border-b border-border pb-sm mb-sm; + + span { + width: 70%; + display: contents; + } + + h2 { + width: 40%; + @apply font-bold text-heading-s; + } + + .value { + width: 50%; + @apply text-heading-s; + word-break: break-all; + } + .caption { + width: 70%; + @apply text-heading-s text-text-secondary; + } + } + + .last { + border: none; + padding: 0; + margin: 0; + } +} + +.employee-data-table { + .row { + @apply flex pb-sm mb-sm; + + span { + width: 70%; + display: contents; + } + + h2 { + width: 30%; + @apply font-bold text-heading-s; + } + + .value { + width: 50%; + @apply text-heading-s; + white-space: break-spaces !important; + word-break: break-all; + } + + .caption { + width: 70%; + @apply text-heading-s text-text-secondary; + } + } + + .last { + border: none; + padding: 0; + margin: 0; + } +} + +.employee-data-table { + .row { + @apply flex pb-sm mb-sm; + + span { + width: 70%; + display: contents; + } + + h2 { + width: 30%; + @apply font-medium text-heading-s; + } + + .value { + white-space: break-spaces !important; + word-break: break-all; + width: 60%; + @apply text-heading-s; + &.status-row-radio { + div { + margin-right: 1rem; + width: 50%; + } + .mg-sm { + width: 30%; + } + } + } + + .caption { + width: 70%; + @apply text-heading-s text-text-secondary; + } + } + + .last { + border: none; + padding: 0; + margin: 0; + } + &.status-radio-table { + margin-top: 1rem; + .row { + span { + width: 24px; + display: block; + float: left; + border-radius: 50%; + } + } + } + + &.view-header { + .row { + display: grid; + grid-template-columns: 1fr 68%; + } + } +} + + +.pt-citizen {.data-table {.row { + justify-content: space-between; + +}}} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/datewrap.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/datewrap.scss new file mode 100644 index 00000000000..1f3c8897774 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/datewrap.scss @@ -0,0 +1,21 @@ +.date-wrap { + @apply flex mb-md; + + img, + svg { + height: 22px; + width: 20px; + } + + p { + @apply text-text-primary text-body-l pl-sm; + } +} + +@screen dt { + .date-wrap { + p { + @apply text-body-l-dt; + } + } +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/detailscard.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/detailscard.scss new file mode 100644 index 00000000000..cfbc83a99e3 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/detailscard.scss @@ -0,0 +1,6 @@ +.details-card { + @apply bg-white m-sm px-sm pt-sm pb-lg shadow-card; + .card-label { + @apply font-bold text-legend text-text-primary mb-md; + } +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/detailscontainer.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/detailscontainer.scss new file mode 100644 index 00000000000..fa3ab70b9d5 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/detailscontainer.scss @@ -0,0 +1,13 @@ +.details-container { + @apply flex flex-col m-sm pt-md pb-md pl-sm pr-sm bg-white rounded; + .detail { + @apply grid grid-cols-2 gap-2 items-baseline; + .label { + width: 138px; + @apply font-bold text-heading-s text-text-primary mb-md; + } + .name { + @apply pt-md; + } + } +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/filters.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/filters.scss new file mode 100644 index 00000000000..dd4b6634b19 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/filters.scss @@ -0,0 +1,98 @@ +.filters-wrapper { + display: none; + padding: 20px 0px 0px; + z-index: 1; + + .filters-input { + flex-basis: 22%; + } + + .filters-input:not(:first-of-type) { + margin-left: 5%; + } + + .switch-wrapper { + display: flex; + justify-content: space-between; + max-width: 200px; + + .radio-switch { + display: none; + + &:checked ~ label { + border-color: theme(colors.primary.main); + color: theme(colors.primary.main); + } + } + + label { + border: 1px solid; + padding: 6px 10px; + display: block; + @apply border border-solid border-input-border; + &:hover{ + @apply border-2 border-solid border-primary-main; + } + } + } +} + +.pickerShadow { + box-shadow: 0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 2px rgba(0, 0, 0, 0.12), 0 5px 5px -3px rgba(0, 0, 0, 0.2); +} + +.filter-close { + @apply flex justify-end; +} + +.filter-header { + @apply flex; + + p { + font-weight: bold; + font-size: 24px; + line-height: 1; + margin: 0 12px 20px 8px; + } +} + +.clearText { + display: none; +} + +@screen dt { + .filters-wrapper { + display: flex; + } + + .filter-close, + .filter-header { + display: none; + } + + .clearText { + display: block; + text-align: right; + color: theme(colors.primary.main); + margin-top: 20px; + margin-left: 10px; + } +} + +@media (max-width: 780px) { + .filters-modal { + display: block; + position: fixed; + width: 100%; + height: 100vh; + left: 0; + top: 130px; + padding: 16px; + background-color: #fff; + z-index: 99; + } + + .rdrDefinedRangesWrapper { + display: none; + } +} \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/grey.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/grey.scss new file mode 100644 index 00000000000..eec759d99fe --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/grey.scss @@ -0,0 +1,3 @@ +.grey { + @apply text-text-secondary; +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/hoc/InboxComposer.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/hoc/InboxComposer.scss new file mode 100644 index 00000000000..98bacf62f21 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/hoc/InboxComposer.scss @@ -0,0 +1,115 @@ +.InboxComposerWrapper { + .form-field-flex-one { + .form-field { + @apply flex-1; + } + } +} + +.inboxPopupMobileWrapper { + @apply block p-md w-full overflow-scroll; + .submit { + @apply flex left-0 w-full px-xl items-center flex-row-reverse !important; + } + .form-field { + margin: 0 !important; + @apply w-full; + } + .InboxMobilePopupCloseButtonWrapper { + @apply flex flex-row-reverse; + } +} + +@screen dt { + .InboxComposerWrapper { + grid-template-columns: calc(25% - 32px) 75%; + @apply grid gap-x-8 gap-y-6; + } + + .wns-inbox-composer { + .filter-form { + height: fit-content; + } + + .wns-search-field { + width: 30% !important; + .field-container { + } + } + .form-field { + width: 100% !important; + } + + .SubmitAndClearAllContainer { + width: 100%; + display: flex; + justify-content: end; + align-items: center; + .clear-search { + width: 30%; + display: inline-block; + vertical-align: middle; + text-align: right; + cursor: pointer; + p { + padding: 1rem; + color: rgb(244, 119, 56); + text-align: end; + } + } + .submit { + width: 30% !important; + margin-left: unset !important; + button { + width: 100% !important; + } + } + } + } + + .search-form-wns-inbox { + .clear-search-container { + grid-column: 2/3; + text-align: right; + .clear-search { + width: 100%; + color: rgb(244, 119, 56); + } + } + button { + width: 100%; + } + + .filter-form { + height: fit-content; + } + + .search-complaint-container { + flex-direction: column; + align-items: flex-start; + --bg-opacity: 1; + background-color: #fff; + background-color: rgba(255, 255, 255, var(--bg-opacity)); + padding: 16px; + display: unset; + flex-wrap: unset; + justify-content: unset; + margin-bottom: 0; + .complaint-input-container { + display: grid; + grid-template-columns: 33.33% 33.33% 33.33%; + } + .form-field { + width: 100%; + padding-right: 15px; + .clear-search { + padding-top: 10px; + } + } + } + .submit { + margin-top: 0; + right: 0; + } + } +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/hoc/index.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/hoc/index.scss new file mode 100644 index 00000000000..d651ce49346 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/hoc/index.scss @@ -0,0 +1 @@ +@import "./InboxComposer.scss" \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/howItWorks.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/howItWorks.scss new file mode 100644 index 00000000000..c77a82b2b1a --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/howItWorks.scss @@ -0,0 +1,71 @@ +.how-it-works-page{ + width: 92%; + margin: 16px; + .how-it-works-page-header{ + margin-bottom: 15px; + } +} + +.video-icon{ + float: left; + background-color: #6F6F6F; + height: 60px; + width: 100px; + cursor: pointer; + margin: 5px; + + .vid-svg{ + padding-left: 35px; + padding-top: 18px; + } +} + +.how-it-works-header-description{ + padding: 5px; + overflow-wrap: break-word; + h2{ + font-size: 16px; + font-weight: 400; + } + p{ + font-size: 12px; + font-weight: 400; + } +} + +.how-it-works-pdf-section{ + display: flex; + justify-content: space-between; + .pdf-icon-header-desc{ + float: left; + .pdf-icon{ + display: inline-block; + } + .pdf-header-desc{ + display: inline-block; + position: absolute; + padding: 5px; + overflow-wrap: break-word; + h2{ + font-size: 16px; + font-weight: 400; + } + p{ + font-size: 12px; + font-weight: 400; + } + } + } + .download-icon{ + float: right; + } +} + +.how-it-works-video-play{ + display: inline-block; + .close-button{ + float: right; + cursor: pointer; + } +} + diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/imageviewer.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/imageviewer.scss new file mode 100644 index 00000000000..1f0568f8d01 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/imageviewer.scss @@ -0,0 +1,33 @@ +.image-viewer-wrap { + @apply bg-text-primary p-md top-0 left-0 z-20 fixed w-full h-full; + + svg { + top: 90px; + right: 16px; + @apply absolute h-6 w-6; + } + + img { + margin-top: 40%; + @apply max-w-full h-auto; + } +} + +@screen dt { + .image-viewer-wrap { + @apply flex fixed top-0 left-0 w-full h-full z-20 bg-text-primary p-md; + + svg { + top: 90px; + right: 16px; + @apply absolute h-6 w-6; + } + + img { + width: auto; + height: auto; + max-width: 640px; + margin: auto; + } + } +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/inboxv2/InboxLinks.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/inboxv2/InboxLinks.scss new file mode 100644 index 00000000000..7549fe0b3d9 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/inboxv2/InboxLinks.scss @@ -0,0 +1,59 @@ +@import url("../../digitv2/index.scss"); + +.inbox-search-links-container { + @extend .light-paper-primary; + height: 100%; + width: 100% !important; + display: flex; + flex-direction: column; + padding: 1rem; + .header { + @extend .light-text-color-primary; + display: grid; + grid-template-columns: 20% 1fr; + .logo { + display: flex; + align-items: center; + justify-content: flex-start; + .inbox-search-icon--projects { + fill : #f47738; + height: 2rem; + width: 2rem; + } + } + .text { + @extend .light-text-color-primary; + line-height: 32px; + font-weight: 700; + color : black; + display: flex; + align-items: center; + justify-content: flex-start; + } + + @media (min-width: 1024px) { + .text { + font-size: 24px; + } + } + + @media (max-width: 1024px) { + .text { + font-size: 20px; + } + } + } + .contents { + margin-top: 1rem; + box-sizing: border-box; + display: flex; + flex-direction: column; + .link { + @extend .light-primary; + padding: 8px; + --text-opacity: 1; + color: #f47738; + color: rgba(244, 119, 56, var(--text-opacity)); + } + } +} \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/inboxv2/horizontalNav.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/inboxv2/horizontalNav.scss new file mode 100644 index 00000000000..13fd228d181 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/inboxv2/horizontalNav.scss @@ -0,0 +1,224 @@ +@import url("../../digitv2/index.scss"); + +.horizontal-nav { + @extend .light-paper-primary; + @extend .light-text-color-primary; + overflow: auto; + display: flex; + margin-top: 3rem; + + .menu-item { + border: 10px; + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); + cursor: pointer; + text-decoration: none; + margin: 0px; + padding: 0px; + outline: none; + font-size: 16px; + position: relative; + color: rgb(95, 92, 98); + line-height: 48px; + transition: all 450ms cubic-bezier(0.23, 1, 0.32, 1) 0ms; + min-height: 48px; + white-space: initial; + background: none; + + .icon { + @extend .light-background; + display: block; + color: rgb(117, 117, 117); + fill: rgb(117, 117, 117); + height: 21px !important; + width: 21px !important; + float: left; + margin-top: 12px; + } + + .edit-btn-ico { + height: 17px; + width: 17px; + margin-top: 16px; + } + + .icon+.menu-label { + margin-left: 36px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + } + + @media (min-width: 780px) { + .sidebar-list { + padding-right: 30px; + padding-left: 30px; + background-color: #EEEEEE; + border: 1px solid #DDDDDD; + border-radius: 8px 8px 0px 0px; + + &.active { + font-weight: 600; + border-bottom: 3px solid theme(colors.primary.main); + + background-color: #FFFFFF; + + .menu-label { + color: theme(colors.primary.main); + } + + .icon { + fill: theme(colors.primary.main); + } + } + + .submenu-container { + cursor: pointer; + display: flex; + flex-direction: column; + + .sidebar-link { + display: flex; + justify-content: space-between; + align-items: center; + padding: 15px!important; + padding-top: 20px!important; + svg { + width: 24px !important; + height: 24px !important; + color: rgb(117, 117, 117); + fill: rgb(117, 117, 117); + } + + .actions { + .tooltip { + margin-left: 16px; + } + } + } + + .actions { + display: flex; + align-items: center; + overflow: hidden !important; + + span { + margin-left: 13px; + line-height: 48px; + white-space: nowrap; + color: #5f5c62; + overflow: hidden; + text-overflow: ellipsis; + } + } + } + .submenu-container:first-child { + margin-top:5px; + .employee-search-input{ + margin-left:16px !important; + } + } + } + .sidebar-list-search-form { + padding-right: 30px; + padding-left: 30px; + + &.active { + font-weight: 600; + border-bottom: 3px solid theme(colors.primary.main); + + background-color: #FFFFFF; + + .menu-label { + color: theme(colors.primary.main); + } + + .icon { + fill: theme(colors.primary.main); + } + } + + .submenu-container { + cursor: pointer; + display: flex; + flex-direction: column; + + .sidebar-link { + display: flex; + justify-content: space-between; + align-items: center; + padding: 15px!important; + padding-top: 20px!important; + svg { + width: 24px !important; + height: 24px !important; + color: rgb(117, 117, 117); + fill: rgb(117, 117, 117); + } + + .actions { + .tooltip { + margin-left: 16px; + } + } + } + + .actions { + display: flex; + align-items: center; + overflow: hidden !important; + + span { + margin-left: 13px; + line-height: 48px; + white-space: nowrap; + color: #5f5c62; + overflow: hidden; + text-overflow: ellipsis; + } + } + } + .submenu-container:first-child { + margin-top:5px; + .employee-search-input{ + margin-left:16px !important; + } + } + } + + + .dropdown-link { + .actions { + display: flex; + padding: 1em; + + svg { + width: 21px; + height: 21px; + color: rgb(117, 117, 117); + fill: rgb(117, 117, 117); + } + + span { + color: #5f5c62; + } + } + } + } +} + + + +.sidebar-link { + display: flex; + justify-content: space-between; + align-items: center; + padding: 15px!important; + padding-top: 20px!important; + svg { + width: 24px !important; + height: 26px !important; + color: rgb(117, 117, 117); + fill: rgb(117, 117, 117); + } +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/inboxv2/inboxSearch.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/inboxv2/inboxSearch.scss new file mode 100644 index 00000000000..a24f8919f3b --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/inboxv2/inboxSearch.scss @@ -0,0 +1,116 @@ +@import url("../../digitv2/index.scss"); + +.search-wrapper { + @extend .light-text-color-primary; + @extend .light-paper-primary; + height: 100%; + width: 100%; + padding: 1rem; + + .popup-label { + display: flex; + font-size: large; + @extend .light-text-color-primary; + .header { + @extend .light-text-color-primary; + width: 100%; + font-weight: normal; + font-size: large; + .icon { + @extend .light-primary; + margin-right: 12px; + margin-top: 5px; + } + } + } + + .filter-header-wrapper { + @extend .light-text-color-primary; + display: grid; + grid-template-columns: 15% 1fr 15%; + height: 3rem; + margin-bottom: 1rem; + .icon-refresh { + display: flex; + align-items: center; + justify-content: center; + border: 1px solid #00000017; + cursor: pointer; + svg { + height: 60%; + width: 40%; + } + } + .label { + @extend .light-text-color-primary; + display: flex; + align-items: center; + justify-content: flex-start; + } + + @media (min-width: 1024px) { + .label { + font-size: 24px; + } + } + + @media (max-width: 1024px) { + .label { + font-size: 16px; + } + } + + .icon-filter { + display: flex; + align-items: center; + justify-content: flex-start; + } + } + + .search-field-wrapper { + display: grid; + row-gap: 0.25rem; + column-gap: 1rem; + &.inbox { + grid-template-columns: repeat(3, 1fr); + &.filter { + display: flex; + flex-direction: column; + } + } + &.search { + grid-template-columns: repeat(4, 1fr); + } + .text-input{ + @extend .light-primary; + } + } + + .search-button-wrapper { + display: flex; + align-items: center; + justify-content: flex-end; + gap: 1rem; + padding-top: 8px; + &.inbox { + grid-column: 2 / span 2; + &.filter { + button { + width: 100%; + } + } + } + &.search { + grid-column: 3 / span 2; + } + } +} + +@screen sm { + .search-wrapper { + .search-field-wrapper { + display: flex; + flex-direction: column; + } + } +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/inboxv2/inboxSearchComposer.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/inboxv2/inboxSearchComposer.scss new file mode 100644 index 00000000000..091a4e6a249 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/inboxv2/inboxSearchComposer.scss @@ -0,0 +1,134 @@ +@import url("../../digitv2/index.scss"); + +.inbox-search-wrapper { + /* + TODO NABEEL/ANIL Removed these since it creates issues in search screen + @extend .light-background; + + */ + height: 100%; + .inbox-search-component-wrapper { + /* + TODO NABEEL/ANIL Removed these since it creates issues in search screen + @extend .light-background; + + */ height: 100%; + width: 100%; + .sections-parent { + /* + TODO NABEEL/ANIL Removed these since it creates issues in search screen + @extend .light-background; + + */ height: 100%; + display: grid; + grid-template-columns: 20% 1fr; + gap : 1rem; + &.inbox { + @extend .light-text-color-primary; + .links{ + @extend .light-primary; + @extend .light-paper-primary; + .text{ + @extend .light-text-color-primary; + } + .inbox-links-icon{ + color:#f47738; + fill:#f47738; + path{ + fill:#f47738; + } + } + } + } + &.search { + display: flex; + flex-direction: column; + .section { + &.links { + display: none; + } + &.filter { + display: none; + } + } + .search-wrapper { + @extend .light-paper-primary; + .search-field-wrapper.search.custom-both-clear-search{ + .search-button-wrapper.search { + grid-column: initial; + } + .search-button-wrapper{ + .link-label{ + @extend .light-primary; + white-space:initial; + } + .submit-bar { + @extend .light-primary-button; + width: 60%; + } + } + } + } + } + &.download { + grid-template-columns: 100% + } + .section { + @extend .light-paper-primary; + @extend .light-text-color-primary; + min-height: 10rem; + /* background-color: white; */ + display: flex; + align-items: center; + justify-content: center; + border-radius: 4px; + box-shadow: 0 1px 2px 0 rgb(0 0 0 / 16%); + &.search-results { + min-height: 0; + } + &.links { + height: 100%; + color : #f47738; + .inbox-search-links-component { + height: 100% !important; + width: 100%; + } + } + &.filter { + @extend .light-paper-primary; + @extend .light-text-color-primary; + height: fit-content; + } + } + } + } +} + +@screen sm { + .employee-main-application-details-for-modal { + padding: 0 !important; + } + .inbox-search-wrapper { + .inbox-search-component-wrapper { + .sections-parent { + display: flex; + flex-direction : column; + .section { + &.search-results { + } + &.links { + } + &.filter { + + } + &.as-modal { + position : fixed; + top : 0; + height : 100vh; + width : 100vw; + } + } + } + } + } +} \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/inboxv2/index.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/inboxv2/index.scss new file mode 100644 index 00000000000..bad206269e9 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/inboxv2/index.scss @@ -0,0 +1,5 @@ +@import "./horizontalNav.scss"; +@import "./InboxLinks.scss"; +@import "./inboxSearch.scss"; +@import "./searchComponentTable.scss"; +@import "./inboxSearchComposer.scss"; \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/inboxv2/searchComponentTable.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/inboxv2/searchComponentTable.scss new file mode 100644 index 00000000000..a542d721fa9 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/inboxv2/searchComponentTable.scss @@ -0,0 +1,44 @@ +.search-component-table { + width: 100%; + display: block; + overflow-x: auto; + overflow-y:hidden; + table { + th { + .tooltip { + min-width: 80px; + } + } + tr { + td { + span { + white-space: pre; + min-width: 80px; + .tooltip { + position: relative; + min-width: 80px; + display: inline-block; + margin-left: 16px; + .tooltiptext { + visibility: hidden; + background-color: #555; + color: #fff; + text-align: left; + border-radius: 6px; + padding: 5px; + position: absolute; + z-index: 1; + bottom: 125%; + left: 50%; + margin-left: -60px; + opacity: 0; + transition: opacity 0.3s; + width: 30rem; + } + } + + } + } + } + } +} \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/info-banner.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/info-banner.scss new file mode 100644 index 00000000000..3ed3b4ac46b --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/info-banner.scss @@ -0,0 +1,35 @@ +.info-banner-wrap { + @apply bg-link-normal bg-opacity-25 m-sm p-md; + max-width: 960px; + + background-color: #C7E0F1; + border-radius: 4px; + svg { + margin-top: 5px; + @apply rounded-full; + } + + div { + @apply flex; + } + + h2 { + @apply text-heading-m text-link-normal mb-md font-bold ml-sm; + } + + p { + @apply text-body-l text-link-normal whitespace-pre-line; + } +} + +@screen dt { + .info-banner-wrap { + h2 { + @apply text-heading-m-dt; + } + + p { + @apply text-body-l-dt; + } + } +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/inputotp.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/inputotp.scss new file mode 100644 index 00000000000..686694452fc --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/inputotp.scss @@ -0,0 +1,15 @@ +.input-otp-wrap { + @apply mb-lg; + + input { + @apply border-2 border-solid border-input-border outline-none h-10 w-10 text-form-field text-text-primary mr-sm mb-sm text-center; + } + input::-webkit-outer-spin-button, + input::-webkit-inner-spin-button { + -webkit-appearance: none; + margin: 0; + } + input[type="number"] { + -moz-appearance: textfield; + } +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/keynote.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/keynote.scss new file mode 100644 index 00000000000..df736c06aa4 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/keynote.scss @@ -0,0 +1,27 @@ +.key-note-pair { + @apply mb-md; + + h3 { + margin-bottom: 4px; + @apply font-bold text-text-primary text-heading-s; + } + + p { + @apply text-text-primary text-body-l; + } + + .caption { + @apply text-body-l text-text-secondary; + } +} + +@screen dt { + .key-note-pair { + p { + @apply text-body-l-dt; + } + .caption { + @apply text-body-l-dt text-text-secondary; + } + } +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/languageSelector.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/languageSelector.scss new file mode 100644 index 00000000000..86da3527354 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/languageSelector.scss @@ -0,0 +1,23 @@ +.language-selector { + @apply flex flex-wrap; +} + +.language-selector div:not(:first-child) { + margin-left: 10px; +} +.bannerCard .language-button-container button { + width: 6.2rem; + height: 2.5rem; +} +.bannerCard .customBtn { + border-color: theme(colors.text.secondary); +} +.bannerCard .customBtn:focus { + outline: none; +} +.bannerCard .customBtn-selected { + border-color: transparent; +} +.bannerCard .bannerHeader p { + font-size: 19px; +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/loader.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/loader.scss new file mode 100644 index 00000000000..1784a54c44c --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/loader.scss @@ -0,0 +1,96 @@ +.page-loader, +.module-loader { + text-align: center; +} + +.page-loader { + padding-top: 88px; +} + +.module-loader { + padding: 16px; +} + +@keyframes ldio-pjg92h09b2o { + 0% { + transform: translate(-50%, -50%) rotate(0deg); + } + + 100% { + transform: translate(-50%, -50%) rotate(360deg); + } +} + +.ldio-pjg92h09b2o div { + position: absolute; + width: 52px; + height: 52px; + border: 12px solid theme(colors.secondary); + border-top-color: transparent; + border-radius: 50%; +} + +.ldio-pjg92h09b2o div { + animation: ldio-pjg92h09b2o 1s linear infinite; + top: 50px; + left: 50px; +} + +.loadingio-spinner-rolling-faewnb8ux8 { + width: 48px; + height: 48px; + display: inline-block; + overflow: hidden; + background: none; +} + +.ldio-pjg92h09b2o { + width: 100%; + height: 100%; + position: relative; + transform: translateZ(0) scale(0.48); + backface-visibility: hidden; + transform-origin: 0 0; + /* see note above */ +} + +.ldio-pjg92h09b2o div { + box-sizing: content-box; +} + +/* +.loader { + position: absolute; + left: 50%; + top: 50%; + z-index: 1; + width: 80px; + height: 80px; + margin: -80px 0 0 -40px; + border: 8px solid #f3f3f3; + border-radius: 50%; + border-top-color: #3498db; + -webkit-animation: loader-spin 1s linear infinite; + animation: loader-spin 1s linear infinite; +} + +@-webkit-keyframes loader-spin { + 0% { + -webkit-transform: rotate(0deg); + } + + 100% { + -webkit-transform: rotate(360deg); + } +} + +@keyframes loader-spin { + 0% { + transform: rotate(0deg); + } + + 100% { + transform: rotate(360deg); + } +} +*/ diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/map.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/map.scss new file mode 100644 index 00000000000..7e0fb5829ca --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/map.scss @@ -0,0 +1,30 @@ +.map-wrap { + @apply pb-lg; +} + +.map { + width: 100%; + height: 384px; + overflow: visible; + position: relative; +} + +.map-search-bar-wrap { + border-radius: 4px; + box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.5); + margin-bottom: 4px; + display: flex; + width: 100%; +} + +.map-search-bar-icon { + @apply inline h-6 w-6 m-sm; +} + +.map-search-bar { + @apply block outline-none text-form-field text-text-primary h-10 w-full !important; +} + +.map-search-bar:focus { + border: none; +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/menu.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/menu.scss new file mode 100644 index 00000000000..e69de29bb2d diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/metricsTable.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/metricsTable.scss new file mode 100644 index 00000000000..786adc3c346 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/metricsTable.scss @@ -0,0 +1,28 @@ +.metricsTable { + @apply bg-white px-md pt-md pb-lg shadow-card; + max-width: 440px; + border-radius: 4px; + + .row { + @apply flex justify-between; + height: 80px; + width: 100%; + } + + .lower_red { + @apply inline; + color: rgb(229, 77, 66); + } + + .upper_green { + @apply inline; + color: theme(colors.success); + } +} + +.chart-metric-wrapper{ + display: flex; + flex-wrap: wrap; + margin-top: 15px; + justify-content: space-evenly; +} \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/multiLink.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/multiLink.scss new file mode 100644 index 00000000000..816bfec9637 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/multiLink.scss @@ -0,0 +1,88 @@ +.multilink-labelWrap{ + top: 73px; + @apply flex items-center align-middle text-center m-md absolute right-0 z-10; +} + +.multilink-link-button{ + margin: 0; + @apply text-heading-s text-primary-light +} + +.multilink-optionWrap{ + right: 0; + top:110px; + width: max-content; + @apply absolute shadow-card bg-white m-md z-10; + + .multilink-option{ + + svg{ + margin-top: auto; + margin-bottom: auto; + @apply mx-sm + } + + &:hover{ + @apply bg-grey-mid cursor-pointer; + } + @apply p-md; + } +} +.overCard{ + top: 23px; +} + +.multilink-block-wrapper{ + @apply relative; + .multilink-labelWrap{ + margin: 0 !important; + top: unset; + @apply relative text-text-primary !important; + svg{ + fill: theme(colors.text.secondary); + } + span{ + @apply text-text-primary !important; + } + } + .multilink-optionWrap{ + top: 8px; + right: -50%; + @apply block !important; + } +} + +@screen dt { + + .multilink-block-wrapper{ + .multilink-optionWrap{ + right: 0 !important; + } + } + + .multilink-labelWrap{ + right: 20%; + top: 80px; + } + + .multilink-optionWrap{ + right: 20%; + top: 110px; + @apply shadow-card rounded-sm; + } +} + +.reports-download-btn{ + justify-content: flex-end; + position: unset; +} + +.reports-options-download{ + position: absolute; + justify-content: flex-end; + float: right; + right:0%; + display: flex; + flex-direction: row; + top:2rem; +} \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/multiSelectDropdown.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/multiSelectDropdown.scss new file mode 100644 index 00000000000..5848ee0214c --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/multiSelectDropdown.scss @@ -0,0 +1,77 @@ +.multi-select-dropdown-wrap{ + @apply relative text-form-field text-text-primary w-full; + .master, .master-active{ + @apply relative border border-solid border-input-border h-10 w-full; + input[type=text]{ + @apply absolute top-0 left-0 p-sm pl-sm min-h-full min-w-full opacity-0; + &:focus{ + @apply outline-none; + } + } + .label{ + @apply flex justify-between p-sm w-full h-full; + svg{ + @apply h-6 w-6; + } + } + + &:hover{ + @apply border-2 border-solid border-primary-main; + } + } + + .master-active{ + @apply border-2 border-primary-main; + input[type=text]{ + @apply opacity-100; + } + .label{ + @apply hidden; + } + } + + .server{ + + box-shadow: 0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 2px rgba(0, 0, 0, 0.12), 0 5px 5px -3px rgba(0, 0, 0, 0.2); + top:40px; + + max-height:20vmax; + overflow: scroll; + @apply absolute min-w-full z-20; + div{ + @apply flex w-full bg-white; + justify-content: flex-start; + align-items: center; + &:hover{ + @apply bg-grey-mid; + } + input{ + height: 44px; + @apply absolute min-w-full opacity-0 z-20 cursor-pointer; + } + p{ + padding: 12px; + margin-top: 5px; + margin-bottom: 5px; + @apply text-form-field text-text-primary; + } + .custom-checkbox{ + height: 28px; + width: 28px; + @apply border border-solid border-input-border m-sm; + svg{ + @apply opacity-0 z-10; + } + } + input:checked ~ .custom-checkbox, + input:hover ~ .custom-checkbox { + @apply border-2 border-primary-main; + } + + input:checked ~ .custom-checkbox svg { + @apply opacity-100; + } + + } + } +} \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/navbar.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/navbar.scss new file mode 100644 index 00000000000..94eb1369c2d --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/navbar.scss @@ -0,0 +1,312 @@ +.navbar { + @apply text-white bg-secondary p-md w-full; + position: fixed; + z-index: 9999; + + img { + display: inline-block; + min-width: 78px; + height: 24px; + } + .nav { + display: flex; + justify-content: space-between; + } + .nav-wrapper { + display: flex; + @media (min-width: 780px) { + .hamburger-span { + display: none; + } + } + } + + h3 { + @apply inline-block border-l border-solid border-white pl-sm ml-sm; + } +} + +.img-circle { + border-radius: 50%; +} + +.profile-section { + height: auto; + display: flex; + flex-direction: column; + align-items: center; + padding-top: 30px; + background-color: theme(colors.white); + + img { + width: 89px; + height: 88px; + margin: 0px auto 16px; + } + + .label-container { + .label-text { + color: #767676; + } + &.name-Profile { + .label-text { + letter-spacing: 0.6px; + font-weight: 700; + font-size: 18px; + color: theme(colors.text.primary); + } + } + } + .profile-divider { + border-top: 1px solid theme(colors.border); + margin-left: 20px; + margin-right: 20px; + width: 90%; + margin-top: 1rem; + } +} + +.drawer-list { + @apply pt-md; + position: relative; + min-height: 1px; + overflow: auto; + .menu-item { + border: 10px; + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); + cursor: pointer; + text-decoration: none; + margin: 0px; + padding: 0px; + outline: none; + font-size: 16px; + position: relative; + color: rgb(95, 92, 98); + line-height: 48px; + transition: all 450ms cubic-bezier(0.23, 1, 0.32, 1) 0ms; + min-height: 48px; + white-space: initial; + background: none; + .icon { + display: block; + color: rgb(117, 117, 117); + fill: rgb(117, 117, 117); + height: 21px; + width: 21px; + float: left; + margin-top: 12px; + } + .edit-btn-ico{ + height: 17px; + width: 17px; + margin-top: 16px; + } + .icon + .menu-label { + margin-left: 36px; + text-overflow: ellipsis; + white-space: nowrap; + } + } + .sidebar-list { + padding-right: 16px; + padding-left: 16px; + &.active { + border-left: 5px solid theme(colors.primary.main); + .menu-label { + color: theme(colors.primary.main); + } + .icon { + fill: theme(colors.primary.main); + } + } + + .submenu-container { + cursor: pointer; + display: flex; + flex-direction: column; + + .sidebar-link { + display: flex; + justify-content: space-between; + align-items: center; + svg { + width: 21px; + height: 21px; + color: rgb(117, 117, 117); + fill: rgb(117, 117, 117); + } + } + .actions { + display: flex; + align-items: center; + overflow: hidden !important; + + span { + margin-left: 13px; + line-height: 48px; + white-space: nowrap; + color: #5f5c62; + overflow: hidden; + text-overflow: ellipsis; + } + input { + border: none; + outline: none; + margin-left: 16px; + padding: 0.5em; + color: #5f5c62; + } + } + } + } + + .dropdown-link { + .actions { + display: flex; + padding: 1em; + svg { + width: 21px; + height: 21px; + color: rgb(117, 117, 117); + fill: rgb(117, 117, 117); + } + span { + color: #5f5c62; + } + } + } +} + +.drawer-desktop { + overflow: auto; + .menu-item { + border: 10px; + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); + cursor: pointer; + text-decoration: none; + margin: 0px; + padding: 0px; + outline: none; + font-size: 16px; + position: relative; + color: rgb(95, 92, 98); + line-height: 48px; + transition: all 450ms cubic-bezier(0.23, 1, 0.32, 1) 0ms; + min-height: 48px; + white-space: initial; + background: none; + .icon { + display: block; + color: rgb(117, 117, 117); + fill: rgb(117, 117, 117); + height: 21px !important; + width: 21px !important; + float: left; + margin-top: 12px; + } + .edit-btn-ico { + height: 17px; + width: 17px; + margin-top: 16px; + } + .icon + .menu-label { + margin-left: 36px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + } + @media (min-width: 780px) { + .sidebar-list { + padding-right: 16px; + padding-left: 16px; + &.active { + border-left: 5px solid theme(colors.primary.main); + padding-left: 11px; + .menu-label { + color: theme(colors.primary.main); + } + .icon { + fill: theme(colors.primary.main); + } + } + + .submenu-container { + margin-left: 1.5rem; + cursor: pointer; + display: flex; + flex-direction: column; + + .sidebar-link { + display: flex; + justify-content: space-between; + align-items: center; + svg { + width: 21px; + height: 21px; + color: rgb(117, 117, 117); + fill: rgb(117, 117, 117); + } + .actions { + .tooltip { + margin-left: 16px; + } + } + } + .actions { + display: flex; + align-items: center; + overflow: hidden !important; + + span { + margin-left: 13px; + line-height: 48px; + white-space: nowrap; + color: #5f5c62; + overflow: hidden; + text-overflow: ellipsis; + } + } + } + } + + .dropdown-link { + .actions { + display: flex; + padding: 1em; + svg { + width: 21px; + height: 21px; + color: rgb(117, 117, 117); + fill: rgb(117, 117, 117); + } + span { + color: #5f5c62; + } + } + } + } +} + +/* .navbar-header{ + @apply text-navbarheader float-left px-sm +} + +.navbar-subheader{ + @apply font-light px-sm border-solid border-l border-white border-opacity-100 +}*/ + +.side-bar-footer { + width: 200px; + margin-left: 50px; + margin-top: 24px; + margin-bottom: 16px; + position: relative; +} + +.digit-footer { + @apply flex h-4 mb-sm; + img { + @apply mr-sm; + } +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/plusMinus.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/plusMinus.scss new file mode 100644 index 00000000000..d482a9a50b0 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/plusMinus.scss @@ -0,0 +1,15 @@ +.PlusMinus { + text-align: center; + display: flex; + align-content: center; + justify-content: center; +} +.PlusMinusbutton{ + border: 1px solid theme(colors.border); + background-color: theme(colors.grey.mid); + color: theme(colors.text.secondary); + font-size: 27px; + font-weight: 400; + text-align: center; + width: 40px; +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/popup.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/popup.scss new file mode 100644 index 00000000000..bf6e6d3d684 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/popup.scss @@ -0,0 +1,16 @@ +.popup-wrap { + background: rgba(0, 0, 0, 0.7); + @apply flex fixed w-full h-full overflow-auto top-0 left-0 min-h-screen; + z-index: 10000; +} + +@screen dt { + .popup-wrap { + background: rgba(0, 0, 0, 0.7); + @apply min-h-screen; + } +} + +.popup-close-icon{ + @apply flex justify-end; +} \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/radiobtn.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/radiobtn.scss new file mode 100644 index 00000000000..74b73623789 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/radiobtn.scss @@ -0,0 +1,45 @@ +.radio-wrap { + @apply my-sm block leading-10 mb-lg; + + div { + @apply block mb-md; + } + + .radio-btn-wrap { + @apply block float-left relative; + &:hover { + .radio-btn-checkmark { + @apply border-primary-main; + } + } + } + + .radio-btn { + @apply opacity-0 absolute cursor-pointer h-10 w-10; + } + + .radio-btn-checkmark { + @apply h-10 w-10 border border-input-border border-solid rounded-full block; + } + + label { + @apply text-text-primary text-form-field ml-md; + } + + .radio-btn-checkmark:after { + content: ""; + } + + .radio-btn-wrap input:checked ~ .radio-btn-checkmark { + @apply border-2 border-primary-main; + } + + .radio-btn-wrap input:checked ~ .radio-btn-checkmark:after { + @apply block bg-primary-main h-5 w-5 rounded-full absolute top-10 left-10; + } +} +.reverse-radio-selection-wrapper{ + div{ + @apply flex flex-row-reverse place-content-between items-center; ; + } +} \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/ratingstar.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/ratingstar.scss new file mode 100644 index 00000000000..e3429ab698d --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/ratingstar.scss @@ -0,0 +1,33 @@ +.rating-star-wrap { + @apply flex w-full mb-lg; + img { + width: 40px; + height: 38px; + display: block; + @apply mr-sm; + } + + svg { + width: 40px; + height: 38px; + display: block; + @apply mr-sm; + } +} + +@screen dt { + .rating-star-wrap { + @apply w-2/5; + } +} + +.rating-with-text { + @apply flex place-items-center w-full; + + svg { + width: 24px; + height: 38px; + display: block; + @apply mr-sm; + } +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/roundedLabel.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/roundedLabel.scss new file mode 100644 index 00000000000..ae734267665 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/roundedLabel.scss @@ -0,0 +1,10 @@ +.roundedLabel { + width: 24px; + height: 24px; + border-radius: 15px; + position: absolute; + z-index: 100; + bottom: 10px; + right: 70px; + @apply ml-sm bg-error text-center text-white; +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/searchAction.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/searchAction.scss new file mode 100644 index 00000000000..69d908acf19 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/searchAction.scss @@ -0,0 +1,20 @@ +.searchBox { + @apply flex m-sm justify-between; + .searchAction { + position: relative; + @apply flex flex-row text-focus; + .searchText { + @apply ml-sm; + } + } +} + +.svgPrimaryH16px{ + svg{ + width: 18px; + @apply h-6; + path{ + fill: theme(colors.primary.main); + } + } +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/sectionalDropdown.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/sectionalDropdown.scss new file mode 100644 index 00000000000..c62103e66a7 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/sectionalDropdown.scss @@ -0,0 +1,43 @@ +.sect-dropdown-wrap { + @apply mb-lg relative; + + .sect-dropdown-input-wrap { + @apply block w-full h-10 border border-solid border-input-border; + + input[type="text"] { + width: calc(100% - 32px); + @apply h-full outline-none text-text-primary text-form-field pl-sm; + } + p { + padding-top: 9px; + @apply text-form-field text-text-primary float-left ml-sm; + } + + img { + @apply float-right h-6 w-6 mt-sm mr-sm; + } + + svg { + @apply float-right h-6 w-6 mt-sm mr-sm; + } + } + + .sect-dropdown-card { + width: 100% !important; + box-shadow: 0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 2px rgba(0, 0, 0, 0.12), 0 5px 5px -3px rgba(0, 0, 0, 0.2); + @apply absolute z-10 mt-xs pb-sm bg-white; + + h1 { + @apply pl-sm pt-md text-text-primary text-form-field; + } + + p { + padding-left: 21px; + @apply w-full pt-sm text-text-secondary text-form-field; + + &:hover { + @apply bg-grey-mid; + } + } + } +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/selectdropdown.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/selectdropdown.scss new file mode 100644 index 00000000000..98ef8ec40fd --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/selectdropdown.scss @@ -0,0 +1,174 @@ +/*.select { + + @apply mb-lg block border-2 border-input-border border-solid outline-none rounded-none w-full h-10 bg-white leading-10; + + option { + @apply h-10 text-form-field text-text-primary align-top text-left; + } + + } + +.select:active { + @apply border-focus border-2; +} + +@screen dt { + .select { + @apply w-2/5; + } +} +*/ +.employee-select-wrap { + @apply mb-lg relative; + + .select { + @apply relative block w-full h-10 border border-solid border-input-border; + &:hover { + @apply border-2 border-solid border-primary-main; + } + input[type="text"] { + width: calc(100% - 32px); + background-color: transparent; + + @apply absolute z-10 w-full h-full outline-none text-text-primary text-form-field pl-sm; + } + + p { + padding-top: 9px; + @apply text-form-field text-text-primary float-left ml-sm; + } + + img { + @apply float-right h-6 w-6 mt-sm mr-sm; + } + + svg { + @apply absolute right-0 float-right h-6 w-6 mt-sm mr-sm; + } + } + + .select-active { + @apply relative block w-full h-10 border-2 border-solid border-primary-main; + + input[type="text"] { + width: calc(100% - 32px); + background-color: transparent; + + @apply absolute z-10 w-full h-full outline-none text-text-primary text-form-field pl-sm; + } + + p { + @apply text-form-field text-text-primary float-left ml-sm; + } + + p { + padding-top: 9px; + } + + img { + @apply float-right h-6 w-6 mt-sm mr-sm; + } + + svg { + @apply absolute right-0 float-right h-6 w-6 mt-sm mr-sm; + } + } + + .options-card { + width: 100% !important; + box-shadow: 0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 2px rgba(0, 0, 0, 0.12), 0 5px 5px -3px rgba(0, 0, 0, 0.2); + max-height: 400px; + overflow: auto; + @apply absolute z-20 mt-xs bg-white max-w-full; + + p { + padding-top: 14px; + @apply w-full h-12 pl-sm text-text-primary text-form-field; + + &:hover { + @apply bg-grey-mid; + } + } + } +} + +.employee-select-wrap--elipses { + width: 85% !important; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.select-wrap { + @apply mb-lg relative; + max-width: 540px; + + .select { + @apply relative block w-full h-10 border border-solid border-input-border; + + input[type="text"] { + width: calc(100% - 32px); + background-color: transparent; + + @apply absolute z-10 w-full h-full outline-none text-text-primary text-form-field pl-sm; + } + + p { + padding-top: 9px; + @apply text-form-field text-text-primary float-left ml-sm; + } + + img { + @apply float-right h-6 w-6 mt-sm mr-sm; + } + + svg { + @apply absolute right-0 float-right h-6 w-6 mt-sm mr-sm; + } + } + + .select-active { + @apply relative block w-full h-10 border-2 border-solid border-primary-main; + + input[type="text"] { + width: calc(100% - 32px); + background-color: transparent; + + @apply absolute z-10 w-full h-full outline-none text-text-primary text-form-field pl-sm; + } + + p { + @apply text-form-field text-text-primary float-left ml-sm; + } + + p { + padding-top: 9px; + } + + img { + @apply float-right h-6 w-6 mt-sm mr-sm; + } + + svg { + @apply absolute right-0 float-right h-6 w-6 mt-sm mr-sm; + } + } + + .options-card { + width: 100% !important; + box-shadow: 0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 2px rgba(0, 0, 0, 0.12), 0 5px 5px -3px rgba(0, 0, 0, 0.2); + @apply absolute z-20 mt-xs bg-white; + + p { + padding-top: 14px; + @apply w-full h-12 pl-sm text-text-primary text-form-field; + + &:hover { + @apply bg-grey-mid; + } + } + } +} + +@screen dt { +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/sidebar.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/sidebar.scss new file mode 100644 index 00000000000..6a04adffdc2 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/sidebar.scss @@ -0,0 +1,141 @@ +.sidebar-link:hover .arrow { + display: block; +} + +.hidden-arrow { + display: none; +} +.new-dropdown-link{ + display: flex; + align-items: center; + justify-content: space-between; + padding: 10px 15px 15px !important; + color: #fff; + font-size: 1rem; + font-weight: 500; + text-decoration: none; + margin-left: 0px !important; + height: 3rem !important; + margin-left: 1rem; + margin-top: 0.5rem; +} +.selected { + background-color: #e0e0e0; /* Change this to your desired highlight color */ +} + +.selected-item { + background-color: #e0e0e0; /* Set your desired background color for the selected item */ + color: #000; /* Set your desired text color for the selected item */ + /* Add any other styles you want to apply to the selected item */ +} +/* Style the container that acts as the viewport */ +.new-sidebar { + height: 90%; /* Set a fixed height for the viewport */ + overflow: scroll; /* Hide the scrollbar */ + + &::-webkit-scrollbar { + display: none; + } + + &::-webkit-scrollbar { + -ms-overflow-style: none; /* IE and Edge */ + scrollbar-width: none; /* Firefox */ + } +} + +/* Style the content inside the viewport */ +.new-sidebar > div { + height: auto; /* Allow content to expand vertically */ + overflow-y: auto; /* Enable vertical scrolling */ + overflow-x: hidden; + padding-right: 2px; /* Add space for the hidden scrollbar (adjust as needed) */ +} + +/* Style the scrollbar thumb to make it transparent */ +.new-sidebar > div::-webkit-scrollbar-thumb { + background: transparent; +} +.link-icon{ + width: 24px !important; + height: 26px !important; +} +.link-icon svg{ + width: 24px !important; + height: 26px !important; +} + +.employee-search-input{ + width: 150px; + background-color: transparent; + &.nav-bar { + color:#fff; + } + &.nav-bar::placeholder { + color: #fff; + } +} + +.search-icon-wrapper-new { + margin-left: 0.35rem; +} + +.search-icon-wrapper-new svg{ + fill: theme(colors.white) !important; + width: 21px; + height: 21px; +} +.search-icon-wrapper-new svg path { + fill: theme(colors.white) !important; + } + +.submenu-container { + overflow: scroll; + margin-bottom: 1rem; + /* Hide the scrollbar */ + &::-webkit-scrollbar { + display: none; + } + + &.level-2 { + border-left: 1px solid; + margin-left: 2rem; + } + &.level-1 { + margin-left: -1.5rem; + } +} + +.actions { + &.level-0 { + margin-left: 0.4rem; + } + &.selected-action-level-0 { + color: theme(colors.primary.main) !important; + } + &.selected-action-level-1 { + border-left:4px solid theme(colors.primary.main); + margin-left: -0.6rem; + height: 2rem; + color: theme(colors.primary.main) !important; + } + + &.default-0 { + &.active { + + } + } + &.default-1 { + margin-left: -0.6rem; + height: 2rem; + width: 111% !important; + } + + + &.custom { + margin-left: 0.3rem; + } + &:hover { + background-color: #6A8E9D; + opacity: 0.8; + } +} \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/staticDynamicMessages.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/staticDynamicMessages.scss new file mode 100644 index 00000000000..cbf0b895528 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/staticDynamicMessages.scss @@ -0,0 +1,107 @@ +.pay-whatsapp-card{ + display: flex; + justify-content: space-between; + cursor: pointer; +} +.pay-whatsapp-text{ + color: #25D366; + float: left; + font-family: 'Roboto'; + font-size: 16px; + font-weight: 700; +} +.dynamicDataCard{ + background: rgba(244, 119, 56, 0.12); + mix-blend-mode: normal; + height: auto; + max-height: 64px; + border-radius: 4px; + margin-bottom: 16px; +} +.dynamicData{ + padding: 10px 16px 16px 16px; + display: flex; +} +.dynamicData-content{ + font-family: 'Roboto'; + font-size: 14px; + font-weight: 400; + padding-top: 4px; + word-break: break-word; + margin-inline: 20px; +} +.staticDataCard{ + background: rgba(238, 238, 238, 1); + mix-blend-mode: normal; + height: auto; + max-height: 100px; + border-radius: 4px; + margin-bottom: 16px; +} +.staticData{ + display: flex; +} +.timerIcon{ + padding: 16px 0px 16px 16px; +} +.static-data-content{ + display: grid; + margin-inline: 20px; + padding-top: 8px; +} +.rupeeSymbol{ + padding: 16px 0px 16px 16px; +} +.validityIcon{ + padding: 16px 0px 16px 8px; +} +.static-data-content-first{ + font-family: 'Roboto'; + font-size: 14px; + font-weight: 400; +} +.static-data-content-second{ + font-family: 'Roboto'; + font-size: 16px; + font-weight: 700; + word-break: break-word; +} +.staticDataCardLast{ + background: rgba(238, 238, 238, 1); + mix-blend-mode: normal; + height: 56px; + border-radius: 4px; +} +.whatsAppIconG{ + float: right; +} +.static-home-Card{ + display: flex; + justify-content: space-between; +} +.static-home-Card-header{ + font-family: 'Roboto'; + font-size: 16px; + font-weight: 700; + float: left; +} +.helplineIcon{ + float: right; +} +.call-center-card-text{ + display: grid; +} +.call-center-card-content{ + float: left; +} +.serviceCentrIcon{ + float: right; +} +.service-center-details-card{ + display: flex; + overflow-wrap: break-word; +} +.service-center-details-text{ + float: left; + width: 180px; +} \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/staticSideBar.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/staticSideBar.scss new file mode 100644 index 00000000000..b87fa57e830 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/staticSideBar.scss @@ -0,0 +1,27 @@ +.sidebar-menu { + display: flex; + flex-direction: column; + padding-top: 16px; + padding-left: 16px; + padding-right: 16px; + color: #757575; + + .menu-item { + display: flex; + cursor: pointer; + min-height: 48px; + margin: 0; + padding: 0; + .menu-item-icon { + svg { + color: #757575; + fill: #757575; + width: 21px; + height: 21px; + } + } + .menu-item-text { + margin-left: 1em; + } + } +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/statushighlight.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/statushighlight.scss new file mode 100644 index 00000000000..ef564ab082b --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/statushighlight.scss @@ -0,0 +1,17 @@ +.status-highlight { + --bg-opacity: 12% !important; + border-radius: 16px; + @apply h-8 w-20 bg-error mb-sm; + + p { + padding-top: 6px; + @apply block text-center text-caption-m text-error cursor-pointer; + } + + &.success { + @apply bg-success; + p { + @apply text-success; + } + } +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/submiterrors.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/submiterrors.scss new file mode 100644 index 00000000000..f0f6c92c715 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/submiterrors.scss @@ -0,0 +1,11 @@ +.error-message-wrap { + @apply w-full mb-sm p-md border-4 border-solid border-error; + + h2 { + @apply font-bold text-caption-m block mb-sm; + } + + p { + @apply font-bold text-caption-m text-error block; + } +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/summary.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/summary.scss new file mode 100644 index 00000000000..3c044a0cacb --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/summary.scss @@ -0,0 +1,29 @@ +.summary-wrapper { + @apply flex justify-around; + + .wrapper-child { + @apply flex flex-col justify-center flex-grow; + } + + .blocks { + display: flex; + margin-bottom: 25px; + + p:only-child { + font-weight: bold; + font-size: 24px; + } + + div { + margin-right: 25px; + + p:not(:first-child) { + font-weight: bold; + font-size: 24px; + } + } + } +} +.summary-card-margin{ + margin:0 24px 20px 0px !important; +} \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/table.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/table.scss new file mode 100644 index 00000000000..379af9fa6a1 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/table.scss @@ -0,0 +1,201 @@ +.table { + @apply bg-white w-full; + + thead { + th { + padding: 20px 18px; + @apply font-bold align-middle text-left; + &:first-child { + min-width: 256px; + } + &:nth-child(2) { + min-width: 200px; + } + } + } + + + tbody { + border: none; + padding: 0; + margin: 0; + td { + @apply border-t border-border text-left align-middle; + padding: "20px 18px"; + } + } +} + +.pagination { + display: flex; + justify-content: flex-end; + background-color: rgba(255, 255, 255, var(--bg-opacity)); + border-top: 1px solid rgb(214, 213, 212); + padding: 20px 40px 20px 0px; + color: rgb(80, 90, 95); + + svg { + fill: theme(colors.text.secondary); + @apply ml-md; + } +} + +.pagination button:nth-child(1) span::after { + content: "\f105"; +} + +.fullWidth { + width: 100% !important; +} + +.customTable { + width: 100%; + th { + font-weight: bold; + } + + th, + td { + text-align: left; + border-bottom: 1px solid #b1b4b6; + padding: 15px 10px; + } + + tr:nth-child(odd) { + background-color: theme(colors.grey.mid); + } + tr:nth-child(even) { + background-color: #fff; + } + + thead { + tr:first-child { + background-color: unset; + } + } +} + +.table-fixed-first-column { + thead { + th:first-child { + position: sticky; + background: #fff; + left: 0; + border-right: 1px solid #b1b4b6; + border-top-left-radius: 4px; + } + } + tbody { + td:first-child { + position: sticky; + background: #fff; + color: theme(colors.primary.main); + left: 0; + border-right: 1px solid #b1b4b6; + } + } +} + +.table-fixed-last-column { + thead { + th:last-child { + position: sticky; + background: #fff; + right: 0; + left:0; + border-top-left-radius: 4px; + } + } + tbody { + td:last-child { + position: sticky; + background: #fff; + color: theme(colors.primary.main); + left: 0; + right:0; + } + } +} + +.table-fixed-column-common-pay { + thead { + th:first-child { + position: sticky; + background: rgb(238, 238, 238); + left: 0; + border-top-left-radius: 4px; + } + th:last-child { + position: sticky; + background: rgb(238, 238, 238); + right: 0; + border-top-left-radius: 4px; + } + } + tbody { + td:first-child { + position: sticky; + background: rgb(238, 238, 238); + left: 0; + } + td:last-child { + position: sticky; + background: rgb(238, 238, 238); + right: 0; + } + } +} + +.table-fixed-first-second-column { + thead { + th:nth-child(2) { + position: sticky; + left: 0; + background-color: white; + } + } + tbody { + td:nth-child(2) { + position: sticky; + left: 0; + background-color: inherit; + } + } +} +.table-border-style { + border: 1px solid #b1b4b6; + border-radius: 4px; + border-spacing: 0; + border-collapse: separate; +} +.dss-table-wrapper { + width: 100%; + display: block; + overflow-x: auto; + table { + th { + .tooltip { + min-width: 80px; + } + } + tr { + td { + span { + white-space: pre; + min-width: 80px; + } + } + } + } +} + +.reports-table { + margin-top: 2rem; + thead { + th { + &:first-child { + min-width: unset; + } + } + } +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/tag.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/tag.scss new file mode 100644 index 00000000000..0d0d0e9b347 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/tag.scss @@ -0,0 +1,27 @@ +.tag-container { + @apply flex flex-wrap mb-md; + .tag { + @apply bg-grey-mid rounded-2xl pt-sm pb-sm flex justify-between items-center; + padding-left: 12px; + padding-right: 12px; + font-size: 14px; + margin-left: 2px; + height: 2rem; + margin-top: 1rem; + .text { + padding-right: 5px; + max-width: calc( 100% - 24px ); + height: 22px; + overflow: hidden; + text-overflow: clip; + } + + &:hover { + @apply cursor-pointer; + + .close { + fill: black; + } + } + } +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/telephone.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/telephone.scss new file mode 100644 index 00000000000..7b711d21f76 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/telephone.scss @@ -0,0 +1,17 @@ +.telephone { + @apply flex items-baseline; + img, + svg { + height: 22px; + width: 20px; + @apply text-primary-main ml-sm items-center; + } + + p { + @apply text-text-primary text-body-l pl-sm; + } +} + +.call { + @apply flex text-text-secondary text-body-l; +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/textfields.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/textfields.scss new file mode 100644 index 00000000000..715140131c0 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/textfields.scss @@ -0,0 +1,96 @@ +.card-input { + @apply mb-lg pl-sm outline-none mt-sm block border w-full h-10 border-input-border border-solid bg-white leading-10 text-form-field text-text-primary; +} + +.card-input-error { + @apply mb-lg pl-sm block w-full h-10 outline-none border-2 border-error border-solid bg-white leading-10 text-form-field text-text-primary; +} + +.employee-card-input { + @apply mb-lg pl-sm outline-none block border w-full h-10 border-input-border border-solid bg-white leading-10 text-form-field text-text-primary; +} +.employee-card-input:disabled { + @apply border-grey-dark text-grey-dark !important; + pointer-events: none !important; +} +.employee-card-input--front { + width: fit-content !important; + display: flex; + align-items: center; + background: theme(colors.grey.mid); + border-right: 0; + padding-right: 5px; +} +.employee-card-input-error { + @apply mb-lg pl-sm block w-full h-10 outline-none border-2 border-error border-solid bg-white leading-10 text-form-field text-text-primary; +} + +.card-textarea, +.employee-card-textarea { + @apply block outline-none mt-md mb-lg border w-full border-input-border border-solid bg-white h-24 text-form-field text-text-primary p-sm; +} + +.inputWrapper { + display: flex; + justify-content: flex-start; + max-width: 500px; + + div { + max-width: 80px; + } + + span { + margin-top: 16px; + margin-left: 10%; + margin-right: 10%; + } +} + +@screen dt { + .card-input { + width: 480px; + } + + .card-input-emp { + width: 240px; + } + + .card-input-error { + width: 480px; + } + + .employee-card-input { + @apply w-full; + } + + .employee-card-input-error { + @apply w-full; + } + + .card-textarea { + /* //width: 480px; */ + @apply w-full; + max-width:540px; + } + + .employee-card-textarea { + @apply w-full; + } + + .card-input-emp { + width: 240px; + } +} + +.citizen-card-input { + @apply mb-lg pl-sm outline-none block border w-full h-10 border-input-border border-solid bg-white leading-10 text-form-field text-text-primary; +} + +.citizen-card-input--front { + width: fit-content !important; + display: flex; + align-items: center; + background: theme(colors.grey.mid); + border-right: 0; + padding-right: 5px; +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/toast.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/toast.scss new file mode 100644 index 00000000000..3a442bcf9d2 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/toast.scss @@ -0,0 +1,31 @@ +.toast-success { + max-width: 480px; + width: calc(100% - 20px); + bottom: 64px; + left: 0; + margin: 0 10px; + gap: 16px; + border-radius: 4px; + min-height: 48px; + @apply fixed flex bg-success leading-7 z-20 items-center pl-md pr-sm; + + svg { + height: 20px; + width: 20px; + } + + .toast-close-btn { + margin-left: auto; + } + + h2 { + @apply text-body-s-dt text-white; + } +} + +@screen dt { + .toast-success { + width: 100%; + left: calc(50% - 240px); + } +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/toggleSwitch.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/toggleSwitch.scss new file mode 100644 index 00000000000..6c09986db2e --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/toggleSwitch.scss @@ -0,0 +1,41 @@ +.react-switch-checkbox { + height: 0; + width: 0; + visibility: hidden; + } + + .react-switch-label { + display: flex; + align-items: center; + justify-content: space-between; + cursor: pointer; + width: 50px; + height: 20px; + background: white; + border-radius: 100px; + position: relative; + transition: background-color .2s; + border: 1px solid #bbb; + } + + .react-switch-label .react-switch-button { + content: ''; + position: absolute; + top: 2px; + left: 2px; + width: 14px; + height: 14px; + border-radius: 45px; + transition: 0.2s; + background: theme(colors.primary.main); + box-shadow: 0 0 2px 0 rgba(10, 10, 10, 0.29); + } + + .react-switch-checkbox:checked + .react-switch-label .react-switch-button { + left: calc(100% - 2px); + transform: translateX(-100%); + } + + .react-switch-label:active .react-switch-button { + width: 45px; + } \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/topbar.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/topbar.scss new file mode 100644 index 00000000000..56bbd8426ec --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/topbar.scss @@ -0,0 +1,153 @@ +.topbar { + position: fixed; + top: 0; + width: 100%; + padding: 10px 24px; + background: white; + box-shadow: rgba(0, 0, 0, 0.24) 0 1px 4px; + z-index: 9999999; + @apply flex items-center; + + img { + display: inline; + + &.city { + margin-right: 8px; + height: 48px; + width: 48px; + } + + &.state { + height: 20px; + max-height: 20px; + width: auto; + } + } + + .ulb { + font-weight: bold; + display: inline-block; + } + + .right { + float: right; + margin-top: 12px; + position: relative; + + svg { + display: inline; + } + + .user-img-txt { + background: theme(colors.primary.main); + padding: 10px 15px; + border-radius: 50%; + color: white; + font-weight: 700; + } + } + + .left { + float: left; + } + + .w-80 { + width: 70%; + } + + .width-20 { + width: 30%; + } + + .margin-top-6 { + margin-top: 6px; + } + + .margin-right-30 { + margin-right: 30px; + } + + .margin-top-10 { + margin-top: 10px; + } + + .icon { + display: block; + color: rgb(117, 117, 117); + fill: rgb(117, 117, 117); + height: 21px; + width: 21px; + } + + .column-gap-15 { + column-gap: 15px; + } + + .column-gap-5 { + column-gap: 5px; + } + + .select-wrap, + .employee-select-wrap { + margin-bottom: 0px; + .profile-dropdown--item { + span { + white-space: pre; + } + } + } +} + +.cp { + cursor: pointer; + .hamburger { + display: none; + } + + @media (max-width: 780px) { + .hamburger { + display: none; + } + } +} + +.citizen { + .right { + margin-top: 5px; + margin-bottom: 5px; + } + + .topbar-select-wrap { + margin-bottom: 0; + } + + .flex-between { + @apply flex items-center justify-between; + } +} + +.profile-dropdown--item { + display: flex; + flex-direction: row; + padding: 10px; + column-gap: 10px; + color: theme(colors.text.secondary); + + &:hover { + background: theme(colors.grey.mid); + } +} + +.flex-right { + @apply flex items-center justify-end; + min-width: 85px; +} +video::-webkit-media-controls-panel { + top: 55%; + position: absolute; + width: 100%; +} + +.topbarOptionsClassName { + right: -3rem !important +} \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/components/uploadcomponents.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/uploadcomponents.scss new file mode 100644 index 00000000000..349f2f9b524 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/uploadcomponents.scss @@ -0,0 +1,100 @@ +.upload-wrap { + @apply flex w-full h-40 bg-grey-light relative mb-lg px-sm border border-border border-dashed; + max-width: 540px; + + img { + display: block; + margin-top: 58px; + margin-left: calc(50% - 23px); + height: 42px; + width: 46px; + } + + svg { + display: block; + margin-top: 58px; + margin-left: calc(50% - 23px); + height: 42px; + width: 46px; + } + + input { + @apply absolute w-full h-full opacity-0 top-0; + } +} + +.multi-upload-wrap { + @apply flex mb-lg; + + div { + display: block; + position: relative; + background-color: theme(colors.grey.light); + width: calc((100% - 16px) / 3); + margin-right: 8px; + + .delete { + position: absolute; + height: 24px; + width: 24px; + border-radius: 100%; + top: 2px; + right: 2px; + } + } + + .upload-img-container { + border: 1px dashed theme(colors.border); + margin: 0 !important; + + img { + margin-left: auto; + margin-right: auto; + padding-top: calc(33% - 21px); + } + + svg { + @apply flex; + margin: auto; + } + + svg { + margin-left: auto; + margin-right: auto; + top: calc(50% - 21px); + position: relative; + } + + input { + @apply absolute w-full h-full opacity-0 top-0; + } + } +} + +.upload-file-max-width { + max-width: 540px; +} + +.upload-file { + min-height: 56px; + @apply relative border border-input-border w-full; + + div { + @apply flex flex-row h-full items-center pl-md mt-sm flex-wrap; + + .file-upload-status { + @apply text-body-s-dt ml-sm; + } + } + input { + width: 160px; + @apply absolute top-0 left-0 opacity-0 h-full; + } +} + +@screen dt { + .multi-upload-wrap img { + width: 100%; + height: 158px; + } +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/ErrorMessage.scss b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/ErrorMessage.scss new file mode 100644 index 00000000000..07117cc830e --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/ErrorMessage.scss @@ -0,0 +1,6 @@ +@import url("../index.scss"); + +.digit-error-message { + @extend .alert-error; + @apply block text-body-s mb-md; +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/FormComposerV2.scss b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/FormComposerV2.scss new file mode 100644 index 00000000000..1fe70a1b7b4 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/FormComposerV2.scss @@ -0,0 +1,120 @@ +@import url("../index.scss"); + +.field-container { + display: flex; + align-items: center; + max-width: 540px; + @apply flex items-center; + + .component-in-front { + @apply flex justify-center items-center; + @extend .light-background; + @extend .light-input-border; + margin-top: 0; + border: 1px solid; + border-right: none; + padding: 7px; + } +} + +.card-date-input { + @apply absolute top-0 left-0 w-3/4 bg-white pl-sm border border-input-border border-solid border-r-0; + outline: transparent solid 1px; + height: 2.5rem; + @extend .light-input-border; +} +.text-input-width { + max-width: 540px; +} + +.text-input { + @apply relative w-full; + input { + background-color: transparent; + &:hover { + @apply border-2 border-solid border-primary-main; + @extend .light-input-border; + } + } +} +.employee-card-input-error { + @apply mb-lg pl-sm block w-full h-10 outline-none border-2 border-error border-solid bg-white leading-10 text-form-field text-text-primary; + @extend .light-input-border; + @extend .alert-error; +} +.card-input-error { + @apply mb-lg pl-sm block w-full h-10 outline-none border-2 border-error border-solid bg-white leading-10 text-form-field text-text-primary; + @extend .light-input-border; + @extend .alert-error; +} + +.employee-card-input { + @apply mb-lg pl-sm outline-none block border w-full h-10 border-input-border border-solid bg-white leading-10 text-form-field text-text-primary; + @extend .light-input-border; +} +.employee-card-input:disabled { + @apply border-grey-dark text-grey-dark !important; + pointer-events: none !important; + @extend .light-input-border; + @extend .light-text-color-disabled; +} +.employee-card-input--front { + width: fit-content !important; + display: flex; + align-items: center; + /* background: theme(colors.grey.mid); */ + @extend .light-background; + border-right: 0; + padding-right: 5px; +} +.employee-card-input-error { + @apply mb-lg pl-sm block w-full h-10 outline-none border-2 border-error border-solid bg-white leading-10 text-form-field text-text-primary; + @extend .light-input-border; + @extend .alert-error; +} + +.card-textarea, +.employee-card-textarea { + @apply block outline-none mt-md mb-lg border w-full border-input-border border-solid bg-white h-24 text-form-field text-text-primary p-sm; + @extend .light-input-border; +} +.employee-card-textarea { + @apply w-full; +} + +.citizen-card-input { + @apply mb-lg pl-sm outline-none block border w-full h-10 border-input-border border-solid bg-white leading-10 text-form-field text-text-primary; + @extend .light-input-border; +} +.citizen-card-input--front { + @extend .light-background; + width: fit-content !important; + display: flex; + align-items: center; + /* background: theme(colors.grey.mid); */ + border-right: 0; + padding-right: 5px; +} + +.break-line { + @extend .light-input-border; + @apply border-border my-lg; +} + +.primary-label-btn { + @apply flex; + gap: 10px; + + svg { + fill: theme(colors.primary.main); + } + + @extend .light-primary; + cursor: pointer; + font-weight: 500; + width: fit-content; +} + +.digit-form-composer-header{ + font-size:theme(digitv2.fontSize.heading-l-dt); +} \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/actionLinkV2.scss b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/actionLinkV2.scss new file mode 100644 index 00000000000..c41b0b25d07 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/actionLinkV2.scss @@ -0,0 +1,7 @@ +@import url("../index.scss"); + +.digit-action-links { + @extend .light-primary; + @apply text-text-btn mr-lg !important; + cursor: pointer; +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/actionbarV2.scss b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/actionbarV2.scss new file mode 100644 index 00000000000..e5a69acd35e --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/actionbarV2.scss @@ -0,0 +1,110 @@ +@import url("../index.scss"); + +.digit-action-bar-wrap { + @extend .light-text-color-primary; + @extend .light-paper-primary; + box-shadow: rgba(0, 0, 0, 0.16) 0 -2px 8px; + max-width: 100%; + z-index: 100; + + @apply left-0 bottom-0 w-full bg-white py-sm px-sm fixed text-right; + + div { + @apply w-full; + } + + .digit-menu-wrap { + @apply absolute bg-white text-left mb-xs z-30 cursor-pointer; + @extend .light-background; + bottom: 45px; + box-shadow: rgba(0, 0, 0, 0.14) 0 8px 10px 1px, rgba(0, 0, 0, 0.12) 0 3px 14px 2px, rgba(0, 0, 0, 0.2) 0 5px 5px -3px; + width: calc(100% - 16px); + right: 8px; + + div { + @apply h-12 pl-sm py-md text-body-l text-text-primary; + @extend .light-primary; + + &:hover { + @apply bg-grey-mid w-full; + @extend .light-background; + } + } + } +} + +@screen dt { + .digit-action-bar-wrap { + box-shadow: rgba(0, 0, 0, 0.16) 0 -2px 8px; + left: 0; + max-width: none; + z-index: 999; + + @apply fixed bottom-0 bg-white py-sm pr-lg text-right; + /* @extend .light-background; */ + + div { + width: calc(100% - 16px); + } + + .digit-menu-wrap { + bottom: 45px; + top: unset; + box-shadow: rgba(0, 0, 0, 0.14) 0 8px 10px 1px, rgba(0, 0, 0, 0.12) 0 3px 14px 2px, rgba(0, 0, 0, 0.2) 0 5px 5px -3px; + @apply absolute h-auto bg-white text-left mb-xs z-30; + width: 240px; + right: 24px; + + div { + @apply h-12 pl-sm py-md text-body-l text-text-primary; + + &:hover { + @apply bg-grey-mid w-full; + /* @extend .light-background; */ + } + } + } + } +} + +.digit-action-bar-wrap-registry { + div { + @apply w-full; + } + .digit-menu-wrap { + @apply absolute bg-white text-left mb-xs z-30 cursor-pointer; + box-shadow: rgba(0, 0, 0, 0.14) 0 8px 10px 1px, rgba(0, 0, 0, 0.12) 0 3px 14px 2px, rgba(0, 0, 0, 0.2) 0 5px 5px -3px; + width: 160px; + right: 60px; + @extend .light-background; + + div { + @apply h-12 pl-sm py-md text-body-l text-text-primary; + + &:hover { + @apply bg-grey-mid w-full; + @extend .light-background; + } + } + } + + .digit-search-add { + padding: 12px 16px; + @extend .light-primary; + color: rgb(244, 119, 56); + display: flex; + cursor: pointer; + } + + .digit-search-add-icon { + @extend .light-primary-button; + background: rgb(244, 119, 56); + border-radius: 50%; + height: 24px; + width: 24px; + display: flex; + justify-content: center; + align-items: center; + margin-left: 10px; + } +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/appContainerV2.scss b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/appContainerV2.scss new file mode 100644 index 00000000000..fda32e93240 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/appContainerV2.scss @@ -0,0 +1,55 @@ +@import url("../index.scss"); + +.app-container { + @extend .light-background; + width: 100%; + form { + .card { + max-width: 960px; + h2 { + @extend .light-text-color-primary; + text-align: left; + } + .field-container { + max-width: 540px; + } + button { + @extend .light-primary-button; + max-width: 240px; + } + .input-otp-wrap, + .card-text-button { + @extend .light-primary-button; + text-align: left; + } + } + } +} + +@screen dt { + .employee-app-container { + @apply w-full; + } + + .app-container { + width: 100%; + form { + .card { + max-width: 960px; + h2 { + text-align: left; + } + .field-container { + max-width: 540px; + } + button { + max-width: 240px; + } + .input-otp-wrap, + .card-text-button { + text-align: left; + } + } + } + } +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/backButtonV2.scss b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/backButtonV2.scss new file mode 100644 index 00000000000..68f7cf957c0 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/backButtonV2.scss @@ -0,0 +1,26 @@ +@import url("../index.scss"); + +.digit-back-button { + @extend .light-text-color-primary; + @extend .light-input-border; + width: fit-content; + @apply flex items-center cursor-pointer border-b font-rc text-text-btn ml-sm mb-md; + + img { + @apply flex; + } + + svg { + @apply flex; + } + + p { + @apply flex; + } +} + +@screen dt { + .digit-back-button { + margin-left: 0; + } +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/bannerV2.scss b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/bannerV2.scss new file mode 100644 index 00000000000..06c16970a7f --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/bannerV2.scss @@ -0,0 +1,120 @@ +@import url("../index.scss"); + +.digit-banner-success-wrap, +.digit-banner-emp-success-wrap { + @apply block bg-success w-full text-center text-white pt-md pb-sm mb-md; + + header { + @apply block mb-sm font-rc font-bold text-heading-xl; + } + + div { + img { + padding: 13.67px; + margin-left: auto; + margin-right: auto; + @apply border border-solid border-white rounded-full h-16 w-16 bg-white mb-md; + } + + svg { + padding: 13.67px; + margin-left: auto; + margin-right: auto; + @apply border border-solid border-white rounded-full h-16 w-16 bg-white mb-md; + } + + svg.payment-svg { + border: unset; + background-color: unset; + @apply rounded-full; + } + + h2 { + @apply font-bold text-caption-m mb-sm; + } + + p { + @apply font-bold text-caption-l; + } + } +} + +.digit-banner-error-wrap, +.digit-banner-emp-error-wrap { + @apply block bg-error w-full text-center text-white pt-md pb-sm mb-md; + + + header { + @apply block mb-sm font-rc font-bold text-heading-xl; + } + + img { + margin-left: auto; + margin-right: auto; + padding: 13.67px; + @apply border border-solid border-white rounded-full bg-white h-16 w-16 mb-md; + } + + svg { + margin-left: auto; + margin-right: auto; + padding: 13.67px; + @apply border border-solid border-white rounded-full bg-white h-16 w-16 mb-md; + } +} + +@screen dt { + .digit-banner-success-wrap { + header { + @apply text-heading-xl-dt; + } + } + .digit-banner-emp-success-wrap { + width: calc(100%); + header { + @apply text-heading-xl-dt; + } + } + + .digit-banner-error-wrap { + width: 100%; + header { + @apply text-heading-xl-dt; + } + } + + .digit-banner-emp-error-wrap { + width: calc(100%); + header { + @apply text-heading-xl-dt; + } + } +} + +.banner { + @apply flex justify-center items-center; + height: calc(100vh - 80px); + background: linear-gradient(rgba(11, 75, 102, 0.8), rgba(11, 75, 102, 0.8)), var(--banner-url) center center; + + .bannerCard { + min-width: 400px; + } + .bannerLogo { + width: 80px; + height: 40px; + object-fit: contain; + padding-right: 10px; + margin-right: 10px; + border-right: 1px solid theme(colors.text.primary); + } + .bannerHeader { + @apply flex justify-center items-center; + margin-bottom: 24px; + } +} + +.banner-container { + flex-direction: column; + justify-content: center; + align-items: center !important; +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/bodyContainerV2.scss b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/bodyContainerV2.scss new file mode 100644 index 00000000000..9836a7104df --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/bodyContainerV2.scss @@ -0,0 +1,39 @@ +@import url("../index.scss"); + +body { + @extend .light-background; +} + +.body-container { + @extend .light-background; + @apply h-full min-h-screen overflow-x-hidden; +} + +.body-container::-webkit-scrollbar { + display: none; +} + +.h1 { + @extend .light-text-color-primary; + @apply text-heading-l font-bold mb-md ml-md; +} + +.link-label { + @extend .light-primary; + @apply block mb-md ml-md cursor-pointer; + + &:hover { + @extend .light-text-color-primary; + } +} + +@screen dt { + .h1 { + margin-left: 0; + @apply text-heading-l-dt; + } + + .link-label { + margin-left: 0; + } +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/breadCrumbV2.scss b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/breadCrumbV2.scss new file mode 100644 index 00000000000..2b13c868290 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/breadCrumbV2.scss @@ -0,0 +1,31 @@ +@import url("../index.scss"); + +.digit-bread-crumb { + @extend .light-text-color-secondary; + font-size: 14px; + display: flex; + margin-bottom: 10px; +} +.digit-bread-crumb--item { + margin-left: 5px; + + &:not(:last-child):after { + content: " /"; + } + + button { + outline: none; + } + + .last { + @extend .light-text-color-primary; + } + + span { + cursor: pointer; + } +} +ol, +ul { + list-style: none; +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/breakLineV2.scss b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/breakLineV2.scss new file mode 100644 index 00000000000..1b67e4bcc81 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/breakLineV2.scss @@ -0,0 +1,6 @@ +@import url("../index.scss"); + +.digit-break-line { + @apply border-solid border-2; + @extend .light-input-border; +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/buttonsV2.scss b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/buttonsV2.scss new file mode 100644 index 00000000000..13334e22958 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/buttonsV2.scss @@ -0,0 +1,40 @@ +@import url("../index.scss"); + +.digit-button-primary { + height: fit-content; + @extend .light-primary-button; + @apply text-center cursor-pointer outline-none px-lg; + + &.disabled { + opacity: 0.5; + } + &:focus { + @apply outline-none; + } + + h2 { + @apply font-rc font-medium text-legend text-white; + } +} + +.digit-button-secondary { + height: fit-content; + @extend .light-paper-secondary; + @apply text-center cursor-pointer border-primary-main border-b-2 border-solid outline-none px-lg; + + &:focus { + @apply outline-none; + } + + h2 { + @extend .light-primary; + @apply font-rc font-medium text-legend; + } + .disabled { + opacity: 0.5; + } +} + +.submit-bar:focus { + @apply outline-none !important; +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/cardV2.scss b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/cardV2.scss new file mode 100644 index 00000000000..ee75e5a9689 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/cardV2.scss @@ -0,0 +1,385 @@ +@import url("../index.scss"); + +.digit-card { + @apply bg-white m-sm px-md pt-md pb-lg shadow-card; + @extend .light-paper-primary; + border-radius: 4px; + max-width: 960px; + + .digit-card-header { + @extend .light-primary; + @apply text-heading-xl font-bold font-rc align-middle text-left mb-md; + } + + .digit-card-sub-header { + @extend .light-primary; + @apply text-caption-xl font-bold align-middle text-left mb-sm; + } + + .digit-card-caption { + @extend .light-text-color-secondary; + @apply text-caption-xl mb-sm; + } + + .digit-card-text { + @extend .light-text-color-secondary; + @apply text-body-l align-middle text-left mb-lg; + + span { + @extend .light-text-color-primary; + } + } + + .digit-card-text-primary { + @extend .light-primary; + @apply text-body-l; + } + + .digit-card-text-button { + @extend .light-primary; + @apply text-text-btn; + } + + .digit-card-label { + @extend .light-primary; + @apply text-legend mb-sm; + } + + .digit-card-label-error { + @extend .alert-error; + @apply block text-body-s text-error mb-md; + } + + .digit-card-label-desc { + @extend .light-text-color-secondary; + @apply font-bold text-heading-s mb-md; + } + + .digit-card-link { + @extend .light-primary; + @apply block text-center text-link mt-md cursor-pointer; + } +} + +.digit-validation-error { + @extend .alert-error; + @apply block text-body-s text-error; +} + +.digit-docsDescription { + @extend .light-text-color-primary; +} + +.digit-field-container { + @apply flex items-center; +} + +.digit-employee-card { + @extend .light-paper-primary; + @apply shadow-card p-md mb-xl; + border-radius: 4px; + + .digit-card-header { + @extend .light-primary; + @apply text-heading-xl font-bold font-rc align-middle text-left mb-md; + } + + .digit-card-sub-header, + .digit-employee-card-sub-header { + @extend .light-primary; + @apply text-caption-xl font-bold align-middle text-left; + } + + .digit-card-section-header { + @extend .light-primary; + @apply text-heading-m font-bold; + } + + .digit-card-section-sub-text { + @extend .light-primary; + @apply text-body-s; + } + + .digit-card-caption { + @extend .light-text-color-secondary; + @apply text-caption-xl mb-sm; + } + + .digit-card-text { + @extend .light-text-color-secondary; + @apply text-body-l align-middle text-left mb-lg; + + span { + @extend .light-text-color-primary; + } + } + + .card-text-primary { + @extend .light-primary; + @apply text-body-l; + } + + .card-text-button { + @extend .light-primary; + @apply text-text-btn; + } + + .card-label { + @extend .light-primary; + @apply text-legend mb-md; + } + + .card-label-error { + @extend .alert-error; + @apply block text-body-s text-error mb-md; + } + + .card-label-desc { + @extend .light-text-color-secondary; + @apply font-bold text-heading-s mb-md; + } + + .card-link { + @extend .light-primary; + @apply block text-center text-link text-link-normal mt-md; + } + + .card-search-heading { + margin-right: 0px !important; + margin-left: 0px !important; + margin-bottom: 0px !important; + padding-bottom: 0px; + padding-left: 25px; + } +} + +.header-wrap { + @apply flex mb-md; + + .header-start { + margin-right: auto; + } + + .header-content { + } + + .header-end { + margin-left: auto; + } +} + +.card-emp { + @extend .card; + padding-right: 0; + padding-top: 0; + padding-left: 0; + @apply bg-white m-sm; + @extend .light-background; +} + +.submit-bar { + @extend .light-primary-button; + @apply h-10 text-center w-full outline-none; + box-shadow: inset 0px -2px 0px theme(colors.text.primary); + cursor: pointer; + + &:focus { + @apply outline-none; + } + + header { + @apply font-rc font-medium text-legend text-white leading-10; + } +} + +.submit-bar-disabled { + @apply h-10 bg-primary-main text-center w-full outline-none opacity-50; + + &:focus { + @apply outline-none; + } + + header { + @apply font-rc font-medium text-legend text-white leading-10; + } +} + +@screen dt { + .submit-bar, + .submit-bar-disabled { + width: 240px; + } + + .card { + display: flex; + flex-direction: column; + + .card-header { + @apply text-heading-xl-dt; + } + + .card-sub-header { + @apply text-heading-l-dt; + } + + .card-caption { + @apply text-caption-xl-dt; + } + + .card-text, + .card-text-primary { + @apply text-body-l-dt; + } + + .card-link { + @apply text-left; + } + } + + .digit-employee-card { + @apply mb-md mx-md !important; + + &.digit-filter { + margin-left: auto; + margin-right: auto; + } + + .digit-card-header { + @apply text-heading-xl-dt; + } + + .digit-card-sub-header { + @apply text-heading-l-dt; + } + + .digit-employee-card-sub-header { + margin-bottom: 40px; + @apply text-heading-l-dt; + } + + .digit-card-section-header { + margin-bottom: 40px; + @apply text-heading-m-dt; + } + + .digit-card-section-sub-text { + @apply text-text-primary text-body-s-dt; + } + + .digit-card-search-heading { + margin-right: 0px !important; + margin-left: 0px !important; + margin-bottom: 0px !important; + padding-bottom: 0px; + padding-left: 25px; + } + + .digit-card-caption { + @apply text-caption-xl-dt; + } + + .digit-card-text, + .digit-card-text-primary { + @apply text-body-l-dt; + } + + .digit-card-link { + @apply text-left; + } + + .digit-label-field-pair { + @apply flex items-center; + + h2 { + width: 30%; + } + + .field { + width: 50%; + margin-right: 20%; + .field { + margin-right: unset; + } + } + } + + .digit-field-container { + span { + border: 2px solid black; + background: rgb(247, 247, 247); + width: 40px; + height: 40px; + display: flex; + justify-content: center; + align-items: center; + margin-top: -16px; + border-right: none; + } + } + } + + .digit-header-wrap { + @apply flex mb-md; + + .header-start { + margin-right: auto; + } + + .header-content { + } + + .header-end { + margin-left: auto; + } + } +} + +.digit-card-section-header { + @extend .light-text-color-primary; + @apply text-text-primary text-heading-m font-bold; +} + +.digit-card-search-heading { + margin-right: 0px !important; + margin-left: 0px !important; + margin-bottom: 0px !important; + padding-bottom: 0px; + padding-left: 25px; +} + +.digit-card-label-error { + @extend .alert-error; + @apply block text-body-s text-error mb-md; +} + +.digit-employee-card-override { + margin-left: 0px !important; +} + +.digit-employee-application-details { + display: flex !important; + justify-content: space-between !important; + max-height: 60px !important; + height: 60px !important; +} +.digit-employee-main-application-details { + padding: 10px !important; +} + +.digit-employee-mulitlink-main-div { + @extend .light-primary; + z-index: 10 !important; + max-width: 41% !important; +} + +.digit-employee-download-btn-className { + position: unset !important; + display: flex !important; + justify-content: flex-end !important; +} + +.digit-employee-options-btn-className { + position: unset !important; + margin: 0 !important; + width: 100% !important; +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/checkboxV2.scss b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/checkboxV2.scss new file mode 100644 index 00000000000..c19cfe8c247 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/checkboxV2.scss @@ -0,0 +1,61 @@ +@import url("../index.scss"); + +.digit-checkbox-wrap { + @apply flex mb-md relative items-baseline; + + input { + width: 38px; + height: 38px; + @apply opacity-0 absolute top-0 left-0 z-10; + @extend .light-input-border; + } + + .input-emp { + @extend input; + width: 24px; + height: 24px; + } + + .digit-custom-checkbox { + width: 38px; + height: 38px; + @apply absolute top-0 left-0 border border-solid border-input-border z-0; + @extend .light-input-border; + + img { + @apply opacity-0; + } + + svg { + @apply opacity-0; + } + } + + .digit-custom-checkbox-emp { + @extend .digit-custom-checkbox; + width: 24px; + height: 24px; + } + + input:checked ~ .digit-custom-checkbox, + input:hover ~ .digit-custom-checkbox { + @apply border-2 border-primary-main; + @extend .light-input-border; + } + + input:checked ~ .digit-custom-checkbox img { + @apply opacity-100; + } + + input:checked ~ .digit-custom-checkbox svg { + @apply opacity-100; + width: 35px; + height: 35px; + } + + .label { + margin-left: 56px; + @apply text-form-field text-text-primary; + @extend .light-text-color-primary; + } +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/checkpointV2.scss b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/checkpointV2.scss new file mode 100644 index 00000000000..f751e8a910b --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/checkpointV2.scss @@ -0,0 +1,71 @@ +@import url("../index.scss"); + +.digit-checkpoint-connect-wrap { + padding-bottom: 40px; + @apply relative; +} +.digit-checkpoint-done { + @apply flex items-center; + + h2 { + z-index: 1; + width: 24px; + height: 24px; + border-radius: 50%; + @apply border-b border-solid border-primary-main bg-primary-main; + } + + header { + @apply text-heading-s ml-md; + + p { + margin-top: 4px; + @extend .light-text-color-secondary; + @apply text-heading-s; + } + } +} + +.digit-checkpoint { + @apply flex items-center; + + h2 { + z-index: 1; + width: 24px; + height: 24px; + border-radius: 50%; + --text-opacity: 1; + @apply border-b border-solid border-border bg-border; + } + + header { + @apply text-heading-s ml-md; + + p { + margin-top: 4px; + @extend .light-text-color-secondary; + @apply text-heading-s; + } + } +} + +.digit-checkpoint-connect { + margin-left: 12px; + margin-top: 22px; + @apply absolute top-0 left-0 h-full border-l border-solid border-border; +} + +.digit-checkpoint-comments-wrap { + max-width: 560px; + @apply bg-grey-mid p-sm mt-sm; + + h4 { + @extend .light-text-color-primary; + @apply text-heading-s; + } + + p { + @extend .light-text-color-secondary; + @apply text-body-s-dt; + } +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/collapseAndExpandGroups.scss b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/collapseAndExpandGroups.scss new file mode 100644 index 00000000000..3e0b65a668d --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/collapseAndExpandGroups.scss @@ -0,0 +1,60 @@ +@import url("../../digitv2/index.scss"); + +.digit-expand-collapse-wrapper { + display: flex; + flex-direction: column; + margin-top: 1rem; +} + +.digit-expand-collapse-header { + background-color: #f2f2f2; + display: grid; + grid-template-columns: 1fr 1fr; + align-items: center; + padding: 12px; + position: relative; + font-weight: bolder; + border: 1px solid #828282; + border-radius: 4px; +} + +.digit-icon-toggle { + position: absolute; + right: 10px; + top: 50%; + transform: translate(0%, -50%); + cursor: pointer; + span{ + display: inline-flex; + align-items: center; + + h5{ + color: theme(colors.primary.main); + display: inline; + } + } +} + +.digit-expand-collapse-header .label { + display: block; + text-align: left; +} + +.digit-expand-collapse-header .value { + display: block; + text-align: right; + margin-right: 2rem; +} + +.digit-toggling-wrapper.digit-collapse { + flex: none; + overflow: hidden; + height: 0; + transition: 0.2s ease-in-out; +} + +.digit-toggling-wrapper { + flex: 1; + transition: 0.2s ease-in-out; + box-sizing: border-box; +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/dateWrapV2.scss b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/dateWrapV2.scss new file mode 100644 index 00000000000..3d2dc3db77b --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/dateWrapV2.scss @@ -0,0 +1,12 @@ +.digit-date-picker { + @apply relative w-full cursor-pointer; + .citizen { + max-width: 540px; + } + .digit-employee-card-input { + @apply mb-lg pl-sm outline-none block border w-full h-10 border-input-border border-solid bg-white leading-10 text-form-field text-text-primary; + @extend .light-input-border; + width: calc(100%-62px); + padding-right: 9px; + } +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/displayPhotosV2.scss b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/displayPhotosV2.scss new file mode 100644 index 00000000000..77bd2d221bc --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/displayPhotosV2.scss @@ -0,0 +1,33 @@ +.digit-photos-wrap { + max-width: 640px; + @apply flex pt-md; + + img { + width: calc(33% - 9.333px); + margin-right: 14px; + } + + svg { + width: calc(33% - 9.333px); + margin-right: 14px; + } + + .last { + width: calc(33% - 9.333px); + } +} + +.digit-image-pdf-icon { + @apply flex flex-wrap justify-start content-center; + .digit-url { + min-width: 100px; + margin-right: 10px; + max-width: 100px; + height: auto; + .digit-icon { + background: #f6f6f6; + padding: 8px; + width: 100px; + } + } +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/headerV2.scss b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/headerV2.scss new file mode 100644 index 00000000000..9f514c0d983 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/headerV2.scss @@ -0,0 +1,6 @@ +@import url("../index.scss"); + +.digit-header { + @extend .light-text-color-primary; + @apply text-heading-l font-bold mb-md ml-md; +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/infoBannerV2.scss b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/infoBannerV2.scss new file mode 100644 index 00000000000..132ee6c0b96 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/infoBannerV2.scss @@ -0,0 +1,37 @@ +@import url("../index.scss"); + +.digit-info-banner-wrap { + @apply bg-opacity-25 m-sm p-md; + max-width: 960px; + + @extend .alert-info-bg; + border-radius: 4px; + svg { + margin-top: 5px; + @apply rounded-full; + } + + div { + @apply flex items-center; + } + + h2 { + @apply text-heading-m text-link-normal mb-md font-bold ml-sm; + } + + p { + @apply text-body-l text-link-normal whitespace-pre-line; + } +} + +@screen dt { + .digit-info-banner-wrap { + h2 { + @apply text-heading-m-dt; + } + + p { + @apply text-body-l-dt; + } + } +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/keynoteV2.scss b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/keynoteV2.scss new file mode 100644 index 00000000000..02fe872b5c6 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/keynoteV2.scss @@ -0,0 +1,35 @@ +.digit-key-note-pair { + @apply mb-md; + + h3 { + margin-bottom: 4px; + @apply font-bold text-text-primary text-heading-s; + } + + p { + @apply text-text-primary text-body-l; + } + .digit-key-note-container { + display: inline-flex; + .digit-unmask-container { + display: inline-flex; + width: fit-content; + margin-left: 10px; + margin-top: 5px; + } + } + .digit-caption { + @apply text-body-l text-text-secondary; + } +} + +@screen dt { + .digit-key-note-pair { + p { + @apply text-body-l-dt; + } + .digit-caption { + @apply text-body-l-dt text-text-secondary; + } + } +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/loaderV2.scss b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/loaderV2.scss new file mode 100644 index 00000000000..7e435da688a --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/loaderV2.scss @@ -0,0 +1,81 @@ +@import url("../index.scss"); + +.digit-screen-loader { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + display: flex; + justify-content: center; + align-items: center; + z-index: 9999; + @extend .light-background; + .digit-ldio-pjg92h09b2o div { + position: absolute; + width: 52px; + height: 52px; + border: 12px solid theme(digitv2.lightTheme.primary); + border-top-color: transparent; + border-radius: 50%; + } +} + +.digit-page-loader, +.digit-module-loader { + text-align: center; +} + +.digit-page-loader { + padding-top: 88px; +} + +.digit-module-loader { + padding: 16px; +} + +@keyframes digit-ldio-pjg92h09b2o { + 0% { + transform: translate(-50%, -50%) rotate(0deg); + } + + 100% { + transform: translate(-50%, -50%) rotate(360deg); + } +} + +.digit-ldio-pjg92h09b2o div { + position: absolute; + width: 52px; + height: 52px; + border: 12px solid theme(colors.secondary); + border-top-color: transparent; + border-radius: 50%; +} + +.digit-ldio-pjg92h09b2o div { + animation: digit-ldio-pjg92h09b2o 1s linear infinite; + top: 50px; + left: 50px; +} + +.digit-loadingio-spinner-rolling-faewnb8ux8 { + width: 48px; + height: 48px; + display: inline-block; + overflow: hidden; + background: none; +} + +.digit-ldio-pjg92h09b2o { + width: 100%; + height: 100%; + position: relative; + transform: translateZ(0) scale(0.48); + backface-visibility: hidden; + transform-origin: 0 0; +} + +.digit-ldio-pjg92h09b2o div { + box-sizing: content-box; +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/mobileNumberV2.scss b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/mobileNumberV2.scss new file mode 100644 index 00000000000..5c7f6088047 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/mobileNumberV2.scss @@ -0,0 +1,33 @@ +@import url("../index.scss"); + +.digit-mobile-number-container { + @apply flex items-center; + + .digit-citizen-card-input--front { + @extend .light-background; + width: fit-content !important; + display: flex; + align-items: center; + /* background: theme(colors.grey.mid); */ + border-right: 0; + padding-right: 5px; + } + + .digit-citizen-card-input { + @apply mb-lg pl-sm outline-none block border w-full h-10 border-input-border border-solid bg-white leading-10 text-form-field text-text-primary; + } + + .digit-citizen-card-input--front { + width: fit-content !important; + display: flex; + align-items: center; + background: theme(colors.grey.mid); + border-right: 0; + padding-right: 5px; + } + .digit-employee-card-input-error { + @apply mb-lg pl-sm block w-full h-10 outline-none border-2 border-solid bg-white leading-10 text-form-field text-text-primary; + @extend .light-input-border; + @extend .alert-error; + } +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/multiSelectDropdownV2.scss b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/multiSelectDropdownV2.scss new file mode 100644 index 00000000000..0862eebe234 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/multiSelectDropdownV2.scss @@ -0,0 +1,92 @@ +@import url("../index.scss"); + +.digit-multi-select-dropdown-wrap { + margin-bottom: 24px; + @apply relative text-form-field text-text-primary w-full; + .digit-master, + .digit-master-active { + @apply relative border border-solid border-input-border h-10 w-full; + input[type="text"] { + @apply absolute top-0 left-0 p-sm pl-sm min-h-full min-w-full opacity-0; + &:focus { + @apply outline-none; + } + } + .digit-label { + @apply flex justify-between p-sm w-full h-full; + svg { + @apply h-6 w-6; + } + } + + &:hover { + @apply border-2 border-solid border-primary-main; + } + } + + .digit-master-active { + @apply border-2 border-primary-main; + input[type="text"] { + @apply opacity-100; + } + .digit-label { + @apply hidden; + } + } + + .digit-server { + box-shadow: 0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 2px rgba(0, 0, 0, 0.12), 0 5px 5px -3px rgba(0, 0, 0, 0.2); + top: 40px; + + max-height: 20vmax; + overflow: scroll; + @apply absolute min-w-full z-20; + div { + @apply flex w-full bg-white; + justify-content: flex-start; + align-items: center; + &:hover { + @apply bg-grey-mid; + } + input { + height: 44px; + @apply absolute min-w-full opacity-0 z-20 cursor-pointer; + } + p { + padding: 12px; + margin-top: 5px; + margin-bottom: 5px; + @apply text-form-field text-text-primary; + } + .digit-custom-checkbox { + height: 28px; + width: 28px; + @apply border border-solid border-input-border m-sm; + svg { + @apply opacity-0 z-10; + } + } + input:checked ~ .digit-custom-checkbox, + input:hover ~ .digit-custom-checkbox { + @apply border-2 border-primary-main; + } + + input:checked ~ .digit-custom-checkbox svg { + @apply opacity-100; + } + } + } + .digit-cursorPointer { + @apply cursor-pointer; + } + .digit-master { + .digit-label { + p { + white-space: pre; + margin: auto; + margin-left: 0px; + padding-left: 1%; + } + } + } +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/noresultsfoundV2.scss b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/noresultsfoundV2.scss new file mode 100644 index 00000000000..aedadebe94f --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/noresultsfoundV2.scss @@ -0,0 +1,11 @@ +.digit-no-data-found { + height: 100%; + width: 100%; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + .digit-error-msg { + margin-top: 2rem; + } +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/otpInputV2.scss b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/otpInputV2.scss new file mode 100644 index 00000000000..b16e2c90182 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/otpInputV2.scss @@ -0,0 +1,15 @@ +.digit-input-otp-wrap { + @apply mb-lg; + + input { + @apply border-2 border-solid border-input-border outline-none h-10 w-10 text-form-field text-text-primary mr-sm mb-sm text-center; + } + input::-webkit-outer-spin-button, + input::-webkit-inner-spin-button { + -webkit-appearance: none; + margin: 0; + } + input[type="number"] { + -moz-appearance: textfield; + } +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/popUpV2.scss b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/popUpV2.scss new file mode 100644 index 00000000000..94f6fc0188a --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/popUpV2.scss @@ -0,0 +1,16 @@ +.digit-popup-wrap { + background: rgba(0, 0, 0, 0.7); + @apply flex fixed w-full h-full overflow-auto top-0 left-0 min-h-screen; + z-index: 10000; +} + +@screen dt { + .digit-popup-wrap { + background: rgba(0, 0, 0, 0.7); + @apply min-h-screen; + } +} + +.digit-popup-close-icon { + @apply flex justify-end; +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/radiobtnV2.scss b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/radiobtnV2.scss new file mode 100644 index 00000000000..638271e149a --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/radiobtnV2.scss @@ -0,0 +1,51 @@ +@import url("../index.scss"); + +.digit-radio-wrap { + @apply my-sm block leading-10 mb-lg; + + div { + @apply block mb-md; + } + + .digit-radio-btn-wrap { + @apply block float-left relative; + &:hover { + .digit-radio-btn-checkmark { + @apply border-primary-main; + } + } + } + + .digit-radio-btn { + @apply opacity-0 absolute cursor-pointer h-10 w-10; + } + + .digit-radio-btn-checkmark { + @extend .light-input-border; + @apply h-10 w-10 border border-input-border border-solid rounded-full block; + } + + label { + @extend .light-text-color-primary; + @apply text-text-primary text-form-field ml-md; + } + + .digit-radio-btn-checkmark:after { + content: ""; + } + + .digit-radio-btn-wrap input:checked ~ .digit-radio-btn-checkmark { + /* @extend .light-input-border; */ + @apply border-2 border-primary-main; + } + + .digit-radio-btn-wrap input:checked ~ .digit-radio-btn-checkmark:after { + /* @extend .light-background; */ + @apply block bg-primary-main h-5 w-5 rounded-full absolute top-10 left-10; + } +} +.digit-reverse-radio-selection-wrapper { + div { + @apply flex flex-row-reverse place-content-between items-center; + } +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/ratingV2.scss b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/ratingV2.scss new file mode 100644 index 00000000000..98e9e6d5642 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/ratingV2.scss @@ -0,0 +1,33 @@ +.digit-rating-star-wrap { + @apply flex w-full mb-lg; + img { + width: 40px; + height: 38px; + display: block; + @apply mr-sm; + } + + svg { + width: 40px; + height: 38px; + display: block; + @apply mr-sm; + } +} + +@screen dt { + .digit-rating-star-wrap { + @apply w-2/5; + } +} + +.digit-rating-with-text { + @apply flex place-items-center w-full; + + svg { + width: 24px; + height: 38px; + display: block; + @apply mr-sm; + } +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/selectdropdownV2.scss b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/selectdropdownV2.scss new file mode 100644 index 00000000000..a4f4118c91d --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/selectdropdownV2.scss @@ -0,0 +1,170 @@ +.digit-employee-select-wrap { + @apply mb-lg relative; + + .digit-select { + @extend .light-input-border; + @apply relative block w-full h-10 border border-solid border-input-border; + &:hover { + @extend .light-input-border; + @apply border-2 border-solid border-primary-main; + } + input[type="text"] { + width: calc(100% - 32px); + background-color: transparent; + @extend .light-input-border; + @extend .light-text-color-primary; + @apply absolute z-10 w-full h-full outline-none text-text-primary text-form-field pl-sm; + } + + p { + padding-top: 9px; + @extend .light-text-color-primary; + @apply text-form-field text-text-primary float-left ml-sm; + } + + img { + @apply float-right h-6 w-6 mt-sm mr-sm; + } + + svg { + @apply absolute right-0 float-right h-6 w-6 mt-sm mr-sm; + } + } + + .digit-select-active { + @apply relative block w-full h-10 border-2 border-solid border-primary-main; + @extend .light-input-border; + + input[type="text"] { + width: calc(100% - 32px); + background-color: transparent; + @extend .light-background; + @extend .light-text-color-primary; + + @apply absolute z-10 w-full h-full outline-none text-text-primary text-form-field pl-sm; + } + + p { + @extend .light-text-color-primary; + @apply text-form-field text-text-primary float-left ml-sm; + } + + p { + padding-top: 9px; + } + + img { + @apply float-right h-6 w-6 mt-sm mr-sm; + } + + svg { + @apply absolute right-0 float-right h-6 w-6 mt-sm mr-sm; + } + } + + .digit-options-card { + width: 100% !important; + box-shadow: 0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 2px rgba(0, 0, 0, 0.12), 0 5px 5px -3px rgba(0, 0, 0, 0.2); + max-height: 400px; + overflow: auto; + @apply absolute z-20 mt-xs bg-white max-w-full; + + p { + padding-top: 14px; + @extend .light-text-color-primary; + @apply w-full h-12 pl-sm text-text-primary text-form-field; + + &:hover { + @apply bg-grey-mid; + @extend .light-background; + } + } + } +} + +.digit-employee-select-wrap--elipses { + width: 85% !important; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.digit-select-wrap { + @apply mb-lg relative; + max-width: 540px; + + .digit-select { + @apply relative block w-full h-10 border border-solid border-input-border; + @extend .light-input-border; + + input[type="text"] { + width: calc(100% - 32px); + background-color: transparent; + @extend .light-text-color-primary; + @apply absolute z-10 w-full h-full outline-none text-text-primary text-form-field pl-sm; + } + + p { + padding-top: 9px; + @extend .light-text-color-primary; + @apply text-form-field text-text-primary float-left ml-sm; + } + + img { + @apply float-right h-6 w-6 mt-sm mr-sm; + } + + svg { + @apply absolute right-0 float-right h-6 w-6 mt-sm mr-sm; + } + } + + .digit-select-active { + @extend .light-input-border; + @apply relative block w-full h-10 border-2 border-solid border-primary-main; + + input[type="text"] { + width: calc(100% - 32px); + background-color: transparent; + @extend .light-text-color-primary; + @apply absolute z-10 w-full h-full outline-none text-text-primary text-form-field pl-sm; + } + + p { + @extend .light-text-color-primary; + @apply text-form-field text-text-primary float-left ml-sm; + } + + p { + padding-top: 9px; + } + + img { + @apply float-right h-6 w-6 mt-sm mr-sm; + } + + svg { + @apply absolute right-0 float-right h-6 w-6 mt-sm mr-sm; + } + } + + .digit-options-card { + width: 100% !important; + box-shadow: 0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 2px rgba(0, 0, 0, 0.12), 0 5px 5px -3px rgba(0, 0, 0, 0.2); + @extend .light-background; + @apply absolute z-20 mt-xs bg-white; + + p { + padding-top: 14px; + @extend .light-text-color-primary; + @apply w-full h-12 pl-sm text-text-primary text-form-field; + + &:hover { + @apply bg-grey-mid; + } + } + } +} + +@screen dt { +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/tagV2.scss b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/tagV2.scss new file mode 100644 index 00000000000..a202bbd671f --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/tagV2.scss @@ -0,0 +1,28 @@ +.digit-tag-container { + @apply flex flex-wrap mb-md; + + .digit-tag { + @apply bg-grey-mid rounded-2xl pt-sm pb-sm flex justify-between items-center; + padding-left: 12px; + padding-right: 12px; + font-size: 14px; + margin-left: 2px; + height: 2rem; + margin-top: 1rem; + .digit-text { + padding-right: 5px; + max-width: calc(100% - 24px); + height: 22px; + overflow: hidden; + text-overflow: clip; + } + + &:hover { + @apply cursor-pointer; + + .close { + fill: black; + } + } + } +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/telephoneV2.scss b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/telephoneV2.scss new file mode 100644 index 00000000000..0953ca8d717 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/telephoneV2.scss @@ -0,0 +1,18 @@ +.digit-telephone { + @apply flex items-baseline; + img, + svg { + height: 22px; + width: 20px; + @apply text-primary-main ml-sm items-center; + margin-left: 0px; + } + + p { + @apply text-text-primary text-body-l pl-sm; + } +} + +.digit-call { + @apply flex text-text-secondary text-body-l; +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/textInputV2.scss b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/textInputV2.scss new file mode 100644 index 00000000000..863500eb5e4 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/textInputV2.scss @@ -0,0 +1,123 @@ +@import url("../index.scss"); + +.digit-card-input-error { + @apply mb-lg pl-sm block w-full h-10 outline-none border-2 border-error border-solid bg-white leading-10 text-form-field text-text-primary; +} +.digit-text-input { + @apply relative w-full; +} + +.digit-text-input-width { + max-width: 540px; +} +.digit-card-input { + @apply mb-lg pl-sm outline-none mt-sm block border w-full h-10 border-input-border border-solid bg-white leading-10 text-form-field text-text-primary; +} + +.digit-card-input-error { + @apply mb-lg pl-sm block w-full h-10 outline-none border-2 border-error border-solid bg-white leading-10 text-form-field text-text-primary; +} + +.digit-employee-card-input { + @apply mb-lg pl-sm outline-none block border w-full h-10 border-input-border border-solid bg-white leading-10 text-form-field text-text-primary; +} +.digit-employee-card-input:disabled { + @apply border-grey-dark text-grey-dark !important; + pointer-events: none !important; +} +.digit-employee-card-input--front { + width: fit-content !important; + display: flex; + align-items: center; + background: theme(colors.grey.mid); + border-right: 0; + padding-right: 5px; +} +.digit-employee-card-input-error { + @apply mb-lg pl-sm block w-full h-10 outline-none border-2 border-error border-solid bg-white leading-10 text-form-field text-text-primary; +} + +.digit-card-textarea, +.digit-employee-card-textarea { + @apply block outline-none mt-md mb-lg border w-full border-input-border border-solid bg-white h-24 text-form-field text-text-primary p-sm; +} + +.digit-inputWrapper { + display: flex; + justify-content: flex-start; + max-width: 500px; + + div { + max-width: 80px; + } + + span { + margin-top: 16px; + margin-left: 10%; + margin-right: 10%; + } +} + +@screen dt { + .digit-card-input { + width: 480px; + } + + .digit-card-input-emp { + width: 240px; + } + + .digit-card-input-error { + width: 480px; + } + + .digit-employee-card-input { + @apply w-full; + } + + .digit-employee-card-input-error { + @apply w-full; + } + + .digit-card-textarea { + /* //width: 480px; */ + @apply w-full; + max-width: 540px; + } + + .digit-employee-card-textarea { + @apply w-full; + } + + .card-input-emp { + width: 240px; + } +} + +.digit-citizen-card-input { + @apply mb-lg pl-sm outline-none block border w-full h-10 border-input-border border-solid bg-white leading-10 text-form-field text-text-primary; +} + +.digit-citizen-card-input--front { + width: fit-content !important; + display: flex; + align-items: center; + background: theme(colors.grey.mid); + border-right: 0; + padding-right: 5px; +} + +.digit-employee-card-input-error { + @apply mb-lg pl-sm block w-full h-10 outline-none border-2 border-error border-solid bg-white leading-10 text-form-field text-text-primary; + @extend .light-input-border; + @extend .alert-error; +} +.digit-card-input-error { + @apply mb-lg pl-sm block w-full h-10 outline-none border-2 border-error border-solid bg-white leading-10 text-form-field text-text-primary; + @extend .light-input-border; + @extend .alert-error; +} +.disabled { + @apply border-grey-dark text-grey-dark !important; + pointer-events: none !important; +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/textareaV2.scss b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/textareaV2.scss new file mode 100644 index 00000000000..1be8174b0fe --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/textareaV2.scss @@ -0,0 +1,11 @@ +.digit-card-textarea, +.digit-employee-card-textarea { + @apply block outline-none mt-md mb-lg border w-full border-input-border border-solid bg-white h-24 text-form-field text-text-primary p-sm; + @extend .light-input-border; +} +.digit-employee-card-textarea { + @apply w-full; +} +.digit-cell-text { + color: theme(colors.text.secondary); +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/uploadFileV2.scss b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/uploadFileV2.scss new file mode 100644 index 00000000000..8ebd72365bc --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/components/uploadFileV2.scss @@ -0,0 +1,146 @@ +.digit-upload-wrap { + @apply flex w-full h-40 bg-grey-light relative mb-lg px-sm border border-border border-dashed; + max-width: 540px; + min-height: 50px; + padding: 0.5rem; + + img { + display: block; + margin-top: 58px; + margin-left: calc(50% - 23px); + height: 42px; + width: 46px; + } + + svg { + display: block; + margin-top: 58px; + margin-left: calc(50% - 23px); + height: 42px; + width: 46px; + } + + input { + @apply absolute w-full h-full opacity-0 top-0; + } + .digit-cell-text { + color: theme(colors.text.secondary); + padding-top: 3px; + } +} + +.digit-multi-upload-wrap { + @apply flex mb-lg; + + div { + display: block; + position: relative; + background-color: theme(colors.grey.light); + width: calc((100% - 16px) / 3); + margin-right: 8px; + + .digit-delete { + position: absolute; + height: 24px; + width: 24px; + border-radius: 100%; + top: 2px; + right: 2px; + } + } + + .digit-upload-img-container { + border: 1px dashed theme(colors.border); + margin: 0 !important; + + img { + margin-left: auto; + margin-right: auto; + padding-top: calc(33% - 21px); + } + + svg { + @apply flex; + margin: auto; + } + + svg { + margin-left: auto; + margin-right: auto; + top: calc(50% - 21px); + position: relative; + } + + input { + @apply absolute w-full h-full opacity-0 top-0; + } + } +} + +.digit-upload-file-max-width { + max-width: 540px; +} + +.digit-upload-file { + min-height: 56px; + @apply relative border border-input-border w-full; + + div { + @apply flex flex-row h-full items-center pl-md mt-sm flex-wrap; + + .file-upload-status { + @apply text-body-s-dt ml-sm; + } + } + input { + width: 160px; + @apply absolute top-0 left-0 opacity-0 h-full; + } +} + +@screen dt { + .digit-multi-upload-wrap img { + width: 100%; + height: 158px; + } +} + +.digit-upload-file-button-wrap { + display: flex; + justify-content: flex-start; + align-items: center; + flex-wrap: wrap; + margin: 0px; + padding: 0px; + button { + height: auto; + min-height: 40px; + width: 43%; + max-height: 40px; + margin: 5px; + padding: 0px; + h2 { + word-break: break-all; + height: auto; + line-height: 16px; + overflow: hidden; + max-height: 34px; + max-width: 100%; + } + } + .digit-tag-container { + margin: 0px; + padding: 0px; + } +} +.digit-input-mirror-selector-button { + @apply h-16 bg-border text-center border-b-2 border-input-border border-solid outline-none px-lg !important; + + &:focus { + @apply outline-none; + } + + h2 { + @apply font-rc font-medium text-legend text-text-primary; + } +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/index.scss b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/index.scss new file mode 100644 index 00000000000..9713106cfd7 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/index.scss @@ -0,0 +1,168 @@ +@import url("./components/actionbarV2.scss"); +/* + TODO NABEEL/ANIL Removed these since it creates issues in search screen and home screen +@import url("./components/cardV2.scss"); +*/ + +@import url("./components/checkboxV2.scss"); +@import url("./components/FormComposerV2.scss"); +@import url("./components/radiobtnV2.scss"); +@import url("./components/selectdropdownV2.scss"); +@import url("./typography.scss"); +@import url("./components/actionLinkV2.scss"); +@import url("./components/appContainerV2.scss"); +@import url("./components/bodyContainerV2.scss"); +@import url("./components/breadCrumbV2.scss"); +@import url("./components/bannerV2.scss"); +@import url("./components/breakLineV2.scss"); +@import url("./components/loaderV2.scss"); +@import url("./components/headerV2.scss"); +@import url("./components/checkpointV2.scss"); +@import url("./components/backButtonV2.scss"); +@import url("./components/buttonsV2.scss"); +@import url("./components/infoBannerV2.scss"); +@import url("./components/displayPhotosV2.scss"); +@import url("./components/collapseAndExpandGroups.scss"); +@import url("./components/dateWrapV2.scss"); +@import url("./components/ErrorMessage.scss"); +@import url("./components/ratingV2.scss"); +@import url("./components/noresultsfoundV2.scss"); +@import url("./components/mobileNumberV2.scss"); +@import url("./components/tagV2.scss"); +@import url("./components/popUpV2.scss"); +@import url("./components/telephoneV2.scss"); +@import url("./components/textareaV2.scss"); +@import url("./components/textInputV2.scss"); +@import url("./components/otpInputV2.scss"); +@import url("./components/multiSelectDropdownV2.scss"); +@import url("./components/uploadFileV2.scss"); + +/* pages */ +@import url("./pages/employee/index.scss"); + +/* important to be remove after fixing the components */ +.light { + &-primary { + color: theme(digitv2.lightTheme.primary) !important; + + &-button { + background-color: theme(digitv2.lightTheme.primary) !important; + } + + &-bg { + background-color: theme(digitv2.lightTheme.primary-bg) !important; + } + } + + &-text-color { + &-primary { + color: theme(digitv2.lightTheme.text-color-primary) !important; + } + + &-secondary { + color: theme(digitv2.lightTheme.text-color-secondary) !important; + } + + &-disabled { + color: theme(digitv2.lightTheme.text-color-disabled) !important; + } + } + + &-background { + background-color: theme(digitv2.lightTheme.background) !important; + } + + &-paper { + &-primary { + background-color: theme(digitv2.lightTheme.paper) !important; + + &-color { + color: theme(digitv2.lightTheme.paper) !important; + } + } + + &-secondary { + background-color: theme(digitv2.lightTheme.paper-secondary) !important; + } + + &-border { + border-radius: 4px; + border-style: solid; + border-width: 1px; + border-color: theme(digitv2.lightTheme.divider); + } + } + + &-divider { + background-color: theme(digitv2.lightTheme.divider) !important; + } + + &-header-sidenav { + color: theme(digitv2.lightTheme.header-sidenav) !important; + } + + &-input-border { + /* TODO Check why important added here @ANIL/NABEEL */ + border-color: theme(digitv2.lightTheme.input-border); + } +} + +.alert { + &-error { + color: theme(digitv2.alert.error) !important; + + &-bg { + background-color: theme(digitv2.alert.error-bg) !important; + } + + &-border { + border-color: theme(digitv2.alert.error) !important; + } + } + + &-success { + color: theme(digitv2.alert.success) !important; + + &-bg { + background-color: theme(digitv2.alert.success-bg) !important; + } + } + + &-info { + color: theme(digitv2.alert.info) !important; + + &-bg { + background-color: theme(digitv2.alert.info-bg) !important; + } + } +} + +.chart { + &-item-1 { + color: theme(digitv2.chart.chart-1) !important; + } + + &-item-1-gradient { + color: theme(digitv2.chart.chart-1-gradient) !important; + } + + &-item-2 { + color: theme(digitv2.chart.chart-2) !important; + } + + &-item-2-gradient { + color: theme(digitv2.chart.chart-2-gradient) !important; + } + + &-item-3 { + color: theme(digitv2.chart.chart-3) !important; + } + + &-item-4 { + color: theme(digitv2.chart.chart-4) !important; + } + + &-item-5 { + color: theme(digitv2.chart.chart-5) !important; + } +} \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/pages/employee/index.scss b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/pages/employee/index.scss new file mode 100644 index 00000000000..99435b650be --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/pages/employee/index.scss @@ -0,0 +1 @@ +@import url("./workbench.scss"); diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/pages/employee/workbench.scss b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/pages/employee/workbench.scss new file mode 100644 index 00000000000..2e6f685f512 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/pages/employee/workbench.scss @@ -0,0 +1,615 @@ +@import url("../../index.scss"); + +.bread-crumb.workbench-bredcrumb{ +a{ + color: theme(digitv2.lightTheme.primary); +} +} +.workbench{ +.workbench-create-form { + display: inherit; + padding-top: 1.5rem; + .digit-form-composer-sub-header { + @extend .typography.text-heading-m; + padding-left: 1rem; + @media (max-width: theme(digitv2.screens.mobile)) { + padding-left: 0; + } + } + + form { + #label_digit_root { + display: none; + } + + #digit_root { + width: 100%; + + .field-wrapper { + .form-group.field { + display: flex; + padding: 1em 0 0 1em; + + @media (max-width: theme(digitv2.screens.mobile)) { + flex-direction: column; + } + + &.field-error.has-error.has-danger { + .control-label { + @extend .alert-error; + } + + .form-control { + @extend .alert-error-border; + } + + .card-label-error { + display: inline; + position: relative; + margin: 0px; + padding: 0px; + top: -0.7rem; + font-weight: normal; + + } + } + + &.field-boolean.field-error.has-error.has-danger { + + .card-label-error { + position: initial; + display: block; + margin-top: 0.5rem; + + } + } + + .control-label { + max-width: 12.5rem; + margin-right: 2.5rem; + @extend .card-label; + display: inline-flex; + /* align-self: center; */ + line-height: 3rem; + @extend .typography.text-heading-s; + /* web view*/ + @apply w-1/3; + + /* tablet view*/ + + @media (max-width: theme(digitv2.screens.tablet)) { + max-width: 11rem; + margin-right: 1.5rem; + + } + + /* mobile view*/ + + @media (max-width: theme(digitv2.screens.mobile)) { + /*max-width: 10.2rem;*/ + @apply w-full; + + } + + } + + .all-input-field-wrapper { + + @apply w-3/5; + @media (max-width: theme(digitv2.screens.mobile)) { + @apply w-full; + } + + .form-control { + @extend .light-input-border; + @extend .employee-card-input; + font-style: inherit; + font-family: inherit; + /* web view*/ + max-width: 37.5rem; + min-width: 20.5rem; + margin-bottom: 1rem; + /* tablet view*/ + + @media (max-width: theme(digitv2.screens.tablet)) { + max-width: 27.5rem; + min-width: 12.5rem; + + } + + /* mobile view*/ + + @media (max-width: theme(digitv2.screens.mobile)) { + max-width: 20.5rem; + min-width: 9.5rem; + @apply w-full; + + } + + &.form-select { + padding: 0%; + border: 0px; + + .digit__control { + @apply outline-none; + + .digit__value-container:in-range { + border-color: unset; + box-shadow: none; + box-sizing: unset; + @apply outline-none; + } + } + + .digit__control--is-focused { + border-color: theme(digitv2.lightTheme.primary) !important; + box-shadow: none; + box-sizing: unset; + @apply outline-none; + } + + + .digit__control:hover { + + border-color: unset; + box-shadow: none; + box-sizing: unset; + @apply outline-none; + } + + .digit__control:focus { + border-color: theme(digitv2.lightTheme.primary); + + .digit__value-container:focus { + border-color: theme(digitv2.lightTheme.primary); + + } + } + } + + &.form-select:focus { + @apply outline-none; + border-color: theme(digitv2.lightTheme.primary); + + } + } + + .form-control:read-only { + background-color: theme(digitv2.lightTheme.background); + color: theme(digitv2.lightTheme["text-color-secondary"]); + } + + .form-control:focus { + + @apply outline-none; + border-color: theme(digitv2.lightTheme.primary); + } + + textarea.form-control { + height: 5rem; + } + } + + &.field-string { + align-self: center; + } + + &.field-boolean { + padding-top: 0rem; + padding-bottom: 1rem; + + .custom-checkbox { + display: inline-flex; + align-items: end; + + &.custom-checkbox-disabled { + pointer-events: none; + opacity: 0.6; + } + + .custom-checkbox-label { + @extend .typography.text-body-s; + @apply pl-sm; + } + } + + .checkbox { + width: 28rem; + + label { + float: left; + + /* display: flex; + flex-direction: row-reverse; + */ + span { + width: 17rem; + display: none; + @extend .card-label; + } + + input[type="checkbox"] { + @extend .light-input-border; + @extend .employee-card-input; + height: 1.5rem; + /* @apply ml-sm;*/ + } + + input[type="checkbox"]#digit_root_active { + accent-color: theme(digitv2.lightTheme.primary); + } + + input:checked, + input:hover { + @apply border-2; + @extend .light-input-border; + } + } + } + + .field-radio-group { + display: inline-flex; + height: 2.5rem; + align-items: center; + + .radio { + @apply mr-sm; + } + } + + + + } + + + + &.field-object>.control-label { + margin-left: 0.5rem; + } + + &.field-object { + display: block; + @extend .light-background; + @extend .light-paper-border; + padding: 1rem; + margin: 1rem; + + .digit-expand-collapse-wrapper { + margin-top: 0px; + } + + .digit-icon-toggle { + top: -1.5rem; + right: 1.5em; + } + + .object-wrapper { + .array-remove-button-wrapper { + position: relative; + } + } + + /* have to revisit for objects + [id^="root_"] { + @extend .light-background; + } + */ + } + + &.field-array { + display: block; + @extend .light-paper-secondary; + @extend .light-paper-border; + padding: 2rem; + margin: 1rem; + padding-top: 1rem; + + .array-wrapper .array-item { + &.jk-array-objects>.array-remove-button-wrapper { + display: block; + } + + &.jk-array-objects { + margin-bottom: 2rem; + + .array-children>span .form-group.field.field-object { + padding-bottom: 3rem; + } + + .array-obj { + position: absolute; + bottom: 1.5rem; + left: 2rem; + + >.array-remove-button-wrapper { + position: unset; + } + } + + } + + &.jk-array-of-non-objects>.array-remove-button-wrapper { + display: inline; + left: 38.5rem; + right: unset; + top: 0.7rem; + } + + &.jk-array-of-non-objects .array-children { + span .form-group { + padding-left: 0%; + + .control-label { + display: none; + } + + } + } + + /* it has been removed since we dont need diff color for array items @extend .light-background;*/ + position: relative; + + .field-object { + margin-left: 0; + margin-right: 0; + } + + + .array-remove-button-wrapper { + position: absolute; + right: 1.3em; + top: 1.3em; + background-color: inherit !important; + + .array-remove-button { + cursor: pointer; + background-color: inherit !important; + @media (max-width: theme(digitv2.screens.mobile)) { + padding:0px; + } + h2{ + @media (max-width: theme(digitv2.screens.mobile)) { + display: none; + } + } + + } + } + + span.all-input-field-wrapper { + @apply w-3/5; + + .form-control { + @apply w-full; + } + } + + .control-label { + @apply w-1/3; + + } + } + + + .jk-digit-secondary-btn { + height: 1.7em; + margin-top: 0.5rem; + + @media (max-width: theme(digitv2.screens.mobile)) { + height: auto; + width: 100%; + } + + h2 { + font-size: 1rem; + } + } + + .all-input-field-wrapper { + .card-label-error { + position: unset !important; + } + } + + } + + .digit-expand-collapse-header { + border: 0; + background-color: inherit; + padding: 0; + } + } + } + } + } + + div.action-bar-wrap { + @extend .action-bar-wrap; + + .submit-bar { + @extend .submit-bar; + cursor: pointer; + @apply font-rc font-medium text-legend text-white leading-10; + } + } +} + +.workbench-no-schema-found { + @apply flex justify-items-center flex-col; + align-items: center; +} + +.jk-digit-loader { + position: absolute; + z-index: 10000; + width: 100vw; + background-color: rgba(189, 189, 189, 0.5); + height: 100vh; + left: 0; + top: 0; + + .jk-spinner-wrapper { + width: 100%; + display: flex; + align-items: center; + justify-content: center; + height: 100%; + + .jk-spinner { + border: 0.4em solid #fe7a51; + border-radius: 50%; + border-top: 0.4em solid #ffffff; + width: 4em; + height: 4em; + -webkit-animation: spin 2s linear infinite; + /* Safari */ + animation: spin 1s linear infinite; + } + } +} + +.jk-sm-inbox-loader { + border: 0.2em solid #fe7a51; + border-radius: 50%; + border-top: 0.2em solid #ffffff; + width: 2em; + height: 2em; + -webkit-animation: spin 2s linear infinite; + /* Safari */ + animation: spin 1s linear infinite; +} + +/* Safari */ +@-webkit-keyframes spin { + 0% { + -webkit-transform: rotate(0deg); + } + + 100% { + -webkit-transform: rotate(360deg); + } +} + +@keyframes spin { + 0% { + transform: rotate(0deg); + } + + 100% { + transform: rotate(360deg); + } +} + +.no-data-found { + height: 100%; + width: 100%; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + + .digit-error-msg { + margin-top: 2rem; + } +} + + +.tooltip .tooltiptext { + + top: 2rem; + left: 0; + margin-left: 0rem; + width: fit-content; + height: max-content; + white-space: normal; + + .tooltiptextvalue { + font-size: 14px; + font-weight: 400px; + color: white; + } +} +.employeeCard.manage-master-wrapper { + width: 100%; + display: flex; + padding-top: 2.1rem; + @media (max-width: theme(digitv2.screens.mobile)) { + flex-direction: column; + } + .employee-select-wrap.form-field{ + @apply w-1/4; + margin-right:1rem ; + @media (max-width: theme(digitv2.screens.mobile)) { + @apply w-full; + } + } +} + +.table{ + padding-left:0.8rem ; + padding-right:0.8rem ; + &-row-mdms:hover{ + background-color: theme(digitv2.lightTheme.primary-bg); /* Change this to the desired hover color */ + cursor: pointer; + } +} +} + +.header-btn{ + width: 12rem; +} + +.drag-drop-container { + background-color: #FAFAFA; + border: 1.5px dashed #D6D5D4; + border-radius: 5px; + margin:-1rem 1rem 1rem 1rem; + padding: 1rem 1rem 1rem 1rem; + display: flex; + align-items: center; + flex-direction: column; + + .drag-drop-text { + text-decoration: none; + .browse-text { + text-decoration: none; + color: #F47738; + transition: color 0.3s; + } + .browse-text:hover { + color: #F47738; + text-decoration: underline; + cursor: pointer; + } + } + +} + +.uploaded-file-container { + background-color: #FAFAFA; + border: 1.5px solid #D6D5D4; + border-radius: 5px; + margin:0.5rem 1rem 2rem 1rem; + display: flex; + flex-direction: row; + align-items: center; + padding: 0.6rem; + justify-content: space-between; + + .uploaded-file-container-sub { + display: flex; + align-items: center; + + .icon:hover { + cursor: pointer; + } + } +} + +button:hover { + cursor: pointer; +} + +.popup-header-fix { + margin-top: -0.5rem !important; +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/typography.scss b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/typography.scss new file mode 100644 index 00000000000..4f428d7c654 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/digitv2/typography.scss @@ -0,0 +1,241 @@ +@import url("../index.scss"); + +.typography { + &.text-heading-xl { + font-family: theme(digitv2.fontFamily.rc); + font-style: theme(digitv2.fontStyle.normal); + font-weight: theme(digitv2.fontWeight.bold); + color: theme(digitv2.lightTheme.text-color-primary); + line-height: theme(digitv2.lineHeight.normal); + + @media (min-width: theme(digitv2.screens.desktop)) { + font-size: theme(digitv2.fontSize.heading-xl.desktop); + } + + @media (min-width: theme(digitv2.screens.tablet)) { + font-size: theme(digitv2.fontSize.heading-xl.tablet); + } + + @media (min-width: theme(digitv2.screens.mobile)) { + font-size: theme(digitv2.fontSize.heading-xl.mobile); + } + } + + &.text-heading-l { + font-family: theme(digitv2.fontFamily.sans); + font-style: theme(digitv2.fontStyle.normal); + font-weight: theme(digitv2.fontWeight.bold); + color: theme(digitv2.lightTheme.text-color-primary); + line-height: theme(digitv2.lineHeight.normal); + + @media screen and (min-width: theme(digitv2.screens.desktop)) { + font-size: theme(digitv2.fontSize.heading-l.desktop); + } + @media screen and (min-width: theme(digitv2.screens.tablet)) { + font-size: theme(digitv2.fontSize.heading-l.tablet); + } + + @media screen and (min-width: theme(digitv2.screens.mobile)) { + font-size: theme(digitv2.fontSize.heading-l.mobile); + } + } + &.text-heading-m { + font-family: theme(digitv2.fontFamily.sans); + font-style: theme(digitv2.fontStyle.normal); + font-weight: theme(digitv2.fontWeight.bold); + color: theme(digitv2.lightTheme.text-color-primary); + line-height: theme(digitv2.lineHeight.normal); + + @media screen and (min-width: theme(digitv2.screens.desktop)) { + font-size: theme(digitv2.fontSize.heading-m.desktop); + } + @media screen and (min-width: theme(digitv2.screens.tablet)) { + font-size: theme(digitv2.fontSize.heading-m.tablet); + } + + @media screen and (min-width: theme(digitv2.screens.mobile)) { + font-size: theme(digitv2.fontSize.heading-m.desktop); + } + } + &.text-heading-s { + font-family: theme(digitv2.fontFamily.sans); + font-style: theme(digitv2.fontStyle.normal); + font-weight: theme(digitv2.fontWeight.bold); + color: theme(digitv2.lightTheme.text-color-primary); + line-height: theme(digitv2.lineHeight.normal); + + @media screen and (min-width: theme(digitv2.screens.desktop)) { + font-size: theme(digitv2.fontSize.heading-s.desktop); + } + @media screen and (min-width: theme(digitv2.screens.tablet)) { + font-size: theme(digitv2.fontSize.heading-s.tablet); + } + + @media screen and (min-width: theme(digitv2.screens.mobile)) { + font-size: theme(digitv2.fontSize.heading-s.mobile); + } + } + &.text-heading-xs { + @media screen and (min-width: theme(digitv2.screens.mobile)) { + font-size: theme(digitv2.fontSize.heading-xs.mobile); + font-family: theme(digitv2.fontFamily.sans); + font-style: theme(digitv2.fontStyle.normal); + font-weight: theme(digitv2.fontWeight.bold); + color: theme(digitv2.lightTheme.text-color-primary); + line-height: theme(digitv2.lineHeight.normal); + } + } + &.text-caption-l { + font-family: theme(digitv2.fontFamily.sans); + font-style: theme(digitv2.fontStyle.italic); + font-weight: theme(digitv2.fontWeight.medium); + color: theme(digitv2.lightTheme.text-color-primary); + line-height: theme(digitv2.lineHeight.normal); + + @media screen and (min-width: theme(digitv2.screens.desktop)) { + font-size: theme(digitv2.fontSize.caption-l.desktop); + } + @media screen and (min-width: theme(digitv2.screens.tablet)) { + font-size: theme(digitv2.fontSize.caption-l.tablet); + } + + @media screen and (min-width: theme(digitv2.screens.mobile)) { + font-size: theme(digitv2.fontSize.caption-l.mobile); + } + } + + &.text-caption-m { + font-family: theme(digitv2.fontFamily.sans); + font-style: theme(digitv2.fontStyle.italic); + font-weight: theme(digitv2.fontWeight.medium); + color: theme(digitv2.lightTheme.text-color-primary); + line-height: theme(digitv2.lineHeight.normal); + + @media screen and (min-width: theme(digitv2.screens.desktop)) { + font-size: theme(digitv2.fontSize.caption-m.desktop); + } + @media screen and (min-width: theme(digitv2.screens.tablet)) { + font-size: theme(digitv2.fontSize.caption-m.tablet); + } + + @media screen and (min-width: theme(digitv2.screens.mobile)) { + font-size: theme(digitv2.fontSize.caption-m.mobile); + } + } + + &.text-caption-s { + font-family: theme(digitv2.fontFamily.sans); + font-style: theme(digitv2.fontStyle.italic); + font-weight: theme(digitv2.fontWeight.medium); + color: theme(digitv2.lightTheme.text-color-primary); + line-height: theme(digitv2.lineHeight.normal); + + @media screen and (min-width: theme(digitv2.screens.desktop)) { + font-size: theme(digitv2.fontSize.caption-s.desktop); + } + @media screen and (min-width: theme(digitv2.screens.tablet)) { + font-size: theme(digitv2.fontSize.caption-s.tablet); + } + + @media screen and (min-width: theme(digitv2.screens.mobile)) { + font-size: theme(digitv2.fontSize.caption-s.desktop); + } + } + &.text-body-l { + font-family: theme(digitv2.fontFamily.sans); + font-style: theme(digitv2.fontStyle.italic); + font-weight: theme(digitv2.fontWeight.regular); + color: theme(digitv2.lightTheme.text-color-primary); + + @media screen and (min-width: theme(digitv2.screens.desktop)) { + font-size: theme(digitv2.fontSize.body-l.desktop); + line-height: theme(digitv2.lineHeight.line-height-body-l.desktop); + } + @media screen and (min-width: theme(digitv2.screens.tablet)) { + font-size: theme(digitv2.fontSize.body-l.tablet); + line-height: theme(digitv2.lineHeight.line-height-body-l.tablet); + } + + @media screen and (min-width: theme(digitv2.screens.mobile)) { + font-size: theme(digitv2.fontSize.body-l.mobile); + line-height: theme(digitv2.lineHeight.line-height-body-l.mobile); + } + } + &.text-body-s { + font-family: theme(digitv2.fontFamily.sans); + font-style: theme(digitv2.fontStyle.italic); + font-weight: theme(digitv2.fontWeight.regular); + color: theme(digitv2.lightTheme.text-color-primary); + + @media screen and (min-width: theme(digitv2.screens.desktop)) { + font-size: theme(digitv2.fontSize.body-s.desktop); + line-height: theme(digitv2.lineHeight.line-height-body-s.desktop); + } + @media screen and (min-width: theme(digitv2.screens.tablet)) { + font-size: theme(digitv2.fontSize.body-s.tablet); + line-height: theme(digitv2.lineHeight.line-height-body-s.tablet); + } + + @media screen and (min-width: theme(digitv2.screens.mobile)) { + font-size: theme(digitv2.fontSize.body-s.mobile); + line-height: theme(digitv2.lineHeight.line-height-body-s.mobile); + } + } + &.text-body-xs { + font-family: theme(digitv2.fontFamily.sans); + font-style: theme(digitv2.fontStyle.italic); + font-weight: theme(digitv2.fontWeight.regular); + color: theme(digitv2.lightTheme.text-color-primary); + + @media screen and (min-width: theme(digitv2.screens.desktop)) { + font-size: theme(digitv2.fontSize.body-xs.desktop); + line-height: theme(digitv2.lineHeight.line-height-body-xs.desktop); + } + @media screen and (min-width: theme(digitv2.screens.tablet)) { + font-size: theme(digitv2.fontSize.body-xs.tablet); + line-height: theme(digitv2.lineHeight.line-height-body-xs.tablet); + } + + @media screen and (min-width: theme(digitv2.screens.mobile)) { + font-size: theme(digitv2.fontSize.body-xs.mobile); + line-height: theme(digitv2.lineHeight.line-height-body-xs.mobile); + } + } + &.text-label { + font-family: theme(digitv2.fontFamily.sans); + font-style: theme(digitv2.fontStyle.italic); + font-weight: theme(digitv2.fontWeight.regular); + color: theme(digitv2.lightTheme.text-color-primary); + line-height: theme(digitv2.lineHeight.normal); + + @media screen and (min-width: theme(digitv2.screens.desktop)) { + font-size: theme(digitv2.fontSize.label.desktop); + } + @media screen and (min-width: theme(digitv2.screens.tablet)) { + font-size: theme(digitv2.fontSize.label.tablet); + } + + @media screen and (min-width: theme(digitv2.screens.mobile)) { + font-size: theme(digitv2.fontSize.label.mobile); + } + } + &.text-link { + font-family: theme(digitv2.fontFamily.sans); + font-style: theme(digitv2.fontStyle.normal); + font-weight: theme(digitv2.fontWeight.regular); + color: theme(digitv2.lightTheme.text-color-primary); + line-height: theme(digitv2.lineHeight.normal); + text-decoration: theme(digitv2.textDecorationLine.underline); + + @media screen and (min-width: theme(digitv2.screens.desktop)) { + font-size: theme(digitv2.fontSize.link.desktop); + } + @media screen and (min-width: theme(digitv2.screens.tablet)) { + font-size: theme(digitv2.fontSize.link.tablet); + } + + @media screen and (min-width: theme(digitv2.screens.mobile)) { + font-size: theme(digitv2.fontSize.link.mobile); + } + } +} \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/index.scss b/micro-ui/web/micro-ui-internals/packages/css/src/index.scss new file mode 100644 index 00000000000..0e68dddc547 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/index.scss @@ -0,0 +1,762 @@ +/*@import 'normalize.css';*/ + +/*@import url("https://fonts.googleapis.com/css2?family=Roboto+Condensed:wght@400;500;700&family=Roboto:wght@400;500;700&display=swap");*/ + +@import "tailwindcss/base"; + +@import "tailwindcss/components"; + +@import "tailwindcss/utilities"; + +@import "react-date-range/dist/styles.css"; +@import "react-date-range/dist/theme/default.css"; + +@import "./components/loader.scss"; + +@import "./components/body.scss"; +@import "./components/navbar.scss"; +@import "./components/card.scss"; +@import "./components/buttons.scss"; +@import "./components/radiobtn.scss"; +@import "./components/selectdropdown.scss"; +@import "./components/textfields.scss"; +@import "./components/bannercomponents.scss"; +@import "./components/datewrap.scss"; +@import "./components/datatable.scss"; +@import "./components/checkpoint.scss"; +@import "./components/checkbox.scss"; +@import "./components/inputotp.scss"; +@import "./components/map.scss"; +@import "./pages/employee/tooltip.scss"; +@import "./components/menu.scss"; +@import "./components/submiterrors.scss"; +@import "./components/ratingstar.scss"; +@import "./components/keynote.scss"; +@import "./components/statushighlight.scss"; +@import "./components/imageviewer.scss"; +@import "./components/actionbar.scss"; +@import "./components/table.scss"; +@import "./components/popup.scss"; +@import "./components/uploadcomponents.scss"; +@import "./components/toast.scss"; +@import "./components/detailscontainer.scss"; +@import "./components/telephone.scss"; +@import "./components/grey.scss"; +@import "./components/actionLink.scss"; +@import "./components/sectionalDropdown.scss"; +@import "./components/detailscard.scss"; +@import "./components/searchAction.scss"; +@import "./components/tag.scss"; +@import "./components/topbar.scss"; +@import "./components/languageSelector.scss"; +@import "./components/custombtn.scss"; +@import "./components/citizenInfoLabel.scss"; +@import "./components/roundedLabel.scss"; +@import "./components/changeLanguage.scss"; +@import "./components//metricsTable.scss"; +@import "./components/filters.scss"; +@import "./components//charts.scss"; +@import "./components/summary.scss"; +@import "./components/multiLink.scss"; +@import "./components/info-banner.scss"; +@import "./components/multiSelectDropdown.scss"; +@import "./components/EllipsisMenu.scss"; +@import "./components/CitizenHomeCard.scss"; +@import "./components/PropertySearchForm.scss"; +@import "./components/SearchForm.scss"; +@import "./components/cardHeaderWithOptions.scss"; +@import "./components/TimeLine.scss"; +@import "./components/PageBasedInput.scss"; +@import "./components/StandaloneSearchBar.scss"; +@import "./components/CardBasedOptions.scss"; +@import "./components/WhatsNewCard.scss"; +@import "./components/SearchOnRadioButton.scss"; +@import "./components/EventCalendarView.scss"; +@import "./components/OnGroundEventCard.scss"; +@import "./components/PopupHeadingLabel.scss"; +@import "./components/staticSideBar.scss"; +@import "./components/hoc/index.scss"; +@import "./components/FAQ.scss"; +@import "./components//howItWorks.scss"; +@import "./components/staticDynamicMessages.scss"; +@import "./components/toggleSwitch.scss"; +@import "./components/plusMinus.scss"; + +@import "./pages/employee/index.scss"; +@import "./pages/employee/cardfix.scss"; +@import "./pages/employee/popupmodule.scss"; +@import "./pages/employee/container.scss"; +@import "./pages/employee/inbox.scss"; +@import "./pages/employee/response.scss"; +@import "./pages/employee/form-fields.scss"; +@import "./pages/employee/scroll-table.scss"; +@import "./pages/employee/EmployeeLogin.scss"; +@import "./pages/employee/updateNumber.scss"; +@import "./pages/employee/oldMobileInbox.scss"; +@import "./pages/employee/dss.scss"; +@import "./pages/employee/iframe.scss"; + +@import "./pages/citizen/payment/payment-type.scss"; +@import "./pages/citizen/container.scss"; +@import "./pages/citizen/HomePageWrapper.scss"; +@import "./pages/citizen/CitizenEngagementNotificationWrapper.scss"; +@import "./pages/citizen/Events.scss"; +@import "./pages/citizen/DocumentList.scss"; +@import "./pages/citizen/SurveyList.scss"; +@import "./pages/citizen/updatePropertyNumber.scss"; +@import "./pages/citizen/citizenDocument.scss"; +@import "./pages/employee/surveys.scss"; +@import "./digitv2/index.scss"; +/* @import "./digitv2/typography.scss"; */ +@import "./components/inboxv2/index.scss"; +@import "./components//sidebar.scss"; + +.display-none { + display: none; +} + +.p-unset { + padding: unset !important; +} + +h1, h2, h3, h4, h5, h6 { + font-size: inherit; + font-weight: inherit; } + + +.flex-one { + @apply flex-1; +} + +.display-flex-gap-2 { + @apply flex gap-3; +} +.rm-mb { + margin-bottom: unset !important; +} + +.w-fullwidth { + @apply w-full; +} + +.margin-unset { + margin: unset !important; +} + +.text-align-center { + @apply text-center; +} + +.desktop-only { + @apply hidden; +} + +@screen dt { + .desktop-only { + @apply block; + } +} + +.mobile-only { + @apply block; +} + +@screen dt { + .mobile-only { + @apply hidden; + } +} + +.dark { + @apply text-text-primary; +} + +.mrlg { + @apply mr-lg; +} + +.mrsm { + @apply mr-sm; +} + +.mbsm { + @apply mb-sm; +} + +.employeeCard { + /* TODO need to revisit that we need mx-md NABEEL/ANIL + @apply mb-md mx-md !important; + */ + @apply mb-md !important; +} + +.home-link { + margin-left: 16px; + margin-bottom: 16px; + + a { + color: theme(colors.link.normal); + } +} + +.clear-search-label { + color: theme(colors.primary.main); + cursor: pointer; +} + +.search-submit-bar { + margin-top: 32; + margin-left: auto; +} + +.application-details-link-button { + @apply flex justify-between items-center; + + .download-button { + color: theme(colors.primary.main); + margin-left: 8px; + } +} + +.response-download-button { + @apply flex mb-sm; + + .download-button { + color: theme(colors.primary.main); + margin-left: 8px; + } +} + +.check-page-link-button { + color: theme(colors.primary.main) !important; +} + +.pt-application-download-btn { + display: flex; + justify-content: flex-end; + margin: 0px 8px; +} + +.form-pt-dropdown-only { + .options-card { + position: unset; + } +} +.application-table-container { + @apply mt-lg ml-lg flex-1; +} + +.primary-label-btn { + @apply flex; + gap: 10px; + + svg { + fill: theme(colors.primary.main); + } + + color: theme(colors.primary.main); + + cursor: pointer; + font-weight: 500; + width: fit-content; +} + +.primaryColor { + color: theme(colors.text.primary) !important; +} + +input[readonly] { + @apply border-grey-dark !important; + background-color: theme(digitv2.lightTheme.background); + border-color: theme(digitv2.lightTheme.text-color-secondary); + color: theme(digitv2.lightTheme.text-color-secondary); +} + +.hide-input-type-file { + position: absolute; + clip: rect(0, 0, 0, 0); + pointer-events: none !important; +} + +@media (hover: hover) { + .primary-label-btn { + &:hover { + color: #000; + + svg { + fill: #000; + } + } + } +} + +.disabled { + @apply border-grey-dark text-grey-dark !important; + pointer-events: none !important; +} + +.card-date-input { + @apply absolute top-0 left-0 w-3/4 bg-white pl-sm border border-input-border border-solid border-r-0; + outline: transparent solid 1px; + height: 2.5rem; +} + +.h4 { + @apply mb-sm; +} + +.react-time-picker { + width: 194px; + height: 2.5rem; + &__wrapper { + border: 2px solid theme(colors.text.primary); + padding-left: 16px; + } + &__inputGroup__input { + @apply px-sm; + line-height: 2.5rem; + min-width: 16px; + &:focus { + outline: 2px solid black; + } + } +} + +.border-none { + border: none; + justify-content: space-between; +} + +input[type="number"]::-webkit-inner-spin-button, +input[type="number"]::-webkit-outer-spin-button { + -webkit-appearance: none; + margin: 0; +} +input[type="number"] { + -moz-appearance: textfield; +} + + +.static { + @apply flex flex-col; + min-height: 85vh; + + &-wrapper { + flex: 1; + max-height: 75vh; + overflow: scroll; + -ms-overflow-style: none; /* IE and Edge */ + scrollbar-width: none; /* Firefox */ + + &::-webkit-scrollbar { + display: none; + } + } +} + +.bill-summary { + border: #e8e7e6 solid 1px; + @apply bg-grey-light w-full; + + .bill-account-details { + @apply flex mb-md; + padding: 5px; + + .label { + @apply w-1/2 font-bold; + } + + .value { + @apply w-1/2 text-right; + } + } + + .amount-details { + @apply flex mb-md items-center; + padding: 5px; + + .label { + @apply w-1/2 font-bold; + } + + .value { + @apply w-1/2 font-bold text-right; + font-size: 18px; + } + } +} + +.bill-payment-amount { + @apply sticky bottom-0 bg-white; + padding-bottom: 32px; + + .payment-amount-front { + @apply absolute z-10 w-10 flex justify-center items-center; + background-color: #efefef; + padding: 7px 12px; + color: #9a9a9a; + } +} + +.text-indent-xl input { + text-indent: 40px; +} + +.select-payment-type { + @apply flex justify-center font-bold items-center; + padding-top: 10px; + padding-bottom: 25px; + + .value { + font-size: 20px; + } +} + +.cheque-date { + @apply flex items-center mb-lg; + border: 2px solid theme(colors.text.primary); + border-radius: 2px; + + input { + @apply outline-none w-full; + border: 0px; + background: transparent; + text-indent: 5px; + padding: 6px 0px; + } + + button { + @apply outline-none; + border: 0px; + background: transparent; + text-indent: 2px; + } +} + +.w-half { + @apply w-1/2; +} + +.ifsc-field { + @apply flex items-center mb-lg; + border: 2px solid theme(colors.text.primary); + border-radius: 2px; + + input { + @apply outline-none w-full; + border: 0px; + background: transparent; + text-indent: 5px; + padding: 6px 0px; + } + button { + @apply outline-none; + border: 0px; + background: transparent; + text-indent: 2px; + } +} + +.text-input { + @apply relative w-full; + input { + &:hover { + @apply border-2 border-solid border-primary-main; + } + } +} + +.text-input-width { + max-width: 540px; +} + +.text-mobile-input-width { + max-width: 500px; +} + +.custom-time-picker { + @apply w-full; + max-width: 200px; +} + +.sla-cell { + @apply text-text-secondary; +} + +.submit-bar-search { + margin-top: 32px; + margin-left: 16px; + max-width: 256px; +} + +.clear-search-container { + @apply flex justify-between items-center; +} + +.card-label-smaller { + @apply w-1/3; + margin-bottom: revert; +} + +.card-label-APK { + @apply w-1/3; + margin-bottom: revert; + width: 100%; +} + +.underline { + border-color: #e7e6e6; + @apply mb-sm; +} + +.box-shadow-none { + box-shadow: none; +} + +.component-in-front { + @apply flex justify-center items-center; +} + +.subform-composer { + @apply flex; +} + +.inbox-search-container { + .result { + @apply mt-lg; + } +} + +.payment-form-text-input-correction { + width: 100% !important; +} + +.edcr-citizen-inbox { + thead th:first-child { + min-width: 155px; + } +} + +.error-boundary { + width: 100vw; + height: 100vh; + font-size: 16px; + font-family: sans-serif; + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; + .error-container { + display: flex; + width: 400px; + justify-content: center; + align-items: center; + flex-direction: column; + h1 { + font-size: 32px; + font-weight: bold; + } + button { + height: 40px; + width: 153px; + border-radius: 0px; + padding: 8px 24px; + color: white; + cursor: pointer; + background-color: theme(colors.primary.main); + } + } +} + +.error-boundary summary, +.error-boundary details { + width: 300px; + background-color: rgb(218, 100, 100); + margin: 5px; + border: 2px solid #222; + border-radius: 3px; + padding: 3px; +} + +.full-width-card { + width: 92vw !important; +} +.full-employee-card-link { + width: 100% !important; + margin: 7px 0px; + a { + color: inherit; + text-decoration: inherit; + } +} +.full-employee-card-height { + height: unset !important; +} + +@media (min-width: 640px) { + .full-employee-card-height { + height: 196px !important; + } + .full-employee-card-link { + width: 30% !important; + } + .full-width-card { + @apply w-full !important; + } +} +.applications-list-container { +} +.complaint-summary { + @media (min-width: 780px) { + flex: 1 0 auto; + margin-left: 1rem; + margin-top: 1rem; + } +} + +@media (min-width: 780px) { + .citizen-form-wrapper { + width: calc(100% - 219px); + display: flex; + justify-content: center; + margin-top: 1rem; + padding-left: 16px; + padding-right: 16px; + } +} +@media (min-width: 780px) { + .citizen-card-container { + padding-left: 15px; + padding-right: 15px; + margin-top: 1rem; + } +} + +@media (min-width: 780px) { + .citizen-obps-wrapper, + .selection-card-wrapper, + .pgr-citizen-wrapper, + .pt-citizen, + .bill-citizen, + .bills-citizen-wrapper, + .payer-bills-citizen-wrapper, + .engagement-citizen-wrapper, + .citizen-all-services-wrapper, + .mcollect-citizen, + .ws-citizen-wrapper, + .tl-citizen { + width: calc(100% - 219px); + padding-left: 16px; + padding-right: 16px; + margin-top: 1rem; + } +} +@media only screen and (max-width: 768px) { + /* For mobile phones: */ + .error-boundary { + height: 75vh; + } +} +.employee-app-wrapper { + min-height: calc(100vh - 8em); +} + +.ws-custom-wrapper { + .submit { + display: flex !important; + flex-direction: row-reverse !important; + width: 100% !important; + align-items: center; + button { + width: 240px !important; + } + p { + width: unset; + margin-right: 1rem; + } + } +} + +.plumber-details-new-value-wrapper { + flex: 2 1 auto; +} + +.connection-details-new-value-wrapper { + flex: 1 1 auto; +} + +.connection-details-old-value-wrapper, +.plumber-details-old-value-wrapper { + flex: 1 1 auto; + + .old-value-null-wrapper { + visibility: hidden; + padding-bottom: 8px; + margin-bottom: 8px; + } + .row { + color: #b1b4b6; + font-weight: 700; + font-size: 16px; + } +} + +.plumber-details-new-value-wrapper { + flex: 2 1 auto; +} + +.connection-details-new-value-wrapper { + flex: 1 1 auto; +} + +.connection-details-old-value-wrapper, +.plumber-details-old-value-wrapper { + flex: 1 1 auto; + .old-value-null-wrapper { + visibility: hidden; + padding-bottom: 8px; + margin-bottom: 8px; + } + .row { + color: #b1b4b6; + font-weight: 700; + font-size: 16px; + } +} + +.modal-header-ws { + padding: 1rem; + font-weight: 400; +} +.modal-body-ws { + padding: 1rem; + font-weight: 700; + color: theme(colors.text.primary); + font-size: 24px; + margin-bottom: 1rem; +} +.privacy-icon { + cursor: pointer; +} +.privacy-icon:hover { + path { + fill: rgba(244, 119, 56, 1); + } +} + +.privacy-icon-2 { + cursor: pointer; +} +.privacy-icon-2:hover { + path { + fill: none; + } +} + +.audit-card { + width: 80%; + margin-left: -260px; + margin-right: -27%; + max-height: 120px; + margin-top: 90px; +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/pages/citizen/CitizenEngagementNotificationWrapper.scss b/micro-ui/web/micro-ui-internals/packages/css/src/pages/citizen/CitizenEngagementNotificationWrapper.scss new file mode 100644 index 00000000000..ea048c9f278 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/pages/citizen/CitizenEngagementNotificationWrapper.scss @@ -0,0 +1,8 @@ +.CitizenEngagementNotificationWrapper { + .h1 { + margin: 15px; + } + .WhatsNewCard { + @apply mx-md mb-md; + } +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/pages/citizen/DocumentList.scss b/micro-ui/web/micro-ui-internals/packages/css/src/pages/citizen/DocumentList.scss new file mode 100644 index 00000000000..e48d487f9c2 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/pages/citizen/DocumentList.scss @@ -0,0 +1,305 @@ +.wrapper { + margin: 20px auto; +} +.accordion-wrapper { + & + * { + margin-top: 0.5em; + } +} +.accordion-item { + overflow: hidden; + transition: max-height 0.3s cubic-bezier(1, 0, 1, 0); + height: auto; + max-height: 9999px; +} +.accordion-item.collapsed { + max-height: 0; + transition: max-height 0.35s cubic-bezier(0, 1, 0, 1); +} +.accordion-title { + font-weight: 600; + cursor: pointer; + color: #666; + padding: 0.5em 0em; + border-radius: 1.5em; + display: flex; + justify-content: space-between; + align-items: center; + &.open svg { + transform: rotate(-90deg); + } + &:hover, + &.open { + color: black; + } +} +.accordion-content { + padding: 1em 0em; +} +.document_list_searchbar { + border: 1px solid theme(colors.text.secondary) !important; + border-radius: 0px !important; + margin: 20px 0; +} +.notices_circular_searchbox { + margin-top: 50px; +} +.notice_and_circular_main { + @apply flex bg-white my-md px-md pt-md pb-lg shadow-card relative; + border-radius: 4px; +} +.gap-ten { + @apply gap-10; +} +.notice_and_circular_heading_mb { + display: flex; + justify-content: space-between; + padding: 2px; +} +.notice_and_circular_heading_mb header { + font-weight: bold; + font-size: 16px !important; + line-height: 24px; + margin-right: 50px; +} +.notice_and_circular_heading_mb .card-caption { + padding-left: 30px; + font-weight: normal; + font-size: 12px; + line-height: 24px; + color: theme(colors.text.secondary); + padding-right: 5px; + padding-left: 15px; + min-width: 80px; + position: absolute; + right: 20px; +} +.notice_and_circular_text { + padding-bottom: 20px; +} +.notice_and_circular_text p { + font-weight: normal; + font-size: 12px; + line-height: 14px; + color: theme(colors.text.secondary); +} +.notice_and_circular_caption { + margin-top: 10px; + margin-bottom: 10px; +} +.notice_and_circular_caption .card-caption { + font-weight: normal; + font-size: 10px; + line-height: 18px; + color: #A3A3A3; +} +.view_download_main { + display: flex; + flex-wrap: wrap; + gap:8px; + align-items: end; + span { + padding-right: 20px; + & .views { + display: flex; + justify-content: space-between; + align-items: center; + p { + padding-left: 10px; + font-weight: normal; + font-size: 16px; + line-height: 19px; + color: theme(colors.primary.main); + } + } + } + & .download_views_padding{ + padding-top: 8px; + } +} +@screen dt{ + .view_download_main { + span{ + & .views { + display: flex; + justify-content: space-between; + align-items: center; + p { + padding-left: 10px; + font-weight: normal; + font-size: 16px; + line-height: 19px; + color: theme(colors.primary.main); + } + } + } + } + + .notice_and_circular_heading_mb .card-caption { + font-size: 16px; + line-height: 24px; + min-width : 150px; + padding-left: 50px; + } + + .view_download_main span{ + padding-right: 30px; + } + .view_download_main span .views p { + padding-left: 8px; + font-size: 16px; + } + .notice_and_circular_text p { + font-size: 16px !important; + line-height : 24px; + } + .documentDetails_row { + grid-gap: 0 !important; + gap: 0 !important; + } + .notice_and_circular_heading_mb header{ + font-size: 24px !important; + line-height: 28px; + margin-right : 100px; + } + .notice_and_circular_caption .card-caption { + font-size: 14px; + line-height: 21px; + } + +} +.documentDetails { + &_wrapper { + @apply flex flex-col gap-10 items-start; + } + &_row { + @apply flex gap-20; + } + &_title { + @apply w-48 font-bold; + } + &_description { + @apply max-w-lg; + text-overflow: clip; + } + &_pdf { + @apply flex flex-col gap-5; + } + &_subheader { + @apply font-bold; + font-size: large; + } +} + +.documentDetails_pdf { + @apply flex gap-10 cursor-pointer; +} +.grid_section { + @apply grid grid-cols-4 gap-4; + & .document_notification_form_section { + @apply col-span-3; + } +} +.document_notification_first_grid { + @apply grid grid-cols-4 gap-4; + & .form_section, + .document_notification_table_section { + @apply col-span-3; + } +} +.new_document_section_flex { + @apply flex items-center; + & .card-section-header { + @apply pl-lg; + } +} +.new_document_para_color { + @apply text-primary-light; + margin-bottom: 42px; +} +.document_notification_second_grid { + @apply grid grid-cols-3 gap-4; +} +.document_notification_clear_search_btn { + display: flex; + justify-content: flex-end; + align-items: center; + & .document_notification_clear_search_btn_align { + display: flex; + align-items: center; + } +} +.new_document_clear_search_alignment { + @apply mb-md mr-lg; +} +.document_notification_filter_header { + @apply flex justify-between items-center; +} +.document_notification_filter_icon { + @apply flex items-center; + & .card-caption { + @apply ml-lg; + } +} +.document-table-docs-columns { + @apply flex items-center gap-5; +} +.filter_section_main { + padding-bottom: 300px; +} +.new_document_card { + @apply w-full h-56 bg-white p-xl; +} +.filter_table_section_margin { + margin-top: 30px; +} +.filter_card_employee { + @apply w-full h-auto bg-white p-xl; + padding-bottom: 100px; +} +.filter_section_document_categories { + padding-top: 20px; +} +.new_document_card_table { + @apply w-full h-auto bg-white p-xl; +} +.employee_document_inbox_table_main { + .table { + tbody { + tr { + @apply py-md; + } + } + } +} +.confirmation_box { + height: 130px; + display: flex; + align-items: center; + padding-left: 8px; + gap: 10px; + overflow: hidden; + text-overflow: ellipsis; +} + +.Docs_CardWrapper{ + @apply bg-white m-sm px-md pt-md pb-lg shadow-card; + border-radius: 4px; +} + +.mobileInbox_attachments{ + display:flex; + gap:10px; +} + +.documentDetails_row_items { + display:flex; + flex-direction: row; + align-self: flex-start; +} + +@media screen and (max-width : 768px){ + .documentDetails_row_items{ + @apply grid grid-cols-2 gap-4; + } +} \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/pages/citizen/Events.scss b/micro-ui/web/micro-ui-internals/packages/css/src/pages/citizen/Events.scss new file mode 100644 index 00000000000..edf8c3322d3 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/pages/citizen/Events.scss @@ -0,0 +1,47 @@ +.OnGroundEventDetailsCard{ + box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.16); + @apply bg-white mx-sm mb-md p-md rounded; +} + +.eventAddressAndDirection{ + @apply text-body-s mb-md; + span{ + @apply flex mb-sm; + svg{ + @apply h-5 w-5; + } + div{ + @apply ml-md; + p{ + @apply mb-sm; + } + .direction{ + @apply text-primary-main cursor-pointer; + } + } + } +} + +.eventTimeRange{ + @apply text-body-s flex; + svg{ + @apply h-5 w-5; + } + p{ + @apply ml-md; + } +} + +.cardCaptionBodyS{ + @apply text-body-s text-text-secondary mb-md; +} + +@screen dt{ + .eventAddressAndDirection{ + @apply text-body-s-dt; + } + + .cardCaptionBodyS{ + @apply text-body-s-dt; + } +} \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/pages/citizen/HomePageWrapper.scss b/micro-ui/web/micro-ui-internals/packages/css/src/pages/citizen/HomePageWrapper.scss new file mode 100644 index 00000000000..de3747c67d6 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/pages/citizen/HomePageWrapper.scss @@ -0,0 +1,158 @@ +.HomePageWrapper { + margin-top: -25px; + + .BannerWithSearch { + margin-bottom: 40px; + width: 100%; + @apply relative; + .Search { + width: calc(100% - 32px); + bottom: -18px; + @apply mx-md absolute; + } + img { + height: 33vw; + @apply w-full object-cover; + } + } + + .ServicesSection { + @apply flex flex-wrap; + padding: 40px 15px 0 15px; + } + + @screen dt { + .ServicesSection { + @apply flex flex-wrap; + padding: 40px 15px 0 15px; + width: 100%; + } + } + + .WhatsNewSection { + @apply m-sm; + padding: 0 15px; + .headSection { + @apply flex mb-sm justify-between; + h2 { + @apply text-heading-s font-bold text-text-primary pl-sm; + } + p { + @apply text-link text-primary-main font-medium cursor-pointer; + } + } + @media (min-width: 780px) { + padding: 0 15px; + } + } + + .WhatsAppBanner{ + width: 100%; + padding: 0px 20px 0px 20px; + margin: auto; + cursor: pointer; + img { + width: 100%; + } + } +} + +@media (min-width: 780px) { + .SideBarStatic { + width: 219px; + background: theme(colors.white); + } +} + +@media (max-width: 780px) { + .SideBarStatic { + display: none; + } +} +.HomePageContainer { + @media (min-width: 780px) { + display: flex; + width: calc(100% - 219px); + height: calc(100%-30px); + } +} + +.moduleLinkHomePage { + @media (min-width: 780px) { + width: calc(100% - 219px); + } + margin-top: -25px; + img { + height: 33vw; + filter: grayscale(100%); + @apply w-full object-cover; + } + h1 { + position: absolute; + top: 100px; + left: 21px; + @apply text-heading-xl text-white font-bold; + } + .moduleLinkHomePageBackButton { + border: none; + top: 76px; + svg { + fill: theme(colors.white); + } + @apply absolute text-white text-heading-s ml-md; + } +} + +.moduleLinkHomePageModuleLinks { + @apply mt-md; + .CitizenHomeCard { + .header { + @apply hidden; + } + } +} + +@screen dt { + .HomePageWrapper { + width: 100%; + .BannerWithSearch { + margin-bottom: 56px; + width: 100% !important; + .Search { + width: 100%; + margin: 0; + padding: 0 15px 0 15px; + } + img { + height: 20vw; + } + } + + .WhatsAppBanner { + width: 100%; + img{ + height: 20vw; + width: 100%; + } + } + + } + .moduleLinkHomePage { + img { + min-width: 100vw; + height: 20vw; + } + h1 { + top: calc(10vw + 40px); + left: 15.8rem; + } + .moduleLinkHomePageBackButton { + top: calc(10vw + 16px); + @apply ml-md; + } + } + + .moduleLinkHomePageModuleLinks { + width: 100%; + } +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/pages/citizen/SurveyList.scss b/micro-ui/web/micro-ui-internals/packages/css/src/pages/citizen/SurveyList.scss new file mode 100644 index 00000000000..21994bb1fda --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/pages/citizen/SurveyList.scss @@ -0,0 +1,22 @@ +.surveyListclockDiv{ + @apply flex items-center my-lg; +} +.surveyListclockDiv span{ + @apply pl-md text-text-primary; +} +.surveyListstatus{ + @apply flex items-center justify-between; +} +.surveyLisNotResponded{ + @apply text-error; +} +.surveyLisResponded{ + @apply text-success; +} +.surveyListCardMargin{ + @apply mx-md my-lg ; +} +.centered-message{ + @apply flex items-center pl-md py-lg ; + +} \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/pages/citizen/citizenDocument.scss b/micro-ui/web/micro-ui-internals/packages/css/src/pages/citizen/citizenDocument.scss new file mode 100644 index 00000000000..106bde67263 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/pages/citizen/citizenDocument.scss @@ -0,0 +1,22 @@ +.notice_and_circular_image svg { + width: 80px; + height: 100px; + } + .notice_and_circular_content { + padding-left: 50px; + } + .back-btn2{ + border: none; + } + @media screen and (max-width: 768px) { + .notice_and_circular_image svg { + width: 53px; + height: 66px; + } + .notice_and_circular_content { + padding-left: 40px; + } + .documentContainerPadding{ + padding: 0 10px; + } + } \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/pages/citizen/container.scss b/micro-ui/web/micro-ui-internals/packages/css/src/pages/citizen/container.scss new file mode 100644 index 00000000000..ad7a47a7a1f --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/pages/citizen/container.scss @@ -0,0 +1,19 @@ +.citizen-home-footer { + @apply flex w-full h-10 bg-grey-bg pb-md pt-sm justify-center; + img { + @apply ml-sm; + } +} + +.employee .citizen-home-footer { + @apply fixed bottom-0; +} +.fill-path-primary-main { + path { + fill: theme(colors.primary.main); + } +} + +.obps-search { + margin: 8px; +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/pages/citizen/payment/payment-type.scss b/micro-ui/web/micro-ui-internals/packages/css/src/pages/citizen/payment/payment-type.scss new file mode 100644 index 00000000000..2e2698b830c --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/pages/citizen/payment/payment-type.scss @@ -0,0 +1,3 @@ +.payment-amount-info{ + @apply flex justify-between; +} \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/pages/citizen/updatePropertyNumber.scss b/micro-ui/web/micro-ui-internals/packages/css/src/pages/citizen/updatePropertyNumber.scss new file mode 100644 index 00000000000..9c866b9be8c --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/pages/citizen/updatePropertyNumber.scss @@ -0,0 +1,46 @@ +.updatenumber-warper-citizen{ + min-height: 95vh; + height: unset; +} +.updatePropertyNumber { + .pt-update-no-popup-wrapper { + @apply m-md; + } + .search-form-wrapper { + display: inherit; + padding: 16px; + .submit-bar { + position: absolute; + bottom: 25px; + width: 90%; + } + .submit-bar-disabled { + position: absolute; + bottom: 25px; + width: 90%; + } + } +} + +@screen dt { + .updatenumber-warper-citizen{ + min-height: 100vh; + height: unset; + } + .updatePropertyNumber { + .h1 { + @apply m-md; + } + .search-form-wrapper { + .submit-bar { + width: 100% !important; + position: unset !important; + } + .submit-bar-disabled { + position: absolute; + bottom: 25px; + width: 90%; + } + } + } +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/EmployeeLogin.scss b/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/EmployeeLogin.scss new file mode 100644 index 00000000000..185bd91f9e7 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/EmployeeLogin.scss @@ -0,0 +1,7 @@ +.EmployeeLoginFooter{ + margin: auto; + @apply absolute bottom-10; + img{ + @apply h-4 object-contain; + } +} \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/cardfix.scss b/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/cardfix.scss new file mode 100644 index 00000000000..14a0b34383b --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/cardfix.scss @@ -0,0 +1,13 @@ +.flex-fit{ + @apply flex w-full border-b border-solid border-border; + padding : 8px 10px; +} +.card-count{ + @apply pr-xl; + div{ + @apply text-link; + span{ + @apply text-link font-bold; + } + } +} \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/container.scss b/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/container.scss new file mode 100644 index 00000000000..ee8cd235421 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/container.scss @@ -0,0 +1,72 @@ +.icon-bg-secondary { + @apply flex bg-secondary w-12 h-12; + + svg { + margin: auto; + @apply w-6 h-6; + } +} + +.heading-m { + @apply font-bold text-text-primary text-heading-m ml-md pt-sm; +} +.BPAheading-m { + margin-left: 22px; +} + +.break-line { + @apply border-border my-lg; +} + +.employee-home-footer { + @apply flex h-10 pb-md pt-sm justify-center w-full; + img { + height: 100%; + } +} +.employee-login-home-footer{ + @apply flex fixed bottom-0 h-10 bg-grey-bg pb-md pt-sm justify-center w-full; + img{ + @apply ml-sm + } +} +.fieldInspectionWrapper{ + border: 1px solid theme(colors.border); + padding: 16px; + margin-top: 8px; + background: theme(colors.grey.light); +} + +.fieldInsepctionInsideWrapper { + border: 1px solid theme(colors.border); + padding: 16px; + margin-top: 8px; + background: theme(colors.white); + max-width: 70%; + min-width: 280px; +} + +@screen dt { + .ground-container { + margin-bottom: 56px; + @apply p-md; + } + .heading-m { + @apply text-heading-m-dt; + } + .BPAheading-m { + margin-left: 22px; + } + .break-line { + margin-top: 40px; + margin-bottom: 40px; + } + .employee-home-footer { + } + .moduleCardWrapper { + @apply flex flex-row flex-wrap !important; + } + .gridModuleWrapper { + @apply grid grid-cols-4 gap-4; + } +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/dss.scss b/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/dss.scss new file mode 100644 index 00000000000..f211b041697 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/dss.scss @@ -0,0 +1,266 @@ +.dss-switch-tabs{/* Card / Primary */ + +/* Light Theme / Paper */ + +background: theme(colors.white); +/* Card-Shadow */ + +box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.16); +border-radius: 4px; +margin-bottom:3%; +margin-right:25px; +} + +.dss-header-label{ + font-weight: 600 !important; + font-size: 22px !important; + white-space: pre-line; +} +.dss-switch-tab-wrapper{ + cursor:pointer; + display: flex; + flex-direction: row; + height: 50px; + align-items: center; +} + +.dss-switch-tab-selected{ + /* Revenue */ + border-bottom: 3px solid theme(colors.primary.main); + font-family: Roboto; + font-style: normal; + font-weight: 500; + font-size: 22px; + color: theme(colors.primary.main); + padding: 7px 24px; + +} +.dss-switch-tab-unselected{ + +font-family: Roboto; +font-style: normal; +font-weight: 500; +font-size: 22px; +color: theme(colors.text.secondary); +padding: 8px 24px; + +} + +.dss-table-subheader{ + position: relative; + top: -7px; + font-size: 13px; + font-weight: 400; + color: rgba(80, 90, 95, 1); +} + +.dss-pie-subheader{ + position: relative; + top: -7px; + font-size: 13px; + font-weight: 400; + color: rgba(80, 90, 95, 1); +} + +.recharts-legend-item{ + margin-bottom: 20px !important; + white-space: pre; +} + +.dss-white-pre{ + white-space: pre; + +} +.dss-white-pre-line{ + white-space: pre-line; + +} +.dss-white-pre-temp{ + white-space: pre-line; + +} + +.multi-select-dropdown-wrap{ + .master{ + .label{ + p{ + white-space:pre; + margin: auto; + margin-left:0px; + padding-left: 1%; + } + } + } +} + +.divToBeHidden{ + display:block; +} + +.divWillGetHidden{ + display:none; +} + +.dss-temp-white-pre{ + white-space: pre; +} + +.dss-input-active-border{ +--border-opacity: 1; +border: 1px solid theme(colors.primary.main) !important; +border-color: rgba(244, 119, 56, var(--border-opacity)); +} + +.dss-card { + display: flex; + flex-wrap: wrap; +} + +.dss-card-parent { + display: flex; + flex-direction: column; + width: 31%; + border-radius: 6px; + padding: 25px; + margin: 15px 11.5px; + box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25); + cursor: pointer; +} + +.dss-card-body { + display: flex; + flex-wrap: wrap; + cursor: pointer; +} + +.dss-card-header { + display: flex; + margin-bottom: 30px; + align-items: center; + + p { + font-size: 24px; + font-family: "Roboto", sans-serif; + font-weight: 500; + color: theme(colors.black); + } + + svg { + width: 50px; + height: 50px; + } +} + + +.dss-insight-card { + margin: 10px 0; + + p { + font-family: "Roboto", sans-serif; + } + + .p1 { + font-size: 16px; + color: #585858; + } + + .p3 { + font-size: 16px; + font-weight: 400; + } + + .p2 { + font-size: 24px; + font-weight: 500; + color: theme(colors.black); + } + + .color-green { + color: theme(colors.success); + } + + .color-red { + color: theme(colors.error); + } +} +.w-100 { + width: 100%; +} +.dss-w-100 { + width: 97%; +} + +.h-100{ + width: 100%; + height: 100%; +} + +.dss-h-100{ + width: 97%; + height: 100%; +} + +.tab-rows{ + display: flex; + justify-content:space-between; + height: 30px; + align-items: center; + width: 60%; + margin-left: 13%; +} +.tab-header{ + font-weight: 700; + font-size: 16px; + line-height: 19px; + border-bottom: 1px solid #b1b4b6; + color: #2a3340; +} +.map-status{ + position: relative; + width: 33%; + left: 50%; + bottom: 130px; +} +.map-row{ + display: flex; + align-items: center; + margin-top: 5px; +} +.map-box{ + display: inline-block; + height: 10px; + width: 10px; +} +.map-text{ + margin-left: 5px; + color: #636363; + font-size: 14px; +} + + +@media screen and (max-width: 768px) { + .dss-switch-tabs{/* Card / Primary */ + margin-right:0px; + } + + .dss-card-parent{ + width:100%; + } +} + +.dss-metric-horizontal{ + width: 48%; + max-width: 48%; +} +.dss-primary{ + display: inline; + margin-right: 10px; + path{ + fill:theme(colors.primary.main); + } +} + +.dss-horizontal-v2{ + width: 22.7%; + max-width: 22.7%; +} \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/form-fields.scss b/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/form-fields.scss new file mode 100644 index 00000000000..d5eb9b56939 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/form-fields.scss @@ -0,0 +1,13 @@ +.form-field{ + @apply w-full +} + +@screen dt { + .form-field{ + @apply w-1/2 + } + + .desktop-w-full{ + @apply w-full !important + } +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/iframe.scss b/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/iframe.scss new file mode 100644 index 00000000000..1f3b992c708 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/iframe.scss @@ -0,0 +1,66 @@ +body { + margin: 0; + padding: 0; + font-family: "Roboto"; + background: #f4f7fb; + } + + + .app-container-iframe { + border-width: 0px; + div[class^="MuiCircularProgress"] { + position: sticky; + top: 90%; + left: 50%; + } + div[role^="progressbar"] { + left: 50%; + position: sticky; + } + } + + @media only screen and (min-width: 953px) { + .app-container-iframe { + border-width: 0px; + position: fixed; + width: 83.5%; + height: calc(100vh - 64px); + } + } + + + @media (max-width: 768px) { + .app-container-iframe { + border-width: 0; + width: 100vw; + height: 100vh; + margin: 32px 0 0 0; + } + } + @media (max-width: 375px) { + .app-container-iframe { + border-width: 0; + width: 100vw; + height: 100vh; + margin: 32px 0 0 0; + } + } + +.app-iframe-wrapper{ + left: 64px; + border-width: 0; + position: fixed; + top: 80px; +} + .app-iframe{ + width: 97%; + height: calc(100vh - 90px); + border-width: 0; + position: fixed; + } + @media (max-width: 768px) { + + .app-iframe-wrapper{ + left: 0px; + } + } \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/inbox.scss b/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/inbox.scss new file mode 100644 index 00000000000..b19e0b2d12e --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/inbox.scss @@ -0,0 +1,585 @@ +.complaint-links-container { + @apply bg-white; + border-radius: 4px; + .header { + @apply flex items-center border-b border-border justify-between; + + .logo { + width: 56px; + height: 56px; + @apply bg-focus; + padding: 12px; + border-radius: 4px; + svg { + @apply w-8 h-8; + } + } + + .text { + @apply pl-md text-heading-m font-bold; + } + } + + .body { + padding: 10px; + @apply flex items-start flex-col; + margin-left: 46px; + + .link { + @apply p-sm text-primary-main items-center; + display: flex !important; + a{ + color: inherit; + text-decoration: inherit + } + } + + .inbox-total { + padding: 4px; + display: table; + @apply whitespace-normal text-center text-white w-8 h-8 bg-primary-main rounded-full ml-xs; + } + } + + .links-wrapper { + @apply pl-md py-sm text-text-btn; + .link { + padding: 0 !important; + padding-bottom: 4px !important; + svg { + @apply ml-sm; + } + } + } +} + +.MobilePopupHeadingWrapper { + @apply flex place-content-between mb-md; + h2 { + @apply text-heading-l font-bold; + } +} + +.filter-button { + @apply text-primary-main; + &:hover { + @apply text-primary-dark cursor-pointer; + } +} + +.employeeCard-info-box { + @apply flex justify-end ml-md; + background-color: theme(colors.grey.light); + div { + margin-right: 32px; + span:nth-child(2) { + @apply font-bold; + color: #4f5a5f; + } + } + .employeeCard-info-data { + display: flex; + flex-direction: column; + } +} + +.filter-form { + .filter-card { + @apply bg-white min-h-full; + padding: 10px; + + .heading { + justify-content: unset; + @apply flex; + + .clearAll { + display: none; + } + } + + .filter-label { + @apply font-bold text-heading-l flex gap-3; + padding-bottom: 6px; + svg { + fill: theme(colors.text.primary); + } + } + .sub-filter-label { + font-weight: 400; + font-size: 16px; + } + } + .filter-form-field { + p { + @apply text-form-field text-text-primary block mb-md; + } + } +} + +.inbox-container { + .filters-container { + .filter { + .filter-card { + @apply bg-white; + padding: 10px; + .filter-card-close-button { + @apply flex flex-row-reverse; + } + .heading { + @apply flex justify-between; + + .clearAll { + display: none; + } + } + + .filter-label { + @apply text-heading-m block flex gap-3 items-center; + padding-bottom: 6px; + svg { + fill: theme(colors.text.primary); + } + } + + .sub-filter-label { + font-weight: 400; + font-size: 16px; + } + } + } + + .search-complaint-container { + @apply items-center bg-white p-md; + + .complaint-input-container { + @apply w-full; + .complaint-input { + @apply flex flex-col; + + .clear-search { + @apply text-focus; + display: none; + &:hover { + color: theme(colors.link.hover); + cursor: pointer; + } + } + } + + .mobile-input { + } + } + } + } + + .status-container { + margin-bottom: 50px; + } +} + +.clear-search, +.clear-search .link-label { + @apply text-focus; + @apply block; + cursor: pointer; + &:hover { + color: #000; + } +} +.button-clear { + @apply text-focus text-body-s-dt; +} + +.inbox-count { + @apply inline ml-sm p-sm bg-primary-main rounded-full text-white text-heading-s align-middle text-center font-regular; +} + +@screen dt { + .complaint-links-container { + @apply bg-white; + + .header { + @apply flex items-center border-b border-border; + + .logo { + @apply bg-focus; + padding: 12px; + border-radius: 4px; + } + + .text { + @apply pl-md text-heading-m-dt font-bold; + } + } + + .body { + padding: 10px; + @apply flex items-start flex-col; + margin-left: 46px; + + .link { + @apply p-sm text-primary-main; + } + } + } + + .inboxLinks { + margin: 0 !important; + padding: 0 !important; + .header { + border: none; + @apply justify-start; + .logo { + @apply bg-white; + svg { + path { + fill: theme(colors.primary.main); + } + } + } + } + .body { + margin-left: 0; + } + } + + .filter-form { + .filter-card { + @apply p-md bg-white; + + .heading { + @apply flex justify-between; + } + + .label { + @apply text-heading-s; + } + } + } + + .inbox-container { + @apply flex; + + .filters-container { + width: 270px; + + .filter { + @apply mt-md; + + .filter-card { + @apply p-md bg-white; + + .heading { + @apply flex justify-between; + } + + .label { + @apply text-heading-s; + } + } + } + .citizen-filter { + margin-top: unset; + } + } + + .search-container { + width: 874px; + + .search-complaint-container { + margin: auto; + @apply flex flex-col items-start mb-md bg-white p-md; + + .complaint-header { + display: flex; + @apply flex justify-between w-full; + margin-bottom: 20px; + } + + .complaint-input-container { + /* display: inline-block !important; */ + display: grid; + grid-template-columns: 33.33% 33.33% 33.33%; + + &.for-pt { + &.for-search { + grid-template-columns: 25% 25% 25% 25%; + + .input-fields:nth-child(3n) { + @apply mr-md !important; + } + + .input-fields:nth-child(4n) { + margin-right: 0 !important; + } + + .search-submit-wrapper { + grid-column: 4/5; + /* margin-top: 56px;*/ + max-width: unset; + margin-left: unset; + } + } + } + + .search-submit-wrapper { + grid-column: 3/4; + margin-left: 50%; + max-width: 50%; + grid-column: 3/4; + @apply flex flex-col justify-center text-center; + + .submit-bar-search { + margin-top: unset; + width: 100%; + margin-bottom: 20px; + margin-left: unset; + max-width: 100%; + width: 100%; + } + } + + .input-fields { + /*width: calc(50% - 16px);*/ + + @apply inline-block mr-md !important; + + .inbox-search-form-error { + padding-top: 0; + margin-top: 0; + @apply absolute; + } + } + + .input-fields:nth-child(3n) { + margin-right: 0 !important; + } + + .complaint-input { + @apply flex flex-col; + + .clear-search { + @apply text-focus; + @apply block; + cursor: pointer; + &:hover { + color: theme(colors.link.hover); + cursor: pointer; + } + } + } + + .mobile-input { + @apply ml-sm; + } + } + + .search-action-wrapper { + width: 33%; + margin-top: 28px; + @apply inline-block align-middle text-center; + button { + margin: 0; + width: 100%; + max-width: 300px !important; + } + } + } + + .search-complaint-container-for-search { + } + } + } +} + +.document-clear-all { + grid-area: 2/2; + display: flex; + justify-content: flex-end; + padding-right: 16px; + align-items: center; +} + +.cell-text { + color: theme(colors.text.secondary); +} + +.sla-cell-error { + color: theme(colors.error); + background-color: rgba(212, 53, 28, 0.12); + padding: 0 24px; + border-radius: 11px; +} + +.sla-cell-success { + color: theme(colors.success); + background-color: rgba(0, 112, 60, 0.12); + padding: 0 24px; + border-radius: 11px; +} + +.complain-no-cell-text { + margin-top: "4px"; + color: "theme(colors.text.secondary)"; +} + +.search-error-label { + @apply font-bold text-legend text-error mb-sm !important; +} + +.inbox-action-container { + display: flex; + justify-content: flex-end; + align-items: flex-start; +} +.complaint-links-container .header .removeHeight { + line-height: 28px; +} + +@screen dt { + .complaint-links-container .header .removeBorderRadiusLogo { + border-radius: 2px !important; + } +} +@screen dt { + .customEmployeeCard { + width: 263px !important; + height: 263px !important; + } +} +.employeeTotalLink { + color: theme(colors.text.secondary); + font-size: 16px; + text-decoration: none; +} + +@screen dt { + .groupBill-custom { + .custom-group-merge-container { + display: flex !important; + justify-content: space-between !important; + .header { + display: flex; + align-items: baseline; + .logo { + margin-right: 1rem; + svg { + path { + fill: theme(colors.primary.main); + } + } + } + .h1 { + font-size: 24px; + line-height: 28px; + font-weight: 400; + color: theme(colors.primary.main); + } + } + } + .inbox-container { + .search-container { + .search-complaint-container { + display: flex; + flex-direction: row; + } + .group-complaint-input-container { + width: 33% !important; + display: flex; + flex-direction: column; + } + } + } + .inbox-action-container { + display: flex; + flex-direction: row-reverse; + .clear-search { + margin-top: 65px; + margin-left: 16px; + padding-top: unset !important; + } + .submit-bar-search { + margin-top: 55px !important; + } + } + } +} + +.plumber-details-new-value-wrapper { + flex: 2 1 auto; +} + +.connection-details-new-value-wrapper { + flex: 1 1 auto; +} + +.connection-details-old-value-wrapper, +.plumber-details-old-value-wrapper { + flex: 1 1 auto; + + .old-value-null-wrapper { + visibility: hidden; + padding-bottom: 8px; + margin-bottom: 8px; + } + .row { + color: #b1b4b6; + font-weight: 700; + font-size: 16px; + } +} + +.search-tabs-container { + border-bottom: 1px solid rgba(0, 0, 0, 0.2); + margin-bottom: 35px; + display: flex; + justify-content: space-between; + + .search-tab-head { + padding: 10px 35px; + } + + .search-tab-head-selected { + padding: 10px 35px; + color: rgb(244, 119, 56); + border-bottom: 4px solid rgb(244, 119, 56); + font-weight: bold; + } + + .search-tab-head-selected:focus { + outline: 0; + } +} + +.card-with-background { + background: rgb(250, 250, 250); + border: 1px solid rgb(214, 213, 212); + + .card-head { + display: flex; + justify-content: space-between; + margin-bottom: 30px; + } + + h2 { + font-size: 16px; + font-weight: 700; + } +} + +.registryTable { + tHead { + tr { + th { + text-align: center; + } + } + } + tBody { + tr { + td { + text-align: center; + } + } + } +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/index.scss b/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/index.scss new file mode 100644 index 00000000000..8f41c6938d8 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/index.scss @@ -0,0 +1,572 @@ +@import "./login.scss"; +/* TODO: convert using tailwind */ +.employee { + .breadcrumb { + @apply ml-sm mb-lg; + } + .ground-container { + margin-bottom: 56px; + @apply flex flex-col; + } + .card-home { + font-size: 16px; + padding: 0 0 16px 0; + width: 92vw; + display: inline-block; + margin: 8px auto; + } + .home-action-cards { + height: auto !important; + min-height: 263px; + } + .topbar { + position: fixed; + top: 0; + width: 100%; + padding: 16px 24px; + background: white; + box-shadow: rgba(0, 0, 0, 0.24) 0 1px 4px; + z-index: 9999; + + img { + display: inline; + + &.city { + margin-right: 8px; + height: 48px; + width: 48px; + } + + &.state { + height: 20px; + max-height: 20px; + width: auto; + } + } + + .ulb { + font-weight: bold; + } + + .right { + float: right; + margin-top: 12px; + + .user-img-txt { + background: theme(colors.primary.main); + padding: 10px 15px; + border-radius: 50%; + color: white; + font-weight: 700; + } + } + } + + .main { + padding-top: 88px; + } + + .loginContainer { + padding-top: 88px; + } + + .react-time-picker { + width: 100%; + } + + .react-time-picker__wrapper { + border: 1px solid theme(colors.inputBorder); + } + + .react-time-picker__clock { + display: none; + } + + .react-time-picker__inputGroup__leadingZero { + padding-right: 8px; + display: inline !important; + } + + .react-time-picker__inputGroup__input { + padding: 0; + min-width: none; + outline: none !important; + border: none !important; + } + + .react-time-picker__wrapper { + padding-left: 8px; + } +} + +.citizen { + .main { + padding-top: 82px; + min-height: calc(100vh - 90px); + } +} + +.citizen, +.employee { + .sidebar { + position: fixed; + left: 0; + background: #0B4B66; + height: 100%; + color: theme(colors.white); + margin-top: 83px; + z-index: 10000; + transition: 0.3s ease all; + white-space: nowrap; + height: calc(100vh - 36px); + padding-bottom: 5rem; + + .actions { + cursor: pointer; + display: flex; + align-items: center; + .tooltip { + margin-left: 16px; + } + margin-bottom: 0px; + } + + svg { + width: 24px; + height: 24px; + fill: theme(colors.white); + } + a { + display: flex; + } + .sidebar-link { + display: flex; + color: theme(colors.white); + justify-content: space-between; + align-items: center; + padding: 20px; + font-size: 14px; + + &.level-0 { + margin:0 0.3rem 0 0.3rem; + &.select-level{ + border-top: 1px solid; + border-bottom: 1px solid; + } + } + + &.active { + color: theme(colors.primary.main) !important; + + border-right: none; + svg { + fill: theme(colors.primary.main) !important; + } + } + .employee-search-input { + border: none; + outline: none; + background-color: rgba(0, 0, 0, 0); + margin-left: 13px; + } + .custom-link { + .tooltip { + margin-left: 16px; + span { + margin-left: unset !important; + left: unset !important; + } + } + } + + svg { + fill: theme(colors.white) !important; + width: 21px; + height: 21px; + } + + &:hover { + + background-color: #0B4B66; + + cursor: pointer; + + } + .search-icon-wrapper { + border: 2px solid theme(colors.white); + border-radius: 4px; + padding: 5px; + svg { + fill: theme(colors.white) !important; + width: 21px; + height: 21px; + path { + fill: theme(colors.white) !important; + } + } + } + } + .dropdown-link { + height: 40px; + display: flex; + margin-left: 40px; + align-items: center; + text-decoration: none; + color: theme(colors.white); + font-size: 14px; + .actions { + .tooltiptext { + left: unset; + right: 1%; + } + } + svg { + width: 20px; + height: 20px; + fill: theme(colors.white); + } + &:hover { + background-color: #6A8E9D; + opacity: 0.8; + cursor: pointer; + svg { + fill: #fe7a51 !important; + } + } + + + &.active { + border-left: 4px solid theme(colors.primary.main); + &.level-0 { + + } + &.level-1 { + border-left: 8.5px solid theme(colors.primary.main); + } + &.level-2 { + border-left: 4px solid theme(colors.primary.main); + } + + &.level-3{ + + } + color: theme(colors.primary.main) !important; + border-right: none; + svg { + fill: theme(colors.primary.main) !important; + } + } + } + span { + margin-left: 16px; + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; + } + } + + .wrapperStyles { + margin-top: -5px; + padding-left: 20px; + padding-top: 10px; + + .containerStyles { + border: 1px solid theme(colors.text.secondary); + padding: 16px; + margin-bottom: 20px; + } + + &.leftBorder { + border-left: 2px solid rgba(0, 0, 0, 0.12); + } + } + + .rowContainerStyles { + @apply flex flex-col; + } + + .tableContainerStyles { + border: 1px solid theme(colors.text.secondary); + padding: 16px; + margin-bottom: 20px; + } + + .historyTables { + display: grid; + grid-template-rows: 100px 100px; + grid-template-columns: repeat(5, minmax(100px, 1fr)); + } + + .historyContent { + margin: 0 10px; + position: relative; + padding-bottom: 5px; + } + + .historyCheckpoint { + background-color: #fe7a51; + border-radius: 100%; + width: 18px; + height: 18px; + display: inline-block; + position: relative; + left: -9px; + top: 4px; + + &.zIndex { + z-index: 10; + } + } + + .historyTableDateLabel { + color: rgba(0, 0, 0, 0.87); + font-size: 16px; + font-weight: 700; + line-height: 17px; + text-align: left; + display: inline-block; + padding-top: 5px; + } + + .bottomMargin { + margin-bottom: 0px; + } + + .historyTableDate { + color: rgba(0, 0, 0, 0.87); + font-size: 19px; + font-weight: 400; + line-height: 17px; + text-align: left; + display: inline-block; + padding-top: 10px; + } + + .historyHorizontalBar { + background-color: rgba(0, 0, 0, 0.12); + width: auto; + height: 2px; + margin-left: 16px; + } + + .smallText { + font-weight: 500; + font-size: 14px; + } +} + +.citizen { + .sidebar { + margin-top: 54px; + min-width: 200px; + .actions { + display: flex; + align-items: center; + gap: 10px; + } + } +} + +.link { + @apply text-primary-main cursor-pointer; + + :hover { + @apply text-primary-dark; + } +} + +.RightMostTopBarOptions { + @apply flex; + .EventNotificationWrapper { + @apply relative cursor-pointer ml-md; + span { + top: -10px; + right: -10px; + @apply absolute bg-error h-5 w-5 rounded-full text-center; + p { + line-height: 20px; + } + } + } + .select-wrap { + margin-bottom: unset; + svg { + fill: theme(colors.white); + } + } +} + +@media (min-width: 640px) { + .employee { + .ground-container { + @apply block; + } + .breadcrumb { + @apply mb-lg; + margin-left: 0; + } + .card-home { + width: 270px; + margin-right: 10px; + margin-bottom: 10px; + } + .card-home-hrms { + width: 405px; + padding: 0px; + margin-right: 16px; + margin-bottom: 16px; + } + .main { + display: flex; + flex-direction: column; + padding-top: 80px; + margin-left: 72px; + width: calc(100%-83px); + } + .citizen-home-container { + display: flex; + flex-direction: unset !important; + width: unset !important; + margin-left: unset !important; + padding-top: 58px; + } + } + + .citizen { + .main { + width: 100%; + padding-top: 58px; + height: 100%; + display: flex; + justify-content: center; + } + + .center-container { + } + } +} + +.fullWidth { + width: 100%; +} + +.multi-select-container { + .disposal-text { + @apply font-bold; + } + + .disposal-info { + @apply my-md ml-sm; + } + + .disposal-action-bar { + @apply flex justify-between items-center; + } +} + +@screen dt { + .d-grid { + display: grid; + grid-template-columns: 250px 250px 250px 250px; + column-gap: 10px; + row-gap: 2px; + margin-left: -12px; + } +} + +.m-auto { + margin: auto !important; +} + +.mb-50 { + margin-bottom: 50px; +} +.mb-25 { + margin-bottom: 25px; +} + +.back-wrapper { + display: flex; + justify-content: space-between; + + .top-back-btn { + margin-bottom: 0px; + color: theme(colors.white); + margin-right: 1em; + & svg { + fill: theme(colors.white); + } + } + .hambuger-back-wrapper { + display: flex; + @media (min-width: 780px) { + .hamburger-span { + display: none; + } + } + } +} + +@screen dt { + .back-wrapper { + margin-right: 2rem; + margin-left: 2rem; + } +} + +.user-profile { + @media (min-width: 780px) { + width: calc(100% - 219px); + margin-left: 16px; + margin-right: 16px; + } +} + +.link { + a{ + color: inherit; + text-decoration: inherit + } +} + +.breadcrumb { + a{ + color: inherit; + text-decoration: inherit + } +} + +.sidebar-link.active{ +.custom-link{ + text-decoration: none; + div{ + span{ + color: theme(colors.primary.main) !important; + text-decoration: none; + } + } +} +} +.bread-crumb { + a{ + color: inherit; + text-decoration: inherit + } +} + +.sidebar-link{ + .custom-link{ + text-decoration: none; + div{ + span{ + color: theme(colors.white); + text-decoration: none; + } + } + } + } + +/* TODO fix required NABEEL/ANIL for home screen card */ + .customEmployeeCard { + @apply m-sm !important; + } diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/login.scss b/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/login.scss new file mode 100644 index 00000000000..2ec40a63ca1 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/login.scss @@ -0,0 +1,221 @@ +.loginFormStyleEmployee { + .employeeCard { + .submit-bar { + @apply w-full; + } + } +} +.banner .bannerCard{ + min-width: 420px !important; +} +.employeeForgotPassword .employeeCard .field .field-container .component-in-front { + margin-top: 0; + border: 1px solid; + border-right: none; + padding: 7px; +} +@screen dt { + .employeeForgotPassword .employeeCard .field .field-container .component-in-front { + padding: 7px; + } + .loginFormStyleEmployee .employeeCard, .banner .bannerCard{ + min-width: 420px !important; + } + .employeeForgotPassword .employeeCard, .employeeChangePassword .employeeCard{ + max-width: 420px !important; + min-width: 420px !important; + } +} + +.employeeForgotPassword .employee-card-input { + margin-bottom: 0px; + border-left: none; +} + +.employeeForgotPassword .field-container { + margin: 10px 0; +} +.employeeForgotPassword { + .submit-bar { + @apply w-full; + } +} +.employeeChangePassword .submit-bar { + width: 100% !important; +} +.employeeChangePassword .card-text { + text-align: center; +} +.employeeChangePassword .input-otp-wrap { + text-align: center; +} +.submit-bar { + .submit-bar { + @apply w-full; + } +} +.loginFormStyleEmployee .bannerHeader p, +.employeeForgotPassword .bannerHeader p, +.employeeChangePassword .bannerHeader p { + font-size: 19px; +} +.employeeCard .card-sub-header { + font-size: 24px; +} +.loginFormStyleEmployee .employeeCard .card-label, .employeeForgotPassword .employeeCard .card-label{ + font-weight: normal; + font-size: 16px; + line-height: 19px; + color: theme(colors.text.primary); + margin-top: 20px; +} +.banner .bannerHeader { + margin-bottom: 20px; +} +.employeeCard .card-label{ + font-weight: normal; + font-size: 16px; + line-height: 19px; + color: theme(colors.text.primary); +} +.profile-label-margin{ + margin-top: 10px; +} + +.employeeForgotPassword .employeeCard .card-label-desc { + font-weight: normal; + font-size: 16px; + line-height: 24px; + color: theme(colors.text.secondary); + margin-top: 15px; +} +.employeeChangePassword .employeeCard .card-text { + margin-bottom: 15px; + font-size: 16px; + color: theme(colors.text.secondary); +} +@media screen and (max-width: 768px) { + .employeeChangePassword .employeeCard .card-text { + margin-top: 7px; + } + .employeeCard .card-sub-header { + font-size: 18px; + } +} +.employeeChangePassword .employeeCard .card-text-button { + text-align: center !important; + margin-bottom: 12px !important; +} +.employeeChangePassword .employeeCard .input-otp-wrap { + margin-bottom: 10px; +} +.employee .loginContainer { + padding-top: 0px !important; +} +.banner { + height: calc(100vh ) !important; +} + +.employeeChangePassword .employeeCard .field .field-container{ + margin-bottom: 24px; +} + +.employeeForgotPassword .employeeCard .employee-card-sub-header, .employeeChangePassword .employeeCard .employee-card-sub-header, .loginFormStyleEmployee .employeeCard .employee-card-sub-header{ + font-size: 24px !important; + line-height: 28px !important; + margin-bottom: 0px !important; +} +@media screen and (max-width : 768px){ + .employeeForgotPassword .employeeCard .employee-card-sub-header, .employeeChangePassword .employeeCard .employee-card-sub-header, .loginFormStyleEmployee .employeeCard .employee-card-sub-header{ + font-size: 18px !important; + line-height: 21px !important; + margin-bottom: 0px !important; + } + .loginFormStyleEmployee .employeeCard, .banner .bannerCard{ + min-width: 340px !important; + margin: 10px !important; + } + .employeeForgotPassword .employeeCard, .employeeChangePassword .employeeCard{ + max-width: 360px !important; + min-width: 340px !important; + margin: 10px !important; + } +} +.employeeChangePassword .employeeCard .card-text{ + margin-top: 18px !important; + margin-bottom: 20px !important; +} +.employeeBackbuttonAlign{ + display: none; +} +.resend-otp{ + cursor: pointer; +} + +.employee-select-wrap.login-city-dd { + .options-card{ + max-height: 200px; + } +} +@media screen and (max-width: 768px){ + .employeeBackbuttonAlign{ + display: block; + position: absolute; + top: 20px; + left: 20px; + } + .banner{ + align-items: flex-end; + padding-bottom: 40px; + height: 100vh !important; + } + .topbar{ + background: rgba(34, 57, 77, var(--bg-opacity)) !important; + color: white; + } + .employee .loginContainer{ + padding-top: 0px !important; + } + .removeBottomMargin{ + margin-bottom: 0px !important; + } + .employee-select-wrap.login-city-dd { + .options-card{ + max-height: 160px; + } + } +} + + +.loginFormStyleEmployee { + + .loginCardSubHeaderClassName { + text-align: center !important; + } + .loginCardClassName { + margin: auto !important; + min-width: 408px !important; + header.employee-card-sub-header{ + text-align: center; + margin-top: 10px; + } + } + .buttonClassName { + max-width: 100% !important; + width: 100% !important + } + .field .field-container .text-input input { + margin-bottom: 5px !important; + } + .bannerHeader { + margin-bottom: 0px !important; + } + + .primary-label-btn { + margin: 20px auto 0 auto !important; + } + + .employee-select-wrap .options-card { + max-height: 150px !important; + } +} \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/oldMobileInbox.scss b/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/oldMobileInbox.scss new file mode 100644 index 00000000000..0c8e7812570 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/oldMobileInbox.scss @@ -0,0 +1,5 @@ +.linksWrapperForMobileInbox{ + .header{ + justify-content: initial; + } +} \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/popupmodule.scss b/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/popupmodule.scss new file mode 100644 index 00000000000..b8a99b6f5d7 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/popupmodule.scss @@ -0,0 +1,34 @@ +.popup-module { + width: 480px; + margin: 0 auto; + @apply bg-white; + + .popup-module-main { + @apply px-lg pb-lg; + } + + .popup-module-action-bar { + gap: 16px; + @apply flex flex-row justify-end; + } +} + +@screen dt { + .popup-module { + width: 480px; + margin: auto; + @apply bg-white; + + .popup-module-main { + @apply px-lg pb-lg; + } + .popup-module-main { + @apply w-full p-sm h-full; + } + + .popup-module-action-bar { + gap: 16px; + @apply flex flex-row justify-end; + } + } +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/response.scss b/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/response.scss new file mode 100644 index 00000000000..31a3993d26a --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/response.scss @@ -0,0 +1,3 @@ +.secondary-action{ + @apply inline float-right; +} \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/scroll-table.scss b/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/scroll-table.scss new file mode 100644 index 00000000000..c6637ebbce6 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/scroll-table.scss @@ -0,0 +1,119 @@ +.scroll-table-wrapper{ + &::-webkit-scrollbar { + display: none; + } + -ms-overflow-style: none; + scrollbar-width: none; + @apply relative overflow-x-scroll overflow-y-visible pb-sm text-center; + + .scroll-table-width-wrapper{ + &::-webkit-scrollbar { + display: none; + } + -ms-overflow-style: none; + scrollbar-width: none; + width: calc(100% - 110px); + margin: auto; + @apply overflow-x-scroll; + table{ + margin: auto; + } + } + + .first-col{ + width:110px; + @apply absolute left-0; + } + + .last-col{ + width:110px; + @apply absolute right-0; + } +} + +@screen dt{ + .scroll-table-wrapper{ + width: 60%; + } +} +.table-switch-card-chip{ + display: flex; + cursor: pointer; + padding-right: 10px; + width: 100%; +} + +.table-search-wrapper{ + display:flex; + width:100%; + align-items:center; +} +.table-switch-card-inactive{ + /* Frame 58 */ + + +/* Auto layout */ + +display: flex; +flex-direction: row; +align-items: flex-start; +padding: 8px; + +position: static; +height: 40px; +left: 84px; +top: 0px; + +/* Light Theme / Paper */ + +background: theme(colors.white); +box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.1); + +/* Inside auto layout */ + +flex: none; +flex-grow: 0; +margin: 0px 0px; +color: #B1B4B6; +} +.table-switch-card-inactive:hover{ + background: #fffffc; + font-size: 17px; + color: theme(colors.text.secondary); +} + +.table-switch-card-active{/* Frame 57 */ + + + /* Auto layout */ + + display: flex; + flex-direction: row; + align-items: flex-start; + padding: 8px; + + position: static; + height: 40px; + left: 0px; + top: 0px; + + /* Light Theme / Paper */ + + background: theme(colors.white); + /* Light Theme / Primary */ + + border: 1px solid theme(colors.primary.main); + box-sizing: border-box; + box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.1); + + /* Inside auto layout */ + + flex: none; + flex-grow: 0; + margin: 0px 0px; +} + +.icon-wrapper { + margin-left:1rem; + cursor:pointer +} \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/surveys.scss b/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/surveys.scss new file mode 100644 index 00000000000..bcfa2aa5eae --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/surveys.scss @@ -0,0 +1,273 @@ +.surveydetailsform-wrapper { + @apply grid gap-6 py-md; + + label { + @apply font-medium; + } + .surveyformfield { + @apply grid gap-4; + } + + .employee-select-wrap, + .employee-card-input { + margin-bottom: 0; + } +} + +.newSurveyForm_wrapper { + @apply grid p-md bg-grey-light border border-border rounded gap-6 ; + .newSurveyForm_questions { + } + .newSurveyForm_answer { + } + .newSurveyForm_actions { + @apply flex justify-end gap-4 py-md; + .checkbox-wrap .label { + margin-left: 40px; + } + } + .newSurveyForm_seprator { + @apply w-px h-6 border border-border; + } +} + +.surveyformslist_wrapper, +.surveydetailsform-wrapper { + .heading { + @apply text-heading-l font-medium py-md; + } +} + +.surveyformslist_wrapper { + @apply grid gap-6 py-md; +} + +.options_checkboxes { + @apply flex flex-col gap-4; +} + +.optioncheckboxwrapper { + @apply flex; +} + +.simple_editable-input { + outline-width: 0; + border: 0; + border-bottom: 2px solid black; +} + +.simple_readonly-input { + outline-width: 0; + border: 0; + background: transparent; +} + +.pointer { + cursor: pointer; +} + +.disabled-btn { + @apply pointer-events-none cursor-not-allowed; +} + +.optionradiobtnwrapper { + @apply flex gap-2; + + .customradiobutton { + @apply w-6 h-6; + } +} + +.edit-action-btn { + @apply flex justify-end; +} + +.surveyQuestion-wrapper{ + @apply grid gap-6; +} + +.question-title { + font-size: 18px; + line-height: 21px; + color: theme(colors.text.primary); + font-weight: 700; +} + +.responses-container { + display: flex; + flex-direction: column; + align-items: flex-start; + padding: 8px 4px; + background-color: theme(colors.grey.light); + border: 1px solid theme(colors.border); + box-sizing: border-box; + border-radius: 4px; + margin-top: 20px; + margin-bottom: 20px; + position: relative; +} + +.responses-container-date { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + padding: 8px 8px 0px 8px; + position: static; + left: 0px; + top: 41px; + background: theme(colors.grey.light); + border: 1px solid theme(colors.border); + box-sizing: border-box; + border-radius: 4px; + margin-top: 20px; + margin-bottom: 20px; +} + +.responses-container-line { + width: 100%; + margin-bottom: -12px; +} + +.date-time{ + margin-top: 10px; + margin-bottom: 10px; +} + +.response-result { + flex: none; + order: 1; + flex-grow: 0; + margin: 0px 0px -20px; + display: inline-block; +} + +.date-container { + display: flex; +flex-direction: column; +justify-content: center; +align-items: center; +padding: 16px 8px; +background: theme(colors.grey.light); +border: 1px solid theme(colors.border); +box-sizing: border-box; +border-radius: 4px; +@apply gap-y-6; +} + +.date-response { +display: flex; +flex-direction: row; +font-weight: bold; +@apply gap-10 ; +} +.divide { + --tw-divide-x-reverse: 0; +border-right-width: calc(2px * var(--tw-divide-x-reverse)); +border-left-width: calc(2px * calc(1 - var(--tw-divide-x-reverse))); +} + +.circle { + background-color:red; + height:40px; + border-radius:50%; + -moz-border-radius:50%; + -webkit-border-radius:50%; + width:40px; +} + +.align-columns{ + @apply grid gap-4; +} + + +@screen dt { + .surveydetailsform-wrapper { + .surveyformfield { + @apply items-center; + grid-template-columns: 1fr 2fr 1fr; + + .radio-wrap { + @apply flex gap-20; + margin-bottom: 0; + } + .radio-wrap div { + @apply flex items-center; + } + + .radio-btn { + @apply w-6 h-6; + } + + .radio-btn-checkmark { + height: 1.75rem; + width: 1.75rem; + --border-opacity: 1; + border: 1px solid theme(colors.inputBorder); + border-color: rgba(70, 70, 70, var(--border-opacity)); + border-radius: 9999px; + display: block; + } + + .radio-wrap .radio-btn-wrap input:checked ~ .radio-btn-checkmark:after { + display: block; + --bg-opacity: 1; + background-color: theme(colors.primary.main); + background-color: rgba(244, 119, 56, var(--bg-opacity)); + height: 1.25rem; + width: 1.25rem; + border-radius: 9999px; + position: absolute; + top: 4px; + left: 4px; + } + } + } + + .newSurveyForm_wrapper { + @apply grid p-md bg-grey-light border border-border rounded; + grid-template-columns: 33% 1fr; + + .newSurveyForm_quesno { + @apply text-heading-m font-medium; + } + + .newSurveyForm_mainsection { + } + .newSurveyForm_questions { + @apply flex gap-4; + + .text-input { + @apply w-3/4; + } + .employee-select-wrap { + @apply flex-1; + } + } + .newSurveyForm_answer { + } + .newSurveyForm_actions { + @apply flex justify-end gap-2; + .checkbox-wrap { + @apply items-center; + margin-bottom: 0; + } + .checkbox-wrap .label { + margin-left: 40px; + } + } + .newSurveyForm_seprator { + @apply w-px h-6 border border-border; + } + } + + .surveyformslist_wrapper { + @apply w-3/4 grid gap-6 py-md; + } +} + +.unstyled-button { + border: none; + padding: 0; + background: none; +} diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/tooltip.scss b/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/tooltip.scss new file mode 100644 index 00000000000..5a4f67caba6 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/tooltip.scss @@ -0,0 +1,36 @@ +.tooltip { + position: relative; + display: inline-block; + } + + .tooltip .tooltiptext { + visibility: hidden; + background-color: #555; + color: #fff; + text-align: left; + border-radius: 6px; + padding: 5px; + position: absolute; + z-index: 1; + bottom: 125%; + left: 50%; + margin-left: -60px; + opacity: 0; + transition: opacity 0.3s; + } + + .tooltip .tooltiptext::after { + position: absolute; + top: 100%; + left: 50%; + margin-left: -5px; + border-width: 5px; + border-style: solid; + border-color: #555 transparent transparent transparent; + } + + .tooltip:hover .tooltiptext { + visibility: visible; + opacity: 1; + cursor: pointer; + } \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/updateNumber.scss b/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/updateNumber.scss new file mode 100644 index 00000000000..fbd3294177d --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/updateNumber.scss @@ -0,0 +1,13 @@ +.updateNumberEmployee{ + width: 100%; + .employee-data-table .row h2{ + font-weight:500; + width: 100%; + } + .submit-bar { + position: relative; + } + .search-form-wrapper { + justify-content: initial; + } +} \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/css/svg/arrowdown.svg b/micro-ui/web/micro-ui-internals/packages/css/svg/arrowdown.svg new file mode 100644 index 00000000000..b7456af64e7 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/svg/arrowdown.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/css/svg/arrowleft.svg b/micro-ui/web/micro-ui-internals/packages/css/svg/arrowleft.svg new file mode 100644 index 00000000000..291db649e0a --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/svg/arrowleft.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/css/svg/calendar.svg b/micro-ui/web/micro-ui-internals/packages/css/svg/calendar.svg new file mode 100644 index 00000000000..db8c32d6b24 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/svg/calendar.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/css/svg/camera.svg b/micro-ui/web/micro-ui-internals/packages/css/svg/camera.svg new file mode 100644 index 00000000000..5f0b5297983 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/svg/camera.svg @@ -0,0 +1,4 @@ + + + + diff --git a/micro-ui/web/micro-ui-internals/packages/css/svg/check.svg b/micro-ui/web/micro-ui-internals/packages/css/svg/check.svg new file mode 100644 index 00000000000..88018af3276 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/svg/check.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/css/svg/close.svg b/micro-ui/web/micro-ui-internals/packages/css/svg/close.svg new file mode 100644 index 00000000000..357ce662494 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/svg/close.svg @@ -0,0 +1,4 @@ + + + + diff --git a/micro-ui/web/micro-ui-internals/packages/css/svg/error.svg b/micro-ui/web/micro-ui-internals/packages/css/svg/error.svg new file mode 100644 index 00000000000..2f3e7d76748 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/svg/error.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/css/svg/error2.svg b/micro-ui/web/micro-ui-internals/packages/css/svg/error2.svg new file mode 100644 index 00000000000..008d258c3d6 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/svg/error2.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/micro-ui/web/micro-ui-internals/packages/css/svg/searchicon.svg b/micro-ui/web/micro-ui-internals/packages/css/svg/searchicon.svg new file mode 100644 index 00000000000..bca3b004413 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/svg/searchicon.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/css/svg/starempty.svg b/micro-ui/web/micro-ui-internals/packages/css/svg/starempty.svg new file mode 100644 index 00000000000..8d295e7219b --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/svg/starempty.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/css/svg/starfilled.svg b/micro-ui/web/micro-ui-internals/packages/css/svg/starfilled.svg new file mode 100644 index 00000000000..23481e8ccb2 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/svg/starfilled.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/css/svg/success.svg b/micro-ui/web/micro-ui-internals/packages/css/svg/success.svg new file mode 100644 index 00000000000..e846ff61864 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/svg/success.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/css/tailwind.config.js b/micro-ui/web/micro-ui-internals/packages/css/tailwind.config.js new file mode 100644 index 00000000000..673ba2cfaba --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/css/tailwind.config.js @@ -0,0 +1,231 @@ +module.exports = { + future: { + removeDeprecatedGapUtilities: true, + purgeLayersByDefault: true, + }, + purge: { enabled: true, content: ["./example/index.html"] }, + theme: { + screens: { + dt: "780px", + sm: { max: "425px" }, + }, + colors: { + primary: { + light: "#F18F5E", + main: "#F47738", + dark: "#C8602B", + }, + secondary: "#22394D", + text: { + primary: "#0B0C0C", + secondary: "#505A5F", + }, + link: { + normal: "#1D70B8", + hover: "#003078", + }, + border: "#D6D5D4", + inputBorder: "#464646", + "input-border": "#464646", + focus: "#F47738", + error: "#D4351C", + success: "#00703C", + black: "#000000", + grey: { + dark: "#9E9E9E", + mid: "#EEEEEE", + light: "#FAFAFA", + bg: "#E3E3E3", + }, + white: "#FFFFFF", + }, + fontFamily: { + sans: ["Roboto", "sans-serif"], + rc: ['"Roboto Condensed"', "sans-serif"], + }, + fontSize: { + "heading-xl-dt": ["48px", "56px"], + "heading-xl": ["32px", "40px"], + "heading-l-dt": ["36px", "40px"], + "heading-l": ["24px", "32px"], + "heading-m-dt": ["24px", "32px"], + "heading-m": ["18px", "28px"], + "heading-s": ["16px", "24px"], + "caption-xl-dt": ["27px", "32px"], + "caption-xl": ["18px", "26px"], + "caption-l-dt": ["24px", "28px"], + "caption-l": ["18px", "21px"], + "caption-m-dt": ["19px", "23px"], + "caption-m": ["16px", "19px"], + "form-field": ["16px", "20px"], + "body-l-dt": ["19px", "28px"], + "body-l": ["16px", "24px"], + "body-s-dt": ["16px", "24px"], + "body-s": ["14px", "16px"], + legend: ["19px", "23px"], + link: ["16px", "24px"], + "text-btn": ["16px", "24px"], + }, + fontWeight: { + regular: 400, + medium: 500, + bold: 700, + }, + padding: { + sm: "8px", + md: "16px", + lg: "24px", + xl: "36px", + }, + margin: { + xs: "4px", + sm: "8px", + md: "16px", + lg: "24px", + xl: "64px", + }, + borderWidth: { + default: "1px", + 0: "0", + 2: "1px", + 4: "4px", + 10: "10px", + }, + boxShadow: { + card: "0 1px 2px 0 rgba(0, 0, 0, 0.16)", + radiobtn: "0 0 0 5px #F47738", + }, + inset: { + 0: 0, + 6: "6px", + 10: "10px", + }, + extend: {}, + digitv2: { + lightTheme: { + primary: "#F47738", + "text-color-primary": "#0B0C0C", + "text-color-secondary": "#505A5F", + "text-color-disabled": "#B1B4B6", + background: "#EEEEEE", + paper: "#FFFFFF", + "paper-secondary": "#FAFAFA", + divider: "#D6D5D4", + "header-sidenav": "#0B4B66", + "input-border": "#505A5F", + "primary-bg": "#FEEFE7", + }, + alert: { + error: "#D4351C", + "error-bg": "#EFC7C1", + success: "#00703C", + "success-bg": "#BAD6C9", + info: "#3498DB", + "info-bg": "#C7E0F1", + }, + chart: { + "chart-1": "#048BD0", + "chart-1-gradient": "#048BD0", + "chart-2": "#FBC02D", + "chart-2-gradient": "#FBC02D", + "chart-3": "#8E29BF", + "chart-4": "#EA8A3B", + "chart-5": "#0BABDE", + }, + fontSize: { + "heading-xl": { + mobile: "2rem", + tablet: "2.25rem", + desktop: "2.5rem", + }, + "heading-l": { + mobile: "1.5rem", + tablet: "1.75rem", + desktop: "2rem", + }, + "heading-m": { + mobile: "1.25rem", + tablet: "1.375rem", + desktop: "1.5rem", + }, + "heading-s": { + mobile: "1rem", + tablet: "1rem", + desktop: "1rem", + }, + "heading-xs": { + mobile: "0.75rem", + }, + "caption-l": { + mobile: "1.5rem", + tablet: "1.75rem", + desktop: "1.75rem", + }, + "caption-m": { + mobile: "1.25rem", + tablet: "1.5rem", + desktop: "1.5rem", + }, + "caption-s": { + mobile: "1rem", + tablet: "1.25rem", + desktop: "1.25rem", + }, + "body-l": { + mobile: "1rem", + tablet: "1.25rem", + desktop: "1.25rem", + }, + "body-s": { + mobile: "0.875rem", + tablet: "1rem", + desktop: "1rem", + }, + "body-xs": { + mobile: "0.75rem", + tablet: "0.875rem", + desktop: "0.875rem", + }, + label: { + mobile: "1rem", + tablet: "1rem", + desktop: "1rem", + }, + link: { + mobile: "1rem", + tablet: "1rem", + desktop: "1rem", + }, + }, + fontFamily: { + sans: ["Roboto"], + rc: ['"Roboto Condensed"'], + }, + fontStyle: { + normal: "normal", + italic: "italic", + }, + textDecorationLine: { + underline: "underline", + }, + fontWeight: { + regular: 400, + medium: 500, + bold: 700, + }, + lineHeight: { + "line-height-body-l": { mobile: "1.5rem", tablet: "1.75rem", desktop: "1.75rem" }, + "line-height-body-s": { mobile: "1.0938rem", tablet: "1.5rem", desktop: "1.5rem" }, + "line-height-body-xs": { mobile: "1.125rem", tablet: "1.5rem", desktop: "1.5rem" }, + normal: "normal", + }, + screens: { + mobile: "400px", + tablet: "768px", + desktop: "1024px", + }, + }, + }, + variants: {}, + plugins: [], +}; \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/README.md b/micro-ui/web/micro-ui-internals/packages/libraries/README.md new file mode 100644 index 00000000000..39fc8cb4ee5 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/README.md @@ -0,0 +1,32 @@ +# digit-ui-libraries + +> Made with @egovernments/create-ui-library + +## Install + +```bash +npm install --save @egovernments/digit-ui-libraries +``` + +## Usage + +```jsx +import React from "react"; +import initLibraries from "@egovernments/digit-ui-libraries"; + +import defaultConfig from "./config"; + +const App = ({ deltaConfig, stateCode, cityCode, moduleCode }) => { + initLibraries(); + + const store = eGov.Services.useStore(defaultConfig, { deltaConfig, stateCode, cityCode, moduleCode }); + + return

Create React Library Example 😄

; +}; + +export default App; +``` + +## License + +MIT © [](https://github.com/) diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/package.json b/micro-ui/web/micro-ui-internals/packages/libraries/package.json new file mode 100644 index 00000000000..c8f1cf4de7d --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/package.json @@ -0,0 +1,50 @@ +{ + "name": "@egovernments/digit-ui-libraries", + "version": "1.8.0-beta", + "main": "dist/index.js", + "module": "dist/index.modern.js", + "source": "src/index.js", + "license": "MIT", + "files": [ + "dist" + ], + "scripts": { + "build": "microbundle-crl --compress --no-sourcemap --format cjs", + "start": "microbundle-crl watch --no-compress --format modern,cjs", + "prepublish": "yarn build" + }, + "peerDependencies": { + "react": "17.0.2" + }, + "devDependencies": { + "gh-pages": "2.2.0", + "microbundle-crl": "0.13.11", + "react-dom": "17.0.2", + "react-scripts": "^4.0.1" + }, + "dependencies": { + "axios": "0.21.1", + "babel-preset-react": "6.24.1", + "date-fns": "2.28.0", + "html2canvas": "1.4.1", + "dom-to-image": "2.6.0", + "i18next": "19.9.2", + "i18next-react-postprocessor": "3.0.7", + "pdfmake": "0.1.72", + "react": "17.0.2", + "react-i18next": "11.16.2", + "react-query": "3.6.1", + "react-redux": "7.2.8", + "react-router-dom": "5.3.0", + "redux": "4.1.2", + "xlsx": "0.17.5" + }, + "author": "JaganKumar ", + "keywords": [ + "digit", + "egov", + "dpg", + "digit-ui", + "libraries" + ] +} diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/config/configUtils.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/config/configUtils.js new file mode 100644 index 00000000000..05df9e7def6 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/config/configUtils.js @@ -0,0 +1,46 @@ +export const getSectionInfo = (formId, sectionId, defaultConfigCopy) => { + let sectionInfo; + let fieldToUpdate = { field: "", fields: [] }; + for (let section of defaultConfigCopy) { + sectionInfo = section.form.find((formDetail) => { + return formDetail.id === sectionId; + }); + if (sectionInfo) { + if (sectionInfo.fields) { + for (let field of sectionInfo.fields) { + if (field.id === formId) { + fieldToUpdate.field = field; + fieldToUpdate.fields = sectionInfo.fields; + break; + } else { + if (field.fields) { + for (let innerField of field.fields) { + if (innerField.id === formId) { + fieldToUpdate.field = innerField; + fieldToUpdate.fields = field.fields; + break; + } + } + } + } + } + } + } + } + return fieldToUpdate; +}; + +export const ifObjectContainsArray = (object) => { + if (Array.isArray(object)) { + return { hasArray: true, value: object }; + } + for (const property in object) { + if (object.hasOwnProperty(property)) { + const element = object[property]; + if (Array.isArray(element)) { + return { hasArray: true, value: element }; + } + } + } + return { hasArray: false, value: [] }; +}; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/config/index.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/config/index.js new file mode 100644 index 00000000000..2bc6a46fbfc --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/config/index.js @@ -0,0 +1,31 @@ +export const getConfig = (ComponentMap, GetFunction, { config, state, repeatClicked, handlesubmit, register, onSubmit }) => { + if (!config || config.length === 0) return []; + return config.map((item) => { + const { component, name, fields, submit, ...props } = item; + return { + ...props, + // submit: submit ? GetFunction(submit) : undefined, + fields: + fields && fields.length > 0 + ? getConfig(ComponentMap, GetFunction, { + config: fields, + state, + repeatClicked, + handlesubmit, + register, + onSubmit, + }) + : null, + name, + value: state[name], + handlesubmit: component === "form" ? handlesubmit : null, + onSubmit: component === "form" ? onSubmit : null, + repeats: component === "form-section-repeat-group" ? state[name + "-repeats"] || 1 : null, + dorepeat: component === "form-section-repeat-group" ? repeatClicked(name) : null, + ref: component === "input-select" || component === "input-field" || component === "city-mohalla" ? register : null, + register: component === "input-select" || component === "input-field" || component === "city-mohalla" ? register : null, + // onChange: component === 'input-field' ? onChange(name) : null, + component: ComponentMap[component], + }; + }); +}; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/config/mergeConfig.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/config/mergeConfig.js new file mode 100644 index 00000000000..60ecf21491d --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/config/mergeConfig.js @@ -0,0 +1,157 @@ +// let defaultConfig = require("./default2.json"); +import { ifObjectContainsArray } from "./configUtils"; + +let defaultConfigCopy = {}; +let sectionToBeUpdated = {}; +let currentUpdatableSection = []; +let selectedProperty = ""; + +const MergeConfigObj = (defaultConfig, deltaConfig) => { + defaultConfigCopy = JSON.parse(JSON.stringify(defaultConfig)); + let deltaConfigCopy = JSON.parse(JSON.stringify(deltaConfig)); + processStateConfig(deltaConfigCopy); + return defaultConfigCopy; +}; + +const processStateConfig = (deltaConfig) => { + if (Array.isArray(deltaConfig)) { + deltaConfig.forEach((forms) => { + sectionToBeUpdated = {}; + InitSectionToUpdate(forms); + }); + } +}; + +const InitSectionToUpdate = (forms) => { + if (forms.id && !forms.__property__) { + GetCurrentUpdatableSection(forms.id, defaultConfigCopy); + } + if (forms.__property__ && forms.__action__) { + selectedProperty = forms.__property__; + currentUpdatableSection = currentUpdatableSection.length === 0 ? defaultConfigCopy : currentUpdatableSection; + findSectionById(selectedProperty, currentUpdatableSection); + seachInDefaultConfig(forms.__property__, forms); + } else if (Array.isArray(forms)) { + forms.forEach((form) => { + InitSectionToUpdate(form); + }); + } else if (ifObjectContainsArray(forms).hasArray) { + let array = ifObjectContainsArray(forms).value; + InitSectionToUpdate(array); + } else { + throw new Error("__property__ or __action__ not found"); + } +}; + +const GetCurrentUpdatableSection = (id, defaultConfigCopy) => { + if (Array.isArray(defaultConfigCopy)) { + for (let i = 0; i < defaultConfigCopy.length; i++) { + if (defaultConfigCopy[i].id === id) { + currentUpdatableSection.push(defaultConfigCopy[i]); + } else if (ifObjectContainsArray(defaultConfigCopy[i]).hasArray) { + let array = ifObjectContainsArray(defaultConfigCopy[i]).value; + GetCurrentUpdatableSection(id, array); + } + } + } +}; + +const findSectionById = (id, currentUpdatableSection) => { + if (Array.isArray(currentUpdatableSection)) { + for (let i = 0; i < currentUpdatableSection.length; i++) { + if (currentUpdatableSection[i].id === id) { + sectionToBeUpdated = currentUpdatableSection; + } else if (ifObjectContainsArray(currentUpdatableSection[i]).hasArray) { + let arr = ifObjectContainsArray(currentUpdatableSection[i]).value; + findSectionById(id, arr); + } + } + } + + return sectionToBeUpdated; +}; + +const seachInDefaultConfig = (id, action) => { + if (!Array.isArray(sectionToBeUpdated) && !sectionToBeUpdated.id) { + throw new Error("id not found"); + } + if (sectionToBeUpdated.id === id) { + actionHandler(action, id, sectionToBeUpdated); + } else if (Array.isArray(sectionToBeUpdated)) { + sectionToBeUpdated.forEach((section) => { + if (section.id === id) { + actionHandler(action, id, sectionToBeUpdated); + } + }); + } else if (ifObjectContainsArray(sectionToBeUpdated).hasArray) { + sectionToBeUpdated = ifObjectContainsArray(sectionToBeUpdated).value; + seachInDefaultConfig(id, action); + } +}; + +const actionHandler = (action, id, fieldList) => { + const index = getIndex(id, fieldList); + if (!action) { + return; + } + if (action.__action__ === "UPDATE") { + updateAt(index, action, fieldList); + deleteExtraKeys(action); + } + if (action.__action__ === "DELETE") { + deleteAt(index, fieldList); + deleteExtraKeys(action); + } + if (["INSERT_AFTER", "INSERT_BEFORE"].includes(action.__action__)) { + handleInsertion(index, action, fieldList); + } +}; + +const handleInsertion = (index, action, fields) => { + index = action.__action__ === "INSERT_BEFORE" ? index : index + 1; + insertAt(index, action, fields); + deleteExtraKeys(action); +}; + +const getIndex = (propertyValue, fields) => { + let index = fields.findIndex((option) => option.id === propertyValue); + + return index; +}; + +const insertAt = (index, data, fields) => { + if (!data.id) { + throw new Error("id is required is required to insert a record"); + } + fields.splice(index, 0, data); +}; + +const updateAt = (index, data, fields) => { + if (fields[index].id !== data.id) { + throw new Error(`id ${data.id} not matched`); + } + fields[index] = { ...fields[index], ...data }; +}; + +const deleteAt = (index, fields) => { + fields.splice(index, 1); +}; + +const deleteExtraKeys = (data) => { + delete data.__action__; + delete data.__property__; +}; + +const getMergedConfig = (defaultConfig, deltaConfig) => { + let mergedConfigObj = defaultConfig; + + for (const key in deltaConfig) { + if (deltaConfig.hasOwnProperty(key)) { + const mergedConfig = MergeConfigObj(defaultConfig[key], deltaConfig[key]); + mergedConfigObj[key] = mergedConfig; + } + } + return mergedConfigObj; +}; + +export default getMergedConfig; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/contexts/index.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/contexts/index.js new file mode 100644 index 00000000000..202c8fd57bf --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/contexts/index.js @@ -0,0 +1,6 @@ +import React from "react"; + +const ComponentProvider = React.createContext(); +const PrivacyProvider = React.createContext({}); + +export default { ComponentProvider ,PrivacyProvider}; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/enums/ConfigActionTypes.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/enums/ConfigActionTypes.js new file mode 100644 index 00000000000..f0d76ead434 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/enums/ConfigActionTypes.js @@ -0,0 +1,5 @@ +const ConfigActionTypes = Object.freeze({ + CONFIG_UPDATE: "CONFIG_UPDATE", +}); + +export default ConfigActionTypes; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/enums/FormFields.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/enums/FormFields.js new file mode 100644 index 00000000000..83ba271d1dc --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/enums/FormFields.js @@ -0,0 +1,5 @@ +const FormFields = Object.freeze({ + INPUT: "input-fields", +}); + +export default FormFields; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/enums/Pages.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/enums/Pages.js new file mode 100644 index 00000000000..edba2497c27 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/enums/Pages.js @@ -0,0 +1,7 @@ +const Pages = Object.freeze({ + PGR_LIST: "pgr-list", + PGR_NEW_COMPLAINT: "pgr-new-complaint", + PGR_SEARCH: "pgr-search-complaint", +}); + +export default Pages; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/enums/index.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/enums/index.js new file mode 100644 index 00000000000..8dbb59fea95 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/enums/index.js @@ -0,0 +1,7 @@ +import Pages from "./Pages"; +import ConfigActionTypes from "./ConfigActionTypes"; +// import FormFields from "./FormFields;" + +const Enums = { Pages, ConfigActionTypes }; + +export default Enums; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/dss/useDSSDashboard.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/dss/useDSSDashboard.js new file mode 100644 index 00000000000..0371e5a5cbc --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/dss/useDSSDashboard.js @@ -0,0 +1,8 @@ +import { useQueries } from "react-query"; +import { getDSSDashboardData } from "../../services/molecules/DSS/getDSSDashboardData"; + +const useDSSDashboard = (stateCode, mdmsType, moduleCode, config) => { + return useQueries(getDSSDashboardData(stateCode, mdmsType, moduleCode, config)); +}; + +export default useDSSDashboard; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/dss/useDashboardConfig.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/dss/useDashboardConfig.js new file mode 100644 index 00000000000..82ea22ce7bf --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/dss/useDashboardConfig.js @@ -0,0 +1,8 @@ +import { useQuery } from "react-query"; +import { DSSService } from "../../services/elements/DSS"; + +const useDashoardConfig = (moduleCode) => { + return useQuery(`DSS_DASHBOARD_CONFIG_${moduleCode}`, () => DSSService.getDashboardConfig(moduleCode)); +}; + +export default useDashoardConfig; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/dss/useGetChart.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/dss/useGetChart.js new file mode 100644 index 00000000000..20d41f3736d --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/dss/useGetChart.js @@ -0,0 +1,56 @@ +import { useQuery } from "react-query"; +import { startOfMonth, endOfMonth, getTime } from "date-fns"; +import { DSSService } from "../../services/elements/DSS"; + +const getRequest = (type, code, requestDate, filters, moduleLevel = "", addlFilter) => { + let newFilter = { ...{ ...filters, ...addlFilter } }; + let updatedFilter = Object.keys(newFilter) + .filter((ele) => newFilter[ele].length > 0) + .reduce((acc, curr) => { + acc[curr] = newFilter[curr]; + return acc; + }, {}); + return { + aggregationRequestDto: { + visualizationType: type.toUpperCase(), + visualizationCode: code, + queryType: "", + filters: updatedFilter, + moduleLevel: moduleLevel, + aggregationFactors: null, + requestDate, + }, + }; +}; +const defaultSelect = (data) => { + if (data?.responseData) { + if (data?.responseData?.data) { + data.responseData.data = data?.responseData?.data?.filter((col) => col) || []; + data.responseData.data?.forEach((row) => { + if (row?.plots) { + row.plots = row?.plots.filter((col) => col) || []; + } + }); + } + } + return data; +}; + +const useGetChart = (args) => { + const { key, type, tenantId, requestDate, filters, moduleLevel, addlFilter } = args; + return useQuery( + [args], + () => + DSSService.getCharts({ + ...getRequest(type, key, requestDate, filters, moduleLevel, addlFilter), + headers: { + tenantId, + }, + }), + { + select: defaultSelect, + } + ); +}; + +export default useGetChart; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/dss/useGetCustomFilterRequestValues.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/dss/useGetCustomFilterRequestValues.js new file mode 100644 index 00000000000..2154e446939 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/dss/useGetCustomFilterRequestValues.js @@ -0,0 +1,8 @@ +import { useQuery } from "react-query"; +import { DSSService } from "../../services/elements/DSS"; + +const useGetCustomFilterRequestValues = (filterConfigs, config={}) => { + return useQuery(`DSS_CUSTOM_FILTER_REQUEST_VAL_${JSON.stringify(filterConfigs)}`, () => DSSService.getCustomFiltersDynamicValues(filterConfigs), config); +}; + +export default useGetCustomFilterRequestValues; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/dss/useGetCustomFilterValues.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/dss/useGetCustomFilterValues.js new file mode 100644 index 00000000000..2620c074f93 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/dss/useGetCustomFilterValues.js @@ -0,0 +1,8 @@ +import { useQuery } from "react-query"; +import { DSSService } from "../../services/elements/DSS"; + +const useGetCustomFilterValues = (filterConfigs, config={}) => { + return useQuery(`DSS_CUSTOM_FILTER_CONFIG_${JSON.stringify(filterConfigs)}`, () => DSSService.getFiltersConfigData(filterConfigs), config); +}; + +export default useGetCustomFilterValues; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/dss/useMDMS.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/dss/useMDMS.js new file mode 100644 index 00000000000..2b420c26019 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/dss/useMDMS.js @@ -0,0 +1,20 @@ +import { useQuery } from "react-query"; +import { MdmsService } from "../../services/elements/MDMS"; + +const useDssMDMS = (tenantId, moduleCode, type, config) => { + const useDssDashboard = () => { + return useQuery("DSS_DASHBOARD", () => MdmsService.getDssDashboard(tenantId, moduleCode), config); + }; + const _default = () => { + return useQuery([tenantId, moduleCode, type], () => MdmsService.getMultipleTypes(tenantId, moduleCode, type), config); + }; + + switch (type) { + case "DssDashboard": + return useDssDashboard(); + default: + return _default(); + } +}; + +export default useDssMDMS; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/engagement/useCreate.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/engagement/useCreate.js new file mode 100644 index 00000000000..998a5f5c844 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/engagement/useCreate.js @@ -0,0 +1,8 @@ +import { Engagement } from "../../services/elements/Engagement"; +import { useMutation } from "react-query"; + +const useCreateDocument = (filters, config) => { + return useMutation((filters) => Engagement.create(filters)); +}; + +export default useCreateDocument; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/engagement/useDelete.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/engagement/useDelete.js new file mode 100644 index 00000000000..31d3d23b329 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/engagement/useDelete.js @@ -0,0 +1,8 @@ +import { Engagement } from "../../services/elements/Engagement"; +import { useMutation } from "react-query"; + +const useDelteDocument = (filters, config) => { + return useMutation((filters) => Engagement.delete(filters)); +}; + +export default useDelteDocument; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/engagement/useMdms.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/engagement/useMdms.js new file mode 100644 index 00000000000..b29de4cd1cb --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/engagement/useMdms.js @@ -0,0 +1,19 @@ +import { MdmsService, getGeneralCriteria } from "../../services/elements/MDMS"; +import { useQuery } from "react-query"; + +export const useEngagementMDMS = (tenantId, moduleCode, type, config = {}, payload = []) => { + const useDocumentCategory = () => { + return useQuery(type, () => MdmsService.getDataByCriteria(tenantId, getGeneralCriteria(tenantId, moduleCode, type), moduleCode), config); + }; + + const _default = () => { + return useQuery([tenantId, moduleCode, type], () => MdmsService.getMultipleTypes(tenantId, moduleCode, type), config); + }; + + switch (type) { + case "DocumentsCategory": + return useDocumentCategory(); + default: + return _default(); + } +}; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/engagement/useSearch.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/engagement/useSearch.js new file mode 100644 index 00000000000..730737b969a --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/engagement/useSearch.js @@ -0,0 +1,8 @@ +import { Engagement } from "../../services/elements/Engagement"; +import { useMutation, useQuery } from "react-query"; + +const useSearch = (filters, config) => { + return useQuery(["search_engagement", filters?.name, filters?.category, filters?.tenantIds, filters?.postedBy, filters?.offset, filters?.limit ], () => Engagement.search(filters), { ...config }); +}; + +export default useSearch; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/engagement/useUpdate.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/engagement/useUpdate.js new file mode 100644 index 00000000000..2c081065831 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/engagement/useUpdate.js @@ -0,0 +1,8 @@ +import { Engagement } from "../../services/elements/Engagement"; +import { useMutation } from "react-query"; + +const useUpdateDocument = (filters, config) => { + return useMutation((filters) => Engagement.update(filters)); +}; + +export default useUpdateDocument; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/events/index.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/events/index.js new file mode 100644 index 00000000000..1c0bb57bae5 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/events/index.js @@ -0,0 +1,185 @@ +import { useQuery, useMutation } from "react-query"; + +const tsToDate = (ts) => { + const plus0 = num => `0${num.toString()}`.slice(-2) + const d = new Date(ts) + const month = d.toLocaleString("default", {month: 'short'}).toUpperCase() + const date = plus0(d.getDate()) + const hour = plus0(d.getHours()) + const minute = plus0(d.getMinutes()) + + return { + month, + date, + hour, + minute + } +} + +const isEqual = (from, to) => from === to ? from : `${from} - ${to}` + +const timeStampBreakdown = (fromTS, toTS) => { + const fromDateTime = tsToDate(fromTS) + const toDateTime = tsToDate(toTS) + return { + onGroundEventMonth: isEqual(fromDateTime.month, toDateTime.month), + onGroundEventDate: isEqual(fromDateTime.date, toDateTime.date), + onGroundEventTimeRange: `${fromDateTime.hour}:${fromDateTime.minute} - ${toDateTime.hour}:${toDateTime.minute}` + } +} + +const fetchImageLinksFromFilestoreIds = async (filesArray, tenantId) => { + const ids = filesArray?.map(file => file.fileStoreId) + const res = await Digit.UploadServices.Filefetch(ids, tenantId); + if (res.data.fileStoreIds && res.data.fileStoreIds.length !== 0) { + return res.data.fileStoreIds.map((o, index) => ({ + actionUrl: o.url.split(",")[0], + code: "VIEW_ATTACHMENT" + })); + } else { + return []; + } + }; + +const getTransformedLocale = label => { + if (typeof label === "number") return label; + label=label?.trim(); + return label && label.toUpperCase().replace(/[.:-\s\/]/g, "_"); +}; +const getTimeFormat = (epochTime) => { + epochTime = new Date(epochTime); + const Period = epochTime.getHours() < 12 ? "AM" : "PM"; + const Format = epochTime.getHours() % 12 > 0 ? epochTime.getHours() % 12 : 12; + return Format.toString() + ":" + epochTime.toString().split(":")[1] + " " + Period; + }; + const getDateFormat = (epochTime) => { + const monthNames = ["Jan", "Feb", "Mar", "Apr", "May", "June", + "July", "Aug", "Sep", "Oct", "Nov", "Dec" + ]; + epochTime = new Date(epochTime); + const day = epochTime.getDate(); + const Month = epochTime.getMonth(); + return day.toString() + " " + monthNames[Month]; + }; + + +const getEventSLA = (item) => { + const days = (Date.now() - item.auditDetails.lastModifiedTime) / (1000 * 60 * 60 * 24); + let time; + let unit; + if (item.eventType === "EVENTSONGROUND") { + const disp = getDateFormat(item.eventDetails.fromDate) + " " + getTimeFormat(item.eventDetails.fromDate) + "-" + getDateFormat(item.eventDetails.toDate) + " " + getTimeFormat(item.eventDetails.toDate); + time=""; + unit=disp; + } else { + if (days >= 60){ + time=[Math.floor(days / 30)]; + unit="EV_SLA_MONTH"; + } + else if (days >= 30){ + time=[Math.floor(days / 30)]; + unit="EV_SLA_MONTH_ONE"; + } + else if (days >= 14){ + time=[Math.floor(days / 7)]; + unit="EV_SLA_WEEK"; + } + else if (days >= 7) { + time=[Math.floor(days / 7)]; + unit="EV_SLA_WEEK_ONE"; + } + else if (days >= 2){ + time=[Math.floor(days)]; + unit="CS_SLA_DAY"; + } + else if (days >= 1){ + time=[Math.floor(days)]; + unit="EV_SLA_DAY_ONE"; + } + else if ((days % 1) * 24 >= 2) { + time=[Math.floor((days % 1) * 24)]; + unit="EV_SLA_TIME"; + } + else if ((days % 1) * 24 >= 1){ + time=[Math.floor((days % 1) * 24)]; + unit="EV_SLA_TIME_ONE"; + } + else if ((days % 1) * 24 * 60 >= 2) { + time=[Math.floor((days % 1) * 24 * 60)]; + unit="EV_SLA_MINUTE"; + } + else if ((days % 1) * 24 * 60 >= 1) { + time=[Math.floor((days % 1) * 24 * 60)]; + unit="EV_SLA_MINUTE_ONE"; + + } + else{ + time=""; + unit="CS_SLA_NOW"; + } + } + + return { + time,unit + }; + }; + + + +const filterAllEvents = async(data, variant) => { + const filteredEvents = data.filter(e => e.status === "ACTIVE") + const events = [] + for(const e of filteredEvents){ + const actionDownloadLinks = e?.eventDetails?.documents?.length > 0 && e?.tenantId ? await fetchImageLinksFromFilestoreIds(e?.eventDetails?.documents, e?.tenantId) : [] + const slaDetails=getEventSLA(e); + events.push({ + ...e, + timePastAfterEventCreation: slaDetails.time, + timeApproxiamationInUnits: slaDetails.unit, + //todo + eventNotificationText: e?.description, + header: e?.eventType === "SYSTEMGENERATED" ? getTransformedLocale(e?.name) : e?.name, + eventType: e?.eventType, + actions: [...(e?.actions?.actionUrls ? e?.actions?.actionUrls : []), ...actionDownloadLinks], + ...variant === "events" || e?.eventType === "EVENTSONGROUND" ? timeStampBreakdown(e?.eventDetails?.fromDate, e?.eventDetails?.toDate) : {}, + }) + } + return events +} + +const variantBasedFilter = async(variant, data) =>{ + switch(variant){ + case "whats-new": + const allWhatsNewEvents = await filterAllEvents(data.events, variant) + return allWhatsNewEvents.filter( i => i?.actions?.length ) + case "events": + return await filterAllEvents(data.events, variant) + default: + return await filterAllEvents(data.events, variant) + } +} + +const getEventsData = async (variant, tenantId) => { + const isLoggedIn = Digit.UserService.getUser() + const data = await Digit.EventsServices.Search({tenantId, auth: !!isLoggedIn, ...variant === "events" ? {filter: {eventTypes: "EVENTSONGROUND"}} : {} }) + const allEventsData = await variantBasedFilter(variant, data) + return allEventsData +} + +const useEvents = ({tenantId, variant, config={}}) => useQuery( + ["EVENTS_SEARCH", tenantId, variant], + () => getEventsData(variant, tenantId), + { + ...config + } ) + +const useClearNotifications = () => useMutation(({tenantId}) => Digit.EventsServices.ClearNotification({tenantId})) + +const useNotificationCount = ({tenantId, config={}}) => useQuery( + ["NOTIFICATION_COUNT", tenantId], + () => Digit.EventsServices.NotificationCount({tenantId}), + { + ...config + }) + +export { useEvents, useClearNotifications, useNotificationCount } \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/events/useCreateEvent.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/events/useCreateEvent.js new file mode 100644 index 00000000000..9ba375f166e --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/events/useCreateEvent.js @@ -0,0 +1,7 @@ +import { useMutation } from "react-query"; + +const useCreateEvent = () => { + return useMutation(eventData => Digit.EventsServices.Create(eventData)) +} + +export default useCreateEvent; \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/events/useEventDetails.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/events/useEventDetails.js new file mode 100644 index 00000000000..c1043ce0db1 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/events/useEventDetails.js @@ -0,0 +1,44 @@ +import { useQuery } from 'react-query'; +import { format } from "date-fns"; + +const useEventDetails = (tenantId, filters, config = {}) => { + return useQuery( + ['EVENT_DETAILS', tenantId, filters], + () => Digit.EventsServices.EventDetails(tenantId, filters), + { + select: (data) => { + const details = [{ + title:" ", + asSectionHeader: true, + values: [ + { title: "EVENTS_ULB_LABEL", value: data?.tenantId }, + { title: "EVENTS_NAME_LABEL", value: data?.name }, + { title: "EVENTS_CATEGORY_LABEL", value: data?.eventCategory }, + { title: "EVENTS_DESCRIPTION_LABEL", value: data?.description }, + { title: "EVENTS_FROM_DATE_LABEL", value: format(new Date(data?.eventDetails?.fromDate), 'dd/MM/yyyy') }, + { title: "EVENTS_TO_DATE_LABEL", value: format(new Date(data?.eventDetails?.toDate), 'dd/MM/yyyy') }, + { title: "EVENTS_FROM_TIME_LABEL", value: format(new Date(data?.eventDetails?.fromDate), 'hh:mm'), skip: true }, + { title: "EVENTS_TO_TIME_LABEL", value: format(new Date(data?.eventDetails?.toDate), 'hh:mm'), skip: true }, + { title: "EVENTS_ADDRESS_LABEL", value: data?.eventDetails?.address }, + { title: "EVENTS_MAP_LABEL", + map: true, + value: data?.eventDetails?.latitude && data?.eventDetails?.longitude ? + Digit.Utils.getStaticMapUrl(data?.eventDetails?.latitude, data?.eventDetails?.longitude) : + 'N/A' + }, + { title: "EVENTS_ORGANIZER_NAME_LABEL", value: data?.eventDetails?.organizer }, + { title: "EVENTS_ENTRY_FEE_INR_LABEL", value: data?.eventDetails?.fees }, + ] + }] + return { + applicationData: data, + applicationDetails: details, + tenantId: tenantId + } + }, + ...config + } + ) +} + +export default useEventDetails; \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/events/useEventInbox.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/events/useEventInbox.js new file mode 100644 index 00000000000..826e342075c --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/events/useEventInbox.js @@ -0,0 +1,23 @@ +import { useQuery } from "react-query" + +const combineResponse = (data, users) => { + data.events = data?.events?.map(event => { + const user = users.find(user => user.uuid === event?.auditDetails?.lastModifiedBy) + return { ...event, user } + }); + return data; +} + + +const useInbox = (tenantId, data, filter = {}, config = {}) => { + return useQuery(["EVENT_INBOX", tenantId, data, filter], async () => { + const eventData = await Digit.EventsServices.Search({ tenantId, data, filter }); + const uuids = [] + eventData?.events?.forEach(event => uuids.push(event?.auditDetails?.lastModifiedBy)); + const usersResponse = await Digit.UserService.userSearch(null, { uuid: uuids }, {}); + return combineResponse(eventData, usersResponse?.user); + }, + config); +} + +export default useInbox; \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/events/useUpdateEvent.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/events/useUpdateEvent.js new file mode 100644 index 00000000000..77ddb893464 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/events/useUpdateEvent.js @@ -0,0 +1,7 @@ +import { useMutation } from "react-query"; + +const useUpdateEvent = () => { + return useMutation(eventData => Digit.EventsServices.Update(eventData)) +} + +export default useUpdateEvent; \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/hrms/useHRMSCount.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/hrms/useHRMSCount.js new file mode 100644 index 00000000000..50b63dadb63 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/hrms/useHRMSCount.js @@ -0,0 +1,8 @@ +import { useQuery, useQueryClient } from "react-query"; +import HrmsService from "../../services/elements/HRMS"; + +export const useHRMSCount = (tenantId, config = {}) => { + return useQuery(["HRMS_COUNT", tenantId], () => HrmsService.count(tenantId), config); +}; + +export default useHRMSCount; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/hrms/useHRMSGender.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/hrms/useHRMSGender.js new file mode 100644 index 00000000000..7d7e97b0fbf --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/hrms/useHRMSGender.js @@ -0,0 +1,18 @@ +import { useQuery } from "react-query"; +import { MdmsService } from "../../services/elements/MDMS"; + +const useHRMSGenderMDMS = (tenantId, moduleCode, type, config = {}) => { + const useHRGenders = () => { + return useQuery("HR_GENDER_DETAILS", () => MdmsService.HRGenderType(tenantId, moduleCode ,type), config); + }; + + + switch (type) { + case "GenderType": + return useHRGenders(); + } +}; + + + +export default useHRMSGenderMDMS; \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/hrms/useHRMSGenderMDMS.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/hrms/useHRMSGenderMDMS.js new file mode 100644 index 00000000000..7d7e97b0fbf --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/hrms/useHRMSGenderMDMS.js @@ -0,0 +1,18 @@ +import { useQuery } from "react-query"; +import { MdmsService } from "../../services/elements/MDMS"; + +const useHRMSGenderMDMS = (tenantId, moduleCode, type, config = {}) => { + const useHRGenders = () => { + return useQuery("HR_GENDER_DETAILS", () => MdmsService.HRGenderType(tenantId, moduleCode ,type), config); + }; + + + switch (type) { + case "GenderType": + return useHRGenders(); + } +}; + + + +export default useHRMSGenderMDMS; \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/hrms/useHRMSMDMS.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/hrms/useHRMSMDMS.js new file mode 100644 index 00000000000..6616cbe0889 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/hrms/useHRMSMDMS.js @@ -0,0 +1,25 @@ +import { MdmsService } from "../../services/elements/MDMS"; +import { useQuery } from "react-query"; + +const useHrmsMDMS = (tenantId, moduleCode, type, config = {}) => { + const useHrmsRolesandDesignations = () => { + return useQuery(["HRMS_EMP_RD", tenantId], () => MdmsService.getHrmsEmployeeRolesandDesignation(tenantId), config); + }; + const useHrmsEmployeeTypes = () => { + return useQuery(["HRMS_EMP_TYPE", tenantId], () => MdmsService.getHrmsEmployeeTypes(tenantId, moduleCode, type), config); + }; + + const useHrmsEmployeeReasons = () => { + return useQuery(["HRMS_EMP_REASON", tenantId], () => MdmsService.getHrmsEmployeeReason(tenantId, moduleCode, type), config); + }; + + switch (type) { + case "HRMSRolesandDesignation": + return useHrmsRolesandDesignations(); + case "EmployeeType": + return useHrmsEmployeeTypes(); + case "DeactivationReason": + return useHrmsEmployeeReasons(); + } +}; +export default useHrmsMDMS; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/hrms/useHRMSUpdate.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/hrms/useHRMSUpdate.js new file mode 100644 index 00000000000..509462726b8 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/hrms/useHRMSUpdate.js @@ -0,0 +1,8 @@ +import { useQuery, useMutation } from "react-query"; +import HrmsService from "../../services/elements/HRMS"; + +export const useHRMSUpdate = (tenantId, config = {}) => { + return useMutation((data) => HrmsService.update(data, tenantId)); +}; + +export default useHRMSUpdate; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/hrms/useHRMScreate.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/hrms/useHRMScreate.js new file mode 100644 index 00000000000..85d0af95e90 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/hrms/useHRMScreate.js @@ -0,0 +1,8 @@ +import { useQuery, useMutation } from "react-query"; +import HrmsService from "../../services/elements/HRMS"; + +export const useHRMSCreate = (tenantId, config = {}) => { + return useMutation((data) => HrmsService.create(data, tenantId)); +}; + +export default useHRMSCreate; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/hrms/useHRMSsearch.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/hrms/useHRMSsearch.js new file mode 100644 index 00000000000..77822d3a731 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/hrms/useHRMSsearch.js @@ -0,0 +1,8 @@ +import { useQuery, useQueryClient } from "react-query"; +import HrmsService from "../../services/elements/HRMS"; + +export const useHRMSSearch = (searchparams, tenantId, filters, isupdated, config = {}) => { + return useQuery(["HRMS_SEARCH", searchparams, tenantId, filters, isupdated], () => HrmsService.search(tenantId, filters, searchparams), config); +}; + +export default useHRMSSearch; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/index.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/index.js new file mode 100644 index 00000000000..49c902d937b --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/index.js @@ -0,0 +1,216 @@ +import { useClearNotifications, useEvents, useNotificationCount } from "./events"; +import useCreateEvent from "./events/useCreateEvent"; +import useUpdateEvent from "./events/useUpdateEvent"; +import { + useBulkPdfDetails, useDemandSearch, useFetchBillsForBuissnessService, useFetchCitizenBillsForBuissnessService, useFetchPayment, useGetPaymentRulesForBusinessServices, usePaymentSearch, usePaymentUpdate, useRecieptSearch +} from "./payment"; +import { useInitStore } from "./store"; +import useAccessControl from "./useAccessControl"; +import { useApplicationsForBusinessServiceSearch } from "./useApplicationForBillSearch"; +import useClickOutside from "./useClickOutside"; +import useCustomMDMS from "./useCustomMDMS"; +import useDocumentSearch from "./useDocumentSearch"; +import useDynamicData from "./useDynamicData"; +import useLocation from "./useLocation"; + +import useInboxGeneral from "./useInboxGeneral/useInboxGeneral"; +import useNewInboxGeneral from "./useInboxGeneral/useNewInbox"; +import useBoundaryLocalities from "./useLocalities"; +import useCommonMDMS from "./useMDMS"; +import useWorkflowDetailsV2 from "./useWorkflowDetailsV2"; +import useModuleTenants from "./useModuleTenants"; +import useQueryParams from "./useQueryParams"; +import useRouteSubscription from "./useRouteSubscription"; +import { useUserSearch } from "./userSearch"; +import useSessionStorage from "./useSessionStorage"; +import useApplicationStatusGeneral from "./useStatusGeneral"; +import useStore from "./useStore"; +import { useTenants } from "./useTenants"; +import useWorkflowDetails from "./workflow"; +import useCustomAPIHook from "./useCustomAPIHook"; +import useCustomAPIMutationHook from "./useCustomAPIMutationHook"; +import useUpdateCustom from "./useUpdateCustom"; + + +import useComplaintDetails from "./pgr/useComplaintDetails"; +import { useComplaintsList, useComplaintsListByMobile } from "./pgr/useComplaintList"; +import useComplaintStatus from "./pgr/useComplaintStatus"; +import useComplaintStatusCount from "./pgr/useComplaintStatusWithCount"; +import useComplaintSubType from "./pgr/useComplaintSubType"; +import useComplaintTable from "./pgr/useComplaintTable"; +import useComplaintTypes from "./pgr/useComplaintTypes"; +import useEmployeeFilter from "./pgr/useEmployeeFilter"; +import useInboxData from "./pgr/useInboxData"; +import useLocalities from "./pgr/useLocalities"; +import useServiceDefs from "./pgr/useServiceDefs"; +import usePGRTenants from "./pgr/useTenants"; +import useGenderMDMS from "./useGenderMDMS"; + +import useEmployeeSearch from "./useEmployeeSearch"; + +import useDashboardConfig from "./dss/useDashboardConfig"; +import useDSSDashboard from "./dss/useDSSDashboard"; +import useGetChart from "./dss/useGetChart"; +import useDssMdms from "./dss/useMDMS"; +import useGetCustomFilterValues from "./dss/useGetCustomFilterValues"; +import useGetCustomFilterRequestValues from './dss/useGetCustomFilterRequestValues'; + + +import useHRMSCount from "./hrms/useHRMSCount"; +import useHRMSCreate from "./hrms/useHRMScreate"; +import useHRMSGenderMDMS from "./hrms/useHRMSGender"; +import useHrmsMDMS from "./hrms/useHRMSMDMS"; +import useHRMSSearch from "./hrms/useHRMSsearch"; +import useHRMSUpdate from "./hrms/useHRMSUpdate"; + + + +import useDocCreate from "./engagement/useCreate"; +import useDocDelete from "./engagement/useDelete"; +import { useEngagementMDMS } from "./engagement/useMdms"; +import useDocSearch from "./engagement/useSearch"; +import useDocUpdate from "./engagement/useUpdate"; +import useEventDetails from "./events/useEventDetails"; +import useEventInbox from "./events/useEventInbox"; + +import useSurveyCreate from "./surveys/useCreate"; +import useSurveyDelete from "./surveys/useDelete"; +import useSurveySearch from "./surveys/useSearch"; +import useSurveyShowResults from "./surveys/useShowResults"; +import useSurveySubmitResponse from "./surveys/useSubmitResponse"; +import useSurveyInbox from "./surveys/useSurveyInbox"; +import useSurveyUpdate from "./surveys/useUpdate"; + + + +import useGetDSSAboutJSON from "./useGetDSSAboutJSON"; +import useGetDSSFAQsJSON from "./useGetDSSFAQsJSON"; +import useGetFAQsJSON from "./useGetFAQsJSON"; +import useGetHowItWorksJSON from "./useHowItWorksJSON"; +import { usePrivacyContext } from "./usePrivacyContext"; +import useStaticData from "./useStaticData"; + + + +const pgr = { + useComplaintDetails, + useComplaintsList, + useComplaintsListByMobile, + useComplaintStatus, + useComplaintTable, + useComplaintTypes, + useEmployeeFilter, + useInboxData, + useLocalities, + useServiceDefs, + useTenants: usePGRTenants, + useComplaintSubType, + useComplaintStatusCount, +}; + + +const dss = { + useMDMS: useDssMdms, + useDashboardConfig, + useDSSDashboard, + useGetChart, + useGetCustomFilterValues, + useGetCustomFilterRequestValues +}; + + +const hrms = { + useHRMSSearch, + useHrmsMDMS, + useHRMSCreate, + useHRMSUpdate, + useHRMSCount, + useHRMSGenderMDMS, +}; + + + + +const events = { + useInbox: useEventInbox, + useCreateEvent, + useEventDetails, + useUpdateEvent, +}; + +const engagement = { + useMDMS: useEngagementMDMS, + useDocCreate, + useDocSearch, + useDocDelete, + useDocUpdate, +}; + +const survey = { + useCreate: useSurveyCreate, + useUpdate: useSurveyUpdate, + useDelete: useSurveyDelete, + useSearch: useSurveySearch, + useSubmitResponse: useSurveySubmitResponse, + useShowResults: useSurveyShowResults, + useSurveyInbox, +}; + +const Hooks = { + useSessionStorage, + useQueryParams, + useFetchPayment, + usePaymentUpdate, + useFetchCitizenBillsForBuissnessService, + useFetchBillsForBuissnessService, + useGetPaymentRulesForBusinessServices, + useWorkflowDetails, + useInitStore, + useClickOutside, + useUserSearch, + useApplicationsForBusinessServiceSearch, + useDemandSearch, + useInboxGeneral, + useEmployeeSearch, + useBoundaryLocalities, + useCommonMDMS, + useApplicationStatusGeneral, + useModuleTenants, + useRecieptSearch, + usePaymentSearch, + useNewInboxGeneral, + useEvents, + useClearNotifications, + useNotificationCount, + useStore, + useDocumentSearch, + useTenants, + useAccessControl, + usePrivacyContext, + pgr, + + dss, + + hrms, + + events, + engagement, + survey, + useGenderMDMS, + useRouteSubscription, + useCustomAPIHook, + useCustomAPIMutationHook, + useWorkflowDetailsV2, + useUpdateCustom, + useCustomMDMS, + useGetHowItWorksJSON, + useGetFAQsJSON, + useGetDSSFAQsJSON, + useGetDSSAboutJSON, + useStaticData, + useDynamicData, + useBulkPdfDetails, + useLocation +}; + +export default Hooks; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/payment.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/payment.js new file mode 100644 index 00000000000..255ac45ff95 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/payment.js @@ -0,0 +1,160 @@ +import { useQuery, useQueryClient } from "react-query"; +import { PaymentService } from "../services/elements/Payment"; + +export const useFetchCitizenBillsForBuissnessService = ({ businessService, ...filters }, config = {}) => { + const queryClient = useQueryClient(); + const { mobileNumber, tenantId } = Digit.UserService.getUser()?.info || {}; + const params = { mobileNumber, businessService, ...filters }; + if (!params["mobileNumber"]) delete params["mobileNumber"]; + const { isLoading, error, isError, data, status } = useQuery( + ["citizenBillsForBuisnessService", businessService, { ...params }], + () => Digit.PaymentService.fetchBill(tenantId, { ...params }), + { + refetchOnMount: true, + retry: false, + ...config, + } + ); + return { + isLoading, + error, + isError, + data, + status, + revalidate: () => queryClient.invalidateQueries(["citizenBillsForBuisnessService", businessService]), + }; +}; + +export const useFetchBillsForBuissnessService = ({ tenantId, businessService, ...filters }, config = {}) => { + const queryClient = useQueryClient(); + let isPTAccessDone = sessionStorage.getItem("IsPTAccessDone"); + const params = { businessService, ...filters }; + const _tenantId = tenantId || Digit.UserService.getUser()?.info?.tenantId; + const { isLoading, error, isError, data, status } = useQuery( + ["billsForBuisnessService", businessService, { ...filters }, config, isPTAccessDone], + () => Digit.PaymentService.fetchBill(_tenantId, params), + { + retry: (count, err) => { + return false; + }, + ...config, + } + ); + return { + isLoading, + error, + isError, + data, + status, + revalidate: () => queryClient.invalidateQueries(["billsForBuisnessService", businessService]), + }; +}; + +export const useFetchPayment = ({ tenantId, consumerCode, businessService }, config) => { + const queryClient = useQueryClient(); + + const fetchBill = async () => { + /* Currently enabled the logic to get bill no and expiry date for PT Module */ + if (businessService?.includes("PT") || businessService?.includes("SW") || businessService?.includes("WS")) { + const fetchedBill = await Digit.PaymentService.fetchBill(tenantId, { consumerCode, businessService }); + const billdetail = fetchedBill?.Bill?.[0]?.billDetails?.sort((a, b) => b.fromPeriod - a.fromPeriod)?.[0] || {}; + fetchedBill.Bill[0].billDetails = fetchedBill?.Bill[0]?.billDetails?.map((ele) => ({ + ...ele, + currentBillNo: fetchedBill?.Bill?.[0]?.billNumber, + currentExpiryDate: billdetail?.expiryDate, + })); + if (fetchedBill && fetchedBill?.Bill?.[0]?.billDetails?.length > 1) { + fetchedBill?.Bill?.[0]?.billDetails?.map(async (billdet) => { + const searchBill = await Digit.PaymentService.searchBill(tenantId, { + consumerCode, + fromPeriod: billdet?.fromPeriod, + toPeriod: billdet?.toPeriod, + service: businessService, + retrieveOldest: true, + }); + billdet.expiryDate = searchBill?.Bill?.[0]?.billDetails?.[0]?.expiryDate; + billdet.billNumber = searchBill?.Bill?.[0]?.billNumber; + }); + } + return fetchedBill; + } else { + return Digit.PaymentService.fetchBill(tenantId, { consumerCode, businessService }); + } + }; + + const retry = (failureCount, error) => { + if (error?.response?.data?.Errors?.[0]?.code === "EG_BS_BILL_NO_DEMANDS_FOUND") return false; + else return failureCount < 3; + }; + + const queryData = useQuery(["paymentFetchDetails", tenantId, consumerCode, businessService], () => fetchBill(), { retry, ...config }); + + return { + ...queryData, + revalidate: () => queryClient.invalidateQueries(["paymentFetchDetails", tenantId, consumerCode, businessService]), + }; +}; + +export const usePaymentUpdate = ({ egId }, businessService, config) => { + const getPaymentData = async (egId) => { + const transaction = await Digit.PaymentService.updateCitizenReciept(egId); + const payments = await Digit.PaymentService.getReciept(transaction.Transaction[0].tenantId, businessService, { + consumerCodes: transaction.Transaction[0].consumerCode, + }); + return { payments, applicationNo: transaction.Transaction[0].consumerCode, txnStatus: transaction.Transaction[0].txnStatus }; + }; + + return useQuery(["paymentUpdate", egId], () => getPaymentData(egId), config); +}; + +export const useGetPaymentRulesForBusinessServices = (tenantId) => { + return useQuery(["getPaymentRules", tenantId], () => Digit.MDMSService.getPaymentRules(tenantId)); +}; + +export const usePaymentSearch = (tenantId, filters, config = {}) => { + return useQuery(["PAYMENT_SERACH", tenantId], () => Digit.PaymentService.searchBill(tenantId, filters), { + select: (data) => { + return data?.Bill?.[0]?.billDetails?.[0]?.billAccountDetails.filter((e) => { + switch (e.taxHeadCode) { + case "WS_CHARGE": + case "WS_TIME_PENALTY": + case "WS_TIME_INTEREST": + case "SW_TIME_INTEREST": + case "SW_TIME_PENALTY": + case "SW_CHARGE": + case "WS_WATER_CESS": + case "WS_TIME_ADHOC_PENALTY": + case "WS_TIME_ADHOC_REBATE": + case "SW_TIME_ADHOC_PENALTY": + case "SW_TIME_ADHOC_REBATE": + return true; + default: + return false; + } + }); + }, + ...config, + }); +}; + +export const useDemandSearch = ({ consumerCode, businessService, tenantId }, config = {}) => { + if (!tenantId) tenantId = Digit.ULBService.getCurrentTenantId(); + const queryFn = () => Digit.PaymentService.demandSearch(tenantId, consumerCode, businessService); + const queryData = useQuery(["demand_search", { consumerCode, businessService, tenantId }], queryFn, { refetchOnMount: "always", ...config }); + return queryData; +}; + +export const useRecieptSearch = ({ tenantId, businessService, ...params }, config = {}) => { + return useQuery( + ["reciept_search", { tenantId, businessService, params },config], + () => Digit.PaymentService.recieptSearch(tenantId, businessService, params), + { + refetchOnMount: false, + ...config, + } + ); +}; + +export const useBulkPdfDetails = ({ filters }) => { + return useQuery(["BULK_PDF_DETAILS", filters], async () => await PaymentService.getBulkPdfRecordsDetails(filters)); +}; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/pgr/useComplaintDetails.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/pgr/useComplaintDetails.js new file mode 100644 index 00000000000..ee40baaf459 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/pgr/useComplaintDetails.js @@ -0,0 +1,76 @@ +import { useQuery, useQueryClient } from "react-query"; + +// TODO: move to service +const getThumbnails = async (ids, tenantId) => { + const res = await Digit.UploadServices.Filefetch(ids, tenantId); + if (res.data.fileStoreIds && res.data.fileStoreIds.length !== 0) { + return { thumbs: res.data.fileStoreIds.map((o) => o.url.split(",")[3]), images: res.data.fileStoreIds.map((o) => Digit.Utils.getFileUrl(o.url)) }; + } else { + return null; + } +}; + +const getDetailsRow = ({ id, service, complaintType }) => ({ + CS_COMPLAINT_DETAILS_COMPLAINT_NO: id, + CS_COMPLAINT_DETAILS_APPLICATION_STATUS: `CS_COMMON_${service.applicationStatus}`, + CS_ADDCOMPLAINT_COMPLAINT_TYPE: complaintType === "" ? `SERVICEDEFS.OTHERS` : `SERVICEDEFS.${complaintType}`, + CS_ADDCOMPLAINT_COMPLAINT_SUB_TYPE: `SERVICEDEFS.${service.serviceCode.toUpperCase()}`, + CS_COMPLAINT_ADDTIONAL_DETAILS: service.description, + CS_COMPLAINT_FILED_DATE: Digit.DateUtils.ConvertTimestampToDate(service.auditDetails.createdTime), + ES_CREATECOMPLAINT_ADDRESS: [ + service.address.landmark, + Digit.Utils.locale.getLocalityCode(service.address.locality, service.tenantId), + service.address.city, + service.address.pincode, + ], +}); + +const isEmptyOrNull = (obj) => obj === undefined || obj === null || Object.keys(obj).length === 0; + +const transformDetails = ({ id, service, workflow, thumbnails, complaintType }) => { + const { Customizations, SessionStorage } = window.Digit; + const role = (SessionStorage.get("user_type") || "CITIZEN").toUpperCase(); + const customDetails = Customizations?.PGR?.getComplaintDetailsTableRows + ? Customizations.PGR.getComplaintDetailsTableRows({ id, service, role }) + : {}; + return { + details: !isEmptyOrNull(customDetails) ? customDetails : getDetailsRow({ id, service, complaintType }), + thumbnails: thumbnails?.thumbs, + images: thumbnails?.images, + workflow: workflow, + service, + audit: { + citizen: service.citizen, + details: service.auditDetails, + source: service.source, + rating: service.rating, + serviceCode: service.serviceCode, + }, + service: service, + }; +}; + +const fetchComplaintDetails = async (tenantId, id) => { + var serviceDefs = await Digit.MDMSService.getServiceDefs(tenantId, "PGR"); + const { service, workflow } = (await Digit.PGRService.search(tenantId, { serviceRequestId: id })).ServiceWrappers[0] || {}; + Digit.SessionStorage.set("complaintDetails", { service, workflow }); + if (service && workflow && serviceDefs) { + const complaintType = serviceDefs.filter((def) => def.serviceCode === service.serviceCode)[0].menuPath.toUpperCase(); + const ids = workflow.verificationDocuments + ? workflow.verificationDocuments.filter((doc) => doc.documentType === "PHOTO").map((photo) => photo.fileStoreId || photo.id) + : null; + const thumbnails = ids ? await getThumbnails(ids, service.tenantId) : null; + const details = transformDetails({ id, service, workflow, thumbnails, complaintType }); + return details; + } else { + return {}; + } +}; + +const useComplaintDetails = ({ tenantId, id }) => { + const queryClient = useQueryClient(); + const { isLoading, error, data } = useQuery(["complaintDetails", tenantId, id], () => fetchComplaintDetails(tenantId, id)); + return { isLoading, error, complaintDetails: data, revalidate: () => queryClient.invalidateQueries(["complaintDetails", tenantId, id]) }; +}; + +export default useComplaintDetails; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/pgr/useComplaintList.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/pgr/useComplaintList.js new file mode 100644 index 00000000000..33f3a5c23bb --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/pgr/useComplaintList.js @@ -0,0 +1,12 @@ +import { useQuery, useQueryClient } from "react-query"; + +export const useComplaintsList = (tenantId, filters) => { + // TODO: move city to state + const client = useQueryClient(); + const { isLoading, error, data } = useQuery(["complaintsList", filters], () => Digit.PGRService.search(tenantId, filters), {}); + return { isLoading, error, data, revalidate: () => client.invalidateQueries(["complaintsList", filters]) }; +}; + +export const useComplaintsListByMobile = (tenantId, mobileNumber) => { + return useComplaintsList(tenantId, { mobileNumber }); +}; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/pgr/useComplaintStatus.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/pgr/useComplaintStatus.js new file mode 100644 index 00000000000..f75ec847554 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/pgr/useComplaintStatus.js @@ -0,0 +1,31 @@ +import React, { useEffect, useState } from "react"; +import { useTranslation } from "react-i18next"; + +const useComplaintStatus = () => { + const { t } = useTranslation(); + const [complaintStatus, setComplaintStatus] = useState([]); + const tenantId = Digit.ULBService.getCurrentTenantId(); + + useEffect(() => { + let WorkflowService = null; + // const user = Digit.UserService.getUser(); + // const tenantId = user?.info?.tenantId; + (async () => { + // let stateCode = + // Digit.SessionStorage.get("userType") == "employee" + // ? Digit.SessionStorage.get("Employee.tenantId") + // : Digit.SessionStorage.get("Citizen.tenantId"); + WorkflowService = await Digit.WorkflowService.init(tenantId, "PGR"); + let applicationStatus = WorkflowService.BusinessServices[0].states + .filter((state) => state.applicationStatus) + .map((state) => ({ + name: t(`CS_COMMON_${state.applicationStatus}`), + code: state.applicationStatus, + })); + setComplaintStatus(applicationStatus); + })(); + }, [t, tenantId]); + + return complaintStatus; +}; +export default useComplaintStatus; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/pgr/useComplaintStatusWithCount.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/pgr/useComplaintStatusWithCount.js new file mode 100644 index 00000000000..c2337fcf21f --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/pgr/useComplaintStatusWithCount.js @@ -0,0 +1,27 @@ +import { useEffect, useState } from "react"; +import useComplaintStatus from "./useComplaintStatus"; + +const useComplaintStatusCount = (complaints) => { + const [complaintStatusWithCount, setcomplaintStatusWithCount] = useState([]); + let complaintStatus = useComplaintStatus(); + let tenantId = Digit.ULBService.getCurrentTenantId(); + + const getCount = async (value) => { + let response = await Digit.PGRService.count(tenantId, { applicationStatus: value }); + return response?.count || ""; + }; + + useEffect(() => { + let getStatusWithCount = async () => { + let statusWithCount = complaintStatus.map(async (status) => ({ + ...status, + count: await getCount(status.code), + })); + setcomplaintStatusWithCount(await Promise.all(statusWithCount)); + }; + getStatusWithCount(); + }, [complaints, complaintStatus]); + return complaintStatusWithCount; +}; + +export default useComplaintStatusCount; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/pgr/useComplaintSubType.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/pgr/useComplaintSubType.js new file mode 100644 index 00000000000..6aa59a02340 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/pgr/useComplaintSubType.js @@ -0,0 +1,18 @@ +import React, { useEffect, useState } from "react"; + +const useComplaintSubType = (complaintType, t) => { + const [subTypeMenu, setSubTypeMenu] = useState([]); + + useEffect(() => { + (async () => { + if (complaintType) { + const menu = await Digit.GetServiceDefinitions.getSubMenu(Digit.ULBService.getCurrentTenantId(), complaintType, t); + setSubTypeMenu(menu); + } + })(); + }, [complaintType]); + + return subTypeMenu; +}; + +export default useComplaintSubType; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/pgr/useComplaintTable.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/pgr/useComplaintTable.js new file mode 100644 index 00000000000..9716bb3415b --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/pgr/useComplaintTable.js @@ -0,0 +1,23 @@ +import React, { useEffect, useState } from "react"; +import { useTranslation } from "react-i18next"; + +const useComplaintTable = ({ data }) => { + const { t } = useTranslation(); + const [details, setDetails] = useState([]); + + useEffect(() => { + const details = { + CS_COMPLAINT_DETAILS_COMPLAINT_NO: data.serviceRequestId, + CS_COMPLAINT_DETAILS_COMPLAINT_SUBTYPE: t(data.complaintSubType), + CS_COMPLAINT_DETAILS_APPLICATION_STATUS: data.applicationStatus, + CS_COMPLAINT_DETAILS_LOCALITY: t(data.locality), + CS_COMPLAINT_DETAILS_TASK_OWNER: "task owner", + CS_COMPLAINT_SLA_REMAINING: "", + }; + setDetails(details); + }, []); + + return details; +}; + +export default useComplaintTable; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/pgr/useComplaintTypes.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/pgr/useComplaintTypes.js new file mode 100644 index 00000000000..6110a9549d7 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/pgr/useComplaintTypes.js @@ -0,0 +1,20 @@ +import React, { useEffect, useState } from "react"; +import { useTranslation } from "react-i18next"; + +const useComplaintTypes = ({ stateCode }) => { + const [complaintTypes, setComplaintTypes] = useState(null); + const { t } = useTranslation(); + + useEffect(() => { + (async () => { + const res = await Digit.GetServiceDefinitions.getMenu(stateCode, t); + let menu = res.filter((o) => o.key !== ""); + menu.push({ key: "Others", name: t("SERVICEDEFS.OTHERS") }); + setComplaintTypes(menu); + })(); + }, [t, stateCode]); + + return complaintTypes; +}; + +export default useComplaintTypes; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/pgr/useEmployeeFilter.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/pgr/useEmployeeFilter.js new file mode 100644 index 00000000000..8249a076645 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/pgr/useEmployeeFilter.js @@ -0,0 +1,35 @@ +import React, { useState, useEffect } from "react"; +import { useTranslation } from "react-i18next"; + +const useEmployeeFilter = (tenantId, roles, complaintDetails) => { + const [employeeDetails, setEmployeeDetails] = useState(null); + const { t } = useTranslation(); + useEffect(() => { + (async () => { + // const _roles = roles.join(","); + const searchResponse = await Digit.PGRService.employeeSearch(tenantId, roles); + + const serviceDefs = await Digit.MDMSService.getServiceDefs(tenantId, "PGR"); + const serviceCode = complaintDetails.service.serviceCode; + const service = serviceDefs?.find((def) => def.serviceCode === serviceCode); + const department = service?.department; + const employees = searchResponse.Employees.filter((employee) => + employee.assignments.map((assignment) => assignment.department).includes(department) + ); + + //emplpoyess data sholld only conatin name uuid dept + setEmployeeDetails([ + { + department: t(`COMMON_MASTERS_DEPARTMENT_${department}`), + employees: employees.map((employee) => { + return { uuid: employee.user.uuid, name: employee.user.name }; + }), + }, + ]); + })(); + }, [tenantId, roles, t, complaintDetails]); + + return employeeDetails; +}; + +export default useEmployeeFilter; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/pgr/useInboxData.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/pgr/useInboxData.js new file mode 100644 index 00000000000..c07c024b46b --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/pgr/useInboxData.js @@ -0,0 +1,61 @@ +import { useQuery, useQueryClient } from "react-query"; + +const useInboxData = (searchParams) => { + const client = useQueryClient(); + // const [complaintList, setcomplaintList] = useState([]); + // const user = Digit.UserService.getUser(); + // const tenantId = user?.info?.tenantId; + + + const fetchInboxData = async () => { + const tenantId = Digit.ULBService.getCurrentTenantId(); + let serviceIds = []; + let commonFilters = { start: 1, end: 10 }; + const { limit, offset } = searchParams; + let appFilters = { ...commonFilters, ...searchParams.filters.pgrQuery, ...searchParams.search, limit, offset }; + let wfFilters = { ...commonFilters, ...searchParams.filters.wfQuery }; + let complaintDetailsResponse = null; + let combinedRes = []; + complaintDetailsResponse = await Digit.PGRService.search(tenantId, appFilters); + complaintDetailsResponse.ServiceWrappers.forEach((service) => serviceIds.push(service.service.serviceRequestId)); + const serviceIdParams = serviceIds.join(); + const workflowInstances = await Digit.WorkflowService.getByBusinessId(tenantId, serviceIdParams, wfFilters, false); + if (workflowInstances.ProcessInstances.length) { + combinedRes = combineResponses(complaintDetailsResponse, workflowInstances).map((data) => ({ + ...data, + sla: Math.round(data.sla / (24 * 60 * 60 * 1000)), + })); + } + return combinedRes; + }; + + const result = useQuery(["fetchInboxData", + ...Object.keys(searchParams).map(i => + typeof searchParams[i] === "object" ? Object.keys(searchParams[i]).map(e => searchParams[i][e]) : searchParams[i] + )], + fetchInboxData, + { staleTime: Infinity } + ); + return { ...result, revalidate: () => client.refetchQueries(["fetchInboxData"]) }; +}; + +const mapWfBybusinessId = (wfs) => { + return wfs.reduce((object, item) => { + return { ...object, [item["businessId"]]: item }; + }, {}); +}; + +const combineResponses = (complaintDetailsResponse, workflowInstances) => { + let wfMap = mapWfBybusinessId(workflowInstances.ProcessInstances); + return complaintDetailsResponse.ServiceWrappers.map((complaint) => ({ + serviceRequestId: complaint.service.serviceRequestId, + complaintSubType: complaint.service.serviceCode, + locality: complaint.service.address.locality.code, + status: complaint.service.applicationStatus, + taskOwner: wfMap[complaint.service.serviceRequestId]?.assignes?.[0]?.name || "-", + sla: wfMap[complaint.service.serviceRequestId]?.businesssServiceSla, + tenantId: complaint.service.tenantId, + })); +}; + +export default useInboxData; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/pgr/useLocalities.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/pgr/useLocalities.js new file mode 100644 index 00000000000..560f0823fe8 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/pgr/useLocalities.js @@ -0,0 +1,34 @@ +import React, { useEffect, useState } from "react"; +import { useTranslation } from "react-i18next"; + +const useLocalities = ({ city }) => { + const { t } = useTranslation(); + let locality = []; + const [localityList, setLocalityList] = useState(null); + const [localities, setLocalities] = useState(null); + useEffect(() => { + (async () => { + let tenantId = Digit.ULBService.getCurrentTenantId(); + let response = await Digit.LocationService.getLocalities(tenantId); + let __localityList = []; + if (response && response.TenantBoundary.length > 0) { + __localityList = Digit.LocalityService.get(response.TenantBoundary[0]); + } + setLocalityList(__localityList); + })(); + }, [city]); + + useEffect(() => { + if (localityList) { + const __localities = localityList; + __localities.forEach((element) => { + locality.push({ name: t(element.code), code: element.code }); + }); + setLocalities(locality); + } + }, [localityList]); + + return localities; +}; + +export default useLocalities; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/pgr/useServiceDefs.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/pgr/useServiceDefs.js new file mode 100644 index 00000000000..ceea6438ce6 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/pgr/useServiceDefs.js @@ -0,0 +1,23 @@ +import { useTranslation } from "react-i18next"; + +const { useState, useEffect } = require("react"); + +const useServiceDefs = (tenantId, moduleCode) => { + const [localMenu, setLocalMenu] = useState([]); + const SessionStorage = Digit.SessionStorage; + let { t } = useTranslation(); + + useEffect(() => { + (async () => { + const serviceDefs = await Digit.MDMSService.getServiceDefs(tenantId, moduleCode); + SessionStorage.set("serviceDefs", serviceDefs); + + const serviceDefsWithKeys = serviceDefs.map((def) => ({ ...def, i18nKey: t("SERVICEDEFS." + def.serviceCode.toUpperCase()) })); + setLocalMenu(serviceDefsWithKeys); + })(); + }, [t, tenantId, moduleCode]); + + return localMenu; +}; + +export default useServiceDefs; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/pgr/useTenants.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/pgr/useTenants.js new file mode 100644 index 00000000000..0c2f394c93c --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/pgr/useTenants.js @@ -0,0 +1,9 @@ +import React, { useEffect, useState } from "react"; + +const useTenants = () => { + const tenantInfo = Digit.SessionStorage.get("PGR_TENANTS"); + const [tenants, setTenants] = useState(tenantInfo ? tenantInfo : null); + return tenants; +}; + +export default useTenants; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/revalidateQuery.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/revalidateQuery.js new file mode 100644 index 00000000000..3514b6779f4 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/revalidateQuery.js @@ -0,0 +1,6 @@ +import { useQueryClient } from "react-query"; + +export const useRevalidateQuery = async (key) => { + const client = useQueryClient(); + return client.refetchQueries(key); +}; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/store.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/store.js new file mode 100644 index 00000000000..477ee4bd39e --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/store.js @@ -0,0 +1,19 @@ +import { useState, useEffect } from "react"; +import { useQuery } from "react-query"; +// import mergeConfig from "../../config/mergeConfig"; +import { StoreService } from "../services/molecules/Store/service"; + +export const useStore = ({ stateCode, moduleCode, language }) => { + return useQuery(["store", stateCode, moduleCode, language], () => StoreService.defaultData(stateCode, moduleCode, language)); +}; + +export const useInitStore = (stateCode, enabledModules) => { + const { isLoading, error, isError, data } = useQuery( + ["initStore", stateCode, enabledModules], + () => StoreService.digitInitData(stateCode, enabledModules), + { + staleTime: Infinity, + } + ); + return { isLoading, error, isError, data }; +}; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/surveys/useCreate.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/surveys/useCreate.js new file mode 100644 index 00000000000..c645dea3064 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/surveys/useCreate.js @@ -0,0 +1,8 @@ +import { Surveys } from "../../services/elements/Surveys"; +import { useMutation } from "react-query"; + +const useCreateSurveys = (filters, config) => { + return useMutation((filters) => Surveys.create(filters)); +}; + +export default useCreateSurveys; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/surveys/useDelete.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/surveys/useDelete.js new file mode 100644 index 00000000000..91c94a0d037 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/surveys/useDelete.js @@ -0,0 +1,8 @@ +import { Surveys } from "../../services/elements/Surveys"; +import { useMutation } from "react-query"; + +const useDeleteSurveys = (filters, config) => { + return useMutation((filters) => Surveys.delete(filters)); +}; + +export default useDeleteSurveys; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/surveys/useSearch.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/surveys/useSearch.js new file mode 100644 index 00000000000..ca2c937407a --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/surveys/useSearch.js @@ -0,0 +1,8 @@ +import { Surveys } from "../../services/elements/Surveys"; +import { useQuery } from "react-query"; + +const useSearch = (filters, config) => { + return useQuery(["search_surveys", filters?.uuid, filters?.title, filters?.tenantIds, filters?.postedBy, filters?.offset, filters?.limit], () => Surveys.search(filters), { ...config }); +}; + +export default useSearch; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/surveys/useShowResults.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/surveys/useShowResults.js new file mode 100644 index 00000000000..331baa79ed8 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/surveys/useShowResults.js @@ -0,0 +1,8 @@ +import { Surveys } from "../../services/elements/Surveys"; +import { useMutation } from "react-query"; + +const useShowResults = (filters, config) => { + return useMutation((filters) => Surveys.showResults(filters)); +}; + +export default useShowResults; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/surveys/useSubmitResponse.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/surveys/useSubmitResponse.js new file mode 100644 index 00000000000..a4351dd2f45 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/surveys/useSubmitResponse.js @@ -0,0 +1,8 @@ +import { Surveys } from "../../services/elements/Surveys"; +import { useMutation } from "react-query"; + +const useSubmitResponse = (filters, config) => { + return useMutation((filters) => Surveys.submitResponse(filters)); +}; + +export default useSubmitResponse; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/surveys/useSurveyInbox.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/surveys/useSurveyInbox.js new file mode 100644 index 00000000000..16712efea31 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/surveys/useSurveyInbox.js @@ -0,0 +1,33 @@ +import { Surveys } from "../../services/elements/Surveys"; +import { useMutation, useQuery } from "react-query"; +/* import { isObject, isObjectLike } from "lodash"; */ + +const useSearch = (filters, config) => { + const { filterForm, searchForm, tableForm } = filters + const { status } = filterForm + const { title, tenantIds, postedBy } = searchForm + const { sortBy, limit, offset, sortOrder } = tableForm; + const validTenantId = typeof tenantIds === 'object' ? tenantIds.code : tenantIds; + const validStatus = typeof status === 'object' ? status.code : status; + + const finalFilters = { + tenantIds: validTenantId, + status: validStatus === "ALL" ? "" : validStatus, + title, + postedBy, + limit, + offset + } + + //clearing out empty string params from payload + Object.keys(finalFilters).forEach(key => { + if (finalFilters[key] === '') { + delete finalFilters[key]; + } + }); + + + return useQuery(["search_surveys", title, tenantIds, postedBy, status, offset, limit], () => Surveys.search(finalFilters), { ...config, refetchInterval: 6000 }); +}; + +export default useSearch; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/surveys/useUpdate.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/surveys/useUpdate.js new file mode 100644 index 00000000000..770a88047a5 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/surveys/useUpdate.js @@ -0,0 +1,8 @@ +import { Surveys } from "../../services/elements/Surveys"; +import { useMutation } from "react-query"; + +const useUpdateSurvey = (filters, config) => { + return useMutation((filters) => Surveys.update(filters)); +}; + +export default useUpdateSurvey; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useAccessControl.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useAccessControl.js new file mode 100644 index 00000000000..df030439b9e --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useAccessControl.js @@ -0,0 +1,13 @@ +import { useQuery } from "react-query"; +import AccessControlService from "../services/elements/Access"; +const useAccessControl = (tenantId) => { + const getUserRoles = Digit.SessionStorage.get("User")?.info?.roles; + + const roles = getUserRoles?.map((role) => { + return role.code; + }); + + const response = useQuery(["ACCESS_CONTROL", tenantId], async () => await AccessControlService.getAccessControl(roles),{enabled:roles?true:false}); + return response; +}; +export default useAccessControl; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useApplicationForBillSearch.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useApplicationForBillSearch.js new file mode 100644 index 00000000000..158535e45c7 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useApplicationForBillSearch.js @@ -0,0 +1,37 @@ + +import { useQuery } from "react-query"; + + + +const refObj = (tenantId, filters) => { + let consumerCodes = filters?.consumerCodes; + // delete filters.consumerCodes; + + return { + + }; +}; + +export const useApplicationsForBusinessServiceSearch = ({ tenantId, businessService, filters }, config = {}) => { + let _key = businessService?.toLowerCase().split(".")[0]; + if (window.location.href.includes("mcollect")) { + _key = "mcollect"; + } + if (window.location.href.includes("TL")) { + _key = "TL"; + } + if (window.location.href.includes("BPAREG")) { + _key = businessService + } + if (window.location.href.includes("BPA.")) { + _key = "BPA" + } + + /* key from application ie being used as consumer code in bill */ + const { searchFn, key, label } = refObj(tenantId, filters)[_key]; + const applications = useQuery(["applicationsForBillDetails", { tenantId, businessService, filters, searchFn }], searchFn, { + ...config, + }); + + return { ...applications, key, label }; +}; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useClickOutside.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useClickOutside.js new file mode 100644 index 00000000000..dedb9c215a2 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useClickOutside.js @@ -0,0 +1,23 @@ +import { useEffect } from "react"; + +const useOnClickOutside = (ref, handler, isActive, eventParam = false) => { + useEffect(() => { + if (isActive) { + document.addEventListener("click", handleClickOutSide, eventParam); + } else { + document.removeEventListener("click", handleClickOutSide, eventParam); + } + return () => { + document.removeEventListener("click", handleClickOutSide, eventParam); + }; + }, [isActive]); + + const handleClickOutSide = (event) => { + if (ref.current && ref.current.contains(event.target)) { + return; + } + handler(event); + } +}; + +export default useOnClickOutside; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useCustomAPIHook.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useCustomAPIHook.js new file mode 100644 index 00000000000..1458a426486 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useCustomAPIHook.js @@ -0,0 +1,56 @@ +import { useQuery, useQueryClient } from "react-query"; +import { CustomService } from "../services/elements/CustomService"; + +/** + * Custom hook which can make api call and format response + * + * @author jagankumar-egov + * + * + * @example + * + const requestCriteria = [ + "/user/_search", // API details + {}, //requestParam + {data : {uuid:[Useruuid]}}, // requestBody + {} , // privacy value + { // other configs + enabled: privacyState, + cacheTime: 100, + select: (data) => { + // format data + return _.get(data, loadData?.jsonPath, value); + }, + }, + ]; + const { isLoading, data, revalidate } = Digit.Hooks.useCustomAPIHook(...requestCriteria); + + * + * @returns {Object} Returns the object which contains data and isLoading flag + */ + + +const useCustomAPIHook = ({ url, params, body, config = {}, plainAccessRequest,changeQueryName="Random" }) => { + const client = useQueryClient(); + + const { isLoading, data, isFetching,refetch } = useQuery( + [url,changeQueryName].filter((e) => e), + () => CustomService.getResponse({ url, params, body, plainAccessRequest }), + { + cacheTime:0, + ...config, + } + ); + + return { + isLoading, + isFetching, + data, + refetch, + revalidate: () => { + data && client.invalidateQueries({ queryKey: [url].filter((e) => e) }); + }, + }; +}; + +export default useCustomAPIHook; \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useCustomAPIMutationHook.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useCustomAPIMutationHook.js new file mode 100644 index 00000000000..6afcfe74d49 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useCustomAPIMutationHook.js @@ -0,0 +1,68 @@ +import { useQueryClient, useMutation } from "react-query"; +import { CustomService } from "../services/elements/CustomService"; + +/** + * Custom hook which can make api call and format response + * + * @author jagankumar-egov + * + * + * @example + * + const requestCriteria = [ + "/user/_search", // API details + {}, //requestParam + {data : {uuid:[Useruuid]}}, // requestBody + {} , // privacy value + { // other configs + enabled: privacyState, + cacheTime: 100, + select: (data) => { + // format data + return _.get(data, loadData?.jsonPath, value); + }, + }, + ]; + const mutation = Digit.Hooks.useCustomAPIMutationHook(...requestCriteria); + + +while mutating use the following format + +mutation.mutate({ + params: {}, + body: { "payload": { + // custom data + } + }}, + { + onError : ()=> { // custom logic}, + onSuccess : ()=> { // custom logic} + } + ); + + * + * @returns {Object} Returns the object which contains data and isLoading flag + */ + +const useCustomAPIMutationHook = ({ url, params, body, config = {}, plainAccessRequest, changeQueryName = "Random" }) => { + const client = useQueryClient(); + + const { isLoading, data, isFetching, ...rest } = useMutation( + (data) => CustomService.getResponse({ url, params: { ...params, ...data?.params }, body: { ...body, ...data?.body }, plainAccessRequest }), + { + cacheTime: 0, + ...config, + } + ); + return { + ...rest, + isLoading, + isFetching, + data, + revalidate: () => { + data && client.invalidateQueries({ queryKey: [url].filter((e) => e) }); + }, + }; +}; + +export default useCustomAPIMutationHook; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useCustomMDMS.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useCustomMDMS.js new file mode 100644 index 00000000000..523bcf41593 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useCustomMDMS.js @@ -0,0 +1,32 @@ +import { useQuery } from "react-query"; +import { MdmsService } from "../services/elements/MDMS"; + +/** + * Custom hook which can be used to + * make a single hook a module to get multiple masterdetails with/without filter + * + * @author jagankumar-egov + * + * @example + * // returns useQuery object + * Digit.Hooks.useCustomMDMS( + * "stateid", + * "modulename", + * [ + * { name:"masterdetail1",filter:"[?(@.active == true)]"}, + * { name:"masterdetail2" } + * ], + * { // all configs supported by the usequery + * default:(data)=>{ + * format + * return formattedData; + * } + * }) + * + * @returns {Object} Returns the object of the useQuery from react-query. + */ +const useCustomMDMS = (tenantId, moduleName, masterDetails = [], config = {}) => { + return useQuery([tenantId, moduleName, masterDetails], () => MdmsService.getMultipleTypesWithFilter(tenantId, moduleName, masterDetails), config); +}; + +export default useCustomMDMS; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useDocumentSearch.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useDocumentSearch.js new file mode 100644 index 00000000000..e121f159550 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useDocumentSearch.js @@ -0,0 +1,47 @@ +import { useQuery, useQueryClient } from "react-query"; +import PropTypes from "prop-types"; + + +const useDocumentSearch = (documents=[], config = {}) => { + const client = useQueryClient(); + const tenant = Digit.ULBService.getStateId(); + const filesArray = documents?.map((value) => value?.fileStoreId); + + const { isLoading, error, data } = useQuery([filesArray.join('')], () => Digit.UploadServices.Filefetch(filesArray, tenant),{enabled:filesArray&&filesArray.length>0, + /* It will return back the same document object with fileUrl link and response */ + select: (data) => { + return documents.map(document=>{ + return { + ...document, + fileURL:data?.data?.[document?.fileStoreId]&&Digit.Utils.getFileUrl(data.data[document?.fileStoreId]), + url:data?.data?.[document?.fileStoreId]&&Digit.Utils.getFileUrl(data.data[document?.fileStoreId]), + fileResponse:data?.data?.[document?.fileStoreId]||"" + } + }) + }, + ...config}); + return { isLoading, error, data: { pdfFiles: data }, revalidate: () => client.invalidateQueries([filesArray.join('')]) }; +}; + +/** + * Used to get the documents file url based on the given documents array + */ +export default useDocumentSearch; + + +useDocumentSearch.propTypes = { + /** + * document array for which we get file urls + */ + documents: PropTypes.array, + /** + * any config to use query + */ + config: PropTypes.object, +}; + +useDocumentSearch.defaultProps = { + documents: [], + config: {} +}; + diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useDynamicData.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useDynamicData.js new file mode 100644 index 00000000000..64dc9eb1857 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useDynamicData.js @@ -0,0 +1,17 @@ +import { useQuery } from "react-query"; +import { endOfToday, start } from "date-fns"; + +import { format, subMonths } from "date-fns"; + +const useDynamicData = ({moduleCode ,tenantId, filters, t }) => { + + + switch(moduleCode){ + + default: + return {isLoading: false, error: false, data: null, isSuccess: false}; + } + + }; + +export default useDynamicData; \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useEmployeeSearch.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useEmployeeSearch.js new file mode 100644 index 00000000000..93651fcd599 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useEmployeeSearch.js @@ -0,0 +1,10 @@ +import { useQuery } from "react-query"; + +const useEmployeeSearch = (tenantId, filters, config = {}) => { + if (filters.roles) { + filters.roles = filters.roles.map((role) => role.code).join(","); + } + return useQuery(["EMPLOYEE_SEARCH", filters], () => Digit.UserService.employeeSearch(tenantId, filters), config); +}; + +export default useEmployeeSearch; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useGenderMDMS.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useGenderMDMS.js new file mode 100644 index 00000000000..6eaa892f9ec --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useGenderMDMS.js @@ -0,0 +1,18 @@ +import { useQuery } from "react-query"; +import { MdmsService } from "../services/elements/MDMS"; + +const useGenderMDMS = (tenantId, moduleCode, type, config = {}) => { + const useGenderDetails = () => { + return useQuery("GENDER_DETAILS", () => MdmsService.getGenderType(tenantId, moduleCode ,type), config); + }; + + + switch (type) { + case "GenderType": + return useGenderDetails(); + } +}; + + + +export default useGenderMDMS; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useGetDSSAboutJSON.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useGetDSSAboutJSON.js new file mode 100644 index 00000000000..d9cac815d52 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useGetDSSAboutJSON.js @@ -0,0 +1,7 @@ +import { useQuery } from "react-query"; + +const useGetDSSAboutJSON = (tenantId) => { + return useQuery(["About", tenantId], () => Digit.MDMSService.getDSSAboutJSONData(tenantId)); + }; + +export default useGetDSSAboutJSON; \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useGetDSSFAQsJSON.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useGetDSSFAQsJSON.js new file mode 100644 index 00000000000..ae096a594d9 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useGetDSSFAQsJSON.js @@ -0,0 +1,7 @@ +import { useQuery } from "react-query"; + +const useGetDSSFAQsJSON = (tenantId) => { + return useQuery(["FAQS", tenantId], () => Digit.MDMSService.getDSSFAQsJSONData(tenantId)); + }; + +export default useGetDSSFAQsJSON; \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useGetFAQsJSON.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useGetFAQsJSON.js new file mode 100644 index 00000000000..7ea9d25bb33 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useGetFAQsJSON.js @@ -0,0 +1,7 @@ +import { useQuery } from "react-query"; + +const useGetFAQsJSON = (tenantId) => { + return useQuery(["FAQ_S", tenantId], () => Digit.MDMSService.getFAQsJSONData(tenantId)); + }; + +export default useGetFAQsJSON; \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useHowItWorksJSON.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useHowItWorksJSON.js new file mode 100644 index 00000000000..2f20e699334 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useHowItWorksJSON.js @@ -0,0 +1,7 @@ +import { useQuery } from "react-query"; + +const useGetHowItWorksJSON = (tenantId) => { + return useQuery(["HOW_IT_WORKS", tenantId], () => Digit.MDMSService.getHowItWorksJSONData(tenantId)); + }; + +export default useGetHowItWorksJSON; \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useInbox.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useInbox.js new file mode 100644 index 00000000000..2f6bed8496b --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useInbox.js @@ -0,0 +1,11 @@ +import React from "react"; +import { useQuery } from "react-query"; +import { InboxGeneral } from "../services/elements/InboxService" + +const useInbox = ({tenantId, filters, config}) => useQuery( + ["INBOX_DATA",tenantId, ...Object.keys(filters)?.map( e => filters?.[e] )], + () => InboxGeneral.Search({inbox: {...filters}}), + { ...config } + ) + +export default useInbox; \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useInboxGeneral/filterFn.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useInboxGeneral/filterFn.js new file mode 100644 index 00000000000..7736e52c1af --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useInboxGeneral/filterFn.js @@ -0,0 +1,108 @@ +export const filterFunctions = { + PT: (filtersArg) => { + let { uuid } = Digit.UserService.getUser()?.info || {}; + + const searchFilters = {}; + const workflowFilters = {}; + + const { propertyIds, mobileNumber, limit, offset, sortBy, sortOrder, total, applicationStatus, services } = filtersArg || {}; + + if (filtersArg?.acknowledgementIds) { + searchFilters.acknowledgementIds = filtersArg?.acknowledgementIds; + } + if (filtersArg?.propertyIds) { + searchFilters.propertyIds = propertyIds; + } + if (filtersArg?.oldpropertyids) { + searchFilters.oldpropertyids = filtersArg?.oldpropertyids; + } + if (applicationStatus && applicationStatus?.[0]) { + workflowFilters.applicationStatus = applicationStatus.map((status) => status.code).join(","); + } + if (filtersArg?.locality?.length) { + searchFilters.locality = filtersArg?.locality.map((item) => item.code.split("_").pop()).join(","); + } + + if (filtersArg?.locality?.code) { + searchFilters.locality = filtersArg?.locality?.code; + } + + if (filtersArg?.uuid && filtersArg?.uuid.code === "ASSIGNED_TO_ME") { + workflowFilters.assignee = uuid; + } + if (mobileNumber) { + searchFilters.mobileNumber = mobileNumber; + } + if (propertyIds) { + searchFilters.propertyIds = propertyIds; + } + if (sortBy) { + searchFilters.sortBy = sortBy; + } + if (sortOrder) { + searchFilters.sortOrder = sortOrder; + } + if (services) { + workflowFilters.businessServices = services.join(); + } + if (limit) { + searchFilters.limit = limit; + } + if (offset) { + searchFilters.offset = offset; + } + + return { searchFilters, workflowFilters }; + }, + TL: (filtersArg) => { + let { uuid } = Digit.UserService.getUser()?.info || {}; + + const searchFilters = {}; + const workflowFilters = {}; + + const { propertyIds, mobileNumber, limit, offset, sortBy, sortOrder, total, applicationStatus, services } = filtersArg || {}; + + if (filtersArg?.acknowledgementIds) { + searchFilters.acknowledgementIds = filtersArg?.acknowledgementIds; + } + if (filtersArg?.propertyIds) { + searchFilters.propertyIds = propertyIds; + } + if (filtersArg?.oldpropertyids) { + searchFilters.oldpropertyids = filtersArg?.oldpropertyids; + } + if (applicationStatus && applicationStatus?.[0]) { + workflowFilters.applicationStatus = applicationStatus.map((status) => status.code).join(","); + } + if (filtersArg?.locality?.length) { + searchFilters.locality = filtersArg?.locality.map((item) => item.code.split("_").pop()).join(","); + } + + if (filtersArg?.uuid && filtersArg?.uuid.code === "ASSIGNED_TO_ME") { + workflowFilters.assignee = uuid; + } + if (mobileNumber) { + searchFilters.mobileNumber = mobileNumber; + } + if (propertyIds) { + searchFilters.propertyIds = propertyIds; + } + if (sortBy) { + searchFilters.sortBy = sortBy; + } + if (sortOrder) { + searchFilters.sortOrder = sortOrder; + } + if (services) { + workflowFilters.businessServices = services.join(); + } + if (limit) { + searchFilters.limit = limit; + } + if (offset) { + searchFilters.offset = offset; + } + + return { searchFilters, workflowFilters }; + }, +}; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useInboxGeneral/newFilterFn.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useInboxGeneral/newFilterFn.js new file mode 100644 index 00000000000..33242762bf9 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useInboxGeneral/newFilterFn.js @@ -0,0 +1,52 @@ +export const filterFunctions = { + PT: (filtersArg) => { + let { uuid } = Digit.UserService.getUser()?.info || {}; + + const searchFilters = {}; + const workflowFilters = {}; + + const { propertyIds, mobileNumber, limit, offset, sortBy, sortOrder, total, applicationStatus, services } = filtersArg || {}; + + if (filtersArg?.acknowledgementIds) { + searchFilters.applicationNumber = filtersArg?.acknowledgementIds; + } + if (filtersArg?.propertyIds) { + searchFilters.propertyId = propertyIds; + } + if (filtersArg?.oldpropertyids) { + searchFilters.oldpropertyids = filtersArg?.oldpropertyids; + } + if (applicationStatus && applicationStatus?.[0]) { + workflowFilters.status = applicationStatus.map((status) => status.uuid); + if (applicationStatus?.some((e) => e.nonActionableRole)) { + searchFilters.fetchNonActionableRecords = true; + } + } + if (filtersArg?.locality?.length) { + searchFilters.locality = filtersArg?.locality.map((item) => item.code.split("_").pop()); + } + if (filtersArg?.uuid && filtersArg?.uuid.code === "ASSIGNED_TO_ME") { + workflowFilters.assignee = uuid; + } + if (mobileNumber) { + searchFilters.mobileNumber = mobileNumber; + } + if (services) { + workflowFilters.businessService = services; + } + searchFilters["isInboxSearch"] = true; + searchFilters["creationReason"] = ["CREATE", "MUTATION", "UPDATE"]; + workflowFilters["moduleName"] = "PT"; + + // if (limit) { + // searchFilters.limit = limit; + // } + // if (offset) { + // searchFilters.offset = offset; + // } + + // workflowFilters.businessService = "PT.CREATE"; + // searchFilters.mobileNumber = "9898568989"; + return { searchFilters, workflowFilters, limit, offset, sortBy, sortOrder }; + }, +}; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useInboxGeneral/searchFields.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useInboxGeneral/searchFields.js new file mode 100644 index 00000000000..05cd3d163db --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useInboxGeneral/searchFields.js @@ -0,0 +1,67 @@ +const inboxSearchFields = { + PT: [ + { + label: "PT_PROPERTY_APPLICATION_NO", + name: "acknowledgementIds", + roles: [], + }, + { + label: "ES_SEARCH_UNIQUE_PROPERTY_ID", + name: "propertyIds", + // minLength: "10", + roles: [], + }, + { + label: "ES_SEARCH_APPLICATION_MOBILE_NO", + name: "mobileNumber", + type: "mobileNumber", + maxLength: 10, + minLength: 0, + roles: [], + pattern: "^$|[6-9][0-9]{9}", + errorMessages: { + pattern: "", + minLength: "", + maxLength: "", + }, + }, + ], +}; + +const searchFieldsForSearch = { + PT: [ + { + label: "ES_INBOX_LOCALITY", + name: "locality", + type: "Locality", + isMendatory: true, + }, + { + label: "ES_INBOX_UNIQUE_PROPERTY_ID", + name: "propertyIds", + roles: [], + }, + { + label: "ES_SEARCH_EXISTING_PROPERTY_ID", + name: "oldpropertyids", + title: "ES_SEARCH_APPLICATION_MOBILE_INVALID", + roles: [], + }, + { + label: "ES_SEARCH_APPLICATION_MOBILE_NO", + name: "mobileNumber", + type: "mobileNumber", + maxLength: 10, + minLength: 0, + roles: [], + pattern: "^$|[6-9][0-9]{9}", + errorMessages: { + pattern: "", + minLength: "", + maxLength: "", + }, + }, + ], +}; + +export const getSearchFields = (isInbox) => (isInbox ? inboxSearchFields : searchFieldsForSearch); diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useInboxGeneral/useInboxGeneral.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useInboxGeneral/useInboxGeneral.js new file mode 100644 index 00000000000..c8c9b04d71d --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useInboxGeneral/useInboxGeneral.js @@ -0,0 +1,148 @@ +import { useTranslation } from "react-i18next"; +import { useQuery, useQueryClient } from "react-query"; + +import { filterFunctions } from "./filterFn"; +import { getSearchFields } from "./searchFields"; + +const inboxConfig = (tenantId, filters) => ({ + +}); + +const defaultCombineResponse = ({ totalCount, ...d }, wf) => { + return { totalCount, searchData: { ...d }, workflowData: { ...wf } }; +}; + +const defaultRawSearchHandler = ({ totalCount, ...data }, searchKey, businessIdAlias) => { + return { [searchKey]: data[searchKey].map((e) => ({ totalCount, ...e })) }; +}; + +const defaultCatchSearch = (Err) => { + if ( + Err?.response?.data?.Errors?.some( + (e) => + e.code === "EG_PT_INVALID_SEARCH" && + e.message === " Search is not allowed on empty Criteria, Atleast one criteria should be provided with tenantId for EMPLOYEE" + ) + ) + return []; + throw Err; +}; + +/** + * + * @param {*} data + * @param {Array of Objects containing async or pure functions} middlewares + * @returns {object} + */ + +const callMiddlewares = async (data, middlewares) => { + let applyBreak = false; + let itr = -1; + let _break = () => (applyBreak = true); + let _next = async (data) => { + if (!applyBreak && ++itr < middlewares.length) { + let key = Object.keys(middlewares[itr])[0]; + let nextMiddleware = middlewares[itr][key]; + let isAsync = nextMiddleware.constructor.name === "AsyncFunction"; + if (isAsync) return await nextMiddleware(data, _break, _next); + else return nextMiddleware(data, _break, _next); + } else return data; + }; + let ret = await _next(data); + return ret || []; +}; + +const useInboxGeneral = ({ + tenantId, + businessService, + filters, + rawWfHandler = (d) => d, + rawSearchHandler = defaultRawSearchHandler, + combineResponse = defaultCombineResponse, + isInbox = true, + wfConfig = {}, + searchConfig = {}, + middlewaresWf = [], + middlewareSearch = [], + catchSearch = defaultCatchSearch, +}) => { + const client = useQueryClient(); + const { t } = useTranslation(); + + const { services, fetchFilters, searchResponseKey, businessIdAliasForSearch, businessIdsParamForSearch } = inboxConfig()[businessService]; + + let { workflowFilters, searchFilters } = fetchFilters(filters); + + const { data: processInstances, isFetching: wfFetching, isFetched, isSuccess: wfSuccess } = useQuery( + ["WORKFLOW_INBOX", businessService, workflowFilters], + () => + Digit.WorkflowService.getAllApplication(tenantId, { businessServices: services.join(), ...workflowFilters }) + .then(rawWfHandler) + .then((data) => callMiddlewares(data.ProcessInstances, middlewaresWf)), + { + enabled: isInbox, + select: (d) => { + return d; + }, + ...wfConfig, + } + ); + + const applicationNoFromWF = processInstances?.map((e) => e.businessId).join() || ""; + + if (isInbox && applicationNoFromWF && !searchFilters[businessIdAliasForSearch]) + searchFilters = { [businessIdsParamForSearch]: applicationNoFromWF, ...searchFilters }; + + const { _searchFn } = inboxConfig(tenantId, { ...searchFilters })[businessService]; + + /** + * Convert Wf Array to Object + */ + + const processInstanceBuisnessIdMap = processInstances?.reduce((object, item) => { + return { ...object, [item?.["businessId"]]: item }; + }, {}); + + const allowSearch = isInbox ? isFetched && wfSuccess && !!searchFilters[businessIdsParamForSearch] : true; + + const searchResult = useQuery( + ["SEARCH_INBOX", businessService, searchFilters, workflowFilters, isInbox], + () => { + if (allowSearch) + return _searchFn() + .then((d) => rawSearchHandler(d, searchResponseKey, businessIdAliasForSearch)) + .then((data) => callMiddlewares(data[searchResponseKey], middlewareSearch)) + .catch(catchSearch); + }, + { + enabled: allowSearch, + select: (d) => { + return d.map((searchResult) => ({ + totalCount: d.totalCount, + ...combineResponse(searchResult, processInstanceBuisnessIdMap?.[searchResult?.[businessIdAliasForSearch]]), + })); + }, + ...searchConfig, + } + ); + + const revalidate = () => { + client.refetchQueries(["WORKFLOW_INBOX"]); + client.refetchQueries(["SEARCH_INBOX"]); + }; + + client.setQueryData(`FUNCTION_RESET_INBOX_${businessService}`, { revalidate }); + + return { + ...searchResult, + revalidate, + searchResponseKey, + businessIdsParamForSearch, + businessIdAliasForSearch, + + searchFields: getSearchFields(isInbox)[businessService], + wfFetching, + }; +}; + +export default useInboxGeneral; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useInboxGeneral/useNewInbox.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useInboxGeneral/useNewInbox.js new file mode 100644 index 00000000000..71e31c0f483 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useInboxGeneral/useNewInbox.js @@ -0,0 +1,76 @@ +import { useTranslation } from "react-i18next"; +import { useQuery, useQueryClient } from "react-query"; + +import { filterFunctions } from "./newFilterFn"; +import { getSearchFields } from "./searchFields"; +import { InboxGeneral } from "../../services/elements/InboxService"; + +const inboxConfig = (tenantId, filters) => ({ + +}); + +const callMiddlewares = async (data, middlewares) => { + let applyBreak = false; + let itr = -1; + let _break = () => (applyBreak = true); + let _next = async (data) => { + if (!applyBreak && ++itr < middlewares.length) { + let key = Object.keys(middlewares[itr])[0]; + let nextMiddleware = middlewares[itr][key]; + let isAsync = nextMiddleware.constructor.name === "AsyncFunction"; + if (isAsync) return await nextMiddleware(data, _break, _next); + else return nextMiddleware(data, _break, _next); + } else return data; + }; + let ret = await _next(data); + return ret || []; +}; + +const useNewInboxGeneral = ({ tenantId, ModuleCode, filters, middleware = [], config = {} }) => { + const client = useQueryClient(); + const { t } = useTranslation(); + const { fetchFilters, searchResponseKey, businessIdAliasForSearch, businessIdsParamForSearch } = inboxConfig()[ModuleCode]; + let { workflowFilters, searchFilters, limit, offset, sortBy, sortOrder } = fetchFilters(filters); + + const query = useQuery( + ["INBOX", workflowFilters, searchFilters, ModuleCode, limit, offset, sortBy, sortOrder], + () => + InboxGeneral.Search({ + inbox: { tenantId, processSearchCriteria: workflowFilters, moduleSearchCriteria: { ...searchFilters, sortBy, sortOrder }, limit, offset }, + }), + { + select: (data) => { + const { statusMap, totalCount } = data; + // client.setQueryData(`INBOX_STATUS_MAP_${ModuleCode}`, (oldStatusMap) => { + // if (!oldStatusMap) return statusMap; + // else return [...oldStatusMap.filter((e) => statusMap.some((f) => f.stateId === e.stateId))]; + // }); + + client.setQueryData(`INBOX_STATUS_MAP_${ModuleCode}`, statusMap); + + if (data.items.length) { + return data.items?.map((obj) => ({ + searchData: obj.businessObject, + workflowData: obj.ProcessInstance, + statusMap, + totalCount, + })); + } else { + return [{ statusMap, totalCount, dataEmpty: true }]; + } + }, + retry: false, + ...config, + } + ); + + return { + ...query, + searchResponseKey, + businessIdsParamForSearch, + businessIdAliasForSearch, + searchFields: getSearchFields(true)[ModuleCode], + }; +}; + +export default useNewInboxGeneral; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useLocalities.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useLocalities.js new file mode 100644 index 00000000000..8c550eb22fb --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useLocalities.js @@ -0,0 +1,17 @@ +import { useQuery } from "react-query"; +import { getLocalities } from "../services/molecules/getLocalities"; +import { LocalityService } from "../services/elements/Localities"; + +const useLocalities = (tenant, boundaryType = "admin", config, t) => { + return useQuery(["BOUNDARY_DATA", tenant, boundaryType], () => getLocalities[boundaryType.toLowerCase()](tenant), { + select: (data) => { + return LocalityService.get(data).map((key) => { + return { ...key, i18nkey: t(key.i18nkey) }; + }); + }, + staleTime: Infinity, + ...config, + }); +}; + +export default useLocalities; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useLocation.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useLocation.js new file mode 100644 index 00000000000..0e5cfa320e5 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useLocation.js @@ -0,0 +1,15 @@ +import { useQuery } from 'react-query'; +import { LocationService } from "../services/elements/Location"; + +const useLocation = (tenantId, locationType, config = {}) => { + switch(locationType) { + case 'Locality': + return useQuery(["LOCALITY_DETAILS", tenantId ], () => LocationService.getLocalities(tenantId), config); + case 'Ward': + return useQuery(["WARD_DETAILS", tenantId ], () => LocationService.getWards(tenantId), config); + default: + break + } +} + +export default useLocation; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useMDMS.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useMDMS.js new file mode 100644 index 00000000000..ec3579d93a6 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useMDMS.js @@ -0,0 +1,44 @@ +import { MdmsService } from "../services/elements/MDMS"; +import { useQuery } from "react-query"; + +const useMDMS = (tenantId, moduleCode, type, config = {}, payload = []) => { + const usePaymentGateway = () => { + return useQuery("PAYMENT_GATEWAY", () => MdmsService.getPaymentGateway(tenantId, moduleCode, type), { + select: (data) => { + return data?.[moduleCode]?.[type].filter((e) => e.active).map(({ gateway }) => gateway); + }, + ...config, + }); + }; + + const useReceiptKey = () => { + return useQuery("RECEIPT_KEY", () => MdmsService.getReceiptKey(tenantId, moduleCode, type), config); + }; + + const useBillsGenieKey = () => { + return useQuery("BILLS_GENIE_KEY", () => MdmsService.getBillsGenieKey(tenantId, moduleCode, type), config); + }; + + const useFSTPPlantInfo = () => { + return useQuery("FSTP_PLANTINFO", () => MdmsService.getFSTPPlantInfo(tenantId, moduleCode, type), config); + }; + + const _default = () => { + return useQuery([tenantId, moduleCode, type], () => MdmsService.getMultipleTypes(tenantId, moduleCode, type), config); + }; + + switch (type) { + case "PaymentGateway": + return usePaymentGateway(); + case "ReceiptKey": + return useReceiptKey(); + case "FSTPPlantInfo": + return useFSTPPlantInfo(); + case "BillsGenieKey": + return useBillsGenieKey(); + default: + return _default(); + } +}; + +export default useMDMS; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useModuleTenants.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useModuleTenants.js new file mode 100644 index 00000000000..25e51a94e97 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useModuleTenants.js @@ -0,0 +1,39 @@ +import React from "react"; +import { useQuery } from "react-query"; +import { useTranslation } from "react-i18next"; + +const useModuleTenants = (module, config = {}) => { + const { t } = useTranslation(); + + return useQuery(["ULB_TENANTS", module], () => Digit.SessionStorage.get("initData"), { + select: (data) => ({ + ddr: data.modules + .find((e) => e.module === module) + .tenants.map((tenant) => ({ + ...tenant, + ulbKey: t(`TENANT_TENANTS_${tenant?.code?.toUpperCase?.()?.replace(".", "_")}`), + ddrKey: t( + `DDR_${data.tenants + .filter((t) => t.code === tenant.code)?.[0] + .city?.districtTenantCode?.toUpperCase?.() + .replace(".", "_")}` + ), + })) + .filter((item, i, arr) => i === arr.findIndex((t) => t.ddrKey === item.ddrKey)), + ulb: data.modules + .find((e) => e.module === module) + .tenants.map((tenant) => ({ + ...tenant, + ulbKey: t(`TENANT_TENANTS_${tenant?.code?.toUpperCase?.()?.replace(".", "_")}`), + ddrKey: t( + `DDR_${data.tenants + .filter((t) => t.code === tenant.code)?.[0] + .city?.districtTenantCode?.toUpperCase?.() + .replace(".", "_")}` + ), + })), + }), + ...config, + }); +}; +export default useModuleTenants; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/usePrivacyContext.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/usePrivacyContext.js new file mode 100644 index 00000000000..fea0afdfd01 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/usePrivacyContext.js @@ -0,0 +1,18 @@ +import React, { useContext } from "react"; + +/** + * Custom hook which can gives the privacy functions to access + * + * @author jagankumar-egov + * + * Feature :: Privacy + * + * @example + * const { privacy , updatePrivacy } = Digit.Hooks.usePrivacyContext() + * + * @returns {Object} Returns the object which contains privacy value and updatePrivacy method + */ +export const usePrivacyContext = () => { + const { privacy, updatePrivacy, ...rest } = useContext(Digit.Contexts.PrivacyProvider); + return { privacy, updatePrivacy, ...rest }; +}; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useQueryParams.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useQueryParams.js new file mode 100644 index 00000000000..b4275c4d56b --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useQueryParams.js @@ -0,0 +1,11 @@ +const useQueryParams = () => { + const queryString = window.location.search; + const urlParams = new URLSearchParams(queryString); + const params = {}; + urlParams.forEach((value, key) => { + params[key] = value; + }); + return params; +}; + +export default useQueryParams; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useRouteSubscription.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useRouteSubscription.js new file mode 100644 index 00000000000..dd586b5cb83 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useRouteSubscription.js @@ -0,0 +1,17 @@ +import React, { useEffect, useState } from "react"; + +const useRouteSubscription = (pathname) => { + const [classname, setClassname] = useState("citizen"); + useEffect(() => { + const isEmployeeUrl = Digit.Utils.detectDsoRoute(pathname); + if (isEmployeeUrl && classname === "citizen") { + setClassname("employee"); + } else if (!isEmployeeUrl && classname === "employee") { + setClassname("citizen"); + } + }, [pathname]); + + return classname; +}; + +export default useRouteSubscription; \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useSessionStorage.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useSessionStorage.js new file mode 100644 index 00000000000..b6860376a31 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useSessionStorage.js @@ -0,0 +1,30 @@ +import { useState } from "react"; + +const useSessionStorage = (key, initialValue) => { + const [storedValue, setStoredValue] = useState(() => { + try { + const data = Digit.SessionStorage.get(key); + return data ? data : initialValue; + } catch (err) { + return initialValue; + } + }); + + const setValue = (value) => { + try { + const valueToStore = value instanceof Function ? value(storedValue) : value; + setStoredValue(valueToStore); + Digit.SessionStorage.set(key, valueToStore); + } catch (err) { + } + }; + + const clearValue = () => { + setStoredValue(initialValue); + Digit.SessionStorage.set(key, initialValue); + }; + + return [storedValue, setValue, clearValue]; +}; + +export default useSessionStorage; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useStaticData.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useStaticData.js new file mode 100644 index 00000000000..f777480903e --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useStaticData.js @@ -0,0 +1,7 @@ +import { useQuery } from "react-query"; + +const useStaticData = (tenantId) => { + return useQuery(["MODULE_LEVEL_HOME_PAGE_STATIC_DATA", tenantId], () => Digit.MDMSService.getStaticDataJSON(tenantId)); + }; + +export default useStaticData; \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useStatusGeneral.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useStatusGeneral.js new file mode 100644 index 00000000000..aff17dcc6e6 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useStatusGeneral.js @@ -0,0 +1,42 @@ +import { useQuery } from "react-query"; + +const useApplicationStatusGeneral = ({ businessServices = [], tenantId }, config) => { + tenantId = tenantId || Digit.ULBService.getCurrentTenantId(); + + const userInfo = Digit.UserService.getUser(); + const userRoles = userInfo.info.roles.map((roleData) => roleData.code); + + const fetch = async () => + await Digit.WorkflowService.init(tenantId, businessServices.join()).then((res) => { + const { BusinessServices: data } = res; + return data; + }); + + const select = (data) => { + let states = []; + const filteredData = data.filter((e) => businessServices.includes(e.businessService)); + filteredData.forEach((service) => { + states = [...states, ...service.states.map((e) => ({ ...e, stateBusinessService: service.businessService }))]; + }); + + const addRoleToState = (state) => { + const roles = state.actions?.map((act) => act.roles).flat(); + return { ...state, roles }; + }; + + const roleStateMapArray = states?.map(addRoleToState).filter((e) => !!e.state); + + const userRoleStates = roleStateMapArray.filter(({ roles }) => roles?.some((role) => userRoles.includes(role))); + const otherRoleStates = roleStateMapArray + .filter(({ roles }) => !roles?.some((role) => userRoles.includes(role))) + .map((e) => ({ ...e, nonActionableRole: true })); + + return { userRoleStates, otherRoleStates }; + }; + + const queryData = useQuery(["workflow_states", tenantId, ...businessServices], () => fetch(), { select, ...config }); + + return queryData; +}; + +export default useApplicationStatusGeneral; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useStore.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useStore.js new file mode 100644 index 00000000000..27d4ccc135f --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useStore.js @@ -0,0 +1,11 @@ +import { useQuery } from "react-query"; +import StoreData from "../services/molecules/StoreData"; + +const useStore = { + getInitData: () => + useQuery(["STORE_DATA"], () => StoreData.getInitData(), { + staleTime: Infinity, + }), +}; + +export default useStore; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useTenants.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useTenants.js new file mode 100644 index 00000000000..c3e8acd1fd7 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useTenants.js @@ -0,0 +1,13 @@ +import { useQuery } from "react-query"; + +const alphabeticalSortFunctionForTenantsBasedOnName = (firstEl, secondEl) =>{ + if (firstEl.name.toUpperCase() < secondEl.name.toUpperCase() ) { + return -1 + } + if (firstEl.name.toUpperCase() > secondEl.name.toUpperCase() ) { + return 1 + } + return 0 +} + +export const useTenants = () => useQuery(["ALL_TENANTS"], () => Digit.SessionStorage.get("initData").tenants.sort(alphabeticalSortFunctionForTenantsBasedOnName)) diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useUpdateCustom.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useUpdateCustom.js new file mode 100644 index 00000000000..83c298bd9a7 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useUpdateCustom.js @@ -0,0 +1,17 @@ +import { useMutation } from "react-query"; +import ApplicationUpdateActionsCustom from "../services/elements/ApplicationUpdateActionsCustom"; + +/** + * Custom hook which can make api call to update API of any module + * + * @author nipunarora-eGov + * + * returns data from update api call + */ + + +const useUpdateCustom = ( url ) => { + return useMutation((applicationData) => ApplicationUpdateActionsCustom({url,body:applicationData})); +}; + +export default useUpdateCustom; \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useWorkflowDetailsV2.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useWorkflowDetailsV2.js new file mode 100644 index 00000000000..d6388d3c6f0 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/useWorkflowDetailsV2.js @@ -0,0 +1,19 @@ +import { useQuery, useQueryClient } from "react-query"; + +const useWorkflowDetailsV2 = ({ tenantId, id, moduleCode, role = "CITIZEN", serviceData = {}, getStaleData, getTripData = false, config }) => { + const queryClient = useQueryClient(); + + const staleDataConfig = { staleTime: Infinity }; + + const { isLoading, error, isError, data } = useQuery( + ["workFlowDetailsWorks", tenantId, id, moduleCode, role, config], + () => Digit.WorkflowService.getDetailsByIdV2({ tenantId, id, moduleCode, role, getTripData }), + getStaleData ? { ...staleDataConfig, ...config } : config + ); + + if (getStaleData) return { isLoading, error, isError, data }; + + return { isLoading, error, isError, data, revalidate: () => queryClient.invalidateQueries(["workFlowDetailsWorks", tenantId, id, moduleCode, role]) }; +}; + +export default useWorkflowDetailsV2; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/userSearch.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/userSearch.js new file mode 100644 index 00000000000..0506a95227f --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/userSearch.js @@ -0,0 +1,8 @@ +import { useQuery, useQueryClient } from "react-query"; +import { UserService } from "../services/elements/User"; + +export const useUserSearch = (tenantId, data, filters, options = {}) => { + const client = useQueryClient(); + const queryData = useQuery(["USER_SEARCH", filters, data], () => UserService.userSearch(tenantId, data, filters), options); + return { ...queryData, revalidate: () => client.invalidateQueries(["USER_SEARCH", filters, data]) }; +}; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/workflow.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/workflow.js new file mode 100644 index 00000000000..2549ed5d027 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/workflow.js @@ -0,0 +1,19 @@ +import { useQuery, useQueryClient } from "react-query"; + +const useWorkflowDetails = ({ tenantId, id, moduleCode, role = "CITIZEN", serviceData = {}, getStaleData, getTripData = false,config }) => { + const queryClient = useQueryClient(); + + const staleDataConfig = { staleTime: Infinity }; + + const { isLoading, error, isError, data } = useQuery( + ["workFlowDetails", tenantId, id, moduleCode, role, config], + () => Digit.WorkflowService.getDetailsById({ tenantId, id, moduleCode, role, getTripData }), + getStaleData ? { ...staleDataConfig, ...config } : config + ); + + if (getStaleData) return { isLoading, error, isError, data }; + + return { isLoading, error, isError, data, revalidate: () => queryClient.invalidateQueries(["workFlowDetails", tenantId, id, moduleCode, role]) }; +}; + +export default useWorkflowDetails; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/index.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/index.js new file mode 100644 index 00000000000..5a7d61a4d9f --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/index.js @@ -0,0 +1,90 @@ +import i18next from "i18next"; +import Enums from "./enums/index"; +import mergeConfig from "./config/mergeConfig"; +import { useStore } from "./services/index"; +import { initI18n } from "./translations/index"; + +import { Storage, PersistantStorage } from "./services/atoms/Utils/Storage"; +import { UploadServices } from "./services/atoms/UploadServices"; +import JsDictionary from "./services/atoms/JsDictionary"; + +import { LocationService } from "./services/elements/Location"; +import { LocalityService } from "./services/elements/Localities"; +import { CustomService } from "./services/elements/CustomService"; +import { LocalizationService } from "./services/elements/Localization/service"; +import { LoginService } from "./services/elements/Login"; +import { PGRService } from "./services/elements/PGR"; +import { PaymentService } from "./services/elements/Payment"; +import * as dateUtils from "./services/atoms/Utils/Date"; +import Download from "./services/atoms/Download"; +import { WorkflowService } from "./services/elements/WorkFlow"; +import { MdmsService } from "./services/elements/MDMS"; +import { Complaint } from "./services/elements/Complaint"; +import { UserService } from "./services/elements/User"; +import HrmsService from "./services/elements/HRMS"; +import { InboxGeneral } from "./services/elements/InboxService"; +import EventsServices from "./services/elements/Events"; + + +import ShareFiles from "./services/molecules/ShareFiles"; +import { GetServiceDefinitions } from "./services/molecules/ServiceDefinitions"; +import { ULBService } from "./services/molecules/Ulb"; +import { ComponentRegistryService } from "./services/elements/ComponentRegistry"; +import StoreData from "./services/molecules/StoreData"; + +import Contexts from "./contexts"; +import Hooks from "./hooks"; +import Utils from "./utils"; +import { subFormRegistry } from "./subFormRegistry"; +import AccessControlService from "./services/elements/Access"; + +const setupLibraries = (Library, props) => { + window.Digit = window.Digit || {}; + window.Digit[Library] = window.Digit[Library] || {}; + window.Digit[Library] = { ...window.Digit[Library], ...props }; +}; + +const initLibraries = () => { + setupLibraries("SessionStorage", Storage); + setupLibraries("PersistantStorage", PersistantStorage); + setupLibraries("UserService", UserService); + setupLibraries("ULBService", ULBService); + + setupLibraries("Config", { mergeConfig }); + setupLibraries("Services", { useStore }); + setupLibraries("Enums", Enums); + setupLibraries("LocationService", LocationService); + setupLibraries("CustomService",CustomService) + setupLibraries("LocalityService", LocalityService); + setupLibraries("LoginService", LoginService); + setupLibraries("LocalizationService", LocalizationService); + setupLibraries("PGRService", PGRService); + setupLibraries("HRMSService", HrmsService); + setupLibraries("PaymentService", PaymentService); + setupLibraries("DateUtils", dateUtils); + setupLibraries("WorkflowService", WorkflowService); + setupLibraries("MDMSService", MdmsService); + setupLibraries("UploadServices", UploadServices); + setupLibraries("JsDictionary", JsDictionary); + setupLibraries("GetServiceDefinitions", GetServiceDefinitions); + setupLibraries("Complaint", Complaint); + setupLibraries("ComponentRegistryService", ComponentRegistryService); + setupLibraries("StoreData", StoreData); + setupLibraries("EventsServices", EventsServices); + + setupLibraries("InboxGeneral", InboxGeneral); + setupLibraries("ShareFiles", ShareFiles); + setupLibraries("Contexts", Contexts); + setupLibraries("Hooks", Hooks); + setupLibraries("Customizations", {}); + setupLibraries("Utils", Utils); + setupLibraries("Download", Download); + + setupLibraries("AccessControlService", AccessControlService); + + return new Promise((resolve) => { + initI18n(resolve); + }); +}; + +export { initLibraries, Enums, Hooks, subFormRegistry }; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/services/atoms/ApiCacheService.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/atoms/ApiCacheService.js new file mode 100644 index 00000000000..31bbe25c694 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/atoms/ApiCacheService.js @@ -0,0 +1,64 @@ +import { PersistantStorage } from "./Utils/Storage"; + +const defaultApiCachingSettings = [ + { + serviceName: "localization", + cacheTimeInSecs: 86400, + }, + { + serviceName: "access/v1/actions", + cacheTimeInSecs: 86400, + }, + { + serviceName: "user/_search", + cacheTimeInSecs: 86400, + }, + { + serviceName: "egov-mdms-service", + cacheTimeInSecs: 3600, + debounceTimeInMS: 100, + moduleSettings: [ + { + moduleName: "FSM", + cacheTimeInSecs: 7200, + }, + ], + }, +]; + +const storageKey = "cachingService"; +const getCachedSetting = () => { + if (Digit.ApiCacheSetting) { + return Digit.ApiCacheSetting; + } + const setting = PersistantStorage.get(storageKey) || defaultApiCachingSettings; + Digit.ApiCacheSetting = setting; + return setting; +}; +const getSetting = (serviceName, moduleName) => { + const setting = getCachedSetting(); + const serviceSetting = setting.find((item) => item.serviceName === serviceName); + const responseSetting = { + cacheTimeInSecs: serviceSetting.cacheTimeInSecs, + debounceTimeInMS: serviceSetting.debounceTimeInMS || 100, + }; + if (!moduleName) { + return responseSetting; + } + const moduleSettings = serviceSetting?.moduleSettings?.find((item) => item.moduleName === moduleName); + if (!moduleSettings) { + return responseSetting; + } + return { + cacheTimeInSecs: moduleSettings.cacheTimeInSecs || responseSetting.cacheTimeInSecs, + debounceTimeInMS: moduleSettings.debounceTimeInMS || responseSetting.debounceTimeInMS, + }; +}; +export const ApiCacheService = { + saveSetting: (setting) => { + PersistantStorage.set(storageKey, setting || defaultApiCachingSettings); + }, + getSettingByServiceUrl: (serviceUrl, moduleName) => { + return getSetting(serviceUrl.split("/")[1], moduleName); + }, +}; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/services/atoms/Download.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/atoms/Download.js new file mode 100644 index 00000000000..9e044c47da0 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/atoms/Download.js @@ -0,0 +1,208 @@ +import ReactDOM from "react-dom"; +import html2canvas from "html2canvas"; +import XLSX from "xlsx"; +import domtoimage from "dom-to-image"; + +const changeClasses=(class1,class2)=>{ + var elements = document.getElementsByClassName(class1) + Array.prototype.map.call(elements, function(testElement){ + testElement.classList.add(class2); + testElement.classList.remove(class1); + }); +} + +const revertCss=()=>{ + changeClasses("dss-white-pre-temp",'dss-white-pre-line'); +} + +const applyCss=()=>{ + changeClasses('dss-white-pre-line',"dss-white-pre-temp"); +} + +const Download = { + Image: (node, fileName, share, resolve = null) => { + const saveAs = (uri, filename) => { + const link = document.createElement("a"); + + if (typeof link.download === "string") { + link.href = uri; + link.download = filename; + document.body.appendChild(link); + link.click(); + document.body.removeChild(link); + } else { + window.open(uri); + } + }; + + const element = ReactDOM.findDOMNode(node.current); + html2canvas(element, { + scrollY: -window.scrollY, + scrollX: 0, + useCORS: true, + scale: 1.5, + }).then((canvas) => { + return share + ? canvas.toBlob((blob) => resolve(new File([blob], `${fileName}.jpeg`, { type: "image/jpeg" })), "image/jpeg", 1) + : saveAs(canvas.toDataURL("image/jpeg", 1), `${fileName}.jpeg`); + }); + }, + + Excel: (data, filename) => { + const file = filename.substring(0,30); + const wb = XLSX.utils.book_new(); + let ws = null; + ws = XLSX.utils.json_to_sheet(data) + wb.SheetNames.push(file); + wb.Sheets[file] = ws; + XLSX.writeFile(wb, `${file}.xlsx`); + }, + + PDF: (node, fileName, share, resolve = null) => { + + + + const saveAs = (uri, filename) => { + if(window.mSewaApp && window.mSewaApp.isMsewaApp()){ + window.mSewaApp.downloadBase64File(uri, filename); + } + const link = document.createElement("a"); + + if (typeof link.download === "string") { + link.href = uri; + link.download = filename; + document.body.appendChild(link); + link.click(); + document.body.removeChild(link); + } else { + window.open(uri); + } + }; + const dataURItoBlob = (dataURI) => { + var binary = atob(dataURI.split(',')[1]); + var array = []; + for (var i = 0; i < binary.length; i++) { + array.push(binary.charCodeAt(i)); + } + return new Blob([new Uint8Array(array)], { type: 'image/jpeg' }); + }; + changeClasses('dss-white-pre-line',"dss-white-pre-temp"); + + applyCss(); + const element = ReactDOM.findDOMNode(node.current); + + + return domtoimage.toJpeg(element, { + quality: 1, + bgcolor: 'white', + filter:node=>!node?.className?.includes?.("divToBeHidden"), + style:{ + margin:'25px' + } + }).then(function (dataUrl) { +/* to enable pdf + var htmlImage = new Image(); + htmlImage.src = dataUrl; + var pdf = new jsPDF( 'l', 'pt', [element.offsetWidth, element.offsetHeight] ); + pdf.setFontStyle?.("Bold"); + pdf.setFontSize?.(30); + pdf.text?.(325, 40, 'Certificate'); + // e(imageData, format, x, y, width, height, alias, compression, rotation) + pdf.addImage?.( htmlImage, 25, 50, 50, element.offsetWidth, element.offsetHeight ); + pdf.save?.( fileName +'.pdf' ); + */ + changeClasses("dss-white-pre-temp",'dss-white-pre-line'); + + revertCss(); + var blobData = dataURItoBlob(dataUrl); + revertCss(); + return share + ? resolve(new File([blobData], `${fileName}.jpeg`, { type: "image/jpeg" })) + : saveAs(dataUrl, `${fileName}.jpeg`) + }); + + + /* + const getPDF = (canvas) => { + const width = canvas.width; + const height = canvas.height; + const o = width > height ? "l" : "p"; + const format = "a4"; + + return new jsPDF(o, "mm", format); + }; + + const element = ReactDOM.findDOMNode(node.current); + return html2canvas(element, { + scrollY: -window.scrollY, + scrollX: 0, + useCORS: true, + scale: 1.5, + windowWidth: document.documentElement.offsetWidth, + windowHeight: document.documentElement.offsetHeight, + }).then((canvas) => { + const pdf = getPDF(canvas); + const jpegImage = canvas.toDataURL("image/jpeg"); + const imgProps = pdf.getImageProperties(jpegImage); + const margin = 0.1; + const pageHeight = 295; + // const pdfWidth = pdf.internal.pageSize.width * (1 - margin); + const pdfWidth = (imgProps.width * pageHeight) / (imgProps.height * 1.2) + const pdfHeight = (imgProps.height * pdfWidth) / imgProps.width; + const x = (pdf.internal.pageSize.width - pdfWidth) / 2; + let position = 5; + // let heightLeft = pdfHeight; + pdf.addImage(jpegImage, "JPEG", x, position, pdfWidth, pdfHeight, "a", "FAST"); + // heightLeft -= pageHeight; + // while (heightLeft > 0) { + // position += heightLeft - pdfHeight; + // pdf.addPage(); + // pdf.addImage(jpegImage, "JPEG", x, position, pdfWidth, pdfHeight, "a", "FAST"); + // heightLeft -= pageHeight; + // } + return share ? new File([pdf.output("blob")], `${fileName}.pdf`, { type: "application/pdf" }) : pdf.save(`${fileName}.pdf`); + }); + */ + }, + + IndividualChartImage: (node, fileName, share, resolve = null) => { + const saveAs = (uri, filename) => { + if(window.mSewaApp && window.mSewaApp.isMsewaApp()){ + window.mSewaApp.downloadBase64File(uri, filename); + } + const link = document.createElement("a"); + + if (typeof link.download === "string") { + link.href = uri; + link.download = filename; + document.body.appendChild(link); + link.click(); + document.body.removeChild(link); + } else { + window.open(uri); + } + }; + const dataURItoBlob = (dataURI) => { + var binary = atob(dataURI.split(',')[1]); + var array = []; + for (var i = 0; i < binary.length; i++) { + array.push(binary.charCodeAt(i)); + } + return new Blob([new Uint8Array(array)], { type: 'image/jpeg' }); + }; + changeClasses('dss-white-pre-line',"dss-white-pre-temp"); + const element = ReactDOM.findDOMNode(node.current); + return domtoimage.toJpeg(element, { + quality: 1, + bgcolor: 'white' + }).then(function (dataUrl) { + var blobData = dataURItoBlob(dataUrl); + changeClasses("dss-white-pre-temp",'dss-white-pre-line'); + return share + ? resolve(new File([blobData], `${fileName}.jpeg`, { type: "image/jpeg" })) + : saveAs(dataUrl, `${fileName}.jpeg`) + }); + + }, +}; +export default Download; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/services/atoms/JsDictionary.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/atoms/JsDictionary.js new file mode 100644 index 00000000000..45d3a347fd1 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/atoms/JsDictionary.js @@ -0,0 +1,24 @@ +class JsDictionary { + constructor(defaultFiller){ + this.defaultFiller = defaultFiller || [] + // [["key1", "valu1"],["key2", "value2"]] + } + + set(key, value){ + const __mutatedMap = this.defaultFiller.push([key, value]) + return __mutatedMap + } + + get(){ + + } + + delete(key){ + const __indexofKeyToDelete = this.defaultFiller.findIndex( e => e[0] === key ) + const __mutatedMap = this.defaultFiller.splice(__indexofKeyToDelete, 1) + return __mutatedMap + } + +} + +export default new JsDictionary([]) \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/services/atoms/UploadServices.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/atoms/UploadServices.js new file mode 100644 index 00000000000..493b743342e --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/atoms/UploadServices.js @@ -0,0 +1,51 @@ +import Axios from "axios"; +import Urls from "./urls"; +export const UploadServices = { + Filestorage: async (module, filedata, tenantId) => { + const formData = new FormData(); + + formData.append("file", filedata, filedata.name); + formData.append("tenantId", tenantId); + formData.append("module", module); + let tenantInfo=window?.globalConfigs?.getConfig("ENABLE_SINGLEINSTANCE")?`?tenantId=${tenantId}`:""; + var config = { + method: "post", + url:`${Urls.FileStore}${tenantInfo}`, + data: formData, + headers: { "auth-token": Digit.UserService.getUser() ? Digit.UserService.getUser()?.access_token : null}, + }; + + return Axios(config); + }, + + MultipleFilesStorage: async (module, filesData, tenantId) => { + const formData = new FormData(); + const filesArray = Array.from(filesData) + filesArray?.forEach((fileData, index) => fileData ? formData.append("file", fileData, fileData.name) : null); + formData.append("tenantId", tenantId); + formData.append("module", module); + let tenantInfo=window?.globalConfigs?.getConfig("ENABLE_SINGLEINSTANCE")?`?tenantId=${tenantId}`:""; + var config = { + method: "post", + url:`${Urls.FileStore}${tenantInfo}`, + data: formData, + headers: { 'Content-Type': 'multipart/form-data',"auth-token": Digit.UserService.getUser().access_token }, + }; + + return Axios(config); + }, + + Filefetch: async (filesArray, tenantId) => { + let tenantInfo=window?.globalConfigs?.getConfig("ENABLE_SINGLEINSTANCE")?`?tenantId=${tenantId}`:""; + var config = { + method: "get", + url:`${Urls.FileFetch}${tenantInfo}`, + params: { + tenantId: tenantId, + fileStoreIds: filesArray?.join(","), + }, + }; + const res = await Axios(config); + return res; + }, +}; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/services/atoms/Utils/Date.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/atoms/Utils/Date.js new file mode 100644 index 00000000000..3b3cfc5bc0d --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/atoms/Utils/Date.js @@ -0,0 +1,39 @@ +import { format, toDate } from "date-fns"; + +export const ConvertTimestampToDate = (timestamp, dateFormat = "d-MMM-yyyy") => { + return timestamp ? format(toDate(timestamp), dateFormat) : null; +}; + +export const ConvertEpochToDate = (dateEpoch) => { + if (dateEpoch == null || dateEpoch == undefined || dateEpoch == "") { + return "NA"; + } + const dateFromApi = new Date(dateEpoch); + let month = dateFromApi.getMonth() + 1; + let day = dateFromApi.getDate(); + let year = dateFromApi.getFullYear(); + month = (month > 9 ? "" : "0") + month; + day = (day > 9 ? "" : "0") + day; + return `${day}/${month}/${year}`; +}; + +export const ConvertEpochToTimeInHours = (dateEpoch) => { + if (dateEpoch == null || dateEpoch == undefined || dateEpoch == "") { + return "NA"; + } + const dateFromApi = new Date(dateEpoch); + let hour = dateFromApi.getHours(); + let min = dateFromApi.getMinutes(); + let period = hour > 12 ? "PM" : "AM"; + hour = hour > 12 ? hour - 12 : hour; + hour = (hour > 9 ? "" : "0") + hour; + min = (min > 9 ? "" : "0") + min; + return `${hour}:${min} ${period}`; +}; + +export const getDayfromTimeStamp = (timestamp) => { + var a = new Date(timestamp); + var days = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; + var dayOfWeek = days[a.getDay()] + return dayOfWeek +} \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/services/atoms/Utils/ParsingUtils.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/atoms/Utils/ParsingUtils.js new file mode 100644 index 00000000000..f056008748c --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/atoms/Utils/ParsingUtils.js @@ -0,0 +1,53 @@ +import XLSX from 'xlsx'; + +export const parseXlsToJson = (event,setter) => { + event.preventDefault() + + const file = event.target.files[0]; + const reader = new FileReader(); + reader.onload = (e) => { + const data = new Uint8Array(e.target.result); + const workbook = XLSX.read(data, { type: 'array' }); + const sheetName = workbook.SheetNames[0]; // Assuming you want the first sheet + + const result = XLSX.utils.sheet_to_json(workbook.Sheets[sheetName]); + setter(()=>result) + }; + + reader.readAsArrayBuffer(file); +} + +export const parseXlsToJsonMultipleSheets = (uploadEvent) => { + const allowedFileTypes = ['application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/vnd.ms-excel']; + + return new Promise((resolve, reject) => { + const uploadedFile = uploadEvent.target.files[0]; + + if (!allowedFileTypes.includes(uploadedFile.type)) { + reject(new Error('WBH_LOC_INAVLID_FILY_TYPE')); + return; + } + const reader = new FileReader(); + + reader.onload = function(event) { + const arrayBuffer = event.target.result; + const workbook = XLSX.read(arrayBuffer, { type: 'arraybuffer' }); + const jsonData = {}; + + workbook.SheetNames.forEach(sheetName => { + const worksheet = workbook.Sheets[sheetName]; + const jsonSheetData = XLSX.utils.sheet_to_json(worksheet); + jsonData[sheetName] = jsonSheetData; + }); + + resolve(jsonData); + }; + + reader.onerror = function(error) { + reject(error); + }; + + reader.readAsArrayBuffer(uploadEvent.target.files[0]); + }); +} + diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/services/atoms/Utils/Request.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/atoms/Utils/Request.js new file mode 100644 index 00000000000..93e927cfa1f --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/atoms/Utils/Request.js @@ -0,0 +1,211 @@ +import Axios from "axios"; + +/** + * Custom Request to make all api calls + * + * @author jagankumar-egov + * + */ + +Axios.interceptors.response.use( + (res) => res, + (err) => { + const isEmployee = window.location.pathname.split("/").includes("employee"); + if (err?.response?.data?.Errors) { + for (const error of err.response.data.Errors) { + if (error.message.includes("InvalidAccessTokenException")) { + localStorage.clear(); + sessionStorage.clear(); + window.location.href = + (isEmployee ? `/${window?.contextPath}/employee/user/login` : `/${window?.contextPath}/citizen/login`) + + `?from=${encodeURIComponent(window.location.pathname + window.location.search)}`; + } else if ( + error?.message?.toLowerCase()?.includes("internal server error") || + error?.message?.toLowerCase()?.includes("some error occured") + ) { + window.location.href = + (isEmployee ? `/${window?.contextPath}/employee/user/error` : `/${window?.contextPath}/citizen/error`) + + `?type=maintenance&from=${encodeURIComponent(window.location.pathname + window.location.search)}`; + } else if (error.message.includes("ZuulRuntimeException")) { + window.location.href = + (isEmployee ? `/${window?.contextPath}/employee/user/error` : `/${window?.contextPath}/citizen/error`) + + `?type=notfound&from=${encodeURIComponent(window.location.pathname + window.location.search)}`; + } + } + } + throw err; + } +); + +const requestInfo = () => ({ + authToken: Digit.UserService.getUser()?.access_token || null, +}); + +const authHeaders = () => ({ + "auth-token": Digit.UserService.getUser()?.access_token || null, +}); + +const userServiceData = () => ({ userInfo: Digit.UserService.getUser()?.info }); + +window.Digit = window.Digit || {}; +window.Digit = { ...window.Digit, RequestCache: window.Digit.RequestCache || {} }; +export const Request = async ({ + method = "POST", + url, + data = {}, + headers = {}, + useCache = false, + params = {}, + auth, + urlParams = {}, + userService, + locale = true, + authHeader = false, + setTimeParam = true, + userDownload = false, + noRequestInfo = false, + multipartFormData = false, + multipartData = {}, + reqTimestamp = false, +}) => { + const ts = new Date().getTime(); + if (method.toUpperCase() === "POST") { + + data.RequestInfo = { + apiId: "Rainmaker", + }; + if (auth || !!Digit.UserService.getUser()?.access_token) { + data.RequestInfo = { ...data.RequestInfo, ...requestInfo() }; + } + if (userService) { + data.RequestInfo = { ...data.RequestInfo, ...userServiceData() }; + } + if (locale) { + data.RequestInfo = { ...data.RequestInfo, msgId: `${ts}|${Digit.StoreData.getCurrentLanguage()}` }; + } + + if (noRequestInfo) { + delete data.RequestInfo; + } + + /* + Feature :: Privacy + + Desc :: To send additional field in HTTP Requests inside RequestInfo Object as plainAccessRequest + */ + const privacy = Digit.Utils.getPrivacyObject(); + if (privacy && !url.includes("/edcr/rest/dcr/")) { + if(!noRequestInfo){ + data.RequestInfo = { ...data.RequestInfo, plainAccessRequest: { ...privacy } }; + } + } + } + + const headers1 = { + "Content-Type": "application/json", + Accept: window?.globalConfigs?.getConfig("ENABLE_SINGLEINSTANCE") ? "application/pdf,application/json" : "application/pdf", + }; + + if (authHeader) headers = { ...headers, ...authHeaders() }; + + if (userDownload) headers = { ...headers, ...headers1 }; + + let key = ""; + if (useCache) { + key = `${method.toUpperCase()}.${url}.${btoa(escape(JSON.stringify(params, null, 0)))}.${btoa(escape(JSON.stringify(data, null, 0)))}`; + const value = window.Digit.RequestCache[key]; + if (value) { + return value; + } + } else if (setTimeParam) { + params._ = Date.now(); + } + if (reqTimestamp) { + data.RequestInfo = { ...data.RequestInfo, ts: Number(ts) }; + } + + let _url = url + .split("/") + .map((path) => { + let key = path.split(":")?.[1]; + return urlParams[key] ? urlParams[key] : path; + }) + .join("/"); + + if (multipartFormData) { + const multipartFormDataRes = await Axios({ + method, + url: _url, + data: multipartData.data, + params, + headers: { "Content-Type": "multipart/form-data", "auth-token": Digit.UserService.getUser()?.access_token || null }, + }); + return multipartFormDataRes; + } + /* + Feature :: Single Instance + + Desc :: Fix for central instance to send tenantID in all query params + */ + const tenantInfo = + Digit.SessionStorage.get("userType") === "citizen" + ? Digit.ULBService.getStateId() + : Digit.ULBService.getCurrentTenantId() || Digit.ULBService.getStateId(); + if (!params["tenantId"] && window?.globalConfigs?.getConfig("ENABLE_SINGLEINSTANCE")) { + params["tenantId"] = tenantInfo; + } + + const res = userDownload + ? await Axios({ method, url: _url, data, params, headers, responseType: "arraybuffer" }) + : await Axios({ method, url: _url, data, params, headers }); + + if (userDownload) return res; + + const returnData = res?.data || res?.response?.data || {}; + if (useCache && res?.data && Object.keys(returnData).length !== 0) { + window.Digit.RequestCache[key] = returnData; + } + return returnData; +}; + +/** + * + * @param {*} serviceName + * + * preHook: + * ({params, data}) => ({params, data}) + * + * postHook: + * ({resData}) => ({resData}) + * + */ + +export const ServiceRequest = async ({ + serviceName, + method = "POST", + url, + data = {}, + headers = {}, + useCache = false, + params = {}, + auth, + reqTimestamp, + userService, +}) => { + const preHookName = `${serviceName}Pre`; + const postHookName = `${serviceName}Post`; + + let reqParams = params; + let reqData = data; + if (window[preHookName] && typeof window[preHookName] === "function") { + let preHookRes = await window[preHookName]({ params, data }); + reqParams = preHookRes.params; + reqData = preHookRes.data; + } + const resData = await Request({ method, url, data: reqData, headers, useCache, params: reqParams, auth, userService,reqTimestamp }); + + if (window[postHookName] && typeof window[postHookName] === "function") { + return await window[postHookName](resData); + } + return resData; +}; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/services/atoms/Utils/Storage.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/atoms/Utils/Storage.js new file mode 100644 index 00000000000..e53725bb611 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/atoms/Utils/Storage.js @@ -0,0 +1,55 @@ +const localStoreSupport = () => { + try { + return "sessionStorage" in window && window["sessionStorage"] !== null; + } catch (e) { + return false; + } +}; + +const k = (key) => `Digit.${key}`; +const getStorage = (storageClass) => ({ + get: (key) => { + if (localStoreSupport() && key) { + let valueInStorage = storageClass.getItem(k(key)); + if (!valueInStorage || valueInStorage === "undefined") { + return null; + } + const item = JSON.parse(valueInStorage); + if (Date.now() > item.expiry) { + storageClass.removeItem(k(key)); + return null; + } + return item.value; + } else if (typeof window !== "undefined") { + return window?.eGov?.Storage && window.eGov.Storage[k(key)].value; + } else { + return null; + } + }, + set: (key, value, ttl = 86400) => { + const item = { + value, + ttl, + expiry: Date.now() + ttl * 1000, + }; + if (localStoreSupport()) { + storageClass.setItem(k(key), JSON.stringify(item)); + } else if (typeof window !== "undefined") { + window.eGov = window.eGov || {}; + window.eGov.Storage = window.eGov.Storage || {}; + window.eGov.Storage[k(key)] = item; + } + }, + del: (key) => { + if (localStoreSupport()) { + storageClass.removeItem(k(key)); + } else if (typeof window !== "undefined") { + window.eGov = window.eGov || {}; + window.eGov.Storage = window.eGov.Storage || {}; + delete window.eGov.Storage[k(key)]; + } + }, +}); + +export const Storage = getStorage(window.sessionStorage); +export const PersistantStorage = getStorage(window.localStorage); diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/services/atoms/urls.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/atoms/urls.js new file mode 100644 index 00000000000..8f48cc54f81 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/atoms/urls.js @@ -0,0 +1,225 @@ +const Urls = { + MDMS: `/egov-mdms-service/v1/_search`, + WorkFlow: `/egov-workflow-v2/egov-wf/businessservice/_search`, + WorkFlowProcessSearch: `/egov-workflow-v2/egov-wf/process/_search`, + localization: `/localization/messages/v1/_search`, + location: { + localities: `/egov-location/location/v11/boundarys/_search?hierarchyTypeCode=ADMIN&boundaryType=Locality`, + wards: `/egov-location/location/v11/boundarys/_search?hierarchyTypeCode=ADMIN&boundaryType=Ward`, + revenue_localities: `/egov-location/location/v11/boundarys/_search?hierarchyTypeCode=REVENUE&boundaryType=Locality`, + }, + + pgr_search: `/pgr-services/v2/request/_search`, + pgr_update: `/pgr-services/v2/request/_update`, + filter_data: `https://run.mocky.io/v3/597a50a0-90e5-4a45-b82e-8a2186b760bd`, + FileStore: "/filestore/v1/files", + + FileFetch: "/filestore/v1/files/url", + PGR_Create: `/pgr-services/v2/request/_create`, + pgr_count: `/pgr-services/v2/request/_count`, + + OTP_Send: "/user-otp/v1/_send", + Authenticate: "/user/oauth/token", + RegisterUser: "/user/citizen/_create", + ChangePassword: "/user/password/nologin/_update", + ChangePassword1: "/user/password/_update", + UserProfileUpdate: "/user/profile/_update", + EmployeeSearch: "/egov-hrms/employees/_search", + + InboxSearch: "/works-inbox-service/v2/_search", + + UserSearch: "/user/_search", + UserLogout: "/user/_logout", + + Shortener: "/egov-url-shortening/shortener", + + works: { + create:"/loi-service/v1/_create", + estimateSearch:"/estimate-service/estimate/v1/_search", + loiSearch:"/loi-service/v1/_search", + createEstimate:"/estimate-service/estimate/v1/_create", + approvedEstimateSearch:"/estimate-service/estimate/v1/_search", + searchEstimate:"/estimate-service/estimate/v1/_search", + updateLOI:"/loi-service/v1/_update", + updateEstimate:"/estimate-service/estimate/v1/_update", + download_pdf:"/egov-pdf/download/WORKSESTIMATE/estimatepdf" + }, + + fsm: { + search: "/fsm/v1/_search", + create: "/fsm/v1/_create", + update: "/fsm/v1/_update", + vendorSearch: "/vendor/v1/_search", + vehicleSearch: "/vehicle/v1/_search", + audit: "/fsm/v1/_audit", + vehicleTripSearch: "/vehicle/trip/v1/_search", + billingSlabSearch: "/fsm-calculator/v1/billingSlab/_search", + vehilceUpdate: "/vehicle/trip/v1/_update", + createVendor: "/vendor/v1/_create", + updateVendor: "/vendor/v1/_update", + createVehicle: "/vehicle/v1/_create", + updateVehicle: "/vehicle/v1/_update", + driverSearch: "/vendor/driver/v1/_search", + createDriver: "/vendor/driver/v1/_create", + updateDriver: "/vendor/driver/v1/_update", + vehicleTripCreate: "/vehicle/trip/v1/_create", + }, + + payment: { + fetch_bill: "/billing-service/bill/v2/_fetchbill", + demandSearch: "/billing-service/demand/_search", + create_reciept: "/collection-services/payments/_create", + print_reciept: "/collection-services/payments", + generate_pdf: "/pdf-service/v1/_create", + create_citizen_reciept: "/pg-service/transaction/v1/_create", + update_citizen_reciept: "/pg-service/transaction/v1/_update", + search_bill: "/billing-service/bill/v2/_search", + reciept_search: "/collection-services/payments/:buisnessService/_search", + obps_Reciept_Search: "/collection-services/payments/_search", + billAmendmentSearch: "/billing-service/amendment/_search", + getBulkPdfRecordsDetails: "/pdf-service/v1/_getBulkPdfRecordsDetails", + }, + + pt: { + fectch_property: "/property-services/property/_search", + fetch_payment_details: "/billing-service/bill/v2/_fetchbill", + create: "/property-services/property/_create", + search: "/property-services/property/_search", + update: "/property-services/property/_update", + pt_calculation_estimate: "/pt-calculator-v2/propertytax/v2/_estimate", + assessment_create: "/property-services/assessment/_create", + assessment_search: "/property-services/assessment/_search", + payment_search: "/collection-services/payments/PT/_search", + pt_calculate_mutation: "/pt-calculator-v2/propertytax/mutation/_calculate", + }, + + dss: { + dashboardConfig: "/dashboard-analytics/dashboard/getDashboardConfig", + getCharts: "/dashboard-analytics/dashboard/getChartV2", + }, + + mcollect: { + search: "/echallan-services/eChallan/v1/_search", + create: "/echallan-services/eChallan/v1/_create?", + fetch_bill: "/billing-service/bill/v2/_fetchbill?", + search_bill: "/egov-searcher/bill-genie/mcollectbills/_get", + search_bill_pt: "/egov-searcher/bill-genie/billswithaddranduser/_get", + update: "/echallan-services/eChallan/v1/_update", + download_pdf: "/egov-pdf/download/UC/mcollect-challan", + receipt_download: "/egov-pdf/download/PAYMENT/consolidatedreceipt", + bill_download: "/egov-pdf/download/BILL/consolidatedbill", + count: "/echallan-services/eChallan/v1/_count", + }, + hrms: { + search: "/egov-hrms/employees/_search", + count: "/egov-hrms/employees/_count", + create: "/egov-hrms/employees/_create", + update: "/egov-hrms/employees/_update", + }, + tl: { + create: "/tl-services/v1/_create", + search: "/tl-services/v1/_search", + fetch_payment_details: "/billing-service/bill/v2/_fetchbill", + download_pdf: "/egov-pdf/download/TL/", + update: "/tl-services/v1/_update", + billingslab: "/tl-calculator/billingslab/_search", + }, + receipts: { + receipt_download: "/egov-pdf/download/PAYMENT/consolidatedreceipt", + payments: "/collection-services/payments", + count: "/egov-hrms/employees/_count", + }, + obps: { + scrutinyDetails: "/edcr/rest/dcr/scrutinydetails", + comparisionReport: "/edcr/rest/dcr/occomparison", + create: "/bpa-services/v1/bpa/_create", + nocSearch: "/noc-services/v1/noc/_search", + updateNOC: "/noc-services/v1/noc/_update", + update: "/bpa-services/v1/bpa/_update", + bpaSearch: "/bpa-services/v1/bpa/_search", + bpaRegSearch: "/tl-services/v1/BPAREG/_search", + bpaRegCreate: "/tl-services/v1/BPAREG/_create", + bpaRegGetBill: "/tl-calculator/v1/BPAREG/_getbill", + bpaRegUpdate: "/tl-services/v1/BPAREG/_update", + receipt_download: "/egov-pdf/download/PAYMENT/consolidatedreceipt", + edcrreportdownload: "/bpa-services/v1/bpa/_permitorderedcr", + getSearchDetails: "/inbox/v1/dss/_search" + }, + + edcr: { + create: "/edcr/rest/dcr/scrutinize", + }, + + events: { + search: "/egov-user-event/v1/events/_search", + update: "/egov-user-event/v1/events/lat/_update", + updateEvent: "/egov-user-event/v1/events/_update", + updateEventCDG: "/egov-user-event/v1/events/lat/_update", + count: "/egov-user-event/v1/events/notifications/_count", + create: "/egov-user-event/v1/events/_create", + }, + + ws: { + water_create: "/ws-services/wc/_create", + sewarage_create: "/sw-services/swc/_create", + water_search: "/ws-services/wc/_search", + sewarage_search: "/sw-services/swc/_search", + water_update: "/ws-services/wc/_update", + sewarage_update: "/sw-services/swc/_update", + ws_calculation_estimate: "/ws-calculator/waterCalculator/_estimate", + sw_calculation_estimate: "/sw-calculator/sewerageCalculator/_estimate", + ws_connection_search: "/ws-calculator/meterConnection/_search", + sw_payment_search: "/collection-services/payments/SW/_search", + ws_payment_search: "/collection-services/payments/WS/_search", + billAmendmentCreate: "/billing-service/amendment/_create", + billAmendmentUpdate: "/billing-service/amendment/_update", + ws_meter_conncetion_create: "/ws-calculator/meterConnection/_create", + sw_meter_conncetion_create: "/sw-calculator/meterConnection/_create", + wns_group_bill: "/egov-pdf/download/WNS/wnsgroupbill", + cancel_group_bill: "/pdf-service/v1/_cancelProcess", + wns_generate_pdf: "/egov-pdf/download/WNS/wnsbill", + water_applyAdhocTax : "/ws-calculator/waterCalculator/_applyAdhocTax", + sewerage_applyAdhocTax: "/sw-calculator/sewerageCalculator/_applyAdhocTax", + getSearchDetails: "/inbox/v1/dss/_search", + }, + + engagement: { + document: { + search: "/egov-document-uploader/egov-du/document/_search", + create: "/egov-document-uploader/egov-du/document/_create", + delete: "/egov-document-uploader/egov-du/document/_delete", + update: "/egov-document-uploader/egov-du/document/_update", + }, + surveys: { + create: "/egov-survey-services/egov-ss/survey/_create", + update: "/egov-survey-services/egov-ss/survey/_update", + search: "/egov-survey-services/egov-ss/survey/_search", + delete: "/egov-survey-services/egov-ss/survey/_delete", + submitResponse: "/egov-survey-services/egov-ss/survey/response/_submit", + showResults: "/egov-survey-services/egov-ss/survey/response/_results", + }, + }, + + attendencemgmt: { + mustorRoll: { + estimate: "/muster-roll/v1/_estimate", + create: "/muster-roll/v1/_create", + update: "/muster-roll/v1/_update", + search: "/muster-roll/v1/_search" + } + }, + + noc: { + nocSearch: "/noc-services/v1/noc/_search", + }, + reports: { + reportSearch: "/report/", + }, + bills:{ + cancelBill:"/billing-service/bill/v2/_cancelbill" + }, + access_control: "/access/v1/actions/mdms/_get", + billgenie: "/egov-searcher", +}; + +export default Urls; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/Access.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/Access.js new file mode 100644 index 00000000000..cbc74bc6fdd --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/Access.js @@ -0,0 +1,21 @@ +import { ServiceRequest } from "../atoms/Utils/Request"; +import Urls from "../atoms/urls"; + +const AccessControlService = { + getAccessControl: (roles = []) => + ServiceRequest({ + url: Urls.access_control, + method: "POST", + auth: true, + useCache: true, + userService: true, + data: { + roleCodes: roles, + tenantId: Digit.ULBService.getStateId(), + actionMaster: "actions-test", + enabled: true, + }, + reqTimestamp: true, + }), +}; +export default AccessControlService; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/ApplicationUpdateActionsCustom.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/ApplicationUpdateActionsCustom.js new file mode 100644 index 00000000000..1477fc981fe --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/ApplicationUpdateActionsCustom.js @@ -0,0 +1,14 @@ +import { CustomService } from "./CustomService"; + + +const ApplicationUpdateActionsCustom = async ({ url, body }) => { + try { + //here need to update this object to send + const response = await CustomService.getResponse({ url, body,useCache:false,setTimeParam:false }); + return response; + } catch (error) { + throw new Error(error?.response?.data?.Errors[0].message); + } +}; + +export default ApplicationUpdateActionsCustom; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/Bill.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/Bill.js new file mode 100644 index 00000000000..37c198bfa60 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/Bill.js @@ -0,0 +1,34 @@ +import Urls from "../atoms/urls"; +import { Request } from "../atoms/Utils/Request"; + +const BillingService = { + search_bill: ({ tenantId, filters }) => + Request({ + url: `${Urls.billgenie}${filters.url}`, + useCache: false, + method: "POST", + data: { + searchCriteria: { + tenantId: tenantId, + ...filters, + }, + }, + auth: true, + userService: false, + }), + cancel_bill:(filters) => + Request({ + url: Urls?.bills?.cancelBill, + useCache: false, + method: "POST", + data: { + UpdateBillCriteria: { + ...filters, + }, + }, + auth: true, + userService: false, + }), +} + +export default BillingService diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/Complaint.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/Complaint.js new file mode 100644 index 00000000000..6fc521f467f --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/Complaint.js @@ -0,0 +1,87 @@ +export const Complaint = { + create: async ({ + cityCode, + complaintType, + description, + landmark, + city, + district, + region, + state, + pincode, + localityCode, + localityName, + uploadedImages, + mobileNumber, + name, + }) => { + const tenantId = Digit.ULBService.getCurrentTenantId(); + const defaultData = { + service: { + tenantId: cityCode, + serviceCode: complaintType, + description: description, + additionalDetail: {}, + source: Digit.Utils.browser.isWebview() ? "mobile" : "web", + address: { + landmark: landmark, + city: city, + district: district, + region: region, + state: state, + pincode: pincode, + locality: { + code: localityCode, + name: localityName, + }, + geoLocation: {}, + }, + }, + workflow: { + action: "APPLY", + verificationDocuments: uploadedImages, + }, + }; + + if (Digit.SessionStorage.get("user_type") === "employee") { + defaultData.service.citizen = { + name: name, + type: "CITIZEN", + mobileNumber: mobileNumber, + roles: [ + { + id: null, + name: "Citizen", + code: "CITIZEN", + tenantId: tenantId, + }, + ], + tenantId: tenantId, + }; + } + const response = await Digit.PGRService.create(defaultData, cityCode); + return response; + }, + + assign: async (complaintDetails, action, employeeData, comments, uploadedDocument, tenantId) => { + complaintDetails.workflow.action = action; + complaintDetails.workflow.assignes = employeeData ? [employeeData.uuid] : null; + complaintDetails.workflow.comments = comments; + uploadedDocument + ? (complaintDetails.workflow.verificationDocuments = [ + { + documentType: "PHOTO", + fileStoreId: uploadedDocument, + documentUid: "", + additionalDetails: {}, + }, + ]) + : null; + + if (!uploadedDocument) complaintDetails.workflow.verificationDocuments = []; + + //TODO: get tenant id + const response = await Digit.PGRService.update(complaintDetails, tenantId); + return response; + }, +}; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/ComponentRegistry.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/ComponentRegistry.js new file mode 100644 index 00000000000..2d8c5c23d63 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/ComponentRegistry.js @@ -0,0 +1,19 @@ +import ComponentRegistry from "../../utils/componentRegistry"; +const componentRegistry = new ComponentRegistry(); + +export const ComponentRegistryService = { + getComponent: (id) => { + return componentRegistry.getComponent(id); + }, + + setComponent: (id, component = {}) => { + return componentRegistry.setComponent(id, component); + }, + + setupRegistry: (components) => { + // should be call only once at the starting + return componentRegistry.setAllComponents(components); + }, + + getRegistry: () => componentRegistry, +}; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/CustomService.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/CustomService.js new file mode 100644 index 00000000000..994b087f137 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/CustomService.js @@ -0,0 +1,19 @@ +import { Request } from "../atoms/Utils/Request"; + +export const CustomService = { + getResponse: ({ url, params, body, plainAccessRequest,useCache=true,userService=true,setTimeParam=true,userDownload=false}) => + Request({ + url: url, + data: body, + useCache, + userService, + method: "POST", + auth: true, + params: params, + plainAccessRequest: plainAccessRequest, + userDownload:userDownload, + setTimeParam + }) +}; + + diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/DSS.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/DSS.js new file mode 100644 index 00000000000..fe9f2cf0a7b --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/DSS.js @@ -0,0 +1,45 @@ +import { getCustomFiltersDynamicValues, getFilterOptionsForConfig } from "../../utils/dss"; +import Urls from "../atoms/urls"; +import { Request } from "../atoms/Utils/Request"; +import { MdmsService } from "./MDMS"; + +export const DSSService = { + getDashboardConfig: (moduleCode) => + Request({ + url: Urls.dss.dashboardConfig + `/${moduleCode}`, + useCache: false, + userService: false, + method: "GET", + authHeader: true, + }), + getCharts: (data) => + Request({ + url: Urls.dss.getCharts, + useCache: false, + userService: false, + method: "POST", + auth: true, + data, + }), + getFiltersConfigData: (data) => getFilterOptionsForConfig(data), + getCustomFiltersDynamicValues: async (data) => { + let tenantId = Digit.ULBService.getCurrentTenantId() || Digit.ULBService.getStateId(); + let mdmsResp = await MdmsService.call(tenantId, { + moduleDetails: [ + { + moduleName: "dss-dashboard", + masterDetails: [ + { + name: "CustomFilterValues", + }, + ], + }, + ] + }) + if (!mdmsResp) mdmsResp = {}; + if (!mdmsResp?.tenantId) { + _.set(mdmsResp, 'tenantId', tenantId) + } + return getCustomFiltersDynamicValues(data, mdmsResp); + } +}; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/Engagement.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/Engagement.js new file mode 100644 index 00000000000..e0f1bdfac79 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/Engagement.js @@ -0,0 +1,42 @@ +import Urls from "../atoms/urls"; +import { Request } from "../atoms/Utils/Request"; + +export const Engagement = { + search: (filters = {}) => + Request({ + url: Urls.engagement.document.search, + useCache: false, + method: "POST", + auth: true, + userService: false, + params: { ...filters }, + }), + create: (details) => + Request({ + url: Urls.engagement.document.create, + data: details, + useCache: true, + userService: true, + method: "POST", + auth: true, + locale: true + }), + delete: (details) => + Request({ + url: Urls.engagement.document.delete, + data: details, + useCache: true, + userService: true, + method: "POST", + auth: true, + }), + update: (details) => + Request({ + url: Urls.engagement.document.update, + data: details, + useCache: true, + userService: true, + method: "POST", + auth: true, + }), +}; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/Events.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/Events.js new file mode 100644 index 00000000000..047b4fe33e7 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/Events.js @@ -0,0 +1,64 @@ +import Urls from "../atoms/urls"; +import { Request } from "../atoms/Utils/Request"; + +const Events = { + Search: ({tenantId, data, filter= {}, auth = false}) => { + // const userType = Digit.UserService.getType(); + // if(userType==="employee") auth = true + // else auth = false + //reverting these changes as it is working fine without sending authToken + return Request({ + url: Urls.events.search, + useCache: false, + data: data, + method: "POST", + auth, + userService: false, + params: { tenantId, ...filter }, + }) + }, + ClearNotification: ({tenantId}) => Request({ + url: Urls.events.update, + useCache: false, + method: "POST", + auth: true, + userService: false, + params: { tenantId }, + }), + NotificationCount: ({tenantId}) => Request({ + url: Urls.events.count, + useCache: false, + method: "POST", + auth: true, + userService: false, + params: { tenantId }, + }), + Create: (data) => + Request({ + url: Urls.events.create, + useCache: false, + method: "POST", + auth: true, + data: data, + userService: false, + }), + Update: (data) => + Request({ + url: window?.globalConfigs?.getConfig("ENABLE_SINGLEINSTANCE") ? Urls.events.updateEventCDG : Urls.events.updateEvent , + useCache: false, + method: "POST", + auth: true, + data: data, + userService: false, + }), + EventDetails: async (tenantId, filter) => { + const eventRes = await Events.Search({ tenantId, filter }); + if (eventRes?.events?.length < 1) return; + const [event] = eventRes?.events; + const fileStoresIds = event?.eventDetails?.documents?.map(document => document?.fileStoreId); + const uploadedFilesData = fileStoresIds?.length > 0 ? await Digit.UploadServices.Filefetch(fileStoresIds, tenantId) : null + return {...event, uploadedFilesData} + } +} + +export default Events \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/HRMS.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/HRMS.js new file mode 100644 index 00000000000..1fe9a3f4267 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/HRMS.js @@ -0,0 +1,46 @@ +import { roundToNearestMinutes } from "date-fns/esm"; +import Urls from "../atoms/urls"; +import { Request } from "../atoms/Utils/Request"; + +const HrmsService = { + search: (tenantId, filters, searchParams) => + Request({ + url: Urls.hrms.search, + useCache: false, + method: "POST", + auth: true, + userService: true, + params: { tenantId, ...filters, ...searchParams }, + }), + create: (data, tenantId) => + Request({ + data: data, + url: Urls.hrms.create, + useCache: false, + method: "POST", + auth: true, + userService: true, + params: { tenantId }, + }), + update: (data, tenantId) => + Request({ + data: data, + url: Urls.hrms.update, + useCache: false, + method: "POST", + auth: true, + userService: true, + params: { tenantId }, + }), + count: (tenantId) => + Request({ + url: Urls.hrms.count, + useCache: false, + method: "POST", + auth: true, + userService: true, + params: { tenantId }, + }), +}; + +export default HrmsService; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/InboxService.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/InboxService.js new file mode 100644 index 00000000000..6b6b45e8d51 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/InboxService.js @@ -0,0 +1,15 @@ +import Urls from "../atoms/urls"; +import { Request } from "../atoms/Utils/Request"; + +export const InboxGeneral = { + Search: ({ ...filters }) =>{ + return Request({ + url: Urls.InboxSearch, + useCache: false, + method: "POST", + auth: true, + userService: true, + data: { ...filters }, + }) + }, +}; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/Localities.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/Localities.js new file mode 100644 index 00000000000..0ef16e7acaf --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/Localities.js @@ -0,0 +1,25 @@ +import { LocalizationService } from "./Localization/service"; + +const ADMIN_CODE = ({ tenantId, hierarchyType }) => { + return tenantId.replace(".", "_").toUpperCase() + "_" + hierarchyType.code; +}; + +const getI18nKeys = (localitiesWithLocalizationKeys) => { + return localitiesWithLocalizationKeys.map((locality) => ({ + code: locality.code, + message: locality.name, + })); +}; + +const getLocalities = (tenantBoundry) => { + const adminCode = ADMIN_CODE(tenantBoundry); + const localitiesWithLocalizationKeys = tenantBoundry.boundary.map((boundaryObj) => ({ + ...boundaryObj, + i18nkey: adminCode + "_" + boundaryObj.code, + })); + return localitiesWithLocalizationKeys; +}; + +export const LocalityService = { + get: (tenantBoundry) => getLocalities(tenantBoundry), +}; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/Localization/service.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/Localization/service.js new file mode 100644 index 00000000000..993767db43e --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/Localization/service.js @@ -0,0 +1,93 @@ +import Urls from "../../atoms/urls"; +import { PersistantStorage } from "../../atoms/Utils/Storage"; +import i18next from "i18next"; +import { Request } from "../../atoms/Utils/Request"; +import { ApiCacheService } from "../../atoms/ApiCacheService"; + +const LOCALE_LIST = (locale) => `Locale.${locale}.List`; +const LOCALE_ALL_LIST = () => `Locale.List`; +const LOCALE_MODULE = (locale, module) => `Locale.${locale}.${module}`; + +const TransformArrayToObj = (traslationList) => { + return traslationList.reduce( + // eslint-disable-next-line + (obj, item) => ((obj[item.code] = item.message), obj), + {} + ); + // return trasformedTraslation; +}; + +const getUnique = (arr) => { + return arr.filter((value, index, self) => self.indexOf(value) === index); +}; + +const LocalizationStore = { + getCaheData: (key) => PersistantStorage.get(key), + setCacheData: (key, value) => { + const cacheSetting = ApiCacheService.getSettingByServiceUrl(Urls.localization); + PersistantStorage.set(key, value, cacheSetting.cacheTimeInSecs); + }, + getList: (locale) => LocalizationStore.getCaheData(LOCALE_LIST(locale)) || [], + setList: (locale, namespaces) => LocalizationStore.setCacheData(LOCALE_LIST(locale), namespaces), + getAllList: () => LocalizationStore.getCaheData(LOCALE_ALL_LIST()) || [], + setAllList: (namespaces) => LocalizationStore.setCacheData(LOCALE_ALL_LIST(), namespaces), + store: (locale, modules, messages) => { + const AllNamespaces = LocalizationStore.getAllList(); + const Namespaces = LocalizationStore.getList(locale); + modules.forEach((module) => { + if (!Namespaces.includes(module)) { + Namespaces.push(module); + const moduleMessages = messages.filter((message) => message.module === module); + LocalizationStore.setCacheData(LOCALE_MODULE(locale, module), moduleMessages); + } + }); + LocalizationStore.setCacheData(LOCALE_LIST(locale), Namespaces); + LocalizationStore.setAllList(getUnique([...AllNamespaces, ...Namespaces])); + }, + get: (locale, modules) => { + const storedModules = LocalizationStore.getList(locale); + const newModules = modules.filter((module) => !storedModules.includes(module)); + const messages = []; + storedModules.forEach((module) => { + messages.push(...LocalizationStore.getCaheData(LOCALE_MODULE(locale, module))); + }); + return [newModules, messages]; + }, + + updateResources: (locale, messages) => { + let locales = TransformArrayToObj(messages); + i18next.addResources(locale, "translations", locales); + }, +}; + +export const LocalizationService = { + getLocale: async ({ modules = [], locale = Digit.Utils.getDefaultLanguage(), tenantId }) => { + if (locale.indexOf(Digit.Utils.getLocaleRegion()) === -1) { + locale += Digit.Utils.getLocaleRegion(); + } + const [newModules, messages] = LocalizationStore.get(locale, modules); + if (newModules.length > 0) { + const data = await Request({ url: Urls.localization, params: { module: newModules.join(","), locale, tenantId }, useCache: false }); + messages.push(...data.messages); + setTimeout(() => LocalizationStore.store(locale, newModules, data.messages), 100); + } + LocalizationStore.updateResources(locale, messages); + return messages; + }, + changeLanguage: (locale, tenantId) => { + const modules = LocalizationStore.getList(locale); + const allModules = LocalizationStore.getAllList(); + const uniqueModules = allModules.filter((module) => !modules.includes(module)); + LocalizationService.getLocale({ modules: uniqueModules, locale, tenantId }); + localStorage.setItem("Employee.locale", locale); + localStorage.setItem("Citizen.locale", locale); + Digit.SessionStorage.set("locale", locale); + i18next.changeLanguage(locale); + }, + updateResources: (locale = Digit.Utils.getDefaultLanguage(), messages) => { + if (locale.indexOf(Digit.Utils.getLocaleRegion()) === -1) { + locale += Digit.Utils.getLocaleRegion(); + } + LocalizationStore.updateResources(locale, messages); + }, +}; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/Location.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/Location.js new file mode 100644 index 00000000000..02634225055 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/Location.js @@ -0,0 +1,30 @@ +import Urls from "../atoms/urls"; +import { ServiceRequest } from "../atoms/Utils/Request"; + +export const LocationService = { + getLocalities: (tenantId) => { + return ServiceRequest({ + serviceName: "getLocalities", + url: Urls.location.localities, + params: { tenantId: tenantId }, + useCache: true, + }); + }, + getRevenueLocalities: async (tenantId) => { + const response = await ServiceRequest({ + serviceName: "getRevenueLocalities", + url: Urls.location.revenue_localities, + params: { tenantId: tenantId }, + useCache: true, + }); + return response; + }, + getWards: (tenantId) => { + return ServiceRequest({ + serviceName: "getWards", + url: Urls.location.wards, + params: { tenantId: tenantId }, + useCache: true, + }); + } +}; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/Login.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/Login.js new file mode 100644 index 00000000000..c02ecf6c01b --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/Login.js @@ -0,0 +1,50 @@ +import Axios from "axios"; +import Urls from "../atoms/urls"; +import { Request } from "../atoms/Utils/Request"; + +export const LoginService = { + sendOtp: (details, stateCode) => + Request({ + url: Urls.OTP_Send, + data: details, + auth: false, + method: "POST", + params: { tenantId: stateCode }, + }), + authenticate: async (details, stateCode) => { + const params = new URLSearchParams(); + Object.entries(details).forEach(([key, value]) => params.append(key, value)); + params.append("scope", "read"); + params.append("grant_type", "password"); + const config = { + url: Urls.Authenticate, + method: "post", + params, + headers: { + authorization: `Basic ${window?.globalConfigs?.getConfig("JWT_TOKEN")||"ZWdvdi11c2VyLWNsaWVudDo="}`, + "Content-Type": "application/x-www-form-urlencoded", + }, + }; + + return Axios(config); + }, + registerUser: async (details, stateCode) => + Request({ + url: Urls.Register_User, + data: { + User: details, + }, + method: "POST", + params: { tenantId: stateCode }, + }), + updateUser: async (details, stateCode) => + Request({ + url: Urls.UserProfileUpdate, + auth: true, + data: { + user: details, + }, + method: "POST", + params: { tenantId: stateCode }, + }), +}; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/MDMS.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/MDMS.js new file mode 100644 index 00000000000..8f791f7503f --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/MDMS.js @@ -0,0 +1,1730 @@ +//HAVE TO CHANGE THI +import { ApiCacheService } from "../atoms/ApiCacheService"; +import Urls from "../atoms/urls"; +import { Request, ServiceRequest } from "../atoms/Utils/Request"; +import { PersistantStorage } from "../atoms/Utils/Storage"; + +// export const stringReplaceAll = (str = "", searcher = "", replaceWith = "") => { +// if (searcher == "") return str; +// while (str.includes(searcher)) { +// str = str.replace(searcher, replaceWith); +// } +// return str; +// }; + +const SortByName = (na, nb) => { + if (na < nb) { + return -1; + } + if (na > nb) { + return 1; + } + return 0; +}; + +const GetCitiesWithi18nKeys = (MdmsRes, moduleCode) => { + const cityList = (MdmsRes.tenant.citymodule && MdmsRes.tenant.citymodule.find((module) => module.code === moduleCode).tenants) || []; + const citiesMap = cityList.map((city) => city.code); + const cities = MdmsRes.tenant.tenants + .filter((city) => citiesMap.includes(city.code)) + .map(({ code, name, logoId, emailId, address, contactNumber }) => ({ + code, + name, + logoId, + emailId, + address, + contactNumber, + i18nKey: "TENANT_TENANTS_" + code.replace(".", "_").toUpperCase(), + })) + .sort((cityA, cityB) => { + const na = cityA.name.toLowerCase(), + nb = cityB.name.toLowerCase(); + return SortByName(na, nb); + }); + return cities; +}; + +const initRequestBody = (tenantId) => ({ + MdmsCriteria: { + tenantId, + moduleDetails: [ + { + moduleName: "common-masters", + masterDetails: [{ name: "Department" }, { name: "Designation" }, { name: "StateInfo" }, { name: "wfSlaConfig" }, { name: "uiHomePage" }], + }, + { + moduleName: "tenant", + masterDetails: [{ name: "tenants" }, { name: "citymodule" }], + }, + { + moduleName: "DIGIT-UI", + masterDetails: [{ name: "ApiCachingSettings" }], + }, + ], + }, +}); + +const getCriteria = (tenantId, moduleDetails) => { + return { + MdmsCriteria: { + tenantId, + ...moduleDetails, + }, + }; +}; + +export const getGeneralCriteria = (tenantId, moduleCode, type) => ({ + details: { + moduleDetails: [ + { + moduleName: moduleCode, + masterDetails: [ + { + name: type, + }, + ], + }, + ], + }, +}); + +export const getMultipleTypes = (tenantId, moduleCode, types) => ({ + details: { + moduleDetails: [ + { + moduleName: moduleCode, + masterDetails: types.map((type) => ({ name: type })), + }, + ], + }, +}); +export const getMultipleTypesWithFilter = (moduleCode, masterDetails) => ({ + details: { + moduleDetails: [ + { + moduleName: moduleCode, + masterDetails: masterDetails, + }, + ], + }, +}); + +const getReceiptKey = (tenantId, moduleCode) => ({ + details: { + tenantId, + moduleDetails: [ + { + moduleName: moduleCode, + masterDetails: [ + { + name: "uiCommonPay", + }, + ], + }, + ], + }, +}); + +const getBillsGenieKey = (tenantId, moduleCode) => ({ + details: { + tenantId, + moduleDetails: [ + { + moduleName: moduleCode, + masterDetails: [ + { + name: "BusinessService", + }, + ], + }, + { + moduleName: "tenant", + masterDetails: [{ name: "tenants" }, { name: "citymodule" }], + }, + { + moduleName: "common-masters", + masterDetails: [{name: "uiCommonPay"}] + } + ], + }, +}); + +const getModuleServiceDefsCriteria = (tenantId, moduleCode) => ({ + type: "serviceDefs", + details: { + tenantId: tenantId, + moduleDetails: [ + { + moduleName: `RAINMAKER-${moduleCode}`, + masterDetails: [ + { + name: "ServiceDefs", + }, + ], + }, + ], + }, +}); + +const getSanitationTypeCriteria = (tenantId, moduleCode) => ({ + type: "SanitationType", + details: { + tenantId: tenantId, + moduleDetails: [ + { + moduleName: moduleCode, + masterDetails: [ + { + name: "SanitationType", + filter: null, + }, + ], + }, + ], + }, +}); + +const getPitTypeCriteria = (tenantId, moduleCode) => ({ + type: "PitType", + details: { + tenantId, + moduleDetails: [ + { + moduleName: moduleCode, + masterDetails: [ + { + name: "PitType", + filter: null, + }, + ], + }, + ], + }, +}); + +const getApplicationChannelCriteria = (tenantId, moduleCode) => ({ + type: "ApplicationChannel", + details: { + tenantId: tenantId, + moduleDetails: [ + { + moduleName: moduleCode, + masterDetails: [ + { + name: "ApplicationChannel", + filter: null, + }, + ], + }, + ], + }, +}); + +const getPropertyTypeCriteria = (tenantId, moduleCode, type) => ({ + type, + details: { + tenantId: tenantId, + moduleDetails: [ + { + moduleName: moduleCode, + masterDetails: [ + { + name: "PropertyType", + filter: null, + }, + ], + }, + ], + }, +}); + +const getPropertyUsageCriteria = (tenantId, moduleCode, type) => ({ + type, + details: { + tenantId: tenantId, + moduleDetails: [ + { + moduleName: moduleCode, + masterDetails: [ + { + name: "PropertyType", + filter: null, + }, + ], + }, + ], + }, +}); + +const getCommonFieldsCriteria = (tenantId, moduleCode, type) => ({ + type, + details: { + tenantId, + moduleDetails: [ + { + moduleName: moduleCode, + masterDetails: [ + { + name: "CommonFieldsConfig", + filter: null, + }, + ], + }, + ], + }, +}); + +const getPreFieldsCriteria = (tenantId, moduleCode, type) => ({ + type, + details: { + tenantId, + moduleDetails: [ + { + moduleName: moduleCode, + masterDetails: [ + { + name: "PreFieldsConfig", + filter: null, + }, + ], + }, + ], + }, +}); + +const getPostFieldsCriteria = (tenantId, moduleCode, type) => ({ + type, + details: { + tenantId, + moduleDetails: [ + { + moduleName: moduleCode, + masterDetails: [ + { + name: "PostFieldsConfig", + filter: null, + }, + ], + }, + ], + }, +}); + +const getConfig = (tenantId, moduleCode) => ({ + type: "Config", + details: { + tenantId, + moduleDetails: [ + { + moduleName: moduleCode, + masterDetails: [ + { + name: "Config", + }, + ], + }, + ], + }, +}); + +const getVehicleTypeCriteria = (tenantId, moduleCode, type) => ({ + type, + details: { + tenantId: tenantId, + moduleDetails: [ + { + moduleName: moduleCode, + masterDetails: [ + { + name: "VehicleMakeModel", + filter: null, + }, + ], + }, + ], + }, +}); + +const getChecklistCriteria = (tenantId, moduleCode) => ({ + details: { + tenantId, + moduleDetails: [ + { + moduleName: moduleCode, + masterDetails: [ + { + name: "CheckList", + filter: null, + }, + ], + }, + ], + }, +}); + +const getSlumLocalityCriteria = (tenantId, moduleCode, type) => ({ + type, + details: { + tenantId, + moduleDetails: [ + { + moduleName: moduleCode, + masterDetails: [ + { + name: "Slum", + }, + ], + }, + ], + }, +}); +const getPropertyOwnerTypeCriteria = (tenantId, moduleCode, type) => ({ + type, + details: { + tenantId: tenantId, + moduleDetails: [ + { + moduleName: moduleCode, + masterDetails: [{ name: "OwnerType" }], + }, + ], + }, +}); + +const getSubPropertyOwnerShipCategoryCriteria = (tenantId, moduleCode, type) => ({ + type, + details: { + tenantId: tenantId, + moduleDetails: [ + { + moduleName: moduleCode, + masterDetails: [{ name: "SubOwnerShipCategory" }], + }, + ], + }, +}); +const getPropertyOwnerShipCategoryCriteria = (tenantId, moduleCode, type) => ({ + type, + details: { + tenantId: tenantId, + moduleDetails: [ + { + moduleName: moduleCode, + masterDetails: [{ name: "OwnerShipCategory" }], + }, + ], + }, +}); + +const getTradeOwnerShipCategoryCriteria = (tenantId, moduleCode, type) => ({ + type, + details: { + tenantId: tenantId, + moduleDetails: [ + { + moduleName: moduleCode, + masterDetails: [{ name: "OwnerShipCategory" }], + }, + ], + }, +}); + +const getDocumentRequiredScreenCategory = (tenantId, moduleCode) => ({ + details: { + tenantId: tenantId, + moduleDetails: [ + { + moduleName: moduleCode, + masterDetails: [ + { + name: "Documents", + }, + ], + }, + ], + }, +}); + +const getDefaultMapConfig = (tenantId, moduleCode) => ({ + details: { + tenantId: tenantId, + moduleDetails: [ + { + moduleName: moduleCode, + masterDetails: [ + { + name: "MapConfig", + }, + ], + }, + ], + }, +}); + +const getUsageCategoryList = (tenantId, moduleCode, type) => ({ + type, + details: { + tenantId: tenantId, + moduleDetails: [ + { + moduleName: moduleCode, + masterDetails: [{ name: "UsageCategory" }], + }, + ], + }, +}); + +const getPTPropertyTypeList = (tenantId, moduleCode, type) => ({ + type, + details: { + tenantId: tenantId, + moduleDetails: [ + { + moduleName: moduleCode, + masterDetails: [{ name: "PropertyType" }], + }, + ], + }, +}); + +const getTLStructureTypeList = (tenantId, moduleCode, type) => ({ + type, + details: { + tenantId: tenantId, + moduleDetails: [ + { + moduleName: moduleCode, + masterDetails: [{ name: "StructureType" }], + }, + ], + }, +}); + +const getTLAccessoriesTypeList = (tenantId, moduleCode, type) => ({ + type, + details: { + tenantId: tenantId, + moduleDetails: [ + { + moduleName: moduleCode, + masterDetails: [{ name: "AccessoriesCategory" }], + }, + ], + }, +}); + +const getTLFinancialYearList = (tenantId, moduleCode, type) => ({ + type, + details: { + tenantId: tenantId, + moduleDetails: [ + { + moduleName: moduleCode, + masterDetails: [{ name: "FinancialYear", filter: `[?(@.module == "TL")]` }], + }, + ], + }, +}); + +const getPTFloorList = (tenantId, moduleCode, type) => ({ + type, + details: { + tenantId: tenantId, + moduleDetails: [ + { + moduleName: moduleCode, + masterDetails: [{ name: "Floor" }], + }, + ], + }, +}); + +const getReasonCriteria = (tenantId, moduleCode, type, payload) => ({ + type, + details: { + tenantId, + moduleDetails: [ + { + moduleName: moduleCode, + masterDetails: payload.map((mdmsLoad) => ({ + name: mdmsLoad, + })), + }, + ], + }, +}); + +const getBillingServiceForBusinessServiceCriteria = (filter) => ({ + moduleDetails: [ + { + moduleName: "BillingService", + masterDetails: [ + { name: "BusinessService", filter }, + { + name: "TaxHeadMaster", + }, + { + name: "TaxPeriod", + }, + ], + }, + ], +}); + +const getRoleStatusCriteria = (tenantId, moduleCode, type) => ({ + type, + details: { + tenantId, + moduleDetails: [ + { + moduleName: moduleCode, + masterDetails: [ + { + name: "RoleStatusMapping", + filter: null, + }, + ], + }, + ], + }, +}); +const getRentalDetailsCategoryCriteria = (tenantId, moduleCode) => ({ + details: { + tenantId: tenantId, + moduleDetails: [ + { + moduleName: moduleCode, + masterDetails: [ + { + name: "RentalDetails", + }, + ], + }, + ], + }, +}); + +const getChargeSlabsCategoryCriteria = (tenantId, moduleCode) => ({ + details: { + tenantId: tenantId, + moduleDetails: [ + { + moduleName: moduleCode, + masterDetails: [ + { + name: "ChargeSlabs", + }, + ], + }, + ], + }, +}); + +const getGenderTypeList = (tenantId, moduleCode, type) => ({ + type, + details: { + tenantId, + moduleDetails: [ + { + moduleName: moduleCode, + masterDetails: [ + { + name: "GenderType", + }, + ], + }, + ], + }, +}); + +const getMeterStatusTypeList = (tenantId) => ({ + moduleDetails: [ + { + moduleName: "ws-services-calculation", + masterDetails: [ + { + name: "MeterStatus", + filter: `$.*.name` + }, + ], + }, + ], + +}); + +const getBillingPeriodValidation = (tenantId) => ({ + moduleDetails: [ + { + moduleName: "ws-services-masters", + masterDetails: [ + { + name: "billingPeriod", + filter: "*" + }, + ], + }, + ], +}); + +const getDssDashboardCriteria = (tenantId, moduleCode) => ({ + details: { + tenantId, + moduleDetails: [ + { + moduleName: moduleCode, + masterDetails: [ + { + name: "dashboard-config", + }, + ], + }, + ], + }, +}); + +const getMCollectBillingServiceCriteria = (tenantId, moduleCode, type, filter) => ({ + type, + details: { + tenantId: tenantId, + moduleDetails: [ + { + moduleName: moduleCode, + masterDetails: [{ name: "BusinessService", filter: filter }], + }, + ], + }, +}); + +const getTradeUnitsDataList = (tenantId, moduleCode, type, filter) => ({ + type, + details: { + tenantId: tenantId, + moduleDetails: [ + { + moduleName: moduleCode, + masterDetails: [{ name: "TradeType", filter: filter }], + }, + ], + }, +}); + +const getMCollectApplicationStatusCriteria = (tenantId, moduleCode, type) => ({ + type, + details: { + tenantId: tenantId, + moduleDetails: [ + { + moduleName: moduleCode, + masterDetails: [{ name: "applicationStatus" }], + }, + ], + }, +}); + +const getHrmsEmployeeRolesandDesignations = () => ({ + moduleDetails: [ + { + moduleName: "common-masters", + masterDetails: [ + { name: "Department", filter: "[?(@.active == true)]" }, + { name: "Designation", filter: "[?(@.active == true)]" }, + ], + }, + { + moduleName: "tenant", + masterDetails: [{ name: "tenants" }], + }, + { + moduleName: "ACCESSCONTROL-ROLES", + masterDetails: [{ name: "roles", filter: "$.[?(@.code!='CITIZEN')]" }], + }, + { moduleName: "egov-location", masterDetails: [{ name: "TenantBoundary" }] }, + ], +}); +const getFSTPPlantCriteria = (tenantId, moduleCode, type) => ({ + type, + details: { + tenantId, + moduleDetails: [ + { + moduleName: moduleCode, + masterDetails: [{ name: "FSTPPlantInfo" }], + }, + ], + }, +}); +const getCancelReceiptReason = (tenantId, moduleCode, type) => ({ + type, + details: { + tenantId, + moduleDetails: [ + { + moduleName: moduleCode, + masterDetails: [{ name: "CancelReceiptReason" }], + }, + ], + }, +}); +const getReceiptStatus = (tenantId, moduleCode, type) => ({ + type, + details: { + tenantId, + moduleDetails: [ + { + moduleName: moduleCode, + masterDetails: [{ name: "ReceiptStatus" }], + }, + ], + }, +}); +const getCancelReceiptReasonAndStatus = (tenantId, moduleCode, type) => ({ + type, + details: { + tenantId, + moduleDetails: [ + { + moduleName: moduleCode, + masterDetails: [{ name: "ReceiptStatus" }, { name: "uiCommonPay" }], + }, + ], + }, +}); + +const getDocumentTypesCriteria = (tenantId, moduleCode, type) => ({ + type, + details: { + tenantId, + moduleDetails: [ + { + moduleName: moduleCode, + masterDetails: [ + { + name: "DocTypeMapping", + }, + ], + }, + ], + }, +}); + +const getTradeTypeRoleCriteria = (tenantId, moduleCode, type) => ({ + type, + details: { + tenantId, + moduleDetails: [ + { + moduleName: moduleCode, + masterDetails: [ + { + name: "TradeTypetoRoleMapping", + }, + ], + }, + ], + }, +}); + +const getFSTPORejectionReasonCriteria = (tenantId, moduleCode, type) => ({ + type, + details: { + tenantId: tenantId, + moduleDetails: [ + { + moduleName: moduleCode, + masterDetails: [ + { + name: "FSTPORejectionReason", + filter: null, + }, + ], + }, + ], + }, +}); + +const getFSMPaymentTypeCriteria = (tenantId, moduleCode, type) => ({ + type, + details: { + tenantId: tenantId, + moduleDetails: [ + { + moduleName: moduleCode, + masterDetails: [ + { + name: "PaymentType", + filter: null, + }, + ], + }, + ], + }, +}); + +const getFSMTripNumberCriteria = (tenantId, moduleCode, type) => ({ + type, + details: { + tenantId: tenantId, + moduleDetails: [ + { + moduleName: moduleCode, + masterDetails: [ + { + name: "TripNumber", + filter: null, + }, + ], + }, + ], + }, +}); + +const getFSMReceivedPaymentTypeCriteria = (tenantId, moduleCode, type) => ({ + type, + details: { + tenantId: tenantId, + moduleDetails: [ + { + moduleName: moduleCode, + masterDetails: [ + { + name: "ReceivedPaymentType", + filter: null, + }, + ], + }, + ], + }, +}); + +const getWSTaxHeadMasterCritera = (tenantId, moduleCode, type) => ({ + type, + details: { + tenantId: tenantId, + moduleDetails: [ + { + moduleName: "BillingService", + masterDetails: [ + { + name: "TaxHeadMaster", + filter: null, + }, + ], + }, + ], + }, +}); + +const getHowItWorksJSON = (tenantId) => ({ + moduleDetails: [ + { + moduleName: "common-masters", + masterDetails: [ + { + name: "howItWorks", + }, + ], + }, + ], +}); + +const getFAQsJSON = (tenantId) => ({ + moduleDetails: [ + { + moduleName: "common-masters", + masterDetails: [ + { + name: "faqs", + }, + ], + }, +], +}); +const getDSSFAQsJSON = (tenantId) => ({ + moduleDetails: [ + { + moduleName: "dss-dashboard", + masterDetails: [ + { + name: "FAQs", + }, + ], + }, +], +}); +const getDSSAboutJSON = (tenantId) => ({ + moduleDetails: [ + { + moduleName: "dss-dashboard", + masterDetails: [ + { + name: "About", + }, + ], + }, +], +}); + +const getStaticData = () => ({ + moduleDetails: [ + { + moduleName: "common-masters", + masterDetails: [ + { + name: "StaticData", + }, + ], + }, + ], +}); + +const GetEgovLocations = (MdmsRes) => { + return MdmsRes["egov-location"].TenantBoundary[0].boundary.children.map((obj) => ({ + name: obj.localname, + i18nKey: obj.localname, + })); +}; + +const GetServiceDefs = (MdmsRes, moduleCode) => MdmsRes[`RAINMAKER-${moduleCode}`].ServiceDefs.filter((def) => def.active); + +const GetSanitationType = (MdmsRes) => MdmsRes["FSM"].SanitationType.filter((type) => type.active); + +const GetPitType = (MdmsRes) => + MdmsRes["FSM"].PitType.filter((item) => item.active).map((type) => ({ ...type, i18nKey: `PITTYPE_MASTERS_${type.code}` })); + +const GetApplicationChannel = (MdmsRes) => + MdmsRes["FSM"].ApplicationChannel.filter((type) => type.active).map((channel) => ({ + ...channel, + i18nKey: `ES_APPLICATION_DETAILS_APPLICATION_CHANNEL_${channel.code}`, + })); + +const GetPropertyType = (MdmsRes) => + MdmsRes["FSM"].PropertyType.filter((property) => property.active && !property.propertyType).map((item) => ({ + ...item, + i18nKey: `PROPERTYTYPE_MASTERS_${item.code}`, + code: item.code, + })); + +const GetPropertySubtype = (MdmsRes) => + MdmsRes["FSM"].PropertyType.filter((property) => property.active && property.propertyType).map((item) => ({ + ...item, + i18nKey: `PROPERTYTYPE_MASTERS_${item.code}`, + code: item.code, + })); + +const GetVehicleType = (MdmsRes) => + MdmsRes["Vehicle"].VehicleMakeModel.filter((vehicle) => vehicle.active) + .filter((vehicle) => vehicle.make) + .map((vehicleDetails) => { + return { + ...vehicleDetails, + i18nKey: `COMMON_MASTER_VEHICLE_${vehicleDetails.code}`, + }; + }); + +const GetVehicleMakeModel = (MdmsRes) => + MdmsRes["Vehicle"].VehicleMakeModel.filter((vehicle) => vehicle.active) + .map((vehicleDetails) => { + return { + ...vehicleDetails, + i18nKey: `COMMON_MASTER_VEHICLE_${vehicleDetails.code}`, + }; + }); + +const GetSlumLocalityMapping = (MdmsRes, tenantId) => + MdmsRes["FSM"].Slum.filter((type) => type.active).reduce((prev, curr) => { + return prev[curr.locality] + ? { + ...prev, + [curr.locality]: [ + ...prev[curr.locality], + { + ...curr, + i18nKey: `${tenantId.toUpperCase().replace(".", "_")}_${curr.locality}_${curr.code}`, + }, + ], + } + : { + ...prev, + [curr.locality]: [ + { + ...curr, + i18nKey: `${tenantId.toUpperCase().replace(".", "_")}_${curr.locality}_${curr.code}`, + }, + ], + }; + }, {}); + +const GetPropertyOwnerShipCategory = (MdmsRes) => + MdmsRes["PropertyTax"].OwnerShipCategory.filter((ownerShip) => ownerShip.active).map((ownerShipDetails) => { + return { + ...ownerShipDetails, + i18nKey: `COMMON_MASTER_OWNER_TYPE_${ownerShipDetails.code}`, + }; + }); + +const GetTradeOwnerShipCategory = (MdmsRes) => + MdmsRes["common-masters"].OwnerShipCategory.filter((ownerShip) => ownerShip.active).map((ownerShipDetails) => { + return { + ...ownerShipDetails, + i18nKey: `COMMON_MASTER_OWNER_TYPE_${ownerShipDetails.code}`, + }; + }); + +const GetPropertyOwnerType = (MdmsRes) => + MdmsRes["PropertyTax"].OwnerType.filter((owner) => owner.active).map((ownerDetails) => { + return { + ...ownerDetails, + i18nKey: `PROPERTYTAX_OWNERTYPE_${ownerDetails.code}`, + }; + }); + +const getSubPropertyOwnerShipCategory = (MdmsRes) => { + MdmsRes["PropertyTax"].SubOwnerShipCategory.filter((category) => category.active).map((subOwnerShipDetails) => { + return { + ...subOwnerShipDetails, + i18nKey: `PROPERTYTAX_BILLING_SLAB_${subOwnerShipDetails.code}`, + }; + }); + sessionStorage.setItem("getSubPropertyOwnerShipCategory", JSON.stringify(MdmsRes)); +}; + +const getDocumentRequiredScreen = (MdmsRes) => { + MdmsRes["PropertyTax"].Documents.filter((Documents) => Documents.active).map((dropdownData) => { + return { + ...Documents, + i18nKey: `${dropdownData.code}`, + }; + }); +}; + +const getTLDocumentRequiredScreen = (MdmsRes) => { + MdmsRes["TradeLicense"].Documents.filter((Documents) => Documents.active).map((dropdownData) => { + return { + ...Documents, + i18nKey: `${dropdownData.code}`, + }; + }); +}; + +const getMapConfig = (MdmsRes) => { + MdmsRes["PropertyTax"].MapConfig.filter((MapConfig) => MapConfig).map((MapData) => { + return { + ...MapConfig, + defaultconfig: MapData.defaultConfig, + }; + }); +}; + +const getUsageCategory = (MdmsRes) => + MdmsRes["PropertyTax"].UsageCategory.filter((UsageCategory) => UsageCategory.active).map((UsageCategorylist) => { + return { + ...UsageCategorylist, + i18nKey: `PROPERTYTAX_BILLING_SLAB_${UsageCategorylist.code}`, + }; + }); + +const getPTPropertyType = (MdmsRes) => + MdmsRes["PropertyTax"].UsageCategory.filter((PropertyType) => PropertyType.active).map((PTPropertyTypelist) => { + return { + ...UsageCategorylist, + i18nKey: `COMMON_PROPTYPE_${Digit.Utils.locale.stringReplaceAll(PTPropertyTypelist.code, ".", "_")}`, + }; + }); + +const getTLStructureType = (MdmsRes) => + MdmsRes["common-masters"].StructureType.filter((StructureType) => StructureType.active).map((TLStructureTypeList) => { + return { + ...TLStructureTypeList, + i18nKey: `COMMON_MASTERS_STRUCTURETYPE_${Digit.Utils.locale.stringReplaceAll(TLStructureTypeList.code, ".", "_")}`, + }; + }); + +const getTLAccessoriesType = (MdmsRes) => + MdmsRes["TradeLicense"].AccessoriesCategory.filter((AccessoriesCategory) => AccessoriesCategory.active).map((TLAccessoryTypeList) => { + return { + ...TLAccessoryTypeList, + i18nKey: `TRADELICENSE_ACCESSORIESCATEGORY_${Digit.Utils.locale.stringReplaceAll(TLAccessoryTypeList.code, ".", "_")}`, + }; + }); + +const getTLFinancialYear = (MdmsRes) => + MdmsRes["egf-master"].FinancialYear.filter((FinancialYear) => FinancialYear.active && FinancialYear.module === "TL").map((FinancialYearList) => { + return { + ...FinancialYearList, + //i18nKey: `TRADELICENSE_ACCESSORIESCATEGORY_${stringReplaceAll(TLAccessoryTypeList.code, ".", "_")}`, + }; + }); +const getFloorList = (MdmsRes) => + MdmsRes["PropertyTax"].Floor.filter((PTFloor) => PTFloor.active).map((PTFloorlist) => { + return { + ...PTFloorlist, + i18nKey: `PROPERTYTAX_FLOOR_${PTFloorlist.code}`, + }; + }); + +const GetReasonType = (MdmsRes, type, moduleCode) => + Object.assign( + {}, + ...Object.keys(MdmsRes[moduleCode]).map((collection) => ({ + [collection]: MdmsRes[moduleCode][collection] + .filter((reason) => reason.active) + .map((reason) => ({ + ...reason, + i18nKey: `ES_ACTION_REASON_${reason.code}`, + })), + })) + ); + +const getRentalDetailsCategory = (MdmsRes) => { + MdmsRes["PropertyTax"].RentalDetails.filter((category) => category.active).map((RentalDetailsInfo) => { + return { + ...RentalDetailsInfo, + i18nKey: `PROPERTYTAX_BILLING_SLAB_${RentalDetailsInfo.code}`, + }; + }); +}; + +const getChargeSlabsCategory = (MdmsRes) => { + MdmsRes["PropertyTax"].ChargeSlabs.filter((category) => category.active).map((ChargeSlabsInfo) => { + return { + ...ChargeSlabsInfo, + }; + }); +}; + +const getGenderType = (MdmsRes) => { + return MdmsRes["common-masters"].GenderType.filter((GenderType) => GenderType.active).map((genderDetails) => { + return { + ...genderDetails, + i18nKey: `PT_COMMON_GENDER_${genderDetails.code}`, + }; + }); + //return MdmsRes; +}; + +const TLGenderType = (MdmsRes) => { + MdmsRes["common-masters"].GenderType.filter((GenderType) => GenderType.active).map((genders) => { + return { + ...genders, + i18nKey: `TL_GENDER_${genders.code}`, + }; + }); +}; + +const PTGenderType = (MdmsRes) => { + MdmsRes["common-masters"].GenderType.filter((GenderType) => GenderType.active).map((formGender) => { + return { + ...formGender, + i18nKey: `PT_FORM3_${formGender.code}`, + }; + }); +}; + +const HRGenderType = (MdmsRes) => { + MdmsRes["common-masters"].GenderType.filter((GenderType) => GenderType.active).map((comGender) => { + return { + ...comGender, + i18nKey: `COMMON_GENDER_${comGender.code}`, + }; + }); +}; + +const GetMCollectBusinessService = (MdmsRes) => + MdmsRes["BillingService"].BusinessService.map((businesServiceDetails) => { + return { + ...businesServiceDetails, + i18nKey: `BILLINGSERVICE_BUSINESSSERVICE_${businesServiceDetails.code}`, + }; + }); + +const GetMCollectApplicationStatus = (MdmsRes) => + MdmsRes["mCollect"].applcationStatus.map((appStatusDetails) => { + return { + ...appStatusDetails, + i18nKey: `BILLINGSERVICE_BUSINESSSERVICE_${appStatusDetails.code}`, + }; + }); + +const getFSMGenderType = (MdmsRes) => { + return MdmsRes["common-masters"].GenderType.map((genderDetails) => { + return { + ...genderDetails, + i18nKey: `COMMON_GENDER_${genderDetails.code}`, + }; + }); +}; + +const GetFSTPORejectionReason = (MdmsRes) => { + return MdmsRes["Vehicle"].FSTPORejectionReason.filter((reason) => reason.active).map((reasonDetails) => { + return { + ...reasonDetails, + i18nKey: `ES_ACTION_REASON_${reasonDetails.code}`, + }; + }); +}; + +const GetPaymentType = (MdmsRes) => { + return MdmsRes["FSM"].PaymentType.filter((option) => option.active).map((reasonDetails) => { + return { + ...reasonDetails, + i18nKey: `ES_ACTION_${reasonDetails.code}`, + }; + }); +}; + +const GetTripNumber = (MdmsRes) => { + return MdmsRes["FSM"].TripNumber.filter((option) => option.active).map((reasonDetails) => { + return { + ...reasonDetails, + i18nKey: `ES_ACTION_TRIP_${reasonDetails.code}`, + }; + }); +}; + +const GetReceivedPaymentType = (MdmsRes) => { + return MdmsRes["FSM"].ReceivedPaymentType.filter((option) => option.active).map((reasonDetails) => { + return { + ...reasonDetails, + i18nKey: `ES_ACTION_${reasonDetails.code}`, + }; + }); +}; + +const getDssDashboard = (MdmsRes) => MdmsRes["dss-dashboard"]["dashboard-config"]; + +const GetRoleStatusMapping = (MdmsRes) => MdmsRes["DIGIT-UI"].RoleStatusMapping; +const GetCommonFields = (MdmsRes, moduleCode) => + moduleCode.toUpperCase() === "PROPERTYTAX" ? MdmsRes["PropertyTax"].CommonFieldsConfig : MdmsRes["FSM"].CommonFieldsConfig; + +const GetPreFields = (MdmsRes) => MdmsRes["FSM"].PreFieldsConfig; + +const GetPostFields = (MdmsRes) => MdmsRes["FSM"].PostFieldsConfig; + +const GetFSTPPlantInfo = (MdmsRes) => MdmsRes["FSM"]?.FSTPPlantInfo; + +const GetDocumentsTypes = (MdmsRes) => MdmsRes["BPA"].DocTypeMapping; + +const GetChecklist = (MdmsRes) => MdmsRes["BPA"].CheckList; + +const transformResponse = (type, MdmsRes, moduleCode, tenantId) => { + switch (type) { + case "citymodule": + return GetCitiesWithi18nKeys(MdmsRes, moduleCode); + case "egovLocation": + return GetEgovLocations(MdmsRes); + case "serviceDefs": + return GetServiceDefs(MdmsRes, moduleCode); + case "ApplicationChannel": + return GetApplicationChannel(MdmsRes); + case "SanitationType": + return GetSanitationType(MdmsRes); + case "PropertyType": + return GetPropertyType(MdmsRes); + case "PropertySubtype": + return GetPropertySubtype(MdmsRes); + case "PitType": + return GetPitType(MdmsRes); + case "VehicleType": + return GetVehicleType(MdmsRes); + case "VehicleMakeModel": + return GetVehicleMakeModel(MdmsRes); + case "Slum": + return GetSlumLocalityMapping(MdmsRes, tenantId); + case "OwnerShipCategory": + return GetPropertyOwnerShipCategory(MdmsRes); + case "TLOwnerShipCategory": + return GetTradeOwnerShipCategory(MdmsRes); + case "OwnerType": + return GetPropertyOwnerType(MdmsRes); + case "SubOwnerShipCategory": + return getSubPropertyOwnerShipCategory(MdmsRes); + case "Documents": + return getDocumentRequiredScreen(MdmsRes); + case "TLDocuments": + return getTLDocumentRequiredScreen(MdmsRes); + case "MapConfig": + return getMapConfig(MdmsRes); + case "UsageCategory": + return getUsageCategory(MdmsRes); + case "PTPropertyType": + return getPTPropertyType(MdmsRes); + case "StructureType": + return getTLStructureType(MdmsRes); + case "AccessoryCategory": + return getTLAccessoriesType(MdmsRes); + case "FinancialYear": + return getTLFinancialYear(MdmsRes); + case "Floor": + return getFloorList(MdmsRes); + case "Reason": + return GetReasonType(MdmsRes, type, moduleCode); + case "RoleStatusMapping": + return GetRoleStatusMapping(MdmsRes); + case "CommonFieldsConfig": + return GetCommonFields(MdmsRes, moduleCode); + case "PreFieldsConfig": + return GetPreFields(MdmsRes); + case "PostFieldsConfig": + return GetPostFields(MdmsRes); + case "RentalDeatils": + return getRentalDetailsCategory(MdmsRes); + case "ChargeSlabs": + return getChargeSlabsCategory(MdmsRes); + case "DssDashboard": + return getDssDashboard(MdmsRes); + case "BusinessService": + return GetMCollectBusinessService(MdmsRes); + case "applcatonStatus": + return GetMCollectApplicationStatus(MdmsRes); + case "FSTPPlantInfo": + return GetFSTPPlantInfo(MdmsRes); + case "GenderType": + return getGenderType(MdmsRes); + case "TLGendertype": + return TLGenderType(MdmsRes); + case "PTGenderType": + return PTGenderType(MdmsRes); + case "HRGenderType": + return HRGenderType(MdmsRes); + case "DocumentTypes": + return GetDocumentsTypes(MdmsRes); + case "CheckList": + return GetChecklist(MdmsRes); + case "FSMGenderType": + return getFSMGenderType(MdmsRes); + case "FSTPORejectionReason": + return GetFSTPORejectionReason(MdmsRes); + case "PaymentType": + return GetPaymentType(MdmsRes); + case "TripNumber": + return GetTripNumber(MdmsRes); + case "ReceivedPaymentType": + return GetReceivedPaymentType(MdmsRes); + default: + return MdmsRes; + } +}; + +const getCacheSetting = (moduleName) => { + return ApiCacheService.getSettingByServiceUrl(Urls.MDMS, moduleName); +}; + +const mergedData = {}; +const mergedPromises = {}; +const callAllPromises = (success, promises = [], resData) => { + promises.forEach((promise) => { + if (success) { + promise.resolve(resData); + } else { + promise.reject(resData); + } + }); +}; +const mergeMDMSData = (data, tenantId) => { + if (!mergedData[tenantId] || Object.keys(mergedData[tenantId]).length === 0) { + mergedData[tenantId] = data; + } else { + data.MdmsCriteria.moduleDetails.forEach((dataModuleDetails) => { + const moduleName = dataModuleDetails.moduleName; + const masterDetails = dataModuleDetails.masterDetails; + let found = false; + mergedData[tenantId].MdmsCriteria.moduleDetails.forEach((moduleDetail) => { + if (moduleDetail.moduleName === moduleName) { + found = true; + moduleDetail.masterDetails = [...moduleDetail.masterDetails, ...masterDetails]; + } + }); + if (!found) { + mergedData[tenantId].MdmsCriteria.moduleDetails.push(dataModuleDetails); + } + }); + } +}; +const debouncedCall = ({ serviceName, url, data, useCache, params }, resolve, reject) => { + if (!mergedPromises[params.tenantId] || mergedPromises[params.tenantId].length === 0) { + const cacheSetting = getCacheSetting(); + setTimeout(() => { + let callData = JSON.parse(JSON.stringify(mergedData[params.tenantId])); + mergedData[params.tenantId] = {}; + let callPromises = [...mergedPromises[params.tenantId]]; + mergedPromises[params.tenantId] = []; + ServiceRequest({ + serviceName, + url, + data: callData, + useCache, + params, + }) + .then((data) => { + callAllPromises(true, callPromises, data); + }) + .catch((err) => { + callAllPromises(false, callPromises, err); + }); + }, cacheSetting.debounceTimeInMS || 500); + } + mergeMDMSData(data, params.tenantId); + if (!mergedPromises[params.tenantId]) { + mergedPromises[params.tenantId] = []; + } + mergedPromises[params.tenantId].push({ resolve, reject }); +}; + +export const MdmsService = { + init: (stateCode) => + ServiceRequest({ + serviceName: "mdmsInit", + url: Urls.MDMS, + data: initRequestBody(stateCode), + useCache: true, + params: { tenantId: stateCode }, + }), + call: (tenantId, details) => { + return new Promise((resolve, reject) => + debouncedCall( + { + serviceName: "mdmsCall", + url: Urls.MDMS, + data: getCriteria(tenantId, details), + useCache: true, + params: { tenantId }, + }, + resolve, + reject + ) + ); + }, + getDataByCriteria: async (tenantId, mdmsDetails, moduleCode) => { + const key = `MDMS.${tenantId}.${moduleCode}.${mdmsDetails.type}.${JSON.stringify(mdmsDetails.details)}`; + const inStoreValue = PersistantStorage.get(key); + if (inStoreValue) { + return inStoreValue; + } + const { MdmsRes } = await MdmsService.call(tenantId, mdmsDetails.details); + const responseValue = transformResponse(mdmsDetails.type, MdmsRes, moduleCode.toUpperCase(), tenantId); + const cacheSetting = getCacheSetting(mdmsDetails.details.moduleDetails[0].moduleName); + PersistantStorage.set(key, responseValue, cacheSetting.cacheTimeInSecs); + return responseValue; + }, + getServiceDefs: (tenantId, moduleCode) => { + return MdmsService.getDataByCriteria(tenantId, getModuleServiceDefsCriteria(tenantId, moduleCode), moduleCode); + }, + getSanitationType: (tenantId, moduleCode) => { + return MdmsService.getDataByCriteria(tenantId, getSanitationTypeCriteria(tenantId, moduleCode), moduleCode); + }, + getApplicationChannel: (tenantId, moduleCode) => { + return MdmsService.getDataByCriteria(tenantId, getApplicationChannelCriteria(tenantId, moduleCode), moduleCode); + }, + getPropertyType: (tenantId, moduleCode, type) => { + return MdmsService.getDataByCriteria(tenantId, getPropertyTypeCriteria(tenantId, moduleCode, type), moduleCode); + }, + getPropertyUsage: (tenantId, moduleCode, type) => { + return MdmsService.getDataByCriteria(tenantId, getPropertyUsageCriteria(tenantId, moduleCode, type), moduleCode); + }, + getPropertySubtype: (tenantId, moduleCode, type) => { + return MdmsService.getDataByCriteria(tenantId, getPropertyTypeCriteria(tenantId, moduleCode, type), moduleCode); + }, + getPitType: (tenantId, moduleCode) => { + return MdmsService.getDataByCriteria(tenantId, getPitTypeCriteria(tenantId, moduleCode), moduleCode); + }, + getVehicleType: (tenantId, moduleCode, type) => { + return MdmsService.getDataByCriteria(tenantId, getVehicleTypeCriteria(tenantId, moduleCode, type), moduleCode); + }, + getChecklist: (tenantId, moduleCode) => { + return MdmsService.getDataByCriteria(tenantId, getChecklistCriteria(tenantId, moduleCode), moduleCode); + }, + getPaymentRules: (tenantId, filter) => { + return MdmsService.call(tenantId, getBillingServiceForBusinessServiceCriteria(filter)); + }, + + getCustomizationConfig: (tenantId, moduleCode) => { + return MdmsService.getDataByCriteria(tenantId, getConfig(tenantId, moduleCode), moduleCode); + }, + getSlumLocalityMapping: (tenantId, moduleCode, type) => + MdmsService.getDataByCriteria(tenantId, getSlumLocalityCriteria(tenantId, moduleCode, type), moduleCode), + + getReason: (tenantId, moduleCode, type, payload) => + MdmsService.getDataByCriteria(tenantId, getReasonCriteria(tenantId, moduleCode, type, payload), moduleCode), + + getRoleStatus: (tenantId, moduleCode, type) => + MdmsService.getDataByCriteria(tenantId, getRoleStatusCriteria(tenantId, moduleCode, type), moduleCode), + + getCommonFieldsConfig: (tenantId, moduleCode, type, payload) => + MdmsService.getDataByCriteria(tenantId, getCommonFieldsCriteria(tenantId, moduleCode, type, payload), moduleCode), + + getPreFieldsConfig: (tenantId, moduleCode, type, payload) => + MdmsService.getDataByCriteria(tenantId, getPreFieldsCriteria(tenantId, moduleCode, type, payload), moduleCode), + + getPostFieldsConfig: (tenantId, moduleCode, type, payload) => + MdmsService.getDataByCriteria(tenantId, getPostFieldsCriteria(tenantId, moduleCode, type, payload), moduleCode), + + getPropertyOwnerShipCategory: (tenantId, moduleCode, type) => { + return MdmsService.getDataByCriteria(tenantId, getPropertyOwnerShipCategoryCriteria(tenantId, moduleCode, type), moduleCode); + }, + + GetTradeOwnerShipCategory: (tenantId, moduleCode, type) => { + return MdmsService.getDataByCriteria(tenantId, getTradeOwnerShipCategoryCriteria(tenantId, moduleCode, type), moduleCode); + }, + + getPropertyOwnerType: (tenantId, moduleCode, type) => { + return MdmsService.getDataByCriteria(tenantId, getPropertyOwnerTypeCriteria(tenantId, moduleCode, type), moduleCode); + }, + getPropertySubOwnerShipCategory: (tenantId, moduleCode, type) => { + return MdmsService.getDataByCriteria(tenantId, getSubPropertyOwnerShipCategoryCriteria(tenantId, moduleCode, type), moduleCode); + }, + getDocumentRequiredScreen: (tenantId, moduleCode) => { + return MdmsService.getDataByCriteria(tenantId, getDocumentRequiredScreenCategory(tenantId, moduleCode), moduleCode); + }, + getTLDocumentRequiredScreen: (tenantId, moduleCode) => { + return MdmsService.getDataByCriteria(tenantId, getDocumentRequiredScreenCategory(tenantId, moduleCode), moduleCode); + }, + getTradeUnitsData: (tenantId, moduleCode, type, filter) => { + return MdmsService.getDataByCriteria(tenantId, getTradeUnitsDataList(tenantId, moduleCode, type, filter), moduleCode); + }, + getMapConfig: (tenantId, moduleCode) => { + return MdmsService.getDataByCriteria(tenantId, getDefaultMapConfig(tenantId, moduleCode), moduleCode); + }, + getUsageCategory: (tenantId, moduleCode, type) => { + return MdmsService.getDataByCriteria(tenantId, getUsageCategoryList(tenantId, moduleCode), moduleCode); + }, + getPTPropertyType: (tenantId, moduleCode, type) => { + return MdmsService.getDataByCriteria(tenantId, getPTPropertyTypeList(tenantId, moduleCode), moduleCode); + }, + getTLStructureType: (tenantId, moduleCode, type) => { + return MdmsService.getDataByCriteria(tenantId, getTLStructureTypeList(tenantId, moduleCode), moduleCode); + }, + getTLAccessoriesType: (tenantId, moduleCode, type) => { + return MdmsService.getDataByCriteria(tenantId, getTLAccessoriesTypeList(tenantId, moduleCode), moduleCode); + }, + getTLFinancialYear: (tenantId, moduleCode, type) => { + return MdmsService.getDataByCriteria(tenantId, getTLFinancialYearList(tenantId, moduleCode), moduleCode); + }, + getFloorList: (tenantId, moduleCode, type) => { + return MdmsService.getDataByCriteria(tenantId, getPTFloorList(tenantId, moduleCode, type), moduleCode); + }, + getRentalDetails: (tenantId, moduleCode) => { + return MdmsService.getDataByCriteria(tenantId, getRentalDetailsCategoryCriteria(tenantId, moduleCode), moduleCode); + }, + getChargeSlabs: (tenantId, moduleCode) => { + return MdmsService.getDataByCriteria(tenantId, getChargeSlabsCategoryCriteria(tenantId, moduleCode), moduleCode); + }, + getDssDashboard: (tenantId, moduleCode) => { + return MdmsService.getDataByCriteria(tenantId, getDssDashboardCriteria(tenantId, moduleCode), moduleCode); + }, + getPaymentGateway: (tenantId, moduleCode, type) => { + return MdmsService.getDataByCriteria(tenantId, getGeneralCriteria(tenantId, moduleCode, type), moduleCode); + }, + getReceiptKey: (tenantId, moduleCode) => { + return MdmsService.getDataByCriteria(tenantId, getReceiptKey(tenantId, moduleCode), moduleCode); + }, + getHelpText: (tenantId, moduleCode, type) => { + return MdmsService.getDataByCriteria(tenantId, getGeneralCriteria(tenantId, moduleCode, type), moduleCode); + }, + getMCollectBillingService: (tenantId, moduleCode, type, filter) => { + return MdmsService.getDataByCriteria(tenantId, getMCollectBillingServiceCriteria(tenantId, moduleCode, type, filter), moduleCode); + }, + getMCollectApplcationStatus: (tenantId, moduleCode, type, filter) => { + return MdmsService.getDataByCriteria(tenantId, getMCollectApplicationStatusCriteria(tenantId, moduleCode, type, filter), moduleCode); + }, + getHrmsEmployeeRolesandDesignation: (tenantId) => { + return MdmsService.call(tenantId, getHrmsEmployeeRolesandDesignations()); + }, + getHrmsEmployeeTypes: (tenantId, moduleCode, type, filter) => { + return MdmsService.getDataByCriteria(tenantId, getGeneralCriteria(tenantId, moduleCode, type), moduleCode); + }, + getHrmsEmployeeReason: (tenantId, moduleCode, type) => { + return MdmsService.getDataByCriteria(tenantId, getGeneralCriteria(tenantId, moduleCode, type), moduleCode); + }, + getMultipleTypes: (tenantId, moduleCode, types) => { + return MdmsService.getDataByCriteria(tenantId, getMultipleTypes(tenantId, moduleCode, types), moduleCode); + }, + getMultipleTypesWithFilter: (tenantId, moduleCode, types) => { + return MdmsService.getDataByCriteria(tenantId, getMultipleTypesWithFilter(moduleCode, types), moduleCode); + }, + getFSTPPlantInfo: (tenantId, moduleCode, types) => { + return MdmsService.getDataByCriteria(tenantId, getFSTPPlantCriteria(tenantId, moduleCode, types), moduleCode); + }, + getCancelReceiptReason: (tenantId, moduleCode) => { + return MdmsService.getDataByCriteria(tenantId, getCancelReceiptReason(tenantId, moduleCode), moduleCode); + }, + getReceiptStatus: (tenantId, moduleCode) => { + return MdmsService.getDataByCriteria(tenantId, getReceiptStatus(tenantId, moduleCode), moduleCode); + }, + getCancelReceiptReasonAndStatus: (tenantId, moduleCode) => { + return MdmsService.getDataByCriteria(tenantId, getCancelReceiptReasonAndStatus(tenantId, moduleCode), moduleCode); + }, + + getGenderType: (tenantId, moduleCode, type) => { + return MdmsService.getDataByCriteria(tenantId, getGenderTypeList(tenantId, moduleCode, type), moduleCode); + }, + + TLGenderType: (tenantId, moduleCode, type) => { + return MdmsService.getDataByCriteria(tenantId, getGenderTypeList(tenantId, moduleCode, type), moduleCode); + }, + + PTGenderType: (tenantId, moduleCode, type) => { + return MdmsService.getDataByCriteria(tenantId, getGenderTypeList(tenantId, moduleCode, type), moduleCode); + }, + + HRGenderType: (tenantId, moduleCode, type) => { + return MdmsService.getDataByCriteria(tenantId, getGenderTypeList(tenantId, moduleCode, type), moduleCode); + }, + + getDocumentTypes: (tenantId, moduleCode, type) => { + return MdmsService.getDataByCriteria(tenantId, getDocumentTypesCriteria(tenantId, moduleCode, type), moduleCode); + }, + + getTradeTypeRoleTypes: (tenantId, moduleCode, type) => { + return MdmsService.getDataByCriteria(tenantId, getTradeTypeRoleCriteria(tenantId, moduleCode, type), moduleCode); + }, + + getFSMGenderType: (tenantId, moduleCode, type) => { + return MdmsService.getDataByCriteria(tenantId, getGenderTypeList(tenantId, moduleCode, type), moduleCode); + }, + + getFSTPORejectionReason: (tenantId, moduleCode, type) => { + return MdmsService.getDataByCriteria(tenantId, getFSTPORejectionReasonCriteria(tenantId, moduleCode, type), moduleCode); + }, + + getFSMPaymentType: (tenantId, moduleCode, type) => { + return MdmsService.getDataByCriteria(tenantId, getFSMPaymentTypeCriteria(tenantId, moduleCode, type), moduleCode); + }, + getBillsGenieKey: (tenantId, moduleCode) => { + return MdmsService.getDataByCriteria(tenantId, getBillsGenieKey(tenantId, moduleCode), moduleCode); + }, + + getFSMTripNumber: (tenantId, moduleCode, type) => { + return MdmsService.getDataByCriteria(tenantId, getFSMTripNumberCriteria(tenantId, moduleCode, type), moduleCode); + }, + + getFSMReceivedPaymentType: (tenantId, moduleCode, type) => { + return MdmsService.getDataByCriteria(tenantId, getFSMReceivedPaymentTypeCriteria(tenantId, moduleCode, type), moduleCode); + }, + getWSTaxHeadMaster: (tenantId, moduleCode, type) => { + return MdmsService.getDataByCriteria(tenantId, getWSTaxHeadMasterCritera(tenantId, moduleCode, type), moduleCode); + }, + + getMeterStatusType: (tenantId) => { + return MdmsService.call(tenantId, getMeterStatusTypeList(tenantId)); + }, + + getBillingPeriod: (tenantId) => { + return MdmsService.call(tenantId, getBillingPeriodValidation(tenantId)); + }, + getHowItWorksJSONData: (tenantId) => { + return MdmsService.call(tenantId, getHowItWorksJSON(tenantId)); + }, + getFAQsJSONData: (tenantId) => { + return MdmsService.call(tenantId, getFAQsJSON(tenantId)); + }, + getDSSFAQsJSONData: (tenantId) => { + return MdmsService.call(tenantId, getDSSFAQsJSON(tenantId)); + }, + + getDSSAboutJSONData: (tenantId) => { + return MdmsService.call(tenantId, getDSSAboutJSON(tenantId)); + }, + getStaticDataJSON: (tenantId) => { + return MdmsService.call(tenantId, getStaticData()); + } +}; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/PGR.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/PGR.js new file mode 100644 index 00000000000..d0bce116930 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/PGR.js @@ -0,0 +1,61 @@ +import Urls from "../atoms/urls"; +import { Request } from "../atoms/Utils/Request"; + +export const PGRService = { + search: (tenantId, filters = {}) => { + return Request({ + url: Urls.pgr_search, + useCache: false, + method: "POST", + auth: true, + userService: true, + params: { tenantId: tenantId, ...filters }, + }); + }, + create: (details, tenantId) => + Request({ + url: Urls.PGR_Create, + data: details, + useCache: true, + method: "POST", + params: { tenantId }, + auth: true, + userService: true, + }), + update: (details) => + Request({ + url: Urls.pgr_update, + data: details, + useCache: true, + auth: true, + method: "POST", + params: { tenantId: details.tenantId }, + userService: true, + }), + count: (tenantId, params) => + Request({ + url: Urls.pgr_count, + useCache: true, + auth: true, + method: "POST", + params: { tenantId, ...params }, + }), + + employeeSearch: (tenantId, roles) => { + return Request({ + url: Urls.EmployeeSearch, + params: { tenantId, roles }, + auth: true, + }); + }, + + PGROpensearch: ({ tenantId, filters }) => + Request({ + url: Urls.pgr_search, + useCache: false, + method: "POST", + auth: false , + userService: false, + params: { tenantId, ...filters }, + }), +}; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/Payment.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/Payment.js new file mode 100644 index 00000000000..d54d5a62a08 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/Payment.js @@ -0,0 +1,143 @@ +import Urls from "../atoms/urls"; +import { Request } from "../atoms/Utils/Request"; + +export const PaymentService = { + fetchBill: (tenantId, filters = {}) => + Request({ + url: Urls.payment.fetch_bill, + useCache: false, + method: "POST", + auth: false, + userService: false, + params: { tenantId, ...filters }, + }) + .then((d) => { + return d; + }) + .catch((err) => { + if (err?.response?.data?.Errors?.[0]?.code === "EG_BS_BILL_NO_DEMANDS_FOUND") return { Bill: [] }; + else throw err; + }), + searchBill: (tenantId, filters = {}) => + Request({ + url: Urls.payment.search_bill, + useCache: false, + method: "POST", + auth: true, + userService: true, + params: { tenantId, ...filters }, + }), + searchAmendment: (tenantId, filters = {}) => { + return Request({ + url: Urls.payment.billAmendmentSearch, + useCache: false, + method: "POST", + auth: true, + userService: true, + params: { tenantId, ...filters }, + }); + }, + createReciept: (tenantId, details = {}) => + Request({ + url: Urls.payment.create_reciept, + useCache: false, + method: "POST", + auth: true, + userService: true, + locale: true, + params: { tenantId }, + data: { ...details }, + }), + + getReciept: (tenantId, businessservice, filters = {}) => + Request({ + url: + businessservice && businessservice !== "BPAREG" + ? `${Urls.payment.print_reciept}/${businessservice}/_search` + : `${Urls.payment.print_reciept}/_search`, + useCache: false, + method: "POST", + auth: true, + userService: true, + params: { tenantId, ...filters }, + }), + + generatePdf: (tenantId, data = {}, key) => + Request({ + url: Urls.payment.generate_pdf, + useCache: false, + method: "POST", + auth: true, + userService: true, + locale: true, + params: { tenantId, key }, + data: data, + }), + + printReciept: (tenantId, filters = {}) => + Request({ + url: Urls.FileFetch, + useCache: false, + method: "GET", + auth: true, + userService: true, + params: { tenantId, ...filters }, + }), + + createCitizenReciept: (tenantId, details = {}) => + Request({ + url: Urls.payment.create_citizen_reciept, + useCache: false, + method: "POST", + auth: false, + userService: false, + params: { tenantId }, + data: { ...details }, + }), + + updateCitizenReciept: (transactionId) => + Request({ + url: Urls.payment.update_citizen_reciept, + useCache: false, + method: "POST", + auth: true, + userService: true, + params: { transactionId }, + }), + + demandSearch: (tenantId, consumerCode, businessService) => + Request({ + url: Urls.payment.demandSearch, + useCache: false, + method: "POST", + auth: true, + userService: true, + params: { tenantId, consumerCode, businessService }, + }), + + recieptSearch: (tenantId, businessService, params) => + Request({ + url: + businessService === "BPAREG" && !params?.isEmployee /* || businessService.includes("BPA.") && !params?.isEmployee ) */ + ? Urls.payment.obps_Reciept_Search + : Urls.payment.reciept_search, + urlParams: + businessService === "BPAREG" && !params?.isEmployee /* || businessService.includes("BPA.") && !params?.isEmployee) */ + ? {} + : { buisnessService: businessService }, + method: "POST", + // do not change this directly add a param if needed + auth: true, + params: { tenantId, ...params }, + }), + + getBulkPdfRecordsDetails: (filters) => + Request({ + url: Urls.payment.getBulkPdfRecordsDetails, + useCache: false, + method: "POST", + auth: true, + userService: true, + params: { ...filters }, + }), +}; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/Surveys.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/Surveys.js new file mode 100644 index 00000000000..e887d760cf8 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/Surveys.js @@ -0,0 +1,61 @@ +import Urls from "../atoms/urls"; +import { Request } from "../atoms/Utils/Request"; + +export const Surveys = { + search: (filters = {}) => + Request({ + url: Urls.engagement.surveys.search, + useCache: false, + method: "POST", + auth: true, + userService: false, + params: { ...filters }, + }), + create: (details) => + Request({ + url: Urls.engagement.surveys.create, + data: details, + useCache: true, + userService: true, + method: "POST", + auth: true, + locale: true + }), + delete: (details) => + Request({ + url: Urls.engagement.surveys.delete, + data: details, + useCache: true, + userService: true, + method: "POST", + auth: true, + }), + update: (details) => + Request({ + url: Urls.engagement.surveys.update, + data: details, + useCache: true, + userService: true, + method: "POST", + auth: true, + }), + submitResponse: (details) => + Request({ + url: Urls.engagement.surveys.submitResponse, + data: details, + useCache: true, + userService: true, + method: "POST", + auth: true, + }), + showResults: (details) => + Request({ + url: Urls.engagement.surveys.showResults, + // data: details, + useCache: true, + userService: true, + method: "POST", + auth: true, + params:{surveyId:details.surveyId} + }), +}; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/UrlShortener.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/UrlShortener.js new file mode 100644 index 00000000000..3886b332aa9 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/UrlShortener.js @@ -0,0 +1,15 @@ +import { Request } from "../atoms/Utils/Request"; +import Urls from "../atoms/urls"; + +const UrlShortener = (fileStoreId) => + Request({ + data: { url: fileStoreId }, + url: Urls.Shortener, + useCache: false, + method: "POST", + auth: false, + userService: false, + noRequestInfo: true, + }); + +export default UrlShortener; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/User/index.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/User/index.js new file mode 100644 index 00000000000..3cac213ee44 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/User/index.js @@ -0,0 +1,139 @@ +import Urls from "../../atoms/urls"; +import { Request, ServiceRequest } from "../../atoms/Utils/Request"; +import { Storage } from "../../atoms/Utils/Storage"; + +export const UserService = { + authenticate: async(details) => { + const data = new URLSearchParams(); + Object.entries(details).forEach(([key, value]) => data.append(key, value)); + data.append("scope", "read"); + data.append("grant_type", "password"); + + let authResponse= await ServiceRequest({ + serviceName: "authenticate", + url: Urls.Authenticate, + data, + headers: { + authorization: `Basic ${window?.globalConfigs?.getConfig("JWT_TOKEN")||"ZWdvdi11c2VyLWNsaWVudDo="}`, + "Content-Type": "application/x-www-form-urlencoded", + }, + }); + const invalidRoles = window?.globalConfigs?.getConfig("INVALIDROLES") || []; + if (invalidRoles && invalidRoles.length > 0 && authResponse && authResponse?.UserRequest?.roles?.some((role) => invalidRoles.includes(role.code))) { + throw new Error("ES_ERROR_USER_NOT_PERMITTED"); + } + return authResponse; + }, + logoutUser: () => { + let user = UserService.getUser(); + if (!user || !user.info || !user.access_token) return false; + const { type } = user.info; + return ServiceRequest({ + serviceName: "logoutUser", + url: Urls.UserLogout, + data: { access_token: user?.access_token }, + auth: true, + params: { tenantId: type === "CITIZEN" ? Digit.ULBService.getStateId() : Digit.ULBService.getCurrentTenantId() }, + }); + }, + getType: () => { + return Storage.get("userType") || "citizen"; + }, + setType: (userType) => { + Storage.set("userType", userType); + Storage.set("user_type", userType); + }, + getUser: () => { + return Digit.SessionStorage.get("User"); + }, + logout: async () => { + const userType = UserService.getType(); + try { + await UserService.logoutUser(); + } catch (e) { + } + finally{ + window.localStorage.clear(); + window.sessionStorage.clear(); + if (userType === "citizen") { + window.location.replace(`/${window?.contextPath}/citizen`); + } else { + window.location.replace(`/${window?.contextPath}/employee/user/language-selection`); + } + } + }, + sendOtp: (details, stateCode) => + ServiceRequest({ + serviceName: "sendOtp", + url: Urls.OTP_Send, + data: details, + auth: false, + params: { tenantId: stateCode }, + }), + setUser: (data) => { + return Digit.SessionStorage.set("User", data); + }, + setExtraRoleDetails: (data) => { + const userDetails = Digit.SessionStorage.get("User"); + return Digit.SessionStorage.set("User", { ...userDetails, extraRoleInfo: data }); + }, + getExtraRoleDetails: () => { + return Digit.SessionStorage.get("User")?.extraRoleInfo; + }, + registerUser: (details, stateCode) => + ServiceRequest({ + serviceName: "registerUser", + url: Urls.RegisterUser, + data: { + User: details, + }, + params: { tenantId: stateCode }, + }), + updateUser: async (details, stateCode) => + ServiceRequest({ + serviceName: "updateUser", + url: Urls.UserProfileUpdate, + auth: true, + data: { + user: details, + }, + params: { tenantId: stateCode }, + }), + hasAccess: (accessTo) => { + const user = Digit.UserService.getUser(); + if (!user || !user.info) return false; + const { roles } = user.info; + return roles && Array.isArray(roles) && roles.filter((role) => accessTo.includes(role.code)).length; + }, + + changePassword: (details, stateCode) => + ServiceRequest({ + serviceName: "changePassword", + url: Digit.SessionStorage.get("User")?.info ? Urls.ChangePassword1 : Urls.ChangePassword, + data: { + ...details, + }, + auth: true, + params: { tenantId: stateCode }, + }), + + employeeSearch: (tenantId, filters) => { + return Request({ + url: Urls.EmployeeSearch, + params: { tenantId, ...filters }, + auth: true, + }); + }, + userSearch: async (tenantId, data, filters) => { + + return ServiceRequest({ + url: Urls.UserSearch, + params: { ...filters }, + method: "POST", + auth: true, + useCache: true, + userService: true, + data: data.pageSize ? { tenantId, ...data } : { tenantId, ...data, pageSize: "100" }, + }); + }, +}; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/WorkFlow.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/WorkFlow.js new file mode 100644 index 00000000000..6f00237c305 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/elements/WorkFlow.js @@ -0,0 +1,410 @@ +import Urls from "../atoms/urls"; +import { Request } from "../atoms/Utils/Request"; +import cloneDeep from "lodash/cloneDeep"; + +const getThumbnails = async (ids, tenantId, documents = []) => { + + + const res = await Digit.UploadServices.Filefetch(ids, tenantId); + if (res.data.fileStoreIds && res.data.fileStoreIds.length !== 0) { + return { + thumbs: res.data.fileStoreIds.map((o) => o.url.split(",")[3] || o.url.split(",")[0]), + images: res.data.fileStoreIds.map((o) => Digit.Utils.getFileUrl(o.url)) + }; + } else { + return null; + } + +}; + +const makeCommentsSubsidariesOfPreviousActions = async (wf) => { + const TimelineMap = new Map(); + const tenantId = wf?.[0]?.tenantId; + let fileStoreIdsList = []; + let res = {}; + + for (const eventHappened of wf) { + if (eventHappened?.documents) { + eventHappened.thumbnailsToShow = await getThumbnails(eventHappened?.documents?.map(e => e?.fileStoreId), eventHappened?.tenantId, eventHappened?.documents) + } + if (eventHappened.action === "COMMENT") { + const commentAccumulator = TimelineMap.get("tlCommentStack") || [] + TimelineMap.set("tlCommentStack", [...commentAccumulator, eventHappened]) + } + else { + const eventAccumulator = TimelineMap.get("tlActions") || [] + const commentAccumulator = TimelineMap.get("tlCommentStack") || [] + eventHappened.wfComments = [...commentAccumulator, ...eventHappened.comment ? [eventHappened] : []] + TimelineMap.set("tlActions", [...eventAccumulator, eventHappened]) + TimelineMap.delete("tlCommentStack") + } + } + const response = TimelineMap.get("tlActions") + return response +} + +const getThumbnailsV2 = async (ids, tenantId, documents = []) => { + + const res = await Digit.UploadServices.Filefetch(ids, tenantId); + if (res.data.fileStoreIds && res.data.fileStoreIds.length !== 0) { + return { + thumbs: res.data.fileStoreIds.map((o) => o.url.split(",")[3] || o.url.split(",")[0]), + images: res.data.fileStoreIds.map((o) => Digit.Utils.getFileUrl(o.url)) + }; + } else { + return null; + } +}; + +const makeCommentsSubsidariesOfPreviousActionsV2 = async (wf) => { + const TimelineMap = new Map(); + // const tenantId = window.location.href.includes("/obps/") ? Digit.ULBService.getStateId() : wf?.[0]?.tenantId; + + + for (const eventHappened of wf) { + + //currenlty in workflow documentUid is getting populated so while update we are sending fileStoreId in documentUid field + if (eventHappened?.documents) { + eventHappened.thumbnailsToShow = await getThumbnailsV2(eventHappened?.documents?.map(e => e?.documentUid || e?.fileStoreId), eventHappened?.tenantId, eventHappened?.documents) + } + + + } + +} + +const getAssignerDetails = (instance, nextStep, moduleCode) => { + let assigner = instance?.assigner + if (moduleCode === "FSM" || moduleCode === "FSM_POST_PAY_SERVICE") { + if (instance.state.applicationStatus === "CREATED") { + assigner = instance?.assigner + } else { + assigner = nextStep?.assigner || instance?.assigner + } + } else { + assigner = instance?.assigner + } + return assigner +} + +export const WorkflowService = { + init: (stateCode, businessServices) => { + return Request({ + url: Urls.WorkFlow, + useCache: true, + method: "POST", + params: { tenantId: stateCode, businessServices }, + auth: true, + }); + }, + + getByBusinessId: (stateCode, businessIds, params = {}, history = true) => { + return Request({ + url: Urls.WorkFlowProcessSearch, + useCache: false, + method: "POST", + params: { tenantId: stateCode, businessIds: businessIds, ...params, history }, + auth: true, + }); + }, + getDetailsByIdV2: async ({ tenantId, id, moduleCode }) => { + + //process instance search + const workflow = await Digit.WorkflowService.getByBusinessId(tenantId, id); + const applicationProcessInstance = cloneDeep(workflow?.ProcessInstances); + //business service search + const businessServiceResponse = (await Digit.WorkflowService.init(tenantId, moduleCode))?.BusinessServices[0]?.states; + + if (workflow && workflow.ProcessInstances) { + const processInstances = workflow.ProcessInstances; + const nextStates = processInstances[0]?.nextActions.map((action) => ({ action: action?.action, nextState: processInstances[0]?.state.uuid })); + const nextActions = nextStates.map((id) => ({ + action: id.action, + state: businessServiceResponse?.find((state) => state.uuid === id.nextState), + })); + + /* To check state is updatable and provide edit option*/ + const currentState = businessServiceResponse?.find((state) => state.uuid === processInstances[0]?.state.uuid); + + // if current state is editable then we manually append an edit action + //(doing only for muster) + //beacuse in other module edit action is defined in workflow + + // if (currentState && currentState?.isStateUpdatable && moduleCode==="muster-roll-approval" ) { + // nextActions.push({ action: "EDIT", state: currentState }); + // } + // Check when to add Edit action(In Estimate only when send back to originator action is taken) + + const getStateForUUID = (uuid) => businessServiceResponse?.find((state) => state.uuid === uuid); + + //this actionState is used in WorkflowActions component + const actionState = businessServiceResponse + ?.filter((state) => state.uuid === processInstances[0]?.state.uuid) + .map((state) => { + let _nextActions = state.actions?.map?.((ac) => { + let actionResultantState = getStateForUUID(ac.nextState); + let assignees = actionResultantState?.actions?.reduce?.((acc, act) => { + return [...acc, ...act.roles]; + }, []); + return { ...actionResultantState, assigneeRoles: assignees, action: ac.action, roles: ac.roles }; + }); + // if (state?.isStateUpdatable && moduleCode==="MR") { + // _nextActions.push({ action: "RE-SUBMIT", ...state, roles: state?.actions?.[0]?.roles }) + // } + //CHECK WHEN EDIT ACTION TO BE SHOWN + return { ...state, nextActions: _nextActions, roles: state?.action, roles: state?.actions?.reduce((acc, el) => [...acc, ...el.roles], []) }; + })?.[0]; + + + //mapping nextActions with suitable roles + const actionRolePair = nextActions?.map((action) => ({ + action: action?.action, + roles: action.state?.actions?.map((action) => action.roles).join(","), + })); + + + if (processInstances.length > 0) { + // const EnrichedWfData = await makeCommentsSubsidariesOfPreviousActions(processInstances) + //if any documents are there this fn will add thumbnails to show + + await makeCommentsSubsidariesOfPreviousActionsV2(processInstances) + + let timeline = processInstances.map((instance, ind) => { + let checkPoint = { + performedAction: instance.action, + status: instance.state.applicationStatus, + state: instance.state.state, + assigner: instance?.assigner, + rating: instance?.rating, + // wfComment: instance?.wfComments?.map(e => e?.comment), + comment:instance?.comment, + wfDocuments: instance?.documents, + thumbnailsToShow: { thumbs: instance?.thumbnailsToShow?.thumbs, fullImage: instance?.thumbnailsToShow?.images }, + assignes: instance.assignes, + caption: instance.assignes ? instance.assignes?.map((assignee) => ({ name: assignee.name, mobileNumber: assignee.mobileNumber })) : null, + auditDetails: { + created: Digit.DateUtils.ConvertEpochToDate(instance.auditDetails.createdTime), + lastModified: Digit.DateUtils.ConvertEpochToDate(instance.auditDetails.lastModifiedTime), + lastModifiedEpoch: instance.auditDetails.lastModifiedTime, + }, + isTerminateState : instance?.state?.isTerminateState + }; + return checkPoint; + }); + + + const details = { + timeline, + nextActions:actionRolePair, + actionState, + applicationBusinessService: workflow?.ProcessInstances?.[0]?.businessService, + processInstances: applicationProcessInstance, + }; + + + return details; + } + } else { + throw new Error("error fetching workflow services"); + } + return {}; + }, + getDetailsById: async ({ tenantId, id, moduleCode, role, getTripData }) => { + const workflow = await Digit.WorkflowService.getByBusinessId(tenantId, id); + const applicationProcessInstance = cloneDeep(workflow?.ProcessInstances); + const getLocationDetails = window.location.href.includes("/obps/") || window.location.href.includes("noc/inbox"); + const moduleCodeData = getLocationDetails ? applicationProcessInstance?.[0]?.businessService : moduleCode; + const businessServiceResponse = (await Digit.WorkflowService.init(tenantId, moduleCodeData))?.BusinessServices[0]?.states; + if (workflow && workflow.ProcessInstances) { + const processInstances = workflow.ProcessInstances; + const nextStates = processInstances[0]?.nextActions.map((action) => ({ action: action?.action, nextState: processInstances[0]?.state.uuid })); + const nextActions = nextStates.map((id) => ({ + action: id.action, + state: businessServiceResponse?.find((state) => state.uuid === id.nextState), + })); + + /* To check state is updatable and provide edit option*/ + const currentState = businessServiceResponse?.find((state) => state.uuid === processInstances[0]?.state.uuid); + if (currentState && currentState?.isStateUpdatable) { + if (moduleCode === "FSM" || moduleCode === "FSM_POST_PAY_SERVICE" || moduleCode === "FSM_VEHICLE_TRIP" || moduleCode === "PGR" || moduleCode === "OBPS") null; + else nextActions.push({ action: "EDIT", state: currentState }); + } + + const getStateForUUID = (uuid) => businessServiceResponse?.find((state) => state.uuid === uuid); + + const actionState = businessServiceResponse + ?.filter((state) => state.uuid === processInstances[0]?.state.uuid) + .map((state) => { + let _nextActions = state.actions?.map?.((ac) => { + let actionResultantState = getStateForUUID(ac.nextState); + let assignees = actionResultantState?.actions?.reduce?.((acc, act) => { + return [...acc, ...act.roles]; + }, []); + return { ...actionResultantState, assigneeRoles: assignees, action: ac.action, roles: ac.roles }; + }); + if(state?.isStateUpdatable) { + _nextActions.push({ action: "EDIT", ...state, roles: state?.actions?.[0]?.roles}) + } + return { ...state, nextActions: _nextActions, roles: state?.action, roles: state?.actions?.reduce((acc, el) => [...acc, ...el.roles], []) }; + })?.[0]; + + // HANDLING ACTION for NEW VEHICLE LOG FROM UI SIDE + const action_newVehicle = [{ + "action": "READY_FOR_DISPOSAL", + "roles": "FSM_EMP_FSTPO,FSM_EMP_FSTPO" + }] + + const actionRolePair = nextActions?.map((action) => ({ + action: action?.action, + roles: action.state?.actions?.map((action) => action.roles).join(","), + })); + + if (processInstances.length > 0) { + const TLEnrichedWithWorflowData = await makeCommentsSubsidariesOfPreviousActions(processInstances) + let timeline = TLEnrichedWithWorflowData.map((instance, ind) => { + let checkPoint = { + performedAction: instance.action, + status: moduleCode === "BS.AMENDMENT" ? instance.state.state :instance.state.applicationStatus, + state: instance.state.state, + assigner: getAssignerDetails(instance, TLEnrichedWithWorflowData[ind - 1], moduleCode), + rating: instance?.rating, + wfComment: instance?.wfComments.map(e => e?.comment), + wfDocuments: instance?.documents, + thumbnailsToShow: { thumbs: instance?.thumbnailsToShow?.thumbs, fullImage: instance?.thumbnailsToShow?.images }, + assignes: instance.assignes, + caption: instance.assignes ? instance.assignes.map((assignee) => ({ name: assignee.name, mobileNumber: assignee.mobileNumber })) : null, + auditDetails: { + created: Digit.DateUtils.ConvertEpochToDate(instance.auditDetails.createdTime), + lastModified: Digit.DateUtils.ConvertEpochToDate(instance.auditDetails.lastModifiedTime), + lastModifiedEpoch: instance.auditDetails.lastModifiedTime, + }, + timeLineActions: instance.nextActions + ? instance.nextActions.filter((action) => action.roles.includes(role)).map((action) => action?.action) + : null, + }; + return checkPoint; + }); + + if (getTripData) { + try { + const filters = { + businessService: 'FSM_VEHICLE_TRIP', + refernceNos: id + }; + const tripSearchResp = await Digit.FSMService.vehicleSearch(tenantId, filters) + if (tripSearchResp && tripSearchResp.vehicleTrip && tripSearchResp.vehicleTrip.length) { + const numberOfTrips = tripSearchResp.vehicleTrip.length + let cretaedTime = 0 + let lastModifiedTime = 0 + let waitingForDisposedCount = 0 + let disposedCount = 0 + let waitingForDisposedAction = [] + let disposedAction = [] + for (const data of tripSearchResp.vehicleTrip) { + const resp = await Digit.WorkflowService.getByBusinessId(tenantId, data.applicationNo) + resp?.ProcessInstances?.map((instance, ind) => { + if (instance.state.applicationStatus === "WAITING_FOR_DISPOSAL") { + waitingForDisposedCount++ + cretaedTime = Digit.DateUtils.ConvertEpochToDate(instance.auditDetails.createdTime) + lastModifiedTime = Digit.DateUtils.ConvertEpochToDate(instance.auditDetails.lastModifiedTime) + waitingForDisposedAction = [{ + performedAction: instance.action, + status: instance.state.applicationStatus, + state: instance.state.state, + assigner: instance?.assigner, + rating: instance?.rating, + thumbnailsToShow: { thumbs: instance?.thumbnailsToShow?.thumbs, fullImage: instance?.thumbnailsToShow?.images }, + assignes: instance.assignes, + caption: instance.assignes ? instance.assignes.map((assignee) => ({ name: assignee.name, mobileNumber: assignee.mobileNumber })) : null, + auditDetails: { + created: cretaedTime, + lastModified: lastModifiedTime, + }, + numberOfTrips: numberOfTrips + }] + } + if (instance.state.applicationStatus === "DISPOSED") { + disposedCount++ + cretaedTime = instance.auditDetails.createdTime > cretaedTime ? Digit.DateUtils.ConvertEpochToDate(instance.auditDetails.createdTime) : cretaedTime + lastModifiedTime = instance.auditDetails.lastModifiedTime > lastModifiedTime ? Digit.DateUtils.ConvertEpochToDate(instance.auditDetails.lastModifiedTime) : lastModifiedTime + disposedAction = [{ + performedAction: instance.action, + status: instance.state.applicationStatus, + state: instance.state.state, + assigner: instance?.assigner, + rating: instance?.rating, + thumbnailsToShow: { thumbs: instance?.thumbnailsToShow?.thumbs, fullImage: instance?.thumbnailsToShow?.images }, + assignes: instance.assignes, + caption: instance.assignes ? instance.assignes.map((assignee) => ({ name: assignee.name, mobileNumber: assignee.mobileNumber })) : null, + auditDetails: { + created: cretaedTime, + lastModified: lastModifiedTime, + }, + numberOfTrips: disposedCount + }] + } + }) + } + + let tripTimeline = [] + const disposalInProgressPosition = timeline.findIndex((data) => data.status === "DISPOSAL_IN_PROGRESS") + if (disposalInProgressPosition !== -1) { + timeline[disposalInProgressPosition].numberOfTrips = numberOfTrips + timeline.splice(disposalInProgressPosition + 1, 0, ...waitingForDisposedAction) + tripTimeline = disposedAction + } else { + tripTimeline = disposedAction.concat(waitingForDisposedAction) + } + const feedbackPosition = timeline.findIndex((data) => data.status === "CITIZEN_FEEDBACK_PENDING") + if (feedbackPosition !== -1) { + timeline.splice(feedbackPosition + 1, 0, ...tripTimeline) + } else { + timeline = tripTimeline.concat(timeline) + } + } + } catch (err) { } + } + + // HANDLING ACTION FOR NEW VEHICLE LOG FROM UI SIDE + const nextActions = location.pathname.includes("new-vehicle-entry") ? action_newVehicle : actionRolePair; + + if (role !== "CITIZEN" && moduleCode === "PGR") { + const onlyPendingForAssignmentStatusArray = timeline?.filter(e => e?.status === "PENDINGFORASSIGNMENT") + const duplicateCheckpointOfPendingForAssignment = onlyPendingForAssignmentStatusArray.at(-1) + // const duplicateCheckpointOfPendingForAssignment = timeline?.find( e => e?.status === "PENDINGFORASSIGNMENT") + timeline.push({ + ...duplicateCheckpointOfPendingForAssignment, + status: "COMPLAINT_FILED", + }); + } + + if (timeline[timeline.length - 1].status !== "CREATED" && (moduleCode === "FSM" || moduleCode === "FSM_POST_PAY_SERVICE")) + timeline.push({ + status: "CREATED", + }); + + const details = { + timeline, + nextActions, + actionState, + applicationBusinessService: workflow?.ProcessInstances?.[0]?.businessService, + processInstances: applicationProcessInstance, + }; + return details; + } + } else { + throw new Error("error fetching workflow services"); + } + return {}; + }, + + getAllApplication: (tenantId, filters) => { + return Request({ + url: Urls.WorkFlowProcessSearch, + useCache: false, + method: "POST", + params: { tenantId, ...filters }, + auth: true, + }); + }, +}; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/services/index.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/index.js new file mode 100644 index 00000000000..d74d967a9de --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/index.js @@ -0,0 +1,3 @@ +import { useStore, useInitStore } from "../hooks/store"; + +export { useStore, useInitStore }; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/services/molecules/DSS/getDSSDashboardData.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/molecules/DSS/getDSSDashboardData.js new file mode 100644 index 00000000000..cdc4605ad33 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/molecules/DSS/getDSSDashboardData.js @@ -0,0 +1,11 @@ +import useDssMDMS from "../../../hooks/dss/useMDMS"; + +export const getDSSDashboardData = (stateCode, mdmsType, moduleCode) => { + const { data: dssConfig, isLoading: configLoading, isSuccess: configLoaded } = useDssMDMS(stateCode, mdmsType, moduleCode); + return [ + { + queryKey: ["DSS_DASHBOARD_DATA", mdmsType, moduleCode], + queryFn: () => dssConfig, + }, + ]; +}; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/services/molecules/ServiceDefinitions.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/molecules/ServiceDefinitions.js new file mode 100644 index 00000000000..17c076705d8 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/molecules/ServiceDefinitions.js @@ -0,0 +1,57 @@ +import { MdmsService } from "../elements/MDMS"; +import { Storage } from "../atoms/Utils/Storage"; + +export const GetServiceDefinitions = { + get: async (tenantId) => { + const criteria = { + type: "serviceDefs", + details: { + tenantId: tenantId, + moduleDetails: [ + { + moduleName: "RAINMAKER-PGR", + masterDetails: [ + { + name: "ServiceDefs", + }, + ], + }, + ], + }, + }; + + const serviceDefs = await MdmsService.getDataByCriteria(tenantId, criteria, "PGR"); + Storage.set("serviceDefinitions", serviceDefs); + return serviceDefs; + }, + getMenu: async (stateCode, t) => { + var Menu = []; + const response = await GetServiceDefinitions.get(stateCode); + await Promise.all( + response.map((def) => { + if (!Menu.find((e) => e.key === def.menuPath)) { + def.menuPath === "" + ? Menu.push({ + name: t("SERVICEDEFS.OTHERS"), + key: def.menuPath, + }) + : Menu.push({ + name: t("SERVICEDEFS." + def.menuPath.toUpperCase()), + key: def.menuPath, + }); + } + }) + ); + return Menu; + }, + + getSubMenu: async (tenantId, selectedType, t) => { + const fetchServiceDefs = await GetServiceDefinitions.get(tenantId); + return fetchServiceDefs + .filter((def) => def.menuPath === selectedType.key) + .map((id) => ({ + key: id.serviceCode, + name: t("SERVICEDEFS." + id.serviceCode.toUpperCase()), + })); + }, +}; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/services/molecules/ShareFiles.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/molecules/ShareFiles.js new file mode 100644 index 00000000000..99988a0d525 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/molecules/ShareFiles.js @@ -0,0 +1,75 @@ +import Download from "../atoms/Download"; +import { UploadServices } from "../atoms/UploadServices"; +import UrlShortener from "../elements/UrlShortener"; + +const isMobileOrTablet = () => { + return (/(android|iphone|ipad|mobile)/i.test(navigator.userAgent)); +} + +const ShareFiles = { + targetLink: (target, shortUrl) => { + switch (target) { + case "mail": + return window.open(`mailto:?body=${encodeURIComponent(shortUrl)}`, "_blank"); + case "whatsapp": + return window.open('https://' + (isMobileOrTablet() ? 'api' : 'web') + '.whatsapp.com/send?text=' + encodeURIComponent(shortUrl), "_blank"); + default: + return window.open(shortUrl, "_blank"); + } + }, + + getShortener: async (tenantId, data) => { + const fileUploadId = await UploadServices.Filestorage("DSS", data, tenantId); + const fileUrl = await UploadServices.Filefetch([fileUploadId.data.files[0].fileStoreId], fileUploadId.data.files[0].tenantId); + return UrlShortener(Digit.Utils.getFileUrl(fileUrl.data[fileUploadId.data.files[0].fileStoreId])); + }, + + PDF: async (tenantId, node, filename, target) => { + const pdfData = await Download.PDF(node, filename, true); + if (!target && navigator.share) { + return navigator.share({ + files: [pdfData], + title: filename, + }); + } + const shortUrl = await ShareFiles.getShortener(tenantId, pdfData); + return ShareFiles.targetLink(target, shortUrl); + }, + + Image: async (tenantId, node, filename, target) => { + const imageData = await new Promise((resolve) => Download.Image(node, filename, true, resolve)); + if (!target && navigator.share) { + return navigator.share({ + files: [imageData], + title: filename, + }); + } + const shortUrl = await ShareFiles.getShortener(tenantId, imageData); + return ShareFiles.targetLink(target, shortUrl); + }, + + IndividualChartImage: async (tenantId, node, filename, target) => { + const imageData = await new Promise((resolve) => Download.IndividualChartImage(node, filename, true, resolve)); + if (!target && navigator.share) { + return navigator.share({ + files: [imageData], + title: filename, + }); + } + const shortUrl = await ShareFiles.getShortener(tenantId, imageData); + return ShareFiles.targetLink(target, shortUrl); + }, + DownloadImage: async (tenantId, node, filename, target) => { + const imageData = await new Promise((resolve) => Download.PDF(node, filename, true, resolve)); + if (!target && navigator.share) { + return navigator.share({ + files: [imageData], + title: filename, + }); + } + const shortUrl = await ShareFiles.getShortener(tenantId, imageData); + return ShareFiles.targetLink(target, shortUrl); + }, +}; + +export default ShareFiles; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/services/molecules/Store/service.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/molecules/Store/service.js new file mode 100644 index 00000000000..c8dacd95506 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/molecules/Store/service.js @@ -0,0 +1,119 @@ +import { LocalizationService } from "../../elements/Localization/service"; +import { MdmsService } from "../../elements/MDMS"; +import { Storage } from "../../atoms/Utils/Storage"; +import { ApiCacheService } from "../../atoms/ApiCacheService"; + +const getImgUrl = (url, fallbackUrl) => { + if (!url && fallbackUrl) { + return fallbackUrl; + } + if (url?.includes("s3.ap-south-1.amazonaws.com")) { + const baseDomain = window?.location?.origin; + return url.replace("https://s3.ap-south-1.amazonaws.com", baseDomain); + } + return url; +}; +const addLogo = (id, url, fallbackUrl = "") => { + const containerDivId = "logo-img-container"; + let containerDiv = document.getElementById(containerDivId); + if (!containerDiv) { + containerDiv = document.createElement("div"); + containerDiv.id = containerDivId; + containerDiv.style = "position: absolute; top: 0; left: -9999px;"; + document.body.appendChild(containerDiv); + } + const img = document.createElement("img"); + img.src = getImgUrl(url, fallbackUrl); + img.id = `logo-${id}`; + containerDiv.appendChild(img); +}; + +const renderTenantLogos = (stateInfo, tenants) => { + addLogo(stateInfo.code, stateInfo.logoUrl); + tenants.forEach((tenant) => { + addLogo(tenant.code, tenant.logoId, stateInfo.logoUrl); + }); +}; + +export const StoreService = { + getInitData: () => { + return Storage.get("initData"); + }, + + getBoundries: async (tenants) => { + let allBoundries = []; + allBoundries = tenants.map((tenant) => { + return Digit.LocationService.getLocalities(tenant.code); + }); + return await Promise.all(allBoundries); + }, + getRevenueBoundries: async (tenants) => { + let allBoundries = []; + allBoundries = tenants.map((tenant) => { + return Digit.LocationService.getRevenueLocalities(tenant.code); + }); + return await Promise.all(allBoundries); + }, + digitInitData: async (stateCode, enabledModules) => { + const { MdmsRes } = await MdmsService.init(stateCode); + const stateInfo = MdmsRes["common-masters"]?.StateInfo?.[0]||{}; + const uiHomePage = MdmsRes["common-masters"]?.uiHomePage?.[0]||{}; + const localities = {}; + const revenue_localities = {}; + const initData = { + languages: stateInfo.hasLocalisation ? stateInfo.languages : [{ label: "ENGLISH", value: Digit.Utils.getDefaultLanguage() }], + stateInfo: { + code: stateInfo.code, + name: stateInfo.name, + logoUrl: stateInfo.logoUrl, + statelogo: stateInfo.statelogo, + logoUrlWhite: stateInfo.logoUrlWhite, + bannerUrl: stateInfo.bannerUrl, + }, + localizationModules: stateInfo.localizationModules, + modules: MdmsRes?.tenant?.citymodule?.filter((module) => module?.active)?.filter((module) => enabledModules?.includes(module?.code))?.sort((x,y)=>x?.order-y?.order), + uiHomePage: uiHomePage + }; + + + initData.selectedLanguage = Digit.SessionStorage.get("locale") || initData.languages[0].value; + + ApiCacheService.saveSetting(MdmsRes["DIGIT-UI"]?.ApiCachingSettings); + + const moduleTenants = initData.modules + .map((module) => module.tenants) + .flat() + .reduce((unique, ele) => (unique.find((item) => item.code === ele.code) ? unique : [...unique, ele]), []); + initData.tenants = MdmsRes?.tenant?.tenants + .map((tenant) => ({ i18nKey: `TENANT_TENANTS_${tenant.code.replace(".", "_").toUpperCase()}`, ...tenant })); + // .filter((item) => !!moduleTenants.find((mt) => mt.code === item.code)) + // .map((tenant) => ({ i18nKey: `TENANT_TENANTS_${tenant.code.replace(".", "_").toUpperCase()}`, ...tenant })); + + await LocalizationService.getLocale({ + modules: [ + `rainmaker-common`, + `rainmaker-${stateCode.toLowerCase()}` + ], + locale: initData.selectedLanguage, + tenantId: stateCode, + }); + Storage.set("initData", initData); + initData.revenue_localities = revenue_localities; + initData.localities = localities; + setTimeout(() => { + renderTenantLogos(stateInfo, initData.tenants); + }, 0); + return initData; + }, + defaultData: async (stateCode, moduleCode, language) => { + let moduleCodes = []; + if(typeof moduleCode !== "string") moduleCode.forEach(code => { moduleCodes.push(`rainmaker-${code.toLowerCase()}`) }); + const LocalePromise = LocalizationService.getLocale({ + modules: typeof moduleCode == "string" ? [`rainmaker-${moduleCode.toLowerCase()}`] : moduleCodes, + locale: language, + tenantId: stateCode, + }); + await LocalePromise; + return {}; + }, +}; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/services/molecules/StoreData.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/molecules/StoreData.js new file mode 100644 index 00000000000..dcc5e2f8475 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/molecules/StoreData.js @@ -0,0 +1,8 @@ +import { StoreService } from "./Store/service"; + +const StoreData = { + getInitData: () => StoreService.getInitData(), + getCurrentLanguage: () => Digit.SessionStorage.get("locale") || Digit.Utils.getDefaultLanguage(), +}; + +export default StoreData; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/services/molecules/Ulb/index.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/molecules/Ulb/index.js new file mode 100644 index 00000000000..e5249335b20 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/molecules/Ulb/index.js @@ -0,0 +1,148 @@ +import { StoreService } from "../Store/service"; +import { UserService } from "../../elements/User"; + +/** + * Custom service which can be used to + * get current tenantId + * get state tenant + * get current ulb + * get citizen selected tenant + * get all ulbs of employee + * + * @author jagankumar-egov + * + * @example + * Digit.ULBService.getCurrentTenantId() + * + * @returns {Object} Returns based on the called function + */ +export const ULBService = { + /** + * Custom method to get employee's current selected city + * + * @author jagankumar-egov + * + * @example + * Digit.ULBService.getCurrentTenantId() + * + * @returns {String} + */ + getCurrentTenantId: () => { + // TODO: change when setter is done. + const user = UserService.getUser(); + if (user?.extraRoleInfo) { + const isDsoRoute = Digit.Utils.detectDsoRoute(window.location.pathname); + if (isDsoRoute) { + return user.extraRoleInfo?.tenantId; + } + } + //TODO: fix tenant id from userinfo + const tenantId = + user?.info?.type === "EMPLOYEE" && user?.info?.tenantId ? user?.info?.tenantId : window?.globalConfigs.getConfig("STATE_LEVEL_TENANT_ID"); + return tenantId; + }, + /** + * Custom method to get current environment home / state tenant + * + * @author jagankumar-egov + * + * @example + * Digit.ULBService.getStateId() + * + * @returns {String} + */ + getStateId: () => { + return window?.globalConfigs?.getConfig("STATE_LEVEL_TENANT_ID"); + }, + /** + * Custom method to get employee's current ulb object + * + * @author jagankumar-egov + * + * @example + * Digit.ULBService.getCurrentUlb() + * + * @returns {Object} + */ + getCurrentUlb: () => { + const initData = StoreService.getInitData(); + const tenantId = ULBService.getCurrentTenantId(); + return initData.tenants.find((tenant) => tenant.code === tenantId); + } + /** + * Custom method to get citizen's current selected city + * + * @author jagankumar-egov + * + * @example + * Digit.ULBService.getCitizenCurrentTenant() -> will return selected home city if not loggedin users city if not state tenant + * + * Digit.ULBService.getCitizenCurrentTenant(true) -> will return selected home city + * + * @returns {String} + */, + getCitizenCurrentTenant: (selectedCity=false) => { + const homeCity=Digit.SessionStorage.get("CITIZEN.COMMON.HOME.CITY")?.code; + if(selectedCity){ + return homeCity; + } + return homeCity|| Digit.UserService.getUser()?.info?.permanentCity || ULBService.getStateId(); + }, + /** + * Custom method to get all ulb's which the loggedin employee has access to + * + * + * @example + * Digit.ULBService.getUserUlbs() + * + * @returns {Array} array of objects in the following structure + * + * [ { + * i18nKey:"", + * value:"", + * code:"", + * name:"" + * }] + */ + getUserUlbs: (userRole = "") => { + const stringReplaceAll = (str = "", searcher = "", replaceWith = "") => { + if (searcher == "") return str; + while (str?.includes(searcher)) { + str = str?.replace(searcher, replaceWith); + } + return str; + }; + + const userloggedValues = Digit.SessionStorage.get("citizen.userRequestObject"); + let teantsArray = [], + filteredArray = []; + if (userRole === "") { + userloggedValues?.info?.roles?.forEach((role) => teantsArray.push(role.tenantId)); + let unique = teantsArray.filter((item, i, ar) => ar.indexOf(item) === i); + + unique?.forEach((uniCode) => { + filteredArray.push({ + i18nKey: `TENANT_TENANTS_${stringReplaceAll(uniCode, ".", "_")?.toUpperCase()}`, + value: uniCode, + code: uniCode, + name: uniCode.substring(uniCode.indexOf(".") + 1), + }); + }); + return filteredArray; + } else { + userloggedValues?.info?.roles?.forEach((role) => { + if (userRole === role.code) teantsArray.push(role.tenantId); + }); + let unique = teantsArray.filter((item, i, ar) => ar.indexOf(item) === i); + unique?.forEach((uniCode) => { + filteredArray.push({ + i18nKey: `TENANT_TENANTS_${stringReplaceAll(uniCode, ".", "_")?.toUpperCase()}`, + value: uniCode, + code: uniCode, + name: uniCode.substring(uniCode.indexOf(".") + 1), + }); + }); + return filteredArray; + } + } +}; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/services/molecules/getLocalities.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/molecules/getLocalities.js new file mode 100644 index 00000000000..84c713e4e48 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/services/molecules/getLocalities.js @@ -0,0 +1,13 @@ +import { LocationService } from "../elements/Location"; +import { StoreService } from "./Store/service"; + +export const getLocalities = { + admin: async (tenant) => { + await StoreService.defaultData(tenant, tenant, Digit.StoreData.getCurrentLanguage()); + return (await LocationService.getLocalities(tenant)).TenantBoundary[0]; + }, + revenue: async (tenant) => { + await StoreService.defaultData(tenant, tenant, Digit.StoreData.getCurrentLanguage()); + return (await LocationService.getRevenueLocalities(tenant)).TenantBoundary[0]; + }, +}; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/subFormRegistry.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/subFormRegistry.js new file mode 100644 index 00000000000..0ffa4ecd055 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/subFormRegistry.js @@ -0,0 +1,43 @@ +export class SubformRegistry { + constructor(registry = {}) { + this._registry = registry; + } + + getSubform = (key) => this._registry[key]; + + addSubForm = (key, config) => (this._registry[key] = config); + + changeConfig = async (key, callBack) => { + let config = this.getSubform(key); + let newConfig = await callBack(config); + this._registry[key] = newConfig; + }; + + addMiddleware = ( + subFormKey, + middlewareKey, + middlewareFn, + { functionName, preceedingName = "", preceedingIndex = null, exceedingName = "", exceedingIndex = null } + ) => { + let config = this.getSubform(subFormKey); + let { middlewares } = config; + const setPreceedingIndex = (preceedingIndex) => { + let firstChunk = middlewares.splice(0, preceedingIndex + 1); + middlewares = [...firstChunk, { [functionName]: middlewareFn }, ...middlewares]; + }; + + const setExceedingIndex = (exceedingIndex) => { + let firstChunk = middlewares.splice(0, exceedingIndex); + middlewares = [...firstChunk, { [functionName]: middlewareFn }, ...middlewares]; + }; + + if (preceedingIndex) setPreceedingIndex(preceedingIndex); + else if (exceedingIndex) setExceedingIndex(exceedingIndex); + else if (preceedingName) { + let element = middlewares.filter((e) => Object.keys(e)[0] === preceedingName)[0] || null; + } else if (exceedingName) { + } + }; +} + +export const subFormRegistry = new SubformRegistry({}); diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/translations/index.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/translations/index.js new file mode 100644 index 00000000000..9c54bbea397 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/translations/index.js @@ -0,0 +1,61 @@ +import i18next from "i18next"; +import { initReactI18next } from "react-i18next"; +import ReactPostprocessor from "i18next-react-postprocessor"; + +const i18nextConfig = () => ({ + lng: Digit.StoreData.getCurrentLanguage(), + fallbackLng: Digit.Utils.getDefaultLanguage(), + debug: false, + ns: ["translations"], + defaultNS: "translations", + keySeparator: false, + saveMissing: false, + saveMissingTo: "current", + interpolation: { + escapeValue: false, + formatSeparator: ",", + }, + postProcess: [`reactPostprocessor`, "templatePostprocessor"], + react: { + useSuspense: true, + bindI18n: "loaded", + bindI18nStore: "added", + }, + resources: { + [Digit.Utils.getDefaultLanguage()]: { + translations: { + welcome: "Welcome", + }, + }, + }, +}); + +function replaceLiterals(text = "", dynamicValues = {}) { + let returnText = text; + const regex = /[^\{\{][\{]\w+/; + if (regex.exec(text) !== null) { + Object.keys(dynamicValues).forEach((key) => { + returnText = returnText.replace(`{${key.toUpperCase()}}`, dynamicValues[key]); + }); + } + return returnText; +} + +const templatePostprocessor = { + type: "postProcessor", + name: "templatePostprocessor", + process: function (value, key, options, translator) { + return replaceLiterals(value, options); + }, +}; + +export const initI18n = (callback) => { + return i18next + .use(new ReactPostprocessor()) + .use(templatePostprocessor) + .use(initReactI18next) + .init(i18nextConfig(), () => { + window.i18next = i18next; + callback(); + }); +}; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/utils/browser.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/utils/browser.js new file mode 100644 index 00000000000..56074b71c90 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/utils/browser.js @@ -0,0 +1,35 @@ +const checkWebview = () => { + const ua = navigator.userAgent; + let rules = [ + // if it says it's a webview, let's go with that + "WebView", + // iOS webview will be the same as safari but missing "Safari" + "(iPhone|iPod|iPad)(?!.*Safari)", + // Android Lollipop and Above: webview will be the same as native but it will contain "wv" + // Android KitKat to lollipop webview will put {version}.0.0.0 + "Android.*(wv|.0.0.0)", + // old chrome android webview agent + "Linux; U; Android", + ]; + + const webviewRegExp = new RegExp("(" + rules.join("|") + ")", "ig"); + return !!ua.match(webviewRegExp); +}; + +const mobileCheck = () => { + let check = false; + (function (a) { + if ( + /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test( + a + ) || + /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test( + a.substr(0, 4) + ) + ) + check = true; + })(navigator.userAgent || navigator.vendor || window.opera); + return check; +}; + +export default { isWebview: checkWebview, isMobile: mobileCheck }; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/utils/componentRegistry.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/utils/componentRegistry.js new file mode 100644 index 00000000000..8c1a5a2bbec --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/utils/componentRegistry.js @@ -0,0 +1,23 @@ +class ComponentRegistry { + constructor() { + this._registry = {}; + } + + getComponent(id) { + return this._registry[id]; + } + + setComponent(id, component) { + this._registry[id] = component; + return true; + } + + setAllComponents(components) { + Object.entries(components).forEach(([key, value]) => { + this.setComponent(key, value); + }); + return this._registry; + } +} + +export default ComponentRegistry; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/utils/date.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/utils/date.js new file mode 100644 index 00000000000..c6a547946a3 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/utils/date.js @@ -0,0 +1,20 @@ +function getDate(timestamp) { + const dt = timestamp ? new Date(timestamp) : new Date(); + let dd = dt.getDate(); + let mm = dt.getMonth() + 1; + var yyyy = dt.getFullYear(); + + if (dd < 10) { + dd = "0" + dd; + } + + if (mm < 10) { + mm = "0" + mm; + } + + return yyyy + "-" + mm + "-" + dd; +} + +const monthNames = ["Jan", "Feb", "March", "Apr", "May", "June", "July", "Aug", "Sep", "Oct", "Nov", "Dec"]; + +export { getDate, monthNames }; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/utils/dss/dynamicRequestGenerator.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/utils/dss/dynamicRequestGenerator.js new file mode 100644 index 00000000000..9d5d4b2a820 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/utils/dss/dynamicRequestGenerator.js @@ -0,0 +1,101 @@ +import { Request } from "../../services/atoms/Utils/Request"; +export const getFilterValue = (filter) => { + if (filter?.source?.type == 'request') { + return getRequestFilterValues(filter); + } else if (filter?.source?.type == 'list') { + return getListFilterValues(filter); + } else return; +} + +const getRequestFilterValues = (filter) => { + return new Promise((resolve, reject) => { + try { + let request = getRequestPayload(filter.source); + Request(request).then((res) => { + var jp = require('jsonpath'); + let keys = jp.query(res, filter.source.keyPath); + let values = jp.query(res, filter.source.valuesPath); + let filtersValues = []; + if (keys && values && keys.length && values.length && keys.length == values.length) { + keys.forEach((key, idx) => { + filtersValues.push({'key': key, 'value': values[idx]}) + }) + } + resolve({'id': filter.id, 'values': filtersValues}) + }).catch(err => { + resolve({'id': filter.id, 'values': null}) + }) + } catch (error) { + reject(error); + } + }) +} + +const getListFilterValues = (filter) => { + return new Promise((resolve, reject) => { + let listValue = filter.source.list; + var jp = require('jsonpath'); + let keys = jp.query(listValue, filter.source.keyPath); + let values = jp.query(listValue, filter.source.valuesPath); + let filtersValues = []; + if (keys && values && keys.length && values.length && keys.length == values.length) { + keys.forEach((key, idx) => { + filtersValues.push({'key': key, 'value': values[idx]}) + }) + } + resolve({'id': filter.id, 'values': filtersValues}) + }) +} + +const getRequestPayload = (filterConfig) => { + let request = {}; + request["method"] = filterConfig?.requestMethod ? filterConfig.requestMethod : "POST"; + request["url"] = filterConfig?.hostUrl ? filterConfig.hostUrl + filterConfig.requestUrl : filterConfig.requestUrl; + request["authHeader"] = true; + request["useCache"] = true; + request["userService"] = true; + request["locale"] = true; + if (filterConfig?.requestBody && filterConfig.requestBody.length) { + request["data"] = JSON.parse(filterConfig.requestBody); + } + return request; +} + +export const getParsedRequest = (filterSource, filterValues) => { + var jp = require('jsonpath'); + if (filterSource?.requestUrl && filterSource?.requestUrl.length) { + let replacableList = getReplacableValues(filterSource.requestUrl); + replacableList.forEach((str) => { + let value = jp.query(filterValues, str); + filterSource.requestUrl = filterSource.requestUrl.replace(`{${str}}`, value) + }) + } + if (filterSource?.requestBody && filterSource?.requestBody.length) { + let replacableList = getReplacableValues(filterSource.requestBody); + replacableList.forEach((str) => { + let value = jp.query(filterValues, str); + filterSource.requestBody = filterSource.requestBody.replace(`{${str}}`, value) + }) + } + return filterSource; +} + +const getReplacableValues = (requestString) => { + let replacableValues = []; + let isReplacable = false; + let replacableStr = ""; + for (let idx=0; idx { + const currencyFormatter = new Intl.NumberFormat("en-IN", { currency: "INR" }); + + switch (denomination) { + case "Lac": + return `₹ ${currencyFormatter.format((value / 100000).toFixed(2) || 0)} ${t("ES_DSS_LAC")}`; + case "Cr": + return `₹ ${currencyFormatter.format((value / 10000000).toFixed(2) || 0)} ${t("ES_DSS_CR")}`; + case "Unit": + return `₹ ${currencyFormatter.format(value?.toFixed(2) || 0)}`; + default: + return ""; + } +}; + +export const formatter = (value, symbol, unit, commaSeparated = true, t) => { + if (!value && value !== 0) return ""; + switch (symbol) { + case "amount": + return amountFormatter(value, unit, t); + //this case needs to be removed as backend should handle case sensitiviy from their end + case "Amount": + return amountFormatter(value, unit, t); + case "number": + if (!commaSeparated) { + return parseInt(value); + } + const Nformatter = new Intl.NumberFormat("en-IN"); + return Nformatter.format(value); + case "percentage": + const Pformatter = new Intl.NumberFormat("en-IN", { maximumSignificantDigits: 3 }); + return `${Pformatter.format(value.toFixed(2))} %`; + default: + return ""; + } +}; + +export const getDuration = (startDate, endDate) => { + let noOfDays = (new Date(endDate).getTime() - new Date(startDate).getTime()) / (1000 * 3600 * 24); + if (noOfDays > 91) { + return "month"; + } + if (noOfDays < 90 && noOfDays >= 14) { + return "week"; + } + if (noOfDays <= 14) { + return "day"; + } +}; + +export const getInitialRange = () => { + const startDate = addMonths(startOfYear(new Date()), 3); + const endDate = addMonths(endOfYear(new Date()), 3); + const title = `${format(startDate, "MMM d, yy")} - ${format(endDate, "MMM d, yy")}`; + const duration = Digit.Utils.dss.getDuration(startDate, endDate); + return { startDate, endDate, title, duration }; +}; + +export const getDatesBackFromToday = (numberOfDays) => { + const endDate = endOfDay(new Date()); + const startDate = startOfDay(addDays(new Date(), - (numberOfDays-1))); + const title = `${format(startDate, "MMM d, yy")} - ${format(endDate, "MMM d, yy")}`; + const duration = Digit.Utils.dss.getDuration(startDate, endDate); + return { startDate, endDate, title, duration }; +}; + +export const getDateDiffrenence = (startDate, endDate) => { + return differenceInDays(startDate, endDate); +} + +export const getDefaultFinacialYear = () => { + const currDate = new Date().getMonth(); + if (currDate < 3) { + return { + startDate: subYears(addMonths(startOfYear(new Date()), 3), 1), + endDate: endOfToday(new Date()), + // endDate: subYears(addMonths(endOfYear(new Date()), 3), 1), RAIN-5752 : to keep date till current date and not a financial year + + }; + } else { + return { + startDate: addMonths(startOfYear(new Date()), 3), + endDate: endOfToday(new Date()), +// endDate: addMonths(endOfYear(new Date()), 3), + + }; + } +}; + +/* Used in DSS to get the current module id */ +export const getCurrentModuleName=()=>{ + const allPaths= window.location.pathname.split('/'); + return allPaths[allPaths.length-1]; +} + +/* Used in DSS to get the filtered ulbs for selected city */ +export const checkSelected = (e, selectedDDRs) => { + if (!selectedDDRs || selectedDDRs?.length == 0) { + return true; + } else if (selectedDDRs.find((ddr) => ddr.ddrKey == e.ddrKey)) { + return true; + } else { + return false; + } +}; + + +/* Used in DSS to get the filtered ulbs for selected city for global filter*/ +export const getCitiesAvailable = (e, selectedDDRs) => { + if (!selectedDDRs || selectedDDRs?.length == 0) { + return true; + } else if (selectedDDRs.find((ddr) => ddr == e.ddrKey)) { + return true; + } else { + return false; + } +}; + +export const getCustomFiltersDynamicValues = async (filterConfig, dynamicValues) => { + if (filterConfig && dynamicValues) { + filterConfig = filterConfig.map((filter) => { + if (filter?.source?.type == 'request') { + filter.source = getParsedRequest(filter.source, dynamicValues); + } + return filter; + }) + } + return filterConfig; +} + +export const getFilterOptionsForConfig = async (filterConfig) => { + let filtersData = {}; + if (filterConfig) { + let requests = []; + filterConfig.forEach((filter) => { + if (filter?.source) { + requests.push(getFilterValue(filter)) + } + }) + await Promise.all(requests).then((res) => { + if (res && res.length) { + res.forEach((filterRes) => { + if (filterRes?.id && filterRes?.values) + filtersData[filterRes.id] = filterRes?.values; + }) + } + }); + } + return filtersData; +} \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/utils/fileType.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/utils/fileType.js new file mode 100644 index 00000000000..1eb15cfa65d --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/utils/fileType.js @@ -0,0 +1,7 @@ +const getFileTypeFromFileStoreURL = (filestoreURL) => { + if(filestoreURL.includes(".pdf")) return "pdf" + if(filestoreURL.includes(".jpg") || filestoreURL.includes(".jpeg") || filestoreURL.includes(".png") || filestoreURL.includes(".webp")) return "image" + else return "image" +} + +export default getFileTypeFromFileStoreURL \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/utils/fonts.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/utils/fonts.js new file mode 100644 index 00000000000..da43efdb324 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/utils/fonts.js @@ -0,0 +1,2 @@ +export const Fonts = { + }; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/utils/fsm/index.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/utils/fsm/index.js new file mode 100644 index 00000000000..8f93bafae51 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/utils/fsm/index.js @@ -0,0 +1,94 @@ +export const getPropertyTypeLocale = (value) => { + return `PROPERTYTYPE_MASTERS_${value?.split(".")[0]}`; +}; + +export const getPropertySubtypeLocale = (value) => `PROPERTYTYPE_MASTERS_${value}`; + +export const getVehicleType = (vehicle, t) => { + return (vehicle?.i18nKey && vehicle?.capacity && `${t(vehicle.i18nKey)} - ${vehicle.capacity} ${t("CS_COMMON_CAPACITY_LTRS")}`) || null; +}; + +export const updateConfiguration = ({ config, defaultConfig, detailsConfig, customConfiguration, isDefaultConfig }) => { + const fieldSectionNamesInsideConfig = []; + const detailsConfigCopy = { ...detailsConfig }; + + customConfiguration.forEach((detail) => { + // Adding custom fields to FieldSection fields array (body) + if (detailsConfigCopy[detail.name] && detail.addFields) { + detailsConfigCopy[detail.name].body.push(...detail.addFields); + } + + let body = []; + + // adding fields to body array + if (detail?.fieldsOrder?.length > 0) { + // fields order + detail.fieldsOrder.forEach((fieldName) => { + if (detailsConfigCopy[detail.name]) { + body.push(detailsConfigCopy[detail.name].body.find((value) => value.name === fieldName)); + } + }); + + // adding remaining fields to the body array which are not in detail?.fieldsOrder + if (detail?.allFields) { + detailsConfigCopy[detail.name]?.body?.forEach((field) => { + if (!detail?.fieldsOrder?.includes(field.name)) { + body.push(detailsConfigCopy[detail.name].body.find((value) => value.name === field.name)); + } + }); + } + } else { + body = detailsConfigCopy[detail.name].body; + } + + // remove fields + if (detail?.removeFields) { + detail?.removeFields?.forEach((fieldName) => { + body = body.filter((field) => field.name !== fieldName); + }); + } + + // adding FieldSection to config + if (detailsConfigCopy[detail.name]) { + config.push({ + head: detailsConfigCopy[detail.name].head, + body, + }); + fieldSectionNamesInsideConfig.push(detail.name); + } + }); + + // adding remaining FieldSection to config + if (isDefaultConfig) { + defaultConfig?.forEach((fieldSectionName) => { + if (!fieldSectionNamesInsideConfig.includes(fieldSectionName) && detailsConfigCopy[fieldSectionName]) { + config.push(detailsConfigCopy[fieldSectionName]); + fieldSectionNamesInsideConfig.push(fieldSectionName); + } + }); + } +}; + +// How to use above updateConfiguration function +// let config = []; + +// const defaultConfig = ["applicationDetails", "propertyDetails", "locationDetails", "paymentDetails"]; + +// const { Customizations } = window.Digit; +// let employeeCustomizations = false; + +// if (Customizations?.FSM?.getEmployeeApplicationCustomization) { +// employeeCustomizations = Customizations?.FSM?.getEmployeeApplicationCustomization(defaultConfig, t); +// } + +// if (employeeCustomizations?.config?.length > 0) { +// updateConfiguration({ +// config, +// defaultConfig, +// detailsConfig, +// customConfiguration: employeeCustomizations?.config, +// isDefaultConfig: employeeCustomizations?.defaultConfig, +// }); +// } else { +// defaultConfig.forEach((fieldSectionName) => config.push(detailsConfig[fieldSectionName])); +// } diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/utils/index.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/utils/index.js new file mode 100644 index 00000000000..460e4d7d599 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/utils/index.js @@ -0,0 +1,382 @@ +import BrowserUtil from "./browser"; +import * as date from "./date"; +import * as dss from "./dss"; +import * as locale from "./locale"; +import * as obps from "./obps"; +import * as pt from "./pt"; +import * as privacy from "./privacy"; +import PDFUtil, { downloadReceipt ,downloadPDFFromLink,downloadBill ,getFileUrl} from "./pdf"; +import getFileTypeFromFileStoreURL from "./fileType"; +import preProcessMDMSConfig from "./preProcessMDMSConfig"; +import preProcessMDMSConfigInboxSearch from "./preProcessMDMSConfigInboxSearch"; +import * as parsingUtils from "../services/atoms/Utils/ParsingUtils" +const GetParamFromUrl = (key, fallback, search) => { + if (typeof window !== "undefined") { + search = search || window.location.search; + const params = new URLSearchParams(search); + return params.has(key) ? params.get(key) : fallback; + } + return fallback; +}; + +const getPattern = (type) => { + switch (type) { + case "Name": + return /^[^{0-9}^\$\"<>?\\\\~!@#$%^()+={}\[\]*,/_:;“”‘’]{1,50}$/i; + case "SearchOwnerName": + return /^[^{0-9}^\$\"<>?\\\\~!@#$%^()+={}\[\]*,/_:;“”‘’]{3,50}$/i; + case "MobileNo": + return /^[6789][0-9]{9}$/i; + case "Amount": + return /^[0-9]{0,8}$/i; + case "NonZeroAmount": + return /^[1-9][0-9]{0,7}$/i; + case "DecimalNumber": + return /^\d{0,8}(\.\d{1,2})?$/i; + case "Email": + return /^(?=^.{1,64}$)((([^<>()\[\]\\.,;:\s$*@'"]+(\.[^<>()\[\]\\.,;:\s@'"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,})))$/i; + case "Address": + return /^[^\$\"<>?\\\\~`!@$%^()+={}\[\]*:;“”‘’]{1,500}$/i; + case "PAN": + return /^[A-Za-z]{5}\d{4}[A-Za-z]{1}$/i; + case "TradeName": + return /^[-@.\/#&+\w\s]*$/; + case "Date": + return /^[12]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/i; + case "UOMValue": + return /^(0)*[1-9][0-9]{0,5}$/i; + case "OperationalArea": + return /^(0)*[1-9][0-9]{0,6}$/i; + case "NoOfEmp": + return /^(0)*[1-9][0-9]{0,6}$/i; + case "GSTNo": + return /^\d{2}[A-Z]{5}\d{4}[A-Z]{1}\d[Z]{1}[A-Z\d]{1}$/i; + case "DoorHouseNo": + return /^[^\$\"'<>?~`!@$%^={}\[\]*:;“”‘’]{1,50}$/i; + case "BuildingStreet": + return /^[^\$\"'<>?\\\\~`!@$%^()+={}\[\]*.:;“”‘’]{1,64}$/i; + case "Pincode": + return /^[1-9][0-9]{5}$/i; + case "Landline": + return /^[0-9]{11}$/i; + case "PropertyID": + return /^[a-zA-z0-9\s\\/\-]$/i; + case "ElectricityConnNo": + return /^.{1,15}$/i; + case "DocumentNo": + return /^[0-9]{1,15}$/i; + case "eventName": + return /^[^\$\"<>?\\\\~`!@#$%^()+={}\[\]*,.:;“”]{1,65}$/i; + case "eventDescription": + return /^[^\$\"'<>?\\\\~`!@$%^()+={}\[\]*.:;“”‘’]{1,500}$/i; + case "cancelChallan": + return /^[^\$\"'<>?\\\\~`!@$%^()+={}\[\]*.:;“”‘’]{1,100}$/i; + case "FireNOCNo": + return /^[a-zA-Z0-9-]*$/i; + case "consumerNo": + return /^[a-zA-Z0-9/-]*$/i; + case "AadharNo": + return /^([0-9]){12}$/; + case "ChequeNo": + return /^(?!0{6})[0-9]{6}$/; + case "Comments": + return /^[^\$\"'<>?\\\\~`!@$%^()+={}\[\]*.:;“”‘’]{1,50}$/i; + case "OldLicenceNo": + return /^[a-zA-Z0-9-/]{0,64}$/; + case "bankAccountNo": + return /^\d{9,18}$/; + case "IFSC": + return /^[A-Z]{4}0[A-Z0-9]{6}$/; + case "ApplicationNo": + return /^[a-zA-z0-9\s\\/\-]$/i; + } +}; +/* +Digit.Utils.getUnique() +get unique elements from an array */ +const getUnique = (arr) => { + return arr.filter((value, index, self) => self.indexOf(value) === index); +}; + +/* +Digit.Utils.createFunction() +get function from a string */ +const createFunction = (functionAsString) => { + return Function("return " + functionAsString)(); +}; + +const getStaticMapUrl = (latitude, longitude) => { + const key = globalConfigs?.getConfig("GMAPS_API_KEY"); + return `https://maps.googleapis.com/maps/api/staticmap?markers=${latitude},${longitude}&zoom=15&size=400x400&key=${key}&style=element:geometry%7Ccolor:0xf5f5f5&style=element:labels.icon%7Cvisibility:off&style=element:labels.text.fill%7Ccolor:0x616161&style=element:labels.text.stroke%7Ccolor:0xf5f5f5&style=feature:administrative.land_parcel%7Celement:labels.text.fill%7Ccolor:0xbdbdbd&style=feature:poi%7Celement:geometry%7Ccolor:0xeeeeee&style=feature:poi%7Celement:labels.text.fill%7Ccolor:0x757575&style=feature:poi.park%7Celement:geometry%7Ccolor:0xe5e5e5&style=feature:poi.park%7Celement:labels.text.fill%7Ccolor:0x9e9e9e&style=feature:road%7Celement:geometry%7Ccolor:0xffffff&style=feature:road.arterial%7Celement:labels.text.fill%7Ccolor:0x757575&style=feature:road.highway%7Celement:geometry%7Ccolor:0xdadada&style=feature:road.highway%7Celement:labels.text.fill%7Ccolor:0x616161&style=feature:road.local%7Celement:labels.text.fill%7Ccolor:0x9e9e9e&style=feature:transit.line%7Celement:geometry%7Ccolor:0xe5e5e5&style=feature:transit.station%7Celement:geometry%7Ccolor:0xeeeeee&style=feature:water%7Celement:geometry%7Ccolor:0xc9c9c9&style=feature:water%7Celement:labels.text.fill%7Ccolor:0x9e9e9e`; +}; + +/** + * Custom util to get the default region + * + * @author jagankumar-egov + * + * @example + * Digit.Hooks.Utils.getLocaleRegion() + * + * @returns {string} + */ +const getLocaleRegion = () => { + return window?.globalConfigs?.getConfig("LOCALE_REGION") || "IN"; +}; +/** + * Custom util to get the default locale + * + * @author jagankumar-egov + * + * @example + * Digit.Hooks.Utils.getLocaleDefault() + * + * @returns {string} + */ +const getLocaleDefault = () => { + return globalConfigs?.getConfig("LOCALE_DEFAULT") || "en"; +}; + +/** + * Custom util to get the default language + * + * @author jagankumar-egov + * + * @example + * Digit.Hooks.Utils.getDefaultLanguage() + * + * @returns {string} + */ +const getDefaultLanguage = () => { + return `${getLocaleDefault()}_${getLocaleRegion()}`; +}; + +const detectDsoRoute = (pathname) => { + const employeePages = ["search", "inbox", "dso-dashboard", "dso-application-details", "user"]; + + return employeePages.some((url) => pathname.split("/").includes(url)); +}; + +const routeSubscription = (pathname) => { + let classname = "citizen"; + const isEmployeeUrl = detectDsoRoute(pathname); + if (isEmployeeUrl && classname === "citizen") { + return (classname = "employee"); + } else if (!isEmployeeUrl && classname === "employee") { + return (classname = "citizen"); + } +}; + + +/* to check the employee (loggedin user ) has given role */ +const didEmployeeHasRole = (role = "") => { + const tenantId = Digit.ULBService.getCurrentTenantId(); + const userInfo = Digit.UserService.getUser(); + const rolearray = userInfo?.info?.roles.filter((item) => { + if (item.code === role && item.tenantId === tenantId) return true; + }); + return rolearray?.length > 0; +}; + +/* to check the employee (loggedin user ) has given roles */ +const didEmployeeHasAtleastOneRole = (roles = []) => { + return roles.some((role) => didEmployeeHasRole(role)); +}; + +const pgrAccess = () => { + const userInfo = Digit.UserService.getUser(); + const userRoles = userInfo?.info?.roles?.map((roleData) => roleData?.code); + const pgrRoles = ["PGR_LME", "PGR-ADMIN", "CSR", "CEMP", "FEMP", "DGRO", "ULB Operator", "GRO", "GO", "RO", "GA"]; + + const PGR_ACCESS = userRoles?.filter((role) => pgrRoles.includes(role)); + + return PGR_ACCESS?.length > 0; +}; + +const fsmAccess = () => { + const userInfo = Digit.UserService.getUser(); + const userRoles = userInfo?.info?.roles?.map((roleData) => roleData?.code); + const fsmRoles = [ + "FSM_CREATOR_EMP", + "FSM_EDITOR_EMP", + "FSM_VIEW_EMP", + "FSM_REPORT_VIEWER", + "FSM_DASHBOARD_VIEWER", + "FSM_ADMIN", + "FSM_DSO", + "FSM_DRIVER", + "FSM_EMP_FSTPO", + "FSM_COLLECTOR", + ]; + + const FSM_ACCESS = userRoles?.filter((role) => fsmRoles?.includes(role)); + + return FSM_ACCESS?.length > 0; +}; + +const NOCAccess = () => { + const userInfo = Digit.UserService.getUser(); + const userRoles = userInfo?.info?.roles?.map((roleData) => roleData?.code); + + const NOC_ROLES = [ + "FIRE_NOC_APPROVER" + ] + + const NOC_ACCESS = userRoles?.filter((role) => NOC_ROLES?.includes(role)); + + return NOC_ACCESS?.length > 0; +}; + +const BPAREGAccess = () => { + const userInfo = Digit.UserService.getUser(); + const userRoles = userInfo?.info?.roles?.map((roleData) => roleData?.code); + + const BPAREG_ROLES = ["BPAREG_APPROVER", "BPAREG_DOC_VERIFIER"]; + + const BPAREG_ACCESS = userRoles?.filter((role) => BPAREG_ROLES?.includes(role)); + + return BPAREG_ACCESS?.length > 0; +}; + +const BPAAccess = () => { + const userInfo = Digit.UserService.getUser(); + const userRoles = userInfo?.info?.roles?.map((roleData) => roleData?.code); + + const BPA_ROLES = [ + "BPA_VERIFIER", + "CEMP", + "BPA_APPROVER", + "BPA_FIELD_INSPECTOR", + "BPA_NOC_VERIFIER", + "AIRPORT_AUTHORITY_APPROVER", + "FIRE_NOC_APPROVER", + "NOC_DEPT_APPROVER", + "BPA_NOC_VERIFIER", + "BPA_TOWNPLANNER", + "BPA_ENGINEER", + "BPA_BUILDER", + "BPA_STRUCTURALENGINEER", + "BPA_SUPERVISOR", + "BPA_DOC_VERIFIER", + "EMPLOYEE", + ]; + + const BPA_ACCESS = userRoles?.filter((role) => BPA_ROLES?.includes(role)); + + return BPA_ACCESS?.length > 0; +}; + +const ptAccess = () => { + const userInfo = Digit.UserService.getUser(); + const userRoles = userInfo?.info?.roles?.map((roleData) => roleData?.code); + const ptRoles = ["PT_APPROVER", "PT_CEMP", "PT_DOC_VERIFIER", "PT_FIELD_INSPECTOR"]; + + const PT_ACCESS = userRoles?.filter((role) => ptRoles?.includes(role)); + + return PT_ACCESS?.length > 0; +}; + +const tlAccess = () => { + const userInfo = Digit.UserService.getUser(); + const userRoles = userInfo?.info?.roles?.map((roleData) => roleData?.code); + const tlRoles = ["TL_CEMP", "TL_APPROVER", "TL_FIELD_INSPECTOR", "TL_DOC_VERIFIER"]; + + const TL_ACCESS = userRoles?.filter((role) => tlRoles?.includes(role)); + + return TL_ACCESS?.length > 0; +}; + +const mCollectAccess = () => { + const userInfo = Digit.UserService.getUser(); + const userRoles = userInfo?.info?.roles?.map((roleData) => roleData?.code); + const mCollectRoles = ["UC_EMP"]; + + const MCOLLECT_ACCESS = userRoles?.filter((role) => mCollectRoles?.includes(role)); + + return MCOLLECT_ACCESS?.length > 0; +}; + +const receiptsAccess = () => { + const userInfo = Digit.UserService.getUser(); + const userRoles = userInfo?.info?.roles.map((roleData) => roleData?.code); + const receiptsRoles = ["CR_PT"]; + const RECEIPTS_ACCESS = userRoles?.filter((role) => receiptsRoles?.includes(role)); + return RECEIPTS_ACCESS?.length > 0; +}; +const hrmsRoles = ["HRMS_ADMIN"]; +const hrmsAccess = () => { + const userInfo = Digit.UserService.getUser(); + const userRoles = userInfo?.info?.roles?.map((roleData) => roleData?.code); + const HRMS_ACCESS = userRoles?.filter((role) => hrmsRoles?.includes(role)); + return HRMS_ACCESS?.length > 0; +}; + +const wsAccess = () => { + const userInfo = Digit.UserService.getUser(); + const userRoles = userInfo?.info?.roles?.map((roleData) => roleData?.code); + const waterRoles = ["WS_CEMP", "WS_APPROVER", "WS_FIELD_INSPECTOR", "WS_DOC_VERIFIER","WS_CLERK"]; + + const WS_ACCESS = userRoles?.filter((role) => waterRoles?.includes(role)); + + return WS_ACCESS?.length > 0; +}; + +const swAccess = () => { + const userInfo = Digit.UserService.getUser(); + const userRoles = userInfo?.info?.roles?.map((roleData) => roleData?.code); + const sewerageRoles = ["SW_CEMP", "SW_APPROVER", "SW_FIELD_INSPECTOR", "SW_DOC_VERIFIER","SW_CLERK"]; + + const SW_ACCESS = userRoles?.filter((role) => sewerageRoles?.includes(role)); + + return SW_ACCESS?.length > 0; +}; + +/* to get the MDMS config module name */ +const getConfigModuleName = () => { + return window?.globalConfigs?.getConfig("UICONFIG_MODULENAME") || "commonUiConfig"; +}; +export default { + pdf: PDFUtil, + createFunction, + downloadReceipt, + downloadBill, + downloadPDFFromLink, + downloadBill, + getFileUrl, + getFileTypeFromFileStoreURL, + browser: BrowserUtil, + locale, + date, + GetParamFromUrl, + getStaticMapUrl, + detectDsoRoute, + routeSubscription, + pgrAccess, + fsmAccess, + BPAREGAccess, + BPAAccess, + dss, + obps, + pt, + ptAccess, + NOCAccess, + mCollectAccess, + receiptsAccess, + didEmployeeHasRole, + didEmployeeHasAtleastOneRole, + hrmsAccess, + getPattern, + hrmsRoles, + getUnique, + tlAccess, + wsAccess, + swAccess, + getConfigModuleName, + preProcessMDMSConfig, + preProcessMDMSConfigInboxSearch, + parsingUtils, + ...privacy, + getDefaultLanguage, + getLocaleDefault, + getLocaleRegion +}; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/utils/locale.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/utils/locale.js new file mode 100644 index 00000000000..fc21d805373 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/utils/locale.js @@ -0,0 +1,110 @@ +/** + * Custom utils related for all locale related items + * + * @author jagankumar-egov + * + * @example + * Digit.Utils.locale. ** () + * + * + */ + +export const getLocalityCode = (locality, tenantId) => { + if (typeof locality === "string") return locality.includes("_") ? locality : `${tenantId.replace(".", "_").toUpperCase()}_ADMIN_${locality}`; + else if (locality.code) return locality.code.includes("_") ? locality : `${tenantId.replace(".", "_").toUpperCase()}_ADMIN_${locality.code}`; +}; + +export const getRevenueLocalityCode = (locality, tenantId) => { + if (typeof locality === "string") return locality.includes("_") ? locality : `${tenantId.replace(".", "_").toUpperCase()}_REVENUE_${locality}`; + else if (locality.code) return locality.code.includes("_") ? locality : `${tenantId.replace(".", "_").toUpperCase()}_REVENUE_${locality.code}`; +}; + +export const stringReplaceAll = (str = "", searcher = "", replaceWith = "") => { + if (searcher === "") return str; + while (str.includes(searcher)) { + str = str.replace(searcher, replaceWith); + } + return str; +}; + +/* method to check not null if not returns false*/ +export const checkForNotNull = (value = "") => { + return value && value != null && value != undefined && value != "" ? true : false; +}; + +export const convertDotValues = (value = "") => { + return ( + (checkForNotNull(value) && ((value.replaceAll && value.replaceAll(".", "_")) || (value.replace && stringReplaceAll(value, ".", "_")))) || "NA" + ); +}; + +export const convertToLocale = (value = "", key = "") => { + let convertedValue = convertDotValues(value)?.toUpperCase(); + if (convertedValue == "NA") { + return "COMMON_NA"; + } + return `${key}_${convertedValue}`; +}; + +export const getMohallaLocale = (value = "", tenantId = "") => { + let convertedValue = convertDotValues(tenantId); + if (convertedValue == "NA" || !checkForNotNull(value)) { + return "COMMON_NA"; + } + convertedValue = convertedValue.toUpperCase(); + return convertToLocale(value, `${convertedValue}_REVENUE`); +}; + +export const getCityLocale = (value = "") => { + let convertedValue = convertDotValues(value); + if (convertedValue == "NA" || !checkForNotNull(value)) { + return "COMMON_NA"; + } + convertedValue = convertedValue.toUpperCase(); + return convertToLocale(convertedValue, `TENANT_TENANTS`); +}; + +/* to convert the dropdown data to locale data */ +export const convertToLocaleData = (dropdownValues = [], key = "", t) => { + return dropdownValues.map((ele) => { + ele["i18text"] = convertToLocale(ele.code, key); + if (t) { + ele["i18text"] = t(ele["i18text"]); + } + return ele; + }); +}; + +/** + * Custom util to format the code for localisation + * + * @author jagankumar-egov + * + * @example + * Digit.Utils.locale.getTransformedLocale( + * code) + * + * @returns {Array} Returns the Array of object + */ +export const getTransformedLocale = (label) => { + if (typeof label === "number") return label; + label = label?.trim(); + return label && label.toUpperCase().replace(/[.:-\s\/]/g, "_"); +}; + +/** + * Custom util to sort the dropdowns based on Alphabeticaly order by localising the codes + * + * @author jagankumar-egov + * + * @example + * Digit.Utils.locale.sortDropdownNames( + * options, + * optionKey, + * t) + * + * @returns {Array} Returns the Array of object + */ +export const sortDropdownNames = (options = [], optionkey = "i18nKey", t) => { + return options?.sort((a, b) => t(a?.[optionkey])?.localeCompare?.(t(b?.[optionkey]))); +}; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/utils/obps/index.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/utils/obps/index.js new file mode 100644 index 00000000000..e1da9d150c6 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/utils/obps/index.js @@ -0,0 +1,23 @@ +export const calculateRiskType = (riskTypes, plotArea, blocks) => { + const buildingHeight = blocks?.reduce((acc, block) => { + return Math.max(acc, block.building.buildingHeight) + }, Number.NEGATIVE_INFINITY); + + const risk = riskTypes?.find(riskType => { + if (riskType.riskType === "HIGH" && (plotArea > riskType?.fromPlotArea || buildingHeight >= riskType?.fromBuildingHeight)) { + return true; + } + + if (riskType.riskType === "MEDIUM" && ((plotArea >= riskType?.fromPlotArea && plotArea <= riskType?.toPlotArea) || + (buildingHeight >= riskType?.fromBuildingHeight && buildingHeight <= riskType?.toBuildingHeight))) { + return true; + } + + if (riskType?.riskType === "LOW" && plotArea < riskType.toPlotArea && buildingHeight < riskType.toBuildingHeight) { + return true; + } + + return false; + }) + return risk?.riskType; +} \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/utils/pdf.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/utils/pdf.js new file mode 100644 index 00000000000..5b7442d1482 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/utils/pdf.js @@ -0,0 +1,1083 @@ +import { Fonts } from "./fonts"; + +const pdfMake = require("pdfmake/build/pdfmake.js"); +// const pdfFonts = require("pdfmake/build/vfs_fonts.js"); +// pdfMake.vfs = pdfFonts.pdfMake.vfs; + +let pdfFonts = { + // Roboto: { + // normal: "https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.66/fonts/Roboto/Roboto-Regular.ttf", + // bold: "https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.66/fonts/Roboto/Roboto-Medium.ttf" + // }, + Hind: { + normal: "Hind-Regular.ttf", + bold: "Hind-Bold.ttf", + }, + en_IN: { + normal: "Hind-Regular.ttf", + bold: "Hind-Bold.ttf", + }, + pn_IN: { + normal: "BalooPaaji2-Regular.ttf", + bold: "BalooPaaji2-Bold.ttf", + }, + od_IN: { + normal: "BalooBhaina2-Regular.ttf", + bold: "BalooBhaina2-Bold.ttf", + }, + hi_IN: { + normal: "Hind-Regular.ttf", + bold: "Hind-Bold.ttf", + }, +}; +pdfMake.vfs = Fonts; + +pdfMake.fonts = pdfFonts; + +const downloadPDFFileUsingBase64 = (receiptPDF, filename) => { + if ( + window && + window.mSewaApp && + window.mSewaApp.isMsewaApp && + window.mSewaApp.isMsewaApp() && + window.mSewaApp.downloadBase64File && + window.Digit.Utils.browser.isMobile() + ) { + // we are running under webview + receiptPDF.getBase64((data) => { + window.mSewaApp.downloadBase64File(data, filename); + }); + } else { + // we are running in browser + receiptPDF.download(filename); + } +}; + +function getBase64Image(tenantId) { + try { + const img = document.getElementById(`logo-${tenantId}`); + var canvas = document.createElement("canvas"); + canvas.width = img.width; + canvas.height = img.height; + var ctx = canvas.getContext("2d"); + ctx.drawImage(img, 0, 0); + return canvas.toDataURL("image/png"); + } catch (e) { + return ""; + } +} + +const defaultLogo = + "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAABBtJREFUWAntV11oVEcUnjN3mzXm111toQ8lWOtLTbIG0YgpMdQ05CEv0iTU1hhR7EMRWYuKSkteVExJBRGkpaUk0ChRSYtpKam4sbE0ia7RSNaS0uIfWtT4E8Xs5u7O8Vy7c3f27t2fh4W+ZF7OmfN9c86Ze2bOvZex/3mAGv/RIU9xJCL2IWIdAS7C/Nyhtbm8l39XeVKfOrLcHZoOHmCA7zJkC6VdSmAQRoYBAHbCXZBzED726xKT0kwgGnyUgpdI0JBEEMD4B+4dV3pU+9Mvyl4NMTZKAV5X7cl0APC5P127BqBNqBwuJ5Gw2G8NbmDIGEcQR+9/u6pAcg0ZYtiRaXCDT75rHnT0bjF0dZgJkLP3VEDVEakcj58ti7MBJOWrPFUHJurUuaGbCVCd5llBdQ4Yw7GnUaM9Fal4JjptJCGGmQA964upnPBXHCYOTSciDMGcp1qnYpzBBXVu6LEEGHxOByViJURJX7m2+W+qmKax3cn4Kk/qdJgnnXOdHXIupZnA/B1jw5TP+wzgngSpLEhX6ahLy/dKm5Su7WODBK4l/I60JZPkJ0DcuvxPLvxr5ZjXUAL45crchxD00A12OR3apTyv/67E7CQerndOztwto9uymPI1N2RwOcMwgBYorigah5qBsN36WVtCCZI9kqqu8Td0DG2mhlJKdb8JGvQOrV86YMevPDZagjpuQoFLqPY3gDtOjawvH7TjZpRAZeelesHwON3jQtUJtej2kdalu1RbZZe/QSB0U6L5ph0AObB9wy0Vn5m2qJI2geWd19yI09eo8SywLjbmdMgaRjZ4+gx9RffV13BGD1BXNV5kCYMzrW641dOvAnGnVgVMHYLUPu2DGxxk4iPJFeFwfbLgL7lcfCi5UqZNgK7WIkm2k4AxHARLyaUSJuBpE6AtBuwCmzaAGM5Tc6neMW7UQdoEcnOdv9Cpv24GjFNAAPCvpalwTuFP1J5vy7kqqRtGOGjfqDZDT5vAQNPbzzTgzQmOAWZotXe4xXNeOj3T9OYTjUMzHU1Le4YQImwdaimndh8/0t4CSV/T83fR1PRUI9W8lALc4jla3x/ryv6UuCqrvh+bp+t6IwL81weQn6abMqFyZnX5BDIugVyQifT52hxD7HyVAFFKb8nreVg46K354bHd2qwn0H6u9i0dI9S2scIMSN8YHHDjnmrfz6YtqmQ1gZ7xxpyJ+5MX6ROYDqplADzPAc2zs/rXv1Qk7TVUyen0iclHDbbBjYWIc3UR3mb1kdUEQGC5NYA6p1dzAp7VBKjulgakhjf+sqwNKoNOGO8i9Uxz8H6KEkzKAvzRimX1Cex+58w/9O2/nT4S4v7/jKDUyo/vrfZ1WxPI6i2Qzvf/VrtKRMJbKewSeiI3aJcn96w++53EVfkCw79XQZYr/EsAAAAASUVORK5CYII="; +const jsPdfGenerator = async ({ breakPageLimit = null, tenantId, logo, name, email, phoneNumber, heading, details, t = (text) => text }) => { + + const emailLeftMargin = + email.length <= 15 + ? 190 + : email.length <= 20 + ? 150 + : email.length <= 25 + ? 130 + : email.length <= 30 + ? 90 + : email.length <= 35 + ? 50 + : email.length <= 40 + ? 10 + : email.length <= 45 + ? 0 + : email.length <= 50 + ? -20 + : email.length <= 55 + ? -70 + : email.length <= 60 + ? -100 + : -60; + + const dd = { + pageMargins: [40, 80, 40, 30], + header: { + columns: [ + { + image: logo || getBase64Image(tenantId) || defaultLogo, + width: 50, + margin: [10, 10], + }, + { + text: name, + margin: [20, 25], + font: "Hind", + fontSize: 14, + bold: true, + }, + { + text: email, + margin: [emailLeftMargin, 25, 0, 25], + font: "Hind", + fontSize: 11, + color: "#464747", + }, + { + text: phoneNumber, + color: "#6f777c", + font: "Hind", + fontSize: 11, + margin: [-65, 45, 0, 25], + }, + ], + }, + + footer: function (currentPage, pageCount) { + return { + columns: [ + { text: `${name} / ${heading}`, margin: [15, 0, 0, 0], fontSize: 11, color: "#6f777c", width: 400, font: "Hind" }, + { text: `Page ${currentPage}`, alignment: "right", margin: [0, 0, 25, 0], fontSize: 11, color: "#6f777c", font: "Hind" }, + ], + }; + }, + content: [ + { + text: heading, + font: "Hind", + fontSize: 24, + bold: true, + margin: [-25, 5, 0, 0], + }, + ...createContent(details, phoneNumber, breakPageLimit), + { + text: t("PDF_SYSTEM_GENERATED_ACKNOWLEDGEMENT"), + font: "Hind", + fontSize: 11, + color: "#6f777c", + margin: [-25, 32], + }, + ], + defaultStyle: { + font: "Hind", + }, + }; + pdfMake.vfs = Fonts; + let locale = Digit.SessionStorage.get("locale") || Digit.Utils.getDefaultLanguage(); + let Hind = pdfFonts[locale] || pdfFonts["Hind"]; + pdfMake.fonts = { Hind: { ...Hind } }; + const generatedPDF = pdfMake.createPdf(dd); + downloadPDFFileUsingBase64(generatedPDF, "acknowledgement.pdf"); +}; + + +/** + * Util function that can be used + * to download WS connection acknowledgement pdfs + * Data is passed to this function from this file + * packages\modules\ws\src\utils\getWSAcknowledgementData.js + * @author nipunarora-egov + * + * @example + * Digit.Utils.pdf.generatev1() + * + * @returns Downloads a pdf + */ +const jsPdfGeneratorv1 = async ({ breakPageLimit = null, tenantId, logo, name, email, phoneNumber, heading, details, headerDetails, t = (text) => text }) => { + const emailLeftMargin = + email.length <= 15 + ? 190 + : email.length <= 20 + ? 150 + : email.length <= 25 + ? 130 + : email.length <= 30 + ? 90 + : email.length <= 35 + ? 50 + : email.length <= 40 + ? 10 + : email.length <= 45 + ? 0 + : email.length <= 50 + ? -20 + : email.length <= 55 + ? -70 + : email.length <= 60 + ? -100 + : -60; + + const dd = { + pageMargins: [40, 40, 40, 30], + header: {}, + footer: function (currentPage, pageCount) { + return { + columns: [ + { text: `${name} / ${heading}`, margin: [15, 0, 0, 0], fontSize: 11, color: "#6f777c", width: 400, font: "Hind" }, + { text: `Page ${currentPage}`, alignment: "right", margin: [0, 0, 25, 0], fontSize: 11, color: "#6f777c", font: "Hind" }, + ], + }; + }, + content: [ + ...createHeader(headerDetails,logo,tenantId), + // { + // text: heading, + // font: "Hind", + // fontSize: 24, + // bold: true, + // margin: [-25, 5, 0, 0], + // }, + ...createContentDetails(details), + { + text: t("PDF_SYSTEM_GENERATED_ACKNOWLEDGEMENT"), + font: "Hind", + fontSize: 11, + color: "#6f777c", + margin: [-25, 32], + }, + ], + defaultStyle: { + font: "Hind", + }, + }; + + pdfMake.vfs = Fonts; + let locale = Digit.SessionStorage.get("locale") || Digit.Utils.getDefaultLanguage(); + let Hind = pdfFonts[locale] || pdfFonts["Hind"]; + pdfMake.fonts = { Hind: { ...Hind } }; + const generatedPDF = pdfMake.createPdf(dd); + downloadPDFFileUsingBase64(generatedPDF, "acknowledgement.pdf"); +}; + +export default { generate: jsPdfGenerator ,generatev1:jsPdfGeneratorv1}; + +const createBodyContentBillAmend = (table,t) => { + let bodyData = [] + bodyData.push({ + text: t(table?.title), + color: "#F47738", + style: "header", + fontSize: 14, + bold: true, + margin: [0, 15, 0, 10] + }) + bodyData.push({ + layout:{ + fillColor:function(rowIndex,node,columnIndex){ + if(rowIndex === (table?.tableRows?.length)) { + return "#F47738" + } + return (rowIndex % 2 === 0) ? "#F47738" : null; + }, + fillOpacity:function(rowIndex,node,columnIndex) { + if (rowIndex === (table?.tableRows?.length)) { + return 1; + } + return (rowIndex % 2 === 0) ? 0.15 : 1; + } + }, + table:{ + headerRows:1, + widths: ["*", "*", "*", "*"], + body:[ + table?.headers?.map(header =>{ + return { + text:t(header), + style:"header", + fontSize:11, + bold:true, + border: [false, false, false, false] + } + }), + ...table?.tableRows?.map(row => { + return [ + { + text:t(row?.[0]), + style:"header", + fontSize:11, + border: [false, false, false, false] + }, + { + text: t(row?.[1]), + style: "header", + fontSize: 11, + border: [false, false, false, false] + }, + { + text: t(row?.[2]), + style: "header", + fontSize: 11, + border: [false, false, false, false] + }, + { + text: t(row?.[3]), + style: "header", + fontSize: 11, + border: [false, false, false, false] + } + ] + }) + ] + } + }) + return bodyData +} + +const createHeaderBillAmend = (headerDetails, logo, tenantId,t) => { + + let headerData = []; + headerData.push({ + style: 'tableExample', + layout: "noBorders", + fillColor: "#f7e0d4", + margin: [-40, -40, -40, 40], + table: { + widths: ['5%', 'auto', '*'], + body: [ + [ + { + image: logo || getBase64Image(tenantId) || defaultLogo, + // width: 50, + margin: [10, 10], + fit: [50, 50], + //width: 50, + //margin: [10, 10] + }, + { + text: headerDetails?.header, //"Amritsar Municipal Corporation", + margin: [40, 10, 2, 4], + style: "header", + // italics: true, + fontSize: 18, + bold: true + }, + { + text: headerDetails?.typeOfApplication, //"New Sewerage Connection", + bold: true, + fontSize: 16, + alignment: "right", + margin: [-40, 10, 2, 0], + color: "#F47738" + } + ], + [ + { text: "" }, + { + text: headerDetails?.subHeader, //"Municipal Corporation Amritsar, Town Hall, Amritsar, Punjab.", + margin: [40, -45, -2, -5], + style: "header", + // italics: true, + fontSize: 10, + bold: true + }, + + { + text: headerDetails?.date, //"28/03/2022", + bold: true, + fontSize: 16, + margin: [0, -45, 10, 0], + alignment: "right", + color: "#F47738" + } + ], + [ + { text: "" }, + + { + text: headerDetails?.description, //"0183-2545155 | www.amritsarcorp.com | cmcasr@gmail.com", + margin: [40, -40, 2, 10], + style: "header", + // italics: true, + fontSize: 10, + bold: true + }, + { + text: "", + } + ] + ] + } + }); + headerDetails?.values?.forEach((header, index) => { + headerData.push({ + style: 'tableExample', + layout: "noBorders", + fillColor: "#f7e0d4", + margin: [-40, -40, -40, 20], + table: { + widths: ['30%', '*'], + body: [ + [ + { + text: header?.title, + margin: index == 0 ? [40, 0, 2, 10] : [40, 10, 2, 10], + style: "header", + fontSize: 10, + bold: true + }, + { + text: header?.value, + bold: true, + fontSize: 10, + alignment: "left", + margin: index == 0 ? [0, 0, 2, 10] : [0, 10, 2, 10], + } + ] + ] + } + }) + }) + //push demand revision details old way + + headerData.push({ + style: 'tableExample', + layout: "noBorders", + fillColor: "#f7e0d4", + margin: [-40, -25, -1000000, 20], + table: { + widths: ['30%', '*'], + body: [ + [ + { + text: headerDetails?.DemandRevision?.title, + margin: [40, 0, 2, 20], + style: "header", + fontSize: 13, + bold: true + } + ] + ] + } + }) + + headerDetails?.DemandRevision?.values?.forEach((header, index) => { + headerData.push({ + style: 'tableExample', + layout: "noBorders", + fillColor: "#f7e0d4", + margin: [-40, -40, -40, 20], + table: { + widths: ['30%', '*'], + body: [ + [ + { + text: header?.title, + margin: index == 0 ? [40, 0, 2, 10] : [40, 10, 2, 10], + style: "header", + fontSize: 10, + bold: true + }, + { + text: header?.value, + bold: false, + fontSize: 10, + alignment: "left", + margin: index == 0 ? [0, 0, 2, 10] : [0, 10, 2, 10], + } + ] + ] + } + }) + }) + + //attachment details + headerData.push({ + style: 'tableExample', + layout: "noBorders", + fillColor: "#f7e0d4", + margin: [-40, -25, -1000000, 20], + table: { + widths: ['30%', '*'], + body: [ + [ + { + text: headerDetails?.Attachments?.title, + margin: [40, 0, 2, 110], + style: "header", + fontSize: 13, + bold: true + } + ] + ] + } + }) + + headerData.push({ + layout: "noBorders", + ul: headerDetails?.Attachments?.values, + margin:[0,-130,0,40] + }) + + return headerData; +} + +const createBodyContent = (details) => { + let detailsHeaders = [] + details.map((table,index) =>{ + if (table?.isAttachments && table.values) { + detailsHeaders.push({ + style: 'tableExample', + layout: "noBorders", + margin: [0, 13, 0, 5], + table: { + body: [ + [ + { + text: table?.title, + color: "#F47738", + style: "header", + fontSize: 14, + bold: true + } + ] + ] + } + }) + detailsHeaders.push({ + layout:'noBorders', + ul: table?.values + }) + return + } + detailsHeaders.push({ + layout:'noBorders', + table:{ + headerRows:1, + widths:["*","*","*"], + body:[ + table?.title?.map(t=>{ + return { + text:t, + color: "#F47738", + style: "header", + fontSize: 14, + bold: true, + margin:[0,15,0,0] + } + }), + ...table?.values?.map((value,index) => { + return [ + { + text:value?.val1, + style: "header", + fontSize: 10, + bold: true + }, + { + text: value?.val2, + fontSize: 10 + }, + { + text: value?.val3, + fontSize: 10 + } + ] + }) + ] + } + }) + }) + + return detailsHeaders +} + +function createContentDetails(details) { + let detailsHeaders = []; + details.forEach((detail, index) => { + if (detail?.title) { + detailsHeaders.push({ + style: 'tableExample', + layout: "noBorders", + margin:[0,13,0,5], + table: { + body: [ + [ + { + text: detail?.title, + color: "#F47738", + style: "header", + fontSize: 14, + bold: true + } + ] + ] + } + }) + } + if (detail?.isAttachments && detail.values) { + detailsHeaders.push({ + ul: detail?.values + }) + } else { + detail?.values?.forEach(indData => { + detailsHeaders.push({ + style: 'tableExample', + layout: "noBorders", + table: { + widths: ['40%', '*'], + body: [ + [ + { + text: indData?.title, + style: "header", + fontSize: 10, + bold: true + }, + + { + text: indData?.value, + fontSize: 10 + } + ] + ] + } + }) + }) + } + }); + return detailsHeaders; +} + +function createHeader(headerDetails,logo,tenantId) { + let headerData = []; + headerData.push({ + style: 'tableExample', + layout: "noBorders", + fillColor: "#f7e0d4", + "margin": [-40, -40, -40, 40], + table: { + widths: ['5%', 'auto', '*'], + body: [ + [ + // { + // margin: [40, 10, 2, 2], + // "image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAABBtJREFUWAntV11oVEcUnjN3mzXm111toQ8lWOtLTbIG0YgpMdQ05CEv0iTU1hhR7EMRWYuKSkteVExJBRGkpaUk0ChRSYtpKam4sbE0ia7RSNaS0uIfWtT4E8Xs5u7O8Vy7c3f27t2fh4W+ZF7OmfN9c86Ze2bOvZex/3mAGv/RIU9xJCL2IWIdAS7C/Nyhtbm8l39XeVKfOrLcHZoOHmCA7zJkC6VdSmAQRoYBAHbCXZBzED726xKT0kwgGnyUgpdI0JBEEMD4B+4dV3pU+9Mvyl4NMTZKAV5X7cl0APC5P127BqBNqBwuJ5Gw2G8NbmDIGEcQR+9/u6pAcg0ZYtiRaXCDT75rHnT0bjF0dZgJkLP3VEDVEakcj58ti7MBJOWrPFUHJurUuaGbCVCd5llBdQ4Yw7GnUaM9Fal4JjptJCGGmQA964upnPBXHCYOTSciDMGcp1qnYpzBBXVu6LEEGHxOByViJURJX7m2+W+qmKax3cn4Kk/qdJgnnXOdHXIupZnA/B1jw5TP+wzgngSpLEhX6ahLy/dKm5Su7WODBK4l/I60JZPkJ0DcuvxPLvxr5ZjXUAL45crchxD00A12OR3apTyv/67E7CQerndOztwto9uymPI1N2RwOcMwgBYorigah5qBsN36WVtCCZI9kqqu8Td0DG2mhlJKdb8JGvQOrV86YMevPDZagjpuQoFLqPY3gDtOjawvH7TjZpRAZeelesHwON3jQtUJtej2kdalu1RbZZe/QSB0U6L5ph0AObB9wy0Vn5m2qJI2geWd19yI09eo8SywLjbmdMgaRjZ4+gx9RffV13BGD1BXNV5kCYMzrW641dOvAnGnVgVMHYLUPu2DGxxk4iPJFeFwfbLgL7lcfCi5UqZNgK7WIkm2k4AxHARLyaUSJuBpE6AtBuwCmzaAGM5Tc6neMW7UQdoEcnOdv9Cpv24GjFNAAPCvpalwTuFP1J5vy7kqqRtGOGjfqDZDT5vAQNPbzzTgzQmOAWZotXe4xXNeOj3T9OYTjUMzHU1Le4YQImwdaimndh8/0t4CSV/T83fR1PRUI9W8lALc4jla3x/ryv6UuCqrvh+bp+t6IwL81weQn6abMqFyZnX5BDIugVyQifT52hxD7HyVAFFKb8nreVg46K354bHd2qwn0H6u9i0dI9S2scIMSN8YHHDjnmrfz6YtqmQ1gZ7xxpyJ+5MX6ROYDqplADzPAc2zs/rXv1Qk7TVUyen0iclHDbbBjYWIc3UR3mb1kdUEQGC5NYA6p1dzAp7VBKjulgakhjf+sqwNKoNOGO8i9Uxz8H6KEkzKAvzRimX1Cex+58w/9O2/nT4S4v7/jKDUyo/vrfZ1WxPI6i2Qzvf/VrtKRMJbKewSeiI3aJcn96w++53EVfkCw79XQZYr/EsAAAAASUVORK5CYII=" + // }, + { + image: logo || getBase64Image(tenantId) || defaultLogo, + // width: 50, + margin: [10, 10], + fit: [50,50], + //width: 50, + //margin: [10, 10] + }, + { + text: headerDetails?.[0]?.header, //"Amritsar Municipal Corporation", + margin: [40, 10, 2, 4], + style: "header", + // italics: true, + fontSize: 18, + bold: true + }, + { + text: headerDetails?.[0]?.typeOfApplication, //"New Sewerage Connection", + bold: true, + fontSize: 16, + alignment: "right", + margin: [-40, 10, 2, 0], + color: "#F47738" + } + ], + [ + { text: "" }, + { + text: headerDetails?.[0]?.subHeader, //"Municipal Corporation Amritsar, Town Hall, Amritsar, Punjab.", + margin: [40, -45, -2, -5], + style: "header", + // italics: true, + fontSize: 10, + bold: true + }, + + { + text: headerDetails?.[0]?.date, //"28/03/2022", + bold: true, + fontSize: 16, + margin: [0, -50, 10, 0], + alignment: "right", + color: "#F47738" + } + ], + [ + { text: "" }, + + { + text: headerDetails?.[0]?.description, //"0183-2545155 | www.amritsarcorp.com | cmcasr@gmail.com", + margin: [40, -40, 2, 10], + style: "header", + // italics: true, + fontSize: 10, + bold: true + }, + { + text: "", + } + ] + ] + } + }); + headerDetails?.[0]?.values?.forEach((header, index) => { + headerData.push({ + style: 'tableExample', + layout: "noBorders", + fillColor: "#f7e0d4", + "margin": [-40, -40, -40, 20], + table: { + widths: ['30%', '*'], + body: [ + [ + { + text: header?.title, + margin: index == 0 ? [40, 0, 2, 10] : [40, 10, 2, 10], + style: "header", + fontSize: 10, + bold: true + }, + { + text: header?.value, + bold: true, + fontSize: 10, + alignment: "left", + margin: index == 0 ? [0, 0, 2, 10] : [0, 10, 2, 10], + } + ] + ] + } + }) + }) + + return headerData; +} + + +function createContent(details, phoneNumber, breakPageLimit = null) { + const data = []; + + details.forEach((detail, index) => { + if (detail?.values?.length > 0) { + let column1 = []; + let column2 = []; + + if ( breakPageLimit ? (index + 1) % breakPageLimit === 0 : (index + 1) % 7 === 0) { + data.push({ + text: "", + margin: [-25, 0, 0, 200], + }); + } + + data.push({ + text: `${detail.title}`, + font: "Hind", + fontSize: 18, + bold: true, + margin: [-25, 20, 0, 20], + }); + + const newArray = []; + let count = 0; + let arrayNumber = 0; + + detail.values.forEach((value, index) => { + if (count <= 3) { + if (!newArray[arrayNumber]) { + newArray[arrayNumber] = []; + } + if (value) { + newArray[arrayNumber].push(value); + } + count++; + } + if (count === 4) { + count = 0; + arrayNumber++; + } + }); + + newArray.forEach((value) => { + if (value?.length === 2) { + createContentForDetailsWithLengthOfTwo(value, data, column1, column2, detail.values.length > 3 ? 10 : 0); + } else if (value?.length === 1 || value?.length === 3) { + createContentForDetailsWithLengthOfOneAndThree(value, data, column1, column2, detail.values.length > 3 ? 10 : 0); + } else { + value.forEach((value, index) => { + let margin = [-25, 0, 0, 5]; + if (index === 1) margin = [15, 0, 0, 5]; + if (index === 2) margin = [26, 0, 0, 5]; + if (index === 3) margin = [30, 0, 0, 5]; + column1.push({ + text: value.title, + font: "Hind", + fontSize: 11, + bold: true, + margin, + }); + if (index === 1) margin = [15, 0, 0, 10]; + if (index === 2) margin = [26, 0, 0, 10]; + if (index === 3) margin = [30, 0, 0, 10]; + column2.push({ + text: value.value, + font: "Hind", + fontSize: 9, + margin, + color: "#1a1a1a", + width: "25%", + }); + }); + data.push({ columns: column1 }); + data.push({ columns: column2 }); + column1 = []; + column2 = []; + } + }); + } + }); + + return data; +} + +function createContentForDetailsWithLengthOfTwo(values, data, column1, column2, num = 0) { + values.forEach((value, index) => { + if (index === 0) { + column1.push({ + text: value.title, + font: "Hind", + fontSize: 12, + bold: true, + margin: [-25, num - 10, -25, 0], + }); + column2.push({ + text: value.value, + font: "Hind", + fontSize: 9, + margin: [-25, 5, 0, 0], + color: "#1a1a1a", + width: "25%", + }); + } else { + column1.push({ + text: value.title, + font: "Hind", + fontSize: 12, + bold: true, + margin: [-115, num - 10, -115, 0], + }); + column2.push({ + text: value.value, + font: "Hind", + fontSize: 9, + margin: [15, 5, 0, 0], + color: "#1a1a1a", + width: "25%", + }); + } + }); + data.push({ columns: column1 }); + data.push({ columns: column2 }); +} + +function createContentForDetailsWithLengthOfOneAndThree(values, data, column1, column2, num = 0) { + values.forEach((value, index) => { + if (index === 0) { + column1.push({ + text: value.title, + font: "Hind", + fontSize: 12, + bold: true, + margin: values.length > 1 ? [-25, -5, 0, 0] : [-25, 0, 0, 0], + }); + column2.push({ + text: value.value, + font: "Hind", + fontSize: 9, + color: "#1a1a1a", + margin: values.length > 1 ? [-25, 5, 0, 0] : [-25, 5, 0, 0], + width: "25%", + }); + } else if (index === 2) { + column1.push({ + text: value.title, + font: "Hind", + fontSize: 12, + bold: true, + margin: [-60, -5, 0, 0], + }); + column2.push({ + text: value.value, + font: "Hind", + fontSize: 9, + margin: [26, 5, 0, 0], + color: "#1a1a1a", + width: "25%", + }); + } else { + column1.push({ + text: value.title, + font: "Hind", + fontSize: 12, + bold: true, + margin: [-28, -5, 0, 0], + }); + column2.push({ + text: value.value, + font: "Hind", + fontSize: 9, + margin: [15, 5, 0, 0], + color: "#1a1a1a", + width: "25%", + }); + } + }); + data.push({ columns: column1 }); + data.push({ columns: column2 }); +} + +// EXAMPLE +// , + +const downloadPdf = (blob, fileName) => { + if (window.mSewaApp && window.mSewaApp.isMsewaApp() && window.mSewaApp.downloadBase64File) { + var reader = new FileReader(); + reader.readAsDataURL(blob); + reader.onloadend = function () { + var base64data = reader.result; + window.mSewaApp.downloadBase64File(base64data, fileName); + }; + } else { + const link = document.createElement("a"); + // create a blobURI pointing to our Blob + link.href = URL.createObjectURL(blob); + link.download = fileName; + // some browser needs the anchor to be in the doc + document.body.append(link); + link.click(); + link.remove(); + // in case the Blob uses a lot of memory + setTimeout(() => URL.revokeObjectURL(link.href), 7000); + } +}; + +/* Download Receipts */ + +export const downloadReceipt = async ( + consumerCode, + businessService, + pdfKey = "consolidatedreceipt", + tenantId = Digit.ULBService.getCurrentTenantId(), + receiptNumber = null +) => { + const response = await Digit.ReceiptsService.receipt_download(businessService, consumerCode, tenantId, pdfKey, receiptNumber); + const responseStatus = parseInt(response.status, 10); + if (responseStatus === 201 || responseStatus === 200) { + let filename = receiptNumber ? `receiptNumber-${receiptNumber}.pdf` : `consumer-${consumerCode}.pdf`; + downloadPdf(new Blob([response.data], { type: "application/pdf" }), filename); + } +}; +/* Download Bills */ + +export const downloadBill = async ( + consumerCode, + businessService, + pdfKey = "consolidatedbill", + tenantId = Digit.ULBService.getCurrentTenantId(), +) => { + const response = await Digit.ReceiptsService.bill_download(businessService, consumerCode, tenantId, pdfKey); + const responseStatus = parseInt(response.status, 10); + if (responseStatus === 201 || responseStatus === 200) { + let filename = consumerCode ? `consumerCode-${consumerCode}.pdf` : `consumer-${consumerCode}.pdf`; + downloadPdf(new Blob([response.data], { type: "application/pdf" }), filename); + } +}; + +export const getFileUrl = (linkText = "") => { + const linkList = (linkText && typeof linkText == "string" && linkText.split(",")) || []; + let fileURL = ""; + linkList && + linkList.map((link) => { + if (!link.includes("large") && !link.includes("medium") && !link.includes("small")) { + fileURL = link; + } + }); + return fileURL; +}; + +/* Use this util function to download the file from any s3 links */ +export const downloadPDFFromLink = async (link, openIn = "_blank") => { + var response = await fetch(link, { + responseType: "arraybuffer", + headers: { + "Content-Type": "application/json", + Accept: "application/pdf", + }, + method: "GET", + mode: "cors", + }).then((res) => res.blob()); + if (window.mSewaApp && window.mSewaApp.isMsewaApp() && window.mSewaApp.downloadBase64File) { + var reader = new FileReader(); + reader.readAsDataURL(response); + reader.onloadend = function () { + var base64data = reader.result; + window.mSewaApp.downloadBase64File(base64data, decodeURIComponent(link.split("?")[0].split("/").pop().slice(13))); + }; + } else { + var a = document.createElement("a"); + document.body.appendChild(a); + a.style = "display: none"; + let url = window.URL.createObjectURL(response); + a.href = url; + a.download = decodeURIComponent(link.split("?")[0].split("/").pop().slice(13)); + a.click(); + window.URL.revokeObjectURL(url); + } +}; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/utils/preProcessMDMSConfig.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/utils/preProcessMDMSConfig.js new file mode 100644 index 00000000000..5d3aa0742a9 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/utils/preProcessMDMSConfig.js @@ -0,0 +1,128 @@ + +import _ from "lodash"; + +/* +PRE-PROCESS MDMS CONFIG +----------------------- +@Author - Hariom Sinha + +Usually FormComposer configs needs some dependendent params to drive the rendering and functionality. In MDMS config, we cannot inject those params. +So, this component is developed to help convert any MDMS config to a FormComposer enabled config by injecting multiple params. +As of now, two params are introduced - + a. translate + b. updateDependent + c. convertStringToRegEx + Based on the newer requirement, this utility can be enhanced to support extra types of params. + +How to use this Pre-Process Utility - +1. Fetch any config from MDMS. +2. In each input object of the config, set preProcess object with required Params. + ex - + { + isMandatory: false, + key: "noSubProject_locality", + type: "radioordropdown", + label: "WORKS_LOCALITY", + disable: false, + preProcess : { + translate : ["populators.error"], + updateDependent : ["populators.options"] + }, + populators: { + name: "noSubProject_locality", + optionsKey: "i18nKey", + error: "WORKS_REQUIRED_ERR", + required: false, + optionsCustomStyle : { + top : "2.5rem" + }, + options: [] + }, + }, +3. Both 'translate' and 'updateDependent' supports multiple JSON paths. This means that we can inject multiple params at a time in the same input object. +4. Any component who wants to transform MDMS config to FormComposer config using this Pre-Process Utility should pass the dependencies based on their requirement. + Example, if one needs to update the dropdown value based on other dropdown field change, then the component can pass that Param as state. + The Component should make calls to this config only when the dependent state changes, to avoid performance issues. + + const config = useMemo( + () => Digit.Utils.preProcessMDMSConfig(t, createProjectConfig, { + updateDependent : [ + { + key : 'withSubProject_project_subScheme', + value : [withSubProjectSubSchemeOptions] + } + ] + }), + [withSubProjectSubSchemeOptions]); +5. Translation and convertStringToRegEx will be handled by the Pre-Preprocess on its own. No params are required for this. +*/ + + +const translate = (config, index, inputIndex, t) => { + + let input = config?.form[index].body[inputIndex]; + //iterate all translate keys and handle translation + for(let toTranslate = 0; toTranslate { + let input = config?.form[index].body[inputIndex]; + //iterate all update options keys and add options as params + for(let toUpdate = 0; toUpdatedependent?.key === inputKey)?.[0]?.value?.[toUpdate])); + } + + return config; +} + +const convertStringToRegEx = (config, index, inputIndex) => { + + let input = config?.form[index].body[inputIndex]; + //iterate all translate keys and handle translation + for(let toValidate = 0; toValidate { + //Do not loop preProcess object, to avoid unnecessary 'translate' and 'updateDependent' calls + //To add any new transform object, simply add a new if statement + if(preProcesses?.translate) { + config = translate(config, index, inputIndex, t); + } + if(preProcesses?.updateDependent) { + config = updateDependent(config, index, inputIndex, inputKey, dependencyConfig); + } + if(preProcesses?.convertStringToRegEx) { + config = convertStringToRegEx(config, index, inputIndex, inputKey); + } + return config; +} + +const preProcessMDMSConfig = (t, config, dependencyConfig) => { + config?.form?.map((section, index)=>{ + section?.body?.map((input, inputIndex)=>{ + let preProcesses = input?.preProcess; + if(preProcesses){ + config = transform(preProcesses, config, index, inputIndex, input?.key, t, dependencyConfig); + } + }) + }) + return config; +} + +export default preProcessMDMSConfig; + diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/utils/preProcessMDMSConfigInboxSearch.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/utils/preProcessMDMSConfigInboxSearch.js new file mode 100644 index 00000000000..05743c9347a --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/utils/preProcessMDMSConfigInboxSearch.js @@ -0,0 +1,110 @@ + +import _ from "lodash"; + +/* +PRE-PROCESS MDMS CONFIG +----------------------- +@Author - Hariom Sinha + +Usually FormComposer configs needs some dependendent params to drive the rendering and functionality. In MDMS config, we cannot inject those params. +So, this component is developed to help convert any MDMS config to a FormComposer enabled config by injecting multiple params. +As of now, two params are introduced - + a. translate + b. updateDependent + c. convertStringToRegEx + Based on the newer requirement, this utility can be enhanced to support extra types of params. + +How to use this Pre-Process Utility - +1. Fetch any config from MDMS. +2. In each input object of the config, set preProcess object with required Params. + ex - + { + isMandatory: false, + key: "noSubProject_locality", + type: "radioordropdown", + label: "WORKS_LOCALITY", + disable: false, + preProcess : { + translate : ["populators.error"], + updateDependent : ["populators.options"] + }, + populators: { + name: "noSubProject_locality", + optionsKey: "i18nKey", + error: "WORKS_REQUIRED_ERR", + required: false, + optionsCustomStyle : { + top : "2.5rem" + }, + options: [] + }, + }, +3. Both 'translate' and 'updateDependent' supports multiple JSON paths. This means that we can inject multiple params at a time in the same input object. +4. Any component who wants to transform MDMS config to FormComposer config using this Pre-Process Utility should pass the dependencies based on their requirement. + Example, if one needs to update the dropdown value based on other dropdown field change, then the component can pass that Param as state. + The Component should make calls to this config only when the dependent state changes, to avoid performance issues. + + const config = useMemo( + () => Digit.Utils.preProcessMDMSConfig(t, createProjectConfig, { + updateDependent : [ + { + key : 'withSubProject_project_subScheme', + value : [withSubProjectSubSchemeOptions] + } + ] + }), + [withSubProjectSubSchemeOptions]); +5. Translation and convertStringToRegEx will be handled by the Pre-Preprocess on its own. No params are required for this. +*/ + +const convertStringToRegEx = (target) => { + //iterate all translate keys and handle translation + for(let toValidate = 0; toValidate { + //iterate all translate keys and handle translation + for(let toUpdate = 0; toUpdatedependent?.key === inputKey)?.[0]?.value)); + + _.set(target, keyToUpdate, dependentObject); + } + return target; +} + +const transform = (preProcesses, target, inputIndex, inputKey, t, dependencyConfig) => { + //Do not loop preProcess object, to avoid unnecessary 'translate' and 'updateDependent' calls + //To add any new transform object, simply add a new if statement + if(preProcesses?.convertStringToRegEx) { + target = convertStringToRegEx(target); + } + if(preProcesses?.updateDependent) { + target = updateDependent(target, dependencyConfig, inputKey); + } + return target; +} + +const preProcessMDMSConfigInboxSearch = (t, config, jsonpath, dependencyConfig) => { + let targetConfig = _.get(config, jsonpath); + let updatedConfig = []; + //Iterate the entire jsonpath array and push the updated objects in the new res array. + //Set the updated res in place of the targetConfig + targetConfig?.map((target, inputIndex) => { + let preProcesses = target?.preProcess; + updatedConfig.push(transform(preProcesses, target, inputIndex, target?.key, t, dependencyConfig)); + }) + _.set(config, jsonpath, updatedConfig); + return config; +} + +export default preProcessMDMSConfigInboxSearch; + diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/utils/privacy.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/utils/privacy.js new file mode 100644 index 00000000000..ae2d62c50a8 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/utils/privacy.js @@ -0,0 +1,107 @@ +/** + * Contains all utils used for Privacy + * + * @author jagankumar-egov + * + * Feature :: Privacy + */ + +/** + * Custom util to get the privacy object of current screen + * + * @author jagankumar-egov + * + * @example + * Digit.Utils.getPrivacyObject() + * + * @returns {object} Returns the privacy object + */ +export const getPrivacyObject = () => { + const privacyObj = getAllPrivacyObject(); + return privacyObj?.[window.location.pathname] || {}; +}; + +/** + * Custom util to get the complete privacy object. + * + * @author jagankumar-egov + * + * @example + * Digit.Utils.getAllPrivacyObject() + * + * @returns {object} Returns the key value pair of privacy object in every screens + */ +export const getAllPrivacyObject = () => { + return Digit.SessionStorage.get("PRIVACY_OBJECT") || {}; +}; + +/** + * Custom util to update the privacy object. + * + * @author jagankumar-egov + * + * @example + * Digit.Utils.setPrivacyObject({}) + * + */ +export const setPrivacyObject = (updatedPrivacyValue = {}) => { + return Digit.SessionStorage.set("PRIVACY_OBJECT", { ...updatedPrivacyValue }); +}; + +/** + * Main Util to update the privacy + * + * @author jagankumar-egov + * + * Feature :: Privacy + * + * @example + * Digit.Utils.updatePrivacy(uuid, fieldName) + * + * @returns {object} Returns the updated privacy object + */ +export const updatePrivacy = (uuid, fieldName) => { + const privacyObj = Digit.Utils.getAllPrivacyObject(); + const plainRequestFields = + privacyObj?.[window.location.pathname]?.recordId === uuid ? privacyObj?.[window.location.pathname]?.plainRequestFields || [] : []; + const newObj = { + ...privacyObj, + [window.location.pathname]: { recordId: uuid, plainRequestFields: Array.isArray(fieldName) ? [...fieldName, ...plainRequestFields] : [fieldName, ...plainRequestFields] }, + }; + Digit.Utils.setPrivacyObject({ ...newObj }); + return newObj; +}; + +/** + * Core Component Logic for showing the unmask button and for which fields will be controlled by + * mdms -> DataSecurity -> SecurityPolicy.json + * + * @author jagankumar-egov + * + * Feature :: Privacy + * + * @example + * Digit.Utils.checkPrivacy(mdmsObj, privacyDetail) + * + * @returns {boolean} Returns the show or hide in boolean type + */ + +export const checkPrivacy = (mdmsObj, privacyDetail) => { + if (mdmsObj?.attributes?.some((ele) => (ele?.name === privacyDetail?.fieldName || privacyDetail?.fieldName?.includes(ele?.name) )&& ele?.defaultVisibility === "MASKED")) { + return true; + } + const userInfo = Digit.UserService.getUser(); + const userRoles = userInfo?.info?.roles?.map((roleData) => roleData?.code); + if ( + mdmsObj?.roleBasedDecryptionPolicy?.some( + (ele) => + ele?.roles?.some((e) => userRoles?.includes(e)) && + ele?.attributeAccessList?.some( + (ele) => (ele?.attribute === privacyDetail?.fieldName || privacyDetail?.fieldName?.includes(ele?.attribute)) && ele?.firstLevelVisibility === "MASKED" && ele?.secondLevelVisibility === "PLAIN" + ) + ) + ) { + return true; + } + return false; +}; diff --git a/micro-ui/web/micro-ui-internals/packages/libraries/src/utils/pt/index.js b/micro-ui/web/micro-ui-internals/packages/libraries/src/utils/pt/index.js new file mode 100644 index 00000000000..ec8ff0468f6 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/libraries/src/utils/pt/index.js @@ -0,0 +1,65 @@ +export const getPropertyTypeLocale = (value) => { + return `PROPERTYTAX_BILLING_SLAB_${value?.split(".")[0]}`; +}; + +export const getPropertySubtypeLocale = (value) => `PROPERTYTAX_BILLING_SLAB_${value}`; + +export const stringReplaceAll = (str = "", searcher = "", replaceWith = "") => { + if (searcher === "") return str; + while (str.includes(searcher)) { + str = str.replace(searcher, replaceWith); + } + return str; +}; + +/* method to check not null if not returns false*/ +export const checkForNotNull = (value = "") => { + return value && value != null && value != undefined && value != "" ? true : false; +}; + +export const convertDotValues = (value = "") => { + return ( + (checkForNotNull(value) && ((value.replaceAll && value.replaceAll(".", "_")) || (value.replace && stringReplaceAll(value, ".", "_")))) || "NA" + ); +}; + +export const convertToLocale = (value = "", key = "") => { + let convertedValue = convertDotValues(value); + if (convertedValue === "NA") { + return "PT_NA"; + } + return `${key}_${convertedValue}`; +}; +export const getMohallaLocale = (value = "", tenantId = "") => { + let convertedValue = convertDotValues(tenantId); + if (convertedValue === "NA" || !checkForNotNull(value)) { + return "PT_NA"; + } + convertedValue = convertedValue.toUpperCase(); + return convertToLocale(value, `${convertedValue}_REVENUE`); +}; + +export const getCityLocale = (value = "") => { + let convertedValue = convertDotValues(value); + if (convertedValue === "NA" || !checkForNotNull(value)) { + return "PT_NA"; + } + convertedValue = convertedValue.toUpperCase(); + return convertToLocale(convertedValue, `TENANT_TENANTS`); +}; + +export const convertDateToEpoch = (dateString, dayStartOrEnd = "dayend") => { + //example input format : "2018-10-02" + try { + const parts = dateString.match(/(\d{4})-(\d{1,2})-(\d{1,2})/); + const DateObj = new Date(Date.UTC(parts[1], parts[2] - 1, parts[3])); + DateObj.setMinutes(DateObj.getMinutes() + DateObj.getTimezoneOffset()); + if (dayStartOrEnd === "dayend") { + DateObj.setHours(DateObj.getHours() + 24); + DateObj.setSeconds(DateObj.getSeconds() - 1); + } + return DateObj.getTime(); + } catch (e) { + return dateString; + } +}; \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/modules/common/README.md b/micro-ui/web/micro-ui-internals/packages/modules/common/README.md new file mode 100644 index 00000000000..dcf4b64180f --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/modules/common/README.md @@ -0,0 +1,77 @@ + + +# digit-ui-module-common + +## Install + +```bash +npm install --save @egovernments/digit-ui-module-common +``` + +## Limitation + +```bash +This Package is more specific to DIGIT-UI's can be used across mission's for Payments +``` + +## Usage + +After adding the dependency make sure you have this dependency in + +```bash +frontend/micro-ui/web/package.json +``` + +```json +"@egovernments/digit-ui-module-common":"^1.5.0", +``` + +then navigate to App.js + +```bash + frontend/micro-ui/web/src/App.js +``` + + +```jsx +/** add this import **/ + +import { paymentConfigs, PaymentLinks, PaymentModule } from "@egovernments/digit-ui-module-common"; + +/** inside enabledModules add this new module key **/ + +const enabledModules = ["Payment"]; + +/** inside init Function call this function **/ + +const initDigitUI = () => { + window?.Digit.ComponentRegistryService.setupRegistry({ + PaymentModule, + ...paymentConfigs, + PaymentLinks, + }); +}; +``` + +# Changelog + +```bash +1.8.0-beta workbench base version beta release +1.7.0 urban 2.9 +1.6.0 urban 2.8 +1.5.31 updated the readme content +1.5.30 Fixes mannual receipt date range validation, Cheque and card number validation for FSM +1.5.29 version upgraded for fixes in payment modules +1.5.28 base version +``` + +# Contributors + +[jagankumar-egov] [Tulika-eGov] [vamshikrishnakole-wtt-egov] [nabeelmd-eGov] [anil-egov] + +## Published from DIGIT Core +Digit Dev Repo (https://github.com/egovernments/Digit-Core/tree/digit-ui-core) + +## License + +MIT © [jagankumar-egov](https://github.com/jagankumar-egov) \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/modules/common/package.json b/micro-ui/web/micro-ui-internals/packages/modules/common/package.json new file mode 100644 index 00000000000..d6c652f598e --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/modules/common/package.json @@ -0,0 +1,34 @@ +{ + "name": "@egovernments/digit-ui-module-common", + "version": "1.8.0-beta", + "license": "MIT", + "main": "dist/index.js", + "module": "dist/index.modern.js", + "source": "src/Module.js", + "files": [ + "dist" + ], + "scripts": { + "start": "microbundle-crl watch --no-compress --format modern,cjs", + "build": "microbundle-crl --compress --no-sourcemap --format cjs", + "prepublish": "yarn build" + }, + "dependencies": { + "@egovernments/digit-ui-react-components": "1.5.23", + "react": "17.0.2", + "react-dom": "17.0.2", + "react-hook-form": "6.15.8", + "react-i18next": "11.16.2", + "react-query": "3.6.1", + "react-router-dom": "5.3.0" + }, + "author": "JaganKumar ", + "keywords": [ + "digit", + "egov", + "dpg", + "digit-ui", + "common", + "payment" + ] +} \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/modules/common/src/Module.js b/micro-ui/web/micro-ui-internals/packages/modules/common/src/Module.js new file mode 100644 index 00000000000..8e922b1cfed --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/modules/common/src/Module.js @@ -0,0 +1 @@ +export * from "./payments"; diff --git a/micro-ui/web/micro-ui-internals/packages/modules/common/src/hoc/index.js b/micro-ui/web/micro-ui-internals/packages/modules/common/src/hoc/index.js new file mode 100644 index 00000000000..695e38ccf3b --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/modules/common/src/hoc/index.js @@ -0,0 +1,3 @@ +import { SubformComposer } from "./subform-composer"; + +export { SubformComposer }; diff --git a/micro-ui/web/micro-ui-internals/packages/modules/common/src/hoc/subform-composer.js b/micro-ui/web/micro-ui-internals/packages/modules/common/src/hoc/subform-composer.js new file mode 100644 index 00000000000..98dd3df4551 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/modules/common/src/hoc/subform-composer.js @@ -0,0 +1,72 @@ +import { Card, CardHeader } from "@egovernments/digit-ui-react-components"; +import React, { useCallback, useEffect, useMemo, useState } from "react"; +import { useForm, Controller } from "react-hook-form"; +import { subFormRegistry } from "@egovernments/digit-ui-libraries"; + +export const SubformComposer = ({ _key, ...props }) => { + const config = subFormRegistry._registry[_key]; + const { setValue, setError, control, watch, getValues } = useForm({ shouldFocusError: true }); + const [state, setState] = useState(config?.state); + + const _setState = useCallback((obj) => { + setState((oldState) => ({ ...oldState, ...obj })); + }, []); + + const clearState = useCallback(() => { + setState(config.state); + }, []); + + const formData = watch(); + + useEffect(() => { + (async () => { + props.getSubFormValue(await callMiddlewares(formData)); + })(); + }, [formData]); + + const callMiddlewares = useCallback(async (data) => { + let applyBreak = false; + let itr = -1; + let _break = () => (applyBreak = true); + let _next = async (data) => { + if (!applyBreak && ++itr < config?.middlewares.length) { + let key = Object.keys(config?.middlewares[itr])[0]; + let nextMiddleware = config?.middlewares[itr][key]; + let isAsync = nextMiddleware.constructor.name === "AsyncFunction"; + if (isAsync) return await nextMiddleware(data, _break, _next); + else return nextMiddleware(data, _break, _next); + } else return data; + }; + let ret = await _next(data); + return ret; + }, []); + + const allFields = useMemo(() => (config && [...config?.fields, ...config?.addedFields]) || [], [config]); + + return ( + + + + {_key} + {allFields.map(({ label, component, customProps, defaultValue, name }, index) => { + let _customProps = typeof customProps === "function" ? customProps(state, _setState) : customProps; + let _defaultValue = typeof defaultValue === "function" ? defaultValue(state, _setState) : defaultValue; + return ( +
+ {label &&
{label}
} +
+ component({ ...props, setState: _setState, setValue, setError, state, getValues }, _customProps)} + /> +
+
+ ); + })} +
+ +
+ ); +}; diff --git a/micro-ui/web/micro-ui-internals/packages/modules/common/src/hoc/testForm-config.js b/micro-ui/web/micro-ui-internals/packages/modules/common/src/hoc/testForm-config.js new file mode 100644 index 00000000000..42c48e5e887 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/modules/common/src/hoc/testForm-config.js @@ -0,0 +1,148 @@ +import React from "react"; +import { Dropdown, SearchIconSvg } from "@egovernments/digit-ui-react-components"; + +const middleWare_1 = async (data, _break, _next) => { + data.a = "a"; + return await _next(data); +}; + +const middleWare_2 = async (data, _break, _next) => { + data.b = "b"; + // _break(); + return await _next(data); +}; + +const middleWare_3 = async (data, _break, _next) => { + data.c = "c"; + if (data.b === "b") { + try { + const res = await window.fetch(`https://ifsc.razorpay.com/hdfc0000090`); + if (res.ok) { + const { BANK, BRANCH } = await res.json(); + data.BANKFROMMiddleWare = BANK; + } else alert("Wrong IFSC Code"); + } catch (er) { + alert("Something Went Wrong !"); + } + } + return await _next(data); +}; + +const asyncData = { + a: ["1", "2", "3"], + b: ["4", "5", "6"], + c: ["7", "8", "9"], + j: ["10", "11", "12"], + k: ["22", "45"], + l: ["456"], +}; + +export const testForm = { + addedFields: [], + middlewares: [{ middleWare_1 }, { middleWare_2 }, { middleWare_3 }], + + state: { firstDDoptions: ["a", "b", "c"], secondDDoptions: asyncData.a, thirdDDoptions: ["d", "e", "f"] }, + + fields: [ + { + label: "first", + name: "pehla", + defaultValue: "b", + customProps: (state) => ({ isMendatory: true, option: state.firstDDoptions }), + component: (props, customProps) => ( + { + props.setState({ secondDDoptions: asyncData[d] }); + props.setValue("doosra", ""); + props.onChange(d); + }} + selected={props.value} + {...customProps} + /> + ), + validations: {}, + }, + { + label: "second", + name: "doosra", + customProps: (state) => ({ isMendatory: true, option: state.secondDDoptions }), + defaultValue: (state) => state.secondDDoptions[1], + component: (props, customProps) => ( + { + props.onChange(d); + }} + selected={props.value} + {...customProps} + /> + ), + }, + { + label: "third", + name: "teesra", + customProps: (state) => ({ isMendatory: true, option: state.thirdDDoptions }), + defaultValue: "d", + component: (props, customProps) => ( + { + props.onChange(d); + }} + selected={props.value} + {...customProps} + /> + ), + }, + { + label: "IFSC", + name: "ifsc", + customProps: { + isMendatory: true, + setBankDetailsFromIFSC: async (props) => { + try { + const res = await window.fetch(`https://ifsc.razorpay.com/${props.getValues("ifsc")}`); + if (res.ok) { + const { BANK, BRANCH } = await res.json(); + props.setValue("bank", BANK); + props.setValue("branch", BRANCH); + } else alert("Wrong IFSC Code"); + } catch (er) { + alert("Something Went Wrong !"); + } + }, + }, + defaultValue: "", + component: (props, customProps) => ( +
+ { + props.setState({ ifsc: e.target.value }); + props.onChange(e.target.value); + }} + /> + +
+ ), + }, + { + label: "Bank", + name: "bank", + defaultValue: "d", + component: (props, customProps) => , + }, + { + label: "Branch", + name: "branch", + defaultValue: "d", + component: (props, customProps) => , + }, + ], +}; diff --git a/micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/citizen/bills/index.js b/micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/citizen/bills/index.js new file mode 100644 index 00000000000..94de35555cc --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/citizen/bills/index.js @@ -0,0 +1,64 @@ +import { Loader } from "@egovernments/digit-ui-react-components"; +import React, { useEffect } from "react"; +import { useParams, useHistory, useRouteMatch, useLocation } from "react-router-dom"; +import Routes from "./routes"; +// import { myBillMap } from "./myBillsKeysMap"; + +export const MyBills = ({ stateCode }) => { + const { businessService } = useParams(); + const { tenantId: _tenantId, isDisoconnectFlow } = Digit.Hooks.useQueryParams(); + + const { isLoading: storeLoading, data: store } = Digit.Services.useStore({ + stateCode, + moduleCode: businessService, + language: Digit.StoreData.getCurrentLanguage(), + }); + + const history = useHistory(); + const { url } = useRouteMatch(); + const location = useLocation(); + + const { tenantId } = Digit.UserService.getUser()?.info || location?.state || { tenantId: _tenantId } || {}; + + if (!tenantId && !location?.state?.fromSearchResults) { + history.replace(`/${window?.contextPath}/citizen/login`, { from: url }); + } + + const { isLoading, data } = Digit.Hooks.useFetchCitizenBillsForBuissnessService( + { businessService }, + { refetchOnMount: true, enabled: !location?.state?.fromSearchResults } + ); + const { isLoading: mdmsLoading, data: mdmsBillingData } = Digit.Hooks.useGetPaymentRulesForBusinessServices(tenantId); + + const billsList = data?.Bill || []; + + const getPaymentRestrictionDetails = () => { + const payRestrictiondetails = mdmsBillingData?.MdmsRes?.BillingService?.BusinessService; + let updatedBussinessService = ((businessService === "WS" || businessService === "SW") && isDisoconnectFlow === "true") ? "DISCONNECT" : businessService; + if (payRestrictiondetails?.length) return payRestrictiondetails.filter((e) => e.code == updatedBussinessService)?.[0]||{ + isAdvanceAllowed: false, + isVoucherCreationEnabled: true, + minAmountPayable: 100, + partPaymentAllowed: false, + }; + else + return { + // isAdvanceAllowed: false, + // isVoucherCreationEnabled: true, + // minAmountPayable: 100, + // partPaymentAllowed: true, + }; + }; + + const getProps = () => ({ billsList, paymentRules: getPaymentRestrictionDetails(), businessService }); + + if (mdmsLoading) { + return ; + } + + return ( + + + + ); +}; diff --git a/micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/citizen/bills/routes/bill-details/arrear-summary.js b/micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/citizen/bills/routes/bill-details/arrear-summary.js new file mode 100644 index 00000000000..9df15ba9231 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/citizen/bills/routes/bill-details/arrear-summary.js @@ -0,0 +1,105 @@ +import React, { useState } from "react"; +import { useTranslation } from "react-i18next"; +import ArrearTable from "./arrear-table"; + +const styles = { + buttonStyle: { display: "flex", justifyContent: "flex-end", color: "#f47738" }, + headerStyle: { + marginTop: "10px", + fontSize: "16px", + fontWeight: "700", + lineHeight: "24px", + color: " rgba(11, 12, 12, var(--text-opacity))", + }, +}; + +const ArrearSummary = ({ bill = {} }) => { + const { t } = useTranslation(); + const formatTaxHeaders = (billDetail = {}) => { + let formattedFees = {}; + const { billAccountDetails = [] } = billDetail; + billAccountDetails.map((taxHead) => { + formattedFees[taxHead.taxHeadCode] = { value: taxHead.amount, order: taxHead.order }; + }); + formattedFees["CS_BILL_NO"] = { value: billDetail?.billNumber || "NA", order: -2 }; + formattedFees["CS_BILL_DUEDATE"] = { + value: (billDetail?.expiryDate && new Date(billDetail?.expiryDate).toLocaleDateString()) || "NA", + order: -1, + }; + formattedFees["TL_COMMON_TOTAL_AMT"] = { value: billDetail.amount, order: 10 }; + return formattedFees; + }; + + const getFinancialYears = (from, to) => { + const fromDate = new Date(from); + const toDate = new Date(to); + if (toDate.getYear() - fromDate.getYear() != 0) { + return `FY${fromDate.getYear() + 1900}-${toDate.getYear() - 100}`; + } + return `${fromDate.toLocaleDateString()}-${toDate.toLocaleDateString()}`; + }; + + let fees = {}; + let sortedBillDetails = bill?.billDetails?.sort((a, b) => b.fromPeriod - a.fromPeriod) || []; + sortedBillDetails = [...sortedBillDetails]; + const arrears = sortedBillDetails?.reduce((total, current, index) => (index === 0 ? total : total + current.amount), 0) || 0; + let arrearsAmount = `₹ ${arrears?.toFixed?.(0) || Number(0).toFixed(0)}`; + + sortedBillDetails.shift(); + sortedBillDetails.map((bill) => { + let fee = formatTaxHeaders(bill); + fees[getFinancialYears(bill.fromPeriod, bill.toPeriod)] = fee; + }); + + let head = {}; + fees + ? Object.keys(fees).map((key, ind) => { + let value = []; + Object.keys(fees[key]).map((key1) => { + head[key1] = (fees[key] && fees[key][key1] && fees[key][key1].order) || 0; + }); + }) + : "NA"; + let keys = []; + + keys = Object.keys(head); + keys.sort((x, y) => head[x] - head[y]); + + const [showArrear, setShowArrear] = useState(false); + + if (arrears == 0 || arrears < 0) { + return ; + } + return ( + +
{t("CS_ARREARS_DETAILS")}
+ {showArrear && } + {!showArrear && ( +
+ +
+ )} + {showArrear && ( +
+ +
+ )} +
+ ); +}; + +export default ArrearSummary; diff --git a/micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/citizen/bills/routes/bill-details/arrear-table.js b/micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/citizen/bills/routes/bill-details/arrear-table.js new file mode 100644 index 00000000000..22fabff393a --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/citizen/bills/routes/bill-details/arrear-table.js @@ -0,0 +1,103 @@ +import React from "react"; +import { useTranslation } from "react-i18next"; + +const styles = { + root: { + width: "100%", + marginTop: "2px", + overflowX: "auto", + boxShadow: "none", + }, + table: { + minWidth: 700, + backgroundColor: "rgba(250, 250, 250, var(--bg-opacity))", + }, + cell: { + maxWidth: "7em", + minWidth: "1em", + border: "1px solid #e8e7e6", + padding: "4px 5px", + fontSize: "0.8em", + textAlign: "left", + lineHeight: "1.5em", + }, + cellHeader: { + overflow: "hidden", + textOverflow: "ellipsis", + }, + cellLeft: { + // position: 'sticky', + // backgroundColor:'rgba(250, 250, 250, var(--bg-opacity))', + // left: 0 + }, + cellRight: { + // position: 'sticky', + // backgroundColor:'rgba(250, 250, 250, var(--bg-opacity))', + // right: 0 + }, +}; + +const ArrearTable = ({ className = "table", headers = [], values = [], arrears = 0 }) => { + const { t } = useTranslation(); + return ( + +
+ + + + + {headers.map((header, ind) => { + let styleRight = headers.length == ind + 1 ? styles.cellRight : {}; + return ( + + ); + })} + + + + {Object.values(values).map((row, ind) => ( + + + {headers.map((header, i) => { + let styleRight = headers.length == i + 1 ? styles.cellRight : {}; + return ( + + ); + })} + + ))} + + + {headers.map((header, ind) => { + if (ind == headers.length - 1) { + return ( + + ); + } else if (ind == headers.length - 2) { + return ( + + ); + } else { + return ; + } + })} + + +
{t("CS_BILL_PERIOD")} + {t(header)} +
+ {Object.keys(values)[ind]} + + {i > 1 && "₹"} + {(row[header] && row[header]["value"]) || "0"} +
+ {arrears} + + {t("COMMON_ARREARS_TOTAL")} +
+
+
+ ); +}; + +export default ArrearTable; diff --git a/micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/citizen/bills/routes/bill-details/bill-details.js b/micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/citizen/bills/routes/bill-details/bill-details.js new file mode 100644 index 00000000000..dcf0f047fce --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/citizen/bills/routes/bill-details/bill-details.js @@ -0,0 +1,270 @@ +import { Card, CardSubHeader, Header, KeyNote, Loader, RadioButtons, SubmitBar, TextInput } from "@egovernments/digit-ui-react-components"; +import React, { useEffect, useState } from "react"; +import { useTranslation } from "react-i18next"; +import { useHistory, useLocation, useParams } from "react-router-dom"; +import ArrearSummary from "./arrear-summary"; +import BillSumary from "./bill-summary"; +import { stringReplaceAll } from "./utils"; + +const BillDetails = ({ paymentRules, businessService }) => { + const { t } = useTranslation(); + const history = useHistory(); + const { state, pathname, search } = useLocation(); + const userInfo = Digit.UserService.getUser(); + let { consumerCode } = useParams(); + const { workflow: wrkflow, tenantId: _tenantId, authorization, ConsumerName } = Digit.Hooks.useQueryParams(); + const [bill, setBill] = useState(state?.bill); + const tenantId = state?.tenantId || _tenantId || Digit.UserService.getUser().info?.tenantId; + const propertyId = state?.propertyId; + if (wrkflow === "WNS" && consumerCode.includes("?")) consumerCode = consumerCode.substring(0, consumerCode.indexOf("?")); + const { data, isLoading } = state?.bill + ? { isLoading: false } + : Digit.Hooks.useFetchPayment({ + tenantId, + businessService, + consumerCode: wrkflow === "WNS" ? stringReplaceAll(consumerCode, "+", "/") : consumerCode, + }); + + let Useruuid = data?.Bill?.[0]?.userId || ""; + let requestCriteria = [ + "/user/_search", + {}, + { data: { uuid: [Useruuid] } }, + { recordId: Useruuid, plainRequestFields: ["mobileNumber"] }, + { + enabled: Useruuid ? true : false, + cacheTime: 100, + }, + ]; + + const { isLoading: isUserLoading, data: userData, revalidate } = Digit.Hooks.useCustomAPIHook(...requestCriteria); + + const { isLoading: isFSMLoading, isError, error, data: application, error: errorApplication } = Digit.Hooks.fsm.useApplicationDetail( + t, + tenantId, + consumerCode, + { enabled: pathname.includes("FSM") ? true : false }, + "CITIZEN" + ); + let { minAmountPayable, isAdvanceAllowed } = paymentRules; + minAmountPayable = wrkflow === "WNS" ? 100 : minAmountPayable; + const billDetails = bill?.billDetails?.sort((a, b) => b.fromPeriod - a.fromPeriod)?.[0] || []; + const Arrears = + bill?.billDetails + ?.sort((a, b) => b.fromPeriod - a.fromPeriod) + ?.reduce((total, current, index) => (index === 0 ? total : total + current.amount), 0) || 0; + + const { key, label } = Digit.Hooks.useApplicationsForBusinessServiceSearch({ businessService }, { enabled: false }); + + const getBillingPeriod = () => { + const { fromPeriod, toPeriod } = billDetails; + if (fromPeriod && toPeriod) { + let from, to; + if (wrkflow === "mcollect" || wrkflow === "WNS") { + from = + new Date(fromPeriod).getDate().toString() + + " " + + Digit.Utils.date.monthNames[new Date(fromPeriod).getMonth()]?.toString() + + " " + + new Date(fromPeriod).getFullYear().toString(); + to = + new Date(toPeriod).getDate() + + " " + + Digit.Utils.date.monthNames[new Date(toPeriod).getMonth()] + + " " + + new Date(toPeriod).getFullYear(); + return from + " - " + to; + } + from = new Date(billDetails.fromPeriod).getFullYear().toString(); + to = new Date(billDetails.toPeriod).getFullYear().toString(); + if (from === to) { + if(window.location.href.includes("BPA")) + { + if(new Date(data?.Bill?.[0]?.billDate).getMonth()+1 < 4) + { + let newfrom = (parseInt(from)-1).toString(); + return "FY " + newfrom + "-" + to; + } + else + { + let newTo = (parseInt(to)+1).toString(); + return "FY " + from + "-" + newTo; + } + } + else + return "FY " + from; + } + return "FY " + from + "-" + to; + } else return "N/A"; + }; + + const getBillBreakDown = () => billDetails?.billAccountDetails || []; + + const getTotal = () => bill?.totalAmount || 0; + const getAdvanceAmount = () => application?.pdfData?.advanceAmount; + + const [paymentType, setPaymentType] = useState(t("CS_PAYMENT_FULL_AMOUNT")); + const [amount, setAmount] = useState(getTotal()); + const [paymentAllowed, setPaymentAllowed] = useState(true); + const [formError, setError] = useState(""); + + if (authorization === "true" && !userInfo?.access_token) { + localStorage.clear(); + sessionStorage.clear(); + window.location.href = `/${window?.contextPath}/citizen/login?from=${encodeURIComponent(pathname + search)}`; + } + useEffect(() => { + window.scroll({ top: 0, behavior: "smooth" }); + }, []); + + useEffect(() => { + if (paymentType == t("CS_PAYMENT_FULL_AMOUNT")) setAmount(getTotal()); + }, [paymentType, bill]); + + useEffect(() => { + let changeAdvanceAllowed = isAdvanceAllowed; + if (isAdvanceAllowed && wrkflow === "WNS") changeAdvanceAllowed = false; + const allowPayment = minAmountPayable && amount >= minAmountPayable && !changeAdvanceAllowed && amount <= getTotal() && !formError; + if (paymentType != t("CS_PAYMENT_FULL_AMOUNT")) setPaymentAllowed(allowPayment); + else setPaymentAllowed(true); + }, [paymentType, amount]); + + useEffect(() => { + if (!isFSMLoading && application?.pdfData?.applicationStatus === "PENDING_APPL_FEE_PAYMENT") { + setPaymentAllowed(true); + setPaymentType(t("CS_PAYMENT_ADV_COLLECTION")); + } + }); + + useEffect(() => { + if (!bill && data) { + let requiredBill = data.Bill.filter((e) => e.consumerCode == (wrkflow === "WNS" ? stringReplaceAll(consumerCode, "+", "/") : consumerCode))[0]; + setBill(requiredBill); + } + }, [isLoading]); + + const onSubmit = () => { + let paymentAmount = + paymentType === t("CS_PAYMENT_FULL_AMOUNT") + ? getTotal() + : amount || businessService === "FSM.TRIP_CHARGES" + ? application?.pdfData?.advanceAmount + : amount; + if (window.location.href.includes("mcollect")) { + history.push(`/${window?.contextPath}/citizen/payment/collect/${businessService}/${consumerCode}?workflow=mcollect`, { + paymentAmount, + tenantId: billDetails.tenantId, + }); + } else if (wrkflow === "WNS") { + history.push(`/${window?.contextPath}/citizen/payment/billDetails/${businessService}/${consumerCode}/${paymentAmount}?workflow=WNS&ConsumerName=${ConsumerName}`, { + paymentAmount, + tenantId: billDetails.tenantId, + name: bill.payerName, + mobileNumber: bill.mobileNumber && bill.mobileNumber?.includes("*") ? userData?.user?.[0]?.mobileNumber : bill.mobileNumber, + }); + } else if (businessService === "PT") { + history.push(`/${window?.contextPath}/citizen/payment/billDetails/${businessService}/${consumerCode}/${paymentAmount}`, { + paymentAmount, + tenantId: billDetails.tenantId, + name: bill.payerName, + mobileNumber: bill.mobileNumber && bill.mobileNumber?.includes("*") ? userData?.user?.[0]?.mobileNumber : bill.mobileNumber, }); + } else { + history.push(`/${window?.contextPath}/citizen/payment/collect/${businessService}/${consumerCode}`, { paymentAmount, tenantId: billDetails.tenantId, propertyId: propertyId }); + } + }; + + const onChangeAmount = (value) => { + setError(""); + if (isNaN(value) || value.includes(".")) { + setError("AMOUNT_INVALID"); + } else if (!isAdvanceAllowed && value > getTotal()) { + setError("CS_ADVANCED_PAYMENT_NOT_ALLOWED"); + } else if (value < minAmountPayable) { + setError("CS_CANT_PAY_BELOW_MIN_AMOUNT"); + } + setAmount(value); + }; + + if (isLoading || isFSMLoading) return ; + + return ( + +
{t("CS_PAYMENT_BILL_DETAILS")}
+ +
+ + {businessService !== "PT.MUTATION" && businessService !== "FSM.TRIP_CHARGES" && ( + + )} + {businessService?.includes("PT") || + (wrkflow === "WNS" && billDetails?.currentBillNo && )} + {businessService?.includes("PT") || + (wrkflow === "WNS" && billDetails?.currentExpiryDate && ( + + ))} + {businessService === "FSM.TRIP_CHARGES" ? ( +
+ + + {application?.pdfData?.applicationStatus !== "PENDING_APPL_FEE_PAYMENT" ? ( + + ) : null} +
+ ) : ( + + )} + +
+ +
+
+ {t("CS_COMMON_PAYMENT_AMOUNT")} + {businessService === "FSM.TRIP_CHARGES" ? null : ( + + )} + +
+ + ₹ + + {paymentType !== t("CS_PAYMENT_FULL_AMOUNT") ? ( + businessService === "FSM.TRIP_CHARGES" ? ( + {}} value={getAdvanceAmount()} disable={true} /> + ) : ( + onChangeAmount(e.target.value)} value={amount} disable={getTotal() === 0} /> + ) + ) : ( + {}} disable={true} /> + )} + {formError === "CS_CANT_PAY_BELOW_MIN_AMOUNT" ? ( + + {t(formError)}: {"₹" + minAmountPayable} + + ) : ( + {t(formError)} + )} +
+ +
+
+
+ ); +}; + +export default BillDetails; diff --git a/micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/citizen/bills/routes/bill-details/bill-summary.js b/micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/citizen/bills/routes/bill-details/bill-summary.js new file mode 100644 index 00000000000..5cf0ea864e1 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/citizen/bills/routes/bill-details/bill-summary.js @@ -0,0 +1,47 @@ +import React, { useEffect } from "react"; +import { useTranslation } from "react-i18next"; + +const BillSumary = ({ billAccountDetails, total, businessService, arrears }) => { + const { t } = useTranslation(); + const { workflow: ModuleWorkflow } = Digit.Hooks.useQueryParams(); + + useEffect(() => { + ModuleWorkflow === "mcollect" && billAccountDetails && billAccountDetails.map((ob) => { + if(ob.taxHeadCode.includes("CGST")) + ob.order = 3; + else if(ob.taxHeadCode.includes("SGST")) + ob.order = 4; + }) + },[billAccountDetails]) + return ( + +
+ {billAccountDetails + .sort((a, b) => a.order - b.order) + .map((amountDetails, index) => { + return ( +
+
{t(amountDetails.taxHeadCode)}
+
₹ {Math.abs(amountDetails?.amount?.toFixed(2))}
+
+ ); + })} + + { +
+
{t("COMMON_ARREARS")}
+
₹ {Math.abs(arrears?.toFixed?.(2) || Number(0).toFixed(2))}
+
+ } + +
+
+
{t("CS_PAYMENT_TOTAL_AMOUNT")}
+
₹ {Number(total).toFixed(2)}
+
+
+
+ ); +}; + +export default BillSumary; diff --git a/micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/citizen/bills/routes/bill-details/utils.js b/micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/citizen/bills/routes/bill-details/utils.js new file mode 100644 index 00000000000..7a580f0139e --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/citizen/bills/routes/bill-details/utils.js @@ -0,0 +1,7 @@ +export const stringReplaceAll = (str = "", searcher = "", replaceWith = "") => { + if (searcher == "") return str; + while (str.includes(searcher)) { + str = str.replace(searcher, replaceWith); + } + return str; + }; \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/citizen/bills/routes/bill-details/yearwise-bills.js b/micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/citizen/bills/routes/bill-details/yearwise-bills.js new file mode 100644 index 00000000000..ea8aa25a58b --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/citizen/bills/routes/bill-details/yearwise-bills.js @@ -0,0 +1,73 @@ +import React, { useState } from "react"; +import { useTranslation } from "react-i18next"; + +const YearWiseBilltable = ({ bill, ...props }) => { + const { t } = useTranslation(); + const [showDetails, setShowDetails] = useState(true); + const yearWiseBills = bill?.billDetails?.sort((a, b) => b.fromPeriod - a.fromPeriod); + + const getFinancialYear = (_bill) => { + const { fromPeriod, toPeriod } = _bill; + let from = new Date(fromPeriod).getFullYear().toString(); + let to = new Date(toPeriod).getFullYear().toString(); + return from + "-" + to.slice(-2); + }; + + const thStyle = { whiteSpace: "break-spaces", paddingBottom: "13px" }; + + return ( + + {showDetails ? ( +
+
+
+ + { + + + + {yearWiseBills?.[0]?.billAccountDetails + ?.sort((a, b) => a.order - b.order) + ?.map((head, index) => ( + + ))} + + + + } + + {yearWiseBills?.map((bill, ind) => { + const sorted_tax_heads = bill?.billAccountDetails?.sort((a, b) => a.order - b.order); + return ( + + + {sorted_tax_heads.map((e, i) => ( + + ))} + + + ); + })} + +
+ {t("ES_FINANCIAL_YEAR")} + + {t(head.taxHeadCode)} + + {t("ES_TOTAL_TAX").split(" ")[0] + "\n" + t("ES_TOTAL_TAX").split(" ")[1]} +
{getFinancialYear(bill)}{e.amount}{bill.amount}
+
+
+
setShowDetails(false)} className="filter-button"> + {t("ES_COMMON_HIDE_DETAILS")} +
+
+ ) : ( +
setShowDetails(true)} className="filter-button"> + {t("ES_COMMON_VIEW_DETAILS")} +
+ )} +
+ ); +}; +export default YearWiseBilltable; diff --git a/micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/citizen/bills/routes/index.js b/micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/citizen/bills/routes/index.js new file mode 100644 index 00000000000..812d541bcae --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/citizen/bills/routes/index.js @@ -0,0 +1,21 @@ +import React from "react"; +import { Route, Switch, useRouteMatch } from "react-router-dom"; +import { BillList } from "./my-bills/my-bills"; +import BillDetails from "./bill-details/bill-details"; +import { BackButton } from "@egovernments/digit-ui-react-components"; + +const BillRoutes = ({ billsList, paymentRules, businessService }) => { + const { url: currentPath, ...match } = useRouteMatch(); + + return ( + + + + } /> + } /> + + + ); +}; + +export default BillRoutes; diff --git a/micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/citizen/bills/routes/my-bills/my-bill.js b/micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/citizen/bills/routes/my-bills/my-bill.js new file mode 100644 index 00000000000..617d8a0590a --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/citizen/bills/routes/my-bills/my-bill.js @@ -0,0 +1,35 @@ +import React from "react"; +import { useTranslation } from "react-i18next"; +import { Card, KeyNote, SubmitBar } from "@egovernments/digit-ui-react-components"; +import { Link, useHistory } from "react-router-dom"; + +// import { getKeyNotesConfig } from "./keynotesConfig"; + +const MyBill = ({ bill, currentPath, businessService, getKeyNotesConfig }) => { + const { t } = useTranslation(); + const history = useHistory(); + + const onSubmit = () => { + history.push(`${currentPath}/${bill.consumerCode}`, { tenantId:bill?.tenantId }); + }; + + return ( + + {typeof getKeyNotesConfig === "function" && ( + + {getKeyNotesConfig(businessService, t)["my-bill"].map((obj, index) => { + const value = obj.keyPath.reduce((acc, key) => { + if (typeof key === "function") acc = key(acc); + else acc = acc[key]; + return acc; + }, bill); + return ; + })} + + + )} + + ); +}; + +export default MyBill; diff --git a/micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/citizen/bills/routes/my-bills/my-bills.js b/micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/citizen/bills/routes/my-bills/my-bills.js new file mode 100644 index 00000000000..2191941f8e5 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/citizen/bills/routes/my-bills/my-bills.js @@ -0,0 +1,94 @@ +import React, { useState, useEffect, useMemo } from "react"; +import { ArrowLeft, Header, Loader } from "@egovernments/digit-ui-react-components"; +import { useTranslation } from "react-i18next"; +import { Link, useHistory } from "react-router-dom"; + +import MyBill from "./my-bill"; + +export const BillList = ({ billsList, currentPath, businessService }) => { + const { t } = useTranslation(); + const history = useHistory(); + + const consumerCodes = billsList.map((bill) => bill.consumerCode); + // const { mobileNumber } = Digit.UserService.getUser()?.info; + + const searchResult = Digit.Hooks.useApplicationsForBusinessServiceSearch({ filters: { consumerCodes: consumerCodes.join() }, businessService }); + + /* + call the relevant business search and find what key is being used as consumerCode in bills it is as follows :- + + FSM -> applicationNo + PT -> propertyId + + */ + + const keyForConsumerCode = searchResult.key; + + const [applicationList, setApplicationList] = useState([]); + const [getKeyNotesConfig, setConfig] = useState(() => Digit.ComponentRegistryService?.getComponent("getBillDetailsConfigWithBusinessService")); + const billableApplicationsObj = useMemo(() => ({}), []); + const billsListObj = useMemo(() => ({}), []); + + useEffect(() => { + if (searchResult.data) searchResult.refetch(); + }, []); + + useEffect(() => { + if (searchResult.data) { + const billableApps = searchResult.data.filter((property) => consumerCodes.includes(property[keyForConsumerCode])); + const billableIDs = billableApps.map((e) => e[keyForConsumerCode]); + + billableApps.forEach((app) => { + billableApplicationsObj[app[keyForConsumerCode]] = app; + }); + + + billsList.forEach((bill) => { + billsListObj[bill.consumerCode] = bill; + }); + + const newBillsList = billableIDs.map((e) => ({ ...billsListObj[e], ...billableApplicationsObj[e] })); + setApplicationList(newBillsList); + } + }, [searchResult.data, getKeyNotesConfig]); + + if (searchResult.isLoading) { + return ; + } + + return ( + +
+ {/*
*/} +
{t("CS_TITLE_MY_BILLS") + ` (${applicationList.length})`}
+ {applicationList?.length > 0 && + getKeyNotesConfig && + applicationList.map((bill, index) => ( +
+ +
+ ))} + {!applicationList?.length > 0 &&

{t("CS_BILLS_TEXT_NO_BILLS_FOUND")}

} + {/*
*/} + {businessService === "PT" && ( +

+ {t("PT_TEXT_NOT_ABLE_TO_FIND_THE_PROPERTY")} + + {t("PT_COMMON_CLICK_HERE")} + +

+ )} +
+
+ ); +}; diff --git a/micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/citizen/index.js b/micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/citizen/index.js new file mode 100644 index 00000000000..8bbbef59a99 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/citizen/index.js @@ -0,0 +1,39 @@ +import React from "react"; +import { Switch, Route, useRouteMatch } from "react-router-dom"; +import { PrivateRoute } from "@egovernments/digit-ui-react-components"; +import PayersDetails from "./payers-details"; + +import { MyBills } from "./bills"; +import { SelectPaymentType } from "./payment-type/index"; +import { SuccessfulPayment, FailedPayment } from "./response"; + +const CitizenPayment = ({ stateCode, cityCode, moduleCode }) => { + const { path: currentPath } = useRouteMatch(); + const commonProps = { stateCode, cityCode, moduleCode }; + + return ( + +
+ + + + + + + + + + + + + + + + + +
+
+ ); +}; + +export default CitizenPayment; diff --git a/micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/citizen/keynotesConfig.js b/micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/citizen/keynotesConfig.js new file mode 100644 index 00000000000..0e9378815fb --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/citizen/keynotesConfig.js @@ -0,0 +1,104 @@ +import React from "react"; + +export const getKeyNotesConfig = (businessService, t) => { + const businessId = businessService?.toLowerCase().split(".")[0]; + + switch (businessId) { + case "pt": + return { + "my-bill": [ + { + keyValue: "CS_COMMON_AMOUNT_DUE", + keyPath: [ + (d) => { + const overdueBy = new Date().getTime() - new Date(d.billDetails[0]?.toPeriod).getTime(); + const days = Math.floor(overdueBy / (86400 * 1000)); + return ( + + {"₹" + d["totalAmount"]} + {days >= 0 ? ( + {` ( ${t( + "CS_PAYMENT_OVERDUE" + )} ${days} ${t(days === 1 ? "CS_COMMON_DAY" : "CS_COMMON_DAYS")})`} + ) : null} + + ); + }, + ], + fallback: "N/A", + noteStyle: { fontWeight: "bold", fontSize: "24px", paddingTop: "5px" }, + }, + { + keyValue: "PT_PROPERTY_ID", + keyPath: ["propertyId"], + fallback: "", + }, + { + keyValue: "CS_OWNER_NAME", + keyPath: ["owners", 0, "name"], + fallback: "ES_TITLE_FSM", + }, + { + keyValue: "PT_PROPERTY_ADDRESS", + keyPath: ["address", "locality", "name"], + fallback: "CS_APPLICATION_TYPE_DESLUDGING", + }, + { + keyValue: "CS_PAYMENT_BILLING_PERIOD", + keyPath: [ + "billDetails", + (d) => { + const { fromPeriod, toPeriod } = d[0]; + if (fromPeriod && toPeriod) { + let from = new Date(fromPeriod).getFullYear().toString(); + let to = new Date(toPeriod).getFullYear().toString(); + return "FY " + from + "-" + to; + } else return "N/A"; + }, + ], + fallback: "N/A", + }, + { + keyValue: "PT_DUE_DATE", + keyPath: [ + "billDetails", + (d) => { + if (!d[0]?.toPeriod) return "N/A"; + const date = new Date(d[0]?.toPeriod); + const month = Digit.Utils.date.monthNames[date.getMonth()]; + return `${date.getDate()} ${month} ${date.getFullYear()}`; + }, + ], + fallback: "N/A", + }, + ], + response: [], + }; + + /** + + */ + + case "fsm": + return { + "my-bill": [ + { + keyValue: "CS_COMMON_AMOUNT_DUE", + keyPath: ["totalAmount", (d) => d.toFixed(2), (d) => "₹" + d], + fallback: "N/A", + noteStyle: { fontWeight: "bold", fontSize: "24px", paddingTop: "5px" }, + }, + ], + response: [], + }; + } +}; diff --git a/micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/citizen/payers-details/index.js b/micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/citizen/payers-details/index.js new file mode 100644 index 00000000000..f2dbfdc9936 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/citizen/payers-details/index.js @@ -0,0 +1,241 @@ +import React, { useState, useEffect } from "react"; +import { + Header, + Card, + RadioButtons, + SubmitBar, + BackButton, + Loader, + TextInput, + MobileNumber, + CheckBox, + CitizenConsentForm +} from "@egovernments/digit-ui-react-components"; +import { useTranslation } from "react-i18next"; +import { useForm } from "react-hook-form"; +import { useParams, useHistory, useLocation } from "react-router-dom"; +import { stringReplaceAll } from "../bills/routes/bill-details/utils"; + +const SelectPaymentType = (props) => { + const optionFirst = { + code: "PAY_BY_OWNER", + i18nKey: "PT_PAY_BY_OWNER", + name: "I am making the payment as the owner/ consumer of the service", + }; + + const optionSecound = { + code: "PAY_BEHALF_OWNER", + i18nKey: "PT_PAY_BEHALF_OWNER", + name: "I am making the payment on behalf of the owner/ consumer of the service", + }; + + const userInfo = Digit.UserService.getUser()?.info; + const payersActiveName = userInfo?.name; + const payersActiveMobileNumber = userInfo?.mobileNumber; + + const { t } = useTranslation(); + const history = useHistory(); + const { state, ...location } = useLocation(); + const { consumerCode, businessService, paymentAmt } = useParams(); + const { workflow: wrkflow, tenantId: _tenantId, ConsumerName } = Digit.Hooks.useQueryParams(); + const [bill, setBill] = useState(state?.bill); + const tenantId = state?.tenantId || _tenantId || Digit.UserService.getUser().info?.tenantId; + const isLoggedIn = Digit.UserService.getUser() + + + const { data, isLoading } = state?.bill ? { isLoading: false } : Digit.Hooks.useFetchPayment({ tenantId, businessService, consumerCode }); + + let Useruuid = data?.Bill?.[0]?.userId || ""; + let requestCriteria = [ + "/user/_search", + {}, + {data : {uuid:[Useruuid]}}, + { recordId: Useruuid, plainRequestFields: ["mobileNumber"] }, + { + enabled: Useruuid ? true : false, + cacheTime: 100, + } + ] + const { isLoading : isUserLoading, data: userData, revalidate } = Digit.Hooks.useCustomAPIHook(...requestCriteria); + + const billDetails = bill?.billDetails?.sort((a, b) => b.fromPeriod - a.fromPeriod)?.[0] || []; + const Arrears = + bill?.billDetails + ?.sort((a, b) => b.fromPeriod - a.fromPeriod) + ?.reduce((total, current, index) => (index === 0 ? total : total + current.amount), 0) || 0; + + const [paymentType, setPaymentType] = useState(optionFirst); + const [payersName, setPayersName] = useState(""); + const [payersMobileNumber, setPayersMobileNumber] = useState(""); + const { control, handleSubmit } = useForm(); + const [canSubmit, setCanSubmit] = useState(false); + const [mobileNumberError, setmobileNumberError] = useState(null); + const [isCheckBox, setIsCheckBox] = useState(false); + const [isCCFEnabled, setisCCFEnabled] = useState(false); + const [mdmsConfig, setMdmsConfig] = useState(""); + + const { isLoading: citizenConcentFormLoading, data:ccfData } = Digit.Hooks.useCustomMDMS(Digit.ULBService.getStateId(), "common-masters", [{ name: "CitizenConsentForm" }]); + + function setTermsAndPolicyDetails(e) { + setIsCheckBox(e.target.checked) + } + + const checkDisbaled = () => { + if (isCCFEnabled?.isCitizenConsentFormEnabled && !isLoggedIn?.access_token) { + const isData = paymentType?.code !== optionSecound?.code ? false : userInfo ? false : !canSubmit; + let isEnabled = false + if (!isData && isCheckBox) isEnabled = false; + else isEnabled = true; + return isEnabled; + } else { + return paymentType?.code !== optionSecound?.code ? false : userInfo ? false : !canSubmit + } + } + + useEffect(()=> { + if (ccfData?.["common-masters"]?.CitizenConsentForm?.[0]?.isCitizenConsentFormEnabled) { + setisCCFEnabled(ccfData?.["common-masters"]?.CitizenConsentForm?.[0]) + } + }, [ccfData]); + + const onLinkClick = (e) => { + setMdmsConfig(e.target.id) +} + + const checkLabels = () => { + return + {isCCFEnabled?.checkBoxLabels?.map((data, index) => { + return + {/* {index == 0 && "CCF"} */} + {data?.linkPrefix && {t(`${data?.linkPrefix}_`)}} + {data?.link && { onLinkClick(e) }} style={{ color: "#F47738", cursor: "pointer" }}>{t(`${data?.link}_`)}} + {data?.linkPostfix && {t(`${data?.linkPostfix}_`)}} + {(index == isCCFEnabled?.checkBoxLabels?.length - 1) && t("LABEL")} + + })} + + } + + + useEffect(() => { + if (!bill && data) { + let requiredBill = data?.Bill?.filter((e) => e.consumerCode == consumerCode)[0]; + setBill(requiredBill); + } + }, [isLoading]); + + const onChangePayersMobileNumber = (e) => { + setmobileNumberError(null); + let validation = "^\\d{10}$"; + if (!e.match(validation)) { + setmobileNumberError("CORE_COMMON_PHONENO_INVALIDMSG"); + setCanSubmit(false); + } + setPayersMobileNumber(e); + + e.length == 10 && payersName != "" ? setCanSubmit(true) : setCanSubmit(false); + }; + + const onChangePayersName = (value) => { + setPayersName(value); + value.length !== 0 && mobileNumberError != "CORE_COMMON_PHONENO_INVALIDMSG" && payersName != "" && payersMobileNumber != "" ? setCanSubmit(true) : setCanSubmit(false); + }; + + const onSubmit = () => { + if(wrkflow === "WNS") + { + history.push(`/${window?.contextPath}/citizen/payment/collect/${businessService}/${consumerCode}?workflow=WNS&consumerCode=${stringReplaceAll(consumerCode, "+", "/")}`, { + paymentAmount: paymentAmt, + tenantId: billDetails.tenantId, + name: paymentType?.code !== optionSecound?.code && ConsumerName !== "undefined" ? ConsumerName : userInfo ? payersActiveName : payersName, + mobileNumber: paymentType?.code !== optionSecound?.code ? (bill?.mobileNumber?.includes("*") ? userData?.user?.[0]?.mobileNumber : bill?.mobileNumber ) : userInfo ? payersActiveMobileNumber : payersMobileNumber, + }); + } + else{ + history.push(`/${window?.contextPath}/citizen/payment/collect/${businessService}/${consumerCode}`, { + paymentAmount: paymentAmt, + tenantId: billDetails.tenantId, + name: paymentType?.code !== optionSecound?.code ? bill?.payerName : userInfo ? payersActiveName : payersName, + mobileNumber: paymentType?.code !== optionSecound?.code ? (bill?.mobileNumber?.includes("*") ? userData?.user?.[0]?.mobileNumber : bill?.mobileNumber ) : userInfo ? payersActiveMobileNumber : payersMobileNumber, + }); + } + }; + + if (isLoading || isUserLoading || citizenConcentFormLoading) { + return ; + } + + return ( + + {t("CS_COMMON_BACK")} +
+ {/*
{t("PAYMENT_CS_HEADER")}
*/} +
{t("PT_PAYERS_DETAILS_HEADER")}
+ + {t(mobileNumberError)} + +
+ {paymentType?.code !== optionFirst?.code && !userInfo ? ( +
+ + {t("PT_PAYERS_MOBILE_NO")} + + + + {t("PT_PAYERS_NAME")} + onChangePayersName(e.target.value)} + value={payersName} + /> + +
+ ) : null} +
+ + {isCCFEnabled?.isCitizenConsentFormEnabled && !isLoggedIn?.access_token &&
+ + + +
} + + +
+
+
+ ); +}; + +export default SelectPaymentType; diff --git a/micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/citizen/payment-type/index.js b/micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/citizen/payment-type/index.js new file mode 100644 index 00000000000..0bac57d4a66 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/citizen/payment-type/index.js @@ -0,0 +1,144 @@ +import React, { useEffect, useState } from "react"; +import { + Header, + Card, + RadioButtons, + SubmitBar, + BackButton, + CardLabel, + CardLabelDesc, + CardSectionHeader, + InfoBanner, + Loader, + Toast, + CardText, +} from "@egovernments/digit-ui-react-components"; +import { useTranslation } from "react-i18next"; +import { useForm, Controller } from "react-hook-form"; +import { useParams, useHistory, useLocation, Redirect } from "react-router-dom"; +import { stringReplaceAll } from "../bills/routes/bill-details/utils"; + +export const SelectPaymentType = (props) => { + const { state = {} } = useLocation(); + const userInfo = Digit.UserService.getUser(); + const [showToast, setShowToast] = useState(null); + const { tenantId: __tenantId, authorization, workflow: wrkflow , consumerCode : connectionNo } = Digit.Hooks.useQueryParams(); + const paymentAmount = state?.paymentAmount; + const { t } = useTranslation(); + const history = useHistory(); + const { pathname, search } = useLocation(); + // const menu = ["AXIS"]; + let { consumerCode, businessService } = useParams(); + const tenantId = state?.tenantId || __tenantId || Digit.ULBService.getCurrentTenantId(); + const propertyId = state?.propertyId; + const stateTenant = Digit.ULBService.getStateId(); + const { control, handleSubmit } = useForm(); + const { data: menu, isLoading } = Digit.Hooks.useCommonMDMS(stateTenant, "DIGIT-UI", "PaymentGateway"); + const { data: paymentdetails, isLoading: paymentLoading } = Digit.Hooks.useFetchPayment( + { tenantId: tenantId, consumerCode: wrkflow === "WNS" ? connectionNo : consumerCode, businessService }, + {} + ); + if (window.location.href.includes("ISWSCON") || wrkflow === "WNS") consumerCode = decodeURIComponent(consumerCode); + if( wrkflow === "WNS") consumerCode = stringReplaceAll(consumerCode,"+","/") + useEffect(() => { + if (paymentdetails?.Bill && paymentdetails.Bill.length == 0) { + setShowToast({ key: true, label: "CS_BILL_NOT_FOUND" }); + } + }, [paymentdetails]); + useEffect(() => { + localStorage.setItem("BillPaymentEnabled", "true"); + }, []); + const { name, mobileNumber } = state; + + const billDetails = paymentdetails?.Bill ? paymentdetails?.Bill[0] : {}; + + const onSubmit = async (d) => { + const filterData = { + Transaction: { + tenantId: billDetails?.tenantId, + txnAmount: paymentAmount || billDetails.totalAmount, + module: businessService, + billId: billDetails.id, + consumerCode: consumerCode, + productInfo: "Common Payment", + gateway: d.paymentType, + taxAndPayments: [ + { + billId: billDetails.id, + amountPaid: paymentAmount || billDetails.totalAmount, + }, + ], + user: { + name: (name || userInfo?.info?.name || billDetails?.payerName).trim(), + mobileNumber: mobileNumber || userInfo?.info?.mobileNumber || billDetails?.mobileNumber, + tenantId: billDetails?.tenantId, + }, + // success + callbackUrl: window.location.href.includes("mcollect") || wrkflow === "WNS" + ? `${window.location.protocol}//${window.location.host}/${window?.contextPath}/citizen/payment/success/${businessService}/${wrkflow === "WNS"? encodeURIComponent(consumerCode):consumerCode}/${tenantId}?workflow=${wrkflow === "WNS"? wrkflow : "mcollect"}` + : `${window.location.protocol}//${window.location.host}/${window?.contextPath}/citizen/payment/success/${businessService}/${wrkflow === "WNS"? encodeURIComponent(consumerCode):consumerCode}/${tenantId}?propertyId=${propertyId}`, + additionalDetails: { + isWhatsapp: false, + }, + }, + }; + + try { + const data = await Digit.PaymentService.createCitizenReciept(billDetails?.tenantId, filterData); + const redirectUrl = data?.Transaction?.redirectUrl; + window.location = redirectUrl; + } catch (error) { + let messageToShow = "CS_PAYMENT_UNKNOWN_ERROR_ON_SERVER"; + if (error.response?.data?.Errors?.[0]) { + const { code, message } = error.response?.data?.Errors?.[0]; + messageToShow = code; + } + setShowToast({ key: true, label: t(messageToShow) }); + } + }; + + if (authorization === "true" && !userInfo.access_token) { + localStorage.clear(); + sessionStorage.clear(); + window.location.href = `/${window?.contextPath}/citizen/login?from=${encodeURIComponent(pathname + search)}`; + } + + if (isLoading || paymentLoading) { + return ; + } + + return ( + + {t("CS_COMMON_BACK")} +
+
{t("PAYMENT_CS_HEADER")}
+ +
+ {t("PAYMENT_CS_TOTAL_AMOUNT_DUE")} + ₹ { paymentAmount !== undefined ? Number(paymentAmount).toFixed(2) : Number(billDetails?.totalAmount).toFixed(2)} +
+ {t("PAYMENT_CS_SELECT_METHOD")} + {menu?.length && ( + } + /> + )} + {!showToast && } +
+
+ + {showToast && ( + { + setShowToast(null); + }} + /> + )} +
+ ); +}; diff --git a/micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/citizen/response/index.js b/micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/citizen/response/index.js new file mode 100644 index 00000000000..9cc35b94fa6 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/citizen/response/index.js @@ -0,0 +1,426 @@ +import { Banner, Card, CardText, Loader, Row, StatusTable, SubmitBar, DownloadPrefixIcon } from "@egovernments/digit-ui-react-components"; +import React, { useEffect, useState } from "react"; +import { useTranslation } from "react-i18next"; +import { useQueryClient } from "react-query"; +import { Link, useParams } from "react-router-dom"; + +export const SuccessfulPayment = (props)=>{ + if(localStorage.getItem("BillPaymentEnabled")!=="true"){ + window.history.forward(); + return null; + } + return +} + + + const WrapPaymentComponent = (props) => { + const { t } = useTranslation(); + const queryClient = useQueryClient(); + const { eg_pg_txnid: egId, workflow: workflw, propertyId } = Digit.Hooks.useQueryParams(); + const [printing, setPrinting] = useState(false); + const [allowFetchBill, setallowFetchBill] = useState(false); + const { businessService: business_service, consumerCode, tenantId } = useParams(); + const { data: bpaData = {}, isLoading: isBpaSearchLoading, isSuccess: isBpaSuccess, error: bpaerror } = Digit?.Hooks?.obps?.useOBPSSearch( + "", {}, tenantId, { applicationNo: consumerCode }, {}, {enabled:(window.location.href.includes("bpa") || window.location.href.includes("BPA"))} + )||{}; + + const { isLoading, data, isError } = Digit.Hooks.usePaymentUpdate({ egId }, business_service, { + retry: false, + staleTime: Infinity, + refetchOnWindowFocus: false, + }); + + const { label } = Digit.Hooks.useApplicationsForBusinessServiceSearch({ businessService: business_service }, { enabled: false }); + + // const { data: demand } = Digit.Hooks.useDemandSearch( + // { consumerCode, businessService: business_service }, + // { enabled: !isLoading, retry: false, staleTime: Infinity, refetchOnWindowFocus: false } + // ); + + // const { data: billData, isLoading: isBillDataLoading } = Digit.Hooks.useFetchPayment( + // { tenantId, consumerCode, businessService: business_service }, + // { enabled: allowFetchBill, retry: false, staleTime: Infinity, refetchOnWindowFocus: false } + // ); + + const { data: reciept_data, isLoading: recieptDataLoading } = Digit.Hooks.useRecieptSearch( + { + tenantId, + businessService: business_service, + receiptNumbers: data?.payments?.Payments?.[0]?.paymentDetails[0].receiptNumber, + }, + { + retry: false, + staleTime: Infinity, + refetchOnWindowFocus: false, + select: (dat) => { + return dat.Payments[0]; + }, + enabled: allowFetchBill, + } + ); + + const { data: generatePdfKey } = Digit.Hooks.useCommonMDMS(tenantId, "common-masters", "ReceiptKey", { + select: (data) => + data["common-masters"]?.uiCommonPay?.filter(({ code }) => business_service?.includes(code))[0]?.receiptKey || "consolidatedreceipt", + retry: false, + staleTime: Infinity, + refetchOnWindowFocus: false, + }); + + const payments = data?.payments; + + useEffect(() => { + return () => { + localStorage.setItem("BillPaymentEnabled","false") + queryClient.clear(); + }; + }, []); + + useEffect(() => { + if (data && data.txnStatus && data.txnStatus !== "FAILURE") { + setallowFetchBill(true); + } + }, [data]); + + if (isLoading || recieptDataLoading) { + return ; + } + + const applicationNo = data?.applicationNo; + + const isMobile = window.Digit.Utils.browser.isMobile(); + + + if (isError || !payments || !payments.Payments || payments.Payments.length === 0 || data.txnStatus === "FAILURE") { + return ( + + + {t("CS_PAYMENT_FAILURE_MESSAGE")} + {!(business_service?.includes("PT")) ? ( + + + + ) : ( + + + + +
+ {t("CORE_COMMON_GO_TO_HOME")} +
+
+ )} +
+ ); + } + + const paymentData = data?.payments?.Payments[0]; + const amount = reciept_data?.paymentDetails?.[0]?.totalAmountPaid; + const transactionDate = paymentData?.transactionDate; + const printCertificate = async () => { + //const tenantId = Digit.ULBService.getCurrentTenantId(); + const state = tenantId; + const applicationDetails = await Digit.TLService.search({ applicationNumber: consumerCode, tenantId }); + const generatePdfKeyForTL = "tlcertificate"; + + if (applicationDetails) { + let response = await Digit.PaymentService.generatePdf(state, { Licenses: applicationDetails?.Licenses }, generatePdfKeyForTL); + const fileStore = await Digit.PaymentService.printReciept(state, { fileStoreIds: response.filestoreIds[0] }); + window.open(fileStore[response.filestoreIds[0]], "_blank"); + } + }; + + const printReciept = async () => { + if (printing) return; + setPrinting(true); + const tenantId = paymentData?.tenantId; + const state = Digit.ULBService.getStateId(); + let response = { filestoreIds: [payments.Payments[0]?.fileStoreId] }; + if (!paymentData?.fileStoreId) { + response = await Digit.PaymentService.generatePdf(state, { Payments: [payments.Payments[0]] }, generatePdfKey); + } + const fileStore = await Digit.PaymentService.printReciept(state, { fileStoreIds: response.filestoreIds[0] }); + if (fileStore && fileStore[response.filestoreIds[0]]) { + window.open(fileStore[response.filestoreIds[0]], "_blank"); + } + setPrinting(false); + }; + + const convertDateToEpoch = (dateString, dayStartOrEnd = "dayend") => { + //example input format : "2018-10-02" + try { + const parts = dateString.match(/(\d{4})-(\d{1,2})-(\d{1,2})/); + const DateObj = new Date(Date.UTC(parts[1], parts[2] - 1, parts[3])); + DateObj.setMinutes(DateObj.getMinutes() + DateObj.getTimezoneOffset()); + if (dayStartOrEnd === "dayend") { + DateObj.setHours(DateObj.getHours() + 24); + DateObj.setSeconds(DateObj.getSeconds() - 1); + } + return DateObj.getTime(); + } catch (e) { + return dateString; + } + }; + + const printPdf = (blob) => { + const fileURL = URL.createObjectURL(blob); + var myWindow = window.open(fileURL); + if (myWindow != undefined) { + myWindow.addEventListener("load", (event) => { + myWindow.focus(); + myWindow.print(); + }); + } + }; + + const downloadPdf = (blob, fileName) => { + if (window.mSewaApp && window.mSewaApp.isMsewaApp() && window.mSewaApp.downloadBase64File) { + var reader = new FileReader(); + reader.readAsDataURL(blob); + reader.onloadend = function () { + var base64data = reader.result; + mSewaApp.downloadBase64File(base64data, fileName); + }; + } else { + const link = document.createElement("a"); + // create a blobURI pointing to our Blob + link.href = URL.createObjectURL(blob); + link.download = fileName; + // some browser needs the anchor to be in the doc + document.body.append(link); + link.click(); + link.remove(); + // in case the Blob uses a lot of memory + setTimeout(() => URL.revokeObjectURL(link.href), 7000); + } + }; + + const getPermitOccupancyOrderSearch = async(order, mode="download") => { + let queryObj = { applicationNo: bpaData?.[0]?.applicationNo }; + let bpaResponse = await Digit.OBPSService.BPASearch(bpaData?.[0]?.tenantId, queryObj); + const edcrResponse = await Digit.OBPSService.scrutinyDetails(bpaData?.[0]?.tenantId, { edcrNumber: bpaData?.[0]?.edcrNumber }); + let bpaDataDetails = bpaResponse?.BPA?.[0], edcrData = edcrResponse?.edcrDetail?.[0]; + let currentDate = new Date(); + bpaDataDetails.additionalDetails.runDate = convertDateToEpoch( + currentDate.getFullYear() + "-" + (currentDate.getMonth() + 1) + "-" + currentDate.getDate() + ); + let reqData = { ...bpaDataDetails, edcrDetail: [{ ...edcrData }] }; + let response = await Digit.PaymentService.generatePdf(bpaDataDetails?.tenantId, { Bpa: [reqData] }, order); + const fileStore = await Digit.PaymentService.printReciept(bpaDataDetails?.tenantId, { fileStoreIds: response.filestoreIds[0] }); + window.open(fileStore[response?.filestoreIds[0]], "_blank"); + + reqData["applicationType"] = bpaDataDetails?.additionalDetails?.applicationType; + let edcrresponse = await Digit.OBPSService.edcr_report_download({ BPA: { ...reqData } }); + const responseStatus = parseInt(edcrresponse.status, 10); + if (responseStatus === 201 || responseStatus === 200) { + mode == "print" + ? printPdf(new Blob([edcrresponse.data], { type: "application/pdf" })) + : downloadPdf(new Blob([edcrresponse.data], { type: "application/pdf" }), `edcrReport.pdf`); + } + }; + + const getBillingPeriod = (billDetails) => { + const { taxPeriodFrom, taxPeriodTo, fromPeriod, toPeriod } = billDetails || {}; + if (taxPeriodFrom && taxPeriodTo) { + let from = new Date(taxPeriodFrom).getFullYear().toString(); + let to = new Date(taxPeriodTo).getFullYear().toString(); + return "FY " + from + "-" + to; + } else if (fromPeriod && toPeriod) { + if (workflw === "mcollect") { + let from = + new Date(fromPeriod).getDate().toString() + + " " + + Digit.Utils.date.monthNames[new Date(fromPeriod).getMonth() ].toString() + + " " + + new Date(fromPeriod).getFullYear().toString(); + let to = + new Date(toPeriod).getDate() + + " " + + Digit.Utils.date.monthNames[new Date(toPeriod).getMonth()] + + " " + + new Date(toPeriod).getFullYear(); + return from + " - " + to; + } + else if(workflw === "WNS") + { + let from = + new Date(fromPeriod).getDate().toString() + + "/" + + (new Date(fromPeriod).getMonth() + 1).toString() + + "/" + + new Date(fromPeriod).getFullYear().toString(); + let to = + new Date(toPeriod).getDate() + + "/" + + (new Date(toPeriod).getMonth() + 1) + + "/" + + new Date(toPeriod).getFullYear(); + return from + " - " + to; + } + let from = new Date(fromPeriod).getFullYear().toString(); + let to = new Date(toPeriod).getFullYear().toString(); + return "FY " + from + "-" + to; + } else return "N/A"; + }; + + let bannerText; + if (workflw) { + bannerText = `CITIZEN_SUCCESS_UC_PAYMENT_MESSAGE`; + } else { + if (paymentData?.paymentDetails?.[0]?.businessService && paymentData?.paymentDetails?.[0]?.businessService?.includes("BPA")) { + let nameOfAchitect = sessionStorage.getItem("BPA_ARCHITECT_NAME"); + let parsedArchitectName = nameOfAchitect ? JSON.parse(nameOfAchitect) : "ARCHITECT"; + bannerText = `CITIZEN_SUCCESS_${paymentData?.paymentDetails[0]?.businessService.replace(/\./g, "_")}_${parsedArchitectName}_PAYMENT_MESSAGE`; + } else if (business_service?.includes("WS") || business_service?.includes("SW")) { + bannerText = t(`CITIZEN_SUCCESS_${paymentData?.paymentDetails[0].businessService.replace(/\./g, "_")}_WS_PAYMENT_MESSAGE`); + } else { + bannerText = paymentData?.paymentDetails[0]?.businessService ? `CITIZEN_SUCCESS_${paymentData?.paymentDetails[0]?.businessService.replace(/\./g, "_")}_PAYMENT_MESSAGE` : t("CITIZEN_SUCCESS_UC_PAYMENT_MESSAGE"); + } + } + + // https://dev.digit.org/collection-services/payments/FSM.TRIP_CHARGES/_search?tenantId=pb.amritsar&consumerCodes=107-FSM-2021-02-18-063433 + + // if (billDataLoading) return ; + + const rowContainerStyle = { + padding: "4px 0px", + justifyContent: "space-between", + }; + + const ommitRupeeSymbol = ["PT"].includes(business_service); + + if ((window.location.href.includes("bpa") || window.location.href.includes("BPA")) && isBpaSearchLoading) return + + return ( + + + + + } + message={t("CS_COMMON_PAYMENT_COMPLETE")} + info={t("CS_COMMON_RECIEPT_NO")} + applicationNumber={paymentData?.paymentDetails[0].receiptNumber} + successful={true} + /> + {t(`${bannerText}_DETAIL`)} + + + {/** TODO : move this key and value into the hook based on business Service */} + {(business_service === "PT" || workflw) && ( + + )} + + {(business_service === "PT" || workflw) && ( + + )} + + + + {(business_service !== "PT" || workflw) && ( + + )} + +
+ {business_service == "TL" ? ( +
+ + + + + {t("TL_RECEIPT")} +
+ ) : null} + {business_service == "TL" ? ( +
+ + + + + {t("TL_CERTIFICATE")} +
+ ) : null} + {bpaData?.[0]?.businessService === "BPA_OC" && (bpaData?.[0]?.status==="APPROVED" || bpaData?.[0]?.status==="PENDING_SANC_FEE_PAYMENT") ? ( +
getPermitOccupancyOrderSearch("occupancy-certificate")}> + + {t("BPA_OC_CERTIFICATE")} +
+ ) : null} + {bpaData?.[0]?.businessService === "BPA_LOW" ? ( +
getPermitOccupancyOrderSearch("buildingpermit-low")}> + + {t("BPA_PERMIT_ORDER")} +
+ ) : null} + {bpaData?.[0]?.businessService === "BPA" && (bpaData?.[0]?.businessService !== "BPA_LOW") && (bpaData?.[0]?.businessService !== "BPA_OC") && (bpaData?.[0]?.status==="PENDING_SANC_FEE_PAYMENT" || bpaData?.[0]?.status==="APPROVED")? ( +
getPermitOccupancyOrderSearch("buildingpermit")}> + + {t("BPA_PERMIT_ORDER")} +
+ ) : null} +
+ {business_service?.includes("PT") &&
+ +
} + {business_service?.includes("PT") ? ( +
+ {t("CS_DOWNLOAD_RECEIPT")} +
+ ) : null} + {!(business_service == "TL") || !(business_service?.includes("PT")) && } + {!(business_service == "TL") || !(business_service?.includes("PT")) && ( +
+ {t("CORE_COMMON_GO_TO_HOME")} +
+ )} + {business_service == "TL" && ( + + + + )} +
+ ); +}; + +export const FailedPayment = (props) => { + const { addParams, clearParams } = props; + const { t } = useTranslation(); + const { consumerCode } = useParams(); + + const getMessage = () => "Failure !"; + return ( + + + {t("ES_COMMON_TRACK_COMPLAINT_TEXT")} + + ); +}; diff --git a/micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/employee/IFrameInterface/index.js b/micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/employee/IFrameInterface/index.js new file mode 100644 index 00000000000..28bc48cb6c3 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/modules/common/src/payments/employee/IFrameInterface/index.js @@ -0,0 +1,51 @@ +import { Header, Loader } from "@egovernments/digit-ui-react-components"; +import React, { useEffect, useState } from "react"; +import { useTranslation } from "react-i18next"; +import { useParams } from "react-router-dom"; + + +const IFrameInterface = (props) => { + const { stateCode } = props; + const { moduleName, pageName } = useParams(); + + const { t } = useTranslation(); + const [url, setUrl] = useState(""); + const [title, setTitle] = useState(""); + + const { data, isLoading } = Digit.Hooks.dss.useMDMS(stateCode, "common-masters", ["uiCommonConstants"], { + select: (data) => { + let formattedResponse = data?.["common-masters"]?.["uiCommonConstants"]?.[0] || {}; + return formattedResponse; + }, + enabled: true, + }); + + useEffect(() => { + const pageObject = data?.[moduleName]?.["iframe-routes"]?.[pageName] || {}; + const isOrign = pageObject?.["isOrigin"] || false; + const domain = isOrign ? (process.env.NODE_ENV === "development" ? "https://qa.digit.org" : document.location.origin) : pageObject?.["domain"]; + const contextPath = pageObject?.["routePath"] || ""; + const title = pageObject?.["title"] || ""; + let url = `${domain}${contextPath}`; + setUrl(url); + setTitle(title); + }, [data, moduleName, pageName]); + + if (isLoading) { + return ; + } + + if (!url) { + return
No Iframe To Load
; + } + return ( + +
{t(title)}
+
+ +
: +
+ {t("COMMON_URL_NOT_FOUND")} +
} + + : null} +
+ ); +}; + +export default CitizenConsentForm; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/CitizenHomeCard.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/CitizenHomeCard.js new file mode 100644 index 00000000000..1f131101dbe --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/CitizenHomeCard.js @@ -0,0 +1,26 @@ +import React from "react"; +import { Link } from "react-router-dom"; + +const CitizenHomeCard = ({ header, links = [], state, Icon, Info, isInfo = false, styles }) => { + return ( +
+
+

{header}

+ +
+ +
+ {links.map((e, i) => ( +
+ + {e.i18nKey} + +
+ ))} +
+
{isInfo ? : null}
+
+ ); +}; + +export default CitizenHomeCard; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/CitizenInfoLabel.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/CitizenInfoLabel.js new file mode 100644 index 00000000000..652146cf887 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/CitizenInfoLabel.js @@ -0,0 +1,22 @@ +import React from "react"; +import { InfoBannerIcon } from "./svgindex"; + +const CitizenInfoLabel = (props) => { + //if type is "component", then props will come from props?.props. + //if the component has props passed directly, then props will be used. + props = props?.props ? props?.props : props; + const showInfo = props?.showInfo ? props?.showInfo : true; + + return ( +
+ {showInfo &&
+ +

{props?.info}

+
+ } +

{props?.text}

+
+ ); +}; + +export default CitizenInfoLabel; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/CollapseAndExpandGroups.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/CollapseAndExpandGroups.js new file mode 100644 index 00000000000..473440b077f --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/CollapseAndExpandGroups.js @@ -0,0 +1,46 @@ +import React, { useState } from "react"; +import { useTranslation } from "react-i18next"; +import { SVG } from "./SVG"; +import PropTypes from "prop-types"; + +const CollapseAndExpandGroups = ({ children, groupElements = false, groupHeader = "", headerLabel = "", headerValue = "", customClass = "" ,showHelper=false,collapseState=false}) => { + const { t } = useTranslation(); + const [collapse, setCollapse] = useState(collapseState); + return ( +
+ {groupHeader &&
{t(groupHeader)}
} + {groupElements && ( +
+ {headerLabel} + {headerValue} +
setCollapse((prev) => !prev)} className="digit-icon-toggle "> + {!collapse && ( + + {showHelper&&
{t("COMMON_CORE_COLLAPSE")}
} + +
+ )} + {collapse && ( + + {showHelper&&
{t("COMMON_CORE_EXPAND")}
} + +
+ )} +
+
+ )} +
{children}
+
+ ); +}; + +CollapseAndExpandGroups.propTypes = { + children: PropTypes.node, + style: PropTypes.object, + customClass: PropTypes.string, + groupElements: PropTypes.bool, + groupHeader: PropTypes.string, + headerLabel: PropTypes.string, + headerValue: PropTypes.string, +}; +export default CollapseAndExpandGroups; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/ConnectingCheckPoints.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/ConnectingCheckPoints.js new file mode 100644 index 00000000000..b2e4fa88ad2 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/ConnectingCheckPoints.js @@ -0,0 +1,59 @@ +import React from "react"; +import PropTypes from "prop-types"; + +export const CheckPoint = (props) => { + return ( +
+

+
+ {props.label} + {props.info ?

{props.info}

: null} + {props.customChild ? props.customChild : null} +
+
+ ); +}; + +export const ConnectingCheckPoints = (props) => { + if (props.children && props.children.length >= 1) { + return ( + + {props.children.map((child, index) => { + return props.children.length === ++index ? ( +
{child}
+ ) : ( +
+ {child} +
+
+ ); + })} +
+ ); + } else { + return null; + } +}; + +CheckPoint.propTypes = { + /** + * Is checkpoint completed or not? + */ + isCompleted: PropTypes.bool, + /** + * key value + */ + key: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), + /** + * checkpoint content + */ + label: PropTypes.string, + info: PropTypes.string, +}; + +CheckPoint.defaultProps = { + isCompleted: false, + key: 0, + label: "", + info: "", +}; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/ConnectingCheckPoints.stories.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/ConnectingCheckPoints.stories.js new file mode 100644 index 00000000000..72a8513e99c --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/ConnectingCheckPoints.stories.js @@ -0,0 +1,19 @@ +import React from "react"; + +import { CheckPoint } from "./ConnectingCheckPoints"; + +export default { + title: "Atom/CheckPoint", + component: CheckPoint, +}; + +const Template = (args) => ; + +export const Default = Template.bind({}); + +Default.args = { + isCompleted: true, + key: 234234, + label: "First checkpoint", + info: "This is the first checkpoint", +}; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/CustomButton.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/CustomButton.js new file mode 100644 index 00000000000..a1ba8a10b8f --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/CustomButton.js @@ -0,0 +1,13 @@ +import React from "react"; + +const CustomButton = ({ text, onClick, selected }) => { + return ( + + + + ); +}; + +export default CustomButton; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/DatePicker.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/DatePicker.js new file mode 100644 index 00000000000..6436ffed23b --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/DatePicker.js @@ -0,0 +1,72 @@ +import React, { useState, useRef } from "react"; +import { CalendarIcon } from "../atoms/svgindex"; +import PropTypes from "prop-types"; + +const DatePicker = (props) => { + // const [date, setDate] = useState(() => props.initialDate || null); + const dateInp = useRef(); + + function defaultFormatFunc(date) { + if (date) { + const operationDate = typeof date === "string" ? new Date(date) : date; + const years = operationDate?.getFullYear(); + const month = operationDate?.getMonth() + 1; + const _date = operationDate?.getDate(); + return _date && month && years ? `${_date}/${month}/${years}` : ""; + } + return ""; + } + + const getDatePrint = () => props?.formattingFn?.(props?.date) || defaultFormatFunc(props?.date); + const selectDate = (e) => { + const date = e.target.value; + // setDate(date); + props?.onChange?.(date); + }; + let addStyle = {}; + if (Digit.UserService.getType() === "citizen") { + addStyle = { maxWidth: "540px" }; + } + return ( +
+ + {/* + */} + + +
+ ); +}; + +DatePicker.propTypes = { + disabled: PropTypes.bool, + date: PropTypes.any, + min: PropTypes.any, + max: PropTypes.any, + defaultValue: PropTypes.any, + onChange: PropTypes.func, +}; + +export default DatePicker; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/DateWrap.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/DateWrap.js new file mode 100644 index 00000000000..9f0fbed244f --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/DateWrap.js @@ -0,0 +1,25 @@ +import React from "react"; +import PropTypes from "prop-types"; +import { Calender } from "./svgindex"; + +const DateWrap = (props) => { + return ( +
+ +

{props.date}

+
+ ); +}; + +DateWrap.propTypes = { + /** + * date + */ + date: PropTypes.any, +}; + +DateWrap.defaultProps = { + date: 0, +}; + +export default DateWrap; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/DateWrap.stories.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/DateWrap.stories.js new file mode 100644 index 00000000000..230abdd47d5 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/DateWrap.stories.js @@ -0,0 +1,19 @@ +import React from "react"; + +import DateWrap from "./DateWrap"; + +export default { + title: "Atom/DateWrap", + component: DateWrap, + argTypes: { + date: { control: "date" }, + }, +}; + +const Template = (args) => ; + +export const Default = Template.bind({}); + +Default.args = { + date: 1607498172995, +}; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/DescriptionText.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/DescriptionText.js new file mode 100644 index 00000000000..bd4fa92d8c6 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/DescriptionText.js @@ -0,0 +1,23 @@ +import React from "react"; +import PropTypes from "prop-types"; + +const DescriptionText = (props) => { + return ( +
+

{props.text}

+
+ ); +}; + +DescriptionText.propTypes = { + /** + * DescriptionText contents + */ + date: PropTypes.string, +}; + +DescriptionText.defaultProps = { + text: "", +}; + +export default DescriptionText; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/DescriptionText.stories.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/DescriptionText.stories.js new file mode 100644 index 00000000000..7c996644594 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/DescriptionText.stories.js @@ -0,0 +1,16 @@ +import React from "react"; + +import DescriptionText from "./DescriptionText"; + +export default { + title: "Atom/DescriptionText", + component: DescriptionText, +}; + +const Template = (args) => ; + +export const Default = Template.bind({}); + +Default.args = { + text: "This is the description", +}; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/DisplayPhotos.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/DisplayPhotos.js new file mode 100644 index 00000000000..c08c85899d3 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/DisplayPhotos.js @@ -0,0 +1,43 @@ +import React from "react"; +import PropTypes from "prop-types"; +import {PDFSvg} from "./svgindex" + +const ImageOrPDFIcon = ({source, index, last=false, onClick}) => { + return Digit.Utils.getFileTypeFromFileStoreURL(source) === "pdf" ? + + : + issue thumbnail onClick(source, index)}> +} + +const DisplayPhotos = (props) => { + return ( +
+ {props.srcs.map((source, index) => { + return + })} +
+ ); +}; + +DisplayPhotos.propTypes = { + /** + * images + */ + srcs: PropTypes.array, + /** + * optional click handler + */ + onClick: PropTypes.func, +}; + +DisplayPhotos.defaultProps = { + srcs: [], +}; + +export default DisplayPhotos; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/DisplayPhotos.stories.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/DisplayPhotos.stories.js new file mode 100644 index 00000000000..9946593f32d --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/DisplayPhotos.stories.js @@ -0,0 +1,20 @@ +import React from "react"; + +import DisplayPhotos from "./DisplayPhotos"; + +export default { + title: "Atom/DisplayPhotos", + component: DisplayPhotos, +}; + +const Template = (args) => ; + +export const Default = Template.bind({}); + +Default.args = { + srcs: [ + "https://randomwordgenerator.com/img/picture-generator/5ee6d1454b53b10ff3d8992cc12c30771037dbf85254794e722679d49445_640.jpg", + "https://randomwordgenerator.com/img/picture-generator/55e3d1404351ab14f1dc8460962e33791c3ad6e04e507440762a7cd49348cc_640.jpg", + "https://randomwordgenerator.com/img/picture-generator/57e0d1444250a414f1dc8460962e33791c3ad6e04e50744077297bd59445c2_640.jpg", + ], +}; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Dropdown.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Dropdown.js new file mode 100644 index 00000000000..9958174f10d --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Dropdown.js @@ -0,0 +1,295 @@ +import PropTypes from "prop-types"; +import React, { useEffect, useRef, useState } from "react"; +import { ArrowDown,SearchIcon } from "./svgindex"; + +const TextField = (props) => { + const [value, setValue] = useState(props.selectedVal ? props.selectedVal : ""); + + useEffect(() => { + if (!props.keepNull) + if( props.selectedVal) + setValue(props.selectedVal) + else + { setValue(""); props.setFilter("") } + else setValue(""); + }, [props.selectedVal, props.forceSet]); + + function inputChange(e) { + if (props.freeze) return; + + setValue(e.target.value); + props.setFilter(e.target.value); + } + + function broadcastToOpen() { + if (!props.disable) { + props.dropdownDisplay(true); + } + } + + function broadcastToClose() { + props.dropdownDisplay(false); + } + + /* Custom function to scroll and select in the dropdowns while using key up and down */ + const keyChange = (e) => { + if (e.key == "ArrowDown") { + props.setOptionIndex((state) => (state + 1 == props.addProps.length ? 0 : state + 1)); + if (props.addProps.currentIndex + 1 == props.addProps.length) { + e?.target?.parentElement?.parentElement?.children?.namedItem("jk-dropdown-unique")?.scrollTo?.(0, 0); + } else { + props?.addProps?.currentIndex > 2 && e?.target?.parentElement?.parentElement?.children?.namedItem("jk-dropdown-unique")?.scrollBy?.(0, 45); + } + e.preventDefault(); + } else if (e.key == "ArrowUp") { + props.setOptionIndex((state) => (state !== 0 ? state - 1 : props.addProps.length - 1)); + if (props.addProps.currentIndex == 0) { + e?.target?.parentElement?.parentElement?.children?.namedItem("jk-dropdown-unique")?.scrollTo?.(100000, 100000); + } else { + props?.addProps?.currentIndex > 2 && e?.target?.parentElement?.parentElement?.children?.namedItem("jk-dropdown-unique")?.scrollBy?.(0, -45); + } + e.preventDefault(); + } else if (e.key == "Enter") { + props.addProps.selectOption(props.addProps.currentIndex); + e.preventDefault(); + } + }; + + return ( + { + broadcastToClose(); + props?.onBlur?.(e); + if (props.selectedVal !== props.filterVal) { + setTimeout(() => { + props.setforceSet((val) => val + 1); + }, 1000); + } + }} + onKeyDown={keyChange} + readOnly={props.disable} + autoFocus={props.autoFocus} + placeholder={props.placeholder} + autoComplete={"off"} + style={props.style} + /> + ); +}; + +const translateDummy = (text) => { + return text; +}; + +const Dropdown = (props) => { + const user_type = Digit.SessionStorage.get("userType"); + const [dropdownStatus, setDropdownStatus] = useState(false); + const [selectedOption, setSelectedOption] = useState(props.selected ? props.selected : null); + const [filterVal, setFilterVal] = useState(""); + const [forceSet, setforceSet] = useState(0); + const [optionIndex, setOptionIndex] = useState(-1); + const optionRef = useRef(null); + const hasCustomSelector = props.customSelector ? true : false; + const t = props.t || translateDummy; + + useEffect(() => { + setSelectedOption(props.selected); + }, [props.selected]); + + function dropdownSwitch() { + if (!props.disable) { + var current = dropdownStatus; + if (!current) { + document.addEventListener("mousedown", handleClick, false); + } + setDropdownStatus(!current); + props?.onBlur?.(); + } + } + + function handleClick(e) { + if (!optionRef.current || !optionRef.current.contains(e.target)) { + document.removeEventListener("mousedown", handleClick, false); + setDropdownStatus(false); + } + } + + function dropdownOn(val) { + const waitForOptions = () => setTimeout(() => setDropdownStatus(val), 500); + const timerId = waitForOptions(); + return () => { + clearTimeout(timerId); + }; + } + + function onSelect(val) { + if (val !== selectedOption || props.allowMultiselect) { + props.select(val); + setSelectedOption(val); + setDropdownStatus(false); + } else { + setSelectedOption(val); + setforceSet(forceSet + 1); + } + } + + function setFilter(val) { + setFilterVal(val); + } + + let filteredOption = + (props.option && props.option?.filter((option) => t(option[props.optionKey])?.toUpperCase()?.indexOf(filterVal?.toUpperCase()) > -1)) || []; + function selectOption(ind) { + onSelect(filteredOption[ind]); + } + + if(props.isBPAREG && selectedOption) + { + let isSelectedSameAsOptions = props.option?.filter((ob) => ob?.code === selectedOption?.code)?.length > 0; + if(!isSelectedSameAsOptions) setSelectedOption(null) + } + + return ( +
+ {hasCustomSelector && ( +
+ {props.customSelector} + {props.showArrow && } +
+ )} + {!hasCustomSelector && ( +
+ + {props.showSearchIcon ?null:} + {props.showSearchIcon ?:null} +
+ )} + {dropdownStatus ? ( + props.optionKey ? ( +
+ {filteredOption && + filteredOption.map((option, index) => { + return ( +
onSelect(option)} + > + {option.icon && {option.icon} } + {props.isPropertyAssess?
{props.t ? props.t(option[props.optionKey]) : option[props.optionKey]}
: + {props.t ? props.t(option[props.optionKey]) : option[props.optionKey]}} +
+ ); + })} + {filteredOption && filteredOption.length === 0 && ( +
{ + + }}> + { {props.t ? props.t("CMN_NOOPTION") : "CMN_NOOPTION"}} +
+ )} +
+ ) : ( +
+ {props.option + ?.filter((option) => option?.toUpperCase().indexOf(filterVal?.toUpperCase()) > -1) + .map((option, index) => { + return ( +

onSelect(option)} + > + {option} +

+ ); + })} +
+ ) + ) : null} +
+ ); +}; + +Dropdown.propTypes = { + customSelector: PropTypes.any, + showArrow: PropTypes.bool, + selected: PropTypes.any, + style: PropTypes.object, + option: PropTypes.array, + optionKey: PropTypes.any, + select: PropTypes.any, + t: PropTypes.func, +}; + +Dropdown.defaultProps = { + customSelector: null, + showArrow: true, +}; + +export default Dropdown; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Dropdown.stories.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Dropdown.stories.js new file mode 100644 index 00000000000..0898c7e44e2 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Dropdown.stories.js @@ -0,0 +1,18 @@ +import React from "react"; + +import Dropdown from "./Dropdown"; + +export default { + title: "Atom/Dropdown", + component: Dropdown, +}; + +const Template = (args) => ; + +export const Default = Template.bind({}); + +Default.args = { + selected: "first", + option: ["first", "second", "third"], + optionKey: 0, +}; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/EllipsisMenu.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/EllipsisMenu.js new file mode 100644 index 00000000000..a26a49de1da --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/EllipsisMenu.js @@ -0,0 +1,33 @@ +import React, { useRef, useState } from "react"; +import { Ellipsis } from "./svgindex"; + +const Menu = ({ menu, displayKey, onSelect }) => ( +
+ {menu.map((item, index) => ( +
onSelect(item)} key={index}> + {item.icon} + {item[displayKey]} +
+ ))} +
+); + +const EllipsisMenu = ({ menuItems, displayKey, onSelect }) => { + const menuRef = useRef(); + const [active, setActive] = useState(false); + Digit.Hooks.useClickOutside(menuRef, () => setActive(false), active); + + function onItemSelect(item) { + setActive(false); + onSelect(item); + } + + return ( +
+ setActive(true)} /> + {active ? : null} +
+ ); +}; + +export default EllipsisMenu; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/EmployeeAppContainer.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/EmployeeAppContainer.js new file mode 100644 index 00000000000..3aaed46b4fc --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/EmployeeAppContainer.js @@ -0,0 +1,7 @@ +import React from "react"; + +const EmployeeAppContainer = (props) => { + return
{props.children}
; +}; + +export default EmployeeAppContainer; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/EmployeeModuleCard.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/EmployeeModuleCard.js new file mode 100644 index 00000000000..05bb8f8beea --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/EmployeeModuleCard.js @@ -0,0 +1,85 @@ +import React, { Fragment } from "react"; +import { ArrowRightInbox } from "./svgindex"; +import { useHistory, useLocation, Link } from "react-router-dom"; + + +const EmployeeModuleCard = ({ Icon, moduleName, kpis = [], links = [], isCitizen = false, className, styles, longModuleName=false }) => { + const history = useHistory(); + + return ( +
+
+
+ {moduleName} + {Icon} +
+
+ {kpis.length !== 0 && ( +
+ {kpis.map(({ count, label, link }, index) => ( +
+
+ {count || "-"} +
+
+ + {link ? history.push(`${link}`,{count})}>{label} : null} +
+
+ ))} +
+ )} +
+ {links.map(({ count, label, link }, index) => ( + + {link ? {label} : null} + {count ? ( + <> + history.push(`${link}`)}>{count || "-"} + + + + + ) : null} + + ))} +
+
+
+
+ ); +}; + +const ModuleCardFullWidth = ({ moduleName, links = [], isCitizen = false, className, styles, headerStyle, subHeader, subHeaderLink }) => { + return ( +
+
+ +
+
+ {links.map(({ count, label, link }, index) => ( + + {link ? (link?.includes(`${window?.contextPath}/`)?{label}:{label}) : null} + + ))} +
+
+
+
+ ); +}; + +export { EmployeeModuleCard, ModuleCardFullWidth }; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/ErrorMessage.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/ErrorMessage.js new file mode 100644 index 00000000000..c82e041c9fb --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/ErrorMessage.js @@ -0,0 +1,25 @@ +import React, { useEffect, useState } from "react"; + +const ErrorMessage = ({ name, formState, formData, config, setError, clearErrors }) => { + useEffect(() => { + const { pattern, errMsg } = config.inputs.find((i) => i.name === name); + const regex = new RegExp(pattern); + if (!regex.test(formData?.[name]) && pattern) { + setError(name, { type: "pattern", message: errMsg }); + } else { + clearErrors(name); + } + }, [formData?.[name]]); + + return ( + + {Object.keys(formState?.dirtyFields)?.includes(name) || formState?.isSubmitted ? ( +

{formState?.errors?.[name].messsage}

+ ) : ( + + )} + + ); +}; + +export default ErrorMessage; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/EventCalendarView.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/EventCalendarView.js new file mode 100644 index 00000000000..e4f51b632ad --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/EventCalendarView.js @@ -0,0 +1,14 @@ +import React from "react" + +const EventCalendarView = ({onGroundEventMonth, onGroundEventDate}) => { + return
+
+

{onGroundEventMonth}

+
+
+

{onGroundEventDate}

+
+
+} + +export default EventCalendarView \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/GreyOutText.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/GreyOutText.js new file mode 100644 index 00000000000..a099557d896 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/GreyOutText.js @@ -0,0 +1,5 @@ +import React from "react"; + +const GreyOutText = (props) =>
{props.children}
; + +export default GreyOutText; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Hamburger.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Hamburger.js new file mode 100644 index 00000000000..17bf671d683 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Hamburger.js @@ -0,0 +1,10 @@ +import React from "react"; +import { HamburgerIcon } from "./svgindex"; + +const Hamburger = ({ handleClick, color }) => ( + + + +); + +export default Hamburger; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Header.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Header.js new file mode 100644 index 00000000000..9ea57f5a8ad --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Header.js @@ -0,0 +1,11 @@ +import React from "react"; + +const Header = (props) => { + return ( +
+ {props.children} +
+ ); +}; + +export default Header; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/HeaderBar.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/HeaderBar.js new file mode 100644 index 00000000000..328964c3fdc --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/HeaderBar.js @@ -0,0 +1,26 @@ +import React from "react"; +import PropTypes from "prop-types"; + +const HeaderBar = (props) => { + return ( +
+ {props.start ?
{props.start}
: null} + {props.main ?
{props.main}
: null} + {props.end ?
{props.end}
: null} +
+ ); +}; + +HeaderBar.propTypes = { + start: PropTypes.any, + main: PropTypes.any, + end: PropTypes.any, +}; + +HeaderBar.defaultProps = { + start: "", + main: "", + end: "", +}; + +export default HeaderBar; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/HeaderBar.stories.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/HeaderBar.stories.js new file mode 100644 index 00000000000..f9e9cd87430 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/HeaderBar.stories.js @@ -0,0 +1,18 @@ +import React from "react"; + +import HeaderBar from "./HeaderBar"; + +export default { + title: "Atom/HeaderBar", + component: HeaderBar, +}; + +const Template = (args) => ; + +export const Default = Template.bind({}); + +Default.args = { + start: "First", + main: "Second", + end: "Third", +}; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/HomeLink.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/HomeLink.js new file mode 100644 index 00000000000..74bfcee80a0 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/HomeLink.js @@ -0,0 +1,21 @@ +import React from "react"; +import PropTypes from "prop-types"; +import { Link } from "react-router-dom"; + +const HomeLink = ({ to, children }) => ( +
+ {children} +
+); + +HomeLink.propTypes = { + to: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), + children: PropTypes.string, +}; + +HomeLink.defaultProps = { + to: "#", + children: "Link", +}; + +export default HomeLink; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/HomeLink.stories.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/HomeLink.stories.js new file mode 100644 index 00000000000..96812f9407d --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/HomeLink.stories.js @@ -0,0 +1,22 @@ +import React from "react"; +import { BrowserRouter as Router } from "react-router-dom"; + +import HomeLink from "./HomeLink"; + +export default { + title: "Atom/HomeLink", + component: HomeLink, +}; + +const Template = (args) => ( + + + +); + +export const Default = Template.bind({}); + +Default.args = { + to: "https://google.com", + children: "Google", +}; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/HorizontalNav.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/HorizontalNav.js new file mode 100644 index 00000000000..ef6a5c26a8d --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/HorizontalNav.js @@ -0,0 +1,42 @@ +import React, {useState} from 'react' +import { useTranslation } from 'react-i18next' + + + + +const HorizontalNav = ({ configNavItems, activeLink, setActiveLink, showNav = false, children, customStyle = {}, customClassName = "", inFormComposer = true, navClassName = "", navStyles = {} }) => { + const { t } = useTranslation() + + const setActive = (item) => { + setActiveLink(item.name) + } + + const MenuItem = ({ item }) => { + let itemComponent = item.code; + + const Item = () => ( + +
{t(itemComponent)}
+
+ ); + + return ( + + ); + }; + return ( +
+ {showNav &&
+ {configNavItems?.map((item, index) => ( +
setActive(item)}> + +
+ ))} +
+ } + {children} +
+ ) +} + +export default HorizontalNav \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/ImageUploadHandler.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/ImageUploadHandler.js new file mode 100644 index 00000000000..906d3af5343 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/ImageUploadHandler.js @@ -0,0 +1,112 @@ +import React, { useCallback, useEffect, useState } from "react"; +import { useTranslation } from "react-i18next"; +import Toast from "./Toast"; +import UploadImages from "./UploadImages"; + +export const ImageUploadHandler = (props) => { + // const __initImageIds = Digit.SessionStorage.get("PGR_CREATE_IMAGES"); + // const __initThumbnails = Digit.SessionStorage.get("PGR_CREATE_THUMBNAILS"); + const [image, setImage] = useState(null); + const [uploadedImagesThumbs, setUploadedImagesThumbs] = useState(null); + const [uploadedImagesIds, setUploadedImagesIds] = useState(props.uploadedImages); + + const [rerender, setRerender] = useState(1); + const [imageFile, setImageFile] = useState(null); + const [isDeleting, setIsDeleting] = useState(false); + const [error, setError] = useState(""); + + useEffect(() => { + if (image) { + uploadImage(); + } + }, [image]); + + useEffect(() => { + if (!isDeleting) { + (async () => { + if (uploadedImagesIds !== null) { + await submit(); + setRerender(rerender + 1); + props.onPhotoChange(uploadedImagesIds); + } + })(); + } else { + setIsDeleting(false); + } + }, [uploadedImagesIds]); + + useEffect(() => { + if (imageFile && imageFile.size > 2097152) { + setError("File is too large"); + } else { + setImage(imageFile); + } + }, [imageFile]); + + const addUploadedImageIds = useCallback( + (imageIdData) => { + if (uploadedImagesIds === null) { + var arr = []; + } else { + arr = uploadedImagesIds; + } + return [...arr, imageIdData.data.files[0].fileStoreId]; + }, + [uploadedImagesIds] + ); + + function getImage(e) { + setError(null); + setImageFile(e.target.files[0]); + } + + const uploadImage = useCallback(async () => { + const response = await Digit.UploadServices.Filestorage("property-upload", image, props.tenantId); + setUploadedImagesIds(addUploadedImageIds(response)); + }, [addUploadedImageIds, image]); + + function addImageThumbnails(thumbnailsData) { + var keys = Object.keys(thumbnailsData.data); + var index = keys.findIndex((key) => key === "fileStoreIds"); + if (index > -1) { + keys.splice(index, 1); + } + var thumbnails = []; + // if (uploadedImagesThumbs !== null) { + // thumbnails = uploadedImagesThumbs.length > 0 ? uploadedImagesThumbs.filter((thumb) => thumb.key !== keys[0]) : []; + // } + + const newThumbnails = keys.map((key) => { + return { image: thumbnailsData.data[key].split(",")[2], key }; + }); + + setUploadedImagesThumbs([...thumbnails, ...newThumbnails]); + } + + const submit = useCallback(async () => { + if (uploadedImagesIds !== null && uploadedImagesIds.length > 0) { + const res = await Digit.UploadServices.Filefetch(uploadedImagesIds, props.tenantId); + addImageThumbnails(res); + } + }, [uploadedImagesIds]); + + function deleteImage(img) { + setIsDeleting(true); + var deleteImageKey = uploadedImagesThumbs.filter((o, index) => o.image === img); + + var uploadedthumbs = uploadedImagesThumbs; + var newThumbsList = uploadedthumbs.filter((thumbs) => thumbs != deleteImageKey[0]); + + var newUploadedImagesIds = uploadedImagesIds.filter((key) => key !== deleteImageKey[0].key); + setUploadedImagesThumbs(newThumbsList); + setUploadedImagesIds(newUploadedImagesIds); + Digit.SessionStorage.set("PGR_CREATE_IMAGES", newUploadedImagesIds); + } + + return ( + + {error && setError(null)} />} + o.image) : []} /> + + ); +}; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/ImageViewer.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/ImageViewer.js new file mode 100644 index 00000000000..adbf068ea9a --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/ImageViewer.js @@ -0,0 +1,24 @@ +import React from "react"; +import PropTypes from "prop-types"; + +const ImageViewer = (props) => { + return ( +
+ + + + + +
+ ); +}; + +ImageViewer.propTypes = { + imageSrc: PropTypes.string, +}; + +ImageViewer.defaultProps = { + imageSrc: "", +}; + +export default ImageViewer; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/ImageViewer.stories.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/ImageViewer.stories.js new file mode 100644 index 00000000000..7cd6864bce1 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/ImageViewer.stories.js @@ -0,0 +1,21 @@ +import React from "react"; +import { BrowserRouter as Router } from "react-router-dom"; + +import ImageViewer from "./ImageViewer"; + +export default { + title: "Atom/ImageViewer", + component: ImageViewer, +}; + +const Template = (args) => ( + + + +); + +export const Default = Template.bind({}); + +Default.args = { + imageSrc: "https://randomwordgenerator.com/img/picture-generator/5ee6d1454b53b10ff3d8992cc12c30771037dbf85254794e722679d49445_640.jpg", +}; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/InboxLinks.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/InboxLinks.js new file mode 100644 index 00000000000..0307e267452 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/InboxLinks.js @@ -0,0 +1,33 @@ +import React from "react" +import Card from "../atoms/Card" +import { useTranslation } from "react-i18next"; +import { Link } from "react-router-dom"; + +const InboxLinks = ({logoIcon, headerText, links, customClass}) => { + + const { t } = useTranslation(); + + const GetLogo = () =>
+ + {logoIcon} + {" "} + {t(headerText)} +
+ + return +
+ {GetLogo()} +
+ {links.map(({ link, text, hyperlink = false, accessTo = [] }, index) => { + return ( + + {hyperlink ? {t(text)} : {t(text)}} + + ); + })} +
+
+
+} + +export default InboxLinks \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/InboxSearchLinks.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/InboxSearchLinks.js new file mode 100644 index 00000000000..9d340be0190 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/InboxSearchLinks.js @@ -0,0 +1,43 @@ +import React, { useState, useEffect } from "react" +import { useTranslation } from "react-i18next"; +import { Link } from "react-router-dom"; +import { PropertyHouse, BioMetricIcon,WorksMgmtIcon} from "./svgindex"; + +const getIconComponent = (iconName="")=>{ + return require("@egovernments/digit-ui-react-components")?.[iconName]; +} + +const InboxSearchLinks = ({headerText, links, businessService, customClass="", logoIcon}) => { + + const { t } = useTranslation(); + const { roles: userRoles } = Digit.UserService.getUser().info; + const [linksToShow, setLinksToShow] = useState([]); + const IconComponent=getIconComponent(logoIcon?.component); + useEffect(() => { + let linksToShow = links.filter(({ roles }) => roles.some((role) => userRoles.map(({ code }) => code).includes(role)) || !roles?.length); + setLinksToShow(linksToShow); + }, []); + const renderHeader = () =>
+ + {logoIcon?.component && IconComponent && } + + {t(headerText)} +
+ return ( +
+ {renderHeader()} +
+ {linksToShow.map(({ url, text, hyperlink = false}, index) => { + return ( + + {hyperlink ? {t(text)} : {t(text)}} + + ); + })} +
+
+ ) + +} + +export default InboxSearchLinks; \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/InfoBanner.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/InfoBanner.js new file mode 100644 index 00000000000..a56e96e8f0e --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/InfoBanner.js @@ -0,0 +1,16 @@ +import React from "react"; +import { ErrorSvg, InfoBannerIcon } from "./svgindex"; + +const InfoBanner = ({ label, text }) => { + return ( +
+
+ +

{label}

+
+

{text}

+
+ ); +}; + +export default InfoBanner; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/InputTextAmount.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/InputTextAmount.js new file mode 100644 index 00000000000..48d6bc940dd --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/InputTextAmount.js @@ -0,0 +1,408 @@ +import TextInput from "./TextInput"; + +import React, { forwardRef, useImperativeHandle, useMemo, useRef, useEffect, useState } from "react"; +import { + cleanValue, + fixedDecimalValue, + formatValue, + getLocaleConfig, + getIntlConfig, + getSuffix, + isNumber, + padTrimValue, + repositionCursor, +} from "./amtUtils"; + +/* Amount component by default round offs and formats for amount */ + +const InputTextAmount = ({ value, prefix = "₹ ",intlConfig = getIntlConfig(prefix), onChange, inputRef,...otherProps }) => { + return ; +}; + +export default InputTextAmount; + +export const CurrencyInput = forwardRef( + ( + { + allowDecimals = true, + allowNegativeValue = true, + id, + name, + className, + customInput, + decimalsLimit, + defaultValue, + disabled = false, + maxLength: userMaxLength, + value: userValue, + onValueChange, + fixedDecimalLength, + placeholder, + decimalScale, + prefix, + suffix, + intlConfig, + step, + min, + max, + disableGroupSeparators = false, + disableAbbreviations = false, + decimalSeparator: _decimalSeparator, + groupSeparator: _groupSeparator, + onChange, + onFocus, + onBlur, + onKeyDown, + onKeyUp, + transformRawValue, + otherProps, + inputRef:inputRefFrom, + ...props + }, + ref + ) => { + if (_decimalSeparator && isNumber(_decimalSeparator)) { + throw new Error("decimalSeparator cannot be a number"); + } + + if (_groupSeparator && isNumber(_groupSeparator)) { + throw new Error("groupSeparator cannot be a number"); + } + + const localeConfig = useMemo(() => getLocaleConfig(intlConfig), [intlConfig]); + const decimalSeparator = _decimalSeparator || localeConfig.decimalSeparator || ""; + const groupSeparator = _groupSeparator || localeConfig.groupSeparator || ""; + + if (decimalSeparator && groupSeparator && decimalSeparator === groupSeparator && disableGroupSeparators === false) { + throw new Error("decimalSeparator cannot be the same as groupSeparator"); + } + + const formatValueOptions = { + decimalSeparator, + groupSeparator, + disableGroupSeparators, + intlConfig, + prefix: prefix || localeConfig.prefix, + suffix: suffix, + }; + + const cleanValueOptions = { + decimalSeparator, + groupSeparator, + allowDecimals, + decimalsLimit: decimalsLimit || fixedDecimalLength || 2, + allowNegativeValue, + disableAbbreviations, + prefix: prefix || localeConfig.prefix, + transformRawValue, + }; + + const formattedStateValue = + defaultValue !== undefined && defaultValue !== null + ? formatValue({ ...formatValueOptions, decimalScale, value: String(defaultValue) }) + : userValue !== undefined && userValue !== null + ? formatValue({ ...formatValueOptions, decimalScale, value: String(userValue) }) + : ""; + + const [stateValue, setStateValue] = useState(formattedStateValue); + const [dirty, setDirty] = useState(false); + const [cursor, setCursor] = useState(0); + const [changeCount, setChangeCount] = useState(0); + const [lastKeyStroke, setLastKeyStroke] = useState(null); + const inputRef = useRef(inputRefFrom); + useImperativeHandle(ref, () => inputRef.current); + + /** + * Process change in value + */ + const processChange = (value, selectionStart) => { + setDirty(true); + + const { modifiedValue, cursorPosition } = repositionCursor({ + selectionStart, + value, + lastKeyStroke, + stateValue, + groupSeparator, + }); + + const stringValue = cleanValue({ value: modifiedValue, ...cleanValueOptions }); + + if (userMaxLength && stringValue.replace(/-/g, "").length > userMaxLength) { + return; + } + + if (stringValue === "" || stringValue === "-" || stringValue === decimalSeparator) { + onValueChange && onValueChange(undefined, name, { float: null, formatted: "", value: "" }); + setStateValue(stringValue); + return; + } + + const stringValueWithoutSeparator = decimalSeparator ? stringValue.replace(decimalSeparator, ".") : stringValue; + + const numberValue = parseFloat(stringValueWithoutSeparator); + + const formattedValue = formatValue({ + value: stringValue, + ...formatValueOptions, + }); + + if (cursorPosition !== undefined && cursorPosition !== null) { + // Prevent cursor jumping + let newCursor = cursorPosition + (formattedValue.length - value.length); + newCursor = newCursor <= 0 ? (prefix ? prefix.length : 0) : newCursor; + + setCursor(newCursor); + setChangeCount(changeCount + 1); + } + + setStateValue(formattedValue); + + if (onValueChange) { + const values = { + float: numberValue, + formatted: formattedValue, + value: stringValue, + }; + onValueChange(stringValue, name, values); + } + }; + + /** + * Handle change event + */ + const handleOnChange = (event) => { + const { + target: { value, selectionStart }, + } = event; + + processChange(value, selectionStart); + + onChange && onChange(event); + }; + + /** + * Handle focus event + */ + const handleOnFocus = (event) => { + onFocus && onFocus(event); + return stateValue ? stateValue.length : 0; + }; + + /** + * Handle blur event + * + * Format value by padding/trimming decimals if required by + */ + const handleOnBlur = (event) => { + const { + target: { value }, + } = event; + + const valueOnly = cleanValue({ value, ...cleanValueOptions }); + + if (valueOnly === "-" || !valueOnly) { + setStateValue(""); + onBlur && onBlur(event); + return; + } + + const fixedDecimals = fixedDecimalValue(valueOnly, decimalSeparator, fixedDecimalLength); + + const newValue = padTrimValue(fixedDecimals, decimalSeparator, decimalScale !== undefined ? decimalScale : fixedDecimalLength); + + const numberValue = parseFloat(newValue.replace(decimalSeparator, ".")); + + const formattedValue = formatValue({ + ...formatValueOptions, + value: newValue, + }); + + if (onValueChange) { + onValueChange(newValue, name, { + float: numberValue, + formatted: formattedValue, + value: newValue, + }); + } + + setStateValue(formattedValue); + + onBlur && onBlur(event); + }; + + /** + * Handle key down event + * + * Increase or decrease value by step + */ + const handleOnKeyDown = (event) => { + const { key } = event; + + setLastKeyStroke(key); + + if (step && (key === "ArrowUp" || key === "ArrowDown")) { + event.preventDefault(); + setCursor(stateValue.length); + + const currentValue = + parseFloat( + userValue !== undefined && userValue !== null + ? String(userValue).replace(decimalSeparator, ".") + : cleanValue({ value: stateValue, ...cleanValueOptions }) + ) || 0; + const newValue = key === "ArrowUp" ? currentValue + step : currentValue - step; + + if (min !== undefined && newValue < min) { + return; + } + + if (max !== undefined && newValue > max) { + return; + } + + const fixedLength = String(step).includes(".") ? Number(String(step).split(".")[1].length) : undefined; + + processChange(String(fixedLength ? newValue.toFixed(fixedLength) : newValue).replace(".", decimalSeparator)); + } + + onKeyDown && onKeyDown(event); + }; + + /** + * Handle key up event + * + * Move cursor if there is a suffix to prevent user typing past suffix + */ + const handleOnKeyUp = (event) => { + const { + key, + currentTarget: { selectionStart }, + } = event; + if (key !== "ArrowUp" && key !== "ArrowDown" && stateValue !== "-") { + const suffix = getSuffix(stateValue, { groupSeparator, decimalSeparator }); + + if (suffix && selectionStart && selectionStart > stateValue.length - suffix.length) { + /* istanbul ignore else */ + if (inputRef.current) { + const newCursor = stateValue.length - suffix.length; + inputRef.current.setSelectionRange(newCursor, newCursor); + } + } + } + + onKeyUp && onKeyUp(event); + }; + + useEffect(() => { + // prevent cursor jumping if editing value + if (dirty && stateValue !== "-" && inputRef.current && document.activeElement === inputRef.current) { + inputRef.current.setSelectionRange(cursor, cursor); + } + }, [stateValue, cursor, inputRef, dirty, changeCount]); + + /** + * If user has only entered "-" or decimal separator, + * keep the char to allow them to enter next value + */ + const getRenderValue = () => { + if (userValue !== undefined && userValue !== null && stateValue !== "-" && (!decimalSeparator || stateValue !== decimalSeparator)) { + return formatValue({ + ...formatValueOptions, + decimalScale: dirty ? undefined : decimalScale, + value: String(userValue), + }); + } + + return stateValue; + }; + + const inputProps = { + type: "text", + inputMode: "decimal", + id, + name, + className, + onChange: handleOnChange, + onBlur: handleOnBlur, + onFocus: handleOnFocus, + onKeyDown: handleOnKeyDown, + onKeyUp: handleOnKeyUp, + placeholder, + disabled, + value: getRenderValue(), + ref: inputRef, + ...props, + }; + + if (customInput) { + const CustomInput = customInput; + return ; + } + + return ; + } +); + +CurrencyInput.displayName = "CurrencyInput"; + +export const InputAmountWrapper = ({ref,...props}) => { + const limit = 1000; + const prefix = props?.prefix; + + const [errorMessage, setErrorMessage] = useState(""); + const [className, setClassName] = useState(""); + const [value, setValue] = useState(props?.defaultValue); + const [values, setValues] = useState(); + const [rawValue, setRawValue] = useState(" "); + + useEffect(() => { + props.onValueChange(value); + }, [value]); + + /** + * Handle validation + */ + const handleOnValueChange = (value, _, values) => { + setValues(values); + setRawValue(value === undefined ? "undefined" : value || " "); + + if (!value) { + setClassName(""); + setValue(""); + return; + } + + if (Number.isNaN(Number(value))) { + // setErrorMessage('Please enter a valid number'); + // setClassName('is-invalid'); + return; + } + + if (Number(value) > limit) { + // setErrorMessage(`Max: ${prefix}${limit}`); + // setClassName('is-invalid'); + setValue(value); + return; + } + + // setClassName('is-valid'); + setValue(value); + }; + + return ( + + ); +}; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/KeyNote.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/KeyNote.js new file mode 100644 index 00000000000..f8f9d1c0076 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/KeyNote.js @@ -0,0 +1,38 @@ +import React from "react"; +import PropTypes from "prop-types"; +import { UnMaskComponent } from ".."; +const KeyNote = ({ keyValue, note, caption, noteStyle, children, privacy }) => { + return ( +
+

{keyValue}

+
+

{note}

+ { privacy && ( + + {/* + Feature :: Privacy + privacy object set to the Mask Component + */} + + + )} +
+

{caption}

+ {children} +
+ ); +}; + +KeyNote.propTypes = { + keyValue: PropTypes.string, + note: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), + noteStyle: PropTypes.any, +}; + +KeyNote.defaultProps = { + keyValue: "", + note: "", + noteStyle: {}, +}; + +export default KeyNote; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/KeyNote.stories.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/KeyNote.stories.js new file mode 100644 index 00000000000..666f23cd024 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/KeyNote.stories.js @@ -0,0 +1,17 @@ +import React from "react"; + +import KeyNote from "./KeyNote"; + +export default { + title: "Atom/KeyNote", + component: KeyNote, +}; + +const Template = (args) => ; + +export const Default = Template.bind({}); + +Default.args = { + keyValue: "note1", + note: "My first note", +}; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Label.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Label.js new file mode 100644 index 00000000000..88f27bef117 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Label.js @@ -0,0 +1,7 @@ +import React from "react"; + +const Label = (props) => { + return

{props.children}

; +}; + +export default Label; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/LabelFieldPair.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/LabelFieldPair.js new file mode 100644 index 00000000000..7548b9c38b9 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/LabelFieldPair.js @@ -0,0 +1,11 @@ +import React from "react"; + +const LabelFieldPair = (props) => { + return ( +
+ {props.children} +
+ ); +}; + +export default LabelFieldPair; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/LinkButton.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/LinkButton.js new file mode 100644 index 00000000000..427fa0bc808 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/LinkButton.js @@ -0,0 +1,25 @@ +import React from "react"; +import PropTypes from "prop-types"; + +const LinkButton = (props) => { + return ( + + {props.label} + + ); +}; + +LinkButton.propTypes = { + /** + * LinkButton contents + */ + label: PropTypes.any, + /** + * Optional click handler + */ + onClick: PropTypes.func, +}; + +LinkButton.defaultProps = {}; + +export default LinkButton; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/LinkButton.stories.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/LinkButton.stories.js new file mode 100644 index 00000000000..b07c5b09df9 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/LinkButton.stories.js @@ -0,0 +1,16 @@ +import React from "react"; + +import LinkButton from "./LinkButton"; + +export default { + title: "Atom/LinkButton", + component: LinkButton, +}; + +const Template = (args) => ; + +export const Default = Template.bind({}); + +Default.args = { + label: "Link", +}; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/LinkLabel.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/LinkLabel.js new file mode 100644 index 00000000000..f008e2c7ea1 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/LinkLabel.js @@ -0,0 +1,11 @@ +import React from "react"; + +const LinkLabel = (props) => { + return ( + + ); +}; + +export default LinkLabel; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Loader.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Loader.js new file mode 100644 index 00000000000..062bf7ecc3e --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Loader.js @@ -0,0 +1,23 @@ +import React from "react"; +import PropTypes from "prop-types"; + +export const Loader = ({ page = false }) => ( +
+
+
+
+
+
+
+); + +Loader.propTypes = { + /** + * Is this is page or a module? + */ + page: PropTypes.bool, +}; + +Loader.defaultProps = { + page: false, +}; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Loader.stories.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Loader.stories.js new file mode 100644 index 00000000000..b5200ae1b3b --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Loader.stories.js @@ -0,0 +1,20 @@ +import React from "react"; + +import { Loader } from "./Loader"; + +export default { + title: "Atom/Loader", + component: Loader, +}; + +const Template = (args) => ; + +export const Module = Template.bind({}); +Module.args = { + page: false, +}; + +export const Page = Template.bind({}); +Page.args = { + page: true, +}; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/LocationSearch.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/LocationSearch.js new file mode 100644 index 00000000000..86f321eb310 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/LocationSearch.js @@ -0,0 +1,394 @@ +import React, { useEffect } from "react"; +import { SearchIconSvg } from "./svgindex"; +import { Loader } from "@googlemaps/js-api-loader"; + +let defaultBounds = {}; + +const updateDefaultBounds = (center) => { + if (!center.lat || !center.lng) { + return; + } + defaultBounds = { + north: center.lat + 0.1, + south: center.lat - 0.1, + east: center.lng + 0.1, + west: center.lng - 0.1, + }; +}; +const GetPinCode = (places) => { + let postalCode = null; + places?.address_components?.forEach((place) => { + let hasPostalCode = place.types.includes("postal_code"); + postalCode = hasPostalCode ? place.long_name : null; + }); + return postalCode; +}; + +const getName = (places) => { + let name = ""; + places?.address_components?.forEach((place) => { + let hasName = place.types.includes("sublocality_level_2") || place.types.includes("sublocality_level_1"); + if (hasName) { + name = hasName ? place.long_name : null; + } + }); + return name; +}; + +const loadGoogleMaps = (callback) => { + const key = globalConfigs?.getConfig("GMAPS_API_KEY"); + const loader = new Loader({ + apiKey: key, + version: "weekly", + libraries: ["places"], + }); + + loader + .load() + .then(() => { + if (callback) callback(); + }) + .catch((e) => { + // do something + }); +}; + +const mapStyles = [ + { + elementType: "geometry", + stylers: [ + { + color: "#f5f5f5", + }, + ], + }, + { + elementType: "labels.icon", + stylers: [ + { + visibility: "off", + }, + ], + }, + { + elementType: "labels.text.fill", + stylers: [ + { + color: "#616161", + }, + ], + }, + { + elementType: "labels.text.stroke", + stylers: [ + { + color: "#f5f5f5", + }, + ], + }, + { + featureType: "administrative.land_parcel", + elementType: "labels.text.fill", + stylers: [ + { + color: "#bdbdbd", + }, + ], + }, + { + featureType: "poi", + elementType: "geometry", + stylers: [ + { + color: "#eeeeee", + }, + ], + }, + { + featureType: "poi", + elementType: "labels.text.fill", + stylers: [ + { + color: "#757575", + }, + ], + }, + { + featureType: "poi.park", + elementType: "geometry", + stylers: [ + { + color: "#e5e5e5", + }, + ], + }, + { + featureType: "poi.park", + elementType: "labels.text.fill", + stylers: [ + { + color: "#9e9e9e", + }, + ], + }, + { + featureType: "road", + elementType: "geometry", + stylers: [ + { + color: "#ffffff", + }, + ], + }, + { + featureType: "road.arterial", + elementType: "labels.text.fill", + stylers: [ + { + color: "#757575", + }, + ], + }, + { + featureType: "road.highway", + elementType: "geometry", + stylers: [ + { + color: "#dadada", + }, + ], + }, + { + featureType: "road.highway", + elementType: "labels.text.fill", + stylers: [ + { + color: "#616161", + }, + ], + }, + { + featureType: "road.local", + elementType: "labels.text.fill", + stylers: [ + { + color: "#9e9e9e", + }, + ], + }, + { + featureType: "transit.line", + elementType: "geometry", + stylers: [ + { + color: "#e5e5e5", + }, + ], + }, + { + featureType: "transit.station", + elementType: "geometry", + stylers: [ + { + color: "#eeeeee", + }, + ], + }, + { + featureType: "water", + elementType: "geometry", + stylers: [ + { + color: "#c9c9c9", + }, + ], + }, + { + featureType: "water", + elementType: "labels.text.fill", + stylers: [ + { + color: "#9e9e9e", + }, + ], + }, +]; + +const setLocationText = (location, onChange, isPlaceRequired=false) => { + const geocoder = new google.maps.Geocoder(); + geocoder.geocode( + { + location, + }, + function (results, status) { + if (status === "OK") { + if (results[0]) { + let pincode = GetPinCode(results[0]); + const infoWindowContent = document.getElementById("pac-input"); + infoWindowContent.value = getName(results[0]); + if (onChange) { + if(isPlaceRequired) + onChange(pincode, { longitude: location.lng, latitude: location.lat }, infoWindowContent.value); + else + onChange(pincode, { longitude: location.lng, latitude: location.lat }); + } + } + } + } + ); +}; + +const onMarkerDragged = (marker, onChange, isPlaceRequired = false) => { + if (!marker) return; + const { latLng } = marker; + const currLat = latLng.lat(); + const currLang = latLng.lng(); + const location = { + lat: currLat, + lng: currLang, + }; + if(isPlaceRequired) + setLocationText(location, onChange, true); + else + setLocationText(location, onChange); +}; + +const initAutocomplete = (onChange, position, isPlaceRequired=false) => { + const map = new window.google.maps.Map(document.getElementById("map"), { + center: position, + zoom: 15, + mapTypeId: "roadmap", + styles: mapStyles, + }); // Create the search box and link it to the UI element. + + const input = document.getElementById("pac-input"); + updateDefaultBounds(position); + const options = { + bounds: defaultBounds, + componentRestrictions: { country: "in" }, + fields: ["address_components", "geometry", "icon", "name"], + origin: position, + strictBounds: false, + types: ["address"], + }; + const searchBox = new window.google.maps.places.Autocomplete(input, options); + // map.controls[google.maps.ControlPosition.TOP_LEFT].push(input); // Bias the SearchBox results towards current map's viewport. + + map.addListener("bounds_changed", () => { + searchBox.setBounds(map.getBounds()); + }); + + let markers = [ + new window.google.maps.Marker({ + map, + title: "a", + position: position, + draggable: true, + clickable: true, + }), + ]; + + if(isPlaceRequired) + setLocationText(position, onChange,true); + else + setLocationText(position, onChange); + + // Listen for the event fired when the user selects a prediction and retrieve + // more details for that place. + markers[0].addListener("dragend", (marker) => onMarkerDragged(marker, onChange, isPlaceRequired)); + searchBox.addListener("place_changed", () => { + const place = searchBox.getPlace(); + + if (!place) { + return; + } // Clear out the old markers. + let pincode = GetPinCode(place); + if (pincode) { + const { geometry } = place; + const geoLocation = { + latitude: geometry.location.lat(), + longitude: geometry.location.lng(), + }; + if(isPlaceRequired) + onChange(pincode, geoLocation, place.name); + else + onChange(pincode, geoLocation); + } + markers.forEach((marker) => { + marker.setMap(null); + }); + markers = []; // For each place, get the icon, name and location. + + const bounds = new window.google.maps.LatLngBounds(); + if (!place.geometry) { + return; + } + + markers.push( + new window.google.maps.Marker({ + map, + title: place.name, + position: place.geometry.location, + draggable: true, + clickable: true, + }) + ); + markers[0].addListener("dragend", (marker) => onMarkerDragged(marker, onChange, isPlaceRequired)); + if (place.geometry.viewport) { + // Only geocodes have viewport. + bounds.union(place.geometry.viewport); + } else { + bounds.extend(place.geometry.location); + } + + map.fitBounds(bounds); + }); +}; + +const LocationSearch = (props) => { + useEffect(() => { + async function mapScriptCall() { + const getLatLng = (position) => { + initAutocomplete(props.onChange, { lat: position.coords.latitude, lng: position.coords.longitude }, props.isPlaceRequired); + }; + const getLatLngError = (error) => { + let defaultLatLong = {}; + if (props?.isPTDefault) { + defaultLatLong = props?.PTdefaultcoord?.defaultConfig || { lat: 31.6160638, lng: 74.8978579 }; + } else { + defaultLatLong = { + lat: 31.6160638, + lng: 74.8978579, + }; + } + initAutocomplete(props.onChange, defaultLatLong, props.isPlaceRequired); + }; + + const initMaps = () => { + if (props.position?.latitude && props.position?.longitude) { + getLatLng({ coords: props.position }); + } else if (navigator?.geolocation) { + navigator.geolocation.getCurrentPosition(getLatLng, getLatLngError); + } else { + getLatLngError(); + } + }; + + loadGoogleMaps(initMaps); + } + mapScriptCall(); + }, []); + + return ( +
+
+ {/* */} + + +
+
+
+ ); +}; + +export default LocationSearch; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Menu.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Menu.js new file mode 100644 index 00000000000..34722b99ce3 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Menu.js @@ -0,0 +1,30 @@ +import React from "react"; +import PropTypes from "prop-types"; + +const Menu = (props) => { + const keyPrefix = props.localeKeyPrefix || "CS_ACTION"; + + return ( +
+ {props.options.map((option, index) => { + return ( +
props.onSelect(option)}> +

{props.t ? props.t(Digit.Utils.locale.getTransformedLocale(option.forcedName || `${keyPrefix}_${props.optionKey ? option[props.optionKey] : option}`)) : option}

+
+ ); + })} +
+ ); +}; + +Menu.propTypes = { + options: PropTypes.array, + onSelect: PropTypes.func, +}; + +Menu.defaultProps = { + options: [], + onSelect: () => {}, +}; + +export default Menu; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Menu.stories.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Menu.stories.js new file mode 100644 index 00000000000..36f6d1f78c3 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Menu.stories.js @@ -0,0 +1,15 @@ +import React from "react"; + +import Menu from "./Menu"; + +export default { + title: "Atom/Menu", + component: Menu, +}; + +const Template = (args) => ; + +export const Default = Template.bind({}); +Default.args = { + options: ["first", "second", "third"], +}; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/MobileNumber.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/MobileNumber.js new file mode 100644 index 00000000000..9686908db5f --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/MobileNumber.js @@ -0,0 +1,67 @@ +import React from "react"; +import PropTypes from "prop-types"; + +const MobileNumber = (props) => { + const user_type = Digit.SessionStorage.get("userType"); + + const onChange = (e) => { + let val = e.target.value; + if (isNaN(val) || [" ", "e", "E"].some((e) => val.includes(e)) || val.length > (props.maxLength || 10)) { + val = val.slice(0, -1); + } + props?.onChange?.(val); + }; + + return ( + +
+ {!props.hideSpan ? ( + + +91 + + ) : null} +
+ +
+
+
+ ); +}; + +MobileNumber.propTypes = { + userType: PropTypes.string, + isMandatory: PropTypes.bool, + name: PropTypes.string, + placeholder: PropTypes.string, + onChange: PropTypes.func, + ref: PropTypes.func, + value: PropTypes.any, +}; + +MobileNumber.defaultProps = { + isMandatory: false, +}; + +export default MobileNumber; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Modals/WorkflowPopup.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Modals/WorkflowPopup.js new file mode 100644 index 00000000000..dc73540c26a --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Modals/WorkflowPopup.js @@ -0,0 +1,112 @@ +import React,{ useState,useEffect } from 'react' +import { Loader } from "../Loader" +import configEstimateModal from './config/configEstimateModal' +import Modal from '../../hoc/Modal' +import { FormComposer } from '../../hoc/FormComposer' + + +const Heading = (props) => { + return

{props.label}

; +}; + +const Close = () => ( + + + + +); + +const CloseBtn = (props) => { + return ( +
+ +
+ ); +}; + + +const WorkflowPopup = ({ applicationDetails,...props}) => { + const { + action, + tenantId, + t, + closeModal, + submitAction, + businessService, + moduleCode + } = props + + const enableAssignee = Digit?.Customizations?.["commonUiConfig"]?.enableHrmsSearch(businessService,action) + // const [approvers,setApprovers] = useState([]) + const [config,setConfig] = useState(null) + const [modalSubmit,setModalSubmit] = useState(true) + //hrms user search + let { isLoading: isLoadingHrmsSearch, isError, error, data: assigneeOptions } = Digit.Hooks.hrms.useHRMSSearch({ roles: action?.assigneeRoles?.toString(), isActive: true }, tenantId, null, null, { enabled: action?.assigneeRoles?.length > 0 && enableAssignee }); + + assigneeOptions = assigneeOptions?.Employees + assigneeOptions?.map(emp => emp.nameOfEmp = emp?.user?.name || t("ES_COMMON_NA")) + + useEffect(() => { + if(businessService==="muster-roll-approval" && action.action==="APPROVE"){ + setModalSubmit(false) + } + }, [businessService]) + + + useEffect(() => { + if(assigneeOptions?.length >=0){ + setConfig( + configEstimateModal(t,action,assigneeOptions,businessService, moduleCode) + ) + } + else { + setConfig( + configEstimateModal(t, action, undefined, businessService, moduleCode) + ) + } + + }, [assigneeOptions]) + + const _submit = (data) => { + //here call an UICustomizaton fn to update the payload for update call(businessService based) + const updatePayload = Digit?.Customizations?.["commonUiConfig"]?.updatePayload(applicationDetails, data, action, businessService) + //calling submitAction + submitAction(updatePayload, action) + + } + + const modalCallBack = (setValue, formData, formState, reset, setError, clearErrors, trigger, getValues) => { + Digit?.Customizations?.["commonUiConfig"]?.enableModalSubmit(businessService,action,setModalSubmit,formData) + } + + if(isLoadingHrmsSearch) return + + return action && config?.form ? ( + } + headerBarEnd={} + actionCancelLabel={t(config.label.cancel)} + actionCancelOnSubmit={closeModal} + actionSaveLabel={t(config.label.submit)} + actionSaveOnSubmit={() => { }} + formId="modal-action" + isDisabled = {!modalSubmit} + > + + + + ) : ( + + ); +} + +export default WorkflowPopup \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Modals/config/configEstimateModal.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Modals/config/configEstimateModal.js new file mode 100644 index 00000000000..bda9ca66040 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Modals/config/configEstimateModal.js @@ -0,0 +1,400 @@ +import Dropdown from '../../Dropdown'; +import { Loader } from '../../Loader'; +import React, { useState } from 'react' + +const configEstimateModal = ( + t, + action, + approvers, + businessService, + moduleCode +) => { + + const {action:actionString} = action + const bsEstimate = Digit?.Customizations?.["commonUiConfig"]?.getBusinessService("estimate"); + const bsContract = Digit?.Customizations?.["commonUiConfig"]?.getBusinessService("contract"); + const bsMuster = Digit?.Customizations?.["commonUiConfig"]?.getBusinessService("muster roll"); + const bsPurchaseBill = Digit?.Customizations?.["commonUiConfig"]?.getBusinessService("works.purchase"); + + const configMap = { + [bsEstimate]: { + "default":{ + comments:{ + isMandatory:false, + show:true, + }, + assignee:{ + isMandatory:false, + show:true + }, + upload:{ + isMandatory:false, + show:true, + allowedFileTypes:/(.*?)(pdf|vnd.openxmlformats-officedocument.wordprocessingml.document|msword|vnd.ms-excel|vnd.openxmlformats-officedocument.spreadsheetml.sheet|csv|jpeg)$/i + } + }, + "REJECT": { + comments: { + isMandatory: true, + show: true, + }, + assignee: { + isMandatory: false, + show: false + }, + upload: { + isMandatory: false, + show: true + } + }, + "SENDBACK": { + comments: { + isMandatory: false, + show: true, + }, + assignee: { + isMandatory: false, + show: false + }, + upload: { + isMandatory: false, + show: true + } + }, + "SENDBACKTOORIGINATOR": { + comments: { + isMandatory: false, + show: true, + }, + assignee: { + isMandatory: false, + show: false + }, + upload: { + isMandatory: false, + show: true + } + }, + "APPROVE": { + comments: { + isMandatory: false, + show: true, + }, + assignee: { + isMandatory: false, + show: false + }, + upload: { + isMandatory: false, + show: true + } + } + }, + [bsContract]: { + "default":{ + comments:{ + isMandatory:false, + show:true, + }, + assignee:{ + isMandatory:false, + show:true + }, + upload:{ + isMandatory:false, + show:true, + allowedFileTypes:/(.*?)(pdf|vnd.openxmlformats-officedocument.wordprocessingml.document|msword|vnd.ms-excel|vnd.openxmlformats-officedocument.spreadsheetml.sheet|csv|jpeg)$/i + } + }, + "REJECT": { + comments: { + isMandatory: true, + show: true, + }, + assignee: { + isMandatory: false, + show: false + }, + upload: { + isMandatory: false, + show: true + } + }, + "SEND_BACK": { + comments: { + isMandatory: false, + show: true, + }, + assignee: { + isMandatory: false, + show: false + }, + upload: { + isMandatory: false, + show: true + } + }, + "VERIFY_AND_FORWARD": { + comments:{ + isMandatory:false, + show:true, + }, + assignee:{ + isMandatory:false, + show:true + }, + upload:{ + isMandatory:false, + show:true + } + }, + "SEND_BACK_TO_ORIGINATOR": { + comments: { + isMandatory: false, + show: true, + }, + assignee: { + isMandatory: false, + show: false + }, + upload: { + isMandatory: false, + show: true + } + }, + "APPROVE": { + comments: { + isMandatory: false, + show: true, + }, + assignee: { + isMandatory: false, + show: false + }, + upload: { + isMandatory: false, + show: true + } + }, + }, + [bsMuster]:{ + "default":{ + comments:{ + isMandatory:false, + show:true, + }, + assignee:{ + isMandatory:false, + show:true + }, + upload:{ + isMandatory:false, + show:true, + allowedFileTypes:/(.*?)(pdf|vnd.openxmlformats-officedocument.wordprocessingml.document|msword|vnd.ms-excel|vnd.openxmlformats-officedocument.spreadsheetml.sheet|csv|jpeg)$/i + } + }, + "APPROVE": { + comments: { + isMandatory: false, + show: true, + }, + assignee: { + isMandatory: false, + show: false + }, + upload: { + isMandatory: false, + show: true + }, + acceptTerms: { + isMandatory:true, + show:true + } + }, + "REJECT": { + comments: { + isMandatory: true, + show: true, + }, + upload: { + isMandatory: false, + show: true + }, + }, + "SENDBACK":{ + comments: { + isMandatory: false, + show: true, + }, + assignee: { + isMandatory: false, + show: false + }, + upload: { + isMandatory: false, + show: true + }, + acceptTerms: { + isMandatory:false, + show:false + } + }, + "SENDBACKTOCBO":{ + comments: { + isMandatory: false, + show: true, + }, + assignee: { + isMandatory: false, + show: false + }, + upload: { + isMandatory: false, + show: true + }, + acceptTerms: { + isMandatory:false, + show:false + } + } + }, + [bsPurchaseBill]:{ + "default":{ + comments:{ + isMandatory:false, + show:true, + }, + assignee:{ + isMandatory:false, + show:false + }, + upload:{ + isMandatory:false, + show:true + } + }, + "VERIFY_AND_FORWARD":{ + comments:{ + isMandatory:false, + show:true, + }, + assignee:{ + isMandatory:false, + show:true + }, + upload:{ + isMandatory:false, + show:true + } + }, + "REJECT":{ + comments:{ + isMandatory:true, + show:true, + }, + assignee:{ + isMandatory:false, + show:false + }, + upload:{ + isMandatory:false, + show:true + } + } + } + } +//field can have (comments,assignee,upload) + const fetchIsMandatory = (field) => { + + if(configMap?.[businessService]?.[actionString]){ + return configMap?.[businessService]?.[actionString]?.[field]?.isMandatory ? configMap?.[businessService]?.[actionString]?.[field]?.isMandatory : false + }else{ + return configMap?.[businessService]?.default?.[field]?.isMandatory ? configMap?.[businessService]?.default?.[field]?.isMandatory: false + } + } + const fetchIsShow = (field) => { + + if (configMap?.[businessService]?.[actionString]) { + return configMap?.[businessService]?.[actionString]?.[field]?.show ? configMap?.[businessService]?.[actionString]?.[field]?.show : false + } else { + return configMap?.[businessService]?.default?.[field]?.show ? configMap?.[businessService]?.default?.[field]?.show:false + } + + } + + return { + label: { + heading: Digit.Utils.locale.getTransformedLocale(`WF_MODAL_HEADER_${businessService}_${action.action}`), + submit: Digit.Utils.locale.getTransformedLocale(`WF_MODAL_SUBMIT_${businessService}_${action.action}`), + cancel: "WF_MODAL_CANCEL", + }, + form: [ + { + body: [ + { + label: " ", + type: "checkbox", + disable: false, + isMandatory:false, + populators: { + name: "acceptTerms", + title: "MUSTOR_APPROVAL_CHECKBOX", + isMandatory: false, + labelStyles: {marginLeft:"40px"}, + customLabelMarkup: true, + hideInForm: !fetchIsShow("acceptTerms") + } + }, + { + label: t("WF_MODAL_APPROVER"), + type: "dropdown", + isMandatory: fetchIsMandatory("assignee"), + disable: false, + key:"assignees", + populators: { + name: "assignee", + optionsKey: "nameOfEmp", + options: approvers, + hideInForm: !fetchIsShow("assignee"), + "optionsCustomStyle": { + "top": "2.3rem" + } + }, + }, + { + label: t("WF_MODAL_COMMENTS"), + type: "textarea", + isMandatory: fetchIsMandatory("comments"), + populators: { + name: "comments", + hideInForm:!fetchIsShow("comments"), + validation:{ + maxLength:{ + value:1024, + message:t("WORKS_COMMENT_LENGTH_EXCEEDED_1024") + } + } + }, + }, + { + type: "multiupload", + label: t("WORKFLOW_MODAL_UPLOAD_FILES"), + populators: { + name: "documents", + allowedMaxSizeInMB: 5, + maxFilesAllowed: 1, + allowedFileTypes:configMap?.[businessService]?.default?.upload?.allowedFileTypes, + hintText:t("WORKS_DOC_UPLOAD_HINT"), + showHintBelow:true, + customClass: "upload-margin-bottom", + errorMessage: t("WORKS_FILE_UPLOAD_CUSTOM_ERROR_MSG"), + hideInForm:!fetchIsShow("upload") + } + } + ] + } + ] + } +} + +export default configEstimateModal \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Modals/index.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Modals/index.js new file mode 100644 index 00000000000..f3c3cca1608 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Modals/index.js @@ -0,0 +1,13 @@ +import React, { useState, useEffect } from "react"; + + +import WorkflowPopup from "./WorkflowPopup"; + +const ActionModal = (props) => { + //here we can render different modals based on respective modules + return ; + + +}; + +export default ActionModal; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/MultiLink.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/MultiLink.js new file mode 100644 index 00000000000..d62b4bd8269 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/MultiLink.js @@ -0,0 +1,45 @@ +import React, { forwardRef, useCallback, useEffect, useMemo, useRef, useState } from "react"; +import LinkButton from "./LinkButton"; +import { PrimaryDownlaodIcon } from "./svgindex"; +import { useTranslation } from "react-i18next"; + +const MultiLink = forwardRef(({ className, onHeadClick, displayOptions = false, options, label, icon, showOptions, setShowOptions = () => {}, downloadBtnClassName, downloadOptionsClassName, optionsClassName, style, optionsStyle, reportStyles }, ref) => { + const { t } = useTranslation(); + const menuRef = useRef(); + const [showMenu, setshowMenu] = useState(false); + const handleOnClick = () => { + if(!(setShowOptions.toString().replace(/\s+/g,``) === "function(){}" ||setShowOptions.toString().replace(/\s+/g,``) === "()=>{}")) + { + setShowOptions(false); + setshowMenu(false); + } + } + Digit.Hooks.useClickOutside(menuRef, handleOnClick, showMenu); + + useMemo(() => { + setshowMenu(displayOptions); + },[displayOptions]) + + const MenuWrapper = React.forwardRef((props, ref) => { + return
+ {options.map((option, index) => ( +
option.onClick()} key={index} className={`multilink-option`}> + {option?.icon} + {option.label} +
+ ))} +
+ }) + + return ( +
+
+ {icon ? icon : } + +
+ {showMenu ? : null} +
+ ); +}); + +export default MultiLink; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/MultiSelectDropdown.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/MultiSelectDropdown.js new file mode 100644 index 00000000000..9ed5e1c52b1 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/MultiSelectDropdown.js @@ -0,0 +1,142 @@ +import React, { useEffect, useReducer, useRef, useState } from "react"; +import { ArrowDown, CheckSvg } from "./svgindex"; +import { useTranslation } from "react-i18next"; +import RemoveableTag from "./RemoveableTag"; +const MultiSelectDropdown = ({ options, optionsKey, selected = [], onSelect, defaultLabel = "", defaultUnit = "",BlockNumber=1,isOBPSMultiple=false,props={},isPropsNeeded=false,ServerStyle={}, config}) => { + const [active, setActive] = useState(false); + const [searchQuery, setSearchQuery] = useState(); + const [optionIndex, setOptionIndex] = useState(-1); + const dropdownRef = useRef(); + const { t } = useTranslation(); + + function reducer(state, action){ + switch(action.type){ + case "ADD_TO_SELECTED_EVENT_QUEUE": + return [...state, {[optionsKey]: action.payload?.[1]?.[optionsKey], propsData: action.payload} ] + case "REMOVE_FROM_SELECTED_EVENT_QUEUE": + const newState = state.filter( + (e) => e?.[optionsKey] !== action.payload?.[1]?.[optionsKey] + ); + onSelect(newState.map((e) => e.propsData), props); // Update the form state here + return newState; + case "REPLACE_COMPLETE_STATE": + return action.payload + default: + return state + } + } + + useEffect(() => { + dispatch({type: "REPLACE_COMPLETE_STATE", payload: fnToSelectOptionThroughProvidedSelection(selected) }) + },[selected?.length]) + + function fnToSelectOptionThroughProvidedSelection(selected){ + return selected?.map( e => ({[optionsKey]: e?.[optionsKey], propsData: [null, e]})) + } + + const [alreadyQueuedSelectedState, dispatch] = useReducer(reducer, selected, fnToSelectOptionThroughProvidedSelection) + + useEffect(()=> { + if(!active){ + onSelect(alreadyQueuedSelectedState?.map( e => e.propsData), props) + } + },[active]) + + + function handleOutsideClickAndSubmitSimultaneously(){ + setActive(false) + } + + Digit.Hooks.useClickOutside(dropdownRef, handleOutsideClickAndSubmitSimultaneously , active, {capture: true} ); + const filtOptns = + searchQuery?.length > 0 ? options.filter((option) => t(option[optionsKey]&&typeof option[optionsKey]=="string" && option[optionsKey].toUpperCase()).toLowerCase().indexOf(searchQuery.toLowerCase()) >= 0) : options; + + function onSearch(e) { + setSearchQuery(e.target.value); + } + + function onSelectToAddToQueue(...props){ + const isChecked = arguments[0].target.checked + isChecked ? dispatch({type: "ADD_TO_SELECTED_EVENT_QUEUE", payload: arguments }) : dispatch({type: "REMOVE_FROM_SELECTED_EVENT_QUEUE", payload: arguments }) + } + +/* Custom function to scroll and select in the dropdowns while using key up and down */ + const keyChange = (e) => { + if (e.key == "ArrowDown") { + setOptionIndex(state =>state+1== filtOptns.length?0:state+1); + if(optionIndex+1== filtOptns.length){ + e?.target?.parentElement?.parentElement?.children?.namedItem("jk-dropdown-unique")?.scrollTo?.(0,0) + }else{ + optionIndex>2&& e?.target?.parentElement?.parentElement?.children?.namedItem("jk-dropdown-unique")?.scrollBy?.(0,45) + } + e.preventDefault(); + } else if (e.key == "ArrowUp") { + setOptionIndex(state => state!==0? state - 1: filtOptns.length-1); + if(optionIndex===0){ + e?.target?.parentElement?.parentElement?.children?.namedItem("jk-dropdown-unique")?.scrollTo?.(100000,100000) + }else{ + optionIndex>2&&e?.target?.parentElement?.parentElement?.children?.namedItem("jk-dropdown-unique")?.scrollBy?.(0,-45) + } + e.preventDefault(); + }else if(e.key=="Enter"){ + onSelectToAddToQueue(e,filtOptns[optionIndex]); + } + } + + const MenuItem = ({ option, index }) => ( +
+ selectedOption[optionsKey] === option[optionsKey]) ? true : false} + onChange={(e) => isPropsNeeded?onSelectToAddToQueue(e, option,props):isOBPSMultiple?onSelectToAddToQueue(e, option,BlockNumber):onSelectToAddToQueue(e, option)} + style={{minWidth: "24px", width: "100%"}} + /> +
+ +
+

{t(option[optionsKey]&&typeof option[optionsKey]=="string" && option[optionsKey])}

+
+ ); + + const Menu = () => { + const filteredOptions = + searchQuery?.length > 0 ? options.filter((option) => t(option[optionsKey]&&typeof option[optionsKey]=="string" && option[optionsKey].toUpperCase()).toLowerCase().indexOf(searchQuery.toLowerCase()) >= 0) : options; + return filteredOptions?.map((option, index) => ); + }; + + return ( +
+
+
+ setActive(true)} value={searchQuery} onChange={onSearch} /> +
+

{alreadyQueuedSelectedState.length > 0 ? `${alreadyQueuedSelectedState.length} ${defaultUnit}` : defaultLabel}

+ +
+
+ {active ? ( +
+ +
+ ) : null} + +
+ {config?.isDropdownWithChip ?
+ {alreadyQueuedSelectedState.length > 0 && + alreadyQueuedSelectedState.map((value, index) => { + return onSelectToAddToQueue(e, value,props) + : (e) => onSelectToAddToQueue(e, value) + } />; + })} +
: null} +
+ ); +}; + +export default MultiSelectDropdown; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/NavBar.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/NavBar.js new file mode 100644 index 00000000000..27b7643d928 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/NavBar.js @@ -0,0 +1,194 @@ +import React, { useRef, useState } from "react"; +import { Link, useLocation } from "react-router-dom"; +import { useTranslation } from "react-i18next"; +import SubMenu from "./SubMenu"; +import { + HomeIcon, + BPAHomeIcon, + PersonIcon, + DocumentIconSolid, + DropIcon, + CollectionsBookmarIcons, + FinanceChartIcon, + ComplaintIcon, + SearchIcon, + CollectionIcon, + PropertyHouse, + CaseIcon, + PTIcon, + PGRIcon, + MCollectIcon, + OBPSIcon, + WSICon, + FSMIcon, + Phone, + LogoutIcon, + EditPencilIcon, + LanguageIcon, +} from "./svgindex"; +import { BirthIcon, DeathIcon, FirenocIcon } from ".."; + +const IconsObject = { + CommonPTIcon: , + OBPSIcon: , + propertyIcon: , + TLIcon: , + PGRIcon: , + FSMIcon: , + WSIcon: , + BirthIcon: , + DeathIcon: , + FirenocIcon: , + MCollectIcon: , + BillsIcon: , + home: , + announcement: , + business: , + store: , + assignment: , + receipt: , + "business-center": , + description: , + "water-tap": , + "collections-bookmark": , + "insert-chart": , + edcr: , + collections: , + "open-complaints": , + HomeIcon: , + EditPencilIcon: , + LogoutIcon: , + Phone: , + LanguageIcon: , +}; +const NavBar = ({ open, toggleSidebar, profileItem, menuItems, onClose, Footer, isEmployee, search, setSearch }) => { + const node = useRef(); + const location = useLocation(); + const { pathname } = location; + const { t } = useTranslation(); + Digit.Hooks.useClickOutside(node, open ? onClose : null, open); + + const MenuItem = ({ item }) => { + let itemComponent; + if (item.type === "component") { + itemComponent = item.action; + } else { + itemComponent = item.text; + } + const leftIconArray = item.icon || item.icon?.type?.name; + const leftIcon = leftIconArray ? IconsObject[leftIconArray] : IconsObject.BillsIcon; + const Item = () => ( + + {leftIcon} +
{itemComponent}
+
+ ); + + if (item.type === "external-link") { + return ( + + + + ); + } + if (item.type === "link") { + if (item.link.indexOf(`/${window?.contextPath}`) === -1 && isEmployee) { + const getOrigin = window.location.origin; + return ( + + + + ); + } + return ( + + + + ); + } + + if (item.type === "dynamic") { + if (isEmployee) { + return ; + } + } + return ; + }; + + const renderSearch = () => { + return ( +
+
+
+
+ + setSearch(e.target.value)} + /> +
+
+
+
+ ); + }; + return ( + +
+
+
+ {profileItem} +
+ {isEmployee ? renderSearch() : null} + {menuItems?.map((item, index) => ( +
+ +
+ ))} +
+
{Footer}
+
+
+
+
+
+ ); +}; + +export default NavBar; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/NoResultsFound.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/NoResultsFound.js new file mode 100644 index 00000000000..fdceb7aef91 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/NoResultsFound.js @@ -0,0 +1,15 @@ +import React from "react"; +import { NoResultsFoundIcon } from "./svgindex"; +import { useTranslation } from "react-i18next"; + +const NoResultsFound = () => { + const {t} = useTranslation(); + return ( +
+ + {t("COMMON_NO_RESULTS_FOUND")} +
+ ) +} + +export default NoResultsFound; \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/OTPInput.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/OTPInput.js new file mode 100644 index 00000000000..5d4555e7dfd --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/OTPInput.js @@ -0,0 +1,98 @@ +import React, { useEffect, useRef, useState } from "react"; +import PropTypes from "prop-types"; + +const BACKSPACE = 8; + +const SingleInput = ({ isFocus, onChange, onFocus, value, ...rest }) => { + const inputRef = useRef(); + useEffect(() => { + if (isFocus) { + inputRef.current.focus(); + } + }, [isFocus]); + + return ( + + ); +}; + +const OTPInput = (props) => { + const [activeInput, setActiveInput] = useState(0); + + const isInputValueValid = (value) => { + return typeof value === "string" && value.trim().length === 1; + }; + + const changeCodeAtFocus = (value) => { + const { onChange } = props; + const otp = getOtpValue(); + otp[activeInput] = value[0]; + const otpValue = otp.join(""); + onChange(otpValue); + }; + + const focusNextInput = () => { + setActiveInput((activeInput) => Math.min(activeInput + 1, props.length - 1)); + }; + + const focusPrevInput = () => { + setActiveInput((activeInput) => Math.max(activeInput - 1, 0)); + }; + + const getOtpValue = () => (props.value ? props.value.toString().split("") : []); + + const handleKeyDown = (event) => { + if (event.keyCode === BACKSPACE || event.key === "Backspace") { + event.preventDefault(); + changeCodeAtFocus(""); + focusPrevInput(); + } + }; + + function inputChange(event) { + const { value } = event.target; + changeCodeAtFocus(value); + if (isInputValueValid(value)) { + focusNextInput(); + } + } + + const OTPStack = []; + const otp = getOtpValue(); + for (let i = 0; i < props.length; i++) { + OTPStack.push( + { + setActiveInput(i); + e.target.select(); + }} + value={otp[i]} + /> + ); + } + + return
{OTPStack}
; +}; + +OTPInput.propTypes = { + length: PropTypes.number, +}; + +OTPInput.defaultProps = { + length: 0, +}; + +export default OTPInput; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/OTPInput.stories.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/OTPInput.stories.js new file mode 100644 index 00000000000..3844f362f09 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/OTPInput.stories.js @@ -0,0 +1,16 @@ +import React from "react"; + +import OTPInput from "./OTPInput"; + +export default { + title: "Atom/OTPInput", + component: OTPInput, +}; + +const Template = (args) => ; + +export const Default = Template.bind({}); + +Default.args = { + length: 4, +}; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/OpenLinkContainer.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/OpenLinkContainer.js new file mode 100644 index 00000000000..b7aed26cf55 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/OpenLinkContainer.js @@ -0,0 +1,29 @@ +import React, { useState } from "react"; +import PropTypes from "prop-types"; +import { NotificationBell } from "./svgindex"; + +const OpenLinkContainer = ({ img,}) => { + return ( +
+
+ +
+
+ ); +}; + +OpenLinkContainer.propTypes = { + img: PropTypes.string, +}; + +OpenLinkContainer.defaultProps = { + img: undefined, +}; + +export default OpenLinkContainer; \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Paragraph.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Paragraph.js new file mode 100644 index 00000000000..cb1d2dd8526 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Paragraph.js @@ -0,0 +1,11 @@ +import React from "react"; + +const Paragraph = (props) => { + const {value, customClassName, customStyle, inputRef} = props; + + return ( +

{value}

+ ) +} + +export default Paragraph; \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/PopUp.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/PopUp.js new file mode 100644 index 00000000000..1180dc8a126 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/PopUp.js @@ -0,0 +1,7 @@ +import React from "react"; + +const PopUp = ({className, ...props}) => { + return
{props.children}
; +}; + +export default PopUp; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/PopupHeadingLabel.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/PopupHeadingLabel.js new file mode 100644 index 00000000000..df950fa20d7 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/PopupHeadingLabel.js @@ -0,0 +1,20 @@ +import React from "react" + +const PopupHeadingLabel = ({IconSVG, headingLabel, onResetSortForm}) => { + return
+
+ +

{headingLabel}:

+
+ + + + + +
+} + +export default PopupHeadingLabel \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/PrivateRoute.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/PrivateRoute.js new file mode 100644 index 00000000000..a671b35ebd7 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/PrivateRoute.js @@ -0,0 +1,29 @@ +import React from "react"; +import { Route, Redirect } from "react-router-dom"; + +export const PrivateRoute = ({ component: Component, roles, ...rest }) => { + return ( + { + const user = Digit.UserService.getUser(); + const userType = Digit.UserService.getType(); + function getLoginRedirectionLink (){ + if(userType === "employee"){ + return `/${window?.contextPath}/employee/user/language-selection` + } + else{ + return `/${window?.contextPath}/citizen/login` + } + } + if (!user || !user.access_token) { + // not logged in so redirect to login page with the return url + return ; + } + + // logged in so return component + return ; + }} + /> + ); +}; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/RadioButtons.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/RadioButtons.js new file mode 100644 index 00000000000..5b501fb4afc --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/RadioButtons.js @@ -0,0 +1,91 @@ +import React, { useEffect, useState } from "react"; +import PropTypes from "prop-types"; +import isEqual from "lodash/isEqual"; +import { useTranslation } from "react-i18next"; + +const RadioButtons = (props) => { + const { t } = useTranslation(); + var selected = props.selectedOption; + function selectOption(value) { + //selected = value; + props.onSelect(value); + } + + return ( +
+ {props?.options?.map((option, ind) => { + if (props?.optionsKey && !props?.isDependent) { + return ( +
+ + selectOption(option)} + disabled={props?.disabled} + name={props.name} + ref={props.inputRef} + /> + + + +
+ ); + } else if (props?.optionsKey && props?.isDependent) { + return ( +
+ + selectOption(option)} + disabled={props?.disabled} + name={props.name} + ref={props.inputRef} + /> + + + +
+ ); + } else { + return ( +
+ + selectOption(option)} + disabled={props?.disabled} + name={props.name} + ref={props.inputRef} + /> + + + +
+ ); + } + })} +
+ ); +}; + +RadioButtons.propTypes = { + selectedOption: PropTypes.any, + onSelect: PropTypes.func, + options: PropTypes.any, + optionsKey: PropTypes.string, + innerStyles: PropTypes.any, + style: PropTypes.any, +}; + +RadioButtons.defaultProps = {}; + +export default RadioButtons; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/RadioButtons.stories.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/RadioButtons.stories.js new file mode 100644 index 00000000000..07122bb0e95 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/RadioButtons.stories.js @@ -0,0 +1,19 @@ +import React from "react"; + +import RadioButtons from "./RadioButtons"; + +export default { + title: "Atom/RadioButtons", + component: RadioButtons, +}; + +const Template = (args) => ; + +export const Default = Template.bind({}); + +Default.args = { + selectedOption: "first", + onSelect: undefined, + options: ["first", "second"], + optionsKey: "", +}; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Rating.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Rating.js new file mode 100644 index 00000000000..309e3d6e9a5 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Rating.js @@ -0,0 +1,45 @@ +import React, { useRef } from "react"; +import { StarFilled } from "./svgindex"; +import { StarEmpty } from "./svgindex"; +import PropTypes from "prop-types"; + +const Rating = (props) => { + var stars = []; + const star = useRef(null); + + for (var i = 1; i <= props.maxRating; i++) { + if (i - props.currentRating <= 0) { + const index = i; + // stars.push(star filledprops.onFeedback(e,ref)}/>) + stars.push( props.onFeedback(e, star, index)} />); + } else if (i - props.currentRating > 0 && i - props.currentRating < 1) { + const index = i; + stars.push( props.onFeedback(e, star, index)} percentage={Math.round(((props.currentRating - parseInt(props.currentRating)) * 100))} />) + } else { + const index = i; + // stars.push(star emptyprops.onFeedback(e,ref)}/>) + stars.push( props.onFeedback(e, star, index)} />); + } + } + + return ( +
+ {props.text ? props.text : ""} {stars} +
+ ); +}; + +Rating.propTypes = { + maxRating: PropTypes.number, + currentRating: PropTypes.number, + onFeedback: PropTypes.func, +}; + +Rating.defaultProps = { + maxRating: 5, + id: '0', + currentRating: 0, + onFeedback: () => {}, +}; + +export default Rating; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Rating.stories.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Rating.stories.js new file mode 100644 index 00000000000..2aadb7da6b9 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Rating.stories.js @@ -0,0 +1,18 @@ +import React from "react"; + +import Rating from "./Rating"; + +export default { + title: "Atom/Rating", + component: Rating, +}; + +const Template = (args) => ; + +export const Default = Template.bind({}); + +Default.args = { + maxRating: 5, + currentRating: 0, + onFeedback: () => {}, +}; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Reason.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Reason.js new file mode 100644 index 00000000000..085011dcaca --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Reason.js @@ -0,0 +1,29 @@ +import React,{Fragment} from "react"; +import { useTranslation } from "react-i18next"; +// TODO @Nipun localise +const Reason = ({ headComment, otherComment, additionalComment }) => { + const { t } = useTranslation() + const getMarkup = () => { + if(additionalComment) { + return
+

{t("COMMON_CERTIFY_ONE")}

+
+

+ {t("ES_COMMON_NOTE")}{t("COMMON_CERTIFY_TWO")} +

+
+ + } + else { + return
+

{headComment}

+

{otherComment}

+
+ } + } + return ( + getMarkup() + ); +} + +export default Reason; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/RemoveableTag.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/RemoveableTag.js new file mode 100644 index 00000000000..1f7fe96fe04 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/RemoveableTag.js @@ -0,0 +1,13 @@ +import React from "react"; +import { Close } from "./svgindex"; + +const RemoveableTag = ({ text, onClick, extraStyles,disabled = false }) => ( +
+ {text} + + + +
+); + +export default RemoveableTag; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/RoundedLabel.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/RoundedLabel.js new file mode 100644 index 00000000000..aa2fa5e0a8a --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/RoundedLabel.js @@ -0,0 +1,5 @@ +import React from "react"; + +const RoundedLabel = ({ count }) => (count ?
{count}
: ); + +export default RoundedLabel; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/SVG.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/SVG.js new file mode 100644 index 00000000000..b24afb197ae --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/SVG.js @@ -0,0 +1,1561 @@ +import { + Rotation3D, + SixFtApart, + Rotate360, + Accessibility, + AccessibilityNew, + Accessible, + AccessibleForward, + AccountBalance, + AccountBalanceWallet, + AccountBox, + AccountCircle, + AddAlert, + AddBusiness, + AddChart, + AddExpense, + AddExpenseTwo, + AddIcCall, + AddLocation, + AddLocationAlt, + AddModerator, + AddRoad, + AddShoppingCart, + AddTask, + AddToDrive, + AdminPanelSettings, + Agriculture, + Alarm, + AlarmAdd, + AlarmOff, + AlarmOn, + AllInbox, + AllOut, + AlternateEmail, + AltRoute, + Analytics, + Anchor, + Android, + Announcement, + Api, + AppBlocking, + AppRegistration, + Approval, + Apps, + AppSettingsAlt, + Architecture, + ArrowBack, + ArrowBackIos, + ArrowCircleDown, + ArrowCircleUp, + ArrowDownward, + ArrowDropDown, + ArrowDropDownCircle, + ArrowDropUp, + ArrowForward, + ArrowForwardIos, + ArrowForwardIosAlt, + ArrowLeft, + ArrowRight, + ArrowRightAlt, + ArrowUpward, + Article, + AspectRatio, + Assessment, + Assignment, + AssignmentInd, + AssignmentLate, + AssignmentReturn, + AssignmentReturned, + AssignmentTurnedIn, + AssistantDirection, + AssistantNavigation, + Atm, + AttachEmail, + Attachment, + Attractions, + AutoDelete, + AutoRenew, + Backup, + BackupTable, + Badge, + BakeryDining, + BatchPrediction, + BeenHere, + BikeScooter, + Book, + Bookmark, + BookmarkBorder, + Bookmarks, + BookOnline, + BreakfastDining, + BrunchDining, + BugReport, + Build, + BuildCircle, + BusAlert, + Business, + Cached, + Cake, + CalendarToday, + CalendarViewDay, + Call, + CallEnd, + CallMade, + CallMerge, + CallMissed, + CallMissedOutgoing, + CallReceived, + CallSplit, + CameraEnhance, + Campaign, + Cancel, + CancelPresentation, + CancelScheduleSend, + CardGiftcard, + CardMembership, + CardTravel, + CarRental, + CarRepair, + Category, + Celebration, + CellWifi, + ChangeHistory, + Chat, + ChatBubble, + ChatBubbleOutline, + Check, + CheckCircle, + CheckCircleOutline, + ChevronLeft, + ChevronRight, + ChromeReaderMode, + CircleNotifications, + Class, + CleanHands, + CleaningServices, + ClearAll, + Clock, + Close, + CloseFullscreen, + Cloud, + CloudCircle, + CloudDone, + CloudDownload, + CloudOff, + CloudQueue, + CloudUpload, + Code, + Comment, + CommentBank, + Commute, + CompareArrows, + CompassCalibration, + Compress, + ConnectWithoutContact, + Construction, + Contactless, + ContactMail, + ContactPage, + ContactPhone, + Contacts, + ContactSupport, + Copyright, + Coronavirus, + CreateNewFolder, + CreditCard, + Cut, + Dangerous, + Dashboard, + DashboardCustomize, + DateRange, + Deck, + Delete, + DeleteForever, + DeleteOutline, + DeliveryDining, + DepartureBoard, + Description, + DesignServices, + DesktopAccessDisabled, + DialerSip, + Dialpad, + DinnerDining, + Directions, + DirectionsBike, + DirectionsBoat, + DirectionsBus, + DirectionsCar, + DirectionsRailway, + DirectionsRun, + DirectionsSubway, + DirectionsTransit, + DirectionsWalk, + DisabledByDefault, + Dns, + Domain, + DomainDisabled, + DomainVerification, + Done, + DoneAll, + DoneOutline, + DonutLarge, + DonutSmall, + DoubleArrow, + DragIndicator, + DriveFileMove, + DriveFileMoveOutline, + DriveFileRenameOutline, + DriveFolderUpload, + DryCleaning, + DSOTruck, + Duo, + DynamicForm, + East, + Eco, + Edit, + EditAttributes, + EditLocation, + EditOff, + EditRoad, + Eject, + Elderly, + ElectricalServices, + ElectricBike, + ElectricCar, + ElectricMoped, + ElectricRickshaw, + ElectricScooter, + Email, + EmojiEmotions, + EmojiEvents, + EmojiFlags, + EmojiFoodBeverage, + EmojiNature, + EmojiObjects, + EmojiPeople, + EmojiSymbols, + EmojiTransportation, + Engineering, + Error, + ErrorOutline, + EuroSymbol, + Event, + EventSeat, + EvStation, + ExitToApp, + Expand, + ExpandLess, + ExpandMore, + Explore, + ExploreOff, + Extension, + Face, + Facebook, + FactCheck, + Fastfood, + Favorite, + FavoriteBorder, + Feedback, + Festival, + File, + FileDownload, + FileDownloadDone, + FilePresent, + FileUpload, + FilterAlt, + FilterListAlt, + FindInPage, + FindReplace, + Fingerprint, + Fireplace, + FirstPageAlt, + FirstPage, + FitScreen, + Flaky, + Flight, + FlightLand, + FlightTakeoff, + FlipToBack, + FlipToFront, + Folder, + FolderOpen, + FolderShared, + FollowTheSigns, + Forum, + ForwardToInbox, + Fullscreen, + FullscreenExit, + Gavel, + GetApp, + Gif, + Grade, + Grading, + GridView, + Group, + GroupAdd, + Groups, + GroupWork, + GTranslate, + Hail, + Handyman, + Hardware, + Help, + HelpCenter, + HelpOutline, + HighlightAlt, + HighlightOff, + History, + HistoryEdu, + HistoryToggleOff, + Home, + HomeFilled, + HomeRepairService, + HomeWork, + HorizontalSplit, + Hotel, + HourglassBottom, + HourglassDisabled, + HourglassEmpty, + HourglassFull, + HourglassTop, + Http, + Https, + Hvac, + Icecream, + IconSwerage, + IconSwerageAlt, + ImportantDevices, + ImportContacts, + ImportExport, + Info, + InfoOutline, + Input, + IntegrationInstructions, + InvertColors, + InvertColorsOff, + IosShare, + KingBed, + Label, + LabelImportant, + LabelImportantOutline, + LabelOff, + LabelOutline, + TranslateLanguage, + Language, + LastPageAlt, + LastPage, + Launch, + Layers, + LayersClear, + Leaderboard, + LegendToggle, + Lightbulb, + LightbulbOutline, + LineStyle, + LineWeight, + Liquor, + List, + ListAlt, + LiveHelp, + LocalActivity, + LocalAirport, + LocalAtm, + LocalBar, + LocalCafe, + LocalCarWash, + LocalConvenienceStore, + LocalDining, + LocalDrink, + LocalFireDepartment, + LocalFlorist, + LocalGasStation, + LocalGroceryStore, + LocalHospital, + LocalHotel, + LocalLaundryService, + LocalLibrary, + LocalMall, + LocalMovies, + LocalOffer, + LocalParking, + LocalPharmacy, + LocalPhone, + LocalPizza, + LocalPlay, + LocalPolice, + LocalPostOffice, + LocalPrintshop, + LocalSee, + LocalShipping, + LocalTaxi, + LocationCity, + LocationOff, + LocationOn, + LocationPin, + Lock, + LockClock, + LockOpen, + LockOutline, + Login, + Logout, + Loyalty, + Luggage, + LunchDining, + MailOutline, + Map, + MapsUgc, + MarkAsUnread, + MarkChatRead, + MarkChatUnread, + MarkEmailRead, + MarkEmailUnread, + MarkunreadMailbox, + Masks, + Maximize, + Mediation, + MedicalServices, + Menu, + MenuBook, + MenuOpen, + Message, + MilitaryTech, + Minimize, + MiscellaneousServices, + MobileScreenShare, + ModelTraining, + Money, + Mood, + MoodBad, + Moped, + MoreHoriz, + MoreTime, + MoreVert, + MultipleStop, + Museum, + MyLocation, + Nat, + Navigation, + NearMe, + NearMeDisabled, + NextPlan, + Nightlife, + NightlightRound, + NightsStay, + NoLuggage, + NoMeals, + NoResultsFoundIcon, + NoMealsOuline, + North, + NorthEast, + NorthWest, + NoSim, + NotAccessible, + NoteAdd, + NotificationImportant, + Notifications, + NotificationsActive, + NotificationsNone, + NotificationsOff, + NotificationsPaused, + NotListedLocation, + NoTransfer, + NotStarted, + TorchNoun, + OfflineBolt, + OfflinePin, + OfflineShare, + OnlinePrediction, + Opacity, + OpenInBrowser, + OpenInFull, + OpenInNew, + OpenWith, + Outbond, + Outbox, + OutdoorGrill, + OutgoingMail, + Outlet, + Pages, + Pageview, + PanTool, + Park, + PartyMode, + PausePresentation, + Payment, + Payments, + PedalBike, + Pending, + PendingActions, + People, + PeopleAlt, + PeopleOutline, + PermCameraMic, + PermContactCalendar, + PermDataSetting, + PermDeviceInformation, + PermIdentity, + PermMedia, + PermPhoneMsg, + PermScanWifi, + Person, + PersonAdd, + PersonAddAlt, + PersonAddSecondary, + PersonAddDisabled, + PersonOutline, + PersonPin, + PersonPinCircle, + PersonRemove, + PersonRemoveAlt, + PersonSearch, + PestControl, + PestControlRodent, + Pets, + Phone, + PhoneDisabled, + PhoneEnabled, + PhonelinkErase, + PhonelinkLock, + PhonelinkRing, + PhonelinkSetup, + PictureInPicture, + PictureInPictureAlt, + PinDrop, + PivotTableChart, + Place, + Plagiarism, + PlayForWork, + Plumbing, + PlusOne, + Poll, + Polymer, + Population, + PortableWifiOff, + PowerSettingsNew, + PregnantWoman, + PresentToAll, + Preview, + Print, + PrintDisabled, + PrivacyTip, + Psychology, + Public, + PublicOff, + PublishedWithChanges, + QrCode, + QrCodeScanner, + QueryBuilder, + QuestionAnswer, + Quickreply, + RailwayAlert, + RamenDining, + RateReview, + ReadMore, + Receipt, + Recommend, + RecordVoiceOver, + Redeem, + ReduceCapacity, + Refresh, + RemoveDone, + RemoveModerator, + RemoveShoppingCart, + Reorder, + ReportProblem, + RequestPage, + RequestQuote, + Restaurant, + RestaurantMenu, + Restore, + RestoreFromTrash, + RestorePage, + RingVolume, + Room, + RoundedCorner, + Rowing, + RssFeed, + Rtt, + Rule, + RuleFolder, + RunCircle, + Sanitizer, + Satellite, + SavedSearch, + Schedule, + ScheduleSend, + School, + Science, + ScreenShare, + Search, + SearchOff, + Segment, + SelfImprovement, + SendAndArchive, + SentimentDissatisfied, + SentimentNeutral, + SentimentSatisfied, + SentimentSatisfiedAlt, + SentimentVeryDissatisfied, + SentimentVerySatisfied, + SetMeal, + Settings, + SettingsApplications, + SettingsBackupRestore, + SettingsBluetooth, + SettingsBrightness, + SettingsCell, + SettingsEthernet, + SettingsInputAntenna, + SettingsInputComponent, + SettingsInputComposite, + SettingsInputHdmi, + SettingsInputVideo, + SettingsOverscan, + SettingsPhone, + SettingsPower, + SettingsRemote, + SettingsVoice, + Share, + Shop, + ShoppingBag, + ShoppingBasket, + ShoppingCart, + ShopAlt, + Sick, + SingleBed, + SmartButton, + SnippetFolder, + Source, + South, + SouthEast, + SouthWest, + SpeakerNotes, + SpeakerNotesOff, + SpeakerPhone, + SpellCheck, + Sports, + SportsBaseball, + SportsBasketball, + SportsCricket, + SportsEsports, + SportsFootball, + SportsGolf, + SportsHandball, + SportsHockey, + SportsKabaddi, + SportsMma, + SportsMotorsports, + SportsRugby, + SportsSoccer, + SportsTennis, + SportsVolleyball, + StarRate, + Stars, + StayCurrentLandscape, + StayCurrentPortrait, + StayPrimaryLandscape, + StayPrimaryPortrait, + StickyNotesSecondary, + ScreenShareStop, + Store, + StoreMallDirectory, + StreetView, + SubdirectoryArrowLeft, + SubdirectoryArrowRight, + Subject, + SubtitlesOff, + Subway, + SupervisedUserCircle, + SupervisorAccount, + Support, + SwapCalls, + SwapHorizontal, + SwapHorizontalCircle, + SwapVertical, + SwapVerticalCircle, + Swipe, + SwitchAccount, + SwitchLeft, + SwitchRight, + SyncAlt, + SystemUpdateAlt, + Tab, + TableView, + TabUnselected, + TakeOutDining, + TaxiAlert, + Terrain, + TextRotateUp, + TextRotateVertical, + TextRotationAngleDown, + TextRotationAngleUp, + TextRotationDown, + TextRotationNone, + SMSText, + TextSnippet, + TheaterComedy, + Theaters, + ThumbDown, + ThumbDownAlt, + ThumbDownOffAlt, + ThumbsUpDown, + ThumbUp, + ThumbUpAlt, + ThumbUpOffAlt, + Timeline, + Toc, + Today, + Toll, + Topic, + Torch, + TouchApp, + Tour, + TrackChanges, + Traffic, + Train, + Tram, + TransferWithinStation, + TransitEnterExit, + Translate, + TrendingDown, + TrendingFlat, + TrendingUp, + TripOrigin, + TurnedIn, + TurnedInNot, + TwoWheeler, + UnfoldLess, + UnfoldMore, + Unpublished, + Unsubscribe, + Update, + UpdateExpense, + UpdateExpenseSecondary, + Upgrade, + UploadFile, + Verified, + VerifiedUser, + VerticalSplit, + ViewAgenda, + ViewArray, + ViewCarousel, + ViewColumn, + ViewDay, + ViewHeadline, + ViewInAr, + ViewList, + ViewModule, + ViewQuilt, + ViewSidebar, + ViewStream, + ViewWeek, + Visibility, + VisibilityOff, + Voicemail, + VoiceOverOff, + VolunteerActivism, + VpnKey, + Warning, + WatchLater, + WaterfallChart, + West, + Whatsapp, + Whatshot, + WifiCalling, + WifiProtectedSetup, + WineBar, + Work, + WorkOff, + WorkOutline, + WorkspacesFilled, + WorkspacesOutline, + WrongLocation, + Wysiwyg, + YoutubeSearchedFor, + ZoomIn, + ZoomOut, + ZoomOutMap, + } from "@egovernments/digit-ui-svg-components"; + + + + export const SVG={ + Rotation3D, + SixFtApart, + Rotate360, + Accessibility, + AccessibilityNew, + Accessible, + AccessibleForward, + AccountBalance, + AccountBalanceWallet, + AccountBox, + AccountCircle, + AddAlert, + AddBusiness, + AddChart, + AddExpense, + AddExpenseTwo, + AddIcCall, + AddLocation, + AddLocationAlt, + AddModerator, + AddRoad, + AddShoppingCart, + AddTask, + AddToDrive, + AdminPanelSettings, + Agriculture, + Alarm, + AlarmAdd, + AlarmOff, + AlarmOn, + AllInbox, + AllOut, + AlternateEmail, + AltRoute, + Analytics, + Anchor, + Android, + Announcement, + Api, + AppBlocking, + AppRegistration, + Approval, + Apps, + AppSettingsAlt, + Architecture, + ArrowBack, + ArrowBackIos, + ArrowCircleDown, + ArrowCircleUp, + ArrowDownward, + ArrowDropDown, + ArrowDropDownCircle, + ArrowDropUp, + ArrowForward, + ArrowForwardIos, + ArrowForwardIosAlt, + ArrowLeft, + ArrowRight, + ArrowRightAlt, + ArrowUpward, + Article, + AspectRatio, + Assessment, + Assignment, + AssignmentInd, + AssignmentLate, + AssignmentReturn, + AssignmentReturned, + AssignmentTurnedIn, + AssistantDirection, + AssistantNavigation, + Atm, + AttachEmail, + Attachment, + Attractions, + AutoDelete, + AutoRenew, + Backup, + BackupTable, + Badge, + BakeryDining, + BatchPrediction, + BeenHere, + BikeScooter, + Book, + Bookmark, + BookmarkBorder, + Bookmarks, + BookOnline, + BreakfastDining, + BrunchDining, + BugReport, + Build, + BuildCircle, + BusAlert, + Business, + Cached, + Cake, + CalendarToday, + CalendarViewDay, + Call, + CallEnd, + CallMade, + CallMerge, + CallMissed, + CallMissedOutgoing, + CallReceived, + CallSplit, + CameraEnhance, + Campaign, + Cancel, + CancelPresentation, + CancelScheduleSend, + CardGiftcard, + CardMembership, + CardTravel, + CarRental, + CarRepair, + Category, + Celebration, + CellWifi, + ChangeHistory, + Chat, + ChatBubble, + ChatBubbleOutline, + Check, + CheckCircle, + CheckCircleOutline, + ChevronLeft, + ChevronRight, + ChromeReaderMode, + CircleNotifications, + Class, + CleanHands, + CleaningServices, + ClearAll, + Clock, + Close, + CloseFullscreen, + Cloud, + CloudCircle, + CloudDone, + CloudDownload, + CloudOff, + CloudQueue, + CloudUpload, + Code, + Comment, + CommentBank, + Commute, + CompareArrows, + CompassCalibration, + Compress, + ConnectWithoutContact, + Construction, + Contactless, + ContactMail, + ContactPage, + ContactPhone, + Contacts, + ContactSupport, + Copyright, + Coronavirus, + CreateNewFolder, + CreditCard, + Cut, + Dangerous, + Dashboard, + DashboardCustomize, + DateRange, + Deck, + Delete, + DeleteForever, + DeleteOutline, + DeliveryDining, + DepartureBoard, + Description, + DesignServices, + DesktopAccessDisabled, + DialerSip, + Dialpad, + DinnerDining, + Directions, + DirectionsBike, + DirectionsBoat, + DirectionsBus, + DirectionsCar, + DirectionsRailway, + DirectionsRun, + DirectionsSubway, + DirectionsTransit, + DirectionsWalk, + DisabledByDefault, + Dns, + Domain, + DomainDisabled, + DomainVerification, + Done, + DoneAll, + DoneOutline, + DonutLarge, + DonutSmall, + DoubleArrow, + DragIndicator, + DriveFileMove, + DriveFileMoveOutline, + DriveFileRenameOutline, + DriveFolderUpload, + DryCleaning, + DSOTruck, + Duo, + DynamicForm, + East, + Eco, + Edit, + EditAttributes, + EditLocation, + EditOff, + EditRoad, + Eject, + Elderly, + ElectricalServices, + ElectricBike, + ElectricCar, + ElectricMoped, + ElectricRickshaw, + ElectricScooter, + Email, + EmojiEmotions, + EmojiEvents, + EmojiFlags, + EmojiFoodBeverage, + EmojiNature, + EmojiObjects, + EmojiPeople, + EmojiSymbols, + EmojiTransportation, + Engineering, + Error, + ErrorOutline, + EuroSymbol, + Event, + EventSeat, + EvStation, + ExitToApp, + Expand, + ExpandLess, + ExpandMore, + Explore, + ExploreOff, + Extension, + Face, + Facebook, + FactCheck, + Fastfood, + Favorite, + FavoriteBorder, + Feedback, + Festival, + File, + FileDownload, + FileDownloadDone, + FilePresent, + FileUpload, + FilterAlt, + FilterListAlt, + FindInPage, + FindReplace, + Fingerprint, + Fireplace, + FirstPageAlt, + FirstPage, + FitScreen, + Flaky, + Flight, + FlightLand, + FlightTakeoff, + FlipToBack, + FlipToFront, + Folder, + FolderOpen, + FolderShared, + FollowTheSigns, + Forum, + ForwardToInbox, + Fullscreen, + FullscreenExit, + Gavel, + GetApp, + Gif, + Grade, + Grading, + GridView, + Group, + GroupAdd, + Groups, + GroupWork, + GTranslate, + Hail, + Handyman, + Hardware, + Help, + HelpCenter, + HelpOutline, + HighlightAlt, + HighlightOff, + History, + HistoryEdu, + HistoryToggleOff, + Home, + HomeFilled, + HomeRepairService, + HomeWork, + HorizontalSplit, + Hotel, + HourglassBottom, + HourglassDisabled, + HourglassEmpty, + HourglassFull, + HourglassTop, + Http, + Https, + Hvac, + Icecream, + IconSwerage, + IconSwerageAlt, + ImportantDevices, + ImportContacts, + ImportExport, + Info, + InfoOutline, + Input, + IntegrationInstructions, + InvertColors, + InvertColorsOff, + IosShare, + KingBed, + Label, + LabelImportant, + LabelImportantOutline, + LabelOff, + LabelOutline, + TranslateLanguage, + Language, + LastPageAlt, + LastPage, + Launch, + Layers, + LayersClear, + Leaderboard, + LegendToggle, + Lightbulb, + LightbulbOutline, + LineStyle, + LineWeight, + Liquor, + List, + ListAlt, + LiveHelp, + LocalActivity, + LocalAirport, + LocalAtm, + LocalBar, + LocalCafe, + LocalCarWash, + LocalConvenienceStore, + LocalDining, + LocalDrink, + LocalFireDepartment, + LocalFlorist, + LocalGasStation, + LocalGroceryStore, + LocalHospital, + LocalHotel, + LocalLaundryService, + LocalLibrary, + LocalMall, + LocalMovies, + LocalOffer, + LocalParking, + LocalPharmacy, + LocalPhone, + LocalPizza, + LocalPlay, + LocalPolice, + LocalPostOffice, + LocalPrintshop, + LocalSee, + LocalShipping, + LocalTaxi, + LocationCity, + LocationOff, + LocationOn, + LocationPin, + Lock, + LockClock, + LockOpen, + LockOutline, + Login, + Logout, + Loyalty, + Luggage, + LunchDining, + MailOutline, + Map, + MapsUgc, + MarkAsUnread, + MarkChatRead, + MarkChatUnread, + MarkEmailRead, + MarkEmailUnread, + MarkunreadMailbox, + Masks, + Maximize, + Mediation, + MedicalServices, + Menu, + MenuBook, + MenuOpen, + Message, + MilitaryTech, + Minimize, + MiscellaneousServices, + MobileScreenShare, + ModelTraining, + Money, + Mood, + MoodBad, + Moped, + MoreHoriz, + MoreTime, + MoreVert, + MultipleStop, + Museum, + MyLocation, + Nat, + Navigation, + NearMe, + NearMeDisabled, + NextPlan, + Nightlife, + NightlightRound, + NightsStay, + NoLuggage, + NoMeals, + NoMealsOuline, + NoResultsFoundIcon, + North, + NorthEast, + NorthWest, + NoSim, + NotAccessible, + NoteAdd, + NotificationImportant, + Notifications, + NotificationsActive, + NotificationsNone, + NotificationsOff, + NotificationsPaused, + NotListedLocation, + NoTransfer, + NotStarted, + TorchNoun, + OfflineBolt, + OfflinePin, + OfflineShare, + OnlinePrediction, + Opacity, + OpenInBrowser, + OpenInFull, + OpenInNew, + OpenWith, + Outbond, + Outbox, + OutdoorGrill, + OutgoingMail, + Outlet, + Pages, + Pageview, + PanTool, + Park, + PartyMode, + PausePresentation, + Payment, + Payments, + PedalBike, + Pending, + PendingActions, + People, + PeopleAlt, + PeopleOutline, + PermCameraMic, + PermContactCalendar, + PermDataSetting, + PermDeviceInformation, + PermIdentity, + PermMedia, + PermPhoneMsg, + PermScanWifi, + Person, + PersonAdd, + PersonAddAlt, + PersonAddSecondary, + PersonAddDisabled, + PersonOutline, + PersonPin, + PersonPinCircle, + PersonRemove, + PersonRemoveAlt, + PersonSearch, + PestControl, + PestControlRodent, + Pets, + Phone, + PhoneDisabled, + PhoneEnabled, + PhonelinkErase, + PhonelinkLock, + PhonelinkRing, + PhonelinkSetup, + PictureInPicture, + PictureInPictureAlt, + PinDrop, + PivotTableChart, + Place, + Plagiarism, + PlayForWork, + Plumbing, + PlusOne, + Poll, + Polymer, + Population, + PortableWifiOff, + PowerSettingsNew, + PregnantWoman, + PresentToAll, + Preview, + Print, + PrintDisabled, + PrivacyTip, + Psychology, + Public, + PublicOff, + PublishedWithChanges, + QrCode, + QrCodeScanner, + QueryBuilder, + QuestionAnswer, + Quickreply, + RailwayAlert, + RamenDining, + RateReview, + ReadMore, + Receipt, + Recommend, + RecordVoiceOver, + Redeem, + ReduceCapacity, + Refresh, + RemoveDone, + RemoveModerator, + RemoveShoppingCart, + Reorder, + ReportProblem, + RequestPage, + RequestQuote, + Restaurant, + RestaurantMenu, + Restore, + RestoreFromTrash, + RestorePage, + RingVolume, + Room, + RoundedCorner, + Rowing, + RssFeed, + Rtt, + Rule, + RuleFolder, + RunCircle, + Sanitizer, + Satellite, + SavedSearch, + Schedule, + ScheduleSend, + School, + Science, + ScreenShare, + Search, + SearchOff, + Segment, + SelfImprovement, + SendAndArchive, + SentimentDissatisfied, + SentimentNeutral, + SentimentSatisfied, + SentimentSatisfiedAlt, + SentimentVeryDissatisfied, + SentimentVerySatisfied, + SetMeal, + Settings, + SettingsApplications, + SettingsBackupRestore, + SettingsBluetooth, + SettingsBrightness, + SettingsCell, + SettingsEthernet, + SettingsInputAntenna, + SettingsInputComponent, + SettingsInputComposite, + SettingsInputHdmi, + SettingsInputVideo, + SettingsOverscan, + SettingsPhone, + SettingsPower, + SettingsRemote, + SettingsVoice, + Share, + Shop, + ShoppingBag, + ShoppingBasket, + ShoppingCart, + ShopAlt, + Sick, + SingleBed, + SmartButton, + SnippetFolder, + Source, + South, + SouthEast, + SouthWest, + SpeakerNotes, + SpeakerNotesOff, + SpeakerPhone, + SpellCheck, + Sports, + SportsBaseball, + SportsBasketball, + SportsCricket, + SportsEsports, + SportsFootball, + SportsGolf, + SportsHandball, + SportsHockey, + SportsKabaddi, + SportsMma, + SportsMotorsports, + SportsRugby, + SportsSoccer, + SportsTennis, + SportsVolleyball, + StarRate, + Stars, + StayCurrentLandscape, + StayCurrentPortrait, + StayPrimaryLandscape, + StayPrimaryPortrait, + StickyNotesSecondary, + ScreenShareStop, + Store, + StoreMallDirectory, + StreetView, + SubdirectoryArrowLeft, + SubdirectoryArrowRight, + Subject, + SubtitlesOff, + Subway, + SupervisedUserCircle, + SupervisorAccount, + Support, + SwapCalls, + SwapHorizontal, + SwapHorizontalCircle, + SwapVertical, + SwapVerticalCircle, + Swipe, + SwitchAccount, + SwitchLeft, + SwitchRight, + SyncAlt, + SystemUpdateAlt, + Tab, + TableView, + TabUnselected, + TakeOutDining, + TaxiAlert, + Terrain, + TextRotateUp, + TextRotateVertical, + TextRotationAngleDown, + TextRotationAngleUp, + TextRotationDown, + TextRotationNone, + SMSText, + TextSnippet, + TheaterComedy, + Theaters, + ThumbDown, + ThumbDownAlt, + ThumbDownOffAlt, + ThumbsUpDown, + ThumbUp, + ThumbUpAlt, + ThumbUpOffAlt, + Timeline, + Toc, + Today, + Toll, + Topic, + Torch, + TouchApp, + Tour, + TrackChanges, + Traffic, + Train, + Tram, + TransferWithinStation, + TransitEnterExit, + Translate, + TrendingDown, + TrendingFlat, + TrendingUp, + TripOrigin, + TurnedIn, + TurnedInNot, + TwoWheeler, + UnfoldLess, + UnfoldMore, + Unpublished, + Unsubscribe, + Update, + UpdateExpense, + UpdateExpenseSecondary, + Upgrade, + UploadFile, + Verified, + VerifiedUser, + VerticalSplit, + ViewAgenda, + ViewArray, + ViewCarousel, + ViewColumn, + ViewDay, + ViewHeadline, + ViewInAr, + ViewList, + ViewModule, + ViewQuilt, + ViewSidebar, + ViewStream, + ViewWeek, + Visibility, + VisibilityOff, + Voicemail, + VoiceOverOff, + VolunteerActivism, + VpnKey, + Warning, + WatchLater, + WaterfallChart, + West, + Whatsapp, + Whatshot, + WifiCalling, + WifiProtectedSetup, + WineBar, + Work, + WorkOff, + WorkOutline, + WorkspacesFilled, + WorkspacesOutline, + WrongLocation, + Wysiwyg, + YoutubeSearchedFor, + ZoomIn, + ZoomOut, + ZoomOutMap, + } \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/SearchComponent.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/SearchComponent.js new file mode 100644 index 00000000000..1b10c02ab7b --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/SearchComponent.js @@ -0,0 +1,160 @@ +import React, { useContext, useEffect, useState } from "react"; +import { useForm } from "react-hook-form"; +import { useTranslation } from "react-i18next"; +import { InboxContext } from "../hoc/InboxSearchComposerContext"; +import RenderFormFields from "../molecules/RenderFormFields"; +import Header from "../atoms/Header"; +import LinkLabel from '../atoms/LinkLabel'; +import SubmitBar from "../atoms/SubmitBar"; +import Toast from "../atoms/Toast"; +import { FilterIcon, RefreshIcon } from "./svgindex"; + +const SearchComponent = ({ uiConfig, header = "", screenType = "search", fullConfig, data}) => { + const { t } = useTranslation(); + const { state, dispatch } = useContext(InboxContext) + const [showToast,setShowToast] = useState(null) + let updatedFields = []; + const {apiDetails} = fullConfig + + if (fullConfig?.postProcessResult){ + //conditions can be added while calling postprocess function to pass different params + Digit?.Customizations?.[apiDetails?.masterName]?.[apiDetails?.moduleName]?.postProcess(data, uiConfig) + } + + const { + register, + handleSubmit, + setValue, + getValues, + reset, + watch, + trigger, + control, + formState, + errors, + setError, + clearErrors, + unregister, + } = useForm({ + defaultValues: uiConfig?.defaultValues, + }); + const formData = watch(); + const checkKeyDown = (e) => { + const keyCode = e.keyCode ? e.keyCode : e.key ? e.key : e.which; + if (keyCode === 13) { + // e.preventDefault(); + } + }; + + useEffect(() => { + updatedFields = Object.values(formState?.dirtyFields) + }, [formState]) + + const onSubmit = (data) => { + + //here -> added a custom validator function, if required add in UICustomizations + const isAnyError = Digit?.Customizations?.[apiDetails?.masterName]?.[apiDetails?.moduleName]?.customValidationCheck ? Digit?.Customizations?.[apiDetails?.masterName]?.[apiDetails?.moduleName]?.customValidationCheck(data) : false + if(isAnyError) { + setShowToast(isAnyError) + setTimeout(closeToast,3000) + return + } + + if(updatedFields.length >= uiConfig?.minReqFields) { + // here based on screenType call respective dispatch fn + dispatch({ + type: uiConfig?.type === "filter" ? "filterForm" : "searchForm", + state: { + ...data + } + }) + } else { + setShowToast({ warning: true, label: t("ES_COMMON_MIN_SEARCH_CRITERIA_MSG") }) + setTimeout(closeToast, 3000); + } + } + + const clearSearch = () => { + reset(uiConfig?.defaultValues) + dispatch({ + type: "clearSearchForm", + state: { ...uiConfig?.defaultValues } + //need to pass form with empty strings + }) + dispatch({ + type:"clearTableForm" + }) + } + + const closeToast = () => { + setShowToast(null); + } + + const handleFilterRefresh = () => { + reset(uiConfig?.defaultValues) + dispatch({ + type: "clearFilterForm", + state: { ...uiConfig?.defaultValues } + //need to pass form with empty strings + }) + } + + const renderHeader = () => { + switch(uiConfig?.type) { + case "filter" : { + return ( +
+
+
{t(header)}
+
+
+ ) + } + default : { + return
{t(header)}
+ } + } + } + + return ( + +
+ {header && renderHeader()} +
checkKeyDown(e)}> +
+ {uiConfig?.showFormInstruction &&

{t(uiConfig?.showFormInstruction)}

} +
+ +
+ { uiConfig?.secondaryLabel && {t(uiConfig?.secondaryLabel)} } + { uiConfig?.primaryLabel && } +
+
+
+
+ { showToast && + } +
+
+ ) +} + +export default SearchComponent \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/SearchableDropdown.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/SearchableDropdown.js new file mode 100644 index 00000000000..935a1647ab0 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/SearchableDropdown.js @@ -0,0 +1,312 @@ +import PropTypes from "prop-types"; +import React, { useEffect, useRef, useState } from "react"; +import { ArrowDown, SearchIcon } from "./svgindex"; + +const TextField = (props) => { + const {value,setValue} = props + + useEffect(() => { + if (!props.keepNull) + if (props.selectedVal) + setValue(props.selectedVal) + else { setValue(""); props.setFilter("") } + else setValue(""); + }, [props.selectedVal, props.forceSet]); + + function inputChange(e) { + if (props.freeze) return; + + setValue(e.target.value); + props.setFilter(e.target.value); + } + + function broadcastToOpen() { + if (!props.disable) { + props.dropdownDisplay(true); + } + } + + function broadcastToClose() { + props.dropdownDisplay(false); + } + + /* Custom function to scroll and select in the dropdowns while using key up and down */ + const keyChange = (e) => { + if (e.key == "ArrowDown") { + props.setOptionIndex((state) => (state + 1 == props.addProps.length ? 0 : state + 1)); + if (props.addProps.currentIndex + 1 == props.addProps.length) { + e?.target?.parentElement?.parentElement?.children?.namedItem("jk-dropdown-unique")?.scrollTo?.(0, 0); + } else { + props?.addProps?.currentIndex > 2 && e?.target?.parentElement?.parentElement?.children?.namedItem("jk-dropdown-unique")?.scrollBy?.(0, 45); + } + e.preventDefault(); + } else if (e.key == "ArrowUp") { + props.setOptionIndex((state) => (state !== 0 ? state - 1 : props.addProps.length - 1)); + if (props.addProps.currentIndex == 0) { + e?.target?.parentElement?.parentElement?.children?.namedItem("jk-dropdown-unique")?.scrollTo?.(100000, 100000); + } else { + props?.addProps?.currentIndex > 2 && e?.target?.parentElement?.parentElement?.children?.namedItem("jk-dropdown-unique")?.scrollBy?.(0, -45); + } + e.preventDefault(); + } else if (e.key == "Enter") { + props.addProps.selectOption(props.addProps.currentIndex); + } + }; + + return ( + { + broadcastToClose(); + props?.onBlur?.(e); + if (props.selectedVal !== props.filterVal) { + setTimeout(() => { + props.setforceSet((val) => val + 1); + }, 1000); + } + }} + onKeyDown={keyChange} + readOnly={props.disable} + autoFocus={props.autoFocus} + placeholder={props.placeholder} + autoComplete={"off"} + style={props.style} + /> + ); +}; + +const translateDummy = (text) => { + return text; +}; + +const Dropdown = (props) => { + + const {tableRow,setTableRow} = props; + + const user_type = Digit.SessionStorage.get("userType"); + const [dropdownStatus, setDropdownStatus] = useState(false); + const [selectedOption, setSelectedOption] = useState(props.selected ? props.selected : null); + const [filterVal, setFilterVal] = useState(""); + const [forceSet, setforceSet] = useState(0); + const [optionIndex, setOptionIndex] = useState(-1); + const optionRef = useRef(null); + const hasCustomSelector = props.customSelector ? true : false; + const t = props.t || translateDummy; + + useEffect(() => { + setSelectedOption(props.selected); + }, [props.selected]); + + function dropdownSwitch() { + if (!props.disable) { + var current = dropdownStatus; + if (!current) { + document.addEventListener("mousedown", handleClick, false); + } + setDropdownStatus(!current); + props?.onBlur?.(); + } + } + + function handleClick(e) { + if (!optionRef.current || !optionRef.current.contains(e.target)) { + document.removeEventListener("mousedown", handleClick, false); + setDropdownStatus(false); + } + } + + function dropdownOn(val) { + const waitForOptions = () => setTimeout(() => setDropdownStatus(val), 500); + const timerId = waitForOptions(); + return () => { + clearTimeout(timerId); + }; + } + + function onSelect(val) { + + if (val !== selectedOption || props.allowMultiselect) { + props.select(val); + setSelectedOption(val); + setDropdownStatus(false); + + //here update the tableState + setTableRow((prevState) => { + //just for static screen purposes + const newObj = { + "name": "Name New", + "aadhar": val, + "acno": "1212-1212-1212", + "ifsc": "1313-1313-1331" + } + return [...prevState,newObj] + }) + } else { + setSelectedOption(val); + setforceSet(forceSet + 1); + + + } + } + + function setFilter(val) { + setFilterVal(val); + } + + let filteredOption = + (props.option && props.option?.filter((option) => t(option[props.optionKey])?.toUpperCase()?.indexOf(filterVal?.toUpperCase()) > -1)) || []; + function selectOption(ind) { + onSelect(filteredOption[ind]); + } + + if (props.isBPAREG && selectedOption) { + let isSelectedSameAsOptions = props.option?.filter((ob) => ob?.code === selectedOption?.code)?.length > 0; + if (!isSelectedSameAsOptions) setSelectedOption(null) + } + + return ( +
+ {hasCustomSelector && ( +
+ {props.customSelector} + {props.showArrow && } +
+ )} + {!hasCustomSelector && ( +
+ + {props.showSearchIcon ? null : } + {props.showSearchIcon ? : null} +
+ )} + {dropdownStatus ? ( + props.optionKey ? ( +
+ {filteredOption && + filteredOption.map((option, index) => { + return ( +
onSelect(option)} + > + {option.icon && {option.icon} } + {props.isPropertyAssess ?
{props.t ? props.t(option[props.optionKey]) : option[props.optionKey]}
: + {props.t ? props.t(option[props.optionKey]) : option[props.optionKey]}} +
+ ); + })} + {filteredOption && filteredOption.length === 0 && ( +
{ + + }}> + { {props.t ? props.t("CMN_NOOPTION") : "CMN_NOOPTION"}} +
+ )} +
+ ) : ( +
+ {props.option + ?.filter((option) => option?.toUpperCase().indexOf(filterVal?.toUpperCase()) > -1) + .map((option, index) => { + return ( +

onSelect(option)} + > + {option} +

+ ); + })} +
+ ) + ) : null} +
+ ); +}; + +Dropdown.propTypes = { + customSelector: PropTypes.any, + showArrow: PropTypes.bool, + selected: PropTypes.any, + style: PropTypes.object, + option: PropTypes.array, + optionKey: PropTypes.any, + select: PropTypes.any, + t: PropTypes.func, +}; + +Dropdown.defaultProps = { + customSelector: null, + showArrow: true, +}; + +export default Dropdown; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/SectionalDropdown.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/SectionalDropdown.js new file mode 100644 index 00000000000..726f8304dc9 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/SectionalDropdown.js @@ -0,0 +1,90 @@ +import React, { useEffect, useState } from "react"; +import { ArrowDown } from "./svgindex"; + +const TextField = (props) => { + const [value, setValue] = useState(props.selectedVal ? props.selectedVal : ""); + + useEffect(() => { + props.selectedVal ? setValue(props.selectedVal) : null; + }, [props.selectedVal]); + + function inputChange(e) { + setValue(e.target.value); + props.setFilter(e.target.value); + } + + return ; +}; + +const SectionalDropdown = (props) => { + const [dropdownStatus, setDropdownStatus] = useState(false); + const [selectedOption, setSelectedOption] = useState(props.selected ? props.selected : null); + const [filterVal, setFilterVal] = useState(""); + + useEffect(() => { + setSelectedOption(props.selected); + }, [props.selected]); + + function dropdownSwitch() { + var current = dropdownStatus; + setDropdownStatus(!current); + } + + function dropdownOn() { + setDropdownStatus(true); + } + + function onSelect(selectedOption) { + props.select(selectedOption); + setSelectedOption(selectedOption); + setDropdownStatus(false); + } + + function setFilter(val) { + setFilterVal(val); + } + + return ( +
+
+ + +
+ {dropdownStatus ? ( +
+ {props.menuData + .filter((subMenu) => subMenu.options.filter((option) => option[props.displayKey].toUpperCase().includes(filterVal.toUpperCase()))) + .map((subMenu, index) => { + return ( + +

{subMenu.heading}

+ {subMenu.options.map((option, index) => { + return ( +

onSelect(option)}> + {props.t ? props.t(option[props.displayKey]) : option[props.displayKey]} +

+ ); + })} +
+ ); + })} +
+ ) : null} +
+ ); +}; + +export default SectionalDropdown; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/StandaloneSearchBar.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/StandaloneSearchBar.js new file mode 100644 index 00000000000..b4700aa1858 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/StandaloneSearchBar.js @@ -0,0 +1,10 @@ +import React from "react" +import { SearchIconSvg } from "./svgindex" +const StandaloneSearchBar = ({placeholder}) => { + return
+ + +
+} + +export default StandaloneSearchBar \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/StatusTable.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/StatusTable.js new file mode 100644 index 00000000000..e83a23936e6 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/StatusTable.js @@ -0,0 +1,108 @@ +import React from "react"; +import { UnMaskComponent } from ".."; + +export const LastRow = (props) => { + return ( +
+

{props.label}

+

{props.text}

+
+ ); +}; + +export const Row = (props) => { + let value = props.text; + let valueStyle = props.textStyle || {}; + let labelStyle = props.labelStyle || {}; + if (Array.isArray(props.text)) { + value = props.text.map((val, index) => { + if (val?.className) { + return ( +

+ {val?.value} + {/* + Feature :: Privacy + privacy object set to the Mask Component + */} + {props?.privacy && ( + + + + )} +

+ ); + } + return ( +

+ {val} + {props?.privacy && ( + + {/* + Feature :: Privacy + privacy object set to the Mask Component + */} + + + )} +

+ ); + }); + } + // display: inline-flex; + // width: fit-content; + // margin-left: 10px; + // } + + return ( +
+

{props.label}{props?.isMandotary && '*'}

+
+ { + props?.isValueLink ? (

{value}

) :

{value}

+ } + {props?.privacy && ( + + + + )} + {props.caption &&
{props.caption}
} +
+ {props.actionButton ? ( +
+ {props.actionButton} +
+ ) : null} +
+ ); +}; + +export const MediaRow = (props) => { + return ( +
+

{props.label}

+ {props.children} +
+ ); +}; + +export const StatusTable = (props) => { + const employee = Digit.SessionStorage.get("user_type") === "employee" ? true : false; + if (props.dataObject) { + return ( +
+ {Object.keys(props.dataObject).map((name, index) => { + if (++index === Object.keys(props.dataObject).length) { + return ; + } + return ; + })} +
+ ); + } else { + return ( +
+ {props.children} +
+ ); + } +}; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/SubMenu.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/SubMenu.js new file mode 100644 index 00000000000..d74ff7573fc --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/SubMenu.js @@ -0,0 +1,105 @@ +import React, { useState } from "react"; +import { Link, useLocation } from "react-router-dom"; +import { + PTIcon, + OBPSIcon, + PropertyHouse, + CaseIcon, + PGRIcon, + FSMIcon, + WSICon, + MCollectIcon, + CollectionIcon, + HomeIcon, + ComplaintIcon, + PersonIcon, + DocumentIconSolid, + DropIcon, + CollectionsBookmarIcons, + FinanceChartIcon, +} from "./svgindex"; + +const IconsObject = { + CommonPTIcon: , + OBPSIcon: , + propertyIcon: , + TLIcon: , + PGRIcon: , + FSMIcon: , + WSIcon: , + MCollectIcon: , + BillsIcon: , + home: , + announcement: , + business: , + store: , + assignment: , + receipt: , + "business-center": , + description: , + "water-tap": , + "collections-bookmark": , + "insert-chart": , + edcr: , + collections: , +}; +const SubMenu = ({ item, t, isEmployee }) => { + const [subnav, setSubnav] = useState(false); + const location = useLocation(); + const { pathname } = location; + const showSubnav = () => setSubnav(!subnav); + + const leftIconCitizenArray = item.icon; + const leftIconCitizen = IconsObject[leftIconCitizenArray] || IconsObject.BillsIcon; + + const leftIconEmployeeItems = item?.icon?.split?.(":")?.[1] || ""; + + const leftIconEmployee = IconsObject[leftIconEmployeeItems] || IconsObject.collections; + + return ( + +
+
+
+ {isEmployee ? leftIconEmployee : leftIconCitizen} + {isEmployee ? item.moduleName : t(Digit.Utils.locale.getTransformedLocale(`ACTION_TEST_${item.moduleName}`))} +
+
{item.links && subnav}
+
+
+ + {subnav && + item.links + .sort((a, b) => a.orderNumber - b.orderNumber) + .map((item, index) => { + if (item.navigationURL.indexOf(`/${window?.contextPath}`) === -1) { + const getOrigin = window.location.origin; + return ( + +
+ {item.label || item.displayName} +
+
+ ); + } + return ( + +
+ {item.label || item.displayName} +
+ + ); + })} +
+ ); +}; + +export default SubMenu; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/SubmitBar.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/SubmitBar.js new file mode 100644 index 00000000000..bef3395df49 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/SubmitBar.js @@ -0,0 +1,41 @@ +import React, { forwardRef } from "react"; +import PropTypes from "prop-types"; + +const SubmitBar = forwardRef((props, ref) => { + return ( + + ); +}); + +SubmitBar.propTypes = { + /** + * Is it a normal button or submit button? + */ + submit: PropTypes.any, + /** + * style for the button + */ + style: PropTypes.object, + /** + * SubmitButton contents + */ + label: PropTypes.string, + /** + * Optional click handler + */ + onSubmit: PropTypes.func, +}; + +SubmitBar.defaultProps = {}; + +export default SubmitBar; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/SubmitBar.stories.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/SubmitBar.stories.js new file mode 100644 index 00000000000..ef9f73c0a43 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/SubmitBar.stories.js @@ -0,0 +1,28 @@ +import React from "react"; + +import SubmitBar from "./SubmitBar"; + +export default { + title: "Atom/SubmitBar", + component: SubmitBar, +}; + +const Template = (args) => ; + +export const SubmitButton = Template.bind({}); + +SubmitButton.args = { + submit: true, + style: {}, + label: "Submit", + onSubmit: undefined, +}; + +export const NormalButton = Template.bind({}); + +NormalButton.args = { + submit: false, + style: {}, + label: "Click me", + onSubmit: undefined, +}; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/TLCaption.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/TLCaption.js new file mode 100644 index 00000000000..e13fe31dff5 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/TLCaption.js @@ -0,0 +1,40 @@ +import React from "react"; +import { useTranslation } from "react-i18next"; +import Reason from "./Reason"; +import TelePhone from "./TelePhone" +import DisplayPhotos from "./DisplayPhotos"; +import UnMaskComponent from "./UnMaskComponent"; + + + +const TLCaption = ({ data, OpenImage, privacy = {} }) => { + + const { t } = useTranslation(); + return ( +
+ {data.date &&

{data.date}

} +

{data.name}

+ {data.mobileNumber && + +

    

+ +
} + {data.source &&

{t("ES_APPLICATION_DETAILS_APPLICATION_CHANNEL_" + data.source.toUpperCase())}

} + {data.comment && } + {data.additionalComment && } + {data?.wfComment.length>0 ?
{data?.wfComment?.map(e => +
+

{t("WF_COMMON_COMMENTS")}

+

{e}

+
+ )}
: null} + + {data?.thumbnailsToShow?.thumbs?.length > 0 ?
+

{t("CS_COMMON_ATTACHMENTS")}

+ { OpenImage(src, index, data?.thumbnailsToShow) }} /> +
: null} +
+ ); +}; + +export default TLCaption; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Table.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Table.js new file mode 100644 index 00000000000..bc335c1482c --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/Table.js @@ -0,0 +1,274 @@ +import React, { useEffect, useState, useRef, forwardRef } from "react"; +import { useGlobalFilter, usePagination, useRowSelect, useSortBy, useTable } from "react-table"; +import { ArrowBack, ArrowForward, ArrowToFirst, ArrowToLast, SortDown, SortUp, DoubleTickIcon } from "./svgindex"; +import CheckBox from "./CheckBox"; +import ActionBar from "./ActionBar"; +import SubmitBar from "./SubmitBar"; +import Toast from "./Toast"; + +const noop = () => {}; + +const IndeterminateCheckbox = forwardRef( + ({ indeterminate, ...rest }, ref) => { + const defaultRef = useRef() + const resolvedRef = ref || defaultRef + + useEffect(() => { + resolvedRef.current.indeterminate = indeterminate + }, [resolvedRef, indeterminate]) + + return ( + + + + ) + } +) +const getNoColumnBorder=(noColumnBorder)=>noColumnBorder?({ + cellspacing:"0" ,cellpadding:"0" +}):null; +const Table = ({ + className = "table", + t, + data, + columns, + getCellProps, + currentPage = 0, + pageSizeLimit = 10, + disableSort = true, + autoSort = false, + initSortId = "", + onSearch = false, + manualPagination = true, + totalRecords, + onNextPage, + onPrevPage, + globalSearch, + onSort = noop, + onPageSizeChange, + onLastPage, + onFirstPage, + isPaginationRequired = true, + sortParams = [], + showAutoSerialNo = false, + customTableWrapperClassName = "", + styles = {}, + tableTopComponent, + tableRef, + isReportTable = false, + showCheckBox = false, + actionLabel = 'CS_COMMON_DOWNLOAD', + tableSelectionHandler = () => {}, + onClickRow= ()=>{}, + rowClassName = "", + noColumnBorder=false +}) => { + const { + getTableProps, + getTableBodyProps, + headerGroups, + rows, + prepareRow, + page, + canPreviousPage, + canNextPage, + pageOptions, + pageCount, + gotoPage, + nextPage, + previousPage, + setPageSize, + setGlobalFilter, + state: { pageIndex, pageSize, sortBy, globalFilter, selectedRowIds }, + } = useTable( + { + columns, + data, + initialState: { pageIndex: currentPage, pageSize: pageSizeLimit, sortBy: autoSort ? [{ id: initSortId, desc: false }] : sortParams }, + pageCount: totalRecords > 0 ? Math.ceil(totalRecords / pageSizeLimit) : -1, + manualPagination: manualPagination, + disableMultiSort: false, + disableSortBy: disableSort, + manualSortBy: autoSort ? false : true, + autoResetPage: false, + autoResetSortBy: false, + disableSortRemove: true, + disableGlobalFilter: onSearch === false ? true : false, + globalFilter: globalSearch || "text", + useControlledState: (state) => { + return React.useMemo(() => ({ + ...state, + pageIndex: manualPagination ? currentPage : state.pageIndex, + })); + }, + }, + useGlobalFilter, + useSortBy, + usePagination, + useRowSelect, + hooks => { + if(showCheckBox) { + hooks.visibleColumns.push(columns => [ + { + id: 'selection', + Header: ({ getToggleAllPageRowsSelectedProps }) => ( +
+ +
+ ), + Cell: ({ row }) => ( +
+ +
+ ), + }, + ...columns, + ]) + } + } + ); + let isTotalColSpanRendered = false; + const [toast, setToast] = useState({show : false, label : "", error : false}); + + useEffect(() => { + onSort(sortBy); + }, [onSort, sortBy]); + + + useEffect(() => setGlobalFilter(onSearch), [onSearch, setGlobalFilter,data]); + + const handleSelection = async () => { + const selectedRows = rows?.filter(ele => Object.keys(selectedRowIds)?.includes(ele?.id)) + const response = await tableSelectionHandler(selectedRows,t) + setToast({show: true, label: t(response?.label), error: !response?.isSuccess}) + } + + const handleToastClose = () => { + setToast({show : false, label : "", error : false}) + } + + useEffect(()=>{ + if(toast?.show) { + setTimeout(()=>{ + handleToastClose(); + },3000); + } + },[toast?.show]) + + //note -> adding data prop in dependency array to trigger filter whenever state of the table changes + //use case -> without this if we enter string to search and then click on it's attendence checkbox or skill selector for that matter then the global filtering resets and whole table is shown + return ( + + + {tableTopComponent ? tableTopComponent : null} + + + {headerGroups.map((headerGroup) => ( + + {showAutoSerialNo && ( + + )} + {headerGroup.headers.map((column) => ( + + ))} + + ))} + + + {page.map((row, i) => { + // rows.slice(0, 10).map((row, i) => { + prepareRow(row); + return ( + onClickRow(row)} className={rowClassName}> + {showAutoSerialNo && } + {row.cells.map((cell) => { + return ( + + ); + })} + + ); + })} + +
+ {showAutoSerialNo && typeof showAutoSerialNo == "string" ? t(showAutoSerialNo) : t("TB_SNO")} + + {column.render("Header")} + {column.isSorted ? column.isSortedDesc ? : : ""} +
{i + 1} + {cell.attachment_link ? ( + + {cell.render("Cell")} + + ) : ( + {cell.render("Cell")} + )} +
+
+ {isPaginationRequired && ( +
+ {`${t("CS_COMMON_ROWS_PER_PAGE")} :`} + + + + {pageIndex * pageSize + 1} + {"-"} + {manualPagination + ? (currentPage + 1) * pageSizeLimit > totalRecords + ? totalRecords + : (currentPage + 1) * pageSizeLimit + : pageIndex * pageSize + page?.length}{" "} + {/* {(pageIndex + 1) * pageSizeLimit > rows.length ? rows.length : (pageIndex + 1) * pageSizeLimit}{" "} */} + {totalRecords ? `of ${manualPagination ? totalRecords : rows.length}` : ""} + {" "} + + {/* to go to first and last page we need to do a manual pagination , it can be updated later*/} + {!manualPagination && pageIndex != 0 && gotoPage(0)} className={"cp"} />} + {canPreviousPage && manualPagination && onFirstPage && manualPagination && onFirstPage()} className={"cp"} />} + {canPreviousPage && (manualPagination ? onPrevPage() : previousPage())} className={"cp"} />} + {canNextPage && (manualPagination ? onNextPage() : nextPage())} className={"cp"} />} + {!manualPagination && pageIndex != pageCount - 1 && gotoPage(pageCount - 1)} className={"cp"} />} + {rows.length == pageSizeLimit && canNextPage && manualPagination && onLastPage && ( + manualPagination && onLastPage()} className={"cp"} /> + )} + {/* to go to first and last page we need to do a manual pagination , it can be updated later*/} +
+ )} + { Object.keys(selectedRowIds)?.length > 0 && ( + + + +

{`${Object.keys(selectedRowIds)?.length} ${t("COMMON_SELECTED")}`}

+
+ +
)} + {toast?.show && } +
+ ); +}; + +export default Table; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/TelePhone.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/TelePhone.js new file mode 100644 index 00000000000..3b7e1860b6b --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/TelePhone.js @@ -0,0 +1,27 @@ +import React from "react"; +import PropTypes from "prop-types"; +import { Phone } from "./svgindex"; + +const TelePhone = ({ mobile, text }) => ( + + {text} +
+ +
+
+); + +TelePhone.propTypes = { + mobile: PropTypes.any, + text: PropTypes.string, +}; + +TelePhone.defaultProps = { + mobile: "", + text: "", +}; + +export default TelePhone; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/TelePhone.stories.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/TelePhone.stories.js new file mode 100644 index 00000000000..69764f33bac --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/TelePhone.stories.js @@ -0,0 +1,16 @@ +import React from "react"; + +import TelePhone from "./TelePhone"; + +export default { + title: "Atom/TelePhone", + component: TelePhone, +}; + +const Template = (args) => ; + +export const Default = Template.bind({}); +Default.args = { + mobile: "9292929929", + text: "Joe Doe", +}; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/TextArea.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/TextArea.js new file mode 100644 index 00000000000..957dbb0c40f --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/TextArea.js @@ -0,0 +1,45 @@ +import React from "react"; +import PropTypes from "prop-types"; + +const TextArea = (props) => { + const user_type = Digit.SessionStorage.get("userType"); + + return ( + + + {

{props.hintText}

} +
+ ); +}; + +TextArea.propTypes = { + userType: PropTypes.string, + name: PropTypes.string.isRequired, + ref: PropTypes.func, + value: PropTypes.string, + onChange: PropTypes.func, + id: PropTypes.string, +}; + +TextArea.defaultProps = { + ref: undefined, + onChange: undefined, +}; + +export default TextArea; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/TextArea.stories.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/TextArea.stories.js new file mode 100644 index 00000000000..afe730836cd --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/TextArea.stories.js @@ -0,0 +1,18 @@ +import React from "react"; + +import TextArea from "./TextArea"; + +export default { + title: "Atom/TextArea", + component: TextArea, +}; + +const Template = (args) => + + ); + }); + + return ( +
+ + {!childrenAtTheBottom && children} + {inputs} + {forcedError && !showErrorBelowChildren && {t(forcedError)}} + {childrenAtTheBottom && children} + {forcedError && showErrorBelowChildren && {t(forcedError)}} + +
+ ); +}; + +FormStep.propTypes = { + config: PropTypes.shape({}), + onSelect: PropTypes.func, + onSkip: PropTypes.func, + onAdd: PropTypes.func, + t: PropTypes.func, +}; + +FormStep.defaultProps = { + config: {}, + onSelect: undefined, + onSkip: undefined, + onAdd: undefined, + t: (value) => value, +}; + +export default FormStep; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/FormStep.stories.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/FormStep.stories.js new file mode 100644 index 00000000000..33618f20523 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/FormStep.stories.js @@ -0,0 +1,18 @@ +import React from "react"; + +import FormStep from "./FormStep"; + +export default { + title: "Molecule/FormStep", + component: FormStep, +}; + +const Template = (args) => ; + +export const Default = Template.bind({}); + +Default.args = { + config: { + inputs: [{ type: "text", name: "firstName", label: "First Name", error: "This field is required", validation: null }], + }, +}; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/InputCard.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/InputCard.js new file mode 100644 index 00000000000..46002483135 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/InputCard.js @@ -0,0 +1,60 @@ +import React from "react"; +import PropTypes from "prop-types"; + +import Card from "../atoms/Card"; +import CardHeader from "../atoms/CardHeader"; +import CardText from "../atoms/CardText"; +import SubmitBar from "../atoms/SubmitBar"; +import LinkButton from "../atoms/LinkButton"; +import CardCaption from "../atoms/CardCaption"; +import TextInput from "../atoms/TextInput"; + +const InputCard = ({ + t, + children, + texts = {}, + submit = false, + inputs = [], + inputRef, + onNext, + onSkip, + isDisable, + onAdd, + isMultipleAllow = false, + cardStyle = {}, +}) => { + const isMobile = window.Digit.Utils.browser.isMobile(); + // TODO: inputs handle + return ( + + {texts.headerCaption && {t(texts.headerCaption)}} + {texts?.header && {t(texts.header)}} + {texts?.cardText && {t(texts.cardText)}} + {children} + {texts.submitBarLabel ? : null} + {texts.skipLabel ? {t(texts.skipLabel)} : null} + {texts.skipText ? : null} + {isMultipleAllow && texts.addMultipleText ? : null} + + ); +}; + +InputCard.propTypes = { + text: PropTypes.object, + submit: PropTypes.bool, + onNext: PropTypes.func, + onSkip: PropTypes.func, + onAdd: PropTypes.func, + t: PropTypes.func, +}; + +InputCard.defaultProps = { + texts: {}, + submit: false, + onNext: undefined, + onSkip: undefined, + onAdd: undefined, + t: (value) => value, +}; + +export default InputCard; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/InputCard.stories.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/InputCard.stories.js new file mode 100644 index 00000000000..0b94f76fda2 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/InputCard.stories.js @@ -0,0 +1,22 @@ +import React from "react"; + +import InputCard from "./InputCard"; + +export default { + title: "Molecule/InputCard", + component: InputCard, +}; + +const Template = (args) => ; + +export const Default = Template.bind({}); + +Default.args = { + texts: { + headerCaption: "Header Caption", + header: "Header", + cardText: "Card Text", + nextText: "Next", + skipText: "Skip", + }, +}; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/Localities.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/Localities.js new file mode 100644 index 00000000000..68eb85aa176 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/Localities.js @@ -0,0 +1,29 @@ +import React from "react"; +import { Loader } from "../atoms/Loader"; +import Dropdown from "../atoms/Dropdown"; +import { useTranslation } from "react-i18next"; + +const Localities = ({ selectLocality, tenantId, boundaryType, keepNull, selected, optionCardStyles, style, disable, disableLoader, sortFn }) => { + const { t } = useTranslation(); + + const { data: tenantlocalties, isLoading } = Digit.Hooks.useBoundaryLocalities(tenantId, boundaryType, { enabled: !disable }, t); + if (isLoading && !disableLoader) { + return ; + } + + return ( + + ); + //

ABCD

+}; + +export default Localities; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/LocationDropdownWrapper.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/LocationDropdownWrapper.js new file mode 100644 index 00000000000..585702856d9 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/LocationDropdownWrapper.js @@ -0,0 +1,97 @@ +import React,{Fragment,useState,useEffect} from 'react' +import MultiSelectDropdown from '../atoms/MultiSelectDropdown' +import Dropdown from '../atoms/Dropdown' +import { Loader } from '../atoms/Loader' +import { useTranslation } from 'react-i18next' +const LocationDropdownWrapper = ({populators,formData,props,inputRef,errors,setValue}) => { + //based on type (ward/locality) we will render dropdowns respectively + //here we will render two types of dropdown based on allowMultiSelect boolean + // for singleSelect render + + const [options,setOptions] = useState([]) + + const tenantId = Digit.ULBService.getCurrentTenantId() + const headerLocale = Digit.Utils.locale.getTransformedLocale(tenantId); + const { t } = useTranslation() + const { isLoading, data: wardsAndLocalities } = Digit.Hooks.useLocation( + tenantId, 'Ward', + { + select: (data) => { + + const wards = [] + const localities = {} + data?.TenantBoundary[0]?.boundary.forEach((item) => { + localities[item?.code] = item?.children.map(item => ({ code: item.code, name: item.name, i18nKey: `${headerLocale}_ADMIN_${item?.code}`, label: item?.label })) + wards.push({ code: item.code, name: item.name, i18nKey: `${headerLocale}_ADMIN_${item?.code}` }) + }); + + return { + wards, localities + } + } + }); + + + useEffect(() => { + if(wardsAndLocalities) { + if(populators.type==="ward"){ + setOptions(wardsAndLocalities?.wards) + } + else{ + //here you need to set the localities based on the selected ward + let locs = [] + const selectedWardsCodes = formData?.ward?.map(row=>row.code) + selectedWardsCodes?.forEach(code=>{ + locs=[...locs,...wardsAndLocalities?.localities?.[code]] + }) + setOptions(locs) + } + } + }, [wardsAndLocalities,formData?.ward]) + + + if(isLoading) return + + return ( + <> + {populators.allowMultiSelect &&
+ { + if(populators.type === "ward"){ + setValue('locality',[]) + } + props.onChange(e?.map(row => { return row?.[1] ? row[1] : null }).filter(e => e)) + }} + selected={props?.value} + defaultLabel={t(populators?.defaultText)} + defaultUnit={t(populators?.selectedText)} + config={populators} + /> +
} + {!populators.allowMultiSelect && + { + props.onChange([e], populators.name); + }} + selected={props.value?.[0] || populators.defaultValue} + defaultValue={props.value?.[0] || populators.defaultValue} + t={t} + errorStyle={errors?.[populators.name]} + optionCardStyles={populators?.optionsCustomStyle} + /> + } + + ) +} + +export default LocationDropdownWrapper \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/LocationSearchCard.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/LocationSearchCard.js new file mode 100644 index 00000000000..a894348905d --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/LocationSearchCard.js @@ -0,0 +1,107 @@ +import React from "react"; +import PropTypes from "prop-types"; +import { useTranslation } from "react-i18next"; + +import Card from "../atoms/Card"; +import CardHeader from "../atoms/CardHeader"; +import CardText from "../atoms/CardText"; +import CardLabelError from "../atoms/CardLabelError"; +import LocationSearch from "../atoms/LocationSearch"; +import SubmitBar from "../atoms/SubmitBar"; +import LinkButton from "../atoms/LinkButton"; + +const LocationSearchCard = ({ + header, + cardText, + nextText, + t, + skipAndContinueText, + forcedError, + skip, + onSave, + onChange, + position, + disabled, + cardBodyStyle = {}, + isPTDefault, + PTdefaultcoord, + isPlaceRequired, + handleRemove, + Webview=false, + isPopUp=false, +}) => { + let isDisabled = false || disabled; + const onLocationChange = (val, location) => { + isDisabled = val ? false : true; + onChange(val, location); + }; + + const onLocationChangewithPlace = (val, location, place) => { + isDisabled = val ? false : true; + onChange(val, location, place); + }; + + return ( + + {header} +
+ {isPopUp && + + + + + +
+ } + style={{width: "100px", display:"inline"}} + onClick={(e) => handleRemove()} + />} + + {/* Click and hold to drop the pin to complaint location. If you are not + able to pin the location you can skip the continue for next step. */} + {cardText} + + + + {forcedError && {t(forcedError)}} + + + {skip ? : null} +
+ ); +}; + +LocationSearchCard.propTypes = { + header: PropTypes.string, + cardText: PropTypes.string, + nextText: PropTypes.string, + skipAndContinueText: PropTypes.string, + skip: PropTypes.func, + onSave: PropTypes.func, + onChange: PropTypes.func, + position: PropTypes.any, + isPTDefault: PropTypes.any, + PTdefaultcoord: PropTypes.any, + isPlaceRequired: PropTypes.any, +}; + +LocationSearchCard.defaultProps = { + header: "", + cardText: "", + nextText: "", + skipAndContinueText: "", + skip: () => {}, + onSave: null, + onChange: () => {}, + position: undefined, + isPTDefault: false, + PTdefaultcoord: {}, + isPlaceRequired: false, + handleRemove: () => {}, + Webview:false, + isPopUp:false, +}; + +export default LocationSearchCard; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/LocationSearchCard.stories.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/LocationSearchCard.stories.js new file mode 100644 index 00000000000..96517792e00 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/LocationSearchCard.stories.js @@ -0,0 +1,20 @@ +import React from "react"; + +import LocationSearchCard from "./LocationSearchCard"; + +export default { + title: "Molecule/LocationSearchCard", + component: LocationSearchCard, +}; + +const Template = (args) => ; + +export const Default = Template.bind({}); + +Default.args = { + header: "Header", + cardText: "Card Text", + nextText: "Next Text", + skipAndContinueText: "Skip", + skip: true, +}; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/MultiUploadWrapper.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/MultiUploadWrapper.js new file mode 100644 index 00000000000..6cca7471a71 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/MultiUploadWrapper.js @@ -0,0 +1,145 @@ +import React, { useEffect, useReducer, useState } from "react" +import UploadFile from "../atoms/UploadFile" + +const displayError = ({ t, error, name }, customErrorMsg) => ( + +
{customErrorMsg ? t(customErrorMsg) : t(error)}
+
{customErrorMsg ? '' : `${t('ES_COMMON_DOC_FILENAME')} : ${name} ...`}
+
+) + +const fileValidationStatus = (file, regex, maxSize, t) => { + + const status = { valid: true, name: file?.name?.substring(0, 15), error: '' }; + if (!file) return; + + if (!regex.test(file.type) && (file.size / 1024 / 1024) > maxSize) { + status.valid = false; status.error = t(`NOT_SUPPORTED_FILE_TYPE_AND_FILE_SIZE_EXCEEDED_5MB`); + } + + if (!regex.test(file.type)) { + status.valid = false; status.error = t(`NOT_SUPPORTED_FILE_TYPE`); + } + + if ((file.size / 1024 / 1024) > maxSize) { + status.valid = false; status.error = t(`FILE_SIZE_EXCEEDED_5MB`); + } + + return status; +} +const checkIfAllValidFiles = (files, regex, maxSize, t, maxFilesAllowed, state) => { + if (!files.length || !regex || !maxSize) return [{}, false]; + + // added another condition files.length > 0 , for when user uploads files more than maxFilesAllowed in one go the + const uploadedFiles = state.length + 1 + if ( maxFilesAllowed && (uploadedFiles > maxFilesAllowed || files.length > maxFilesAllowed)) return [[{ valid: false, name: files[0]?.name?.substring(0, 15), error: t(`FILE_LIMIT_EXCEEDED`)}],true] + + // Adding a check for fileSize > maxSize + // const maxSizeInBytes = maxSize * 1000000 + // if(files?.some(file => file.size > maxSizeInBytes)){ + // return [[{ valid: false, name: "", error: t(`FILE_SIZE_EXCEEDED_5MB`) }], true] + // } + + const messages = []; + let isInValidGroup = false; + for (let file of files) { + const fileStatus = fileValidationStatus(file, regex, maxSize, t); + if (!fileStatus.valid) { + isInValidGroup = true; + } + messages.push(fileStatus); + } + + return [messages, isInValidGroup]; +} + +// can use react hook form to set validations @neeraj-egov +const MultiUploadWrapper = ({ t, module = "PGR", tenantId = Digit.ULBService.getStateId(), getFormState, requestSpecifcFileRemoval, extraStyleName = "", setuploadedstate = [], showHintBelow, hintText, allowedFileTypesRegex = /(.*?)(jpg|jpeg|webp|aif|png|image|pdf|msword|openxmlformats-officedocument)$/i, allowedMaxSizeInMB = 10, acceptFiles = "image/*, .jpg, .jpeg, .webp, .aif, .png, .image, .pdf, .msword, .openxmlformats-officedocument, .dxf", maxFilesAllowed, customClass="", customErrorMsg,containerStyles }) => { + const FILES_UPLOADED = "FILES_UPLOADED" + const TARGET_FILE_REMOVAL = "TARGET_FILE_REMOVAL" + + const [fileErrors, setFileErrors] = useState([]); + const [enableButton, setEnableButton] = useState(true) + + const uploadMultipleFiles = (state, payload) => { + const { files, fileStoreIds } = payload; + const filesData = Array.from(files) + const newUploads = filesData?.map((file, index) => [file.name, { file, fileStoreId: fileStoreIds[index] }]) + return [...state, ...newUploads] + } + + const removeFile = (state, payload) => { + const __indexOfItemToDelete = state.findIndex(e => e[1].fileStoreId.fileStoreId === payload.fileStoreId.fileStoreId) + const mutatedState = state.filter((e, index) => index !== __indexOfItemToDelete) + setFileErrors([]) + return [...mutatedState] + } + + const uploadReducer = (state, action) => { + switch (action.type) { + case FILES_UPLOADED: + return uploadMultipleFiles(state, action.payload) + case TARGET_FILE_REMOVAL: + return removeFile(state, action.payload) + default: + break; + } + } + + const [state, dispatch] = useReducer(uploadReducer, [...setuploadedstate]) + + const onUploadMultipleFiles = async (e) => { + setEnableButton(false) + setFileErrors([]) + const files = Array.from(e.target.files); + + if (!files.length) return; + const [validationMsg, error] = checkIfAllValidFiles(files, allowedFileTypesRegex, allowedMaxSizeInMB, t, maxFilesAllowed, state); + + if (!error) { + try { + const { data: { files: fileStoreIds } = {} } = await Digit.UploadServices.MultipleFilesStorage(module, e.target.files, tenantId) + setEnableButton(true) + return dispatch({ type: FILES_UPLOADED, payload: { files: e.target.files, fileStoreIds } }) + } catch (err) { + setEnableButton(true) + } + } else { + setFileErrors(validationMsg) + setEnableButton(true) + } + } + + useEffect(() => getFormState(state), [state]) + + useEffect(() => { + requestSpecifcFileRemoval ? dispatch({ type: TARGET_FILE_REMOVAL, payload: requestSpecifcFileRemoval }) : null + }, [requestSpecifcFileRemoval]) + + return ( +
+ onUploadMultipleFiles(e)} + removeTargetedFile={(fileDetailsData) => dispatch({ type: TARGET_FILE_REMOVAL, payload: fileDetailsData })} + uploadedFiles={state} + multiple={true} + showHintBelow={showHintBelow} + hintText={hintText} + extraStyleName={extraStyleName} + onDelete={() => { + setFileErrors([]) + }} + accept={acceptFiles} + message={t(`WORKS_NO_FILE_SELECTED`)} + customClass={customClass} + enableButton={enableButton} + /> + + {fileErrors.length ? fileErrors.map(({ valid, name, type, size, error }) => ( + valid ? null : displayError({ t, error, name }, customErrorMsg) + )) : null} + +
) +} + +export default MultiUploadWrapper \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/OnGroundEventCard.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/OnGroundEventCard.js new file mode 100644 index 00000000000..317c79faac6 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/OnGroundEventCard.js @@ -0,0 +1,28 @@ +import React from "react" +import EventCalendarView from "../atoms/EventCalendarView" +import { MapMarker, Clock } from "../atoms/svgindex" + +const OnGroundEventCard = ({onClick = () => null, name, id, eventDetails, onGroundEventMonth="MAR", onGroundEventDate="12 - 16", onGroundEventName="To the moon", onGroundEventLocation="Moon", onGroundEventTimeRange="10:00 am - 1:00 pm", eventCategory, showEventCatergory }) => { + + const onEventCardClick = () => onClick(id) + + return
+ +
+

{name}

+ {!showEventCatergory ?
+ +

{eventDetails?.address}

+
: null} + {!showEventCatergory ?
+ +

{onGroundEventTimeRange}

+
: null} + {showEventCatergory ?
+

{eventCategory}

+
: null} +
+
+} + +export default OnGroundEventCard \ No newline at end of file diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/PageBasedInput.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/PageBasedInput.js new file mode 100644 index 00000000000..0615e05fa7d --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/PageBasedInput.js @@ -0,0 +1,19 @@ +import React from "react"; +import Card from "../atoms/Card"; +import SubmitBar from "../atoms/SubmitBar"; + +const PageBasedInput = ({ children, texts, onSubmit }) => { + return ( +
+ + {children} + + +
+ +
+
+ ); +}; + +export default PageBasedInput; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/PitDimension.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/PitDimension.js new file mode 100644 index 00000000000..733d555764c --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/PitDimension.js @@ -0,0 +1,52 @@ +import React from "react"; +import TextInput from "../atoms/TextInput"; +import CardText from "../atoms/CardText"; + +const DimentionInput = ({ name, value, onChange, disable }) => ( + +); + +const PitDimension = ({ sanitationType, t, size = {}, handleChange, disable = false }) => { + return sanitationType?.dimension === "dd" ? ( +
+
+ + + {t("CS_FILE_PROPERTY_DIAMETER")} + +
+ x +
+ + + {t("CS_FILE_PROPERTY_HEIGHT")} + +
+
+ ) : ( +
+
+ + + {t("CS_FILE_PROPERTY_LENGTH")} + +
+ x +
+ + + {t("CS_FILE_PROPERTY_WIDTH")} + +
+ x +
+ + + {t("CS_FILE_PROPERTY_HEIGHT")} + +
+
+ ); +}; + +export default PitDimension; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/RadioOrSelect.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/RadioOrSelect.js new file mode 100644 index 00000000000..75e201cc812 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/RadioOrSelect.js @@ -0,0 +1,55 @@ +import React from "react"; +import RadioButtons from "../atoms/RadioButtons"; +import Dropdown from "../atoms/Dropdown"; + +const RadioOrSelect = ({ + options, + onSelect, + optionKey, + selectedOption, + isMandatory, + t, + labelKey, + dropdownStyle = {}, + isDependent = false, + disabled = false, + optionCardStyles, + isPTFlow=false, + isDropDown = false, + innerStyles = {}, + inputStyle = {} +}) => { + return ( + + {options?.length < 5 && !isDropDown ? ( + + ) : ( + + )} + + ); +}; + +export default RadioOrSelect; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/RatingCard.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/RatingCard.js new file mode 100644 index 00000000000..104a6339a52 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/RatingCard.js @@ -0,0 +1,108 @@ +import React, { useState } from "react"; +import { useForm } from "react-hook-form"; +import PropTypes from "prop-types"; + +import TextArea from "../atoms/TextArea"; +import CardLabel from "../atoms/CardLabel"; +import Rating from "../atoms/Rating"; +import CheckBox from "../atoms/CheckBox"; +import Card from "../atoms/Card"; +import CardHeader from "../atoms/CardHeader"; +import SubmitBar from "../atoms/SubmitBar"; +import RadioButtons from "../atoms/RadioButtons"; +import Dropdown from "../atoms/Dropdown"; + +const RatingCard = ({ config, onSelect, t }) => { + const { register, watch, handleSubmit } = useForm(); + const [comments, setComments] = useState(""); + const [rating, setRating] = useState(0); + + const onSubmit = (data) => { + data.rating = rating; + onSelect(data); + }; + + const feedback = (e, ref, index) => { + setRating(index); + }; + + const segments = config.inputs?.map((input, index) => { + if (input.type === "rate") { + return ( + + {t(input.label)} + {input?.error} + feedback(e, ref, i)} /> + + ); + } + + if (input.type === "checkbox") { + return ( + + {t(input.label)} + {input.checkLabels && + input.checkLabels.map((label, index) => )} + + ); + } + + if (input.type === "radio") { + return ( + + {t(input.label)} + + + ); + } + + if (input.type === "textarea") { + return ( + + {t(input.label)} + + + ); + } + + if (input.type === "dropDown") { + return ( + + {t(input.label)} + + + ); + } + }); + return ( +
+ + {t(config.texts.header)} + {segments} + + +
+ ); +}; + +RatingCard.propTypes = { + config: PropTypes.object, + onSubmit: PropTypes.func, + t: PropTypes.func, +}; + +RatingCard.defaultProps = { + config: {}, + onSubmit: undefined, + t: (value) => value, +}; + +export default RatingCard; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/RatingCard.stories.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/RatingCard.stories.js new file mode 100644 index 00000000000..ee8a52c619e --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/RatingCard.stories.js @@ -0,0 +1,37 @@ +import React from "react"; + +import RatingCard from "./RatingCard"; + +export default { + title: "Molecule/RatingCard", + component: RatingCard, +}; + +const Template = (args) => ; + +export const InputTypeRate = Template.bind({}); + +InputTypeRate.args = { + config: { + inputs: [{ type: "rate", label: "Label" }], + texts: { header: "Header", submitBarLabel: "Submit" }, + }, +}; + +export const InputTypeCheckbox = Template.bind({}); + +InputTypeCheckbox.args = { + config: { + inputs: [{ type: "checkbox", label: "Label", checkLabels: ["Check Label"] }], + texts: { header: "Header", submitBarLabel: "Submit" }, + }, +}; + +export const InputTypeTextArea = Template.bind({}); + +InputTypeTextArea.args = { + config: { + inputs: [{ type: "textarea", label: "Label", name: "name" }], + texts: { header: "Header", submitBarLabel: "Submit" }, + }, +}; diff --git a/micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/RenderFormFields.js b/micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/RenderFormFields.js new file mode 100644 index 00000000000..7449cb69a8c --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/react-components/src/molecules/RenderFormFields.js @@ -0,0 +1,349 @@ +import React from 'react'; +import { useTranslation } from "react-i18next"; +import { Controller } from "react-hook-form"; +import CardLabelError from "../atoms/CardLabelError"; +import LabelFieldPair from '../atoms/LabelFieldPair'; +import CardLabel from "../atoms/CardLabel"; +import TextInput from "../atoms/TextInput"; +import TextArea from "../atoms/TextArea"; +import CustomDropdown from './CustomDropdown'; +import MobileNumber from '../atoms/MobileNumber'; +import DateRangeNew from './DateRangeNew'; +import MultiUploadWrapper from "./MultiUploadWrapper"; +import MultiSelectDropdown from '../atoms/MultiSelectDropdown'; +import LocationDropdownWrapper from './LocationDropdownWrapper'; +import WorkflowStatusFilter from './WorkflowStatusFilter'; +import ApiDropdown from './ApiDropdown'; +const RenderFormFields = ({data,...props}) => { + + const { t } = useTranslation(); + const { fields, control, formData, errors, register, setValue, getValues, setError, clearErrors, apiDetails} = props + + const fieldSelector = (type, populators, isMandatory, disable = false, component, config) => { + const Component = typeof component === "string" ? Digit.ComponentRegistryService.getComponent(component) : component; + let customValidations = config?.additionalValidation ? Digit?.Customizations?.[apiDetails?.masterName]?.[apiDetails?.moduleName]?.additionalValidations(config?.additionalValidation?.type, formData, config?.additionalValidation?.keys) : null + const customRules = customValidations ? { validate: customValidations} : {} + switch (type) { + case "date": + case "text": + case "number": + case "password": + case "time": + return ( + ( + + )} + name={populators.name} + rules={{required: isMandatory, ...populators.validation, ...customRules }} + control={control} + /> + ); + + case "textarea": + return ( + ( + + + + + + ); +}; + +export default RatingAndFeedBack; diff --git a/micro-ui/web/micro-ui-internals/packages/modules/pgr/src/pages/citizen/Rating/SelectRating.js b/micro-ui/web/micro-ui-internals/packages/modules/pgr/src/pages/citizen/Rating/SelectRating.js new file mode 100644 index 00000000000..c24bce32f20 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/modules/pgr/src/pages/citizen/Rating/SelectRating.js @@ -0,0 +1,62 @@ +import React, { useCallback, useState } from "react"; +import { useDispatch } from "react-redux"; +import { RatingCard, CardLabelError } from "@egovernments/digit-ui-react-components"; +import { useParams, Redirect, useHistory } from "react-router-dom"; +import { useTranslation } from "react-i18next"; +import { updateComplaints } from "../../../redux/actions/index"; + +const SelectRating = ({ parentRoute }) => { + const { t } = useTranslation(); + const { id } = useParams(); + const dispatch = useDispatch(); + const history = useHistory(); + + let tenantId = Digit.SessionStorage.get("CITIZEN.COMMON.HOME.CITY")?.code || Digit.ULBService.getCurrentTenantId(); + const complaintDetails = Digit.Hooks.pgr.useComplaintDetails({ tenantId: tenantId, id: id }).complaintDetails; + const updateComplaint = useCallback((complaintDetails) => dispatch(updateComplaints(complaintDetails)), [dispatch]); + const [submitError, setError] = useState(false) + + function log(data) { + if (complaintDetails && data.rating > 0 ) { + complaintDetails.service.rating = data.rating; + complaintDetails.service.additionalDetail = data.CS_FEEDBACK_WHAT_WAS_GOOD.join(","); + complaintDetails.workflow = { + action: "RATE", + comments: data.comments, + verificationDocuments: [], + }; + updateComplaint({ service: complaintDetails.service, workflow: complaintDetails.workflow }); + history.push(`${parentRoute}/response`); + } + else{ + setError(true) + } + } + + const config = { + texts: { + header: "CS_COMPLAINT_RATE_HELP_TEXT", + submitBarLabel: "CS_COMMONS_NEXT", + }, + inputs: [ + { + type: "rate", + maxRating: 5, + label: t("CS_COMPLAINT_RATE_TEXT"), + error: submitError ? {t("CS_FEEDBACK_ENTER_RATING_ERROR")} : null + }, + { + type: "checkbox", + label: "CS_FEEDBACK_WHAT_WAS_GOOD", + checkLabels: [t("CS_FEEDBACK_SERVICES"), t("CS_FEEDBACK_RESOLUTION_TIME"), t("CS_FEEDBACK_QUALITY_OF_WORK"), t("CS_FEEDBACK_OTHERS")], + }, + { + type: "textarea", + label: t("CS_COMMON_COMMENTS"), + name: "comments", + }, + ], + }; + return ; +}; +export default SelectRating; diff --git a/micro-ui/web/micro-ui-internals/packages/modules/pgr/src/pages/citizen/ReopenComplaint/AddtionalDetails.js b/micro-ui/web/micro-ui-internals/packages/modules/pgr/src/pages/citizen/ReopenComplaint/AddtionalDetails.js new file mode 100644 index 00000000000..7c9ae3f20ac --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/modules/pgr/src/pages/citizen/ReopenComplaint/AddtionalDetails.js @@ -0,0 +1,97 @@ +import React, { useCallback, useEffect } from "react"; +import { useTranslation } from "react-i18next"; +import { useDispatch, useSelector } from "react-redux"; +import { useParams, useHistory, Redirect } from "react-router-dom"; + +import { BackButton, Card, CardHeader, CardText, TextArea, SubmitBar } from "@egovernments/digit-ui-react-components"; + +import { updateComplaints } from "../../../redux/actions/index"; +import { LOCALIZATION_KEY } from "../../../constants/Localization"; + +const AddtionalDetails = (props) => { + // const [details, setDetails] = useState(null); + const history = useHistory(); + let { id } = useParams(); + const dispatch = useDispatch(); + const appState = useSelector((state) => state)["common"]; + let { t } = useTranslation(); + + const {complaintDetails} = props + useEffect(() => { + if (appState.complaints) { + const { response } = appState.complaints; + if (response && response.responseInfo.status === "successful") { + history.push(`${props.match.path}/response/:${id}`); + } + } + }, [appState.complaints, props.history]); + + const updateComplaint = useCallback( + async (complaintDetails) => { + await dispatch(updateComplaints(complaintDetails)); + history.push(`${props.match.path}/response/${id}`); + }, + [dispatch] + ); + + const getUpdatedWorkflow = (reopenDetails, type) => { + switch (type) { + case "REOPEN": + return { + action: "REOPEN", + comments: reopenDetails.addtionalDetail, + assignes: [], + verificationDocuments: reopenDetails.verificationDocuments, + }; + default: + return ""; + } + }; + + function reopenComplaint() { + let reopenDetails = Digit.SessionStorage.get(`reopen.${id}`); + if (complaintDetails) { + complaintDetails.workflow = getUpdatedWorkflow( + reopenDetails, + // complaintDetails, + "REOPEN" + ); + complaintDetails.service.additionalDetail = { + REOPEN_REASON: reopenDetails.reason, + }; + updateComplaint({ service: complaintDetails.service, workflow: complaintDetails.workflow }); + } + return ( + + ); + } + + function textInput(e) { + // setDetails(e.target.value); + let reopenDetails = Digit.SessionStorage.get(`reopen.${id}`); + Digit.SessionStorage.set(`reopen.${id}`, { + ...reopenDetails, + addtionalDetail: e.target.value, + }); + } + + return ( + + + {t(`${LOCALIZATION_KEY.CS_ADDCOMPLAINT}_PROVIDE_ADDITIONAL_DETAILS`)} + {t(`${LOCALIZATION_KEY.CS_ADDCOMPLAINT}_ADDITIONAL_DETAILS_TEXT`)} + +
+ +
+
+
+ ); +}; + +export default AddtionalDetails; diff --git a/micro-ui/web/micro-ui-internals/packages/modules/pgr/src/pages/citizen/ReopenComplaint/Reason.js b/micro-ui/web/micro-ui-internals/packages/modules/pgr/src/pages/citizen/ReopenComplaint/Reason.js new file mode 100644 index 00000000000..a67b9b52c1c --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/modules/pgr/src/pages/citizen/ReopenComplaint/Reason.js @@ -0,0 +1,57 @@ +import React, { useState } from "react"; +import { useTranslation } from "react-i18next"; +import { Link, useHistory, useParams } from "react-router-dom"; +import { BackButton, Card, CardHeader, CardLabelError, CardText, RadioButtons, SubmitBar } from "@egovernments/digit-ui-react-components"; + +import { LOCALIZATION_KEY } from "../../../constants/Localization"; +import { getRoute, PgrRoutes, PGR_BASE } from "../../../constants/Routes"; + +const ReasonPage = (props) => { + const history = useHistory(); + const { t } = useTranslation(); + const { id } = useParams(); + const [selected, setSelected] = useState(null); + const [valid, setValid] = useState(true); + + const onRadioChange = (value) => { + let reopenDetails = Digit.SessionStorage.get(`reopen.${id}`); + Digit.SessionStorage.set(`reopen.${id}`, { ...reopenDetails, reason: value }); + setSelected(value); + }; + + function onSave() { + if (selected === null) { + setValid(false); + } else { + history.push(`${props.match.path}/upload-photo/${id}`); + } + } + + return ( + + {t(`${LOCALIZATION_KEY.CS_REOPEN}_COMPLAINT`)} + + {/* Select the option related to your complaint from the list given below. + If the complaint type you are looking for is not listed select others.{" "} */} + {/* {t(`${TRANSLATION_KEY}_OPTION_ONE`)} */} + + {valid ? null : {t(`${LOCALIZATION_KEY.CS_ADDCOMPLAINT}_ERROR_REOPEN_REASON`)}} + setSelected(value)} + options={[ + t(`${LOCALIZATION_KEY.CS_REOPEN}_OPTION_ONE`), + t(`${LOCALIZATION_KEY.CS_REOPEN}_OPTION_TWO`), + t(`${LOCALIZATION_KEY.CS_REOPEN}_OPTION_THREE`), + t(`${LOCALIZATION_KEY.CS_REOPEN}_OPTION_FOUR`), + ]} + /> + + + + ); +}; + +export default ReasonPage; diff --git a/micro-ui/web/micro-ui-internals/packages/modules/pgr/src/pages/citizen/ReopenComplaint/UploadPhoto.js b/micro-ui/web/micro-ui-internals/packages/modules/pgr/src/pages/citizen/ReopenComplaint/UploadPhoto.js new file mode 100644 index 00000000000..a50ae8af67f --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/modules/pgr/src/pages/citizen/ReopenComplaint/UploadPhoto.js @@ -0,0 +1,71 @@ +import React, { useEffect, useState } from "react"; +import { Link, useHistory, useParams } from "react-router-dom"; +import { useTranslation } from "react-i18next"; + +import { Card, SubmitBar, BackButton, ImageUploadHandler, CardLabelError, LinkButton } from "@egovernments/digit-ui-react-components"; + +import { LOCALIZATION_KEY } from "../../../constants/Localization"; + +const UploadPhoto = (props) => { + const { t } = useTranslation(); + const history = useHistory(); + let { id } = useParams(); + const [verificationDocuments, setVerificationDocuments] = useState(null); + const [valid, setValid] = useState(true); + + const handleUpload = (ids) => { + setDocState(ids); + }; + + const setDocState = (ids) => { + if (ids?.length) { + const documents = ids.map((id) => ({ + documentType: "PHOTO", + fileStoreId: id, + documentUid: "", + additionalDetails: {}, + })); + setVerificationDocuments(documents); + } + }; + + function save() { + if (verificationDocuments === null) { + setValid(false); + } else { + history.push(`${props.match.path}/addional-details/${id}`); + } + } + + function skip() { + history.push(`${props.match.path}/addional-details/${id}`); + } + + useEffect(() => { + let reopenDetails = Digit.SessionStorage.get(`reopen.${id}`); + Digit.SessionStorage.set(`reopen.${id}`, { ...reopenDetails, verificationDocuments }); + }, [verificationDocuments, id]); + + return ( + + + + {/* + + */} + + {valid ? null : {t(`${LOCALIZATION_KEY.CS_ADDCOMPLAINT}_UPLOAD_ERROR_MESSAGE`)}} + + {props.skip ? : null} + + + ); +}; + +export default UploadPhoto; diff --git a/micro-ui/web/micro-ui-internals/packages/modules/pgr/src/pages/citizen/ReopenComplaint/index.js b/micro-ui/web/micro-ui-internals/packages/modules/pgr/src/pages/citizen/ReopenComplaint/index.js new file mode 100644 index 00000000000..ddd9dab9acd --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/modules/pgr/src/pages/citizen/ReopenComplaint/index.js @@ -0,0 +1,28 @@ +import React, { useMemo } from "react"; + +import { Route, Switch, useRouteMatch } from "react-router-dom"; +// import UserOnboarding from "../UserOnboarding/index"; +import { PgrRoutes, getRoute } from "../../../constants/Routes"; +import ReasonPage from "./Reason"; +import UploadPhoto from "./UploadPhoto"; +import AddtionalDetails from "./AddtionalDetails"; +import Response from "../Response"; + +const ReopenComplaint = ({ match, history, parentRoute }) => { + + const allParams = window.location.pathname.split("/") + const id = allParams[allParams.length - 1] + const tenantId = Digit.SessionStorage.get("CITIZEN.COMMON.HOME.CITY")?.code || Digit.ULBService.getCurrentTenantId(); + + const complaintDetails = Digit.Hooks.pgr.useComplaintDetails({ tenantId: tenantId, id: id }).complaintDetails; + return ( + + } /> + } /> + } /> + } /> + + ); +}; + +export { ReopenComplaint }; diff --git a/micro-ui/web/micro-ui-internals/packages/modules/pgr/src/pages/citizen/Response.js b/micro-ui/web/micro-ui-internals/packages/modules/pgr/src/pages/citizen/Response.js new file mode 100644 index 00000000000..28b77b73e40 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/modules/pgr/src/pages/citizen/Response.js @@ -0,0 +1,59 @@ +import React from "react"; +import { Card, Banner, CardText, SubmitBar } from "@egovernments/digit-ui-react-components"; +import { Link } from "react-router-dom"; +import { useSelector } from "react-redux"; +import { PgrRoutes, getRoute } from "../../constants/Routes"; +import { useTranslation } from "react-i18next"; + +const GetActionMessage = ({ action }) => { + const { t } = useTranslation(); + switch (action) { + case "REOPEN": + return t(`CS_COMMON_COMPLAINT_REOPENED`); + case "RATE": + return t("CS_COMMON_THANK_YOU"); + default: + return t(`CS_COMMON_COMPLAINT_SUBMITTED`); + } +}; + +const BannerPicker = ({ response }) => { + const { complaints } = response; + const { t } = useTranslation(); + if (complaints && complaints.response && complaints.response.responseInfo) { + return ( + + ); + } else { + return ; + } +}; + +const TextPicker = ({ response }) => { + const { complaints } = response; + const { t } = useTranslation(); + if (complaints && complaints.response && complaints.response.responseInfo) { + const { action } = complaints.response.ServiceWrappers[0].workflow; + return action === "RATE" ? {t("CS_COMMON_RATING_SUBMIT_TEXT")} : {t("CS_COMMON_TRACK_COMPLAINT_TEXT")}; + } +}; + +const Response = (props) => { + const { t } = useTranslation(); + const appState = useSelector((state) => state)["pgr"]; + return ( + + {appState.complaints.response && } + {appState.complaints.response && } + + + + + ); +}; + +export default Response; diff --git a/micro-ui/web/micro-ui-internals/packages/modules/pgr/src/pages/citizen/index.js b/micro-ui/web/micro-ui-internals/packages/modules/pgr/src/pages/citizen/index.js new file mode 100644 index 00000000000..9319f81beb7 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/modules/pgr/src/pages/citizen/index.js @@ -0,0 +1,48 @@ +import React from "react"; +import { ReopenComplaint } from "./ReopenComplaint/index"; +import SelectRating from "./Rating/SelectRating"; +import { PgrRoutes, getRoute } from "../../constants/Routes"; +import { useRouteMatch, Switch, useLocation } from "react-router-dom"; +import { AppContainer, BackButton, PrivateRoute } from "@egovernments/digit-ui-react-components"; + +import { CreateComplaint } from "./Create"; +import { ComplaintsList } from "./ComplaintsList"; +import ComplaintDetailsPage from "./ComplaintDetails"; +import Response from "./Response"; +import { useTranslation } from "react-i18next"; + +const App = () => { + const { t } = useTranslation(); + const { path, url, ...match } = useRouteMatch(); + const location = useLocation(); + + const CreateComplaint = Digit?.ComponentRegistryService?.getComponent("PGRCreateComplaintCitizen"); + const ComplaintsList = Digit?.ComponentRegistryService?.getComponent("PGRComplaintsList"); + const ComplaintDetailsPage = Digit?.ComponentRegistryService?.getComponent("PGRComplaintDetailsPage"); + const SelectRating = Digit?.ComponentRegistryService?.getComponent("PGRSelectRating"); + const Response = Digit?.ComponentRegistryService?.getComponent("PGRResponseCitzen"); + + return ( + +
+ {!location.pathname.includes("/response") && {t("CS_COMMON_BACK")}} + + {/* */} + + + + } + /> + } /> + } /> + + {/* */} + +
+
+ ); +}; + +export default App; diff --git a/micro-ui/web/micro-ui-internals/packages/modules/pgr/src/pages/employee/ComplaintDetails.js b/micro-ui/web/micro-ui-internals/packages/modules/pgr/src/pages/employee/ComplaintDetails.js new file mode 100644 index 00000000000..91641378146 --- /dev/null +++ b/micro-ui/web/micro-ui-internals/packages/modules/pgr/src/pages/employee/ComplaintDetails.js @@ -0,0 +1,504 @@ +import React, { useState, useEffect, Fragment } from "react"; +import { useParams } from "react-router-dom"; +import { + BreakLine, + Card, + CardLabel, + CardLabelDesc, + CardSubHeader, + ConnectingCheckPoints, + CheckPoint, + DisplayPhotos, + MediaRow, + LastRow, + Row, + StatusTable, + PopUp, + HeaderBar, + ImageViewer, + TextInput, + TextArea, + UploadFile, + ButtonSelector, + Toast, + ActionBar, + Menu, + SubmitBar, + Dropdown, + Loader, + Modal, + SectionalDropdown, +} from "@egovernments/digit-ui-react-components"; + +import { Close } from "../../Icons"; +import { useTranslation } from "react-i18next"; +import { isError, useQueryClient } from "react-query"; +import StarRated from "../../components/timelineInstances/StarRated"; + +const MapView = (props) => { + return ( +
+ +
+ ); +}; + +const Heading = (props) => { + return

{props.label}

; +}; + +const CloseBtn = (props) => { + return ( +
+ +
+ ); +}; + +const TLCaption = ({ data, comments }) => { + const { t } = useTranslation() + return ( +
+ {data?.date &&

{data?.date}

} +

{data?.name}

+

{data?.mobileNumber}

+ {data?.source &&

{t("ES_COMMON_FILED_VIA_" + data?.source.toUpperCase())}

} + {comments?.map( e => +
+

{t("WF_COMMON_COMMENTS")}

+

{e}

+
+ )} +
+ ); +}; + +const ComplaintDetailsModal = ({ workflowDetails, complaintDetails, close, popup, selectedAction, onAssign, tenantId, t }) => { + + // RAIN-5692 PGR : GRO is assigning complaint, Selecting employee and assign. Its not getting assigned. + // Fix for next action assignee dropdown issue + const stateArray = workflowDetails?.data?.initialActionState?.nextActions?.filter( ele => ele?.action == selectedAction ); + const useEmployeeData = Digit.Hooks.pgr.useEmployeeFilter( + tenantId, + stateArray?.[0]?.assigneeRoles?.length > 0 ? stateArray?.[0]?.assigneeRoles?.join(",") : "", + complaintDetails + ); + const employeeData = useEmployeeData + ? useEmployeeData.map((departmentData) => { + return { heading: departmentData.department, options: departmentData.employees }; + }) + : null; + + const [selectedEmployee, setSelectedEmployee] = useState(null); + const [comments, setComments] = useState(""); + const [file, setFile] = useState(null); + const [uploadedFile, setUploadedFile] = useState(null); + const [error, setError] = useState(null); + const cityDetails = Digit.ULBService.getCurrentUlb(); + const [selectedReopenReason, setSelectedReopenReason] = useState(null); + + useEffect(() => { + (async () => { + setError(null); + if (file) { + if (file.size >= 5242880) { + setError(t("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED")); + } else { + try { + // TODO: change module in file storage + const response = await Digit.UploadServices.Filestorage("property-upload", file, cityDetails.code); + if (response?.data?.files?.length > 0) { + setUploadedFile(response?.data?.files[0]?.fileStoreId); + } else { + setError(t("CS_FILE_UPLOAD_ERROR")); + } + } catch (err) { + setError(t("CS_FILE_UPLOAD_ERROR")); + } + } + } + })(); + }, [file]); + + const reopenReasonMenu = [t(`CS_REOPEN_OPTION_ONE`), t(`CS_REOPEN_OPTION_TWO`), t(`CS_REOPEN_OPTION_THREE`), t(`CS_REOPEN_OPTION_FOUR`)]; + // const uploadFile = useCallback( () => { + + // }, [file]); + + function onSelectEmployee(employee) { + setSelectedEmployee(employee); + } + + function addComment(e) { + setError(null); + setComments(e.target.value); + } + + function selectfile(e) { + setFile(e.target.files[0]); + } + + function onSelectReopenReason(reason) { + setSelectedReopenReason(reason); + } + + return ( + + } + headerBarEnd={ close(popup)} />} + actionCancelLabel={t("CS_COMMON_CANCEL")} + actionCancelOnSubmit={() => close(popup)} + actionSaveLabel={ + selectedAction === "ASSIGN" || selectedAction === "REASSIGN" + ? t("CS_COMMON_ASSIGN") + : selectedAction === "REJECT" + ? t("CS_COMMON_REJECT") + : selectedAction === "REOPEN" + ? t("CS_COMMON_REOPEN") + : t("CS_COMMON_RESOLVE") + } + actionSaveOnSubmit={() => { + if(selectedAction === "REJECT" && !comments) + setError(t("CS_MANDATORY_COMMENTS")); + else + onAssign(selectedEmployee, comments, uploadedFile); + }} + error={error} + setError={setError} + > + + {selectedAction === "REJECT" || selectedAction === "RESOLVE" || selectedAction === "REOPEN" ? null : ( + + {t("CS_COMMON_EMPLOYEE_NAME")} + {employeeData && } + + )} + {selectedAction === "REOPEN" ? ( + + {t("CS_REOPEN_COMPLAINT")} + + + ) : null} + {t("CS_COMMON_EMPLOYEE_COMMENTS")} +