@openmrs/esm-patient-attachments-app 6.1.1-pre.3521 → 6.1.1-pre.3524
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +3 -3
- package/dist/271.js +1 -1
- package/dist/28.js +1 -1
- package/dist/28.js.map +1 -1
- package/dist/319.js +1 -1
- package/dist/460.js +1 -1
- package/dist/574.js +1 -1
- package/dist/644.js +1 -1
- package/dist/757.js +1 -1
- package/dist/766.js +1 -1
- package/dist/766.js.map +1 -1
- package/dist/788.js +1 -1
- package/dist/807.js +1 -1
- package/dist/833.js +1 -1
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/openmrs-esm-patient-attachments-app.js +1 -1
- package/dist/openmrs-esm-patient-attachments-app.js.buildmanifest.json +37 -37
- package/dist/routes.json +1 -1
- package/package.json +3 -3
- package/src/attachments/attachments-overview.component.tsx +2 -1
- package/src/attachments/image-preview.component.tsx +1 -0
- package/src/attachments/image-preview.scss +4 -8
- package/src/attachments-config-schema.ts +1 -1
- package/src/camera-media-uploader/media-uploader.component.tsx +2 -1
- package/translations/am.json +1 -0
- package/translations/ar.json +1 -0
- package/translations/en.json +1 -0
- package/translations/es.json +1 -0
- package/translations/fr.json +1 -0
- package/translations/he.json +1 -0
- package/translations/km.json +1 -0
- package/translations/zh.json +1 -0
- package/translations/zh_CN.json +1 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -12,8 +12,8 @@ orphan modules 3.36 MiB [1m[33m[orphan][39m[22m 555 modules
|
|
|
12
12
|
runtime modules 41.2 KiB 28 modules
|
|
13
13
|
built modules 3.88 MiB (javascript) 336 bytes (consume-shared) 294 bytes (share-init) [1m[33m[built][39m[22m
|
|
14
14
|
javascript modules 3.86 MiB 108 modules
|
|
15
|
-
optional modules 13.
|
|
16
|
-
[1m./translations/am.json[39m[22m 1.
|
|
15
|
+
optional modules 13.7 KiB [1m[33m[optional][39m[22m
|
|
16
|
+
[1m./translations/am.json[39m[22m 1.6 KiB [1m[33m[optional][39m[22m [1m[33m[built][39m[22m [1m[33m[code generated][39m[22m
|
|
17
17
|
+ 8 modules
|
|
18
18
|
consume-shared-module modules 336 bytes
|
|
19
19
|
modules by path [1mconsume shared module (default) @openmrs/[39m[22m 126 bytes 3 modules
|
|
@@ -37,4 +37,4 @@ Entrypoints:
|
|
|
37
37
|
main.js
|
|
38
38
|
[39m[22m
|
|
39
39
|
|
|
40
|
-
webpack 5.89.0 compiled with [1m[33m2 warnings[39m[22m in
|
|
40
|
+
webpack 5.89.0 compiled with [1m[33m2 warnings[39m[22m in 81410 ms
|
package/dist/271.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_openmrs_esm_patient_attachments_app=globalThis.webpackChunk_openmrs_esm_patient_attachments_app||[]).push([[271],{8271:e=>{e.exports=JSON.parse('{"add":"添加","addAttachment":"添加附件","addAttachment_title":"添加附件","addImage":"添加图像 +","addMoreAttachments":"增加更多附件","attachmentCaptionInstruction":"输入标题","attachments":"附件","Attachments":"附件","attachmentsInLowerCase":"附件","attachmentsInProperFormat":"附件","cameraError":"相机错误","cancel":"取消","changeImage":"更改图像","closeModal":"关闭","closePreview":"关闭预览","dateUploaded":"上传日期","delete":"删除","deleteAttachmentConfirmationText":"你确定要删除这个{{attachmentType}}吗?此操作无法撤销。","deleteImage":"删除图像","error":"错误","errorUploading":"上传文件出错","failed":"失败","failedDeleting":"无法删除","fieldRequired":"此字段为必填项","file":"文件","fileDeleted":"文件已删除","fileName":"文件名","fileSizeInstructions":"拖放文件到此处或点击上传","fileSizeLimitExceeded":"exceeds the file size of","fileSizeLimitExceededText":"文件大小超过限制","fileUnsupported":"上传的文件不受支持","fileUploadSizeConstraints":"文件限制为{{fileSize}}MB","image":"图像","imageDescription":"图像描述","name":"name","successfullyDeleted":"删除成功","type":"类型","uploadComplete":"上传完成","uploadedSuccessfully":"上传成功","uploadFiles":"上传文件","uploading":"正在上传","uploadWillContinueInTheBackground":"文件将在后台上传。您可以关闭此模态窗口。","webcam":"摄像头"}')}}]);
|
|
1
|
+
"use strict";(globalThis.webpackChunk_openmrs_esm_patient_attachments_app=globalThis.webpackChunk_openmrs_esm_patient_attachments_app||[]).push([[271],{8271:e=>{e.exports=JSON.parse('{"add":"添加","addAttachment":"添加附件","addAttachment_title":"添加附件","addImage":"添加图像 +","addMoreAttachments":"增加更多附件","attachmentCaptionInstruction":"输入标题","attachments":"附件","Attachments":"附件","attachmentsInLowerCase":"附件","attachmentsInProperFormat":"附件","cameraError":"相机错误","cancel":"取消","changeImage":"更改图像","closeModal":"关闭","closePreview":"关闭预览","dateUploaded":"上传日期","delete":"删除","deleteAttachmentConfirmationText":"你确定要删除这个{{attachmentType}}吗?此操作无法撤销。","deleteImage":"删除图像","error":"错误","errorUploading":"上传文件出错","failed":"失败","failedDeleting":"无法删除","fieldRequired":"此字段为必填项","file":"文件","fileDeleted":"文件已删除","fileName":"文件名","fileSizeInstructions":"拖放文件到此处或点击上传","fileSizeLimitExceeded":"exceeds the file size of","fileSizeLimitExceededText":"文件大小超过限制","fileUnsupported":"上传的文件不受支持","fileUploadSizeConstraints":"文件限制为{{fileSize}}MB","image":"图像","imageDescription":"图像描述","name":"name","successfullyDeleted":"删除成功","supportedFileTypes":"Supported file types are: JPEG, PNG, and WEBP","type":"类型","uploadComplete":"上传完成","uploadedSuccessfully":"上传成功","uploadFiles":"上传文件","uploading":"正在上传","uploadWillContinueInTheBackground":"文件将在后台上传。您可以关闭此模态窗口。","webcam":"摄像头"}')}}]);
|
package/dist/28.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_openmrs_esm_patient_attachments_app=globalThis.webpackChunk_openmrs_esm_patient_attachments_app||[]).push([[28],{5088:(e,t,a)=>{a.d(t,{Z:()=>c});var n=a(272),i=a.n(n),r=a(2609),o=a.n(r)()(i());o.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-attachments__camera-media-uploader__productiveHeading02___SF9v_{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-attachments__camera-media-uploader__productiveHeading03___kyc2j{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)}.-esm-patient-attachments__camera-media-uploader__bodyLong01___E3SSh{font-size:var(--cds-body-long-01-font-size, 0.875rem);font-weight:var(--cds-body-long-01-font-weight, 400);line-height:var(--cds-body-long-01-line-height, 1.42857);letter-spacing:var(--cds-body-long-01-letter-spacing, 0.16px)}.-esm-patient-attachments__camera-media-uploader__muted___DsrFK{color:#525252}.-esm-patient-attachments__camera-media-uploader__bodyShort01___Fgqqf{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)}.-esm-patient-attachments__camera-media-uploader__text02___zldA6{color:#525252}.-esm-patient-attachments__camera-media-uploader__cameraSection___O1_hE{width:inherit;background-color:#fff}.-esm-patient-attachments__camera-media-uploader__cameraSection___O1_hE .react-html5-camera-photo>img,.-esm-patient-attachments__camera-media-uploader__cameraSection___O1_hE .react-html5-camera-photo>video{max-width:100%;max-height:100%}.-esm-patient-attachments__camera-media-uploader__uploadFile___xPA_w{color:#fff}.-esm-patient-attachments__camera-media-uploader__uploadFile___xPA_w label{max-width:unset}.-esm-patient-attachments__camera-media-uploader__uploadFile___xPA_w label>div{height:25rem;justify-content:center;align-items:center}.-esm-patient-attachments__camera-media-uploader__modalBody___YH4FB{padding:0;margin:0}@media(max-width: 1023px){.-esm-patient-attachments__camera-media-uploader__frameContent___f9Y86{width:65%}}.-esm-patient-attachments__camera-media-uploader__tabList___ougWM{border-bottom:2px solid #e0e0e0}.-esm-patient-attachments__camera-media-uploader__tabList___ougWM div{position:absolute;bottom:-2px;height:100%;z-index:1}.-esm-patient-attachments__camera-media-uploader__tabList___ougWM div button>div{align-items:center}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/root.scss","webpack://./../../node_modules/@carbon/type/scss/_styles.scss","webpack://./src/camera-media-uploader/camera-media-uploader.scss"],names:[],mappings:"AAoDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CAHF,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CCnDF,8EC81BI,uDAAA,CAAA,0DAAA,CAAA,4DAAA,CAAA,8DAAA,CD11BJ,8EC01BI,kDAAA,CAAA,kDAAA,CAAA,kDAAA,CAAA,sDAAA,CDt1BJ,qECs1BI,qDAAA,CAAA,oDAAA,CAAA,wDAAA,CAAA,6DAAA,CDl1BJ,gEACE,aDZQ,CCeV,sEC80BI,wDAAA,CAAA,uDAAA,CAAA,2DAAA,CAAA,gEAAA,CD10BJ,iEACE,aDpBQ,CGDV,wEACE,aAAA,CACA,qBHLM,CGSN,8MACE,cAAA,CACA,eAAA,CAIJ,qEACE,UHhBM,CGkBN,2EACE,eAAA,CAGF,+EACE,YAAA,CACA,sBAAA,CACA,kBAAA,CAKJ,oEACE,SAAA,CACA,QAAA,CAGF,0BACE,uEACE,SAAA,CAAA,CAIJ,kEACE,+BAAA,CAEA,sEACE,iBAAA,CACA,WAAA,CACA,WAAA,CACA,SAAA,CAEA,iFACE,kBAAA",sourceRoot:""}]),o.locals={productiveHeading02:"-esm-patient-attachments__camera-media-uploader__productiveHeading02___SF9v_",productiveHeading03:"-esm-patient-attachments__camera-media-uploader__productiveHeading03___kyc2j",bodyLong01:"-esm-patient-attachments__camera-media-uploader__bodyLong01___E3SSh",muted:"-esm-patient-attachments__camera-media-uploader__muted___DsrFK",bodyShort01:"-esm-patient-attachments__camera-media-uploader__bodyShort01___Fgqqf",text02:"-esm-patient-attachments__camera-media-uploader__text02___zldA6",cameraSection:"-esm-patient-attachments__camera-media-uploader__cameraSection___O1_hE",uploadFile:"-esm-patient-attachments__camera-media-uploader__uploadFile___xPA_w",modalBody:"-esm-patient-attachments__camera-media-uploader__modalBody___YH4FB",frameContent:"-esm-patient-attachments__camera-media-uploader__frameContent___f9Y86",tabList:"-esm-patient-attachments__camera-media-uploader__tabList___ougWM"};const c=o},8265:(e,t,a)=>{a.d(t,{Z:()=>c});var n=a(272),i=a.n(n),r=a(2609),o=a.n(r)()(i());o.push([e.id,':root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-patient-attachments__file-review__productiveHeading02___vucWQ{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-attachments__file-review__productiveHeading03___nppG6{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)}.-esm-patient-attachments__file-review__bodyLong01___Jn8EJ{font-size:var(--cds-body-long-01-font-size, 0.875rem);font-weight:var(--cds-body-long-01-font-weight, 400);line-height:var(--cds-body-long-01-line-height, 1.42857);letter-spacing:var(--cds-body-long-01-letter-spacing, 0.16px)}.-esm-patient-attachments__file-review__muted___jgycZ{color:#525252}.-esm-patient-attachments__file-review__bodyShort01___tbQT7{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)}.-esm-patient-attachments__file-review__text02___zvcF2{color:#525252}.-esm-patient-attachments__file-review__filePreviewContainer___uBnMP{background-color:#fff}.-esm-patient-attachments__file-review__overview___BVR7S{display:grid;grid-template-columns:1fr 1fr}.-esm-patient-attachments__file-review__overview___BVR7S img{max-width:100%;max-height:20rem;display:block;align-self:center;justify-self:center}.-esm-patient-attachments__file-review__overview___BVR7S .-esm-patient-attachments__file-review__imageDetails___wd97h{margin-left:1rem}.-esm-patient-attachments__file-review__captionFrame___J0fPF{margin-bottom:.3rem}.-esm-patient-attachments__file-review__buttonSetOverrides___LxmlD{margin:1rem auto 0;display:grid;grid-template-columns:1fr 1fr}.-esm-patient-attachments__file-review__buttonSetOverrides___LxmlD>button{max-width:unset}.-esm-patient-attachments__file-review__filePlaceholder___URPz3{background-color:#c6c6c6;display:flex;justify-content:center;align-items:center;width:50%;margin:0 auto}.-esm-patient-attachments__file-review__filePlaceholder___URPz3::after{content:"";display:block;padding-bottom:100%}',"",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/root.scss","webpack://./../../node_modules/@carbon/type/scss/_styles.scss","webpack://./src/camera-media-uploader/file-review.scss"],names:[],mappings:"AAoDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CCnDF,oEC81BI,uDAAA,CAAA,0DAAA,CAAA,4DAAA,CAAA,8DAAA,CD11BJ,oEC01BI,kDAAA,CAAA,kDAAA,CAAA,kDAAA,CAAA,sDAAA,CDt1BJ,2DCs1BI,qDAAA,CAAA,oDAAA,CAAA,wDAAA,CAAA,6DAAA,CDl1BJ,sDACE,aDZQ,CCeV,4DC80BI,wDAAA,CAAA,uDAAA,CAAA,2DAAA,CAAA,gEAAA,CD10BJ,uDACE,aDpBQ,CGFV,qEACE,qBHHM,CGMR,yDACE,YAAA,CACA,6BAAA,CAED,6DACG,cAAA,CACA,gBAAA,CACA,aAAA,CACA,iBAAA,CACA,mBAAA,CAGF,sHACE,gBAAA,CAIJ,6DACE,mBAAA,CAGF,mEACE,kBAAA,CACA,YAAA,CACA,6BAAA,CAEA,0EACE,eAAA,CAIJ,gEACE,wBH/Bc,CGgCd,YAAA,CACA,sBAAA,CACA,kBAAA,CACA,SAAA,CACA,aAAA,CAGF,uEACE,UAAA,CACA,aAAA,CACA,mBAAA",sourceRoot:""}]),o.locals={productiveHeading02:"-esm-patient-attachments__file-review__productiveHeading02___vucWQ",productiveHeading03:"-esm-patient-attachments__file-review__productiveHeading03___nppG6",bodyLong01:"-esm-patient-attachments__file-review__bodyLong01___Jn8EJ",muted:"-esm-patient-attachments__file-review__muted___jgycZ",bodyShort01:"-esm-patient-attachments__file-review__bodyShort01___tbQT7",text02:"-esm-patient-attachments__file-review__text02___zvcF2",filePreviewContainer:"-esm-patient-attachments__file-review__filePreviewContainer___uBnMP",overview:"-esm-patient-attachments__file-review__overview___BVR7S",imageDetails:"-esm-patient-attachments__file-review__imageDetails___wd97h",captionFrame:"-esm-patient-attachments__file-review__captionFrame___J0fPF",buttonSetOverrides:"-esm-patient-attachments__file-review__buttonSetOverrides___LxmlD",filePlaceholder:"-esm-patient-attachments__file-review__filePlaceholder___URPz3"};const c=o},6591:(e,t,a)=>{a.d(t,{Z:()=>c});var n=a(272),i=a.n(n),r=a(2609),o=a.n(r)()(i());o.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-patient-attachments__media-uploader__productiveHeading02___LtNE8{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-attachments__media-uploader__productiveHeading03___bUvPn{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)}.-esm-patient-attachments__media-uploader__bodyLong01___ogOno{font-size:var(--cds-body-long-01-font-size, 0.875rem);font-weight:var(--cds-body-long-01-font-weight, 400);line-height:var(--cds-body-long-01-line-height, 1.42857);letter-spacing:var(--cds-body-long-01-letter-spacing, 0.16px)}.-esm-patient-attachments__media-uploader__muted___HrbR4{color:#525252}.-esm-patient-attachments__media-uploader__bodyShort01___qatTh{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)}.-esm-patient-attachments__media-uploader__text02___hkCGz{color:#525252}.-esm-patient-attachments__media-uploader__uploadFile___gNtZ7{color:#fff;width:100%;height:406px}.-esm-patient-attachments__media-uploader__uploadFile___gNtZ7 div>button{max-width:100%;display:flex;flex-flow:column;justify-content:center;align-items:center;height:406px;position:relative}.-esm-patient-attachments__media-uploader__uploadFile___gNtZ7 label{max-width:unset}.-esm-patient-attachments__media-uploader__uploadFile___gNtZ7 label>div{height:25rem;justify-content:center;align-items:center}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/root.scss","webpack://./../../node_modules/@carbon/type/scss/_styles.scss","webpack://./src/camera-media-uploader/media-uploader.scss"],names:[],mappings:"AAoDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CCnDF,uEC81BI,uDAAA,CAAA,0DAAA,CAAA,4DAAA,CAAA,8DAAA,CD11BJ,uEC01BI,kDAAA,CAAA,kDAAA,CAAA,kDAAA,CAAA,sDAAA,CDt1BJ,8DCs1BI,qDAAA,CAAA,oDAAA,CAAA,wDAAA,CAAA,6DAAA,CDl1BJ,yDACE,aDZQ,CCeV,+DC80BI,wDAAA,CAAA,uDAAA,CAAA,2DAAA,CAAA,gEAAA,CD10BJ,0DACE,aDpBQ,CGHV,8DACE,UHFM,CGGN,UAAA,CACA,YAAA,CAEA,yEACE,cAAA,CACA,YAAA,CACA,gBAAA,CACA,sBAAA,CACA,kBAAA,CACA,YAAA,CACA,iBAAA,CAGF,oEACE,eAAA,CAGF,wEACE,YAAA,CACA,sBAAA,CACA,kBAAA",sourceRoot:""}]),o.locals={productiveHeading02:"-esm-patient-attachments__media-uploader__productiveHeading02___LtNE8",productiveHeading03:"-esm-patient-attachments__media-uploader__productiveHeading03___bUvPn",bodyLong01:"-esm-patient-attachments__media-uploader__bodyLong01___ogOno",muted:"-esm-patient-attachments__media-uploader__muted___HrbR4",bodyShort01:"-esm-patient-attachments__media-uploader__bodyShort01___qatTh",text02:"-esm-patient-attachments__media-uploader__text02___hkCGz",uploadFile:"-esm-patient-attachments__media-uploader__uploadFile___gNtZ7"};const c=o},883:(e,t,a)=>{a.d(t,{Z:()=>c});var n=a(272),i=a.n(n),r=a(2609),o=a.n(r)()(i());o.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-patient-attachments__uploading-status__productiveHeading02___zIKih{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-attachments__uploading-status__productiveHeading03___b4FLX{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)}.-esm-patient-attachments__uploading-status__bodyLong01___ONaKy{font-size:var(--cds-body-long-01-font-size, 0.875rem);font-weight:var(--cds-body-long-01-font-weight, 400);line-height:var(--cds-body-long-01-line-height, 1.42857);letter-spacing:var(--cds-body-long-01-letter-spacing, 0.16px)}.-esm-patient-attachments__uploading-status__muted___XJktn{color:#525252}.-esm-patient-attachments__uploading-status__bodyShort01___mZkNK{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)}.-esm-patient-attachments__uploading-status__text02___lShiU{color:#525252}.-esm-patient-attachments__uploading-status__cameraSection___wCLHG{width:inherit;background-color:#fff}.-esm-patient-attachments__uploading-status__uploadingFilesSection___qhjdo{display:flex;flex-direction:column;justify-content:center;align-items:center;height:25rem;overflow-y:auto;border:1px dashed #8d8d8d}.-esm-patient-attachments__uploading-status__buttonSet___o1fRh{width:100%;display:grid;grid-template-columns:1fr 1fr}.-esm-patient-attachments__uploading-status__buttonSet___o1fRh button{max-width:unset !important}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/root.scss","webpack://./../../node_modules/@carbon/type/scss/_styles.scss","webpack://./src/camera-media-uploader/uploading-status.scss"],names:[],mappings:"AAoDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CCnDF,yEC81BI,uDAAA,CAAA,0DAAA,CAAA,4DAAA,CAAA,8DAAA,CD11BJ,yEC01BI,kDAAA,CAAA,kDAAA,CAAA,kDAAA,CAAA,sDAAA,CDt1BJ,gECs1BI,qDAAA,CAAA,oDAAA,CAAA,wDAAA,CAAA,6DAAA,CDl1BJ,2DACE,aDZQ,CCeV,iEC80BI,wDAAA,CAAA,uDAAA,CAAA,2DAAA,CAAA,gEAAA,CD10BJ,4DACE,aDpBQ,CGFV,mEACE,aAAA,CACA,qBHJM,CGOR,2EACE,YAAA,CACA,qBAAA,CACA,sBAAA,CACA,kBAAA,CACA,YAAA,CACA,eAAA,CACA,yBAAA,CAGF,+DACE,UAAA,CACA,YAAA,CACA,6BAAA,CACA,sEACE,0BAAA",sourceRoot:""}]),o.locals={productiveHeading02:"-esm-patient-attachments__uploading-status__productiveHeading02___zIKih",productiveHeading03:"-esm-patient-attachments__uploading-status__productiveHeading03___b4FLX",bodyLong01:"-esm-patient-attachments__uploading-status__bodyLong01___ONaKy",muted:"-esm-patient-attachments__uploading-status__muted___XJktn",bodyShort01:"-esm-patient-attachments__uploading-status__bodyShort01___mZkNK",text02:"-esm-patient-attachments__uploading-status__text02___lShiU",cameraSection:"-esm-patient-attachments__uploading-status__cameraSection___wCLHG",uploadingFilesSection:"-esm-patient-attachments__uploading-status__uploadingFilesSection___qhjdo",buttonSet:"-esm-patient-attachments__uploading-status__buttonSet___o1fRh"};const c=o},1028:(e,t,a)=>{a.r(t),a.d(t,{default:()=>$});var n=a(7900),i=a.n(n),r=a(2870);const o=(0,n.createContext)({});var c=a(4924),s=a(1569),l=a.n(s);a(3493);const A=function(e){var t=e.mediaStream,a=e.stopCameraStream,r=(0,n.useContext)(o),c=r.handleTakePhoto,s=r.setError;(0,n.useEffect)((function(){return function(){a()}}),[a]);var A=(0,n.useCallback)((function(e){t.current=e}),[t]);return i().createElement(l(),{onTakePhoto:c,onCameraStart:A,onCameraStop:a,onCameraError:s})};var d=a(321),m=a.n(d),_=a(1195),u=a.n(_),p=a(3275),h=a.n(p),f=a(7162),g=a.n(f),C=a(2094),v=a.n(C),b=a(757),y=a.n(b),E=a(5088),w={};w.styleTagTransform=y(),w.setAttributes=g(),w.insert=h().bind(null,"head"),w.domAPI=u(),w.insertStyleElement=v(),m()(E.Z,w);const D=E.Z&&E.Z.locals?E.Z.locals:void 0;var S=a(4550),B=a(7326),k=a(6591),x={};x.styleTagTransform=y(),x.setAttributes=g(),x.insert=h().bind(null,"head"),x.domAPI=u(),x.insertStyleElement=v(),m()(k.Z,x);const F=k.Z&&k.Z.locals?k.Z.locals:void 0;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 z=function(){var e=(0,n.useContext)(o),t=e.setFilesToUpload,a=e.allowedExtensions,s=e.multipleFiles,l=(0,c.useTranslation)().t,A=(0,r.useConfig)().fileSize,d=(0,n.useCallback)((function(e){e.forEach((function(e){e.size<=1024*A*1024?(0,B.Z)(e).then((function(a){t((function(t){return(n=t,function(e){if(Array.isArray(e))return O(e)}(n)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||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}}(n)||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.")}()).concat([{base64Content:a,file:e,fileName:e.name,fileType:"image"===e.type.split("/")[0]?"image":"pdf"===e.type.split("/")[1]?"pdf":"other",fileDescription:"",status:"uploading"}]);var n}))})):(0,r.showSnackbar)({title:l("fileSizeLimitExceededText","File size limit exceeded"),subtitle:"".concat(e.name," ").concat(l("fileSizeLimitExceeded","exceeds the file size of")," ").concat(A," MB"),kind:"error"})}))}),[t,A,l]);return i().createElement("div",{className:"cds--file__container"},i().createElement("p",{className:"cds--label-description"},l("fileUploadSizeConstraints","File limit is {{fileSize}}MB",{fileSize:A})),i().createElement("div",{className:F.uploadFile},i().createElement(S.awp,{accept:null!=a?a:["*"],labelText:l("fileSizeInstructions","Drag and drop files here or click to upload"),tabIndex:0,multiple:s,onAddFiles:function(e,t){var a=t.addedFiles;d(a)}})))};var P=a(8265),j={};j.styleTagTransform=y(),j.setAttributes=g(),j.insert=h().bind(null,"head"),j.domAPI=u(),j.insertStyleElement=v(),m()(P.Z,j);const T=P.Z&&P.Z.locals?P.Z.locals:void 0;var I=a(5362);function H(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 N(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function M(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,i,r=[],o=!0,c=!1;try{for(a=a.call(e);!(o=(n=a.next()).done)&&(r.push(n.value),!t||r.length!==t);o=!0);}catch(e){c=!0,i=e}finally{try{o||null==a.return||a.return()}finally{if(c)throw i}}return r}}(e,t)||function(e,t){if(e){if("string"==typeof e)return H(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)?H(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 Z=function(e){var t=e.uploadedFile,a=e.collectDescription,o=e.onSaveFile,s=e.clearData,l=M((0,n.useState)(""),2),A=l[0],d=l[1],m=M((0,n.useState)(""),2),_=m[0],u=m[1],p=(0,c.useTranslation)().t,h=M((0,n.useState)(!1),2),f=h[0],g=h[1];(0,n.useEffect)((function(){d(t.fileName),u(t.fileDescription)}),[t]);var C=(0,n.useCallback)((function(e){var a,n;e.preventDefault(),null==o||o((a=function(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{},n=Object.keys(a);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(a).filter((function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable})))),n.forEach((function(t){N(e,t,a[t])}))}return e}({},t),n=null!=(n={fileName:A,fileDescription:_})?n:{},Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(n)):function(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a.push.apply(a,n)}return a}(Object(n)).forEach((function(e){Object.defineProperty(a,e,Object.getOwnPropertyDescriptor(n,e))})),a))}),[o,A,_,t]),v=(0,n.useCallback)((function(e){e.preventDefault(),null==s||s()}),[s]),b=(0,n.useCallback)((function(e){e.preventDefault(),""===e.target.value?g(!0):f&&g(!1),d(e.target.value)}),[g,d,f]),y=(0,n.useCallback)((function(e){e.preventDefault(),u(e.target.value)}),[u]);return i().createElement("form",{onSubmit:C},i().createElement(S.fef,{className:T.overview},"image"===t.fileType?i().createElement("img",{src:t.base64Content,alt:"placeholder"}):"pdf"===t.fileType?i().createElement("div",{className:T.filePlaceholder},i().createElement(I.Lk,{size:16})):i().createElement("div",{className:T.filePlaceholder},i().createElement(I.Qf,{size:16})),i().createElement("div",{className:T.imageDetails},i().createElement("div",{className:T.captionFrame},i().createElement(S.oil,{id:"caption",labelText:"".concat("image"===t.fileType?p("image","Image"):p("file","File")," ").concat(p("name","name")),autoComplete:"off",placeholder:p("attachmentCaptionInstruction","Enter caption"),onChange:b,required:!0,value:A,invalid:f,autoFocus:!0,invalidText:f&&p("fieldRequired","This field is required")})),a&&i().createElement(S.Kx8,{id:"description",labelText:p("imageDescription","Image description"),autoComplete:"off",placeholder:p("attachmentCaptionInstruction","Enter caption"),value:_,onChange:y}))),i().createElement(S.mzw,null,i().createElement(r.UserHasAccess,{privilege:"Create Attachment"},i().createElement(S.zxk,{kind:"secondary",size:"lg",onClick:v},p("cancel","Cancel")),i().createElement(S.zxk,{type:"submit",size:"lg",onClick:C,disabled:f},p("addAttachment","Add attachment")))))};const L=function(e){var t=e.onCompletion,a=(0,n.useContext)(o),r=a.filesToUpload,s=a.clearData,l=a.setFilesToUpload,A=a.closeModal,d=a.collectDescription,m=(0,c.useTranslation)().t,_=M((0,n.useState)(1),2),u=_[0],p=_[1],h=(0,n.useCallback)((function(){u<r.length?p(u+1):t()}),[p,u,r,t]),f=(0,n.useCallback)((function(e){l((function(t){return t.map((function(t,a){return a===u-1?e:t}))})),h()}),[h,l,u]);return i().createElement("div",{className:T.filePreviewContainer},i().createElement(S.xBx,{closeModal:A,className:T.productiveHeading03},m("addAttachment_title","Add Attachment")," ",r.length>1&&"(".concat(u," of ").concat(r.length,")")),i().createElement(Z,{uploadedFile:r[u-1],clearData:s,onSaveFile:f,moveToNextFile:h,collectDescription:"image"===r[u-1].fileType&&d}))};var J=a(883),U={};U.styleTagTransform=y(),U.setAttributes=g(),U.insert=h().bind(null,"head"),U.domAPI=u(),U.insertStyleElement=v(),m()(J.Z,U);const G=J.Z&&J.Z.locals?J.Z.locals:void 0;function q(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 R(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function Y(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{},n=Object.keys(a);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(a).filter((function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable})))),n.forEach((function(t){R(e,t,a[t])}))}return e}function Q(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a.push.apply(a,n)}return a}(Object(t)).forEach((function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(t,a))})),e}const V=function(){var e,t,a=(0,c.useTranslation)().t,s=(0,n.useContext)(o),l=s.filesToUpload,A=s.saveFile,d=s.closeModal,m=s.clearData,_=s.onCompletion,u=(e=(0,n.useState)([]),t=2,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,i,r=[],o=!0,c=!1;try{for(a=a.call(e);!(o=(n=a.next()).done)&&(r.push(n.value),!t||r.length!==t);o=!0);}catch(e){c=!0,i=e}finally{try{o||null==a.return||a.return()}finally{if(c)throw i}}return r}}(e,t)||function(e,t){if(e){if("string"==typeof e)return q(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)?q(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.")}()),p=u[0],h=u[1];return(0,n.useEffect)((function(){l&&h(l.map((function(e){return Q(Y({},e),{status:"uploading"})})))}),[l,h]),(0,n.useEffect)((function(){Promise.all(l.map((function(e,t){return A(e).then((function(){(0,r.showSnackbar)({title:a("uploadComplete","Upload complete"),subtitle:"".concat(e.fileName," ").concat(a("uploadedSuccessfully","uploaded successfully")),kind:"success",isLowContrast:!0}),h((function(e){return e.map((function(e,a){return a===t?Q(Y({},e),{status:"complete"}):e}))}))})).catch((function(t){(0,r.showSnackbar)({title:"".concat(a("uploading","Uploading")," ").concat(e.fileName," ").concat(a("failed","failed")),subtitle:t,kind:"error"})}))}))).then((function(){null==_||_()}))}),[_,A,l,a,h]),i().createElement("div",{className:G.cameraSection},i().createElement(S.xBx,{closeModal:d,className:G.productiveHeading03,title:a("addAttachment_title","Add Attachment")}),i().createElement(S.fef,null,i().createElement("p",{className:"cds--label-description"},a("uploadWillContinueInTheBackground","Files will be uploaded in the background. You can close this modal.")),i().createElement("div",{className:G.uploadingFilesSection},p.map((function(e,t){return i().createElement(S.Py3,{key:t,name:e.fileName,status:e.status,size:"lg"})})))),i().createElement(S.mzw,null,i().createElement(S.uVA,{className:G.buttonSet},i().createElement(S.zxk,{size:"lg",kind:"secondary",onClick:m},a("addMoreAttachments","Add more attachments")),i().createElement(S.zxk,{size:"lg",kind:"primary",onClick:d},a("closeModal","Close")))))};function K(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,i,r=[],o=!0,c=!1;try{for(a=a.call(e);!(o=(n=a.next()).done)&&(r.push(n.value),!t||r.length!==t);o=!0);}catch(e){c=!0,i=e}finally{try{o||null==a.return||a.return()}finally{if(c)throw i}}return r}}(e,t)||function(e,t){if(e){if("string"==typeof e)return K(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)?K(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(){var e=(0,c.useTranslation)().t,t=W((0,n.useState)("upload"),2),a=t[0],r=t[1],s=(0,n.useContext)(o),l=s.cameraOnly,d=s.closeModal,m=(0,n.useRef)(),_=(0,n.useCallback)((function(){var e;null===(e=m.current)||void 0===e||e.getTracks().forEach((function(e){return e.stop()}))}),[m]);return(0,n.useEffect)((function(){return function(){_()}}),[_]),l?i().createElement(A,{mediaStream:m,stopCameraStream:_}):i().createElement("div",{className:D.cameraSection},i().createElement(S.xBx,{closeModal:d,title:e("addAttachment_title","Add Attachment")}),i().createElement(S.fef,{className:D.modalBody},i().createElement(S.mQc,{className:D.tabs,defaultSelectedIndex:1},i().createElement(S.tdY,{"aria-label":"Attachments-upload-section",className:D.tabList},i().createElement(S.OK9,{onClick:function(){return r("camera")}},e("webcam","Webcam")),i().createElement(S.OK9,{onClick:function(){return r("upload")}},e("uploadFiles","Upload files"))),i().createElement(S.nPR,null,i().createElement(S.x45,null,"camera"===a&&i().createElement(A,{mediaStream:m,stopCameraStream:_})),i().createElement(S.x45,null,i().createElement(z,null))))))};const $=function(e){var t=e.cameraOnly,a=e.multipleFiles,s=e.collectDescription,l=e.saveFile,A=e.closeModal,d=e.onCompletion,m=e.allowedExtensions,_=W((0,n.useState)(void 0),2),u=_[0],p=_[1],h=W((0,n.useState)([]),2),f=h[0],g=h[1],C=W((0,n.useState)(!1),2),v=C[0],b=C[1],y=(0,c.useTranslation)().t;(0,n.useEffect)((function(){u&&(0,r.showSnackbar)({subtitle:u.message,kind:"error",title:y("cameraError","Camera Error")})}),[u,y]);var E=(0,n.useCallback)((function(e){g([{base64Content:e,fileName:"Image taken from camera",fileType:"image",fileDescription:"",status:"uploading"}])}),[]),w=(0,n.useCallback)((function(){g([]),b(!1),p(void 0)}),[g,b]),D=(0,n.useCallback)((function(){b(!0)}),[b]),S=(0,n.useMemo)((function(){return v?i().createElement(V,null):f.length?i().createElement(L,{onCompletion:D}):i().createElement(X,null)}),[v,f,D]);return i().createElement(o.Provider,{value:{multipleFiles:a,cameraOnly:t,collectDescription:s,saveFile:l,closeModal:A,onCompletion:d,filesToUpload:f,setFilesToUpload:g,uploadFilesToServer:v,setUploadFilesToServer:b,clearData:w,handleTakePhoto:E,error:u,setError:p,allowedExtensions:m}},S)}}}]);
|
|
1
|
+
"use strict";(globalThis.webpackChunk_openmrs_esm_patient_attachments_app=globalThis.webpackChunk_openmrs_esm_patient_attachments_app||[]).push([[28],{5088:(e,t,a)=>{a.d(t,{Z:()=>s});var n=a(272),i=a.n(n),r=a(2609),o=a.n(r)()(i());o.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-attachments__camera-media-uploader__productiveHeading02___SF9v_{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-attachments__camera-media-uploader__productiveHeading03___kyc2j{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)}.-esm-patient-attachments__camera-media-uploader__bodyLong01___E3SSh{font-size:var(--cds-body-long-01-font-size, 0.875rem);font-weight:var(--cds-body-long-01-font-weight, 400);line-height:var(--cds-body-long-01-line-height, 1.42857);letter-spacing:var(--cds-body-long-01-letter-spacing, 0.16px)}.-esm-patient-attachments__camera-media-uploader__muted___DsrFK{color:#525252}.-esm-patient-attachments__camera-media-uploader__bodyShort01___Fgqqf{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)}.-esm-patient-attachments__camera-media-uploader__text02___zldA6{color:#525252}.-esm-patient-attachments__camera-media-uploader__cameraSection___O1_hE{width:inherit;background-color:#fff}.-esm-patient-attachments__camera-media-uploader__cameraSection___O1_hE .react-html5-camera-photo>img,.-esm-patient-attachments__camera-media-uploader__cameraSection___O1_hE .react-html5-camera-photo>video{max-width:100%;max-height:100%}.-esm-patient-attachments__camera-media-uploader__uploadFile___xPA_w{color:#fff}.-esm-patient-attachments__camera-media-uploader__uploadFile___xPA_w label{max-width:unset}.-esm-patient-attachments__camera-media-uploader__uploadFile___xPA_w label>div{height:25rem;justify-content:center;align-items:center}.-esm-patient-attachments__camera-media-uploader__modalBody___YH4FB{padding:0;margin:0}@media(max-width: 1023px){.-esm-patient-attachments__camera-media-uploader__frameContent___f9Y86{width:65%}}.-esm-patient-attachments__camera-media-uploader__tabList___ougWM{border-bottom:2px solid #e0e0e0}.-esm-patient-attachments__camera-media-uploader__tabList___ougWM div{position:absolute;bottom:-2px;height:100%;z-index:1}.-esm-patient-attachments__camera-media-uploader__tabList___ougWM div button>div{align-items:center}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/root.scss","webpack://./../../node_modules/@carbon/type/scss/_styles.scss","webpack://./src/camera-media-uploader/camera-media-uploader.scss"],names:[],mappings:"AAoDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CAHF,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CCnDF,8EC81BI,uDAAA,CAAA,0DAAA,CAAA,4DAAA,CAAA,8DAAA,CD11BJ,8EC01BI,kDAAA,CAAA,kDAAA,CAAA,kDAAA,CAAA,sDAAA,CDt1BJ,qECs1BI,qDAAA,CAAA,oDAAA,CAAA,wDAAA,CAAA,6DAAA,CDl1BJ,gEACE,aDZQ,CCeV,sEC80BI,wDAAA,CAAA,uDAAA,CAAA,2DAAA,CAAA,gEAAA,CD10BJ,iEACE,aDpBQ,CGDV,wEACE,aAAA,CACA,qBHLM,CGSN,8MACE,cAAA,CACA,eAAA,CAIJ,qEACE,UHhBM,CGkBN,2EACE,eAAA,CAGF,+EACE,YAAA,CACA,sBAAA,CACA,kBAAA,CAKJ,oEACE,SAAA,CACA,QAAA,CAGF,0BACE,uEACE,SAAA,CAAA,CAIJ,kEACE,+BAAA,CAEA,sEACE,iBAAA,CACA,WAAA,CACA,WAAA,CACA,SAAA,CAEA,iFACE,kBAAA",sourceRoot:""}]),o.locals={productiveHeading02:"-esm-patient-attachments__camera-media-uploader__productiveHeading02___SF9v_",productiveHeading03:"-esm-patient-attachments__camera-media-uploader__productiveHeading03___kyc2j",bodyLong01:"-esm-patient-attachments__camera-media-uploader__bodyLong01___E3SSh",muted:"-esm-patient-attachments__camera-media-uploader__muted___DsrFK",bodyShort01:"-esm-patient-attachments__camera-media-uploader__bodyShort01___Fgqqf",text02:"-esm-patient-attachments__camera-media-uploader__text02___zldA6",cameraSection:"-esm-patient-attachments__camera-media-uploader__cameraSection___O1_hE",uploadFile:"-esm-patient-attachments__camera-media-uploader__uploadFile___xPA_w",modalBody:"-esm-patient-attachments__camera-media-uploader__modalBody___YH4FB",frameContent:"-esm-patient-attachments__camera-media-uploader__frameContent___f9Y86",tabList:"-esm-patient-attachments__camera-media-uploader__tabList___ougWM"};const s=o},8265:(e,t,a)=>{a.d(t,{Z:()=>s});var n=a(272),i=a.n(n),r=a(2609),o=a.n(r)()(i());o.push([e.id,':root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-patient-attachments__file-review__productiveHeading02___vucWQ{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-attachments__file-review__productiveHeading03___nppG6{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)}.-esm-patient-attachments__file-review__bodyLong01___Jn8EJ{font-size:var(--cds-body-long-01-font-size, 0.875rem);font-weight:var(--cds-body-long-01-font-weight, 400);line-height:var(--cds-body-long-01-line-height, 1.42857);letter-spacing:var(--cds-body-long-01-letter-spacing, 0.16px)}.-esm-patient-attachments__file-review__muted___jgycZ{color:#525252}.-esm-patient-attachments__file-review__bodyShort01___tbQT7{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)}.-esm-patient-attachments__file-review__text02___zvcF2{color:#525252}.-esm-patient-attachments__file-review__filePreviewContainer___uBnMP{background-color:#fff}.-esm-patient-attachments__file-review__overview___BVR7S{display:grid;grid-template-columns:1fr 1fr}.-esm-patient-attachments__file-review__overview___BVR7S img{max-width:100%;max-height:20rem;display:block;align-self:center;justify-self:center}.-esm-patient-attachments__file-review__overview___BVR7S .-esm-patient-attachments__file-review__imageDetails___wd97h{margin-left:1rem}.-esm-patient-attachments__file-review__captionFrame___J0fPF{margin-bottom:.3rem}.-esm-patient-attachments__file-review__buttonSetOverrides___LxmlD{margin:1rem auto 0;display:grid;grid-template-columns:1fr 1fr}.-esm-patient-attachments__file-review__buttonSetOverrides___LxmlD>button{max-width:unset}.-esm-patient-attachments__file-review__filePlaceholder___URPz3{background-color:#c6c6c6;display:flex;justify-content:center;align-items:center;width:50%;margin:0 auto}.-esm-patient-attachments__file-review__filePlaceholder___URPz3::after{content:"";display:block;padding-bottom:100%}',"",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/root.scss","webpack://./../../node_modules/@carbon/type/scss/_styles.scss","webpack://./src/camera-media-uploader/file-review.scss"],names:[],mappings:"AAoDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CCnDF,oEC81BI,uDAAA,CAAA,0DAAA,CAAA,4DAAA,CAAA,8DAAA,CD11BJ,oEC01BI,kDAAA,CAAA,kDAAA,CAAA,kDAAA,CAAA,sDAAA,CDt1BJ,2DCs1BI,qDAAA,CAAA,oDAAA,CAAA,wDAAA,CAAA,6DAAA,CDl1BJ,sDACE,aDZQ,CCeV,4DC80BI,wDAAA,CAAA,uDAAA,CAAA,2DAAA,CAAA,gEAAA,CD10BJ,uDACE,aDpBQ,CGFV,qEACE,qBHHM,CGMR,yDACE,YAAA,CACA,6BAAA,CAED,6DACG,cAAA,CACA,gBAAA,CACA,aAAA,CACA,iBAAA,CACA,mBAAA,CAGF,sHACE,gBAAA,CAIJ,6DACE,mBAAA,CAGF,mEACE,kBAAA,CACA,YAAA,CACA,6BAAA,CAEA,0EACE,eAAA,CAIJ,gEACE,wBH/Bc,CGgCd,YAAA,CACA,sBAAA,CACA,kBAAA,CACA,SAAA,CACA,aAAA,CAGF,uEACE,UAAA,CACA,aAAA,CACA,mBAAA",sourceRoot:""}]),o.locals={productiveHeading02:"-esm-patient-attachments__file-review__productiveHeading02___vucWQ",productiveHeading03:"-esm-patient-attachments__file-review__productiveHeading03___nppG6",bodyLong01:"-esm-patient-attachments__file-review__bodyLong01___Jn8EJ",muted:"-esm-patient-attachments__file-review__muted___jgycZ",bodyShort01:"-esm-patient-attachments__file-review__bodyShort01___tbQT7",text02:"-esm-patient-attachments__file-review__text02___zvcF2",filePreviewContainer:"-esm-patient-attachments__file-review__filePreviewContainer___uBnMP",overview:"-esm-patient-attachments__file-review__overview___BVR7S",imageDetails:"-esm-patient-attachments__file-review__imageDetails___wd97h",captionFrame:"-esm-patient-attachments__file-review__captionFrame___J0fPF",buttonSetOverrides:"-esm-patient-attachments__file-review__buttonSetOverrides___LxmlD",filePlaceholder:"-esm-patient-attachments__file-review__filePlaceholder___URPz3"};const s=o},6591:(e,t,a)=>{a.d(t,{Z:()=>s});var n=a(272),i=a.n(n),r=a(2609),o=a.n(r)()(i());o.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-patient-attachments__media-uploader__productiveHeading02___LtNE8{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-attachments__media-uploader__productiveHeading03___bUvPn{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)}.-esm-patient-attachments__media-uploader__bodyLong01___ogOno{font-size:var(--cds-body-long-01-font-size, 0.875rem);font-weight:var(--cds-body-long-01-font-weight, 400);line-height:var(--cds-body-long-01-line-height, 1.42857);letter-spacing:var(--cds-body-long-01-letter-spacing, 0.16px)}.-esm-patient-attachments__media-uploader__muted___HrbR4{color:#525252}.-esm-patient-attachments__media-uploader__bodyShort01___qatTh{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)}.-esm-patient-attachments__media-uploader__text02___hkCGz{color:#525252}.-esm-patient-attachments__media-uploader__uploadFile___gNtZ7{color:#fff;width:100%;height:406px}.-esm-patient-attachments__media-uploader__uploadFile___gNtZ7 div>button{max-width:100%;display:flex;flex-flow:column;justify-content:center;align-items:center;height:406px;position:relative}.-esm-patient-attachments__media-uploader__uploadFile___gNtZ7 label{max-width:unset}.-esm-patient-attachments__media-uploader__uploadFile___gNtZ7 label>div{height:25rem;justify-content:center;align-items:center}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/root.scss","webpack://./../../node_modules/@carbon/type/scss/_styles.scss","webpack://./src/camera-media-uploader/media-uploader.scss"],names:[],mappings:"AAoDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CCnDF,uEC81BI,uDAAA,CAAA,0DAAA,CAAA,4DAAA,CAAA,8DAAA,CD11BJ,uEC01BI,kDAAA,CAAA,kDAAA,CAAA,kDAAA,CAAA,sDAAA,CDt1BJ,8DCs1BI,qDAAA,CAAA,oDAAA,CAAA,wDAAA,CAAA,6DAAA,CDl1BJ,yDACE,aDZQ,CCeV,+DC80BI,wDAAA,CAAA,uDAAA,CAAA,2DAAA,CAAA,gEAAA,CD10BJ,0DACE,aDpBQ,CGHV,8DACE,UHFM,CGGN,UAAA,CACA,YAAA,CAEA,yEACE,cAAA,CACA,YAAA,CACA,gBAAA,CACA,sBAAA,CACA,kBAAA,CACA,YAAA,CACA,iBAAA,CAGF,oEACE,eAAA,CAGF,wEACE,YAAA,CACA,sBAAA,CACA,kBAAA",sourceRoot:""}]),o.locals={productiveHeading02:"-esm-patient-attachments__media-uploader__productiveHeading02___LtNE8",productiveHeading03:"-esm-patient-attachments__media-uploader__productiveHeading03___bUvPn",bodyLong01:"-esm-patient-attachments__media-uploader__bodyLong01___ogOno",muted:"-esm-patient-attachments__media-uploader__muted___HrbR4",bodyShort01:"-esm-patient-attachments__media-uploader__bodyShort01___qatTh",text02:"-esm-patient-attachments__media-uploader__text02___hkCGz",uploadFile:"-esm-patient-attachments__media-uploader__uploadFile___gNtZ7"};const s=o},883:(e,t,a)=>{a.d(t,{Z:()=>s});var n=a(272),i=a.n(n),r=a(2609),o=a.n(r)()(i());o.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-patient-attachments__uploading-status__productiveHeading02___zIKih{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-attachments__uploading-status__productiveHeading03___b4FLX{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)}.-esm-patient-attachments__uploading-status__bodyLong01___ONaKy{font-size:var(--cds-body-long-01-font-size, 0.875rem);font-weight:var(--cds-body-long-01-font-weight, 400);line-height:var(--cds-body-long-01-line-height, 1.42857);letter-spacing:var(--cds-body-long-01-letter-spacing, 0.16px)}.-esm-patient-attachments__uploading-status__muted___XJktn{color:#525252}.-esm-patient-attachments__uploading-status__bodyShort01___mZkNK{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)}.-esm-patient-attachments__uploading-status__text02___lShiU{color:#525252}.-esm-patient-attachments__uploading-status__cameraSection___wCLHG{width:inherit;background-color:#fff}.-esm-patient-attachments__uploading-status__uploadingFilesSection___qhjdo{display:flex;flex-direction:column;justify-content:center;align-items:center;height:25rem;overflow-y:auto;border:1px dashed #8d8d8d}.-esm-patient-attachments__uploading-status__buttonSet___o1fRh{width:100%;display:grid;grid-template-columns:1fr 1fr}.-esm-patient-attachments__uploading-status__buttonSet___o1fRh button{max-width:unset !important}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/root.scss","webpack://./../../node_modules/@carbon/type/scss/_styles.scss","webpack://./src/camera-media-uploader/uploading-status.scss"],names:[],mappings:"AAoDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CCnDF,yEC81BI,uDAAA,CAAA,0DAAA,CAAA,4DAAA,CAAA,8DAAA,CD11BJ,yEC01BI,kDAAA,CAAA,kDAAA,CAAA,kDAAA,CAAA,sDAAA,CDt1BJ,gECs1BI,qDAAA,CAAA,oDAAA,CAAA,wDAAA,CAAA,6DAAA,CDl1BJ,2DACE,aDZQ,CCeV,iEC80BI,wDAAA,CAAA,uDAAA,CAAA,2DAAA,CAAA,gEAAA,CD10BJ,4DACE,aDpBQ,CGFV,mEACE,aAAA,CACA,qBHJM,CGOR,2EACE,YAAA,CACA,qBAAA,CACA,sBAAA,CACA,kBAAA,CACA,YAAA,CACA,eAAA,CACA,yBAAA,CAGF,+DACE,UAAA,CACA,YAAA,CACA,6BAAA,CACA,sEACE,0BAAA",sourceRoot:""}]),o.locals={productiveHeading02:"-esm-patient-attachments__uploading-status__productiveHeading02___zIKih",productiveHeading03:"-esm-patient-attachments__uploading-status__productiveHeading03___b4FLX",bodyLong01:"-esm-patient-attachments__uploading-status__bodyLong01___ONaKy",muted:"-esm-patient-attachments__uploading-status__muted___XJktn",bodyShort01:"-esm-patient-attachments__uploading-status__bodyShort01___mZkNK",text02:"-esm-patient-attachments__uploading-status__text02___lShiU",cameraSection:"-esm-patient-attachments__uploading-status__cameraSection___wCLHG",uploadingFilesSection:"-esm-patient-attachments__uploading-status__uploadingFilesSection___qhjdo",buttonSet:"-esm-patient-attachments__uploading-status__buttonSet___o1fRh"};const s=o},1028:(e,t,a)=>{a.r(t),a.d(t,{default:()=>$});var n=a(7900),i=a.n(n),r=a(2870);const o=(0,n.createContext)({});var s=a(4924),c=a(1569),l=a.n(c);a(3493);const A=function(e){var t=e.mediaStream,a=e.stopCameraStream,r=(0,n.useContext)(o),s=r.handleTakePhoto,c=r.setError;(0,n.useEffect)((function(){return function(){a()}}),[a]);var A=(0,n.useCallback)((function(e){t.current=e}),[t]);return i().createElement(l(),{onTakePhoto:s,onCameraStart:A,onCameraStop:a,onCameraError:c})};var d=a(321),m=a.n(d),_=a(1195),u=a.n(_),p=a(3275),h=a.n(p),f=a(7162),g=a.n(f),C=a(2094),v=a.n(C),b=a(757),y=a.n(b),E=a(5088),w={};w.styleTagTransform=y(),w.setAttributes=g(),w.insert=h().bind(null,"head"),w.domAPI=u(),w.insertStyleElement=v(),m()(E.Z,w);const D=E.Z&&E.Z.locals?E.Z.locals:void 0;var S=a(4550),B=a(7326),k=a(6591),x={};x.styleTagTransform=y(),x.setAttributes=g(),x.insert=h().bind(null,"head"),x.domAPI=u(),x.insertStyleElement=v(),m()(k.Z,x);const F=k.Z&&k.Z.locals?k.Z.locals:void 0;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 z=function(){var e=(0,n.useContext)(o),t=e.setFilesToUpload,a=e.allowedExtensions,c=e.multipleFiles,l=(0,s.useTranslation)().t,A=(0,r.useConfig)().fileSize,d=(0,n.useCallback)((function(e){e.forEach((function(e){e.size<=1024*A*1024?(0,B.Z)(e).then((function(a){t((function(t){return(n=t,function(e){if(Array.isArray(e))return O(e)}(n)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||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}}(n)||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.")}()).concat([{base64Content:a,file:e,fileName:e.name,fileType:"image"===e.type.split("/")[0]?"image":"pdf"===e.type.split("/")[1]?"pdf":"other",fileDescription:"",status:"uploading"}]);var n}))})):(0,r.showSnackbar)({title:l("fileSizeLimitExceededText","File size limit exceeded"),subtitle:"".concat(e.name," ").concat(l("fileSizeLimitExceeded","exceeds the file size of")," ").concat(A," MB"),kind:"error"})}))}),[t,A,l]);return i().createElement("div",{className:"cds--file__container"},i().createElement("p",{className:"cds--label-description"},l("fileUploadSizeConstraints","Size limit is {{fileSize}}MB",{fileSize:A}),". ",l("supportedFileTypes","Supported file types are: JPEG, PNG, and WEBP"),"."),i().createElement("div",{className:F.uploadFile},i().createElement(S.awp,{accept:null!=a?a:["*"],labelText:l("fileSizeInstructions","Drag and drop files here or click to upload"),tabIndex:0,multiple:c,onAddFiles:function(e,t){var a=t.addedFiles;d(a)}})))};var P=a(8265),j={};j.styleTagTransform=y(),j.setAttributes=g(),j.insert=h().bind(null,"head"),j.domAPI=u(),j.insertStyleElement=v(),m()(P.Z,j);const T=P.Z&&P.Z.locals?P.Z.locals:void 0;var I=a(5362);function H(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 N(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function M(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,i,r=[],o=!0,s=!1;try{for(a=a.call(e);!(o=(n=a.next()).done)&&(r.push(n.value),!t||r.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==a.return||a.return()}finally{if(s)throw i}}return r}}(e,t)||function(e,t){if(e){if("string"==typeof e)return H(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)?H(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 Z=function(e){var t=e.uploadedFile,a=e.collectDescription,o=e.onSaveFile,c=e.clearData,l=M((0,n.useState)(""),2),A=l[0],d=l[1],m=M((0,n.useState)(""),2),_=m[0],u=m[1],p=(0,s.useTranslation)().t,h=M((0,n.useState)(!1),2),f=h[0],g=h[1];(0,n.useEffect)((function(){d(t.fileName),u(t.fileDescription)}),[t]);var C=(0,n.useCallback)((function(e){var a,n;e.preventDefault(),null==o||o((a=function(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{},n=Object.keys(a);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(a).filter((function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable})))),n.forEach((function(t){N(e,t,a[t])}))}return e}({},t),n=null!=(n={fileName:A,fileDescription:_})?n:{},Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(n)):function(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a.push.apply(a,n)}return a}(Object(n)).forEach((function(e){Object.defineProperty(a,e,Object.getOwnPropertyDescriptor(n,e))})),a))}),[o,A,_,t]),v=(0,n.useCallback)((function(e){e.preventDefault(),null==c||c()}),[c]),b=(0,n.useCallback)((function(e){e.preventDefault(),""===e.target.value?g(!0):f&&g(!1),d(e.target.value)}),[g,d,f]),y=(0,n.useCallback)((function(e){e.preventDefault(),u(e.target.value)}),[u]);return i().createElement("form",{onSubmit:C},i().createElement(S.fef,{className:T.overview},"image"===t.fileType?i().createElement("img",{src:t.base64Content,alt:"placeholder"}):"pdf"===t.fileType?i().createElement("div",{className:T.filePlaceholder},i().createElement(I.Lk,{size:16})):i().createElement("div",{className:T.filePlaceholder},i().createElement(I.Qf,{size:16})),i().createElement("div",{className:T.imageDetails},i().createElement("div",{className:T.captionFrame},i().createElement(S.oil,{id:"caption",labelText:"".concat("image"===t.fileType?p("image","Image"):p("file","File")," ").concat(p("name","name")),autoComplete:"off",placeholder:p("attachmentCaptionInstruction","Enter caption"),onChange:b,required:!0,value:A,invalid:f,autoFocus:!0,invalidText:f&&p("fieldRequired","This field is required")})),a&&i().createElement(S.Kx8,{id:"description",labelText:p("imageDescription","Image description"),autoComplete:"off",placeholder:p("attachmentCaptionInstruction","Enter caption"),value:_,onChange:y}))),i().createElement(S.mzw,null,i().createElement(r.UserHasAccess,{privilege:"Create Attachment"},i().createElement(S.zxk,{kind:"secondary",size:"lg",onClick:v},p("cancel","Cancel")),i().createElement(S.zxk,{type:"submit",size:"lg",onClick:C,disabled:f},p("addAttachment","Add attachment")))))};const L=function(e){var t=e.onCompletion,a=(0,n.useContext)(o),r=a.filesToUpload,c=a.clearData,l=a.setFilesToUpload,A=a.closeModal,d=a.collectDescription,m=(0,s.useTranslation)().t,_=M((0,n.useState)(1),2),u=_[0],p=_[1],h=(0,n.useCallback)((function(){u<r.length?p(u+1):t()}),[p,u,r,t]),f=(0,n.useCallback)((function(e){l((function(t){return t.map((function(t,a){return a===u-1?e:t}))})),h()}),[h,l,u]);return i().createElement("div",{className:T.filePreviewContainer},i().createElement(S.xBx,{closeModal:A,className:T.productiveHeading03},m("addAttachment_title","Add Attachment")," ",r.length>1&&"(".concat(u," of ").concat(r.length,")")),i().createElement(Z,{uploadedFile:r[u-1],clearData:c,onSaveFile:f,moveToNextFile:h,collectDescription:"image"===r[u-1].fileType&&d}))};var J=a(883),G={};G.styleTagTransform=y(),G.setAttributes=g(),G.insert=h().bind(null,"head"),G.domAPI=u(),G.insertStyleElement=v(),m()(J.Z,G);const U=J.Z&&J.Z.locals?J.Z.locals:void 0;function q(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 R(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function Y(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{},n=Object.keys(a);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(a).filter((function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable})))),n.forEach((function(t){R(e,t,a[t])}))}return e}function Q(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a.push.apply(a,n)}return a}(Object(t)).forEach((function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(t,a))})),e}const V=function(){var e,t,a=(0,s.useTranslation)().t,c=(0,n.useContext)(o),l=c.filesToUpload,A=c.saveFile,d=c.closeModal,m=c.clearData,_=c.onCompletion,u=(e=(0,n.useState)([]),t=2,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,i,r=[],o=!0,s=!1;try{for(a=a.call(e);!(o=(n=a.next()).done)&&(r.push(n.value),!t||r.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==a.return||a.return()}finally{if(s)throw i}}return r}}(e,t)||function(e,t){if(e){if("string"==typeof e)return q(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)?q(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.")}()),p=u[0],h=u[1];return(0,n.useEffect)((function(){l&&h(l.map((function(e){return Q(Y({},e),{status:"uploading"})})))}),[l,h]),(0,n.useEffect)((function(){Promise.all(l.map((function(e,t){return A(e).then((function(){(0,r.showSnackbar)({title:a("uploadComplete","Upload complete"),subtitle:"".concat(e.fileName," ").concat(a("uploadedSuccessfully","uploaded successfully")),kind:"success",isLowContrast:!0}),h((function(e){return e.map((function(e,a){return a===t?Q(Y({},e),{status:"complete"}):e}))}))})).catch((function(t){(0,r.showSnackbar)({title:"".concat(a("uploading","Uploading")," ").concat(e.fileName," ").concat(a("failed","failed")),subtitle:t,kind:"error"})}))}))).then((function(){null==_||_()}))}),[_,A,l,a,h]),i().createElement("div",{className:U.cameraSection},i().createElement(S.xBx,{closeModal:d,className:U.productiveHeading03,title:a("addAttachment_title","Add Attachment")}),i().createElement(S.fef,null,i().createElement("p",{className:"cds--label-description"},a("uploadWillContinueInTheBackground","Files will be uploaded in the background. You can close this modal.")),i().createElement("div",{className:U.uploadingFilesSection},p.map((function(e,t){return i().createElement(S.Py3,{key:t,name:e.fileName,status:e.status,size:"lg"})})))),i().createElement(S.mzw,null,i().createElement(S.uVA,{className:U.buttonSet},i().createElement(S.zxk,{size:"lg",kind:"secondary",onClick:m},a("addMoreAttachments","Add more attachments")),i().createElement(S.zxk,{size:"lg",kind:"primary",onClick:d},a("closeModal","Close")))))};function K(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,i,r=[],o=!0,s=!1;try{for(a=a.call(e);!(o=(n=a.next()).done)&&(r.push(n.value),!t||r.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==a.return||a.return()}finally{if(s)throw i}}return r}}(e,t)||function(e,t){if(e){if("string"==typeof e)return K(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)?K(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(){var e=(0,s.useTranslation)().t,t=W((0,n.useState)("upload"),2),a=t[0],r=t[1],c=(0,n.useContext)(o),l=c.cameraOnly,d=c.closeModal,m=(0,n.useRef)(),_=(0,n.useCallback)((function(){var e;null===(e=m.current)||void 0===e||e.getTracks().forEach((function(e){return e.stop()}))}),[m]);return(0,n.useEffect)((function(){return function(){_()}}),[_]),l?i().createElement(A,{mediaStream:m,stopCameraStream:_}):i().createElement("div",{className:D.cameraSection},i().createElement(S.xBx,{closeModal:d,title:e("addAttachment_title","Add Attachment")}),i().createElement(S.fef,{className:D.modalBody},i().createElement(S.mQc,{className:D.tabs,defaultSelectedIndex:1},i().createElement(S.tdY,{"aria-label":"Attachments-upload-section",className:D.tabList},i().createElement(S.OK9,{onClick:function(){return r("camera")}},e("webcam","Webcam")),i().createElement(S.OK9,{onClick:function(){return r("upload")}},e("uploadFiles","Upload files"))),i().createElement(S.nPR,null,i().createElement(S.x45,null,"camera"===a&&i().createElement(A,{mediaStream:m,stopCameraStream:_})),i().createElement(S.x45,null,i().createElement(z,null))))))};const $=function(e){var t=e.cameraOnly,a=e.multipleFiles,c=e.collectDescription,l=e.saveFile,A=e.closeModal,d=e.onCompletion,m=e.allowedExtensions,_=W((0,n.useState)(void 0),2),u=_[0],p=_[1],h=W((0,n.useState)([]),2),f=h[0],g=h[1],C=W((0,n.useState)(!1),2),v=C[0],b=C[1],y=(0,s.useTranslation)().t;(0,n.useEffect)((function(){u&&(0,r.showSnackbar)({subtitle:u.message,kind:"error",title:y("cameraError","Camera Error")})}),[u,y]);var E=(0,n.useCallback)((function(e){g([{base64Content:e,fileName:"Image taken from camera",fileType:"image",fileDescription:"",status:"uploading"}])}),[]),w=(0,n.useCallback)((function(){g([]),b(!1),p(void 0)}),[g,b]),D=(0,n.useCallback)((function(){b(!0)}),[b]),S=(0,n.useMemo)((function(){return v?i().createElement(V,null):f.length?i().createElement(L,{onCompletion:D}):i().createElement(X,null)}),[v,f,D]);return i().createElement(o.Provider,{value:{multipleFiles:a,cameraOnly:t,collectDescription:c,saveFile:l,closeModal:A,onCompletion:d,filesToUpload:f,setFilesToUpload:g,uploadFilesToServer:v,setUploadFilesToServer:b,clearData:w,handleTakePhoto:E,error:u,setError:p,allowedExtensions:m}},S)}}}]);
|
package/dist/28.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"28.js","mappings":"uNAGIA,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,GAAI,umFAAwmF,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,wEAAwE,4BAA4B,gEAAgE,oEAAoE,MAAQ,GAAG,SAAW,4kBAA4kB,WAAa,MAEngHH,EAAwBI,OAAS,CAChC,oBAAuB,+EACvB,oBAAuB,+EACvB,WAAc,sEACd,MAAS,iEACT,YAAe,uEACf,OAAU,kEACV,cAAiB,yEACjB,WAAc,sEACd,UAAa,qEACb,aAAgB,wEAChB,QAAW,oEAEZ,S,kECjBIJ,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,GAAI,23EAA43E,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,wEAAwE,4BAA4B,gEAAgE,0DAA0D,MAAQ,GAAG,SAAW,8kBAA8kB,WAAa,MAE/wGH,EAAwBI,OAAS,CAChC,oBAAuB,qEACvB,oBAAuB,qEACvB,WAAc,4DACd,MAAS,uDACT,YAAe,6DACf,OAAU,wDACV,qBAAwB,sEACxB,SAAY,0DACZ,aAAgB,8DAChB,aAAgB,8DAChB,mBAAsB,oEACtB,gBAAmB,kEAEpB,S,kEClBIJ,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,GAAI,i2DAAk2D,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,wEAAwE,4BAA4B,gEAAgE,6DAA6D,MAAQ,GAAG,SAAW,6cAA6c,WAAa,MAEvnFH,EAAwBI,OAAS,CAChC,oBAAuB,wE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AA,EAAAA,kBAANC,GAERrB,EAAAA,EAAAA,YAAU,WACJuJ,IACF/G,EAAAA,EAAAA,cAAa,CACXE,SAAU6G,EAAMG,QAChB/G,KAAM,QACNF,MAAOpB,EAAE,cAAe,iBAG9B,GAAG,CAACkI,EAAOlI,IAEX,IAAMvB,GAAkBI,EAAAA,EAAAA,cAAY,SAACyB,GACnCV,EAAiB,CACf,CACEc,cAAeJ,EACfM,SAAU,0BACVE,SAAU,QACVG,gBAAiB,GACjBC,OAAQ,cAGd,GAAG,IAEGsB,GAAY3D,EAAAA,EAAAA,cAAY,WAC5Be,EAAiB,IACjBwI,GAAuB,GACvB1J,OAASiB,EACX,GAAG,CAACC,EAAkBwI,IAEhBE,GAAyBzJ,EAAAA,EAAAA,cAAY,WACzCuJ,GAAuB,EACzB,GAAG,CAACA,IAEEG,GAAkBC,EAAAA,EAAAA,UAAQ,WAE9B,OAAIL,EACK,kBAACM,EAAwBA,MAG9BvD,EAAcK,OACT,kBAACmD,EAAmBA,CAACzD,aAAcqD,IAGrC,kBAACvB,EAAAA,KACV,GAAG,CAACoB,EAAqBjD,EAAeoD,IAExC,OACE,kBAAC9J,EAA2BmK,SAAQ,CAClCvF,MAAO,CACLtD,cAAAA,EACAoH,WAAAA,EACA5E,mBAAAA,EACAyD,SAAAA,EACAZ,WAAAA,EACAF,aAAAA,EACAC,cAAAA,EACAtF,iBAAAA,EACAuI,oBAAAA,EACAC,uBAAAA,EACA5F,UAAAA,EACA/D,gBAAAA,EACAyJ,MAAAA,EACAxJ,SAAAA,EACAmB,kBAAAA,IAGD0I,EAGP,C","sources":["webpack://@openmrs/esm-patient-attachments-app/./src/camera-media-uploader/camera-media-uploader.scss","webpack://@openmrs/esm-patient-attachments-app/./src/camera-media-uploader/file-review.scss","webpack://@openmrs/esm-patient-attachments-app/./src/camera-media-uploader/media-uploader.scss","webpack://@openmrs/esm-patient-attachments-app/./src/camera-media-uploader/uploading-status.scss","webpack://@openmrs/esm-patient-attachments-app/./src/camera-media-uploader/camera-media-uploader-context.resources.tsx","webpack://@openmrs/esm-patient-attachments-app/./src/camera-media-uploader/camera.component.tsx","webpack://@openmrs/esm-patient-attachments-app/./src/camera-media-uploader/camera-media-uploader.scss?c0a3","webpack://@openmrs/esm-patient-attachments-app/./src/camera-media-uploader/media-uploader.scss?c910","webpack://@openmrs/esm-patient-attachments-app/./src/camera-media-uploader/media-uploader.component.tsx","webpack://@openmrs/esm-patient-attachments-app/./src/camera-media-uploader/file-review.scss?bf4a","webpack://@openmrs/esm-patient-attachments-app/./src/camera-media-uploader/file-review.component.tsx","webpack://@openmrs/esm-patient-attachments-app/./src/camera-media-uploader/uploading-status.scss?18d9","webpack://@openmrs/esm-patient-attachments-app/./src/camera-media-uploader/uploading-status.component.tsx","webpack://@openmrs/esm-patient-attachments-app/./src/camera-media-uploader/camera-media-uploader.component.tsx"],"names":["___CSS_LOADER_EXPORT___","push","module","id","locals","createContext","mediaStream","stopCameraStream","useContext","CameraMediaUploaderContext","handleTakePhoto","setError","useEffect","setMediaStream","useCallback","ms","current","Camera","onTakePhoto","onCameraStart","onCameraStop","onCameraError","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","undefined","setFilesToUpload","allowedExtensions","multipleFiles","useTranslation","t","useConfig","fileSize","upload","files","forEach","file","size","readFileAsString","then","base64Content","uriData","fileName","name","fileType","type","split","fileDescription","status","showSnackbar","title","subtitle","kind","div","className","p","styles","uploadFile","FileUploaderDropContainer","accept","labelText","tabIndex","multiple","onAddFiles","evt","addedFiles","FilePreview","uploadedFile","collectDescription","onSaveFile","clearData","useState","setFileName","setFileDescription","emptyName","setEmptyName","saveImageOrPdf","e","preventDefault","cancelCapture","updateFileName","target","value","updateDescription","form","onSubmit","ModalBody","overview","img","src","alt","filePlaceholder","DocumentPdf","DocumentUnknown","imageDetails","captionFrame","TextInput","autoComplete","placeholder","onChange","required","invalid","autoFocus","invalidText","TextArea","ModalFooter","UserHasAccess","privilege","Button","onClick","disabled","onCompletion","filesToUpload","closeModal","currentFile","setCurrentFile","moveToNextFile","length","handleSave","updatedFile","map","indx","filePreviewContainer","ModalHeader","productiveHeading03","saveFile","filesUploading","setFilesUploading","Promise","all","isLowContrast","prevfilesToUpload","ind","catch","err","cameraSection","uploadingFilesSection","key","FileUploaderItem","ButtonSet","buttonSet","CameraMediaUploadTabs","view","setView","cameraOnly","useRef","getTracks","stop","CameraComponent","modalBody","Tabs","tabs","defaultSelectedIndex","TabList","aria-label","tabList","Tab","TabPanels","TabPanel","MediaUploaderComponent","error","uploadFilesToServer","setUploadFilesToServer","message","startUploadingToServer","returnComponent","useMemo","UploadingStatusComponent","FileReviewContainer","Provider"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"28.js","mappings":"uNAGIA,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,GAAI,umFAAwmF,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,wEAAwE,4BAA4B,gEAAgE,oEAAoE,MAAQ,GAAG,SAAW,4kBAA4kB,WAAa,MAEngHH,EAAwBI,OAAS,CAChC,oBAAuB,+EACvB,oBAAuB,+EACvB,WAAc,sEACd,MAAS,iEACT,YAAe,uEACf,OAAU,kEACV,cAAiB,yEACjB,WAAc,sEACd,UAAa,qEACb,aAAgB,wEAChB,QAAW,oEAEZ,S,kECjBIJ,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,GAAI,23EAA43E,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,wEAAwE,4BAA4B,gEAAgE,0DAA0D,MAAQ,GAAG,SAAW,8kBAA8kB,WAAa,MAE/wGH,EAAwBI,OAAS,CAChC,oBAAuB,qEACvB,oBAAuB,qEACvB,WAAc,4DACd,MAAS,uDACT,YAAe,6DACf,OAAU,wDACV,qBAAwB,sEACxB,SAAY,0DACZ,aAAgB,8DAChB,aAAgB,8DAChB,mBAAsB,oEACtB,gBAAmB,kEAEpB,S,kEClBIJ,E,MAA0B,GAA4B,KA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esm-patient-attachments-app/./src/camera-media-uploader/camera-media-uploader.scss","webpack://@openmrs/esm-patient-attachments-app/./src/camera-media-uploader/file-review.scss","webpack://@openmrs/esm-patient-attachments-app/./src/camera-media-uploader/media-uploader.scss","webpack://@openmrs/esm-patient-attachments-app/./src/camera-media-uploader/uploading-status.scss","webpack://@openmrs/esm-patient-attachments-app/./src/camera-media-uploader/camera-media-uploader-context.resources.tsx","webpack://@openmrs/esm-patient-attachments-app/./src/camera-media-uploader/camera.component.tsx","webpack://@openmrs/esm-patient-attachments-app/./src/camera-media-uploader/camera-media-uploader.scss?c0a3","webpack://@openmrs/esm-patient-attachments-app/./src/camera-media-uploader/media-uploader.scss?c910","webpack://@openmrs/esm-patient-attachments-app/./src/camera-media-uploader/media-uploader.component.tsx","webpack://@openmrs/esm-patient-attachments-app/./src/camera-media-uploader/file-review.scss?bf4a","webpack://@openmrs/esm-patient-attachments-app/./src/camera-media-uploader/file-review.component.tsx","webpack://@openmrs/esm-patient-attachments-app/./src/camera-media-uploader/uploading-status.scss?18d9","webpack://@openmrs/esm-patient-attachments-app/./src/camera-media-uploader/uploading-status.component.tsx","webpack://@openmrs/esm-patient-attachments-app/./src/camera-media-uploader/camera-media-uploader.component.tsx"],"names":["___CSS_LOADER_EXPORT___","push","module","id","locals","createContext","mediaStream","stopCameraStream","useContext","CameraMediaUploaderContext","handleTakePhoto","setError","useEffect","setMediaStream","useCallback","ms","current","Camera","onTakePhoto","onCameraStart","onCameraStop","onCameraError","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","undefined","setFilesToUpload","allowedExtensions","multipleFiles","useTranslation","t","useConfig","fileSize","upload","files","forEach","file","size","readFileAsString","then","base64Content","uriData","fileName","name","fileType","type","split","fileDescription","status","showSnackbar","title","subtitle","kind","div","className","p","styles","uploadFile","FileUploaderDropContainer","accept","labelText","tabIndex","multiple","onAddFiles","evt","addedFiles","FilePreview","uploadedFile","collectDescription","onSaveFile","clearData","useState","setFileName","setFileDescription","emptyName","setEmptyName","saveImageOrPdf","e","preventDefault","cancelCapture","updateFileName","target","value","updateDescription","form","onSubmit","ModalBody","overview","img","src","alt","filePlaceholder","DocumentPdf","DocumentUnknown","imageDetails","captionFrame","TextInput","autoComplete","placeholder","onChange","required","invalid","autoFocus","invalidText","TextArea","ModalFooter","UserHasAccess","privilege","Button","onClick","disabled","onCompletion","filesToUpload","closeModal","currentFile","setCurrentFile","moveToNextFile","length","handleSave","updatedFile","map","indx","filePreviewContainer","ModalHeader","productiveHeading03","saveFile","filesUploading","setFilesUploading","Promise","all","isLowContrast","prevfilesToUpload","ind","catch","err","cameraSection","uploadingFilesSection","key","FileUploaderItem","ButtonSet","buttonSet","CameraMediaUploadTabs","view","setView","cameraOnly","useRef","getTracks","stop","CameraComponent","modalBody","Tabs","tabs","defaultSelectedIndex","TabList","aria-label","tabList","Tab","TabPanels","TabPanel","MediaUploaderComponent","error","uploadFilesToServer","setUploadFilesToServer","message","startUploadingToServer","returnComponent","useMemo","UploadingStatusComponent","FileReviewContainer","Provider"],"sourceRoot":""}
|
package/dist/319.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_openmrs_esm_patient_attachments_app=globalThis.webpackChunk_openmrs_esm_patient_attachments_app||[]).push([[319],{8319:e=>{e.exports=JSON.parse('{"add":"Añadir","addAttachment":"Añadir archivo adjunto","addAttachment_title":"Añadir archivo adjunto","addImage":"Añadir imagen +","addMoreAttachments":"Añadir más archivos adjuntos","attachmentCaptionInstruction":"Introduzca título","attachments":"Archivos adjuntos","Attachments":"Archivos adjuntos","attachmentsInLowerCase":"attachments","attachmentsInProperFormat":"Attachments","cameraError":"Error de cámara","cancel":"Cancelar","changeImage":"Cambiar imagen","closeModal":"Cerrar","closePreview":"Cerrar vista previa","dateUploaded":"Fecha de carga","delete":"Borrar","deleteAttachmentConfirmationText":"¿Está seguro de que desea eliminar este {{attachmentType}}? Esta acción no se puede deshacer.","deleteImage":"Borrar imagen","error":"Error","errorUploading":"Error al cargar un archivo","failed":"fallido","failedDeleting":"no se pudo borrar","fieldRequired":"Este campo es obligatorio","file":"Archivo","fileDeleted":"Archivo eliminado","fileName":"Nombre de archivo","fileSizeInstructions":"Arrastre y suelte archivos aquí o haga clic para cargar","fileSizeLimitExceeded":"supera el tamaño de archivo de","fileSizeLimitExceededText":"Límite de tamaño de archivo excedido","fileUnsupported":"Archivo no compatible cargado","fileUploadSizeConstraints":"Límite de archivo es {{fileSize}}MB","image":"Imagen","imageDescription":"Descripción de imagen","name":"nombre","successfullyDeleted":"eliminado con éxito","type":"Tipo","uploadComplete":"Carga completa","uploadedSuccessfully":"cargado con éxito","uploadFiles":"Upload files","uploading":"Cargando","uploadWillContinueInTheBackground":"Los archivos se cargarán en segundo plano. Puede cerrar esta ventana.","webcam":"Cámara web"}')}}]);
|
|
1
|
+
"use strict";(globalThis.webpackChunk_openmrs_esm_patient_attachments_app=globalThis.webpackChunk_openmrs_esm_patient_attachments_app||[]).push([[319],{8319:e=>{e.exports=JSON.parse('{"add":"Añadir","addAttachment":"Añadir archivo adjunto","addAttachment_title":"Añadir archivo adjunto","addImage":"Añadir imagen +","addMoreAttachments":"Añadir más archivos adjuntos","attachmentCaptionInstruction":"Introduzca título","attachments":"Archivos adjuntos","Attachments":"Archivos adjuntos","attachmentsInLowerCase":"attachments","attachmentsInProperFormat":"Attachments","cameraError":"Error de cámara","cancel":"Cancelar","changeImage":"Cambiar imagen","closeModal":"Cerrar","closePreview":"Cerrar vista previa","dateUploaded":"Fecha de carga","delete":"Borrar","deleteAttachmentConfirmationText":"¿Está seguro de que desea eliminar este {{attachmentType}}? Esta acción no se puede deshacer.","deleteImage":"Borrar imagen","error":"Error","errorUploading":"Error al cargar un archivo","failed":"fallido","failedDeleting":"no se pudo borrar","fieldRequired":"Este campo es obligatorio","file":"Archivo","fileDeleted":"Archivo eliminado","fileName":"Nombre de archivo","fileSizeInstructions":"Arrastre y suelte archivos aquí o haga clic para cargar","fileSizeLimitExceeded":"supera el tamaño de archivo de","fileSizeLimitExceededText":"Límite de tamaño de archivo excedido","fileUnsupported":"Archivo no compatible cargado","fileUploadSizeConstraints":"Límite de archivo es {{fileSize}}MB","image":"Imagen","imageDescription":"Descripción de imagen","name":"nombre","successfullyDeleted":"eliminado con éxito","supportedFileTypes":"Supported file types are: JPEG, PNG, and WEBP","type":"Tipo","uploadComplete":"Carga completa","uploadedSuccessfully":"cargado con éxito","uploadFiles":"Upload files","uploading":"Cargando","uploadWillContinueInTheBackground":"Los archivos se cargarán en segundo plano. Puede cerrar esta ventana.","webcam":"Cámara web"}')}}]);
|
package/dist/460.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_openmrs_esm_patient_attachments_app=globalThis.webpackChunk_openmrs_esm_patient_attachments_app||[]).push([[460],{4460:e=>{e.exports=JSON.parse('{"add":"أضف","addAttachment":"أضف مرفق","addAttachment_title":"أضف مرفق","addImage":"أضف صورة +","addMoreAttachments":"أضف المزيد من المرفقات","attachmentCaptionInstruction":"أدخل الوصف","attachments":"المرفقات","Attachments":"المرفقات","attachmentsInLowerCase":"attachments","attachmentsInProperFormat":"Attachments","cameraError":"خطأ في الكاميرا","cancel":"إلغاء","changeImage":"غير الصورة","closeModal":"إغلاق","closePreview":"إغلاق المعاينة","dateUploaded":"تاريخ التحميل","delete":"حذف","deleteAttachmentConfirmationText":"هل أنت متأكد أنك تريد حذف هذا {{attachmentType}}؟ لا يمكن التراجع عن هذا الإجراء.","deleteImage":"حذف الصورة","error":"خطأ","errorUploading":"خطأ أثناء تحميل الملف","failed":"فشل","failedDeleting":"تعذر الحذف","fieldRequired":"هذا الحقل مطلوب","file":"ملف","fileDeleted":"تم حذف الملف","fileName":"اسم الملف","fileSizeInstructions":"قم بسحب وإسقاط الملفات هنا أو انقر للتحميل","fileSizeLimitExceeded":"تجاوز حجم الملف المسموح به","fileSizeLimitExceededText":"تم تجاوز الحد الأقصى لحجم الملف","fileUnsupported":"الملف المحمل غير مدعوم","fileUploadSizeConstraints":"الحد الأقصى لحجم الملف هو {{fileSize}}ميغابايت","image":"صورة","imageDescription":"وصف الصورة","name":"الاسم","successfullyDeleted":"تم الحذف بنجاح","type":"النوع","uploadComplete":"اكتمل التحميل","uploadedSuccessfully":"تم التحميل بنجاح","uploadFiles":"Upload files","uploading":"جاري التحميل","uploadWillContinueInTheBackground":"سيتم تحميل الملفات في الخلفية. يمكنك إغلاق هذه النافذة.","webcam":"كاميرا ويب"}')}}]);
|
|
1
|
+
"use strict";(globalThis.webpackChunk_openmrs_esm_patient_attachments_app=globalThis.webpackChunk_openmrs_esm_patient_attachments_app||[]).push([[460],{4460:e=>{e.exports=JSON.parse('{"add":"أضف","addAttachment":"أضف مرفق","addAttachment_title":"أضف مرفق","addImage":"أضف صورة +","addMoreAttachments":"أضف المزيد من المرفقات","attachmentCaptionInstruction":"أدخل الوصف","attachments":"المرفقات","Attachments":"المرفقات","attachmentsInLowerCase":"attachments","attachmentsInProperFormat":"Attachments","cameraError":"خطأ في الكاميرا","cancel":"إلغاء","changeImage":"غير الصورة","closeModal":"إغلاق","closePreview":"إغلاق المعاينة","dateUploaded":"تاريخ التحميل","delete":"حذف","deleteAttachmentConfirmationText":"هل أنت متأكد أنك تريد حذف هذا {{attachmentType}}؟ لا يمكن التراجع عن هذا الإجراء.","deleteImage":"حذف الصورة","error":"خطأ","errorUploading":"خطأ أثناء تحميل الملف","failed":"فشل","failedDeleting":"تعذر الحذف","fieldRequired":"هذا الحقل مطلوب","file":"ملف","fileDeleted":"تم حذف الملف","fileName":"اسم الملف","fileSizeInstructions":"قم بسحب وإسقاط الملفات هنا أو انقر للتحميل","fileSizeLimitExceeded":"تجاوز حجم الملف المسموح به","fileSizeLimitExceededText":"تم تجاوز الحد الأقصى لحجم الملف","fileUnsupported":"الملف المحمل غير مدعوم","fileUploadSizeConstraints":"الحد الأقصى لحجم الملف هو {{fileSize}}ميغابايت","image":"صورة","imageDescription":"وصف الصورة","name":"الاسم","successfullyDeleted":"تم الحذف بنجاح","supportedFileTypes":"Supported file types are: JPEG, PNG, and WEBP","type":"النوع","uploadComplete":"اكتمل التحميل","uploadedSuccessfully":"تم التحميل بنجاح","uploadFiles":"Upload files","uploading":"جاري التحميل","uploadWillContinueInTheBackground":"سيتم تحميل الملفات في الخلفية. يمكنك إغلاق هذه النافذة.","webcam":"كاميرا ويب"}')}}]);
|
package/dist/574.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_openmrs_esm_patient_attachments_app=globalThis.webpackChunk_openmrs_esm_patient_attachments_app||[]).push([[574],{3574:e=>{e.exports=JSON.parse('{"add":"Add","addAttachment":"Add Attachment","addAttachment_title":"Add Attachment","addImage":"Add image +","addMoreAttachments":"Add more attachments","attachmentCaptionInstruction":"Enter caption","attachments":"Attachments","Attachments":"Attachments","attachmentsInLowerCase":"attachments","attachmentsInProperFormat":"Attachments","cameraError":"Camera Error","cancel":"Cancel","changeImage":"Change image","closeModal":"Close","closePreview":"Close preview","dateUploaded":"Date uploaded","delete":"Delete","deleteAttachmentConfirmationText":"Are you sure you want to delete this {{attachmentType}}? This action can\'t be undone.","deleteImage":"Delete image","error":"Error","errorUploading":"Error uploading a file","failed":"failed","failedDeleting":"couldn\'t be deleted","fieldRequired":"This field is required","file":"File","fileDeleted":"File deleted","fileName":"File name","fileSizeInstructions":"Drag and drop files here or click to upload","fileSizeLimitExceeded":"exceeds the file size of","fileSizeLimitExceededText":"File size limit exceeded","fileUnsupported":"File uploaded is not supported","fileUploadSizeConstraints":"File limit is {{fileSize}}MB","image":"Image","imageDescription":"Image description","name":"name","successfullyDeleted":"successfully deleted","type":"Type","uploadComplete":"Upload complete","uploadedSuccessfully":"uploaded successfully","uploadFiles":"Upload files","uploading":"Uploading","uploadWillContinueInTheBackground":"Files will be uploaded in the background. You can close this modal.","webcam":"Webcam"}')}}]);
|
|
1
|
+
"use strict";(globalThis.webpackChunk_openmrs_esm_patient_attachments_app=globalThis.webpackChunk_openmrs_esm_patient_attachments_app||[]).push([[574],{3574:e=>{e.exports=JSON.parse('{"add":"Add","addAttachment":"Add Attachment","addAttachment_title":"Add Attachment","addImage":"Add image +","addMoreAttachments":"Add more attachments","attachmentCaptionInstruction":"Enter caption","attachments":"Attachments","Attachments":"Attachments","attachmentsInLowerCase":"attachments","attachmentsInProperFormat":"Attachments","cameraError":"Camera Error","cancel":"Cancel","changeImage":"Change image","closeModal":"Close","closePreview":"Close preview","dateUploaded":"Date uploaded","delete":"Delete","deleteAttachmentConfirmationText":"Are you sure you want to delete this {{attachmentType}}? This action can\'t be undone.","deleteImage":"Delete image","error":"Error","errorUploading":"Error uploading a file","failed":"failed","failedDeleting":"couldn\'t be deleted","fieldRequired":"This field is required","file":"File","fileDeleted":"File deleted","fileName":"File name","fileSizeInstructions":"Drag and drop files here or click to upload","fileSizeLimitExceeded":"exceeds the file size of","fileSizeLimitExceededText":"File size limit exceeded","fileUnsupported":"File uploaded is not supported","fileUploadSizeConstraints":"File limit is {{fileSize}}MB","image":"Image","imageDescription":"Image description","name":"name","successfullyDeleted":"successfully deleted","supportedFileTypes":"Supported file types are: JPEG, PNG, and WEBP","type":"Type","uploadComplete":"Upload complete","uploadedSuccessfully":"uploaded successfully","uploadFiles":"Upload files","uploading":"Uploading","uploadWillContinueInTheBackground":"Files will be uploaded in the background. You can close this modal.","webcam":"Webcam"}')}}]);
|
package/dist/644.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_openmrs_esm_patient_attachments_app=globalThis.webpackChunk_openmrs_esm_patient_attachments_app||[]).push([[644],{1644:e=>{e.exports=JSON.parse('{"add":"添加","addAttachment":"添加附件","addAttachment_title":"添加附件","addImage":"添加图像 +","addMoreAttachments":"增加更多附件","attachmentCaptionInstruction":"输入标题","attachments":"附件","Attachments":"附件","attachmentsInLowerCase":"附件","attachmentsInProperFormat":"附件","cameraError":"相机错误","cancel":"取消","changeImage":"更改图像","closeModal":"关闭","closePreview":"关闭预览","dateUploaded":"上传日期","delete":"删除","deleteAttachmentConfirmationText":"你确定要删除这个{{attachmentType}}吗?此操作无法撤销。","deleteImage":"删除图像","error":"错误","errorUploading":"上传文件出错","failed":"失败","failedDeleting":"无法删除","fieldRequired":"此字段为必填项","file":"文件","fileDeleted":"文件已删除","fileName":"文件名","fileSizeInstructions":"拖放文件到此处或点击上传","fileSizeLimitExceeded":"exceeds the file size of","fileSizeLimitExceededText":"文件大小超过限制","fileUnsupported":"上传的文件不受支持","fileUploadSizeConstraints":"文件限制为{{fileSize}}MB","image":"图像","imageDescription":"图像描述","name":"name","successfullyDeleted":"删除成功","type":"类型","uploadComplete":"上传完成","uploadedSuccessfully":"上传成功","uploadFiles":"上传文件","uploading":"正在上传","uploadWillContinueInTheBackground":"文件将在后台上传。您可以关闭此模态窗口。","webcam":"摄像头"}')}}]);
|
|
1
|
+
"use strict";(globalThis.webpackChunk_openmrs_esm_patient_attachments_app=globalThis.webpackChunk_openmrs_esm_patient_attachments_app||[]).push([[644],{1644:e=>{e.exports=JSON.parse('{"add":"添加","addAttachment":"添加附件","addAttachment_title":"添加附件","addImage":"添加图像 +","addMoreAttachments":"增加更多附件","attachmentCaptionInstruction":"输入标题","attachments":"附件","Attachments":"附件","attachmentsInLowerCase":"附件","attachmentsInProperFormat":"附件","cameraError":"相机错误","cancel":"取消","changeImage":"更改图像","closeModal":"关闭","closePreview":"关闭预览","dateUploaded":"上传日期","delete":"删除","deleteAttachmentConfirmationText":"你确定要删除这个{{attachmentType}}吗?此操作无法撤销。","deleteImage":"删除图像","error":"错误","errorUploading":"上传文件出错","failed":"失败","failedDeleting":"无法删除","fieldRequired":"此字段为必填项","file":"文件","fileDeleted":"文件已删除","fileName":"文件名","fileSizeInstructions":"拖放文件到此处或点击上传","fileSizeLimitExceeded":"exceeds the file size of","fileSizeLimitExceededText":"文件大小超过限制","fileUnsupported":"上传的文件不受支持","fileUploadSizeConstraints":"文件限制为{{fileSize}}MB","image":"图像","imageDescription":"图像描述","name":"name","successfullyDeleted":"删除成功","supportedFileTypes":"Supported file types are: JPEG, PNG, and WEBP","type":"类型","uploadComplete":"上传完成","uploadedSuccessfully":"上传成功","uploadFiles":"上传文件","uploading":"正在上传","uploadWillContinueInTheBackground":"文件将在后台上传。您可以关闭此模态窗口。","webcam":"摄像头"}')}}]);
|
package/dist/757.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_openmrs_esm_patient_attachments_app=globalThis.webpackChunk_openmrs_esm_patient_attachments_app||[]).push([[757],{2757:e=>{e.exports=JSON.parse('{"add":"Ajouter","addAttachment":"Ajouter une pièce jointe","addAttachment_title":"Add Attachment","addImage":"Ajouter une image","addMoreAttachments":"Ajouter plus de pièces jointes","attachmentCaptionInstruction":"Ajouter une légende pour l\'image","attachments":"Pièces jointes","Attachments":"Pièces jointes","attachmentsInLowerCase":"attachments","attachmentsInProperFormat":"Attachments","cameraError":"Erreur avec l\'appareil photo","cancel":"Annuller","changeImage":"Changer l\'image","closeModal":"Fermer","closePreview":"Fermer l\'aperçu","dateUploaded":"Date de téléchargement","delete":"Effacer","deleteAttachmentConfirmationText":"","deleteImage":"Effacer l\'image","error":"Erreur","errorUploading":"Erreur en téléchargeant l\'image","failed":"échec","failedDeleting":"n\'a pu être supprimé","fieldRequired":"Ce champs est requis","file":"Fichier","fileDeleted":"Fichier supprimé","fileName":"Nom du fichier","fileSizeInstructions":"Faites glisser et déposez les fichiers ici ou cliquez pour télécharger","fileSizeLimitExceeded":"dépasse la taille de fichier de","fileSizeLimitExceededText":"Limite de taille de fichier dépassée","fileUnsupported":"Le fichier téléchargé n\'est pas pris en charge","fileUploadSizeConstraints":"La limite de fichier est {{fileSize}}MB","image":"Image","imageDescription":"Description de l\'image","name":"Nom","successfullyDeleted":"Supprimé avec succès","type":"Type","uploadComplete":"Téléchargement terminé","uploadedSuccessfully":"téléchargé avec succès","uploadFiles":"Upload files","uploading":"En cours de téléchargement","uploadWillContinueInTheBackground":"Les fichiers seront téléchargés en arrière-plan. Vous pouvez fermer cette fenêtre.","webcam":"Webcam"}')}}]);
|
|
1
|
+
"use strict";(globalThis.webpackChunk_openmrs_esm_patient_attachments_app=globalThis.webpackChunk_openmrs_esm_patient_attachments_app||[]).push([[757],{2757:e=>{e.exports=JSON.parse('{"add":"Ajouter","addAttachment":"Ajouter une pièce jointe","addAttachment_title":"Add Attachment","addImage":"Ajouter une image","addMoreAttachments":"Ajouter plus de pièces jointes","attachmentCaptionInstruction":"Ajouter une légende pour l\'image","attachments":"Pièces jointes","Attachments":"Pièces jointes","attachmentsInLowerCase":"attachments","attachmentsInProperFormat":"Attachments","cameraError":"Erreur avec l\'appareil photo","cancel":"Annuller","changeImage":"Changer l\'image","closeModal":"Fermer","closePreview":"Fermer l\'aperçu","dateUploaded":"Date de téléchargement","delete":"Effacer","deleteAttachmentConfirmationText":"","deleteImage":"Effacer l\'image","error":"Erreur","errorUploading":"Erreur en téléchargeant l\'image","failed":"échec","failedDeleting":"n\'a pu être supprimé","fieldRequired":"Ce champs est requis","file":"Fichier","fileDeleted":"Fichier supprimé","fileName":"Nom du fichier","fileSizeInstructions":"Faites glisser et déposez les fichiers ici ou cliquez pour télécharger","fileSizeLimitExceeded":"dépasse la taille de fichier de","fileSizeLimitExceededText":"Limite de taille de fichier dépassée","fileUnsupported":"Le fichier téléchargé n\'est pas pris en charge","fileUploadSizeConstraints":"La limite de fichier est {{fileSize}}MB","image":"Image","imageDescription":"Description de l\'image","name":"Nom","successfullyDeleted":"Supprimé avec succès","supportedFileTypes":"Supported file types are: JPEG, PNG, and WEBP","type":"Type","uploadComplete":"Téléchargement terminé","uploadedSuccessfully":"téléchargé avec succès","uploadFiles":"Upload files","uploading":"En cours de téléchargement","uploadWillContinueInTheBackground":"Les fichiers seront téléchargés en arrière-plan. Vous pouvez fermer cette fenêtre.","webcam":"Webcam"}')}}]);
|
package/dist/766.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.webpackChunk_openmrs_esm_patient_attachments_app=globalThis.webpackChunk_openmrs_esm_patient_attachments_app||[]).push([[766],{7649:(e,t,a)=>{"use strict";a.d(t,{Z:()=>r});var n=a(272),i=a.n(n),s=a(2609),c=a.n(s)()(i());c.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-patient-attachments__attachment-thumbnail__productiveHeading02___PCFWb{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-attachments__attachment-thumbnail__productiveHeading03___WkCQV{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)}.-esm-patient-attachments__attachment-thumbnail__bodyLong01___ubNUM{font-size:var(--cds-body-long-01-font-size, 0.875rem);font-weight:var(--cds-body-long-01-font-weight, 400);line-height:var(--cds-body-long-01-line-height, 1.42857);letter-spacing:var(--cds-body-long-01-letter-spacing, 0.16px)}.-esm-patient-attachments__attachment-thumbnail__muted___wqu8k{color:#525252}.-esm-patient-attachments__attachment-thumbnail__bodyShort01___gOtHp{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)}.-esm-patient-attachments__attachment-thumbnail__text02___wX1pJ{color:#525252}.-esm-patient-attachments__attachment-thumbnail__caption___KhyIf{position:absolute;top:141px;right:73px;text-align:center;backdrop-filter:blur(20px)}.-esm-patient-attachments__attachment-thumbnail__thumbnail___D922N{height:10rem}.-esm-patient-attachments__attachment-thumbnail__imageThumbnail___Locsm{width:100%;cursor:pointer}.-esm-patient-attachments__attachment-thumbnail__imageThumbnail___Locsm img{width:100% !important;margin:auto !important;height:10rem}.-esm-patient-attachments__attachment-thumbnail__pdfThumbnail___QYdHB{cursor:pointer;background-color:#c6c6c6;display:flex;justify-content:center;align-items:center;width:100%;height:100%}.-esm-patient-attachments__attachment-thumbnail__captionText___Atc0H{color:#2e2eef;cursor:pointer;text-decoration:underline}.-esm-patient-attachments__attachment-thumbnail__actionButtons___aS3CP{width:20%;position:absolute;right:0}.-esm-patient-attachments__attachment-thumbnail__actionButtons___aS3CP span{margin:5px}.-esm-patient-attachments__attachment-thumbnail__infoIcon___jrzWr{visibility:hidden;position:absolute;right:4px;top:4px;cursor:pointer}.-esm-patient-attachments__attachment-thumbnail__thumbnail___D922N:hover .-esm-patient-attachments__attachment-thumbnail__infoIcon___jrzWr{visibility:visible}.-esm-patient-attachments__attachment-thumbnail__infoIcon___jrzWr .-esm-patient-attachments__attachment-thumbnail__infoText___HE7I7{visibility:hidden;width:170px;background-color:#000;color:#fff;text-align:center;border-radius:6px;padding:5px 0;position:absolute;z-index:1;top:-46px;right:-166px}.-esm-patient-attachments__attachment-thumbnail__infoIcon___jrzWr:hover .-esm-patient-attachments__attachment-thumbnail__infoText___HE7I7{visibility:visible}.-esm-patient-attachments__attachment-thumbnail__otherThumbnail___ivLnC{object-fit:none !important;cursor:pointer}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/root.scss","webpack://./../../node_modules/@carbon/type/scss/_styles.scss","webpack://./src/attachments/attachment-thumbnail.scss"],names:[],mappings:"AAoDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CCnDF,6EC81BI,uDAAA,CAAA,0DAAA,CAAA,4DAAA,CAAA,8DAAA,CD11BJ,6EC01BI,kDAAA,CAAA,kDAAA,CAAA,kDAAA,CAAA,sDAAA,CDt1BJ,oECs1BI,qDAAA,CAAA,oDAAA,CAAA,wDAAA,CAAA,6DAAA,CDl1BJ,+DACE,aDZQ,CCeV,qEC80BI,wDAAA,CAAA,uDAAA,CAAA,2DAAA,CAAA,gEAAA,CD10BJ,gEACE,aDpBQ,CGHV,iEACE,iBAAA,CACA,SAAA,CACA,UAAA,CACA,iBAAA,CACA,0BAAA,CAGF,mEACE,YAAA,CAGF,wEACE,UAAA,CACA,cAAA,CAEA,4EACE,qBAAA,CACA,sBAAA,CACA,YAAA,CAIJ,sEACE,cAAA,CACA,wBHnBc,CGoBd,YAAA,CACA,sBAAA,CACA,kBAAA,CACA,UAAA,CACA,WAAA,CAGF,qEACE,aAAA,CACA,cAAA,CACA,yBAAA,CAGF,uEACE,SAAA,CACA,iBAAA,CACA,OAAA,CAGF,4EACE,UAAA,CAGF,kEACE,iBAAA,CACA,iBAAA,CACA,SAAA,CACA,OAAA,CACA,cAAA,CAGF,2IACE,kBAAA,CAGF,oIACE,iBAAA,CACA,WAAA,CACA,qBAAA,CACA,UAAA,CACA,iBAAA,CACA,iBAAA,CACA,aAAA,CACA,iBAAA,CACA,SAAA,CACA,SAAA,CACA,YAAA,CAGF,0IACE,kBAAA,CAGF,wEACE,0BAAA,CACA,cAAA",sourceRoot:""}]),c.locals={productiveHeading02:"-esm-patient-attachments__attachment-thumbnail__productiveHeading02___PCFWb",productiveHeading03:"-esm-patient-attachments__attachment-thumbnail__productiveHeading03___WkCQV",bodyLong01:"-esm-patient-attachments__attachment-thumbnail__bodyLong01___ubNUM",muted:"-esm-patient-attachments__attachment-thumbnail__muted___wqu8k",bodyShort01:"-esm-patient-attachments__attachment-thumbnail__bodyShort01___gOtHp",text02:"-esm-patient-attachments__attachment-thumbnail__text02___wX1pJ",caption:"-esm-patient-attachments__attachment-thumbnail__caption___KhyIf",thumbnail:"-esm-patient-attachments__attachment-thumbnail__thumbnail___D922N",imageThumbnail:"-esm-patient-attachments__attachment-thumbnail__imageThumbnail___Locsm",pdfThumbnail:"-esm-patient-attachments__attachment-thumbnail__pdfThumbnail___QYdHB",captionText:"-esm-patient-attachments__attachment-thumbnail__captionText___Atc0H",actionButtons:"-esm-patient-attachments__attachment-thumbnail__actionButtons___aS3CP",infoIcon:"-esm-patient-attachments__attachment-thumbnail__infoIcon___jrzWr",infoText:"-esm-patient-attachments__attachment-thumbnail__infoText___HE7I7",otherThumbnail:"-esm-patient-attachments__attachment-thumbnail__otherThumbnail___ivLnC"};const r=c},3675:(e,t,a)=>{"use strict";a.d(t,{Z:()=>r});var n=a(272),i=a.n(n),s=a(2609),c=a.n(s)()(i());c.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-patient-attachments__attachments-grid-overview__productiveHeading02___OodS2{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-attachments__attachments-grid-overview__productiveHeading03___88vQG{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)}.-esm-patient-attachments__attachments-grid-overview__bodyLong01___qvMrV{font-size:var(--cds-body-long-01-font-size, 0.875rem);font-weight:var(--cds-body-long-01-font-weight, 400);line-height:var(--cds-body-long-01-line-height, 1.42857);letter-spacing:var(--cds-body-long-01-letter-spacing, 0.16px)}.-esm-patient-attachments__attachments-grid-overview__muted___YOT5r{color:#525252}.-esm-patient-attachments__attachments-grid-overview__bodyShort01___y90te{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)}.-esm-patient-attachments__attachments-grid-overview__text02___MQkpx{color:#525252}.-esm-patient-attachments__attachments-grid-overview__galleryContainer___d2nDU{display:grid;grid-template-columns:1fr 1fr 1fr 1fr;align-items:center;grid-gap:1rem;padding:0 1rem 1rem 1rem}.-esm-patient-attachments__attachments-grid-overview__attachmentThumbnailSkeleton___CZtHn{width:100%}.-esm-patient-attachments__attachments-grid-overview__galleryContainer___d2nDU img{object-fit:cover}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/root.scss","webpack://./../../node_modules/@carbon/type/scss/_styles.scss","webpack://./src/attachments/attachments-grid-overview.scss","webpack://./../../node_modules/@carbon/layout/scss/generated/_spacing.scss"],names:[],mappings:"AAoDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CCnDF,kFC81BI,uDAAA,CAAA,0DAAA,CAAA,4DAAA,CAAA,8DAAA,CD11BJ,kFC01BI,kDAAA,CAAA,kDAAA,CAAA,kDAAA,CAAA,sDAAA,CDt1BJ,yECs1BI,qDAAA,CAAA,oDAAA,CAAA,wDAAA,CAAA,6DAAA,CDl1BJ,oEACE,aDZQ,CCeV,0EC80BI,wDAAA,CAAA,uDAAA,CAAA,2DAAA,CAAA,gEAAA,CD10BJ,qEACE,aDpBQ,CGDV,+EACE,YAAA,CACA,qCAAA,CACA,kBAAA,CACA,aCuBW,CDtBX,wBAAA,CAGF,0FACE,UAAA,CAGF,mFACE,gBAAA",sourceRoot:""}]),c.locals={productiveHeading02:"-esm-patient-attachments__attachments-grid-overview__productiveHeading02___OodS2",productiveHeading03:"-esm-patient-attachments__attachments-grid-overview__productiveHeading03___88vQG",bodyLong01:"-esm-patient-attachments__attachments-grid-overview__bodyLong01___qvMrV",muted:"-esm-patient-attachments__attachments-grid-overview__muted___YOT5r",bodyShort01:"-esm-patient-attachments__attachments-grid-overview__bodyShort01___y90te",text02:"-esm-patient-attachments__attachments-grid-overview__text02___MQkpx",galleryContainer:"-esm-patient-attachments__attachments-grid-overview__galleryContainer___d2nDU",attachmentThumbnailSkeleton:"-esm-patient-attachments__attachments-grid-overview__attachmentThumbnailSkeleton___CZtHn"};const r=c},7717:(e,t,a)=>{"use strict";a.d(t,{Z:()=>r});var n=a(272),i=a.n(n),s=a(2609),c=a.n(s)()(i());c.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-patient-attachments__attachments-overview__productiveHeading02___ikBgF{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-attachments__attachments-overview__productiveHeading03___wecZZ{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)}.-esm-patient-attachments__attachments-overview__bodyLong01___g4255{font-size:var(--cds-body-long-01-font-size, 0.875rem);font-weight:var(--cds-body-long-01-font-weight, 400);line-height:var(--cds-body-long-01-line-height, 1.42857);letter-spacing:var(--cds-body-long-01-letter-spacing, 0.16px)}.-esm-patient-attachments__attachments-overview__muted___awuk6{color:#525252}.-esm-patient-attachments__attachments-overview__bodyShort01___EgdzM{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)}.-esm-patient-attachments__attachments-overview__text02___CtPYa{color:#525252}.-esm-patient-attachments__attachments-overview__overview___dhaEp{background-color:#fff}.-esm-patient-attachments__attachments-overview__attachmentHeaderActionItems___QWwx6{align-items:center;display:flex;justify-content:end}.-esm-patient-attachments__attachments-overview__attachmentHeaderActionItems___QWwx6 .cds--content-switcher{max-width:max-content}.-esm-patient-attachments__attachments-overview__attachmentHeaderActionItems___QWwx6 .cds--content-switcher .cds--content-switcher__label{height:1rem}.-esm-patient-attachments__attachments-overview__divider___w0bBt{width:1px;height:1rem;color:#e0e0e0;margin:0 1rem}.-esm-patient-attachments__attachments-overview__validatingDataIcon___hQLgf{align-items:center;display:flex;flex:1 1 0%;justify-content:center}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/root.scss","webpack://./../../node_modules/@carbon/type/scss/_styles.scss","webpack://./src/attachments/attachments-overview.scss","webpack://./../../node_modules/@carbon/layout/scss/generated/_spacing.scss","webpack://./../../node_modules/@carbon/colors/index.scss"],names:[],mappings:"AAoDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CCnDF,6EC81BI,uDAAA,CAAA,0DAAA,CAAA,4DAAA,CAAA,8DAAA,CD11BJ,6EC01BI,kDAAA,CAAA,kDAAA,CAAA,kDAAA,CAAA,sDAAA,CDt1BJ,oECs1BI,qDAAA,CAAA,oDAAA,CAAA,wDAAA,CAAA,6DAAA,CDl1BJ,+DACE,aDZQ,CCeV,qEC80BI,wDAAA,CAAA,uDAAA,CAAA,2DAAA,CAAA,gEAAA,CD10BJ,gEACE,aDpBQ,CGDV,kEACE,qBHJM,CGOR,qFACE,kBAAA,CACA,YAAA,CACA,mBAAA,CAEA,4GACE,qBAAA,CAEA,0IACE,WCcO,CDTb,iEACE,SAAA,CACA,WCOW,CDNX,aEkBQ,CFjBR,aAAA,CAGF,4EACE,kBAAA,CACA,YAAA,CACA,WAAA,CACA,sBAAA",sourceRoot:""}]),c.locals={productiveHeading02:"-esm-patient-attachments__attachments-overview__productiveHeading02___ikBgF",productiveHeading03:"-esm-patient-attachments__attachments-overview__productiveHeading03___wecZZ",bodyLong01:"-esm-patient-attachments__attachments-overview__bodyLong01___g4255",muted:"-esm-patient-attachments__attachments-overview__muted___awuk6",bodyShort01:"-esm-patient-attachments__attachments-overview__bodyShort01___EgdzM",text02:"-esm-patient-attachments__attachments-overview__text02___CtPYa",overview:"-esm-patient-attachments__attachments-overview__overview___dhaEp",attachmentHeaderActionItems:"-esm-patient-attachments__attachments-overview__attachmentHeaderActionItems___QWwx6",divider:"-esm-patient-attachments__attachments-overview__divider___w0bBt",validatingDataIcon:"-esm-patient-attachments__attachments-overview__validatingDataIcon___hQLgf"};const r=c},5065:(e,t,a)=>{"use strict";a.d(t,{Z:()=>r});var n=a(272),i=a.n(n),s=a(2609),c=a.n(s)()(i());c.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-patient-attachments__attachments-table-overview__productiveHeading02___I3qWU{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-attachments__attachments-table-overview__productiveHeading03___EFLes{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)}.-esm-patient-attachments__attachments-table-overview__bodyLong01___hEelq{font-size:var(--cds-body-long-01-font-size, 0.875rem);font-weight:var(--cds-body-long-01-font-weight, 400);line-height:var(--cds-body-long-01-line-height, 1.42857);letter-spacing:var(--cds-body-long-01-letter-spacing, 0.16px)}.-esm-patient-attachments__attachments-table-overview__muted___pN7EN{color:#525252}.-esm-patient-attachments__attachments-table-overview__bodyShort01___soQEr{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)}.-esm-patient-attachments__attachments-table-overview__text02___fQUWa{color:#525252}.-esm-patient-attachments__attachments-table-overview__attachmentTable___eRQL4>.-esm-patient-attachments__attachments-table-overview__cds--data-table-header____hpAr{display:none}.-esm-patient-attachments__attachments-table-overview__link___GZarB{text-decoration:none;cursor:pointer}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/root.scss","webpack://./../../node_modules/@carbon/type/scss/_styles.scss","webpack://./src/attachments/attachments-table-overview.scss"],names:[],mappings:"AAoDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CCnDF,mFC81BI,uDAAA,CAAA,0DAAA,CAAA,4DAAA,CAAA,8DAAA,CD11BJ,mFC01BI,kDAAA,CAAA,kDAAA,CAAA,kDAAA,CAAA,sDAAA,CDt1BJ,0ECs1BI,qDAAA,CAAA,oDAAA,CAAA,wDAAA,CAAA,6DAAA,CDl1BJ,qEACE,aDZQ,CCeV,2EC80BI,wDAAA,CAAA,uDAAA,CAAA,2DAAA,CAAA,gEAAA,CD10BJ,sEACE,aDpBQ,CGHV,qKACE,YAAA,CAGF,oEACE,oBAAA,CACA,cAAA",sourceRoot:""}]),c.locals={productiveHeading02:"-esm-patient-attachments__attachments-table-overview__productiveHeading02___I3qWU",productiveHeading03:"-esm-patient-attachments__attachments-table-overview__productiveHeading03___EFLes",bodyLong01:"-esm-patient-attachments__attachments-table-overview__bodyLong01___hEelq",muted:"-esm-patient-attachments__attachments-table-overview__muted___pN7EN",bodyShort01:"-esm-patient-attachments__attachments-table-overview__bodyShort01___soQEr",text02:"-esm-patient-attachments__attachments-table-overview__text02___fQUWa",attachmentTable:"-esm-patient-attachments__attachments-table-overview__attachmentTable___eRQL4","cds--data-table-header":"-esm-patient-attachments__attachments-table-overview__cds--data-table-header____hpAr",link:"-esm-patient-attachments__attachments-table-overview__link___GZarB"};const r=c},2415:(e,t,a)=>{"use strict";a.d(t,{Z:()=>r});var n=a(272),i=a.n(n),s=a(2609),c=a.n(s)()(i());c.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-patient-attachments__image-preview__productiveHeading02___DnnIy{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-attachments__image-preview__productiveHeading03___GsFyn{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)}.-esm-patient-attachments__image-preview__bodyLong01___Q40bX{font-size:var(--cds-body-long-01-font-size, 0.875rem);font-weight:var(--cds-body-long-01-font-weight, 400);line-height:var(--cds-body-long-01-line-height, 1.42857);letter-spacing:var(--cds-body-long-01-letter-spacing, 0.16px)}.-esm-patient-attachments__image-preview__muted___WE5Ya{color:#525252}.-esm-patient-attachments__image-preview__bodyShort01___PHUjM{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)}.-esm-patient-attachments__image-preview__text02___PVnVl{color:#525252}.-esm-patient-attachments__image-preview__attachmentPreview___t9OCa{display:grid;grid-template-columns:1fr 16rem;position:fixed;width:100vw;top:3rem;bottom:0;left:0;z-index:5001;background-color:#262626}.-esm-patient-attachments__image-preview__leftPanel___s4n1k{display:grid;grid-template-columns:auto 1fr auto;align-items:start}.-esm-patient-attachments__image-preview__rightPanel___Jelx0{background-color:#393939;padding:1rem;color:#f4f4f4}.-esm-patient-attachments__image-preview__closePreviewButton___MEGNO{display:flex;flex-direction:column;align-content:center;justify-content:center;flex-wrap:wrap}.-esm-patient-attachments__image-preview__closePreviewButton___MEGNO>svg>path{fill:#f4f4f4 !important}.-esm-patient-attachments__image-preview__closePreviewButton___MEGNO:hover>svg>path{fill:#161616 !important}.-esm-patient-attachments__image-preview__attachmentImage___HFIGm{display:flex;justify-content:center;align-items:center;height:100%}.-esm-patient-attachments__image-preview__attachmentImage___HFIGm img{max-width:80%;max-height:80%}.-esm-patient-attachments__image-preview__attachmentImage___HFIGm .-esm-patient-attachments__image-preview__pdfViewer___Rjspw{width:90%;height:90%}.-esm-patient-attachments__image-preview__overflowMenu___Dd8qn button svg circle{fill:#f4f4f4}.-esm-patient-attachments__image-preview__overflowMenu___Dd8qn:hover button svg circle,.-esm-patient-attachments__image-preview__overflowMenu___Dd8qn:focus button svg circle{fill:#161616}.-esm-patient-attachments__image-preview__imageDescription___L0eMQ{margin-top:.5rem}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/root.scss","webpack://./../../node_modules/@carbon/type/scss/_styles.scss","webpack://./src/attachments/image-preview.scss","webpack://./../../node_modules/@carbon/colors/index.scss","webpack://./../../node_modules/@carbon/layout/scss/generated/_spacing.scss"],names:[],mappings:"AAoDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CCnDF,sEC81BI,uDAAA,CAAA,0DAAA,CAAA,4DAAA,CAAA,8DAAA,CD11BJ,sEC01BI,kDAAA,CAAA,kDAAA,CAAA,kDAAA,CAAA,sDAAA,CDt1BJ,6DCs1BI,qDAAA,CAAA,oDAAA,CAAA,wDAAA,CAAA,6DAAA,CDl1BJ,wDACE,aDZQ,CCeV,8DC80BI,wDAAA,CAAA,uDAAA,CAAA,2DAAA,CAAA,gEAAA,CD10BJ,yDACE,aDpBQ,CGDV,oEACE,YAAA,CACA,+BAAA,CACA,cAAA,CACA,WAAA,CACA,QAAA,CACA,QAAA,CACA,MAAA,CACA,YAAA,CACA,wBCqCQ,CDlCV,4DACE,YAAA,CACA,mCAAA,CACA,iBAAA,CAGF,6DACE,wBC0BQ,CDzBR,YEOW,CFNX,aHzBM,CG4BR,qEACE,YAAA,CACA,qBAAA,CACA,oBAAA,CACA,sBAAA,CACA,cAAA,CAGF,8EACE,uBAAA,CAGF,oFACE,uBAAA,CAGF,kEACE,YAAA,CACA,sBAAA,CACA,kBAAA,CACA,WAAA,CAEA,sEACE,aAAA,CACA,cAAA,CAGF,8HACE,SAAA,CACA,UAAA,CAIJ,iFACE,YH9DM,CGiER,8KAEE,YH/DM,CGkER,mEACE,gBElDW",sourceRoot:""}]),c.locals={productiveHeading02:"-esm-patient-attachments__image-preview__productiveHeading02___DnnIy",productiveHeading03:"-esm-patient-attachments__image-preview__productiveHeading03___GsFyn",bodyLong01:"-esm-patient-attachments__image-preview__bodyLong01___Q40bX",muted:"-esm-patient-attachments__image-preview__muted___WE5Ya",bodyShort01:"-esm-patient-attachments__image-preview__bodyShort01___PHUjM",text02:"-esm-patient-attachments__image-preview__text02___PVnVl",attachmentPreview:"-esm-patient-attachments__image-preview__attachmentPreview___t9OCa",leftPanel:"-esm-patient-attachments__image-preview__leftPanel___s4n1k",rightPanel:"-esm-patient-attachments__image-preview__rightPanel___Jelx0",closePreviewButton:"-esm-patient-attachments__image-preview__closePreviewButton___MEGNO",attachmentImage:"-esm-patient-attachments__image-preview__attachmentImage___HFIGm",pdfViewer:"-esm-patient-attachments__image-preview__pdfViewer___Rjspw",overflowMenu:"-esm-patient-attachments__image-preview__overflowMenu___Dd8qn",imageDescription:"-esm-patient-attachments__image-preview__imageDescription___L0eMQ"};const r=c},8766:(e,t,a)=>{"use strict";a.r(t),a.d(t,{attachmentsOverview:()=>oe,attachmentsSummaryResultsDashboard:()=>Ae,capturePhotoModal:()=>me,capturePhotoWidget:()=>_e,deleteAttachmentModal:()=>le,importTranslation:()=>ne,startupApp:()=>se});var n=a(5448),i=a(2870),s={fileSize:{_type:i.Type.Number,_description:"Max file size limit to upload (in MB)",_default:10}},c=a(7900),r=a.n(c),o=a(4924),A=a(4550),m=a(7326),_=a(2779),l=a.n(_),d=a(321),h=a.n(d),p=a(1195),u=a.n(p),g=a(3275),v=a.n(g),C=a(7162),b=a.n(C),f=a(2094),w=a.n(f),y=a(757),E=a.n(y),D=a(7649),k={};k.styleTagTransform=E(),k.setAttributes=b(),k.insert=v().bind(null,"head"),k.domAPI=u(),k.insertStyleElement=w(),h()(D.Z,k);const B=D.Z&&D.Z.locals?D.Z.locals:void 0;var x=a(5362);function I(e){return r().createElement("div",{className:B.thumbnail},r().createElement(O,e))}function P(e){return r().createElement("div",{className:B.imageThumbnail,role:"button",tabIndex:0,onClick:null==e?void 0:e.onClick},r().createElement("img",{src:e.src,alt:e.title,style:e.style}))}function S(e){return r().createElement("div",{className:B.pdfThumbnail,onClick:e.onClick,role:"button",tabIndex:0},r().createElement(x.Lk,{size:24}))}function T(e){return r().createElement("div",{className:B.pdfThumbnail,onClick:e.onClick,role:"button",tabIndex:0},r().createElement(x.Qf,{size:24}))}function O(e){var t,a=e.item.bytesContentFamily,n={src:e.imageProps.src,title:e.imageProps.title,style:e.imageProps.style,onClick:null===(t=e.imageProps)||void 0===t?void 0:t.onClick};return"IMAGE"===a?r().createElement(P,n):"PDF"===a?r().createElement(S,n):r().createElement(T,n)}var F=a(3675),H={};H.styleTagTransform=E(),H.setAttributes=b(),H.insert=v().bind(null,"head"),H.domAPI=u(),H.insertStyleElement=w(),h()(F.Z,H);const z=F.Z&&F.Z.locals?F.Z.locals:void 0,N=function(e){var t=e.attachments,a=e.isLoading,n=e.openAttachment;return a?r().createElement("div",{className:z.galleryContainer},r().createElement(A.uKo,{className:z.attachmentThumbnailSkeleton}),r().createElement(A.uKo,{className:z.attachmentThumbnailSkeleton}),r().createElement(A.uKo,{className:z.attachmentThumbnailSkeleton}),r().createElement(A.uKo,{className:z.attachmentThumbnailSkeleton})):r().createElement("div",{className:z.galleryContainer},t.map((function(e,t){var a={src:e.src,title:e.title,style:{},onClick:function(){n(e)}},i={id:e.id,dateTime:e.dateTime,bytesMimeType:e.bytesMimeType,bytesContentFamily:e.bytesContentFamily};return r().createElement("div",{key:t},r().createElement(I,{imageProps:a,item:i}),r().createElement("p",{className:z.bodyLong01},e.title),r().createElement("p",{className:l()(z.bodyLong01,z.muted)},e.dateTime))})))};var j=a(5065),M={};M.styleTagTransform=E(),M.setAttributes=b(),M.insert=v().bind(null,"head"),M.domAPI=u(),M.insertStyleElement=w(),h()(j.Z,M);const L=j.Z&&j.Z.locals?j.Z.locals:void 0;function G(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}const Q=function(e){var t=e.attachments,a=e.isLoading,n=e.deleteAttachment,s=e.openAttachment,m=(0,o.useTranslation)().t,_=(0,i.useLayoutType)(),l="tablet"===_,d="small-desktop"===_||"large-desktop"===_,h=(0,c.useMemo)((function(){return t.map((function(e){return{id:e.id,fileName:r().createElement("span",{role:"button",tabIndex:0,className:L.link,onClick:function(){return s(e)}},e.title),type:e.bytesContentFamily,dateUploaded:e.dateTime}}))}),[t,s]),p=(0,c.useMemo)((function(){return[{key:"fileName",header:m("fileName","File name"),colSpan:1},{key:"type",header:m("type","Type"),colSpan:1},{key:"dateUploaded",header:m("dateUploaded","Date uploaded"),colSpan:2}]}),[m]);return a?r().createElement("div",{className:L.attachmentTable},r().createElement(A.gqd,{className:L.dataTableSkeleton,compact:d,zebra:!0})):r().createElement(A.xJi,null,r().createElement(A.wQF,{rows:h,headers:p,size:l?"lg":"sm",overflowMenuOnHover:d},(function(e){var a=e.rows,i=e.headers,s=e.getHeaderProps,c=e.getTableProps;return r().createElement(A.iA_,function(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a.push.apply(a,n)}return a}(Object(t)).forEach((function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(t,a))})),e}(function(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{},n=Object.keys(a);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(a).filter((function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable})))),n.forEach((function(t){G(e,t,a[t])}))}return e}({},c()),{useZebraStyles:!0}),r().createElement(A.ssF,null,r().createElement(A.SCH,null,i.map((function(e){var t,a;return r().createElement(A.xDH,s({header:e,isSortable:e.isSortable,colSpan:e.colSpan}),null!==(a=null===(t=e.header)||void 0===t?void 0:t.content)&&void 0!==a?a:e.header)})))),r().createElement(A.RMI,null,a.map((function(e,a){return r().createElement(A.SCH,{key:e.id},e.cells.map((function(e){var t,a;return r().createElement(A.pj1,{key:e.id},null!==(a=null===(t=e.value)||void 0===t?void 0:t.content)&&void 0!==a?a:e.value)})),r().createElement(A.pj1,{className:"cds--table-column-menu"},r().createElement(A.PQB,{size:l?"lg":"sm",flipped:!0,align:"left"},r().createElement(A.laM,{itemText:m("delete","Delete"),isDelete:!0,onClick:function(){return n(t[a])}}))))}))))})))};var Z=a(6581),q=a(2415),W={};W.styleTagTransform=E(),W.setAttributes=b(),W.insert=v().bind(null,"head"),W.domAPI=u(),W.insertStyleElement=w(),h()(q.Z,W);const U=q.Z&&q.Z.locals?q.Z.locals:void 0,J=function(e){var t=e.closePreview,a=e.attachmentToPreview,n=e.deleteAttachment,s=(0,o.useTranslation)().t,m="tablet"===(0,i.useLayoutType)();return(0,c.useEffect)((function(){var e=function(e){"Escape"==e.key&&t()};return window.addEventListener("keydown",e),function(){window.removeEventListener("keydown",e)}}),[t]),r().createElement("div",{className:U.attachmentPreview},r().createElement("div",{className:U.leftPanel},r().createElement(A.zxk,{iconDescription:s("closePreview","Close preview"),label:s("closePreview","Close preview"),kind:"ghost",size:"md",className:U.closePreviewButton,hasIconOnly:!0,renderIcon:Z.x8,onClick:t}),r().createElement("div",{className:U.attachmentImage},"IMAGE"===a.bytesContentFamily?r().createElement("img",{src:a.src,alt:a.title}):"PDF"===a.bytesContentFamily?r().createElement("iframe",{title:"PDFViewer",className:U.pdfViewer,src:a.src}):null),r().createElement("div",{className:U.overflowMenu},r().createElement(A.PQB,{className:U.overflowMenu,flipped:!0,size:m?"lg":"md"},r().createElement(A.laM,{hasDivider:!0,isDelete:!0,itemText:s("deleteImage","Delete image"),onClick:function(){return n(a)}})))),r().createElement("div",{className:U.rightPanel},r().createElement("h4",{className:U.productiveHeading02},a.title),(null==a?void 0:a.description)?r().createElement("p",{className:l()(U.bodyLong01,U.imageDescription)},a.description):null))};var V=a(7717),Y={};Y.styleTagTransform=E(),Y.setAttributes=b(),Y.insert=v().bind(null,"head"),Y.domAPI=u(),Y.insertStyleElement=w(),h()(V.Z,Y);const R=V.Z&&V.Z.locals?V.Z.locals:void 0;var K=a(6484),X=a(833),$=a(8871);function ee(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 te(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,i,s=[],c=!0,r=!1;try{for(a=a.call(e);!(c=(n=a.next()).done)&&(s.push(n.value),!t||s.length!==t);c=!0);}catch(e){r=!0,i=e}finally{try{c||null==a.return||a.return()}finally{if(r)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ee(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)?ee(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.")}()}function ae(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}var ne=a(3979),ie="@openmrs/esm-patient-attachments-app";function se(){(0,i.defineConfigSchema)(ie,s)}var ce,re,oe=(0,i.getSyncLifecycle)((function(e){var t=e.patientUuid,a=(0,o.useTranslation)().t,s=(0,i.useAttachments)(t,!0),_=s.data,l=s.mutate,d=s.isValidating,h=s.isLoading,p=te((0,c.useState)(null),2),u=p[0],g=p[1],v=(0,c.useMemo)((function(){return _.map((function(e){return(0,m.H)(e)}))}),[_]),C=te((0,c.useState)(!1),2),b=C[0],f=C[1],w=te((0,c.useState)("grid"),2),y=w[0],E=w[1],D="tablet"===(0,i.useLayoutType)(),k=(0,c.useCallback)((function(){return g(null)}),[g]);(0,c.useEffect)((function(){!0===b&&((0,i.showSnackbar)({isLowContrast:!0,kind:"error",subtitle:a("fileUnsupported","File uploaded is not supported"),title:a("errorUploading","Error uploading a file")}),f(!1))}),[b,a]);var B=(0,c.useCallback)((function(){var e=(0,i.showModal)("capture-photo-modal",{saveFile:function(e){return(0,i.createAttachment)(t,e)},closeModal:function(){e()},onCompletion:function(){return l()},multipleFiles:!0,collectDescription:!0})}),[t,l]),x=(0,c.useCallback)((function(e){(0,i.deleteAttachmentPermanently)(e.id,new AbortController).then((function(){l(),g(null),(0,i.showSnackbar)({title:a("fileDeleted","File deleted"),subtitle:"".concat(e.title," ").concat(a("successfullyDeleted","successfully deleted")),kind:"success",isLowContrast:!0})})).catch((function(t){(0,i.showSnackbar)({title:a("error","Error"),subtitle:"".concat(e.title," ").concat(a("failedDeleting","couldn't be deleted")),kind:"error"})}))}),[l,a,g]),I=(0,c.useCallback)((function(e){var t=(0,i.showModal)("delete-attachment-modal",{attachment:e,close:function(){return t()},onConfirmation:function(e){x(e),t()}})}),[x]),P=(0,c.useCallback)((function(e){if("IMAGE"===e.bytesContentFamily||"PDF"===e.bytesContentFamily)g(e);else{var t=document.createElement("a");t.setAttribute("href",e.src),t.setAttribute("download",e.title),t.click()}}),[g]);return v.length?r().createElement(i.UserHasAccess,{privilege:"View Attachments"},r().createElement("div",{onDragOverCapture:B,className:R.overview},r().createElement("div",{id:"container"},r().createElement(n.CardHeader,{title:a("attachments","Attachments")},r().createElement("div",{className:R.validatingDataIcon},d&&r().createElement(A.gbz,{withOverlay:!1,small:!0})),r().createElement("div",{className:R.attachmentHeaderActionItems},r().createElement(A.GHR,{onChange:function(e){return E("".concat(e.name))},size:D?"md":"sm"},r().createElement(A.rsf,{name:"grid"},r().createElement(K.lG,{size:16})),r().createElement(A.rsf,{name:"tabular"},r().createElement(X.aV,{size:16}))),r().createElement("div",{className:R.divider}),r().createElement(A.zxk,{kind:"ghost",renderIcon:$.mm,iconDescription:"Add attachment",onClick:B},a("add","Add")))),"grid"===y?r().createElement(N,{openAttachment:P,deleteAttachment:I,isLoading:h,attachments:v}):r().createElement(Q,{openAttachment:P,deleteAttachment:I,isLoading:h,attachments:v}))),u&&r().createElement(J,{closePreview:k,attachmentToPreview:u,deleteAttachment:I})):r().createElement(n.EmptyState,{displayText:a("attachmentsInLowerCase","attachments"),headerTitle:a("attachmentsInProperFormat","Attachments"),launchForm:B})}),{featureName:"patient-attachments",moduleName:ie}),Ae=(0,i.getSyncLifecycle)((0,n.createDashboardLink)((ce=function(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{},n=Object.keys(a);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(a).filter((function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable})))),n.forEach((function(t){ae(e,t,a[t])}))}return e}({},{slot:"patient-chart-attachments-dashboard-slot",columns:1,path:"Attachments",title:"Attachments"}),re=null!=(re={moduleName:ie})?re:{},Object.getOwnPropertyDescriptors?Object.defineProperties(ce,Object.getOwnPropertyDescriptors(re)):function(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a.push.apply(a,n)}return a}(Object(re)).forEach((function(e){Object.defineProperty(ce,e,Object.getOwnPropertyDescriptor(re,e))})),ce)),{featureName:"attachments-dashboard-link",moduleName:ie}),me=(0,i.getAsyncLifecycle)((function(){return Promise.all([a.e(813),a.e(28)]).then(a.bind(a,1028))}),{featureName:"capture-photo-modal",moduleName:ie}),_e=(0,i.getAsyncLifecycle)((function(){return a.e(887).then(a.bind(a,2887))}),{featureName:"capture-photo-widget",moduleName:ie}),le=(0,i.getAsyncLifecycle)((function(){return a.e(845).then(a.bind(a,4845))}),{featureName:"delete-attachment-modal",moduleName:ie})},7326:(e,t,a)=>{"use strict";a.d(t,{H:()=>s,Z:()=>i});var n=a(2870);function i(e){return new Promise((function(t){if(e){var a=new FileReader;a.addEventListener("load",(function(){"string"==typeof a.result?t(a.result):t("")})),a.addEventListener("error",(function(){t("")})),a.readAsDataURL(e)}else t("")}))}function s(e){return{id:e.uuid,src:"".concat(window.openmrsBase).concat(n.attachmentUrl,"/").concat(e.uuid,"/bytes"),title:e.comment,description:"",dateTime:(0,n.formatDate)(new Date(e.dateTime),{mode:"wide"}),bytesMimeType:e.bytesMimeType,bytesContentFamily:e.bytesContentFamily}}},3979:(e,t,a)=>{var n={"./am.json":[8788,788],"./ar.json":[4460,460],"./en.json":[3574,574],"./es.json":[8319,319],"./fr.json":[2757,757],"./he.json":[5833,833],"./km.json":[7807,807],"./zh.json":[8271,271],"./zh_CN.json":[1644,644]};function i(e){if(!a.o(n,e))return Promise.resolve().then((()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=n[e],i=t[0];return a.e(t[1]).then((()=>a(i)))}i.keys=()=>Object.keys(n),i.id=3979,e.exports=i}}]);
|
|
1
|
+
(globalThis.webpackChunk_openmrs_esm_patient_attachments_app=globalThis.webpackChunk_openmrs_esm_patient_attachments_app||[]).push([[766],{7649:(e,t,a)=>{"use strict";a.d(t,{Z:()=>r});var n=a(272),i=a.n(n),s=a(2609),c=a.n(s)()(i());c.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-patient-attachments__attachment-thumbnail__productiveHeading02___PCFWb{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-attachments__attachment-thumbnail__productiveHeading03___WkCQV{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)}.-esm-patient-attachments__attachment-thumbnail__bodyLong01___ubNUM{font-size:var(--cds-body-long-01-font-size, 0.875rem);font-weight:var(--cds-body-long-01-font-weight, 400);line-height:var(--cds-body-long-01-line-height, 1.42857);letter-spacing:var(--cds-body-long-01-letter-spacing, 0.16px)}.-esm-patient-attachments__attachment-thumbnail__muted___wqu8k{color:#525252}.-esm-patient-attachments__attachment-thumbnail__bodyShort01___gOtHp{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)}.-esm-patient-attachments__attachment-thumbnail__text02___wX1pJ{color:#525252}.-esm-patient-attachments__attachment-thumbnail__caption___KhyIf{position:absolute;top:141px;right:73px;text-align:center;backdrop-filter:blur(20px)}.-esm-patient-attachments__attachment-thumbnail__thumbnail___D922N{height:10rem}.-esm-patient-attachments__attachment-thumbnail__imageThumbnail___Locsm{width:100%;cursor:pointer}.-esm-patient-attachments__attachment-thumbnail__imageThumbnail___Locsm img{width:100% !important;margin:auto !important;height:10rem}.-esm-patient-attachments__attachment-thumbnail__pdfThumbnail___QYdHB{cursor:pointer;background-color:#c6c6c6;display:flex;justify-content:center;align-items:center;width:100%;height:100%}.-esm-patient-attachments__attachment-thumbnail__captionText___Atc0H{color:#2e2eef;cursor:pointer;text-decoration:underline}.-esm-patient-attachments__attachment-thumbnail__actionButtons___aS3CP{width:20%;position:absolute;right:0}.-esm-patient-attachments__attachment-thumbnail__actionButtons___aS3CP span{margin:5px}.-esm-patient-attachments__attachment-thumbnail__infoIcon___jrzWr{visibility:hidden;position:absolute;right:4px;top:4px;cursor:pointer}.-esm-patient-attachments__attachment-thumbnail__thumbnail___D922N:hover .-esm-patient-attachments__attachment-thumbnail__infoIcon___jrzWr{visibility:visible}.-esm-patient-attachments__attachment-thumbnail__infoIcon___jrzWr .-esm-patient-attachments__attachment-thumbnail__infoText___HE7I7{visibility:hidden;width:170px;background-color:#000;color:#fff;text-align:center;border-radius:6px;padding:5px 0;position:absolute;z-index:1;top:-46px;right:-166px}.-esm-patient-attachments__attachment-thumbnail__infoIcon___jrzWr:hover .-esm-patient-attachments__attachment-thumbnail__infoText___HE7I7{visibility:visible}.-esm-patient-attachments__attachment-thumbnail__otherThumbnail___ivLnC{object-fit:none !important;cursor:pointer}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/root.scss","webpack://./../../node_modules/@carbon/type/scss/_styles.scss","webpack://./src/attachments/attachment-thumbnail.scss"],names:[],mappings:"AAoDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CCnDF,6EC81BI,uDAAA,CAAA,0DAAA,CAAA,4DAAA,CAAA,8DAAA,CD11BJ,6EC01BI,kDAAA,CAAA,kDAAA,CAAA,kDAAA,CAAA,sDAAA,CDt1BJ,oECs1BI,qDAAA,CAAA,oDAAA,CAAA,wDAAA,CAAA,6DAAA,CDl1BJ,+DACE,aDZQ,CCeV,qEC80BI,wDAAA,CAAA,uDAAA,CAAA,2DAAA,CAAA,gEAAA,CD10BJ,gEACE,aDpBQ,CGHV,iEACE,iBAAA,CACA,SAAA,CACA,UAAA,CACA,iBAAA,CACA,0BAAA,CAGF,mEACE,YAAA,CAGF,wEACE,UAAA,CACA,cAAA,CAEA,4EACE,qBAAA,CACA,sBAAA,CACA,YAAA,CAIJ,sEACE,cAAA,CACA,wBHnBc,CGoBd,YAAA,CACA,sBAAA,CACA,kBAAA,CACA,UAAA,CACA,WAAA,CAGF,qEACE,aAAA,CACA,cAAA,CACA,yBAAA,CAGF,uEACE,SAAA,CACA,iBAAA,CACA,OAAA,CAGF,4EACE,UAAA,CAGF,kEACE,iBAAA,CACA,iBAAA,CACA,SAAA,CACA,OAAA,CACA,cAAA,CAGF,2IACE,kBAAA,CAGF,oIACE,iBAAA,CACA,WAAA,CACA,qBAAA,CACA,UAAA,CACA,iBAAA,CACA,iBAAA,CACA,aAAA,CACA,iBAAA,CACA,SAAA,CACA,SAAA,CACA,YAAA,CAGF,0IACE,kBAAA,CAGF,wEACE,0BAAA,CACA,cAAA",sourceRoot:""}]),c.locals={productiveHeading02:"-esm-patient-attachments__attachment-thumbnail__productiveHeading02___PCFWb",productiveHeading03:"-esm-patient-attachments__attachment-thumbnail__productiveHeading03___WkCQV",bodyLong01:"-esm-patient-attachments__attachment-thumbnail__bodyLong01___ubNUM",muted:"-esm-patient-attachments__attachment-thumbnail__muted___wqu8k",bodyShort01:"-esm-patient-attachments__attachment-thumbnail__bodyShort01___gOtHp",text02:"-esm-patient-attachments__attachment-thumbnail__text02___wX1pJ",caption:"-esm-patient-attachments__attachment-thumbnail__caption___KhyIf",thumbnail:"-esm-patient-attachments__attachment-thumbnail__thumbnail___D922N",imageThumbnail:"-esm-patient-attachments__attachment-thumbnail__imageThumbnail___Locsm",pdfThumbnail:"-esm-patient-attachments__attachment-thumbnail__pdfThumbnail___QYdHB",captionText:"-esm-patient-attachments__attachment-thumbnail__captionText___Atc0H",actionButtons:"-esm-patient-attachments__attachment-thumbnail__actionButtons___aS3CP",infoIcon:"-esm-patient-attachments__attachment-thumbnail__infoIcon___jrzWr",infoText:"-esm-patient-attachments__attachment-thumbnail__infoText___HE7I7",otherThumbnail:"-esm-patient-attachments__attachment-thumbnail__otherThumbnail___ivLnC"};const r=c},3675:(e,t,a)=>{"use strict";a.d(t,{Z:()=>r});var n=a(272),i=a.n(n),s=a(2609),c=a.n(s)()(i());c.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-patient-attachments__attachments-grid-overview__productiveHeading02___OodS2{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-attachments__attachments-grid-overview__productiveHeading03___88vQG{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)}.-esm-patient-attachments__attachments-grid-overview__bodyLong01___qvMrV{font-size:var(--cds-body-long-01-font-size, 0.875rem);font-weight:var(--cds-body-long-01-font-weight, 400);line-height:var(--cds-body-long-01-line-height, 1.42857);letter-spacing:var(--cds-body-long-01-letter-spacing, 0.16px)}.-esm-patient-attachments__attachments-grid-overview__muted___YOT5r{color:#525252}.-esm-patient-attachments__attachments-grid-overview__bodyShort01___y90te{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)}.-esm-patient-attachments__attachments-grid-overview__text02___MQkpx{color:#525252}.-esm-patient-attachments__attachments-grid-overview__galleryContainer___d2nDU{display:grid;grid-template-columns:1fr 1fr 1fr 1fr;align-items:center;grid-gap:1rem;padding:0 1rem 1rem 1rem}.-esm-patient-attachments__attachments-grid-overview__attachmentThumbnailSkeleton___CZtHn{width:100%}.-esm-patient-attachments__attachments-grid-overview__galleryContainer___d2nDU img{object-fit:cover}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/root.scss","webpack://./../../node_modules/@carbon/type/scss/_styles.scss","webpack://./src/attachments/attachments-grid-overview.scss","webpack://./../../node_modules/@carbon/layout/scss/generated/_spacing.scss"],names:[],mappings:"AAoDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CCnDF,kFC81BI,uDAAA,CAAA,0DAAA,CAAA,4DAAA,CAAA,8DAAA,CD11BJ,kFC01BI,kDAAA,CAAA,kDAAA,CAAA,kDAAA,CAAA,sDAAA,CDt1BJ,yECs1BI,qDAAA,CAAA,oDAAA,CAAA,wDAAA,CAAA,6DAAA,CDl1BJ,oEACE,aDZQ,CCeV,0EC80BI,wDAAA,CAAA,uDAAA,CAAA,2DAAA,CAAA,gEAAA,CD10BJ,qEACE,aDpBQ,CGDV,+EACE,YAAA,CACA,qCAAA,CACA,kBAAA,CACA,aCuBW,CDtBX,wBAAA,CAGF,0FACE,UAAA,CAGF,mFACE,gBAAA",sourceRoot:""}]),c.locals={productiveHeading02:"-esm-patient-attachments__attachments-grid-overview__productiveHeading02___OodS2",productiveHeading03:"-esm-patient-attachments__attachments-grid-overview__productiveHeading03___88vQG",bodyLong01:"-esm-patient-attachments__attachments-grid-overview__bodyLong01___qvMrV",muted:"-esm-patient-attachments__attachments-grid-overview__muted___YOT5r",bodyShort01:"-esm-patient-attachments__attachments-grid-overview__bodyShort01___y90te",text02:"-esm-patient-attachments__attachments-grid-overview__text02___MQkpx",galleryContainer:"-esm-patient-attachments__attachments-grid-overview__galleryContainer___d2nDU",attachmentThumbnailSkeleton:"-esm-patient-attachments__attachments-grid-overview__attachmentThumbnailSkeleton___CZtHn"};const r=c},7717:(e,t,a)=>{"use strict";a.d(t,{Z:()=>r});var n=a(272),i=a.n(n),s=a(2609),c=a.n(s)()(i());c.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-patient-attachments__attachments-overview__productiveHeading02___ikBgF{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-attachments__attachments-overview__productiveHeading03___wecZZ{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)}.-esm-patient-attachments__attachments-overview__bodyLong01___g4255{font-size:var(--cds-body-long-01-font-size, 0.875rem);font-weight:var(--cds-body-long-01-font-weight, 400);line-height:var(--cds-body-long-01-line-height, 1.42857);letter-spacing:var(--cds-body-long-01-letter-spacing, 0.16px)}.-esm-patient-attachments__attachments-overview__muted___awuk6{color:#525252}.-esm-patient-attachments__attachments-overview__bodyShort01___EgdzM{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)}.-esm-patient-attachments__attachments-overview__text02___CtPYa{color:#525252}.-esm-patient-attachments__attachments-overview__overview___dhaEp{background-color:#fff}.-esm-patient-attachments__attachments-overview__attachmentHeaderActionItems___QWwx6{align-items:center;display:flex;justify-content:end}.-esm-patient-attachments__attachments-overview__attachmentHeaderActionItems___QWwx6 .cds--content-switcher{max-width:max-content}.-esm-patient-attachments__attachments-overview__attachmentHeaderActionItems___QWwx6 .cds--content-switcher .cds--content-switcher__label{height:1rem}.-esm-patient-attachments__attachments-overview__divider___w0bBt{width:1px;height:1rem;color:#e0e0e0;margin:0 1rem}.-esm-patient-attachments__attachments-overview__validatingDataIcon___hQLgf{align-items:center;display:flex;flex:1 1 0%;justify-content:center}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/root.scss","webpack://./../../node_modules/@carbon/type/scss/_styles.scss","webpack://./src/attachments/attachments-overview.scss","webpack://./../../node_modules/@carbon/layout/scss/generated/_spacing.scss","webpack://./../../node_modules/@carbon/colors/index.scss"],names:[],mappings:"AAoDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CCnDF,6EC81BI,uDAAA,CAAA,0DAAA,CAAA,4DAAA,CAAA,8DAAA,CD11BJ,6EC01BI,kDAAA,CAAA,kDAAA,CAAA,kDAAA,CAAA,sDAAA,CDt1BJ,oECs1BI,qDAAA,CAAA,oDAAA,CAAA,wDAAA,CAAA,6DAAA,CDl1BJ,+DACE,aDZQ,CCeV,qEC80BI,wDAAA,CAAA,uDAAA,CAAA,2DAAA,CAAA,gEAAA,CD10BJ,gEACE,aDpBQ,CGDV,kEACE,qBHJM,CGOR,qFACE,kBAAA,CACA,YAAA,CACA,mBAAA,CAEA,4GACE,qBAAA,CAEA,0IACE,WCcO,CDTb,iEACE,SAAA,CACA,WCOW,CDNX,aEkBQ,CFjBR,aAAA,CAGF,4EACE,kBAAA,CACA,YAAA,CACA,WAAA,CACA,sBAAA",sourceRoot:""}]),c.locals={productiveHeading02:"-esm-patient-attachments__attachments-overview__productiveHeading02___ikBgF",productiveHeading03:"-esm-patient-attachments__attachments-overview__productiveHeading03___wecZZ",bodyLong01:"-esm-patient-attachments__attachments-overview__bodyLong01___g4255",muted:"-esm-patient-attachments__attachments-overview__muted___awuk6",bodyShort01:"-esm-patient-attachments__attachments-overview__bodyShort01___EgdzM",text02:"-esm-patient-attachments__attachments-overview__text02___CtPYa",overview:"-esm-patient-attachments__attachments-overview__overview___dhaEp",attachmentHeaderActionItems:"-esm-patient-attachments__attachments-overview__attachmentHeaderActionItems___QWwx6",divider:"-esm-patient-attachments__attachments-overview__divider___w0bBt",validatingDataIcon:"-esm-patient-attachments__attachments-overview__validatingDataIcon___hQLgf"};const r=c},5065:(e,t,a)=>{"use strict";a.d(t,{Z:()=>r});var n=a(272),i=a.n(n),s=a(2609),c=a.n(s)()(i());c.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-patient-attachments__attachments-table-overview__productiveHeading02___I3qWU{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-attachments__attachments-table-overview__productiveHeading03___EFLes{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)}.-esm-patient-attachments__attachments-table-overview__bodyLong01___hEelq{font-size:var(--cds-body-long-01-font-size, 0.875rem);font-weight:var(--cds-body-long-01-font-weight, 400);line-height:var(--cds-body-long-01-line-height, 1.42857);letter-spacing:var(--cds-body-long-01-letter-spacing, 0.16px)}.-esm-patient-attachments__attachments-table-overview__muted___pN7EN{color:#525252}.-esm-patient-attachments__attachments-table-overview__bodyShort01___soQEr{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)}.-esm-patient-attachments__attachments-table-overview__text02___fQUWa{color:#525252}.-esm-patient-attachments__attachments-table-overview__attachmentTable___eRQL4>.-esm-patient-attachments__attachments-table-overview__cds--data-table-header____hpAr{display:none}.-esm-patient-attachments__attachments-table-overview__link___GZarB{text-decoration:none;cursor:pointer}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/root.scss","webpack://./../../node_modules/@carbon/type/scss/_styles.scss","webpack://./src/attachments/attachments-table-overview.scss"],names:[],mappings:"AAoDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CCnDF,mFC81BI,uDAAA,CAAA,0DAAA,CAAA,4DAAA,CAAA,8DAAA,CD11BJ,mFC01BI,kDAAA,CAAA,kDAAA,CAAA,kDAAA,CAAA,sDAAA,CDt1BJ,0ECs1BI,qDAAA,CAAA,oDAAA,CAAA,wDAAA,CAAA,6DAAA,CDl1BJ,qEACE,aDZQ,CCeV,2EC80BI,wDAAA,CAAA,uDAAA,CAAA,2DAAA,CAAA,gEAAA,CD10BJ,sEACE,aDpBQ,CGHV,qKACE,YAAA,CAGF,oEACE,oBAAA,CACA,cAAA",sourceRoot:""}]),c.locals={productiveHeading02:"-esm-patient-attachments__attachments-table-overview__productiveHeading02___I3qWU",productiveHeading03:"-esm-patient-attachments__attachments-table-overview__productiveHeading03___EFLes",bodyLong01:"-esm-patient-attachments__attachments-table-overview__bodyLong01___hEelq",muted:"-esm-patient-attachments__attachments-table-overview__muted___pN7EN",bodyShort01:"-esm-patient-attachments__attachments-table-overview__bodyShort01___soQEr",text02:"-esm-patient-attachments__attachments-table-overview__text02___fQUWa",attachmentTable:"-esm-patient-attachments__attachments-table-overview__attachmentTable___eRQL4","cds--data-table-header":"-esm-patient-attachments__attachments-table-overview__cds--data-table-header____hpAr",link:"-esm-patient-attachments__attachments-table-overview__link___GZarB"};const r=c},2415:(e,t,a)=>{"use strict";a.d(t,{Z:()=>r});var n=a(272),i=a.n(n),s=a(2609),c=a.n(s)()(i());c.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-patient-attachments__image-preview__productiveHeading02___DnnIy{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-attachments__image-preview__productiveHeading03___GsFyn{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)}.-esm-patient-attachments__image-preview__bodyLong01___Q40bX{font-size:var(--cds-body-long-01-font-size, 0.875rem);font-weight:var(--cds-body-long-01-font-weight, 400);line-height:var(--cds-body-long-01-line-height, 1.42857);letter-spacing:var(--cds-body-long-01-letter-spacing, 0.16px)}.-esm-patient-attachments__image-preview__muted___WE5Ya{color:#525252}.-esm-patient-attachments__image-preview__bodyShort01___PHUjM{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)}.-esm-patient-attachments__image-preview__text02___PVnVl{color:#525252}.-esm-patient-attachments__image-preview__attachmentPreview___t9OCa{display:grid;grid-template-columns:1fr 16rem;position:fixed;width:100vw;top:3rem;bottom:0;left:0;z-index:5001;background-color:#262626}.-esm-patient-attachments__image-preview__leftPanel___s4n1k{display:grid;grid-template-columns:auto 1fr auto;align-items:start}.-esm-patient-attachments__image-preview__rightPanel___Jelx0{background-color:#393939;padding:1rem;color:#f4f4f4}.-esm-patient-attachments__image-preview__closePreviewButton___MEGNO>svg>path{fill:#f4f4f4 !important}.-esm-patient-attachments__image-preview__closePreviewButton___MEGNO:hover>svg>path{fill:#161616 !important}.-esm-patient-attachments__image-preview__attachmentImage___HFIGm{display:flex;justify-content:center;align-items:center;height:100%}.-esm-patient-attachments__image-preview__attachmentImage___HFIGm img{max-width:80%;max-height:80%}.-esm-patient-attachments__image-preview__attachmentImage___HFIGm .-esm-patient-attachments__image-preview__pdfViewer___Rjspw{width:90%;height:90%}.-esm-patient-attachments__image-preview__overflowMenu___Dd8qn button svg circle{fill:#f4f4f4}.-esm-patient-attachments__image-preview__overflowMenu___Dd8qn:hover button svg circle,.-esm-patient-attachments__image-preview__overflowMenu___Dd8qn:focus button svg circle{fill:#161616}.-esm-patient-attachments__image-preview__imageDescription___L0eMQ{margin-top:.5rem}.-esm-patient-attachments__image-preview__menuItem___eTJ3q{max-width:none}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/root.scss","webpack://./../../node_modules/@carbon/type/scss/_styles.scss","webpack://./src/attachments/image-preview.scss","webpack://./../../node_modules/@carbon/colors/index.scss","webpack://./../../node_modules/@carbon/layout/scss/generated/_spacing.scss"],names:[],mappings:"AAoDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CCnDF,sEC81BI,uDAAA,CAAA,0DAAA,CAAA,4DAAA,CAAA,8DAAA,CD11BJ,sEC01BI,kDAAA,CAAA,kDAAA,CAAA,kDAAA,CAAA,sDAAA,CDt1BJ,6DCs1BI,qDAAA,CAAA,oDAAA,CAAA,wDAAA,CAAA,6DAAA,CDl1BJ,wDACE,aDZQ,CCeV,8DC80BI,wDAAA,CAAA,uDAAA,CAAA,2DAAA,CAAA,gEAAA,CD10BJ,yDACE,aDpBQ,CGDV,oEACE,YAAA,CACA,+BAAA,CACA,cAAA,CACA,WAAA,CACA,QAAA,CACA,QAAA,CACA,MAAA,CACA,YAAA,CACA,wBCqCQ,CDlCV,4DACE,YAAA,CACA,mCAAA,CACA,iBAAA,CAGF,6DACE,wBC0BQ,CDzBR,YEOW,CFNX,aHzBM,CG4BR,8EACE,uBAAA,CAGF,oFACE,uBAAA,CAGF,kEACE,YAAA,CACA,sBAAA,CACA,kBAAA,CACA,WAAA,CAEA,sEACE,aAAA,CACA,cAAA,CAGF,8HACE,SAAA,CACA,UAAA,CAIJ,iFACE,YHtDM,CGyDR,8KAEE,YHvDM,CG0DR,mEACE,gBE1CW,CF6Cb,2DACE,cAAA",sourceRoot:""}]),c.locals={productiveHeading02:"-esm-patient-attachments__image-preview__productiveHeading02___DnnIy",productiveHeading03:"-esm-patient-attachments__image-preview__productiveHeading03___GsFyn",bodyLong01:"-esm-patient-attachments__image-preview__bodyLong01___Q40bX",muted:"-esm-patient-attachments__image-preview__muted___WE5Ya",bodyShort01:"-esm-patient-attachments__image-preview__bodyShort01___PHUjM",text02:"-esm-patient-attachments__image-preview__text02___PVnVl",attachmentPreview:"-esm-patient-attachments__image-preview__attachmentPreview___t9OCa",leftPanel:"-esm-patient-attachments__image-preview__leftPanel___s4n1k",rightPanel:"-esm-patient-attachments__image-preview__rightPanel___Jelx0",closePreviewButton:"-esm-patient-attachments__image-preview__closePreviewButton___MEGNO",attachmentImage:"-esm-patient-attachments__image-preview__attachmentImage___HFIGm",pdfViewer:"-esm-patient-attachments__image-preview__pdfViewer___Rjspw",overflowMenu:"-esm-patient-attachments__image-preview__overflowMenu___Dd8qn",imageDescription:"-esm-patient-attachments__image-preview__imageDescription___L0eMQ",menuItem:"-esm-patient-attachments__image-preview__menuItem___eTJ3q"};const r=c},8766:(e,t,a)=>{"use strict";a.r(t),a.d(t,{attachmentsOverview:()=>oe,attachmentsSummaryResultsDashboard:()=>Ae,capturePhotoModal:()=>me,capturePhotoWidget:()=>_e,deleteAttachmentModal:()=>le,importTranslation:()=>ne,startupApp:()=>se});var n=a(5448),i=a(2870),s={fileSize:{_type:i.Type.Number,_description:"Max file size limit to upload (in MB)",_default:1}},c=a(7900),r=a.n(c),o=a(4924),A=a(4550),m=a(6484),_=a(833),l=a(8871),d=a(7326),h=a(2779),p=a.n(h),u=a(321),g=a.n(u),v=a(1195),C=a.n(v),b=a(3275),f=a.n(b),w=a(7162),y=a.n(w),E=a(2094),D=a.n(E),k=a(757),B=a.n(k),x=a(7649),I={};I.styleTagTransform=B(),I.setAttributes=y(),I.insert=f().bind(null,"head"),I.domAPI=C(),I.insertStyleElement=D(),g()(x.Z,I);const P=x.Z&&x.Z.locals?x.Z.locals:void 0;var T=a(5362);function S(e){return r().createElement("div",{className:P.thumbnail},r().createElement(z,e))}function F(e){return r().createElement("div",{className:P.imageThumbnail,role:"button",tabIndex:0,onClick:null==e?void 0:e.onClick},r().createElement("img",{src:e.src,alt:e.title,style:e.style}))}function H(e){return r().createElement("div",{className:P.pdfThumbnail,onClick:e.onClick,role:"button",tabIndex:0},r().createElement(T.Lk,{size:24}))}function O(e){return r().createElement("div",{className:P.pdfThumbnail,onClick:e.onClick,role:"button",tabIndex:0},r().createElement(T.Qf,{size:24}))}function z(e){var t,a=e.item.bytesContentFamily,n={src:e.imageProps.src,title:e.imageProps.title,style:e.imageProps.style,onClick:null===(t=e.imageProps)||void 0===t?void 0:t.onClick};return"IMAGE"===a?r().createElement(F,n):"PDF"===a?r().createElement(H,n):r().createElement(O,n)}var N=a(3675),j={};j.styleTagTransform=B(),j.setAttributes=y(),j.insert=f().bind(null,"head"),j.domAPI=C(),j.insertStyleElement=D(),g()(N.Z,j);const L=N.Z&&N.Z.locals?N.Z.locals:void 0,M=function(e){var t=e.attachments,a=e.isLoading,n=e.openAttachment;return a?r().createElement("div",{className:L.galleryContainer},r().createElement(A.uKo,{className:L.attachmentThumbnailSkeleton}),r().createElement(A.uKo,{className:L.attachmentThumbnailSkeleton}),r().createElement(A.uKo,{className:L.attachmentThumbnailSkeleton}),r().createElement(A.uKo,{className:L.attachmentThumbnailSkeleton})):r().createElement("div",{className:L.galleryContainer},t.map((function(e,t){var a={src:e.src,title:e.title,style:{},onClick:function(){n(e)}},i={id:e.id,dateTime:e.dateTime,bytesMimeType:e.bytesMimeType,bytesContentFamily:e.bytesContentFamily};return r().createElement("div",{key:t},r().createElement(S,{imageProps:a,item:i}),r().createElement("p",{className:L.bodyLong01},e.title),r().createElement("p",{className:p()(L.bodyLong01,L.muted)},e.dateTime))})))};var G=a(5065),Q={};Q.styleTagTransform=B(),Q.setAttributes=y(),Q.insert=f().bind(null,"head"),Q.domAPI=C(),Q.insertStyleElement=D(),g()(G.Z,Q);const Z=G.Z&&G.Z.locals?G.Z.locals:void 0;function q(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}const W=function(e){var t=e.attachments,a=e.isLoading,n=e.deleteAttachment,s=e.openAttachment,m=(0,o.useTranslation)().t,_=(0,i.useLayoutType)(),l="tablet"===_,d="small-desktop"===_||"large-desktop"===_,h=(0,c.useMemo)((function(){return t.map((function(e){return{id:e.id,fileName:r().createElement("span",{role:"button",tabIndex:0,className:Z.link,onClick:function(){return s(e)}},e.title),type:e.bytesContentFamily,dateUploaded:e.dateTime}}))}),[t,s]),p=(0,c.useMemo)((function(){return[{key:"fileName",header:m("fileName","File name"),colSpan:1},{key:"type",header:m("type","Type"),colSpan:1},{key:"dateUploaded",header:m("dateUploaded","Date uploaded"),colSpan:2}]}),[m]);return a?r().createElement("div",{className:Z.attachmentTable},r().createElement(A.gqd,{className:Z.dataTableSkeleton,compact:d,zebra:!0})):r().createElement(A.xJi,null,r().createElement(A.wQF,{rows:h,headers:p,size:l?"lg":"sm",overflowMenuOnHover:d},(function(e){var a=e.rows,i=e.headers,s=e.getHeaderProps,c=e.getTableProps;return r().createElement(A.iA_,function(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a.push.apply(a,n)}return a}(Object(t)).forEach((function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(t,a))})),e}(function(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{},n=Object.keys(a);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(a).filter((function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable})))),n.forEach((function(t){q(e,t,a[t])}))}return e}({},c()),{useZebraStyles:!0}),r().createElement(A.ssF,null,r().createElement(A.SCH,null,i.map((function(e){var t,a;return r().createElement(A.xDH,s({header:e,isSortable:e.isSortable,colSpan:e.colSpan}),null!==(a=null===(t=e.header)||void 0===t?void 0:t.content)&&void 0!==a?a:e.header)})))),r().createElement(A.RMI,null,a.map((function(e,a){return r().createElement(A.SCH,{key:e.id},e.cells.map((function(e){var t,a;return r().createElement(A.pj1,{key:e.id},null!==(a=null===(t=e.value)||void 0===t?void 0:t.content)&&void 0!==a?a:e.value)})),r().createElement(A.pj1,{className:"cds--table-column-menu"},r().createElement(A.PQB,{size:l?"lg":"sm",flipped:!0,align:"left"},r().createElement(A.laM,{itemText:m("delete","Delete"),isDelete:!0,onClick:function(){return n(t[a])}}))))}))))})))};var J=a(6581),U=a(2415),V={};V.styleTagTransform=B(),V.setAttributes=y(),V.insert=f().bind(null,"head"),V.domAPI=C(),V.insertStyleElement=D(),g()(U.Z,V);const Y=U.Z&&U.Z.locals?U.Z.locals:void 0,R=function(e){var t=e.closePreview,a=e.attachmentToPreview,n=e.deleteAttachment,s=(0,o.useTranslation)().t,m="tablet"===(0,i.useLayoutType)();return(0,c.useEffect)((function(){var e=function(e){"Escape"==e.key&&t()};return window.addEventListener("keydown",e),function(){window.removeEventListener("keydown",e)}}),[t]),r().createElement("div",{className:Y.attachmentPreview},r().createElement("div",{className:Y.leftPanel},r().createElement(A.zxk,{iconDescription:s("closePreview","Close preview"),label:s("closePreview","Close preview"),kind:"ghost",size:"md",className:Y.closePreviewButton,hasIconOnly:!0,renderIcon:J.x8,onClick:t}),r().createElement("div",{className:Y.attachmentImage},"IMAGE"===a.bytesContentFamily?r().createElement("img",{src:a.src,alt:a.title}):"PDF"===a.bytesContentFamily?r().createElement("iframe",{title:"PDFViewer",className:Y.pdfViewer,src:a.src}):null),r().createElement("div",{className:Y.overflowMenu},r().createElement(A.PQB,{className:Y.overflowMenu,flipped:!0,size:m?"lg":"md"},r().createElement(A.laM,{className:Y.menuItem,hasDivider:!0,isDelete:!0,itemText:s("deleteImage","Delete image"),onClick:function(){return n(a)}})))),r().createElement("div",{className:Y.rightPanel},r().createElement("h4",{className:Y.productiveHeading02},a.title),(null==a?void 0:a.description)?r().createElement("p",{className:p()(Y.bodyLong01,Y.imageDescription)},a.description):null))};var K=a(7717),X={};X.styleTagTransform=B(),X.setAttributes=y(),X.insert=f().bind(null,"head"),X.domAPI=C(),X.insertStyleElement=D(),g()(K.Z,X);const $=K.Z&&K.Z.locals?K.Z.locals:void 0;function ee(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 te(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,i,s=[],c=!0,r=!1;try{for(a=a.call(e);!(c=(n=a.next()).done)&&(s.push(n.value),!t||s.length!==t);c=!0);}catch(e){r=!0,i=e}finally{try{c||null==a.return||a.return()}finally{if(r)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ee(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)?ee(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.")}()}function ae(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}var ne=a(3979),ie="@openmrs/esm-patient-attachments-app";function se(){(0,i.defineConfigSchema)(ie,s)}var ce,re,oe=(0,i.getSyncLifecycle)((function(e){var t=e.patientUuid,a=(0,o.useTranslation)().t,s=(0,i.useAttachments)(t,!0),h=s.data,p=s.mutate,u=s.isValidating,g=s.isLoading,v=te((0,c.useState)(null),2),C=v[0],b=v[1],f=(0,c.useMemo)((function(){return h.map((function(e){return(0,d.H)(e)}))}),[h]),w=te((0,c.useState)(!1),2),y=w[0],E=w[1],D=te((0,c.useState)("grid"),2),k=D[0],B=D[1],x="tablet"===(0,i.useLayoutType)(),I=(0,c.useCallback)((function(){return b(null)}),[b]);(0,c.useEffect)((function(){!0===y&&((0,i.showSnackbar)({isLowContrast:!0,kind:"error",subtitle:a("fileUnsupported","File uploaded is not supported"),title:a("errorUploading","Error uploading a file")}),E(!1))}),[y,a]);var P=(0,c.useCallback)((function(){var e=(0,i.showModal)("capture-photo-modal",{saveFile:function(e){return(0,i.createAttachment)(t,e)},closeModal:function(){e()},onCompletion:function(){return p()},multipleFiles:!0,collectDescription:!0,allowedExtensions:["image/jpeg","image/png","image/webp"]})}),[t,p]),T=(0,c.useCallback)((function(e){(0,i.deleteAttachmentPermanently)(e.id,new AbortController).then((function(){p(),b(null),(0,i.showSnackbar)({title:a("fileDeleted","File deleted"),subtitle:"".concat(e.title," ").concat(a("successfullyDeleted","successfully deleted")),kind:"success",isLowContrast:!0})})).catch((function(t){(0,i.showSnackbar)({title:a("error","Error"),subtitle:"".concat(e.title," ").concat(a("failedDeleting","couldn't be deleted")),kind:"error"})}))}),[p,a,b]),S=(0,c.useCallback)((function(e){var t=(0,i.showModal)("delete-attachment-modal",{attachment:e,close:function(){return t()},onConfirmation:function(e){T(e),t()}})}),[T]),F=(0,c.useCallback)((function(e){if("IMAGE"===e.bytesContentFamily||"PDF"===e.bytesContentFamily)b(e);else{var t=document.createElement("a");t.setAttribute("href",e.src),t.setAttribute("download",e.title),t.click()}}),[b]);return f.length?r().createElement(i.UserHasAccess,{privilege:"View Attachments"},r().createElement("div",{onDragOverCapture:P,className:$.overview},r().createElement("div",{id:"container"},r().createElement(n.CardHeader,{title:a("attachments","Attachments")},r().createElement("div",{className:$.validatingDataIcon},u&&r().createElement(A.gbz,{withOverlay:!1,small:!0})),r().createElement("div",{className:$.attachmentHeaderActionItems},r().createElement(A.GHR,{onChange:function(e){return B("".concat(e.name))},size:x?"md":"sm"},r().createElement(A.rsf,{name:"grid"},r().createElement(m.lG,{size:16})),r().createElement(A.rsf,{name:"tabular"},r().createElement(_.aV,{size:16}))),r().createElement("div",{className:$.divider}),r().createElement(A.zxk,{kind:"ghost",renderIcon:l.mm,iconDescription:"Add attachment",onClick:P},a("add","Add")))),"grid"===k?r().createElement(M,{openAttachment:F,deleteAttachment:S,isLoading:g,attachments:f}):r().createElement(W,{openAttachment:F,deleteAttachment:S,isLoading:g,attachments:f}))),C&&r().createElement(R,{closePreview:I,attachmentToPreview:C,deleteAttachment:S})):r().createElement(n.EmptyState,{displayText:a("attachmentsInLowerCase","attachments"),headerTitle:a("attachmentsInProperFormat","Attachments"),launchForm:P})}),{featureName:"patient-attachments",moduleName:ie}),Ae=(0,i.getSyncLifecycle)((0,n.createDashboardLink)((ce=function(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{},n=Object.keys(a);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(a).filter((function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable})))),n.forEach((function(t){ae(e,t,a[t])}))}return e}({},{slot:"patient-chart-attachments-dashboard-slot",columns:1,path:"Attachments",title:"Attachments"}),re=null!=(re={moduleName:ie})?re:{},Object.getOwnPropertyDescriptors?Object.defineProperties(ce,Object.getOwnPropertyDescriptors(re)):function(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a.push.apply(a,n)}return a}(Object(re)).forEach((function(e){Object.defineProperty(ce,e,Object.getOwnPropertyDescriptor(re,e))})),ce)),{featureName:"attachments-dashboard-link",moduleName:ie}),me=(0,i.getAsyncLifecycle)((function(){return Promise.all([a.e(813),a.e(28)]).then(a.bind(a,1028))}),{featureName:"capture-photo-modal",moduleName:ie}),_e=(0,i.getAsyncLifecycle)((function(){return a.e(887).then(a.bind(a,2887))}),{featureName:"capture-photo-widget",moduleName:ie}),le=(0,i.getAsyncLifecycle)((function(){return a.e(845).then(a.bind(a,4845))}),{featureName:"delete-attachment-modal",moduleName:ie})},7326:(e,t,a)=>{"use strict";a.d(t,{H:()=>s,Z:()=>i});var n=a(2870);function i(e){return new Promise((function(t){if(e){var a=new FileReader;a.addEventListener("load",(function(){"string"==typeof a.result?t(a.result):t("")})),a.addEventListener("error",(function(){t("")})),a.readAsDataURL(e)}else t("")}))}function s(e){return{id:e.uuid,src:"".concat(window.openmrsBase).concat(n.attachmentUrl,"/").concat(e.uuid,"/bytes"),title:e.comment,description:"",dateTime:(0,n.formatDate)(new Date(e.dateTime),{mode:"wide"}),bytesMimeType:e.bytesMimeType,bytesContentFamily:e.bytesContentFamily}}},3979:(e,t,a)=>{var n={"./am.json":[8788,788],"./ar.json":[4460,460],"./en.json":[3574,574],"./es.json":[8319,319],"./fr.json":[2757,757],"./he.json":[5833,833],"./km.json":[7807,807],"./zh.json":[8271,271],"./zh_CN.json":[1644,644]};function i(e){if(!a.o(n,e))return Promise.resolve().then((()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=n[e],i=t[0];return a.e(t[1]).then((()=>a(i)))}i.keys=()=>Object.keys(n),i.id=3979,e.exports=i}}]);
|