diff --git a/.github/workflows/publishAllPackages.yml b/.github/workflows/publishAllPackages.yml
index ffaa1e6c016..6bb4b51d612 100644
--- a/.github/workflows/publishAllPackages.yml
+++ b/.github/workflows/publishAllPackages.yml
@@ -2,9 +2,14 @@ name: Node.js Publish UI Packages
on:
push:
- branches: [ 'develop' ]
+ branches: [ 'develop','campaign' ]
paths:
- 'micro-ui/web/micro-ui-internals/**'
+
+ pull_request:
+ branches:
+ - 'dev-hcm'
+ # Push events to branches matching refs/heads/mona/octocat
jobs:
build:
@@ -15,6 +20,6 @@ jobs:
with:
node-version: 14
registry-url: https://registry.npmjs.org/
- - run: cd micro-ui/web/micro-ui-internals/ && bash ./publish-workbench.sh
+ - run: cd micro-ui/web/micro-ui-internals/ && bash ./publish-develop.sh
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..84763f33d2a
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+.DS_Store
+accelerators/frontend/micro-ui-internals/node_modules/*
+.idea
+index.lock
+utilities/
\ No newline at end of file
diff --git a/.vscode/settings.json b/.vscode/settings.json
new file mode 100644
index 00000000000..2b8c08a8854
--- /dev/null
+++ b/.vscode/settings.json
@@ -0,0 +1,3 @@
+{
+ "editor.inlineSuggest.showToolbar": "always"
+}
\ No newline at end of file
diff --git a/CODEOWNERS b/CODEOWNERS
new file mode 100644
index 00000000000..259b2843037
--- /dev/null
+++ b/CODEOWNERS
@@ -0,0 +1,4 @@
+* @egovernments/core-ui-reviewers
+
+##Frontend
+micro-ui/web @nabeelmd-eGov
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/build/build-config.yml b/build/build-config.yml
index b50ee7558da..e4487a809dd 100644
--- a/build/build-config.yml
+++ b/build/build-config.yml
@@ -24,6 +24,12 @@ config:
- work-dir: micro-ui/
dockerfile: micro-ui/web/workbench/Dockerfile
image-name: workbench-ui
+
+ - name: builds/Digit-Frontend/microplan-ui
+ build:
+ - work-dir: micro-ui/
+ dockerfile: micro-ui/web/microplan/Dockerfile
+ image-name: microplan-ui
- name: builds/Digit-Frontend/storybook-svg
build:
@@ -46,6 +52,6 @@ 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
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/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/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-unifiedDev b/micro-ui/web/micro-ui-internals/example/.env-unifiedDev
new file mode 100644
index 00000000000..c1cf23a713e
--- /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://egov-dev-assets.s3.ap-south-1.amazonaws.com/globalConfigsMicroplan.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..c1cf23a713e
--- /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://egov-dev-assets.s3.ap-south-1.amazonaws.com/globalConfigsMicroplan.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
new file mode 100644
index 00000000000..8e90029d64d
--- /dev/null
+++ b/micro-ui/web/micro-ui-internals/example/package.json
@@ -0,0 +1,37 @@
+{
+ "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.2-beta.1",
+ "@egovernments/digit-ui-components": "0.0.2-beta.1",
+ "@egovernments/digit-ui-module-core": "1.8.2-beta.6",
+ "@egovernments/digit-ui-module-utilities": "1.0.1-beta.30",
+ "@egovernments/digit-ui-react-components": "1.8.2-beta.5",
+ "@egovernments/digit-ui-module-sample": "0.0.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..9276b24baf0
--- /dev/null
+++ b/micro-ui/web/micro-ui-internals/example/public/index.html
@@ -0,0 +1,67 @@
+
+
+
+
+
+
+
+
+
+ DIGIT
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
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..d428d95394e
--- /dev/null
+++ b/micro-ui/web/micro-ui-internals/example/src/UICustomizations.js
@@ -0,0 +1,670 @@
+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]
+// these functions will act as middlewares
+var Digit = window.Digit || {};
+
+
+const businessServiceMap = {
+
+ "muster roll": "MR",
+ "estimate":"ESTIMATE"
+};
+
+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;
+ }
+ },
+ },
+ 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: {
+ // id: "id[0]",
+ tenantId: "tenantId",
+ },
+ dateConfig: {
+ endDate: "dayend",
+ startDate: "daystart"
+ },
+ selectConfig: {
+ },
+ textConfig :["id", "tenantId", "name", "projectNumber", "projectSubType" , "projectType"]
+ },
+ "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"]
+ },
+ "SearchProjectResourceConfig": {
+ basePath: "ProjectResource",
+ pathConfig: {
+ id: "id[0]"
+ },
+ dateConfig: {
+ },
+ selectConfig: {
+ },
+ textConfig : []
+ },
+ "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"]
+ },
+ "SearchFacilityConfig": {
+ basePath: "Facility",
+ pathConfig: {
+ id: "id[0]"
+ },
+ dateConfig: {
+ },
+ selectConfig: {
+ },
+ textConfig :["faciltyUsage","localityCode", "storageCapacity","id"]
+ },
+ "SearchProjectFacilityConfig": {
+ basePath: "ProjectFacility",
+ pathConfig: {
+ id: "id[0]",
+ projectId: "projectId[0]",
+ facilityId: "facilityId[0]"
+ },
+ dateConfig: {
+ },
+ selectConfig: {
+ },
+ textConfig :[]
+ },
+ }
+
+ const id = searchParams.get("config")|| masterName;
+
+ if(!paths||!paths?.[id]){
+ 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"}
+ }
+ 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 "ID":
+
+ return (
+
+
+
+
+ );
+
+ 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..2db8b797a48
--- /dev/null
+++ b/micro-ui/web/micro-ui-internals/example/src/index.js
@@ -0,0 +1,81 @@
+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 "@egovernments/digit-ui-sample-css/example/index.css";
+
+import { pgrCustomizations } from "./pgr";
+import { UICustomizations } from "./UICustomizations";
+import { initUtilitiesComponents } from "@egovernments/digit-ui-module-utilities";
+import {initSampleComponents} from "@egovernments/digit-ui-module-sample";
+
+var Digit = window.Digit || {};
+
+const enabledModules = [
+ "DSS",
+ "HRMS",
+ "Workbench",
+ "HCMWORKBENCH",
+ // "Engagement", "NDSS","QuickPayLinks", "Payment",
+ "Utilities",
+ "Microplanning",
+ "Sample"
+ //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,
+ });
+
+ initUtilitiesComponents();
+ initSampleComponents();
+
+ 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..1a7a9eed23e
--- /dev/null
+++ b/micro-ui/web/micro-ui-internals/example/src/setupProxy.js
@@ -0,0 +1,98 @@
+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",
+ "/estimate",
+ "/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",
+ "/hcm-moz-impl",
+ "/project",
+ "/project/staff/v1/_search",
+ "/project/v1/_search",
+ "/facility/v1/_search",
+ "/product/v1/_search",
+ "/product/variant/v1/_search",
+ "/hcm-bff/bulk/_transform",
+ "/hcm-bff/hcm/_processmicroplan",
+ "/health-hrms",
+ ].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..34bc0026f97
--- /dev/null
+++ b/micro-ui/web/micro-ui-internals/package.json
@@ -0,0 +1,55 @@
+{
+ "name": "egovernments",
+ "version": "1.0.0",
+ "main": "index.js",
+ "workspaces": [
+ "example",
+ "packages/css",
+ "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 && npm publish --tag workbench-1.0",
+ "dev:example": "cd example && yarn start",
+ "dev:sample": "cd packages/modules/sample && yarn start",
+ "build": "run-p build:**",
+ "build:sample": "cd packages/modules/sample && 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.2-beta.5",
+ "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/css/README.md b/micro-ui/web/micro-ui-internals/packages/css/README.md
new file mode 100644
index 00000000000..c2597b2240d
--- /dev/null
+++ b/micro-ui/web/micro-ui-internals/packages/css/README.md
@@ -0,0 +1,57 @@
+
+
+# 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.0.0-microlan Base version
+
+```
+## Contributors
+
+[jagankumar-egov] [nipunarora-eGov]
+
+### Published from DIGIT Frontend
+DIGIT Frontend Repo (https://github.com/egovernments/Digit-Frontend/tree/develop)
+
+## License
+
+MIT © [jagankumar-egov](https://github.com/jagankumar-egov)
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..5d1a705494a
--- /dev/null
+++ b/micro-ui/web/micro-ui-internals/packages/css/gulpfile.js
@@ -0,0 +1,71 @@
+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/package.json b/micro-ui/web/micro-ui-internals/packages/css/package.json
new file mode 100644
index 00000000000..8e35f8237d0
--- /dev/null
+++ b/micro-ui/web/micro-ui-internals/packages/css/package.json
@@ -0,0 +1,65 @@
+{
+ "name": "@egovernments/digit-ui-sample-css",
+ "version": "0.0.1",
+ "license": "MIT",
+ "main": "dist/index.css",
+ "author": "Jagankumar ",
+ "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.5",
+ "tailwindcss": "1.9.6"
+ },
+ "devDependencies": {
+ "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": "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": "6.7.1",
+ "postcss-scss": "3.0.5",
+ "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"
+ ]
+}
\ No newline at end of file
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/microplanning.scss b/micro-ui/web/micro-ui-internals/packages/css/src/components/microplanning.scss
new file mode 100644
index 00000000000..f01756f1e7d
--- /dev/null
+++ b/micro-ui/web/micro-ui-internals/packages/css/src/components/microplanning.scss
@@ -0,0 +1,363 @@
+.microplanning {
+ .upload {
+ display: flex;
+ width: 100%;
+ justify-content: space-between;
+ margin-top: 1.25rem;
+ }
+
+ .upload-section-option {
+ width: 12.5rem;
+ min-height: 32rem;
+ background-color: #ffffff;
+ border-top-left-radius: 0.5rem;
+ border-bottom-left-radius: 0.5rem;
+ padding: 0.625rem;
+ box-shadow: 0px 1px 2px 0px #00000029;
+ }
+
+ .upload-section-options-active {
+ min-height: 3.7rem;
+ display: flex;
+ align-items: center;
+ border-bottom: 1px rgba(214, 213, 212, 1) solid;
+ cursor: pointer;
+ border-right: 0.3rem solid rgba(244, 119, 56, 1);
+ background-color: rgba(244, 119, 56, 0.12);
+
+ p {
+ color: rgba(80, 90, 95, 1);
+ font-weight: 400;
+ font-size: 16px;
+ }
+ }
+
+ .upload-section-options-inactive {
+ min-height: 3.7rem;
+ display: flex;
+ align-items: center;
+ border-bottom: 1px rgba(214, 213, 212, 1) solid;
+ cursor: pointer;
+ border-right: none;
+ background-color: rgba(255, 255, 255, 1);
+
+ p {
+ color: rgba(80, 90, 95, 1);
+ font-weight: 400;
+ font-size: 16px;
+ }
+ }
+
+ .upload-component {
+ width: 80%;
+ height: min-content;
+ border-radius: 0.25rem;
+ padding: 1.5rem;
+ background-color: rgba(255, 255, 255, 1);
+ margin: 0;
+ margin-right: 0.3rem;
+ padding-bottom: 0.625rem;
+ }
+
+ .upload-component-active {
+ display: flex;
+ flex-direction: column;
+ margin-bottom: 0;
+
+ .greyedout-name {
+ color: rgba(177, 180, 182, 1);
+ margin: 0 0.625rem;
+ font-size: 1.25rem;
+ padding-top: 0px;
+ font-weight: 500;
+ }
+
+ h2 {
+ margin-top: 0.625rem;
+ font-size: 2.5rem;
+ margin: 0.625rem 0;
+ font-weight: 700;
+ }
+
+ p {
+ margin: 0.625rem 0;
+ padding-top: 0.625;
+ font-size: 1rem;
+ margin-top: 0.625rem;
+ font-weight: 400;
+ }
+ }
+
+ .upload-component-inactive {
+ display: none;
+ }
+
+ .upload-option-container {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ padding: 1.25rem 0;
+ flex-wrap: wrap;
+
+ .upload-option-container-selected {
+ border: 2px rgba(244, 119, 56, 1) solid;
+ color: rgba(244, 119, 56, 1);
+ }
+ }
+
+ .upload-option {
+ border-radius: 0.25rem;
+ border: 0.0625rem rgba(214, 213, 212, 1) solid;
+ min-width: 12.5rem;
+ min-height: 8.75rem;
+ box-shadow: 0 0.0625rem rgba(0, 0, 0, 0.16);
+ padding: 0.625rem 0;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ justify-items: center;
+ margin: 0 1.25rem;
+ cursor: pointer;
+
+ &:hover {
+ border: 2px rgba(244, 119, 56, 1) solid;
+ }
+
+ p {
+ margin-top: 0.625rem;
+ }
+
+ .upload-option-selected {
+ border: 0.125rem rgba(244, 119, 56, 1) solid;
+ color: rgba(244, 119, 56, 1);
+ }
+
+ .select-button {
+ justify-self: end;
+ border: 1px solid rgba(244, 119, 56, 1);
+ background-color: rgba(255, 255, 255, 1);
+ width: 11rem;
+ height: 2.5rem;
+ padding: 0.6rem 0.5rem;
+ color: rgba(244, 119, 56, 1);
+ font-size: 1rem;
+ font-weight: 600;
+ }
+
+ .selected-button {
+ justify-self: end;
+ border: 1px solid rgba(244, 119, 56, 1);
+ background-color: rgba(244, 119, 56, 1);
+ width: 11rem;
+ height: 2.5rem;
+ padding: 0.6rem 0.5rem;
+ color: rgb(255, 255, 255);
+ font-size: 1rem;
+ font-weight: 600;
+ }
+ }
+
+ .modal-header {
+ width: 30rem;
+ font-weight: 700;
+ font-size: 1.5rem;
+ padding-left: 1rem;
+ margin-bottom: 0;
+ display: flex;
+ flex-wrap: wrap;
+ overflow: hidden;
+ }
+
+ .modal-body {
+ overflow: hidden;
+ padding-left: 1rem;
+ padding-right: 1rem;
+ margin-bottom: 1rem;
+ margin-right: 1rem;
+
+ p {
+ font-weight: 400;
+ font-size: 1rem;
+ }
+ }
+
+ .upload-file {
+ min-width: 90%;
+ min-height: 10rem;
+ padding-top: 0.625;
+ border: 1px rgba(214, 213, 212, 1) dotted;
+ margin: 1rem 0;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ background-color: rgba(250, 250, 250, 255);
+ }
+
+ .uploaded-file {
+ border: 1px solid rgba(214, 213, 212, 1);
+ min-height: 4.75rem;
+ background-color: rgb(256, 252, 252);
+ display: flex !important;
+ flex-direction: row;
+ justify-content: space-between;
+ align-items: center;
+ margin-top: 0.625rem;
+ padding: 0 0.625rem;
+ flex-wrap: wrap;
+
+ .uploaded-file-details {
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ flex-wrap: wrap;
+ padding: 1rem 0;
+
+ p {
+ padding: 0;
+ margin: 0;
+ height: min-content;
+ font-weight: 700;
+ font-size: 1.5rem;
+ color: rgba(80, 90, 95, 1);
+ text-align: start;
+ }
+ }
+
+ .uploaded-file-operations {
+ display: flex !important;
+ flex-direction: row;
+ align-items: center;
+ justify-items: end;
+ flex-wrap: wrap;
+ .button {
+ display: flex !important;
+ flex-direction: row;
+ align-items: center !important;
+ justify-content: center;
+ margin-left: 1rem;
+ min-width: 9rem;
+ height: 2.5rem;
+ border: 1px rgba(244, 119, 56, 1) solid;
+ background-color: white;
+ cursor: pointer;
+ }
+
+ p {
+ padding: 0;
+ margin: 0;
+ color: rgba(244, 119, 56, 1);
+ font-weight: 600;
+ font-size: 1rem;
+ }
+
+ .deletebutton {
+ background-color: rgb(255, 255, 255, 0);
+ border: none;
+ }
+ }
+ }
+
+ .loader-container {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ height: 100%;
+ width: 100%;
+ display: flex;
+ flex-direction: column;
+ background-color: rgba(0, 0, 0, 0.7);
+ position: fixed;
+ top: 0;
+ left: 0;
+ z-index: 99999;
+
+ .loader {
+ border: 0.5rem solid rgb(255, 255, 255);
+ border-top: 0.5rem solid rgba(80, 76, 76, 0);
+ border-radius: 50%;
+ width: 3.125rem;
+ height: 3.125rem;
+ animation: spin 2s linear infinite;
+ }
+
+ .loader-inner {
+ border: 1px solid rgb(255, 255, 255);
+ border-radius: 50%;
+ width: 100%;
+ height: 100%;
+ }
+
+ .loader-text {
+ color: whitesmoke;
+ padding-top: 1.25rem;
+ }
+ }
+
+ @keyframes spin {
+ 0% {
+ transform: rotate(0deg);
+ }
+
+ 100% {
+ transform: rotate(360deg);
+ }
+ }
+
+ .toast-container {
+ position: fixed;
+ width: 50%;
+ bottom: 1.25rem;
+ left: 50%;
+ transform: translateX(-50%);
+ color: #fff;
+ padding: 1rem;
+ z-index: 9999;
+ }
+
+ .success {
+ background-color: rgba(0, 112, 60, 1);
+ }
+
+ .toast-content {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ }
+
+ .message {
+ margin-right: 0.6px;
+ }
+
+ .close-button {
+ background: transparent;
+ border: none;
+ color: inherit;
+ cursor: pointer;
+ }
+
+ .altrady-have-template-button {
+ display: flex !important;
+ justify-content: center;
+ font-weight: 600;
+ font-size: 1rem;
+ }
+
+ .download-template-button {
+ display: flex !important;
+ justify-content: center;
+
+ .icon {
+ display: flex;
+ align-items: center;
+ margin: 0;
+ padding: 0;
+ }
+
+ p {
+ font-weight: 500;
+ font-size: 1rem;
+ }
+ }
+}
\ 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..11eb5b4de6c
--- /dev/null
+++ b/micro-ui/web/micro-ui-internals/packages/css/src/index.scss
@@ -0,0 +1,12 @@
+/*@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 "./components/microplanning.scss";
+@import "./pages/employee/index.scss";
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..e69de29bb2d
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/package.json b/micro-ui/web/micro-ui-internals/packages/libraries/package.json
new file mode 100644
index 00000000000..b3ccfa605d2
--- /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.1-beta.4",
+ "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"
+ ]
+ }
\ No newline at end of file
diff --git a/micro-ui/web/micro-ui-internals/packages/modules/sample/README.md b/micro-ui/web/micro-ui-internals/packages/modules/sample/README.md
new file mode 100644
index 00000000000..2d4e683aa5d
--- /dev/null
+++ b/micro-ui/web/micro-ui-internals/packages/modules/sample/README.md
@@ -0,0 +1,3 @@
+
+
+# digit-ui-module-sample
diff --git a/micro-ui/web/micro-ui-internals/packages/modules/sample/package.json b/micro-ui/web/micro-ui-internals/packages/modules/sample/package.json
new file mode 100644
index 00000000000..dc9c65f2525
--- /dev/null
+++ b/micro-ui/web/micro-ui-internals/packages/modules/sample/package.json
@@ -0,0 +1,33 @@
+{
+ "name": "@egovernments/digit-ui-module-sample",
+ "version": "0.0.1",
+ "description": "Sample Module UI",
+ "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"
+ },
+ "peerDependencies": {
+ "react": "17.0.2",
+ "react-router-dom": "5.3.0"
+ },
+ "dependencies": {
+ "@egovernments/digit-ui-react-components": "1.8.2-beta.5",
+ "@egovernments/digit-ui-components": "0.0.2-beta.1",
+ "react": "17.0.2",
+ "react-date-range": "^1.4.0",
+ "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 ",
+ "license": "MIT"
+}
diff --git a/micro-ui/web/micro-ui-internals/packages/modules/sample/src/Module.js b/micro-ui/web/micro-ui-internals/packages/modules/sample/src/Module.js
new file mode 100644
index 00000000000..d0bcb869d1b
--- /dev/null
+++ b/micro-ui/web/micro-ui-internals/packages/modules/sample/src/Module.js
@@ -0,0 +1,46 @@
+import { Loader } from "@egovernments/digit-ui-react-components";
+import React from "react";
+import { useRouteMatch } from "react-router-dom";
+import { default as EmployeeApp } from "./pages/employee";
+import SampleCard from "./components/SampleCard";
+import ViewEstimateComponent from "./components/ViewEstimateComponent";
+import { overrideHooks, updateCustomConfigs } from "./utils";
+import AdditionalComponentWrapper from "./components/AdditionalComponent";
+import SampleMultiComponent from "./components/SampleMultiComponent";
+import AddressComponent from "./components/AddressComponent";
+import EstimateComponent from "./components/EstimateComponent";
+
+export const SampleModule = ({ stateCode, userType, tenants }) => {
+ const { path, url } = useRouteMatch();
+ const tenantId = Digit.ULBService.getCurrentTenantId();
+ const moduleCode = ["sample", "common", "workflow"];
+ const language = Digit.StoreData.getCurrentLanguage();
+ const { isLoading, data: store } = Digit.Services.useStore({
+ stateCode,
+ moduleCode,
+ language,
+ });
+
+ if (isLoading) {
+ return ;
+ }
+ return ;
+};
+
+const componentsToRegister = {
+ SampleModule,
+ SampleCard,
+ ViewEstimatePage: ViewEstimateComponent,
+ SampleAdditionalComponent: AdditionalComponentWrapper,
+ SampleMultiComponent: SampleMultiComponent,
+ AddressComponent:AddressComponent,
+ EstimateComponent:EstimateComponent
+};
+
+export const initSampleComponents = () => {
+ overrideHooks();
+ updateCustomConfigs();
+ Object.entries(componentsToRegister).forEach(([key, value]) => {
+ Digit.ComponentRegistryService.setComponent(key, value);
+ });
+};
diff --git a/micro-ui/web/micro-ui-internals/packages/modules/sample/src/components/AdditionalComponent.js b/micro-ui/web/micro-ui-internals/packages/modules/sample/src/components/AdditionalComponent.js
new file mode 100644
index 00000000000..d97544ed68c
--- /dev/null
+++ b/micro-ui/web/micro-ui-internals/packages/modules/sample/src/components/AdditionalComponent.js
@@ -0,0 +1,145 @@
+import { AddNewIcon } from "@egovernments/digit-ui-components";
+import { AddIcon, Button, Dropdown, DustbinIcon, LabelFieldPair, TextInput } from "@egovernments/digit-ui-react-components";
+import React, { Fragment, useEffect, useState } from "react";
+import { useTranslation } from "react-i18next";
+
+const AdditionalComponent = ({ onSelect, ...props }) => {
+ const { t } = useTranslation();
+ // option for dropdown
+ const [options, setOptions] = useState([
+ {
+ code: "ADHAAR",
+ name: "Adhaar",
+ },
+ {
+ code: "PANCARD",
+ name: "Pan Card",
+ },
+ {
+ code: "PASSPORT",
+ name: "Passport",
+ },
+ ]);
+
+ // state for storing data
+ const [documentData, setDocumentData] = useState([
+ {
+ key: 1,
+ type: null,
+ value: null,
+ },
+ ]);
+
+ // fn to update the value based on type.
+ const handleUpdateField = ({ type, value, item, index }) => {
+ switch (type) {
+ case "TYPE":
+ setDocumentData((prev) => {
+ return prev?.map((i, n) => {
+ if (i.key === item.key) {
+ return {
+ ...i,
+ type: value?.code,
+ };
+ }
+ return i;
+ });
+ });
+ break;
+ case "VALUE":
+ setDocumentData((prev) => {
+ return prev?.map((i, n) => {
+ if (i.key === item.key) {
+ return {
+ ...i,
+ value: value,
+ };
+ }
+ return i;
+ });
+ });
+ break;
+ default:
+ break;
+ }
+ };
+
+ //fn to add more field
+ const add = () => {
+ setDocumentData((prev) => [
+ ...prev,
+ {
+ key: prev?.length + 1,
+ value: null,
+ type: null,
+ },
+ ]);
+ };
+ //fn to delete field
+ const deleteItem = (data) => {
+ const fil = documentData.filter((i) => i.key !== data.key);
+ const up = fil.map((item, index) => ({ ...item, key: index + 1 }));
+ setDocumentData(up);
+ };
+
+ // when doc update calling onselect for update the value in formdata
+ useEffect(() => {
+ onSelect("additionalDetails", documentData);
+ }, [documentData]);
+
+ return (
+ <>
+ {documentData?.map((item, index) => (
+
+ {documentData?.length > 1 ? (
+
deleteItem(item, index)}>
+
+
+ ) : null}
+
+
+ {`${t("Document Type")}`}
+
+ i.code === item?.type)}
+ select={(value) => {
+ handleUpdateField({ type: "TYPE", value: value, item: item, index: index });
+ }}
+ />
+
+
+
+ {`${t("Document ID")}`}
+
+ handleUpdateField({ type: "VALUE", value: event.target.value, item: item, index: index })}
+ />
+
+
+ ))}
+ }
+ onButtonClick={add}
+ style={{ marginLeft: "auto" }}
+ />
+ >
+ );
+};
+
+export default AdditionalComponent;
diff --git a/micro-ui/web/micro-ui-internals/packages/modules/sample/src/components/AddressComponent.js b/micro-ui/web/micro-ui-internals/packages/modules/sample/src/components/AddressComponent.js
new file mode 100644
index 00000000000..e70fd0b1353
--- /dev/null
+++ b/micro-ui/web/micro-ui-internals/packages/modules/sample/src/components/AddressComponent.js
@@ -0,0 +1,91 @@
+import React, { Fragment, useEffect, useState } from "react";
+import { useTranslation } from "react-i18next";
+import { LabelFieldPair, TextInput } from "@egovernments/digit-ui-react-components";
+
+
+const AddressComponent = ({onSelect, ...props})=>{
+
+ const {t} = useTranslation()
+
+ const [addressData, setAddressData] = useState({
+ tenantId:"",
+ latitude:"",
+ longitude:"",
+ city:""
+ })
+
+
+ const handleUpdateField = (field, value)=>{
+ setAddressData((prev)=>{
+ return {
+ ...prev,
+ [field]:value
+ }
+ })
+ }
+
+ useEffect(()=>{
+ onSelect("address", addressData)
+ },[addressData])
+
+
+
+ return (
+
+
+
+
+ {`${t("Tenant ID*")}`}
+
+ handleUpdateField("tenantId", event.target.value)}
+ />
+
+
+
+
+ {t("Latitude*")}
+
+ handleUpdateField("latitude", event.target.value)}
+ />
+
+
+
+ {t("Longitude*")}
+
+ handleUpdateField("longitude", event.target.value)}
+ />
+
+
+
+ {t("City*")}
+
+ handleUpdateField("city", event.target.value)}
+ />
+
+
+
+
+
+
+ )
+
+
+}
+
+export default AddressComponent
\ No newline at end of file
diff --git a/micro-ui/web/micro-ui-internals/packages/modules/sample/src/components/EstimateComponent.js b/micro-ui/web/micro-ui-internals/packages/modules/sample/src/components/EstimateComponent.js
new file mode 100644
index 00000000000..c3333664f0d
--- /dev/null
+++ b/micro-ui/web/micro-ui-internals/packages/modules/sample/src/components/EstimateComponent.js
@@ -0,0 +1,190 @@
+import React, { Fragment, useEffect, useState } from "react";
+import { useTranslation } from "react-i18next";
+import { LabelFieldPair, TextInput,Dropdown, CheckBox } from "@egovernments/digit-ui-react-components";
+
+const EstimateComponent = ({onSelect, ...props})=>{
+
+ const {t} =useTranslation()
+
+
+ const [estimateData, setEStimateData] = useState({
+ sorId:"",
+ category:"",
+ name:"",
+ description:"",
+ unitRate:"",
+ numberOfUnits:"",
+ uom:"",
+ length:"",
+ width:"",
+ isActive:false
+
+ })
+ const [category, setCategory] = useState([
+ {code:"CATEGORY-01"},
+ {code:"CATEGORY-01"},
+ {code:"CATEGORY-01"}
+ ])
+ const [uomOPtions, setUomOPtions] = useState([
+ {code:"METER", name:"meter"},
+ {code:"KG", name:"kilo"},
+ {code:"LITRE", name:"litre"}
+ ])
+
+ const handleUpdateField = (field, value)=>{
+ setEStimateData((prev)=>{
+ return {
+ ...prev,
+ [field]:value
+ }
+ })
+ }
+ useEffect(() => {
+ onSelect("estimateDetails", estimateData);
+ }, [estimateData]);
+
+
+
+
+
+
+ return (
+ <>
+
+
+
+ {`${t("SOR ID*")}`}
+
+ handleUpdateField("sorId", event.target.value)}
+ />
+
+
+
+ {`${t("Category*")}`}
+
+ handleUpdateField("category", value.code)}
+ selected={category.find((i)=> i.code === estimateData.category)}
+ />
+
+
+
+ {`${t("name*")}`}
+
+ handleUpdateField("name", event.target.value)}
+ />
+
+
+
+ {`${t("Description*")}`}
+
+ handleUpdateField("description", event.target.value)}
+ />
+
+
+
+ {`${t("Unit Rate*")}`}
+
+ handleUpdateField("unitRate", event.target.value)}
+ />
+
+
+
+ {`${t("No Of Units*")}`}
+
+ handleUpdateField("noOfUnits", event.target.value)}
+ />
+
+
+
+ {t("UOM")}
+
+ handleUpdateField("uom", value.code)}
+ selected={uomOPtions.find((i)=> i.code === estimateData.uom)}
+ optionKey={"code"}
+
+ />
+
+
+
+ {`${t("length*")}`}
+
+ handleUpdateField("length", event.target.value)}
+ />
+
+
+
+ {`${t("width*")}`}
+
+ handleUpdateField("width", event.target.value)}
+ />
+
+
+
+ {`${t("isActive*")}`}
+
+ handleUpdateField("isActive", event.target.checked)}
+ name="isActive"
+ />
+
+
+
+
+
+ >
+ )
+
+}
+
+
+export default EstimateComponent
\ No newline at end of file
diff --git a/micro-ui/web/micro-ui-internals/packages/modules/sample/src/components/SampleCard.js b/micro-ui/web/micro-ui-internals/packages/modules/sample/src/components/SampleCard.js
new file mode 100644
index 00000000000..537c85074a1
--- /dev/null
+++ b/micro-ui/web/micro-ui-internals/packages/modules/sample/src/components/SampleCard.js
@@ -0,0 +1,70 @@
+import { HRIcon, EmployeeModuleCard, AttendanceIcon, PropertyHouse } from "@egovernments/digit-ui-react-components";
+import React from "react";
+import { useTranslation } from "react-i18next";
+
+const SampleCard = () => {
+
+ const { t } = useTranslation();
+
+ const propsForModuleCard = {
+ Icon: ,
+ moduleName: t("Sample"),
+ kpis: [
+
+ ],
+ links: [
+
+
+ {
+ label: t("Individual Search"),
+ link: `/${window?.contextPath}/employee/sample/search-individual`,
+
+ },
+ {
+ label: t("Individual Create"),
+ link: `/${window?.contextPath}/employee/sample/create-individual`,
+
+ },
+ {
+ label: t("Sample Create"),
+ link: `/${window?.contextPath}/employee/sample/sample-create`,
+
+ },
+ {
+ label: t("Sample Search"),
+ link: `/${window?.contextPath}/employee/sample/sample-search`,
+
+ },
+ {
+ label: t("Sample View"),
+ link: `/${window?.contextPath}/employee/sample/sample-view??tenantId=pg.citya&estimateNumber=ES/2023-24/002390&projectNumber=PJ/2023-24/02/002830`,
+
+ },
+ {
+ label: t("Sample Components"),
+ link: `/${window?.contextPath}/employee/sample/sample-components`,
+ },
+ {
+ label: t("Individual Tab Search"),
+ link: `/${window?.contextPath}/employee/sample/tab-search-individual`,
+ },
+ {
+ label: t("Individual View Details"),
+ link: `/${window?.contextPath}/employee/sample/individual-details-view`,
+ },
+ {
+ label: t("SOR Create"),
+ link: `/${window?.contextPath}/employee/sample/create-sor`
+ },
+ {
+ label: t("SOR Search"),
+ link: `/${window?.contextPath}/employee/sample/search-sor`
+ }
+
+ ],
+ };
+
+ return ;
+};
+
+export default SampleCard;
\ No newline at end of file
diff --git a/micro-ui/web/micro-ui-internals/packages/modules/sample/src/components/SampleComponent.js b/micro-ui/web/micro-ui-internals/packages/modules/sample/src/components/SampleComponent.js
new file mode 100644
index 00000000000..d5275009637
--- /dev/null
+++ b/micro-ui/web/micro-ui-internals/packages/modules/sample/src/components/SampleComponent.js
@@ -0,0 +1,28 @@
+import React, { useEffect, useState } from "react";
+import { useTranslation } from "react-i18next";
+
+const SampleComponent = (props) => {
+ const [data, updateData] = useState({});
+ const { t } = useTranslation();
+ useEffect(() => {
+ updateData(props?.formData || {});
+ }, [props, props?.formData]);
+ return (
+
+
View Entered Data(SampleComponent)
+
+ {Object.keys(data).map((key) => {
+ return (
+ data?.[key] && (
+
+ {key} : {JSON.stringify(data?.[key])}
+
+ )
+ );
+ })}
+
+
+ );
+};
+
+export default SampleComponent;
\ No newline at end of file
diff --git a/micro-ui/web/micro-ui-internals/packages/modules/sample/src/components/SampleMultiComponent.js b/micro-ui/web/micro-ui-internals/packages/modules/sample/src/components/SampleMultiComponent.js
new file mode 100644
index 00000000000..131bd7a97f0
--- /dev/null
+++ b/micro-ui/web/micro-ui-internals/packages/modules/sample/src/components/SampleMultiComponent.js
@@ -0,0 +1,127 @@
+import { AddNewIcon } from "@egovernments/digit-ui-components";
+import { AddIcon, Button, Dropdown, DustbinIcon, LabelFieldPair, TextInput } from "@egovernments/digit-ui-react-components";
+import React, { Fragment, useEffect, useState } from "react";
+import { useTranslation } from "react-i18next";
+
+const SampleMultiComponent = ({ onSelect, ...props }) => {
+ const { t } = useTranslation();
+ // options for type
+ const [type, setType] = useState([
+ {
+ code: "PERMANENT",
+ category: true,
+ role: true,
+ },
+ {
+ code: "TEMPORARY",
+ },
+ {
+ code: "CONTRACTOR",
+ },
+ ]);
+ // options for sub-type
+ const [subtype, setSubtype] = useState({
+ PERMANENT: [{ code: "HRP" }, { code: "ITP" }, { code: "DEVP" }, { code: "CLOUDP" }],
+ TEMPORARY: [{ code: "HRT" }, { code: "ITT" }, { code: "DEVT" }, { code: "CLOUDT" }],
+ CONTRACTOR: [{ code: "HRC" }, { code: "ITC" }, { code: "DEVC" }, { code: "CLOUDC" }],
+ });
+ // options for category
+ const [category, setCategory] = useState([
+ {
+ code: "CATEGORY1",
+ },
+ {
+ code: "CATEGORY2",
+ },
+ ]);
+ // options for role
+ const [role, setRole] = useState([
+ {
+ code: "ROLE1",
+ },
+ {
+ code: "ROLE2",
+ },
+ ]);
+ const [selectedType, setSelectedType] = useState(null);
+ const [selectedSubType, setSelectedSubType] = useState(null);
+ const [selectedCategory, setSelectedCategory] = useState(null);
+ const [selectedRole, setSelectedRole] = useState(null);
+
+ useEffect(() => {
+ onSelect("sampleDetails", {
+ type: selectedType,
+ subType: selectedSubType,
+ category: selectedCategory,
+ role: selectedRole,
+ });
+ }, [selectedType, selectedSubType, selectedCategory, selectedRole]);
+ return (
+ <>
+
+
+ {`${t("Select Type")}`}
+
+ i.code === selectedType?.code)}
+ select={(value) => {
+ setSelectedType(value)
+ console.log(value)
+ }}
+ />
+
+
+
+ {`${t("Select Sub-Type")}`}
+
+ i.code === selectedSubType?.code)}
+ select={(value) => setSelectedSubType(value)}
+ />
+
+ {selectedType?.category && (
+
+
+ {`${t("Select Catogory")}`}
+
+ i.code === selectedCategory?.code)}
+ select={(value) => {
+ setSelectedCategory(value)
+ console.log(value)
+ }}
+ />
+
+ )}
+ {selectedType?.role && (
+
+
+ {`${t("Select Role")}`}
+
+ i.code === selectedRole?.code)}
+ select={(value) => setSelectedRole(value)}
+ />
+
+ )}
+ >
+ );
+};
+
+export default SampleMultiComponent;
diff --git a/micro-ui/web/micro-ui-internals/packages/modules/sample/src/components/ViewEstimateComponent.js b/micro-ui/web/micro-ui-internals/packages/modules/sample/src/components/ViewEstimateComponent.js
new file mode 100644
index 00000000000..11be9221b13
--- /dev/null
+++ b/micro-ui/web/micro-ui-internals/packages/modules/sample/src/components/ViewEstimateComponent.js
@@ -0,0 +1,69 @@
+import React, { Fragment, useState, useEffect, useRef, } from 'react'
+import { Loader, WorkflowActions, WorkflowTimeline, Toast } from '@egovernments/digit-ui-react-components';
+import { useTranslation } from "react-i18next";
+import ApplicationDetails from '../../../templates/ApplicationDetails';
+
+const ViewEstimateComponent = ({editApplicationNumber,...props}) => {
+ const [toast, setToast] = useState({show : false, label : "", error : false});
+ const menuRef = useRef();
+ const [isStateChanged, setStateChanged] = useState(``)
+
+ const { t } = useTranslation()
+
+ const { tenantId, estimateNumber } = Digit.Hooks.useQueryParams();
+ console.log("tenantId",tenantId);
+ console.log("estimateNumber",estimateNumber);
+ const businessService = Digit?.Customizations?.["commonUiConfig"]?.getBusinessService("estimate");
+
+ const { isLoading, data: applicationDetails, isError } = Digit.Hooks.estimates.useEstimateDetailsScreen(t, tenantId, estimateNumber,{}, isStateChanged)
+
+ useEffect(()=>{
+ if(isError || (!isLoading && applicationDetails?.isNoDataFound)) {
+ setToast({show : true, label : t("COMMON_ESTIMATE_NOT_FOUND"), error : true});
+ }
+ },[isLoading, isError, applicationDetails]);
+
+
+
+ const handleToastClose = () => {
+ setToast({show : false, label : "", error : false});
+ }
+ if (isLoading) return
+ return (
+ <>
+ {
+ (!applicationDetails?.isNoDataFound) && !isError &&
+ <>
+
+
+ >
+
+ }
+ {toast?.show && }
+ >
+ )
+}
+
+export default ViewEstimateComponent;
\ No newline at end of file
diff --git a/micro-ui/web/micro-ui-internals/packages/modules/sample/src/configs/IndividualCreateConfig.js b/micro-ui/web/micro-ui-internals/packages/modules/sample/src/configs/IndividualCreateConfig.js
new file mode 100644
index 00000000000..1a4e84477fe
--- /dev/null
+++ b/micro-ui/web/micro-ui-internals/packages/modules/sample/src/configs/IndividualCreateConfig.js
@@ -0,0 +1,299 @@
+export const newConfig = [
+ {
+ head: "Create Individual",
+ body: [
+ {
+ inline: true,
+ label: "Applicant Name",
+ isMandatory: false,
+ key: "applicantname",
+ type: "text",
+ disable: false,
+ populators: { name: "applicantname", error: "Required", validation: { pattern: /^[A-Za-z]+$/i } },
+ },
+ {
+ inline: true,
+ label: "date of birth",
+ isMandatory: false,
+ key: "dob",
+ type: "date",
+ disable: false,
+ populators: { name: "dob", error: "Required" },
+ },
+ {
+ isMandatory: true,
+ key: "genders",
+ type: "dropdown",
+ label: "Enter Gender",
+ disable: false,
+ populators: {
+ name: "genders",
+ optionsKey: "name",
+ error: "required ",
+ mdmsConfig: {
+ masterName: "GenderType",
+ moduleName: "common-masters",
+ localePrefix: "COMMON_GENDER",
+ },
+ },
+ },
+
+ {
+ label: "Phone number",
+ isMandatory: true,
+ key: "phno",
+ type: "number",
+ disable: false,
+ populators: { name: "phno", error: "Required", validation: { min: 0, max: 9999999999 } },
+ },
+ ],
+ },
+ {
+ head: "Residential Details",
+ body: [
+ {
+ inline: true,
+ label: "Pincode",
+ isMandatory: true,
+ key: "pincode",
+ type: "number",
+ disable: false,
+ populators: { name: "pincode", error: "Required " },
+ },
+ {
+ inline: true,
+ label: "City",
+ isMandatory: true,
+ key: "city",
+ type: "text",
+ disable: false,
+ populators: { name: "city", error: " Required ", validation: { pattern: /^[A-Za-z]+$/i } },
+ },
+ {
+ isMandatory: false,
+ key: "locality",
+ type: "dropdown",
+ label: "Enter locality",
+ disable: false,
+ populators: {
+ name: "locality",
+ optionsKey: "name",
+ error: " Required",
+ required: true,
+
+ options: [
+ {
+ code: "SUN01",
+ name: "Ajit Nagar - Area1",
+ label: "Locality",
+ latitude: "31.63089",
+ longitude: "74.871552",
+ area: "Area1",
+ pincode: [143001],
+ boundaryNum: 1,
+ children: [],
+ },
+ {
+ code: "SUN02",
+ name: "Back Side 33 KVA Grid Patiala Road",
+ label: "Locality",
+ latitude: null,
+ longitude: null,
+ area: "Area1",
+ pincode: [143001],
+ boundaryNum: 1,
+ children: [],
+ },
+ {
+ code: "SUN03",
+ name: "Bharath Colony",
+ label: "Locality",
+ latitude: null,
+ longitude: null,
+ area: "Area1",
+ pincode: [143001],
+ boundaryNum: 1,
+ children: [],
+ },
+ {
+ code: "SUN10",
+ name: "Backside Brijbala Hospital - Area3",
+ label: "Locality",
+ latitude: null,
+ longitude: null,
+ area: "Area3",
+ pincode: null,
+ boundaryNum: 1,
+ children: [],
+ },
+ {
+ code: "SUN11",
+ name: "Bigharwal Chowk to Railway Station - Area2",
+ label: "Locality",
+ latitude: null,
+ longitude: null,
+ area: "Area2",
+ pincode: null,
+ boundaryNum: 1,
+ children: [],
+ },
+ {
+ code: "SUN12",
+ name: "Chandar Colony Biggarwal Road - Area2",
+ label: "Locality",
+ latitude: null,
+ longitude: null,
+ area: "Area2",
+ pincode: [143001],
+ boundaryNum: 1,
+ children: [],
+ },
+ {
+ code: "SUN20",
+ name: "Aggarsain Chowk to Mal Godown - Both Sides - Area3",
+ label: "Locality",
+ latitude: null,
+ longitude: null,
+ area: "Area3",
+ pincode: null,
+ boundaryNum: 1,
+ children: [],
+ },
+ {
+ code: "SUN21",
+ name: "ATAR SINGH COLONY - Area2",
+ label: "Locality",
+ latitude: null,
+ longitude: null,
+ area: "Area2",
+ pincode: null,
+ boundaryNum: 1,
+ children: [],
+ },
+ {
+ code: "SUN22",
+ name: "Back Side Naina Devi Mandir - Area2",
+ label: "Locality",
+ latitude: null,
+ longitude: null,
+ area: "Area2",
+ pincode: null,
+ boundaryNum: 1,
+ children: [],
+ },
+ {
+ code: "SUN30",
+ name: "Bakhtaur Nagar - Area1",
+ label: "Locality",
+ latitude: null,
+ longitude: null,
+ area: "Area1",
+ pincode: null,
+ boundaryNum: 1,
+ children: [],
+ },
+ {
+ code: "SUN31",
+ name: "Bhai Mool Chand Sahib Colony - Area1",
+ label: "Locality",
+ latitude: null,
+ longitude: null,
+ area: "Area1",
+ pincode: null,
+ boundaryNum: 1,
+ children: [],
+ },
+ {
+ code: "SUN32",
+ name: "College Road (Southern side) - Area2",
+ label: "Locality",
+ latitude: null,
+ longitude: null,
+ area: "Area2",
+ pincode: null,
+ boundaryNum: 1,
+ children: [],
+ },
+ {
+ code: "SUN33",
+ name: "Ekta Colony (Southern Side) - Area1",
+ label: "Locality",
+ latitude: null,
+ longitude: null,
+ area: "Area1",
+ pincode: null,
+ boundaryNum: 1,
+ children: [],
+ },
+ ],
+ },
+ },
+
+ {
+ inline: true,
+ label: "Street",
+ isMandatory: false,
+ key: "street",
+ type: "text",
+ disable: false,
+ populators: { name: "street", error: "Required ", validation: { pattern: /^[A-Za-z]+$/i } },
+ },
+ {
+ inline: true,
+ label: "Door Number",
+ isMandatory: true,
+ key: "doorno",
+ type: "number",
+ disable: false,
+ populators: { name: "doorno", error: " Required ", validation: { min: 0, max: 9999999999 } },
+ },
+ {
+ inline: true,
+ label: "Landmark",
+ isMandatory: false,
+ key: "landmark",
+ type: "text",
+ disable: false,
+ populators: { name: "landmark", error: " Required", validation: { pattern: /^[A-Za-z]+$/i } },
+ },
+ ],
+ },
+ {
+ head: "Sample Details",
+ key: "sampleDetails",
+ body: [
+ {
+ isMandatory: false,
+ key: "sampleDetails",
+ type: "component", // for custom component
+ component: "SampleMultiComponent", // name of the component as per component registry
+ withoutLabel: true,
+ disable: false,
+ customProps: {},
+ populators: {
+ name: "sampleDetails",
+ required: true,
+ },
+ },
+ ],
+ },
+ {
+ head: "Additional Details",
+ key: "additionalDetails",
+ body: [
+ {
+ isMandatory: false,
+ key: "additionalDetails",
+ type: "component", // for custom component
+ component: "SampleAdditionalComponent", // name of the component as per component registry
+ withoutLabel: true,
+ disable: false,
+ customProps: {},
+ populators: {
+ name: "additionalDetails",
+ required: true,
+ },
+ },
+ ],
+ },
+];
diff --git a/micro-ui/web/micro-ui-internals/packages/modules/sample/src/configs/IndividualSearchCOnfig.js b/micro-ui/web/micro-ui-internals/packages/modules/sample/src/configs/IndividualSearchCOnfig.js
new file mode 100644
index 00000000000..536cd48b1b6
--- /dev/null
+++ b/micro-ui/web/micro-ui-internals/packages/modules/sample/src/configs/IndividualSearchCOnfig.js
@@ -0,0 +1,98 @@
+const defaultSearchValues = {
+ individualName: "",
+ mobileNumber: "",
+ IndividualID: ""
+ };
+export const searchconfig = () =>
+{
+ return {
+ label: "Individual Search",
+ type: "search",
+ apiDetails: {
+ serviceName: "/individual/v1/_search",
+ requestParam: {
+ "tenantId":Digit.ULBService.getCurrentTenantId()
+ },
+ requestBody: {
+ apiOperation: "SEARCH",
+ Individual: {
+ "tenantId": Digit.ULBService.getCurrentTenantId(),
+ },
+ },
+ masterName: "commonUiConfig",
+ moduleName: "SearchIndividualConfig",
+ minParametersForSearchForm: 0,
+ tableFormJsonPath: "requestParam",
+ filterFormJsonPath: "requestBody.Individual",
+ searchFormJsonPath: "requestBody.Individual",
+ },
+ sections: {
+ search: {
+ uiConfig: {
+ formClassName: "custom-both-clear-search",
+ primaryLabel: "ES_COMMON_SEARCH",
+ secondaryLabel: "ES_COMMON_CLEAR_SEARCH",
+ minReqFields: 0,
+ defaultValues: defaultSearchValues, // Set default values for search fields
+ fields: [
+ {
+ label: "Applicant name ",
+ isMandatory: false,
+ key: "individualName",
+ type: "text",
+ populators: {
+ name: "individualName",
+ error: "Required",
+ validation: { pattern: /^[A-Za-z]+$/i }
+ },
+ },
+ {
+ label: "Phone number",
+ isMandatory: false,
+ key: "Phone number",
+ type: "number",
+ disable: false,
+ populators: { name: "mobileNumber", error: "sample error message", validation: { min: 0, max: 999999999} },
+ },
+ {
+ label: "Individual Id ",
+ isMandatory: false,
+ type: "text",
+ disable: false,
+ populators: {
+ name: "individualId",
+ },
+ },
+ ],
+ },
+
+ show: true
+ },
+ searchResult: {
+ tenantId: Digit.ULBService.getCurrentTenantId(),
+ uiConfig: {
+ columns: [
+ {
+ label: "IndividualID",
+ jsonPath: "individualId",
+ },
+
+ {
+ label: "Name",
+ jsonPath: "name.givenName",
+
+ },
+ {
+ label: "Address",
+ jsonPath: "address.locality.code",
+ },
+ ],
+
+ enableColumnSort: true,
+ resultsJsonPath: "Individual"
+ },
+ show: true,
+ },
+ },
+ };
+};
\ No newline at end of file
diff --git a/micro-ui/web/micro-ui-internals/packages/modules/sample/src/configs/SampleAdvancedSearchConfig.js b/micro-ui/web/micro-ui-internals/packages/modules/sample/src/configs/SampleAdvancedSearchConfig.js
new file mode 100644
index 00000000000..eee144d8cc7
--- /dev/null
+++ b/micro-ui/web/micro-ui-internals/packages/modules/sample/src/configs/SampleAdvancedSearchConfig.js
@@ -0,0 +1,237 @@
+export const newConfig = [
+ {
+ head: "Sample Object Creation",
+ subHead: "Supporting Details",
+ body: [
+ {
+ inline: true,
+ label: "Salutation",
+ isMandatory: false,
+ type: "text",
+ disable: false,
+ populators: { name: "salutation", error: "Required", validation: { pattern: /^[A-Za-z]+$/i, maxlength: 5 } },
+ },
+ {
+ inline: true,
+ label: "Name",
+ isMandatory: true,
+ type: "text",
+ disable: false,
+ populators: { name: "name", error: "Required", validation: { pattern: /^[A-Za-z]+$/i } },
+ },
+ {
+ isMandatory: true,
+ type: "dropdown",
+ key: "genders",
+ label: "Gender",
+ disable: false,
+ populators: {
+ name: "gender",
+ optionsKey: "name",
+ error: "sample required message",
+ required: true,
+ mdmsConfig: {
+ masterName: "GenderType",
+ moduleName: "common-masters",
+ localePrefix: "COMMON_GENDER",
+ },
+ },
+ },
+ {
+ label: "Age",
+ isMandatory: true,
+ type: "number",
+ disable: false,
+ populators: { name: "age", error: "sample error message", validation: { min: 0, max: 100 } },
+ },
+ {
+ inline: true,
+ label: "DOB",
+ isMandatory: true,
+ description: "Please enter a valid Date of birth",
+ type: "date",
+ disable: false,
+ populators: { name: "dob", error: "Required", validation: { required: true } },
+ },
+ {
+ label: "Phone number",
+ isMandatory: true,
+ type: "mobileNumber",
+ disable: false,
+ populators: { name: "phNumber", error: "sample error message", validation: { min: 5999999999, max: 9999999999 } },
+ },
+
+ {
+ label: "COMMON_WARD",
+ type: "locationdropdown",
+ isMandatory: false,
+ disable: false,
+ populators: {
+ name: "ward",
+ type: "ward",
+ optionsKey: "i18nKey",
+ defaultText: "COMMON_SELECT_WARD",
+ selectedText: "COMMON_SELECTED",
+ allowMultiSelect: false,
+ },
+ },
+ {
+ inline: true,
+ label: "Address",
+ isMandatory: false,
+ description: "address details",
+ type: "textarea",
+ disable: false,
+ populators: { name: "address", error: "Required", validation: { pattern: /^[A-Za-z]+$/i } },
+ },
+
+ {
+ isMandatory: true,
+ key: "referenceOfficer",
+ type: "radioordropdown",
+ label: "Reference Officer",
+ disable: false,
+ preProcess: {
+ updateDependent: ["populators.options"],
+ },
+ populators: {
+ name: "referenceOfficer",
+ optionsKey: "name",
+ error: "WORKS_REQUIRED_ERR",
+ required: false,
+ optionsCustomStyle: {
+ top: "2.5rem",
+ },
+ options: [],
+ },
+ },
+ {
+ inline: true,
+ label: "Enter Random Amount",
+ isMandatory: false,
+ key: "amountInRs",
+ type: "amount",
+ disable: false,
+ preProcess: {
+ convertStringToRegEx: ["populators.validation.pattern"],
+ },
+ populators: {
+ prefix: "₹ ",
+ name: "amountInRs",
+ error: "PROJECT_PATTERN_ERR_MSG_PROJECT_ESTIMATED_COST",
+ validation: {
+ pattern: "^[1-9]\\d*(\\.\\d+)?$",
+ maxlength: 16,
+ step: "0.01",
+ min: 0,
+ max: 5000000,
+ },
+ },
+ },
+ ],
+ },
+ {
+ head: "Application Subheading",
+ body: [
+ {
+ isMandatory: true,
+ type: "dropdown",
+ key: "department",
+ label: "department",
+ disable: false,
+ populators: {
+ name: "department",
+ optionsKey: "name",
+ error: "sample required message",
+ required: true,
+ mdmsConfig: {
+ masterName: "Department",
+ moduleName: "common-masters",
+ localePrefix: "COMMON_DEPARTMENT",
+ },
+ },
+ },
+ {
+ isMandatory: true,
+ key: "nameOfOfficerInCharge",
+ type: "radioordropdown",
+ label: "Name of the officer in selected department",
+ disable: false,
+ preProcess: {
+ updateDependent: ["populators.options"],
+ },
+ populators: {
+ name: "nameOfOfficerInCharge",
+ optionsKey: "name",
+ error: "WORKS_REQUIRED_ERR",
+ required: false,
+ optionsCustomStyle: {
+ top: "2.5rem",
+ },
+ options: [],
+ },
+ },
+ {
+ label: "Additional Details",
+ isMandatory: true,
+ description: "Additional Details if any",
+ key: "additionalDetails",
+ type: "text",
+ disable: false,
+ populators: { name: "additionalDetails", error: "sample error message", validation: { pattern: /^[A-Za-z]+$/i } },
+ },
+
+ // {
+ // isMandatory: true,
+ // key: "genders",
+ // type: "radioordropdown",
+ // label: "Enter Gender",
+ // disable: false,
+ // populators: {
+ // name: "genders",
+ // optionsKey: "name",
+ // error: "sample required message",
+ // required: true,
+ // mdmsConfig: {
+ // masterName: "GenderType",
+ // moduleName: "common-masters",
+ // localePrefix: "COMMON_GENDER",
+ // },
+ // },
+ // },
+ {
+ isMandatory: false,
+ key: "priority",
+ type: "radio",
+ label: "Enter Priority of Application",
+ disable: false,
+ populators: {
+ name: "priority",
+ optionsKey: "name",
+ error: "sample required message",
+ required: false,
+ options: [
+ {
+ code: "1",
+ name: "P1",
+ },
+ {
+ code: "2",
+ name: "P2",
+ },
+ {
+ code: "3",
+ name: "P3",
+ },
+ ],
+ },
+ },
+ {
+ type: "component",
+ component: "SampleComponent",
+ withoutLabel: true,
+ key: "comments",
+ },
+ ],
+ },
+ ];
\ No newline at end of file
diff --git a/micro-ui/web/micro-ui-internals/packages/modules/sample/src/configs/SampleConfig.js b/micro-ui/web/micro-ui-internals/packages/modules/sample/src/configs/SampleConfig.js
new file mode 100644
index 00000000000..b6c687ad32d
--- /dev/null
+++ b/micro-ui/web/micro-ui-internals/packages/modules/sample/src/configs/SampleConfig.js
@@ -0,0 +1,2660 @@
+export const SampleConfig = () => {
+ return {
+ SampleConfig: [
+ {
+ form: [
+ {
+ head: "TEXT",
+ body: [
+ {
+ inline: true,
+ label: "Default",
+ isMandatory: false,
+ type: "text",
+ disable: false,
+ populators: { name: "text-Default", error: "Error!" },
+ },
+ {
+ inline: true,
+ label: "With InnerLabel",
+ isMandatory: false,
+ type: "text",
+ disable: false,
+ placeholder: "Inner label",
+ populators: { name: "text-With InnerLabel", error: "Error!" },
+ },
+ {
+ inline: true,
+ label: "Disabled",
+ isMandatory: false,
+ type: "text",
+ disable: true,
+ populators: { name: "text-Disabled", error: "Error!" },
+ },
+ {
+ inline: true,
+ label: "Noneditable",
+ isMandatory: false,
+ type: "text",
+ disable: false,
+ nonEditable: true,
+ populators: { name: "text-Noneditable", error: "Error!" },
+ },
+ {
+ inline: true,
+ label: "Required Field",
+ isMandatory: true,
+ type: "text",
+ disable: false,
+ populators: {
+ name: "text-Required Field",
+ error: "This field is mandatory!",
+ },
+ },
+ {
+ inline: true,
+ label: "With Description",
+ isMandatory: false,
+ type: "text",
+ disable: false,
+ description: "Help Text",
+ populators: { name: "text-With Description", error: "Error" },
+ },
+ {
+ inline: true,
+ label: "With CharCount",
+ isMandatory: false,
+ type: "text",
+ disable: false,
+ description:
+ "If maxlength is specified in the validation,then the user cannot enter more than that,else max charCount will be shown as 0 by default.",
+ charCount: true,
+ populators: { name: "text-With CharCount", error: "Error!" },
+ },
+ {
+ inline: true,
+ label: "With Des&CharCount",
+ isMandatory: false,
+ type: "text",
+ disable: false,
+ description: "Help Text",
+ charCount: true,
+ populators: { name: "text-With Des&CharCount", error: "Error!" },
+ },
+ {
+ inline: true,
+ label: "Required Field With Des",
+ isMandatory: true,
+ type: "text",
+ disable: false,
+ description: "Help text",
+ charCount: true,
+ populators: {
+ name: "text-Required Field With Des",
+ error: "This field is mandatory!",
+ },
+ },
+ {
+ inline: true,
+ label: "Required",
+ isMandatory: true,
+ type: "text",
+ disable: false,
+ populators: {
+ name: "text-Required",
+ error: "This field is mandatory!",
+ },
+ },
+ {
+ inline: true,
+ label: "With Info",
+ isMandatory: false,
+ type: "text",
+ disable: false,
+ infoMessage: "This is text field",
+ populators: { name: "text-With Info", error: "Error!" },
+ },
+ {
+ inline: true,
+ label: "Info&Mandatory",
+ isMandatory: true,
+ type: "text",
+ disable: false,
+ infoMessage: "This is mandatory",
+ populators: {
+ name: "text-Info&Mandatory",
+ error: "This field is mandatory!",
+ },
+ },
+ {
+ inline: true,
+ label: "With Innerlabel",
+ placeholder: "Enter Text",
+ isMandatory: false,
+ type: "text",
+ disable: false,
+ populators: { name: "text-With Innerlabel", error: "Error!" },
+ },
+ {
+ inline: true,
+ label: "With Validation max chars as 10 and min chars as 2",
+ isMandatory: true,
+ type: "text",
+ disable: false,
+ charCount: true,
+ populators: {
+ name: "text-With Validation",
+ wrapLabel: true,
+ error: "Enter minimum two characters and maximum ten characters",
+ validation: { minlength: 2, maxlength: 10 },
+ },
+ },
+ {
+ inline: true,
+ label: "With CustomIcon and Action",
+ isMandatory: false,
+ type: "text",
+ disable: false,
+ populators: {
+ name: "text-With CustomIcon",
+ error: "Error!",
+ customIcon: "Article",
+ onIconSelection: (event) => {
+ console.log("Custom icon clicked!", event);
+ },
+ },
+ },
+ {
+ inline: true,
+ label: "With all properties",
+ placeholder: "Enter Text",
+ isMandatory: true,
+ type: "text",
+ disable: false,
+ infoMessage: "Complete text field",
+ description: "Help Text",
+ charCount: true,
+ populators: {
+ name: "text-Complete",
+ error: "This field is mandatory!",
+ wrapLabel: true,
+ },
+ },
+ {
+ inline: true,
+ label: "Max chars allowed for the label are 64, then ellipsis are added.",
+ isMandatory: true,
+ type: "text",
+ disable: false,
+ infoMessage: "hvgvbsdvdvfvfd",
+ description: "text-With MaxCharsLabel",
+ populators: {
+ name: "text-With MaxCharsLabel",
+ error: "Error!",
+ wrapLabel: true,
+ },
+ },
+ {
+ inline: true,
+ label: "Wraplabel-false ellipsis-added",
+ isMandatory: false,
+ type: "text",
+ disable: false,
+ description: "text-Withot wrapLabel",
+ populators: { name: "text-With MaxCharsLabel", error: "Error!" },
+ },
+ {
+ inline: true,
+ label: "With MaxDes&CharCount",
+ isMandatory: false,
+ type: "text",
+ disable: false,
+ description:
+ "Maximum characters allowed for the description is 256 characters,If more than 256 characters are sent then ellipsis will be added for the description and shown in this way.The error also follows the same way,so max characters allowed for description - 256,,",
+ charCount: true,
+ populators: { name: "text-With MaxDes&CharCount", error: "Error!" },
+ },
+ {
+ inline: true,
+ label: "With MaxErr&CharCount",
+ isMandatory: true,
+ type: "text",
+ disable: false,
+ description: "",
+ charCount: true,
+ populators: {
+ name: "text-With MaxErr&CharCount",
+ error:
+ "Maximum characters allowed for the error is 256 characters,If more than 256 characters are sent then ellipsis will be added for the error message and shown in this way.The description also follows the same way.The maximum characters allowed for error - 256.",
+ },
+ },
+ {
+ inline: true,
+ label: "Without Label",
+ isMandatory: false,
+ type: "text",
+ disable: false,
+ withoutLabel: true,
+ description: "without label",
+ populators: { name: "text-Without Label", error: "Error!" },
+ },
+ ],
+ },
+ {
+ head: "DATE",
+ body: [
+ {
+ inline: true,
+ label: "Default",
+ isMandatory: false,
+ description: "",
+ type: "date",
+ disable: false,
+ populators: { name: "date-Default", error: "Error!" },
+ },
+ {
+ inline: true,
+ label: "With Innerlabel",
+ isMandatory: false,
+ description: "",
+ type: "date",
+ disable: false,
+ placeholder: "date",
+ populators: { name: "date-With Innerlabel", error: "Error!" },
+ },
+ {
+ inline: true,
+ label: "Disabled",
+ isMandatory: false,
+ description: "",
+ type: "date",
+ disable: true,
+ populators: { name: "date-Disabled", error: "Error!" },
+ },
+ {
+ inline: true,
+ label: "Noneditable",
+ isMandatory: false,
+ description: "",
+ type: "date",
+ disable: false,
+ nonEditable: true,
+ populators: { name: "date-Noneditable", error: "Error!" },
+ },
+ {
+ inline: true,
+ label: "Required Field",
+ isMandatory: true,
+ description: "",
+ type: "date",
+ disable: false,
+ populators: {
+ name: "date-Required Field",
+ error: "This field is mandatory!",
+ },
+ },
+ {
+ inline: true,
+ label: "With Info",
+ isMandatory: false,
+ description: "",
+ type: "date",
+ disable: false,
+ infoMessage: "Select the date",
+ populators: { name: "date-With Info", error: "Error!" },
+ },
+ ],
+ },
+ {
+ head: "TIME",
+ body: [
+ {
+ inline: true,
+ label: "Default",
+ isMandatory: false,
+ description: "",
+ type: "time",
+ disable: false,
+ populators: { name: "time-Default", error: "Error!" },
+ },
+ {
+ inline: true,
+ label: "With Innerlabel",
+ isMandatory: false,
+ description: "",
+ type: "time",
+ disable: false,
+ placeholder: "time",
+ populators: { name: "time-With Innerlabel", error: "Error!" },
+ },
+ {
+ inline: true,
+ label: "Disabled",
+ isMandatory: false,
+ description: "",
+ type: "time",
+ disable: true,
+ populators: { name: "time-Disabled", error: "Error!" },
+ },
+ {
+ inline: true,
+ label: "Noneditable",
+ isMandatory: false,
+ description: "",
+ type: "time",
+ disable: false,
+ nonEditable: true,
+ populators: { name: "time-Noneditable", error: "Error!" },
+ },
+ {
+ inline: true,
+ label: "Required Field",
+ isMandatory: true,
+ description: "",
+ type: "time",
+ disable: false,
+ populators: {
+ name: "time-Required Field",
+ error: "This field is mandatory!",
+ },
+ },
+ {
+ inline: true,
+ label: "With Info",
+ isMandatory: false,
+ description: "",
+ type: "time",
+ disable: false,
+ infoMessage: "Select time",
+ populators: { name: "time-With Info", error: "Error!" },
+ },
+ ],
+ },
+ {
+ head: "GEOLOACTION",
+ body: [
+ {
+ inline: true,
+ label: "Default",
+ isMandatory: false,
+ description: "",
+ type: "geolocation",
+ disable: false,
+ populators: { name: "geolocation-Default", error: "Error!" },
+ },
+ {
+ inline: true,
+ label: "With Innerlabel",
+ isMandatory: false,
+ description: "",
+ type: "geolocation",
+ disable: false,
+ placeholder: "Innerlabel",
+ populators: { name: "geolocation-With Innerlabel", error: "Error!" },
+ },
+ {
+ inline: true,
+ label: "Disabled",
+ isMandatory: false,
+ description: "",
+ type: "geolocation",
+ disable: true,
+ populators: { name: "geolocation-Disabled", error: "Error!" },
+ },
+ {
+ inline: true,
+ label: "Noneditable",
+ isMandatory: false,
+ description: "",
+ type: "geolocation",
+ disable: false,
+ nonEditable: true,
+ populators: { name: "geolocation-Noneditable", error: "Error!" },
+ },
+ {
+ inline: true,
+ label: "Required Field",
+ isMandatory: true,
+ description: "",
+ type: "geolocation",
+ disable: false,
+ populators: {
+ name: "geolocation-Required Field",
+ error: "This field is mandatory!",
+ },
+ },
+ {
+ inline: true,
+ label: "With Info",
+ isMandatory: false,
+ description: "",
+ type: "geolocation",
+ disable: false,
+ infoMessage: "give your location details",
+ populators: { name: "geolocation-With Info", error: "Error!" },
+ },
+ ],
+ },
+ {
+ head: "NUMERIC",
+ body: [
+ {
+ inline: true,
+ label: "Default",
+ isMandatory: false,
+ description: "",
+ type: "numeric",
+ disable: false,
+ populators: { name: "numeric-Default", error: "Error!" },
+ },
+ {
+ inline: true,
+ label: "disableTextField",
+ isMandatory: false,
+ description: "",
+ type: "numeric",
+ disable: false,
+ populators: { name: "numeric-disableTextField", error: "Error!", disableTextField: true },
+ },
+ {
+ inline: true,
+ label: "With Innerlabel",
+ isMandatory: false,
+ description: "",
+ type: "numeric",
+ disable: false,
+ placeholder: "0",
+ populators: { name: "numeric-With Innerlabel", error: "Error!" },
+ },
+ {
+ inline: true,
+ label: "With Step Value",
+ isMandatory: false,
+ description: "",
+ type: "numeric",
+ disable: false,
+ step: "2",
+ populators: { name: "numeric-With Step Value", error: "Error!" },
+ },
+ {
+ inline: true,
+ label: "Disabled",
+ isMandatory: false,
+ description: "",
+ type: "numeric",
+ disable: true,
+ populators: { name: "numeric-Disabled", error: "Error!" },
+ },
+ {
+ inline: true,
+ label: "Noneditable",
+ isMandatory: false,
+ description: "",
+ type: "numeric",
+ disable: false,
+ nonEditable: true,
+ populators: { name: "numeric-Noneditable", error: "Error!" },
+ },
+ {
+ inline: true,
+ label: "Required Field",
+ isMandatory: true,
+ description: "",
+ type: "numeric",
+ disable: false,
+ populators: {
+ name: "numeric-Required Field",
+ error: "This field is mandatory!",
+ },
+ },
+ {
+ inline: true,
+ label: "With Info",
+ isMandatory: false,
+ description: "",
+ type: "numeric",
+ disable: false,
+ infoMessage: "this is numeric field",
+ populators: { name: "numeric-With Info", error: "Error!" },
+ },
+ {
+ inline: true,
+ label: "With minimum 2 and maximum 10",
+ isMandatory: false,
+ description: "",
+ type: "numeric",
+ disable: false,
+ populators: {
+ name: "numeric-With Validation",
+ error: "Enter value in between 1 to 11!",
+ validation: { min: 2, max: 10 },
+ wrapLabel: true,
+ },
+ },
+ ],
+ },
+ {
+ head: "PREFIX",
+ body: [
+ {
+ inline: true,
+ label: "Default",
+ isMandatory: false,
+ description: "",
+ type: "text",
+ disable: false,
+ populators: { name: "prefix-Default", error: "Error!", prefix: "₹" },
+ },
+ {
+ inline: true,
+ label: "With Innerlabel",
+ isMandatory: false,
+ description: "",
+ type: "text",
+ disable: false,
+ placeholder: "Prefix",
+ populators: {
+ name: "prefix-With Innerlabel",
+ error: "Error!",
+ prefix: "₹",
+ },
+ },
+ {
+ inline: true,
+ label: "Large Prefix",
+ isMandatory: false,
+ description: "",
+ type: "text",
+ disable: false,
+ populators: {
+ name: "prefix-Large Prefix",
+ error: "Error!",
+ prefix: "1234567890",
+ },
+ },
+ {
+ inline: true,
+ label: "Disabled",
+ isMandatory: false,
+ description: "",
+ type: "text",
+ disable: true,
+ populators: { name: "prefix-Disabled", error: "Error!", prefix: "₹" },
+ },
+ {
+ inline: true,
+ label: "Noneditable",
+ isMandatory: false,
+ description: "",
+ type: "text",
+ disable: false,
+ nonEditable: true,
+ populators: {
+ name: "prefix-Noneditable",
+ error: "Error!",
+ prefix: "₹",
+ },
+ },
+ {
+ inline: true,
+ label: "Required Field",
+ isMandatory: true,
+ description: "",
+ type: "text",
+ disable: false,
+ populators: {
+ name: "prefix-Required Field",
+ error: "This field is mandatory!",
+ prefix: "₹",
+ },
+ },
+ {
+ inline: true,
+ label: "With Description",
+ isMandatory: false,
+ description: "",
+ type: "text",
+ disable: false,
+ description: "Help text",
+ populators: { name: "prefix-Default", error: "Error!", prefix: "₹" },
+ },
+ {
+ inline: true,
+ label: "With Info",
+ isMandatory: false,
+ description: "",
+ type: "text",
+ disable: false,
+ infoMessage: "text field with prefix",
+ populators: { name: "prefix-With Info", error: "Error!", prefix: "₹" },
+ },
+ ],
+ },
+ {
+ head: "SUFFIX",
+ body: [
+ {
+ inline: true,
+ label: "Default",
+ isMandatory: false,
+ description: "",
+ type: "text",
+ disable: false,
+ populators: { name: "suffix-Default", error: "Error!", suffix: "₹" },
+ },
+ {
+ inline: true,
+ label: "With Innerlabel",
+ isMandatory: false,
+ description: "",
+ type: "text",
+ disable: false,
+ placeholder: "suffix",
+ populators: {
+ name: "suffix-With Innerlabel",
+ error: "Error!",
+ suffix: "₹",
+ },
+ },
+ {
+ inline: true,
+ label: "Large Suffix",
+ isMandatory: false,
+ description: "",
+ type: "text",
+ disable: false,
+ populators: {
+ name: "suffix-Large Suffix",
+ error: "Error!",
+ suffix: "1234567890",
+ },
+ },
+ {
+ inline: true,
+ label: "Disabled",
+ isMandatory: false,
+ description: "",
+ type: "text",
+ disable: true,
+ populators: { name: "suffix-Disabled", error: "Error!", suffix: "₹" },
+ },
+ {
+ inline: true,
+ label: "Noneditable",
+ isMandatory: false,
+ description: "",
+ type: "text",
+ disable: false,
+ nonEditable: true,
+ populators: {
+ name: "suffix-Noneditable",
+ error: "Error!",
+ suffix: "₹",
+ },
+ },
+ {
+ inline: true,
+ label: "Required Field",
+ isMandatory: true,
+ description: "",
+ type: "text",
+ disable: false,
+ populators: {
+ name: "suffix-Required Field",
+ error: "This field is mandatory!",
+ suffix: "₹",
+ },
+ },
+ {
+ inline: true,
+ label: "With Description",
+ isMandatory: false,
+ description: "",
+ type: "text",
+ disable: false,
+ description: "Help Text",
+ populators: {
+ name: "suffix-With Description",
+ error: "Error!",
+ suffix: "₹",
+ },
+ },
+ {
+ inline: true,
+ label: "With Info",
+ isMandatory: false,
+ description: "",
+ type: "text",
+ disable: false,
+ infoMessage: "text field with suffix",
+ populators: { name: "suffix-With Info", error: "Error!", suffix: "₹" },
+ },
+ ],
+ },
+ {
+ head: "PASSWORD",
+ body: [
+ {
+ inline: true,
+ label: "Default",
+ isMandatory: false,
+ description: "",
+ type: "password",
+ disable: false,
+ populators: { name: "password-Default", error: "Error!" },
+ },
+ {
+ inline: true,
+ label: "With Innerlabel",
+ isMandatory: false,
+ description: "",
+ type: "password",
+ disable: false,
+ placeholder: "Password",
+ populators: { name: "password-With Innerlabel", error: "Error!" },
+ },
+ {
+ inline: true,
+ label: "Disabled",
+ isMandatory: false,
+ description: "",
+ type: "password",
+ disable: true,
+ populators: { name: "password-Disabled", error: "Error!" },
+ },
+ {
+ inline: true,
+ label: "Noneditable",
+ isMandatory: false,
+ description: "",
+ type: "password",
+ disable: false,
+ nonEditable: true,
+ populators: { name: "password-Noneditable", error: "Error!" },
+ },
+ {
+ inline: true,
+ label: "Required Field",
+ isMandatory: true,
+ description: "",
+ type: "password",
+ disable: false,
+ populators: {
+ name: "password-Required Field",
+ error: "This field is mandatory!",
+ },
+ },
+ {
+ inline: true,
+ label: "With Description",
+ isMandatory: false,
+ description: "",
+ type: "password",
+ disable: false,
+ description: "Help Text",
+ populators: { name: "password-With Description", error: "Error!" },
+ },
+ {
+ inline: true,
+ label: "With Info",
+ isMandatory: false,
+ description: "",
+ type: "password",
+ disable: false,
+ infoMessage: "This is password field",
+ populators: { name: "password-With Info", error: "Error!" },
+ },
+ {
+ inline: true,
+ label: "With Validation",
+ isMandatory: false,
+ type: "password",
+ disable: false,
+ populators: {
+ name: "password-With Validation",
+ error: "Error!",
+ validation: { minlength: 6 },
+ },
+ },
+ ],
+ },
+ {
+ head: "SEARCH",
+ body: [
+ {
+ inline: true,
+ label: "Default",
+ isMandatory: false,
+ description: "",
+ type: "search",
+ disable: false,
+ populators: { name: "search-Default", error: "Error!" },
+ },
+ {
+ inline: true,
+ label: "With Innerlabel",
+ isMandatory: false,
+ description: "",
+ type: "search",
+ disable: false,
+ placeholder: "Inner label",
+ populators: { name: "search-With Innerlabel", error: "Error!" },
+ },
+ {
+ inline: true,
+ label: "Disabled",
+ isMandatory: false,
+ description: "",
+ type: "search",
+ disable: true,
+ populators: { name: "search-Disabled", error: "Error!" },
+ },
+ {
+ inline: true,
+ label: "Noneditable",
+ isMandatory: false,
+ description: "",
+ type: "search",
+ disable: false,
+ nonEditable: true,
+ populators: { name: "search-Noneditable", error: "Error!" },
+ },
+ {
+ inline: true,
+ label: "Required Field",
+ isMandatory: true,
+ description: "",
+ type: "search",
+ disable: false,
+ populators: {
+ name: "search-Required Field",
+ error: "This field is mandatory!",
+ },
+ },
+ {
+ inline: true,
+ label: "With Description",
+ isMandatory: false,
+ description: "",
+ type: "search",
+ disable: false,
+ description: "Help Text",
+ populators: { name: "search-With Description", error: "Error!" },
+ },
+ {
+ inline: true,
+ label: "With Info",
+ isMandatory: false,
+ description: "",
+ type: "search",
+ disable: false,
+ infoMessage: "serach field",
+ populators: { name: "search-With Info", error: "Error!" },
+ },
+ ],
+ },
+ {
+ head: "TEXTAREA",
+ body: [
+ {
+ inline: true,
+ label: "Default",
+ isMandatory: false,
+ description: "",
+ type: "textarea",
+ disable: false,
+ populators: { name: "textarea-Default", error: "Error!" },
+ },
+ {
+ inline: true,
+ label: "With InnerLabel",
+ placeholder: "Innerlabel",
+ isMandatory: false,
+ type: "textarea",
+ disable: false,
+ populators: { name: "textarea-With InnerLabel", error: "Error!" },
+ },
+ {
+ inline: true,
+ label: "Smart Resize",
+ isMandatory: false,
+ description: "",
+ type: "textarea",
+ disable: false,
+ populators: {
+ name: "textarea-Smart Resize",
+ error: "Error!",
+ resizeSmart: true,
+ },
+ },
+ {
+ inline: true,
+ label: "Disabled",
+ isMandatory: false,
+ description: "",
+ type: "textarea",
+ disable: true,
+ populators: { name: "textarea-Disabled", error: "Error!" },
+ },
+ {
+ inline: true,
+ label: "Noneditable",
+ isMandatory: false,
+ description: "",
+ type: "textarea",
+ disable: false,
+ nonEditable: true,
+ populators: { name: "textarea-Noneditable", error: "Error!" },
+ },
+ {
+ inline: true,
+ label: "Required Field",
+ isMandatory: true,
+ description: "",
+ type: "textarea",
+ disable: false,
+ populators: {
+ name: "textarea-Required Field",
+ error: "This field is mandatory!",
+ },
+ },
+ {
+ inline: true,
+ label: "With Description",
+ isMandatory: false,
+ type: "textarea",
+ disable: false,
+ description: "Help text",
+ populators: { name: "textarea-With Description", error: "Error!" },
+ },
+ {
+ inline: true,
+ label: "With CharCount",
+ isMandatory: false,
+ type: "textarea",
+ disable: false,
+ charCount: true,
+ populators: { name: "textarea-With CharCount", error: "Error!" },
+ },
+ {
+ inline: true,
+ label: "With Des&CharCount",
+ isMandatory: false,
+ type: "textarea",
+ disable: false,
+ description: "Help text",
+ charCount: true,
+ populators: { name: "textarea-With Des&CharCount", error: "Error!" },
+ },
+ {
+ inline: true,
+ label: "Required Field With Des",
+ isMandatory: true,
+ type: "textarea",
+ disable: false,
+ description: "Help text",
+ charCount: true,
+ populators: {
+ name: "textarea-Required Field With Des",
+ error: "This field is mandatory!",
+ },
+ },
+ {
+ inline: true,
+ label: "Mandatory",
+ isMandatory: true,
+ type: "textarea",
+ disable: false,
+ populators: {
+ name: "textarea-Mandatory",
+ error: "This field is mandatory",
+ },
+ },
+ {
+ inline: true,
+ label: "With Info",
+ isMandatory: false,
+ type: "textarea",
+ disable: false,
+ infoMessage: "Textare field information",
+ populators: { name: "textarea-With Info", error: "Error!" },
+ },
+ {
+ inline: true,
+ label: "Info&Mandatory",
+ isMandatory: true,
+ type: "textarea",
+ disable: false,
+ infoMessage: "Textare field information",
+ populators: {
+ name: "textarea-Info&Mandatory",
+ error: "This field is mandatory",
+ },
+ },
+ {
+ inline: true,
+ label: "Complete",
+ placeholder: "Description",
+ isMandatory: true,
+ type: "textarea",
+ disable: false,
+ infoMessage: "Textare field complete",
+ description: "Help Text",
+ charCount: true,
+ populators: {
+ name: "textarea-Complete",
+ error: "This field is mandatory",
+ },
+ },
+ {
+ inline: true,
+ label: "Withoutlabel",
+ isMandatory: false,
+ type: "textarea",
+ disable: false,
+ withoutLabel: true,
+ description: "without label",
+ populators: { name: "textarea-Withoutlabel", error: "Error!" },
+ },
+ ],
+ },
+ {
+ head: "RADIO",
+ body: [
+ {
+ isMandatory: false,
+ type: "radio",
+ key: "genders",
+ label: "Deafult",
+ disable: false,
+ populators: {
+ name: "radio-Deafult",
+ optionsKey: "name",
+ error: "Error!",
+ required: true,
+ mdmsConfig: {
+ masterName: "GenderType",
+ moduleName: "common-masters",
+ localePrefix: "COMMON_GENDER",
+ },
+ },
+ },
+ {
+ isMandatory: false,
+ type: "radio",
+ key: "genders",
+ label: "Disabled",
+ disable: true,
+ populators: {
+ name: "radio-Disabled",
+ optionsKey: "name",
+ error: "Error!",
+ required: true,
+ mdmsConfig: {
+ masterName: "GenderType",
+ moduleName: "common-masters",
+ localePrefix: "COMMON_GENDER",
+ },
+ },
+ },
+ {
+ isMandatory: true,
+ type: "radio",
+ key: "genders",
+ label: "Required Field",
+ disable: false,
+ populators: {
+ name: "radio-Required Field",
+ optionsKey: "name",
+ error: "This field is mandatory!",
+ required: true,
+ mdmsConfig: {
+ masterName: "GenderType",
+ moduleName: "common-masters",
+ localePrefix: "COMMON_GENDER",
+ },
+ },
+ },
+ {
+ isMandatory: false,
+ key: "priority",
+ type: "radio",
+ label: "Default-2",
+ disable: false,
+ populators: {
+ name: "radio-Default-2",
+ optionsKey: "name",
+ error: "Error!",
+ required: false,
+ options: [
+ {
+ code: "1",
+ name: "P1",
+ },
+ {
+ code: "2",
+ name: "P2",
+ },
+ {
+ code: "3",
+ name: "P3",
+ },
+ ],
+ },
+ },
+ ],
+ },
+ {
+ head: "TOGGLE",
+ body: [
+ {
+ isMandatory: false,
+ key: "toggle",
+ type: "toggle",
+ label: "Default",
+ disable: false,
+ populators: {
+ name: "toggle-Default",
+ optionsKey: "name",
+ error: "Error!",
+ required: false,
+ options: [
+ {
+ code: "1",
+ name: "Toggle1",
+ },
+ {
+ code: "2",
+ name: "Toggle2",
+ },
+ {
+ code: "3",
+ name: "Toggle3",
+ },
+ ],
+ },
+ },
+ {
+ isMandatory: false,
+ key: "toggle",
+ type: "toggle",
+ label: "Max Label",
+ disable: false,
+ populators: {
+ name: "toggle-Max Label",
+ optionsKey: "name",
+ error: "Error!",
+ required: false,
+ options: [
+ {
+ code: "1",
+ name: "max labelon eui uichjkdcbdhjfjhvfbjfdvjkfhgrghrjekghruieghuireghruieghruieghregrejghreighruieghre",
+ },
+ {
+ code: "2",
+ name: "maxlabeltwogyyegegxye",
+ },
+ {
+ code: "3",
+ name: "maxlabelthree",
+ },
+ ],
+ },
+ },
+ ],
+ },
+ {
+ head: "DROPDOWN",
+ body: [
+ {
+ isMandatory: false,
+ type: "dropdown",
+ key: "genders",
+ label: "Default",
+ disable: false,
+ populators: {
+ name: "dropdown-Default",
+ optionsKey: "name",
+ error: "",
+ required: true,
+ mdmsConfig: {
+ masterName: "GenderType",
+ moduleName: "common-masters",
+ localePrefix: "COMMON_GENDER",
+ },
+ },
+ },
+ {
+ isMandatory: false,
+ type: "dropdown",
+ key: "genders",
+ label: "Disabled",
+ disable: true,
+ populators: {
+ name: "dropdown-Disabled",
+ optionsKey: "name",
+ error: "",
+ required: true,
+ mdmsConfig: {
+ masterName: "GenderType",
+ moduleName: "common-masters",
+ localePrefix: "COMMON_GENDER",
+ },
+ },
+ },
+ {
+ isMandatory: true,
+ type: "dropdown",
+ key: "genders",
+ label: "Required Field",
+ disable: false,
+ populators: {
+ name: "dropdown-Required Field",
+ optionsKey: "name",
+ error: "This field is mandatory!",
+ required: true,
+ mdmsConfig: {
+ masterName: "GenderType",
+ moduleName: "common-masters",
+ localePrefix: "COMMON_GENDER",
+ },
+ },
+ },
+ {
+ isMandatory: false,
+ type: "dropdown",
+ key: "genders",
+ label: "With Icons",
+ disable: false,
+ populators: {
+ name: "dropdown-WIth Icons",
+ optionsKey: "name",
+ error: "",
+ required: true,
+ showIcon: true,
+ options: [
+ {
+ code: "1",
+ name: "Option1",
+ icon: "Article",
+ },
+ {
+ code: "2",
+ name: "Option2",
+ icon: "Article",
+ },
+ {
+ code: "3",
+ name: "Option3",
+ icon: "Article",
+ },
+ ],
+ },
+ },
+ {
+ isMandatory: false,
+ type: "dropdown",
+ key: "genders",
+ label: "Default-NotSearchable",
+ disable: false,
+ populators: {
+ name: "dropdown-DefaultNotSearchable",
+ optionsKey: "name",
+ error: "",
+ required: true,
+ mdmsConfig: {
+ masterName: "GenderType",
+ moduleName: "common-masters",
+ localePrefix: "COMMON_GENDER",
+ },
+ isSearchable: false,
+ },
+ },
+ ],
+ },
+ {
+ head: "NESTED DROPDOWN",
+ body: [
+ {
+ isMandatory: false,
+ type: "dropdown",
+ key: "genders",
+ label: "Default",
+ disable: false,
+ variant: "nesteddropdown",
+ populators: {
+ name: "nesteddropdown-Default",
+ optionsKey: "name",
+ error: "",
+ required: true,
+ options: [
+ {
+ name: "Category A",
+ options: [
+ { code: "Category A.Option A", name: "Option A" },
+ { code: "Category A.Option B", name: "Option B" },
+ { code: "Category A.Option C", name: "Option C" },
+ ],
+ code: "Category A",
+ },
+ {
+ name: "Category B",
+ options: [
+ { code: "Category B.Option A", name: "Option A" },
+ { code: "Category B.Option 2", name: "Option 2" },
+ { code: "Category B.Option 3", name: "Option 3" },
+ ],
+ code: "Category B",
+ },
+ ],
+ },
+ },
+ {
+ isMandatory: false,
+ type: "dropdown",
+ key: "genders",
+ label: "Disabled",
+ disable: true,
+ variant: "nesteddropdown",
+ populators: {
+ name: "nesteddropdown-Disabled",
+ optionsKey: "name",
+ error: "",
+ required: true,
+ options: [
+ {
+ name: "Category A",
+ options: [
+ { code: "Category A.Option A", name: "Option A" },
+ { code: "Category A.Option B", name: "Option B" },
+ { code: "Category A.Option C", name: "Option C" },
+ ],
+ code: "Category A",
+ },
+ {
+ name: "Category B",
+ options: [
+ { code: "Category B.Option A", name: "Option A" },
+ { code: "Category B.Option 2", name: "Option 2" },
+ { code: "Category B.Option 3", name: "Option 3" },
+ ],
+ code: "Category B",
+ },
+ ],
+ },
+ },
+ {
+ isMandatory: true,
+ type: "dropdown",
+ key: "genders",
+ label: "Required Field",
+ disable: false,
+ variant: "nesteddropdown",
+ populators: {
+ name: "nesteddropdown-Required Field",
+ optionsKey: "name",
+ error: "This field is mandatory!",
+ required: true,
+ options: [
+ {
+ name: "Category A",
+ options: [
+ { code: "Category A.Option A", name: "Option A" },
+ { code: "Category A.Option B", name: "Option B" },
+ { code: "Category A.Option C", name: "Option C" },
+ ],
+ code: "Category A",
+ },
+ {
+ name: "Category B",
+ options: [
+ { code: "Category B.Option A", name: "Option A" },
+ { code: "Category B.Option 2", name: "Option 2" },
+ { code: "Category B.Option 3", name: "Option 3" },
+ ],
+ code: "Category B",
+ },
+ ],
+ },
+ },
+ {
+ isMandatory: false,
+ type: "dropdown",
+ key: "genders",
+ label: "With Icons",
+ disable: false,
+ variant: "nesteddropdown",
+ populators: {
+ name: "nesteddropdown-With Icons",
+ optionsKey: "name",
+ error: "",
+ required: true,
+ showIcon: true,
+ options: [
+ {
+ name: "Category A",
+ options: [
+ {
+ code: "Category A.Option A",
+ name: "Option A",
+ icon: "Article",
+ },
+ {
+ code: "Category A.Option B",
+ name: "Option B",
+ icon: "Article",
+ },
+ {
+ code: "Category A.Option C",
+ name: "Option C",
+ icon: "Article",
+ },
+ ],
+ code: "Category A",
+ },
+ {
+ name: "Category B",
+ options: [
+ {
+ code: "Category B.Option A",
+ name: "Option A",
+ icon: "Article",
+ },
+ {
+ code: "Category B.Option 2",
+ name: "Option 2",
+ icon: "Article",
+ },
+ {
+ code: "Category B.Option 3",
+ name: "Option 3",
+ icon: "Article",
+ },
+ ],
+ code: "Category B",
+ },
+ ],
+ },
+ },
+ {
+ isMandatory: false,
+ type: "dropdown",
+ key: "genders",
+ label: "Default-NotSearchable",
+ disable: false,
+ variant: "nesteddropdown",
+ populators: {
+ name: "nesteddropdown-DefaultNotSearchable",
+ optionsKey: "name",
+ error: "",
+ required: true,
+ options: [
+ {
+ name: "Category A",
+ options: [
+ { code: "Category A.Option A", name: "Option A" },
+ { code: "Category A.Option B", name: "Option B" },
+ { code: "Category A.Option C", name: "Option C" },
+ ],
+ code: "Category A",
+ },
+ {
+ name: "Category B",
+ options: [
+ { code: "Category B.Option A", name: "Option A" },
+ { code: "Category B.Option 2", name: "Option 2" },
+ { code: "Category B.Option 3", name: "Option 3" },
+ ],
+ code: "Category B",
+ },
+ ],
+ isSearchable: false,
+ },
+ },
+ ],
+ },
+ {
+ head: "TREE DROPDOWN",
+ body: [
+ {
+ isMandatory: false,
+ type: "dropdown",
+ key: "genders",
+ label: "Default",
+ disable: false,
+ variant: "treedropdown",
+ populators: {
+ name: "treedropdown-Default",
+ optionsKey: "name",
+ error: "",
+ required: true,
+ options: [
+ {
+ name: "Category A",
+ options: [
+ {
+ code: "Category A.Option A",
+ name: "Option A",
+ options: [
+ { code: "Category A.Option A.Option 1", name: "Option 1" },
+ { code: "Category A.Option A.Option 2", name: "Option 2" },
+ ],
+ },
+ {
+ code: "Category A.Option B",
+ name: "Option B",
+ options: [
+ { code: "Category A.Option B.Option 1", name: "Option 1" },
+ { code: "Category A.Option B.Option 2", name: "Option 2" },
+ ],
+ },
+ ],
+ code: "Category A",
+ },
+ {
+ name: "Category B",
+ options: [
+ { code: "Category B.Option A", name: "Option A" },
+ {
+ code: "Category B.Option B",
+ name: "Option B",
+ options: [
+ { code: "Category B.Option B.Option 1", name: "Option 1" },
+ { code: "Category B.Option B.Option 2", name: "Option 2" },
+ ],
+ },
+ ],
+ code: "Category B",
+ },
+ {
+ name: "Category C",
+ options: [{ code: "Category C.Option A", name: "Option A" }],
+ code: "Category C",
+ },
+ ],
+ },
+ },
+ {
+ isMandatory: false,
+ type: "dropdown",
+ key: "genders",
+ label: "Disabled",
+ disable: true,
+ variant: "treedropdown",
+ populators: {
+ name: "treedropdown-Disabled",
+ optionsKey: "name",
+ error: "",
+ required: true,
+ options: [
+ {
+ name: "Category A",
+ options: [
+ {
+ code: "Category A.Option A",
+ name: "Option A",
+ options: [
+ { code: "Category A.Option A.Option 1", name: "Option 1" },
+ { code: "Category A.Option A.Option 2", name: "Option 2" },
+ ],
+ },
+ {
+ code: "Category A.Option B",
+ name: "Option B",
+ options: [
+ { code: "Category A.Option B.Option 1", name: "Option 1" },
+ { code: "Category A.Option B.Option 2", name: "Option 2" },
+ ],
+ },
+ ],
+ code: "Category A",
+ },
+ {
+ name: "Category B",
+ options: [
+ { code: "Category B.Option A", name: "Option A" },
+ {
+ code: "Category B.Option B",
+ name: "Option B",
+ options: [
+ { code: "Category B.Option B.Option 1", name: "Option 1" },
+ { code: "Category B.Option B.Option 2", name: "Option 2" },
+ ],
+ },
+ ],
+ code: "Category B",
+ },
+ {
+ name: "Category C",
+ options: [{ code: "Category C.Option A", name: "Option A" }],
+ code: "Category C",
+ },
+ ],
+ },
+ },
+ {
+ isMandatory: true,
+ type: "dropdown",
+ key: "genders",
+ label: "Required Field",
+ disable: false,
+ variant: "treedropdown",
+ populators: {
+ name: "treedropdown-Required Field",
+ optionsKey: "name",
+ error: "This field is mandatory!",
+ required: true,
+ options: [
+ {
+ name: "Category A",
+ options: [
+ {
+ code: "Category A.Option A",
+ name: "Option A",
+ options: [
+ { code: "Category A.Option A.Option 1", name: "Option 1" },
+ { code: "Category A.Option A.Option 2", name: "Option 2" },
+ ],
+ },
+ {
+ code: "Category A.Option B",
+ name: "Option B",
+ options: [
+ { code: "Category A.Option B.Option 1", name: "Option 1" },
+ { code: "Category A.Option B.Option 2", name: "Option 2" },
+ ],
+ },
+ ],
+ code: "Category A",
+ },
+ {
+ name: "Category B",
+ options: [
+ { code: "Category B.Option A", name: "Option A" },
+ {
+ code: "Category B.Option B",
+ name: "Option B",
+ options: [
+ { code: "Category B.Option B.Option 1", name: "Option 1" },
+ { code: "Category B.Option B.Option 2", name: "Option 2" },
+ ],
+ },
+ ],
+ code: "Category B",
+ },
+ {
+ name: "Category C",
+ options: [{ code: "Category C.Option A", name: "Option A" }],
+ code: "Category C",
+ },
+ ],
+ },
+ },
+ ],
+ },
+ {
+ head: "NESTED TEXT DROPDOWN",
+ body: [
+ {
+ isMandatory: false,
+ type: "dropdown",
+ key: "genders",
+ label: "Default",
+ disable: false,
+ variant: "nestedtextdropdown",
+ populators: {
+ name: "nestedtextdropdown-Default",
+ optionsKey: "name",
+ error: "",
+ required: true,
+ options: [
+ {
+ code: "Option1",
+ name: "Option1",
+ description:
+ "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna",
+ },
+ {
+ code: "Option2",
+ name: "Option2",
+ description:
+ "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna",
+ },
+ {
+ code: "Option3",
+ name: "Option3",
+ description:
+ "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna",
+ },
+ ],
+ },
+ },
+ {
+ isMandatory: false,
+ type: "dropdown",
+ key: "genders",
+ label: "Disabled",
+ disable: true,
+ variant: "nestedtextdropdown",
+ populators: {
+ name: "nestedtextdropdown-Disabled",
+ optionsKey: "name",
+ error: "",
+ required: true,
+ options: [
+ {
+ code: "Option1",
+ name: "Option1",
+ description:
+ "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna",
+ },
+ {
+ code: "Option2",
+ name: "Option2",
+ description:
+ "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna",
+ },
+ {
+ code: "Option3",
+ name: "Option3",
+ description:
+ "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna",
+ },
+ ],
+ },
+ },
+ {
+ isMandatory: true,
+ type: "dropdown",
+ key: "genders",
+ label: "Required Field",
+ disable: false,
+ variant: "nestedtextdropdown",
+ populators: {
+ name: "nestedtextdropdown-Required Field",
+ optionsKey: "name",
+ error: "This field is mandatory!",
+ required: true,
+ options: [
+ {
+ code: "Option1",
+ name: "Option1",
+ description:
+ "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna",
+ },
+ {
+ code: "Option2",
+ name: "Option2",
+ description:
+ "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna",
+ },
+ {
+ code: "Option3",
+ name: "Option3",
+ description:
+ "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna",
+ },
+ ],
+ },
+ },
+ {
+ isMandatory: false,
+ type: "dropdown",
+ key: "genders",
+ label: "With Icon",
+ disable: false,
+ variant: "nestedtextdropdown",
+ populators: {
+ name: "nestedtextdropdown-With Icon",
+ optionsKey: "name",
+ error: "",
+ required: true,
+ showIcon: true,
+ options: [
+ {
+ code: "Option1",
+ name: "Option1",
+ icon: "Article",
+ description:
+ "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna",
+ },
+ {
+ code: "Option2",
+ name: "Option2",
+ icon: "Article",
+ description:
+ "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna",
+ },
+ {
+ code: "Option3",
+ name: "Option3",
+ icon: "Article",
+ description:
+ "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna",
+ },
+ ],
+ },
+ },
+ {
+ isMandatory: false,
+ type: "dropdown",
+ key: "genders",
+ label: "Default-NotSearchable",
+ disable: false,
+ variant: "nestedtextdropdown",
+ populators: {
+ name: "nestedtextdropdown-DefaultNotSearchable",
+ optionsKey: "name",
+ error: "",
+ required: true,
+ options: [
+ {
+ code: "Option1",
+ name: "Option1",
+ description:
+ "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna",
+ },
+ {
+ code: "Option2",
+ name: "Option2",
+ description:
+ "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna",
+ },
+ {
+ code: "Option3",
+ name: "Option3",
+ description:
+ "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna",
+ },
+ ],
+ isSearchable: false,
+ },
+ },
+ ],
+ },
+ {
+ head: "PROFILE DROPDOWN",
+ body: [
+ {
+ isMandatory: false,
+ type: "dropdown",
+ key: "genders",
+ label: "Default",
+ disable: false,
+ variant: "profiledropdown",
+ populators: {
+ name: "profiledropdown-Default",
+ optionsKey: "name",
+ error: "",
+ required: true,
+ options: [
+ {
+ code: "Option1",
+ name: "Option1",
+ },
+ {
+ code: "Option2",
+ name: "Option2",
+ },
+ {
+ code: "Option3",
+ name: "Option3",
+ },
+ ],
+ },
+ },
+ {
+ isMandatory: false,
+ type: "dropdown",
+ key: "genders",
+ label: "Disabled",
+ disable: true,
+ variant: "profiledropdown",
+ populators: {
+ name: "profiledropdown-Disabled",
+ optionsKey: "name",
+ error: "",
+ required: true,
+ options: [
+ {
+ code: "Option1",
+ name: "Option1",
+ },
+ {
+ code: "Option2",
+ name: "Option2",
+ },
+ {
+ code: "Option3",
+ name: "Option3",
+ },
+ ],
+ },
+ },
+ {
+ isMandatory: true,
+ type: "dropdown",
+ key: "genders",
+ label: "Required Field",
+ disable: false,
+ variant: "profiledropdown",
+ populators: {
+ name: "profiledropdown-Required Field",
+ optionsKey: "name",
+ error: "This field is mandatory!",
+ required: true,
+ options: [
+ {
+ code: "Option1",
+ name: "Option1",
+ },
+ {
+ code: "Option2",
+ name: "Option2",
+ },
+ {
+ code: "Option3",
+ name: "Option3",
+ },
+ ],
+ },
+ },
+ {
+ isMandatory: false,
+ type: "dropdown",
+ key: "genders",
+ label: "With CustomIcon",
+ disable: false,
+ variant: "profiledropdown",
+ populators: {
+ name: "profiledropdown-With CustomIcon",
+ optionsKey: "name",
+ error: "",
+ required: true,
+ options: [
+ {
+ code: "Option1",
+ name: "Option1",
+ profileIcon: "https://www.freeiconspng.com/uploads/am-a-19-year-old-multimedia-artist-student-from-manila--21.png",
+ },
+ {
+ code: "Option2",
+ name: "Option2",
+ profileIcon: "https://www.freeiconspng.com/uploads/am-a-19-year-old-multimedia-artist-student-from-manila--21.png",
+ },
+ {
+ code: "Option3",
+ name: "Option3",
+ profileIcon: "https://www.freeiconspng.com/uploads/am-a-19-year-old-multimedia-artist-student-from-manila--21.png",
+ },
+ ],
+ },
+ },
+ {
+ isMandatory: false,
+ type: "dropdown",
+ key: "genders",
+ label: "With NestedText",
+ disable: false,
+ variant: "profilenestedtext",
+ populators: {
+ name: "profiledropdown-With NestedText",
+ optionsKey: "name",
+ error: "",
+ required: true,
+ options: [
+ {
+ code: "Option1",
+ name: "Option1",
+ description:
+ "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna",
+ profileIcon: "https://www.freeiconspng.com/uploads/am-a-19-year-old-multimedia-artist-student-from-manila--21.png",
+ },
+ {
+ code: "Option2",
+ name: "Option2",
+ description:
+ "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna",
+ profileIcon: "https://www.freeiconspng.com/uploads/am-a-19-year-old-multimedia-artist-student-from-manila--21.png",
+ },
+ {
+ code: "Option3",
+ name: "Option3",
+ description:
+ "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna",
+ profileIcon: "https://www.freeiconspng.com/uploads/am-a-19-year-old-multimedia-artist-student-from-manila--21.png",
+ },
+ ],
+ },
+ },
+ {
+ isMandatory: false,
+ type: "dropdown",
+ key: "genders",
+ label: "Default-NotSearchable",
+ disable: false,
+ variant: "profiledropdown",
+ populators: {
+ name: "profiledropdown-DefaultNotSearchable",
+ optionsKey: "name",
+ error: "",
+ required: true,
+ options: [
+ {
+ code: "Option1",
+ name: "Option1",
+ },
+ {
+ code: "Option2",
+ name: "Option2",
+ },
+ {
+ code: "Option3",
+ name: "Option3",
+ },
+ ],
+ isSearchable: false,
+ },
+ },
+ ],
+ },
+ {
+ head: "MULTISELECT DROPDOWN",
+ body: [
+ {
+ isMandatory: false,
+ key: "multiselect",
+ type: "multiselectdropdown",
+ label: "Default",
+ disable: false,
+ populators: {
+ name: "multiselectdropdown-Default",
+ optionsKey: "name",
+ error: "Error!",
+ required: false,
+ isDropdownWithChip: true,
+ options: [
+ {
+ code: "Option1",
+ name: "Option1",
+ },
+ {
+ code: "Option2",
+ name: "Option2",
+ },
+ {
+ code: "Option3",
+ name: "Option3",
+ },
+ ],
+ },
+ },
+ {
+ isMandatory: false,
+ key: "multiselect",
+ type: "multiselectdropdown",
+ label: "Disabled",
+ disable: true,
+ populators: {
+ name: "multiselectdropdown-Disabled",
+ optionsKey: "name",
+ error: "Error!",
+ required: false,
+ isDropdownWithChip: true,
+ options: [
+ {
+ code: "Option1",
+ name: "Option1",
+ },
+ {
+ code: "Option2",
+ name: "Option2",
+ },
+ {
+ code: "Option3",
+ name: "Option3",
+ },
+ ],
+ },
+ },
+ {
+ isMandatory: false,
+ key: "multiselect",
+ type: "multiselectdropdown",
+ label: "With Icons",
+ disable: false,
+ populators: {
+ name: "multiselectdropdown-With Icons",
+ optionsKey: "name",
+ error: "Error!",
+ required: false,
+ isDropdownWithChip: true,
+ showIcon: true,
+ options: [
+ {
+ code: "Option1",
+ name: "Option1",
+ icon: "Article",
+ },
+ {
+ code: "Option2",
+ name: "Option2",
+ icon: "Article",
+ },
+ {
+ code: "Option3",
+ name: "Option3",
+ icon: "Article",
+ },
+ ],
+ },
+ },
+ ],
+ },
+ {
+ head: "NESTED MULTISELECT DROPDOWN",
+ body: [
+ {
+ isMandatory: false,
+ key: "multiselect",
+ type: "multiselectdropdown",
+ label: "Default",
+ disable: false,
+ variant: "nestedmultiselect",
+ populators: {
+ name: "nestedmultiselect-Default",
+ optionsKey: "name",
+ error: "Error!",
+ required: false,
+ isDropdownWithChip: true,
+ options: [
+ {
+ name: "Category A",
+ options: [
+ { code: "Category A.Option A", name: "Option A" },
+ { code: "Category A.Option B", name: "Option B" },
+ { code: "Category A.Option C", name: "Option C" },
+ ],
+ code: "Category A",
+ },
+ {
+ name: "Category B",
+ options: [
+ { code: "Category B.Option A", name: "Option A" },
+ { code: "Category B.Option 2", name: "Option 2" },
+ { code: "Category B.Option 3", name: "Option 3" },
+ ],
+ code: "Category B",
+ },
+ ],
+ },
+ },
+ {
+ isMandatory: false,
+ key: "multiselect",
+ type: "multiselectdropdown",
+ label: "Disabled",
+ disable: true,
+ variant: "nestedmultiselect",
+ populators: {
+ name: "nestedmultiselect-Disabled",
+ optionsKey: "name",
+ error: "Error!",
+ required: false,
+ isDropdownWithChip: true,
+ options: [
+ {
+ name: "Category A",
+ options: [
+ { code: "Category A.Option A", name: "Option A" },
+ { code: "Category A.Option B", name: "Option B" },
+ { code: "Category A.Option C", name: "Option C" },
+ ],
+ code: "Category A",
+ },
+ {
+ name: "Category B",
+ options: [
+ { code: "Category B.Option A", name: "Option A" },
+ { code: "Category B.Option 2", name: "Option 2" },
+ { code: "Category B.Option 3", name: "Option 3" },
+ ],
+ code: "Category B",
+ },
+ ],
+ },
+ },
+ {
+ isMandatory: false,
+ key: "multiselect",
+ type: "multiselectdropdown",
+ label: "With Icons",
+ disable: false,
+ variant: "nestedmultiselect",
+ populators: {
+ name: "nestedmultiselect-With Icons",
+ optionsKey: "name",
+ error: "Error!",
+ required: false,
+ isDropdownWithChip: true,
+ showIcon: true,
+ options: [
+ {
+ name: "Category A",
+ options: [
+ {
+ code: "Category A.Option A",
+ name: "Option A",
+ icon: "Article",
+ },
+ {
+ code: "Category A.Option B",
+ name: "Option B",
+ icon: "Article",
+ },
+ {
+ code: "Category A.Option C",
+ name: "Option C",
+ icon: "Article",
+ },
+ ],
+ code: "Category A",
+ },
+ {
+ name: "Category B",
+ options: [
+ {
+ code: "Category B.Option A",
+ name: "Option A",
+ icon: "Article",
+ },
+ {
+ code: "Category B.Option 2",
+ name: "Option 2",
+ icon: "Article",
+ },
+ {
+ code: "Category B.Option 3",
+ name: "Option 3",
+ icon: "Article",
+ },
+ ],
+ code: "Category B",
+ },
+ ],
+ },
+ },
+ ],
+ },
+ {
+ head: "TREE MULTISELECT DROPDOWN",
+ body: [
+ {
+ isMandatory: false,
+ key: "multiselect",
+ type: "multiselectdropdown",
+ label: "Default",
+ disable: false,
+ variant: "treemultiselect",
+ populators: {
+ name: "treemultiselect-Default",
+ optionsKey: "name",
+ error: "Error!",
+ required: false,
+ isDropdownWithChip: true,
+ options: [
+ {
+ name: "Category A",
+ options: [
+ {
+ code: "Category A.Option A",
+ name: "Option A",
+ options: [
+ { code: "Category A.Option A.Option 1", name: "Option 1" },
+ { code: "Category A.Option A.Option 2", name: "Option 2" },
+ ],
+ },
+ {
+ code: "Category A.Option B",
+ name: "Option B",
+ options: [
+ { code: "Category A.Option B.Option 1", name: "Option 1" },
+ { code: "Category A.Option B.Option 2", name: "Option 2" },
+ ],
+ },
+ ],
+ code: "Category A",
+ },
+ {
+ name: "Category B",
+ options: [
+ { code: "Category B.Option A", name: "Option A" },
+ {
+ code: "Category B.Option B",
+ name: "Option B",
+ options: [
+ { code: "Category B.Option B.Option 1", name: "Option 1" },
+ { code: "Category B.Option B.Option 2", name: "Option 2" },
+ ],
+ },
+ ],
+ code: "Category B",
+ },
+ {
+ name: "Category C",
+ options: [{ code: "Category C.Option A", name: "Option A" }],
+ code: "Category C",
+ },
+ ],
+ },
+ },
+ {
+ isMandatory: false,
+ key: "multiselect",
+ type: "multiselectdropdown",
+ label: "Disabled",
+ disable: true,
+ variant: "treemultiselect",
+ populators: {
+ name: "treemultiselect-Disabled",
+ optionsKey: "name",
+ error: "Error!",
+ required: false,
+ isDropdownWithChip: true,
+ options: [
+ {
+ name: "Category A",
+ options: [
+ {
+ code: "Category A.Option A",
+ name: "Option A",
+ options: [
+ { code: "Category A.Option A.Option 1", name: "Option 1" },
+ { code: "Category A.Option A.Option 2", name: "Option 2" },
+ ],
+ },
+ {
+ code: "Category A.Option B",
+ name: "Option B",
+ options: [
+ { code: "Category A.Option B.Option 1", name: "Option 1" },
+ { code: "Category A.Option B.Option 2", name: "Option 2" },
+ ],
+ },
+ ],
+ code: "Category A",
+ },
+ {
+ name: "Category B",
+ options: [
+ { code: "Category B.Option A", name: "Option A" },
+ {
+ code: "Category B.Option B",
+ name: "Option B",
+ options: [
+ { code: "Category B.Option B.Option 1", name: "Option 1" },
+ { code: "Category B.Option B.Option 2", name: "Option 2" },
+ ],
+ },
+ ],
+ code: "Category B",
+ },
+ {
+ name: "Category C",
+ options: [{ code: "Category C.Option A", name: "Option A" }],
+ code: "Category C",
+ },
+ ],
+ },
+ },
+ ],
+ },
+ {
+ head: "NESTEDTEXT MULTISELECT DROPDOWN",
+ body: [
+ {
+ isMandatory: false,
+ key: "multiselect",
+ type: "multiselectdropdown",
+ label: "Default",
+ disable: false,
+ variant: "nestedtextmultiselect",
+ populators: {
+ name: "nestedtextmultiselect-Default",
+ optionsKey: "name",
+ error: "Error!",
+ required: false,
+ isDropdownWithChip: true,
+ options: [
+ {
+ code: "Option1",
+ name: "Option1",
+ description:
+ "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna",
+ },
+ {
+ code: "Option2",
+ name: "Option2",
+ description:
+ "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna",
+ },
+ {
+ code: "Option3",
+ name: "Option3",
+ description:
+ "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna",
+ },
+ ],
+ },
+ },
+ {
+ isMandatory: false,
+ key: "multiselect",
+ type: "multiselectdropdown",
+ label: "Disabled",
+ disable: true,
+ variant: "nestedtextmultiselect",
+ populators: {
+ name: "nestedtextmultiselect-Disabled",
+ optionsKey: "name",
+ error: "Error!",
+ required: false,
+ isDropdownWithChip: true,
+ options: [
+ {
+ code: "Option1",
+ name: "Option1",
+ description:
+ "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna",
+ },
+ {
+ code: "Option2",
+ name: "Option2",
+ description:
+ "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna",
+ },
+ {
+ code: "Option3",
+ name: "Option3",
+ description:
+ "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna",
+ },
+ ],
+ },
+ },
+ {
+ isMandatory: false,
+ key: "multiselect",
+ type: "multiselectdropdown",
+ label: "With Icons",
+ disable: false,
+ variant: "nestedtextmultiselect",
+ populators: {
+ name: "nestedtextmultiselect-With Icons",
+ optionsKey: "name",
+ error: "Error!",
+ required: false,
+ isDropdownWithChip: true,
+ showIcon: true,
+ options: [
+ {
+ code: "Option1",
+ name: "Option1",
+ icon: "Article",
+ description:
+ "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna",
+ },
+ {
+ code: "Option2",
+ name: "Option2",
+ icon: "Article",
+ description:
+ "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna",
+ },
+ {
+ code: "Option3",
+ name: "Option3",
+ icon: "Article",
+ description:
+ "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna",
+ },
+ ],
+ },
+ },
+ ],
+ },
+ {
+ head: "CHECKBOX",
+ body: [
+ {
+ inline: true,
+ isMandatory: false,
+ type: "checkbox",
+ disable: false,
+ withoutLabel: true,
+ populators: { name: "checkbox-Default", error: "Error!", title: "" },
+ },
+ {
+ inline: true,
+ isMandatory: false,
+ type: "checkbox",
+ disable: false,
+ withoutLabel: true,
+ populators: {
+ name: "checkbox-Labelled",
+ error: "Error!",
+ title: "Labelled",
+ },
+ },
+ {
+ inline: true,
+ isMandatory: false,
+ type: "checkbox",
+ disable: false,
+ withoutLabel: true,
+ populators: {
+ name: "checkbox-LabelledTwo",
+ error: "Error!",
+ title:
+ "In the quiet glow of dawn, the city stirred to life. A gentle breeze carried whispers of possibility through the streets, as if the day itself held secrets waiting to unfold. Birds painted ribbons of melody across the sky, joining the symphony of a waking world. The first rays of sunlight tiptoed over the horizon, casting a warm, golden hue on the buildings and trees below. In this tranquil moment, the promise of a new day hung in the air, inviting everyone to embrace the journey ahead",
+ },
+ },
+ {
+ inline: true,
+ isMandatory: false,
+ type: "checkbox",
+ disable: true,
+ withoutLabel: true,
+ populators: {
+ name: "checkbox-DefaultDisabled",
+ error: "Error!",
+ title: "",
+ },
+ },
+ {
+ inline: true,
+ isMandatory: false,
+ type: "checkbox",
+ disable: true,
+ withoutLabel: true,
+ populators: {
+ name: "checkbox-Disabled",
+ error: "Error!",
+ title: "Disabled",
+ },
+ },
+ {
+ inline: true,
+ isMandatory: false,
+ type: "checkbox",
+ disable: true,
+ withoutLabel: true,
+ populators: {
+ name: "checkbox-LabelledTwoDisabled",
+ error: "Error!",
+ title:
+ "In the quiet glow of dawn, the city stirred to life. A gentle breeze carried whispers of possibility through the streets, as if the day itself held secrets waiting to unfold. Birds painted ribbons of melody across the sky, joining the symphony of a waking world. The first rays of sunlight tiptoed over the horizon, casting a warm, golden hue on the buildings and trees below. In this tranquil moment, the promise of a new day hung in the air, inviting everyone to embrace the journey ahead",
+ },
+ },
+ {
+ inline: true,
+ isMandatory: false,
+ type: "checkbox",
+ disable: false,
+ withoutLabel: true,
+ populators: {
+ name: "checkbox-LabelledFirst",
+ isLabelFirst: true,
+ error: "Error!",
+ title: "LabelledFirst",
+ },
+ },
+ {
+ inline: true,
+ isMandatory: false,
+ type: "checkbox",
+ disable: false,
+ withoutLabel: true,
+ populators: {
+ name: "checkbox-LabelFirst",
+ isLabelFirst: true,
+ error: "Error!",
+ title:
+ "In the quiet glow of dawn, the city stirred to life. A gentle breeze carried whispers of possibility through the streets, as if the day itself held secrets waiting to unfold. Birds painted ribbons of melody across the sky, joining the symphony of a waking world. The first rays of sunlight tiptoed over the horizon, casting a warm, golden hue on the buildings and trees below. In this tranquil moment, the promise of a new day hung in the air, inviting everyone to embrace the journey ahead",
+ },
+ },
+ {
+ inline: true,
+ isMandatory: false,
+ type: "checkbox",
+ disable: true,
+ withoutLabel: true,
+ populators: {
+ name: "checkbox-LabelledFirstDisabled",
+ isLabelFirst: true,
+ error: "Error!",
+ title: "LabelledFirstDisabled",
+ },
+ },
+ {
+ inline: true,
+ isMandatory: false,
+ type: "checkbox",
+ disable: true,
+ withoutLabel: true,
+ populators: {
+ name: "checkbox-LabelFirstDisabled",
+ isLabelFirst: true,
+ error: "Error!",
+ title:
+ "In the quiet glow of dawn, the city stirred to life. A gentle breeze carried whispers of possibility through the streets, as if the day itself held secrets waiting to unfold. Birds painted ribbons of melody across the sky, joining the symphony of a waking world. The first rays of sunlight tiptoed over the horizon, casting a warm, golden hue on the buildings and trees below. In this tranquil moment, the promise of a new day hung in the air, inviting everyone to embrace the journey ahead",
+ },
+ },
+ ],
+ },
+ ],
+ },
+ ],
+ };
+ };
+
\ No newline at end of file
diff --git a/micro-ui/web/micro-ui-internals/packages/modules/sample/src/configs/SampleCreateConfig.js b/micro-ui/web/micro-ui-internals/packages/modules/sample/src/configs/SampleCreateConfig.js
new file mode 100644
index 00000000000..a4cbebba404
--- /dev/null
+++ b/micro-ui/web/micro-ui-internals/packages/modules/sample/src/configs/SampleCreateConfig.js
@@ -0,0 +1,186 @@
+import { Loader, FormComposerV2 } from "@egovernments/digit-ui-react-components";
+import React, { useState } from "react";
+import { useTranslation } from "react-i18next";
+import { useHistory } from "react-router-dom";
+
+export const config = [
+ {
+ head: "Sample Object Creation",
+ subHead: "Supporting Details",
+ body: [
+ {
+ inline: true,
+ label: "Salutation",
+ isMandatory: false,
+ type: "text",
+ disable: false,
+ populators: { name: "salutation", error: "Required", validation: { pattern: /^[A-Za-z]+$/i , maxlength:5} },
+ },
+ {
+ inline: true,
+ label: "Name",
+ isMandatory: true,
+ type: "text",
+ disable: false,
+ populators: { name: "name", error: "Required", validation: { pattern: /^[A-Za-z]+$/i } },
+ },
+ {
+ isMandatory: true,
+ type: "radio",
+ key: "genders",
+ label: "Gender",
+ disable: false,
+ populators: {
+ name: "gender",
+ optionsKey: "name",
+ error: "sample required message",
+ required: true,
+ mdmsConfig: {
+ masterName: "GenderType",
+ moduleName: "common-masters",
+ localePrefix: "COMMON_GENDER",
+ },
+ },
+ },
+ {
+ label: "Age",
+ isMandatory: true,
+ type: "number",
+ disable: false,
+ populators: { name: "age", error: "sample error message", validation: { min: 0, max: 100 } },
+ },
+ {
+ inline: true,
+ label: "DOB",
+ isMandatory: true,
+ description: "Please enter a valid Date of birth",
+ type: "date",
+ disable: false,
+ populators: { name: "dob", error: "Required", validation: { required:true, } },
+ },
+ {
+ label: "Phone number",
+ isMandatory: true,
+ type: "mobileNumber",
+ disable: false,
+ populators: { name: "phNumber", error: "sample error message", validation: { min: 5999999999, max: 9999999999 } },
+ },
+
+ {
+ "label": "COMMON_WARD",
+ "type": "locationdropdown",
+ "isMandatory": false,
+ "disable": false,
+ "populators": {
+ "name": "ward",
+ "type": "ward",
+ "optionsKey": "i18nKey",
+ "defaultText": "COMMON_SELECT_WARD",
+ "selectedText": "COMMON_SELECTED",
+ "allowMultiSelect": false
+ }
+ },
+ {
+ inline: true,
+ label: "Address",
+ isMandatory: false,
+ description: "address details",
+ type: "textarea",
+ disable: false,
+ populators: { name: "address", error: "Required", validation: { pattern: /^[A-Za-z]+$/i } },
+ },
+ {
+ "inline": true,
+ "label": "Enter Random Amount",
+ "isMandatory": false,
+ "key": "amountInRs",
+ "type": "amount",
+ "disable": false,
+ "preProcess": {
+ "convertStringToRegEx": [
+ "populators.validation.pattern"
+ ]
+ },
+ "populators": {
+ "prefix":"₹ ",
+ "name": "amountInRs",
+ "error": "PROJECT_PATTERN_ERR_MSG_PROJECT_ESTIMATED_COST",
+ "validation": {
+ "pattern": "^[1-9]\\d*(\\.\\d+)?$",
+ "maxlength" : 16,
+ "step" : "0.01",
+ "min" : 0,
+ "max" : 5000000
+ }
+ }
+ }
+ ],
+ },
+ {
+ head: "Application Subheading",
+ body: [
+ {
+ label: "Additional Details",
+ isMandatory: true,
+ description: "Additional Details if any",
+ key: "additionalDetails",
+ type: "text",
+ disable: false,
+ populators: { name: "additionalDetails", error: "sample error message", validation: { pattern: /^[A-Za-z]+$/i } },
+ },
+
+ {
+ isMandatory: true,
+ key: "genders",
+ type: "radioordropdown",
+ label: "Enter Gender",
+ disable: false,
+ populators: {
+ name: "genders",
+ optionsKey: "name",
+ error: "sample required message",
+ required: true,
+ mdmsConfig: {
+ masterName: "GenderType",
+ moduleName: "common-masters",
+ localePrefix: "COMMON_GENDER",
+ },
+ },
+ },
+ {
+ isMandatory: false,
+ key: "priority",
+ type: "radio",
+ label: "Enter Priority of Application",
+ disable: false,
+ populators: {
+ name: "priority",
+ optionsKey: "name",
+ error: "sample required message",
+ required: false,
+ options: [
+ {
+ code: "1",
+ name: "P1",
+ },
+ {
+ code: "2",
+ name: "P2",
+ },
+ {
+ code: "3",
+ name: "P3",
+ },
+ ],
+ },
+ },
+ // {
+ // "type": "component",
+ // "component": "SampleComponent",
+ // "withoutLabel": true,
+ // "key": "comments"
+ // },
+ ],
+ },
+];
+
diff --git a/micro-ui/web/micro-ui-internals/packages/modules/sample/src/configs/SampleInboxConfig.js b/micro-ui/web/micro-ui-internals/packages/modules/sample/src/configs/SampleInboxConfig.js
new file mode 100644
index 00000000000..7839df2d1dd
--- /dev/null
+++ b/micro-ui/web/micro-ui-internals/packages/modules/sample/src/configs/SampleInboxConfig.js
@@ -0,0 +1,224 @@
+const inboxConfig = () => {
+ return {
+ label: "ES_COMMON_INBOX",
+ postProcessResult: true,
+ type: "inbox",
+ apiDetails: {
+ serviceName: "/inbox/v2/_search",
+ requestParam: {},
+ requestBody: {
+ inbox: {
+ processSearchCriteria: {
+ businessService: ["muster-roll-approval"],
+ moduleName: "muster-roll-service",
+ },
+ moduleSearchCriteria: {},
+ },
+ },
+ minParametersForSearchForm: 0,
+ minParametersForFilterForm: 0,
+ masterName: "commonUiConfig",
+ moduleName: "AttendanceInboxConfig",
+ tableFormJsonPath: "requestBody.inbox",
+ filterFormJsonPath: "requestBody.inbox.moduleSearchCriteria",
+ searchFormJsonPath: "requestBody.inbox.moduleSearchCriteria",
+ },
+ sections: {
+ search: {
+ uiConfig: {
+ headerStyle: null,
+ primaryLabel: "ES_COMMON_SEARCH",
+ secondaryLabel: "ES_COMMON_CLEAR_SEARCH",
+ minReqFields: 1,
+ defaultValues: {
+ attendanceRegisterName: "",
+ orgId: "",
+ musterRollNumber: "",
+ },
+ fields: [
+ {
+ label: "ATM_MUSTER_ROLL_ID",
+ type: "text",
+ isMandatory: false,
+ disable: false,
+ preProcess: {
+ convertStringToRegEx: ["populators.validation.pattern"],
+ },
+ populators: {
+ name: "musterRollNumber",
+ error: "COMMON_PATTERN_ERR_MSG_MUSTER_ID",
+ validation: {
+ pattern: "MR\\/[0-9]+-[0-9]+\\/[0-9]+\\/[0-9]+",
+ minlength: 2,
+ },
+ },
+ },
+ {
+ label: "ES_COMMON_PROJECT_NAME",
+ type: "text",
+ isMandatory: false,
+ disable: false,
+ populators: {
+ name: "attendanceRegisterName",
+ error: "PROJECT_PATTERN_ERR_MSG",
+ },
+ },
+ {
+ label: "COMMON_ORG_NAME",
+ type: "apidropdown",
+ isMandatory: false,
+ disable: false,
+ populators: {
+ name: "orgId",
+ optionsKey: "name",
+ allowMultiSelect: false,
+ masterName: "commonUiConfig",
+ moduleName: "AttendanceInboxConfig",
+ customfn: "populateReqCriteria",
+ },
+ },
+ ],
+ },
+ label: "",
+ children: {},
+ show: true,
+ },
+ links: {
+ uiConfig: {
+ links: [
+ {
+ text: "ATM_SEARCH_ATTENDANCE",
+ url: "/employee/attendencemgmt/search-attendance",
+ roles: ["MUSTER_ROLL_VERIFIER", "MUSTER_ROLL_APPROVER"],
+ },
+ ],
+ label: "ES_COMMON_ATTENDENCEMGMT",
+ logoIcon: {
+ component: "MuktaIcon",
+ customClass: "search-icon--projects",
+ },
+ },
+ children: {},
+ show: true,
+ },
+ filter: {
+ uiConfig: {
+ type: "filter",
+ headerStyle: null,
+ primaryLabel: "Filter",
+ secondaryLabel: "",
+ minReqFields: 1,
+ defaultValues: {
+ state: "",
+ ward: [],
+ locality: [],
+ assignee: {
+ code: "ASSIGNED_TO_ALL",
+ name: "EST_INBOX_ASSIGNED_TO_ALL",
+ },
+ },
+ fields: [
+ {
+ label: "",
+ type: "radio",
+ isMandatory: false,
+ disable: false,
+ populators: {
+ name: "assignee",
+ options: [
+ {
+ code: "ASSIGNED_TO_ME",
+ name: "EST_INBOX_ASSIGNED_TO_ME",
+ },
+ {
+ code: "ASSIGNED_TO_ALL",
+ name: "EST_INBOX_ASSIGNED_TO_ALL",
+ },
+ ],
+ optionsKey: "name",
+ styles: {
+ gap: "1rem",
+ flexDirection: "column",
+ },
+ innerStyles: {
+ display: "flex",
+ },
+ },
+ },
+ {
+ "label": "COMMON_WARD",
+ "type": "locationdropdown",
+ "isMandatory": false,
+ "disable": false,
+ "populators": {
+ "name": "ward",
+ "type": "ward",
+ "optionsKey": "i18nKey",
+ "defaultText": "COMMON_SELECT_WARD",
+ "selectedText": "COMMON_SELECTED",
+ "allowMultiSelect": true
+ }
+ },
+ {
+ label: "COMMON_WORKFLOW_STATES",
+ type: "workflowstatesfilter",
+ isMandatory: false,
+ disable: false,
+ populators: {
+ name: "state",
+ labelPrefix: "WF_MUSTOR_",
+ businessService: "muster-roll-approval",
+ },
+ },
+ ],
+ },
+ label: "ES_COMMON_FILTERS",
+ show: true,
+ },
+ searchResult: {
+ label: "",
+ uiConfig: {
+ columns: [
+ {
+ label: "ATM_MUSTER_ROLL_ID",
+ jsonPath: "businessObject.musterRollNumber",
+ additionalCustomization: true,
+ },
+ {
+ label: "ES_COMMON_PROJECT_NAME",
+ jsonPath: "businessObject.additionalDetails.attendanceRegisterName",
+ },
+ {
+ label: "ES_COMMON_CBO_NAME",
+ jsonPath: "businessObject.additionalDetails.orgName",
+ },
+ {
+ label: "COMMON_ASSIGNEE",
+ jsonPath: "ProcessInstance.assignes[0].name",
+ key: "assignee",
+ },
+ {
+ label: "COMMON_WORKFLOW_STATES",
+ jsonPath: "ProcessInstance.state.state",
+ "additionalCustomization": true,
+ key: "state",
+ },
+ {
+ label: "ATM_SLA",
+ jsonPath: "businessObject.serviceSla",
+ additionalCustomization: true,
+ },
+ ],
+ enableGlobalSearch: false,
+ enableColumnSort: true,
+ resultsJsonPath: "items",
+ },
+ children: {},
+ show: true,
+ },
+ },
+ additionalSections: {},
+ };
+};
+
+export default inboxConfig;
diff --git a/micro-ui/web/micro-ui-internals/packages/modules/sample/src/configs/SorCreateConfig.js b/micro-ui/web/micro-ui-internals/packages/modules/sample/src/configs/SorCreateConfig.js
new file mode 100644
index 00000000000..7d78838ab63
--- /dev/null
+++ b/micro-ui/web/micro-ui-internals/packages/modules/sample/src/configs/SorCreateConfig.js
@@ -0,0 +1,132 @@
+export const SorConfig = [
+ {
+ head:"Create_Estimate",
+ body:[
+ {
+ inline:true,
+ label:"Proposal date",
+ isMandatory:false,
+ key:"proposalDate",
+ type:"date",
+ disable:false,
+ populators:{name:"proposalDate", error:"Required", }
+
+ },
+ {
+ inline:true,
+ label:"Status",
+ isMandatory:false,
+ key:"status",
+ type:"text",
+ disable:false,
+ populators:{name:"status", error:"Required", validation:{ pattern:/^[A-Za-z]+$/i}}
+ },
+ {
+ inline:true,
+ label:"Workflow Status",
+ isMandatory:false,
+ key:"wfStatus",
+ type:"text",
+ disable:false,
+ populators:{name:"wfStatus", error:"Required", validation:{ pattern:/^[A-Za-z]+$/i}}
+ },
+ {
+ inline:true,
+ label:"Name",
+ isMandatory:false,
+ key:"name",
+ type:"text",
+ disable:false,
+ populators:{name:"name", error:"Required", validation:{ pattern:/^[A-Za-z]+$/i}}
+ },
+ {
+ inline:true,
+ label:"Description",
+ isMandatory:false,
+ key:"description",
+ type:"text",
+ disable:false,
+ populators:{name:"description", error:"Required", validation:{pattern:/^[A-Za-z]+$/i}}
+ },
+ {
+ inline:true,
+ label:"Executing Department",
+ isMandatory:false,
+ key:"executingDepartment",
+ type:"dropdown",
+ disable:false,
+ populators:{name:"executingDepartment", error:"Required", optionsKey:"name", required:true, options:[
+ {
+ code:"DEP01",
+ name:"Department-01",
+ label:"executingDepartment"
+ },
+ {
+ code:"DEP02",
+ name:"Department-02",
+ label:"executingDepartment"
+ }
+ ]},
+
+ },
+
+
+ ]
+ },
+
+
+ {
+ head:"Address",
+ key:"address",
+ body:[
+ {
+ isMandatory:true,
+ // name:"addressDetails",
+ key:"address",
+ type:"component", // This is for custom component
+ component:"AddressComponent",
+ disable:false,
+ withoutLabel:true,
+ customProps:{},
+ populators:{name:"address", required:true}
+ }
+ ]
+ },
+
+ {
+ head:"Estimate Details",
+ key:"estimateDetails",
+ body:[
+ {
+ isMandatory:true,
+ key:"estimateDetails",
+ type:"component",
+ component:"EstimateComponent",
+ disablel:false,
+ withoutLabel:true,
+ customProps:{},
+ populators:{name:"estimateDetails", required:true}
+ }
+ ]
+ },
+
+ {
+ head:"Additional Details",
+ key:"additionalDetails",
+ body:[
+ {
+ isMandatory:false,
+ key:"additionalDetails",
+ type:"component",
+ component:"SampleAdditionalComponent",
+ disable:false,
+ withoutLabel:true,
+ customProps:{},
+ populators:{name:"additionalDetails", required:true}
+ },
+
+ ],
+ },
+
+
+]
\ No newline at end of file
diff --git a/micro-ui/web/micro-ui-internals/packages/modules/sample/src/configs/SorSearchConfig.js b/micro-ui/web/micro-ui-internals/packages/modules/sample/src/configs/SorSearchConfig.js
new file mode 100644
index 00000000000..7abd6403451
--- /dev/null
+++ b/micro-ui/web/micro-ui-internals/packages/modules/sample/src/configs/SorSearchConfig.js
@@ -0,0 +1,137 @@
+const defaultSearchValues = {
+ fieldValue:"",
+ typeOfFilter:{}
+}
+
+export const sorSearchConfig = ()=>{
+
+
+ return {
+ label:"SOR_Search",
+ type:"search",
+ apiDetails:{
+ serviceName:"/mdms-v2/v2/_search",
+ requestParam:{
+ "tenantId":Digit.ULBService.getCurrentTenantId()
+ },
+ requestBody:{
+ apiOperation:"SEARCH",
+ MdmsCriteria: {
+ "tenantId": Digit.ULBService.getCurrentTenantId(),
+ "customs":{}
+ // "customs":{}
+ // customs: {
+ // field: { name: "field-name" },
+ // value: "some-value"
+ // },
+ // filters: {} // This will be populated by the preProcess function
+ }
+ },
+ masterName:"commonUiConfig",
+ moduleName:"SorSearchConfig",
+ minParametersForSearchForm:0,
+ tableFormJsonPath:"requestParam",
+ filterFormJsonPath: "requestBody.MdmsCriteria.customs",
+ searchFormJsonPath: "requestBody.MdmsCriteria.customs",
+ },
+
+ sections:{
+ search:{
+ uiConfig:{
+
+ headerStyle: null,
+ formClassName:"custom-both-clear-search",
+ primaryLabel: "ES_COMMON_SEARCH",
+ secondaryLabel: "ES_COMMON_CLEAR_SEARCH",
+ minReqFields: 0,
+ defaultValues:defaultSearchValues,
+ searchWrapperStyles:{
+ flexDirection:"column-reverse",
+ marginTop:"2rem",
+ alignItems:"center",
+
+ gridColumn:"4"
+ },
+ fields:[
+ {
+ label:"Type Of Filter",
+ isMandatory: false,
+ key:"typeOfFilter",
+ type:"dropdown",
+ disable: false,
+ populators:{
+ name:"typeOfFilterr",
+ error:"Required",
+ options:[
+ {
+ label:"Id",
+ name:"Id"
+ },
+ {
+ label:"Campaign Type",
+ name:"campaignType"
+ },
+ {
+ label:"Distribution Process",
+ name:"distributionProcess"
+ },
+ {
+ label:"Registration Process",
+ name:"registration"
+ }
+ ],
+ optionsKey:"label",
+ optionsCustomStyle:{ top: "2.3rem" }
+
+ }
+
+ },
+ {
+ label:"Field Value",
+ isMandatory: false,
+ key:"fieldValue",
+ type:"text",
+ disable:false,
+ populators:{name:"fieldValue", error:"Required", validation: { pattern: {}, maxlength: 140 }}
+
+ }
+ ]
+
+ },
+ show: true,
+ label:"",
+ children:{}
+ },
+
+ searchResult:{
+ tenantId: Digit.ULBService.getCurrentTenantId(),
+ uiConfig:{
+ columns:[
+ {
+ label:"Id",
+ jsonPath:"data.schemaCode"
+ },
+ {
+ label:"Campaign Type",
+ jsonPath:"data.campaignType"
+ },
+ {
+ label:"Distribution Process",
+ jsonPath:"data.DistributionProcess"
+ },
+ {
+ label:"Registration Process",
+ jsonPath:"data.RegistrationProcess"
+ }
+ ],
+ enableColumnSort: true,
+ enableGlobalSearch:true,
+ resultsJsonPath:"mdms"
+ },
+ show:true
+ }
+
+
+ }
+ }
+}
\ No newline at end of file
diff --git a/micro-ui/web/micro-ui-internals/packages/modules/sample/src/configs/TabIndividualSearchCOnfig.js b/micro-ui/web/micro-ui-internals/packages/modules/sample/src/configs/TabIndividualSearchCOnfig.js
new file mode 100644
index 00000000000..443a8959564
--- /dev/null
+++ b/micro-ui/web/micro-ui-internals/packages/modules/sample/src/configs/TabIndividualSearchCOnfig.js
@@ -0,0 +1,282 @@
+// default values of search input component
+const defaultSearchValues = {
+ individualName: "",
+ mobileNumber: "",
+ IndividualID: "",
+};
+
+//config for tab search sceeen
+export const TabSearchconfig = {
+ tenantId: "mz",
+ moduleName: "commonCampaignUiConfig",
+ showTab: true, // setting true will enable tab screen
+ TabSearchconfig: [ // all tab config should be added in json array
+ {
+ label: "Individual Search Tab1",
+ type: "search",
+ apiDetails: {
+ serviceName: "/individual/v1/_search",
+ requestParam: {
+ tenantId: Digit.ULBService.getCurrentTenantId(),
+ },
+ requestBody: {
+ apiOperation: "SEARCH",
+ Individual: {
+ tenantId: Digit.ULBService.getCurrentTenantId(),
+ },
+ },
+ masterName: "commonUiConfig",
+ moduleName: "SearchIndividualConfig",
+ minParametersForSearchForm: 0,
+ tableFormJsonPath: "requestParam",
+ filterFormJsonPath: "requestBody.Individual",
+ searchFormJsonPath: "requestBody.Individual",
+ },
+ sections: {
+ search: {
+ uiConfig: {
+ formClassName: "custom-both-clear-search",
+ primaryLabel: "ES_COMMON_SEARCH",
+ secondaryLabel: "ES_COMMON_CLEAR_SEARCH",
+ minReqFields: 0,
+ defaultValues: defaultSearchValues, // Set default values for search fields
+ fields: [
+ {
+ label: "Applicant name ",
+ isMandatory: false,
+ key: "individualName",
+ type: "text",
+ populators: {
+ name: "individualName",
+ error: "Required",
+ validation: { pattern: /^[A-Za-z]+$/i },
+ },
+ },
+ {
+ label: "Phone number",
+ isMandatory: false,
+ key: "Phone number",
+ type: "number",
+ disable: false,
+ populators: { name: "mobileNumber", error: "sample error message", validation: { min: 0, max: 999999999 } },
+ },
+ {
+ label: "Individual Id ",
+ isMandatory: false,
+ type: "text",
+ disable: false,
+ populators: {
+ name: "individualId",
+ },
+ },
+ ],
+ },
+
+ show: true,
+ },
+ searchResult: {
+ tenantId: Digit.ULBService.getCurrentTenantId(),
+ uiConfig: {
+ columns: [
+ {
+ label: "IndividualID",
+ jsonPath: "individualId",
+ },
+
+ {
+ label: "Name",
+ jsonPath: "name.givenName",
+ },
+ {
+ label: "Address",
+ jsonPath: "address.locality.code",
+ },
+ ],
+
+ enableColumnSort: true,
+ resultsJsonPath: "Individual",
+ },
+ show: true,
+ },
+ },
+ },
+ {
+ label: "Individual Search Tab2",
+ type: "search",
+ apiDetails: {
+ serviceName: "/individual/v1/_search",
+ requestParam: {
+ tenantId: Digit.ULBService.getCurrentTenantId(),
+ },
+ requestBody: {
+ apiOperation: "SEARCH",
+ Individual: {
+ tenantId: Digit.ULBService.getCurrentTenantId(),
+ },
+ },
+ masterName: "commonUiConfig",
+ moduleName: "SearchIndividualConfig",
+ minParametersForSearchForm: 0,
+ tableFormJsonPath: "requestParam",
+ filterFormJsonPath: "requestBody.Individual",
+ searchFormJsonPath: "requestBody.Individual",
+ },
+ sections: {
+ search: {
+ uiConfig: {
+ formClassName: "custom-both-clear-search",
+ primaryLabel: "ES_COMMON_SEARCH",
+ secondaryLabel: "ES_COMMON_CLEAR_SEARCH",
+ minReqFields: 0,
+ defaultValues: defaultSearchValues, // Set default values for search fields
+ fields: [
+ {
+ label: "Applicant name ",
+ isMandatory: false,
+ key: "individualName",
+ type: "text",
+ populators: {
+ name: "individualName",
+ error: "Required",
+ validation: { pattern: /^[A-Za-z]+$/i },
+ },
+ },
+ {
+ label: "Phone number",
+ isMandatory: false,
+ key: "Phone number",
+ type: "number",
+ disable: false,
+ populators: { name: "mobileNumber", error: "sample error message", validation: { min: 0, max: 999999999 } },
+ },
+ {
+ label: "Individual Id ",
+ isMandatory: false,
+ type: "text",
+ disable: false,
+ populators: {
+ name: "individualId",
+ },
+ },
+ ],
+ },
+
+ show: true,
+ },
+ searchResult: {
+ tenantId: Digit.ULBService.getCurrentTenantId(),
+ uiConfig: {
+ columns: [
+ {
+ label: "IndividualID",
+ jsonPath: "individualId",
+ },
+
+ {
+ label: "Name",
+ jsonPath: "name.givenName",
+ },
+ {
+ label: "Address",
+ jsonPath: "address.locality.code",
+ },
+ ],
+
+ enableColumnSort: true,
+ resultsJsonPath: "Individual",
+ },
+ show: true,
+ },
+ },
+ },
+ {
+ label: "Individual Search Tab3",
+ type: "search",
+ apiDetails: {
+ serviceName: "/individual/v1/_search",
+ requestParam: {
+ tenantId: Digit.ULBService.getCurrentTenantId(),
+ },
+ requestBody: {
+ apiOperation: "SEARCH",
+ Individual: {
+ tenantId: Digit.ULBService.getCurrentTenantId(),
+ },
+ },
+ masterName: "commonUiConfig",
+ moduleName: "SearchIndividualConfig",
+ minParametersForSearchForm: 0,
+ tableFormJsonPath: "requestParam",
+ filterFormJsonPath: "requestBody.Individual",
+ searchFormJsonPath: "requestBody.Individual",
+ },
+ sections: {
+ search: {
+ uiConfig: {
+ formClassName: "custom-both-clear-search",
+ primaryLabel: "ES_COMMON_SEARCH",
+ secondaryLabel: "ES_COMMON_CLEAR_SEARCH",
+ minReqFields: 0,
+ defaultValues: defaultSearchValues, // Set default values for search fields
+ fields: [
+ {
+ label: "Applicant name ",
+ isMandatory: false,
+ key: "individualName",
+ type: "text",
+ populators: {
+ name: "individualName",
+ error: "Required",
+ validation: { pattern: /^[A-Za-z]+$/i },
+ },
+ },
+ {
+ label: "Phone number",
+ isMandatory: false,
+ key: "Phone number",
+ type: "number",
+ disable: false,
+ populators: { name: "mobileNumber", error: "sample error message", validation: { min: 0, max: 999999999 } },
+ },
+ {
+ label: "Individual Id ",
+ isMandatory: false,
+ type: "text",
+ disable: false,
+ populators: {
+ name: "individualId",
+ },
+ },
+ ],
+ },
+
+ show: true,
+ },
+ searchResult: {
+ tenantId: Digit.ULBService.getCurrentTenantId(),
+ uiConfig: {
+ columns: [
+ {
+ label: "IndividualID",
+ jsonPath: "individualId",
+ },
+
+ {
+ label: "Name",
+ jsonPath: "name.givenName",
+ },
+ {
+ label: "Address",
+ jsonPath: "address.locality.code",
+ },
+ ],
+
+ enableColumnSort: true,
+ resultsJsonPath: "Individual",
+ },
+ show: true,
+ },
+ },
+ },
+ ],
+};
diff --git a/micro-ui/web/micro-ui-internals/packages/modules/sample/src/configs/UICustomizations.js b/micro-ui/web/micro-ui-internals/packages/modules/sample/src/configs/UICustomizations.js
new file mode 100644
index 00000000000..08e27a7c105
--- /dev/null
+++ b/micro-ui/web/micro-ui-internals/packages/modules/sample/src/configs/UICustomizations.js
@@ -0,0 +1,35 @@
+import { Link, useHistory } from "react-router-dom";
+import _ from "lodash";
+import React from "react";
+
+//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 = {};
+
+// const inboxModuleNameMap = {};
+
+// export const UICustomizations = {};
+
+//preProcess function for handling data transformations or customizations before a search request is made.
+export const UICustomizations = {
+ SorSearchConfig:{
+ preProcess:(data)=>{
+ const tenantId=Digit.ULBService.getCurrentTenantId();
+ data.body.MdmsCriteria.tenantId = tenantId
+
+ const filters={}
+ const custom = data.body.MdmsCriteria.customs
+ const { typeOfFilter, fieldValue} = custom || {}
+ if(typeOfFilter && fieldValue && typeOfFilter.name){
+ filters[typeOfFilter.name] = fieldValue
+ }
+
+ data.body.MdmsCriteria.filters = filters
+ delete data.body.customs
+ return data;
+ }
+ }
+}
\ No newline at end of file
diff --git a/micro-ui/web/micro-ui-internals/packages/modules/sample/src/configs/ViewIndividual.js b/micro-ui/web/micro-ui-internals/packages/modules/sample/src/configs/ViewIndividual.js
new file mode 100644
index 00000000000..b0183894cd5
--- /dev/null
+++ b/micro-ui/web/micro-ui-internals/packages/modules/sample/src/configs/ViewIndividual.js
@@ -0,0 +1,58 @@
+import React, { Fragment, useState, useEffect } from "react";
+import { ViewComposer, Header, Loader } from "@egovernments/digit-ui-react-components";
+import { useTranslation } from "react-i18next";
+import { useLocation } from "react-router-dom";
+import { useIndividualView } from "../hooks/useIndividualView";
+
+function ViewIndividual() {
+ const { t } = useTranslation();
+ const location = useLocation();
+ const tenantId = Digit.ULBService.getCurrentTenantId();
+ const searchParams = new URLSearchParams(location.search);
+ const [individualId, setIndividualId] = useState(null); // Define individualId state
+
+ useEffect(() => {
+ const id = searchParams.get("id");
+ console.log("id", id);
+ setIndividualId(id); // Set individualId state with the value from URL
+ }, [searchParams]);
+
+ const { isLoading, data: testData, revalidate, isFetching } = useIndividualView({
+ t,
+ tenantId: tenantId,
+ individualId: searchParams.get("id"), // Use individualId here
+ config: {
+ select: (data) => ({
+ cards: [
+ {
+ sections: [
+ {
+ type: "DATA",
+
+ values: data?.details,
+ },
+ ],
+ },
+ ],
+
+ }),
+
+
+ },
+
+ });
+ console.log("testData",testData);
+
+ // if (isLoading) {
+ // return ;
+ // }
+
+ return (
+ <>
+ {t("Individual details")}
+ {!isLoading && individualId && }
+ >
+ );
+}
+
+export default ViewIndividual;
diff --git a/micro-ui/web/micro-ui-internals/packages/modules/sample/src/configs/searchWageSeekerConfig.js b/micro-ui/web/micro-ui-internals/packages/modules/sample/src/configs/searchWageSeekerConfig.js
new file mode 100644
index 00000000000..5a4ae01ce2f
--- /dev/null
+++ b/micro-ui/web/micro-ui-internals/packages/modules/sample/src/configs/searchWageSeekerConfig.js
@@ -0,0 +1,190 @@
+const searchWageSeekerConfig = () => {
+ return {
+ label: "WORKS_SEARCH_WAGESEEKERS",
+ type: "search",
+ actionLabel: "WORKS_ADD_WAGESEEKER",
+ actionRole: "INDIVIDUAL_CREATOR",
+ actionLink: "masters/create-wageseeker",
+ apiDetails: {
+ serviceName: "/individual/v1/_search",
+ requestParam: {},
+ requestBody: {
+ apiOperation: "SEARCH",
+ Individual: {},
+ },
+ minParametersForSearchForm: 1,
+ masterName: "commonUiConfig",
+ moduleName: "SearchWageSeekerConfig",
+ tableFormJsonPath: "requestParam",
+ filterFormJsonPath: "requestBody.Individual",
+ searchFormJsonPath: "requestBody.Individual",
+ },
+ sections: {
+ search: {
+ uiConfig: {
+ headerStyle: null,
+ formClassName:"custom-both-clear-search",
+ primaryLabel: "ES_COMMON_SEARCH",
+ secondaryLabel: "ES_COMMON_CLEAR_SEARCH",
+ minReqFields: 1,
+ defaultValues: {
+ wardCode: "",
+ individualId: "",
+ name: "",
+ socialCategory: "",
+ mobileNumber: "",
+ createdFrom: "",
+ createdTo: "",
+ },
+ fields: [
+ {
+ "label": "COMMON_WARD",
+ "type": "locationdropdown",
+ "isMandatory": false,
+ "disable": false,
+ "populators": {
+ "name": "wardCode",
+ "type": "ward",
+ "optionsKey": "i18nKey",
+ "defaultText": "COMMON_SELECT_WARD",
+ "selectedText": "COMMON_SELECTED",
+ "allowMultiSelect": false
+ }
+ },
+ {
+ label: "MASTERS_WAGESEEKER_NAME",
+ type: "text",
+ isMandatory: false,
+ disable: false,
+ populators: { name: "name", validation: { pattern: /^[^{0-9}^\$\"<>?\\\\~!@#$%^()+={}\[\]*,/_:;“”‘’]{1,50}$/i, maxlength: 140 } },
+ },
+ {
+ label: "MASTERS_WAGESEEKER_ID",
+ type: "text",
+ isMandatory: false,
+ disable: false,
+ populators: {
+ name: "individualId",
+ error: `PROJECT_PATTERN_ERR_MSG`,
+ validation: { minlength: 2 },
+ },
+ },
+ {
+ label: "CORE_COMMON_PROFILE_MOBILE_NUMBER",
+ type: "mobileNumber",
+ isMandatory: false,
+ disable: false,
+ populators: {
+ name: "mobileNumber",
+ error: `PROJECT_PATTERN_ERR_MSG`,
+ validation: { pattern: /^[a-z0-9\/-@# ]*$/i, minlength: 2 },
+ },
+ },
+ {
+ label: "MASTERS_SOCIAL_CATEGORY",
+ type: "dropdown",
+ isMandatory: false,
+ disable: false,
+ populators: {
+ name: "socialCategory",
+ optionsKey: "code",
+ optionsCustomStyle: {
+ top: "2.3rem",
+ },
+ mdmsConfig: {
+ masterName: "SocialCategory",
+ moduleName: "common-masters",
+ localePrefix: "MASTERS",
+ },
+ },
+ },
+ {
+ label: "CREATED_FROM_DATE",
+ type: "date",
+ isMandatory: false,
+ disable: false,
+ key : "createdFrom",
+ preProcess : {
+ updateDependent : ["populators.max"]
+ },
+ populators: {
+ name: "createdFrom",
+ max : "currentDate"
+ },
+ },
+ {
+ label: "CREATED_TO_DATE",
+ type: "date",
+ isMandatory: false,
+ disable: false,
+ key : "createdTo",
+ preProcess : {
+ updateDependent : ["populators.max"]
+ },
+ populators: {
+ name: "createdTo",
+ error: "DATE_VALIDATION_MSG",
+ max : "currentDate"
+ },
+ additionalValidation: {
+ type: "date",
+ keys: { start: "createdFrom", end: "createdTo" },
+ },
+ },
+ ],
+ },
+ label: "",
+ children: {},
+ show: true,
+ },
+ searchResult: {
+ label: "",
+ uiConfig: {
+ columns: [
+ {
+ label: "MASTERS_WAGESEEKER_ID",
+ jsonPath: "individualId",
+ additionalCustomization: true,
+ },
+ {
+ label: "MASTERS_WAGESEEKER_NAME",
+ jsonPath: "name.givenName",
+ },
+ {
+ label: "MASTERS_FATHER_NAME",
+ jsonPath: "fatherName",
+ },
+ {
+ label: "MASTERS_SOCIAL_CATEGORY",
+ jsonPath: "additionalFields.fields[0].value",
+ // additionalCustomization: true,
+ },
+ {
+ label: "CORE_COMMON_PROFILE_CITY",
+ jsonPath: "address[0].tenantId",
+ additionalCustomization: true,
+ },
+ {
+ label: "MASTERS_WARD",
+ jsonPath: "address[0].ward.code",
+ additionalCustomization: true,
+ },
+ {
+ label: "MASTERS_LOCALITY",
+ jsonPath: "address[0].locality.code",
+ additionalCustomization: true,
+ },
+ ],
+ enableGlobalSearch: false,
+ enableColumnSort: true,
+ resultsJsonPath: "Individual",
+ },
+ children: {},
+ show: true,
+ },
+ },
+ additionalSections: {},
+ };
+};
+
+export default searchWageSeekerConfig;
diff --git a/micro-ui/web/micro-ui-internals/packages/modules/sample/src/hooks/index.js b/micro-ui/web/micro-ui-internals/packages/modules/sample/src/hooks/index.js
new file mode 100644
index 00000000000..526c975dcc9
--- /dev/null
+++ b/micro-ui/web/micro-ui-internals/packages/modules/sample/src/hooks/index.js
@@ -0,0 +1,28 @@
+import { useIndividualView } from "./useIndividualView";
+import useEstimateDetailsScreen from "./useEstimateDetailsScreen";
+import utils from "../utils";
+const sample = {
+ useIndividualView
+};
+const estimates={
+ useEstimateDetailsScreen
+}
+
+const Hooks = {
+ sample,
+ estimates
+};
+
+const Utils = {
+ browser: {
+ sample: () => { },
+ },
+ sample: {
+ ...utils,
+ },
+};
+
+export const CustomisedHooks = {
+ Hooks,
+ Utils,
+};
diff --git a/micro-ui/web/micro-ui-internals/packages/modules/sample/src/hooks/services/sampleService.js b/micro-ui/web/micro-ui-internals/packages/modules/sample/src/hooks/services/sampleService.js
new file mode 100644
index 00000000000..2b56ab325bf
--- /dev/null
+++ b/micro-ui/web/micro-ui-internals/packages/modules/sample/src/hooks/services/sampleService.js
@@ -0,0 +1,5 @@
+import { searchTestResultData } from "./searchTestResultData";
+
+export const sampleService = {
+ searchTestResultData,
+};
\ No newline at end of file
diff --git a/micro-ui/web/micro-ui-internals/packages/modules/sample/src/hooks/services/searchTestResultData.js b/micro-ui/web/micro-ui-internals/packages/modules/sample/src/hooks/services/searchTestResultData.js
new file mode 100644
index 00000000000..7e557d4f1ca
--- /dev/null
+++ b/micro-ui/web/micro-ui-internals/packages/modules/sample/src/hooks/services/searchTestResultData.js
@@ -0,0 +1,48 @@
+export const searchTestResultData = async ({ t, individualId, tenantId }) => {
+
+ const response = await Digit.CustomService.getResponse({
+ url: "/individual/v1/_search",
+
+ params: {
+ tenantId: "pg.citya",
+ offset: 0,
+ limit: 10,
+
+ },
+ body: {
+ Individual: {
+ "tenantId": "pg.citya",
+ "individualId": individualId,
+ },
+ },
+
+ });
+ console.log("response", response);
+
+
+ return {
+ details: [
+ // {
+ // sections: [
+ // {
+ // type: "DATA",
+ // values: [
+ {
+ key: "Applicant name",
+ value: response?.Individual?.[0]?.name?.givenName || "NA",
+ },
+ {
+ key: "Applicant Id",
+ value: response?.Individual?.[0]?.identifiers?.[0].individualId || "NA",
+ },
+ // {
+ // key : "Adress",
+ // value : response?.Individual?.[0]
+ // }
+ ],
+ }
+// ],
+// },
+// ],
+// };
+ }
diff --git a/micro-ui/web/micro-ui-internals/packages/modules/sample/src/hooks/useEstimateDetailsScreen.js b/micro-ui/web/micro-ui-internals/packages/modules/sample/src/hooks/useEstimateDetailsScreen.js
new file mode 100644
index 00000000000..b0e94e20804
--- /dev/null
+++ b/micro-ui/web/micro-ui-internals/packages/modules/sample/src/hooks/useEstimateDetailsScreen.js
@@ -0,0 +1,13 @@
+import { WorksSearch } from "../services/elements/works";
+import { useQuery } from "react-query";
+
+const useEstimateDetailsScreen = (t, tenantId, estimateNumber, config,isStateChanged ) => {
+
+ return useQuery(
+ ["ESTIMATE_WORKS_SEARCH", "ESTIMATE_SEARCH", tenantId, estimateNumber, isStateChanged],
+ () => WorksSearch.viewEstimateScreen(t, tenantId, estimateNumber),
+ {staleTime:0,...config}
+ );
+}
+
+export default useEstimateDetailsScreen
\ No newline at end of file
diff --git a/micro-ui/web/micro-ui-internals/packages/modules/sample/src/hooks/useIndividualView.js b/micro-ui/web/micro-ui-internals/packages/modules/sample/src/hooks/useIndividualView.js
new file mode 100644
index 00000000000..7457e666f11
--- /dev/null
+++ b/micro-ui/web/micro-ui-internals/packages/modules/sample/src/hooks/useIndividualView.js
@@ -0,0 +1,11 @@
+import { useQuery } from "react-query";
+import { sampleService } from "./services/sampleService";
+import { searchTestResultData } from "./services/searchTestResultData";
+
+export const useIndividualView = ({t,individualId,tenantId,config={} }) =>{
+ //console.log(props);
+ console.log(individualId,'test');
+ return useQuery(["Individual Details"], () => searchTestResultData({ t, individualId, tenantId }), config);
+};
+
+
diff --git a/micro-ui/web/micro-ui-internals/packages/modules/sample/src/pages/employee/IndividualCreate.js b/micro-ui/web/micro-ui-internals/packages/modules/sample/src/pages/employee/IndividualCreate.js
new file mode 100644
index 00000000000..224cf827cc4
--- /dev/null
+++ b/micro-ui/web/micro-ui-internals/packages/modules/sample/src/pages/employee/IndividualCreate.js
@@ -0,0 +1,60 @@
+import React from "react";
+import { useTranslation } from "react-i18next";
+import { useHistory } from "react-router-dom";
+import { FormComposerV2, Header } from "@egovernments/digit-ui-react-components";
+import { newConfig } from "../../configs/IndividualCreateConfig";
+import { transformCreateData } from "../../utils/createUtils";
+
+
+
+const IndividualCreate = () => {
+ const tenantId = Digit.ULBService.getCurrentTenantId();
+ const { t } = useTranslation();
+ const history = useHistory();
+ const reqCreate = {
+ url: `/individual/v1/_create`,
+ params: {},
+ body: {},
+ config: {
+ enable: false,
+ },
+ };
+
+ const mutation = Digit.Hooks.useCustomAPIMutationHook(reqCreate);
+
+ const onSubmit = async(data) => {
+ console.log(data, "data");
+ await mutation.mutate(
+ {
+ url: `/individual/v1/_create`,
+ params: { tenantId },
+ body: transformCreateData(data),
+ config: {
+ enable: true,
+ },
+ },
+ );
+ };
+ return (
+
+
+ {
+ return {
+ ...config,
+ };
+ })}
+ defaultValues={{}}
+ onFormValueChange ={ (setValue, formData, formState, reset, setError, clearErrors, trigger, getValues) => {
+ console.log(formData, "formData");
+ }}
+ onSubmit={(data,) => onSubmit(data, )}
+ fieldStyle={{ marginRight: 0 }}
+ />
+
+
+ );
+}
+
+export default IndividualCreate;
\ No newline at end of file
diff --git a/micro-ui/web/micro-ui-internals/packages/modules/sample/src/pages/employee/IndividualSearch.js b/micro-ui/web/micro-ui-internals/packages/modules/sample/src/pages/employee/IndividualSearch.js
new file mode 100644
index 00000000000..a008c9a9977
--- /dev/null
+++ b/micro-ui/web/micro-ui-internals/packages/modules/sample/src/pages/employee/IndividualSearch.js
@@ -0,0 +1,37 @@
+import {
+ Header,
+ InboxSearchComposer
+ } from "@egovernments/digit-ui-react-components";
+ import React, { useState, useEffect } from "react";
+ import { useTranslation } from "react-i18next";
+ import { searchconfig } from "../../configs/IndividualSearchCOnfig";
+
+ const defaultSearchValues = {
+ individualName: "",
+ mobileNumber: "",
+ IndividualID: ""
+ };
+
+
+
+ const IndividualSearch = () => {
+ const { t } = useTranslation();
+ const [defaultValues, setDefaultValues] = useState(defaultSearchValues); // State to hold default values for search fields
+ const indConfigs = searchconfig();
+
+ useEffect(() => {
+ // Set default values when component mounts
+ setDefaultValues(defaultSearchValues);
+ }, []);
+
+ return (
+
+
+
+ {/* Pass defaultValues as props to InboxSearchComposer */}
+
+
+
+ );
+ };
+ export default IndividualSearch;
\ No newline at end of file
diff --git a/micro-ui/web/micro-ui-internals/packages/modules/sample/src/pages/employee/IndividualViewDetails.js b/micro-ui/web/micro-ui-internals/packages/modules/sample/src/pages/employee/IndividualViewDetails.js
new file mode 100644
index 00000000000..5681f02387e
--- /dev/null
+++ b/micro-ui/web/micro-ui-internals/packages/modules/sample/src/pages/employee/IndividualViewDetails.js
@@ -0,0 +1,122 @@
+import React, { Fragment, useEffect, useRef, useState } from "react";
+import { useTranslation } from "react-i18next";
+import { useHistory } from "react-router-dom";
+import { Button, Header, Loader, ViewComposer } from "@egovernments/digit-ui-react-components";
+
+const IndividualViewDetails = (props) => {
+ const { t } = useTranslation();
+ const history = useHistory();
+ const tenantId = Digit.ULBService.getCurrentTenantId();
+
+ const reqCriteria = {
+ url: "/individual/v1/_search",
+ params: {
+ tenantId: tenantId,
+ limit: 10,
+ offset: 0,
+ },
+ body: {
+ apiOperation: "SEARCH",
+ Individual: {
+ tenantId,
+ id: ["1e909b34-17cf-448b-a64d-65abd07bc7d0"],
+ },
+ },
+ config: {
+ select: (data) => {
+ const response = data?.Individual?.[0];
+ return {
+ cards: [
+ {
+ sections: [
+ {
+ type: "DATA",
+ cardHeader: { value: t("Individual Details"), inlineStyles: { marginTop: 0, fontSize: "1.5rem" } },
+ values: [
+ {
+ key: "Id",
+ value: response?.id ? response?.id : t("NA"),
+ },
+ {
+ key: "Name",
+ value: response?.name?.givenName ? response?.name?.givenName : t("NA"),
+ },
+ {
+ key: "Family name",
+ value: response?.name?.familyName ? response?.name?.familyName : t("NA"),
+ },
+ {
+ key: "Other name",
+ value: response?.name?.otherNames ? response?.name?.otherNames : t("NA"),
+ },
+ {
+ key: "DOB",
+ value: response?.dateOfBirth ? response?.dateOfBirth : t("NA"),
+ },
+ {
+ key: "Gender",
+ value: response?.gender ? response?.gender : t("NA"),
+ },
+ ],
+ },
+ ],
+ },
+ {
+ name: "address",
+ sections: [
+ {
+ cardHeader: { value: t("Address Details"), inlineStyles: { marginTop: 0, fontSize: "1.5rem" } },
+ name: "address",
+ type: "DATA",
+ values: [
+ {
+ key: "Door Number",
+ value: response?.address?.doorNo ? response?.address?.doorNo : t("NA"),
+ },
+ {
+ key: "Address 1",
+ value: response?.address?.addressLine1 ? response?.address?.addressLine1 : t("NA"),
+ },
+ {
+ key: "Address 2",
+ value: response?.address?.addressLine2 ? response?.address?.addressLine2 : t("NA"),
+ },
+ {
+ key: "Landmark",
+ value: response?.address?.landmark ? response?.address?.landmark : t("NA"),
+ },
+ {
+ key: "City",
+ value: response?.address?.city ? response?.address?.city : t("NA"),
+ },
+ {
+ key: "Pincode",
+ value: response?.address?.pincode ? response?.address?.pincode : t("NA"),
+ },
+ ],
+ },
+ ],
+ },
+ ],
+ };
+ },
+ },
+ };
+ const { isLoading, data } = Digit.Hooks.useCustomAPIHook(reqCriteria);
+
+ if (isLoading) {
+ return ;
+ }
+ return (
+ <>
+
+ {t("INDIVIDUAL DETAILS")}
+
+
+
+
+ >
+ );
+};
+
+export default IndividualViewDetails;
diff --git a/micro-ui/web/micro-ui-internals/packages/modules/sample/src/pages/employee/PanelCardResponse.js b/micro-ui/web/micro-ui-internals/packages/modules/sample/src/pages/employee/PanelCardResponse.js
new file mode 100644
index 00000000000..cd2a1d7358a
--- /dev/null
+++ b/micro-ui/web/micro-ui-internals/packages/modules/sample/src/pages/employee/PanelCardResponse.js
@@ -0,0 +1,42 @@
+import React from "react";
+import { PanelCard, InfoCard, Button } from "@egovernments/digit-ui-components";
+
+const PanelCardResponse = () => {
+ const children = [
+ ,
+ ];
+
+ const footerChildren = [
+