@openmrs/esm-patient-programs-app 4.0.1-pre.231 → 4.0.1-pre.243
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.
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
[
|
|
2
|
-
[
|
|
3
|
-
[
|
|
4
|
-
[
|
|
5
|
-
[
|
|
6
|
-
[
|
|
7
|
-
[
|
|
8
|
-
[
|
|
9
|
-
[
|
|
10
|
-
[
|
|
11
|
-
[
|
|
12
|
-
[
|
|
13
|
-
[
|
|
14
|
-
[
|
|
15
|
-
[
|
|
16
|
-
[
|
|
17
|
-
[
|
|
18
|
-
[
|
|
19
|
-
[
|
|
20
|
-
[
|
|
21
|
-
[
|
|
22
|
-
[
|
|
23
|
-
[
|
|
24
|
-
[
|
|
25
|
-
[
|
|
26
|
-
[
|
|
27
|
-
[
|
|
28
|
-
[
|
|
29
|
-
[
|
|
30
|
-
[
|
|
31
|
-
[
|
|
32
|
-
[
|
|
33
|
-
[
|
|
1
|
+
[33m@openmrs/esm-patient-programs-app:build[0m: cache hit, replaying output [2m38635682c6251cc0[0m
|
|
2
|
+
[33m@openmrs/esm-patient-programs-app:build: [0massets by chunk 927 KiB (id hint: vendors)
|
|
3
|
+
[33m@openmrs/esm-patient-programs-app:build: [0m assets by status [1m[33m851 KiB[39m[22m [1m[33m[big][39m[22m
|
|
4
|
+
[33m@openmrs/esm-patient-programs-app:build: [0m asset [1m[33m396.js[39m[22m [1m[33m435 KiB[39m[22m [1m[32m[emitted][39m[22m [1m[32m[minimized][39m[22m [1m[33m[big][39m[22m (id hint: vendors) 1 related asset
|
|
5
|
+
[33m@openmrs/esm-patient-programs-app:build: [0m asset [1m[33m858.js[39m[22m [1m[33m415 KiB[39m[22m [1m[32m[emitted][39m[22m [1m[32m[minimized][39m[22m [1m[33m[big][39m[22m (id hint: vendors) 1 related asset
|
|
6
|
+
[33m@openmrs/esm-patient-programs-app:build: [0m asset [1m[32m206.js[39m[22m 45.4 KiB [1m[32m[emitted][39m[22m [1m[32m[minimized][39m[22m (id hint: vendors) 1 related asset
|
|
7
|
+
[33m@openmrs/esm-patient-programs-app:build: [0m asset [1m[32m709.js[39m[22m 19 KiB [1m[32m[emitted][39m[22m [1m[32m[minimized][39m[22m (id hint: vendors)
|
|
8
|
+
[33m@openmrs/esm-patient-programs-app:build: [0m asset [1m[32m238.js[39m[22m 8.46 KiB [1m[32m[emitted][39m[22m [1m[32m[minimized][39m[22m (id hint: vendors) 1 related asset
|
|
9
|
+
[33m@openmrs/esm-patient-programs-app:build: [0m asset [1m[32m461.js[39m[22m 3.83 KiB [1m[32m[emitted][39m[22m [1m[32m[minimized][39m[22m (id hint: vendors)
|
|
10
|
+
[33m@openmrs/esm-patient-programs-app:build: [0m+ 12 assets
|
|
11
|
+
[33m@openmrs/esm-patient-programs-app:build: [0morphan modules 3.88 MiB [1m[33m[orphan][39m[22m 734 modules
|
|
12
|
+
[33m@openmrs/esm-patient-programs-app:build: [0mruntime modules 40.1 KiB 28 modules
|
|
13
|
+
[33m@openmrs/esm-patient-programs-app:build: [0mbuilt modules 3.08 MiB (javascript) 294 bytes (consume-shared) 252 bytes (share-init) [1m[33m[built][39m[22m
|
|
14
|
+
[33m@openmrs/esm-patient-programs-app:build: [0m modules by path [1m../../node_modules/[39m[22m 2.97 MiB 87 modules
|
|
15
|
+
[33m@openmrs/esm-patient-programs-app:build: [0m modules by path [1m./[39m[22m 49.1 KiB 11 modules
|
|
16
|
+
[33m@openmrs/esm-patient-programs-app:build: [0m consume-shared-module modules 294 bytes
|
|
17
|
+
[33m@openmrs/esm-patient-programs-app:build: [0m modules by path [1mconsume shared module (default) @openmrs/[39m[22m 126 bytes 3 modules
|
|
18
|
+
[33m@openmrs/esm-patient-programs-app:build: [0m + 4 modules
|
|
19
|
+
[33m@openmrs/esm-patient-programs-app:build: [0m provide-module modules 252 bytes
|
|
20
|
+
[33m@openmrs/esm-patient-programs-app:build: [0m modules by path [1mprovide shared module (default) @openmrs/[39m[22m 84 bytes 2 modules
|
|
21
|
+
[33m@openmrs/esm-patient-programs-app:build: [0m + 4 modules
|
|
22
|
+
[33m@openmrs/esm-patient-programs-app:build: [0m modules by path [1m../esm-patient-common-lib/src/[39m[22m 69.5 KiB
|
|
23
|
+
[33m@openmrs/esm-patient-programs-app:build: [0m [1m../esm-patient-common-lib/src/index.ts + 31 modules[39m[22m 58.7 KiB [1m[33m[built][39m[22m [1m[33m[code generated][39m[22m
|
|
24
|
+
[33m@openmrs/esm-patient-programs-app:build: [0m + 5 modules
|
|
25
|
+
[33m@openmrs/esm-patient-programs-app:build: [0m [1mcontainer entry[39m[22m 42 bytes [1m[33m[built][39m[22m [1m[33m[code generated][39m[22m
|
|
26
|
+
[33m@openmrs/esm-patient-programs-app:build: [0m
|
|
27
|
+
[33m@openmrs/esm-patient-programs-app:build: [0m[1m[33mWARNING[39m[22m in [1masset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
|
|
28
|
+
[33m@openmrs/esm-patient-programs-app:build: [0mThis can impact web performance.
|
|
29
|
+
[33m@openmrs/esm-patient-programs-app:build: [0mAssets:
|
|
30
|
+
[33m@openmrs/esm-patient-programs-app:build: [0m 858.js (415 KiB)
|
|
31
|
+
[33m@openmrs/esm-patient-programs-app:build: [0m 396.js (435 KiB)[39m[22m
|
|
32
|
+
[33m@openmrs/esm-patient-programs-app:build: [0m
|
|
33
|
+
[33m@openmrs/esm-patient-programs-app:build: [0mwebpack 5.74.0 compiled with [1m[33m1 warning[39m[22m in 135920 ms
|
package/dist/641.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_openmrs_esm_patient_programs_app=self.webpackChunk_openmrs_esm_patient_programs_app||[]).push([[641],{6983:(e,r,t)=>{t.d(r,{Z:()=>i});var n=t(9601),
|
|
1
|
+
"use strict";(self.webpackChunk_openmrs_esm_patient_programs_app=self.webpackChunk_openmrs_esm_patient_programs_app||[]).push([[641],{6983:(e,r,t)=>{t.d(r,{Z:()=>i});var n=t(9601),o=t.n(n),a=t(2609),l=t.n(a)()(o());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},7641:(e,r,t)=>{t.r(r),t.d(r,{default:()=>Z});var n=t(7900),o=t.n(n),a=t(4924),l=t(5573),i=t(5922),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,a.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?o().createElement(i.zxk,{iconDescription:"Enroll to program",onClick:function(){return l(t("enrollment","Enrollment"))},renderIcon:function(e){return o().createElement(m.sQ,p({size:20},e))},kind:"tertiary",size:"sm"},t("enroll","Enroll")):o().createElement(i.zxk,{iconDescription:"Discontinue enrollment",onClick:function(){return l(t("discontinue","Discontinue"))},renderIcon:function(e){return o().createElement(m.sQ,p({size:20},e))},kind:"danger--ghost",size:"sm"},t("discontinue","Discontinue"))};var v=t(6062),f=t.n(v),b=t(4036),E=t.n(b),h=t(6793),y=t.n(h),P=t(7892),w=t.n(P),O=t(1173),k=t.n(O),C=t(2464),_=t.n(C),S=t(6983),j={};j.styleTagTransform=_(),j.setAttributes=w(),j.insert=y().bind(null,"head"),j.domAPI=E(),j.insertStyleElement=k(),f()(S.Z,j);const D=S.Z&&S.Z.locals?S.Z.locals:void 0;function T(){return T=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},T.apply(this,arguments)}const Z=function(e){var r,t,n=e.basePath,m=e.patientUuid,p=(0,a.useTranslation)().t,v=(0,c.useConfig)(),f=p("programs","Program enrollments"),b=p("carePrograms","Care Programs"),E=p("seeAll","See all"),h=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=o().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=o().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:o().createElement(g,{enrollment:e})}}))}),[y,F,p]);return j?o().createElement(i.gqd,{role:"progressbar"}):S?o().createElement(d.ErrorState,{error:S,headerTitle:b}):(y?k.length:null==w?void 0:w.length)?o().createElement("div",{className:D.widgetCard},o().createElement(d.CardHeader,{title:b},o().createElement("span",null,Z?o().createElement(i.lSo,null):null),o().createElement(i.zxk,{kind:"ghost",renderIcon:function(e){return o().createElement(s.mm,T({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)&&o().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")}),o().createElement(i.wQF,{rows:H,headers:U,isSortable:!0,size:"sm",useZebraStyles:!0},(function(e){var n=e.rows,a=e.headers,l=e.getHeaderProps,s=e.getTableProps;return o().createElement(i.xJi,null,o().createElement(i.iA_,T({},s()),o().createElement(i.ssF,null,o().createElement(i.SCH,null,a.map((function(e){var t;return o().createElement(i.xDH,T({className:"".concat(D.productiveHeading01," ").concat(D.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)})))),o().createElement(i.RMI,null,n.map((function(e){return o().createElement(i.SCH,{key:e.id},e.cells.map((function(e){var r;return o().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)})))})))))})),o().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:h,dashboardLinkLabel:E})):o().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),o=t(3066),a=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),o.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,a.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,a=(0,n.ZP)("/ws/rest/v1/program?v=custom:(uuid,display,allWorkflows,concept:(uuid,display))",o.openmrsFetch),d=a.data,c=a.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,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:t,patient:n,dateEnrolled:a,dateCompleted:l,location:i},signal:r.signal})}function g(e,r,t){if(!r&&!r.program)return null;r.program;var n=r.dateEnrolled,a=r.dateCompleted,l=r.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:t.signal})}var v=function(e){var r,t,a=(0,o.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,E=function(e){var r,t=(0,o.useConfig)().customUrl,a=(0,n.ZP)(t?"".concat(t).concat(e):null,o.openmrsFetch),l=a.data,i=a.error;return{configurablePrograms:null!==(r=null==l?void 0:l.data)&&void 0!==r?r:[],isLoading:!l&&!i,error:i}}(e),h=E.configurablePrograms,y=E.isLoading,P=E.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},a?{isLoading:y,isError:P}:{isLoading:c,isError:s}),t=null!=(t={isValidating:p,activeEnrollments:g,availablePrograms:f,eligiblePrograms:b,configurablePrograms:h})?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}}}]);
|
|
@@ -244,9 +244,9 @@
|
|
|
244
244
|
"initial": false,
|
|
245
245
|
"entry": false,
|
|
246
246
|
"recorded": false,
|
|
247
|
-
"size":
|
|
247
|
+
"size": 20352,
|
|
248
248
|
"sizes": {
|
|
249
|
-
"javascript":
|
|
249
|
+
"javascript": 20352
|
|
250
250
|
},
|
|
251
251
|
"names": [],
|
|
252
252
|
"idHints": [],
|
|
@@ -258,7 +258,7 @@
|
|
|
258
258
|
"641.js"
|
|
259
259
|
],
|
|
260
260
|
"auxiliaryFiles": [],
|
|
261
|
-
"hash": "
|
|
261
|
+
"hash": "86ab534df8b1ae463fb3",
|
|
262
262
|
"childrenByOrder": {}
|
|
263
263
|
},
|
|
264
264
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openmrs/esm-patient-programs-app",
|
|
3
|
-
"version": "4.0.1-pre.
|
|
3
|
+
"version": "4.0.1-pre.243",
|
|
4
4
|
"license": "MPL-2.0",
|
|
5
5
|
"description": "Patient programs microfrontend for the OpenMRS SPA",
|
|
6
6
|
"browser": "dist/openmrs-esm-patient-programs-app.js",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"url": "https://github.com/openmrs/openmrs-esm-patient-chart/issues"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@carbon/react": "^1.
|
|
38
|
-
"@openmrs/esm-patient-common-lib": "^4.0.1-pre.
|
|
37
|
+
"@carbon/react": "^1.9.0",
|
|
38
|
+
"@openmrs/esm-patient-common-lib": "^4.0.1-pre.243",
|
|
39
39
|
"d3": "^7.0.3",
|
|
40
40
|
"lodash-es": "^4.17.15"
|
|
41
41
|
},
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"react-router-dom": "6.x",
|
|
49
49
|
"rxjs": "6.x"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "bb74ac0e3268ac77ed4826c721eeda14ccc3c731"
|
|
52
52
|
}
|
|
@@ -23,21 +23,24 @@ const ProgramActionButton: React.FC<ProgramActionButton> = ({ enrollment }) => {
|
|
|
23
23
|
if (enrollment.enrollmentStatus === 'eligible') {
|
|
24
24
|
return (
|
|
25
25
|
<Button
|
|
26
|
+
iconDescription="Enroll to program"
|
|
26
27
|
onClick={() => launchEnrollmentForm(t('enrollment', 'Enrollment'))}
|
|
27
28
|
renderIcon={(props) => <TaskAdd size={20} {...props} />}
|
|
28
29
|
kind="tertiary"
|
|
29
|
-
size="
|
|
30
|
+
size="sm"
|
|
30
31
|
>
|
|
31
32
|
{t('enroll', 'Enroll')}
|
|
32
33
|
</Button>
|
|
33
34
|
);
|
|
34
35
|
}
|
|
36
|
+
|
|
35
37
|
return (
|
|
36
38
|
<Button
|
|
39
|
+
iconDescription="Discontinue enrollment"
|
|
37
40
|
onClick={() => launchEnrollmentForm(t('discontinue', 'Discontinue'))}
|
|
38
41
|
renderIcon={(props) => <TaskAdd size={20} {...props} />}
|
|
39
42
|
kind="danger--ghost"
|
|
40
|
-
size="
|
|
43
|
+
size="sm"
|
|
41
44
|
>
|
|
42
45
|
{t('discontinue', 'Discontinue')}
|
|
43
46
|
</Button>
|