@openmrs/esm-patient-forms-app 11.3.1-patch.9064 → 11.3.1-patch.9310

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 (146) hide show
  1. package/.turbo/turbo-build.log +25 -23
  2. package/dist/1119.js +1 -1
  3. package/dist/1197.js +1 -1
  4. package/dist/2146.js +1 -1
  5. package/dist/2621.js +2 -0
  6. package/dist/2621.js.map +1 -0
  7. package/dist/2690.js +1 -1
  8. package/dist/3099.js +1 -1
  9. package/dist/3584.js +1 -1
  10. package/dist/4055.js +1 -1
  11. package/dist/4078.js +1 -1
  12. package/dist/4078.js.map +1 -1
  13. package/dist/4132.js +1 -1
  14. package/dist/4300.js +1 -1
  15. package/dist/4335.js +1 -1
  16. package/dist/4341.js +1 -0
  17. package/dist/4341.js.map +1 -0
  18. package/dist/4618.js +1 -1
  19. package/dist/4652.js +1 -1
  20. package/dist/4944.js +1 -1
  21. package/dist/5173.js +1 -1
  22. package/dist/5241.js +1 -1
  23. package/dist/5442.js +1 -1
  24. package/dist/5661.js +1 -1
  25. package/dist/5670.js +1 -1
  26. package/dist/5670.js.map +1 -1
  27. package/dist/5792.js +2 -0
  28. package/dist/{7906.js.LICENSE.txt → 5792.js.LICENSE.txt} +10 -0
  29. package/dist/5792.js.map +1 -0
  30. package/dist/6022.js +1 -1
  31. package/dist/6336.js +1 -0
  32. package/dist/6336.js.map +1 -0
  33. package/dist/6468.js +1 -1
  34. package/dist/6679.js +1 -1
  35. package/dist/6840.js +1 -1
  36. package/dist/6859.js +1 -1
  37. package/dist/7003.js +1 -1
  38. package/dist/7003.js.map +1 -1
  39. package/dist/7007.js +1 -1
  40. package/dist/7007.js.map +1 -1
  41. package/dist/707.js +1 -1
  42. package/dist/707.js.map +1 -1
  43. package/dist/7097.js +1 -1
  44. package/dist/7159.js +1 -1
  45. package/dist/723.js +1 -1
  46. package/dist/7617.js +1 -1
  47. package/dist/795.js +1 -1
  48. package/dist/8163.js +1 -1
  49. package/dist/8349.js +1 -1
  50. package/dist/8618.js +1 -1
  51. package/dist/890.js +1 -1
  52. package/dist/9214.js +1 -1
  53. package/dist/9431.js +1 -1
  54. package/dist/9538.js +1 -1
  55. package/dist/9569.js +1 -1
  56. package/dist/9649.js +1 -0
  57. package/dist/9649.js.map +1 -0
  58. package/dist/986.js +1 -1
  59. package/dist/9879.js +1 -1
  60. package/dist/9895.js +1 -1
  61. package/dist/9900.js +1 -1
  62. package/dist/9913.js +1 -1
  63. package/dist/main.js +1 -1
  64. package/dist/main.js.map +1 -1
  65. package/dist/openmrs-esm-patient-forms-app.js +1 -1
  66. package/dist/openmrs-esm-patient-forms-app.js.buildmanifest.json +251 -281
  67. package/dist/openmrs-esm-patient-forms-app.js.map +1 -1
  68. package/dist/routes.json +1 -1
  69. package/package.json +3 -3
  70. package/src/clinical-form-action-button.component.tsx +17 -40
  71. package/src/clinical-form-action-button.test.tsx +29 -53
  72. package/src/config-schema.ts +1 -1
  73. package/src/forms/exported-form-entry.workspace.tsx +32 -0
  74. package/src/forms/exported-forms-dashboard.workspace.tsx +45 -0
  75. package/src/forms/form-entry.component.tsx +138 -0
  76. package/src/forms/form-entry.resources.ts +37 -0
  77. package/src/forms/form-entry.test.tsx +17 -36
  78. package/src/forms/form-entry.workspace.tsx +19 -100
  79. package/src/forms/forms-dashboard.component.tsx +13 -59
  80. package/src/forms/forms-dashboard.test.tsx +4 -31
  81. package/src/forms/forms-dashboard.workspace.tsx +33 -10
  82. package/src/forms/forms-list.component.tsx +20 -41
  83. package/src/forms/forms-list.test.tsx +2 -2
  84. package/src/forms/forms-table.component.tsx +2 -2
  85. package/src/hooks/use-forms.ts +3 -4
  86. package/src/index.ts +1 -9
  87. package/src/offline-forms/offline-forms.component.tsx +3 -3
  88. package/src/offline-forms/use-offline-form-encounters.ts +2 -2
  89. package/src/offline.ts +5 -7
  90. package/src/routes.json +14 -45
  91. package/translations/am.json +2 -0
  92. package/translations/ar.json +2 -0
  93. package/translations/ar_SY.json +2 -0
  94. package/translations/bn.json +2 -0
  95. package/translations/de.json +2 -0
  96. package/translations/en.json +2 -0
  97. package/translations/en_US.json +2 -0
  98. package/translations/es.json +2 -0
  99. package/translations/es_MX.json +2 -0
  100. package/translations/fr.json +2 -0
  101. package/translations/he.json +2 -0
  102. package/translations/hi.json +2 -0
  103. package/translations/hi_IN.json +2 -0
  104. package/translations/id.json +2 -0
  105. package/translations/it.json +2 -0
  106. package/translations/ka.json +2 -0
  107. package/translations/km.json +2 -0
  108. package/translations/ku.json +2 -0
  109. package/translations/ky.json +2 -0
  110. package/translations/lg.json +2 -0
  111. package/translations/ne.json +2 -0
  112. package/translations/pl.json +2 -0
  113. package/translations/pt.json +2 -0
  114. package/translations/pt_BR.json +2 -0
  115. package/translations/qu.json +2 -0
  116. package/translations/ro_RO.json +2 -0
  117. package/translations/ru_RU.json +2 -0
  118. package/translations/si.json +2 -0
  119. package/translations/sw.json +2 -0
  120. package/translations/sw_KE.json +2 -0
  121. package/translations/tr.json +2 -0
  122. package/translations/tr_TR.json +2 -0
  123. package/translations/uk.json +2 -0
  124. package/translations/uz.json +2 -0
  125. package/translations/uz@Latn.json +2 -0
  126. package/translations/uz_UZ.json +2 -0
  127. package/translations/vi.json +2 -0
  128. package/translations/zh.json +2 -0
  129. package/translations/zh_CN.json +2 -0
  130. package/dist/1123.js +0 -2
  131. package/dist/1123.js.LICENSE.txt +0 -9
  132. package/dist/1123.js.map +0 -1
  133. package/dist/2773.js +0 -1
  134. package/dist/2773.js.map +0 -1
  135. package/dist/4340.js +0 -2
  136. package/dist/4340.js.map +0 -1
  137. package/dist/5639.js +0 -1
  138. package/dist/5639.js.map +0 -1
  139. package/dist/5696.js +0 -1
  140. package/dist/5696.js.map +0 -1
  141. package/dist/7906.js +0 -2
  142. package/dist/7906.js.map +0 -1
  143. package/dist/8803.js +0 -1
  144. package/dist/8803.js.map +0 -1
  145. package/src/htmlformentry/html-form-entry.workspace.tsx +0 -59
  146. /package/dist/{4340.js.LICENSE.txt → 2621.js.LICENSE.txt} +0 -0
@@ -1,59 +0,0 @@
1
- import React from 'react';
2
- import {
3
- type DefaultPatientWorkspaceProps,
4
- type FormEntryProps,
5
- useVisitOrOfflineVisit,
6
- } from '@openmrs/esm-patient-common-lib';
7
- import HtmlFormEntryWrapper from './html-form-entry-wrapper.component';
8
-
9
- interface HtmlFormEntryComponentProps extends DefaultPatientWorkspaceProps {
10
- formInfo: FormEntryProps;
11
- }
12
-
13
- const HtmlFormEntry: React.FC<HtmlFormEntryComponentProps> = ({
14
- patientUuid,
15
- patient,
16
- closeWorkspaceWithSavedChanges,
17
- promptBeforeClosing,
18
- formInfo,
19
- }) => {
20
- const { currentVisit } = useVisitOrOfflineVisit(patientUuid);
21
- const { encounterUuid, visitUuid, htmlForm } = formInfo || {};
22
-
23
- // we always want to prompt the user before closing/hiding the workspace because we can't guarantee maintaining the state of the form
24
- promptBeforeClosing(() => true);
25
-
26
- // urls for entering a new form and editing an existing form; note that we specify the returnUrl as post-message:close-workspace,
27
- // which tells HFE-UI to send a message to the parent window to close the workspace when the form is saved or cancelled
28
-
29
- const uiPage = encounterUuid ? htmlForm.formEditUiPage : htmlForm.formUiPage;
30
- const url = `${window.openmrsBase}/htmlformentryui/htmlform/${uiPage}.page?`;
31
- const searchParams = new URLSearchParams();
32
- searchParams.append('patientId', patientUuid);
33
- if (visitUuid || currentVisit?.uuid) {
34
- searchParams.append('visitId', visitUuid ?? currentVisit?.uuid);
35
- }
36
- if (encounterUuid) {
37
- searchParams.append('encounterId', encounterUuid);
38
- }
39
- if (htmlForm.formUiResource) {
40
- searchParams.append('definitionUiResource', htmlForm.formUiResource);
41
- } else {
42
- searchParams.append('formUuid', htmlForm.formUuid);
43
- }
44
- searchParams.append('returnUrl', 'post-message:close-workspace');
45
-
46
- const showFormAndLoadedData = formInfo && patientUuid;
47
- return (
48
- <div>
49
- {showFormAndLoadedData && (
50
- <HtmlFormEntryWrapper
51
- src={url + searchParams}
52
- closeWorkspaceWithSavedChanges={closeWorkspaceWithSavedChanges}
53
- />
54
- )}
55
- </div>
56
- );
57
- };
58
-
59
- export default HtmlFormEntry;