@openmrs/esm-openconceptlab-app 3.0.1-pre.16 → 3.0.1-pre.17

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.
File without changes
package/dist/251.js CHANGED
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_openmrs_esm_openconceptlab_app=self.webpackChunk_openmrs_esm_openconceptlab_app||[]).push([[251],{3749:(e,t,n)=>{n.r(t),n.d(t,{default:()=>xe});var r=n(7730),o=n(268),a=n.n(o),i=n(4924),c=n(9857),s=n(5047),l=n.n(s),u=n(906),p=n(9140);function d(e,t,n,r,o,a,i){try{var c=e[a](i),s=c.value}catch(e){return void n(e)}c.done?t(s):Promise.resolve(s).then(r,o)}function m(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){d(a,r,o,i,c,"next",e)}function c(e){d(a,r,o,i,c,"throw",e)}i(void 0)}))}}function b(e,t){return f.apply(this,arguments)}function f(){return(f=m(l().mark((function e(t,n){var r;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=(0,p.Z)(t.uuid)?"/ws/rest/v1/openconceptlab/subscription":"/ws/rest/v1/openconceptlab/subscription/".concat(t.uuid),e.abrupt("return",(0,u.openmrsFetch)(r,{method:"POST",body:t,headers:{"Content-Type":"application/json"},signal:null==n?void 0:n.signal}));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function _(e,t){return g.apply(this,arguments)}function g(){return(g=m(l().mark((function e(t,n){var r;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r="/ws/rest/v1/openconceptlab/subscription/".concat(t.uuid),e.abrupt("return",(0,u.openmrsFetch)(r,{method:"DELETE",signal:null==n?void 0:n.signal}));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var h=n(6062),v=n.n(h),y=n(4036),E=n.n(y),w=n(6793),S=n.n(w),k=n(7892),N=n.n(k),x=n(1173),T=n.n(x),C=n(2464),O=n.n(C),P=n(7542),A={};A.styleTagTransform=O(),A.setAttributes=N(),A.insert=S().bind(null,"head"),A.domAPI=E(),A.insertStyleElement=T(),v()(P.Z,A);const D=P.Z&&P.Z.locals?P.Z.locals:void 0;var I=function(e){var t,n,r;e.endsWith("/")&&(e=e.substring(0,e.lastIndexOf("/")));try{n=new URL(e)}catch(e){return!1}return 5==(null!==(r=null===(t=n.pathname.match(/\//g))||void 0===t?void 0:t.length)&&void 0!==r?r:0)};function F(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function j(e,t,n,r,o,a,i){try{var c=e[a](i),s=c.value}catch(e){return void n(e)}c.done?t(s):Promise.resolve(s).then(r,o)}function Z(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){j(a,r,o,i,c,"next",e)}function c(e){j(a,r,o,i,c,"throw",e)}i(void 0)}))}}function H(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function z(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){H(e,t,n[t])}))}return e}function L(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}function B(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a=[],i=!0,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){c=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(c)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return F(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?F(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const R=function(){var e=(0,i.useTranslation)().t,t=(0,c.kY)().mutate,n=B((0,o.useState)(""),2),s=n[0],p=n[1],d=B((0,o.useState)(""),2),m=d[0],f=d[1],g=B((0,o.useState)(!1),2),h=g[0],v=g[1],y=B((0,o.useState)("FULL"),2),E=y[0],w=y[1],S=B((0,o.useState)(!1),2),k=S[0],N=S[1],x=function(){var e,t=(0,c.ZP)("/ws/rest/v1/openconceptlab/subscription?v=full",u.openmrsFetch),n=t.data,r=t.error,o=t.isValidating;return{data:null==n||null===(e=n.data)||void 0===e?void 0:e.results[0],isLoading:!n&&!r,isError:r,isValidating:o}}(),T=x.data,C=x.isLoading,O=x.isError;(0,o.useEffect)((function(){C||O||(p((null==T?void 0:T.url)||""),f((null==T?void 0:T.token)||""),v((null==T?void 0:T.subscribedToSnapshot)||!1),w((null==T?void 0:T.validationType)||"FULL"),N(!!T&&I(T.url)))}),[C,O,T]);var P,A=(0,o.useCallback)((function(e){p(e.target.value),I(e.target.value)?(N(!0),v(!1)):N(!1)}),[]),F=(0,o.useCallback)((function(e){f(e.target.value)}),[]),j=(0,o.useCallback)((function(e,t){var n=t.checked;t.id,w(n?"NONE":"FULL")}),[]),H=(0,o.useCallback)((function(e,t){var n=t.checked;t.id,v(n)}),[]),R=(0,o.useCallback)((P=Z(l().mark((function n(r){var o,a,i;return l().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(r.preventDefault(),r.stopPropagation(),!k||!h){n.next=5;break}return(0,u.showNotification)({kind:"error",description:e("snapshotDisabledError","You cannot subscribe to a SNAPSHOT if you've provided the collection version")}),n.abrupt("return");case 5:return o=new AbortController,a=L(z({},T),{url:s,token:m,validationType:E,subscribedToSnapshot:h}),t("/ws/rest/v1/openconceptlab/subscription?v=full",a,!1),n.next=10,b(a,o);case 10:return i=n.sent,t("/ws/rest/v1/openconceptlab/subscription?v=full"),i.ok?(0,u.showNotification)({kind:"success",description:e(201===i.status?"subscriptionCreated":"subscriptionUpdated",201===i.status?"Subscription created successfully":"Subscription updated successfully")}):(0,u.showNotification)({title:e("errorSavingSubscription","Error occured while saving the subscription"),kind:"error",critical:!0,description:JSON.stringify(i.data)}),n.abrupt("return",(function(){return o.abort()}));case 14:case"end":return n.stop()}}),n)}))),function(e){return P.apply(this,arguments)}),[s,m,E,h,k,T,e,t]),U=(0,o.useCallback)((function(){p((null==T?void 0:T.url)||""),f((null==T?void 0:T.token)||""),v((null==T?void 0:T.subscribedToSnapshot)||!1),w((null==T?void 0:T.validationType)||"FULL"),N(!!T&&I(T.url)),(0,u.showNotification)({kind:"info",description:e("cancelledChanges","Cancelled changes successfully")})}),[T,e]),M=(0,o.useCallback)(function(){var n=Z(l().mark((function n(r){var o,a;return l().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r.preventDefault(),r.stopPropagation(),o=new AbortController,n.next=5,_(T,o);case 5:return a=n.sent,t("/ws/rest/v1/openconceptlab/subscription?v=full"),204===a.status?(p(""),f(""),v(!1),w("FULL"),N(!1),(0,u.showNotification)({kind:"success",description:e("subscriptionDeleted","Successfully unsubscribed")})):(0,u.showNotification)({title:e("errorDeletingSubscription","Error occured while deleting the subscription"),kind:"error",critical:!0,description:JSON.stringify(a.data)}),n.abrupt("return",(function(){return o.abort()}));case 9:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}(),[T,e,t]);return C?a().createElement(r.rjZ,{className:D.grid},a().createElement(r.sgG,{sm:4,md:8,lg:10},a().createElement(r.l09,null,a().createElement(r.N2B,{className:D.productiveHeading03}),a().createElement(r.Kqy,{gap:5},a().createElement(r.znL,null),a().createElement(r.znL,null),a().createElement(r.cwH,{legendText:a().createElement(r.N2B,{width:"75px"}),className:D.formGroup},a().createElement(r.jJq,null),a().createElement(r.jJq,null))),a().createElement(r.Db,null),a().createElement(r.Db,null)),a().createElement(r.l09,{className:D.unsubscribeForm},a().createElement(r.N2B,{className:D.productiveHeading03}),a().createElement(r.N2B,{className:D.unsubscribeText}),a().createElement(r.Db,null)))):(O&&(0,u.showNotification)({kind:"error",description:e("subscriptionError","Error occured while fetching the subscription")}),a().createElement(r.rjZ,{className:D.grid},a().createElement(r.sgG,{sm:4,md:8,lg:10},a().createElement(r.l09,{onSubmit:R},a().createElement("h3",{className:D.productiveHeading03},e("setupSubscription","Setup Subscription")),a().createElement(r.Kqy,{gap:5},a().createElement(r.oil,{id:"subscriptionUrl",type:"url",labelText:e("subscriptionUrl","Subscription URL"),placeholder:"https://api.openconceptlab.org/orgs/organization-name/collections/dictionary-name",value:s,onChange:A,light:!0,required:!0}),a().createElement(r.oil,{id:"apiToken",type:"password",placeholder:"••••••••••••••••••••••••••••••••••••••••••••••••",labelText:e("apiToken","Token"),value:m,onChange:F,light:!0,required:!0}),a().createElement(r.cwH,{legendText:e("advancedOptions","Advanced Options"),className:D.formGroup},a().createElement(r.XZJ,{checked:h,onChange:H,labelText:e("subscribeToSnapshotText","Subscribe to SNAPSHOT versions (not recommended)"),id:"isSubscribedToSnapshot",disabled:k}),a().createElement(r.XZJ,{checked:"NONE"===E,onChange:j,labelText:e("disableValidationText","Disable validation (should be used with care for well curated collections or sources)"),id:"isValidationDisabled"}))),a().createElement(r.zxk,{kind:"secondary",onClick:U},e("cancelButton","Cancel changes")),a().createElement(r.zxk,{kind:"primary",type:"submit"},e("subscribeButton","Save changes"))),a().createElement(r.l09,{onSubmit:M,className:D.unsubscribeForm},a().createElement("h3",{className:D.productiveHeading03},e("unsubscribe","Unsubscribe")),a().createElement("p",{className:D.unsubscribeText},e("unsubscribeInfo","If you unsubscribe, no concepts will be deleted nor changed. All information about subscription will be deleted from your system.")),a().createElement(r.zxk,{kind:"danger",type:"submit",disabled:!T},e("unsubscribeButton","Unsubscribe"))))))};var U=n(302),M={};M.styleTagTransform=O(),M.setAttributes=N(),M.insert=S().bind(null,"head"),M.domAPI=E(),M.insertStyleElement=T(),v()(U.Z,M);const G=U.Z&&U.Z.locals?U.Z.locals:void 0;var V=n(3111),K={};K.styleTagTransform=O(),K.setAttributes=N(),K.insert=S().bind(null,"head"),K.domAPI=E(),K.insertStyleElement=T(),v()(V.Z,K);const J=V.Z&&V.Z.locals?V.Z.locals:void 0;function X(e,t,n,r,o,a,i){try{var c=e[a](i),s=c.value}catch(e){return void n(e)}c.done?t(s):Promise.resolve(s).then(r,o)}function q(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){X(a,r,o,i,c,"next",e)}function c(e){X(a,r,o,i,c,"throw",e)}i(void 0)}))}}function Y(e){return W.apply(this,arguments)}function W(){return(W=q(l().mark((function e(t){return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,u.openmrsFetch)("/ws/rest/v1/openconceptlab/import",{method:"POST",body:{},headers:{"Content-Type":"application/json"},signal:null==t?void 0:t.signal}));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function $(e,t){return Q.apply(this,arguments)}function Q(){return(Q=q(l().mark((function e(t,n){var r;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=new FormData).append("file",t),e.abrupt("return",(0,u.openmrsFetch)("/ws/rest/v1/openconceptlab/import",{method:"POST",body:r,signal:null==n?void 0:n.signal}));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ee(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function te(e,t,n,r,o,a,i){try{var c=e[a](i),s=c.value}catch(e){return void n(e)}c.done?t(s):Promise.resolve(s).then(r,o)}function ne(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){te(a,r,o,i,c,"next",e)}function c(e){te(a,r,o,i,c,"throw",e)}i(void 0)}))}}function re(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a=[],i=!0,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){c=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(c)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ee(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?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.")}()}const oe=function(){var e=(0,i.useTranslation)().t,t=re((0,o.useState)(!1),2),n=t[0],s=t[1],p=re((0,o.useState)(),2),d=p[0],m=p[1],b=function(){var e,t=(0,c.ZP)("/ws/rest/v1/openconceptlab/subscription?v=full",u.openmrsFetch),n=t.data,r=t.error,o=t.isValidating;return{data:null==n||null===(e=n.data)||void 0===e?void 0:e.results[0],isLoading:!n&&!r,isError:r,isValidating:o}}(),f=b.data,_=b.isLoading,g=b.isError;(0,o.useEffect)((function(){_||g||s(!!f)}),[_,g,f]);var h,v=(0,o.useCallback)((function(t,n){var r=n.addedFiles[0];"application/zip"!==r.type?(0,u.showNotification)({kind:"error",description:e("fileFormatError","Only .zip files are allowed")}):m(r)}),[e]),y=(0,o.useCallback)((function(){m(null)}),[]),E=(0,o.useCallback)((h=ne(l().mark((function t(r){var o;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r.preventDefault(),r.stopPropagation(),n){t.next=5;break}return(0,u.showNotification)({kind:"error",description:e("noSubscriptionError","No saved subscription")}),t.abrupt("return");case 5:return o=new AbortController,t.next=8,Y(o);case 8:201===t.sent.status?(0,u.showNotification)({kind:"success",description:e("importSuccess","Import started successfully")}):(0,u.showNotification)({kind:"error",description:e("importFailed","Import failed")});case 10:case"end":return t.stop()}}),t)}))),function(e){return h.apply(this,arguments)}),[n,e]),w=(0,o.useCallback)(function(){var t=ne(l().mark((function t(n){var r;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n.preventDefault(),n.stopPropagation(),d){t.next=5;break}return(0,u.showNotification)({kind:"error",description:e("noFileSelected","No file selected")}),t.abrupt("return");case 5:return r=new AbortController,t.next=8,$(d,r);case 8:201===t.sent.status?(m(null),(0,u.showNotification)({kind:"success",description:e("importSuccess","Import started successfully")})):(0,u.showNotification)({kind:"error",description:e("importFailed","Import failed")});case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),[d,e]);return _?a().createElement(r.rjZ,{className:J.grid},a().createElement(r.sgG,{sm:4,md:8,lg:10},a().createElement(r.l09,null,a().createElement(r.N2B,{className:J.productiveHeading03,heading:!0}),a().createElement(r.N2B,{className:J.formText,paragraph:!0,lineCount:2}),a().createElement(r.Db,null)),a().createElement(r.l09,{className:J.form},a().createElement(r.N2B,{className:J.productiveHeading03,heading:!0}),a().createElement(r.N2B,{className:J.formText}),a().createElement(r.rhD,{style:{marginBottom:"1.5rem"}}),a().createElement(r.Db,null)))):(g&&(0,u.showNotification)({kind:"error",description:e("subscriptionError","Error occured while fetching the subscription")}),a().createElement(r.rjZ,{className:J.grid},a().createElement(r.sgG,{sm:4,md:8,lg:10},a().createElement(r.l09,{onSubmit:E},a().createElement("h3",{className:J.productiveHeading03},e("importConcepts","Import Concepts")),a().createElement("p",{className:J.formText},e("importInstructions","Avoid importing during data entry hours, because the operation may significantly slow down the system. You can either use the subscription or a zip file to import concepts.")),a().createElement(r.zxk,{kind:"primary",type:"submit",disabled:!n},e("importFromSubscription","Import from Subscription"))),a().createElement(r.l09,{className:J.form,onSubmit:w},a().createElement("h3",{className:J.productiveHeading03},e("importFromFileHeading","Import from file (Offline)")),a().createElement("p",{className:J.formText},e("importFromFileInfo","You can import data without setting up a subscription by using this option.")),d?a().createElement(r.Py3,{key:d.name,name:d.name,size:"default",status:"edit",iconDescription:e("fileAdded","File Added"),onDelete:y,style:{backgroundColor:"#e0e0e0"}}):a().createElement(r.awp,{accept:["application/zip"],multiple:!0,labelText:e("importFromFileDragInfo","Drag and drop file here or click to upload"),onAddFiles:v,style:{marginBottom:"1.5rem"}}),a().createElement(r.zxk,{kind:"primary",type:"submit"},e("importFromFile","Import from file"))))))};var ae=n(2258),ie={};ie.styleTagTransform=O(),ie.setAttributes=N(),ie.insert=S().bind(null,"head"),ie.domAPI=E(),ie.insertStyleElement=T(),v()(ae.Z,ie);const ce=ae.Z&&ae.Z.locals?ae.Z.locals:void 0;var se=n(385),le={};le.styleTagTransform=O(),le.setAttributes=N(),le.insert=S().bind(null,"head"),le.domAPI=E(),le.insertStyleElement=T(),v()(se.Z,le);const ue=se.Z&&se.Z.locals?se.Z.locals:void 0;function pe(e,t,n,r,o,a,i){try{var c=e[a](i),s=c.value}catch(e){return void n(e)}c.done?t(s):Promise.resolve(s).then(r,o)}function de(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){pe(a,r,o,i,c,"next",e)}function c(e){pe(a,r,o,i,c,"throw",e)}i(void 0)}))}}function me(e,t){return be.apply(this,arguments)}function be(){return(be=de(l().mark((function e(t,n){var r;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r="/ws/rest/v1/openconceptlab/import/".concat(t,"/item?state=ERROR&v=full"),e.abrupt("return",(0,u.openmrsFetch)(r,{method:"GET",signal:null==n?void 0:n.signal}));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var fe=n(8850),_e={};_e.styleTagTransform=O(),_e.setAttributes=N(),_e.insert=S().bind(null,"head"),_e.domAPI=E(),_e.insertStyleElement=T(),v()(fe.Z,_e);const ge=fe.Z&&fe.Z.locals?fe.Z.locals:void 0;function he(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ve(e,t,n,r,o,a,i){try{var c=e[a](i),s=c.value}catch(e){return void n(e)}c.done?t(s):Promise.resolve(s).then(r,o)}function ye(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a=[],i=!0,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){c=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(c)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return he(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?he(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const Ee=function(e){var t,n,c=e.importUuid,s=(0,i.useTranslation)().t,p=ye((0,o.useState)(),2),d=p[0],m=p[1],b=ye((0,o.useState)(5),2),f=b[0],_=b[1],g=ye((0,o.useState)([]),2),h=g[0],v=g[1],y=(0,u.usePagination)(h,f),E=y.results,w=y.currentPage,S=y.goTo,k=(0,o.useCallback)((t=l().mark((function e(t){var n,r;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return m(!0),n=new AbortController,e.next=4,me(t,n);case 4:return(r=e.sent).ok?v(r.data.results):(0,u.showNotification)({title:s("importItemsFetchError","Error occured while fetching the import items"),kind:"error",critical:!0,description:JSON.stringify(r.data)}),m(!1),e.abrupt("return",(function(){return n.abort()}));case 8:case"end":return e.stop()}}),e)})),n=function(){var e=this,n=arguments;return new Promise((function(r,o){var a=t.apply(e,n);function i(e){ve(a,r,o,i,c,"next",e)}function c(e){ve(a,r,o,i,c,"throw",e)}i(void 0)}))},function(e){return n.apply(this,arguments)}),[s]);if((0,o.useEffect)((function(){k(c)}),[k,c]),d)return a().createElement("div",null,a().createElement(r.gqd,{showHeader:!1,showToolbar:!1,columnCount:2}),a().createElement(r.F3O,null));var N=[{header:s("conceptOrMapping","Concept/Mapping"),key:"uuid"},{header:s("message","Message"),key:"errorMessage"}];return!d&&a().createElement("div",null,a().createElement(r.iA_,{size:"sm",className:ge.tableBordered},a().createElement(r.ssF,null,a().createElement(r.SCH,{className:ge.tableHeaderRow},N.map((function(e,t){return a().createElement(r.xDH,{key:t,isSortable:!0},e.header)})))),a().createElement(r.RMI,null,null==E?void 0:E.map((function(e){return a().createElement(o.Fragment,{key:e.uuid},a().createElement(r.SCH,{className:ge.tableDataRow},a().createElement(r.pj1,null,a().createElement(r.rUS,{href:e.versionUrl},e.type," ",e.uuid)),a().createElement(r.pj1,null,e.errorMessage)))})))),a().createElement(r.tlE,{className:ge.pagination,size:"sm",page:w,pageSize:f,pageSizes:[5,10,20,50,100],totalItems:null==h?void 0:h.length,onChange:function(e){var t=e.page,n=e.pageSize;S(t),_(n)}}))},we=function(e){var t=e.selectedImportObject,n=(0,i.useTranslation)().t;return a().createElement("div",null,a().createElement("span",{className:ue.heading01},n("startedOn","Started on")," "),a().createElement("span",{className:"body"},(0,u.formatDatetime)(new Date(t.localDateStarted))),a().createElement("br",null),a().createElement("span",{className:ue.heading01},n("completedOn","Completed on")," "),a().createElement("span",{className:"body"},(0,u.formatDatetime)(new Date(t.localDateStopped))),a().createElement("br",null),a().createElement("span",{className:ue.heading01},n("duration","Duration")," "),a().createElement("span",{className:"body"},t.importTime),a().createElement("br",null),a().createElement("br",null),a().createElement("span",{className:ue.heading01},n("result","Result:")," "),a().createElement("br",null),a().createElement("div",{className:"body ".concat(ue.indentedContent)},a().createElement("span",null,t.upToDateItemsCount," ",n("conceptsUpToDate","concepts up to date")),a().createElement("br",null),a().createElement("span",null,t.addedItemsCount," ",n("conceptsAdded","concepts added")),a().createElement("br",null),a().createElement("span",null,t.updatedItemsCount," ",n("conceptsUpdated","concepts updated")),a().createElement("br",null),a().createElement("span",null,t.retiredItemsCount," ",n("conceptsRetired","concepts retired")),a().createElement("br",null),a().createElement("span",null,t.errorItemsCount," ",n("errorsFound","errors found")),a().createElement("br",null),a().createElement("span",null,t.ignoredErrorsCount," ",n("errorsIgnored","errors ignored")),a().createElement("br",null)),a().createElement("br",null),0!=t.errorItemsCount&&a().createElement(Ee,{importUuid:t.uuid}))};function Se(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ke(){return ke=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ke.apply(this,arguments)}const Ne=function(){var e,t,n=(0,i.useTranslation)().t,s=(e=(0,o.useState)(10),t=2,function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a=[],i=!0,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){c=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(c)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Se(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Se(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.")}()),l=s[0],p=s[1],d=function(){var e,t=(0,c.ZP)("/ws/rest/v1/openconceptlab/import?v=full",u.openmrsFetch),n=t.data,r=t.error,o=t.isValidating;return{data:null==n||null===(e=n.data)||void 0===e?void 0:e.results,isLoading:!n&&!r,isError:r,isValidating:o}}(),m=d.data,b=d.isLoading,f=d.isError,_=(0,u.usePagination)(m,l),g=_.results,h=_.currentPage,v=_.goTo;if(b)return a().createElement(r.rjZ,{className:ce.grid},a().createElement(r.sgG,{sm:4,md:8,lg:10},a().createElement(r.N2B,{className:ce.productiveHeading03}),a().createElement(r.gqd,{showHeader:!1,showToolbar:!1,rowCount:10,columnCount:3}),a().createElement(r.F3O,null)));f&&(0,u.showNotification)({kind:"error",description:n("previousImportsFetchError","Error occured while fetching the imports")});var y=[{header:n("dateAndTime","Date and Time"),key:"localDateStarted"},{header:n("duration","Duration"),key:"importTime"},{header:n("status","Status"),key:"status"}],E=null==g?void 0:g.map((function(e){return{id:e.uuid,localDateStarted:(0,u.formatDatetime)(new Date(e.localDateStarted)),importTime:e.importTime,status:e.status}}));return!b&&!f&&a().createElement(r.rjZ,{className:ce.grid},a().createElement(r.sgG,{sm:4,md:8,lg:10},a().createElement("h3",{className:ce.productiveHeading03},n("previousImports","Previous Imports")),a().createElement(r.wQF,{rows:E,headers:y,size:"sm"},(function(e){var t=e.rows,n=e.headers,i=e.getHeaderProps,c=e.getRowProps,s=e.getTableProps;return a().createElement(r.iA_,ke({},s(),{className:ce.tableBordered}),a().createElement(r.ssF,null,a().createElement(r.SCH,null,a().createElement(r.MOD,null),n.map((function(e,t){return a().createElement(r.xDH,ke({key:t},i({header:e})),e.header)})))),a().createElement(r.RMI,null,t.map((function(e){return a().createElement(o.Fragment,{key:e.id},a().createElement(r.RcE,ke({},c({row:e}),{className:ce.tableRow}),e.cells.map((function(e){return a().createElement(r.pj1,{key:e.id},e.value)}))),e.isExpanded&&a().createElement(r.WdL,{colSpan:n.length+1,className:ce.tableExpandedRow},a().createElement(we,{selectedImportObject:m.find((function(t){return t.uuid===e.id}))})))}))))})),a().createElement(r.tlE,{className:ce.pagination,size:"sm",page:h,pageSize:l,pageSizes:[10,20,50,100],totalItems:m.length,onChange:function(e){var t=e.page,n=e.pageSize;v(t),p(n)}})))},xe=function(){var e=(0,i.useTranslation)().t;return a().createElement(c.J$,null,a().createElement("main",{className:"omrs-main-content ".concat(G.main)},a().createElement("h3",{className:G.moduleHeader},e("moduleTitle","OCL Subscription Module")),a().createElement(r.mQc,null,a().createElement(r.tdY,{className:G.tabList,contained:!0},a().createElement(r.OK9,null,e("subscription","Subscription")," "),a().createElement(r.OK9,null,e("import","Import")," "),a().createElement(r.OK9,null,e("previousImports","Previous Imports")," ")),a().createElement(r.nPR,null,a().createElement(r.x45,{className:G.tabPanel},a().createElement(R,null)),a().createElement(r.x45,{className:G.tabPanel},a().createElement(oe,null)),a().createElement(r.x45,{className:G.tabPanel},a().createElement(Ne,null))))))}},3111:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(2609),o=n.n(r)()((function(e){return e[1]}));o.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-openconceptlab__import-component__grid___5wW0H{margin-left:0;margin-right:0;padding-left:0;padding-right:0}.-esm-openconceptlab__import-component__productiveHeading03___m6cC7{font-size:var(--cds-productive-heading-03-font-size, 1.25rem);font-weight:var(--cds-productive-heading-03-font-weight, 400);line-height:var(--cds-productive-heading-03-line-height, 1.4);letter-spacing:var(--cds-productive-heading-03-letter-spacing, 0);margin-bottom:.5rem}.-esm-openconceptlab__import-component__form___BAtOz{margin-top:2rem}.-esm-openconceptlab__import-component__formText___-LFNS{padding-bottom:1rem}.-esm-openconceptlab__import-component__fileUploaderDropContainer___u9wb\\+{margin-bottom:1.5rem}",""]),o.locals={grid:"-esm-openconceptlab__import-component__grid___5wW0H",productiveHeading03:"-esm-openconceptlab__import-component__productiveHeading03___m6cC7",form:"-esm-openconceptlab__import-component__form___BAtOz",formText:"-esm-openconceptlab__import-component__formText___-LFNS",fileUploaderDropContainer:"-esm-openconceptlab__import-component__fileUploaderDropContainer___u9wb+"};const a=o},8850:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(2609),o=n.n(r)()((function(e){return e[1]}));o.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-openconceptlab__import-items-component__pagination___UFodW{font-size:var(--cds-body-short-01-font-size, 0.875rem);font-weight:var(--cds-body-short-01-font-weight, 400);line-height:var(--cds-body-short-01-line-height, 1.28572);letter-spacing:var(--cds-body-short-01-letter-spacing, 0.16px);background-color:#fff;color:#525252;border:1px solid #e0e0e0;display:flex}.-esm-openconceptlab__import-items-component__tableBordered___agwp-{border:1px solid #e0e0e0}.-esm-openconceptlab__import-items-component__tableDataRow___BdXBZ>td{padding-left:1rem !important;background-color:#fff !important}.-esm-openconceptlab__import-items-component__tableHeaderRow___rp03z>th{background-color:#e0e0e0 !important}",""]),o.locals={pagination:"-esm-openconceptlab__import-items-component__pagination___UFodW",tableBordered:"-esm-openconceptlab__import-items-component__tableBordered___agwp-",tableDataRow:"-esm-openconceptlab__import-items-component__tableDataRow___BdXBZ",tableHeaderRow:"-esm-openconceptlab__import-items-component__tableHeaderRow___rp03z"};const a=o},385:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(2609),o=n.n(r)()((function(e){return e[1]}));o.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-openconceptlab__import-overview-component__heading01___wV6-M{font-size:var(--cds-heading-01-font-size, 0.875rem);font-weight:var(--cds-heading-01-font-weight, 600);line-height:var(--cds-heading-01-line-height, 1.42857);letter-spacing:var(--cds-heading-01-letter-spacing, 0.16px)}.-esm-openconceptlab__import-overview-component__indentedContent___kMG5X{margin-left:2rem}",""]),o.locals={heading01:"-esm-openconceptlab__import-overview-component__heading01___wV6-M",indentedContent:"-esm-openconceptlab__import-overview-component__indentedContent___kMG5X"};const a=o},2258:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(2609),o=n.n(r)()((function(e){return e[1]}));o.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-openconceptlab__previous-imports-component__grid___VG\\+Rw{margin-left:0;margin-right:0;padding-left:0;padding-right:0}.-esm-openconceptlab__previous-imports-component__productiveHeading03___-O6sL{font-size:var(--cds-productive-heading-03-font-size, 1.25rem);font-weight:var(--cds-productive-heading-03-font-weight, 400);line-height:var(--cds-productive-heading-03-line-height, 1.4);letter-spacing:var(--cds-productive-heading-03-letter-spacing, 0);margin-bottom:.5rem}.-esm-openconceptlab__previous-imports-component__pagination___JXNSt{font-size:var(--cds-body-short-01-font-size, 0.875rem);font-weight:var(--cds-body-short-01-font-weight, 400);line-height:var(--cds-body-short-01-line-height, 1.28572);letter-spacing:var(--cds-body-short-01-letter-spacing, 0.16px);background-color:#fff;color:#525252;border:1px solid #e0e0e0;display:flex}.-esm-openconceptlab__previous-imports-component__tableBordered___440s3{border:1px solid #e0e0e0}.-esm-openconceptlab__previous-imports-component__tableRow___tM2aj>td{background-color:#fff;border-bottom:1px solid #e0e0e0 !important}.-esm-openconceptlab__previous-imports-component__tableExpandedRow___fQwKD>td{padding-left:3rem !important;padding-right:3rem;padding-top:1rem;padding-bottom:1rem}",""]),o.locals={grid:"-esm-openconceptlab__previous-imports-component__grid___VG+Rw",productiveHeading03:"-esm-openconceptlab__previous-imports-component__productiveHeading03___-O6sL",pagination:"-esm-openconceptlab__previous-imports-component__pagination___JXNSt",tableBordered:"-esm-openconceptlab__previous-imports-component__tableBordered___440s3",tableRow:"-esm-openconceptlab__previous-imports-component__tableRow___tM2aj",tableExpandedRow:"-esm-openconceptlab__previous-imports-component__tableExpandedRow___fQwKD"};const a=o},302:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(2609),o=n.n(r)()((function(e){return e[1]}));o.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-openconceptlab__root-component__main___G0\\+lN{background-color:#fff}.-esm-openconceptlab__root-component__moduleHeader___yB-PY{font-size:var(--cds-productive-heading-03-font-size, 1.25rem);font-weight:var(--cds-productive-heading-03-font-weight, 400);line-height:var(--cds-productive-heading-03-line-height, 1.4);letter-spacing:var(--cds-productive-heading-03-letter-spacing, 0);padding-left:1rem;padding-top:1rem;padding-bottom:1rem}.-esm-openconceptlab__root-component__tabList___aXyg4{padding:0 1rem}.-esm-openconceptlab__root-component__tabPanel___2e0wL{height:100%;background-color:#f4f4f4}",""]),o.locals={main:"-esm-openconceptlab__root-component__main___G0+lN",moduleHeader:"-esm-openconceptlab__root-component__moduleHeader___yB-PY",tabList:"-esm-openconceptlab__root-component__tabList___aXyg4",tabPanel:"-esm-openconceptlab__root-component__tabPanel___2e0wL"};const a=o},7542:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(2609),o=n.n(r)()((function(e){return e[1]}));o.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-openconceptlab__subscription-component__grid___Kwugy{margin-left:0;margin-right:0;padding-left:0;padding-right:0}.-esm-openconceptlab__subscription-component__productiveHeading03___xgZur{font-size:var(--cds-productive-heading-03-font-size, 1.25rem);font-weight:var(--cds-productive-heading-03-font-weight, 400);line-height:var(--cds-productive-heading-03-line-height, 1.4);letter-spacing:var(--cds-productive-heading-03-letter-spacing, 0);margin-bottom:.5rem}.-esm-openconceptlab__subscription-component__formGroup___GmK5h{margin-bottom:1rem}.-esm-openconceptlab__subscription-component__unsubscribeText___B9jCa{padding-bottom:1rem}.-esm-openconceptlab__subscription-component__unsubscribeForm___dMi0v{margin-top:1rem}",""]),o.locals={grid:"-esm-openconceptlab__subscription-component__grid___Kwugy",productiveHeading03:"-esm-openconceptlab__subscription-component__productiveHeading03___xgZur",formGroup:"-esm-openconceptlab__subscription-component__formGroup___GmK5h",unsubscribeText:"-esm-openconceptlab__subscription-component__unsubscribeText___B9jCa",unsubscribeForm:"-esm-openconceptlab__subscription-component__unsubscribeForm___dMi0v"};const a=o}}]);
1
+ "use strict";(self.webpackChunk_openmrs_esm_openconceptlab_app=self.webpackChunk_openmrs_esm_openconceptlab_app||[]).push([[251],{3749:(e,t,n)=>{n.r(t),n.d(t,{default:()=>xe});var r=n(6607),o=n(268),a=n.n(o),i=n(4924),c=n(9857),s=n(5047),l=n.n(s),u=n(906),p=n(9140);function d(e,t,n,r,o,a,i){try{var c=e[a](i),s=c.value}catch(e){return void n(e)}c.done?t(s):Promise.resolve(s).then(r,o)}function m(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){d(a,r,o,i,c,"next",e)}function c(e){d(a,r,o,i,c,"throw",e)}i(void 0)}))}}function b(e,t){return f.apply(this,arguments)}function f(){return(f=m(l().mark((function e(t,n){var r;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=(0,p.Z)(t.uuid)?"/ws/rest/v1/openconceptlab/subscription":"/ws/rest/v1/openconceptlab/subscription/".concat(t.uuid),e.abrupt("return",(0,u.openmrsFetch)(r,{method:"POST",body:t,headers:{"Content-Type":"application/json"},signal:null==n?void 0:n.signal}));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function _(e,t){return g.apply(this,arguments)}function g(){return(g=m(l().mark((function e(t,n){var r;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r="/ws/rest/v1/openconceptlab/subscription/".concat(t.uuid),e.abrupt("return",(0,u.openmrsFetch)(r,{method:"DELETE",signal:null==n?void 0:n.signal}));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var h=n(6062),v=n.n(h),y=n(4036),E=n.n(y),w=n(6793),S=n.n(w),k=n(7892),N=n.n(k),x=n(1173),T=n.n(x),C=n(2464),O=n.n(C),P=n(7542),A={};A.styleTagTransform=O(),A.setAttributes=N(),A.insert=S().bind(null,"head"),A.domAPI=E(),A.insertStyleElement=T(),v()(P.Z,A);const D=P.Z&&P.Z.locals?P.Z.locals:void 0;var I=function(e){var t,n,r;e.endsWith("/")&&(e=e.substring(0,e.lastIndexOf("/")));try{n=new URL(e)}catch(e){return!1}return 5==(null!==(r=null===(t=n.pathname.match(/\//g))||void 0===t?void 0:t.length)&&void 0!==r?r:0)};function F(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function j(e,t,n,r,o,a,i){try{var c=e[a](i),s=c.value}catch(e){return void n(e)}c.done?t(s):Promise.resolve(s).then(r,o)}function Z(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){j(a,r,o,i,c,"next",e)}function c(e){j(a,r,o,i,c,"throw",e)}i(void 0)}))}}function z(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function H(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){z(e,t,n[t])}))}return e}function L(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}function B(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a=[],i=!0,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){c=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(c)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return F(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?F(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const R=function(){var e=(0,i.useTranslation)().t,t=(0,c.kY)().mutate,n=B((0,o.useState)(""),2),s=n[0],p=n[1],d=B((0,o.useState)(""),2),m=d[0],f=d[1],g=B((0,o.useState)(!1),2),h=g[0],v=g[1],y=B((0,o.useState)("FULL"),2),E=y[0],w=y[1],S=B((0,o.useState)(!1),2),k=S[0],N=S[1],x=function(){var e,t=(0,c.ZP)("/ws/rest/v1/openconceptlab/subscription?v=full",u.openmrsFetch),n=t.data,r=t.error,o=t.isValidating;return{data:null==n||null===(e=n.data)||void 0===e?void 0:e.results[0],isLoading:!n&&!r,isError:r,isValidating:o}}(),T=x.data,C=x.isLoading,O=x.isError;(0,o.useEffect)((function(){C||O||(p((null==T?void 0:T.url)||""),f((null==T?void 0:T.token)||""),v((null==T?void 0:T.subscribedToSnapshot)||!1),w((null==T?void 0:T.validationType)||"FULL"),N(!!T&&I(T.url)))}),[C,O,T]);var P,A=(0,o.useCallback)((function(e){p(e.target.value),I(e.target.value)?(N(!0),v(!1)):N(!1)}),[]),F=(0,o.useCallback)((function(e){f(e.target.value)}),[]),j=(0,o.useCallback)((function(e,t){var n=t.checked;t.id,w(n?"NONE":"FULL")}),[]),z=(0,o.useCallback)((function(e,t){var n=t.checked;t.id,v(n)}),[]),R=(0,o.useCallback)((P=Z(l().mark((function n(r){var o,a,i;return l().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(r.preventDefault(),r.stopPropagation(),!k||!h){n.next=5;break}return(0,u.showNotification)({kind:"error",description:e("snapshotDisabledError","You cannot subscribe to a SNAPSHOT if you've provided the collection version")}),n.abrupt("return");case 5:return o=new AbortController,a=L(H({},T),{url:s,token:m,validationType:E,subscribedToSnapshot:h}),t("/ws/rest/v1/openconceptlab/subscription?v=full",a,!1),n.next=10,b(a,o);case 10:return i=n.sent,t("/ws/rest/v1/openconceptlab/subscription?v=full"),i.ok?(0,u.showNotification)({kind:"success",description:e(201===i.status?"subscriptionCreated":"subscriptionUpdated",201===i.status?"Subscription created successfully":"Subscription updated successfully")}):(0,u.showNotification)({title:e("errorSavingSubscription","Error occured while saving the subscription"),kind:"error",critical:!0,description:JSON.stringify(i.data)}),n.abrupt("return",(function(){return o.abort()}));case 14:case"end":return n.stop()}}),n)}))),function(e){return P.apply(this,arguments)}),[s,m,E,h,k,T,e,t]),U=(0,o.useCallback)((function(){p((null==T?void 0:T.url)||""),f((null==T?void 0:T.token)||""),v((null==T?void 0:T.subscribedToSnapshot)||!1),w((null==T?void 0:T.validationType)||"FULL"),N(!!T&&I(T.url)),(0,u.showNotification)({kind:"info",description:e("cancelledChanges","Cancelled changes successfully")})}),[T,e]),M=(0,o.useCallback)(function(){var n=Z(l().mark((function n(r){var o,a;return l().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r.preventDefault(),r.stopPropagation(),o=new AbortController,n.next=5,_(T,o);case 5:return a=n.sent,t("/ws/rest/v1/openconceptlab/subscription?v=full"),204===a.status?(p(""),f(""),v(!1),w("FULL"),N(!1),(0,u.showNotification)({kind:"success",description:e("subscriptionDeleted","Successfully unsubscribed")})):(0,u.showNotification)({title:e("errorDeletingSubscription","Error occured while deleting the subscription"),kind:"error",critical:!0,description:JSON.stringify(a.data)}),n.abrupt("return",(function(){return o.abort()}));case 9:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}(),[T,e,t]);return C?a().createElement(r.rjZ,{className:D.grid},a().createElement(r.sgG,{sm:4,md:8,lg:10},a().createElement(r.l09,null,a().createElement(r.N2B,{className:D.productiveHeading03}),a().createElement(r.Kqy,{gap:5},a().createElement(r.znL,null),a().createElement(r.znL,null),a().createElement(r.cwH,{legendText:a().createElement(r.N2B,{width:"75px"}),className:D.formGroup},a().createElement(r.jJq,null),a().createElement(r.jJq,null))),a().createElement(r.Db,null),a().createElement(r.Db,null)),a().createElement(r.l09,{className:D.unsubscribeForm},a().createElement(r.N2B,{className:D.productiveHeading03}),a().createElement(r.N2B,{className:D.unsubscribeText}),a().createElement(r.Db,null)))):(O&&(0,u.showNotification)({kind:"error",description:e("subscriptionError","Error occured while fetching the subscription")}),a().createElement(r.rjZ,{className:D.grid},a().createElement(r.sgG,{sm:4,md:8,lg:10},a().createElement(r.l09,{onSubmit:R},a().createElement("h3",{className:D.productiveHeading03},e("setupSubscription","Setup Subscription")),a().createElement(r.Kqy,{gap:5},a().createElement(r.oil,{id:"subscriptionUrl",type:"url",labelText:e("subscriptionUrl","Subscription URL"),placeholder:"https://api.openconceptlab.org/orgs/organization-name/collections/dictionary-name",value:s,onChange:A,light:!0,required:!0}),a().createElement(r.oil,{id:"apiToken",type:"password",placeholder:"••••••••••••••••••••••••••••••••••••••••••••••••",labelText:e("apiToken","Token"),value:m,onChange:F,light:!0,required:!0}),a().createElement(r.cwH,{legendText:e("advancedOptions","Advanced Options"),className:D.formGroup},a().createElement(r.XZJ,{checked:h,onChange:z,labelText:e("subscribeToSnapshotText","Subscribe to SNAPSHOT versions (not recommended)"),id:"isSubscribedToSnapshot",disabled:k}),a().createElement(r.XZJ,{checked:"NONE"===E,onChange:j,labelText:e("disableValidationText","Disable validation (should be used with care for well curated collections or sources)"),id:"isValidationDisabled"}))),a().createElement(r.zxk,{kind:"secondary",onClick:U},e("cancelButton","Cancel changes")),a().createElement(r.zxk,{kind:"primary",type:"submit"},e("subscribeButton","Save changes"))),a().createElement(r.l09,{onSubmit:M,className:D.unsubscribeForm},a().createElement("h3",{className:D.productiveHeading03},e("unsubscribe","Unsubscribe")),a().createElement("p",{className:D.unsubscribeText},e("unsubscribeInfo","If you unsubscribe, no concepts will be deleted nor changed. All information about subscription will be deleted from your system.")),a().createElement(r.zxk,{kind:"danger",type:"submit",disabled:!T},e("unsubscribeButton","Unsubscribe"))))))};var U=n(302),M={};M.styleTagTransform=O(),M.setAttributes=N(),M.insert=S().bind(null,"head"),M.domAPI=E(),M.insertStyleElement=T(),v()(U.Z,M);const G=U.Z&&U.Z.locals?U.Z.locals:void 0;var K=n(3111),V={};V.styleTagTransform=O(),V.setAttributes=N(),V.insert=S().bind(null,"head"),V.domAPI=E(),V.insertStyleElement=T(),v()(K.Z,V);const J=K.Z&&K.Z.locals?K.Z.locals:void 0;function X(e,t,n,r,o,a,i){try{var c=e[a](i),s=c.value}catch(e){return void n(e)}c.done?t(s):Promise.resolve(s).then(r,o)}function q(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){X(a,r,o,i,c,"next",e)}function c(e){X(a,r,o,i,c,"throw",e)}i(void 0)}))}}function Y(e){return W.apply(this,arguments)}function W(){return(W=q(l().mark((function e(t){return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,u.openmrsFetch)("/ws/rest/v1/openconceptlab/import",{method:"POST",body:{},headers:{"Content-Type":"application/json"},signal:null==t?void 0:t.signal}));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function $(e,t){return Q.apply(this,arguments)}function Q(){return(Q=q(l().mark((function e(t,n){var r;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=new FormData).append("file",t),e.abrupt("return",(0,u.openmrsFetch)("/ws/rest/v1/openconceptlab/import",{method:"POST",body:r,signal:null==n?void 0:n.signal}));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ee(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function te(e,t,n,r,o,a,i){try{var c=e[a](i),s=c.value}catch(e){return void n(e)}c.done?t(s):Promise.resolve(s).then(r,o)}function ne(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){te(a,r,o,i,c,"next",e)}function c(e){te(a,r,o,i,c,"throw",e)}i(void 0)}))}}function re(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a=[],i=!0,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){c=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(c)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ee(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?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.")}()}const oe=function(){var e=(0,i.useTranslation)().t,t=re((0,o.useState)(!1),2),n=t[0],s=t[1],p=re((0,o.useState)(),2),d=p[0],m=p[1],b=re((0,o.useState)(!1),2),f=b[0],_=b[1],g=function(){var e,t=(0,c.ZP)("/ws/rest/v1/openconceptlab/subscription?v=full",u.openmrsFetch),n=t.data,r=t.error,o=t.isValidating;return{data:null==n||null===(e=n.data)||void 0===e?void 0:e.results[0],isLoading:!n&&!r,isError:r,isValidating:o}}(),h=g.data,v=g.isLoading,y=g.isError;(0,o.useEffect)((function(){v||y||s(!!h)}),[v,y,h]);var E,w=(0,o.useCallback)((function(t,n){var r=n.addedFiles[0];"application/zip"!==r.type?(0,u.showNotification)({kind:"error",description:e("fileFormatError","Only .zip files are allowed")}):m(r)}),[e]),S=(0,o.useCallback)((function(){m(null)}),[]),k=(0,o.useCallback)((E=ne(l().mark((function t(r){var o;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r.preventDefault(),r.stopPropagation(),n){t.next=5;break}return(0,u.showNotification)({kind:"error",description:e("noSubscriptionError","No saved subscription")}),t.abrupt("return");case 5:return o=new AbortController,t.next=8,Y(o);case 8:201===t.sent.status?(0,u.showNotification)({kind:"success",description:e("importSuccess","Import started successfully")}):(0,u.showNotification)({kind:"error",description:e("importFailed","Import failed")});case 10:case"end":return t.stop()}}),t)}))),function(e){return E.apply(this,arguments)}),[n,e]),N=(0,o.useCallback)(function(){var t=ne(l().mark((function t(n){var r;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(_(!0),n.preventDefault(),n.stopPropagation(),d){t.next=7;break}return _(!1),(0,u.showNotification)({kind:"error",description:e("noFileSelected","No file selected")}),t.abrupt("return");case 7:return r=new AbortController,t.next=10,$(d,r);case 10:201===t.sent.status?(m(null),_(!1),(0,u.showNotification)({kind:"success",description:e("importSuccess","Import started successfully")})):(_(!1),(0,u.showNotification)({kind:"error",description:e("importFailed","Import failed")}));case 12:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),[d,e]);return v?a().createElement(r.rjZ,{className:J.grid},a().createElement(r.sgG,{sm:4,md:8,lg:10},a().createElement(r.l09,null,a().createElement(r.N2B,{className:J.productiveHeading03,heading:!0}),a().createElement(r.N2B,{className:J.formText,paragraph:!0,lineCount:2}),a().createElement(r.Db,null)),a().createElement(r.l09,{className:J.form},a().createElement(r.N2B,{className:J.productiveHeading03,heading:!0}),a().createElement(r.N2B,{className:J.formText}),a().createElement(r.rhD,{style:{marginBottom:"1.5rem"}}),a().createElement(r.Db,null)))):(y&&(0,u.showNotification)({kind:"error",description:e("subscriptionError","Error occured while fetching the subscription")}),a().createElement(r.rjZ,{className:J.grid},a().createElement(r.sgG,{sm:4,md:8,lg:10},a().createElement(r.l09,{onSubmit:k},a().createElement("h3",{className:J.productiveHeading03},e("importConcepts","Import Concepts")),a().createElement("p",{className:J.formText},e("importInstructions","Avoid importing during data entry hours, because the operation may significantly slow down the system. You can either use the subscription or a zip file to import concepts.")),a().createElement(r.zxk,{kind:"primary",type:"submit",disabled:!n},e("importFromSubscription","Import from Subscription"))),a().createElement(r.l09,{className:J.form,onSubmit:N},a().createElement("h3",{className:J.productiveHeading03},e("importFromFileHeading","Import from file (Offline)")),a().createElement("p",{className:J.formText},e("importFromFileInfo","You can import data without setting up a subscription by using this option.")),d?a().createElement(r.Py3,{key:d.name,name:d.name,size:"default",status:"edit",iconDescription:e("fileAdded","File Added"),onDelete:S,style:{backgroundColor:"#e0e0e0"}}):a().createElement(r.awp,{accept:["application/zip"],multiple:!0,labelText:e("importFromFileDragInfo","Drag and drop file here or click to upload"),onAddFiles:w,style:{marginBottom:"1.5rem"}}),a().createElement(r.Kqy,{gap:6,orientation:"horizontal"},a().createElement(r.zxk,{kind:"primary",type:"submit"},e("importFromFile","Import from file")),f&&a().createElement(r.lSo,{description:e("uploading","Uploading...")}))))))};var ae=n(2258),ie={};ie.styleTagTransform=O(),ie.setAttributes=N(),ie.insert=S().bind(null,"head"),ie.domAPI=E(),ie.insertStyleElement=T(),v()(ae.Z,ie);const ce=ae.Z&&ae.Z.locals?ae.Z.locals:void 0;var se=n(385),le={};le.styleTagTransform=O(),le.setAttributes=N(),le.insert=S().bind(null,"head"),le.domAPI=E(),le.insertStyleElement=T(),v()(se.Z,le);const ue=se.Z&&se.Z.locals?se.Z.locals:void 0;function pe(e,t,n,r,o,a,i){try{var c=e[a](i),s=c.value}catch(e){return void n(e)}c.done?t(s):Promise.resolve(s).then(r,o)}function de(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){pe(a,r,o,i,c,"next",e)}function c(e){pe(a,r,o,i,c,"throw",e)}i(void 0)}))}}function me(e,t){return be.apply(this,arguments)}function be(){return(be=de(l().mark((function e(t,n){var r;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r="/ws/rest/v1/openconceptlab/import/".concat(t,"/item?state=ERROR&v=full"),e.abrupt("return",(0,u.openmrsFetch)(r,{method:"GET",signal:null==n?void 0:n.signal}));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var fe=n(8850),_e={};_e.styleTagTransform=O(),_e.setAttributes=N(),_e.insert=S().bind(null,"head"),_e.domAPI=E(),_e.insertStyleElement=T(),v()(fe.Z,_e);const ge=fe.Z&&fe.Z.locals?fe.Z.locals:void 0;function he(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ve(e,t,n,r,o,a,i){try{var c=e[a](i),s=c.value}catch(e){return void n(e)}c.done?t(s):Promise.resolve(s).then(r,o)}function ye(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a=[],i=!0,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){c=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(c)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return he(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?he(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const Ee=function(e){var t,n,c=e.importUuid,s=(0,i.useTranslation)().t,p=ye((0,o.useState)(),2),d=p[0],m=p[1],b=ye((0,o.useState)(5),2),f=b[0],_=b[1],g=ye((0,o.useState)([]),2),h=g[0],v=g[1],y=(0,u.usePagination)(h,f),E=y.results,w=y.currentPage,S=y.goTo,k=(0,o.useCallback)((t=l().mark((function e(t){var n,r;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return m(!0),n=new AbortController,e.next=4,me(t,n);case 4:return(r=e.sent).ok?v(r.data.results):(0,u.showNotification)({title:s("importItemsFetchError","Error occured while fetching the import items"),kind:"error",critical:!0,description:JSON.stringify(r.data)}),m(!1),e.abrupt("return",(function(){return n.abort()}));case 8:case"end":return e.stop()}}),e)})),n=function(){var e=this,n=arguments;return new Promise((function(r,o){var a=t.apply(e,n);function i(e){ve(a,r,o,i,c,"next",e)}function c(e){ve(a,r,o,i,c,"throw",e)}i(void 0)}))},function(e){return n.apply(this,arguments)}),[s]);if((0,o.useEffect)((function(){k(c)}),[k,c]),d)return a().createElement("div",null,a().createElement(r.gqd,{showHeader:!1,showToolbar:!1,columnCount:2}),a().createElement(r.F3O,null));var N=[{header:s("conceptOrMapping","Concept/Mapping"),key:"uuid"},{header:s("message","Message"),key:"errorMessage"}];return!d&&a().createElement("div",null,a().createElement(r.iA_,{size:"sm",className:ge.tableBordered},a().createElement(r.ssF,null,a().createElement(r.SCH,{className:ge.tableHeaderRow},N.map((function(e,t){return a().createElement(r.xDH,{key:t,isSortable:!0},e.header)})))),a().createElement(r.RMI,null,null==E?void 0:E.map((function(e){return a().createElement(o.Fragment,{key:e.uuid},a().createElement(r.SCH,{className:ge.tableDataRow},a().createElement(r.pj1,null,a().createElement(r.rUS,{href:e.versionUrl},e.type," ",e.uuid)),a().createElement(r.pj1,null,e.errorMessage)))})))),a().createElement(r.tlE,{className:ge.pagination,size:"sm",page:w,pageSize:f,pageSizes:[5,10,20,50,100],totalItems:null==h?void 0:h.length,onChange:function(e){var t=e.page,n=e.pageSize;S(t),_(n)}}))},we=function(e){var t=e.selectedImportObject,n=(0,i.useTranslation)().t;return a().createElement("div",null,a().createElement("span",{className:ue.heading01},n("startedOn","Started on")," "),a().createElement("span",{className:"body"},(0,u.formatDatetime)(new Date(t.localDateStarted))),a().createElement("br",null),a().createElement("span",{className:ue.heading01},n("completedOn","Completed on")," "),a().createElement("span",{className:"body"},(0,u.formatDatetime)(new Date(t.localDateStopped))),a().createElement("br",null),a().createElement("span",{className:ue.heading01},n("duration","Duration")," "),a().createElement("span",{className:"body"},t.importTime),a().createElement("br",null),a().createElement("br",null),a().createElement("span",{className:ue.heading01},n("result","Result:")," "),a().createElement("br",null),a().createElement("div",{className:"body ".concat(ue.indentedContent)},a().createElement("span",null,t.upToDateItemsCount," ",n("conceptsUpToDate","concepts up to date")),a().createElement("br",null),a().createElement("span",null,t.addedItemsCount," ",n("conceptsAdded","concepts added")),a().createElement("br",null),a().createElement("span",null,t.updatedItemsCount," ",n("conceptsUpdated","concepts updated")),a().createElement("br",null),a().createElement("span",null,t.retiredItemsCount," ",n("conceptsRetired","concepts retired")),a().createElement("br",null),a().createElement("span",null,t.errorItemsCount," ",n("errorsFound","errors found")),a().createElement("br",null),a().createElement("span",null,t.ignoredErrorsCount," ",n("errorsIgnored","errors ignored")),a().createElement("br",null)),a().createElement("br",null),0!=t.errorItemsCount&&a().createElement(Ee,{importUuid:t.uuid}))};function Se(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ke(){return ke=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ke.apply(this,arguments)}const Ne=function(){var e,t,n=(0,i.useTranslation)().t,s=(e=(0,o.useState)(10),t=2,function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a=[],i=!0,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){c=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(c)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Se(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Se(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.")}()),l=s[0],p=s[1],d=function(){var e,t=(0,c.ZP)("/ws/rest/v1/openconceptlab/import?v=full",u.openmrsFetch),n=t.data,r=t.error,o=t.isValidating;return{data:null==n||null===(e=n.data)||void 0===e?void 0:e.results,isLoading:!n&&!r,isError:r,isValidating:o}}(),m=d.data,b=d.isLoading,f=d.isError,_=(0,u.usePagination)(m,l),g=_.results,h=_.currentPage,v=_.goTo;if(b)return a().createElement(r.rjZ,{className:ce.grid},a().createElement(r.sgG,{sm:4,md:8,lg:10},a().createElement(r.N2B,{className:ce.productiveHeading03}),a().createElement(r.gqd,{showHeader:!1,showToolbar:!1,rowCount:10,columnCount:3}),a().createElement(r.F3O,null)));f&&(0,u.showNotification)({kind:"error",description:n("previousImportsFetchError","Error occured while fetching the imports")});var y=[{header:n("dateAndTime","Date and Time"),key:"localDateStarted"},{header:n("duration","Duration"),key:"importTime"},{header:n("status","Status"),key:"status"}],E=null==g?void 0:g.map((function(e){return{id:e.uuid,localDateStarted:(0,u.formatDatetime)(new Date(e.localDateStarted)),importTime:e.importTime,status:e.status}}));return!b&&!f&&a().createElement(r.rjZ,{className:ce.grid},a().createElement(r.sgG,{sm:4,md:8,lg:10},a().createElement("h3",{className:ce.productiveHeading03},n("previousImports","Previous Imports")),a().createElement(r.wQF,{rows:E,headers:y,size:"sm"},(function(e){var t=e.rows,n=e.headers,i=e.getHeaderProps,c=e.getRowProps,s=e.getTableProps;return a().createElement(r.iA_,ke({},s(),{className:ce.tableBordered}),a().createElement(r.ssF,null,a().createElement(r.SCH,null,a().createElement(r.MOD,null),n.map((function(e,t){return a().createElement(r.xDH,ke({key:t},i({header:e})),e.header)})))),a().createElement(r.RMI,null,t.map((function(e){return a().createElement(o.Fragment,{key:e.id},a().createElement(r.RcE,ke({},c({row:e}),{className:ce.tableRow}),e.cells.map((function(e){return a().createElement(r.pj1,{key:e.id},e.value)}))),e.isExpanded&&a().createElement(r.WdL,{colSpan:n.length+1,className:ce.tableExpandedRow},a().createElement(we,{selectedImportObject:m.find((function(t){return t.uuid===e.id}))})))}))))})),a().createElement(r.tlE,{className:ce.pagination,size:"sm",page:h,pageSize:l,pageSizes:[10,20,50,100],totalItems:m.length,onChange:function(e){var t=e.page,n=e.pageSize;v(t),p(n)}})))},xe=function(){var e=(0,i.useTranslation)().t;return a().createElement(c.J$,null,a().createElement("main",{className:"omrs-main-content ".concat(G.main)},a().createElement("h3",{className:G.moduleHeader},e("moduleTitle","OCL Subscription Module")),a().createElement(r.mQc,null,a().createElement(r.tdY,{className:G.tabList,contained:!0},a().createElement(r.OK9,null,e("subscription","Subscription")," "),a().createElement(r.OK9,null,e("import","Import")," "),a().createElement(r.OK9,null,e("previousImports","Previous Imports")," ")),a().createElement(r.nPR,null,a().createElement(r.x45,{className:G.tabPanel},a().createElement(R,null)),a().createElement(r.x45,{className:G.tabPanel},a().createElement(oe,null)),a().createElement(r.x45,{className:G.tabPanel},a().createElement(Ne,null))))))}},3111:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(2609),o=n.n(r)()((function(e){return e[1]}));o.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-openconceptlab__import-component__grid___5wW0H{margin-left:0;margin-right:0;padding-left:0;padding-right:0}.-esm-openconceptlab__import-component__productiveHeading03___m6cC7{font-size:var(--cds-productive-heading-03-font-size, 1.25rem);font-weight:var(--cds-productive-heading-03-font-weight, 400);line-height:var(--cds-productive-heading-03-line-height, 1.4);letter-spacing:var(--cds-productive-heading-03-letter-spacing, 0);margin-bottom:.5rem}.-esm-openconceptlab__import-component__form___BAtOz{margin-top:2rem}.-esm-openconceptlab__import-component__formText___-LFNS{padding-bottom:1rem}.-esm-openconceptlab__import-component__fileUploaderDropContainer___u9wb\\+{margin-bottom:1.5rem}",""]),o.locals={grid:"-esm-openconceptlab__import-component__grid___5wW0H",productiveHeading03:"-esm-openconceptlab__import-component__productiveHeading03___m6cC7",form:"-esm-openconceptlab__import-component__form___BAtOz",formText:"-esm-openconceptlab__import-component__formText___-LFNS",fileUploaderDropContainer:"-esm-openconceptlab__import-component__fileUploaderDropContainer___u9wb+"};const a=o},8850:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(2609),o=n.n(r)()((function(e){return e[1]}));o.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-openconceptlab__import-items-component__pagination___UFodW{font-size:var(--cds-body-short-01-font-size, 0.875rem);font-weight:var(--cds-body-short-01-font-weight, 400);line-height:var(--cds-body-short-01-line-height, 1.28572);letter-spacing:var(--cds-body-short-01-letter-spacing, 0.16px);background-color:#fff;color:#525252;border:1px solid #e0e0e0;display:flex}.-esm-openconceptlab__import-items-component__tableBordered___agwp-{border:1px solid #e0e0e0}.-esm-openconceptlab__import-items-component__tableDataRow___BdXBZ>td{padding-left:1rem !important;background-color:#fff !important}.-esm-openconceptlab__import-items-component__tableHeaderRow___rp03z>th{background-color:#e0e0e0 !important}",""]),o.locals={pagination:"-esm-openconceptlab__import-items-component__pagination___UFodW",tableBordered:"-esm-openconceptlab__import-items-component__tableBordered___agwp-",tableDataRow:"-esm-openconceptlab__import-items-component__tableDataRow___BdXBZ",tableHeaderRow:"-esm-openconceptlab__import-items-component__tableHeaderRow___rp03z"};const a=o},385:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(2609),o=n.n(r)()((function(e){return e[1]}));o.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-openconceptlab__import-overview-component__heading01___wV6-M{font-size:var(--cds-heading-01-font-size, 0.875rem);font-weight:var(--cds-heading-01-font-weight, 600);line-height:var(--cds-heading-01-line-height, 1.42857);letter-spacing:var(--cds-heading-01-letter-spacing, 0.16px)}.-esm-openconceptlab__import-overview-component__indentedContent___kMG5X{margin-left:2rem}",""]),o.locals={heading01:"-esm-openconceptlab__import-overview-component__heading01___wV6-M",indentedContent:"-esm-openconceptlab__import-overview-component__indentedContent___kMG5X"};const a=o},2258:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(2609),o=n.n(r)()((function(e){return e[1]}));o.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-openconceptlab__previous-imports-component__grid___VG\\+Rw{margin-left:0;margin-right:0;padding-left:0;padding-right:0}.-esm-openconceptlab__previous-imports-component__productiveHeading03___-O6sL{font-size:var(--cds-productive-heading-03-font-size, 1.25rem);font-weight:var(--cds-productive-heading-03-font-weight, 400);line-height:var(--cds-productive-heading-03-line-height, 1.4);letter-spacing:var(--cds-productive-heading-03-letter-spacing, 0);margin-bottom:.5rem}.-esm-openconceptlab__previous-imports-component__pagination___JXNSt{font-size:var(--cds-body-short-01-font-size, 0.875rem);font-weight:var(--cds-body-short-01-font-weight, 400);line-height:var(--cds-body-short-01-line-height, 1.28572);letter-spacing:var(--cds-body-short-01-letter-spacing, 0.16px);background-color:#fff;color:#525252;border:1px solid #e0e0e0;display:flex}.-esm-openconceptlab__previous-imports-component__tableBordered___440s3{border:1px solid #e0e0e0}.-esm-openconceptlab__previous-imports-component__tableRow___tM2aj>td{background-color:#fff;border-bottom:1px solid #e0e0e0 !important}.-esm-openconceptlab__previous-imports-component__tableExpandedRow___fQwKD>td{padding-left:3rem !important;padding-right:3rem;padding-top:1rem;padding-bottom:1rem}",""]),o.locals={grid:"-esm-openconceptlab__previous-imports-component__grid___VG+Rw",productiveHeading03:"-esm-openconceptlab__previous-imports-component__productiveHeading03___-O6sL",pagination:"-esm-openconceptlab__previous-imports-component__pagination___JXNSt",tableBordered:"-esm-openconceptlab__previous-imports-component__tableBordered___440s3",tableRow:"-esm-openconceptlab__previous-imports-component__tableRow___tM2aj",tableExpandedRow:"-esm-openconceptlab__previous-imports-component__tableExpandedRow___fQwKD"};const a=o},302:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(2609),o=n.n(r)()((function(e){return e[1]}));o.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-openconceptlab__root-component__main___G0\\+lN{background-color:#fff}.-esm-openconceptlab__root-component__moduleHeader___yB-PY{font-size:var(--cds-productive-heading-03-font-size, 1.25rem);font-weight:var(--cds-productive-heading-03-font-weight, 400);line-height:var(--cds-productive-heading-03-line-height, 1.4);letter-spacing:var(--cds-productive-heading-03-letter-spacing, 0);padding-left:1rem;padding-top:1rem;padding-bottom:1rem}.-esm-openconceptlab__root-component__tabList___aXyg4{padding:0 1rem}.-esm-openconceptlab__root-component__tabPanel___2e0wL{height:100%;background-color:#f4f4f4}",""]),o.locals={main:"-esm-openconceptlab__root-component__main___G0+lN",moduleHeader:"-esm-openconceptlab__root-component__moduleHeader___yB-PY",tabList:"-esm-openconceptlab__root-component__tabList___aXyg4",tabPanel:"-esm-openconceptlab__root-component__tabPanel___2e0wL"};const a=o},7542:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(2609),o=n.n(r)()((function(e){return e[1]}));o.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-openconceptlab__subscription-component__grid___Kwugy{margin-left:0;margin-right:0;padding-left:0;padding-right:0}.-esm-openconceptlab__subscription-component__productiveHeading03___xgZur{font-size:var(--cds-productive-heading-03-font-size, 1.25rem);font-weight:var(--cds-productive-heading-03-font-weight, 400);line-height:var(--cds-productive-heading-03-line-height, 1.4);letter-spacing:var(--cds-productive-heading-03-letter-spacing, 0);margin-bottom:.5rem}.-esm-openconceptlab__subscription-component__formGroup___GmK5h{margin-bottom:1rem}.-esm-openconceptlab__subscription-component__unsubscribeText___B9jCa{padding-bottom:1rem}.-esm-openconceptlab__subscription-component__unsubscribeForm___dMi0v{margin-top:1rem}",""]),o.locals={grid:"-esm-openconceptlab__subscription-component__grid___Kwugy",productiveHeading03:"-esm-openconceptlab__subscription-component__productiveHeading03___xgZur",formGroup:"-esm-openconceptlab__subscription-component__formGroup___GmK5h",unsubscribeText:"-esm-openconceptlab__subscription-component__unsubscribeText___B9jCa",unsubscribeForm:"-esm-openconceptlab__subscription-component__unsubscribeForm___dMi0v"};const a=o}}]);
package/dist/574.js CHANGED
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_openmrs_esm_openconceptlab_app=self.webpackChunk_openmrs_esm_openconceptlab_app||[]).push([[574],{3574:e=>{e.exports=JSON.parse('{"advancedOptions":"Advanced Options","apiToken":"Token","cancelButton":"Cancel changes","cancelledChanges":"Cancelled changes successfully","completedOn":"Completed on","conceptOrMapping":"Concept/Mapping","conceptsAdded":"concepts added","conceptsRetired":"concepts retired","conceptsUpdated":"concepts updated","conceptsUpToDate":"concepts up to date","dateAndTime":"Date and Time","disableValidationText":"Disable validation (should be used with care for well curated collections or sources)","duration":"Duration","errorDeletingSubscription":"Error occured while deleting the subscription","errorSavingSubscription":"Error occured while saving the subscription","errorsFound":"errors found","errorsIgnored":"errors ignored","fileAdded":"File Added","fileFormatError":"Only .zip files are allowed","import":"Import","importConcepts":"Import Concepts","importFailed":"Import failed","importFromFile":"Import from file","importFromFileDragInfo":"Drag and drop file here or click to upload","importFromFileHeading":"Import from file (Offline)","importFromFileInfo":"You can import data without setting up a subscription by using this option.","importFromSubscription":"Import from Subscription","importInstructions":"Avoid importing during data entry hours, because the operation may significantly slow down the system. You can either use the subscription or a zip file to import concepts.","importItemsFetchError":"Error occured while fetching the import items","importSuccess":"Import started successfully","message":"Message","moduleTitle":"OCL Subscription Module","noFileSelected":"No file selected","noSubscriptionError":"No saved subscription","previousImports":"Previous Imports","previousImportsFetchError":"Error occured while fetching the imports","result":"Result:","setupSubscription":"Setup Subscription","snapshotDisabledError":"You cannot subscribe to a SNAPSHOT if you\'ve provided the collection version","startedOn":"Started on","status":"Status","subscribeButton":"Save changes","subscribeToSnapshotText":"Subscribe to SNAPSHOT versions (not recommended)","subscription":"Subscription","subscriptionDeleted":"Successfully unsubscribed","subscriptionError":"Error occured while fetching the subscription","subscriptionUrl":"Subscription URL","unsubscribe":"Unsubscribe","unsubscribeButton":"Unsubscribe","unsubscribeInfo":"If you unsubscribe, no concepts will be deleted nor changed. All information about subscription will be deleted from your system."}')}}]);
1
+ "use strict";(self.webpackChunk_openmrs_esm_openconceptlab_app=self.webpackChunk_openmrs_esm_openconceptlab_app||[]).push([[574],{3574:e=>{e.exports=JSON.parse('{"advancedOptions":"Advanced Options","apiToken":"Token","cancelButton":"Cancel changes","cancelledChanges":"Cancelled changes successfully","completedOn":"Completed on","conceptOrMapping":"Concept/Mapping","conceptsAdded":"concepts added","conceptsRetired":"concepts retired","conceptsUpdated":"concepts updated","conceptsUpToDate":"concepts up to date","dateAndTime":"Date and Time","disableValidationText":"Disable validation (should be used with care for well curated collections or sources)","duration":"Duration","errorDeletingSubscription":"Error occured while deleting the subscription","errorSavingSubscription":"Error occured while saving the subscription","errorsFound":"errors found","errorsIgnored":"errors ignored","fileAdded":"File Added","fileFormatError":"Only .zip files are allowed","import":"Import","importConcepts":"Import Concepts","importFailed":"Import failed","importFromFile":"Import from file","importFromFileDragInfo":"Drag and drop file here or click to upload","importFromFileHeading":"Import from file (Offline)","importFromFileInfo":"You can import data without setting up a subscription by using this option.","importFromSubscription":"Import from Subscription","importInstructions":"Avoid importing during data entry hours, because the operation may significantly slow down the system. You can either use the subscription or a zip file to import concepts.","importItemsFetchError":"Error occured while fetching the import items","importSuccess":"Import started successfully","message":"Message","moduleTitle":"OCL Subscription Module","noFileSelected":"No file selected","noSubscriptionError":"No saved subscription","previousImports":"Previous Imports","previousImportsFetchError":"Error occured while fetching the imports","result":"Result:","setupSubscription":"Setup Subscription","snapshotDisabledError":"You cannot subscribe to a SNAPSHOT if you\'ve provided the collection version","startedOn":"Started on","status":"Status","subscribeButton":"Save changes","subscribeToSnapshotText":"Subscribe to SNAPSHOT versions (not recommended)","subscription":"Subscription","subscriptionDeleted":"Successfully unsubscribed","subscriptionError":"Error occured while fetching the subscription","subscriptionUrl":"Subscription URL","unsubscribe":"Unsubscribe","unsubscribeButton":"Unsubscribe","unsubscribeInfo":"If you unsubscribe, no concepts will be deleted nor changed. All information about subscription will be deleted from your system.","uploading":"Uploading..."}')}}]);
package/dist/862.js CHANGED
@@ -1 +1 @@
1
- (self.webpackChunk_openmrs_esm_openconceptlab_app=self.webpackChunk_openmrs_esm_openconceptlab_app||[]).push([[862],{4862:(e,n,o)=>{"use strict";o.r(n),o.d(n,{backendDependencies:()=>a,importTranslation:()=>t,setupOpenMRS:()=>c});var r=o(906),p={},t=o(3979),a={openconceptlab:"^1.2.0","webservices.rest":"^2.2.0"};function c(){var e="@openmrs/esm-openconceptlab-app",n={featureName:"openconceptlab",moduleName:e};return(0,r.defineConfigSchema)(e,p),{pages:[{load:(0,r.getAsyncLifecycle)((function(){return Promise.all([o.e(645),o.e(268),o.e(251)]).then(o.bind(o,3749))}),n),route:"ocl"}]}}},3979:(e,n,o)=>{var r={"./en.json":[3574,574]};function p(e){if(!o.o(r,e))return Promise.resolve().then((()=>{var n=new Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}));var n=r[e],p=n[0];return o.e(n[1]).then((()=>o(p)))}p.keys=()=>Object.keys(r),p.id=3979,e.exports=p}}]);
1
+ (self.webpackChunk_openmrs_esm_openconceptlab_app=self.webpackChunk_openmrs_esm_openconceptlab_app||[]).push([[862],{4862:(e,n,o)=>{"use strict";o.r(n),o.d(n,{backendDependencies:()=>a,importTranslation:()=>t,setupOpenMRS:()=>c});var r=o(906),p={},t=o(3979),a={openconceptlab:"^1.2.0","webservices.rest":"^2.2.0"};function c(){var e="@openmrs/esm-openconceptlab-app",n={featureName:"openconceptlab",moduleName:e};return(0,r.defineConfigSchema)(e,p),{pages:[{load:(0,r.getAsyncLifecycle)((function(){return Promise.all([o.e(168),o.e(268),o.e(251)]).then(o.bind(o,3749))}),n),route:"ocl"}]}}},3979:(e,n,o)=>{var r={"./en.json":[3574,574]};function p(e){if(!o.o(r,e))return Promise.resolve().then((()=>{var n=new Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}));var n=r[e],p=n[0];return o.e(n[1]).then((()=>o(p)))}p.keys=()=>Object.keys(r),p.id=3979,e.exports=p}}]);
@@ -1,5 +1,30 @@
1
1
  {
2
2
  "chunks": [
3
+ {
4
+ "rendered": true,
5
+ "initial": false,
6
+ "entry": false,
7
+ "recorded": false,
8
+ "reason": "split chunk (cache group: defaultVendors)",
9
+ "size": 1803237,
10
+ "sizes": {
11
+ "javascript": 1803237
12
+ },
13
+ "names": [],
14
+ "idHints": [
15
+ "vendors"
16
+ ],
17
+ "runtime": [
18
+ "@openmrs/esm-openconceptlab-app",
19
+ "main"
20
+ ],
21
+ "files": [
22
+ "168.js"
23
+ ],
24
+ "auxiliaryFiles": [],
25
+ "hash": "eeeb0b9ac923e9ddd9c6",
26
+ "childrenByOrder": {}
27
+ },
3
28
  {
4
29
  "rendered": true,
5
30
  "initial": true,
@@ -48,7 +73,7 @@
48
73
  "main.js"
49
74
  ],
50
75
  "auxiliaryFiles": [],
51
- "hash": "3f6a2254ffc786250fd9",
76
+ "hash": "a544e5b5e459c1c08455",
52
77
  "childrenByOrder": {}
53
78
  },
54
79
  {
@@ -56,9 +81,9 @@
56
81
  "initial": false,
57
82
  "entry": false,
58
83
  "recorded": false,
59
- "size": 78972,
84
+ "size": 79546,
60
85
  "sizes": {
61
- "javascript": 78888,
86
+ "javascript": 79462,
62
87
  "consume-shared": 84
63
88
  },
64
89
  "names": [],
@@ -71,7 +96,7 @@
71
96
  "251.js"
72
97
  ],
73
98
  "auxiliaryFiles": [],
74
- "hash": "3bf51ee8470b895b10a8",
99
+ "hash": "a991e015a07a1abcf4ea",
75
100
  "childrenByOrder": {}
76
101
  },
77
102
  {
@@ -125,9 +150,9 @@
125
150
  "initial": false,
126
151
  "entry": false,
127
152
  "recorded": false,
128
- "size": 2483,
153
+ "size": 2510,
129
154
  "sizes": {
130
- "javascript": 2483
155
+ "javascript": 2510
131
156
  },
132
157
  "names": [],
133
158
  "idHints": [],
@@ -139,32 +164,7 @@
139
164
  "574.js"
140
165
  ],
141
166
  "auxiliaryFiles": [],
142
- "hash": "2abbbcad90561b0397b3",
143
- "childrenByOrder": {}
144
- },
145
- {
146
- "rendered": true,
147
- "initial": false,
148
- "entry": false,
149
- "recorded": false,
150
- "reason": "split chunk (cache group: defaultVendors)",
151
- "size": 1799596,
152
- "sizes": {
153
- "javascript": 1799596
154
- },
155
- "names": [],
156
- "idHints": [
157
- "vendors"
158
- ],
159
- "runtime": [
160
- "@openmrs/esm-openconceptlab-app",
161
- "main"
162
- ],
163
- "files": [
164
- "645.js"
165
- ],
166
- "auxiliaryFiles": [],
167
- "hash": "ebc70c52b01ddb991d59",
167
+ "hash": "90b352d45c342cfa0d91",
168
168
  "childrenByOrder": {}
169
169
  },
170
170
  {
@@ -258,7 +258,7 @@
258
258
  "862.js"
259
259
  ],
260
260
  "auxiliaryFiles": [],
261
- "hash": "9bf7329c01dc78be32d4",
261
+ "hash": "49f1dbce322e29fc2616",
262
262
  "childrenByOrder": {}
263
263
  }
264
264
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openmrs/esm-openconceptlab-app",
3
- "version": "3.0.1-pre.16",
3
+ "version": "3.0.1-pre.17",
4
4
  "license": "MPL-2.0",
5
5
  "description": "An app to manage the openconceptlab module",
6
6
  "browser": "dist/openmrs-esm-openconceptlab-app.js",
@@ -49,5 +49,5 @@
49
49
  "react-router-dom": "6.x",
50
50
  "rxjs": "6.x"
51
51
  },
52
- "gitHead": "2e0871b5c6fc31eed3a18eec081277274b63f351"
52
+ "gitHead": "b9a77150ca9159e66f095a59eab937e28697e3a4"
53
53
  }
@@ -8,6 +8,8 @@ import {
8
8
  FileUploaderSkeleton,
9
9
  Form,
10
10
  Grid,
11
+ InlineLoading,
12
+ Stack,
11
13
  SkeletonText,
12
14
  } from '@carbon/react';
13
15
  import React, { useCallback, useEffect, useState } from 'react';
@@ -19,6 +21,7 @@ const Import: React.FC = () => {
19
21
  const { t } = useTranslation();
20
22
  const [isSubscriptionAvailable, setIsSubscriptionAvailable] = useState(false);
21
23
  const [file, setFile] = useState<File>();
24
+ const [isFileUploading, setIsFileUploading] = useState(false);
22
25
 
23
26
  const { data: subscription, isLoading, isError } = useSubscription();
24
27
 
@@ -80,10 +83,12 @@ const Import: React.FC = () => {
80
83
 
81
84
  const handleImportWithFile = useCallback(
82
85
  async (evt: React.FormEvent<HTMLFormElement>) => {
86
+ setIsFileUploading(true);
83
87
  evt.preventDefault();
84
88
  evt.stopPropagation();
85
89
 
86
90
  if (!file) {
91
+ setIsFileUploading(false);
87
92
  showNotification({
88
93
  kind: 'error',
89
94
  description: t('noFileSelected', 'No file selected'),
@@ -96,11 +101,13 @@ const Import: React.FC = () => {
96
101
 
97
102
  if (response.status === 201) {
98
103
  setFile(null);
104
+ setIsFileUploading(false);
99
105
  showNotification({
100
106
  kind: 'success',
101
107
  description: t('importSuccess', 'Import started successfully'),
102
108
  });
103
109
  } else {
110
+ setIsFileUploading(false);
104
111
  showNotification({
105
112
  kind: 'error',
106
113
  description: t('importFailed', 'Import failed'),
@@ -178,9 +185,12 @@ const Import: React.FC = () => {
178
185
  style={{ marginBottom: '1.5rem' }}
179
186
  />
180
187
  )}
181
- <Button kind="primary" type="submit">
182
- {t('importFromFile', 'Import from file')}
183
- </Button>
188
+ <Stack gap={6} orientation="horizontal">
189
+ <Button kind="primary" type="submit">
190
+ {t('importFromFile', 'Import from file')}
191
+ </Button>
192
+ {isFileUploading && <InlineLoading description={t('uploading', 'Uploading...')} />}
193
+ </Stack>
184
194
  </Form>
185
195
  </Column>
186
196
  </Grid>
@@ -48,5 +48,6 @@
48
48
  "subscriptionUrl": "Subscription URL",
49
49
  "unsubscribe": "Unsubscribe",
50
50
  "unsubscribeButton": "Unsubscribe",
51
- "unsubscribeInfo": "If you unsubscribe, no concepts will be deleted nor changed. All information about subscription will be deleted from your system."
51
+ "unsubscribeInfo": "If you unsubscribe, no concepts will be deleted nor changed. All information about subscription will be deleted from your system.",
52
+ "uploading": "Uploading..."
52
53
  }