@openmrs/esm-fast-data-entry-app 1.0.0-pre.11 → 1.0.0-pre.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/132.js +1 -0
- package/dist/294.js +1 -2
- package/dist/338.js +2 -0
- package/dist/{382.js.LICENSE.txt → 338.js.LICENSE.txt} +0 -0
- package/dist/350.js +1 -0
- package/dist/418.js +1 -0
- package/dist/482.js +1 -0
- package/dist/595.js +1 -2
- package/dist/666.js +1 -0
- package/dist/767.js +2 -0
- package/dist/{502.js.LICENSE.txt → 767.js.LICENSE.txt} +0 -30
- package/dist/776.js +1 -0
- package/dist/804.js +1 -0
- package/dist/906.js +2 -2
- package/dist/906.js.LICENSE.txt +27 -0
- package/dist/935.js +2 -0
- package/dist/935.js.LICENSE.txt +23 -0
- package/dist/openmrs-esm-fast-data-entry-app.js +1 -1
- package/dist/openmrs-esm-fast-data-entry-app.js.buildmanifest.json +163 -106
- package/dist/openmrs-esm-fast-data-entry-app.old +1 -2
- package/package.json +31 -33
- package/src/FormEntry.tsx +42 -0
- package/src/Loader.tsx +16 -0
- package/src/Root.tsx +7 -3
- package/src/forms/FormWorkflow.tsx +135 -0
- package/src/forms/FormsRoot.tsx +1 -5
- package/src/forms/FormsTable.tsx +2 -2
- package/src/forms/PatientCard.tsx +37 -0
- package/src/forms/PatientInfo.test.tsx +9 -0
- package/src/forms/PatientInfo.tsx +140 -0
- package/src/forms/patient-info.scss +59 -0
- package/src/forms/styles.scss +13 -0
- package/src/forms/useGetPatient.ts +23 -0
- package/src/index.ts +13 -1
- package/src/loader.scss +9 -0
- package/tsconfig.json +26 -23
- package/.husky/pre-commit +0 -6
- package/.husky/pre-push +0 -6
- package/dist/24.js +0 -3
- package/dist/24.js.LICENSE.txt +0 -16
- package/dist/24.js.map +0 -1
- package/dist/294.js.map +0 -1
- package/dist/296.js +0 -2
- package/dist/296.js.map +0 -1
- package/dist/299.js +0 -2
- package/dist/299.js.map +0 -1
- package/dist/382.js +0 -3
- package/dist/382.js.map +0 -1
- package/dist/415.js +0 -2
- package/dist/415.js.map +0 -1
- package/dist/502.js +0 -3
- package/dist/502.js.map +0 -1
- package/dist/595.js.map +0 -1
- package/dist/69.js +0 -2
- package/dist/69.js.map +0 -1
- package/dist/777.js +0 -2
- package/dist/777.js.map +0 -1
- package/dist/860.js +0 -2
- package/dist/860.js.map +0 -1
- package/dist/906.js.map +0 -1
- package/dist/openmrs-esm-fast-data-entry-app.js.map +0 -1
- package/src/patient-getter/patient-getter.resource.ts +0 -31
- package/src/patient-getter/patient-getter.test.tsx +0 -28
- package/src/patient-getter/patient-getter.tsx +0 -28
package/dist/666.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
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
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
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}}]);
|
|
@@ -1,15 +1,3 @@
|
|
|
1
|
-
/*
|
|
2
|
-
object-assign
|
|
3
|
-
(c) Sindre Sorhus
|
|
4
|
-
@license MIT
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
/*!
|
|
8
|
-
Copyright (c) 2018 Jed Watson.
|
|
9
|
-
Licensed under the MIT License (MIT), see
|
|
10
|
-
http://jedwatson.github.io/classnames
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
1
|
/*! *****************************************************************************
|
|
14
2
|
Copyright (c) Microsoft Corporation.
|
|
15
3
|
|
|
@@ -24,21 +12,3 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
24
12
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
25
13
|
PERFORMANCE OF THIS SOFTWARE.
|
|
26
14
|
***************************************************************************** */
|
|
27
|
-
|
|
28
|
-
/** @license React v0.19.1
|
|
29
|
-
* scheduler.production.min.js
|
|
30
|
-
*
|
|
31
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
32
|
-
*
|
|
33
|
-
* This source code is licensed under the MIT license found in the
|
|
34
|
-
* LICENSE file in the root directory of this source tree.
|
|
35
|
-
*/
|
|
36
|
-
|
|
37
|
-
/** @license React v16.14.0
|
|
38
|
-
* react-dom.production.min.js
|
|
39
|
-
*
|
|
40
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
41
|
-
*
|
|
42
|
-
* This source code is licensed under the MIT license found in the
|
|
43
|
-
* LICENSE file in the root directory of this source tree.
|
|
44
|
-
*/
|
package/dist/776.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_openmrs_esm_fast_data_entry_app=self.webpackChunk_openmrs_esm_fast_data_entry_app||[]).push([[776],{5776:(e,a,n)=>{n.r(a),n.d(a,{default:()=>_});var s=n(4211),r=n.n(s),t=n(3397),p=n(311);function _(){var e=(0,t.useTranslation)().t;return r().createElement(p.ConfigurableLink,{to:"${openmrsSpaBase}/forms"},e("formsAppMenuLink","Forms"))}}}]);
|
package/dist/804.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_openmrs_esm_fast_data_entry_app=self.webpackChunk_openmrs_esm_fast_data_entry_app||[]).push([[804],{9804:(e,t,n)=>{n.r(t),n.d(t,{default:()=>o});var a=n(4211),r=n.n(a),l=n(2221),c=window.spaBase,s="".concat(c).concat("/forms"),u=r().lazy((function(){return Promise.all([n.e(666),n.e(755),n.e(767)]).then(n.bind(n,1767))})),m=r().lazy((function(){return Promise.all([n.e(666),n.e(482),n.e(397),n.e(755),n.e(350)]).then(n.bind(n,6350))}));const o=function(){return r().createElement("main",null,r().createElement(l.BrowserRouter,{basename:s},r().createElement(l.Switch,null,r().createElement(l.Route,{exact:!0,path:"/",children:r().createElement(u,null)}),r().createElement(l.Route,{path:"/:formUuid?",children:r().createElement(m,null)}))))}}}]);
|