@openmrs/esm-form-builder-app 2.0.2-pre.559 → 2.0.2-pre.568
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/150.js +1 -1
- package/dist/150.js.map +1 -1
- package/dist/153.js +1 -1
- package/dist/252.js +2 -0
- package/dist/252.js.map +1 -0
- package/dist/256.js +1 -1
- package/dist/256.js.map +1 -1
- package/dist/447.js +1 -1
- package/dist/447.js.map +1 -1
- package/dist/879.js +2 -0
- package/dist/879.js.map +1 -0
- package/dist/main.js +1 -1
- package/dist/openmrs-esm-form-builder-app.js.buildmanifest.json +198 -198
- package/dist/routes.json +1 -1
- package/package.json +1 -1
- package/src/components/dashboard/dashboard.component.tsx +0 -1
- package/src/components/form-editor/form-editor.component.tsx +48 -5
- package/src/components/form-editor/form-editor.scss +6 -0
- package/src/components/interactive-builder/draggable-question.component.tsx +23 -24
- package/src/components/interactive-builder/edit-question-modal.component.tsx +308 -317
- package/src/components/interactive-builder/editable-value.component.tsx +1 -1
- package/src/components/interactive-builder/interactive-builder.component.tsx +29 -31
- package/dist/682.js +0 -2
- package/dist/682.js.map +0 -1
- package/dist/990.js +0 -2
- package/dist/990.js.map +0 -1
- /package/dist/{682.js.LICENSE.txt → 252.js.LICENSE.txt} +0 -0
- /package/dist/{990.js.LICENSE.txt → 879.js.LICENSE.txt} +0 -0
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(
|
|
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(879),t.e(127),t.e(252),t.e(672),t.e(144),t.e(150)]).then(t.bind(t,99317))}),o),(0,n.getAsyncLifecycle)((function(){return Promise.all([t.e(879),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.0.3-pre.846",(()=>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","11.18.6",(()=>Promise.all([o.e(672),o.e(62)]).then((()=>()=>o(89062))))),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(536).then((()=>()=>o(89062))))),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],150:[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)})();
|
|
@@ -77,9 +77,9 @@
|
|
|
77
77
|
"initial": false,
|
|
78
78
|
"entry": false,
|
|
79
79
|
"recorded": false,
|
|
80
|
-
"size":
|
|
80
|
+
"size": 291832,
|
|
81
81
|
"sizes": {
|
|
82
|
-
"javascript":
|
|
82
|
+
"javascript": 291790,
|
|
83
83
|
"consume-shared": 42
|
|
84
84
|
},
|
|
85
85
|
"names": [],
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
"auxiliaryFiles": [
|
|
95
95
|
"150.js.map"
|
|
96
96
|
],
|
|
97
|
-
"hash": "
|
|
97
|
+
"hash": "815748e014453ffc",
|
|
98
98
|
"childrenByOrder": {}
|
|
99
99
|
},
|
|
100
100
|
{
|
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
"auxiliaryFiles": [
|
|
119
119
|
"153.js.map"
|
|
120
120
|
],
|
|
121
|
-
"hash": "
|
|
121
|
+
"hash": "41617d77a413cbe8",
|
|
122
122
|
"childrenByOrder": {}
|
|
123
123
|
},
|
|
124
124
|
{
|
|
@@ -173,168 +173,7 @@
|
|
|
173
173
|
"auxiliaryFiles": [
|
|
174
174
|
"main.js.map"
|
|
175
175
|
],
|
|
176
|
-
"hash": "
|
|
177
|
-
"childrenByOrder": {}
|
|
178
|
-
},
|
|
179
|
-
{
|
|
180
|
-
"rendered": true,
|
|
181
|
-
"initial": false,
|
|
182
|
-
"entry": false,
|
|
183
|
-
"recorded": false,
|
|
184
|
-
"size": 3602,
|
|
185
|
-
"sizes": {
|
|
186
|
-
"javascript": 3602
|
|
187
|
-
},
|
|
188
|
-
"names": [],
|
|
189
|
-
"idHints": [],
|
|
190
|
-
"runtime": [
|
|
191
|
-
"@openmrs/esm-form-builder-app",
|
|
192
|
-
"main"
|
|
193
|
-
],
|
|
194
|
-
"files": [
|
|
195
|
-
"256.js"
|
|
196
|
-
],
|
|
197
|
-
"auxiliaryFiles": [
|
|
198
|
-
"256.js.map"
|
|
199
|
-
],
|
|
200
|
-
"hash": "f8ab973fc9b7afb5",
|
|
201
|
-
"childrenByOrder": {}
|
|
202
|
-
},
|
|
203
|
-
{
|
|
204
|
-
"rendered": true,
|
|
205
|
-
"initial": false,
|
|
206
|
-
"entry": false,
|
|
207
|
-
"recorded": false,
|
|
208
|
-
"size": 7103,
|
|
209
|
-
"sizes": {
|
|
210
|
-
"javascript": 7103
|
|
211
|
-
},
|
|
212
|
-
"names": [],
|
|
213
|
-
"idHints": [],
|
|
214
|
-
"runtime": [
|
|
215
|
-
"@openmrs/esm-form-builder-app",
|
|
216
|
-
"main"
|
|
217
|
-
],
|
|
218
|
-
"files": [
|
|
219
|
-
"294.js"
|
|
220
|
-
],
|
|
221
|
-
"auxiliaryFiles": [
|
|
222
|
-
"294.js.map"
|
|
223
|
-
],
|
|
224
|
-
"hash": "b314e60f1c149ba9",
|
|
225
|
-
"childrenByOrder": {}
|
|
226
|
-
},
|
|
227
|
-
{
|
|
228
|
-
"rendered": true,
|
|
229
|
-
"initial": false,
|
|
230
|
-
"entry": false,
|
|
231
|
-
"recorded": false,
|
|
232
|
-
"size": 8605,
|
|
233
|
-
"sizes": {
|
|
234
|
-
"javascript": 8605
|
|
235
|
-
},
|
|
236
|
-
"names": [],
|
|
237
|
-
"idHints": [],
|
|
238
|
-
"runtime": [
|
|
239
|
-
"@openmrs/esm-form-builder-app",
|
|
240
|
-
"main"
|
|
241
|
-
],
|
|
242
|
-
"files": [
|
|
243
|
-
"319.js"
|
|
244
|
-
],
|
|
245
|
-
"auxiliaryFiles": [],
|
|
246
|
-
"hash": "d0940e001f457609",
|
|
247
|
-
"childrenByOrder": {}
|
|
248
|
-
},
|
|
249
|
-
{
|
|
250
|
-
"rendered": true,
|
|
251
|
-
"initial": false,
|
|
252
|
-
"entry": false,
|
|
253
|
-
"recorded": false,
|
|
254
|
-
"size": 984,
|
|
255
|
-
"sizes": {
|
|
256
|
-
"javascript": 984
|
|
257
|
-
},
|
|
258
|
-
"names": [],
|
|
259
|
-
"idHints": [],
|
|
260
|
-
"runtime": [
|
|
261
|
-
"@openmrs/esm-form-builder-app",
|
|
262
|
-
"main"
|
|
263
|
-
],
|
|
264
|
-
"files": [
|
|
265
|
-
"447.js"
|
|
266
|
-
],
|
|
267
|
-
"auxiliaryFiles": [
|
|
268
|
-
"447.js.map"
|
|
269
|
-
],
|
|
270
|
-
"hash": "cbefabc8afbf68d8",
|
|
271
|
-
"childrenByOrder": {}
|
|
272
|
-
},
|
|
273
|
-
{
|
|
274
|
-
"rendered": true,
|
|
275
|
-
"initial": false,
|
|
276
|
-
"entry": false,
|
|
277
|
-
"recorded": false,
|
|
278
|
-
"size": 38928,
|
|
279
|
-
"sizes": {
|
|
280
|
-
"javascript": 38928
|
|
281
|
-
},
|
|
282
|
-
"names": [],
|
|
283
|
-
"idHints": [],
|
|
284
|
-
"runtime": [
|
|
285
|
-
"@openmrs/esm-form-builder-app",
|
|
286
|
-
"main"
|
|
287
|
-
],
|
|
288
|
-
"files": [
|
|
289
|
-
"536.js"
|
|
290
|
-
],
|
|
291
|
-
"auxiliaryFiles": [
|
|
292
|
-
"536.js.map"
|
|
293
|
-
],
|
|
294
|
-
"hash": "537b37c0a145f5e5",
|
|
295
|
-
"childrenByOrder": {}
|
|
296
|
-
},
|
|
297
|
-
{
|
|
298
|
-
"rendered": true,
|
|
299
|
-
"initial": false,
|
|
300
|
-
"entry": false,
|
|
301
|
-
"recorded": false,
|
|
302
|
-
"size": 8521,
|
|
303
|
-
"sizes": {
|
|
304
|
-
"javascript": 8521
|
|
305
|
-
},
|
|
306
|
-
"names": [],
|
|
307
|
-
"idHints": [],
|
|
308
|
-
"runtime": [
|
|
309
|
-
"@openmrs/esm-form-builder-app",
|
|
310
|
-
"main"
|
|
311
|
-
],
|
|
312
|
-
"files": [
|
|
313
|
-
"574.js"
|
|
314
|
-
],
|
|
315
|
-
"auxiliaryFiles": [],
|
|
316
|
-
"hash": "d89b31953cb60765",
|
|
317
|
-
"childrenByOrder": {}
|
|
318
|
-
},
|
|
319
|
-
{
|
|
320
|
-
"rendered": false,
|
|
321
|
-
"initial": false,
|
|
322
|
-
"entry": false,
|
|
323
|
-
"recorded": false,
|
|
324
|
-
"reason": "reused as split chunk (cache group: default)",
|
|
325
|
-
"size": 42,
|
|
326
|
-
"sizes": {
|
|
327
|
-
"consume-shared": 42
|
|
328
|
-
},
|
|
329
|
-
"names": [],
|
|
330
|
-
"idHints": [],
|
|
331
|
-
"runtime": [
|
|
332
|
-
"@openmrs/esm-form-builder-app",
|
|
333
|
-
"main"
|
|
334
|
-
],
|
|
335
|
-
"files": [],
|
|
336
|
-
"auxiliaryFiles": [],
|
|
337
|
-
"hash": "c20b64ea6ed751d0",
|
|
176
|
+
"hash": "58be7f6cbbdf839c",
|
|
338
177
|
"childrenByOrder": {}
|
|
339
178
|
},
|
|
340
179
|
{
|
|
@@ -343,9 +182,9 @@
|
|
|
343
182
|
"entry": false,
|
|
344
183
|
"recorded": false,
|
|
345
184
|
"reason": "split chunk (cache group: defaultVendors)",
|
|
346
|
-
"size":
|
|
185
|
+
"size": 2673570,
|
|
347
186
|
"sizes": {
|
|
348
|
-
"javascript":
|
|
187
|
+
"javascript": 2673570
|
|
349
188
|
},
|
|
350
189
|
"names": [],
|
|
351
190
|
"idHints": [
|
|
@@ -356,7 +195,7 @@
|
|
|
356
195
|
"main"
|
|
357
196
|
],
|
|
358
197
|
"files": [
|
|
359
|
-
"
|
|
198
|
+
"252.js"
|
|
360
199
|
],
|
|
361
200
|
"auxiliaryFiles": [
|
|
362
201
|
"002a2ac7b7d3b3b807ddcb210cfc91eb.js",
|
|
@@ -427,6 +266,7 @@
|
|
|
427
266
|
"23bb1a9f279e7a732bfd405350aab114.js",
|
|
428
267
|
"24a3ff38afde257888d755ece9bfd704.js",
|
|
429
268
|
"250c230f9465d8affc02c67d41d7e067.js",
|
|
269
|
+
"252.js.map",
|
|
430
270
|
"252b829e2dab81bc5a4c28d52f34edf5.js",
|
|
431
271
|
"25718a469574ade47e23567d8c543169.js",
|
|
432
272
|
"25eda4bb98e40a82cfd5b4bf9fbc06ec.js",
|
|
@@ -571,7 +411,6 @@
|
|
|
571
411
|
"66713913fc89a3bcad5d7804c03dcb43.js",
|
|
572
412
|
"6707296f86034ccf2225ce3c27370114.js",
|
|
573
413
|
"677b2b5d0c9507508a831e4b67d61c6e.js",
|
|
574
|
-
"682.js.map",
|
|
575
414
|
"686915e134683f72ea5f3c227a6f13be.js",
|
|
576
415
|
"69ec362e03850ff2d49044acbb19b385.js",
|
|
577
416
|
"6aa13e92b5cf7d479e73acdc7c05abf3.js",
|
|
@@ -804,7 +643,168 @@
|
|
|
804
643
|
"ffb6d262efb0718a20d60b5fecb76ea6.js",
|
|
805
644
|
"ffd3b83e8b5878f4785591ff54b1dfff.js"
|
|
806
645
|
],
|
|
807
|
-
"hash": "
|
|
646
|
+
"hash": "838952f617cbbf07",
|
|
647
|
+
"childrenByOrder": {}
|
|
648
|
+
},
|
|
649
|
+
{
|
|
650
|
+
"rendered": true,
|
|
651
|
+
"initial": false,
|
|
652
|
+
"entry": false,
|
|
653
|
+
"recorded": false,
|
|
654
|
+
"size": 3602,
|
|
655
|
+
"sizes": {
|
|
656
|
+
"javascript": 3602
|
|
657
|
+
},
|
|
658
|
+
"names": [],
|
|
659
|
+
"idHints": [],
|
|
660
|
+
"runtime": [
|
|
661
|
+
"@openmrs/esm-form-builder-app",
|
|
662
|
+
"main"
|
|
663
|
+
],
|
|
664
|
+
"files": [
|
|
665
|
+
"256.js"
|
|
666
|
+
],
|
|
667
|
+
"auxiliaryFiles": [
|
|
668
|
+
"256.js.map"
|
|
669
|
+
],
|
|
670
|
+
"hash": "75d4da4a9f798941",
|
|
671
|
+
"childrenByOrder": {}
|
|
672
|
+
},
|
|
673
|
+
{
|
|
674
|
+
"rendered": true,
|
|
675
|
+
"initial": false,
|
|
676
|
+
"entry": false,
|
|
677
|
+
"recorded": false,
|
|
678
|
+
"size": 7103,
|
|
679
|
+
"sizes": {
|
|
680
|
+
"javascript": 7103
|
|
681
|
+
},
|
|
682
|
+
"names": [],
|
|
683
|
+
"idHints": [],
|
|
684
|
+
"runtime": [
|
|
685
|
+
"@openmrs/esm-form-builder-app",
|
|
686
|
+
"main"
|
|
687
|
+
],
|
|
688
|
+
"files": [
|
|
689
|
+
"294.js"
|
|
690
|
+
],
|
|
691
|
+
"auxiliaryFiles": [
|
|
692
|
+
"294.js.map"
|
|
693
|
+
],
|
|
694
|
+
"hash": "b314e60f1c149ba9",
|
|
695
|
+
"childrenByOrder": {}
|
|
696
|
+
},
|
|
697
|
+
{
|
|
698
|
+
"rendered": true,
|
|
699
|
+
"initial": false,
|
|
700
|
+
"entry": false,
|
|
701
|
+
"recorded": false,
|
|
702
|
+
"size": 8605,
|
|
703
|
+
"sizes": {
|
|
704
|
+
"javascript": 8605
|
|
705
|
+
},
|
|
706
|
+
"names": [],
|
|
707
|
+
"idHints": [],
|
|
708
|
+
"runtime": [
|
|
709
|
+
"@openmrs/esm-form-builder-app",
|
|
710
|
+
"main"
|
|
711
|
+
],
|
|
712
|
+
"files": [
|
|
713
|
+
"319.js"
|
|
714
|
+
],
|
|
715
|
+
"auxiliaryFiles": [],
|
|
716
|
+
"hash": "d0940e001f457609",
|
|
717
|
+
"childrenByOrder": {}
|
|
718
|
+
},
|
|
719
|
+
{
|
|
720
|
+
"rendered": true,
|
|
721
|
+
"initial": false,
|
|
722
|
+
"entry": false,
|
|
723
|
+
"recorded": false,
|
|
724
|
+
"size": 984,
|
|
725
|
+
"sizes": {
|
|
726
|
+
"javascript": 984
|
|
727
|
+
},
|
|
728
|
+
"names": [],
|
|
729
|
+
"idHints": [],
|
|
730
|
+
"runtime": [
|
|
731
|
+
"@openmrs/esm-form-builder-app",
|
|
732
|
+
"main"
|
|
733
|
+
],
|
|
734
|
+
"files": [
|
|
735
|
+
"447.js"
|
|
736
|
+
],
|
|
737
|
+
"auxiliaryFiles": [
|
|
738
|
+
"447.js.map"
|
|
739
|
+
],
|
|
740
|
+
"hash": "5fa3727db2e3d8be",
|
|
741
|
+
"childrenByOrder": {}
|
|
742
|
+
},
|
|
743
|
+
{
|
|
744
|
+
"rendered": true,
|
|
745
|
+
"initial": false,
|
|
746
|
+
"entry": false,
|
|
747
|
+
"recorded": false,
|
|
748
|
+
"size": 38928,
|
|
749
|
+
"sizes": {
|
|
750
|
+
"javascript": 38928
|
|
751
|
+
},
|
|
752
|
+
"names": [],
|
|
753
|
+
"idHints": [],
|
|
754
|
+
"runtime": [
|
|
755
|
+
"@openmrs/esm-form-builder-app",
|
|
756
|
+
"main"
|
|
757
|
+
],
|
|
758
|
+
"files": [
|
|
759
|
+
"536.js"
|
|
760
|
+
],
|
|
761
|
+
"auxiliaryFiles": [
|
|
762
|
+
"536.js.map"
|
|
763
|
+
],
|
|
764
|
+
"hash": "537b37c0a145f5e5",
|
|
765
|
+
"childrenByOrder": {}
|
|
766
|
+
},
|
|
767
|
+
{
|
|
768
|
+
"rendered": true,
|
|
769
|
+
"initial": false,
|
|
770
|
+
"entry": false,
|
|
771
|
+
"recorded": false,
|
|
772
|
+
"size": 8521,
|
|
773
|
+
"sizes": {
|
|
774
|
+
"javascript": 8521
|
|
775
|
+
},
|
|
776
|
+
"names": [],
|
|
777
|
+
"idHints": [],
|
|
778
|
+
"runtime": [
|
|
779
|
+
"@openmrs/esm-form-builder-app",
|
|
780
|
+
"main"
|
|
781
|
+
],
|
|
782
|
+
"files": [
|
|
783
|
+
"574.js"
|
|
784
|
+
],
|
|
785
|
+
"auxiliaryFiles": [],
|
|
786
|
+
"hash": "d89b31953cb60765",
|
|
787
|
+
"childrenByOrder": {}
|
|
788
|
+
},
|
|
789
|
+
{
|
|
790
|
+
"rendered": false,
|
|
791
|
+
"initial": false,
|
|
792
|
+
"entry": false,
|
|
793
|
+
"recorded": false,
|
|
794
|
+
"reason": "reused as split chunk (cache group: default)",
|
|
795
|
+
"size": 42,
|
|
796
|
+
"sizes": {
|
|
797
|
+
"consume-shared": 42
|
|
798
|
+
},
|
|
799
|
+
"names": [],
|
|
800
|
+
"idHints": [],
|
|
801
|
+
"runtime": [
|
|
802
|
+
"@openmrs/esm-form-builder-app",
|
|
803
|
+
"main"
|
|
804
|
+
],
|
|
805
|
+
"files": [],
|
|
806
|
+
"auxiliaryFiles": [],
|
|
807
|
+
"hash": "c20b64ea6ed751d0",
|
|
808
808
|
"childrenByOrder": {}
|
|
809
809
|
},
|
|
810
810
|
{
|
|
@@ -922,6 +922,33 @@
|
|
|
922
922
|
"hash": "96f084e06c1418db",
|
|
923
923
|
"childrenByOrder": {}
|
|
924
924
|
},
|
|
925
|
+
{
|
|
926
|
+
"rendered": true,
|
|
927
|
+
"initial": false,
|
|
928
|
+
"entry": false,
|
|
929
|
+
"recorded": false,
|
|
930
|
+
"reason": "split chunk (cache group: defaultVendors)",
|
|
931
|
+
"size": 2573538,
|
|
932
|
+
"sizes": {
|
|
933
|
+
"javascript": 2573538
|
|
934
|
+
},
|
|
935
|
+
"names": [],
|
|
936
|
+
"idHints": [
|
|
937
|
+
"vendors"
|
|
938
|
+
],
|
|
939
|
+
"runtime": [
|
|
940
|
+
"@openmrs/esm-form-builder-app",
|
|
941
|
+
"main"
|
|
942
|
+
],
|
|
943
|
+
"files": [
|
|
944
|
+
"879.js"
|
|
945
|
+
],
|
|
946
|
+
"auxiliaryFiles": [
|
|
947
|
+
"879.js.map"
|
|
948
|
+
],
|
|
949
|
+
"hash": "9f4f93c61f43c663",
|
|
950
|
+
"childrenByOrder": {}
|
|
951
|
+
},
|
|
925
952
|
{
|
|
926
953
|
"rendered": true,
|
|
927
954
|
"initial": true,
|
|
@@ -975,33 +1002,6 @@
|
|
|
975
1002
|
],
|
|
976
1003
|
"hash": "3b812b4fc8bacf97",
|
|
977
1004
|
"childrenByOrder": {}
|
|
978
|
-
},
|
|
979
|
-
{
|
|
980
|
-
"rendered": true,
|
|
981
|
-
"initial": false,
|
|
982
|
-
"entry": false,
|
|
983
|
-
"recorded": false,
|
|
984
|
-
"reason": "split chunk (cache group: defaultVendors)",
|
|
985
|
-
"size": 2445526,
|
|
986
|
-
"sizes": {
|
|
987
|
-
"javascript": 2445526
|
|
988
|
-
},
|
|
989
|
-
"names": [],
|
|
990
|
-
"idHints": [
|
|
991
|
-
"vendors"
|
|
992
|
-
],
|
|
993
|
-
"runtime": [
|
|
994
|
-
"@openmrs/esm-form-builder-app",
|
|
995
|
-
"main"
|
|
996
|
-
],
|
|
997
|
-
"files": [
|
|
998
|
-
"990.js"
|
|
999
|
-
],
|
|
1000
|
-
"auxiliaryFiles": [
|
|
1001
|
-
"990.js.map"
|
|
1002
|
-
],
|
|
1003
|
-
"hash": "9ff307c6e387b413",
|
|
1004
|
-
"childrenByOrder": {}
|
|
1005
1005
|
}
|
|
1006
1006
|
]
|
|
1007
1007
|
}
|
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.0.2-pre.
|
|
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.0.2-pre.568"}
|
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import React, { useCallback, useEffect, useState } from "react";
|
|
1
|
+
import React, { useCallback, useEffect, useMemo, useState } from "react";
|
|
2
2
|
import {
|
|
3
3
|
Button,
|
|
4
4
|
Column,
|
|
5
5
|
ComposedModal,
|
|
6
|
+
CopyButton,
|
|
6
7
|
InlineLoading,
|
|
7
8
|
InlineNotification,
|
|
8
9
|
Form,
|
|
@@ -16,11 +17,11 @@ import {
|
|
|
16
17
|
TabPanels,
|
|
17
18
|
TabPanel,
|
|
18
19
|
} from "@carbon/react";
|
|
20
|
+
import { Download } from "@carbon/react/icons";
|
|
19
21
|
import { useParams } from "react-router-dom";
|
|
20
22
|
import { useTranslation } from "react-i18next";
|
|
21
23
|
import { ExtensionSlot } from "@openmrs/esm-framework";
|
|
22
24
|
import type { OHRIFormSchema } from "@openmrs/openmrs-form-engine-lib";
|
|
23
|
-
|
|
24
25
|
import type { Schema, RouteParams } from "../../types";
|
|
25
26
|
import { useClobdata } from "../../hooks/useClobdata";
|
|
26
27
|
import { useForm } from "../../hooks/useForm";
|
|
@@ -61,6 +62,7 @@ const FormEditor: React.FC = () => {
|
|
|
61
62
|
const [stringifiedSchema, setStringifiedSchema] = useState(
|
|
62
63
|
schema ? JSON.stringify(schema, null, 2) : ""
|
|
63
64
|
);
|
|
65
|
+
const [copied, setCopied] = useState(false);
|
|
64
66
|
|
|
65
67
|
const isLoadingFormOrSchema =
|
|
66
68
|
formUuid && (isLoadingClobdata || isLoadingForm);
|
|
@@ -233,6 +235,19 @@ const FormEditor: React.FC = () => {
|
|
|
233
235
|
);
|
|
234
236
|
};
|
|
235
237
|
|
|
238
|
+
const downloadableSchema = useMemo(
|
|
239
|
+
() =>
|
|
240
|
+
new Blob([JSON.stringify(schema, null, 2)], {
|
|
241
|
+
type: "application/json",
|
|
242
|
+
}),
|
|
243
|
+
[schema]
|
|
244
|
+
);
|
|
245
|
+
|
|
246
|
+
const handleCopySchema = useCallback(() => {
|
|
247
|
+
navigator.clipboard.writeText(stringifiedSchema);
|
|
248
|
+
setCopied(true);
|
|
249
|
+
}, [stringifiedSchema]);
|
|
250
|
+
|
|
236
251
|
return (
|
|
237
252
|
<>
|
|
238
253
|
<div className={styles.breadcrumbsContainer}>
|
|
@@ -260,9 +275,37 @@ const FormEditor: React.FC = () => {
|
|
|
260
275
|
</Button>
|
|
261
276
|
</div>
|
|
262
277
|
<div>
|
|
263
|
-
<
|
|
264
|
-
{
|
|
265
|
-
|
|
278
|
+
<div className={styles.heading}>
|
|
279
|
+
<span className={styles.tabHeading}>
|
|
280
|
+
{t("schemaEditor", "Schema editor")}
|
|
281
|
+
</span>
|
|
282
|
+
{schema ? (
|
|
283
|
+
<>
|
|
284
|
+
<CopyButton
|
|
285
|
+
align="top"
|
|
286
|
+
className="cds--btn--md"
|
|
287
|
+
enterDelayMs={300}
|
|
288
|
+
iconDescription={t("copySchema", "Copy schema")}
|
|
289
|
+
kind="ghost"
|
|
290
|
+
onClick={handleCopySchema}
|
|
291
|
+
/>
|
|
292
|
+
<a
|
|
293
|
+
download={`${form?.name}.json`}
|
|
294
|
+
href={window.URL.createObjectURL(downloadableSchema)}
|
|
295
|
+
>
|
|
296
|
+
<Button
|
|
297
|
+
enterDelayMs={300}
|
|
298
|
+
renderIcon={Download}
|
|
299
|
+
kind={"ghost"}
|
|
300
|
+
iconDescription={t("downloadSchema", "Download schema")}
|
|
301
|
+
hasIconOnly
|
|
302
|
+
size="md"
|
|
303
|
+
tooltipAlignment="start"
|
|
304
|
+
/>
|
|
305
|
+
</a>
|
|
306
|
+
</>
|
|
307
|
+
) : null}
|
|
308
|
+
</div>
|
|
266
309
|
{formError ? (
|
|
267
310
|
<Error
|
|
268
311
|
error={formError}
|