@openmrs/esm-patient-search-app 3.1.1-pre.97 → 4.0.1-pre.331

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/.turbo/turbo-build.log +24 -30
  2. package/dist/123.js +1 -0
  3. package/dist/150.js +1 -2
  4. package/dist/197.js +2 -0
  5. package/dist/197.js.LICENSE.txt +21 -0
  6. package/dist/327.js +1 -0
  7. package/dist/398.js +2 -0
  8. package/dist/398.js.LICENSE.txt +14 -0
  9. package/dist/41.js +1 -0
  10. package/dist/451.js +1 -0
  11. package/dist/574.js +1 -1
  12. package/dist/668.js +1 -0
  13. package/dist/750.js +1 -0
  14. package/dist/759.js +1 -0
  15. package/dist/784.js +1 -2
  16. package/dist/784.js.LICENSE.txt +2 -7
  17. package/dist/{248.js → 815.js} +1 -2
  18. package/dist/858.js +1 -2
  19. package/dist/858.js.LICENSE.txt +2 -0
  20. package/dist/917.js +2 -0
  21. package/dist/917.js.LICENSE.txt +20 -0
  22. package/dist/main.js +1 -0
  23. package/dist/openmrs-esm-patient-search-app.js +1 -1
  24. package/dist/openmrs-esm-patient-search-app.js.buildmanifest.json +272 -76
  25. package/dist/openmrs-esm-patient-search-app.old +1 -2
  26. package/package.json +7 -12
  27. package/src/compact-patient-search/compact-patient-banner.component.tsx +147 -0
  28. package/src/compact-patient-search/compact-patient-banner.scss +59 -0
  29. package/src/compact-patient-search/compact-patient-search.component.tsx +54 -0
  30. package/src/compact-patient-search/compact-patient-search.scss +17 -0
  31. package/src/compact-patient-search/patient-search.component.tsx +130 -0
  32. package/src/compact-patient-search/patient-search.scss +97 -0
  33. package/src/config-schema.ts +12 -0
  34. package/src/index.ts +50 -2
  35. package/src/patient-search-bar/patient-search-bar.component.tsx +64 -0
  36. package/src/patient-search-bar/patient-search-bar.scss +19 -0
  37. package/src/patient-search-button/patient-search-button.component.tsx +45 -0
  38. package/src/patient-search-icon/index.tsx +15 -0
  39. package/src/patient-search-icon/patient-search-icon.component.tsx +59 -153
  40. package/src/patient-search-icon/patient-search-icon.scss +15 -0
  41. package/src/patient-search-overlay/patient-search-overlay.component.tsx +34 -0
  42. package/src/patient-search-page/patient-banner/banner/patient-banner.component.tsx +185 -0
  43. package/src/patient-search-page/patient-banner/banner/patient-banner.scss +87 -0
  44. package/src/patient-search-page/patient-banner/contact-details/contact-details.component.tsx +112 -0
  45. package/src/patient-search-page/patient-banner/contact-details/contact-details.scss +45 -0
  46. package/src/patient-search-page/patient-banner/contact-details/relationships.resource.tsx +83 -0
  47. package/src/patient-search-page/patient-banner/hooks/usePatientAttributes.tsx +42 -0
  48. package/src/patient-search-page/patient-banner/types/index.ts +37 -0
  49. package/src/patient-search-page/patient-banner/ui-components/overflow-menu.component.tsx +96 -0
  50. package/src/patient-search-page/patient-search-lg.component.tsx +189 -0
  51. package/src/patient-search-page/patient-search-lg.scss +81 -0
  52. package/src/patient-search-page/patient-search-page.component.tsx +26 -0
  53. package/src/patient-search-page/patient-search-page.scss +11 -0
  54. package/src/patient-search.resource.tsx +99 -0
  55. package/src/root.component.tsx +15 -0
  56. package/src/root.scss +4 -4
  57. package/src/types/index.ts +55 -23
  58. package/src/{patient-search → ui-components}/empty-data-illustration.component.tsx +2 -2
  59. package/src/ui-components/overlay/index.tsx +40 -0
  60. package/src/ui-components/overlay/overlay.scss +71 -0
  61. package/src/ui-components/pagination/pagination.component.tsx +58 -0
  62. package/src/ui-components/pagination/pagination.scss +20 -0
  63. package/translations/en.json +16 -5
  64. package/dist/144.js +0 -2
  65. package/dist/144.js.map +0 -1
  66. package/dist/150.js.map +0 -1
  67. package/dist/248.js.map +0 -1
  68. package/dist/402.js +0 -2
  69. package/dist/402.js.map +0 -1
  70. package/dist/635.js +0 -3
  71. package/dist/635.js.LICENSE.txt +0 -16
  72. package/dist/635.js.map +0 -1
  73. package/dist/784.js.map +0 -1
  74. package/dist/856.js +0 -3
  75. package/dist/856.js.LICENSE.txt +0 -5
  76. package/dist/856.js.map +0 -1
  77. package/dist/858.js.map +0 -1
  78. package/dist/openmrs-esm-patient-search-app.js.map +0 -1
  79. package/src/patient-search/patient-search.component.tsx +0 -99
  80. package/src/patient-search/patient-search.resource.tsx +0 -9
  81. package/src/patient-search/patient-search.scss +0 -102
  82. package/src/patient-search-icon/patient-search-icon.component.scss +0 -57
  83. package/src/patient-search-result/patient-search-result.component.tsx +0 -80
  84. package/src/patient-search-result/patient-search-result.scss +0 -58
@@ -1,38 +1,32 @@
1
- @openmrs/esm-patient-search-app:build: cache hit, replaying output d7568c904717cc5c
1
+ @openmrs/esm-patient-search-app:build: cache hit, replaying output 310b970279a49c63
2
2
  @openmrs/esm-patient-search-app:build: $ webpack --mode production
3
- @openmrs/esm-patient-search-app:build: assets by chunk 875 KiB (id hint: vendors)
4
- @openmrs/esm-patient-search-app:build:  asset 858.js 470 KiB [emitted] [minimized] [big] (id hint: vendors) 2 related assets
5
- @openmrs/esm-patient-search-app:build:  asset 635.js 228 KiB [emitted] [minimized] (id hint: vendors) 2 related assets
6
- @openmrs/esm-patient-search-app:build:  asset 402.js 85.5 KiB [emitted] [minimized] (id hint: vendors) 1 related asset
7
- @openmrs/esm-patient-search-app:build:  asset 856.js 72.4 KiB [emitted] [minimized] (id hint: vendors) 2 related assets
8
- @openmrs/esm-patient-search-app:build:  asset 248.js 18.7 KiB [emitted] [minimized] (id hint: vendors) 1 related asset
9
- @openmrs/esm-patient-search-app:build: asset 144.js 276 KiB [emitted] [minimized] [big] 1 related asset
10
- @openmrs/esm-patient-search-app:build: asset 784.js 7.19 KiB [emitted] [minimized] 2 related assets
11
- @openmrs/esm-patient-search-app:build: asset openmrs-esm-patient-search-app.js 7.16 KiB [emitted] [minimized] (name: @openmrs/esm-patient-search-app) 1 related asset
12
- @openmrs/esm-patient-search-app:build: asset openmrs-esm-patient-search-app.js.buildmanifest.json 6 KiB [emitted]
13
- @openmrs/esm-patient-search-app:build: asset 150.js 1.39 KiB [emitted] [minimized] 1 related asset
14
- @openmrs/esm-patient-search-app:build: asset 574.js 843 bytes [emitted] [minimized]
15
- @openmrs/esm-patient-search-app:build: asset 319.js 234 bytes [emitted] [minimized]
16
- @openmrs/esm-patient-search-app:build: orphan modules 9.8 MiB (javascript) 42 bytes (consume-shared) [orphan] 571 modules
17
- @openmrs/esm-patient-search-app:build: runtime modules 18.1 KiB 15 modules
18
- @openmrs/esm-patient-search-app:build: built modules 2.75 MiB (javascript) 210 bytes (share-init) 168 bytes (consume-shared) [built]
19
- @openmrs/esm-patient-search-app:build:  modules by path ../../node_modules/ 2.47 MiB 77 modules
20
- @openmrs/esm-patient-search-app:build:  modules by path ./ 293 KiB
21
- @openmrs/esm-patient-search-app:build:  javascript modules 293 KiB 6 modules
22
- @openmrs/esm-patient-search-app:build:  optional modules 758 bytes [optional] 2 modules
23
- @openmrs/esm-patient-search-app:build:  provide-module modules 210 bytes
24
- @openmrs/esm-patient-search-app:build:  provide shared module (default) @openmrs/esm-framework@3.3.2-pre.13 = ../../node_modules/@openmrs/esm-framework/src/internal.ts 42 bytes [built] [code generated]
25
- @openmrs/esm-patient-search-app:build:  + 4 modules
3
+ @openmrs/esm-patient-search-app:build: assets by chunk 1.44 MiB (id hint: vendors)
4
+ @openmrs/esm-patient-search-app:build:  asset 858.js 1.33 MiB [emitted] [minimized] [big] (id hint: vendors) 1 related asset
5
+ @openmrs/esm-patient-search-app:build:  asset 917.js 77.2 KiB [emitted] [minimized] (id hint: vendors) 1 related asset
6
+ @openmrs/esm-patient-search-app:build:  asset 815.js 18.6 KiB [emitted] [minimized] (id hint: vendors)
7
+ @openmrs/esm-patient-search-app:build:  asset 197.js 16.8 KiB [emitted] [minimized] (id hint: vendors) 1 related asset
8
+ @openmrs/esm-patient-search-app:build:  asset 398.js 2.47 KiB [emitted] [minimized] (id hint: vendors) 1 related asset
9
+ @openmrs/esm-patient-search-app:build:  asset 759.js 843 bytes [emitted] [minimized] (id hint: vendors)
10
+ @openmrs/esm-patient-search-app:build: + 13 assets
11
+ @openmrs/esm-patient-search-app:build: orphan modules 3.53 MiB [orphan] 439 modules
12
+ @openmrs/esm-patient-search-app:build: runtime modules 38 KiB 28 modules
13
+ @openmrs/esm-patient-search-app:build: built modules 2.58 MiB (javascript) 168 bytes (share-init) 168 bytes (consume-shared) [built]
14
+ @openmrs/esm-patient-search-app:build:  javascript modules 2.58 MiB 63 modules
15
+ @openmrs/esm-patient-search-app:build:  provide-module modules 168 bytes
16
+ @openmrs/esm-patient-search-app:build:  provide shared module (default) @openmrs/esm-framework@4.0.0-pre.1 = ../../node_modules/@openmrs/esm-framework/src/internal.ts 42 bytes [built] [code generated]
17
+ @openmrs/esm-patient-search-app:build:  provide shared module (default) react-i18next@11.16.9 = ../../node_modules/react-i18next/dist/es/index.js 42 bytes [built] [code generated]
18
+ @openmrs/esm-patient-search-app:build:  + 2 modules
26
19
  @openmrs/esm-patient-search-app:build:  consume-shared-module modules 168 bytes
27
- @openmrs/esm-patient-search-app:build:  consume shared module (default) @openmrs/esm-framework@^3 (singleton) (fallback: ../../node_modules/@openmrs/esm-framework/src/internal.ts) 42 bytes [built] [code generated]
28
- @openmrs/esm-patient-search-app:build:  consume shared module (default) react@^16 (singleton) (fallback: ../../node_modules/react/index.js) 42 bytes [built] [code generated]
20
+ @openmrs/esm-patient-search-app:build:  consume shared module (default) @openmrs/esm-framework@^4 (singleton) (fallback: ../../node_modules/@openmrs/esm-framework/src/internal.ts) 42 bytes [built] [code generated]
21
+ @openmrs/esm-patient-search-app:build:  consume shared module (default) react@^18.1.0 (singleton) (fallback: ../../node_modules/react/index.js) 42 bytes [built] [code generated]
29
22
  @openmrs/esm-patient-search-app:build:  + 2 modules
30
- @openmrs/esm-patient-search-app:build:  container entry 42 bytes [built] [code generated]
23
+ @openmrs/esm-patient-search-app:build:  optional modules 959 bytes [optional]
24
+ @openmrs/esm-patient-search-app:build:  ./translations/en.json 884 bytes [optional] [built] [code generated]
25
+ @openmrs/esm-patient-search-app:build:  ./translations/es.json 75 bytes [optional] [built] [code generated]
31
26
  @openmrs/esm-patient-search-app:build: 
32
27
  @openmrs/esm-patient-search-app:build: WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
33
28
  @openmrs/esm-patient-search-app:build: This can impact web performance.
34
29
  @openmrs/esm-patient-search-app:build: Assets:
35
- @openmrs/esm-patient-search-app:build:  144.js (276 KiB)
36
- @openmrs/esm-patient-search-app:build:  858.js (470 KiB)
30
+ @openmrs/esm-patient-search-app:build:  858.js (1.33 MiB)
37
31
  @openmrs/esm-patient-search-app:build: 
38
- @openmrs/esm-patient-search-app:build: webpack 5.72.1 compiled with 1 warning in 152077 ms
32
+ @openmrs/esm-patient-search-app:build: webpack 5.74.0 compiled with 1 warning in 227589 ms
package/dist/123.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_openmrs_esm_patient_search_app=self.webpackChunk_openmrs_esm_patient_search_app||[]).push([[123],{2102:(e,t,a)=>{a.d(t,{Z:()=>o});var n=a(2609),r=a.n(n)()((function(e){return e[1]}));r.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-patient-search__patient-search-icon__patientSearchIconWrapper___XbSER{display:flex;justify-content:flex-end;align-items:center}.-esm-patient-search__patient-search-icon__searchIconButton___boGDs{background-color:#005d5d;background-color:var(--brand-01)}.-esm-patient-search__patient-search-icon__activeSearchIconButton___D2NlS{background-color:#004144;background-color:var(--brand-02)}",""]),r.locals={patientSearchIconWrapper:"-esm-patient-search__patient-search-icon__patientSearchIconWrapper___XbSER",searchIconButton:"-esm-patient-search__patient-search-icon__searchIconButton___boGDs",activeSearchIconButton:"-esm-patient-search__patient-search-icon__activeSearchIconButton___D2NlS"};const o=r},8969:(e,t,a)=>{a.d(t,{Z:()=>o});var n=a(2609),r=a.n(n)()((function(e){return e[1]}));r.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}:root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-patient-search__overlay__productiveHeading01___ic9zG{font-size:var(--cds-heading-compact-01-font-size, 0.875rem);font-weight:var(--cds-heading-compact-01-font-weight, 600);line-height:var(--cds-heading-compact-01-line-height, 1.28572);letter-spacing:var(--cds-heading-compact-01-letter-spacing, 0.16px)}.-esm-patient-search__overlay__productiveHeading02___D3gmi{font-size:var(--cds-heading-compact-02-font-size, 1rem);font-weight:var(--cds-heading-compact-02-font-weight, 600);line-height:var(--cds-heading-compact-02-line-height, 1.375);letter-spacing:var(--cds-heading-compact-02-letter-spacing, 0)}.-esm-patient-search__overlay__bodyLong01___cyat\\+{font-size:var(--cds-body-01-font-size, 0.875rem);font-weight:var(--cds-body-01-font-weight, 400);line-height:var(--cds-body-01-line-height, 1.42857);letter-spacing:var(--cds-body-01-letter-spacing, 0.16px)}.-esm-patient-search__overlay__desktopOverlay___c0bkT{position:fixed;top:3rem;right:0;height:calc(100vh - 3rem);min-width:33rem;background-color:#f4f4f4;border-left:1px solid #a8a8a8;overflow:hidden;display:grid;grid-template-rows:auto 1fr auto;z-index:999}.-esm-patient-search__overlay__tabletOverlay___8\\+0os{position:fixed;top:0;bottom:0;left:0;right:0;z-index:9999;background-color:#f4f4f4;overflow:hidden;padding-top:3rem;display:grid;grid-template-rows:1fr auto}.-esm-patient-search__overlay__tabletOverlayHeader___-3WeY button{background-color:#005d5d !important}.-esm-patient-search__overlay__tabletOverlayHeader___-3WeY .-esm-patient-search__overlay__headerContent___we2It{color:#fff}.-esm-patient-search__overlay__desktopHeader___GM2sn{display:flex;justify-content:space-between;align-items:center;background-color:#e0e0e0;border-bottom:1px solid #a8a8a8}.-esm-patient-search__overlay__headerContent___we2It{font-size:var(--cds-heading-compact-02-font-size, 1rem);font-weight:var(--cds-heading-compact-02-font-weight, 600);line-height:var(--cds-heading-compact-02-line-height, 1.375);letter-spacing:var(--cds-heading-compact-02-letter-spacing, 0);padding:0 1rem;color:#161616}.-esm-patient-search__overlay__closeButton___pIoiQ{background-color:#fff}.-esm-patient-search__overlay__overlayContent___lLbW7{overflow-y:auto}.-esm-patient-search__overlay__buttonsGroup___QM1SB{align-self:end}.-esm-patient-search__overlay__buttonsGroup___QM1SB button{max-width:unset !important}",""]),r.locals={productiveHeading01:"-esm-patient-search__overlay__productiveHeading01___ic9zG",productiveHeading02:"-esm-patient-search__overlay__productiveHeading02___D3gmi",bodyLong01:"-esm-patient-search__overlay__bodyLong01___cyat+",desktopOverlay:"-esm-patient-search__overlay__desktopOverlay___c0bkT",tabletOverlay:"-esm-patient-search__overlay__tabletOverlay___8+0os",tabletOverlayHeader:"-esm-patient-search__overlay__tabletOverlayHeader___-3WeY",headerContent:"-esm-patient-search__overlay__headerContent___we2It",desktopHeader:"-esm-patient-search__overlay__desktopHeader___GM2sn",closeButton:"-esm-patient-search__overlay__closeButton___pIoiQ",overlayContent:"-esm-patient-search__overlay__overlayContent___lLbW7",buttonsGroup:"-esm-patient-search__overlay__buttonsGroup___QM1SB"};const o=r},5123:(e,t,a)=>{a.r(t),a.d(t,{default:()=>A});var n=a(5206),r=a.n(n),o=a(7228),c=a(4924),l=a(8294),i=a(2074),s=a(3469),_=a(906),d=a(5148),u=a(1041),p=a(6062),h=a.n(p),m=a(4036),v=a.n(m),y=a(6793),f=a.n(y),b=a(7892),g=a.n(b),S=a(1173),k=a.n(S),w=a(2464),E=a.n(w),I=a(2102),C={};C.styleTagTransform=E(),C.setAttributes=g(),C.insert=f().bind(null,"head"),C.domAPI=v(),C.insertStyleElement=k(),h()(I.Z,C);const O=I.Z&&I.Z.locals?I.Z.locals:void 0;function B(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a<t;a++)n[a]=e[a];return n}function x(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var n,r,o=[],c=!0,l=!1;try{for(a=a.call(e);!(c=(n=a.next()).done)&&(o.push(n.value),!t||o.length!==t);c=!0);}catch(e){l=!0,r=e}finally{try{c||null==a.return||a.return()}finally{if(l)throw r}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return B(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(a):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?B(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const z=function(e){var t,a,o,p,h,m,v=(0,c.useTranslation)().t,y=(0,_.useLayoutType)(),f=null===(o=null==e||null===(t=e.location)||void 0===t||null===(a=t.pathname)||void 0===a?void 0:a.split("/"))||void 0===o?void 0:o[1],b="search"===f?null===(m=null==e||null===(p=e.location)||void 0===p||null===(h=p.pathname)||void 0===h?void 0:h.split("/"))||void 0===m?void 0:m[2]:"",g=x((0,n.useState)(!1),2),S=g[0],k=g[1],w=x((0,n.useState)(!1),2),E=w[0],I=w[1],C=(0,n.useCallback)((function(){"search"!==f&&k(!1)}),[k,f]),B=(0,_.useOnClickOutside)(C,E),z=(0,n.useCallback)((function(){var e;S?("search"===f&&((0,_.navigate)({to:null!==(e=window.localStorage.getItem("searchReturnUrl"))&&void 0!==e?e:"${openmrsSpaBase}/"}),window.localStorage.removeItem("searchReturnUrl")),k(!1)):k(!0)}),[f,k,S]);return(0,n.useEffect)((function(){k("search"===f),"search"===f&&I(!1)}),[f]),(0,n.useEffect)((function(){I(!!S)}),[S]),r().createElement("div",{className:O.patientSearchIconWrapper,ref:B},S&&((0,_.isDesktop)(y)?r().createElement(u.default,{query:b,searchPage:"search"===f}):r().createElement(d.Z,{onClose:z,query:b})),r().createElement("div",{className:"".concat(S&&O.closeButton)},r().createElement(l.JMr,{"aria-label":v("searchPatient","Search Patient"),"aria-labelledby":"Search Patient",className:"".concat(S?O.activeSearchIconButton:O.searchIconButton),name:"SearchPatientIcon",onClick:z},S?r().createElement(i.x8,{size:20}):r().createElement(s.ol,{size:20}))))},A=function(){return r().createElement(o.BrowserRouter,{basename:window.getOpenmrsSpaBase()},r().createElement(o.Routes,null,r().createElement(o.Route,{path:"/",element:r().createElement(z,null)})))}},5148:(e,t,a)=>{a.d(t,{Z:()=>x});var n=a(5206),r=a.n(n),o=a(4924),c=a(8294),l=a(2074),i=a(6759),s=a(906),_=a(6062),d=a.n(_),u=a(4036),p=a.n(u),h=a(6793),m=a.n(h),v=a(7892),y=a.n(v),f=a(1173),b=a.n(f),g=a(2464),S=a.n(g),k=a(8969),w={};w.styleTagTransform=S(),w.setAttributes=y(),w.insert=m().bind(null,"head"),w.domAPI=p(),w.insertStyleElement=b(),d()(k.Z,w);const E=k.Z&&k.Z.locals?k.Z.locals:void 0,I=function(e){var t=e.close,a=e.children,n=e.header,o=e.buttonsGroup,_=(0,s.useLayoutType)();return r().createElement("div",{className:(0,s.isDesktop)(_)?E.desktopOverlay:E.tabletOverlay},(0,s.isDesktop)(_)?r().createElement("div",{className:E.desktopHeader},r().createElement("div",{className:E.headerContent},n),r().createElement(c.zxk,{className:E.closeButton,onClick:t,kind:"ghost",hasIconOnly:!0},r().createElement(l.x8,{size:16}))):r().createElement(c.h4i,{className:E.tabletOverlayHeader,"aria-label":"Close overlay"},r().createElement(c.zxk,{onClick:t,hasIconOnly:!0},r().createElement(i.Xd,{size:16,onClick:t})),r().createElement("div",{className:E.headerContent},n)),r().createElement("div",{className:E.overlayContent},a),r().createElement("div",{className:E.buttonsGroup},o))};var C=a(4557),O=a(1668);function B(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a<t;a++)n[a]=e[a];return n}const x=function(e){var t,a,c=e.onClose,l=e.query,i=e.header,s=e.onPatientSelect,_=(0,o.useTranslation)().t,d=(t=(0,n.useState)(l),a=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var n,r,o=[],c=!0,l=!1;try{for(a=a.call(e);!(c=(n=a.next()).done)&&(o.push(n.value),!t||o.length!==t);c=!0);}catch(e){l=!0,r=e}finally{try{c||null==a.return||a.return()}finally{if(l)throw r}}return o}}(t,a)||function(e,t){if(e){if("string"==typeof e)return B(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(a):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?B(e,t):void 0}}(t,a)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),u=d[0],p=d[1],h=(0,n.useCallback)((function(){return p("")}),[p]);return(0,n.useEffect)((function(){l&&p(l)}),[l]),r().createElement(I,{header:null!=i?i:_("searchResults","Search results"),close:c},r().createElement(C.Z,{initialSearchTerm:l,onSubmit:p,onClear:h}),u&&r().createElement(O.Z,{onPatientSelect:s,query:u,inTabletOrOverlay:!0}))}}}]);
package/dist/150.js CHANGED
@@ -1,2 +1 @@
1
- (self.webpackChunk_openmrs_esm_patient_search_app=self.webpackChunk_openmrs_esm_patient_search_app||[]).push([[150],{150:(e,t,n)=>{"use strict";n.r(t),n.d(t,{backendDependencies:()=>i,frontendDependencies:()=>p,importTranslation:()=>s,setupOpenMRS:()=>o});var a=n(3066),r={search:{patientResultUrl:{_default:"${openmrsSpaBase}/patient/${patientUuid}/chart",_description:"Where clicking a patient result takes the user. Accepts template parameter ${patientUuid}",_validators:[a.validators.isUrlWithTemplateParameters(["patientUuid"])]}},includeDead:{_type:a.Type.Boolean,_default:!0,_description:"Whether to include dead patients in search results"}},s=n(3979),i={"webservices.rest":"^2.2.0"},p={"@openmrs/esm-framework":"^3.3.2-pre.13"};function o(){var e="@openmrs/esm-patient-search-app",t={featureName:"patient-search",moduleName:e};return(0,a.defineConfigSchema)(e,r),{extensions:[{id:"patient-search-icon",slot:"top-nav-actions-slot",order:0,load:(0,a.getAsyncLifecycle)((function(){return Promise.all([n.e(856),n.e(902),n.e(144)]).then(n.bind(n,5996))}),t)}]}}},3979:(e,t,n)=>{var a={"./en.json":[3574,574],"./es.json":[8319,319]};function r(e){if(!n.o(a,e))return Promise.resolve().then((()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=a[e],r=t[0];return n.e(t[1]).then((()=>n(r)))}r.keys=()=>Object.keys(a),r.id=3979,e.exports=r}}]);
2
- //# sourceMappingURL=150.js.map
1
+ (self.webpackChunk_openmrs_esm_patient_search_app=self.webpackChunk_openmrs_esm_patient_search_app||[]).push([[150],{5047:t=>{var e=function(t){"use strict";var e,r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=e&&e.prototype instanceof v?e:v,i=Object.create(o.prototype),a=new j(n||[]);return i._invoke=function(t,e,r){var n=l;return function(o,i){if(n===p)throw new Error("Generator is already running");if(n===d){if("throw"===o)throw i;return N()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=k(a,r);if(c){if(c===y)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===l)throw n=d,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var u=h(t,e,r);if("normal"===u.type){if(n=r.done?d:f,u.arg===y)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n=d,r.method="throw",r.arg=u.arg)}}}(t,r,a),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var l="suspendedStart",f="suspendedYield",p="executing",d="completed",y={};function v(){}function m(){}function g(){}var w={};u(w,i,(function(){return this}));var b=Object.getPrototypeOf,_=b&&b(b(T([])));_&&_!==r&&n.call(_,i)&&(w=_);var x=g.prototype=v.prototype=Object.create(w);function L(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(o,i,a,c){var u=h(t[o],t,i);if("throw"!==u.type){var s=u.arg,l=s.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(l).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var o;this._invoke=function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}}function k(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method))return y;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var o=h(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,y;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function T(t){if(t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}return{next:N}}function N(){return{value:e,done:!0}}return m.prototype=g,u(x,"constructor",g),u(g,"constructor",m),m.displayName=u(g,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,u(t,c,"GeneratorFunction")),t.prototype=Object.create(x),t},t.awrap=function(t){return{__await:t}},L(E.prototype),u(E.prototype,a,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new E(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},L(x),u(x,c,"Generator"),u(x,i,(function(){return this})),u(x,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=T,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return c.type="throw",c.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(u&&s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}},150:(t,e,r)=>{"use strict";r.r(e),r.d(e,{backendDependencies:()=>h,frontendDependencies:()=>l,importTranslation:()=>s,setupOpenMRS:()=>f});var n=r(5047),o=r.n(n),i=r(906),a={search:{patientResultUrl:{_default:"${openmrsSpaBase}/patient/${patientUuid}/chart",_description:"Where clicking a patient result takes the user. Accepts template parameter ${patientUuid}",_validators:[i.validators.isUrlWithTemplateParameters(["patientUuid"])]}},includeDead:{_type:i.Type.Boolean,_default:!0,_description:"Whether to include dead patients in search results"},contactAttributeType:{_type:i.Type.Array,_elements:{_type:i.Type.UUID},_default:["14d4f066-15f5-102d-96e4-000c29c2a5d7","e3d177ee-04ad-11ed-828d-0242ac1e0002"]}};function c(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function u(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){c(i,n,o,a,u,"next",t)}function u(t){c(i,n,o,a,u,"throw",t)}a(void 0)}))}}var s=r(3979),h={"webservices.rest":"^2.2.0"},l={"@openmrs/esm-framework":"^4.0.0-pre.1"};function f(){var t="@openmrs/esm-patient-search-app",e={featureName:"patient-search",moduleName:t};return(0,i.defineConfigSchema)(t,a),(0,i.setupDynamicOfflineDataHandler)({id:"esm-patient-search-app:patient",type:"patient",displayName:"Patient search",isSynced:function(t){return u(o().mark((function e(){var r,n,a,c;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=["/ws/fhir2/R4/Patient/".concat(t)],n=r.map((function(t){return window.origin+(0,i.makeUrl)(t)})),e.next=4,caches.open("omrs-spa-cache-v1");case 4:return a=e.sent,e.next=7,a.keys();case 7:return c=e.sent.map((function(t){return t.url})),e.abrupt("return",n.every((function(t){return c.includes(t)})));case 9:case"end":return e.stop()}}),e)})))()},sync:function(t){return u(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,i.messageOmrsServiceWorker)({type:"registerDynamicRoute",pattern:"/ws/fhir2/R4/Patient/".concat(t)});case 2:return e.next=4,(0,i.fetchCurrentPatient)(t);case 4:case"end":return e.stop()}}),e)})))()}}),{pages:[{route:/^search/,load:(0,i.getAsyncLifecycle)((function(){return Promise.all([r.e(917),r.e(398),r.e(206),r.e(924),r.e(668),r.e(228),r.e(750)]).then(r.bind(r,2750))}),e)}],extensions:[{id:"patient-search-icon",slot:"top-nav-actions-slot",order:0,load:(0,i.getAsyncLifecycle)((function(){return Promise.all([r.e(917),r.e(398),r.e(759),r.e(206),r.e(924),r.e(668),r.e(41),r.e(228),r.e(123)]).then(r.bind(r,5123))}),e)},{id:"patient-search-button",slot:"patient-search-button-slot",load:(0,i.getAsyncLifecycle)((function(){return Promise.all([r.e(917),r.e(398),r.e(759),r.e(206),r.e(924),r.e(668),r.e(327)]).then(r.bind(r,1327))}),e),offline:!0},{id:"patient-search-bar",slot:"patient-search-bar-slot",load:(0,i.getAsyncLifecycle)((function(){return Promise.all([r.e(917),r.e(206),r.e(924),r.e(41),r.e(451)]).then(r.bind(r,1041))}),e),offline:!0}]}}},3979:(t,e,r)=>{var n={"./en.json":[3574,574],"./es.json":[8319,319]};function o(t){if(!r.o(n,t))return Promise.resolve().then((()=>{var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}));var e=n[t],o=e[0];return r.e(e[1]).then((()=>r(o)))}o.keys=()=>Object.keys(n),o.id=3979,t.exports=o}}]);
package/dist/197.js ADDED
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 197.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunk_openmrs_esm_patient_search_app=self.webpackChunk_openmrs_esm_patient_search_app||[]).push([[197],{3197:(e,t,n)=>{n.r(t),n.d(t,{BrowserRouter:()=>re,HashRouter:()=>ie,Link:()=>ue,MemoryRouter:()=>V,NavLink:()=>ce,Navigate:()=>q,NavigationType:()=>a,Outlet:()=>z,Route:()=>G,Router:()=>Q,Routes:()=>X,UNSAFE_LocationContext:()=>d,UNSAFE_NavigationContext:()=>v,UNSAFE_RouteContext:()=>m,createPath:()=>f,createRoutesFromChildren:()=>Y,createSearchParams:()=>he,generatePath:()=>y,matchPath:()=>w,matchRoutes:()=>b,parsePath:()=>p,renderMatches:()=>Z,resolvePath:()=>S,unstable_HistoryRouter:()=>oe,useHref:()=>$,useInRouterContext:()=>_,useLinkClickHandler:()=>le,useLocation:()=>j,useMatch:()=>W,useNavigate:()=>H,useNavigationType:()=>B,useOutlet:()=>U,useOutletContext:()=>I,useParams:()=>F,useResolvedPath:()=>D,useRoutes:()=>J,useSearchParams:()=>se});var a,r=n(5206);function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},i.apply(this,arguments)}!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(a||(a={}));var o="beforeunload",u="popstate";function c(e,t,n){return Math.min(Math.max(e,t),n)}function l(e){e.preventDefault(),e.returnValue=""}function s(){var e=[];return{get length(){return e.length},push:function(t){return e.push(t),function(){e=e.filter((function(e){return e!==t}))}},call:function(t){e.forEach((function(e){return e&&e(t)}))}}}function h(){return Math.random().toString(36).substr(2,8)}function f(e){var t=e.pathname,n=void 0===t?"/":t,a=e.search,r=void 0===a?"":a,i=e.hash,o=void 0===i?"":i;return r&&"?"!==r&&(n+="?"===r.charAt(0)?r:"?"+r),o&&"#"!==o&&(n+="#"===o.charAt(0)?o:"#"+o),n}function p(e){var t={};if(e){var n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));var a=e.indexOf("?");a>=0&&(t.search=e.substr(a),e=e.substr(0,a)),e&&(t.pathname=e)}return t}const v=(0,r.createContext)(null),d=(0,r.createContext)(null),m=(0,r.createContext)({outlet:null,matches:[]});function g(e,t){if(!e)throw new Error(t)}function y(e,t){return void 0===t&&(t={}),e.replace(/:(\w+)/g,((e,n)=>(null==t[n]&&g(!1),t[n]))).replace(/\/*\*$/,(e=>null==t["*"]?"":t["*"].replace(/^\/*/,"/")))}function b(e,t,n){void 0===n&&(n="/");let a=O(("string"==typeof t?p(t):t).pathname||"/",n);if(null==a)return null;let r=x(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){return e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]))?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(r);let i=null;for(let e=0;null==i&&e<r.length;++e)i=C(r[e],a);return i}function x(e,t,n,a){return void 0===t&&(t=[]),void 0===n&&(n=[]),void 0===a&&(a=""),e.forEach(((e,r)=>{let i={relativePath:e.path||"",caseSensitive:!0===e.caseSensitive,childrenIndex:r,route:e};i.relativePath.startsWith("/")&&(i.relativePath.startsWith(a)||g(!1),i.relativePath=i.relativePath.slice(a.length));let o=L([a,i.relativePath]),u=n.concat(i);e.children&&e.children.length>0&&(!0===e.index&&g(!1),x(e.children,t,u,o)),(null!=e.path||e.index)&&t.push({path:o,score:k(o,e.index),routesMeta:u})})),t}const P=/^:\w+$/,E=e=>"*"===e;function k(e,t){let n=e.split("/"),a=n.length;return n.some(E)&&(a+=-2),t&&(a+=2),n.filter((e=>!E(e))).reduce(((e,t)=>e+(P.test(t)?3:""===t?1:10)),a)}function C(e,t){let{routesMeta:n}=e,a={},r="/",i=[];for(let e=0;e<n.length;++e){let o=n[e],u=e===n.length-1,c="/"===r?t:t.slice(r.length)||"/",l=w({path:o.relativePath,caseSensitive:o.caseSensitive,end:u},c);if(!l)return null;Object.assign(a,l.params);let s=o.route;i.push({params:a,pathname:L([r,l.pathname]),pathnameBase:A(L([r,l.pathnameBase])),route:s}),"/"!==l.pathnameBase&&(r=L([r,l.pathnameBase]))}return i}function w(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,a]=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!0);let a=[],r="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/:(\w+)/g,((e,t)=>(a.push(t),"([^\\/]+)")));return e.endsWith("*")?(a.push("*"),r+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):r+=n?"\\/*$":"(?:(?=[.~-]|%[0-9A-F]{2})|\\b|\\/|$)",[new RegExp(r,t?void 0:"i"),a]}(e.path,e.caseSensitive,e.end),r=t.match(n);if(!r)return null;let i=r[0],o=i.replace(/(.)\/+$/,"$1"),u=r.slice(1);return{params:a.reduce(((e,t,n)=>{if("*"===t){let e=u[n]||"";o=i.slice(0,i.length-e.length).replace(/(.)\/+$/,"$1")}return e[t]=function(e,t){try{return decodeURIComponent(e)}catch(t){return e}}(u[n]||""),e}),{}),pathname:i,pathnameBase:o,pattern:e}}function S(e,t){void 0===t&&(t="/");let{pathname:n,search:a="",hash:r=""}="string"==typeof e?p(e):e,i=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:i,search:N(a),hash:M(r)}}function R(e,t,n){let a,r="string"==typeof e?p(e):e,i=""===e||""===r.pathname?"/":r.pathname;if(null==i)a=n;else{let e=t.length-1;if(i.startsWith("..")){let t=i.split("/");for(;".."===t[0];)t.shift(),e-=1;r.pathname=t.join("/")}a=e>=0?t[e]:"/"}let o=S(r,a);return i&&"/"!==i&&i.endsWith("/")&&!o.pathname.endsWith("/")&&(o.pathname+="/"),o}function O(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=e.charAt(t.length);return n&&"/"!==n?null:e.slice(t.length)||"/"}const L=e=>e.join("/").replace(/\/\/+/g,"/"),A=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),N=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",M=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";function $(e){_()||g(!1);let{basename:t,navigator:n}=(0,r.useContext)(v),{hash:a,pathname:i,search:o}=D(e),u=i;if("/"!==t){let n=function(e){return""===e||""===e.pathname?"/":"string"==typeof e?p(e).pathname:e.pathname}(e),a=null!=n&&n.endsWith("/");u="/"===i?t+(a?"/":""):L([t,i])}return n.createHref({pathname:u,search:o,hash:a})}function _(){return null!=(0,r.useContext)(d)}function j(){return _()||g(!1),(0,r.useContext)(d).location}function B(){return(0,r.useContext)(d).navigationType}function W(e){_()||g(!1);let{pathname:t}=j();return(0,r.useMemo)((()=>w(e,t)),[t,e])}function H(){_()||g(!1);let{basename:e,navigator:t}=(0,r.useContext)(v),{matches:n}=(0,r.useContext)(m),{pathname:a}=j(),i=JSON.stringify(n.map((e=>e.pathnameBase))),o=(0,r.useRef)(!1);return(0,r.useEffect)((()=>{o.current=!0})),(0,r.useCallback)((function(n,r){if(void 0===r&&(r={}),!o.current)return;if("number"==typeof n)return void t.go(n);let u=R(n,JSON.parse(i),a);"/"!==e&&(u.pathname=L([e,u.pathname])),(r.replace?t.replace:t.push)(u,r.state)}),[e,t,i,a])}const T=(0,r.createContext)(null);function I(){return(0,r.useContext)(T)}function U(e){let t=(0,r.useContext)(m).outlet;return t?(0,r.createElement)(T.Provider,{value:e},t):t}function F(){let{matches:e}=(0,r.useContext)(m),t=e[e.length-1];return t?t.params:{}}function D(e){let{matches:t}=(0,r.useContext)(m),{pathname:n}=j(),a=JSON.stringify(t.map((e=>e.pathnameBase)));return(0,r.useMemo)((()=>R(e,JSON.parse(a),n)),[e,a,n])}function J(e,t){_()||g(!1);let{matches:n}=(0,r.useContext)(m),a=n[n.length-1],i=a?a.params:{},o=(a&&a.pathname,a?a.pathnameBase:"/");a&&a.route;let u,c=j();if(t){var l;let e="string"==typeof t?p(t):t;"/"===o||(null==(l=e.pathname)?void 0:l.startsWith(o))||g(!1),u=e}else u=c;let s=u.pathname||"/",h=b(e,{pathname:"/"===o?s:s.slice(o.length)||"/"});return K(h&&h.map((e=>Object.assign({},e,{params:Object.assign({},i,e.params),pathname:L([o,e.pathname]),pathnameBase:"/"===e.pathnameBase?o:L([o,e.pathnameBase])}))),n)}function K(e,t){return void 0===t&&(t=[]),null==e?null:e.reduceRight(((n,a,i)=>(0,r.createElement)(m.Provider,{children:void 0!==a.route.element?a.route.element:n,value:{outlet:n,matches:t.concat(e.slice(0,i+1))}})),null)}function V(e){let{basename:t,children:n,initialEntries:o,initialIndex:u}=e,l=(0,r.useRef)();null==l.current&&(l.current=function(e){void 0===e&&(e={});var t=e,n=t.initialEntries,r=void 0===n?["/"]:n,o=t.initialIndex,u=r.map((function(e){return i({pathname:"/",search:"",hash:"",state:null,key:h()},"string"==typeof e?p(e):e)})),l=c(null==o?u.length-1:o,0,u.length-1),v=a.Pop,d=u[l],m=s(),g=s();function y(e,t){return void 0===t&&(t=null),i({pathname:d.pathname,search:"",hash:""},"string"==typeof e?p(e):e,{state:t,key:h()})}function b(e,t,n){return!g.length||(g.call({action:e,location:t,retry:n}),!1)}function x(e,t){v=e,d=t,m.call({action:v,location:d})}function P(e){var t=c(l+e,0,u.length-1),n=a.Pop,r=u[t];b(n,r,(function(){P(e)}))&&(l=t,x(n,r))}var E={get index(){return l},get action(){return v},get location(){return d},createHref:function(e){return"string"==typeof e?e:f(e)},push:function e(t,n){var r=a.Push,i=y(t,n);b(r,i,(function(){e(t,n)}))&&(l+=1,u.splice(l,u.length,i),x(r,i))},replace:function e(t,n){var r=a.Replace,i=y(t,n);b(r,i,(function(){e(t,n)}))&&(u[l]=i,x(r,i))},go:P,back:function(){P(-1)},forward:function(){P(1)},listen:function(e){return m.push(e)},block:function(e){return g.push(e)}};return E}({initialEntries:o,initialIndex:u}));let v=l.current,[d,m]=(0,r.useState)({action:v.action,location:v.location});return(0,r.useLayoutEffect)((()=>v.listen(m)),[v]),(0,r.createElement)(Q,{basename:t,children:n,location:d.location,navigationType:d.action,navigator:v})}function q(e){let{to:t,replace:n,state:a}=e;_()||g(!1);let i=H();return(0,r.useEffect)((()=>{i(t,{replace:n,state:a})})),null}function z(e){return U(e.context)}function G(e){g(!1)}function Q(e){let{basename:t="/",children:n=null,location:i,navigationType:o=a.Pop,navigator:u,static:c=!1}=e;_()&&g(!1);let l=A(t),s=(0,r.useMemo)((()=>({basename:l,navigator:u,static:c})),[l,u,c]);"string"==typeof i&&(i=p(i));let{pathname:h="/",search:f="",hash:m="",state:y=null,key:b="default"}=i,x=(0,r.useMemo)((()=>{let e=O(h,l);return null==e?null:{pathname:e,search:f,hash:m,state:y,key:b}}),[l,h,f,m,y,b]);return null==x?null:(0,r.createElement)(v.Provider,{value:s},(0,r.createElement)(d.Provider,{children:n,value:{location:x,navigationType:o}}))}function X(e){let{children:t,location:n}=e;return J(Y(t),n)}function Y(e){let t=[];return r.Children.forEach(e,(e=>{if(!(0,r.isValidElement)(e))return;if(e.type===r.Fragment)return void t.push.apply(t,Y(e.props.children));e.type!==G&&g(!1);let n={caseSensitive:e.props.caseSensitive,element:e.props.element,index:e.props.index,path:e.props.path};e.props.children&&(n.children=Y(e.props.children)),t.push(n)})),t}function Z(e){return K(e)}function ee(){return ee=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},ee.apply(this,arguments)}function te(e,t){if(null==e)return{};var n,a,r={},i=Object.keys(e);for(a=0;a<i.length;a++)n=i[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}const ne=["onClick","reloadDocument","replace","state","target","to"],ae=["aria-current","caseSensitive","className","end","style","to","children"];function re(e){let{basename:t,children:n,window:c}=e,v=(0,r.useRef)();null==v.current&&(v.current=function(e){void 0===e&&(e={});var t=e.window,n=void 0===t?document.defaultView:t,r=n.history;function c(){var e=n.location,t=e.pathname,a=e.search,i=e.hash,o=r.state||{};return[o.idx,{pathname:t,search:a,hash:i,state:o.usr||null,key:o.key||"default"}]}var v=null;n.addEventListener(u,(function(){if(v)x.call(v),v=null;else{var e=a.Pop,t=c(),n=t[0],r=t[1];if(x.length){if(null!=n){var i=g-n;i&&(v={action:e,location:r,retry:function(){S(-1*i)}},S(i))}}else w(e)}}));var d=a.Pop,m=c(),g=m[0],y=m[1],b=s(),x=s();function P(e){return"string"==typeof e?e:f(e)}function E(e,t){return void 0===t&&(t=null),i({pathname:y.pathname,hash:"",search:""},"string"==typeof e?p(e):e,{state:t,key:h()})}function k(e,t){return[{usr:e.state,key:e.key,idx:t},P(e)]}function C(e,t,n){return!x.length||(x.call({action:e,location:t,retry:n}),!1)}function w(e){d=e;var t=c();g=t[0],y=t[1],b.call({action:d,location:y})}function S(e){r.go(e)}null==g&&(g=0,r.replaceState(i({},r.state,{idx:g}),""));var R={get action(){return d},get location(){return y},createHref:P,push:function e(t,i){var o=a.Push,u=E(t,i);if(C(o,u,(function(){e(t,i)}))){var c=k(u,g+1),l=c[0],s=c[1];try{r.pushState(l,"",s)}catch(e){n.location.assign(s)}w(o)}},replace:function e(t,n){var i=a.Replace,o=E(t,n);if(C(i,o,(function(){e(t,n)}))){var u=k(o,g),c=u[0],l=u[1];r.replaceState(c,"",l),w(i)}},go:S,back:function(){S(-1)},forward:function(){S(1)},listen:function(e){return b.push(e)},block:function(e){var t=x.push(e);return 1===x.length&&n.addEventListener(o,l),function(){t(),x.length||n.removeEventListener(o,l)}}};return R}({window:c}));let d=v.current,[m,g]=(0,r.useState)({action:d.action,location:d.location});return(0,r.useLayoutEffect)((()=>d.listen(g)),[d]),(0,r.createElement)(Q,{basename:t,children:n,location:m.location,navigationType:m.action,navigator:d})}function ie(e){let{basename:t,children:n,window:c}=e,v=(0,r.useRef)();null==v.current&&(v.current=function(e){void 0===e&&(e={});var t=e.window,n=void 0===t?document.defaultView:t,r=n.history;function c(){var e=p(n.location.hash.substr(1)),t=e.pathname,a=void 0===t?"/":t,i=e.search,o=void 0===i?"":i,u=e.hash,c=void 0===u?"":u,l=r.state||{};return[l.idx,{pathname:a,search:o,hash:c,state:l.usr||null,key:l.key||"default"}]}var v=null;function d(){if(v)P.call(v),v=null;else{var e=a.Pop,t=c(),n=t[0],r=t[1];if(P.length){if(null!=n){var i=y-n;i&&(v={action:e,location:r,retry:function(){R(-1*i)}},R(i))}}else S(e)}}n.addEventListener(u,d),n.addEventListener("hashchange",(function(){f(c()[1])!==f(b)&&d()}));var m=a.Pop,g=c(),y=g[0],b=g[1],x=s(),P=s();function E(e){return function(){var e=document.querySelector("base"),t="";if(e&&e.getAttribute("href")){var a=n.location.href,r=a.indexOf("#");t=-1===r?a:a.slice(0,r)}return t}()+"#"+("string"==typeof e?e:f(e))}function k(e,t){return void 0===t&&(t=null),i({pathname:b.pathname,hash:"",search:""},"string"==typeof e?p(e):e,{state:t,key:h()})}function C(e,t){return[{usr:e.state,key:e.key,idx:t},E(e)]}function w(e,t,n){return!P.length||(P.call({action:e,location:t,retry:n}),!1)}function S(e){m=e;var t=c();y=t[0],b=t[1],x.call({action:m,location:b})}function R(e){r.go(e)}return null==y&&(y=0,r.replaceState(i({},r.state,{idx:y}),"")),{get action(){return m},get location(){return b},createHref:E,push:function e(t,i){var o=a.Push,u=k(t,i);if(w(o,u,(function(){e(t,i)}))){var c=C(u,y+1),l=c[0],s=c[1];try{r.pushState(l,"",s)}catch(e){n.location.assign(s)}S(o)}},replace:function e(t,n){var i=a.Replace,o=k(t,n);if(w(i,o,(function(){e(t,n)}))){var u=C(o,y),c=u[0],l=u[1];r.replaceState(c,"",l),S(i)}},go:R,back:function(){R(-1)},forward:function(){R(1)},listen:function(e){return x.push(e)},block:function(e){var t=P.push(e);return 1===P.length&&n.addEventListener(o,l),function(){t(),P.length||n.removeEventListener(o,l)}}}}({window:c}));let d=v.current,[m,g]=(0,r.useState)({action:d.action,location:d.location});return(0,r.useLayoutEffect)((()=>d.listen(g)),[d]),(0,r.createElement)(Q,{basename:t,children:n,location:m.location,navigationType:m.action,navigator:d})}function oe(e){let{basename:t,children:n,history:a}=e;const[i,o]=(0,r.useState)({action:a.action,location:a.location});return(0,r.useLayoutEffect)((()=>a.listen(o)),[a]),(0,r.createElement)(Q,{basename:t,children:n,location:i.location,navigationType:i.action,navigator:a})}const ue=(0,r.forwardRef)((function(e,t){let{onClick:n,reloadDocument:a,replace:i=!1,state:o,target:u,to:c}=e,l=te(e,ne),s=$(c),h=le(c,{replace:i,state:o,target:u});return(0,r.createElement)("a",ee({},l,{href:s,onClick:function(e){n&&n(e),e.defaultPrevented||a||h(e)},ref:t,target:u}))})),ce=(0,r.forwardRef)((function(e,t){let{"aria-current":n="page",caseSensitive:a=!1,className:i="",end:o=!1,style:u,to:c,children:l}=e,s=te(e,ae),h=j(),f=D(c),p=h.pathname,v=f.pathname;a||(p=p.toLowerCase(),v=v.toLowerCase());let d,m=p===v||!o&&p.startsWith(v)&&"/"===p.charAt(v.length),g=m?n:void 0;d="function"==typeof i?i({isActive:m}):[i,m?"active":null].filter(Boolean).join(" ");let y="function"==typeof u?u({isActive:m}):u;return(0,r.createElement)(ue,ee({},s,{"aria-current":g,className:d,ref:t,style:y,to:c}),"function"==typeof l?l({isActive:m}):l)}));function le(e,t){let{target:n,replace:a,state:i}=void 0===t?{}:t,o=H(),u=j(),c=D(e);return(0,r.useCallback)((t=>{if(!(0!==t.button||n&&"_self"!==n||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(t))){t.preventDefault();let n=!!a||f(u)===f(c);o(e,{replace:n,state:i})}}),[u,o,c,a,i,n,e])}function se(e){let t=(0,r.useRef)(he(e)),n=j(),a=(0,r.useMemo)((()=>{let e=he(n.search);for(let n of t.current.keys())e.has(n)||t.current.getAll(n).forEach((t=>{e.append(n,t)}));return e}),[n.search]),i=H();return[a,(0,r.useCallback)(((e,t)=>{i("?"+he(e),t)}),[i])]}function he(e){return void 0===e&&(e=""),new URLSearchParams("string"==typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce(((t,n)=>{let a=e[n];return t.concat(Array.isArray(a)?a.map((e=>[n,e])):[[n,a]])}),[]))}}}]);
@@ -0,0 +1,21 @@
1
+ /**
2
+ * React Router DOM v6.3.0
3
+ *
4
+ * Copyright (c) Remix Software Inc.
5
+ *
6
+ * This source code is licensed under the MIT license found in the
7
+ * LICENSE.md file in the root directory of this source tree.
8
+ *
9
+ * @license MIT
10
+ */
11
+
12
+ /**
13
+ * React Router v6.3.0
14
+ *
15
+ * Copyright (c) Remix Software Inc.
16
+ *
17
+ * This source code is licensed under the MIT license found in the
18
+ * LICENSE.md file in the root directory of this source tree.
19
+ *
20
+ * @license MIT
21
+ */
package/dist/327.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_openmrs_esm_patient_search_app=self.webpackChunk_openmrs_esm_patient_search_app||[]).push([[327],{974:(e,t,r)=>{r.d(t,{Z:()=>o});var a=r(2609),n=r.n(a)()((function(e){return e[1]}));n.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-patient-search__patient-search-bar__searchArea___AwmMr{width:inherit;display:flex;justify-content:center;align-items:center;border:1px solid #8d8d8d}.-esm-patient-search__patient-search-bar__patientSearchInput___hcCZN{border:none}.-esm-patient-search__patient-search-bar__patientSearchInput___hcCZN input:focus{outline:1px solid 1px solid #ff832b}",""]),n.locals={searchArea:"-esm-patient-search__patient-search-bar__searchArea___AwmMr",patientSearchInput:"-esm-patient-search__patient-search-bar__patientSearchInput___hcCZN"};const o=n},8969:(e,t,r)=>{r.d(t,{Z:()=>o});var a=r(2609),n=r.n(a)()((function(e){return e[1]}));n.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}:root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-patient-search__overlay__productiveHeading01___ic9zG{font-size:var(--cds-heading-compact-01-font-size, 0.875rem);font-weight:var(--cds-heading-compact-01-font-weight, 600);line-height:var(--cds-heading-compact-01-line-height, 1.28572);letter-spacing:var(--cds-heading-compact-01-letter-spacing, 0.16px)}.-esm-patient-search__overlay__productiveHeading02___D3gmi{font-size:var(--cds-heading-compact-02-font-size, 1rem);font-weight:var(--cds-heading-compact-02-font-weight, 600);line-height:var(--cds-heading-compact-02-line-height, 1.375);letter-spacing:var(--cds-heading-compact-02-letter-spacing, 0)}.-esm-patient-search__overlay__bodyLong01___cyat\\+{font-size:var(--cds-body-01-font-size, 0.875rem);font-weight:var(--cds-body-01-font-weight, 400);line-height:var(--cds-body-01-line-height, 1.42857);letter-spacing:var(--cds-body-01-letter-spacing, 0.16px)}.-esm-patient-search__overlay__desktopOverlay___c0bkT{position:fixed;top:3rem;right:0;height:calc(100vh - 3rem);min-width:33rem;background-color:#f4f4f4;border-left:1px solid #a8a8a8;overflow:hidden;display:grid;grid-template-rows:auto 1fr auto;z-index:999}.-esm-patient-search__overlay__tabletOverlay___8\\+0os{position:fixed;top:0;bottom:0;left:0;right:0;z-index:9999;background-color:#f4f4f4;overflow:hidden;padding-top:3rem;display:grid;grid-template-rows:1fr auto}.-esm-patient-search__overlay__tabletOverlayHeader___-3WeY button{background-color:#005d5d !important}.-esm-patient-search__overlay__tabletOverlayHeader___-3WeY .-esm-patient-search__overlay__headerContent___we2It{color:#fff}.-esm-patient-search__overlay__desktopHeader___GM2sn{display:flex;justify-content:space-between;align-items:center;background-color:#e0e0e0;border-bottom:1px solid #a8a8a8}.-esm-patient-search__overlay__headerContent___we2It{font-size:var(--cds-heading-compact-02-font-size, 1rem);font-weight:var(--cds-heading-compact-02-font-weight, 600);line-height:var(--cds-heading-compact-02-line-height, 1.375);letter-spacing:var(--cds-heading-compact-02-letter-spacing, 0);padding:0 1rem;color:#161616}.-esm-patient-search__overlay__closeButton___pIoiQ{background-color:#fff}.-esm-patient-search__overlay__overlayContent___lLbW7{overflow-y:auto}.-esm-patient-search__overlay__buttonsGroup___QM1SB{align-self:end}.-esm-patient-search__overlay__buttonsGroup___QM1SB button{max-width:unset !important}",""]),n.locals={productiveHeading01:"-esm-patient-search__overlay__productiveHeading01___ic9zG",productiveHeading02:"-esm-patient-search__overlay__productiveHeading02___D3gmi",bodyLong01:"-esm-patient-search__overlay__bodyLong01___cyat+",desktopOverlay:"-esm-patient-search__overlay__desktopOverlay___c0bkT",tabletOverlay:"-esm-patient-search__overlay__tabletOverlay___8+0os",tabletOverlayHeader:"-esm-patient-search__overlay__tabletOverlayHeader___-3WeY",headerContent:"-esm-patient-search__overlay__headerContent___we2It",desktopHeader:"-esm-patient-search__overlay__desktopHeader___GM2sn",closeButton:"-esm-patient-search__overlay__closeButton___pIoiQ",overlayContent:"-esm-patient-search__overlay__overlayContent___lLbW7",buttonsGroup:"-esm-patient-search__overlay__buttonsGroup___QM1SB"};const o=n},4557:(e,t,r)=>{r.d(t,{Z:()=>C});var a=r(5206),n=r.n(a),o=r(4924),i=r(8294),l=r(6062),c=r.n(l),s=r(4036),_=r.n(s),u=r(6793),d=r.n(u),p=r(7892),h=r.n(p),m=r(1173),f=r.n(m),y=r(2464),v=r.n(y),b=r(974),g={};g.styleTagTransform=v(),g.setAttributes=h(),g.insert=d().bind(null,"head"),g.domAPI=_(),g.insertStyleElement=f(),c()(b.Z,g);const S=b.Z&&b.Z.locals?b.Z.locals:void 0;function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r<t;r++)a[r]=e[r];return a}function k(){return k=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},k.apply(this,arguments)}const C=function(e){var t,r,l=e.buttonProps,c=e.initialSearchTerm,s=e.onChange,_=e.onClear,u=e.onSubmit,d=e.small,p=(0,o.useTranslation)().t,h=(t=(0,a.useState)(c),r=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a,n,o=[],i=!0,l=!1;try{for(r=r.call(e);!(i=(a=r.next()).done)&&(o.push(a.value),!t||o.length!==t);i=!0);}catch(e){l=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(l)throw n}}return o}}(t,r)||function(e,t){if(e){if("string"==typeof e)return w(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?w(e,t):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),m=h[0],f=h[1],y=(0,a.useCallback)((function(e){s&&s(e),f(e)}),[s,f]),v=(0,a.useCallback)((function(e){e.preventDefault(),u(m)}),[m,u]);return n().createElement("form",{onSubmit:v,className:S.searchArea},n().createElement(i.olm,{autoFocus:!0,className:S.patientSearchInput,closeButtonLabelText:p("clearSearch","Clear"),labelText:"",onChange:function(e){return y(e.target.value)},onClear:_,placeholder:p("searchForPatient","Search for a patient by name or identifier number"),size:d?"sm":"lg",value:m}),n().createElement(i.zxk,k({type:"submit",kind:"secondary",size:d?"sm":"lg",onClick:v},l),p("search","Search")))}},1327:(e,t,r)=>{r.r(t),r.d(t,{default:()=>u});var a=r(5206),n=r.n(a),o=r(4924),i=r(8294),l=r(3469),c=r(5148);function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r<t;r++)a[r]=e[r];return a}function _(){return _=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},_.apply(this,arguments)}const u=function(e){var t,r,u=e.buttonText,d=e.overlayHeader,p=e.onPatientSelect,h=e.buttonProps,m=(0,o.useTranslation)().t,f=(t=(0,a.useState)(!1),r=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a,n,o=[],i=!0,l=!1;try{for(r=r.call(e);!(i=(a=r.next()).done)&&(o.push(a.value),!t||o.length!==t);i=!0);}catch(e){l=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(l)throw n}}return o}}(t,r)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),y=f[0],v=f[1];return n().createElement(n().Fragment,null,y&&n().createElement(c.Z,{onClose:function(){return v(!1)},header:d,onPatientSelect:p}),n().createElement(i.zxk,_({onClick:function(){return v(!0)},"aria-label":"Search Patient Button","aria-labelledby":"Search Patient Button",renderIcon:function(e){return n().createElement(l.ol,_({size:20},e))}},h),u||m("searchPatient","Search Patient")))}},5148:(e,t,r)=>{r.d(t,{Z:()=>I});var a=r(5206),n=r.n(a),o=r(4924),i=r(8294),l=r(2074),c=r(6759),s=r(906),_=r(6062),u=r.n(_),d=r(4036),p=r.n(d),h=r(6793),m=r.n(h),f=r(7892),y=r.n(f),v=r(1173),b=r.n(v),g=r(2464),S=r.n(g),w=r(8969),k={};k.styleTagTransform=S(),k.setAttributes=y(),k.insert=m().bind(null,"head"),k.domAPI=p(),k.insertStyleElement=b(),u()(w.Z,k);const C=w.Z&&w.Z.locals?w.Z.locals:void 0,O=function(e){var t=e.close,r=e.children,a=e.header,o=e.buttonsGroup,_=(0,s.useLayoutType)();return n().createElement("div",{className:(0,s.isDesktop)(_)?C.desktopOverlay:C.tabletOverlay},(0,s.isDesktop)(_)?n().createElement("div",{className:C.desktopHeader},n().createElement("div",{className:C.headerContent},a),n().createElement(i.zxk,{className:C.closeButton,onClick:t,kind:"ghost",hasIconOnly:!0},n().createElement(l.x8,{size:16}))):n().createElement(i.h4i,{className:C.tabletOverlayHeader,"aria-label":"Close overlay"},n().createElement(i.zxk,{onClick:t,hasIconOnly:!0},n().createElement(c.Xd,{size:16,onClick:t})),n().createElement("div",{className:C.headerContent},a)),n().createElement("div",{className:C.overlayContent},r),n().createElement("div",{className:C.buttonsGroup},o))};var A=r(4557),E=r(1668);function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r<t;r++)a[r]=e[r];return a}const I=function(e){var t,r,i=e.onClose,l=e.query,c=e.header,s=e.onPatientSelect,_=(0,o.useTranslation)().t,u=(t=(0,a.useState)(l),r=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a,n,o=[],i=!0,l=!1;try{for(r=r.call(e);!(i=(a=r.next()).done)&&(o.push(a.value),!t||o.length!==t);i=!0);}catch(e){l=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(l)throw n}}return o}}(t,r)||function(e,t){if(e){if("string"==typeof e)return x(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?x(e,t):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),d=u[0],p=u[1],h=(0,a.useCallback)((function(){return p("")}),[p]);return(0,a.useEffect)((function(){l&&p(l)}),[l]),n().createElement(O,{header:null!=c?c:_("searchResults","Search results"),close:i},n().createElement(A.Z,{initialSearchTerm:l,onSubmit:p,onClear:h}),d&&n().createElement(E.Z,{onPatientSelect:s,query:d,inTabletOrOverlay:!0}))}}}]);
package/dist/398.js ADDED
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 398.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunk_openmrs_esm_patient_search_app=self.webpackChunk_openmrs_esm_patient_search_app||[]).push([[398],{9884:(e,r,t)=>{t.d(r,{TZ:()=>f,W:()=>s});var n,l,c,i,a=t(7398),o=t(5206),h=t.n(o),w=["children","size"],p=["children","size"],s=h().forwardRef((function(e,r){var t=e.children,c=e.size,i=void 0===c?16:c,o=(0,a._)(e,w);return"glyph"===i||"glyph"===i||"glyphpx"===i?h().createElement(a.I,(0,a.a)({width:i,height:i,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 5 8",fill:"currentColor"},o),n||(n=h().createElement("path",{d:"M5 8L0 4 5 0z"})),t):h().createElement(a.I,(0,a.a)({width:i,height:i,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor"},o),l||(l=h().createElement("path",{d:"M20 24L10 16 20 8z"})),t)})),f=h().forwardRef((function(e,r){var t=e.children,n=e.size,l=void 0===n?16:n,o=(0,a._)(e,p);return"glyph"===l||"glyph"===l||"glyphpx"===l?h().createElement(a.I,(0,a.a)({width:l,height:l,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 5 8",fill:"currentColor"},o),c||(c=h().createElement("path",{d:"M0 0L5 4 0 8z"})),t):h().createElement(a.I,(0,a.a)({width:l,height:l,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor"},o),i||(i=h().createElement("path",{d:"M12 8L22 16 12 24z"})),t)}))},6070:(e,r,t)=>{t.d(r,{r4:()=>w});var n,l,c,i=t(7398),a=t(5206),o=t.n(a),h=["children","size"],w=o().forwardRef((function(e,r){var t=e.children,a=e.size,w=void 0===a?16:a,p=(0,i._)(e,h);return o().createElement(i.I,(0,i.a)({width:w,height:w,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor"},p),n||(n=o().createElement("circle",{cx:"16",cy:"8",r:"2"})),l||(l=o().createElement("circle",{cx:"16",cy:"16",r:"2"})),c||(c=o().createElement("circle",{cx:"16",cy:"24",r:"2"})),t)}))},2303:(e,r,t)=>{t.d(r,{Z:()=>o});var n,l,c=t(9857),i=function(){return i=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var l in r=arguments[t])Object.prototype.hasOwnProperty.call(r,l)&&(e[l]=r[l]);return e},i.apply(this,arguments)},a=function(e){return"function"==typeof e[1]?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}]},o=(n=c.ZP,l=function(e){return function(r,t,n){return n.revalidateOnFocus=!1,n.revalidateIfStale=!1,n.revalidateOnReconnect=!1,e(r,t,n)}},function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var t=a(e),c=t[0],o=t[1],h=t[2],w=(h.use||[]).concat(l);return n(c,o,i(i({},h),{use:w}))})}}]);
@@ -0,0 +1,14 @@
1
+ /*! *****************************************************************************
2
+ Copyright (c) Microsoft Corporation.
3
+
4
+ Permission to use, copy, modify, and/or distribute this software for any
5
+ purpose with or without fee is hereby granted.
6
+
7
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
8
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
9
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
10
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
11
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
12
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
13
+ PERFORMANCE OF THIS SOFTWARE.
14
+ ***************************************************************************** */
package/dist/41.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_openmrs_esm_patient_search_app=self.webpackChunk_openmrs_esm_patient_search_app||[]).push([[41],{4380:(e,t,a)=>{a.d(t,{Z:()=>i});var n=a(2609),r=a.n(n)()((function(e){return e[1]}));r.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-patient-search__compact-patient-banner__patientSearchResult___fJ6Ec{text-decoration:none;display:flex;align-items:center;border-bottom:1px solid #e0e0e0;padding:0 .75rem}.-esm-patient-search__compact-patient-banner__patientSearchResult___fJ6Ec:hover,.-esm-patient-search__compact-patient-banner__patientSearchResult___fJ6Ec:focus{background-color:#f4f4f4}.-esm-patient-search__compact-patient-banner__patientBanner___hgdKu{display:flex}.-esm-patient-search__compact-patient-banner__patientName___79ezP{font-size:var(--cds-heading-02-font-size, 1rem);font-weight:var(--cds-heading-02-font-weight, 600);line-height:var(--cds-heading-02-line-height, 1.5);letter-spacing:var(--cds-heading-02-letter-spacing, 0)}.-esm-patient-search__compact-patient-banner__patientAvatar___9gXZS{width:3rem;height:3rem;margin:.5rem 1rem .5rem 0;border-radius:1px}.-esm-patient-search__compact-patient-banner__patientInfo___VUcS\\+{width:100%;display:flex;flex-flow:column wrap;margin:1rem;cursor:pointer}.-esm-patient-search__compact-patient-banner__demographics___EcurV{margin-top:.5rem;font-size:var(--cds-body-compact-02-font-size, 1rem);font-weight:var(--cds-body-compact-02-font-weight, 400);line-height:var(--cds-body-compact-02-line-height, 1.375);letter-spacing:var(--cds-body-compact-02-letter-spacing, 0);color:#525252}.-esm-patient-search__compact-patient-banner__identifiers___09ANP{font-size:var(--cds-body-compact-02-font-size, 1rem);font-weight:var(--cds-body-compact-02-font-weight, 400);line-height:var(--cds-body-compact-02-line-height, 1.375);letter-spacing:var(--cds-body-compact-02-letter-spacing, 0);color:#8d8d8d}.-esm-patient-search__compact-patient-banner__actionsContainer___6WCsV{padding-top:.5rem;margin-top:1rem}.-esm-patient-search__compact-patient-banner__middot___j8qmD{margin:0 .5rem}",""]),r.locals={patientSearchResult:"-esm-patient-search__compact-patient-banner__patientSearchResult___fJ6Ec",patientBanner:"-esm-patient-search__compact-patient-banner__patientBanner___hgdKu",patientName:"-esm-patient-search__compact-patient-banner__patientName___79ezP",patientAvatar:"-esm-patient-search__compact-patient-banner__patientAvatar___9gXZS",patientInfo:"-esm-patient-search__compact-patient-banner__patientInfo___VUcS+",demographics:"-esm-patient-search__compact-patient-banner__demographics___EcurV",identifiers:"-esm-patient-search__compact-patient-banner__identifiers___09ANP",actionsContainer:"-esm-patient-search__compact-patient-banner__actionsContainer___6WCsV",middot:"-esm-patient-search__compact-patient-banner__middot___j8qmD"};const i=r},3241:(e,t,a)=>{a.d(t,{Z:()=>i});var n=a(2609),r=a.n(n)()((function(e){return e[1]}));r.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-patient-search__compact-patient-search__productiveHeading01___YgWu-{font-size:var(--cds-heading-compact-01-font-size, 0.875rem);font-weight:var(--cds-heading-compact-01-font-weight, 600);line-height:var(--cds-heading-compact-01-line-height, 1.28572);letter-spacing:var(--cds-heading-compact-01-letter-spacing, 0.16px)}.-esm-patient-search__compact-patient-search__productiveHeading02___uog76{font-size:var(--cds-heading-compact-02-font-size, 1rem);font-weight:var(--cds-heading-compact-02-font-weight, 600);line-height:var(--cds-heading-compact-02-line-height, 1.375);letter-spacing:var(--cds-heading-compact-02-letter-spacing, 0)}.-esm-patient-search__compact-patient-search__bodyLong01___5NEAS{font-size:var(--cds-body-01-font-size, 0.875rem);font-weight:var(--cds-body-01-font-weight, 400);line-height:var(--cds-body-01-line-height, 1.42857);letter-spacing:var(--cds-body-01-letter-spacing, 0.16px)}.-esm-patient-search__compact-patient-search__patientSearchBar___2szkd{width:50vw;position:relative}.-esm-patient-search__compact-patient-search__floatingSearchResultsContainer___dJlt6{position:absolute;overflow-y:auto;box-shadow:0 .5rem 1rem #e0e0e0;z-index:99;border:0 1px 1px 1px solid #e0e0e0;width:100%;background-color:#fff}",""]),r.locals={productiveHeading01:"-esm-patient-search__compact-patient-search__productiveHeading01___YgWu-",productiveHeading02:"-esm-patient-search__compact-patient-search__productiveHeading02___uog76",bodyLong01:"-esm-patient-search__compact-patient-search__bodyLong01___5NEAS",patientSearchBar:"-esm-patient-search__compact-patient-search__patientSearchBar___2szkd",floatingSearchResultsContainer:"-esm-patient-search__compact-patient-search__floatingSearchResultsContainer___dJlt6"};const i=r},486:(e,t,a)=>{a.d(t,{Z:()=>i});var n=a(2609),r=a.n(n)()((function(e){return e[1]}));r.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-patient-search__patient-search__productiveHeading01___p1jao{font-size:var(--cds-heading-compact-01-font-size, 0.875rem);font-weight:var(--cds-heading-compact-01-font-weight, 600);line-height:var(--cds-heading-compact-01-line-height, 1.28572);letter-spacing:var(--cds-heading-compact-01-letter-spacing, 0.16px)}.-esm-patient-search__patient-search__productiveHeading02___ueqOP{font-size:var(--cds-heading-compact-02-font-size, 1rem);font-weight:var(--cds-heading-compact-02-font-weight, 600);line-height:var(--cds-heading-compact-02-line-height, 1.375);letter-spacing:var(--cds-heading-compact-02-letter-spacing, 0)}.-esm-patient-search__patient-search__bodyLong01___x2TG5{font-size:var(--cds-body-01-font-size, 0.875rem);font-weight:var(--cds-body-01-font-weight, 400);line-height:var(--cds-body-01-line-height, 1.42857);letter-spacing:var(--cds-body-01-letter-spacing, 0.16px)}.cds--side-nav{z-index:0}.-esm-patient-search__patient-search__searchResultsContainer___bANht{width:100%;background-color:#fff}.-esm-patient-search__patient-search__searchResultsContainer___bANht a{text-decoration:none;font-size:var(--cds-heading-02-font-size, 1rem);font-weight:var(--cds-heading-02-font-weight, 600);line-height:var(--cds-heading-02-line-height, 1.5);letter-spacing:var(--cds-heading-02-letter-spacing, 0);color:#525252;margin:0rem}.omrs-breakpoint-lt-desktop .-esm-patient-search__patient-search__searchResultsContainer___bANht{top:6.25rem}.omrs-breakpoint-gt-tablet .-esm-patient-search__patient-search__searchResultsContainer___bANht{padding:0;top:3rem}.-esm-patient-search__patient-search__searchResults___yW7\\+A{width:100%}.-esm-patient-search__patient-search__loadingIcon___uErcv{padding:1rem 0;display:flex;justify-content:center;align-items:center}.-esm-patient-search__patient-search__searchTerm___rQWs-{font-size:var(--cds-heading-03-font-size, 1.25rem);font-weight:var(--cds-heading-03-font-weight, 400);line-height:var(--cds-heading-03-line-height, 1.4);letter-spacing:var(--cds-heading-03-letter-spacing, 0);margin-top:.375rem}.-esm-patient-search__patient-search__resultsText___6bo98{font-size:var(--cds-label-01-font-size, 0.75rem);font-weight:var(--cds-label-01-font-weight, 400);line-height:var(--cds-label-01-line-height, 1.33333);letter-spacing:var(--cds-label-01-letter-spacing, 0.32px);color:#525252;line-height:1rem;margin:.5rem 1rem}.-esm-patient-search__patient-search__helperText___o1KXY{color:var(--omrs-color-ink-medium-contrast);margin-left:2.375rem}.-esm-patient-search__patient-search__emptyResultText___vmru7{font-size:var(--cds-heading-compact-01-font-size, 0.875rem);font-weight:var(--cds-heading-compact-01-font-weight, 600);line-height:var(--cds-heading-compact-01-line-height, 1.28572);letter-spacing:var(--cds-heading-compact-01-letter-spacing, 0.16px);color:#525252;margin-top:1rem;margin-bottom:.313rem}.-esm-patient-search__patient-search__actionText___Yxiou{font-size:var(--cds-body-01-font-size, 0.875rem);font-weight:var(--cds-body-01-font-weight, 400);line-height:var(--cds-body-01-line-height, 1.42857);letter-spacing:var(--cds-body-01-letter-spacing, 0.16px);color:#525252}.-esm-patient-search__patient-search__pagination___Bct7m{display:flex;justify-content:space-evenly;padding:4.688rem 0 1.5rem}.-esm-patient-search__patient-search__emptySearchResultsTile___KHKBc{text-align:center;margin-top:1rem;padding:3rem 0rem}.omrs-breakpoint-gt-tablet .-esm-patient-search__patient-search__emptySearchResultsTile___KHKBc{margin:1rem}.-esm-patient-search__patient-search__errorMessage___TBmBd{font-size:var(--cds-heading-compact-02-font-size, 1rem);font-weight:var(--cds-heading-compact-02-font-weight, 600);line-height:var(--cds-heading-compact-02-line-height, 1.375);letter-spacing:var(--cds-heading-compact-02-letter-spacing, 0);margin-top:2.25rem;margin-bottom:.5rem}.-esm-patient-search__patient-search__errorCopy___5nyXQ{margin-bottom:.5rem;font-size:var(--cds-body-01-font-size, 0.875rem);font-weight:var(--cds-body-01-font-weight, 400);line-height:var(--cds-body-01-line-height, 1.42857);letter-spacing:var(--cds-body-01-letter-spacing, 0.16px);color:#525252}",""]),r.locals={productiveHeading01:"-esm-patient-search__patient-search__productiveHeading01___p1jao",productiveHeading02:"-esm-patient-search__patient-search__productiveHeading02___ueqOP",bodyLong01:"-esm-patient-search__patient-search__bodyLong01___x2TG5",searchResultsContainer:"-esm-patient-search__patient-search__searchResultsContainer___bANht",searchResults:"-esm-patient-search__patient-search__searchResults___yW7+A",loadingIcon:"-esm-patient-search__patient-search__loadingIcon___uErcv",searchTerm:"-esm-patient-search__patient-search__searchTerm___rQWs-",resultsText:"-esm-patient-search__patient-search__resultsText___6bo98",helperText:"-esm-patient-search__patient-search__helperText___o1KXY",emptyResultText:"-esm-patient-search__patient-search__emptyResultText___vmru7",actionText:"-esm-patient-search__patient-search__actionText___Yxiou",pagination:"-esm-patient-search__patient-search__pagination___Bct7m",emptySearchResultsTile:"-esm-patient-search__patient-search__emptySearchResultsTile___KHKBc",errorMessage:"-esm-patient-search__patient-search__errorMessage___TBmBd",errorCopy:"-esm-patient-search__patient-search__errorCopy___5nyXQ"};const i=r},974:(e,t,a)=>{a.d(t,{Z:()=>i});var n=a(2609),r=a.n(n)()((function(e){return e[1]}));r.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-patient-search__patient-search-bar__searchArea___AwmMr{width:inherit;display:flex;justify-content:center;align-items:center;border:1px solid #8d8d8d}.-esm-patient-search__patient-search-bar__patientSearchInput___hcCZN{border:none}.-esm-patient-search__patient-search-bar__patientSearchInput___hcCZN input:focus{outline:1px solid 1px solid #ff832b}",""]),r.locals={searchArea:"-esm-patient-search__patient-search-bar__searchArea___AwmMr",patientSearchInput:"-esm-patient-search__patient-search-bar__patientSearchInput___hcCZN"};const i=r},1041:(e,t,a)=>{a.r(t),a.d(t,{default:()=>H});var n=a(5206),r=a.n(n),i=a(906),s=a(4924),c=a(8294),o=a(540),l=a(634),_=a(6062),p=a.n(_),m=a(4036),h=a.n(m),d=a(6793),u=a.n(d),g=a(7892),f=a.n(g),v=a(1173),b=a.n(v),y=a(2464),E=a.n(y),w=a(4380),S={};S.styleTagTransform=E(),S.setAttributes=f(),S.insert=u().bind(null,"head"),S.domAPI=h(),S.insertStyleElement=b(),p()(w.Z,S);const N=w.Z&&w.Z.locals?w.Z.locals:void 0;var x=function(){return r().createElement("div",{className:N.patientSearchResult},r().createElement("div",{className:N.patientAvatar,role:"img"},r().createElement(c.Cqk,{style:{height:"3rem",width:"3rem"}})),r().createElement("div",null,r().createElement("h2",{className:N.patientName},r().createElement(c.N2B,null)),r().createElement("span",{className:N.demographics},r().createElement(c.Cqk,null)," ",r().createElement("span",{className:N.middot},"·")," ",r().createElement(c.Cqk,null)," ",r().createElement("span",{className:N.middot},"·")," ",r().createElement(c.Cqk,null))))};const C=function(e){var t=e.patients,a=e.hidePanel,c=e.selectPatientAction,o=(0,i.useConfig)(),l=(0,s.useTranslation)().t,_=(0,n.useCallback)((function(e,t){e.preventDefault(),c?c(t):(0,i.navigate)({to:(0,i.interpolateString)(o.search.patientResultUrl,{patientUuid:t})}),a&&a()}),[o.search.patientResultUrl,a,c]),p=(0,n.useMemo)((function(){return t.map((function(e){var t,a,n=null===(t=e.person.addresses)||void 0===t?void 0:t.find((function(e){return e.preferred}));return{id:e.uuid,name:[{given:[e.person.personName.givenName,e.person.personName.middleName],family:e.person.personName.familyName}],gender:e.person.gender,birthDate:e.person.birthdate,deceasedDateTime:e.person.deathDate,deceasedBoolean:e.person.death,identifier:e.identifiers,address:n?[{city:n.cityVillage,country:n.country,postalCode:n.postalCode,state:n.stateProvince,use:"home"}]:[],telecom:null===(a=e.attributes)||void 0===a?void 0:a.filter((function(e){return"Telephone Number"==e.attributeType.name}))}}))}),[t]);return r().createElement(r().Fragment,null,p.map((function(e){var t,a,n,s,c,p,m,h,d,u,g,f;return r().createElement(i.ConfigurableLink,{onClick:function(t){return _(t,e.id)},to:(0,i.interpolateString)(o.search.patientResultUrl,{patientUuid:e.id}),key:e.id,className:N.patientSearchResult},r().createElement("div",{className:N.patientAvatar,role:"img"},r().createElement(i.ExtensionSlot,{extensionSlotName:"patient-photo-slot",state:{patientUuid:e.id,patientName:"".concat(null===(t=e.name)||void 0===t||null===(a=t[0])||void 0===a||null===(n=a.given)||void 0===n?void 0:n.join(" ")," ").concat(null===(s=e.name)||void 0===s||null===(c=s[0])||void 0===c?void 0:c.family),size:"small"}})),r().createElement("div",null,r().createElement("h2",{className:N.patientName},"".concat(null===(p=e.name)||void 0===p||null===(m=p[0])||void 0===m||null===(h=m.given)||void 0===h?void 0:h.join(" ")," ").concat(null===(d=e.name)||void 0===d||null===(u=d[0])||void 0===u?void 0:u.family)),r().createElement("p",{className:N.demographics},function(e){switch(e){case"M":return l("male","Male");case"F":return l("female","Female");case"O":return l("other","Other");case"U":return l("unknown","Unknown");default:return e}}(e.gender)," ",r().createElement("span",{className:N.middot},"·")," ",(0,i.age)(e.birthDate)," ",r().createElement("span",{className:N.middot},"·")," ",null===(g=e.identifier)||void 0===g||null===(f=g[0])||void 0===f?void 0:f.identifier)))})))};var T=a(9653),A=a(486),z={};z.styleTagTransform=E(),z.setAttributes=f(),z.insert=u().bind(null,"head"),z.domAPI=h(),z.insertStyleElement=b(),p()(A.Z,z);const R=A.Z&&A.Z.locals?A.Z.locals:void 0,k=function(e){var t=e.hidePanel,a=e.query,_=void 0===a?"":a,p=e.selectPatientAction,m=(0,s.useTranslation)().t,h=(0,i.useConfig)(),d=(0,l.q)(_,h.includeDead,!!_),u=d.isLoading,g=d.data,f=d.fetchError,v=d.loadingNewData,b=d.setPage,y=d.hasMore,E=d.totalResults,w=(0,n.useRef)(null),S=(0,n.useCallback)((function(e){v||(w.current&&w.current.disconnect(),w.current=new IntersectionObserver((function(e){e[0].isIntersecting&&y&&b((function(e){return e+1}))}),{threshold:.75}),e&&w.current.observe(e))}),[v,y,b]);return u?r().createElement("div",{className:R.searchResultsContainer},r().createElement(x,null),r().createElement(x,null),r().createElement(x,null),r().createElement(x,null),r().createElement(x,null)):r().createElement("div",{className:R.searchResultsContainer},f?r().createElement("div",{className:R.searchResults},r().createElement(c.mh4,null,r().createElement(c.n9L,{className:R.emptySearchResultsTile},r().createElement(T.Z,null),r().createElement("div",null,r().createElement("p",{className:R.errorMessage},m("error","Error")),r().createElement("p",{className:R.errorCopy},m("errorCopy","Sorry, there was an error. You can try to reload this page, or contact the site administrator and quote the error code above.")))))):(0,o.Z)(g)?r().createElement("div",{className:R.searchResults},r().createElement(c.mh4,null,r().createElement(c.n9L,{className:R.emptySearchResultsTile},r().createElement(T.Z,null),r().createElement("p",{className:R.emptyResultText},m("noPatientChartsFoundMessage","Sorry, no patient charts have been found")),r().createElement("p",{className:R.actionText},r().createElement("span",null,m("trySearchWithPatientUniqueID","Try searching with the patient's unique ID number")),r().createElement("br",null),r().createElement("span",null,m("orPatientName","OR the patient's name(s)")))))):r().createElement("div",{className:R.searchResults,style:{maxHeight:"22rem"}},r().createElement("p",{className:R.resultsText},E," ",m("searchResultsText","search result(s)")),r().createElement(C,{hidePanel:t,patients:g,selectPatientAction:p}),y&&r().createElement("div",{className:R.loadingIcon,ref:S},r().createElement(c.gbz,{withOverlay:!1,small:!0}))))};var Z=a(4557),I=a(3241),P={};P.styleTagTransform=E(),P.setAttributes=f(),P.insert=u().bind(null,"head"),P.domAPI=h(),P.insertStyleElement=b(),p()(I.Z,P);const B=I.Z&&I.Z.locals?I.Z.locals:void 0;function j(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a<t;a++)n[a]=e[a];return n}const H=function(e){var t,a,s=e.query,c=e.searchPage,o=void 0!==c&&c,l=e.selectPatientAction,_=(t=(0,n.useState)(s),a=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var n,r,i=[],s=!0,c=!1;try{for(a=a.call(e);!(s=(n=a.next()).done)&&(i.push(n.value),!t||i.length!==t);s=!0);}catch(e){c=!0,r=e}finally{try{s||null==a.return||a.return()}finally{if(c)throw r}}return i}}(t,a)||function(e,t){if(e){if("string"==typeof e)return j(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(a):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?j(e,t):void 0}}(t,a)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),p=_[0],m=_[1],h=(0,n.useCallback)((function(e){o||window.localStorage.setItem("searchReturnUrl",window.location.pathname),(0,i.navigate)({to:"${openmrsSpaBase}/search/".concat(e)})}),[o]),d=(0,n.useCallback)((function(){m("")}),[m]);return r().createElement("div",{className:B.patientSearchBar},r().createElement(Z.Z,{small:!0,initialSearchTerm:null!=s?s:"",onChange:m,onSubmit:h,onClear:d}),!!p&&!o&&r().createElement("div",{className:B.floatingSearchResultsContainer},r().createElement(k,{query:p,selectPatientAction:l})))}},4557:(e,t,a)=>{a.d(t,{Z:()=>N});var n=a(5206),r=a.n(n),i=a(4924),s=a(8294),c=a(6062),o=a.n(c),l=a(4036),_=a.n(l),p=a(6793),m=a.n(p),h=a(7892),d=a.n(h),u=a(1173),g=a.n(u),f=a(2464),v=a.n(f),b=a(974),y={};y.styleTagTransform=v(),y.setAttributes=d(),y.insert=m().bind(null,"head"),y.domAPI=_(),y.insertStyleElement=g(),o()(b.Z,y);const E=b.Z&&b.Z.locals?b.Z.locals:void 0;function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a<t;a++)n[a]=e[a];return n}function S(){return S=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e},S.apply(this,arguments)}const N=function(e){var t,a,c=e.buttonProps,o=e.initialSearchTerm,l=e.onChange,_=e.onClear,p=e.onSubmit,m=e.small,h=(0,i.useTranslation)().t,d=(t=(0,n.useState)(o),a=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var n,r,i=[],s=!0,c=!1;try{for(a=a.call(e);!(s=(n=a.next()).done)&&(i.push(n.value),!t||i.length!==t);s=!0);}catch(e){c=!0,r=e}finally{try{s||null==a.return||a.return()}finally{if(c)throw r}}return i}}(t,a)||function(e,t){if(e){if("string"==typeof e)return w(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(a):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?w(e,t):void 0}}(t,a)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),u=d[0],g=d[1],f=(0,n.useCallback)((function(e){l&&l(e),g(e)}),[l,g]),v=(0,n.useCallback)((function(e){e.preventDefault(),p(u)}),[u,p]);return r().createElement("form",{onSubmit:v,className:E.searchArea},r().createElement(s.olm,{autoFocus:!0,className:E.patientSearchInput,closeButtonLabelText:h("clearSearch","Clear"),labelText:"",onChange:function(e){return f(e.target.value)},onClear:_,placeholder:h("searchForPatient","Search for a patient by name or identifier number"),size:m?"sm":"lg",value:u}),r().createElement(s.zxk,S({type:"submit",kind:"secondary",size:m?"sm":"lg",onClick:v},c),h("search","Search")))}}}]);
package/dist/451.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_openmrs_esm_patient_search_app=self.webpackChunk_openmrs_esm_patient_search_app||[]).push([[451],{634:(t,e,n)=>{n.d(e,{C:()=>d,q:()=>s});var a=n(5206),l=n(9857),r=n(6635),i=n(906);function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,a=new Array(e);n<e;n++)a[n]=t[n];return a}function c(t){return function(t){if(Array.isArray(t))return o(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return o(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var u="custom:(patientId,uuid,identifiers,display,patientIdentifier:(uuid,identifier),person:(gender,age,birthdate,birthdateEstimated,personName,addresses,display,dead,deathDate),attributes:(value,attributeType:(name)))";function d(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:u,c=(0,i.useConfig)(),d="/ws/rest/v1/patient?q=".concat(t,"&v=").concat(o,"&limit=").concat(n,"&totalCount=true");c.includeDead&&(d+="&includeDead=".concat(null==c?void 0:c.includeDead)),r>1&&(d+="&startIndex=".concat((r-1)*n));var s=(0,l.ZP)(e?d:null,i.openmrsFetch),v=s.data,f=s.isValidating,m=s.error,h=(0,a.useMemo)((function(){var t,e,n,a;return{data:null==v||null===(t=v.data)||void 0===t?void 0:t.results,isLoading:!(null==v?void 0:v.data)&&!m,fetchError:m,hasMore:null==v||null===(e=v.data)||void 0===e||null===(n=e.links)||void 0===n?void 0:n.some((function(t){return"next"===t.rel})),loadingNewData:f,totalResults:null==v||null===(a=v.data)||void 0===a?void 0:a.totalCount}}),[v,f,m]);return h}function s(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:10,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:u,d=(0,a.useCallback)((function(n,a){var r;if(a&&!(null==a||null===(r=a.data)||void 0===r?void 0:r.links.some((function(t){return"next"===t.rel}))))return null;var i="/ws/rest/v1/patient?q=".concat(t,"&v=").concat(o,"&includeDead=").concat(e,"&limit=").concat(l,"&totalCount=true");return n&&(i+="&startIndex=".concat(n*l)),i}),[t,o,e,l]),s=(0,r.ZP)(n?d:null,i.openmrsFetch),v=s.data,f=s.isValidating,m=s.setSize,h=s.error,p=s.size,g=(0,a.useMemo)((function(){var t,e,n,a,l;return{data:v?(t=[]).concat.apply(t,c(null==v?void 0:v.map((function(t){var e;return null==t||null===(e=t.data)||void 0===e?void 0:e.results})))):null,isLoading:!v&&!h,fetchError:h,hasMore:!!(null==v?void 0:v.length)&&!!(null===(e=v[v.length-1].data)||void 0===e||null===(n=e.links)||void 0===n?void 0:n.some((function(t){return"next"===t.rel}))),loadingNewData:f,setPage:m,currentPage:p,totalResults:null==v||null===(a=v[0])||void 0===a||null===(l=a.data)||void 0===l?void 0:l.totalCount}}),[v,f,h,m,p]);return g}},9653:(t,e,n)=>{n.d(e,{Z:()=>l});var a=n(5206);const l=function(t){var e=t.width,n=void 0===e?"64":e,l=t.height,r=void 0===l?"64":l;return a.createElement("svg",{width:n,height:r,viewBox:"0 0 64 64"},a.createElement("title",null,"Empty data illustration"),a.createElement("g",{fill:"none",fillRule:"evenodd"},a.createElement("path",{d:"M38.133 13.186H21.947c-.768.001-1.39.623-1.39 1.391V50.55l-.186.057-3.97 1.216a.743.743 0 01-.927-.493L3.664 12.751a.742.742 0 01.492-.926l6.118-1.874 17.738-5.43 6.119-1.873a.741.741 0 01.926.492L38.076 13l.057.186z",fill:"#E0E0E0"}),a.createElement("path",{d:"M41.664 13L38.026 1.117A1.576 1.576 0 0036.056.07l-8.601 2.633-17.737 5.43-8.603 2.634a1.578 1.578 0 00-1.046 1.97l12.436 40.616a1.58 1.58 0 001.969 1.046l5.897-1.805.185-.057v-.194l-.185.057-5.952 1.822a1.393 1.393 0 01-1.737-.923L.247 12.682a1.39 1.39 0 01.923-1.738L9.772 8.31 27.51 2.881 36.112.247a1.393 1.393 0 011.737.923L41.47 13l.057.186h.193l-.057-.185z",fill:"#8D8D8D"}),a.createElement("path",{d:"M11.378 11.855a.836.836 0 01-.798-.59L9.385 7.361a.835.835 0 01.554-1.042l16.318-4.996a.836.836 0 011.042.554l1.195 3.902a.836.836 0 01-.554 1.043l-16.318 4.995a.831.831 0 01-.244.037z",fill:"#C6C6C6"}),a.createElement("circle",{fill:"#C6C6C6",cx:17.636,cy:2.314,r:1.855}),a.createElement("circle",{fill:"#FFF",fillRule:"nonzero",cx:17.636,cy:2.314,r:1.175}),a.createElement("path",{d:"M55.893 53.995H24.544a.79.79 0 01-.788-.789V15.644a.79.79 0 01.788-.788h31.349a.79.79 0 01.788.788v37.562a.79.79 0 01-.788.789z",fill:"#E0E0E0"}),a.createElement("path",{d:"M41.47 13H21.948a1.579 1.579 0 00-1.576 1.577V52.4l.185-.057V14.577c.001-.768.623-1.39 1.391-1.39h19.581L41.471 13zm17.02 0H21.947a1.579 1.579 0 00-1.576 1.577v42.478c0 .87.706 1.576 1.576 1.577H58.49a1.579 1.579 0 001.576-1.577V14.577a1.579 1.579 0 00-1.576-1.576zm1.39 44.055c0 .768-.622 1.39-1.39 1.392H21.947c-.768-.001-1.39-.624-1.39-1.392V14.577c0-.768.622-1.39 1.39-1.39H58.49c.768 0 1.39.622 1.39 1.39v42.478z",fill:"#8D8D8D"}),a.createElement("path",{d:"M48.751 17.082H31.686a.836.836 0 01-.835-.835v-4.081c0-.46.374-.834.835-.835H48.75c.461 0 .834.374.835.835v4.08c0 .462-.374.835-.835.836z",fill:"#C6C6C6"}),a.createElement("circle",{fill:"#C6C6C6",cx:40.218,cy:9.755,r:1.855}),a.createElement("circle",{fill:"#FFF",fillRule:"nonzero",cx:40.218,cy:9.755,r:1.13})))}}}]);
package/dist/574.js CHANGED
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_openmrs_esm_patient_search_app=self.webpackChunk_openmrs_esm_patient_search_app||[]).push([[574],{3574:e=>{e.exports=JSON.parse('{"clearSearch":"Clear","error":"Error","errorCopy":"Sorry, there was a an error. You can try to reload this page, or contact the site administrator and quote the error code above.","errorText":"An error occurred while performing search","noPatientChartsFoundMessage":"Sorry, no patient charts have been found","noResultsFound":"No results found","orPatientName":"OR the patient\'s name(s)","patientsFound":"Found {count, plural, one{{count} patient} other{{count} patients}}","patientsFound_plural":"","search":"Search","searchForPatient":"Search for a patient by name or identifier number","trySearchWithPatientUniqueID":"Try searching with the patient\'s unique ID number"}')}}]);
1
+ "use strict";(self.webpackChunk_openmrs_esm_patient_search_app=self.webpackChunk_openmrs_esm_patient_search_app||[]).push([[574],{3574:e=>{e.exports=JSON.parse('{"actions":"Actions","address":"Address","clearSearch":"Clear","contactDetails":"Contact Details","error":"Error","errorCopy":"Sorry, there was a an error. You can try to reload this page, or contact the site administrator and quote the error code above.","female":"Female","male":"Male","noPatientChartsFoundMessage":"Sorry, no patient charts have been found","orPatientName":"OR the patient\'s name(s)","other":"Other","relationships":"Relationships","seachResultsSmall":"search results","search":"Search","searchForPatient":"Search for a patient by name or identifier number","searchingText":"Searching...","searchPatient":"Search Patient","searchResults":"Search Results","searchResultsText":"search results","showAllDetails":"Show all details","showLess":"Show less","trySearchWithPatientUniqueID":"Try searching with the patient\'s unique ID number","unknown":"Unknown"}')}}]);
package/dist/668.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_openmrs_esm_patient_search_app=self.webpackChunk_openmrs_esm_patient_search_app||[]).push([[668,451],{9361:(e,t,a)=>{a.d(t,{Z:()=>i});var n=a(2609),r=a.n(n)()((function(e){return e[1]}));r.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-patient-search__patient-banner__container___DHYv2{border-bottom:.063rem solid #e0e0e0;background-color:#fff;display:grid;grid-template-columns:1fr auto}.-esm-patient-search__patient-banner__patientBanner___ZXsFF{text-decoration:none;display:grid;grid-template-columns:auto 1fr}.-esm-patient-search__patient-banner__patientName___35Lxu{font-size:var(--cds-heading-03-font-size, 1.25rem);font-weight:var(--cds-heading-03-font-weight, 400);line-height:var(--cds-heading-03-line-height, 1.4);letter-spacing:var(--cds-heading-03-letter-spacing, 0);margin-right:.25rem;color:#161616}.-esm-patient-search__patient-banner__patientAvatar___zgBnr{width:5rem;height:5rem;margin:1rem;border-radius:1px}.-esm-patient-search__patient-banner__patientAvatarButton___hrkm3{cursor:pointer;border:none;padding:0px;background:none}.-esm-patient-search__patient-banner__patientInfo___APRfg{width:100%;padding-right:1rem}.-esm-patient-search__patient-banner__demographics___oNdDk{font-size:var(--cds-body-compact-02-font-size, 1rem);font-weight:var(--cds-body-compact-02-font-weight, 400);line-height:var(--cds-body-compact-02-line-height, 1.375);letter-spacing:var(--cds-body-compact-02-letter-spacing, 0);color:#525252;margin-top:.375rem}.-esm-patient-search__patient-banner__row___9nYwd{display:flex;flex-direction:row;justify-content:space-between;align-items:flex-start}.-esm-patient-search__patient-banner__patientNameRow___LT6EX{margin-top:1rem}.-esm-patient-search__patient-banner__flexRow___5-i8j{display:flex;flex-flow:row wrap;align-items:center}.-esm-patient-search__patient-banner__identifiers___GCyBQ{font-size:var(--cds-body-compact-02-font-size, 1rem);font-weight:var(--cds-body-compact-02-font-weight, 400);line-height:var(--cds-body-compact-02-line-height, 1.375);letter-spacing:var(--cds-body-compact-02-letter-spacing, 0);color:#8d8d8d;margin-top:.375rem}.-esm-patient-search__patient-banner__tooltipPadding___MUUnN{padding:.25rem}.-esm-patient-search__patient-banner__tooltipSmallText___I2nNT{font-size:80%}.-esm-patient-search__patient-banner__actionsButtonText___v7wWu{font-size:var(--cds-body-compact-01-font-size, 0.875rem);font-weight:var(--cds-body-compact-01-font-weight, 400);line-height:var(--cds-body-compact-01-line-height, 1.28572);letter-spacing:var(--cds-body-compact-01-letter-spacing, 0.16px);color:#0f62fe}.cds--tooltip--definition .cds--tooltip__trigger{border-bottom:none}",""]),r.locals={container:"-esm-patient-search__patient-banner__container___DHYv2",patientBanner:"-esm-patient-search__patient-banner__patientBanner___ZXsFF",patientName:"-esm-patient-search__patient-banner__patientName___35Lxu",patientAvatar:"-esm-patient-search__patient-banner__patientAvatar___zgBnr",patientAvatarButton:"-esm-patient-search__patient-banner__patientAvatarButton___hrkm3",patientInfo:"-esm-patient-search__patient-banner__patientInfo___APRfg",demographics:"-esm-patient-search__patient-banner__demographics___oNdDk",row:"-esm-patient-search__patient-banner__row___9nYwd",patientNameRow:"-esm-patient-search__patient-banner__patientNameRow___LT6EX",flexRow:"-esm-patient-search__patient-banner__flexRow___5-i8j",identifiers:"-esm-patient-search__patient-banner__identifiers___GCyBQ",tooltipPadding:"-esm-patient-search__patient-banner__tooltipPadding___MUUnN",tooltipSmallText:"-esm-patient-search__patient-banner__tooltipSmallText___I2nNT",actionsButtonText:"-esm-patient-search__patient-banner__actionsButtonText___v7wWu"};const i=r},1105:(e,t,a)=>{a.d(t,{Z:()=>i});var n=a(2609),r=a.n(n)()((function(e){return e[1]}));r.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-patient-search__contact-details__contactDetails___JhHPj{color:#525252;width:100%;border-top:1px solid #e0e0e0}.-esm-patient-search__contact-details__heading___UKhVR{font-size:var(--cds-heading-compact-01-font-size, 0.875rem);font-weight:var(--cds-heading-compact-01-font-weight, 600);line-height:var(--cds-heading-compact-01-line-height, 1.28572);letter-spacing:var(--cds-heading-compact-01-letter-spacing, 0.16px);color:#525252}.-esm-patient-search__contact-details__row___WqAlk{font-size:var(--cds-body-compact-01-font-size, 0.875rem);font-weight:var(--cds-body-compact-01-font-weight, 400);line-height:var(--cds-body-compact-01-line-height, 1.28572);letter-spacing:var(--cds-body-compact-01-letter-spacing, 0.16px);display:flex}.-esm-patient-search__contact-details__row___WqAlk:first-child{border-bottom:1px solid #e0e0e0}.-esm-patient-search__contact-details__row___WqAlk>.-esm-patient-search__contact-details__col___uKOeM{flex:1;padding:1rem 1rem}.-esm-patient-search__contact-details__row___WqAlk>.-esm-patient-search__contact-details__col___uKOeM:nth-of-type(2n + 1){border-right:1px solid #e0e0e0}.-esm-patient-search__contact-details__row___WqAlk li{margin:.5rem 0}.-esm-patient-search__contact-details__relationship___41MOI{display:flex;flex-flow:row nowrap}.-esm-patient-search__contact-details__relationship___41MOI div{flex:1 1}",""]),r.locals={contactDetails:"-esm-patient-search__contact-details__contactDetails___JhHPj",heading:"-esm-patient-search__contact-details__heading___UKhVR",row:"-esm-patient-search__contact-details__row___WqAlk",col:"-esm-patient-search__contact-details__col___uKOeM",relationship:"-esm-patient-search__contact-details__relationship___41MOI"};const i=r},8039:(e,t,a)=>{a.d(t,{Z:()=>i});var n=a(2609),r=a.n(n)()((function(e){return e[1]}));r.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}:root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-patient-search__patient-search-lg__productiveHeading01___Y\\+4CC{font-size:var(--cds-heading-compact-01-font-size, 0.875rem);font-weight:var(--cds-heading-compact-01-font-weight, 600);line-height:var(--cds-heading-compact-01-line-height, 1.28572);letter-spacing:var(--cds-heading-compact-01-letter-spacing, 0.16px)}.-esm-patient-search__patient-search-lg__productiveHeading02___naRf0{font-size:var(--cds-heading-compact-02-font-size, 1rem);font-weight:var(--cds-heading-compact-02-font-weight, 600);line-height:var(--cds-heading-compact-02-line-height, 1.375);letter-spacing:var(--cds-heading-compact-02-letter-spacing, 0)}.-esm-patient-search__patient-search-lg__bodyLong01___Gi7Xv{font-size:var(--cds-body-01-font-size, 0.875rem);font-weight:var(--cds-body-01-font-weight, 400);line-height:var(--cds-body-01-line-height, 1.42857);letter-spacing:var(--cds-body-01-letter-spacing, 0.16px)}.cds--side-nav{z-index:0}.-esm-patient-search__patient-search-lg__searchResults___fRFnR{width:100%}.-esm-patient-search__patient-search-lg__broadBottomMargin___JCaaL{margin-bottom:5rem}.-esm-patient-search__patient-search-lg__resultsHeader___vaj-c{display:flex;justify-content:space-between;margin:.5rem 0}.-esm-patient-search__patient-search-lg__leftPaddedResultHeader___ut54t{margin-left:1rem}.-esm-patient-search__patient-search-lg__productiveHeading02___naRf0{font-size:var(--cds-heading-02-font-size, 1rem);font-weight:var(--cds-heading-02-font-weight, 600);line-height:var(--cds-heading-02-line-height, 1.5);letter-spacing:var(--cds-heading-02-letter-spacing, 0);align-self:center}.-esm-patient-search__patient-search-lg__results___cK0vO{border:1px solid #e0e0e0}.-esm-patient-search__patient-search-lg__emptySearchResultsTile___bvXsn{text-align:center;margin:0;padding:3rem 0rem}.-esm-patient-search__patient-search-lg__paddedEmptySearchResultsTile___52Ik1{margin:0 1rem}.-esm-patient-search__patient-search-lg__emptyResultText___0UfCs{font-size:var(--cds-heading-compact-01-font-size, 0.875rem);font-weight:var(--cds-heading-compact-01-font-weight, 600);line-height:var(--cds-heading-compact-01-line-height, 1.28572);letter-spacing:var(--cds-heading-compact-01-letter-spacing, 0.16px);color:#525252;margin-top:1rem;margin-bottom:.313rem}.-esm-patient-search__patient-search-lg__actionText___l6ZtT{font-size:var(--cds-body-01-font-size, 0.875rem);font-weight:var(--cds-body-01-font-weight, 400);line-height:var(--cds-body-01-line-height, 1.42857);letter-spacing:var(--cds-body-01-letter-spacing, 0.16px);color:#525252}.-esm-patient-search__patient-search-lg__pagination___s3UCO{padding:1rem 0;background:#f4f4f4}.-esm-patient-search__patient-search-lg__stickyPagination___yRO0u{position:fixed;bottom:0;left:0;right:0}.-esm-patient-search__patient-search-lg__errorMessage___hYdQo{font-size:var(--cds-heading-compact-02-font-size, 1rem);font-weight:var(--cds-heading-compact-02-font-weight, 600);line-height:var(--cds-heading-compact-02-line-height, 1.375);letter-spacing:var(--cds-heading-compact-02-letter-spacing, 0);margin-top:2.25rem;margin-bottom:.5rem}.-esm-patient-search__patient-search-lg__errorCopy___GpIzt{margin-bottom:.5rem;font-size:var(--cds-body-01-font-size, 0.875rem);font-weight:var(--cds-body-01-font-weight, 400);line-height:var(--cds-body-01-line-height, 1.42857);letter-spacing:var(--cds-body-01-letter-spacing, 0.16px);color:#525252}",""]),r.locals={productiveHeading01:"-esm-patient-search__patient-search-lg__productiveHeading01___Y+4CC",productiveHeading02:"-esm-patient-search__patient-search-lg__productiveHeading02___naRf0",bodyLong01:"-esm-patient-search__patient-search-lg__bodyLong01___Gi7Xv",searchResults:"-esm-patient-search__patient-search-lg__searchResults___fRFnR",broadBottomMargin:"-esm-patient-search__patient-search-lg__broadBottomMargin___JCaaL",resultsHeader:"-esm-patient-search__patient-search-lg__resultsHeader___vaj-c",leftPaddedResultHeader:"-esm-patient-search__patient-search-lg__leftPaddedResultHeader___ut54t",results:"-esm-patient-search__patient-search-lg__results___cK0vO",emptySearchResultsTile:"-esm-patient-search__patient-search-lg__emptySearchResultsTile___bvXsn",paddedEmptySearchResultsTile:"-esm-patient-search__patient-search-lg__paddedEmptySearchResultsTile___52Ik1",emptyResultText:"-esm-patient-search__patient-search-lg__emptyResultText___0UfCs",actionText:"-esm-patient-search__patient-search-lg__actionText___l6ZtT",pagination:"-esm-patient-search__patient-search-lg__pagination___s3UCO",stickyPagination:"-esm-patient-search__patient-search-lg__stickyPagination___yRO0u",errorMessage:"-esm-patient-search__patient-search-lg__errorMessage___hYdQo",errorCopy:"-esm-patient-search__patient-search-lg__errorCopy___GpIzt"};const i=r},6241:(e,t,a)=>{a.d(t,{Z:()=>i});var n=a(2609),r=a.n(n)()((function(e){return e[1]}));r.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-patient-search__pagination__productiveHeading01___XXNJk{font-size:var(--cds-heading-compact-01-font-size, 0.875rem);font-weight:var(--cds-heading-compact-01-font-weight, 600);line-height:var(--cds-heading-compact-01-line-height, 1.28572);letter-spacing:var(--cds-heading-compact-01-letter-spacing, 0.16px)}.-esm-patient-search__pagination__productiveHeading02___4k2WO{font-size:var(--cds-heading-compact-02-font-size, 1rem);font-weight:var(--cds-heading-compact-02-font-weight, 600);line-height:var(--cds-heading-compact-02-line-height, 1.375);letter-spacing:var(--cds-heading-compact-02-letter-spacing, 0)}.-esm-patient-search__pagination__bodyLong01___a0cMC{font-size:var(--cds-body-01-font-size, 0.875rem);font-weight:var(--cds-body-01-font-weight, 400);line-height:var(--cds-body-01-line-height, 1.42857);letter-spacing:var(--cds-body-01-letter-spacing, 0.16px)}.-esm-patient-search__pagination__paginationBar___suBHz{width:100%;display:flex;justify-content:center;align-items:center}.-esm-patient-search__pagination__pageNumbers___mSEfi{display:flex}.-esm-patient-search__pagination__paginationButton___pBYMZ{box-sizing:border-box}.-esm-patient-search__pagination__activeButton___niuDL{border-bottom:.25rem solid #005d5d}",""]),r.locals={productiveHeading01:"-esm-patient-search__pagination__productiveHeading01___XXNJk",productiveHeading02:"-esm-patient-search__pagination__productiveHeading02___4k2WO",bodyLong01:"-esm-patient-search__pagination__bodyLong01___a0cMC",paginationBar:"-esm-patient-search__pagination__paginationBar___suBHz",pageNumbers:"-esm-patient-search__pagination__pageNumbers___mSEfi",paginationButton:"-esm-patient-search__pagination__paginationButton___pBYMZ",activeButton:"-esm-patient-search__pagination__activeButton___niuDL"};const i=r},1668:(e,t,a)=>{a.d(t,{Z:()=>ee});var n=a(5206),r=a.n(n),i=a(4924),s=a(540),l=a(8294),o=a(906),c=a(634),d=a(9653),u=a(9884),_=a(6062),m=a.n(_),p=a(4036),h=a.n(p),g=a(6793),f=a.n(g),v=a(7892),y=a.n(v),b=a(1173),E=a.n(b),w=a(2464),N=a.n(w),x=a(6241),S={};S.styleTagTransform=N(),S.setAttributes=y(),S.insert=f().bind(null,"head"),S.domAPI=h(),S.insertStyleElement=E(),m()(x.Z,S);const C=x.Z&&x.Z.locals?x.Z.locals:void 0;function T(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a<t;a++)n[a]=e[a];return n}const A=function(e){var t,a=e.totalPages,i=e.currentPage,s=e.setCurrentPage,o=e.hasMore,c=(0,n.useCallback)((function(){s(Math.max(0,i-1))}),[i,s]),d=(0,n.useCallback)((function(){s(Math.min(a,i+1))}),[i,s,a]);return a<=1?r().createElement(r().Fragment,null):r().createElement("div",{className:C.paginationBar},r().createElement(l.zxk,{kind:"ghost",hasIconOnly:!0,iconDescription:"",renderIcon:r().createElement(u.W,{size:24}),onClick:c,disabled:1==i}),r().createElement("div",{className:C.pageNumbers},(t=Array(a).keys(),function(e){if(Array.isArray(e))return T(e)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return T(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(a):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?T(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map((function(e){return r().createElement(l.zxk,{key:e,kind:"ghost",onClick:function(){return s(e+1)},className:"".concat(C.paginationButton," ").concat(e+1===i&&C.activeButton)},e+1)}))),r().createElement(l.zxk,{kind:"ghost",hasIconOnly:!0,iconDescription:"",renderIcon:r().createElement(u.TZ,{size:24}),onClick:d,disabled:!o&&i===a}))};var R=a(6070),k=a(2074),z=a(9857);var I=a(2303),M=a(1105),P={};P.styleTagTransform=N(),P.setAttributes=y(),P.insert=f().bind(null,"head"),P.domAPI=h(),P.insertStyleElement=E(),m()(M.Z,P);const B=M.Z&&M.Z.locals?M.Z.locals:void 0;var H=function(e){var t=e.address,a=(0,i.useTranslation)().t;return r().createElement(r().Fragment,null,r().createElement("p",{className:B.heading},a("address","Address")),r().createElement("ul",null,t?r().createElement(r().Fragment,null,r().createElement("li",null,t.postalCode),r().createElement("li",null,t.address1),r().createElement("li",null,t.cityVillage),r().createElement("li",null,t.stateProvince),r().createElement("li",null,t.country)):"--"))},D=function(e){var t=e.patientUuid,a=(0,i.useTranslation)().t,n=function(e){var t=(0,o.useConfig)().contactAttributeType,a=function(e){var t,a=(0,I.Z)("/ws/rest/v1/patient/".concat(e,"?v=").concat("custom:(uuid,display,identifiers:(identifier,uuid,preferred,location:(uuid,name),identifierType:(uuid,name,format,formatDescription,validator)),person:(uuid,display,gender,birthdate,dead,age,deathDate,birthdateEstimated,causeOfDeath,preferredName:(uuid,preferred,givenName,middleName,familyName),attributes,preferredAddress:(uuid,preferred,address1,address2,cityVillage,longitude,stateProvince,latitude,country,postalCode,countyDistrict,address3,address4,address5,address6,address7)))"),o.openmrsFetch),n=a.data,r=a.error;return{isLoading:!n&&!r,attributes:null!==(t=null==n?void 0:n.data.person.attributes)&&void 0!==t?t:[],error:r}}(e),n=a.attributes,r=a.isLoading,i=n.filter((function(e){var a=e.attributeType;return null==t?void 0:t.some((function(e){return a.uuid===e}))}));return{contactAttributes:null!=i?i:[],isLoading:r}}(t),s=n.isLoading,c=n.contactAttributes;return r().createElement(r().Fragment,null,r().createElement("p",{className:B.heading},a("contactDetails","Contact Details")),r().createElement("ul",null,s?r().createElement(l.N2B,null):(null==c?void 0:c.length)?null==c?void 0:c.map((function(e){var t=e.attributeType,a=e.value,n=e.uuid;return r().createElement("li",{key:n},t.display," : ",a)})):"--"))},L=function(e){var t=e.patientId,a=(0,i.useTranslation)().t,n=function(e){var t,a,n=(0,z.ZP)("/ws/rest/v1/relationship?v=".concat("custom:(display,uuid,personA:(age,display,birthdate,uuid),personB:(age,display,birthdate,uuid),relationshipType:(uuid,display,description,aIsToB,bIsToA))","&person=").concat(e),o.openmrsFetch),r=n.data,i=n.error,s=n.isValidating,l=(null==r||null===(t=r.data)||void 0===t||null===(a=t.results)||void 0===a?void 0:a.length)?function(e,t){var a=[],n=!0,r=!1,i=void 0;try{for(var s,l=t[Symbol.iterator]();!(n=(s=l.next()).done);n=!0){var o=s.value;e===o.personA.uuid?a.push({uuid:o.uuid,display:o.personB.display,relativeAge:o.personB.age,relativeUuid:o.personB.uuid,relationshipType:o.relationshipType.bIsToA}):a.push({uuid:o.uuid,display:o.personA.display,relativeAge:o.personA.age,relativeUuid:o.personA.uuid,relationshipType:o.relationshipType.aIsToB})}}catch(e){r=!0,i=e}finally{try{n||null==l.return||l.return()}finally{if(r)throw i}}return a}(e,r.data.results):null;return{data:r?l:null,isError:i,isLoading:!r&&!i,isValidating:s}}(t),s=n.data,c=n.isLoading;return r().createElement(r().Fragment,null,r().createElement("p",{className:B.heading},a("relationships","Relationships")),r().createElement(r().Fragment,null,c?r().createElement(l.N2B,null):(null==s?void 0:s.length)?r().createElement("ul",null,s.map((function(e){return r().createElement("li",{key:e.uuid,className:B.relationship},r().createElement("div",null,e.display),r().createElement("div",null,e.relationshipType),r().createElement("div",null,"".concat(e.relativeAge," ").concat(1===e.relativeAge?"yr":"yrs")))}))):"--"))};const Z=function(e){var t=e.address,a=e.patientId,n=t?t.find((function(e){return e.preferred})):void 0;return r().createElement("div",{className:B.contactDetails},r().createElement("div",{className:B.row},r().createElement("div",{className:B.col},r().createElement(H,{address:n})),r().createElement("div",{className:B.col},r().createElement(D,{patientUuid:a}))),r().createElement("div",{className:B.row},r().createElement("div",{className:B.col},r().createElement(L,{patientId:a})),r().createElement("div",{className:B.col})))};function O(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a<t;a++)n[a]=e[a];return n}const U=function(e){var t,a,i=e.dropDownMenu,s=e.menuTitle,o=e.children,c=(t=(0,n.useState)(!1),a=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var n,r,i=[],s=!0,l=!1;try{for(a=a.call(e);!(s=(n=a.next()).done)&&(i.push(n.value),!t||i.length!==t);s=!0);}catch(e){l=!0,r=e}finally{try{s||null==a.return||a.return()}finally{if(l)throw r}}return i}}(t,a)||function(e,t){if(e){if("string"==typeof e)return O(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(a):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?O(e,t):void 0}}(t,a)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),d=c[0],u=c[1],_=(0,n.useRef)(null);(0,n.useEffect)((function(){i||u((function(e){return e})),u((function(){return!1}))}),[i]);var m=(0,n.useCallback)((function(){return u((function(e){return!e}))}),[]);return(0,n.useEffect)((function(){var e=function(e){_.current&&!_.current.contains(e.target)&&u(!1)};return document.addEventListener("mousedown",e),function(){document.removeEventListener("mousedown",e)}}),[_]),r().createElement("div",{"data-overflow-menu":!0,className:"cds--overflow-menu",style:{width:"auto",height:"auto"},ref:_},r().createElement(l.zxk,{kind:"ghost",className:"cds--overflow-menu__trigger ".concat(d&&"cds--overflow-menu--open"),"aria-haspopup":"true","aria-expanded":d,id:"custom-actions-overflow-menu-trigger","aria-controls":"custom-actions-overflow-menu",onClick:m,style:{width:"auto",height:"auto",padding:"1rem",color:"#0f62fe",outline:"2rem solid transparent",boxShadow:d?"0 2px 6px 0 rgb(0 0 0 / 30%)":"none"}},s),r().createElement("div",{className:"cds--overflow-menu-options cds--overflow-menu--flip",tabIndex:0,"data-floating-menu-direction":"bottom",role:"menu","aria-labelledby":"custom-actions-overflow-menu-trigger",id:"custom-actions-overflow-menu",style:{display:d?"block":"none",top:"3.125rem",minWidth:"initial",left:"auto",right:"0",backgroundColor:"#f4f4f4",marginRight:"0.2rem",boxShadow:"0 6px 6px rgb(0 0 0 / 30%)"}},r().createElement("ul",{className:"cds--overflow-menu-options__content"},o),r().createElement("span",null)))};var F=a(9361),j={};j.styleTagTransform=N(),j.setAttributes=y(),j.insert=f().bind(null,"head"),j.domAPI=h(),j.insertStyleElement=E(),m()(F.Z,j);const q=F.Z&&F.Z.locals?F.Z.locals:void 0;function V(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a<t;a++)n[a]=e[a];return n}function W(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var n,r,i=[],s=!0,l=!1;try{for(a=a.call(e);!(s=(n=a.next()).done)&&(i.push(n.value),!t||i.length!==t);s=!0);}catch(e){l=!0,r=e}finally{try{s||null==a.return||a.return()}finally{if(l)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return V(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(a):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?V(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var X=function(){return r().createElement("div",{className:q.container,role:"banner"},r().createElement("div",{className:q.patientBanner},r().createElement(l.Cqk,{className:q.patientAvatar}),r().createElement("div",{className:"".concat(q.patientNameRow," ").concat(q.patientInfo)},r().createElement("div",{className:q.flexRow},r().createElement(l.N2B,null)),r().createElement("div",{className:q.demographics},r().createElement(l.Cqk,null),"·",r().createElement(l.Cqk,null),"·",r().createElement(l.Cqk,null)),r().createElement("div",{className:q.identifiers},r().createElement(l.N2B,null)))),r().createElement("div",{className:q.buttonCol},r().createElement(l.Db,null),r().createElement(l.Db,null)))};const Y=function(e){var t,a=e.patient,n=e.patientUuid,s=e.onTransition,c=e.hideActionsOverflow,d=e.onPatientSelect,u=(0,i.useTranslation)().t,_=r().useRef(null),m=r().useRef(null),p=(r().useRef(null),(0,o.useVisit)(n).currentVisit),h=W(r().useState(!1),2),g=h[0],f=h[1],v=(0,o.useConfig)(),y=r().useMemo((function(){return{patientUuid:n,onPatientSelect:d,onTransition:s,launchPatientChart:!0}}),[n,d,s]),b=a.person.personName.display,E=r().useMemo((function(){return{patientUuid:n,patientName:b}}),[n,b]),w=W(r().useState(!1),2),N=w[0],x=w[1],S=r().useCallback((function(e){e.stopPropagation(),x((function(e){return!e}))}),[]),C=r().createElement("div",{className:q.patientAvatar,role:"img"},r().createElement(o.ExtensionSlot,{extensionSlotName:"patient-photo-slot",state:E})),T=r().useCallback((function(e){e.stopPropagation(),f((function(e){return!e}))}),[]);return r().createElement(r().Fragment,null,r().createElement("div",{className:q.container,role:"banner"},r().createElement(o.ConfigurableLink,{to:(0,o.interpolateString)(v.search.patientResultUrl,{patientUuid:n}),onClick:function(e){return d(e,n)},className:"".concat(q.patientBanner," ").concat(d&&q.patientAvatarButton)},C,r().createElement("div",{className:"".concat(q.patientNameRow," ").concat(q.patientInfo)},r().createElement("div",{className:q.flexRow},r().createElement("span",{className:q.patientName},b),r().createElement(o.ExtensionSlot,{extensionSlotName:"patient-banner-tags-slot",state:{patientUuid:n,patient:a},className:q.flexRow})),r().createElement("div",{className:q.demographics},r().createElement("span",null,function(e){switch(e){case"M":return u("male","Male");case"F":return u("female","Female");case"O":return u("other","Other");case"U":return u("unknown","Unknown");default:return e}}(a.person.gender))," · ",r().createElement("span",null,(0,o.age)(a.person.birthdate))," ","· ",r().createElement("span",null,(0,o.formatDate)((0,o.parseDate)(a.person.birthdate),{mode:"wide",time:!1}))),r().createElement("div",{className:q.identifiers},(null===(t=a.identifiers)||void 0===t?void 0:t.length)?a.identifiers.map((function(e){return e.identifier})).join(", "):"--"))),r().createElement("div",{className:q.buttonCol},!c&&r().createElement("div",{ref:_},r().createElement(U,{menuTitle:r().createElement(r().Fragment,null,r().createElement("span",{className:q.actionsButtonText},u("actions","Actions"))," ",r().createElement(R.r4,{size:16,style:{marginLeft:"0.5rem"}})),dropDownMenu:g},r().createElement(o.ExtensionSlot,{onClick:T,extensionSlotName:"patient-search-actions-slot",className:q.overflowMenuItemList,state:y}))),p?r().createElement(l.zxk,{ref:m,kind:"ghost",renderIcon:N?r().createElement(k.Kh,{size:16}):r().createElement(k._M,{size:16}),iconDescription:"Toggle contact details",onClick:S,style:{marginTop:"-0.25rem"}},N?u("showLess","Show less"):u("showAllDetails","Show all details")):r().createElement(o.ExtensionSlot,{extensionSlotName:"start-visit-button-slot",state:{patientUuid:n}}))),N&&r().createElement(Z,{address:a.person.addresses,patientId:a.uuid}))};var K=a(8039),G={};G.styleTagTransform=N(),G.setAttributes=y(),G.insert=f().bind(null,"head"),G.domAPI=h(),G.insertStyleElement=E(),m()(K.Z,G);const J=K.Z&&K.Z.locals?K.Z.locals:void 0;function $(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a<t;a++)n[a]=e[a];return n}function Q(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var n,r,i=[],s=!0,l=!1;try{for(a=a.call(e);!(s=(n=a.next()).done)&&(i.push(n.value),!t||i.length!==t);s=!0);}catch(e){l=!0,r=e}finally{try{s||null==a.return||a.return()}finally{if(l)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return $(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(a):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?$(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const ee=function(e){var t=e.query,a=e.stickyPagination,u=e.onPatientSelect,_=e.inTabletOrOverlay,m=(0,i.useTranslation)().t,p=(0,o.useConfig)(),h=Q((0,n.useState)(1),2),g=h[0],f=h[1],v=Q((0,n.useState)(1),2),y=v[0],b=v[1],E=_?15:5,w=(0,c.C)(t,!!t,E,g),N=w.isLoading,x=w.data,S=w.fetchError,C=w.hasMore,T=w.totalResults;(0,n.useEffect)((function(){N||b(Math.ceil(T/E))}),[N,T,E]),(0,n.useEffect)((function(){f(1)}),[t]);var R=(0,n.useCallback)((function(e,t){e.preventDefault(),u?u(t):(0,o.navigate)({to:(0,o.interpolateString)(p.search.patientResultUrl,{patientUuid:t})})}),[p,u]);return t?N?r().createElement("div",{className:J.searchResultsContainer},r().createElement("div",{className:"".concat(J.searchResults," ").concat(a&&J.broadBottomMargin)},r().createElement("div",null,r().createElement("h2",{className:"".concat(J.resultsHeader," ").concat(J.paddedResultsHeader," ").concat(_&&J.leftPaddedResultHeader)},r().createElement("span",{className:J.productiveHeading02},T?"".concat(T," ").concat(m("seachResultsSmall","search results")):m("searchingText","Searching..."))),r().createElement("div",{className:J.results},r().createElement(X,null),r().createElement(X,null),r().createElement(X,null),r().createElement(X,null),r().createElement(X,null))),r().createElement("div",{className:"".concat(J.pagination," ").concat(a&&J.stickyPagination)},r().createElement(A,{setCurrentPage:f,currentPage:g,hasMore:C,totalPages:y})))):S?r().createElement(l.mh4,null,r().createElement(l.n9L,{className:"".concat(J.emptySearchResultsTile," ").concat(_&&J.paddedEmptySearchResultsTile)},r().createElement(d.Z,null),r().createElement("div",null,r().createElement("p",{className:J.errorMessage},m("error","Error")),r().createElement("p",{className:J.errorCopy},m("errorCopy","Sorry, there was an error. You can try to reload this page, or contact the site administrator and quote the error code above."))))):(0,s.Z)(x)?r().createElement(r().Fragment,null,r().createElement("h2",{className:"".concat(J.resultsHeader," ").concat(_&&J.leftPaddedResultHeader)},r().createElement("span",{className:J.productiveHeading02},"0 ",m("seachResultsSmall","search results"))),r().createElement(l.mh4,null,r().createElement(l.n9L,{className:"".concat(J.emptySearchResultsTile," ").concat(_&&J.paddedEmptySearchResultsTile)},r().createElement(d.Z,null),r().createElement("p",{className:J.emptyResultText},m("noPatientChartsFoundMessage","Sorry, no patient charts have been found")),r().createElement("p",{className:J.actionText},r().createElement("span",null,m("trySearchWithPatientUniqueID","Try searching with the patient's unique ID number")),r().createElement("br",null),r().createElement("span",null,m("orPatientName","OR the patient's name(s)")))))):r().createElement("div",null,r().createElement("div",{className:"".concat(J.searchResults," ").concat(a&&J.broadBottomMargin)},r().createElement("h2",{className:"".concat(J.resultsHeader," ").concat(_&&J.leftPaddedResultHeader)},r().createElement("span",{className:J.productiveHeading02},T," ",m("seachResultsSmall","search results"))),r().createElement("div",{className:J.results},x.map((function(e){return r().createElement(Y,{onPatientSelect:R,patientUuid:e.uuid,patient:e})})))),r().createElement("div",{className:"".concat(J.pagination," ").concat(a&&J.stickyPagination)},r().createElement(A,{setCurrentPage:f,currentPage:g,hasMore:C,totalPages:y}))):r().createElement(r().Fragment,null,r().createElement("h2",{className:"".concat(J.resultsHeader," ").concat(_&&J.leftPaddedResultHeader)},r().createElement("span",{className:J.productiveHeading02},"0 ",m("seachResultsSmall","search results"))),r().createElement(l.mh4,null,r().createElement(l.n9L,{className:"".concat(J.emptySearchResultsTile," ").concat(_&&J.paddedEmptySearchResultsTile)},r().createElement(d.Z,null),r().createElement("p",{className:J.emptyResultText},m("noPatientChartsFoundMessage","Sorry, no patient charts have been found")),r().createElement("p",{className:J.actionText},r().createElement("span",null,m("trySearchWithPatientUniqueID","Try searching with the patient's unique ID number")),r().createElement("br",null),r().createElement("span",null,m("orPatientName","OR the patient's name(s)"))))))}},634:(e,t,a)=>{a.d(t,{C:()=>d,q:()=>u});var n=a(5206),r=a(9857),i=a(6635),s=a(906);function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a<t;a++)n[a]=e[a];return n}function o(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return l(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(a):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?l(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var c="custom:(patientId,uuid,identifiers,display,patientIdentifier:(uuid,identifier),person:(gender,age,birthdate,birthdateEstimated,personName,addresses,display,dead,deathDate),attributes:(value,attributeType:(name)))";function d(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],a=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,l=arguments.length>4&&void 0!==arguments[4]?arguments[4]:c,o=(0,s.useConfig)(),d="/ws/rest/v1/patient?q=".concat(e,"&v=").concat(l,"&limit=").concat(a,"&totalCount=true");o.includeDead&&(d+="&includeDead=".concat(null==o?void 0:o.includeDead)),i>1&&(d+="&startIndex=".concat((i-1)*a));var u=(0,r.ZP)(t?d:null,s.openmrsFetch),_=u.data,m=u.isValidating,p=u.error,h=(0,n.useMemo)((function(){var e,t,a,n;return{data:null==_||null===(e=_.data)||void 0===e?void 0:e.results,isLoading:!(null==_?void 0:_.data)&&!p,fetchError:p,hasMore:null==_||null===(t=_.data)||void 0===t||null===(a=t.links)||void 0===a?void 0:a.some((function(e){return"next"===e.rel})),loadingNewData:m,totalResults:null==_||null===(n=_.data)||void 0===n?void 0:n.totalCount}}),[_,m,p]);return h}function u(e,t){var a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:10,l=arguments.length>4&&void 0!==arguments[4]?arguments[4]:c,d=(0,n.useCallback)((function(a,n){var i;if(n&&!(null==n||null===(i=n.data)||void 0===i?void 0:i.links.some((function(e){return"next"===e.rel}))))return null;var s="/ws/rest/v1/patient?q=".concat(e,"&v=").concat(l,"&includeDead=").concat(t,"&limit=").concat(r,"&totalCount=true");return a&&(s+="&startIndex=".concat(a*r)),s}),[e,l,t,r]),u=(0,i.ZP)(a?d:null,s.openmrsFetch),_=u.data,m=u.isValidating,p=u.setSize,h=u.error,g=u.size,f=(0,n.useMemo)((function(){var e,t,a,n,r;return{data:_?(e=[]).concat.apply(e,o(null==_?void 0:_.map((function(e){var t;return null==e||null===(t=e.data)||void 0===t?void 0:t.results})))):null,isLoading:!_&&!h,fetchError:h,hasMore:!!(null==_?void 0:_.length)&&!!(null===(t=_[_.length-1].data)||void 0===t||null===(a=t.links)||void 0===a?void 0:a.some((function(e){return"next"===e.rel}))),loadingNewData:m,setPage:p,currentPage:g,totalResults:null==_||null===(n=_[0])||void 0===n||null===(r=n.data)||void 0===r?void 0:r.totalCount}}),[_,m,h,p,g]);return f}},9653:(e,t,a)=>{a.d(t,{Z:()=>r});var n=a(5206);const r=function(e){var t=e.width,a=void 0===t?"64":t,r=e.height,i=void 0===r?"64":r;return n.createElement("svg",{width:a,height:i,viewBox:"0 0 64 64"},n.createElement("title",null,"Empty data illustration"),n.createElement("g",{fill:"none",fillRule:"evenodd"},n.createElement("path",{d:"M38.133 13.186H21.947c-.768.001-1.39.623-1.39 1.391V50.55l-.186.057-3.97 1.216a.743.743 0 01-.927-.493L3.664 12.751a.742.742 0 01.492-.926l6.118-1.874 17.738-5.43 6.119-1.873a.741.741 0 01.926.492L38.076 13l.057.186z",fill:"#E0E0E0"}),n.createElement("path",{d:"M41.664 13L38.026 1.117A1.576 1.576 0 0036.056.07l-8.601 2.633-17.737 5.43-8.603 2.634a1.578 1.578 0 00-1.046 1.97l12.436 40.616a1.58 1.58 0 001.969 1.046l5.897-1.805.185-.057v-.194l-.185.057-5.952 1.822a1.393 1.393 0 01-1.737-.923L.247 12.682a1.39 1.39 0 01.923-1.738L9.772 8.31 27.51 2.881 36.112.247a1.393 1.393 0 011.737.923L41.47 13l.057.186h.193l-.057-.185z",fill:"#8D8D8D"}),n.createElement("path",{d:"M11.378 11.855a.836.836 0 01-.798-.59L9.385 7.361a.835.835 0 01.554-1.042l16.318-4.996a.836.836 0 011.042.554l1.195 3.902a.836.836 0 01-.554 1.043l-16.318 4.995a.831.831 0 01-.244.037z",fill:"#C6C6C6"}),n.createElement("circle",{fill:"#C6C6C6",cx:17.636,cy:2.314,r:1.855}),n.createElement("circle",{fill:"#FFF",fillRule:"nonzero",cx:17.636,cy:2.314,r:1.175}),n.createElement("path",{d:"M55.893 53.995H24.544a.79.79 0 01-.788-.789V15.644a.79.79 0 01.788-.788h31.349a.79.79 0 01.788.788v37.562a.79.79 0 01-.788.789z",fill:"#E0E0E0"}),n.createElement("path",{d:"M41.47 13H21.948a1.579 1.579 0 00-1.576 1.577V52.4l.185-.057V14.577c.001-.768.623-1.39 1.391-1.39h19.581L41.471 13zm17.02 0H21.947a1.579 1.579 0 00-1.576 1.577v42.478c0 .87.706 1.576 1.576 1.577H58.49a1.579 1.579 0 001.576-1.577V14.577a1.579 1.579 0 00-1.576-1.576zm1.39 44.055c0 .768-.622 1.39-1.39 1.392H21.947c-.768-.001-1.39-.624-1.39-1.392V14.577c0-.768.622-1.39 1.39-1.39H58.49c.768 0 1.39.622 1.39 1.39v42.478z",fill:"#8D8D8D"}),n.createElement("path",{d:"M48.751 17.082H31.686a.836.836 0 01-.835-.835v-4.081c0-.46.374-.834.835-.835H48.75c.461 0 .834.374.835.835v4.08c0 .462-.374.835-.835.836z",fill:"#C6C6C6"}),n.createElement("circle",{fill:"#C6C6C6",cx:40.218,cy:9.755,r:1.855}),n.createElement("circle",{fill:"#FFF",fillRule:"nonzero",cx:40.218,cy:9.755,r:1.13})))}}}]);
package/dist/750.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_openmrs_esm_patient_search_app=self.webpackChunk_openmrs_esm_patient_search_app||[]).push([[750],{8513:(e,t,a)=>{a.d(t,{Z:()=>r});var n=a(2609),i=a.n(n)()((function(e){return e[1]}));i.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-patient-search__patient-search-page__productiveHeading01___CUFOb{font-size:var(--cds-heading-compact-01-font-size, 0.875rem);font-weight:var(--cds-heading-compact-01-font-weight, 600);line-height:var(--cds-heading-compact-01-line-height, 1.28572);letter-spacing:var(--cds-heading-compact-01-letter-spacing, 0.16px)}.-esm-patient-search__patient-search-page__productiveHeading02___70dxu{font-size:var(--cds-heading-compact-02-font-size, 1rem);font-weight:var(--cds-heading-compact-02-font-weight, 600);line-height:var(--cds-heading-compact-02-line-height, 1.375);letter-spacing:var(--cds-heading-compact-02-letter-spacing, 0)}.-esm-patient-search__patient-search-page__bodyLong01___GSy9b{font-size:var(--cds-body-01-font-size, 0.875rem);font-weight:var(--cds-body-01-font-weight, 400);line-height:var(--cds-body-01-line-height, 1.42857);letter-spacing:var(--cds-body-01-letter-spacing, 0.16px)}.-esm-patient-search__patient-search-page__patientSearchPage___AR\\+R6{display:flex;justify-content:center}.-esm-patient-search__patient-search-page__patientSearchComponent___ABHkJ{margin-top:1rem;width:37.5rem}",""]),i.locals={productiveHeading01:"-esm-patient-search__patient-search-page__productiveHeading01___CUFOb",productiveHeading02:"-esm-patient-search__patient-search-page__productiveHeading02___70dxu",bodyLong01:"-esm-patient-search__patient-search-page__bodyLong01___GSy9b",patientSearchPage:"-esm-patient-search__patient-search-page__patientSearchPage___AR+R6",patientSearchComponent:"-esm-patient-search__patient-search-page__patientSearchComponent___ABHkJ"};const r=i},2750:(e,t,a)=>{a.r(t),a.d(t,{default:()=>E});var n=a(5206),i=a.n(n),r=a(7228),c=a(906),s=a(1668),p=a(6062),_=a.n(p),o=a(4036),h=a.n(o),d=a(6793),g=a.n(d),m=a(7892),l=a.n(m),u=a(1173),v=a.n(u),f=a(2464),b=a.n(f),y=a(8513),w={};w.styleTagTransform=b(),w.setAttributes=l(),w.insert=g().bind(null,"head"),w.domAPI=h(),w.insertStyleElement=v(),_()(y.Z,w);const S=y.Z&&y.Z.locals?y.Z.locals:void 0,k=function(){var e=(0,r.useParams)().query,t=(0,c.useLayoutType)();return(0,c.isDesktop)(t)?i().createElement("div",{className:S.patientSearchPage},i().createElement("div",{className:S.patientSearchComponent},i().createElement(s.Z,{query:e,inTabletOrOverlay:!(0,c.isDesktop)(t),stickyPagination:!0}))):i().createElement(i().Fragment,null)},E=function(){return i().createElement(r.BrowserRouter,{basename:"".concat(window.getOpenmrsSpaBase(),"search")},i().createElement(r.Routes,null,i().createElement(r.Route,{path:"/:query",element:i().createElement(k,null)})))}}}]);
package/dist/759.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_openmrs_esm_patient_search_app=self.webpackChunk_openmrs_esm_patient_search_app||[]).push([[759],{6759:(e,t,r)=>{r.d(t,{Xd:()=>p});var n,a,h=r(7398),i=r(5206),s=r.n(i),l=["children","size"],p=s().forwardRef((function(e,t){var r=e.children,i=e.size,p=void 0===i?16:i,w=(0,h._)(e,l);return 16===p||"16"===p||"16px"===p?s().createElement(h.I,(0,h.a)({width:p,height:p,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor"},w),n||(n=s().createElement("path",{d:"M6.7 12.3L2.9 8.5 15 8.5 15 7.5 2.9 7.5 6.7 3.7 6 3 1 8 6 13z"})),r):s().createElement(h.I,(0,h.a)({width:p,height:p,ref:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor"},w),a||(a=s().createElement("path",{d:"M14 26L15.41 24.59 7.83 17 28 17 28 15 7.83 15 15.41 7.41 14 6 4 16 14 26z"})),r)}))}}]);
package/dist/784.js CHANGED
@@ -1,3 +1,2 @@
1
1
  /*! For license information please see 784.js.LICENSE.txt */
2
- "use strict";(self.webpackChunk_openmrs_esm_patient_search_app=self.webpackChunk_openmrs_esm_patient_search_app||[]).push([[784],{7320:e=>{var r=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var r={},t=0;t<10;t++)r["_"+String.fromCharCode(t)]=t;if("0123456789"!==Object.getOwnPropertyNames(r).map((function(e){return r[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,u){for(var c,f,l=o(e),i=1;i<arguments.length;i++){for(var a in c=Object(arguments[i]))t.call(c,a)&&(l[a]=c[a]);if(r){f=r(c);for(var s=0;s<f.length;s++)n.call(c,f[s])&&(l[f[s]]=c[f[s]])}}return l}},3426:(e,r,t)=>{var n=t(7320),o="function"==typeof Symbol&&Symbol.for,u=o?Symbol.for("react.element"):60103,c=o?Symbol.for("react.portal"):60106,f=o?Symbol.for("react.fragment"):60107,l=o?Symbol.for("react.strict_mode"):60108,i=o?Symbol.for("react.profiler"):60114,a=o?Symbol.for("react.provider"):60109,s=o?Symbol.for("react.context"):60110,p=o?Symbol.for("react.forward_ref"):60112,y=o?Symbol.for("react.suspense"):60113,d=o?Symbol.for("react.memo"):60115,h=o?Symbol.for("react.lazy"):60116,m="function"==typeof Symbol&&Symbol.iterator;function v(e){for(var r="https://reactjs.org/docs/error-decoder.html?invariant="+e,t=1;t<arguments.length;t++)r+="&args[]="+encodeURIComponent(arguments[t]);return"Minified React error #"+e+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_={};function g(e,r,t){this.props=e,this.context=r,this.refs=_,this.updater=t||b}function S(){}function k(e,r,t){this.props=e,this.context=r,this.refs=_,this.updater=t||b}g.prototype.isReactComponent={},g.prototype.setState=function(e,r){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(v(85));this.updater.enqueueSetState(this,e,r,"setState")},g.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},S.prototype=g.prototype;var w=k.prototype=new S;w.constructor=k,n(w,g.prototype),w.isPureReactComponent=!0;var j={current:null},O=Object.prototype.hasOwnProperty,C={key:!0,ref:!0,__self:!0,__source:!0};function $(e,r,t){var n,o={},c=null,f=null;if(null!=r)for(n in void 0!==r.ref&&(f=r.ref),void 0!==r.key&&(c=""+r.key),r)O.call(r,n)&&!C.hasOwnProperty(n)&&(o[n]=r[n]);var l=arguments.length-2;if(1===l)o.children=t;else if(1<l){for(var i=Array(l),a=0;a<l;a++)i[a]=arguments[a+2];o.children=i}if(e&&e.defaultProps)for(n in l=e.defaultProps)void 0===o[n]&&(o[n]=l[n]);return{$$typeof:u,type:e,key:c,ref:f,props:o,_owner:j.current}}function E(e){return"object"==typeof e&&null!==e&&e.$$typeof===u}var P=/\/+/g,x=[];function R(e,r,t,n){if(x.length){var o=x.pop();return o.result=e,o.keyPrefix=r,o.func=t,o.context=n,o.count=0,o}return{result:e,keyPrefix:r,func:t,context:n,count:0}}function A(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>x.length&&x.push(e)}function I(e,r,t,n){var o=typeof e;"undefined"!==o&&"boolean"!==o||(e=null);var f=!1;if(null===e)f=!0;else switch(o){case"string":case"number":f=!0;break;case"object":switch(e.$$typeof){case u:case c:f=!0}}if(f)return t(n,e,""===r?"."+U(e,0):r),1;if(f=0,r=""===r?".":r+":",Array.isArray(e))for(var l=0;l<e.length;l++){var i=r+U(o=e[l],l);f+=I(o,i,t,n)}else if("function"==typeof(i=null===e||"object"!=typeof e?null:"function"==typeof(i=m&&e[m]||e["@@iterator"])?i:null))for(e=i.call(e),l=0;!(o=e.next()).done;)f+=I(o=o.value,i=r+U(o,l++),t,n);else if("object"===o)throw t=""+e,Error(v(31,"[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t,""));return f}function q(e,r,t){return null==e?0:I(e,"",r,t)}function U(e,r){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var r={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,(function(e){return r[e]}))}(e.key):r.toString(36)}function F(e,r){e.func.call(e.context,r,e.count++)}function L(e,r,t){var n=e.result,o=e.keyPrefix;e=e.func.call(e.context,r,e.count++),Array.isArray(e)?M(e,n,t,(function(e){return e})):null!=e&&(E(e)&&(e=function(e,r){return{$$typeof:u,type:e.type,key:r,ref:e.ref,props:e.props,_owner:e._owner}}(e,o+(!e.key||r&&r.key===e.key?"":(""+e.key).replace(P,"$&/")+"/")+t)),n.push(e))}function M(e,r,t,n,o){var u="";null!=t&&(u=(""+t).replace(P,"$&/")+"/"),q(e,L,r=R(r,u,n,o)),A(r)}var N={current:null};function D(){var e=N.current;if(null===e)throw Error(v(321));return e}var T={ReactCurrentDispatcher:N,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:j,IsSomeRendererActing:{current:!1},assign:n};r.Children={map:function(e,r,t){if(null==e)return e;var n=[];return M(e,n,null,r,t),n},forEach:function(e,r,t){if(null==e)return e;q(e,F,r=R(null,null,r,t)),A(r)},count:function(e){return q(e,(function(){return null}),null)},toArray:function(e){var r=[];return M(e,r,null,(function(e){return e})),r},only:function(e){if(!E(e))throw Error(v(143));return e}},r.Component=g,r.Fragment=f,r.Profiler=i,r.PureComponent=k,r.StrictMode=l,r.Suspense=y,r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=T,r.cloneElement=function(e,r,t){if(null==e)throw Error(v(267,e));var o=n({},e.props),c=e.key,f=e.ref,l=e._owner;if(null!=r){if(void 0!==r.ref&&(f=r.ref,l=j.current),void 0!==r.key&&(c=""+r.key),e.type&&e.type.defaultProps)var i=e.type.defaultProps;for(a in r)O.call(r,a)&&!C.hasOwnProperty(a)&&(o[a]=void 0===r[a]&&void 0!==i?i[a]:r[a])}var a=arguments.length-2;if(1===a)o.children=t;else if(1<a){i=Array(a);for(var s=0;s<a;s++)i[s]=arguments[s+2];o.children=i}return{$$typeof:u,type:e.type,key:c,ref:f,props:o,_owner:l}},r.createContext=function(e,r){return void 0===r&&(r=null),(e={$$typeof:s,_calculateChangedBits:r,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:a,_context:e},e.Consumer=e},r.createElement=$,r.createFactory=function(e){var r=$.bind(null,e);return r.type=e,r},r.createRef=function(){return{current:null}},r.forwardRef=function(e){return{$$typeof:p,render:e}},r.isValidElement=E,r.lazy=function(e){return{$$typeof:h,_ctor:e,_status:-1,_result:null}},r.memo=function(e,r){return{$$typeof:d,type:e,compare:void 0===r?null:r}},r.useCallback=function(e,r){return D().useCallback(e,r)},r.useContext=function(e,r){return D().useContext(e,r)},r.useDebugValue=function(){},r.useEffect=function(e,r){return D().useEffect(e,r)},r.useImperativeHandle=function(e,r,t){return D().useImperativeHandle(e,r,t)},r.useLayoutEffect=function(e,r){return D().useLayoutEffect(e,r)},r.useMemo=function(e,r){return D().useMemo(e,r)},r.useReducer=function(e,r,t){return D().useReducer(e,r,t)},r.useRef=function(e){return D().useRef(e)},r.useState=function(e){return D().useState(e)},r.version="16.14.0"},2784:(e,r,t)=>{e.exports=t(3426)}}]);
3
- //# sourceMappingURL=784.js.map
2
+ "use strict";(self.webpackChunk_openmrs_esm_patient_search_app=self.webpackChunk_openmrs_esm_patient_search_app||[]).push([[784],{3426:(e,t)=>{var r=Symbol.for("react.element"),n=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),i=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),s=Symbol.for("react.suspense"),l=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),y=Symbol.iterator,d={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,h={};function m(e,t,r){this.props=e,this.context=t,this.refs=h,this.updater=r||d}function b(){}function v(e,t,r){this.props=e,this.context=t,this.refs=h,this.updater=r||d}m.prototype.isReactComponent={},m.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},m.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},b.prototype=m.prototype;var S=v.prototype=new b;S.constructor=v,_(S,m.prototype),S.isPureReactComponent=!0;var k=Array.isArray,w=Object.prototype.hasOwnProperty,E={current:null},$={key:!0,ref:!0,__self:!0,__source:!0};function R(e,t,n){var o,u={},a=null,c=null;if(null!=t)for(o in void 0!==t.ref&&(c=t.ref),void 0!==t.key&&(a=""+t.key),t)w.call(t,o)&&!$.hasOwnProperty(o)&&(u[o]=t[o]);var i=arguments.length-2;if(1===i)u.children=n;else if(1<i){for(var f=Array(i),s=0;s<i;s++)f[s]=arguments[s+2];u.children=f}if(e&&e.defaultProps)for(o in i=e.defaultProps)void 0===u[o]&&(u[o]=i[o]);return{$$typeof:r,type:e,key:a,ref:c,props:u,_owner:E.current}}function C(e){return"object"==typeof e&&null!==e&&e.$$typeof===r}var g=/\/+/g;function j(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function O(e,t,o,u,a){var c=typeof e;"undefined"!==c&&"boolean"!==c||(e=null);var i=!1;if(null===e)i=!0;else switch(c){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case r:case n:i=!0}}if(i)return a=a(i=e),e=""===u?"."+j(i,0):u,k(a)?(o="",null!=e&&(o=e.replace(g,"$&/")+"/"),O(a,t,o,"",(function(e){return e}))):null!=a&&(C(a)&&(a=function(e,t){return{$$typeof:r,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(a,o+(!a.key||i&&i.key===a.key?"":(""+a.key).replace(g,"$&/")+"/")+e)),t.push(a)),1;if(i=0,u=""===u?".":u+":",k(e))for(var f=0;f<e.length;f++){var s=u+j(c=e[f],f);i+=O(c,t,o,s,a)}else if(s=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=y&&e[y]||e["@@iterator"])?e:null}(e),"function"==typeof s)for(e=s.call(e),f=0;!(c=e.next()).done;)i+=O(c=c.value,t,o,s=u+j(c,f++),a);else if("object"===c)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function x(e,t,r){if(null==e)return e;var n=[],o=0;return O(e,n,"","",(function(e){return t.call(r,e,o++)})),n}function P(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var I={current:null},T={transition:null},V={ReactCurrentDispatcher:I,ReactCurrentBatchConfig:T,ReactCurrentOwner:E};t.Children={map:x,forEach:function(e,t,r){x(e,(function(){t.apply(this,arguments)}),r)},count:function(e){var t=0;return x(e,(function(){t++})),t},toArray:function(e){return x(e,(function(e){return e}))||[]},only:function(e){if(!C(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=m,t.Fragment=o,t.Profiler=a,t.PureComponent=v,t.StrictMode=u,t.Suspense=s,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=V,t.cloneElement=function(e,t,n){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var o=_({},e.props),u=e.key,a=e.ref,c=e._owner;if(null!=t){if(void 0!==t.ref&&(a=t.ref,c=E.current),void 0!==t.key&&(u=""+t.key),e.type&&e.type.defaultProps)var i=e.type.defaultProps;for(f in t)w.call(t,f)&&!$.hasOwnProperty(f)&&(o[f]=void 0===t[f]&&void 0!==i?i[f]:t[f])}var f=arguments.length-2;if(1===f)o.children=n;else if(1<f){i=Array(f);for(var s=0;s<f;s++)i[s]=arguments[s+2];o.children=i}return{$$typeof:r,type:e.type,key:u,ref:a,props:o,_owner:c}},t.createContext=function(e){return(e={$$typeof:i,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:c,_context:e},e.Consumer=e},t.createElement=R,t.createFactory=function(e){var t=R.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:f,render:e}},t.isValidElement=C,t.lazy=function(e){return{$$typeof:p,_payload:{_status:-1,_result:e},_init:P}},t.memo=function(e,t){return{$$typeof:l,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=T.transition;T.transition={};try{e()}finally{T.transition=t}},t.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},t.useCallback=function(e,t){return I.current.useCallback(e,t)},t.useContext=function(e){return I.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return I.current.useDeferredValue(e)},t.useEffect=function(e,t){return I.current.useEffect(e,t)},t.useId=function(){return I.current.useId()},t.useImperativeHandle=function(e,t,r){return I.current.useImperativeHandle(e,t,r)},t.useInsertionEffect=function(e,t){return I.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return I.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return I.current.useMemo(e,t)},t.useReducer=function(e,t,r){return I.current.useReducer(e,t,r)},t.useRef=function(e){return I.current.useRef(e)},t.useState=function(e){return I.current.useState(e)},t.useSyncExternalStore=function(e,t,r){return I.current.useSyncExternalStore(e,t,r)},t.useTransition=function(){return I.current.useTransition()},t.version="18.1.0"},2784:(e,t,r)=>{e.exports=r(3426)}}]);
@@ -1,10 +1,5 @@
1
- /*
2
- object-assign
3
- (c) Sindre Sorhus
4
- @license MIT
5
- */
6
-
7
- /** @license React v16.14.0
1
+ /**
2
+ * @license React
8
3
  * react.production.min.js
9
4
  *
10
5
  * Copyright (c) Facebook, Inc. and its affiliates.