@openmrs/esm-patient-programs-app 4.0.1-pre.300 → 4.0.1-pre.311
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,4 +1,4 @@
|
|
|
1
|
-
[32m@openmrs/esm-patient-programs-app:build[0m: cache hit, replaying output [
|
|
1
|
+
[32m@openmrs/esm-patient-programs-app:build[0m: cache hit, replaying output [2m38a4026b50a94ccc[0m
|
|
2
2
|
[32m@openmrs/esm-patient-programs-app:build: [0massets by chunk 919 KiB (id hint: vendors)
|
|
3
3
|
[32m@openmrs/esm-patient-programs-app:build: [0m assets by status [1m[33m842 KiB[39m[22m [1m[33m[big][39m[22m
|
|
4
4
|
[32m@openmrs/esm-patient-programs-app:build: [0m asset [1m[33m734.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
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
[32m@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
9
|
[32m@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
10
|
[32m@openmrs/esm-patient-programs-app:build: [0m+ 12 assets
|
|
11
|
-
[32m@openmrs/esm-patient-programs-app:build: [0morphan modules 3.
|
|
11
|
+
[32m@openmrs/esm-patient-programs-app:build: [0morphan modules 3.87 MiB [1m[33m[orphan][39m[22m 738 modules
|
|
12
12
|
[32m@openmrs/esm-patient-programs-app:build: [0mruntime modules 40.1 KiB 28 modules
|
|
13
13
|
[32m@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
14
|
[32m@openmrs/esm-patient-programs-app:build: [0m modules by path [1m../../node_modules/[39m[22m 2.96 MiB 87 modules
|
|
15
|
-
[32m@openmrs/esm-patient-programs-app:build: [0m modules by path [1m./[39m[22m 52.
|
|
15
|
+
[32m@openmrs/esm-patient-programs-app:build: [0m modules by path [1m./[39m[22m 52.5 KiB 11 modules
|
|
16
16
|
[32m@openmrs/esm-patient-programs-app:build: [0m consume-shared-module modules 294 bytes
|
|
17
17
|
[32m@openmrs/esm-patient-programs-app:build: [0m modules by path [1mconsume shared module (default) @openmrs/[39m[22m 126 bytes 3 modules
|
|
18
18
|
[32m@openmrs/esm-patient-programs-app:build: [0m + 4 modules
|
|
@@ -30,4 +30,4 @@
|
|
|
30
30
|
[32m@openmrs/esm-patient-programs-app:build: [0m 858.js (407 KiB)
|
|
31
31
|
[32m@openmrs/esm-patient-programs-app:build: [0m 734.js (435 KiB)[39m[22m
|
|
32
32
|
[32m@openmrs/esm-patient-programs-app:build: [0m
|
|
33
|
-
[32m@openmrs/esm-patient-programs-app:build: [0mwebpack 5.74.0 compiled with [1m[33m1 warning[39m[22m in
|
|
33
|
+
[32m@openmrs/esm-patient-programs-app:build: [0mwebpack 5.74.0 compiled with [1m[33m1 warning[39m[22m in 70609 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),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},7641:(e,r,t)=>{t.r(r),t.d(r,{default:()=>Z});var n=t(268),a=t.n(n),o=t(4924),l=t(5573),i=t(7047),s=t(6759),c=t(6217),d=t(906),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){c.formEntrySub.next({formUuid:n,encounterUuid:""}),(0,c.launchPatientWorkspace)("patient-form-entry-workspace",{workspaceTitle:"".concat(null==r?void 0:r.display," ").concat(e," Form")})};return"eligible"===r.enrollmentStatus?a().createElement(i.zxk,{iconDescription:"Enroll to program",onClick:function(){return l(t("enrollment","Enrollment"))},renderIcon:function(e){return a().createElement(m.sQ,p({size:20},e))},kind:"tertiary",size:"sm"},t("enroll","Enroll")):a().createElement(i.zxk,{iconDescription:"Discontinue enrollment",onClick:function(){return l(t("discontinue","Discontinue"))},renderIcon:function(e){return a().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),h=t.n(b),E=t(6793),y=t.n(E),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=h(),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){e.basePath;var r,t,n=e.patientUuid,m=(0,o.useTranslation)().t,p=(0,d.useConfig)(),v=m("programs","Program enrollments"),f=m("carePrograms","Care Programs"),b=m("seeAll","See all"),h="${openmrsSpaBase}/patient/".concat(n,"/chart/Programs"),E=!!p.customUrl,y=(0,u.b$)(n),P=y.activeEnrollments,w=y.availablePrograms,O=y.configurablePrograms,k=y.eligiblePrograms,C=y.enrollments,_=y.isError,S=y.isLoading,j=y.isValidating,Z=(0,d.usePagination)(E?O:null!=C?C:[],5),L=Z.results,F=Z.goTo,z=Z.currentPage,x=a().useCallback((function(){return(0,c.launchPatientWorkspace)("programs-form-workspace")}),[]),A=[{key:"display",header:m("activePrograms","Active programs")},{key:"location",header:m("location","Location")},{key:"dateEnrolled",header:m("dateEnrolled","Date enrolled")},{key:"status",header:m("status","Status")},{key:"actions",header:m("actions","Actions")}],U=a().useMemo((function(){return null==L?void 0:L.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,d.formatDatetime)(new Date(e.dateEnrolled)):"--",status:E?(0,l.Z)(e.enrollmentStatus):e.dateCompleted?"".concat(m("completedOn","Completed On")," ").concat((0,d.formatDate)(new Date(e.dateCompleted))):m("active","Active"),actions:a().createElement(g,{enrollment:e})}}))}),[E,L,m]);return S?a().createElement(i.gqd,{role:"progressbar"}):_?a().createElement(c.ErrorState,{error:_,headerTitle:f}):(E?O.length:null==P?void 0:P.length)?a().createElement("div",{className:D.widgetCard},a().createElement(c.CardHeader,{title:f},a().createElement("span",null,j?a().createElement(i.lSo,null):null),a().createElement(i.zxk,{kind:"ghost",renderIcon:function(e){return a().createElement(s.mm,T({size:16},e))},iconDescription:"Add programs",onClick:x,disabled:(null==w?void 0:w.length)&&0===(null==k?void 0:k.length)},m("add","Add"))),(null==w?void 0:w.length)&&0===(null==k?void 0:k.length)&&a().createElement(i.K0D,{style:{minWidth:"100%",margin:"0rem",padding:"0rem"},kind:"info",lowContrast:!0,subtitle:m("noEligibleEnrollments","There are no more programs left to enroll this patient in"),title:m("fullyEnrolled","Enrolled in all programs")}),a().createElement(i.wQF,{rows:U,headers:A,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_,T({},s()),a().createElement(i.ssF,null,a().createElement(i.SCH,null,o.map((function(e){var t;return a().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)})))),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(c.PatientChartPagination,{currentItems:L.length,onPageNumberChange:function(e){var r=e.page;return F(r)},pageNumber:z,pageSize:5,totalItems:E?O.length:null==C?void 0:C.length,dashboardLinkUrl:h,dashboardLinkLabel:b})):a().createElement(c.EmptyState,{displayText:v,headerTitle:f,launchForm:x})}},4076:(e,r,t)=>{t.d(r,{Bw:()=>u,YX:()=>g,b$:()=>v,df:()=>p,o9:()=>d,oI:()=>m});var n=t(9857),a=t(906),o=t(4200),l=t(3863),i=t(8827),s=t(819);function c(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var d="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(d),a.openmrsFetch),l=t.data,i=t.error,s=t.isValidating,c=(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==c?void 0:c.filter((function(e){return!e.dateCompleted}));return{data:l?(0,o.Z)(c,(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),c=o.data,d=o.error,u=null!==(t=null==c||null===(r=c.data)||void 0===r?void 0:r.results)&&void 0!==t?t:null;return{data:u,isError:d,isLoading:!c&&!d,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,d=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){c(e,r,t[r])}))}return e}({enrollments:i},o?{isLoading:y,isError:P}:{isLoading:d,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}}}]);
|