@kenyaemr/esm-bed-management-app 1.0.1-pre.4

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 (131) hide show
  1. package/.editorconfig +12 -0
  2. package/.eslintignore +2 -0
  3. package/.eslintrc +37 -0
  4. package/.husky/pre-commit +4 -0
  5. package/.idea/inspectionProfiles/Project_Default.xml +6 -0
  6. package/.idea/modules.xml +8 -0
  7. package/.idea/vcs.xml +6 -0
  8. package/.prettierignore +14 -0
  9. package/.turbo.json +18 -0
  10. package/.yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs +541 -0
  11. package/.yarn/plugins/@yarnpkg/plugin-version.cjs +550 -0
  12. package/.yarn/versions/6816f0d4.yml +0 -0
  13. package/LICENSE +373 -0
  14. package/README.md +40 -0
  15. package/dist/187.js +1 -0
  16. package/dist/187.js.map +1 -0
  17. package/dist/207.js +1 -0
  18. package/dist/207.js.map +1 -0
  19. package/dist/26.js +2 -0
  20. package/dist/26.js.LICENSE.txt +32 -0
  21. package/dist/26.js.map +1 -0
  22. package/dist/283.js +1 -0
  23. package/dist/283.js.map +1 -0
  24. package/dist/294.js +2 -0
  25. package/dist/294.js.LICENSE.txt +9 -0
  26. package/dist/294.js.map +1 -0
  27. package/dist/330.js +2 -0
  28. package/dist/330.js.LICENSE.txt +44 -0
  29. package/dist/330.js.map +1 -0
  30. package/dist/352.js +1 -0
  31. package/dist/352.js.map +1 -0
  32. package/dist/404.js +1 -0
  33. package/dist/404.js.map +1 -0
  34. package/dist/455.js +2 -0
  35. package/dist/455.js.LICENSE.txt +9 -0
  36. package/dist/455.js.map +1 -0
  37. package/dist/558.js +2 -0
  38. package/dist/558.js.LICENSE.txt +14 -0
  39. package/dist/558.js.map +1 -0
  40. package/dist/574.js +1 -0
  41. package/dist/629.js +1 -0
  42. package/dist/629.js.map +1 -0
  43. package/dist/707.js +1 -0
  44. package/dist/707.js.map +1 -0
  45. package/dist/800.js +2 -0
  46. package/dist/800.js.LICENSE.txt +3 -0
  47. package/dist/800.js.map +1 -0
  48. package/dist/884.js +1 -0
  49. package/dist/884.js.map +1 -0
  50. package/dist/933.js +1 -0
  51. package/dist/933.js.map +1 -0
  52. package/dist/959.js +1 -0
  53. package/dist/959.js.map +1 -0
  54. package/dist/esm-kenyaemr-bed-management-app.js +1 -0
  55. package/dist/esm-kenyaemr-bed-management-app.js.buildmanifest.json +532 -0
  56. package/dist/esm-kenyaemr-bed-management-app.js.map +1 -0
  57. package/dist/main.js +1 -0
  58. package/dist/main.js.map +1 -0
  59. package/dist/routes.json +1 -0
  60. package/i18next-parser.config.js +89 -0
  61. package/jest.config.js +0 -0
  62. package/package.json +112 -0
  63. package/src/__mocks__/react-i18next.js +55 -0
  64. package/src/admin-card-link.component.tsx +27 -0
  65. package/src/assets/landing-page.png +0 -0
  66. package/src/assets/logo.svg +1 -0
  67. package/src/bed-administration/bed-administration-form.component.tsx +326 -0
  68. package/src/bed-administration/bed-administration-form.scss +0 -0
  69. package/src/bed-administration/bed-administration-table.component.tsx +317 -0
  70. package/src/bed-administration/bed-administration-table.scss +112 -0
  71. package/src/bed-administration/bed-administration-types.ts +12 -0
  72. package/src/bed-administration/bed-administration.resource.ts +59 -0
  73. package/src/bed-administration/edit-bed-form.component.tsx +100 -0
  74. package/src/bed-administration/new-bed-form.component.tsx +112 -0
  75. package/src/bed-admission/active-patients/active-patients-table.component.tsx +299 -0
  76. package/src/bed-admission/active-patients/active-visits.resource.ts +171 -0
  77. package/src/bed-admission/active-patients/admission-action-button-styles.scss +0 -0
  78. package/src/bed-admission/active-patients/admission-action-button.component.tsx +26 -0
  79. package/src/bed-admission/active-patients/index.tsx +15 -0
  80. package/src/bed-admission/active-patients/patient-queues.resource.ts +136 -0
  81. package/src/bed-admission/active-patients/styles.scss +284 -0
  82. package/src/bed-admission/active-patients/view-action-menu.component.tsx +33 -0
  83. package/src/bed-admission/admitted-patients/active-admissions.resource.ts +121 -0
  84. package/src/bed-admission/admitted-patients/admitted-patients-table.component.tsx +280 -0
  85. package/src/bed-admission/admitted-patients/admitted-patients.component.tsx +22 -0
  86. package/src/bed-admission/admitted-patients/location-combo-box.component.tsx +55 -0
  87. package/src/bed-admission/admitted-patients/styles.scss +284 -0
  88. package/src/bed-admission/bed-admission-tabs-styles.scss +30 -0
  89. package/src/bed-admission/bed-admission-tabs.component.tsx +69 -0
  90. package/src/bed-admission/bed-admission.component.tsx +15 -0
  91. package/src/bed-admission/bed-admission.resource.ts +35 -0
  92. package/src/bed-admission/bed-layout/bed-layout-list.component.tsx +101 -0
  93. package/src/bed-admission/bed-layout/bed-layout.component.tsx +64 -0
  94. package/src/bed-admission/bed-layout/bed-layout.scss +118 -0
  95. package/src/bed-admission/bed-layout/min-bed-layout.component.tsx +26 -0
  96. package/src/bed-admission/createDashboardLink.tsx +47 -0
  97. package/src/bed-admission/discharged-patients/discharged-patients.componet.tsx +19 -0
  98. package/src/bed-admission/helpers/functions.ts +102 -0
  99. package/src/bed-admission/types.ts +133 -0
  100. package/src/config-schema.ts +21 -0
  101. package/src/declarations.d.ts +7 -0
  102. package/src/empty-state/empty-state.component.tsx +69 -0
  103. package/src/empty-state/empty-state.scss +62 -0
  104. package/src/header/header.component.tsx +51 -0
  105. package/src/header/header.scss +72 -0
  106. package/src/header/illustration.component.tsx +13 -0
  107. package/src/home.component.tsx +15 -0
  108. package/src/home.scss +5 -0
  109. package/src/index.ts +65 -0
  110. package/src/left-panel/left-panel.component.tsx +33 -0
  111. package/src/left-panel/left-panel.scss +41 -0
  112. package/src/left-panel-link.component.tsx +49 -0
  113. package/src/root.component.tsx +35 -0
  114. package/src/root.scss +11 -0
  115. package/src/routes.json +46 -0
  116. package/src/setup-tests.ts +1 -0
  117. package/src/summary/summary.component.tsx +74 -0
  118. package/src/summary/summary.resource.ts +123 -0
  119. package/src/summary/summary.scss +72 -0
  120. package/src/types.ts +152 -0
  121. package/src/ward-card/ward-card.component.tsx +41 -0
  122. package/src/ward-card/ward-card.scss +51 -0
  123. package/src/ward-with-beds/ward-with-beds.component.tsx +186 -0
  124. package/src/ward-with-beds/ward-with-beds.scss +27 -0
  125. package/src/workspace/allocate-bed-workspace.component.tsx +141 -0
  126. package/src/workspace/allocate-bed.scss +117 -0
  127. package/src/workspace/overlay.component.tsx +55 -0
  128. package/src/workspace/overlay.scss +96 -0
  129. package/translations/en.json +7 -0
  130. package/tsconfig.json +23 -0
  131. package/webpack.config.js +1 -0
@@ -0,0 +1,55 @@
1
+ import React from "react";
2
+ import { Button, Header } from "@carbon/react";
3
+ import { ArrowLeft, Close } from "@carbon/react/icons";
4
+ import { isDesktop, useLayoutType } from "@openmrs/esm-framework";
5
+ import styles from "./overlay.scss";
6
+ import { useTranslation } from "react-i18next";
7
+
8
+ interface OverlayProps {
9
+ closePanel: () => void;
10
+ header: string;
11
+ children?: React.ReactNode;
12
+ }
13
+
14
+ const Overlay: React.FC<OverlayProps> = ({ closePanel, children, header }) => {
15
+ const layout = useLayoutType();
16
+ const { t } = useTranslation();
17
+
18
+ return (
19
+ <div
20
+ className={
21
+ isDesktop(layout) ? styles.desktopOverlay : styles.tabletOverlay
22
+ }
23
+ >
24
+ {isDesktop(layout) ? (
25
+ <div className={styles.desktopHeader}>
26
+ <div className={styles.headerContent}>{header}</div>
27
+ <Button
28
+ className={styles.closePanelButton}
29
+ onClick={closePanel}
30
+ kind="ghost"
31
+ hasIconOnly
32
+ renderIcon={(props) => <Close size={16} {...props} />}
33
+ iconDescription={t("closeOverlay", "Close overlay")}
34
+ />
35
+ </div>
36
+ ) : (
37
+ <Header
38
+ aria-label="Tablet overlay"
39
+ className={styles.tabletOverlayHeader}
40
+ >
41
+ <Button
42
+ onClick={closePanel}
43
+ hasIconOnly
44
+ renderIcon={(props) => <ArrowLeft size={16} {...props} />}
45
+ iconDescription={t("closeOverlay", "Close overlay")}
46
+ />
47
+ <div className={styles.headerContent}>{header}</div>
48
+ </Header>
49
+ )}
50
+ {children}
51
+ </div>
52
+ );
53
+ };
54
+
55
+ export default Overlay;
@@ -0,0 +1,96 @@
1
+ @use '@carbon/styles/scss/spacing';
2
+ @use '@carbon/styles/scss/type';
3
+ @import '~@openmrs/esm-styleguide/src/vars';
4
+ @import '../root.scss';
5
+
6
+ .desktopOverlay {
7
+ position: fixed;
8
+ top: spacing.$spacing-09;
9
+ width: 37rem;
10
+ right: 0;
11
+ bottom: 0;
12
+ border-left: 1px solid $text-03;
13
+ background-color: $ui-01;
14
+ overflow-y: auto;
15
+ height: calc(100vh - 3rem);
16
+ z-index: 99999;
17
+ display: grid;
18
+ grid-template-rows: 1fr auto;
19
+ }
20
+
21
+ .desktopOverlay::after {
22
+ height: 100%;
23
+ border-left: 1px solid $text-03;
24
+ }
25
+
26
+ .tabletOverlay {
27
+ position: fixed;
28
+ top: 0;
29
+ bottom: 0;
30
+ left: 0;
31
+ right: 0;
32
+ z-index: 9999;
33
+ background-color: $ui-01;
34
+ overflow: hidden;
35
+ padding-top: spacing.$spacing-09;
36
+ display: grid;
37
+ grid-template-rows: 1fr auto;
38
+ overflow-y: auto;
39
+ height: 100vh;
40
+ }
41
+
42
+ .tabletOverlayHeader {
43
+ button {
44
+ @include brand-01(background-color);
45
+ }
46
+
47
+ .headerContent {
48
+ color: $ui-02;
49
+ }
50
+ }
51
+
52
+ .desktopHeader {
53
+ display: flex;
54
+ justify-content: space-between;
55
+ align-items: center;
56
+ background-color: $ui-03;
57
+ border-bottom: 1px solid $text-03;
58
+ position: absolute;
59
+ position: -webkit-sticky;
60
+ width: 100%;
61
+ z-index: 1000;
62
+ top: 0;
63
+ }
64
+
65
+ .headerContent {
66
+ @include type.type-style('heading-compact-02');
67
+ padding: 0 spacing.$spacing-05;
68
+ color: $ui-05;
69
+ }
70
+
71
+ .closePanelButton {
72
+ background-color: $ui-background;
73
+ color: $ui-05;
74
+ fill: $ui-05;
75
+ }
76
+
77
+ /* Desktop */
78
+ :global(.omrs-breakpoint-gt-tablet) {
79
+ .overlayContent {
80
+ padding: 0 0 0 0;
81
+ overflow-y: auto;
82
+ }
83
+ }
84
+
85
+ /* Tablet */
86
+ :global(.omrs-breakpoint-lt-desktop) {
87
+ .overlayContent {
88
+ padding: 0 0 0 0;
89
+ overflow-y: auto;
90
+ }
91
+ }
92
+
93
+ .wardLabel {
94
+ @include type.type-style('label-01');
95
+ // color: colors.$gray-70;
96
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "bedManagement": "Bed Management",
3
+ "headTitle": "",
4
+ "home": "Home",
5
+ "manageBed": "Manage Beds",
6
+ "wardType": ""
7
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,23 @@
1
+ {
2
+ "compilerOptions": {
3
+ "esModuleInterop": true,
4
+ "module": "esnext",
5
+ "allowSyntheticDefaultImports": true,
6
+ "jsx": "react",
7
+ "skipLibCheck": true,
8
+ "moduleResolution": "node",
9
+ "lib": [
10
+ "dom",
11
+ "es5",
12
+ "scripthost",
13
+ "es2015",
14
+ "es2015.promise",
15
+ "es2016.array.include",
16
+ "es2018",
17
+ "es2020"
18
+ ],
19
+ "resolveJsonModule": true,
20
+ "noEmit": true,
21
+ "target": "esnext"
22
+ }
23
+ }
@@ -0,0 +1 @@
1
+ module.exports = require("openmrs/default-webpack-config");