-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* OHRI-2016 TB microfrontend * updates yarn.lock
- Loading branch information
Showing
15 changed files
with
223 additions
and
0 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,4 @@ | ||
# esm-tb-app | ||
|
||
The Tuberclosis app tracks and manages patients on TB treatment. It provides a clinical dashboard with an overall view of patients as well as patient workflows. | ||
|
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,49 @@ | ||
{ | ||
"name": "@ohri/openmrs-esm-ohri-tb-app", | ||
"version": "2.0.2", | ||
"description": "Tuberclosis microfrontend for OpenMRS HIV Reference Implementation (OHRI)", | ||
"browser": "dist/openmrs-esm-ohri-tb-app.js", | ||
"main": "src/index.ts", | ||
"license": "MIT", | ||
"homepage": "https://github.com/UCSF-IGHS/openmrs-esm-ohri#readme", | ||
"scripts": { | ||
"start": "openmrs develop", | ||
"serve": "webpack serve --mode=development", | ||
"debug": "npm run serve", | ||
"build": "webpack --mode production", | ||
"analyze": "webpack --mode=production --env.analyze=true", | ||
"lint": "eslint src --ext tsx", | ||
"typescript": "tsc", | ||
"prepublishOnly": "npm run build", | ||
"extract-translations": "i18next 'src/**/*.component.tsx'" | ||
}, | ||
"browserslist": [ | ||
"extends browserslist-config-openmrs" | ||
], | ||
"keywords": [ | ||
"openmrs" | ||
], | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/UCSF-IGHS/openmrs-esm-ohri.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/UCSF-IGHS/openmrs-esm-ohri/issues" | ||
}, | ||
"dependencies": { | ||
"@carbon/react": "^1.13.0" | ||
}, | ||
"peerDependencies": { | ||
"@openmrs/esm-framework": "5.x", | ||
"@openmrs/esm-patient-common-lib": "5.x", | ||
"dayjs": "^1.8.16", | ||
"react": "^18.2.0", | ||
"react-i18next": "^11.18.6" | ||
}, | ||
"devDependencies": { | ||
"webpack": "^5.74.0" | ||
} | ||
} |
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 @@ | ||
export const sampleConstant = 'xxxxxxxxxxxx'; |
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,4 @@ | ||
export const tuberclosisMeta = { | ||
title: 'Tuberclosis', | ||
slotName: 'tuberclosis-slot', | ||
}; |
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,21 @@ | ||
@import "./root.scss"; | ||
|
||
.noMarker { | ||
list-style-type: none; | ||
} | ||
|
||
.noMarker ul li a { | ||
padding-left: 40px !important; | ||
font: lighter; | ||
} | ||
|
||
.currentNavItem > a { | ||
background-color: #cecece !important; | ||
color: #161616 !important; | ||
border-left-color: var(--brand-01) !important; | ||
font: bolder; | ||
} | ||
|
||
.hide { | ||
display: none; | ||
} |
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,2 @@ | ||
declare module '*.css'; | ||
declare module '*.scss'; |
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,17 @@ | ||
import { defineConfigSchema, getAsyncLifecycle, getSyncLifecycle } from '@openmrs/esm-framework'; | ||
import { createDashboardGroup, createDashboardLink } from '@openmrs/esm-patient-common-lib'; | ||
|
||
export const importTranslation = require.context('../translations', false, /.json$/, 'lazy'); | ||
|
||
require('./root.scss'); | ||
|
||
export const moduleName = '@ohri/openmrs-esm-ohri-tb-app'; | ||
|
||
const options = { | ||
featureName: 'ohri-tb', | ||
moduleName, | ||
}; | ||
|
||
export function startupApp() { | ||
defineConfigSchema(moduleName, {}); | ||
} |
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 @@ | ||
@use '@carbon/styles/scss/spacing'; | ||
@use '@carbon/styles/scss/type'; | ||
@import '~@openmrs/esm-styleguide/src/vars'; |
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,10 @@ | ||
{ | ||
"$schema": "https://json.openmrs.org/routes.schema.json", | ||
"backendDependencies": { | ||
"webservices.rest": "^2.24.0" | ||
}, | ||
"pages": [ | ||
], | ||
"extensions": [ | ||
] | ||
} |
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,15 @@ | ||
import '@testing-library/jest-dom/extend-expect'; | ||
|
||
declare global { | ||
interface Window { | ||
openmrsBase: string; | ||
spaBase: string; | ||
} | ||
} | ||
|
||
const { getComputedStyle } = window; | ||
window.getComputedStyle = (element) => getComputedStyle(element); | ||
window.openmrsBase = '/openmrs'; | ||
window.spaBase = '/spa'; | ||
window.getOpenmrsSpaBase = () => '/openmrs/spa/'; | ||
window.HTMLElement.prototype.scrollIntoView = jest.fn(); |
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 @@ | ||
@use "@carbon/styles/scss/spacing"; | ||
@import "../root.scss"; | ||
|
||
.widgetContainer { | ||
background-color: $ui-background; | ||
} | ||
|
||
.widgetHeaderContainer { | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
padding: spacing.$spacing-04 0 spacing.$spacing-04 spacing.$spacing-05; | ||
} | ||
|
||
.widgetHeaderContainer > h4:after { | ||
content: ""; | ||
display: block; | ||
width: 2rem; | ||
padding-top: 0.188rem; | ||
border-bottom: 0.375rem solid var(--brand-01); | ||
} | ||
|
||
.toggleButtons { | ||
width: fit-content; | ||
margin: 0 spacing.$spacing-03; | ||
} | ||
|
||
.tabContainer div[role="tabpanel"] { | ||
padding: 0 !important; | ||
} | ||
|
||
.tabContainer li button { | ||
width: 100% !important; | ||
} |
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 @@ | ||
{ | ||
"tuberclosis": "Tuberclosis" | ||
} |
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 @@ | ||
{ | ||
"compilerOptions": { | ||
"esModuleInterop": true, | ||
"module": "esnext", | ||
"allowSyntheticDefaultImports": true, | ||
"jsx": "react", | ||
"skipLibCheck": true, | ||
"moduleResolution": "node", | ||
"lib": [ | ||
"dom", | ||
"es5", | ||
"scripthost", | ||
"es2015", | ||
"es2015.promise", | ||
"es2016.array.include", | ||
"es2018", | ||
"es2020" | ||
], | ||
"resolveJsonModule": true, | ||
"noEmit": true, | ||
"target": "esnext", | ||
"paths": { | ||
"@openmrs/*": [ | ||
"./node_modules/@openmrs/*" | ||
] | ||
} | ||
} | ||
} |
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,17 @@ | ||
const path = require('path'); | ||
const config = (module.exports = require('openmrs/default-webpack-config')); | ||
config.scriptRuleConfig.exclude = | ||
path.sep == '/' | ||
? /(node_modules[^\/@openmrs\/esm\-patient\-common\-lib])/ | ||
: /(node_modules[^\\@openmrs\/esm\-patient\-common\-lib])/; | ||
|
||
// Temporary fix to resolve webpack issues with imports from the commons library | ||
config.overrides.resolve = { | ||
extensions: ['.tsx', '.ts', '.jsx', '.js', '.scss'], | ||
alias: { | ||
'@openmrs/esm-framework': '@openmrs/esm-framework/src/internal', | ||
'@ohri/openmrs-esm-ohri-commons-lib': path.resolve(__dirname, '../esm-commons-lib/src/index'), | ||
'@openmrs/openmrs-form-engine-lib': '@openmrs/openmrs-form-engine-lib/src/index', | ||
}, | ||
}; | ||
module.exports = config; |
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