@openmrs/esm-fast-data-entry-app 1.0.1-pre.8 → 1.0.1-pre.85

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 (86) hide show
  1. package/README.md +21 -2
  2. package/dist/132.js +1 -0
  3. package/dist/168.js +1 -0
  4. package/dist/229.js +1 -0
  5. package/dist/247.js +1 -0
  6. package/dist/255.js +1 -0
  7. package/dist/294.js +2 -0
  8. package/dist/294.js.LICENSE.txt +9 -0
  9. package/dist/32.js +1 -0
  10. package/dist/327.js +1 -0
  11. package/dist/403.js +2 -0
  12. package/dist/403.js.LICENSE.txt +14 -0
  13. package/dist/553.js +2 -0
  14. package/dist/553.js.LICENSE.txt +14 -0
  15. package/dist/574.js +1 -0
  16. package/dist/595.js +2 -0
  17. package/dist/595.js.LICENSE.txt +3 -0
  18. package/dist/617.js +1 -0
  19. package/dist/658.js +2 -0
  20. package/dist/658.js.LICENSE.txt +27 -0
  21. package/dist/68.js +2 -0
  22. package/dist/68.js.LICENSE.txt +21 -0
  23. package/dist/74.js +1 -0
  24. package/dist/757.js +1 -0
  25. package/dist/776.js +1 -0
  26. package/dist/804.js +1 -0
  27. package/dist/820.js +1 -0
  28. package/dist/935.js +2 -0
  29. package/dist/935.js.LICENSE.txt +19 -0
  30. package/dist/main.js +1 -0
  31. package/dist/openmrs-esm-fast-data-entry-app.js +1 -1
  32. package/dist/openmrs-esm-fast-data-entry-app.js.buildmanifest.json +612 -0
  33. package/dist/openmrs-esm-fast-data-entry-app.old +1 -0
  34. package/jest.config.json +2 -1
  35. package/package.json +9 -9
  36. package/src/CancelModal.tsx +48 -0
  37. package/src/CompleteModal.tsx +46 -0
  38. package/src/FormBootstrap.tsx +18 -3
  39. package/src/add-group-modal/AddGroupModal.tsx +80 -27
  40. package/src/add-group-modal/styles.scss +14 -4
  41. package/src/config-schema.ts +22 -0
  42. package/src/context/FormWorkflowContext.tsx +13 -1
  43. package/src/context/FormWorkflowReducer.ts +13 -3
  44. package/src/context/GroupFormWorkflowContext.tsx +41 -6
  45. package/src/context/GroupFormWorkflowReducer.ts +170 -12
  46. package/src/form-entry-workflow/FormEntryWorkflow.tsx +67 -101
  47. package/src/form-entry-workflow/styles.scss +2 -1
  48. package/src/forms-page/FormsPage.tsx +8 -3
  49. package/src/forms-page/forms-table/FormsTable.tsx +11 -5
  50. package/src/group-form-entry-workflow/GroupFormEntryWorkflow.tsx +13 -400
  51. package/src/group-form-entry-workflow/GroupSessionWorkspace.tsx +247 -0
  52. package/src/group-form-entry-workflow/SessionDetailsForm.tsx +122 -0
  53. package/src/group-form-entry-workflow/SessionMetaWorkspace.tsx +107 -0
  54. package/src/group-form-entry-workflow/attendance-table/AttendanceTable.tsx +105 -0
  55. package/src/group-form-entry-workflow/attendance-table/index.ts +1 -0
  56. package/src/group-form-entry-workflow/{group-banner/GroupBanner.test.tsx → group-display-header/GroupDisplayHeader.test.tsx} +2 -2
  57. package/src/group-form-entry-workflow/{group-banner/GroupBanner.tsx → group-display-header/GroupDisplayHeader.tsx} +23 -5
  58. package/src/group-form-entry-workflow/group-display-header/index.ts +3 -0
  59. package/src/group-form-entry-workflow/group-search/CompactGroupResults.tsx +61 -28
  60. package/src/group-form-entry-workflow/group-search/CompactGroupSearch.tsx +5 -0
  61. package/src/group-form-entry-workflow/group-search/GroupSearch.tsx +65 -8
  62. package/src/group-form-entry-workflow/group-search/group-search.scss +8 -6
  63. package/src/group-form-entry-workflow/group-search-header/GroupSearchHeader.tsx +11 -7
  64. package/src/group-form-entry-workflow/styles.scss +12 -1
  65. package/src/hooks/index.ts +1 -0
  66. package/src/hooks/useGetPatient.ts +1 -1
  67. package/src/hooks/useGetSystemSetting.ts +38 -0
  68. package/src/hooks/usePostEndpoint.ts +70 -0
  69. package/src/hooks/useSearchEndpoint.ts +120 -0
  70. package/src/hooks/useStartVisit.ts +92 -0
  71. package/src/patient-card/styles.scss +1 -0
  72. package/tools/i18next-parser.config.js +93 -0
  73. package/translations/en.json +27 -9
  74. package/translations/fr.json +50 -0
  75. package/.editorconfig +0 -12
  76. package/.eslintignore +0 -2
  77. package/.eslintrc.js +0 -10
  78. package/.husky/pre-push +0 -1
  79. package/.prettierignore +0 -14
  80. package/.yarn/plugins/@yarnpkg/plugin-version.cjs +0 -550
  81. package/.yarn/versions/7ee3eceb.yml +0 -0
  82. package/src/group-form-entry-workflow/group-banner/index.ts +0 -3
  83. package/src/group-form-entry-workflow/group-search/mock-group-data.ts +0 -79
  84. package/src/group-form-entry-workflow/group-search/useGroupSearch.ts +0 -14
  85. package/src/hooks/usePostCohort.ts +0 -18
  86. /package/src/group-form-entry-workflow/{group-banner → group-display-header}/styles.scss +0 -0
@@ -0,0 +1,93 @@
1
+ module.exports = {
2
+ contextSeparator: "_",
3
+ // Key separator used in your translation keys
4
+
5
+ createOldCatalogs: false,
6
+ // Save the \_old files
7
+
8
+ defaultNamespace: "translations",
9
+ // Default namespace used in your i18next config
10
+
11
+ defaultValue: "",
12
+ // Default value to give to empty keys
13
+ // You may also specify a function accepting the locale, namespace, and key as arguments
14
+
15
+ indentation: 2,
16
+ // Indentation of the catalog files
17
+
18
+ keepRemoved: false,
19
+ // Keep keys from the catalog that are no longer in code
20
+
21
+ keySeparator: ".",
22
+ // Key separator used in your translation keys
23
+ // If you want to use plain english keys, separators such as `.` and `:` will conflict. You might want to set `keySeparator: false` and `namespaceSeparator: false`. That way, `t('Status: Loading...')` will not think that there are a namespace and three separator dots for instance.
24
+
25
+ // see below for more details
26
+ lexers: {
27
+ hbs: ["HandlebarsLexer"],
28
+ handlebars: ["HandlebarsLexer"],
29
+
30
+ htm: ["HTMLLexer"],
31
+ html: ["HTMLLexer"],
32
+
33
+ mjs: ["JavascriptLexer"],
34
+ js: ["JavascriptLexer"], // if you're writing jsx inside .js files, change this to JsxLexer
35
+ ts: ["JavascriptLexer"],
36
+ jsx: ["JsxLexer"],
37
+ tsx: ["JsxLexer"],
38
+
39
+ default: ["JavascriptLexer"],
40
+ },
41
+
42
+ lineEnding: "lf",
43
+ // Control the line ending. See options at https://github.com/ryanve/eol
44
+
45
+ locales: ["en"],
46
+ // An array of the locales in your applications
47
+
48
+ namespaceSeparator: ":",
49
+ // Namespace separator used in your translation keys
50
+ // If you want to use plain english keys, separators such as `.` and `:` will conflict. You might want to set `keySeparator: false` and `namespaceSeparator: false`. That way, `t('Status: Loading...')` will not think that there are a namespace and three separator dots for instance.
51
+
52
+ output: "$NAMESPACE/$LOCALE.json",
53
+ // Supports $LOCALE and $NAMESPACE injection
54
+ // Supports JSON (.json) and YAML (.yml) file formats
55
+ // Where to write the locale files relative to process.cwd()
56
+
57
+ pluralSeparator: "_",
58
+ // Plural separator used in your translation keys
59
+ // If you want to use plain english keys, separators such as `_` might conflict. You might want to set `pluralSeparator` to a different string that does not occur in your keys.
60
+
61
+ input: undefined,
62
+ // An array of globs that describe where to look for source files
63
+ // relative to the location of the configuration file
64
+
65
+ sort: true,
66
+ // Whether or not to sort the catalog
67
+
68
+ skipDefaultValues: false,
69
+ // Whether to ignore default values
70
+ // You may also specify a function accepting the locale and namespace as arguments
71
+
72
+ useKeysAsDefaultValue: false,
73
+ // Whether to use the keys as the default value; ex. "Hello": "Hello", "World": "World"
74
+ // This option takes precedence over the `defaultValue` and `skipDefaultValues` options
75
+ // You may also specify a function accepting the locale and namespace as arguments
76
+
77
+ verbose: false,
78
+ // Display info about the parsing including some stats
79
+
80
+ failOnWarnings: false,
81
+ // Exit with an exit code of 1 on warnings
82
+
83
+ customValueTemplate: null,
84
+ // If you wish to customize the value output the value as an object, you can set your own format.
85
+ // ${defaultValue} is the default value you set in your translation function.
86
+ // Any other custom property will be automatically extracted.
87
+ //
88
+ // Example:
89
+ // {
90
+ // message: "${defaultValue}",
91
+ // description: "${maxLength}", // t('my-key', {maxLength: 150})
92
+ // }
93
+ };
@@ -1,49 +1,67 @@
1
1
  {
2
2
  "actions": "Actions",
3
3
  "allFieldsRequired": "All fields are required unless marked optional",
4
+ "allForms": "All Forms",
4
5
  "areYouSure": "Are you sure?",
5
6
  "cancel": "Cancel",
6
7
  "cancelExplanation": "You will lose any unsaved changes on the current form. Do you want to discard the current session?",
8
+ "changeGroup": "Choose a different group",
7
9
  "chooseGroupError": "Please choose a group.",
8
- "createNewPatient": "Create new patient",
10
+ "clearSearch": "Clear",
11
+ "complete": "Complete",
9
12
  "createGroup": "Create Group",
10
13
  "createNewGroup": "Create New Group",
14
+ "createNewPatient": "Create new patient",
11
15
  "createNewSession": "Create New Session",
12
- "complete": "Complete",
13
- "dataErrorMessage": "Something went wrong loading data from the server.",
14
- "description": "Description",
15
16
  "discard": "Discard",
16
17
  "error": "Error",
17
- "errorCoppy": "Sorry, there was an error. You can try to reload this page, or contact the site administrator and quote the error code above.",
18
+ "errorCopy": "Sorry, there was an error. You can try to reload this page, or contact the site administrator and quote the error code above.",
18
19
  "errorLoadingData": "Error Loading Data",
19
20
  "fastDataEntry": "Fast Data Entry",
20
21
  "fillForm": "Fill Form",
22
+ "findGroup": "Find group",
21
23
  "formName": "Form Name",
24
+ "formsAppMenuLink": "Fast Data Entry",
25
+ "formsFilled": "Forms filled",
22
26
  "goToForm": "Go To Form",
23
- "group": "Group",
24
27
  "groupNameError": "Please enter a group name.",
28
+ "identifier": "Identifier",
29
+ "markAbsentPatients": "The patients in this group. Patients that are not present in the session should be marked as absent.",
25
30
  "members": "members",
31
+ "name": "Name",
26
32
  "newGroupName": "New Group Name",
33
+ "newGroupSession": "New Group Session",
27
34
  "nextPatient": "Next Patient",
28
35
  "noFormsFound": "No Forms To Show",
29
36
  "noFormsFoundMessage": "No forms could be found for this category. Please double check the form concept uuids and access permissions.",
30
37
  "noGroupsFoundMessage": "Sorry, no groups have been found",
38
+ "noMoreResults": "End of search results",
31
39
  "noPatientError": "Please enter at least one patient.",
32
40
  "or": "or",
33
41
  "orLabelName": "OR label name",
42
+ "patientIsPresent": "Patient is present",
43
+ "patientsInGroup": "Patients in group",
44
+ "postError": "POST Error",
34
45
  "practitionerName": "Practitioner Name",
35
46
  "remove": "Remove",
36
- "resumeSession": "Resume Session",
37
47
  "resumeGroupSession": "Resume Group Session",
48
+ "resumeSession": "Resume Session",
38
49
  "saveAndComplete": "Save & Complete",
39
50
  "saveExplanation": "Do you want to save the current form and exit the workflow?",
51
+ "saveForm": "Save Form",
40
52
  "saveSession": "Save Session",
53
+ "search": "Search",
54
+ "searchForGroup": "Search for a group by name",
41
55
  "searchResultsText": "search result(s)",
56
+ "selectGroupFirst": "Please select a group first",
42
57
  "selectPatientFirst": "Please select a patient first",
43
58
  "sessionDate": "Session Date",
44
- "sessionDetails": "Session details",
59
+ "sessionDetails": "1. Session details",
45
60
  "sessionName": "Session Name",
46
61
  "sessionNotes": "Session Notes",
62
+ "sessionParticipants": "2. Session participants",
47
63
  "startGroupSession": "Start Group Session",
48
- "trySearchWithPatientUniqueID": "Try searching with the cohort's description"
64
+ "trySearchWithPatientUniqueID": "Try searching with the cohort's description",
65
+ "unknown": "Unknown",
66
+ "unknownPostError": "An unknown error occured while saving data"
49
67
  }
@@ -0,0 +1,50 @@
1
+ {
2
+ "actions": "Actions",
3
+ "allFieldsRequired": "Tous les champs sont requis, sauf s'ils sont marqués comme optionnels",
4
+ "areYouSure": "Êtes vous sûres?",
5
+ "cancel": "Annuler",
6
+ "cancelExplanation": "Les modifications non sauvegardées seront perdues. Souhaitez-vous quitter la session actuelle?",
7
+ "chooseGroupError": "Veuillez sélectionner un groupe",
8
+ "createNewPatient": "Créer un nouveau patient",
9
+ "createGroup": "Créer un groupe",
10
+ "createNewGroup": "Créer un nouveau groupe",
11
+ "createNewSession": "Créer une nouvelle session",
12
+ "complete": "Terminer",
13
+ "dataErrorMessage": "Un problème est survenu en chargeant les données du serveur",
14
+ "description": "Description",
15
+ "discard": "Eliminer",
16
+ "error": "Erreur",
17
+ "errorCoppy": "Désolé, il y a eu une erreur. Vous pouvez essayer de recharger cette page, ou contacter l'administrateur du site et citer le code d'erreur ci-dessus.",
18
+ "errorLoadingData": "Erreur de chargement des données",
19
+ "fastDataEntry": "Saisie rapide de données",
20
+ "fillForm": "Remplir le formulaire",
21
+ "formName": "Nom du formulaire",
22
+ "formsAppMenuLink": "Saisie rapide de données",
23
+ "goToForm": "Accéder au formulaire",
24
+ "group": "Groupe",
25
+ "groupNameError": "Veuillez saisir un nom de groupe",
26
+ "members": "Membres",
27
+ "newGroupName": "Nom du nouveau groupe",
28
+ "nextPatient": "Prochain patient",
29
+ "noFormsFound": "Aucun formulaire à montrer",
30
+ "noFormsFoundMessage": "Aucun formulaire n'a pu être trouvé pour cette catégorie. Veuillez vérifier l'UUIDS du concept du formulaire ainsi que les droits d'accès.",
31
+ "noGroupsFoundMessage": "Désolé, aucun groupe n'a pu être trouvé.",
32
+ "noPatientError": "Veuillez entrer au moins un patient",
33
+ "or": "ou",
34
+ "orLabelName": "OU nom de l'étiquette",
35
+ "practitionerName": "Nom du praticien",
36
+ "remove": "Enlever",
37
+ "resumeSession": "Reprendre la session",
38
+ "resumeGroupSession": "Reprendre la session de groupe",
39
+ "saveAndComplete": "Sauvegarder et terminer",
40
+ "saveExplanation": "Voulez-vous sauvegarder le formulaire actuel et quitter le flux de travail?",
41
+ "saveSession": "Sauvegarder la session",
42
+ "searchResultsText": "Résultat(s) de la recherche",
43
+ "selectPatientFirst": "Veuillez d'abord sélectionner un patient",
44
+ "sessionDate": "Date de la session",
45
+ "sessionDetails": "Détails de la session",
46
+ "sessionName": "Nom de la session",
47
+ "sessionNotes": "Notes de la session",
48
+ "startGroupSession": "Démarrer la session de groupe",
49
+ "trySearchWithPatientUniqueID": "Essayez de rechercher la description de la cohorte"
50
+ }
package/.editorconfig DELETED
@@ -1,12 +0,0 @@
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 DELETED
@@ -1,2 +0,0 @@
1
- src/**/*.test.tsx
2
- **/*.d.tsx
package/.eslintrc.js DELETED
@@ -1,10 +0,0 @@
1
- module.exports = {
2
- "extends": [
3
- "eslint:recommended",
4
- "ts-react-important-stuff",
5
- "plugin:prettier/recommended",
6
- 'react-app',
7
- 'plugin:@typescript-eslint/recommended',
8
- ],
9
- "parser": "@typescript-eslint/parser",
10
- }
package/.husky/pre-push DELETED
@@ -1 +0,0 @@
1
- yarn verify
package/.prettierignore DELETED
@@ -1,14 +0,0 @@
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