@openmrs/esm-fast-data-entry-app 1.0.0-pre.17 → 1.0.0-pre.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/147.js +2 -0
- package/dist/{767.js.LICENSE.txt → 147.js.LICENSE.txt} +0 -0
- package/dist/247.js +1 -0
- package/dist/508.js +1 -0
- package/dist/536.js +2 -0
- package/dist/{338.js.LICENSE.txt → 536.js.LICENSE.txt} +0 -0
- package/dist/574.js +1 -1
- package/dist/595.js +1 -1
- package/dist/595.js.LICENSE.txt +2 -0
- package/dist/634.js +2 -0
- package/dist/634.js.LICENSE.txt +5 -0
- package/dist/671.js +1 -0
- package/dist/804.js +1 -1
- package/dist/906.js +1 -2
- package/dist/openmrs-esm-fast-data-entry-app.js +1 -1
- package/dist/openmrs-esm-fast-data-entry-app.js.buildmanifest.json +74 -113
- package/dist/openmrs-esm-fast-data-entry-app.old +1 -1
- package/package.json +1 -3
- package/src/FormBootstrap.tsx +142 -0
- package/src/Root.tsx +4 -4
- package/src/empty-state/EmptyDataIllustration.tsx +51 -0
- package/src/empty-state/EmptyState.tsx +29 -0
- package/src/empty-state/styles.scss +55 -0
- package/src/form-entry-workflow/FormEntryWorkflow.tsx +98 -0
- package/src/form-entry-workflow/index.ts +3 -0
- package/src/form-entry-workflow/styles.scss +59 -0
- package/src/forms-page/FormsPage.tsx +54 -0
- package/src/forms-page/index.ts +3 -0
- package/src/forms-page/styles.scss +11 -0
- package/src/{forms → forms-table}/FormsTable.tsx +51 -23
- package/src/forms-table/index.ts +3 -0
- package/src/forms-table/styles.scss +20 -0
- package/src/hooks/index.ts +4 -0
- package/src/hooks/useGetAllForms.ts +31 -0
- package/src/{forms → hooks}/useGetPatient.ts +0 -0
- package/src/{forms/PatientInfo.test.tsx → patient-banner/PatientBanner.test.tsx} +3 -3
- package/src/{forms/PatientInfo.tsx → patient-banner/PatientBanner.tsx} +2 -2
- package/src/patient-banner/index.ts +3 -0
- package/src/{forms/patient-info.scss → patient-banner/styles.scss} +0 -0
- package/src/{forms → patient-card}/PatientCard.tsx +1 -1
- package/src/patient-card/index.ts +3 -0
- package/src/patient-search-header/PatientSearchHeader.tsx +49 -0
- package/src/patient-search-header/index.ts +3 -0
- package/src/patient-search-header/styles.scss +17 -0
- package/translations/en.json +13 -4
- package/dist/338.js +0 -2
- package/dist/350.js +0 -1
- package/dist/418.js +0 -1
- package/dist/482.js +0 -1
- package/dist/666.js +0 -1
- package/dist/767.js +0 -2
- package/dist/906.js.LICENSE.txt +0 -27
- package/src/FormEntry.tsx +0 -42
- package/src/Loader.tsx +0 -16
- package/src/forms/FormWorkflow.tsx +0 -135
- package/src/forms/FormsRoot.tsx +0 -73
- package/src/forms/mockData.ts +0 -20
- package/src/forms/styles.scss +0 -13
- package/src/loader.scss +0 -9
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
@import "~@openmrs/esm-styleguide/src/vars";
|
|
2
|
+
@import "~carbon-components/src/globals/scss/vars";
|
|
3
|
+
@import "~carbon-components/src/globals/scss/mixins";
|
|
4
|
+
|
|
5
|
+
.searchHeaderContainer {
|
|
6
|
+
display: flex;
|
|
7
|
+
background-color: white;
|
|
8
|
+
padding: $spacing-07 $spacing-05;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.searchBarWrapper {
|
|
12
|
+
min-width: 35rem;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.padded {
|
|
16
|
+
padding: $spacing-05;
|
|
17
|
+
}
|
package/translations/en.json
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
{
|
|
2
|
-
"
|
|
3
|
-
"
|
|
4
|
-
|
|
1
|
+
{
|
|
2
|
+
"actions": "Actions",
|
|
3
|
+
"casualGreeting": "hey",
|
|
4
|
+
"dataErrorMessage": "Something went wrong loading data from the server.",
|
|
5
|
+
"errorLoadingData": "Error Loading Data",
|
|
6
|
+
"fillForm": "Fill Form",
|
|
7
|
+
"formalGreeting": "hello",
|
|
8
|
+
"formName": "Form Name",
|
|
9
|
+
"noFormsFound": "No Forms To Show",
|
|
10
|
+
"noFormsFoundMessage": "No forms could be found for this category. Please double check the form concept uuids and access permissions.",
|
|
11
|
+
"selectPatientFirst": "Please select a patient first",
|
|
12
|
+
"startGroupSession": "Start Group Session"
|
|
13
|
+
}
|
package/dist/338.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 338.js.LICENSE.txt */
|
|
2
|
-
(self.webpackChunk_openmrs_esm_fast_data_entry_app=self.webpackChunk_openmrs_esm_fast_data_entry_app||[]).push([[338],{8679:(t,n,e)=>{"use strict";var r=e(9864),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},c={};function u(t){return r.isMemo(t)?a:c[t.$$typeof]||o}c[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},c[r.Memo]=a;var s=Object.defineProperty,f=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,h=Object.getPrototypeOf,d=Object.prototype;t.exports=function t(n,e,r){if("string"!=typeof e){if(d){var o=h(e);o&&o!==d&&t(n,o,r)}var a=f(e);l&&(a=a.concat(l(e)));for(var c=u(n),v=u(e),m=0;m<a.length;++m){var y=a[m];if(!(i[y]||r&&r[y]||v&&v[y]||c&&c[y])){var g=p(e,y);try{s(n,y,g)}catch(t){}}}}return n}},2703:(t,n,e)=>{"use strict";var r=e(414);function o(){}function i(){}i.resetWarningCache=o,t.exports=function(){function t(t,n,e,o,i,a){if(a!==r){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function n(){return t}t.isRequired=t;var e={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:n,element:t,elementType:t,instanceOf:n,node:t,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:i,resetWarningCache:o};return e.PropTypes=e,e}},5697:(t,n,e)=>{t.exports=e(2703)()},414:t=>{"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},9921:(t,n)=>{"use strict";var e="function"==typeof Symbol&&Symbol.for,r=e?Symbol.for("react.element"):60103,o=e?Symbol.for("react.portal"):60106,i=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,c=e?Symbol.for("react.profiler"):60114,u=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,f=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,p=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,y=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function x(t){if("object"==typeof t&&null!==t){var n=t.$$typeof;switch(n){case r:switch(t=t.type){case f:case l:case i:case c:case a:case h:return t;default:switch(t=t&&t.$$typeof){case s:case p:case m:case v:case u:return t;default:return n}}case o:return n}}}function P(t){return x(t)===l}n.AsyncMode=f,n.ConcurrentMode=l,n.ContextConsumer=s,n.ContextProvider=u,n.Element=r,n.ForwardRef=p,n.Fragment=i,n.Lazy=m,n.Memo=v,n.Portal=o,n.Profiler=c,n.StrictMode=a,n.Suspense=h,n.isAsyncMode=function(t){return P(t)||x(t)===f},n.isConcurrentMode=P,n.isContextConsumer=function(t){return x(t)===s},n.isContextProvider=function(t){return x(t)===u},n.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===r},n.isForwardRef=function(t){return x(t)===p},n.isFragment=function(t){return x(t)===i},n.isLazy=function(t){return x(t)===m},n.isMemo=function(t){return x(t)===v},n.isPortal=function(t){return x(t)===o},n.isProfiler=function(t){return x(t)===c},n.isStrictMode=function(t){return x(t)===a},n.isSuspense=function(t){return x(t)===h},n.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===i||t===l||t===c||t===a||t===h||t===d||"object"==typeof t&&null!==t&&(t.$$typeof===m||t.$$typeof===v||t.$$typeof===u||t.$$typeof===s||t.$$typeof===p||t.$$typeof===g||t.$$typeof===w||t.$$typeof===b||t.$$typeof===y)},n.typeOf=x},9864:(t,n,e)=>{"use strict";t.exports=e(9921)},3338:(t,n,e)=>{"use strict";e.r(n),e.d(n,{BrowserRouter:()=>gt,HashRouter:()=>wt,Link:()=>Ct,MemoryRouter:()=>z,NavLink:()=>St,Prompt:()=>G,Redirect:()=>tt,Route:()=>ot,Router:()=>K,StaticRouter:()=>ft,Switch:()=>lt,generatePath:()=>X,matchPath:()=>rt,useHistory:()=>dt,useLocation:()=>vt,useParams:()=>mt,useRouteMatch:()=>yt,withRouter:()=>pt});var r=e(1721),o=e(4211),i=e.n(o),a=e(7462);function c(t){return"/"===t.charAt(0)}function u(t,n){for(var e=n,r=e+1,o=t.length;r<o;e+=1,r+=1)t[e]=t[r];t.pop()}function s(t){return t.valueOf?t.valueOf():Object.prototype.valueOf.call(t)}const f=function t(n,e){if(n===e)return!0;if(null==n||null==e)return!1;if(Array.isArray(n))return Array.isArray(e)&&n.length===e.length&&n.every((function(n,r){return t(n,e[r])}));if("object"==typeof n||"object"==typeof e){var r=s(n),o=s(e);return r!==n||o!==e?t(r,o):Object.keys(Object.assign({},n,e)).every((function(r){return t(n[r],e[r])}))}return!1};function l(t,n){if(!t)throw new Error("Invariant failed")}function p(t){return"/"===t.charAt(0)?t:"/"+t}function h(t){return"/"===t.charAt(0)?t.substr(1):t}function d(t,n){return function(t,n){return 0===t.toLowerCase().indexOf(n.toLowerCase())&&-1!=="/?#".indexOf(t.charAt(n.length))}(t,n)?t.substr(n.length):t}function v(t){return"/"===t.charAt(t.length-1)?t.slice(0,-1):t}function m(t){var n=t.pathname,e=t.search,r=t.hash,o=n||"/";return e&&"?"!==e&&(o+="?"===e.charAt(0)?e:"?"+e),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}function y(t,n,e,r){var o;"string"==typeof t?(o=function(t){var n=t||"/",e="",r="",o=n.indexOf("#");-1!==o&&(r=n.substr(o),n=n.substr(0,o));var i=n.indexOf("?");return-1!==i&&(e=n.substr(i),n=n.substr(0,i)),{pathname:n,search:"?"===e?"":e,hash:"#"===r?"":r}}(t),o.state=n):(void 0===(o=(0,a.Z)({},t)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==n&&void 0===o.state&&(o.state=n));try{o.pathname=decodeURI(o.pathname)}catch(t){throw t instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):t}return e&&(o.key=e),r?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=function(t,n){void 0===n&&(n="");var e,r=t&&t.split("/")||[],o=n&&n.split("/")||[],i=t&&c(t),a=n&&c(n),s=i||a;if(t&&c(t)?o=r:r.length&&(o.pop(),o=o.concat(r)),!o.length)return"/";if(o.length){var f=o[o.length-1];e="."===f||".."===f||""===f}else e=!1;for(var l=0,p=o.length;p>=0;p--){var h=o[p];"."===h?u(o,p):".."===h?(u(o,p),l++):l&&(u(o,p),l--)}if(!s)for(;l--;l)o.unshift("..");!s||""===o[0]||o[0]&&c(o[0])||o.unshift("");var d=o.join("/");return e&&"/"!==d.substr(-1)&&(d+="/"),d}(o.pathname,r.pathname)):o.pathname=r.pathname:o.pathname||(o.pathname="/"),o}function g(){var t=null,n=[];return{setPrompt:function(n){return t=n,function(){t===n&&(t=null)}},confirmTransitionTo:function(n,e,r,o){if(null!=t){var i="function"==typeof t?t(n,e):t;"string"==typeof i?"function"==typeof r?r(i,o):o(!0):o(!1!==i)}else o(!0)},appendListener:function(t){var e=!0;function r(){e&&t.apply(void 0,arguments)}return n.push(r),function(){e=!1,n=n.filter((function(t){return t!==r}))}},notifyListeners:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];n.forEach((function(t){return t.apply(void 0,e)}))}}}var w=!("undefined"==typeof window||!window.document||!window.document.createElement);function b(t,n){n(window.confirm(t))}var x="popstate",P="hashchange";function O(){try{return window.history.state||{}}catch(t){return{}}}function E(t){void 0===t&&(t={}),w||l(!1);var n,e=window.history,r=(-1===(n=window.navigator.userAgent).indexOf("Android 2.")&&-1===n.indexOf("Android 4.0")||-1===n.indexOf("Mobile Safari")||-1!==n.indexOf("Chrome")||-1!==n.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history,o=!(-1===window.navigator.userAgent.indexOf("Trident")),i=t,c=i.forceRefresh,u=void 0!==c&&c,s=i.getUserConfirmation,f=void 0===s?b:s,h=i.keyLength,E=void 0===h?6:h,C=t.basename?v(p(t.basename)):"";function k(t){var n=t||{},e=n.key,r=n.state,o=window.location,i=o.pathname+o.search+o.hash;return C&&(i=d(i,C)),y(i,r,e)}function R(){return Math.random().toString(36).substr(2,E)}var S=g();function T(t){(0,a.Z)(B,t),B.length=e.length,S.notifyListeners(B.location,B.action)}function A(t){(function(t){return void 0===t.state&&-1===navigator.userAgent.indexOf("CriOS")})(t)||L(k(t.state))}function _(){L(k(O()))}var $=!1;function L(t){$?($=!1,T()):S.confirmTransitionTo(t,"POP",f,(function(n){n?T({action:"POP",location:t}):function(t){var n=B.location,e=Z.indexOf(n.key);-1===e&&(e=0);var r=Z.indexOf(t.key);-1===r&&(r=0);var o=e-r;o&&($=!0,U(o))}(t)}))}var M=k(O()),Z=[M.key];function j(t){return C+m(t)}function U(t){e.go(t)}var N=0;function I(t){1===(N+=t)&&1===t?(window.addEventListener(x,A),o&&window.addEventListener(P,_)):0===N&&(window.removeEventListener(x,A),o&&window.removeEventListener(P,_))}var F=!1,B={length:e.length,action:"POP",location:M,createHref:j,push:function(t,n){var o="PUSH",i=y(t,n,R(),B.location);S.confirmTransitionTo(i,o,f,(function(t){if(t){var n=j(i),a=i.key,c=i.state;if(r)if(e.pushState({key:a,state:c},null,n),u)window.location.href=n;else{var s=Z.indexOf(B.location.key),f=Z.slice(0,s+1);f.push(i.key),Z=f,T({action:o,location:i})}else window.location.href=n}}))},replace:function(t,n){var o="REPLACE",i=y(t,n,R(),B.location);S.confirmTransitionTo(i,o,f,(function(t){if(t){var n=j(i),a=i.key,c=i.state;if(r)if(e.replaceState({key:a,state:c},null,n),u)window.location.replace(n);else{var s=Z.indexOf(B.location.key);-1!==s&&(Z[s]=i.key),T({action:o,location:i})}else window.location.replace(n)}}))},go:U,goBack:function(){U(-1)},goForward:function(){U(1)},block:function(t){void 0===t&&(t=!1);var n=S.setPrompt(t);return F||(I(1),F=!0),function(){return F&&(F=!1,I(-1)),n()}},listen:function(t){var n=S.appendListener(t);return I(1),function(){I(-1),n()}}};return B}var C="hashchange",k={hashbang:{encodePath:function(t){return"!"===t.charAt(0)?t:"!/"+h(t)},decodePath:function(t){return"!"===t.charAt(0)?t.substr(1):t}},noslash:{encodePath:h,decodePath:p},slash:{encodePath:p,decodePath:p}};function R(t){var n=t.indexOf("#");return-1===n?t:t.slice(0,n)}function S(){var t=window.location.href,n=t.indexOf("#");return-1===n?"":t.substring(n+1)}function T(t){window.location.replace(R(window.location.href)+"#"+t)}function A(t){void 0===t&&(t={}),w||l(!1);var n=window.history,e=(window.navigator.userAgent.indexOf("Firefox"),t),r=e.getUserConfirmation,o=void 0===r?b:r,i=e.hashType,c=void 0===i?"slash":i,u=t.basename?v(p(t.basename)):"",s=k[c],f=s.encodePath,h=s.decodePath;function x(){var t=h(S());return u&&(t=d(t,u)),y(t)}var P=g();function O(t){(0,a.Z)(F,t),F.length=n.length,P.notifyListeners(F.location,F.action)}var E=!1,A=null;function _(){var t,n,e=S(),r=f(e);if(e!==r)T(r);else{var i=x(),a=F.location;if(!E&&(n=i,(t=a).pathname===n.pathname&&t.search===n.search&&t.hash===n.hash))return;if(A===m(i))return;A=null,function(t){if(E)E=!1,O();else{P.confirmTransitionTo(t,"POP",o,(function(n){n?O({action:"POP",location:t}):function(t){var n=F.location,e=Z.lastIndexOf(m(n));-1===e&&(e=0);var r=Z.lastIndexOf(m(t));-1===r&&(r=0);var o=e-r;o&&(E=!0,j(o))}(t)}))}}(i)}}var $=S(),L=f($);$!==L&&T(L);var M=x(),Z=[m(M)];function j(t){n.go(t)}var U=0;function N(t){1===(U+=t)&&1===t?window.addEventListener(C,_):0===U&&window.removeEventListener(C,_)}var I=!1,F={length:n.length,action:"POP",location:M,createHref:function(t){var n=document.querySelector("base"),e="";return n&&n.getAttribute("href")&&(e=R(window.location.href)),e+"#"+f(u+m(t))},push:function(t,n){var e="PUSH",r=y(t,void 0,void 0,F.location);P.confirmTransitionTo(r,e,o,(function(t){if(t){var n=m(r),o=f(u+n);if(S()!==o){A=n,function(t){window.location.hash=t}(o);var i=Z.lastIndexOf(m(F.location)),a=Z.slice(0,i+1);a.push(n),Z=a,O({action:e,location:r})}else O()}}))},replace:function(t,n){var e="REPLACE",r=y(t,void 0,void 0,F.location);P.confirmTransitionTo(r,e,o,(function(t){if(t){var n=m(r),o=f(u+n);S()!==o&&(A=n,T(o));var i=Z.indexOf(m(F.location));-1!==i&&(Z[i]=n),O({action:e,location:r})}}))},go:j,goBack:function(){j(-1)},goForward:function(){j(1)},block:function(t){void 0===t&&(t=!1);var n=P.setPrompt(t);return I||(N(1),I=!0),function(){return I&&(I=!1,N(-1)),n()}},listen:function(t){var n=P.appendListener(t);return N(1),function(){N(-1),n()}}};return F}function _(t,n,e){return Math.min(Math.max(t,n),e)}function $(t){void 0===t&&(t={});var n=t,e=n.getUserConfirmation,r=n.initialEntries,o=void 0===r?["/"]:r,i=n.initialIndex,c=void 0===i?0:i,u=n.keyLength,s=void 0===u?6:u,f=g();function l(t){(0,a.Z)(b,t),b.length=b.entries.length,f.notifyListeners(b.location,b.action)}function p(){return Math.random().toString(36).substr(2,s)}var h=_(c,0,o.length-1),d=o.map((function(t){return y(t,void 0,"string"==typeof t?p():t.key||p())})),v=m;function w(t){var n=_(b.index+t,0,b.entries.length-1),r=b.entries[n];f.confirmTransitionTo(r,"POP",e,(function(t){t?l({action:"POP",location:r,index:n}):l()}))}var b={length:d.length,action:"POP",location:d[h],index:h,entries:d,createHref:v,push:function(t,n){var r="PUSH",o=y(t,n,p(),b.location);f.confirmTransitionTo(o,r,e,(function(t){if(t){var n=b.index+1,e=b.entries.slice(0);e.length>n?e.splice(n,e.length-n,o):e.push(o),l({action:r,location:o,index:n,entries:e})}}))},replace:function(t,n){var r="REPLACE",o=y(t,n,p(),b.location);f.confirmTransitionTo(o,r,e,(function(t){t&&(b.entries[b.index]=o,l({action:r,location:o}))}))},go:w,goBack:function(){w(-1)},goForward:function(){w(1)},canGo:function(t){var n=b.index+t;return n>=0&&n<b.entries.length},block:function(t){return void 0===t&&(t=!1),f.setPrompt(t)},listen:function(t){return f.appendListener(t)}};return b}var L=e(5697),M=e.n(L),Z=1073741823,j="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e.g?e.g:{};function U(t){var n=[];return{on:function(t){n.push(t)},off:function(t){n=n.filter((function(n){return n!==t}))},get:function(){return t},set:function(e,r){t=e,n.forEach((function(n){return n(t,r)}))}}}const N=i().createContext||function(t,n){var e,i,a,c="__create-react-context-"+((j[a="__global_unique_id__"]=(j[a]||0)+1)+"__"),u=function(t){function e(){var n;return(n=t.apply(this,arguments)||this).emitter=U(n.props.value),n}(0,r.Z)(e,t);var o=e.prototype;return o.getChildContext=function(){var t;return(t={})[c]=this.emitter,t},o.componentWillReceiveProps=function(t){if(this.props.value!==t.value){var e,r=this.props.value,o=t.value;((i=r)===(a=o)?0!==i||1/i==1/a:i!=i&&a!=a)?e=0:(e="function"==typeof n?n(r,o):Z,0!=(e|=0)&&this.emitter.set(t.value,e))}var i,a},o.render=function(){return this.props.children},e}(o.Component);u.childContextTypes=((e={})[c]=M().object.isRequired,e);var s=function(n){function e(){var t;return(t=n.apply(this,arguments)||this).state={value:t.getValue()},t.onUpdate=function(n,e){0!=((0|t.observedBits)&e)&&t.setState({value:t.getValue()})},t}(0,r.Z)(e,n);var o=e.prototype;return o.componentWillReceiveProps=function(t){var n=t.observedBits;this.observedBits=null==n?Z:n},o.componentDidMount=function(){this.context[c]&&this.context[c].on(this.onUpdate);var t=this.props.observedBits;this.observedBits=null==t?Z:t},o.componentWillUnmount=function(){this.context[c]&&this.context[c].off(this.onUpdate)},o.getValue=function(){return this.context[c]?this.context[c].get():t},o.render=function(){return(t=this.props.children,Array.isArray(t)?t[0]:t)(this.state.value);var t},e}(o.Component);return s.contextTypes=((i={})[c]=M().object,i),{Provider:u,Consumer:s}};var I=e(9658),F=e.n(I),B=(e(9864),e(3366)),H=e(8679),D=e.n(H),W=function(t){var n=N();return n.displayName=t,n},V=W("Router-History"),q=W("Router"),K=function(t){function n(n){var e;return(e=t.call(this,n)||this).state={location:n.history.location},e._isMounted=!1,e._pendingLocation=null,n.staticContext||(e.unlisten=n.history.listen((function(t){e._pendingLocation=t}))),e}(0,r.Z)(n,t),n.computeRootMatch=function(t){return{path:"/",url:"/",params:{},isExact:"/"===t}};var e=n.prototype;return e.componentDidMount=function(){var t=this;this._isMounted=!0,this.unlisten&&this.unlisten(),this.props.staticContext||(this.unlisten=this.props.history.listen((function(n){t._isMounted&&t.setState({location:n})}))),this._pendingLocation&&this.setState({location:this._pendingLocation})},e.componentWillUnmount=function(){this.unlisten&&(this.unlisten(),this._isMounted=!1,this._pendingLocation=null)},e.render=function(){return i().createElement(q.Provider,{value:{history:this.props.history,location:this.state.location,match:n.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},i().createElement(V.Provider,{children:this.props.children||null,value:this.props.history}))},n}(i().Component),z=function(t){function n(){for(var n,e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return(n=t.call.apply(t,[this].concat(r))||this).history=$(n.props),n}return(0,r.Z)(n,t),n.prototype.render=function(){return i().createElement(K,{history:this.history,children:this.props.children})},n}(i().Component),J=function(t){function n(){return t.apply(this,arguments)||this}(0,r.Z)(n,t);var e=n.prototype;return e.componentDidMount=function(){this.props.onMount&&this.props.onMount.call(this,this)},e.componentDidUpdate=function(t){this.props.onUpdate&&this.props.onUpdate.call(this,this,t)},e.componentWillUnmount=function(){this.props.onUnmount&&this.props.onUnmount.call(this,this)},e.render=function(){return null},n}(i().Component);function G(t){var n=t.message,e=t.when,r=void 0===e||e;return i().createElement(q.Consumer,null,(function(t){if(t||l(!1),!r||t.staticContext)return null;var e=t.history.block;return i().createElement(J,{onMount:function(t){t.release=e(n)},onUpdate:function(t,r){r.message!==n&&(t.release(),t.release=e(n))},onUnmount:function(t){t.release()},message:n})}))}var Y={},Q=0;function X(t,n){return void 0===t&&(t="/"),void 0===n&&(n={}),"/"===t?t:function(t){if(Y[t])return Y[t];var n=F().compile(t);return Q<1e4&&(Y[t]=n,Q++),n}(t)(n,{pretty:!0})}function tt(t){var n=t.computedMatch,e=t.to,r=t.push,o=void 0!==r&&r;return i().createElement(q.Consumer,null,(function(t){t||l(!1);var r=t.history,c=t.staticContext,u=o?r.push:r.replace,s=y(n?"string"==typeof e?X(e,n.params):(0,a.Z)({},e,{pathname:X(e.pathname,n.params)}):e);return c?(u(s),null):i().createElement(J,{onMount:function(){u(s)},onUpdate:function(t,n){var e,r,o=y(n.to);e=o,r=(0,a.Z)({},s,{key:o.key}),e.pathname===r.pathname&&e.search===r.search&&e.hash===r.hash&&e.key===r.key&&f(e.state,r.state)||u(s)},to:e})}))}var nt={},et=0;function rt(t,n){void 0===n&&(n={}),("string"==typeof n||Array.isArray(n))&&(n={path:n});var e=n,r=e.path,o=e.exact,i=void 0!==o&&o,a=e.strict,c=void 0!==a&&a,u=e.sensitive,s=void 0!==u&&u;return[].concat(r).reduce((function(n,e){if(!e&&""!==e)return null;if(n)return n;var r=function(t,n){var e=""+n.end+n.strict+n.sensitive,r=nt[e]||(nt[e]={});if(r[t])return r[t];var o=[],i={regexp:F()(t,o,n),keys:o};return et<1e4&&(r[t]=i,et++),i}(e,{end:i,strict:c,sensitive:s}),o=r.regexp,a=r.keys,u=o.exec(t);if(!u)return null;var f=u[0],l=u.slice(1),p=t===f;return i&&!p?null:{path:e,url:"/"===e&&""===f?"/":f,isExact:p,params:a.reduce((function(t,n,e){return t[n.name]=l[e],t}),{})}}),null)}var ot=function(t){function n(){return t.apply(this,arguments)||this}return(0,r.Z)(n,t),n.prototype.render=function(){var t=this;return i().createElement(q.Consumer,null,(function(n){n||l(!1);var e=t.props.location||n.location,r=t.props.computedMatch?t.props.computedMatch:t.props.path?rt(e.pathname,t.props):n.match,o=(0,a.Z)({},n,{location:e,match:r}),c=t.props,u=c.children,s=c.component,f=c.render;return Array.isArray(u)&&function(t){return 0===i().Children.count(t)}(u)&&(u=null),i().createElement(q.Provider,{value:o},o.match?u?"function"==typeof u?u(o):u:s?i().createElement(s,o):f?f(o):null:"function"==typeof u?u(o):null)}))},n}(i().Component);function it(t){return"/"===t.charAt(0)?t:"/"+t}function at(t,n){if(!t)return n;var e=it(t);return 0!==n.pathname.indexOf(e)?n:(0,a.Z)({},n,{pathname:n.pathname.substr(e.length)})}function ct(t){return"string"==typeof t?t:m(t)}function ut(t){return function(){l(!1)}}function st(){}var ft=function(t){function n(){for(var n,e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return(n=t.call.apply(t,[this].concat(r))||this).handlePush=function(t){return n.navigateTo(t,"PUSH")},n.handleReplace=function(t){return n.navigateTo(t,"REPLACE")},n.handleListen=function(){return st},n.handleBlock=function(){return st},n}(0,r.Z)(n,t);var e=n.prototype;return e.navigateTo=function(t,n){var e=this.props,r=e.basename,o=void 0===r?"":r,i=e.context,c=void 0===i?{}:i;c.action=n,c.location=function(t,n){return t?(0,a.Z)({},n,{pathname:it(t)+n.pathname}):n}(o,y(t)),c.url=ct(c.location)},e.render=function(){var t=this.props,n=t.basename,e=void 0===n?"":n,r=t.context,o=void 0===r?{}:r,c=t.location,u=void 0===c?"/":c,s=(0,B.Z)(t,["basename","context","location"]),f={createHref:function(t){return it(e+ct(t))},action:"POP",location:at(e,y(u)),push:this.handlePush,replace:this.handleReplace,go:ut(),goBack:ut(),goForward:ut(),listen:this.handleListen,block:this.handleBlock};return i().createElement(K,(0,a.Z)({},s,{history:f,staticContext:o}))},n}(i().Component),lt=function(t){function n(){return t.apply(this,arguments)||this}return(0,r.Z)(n,t),n.prototype.render=function(){var t=this;return i().createElement(q.Consumer,null,(function(n){n||l(!1);var e,r,o=t.props.location||n.location;return i().Children.forEach(t.props.children,(function(t){if(null==r&&i().isValidElement(t)){e=t;var c=t.props.path||t.props.from;r=c?rt(o.pathname,(0,a.Z)({},t.props,{path:c})):n.match}})),r?i().cloneElement(e,{location:o,computedMatch:r}):null}))},n}(i().Component);function pt(t){var n="withRouter("+(t.displayName||t.name)+")",e=function(n){var e=n.wrappedComponentRef,r=(0,B.Z)(n,["wrappedComponentRef"]);return i().createElement(q.Consumer,null,(function(n){return n||l(!1),i().createElement(t,(0,a.Z)({},r,n,{ref:e}))}))};return e.displayName=n,e.WrappedComponent=t,D()(e,t)}var ht=i().useContext;function dt(){return ht(V)}function vt(){return ht(q).location}function mt(){var t=ht(q).match;return t?t.params:{}}function yt(t){var n=vt(),e=ht(q).match;return t?rt(n.pathname,t):e}var gt=function(t){function n(){for(var n,e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return(n=t.call.apply(t,[this].concat(r))||this).history=E(n.props),n}return(0,r.Z)(n,t),n.prototype.render=function(){return i().createElement(K,{history:this.history,children:this.props.children})},n}(i().Component),wt=function(t){function n(){for(var n,e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return(n=t.call.apply(t,[this].concat(r))||this).history=A(n.props),n}return(0,r.Z)(n,t),n.prototype.render=function(){return i().createElement(K,{history:this.history,children:this.props.children})},n}(i().Component),bt=function(t,n){return"function"==typeof t?t(n):t},xt=function(t,n){return"string"==typeof t?y(t,null,null,n):t},Pt=function(t){return t},Ot=i().forwardRef;void 0===Ot&&(Ot=Pt);var Et=Ot((function(t,n){var e=t.innerRef,r=t.navigate,o=t.onClick,c=(0,B.Z)(t,["innerRef","navigate","onClick"]),u=c.target,s=(0,a.Z)({},c,{onClick:function(t){try{o&&o(t)}catch(n){throw t.preventDefault(),n}t.defaultPrevented||0!==t.button||u&&"_self"!==u||function(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}(t)||(t.preventDefault(),r())}});return s.ref=Pt!==Ot&&n||e,i().createElement("a",s)})),Ct=Ot((function(t,n){var e=t.component,r=void 0===e?Et:e,o=t.replace,c=t.to,u=t.innerRef,s=(0,B.Z)(t,["component","replace","to","innerRef"]);return i().createElement(q.Consumer,null,(function(t){t||l(!1);var e=t.history,f=xt(bt(c,t.location),t.location),p=f?e.createHref(f):"",h=(0,a.Z)({},s,{href:p,navigate:function(){var n=bt(c,t.location),r=m(t.location)===m(xt(n));(o||r?e.replace:e.push)(n)}});return Pt!==Ot?h.ref=n||u:h.innerRef=u,i().createElement(r,h)}))})),kt=function(t){return t},Rt=i().forwardRef;void 0===Rt&&(Rt=kt);var St=Rt((function(t,n){var e=t["aria-current"],r=void 0===e?"page":e,o=t.activeClassName,c=void 0===o?"active":o,u=t.activeStyle,s=t.className,f=t.exact,p=t.isActive,h=t.location,d=t.sensitive,v=t.strict,m=t.style,y=t.to,g=t.innerRef,w=(0,B.Z)(t,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return i().createElement(q.Consumer,null,(function(t){t||l(!1);var e=h||t.location,o=xt(bt(y,e),e),b=o.pathname,x=b&&b.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),P=x?rt(e.pathname,{path:x,exact:f,sensitive:d,strict:v}):null,O=!!(p?p(P,e):P),E="function"==typeof s?s(O):s,C="function"==typeof m?m(O):m;O&&(E=function(){for(var t=arguments.length,n=new Array(t),e=0;e<t;e++)n[e]=arguments[e];return n.filter((function(t){return t})).join(" ")}(E,c),C=(0,a.Z)({},C,u));var k=(0,a.Z)({"aria-current":O&&r||null,className:E,style:C,to:o},w);return kt!==Rt?k.ref=n||g:k.innerRef=g,i().createElement(Ct,k)}))}))},6585:t=>{t.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}},9658:(t,n,e)=>{var r=e(6585);t.exports=function t(n,e,o){return r(e)||(o=e||o,e=[]),o=o||{},n instanceof RegExp?function(t,n){var e=t.source.match(/\((?!\?)/g);if(e)for(var r=0;r<e.length;r++)n.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return f(t,n)}(n,e):r(n)?function(n,e,r){for(var o=[],i=0;i<n.length;i++)o.push(t(n[i],e,r).source);return f(new RegExp("(?:"+o.join("|")+")",l(r)),e)}(n,e,o):function(t,n,e){return p(i(t,e),n,e)}(n,e,o)},t.exports.parse=i,t.exports.compile=function(t,n){return c(i(t,n),n)},t.exports.tokensToFunction=c,t.exports.tokensToRegExp=p;var o=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function i(t,n){for(var e,r=[],i=0,a=0,c="",f=n&&n.delimiter||"/";null!=(e=o.exec(t));){var l=e[0],p=e[1],h=e.index;if(c+=t.slice(a,h),a=h+l.length,p)c+=p[1];else{var d=t[a],v=e[2],m=e[3],y=e[4],g=e[5],w=e[6],b=e[7];c&&(r.push(c),c="");var x=null!=v&&null!=d&&d!==v,P="+"===w||"*"===w,O="?"===w||"*"===w,E=e[2]||f,C=y||g;r.push({name:m||i++,prefix:v||"",delimiter:E,optional:O,repeat:P,partial:x,asterisk:!!b,pattern:C?s(C):b?".*":"[^"+u(E)+"]+?"})}}return a<t.length&&(c+=t.substr(a)),c&&r.push(c),r}function a(t){return encodeURI(t).replace(/[\/?#]/g,(function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()}))}function c(t,n){for(var e=new Array(t.length),o=0;o<t.length;o++)"object"==typeof t[o]&&(e[o]=new RegExp("^(?:"+t[o].pattern+")$",l(n)));return function(n,o){for(var i="",c=n||{},u=(o||{}).pretty?a:encodeURIComponent,s=0;s<t.length;s++){var f=t[s];if("string"!=typeof f){var l,p=c[f.name];if(null==p){if(f.optional){f.partial&&(i+=f.prefix);continue}throw new TypeError('Expected "'+f.name+'" to be defined')}if(r(p)){if(!f.repeat)throw new TypeError('Expected "'+f.name+'" to not repeat, but received `'+JSON.stringify(p)+"`");if(0===p.length){if(f.optional)continue;throw new TypeError('Expected "'+f.name+'" to not be empty')}for(var h=0;h<p.length;h++){if(l=u(p[h]),!e[s].test(l))throw new TypeError('Expected all "'+f.name+'" to match "'+f.pattern+'", but received `'+JSON.stringify(l)+"`");i+=(0===h?f.prefix:f.delimiter)+l}}else{if(l=f.asterisk?encodeURI(p).replace(/[?#]/g,(function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})):u(p),!e[s].test(l))throw new TypeError('Expected "'+f.name+'" to match "'+f.pattern+'", but received "'+l+'"');i+=f.prefix+l}}else i+=f}return i}}function u(t){return t.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function s(t){return t.replace(/([=!:$\/()])/g,"\\$1")}function f(t,n){return t.keys=n,t}function l(t){return t&&t.sensitive?"":"i"}function p(t,n,e){r(n)||(e=n||e,n=[]);for(var o=(e=e||{}).strict,i=!1!==e.end,a="",c=0;c<t.length;c++){var s=t[c];if("string"==typeof s)a+=u(s);else{var p=u(s.prefix),h="(?:"+s.pattern+")";n.push(s),s.repeat&&(h+="(?:"+p+h+")*"),a+=h=s.optional?s.partial?p+"("+h+")?":"(?:"+p+"("+h+"))?":p+"("+h+")"}}var d=u(e.delimiter||"/"),v=a.slice(-d.length)===d;return o||(a=(v?a.slice(0,-d.length):a)+"(?:"+d+"(?=$))?"),a+=i?"$":o&&v?"":"(?="+d+"|$)",f(new RegExp("^"+a,l(e)),n)}},7462:(t,n,e)=>{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t},r.apply(this,arguments)}e.d(n,{Z:()=>r})},1721:(t,n,e)=>{"use strict";function r(t,n){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t},r(t,n)}function o(t,n){t.prototype=Object.create(n.prototype),t.prototype.constructor=t,r(t,n)}e.d(n,{Z:()=>o})},3366:(t,n,e)=>{"use strict";function r(t,n){if(null==t)return{};var e,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)e=i[r],n.indexOf(e)>=0||(o[e]=t[e]);return o}e.d(n,{Z:()=>r})}}]);
|
package/dist/350.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_openmrs_esm_fast_data_entry_app=self.webpackChunk_openmrs_esm_fast_data_entry_app||[]).push([[350],{6350:(e,t,n)=>{n.r(t),n.d(t,{default:()=>G});var a=n(7114),r=n(7103),i=n(311),o=n(3755),l=n(4211),s=n.n(l),c=n(2221),m=n(5666),d=n.n(m);function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function u(e,t,n,a,r,i,o){try{var l=e[i](o),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(a,r)}const p=function(e){var t,n,a=(t=(0,l.useState)(null),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,i=[],o=!0,l=!1;try{for(n=n.call(e);!(o=(a=n.next()).done)&&(i.push(a.value),!t||i.length!==t);o=!0);}catch(e){l=!0,r=e}finally{try{o||null==n.return||n.return()}finally{if(l)throw r}}return i}}(t,n)||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}}(t,n)||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.")}()),r=a[0],o=a[1];(0,l.useEffect)((function(){e?m(e):o(null)}),[e]);var s,c,m=(s=d().mark((function e(t){var n;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,i.fetchCurrentPatient)(t);case 2:n=e.sent,o(null==n?void 0:n.data);case 4:case"end":return e.stop()}}),e)})),c=function(){var e=this,t=arguments;return new Promise((function(n,a){var r=s.apply(e,t);function i(e){u(r,n,a,i,o,"next",e)}function o(e){u(r,n,a,i,o,"throw",e)}i(void 0)}))},function(e){return c.apply(this,arguments)});return r},_=function(e){var t=e.formUuid,n=e.patientUuid,a=e.visitUuid,r=e.visitTypeUuid,o=e.encounterUuid,l=p(n);return s().createElement("div",null,t&&n&&l&&s().createElement(i.ExtensionSlot,{extensionSlotName:"form-widget-slot",state:{view:"form",formUuid:t,visitUuid:null!=a?a:"",visitTypeUuid:null!=r?r:"",patientUuid:n,patient:l,encounterUuid:null!=o?o:"",closeWorkspace:function(){}}}))};var y=function(e){var t=e.children;return s().createElement("div",{style:{padding:"1rem"}},t)};const h=function(e){var t,n,a,r,i,l,c,m=e.patientUuid,d=p(m),f=null==d||null===(t=d.name)||void 0===t||null===(n=t[0])||void 0===n||null===(a=n.given)||void 0===a?void 0:a[0],u=null==d||null===(r=d.name)||void 0===r||null===(i=r[0])||void 0===i?void 0:i.family,_=null==d||null===(l=d.identifier)||void 0===l||null===(c=l[0])||void 0===c?void 0:c.value;return d?s().createElement(y,null,s().createElement("div",{style:{fontWeight:300,fontSize:"0.8rem",lineHeight:"0.9rem"}},_),s().createElement("div",{style:{fontWeight:"bold"}},f," ",u)):s().createElement(y,null,s().createElement(o.SkeletonText,{style:{maxWidth:"8rem"}}))};var g=n(3379),v=n.n(g),b=n(7795),E=n.n(b),w=n(569),x=n.n(w),S=n(3565),I=n.n(S),k=n(9216),A=n.n(k),C=n(4589),U=n.n(C),N=n(8407),P={};P.styleTagTransform=U(),P.setAttributes=I(),P.insert=x().bind(null,"head"),P.domAPI=E(),P.insertStyleElement=A(),v()(N.Z,P);const T=N.Z&&N.Z.locals?N.Z.locals:void 0;var j=n(4595),Z=n(1444),z=n(3397);function B(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var O=function(){return s().createElement("div",{className:T.container},s().createElement("div",{className:T.patientInfoContainer},s().createElement(o.SkeletonPlaceholder,null),s().createElement("div",{className:T.patientInfoContent},s().createElement("div",{className:T.patientInfoRow},s().createElement("span",{className:T.patientName},s().createElement(o.SkeletonText,null))),s().createElement("div",{className:T.patientInfoRow},s().createElement("div",{className:T.demographics},s().createElement("span",null,s().createElement(o.SkeletonText,null)),s().createElement("span",null,s().createElement(o.SkeletonText,null)),s().createElement("span",null,s().createElement(o.SkeletonText,null)))),s().createElement("div",{className:T.patientInfoRow},s().createElement("span",{className:T.identifier},s().createElement(o.SkeletonText,null))))))};const R=function(e){var t,n,a,r,c,m,d,f=e.patientUuid,u=p(f),_=(0,z.useTranslation)().t,y=(m=(0,l.useState)(!1),d=2,function(e){if(Array.isArray(e))return e}(m)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,i=[],o=!0,l=!1;try{for(n=n.call(e);!(o=(a=n.next()).done)&&(i.push(a.value),!t||i.length!==t);o=!0);}catch(e){l=!0,r=e}finally{try{o||null==n.return||n.return()}finally{if(l)throw r}}return i}}(m,d)||function(e,t){if(e){if("string"==typeof e)return B(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)?B(e,t):void 0}}(m,d)||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.")}()),h=y[0],g=y[1],v="".concat(null===(n=null==u||null===(t=u.name)||void 0===t?void 0:t[0].given)||void 0===n?void 0:n.join(" ")," ").concat(null==u||null===(a=u.name)||void 0===a||null===(r=a[0])||void 0===r?void 0:r.family),b=s().useMemo((function(){return{patientUuid:null==u?void 0:u.id,patientName:v}}),[null==u?void 0:u.id,v]);return u?s().createElement("div",{className:T.container},s().createElement("div",{className:"".concat(h?T.activePatientInfoContainer:T.patientInfoContainer)},s().createElement(i.ExtensionSlot,{extensionSlotName:"patient-photo-slot",state:b}),s().createElement("div",{className:T.patientInfoContent},s().createElement("div",{className:T.patientInfoRow},s().createElement("span",{className:T.patientName},v)),s().createElement("div",{className:T.patientInfoRow},s().createElement("div",{className:T.demographics},s().createElement("span",null,(null!==(c=u.gender)&&void 0!==c?c:_("unknown","Unknown")).replace(/^\w/,(function(e){return e.toUpperCase()}))," ","·"," "),s().createElement("span",null,(0,i.age)(u.birthDate)," · "),s().createElement("span",null,(0,i.formatDate)((0,i.parseDate)(u.birthDate),{mode:"wide",time:!1})))),s().createElement("div",{className:T.patientInfoRow},s().createElement("span",{className:T.identifier},u.identifier.length?u.identifier.map((function(e){return e.value})).join(", "):"--"),s().createElement(o.Button,{kind:"ghost",renderIcon:h?Z.Z:j.Z,iconDescription:"Toggle contact details",onClick:function(e){return function(e){e.stopPropagation(),g((function(e){return!e}))}(e)},disabled:!0},h?_("showLess","Show less"):_("showAllDetails","Show all details")))))):s().createElement(O,null)};var M=n(2275),X={};X.styleTagTransform=U(),X.setAttributes=I(),X.insert=x().bind(null,"head"),X.domAPI=E(),X.insertStyleElement=A(),v()(M.Z,X);const q=M.Z&&M.Z.locals?M.Z.locals:void 0;function D(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function W(){return W=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},W.apply(this,arguments)}function H(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 a,r,i=[],o=!0,l=!1;try{for(n=n.call(e);!(o=(a=n.next()).done)&&(i.push(a.value),!t||i.length!==t);o=!0);}catch(e){l=!0,r=e}finally{try{o||null==n.return||n.return()}finally{if(l)throw r}}return i}}(e,t)||Q(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 Q(e,t){if(e){if("string"==typeof e)return D(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)?D(e,t):void 0}}var F=function(e){var t=e.patientUuids,n=e.setPatientUuids,l=e.setActivePatientUuid;return s().createElement("div",{style:{display:"flex",backgroundColor:"white",padding:"2rem 1rem"}},s().createElement("span",{style:{padding:"1rem"}},"Next patient:"),s().createElement("span",{style:{minWidth:"35rem"}},s().createElement(i.ExtensionSlot,{extensionSlotName:"patient-search-bar-slot",state:{selectPatientAction:function(e){var a;n((a=t,function(e){if(Array.isArray(e))return D(e)}(a)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(a)||Q(a)||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([e])),l(e)},buttonProps:{kind:"primary"}}})),s().createElement("span",{style:{padding:"1rem"}},"or"),s().createElement("span",null,s().createElement(o.Button,{disabled:!0},"Create new patient ",s().createElement(a.RVU,null))),s().createElement("span",{style:{flexGrow:1}}),s().createElement("span",null,s().createElement(o.Button,{kind:"ghost",disabled:!0},"Cancel ",s().createElement(r.dOq,null))))};const G=function(){var e=(0,c.useParams)().formUuid,t=H((0,l.useState)([]),2),n=t[0],a=t[1],r=H((0,l.useState)(null),2),m=r[0],d=r[1];return s().createElement("div",null,s().createElement("div",{className:q.breadcrumbsContainer},s().createElement(i.ExtensionSlot,{extensionSlotName:"breadcrumbs-slot"})),!m&&s().createElement(F,W({},{patientUuids:n,setPatientUuids:a,setActivePatientUuid:d})),m&&s().createElement(R,{patientUuid:m}),s().createElement("div",{style:{display:"flex",justifyContent:"center"}},s().createElement("div",{style:{width:"1100px"}},!n.length&&s().createElement("div",{style:{margin:"2rem",textAlign:"center"}},"Please select a patient first"),!!n.length&&s().createElement("div",{className:q.formContainer},s().createElement("div",{style:{flexGrow:1}},s().createElement(_,W({patientUuid:m},{formUuid:e}))),s().createElement("div",{style:{width:"13rem",textAlign:"left"}},s().createElement("h4",null,"Forms filled"),s().createElement("div",{style:{margin:"1rem 0",borderBottom:"1px solid #f4f4f4"}},n.map((function(e){return s().createElement(h,{patientUuid:e,key:e})}))),s().createElement("div",{style:{display:"flex",flexDirection:"column",rowGap:"0.5rem"}},s().createElement(o.Button,{kind:"primary",onClick:function(){return d(null)},style:{width:"100%"}},"Next Patient"),s().createElement(o.Button,{kind:"secondary",disabled:!0,style:{width:"100%"}},"Review & Save"),s().createElement(o.Button,{kind:"tertiary",disabled:!0,style:{width:"100%"}},"Cancel")))))))}},8407:(e,t,n)=>{n.d(t,{Z:()=>i});var a=n(3645),r=n.n(a)()((function(e){return e[1]}));r.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;font:inherit;font-size:100%;vertical-align:baseline;border:0}button,select,input,textarea{font-family:inherit;border-radius:0}input[type=text]::-ms-clear{display:none}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section{display:block}body{line-height:1}sup{vertical-align:super}sub{vertical-align:sub}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote::before,blockquote::after,q::before,q::after{content:\"\"}table{border-collapse:collapse;border-spacing:0}*{box-sizing:border-box}button{margin:0}html{font-size:100%}body{font-weight:400;font-family:'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}code{font-family:'IBM Plex Mono', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', Courier, monospace}strong{font-weight:600}@media screen and (-ms-high-contrast: active){svg{fill:ButtonText}}h1{font-size:2.625rem;font-weight:300;line-height:1.199;letter-spacing:0}h2{font-size:2rem;font-weight:400;line-height:1.25;letter-spacing:0}h3{font-size:1.75rem;font-weight:400;line-height:1.29;letter-spacing:0}h4{font-size:1.25rem;font-weight:400;line-height:1.4;letter-spacing:0}h5{font-size:1rem;font-weight:600;line-height:1.375;letter-spacing:0}h6{font-size:.875rem;font-weight:600;line-height:1.29;letter-spacing:.16px}p{font-size:1rem;font-weight:400;line-height:1.5;letter-spacing:0}a{color:#0f62fe}em{font-style:italic}@keyframes -esm-fast-data-entry__patient-info__skeleton___SIgE4{0%{transform:scaleX(0);transform-origin:left;opacity:.3}20%{transform:scaleX(1);transform-origin:left;opacity:1}28%{transform:scaleX(1);transform-origin:right}51%{transform:scaleX(0);transform-origin:right}58%{transform:scaleX(0);transform-origin:right}82%{transform:scaleX(1);transform-origin:right}83%{transform:scaleX(1);transform-origin:left}96%{transform:scaleX(0);transform-origin:left}100%{transform:scaleX(0);transform-origin:left;opacity:.3}}.-esm-fast-data-entry__patient-info__container___TUAaR{border-bottom:.0125rem solid #c6c6c6;background-color:#fff;padding:0}.-esm-fast-data-entry__patient-info__patientInfoContainer___A-vPU{padding:0 0 0 1rem;display:flex;align-items:center;min-height:7rem}.-esm-fast-data-entry__patient-info__activePatientInfoContainer___F5QkZ{background-color:#edf5ff;padding:0 0 0 1rem;display:flex;align-items:center;min-height:7rem}.-esm-fast-data-entry__patient-info__patientName___jlZOP{font-size:1.25rem;font-weight:400;line-height:1.4;letter-spacing:0}.-esm-fast-data-entry__patient-info__patientInfoContent___AdJAM{margin:1rem 0 0 1rem;width:100%}.-esm-fast-data-entry__patient-info__demographics___jDIQX{font-size:1rem;font-weight:400;line-height:1.375;letter-spacing:0;color:#525252;margin-top:.25rem}.-esm-fast-data-entry__patient-info__identifier___g\\+HbB{font-size:1rem;font-weight:400;line-height:1.375;letter-spacing:0;color:#8d8d8d}.-esm-fast-data-entry__patient-info__patientInfoRow___4rtW5{display:flex;justify-content:space-between;align-items:center}.-esm-fast-data-entry__patient-info__patientInfoRow___4rtW5>button{min-height:2rem}.-esm-fast-data-entry__patient-info__patientEditBtn___lP3pm{color:#161616;margin:.5rem}",""]),r.locals={container:"-esm-fast-data-entry__patient-info__container___TUAaR",patientInfoContainer:"-esm-fast-data-entry__patient-info__patientInfoContainer___A-vPU",activePatientInfoContainer:"-esm-fast-data-entry__patient-info__activePatientInfoContainer___F5QkZ",patientName:"-esm-fast-data-entry__patient-info__patientName___jlZOP",patientInfoContent:"-esm-fast-data-entry__patient-info__patientInfoContent___AdJAM",demographics:"-esm-fast-data-entry__patient-info__demographics___jDIQX",identifier:"-esm-fast-data-entry__patient-info__identifier___g+HbB",patientInfoRow:"-esm-fast-data-entry__patient-info__patientInfoRow___4rtW5",patientEditBtn:"-esm-fast-data-entry__patient-info__patientEditBtn___lP3pm",skeleton:"-esm-fast-data-entry__patient-info__skeleton___SIgE4"};const i=r},2275:(e,t,n)=>{n.d(t,{Z:()=>i});var a=n(3645),r=n.n(a)()((function(e){return e[1]}));r.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-fast-data-entry__styles__breadcrumbsContainer___ToO0y>div>div>nav{background-color:#fff;padding:.5rem;border-bottom:1px solid #f4f4f4}.-esm-fast-data-entry__styles__formContainer___KZsne{display:flex;text-align:center;margin-top:1rem}",""]),r.locals={breadcrumbsContainer:"-esm-fast-data-entry__styles__breadcrumbsContainer___ToO0y",formContainer:"-esm-fast-data-entry__styles__formContainer___KZsne"};const i=r}}]);
|
package/dist/418.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_openmrs_esm_fast_data_entry_app=self.webpackChunk_openmrs_esm_fast_data_entry_app||[]).push([[418],{1418:(e,n,t)=>{"use strict";t.r(n),t.d(n,{I18nContext:()=>k,I18nextProvider:()=>le,Trans:()=>G,Translation:()=>ue,composeInitialProps:()=>A,date:()=>ye,getDefaults:()=>I,getI18n:()=>R,getInitialProps:()=>L,initReactI18next:()=>T,number:()=>he,plural:()=>be,select:()=>ve,selectOrdinal:()=>Oe,setDefaults:()=>N,setI18n:()=>D,time:()=>me,useSSR:()=>fe,useTranslation:()=>re,withSSR:()=>ge,withTranslation:()=>ce});var r=t(3366);function o(e,n){if(null==e)return{};var t,o,i=(0,r.Z)(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)t=a[o],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var c=t(4211),s=t(1739),u=t.n(s),l=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function f(e){var n={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},t=e.match(/<\/?([^\s]+?)[/\s>]/);if(t&&(n.name=t[1],(u()[t[1]]||"/"===e.charAt(e.length-2))&&(n.voidElement=!0),n.name.startsWith("!--"))){var r=e.indexOf("--\x3e");return{type:"comment",comment:-1!==r?e.slice(4,r):""}}for(var o=new RegExp(l),i=null;null!==(i=o.exec(e));)if(i[0].trim())if(i[1]){var a=i[1].trim(),c=[a,""];a.indexOf("=")>-1&&(c=a.split("=")),n.attrs[c[0]]=c[1],o.lastIndex--}else i[2]&&(n.attrs[i[2]]=i[3].trim().substring(1,i[3].length-1));return n}var p=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,d=/^\s*$/,g=Object.create(null);function y(e,n){switch(n.type){case"text":return e+n.content;case"tag":return e+="<"+n.name+(n.attrs?function(e){var n=[];for(var t in e)n.push(t+'="'+e[t]+'"');return n.length?" "+n.join(" "):""}(n.attrs):"")+(n.voidElement?"/>":">"),n.voidElement?e:e+n.children.reduce(y,"")+"</"+n.name+">";case"comment":return e+"\x3c!--"+n.comment+"--\x3e"}}var m={parse:function(e,n){n||(n={}),n.components||(n.components=g);var t,r=[],o=[],i=-1,a=!1;if(0!==e.indexOf("<")){var c=e.indexOf("<");r.push({type:"text",content:-1===c?e:e.substring(0,c)})}return e.replace(p,(function(c,s){if(a){if(c!=="</"+t.name+">")return;a=!1}var u,l="/"!==c.charAt(1),p=c.startsWith("\x3c!--"),g=s+c.length,y=e.charAt(g);if(p){var m=f(c);return i<0?(r.push(m),r):((u=o[i]).children.push(m),r)}if(l&&(i++,"tag"===(t=f(c)).type&&n.components[t.name]&&(t.type="component",a=!0),t.voidElement||a||!y||"<"===y||t.children.push({type:"text",content:e.slice(g,e.indexOf("<",g))}),0===i&&r.push(t),(u=o[i-1])&&u.children.push(t),o[i]=t),(!l||t.voidElement)&&(i>-1&&(t.voidElement||t.name===c.slice(2,-1))&&(i--,t=-1===i?r:o[i]),!a&&"<"!==y&&y)){u=-1===i?r:o[i].children;var h=e.indexOf("<",g),v=e.slice(g,-1===h?void 0:h);d.test(v)&&(v=" "),(h>-1&&i+u.length>=0||" "!==v)&&u.push({type:"text",content:v})}})),r},stringify:function(e){return e.reduce((function(e,n){return e+y("",n)}),"")}};const h=m;var v="".replace,b=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34);/g,O={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'};function j(e){return O[e]}function w(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function P(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function E(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?P(Object(t),!0).forEach((function(n){a(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):P(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var x,S={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0},k=(0,c.createContext)();function N(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};S=E(E({},S),e)}function I(){return S}var C=function(){function e(){!function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,e),this.usedNamespaces={}}var n,t;return n=e,(t=[{key:"addUsedNamespaces",value:function(e){var n=this;e.forEach((function(e){n.usedNamespaces[e]||(n.usedNamespaces[e]=!0)}))}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}])&&w(n.prototype,t),Object.defineProperty(n,"prototype",{writable:!1}),e}();function D(e){x=e}function R(){return x}var T={type:"3rdParty",init:function(e){N(e.options.react),D(e)}};function A(e){return function(n){return new Promise((function(t){var r=L();e.getInitialProps?e.getInitialProps(n).then((function(e){t(E(E({},e),r))})):t(r)}))}}function L(){var e=R(),n=e.reportNamespaces?e.reportNamespaces.getUsedNamespaces():[],t={},r={};return e.languages.forEach((function(t){r[t]={},n.forEach((function(n){r[t][n]=e.getResourceBundle(t,n)||{}}))})),t.initialI18nStore=r,t.initialLanguage=e.language,t}function _(){if(console&&console.warn){for(var e,n=arguments.length,t=new Array(n),r=0;r<n;r++)t[r]=arguments[r];"string"==typeof t[0]&&(t[0]="react-i18next:: ".concat(t[0])),(e=console).warn.apply(e,t)}}var z={};function B(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];"string"==typeof n[0]&&z[n[0]]||("string"==typeof n[0]&&(z[n[0]]=new Date),_.apply(void 0,n))}function U(e,n,t){e.loadNamespaces(n,(function(){e.isInitialized?t():e.on("initialized",(function n(){setTimeout((function(){e.off("initialized",n)}),0),t()}))}))}function H(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.languages[0],o=!!n.options&&n.options.fallbackLng,i=n.languages[n.languages.length-1];if("cimode"===r.toLowerCase())return!0;var a=function(e,t){var r=n.services.backendConnector.state["".concat(e,"|").concat(t)];return-1===r||2===r};return!(t.bindI18n&&t.bindI18n.indexOf("languageChanging")>-1&&n.services.backendConnector.backend&&n.isLanguageChangingTo&&!a(n.isLanguageChangingTo,e)||!n.hasResourceBundle(r,e)&&n.services.backendConnector.backend&&(!n.options.resources||n.options.partialBundledLanguages)&&(!a(r,e)||o&&!a(i,e)))}function K(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!n.languages||!n.languages.length)return B("i18n.languages were undefined or empty",n.languages),!0;var r=void 0!==n.options.ignoreJSONStructure;return r?n.hasLoadedNamespace(e,{precheck:function(n,r){if(t.bindI18n&&t.bindI18n.indexOf("languageChanging")>-1&&n.services.backendConnector.backend&&n.isLanguageChangingTo&&!r(n.isLanguageChangingTo,e))return!1}}):H(e,n,t)}function V(e){return e.displayName||e.name||("string"==typeof e&&e.length>0?e:"Unknown")}var F=["format"],W=["children","count","parent","i18nKey","context","tOptions","values","defaults","components","ns","i18n","t","shouldUnescape"];function M(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function $(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?M(Object(t),!0).forEach((function(n){a(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):M(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function Z(e,n){if(!e)return!1;var t=e.props?e.props.children:e.children;return n?t.length>0:!!t}function q(e){return e?e&&e.children?e.children:e.props&&e.props.children:[]}function Y(e){return Array.isArray(e)?e:[e]}function J(e,n){if(!e)return"";var t="",r=Y(e),a=n.transSupportBasicHtmlNodes&&n.transKeepBasicHtmlNodesFor?n.transKeepBasicHtmlNodesFor:[];return r.forEach((function(e,r){if("string"==typeof e)t+="".concat(e);else if((0,c.isValidElement)(e)){var s=Object.keys(e.props).length,u=a.indexOf(e.type)>-1,l=e.props.children;if(!l&&u&&0===s)t+="<".concat(e.type,"/>");else if(l||u&&0===s)if(e.props.i18nIsDynamicList)t+="<".concat(r,"></").concat(r,">");else if(u&&1===s&&"string"==typeof l)t+="<".concat(e.type,">").concat(l,"</").concat(e.type,">");else{var f=J(l,n);t+="<".concat(r,">").concat(f,"</").concat(r,">")}else t+="<".concat(r,"></").concat(r,">")}else if(null===e)_("Trans: the passed in value is invalid - seems you passed in a null child.");else if("object"===i(e)){var p=e.format,d=o(e,F),g=Object.keys(d);if(1===g.length){var y=p?"".concat(g[0],", ").concat(p):g[0];t+="{{".concat(y,"}}")}else _("react-i18next: the passed in object contained more than one variable - the object should look like {{ value, format }} where format is optional.",e)}else _("Trans: the passed in value is invalid - seems you passed in a variable like {number} - please pass in variables for interpolation as full objects like {{number}}.",e)})),t}function G(e){var n=e.children,t=e.count,r=e.parent,a=e.i18nKey,s=e.context,u=e.tOptions,l=void 0===u?{}:u,f=e.values,p=e.defaults,d=e.components,g=e.ns,y=e.i18n,m=e.t,O=e.shouldUnescape,w=o(e,W),P=(0,c.useContext)(k)||{},E=P.i18n,x=P.defaultNS,S=y||E||R();if(!S)return B("You will need to pass in an i18next instance by using i18nextReactModule"),n;var N=m||S.t.bind(S)||function(e){return e};s&&(l.context=s);var C=$($({},I()),S.options&&S.options.react),D=g||N.ns||x||S.options&&S.options.defaultNS;D="string"==typeof D?[D]:D||["translation"];var T=p||J(n,C)||C.transEmptyNodeValue||a,A=C.hashTransKey,L=a||(A?A(T):T),_=f?l.interpolation:{interpolation:$($({},l.interpolation),{},{prefix:"#$?",suffix:"?$#"})},z=$($($($({},l),{},{count:t},f),_),{},{defaultValue:T,ns:D}),U=function(e,n,t,r,o,a){if(""===n)return[];var s=r.transKeepBasicHtmlNodesFor||[],u=n&&new RegExp(s.join("|")).test(n);if(!e&&!u)return[n];var l={};!function e(n){Y(n).forEach((function(n){"string"!=typeof n&&(Z(n)?e(q(n)):"object"!==i(n)||(0,c.isValidElement)(n)||Object.assign(l,n))}))}(e);var f=h.parse("<0>".concat(n,"</0>")),p=$($({},l),o);function d(e,n,t){var r=q(e),o=y(r,n.children,t);return function(e){return"[object Array]"===Object.prototype.toString.call(e)&&e.every((function(e){return(0,c.isValidElement)(e)}))}(r)&&0===o.length?r:o}function g(e,n,t,r,o){e.dummy&&(e.children=n),t.push((0,c.cloneElement)(e,$($({},e.props),{},{key:r}),o?void 0:n))}function y(n,o,l){var f=Y(n);return Y(o).reduce((function(n,o,m){var h,O,w,P,E=o.children&&o.children[0]&&o.children[0].content&&t.services.interpolator.interpolate(o.children[0].content,p,t.language);if("tag"===o.type){var x=f[parseInt(o.name,10)];!x&&1===l.length&&l[0][o.name]&&(x=l[0][o.name]),x||(x={});var S=0!==Object.keys(o.attrs).length?(O={props:o.attrs},(P=$({},w=x)).props=Object.assign(O.props,w.props),P):x,k=(0,c.isValidElement)(S),N=k&&Z(o,!0)&&!o.voidElement,I=u&&"object"===i(S)&&S.dummy&&!k,C="object"===i(e)&&null!==e&&Object.hasOwnProperty.call(e,o.name);if("string"==typeof S){var D=t.services.interpolator.interpolate(S,p,t.language);n.push(D)}else if(Z(S)||N)g(S,d(S,o,l),n,m);else if(I){var R=y(f,o.children,l);n.push((0,c.cloneElement)(S,$($({},S.props),{},{key:m}),R))}else if(Number.isNaN(parseFloat(o.name)))if(C)g(S,d(S,o,l),n,m,o.voidElement);else if(r.transSupportBasicHtmlNodes&&s.indexOf(o.name)>-1)if(o.voidElement)n.push((0,c.createElement)(o.name,{key:"".concat(o.name,"-").concat(m)}));else{var T=y(f,o.children,l);n.push((0,c.createElement)(o.name,{key:"".concat(o.name,"-").concat(m)},T))}else if(o.voidElement)n.push("<".concat(o.name," />"));else{var A=y(f,o.children,l);n.push("<".concat(o.name,">").concat(A,"</").concat(o.name,">"))}else if("object"!==i(S)||k)1===o.children.length&&E?n.push((0,c.cloneElement)(S,$($({},S.props),{},{key:m}),E)):n.push((0,c.cloneElement)(S,$($({},S.props),{},{key:m})));else{var L=o.children[0]?E:null;L&&n.push(L)}}else if("text"===o.type){var _=r.transWrapTextNodes,z=a?(h=t.services.interpolator.interpolate(o.content,p,t.language),v.call(h,b,j)):t.services.interpolator.interpolate(o.content,p,t.language);_?n.push((0,c.createElement)(_,{key:"".concat(o.name,"-").concat(m)},z)):n.push(z)}return n}),[])}return q(y([{dummy:!0,children:e||[]}],f,Y(e||[]))[0])}(d||n,L?N(L,z):T,S,C,z,O),H=void 0!==r?r:C.defaultTransParent;return H?(0,c.createElement)(H,w,U):U}function Q(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function X(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,i=[],a=!0,c=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(e){c=!0,o=e}finally{try{a||null==t.return||t.return()}finally{if(c)throw o}}return i}}(e,n)||function(e,n){if(e){if("string"==typeof e)return Q(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Q(e,n):void 0}}(e,n)||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 ee(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function ne(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ee(Object(t),!0).forEach((function(n){a(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ee(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var te=function(e,n){var t=(0,c.useRef)();return(0,c.useEffect)((function(){t.current=n?t.current:e}),[e,n]),t.current};function re(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.i18n,r=(0,c.useContext)(k)||{},o=r.i18n,i=r.defaultNS,a=t||o||R();if(a&&!a.reportNamespaces&&(a.reportNamespaces=new C),!a){B("You will need to pass in an i18next instance by using initReactI18next");var s=function(e){return Array.isArray(e)?e[e.length-1]:e},u=[s,{},!1];return u.t=s,u.i18n={},u.ready=!1,u}a.options.react&&void 0!==a.options.react.wait&&B("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var l=ne(ne(ne({},I()),a.options.react),n),f=l.useSuspense,p=l.keyPrefix,d=e||i||a.options&&a.options.defaultNS;d="string"==typeof d?[d]:d||["translation"],a.reportNamespaces.addUsedNamespaces&&a.reportNamespaces.addUsedNamespaces(d);var g=(a.isInitialized||a.initializedStoreOnce)&&d.every((function(e){return K(e,a,l)}));function y(){return a.getFixedT(null,"fallback"===l.nsMode?d:d[0],p)}var m=(0,c.useState)(y),h=X(m,2),v=h[0],b=h[1],O=d.join(),j=te(O),w=(0,c.useRef)(!0);(0,c.useEffect)((function(){var e=l.bindI18n,n=l.bindI18nStore;function t(){w.current&&b(y)}return w.current=!0,g||f||U(a,d,(function(){w.current&&b(y)})),g&&j&&j!==O&&w.current&&b(y),e&&a&&a.on(e,t),n&&a&&a.store.on(n,t),function(){w.current=!1,e&&a&&e.split(" ").forEach((function(e){return a.off(e,t)})),n&&a&&n.split(" ").forEach((function(e){return a.store.off(e,t)}))}}),[a,O]);var P=(0,c.useRef)(!0);(0,c.useEffect)((function(){w.current&&!P.current&&b(y),P.current=!1}),[a]);var E=[v,a,g];if(E.t=v,E.i18n=a,E.ready=g,g)return E;if(!g&&!f)return E;throw new Promise((function(e){U(a,d,(function(){e()}))}))}var oe=["forwardedRef"];function ie(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function ae(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ie(Object(t),!0).forEach((function(n){a(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ie(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function ce(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t){function r(r){var i=r.forwardedRef,a=o(r,oe),s=X(re(e,ae(ae({},a),{},{keyPrefix:n.keyPrefix})),3),u=s[0],l=s[1],f=s[2],p=ae(ae({},a),{},{t:u,i18n:l,tReady:f});return n.withRef&&i?p.ref=i:!n.withRef&&i&&(p.forwardedRef=i),(0,c.createElement)(t,p)}return r.displayName="withI18nextTranslation(".concat(V(t),")"),r.WrappedComponent=t,n.withRef?(0,c.forwardRef)((function(e,n){return(0,c.createElement)(r,Object.assign({},e,{forwardedRef:n}))})):r}}var se=["ns","children"];function ue(e){var n=e.ns,t=e.children,r=X(re(n,o(e,se)),3),i=r[0],a=r[1],c=r[2];return t(i,{i18n:a,lng:a.language},c)}function le(e){var n=e.i18n,t=e.defaultNS,r=e.children,o=(0,c.useMemo)((function(){return{i18n:n,defaultNS:t}}),[n,t]);return(0,c.createElement)(k.Provider,{value:o},r)}function fe(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=t.i18n,o=(0,c.useContext)(k)||{},i=o.i18n,a=r||i||R();a.options&&a.options.isClone||(e&&!a.initializedStoreOnce&&(a.services.resourceStore.data=e,a.options.ns=Object.values(e).reduce((function(e,n){return Object.keys(n).forEach((function(n){e.indexOf(n)<0&&e.push(n)})),e}),a.options.ns),a.initializedStoreOnce=!0,a.isInitialized=!0),n&&!a.initializedLanguageOnce&&(a.changeLanguage(n),a.initializedLanguageOnce=!0))}var pe=["initialI18nStore","initialLanguage"];function de(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function ge(){return function(e){function n(n){var t=n.initialI18nStore,r=n.initialLanguage,i=o(n,pe);return fe(t,r),(0,c.createElement)(e,function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?de(Object(t),!0).forEach((function(n){a(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):de(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}({},i))}return n.getInitialProps=A(e),n.displayName="withI18nextSSR(".concat(V(e),")"),n.WrappedComponent=e,n}}var ye=function(){return""},me=function(){return""},he=function(){return""},ve=function(){return""},be=function(){return""},Oe=function(){return""}},1739:e=>{e.exports={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}},3366:(e,n,t)=>{"use strict";function r(e,n){if(null==e)return{};var t,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t=i[r],n.indexOf(t)>=0||(o[t]=e[t]);return o}t.d(n,{Z:()=>r})}}]);
|
package/dist/482.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_openmrs_esm_fast_data_entry_app=self.webpackChunk_openmrs_esm_fast_data_entry_app||[]).push([[482],{1281:(e,t,r)=>{"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}r.d(t,{u9:()=>l});var c=["width","height","viewBox"],s=["tabindex"],u={focusable:"false",preserveAspectRatio:"xMidYMid meet"};function l(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.width,r=e.height,n=e.viewBox,o=void 0===n?"0 0 ".concat(t," ").concat(r):n,l=i(e,c),p=l.tabindex,f=i(l,s),d=a(a(a({},u),f),{},{width:t,height:r,viewBox:o});return d["aria-label"]||d["aria-labelledby"]||d.title?(d.role="img",null!=p&&(d.focusable="true",d.tabindex=p)):d["aria-hidden"]=!0,d}},6635:(e,t,r)=>{"use strict";r.d(t,{I:()=>b,_:()=>f,a:()=>p});var n=r(1281),a=r(5697),o=r.n(a),i=r(4211),c=r.n(i);function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function l(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function p(){return p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},p.apply(this,arguments)}function f(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var d=["className","children","tabIndex"],h=["tabindex"],b=c().forwardRef((function(e,t){var r=e.className,a=e.children,o=e.tabIndex,i=f(e,d),s=(0,n.u9)(u(u({},i),{},{tabindex:o})),l=s.tabindex,p=f(s,h);return r&&(p.className=r),null!=l&&(p.tabIndex=l),t&&(p.ref=t),c().createElement("svg",p,a)}));b.displayName="Icon",b.propTypes={"aria-hidden":o().string,"aria-label":o().string,"aria-labelledby":o().string,children:o().node,className:o().string,height:o().oneOfType([o().number,o().string]),preserveAspectRatio:o().string,tabIndex:o().string,viewBox:o().string,width:o().oneOfType([o().number,o().string]),xmlns:o().string},b.defaultProps={xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid meet"}},7114:(e,t,r)=>{"use strict";r.d(t,{RVU:()=>s});var n,a=r(6635),o=r(4211),i=r.n(o),c=["children"],s=i().forwardRef((function(e,t){var r=e.children,o=(0,a._)(e,c);return i().createElement(a.I,(0,a.a)({width:20,height:20,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},o),n||(n=i().createElement("path",{d:"M17 15L17 8 15 8 15 15 8 15 8 17 15 17 15 24 17 24 17 17 24 17 24 15z"})),r)}))},7103:(e,t,r)=>{"use strict";r.d(t,{dOq:()=>s});var n,a=r(6635),o=r(4211),i=r.n(o),c=["children"],s=i().forwardRef((function(e,t){var r=e.children,o=(0,a._)(e,c);return i().createElement(a.I,(0,a.a)({width:20,height:20,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},o),n||(n=i().createElement("path",{d:"M24 9.4L22.6 8 16 14.6 9.4 8 8 9.4 14.6 16 8 22.6 9.4 24 16 17.4 22.6 24 24 22.6 17.4 16 24 9.4z"})),r)}))},4595:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n,a=r(6635),o=r(4211),i=r.n(o),c=["children"],s=i().forwardRef((function(e,t){var r=e.children,o=(0,a._)(e,c);return i().createElement(a.I,(0,a.a)({width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},o),n||(n=i().createElement("path",{d:"M8 11L3 6 3.7 5.3 8 9.6 12.3 5.3 13 6z"})),r)}))},1444:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n,a=r(6635),o=r(4211),i=r.n(o),c=["children"],s=i().forwardRef((function(e,t){var r=e.children,o=(0,a._)(e,c);return i().createElement(a.I,(0,a.a)({width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",ref:t},o),n||(n=i().createElement("path",{d:"M8 5L13 10 12.3 10.7 8 6.4 3.7 10.7 3 10z"})),r)}))},3645:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r=e(t);return t[2]?"@media ".concat(t[2]," {").concat(r,"}"):r})).join("")},t.i=function(e,r,n){"string"==typeof e&&(e=[[null,e,""]]);var a={};if(n)for(var o=0;o<this.length;o++){var i=this[o][0];null!=i&&(a[i]=!0)}for(var c=0;c<e.length;c++){var s=[].concat(e[c]);n&&a[s[0]]||(r&&(s[2]?s[2]="".concat(r," and ").concat(s[2]):s[2]=r),t.push(s))}},t}},2703:(e,t,r)=>{"use strict";var n=r(414);function a(){}function o(){}o.resetWarningCache=a,e.exports=function(){function e(e,t,r,a,o,i){if(i!==n){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function t(){return e}e.isRequired=e;var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:a};return r.PropTypes=r,r}},5697:(e,t,r)=>{e.exports=r(2703)()},414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},3379:e=>{"use strict";var t=[];function r(e){for(var r=-1,n=0;n<t.length;n++)if(t[n].identifier===e){r=n;break}return r}function n(e,n){for(var o={},i=[],c=0;c<e.length;c++){var s=e[c],u=n.base?s[0]+n.base:s[0],l=o[u]||0,p="".concat(u," ").concat(l);o[u]=l+1;var f=r(p),d={css:s[1],media:s[2],sourceMap:s[3],supports:s[4],layer:s[5]};if(-1!==f)t[f].references++,t[f].updater(d);else{var h=a(d,n);n.byIndex=c,t.splice(c,0,{identifier:p,updater:h,references:1})}i.push(p)}return i}function a(e,t){var r=t.domAPI(t);return r.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;r.update(e=t)}else r.remove()}}e.exports=function(e,a){var o=n(e=e||[],a=a||{});return function(e){e=e||[];for(var i=0;i<o.length;i++){var c=r(o[i]);t[c].references--}for(var s=n(e,a),u=0;u<o.length;u++){var l=r(o[u]);0===t[l].references&&(t[l].updater(),t.splice(l,1))}o=s}}},569:e=>{"use strict";var t={};e.exports=function(e,r){var n=function(e){if(void 0===t[e]){var r=document.querySelector(e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}t[e]=r}return t[e]}(e);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(r)}},9216:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},3565:(e,t,r)=>{"use strict";e.exports=function(e){var t=r.nc;t&&e.setAttribute("nonce",t)}},7795:e=>{"use strict";e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(r){!function(e,t,r){var n="";r.supports&&(n+="@supports (".concat(r.supports,") {")),r.media&&(n+="@media ".concat(r.media," {"));var a=void 0!==r.layer;a&&(n+="@layer".concat(r.layer.length>0?" ".concat(r.layer):""," {")),n+=r.css,a&&(n+="}"),r.media&&(n+="}"),r.supports&&(n+="}");var o=r.sourceMap;o&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleTagTransform(n,e,t.options)}(t,e,r)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},4589:e=>{"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}}}]);
|
package/dist/666.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_openmrs_esm_fast_data_entry_app=self.webpackChunk_openmrs_esm_fast_data_entry_app||[]).push([[666],{5666:t=>{var r=function(t){"use strict";var r,e=Object.prototype,n=e.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{u({},"")}catch(t){u=function(t,r,e){return t[r]=e}}function h(t,r,e,n){var o=r&&r.prototype instanceof g?r:g,i=Object.create(o.prototype),a=new G(n||[]);return i._invoke=function(t,r,e){var n=s;return function(o,i){if(n===p)throw new Error("Generator is already running");if(n===y){if("throw"===o)throw i;return T()}for(e.method=o,e.arg=i;;){var a=e.delegate;if(a){var c=j(a,e);if(c){if(c===v)continue;return c}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if(n===s)throw n=y,e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);n=p;var u=f(t,r,e);if("normal"===u.type){if(n=e.done?y:l,u.arg===v)continue;return{value:u.arg,done:e.done}}"throw"===u.type&&(n=y,e.method="throw",e.arg=u.arg)}}}(t,e,a),i}function f(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}t.wrap=h;var s="suspendedStart",l="suspendedYield",p="executing",y="completed",v={};function g(){}function d(){}function m(){}var w={};u(w,i,(function(){return this}));var L=Object.getPrototypeOf,_=L&&L(L(N([])));_&&_!==e&&n.call(_,i)&&(w=_);var b=m.prototype=g.prototype=Object.create(w);function x(t){["next","throw","return"].forEach((function(r){u(t,r,(function(t){return this._invoke(r,t)}))}))}function E(t,r){function e(o,i,a,c){var u=f(t[o],t,i);if("throw"!==u.type){var h=u.arg,s=h.value;return s&&"object"==typeof s&&n.call(s,"__await")?r.resolve(s.__await).then((function(t){e("next",t,a,c)}),(function(t){e("throw",t,a,c)})):r.resolve(s).then((function(t){h.value=t,a(h)}),(function(t){return e("throw",t,a,c)}))}c(u.arg)}var o;this._invoke=function(t,n){function i(){return new r((function(r,o){e(t,n,r,o)}))}return o=o?o.then(i,i):i()}}function j(t,e){var n=t.iterator[e.method];if(n===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=r,j(t,e),"throw"===e.method))return v;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=f(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,v;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=r),e.delegate=null,v):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,v)}function k(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function O(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function G(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function N(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function e(){for(;++o<t.length;)if(n.call(t,o))return e.value=t[o],e.done=!1,e;return e.value=r,e.done=!0,e};return a.next=a}}return{next:T}}function T(){return{value:r,done:!0}}return d.prototype=m,u(b,"constructor",m),u(m,"constructor",d),d.displayName=u(m,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===d||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,u(t,c,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},x(E.prototype),u(E.prototype,a,(function(){return this})),t.AsyncIterator=E,t.async=function(r,e,n,o,i){void 0===i&&(i=Promise);var a=new E(h(r,e,n,o),i);return t.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},x(b),u(b,c,"Generator"),u(b,i,(function(){return this})),u(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r=[];for(var e in t)r.push(e);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=N,G.prototype={constructor:G,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(O),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=r)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function o(n,o){return c.type="throw",c.arg=t,e.next=n,o&&(e.method="next",e.arg=r),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),h=n.call(a,"finallyLoc");if(u&&h){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!h)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var o=this.tryEntries[e];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=r&&r<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=r,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),v},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),O(e),v}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;O(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:N(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=r),v}},t}(t.exports);try{regeneratorRuntime=r}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}}]);
|
package/dist/767.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 767.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_openmrs_esm_fast_data_entry_app=self.webpackChunk_openmrs_esm_fast_data_entry_app||[]).push([[767],{1767:(e,t,r)=>{r.r(t),r.d(t,{FormsRoot:()=>pe,customFormRepresentation:()=>se,default:()=>be,formEncounterUrl:()=>fe,formEncounterUrlPoc:()=>de,useFormEncounters:()=>ve});var n=r(5666),o=r.n(n),i=r(311),a=r(3755),u=r(4211),c=r.n(u);function l(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function u(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,u)}c((n=n.apply(e,t||[])).next())}))}function s(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var f,d=function(){},v=d(),p=Object,b=function(e){return e===v},m=function(e){return"function"==typeof e},y=function(e,t){return p.assign({},e,t)},h="undefined",g=function(){return typeof window!=h},w=new WeakMap,O=0,E=function(e){var t,r,n=typeof e,o=e&&e.constructor,i=o==Date;if(p(e)!==e||i||o==RegExp)t=i?e.toJSON():"symbol"==n?e.toString():"string"==n?JSON.stringify(e):""+e;else{if(t=w.get(e))return t;if(t=++O+"~",w.set(e,t),o==Array){for(t="@",r=0;r<e.length;r++)t+=E(e[r])+",";w.set(e,t)}if(o==p){t="#";for(var a=p.keys(e).sort();!b(r=a.pop());)b(e[r])||(t+=r+":"+E(e[r])+",");w.set(e,t)}}return t},P=!0,T=g(),j=typeof document!=h,k=T&&window.addEventListener?window.addEventListener.bind(window):d,R=j?document.addEventListener.bind(document):d,S=T&&window.removeEventListener?window.removeEventListener.bind(window):d,C=j?document.removeEventListener.bind(document):d,D={isOnline:function(){return P},isVisible:function(){var e=j&&document.visibilityState;return b(e)||"hidden"!==e}},x={initFocus:function(e){return R("visibilitychange",e),k("focus",e),function(){C("visibilitychange",e),S("focus",e)}},initReconnect:function(e){var t=function(){P=!0,e()},r=function(){P=!1};return k("online",t),k("offline",r),function(){S("online",t),S("offline",r)}}},F=!g()||"Deno"in window,V=F?u.useEffect:u.useLayoutEffect,I="undefined"!=typeof navigator&&navigator.connection,_=!F&&I&&(["slow-2g","2g"].includes(I.effectiveType)||I.saveData),L=function(e){if(m(e))try{e=e()}catch(t){e=""}var t=[].concat(e);return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?E(e):"",t,e?"$swr$"+e:""]},A=new WeakMap,M=function(e,t,r,n,o,i,a){void 0===a&&(a=!0);var u=A.get(e),c=u[0],l=u[1],s=u[3],f=c[t],d=l[t];if(a&&d)for(var v=0;v<d.length;++v)d[v](r,n,o);return i&&(delete s[t],f&&f[0])?f[0](2).then((function(){return e.get(t)})):e.get(t)},W=0,H=function(){return++W},U=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return l(void 0,void 0,void 0,(function(){var t,r,n,o,i,a,u,c,l,f,d,p,h,g,w,O,E,P,T,j,k;return s(this,(function(s){switch(s.label){case 0:if(t=e[0],r=e[1],n=e[2],o=e[3],a=!!b((i="boolean"==typeof o?{revalidate:o}:o||{}).populateCache)||i.populateCache,u=!1!==i.revalidate,c=!1!==i.rollbackOnError,l=i.optimisticData,f=L(r),d=f[0],p=f[2],!d)return[2];if(h=A.get(t),g=h[2],e.length<3)return[2,M(t,d,t.get(d),v,v,u,!0)];if(w=n,E=H(),g[d]=[E,0],P=!b(l),T=t.get(d),P&&(j=m(l)?l(T):l,t.set(d,j),M(t,d,j)),m(w))try{w=w(t.get(d))}catch(e){O=e}return w&&m(w.then)?[4,w.catch((function(e){O=e}))]:[3,2];case 1:if(w=s.sent(),E!==g[d][0]){if(O)throw O;return[2,w]}O&&P&&c&&(a=!0,w=T,t.set(d,T)),s.label=2;case 2:return a&&(O||(m(a)&&(w=a(w,T)),t.set(d,w)),t.set(p,y(t.get(p),{error:O}))),g[d][1]=H(),[4,M(t,d,w,O,v,u,!!a)];case 3:if(k=s.sent(),O)throw O;return[2,a?k:w]}}))}))},q=function(e,t){for(var r in e)e[r][0]&&e[r][0](t)},B=function(e,t){if(!A.has(e)){var r=y(x,t),n={},o=U.bind(v,e),i=d;if(A.set(e,[n,{},{},{},o]),!F){var a=r.initFocus(setTimeout.bind(v,q.bind(v,n,0))),u=r.initReconnect(setTimeout.bind(v,q.bind(v,n,1)));i=function(){a&&a(),u&&u(),A.delete(e)}}return[e,o,i]}return[e,A.get(e)[4]]},J=B(new Map),N=J[0],$=J[1],G=y({onLoadingSlow:d,onSuccess:d,onError:d,onErrorRetry:function(e,t,r,n,o){var i=r.errorRetryCount,a=o.retryCount,u=~~((Math.random()+.5)*(1<<(a<8?a:8)))*r.errorRetryInterval;!b(i)&&a>i||setTimeout(n,u,o)},onDiscarded:d,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:_?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:_?5e3:3e3,compare:function(e,t){return E(e)==E(t)},isPaused:function(){return!1},cache:N,mutate:$,fallback:{}},D),z=function(e,t){var r=y(e,t);if(t){var n=e.use,o=e.fallback,i=t.use,a=t.fallback;n&&i&&(r.use=n.concat(i)),o&&a&&(r.fallback=y(o,a))}return r},K=(0,u.createContext)({}),Q=function(e){return m(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}]},X=function(){return y(G,(0,u.useContext)(K))},Y=function(e,t,r){var n=t[e]||(t[e]=[]);return n.push(r),function(){var e=n.indexOf(r);e>=0&&(n[e]=n[n.length-1],n.pop())}},Z={dedupe:!0},ee=(p.defineProperty((function(e){var t=e.value,r=z((0,u.useContext)(K),t),n=t&&t.provider,o=(0,u.useState)((function(){return n?B(n(r.cache||N),t):v}))[0];return o&&(r.cache=o[0],r.mutate=o[1]),V((function(){return o?o[2]:v}),[]),(0,u.createElement)(K.Provider,y(e,{value:r}))}),"default",{value:G}),f=function(e,t,r){var n=r.cache,o=r.compare,i=r.fallbackData,a=r.suspense,c=r.revalidateOnMount,f=r.refreshInterval,d=r.refreshWhenHidden,p=r.refreshWhenOffline,w=A.get(n),O=w[0],E=w[1],P=w[2],T=w[3],j=L(e),k=j[0],R=j[1],S=j[2],C=(0,u.useRef)(!1),D=(0,u.useRef)(!1),x=(0,u.useRef)(k),I=(0,u.useRef)(t),_=(0,u.useRef)(r),W=function(){return _.current},q=function(){return W().isVisible()&&W().isOnline()},B=function(e){return n.set(S,y(n.get(S),e))},J=n.get(k),N=b(i)?r.fallback[k]:i,$=b(J)?N:J,G=n.get(S)||{},z=G.error,K=!C.current,Q=function(){return K&&!b(c)?c:!W().isPaused()&&(a?!b($)&&r.revalidateIfStale:b($)||r.revalidateIfStale)},X=!(!k||!t)&&(!!G.isValidating||K&&Q()),ee=function(e,t){var r=(0,u.useState)({})[1],n=(0,u.useRef)(e),o=(0,u.useRef)({data:!1,error:!1,isValidating:!1}),i=(0,u.useCallback)((function(e){var i=!1,a=n.current;for(var u in e){var c=u;a[c]!==e[c]&&(a[c]=e[c],o.current[c]&&(i=!0))}i&&!t.current&&r({})}),[]);return V((function(){n.current=e})),[n,o.current,i]}({data:$,error:z,isValidating:X},D),te=ee[0],re=ee[1],ne=ee[2],oe=(0,u.useCallback)((function(e){return l(void 0,void 0,void 0,(function(){var t,i,a,u,c,l,f,d,p,y,h,g,w;return s(this,(function(s){switch(s.label){case 0:if(t=I.current,!k||!t||D.current||W().isPaused())return[2,!1];u=!0,c=e||{},l=!T[k]||!c.dedupe,f=function(){return!D.current&&k===x.current&&C.current},d=function(){var e=T[k];e&&e[1]===a&&delete T[k]},p={isValidating:!1},y=function(){B({isValidating:!1}),f()&&ne(p)},B({isValidating:!0}),ne({isValidating:!0}),s.label=1;case 1:return s.trys.push([1,3,,4]),l&&(M(n,k,te.current.data,te.current.error,!0),r.loadingTimeout&&!n.get(k)&&setTimeout((function(){u&&f()&&W().onLoadingSlow(k,r)}),r.loadingTimeout),T[k]=[t.apply(void 0,R),H()]),w=T[k],i=w[0],a=w[1],[4,i];case 2:return i=s.sent(),l&&setTimeout(d,r.dedupingInterval),T[k]&&T[k][1]===a?(B({error:v}),p.error=v,h=P[k],!b(h)&&(a<=h[0]||a<=h[1]||0===h[1])?(y(),l&&f()&&W().onDiscarded(k),[2,!1]):(o(te.current.data,i)?p.data=te.current.data:p.data=i,o(n.get(k),i)||n.set(k,i),l&&f()&&W().onSuccess(i,k,r),[3,4])):(l&&f()&&W().onDiscarded(k),[2,!1]);case 3:return g=s.sent(),d(),W().isPaused()||(B({error:g}),p.error=g,l&&f()&&(W().onError(g,k,r),("boolean"==typeof r.shouldRetryOnError&&r.shouldRetryOnError||m(r.shouldRetryOnError)&&r.shouldRetryOnError(g))&&q()&&W().onErrorRetry(g,k,r,oe,{retryCount:(c.retryCount||0)+1,dedupe:!0}))),[3,4];case 4:return u=!1,y(),f()&&l&&M(n,k,p.data,p.error,!1),[2,!0]}}))}))}),[k]),ie=(0,u.useCallback)(U.bind(v,n,(function(){return x.current})),[]);if(V((function(){I.current=t,_.current=r})),V((function(){if(k){var e=k!==x.current,t=oe.bind(v,Z),r=0,n=Y(k,E,(function(e,t,r){ne(y({error:t,isValidating:r},o(te.current.data,e)?v:{data:e}))})),i=Y(k,O,(function(e){if(0==e){var n=Date.now();W().revalidateOnFocus&&n>r&&q()&&(r=n+W().focusThrottleInterval,t())}else if(1==e)W().revalidateOnReconnect&&q()&&t();else if(2==e)return oe()}));return D.current=!1,x.current=k,C.current=!0,e&&ne({data:$,error:z,isValidating:X}),Q()&&(b($)||F?t():(a=t,g()&&typeof window.requestAnimationFrame!=h?window.requestAnimationFrame(a):setTimeout(a,1))),function(){D.current=!0,n(),i()}}var a}),[k,oe]),V((function(){var e;function t(){var t=m(f)?f($):f;t&&-1!==e&&(e=setTimeout(r,t))}function r(){te.current.error||!d&&!W().isVisible()||!p&&!W().isOnline()?t():oe(Z).then(t)}return t(),function(){e&&(clearTimeout(e),e=-1)}}),[f,d,p,oe]),(0,u.useDebugValue)($),a&&b($)&&k)throw I.current=t,_.current=r,D.current=!1,b(z)?oe(Z):z;return{mutate:ie,get data(){return re.data=!0,$},get error(){return re.error=!0,z},get isValidating(){return re.isValidating=!0,X}}},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=X(),n=Q(e),o=n[0],i=n[1],a=n[2],u=z(r,a),c=f,l=u.use;if(l)for(var s=l.length;s-- >0;)c=l[s](c);return c(o,i||u.fetcher,u)}),te=r(2221);function re(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ne(){return ne=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ne.apply(this,arguments)}var oe=[{key:"name",header:"Form name"},{key:"actions",header:"Actions"}];const ie=function(e){var t=e.rows,r=null==t?void 0:t.map((function(e){return t=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){re(e,t,r[t])}))}return e}({},e),r=null!=(r={actions:c().createElement(te.Link,{to:e.uuid},"Fill Form")})?r:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r.push.apply(r,n)}return r}(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})),t;var t,r}));return t&&(null==t?void 0:t.length)?c().createElement(a.DataTable,{rows:r,headers:oe,isSortable:!0},(function(e){var t=e.rows,r=e.headers,n=e.getTableProps,o=e.getHeaderProps,i=e.getRowProps,u=e.onInputChange;return c().createElement(a.TableContainer,null,c().createElement("div",{style:{position:"relative",display:"flex",height:"3rem",justifyContent:"flex-end"}},c().createElement(a.TableToolbar,{style:{width:"20%",minWidth:"200px"}},c().createElement(a.TableToolbarContent,null,c().createElement(a.TableToolbarSearch,{onChange:u})))),c().createElement(a.Table,ne({},n()),c().createElement(a.TableHead,null,c().createElement(a.TableRow,null,r.map((function(e){return c().createElement(a.TableHeader,ne({},o({header:e})),e.header)})))),c().createElement(a.TableBody,null,null==t?void 0:t.map((function(e){return c().createElement(a.TableRow,ne({},i({row:e})),e.cells.map((function(e){return c().createElement(a.TableCell,{key:e.id},e.value)})))})))))})):c().createElement(a.DataTableSkeleton,null)};function ae(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function ue(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){ae(i,n,o,a,u,"next",e)}function u(e){ae(i,n,o,a,u,"throw",e)}a(void 0)}))}}function ce(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function le(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){ce(e,t,r[t])}))}return e}var se="(uuid,name,display,encounterType:(uuid,name,viewPrivilege,editPrivilege),version,published,retired,resources:(uuid,name,dataType,valueReference))",fe="/ws/rest/v1/form?v=custom:".concat(se),de="/ws/rest/v1/form?v=custom:".concat(se,"&q=poc");function ve(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=!0,r=t?fe:de;return ee([r,e],ue(o().mark((function e(){var t,n,a,u,c;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=3,(0,i.openmrsFetch)(r);case 3:return a=e.sent,c=null!==(u=null===(t=a.data)||void 0===t||null===(n=t.results)||void 0===n?void 0:n.filter((function(e){return e.published&&!/component/i.test(e.name)})))&&void 0!==u?u:[],e.abrupt("return",c);case 7:case"end":return e.stop()}}),e)}))))}var pe=function(){var e=(0,i.useConfig)(),t=e.formCategories,r=e.formCategoriesToShow,n=function(e){if(e)return null==e?void 0:e.map((function(e){return t=le({},e),r=null!=(r={id:e.uuid})?r:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r.push.apply(r,n)}return r}(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})),t;var t,r}))}(ve().data),o=r.map((function(e){var r=t.find((function(t){return t.name===e})),o=[];if(r&&n&&n.length){var i,a=null===(i=r.forms)||void 0===i?void 0:i.map((function(e){return e.formUUID}));o=n.filter((function(e){return a.includes(e.uuid)}))}return le({},{name:e,rows:o})}));return c().createElement("div",{style:{padding:"2rem"}},c().createElement("h3",{style:{marginBottom:"1.5rem"}},"Forms"),c().createElement(a.Tabs,{type:"container"},c().createElement(a.Tab,{label:"All Forms"},c().createElement(ie,{rows:n})),null==o?void 0:o.map((function(e){return c().createElement(a.Tab,{label:e.name},c().createElement(ie,{rows:e.rows}))}))))};const be=pe}}]);
|
package/dist/906.js.LICENSE.txt
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
Copyright (c) 2018 Jed Watson.
|
|
3
|
-
Licensed under the MIT License (MIT), see
|
|
4
|
-
http://jedwatson.github.io/classnames
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
/*! *****************************************************************************
|
|
8
|
-
Copyright (c) Microsoft Corporation.
|
|
9
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
10
|
-
purpose with or without fee is hereby granted.
|
|
11
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
12
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
13
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
14
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
15
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
16
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
17
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
18
|
-
***************************************************************************** */
|
|
19
|
-
|
|
20
|
-
/** @license React v16.13.1
|
|
21
|
-
* react-is.production.min.js
|
|
22
|
-
*
|
|
23
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
24
|
-
*
|
|
25
|
-
* This source code is licensed under the MIT license found in the
|
|
26
|
-
* LICENSE file in the root directory of this source tree.
|
|
27
|
-
*/
|
package/src/FormEntry.tsx
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { ExtensionSlot } from "@openmrs/esm-framework";
|
|
3
|
-
import useGetPatient from "./forms/useGetPatient";
|
|
4
|
-
interface FormParams {
|
|
5
|
-
formUuid: string;
|
|
6
|
-
patientUuid: string;
|
|
7
|
-
visitUuid?: string;
|
|
8
|
-
visitTypeUuid?: string;
|
|
9
|
-
encounterUuid?: string;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
const FormEntry = ({
|
|
13
|
-
formUuid,
|
|
14
|
-
patientUuid,
|
|
15
|
-
visitUuid,
|
|
16
|
-
visitTypeUuid,
|
|
17
|
-
encounterUuid,
|
|
18
|
-
}: FormParams) => {
|
|
19
|
-
const patient = useGetPatient(patientUuid);
|
|
20
|
-
|
|
21
|
-
return (
|
|
22
|
-
<div>
|
|
23
|
-
{formUuid && patientUuid && patient && (
|
|
24
|
-
<ExtensionSlot
|
|
25
|
-
extensionSlotName="form-widget-slot"
|
|
26
|
-
state={{
|
|
27
|
-
view: "form",
|
|
28
|
-
formUuid,
|
|
29
|
-
visitUuid: visitUuid ?? "",
|
|
30
|
-
visitTypeUuid: visitTypeUuid ?? "",
|
|
31
|
-
patientUuid,
|
|
32
|
-
patient,
|
|
33
|
-
encounterUuid: encounterUuid ?? "",
|
|
34
|
-
closeWorkspace: () => {},
|
|
35
|
-
}}
|
|
36
|
-
/>
|
|
37
|
-
)}
|
|
38
|
-
</div>
|
|
39
|
-
);
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
export default FormEntry;
|
package/src/Loader.tsx
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import styles from "./loader.scss";
|
|
3
|
-
import { InlineLoading } from "carbon-components-react";
|
|
4
|
-
import { useTranslation } from "react-i18next";
|
|
5
|
-
|
|
6
|
-
const Loader: React.FC = () => {
|
|
7
|
-
const { t } = useTranslation();
|
|
8
|
-
return (
|
|
9
|
-
<InlineLoading
|
|
10
|
-
className={styles.loading}
|
|
11
|
-
description={`${t("loading", "Loading")} ...`}
|
|
12
|
-
/>
|
|
13
|
-
);
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export default Loader;
|
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
import { Add20, Close20 } from "@carbon/icons-react";
|
|
2
|
-
import { ExtensionSlot } from "@openmrs/esm-framework";
|
|
3
|
-
import { Button } from "carbon-components-react";
|
|
4
|
-
import React, { useState } from "react";
|
|
5
|
-
import { useParams } from "react-router-dom";
|
|
6
|
-
import FormEntry from "../FormEntry";
|
|
7
|
-
import PatientCard from "./PatientCard";
|
|
8
|
-
import PatientInfo from "./PatientInfo";
|
|
9
|
-
import styles from "./styles.scss";
|
|
10
|
-
|
|
11
|
-
const PatientSearchHeader = ({
|
|
12
|
-
patientUuids,
|
|
13
|
-
setPatientUuids,
|
|
14
|
-
setActivePatientUuid,
|
|
15
|
-
}) => {
|
|
16
|
-
const handleSelectPatient = (uuid) => {
|
|
17
|
-
setPatientUuids([...patientUuids, uuid]), setActivePatientUuid(uuid);
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
return (
|
|
21
|
-
<div
|
|
22
|
-
style={{
|
|
23
|
-
display: "flex",
|
|
24
|
-
backgroundColor: "white",
|
|
25
|
-
padding: "2rem 1rem",
|
|
26
|
-
}}
|
|
27
|
-
>
|
|
28
|
-
<span style={{ padding: "1rem" }}>Next patient:</span>
|
|
29
|
-
<span style={{ minWidth: "35rem" }}>
|
|
30
|
-
<ExtensionSlot
|
|
31
|
-
extensionSlotName="patient-search-bar-slot"
|
|
32
|
-
state={{
|
|
33
|
-
selectPatientAction: handleSelectPatient,
|
|
34
|
-
buttonProps: {
|
|
35
|
-
kind: "primary",
|
|
36
|
-
},
|
|
37
|
-
}}
|
|
38
|
-
/>
|
|
39
|
-
</span>
|
|
40
|
-
<span style={{ padding: "1rem" }}>or</span>
|
|
41
|
-
<span>
|
|
42
|
-
<Button disabled>
|
|
43
|
-
Create new patient <Add20 />
|
|
44
|
-
</Button>
|
|
45
|
-
</span>
|
|
46
|
-
<span style={{ flexGrow: 1 }} />
|
|
47
|
-
<span>
|
|
48
|
-
<Button kind="ghost" disabled>
|
|
49
|
-
Cancel <Close20 />
|
|
50
|
-
</Button>
|
|
51
|
-
</span>
|
|
52
|
-
</div>
|
|
53
|
-
);
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
interface ParamTypes {
|
|
57
|
-
formUuid: string;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
const FormWorkflow = () => {
|
|
61
|
-
const { formUuid } = useParams() as ParamTypes;
|
|
62
|
-
const [patientUuids, setPatientUuids] = useState([]);
|
|
63
|
-
const [activePatientUuid, setActivePatientUuid] = useState(null);
|
|
64
|
-
|
|
65
|
-
return (
|
|
66
|
-
<div>
|
|
67
|
-
<div className={styles.breadcrumbsContainer}>
|
|
68
|
-
<ExtensionSlot extensionSlotName="breadcrumbs-slot" />
|
|
69
|
-
</div>
|
|
70
|
-
{!activePatientUuid && (
|
|
71
|
-
<PatientSearchHeader
|
|
72
|
-
{...{ patientUuids, setPatientUuids, setActivePatientUuid }}
|
|
73
|
-
/>
|
|
74
|
-
)}
|
|
75
|
-
{activePatientUuid && <PatientInfo patientUuid={activePatientUuid} />}
|
|
76
|
-
<div style={{ display: "flex", justifyContent: "center" }}>
|
|
77
|
-
<div style={{ width: "1100px" }}>
|
|
78
|
-
{!patientUuids.length && (
|
|
79
|
-
<div style={{ margin: "2rem", textAlign: "center" }}>
|
|
80
|
-
Please select a patient first
|
|
81
|
-
</div>
|
|
82
|
-
)}
|
|
83
|
-
{!!patientUuids.length && (
|
|
84
|
-
<div className={styles.formContainer}>
|
|
85
|
-
<div style={{ flexGrow: 1 }}>
|
|
86
|
-
<FormEntry
|
|
87
|
-
patientUuid={activePatientUuid}
|
|
88
|
-
{...{
|
|
89
|
-
formUuid,
|
|
90
|
-
}}
|
|
91
|
-
/>
|
|
92
|
-
</div>
|
|
93
|
-
<div style={{ width: "13rem", textAlign: "left" }}>
|
|
94
|
-
<h4>Forms filled</h4>
|
|
95
|
-
<div
|
|
96
|
-
style={{
|
|
97
|
-
margin: "1rem 0",
|
|
98
|
-
borderBottom: "1px solid #f4f4f4",
|
|
99
|
-
}}
|
|
100
|
-
>
|
|
101
|
-
{patientUuids.map((patientUuid) => (
|
|
102
|
-
<PatientCard patientUuid={patientUuid} key={patientUuid} />
|
|
103
|
-
))}
|
|
104
|
-
</div>
|
|
105
|
-
<div
|
|
106
|
-
style={{
|
|
107
|
-
display: "flex",
|
|
108
|
-
flexDirection: "column",
|
|
109
|
-
rowGap: "0.5rem",
|
|
110
|
-
}}
|
|
111
|
-
>
|
|
112
|
-
<Button
|
|
113
|
-
kind="primary"
|
|
114
|
-
onClick={() => setActivePatientUuid(null)}
|
|
115
|
-
style={{ width: "100%" }}
|
|
116
|
-
>
|
|
117
|
-
Next Patient
|
|
118
|
-
</Button>
|
|
119
|
-
<Button kind="secondary" disabled style={{ width: "100%" }}>
|
|
120
|
-
Review & Save
|
|
121
|
-
</Button>
|
|
122
|
-
<Button kind="tertiary" disabled style={{ width: "100%" }}>
|
|
123
|
-
Cancel
|
|
124
|
-
</Button>
|
|
125
|
-
</div>
|
|
126
|
-
</div>
|
|
127
|
-
</div>
|
|
128
|
-
)}
|
|
129
|
-
</div>
|
|
130
|
-
</div>
|
|
131
|
-
</div>
|
|
132
|
-
);
|
|
133
|
-
};
|
|
134
|
-
|
|
135
|
-
export default FormWorkflow;
|
package/src/forms/FormsRoot.tsx
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { openmrsFetch, useConfig } from "@openmrs/esm-framework";
|
|
2
|
-
import { Tab, Tabs } from "carbon-components-react";
|
|
3
|
-
import React from "react";
|
|
4
|
-
import useSWR from "swr";
|
|
5
|
-
import { Config } from "../config-schema";
|
|
6
|
-
import FormsTable from "./FormsTable";
|
|
7
|
-
|
|
8
|
-
export const customFormRepresentation =
|
|
9
|
-
"(uuid,name,display,encounterType:(uuid,name,viewPrivilege,editPrivilege),version,published,retired,resources:(uuid,name,dataType,valueReference))";
|
|
10
|
-
|
|
11
|
-
export const formEncounterUrl = `/ws/rest/v1/form?v=custom:${customFormRepresentation}`;
|
|
12
|
-
export const formEncounterUrlPoc = `/ws/rest/v1/form?v=custom:${customFormRepresentation}&q=poc`;
|
|
13
|
-
|
|
14
|
-
export function useFormEncounters(cachedOfflineFormsOnly = false) {
|
|
15
|
-
const showHtmlFormEntryForms = true;
|
|
16
|
-
const url = showHtmlFormEntryForms ? formEncounterUrl : formEncounterUrlPoc;
|
|
17
|
-
|
|
18
|
-
return useSWR([url, cachedOfflineFormsOnly], async () => {
|
|
19
|
-
const res = await openmrsFetch(url);
|
|
20
|
-
// show published forms and hide component forms
|
|
21
|
-
const forms =
|
|
22
|
-
res.data?.results?.filter(
|
|
23
|
-
(form) => form.published && !/component/i.test(form.name)
|
|
24
|
-
) ?? [];
|
|
25
|
-
|
|
26
|
-
return forms;
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
const cleanForms = (rawFormData) => {
|
|
31
|
-
if (rawFormData) {
|
|
32
|
-
return rawFormData?.map((form) => ({
|
|
33
|
-
...form,
|
|
34
|
-
id: form.uuid,
|
|
35
|
-
}));
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
const FormsRoot = () => {
|
|
40
|
-
const config = useConfig() as Config;
|
|
41
|
-
const { formCategories, formCategoriesToShow } = config;
|
|
42
|
-
const { data: forms } = useFormEncounters();
|
|
43
|
-
const cleanRows = cleanForms(forms);
|
|
44
|
-
|
|
45
|
-
const categoryRows = formCategoriesToShow.map((name) => {
|
|
46
|
-
const category = formCategories.find((category) => category.name === name);
|
|
47
|
-
let rows = [];
|
|
48
|
-
if (category && cleanRows && cleanRows.length) {
|
|
49
|
-
const uuids = category.forms?.map((form) => form.formUUID);
|
|
50
|
-
rows = cleanRows.filter((row) => uuids.includes(row.uuid));
|
|
51
|
-
}
|
|
52
|
-
return { ...{ name, rows } };
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
return (
|
|
56
|
-
<div style={{ padding: "2rem" }}>
|
|
57
|
-
<h3 style={{ marginBottom: "1.5rem" }}>Forms</h3>
|
|
58
|
-
<Tabs type="container">
|
|
59
|
-
<Tab label="All Forms">
|
|
60
|
-
<FormsTable rows={cleanRows} />
|
|
61
|
-
</Tab>
|
|
62
|
-
{categoryRows?.map((category) => (
|
|
63
|
-
<Tab label={category.name}>
|
|
64
|
-
<FormsTable rows={category.rows} />
|
|
65
|
-
</Tab>
|
|
66
|
-
))}
|
|
67
|
-
</Tabs>
|
|
68
|
-
</div>
|
|
69
|
-
);
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
export default FormsRoot;
|
|
73
|
-
export { FormsRoot };
|
package/src/forms/mockData.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
const rows = [
|
|
2
|
-
{
|
|
3
|
-
id: "admission-form",
|
|
4
|
-
name: "Admission form",
|
|
5
|
-
},
|
|
6
|
-
{
|
|
7
|
-
id: "dass-form",
|
|
8
|
-
name: "DASS 21",
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
id: "follow-up-form",
|
|
12
|
-
name: "Follow-up form",
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
id: "closure-form",
|
|
16
|
-
name: "Closure form",
|
|
17
|
-
},
|
|
18
|
-
];
|
|
19
|
-
|
|
20
|
-
export const tableData = { ...{ rows } };
|
package/src/forms/styles.scss
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
@import "~@openmrs/esm-styleguide/src/vars";
|
|
2
|
-
|
|
3
|
-
.breadcrumbsContainer > div > div > nav {
|
|
4
|
-
background-color: white;
|
|
5
|
-
padding: 0.5rem;
|
|
6
|
-
border-bottom: 1px solid $openmrs-background-grey;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.formContainer {
|
|
10
|
-
display: flex;
|
|
11
|
-
text-align: center;
|
|
12
|
-
margin-top: 1rem;
|
|
13
|
-
}
|