@openmrs/esm-active-visits-app 3.0.0-pre.178 → 3.0.0-pre.196
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/dist/165.openmrs-esm-active-visits-app.js +1 -1
- package/dist/165.openmrs-esm-active-visits-app.js.map +1 -1
- package/dist/2.openmrs-esm-active-visits-app.js +2 -0
- package/dist/2.openmrs-esm-active-visits-app.js.map +1 -0
- package/dist/404.openmrs-esm-active-visits-app.js +3 -0
- package/dist/{799.openmrs-esm-active-visits-app.js.LICENSE.txt → 404.openmrs-esm-active-visits-app.js.LICENSE.txt} +0 -0
- package/dist/404.openmrs-esm-active-visits-app.js.map +1 -0
- package/dist/415.openmrs-esm-active-visits-app.js +1 -1
- package/dist/415.openmrs-esm-active-visits-app.js.map +1 -1
- package/dist/574.openmrs-esm-active-visits-app.js +1 -1
- package/dist/openmrs-esm-active-visits-app.js +1 -1
- package/dist/openmrs-esm-active-visits-app.js.buildmanifest.json +54 -54
- package/dist/openmrs-esm-active-visits-app.js.map +1 -1
- package/package.json +2 -2
- package/src/active-visits-widget/active-visits.component.tsx +137 -133
- package/src/active-visits-widget/active-visits.resource.tsx +34 -10
- package/src/active-visits-widget/active-visits.scss +7 -0
- package/src/visits-summary/visit-detail.component.tsx +42 -46
- package/src/visits-summary/visit.resource.ts +14 -5
- package/translations/en.json +2 -1
- package/dist/288.openmrs-esm-active-visits-app.js +0 -2
- package/dist/288.openmrs-esm-active-visits-app.js.map +0 -1
- package/dist/799.openmrs-esm-active-visits-app.js +0 -3
- package/dist/799.openmrs-esm-active-visits-app.js.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_openmrs_esm_active_visits_app=self.webpackChunk_openmrs_esm_active_visits_app||[]).push([[165],{2165:(e,n,t)=>{t.r(n),t.d(n,{default:()=>B});var i=t(5954),a=t(8074),s=t(160),o=t(9034),r=t(5746),l=t(364),p=t(7500),c=t(8804),d=t(8117),u=t(1358),g=t(2427),h=t(318),f=t(3783),b=t(8580),v=t(9288),m=t(8234),y=t(1489),_=t(4281),$=t(6062),A=t.n($),w=t(8663);A()(w.Z,{insert:"head",singleton:!1});const x=w.Z.locals||{};var k=t(9688);function C(){return C=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},C.apply(this,arguments)}function z(e){const n=(0,k.default)();return(0,k.default)(e).get("date")===n.get("date")&&(0,k.default)(e).get("month")===n.get("month")&&(0,k.default)(e).get("year")===n.get("year")?`Today - ${(0,k.default)(e).format("HH:mm")}`:(0,k.default)(e).format("DD MMM 'YY - HH:mm")}const B=()=>{var e,n,t,$;const{t:A}=(0,_.useTranslation)(),w="desktop"===(0,y.useLayoutType)(),k=(0,y.useConfig)(),[B,E]=(0,i.useState)(null!==(e=null==k||null===(n=k.activeVisits)||void 0===n?void 0:n.pageSize)&&void 0!==e?e:10),L=null!==(t=null==k||null===($=k.activeVisits)||void 0===$?void 0:$.pageSizes)&&void 0!==t?t:[10,20,50],[M,V]=(0,i.useState)(!0),[T,S]=(0,i.useState)([]),[q,D]=(0,i.useState)(""),F=(0,i.useMemo)((()=>[{id:0,header:A("visitStartTime","Visit Time"),key:"visitStartTime"},{id:1,header:A("IDNumber","ID Number"),key:"IDNumber"},{id:2,header:A("name","Name"),key:"name"},{id:3,header:A("gender","Gender"),key:"gender"},{id:4,header:A("age","Age"),key:"age"},{id:5,header:A("visitType","Visit Type"),key:"visitType"}]),[A]);(0,i.useEffect)((()=>{const e=new AbortController;return function(e){return(0,y.openmrsFetch)("/ws/rest/v1/visit?includeInactive=false&v=custom:(uuid,patient:(uuid,identifiers:(identifier,uuid),person:(age,display,gender,uuid)),visitType:(uuid,name,display),location:(uuid,name,display),startDatetime,stopDatetime)",{signal:e.signal})}(e).then((({data:e})=>{const n=e.results.map(((e,n)=>{var t,i,a,s,o,r,l,p,c,d;return{id:`${n}`,visitStartTime:z(e.startDatetime),IDNumber:null==e||null===(t=e.patient)||void 0===t||null===(i=t.identifiers[0])||void 0===i?void 0:i.identifier,name:null==e||null===(a=e.patient)||void 0===a||null===(s=a.person)||void 0===s?void 0:s.display,gender:null==e||null===(o=e.patient)||void 0===o||null===(r=o.person)||void 0===r?void 0:r.gender,age:null==e||null===(l=e.patient)||void 0===l||null===(p=l.person)||void 0===p?void 0:p.age,visitType:null==e||null===(c=e.visitType)||void 0===c?void 0:c.display,patientUuid:null==e||null===(d=e.patient)||void 0===d?void 0:d.uuid,visitUuid:null==e?void 0:e.uuid}}));S(n),V(!1)})),()=>e.abort()}),[]);const H=(0,i.useMemo)((()=>{if(q&&""!==q.trim()){const e=q.toLowerCase();return T.filter((n=>Object.keys(n).some((t=>"patientUuid"!==t&&`${n[t]}`.toLowerCase().includes(e)))))}return T}),[q,T]),{goTo:Z,results:I,currentPage:N}=(0,y.usePagination)(H,B),G=(0,i.useCallback)((e=>D(e.target.value)),[]);return(0,i.useEffect)((()=>{1!==N&&Z(1)}),[q]),M?i.default.createElement(b.Z,null):i.default.createElement("div",{className:x.activeVisitsContainer},i.default.createElement("div",{className:x.activeVisitsDetailHeaderContainer},i.default.createElement("h4",{className:x.productiveHeading02},A("activeVisits","Active Visits"))),i.default.createElement(a.ZP,{rows:I,headers:F,isSortable:!0},(({rows:e,headers:n,getHeaderProps:t,getTableProps:a,getBatchActionProps:b,getRowProps:_})=>i.default.createElement(s.Z,{title:"",className:x.tableContainer},i.default.createElement(o.Z,null,i.default.createElement(r.Z,null,i.default.createElement(m.Z,{tabIndex:b().shouldShowBatchActions?-1:0,labelText:"",placeholder:"Filter table",onChange:G}))),i.default.createElement(l.Z,C({className:x.activeVisitsTable},a(),{size:w?"short":"normal"}),i.default.createElement(p.Z,null,i.default.createElement(c.Z,null,i.default.createElement(d.Z,null),n.map((e=>i.default.createElement(u.Z,t({header:e}),e.header))))),i.default.createElement(g.Z,null,e.map(((e,t)=>{var a,s;return i.default.createElement(i.default.Fragment,{key:e.id},i.default.createElement(h.Z,_({row:e}),e.cells.map((e=>{var n;return i.default.createElement(f.Z,{key:e.id},"name"===e.info.header?i.default.createElement(y.ConfigurableLink,{to:`\${openmrsSpaBase}/patient/${null===(n=I[t])||void 0===n?void 0:n.patientUuid}/chart/`},e.value):e.value)}))),e.isExpanded&&i.default.createElement(c.Z,{className:x.expandedActiveVisitRow,colSpan:n.length+1},i.default.createElement("th",{colSpan:n.length+2},i.default.createElement(y.ExtensionSlot,{className:x.visitSummaryContainer,extensionSlotName:"visit-summary-slot",state:{visitUuid:null===(a=I[t])||void 0===a?void 0:a.visitUuid,patientUuid:null===(s=I[t])||void 0===s?void 0:s.patientUuid}}))))})))),0===e.length&&i.default.createElement("p",{style:{height:w?"2rem":"3rem",marginLeft:w?"2rem":"3rem"},className:`${x.emptyRow} ${x.bodyLong01}`},A("noVisitsFound","No visits found")),i.default.createElement(v.Z,{forwardText:"",backwardText:"",page:N,pageSize:B,pageSizes:L,totalItems:H.length,className:x.pagination,onChange:({pageSize:e,page:n})=>{e!==B&&E(e),n!==N&&Z(n)}})))))}},8663:(e,n,t)=>{t.d(n,{Z:()=>r});var i=t(1799),a=t.n(i),s=t(2609),o=t.n(s)()(a());o.push([e.id,'.-esm-active-visits__active-visits__productiveHeading01___2CsYf{font-size:.875rem;font-weight:600;line-height:1.29;letter-spacing:.16px}.-esm-active-visits__active-visits__productiveHeading02___yB975{font-size:1rem;font-weight:600;line-height:1.375;letter-spacing:0}.-esm-active-visits__active-visits__bodyLong01___O-yvQ{font-size:.875rem;font-weight:400;line-height:1.43;letter-spacing:.16px}.-esm-active-visits__active-visits__caption01___37OuL{font-size:.75rem;font-weight:400;line-height:1.34;letter-spacing:.32px}.-esm-active-visits__active-visits__bodyShort02___nN5Zb{font-size:1rem;font-weight:400;line-height:1.375;letter-spacing:0}.-esm-active-visits__active-visits__text02___3xPzV{color:#525252}.-esm-active-visits__active-visits__text01___3oxuO{color:#161616}.-esm-active-visits__active-visits__activeVisitsContainer___3gA5F{background-color:#fff;border:1px solid #e0e0e0;width:100%;margin:0 auto;max-width:95vw}.-esm-active-visits__active-visits__activeVisitsDetailHeaderContainer___2jM1J{display:flex;justify-content:space-between;align-items:center;padding:.75rem 0 .75rem 1rem;background-color:#fff}.-esm-active-visits__active-visits__productiveHeading02___yB975::after{content:"";display:block;width:2rem;padding-top:.188rem;border-bottom:.375rem solid #007d79}.-esm-active-visits__active-visits__tableContainer___Bejp1 section{position:relative}.-esm-active-visits__active-visits__tableContainer___Bejp1 a{text-decoration:none}.-esm-active-visits__active-visits__pagination___1FV6l{overflow:hidden}.-esm-active-visits__active-visits__emptyRow___3dAQe{padding:0 1rem;display:flex;align-items:center}.-esm-active-visits__active-visits__activeVisitsTable___2YVfA tr[data-parent-row]:nth-child(odd) td{background-color:#fff}.-esm-active-visits__active-visits__activeVisitsTable___2YVfA tbody tr[data-parent-row]:nth-child(even) td{background-color:#f4f4f4}.-esm-active-visits__active-visits__visitSummaryContainer___24Znz{width:100%;max-width:768px;margin:1rem auto}.-esm-active-visits__active-visits__expandedActiveVisitRow___1grsY>td>div{max-height:max-content !important}.-esm-active-visits__active-visits__expandedActiveVisitRow___1grsY td{padding:0 2rem}.-esm-active-visits__active-visits__expandedActiveVisitRow___1grsY th[colspan] td[colspan]>div:first-child{padding:0 1rem}',"",{version:3,sources:["webpack://./src/root.scss","webpack://./../../node_modules/carbon-components/scss/globals/scss/vendor/@carbon/elements/scss/type/_styles.scss","webpack://./src/active-visits-widget/active-visits.scss","webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss"],names:[],mappings:"AAGA,gEC4gBI,iBAqLsB,CArLtB,eAqLsB,CArLtB,gBAqLsB,CArLtB,oBAqLsB,CD7rB1B,gECwgBI,cAqLsB,CArLtB,eAqLsB,CArLtB,iBAqLsB,CArLtB,gBAqLsB,CDzrB1B,uDCogBI,iBAqLsB,CArLtB,eAqLsB,CArLtB,gBAqLsB,CArLtB,oBAqLsB,CDrrB1B,sDCggBI,gBAqLsB,CArLtB,eAqLsB,CArLtB,gBAqLsB,CArLtB,oBAqLsB,CDjrB1B,wDC4fI,cAqLsB,CArLtB,eAqLsB,CArLtB,iBAqLsB,CArLtB,gBAqLsB,CD7qB1B,mDACE,aAAA,CAGF,mDACE,aAAA,CE1BF,kEACE,qBCIc,CDHd,wBAAA,CACA,UAAA,CACA,aAAA,CACA,cAAA,CAGF,8EACE,YAAA,CACA,6BAAA,CACA,kBAAA,CACA,4BAAA,CACA,qBCRc,CDWhB,uEACE,UAAA,CACA,aAAA,CACA,UAAA,CACA,mBAAA,CACA,mCAAA,CAGF,mEACE,iBAAA,CAGF,6DACE,oBAAA,CAGF,uDACE,eAAA,CAGF,qDACE,cAAA,CACA,YAAA,CACA,kBAAA,CAGF,oGACE,qBAAA,CAGF,2GACE,wBAAA,CAGF,kEACE,UAAA,CACA,eAAA,CACA,gBAAA,CAGF,0EACE,iCAAA,CAGF,sEACE,cAAA,CAGF,2GACE,cAAA",sourcesContent:['@import "carbon-components/scss/globals/scss/typography.scss";\n@import "~@openmrs/esm-styleguide/src/vars";\n\n.productiveHeading01 {\n @include carbon--type-style("productive-heading-01");\n}\n\n.productiveHeading02 {\n @include carbon--type-style("productive-heading-02");\n}\n\n.bodyLong01 {\n @include carbon--type-style("body-long-01");\n}\n\n.caption01 {\n @include carbon--type-style("caption-01");\n}\n\n.bodyShort02 {\n @include carbon--type-style("body-short-02");\n}\n\n.text02 {\n color: #525252;\n}\n\n.text01 {\n color: #161616;\n}',"//\n// Copyright IBM Corp. 2018, 2018\n//\n// This source code is licensed under the Apache-2.0 license found in the\n// LICENSE file in the root directory of this source tree.\n//\n\n@import '../layout/breakpoint';\n@import 'font-family';\n@import 'scale';\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$caption-01: (\n font-size: carbon--type-scale(1),\n font-weight: carbon--font-weight('regular'),\n line-height: 1.34,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$label-01: (\n font-size: carbon--type-scale(1),\n font-weight: carbon--font-weight('regular'),\n line-height: 1.34,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$helper-text-01: (\n font-size: carbon--type-scale(1),\n line-height: 1.34,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-short-01: (\n font-size: carbon--type-scale(2),\n font-weight: carbon--font-weight('regular'),\n line-height: 1.29,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-long-01: (\n font-size: carbon--type-scale(2),\n font-weight: carbon--font-weight('regular'),\n line-height: 1.43,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-short-02: (\n font-size: carbon--type-scale(3),\n font-weight: carbon--font-weight('regular'),\n line-height: 1.375,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-long-02: (\n font-size: carbon--type-scale(3),\n font-weight: carbon--font-weight('regular'),\n line-height: 1.5,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$code-01: (\n font-family: carbon--font-family('mono'),\n font-size: carbon--type-scale(1),\n font-weight: carbon--font-weight('regular'),\n line-height: 1.34,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$code-02: (\n font-family: carbon--font-family('mono'),\n font-size: carbon--type-scale(2),\n font-weight: carbon--font-weight('regular'),\n line-height: 1.43,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-01: (\n font-size: carbon--type-scale(2),\n font-weight: carbon--font-weight('semibold'),\n line-height: 1.29,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-01: $heading-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-02: (\n font-size: carbon--type-scale(3),\n font-weight: carbon--font-weight('semibold'),\n line-height: 1.375,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-02: $heading-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-03: (\n font-size: carbon--type-scale(5),\n font-weight: carbon--font-weight('regular'),\n line-height: 1.4,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-04: (\n font-size: carbon--type-scale(7),\n font-weight: carbon--font-weight('regular'),\n line-height: 1.29,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-05: (\n font-size: carbon--type-scale(8),\n font-weight: carbon--font-weight('regular'),\n line-height: 1.25,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-06: (\n font-size: carbon--type-scale(8),\n font-weight: carbon--font-weight('light'),\n // Extra digit needed for precision in Chrome\n line-height: 1.199,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-07: (\n font-size: carbon--type-scale(10),\n font-weight: carbon--font-weight('light'),\n line-height: 1.19,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-01: map-merge(\n $heading-01,\n (\n line-height: 1.25,\n )\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-02: map-merge(\n $heading-02,\n (\n line-height: 1.5,\n )\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-03: (\n font-size: carbon--type-scale(5),\n font-weight: carbon--font-weight('regular'),\n line-height: 1.4,\n letter-spacing: 0,\n breakpoints: (\n xlg: (\n font-size: carbon--type-scale(5),\n line-height: 1.25,\n ),\n max: (\n font-size: carbon--type-scale(6),\n line-height: 1.334,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-04: (\n font-size: carbon--type-scale(7),\n font-weight: carbon--font-weight('regular'),\n line-height: 1.29,\n letter-spacing: 0,\n breakpoints: (\n xlg: (\n font-size: carbon--type-scale(7),\n line-height: 1.25,\n ),\n max: (\n font-size: carbon--type-scale(8),\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-05: (\n font-size: carbon--type-scale(8),\n font-weight: carbon--font-weight('regular'),\n line-height: 1.25,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: carbon--type-scale(9),\n font-weight: carbon--font-weight('light'),\n line-height: 1.22,\n ),\n lg: (\n font-size: carbon--type-scale(10),\n line-height: 1.19,\n ),\n xlg: (\n font-size: carbon--type-scale(11),\n line-height: 1.17,\n ),\n max: (\n font-size: carbon--type-scale(13),\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-06: (\n font-size: carbon--type-scale(8),\n font-weight: carbon--font-weight('semibold'),\n line-height: 1.25,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: carbon--type-scale(9),\n line-height: 1.22,\n ),\n lg: (\n font-size: carbon--type-scale(10),\n line-height: 1.19,\n ),\n xlg: (\n font-size: carbon--type-scale(11),\n line-height: 1.17,\n ),\n max: (\n font-size: carbon--type-scale(13),\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-paragraph-01: (\n font-size: carbon--type-scale(6),\n font-weight: carbon--font-weight('light'),\n line-height: 1.334,\n letter-spacing: 0,\n breakpoints: (\n lg: (\n font-size: carbon--type-scale(7),\n line-height: 1.29,\n ),\n max: (\n font-size: carbon--type-scale(8),\n line-height: 1.25,\n ),\n ),\n);\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$quotation-01: (\n font-size: carbon--type-scale(5),\n font-weight: carbon--font-weight('regular'),\n line-height: 1.3,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: carbon--type-scale(5),\n ),\n lg: (\n font-size: carbon--type-scale(6),\n line-height: 1.334,\n ),\n xlg: (\n font-size: carbon--type-scale(7),\n line-height: 1.29,\n ),\n max: (\n font-size: carbon--type-scale(8),\n line-height: 1.25,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$quotation-02: (\n font-size: carbon--type-scale(8),\n font-weight: carbon--font-weight('light'),\n line-height: 1.25,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: carbon--type-scale(9),\n line-height: 1.22,\n ),\n lg: (\n font-size: carbon--type-scale(10),\n line-height: 1.19,\n ),\n xlg: (\n font-size: carbon--type-scale(11),\n line-height: 1.17,\n ),\n max: (\n font-size: carbon--type-scale(13),\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$display-01: (\n font-size: carbon--type-scale(10),\n font-weight: carbon--font-weight('light'),\n line-height: 1.19,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: carbon--type-scale(10),\n ),\n lg: (\n font-size: carbon--type-scale(12),\n ),\n xlg: (\n font-size: carbon--type-scale(13),\n line-height: 1.17,\n ),\n max: (\n font-size: carbon--type-scale(15),\n line-height: 1.13,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$display-02: (\n font-size: carbon--type-scale(10),\n font-weight: carbon--font-weight('semibold'),\n line-height: 1.19,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: carbon--type-scale(10),\n ),\n lg: (\n font-size: carbon--type-scale(12),\n ),\n xlg: (\n font-size: carbon--type-scale(13),\n line-height: 1.16,\n ),\n max: (\n font-size: carbon--type-scale(15),\n line-height: 1.13,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$display-03: (\n font-size: carbon--type-scale(10),\n font-weight: carbon--font-weight('light'),\n line-height: 1.19,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: carbon--type-scale(14),\n line-height: 1.15,\n ),\n lg: (\n font-size: carbon--type-scale(17),\n line-height: 1.11,\n letter-spacing: -0.64px,\n ),\n xlg: (\n font-size: carbon--type-scale(20),\n line-height: 1.07,\n letter-spacing: -0.64px,\n ),\n max: (\n font-size: carbon--type-scale(23),\n line-height: 1.05,\n letter-spacing: -0.96px,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$display-04: (\n font-size: carbon--type-scale(10),\n font-weight: carbon--font-weight('semibold'),\n line-height: 1.19,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: carbon--type-scale(14),\n line-height: 1.15,\n ),\n lg: (\n font-size: carbon--type-scale(17),\n line-height: 1.11,\n letter-spacing: -0.64px,\n ),\n xlg: (\n font-size: carbon--type-scale(20),\n line-height: 1.07,\n letter-spacing: -0.64px,\n ),\n max: (\n font-size: carbon--type-scale(23),\n line-height: 1.05,\n letter-spacing: -0.96px,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$tokens: (\n caption-01: $caption-01,\n label-01: $label-01,\n helper-text-01: $helper-text-01,\n body-short-01: $body-short-01,\n body-short-02: $body-short-02,\n body-long-01: $body-long-01,\n body-long-02: $body-long-02,\n code-01: $code-01,\n code-02: $code-02,\n heading-01: $heading-01,\n heading-02: $heading-02,\n productive-heading-01: $productive-heading-01,\n productive-heading-02: $productive-heading-02,\n productive-heading-03: $productive-heading-03,\n productive-heading-04: $productive-heading-04,\n productive-heading-05: $productive-heading-05,\n productive-heading-06: $productive-heading-06,\n productive-heading-07: $productive-heading-07,\n expressive-paragraph-01: $expressive-paragraph-01,\n expressive-heading-01: $expressive-heading-01,\n expressive-heading-02: $expressive-heading-02,\n expressive-heading-03: $expressive-heading-03,\n expressive-heading-04: $expressive-heading-04,\n expressive-heading-05: $expressive-heading-05,\n expressive-heading-06: $expressive-heading-06,\n quotation-01: $quotation-01,\n quotation-02: $quotation-02,\n display-01: $display-01,\n display-02: $display-02,\n display-03: $display-03,\n display-04: $display-04,\n);\n\n/// @param {Map} $map\n/// @access public\n/// @group @carbon/type\n@mixin properties($map) {\n @each $name, $value in $map {\n #{$name}: $value;\n }\n}\n\n/// @param {Number} $value - Number with units\n/// @return {Number} Without units\n/// @access public\n/// @group @carbon/type\n@function strip-unit($value) {\n @return $value / ($value * 0 + 1);\n}\n\n/// This helper includes fluid type styles for the given token value. Fluid type\n/// means that the `font-size` is computed using `calc()` in order to be\n/// determined by the screen size instead of a breakpoint. As a result, fluid\n/// styles should be used with caution in fixed width contexts.\n///\n/// In addition, we make use of %-based line-heights so that the line-height of\n/// each type style is computed correctly due to the dynamic nature of the\n/// `font-size`.\n///\n/// Most of the logic for this work comes from CSS Tricks:\n/// https://css-tricks.com/snippets/css/fluid-typography/\n///\n/// @param {Map} $type-styles - The value of a given type token\n/// @param {Map} $breakpoints [$carbon--grid-breakpoints] - Custom breakpoints to use\n/// @access public\n/// @group @carbon/type\n@mixin fluid-type($type-styles, $breakpoints: $carbon--grid-breakpoints) {\n // Include the initial styles for the given token by default without any\n // media query guard. This includes `font-size` as a fallback in the case\n // that a browser does not support `calc()`\n @include properties(map-remove($type-styles, breakpoints));\n // We also need to include the `sm` styles by default since they don't\n // appear in the fluid styles for tokens\n @include fluid-type-size($type-styles, sm, $breakpoints);\n\n // Finally, we need to go through all the breakpoints defined in the type\n // token and apply the properties and fluid type size for that given\n // breakpoint\n @each $name, $values in map-get($type-styles, breakpoints) {\n @include carbon--breakpoint($name) {\n @include properties($values);\n @include fluid-type-size($type-styles, $name, $breakpoints);\n }\n }\n}\n\n/// Computes the fluid `font-size` for a given type style and breakpoint\n/// @param {Map} $type-styles - The styles for a given token\n/// @param {String} $name - The name of the breakpoint to which we apply the fluid\n/// @param {Map} $breakpoints [$carbon--grid-breakpoints] - The breakpoints for the grid system\n/// @access public\n/// @group @carbon/type\n@mixin fluid-type-size(\n $type-styles,\n $name,\n $breakpoints: $carbon--grid-breakpoints\n) {\n // Get the information about the breakpoint we're currently working in. Useful\n // for getting initial width information\n $breakpoint: map-get($breakpoints, $name);\n\n // Our fluid styles are captured under the 'breakpoints' property in our type\n // styles map. These define what values to treat as `max-` variables below\n $fluid-sizes: map-get($type-styles, breakpoints);\n $fluid-breakpoint: ();\n // Special case for `sm` because the styles for small are on the type style\n // directly\n @if $name == sm {\n $fluid-breakpoint: map-remove($type-styles, breakpoints);\n } @else {\n $fluid-breakpoint: map-get($fluid-sizes, $name);\n }\n\n // Initialize our font-sizes to the default size for the type style\n $max-font-size: map-get($type-styles, font-size);\n $min-font-size: map-get($type-styles, font-size);\n @if map-has-key($fluid-breakpoint, font-size) {\n $min-font-size: map-get($fluid-breakpoint, font-size);\n }\n\n // Initialize our min and max width to the width of the current breakpoint\n $max-vw: map-get($breakpoint, width);\n $min-vw: map-get($breakpoint, width);\n\n // We can use `breakpoint-next` to see if there is another breakpoint we can\n // use to update `max-font-size` and `max-vw` with larger values\n $next-breakpoint-available: carbon--breakpoint-next($name, $breakpoints);\n $next-fluid-breakpoint-name: null;\n\n // We need to figure out what the next available fluid breakpoint is for our\n // given $type-styles. In this loop we try and iterate through breakpoints\n // until we either manually set $next-breakpoint-available to null or\n // `breakpoint-next` returns null.\n @while $next-breakpoint-available {\n @if map-has-key($fluid-sizes, $next-breakpoint-available) {\n $next-fluid-breakpoint-name: $next-breakpoint-available;\n $next-breakpoint-available: null;\n } @else {\n $next-breakpoint-available: carbon--breakpoint-next(\n $next-breakpoint-available,\n $breakpoints\n );\n }\n }\n\n // If we have found the next available fluid breakpoint name, then we know\n // that we have values that we can use to set max-font-size and max-vw as both\n // values derive from the next breakpoint\n @if $next-fluid-breakpoint-name {\n $next-fluid-breakpoint: map-get($breakpoints, $next-fluid-breakpoint-name);\n $max-font-size: map-get(\n map-get($fluid-sizes, $next-fluid-breakpoint-name),\n font-size\n );\n $max-vw: map-get($next-fluid-breakpoint, width);\n\n // prettier-ignore\n font-size: calc(#{$min-font-size} +\n #{strip-unit($max-font-size - $min-font-size)} *\n ((100vw - #{$min-vw}) / #{strip-unit($max-vw - $min-vw)})\n );\n } @else {\n // Otherwise, just default to setting the font size found from the type\n // style or the given fluid breakpoint in the type style\n font-size: $min-font-size;\n }\n}\n\n// TODO move following variable and `custom-property` mixin into shared file for\n// both `@carbon/type` and `@carbon/themes`\n\n/// @access private\n/// @group @carbon/type\n$custom-property-prefix: 'cds' !default;\n\n/// @access private\n/// @group @carbon/type\n@mixin custom-properties($name, $value) {\n @each $property, $value in $value {\n #{$property}: var(\n --#{$custom-property-prefix}-#{$name}-#{$property},\n #{$value}\n );\n }\n}\n\n/// Helper mixin to include the styles for a given token in any selector in your\n/// project. Also includes an optional fluid option that will enable fluid\n/// styles for the token if they are defined. Fluid styles will cause the\n/// token's font-size to be computed based on the viewport size. As a result, use\n/// with caution in fixed contexts.\n/// @param {String} $name - The name of the token to get the styles for\n/// @param {Boolean} $fluid [false] - Specify whether to include fluid styles for the\n/// @param {Map} $breakpoints [$carbon--grid-breakpoints] - Provide a custom breakpoint map to use\n/// @access public\n/// @group @carbon/type\n@mixin carbon--type-style(\n $name,\n $fluid: false,\n $breakpoints: $carbon--grid-breakpoints\n) {\n @if not map-has-key($tokens, $name) {\n @error 'Unable to find a token with the name: `#{$name}`';\n }\n\n $token: map-get($tokens, $name);\n\n // If $fluid is set to true and the token has breakpoints defined for fluid\n // styles, delegate to the fluid-type helper for the given token\n @if $fluid == true and map-has-key($token, 'breakpoints') {\n @include fluid-type($token, $breakpoints);\n } @else {\n @if global-variable-exists('feature-flags') and\n map-get($feature-flags, 'enable-css-custom-properties')\n {\n @include custom-properties($name, $token);\n } @else {\n // Otherwise, we just include all the property declarations directly on the\n // selector\n @include properties(map-remove($token, 'breakpoints'));\n }\n }\n}\n",'@import "../root.scss";\n\n.activeVisitsContainer {\n background-color: $ui-background;\n border: 1px solid #e0e0e0;\n width: 100%;\n margin: 0 auto;\n max-width: 95vw;\n}\n\n.activeVisitsDetailHeaderContainer {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: $spacing-04 0 $spacing-04 $spacing-05;\n background-color: $ui-background;\n}\n\n.productiveHeading02::after {\n content: "";\n display: block;\n width: 2rem;\n padding-top: 0.188rem;\n border-bottom: 0.375rem solid #007d79;\n}\n\n.tableContainer section{\n position: relative;\n}\n\n.tableContainer a {\n text-decoration: none;\n}\n\n.pagination {\n overflow: hidden;\n}\n\n.emptyRow {\n padding: 0 1rem;\n display: flex;\n align-items: center;\n}\n\n.activeVisitsTable tr[data-parent-row]:nth-child(odd) td {\n background-color: #ffffff;\n}\n\n.activeVisitsTable tbody tr[data-parent-row]:nth-child(even) td {\n background-color: #f4f4f4;\n}\n\n.visitSummaryContainer {\n width: 100%;\n max-width: 768px;\n margin: 1rem auto;\n}\n\n.expandedActiveVisitRow > td > div {\n max-height: max-content !important;\n}\n\n.expandedActiveVisitRow td {\n padding: 0 2rem;\n}\n\n.expandedActiveVisitRow th[colspan] td[colspan] > div:first-child {\n padding: 0 1rem;\n}\n\n',"$ui-01: #f4f4f4;\n$ui-02: #ffffff;\n$ui-03: #e0e0e0;\n$ui-04: #8d8d8d;\n$ui-05: #161616;\n$text-02: #525252;\n$text-03: #a8a8a8;\n$ui-background: #ffffff;\n$color-gray-30: #c6c6c6;\n$color-gray-70: #525252;\n$color-gray-100: #161616;\n$color-blue-60-2: #0f62fe;\n$color-yellow-50: #feecae;\n$carbon--red-50: #fa4d56;\n$inverse-link: #78a9ff;\n$support-02: #24a148;\n$inverse-support-03: #f1c21b;\n$warning-background: #fff8e1;\n$openmrs-background-grey: #f4f4f4;\n$danger: #da1e28;\n$interactive-01: #0f62fe;\n$brand-teal-01: #007d79;\n$brand-01: #005d5d;\n$brand-02: #004144;\n$field-01: #f4f4f4;\n$grey-2: #e0e0e0;\n$labeldropdown: #c6c6c6;\n\n$breakpoint-phone-min: 0px;\n$breakpoint-phone-max: 600px;\n$breakpoint-tablet-min: 601px;\n$breakpoint-tablet-max: 1200px;\n$breakpoint-desktop-min: 1201px;\n$breakpoint-desktop-max: 99999999px;\n"],sourceRoot:""}]),o.locals={productiveHeading01:"-esm-active-visits__active-visits__productiveHeading01___2CsYf",productiveHeading02:"-esm-active-visits__active-visits__productiveHeading02___yB975",bodyLong01:"-esm-active-visits__active-visits__bodyLong01___O-yvQ",caption01:"-esm-active-visits__active-visits__caption01___37OuL",bodyShort02:"-esm-active-visits__active-visits__bodyShort02___nN5Zb",text02:"-esm-active-visits__active-visits__text02___3xPzV",text01:"-esm-active-visits__active-visits__text01___3oxuO",activeVisitsContainer:"-esm-active-visits__active-visits__activeVisitsContainer___3gA5F",activeVisitsDetailHeaderContainer:"-esm-active-visits__active-visits__activeVisitsDetailHeaderContainer___2jM1J",tableContainer:"-esm-active-visits__active-visits__tableContainer___Bejp1",pagination:"-esm-active-visits__active-visits__pagination___1FV6l",emptyRow:"-esm-active-visits__active-visits__emptyRow___3dAQe",activeVisitsTable:"-esm-active-visits__active-visits__activeVisitsTable___2YVfA",visitSummaryContainer:"-esm-active-visits__active-visits__visitSummaryContainer___24Znz",expandedActiveVisitRow:"-esm-active-visits__active-visits__expandedActiveVisitRow___1grsY"};const r=o}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_openmrs_esm_active_visits_app=self.webpackChunk_openmrs_esm_active_visits_app||[]).push([[165],{2165:(e,n,t)=>{t.r(n),t.d(n,{default:()=>L});var i=t(5954),a=t(1954),s=t(160),o=t(9034),r=t(5746),l=t(364),c=t(7500),p=t(8804),d=t(8117),u=t(7004),g=t(2427),h=t(318),f=t(3783),b=t(8580),v=t(1868),m=t(5092),y=t(9004),_=t(1489),$=t(4281),A=t(5145),x=t(6062),k=t.n(x),w=t(8663);k()(w.Z,{insert:"head",singleton:!1});const C=w.Z.locals||{};var z=t(9688);function B(){return B=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},B.apply(this,arguments)}function E(e){const n=(0,z.default)();return(0,z.default)(e).get("date")===n.get("date")&&(0,z.default)(e).get("month")===n.get("month")&&(0,z.default)(e).get("year")===n.get("year")?`Today - ${(0,z.default)(e).format("HH:mm")}`:(0,z.default)(e).format("DD MMM 'YY - HH:mm")}const L=()=>{var e,n;const{t}=(0,$.useTranslation)(),x=(0,_.useConfig)(),k=(0,_.useLayoutType)(),{data:w,isError:z,isLoading:L,isValidating:M}=function(){var e;const{data:n,error:t,isValidating:i}=(0,A.ZP)("/ws/rest/v1/visit?includeInactive=false&v=custom:(uuid,patient:(uuid,identifiers:(identifier,uuid),person:(age,display,gender,uuid)),visitType:(uuid,name,display),location:(uuid,name,display),startDatetime,stopDatetime)",_.openmrsFetch);return{data:null!=n&&null!==(e=n.data)&&void 0!==e&&e.results.length?n.data.results.map((e=>{var n,t,i,a,s,o,r,l,c,p;return{age:null==e||null===(n=e.patient)||void 0===n||null===(t=n.person)||void 0===t?void 0:t.age,id:e.uuid,idNumber:null==e||null===(i=e.patient)||void 0===i||null===(a=i.identifiers[0])||void 0===a?void 0:a.identifier,gender:null==e||null===(s=e.patient)||void 0===s||null===(o=s.person)||void 0===o?void 0:o.gender,name:null==e||null===(r=e.patient)||void 0===r||null===(l=r.person)||void 0===l?void 0:l.display,patientUuid:null==e||null===(c=e.patient)||void 0===c?void 0:c.uuid,visitStartTime:e.startDate,visitType:null==e||null===(p=e.visitType)||void 0===p?void 0:p.display,visitUuid:e.uuid}})):[],isLoading:!n&&!t,isError:t,isValidating:i}}(),V="desktop"===k,T=(null==x||null===(e=x.activeVisits)||void 0===e?void 0:e.pageSizes)??[10,20,50],[D,S]=(0,i.useState)((null==x||null===(n=x.activeVisits)||void 0===n?void 0:n.pageSize)??10),[q,F]=(0,i.useState)(""),Z=(0,i.useMemo)((()=>[{id:0,header:t("visitStartTime","Visit Time"),key:"visitStartTime"},{id:1,header:t("idNumber","ID Number"),key:"idNumber"},{id:2,header:t("name","Name"),key:"name"},{id:3,header:t("gender","Gender"),key:"gender"},{id:4,header:t("age","Age"),key:"age"},{id:5,header:t("visitType","Visit Type"),key:"visitType"}]),[t]),I=w.map((e=>({...e,visitStartTime:E(e.visitStartTime)}))),N=(0,i.useMemo)((()=>{if(q&&""!==q.trim()){const e=q.toLowerCase();return I.filter((n=>Object.keys(n).some((t=>"patientUuid"!==t&&`${n[t]}`.toLowerCase().includes(e)))))}return I}),[q,I]),{goTo:H,results:G,currentPage:j}=(0,_.usePagination)(N,D),R=(0,i.useCallback)((e=>F(e.target.value)),[]);return(0,i.useEffect)((()=>{1!==j&&H(1)}),[q]),L?i.default.createElement(b.Z,{role:"progressbar"}):null!=w&&w.length?i.default.createElement("div",{className:C.activeVisitsContainer},i.default.createElement("div",{className:C.activeVisitsDetailHeaderContainer},i.default.createElement("h4",{className:C.productiveHeading02},t("activeVisits","Active Visits")),i.default.createElement("div",{className:C.backgroundDataFetchingIndicator},i.default.createElement("span",null,M?i.default.createElement(v.Z,null):null))),i.default.createElement(a.ZP,{rows:G,headers:Z,isSortable:!0},(({rows:e,headers:n,getHeaderProps:a,getTableProps:b,getBatchActionProps:v,getRowProps:$})=>i.default.createElement(s.Z,{title:"",className:C.tableContainer},i.default.createElement(o.Z,null,i.default.createElement(r.Z,null,i.default.createElement(y.Z,{tabIndex:v().shouldShowBatchActions?-1:0,labelText:"",placeholder:t("filterTable","Filter table"),onChange:R}))),i.default.createElement(l.Z,B({className:C.activeVisitsTable},b(),{size:V?"short":"normal"}),i.default.createElement(c.Z,null,i.default.createElement(p.Z,null,i.default.createElement(d.Z,null),n.map((e=>i.default.createElement(u.Z,a({header:e}),e.header))))),i.default.createElement(g.Z,null,e.map(((e,t)=>{var a,s;return i.default.createElement(i.default.Fragment,{key:t},i.default.createElement(h.Z,$({row:e}),e.cells.map((e=>{var n;return i.default.createElement(f.Z,{key:e.id},"name"===e.info.header?i.default.createElement(_.ConfigurableLink,{to:`\${openmrsSpaBase}/patient/${null==G||null===(n=G[t])||void 0===n?void 0:n.patientUuid}/chart/`},e.value):e.value)}))),e.isExpanded&&i.default.createElement(p.Z,{className:C.expandedActiveVisitRow},i.default.createElement("th",{colSpan:n.length+2},i.default.createElement(_.ExtensionSlot,{className:C.visitSummaryContainer,extensionSlotName:"visit-summary-slot",state:{visitUuid:null===(a=G[t])||void 0===a?void 0:a.visitUuid,patientUuid:null===(s=G[t])||void 0===s?void 0:s.patientUuid}}))))})))),0===e.length&&i.default.createElement("p",{style:{height:V?"2rem":"3rem",marginLeft:V?"2rem":"3rem"},className:`${C.emptyRow} ${C.bodyLong01}`},t("noVisitsFound","No visits found")),i.default.createElement(m.Z,{forwardText:"Next page",backwardText:"Previous page",page:j,pageSize:D,pageSizes:T,totalItems:N.length,className:C.pagination,onChange:({pageSize:e,page:n})=>{e!==D&&S(e),n!==j&&H(n)}}))))):void 0}},8663:(e,n,t)=>{t.d(n,{Z:()=>r});var i=t(1799),a=t.n(i),s=t(2609),o=t.n(s)()(a());o.push([e.id,'.-esm-active-visits__active-visits__productiveHeading01___2CsYf{font-size:.875rem;font-weight:600;line-height:1.29;letter-spacing:.16px}.-esm-active-visits__active-visits__productiveHeading02___yB975{font-size:1rem;font-weight:600;line-height:1.375;letter-spacing:0}.-esm-active-visits__active-visits__bodyLong01___O-yvQ{font-size:.875rem;font-weight:400;line-height:1.43;letter-spacing:.16px}.-esm-active-visits__active-visits__caption01___37OuL{font-size:.75rem;font-weight:400;line-height:1.34;letter-spacing:.32px}.-esm-active-visits__active-visits__bodyShort02___nN5Zb{font-size:1rem;font-weight:400;line-height:1.375;letter-spacing:0}.-esm-active-visits__active-visits__text02___3xPzV{color:#525252}.-esm-active-visits__active-visits__text01___3oxuO{color:#161616}.-esm-active-visits__active-visits__activeVisitsContainer___3gA5F{background-color:#fff;border:1px solid #e0e0e0;width:100%;margin:0 auto;max-width:95vw}.-esm-active-visits__active-visits__activeVisitsDetailHeaderContainer___2jM1J{display:flex;justify-content:space-between;align-items:center;padding:.75rem 0 .75rem 1rem;background-color:#fff}.-esm-active-visits__active-visits__backgroundDataFetchingIndicator___3XjmD{align-items:center;display:flex;flex:1 1 0%;justify-content:center}.-esm-active-visits__active-visits__productiveHeading02___yB975::after{content:"";display:block;width:2rem;padding-top:.188rem;border-bottom:.375rem solid #007d79}.-esm-active-visits__active-visits__tableContainer___Bejp1 section{position:relative}.-esm-active-visits__active-visits__tableContainer___Bejp1 a{text-decoration:none}.-esm-active-visits__active-visits__pagination___1FV6l{overflow:hidden}.-esm-active-visits__active-visits__emptyRow___3dAQe{padding:0 1rem;display:flex;align-items:center}.-esm-active-visits__active-visits__activeVisitsTable___2YVfA tr[data-parent-row]:nth-child(odd) td{background-color:#fff}.-esm-active-visits__active-visits__activeVisitsTable___2YVfA tbody tr[data-parent-row]:nth-child(even) td{background-color:#f4f4f4}.-esm-active-visits__active-visits__visitSummaryContainer___24Znz{width:100%;max-width:768px;margin:1rem auto}.-esm-active-visits__active-visits__expandedActiveVisitRow___1grsY>td>div{max-height:max-content !important}.-esm-active-visits__active-visits__expandedActiveVisitRow___1grsY td{padding:0 2rem}.-esm-active-visits__active-visits__expandedActiveVisitRow___1grsY th[colspan] td[colspan]>div:first-child{padding:0 1rem}',"",{version:3,sources:["webpack://./src/root.scss","webpack://./../../node_modules/carbon-components/scss/globals/scss/vendor/@carbon/elements/scss/type/_styles.scss","webpack://./src/active-visits-widget/active-visits.scss","webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss"],names:[],mappings:"AAGA,gEC4gBI,iBAqLsB,CArLtB,eAqLsB,CArLtB,gBAqLsB,CArLtB,oBAqLsB,CD7rB1B,gECwgBI,cAqLsB,CArLtB,eAqLsB,CArLtB,iBAqLsB,CArLtB,gBAqLsB,CDzrB1B,uDCogBI,iBAqLsB,CArLtB,eAqLsB,CArLtB,gBAqLsB,CArLtB,oBAqLsB,CDrrB1B,sDCggBI,gBAqLsB,CArLtB,eAqLsB,CArLtB,gBAqLsB,CArLtB,oBAqLsB,CDjrB1B,wDC4fI,cAqLsB,CArLtB,eAqLsB,CArLtB,iBAqLsB,CArLtB,gBAqLsB,CD7qB1B,mDACE,aAAA,CAGF,mDACE,aAAA,CE1BF,kEACE,qBCIc,CDHd,wBAAA,CACA,UAAA,CACA,aAAA,CACA,cAAA,CAGF,8EACE,YAAA,CACA,6BAAA,CACA,kBAAA,CACA,4BAAA,CACA,qBCRc,CDWhB,4EACE,kBAAA,CACA,YAAA,CACA,WAAA,CACA,sBAAA,CAGF,uEACE,UAAA,CACA,aAAA,CACA,UAAA,CACA,mBAAA,CACA,mCAAA,CAGF,mEACE,iBAAA,CAGF,6DACE,oBAAA,CAGF,uDACE,eAAA,CAGF,qDACE,cAAA,CACA,YAAA,CACA,kBAAA,CAGF,oGACE,qBAAA,CAGF,2GACE,wBAAA,CAGF,kEACE,UAAA,CACA,eAAA,CACA,gBAAA,CAGF,0EACE,iCAAA,CAGF,sEACE,cAAA,CAGF,2GACE,cAAA",sourcesContent:['@import "carbon-components/scss/globals/scss/typography.scss";\n@import "~@openmrs/esm-styleguide/src/vars";\n\n.productiveHeading01 {\n @include carbon--type-style("productive-heading-01");\n}\n\n.productiveHeading02 {\n @include carbon--type-style("productive-heading-02");\n}\n\n.bodyLong01 {\n @include carbon--type-style("body-long-01");\n}\n\n.caption01 {\n @include carbon--type-style("caption-01");\n}\n\n.bodyShort02 {\n @include carbon--type-style("body-short-02");\n}\n\n.text02 {\n color: #525252;\n}\n\n.text01 {\n color: #161616;\n}',"//\n// Copyright IBM Corp. 2018, 2018\n//\n// This source code is licensed under the Apache-2.0 license found in the\n// LICENSE file in the root directory of this source tree.\n//\n\n@import '../layout/breakpoint';\n@import 'font-family';\n@import 'scale';\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$caption-01: (\n font-size: carbon--type-scale(1),\n font-weight: carbon--font-weight('regular'),\n line-height: 1.34,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$label-01: (\n font-size: carbon--type-scale(1),\n font-weight: carbon--font-weight('regular'),\n line-height: 1.34,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$helper-text-01: (\n font-size: carbon--type-scale(1),\n line-height: 1.34,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-short-01: (\n font-size: carbon--type-scale(2),\n font-weight: carbon--font-weight('regular'),\n line-height: 1.29,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-long-01: (\n font-size: carbon--type-scale(2),\n font-weight: carbon--font-weight('regular'),\n line-height: 1.43,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-short-02: (\n font-size: carbon--type-scale(3),\n font-weight: carbon--font-weight('regular'),\n line-height: 1.375,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-long-02: (\n font-size: carbon--type-scale(3),\n font-weight: carbon--font-weight('regular'),\n line-height: 1.5,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$code-01: (\n font-family: carbon--font-family('mono'),\n font-size: carbon--type-scale(1),\n font-weight: carbon--font-weight('regular'),\n line-height: 1.34,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$code-02: (\n font-family: carbon--font-family('mono'),\n font-size: carbon--type-scale(2),\n font-weight: carbon--font-weight('regular'),\n line-height: 1.43,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-01: (\n font-size: carbon--type-scale(2),\n font-weight: carbon--font-weight('semibold'),\n line-height: 1.29,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-01: $heading-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-02: (\n font-size: carbon--type-scale(3),\n font-weight: carbon--font-weight('semibold'),\n line-height: 1.375,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-02: $heading-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-03: (\n font-size: carbon--type-scale(5),\n font-weight: carbon--font-weight('regular'),\n line-height: 1.4,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-04: (\n font-size: carbon--type-scale(7),\n font-weight: carbon--font-weight('regular'),\n line-height: 1.29,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-05: (\n font-size: carbon--type-scale(8),\n font-weight: carbon--font-weight('regular'),\n line-height: 1.25,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-06: (\n font-size: carbon--type-scale(8),\n font-weight: carbon--font-weight('light'),\n // Extra digit needed for precision in Chrome\n line-height: 1.199,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-07: (\n font-size: carbon--type-scale(10),\n font-weight: carbon--font-weight('light'),\n line-height: 1.19,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-01: map-merge(\n $heading-01,\n (\n line-height: 1.25,\n )\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-02: map-merge(\n $heading-02,\n (\n line-height: 1.5,\n )\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-03: (\n font-size: carbon--type-scale(5),\n font-weight: carbon--font-weight('regular'),\n line-height: 1.4,\n letter-spacing: 0,\n breakpoints: (\n xlg: (\n font-size: carbon--type-scale(5),\n line-height: 1.25,\n ),\n max: (\n font-size: carbon--type-scale(6),\n line-height: 1.334,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-04: (\n font-size: carbon--type-scale(7),\n font-weight: carbon--font-weight('regular'),\n line-height: 1.29,\n letter-spacing: 0,\n breakpoints: (\n xlg: (\n font-size: carbon--type-scale(7),\n line-height: 1.25,\n ),\n max: (\n font-size: carbon--type-scale(8),\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-05: (\n font-size: carbon--type-scale(8),\n font-weight: carbon--font-weight('regular'),\n line-height: 1.25,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: carbon--type-scale(9),\n font-weight: carbon--font-weight('light'),\n line-height: 1.22,\n ),\n lg: (\n font-size: carbon--type-scale(10),\n line-height: 1.19,\n ),\n xlg: (\n font-size: carbon--type-scale(11),\n line-height: 1.17,\n ),\n max: (\n font-size: carbon--type-scale(13),\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-06: (\n font-size: carbon--type-scale(8),\n font-weight: carbon--font-weight('semibold'),\n line-height: 1.25,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: carbon--type-scale(9),\n line-height: 1.22,\n ),\n lg: (\n font-size: carbon--type-scale(10),\n line-height: 1.19,\n ),\n xlg: (\n font-size: carbon--type-scale(11),\n line-height: 1.17,\n ),\n max: (\n font-size: carbon--type-scale(13),\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-paragraph-01: (\n font-size: carbon--type-scale(6),\n font-weight: carbon--font-weight('light'),\n line-height: 1.334,\n letter-spacing: 0,\n breakpoints: (\n lg: (\n font-size: carbon--type-scale(7),\n line-height: 1.29,\n ),\n max: (\n font-size: carbon--type-scale(8),\n line-height: 1.25,\n ),\n ),\n);\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$quotation-01: (\n font-size: carbon--type-scale(5),\n font-weight: carbon--font-weight('regular'),\n line-height: 1.3,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: carbon--type-scale(5),\n ),\n lg: (\n font-size: carbon--type-scale(6),\n line-height: 1.334,\n ),\n xlg: (\n font-size: carbon--type-scale(7),\n line-height: 1.29,\n ),\n max: (\n font-size: carbon--type-scale(8),\n line-height: 1.25,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$quotation-02: (\n font-size: carbon--type-scale(8),\n font-weight: carbon--font-weight('light'),\n line-height: 1.25,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: carbon--type-scale(9),\n line-height: 1.22,\n ),\n lg: (\n font-size: carbon--type-scale(10),\n line-height: 1.19,\n ),\n xlg: (\n font-size: carbon--type-scale(11),\n line-height: 1.17,\n ),\n max: (\n font-size: carbon--type-scale(13),\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$display-01: (\n font-size: carbon--type-scale(10),\n font-weight: carbon--font-weight('light'),\n line-height: 1.19,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: carbon--type-scale(10),\n ),\n lg: (\n font-size: carbon--type-scale(12),\n ),\n xlg: (\n font-size: carbon--type-scale(13),\n line-height: 1.17,\n ),\n max: (\n font-size: carbon--type-scale(15),\n line-height: 1.13,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$display-02: (\n font-size: carbon--type-scale(10),\n font-weight: carbon--font-weight('semibold'),\n line-height: 1.19,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: carbon--type-scale(10),\n ),\n lg: (\n font-size: carbon--type-scale(12),\n ),\n xlg: (\n font-size: carbon--type-scale(13),\n line-height: 1.16,\n ),\n max: (\n font-size: carbon--type-scale(15),\n line-height: 1.13,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$display-03: (\n font-size: carbon--type-scale(10),\n font-weight: carbon--font-weight('light'),\n line-height: 1.19,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: carbon--type-scale(14),\n line-height: 1.15,\n ),\n lg: (\n font-size: carbon--type-scale(17),\n line-height: 1.11,\n letter-spacing: -0.64px,\n ),\n xlg: (\n font-size: carbon--type-scale(20),\n line-height: 1.07,\n letter-spacing: -0.64px,\n ),\n max: (\n font-size: carbon--type-scale(23),\n line-height: 1.05,\n letter-spacing: -0.96px,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$display-04: (\n font-size: carbon--type-scale(10),\n font-weight: carbon--font-weight('semibold'),\n line-height: 1.19,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: carbon--type-scale(14),\n line-height: 1.15,\n ),\n lg: (\n font-size: carbon--type-scale(17),\n line-height: 1.11,\n letter-spacing: -0.64px,\n ),\n xlg: (\n font-size: carbon--type-scale(20),\n line-height: 1.07,\n letter-spacing: -0.64px,\n ),\n max: (\n font-size: carbon--type-scale(23),\n line-height: 1.05,\n letter-spacing: -0.96px,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$tokens: (\n caption-01: $caption-01,\n label-01: $label-01,\n helper-text-01: $helper-text-01,\n body-short-01: $body-short-01,\n body-short-02: $body-short-02,\n body-long-01: $body-long-01,\n body-long-02: $body-long-02,\n code-01: $code-01,\n code-02: $code-02,\n heading-01: $heading-01,\n heading-02: $heading-02,\n productive-heading-01: $productive-heading-01,\n productive-heading-02: $productive-heading-02,\n productive-heading-03: $productive-heading-03,\n productive-heading-04: $productive-heading-04,\n productive-heading-05: $productive-heading-05,\n productive-heading-06: $productive-heading-06,\n productive-heading-07: $productive-heading-07,\n expressive-paragraph-01: $expressive-paragraph-01,\n expressive-heading-01: $expressive-heading-01,\n expressive-heading-02: $expressive-heading-02,\n expressive-heading-03: $expressive-heading-03,\n expressive-heading-04: $expressive-heading-04,\n expressive-heading-05: $expressive-heading-05,\n expressive-heading-06: $expressive-heading-06,\n quotation-01: $quotation-01,\n quotation-02: $quotation-02,\n display-01: $display-01,\n display-02: $display-02,\n display-03: $display-03,\n display-04: $display-04,\n);\n\n/// @param {Map} $map\n/// @access public\n/// @group @carbon/type\n@mixin properties($map) {\n @each $name, $value in $map {\n #{$name}: $value;\n }\n}\n\n/// @param {Number} $value - Number with units\n/// @return {Number} Without units\n/// @access public\n/// @group @carbon/type\n@function strip-unit($value) {\n @return $value / ($value * 0 + 1);\n}\n\n/// This helper includes fluid type styles for the given token value. Fluid type\n/// means that the `font-size` is computed using `calc()` in order to be\n/// determined by the screen size instead of a breakpoint. As a result, fluid\n/// styles should be used with caution in fixed width contexts.\n///\n/// In addition, we make use of %-based line-heights so that the line-height of\n/// each type style is computed correctly due to the dynamic nature of the\n/// `font-size`.\n///\n/// Most of the logic for this work comes from CSS Tricks:\n/// https://css-tricks.com/snippets/css/fluid-typography/\n///\n/// @param {Map} $type-styles - The value of a given type token\n/// @param {Map} $breakpoints [$carbon--grid-breakpoints] - Custom breakpoints to use\n/// @access public\n/// @group @carbon/type\n@mixin fluid-type($type-styles, $breakpoints: $carbon--grid-breakpoints) {\n // Include the initial styles for the given token by default without any\n // media query guard. This includes `font-size` as a fallback in the case\n // that a browser does not support `calc()`\n @include properties(map-remove($type-styles, breakpoints));\n // We also need to include the `sm` styles by default since they don't\n // appear in the fluid styles for tokens\n @include fluid-type-size($type-styles, sm, $breakpoints);\n\n // Finally, we need to go through all the breakpoints defined in the type\n // token and apply the properties and fluid type size for that given\n // breakpoint\n @each $name, $values in map-get($type-styles, breakpoints) {\n @include carbon--breakpoint($name) {\n @include properties($values);\n @include fluid-type-size($type-styles, $name, $breakpoints);\n }\n }\n}\n\n/// Computes the fluid `font-size` for a given type style and breakpoint\n/// @param {Map} $type-styles - The styles for a given token\n/// @param {String} $name - The name of the breakpoint to which we apply the fluid\n/// @param {Map} $breakpoints [$carbon--grid-breakpoints] - The breakpoints for the grid system\n/// @access public\n/// @group @carbon/type\n@mixin fluid-type-size(\n $type-styles,\n $name,\n $breakpoints: $carbon--grid-breakpoints\n) {\n // Get the information about the breakpoint we're currently working in. Useful\n // for getting initial width information\n $breakpoint: map-get($breakpoints, $name);\n\n // Our fluid styles are captured under the 'breakpoints' property in our type\n // styles map. These define what values to treat as `max-` variables below\n $fluid-sizes: map-get($type-styles, breakpoints);\n $fluid-breakpoint: ();\n // Special case for `sm` because the styles for small are on the type style\n // directly\n @if $name == sm {\n $fluid-breakpoint: map-remove($type-styles, breakpoints);\n } @else {\n $fluid-breakpoint: map-get($fluid-sizes, $name);\n }\n\n // Initialize our font-sizes to the default size for the type style\n $max-font-size: map-get($type-styles, font-size);\n $min-font-size: map-get($type-styles, font-size);\n @if map-has-key($fluid-breakpoint, font-size) {\n $min-font-size: map-get($fluid-breakpoint, font-size);\n }\n\n // Initialize our min and max width to the width of the current breakpoint\n $max-vw: map-get($breakpoint, width);\n $min-vw: map-get($breakpoint, width);\n\n // We can use `breakpoint-next` to see if there is another breakpoint we can\n // use to update `max-font-size` and `max-vw` with larger values\n $next-breakpoint-available: carbon--breakpoint-next($name, $breakpoints);\n $next-fluid-breakpoint-name: null;\n\n // We need to figure out what the next available fluid breakpoint is for our\n // given $type-styles. In this loop we try and iterate through breakpoints\n // until we either manually set $next-breakpoint-available to null or\n // `breakpoint-next` returns null.\n @while $next-breakpoint-available {\n @if map-has-key($fluid-sizes, $next-breakpoint-available) {\n $next-fluid-breakpoint-name: $next-breakpoint-available;\n $next-breakpoint-available: null;\n } @else {\n $next-breakpoint-available: carbon--breakpoint-next(\n $next-breakpoint-available,\n $breakpoints\n );\n }\n }\n\n // If we have found the next available fluid breakpoint name, then we know\n // that we have values that we can use to set max-font-size and max-vw as both\n // values derive from the next breakpoint\n @if $next-fluid-breakpoint-name {\n $next-fluid-breakpoint: map-get($breakpoints, $next-fluid-breakpoint-name);\n $max-font-size: map-get(\n map-get($fluid-sizes, $next-fluid-breakpoint-name),\n font-size\n );\n $max-vw: map-get($next-fluid-breakpoint, width);\n\n // prettier-ignore\n font-size: calc(#{$min-font-size} +\n #{strip-unit($max-font-size - $min-font-size)} *\n ((100vw - #{$min-vw}) / #{strip-unit($max-vw - $min-vw)})\n );\n } @else {\n // Otherwise, just default to setting the font size found from the type\n // style or the given fluid breakpoint in the type style\n font-size: $min-font-size;\n }\n}\n\n// TODO move following variable and `custom-property` mixin into shared file for\n// both `@carbon/type` and `@carbon/themes`\n\n/// @access private\n/// @group @carbon/type\n$custom-property-prefix: 'cds' !default;\n\n/// @access private\n/// @group @carbon/type\n@mixin custom-properties($name, $value) {\n @each $property, $value in $value {\n #{$property}: var(\n --#{$custom-property-prefix}-#{$name}-#{$property},\n #{$value}\n );\n }\n}\n\n/// Helper mixin to include the styles for a given token in any selector in your\n/// project. Also includes an optional fluid option that will enable fluid\n/// styles for the token if they are defined. Fluid styles will cause the\n/// token's font-size to be computed based on the viewport size. As a result, use\n/// with caution in fixed contexts.\n/// @param {String} $name - The name of the token to get the styles for\n/// @param {Boolean} $fluid [false] - Specify whether to include fluid styles for the\n/// @param {Map} $breakpoints [$carbon--grid-breakpoints] - Provide a custom breakpoint map to use\n/// @access public\n/// @group @carbon/type\n@mixin carbon--type-style(\n $name,\n $fluid: false,\n $breakpoints: $carbon--grid-breakpoints\n) {\n @if not map-has-key($tokens, $name) {\n @error 'Unable to find a token with the name: `#{$name}`';\n }\n\n $token: map-get($tokens, $name);\n\n // If $fluid is set to true and the token has breakpoints defined for fluid\n // styles, delegate to the fluid-type helper for the given token\n @if $fluid == true and map-has-key($token, 'breakpoints') {\n @include fluid-type($token, $breakpoints);\n } @else {\n @if global-variable-exists('feature-flags') and\n map-get($feature-flags, 'enable-css-custom-properties')\n {\n @include custom-properties($name, $token);\n } @else {\n // Otherwise, we just include all the property declarations directly on the\n // selector\n @include properties(map-remove($token, 'breakpoints'));\n }\n }\n}\n",'@import "../root.scss";\n\n.activeVisitsContainer {\n background-color: $ui-background;\n border: 1px solid #e0e0e0;\n width: 100%;\n margin: 0 auto;\n max-width: 95vw;\n}\n\n.activeVisitsDetailHeaderContainer {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: $spacing-04 0 $spacing-04 $spacing-05;\n background-color: $ui-background;\n}\n\n.backgroundDataFetchingIndicator {\n align-items: center;\n display: flex;\n flex: 1 1 0%;\n justify-content: center;\n}\n\n.productiveHeading02::after {\n content: "";\n display: block;\n width: 2rem;\n padding-top: 0.188rem;\n border-bottom: 0.375rem solid #007d79;\n}\n\n.tableContainer section{\n position: relative;\n}\n\n.tableContainer a {\n text-decoration: none;\n}\n\n.pagination {\n overflow: hidden;\n}\n\n.emptyRow {\n padding: 0 1rem;\n display: flex;\n align-items: center;\n}\n\n.activeVisitsTable tr[data-parent-row]:nth-child(odd) td {\n background-color: #ffffff;\n}\n\n.activeVisitsTable tbody tr[data-parent-row]:nth-child(even) td {\n background-color: #f4f4f4;\n}\n\n.visitSummaryContainer {\n width: 100%;\n max-width: 768px;\n margin: 1rem auto;\n}\n\n.expandedActiveVisitRow > td > div {\n max-height: max-content !important;\n}\n\n.expandedActiveVisitRow td {\n padding: 0 2rem;\n}\n\n.expandedActiveVisitRow th[colspan] td[colspan] > div:first-child {\n padding: 0 1rem;\n}\n\n',"$ui-01: #f4f4f4;\n$ui-02: #ffffff;\n$ui-03: #e0e0e0;\n$ui-04: #8d8d8d;\n$ui-05: #161616;\n$text-02: #525252;\n$text-03: #a8a8a8;\n$ui-background: #ffffff;\n$color-gray-30: #c6c6c6;\n$color-gray-70: #525252;\n$color-gray-100: #161616;\n$color-blue-60-2: #0f62fe;\n$color-yellow-50: #feecae;\n$carbon--red-50: #fa4d56;\n$inverse-link: #78a9ff;\n$support-02: #24a148;\n$inverse-support-03: #f1c21b;\n$warning-background: #fff8e1;\n$openmrs-background-grey: #f4f4f4;\n$danger: #da1e28;\n$interactive-01: #0f62fe;\n$brand-teal-01: #007d79;\n$brand-01: #005d5d;\n$brand-02: #004144;\n$field-01: #f4f4f4;\n$grey-2: #e0e0e0;\n$labeldropdown: #c6c6c6;\n\n$breakpoint-phone-min: 0px;\n$breakpoint-phone-max: 600px;\n$breakpoint-tablet-min: 601px;\n$breakpoint-tablet-max: 1200px;\n$breakpoint-desktop-min: 1201px;\n$breakpoint-desktop-max: 99999999px;\n"],sourceRoot:""}]),o.locals={productiveHeading01:"-esm-active-visits__active-visits__productiveHeading01___2CsYf",productiveHeading02:"-esm-active-visits__active-visits__productiveHeading02___yB975",bodyLong01:"-esm-active-visits__active-visits__bodyLong01___O-yvQ",caption01:"-esm-active-visits__active-visits__caption01___37OuL",bodyShort02:"-esm-active-visits__active-visits__bodyShort02___nN5Zb",text02:"-esm-active-visits__active-visits__text02___3xPzV",text01:"-esm-active-visits__active-visits__text01___3oxuO",activeVisitsContainer:"-esm-active-visits__active-visits__activeVisitsContainer___3gA5F",activeVisitsDetailHeaderContainer:"-esm-active-visits__active-visits__activeVisitsDetailHeaderContainer___2jM1J",backgroundDataFetchingIndicator:"-esm-active-visits__active-visits__backgroundDataFetchingIndicator___3XjmD",tableContainer:"-esm-active-visits__active-visits__tableContainer___Bejp1",pagination:"-esm-active-visits__active-visits__pagination___1FV6l",emptyRow:"-esm-active-visits__active-visits__emptyRow___3dAQe",activeVisitsTable:"-esm-active-visits__active-visits__activeVisitsTable___2YVfA",visitSummaryContainer:"-esm-active-visits__active-visits__visitSummaryContainer___24Znz",expandedActiveVisitRow:"-esm-active-visits__active-visits__expandedActiveVisitRow___1grsY"};const r=o}}]);
|
|
2
2
|
//# sourceMappingURL=165.openmrs-esm-active-visits-app.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"165.openmrs-esm-active-visits-app.js","mappings":"+XAQa,IAAI,IALH,CAEdA,OAAiB,OACjBA,WAAoB,IAMpB,QAAe,YAAkB,G,8NCWjC,SAASC,EAAeC,GACtB,MAAMC,GAAYC,EAAAA,EAAAA,WAKlB,OAHEA,EAAAA,EAAAA,SAAMF,GAAeG,IAAI,UAAYF,EAAUE,IAAI,UACnDD,EAAAA,EAAAA,SAAMF,GAAeG,IAAI,WAAaF,EAAUE,IAAI,WACpDD,EAAAA,EAAAA,SAAMF,GAAeG,IAAI,UAAYF,EAAUE,IAAI,QAE3C,YAAUD,EAAAA,EAAAA,SAAMF,GAAeI,OAAO,YAEvCF,EAAAA,EAAAA,SAAMF,GAAeI,OAAO,sBAIvC,MA2LA,EA3L0B,KAAM,YAC9B,MAAM,EAAEC,IAAMC,EAAAA,EAAAA,kBAERC,EAAyB,aADhBC,EAAAA,EAAAA,iBAETC,GAASC,EAAAA,EAAAA,cACRC,EAAiBC,IAAeC,EAAAA,EAAAA,UAAQ,UAACJ,MAAAA,GAAD,UAACA,EAAQK,oBAAT,aAAC,EAAsBC,gBAAvB,QAAmC,IAC5EC,EAAS,UAAGP,MAAAA,GAAH,UAAGA,EAAQK,oBAAX,aAAG,EAAsBE,iBAAzB,QAAsC,CAAC,GAAI,GAAI,KACvDC,EAASC,IAAcL,EAAAA,EAAAA,WAAS,IAChCC,EAAcK,IAAmBN,EAAAA,EAAAA,UAA2B,KAC5DO,EAAcC,IAAmBR,EAAAA,EAAAA,UAAS,IAE3CS,GAAaC,EAAAA,EAAAA,UACjB,IAAM,CACJ,CACEC,GAAI,EACJC,OAAQpB,EAAE,iBAAkB,cAC5BqB,IAAK,kBAEP,CACEF,GAAI,EACJC,OAAQpB,EAAE,WAAY,aACtBqB,IAAK,YAEP,CACEF,GAAI,EACJC,OAAQpB,EAAE,OAAQ,QAClBqB,IAAK,QAEP,CACEF,GAAI,EACJC,OAAQpB,EAAE,SAAU,UACpBqB,IAAK,UAEP,CACEF,GAAI,EACJC,OAAQpB,EAAE,MAAO,OACjBqB,IAAK,OAEP,CACEF,GAAI,EACJC,OAAQpB,EAAE,YAAa,cACvBqB,IAAK,eAGT,CAACrB,KAGHsB,EAAAA,EAAAA,YAAU,KACR,MAAMC,EAAkB,IAAIC,gBAiB5B,OCvFG,SAA2BD,GAKhC,OAAOE,EAAAA,EAAAA,cAAoC,8NAAiD,CAC1FC,OAAQH,EAAgBG,SDiExBC,CAAkBJ,GAAiBK,MAAK,EAAGC,KAAAA,MACzC,MAAMC,EAAUD,EAAKE,QAAQC,KAAI,CAACC,EAAOC,KAAR,8BAAiB,CAChDf,GAAK,GAAEe,IACPC,eAAgBzC,EAAeuC,EAAMtC,eACrCyC,SAAUH,MAAAA,GAAF,UAAEA,EAAOI,eAAT,iBAAE,EAAgBC,YAAY,UAA9B,aAAE,EAAgCC,WAC1CC,KAAMP,MAAAA,GAAF,UAAEA,EAAOI,eAAT,iBAAE,EAAgBI,cAAlB,aAAE,EAAwBC,QAC9BC,OAAQV,MAAAA,GAAF,UAAEA,EAAOI,eAAT,iBAAE,EAAgBI,cAAlB,aAAE,EAAwBE,OAChCC,IAAKX,MAAAA,GAAF,UAAEA,EAAOI,eAAT,iBAAE,EAAgBI,cAAlB,aAAE,EAAwBG,IAC7BC,UAAWZ,MAAAA,GAAF,UAAEA,EAAOY,iBAAT,aAAE,EAAkBH,QAC7BI,YAAab,MAAAA,GAAF,UAAEA,EAAOI,eAAT,aAAE,EAAgBU,KAC7BC,UAAWf,MAAAA,OAAF,EAAEA,EAAOc,SAEpBjC,EAAgBgB,GAChBjB,GAAW,MAGN,IAAMU,EAAgB0B,UAC5B,IAEH,MAAMC,GAAgBhC,EAAAA,EAAAA,UAAQ,KAC5B,GAAIH,GAAwC,KAAxBA,EAAaoC,OAAe,CAC9C,MAAMC,EAASrC,EAAasC,cAC5B,OAAO5C,EAAa6C,QAAQC,GAC1BC,OAAOC,KAAKF,GAAgBG,MAAMtC,GACjB,gBAAXA,GAGI,GAAEmC,EAAenC,KAAUiC,cAAcM,SAASP,OAI9D,OAAO3C,IAER,CAACM,EAAcN,KAEZ,KAAEmD,EAAF,QAAQ7B,EAAR,YAAiB8B,IAAgBC,EAAAA,EAAAA,eAAcZ,EAAe5C,GAC9DyD,GAAeC,EAAAA,EAAAA,cAAaC,GAAMjD,EAAgBiD,EAAEC,OAAOC,QAAQ,IAQzE,OANA7C,EAAAA,EAAAA,YAAU,KACY,IAAhBuC,GACFD,EAAK,KAEN,CAAC7C,IAEIH,EA0FN,wBAACwD,EAAA,EAAD,MAzFA,+BAAKC,UAAWC,EAAAA,uBACd,+BAAKD,UAAWC,EAAAA,mCACd,8BAAID,UAAWC,EAAAA,qBAA6BtE,EAAE,eAAgB,mBAEhE,wBAACuE,EAAA,GAAD,CAAWC,KAAMzC,EAAS0C,QAASxD,EAAYyD,YAAU,IACtD,EAAGF,KAAAA,EAAMC,QAAAA,EAASE,eAAAA,EAAgBC,cAAAA,EAAeC,oBAAAA,EAAqBC,YAAAA,KACrE,wBAACC,EAAA,EAAD,CAAgBC,MAAM,GAAGX,UAAWC,EAAAA,gBAClC,wBAACW,EAAA,EAAD,KACE,wBAACC,EAAA,EAAD,KACE,wBAACC,EAAA,EAAD,CACEC,SAAUP,IAAsBQ,wBAA0B,EAAI,EAC9DC,UAAU,GACVC,YAAY,eACZC,SAAUzB,MAIhB,wBAAC0B,EAAA,EAAD,GAAOpB,UAAWC,EAAAA,mBAA8BM,IAAhD,CAAiEc,KAAMxF,EAAc,QAAU,WAC7F,wBAACyF,EAAA,EAAD,KACE,wBAACC,EAAA,EAAD,KACE,wBAACC,EAAA,EAAD,MACCpB,EAAQzC,KAAKZ,GACZ,wBAAC0E,EAAA,EAAgBnB,EAAe,CAAEvD,OAAAA,IAAYA,EAAOA,YAI3D,wBAAC2E,EAAA,EAAD,KACGvB,EAAKxC,KAAI,CAACgE,EAAK9D,KAAN,eACR,wBAAC,mBAAD,CAAgBb,IAAK2E,EAAI7E,IACvB,wBAAC8E,EAAA,EAAmBnB,EAAY,CAAEkB,IAAAA,IAC/BA,EAAIE,MAAMlE,KAAKmE,IAAD,aACb,wBAACC,EAAA,EAAD,CAAW/E,IAAK8E,EAAKhF,IACG,SAArBgF,EAAKE,KAAKjF,OACT,wBAAC,EAAAkF,iBAAD,CAAkBC,GAAK,8BAAD,UAA8BxE,EAAQG,UAAtC,aAA8B,EAAcY,sBAC/DqD,EAAKhC,OAGRgC,EAAKhC,WAKZ6B,EAAIQ,YACH,wBAACZ,EAAA,EAAD,CAAUvB,UAAWC,EAAAA,uBAA+BmC,QAAShC,EAAQiC,OAAS,GAC5E,8BAAID,QAAShC,EAAQiC,OAAS,GAC5B,wBAAC,EAAAC,cAAD,CACEtC,UAAWC,EAAAA,sBACXsC,kBAAkB,qBAClBC,MAAO,CACL7D,UAAS,UAAEjB,EAAQG,UAAV,aAAE,EAAcc,UACzBF,YAAW,UAAEf,EAAQG,UAAV,aAAE,EAAcY,uBAU5B,IAAhB0B,EAAKkC,QACJ,6BACEI,MAAO,CAAEC,OAAQ7G,EAAc,OAAS,OAAQ8G,WAAY9G,EAAc,OAAS,QACnFmE,UAAY,GAAEC,EAAAA,YAAmBA,EAAAA,cAChCtE,EAAE,gBAAiB,oBAGxB,wBAACiH,EAAA,EAAD,CACEC,YAAY,GACZC,aAAa,GACbC,KAAMvD,EACNnD,SAAUJ,EACVK,UAAWA,EACX0G,WAAYnE,EAAcwD,OAC1BrC,UAAWC,EAAAA,WACXkB,SAAU,EAAG9E,SAAAA,EAAU0G,KAAAA,MACjB1G,IAAaJ,GACfC,EAAYG,GAEV0G,IAASvD,GACXD,EAAKwD,Y,iEE/MnBE,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOrG,GAAI,yvEAA4vE,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,4BAA4B,oHAAoH,0DAA0D,yEAAyE,MAAQ,GAAG,SAAW,ovBAAovB,eAAiB,CAAC,4iBAA0jB,q3lBAAq3lB,8wCAAkxC,+0BAA+0B,WAAa,MAE54xBmG,EAAwBG,OAAS,CAChC,oBAAuB,iEACvB,oBAAuB,iEACvB,WAAc,wDACd,UAAa,uDACb,YAAe,yDACf,OAAU,oDACV,OAAU,oDACV,sBAAyB,mEACzB,kCAAqC,+EACrC,eAAkB,4DAClB,WAAc,wDACd,SAAY,sDACZ,kBAAqB,+DACrB,sBAAyB,mEACzB,uBAA0B,qEAE3B","sources":["webpack://@openmrs/esm-active-visits-app/./src/active-visits-widget/active-visits.scss?d2f8","webpack://@openmrs/esm-active-visits-app/./src/active-visits-widget/active-visits.component.tsx","webpack://@openmrs/esm-active-visits-app/./src/active-visits-widget/active-visits.resource.tsx","webpack://@openmrs/esm-active-visits-app/./src/active-visits-widget/active-visits.scss"],"sourcesContent":["import api from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import content from \"!!../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../node_modules/openmrs/node_modules/sass-loader/dist/cjs.js!./active-visits.scss\";\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nexport default content.locals || {};","import React, { useMemo, useEffect, useState, useCallback } from 'react';\nimport DataTable, {\n TableContainer,\n Table,\n TableHead,\n TableRow,\n TableHeader,\n TableBody,\n TableCell,\n TableToolbar,\n TableToolbarContent,\n TableExpandRow,\n TableExpandHeader,\n} from 'carbon-components-react/es/components/DataTable';\nimport DataTableSkeleton from 'carbon-components-react/es/components/DataTableSkeleton';\nimport Pagination from 'carbon-components-react/es/components/Pagination';\nimport Search from 'carbon-components-react/es/components/Search';\nimport { useLayoutType, useConfig, usePagination, ConfigurableLink, ExtensionSlot } from '@openmrs/esm-framework';\nimport { useTranslation } from 'react-i18next';\nimport { ActiveVisitRow, fetchActiveVisits } from './active-visits.resource';\nimport styles from './active-visits.scss';\nimport dayjs from 'dayjs';\n\nfunction formatDatetime(startDatetime) {\n const todayDate = dayjs();\n const today =\n dayjs(startDatetime).get('date') === todayDate.get('date') &&\n dayjs(startDatetime).get('month') === todayDate.get('month') &&\n dayjs(startDatetime).get('year') === todayDate.get('year');\n if (today) {\n return `Today - ${dayjs(startDatetime).format('HH:mm')}`;\n } else {\n return dayjs(startDatetime).format(\"DD MMM 'YY - HH:mm\");\n }\n}\n\nconst ActiveVisitsTable = () => {\n const { t } = useTranslation();\n const layout = useLayoutType();\n const desktopView = layout === 'desktop';\n const config = useConfig();\n const [currentPageSize, setPageSize] = useState(config?.activeVisits?.pageSize ?? 10);\n const pageSizes = config?.activeVisits?.pageSizes ?? [10, 20, 50];\n const [loading, setLoading] = useState(true);\n const [activeVisits, setActiveVisits] = useState<ActiveVisitRow[]>([]);\n const [searchString, setSearchString] = useState('');\n\n const headerData = useMemo(\n () => [\n {\n id: 0,\n header: t('visitStartTime', 'Visit Time'),\n key: 'visitStartTime',\n },\n {\n id: 1,\n header: t('IDNumber', 'ID Number'),\n key: 'IDNumber',\n },\n {\n id: 2,\n header: t('name', 'Name'),\n key: 'name',\n },\n {\n id: 3,\n header: t('gender', 'Gender'),\n key: 'gender',\n },\n {\n id: 4,\n header: t('age', 'Age'),\n key: 'age',\n },\n {\n id: 5,\n header: t('visitType', 'Visit Type'),\n key: 'visitType',\n },\n ],\n [t],\n );\n\n useEffect(() => {\n const abortController = new AbortController();\n fetchActiveVisits(abortController).then(({ data }) => {\n const rowData = data.results.map((visit, ind) => ({\n id: `${ind}`,\n visitStartTime: formatDatetime(visit.startDatetime),\n IDNumber: visit?.patient?.identifiers[0]?.identifier,\n name: visit?.patient?.person?.display,\n gender: visit?.patient?.person?.gender,\n age: visit?.patient?.person?.age,\n visitType: visit?.visitType?.display,\n patientUuid: visit?.patient?.uuid,\n visitUuid: visit?.uuid,\n }));\n setActiveVisits(rowData);\n setLoading(false);\n });\n\n return () => abortController.abort();\n }, []);\n\n const searchResults = useMemo(() => {\n if (searchString && searchString.trim() !== '') {\n const search = searchString.toLowerCase();\n return activeVisits.filter((activeVisitRow) =>\n Object.keys(activeVisitRow).some((header) => {\n if (header === 'patientUuid') {\n return false;\n }\n return `${activeVisitRow[header]}`.toLowerCase().includes(search);\n }),\n );\n } else {\n return activeVisits;\n }\n }, [searchString, activeVisits]);\n\n const { goTo, results, currentPage } = usePagination(searchResults, currentPageSize);\n const handleSearch = useCallback((e) => setSearchString(e.target.value), []);\n\n useEffect(() => {\n if (currentPage !== 1) {\n goTo(1);\n }\n }, [searchString]);\n\n return !loading ? (\n <div className={styles.activeVisitsContainer}>\n <div className={styles.activeVisitsDetailHeaderContainer}>\n <h4 className={styles.productiveHeading02}>{t('activeVisits', 'Active Visits')}</h4>\n </div>\n <DataTable rows={results} headers={headerData} isSortable>\n {({ rows, headers, getHeaderProps, getTableProps, getBatchActionProps, getRowProps }) => (\n <TableContainer title=\"\" className={styles.tableContainer}>\n <TableToolbar>\n <TableToolbarContent>\n <Search\n tabIndex={getBatchActionProps().shouldShowBatchActions ? -1 : 0}\n labelText=\"\"\n placeholder=\"Filter table\"\n onChange={handleSearch}\n />\n </TableToolbarContent>\n </TableToolbar>\n <Table className={styles.activeVisitsTable} {...getTableProps()} size={desktopView ? 'short' : 'normal'}>\n <TableHead>\n <TableRow>\n <TableExpandHeader />\n {headers.map((header) => (\n <TableHeader {...getHeaderProps({ header })}>{header.header}</TableHeader>\n ))}\n </TableRow>\n </TableHead>\n <TableBody>\n {rows.map((row, ind) => (\n <React.Fragment key={row.id}>\n <TableExpandRow {...getRowProps({ row })}>\n {row.cells.map((cell) => (\n <TableCell key={cell.id}>\n {cell.info.header === 'name' ? (\n <ConfigurableLink to={`\\${openmrsSpaBase}/patient/${results[ind]?.patientUuid}/chart/`}>\n {cell.value}\n </ConfigurableLink>\n ) : (\n cell.value\n )}\n </TableCell>\n ))}\n </TableExpandRow>\n {row.isExpanded && (\n <TableRow className={styles.expandedActiveVisitRow} colSpan={headers.length + 1}>\n <th colSpan={headers.length + 2}>\n <ExtensionSlot\n className={styles.visitSummaryContainer}\n extensionSlotName=\"visit-summary-slot\"\n state={{\n visitUuid: results[ind]?.visitUuid,\n patientUuid: results[ind]?.patientUuid,\n }}\n />\n </th>\n </TableRow>\n )}\n </React.Fragment>\n ))}\n </TableBody>\n </Table>\n {rows.length === 0 && (\n <p\n style={{ height: desktopView ? '2rem' : '3rem', marginLeft: desktopView ? '2rem' : '3rem' }}\n className={`${styles.emptyRow} ${styles.bodyLong01}`}>\n {t('noVisitsFound', 'No visits found')}\n </p>\n )}\n <Pagination\n forwardText=\"\"\n backwardText=\"\"\n page={currentPage}\n pageSize={currentPageSize}\n pageSizes={pageSizes}\n totalItems={searchResults.length}\n className={styles.pagination}\n onChange={({ pageSize, page }) => {\n if (pageSize !== currentPageSize) {\n setPageSize(pageSize);\n }\n if (page !== currentPage) {\n goTo(page);\n }\n }}\n />\n </TableContainer>\n )}\n </DataTable>\n </div>\n ) : (\n <DataTableSkeleton />\n );\n};\n\nexport default ActiveVisitsTable;\n","import { openmrsFetch, Visit } from '@openmrs/esm-framework';\n\nexport interface ActiveVisitRow {\n id: string;\n visitStartTime: string;\n IDNumber: string;\n name: string;\n gender: string;\n age: string;\n visitType: string;\n patientUuid: string;\n visitUuid: string;\n}\n\nexport function fetchActiveVisits(abortController: AbortController) {\n const v =\n 'custom:(uuid,patient:(uuid,identifiers:(identifier,uuid),person:(age,display,gender,uuid)),' +\n 'visitType:(uuid,name,display),location:(uuid,name,display),startDatetime,' +\n 'stopDatetime)';\n return openmrsFetch<{ results: Visit[] }>(`/ws/rest/v1/visit?includeInactive=false&v=${v}`, {\n signal: abortController.signal,\n });\n}\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".-esm-active-visits__active-visits__productiveHeading01___2CsYf{font-size:.875rem;font-weight:600;line-height:1.29;letter-spacing:.16px}.-esm-active-visits__active-visits__productiveHeading02___yB975{font-size:1rem;font-weight:600;line-height:1.375;letter-spacing:0}.-esm-active-visits__active-visits__bodyLong01___O-yvQ{font-size:.875rem;font-weight:400;line-height:1.43;letter-spacing:.16px}.-esm-active-visits__active-visits__caption01___37OuL{font-size:.75rem;font-weight:400;line-height:1.34;letter-spacing:.32px}.-esm-active-visits__active-visits__bodyShort02___nN5Zb{font-size:1rem;font-weight:400;line-height:1.375;letter-spacing:0}.-esm-active-visits__active-visits__text02___3xPzV{color:#525252}.-esm-active-visits__active-visits__text01___3oxuO{color:#161616}.-esm-active-visits__active-visits__activeVisitsContainer___3gA5F{background-color:#fff;border:1px solid #e0e0e0;width:100%;margin:0 auto;max-width:95vw}.-esm-active-visits__active-visits__activeVisitsDetailHeaderContainer___2jM1J{display:flex;justify-content:space-between;align-items:center;padding:.75rem 0 .75rem 1rem;background-color:#fff}.-esm-active-visits__active-visits__productiveHeading02___yB975::after{content:\\\"\\\";display:block;width:2rem;padding-top:.188rem;border-bottom:.375rem solid #007d79}.-esm-active-visits__active-visits__tableContainer___Bejp1 section{position:relative}.-esm-active-visits__active-visits__tableContainer___Bejp1 a{text-decoration:none}.-esm-active-visits__active-visits__pagination___1FV6l{overflow:hidden}.-esm-active-visits__active-visits__emptyRow___3dAQe{padding:0 1rem;display:flex;align-items:center}.-esm-active-visits__active-visits__activeVisitsTable___2YVfA tr[data-parent-row]:nth-child(odd) td{background-color:#fff}.-esm-active-visits__active-visits__activeVisitsTable___2YVfA tbody tr[data-parent-row]:nth-child(even) td{background-color:#f4f4f4}.-esm-active-visits__active-visits__visitSummaryContainer___24Znz{width:100%;max-width:768px;margin:1rem auto}.-esm-active-visits__active-visits__expandedActiveVisitRow___1grsY>td>div{max-height:max-content !important}.-esm-active-visits__active-visits__expandedActiveVisitRow___1grsY td{padding:0 2rem}.-esm-active-visits__active-visits__expandedActiveVisitRow___1grsY th[colspan] td[colspan]>div:first-child{padding:0 1rem}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/root.scss\",\"webpack://./../../node_modules/carbon-components/scss/globals/scss/vendor/@carbon/elements/scss/type/_styles.scss\",\"webpack://./src/active-visits-widget/active-visits.scss\",\"webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss\"],\"names\":[],\"mappings\":\"AAGA,gEC4gBI,iBAqLsB,CArLtB,eAqLsB,CArLtB,gBAqLsB,CArLtB,oBAqLsB,CD7rB1B,gECwgBI,cAqLsB,CArLtB,eAqLsB,CArLtB,iBAqLsB,CArLtB,gBAqLsB,CDzrB1B,uDCogBI,iBAqLsB,CArLtB,eAqLsB,CArLtB,gBAqLsB,CArLtB,oBAqLsB,CDrrB1B,sDCggBI,gBAqLsB,CArLtB,eAqLsB,CArLtB,gBAqLsB,CArLtB,oBAqLsB,CDjrB1B,wDC4fI,cAqLsB,CArLtB,eAqLsB,CArLtB,iBAqLsB,CArLtB,gBAqLsB,CD7qB1B,mDACE,aAAA,CAGF,mDACE,aAAA,CE1BF,kEACE,qBCIc,CDHd,wBAAA,CACA,UAAA,CACA,aAAA,CACA,cAAA,CAGF,8EACE,YAAA,CACA,6BAAA,CACA,kBAAA,CACA,4BAAA,CACA,qBCRc,CDWhB,uEACE,UAAA,CACA,aAAA,CACA,UAAA,CACA,mBAAA,CACA,mCAAA,CAGF,mEACE,iBAAA,CAGF,6DACE,oBAAA,CAGF,uDACE,eAAA,CAGF,qDACE,cAAA,CACA,YAAA,CACA,kBAAA,CAGF,oGACE,qBAAA,CAGF,2GACE,wBAAA,CAGF,kEACE,UAAA,CACA,eAAA,CACA,gBAAA,CAGF,0EACE,iCAAA,CAGF,sEACE,cAAA,CAGF,2GACE,cAAA\",\"sourcesContent\":[\"@import \\\"carbon-components/scss/globals/scss/typography.scss\\\";\\n@import \\\"~@openmrs/esm-styleguide/src/vars\\\";\\n\\n.productiveHeading01 {\\n @include carbon--type-style(\\\"productive-heading-01\\\");\\n}\\n\\n.productiveHeading02 {\\n @include carbon--type-style(\\\"productive-heading-02\\\");\\n}\\n\\n.bodyLong01 {\\n @include carbon--type-style(\\\"body-long-01\\\");\\n}\\n\\n.caption01 {\\n @include carbon--type-style(\\\"caption-01\\\");\\n}\\n\\n.bodyShort02 {\\n @include carbon--type-style(\\\"body-short-02\\\");\\n}\\n\\n.text02 {\\n color: #525252;\\n}\\n\\n.text01 {\\n color: #161616;\\n}\",\"//\\n// Copyright IBM Corp. 2018, 2018\\n//\\n// This source code is licensed under the Apache-2.0 license found in the\\n// LICENSE file in the root directory of this source tree.\\n//\\n\\n@import '../layout/breakpoint';\\n@import 'font-family';\\n@import 'scale';\\n\\n/// @type Map\\n/// @access public\\n/// @group @carbon/type\\n$caption-01: (\\n font-size: carbon--type-scale(1),\\n font-weight: carbon--font-weight('regular'),\\n line-height: 1.34,\\n letter-spacing: 0.32px,\\n) !default;\\n\\n/// @type Map\\n/// @access public\\n/// @group @carbon/type\\n$label-01: (\\n font-size: carbon--type-scale(1),\\n font-weight: carbon--font-weight('regular'),\\n line-height: 1.34,\\n letter-spacing: 0.32px,\\n) !default;\\n\\n/// @type Map\\n/// @access public\\n/// @group @carbon/type\\n$helper-text-01: (\\n font-size: carbon--type-scale(1),\\n line-height: 1.34,\\n letter-spacing: 0.32px,\\n) !default;\\n\\n/// @type Map\\n/// @access public\\n/// @group @carbon/type\\n$body-short-01: (\\n font-size: carbon--type-scale(2),\\n font-weight: carbon--font-weight('regular'),\\n line-height: 1.29,\\n letter-spacing: 0.16px,\\n) !default;\\n\\n/// @type Map\\n/// @access public\\n/// @group @carbon/type\\n$body-long-01: (\\n font-size: carbon--type-scale(2),\\n font-weight: carbon--font-weight('regular'),\\n line-height: 1.43,\\n letter-spacing: 0.16px,\\n) !default;\\n\\n/// @type Map\\n/// @access public\\n/// @group @carbon/type\\n$body-short-02: (\\n font-size: carbon--type-scale(3),\\n font-weight: carbon--font-weight('regular'),\\n line-height: 1.375,\\n letter-spacing: 0,\\n) !default;\\n\\n/// @type Map\\n/// @access public\\n/// @group @carbon/type\\n$body-long-02: (\\n font-size: carbon--type-scale(3),\\n font-weight: carbon--font-weight('regular'),\\n line-height: 1.5,\\n letter-spacing: 0,\\n) !default;\\n\\n/// @type Map\\n/// @access public\\n/// @group @carbon/type\\n$code-01: (\\n font-family: carbon--font-family('mono'),\\n font-size: carbon--type-scale(1),\\n font-weight: carbon--font-weight('regular'),\\n line-height: 1.34,\\n letter-spacing: 0.32px,\\n) !default;\\n\\n/// @type Map\\n/// @access public\\n/// @group @carbon/type\\n$code-02: (\\n font-family: carbon--font-family('mono'),\\n font-size: carbon--type-scale(2),\\n font-weight: carbon--font-weight('regular'),\\n line-height: 1.43,\\n letter-spacing: 0.32px,\\n) !default;\\n\\n/// @type Map\\n/// @access public\\n/// @group @carbon/type\\n$heading-01: (\\n font-size: carbon--type-scale(2),\\n font-weight: carbon--font-weight('semibold'),\\n line-height: 1.29,\\n letter-spacing: 0.16px,\\n) !default;\\n\\n/// @type Map\\n/// @access public\\n/// @group @carbon/type\\n$productive-heading-01: $heading-01 !default;\\n\\n/// @type Map\\n/// @access public\\n/// @group @carbon/type\\n$heading-02: (\\n font-size: carbon--type-scale(3),\\n font-weight: carbon--font-weight('semibold'),\\n line-height: 1.375,\\n letter-spacing: 0,\\n) !default;\\n\\n/// @type Map\\n/// @access public\\n/// @group @carbon/type\\n$productive-heading-02: $heading-02 !default;\\n\\n/// @type Map\\n/// @access public\\n/// @group @carbon/type\\n$productive-heading-03: (\\n font-size: carbon--type-scale(5),\\n font-weight: carbon--font-weight('regular'),\\n line-height: 1.4,\\n letter-spacing: 0,\\n) !default;\\n\\n/// @type Map\\n/// @access public\\n/// @group @carbon/type\\n$productive-heading-04: (\\n font-size: carbon--type-scale(7),\\n font-weight: carbon--font-weight('regular'),\\n line-height: 1.29,\\n letter-spacing: 0,\\n) !default;\\n\\n/// @type Map\\n/// @access public\\n/// @group @carbon/type\\n$productive-heading-05: (\\n font-size: carbon--type-scale(8),\\n font-weight: carbon--font-weight('regular'),\\n line-height: 1.25,\\n letter-spacing: 0,\\n) !default;\\n\\n/// @type Map\\n/// @access public\\n/// @group @carbon/type\\n$productive-heading-06: (\\n font-size: carbon--type-scale(8),\\n font-weight: carbon--font-weight('light'),\\n // Extra digit needed for precision in Chrome\\n line-height: 1.199,\\n letter-spacing: 0,\\n) !default;\\n\\n/// @type Map\\n/// @access public\\n/// @group @carbon/type\\n$productive-heading-07: (\\n font-size: carbon--type-scale(10),\\n font-weight: carbon--font-weight('light'),\\n line-height: 1.19,\\n letter-spacing: 0,\\n) !default;\\n\\n/// @type Map\\n/// @access public\\n/// @group @carbon/type\\n$expressive-heading-01: map-merge(\\n $heading-01,\\n (\\n line-height: 1.25,\\n )\\n) !default;\\n\\n/// @type Map\\n/// @access public\\n/// @group @carbon/type\\n$expressive-heading-02: map-merge(\\n $heading-02,\\n (\\n line-height: 1.5,\\n )\\n) !default;\\n\\n/// @type Map\\n/// @access public\\n/// @group @carbon/type\\n$expressive-heading-03: (\\n font-size: carbon--type-scale(5),\\n font-weight: carbon--font-weight('regular'),\\n line-height: 1.4,\\n letter-spacing: 0,\\n breakpoints: (\\n xlg: (\\n font-size: carbon--type-scale(5),\\n line-height: 1.25,\\n ),\\n max: (\\n font-size: carbon--type-scale(6),\\n line-height: 1.334,\\n ),\\n ),\\n) !default;\\n\\n/// @type Map\\n/// @access public\\n/// @group @carbon/type\\n$expressive-heading-04: (\\n font-size: carbon--type-scale(7),\\n font-weight: carbon--font-weight('regular'),\\n line-height: 1.29,\\n letter-spacing: 0,\\n breakpoints: (\\n xlg: (\\n font-size: carbon--type-scale(7),\\n line-height: 1.25,\\n ),\\n max: (\\n font-size: carbon--type-scale(8),\\n ),\\n ),\\n) !default;\\n\\n/// @type Map\\n/// @access public\\n/// @group @carbon/type\\n$expressive-heading-05: (\\n font-size: carbon--type-scale(8),\\n font-weight: carbon--font-weight('regular'),\\n line-height: 1.25,\\n letter-spacing: 0,\\n breakpoints: (\\n md: (\\n font-size: carbon--type-scale(9),\\n font-weight: carbon--font-weight('light'),\\n line-height: 1.22,\\n ),\\n lg: (\\n font-size: carbon--type-scale(10),\\n line-height: 1.19,\\n ),\\n xlg: (\\n font-size: carbon--type-scale(11),\\n line-height: 1.17,\\n ),\\n max: (\\n font-size: carbon--type-scale(13),\\n ),\\n ),\\n) !default;\\n\\n/// @type Map\\n/// @access public\\n/// @group @carbon/type\\n$expressive-heading-06: (\\n font-size: carbon--type-scale(8),\\n font-weight: carbon--font-weight('semibold'),\\n line-height: 1.25,\\n letter-spacing: 0,\\n breakpoints: (\\n md: (\\n font-size: carbon--type-scale(9),\\n line-height: 1.22,\\n ),\\n lg: (\\n font-size: carbon--type-scale(10),\\n line-height: 1.19,\\n ),\\n xlg: (\\n font-size: carbon--type-scale(11),\\n line-height: 1.17,\\n ),\\n max: (\\n font-size: carbon--type-scale(13),\\n ),\\n ),\\n) !default;\\n\\n/// @type Map\\n/// @access public\\n/// @group @carbon/type\\n$expressive-paragraph-01: (\\n font-size: carbon--type-scale(6),\\n font-weight: carbon--font-weight('light'),\\n line-height: 1.334,\\n letter-spacing: 0,\\n breakpoints: (\\n lg: (\\n font-size: carbon--type-scale(7),\\n line-height: 1.29,\\n ),\\n max: (\\n font-size: carbon--type-scale(8),\\n line-height: 1.25,\\n ),\\n ),\\n);\\n\\n/// @type Map\\n/// @access public\\n/// @group @carbon/type\\n$quotation-01: (\\n font-size: carbon--type-scale(5),\\n font-weight: carbon--font-weight('regular'),\\n line-height: 1.3,\\n letter-spacing: 0,\\n breakpoints: (\\n md: (\\n font-size: carbon--type-scale(5),\\n ),\\n lg: (\\n font-size: carbon--type-scale(6),\\n line-height: 1.334,\\n ),\\n xlg: (\\n font-size: carbon--type-scale(7),\\n line-height: 1.29,\\n ),\\n max: (\\n font-size: carbon--type-scale(8),\\n line-height: 1.25,\\n ),\\n ),\\n) !default;\\n\\n/// @type Map\\n/// @access public\\n/// @group @carbon/type\\n$quotation-02: (\\n font-size: carbon--type-scale(8),\\n font-weight: carbon--font-weight('light'),\\n line-height: 1.25,\\n letter-spacing: 0,\\n breakpoints: (\\n md: (\\n font-size: carbon--type-scale(9),\\n line-height: 1.22,\\n ),\\n lg: (\\n font-size: carbon--type-scale(10),\\n line-height: 1.19,\\n ),\\n xlg: (\\n font-size: carbon--type-scale(11),\\n line-height: 1.17,\\n ),\\n max: (\\n font-size: carbon--type-scale(13),\\n ),\\n ),\\n) !default;\\n\\n/// @type Map\\n/// @access public\\n/// @group @carbon/type\\n$display-01: (\\n font-size: carbon--type-scale(10),\\n font-weight: carbon--font-weight('light'),\\n line-height: 1.19,\\n letter-spacing: 0,\\n breakpoints: (\\n md: (\\n font-size: carbon--type-scale(10),\\n ),\\n lg: (\\n font-size: carbon--type-scale(12),\\n ),\\n xlg: (\\n font-size: carbon--type-scale(13),\\n line-height: 1.17,\\n ),\\n max: (\\n font-size: carbon--type-scale(15),\\n line-height: 1.13,\\n ),\\n ),\\n) !default;\\n\\n/// @type Map\\n/// @access public\\n/// @group @carbon/type\\n$display-02: (\\n font-size: carbon--type-scale(10),\\n font-weight: carbon--font-weight('semibold'),\\n line-height: 1.19,\\n letter-spacing: 0,\\n breakpoints: (\\n md: (\\n font-size: carbon--type-scale(10),\\n ),\\n lg: (\\n font-size: carbon--type-scale(12),\\n ),\\n xlg: (\\n font-size: carbon--type-scale(13),\\n line-height: 1.16,\\n ),\\n max: (\\n font-size: carbon--type-scale(15),\\n line-height: 1.13,\\n ),\\n ),\\n) !default;\\n\\n/// @type Map\\n/// @access public\\n/// @group @carbon/type\\n$display-03: (\\n font-size: carbon--type-scale(10),\\n font-weight: carbon--font-weight('light'),\\n line-height: 1.19,\\n letter-spacing: 0,\\n breakpoints: (\\n md: (\\n font-size: carbon--type-scale(14),\\n line-height: 1.15,\\n ),\\n lg: (\\n font-size: carbon--type-scale(17),\\n line-height: 1.11,\\n letter-spacing: -0.64px,\\n ),\\n xlg: (\\n font-size: carbon--type-scale(20),\\n line-height: 1.07,\\n letter-spacing: -0.64px,\\n ),\\n max: (\\n font-size: carbon--type-scale(23),\\n line-height: 1.05,\\n letter-spacing: -0.96px,\\n ),\\n ),\\n) !default;\\n\\n/// @type Map\\n/// @access public\\n/// @group @carbon/type\\n$display-04: (\\n font-size: carbon--type-scale(10),\\n font-weight: carbon--font-weight('semibold'),\\n line-height: 1.19,\\n letter-spacing: 0,\\n breakpoints: (\\n md: (\\n font-size: carbon--type-scale(14),\\n line-height: 1.15,\\n ),\\n lg: (\\n font-size: carbon--type-scale(17),\\n line-height: 1.11,\\n letter-spacing: -0.64px,\\n ),\\n xlg: (\\n font-size: carbon--type-scale(20),\\n line-height: 1.07,\\n letter-spacing: -0.64px,\\n ),\\n max: (\\n font-size: carbon--type-scale(23),\\n line-height: 1.05,\\n letter-spacing: -0.96px,\\n ),\\n ),\\n) !default;\\n\\n/// @type Map\\n/// @access public\\n/// @group @carbon/type\\n$tokens: (\\n caption-01: $caption-01,\\n label-01: $label-01,\\n helper-text-01: $helper-text-01,\\n body-short-01: $body-short-01,\\n body-short-02: $body-short-02,\\n body-long-01: $body-long-01,\\n body-long-02: $body-long-02,\\n code-01: $code-01,\\n code-02: $code-02,\\n heading-01: $heading-01,\\n heading-02: $heading-02,\\n productive-heading-01: $productive-heading-01,\\n productive-heading-02: $productive-heading-02,\\n productive-heading-03: $productive-heading-03,\\n productive-heading-04: $productive-heading-04,\\n productive-heading-05: $productive-heading-05,\\n productive-heading-06: $productive-heading-06,\\n productive-heading-07: $productive-heading-07,\\n expressive-paragraph-01: $expressive-paragraph-01,\\n expressive-heading-01: $expressive-heading-01,\\n expressive-heading-02: $expressive-heading-02,\\n expressive-heading-03: $expressive-heading-03,\\n expressive-heading-04: $expressive-heading-04,\\n expressive-heading-05: $expressive-heading-05,\\n expressive-heading-06: $expressive-heading-06,\\n quotation-01: $quotation-01,\\n quotation-02: $quotation-02,\\n display-01: $display-01,\\n display-02: $display-02,\\n display-03: $display-03,\\n display-04: $display-04,\\n);\\n\\n/// @param {Map} $map\\n/// @access public\\n/// @group @carbon/type\\n@mixin properties($map) {\\n @each $name, $value in $map {\\n #{$name}: $value;\\n }\\n}\\n\\n/// @param {Number} $value - Number with units\\n/// @return {Number} Without units\\n/// @access public\\n/// @group @carbon/type\\n@function strip-unit($value) {\\n @return $value / ($value * 0 + 1);\\n}\\n\\n/// This helper includes fluid type styles for the given token value. Fluid type\\n/// means that the `font-size` is computed using `calc()` in order to be\\n/// determined by the screen size instead of a breakpoint. As a result, fluid\\n/// styles should be used with caution in fixed width contexts.\\n///\\n/// In addition, we make use of %-based line-heights so that the line-height of\\n/// each type style is computed correctly due to the dynamic nature of the\\n/// `font-size`.\\n///\\n/// Most of the logic for this work comes from CSS Tricks:\\n/// https://css-tricks.com/snippets/css/fluid-typography/\\n///\\n/// @param {Map} $type-styles - The value of a given type token\\n/// @param {Map} $breakpoints [$carbon--grid-breakpoints] - Custom breakpoints to use\\n/// @access public\\n/// @group @carbon/type\\n@mixin fluid-type($type-styles, $breakpoints: $carbon--grid-breakpoints) {\\n // Include the initial styles for the given token by default without any\\n // media query guard. This includes `font-size` as a fallback in the case\\n // that a browser does not support `calc()`\\n @include properties(map-remove($type-styles, breakpoints));\\n // We also need to include the `sm` styles by default since they don't\\n // appear in the fluid styles for tokens\\n @include fluid-type-size($type-styles, sm, $breakpoints);\\n\\n // Finally, we need to go through all the breakpoints defined in the type\\n // token and apply the properties and fluid type size for that given\\n // breakpoint\\n @each $name, $values in map-get($type-styles, breakpoints) {\\n @include carbon--breakpoint($name) {\\n @include properties($values);\\n @include fluid-type-size($type-styles, $name, $breakpoints);\\n }\\n }\\n}\\n\\n/// Computes the fluid `font-size` for a given type style and breakpoint\\n/// @param {Map} $type-styles - The styles for a given token\\n/// @param {String} $name - The name of the breakpoint to which we apply the fluid\\n/// @param {Map} $breakpoints [$carbon--grid-breakpoints] - The breakpoints for the grid system\\n/// @access public\\n/// @group @carbon/type\\n@mixin fluid-type-size(\\n $type-styles,\\n $name,\\n $breakpoints: $carbon--grid-breakpoints\\n) {\\n // Get the information about the breakpoint we're currently working in. Useful\\n // for getting initial width information\\n $breakpoint: map-get($breakpoints, $name);\\n\\n // Our fluid styles are captured under the 'breakpoints' property in our type\\n // styles map. These define what values to treat as `max-` variables below\\n $fluid-sizes: map-get($type-styles, breakpoints);\\n $fluid-breakpoint: ();\\n // Special case for `sm` because the styles for small are on the type style\\n // directly\\n @if $name == sm {\\n $fluid-breakpoint: map-remove($type-styles, breakpoints);\\n } @else {\\n $fluid-breakpoint: map-get($fluid-sizes, $name);\\n }\\n\\n // Initialize our font-sizes to the default size for the type style\\n $max-font-size: map-get($type-styles, font-size);\\n $min-font-size: map-get($type-styles, font-size);\\n @if map-has-key($fluid-breakpoint, font-size) {\\n $min-font-size: map-get($fluid-breakpoint, font-size);\\n }\\n\\n // Initialize our min and max width to the width of the current breakpoint\\n $max-vw: map-get($breakpoint, width);\\n $min-vw: map-get($breakpoint, width);\\n\\n // We can use `breakpoint-next` to see if there is another breakpoint we can\\n // use to update `max-font-size` and `max-vw` with larger values\\n $next-breakpoint-available: carbon--breakpoint-next($name, $breakpoints);\\n $next-fluid-breakpoint-name: null;\\n\\n // We need to figure out what the next available fluid breakpoint is for our\\n // given $type-styles. In this loop we try and iterate through breakpoints\\n // until we either manually set $next-breakpoint-available to null or\\n // `breakpoint-next` returns null.\\n @while $next-breakpoint-available {\\n @if map-has-key($fluid-sizes, $next-breakpoint-available) {\\n $next-fluid-breakpoint-name: $next-breakpoint-available;\\n $next-breakpoint-available: null;\\n } @else {\\n $next-breakpoint-available: carbon--breakpoint-next(\\n $next-breakpoint-available,\\n $breakpoints\\n );\\n }\\n }\\n\\n // If we have found the next available fluid breakpoint name, then we know\\n // that we have values that we can use to set max-font-size and max-vw as both\\n // values derive from the next breakpoint\\n @if $next-fluid-breakpoint-name {\\n $next-fluid-breakpoint: map-get($breakpoints, $next-fluid-breakpoint-name);\\n $max-font-size: map-get(\\n map-get($fluid-sizes, $next-fluid-breakpoint-name),\\n font-size\\n );\\n $max-vw: map-get($next-fluid-breakpoint, width);\\n\\n // prettier-ignore\\n font-size: calc(#{$min-font-size} +\\n #{strip-unit($max-font-size - $min-font-size)} *\\n ((100vw - #{$min-vw}) / #{strip-unit($max-vw - $min-vw)})\\n );\\n } @else {\\n // Otherwise, just default to setting the font size found from the type\\n // style or the given fluid breakpoint in the type style\\n font-size: $min-font-size;\\n }\\n}\\n\\n// TODO move following variable and `custom-property` mixin into shared file for\\n// both `@carbon/type` and `@carbon/themes`\\n\\n/// @access private\\n/// @group @carbon/type\\n$custom-property-prefix: 'cds' !default;\\n\\n/// @access private\\n/// @group @carbon/type\\n@mixin custom-properties($name, $value) {\\n @each $property, $value in $value {\\n #{$property}: var(\\n --#{$custom-property-prefix}-#{$name}-#{$property},\\n #{$value}\\n );\\n }\\n}\\n\\n/// Helper mixin to include the styles for a given token in any selector in your\\n/// project. Also includes an optional fluid option that will enable fluid\\n/// styles for the token if they are defined. Fluid styles will cause the\\n/// token's font-size to be computed based on the viewport size. As a result, use\\n/// with caution in fixed contexts.\\n/// @param {String} $name - The name of the token to get the styles for\\n/// @param {Boolean} $fluid [false] - Specify whether to include fluid styles for the\\n/// @param {Map} $breakpoints [$carbon--grid-breakpoints] - Provide a custom breakpoint map to use\\n/// @access public\\n/// @group @carbon/type\\n@mixin carbon--type-style(\\n $name,\\n $fluid: false,\\n $breakpoints: $carbon--grid-breakpoints\\n) {\\n @if not map-has-key($tokens, $name) {\\n @error 'Unable to find a token with the name: `#{$name}`';\\n }\\n\\n $token: map-get($tokens, $name);\\n\\n // If $fluid is set to true and the token has breakpoints defined for fluid\\n // styles, delegate to the fluid-type helper for the given token\\n @if $fluid == true and map-has-key($token, 'breakpoints') {\\n @include fluid-type($token, $breakpoints);\\n } @else {\\n @if global-variable-exists('feature-flags') and\\n map-get($feature-flags, 'enable-css-custom-properties')\\n {\\n @include custom-properties($name, $token);\\n } @else {\\n // Otherwise, we just include all the property declarations directly on the\\n // selector\\n @include properties(map-remove($token, 'breakpoints'));\\n }\\n }\\n}\\n\",\"@import \\\"../root.scss\\\";\\n\\n.activeVisitsContainer {\\n background-color: $ui-background;\\n border: 1px solid #e0e0e0;\\n width: 100%;\\n margin: 0 auto;\\n max-width: 95vw;\\n}\\n\\n.activeVisitsDetailHeaderContainer {\\n display: flex;\\n justify-content: space-between;\\n align-items: center;\\n padding: $spacing-04 0 $spacing-04 $spacing-05;\\n background-color: $ui-background;\\n}\\n\\n.productiveHeading02::after {\\n content: \\\"\\\";\\n display: block;\\n width: 2rem;\\n padding-top: 0.188rem;\\n border-bottom: 0.375rem solid #007d79;\\n}\\n\\n.tableContainer section{\\n position: relative;\\n}\\n\\n.tableContainer a {\\n text-decoration: none;\\n}\\n\\n.pagination {\\n overflow: hidden;\\n}\\n\\n.emptyRow {\\n padding: 0 1rem;\\n display: flex;\\n align-items: center;\\n}\\n\\n.activeVisitsTable tr[data-parent-row]:nth-child(odd) td {\\n background-color: #ffffff;\\n}\\n\\n.activeVisitsTable tbody tr[data-parent-row]:nth-child(even) td {\\n background-color: #f4f4f4;\\n}\\n\\n.visitSummaryContainer {\\n width: 100%;\\n max-width: 768px;\\n margin: 1rem auto;\\n}\\n\\n.expandedActiveVisitRow > td > div {\\n max-height: max-content !important;\\n}\\n\\n.expandedActiveVisitRow td {\\n padding: 0 2rem;\\n}\\n\\n.expandedActiveVisitRow th[colspan] td[colspan] > div:first-child {\\n padding: 0 1rem;\\n}\\n\\n\",\"$ui-01: #f4f4f4;\\n$ui-02: #ffffff;\\n$ui-03: #e0e0e0;\\n$ui-04: #8d8d8d;\\n$ui-05: #161616;\\n$text-02: #525252;\\n$text-03: #a8a8a8;\\n$ui-background: #ffffff;\\n$color-gray-30: #c6c6c6;\\n$color-gray-70: #525252;\\n$color-gray-100: #161616;\\n$color-blue-60-2: #0f62fe;\\n$color-yellow-50: #feecae;\\n$carbon--red-50: #fa4d56;\\n$inverse-link: #78a9ff;\\n$support-02: #24a148;\\n$inverse-support-03: #f1c21b;\\n$warning-background: #fff8e1;\\n$openmrs-background-grey: #f4f4f4;\\n$danger: #da1e28;\\n$interactive-01: #0f62fe;\\n$brand-teal-01: #007d79;\\n$brand-01: #005d5d;\\n$brand-02: #004144;\\n$field-01: #f4f4f4;\\n$grey-2: #e0e0e0;\\n$labeldropdown: #c6c6c6;\\n\\n$breakpoint-phone-min: 0px;\\n$breakpoint-phone-max: 600px;\\n$breakpoint-tablet-min: 601px;\\n$breakpoint-tablet-max: 1200px;\\n$breakpoint-desktop-min: 1201px;\\n$breakpoint-desktop-max: 99999999px;\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\n___CSS_LOADER_EXPORT___.locals = {\n\t\"productiveHeading01\": \"-esm-active-visits__active-visits__productiveHeading01___2CsYf\",\n\t\"productiveHeading02\": \"-esm-active-visits__active-visits__productiveHeading02___yB975\",\n\t\"bodyLong01\": \"-esm-active-visits__active-visits__bodyLong01___O-yvQ\",\n\t\"caption01\": \"-esm-active-visits__active-visits__caption01___37OuL\",\n\t\"bodyShort02\": \"-esm-active-visits__active-visits__bodyShort02___nN5Zb\",\n\t\"text02\": \"-esm-active-visits__active-visits__text02___3xPzV\",\n\t\"text01\": \"-esm-active-visits__active-visits__text01___3oxuO\",\n\t\"activeVisitsContainer\": \"-esm-active-visits__active-visits__activeVisitsContainer___3gA5F\",\n\t\"activeVisitsDetailHeaderContainer\": \"-esm-active-visits__active-visits__activeVisitsDetailHeaderContainer___2jM1J\",\n\t\"tableContainer\": \"-esm-active-visits__active-visits__tableContainer___Bejp1\",\n\t\"pagination\": \"-esm-active-visits__active-visits__pagination___1FV6l\",\n\t\"emptyRow\": \"-esm-active-visits__active-visits__emptyRow___3dAQe\",\n\t\"activeVisitsTable\": \"-esm-active-visits__active-visits__activeVisitsTable___2YVfA\",\n\t\"visitSummaryContainer\": \"-esm-active-visits__active-visits__visitSummaryContainer___24Znz\",\n\t\"expandedActiveVisitRow\": \"-esm-active-visits__active-visits__expandedActiveVisitRow___1grsY\"\n};\nexport default ___CSS_LOADER_EXPORT___;\n"],"names":["options","formatDatetime","startDatetime","todayDate","dayjs","get","format","t","useTranslation","desktopView","useLayoutType","config","useConfig","currentPageSize","setPageSize","useState","activeVisits","pageSize","pageSizes","loading","setLoading","setActiveVisits","searchString","setSearchString","headerData","useMemo","id","header","key","useEffect","abortController","AbortController","openmrsFetch","signal","fetchActiveVisits","then","data","rowData","results","map","visit","ind","visitStartTime","IDNumber","patient","identifiers","identifier","name","person","display","gender","age","visitType","patientUuid","uuid","visitUuid","abort","searchResults","trim","search","toLowerCase","filter","activeVisitRow","Object","keys","some","includes","goTo","currentPage","usePagination","handleSearch","useCallback","e","target","value","DataTableSkeleton","className","styles","DataTable","rows","headers","isSortable","getHeaderProps","getTableProps","getBatchActionProps","getRowProps","TableContainer","title","TableToolbar","TableToolbarContent","Search","tabIndex","shouldShowBatchActions","labelText","placeholder","onChange","Table","size","TableHead","TableRow","TableExpandHeader","TableHeader","TableBody","row","TableExpandRow","cells","cell","TableCell","info","ConfigurableLink","to","isExpanded","colSpan","length","ExtensionSlot","extensionSlotName","state","style","height","marginLeft","Pagination","forwardText","backwardText","page","totalItems","___CSS_LOADER_EXPORT___","push","module","locals"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"165.openmrs-esm-active-visits-app.js","mappings":"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","sources":["webpack://@openmrs/esm-active-visits-app/./src/active-visits-widget/active-visits.scss?d2f8","webpack://@openmrs/esm-active-visits-app/./src/active-visits-widget/active-visits.component.tsx","webpack://@openmrs/esm-active-visits-app/./src/active-visits-widget/active-visits.resource.tsx","webpack://@openmrs/esm-active-visits-app/./src/active-visits-widget/active-visits.scss"],"sourcesContent":["import api from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import content from \"!!../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../node_modules/openmrs/node_modules/sass-loader/dist/cjs.js!./active-visits.scss\";\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nexport default content.locals || {};","import React, { useMemo, useEffect, useState, useCallback } from 'react';\nimport DataTable, {\n TableContainer,\n Table,\n TableHead,\n TableRow,\n TableHeader,\n TableBody,\n TableCell,\n TableToolbar,\n TableToolbarContent,\n TableExpandRow,\n TableExpandHeader,\n} from 'carbon-components-react/es/components/DataTable';\nimport DataTableSkeleton from 'carbon-components-react/es/components/DataTableSkeleton';\nimport InlineLoading from 'carbon-components-react/lib/components/InlineLoading';\nimport Pagination from 'carbon-components-react/es/components/Pagination';\nimport Search from 'carbon-components-react/es/components/Search';\nimport { useLayoutType, useConfig, usePagination, ConfigurableLink, ExtensionSlot } from '@openmrs/esm-framework';\nimport { useTranslation } from 'react-i18next';\nimport { ActiveVisit, useActiveVisits } from './active-visits.resource';\nimport styles from './active-visits.scss';\nimport dayjs from 'dayjs';\n\ninterface PaginationData {\n goTo: (page: number) => void;\n results: Array<ActiveVisit>;\n currentPage: number;\n}\n\nconst ActiveVisitsTable = () => {\n const { t } = useTranslation();\n const config = useConfig();\n const layout = useLayoutType();\n\n const { data: activeVisits, isError, isLoading, isValidating } = useActiveVisits();\n\n const desktopView = layout === 'desktop';\n const pageSizes = config?.activeVisits?.pageSizes ?? [10, 20, 50];\n const [currentPageSize, setPageSize] = useState(config?.activeVisits?.pageSize ?? 10);\n const [searchString, setSearchString] = useState('');\n\n const headerData = useMemo(\n () => [\n {\n id: 0,\n header: t('visitStartTime', 'Visit Time'),\n key: 'visitStartTime',\n },\n {\n id: 1,\n header: t('idNumber', 'ID Number'),\n key: 'idNumber',\n },\n {\n id: 2,\n header: t('name', 'Name'),\n key: 'name',\n },\n {\n id: 3,\n header: t('gender', 'Gender'),\n key: 'gender',\n },\n {\n id: 4,\n header: t('age', 'Age'),\n key: 'age',\n },\n {\n id: 5,\n header: t('visitType', 'Visit Type'),\n key: 'visitType',\n },\n ],\n [t],\n );\n\n const rowData = activeVisits.map((visit) => ({\n ...visit,\n visitStartTime: formatDatetime(visit.visitStartTime),\n }));\n\n const searchResults = useMemo(() => {\n if (searchString && searchString.trim() !== '') {\n const search = searchString.toLowerCase();\n return rowData.filter((activeVisitRow) =>\n Object.keys(activeVisitRow).some((header) => {\n if (header === 'patientUuid') {\n return false;\n }\n return `${activeVisitRow[header]}`.toLowerCase().includes(search);\n }),\n );\n } else {\n return rowData;\n }\n }, [searchString, rowData]);\n\n const {\n goTo,\n results: paginatedActiveVisits,\n currentPage,\n }: PaginationData = usePagination(searchResults, currentPageSize);\n\n const handleSearch = useCallback((e) => setSearchString(e.target.value), []);\n\n useEffect(() => {\n if (currentPage !== 1) {\n goTo(1);\n }\n }, [searchString]);\n\n if (isLoading) {\n return <DataTableSkeleton role=\"progressbar\" />;\n }\n if (activeVisits?.length) {\n return (\n <div className={styles.activeVisitsContainer}>\n <div className={styles.activeVisitsDetailHeaderContainer}>\n <h4 className={styles.productiveHeading02}>{t('activeVisits', 'Active Visits')}</h4>\n <div className={styles.backgroundDataFetchingIndicator}>\n <span>{isValidating ? <InlineLoading /> : null}</span>\n </div>\n </div>\n <DataTable rows={paginatedActiveVisits} headers={headerData} isSortable>\n {({ rows, headers, getHeaderProps, getTableProps, getBatchActionProps, getRowProps }) => (\n <TableContainer title=\"\" className={styles.tableContainer}>\n <TableToolbar>\n <TableToolbarContent>\n <Search\n tabIndex={getBatchActionProps().shouldShowBatchActions ? -1 : 0}\n labelText=\"\"\n placeholder={t('filterTable', 'Filter table')}\n onChange={handleSearch}\n />\n </TableToolbarContent>\n </TableToolbar>\n <Table className={styles.activeVisitsTable} {...getTableProps()} size={desktopView ? 'short' : 'normal'}>\n <TableHead>\n <TableRow>\n <TableExpandHeader />\n {headers.map((header) => (\n <TableHeader {...getHeaderProps({ header })}>{header.header}</TableHeader>\n ))}\n </TableRow>\n </TableHead>\n <TableBody>\n {rows.map((row, index) => (\n <React.Fragment key={index}>\n <TableExpandRow {...getRowProps({ row })}>\n {row.cells.map((cell) => (\n <TableCell key={cell.id}>\n {cell.info.header === 'name' ? (\n <ConfigurableLink\n to={`\\${openmrsSpaBase}/patient/${paginatedActiveVisits?.[index]?.patientUuid}/chart/`}>\n {cell.value}\n </ConfigurableLink>\n ) : (\n cell.value\n )}\n </TableCell>\n ))}\n </TableExpandRow>\n {row.isExpanded && (\n <TableRow className={styles.expandedActiveVisitRow}>\n <th colSpan={headers.length + 2}>\n <ExtensionSlot\n className={styles.visitSummaryContainer}\n extensionSlotName=\"visit-summary-slot\"\n state={{\n visitUuid: paginatedActiveVisits[index]?.visitUuid,\n patientUuid: paginatedActiveVisits[index]?.patientUuid,\n }}\n />\n </th>\n </TableRow>\n )}\n </React.Fragment>\n ))}\n </TableBody>\n </Table>\n {rows.length === 0 && (\n <p\n style={{ height: desktopView ? '2rem' : '3rem', marginLeft: desktopView ? '2rem' : '3rem' }}\n className={`${styles.emptyRow} ${styles.bodyLong01}`}>\n {t('noVisitsFound', 'No visits found')}\n </p>\n )}\n <Pagination\n forwardText=\"Next page\"\n backwardText=\"Previous page\"\n page={currentPage}\n pageSize={currentPageSize}\n pageSizes={pageSizes}\n totalItems={searchResults.length}\n className={styles.pagination}\n onChange={({ pageSize, page }) => {\n if (pageSize !== currentPageSize) {\n setPageSize(pageSize);\n }\n if (page !== currentPage) {\n goTo(page);\n }\n }}\n />\n </TableContainer>\n )}\n </DataTable>\n </div>\n );\n }\n};\n\nfunction formatDatetime(startDatetime) {\n const dateToday = dayjs();\n const today =\n dayjs(startDatetime).get('date') === dateToday.get('date') &&\n dayjs(startDatetime).get('month') === dateToday.get('month') &&\n dayjs(startDatetime).get('year') === dateToday.get('year');\n if (today) {\n return `Today - ${dayjs(startDatetime).format('HH:mm')}`;\n } else {\n return dayjs(startDatetime).format(\"DD MMM 'YY - HH:mm\");\n }\n}\n\nexport default ActiveVisitsTable;\n","import useSWR from 'swr';\nimport { openmrsFetch, Visit } from '@openmrs/esm-framework';\n\nexport interface ActiveVisit {\n age: string;\n id: string;\n idNumber: string;\n gender: string;\n name: string;\n patientUuid: string;\n visitStartTime: string;\n visitType: string;\n visitUuid: string;\n}\n\nexport function useActiveVisits() {\n const customRepresentation =\n 'custom:(uuid,patient:(uuid,identifiers:(identifier,uuid),person:(age,display,gender,uuid)),' +\n 'visitType:(uuid,name,display),location:(uuid,name,display),startDatetime,' +\n 'stopDatetime)';\n\n const { data, error, isValidating } = useSWR<{ data: { results: Array<Visit> } }, Error>(\n `/ws/rest/v1/visit?includeInactive=false&v=${customRepresentation}`,\n openmrsFetch,\n );\n\n const mapVisitProperties = (visit: Visit): ActiveVisit => ({\n age: visit?.patient?.person?.age,\n id: visit.uuid,\n idNumber: visit?.patient?.identifiers[0]?.identifier,\n gender: visit?.patient?.person?.gender,\n name: visit?.patient?.person?.display,\n patientUuid: visit?.patient?.uuid,\n visitStartTime: visit.startDate,\n visitType: visit?.visitType?.display,\n visitUuid: visit.uuid,\n });\n\n const formattedActiveVisits = data?.data?.results.length ? data.data.results.map(mapVisitProperties) : [];\n\n return {\n data: formattedActiveVisits,\n isLoading: !data && !error,\n isError: error,\n isValidating,\n };\n}\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".-esm-active-visits__active-visits__productiveHeading01___2CsYf{font-size:.875rem;font-weight:600;line-height:1.29;letter-spacing:.16px}.-esm-active-visits__active-visits__productiveHeading02___yB975{font-size:1rem;font-weight:600;line-height:1.375;letter-spacing:0}.-esm-active-visits__active-visits__bodyLong01___O-yvQ{font-size:.875rem;font-weight:400;line-height:1.43;letter-spacing:.16px}.-esm-active-visits__active-visits__caption01___37OuL{font-size:.75rem;font-weight:400;line-height:1.34;letter-spacing:.32px}.-esm-active-visits__active-visits__bodyShort02___nN5Zb{font-size:1rem;font-weight:400;line-height:1.375;letter-spacing:0}.-esm-active-visits__active-visits__text02___3xPzV{color:#525252}.-esm-active-visits__active-visits__text01___3oxuO{color:#161616}.-esm-active-visits__active-visits__activeVisitsContainer___3gA5F{background-color:#fff;border:1px solid #e0e0e0;width:100%;margin:0 auto;max-width:95vw}.-esm-active-visits__active-visits__activeVisitsDetailHeaderContainer___2jM1J{display:flex;justify-content:space-between;align-items:center;padding:.75rem 0 .75rem 1rem;background-color:#fff}.-esm-active-visits__active-visits__backgroundDataFetchingIndicator___3XjmD{align-items:center;display:flex;flex:1 1 0%;justify-content:center}.-esm-active-visits__active-visits__productiveHeading02___yB975::after{content:\\\"\\\";display:block;width:2rem;padding-top:.188rem;border-bottom:.375rem solid #007d79}.-esm-active-visits__active-visits__tableContainer___Bejp1 section{position:relative}.-esm-active-visits__active-visits__tableContainer___Bejp1 a{text-decoration:none}.-esm-active-visits__active-visits__pagination___1FV6l{overflow:hidden}.-esm-active-visits__active-visits__emptyRow___3dAQe{padding:0 1rem;display:flex;align-items:center}.-esm-active-visits__active-visits__activeVisitsTable___2YVfA tr[data-parent-row]:nth-child(odd) td{background-color:#fff}.-esm-active-visits__active-visits__activeVisitsTable___2YVfA tbody tr[data-parent-row]:nth-child(even) td{background-color:#f4f4f4}.-esm-active-visits__active-visits__visitSummaryContainer___24Znz{width:100%;max-width:768px;margin:1rem auto}.-esm-active-visits__active-visits__expandedActiveVisitRow___1grsY>td>div{max-height:max-content !important}.-esm-active-visits__active-visits__expandedActiveVisitRow___1grsY td{padding:0 2rem}.-esm-active-visits__active-visits__expandedActiveVisitRow___1grsY th[colspan] td[colspan]>div:first-child{padding:0 1rem}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/root.scss\",\"webpack://./../../node_modules/carbon-components/scss/globals/scss/vendor/@carbon/elements/scss/type/_styles.scss\",\"webpack://./src/active-visits-widget/active-visits.scss\",\"webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss\"],\"names\":[],\"mappings\":\"AAGA,gEC4gBI,iBAqLsB,CArLtB,eAqLsB,CArLtB,gBAqLsB,CArLtB,oBAqLsB,CD7rB1B,gECwgBI,cAqLsB,CArLtB,eAqLsB,CArLtB,iBAqLsB,CArLtB,gBAqLsB,CDzrB1B,uDCogBI,iBAqLsB,CArLtB,eAqLsB,CArLtB,gBAqLsB,CArLtB,oBAqLsB,CDrrB1B,sDCggBI,gBAqLsB,CArLtB,eAqLsB,CArLtB,gBAqLsB,CArLtB,oBAqLsB,CDjrB1B,wDC4fI,cAqLsB,CArLtB,eAqLsB,CArLtB,iBAqLsB,CArLtB,gBAqLsB,CD7qB1B,mDACE,aAAA,CAGF,mDACE,aAAA,CE1BF,kEACE,qBCIc,CDHd,wBAAA,CACA,UAAA,CACA,aAAA,CACA,cAAA,CAGF,8EACE,YAAA,CACA,6BAAA,CACA,kBAAA,CACA,4BAAA,CACA,qBCRc,CDWhB,4EACE,kBAAA,CACA,YAAA,CACA,WAAA,CACA,sBAAA,CAGF,uEACE,UAAA,CACA,aAAA,CACA,UAAA,CACA,mBAAA,CACA,mCAAA,CAGF,mEACE,iBAAA,CAGF,6DACE,oBAAA,CAGF,uDACE,eAAA,CAGF,qDACE,cAAA,CACA,YAAA,CACA,kBAAA,CAGF,oGACE,qBAAA,CAGF,2GACE,wBAAA,CAGF,kEACE,UAAA,CACA,eAAA,CACA,gBAAA,CAGF,0EACE,iCAAA,CAGF,sEACE,cAAA,CAGF,2GACE,cAAA\",\"sourcesContent\":[\"@import \\\"carbon-components/scss/globals/scss/typography.scss\\\";\\n@import \\\"~@openmrs/esm-styleguide/src/vars\\\";\\n\\n.productiveHeading01 {\\n @include carbon--type-style(\\\"productive-heading-01\\\");\\n}\\n\\n.productiveHeading02 {\\n @include carbon--type-style(\\\"productive-heading-02\\\");\\n}\\n\\n.bodyLong01 {\\n @include carbon--type-style(\\\"body-long-01\\\");\\n}\\n\\n.caption01 {\\n @include carbon--type-style(\\\"caption-01\\\");\\n}\\n\\n.bodyShort02 {\\n @include carbon--type-style(\\\"body-short-02\\\");\\n}\\n\\n.text02 {\\n color: #525252;\\n}\\n\\n.text01 {\\n color: #161616;\\n}\",\"//\\n// Copyright IBM Corp. 2018, 2018\\n//\\n// This source code is licensed under the Apache-2.0 license found in the\\n// LICENSE file in the root directory of this source tree.\\n//\\n\\n@import '../layout/breakpoint';\\n@import 'font-family';\\n@import 'scale';\\n\\n/// @type Map\\n/// @access public\\n/// @group @carbon/type\\n$caption-01: (\\n font-size: carbon--type-scale(1),\\n font-weight: carbon--font-weight('regular'),\\n line-height: 1.34,\\n letter-spacing: 0.32px,\\n) !default;\\n\\n/// @type Map\\n/// @access public\\n/// @group @carbon/type\\n$label-01: (\\n font-size: carbon--type-scale(1),\\n font-weight: carbon--font-weight('regular'),\\n line-height: 1.34,\\n letter-spacing: 0.32px,\\n) !default;\\n\\n/// @type Map\\n/// @access public\\n/// @group @carbon/type\\n$helper-text-01: (\\n font-size: carbon--type-scale(1),\\n line-height: 1.34,\\n letter-spacing: 0.32px,\\n) !default;\\n\\n/// @type Map\\n/// @access public\\n/// @group @carbon/type\\n$body-short-01: (\\n font-size: carbon--type-scale(2),\\n font-weight: carbon--font-weight('regular'),\\n line-height: 1.29,\\n letter-spacing: 0.16px,\\n) !default;\\n\\n/// @type Map\\n/// @access public\\n/// @group @carbon/type\\n$body-long-01: (\\n font-size: carbon--type-scale(2),\\n font-weight: carbon--font-weight('regular'),\\n line-height: 1.43,\\n letter-spacing: 0.16px,\\n) !default;\\n\\n/// @type Map\\n/// @access public\\n/// @group @carbon/type\\n$body-short-02: (\\n font-size: carbon--type-scale(3),\\n font-weight: carbon--font-weight('regular'),\\n line-height: 1.375,\\n letter-spacing: 0,\\n) !default;\\n\\n/// @type Map\\n/// @access public\\n/// @group @carbon/type\\n$body-long-02: (\\n font-size: carbon--type-scale(3),\\n font-weight: carbon--font-weight('regular'),\\n line-height: 1.5,\\n letter-spacing: 0,\\n) !default;\\n\\n/// @type Map\\n/// @access public\\n/// @group @carbon/type\\n$code-01: (\\n font-family: carbon--font-family('mono'),\\n font-size: carbon--type-scale(1),\\n font-weight: carbon--font-weight('regular'),\\n line-height: 1.34,\\n letter-spacing: 0.32px,\\n) !default;\\n\\n/// @type Map\\n/// @access public\\n/// @group @carbon/type\\n$code-02: (\\n font-family: carbon--font-family('mono'),\\n font-size: carbon--type-scale(2),\\n font-weight: carbon--font-weight('regular'),\\n line-height: 1.43,\\n letter-spacing: 0.32px,\\n) !default;\\n\\n/// @type Map\\n/// @access public\\n/// @group @carbon/type\\n$heading-01: (\\n font-size: carbon--type-scale(2),\\n font-weight: carbon--font-weight('semibold'),\\n line-height: 1.29,\\n letter-spacing: 0.16px,\\n) !default;\\n\\n/// @type Map\\n/// @access public\\n/// @group @carbon/type\\n$productive-heading-01: $heading-01 !default;\\n\\n/// @type Map\\n/// @access public\\n/// @group @carbon/type\\n$heading-02: (\\n font-size: carbon--type-scale(3),\\n font-weight: carbon--font-weight('semibold'),\\n line-height: 1.375,\\n letter-spacing: 0,\\n) !default;\\n\\n/// @type Map\\n/// @access public\\n/// @group @carbon/type\\n$productive-heading-02: $heading-02 !default;\\n\\n/// @type Map\\n/// @access public\\n/// @group @carbon/type\\n$productive-heading-03: (\\n font-size: carbon--type-scale(5),\\n font-weight: carbon--font-weight('regular'),\\n line-height: 1.4,\\n letter-spacing: 0,\\n) !default;\\n\\n/// @type Map\\n/// @access public\\n/// @group @carbon/type\\n$productive-heading-04: (\\n font-size: carbon--type-scale(7),\\n font-weight: carbon--font-weight('regular'),\\n line-height: 1.29,\\n letter-spacing: 0,\\n) !default;\\n\\n/// @type Map\\n/// @access public\\n/// @group @carbon/type\\n$productive-heading-05: (\\n font-size: carbon--type-scale(8),\\n font-weight: carbon--font-weight('regular'),\\n line-height: 1.25,\\n letter-spacing: 0,\\n) !default;\\n\\n/// @type Map\\n/// @access public\\n/// @group @carbon/type\\n$productive-heading-06: (\\n font-size: carbon--type-scale(8),\\n font-weight: carbon--font-weight('light'),\\n // Extra digit needed for precision in Chrome\\n line-height: 1.199,\\n letter-spacing: 0,\\n) !default;\\n\\n/// @type Map\\n/// @access public\\n/// @group @carbon/type\\n$productive-heading-07: (\\n font-size: carbon--type-scale(10),\\n font-weight: carbon--font-weight('light'),\\n line-height: 1.19,\\n letter-spacing: 0,\\n) !default;\\n\\n/// @type Map\\n/// @access public\\n/// @group @carbon/type\\n$expressive-heading-01: map-merge(\\n $heading-01,\\n (\\n line-height: 1.25,\\n )\\n) !default;\\n\\n/// @type Map\\n/// @access public\\n/// @group @carbon/type\\n$expressive-heading-02: map-merge(\\n $heading-02,\\n (\\n line-height: 1.5,\\n )\\n) !default;\\n\\n/// @type Map\\n/// @access public\\n/// @group @carbon/type\\n$expressive-heading-03: (\\n font-size: carbon--type-scale(5),\\n font-weight: carbon--font-weight('regular'),\\n line-height: 1.4,\\n letter-spacing: 0,\\n breakpoints: (\\n xlg: (\\n font-size: carbon--type-scale(5),\\n line-height: 1.25,\\n ),\\n max: (\\n font-size: carbon--type-scale(6),\\n line-height: 1.334,\\n ),\\n ),\\n) !default;\\n\\n/// @type Map\\n/// @access public\\n/// @group @carbon/type\\n$expressive-heading-04: (\\n font-size: carbon--type-scale(7),\\n font-weight: carbon--font-weight('regular'),\\n line-height: 1.29,\\n letter-spacing: 0,\\n breakpoints: (\\n xlg: (\\n font-size: carbon--type-scale(7),\\n line-height: 1.25,\\n ),\\n max: (\\n font-size: carbon--type-scale(8),\\n ),\\n ),\\n) !default;\\n\\n/// @type Map\\n/// @access public\\n/// @group @carbon/type\\n$expressive-heading-05: (\\n font-size: carbon--type-scale(8),\\n font-weight: carbon--font-weight('regular'),\\n line-height: 1.25,\\n letter-spacing: 0,\\n breakpoints: (\\n md: (\\n font-size: carbon--type-scale(9),\\n font-weight: carbon--font-weight('light'),\\n line-height: 1.22,\\n ),\\n lg: (\\n font-size: carbon--type-scale(10),\\n line-height: 1.19,\\n ),\\n xlg: (\\n font-size: carbon--type-scale(11),\\n line-height: 1.17,\\n ),\\n max: (\\n font-size: carbon--type-scale(13),\\n ),\\n ),\\n) !default;\\n\\n/// @type Map\\n/// @access public\\n/// @group @carbon/type\\n$expressive-heading-06: (\\n font-size: carbon--type-scale(8),\\n font-weight: carbon--font-weight('semibold'),\\n line-height: 1.25,\\n letter-spacing: 0,\\n breakpoints: (\\n md: (\\n font-size: carbon--type-scale(9),\\n line-height: 1.22,\\n ),\\n lg: (\\n font-size: carbon--type-scale(10),\\n line-height: 1.19,\\n ),\\n xlg: (\\n font-size: carbon--type-scale(11),\\n line-height: 1.17,\\n ),\\n max: (\\n font-size: carbon--type-scale(13),\\n ),\\n ),\\n) !default;\\n\\n/// @type Map\\n/// @access public\\n/// @group @carbon/type\\n$expressive-paragraph-01: (\\n font-size: carbon--type-scale(6),\\n font-weight: carbon--font-weight('light'),\\n line-height: 1.334,\\n letter-spacing: 0,\\n breakpoints: (\\n lg: (\\n font-size: carbon--type-scale(7),\\n line-height: 1.29,\\n ),\\n max: (\\n font-size: carbon--type-scale(8),\\n line-height: 1.25,\\n ),\\n ),\\n);\\n\\n/// @type Map\\n/// @access public\\n/// @group @carbon/type\\n$quotation-01: (\\n font-size: carbon--type-scale(5),\\n font-weight: carbon--font-weight('regular'),\\n line-height: 1.3,\\n letter-spacing: 0,\\n breakpoints: (\\n md: (\\n font-size: carbon--type-scale(5),\\n ),\\n lg: (\\n font-size: carbon--type-scale(6),\\n line-height: 1.334,\\n ),\\n xlg: (\\n font-size: carbon--type-scale(7),\\n line-height: 1.29,\\n ),\\n max: (\\n font-size: carbon--type-scale(8),\\n line-height: 1.25,\\n ),\\n ),\\n) !default;\\n\\n/// @type Map\\n/// @access public\\n/// @group @carbon/type\\n$quotation-02: (\\n font-size: carbon--type-scale(8),\\n font-weight: carbon--font-weight('light'),\\n line-height: 1.25,\\n letter-spacing: 0,\\n breakpoints: (\\n md: (\\n font-size: carbon--type-scale(9),\\n line-height: 1.22,\\n ),\\n lg: (\\n font-size: carbon--type-scale(10),\\n line-height: 1.19,\\n ),\\n xlg: (\\n font-size: carbon--type-scale(11),\\n line-height: 1.17,\\n ),\\n max: (\\n font-size: carbon--type-scale(13),\\n ),\\n ),\\n) !default;\\n\\n/// @type Map\\n/// @access public\\n/// @group @carbon/type\\n$display-01: (\\n font-size: carbon--type-scale(10),\\n font-weight: carbon--font-weight('light'),\\n line-height: 1.19,\\n letter-spacing: 0,\\n breakpoints: (\\n md: (\\n font-size: carbon--type-scale(10),\\n ),\\n lg: (\\n font-size: carbon--type-scale(12),\\n ),\\n xlg: (\\n font-size: carbon--type-scale(13),\\n line-height: 1.17,\\n ),\\n max: (\\n font-size: carbon--type-scale(15),\\n line-height: 1.13,\\n ),\\n ),\\n) !default;\\n\\n/// @type Map\\n/// @access public\\n/// @group @carbon/type\\n$display-02: (\\n font-size: carbon--type-scale(10),\\n font-weight: carbon--font-weight('semibold'),\\n line-height: 1.19,\\n letter-spacing: 0,\\n breakpoints: (\\n md: (\\n font-size: carbon--type-scale(10),\\n ),\\n lg: (\\n font-size: carbon--type-scale(12),\\n ),\\n xlg: (\\n font-size: carbon--type-scale(13),\\n line-height: 1.16,\\n ),\\n max: (\\n font-size: carbon--type-scale(15),\\n line-height: 1.13,\\n ),\\n ),\\n) !default;\\n\\n/// @type Map\\n/// @access public\\n/// @group @carbon/type\\n$display-03: (\\n font-size: carbon--type-scale(10),\\n font-weight: carbon--font-weight('light'),\\n line-height: 1.19,\\n letter-spacing: 0,\\n breakpoints: (\\n md: (\\n font-size: carbon--type-scale(14),\\n line-height: 1.15,\\n ),\\n lg: (\\n font-size: carbon--type-scale(17),\\n line-height: 1.11,\\n letter-spacing: -0.64px,\\n ),\\n xlg: (\\n font-size: carbon--type-scale(20),\\n line-height: 1.07,\\n letter-spacing: -0.64px,\\n ),\\n max: (\\n font-size: carbon--type-scale(23),\\n line-height: 1.05,\\n letter-spacing: -0.96px,\\n ),\\n ),\\n) !default;\\n\\n/// @type Map\\n/// @access public\\n/// @group @carbon/type\\n$display-04: (\\n font-size: carbon--type-scale(10),\\n font-weight: carbon--font-weight('semibold'),\\n line-height: 1.19,\\n letter-spacing: 0,\\n breakpoints: (\\n md: (\\n font-size: carbon--type-scale(14),\\n line-height: 1.15,\\n ),\\n lg: (\\n font-size: carbon--type-scale(17),\\n line-height: 1.11,\\n letter-spacing: -0.64px,\\n ),\\n xlg: (\\n font-size: carbon--type-scale(20),\\n line-height: 1.07,\\n letter-spacing: -0.64px,\\n ),\\n max: (\\n font-size: carbon--type-scale(23),\\n line-height: 1.05,\\n letter-spacing: -0.96px,\\n ),\\n ),\\n) !default;\\n\\n/// @type Map\\n/// @access public\\n/// @group @carbon/type\\n$tokens: (\\n caption-01: $caption-01,\\n label-01: $label-01,\\n helper-text-01: $helper-text-01,\\n body-short-01: $body-short-01,\\n body-short-02: $body-short-02,\\n body-long-01: $body-long-01,\\n body-long-02: $body-long-02,\\n code-01: $code-01,\\n code-02: $code-02,\\n heading-01: $heading-01,\\n heading-02: $heading-02,\\n productive-heading-01: $productive-heading-01,\\n productive-heading-02: $productive-heading-02,\\n productive-heading-03: $productive-heading-03,\\n productive-heading-04: $productive-heading-04,\\n productive-heading-05: $productive-heading-05,\\n productive-heading-06: $productive-heading-06,\\n productive-heading-07: $productive-heading-07,\\n expressive-paragraph-01: $expressive-paragraph-01,\\n expressive-heading-01: $expressive-heading-01,\\n expressive-heading-02: $expressive-heading-02,\\n expressive-heading-03: $expressive-heading-03,\\n expressive-heading-04: $expressive-heading-04,\\n expressive-heading-05: $expressive-heading-05,\\n expressive-heading-06: $expressive-heading-06,\\n quotation-01: $quotation-01,\\n quotation-02: $quotation-02,\\n display-01: $display-01,\\n display-02: $display-02,\\n display-03: $display-03,\\n display-04: $display-04,\\n);\\n\\n/// @param {Map} $map\\n/// @access public\\n/// @group @carbon/type\\n@mixin properties($map) {\\n @each $name, $value in $map {\\n #{$name}: $value;\\n }\\n}\\n\\n/// @param {Number} $value - Number with units\\n/// @return {Number} Without units\\n/// @access public\\n/// @group @carbon/type\\n@function strip-unit($value) {\\n @return $value / ($value * 0 + 1);\\n}\\n\\n/// This helper includes fluid type styles for the given token value. Fluid type\\n/// means that the `font-size` is computed using `calc()` in order to be\\n/// determined by the screen size instead of a breakpoint. As a result, fluid\\n/// styles should be used with caution in fixed width contexts.\\n///\\n/// In addition, we make use of %-based line-heights so that the line-height of\\n/// each type style is computed correctly due to the dynamic nature of the\\n/// `font-size`.\\n///\\n/// Most of the logic for this work comes from CSS Tricks:\\n/// https://css-tricks.com/snippets/css/fluid-typography/\\n///\\n/// @param {Map} $type-styles - The value of a given type token\\n/// @param {Map} $breakpoints [$carbon--grid-breakpoints] - Custom breakpoints to use\\n/// @access public\\n/// @group @carbon/type\\n@mixin fluid-type($type-styles, $breakpoints: $carbon--grid-breakpoints) {\\n // Include the initial styles for the given token by default without any\\n // media query guard. This includes `font-size` as a fallback in the case\\n // that a browser does not support `calc()`\\n @include properties(map-remove($type-styles, breakpoints));\\n // We also need to include the `sm` styles by default since they don't\\n // appear in the fluid styles for tokens\\n @include fluid-type-size($type-styles, sm, $breakpoints);\\n\\n // Finally, we need to go through all the breakpoints defined in the type\\n // token and apply the properties and fluid type size for that given\\n // breakpoint\\n @each $name, $values in map-get($type-styles, breakpoints) {\\n @include carbon--breakpoint($name) {\\n @include properties($values);\\n @include fluid-type-size($type-styles, $name, $breakpoints);\\n }\\n }\\n}\\n\\n/// Computes the fluid `font-size` for a given type style and breakpoint\\n/// @param {Map} $type-styles - The styles for a given token\\n/// @param {String} $name - The name of the breakpoint to which we apply the fluid\\n/// @param {Map} $breakpoints [$carbon--grid-breakpoints] - The breakpoints for the grid system\\n/// @access public\\n/// @group @carbon/type\\n@mixin fluid-type-size(\\n $type-styles,\\n $name,\\n $breakpoints: $carbon--grid-breakpoints\\n) {\\n // Get the information about the breakpoint we're currently working in. Useful\\n // for getting initial width information\\n $breakpoint: map-get($breakpoints, $name);\\n\\n // Our fluid styles are captured under the 'breakpoints' property in our type\\n // styles map. These define what values to treat as `max-` variables below\\n $fluid-sizes: map-get($type-styles, breakpoints);\\n $fluid-breakpoint: ();\\n // Special case for `sm` because the styles for small are on the type style\\n // directly\\n @if $name == sm {\\n $fluid-breakpoint: map-remove($type-styles, breakpoints);\\n } @else {\\n $fluid-breakpoint: map-get($fluid-sizes, $name);\\n }\\n\\n // Initialize our font-sizes to the default size for the type style\\n $max-font-size: map-get($type-styles, font-size);\\n $min-font-size: map-get($type-styles, font-size);\\n @if map-has-key($fluid-breakpoint, font-size) {\\n $min-font-size: map-get($fluid-breakpoint, font-size);\\n }\\n\\n // Initialize our min and max width to the width of the current breakpoint\\n $max-vw: map-get($breakpoint, width);\\n $min-vw: map-get($breakpoint, width);\\n\\n // We can use `breakpoint-next` to see if there is another breakpoint we can\\n // use to update `max-font-size` and `max-vw` with larger values\\n $next-breakpoint-available: carbon--breakpoint-next($name, $breakpoints);\\n $next-fluid-breakpoint-name: null;\\n\\n // We need to figure out what the next available fluid breakpoint is for our\\n // given $type-styles. In this loop we try and iterate through breakpoints\\n // until we either manually set $next-breakpoint-available to null or\\n // `breakpoint-next` returns null.\\n @while $next-breakpoint-available {\\n @if map-has-key($fluid-sizes, $next-breakpoint-available) {\\n $next-fluid-breakpoint-name: $next-breakpoint-available;\\n $next-breakpoint-available: null;\\n } @else {\\n $next-breakpoint-available: carbon--breakpoint-next(\\n $next-breakpoint-available,\\n $breakpoints\\n );\\n }\\n }\\n\\n // If we have found the next available fluid breakpoint name, then we know\\n // that we have values that we can use to set max-font-size and max-vw as both\\n // values derive from the next breakpoint\\n @if $next-fluid-breakpoint-name {\\n $next-fluid-breakpoint: map-get($breakpoints, $next-fluid-breakpoint-name);\\n $max-font-size: map-get(\\n map-get($fluid-sizes, $next-fluid-breakpoint-name),\\n font-size\\n );\\n $max-vw: map-get($next-fluid-breakpoint, width);\\n\\n // prettier-ignore\\n font-size: calc(#{$min-font-size} +\\n #{strip-unit($max-font-size - $min-font-size)} *\\n ((100vw - #{$min-vw}) / #{strip-unit($max-vw - $min-vw)})\\n );\\n } @else {\\n // Otherwise, just default to setting the font size found from the type\\n // style or the given fluid breakpoint in the type style\\n font-size: $min-font-size;\\n }\\n}\\n\\n// TODO move following variable and `custom-property` mixin into shared file for\\n// both `@carbon/type` and `@carbon/themes`\\n\\n/// @access private\\n/// @group @carbon/type\\n$custom-property-prefix: 'cds' !default;\\n\\n/// @access private\\n/// @group @carbon/type\\n@mixin custom-properties($name, $value) {\\n @each $property, $value in $value {\\n #{$property}: var(\\n --#{$custom-property-prefix}-#{$name}-#{$property},\\n #{$value}\\n );\\n }\\n}\\n\\n/// Helper mixin to include the styles for a given token in any selector in your\\n/// project. Also includes an optional fluid option that will enable fluid\\n/// styles for the token if they are defined. Fluid styles will cause the\\n/// token's font-size to be computed based on the viewport size. As a result, use\\n/// with caution in fixed contexts.\\n/// @param {String} $name - The name of the token to get the styles for\\n/// @param {Boolean} $fluid [false] - Specify whether to include fluid styles for the\\n/// @param {Map} $breakpoints [$carbon--grid-breakpoints] - Provide a custom breakpoint map to use\\n/// @access public\\n/// @group @carbon/type\\n@mixin carbon--type-style(\\n $name,\\n $fluid: false,\\n $breakpoints: $carbon--grid-breakpoints\\n) {\\n @if not map-has-key($tokens, $name) {\\n @error 'Unable to find a token with the name: `#{$name}`';\\n }\\n\\n $token: map-get($tokens, $name);\\n\\n // If $fluid is set to true and the token has breakpoints defined for fluid\\n // styles, delegate to the fluid-type helper for the given token\\n @if $fluid == true and map-has-key($token, 'breakpoints') {\\n @include fluid-type($token, $breakpoints);\\n } @else {\\n @if global-variable-exists('feature-flags') and\\n map-get($feature-flags, 'enable-css-custom-properties')\\n {\\n @include custom-properties($name, $token);\\n } @else {\\n // Otherwise, we just include all the property declarations directly on the\\n // selector\\n @include properties(map-remove($token, 'breakpoints'));\\n }\\n }\\n}\\n\",\"@import \\\"../root.scss\\\";\\n\\n.activeVisitsContainer {\\n background-color: $ui-background;\\n border: 1px solid #e0e0e0;\\n width: 100%;\\n margin: 0 auto;\\n max-width: 95vw;\\n}\\n\\n.activeVisitsDetailHeaderContainer {\\n display: flex;\\n justify-content: space-between;\\n align-items: center;\\n padding: $spacing-04 0 $spacing-04 $spacing-05;\\n background-color: $ui-background;\\n}\\n\\n.backgroundDataFetchingIndicator {\\n align-items: center;\\n display: flex;\\n flex: 1 1 0%;\\n justify-content: center;\\n}\\n\\n.productiveHeading02::after {\\n content: \\\"\\\";\\n display: block;\\n width: 2rem;\\n padding-top: 0.188rem;\\n border-bottom: 0.375rem solid #007d79;\\n}\\n\\n.tableContainer section{\\n position: relative;\\n}\\n\\n.tableContainer a {\\n text-decoration: none;\\n}\\n\\n.pagination {\\n overflow: hidden;\\n}\\n\\n.emptyRow {\\n padding: 0 1rem;\\n display: flex;\\n align-items: center;\\n}\\n\\n.activeVisitsTable tr[data-parent-row]:nth-child(odd) td {\\n background-color: #ffffff;\\n}\\n\\n.activeVisitsTable tbody tr[data-parent-row]:nth-child(even) td {\\n background-color: #f4f4f4;\\n}\\n\\n.visitSummaryContainer {\\n width: 100%;\\n max-width: 768px;\\n margin: 1rem auto;\\n}\\n\\n.expandedActiveVisitRow > td > div {\\n max-height: max-content !important;\\n}\\n\\n.expandedActiveVisitRow td {\\n padding: 0 2rem;\\n}\\n\\n.expandedActiveVisitRow th[colspan] td[colspan] > div:first-child {\\n padding: 0 1rem;\\n}\\n\\n\",\"$ui-01: #f4f4f4;\\n$ui-02: #ffffff;\\n$ui-03: #e0e0e0;\\n$ui-04: #8d8d8d;\\n$ui-05: #161616;\\n$text-02: #525252;\\n$text-03: #a8a8a8;\\n$ui-background: #ffffff;\\n$color-gray-30: #c6c6c6;\\n$color-gray-70: #525252;\\n$color-gray-100: #161616;\\n$color-blue-60-2: #0f62fe;\\n$color-yellow-50: #feecae;\\n$carbon--red-50: #fa4d56;\\n$inverse-link: #78a9ff;\\n$support-02: #24a148;\\n$inverse-support-03: #f1c21b;\\n$warning-background: #fff8e1;\\n$openmrs-background-grey: #f4f4f4;\\n$danger: #da1e28;\\n$interactive-01: #0f62fe;\\n$brand-teal-01: #007d79;\\n$brand-01: #005d5d;\\n$brand-02: #004144;\\n$field-01: #f4f4f4;\\n$grey-2: #e0e0e0;\\n$labeldropdown: #c6c6c6;\\n\\n$breakpoint-phone-min: 0px;\\n$breakpoint-phone-max: 600px;\\n$breakpoint-tablet-min: 601px;\\n$breakpoint-tablet-max: 1200px;\\n$breakpoint-desktop-min: 1201px;\\n$breakpoint-desktop-max: 99999999px;\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\n___CSS_LOADER_EXPORT___.locals = {\n\t\"productiveHeading01\": \"-esm-active-visits__active-visits__productiveHeading01___2CsYf\",\n\t\"productiveHeading02\": \"-esm-active-visits__active-visits__productiveHeading02___yB975\",\n\t\"bodyLong01\": \"-esm-active-visits__active-visits__bodyLong01___O-yvQ\",\n\t\"caption01\": \"-esm-active-visits__active-visits__caption01___37OuL\",\n\t\"bodyShort02\": \"-esm-active-visits__active-visits__bodyShort02___nN5Zb\",\n\t\"text02\": \"-esm-active-visits__active-visits__text02___3xPzV\",\n\t\"text01\": \"-esm-active-visits__active-visits__text01___3oxuO\",\n\t\"activeVisitsContainer\": \"-esm-active-visits__active-visits__activeVisitsContainer___3gA5F\",\n\t\"activeVisitsDetailHeaderContainer\": \"-esm-active-visits__active-visits__activeVisitsDetailHeaderContainer___2jM1J\",\n\t\"backgroundDataFetchingIndicator\": \"-esm-active-visits__active-visits__backgroundDataFetchingIndicator___3XjmD\",\n\t\"tableContainer\": \"-esm-active-visits__active-visits__tableContainer___Bejp1\",\n\t\"pagination\": \"-esm-active-visits__active-visits__pagination___1FV6l\",\n\t\"emptyRow\": \"-esm-active-visits__active-visits__emptyRow___3dAQe\",\n\t\"activeVisitsTable\": \"-esm-active-visits__active-visits__activeVisitsTable___2YVfA\",\n\t\"visitSummaryContainer\": \"-esm-active-visits__active-visits__visitSummaryContainer___24Znz\",\n\t\"expandedActiveVisitRow\": \"-esm-active-visits__active-visits__expandedActiveVisitRow___1grsY\"\n};\nexport default ___CSS_LOADER_EXPORT___;\n"],"names":["options","formatDatetime","startDatetime","dateToday","dayjs","get","format","useTranslation","config","useConfig","layout","useLayoutType","data","activeVisits","isError","isLoading","isValidating","error","useSWR","openmrsFetch","results","length","map","visit","age","patient","person","id","uuid","idNumber","identifiers","identifier","gender","name","display","patientUuid","visitStartTime","startDate","visitType","visitUuid","useActiveVisits","desktopView","pageSizes","currentPageSize","setPageSize","useState","pageSize","searchString","setSearchString","headerData","useMemo","header","t","key","rowData","searchResults","trim","search","toLowerCase","filter","activeVisitRow","Object","keys","some","includes","goTo","paginatedActiveVisits","currentPage","usePagination","handleSearch","useCallback","e","target","value","useEffect","DataTableSkeleton","role","className","styles","InlineLoading","DataTable","rows","headers","isSortable","getHeaderProps","getTableProps","getBatchActionProps","getRowProps","TableContainer","title","TableToolbar","TableToolbarContent","Search","tabIndex","shouldShowBatchActions","labelText","placeholder","onChange","Table","size","TableHead","TableRow","TableExpandHeader","TableHeader","TableBody","row","index","TableExpandRow","cells","cell","TableCell","info","ConfigurableLink","to","isExpanded","colSpan","ExtensionSlot","extensionSlotName","state","style","height","marginLeft","Pagination","forwardText","backwardText","page","totalItems","___CSS_LOADER_EXPORT___","push","module","locals"],"sourceRoot":""}
|