@openmrs/esm-patient-programs-app 3.2.1-pre.89 → 4.0.1-pre.221

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 (77) hide show
  1. package/.turbo/turbo-build.log +25 -273
  2. package/dist/109.js +1 -0
  3. package/dist/13.js +1 -0
  4. package/dist/145.js +1 -0
  5. package/dist/154.js +2 -0
  6. package/dist/154.js.LICENSE.txt +53 -0
  7. package/dist/206.js +1 -2
  8. package/dist/238.js +2 -0
  9. package/dist/{707.js.LICENSE.txt → 238.js.LICENSE.txt} +0 -0
  10. package/dist/340.js +1 -0
  11. package/dist/435.js +1 -0
  12. package/dist/461.js +1 -0
  13. package/dist/574.js +1 -1
  14. package/dist/709.js +1 -0
  15. package/dist/784.js +1 -2
  16. package/dist/784.js.LICENSE.txt +2 -7
  17. package/dist/858.js +1 -2
  18. package/dist/858.js.LICENSE.txt +2 -0
  19. package/dist/879.js +1 -2
  20. package/dist/main.js +1 -0
  21. package/dist/openmrs-esm-patient-programs-app.js +1 -1
  22. package/dist/openmrs-esm-patient-programs-app.js.buildmanifest.json +150 -259
  23. package/dist/openmrs-esm-patient-programs-app.old +1 -2
  24. package/package.json +7 -11
  25. package/src/config-schema.ts +12 -0
  26. package/src/dashboard.meta.tsx +1 -1
  27. package/src/index.ts +3 -2
  28. package/src/programs/program-action-button/program-action-button.component.tsx +47 -0
  29. package/src/programs/programs-detailed-summary.component.tsx +68 -37
  30. package/src/programs/programs-detailed-summary.scss +1 -4
  31. package/src/programs/programs-detailed-summary.test.tsx +26 -7
  32. package/src/programs/programs-form.component.tsx +102 -46
  33. package/src/programs/programs-form.scss +1 -9
  34. package/src/programs/programs-form.test.tsx +113 -110
  35. package/src/programs/programs-overview.component.tsx +59 -45
  36. package/src/programs/programs-overview.scss +1 -3
  37. package/src/programs/programs-overview.test.tsx +6 -7
  38. package/src/programs/programs.resource.tsx +63 -8
  39. package/src/types/index.ts +16 -2
  40. package/translations/en.json +8 -2
  41. package/dist/163.js +0 -3
  42. package/dist/163.js.LICENSE.txt +0 -20
  43. package/dist/163.js.map +0 -1
  44. package/dist/186.js +0 -3
  45. package/dist/186.js.LICENSE.txt +0 -23
  46. package/dist/186.js.map +0 -1
  47. package/dist/206.js.map +0 -1
  48. package/dist/252.js +0 -3
  49. package/dist/252.js.LICENSE.txt +0 -23
  50. package/dist/252.js.map +0 -1
  51. package/dist/344.js +0 -2
  52. package/dist/344.js.map +0 -1
  53. package/dist/357.js +0 -2
  54. package/dist/357.js.map +0 -1
  55. package/dist/373.js +0 -2
  56. package/dist/373.js.map +0 -1
  57. package/dist/402.js +0 -2
  58. package/dist/402.js.map +0 -1
  59. package/dist/511.js +0 -2
  60. package/dist/511.js.map +0 -1
  61. package/dist/593.js +0 -2
  62. package/dist/593.js.map +0 -1
  63. package/dist/635.js +0 -3
  64. package/dist/635.js.LICENSE.txt +0 -16
  65. package/dist/635.js.map +0 -1
  66. package/dist/701.js +0 -2
  67. package/dist/701.js.map +0 -1
  68. package/dist/707.js +0 -3
  69. package/dist/707.js.map +0 -1
  70. package/dist/76.js +0 -2
  71. package/dist/76.js.map +0 -1
  72. package/dist/784.js.map +0 -1
  73. package/dist/858.js.map +0 -1
  74. package/dist/879.js.map +0 -1
  75. package/dist/932.js +0 -2
  76. package/dist/932.js.map +0 -1
  77. package/dist/openmrs-esm-patient-programs-app.js.map +0 -1
@@ -1,282 +1,34 @@
1
- @openmrs/esm-patient-programs-app:build: cache hit, replaying output 1b02d36a53b663bc
1
+ @openmrs/esm-patient-programs-app:build: cache hit, replaying output 8789f3e4ff961a63
2
2
  @openmrs/esm-patient-programs-app:build: $ webpack --mode production
3
- @openmrs/esm-patient-programs-app:build: assets by chunk 1.28 MiB (id hint: vendors)
4
- @openmrs/esm-patient-programs-app:build:  asset 858.js 477 KiB [emitted] [minimized] [big] (id hint: vendors) 2 related assets
5
- @openmrs/esm-patient-programs-app:build:  asset 252.js 243 KiB [emitted] [minimized] (id hint: vendors) 2 related assets
6
- @openmrs/esm-patient-programs-app:build:  asset 635.js 228 KiB [emitted] [minimized] (id hint: vendors) 2 related assets
7
- @openmrs/esm-patient-programs-app:build:  asset 186.js 124 KiB [emitted] [minimized] (id hint: vendors) 2 related assets
8
- @openmrs/esm-patient-programs-app:build:  asset 402.js 85.5 KiB [emitted] [minimized] (id hint: vendors) 1 related asset
9
- @openmrs/esm-patient-programs-app:build:  asset 163.js 57.1 KiB [emitted] [minimized] (id hint: vendors) 2 related assets
10
- @openmrs/esm-patient-programs-app:build:  asset 707.js 45.8 KiB [emitted] [minimized] (id hint: vendors) 2 related assets
11
- @openmrs/esm-patient-programs-app:build:  asset 206.js 45.4 KiB [emitted] [minimized] (id hint: vendors) 2 related assets
12
- @openmrs/esm-patient-programs-app:build:  asset 701.js 4.95 KiB [emitted] [minimized] (id hint: vendors) 1 related asset
13
- @openmrs/esm-patient-programs-app:build: + 13 assets
14
- @openmrs/esm-patient-programs-app:build: orphan modules 9.18 MiB (javascript) 42 bytes (consume-shared) [orphan] 832 modules
15
- @openmrs/esm-patient-programs-app:build: runtime modules 19.5 KiB 14 modules
16
- @openmrs/esm-patient-programs-app:build: built modules 5.5 MiB (javascript) 336 bytes (share-init) 336 bytes (consume-shared) [built]
17
- @openmrs/esm-patient-programs-app:build:  modules by path ../../node_modules/ 4.77 MiB 148 modules
18
- @openmrs/esm-patient-programs-app:build:  modules by path ./ 249 KiB 11 modules
19
- @openmrs/esm-patient-programs-app:build:  provide-module modules 336 bytes
20
- @openmrs/esm-patient-programs-app:build:  modules by path provide shared module (default) @openmrs/ 84 bytes 2 modules
21
- @openmrs/esm-patient-programs-app:build:  + 6 modules
22
- @openmrs/esm-patient-programs-app:build:  consume-shared-module modules 336 bytes
3
+ @openmrs/esm-patient-programs-app:build: assets by chunk 1.83 MiB (id hint: vendors)
4
+ @openmrs/esm-patient-programs-app:build:  assets by status 1.75 MiB [big]
5
+ @openmrs/esm-patient-programs-app:build:  asset 858.js 1.33 MiB [emitted] [minimized] [big] (id hint: vendors) 1 related asset
6
+ @openmrs/esm-patient-programs-app:build:  asset 154.js 435 KiB [emitted] [minimized] [big] (id hint: vendors) 1 related asset
7
+ @openmrs/esm-patient-programs-app:build:  asset 206.js 45.4 KiB [emitted] [minimized] (id hint: vendors) 1 related asset
8
+ @openmrs/esm-patient-programs-app:build:  asset 709.js 18.9 KiB [emitted] [minimized] (id hint: vendors)
9
+ @openmrs/esm-patient-programs-app:build:  asset 238.js 8.46 KiB [emitted] [minimized] (id hint: vendors) 1 related asset
10
+ @openmrs/esm-patient-programs-app:build:  asset 461.js 3.83 KiB [emitted] [minimized] (id hint: vendors)
11
+ @openmrs/esm-patient-programs-app:build: + 12 assets
12
+ @openmrs/esm-patient-programs-app:build: orphan modules 3.89 MiB [orphan] 736 modules
13
+ @openmrs/esm-patient-programs-app:build: runtime modules 40.1 KiB 28 modules
14
+ @openmrs/esm-patient-programs-app:build: built modules 4.01 MiB (javascript) 294 bytes (consume-shared) 252 bytes (share-init) [built]
15
+ @openmrs/esm-patient-programs-app:build:  modules by path ../../node_modules/ 3.89 MiB 87 modules
16
+ @openmrs/esm-patient-programs-app:build:  modules by path ./ 49.6 KiB 11 modules
17
+ @openmrs/esm-patient-programs-app:build:  consume-shared-module modules 294 bytes
23
18
  @openmrs/esm-patient-programs-app:build:  modules by path consume shared module (default) @openmrs/ 126 bytes 3 modules
24
- @openmrs/esm-patient-programs-app:build:  + 5 modules
25
- @openmrs/esm-patient-programs-app:build:  modules by path ../esm-patient-common-lib/src/ 501 KiB
26
- @openmrs/esm-patient-programs-app:build:  ../esm-patient-common-lib/src/index.ts + 30 modules 56.3 KiB [built] [code generated]
27
19
  @openmrs/esm-patient-programs-app:build:  + 4 modules
20
+ @openmrs/esm-patient-programs-app:build:  provide-module modules 252 bytes
21
+ @openmrs/esm-patient-programs-app:build:  modules by path provide shared module (default) @openmrs/ 84 bytes 2 modules
22
+ @openmrs/esm-patient-programs-app:build:  + 4 modules
23
+ @openmrs/esm-patient-programs-app:build:  modules by path ../esm-patient-common-lib/src/ 70.5 KiB
24
+ @openmrs/esm-patient-programs-app:build:  ../esm-patient-common-lib/src/index.ts + 31 modules 59.7 KiB [built] [code generated]
25
+ @openmrs/esm-patient-programs-app:build:  + 5 modules
28
26
  @openmrs/esm-patient-programs-app:build:  container entry 42 bytes [built] [code generated]
29
27
  @openmrs/esm-patient-programs-app:build: 
30
- @openmrs/esm-patient-programs-app:build: LOG from ../../node_modules/sass-loader/dist/cjs.js sass-loader ../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../node_modules/sass-loader/dist/cjs.js!./src/programs/programs-overview.scss
31
- @openmrs/esm-patient-programs-app:build: <w> Deprecation Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.
32
- @openmrs/esm-patient-programs-app:build: <w> 
33
- @openmrs/esm-patient-programs-app:build: <w> Recommendation: math.div($px, $carbon--base-font-size) or calc($px / $carbon--base-font-size)
34
- @openmrs/esm-patient-programs-app:build: <w> 
35
- @openmrs/esm-patient-programs-app:build: <w> More info and automated migrator: https://sass-lang.com/d/slash-div
36
- @openmrs/esm-patient-programs-app:build: <w> 
37
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/vendor/@carbon/elements/scss/layout/_convert.scss 25:12 carbon--rem()
38
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/vendor/@carbon/elements/scss/layout/_breakpoint.scss 16:23 @import
39
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/vendor/@carbon/elements/scss/type/_styles.scss 8:9 @import
40
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/vendor/@carbon/elements/scss/type/_reset.scss 10:9 @import
41
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/_css--reset.scss 9:9 @import
42
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/_helper-mixins.scss 23:9 @import
43
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/_mixins.scss 8:9 @import
44
- @openmrs/esm-patient-programs-app:build: <w> src/programs/programs-overview.scss 3:9 root stylesheet
45
- @openmrs/esm-patient-programs-app:build: <w> 
46
- @openmrs/esm-patient-programs-app:build: <w> Deprecation Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.
47
- @openmrs/esm-patient-programs-app:build: <w> 
48
- @openmrs/esm-patient-programs-app:build: <w> Recommendation: math.div($step - 2, 4) or calc(($step - 2) / 4)
49
- @openmrs/esm-patient-programs-app:build: <w> 
50
- @openmrs/esm-patient-programs-app:build: <w> More info and automated migrator: https://sass-lang.com/d/slash-div
51
- @openmrs/esm-patient-programs-app:build: <w> 
52
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/vendor/@carbon/elements/scss/type/_scale.scss 20:53 carbon--get-type-size()
53
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/vendor/@carbon/elements/scss/type/_scale.scss 31:17 @import
54
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/vendor/@carbon/elements/scss/type/_styles.scss 10:9 @import
55
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/vendor/@carbon/elements/scss/type/_reset.scss 10:9 @import
56
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/_css--reset.scss 9:9 @import
57
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/_helper-mixins.scss 23:9 @import
58
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/_mixins.scss 8:9 @import
59
- @openmrs/esm-patient-programs-app:build: <w> src/programs/programs-overview.scss 3:9 root stylesheet
60
- @openmrs/esm-patient-programs-app:build: <w> 
61
- @openmrs/esm-patient-programs-app:build: 
62
- @openmrs/esm-patient-programs-app:build: LOG from ../../node_modules/sass-loader/dist/cjs.js sass-loader ../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../node_modules/sass-loader/dist/cjs.js!./src/programs/programs-detailed-summary.scss
63
- @openmrs/esm-patient-programs-app:build: <w> Deprecation Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.
64
- @openmrs/esm-patient-programs-app:build: <w> 
65
- @openmrs/esm-patient-programs-app:build: <w> Recommendation: math.div($px, $carbon--base-font-size) or calc($px / $carbon--base-font-size)
66
- @openmrs/esm-patient-programs-app:build: <w> 
67
- @openmrs/esm-patient-programs-app:build: <w> More info and automated migrator: https://sass-lang.com/d/slash-div
68
- @openmrs/esm-patient-programs-app:build: <w> 
69
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/vendor/@carbon/elements/scss/layout/_convert.scss 25:12 carbon--rem()
70
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/vendor/@carbon/elements/scss/layout/_breakpoint.scss 16:23 @import
71
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/vendor/@carbon/elements/scss/type/_styles.scss 8:9 @import
72
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/vendor/@carbon/elements/scss/type/_reset.scss 10:9 @import
73
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/_css--reset.scss 9:9 @import
74
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/_helper-mixins.scss 23:9 @import
75
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/_mixins.scss 8:9 @import
76
- @openmrs/esm-patient-programs-app:build: <w> src/programs/programs-detailed-summary.scss 4:9 root stylesheet
77
- @openmrs/esm-patient-programs-app:build: <w> 
78
- @openmrs/esm-patient-programs-app:build: <w> Deprecation Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.
79
- @openmrs/esm-patient-programs-app:build: <w> 
80
- @openmrs/esm-patient-programs-app:build: <w> Recommendation: math.div($step - 2, 4) or calc(($step - 2) / 4)
81
- @openmrs/esm-patient-programs-app:build: <w> 
82
- @openmrs/esm-patient-programs-app:build: <w> More info and automated migrator: https://sass-lang.com/d/slash-div
83
- @openmrs/esm-patient-programs-app:build: <w> 
84
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/vendor/@carbon/elements/scss/type/_scale.scss 20:53 carbon--get-type-size()
85
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/vendor/@carbon/elements/scss/type/_scale.scss 31:17 @import
86
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/vendor/@carbon/elements/scss/type/_styles.scss 10:9 @import
87
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/vendor/@carbon/elements/scss/type/_reset.scss 10:9 @import
88
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/_css--reset.scss 9:9 @import
89
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/_helper-mixins.scss 23:9 @import
90
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/_mixins.scss 8:9 @import
91
- @openmrs/esm-patient-programs-app:build: <w> src/programs/programs-detailed-summary.scss 4:9 root stylesheet
92
- @openmrs/esm-patient-programs-app:build: <w> 
93
- @openmrs/esm-patient-programs-app:build: 
94
- @openmrs/esm-patient-programs-app:build: LOG from ../../node_modules/sass-loader/dist/cjs.js sass-loader ../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../node_modules/sass-loader/dist/cjs.js!./src/programs/programs-form.scss
95
- @openmrs/esm-patient-programs-app:build: <w> Deprecation Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.
96
- @openmrs/esm-patient-programs-app:build: <w> 
97
- @openmrs/esm-patient-programs-app:build: <w> Recommendation: math.div($px, $carbon--base-font-size) or calc($px / $carbon--base-font-size)
98
- @openmrs/esm-patient-programs-app:build: <w> 
99
- @openmrs/esm-patient-programs-app:build: <w> More info and automated migrator: https://sass-lang.com/d/slash-div
100
- @openmrs/esm-patient-programs-app:build: <w> 
101
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/vendor/@carbon/elements/scss/layout/_convert.scss 25:12 carbon--rem()
102
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/vendor/@carbon/elements/scss/layout/_breakpoint.scss 16:23 @import
103
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/vendor/@carbon/elements/scss/type/_styles.scss 8:9 @import
104
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/vendor/@carbon/elements/scss/type/_reset.scss 10:9 @import
105
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/_css--reset.scss 9:9 @import
106
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/_helper-mixins.scss 23:9 @import
107
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/_mixins.scss 8:9 @import
108
- @openmrs/esm-patient-programs-app:build: <w> src/programs/programs-form.scss 3:9 root stylesheet
109
- @openmrs/esm-patient-programs-app:build: <w> 
110
- @openmrs/esm-patient-programs-app:build: <w> Deprecation Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.
111
- @openmrs/esm-patient-programs-app:build: <w> 
112
- @openmrs/esm-patient-programs-app:build: <w> Recommendation: math.div($step - 2, 4) or calc(($step - 2) / 4)
113
- @openmrs/esm-patient-programs-app:build: <w> 
114
- @openmrs/esm-patient-programs-app:build: <w> More info and automated migrator: https://sass-lang.com/d/slash-div
115
- @openmrs/esm-patient-programs-app:build: <w> 
116
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/vendor/@carbon/elements/scss/type/_scale.scss 20:53 carbon--get-type-size()
117
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/vendor/@carbon/elements/scss/type/_scale.scss 31:17 @import
118
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/vendor/@carbon/elements/scss/type/_styles.scss 10:9 @import
119
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/vendor/@carbon/elements/scss/type/_reset.scss 10:9 @import
120
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/_css--reset.scss 9:9 @import
121
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/_helper-mixins.scss 23:9 @import
122
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/_mixins.scss 8:9 @import
123
- @openmrs/esm-patient-programs-app:build: <w> src/programs/programs-form.scss 3:9 root stylesheet
124
- @openmrs/esm-patient-programs-app:build: <w> 
125
- @openmrs/esm-patient-programs-app:build: 
126
- @openmrs/esm-patient-programs-app:build: LOG from ../../node_modules/sass-loader/dist/cjs.js sass-loader ../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../node_modules/sass-loader/dist/cjs.js!../esm-patient-common-lib/src/error-state/error-state.scss
127
- @openmrs/esm-patient-programs-app:build: <w> Deprecation Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.
128
- @openmrs/esm-patient-programs-app:build: <w> 
129
- @openmrs/esm-patient-programs-app:build: <w> Recommendation: math.div($px, $carbon--base-font-size) or calc($px / $carbon--base-font-size)
130
- @openmrs/esm-patient-programs-app:build: <w> 
131
- @openmrs/esm-patient-programs-app:build: <w> More info and automated migrator: https://sass-lang.com/d/slash-div
132
- @openmrs/esm-patient-programs-app:build: <w> 
133
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/vendor/@carbon/elements/scss/layout/_convert.scss 25:12 carbon--rem()
134
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/vendor/@carbon/elements/scss/layout/_breakpoint.scss 16:23 @import
135
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/vendor/@carbon/elements/scss/type/_styles.scss 8:9 @import
136
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/vendor/@carbon/elements/scss/type/_reset.scss 10:9 @import
137
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/_css--reset.scss 9:9 @import
138
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/_helper-mixins.scss 23:9 @import
139
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/_mixins.scss 8:9 @import
140
- @openmrs/esm-patient-programs-app:build: <w> ../esm-patient-common-lib/src/error-state/error-state.scss 3:9 root stylesheet
141
- @openmrs/esm-patient-programs-app:build: <w> 
142
- @openmrs/esm-patient-programs-app:build: <w> Deprecation Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.
143
- @openmrs/esm-patient-programs-app:build: <w> 
144
- @openmrs/esm-patient-programs-app:build: <w> Recommendation: math.div($step - 2, 4) or calc(($step - 2) / 4)
145
- @openmrs/esm-patient-programs-app:build: <w> 
146
- @openmrs/esm-patient-programs-app:build: <w> More info and automated migrator: https://sass-lang.com/d/slash-div
147
- @openmrs/esm-patient-programs-app:build: <w> 
148
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/vendor/@carbon/elements/scss/type/_scale.scss 20:53 carbon--get-type-size()
149
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/vendor/@carbon/elements/scss/type/_scale.scss 31:17 @import
150
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/vendor/@carbon/elements/scss/type/_styles.scss 10:9 @import
151
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/vendor/@carbon/elements/scss/type/_reset.scss 10:9 @import
152
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/_css--reset.scss 9:9 @import
153
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/_helper-mixins.scss 23:9 @import
154
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/_mixins.scss 8:9 @import
155
- @openmrs/esm-patient-programs-app:build: <w> ../esm-patient-common-lib/src/error-state/error-state.scss 3:9 root stylesheet
156
- @openmrs/esm-patient-programs-app:build: <w> 
157
- @openmrs/esm-patient-programs-app:build: 
158
- @openmrs/esm-patient-programs-app:build: LOG from ../../node_modules/sass-loader/dist/cjs.js sass-loader ../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../node_modules/sass-loader/dist/cjs.js!../esm-patient-common-lib/src/empty-state/empty-state.scss
159
- @openmrs/esm-patient-programs-app:build: <w> Deprecation Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.
160
- @openmrs/esm-patient-programs-app:build: <w> 
161
- @openmrs/esm-patient-programs-app:build: <w> Recommendation: math.div($px, $carbon--base-font-size) or calc($px / $carbon--base-font-size)
162
- @openmrs/esm-patient-programs-app:build: <w> 
163
- @openmrs/esm-patient-programs-app:build: <w> More info and automated migrator: https://sass-lang.com/d/slash-div
164
- @openmrs/esm-patient-programs-app:build: <w> 
165
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/vendor/@carbon/elements/scss/layout/_convert.scss 25:12 carbon--rem()
166
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/vendor/@carbon/elements/scss/layout/_breakpoint.scss 16:23 @import
167
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/vendor/@carbon/elements/scss/type/_styles.scss 8:9 @import
168
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/vendor/@carbon/elements/scss/type/_reset.scss 10:9 @import
169
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/_css--reset.scss 9:9 @import
170
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/_helper-mixins.scss 23:9 @import
171
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/_mixins.scss 8:9 @import
172
- @openmrs/esm-patient-programs-app:build: <w> ../esm-patient-common-lib/src/empty-state/empty-state.scss 3:9 root stylesheet
173
- @openmrs/esm-patient-programs-app:build: <w> 
174
- @openmrs/esm-patient-programs-app:build: <w> Deprecation Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.
175
- @openmrs/esm-patient-programs-app:build: <w> 
176
- @openmrs/esm-patient-programs-app:build: <w> Recommendation: math.div($step - 2, 4) or calc(($step - 2) / 4)
177
- @openmrs/esm-patient-programs-app:build: <w> 
178
- @openmrs/esm-patient-programs-app:build: <w> More info and automated migrator: https://sass-lang.com/d/slash-div
179
- @openmrs/esm-patient-programs-app:build: <w> 
180
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/vendor/@carbon/elements/scss/type/_scale.scss 20:53 carbon--get-type-size()
181
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/vendor/@carbon/elements/scss/type/_scale.scss 31:17 @import
182
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/vendor/@carbon/elements/scss/type/_styles.scss 10:9 @import
183
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/vendor/@carbon/elements/scss/type/_reset.scss 10:9 @import
184
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/_css--reset.scss 9:9 @import
185
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/_helper-mixins.scss 23:9 @import
186
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/_mixins.scss 8:9 @import
187
- @openmrs/esm-patient-programs-app:build: <w> ../esm-patient-common-lib/src/empty-state/empty-state.scss 3:9 root stylesheet
188
- @openmrs/esm-patient-programs-app:build: <w> 
189
- @openmrs/esm-patient-programs-app:build: 
190
- @openmrs/esm-patient-programs-app:build: LOG from ../../node_modules/sass-loader/dist/cjs.js sass-loader ../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../node_modules/sass-loader/dist/cjs.js!../esm-patient-common-lib/src/cards/card-header.scss
191
- @openmrs/esm-patient-programs-app:build: <w> Deprecation Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.
192
- @openmrs/esm-patient-programs-app:build: <w> 
193
- @openmrs/esm-patient-programs-app:build: <w> Recommendation: math.div($px, $carbon--base-font-size) or calc($px / $carbon--base-font-size)
194
- @openmrs/esm-patient-programs-app:build: <w> 
195
- @openmrs/esm-patient-programs-app:build: <w> More info and automated migrator: https://sass-lang.com/d/slash-div
196
- @openmrs/esm-patient-programs-app:build: <w> 
197
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/vendor/@carbon/elements/scss/layout/_convert.scss 25:12 carbon--rem()
198
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/vendor/@carbon/elements/scss/layout/_breakpoint.scss 16:23 @import
199
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/vendor/@carbon/elements/scss/type/_styles.scss 8:9 @import
200
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/vendor/@carbon/elements/scss/type/_reset.scss 10:9 @import
201
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/_css--reset.scss 9:9 @import
202
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/_helper-mixins.scss 23:9 @import
203
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/_mixins.scss 8:9 @import
204
- @openmrs/esm-patient-programs-app:build: <w> ../esm-patient-common-lib/src/cards/card-header.scss 3:9 root stylesheet
205
- @openmrs/esm-patient-programs-app:build: <w> 
206
- @openmrs/esm-patient-programs-app:build: <w> Deprecation Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.
207
- @openmrs/esm-patient-programs-app:build: <w> 
208
- @openmrs/esm-patient-programs-app:build: <w> Recommendation: math.div($step - 2, 4) or calc(($step - 2) / 4)
209
- @openmrs/esm-patient-programs-app:build: <w> 
210
- @openmrs/esm-patient-programs-app:build: <w> More info and automated migrator: https://sass-lang.com/d/slash-div
211
- @openmrs/esm-patient-programs-app:build: <w> 
212
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/vendor/@carbon/elements/scss/type/_scale.scss 20:53 carbon--get-type-size()
213
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/vendor/@carbon/elements/scss/type/_scale.scss 31:17 @import
214
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/vendor/@carbon/elements/scss/type/_styles.scss 10:9 @import
215
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/vendor/@carbon/elements/scss/type/_reset.scss 10:9 @import
216
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/_css--reset.scss 9:9 @import
217
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/_helper-mixins.scss 23:9 @import
218
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/_mixins.scss 8:9 @import
219
- @openmrs/esm-patient-programs-app:build: <w> ../esm-patient-common-lib/src/cards/card-header.scss 3:9 root stylesheet
220
- @openmrs/esm-patient-programs-app:build: <w> 
221
- @openmrs/esm-patient-programs-app:build: 
222
- @openmrs/esm-patient-programs-app:build: LOG from ../../node_modules/sass-loader/dist/cjs.js sass-loader ../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../node_modules/sass-loader/dist/cjs.js!../esm-patient-common-lib/src/pagination/pagination.component.scss
223
- @openmrs/esm-patient-programs-app:build: <w> Deprecation Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.
224
- @openmrs/esm-patient-programs-app:build: <w> 
225
- @openmrs/esm-patient-programs-app:build: <w> Recommendation: math.div($px, $carbon--base-font-size) or calc($px / $carbon--base-font-size)
226
- @openmrs/esm-patient-programs-app:build: <w> 
227
- @openmrs/esm-patient-programs-app:build: <w> More info and automated migrator: https://sass-lang.com/d/slash-div
228
- @openmrs/esm-patient-programs-app:build: <w> 
229
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/scss/globals/scss/vendor/@carbon/elements/scss/layout/_convert.scss 25:12 carbon--rem()
230
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/scss/globals/scss/vendor/@carbon/elements/scss/layout/_breakpoint.scss 16:23 @import
231
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/scss/globals/scss/vendor/@carbon/elements/scss/type/_styles.scss 8:9 @import
232
- @openmrs/esm-patient-programs-app:build: <w> ../esm-patient-common-lib/src/pagination/pagination.component.scss 1:9 root stylesheet
233
- @openmrs/esm-patient-programs-app:build: <w> 
234
- @openmrs/esm-patient-programs-app:build: <w> Deprecation Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.
235
- @openmrs/esm-patient-programs-app:build: <w> 
236
- @openmrs/esm-patient-programs-app:build: <w> Recommendation: math.div($step - 2, 4) or calc(($step - 2) / 4)
237
- @openmrs/esm-patient-programs-app:build: <w> 
238
- @openmrs/esm-patient-programs-app:build: <w> More info and automated migrator: https://sass-lang.com/d/slash-div
239
- @openmrs/esm-patient-programs-app:build: <w> 
240
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/scss/globals/scss/vendor/@carbon/elements/scss/type/_scale.scss 20:53 carbon--get-type-size()
241
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/scss/globals/scss/vendor/@carbon/elements/scss/type/_scale.scss 31:17 @import
242
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/scss/globals/scss/vendor/@carbon/elements/scss/type/_styles.scss 10:9 @import
243
- @openmrs/esm-patient-programs-app:build: <w> ../esm-patient-common-lib/src/pagination/pagination.component.scss 1:9 root stylesheet
244
- @openmrs/esm-patient-programs-app:build: <w> 
245
- @openmrs/esm-patient-programs-app:build: <w> Deprecation Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.
246
- @openmrs/esm-patient-programs-app:build: <w> 
247
- @openmrs/esm-patient-programs-app:build: <w> Recommendation: math.div($px, $carbon--base-font-size) or calc($px / $carbon--base-font-size)
248
- @openmrs/esm-patient-programs-app:build: <w> 
249
- @openmrs/esm-patient-programs-app:build: <w> More info and automated migrator: https://sass-lang.com/d/slash-div
250
- @openmrs/esm-patient-programs-app:build: <w> 
251
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/vendor/@carbon/elements/scss/layout/_convert.scss 25:12 carbon--rem()
252
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/vendor/@carbon/elements/scss/layout/_breakpoint.scss 16:23 @import
253
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/vendor/@carbon/elements/scss/type/_styles.scss 8:9 @import
254
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/vendor/@carbon/elements/scss/type/_reset.scss 10:9 @import
255
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/_css--reset.scss 9:9 @import
256
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/_helper-mixins.scss 23:9 @import
257
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/_mixins.scss 8:9 @import
258
- @openmrs/esm-patient-programs-app:build: <w> ../esm-patient-common-lib/src/pagination/pagination.component.scss 4:9 root stylesheet
259
- @openmrs/esm-patient-programs-app:build: <w> 
260
- @openmrs/esm-patient-programs-app:build: <w> Deprecation Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.
261
- @openmrs/esm-patient-programs-app:build: <w> 
262
- @openmrs/esm-patient-programs-app:build: <w> Recommendation: math.div($step - 2, 4) or calc(($step - 2) / 4)
263
- @openmrs/esm-patient-programs-app:build: <w> 
264
- @openmrs/esm-patient-programs-app:build: <w> More info and automated migrator: https://sass-lang.com/d/slash-div
265
- @openmrs/esm-patient-programs-app:build: <w> 
266
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/vendor/@carbon/elements/scss/type/_scale.scss 20:53 carbon--get-type-size()
267
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/vendor/@carbon/elements/scss/type/_scale.scss 31:17 @import
268
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/vendor/@carbon/elements/scss/type/_styles.scss 10:9 @import
269
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/vendor/@carbon/elements/scss/type/_reset.scss 10:9 @import
270
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/_css--reset.scss 9:9 @import
271
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/_helper-mixins.scss 23:9 @import
272
- @openmrs/esm-patient-programs-app:build: <w> ../../node_modules/carbon-components/src/globals/scss/_mixins.scss 8:9 @import
273
- @openmrs/esm-patient-programs-app:build: <w> ../esm-patient-common-lib/src/pagination/pagination.component.scss 4:9 root stylesheet
274
- @openmrs/esm-patient-programs-app:build: <w> 
275
- @openmrs/esm-patient-programs-app:build: 
276
28
  @openmrs/esm-patient-programs-app:build: WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
277
29
  @openmrs/esm-patient-programs-app:build: This can impact web performance.
278
30
  @openmrs/esm-patient-programs-app:build: Assets:
279
- @openmrs/esm-patient-programs-app:build:  357.js (466 KiB)
280
- @openmrs/esm-patient-programs-app:build:  858.js (477 KiB)
31
+ @openmrs/esm-patient-programs-app:build:  858.js (1.33 MiB)
32
+ @openmrs/esm-patient-programs-app:build:  154.js (435 KiB)
281
33
  @openmrs/esm-patient-programs-app:build: 
282
- @openmrs/esm-patient-programs-app:build: webpack 5.72.0 compiled with 1 warning in 170452 ms
34
+ @openmrs/esm-patient-programs-app:build: webpack 5.73.0 compiled with 1 warning in 137211 ms
package/dist/109.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_openmrs_esm_patient_programs_app=self.webpackChunk_openmrs_esm_patient_programs_app||[]).push([[109],{6983:(e,r,t)=>{t.d(r,{Z:()=>i});var n=t(9601),a=t.n(n),o=t(2609),l=t.n(o)()(a());l.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-patient-programs__programs-overview__widgetCard___W1HJv{border:1px solid #e0e0e0}",""]),l.locals={widgetCard:"-esm-patient-programs__programs-overview__widgetCard___W1HJv"};const i=l},2109:(e,r,t)=>{t.r(r),t.d(r,{default:()=>Z});var n=t(7900),a=t.n(n),o=t(4924),l=t(5573),i=t(7047),s=t(6759),d=t(3771),c=t(3066),u=t(4076),m=t(6039);function p(){return p=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},p.apply(this,arguments)}const g=function(e){var r=e.enrollment,t=(0,o.useTranslation)().t,n="eligible"===r.enrollmentStatus?r.enrollmentFormUuid:r.discontinuationFormUuid,l=function(e){d.formEntrySub.next({formUuid:n,encounterUuid:""}),(0,d.launchPatientWorkspace)("patient-form-entry-workspace",{workspaceTitle:"".concat(null==r?void 0:r.display," ").concat(e," Form")})};return"eligible"===r.enrollmentStatus?a().createElement(i.zxk,{onClick:function(){return l(t("enrollment","Enrollment"))},renderIcon:function(e){return a().createElement(m.sQ,p({size:20},e))},kind:"tertiary",size:"small"},t("enroll","Enroll")):a().createElement(i.zxk,{onClick:function(){return l(t("discontinue","Discontinue"))},renderIcon:function(e){return a().createElement(m.sQ,p({size:20},e))},kind:"danger--ghost",size:"small"},t("discontinue","Discontinue"))};var v=t(321),f=t.n(v),b=t(1195),h=t.n(b),E=t(3275),y=t.n(E),P=t(7162),w=t.n(P),O=t(2094),k=t.n(O),C=t(757),_=t.n(C),S=t(6983),j={};j.styleTagTransform=_(),j.setAttributes=w(),j.insert=y().bind(null,"head"),j.domAPI=h(),j.insertStyleElement=k(),f()(S.Z,j);const T=S.Z&&S.Z.locals?S.Z.locals:void 0;function D(){return D=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},D.apply(this,arguments)}const Z=function(e){var r,t,n=e.basePath,m=e.patientUuid,p=(0,o.useTranslation)().t,v=(0,c.useConfig)(),f=p("programs","Program enrollments"),b=p("carePrograms","Care Programs"),h=p("seeAll","See all"),E=window.spaBase+n+"/programs",y=!!v.customUrl,P=(0,u.b$)(m),w=P.activeEnrollments,O=P.availablePrograms,k=P.configurablePrograms,C=P.eligiblePrograms,_=P.enrollments,S=P.isError,j=P.isLoading,Z=P.isValidating,L=(0,c.usePagination)(y?k:null!=_?_:[],5),F=L.results,z=L.goTo,x=L.currentPage,A=a().useCallback((function(){return(0,d.launchPatientWorkspace)("programs-form-workspace")}),[]),U=[{key:"display",header:p("activePrograms","Active programs")},{key:"location",header:p("location","Location")},{key:"dateEnrolled",header:p("dateEnrolled","Date enrolled")},{key:"status",header:p("status","Status")},{key:"actions",header:p("actions","Actions")}],H=a().useMemo((function(){return null==F?void 0:F.map((function(e){var r;return{id:e.uuid,display:e.display,location:null===(r=e.location)||void 0===r?void 0:r.display,dateEnrolled:e.dateEnrolled?(0,c.formatDatetime)(new Date(e.dateEnrolled)):"--",status:y?(0,l.Z)(e.enrollmentStatus):e.dateCompleted?"".concat(p("completedOn","Completed On")," ").concat((0,c.formatDate)(new Date(e.dateCompleted))):p("active","Active"),actions:a().createElement(g,{enrollment:e})}}))}),[y,F,p]);return j?a().createElement(i.gqd,{role:"progressbar"}):S?a().createElement(d.ErrorState,{error:S,headerTitle:b}):(y?k.length:null==w?void 0:w.length)?a().createElement("div",{className:T.widgetCard},a().createElement(d.CardHeader,{title:b},a().createElement("span",null,Z?a().createElement(i.lSo,null):null),a().createElement(i.zxk,{kind:"ghost",renderIcon:function(e){return a().createElement(s.mm,D({size:16},e))},iconDescription:"Add programs",onClick:A,disabled:(null==O?void 0:O.length)&&0===(null==C?void 0:C.length)},p("add","Add"))),(null==O?void 0:O.length)&&0===(null==C?void 0:C.length)&&a().createElement(i.K0D,{style:{minWidth:"100%",margin:"0rem",padding:"0rem"},kind:"info",lowContrast:!0,subtitle:p("noEligibleEnrollments","There are no more programs left to enroll this patient in"),title:p("fullyEnrolled","Enrolled in all programs")}),a().createElement(i.wQF,{rows:H,headers:U,isSortable:!0,size:"sm",useZebraStyles:!0},(function(e){var n=e.rows,o=e.headers,l=e.getHeaderProps,s=e.getTableProps;return a().createElement(i.xJi,null,a().createElement(i.iA_,D({},s()),a().createElement(i.ssF,null,a().createElement(i.SCH,null,o.map((function(e){var t;return a().createElement(i.xDH,D({className:"".concat(T.productiveHeading01," ").concat(T.text02)},l({header:e,isSortable:e.isSortable})),null!==(r=null===(t=e.header)||void 0===t?void 0:t.content)&&void 0!==r?r:e.header)})))),a().createElement(i.RMI,null,n.map((function(e){return a().createElement(i.SCH,{key:e.id},e.cells.map((function(e){var r;return a().createElement(i.pj1,{key:e.id},null!==(t=null===(r=e.value)||void 0===r?void 0:r.content)&&void 0!==t?t:e.value)})))})))))})),a().createElement(d.PatientChartPagination,{currentItems:F.length,onPageNumberChange:function(e){var r=e.page;return z(r)},pageNumber:x,pageSize:5,totalItems:y?k.length:null==_?void 0:_.length,dashboardLinkUrl:E,dashboardLinkLabel:h})):a().createElement(d.EmptyState,{displayText:f,headerTitle:b,launchForm:A})}},4076:(e,r,t)=>{t.d(r,{Bw:()=>u,YX:()=>g,b$:()=>v,df:()=>p,o9:()=>c,oI:()=>m});var n=t(9857),a=t(3066),o=t(4200),l=t(3863),i=t(8827),s=t(819);function d(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var c="custom:(uuid,display,program,dateEnrolled,dateCompleted,location:(uuid,display))";function u(e){var r,t=(0,n.ZP)("/ws/rest/v1/programenrollment?patient=".concat(e,"&v=").concat(c),a.openmrsFetch),l=t.data,i=t.error,s=t.isValidating,d=(null==l||null===(r=l.data)||void 0===r?void 0:r.results.length)>0?null==l?void 0:l.data.results.sort((function(e,r){return r.dateEnrolled>e.dateEnrolled?1:-1})):null,u=null==d?void 0:d.filter((function(e){return!e.dateCompleted}));return{data:l?(0,o.Z)(d,(function(e){var r;return null==e||null===(r=e.program)||void 0===r?void 0:r.uuid})):null,isError:i,isLoading:!l&&!i,isValidating:s,activeEnrollments:u}}function m(e){var r,t,o=(0,n.ZP)("/ws/rest/v1/program?v=custom:(uuid,display,allWorkflows,concept:(uuid,display))",a.openmrsFetch),d=o.data,c=o.error,u=null!==(t=null==d||null===(r=d.data)||void 0===r?void 0:r.results)&&void 0!==t?t:null;return{data:u,isError:c,isLoading:!d&&!c,eligiblePrograms:(0,l.Z)(u,(function(r){return!(0,i.Z)((0,s.Z)(e,"program.uuid"),r.uuid)}))}}function p(e,r){if(!e)return null;var t=e.program,n=e.patient,o=e.dateEnrolled,l=e.dateCompleted,i=e.location;return(0,a.openmrsObservableFetch)("/ws/rest/v1/programenrollment",{method:"POST",headers:{"Content-Type":"application/json"},body:{program:t,patient:n,dateEnrolled:o,dateCompleted:l,location:i},signal:r.signal})}function g(e,r,t){if(!r&&!r.program)return null;r.program;var n=r.dateEnrolled,o=r.dateCompleted,l=r.location;return(0,a.openmrsObservableFetch)("/ws/rest/v1/programenrollment/".concat(e),{method:"POST",headers:{"Content-Type":"application/json"},body:{dateEnrolled:n,dateCompleted:o,location:l},signal:t.signal})}var v=function(e){var r,t,o=(0,a.useConfig)().customUrl,l=u(e),i=l.data,s=l.isError,c=l.isLoading,p=l.isValidating,g=l.activeEnrollments,v=m(i),f=v.data,b=v.eligiblePrograms,h=function(e){var r,t=(0,a.useConfig)().customUrl,o=(0,n.ZP)(t?"".concat(t).concat(e):null,a.openmrsFetch),l=o.data,i=o.error;return{configurablePrograms:null!==(r=null==l?void 0:l.data)&&void 0!==r?r:[],isLoading:!l&&!i,error:i}}(e),E=h.configurablePrograms,y=h.isLoading,P=h.error;return r=function(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},n=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),n.forEach((function(r){d(e,r,t[r])}))}return e}({enrollments:i},o?{isLoading:y,isError:P}:{isLoading:c,isError:s}),t=null!=(t={isValidating:p,activeEnrollments:g,availablePrograms:f,eligiblePrograms:b,configurablePrograms:E})?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):function(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}(Object(t)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(t,e))})),r}}}]);
package/dist/13.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_openmrs_esm_patient_programs_app=self.webpackChunk_openmrs_esm_patient_programs_app||[]).push([[13],{5351:(e,r,t)=>{t.d(r,{Z:()=>i});var n=t(9601),a=t.n(n),o=t(2609),l=t.n(o)()(a());l.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-patient-programs__programs-detailed-summary__widgetCard___q9_pO{border:1px solid #e0e0e0}",""]),l.locals={widgetCard:"-esm-patient-programs__programs-detailed-summary__widgetCard___q9_pO"};const i=l},6013:(e,r,t)=>{t.r(r),t.d(r,{default:()=>S});var n=t(7900),a=t.n(n),o=t(4924),l=t(7047),i=t(6759),s=t(7631),u=t(3066),c=t(3771),d=t(4076),m=t(321),p=t.n(m),g=t(1195),f=t.n(g),v=t(3275),b=t.n(v),h=t(7162),y=t.n(h),E=t(2094),O=t.n(E),P=t(757),Z=t.n(P),w=t(5351),C={};C.styleTagTransform=Z(),C.setAttributes=y(),C.insert=b().bind(null,"head"),C.domAPI=f(),C.insertStyleElement=O(),p()(w.Z,C);const k=w.Z&&w.Z.locals?w.Z.locals:void 0;function _(){return _=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},_.apply(this,arguments)}function j(e){var r=e.programEnrollmentId,t=a().useCallback((function(){return(0,c.launchPatientWorkspace)("programs-form-workspace",{programEnrollmentId:r})}),[r]);return a().createElement(l.zxk,{kind:"ghost",renderIcon:function(e){return a().createElement(s.I8,_({size:16},e))},iconDescription:"Edit Program",onClick:t,hasIconOnly:!0})}const S=function(e){var r,t,n=e.patientUuid,s=(0,o.useTranslation)().t,m=s("programEnrollments","Program enrollments"),p=s("carePrograms","Care Programs"),g=!!(0,u.useConfig)().customUrl,f=(0,d.b$)(n),v=f.enrollments,b=f.isLoading,h=f.isError,y=f.isValidating,E=f.availablePrograms,O=f.eligiblePrograms,P=f.configurablePrograms,Z=(0,u.usePagination)(g?P:null!=v?v:[],5),w=(Z.results,Z.goTo,Z.currentPage,a().useMemo((function(){return[{key:"display",header:s("activePrograms","Active programs")},{key:"location",header:s("location","Location")},{key:"dateEnrolled",header:s("dateEnrolled","Date enrolled")},{key:"status",header:s("status","Status")},{key:"actions",header:s("actions","Actions")}]}),[s])),C=a().useMemo((function(){return null==v?void 0:v.map((function(e){var r;return{id:e.uuid,display:e.display,location:null===(r=e.location)||void 0===r?void 0:r.display,dateEnrolled:(0,u.formatDatetime)(new Date(e.dateEnrolled)),status:e.dateCompleted?"".concat(s("completedOn","Completed On")," ").concat((0,u.formatDate)(new Date(e.dateCompleted))):s("active","Active"),actions:a().createElement(j,{programEnrollmentId:e.uuid})}}))}),[v,s]),S=a().useCallback((function(){return(0,c.launchPatientWorkspace)("programs-form-workspace")}),[]);return b?a().createElement(l.gqd,{role:"progressbar"}):h?a().createElement(c.ErrorState,{error:h,headerTitle:p}):(null==v?void 0:v.length)?a().createElement("div",{className:k.widgetCard},a().createElement(c.CardHeader,{title:p},a().createElement("span",null,y?a().createElement(l.lSo,null):null),a().createElement(l.zxk,{kind:"ghost",renderIcon:function(e){return a().createElement(i.mm,_({size:16},e))},iconDescription:"Add programs",onClick:S,disabled:(null==E?void 0:E.length)&&0===(null==O?void 0:O.length)},s("add","Add"))),(null==E?void 0:E.length)&&0===(null==O?void 0:O.length)?a().createElement(l.K0D,{style:{minWidth:"100%",margin:"0rem",padding:"0rem"},kind:"info",lowContrast:!0,subtitle:s("noEligibleEnrollments","There are no more programs left to enroll this patient in"),title:s("fullyEnrolled","Enrolled in all programs")}):null,a().createElement(l.wQF,{rows:C,headers:w,isSortable:!0,size:"xs",useZebraStyles:!0},(function(e){var n=e.rows,o=e.headers,i=e.getHeaderProps,s=e.getTableProps;return a().createElement(l.xJi,null,a().createElement(l.iA_,_({},s()),a().createElement(l.ssF,null,a().createElement(l.SCH,null,o.map((function(e){var t;return a().createElement(l.xDH,_({className:"".concat(k.productiveHeading01," ").concat(k.text02)},i({header:e,isSortable:e.isSortable})),null!==(r=null===(t=e.header)||void 0===t?void 0:t.content)&&void 0!==r?r:e.header)})))),a().createElement(l.RMI,null,n.map((function(e){return a().createElement(l.SCH,{key:e.id},e.cells.map((function(e){var r;return a().createElement(l.pj1,{key:e.id},null!==(t=null===(r=e.value)||void 0===r?void 0:r.content)&&void 0!==t?t:e.value)})))})))))}))):a().createElement(c.EmptyState,{displayText:m,headerTitle:p,launchForm:S})}},4076:(e,r,t)=>{t.d(r,{Bw:()=>d,YX:()=>g,b$:()=>f,df:()=>p,o9:()=>c,oI:()=>m});var n=t(9857),a=t(3066),o=t(4200),l=t(3863),i=t(8827),s=t(819);function u(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var c="custom:(uuid,display,program,dateEnrolled,dateCompleted,location:(uuid,display))";function d(e){var r,t=(0,n.ZP)("/ws/rest/v1/programenrollment?patient=".concat(e,"&v=").concat(c),a.openmrsFetch),l=t.data,i=t.error,s=t.isValidating,u=(null==l||null===(r=l.data)||void 0===r?void 0:r.results.length)>0?null==l?void 0:l.data.results.sort((function(e,r){return r.dateEnrolled>e.dateEnrolled?1:-1})):null,d=null==u?void 0:u.filter((function(e){return!e.dateCompleted}));return{data:l?(0,o.Z)(u,(function(e){var r;return null==e||null===(r=e.program)||void 0===r?void 0:r.uuid})):null,isError:i,isLoading:!l&&!i,isValidating:s,activeEnrollments:d}}function m(e){var r,t,o=(0,n.ZP)("/ws/rest/v1/program?v=custom:(uuid,display,allWorkflows,concept:(uuid,display))",a.openmrsFetch),u=o.data,c=o.error,d=null!==(t=null==u||null===(r=u.data)||void 0===r?void 0:r.results)&&void 0!==t?t:null;return{data:d,isError:c,isLoading:!u&&!c,eligiblePrograms:(0,l.Z)(d,(function(r){return!(0,i.Z)((0,s.Z)(e,"program.uuid"),r.uuid)}))}}function p(e,r){if(!e)return null;var t=e.program,n=e.patient,o=e.dateEnrolled,l=e.dateCompleted,i=e.location;return(0,a.openmrsObservableFetch)("/ws/rest/v1/programenrollment",{method:"POST",headers:{"Content-Type":"application/json"},body:{program:t,patient:n,dateEnrolled:o,dateCompleted:l,location:i},signal:r.signal})}function g(e,r,t){if(!r&&!r.program)return null;r.program;var n=r.dateEnrolled,o=r.dateCompleted,l=r.location;return(0,a.openmrsObservableFetch)("/ws/rest/v1/programenrollment/".concat(e),{method:"POST",headers:{"Content-Type":"application/json"},body:{dateEnrolled:n,dateCompleted:o,location:l},signal:t.signal})}var f=function(e){var r,t,o=(0,a.useConfig)().customUrl,l=d(e),i=l.data,s=l.isError,c=l.isLoading,p=l.isValidating,g=l.activeEnrollments,f=m(i),v=f.data,b=f.eligiblePrograms,h=function(e){var r,t=(0,a.useConfig)().customUrl,o=(0,n.ZP)(t?"".concat(t).concat(e):null,a.openmrsFetch),l=o.data,i=o.error;return{configurablePrograms:null!==(r=null==l?void 0:l.data)&&void 0!==r?r:[],isLoading:!l&&!i,error:i}}(e),y=h.configurablePrograms,E=h.isLoading,O=h.error;return r=function(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},n=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),n.forEach((function(r){u(e,r,t[r])}))}return e}({enrollments:i},o?{isLoading:E,isError:O}:{isLoading:c,isError:s}),t=null!=(t={isValidating:p,activeEnrollments:g,availablePrograms:v,eligiblePrograms:b,configurablePrograms:y})?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):function(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}(Object(t)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(t,e))})),r}},1154:(e,r,t)=>{t.d(r,{Z:()=>l});const n=function(e,r,t){for(var n=-1,a=Object(e),o=t(e),l=o.length;l--;){var i=o[++n];if(!1===r(a[i],i,a))break}return e};var a=t(6892);var o=t(3282);const l=(i=function(e,r){return e&&n(e,r,a.Z)},function(e,r){if(null==e)return e;if(!(0,o.Z)(e))return i(e,r);for(var t=e.length,n=-1,a=Object(e);++n<t&&!1!==r(a[n],n,a););return e});var i},3863:(e,r,t)=>{t.d(r,{Z:()=>s});var n=t(2300),a=t(1154);const o=function(e,r){var t=[];return(0,a.Z)(e,(function(e,n,a){r(e,n,a)&&t.push(e)})),t};var l=t(7954),i=t(7885);const s=function(e,r){return((0,i.Z)(e)?n.Z:o)(e,(0,l.Z)(r,3))}},8827:(e,r,t)=>{t.d(r,{Z:()=>P});var n=t(1266),a=t(3282),o=t(9001),l=t(7885),i=t(3391);var s=/\s/;var u=/^\s+/;const c=function(e){return e?e.slice(0,function(e){for(var r=e.length;r--&&s.test(e.charAt(r)););return r}(e)+1).replace(u,""):e};var d=t(3122),m=t(2758),p=/^[-+]0x[0-9a-f]+$/i,g=/^0b[01]+$/i,f=/^0o[0-7]+$/i,v=parseInt;const b=function(e){return e?Infinity===(e=function(e){if("number"==typeof e)return e;if((0,m.Z)(e))return NaN;if((0,d.Z)(e)){var r="function"==typeof e.valueOf?e.valueOf():e;e=(0,d.Z)(r)?r+"":r}if("string"!=typeof e)return 0===e?e:+e;e=c(e);var t=g.test(e);return t||f.test(e)?v(e.slice(2),t?2:8):p.test(e)?NaN:+e}(e))||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0};var h=t(5598);var y=t(6892);const E=function(e){return null==e?[]:function(e,r){return(0,h.Z)(r,(function(r){return e[r]}))}(e,(0,y.Z)(e))};var O=Math.max;const P=function(e,r,t,s){e=(0,a.Z)(e)?e:E(e),t=t&&!s?function(e){var r=b(e),t=r%1;return r==r?t?r-t:r:0}(t):0;var u=e.length;return t<0&&(t=O(u+t,0)),function(e){return"string"==typeof e||!(0,l.Z)(e)&&(0,i.Z)(e)&&"[object String]"==(0,o.Z)(e)}(e)?t<=u&&e.indexOf(r,t)>-1:!!u&&(0,n.Z)(e,r,t)>-1}},819:(e,r,t)=>{t.d(r,{Z:()=>u});var n=t(5598),a=t(7954),o=t(1154),l=t(3282);const i=function(e,r){var t=-1,n=(0,l.Z)(e)?Array(e.length):[];return(0,o.Z)(e,(function(e,a,o){n[++t]=r(e,a,o)})),n};var s=t(7885);const u=function(e,r){return((0,s.Z)(e)?n.Z:i)(e,(0,a.Z)(r,3))}}}]);
package/dist/145.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_openmrs_esm_patient_programs_app=self.webpackChunk_openmrs_esm_patient_programs_app||[]).push([[145],{1951:(e,t,r)=>{r.d(t,{Z:()=>i});var n=r(9601),o=r.n(n),a=r(2609),l=r.n(a)()(o());l.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-patient-programs__programs-form__loading___KGmNP{margin-left:1rem;width:2rem;min-height:2.5rem}.-esm-patient-programs__programs-form__button___KPSt9{height:4rem;display:flex;align-content:flex-start;align-items:baseline;min-width:50%}.-esm-patient-programs__programs-form__tablet___yw5Wr{padding:1.5rem 1rem;background-color:#fff}.-esm-patient-programs__programs-form__desktop___RnK8C{padding:0rem}.-esm-patient-programs__programs-form__formContainer___lqbdm{margin:1rem}.-esm-patient-programs__programs-form__form___BLqPA{display:flex;flex-direction:column;justify-content:space-between;height:calc(100vh - 6rem)}",""]),l.locals={loading:"-esm-patient-programs__programs-form__loading___KGmNP",button:"-esm-patient-programs__programs-form__button___KPSt9",tablet:"-esm-patient-programs__programs-form__tablet___yw5Wr",desktop:"-esm-patient-programs__programs-form__desktop___RnK8C",formContainer:"-esm-patient-programs__programs-form__formContainer___lqbdm",form:"-esm-patient-programs__programs-form__form___BLqPA"};const i=l},8145:(e,t,r)=>{r.r(t),r.d(t,{default:()=>N});var n=r(7900),o=r.n(n),a=r(4924),l=r(3565),i=r.n(l),u=r(3863),s=r(8827),c=r(819),m=r(9857),d=r(3066),p=r(7047),f=r(4076),g=r(321),v=r.n(g),b=r(1195),_=r.n(b),y=r(3275),h=r.n(y),E=r(7162),w=r.n(E),O=r(2094),P=r.n(O),Z=r(757),C=r.n(Z),S=r(1951),j={};j.styleTagTransform=C(),j.setAttributes=w(),j.insert=h().bind(null,"head"),j.domAPI=_(),j.insertStyleElement=P(),v()(S.Z,j);const k=S.Z&&S.Z.locals?S.Z.locals:void 0;function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function T(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function D(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],l=!0,i=!1;try{for(r=r.call(e);!(l=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);l=!0);}catch(e){i=!0,o=e}finally{try{l||null==r.return||r.return()}finally{if(i)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return x(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?x(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const N=function(e){var t,r,n,l,g=e.closeWorkspace,v=e.patientUuid,b=e.programEnrollmentId,_=(0,a.useTranslation)().t,y="tablet"===(0,d.useLayoutType)(),h=(0,d.useSession)(),E=(0,d.useLocations)(),w=(0,m.kY)().mutate,O=(0,f.oI)().data,P=(0,f.Bw)(v).data,Z=b&&P.filter((function(e){return e.uuid==b}))[0],C=Z?function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){T(e,t,r[t])}))}return e}({display:Z.program.name},Z.program):null,S=C?[C]:(0,u.Z)(O,(function(e){return!(0,s.Z)((0,c.Z)(P,"program.uuid"),e.uuid)})),j=D(o().useState((null==Z?void 0:Z.dateCompleted)?(0,d.parseDate)(Z.dateCompleted):null),2),x=j[0],N=j[1],A=D(o().useState((null==Z?void 0:Z.dateEnrolled)?(0,d.parseDate)(Z.dateEnrolled):new Date),2),I=A[0],L=A[1],F=D(o().useState(null!==(r=null==Z?void 0:Z.program.uuid)&&void 0!==r?r:""),2),q=F[0],K=F[1],V=D(o().useState(null!==(n=null==Z?void 0:Z.location.uuid)&&void 0!==n?n:""),2),H=V[0],U=V[1];!H&&(null==h||null===(t=h.sessionLocation)||void 0===t?void 0:t.uuid)&&U(null==h||null===(l=h.sessionLocation)||void 0===l?void 0:l.uuid);var W=o().useCallback((function(e){if(e.preventDefault(),q){var t={patient:v,program:q,dateEnrolled:I?i()(I).format():null,dateCompleted:x?i()(x).format():null,location:H},r=new AbortController,n=Z?(0,f.YX)(Z.uuid,t,r).subscribe((function(e){200===e.status&&(g(),(0,d.showToast)({critical:!0,kind:"success",description:_("enrollmentUpdatesNowVisible","Changes to the program are now visible in the Programs table"),title:_("enrollmentUpdated","Program enrollment updated")}),w("/ws/rest/v1/programenrollment?patient=".concat(v,"&v=").concat(f.o9)))}),(function(e){(0,d.createErrorHandler)(),(0,d.showNotification)({title:_("programEnrollmentSaveError","Error saving program enrollment"),kind:"error",critical:!0,description:null==e?void 0:e.message})})):(0,f.df)(t,r).subscribe((function(e){201===e.status&&(g(),(0,d.showToast)({critical:!0,kind:"success",description:_("enrollmentNowVisible","It is now visible in the Programs table"),title:_("enrollmentSaved","Program enrollment saved")}),w("/ws/rest/v1/programenrollment?patient=".concat(v,"&v=").concat(f.o9)))}),(function(e){(0,d.createErrorHandler)(),(0,d.showNotification)({title:_("programEnrollmentSaveError","Error saving program enrollment"),kind:"error",critical:!0,description:null==e?void 0:e.message})}));return function(){n.unsubscribe()}}}),[g,x,I,w,v,q,_,H,Z]);return o().createElement(p.l09,{className:k.form,onSubmit:W},o().createElement(p.Kqy,{className:k.formContainer,gap:7},o().createElement(p.cwH,{style:{maxWidth:"50%"},legendText:_("programName","Program name")},o().createElement("div",{className:k.selectContainer},o().createElement(p.PhF,{id:"program",invalidText:_("required","Required"),labelText:"",light:y,onChange:function(e){return K(e.target.value)}},q?null:o().createElement(p.QlF,{text:_("chooseProgram","Choose a program"),value:""}),(null==S?void 0:S.length)>0&&S.map((function(e){return o().createElement(p.QlF,{key:e.uuid,text:e.display,value:e.uuid},e.display)}))))),o().createElement(p.cwH,{style:{maxWidth:"50%"},legendText:_("dateEnrolled","Date enrolled")},o().createElement(p.Mtg,{id:"enrollmentDate",datePickerType:"single",dateFormat:"d/m/Y",light:y,maxDate:(new Date).toISOString(),placeholder:"dd/mm/yyyy",onChange:function(e){var t=D(e,1)[0];return L(t)},value:I},o().createElement(p.aj6,{id:"enrollmentDateInput",labelText:""}))),o().createElement(p.cwH,{style:{width:"50%"},legendText:_("dateCompleted","Date completed")},o().createElement(p.Mtg,{id:"completionDate",datePickerType:"single",dateFormat:"d/m/Y",light:y,minDate:new Date(I).toISOString(),maxDate:(new Date).toISOString(),placeholder:"dd/mm/yyyy",onChange:function(e){var t=D(e,1)[0];return N(t)},value:x},o().createElement(p.aj6,{id:"completionDateInput",labelText:""}))),o().createElement(p.cwH,{style:{width:"50%"},legendText:_("enrollmentLocation","Enrollment location")},o().createElement(p.PhF,{id:"location",invalidText:"Required",labelText:"",light:y,onChange:function(e){return U(e.target.value)},value:H},H?null:o().createElement(p.QlF,{text:_("chooseLocation","Choose a location"),value:""}),(null==E?void 0:E.length)>0&&E.map((function(e){return o().createElement(p.QlF,{key:e.uuid,text:e.display,value:e.uuid},e.display)}))))),o().createElement(p.uVA,{className:y?k.tablet:k.desktop},o().createElement(p.zxk,{className:k.button,kind:"secondary",onClick:function(){return g()}},_("cancel","Cancel")),o().createElement(p.zxk,{className:k.button,kind:"primary",disabled:!q,type:"submit"},_("saveAndClose","Save and close"))))}},4076:(e,t,r)=>{r.d(t,{Bw:()=>m,YX:()=>f,b$:()=>g,df:()=>p,o9:()=>c,oI:()=>d});var n=r(9857),o=r(3066),a=r(4200),l=r(3863),i=r(8827),u=r(819);function s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var c="custom:(uuid,display,program,dateEnrolled,dateCompleted,location:(uuid,display))";function m(e){var t,r=(0,n.ZP)("/ws/rest/v1/programenrollment?patient=".concat(e,"&v=").concat(c),o.openmrsFetch),l=r.data,i=r.error,u=r.isValidating,s=(null==l||null===(t=l.data)||void 0===t?void 0:t.results.length)>0?null==l?void 0:l.data.results.sort((function(e,t){return t.dateEnrolled>e.dateEnrolled?1:-1})):null,m=null==s?void 0:s.filter((function(e){return!e.dateCompleted}));return{data:l?(0,a.Z)(s,(function(e){var t;return null==e||null===(t=e.program)||void 0===t?void 0:t.uuid})):null,isError:i,isLoading:!l&&!i,isValidating:u,activeEnrollments:m}}function d(e){var t,r,a=(0,n.ZP)("/ws/rest/v1/program?v=custom:(uuid,display,allWorkflows,concept:(uuid,display))",o.openmrsFetch),s=a.data,c=a.error,m=null!==(r=null==s||null===(t=s.data)||void 0===t?void 0:t.results)&&void 0!==r?r:null;return{data:m,isError:c,isLoading:!s&&!c,eligiblePrograms:(0,l.Z)(m,(function(t){return!(0,i.Z)((0,u.Z)(e,"program.uuid"),t.uuid)}))}}function p(e,t){if(!e)return null;var r=e.program,n=e.patient,a=e.dateEnrolled,l=e.dateCompleted,i=e.location;return(0,o.openmrsObservableFetch)("/ws/rest/v1/programenrollment",{method:"POST",headers:{"Content-Type":"application/json"},body:{program:r,patient:n,dateEnrolled:a,dateCompleted:l,location:i},signal:t.signal})}function f(e,t,r){if(!t&&!t.program)return null;t.program;var n=t.dateEnrolled,a=t.dateCompleted,l=t.location;return(0,o.openmrsObservableFetch)("/ws/rest/v1/programenrollment/".concat(e),{method:"POST",headers:{"Content-Type":"application/json"},body:{dateEnrolled:n,dateCompleted:a,location:l},signal:r.signal})}var g=function(e){var t,r,a=(0,o.useConfig)().customUrl,l=m(e),i=l.data,u=l.isError,c=l.isLoading,p=l.isValidating,f=l.activeEnrollments,g=d(i),v=g.data,b=g.eligiblePrograms,_=function(e){var t,r=(0,o.useConfig)().customUrl,a=(0,n.ZP)(r?"".concat(r).concat(e):null,o.openmrsFetch),l=a.data,i=a.error;return{configurablePrograms:null!==(t=null==l?void 0:l.data)&&void 0!==t?t:[],isLoading:!l&&!i,error:i}}(e),y=_.configurablePrograms,h=_.isLoading,E=_.error;return t=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){s(e,t,r[t])}))}return e}({enrollments:i},a?{isLoading:h,isError:E}:{isLoading:c,isError:u}),r=null!=(r={isValidating:p,activeEnrollments:f,availablePrograms:v,eligiblePrograms:b,configurablePrograms:y})?r:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r.push.apply(r,n)}return r}(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})),t}},1154:(e,t,r)=>{r.d(t,{Z:()=>l});const n=function(e,t,r){for(var n=-1,o=Object(e),a=r(e),l=a.length;l--;){var i=a[++n];if(!1===t(o[i],i,o))break}return e};var o=r(6892);var a=r(3282);const l=(i=function(e,t){return e&&n(e,t,o.Z)},function(e,t){if(null==e)return e;if(!(0,a.Z)(e))return i(e,t);for(var r=e.length,n=-1,o=Object(e);++n<r&&!1!==t(o[n],n,o););return e});var i},3863:(e,t,r)=>{r.d(t,{Z:()=>u});var n=r(2300),o=r(1154);const a=function(e,t){var r=[];return(0,o.Z)(e,(function(e,n,o){t(e,n,o)&&r.push(e)})),r};var l=r(7954),i=r(7885);const u=function(e,t){return((0,i.Z)(e)?n.Z:a)(e,(0,l.Z)(t,3))}},8827:(e,t,r)=>{r.d(t,{Z:()=>w});var n=r(1266),o=r(3282),a=r(9001),l=r(7885),i=r(3391);var u=/\s/;var s=/^\s+/;const c=function(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&u.test(e.charAt(t)););return t}(e)+1).replace(s,""):e};var m=r(3122),d=r(2758),p=/^[-+]0x[0-9a-f]+$/i,f=/^0b[01]+$/i,g=/^0o[0-7]+$/i,v=parseInt;const b=function(e){return e?Infinity===(e=function(e){if("number"==typeof e)return e;if((0,d.Z)(e))return NaN;if((0,m.Z)(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=(0,m.Z)(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=c(e);var r=f.test(e);return r||g.test(e)?v(e.slice(2),r?2:8):p.test(e)?NaN:+e}(e))||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0};var _=r(5598);var y=r(6892);const h=function(e){return null==e?[]:function(e,t){return(0,_.Z)(t,(function(t){return e[t]}))}(e,(0,y.Z)(e))};var E=Math.max;const w=function(e,t,r,u){e=(0,o.Z)(e)?e:h(e),r=r&&!u?function(e){var t=b(e),r=t%1;return t==t?r?t-r:t:0}(r):0;var s=e.length;return r<0&&(r=E(s+r,0)),function(e){return"string"==typeof e||!(0,l.Z)(e)&&(0,i.Z)(e)&&"[object String]"==(0,a.Z)(e)}(e)?r<=s&&e.indexOf(t,r)>-1:!!s&&(0,n.Z)(e,t,r)>-1}},819:(e,t,r)=>{r.d(t,{Z:()=>s});var n=r(5598),o=r(7954),a=r(1154),l=r(3282);const i=function(e,t){var r=-1,n=(0,l.Z)(e)?Array(e.length):[];return(0,a.Z)(e,(function(e,o,a){n[++r]=t(e,o,a)})),n};var u=r(7885);const s=function(e,t){return((0,u.Z)(e)?n.Z:i)(e,(0,o.Z)(t,3))}}}]);