@openmrs/esm-form-builder-app 2.2.1 → 2.2.2-pre.645

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/main.js CHANGED
@@ -1 +1 @@
1
- (()=>{var e,r,t={59153:(e,r,t)=>{"use strict";var n=t(81132),o={featureName:"form-builder",moduleName:(n.Type.Array,n.Type.Array,n.Type.Boolean,"@openmrs/esm-form-builder-app")};t(82920),(0,n.getAsyncLifecycle)((function(){return Promise.all([t.e(501),t.e(127),t.e(223),t.e(672),t.e(144),t.e(259)]).then(t.bind(t,84124))}),o),(0,n.getAsyncLifecycle)((function(){return Promise.all([t.e(501),t.e(672),t.e(144),t.e(447)]).then(t.bind(t,31447))}),o)},82920:(e,r,t)=>{var n={"./am.json":[68788,788],"./en.json":[13574,574],"./es.json":[98319,319],"./fr.json":[22757,757],"./he.json":[35833,833],"./km.json":[27807,807]};function o(e){if(!t.o(n,e))return Promise.resolve().then((()=>{var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}));var r=n[e],o=r[0];return t.e(r[1]).then((()=>t(o)))}o.keys=()=>Object.keys(n),o.id=82920,e.exports=o}},n={};function o(e){var r=n[e];if(void 0!==r)return r.exports;var a=n[e]={id:e,loaded:!1,exports:{}};return t[e].call(a.exports,a,a.exports,o),a.loaded=!0,a.exports}o.m=t,o.c=n,o.amdD=function(){throw new Error("define cannot be used indirect")},o.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return o.d(r,{a:r}),r},o.d=(e,r)=>{for(var t in r)o.o(r,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},o.f={},o.e=e=>Promise.all(Object.keys(o.f).reduce(((r,t)=>(o.f[t](e,r),r)),[])),o.u=e=>e+".js",o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),e={},r="@openmrs/esm-form-builder-app:",o.l=(t,n,a,i)=>{if(e[t])e[t].push(n);else{var l,u;if(void 0!==a)for(var s=document.getElementsByTagName("script"),f=0;f<s.length;f++){var p=s[f];if(p.getAttribute("src")==t||p.getAttribute("data-webpack")==r+a){l=p;break}}l||(u=!0,(l=document.createElement("script")).charset="utf-8",l.timeout=120,o.nc&&l.setAttribute("nonce",o.nc),l.setAttribute("data-webpack",r+a),l.src=t),e[t]=[n];var d=(r,n)=>{l.onerror=l.onload=null,clearTimeout(c);var o=e[t];if(delete e[t],l.parentNode&&l.parentNode.removeChild(l),o&&o.forEach((e=>e(n))),r)return r(n)},c=setTimeout(d.bind(null,void 0,{type:"timeout",target:l}),12e4);l.onerror=d.bind(null,l.onerror),l.onload=d.bind(null,l.onload),u&&document.head.appendChild(l)}},o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{o.S={};var e={},r={};o.I=(t,n)=>{n||(n=[]);var a=r[t];if(a||(a=r[t]={}),!(n.indexOf(a)>=0)){if(n.push(a),e[t])return e[t];o.o(o.S,t)||(o.S[t]={});var i=o.S[t],l="@openmrs/esm-form-builder-app",u=(e,r,t,n)=>{var o=i[e]=i[e]||{},a=o[r];(!a||!a.loaded&&(!n!=!a.eager?n:l>a.from))&&(o[r]={get:t,from:l,eager:!!n})},s=[];return"default"===t&&(u("@openmrs/esm-framework","5.2.1-pre.1094",(()=>Promise.all([o.e(800),o.e(672)]).then((()=>()=>o(94800))))),u("react-dom","18.2.0",(()=>Promise.all([o.e(935),o.e(672)]).then((()=>()=>o(73935))))),u("react-i18next","13.2.2",(()=>Promise.all([o.e(527),o.e(672)]).then((()=>()=>o(17527))))),u("react","18.2.0",(()=>o.e(294).then((()=>()=>o(67294))))),u("rxjs","7.8.1",(()=>Promise.all([o.e(164),o.e(127)]).then((()=>()=>o(32164)))))),e[t]=s.length?Promise.all(s).then((()=>e[t]=1)):1}}})(),(()=>{var e;o.g.importScripts&&(e=o.g.location+"");var r=o.g.document;if(!e&&r&&(r.currentScript&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");if(t.length)for(var n=t.length-1;n>-1&&!e;)e=t[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e})(),(()=>{var e=e=>{var r=e=>e.split(".").map((e=>+e==e?+e:e)),t=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(e),n=t[1]?r(t[1]):[];return t[2]&&(n.length++,n.push.apply(n,r(t[2]))),t[3]&&(n.push([]),n.push.apply(n,r(t[3]))),n},r=e=>{var t=e[0],n="";if(1===e.length)return"*";if(t+.5){n+=0==t?">=":-1==t?"<":1==t?"^":2==t?"~":t>0?"=":"!=";for(var o=1,a=1;a<e.length;a++)o--,n+="u"==(typeof(l=e[a]))[0]?"-":(o>0?".":"")+(o=2,l);return n}var i=[];for(a=1;a<e.length;a++){var l=e[a];i.push(0===l?"not("+u()+")":1===l?"("+u()+" || "+u()+")":2===l?i.pop()+" "+i.pop():r(l))}return u();function u(){return i.pop().replace(/^\((.+)\)$/,"$1")}},t=(r,n)=>{if(0 in r){n=e(n);var o=r[0],a=o<0;a&&(o=-o-1);for(var i=0,l=1,u=!0;;l++,i++){var s,f,p=l<r.length?(typeof r[l])[0]:"";if(i>=n.length||"o"==(f=(typeof(s=n[i]))[0]))return!u||("u"==p?l>o&&!a:""==p!=a);if("u"==f){if(!u||"u"!=p)return!1}else if(u)if(p==f)if(l<=o){if(s!=r[l])return!1}else{if(a?s>r[l]:s<r[l])return!1;s!=r[l]&&(u=!1)}else if("s"!=p&&"n"!=p){if(a||l<=o)return!1;u=!1,l--}else{if(l<=o||f<p!=a)return!1;u=!1}else"s"!=p&&"n"!=p&&(u=!1,l--)}}var d=[],c=d.pop.bind(d);for(i=1;i<r.length;i++){var h=r[i];d.push(1==h?c()|c():2==h?c()&c():h?t(h,n):!c())}return!!c()},n=(r,t)=>{var n=r[t];return Object.keys(n).reduce(((r,t)=>!r||!n[r].loaded&&((r,t)=>{r=e(r),t=e(t);for(var n=0;;){if(n>=r.length)return n<t.length&&"u"!=(typeof t[n])[0];var o=r[n],a=(typeof o)[0];if(n>=t.length)return"u"==a;var i=t[n],l=(typeof i)[0];if(a!=l)return"o"==a&&"n"==l||"s"==l||"u"==a;if("o"!=a&&"u"!=a&&o!=i)return o<i;n++}})(r,t)?t:r),0)},a=(e,o,a,u)=>{var s=n(e,a);return t(u,s)||i(((e,t,n,o)=>"Unsatisfied version "+n+" from "+(n&&e[t][n].from)+" of shared singleton module "+t+" (required "+r(o)+")")(e,a,s,u)),l(e[a][s])},i=e=>{"undefined"!=typeof console&&console.warn&&console.warn(e)},l=e=>(e.loaded=1,e.get()),u=(e=>function(r,t,n,a){var i=o.I(r);return i&&i.then?i.then(e.bind(e,r,o.S[r],t,n,a)):e(r,o.S[r],t,n,a)})(((e,r,t,n,i)=>r&&o.o(r,t)?a(r,0,t,n):i())),s={},f={81672:()=>u("default","react",[1,18],(()=>o.e(294).then((()=>()=>o(67294))))),5183:()=>u("default","react-dom",[1,18],(()=>o.e(935).then((()=>()=>o(73935))))),63397:()=>u("default","react-i18next",[1,11],(()=>o.e(527).then((()=>()=>o(17527))))),31581:()=>u("default","rxjs",[1,6],(()=>o.e(164).then((()=>()=>o(32164))))),81132:()=>u("default","@openmrs/esm-framework",[0],(()=>Promise.all([o.e(800),o.e(672)]).then((()=>()=>o(94800)))))};[81132].forEach((e=>{o.m[e]=r=>{s[e]=0,delete o.c[e];var t=f[e]();if("function"!=typeof t)throw new Error("Shared module is not available for eager consumption: "+e);r.exports=t()}}));var p={144:[5183,63397],259:[31581],672:[81672]};o.f.consumes=(e,r)=>{o.o(p,e)&&p[e].forEach((e=>{if(o.o(s,e))return r.push(s[e]);var t=r=>{s[e]=0,o.m[e]=t=>{delete o.c[e],t.exports=r()}},n=r=>{delete s[e],o.m[e]=t=>{throw delete o.c[e],r}};try{var a=f[e]();a.then?r.push(s[e]=a.then(t).catch(n)):t(a)}catch(e){n(e)}}))}})(),(()=>{var e={179:0,153:0};o.f.j=(r,t)=>{var n=o.o(e,r)?e[r]:void 0;if(0!==n)if(n)t.push(n[2]);else if(/^(144|672)$/.test(r))e[r]=0;else{var a=new Promise(((t,o)=>n=e[r]=[t,o]));t.push(n[2]=a);var i=o.p+o.u(r),l=new Error;o.l(i,(t=>{if(o.o(e,r)&&(0!==(n=e[r])&&(e[r]=void 0),n)){var a=t&&("load"===t.type?"missing":t.type),i=t&&t.target&&t.target.src;l.message="Loading chunk "+r+" failed.\n("+a+": "+i+")",l.name="ChunkLoadError",l.type=a,l.request=i,n[1](l)}}),"chunk-"+r,r)}};var r=(r,t)=>{var n,a,[i,l,u]=t,s=0;if(i.some((r=>0!==e[r]))){for(n in l)o.o(l,n)&&(o.m[n]=l[n]);u&&u(o)}for(r&&r(t);s<i.length;s++)a=i[s],o.o(e,a)&&e[a]&&e[a][0](),e[a]=0},t=globalThis.webpackChunk_openmrs_esm_form_builder_app=globalThis.webpackChunk_openmrs_esm_form_builder_app||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})(),o.nc=void 0,o(59153)})();
1
+ (()=>{var e,r,t={59153:(e,r,t)=>{"use strict";var n=t(81132),o={featureName:"form-builder",moduleName:(n.Type.Array,n.Type.Array,n.Type.Boolean,"@openmrs/esm-form-builder-app")};t(82920),(0,n.getAsyncLifecycle)((function(){return Promise.all([t.e(501),t.e(127),t.e(223),t.e(672),t.e(144),t.e(259)]).then(t.bind(t,84124))}),o),(0,n.getAsyncLifecycle)((function(){return Promise.all([t.e(501),t.e(672),t.e(144),t.e(447)]).then(t.bind(t,31447))}),o)},82920:(e,r,t)=>{var n={"./am.json":[68788,788],"./en.json":[13574,574],"./es.json":[98319,319],"./fr.json":[22757,757],"./he.json":[35833,833],"./km.json":[27807,807]};function o(e){if(!t.o(n,e))return Promise.resolve().then((()=>{var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}));var r=n[e],o=r[0];return t.e(r[1]).then((()=>t(o)))}o.keys=()=>Object.keys(n),o.id=82920,e.exports=o}},n={};function o(e){var r=n[e];if(void 0!==r)return r.exports;var a=n[e]={id:e,loaded:!1,exports:{}};return t[e].call(a.exports,a,a.exports,o),a.loaded=!0,a.exports}o.m=t,o.c=n,o.amdD=function(){throw new Error("define cannot be used indirect")},o.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return o.d(r,{a:r}),r},o.d=(e,r)=>{for(var t in r)o.o(r,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},o.f={},o.e=e=>Promise.all(Object.keys(o.f).reduce(((r,t)=>(o.f[t](e,r),r)),[])),o.u=e=>e+".js",o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),e={},r="@openmrs/esm-form-builder-app:",o.l=(t,n,a,i)=>{if(e[t])e[t].push(n);else{var l,u;if(void 0!==a)for(var s=document.getElementsByTagName("script"),f=0;f<s.length;f++){var p=s[f];if(p.getAttribute("src")==t||p.getAttribute("data-webpack")==r+a){l=p;break}}l||(u=!0,(l=document.createElement("script")).charset="utf-8",l.timeout=120,o.nc&&l.setAttribute("nonce",o.nc),l.setAttribute("data-webpack",r+a),l.src=t),e[t]=[n];var d=(r,n)=>{l.onerror=l.onload=null,clearTimeout(c);var o=e[t];if(delete e[t],l.parentNode&&l.parentNode.removeChild(l),o&&o.forEach((e=>e(n))),r)return r(n)},c=setTimeout(d.bind(null,void 0,{type:"timeout",target:l}),12e4);l.onerror=d.bind(null,l.onerror),l.onload=d.bind(null,l.onload),u&&document.head.appendChild(l)}},o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{o.S={};var e={},r={};o.I=(t,n)=>{n||(n=[]);var a=r[t];if(a||(a=r[t]={}),!(n.indexOf(a)>=0)){if(n.push(a),e[t])return e[t];o.o(o.S,t)||(o.S[t]={});var i=o.S[t],l="@openmrs/esm-form-builder-app",u=(e,r,t,n)=>{var o=i[e]=i[e]||{},a=o[r];(!a||!a.loaded&&(!n!=!a.eager?n:l>a.from))&&(o[r]={get:t,from:l,eager:!!n})},s=[];return"default"===t&&(u("@openmrs/esm-framework","5.3.1-pre.1200",(()=>Promise.all([o.e(800),o.e(672)]).then((()=>()=>o(94800))))),u("react-dom","18.2.0",(()=>Promise.all([o.e(935),o.e(672)]).then((()=>()=>o(73935))))),u("react-i18next","13.2.2",(()=>Promise.all([o.e(527),o.e(672)]).then((()=>()=>o(17527))))),u("react","18.2.0",(()=>o.e(294).then((()=>()=>o(67294))))),u("rxjs","7.8.1",(()=>Promise.all([o.e(164),o.e(127)]).then((()=>()=>o(32164)))))),e[t]=s.length?Promise.all(s).then((()=>e[t]=1)):1}}})(),(()=>{var e;o.g.importScripts&&(e=o.g.location+"");var r=o.g.document;if(!e&&r&&(r.currentScript&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");if(t.length)for(var n=t.length-1;n>-1&&!e;)e=t[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e})(),(()=>{var e=e=>{var r=e=>e.split(".").map((e=>+e==e?+e:e)),t=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(e),n=t[1]?r(t[1]):[];return t[2]&&(n.length++,n.push.apply(n,r(t[2]))),t[3]&&(n.push([]),n.push.apply(n,r(t[3]))),n},r=e=>{var t=e[0],n="";if(1===e.length)return"*";if(t+.5){n+=0==t?">=":-1==t?"<":1==t?"^":2==t?"~":t>0?"=":"!=";for(var o=1,a=1;a<e.length;a++)o--,n+="u"==(typeof(l=e[a]))[0]?"-":(o>0?".":"")+(o=2,l);return n}var i=[];for(a=1;a<e.length;a++){var l=e[a];i.push(0===l?"not("+u()+")":1===l?"("+u()+" || "+u()+")":2===l?i.pop()+" "+i.pop():r(l))}return u();function u(){return i.pop().replace(/^\((.+)\)$/,"$1")}},t=(r,n)=>{if(0 in r){n=e(n);var o=r[0],a=o<0;a&&(o=-o-1);for(var i=0,l=1,u=!0;;l++,i++){var s,f,p=l<r.length?(typeof r[l])[0]:"";if(i>=n.length||"o"==(f=(typeof(s=n[i]))[0]))return!u||("u"==p?l>o&&!a:""==p!=a);if("u"==f){if(!u||"u"!=p)return!1}else if(u)if(p==f)if(l<=o){if(s!=r[l])return!1}else{if(a?s>r[l]:s<r[l])return!1;s!=r[l]&&(u=!1)}else if("s"!=p&&"n"!=p){if(a||l<=o)return!1;u=!1,l--}else{if(l<=o||f<p!=a)return!1;u=!1}else"s"!=p&&"n"!=p&&(u=!1,l--)}}var d=[],c=d.pop.bind(d);for(i=1;i<r.length;i++){var h=r[i];d.push(1==h?c()|c():2==h?c()&c():h?t(h,n):!c())}return!!c()},n=(r,t)=>{var n=r[t];return Object.keys(n).reduce(((r,t)=>!r||!n[r].loaded&&((r,t)=>{r=e(r),t=e(t);for(var n=0;;){if(n>=r.length)return n<t.length&&"u"!=(typeof t[n])[0];var o=r[n],a=(typeof o)[0];if(n>=t.length)return"u"==a;var i=t[n],l=(typeof i)[0];if(a!=l)return"o"==a&&"n"==l||"s"==l||"u"==a;if("o"!=a&&"u"!=a&&o!=i)return o<i;n++}})(r,t)?t:r),0)},a=(e,o,a,u)=>{var s=n(e,a);return t(u,s)||i(((e,t,n,o)=>"Unsatisfied version "+n+" from "+(n&&e[t][n].from)+" of shared singleton module "+t+" (required "+r(o)+")")(e,a,s,u)),l(e[a][s])},i=e=>{"undefined"!=typeof console&&console.warn&&console.warn(e)},l=e=>(e.loaded=1,e.get()),u=(e=>function(r,t,n,a){var i=o.I(r);return i&&i.then?i.then(e.bind(e,r,o.S[r],t,n,a)):e(r,o.S[r],t,n,a)})(((e,r,t,n,i)=>r&&o.o(r,t)?a(r,0,t,n):i())),s={},f={81672:()=>u("default","react",[1,18],(()=>o.e(294).then((()=>()=>o(67294))))),5183:()=>u("default","react-dom",[1,18],(()=>o.e(935).then((()=>()=>o(73935))))),63397:()=>u("default","react-i18next",[1,11],(()=>o.e(527).then((()=>()=>o(17527))))),31581:()=>u("default","rxjs",[1,6],(()=>o.e(164).then((()=>()=>o(32164))))),81132:()=>u("default","@openmrs/esm-framework",[0],(()=>Promise.all([o.e(800),o.e(672)]).then((()=>()=>o(94800)))))};[81132].forEach((e=>{o.m[e]=r=>{s[e]=0,delete o.c[e];var t=f[e]();if("function"!=typeof t)throw new Error("Shared module is not available for eager consumption: "+e);r.exports=t()}}));var p={144:[5183,63397],259:[31581],672:[81672]};o.f.consumes=(e,r)=>{o.o(p,e)&&p[e].forEach((e=>{if(o.o(s,e))return r.push(s[e]);var t=r=>{s[e]=0,o.m[e]=t=>{delete o.c[e],t.exports=r()}},n=r=>{delete s[e],o.m[e]=t=>{throw delete o.c[e],r}};try{var a=f[e]();a.then?r.push(s[e]=a.then(t).catch(n)):t(a)}catch(e){n(e)}}))}})(),(()=>{var e={179:0,153:0};o.f.j=(r,t)=>{var n=o.o(e,r)?e[r]:void 0;if(0!==n)if(n)t.push(n[2]);else if(/^(144|672)$/.test(r))e[r]=0;else{var a=new Promise(((t,o)=>n=e[r]=[t,o]));t.push(n[2]=a);var i=o.p+o.u(r),l=new Error;o.l(i,(t=>{if(o.o(e,r)&&(0!==(n=e[r])&&(e[r]=void 0),n)){var a=t&&("load"===t.type?"missing":t.type),i=t&&t.target&&t.target.src;l.message="Loading chunk "+r+" failed.\n("+a+": "+i+")",l.name="ChunkLoadError",l.type=a,l.request=i,n[1](l)}}),"chunk-"+r,r)}};var r=(r,t)=>{var n,a,[i,l,u]=t,s=0;if(i.some((r=>0!==e[r]))){for(n in l)o.o(l,n)&&(o.m[n]=l[n]);u&&u(o)}for(r&&r(t);s<i.length;s++)a=i[s],o.o(e,a)&&e[a]&&e[a][0](),e[a]=0},t=globalThis.webpackChunk_openmrs_esm_form_builder_app=globalThis.webpackChunk_openmrs_esm_form_builder_app||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})(),o.nc=void 0,o(59153)})();
@@ -1 +1 @@
1
- var _openmrs_esm_form_builder_app;(()=>{"use strict";var e,r,t,n,o,a,i,l,u,s,f,d,p,c,h,m={1164:(e,r,t)=>{var n={"./start":()=>t.e(153).then((()=>()=>t(59153)))},o=(e,r)=>(t.R=r,r=t.o(n,e)?n[e]():Promise.resolve().then((()=>{throw new Error('Module "'+e+'" does not exist in container.')})),t.R=void 0,r),a=(e,r)=>{if(t.S){var n="default",o=t.S[n];if(o&&o!==e)throw new Error("Container initialization failed as it has already been initialized with a different share scope");return t.S[n]=e,t.I(n,r)}};t.d(r,{get:()=>o,init:()=>a})}},v={};function g(e){var r=v[e];if(void 0!==r)return r.exports;var t=v[e]={id:e,loaded:!1,exports:{}};return m[e].call(t.exports,t,t.exports,g),t.loaded=!0,t.exports}g.m=m,g.c=v,g.amdD=function(){throw new Error("define cannot be used indirect")},g.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return g.d(r,{a:r}),r},g.d=(e,r)=>{for(var t in r)g.o(r,t)&&!g.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},g.f={},g.e=e=>Promise.all(Object.keys(g.f).reduce(((r,t)=>(g.f[t](e,r),r)),[])),g.u=e=>e+".js",g.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),g.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),e={},r="@openmrs/esm-form-builder-app:",g.l=(t,n,o,a)=>{if(e[t])e[t].push(n);else{var i,l;if(void 0!==o)for(var u=document.getElementsByTagName("script"),s=0;s<u.length;s++){var f=u[s];if(f.getAttribute("src")==t||f.getAttribute("data-webpack")==r+o){i=f;break}}i||(l=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,g.nc&&i.setAttribute("nonce",g.nc),i.setAttribute("data-webpack",r+o),i.src=t),e[t]=[n];var d=(r,n)=>{i.onerror=i.onload=null,clearTimeout(p);var o=e[t];if(delete e[t],i.parentNode&&i.parentNode.removeChild(i),o&&o.forEach((e=>e(n))),r)return r(n)},p=setTimeout(d.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=d.bind(null,i.onerror),i.onload=d.bind(null,i.onload),l&&document.head.appendChild(i)}},g.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},g.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{g.S={};var e={},r={};g.I=(t,n)=>{n||(n=[]);var o=r[t];if(o||(o=r[t]={}),!(n.indexOf(o)>=0)){if(n.push(o),e[t])return e[t];g.o(g.S,t)||(g.S[t]={});var a=g.S[t],i="@openmrs/esm-form-builder-app",l=(e,r,t,n)=>{var o=a[e]=a[e]||{},l=o[r];(!l||!l.loaded&&(!n!=!l.eager?n:i>l.from))&&(o[r]={get:t,from:i,eager:!!n})},u=[];return"default"===t&&(l("@openmrs/esm-framework","5.2.1-pre.1094",(()=>Promise.all([g.e(800),g.e(672)]).then((()=>()=>g(94800))))),l("react-dom","18.2.0",(()=>Promise.all([g.e(935),g.e(672)]).then((()=>()=>g(73935))))),l("react-i18next","13.2.2",(()=>Promise.all([g.e(527),g.e(672)]).then((()=>()=>g(17527))))),l("react","18.2.0",(()=>g.e(294).then((()=>()=>g(67294))))),l("rxjs","7.8.1",(()=>Promise.all([g.e(164),g.e(127)]).then((()=>()=>g(32164)))))),e[t]=u.length?Promise.all(u).then((()=>e[t]=1)):1}}})(),(()=>{var e;g.g.importScripts&&(e=g.g.location+"");var r=g.g.document;if(!e&&r&&(r.currentScript&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");if(t.length)for(var n=t.length-1;n>-1&&!e;)e=t[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),g.p=e})(),t=e=>{var r=e=>e.split(".").map((e=>+e==e?+e:e)),t=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(e),n=t[1]?r(t[1]):[];return t[2]&&(n.length++,n.push.apply(n,r(t[2]))),t[3]&&(n.push([]),n.push.apply(n,r(t[3]))),n},n=(e,r)=>{e=t(e),r=t(r);for(var n=0;;){if(n>=e.length)return n<r.length&&"u"!=(typeof r[n])[0];var o=e[n],a=(typeof o)[0];if(n>=r.length)return"u"==a;var i=r[n],l=(typeof i)[0];if(a!=l)return"o"==a&&"n"==l||"s"==l||"u"==a;if("o"!=a&&"u"!=a&&o!=i)return o<i;n++}},o=e=>{var r=e[0],t="";if(1===e.length)return"*";if(r+.5){t+=0==r?">=":-1==r?"<":1==r?"^":2==r?"~":r>0?"=":"!=";for(var n=1,a=1;a<e.length;a++)n--,t+="u"==(typeof(l=e[a]))[0]?"-":(n>0?".":"")+(n=2,l);return t}var i=[];for(a=1;a<e.length;a++){var l=e[a];i.push(0===l?"not("+u()+")":1===l?"("+u()+" || "+u()+")":2===l?i.pop()+" "+i.pop():o(l))}return u();function u(){return i.pop().replace(/^\((.+)\)$/,"$1")}},a=(e,r)=>{if(0 in e){r=t(r);var n=e[0],o=n<0;o&&(n=-n-1);for(var i=0,l=1,u=!0;;l++,i++){var s,f,d=l<e.length?(typeof e[l])[0]:"";if(i>=r.length||"o"==(f=(typeof(s=r[i]))[0]))return!u||("u"==d?l>n&&!o:""==d!=o);if("u"==f){if(!u||"u"!=d)return!1}else if(u)if(d==f)if(l<=n){if(s!=e[l])return!1}else{if(o?s>e[l]:s<e[l])return!1;s!=e[l]&&(u=!1)}else if("s"!=d&&"n"!=d){if(o||l<=n)return!1;u=!1,l--}else{if(l<=n||f<d!=o)return!1;u=!1}else"s"!=d&&"n"!=d&&(u=!1,l--)}}var p=[],c=p.pop.bind(p);for(i=1;i<e.length;i++){var h=e[i];p.push(1==h?c()|c():2==h?c()&c():h?a(h,r):!c())}return!!c()},i=(e,r)=>{var t=e[r];return Object.keys(t).reduce(((e,r)=>!e||!t[e].loaded&&n(e,r)?r:e),0)},l=(e,r,t,n)=>"Unsatisfied version "+t+" from "+(t&&e[r][t].from)+" of shared singleton module "+r+" (required "+o(n)+")",u=(e,r,t,n)=>{var o=i(e,t);return a(n,o)||s(l(e,t,o,n)),f(e[t][o])},s=e=>{"undefined"!=typeof console&&console.warn&&console.warn(e)},f=e=>(e.loaded=1,e.get()),d=(e=>function(r,t,n,o){var a=g.I(r);return a&&a.then?a.then(e.bind(e,r,g.S[r],t,n,o)):e(0,g.S[r],t,n,o)})(((e,r,t,n,o)=>r&&g.o(r,t)?u(r,0,t,n):o())),p={},c={81672:()=>d("default","react",[1,18],(()=>g.e(294).then((()=>()=>g(67294))))),81132:()=>d("default","@openmrs/esm-framework",[0],(()=>Promise.all([g.e(800),g.e(672)]).then((()=>()=>g(94800))))),5183:()=>d("default","react-dom",[1,18],(()=>g.e(935).then((()=>()=>g(73935))))),63397:()=>d("default","react-i18next",[1,11],(()=>g.e(527).then((()=>()=>g(17527))))),31581:()=>d("default","rxjs",[1,6],(()=>g.e(164).then((()=>()=>g(32164)))))},h={144:[5183,63397],153:[81132],259:[31581],672:[81672]},g.f.consumes=(e,r)=>{g.o(h,e)&&h[e].forEach((e=>{if(g.o(p,e))return r.push(p[e]);var t=r=>{p[e]=0,g.m[e]=t=>{delete g.c[e],t.exports=r()}},n=r=>{delete p[e],g.m[e]=t=>{throw delete g.c[e],r}};try{var o=c[e]();o.then?r.push(p[e]=o.then(t).catch(n)):t(o)}catch(e){n(e)}}))},(()=>{var e={887:0};g.f.j=(r,t)=>{var n=g.o(e,r)?e[r]:void 0;if(0!==n)if(n)t.push(n[2]);else if(/^(144|672)$/.test(r))e[r]=0;else{var o=new Promise(((t,o)=>n=e[r]=[t,o]));t.push(n[2]=o);var a=g.p+g.u(r),i=new Error;g.l(a,(t=>{if(g.o(e,r)&&(0!==(n=e[r])&&(e[r]=void 0),n)){var o=t&&("load"===t.type?"missing":t.type),a=t&&t.target&&t.target.src;i.message="Loading chunk "+r+" failed.\n("+o+": "+a+")",i.name="ChunkLoadError",i.type=o,i.request=a,n[1](i)}}),"chunk-"+r,r)}};var r=(r,t)=>{var n,o,[a,i,l]=t,u=0;if(a.some((r=>0!==e[r]))){for(n in i)g.o(i,n)&&(g.m[n]=i[n]);l&&l(g)}for(r&&r(t);u<a.length;u++)o=a[u],g.o(e,o)&&e[o]&&e[o][0](),e[o]=0},t=globalThis.webpackChunk_openmrs_esm_form_builder_app=globalThis.webpackChunk_openmrs_esm_form_builder_app||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})(),g.nc=void 0;var b=g(1164);_openmrs_esm_form_builder_app=b})();
1
+ var _openmrs_esm_form_builder_app;(()=>{"use strict";var e,r,t,n,o,a,i,l,u,s,f,d,p,c,h,m={1164:(e,r,t)=>{var n={"./start":()=>t.e(153).then((()=>()=>t(59153)))},o=(e,r)=>(t.R=r,r=t.o(n,e)?n[e]():Promise.resolve().then((()=>{throw new Error('Module "'+e+'" does not exist in container.')})),t.R=void 0,r),a=(e,r)=>{if(t.S){var n="default",o=t.S[n];if(o&&o!==e)throw new Error("Container initialization failed as it has already been initialized with a different share scope");return t.S[n]=e,t.I(n,r)}};t.d(r,{get:()=>o,init:()=>a})}},v={};function g(e){var r=v[e];if(void 0!==r)return r.exports;var t=v[e]={id:e,loaded:!1,exports:{}};return m[e].call(t.exports,t,t.exports,g),t.loaded=!0,t.exports}g.m=m,g.c=v,g.amdD=function(){throw new Error("define cannot be used indirect")},g.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return g.d(r,{a:r}),r},g.d=(e,r)=>{for(var t in r)g.o(r,t)&&!g.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},g.f={},g.e=e=>Promise.all(Object.keys(g.f).reduce(((r,t)=>(g.f[t](e,r),r)),[])),g.u=e=>e+".js",g.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),g.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),e={},r="@openmrs/esm-form-builder-app:",g.l=(t,n,o,a)=>{if(e[t])e[t].push(n);else{var i,l;if(void 0!==o)for(var u=document.getElementsByTagName("script"),s=0;s<u.length;s++){var f=u[s];if(f.getAttribute("src")==t||f.getAttribute("data-webpack")==r+o){i=f;break}}i||(l=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,g.nc&&i.setAttribute("nonce",g.nc),i.setAttribute("data-webpack",r+o),i.src=t),e[t]=[n];var d=(r,n)=>{i.onerror=i.onload=null,clearTimeout(p);var o=e[t];if(delete e[t],i.parentNode&&i.parentNode.removeChild(i),o&&o.forEach((e=>e(n))),r)return r(n)},p=setTimeout(d.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=d.bind(null,i.onerror),i.onload=d.bind(null,i.onload),l&&document.head.appendChild(i)}},g.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},g.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{g.S={};var e={},r={};g.I=(t,n)=>{n||(n=[]);var o=r[t];if(o||(o=r[t]={}),!(n.indexOf(o)>=0)){if(n.push(o),e[t])return e[t];g.o(g.S,t)||(g.S[t]={});var a=g.S[t],i="@openmrs/esm-form-builder-app",l=(e,r,t,n)=>{var o=a[e]=a[e]||{},l=o[r];(!l||!l.loaded&&(!n!=!l.eager?n:i>l.from))&&(o[r]={get:t,from:i,eager:!!n})},u=[];return"default"===t&&(l("@openmrs/esm-framework","5.3.1-pre.1200",(()=>Promise.all([g.e(800),g.e(672)]).then((()=>()=>g(94800))))),l("react-dom","18.2.0",(()=>Promise.all([g.e(935),g.e(672)]).then((()=>()=>g(73935))))),l("react-i18next","13.2.2",(()=>Promise.all([g.e(527),g.e(672)]).then((()=>()=>g(17527))))),l("react","18.2.0",(()=>g.e(294).then((()=>()=>g(67294))))),l("rxjs","7.8.1",(()=>Promise.all([g.e(164),g.e(127)]).then((()=>()=>g(32164)))))),e[t]=u.length?Promise.all(u).then((()=>e[t]=1)):1}}})(),(()=>{var e;g.g.importScripts&&(e=g.g.location+"");var r=g.g.document;if(!e&&r&&(r.currentScript&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");if(t.length)for(var n=t.length-1;n>-1&&!e;)e=t[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),g.p=e})(),t=e=>{var r=e=>e.split(".").map((e=>+e==e?+e:e)),t=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(e),n=t[1]?r(t[1]):[];return t[2]&&(n.length++,n.push.apply(n,r(t[2]))),t[3]&&(n.push([]),n.push.apply(n,r(t[3]))),n},n=(e,r)=>{e=t(e),r=t(r);for(var n=0;;){if(n>=e.length)return n<r.length&&"u"!=(typeof r[n])[0];var o=e[n],a=(typeof o)[0];if(n>=r.length)return"u"==a;var i=r[n],l=(typeof i)[0];if(a!=l)return"o"==a&&"n"==l||"s"==l||"u"==a;if("o"!=a&&"u"!=a&&o!=i)return o<i;n++}},o=e=>{var r=e[0],t="";if(1===e.length)return"*";if(r+.5){t+=0==r?">=":-1==r?"<":1==r?"^":2==r?"~":r>0?"=":"!=";for(var n=1,a=1;a<e.length;a++)n--,t+="u"==(typeof(l=e[a]))[0]?"-":(n>0?".":"")+(n=2,l);return t}var i=[];for(a=1;a<e.length;a++){var l=e[a];i.push(0===l?"not("+u()+")":1===l?"("+u()+" || "+u()+")":2===l?i.pop()+" "+i.pop():o(l))}return u();function u(){return i.pop().replace(/^\((.+)\)$/,"$1")}},a=(e,r)=>{if(0 in e){r=t(r);var n=e[0],o=n<0;o&&(n=-n-1);for(var i=0,l=1,u=!0;;l++,i++){var s,f,d=l<e.length?(typeof e[l])[0]:"";if(i>=r.length||"o"==(f=(typeof(s=r[i]))[0]))return!u||("u"==d?l>n&&!o:""==d!=o);if("u"==f){if(!u||"u"!=d)return!1}else if(u)if(d==f)if(l<=n){if(s!=e[l])return!1}else{if(o?s>e[l]:s<e[l])return!1;s!=e[l]&&(u=!1)}else if("s"!=d&&"n"!=d){if(o||l<=n)return!1;u=!1,l--}else{if(l<=n||f<d!=o)return!1;u=!1}else"s"!=d&&"n"!=d&&(u=!1,l--)}}var p=[],c=p.pop.bind(p);for(i=1;i<e.length;i++){var h=e[i];p.push(1==h?c()|c():2==h?c()&c():h?a(h,r):!c())}return!!c()},i=(e,r)=>{var t=e[r];return Object.keys(t).reduce(((e,r)=>!e||!t[e].loaded&&n(e,r)?r:e),0)},l=(e,r,t,n)=>"Unsatisfied version "+t+" from "+(t&&e[r][t].from)+" of shared singleton module "+r+" (required "+o(n)+")",u=(e,r,t,n)=>{var o=i(e,t);return a(n,o)||s(l(e,t,o,n)),f(e[t][o])},s=e=>{"undefined"!=typeof console&&console.warn&&console.warn(e)},f=e=>(e.loaded=1,e.get()),d=(e=>function(r,t,n,o){var a=g.I(r);return a&&a.then?a.then(e.bind(e,r,g.S[r],t,n,o)):e(0,g.S[r],t,n,o)})(((e,r,t,n,o)=>r&&g.o(r,t)?u(r,0,t,n):o())),p={},c={81672:()=>d("default","react",[1,18],(()=>g.e(294).then((()=>()=>g(67294))))),81132:()=>d("default","@openmrs/esm-framework",[0],(()=>Promise.all([g.e(800),g.e(672)]).then((()=>()=>g(94800))))),5183:()=>d("default","react-dom",[1,18],(()=>g.e(935).then((()=>()=>g(73935))))),63397:()=>d("default","react-i18next",[1,11],(()=>g.e(527).then((()=>()=>g(17527))))),31581:()=>d("default","rxjs",[1,6],(()=>g.e(164).then((()=>()=>g(32164)))))},h={144:[5183,63397],153:[81132],259:[31581],672:[81672]},g.f.consumes=(e,r)=>{g.o(h,e)&&h[e].forEach((e=>{if(g.o(p,e))return r.push(p[e]);var t=r=>{p[e]=0,g.m[e]=t=>{delete g.c[e],t.exports=r()}},n=r=>{delete p[e],g.m[e]=t=>{throw delete g.c[e],r}};try{var o=c[e]();o.then?r.push(p[e]=o.then(t).catch(n)):t(o)}catch(e){n(e)}}))},(()=>{var e={887:0};g.f.j=(r,t)=>{var n=g.o(e,r)?e[r]:void 0;if(0!==n)if(n)t.push(n[2]);else if(/^(144|672)$/.test(r))e[r]=0;else{var o=new Promise(((t,o)=>n=e[r]=[t,o]));t.push(n[2]=o);var a=g.p+g.u(r),i=new Error;g.l(a,(t=>{if(g.o(e,r)&&(0!==(n=e[r])&&(e[r]=void 0),n)){var o=t&&("load"===t.type?"missing":t.type),a=t&&t.target&&t.target.src;i.message="Loading chunk "+r+" failed.\n("+o+": "+a+")",i.name="ChunkLoadError",i.type=o,i.request=a,n[1](i)}}),"chunk-"+r,r)}};var r=(r,t)=>{var n,o,[a,i,l]=t,u=0;if(a.some((r=>0!==e[r]))){for(n in i)g.o(i,n)&&(g.m[n]=i[n]);l&&l(g)}for(r&&r(t);u<a.length;u++)o=a[u],g.o(e,o)&&e[o]&&e[o][0](),e[o]=0},t=globalThis.webpackChunk_openmrs_esm_form_builder_app=globalThis.webpackChunk_openmrs_esm_form_builder_app||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})(),g.nc=void 0;var b=g(1164);_openmrs_esm_form_builder_app=b})();
@@ -124,7 +124,7 @@
124
124
  "auxiliaryFiles": [
125
125
  "main.js.map"
126
126
  ],
127
- "hash": "b01cd6507e5262b4",
127
+ "hash": "72e6d606e0055745",
128
128
  "childrenByOrder": {}
129
129
  },
130
130
  {
@@ -626,9 +626,9 @@
626
626
  "initial": false,
627
627
  "entry": false,
628
628
  "recorded": false,
629
- "size": 312184,
629
+ "size": 311247,
630
630
  "sizes": {
631
- "javascript": 312142,
631
+ "javascript": 311205,
632
632
  "consume-shared": 42
633
633
  },
634
634
  "names": [],
@@ -643,7 +643,7 @@
643
643
  "auxiliaryFiles": [
644
644
  "259.js.map"
645
645
  ],
646
- "hash": "5e836aeeece80092",
646
+ "hash": "1bca16951697d7fc",
647
647
  "childrenByOrder": {}
648
648
  },
649
649
  {
@@ -863,9 +863,9 @@
863
863
  "entry": false,
864
864
  "recorded": false,
865
865
  "reason": "split chunk (cache group: defaultVendors)",
866
- "size": 1745443,
866
+ "size": 1085990,
867
867
  "sizes": {
868
- "javascript": 1745443
868
+ "javascript": 1085990
869
869
  },
870
870
  "names": [],
871
871
  "idHints": [
@@ -881,7 +881,7 @@
881
881
  "auxiliaryFiles": [
882
882
  "800.js.map"
883
883
  ],
884
- "hash": "e3437d0d4359fa21",
884
+ "hash": "68f79d04f2df0502",
885
885
  "childrenByOrder": {}
886
886
  },
887
887
  {
@@ -952,7 +952,7 @@
952
952
  "auxiliaryFiles": [
953
953
  "openmrs-esm-form-builder-app.js.map"
954
954
  ],
955
- "hash": "7f89f7e2995e51fc",
955
+ "hash": "ecfa5c47e380b15d",
956
956
  "childrenByOrder": {}
957
957
  },
958
958
  {
package/dist/routes.json CHANGED
@@ -1 +1 @@
1
- {"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"fhir2":"^1.2.0","webservices.rest":"^2.2.0"},"pages":[{"component":"root","route":"form-builder","online":true,"offline":true,"order":1}],"extensions":[{"name":"system-administration-form-builder-card-link","slot":"system-admin-page-card-link-slot","component":"systemAdministrationFormBuilderCardLink","online":true,"offline":true}],"version":"2.2.1"}
1
+ {"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"fhir2":"^1.2.0","webservices.rest":"^2.2.0"},"pages":[{"component":"root","route":"form-builder","online":true,"offline":true,"order":1}],"extensions":[{"name":"system-administration-form-builder-card-link","slot":"system-admin-page-card-link-slot","component":"systemAdministrationFormBuilderCardLink","online":true,"offline":true}],"version":"2.2.2-pre.645"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openmrs/esm-form-builder-app",
3
- "version": "2.2.1",
3
+ "version": "2.2.2-pre.645",
4
4
  "license": "MPL-2.0",
5
5
  "description": "OpenMRS ESM Form Builder App",
6
6
  "browser": "dist/openmrs-esm-form-builder-app.js",
@@ -113,5 +113,6 @@
113
113
  "webpack": "^5.88.2",
114
114
  "webpack-cli": "^5.1.4"
115
115
  },
116
- "packageManager": "yarn@4.0.2"
116
+ "packageManager": "yarn@4.0.2",
117
+ "stableVersion": "2.2.1"
117
118
  }
@@ -2,7 +2,7 @@ import React, { useState } from 'react';
2
2
  import { Button, ComposedModal, InlineLoading, ModalBody, ModalFooter, ModalHeader } from '@carbon/react';
3
3
  import type { TFunction } from 'i18next';
4
4
  import { useParams } from 'react-router-dom';
5
- import { showToast, showNotification } from '@openmrs/esm-framework';
5
+ import { showSnackbar } from '@openmrs/esm-framework';
6
6
 
7
7
  import type { Schema } from '../../types';
8
8
  import { publishForm, unpublishForm } from '../../forms.resource';
@@ -32,22 +32,21 @@ function ActionButtons({ schema, t }: ActionButtonsProps) {
32
32
  try {
33
33
  await publishForm(form.uuid);
34
34
 
35
- showToast({
35
+ showSnackbar({
36
36
  title: t('formPublished', 'Form published'),
37
37
  kind: 'success',
38
- critical: true,
39
- description: `${form.name} ` + t('formPublishedSuccessfully', 'form was published successfully'),
38
+ isLowContrast: true,
39
+ subtitle: `${form.name} ` + t('formPublishedSuccessfully', 'form was published successfully'),
40
40
  });
41
41
 
42
42
  setStatus('published');
43
43
  await mutate();
44
44
  } catch (error) {
45
45
  if (error instanceof Error) {
46
- showNotification({
46
+ showSnackbar({
47
47
  title: t('errorPublishingForm', 'Error publishing form'),
48
48
  kind: 'error',
49
- critical: true,
50
- description: error?.message,
49
+ subtitle: error?.message,
51
50
  });
52
51
  setStatus('error');
53
52
  }
@@ -60,22 +59,21 @@ function ActionButtons({ schema, t }: ActionButtonsProps) {
60
59
  try {
61
60
  await unpublishForm(form.uuid);
62
61
 
63
- showToast({
62
+ showSnackbar({
64
63
  title: t('formUnpublished', 'Form unpublished'),
65
64
  kind: 'success',
66
- critical: true,
67
- description: `${form.name} ` + t('formUnpublishedSuccessfully', 'form was unpublished successfully'),
65
+ isLowContrast: true,
66
+ subtitle: `${form.name} ` + t('formUnpublishedSuccessfully', 'form was unpublished successfully'),
68
67
  });
69
68
 
70
69
  setStatus('unpublished');
71
70
  await mutate();
72
71
  } catch (error) {
73
72
  if (error instanceof Error) {
74
- showNotification({
73
+ showSnackbar({
75
74
  title: t('errorUnpublishingForm', 'Error unpublishing form'),
76
75
  kind: 'error',
77
- critical: true,
78
- description: error?.message,
76
+ subtitle: error?.message,
79
77
  });
80
78
  setStatus('error');
81
79
  }
@@ -103,7 +101,6 @@ function ActionButtons({ schema, t }: ActionButtonsProps) {
103
101
  {t('unpublishForm', 'Unpublish form')}
104
102
  </Button>
105
103
  ) : null}
106
-
107
104
  {showUnpublishModal ? (
108
105
  <ComposedModal open={true} onClose={() => setShowUnpublishModal(false)} preventCloseOnClickOutside>
109
106
  <ModalHeader
@@ -31,8 +31,7 @@ import { Add, DocumentImport, Download, Edit, TrashCan } from '@carbon/react/ico
31
31
  import {
32
32
  type FetchResponse,
33
33
  navigate,
34
- showNotification,
35
- showToast,
34
+ showSnackbar,
36
35
  useConfig,
37
36
  useLayoutType,
38
37
  usePagination,
@@ -106,11 +105,11 @@ function ActionButtons({ form, mutate, responsiveSize, t }: ActionButtonsProps)
106
105
  deleteForm(formUuid)
107
106
  .then(async (res: FetchResponse) => {
108
107
  if (res.status === 204) {
109
- showToast({
108
+ showSnackbar({
110
109
  title: t('formDeleted', 'Form deleted'),
111
110
  kind: 'success',
112
- critical: true,
113
- description: `${form.name} ` + t('formDeletedSuccessfully', 'deleted successfully'),
111
+ isLowContrast: true,
112
+ subtitle: `${form.name} ` + t('formDeletedSuccessfully', 'deleted successfully'),
114
113
  });
115
114
 
116
115
  await mutate();
@@ -118,11 +117,10 @@ function ActionButtons({ form, mutate, responsiveSize, t }: ActionButtonsProps)
118
117
  }
119
118
  })
120
119
  .catch((e: Error) =>
121
- showNotification({
120
+ showSnackbar({
122
121
  title: t('errorDeletingForm', 'Error deleting form'),
123
122
  kind: 'error',
124
- critical: true,
125
- description: e?.message,
123
+ subtitle: e?.message,
126
124
  }),
127
125
  )
128
126
  .finally(() => setIsDeleting(false));
@@ -24,7 +24,7 @@ import {
24
24
  Tile,
25
25
  } from '@carbon/react';
26
26
  import { ArrowUpRight } from '@carbon/react/icons';
27
- import { showNotification, showToast, useConfig } from '@openmrs/esm-framework';
27
+ import { showSnackbar, useConfig } from '@openmrs/esm-framework';
28
28
  import type { RenderType } from '@openmrs/openmrs-form-engine-lib';
29
29
 
30
30
  import type { Answer, Concept, ConceptMapping, Question, Schema } from '../../types';
@@ -162,19 +162,18 @@ const AddQuestionModal: React.FC<AddQuestionModalProps> = ({
162
162
  setAnswers([]);
163
163
  setSelectedAnswers([]);
164
164
 
165
- showToast({
165
+ showSnackbar({
166
166
  title: t('success', 'Success!'),
167
167
  kind: 'success',
168
- critical: true,
169
- description: t('questionCreated', 'New question created'),
168
+ isLowContrast: true,
169
+ subtitle: t('questionCreated', 'New question created'),
170
170
  });
171
171
  } catch (error) {
172
172
  if (error instanceof Error) {
173
- showNotification({
173
+ showSnackbar({
174
174
  title: t('errorCreatingQuestion', 'Error creating question'),
175
175
  kind: 'error',
176
- critical: true,
177
- description: error?.message,
176
+ subtitle: error?.message,
178
177
  });
179
178
  }
180
179
  }
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { useTranslation } from 'react-i18next';
3
3
  import { Button, ComposedModal, ModalBody, ModalFooter, ModalHeader } from '@carbon/react';
4
- import { showNotification, showToast } from '@openmrs/esm-framework';
4
+ import { showSnackbar } from '@openmrs/esm-framework';
5
5
  import type { Schema } from '../../types';
6
6
 
7
7
  interface DeletePageModalProps {
@@ -30,19 +30,18 @@ const DeletePageModal: React.FC<DeletePageModalProps> = ({
30
30
  onSchemaChange({ ...schema });
31
31
  resetIndices();
32
32
 
33
- showToast({
33
+ showSnackbar({
34
34
  title: t('success', 'Success!'),
35
35
  kind: 'success',
36
- critical: true,
37
- description: t('pageDeleted', 'Page deleted'),
36
+ isLowContrast: true,
37
+ subtitle: t('pageDeleted', 'Page deleted'),
38
38
  });
39
39
  } catch (error) {
40
40
  if (error instanceof Error) {
41
- showNotification({
41
+ showSnackbar({
42
42
  title: t('errorDeletingPage', 'Error deleting page'),
43
43
  kind: 'error',
44
- critical: true,
45
- description: error?.message,
44
+ subtitle: error?.message,
46
45
  });
47
46
  }
48
47
  }
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { useTranslation } from 'react-i18next';
3
3
  import { Button, ComposedModal, ModalBody, ModalFooter, ModalHeader } from '@carbon/react';
4
- import { showNotification, showToast } from '@openmrs/esm-framework';
4
+ import { showSnackbar } from '@openmrs/esm-framework';
5
5
  import type { Schema } from '../../types';
6
6
 
7
7
  interface DeleteQuestionModal {
@@ -34,19 +34,18 @@ const DeleteQuestionModal: React.FC<DeleteQuestionModal> = ({
34
34
  onSchemaChange({ ...schema });
35
35
  resetIndices();
36
36
 
37
- showToast({
37
+ showSnackbar({
38
38
  title: t('success', 'Success!'),
39
39
  kind: 'success',
40
- critical: true,
41
- description: t('QuestionDeleted', 'Question deleted'),
40
+ isLowContrast: true,
41
+ subtitle: t('QuestionDeleted', 'Question deleted'),
42
42
  });
43
43
  } catch (error) {
44
44
  if (error instanceof Error) {
45
- showNotification({
45
+ showSnackbar({
46
46
  title: t('errorDeletingQuestion', 'Error deleting question'),
47
47
  kind: 'error',
48
- critical: true,
49
- description: error?.message,
48
+ subtitle: error?.message,
50
49
  });
51
50
  }
52
51
  }
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { useTranslation } from 'react-i18next';
3
3
  import { Button, ComposedModal, ModalBody, ModalFooter, ModalHeader } from '@carbon/react';
4
- import { showNotification, showToast } from '@openmrs/esm-framework';
4
+ import { showSnackbar } from '@openmrs/esm-framework';
5
5
  import type { Schema } from '../../types';
6
6
 
7
7
  interface DeleteSectionModal {
@@ -32,19 +32,18 @@ const DeleteSectionModal: React.FC<DeleteSectionModal> = ({
32
32
  onSchemaChange({ ...schema });
33
33
  resetIndices();
34
34
 
35
- showToast({
35
+ showSnackbar({
36
36
  title: t('success', 'Success!'),
37
37
  kind: 'success',
38
- critical: true,
39
- description: t('SectionDeleted', 'Section deleted'),
38
+ isLowContrast: true,
39
+ subtitle: t('SectionDeleted', 'Section deleted'),
40
40
  });
41
41
  } catch (error) {
42
42
  if (error instanceof Error) {
43
- showNotification({
43
+ showSnackbar({
44
44
  title: t('errorDeletingSection', 'Error deleting section'),
45
45
  kind: 'error',
46
- critical: true,
47
- description: error?.message,
46
+ subtitle: error?.message,
48
47
  });
49
48
  }
50
49
  }
@@ -26,7 +26,7 @@ import {
26
26
  Tile,
27
27
  } from '@carbon/react';
28
28
  import { ArrowUpRight } from '@carbon/react/icons';
29
- import { showNotification, showToast, useConfig } from '@openmrs/esm-framework';
29
+ import { showSnackbar, useConfig } from '@openmrs/esm-framework';
30
30
  import type { RenderType } from '@openmrs/openmrs-form-engine-lib';
31
31
 
32
32
  import type { Concept, ConceptMapping, Question, QuestionType, Schema } from '../../types';
@@ -209,21 +209,20 @@ const EditQuestionModal: React.FC<EditQuestionModalProps> = ({
209
209
  setSelectedAnswers([]);
210
210
  onQuestionEdit(null);
211
211
 
212
- showToast({
212
+ showSnackbar({
213
213
  title: t('success', 'Success!'),
214
214
  kind: 'success',
215
- critical: true,
216
- description: t('questionUpdated', 'Question updated'),
215
+ isLowContrast: true,
216
+ subtitle: t('questionUpdated', 'Question updated'),
217
217
  });
218
218
 
219
219
  onModalChange(false);
220
220
  } catch (error) {
221
221
  if (error instanceof Error) {
222
- showNotification({
222
+ showSnackbar({
223
223
  title: t('errorUpdatingQuestion', 'Error updating question'),
224
224
  kind: 'error',
225
- critical: true,
226
- description: error?.message,
225
+ subtitle: error?.message,
227
226
  });
228
227
  }
229
228
  }
@@ -5,7 +5,7 @@ import { DndContext, KeyboardSensor, MouseSensor, useSensor, useSensors } from '
5
5
  import { Accordion, AccordionItem, Button, InlineLoading } from '@carbon/react';
6
6
  import { Add, TrashCan } from '@carbon/react/icons';
7
7
  import { useParams } from 'react-router-dom';
8
- import { showToast, showNotification } from '@openmrs/esm-framework';
8
+ import { showSnackbar } from '@openmrs/esm-framework';
9
9
  import type { OHRIFormSchema } from '@openmrs/openmrs-form-engine-lib';
10
10
 
11
11
  import type { Schema, Question } from '../../types';
@@ -105,18 +105,17 @@ const InteractiveBuilder: React.FC<InteractiveBuilderProps> = ({ isLoading, onSc
105
105
 
106
106
  onSchemaChange({ ...schema });
107
107
 
108
- showToast({
108
+ showSnackbar({
109
109
  title: t('success', 'Success!'),
110
110
  kind: 'success',
111
- critical: true,
112
- description: t('formRenamed', 'Form renamed'),
111
+ isLowContrast: true,
112
+ subtitle: t('formRenamed', 'Form renamed'),
113
113
  });
114
114
  } catch (error) {
115
- showNotification({
115
+ showSnackbar({
116
116
  title: t('errorRenamingForm', 'Error renaming form'),
117
117
  kind: 'error',
118
- critical: true,
119
- description: error?.message,
118
+ subtitle: error?.message,
120
119
  });
121
120
  }
122
121
  },
@@ -132,19 +131,18 @@ const InteractiveBuilder: React.FC<InteractiveBuilderProps> = ({ isLoading, onSc
132
131
 
133
132
  onSchemaChange({ ...schema });
134
133
 
135
- showToast({
134
+ showSnackbar({
136
135
  title: t('success', 'Success!'),
137
136
  kind: 'success',
138
- critical: true,
139
- description: t('pageRenamed', 'Page renamed'),
137
+ isLowContrast: true,
138
+ subtitle: t('pageRenamed', 'Page renamed'),
140
139
  });
141
140
  } catch (error) {
142
141
  if (error instanceof Error) {
143
- showNotification({
142
+ showSnackbar({
144
143
  title: t('errorRenamingPage', 'Error renaming page'),
145
144
  kind: 'error',
146
- critical: true,
147
- description: error?.message,
145
+ subtitle: error?.message,
148
146
  });
149
147
  }
150
148
  }
@@ -162,19 +160,18 @@ const InteractiveBuilder: React.FC<InteractiveBuilderProps> = ({ isLoading, onSc
162
160
 
163
161
  resetIndices();
164
162
 
165
- showToast({
163
+ showSnackbar({
166
164
  title: t('success', 'Success!'),
167
165
  kind: 'success',
168
- critical: true,
169
- description: t('sectionRenamed', 'Section renamed'),
166
+ isLowContrast: true,
167
+ subtitle: t('sectionRenamed', 'Section renamed'),
170
168
  });
171
169
  } catch (error) {
172
170
  if (error instanceof Error) {
173
- showNotification({
171
+ showSnackbar({
174
172
  title: t('errorRenamingSection', 'Error renaming section'),
175
173
  kind: 'error',
176
- critical: true,
177
- description: error?.message,
174
+ subtitle: error?.message,
178
175
  });
179
176
  }
180
177
  }
@@ -193,22 +190,21 @@ const InteractiveBuilder: React.FC<InteractiveBuilderProps> = ({ isLoading, onSc
193
190
  onSchemaChange({ ...schema });
194
191
  resetIndices();
195
192
 
196
- showToast({
193
+ showSnackbar({
197
194
  title: t('success', 'Success!'),
198
195
  kind: 'success',
199
- critical: true,
200
- description: t(
196
+ isLowContrast: true,
197
+ subtitle: t(
201
198
  'questionDuplicated',
202
199
  "Question duplicated. Please change the duplicated question's ID to a unique, camelcased value",
203
200
  ),
204
201
  });
205
202
  } catch (error) {
206
203
  if (error instanceof Error) {
207
- showNotification({
204
+ showSnackbar({
208
205
  title: t('errorDuplicatingQuestion', 'Error duplicating question'),
209
206
  kind: 'error',
210
- critical: true,
211
- description: error?.message,
207
+ subtitle: error?.message,
212
208
  });
213
209
  }
214
210
  }
@@ -11,7 +11,7 @@ import {
11
11
  Stack,
12
12
  TextInput,
13
13
  } from '@carbon/react';
14
- import { showToast, showNotification } from '@openmrs/esm-framework';
14
+ import { showSnackbar } from '@openmrs/esm-framework';
15
15
  import type { Schema } from '../../types';
16
16
 
17
17
  interface NewFormModalProps {
@@ -31,19 +31,18 @@ const NewFormModal: React.FC<NewFormModalProps> = ({ schema, onSchemaChange, sho
31
31
  const updatedSchema = { ...schema, ...updates };
32
32
  onSchemaChange(updatedSchema);
33
33
 
34
- showToast({
34
+ showSnackbar({
35
35
  title: t('success', 'Success!'),
36
36
  kind: 'success',
37
- critical: true,
38
- description: t('formCreated', 'New form created'),
37
+ isLowContrast: true,
38
+ subtitle: t('formCreated', 'New form created'),
39
39
  });
40
40
  } catch (error) {
41
41
  if (error instanceof Error) {
42
- showNotification({
42
+ showSnackbar({
43
43
  title: t('errorCreatingForm', 'Error creating form'),
44
44
  kind: 'error',
45
- critical: true,
46
- description: error?.message,
45
+ subtitle: error?.message,
47
46
  });
48
47
  }
49
48
  }
@@ -1,7 +1,7 @@
1
1
  import React, { useState } from 'react';
2
2
  import { useTranslation } from 'react-i18next';
3
3
  import { Button, ComposedModal, Form, FormGroup, ModalBody, ModalFooter, ModalHeader, TextInput } from '@carbon/react';
4
- import { showToast, showNotification } from '@openmrs/esm-framework';
4
+ import { showSnackbar } from '@openmrs/esm-framework';
5
5
  import type { Schema } from '../../types';
6
6
 
7
7
  interface PageModalProps {
@@ -31,19 +31,18 @@ const PageModal: React.FC<PageModalProps> = ({ schema, onSchemaChange, showModal
31
31
  onSchemaChange({ ...schema });
32
32
  setPageTitle('');
33
33
  }
34
- showToast({
34
+ showSnackbar({
35
35
  title: t('success', 'Success!'),
36
36
  kind: 'success',
37
- critical: true,
38
- description: t('pageCreated', 'New page created'),
37
+ isLowContrast: true,
38
+ subtitle: t('pageCreated', 'New page created'),
39
39
  });
40
40
  } catch (error) {
41
41
  if (error instanceof Error) {
42
- showNotification({
42
+ showSnackbar({
43
43
  title: t('errorCreatingPage', 'Error creating page'),
44
44
  kind: 'error',
45
- critical: true,
46
- description: error?.message,
45
+ subtitle: error?.message,
47
46
  });
48
47
  }
49
48
  }