-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from egovernments/merge-ui-internals
Merge UI internals
- Loading branch information
Showing
978 changed files
with
94,516 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
|
||
# 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/ | ||
|
||
### 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"printWidth": 150 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"editor.hover.delay": 500 | ||
} |
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* @jagankumar-egov @saurabh-egov @sathishp-eGov |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# digit-ui-internals | ||
|
||
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. | ||
|
||
#### Starting local server | ||
|
||
1. In the project run **yarn install** to install node modules and dependencies | ||
1. Run **yarn start** to start the local server | ||
|
||
#### Reference Docs | ||
|
||
###### Module wise reference docs | ||
|
||
| Module | Reference Docs | | ||
| -------------- | ------------------------------------------------------------------------------------------------------------ | | ||
| PGR | https://digit-discuss.atlassian.net/wiki/spaces/EPE/pages/1285587062/PGR+UI+Implementation+-+Guidelines+FAQs | | ||
| FSM | https://digit-discuss.atlassian.net/wiki/spaces/EPE/pages/1290567710/FSM+UI+Implementation+-+Guidelines+FAQs | | ||
| DIGIT Services | https://digit-discuss.atlassian.net/wiki/spaces/DD/pages/647364616/DIGIT+Services | | ||
|
||
###### Dependencies and their references | ||
|
||
1. https://www.npmjs.com/package/react-query | ||
2. https://react-redux.js.org/ | ||
3. https://react-hook-form.com/ | ||
4. https://www.npmjs.com/package/react-table | ||
5. https://www.npmjs.com/package/react-time-picker | ||
6. https://reactrouter.com/web/guides/quick-start | ||
7. https://recharts.org/ | ||
|
||
#### License | ||
|
||
These reference apps are released under MIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"name": "@egovernments/digit-ui-example", | ||
"version": "1.3.0", | ||
"main": "index.js", | ||
"license": "MIT", | ||
"private": true, | ||
"homepage": "digit-ui/", | ||
"scripts": { | ||
"start": "react-scripts start" | ||
}, | ||
"devDependencies": { | ||
"@egovernments/digit-ui-libraries": "^1.3.0", | ||
"@egovernments/digit-ui-module-common": "^1.3.0", | ||
"@egovernments/digit-ui-module-fsm": "^1.3.0", | ||
"@egovernments/digit-ui-module-pgr": "^1.3.0", | ||
"@egovernments/digit-ui-module-pt": "^1.3.0", | ||
"@egovernments/digit-ui-module-mcollect": "^1.3.0", | ||
"@egovernments/digit-ui-module-tl":"^1.3.0", | ||
"@egovernments/digit-ui-module-receipts":"^1.3.0", | ||
"http-proxy-middleware": "^1.0.5", | ||
"react": "^17.0.0", | ||
"react-dom": "^17.0.0", | ||
"react-i18next": "^11.7.3", | ||
"react-router-dom": "^5.2.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" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"/> | ||
<link rel="icon" href="https://cdn.jsdelivr.net/npm/@egovernments/digit-ui-css/img/browser-icon.png"/> | ||
<link href="https://fonts.googleapis.com/css2?family=Roboto+Condensed:wght@400;500;700&family=Roboto:wght@400;500;700&display=swap" rel='stylesheet' type='text/css'> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"/> | ||
<meta name="theme-color" content="#00bcd1"/> | ||
<title>mSeva</title> | ||
<!-- <link rel="stylesheet" href="https://unpkg.com/@egovernments/digit-ui-css/dist/index.css"/> --> | ||
<script src="https://s3.ap-south-1.amazonaws.com/egov-dev-assets/globalConfigs.js"></script> | ||
<!-- <script> | ||
var globalConfigs = (function() { | ||
var stateTenantId = 'pg' | ||
var gmaps_api_key = 'AIzaSyAQOd09-vjmk1sXFb_ZQYDz2nlfhXq7Wf8' | ||
var getConfig = function(key) { | ||
if(key === 'STATE_LEVEL_TENANT_ID'){ | ||
return stateTenantId; | ||
} | ||
else if(key === 'GMAPS_API_KEY'){ | ||
return gmaps_api_key; | ||
} | ||
}; | ||
return { | ||
getConfig | ||
}; | ||
}()); | ||
</script> --> | ||
</head> | ||
<body> | ||
<noscript>You need to enable JavaScript to run this app.</noscript> | ||
<div id="root"></div> | ||
</body> | ||
|
||
</html> |
11 changes: 11 additions & 0 deletions
11
frontend/micro-ui-internals/example/src/ComponentRegistry.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
class Registry { | ||
constructor(registry = {}) { | ||
this._registry = registry; | ||
} | ||
|
||
getComponent(id) { | ||
return this._registry[id]; | ||
} | ||
} | ||
|
||
export default Registry; |
31 changes: 31 additions & 0 deletions
31
frontend/micro-ui-internals/example/src/complaintConfig.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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", | ||
}, | ||
}, | ||
}; |
7 changes: 7 additions & 0 deletions
7
frontend/micro-ui-internals/example/src/components/SelectName.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { FormStep } from "@egovernments/digit-ui-react-components"; | ||
|
||
const SelectName = ({ config, onSelect, onSkip, t }) => { | ||
return <FormStep config={config} onSelect={onSelect} t={t}></FormStep>; | ||
}; | ||
|
||
export default SelectName; |
Oops, something went wrong.