@mbehenri/openmrs-esm-opentms-meet-app 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/.editorconfig +12 -0
  2. package/.eslintignore +2 -0
  3. package/.eslintrc +57 -0
  4. package/.husky/pre-commit +7 -0
  5. package/.husky/pre-push +6 -0
  6. package/.prettierignore +14 -0
  7. package/.turbo.json +18 -0
  8. package/.yarn/install-state.gz +0 -0
  9. package/.yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs +541 -0
  10. package/.yarn/plugins/@yarnpkg/plugin-outdated.cjs +35 -0
  11. package/.yarn/releases/yarn-3.6.1.cjs +874 -0
  12. package/.yarnrc.yml +9 -0
  13. package/LICENSE +401 -0
  14. package/README.md +26 -0
  15. package/__mocks__/react-i18next.js +55 -0
  16. package/e2e/README.md +115 -0
  17. package/e2e/core/global-setup.ts +32 -0
  18. package/e2e/core/index.ts +1 -0
  19. package/e2e/core/test.ts +20 -0
  20. package/e2e/fixtures/api.ts +26 -0
  21. package/e2e/fixtures/index.ts +1 -0
  22. package/e2e/pages/home-page.ts +9 -0
  23. package/e2e/pages/index.ts +1 -0
  24. package/e2e/specs/sample-test.spec.ts +11 -0
  25. package/e2e/support/github/Dockerfile +34 -0
  26. package/e2e/support/github/docker-compose.yml +24 -0
  27. package/e2e/support/github/run-e2e-docker-env.sh +49 -0
  28. package/example.env +6 -0
  29. package/i18next-parser.config.js +89 -0
  30. package/jest.config.js +31 -0
  31. package/package.json +108 -0
  32. package/playwright.config.ts +32 -0
  33. package/src/Extensions/AppointmentTabExt.tsx +23 -0
  34. package/src/Extensions/DemandTabExt.tsx +14 -0
  35. package/src/Extensions/MeetIframeExt.tsx +14 -0
  36. package/src/Extensions/ValidateDemandFormExt.tsx +14 -0
  37. package/src/assets/img/Logo-texte.png +0 -0
  38. package/src/assets/img/Logo-texte.sim.white.png +0 -0
  39. package/src/assets/img/Logo-texte.white.png +0 -0
  40. package/src/assets/img/Logo.png +0 -0
  41. package/src/assets/img/favicon.ico +0 -0
  42. package/src/components/Appointment/index.scss +91 -0
  43. package/src/components/Appointment/index.tsx +207 -0
  44. package/src/components/Appointment/menu.scss +7 -0
  45. package/src/components/Appointment/menu.tsx +48 -0
  46. package/src/components/Appointment/tab.tsx +162 -0
  47. package/src/components/Demand/form.scss +19 -0
  48. package/src/components/Demand/form.tsx +236 -0
  49. package/src/components/Demand/index.tsx +0 -0
  50. package/src/components/Demand/tab.scss +145 -0
  51. package/src/components/Demand/tab.tsx +315 -0
  52. package/src/components/EmptyLayout/index.scss +69 -0
  53. package/src/components/EmptyLayout/index.tsx +32 -0
  54. package/src/components/MeetIframe/index.scss +56 -0
  55. package/src/components/MeetIframe/index.tsx +117 -0
  56. package/src/config-schema.ts +45 -0
  57. package/src/dashboard.meta.ts +12 -0
  58. package/src/declarations.d.ts +6 -0
  59. package/src/index.ts +75 -0
  60. package/src/pages/home/home.component.tsx +8 -0
  61. package/src/privileges/doctor.ts +213 -0
  62. package/src/repositories/Opencare/index.ts +12 -0
  63. package/src/repositories/Opencare/prodRepository.ts +176 -0
  64. package/src/repositories/Opencare/repository.ts +34 -0
  65. package/src/repositories/TypeRepository.ts +1 -0
  66. package/src/repositories/env.ts +7 -0
  67. package/src/repositories/errors.ts +13 -0
  68. package/src/root.component.tsx +46 -0
  69. package/src/root.scss +15 -0
  70. package/src/root.test.tsx +54 -0
  71. package/src/routes.json +44 -0
  72. package/src/services/doctor.ts +165 -0
  73. package/src/setup-tests.ts +1 -0
  74. package/src/utils.ts +41 -0
  75. package/translations/en.json +1 -0
  76. package/translations/es.json +24 -0
  77. package/translations/fr.json +24 -0
  78. package/translations/he.json +24 -0
  79. package/translations/km.json +24 -0
  80. package/tsconfig.json +24 -0
  81. package/webpack.config.js +1 -0
package/.editorconfig ADDED
@@ -0,0 +1,12 @@
1
+ root = true
2
+
3
+ [*]
4
+ indent_style = space
5
+ indent_size = 2
6
+ charset = utf-8
7
+ trim_trailing_whitespace = true
8
+ insert_final_newline = true
9
+ end_of_line = lf
10
+
11
+ [*.md]
12
+ trim_trailing_whitespace = false
package/.eslintignore ADDED
@@ -0,0 +1,2 @@
1
+ src/**/*.test.tsx
2
+ **/*.d.tsx
package/.eslintrc ADDED
@@ -0,0 +1,57 @@
1
+ {
2
+ "env": {
3
+ "node": true
4
+ },
5
+ "extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
6
+ "parser": "@typescript-eslint/parser",
7
+ "plugins": ["@typescript-eslint", "react-hooks"],
8
+ "root": true,
9
+ "rules": {
10
+ "react-hooks/exhaustive-deps": "warn",
11
+ "react-hooks/rules-of-hooks": "error",
12
+ // Disabling these rules for now just to keep the diff small. I'll enable them in a future PR that fixes lint issues.
13
+ "@typescript-eslint/no-explicit-any": "off",
14
+ "@typescript-eslint/no-unused-vars": "off",
15
+ "@typescript-eslint/no-var-requires": "off",
16
+ "@typescript-eslint/ban-ts-comment": "off",
17
+ "@typescript-eslint/ban-types": "off",
18
+ // Use `import type` instead of `import` for type imports https://typescript-eslint.io/blog/consistent-type-imports-and-exports-why-and-how
19
+ "@typescript-eslint/consistent-type-imports": [
20
+ "error",
21
+ {
22
+ "fixStyle": "inline-type-imports"
23
+ }
24
+ ],
25
+ "prefer-const": "off",
26
+ "no-console": ["error", { "allow": ["warn", "error"] }],
27
+ "no-unsafe-optional-chaining": "off",
28
+ "no-explicit-any": "off",
29
+ "no-extra-boolean-cast": "off",
30
+ /* "no-prototype-builtins": "off", */
31
+ "no-useless-escape": "off",
32
+ "no-restricted-imports": [
33
+ "error",
34
+ {
35
+ "paths": [
36
+ {
37
+ "name": "lodash",
38
+ "message": "Import specific methods from `lodash`. e.g. `import map from 'lodash/map'`"
39
+ },
40
+ {
41
+ "name": "lodash-es",
42
+ "importNames": ["default"],
43
+ "message": "Import specific methods from `lodash-es`. e.g. `import { map } from 'lodash-es'`"
44
+ },
45
+ {
46
+ "name": "carbon-components-react",
47
+ "message": "Import from `@carbon/react` directly. e.g. `import { Toggle } from '@carbon/react'`"
48
+ },
49
+ {
50
+ "name": "@carbon/icons-react",
51
+ "message": "Import from `@carbon/react/icons`. e.g. `import { ChevronUp } from '@carbon/react/icons'`"
52
+ }
53
+ ]
54
+ }
55
+ ]
56
+ }
57
+ }
@@ -0,0 +1,7 @@
1
+ #!/bin/sh
2
+ . "$(dirname "$0")/_/husky.sh"
3
+
4
+ set -e # die on error
5
+
6
+ yarn pretty-quick --staged
7
+ yarn turbo run extract-translations
@@ -0,0 +1,6 @@
1
+ #!/bin/sh
2
+ . "$(dirname "$0")/_/husky.sh"
3
+
4
+ set -e # die on error
5
+
6
+ yarn verify
@@ -0,0 +1,14 @@
1
+ # directories
2
+ .husky/
3
+ dist/
4
+ node_modules/
5
+
6
+ # dotfiles and generated
7
+ .*
8
+ yarn.lock
9
+
10
+ # by file type
11
+ **/*.css
12
+ **/*.scss
13
+ **/*.md
14
+ **/*.json
package/.turbo.json ADDED
@@ -0,0 +1,18 @@
1
+ {
2
+ "$schema": "https://turbo.build/schema.json",
3
+ "pipeline": {
4
+ "build": {
5
+ "outputs": ["dist/**"]
6
+ },
7
+ "lint": {},
8
+ "extract-translations": {
9
+ "outputs": ["./translations/*"]
10
+ },
11
+ "test": {},
12
+ "coverage": {
13
+ "outputs": ["coverage/**"]
14
+ },
15
+ "typescript": {},
16
+ "verify": {}
17
+ }
18
+ }
Binary file