@openmrs/esm-openconceptlab-app 3.0.1-pre.10 → 3.0.1-pre.5
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/.turbo/turbo-build.log +19 -19
- package/dist/15.js +1 -0
- package/dist/538.js +2 -0
- package/dist/{645.js.LICENSE.txt → 538.js.LICENSE.txt} +0 -0
- package/dist/574.js +1 -1
- package/dist/862.js +1 -1
- package/dist/main.js +1 -1
- package/dist/openmrs-esm-openconceptlab-app.js +1 -1
- package/dist/openmrs-esm-openconceptlab-app.js.buildmanifest.json +42 -42
- package/dist/openmrs-esm-openconceptlab-app.old +1 -1
- package/locales/en/translation.json +35 -0
- package/locales/fr/translation.json +35 -0
- package/package.json +2 -2
- package/src/import/import.component.tsx +16 -23
- package/src/import/import.test.tsx +15 -13
- package/src/root.component.tsx +5 -8
- package/src/root.test.tsx +4 -4
- package/src/subscription/subscription.component.tsx +17 -28
- package/src/subscription/subscription.test.tsx +20 -22
- package/src/types.ts +0 -10
- package/translations/en.json +26 -40
- package/dist/452.js +0 -1
- package/dist/645.js +0 -2
- package/src/previous-imports/import-overview/import-items.component.scss +0 -24
- package/src/previous-imports/import-overview/import-items.component.tsx +0 -124
- package/src/previous-imports/import-overview/import-items.resource.ts +0 -10
- package/src/previous-imports/import-overview/import-items.test.tsx +0 -93
- package/src/previous-imports/import-overview/import-overview.component.scss +0 -11
- package/src/previous-imports/import-overview/import-overview.component.tsx +0 -65
- package/src/previous-imports/import-overview/import-overview.test.tsx +0 -83
- package/src/previous-imports/previous-imports.component.scss +0 -39
- package/src/previous-imports/previous-imports.component.tsx +0 -136
- package/src/previous-imports/previous-imports.resource.ts +0 -17
- package/src/previous-imports/previous-imports.test.tsx +0 -77
|
@@ -1,15 +1,38 @@
|
|
|
1
1
|
{
|
|
2
2
|
"chunks": [
|
|
3
|
+
{
|
|
4
|
+
"rendered": true,
|
|
5
|
+
"initial": false,
|
|
6
|
+
"entry": false,
|
|
7
|
+
"recorded": false,
|
|
8
|
+
"size": 45189,
|
|
9
|
+
"sizes": {
|
|
10
|
+
"javascript": 45147,
|
|
11
|
+
"consume-shared": 42
|
|
12
|
+
},
|
|
13
|
+
"names": [],
|
|
14
|
+
"idHints": [],
|
|
15
|
+
"runtime": [
|
|
16
|
+
"@openmrs/esm-openconceptlab-app",
|
|
17
|
+
"main"
|
|
18
|
+
],
|
|
19
|
+
"files": [
|
|
20
|
+
"15.js"
|
|
21
|
+
],
|
|
22
|
+
"auxiliaryFiles": [],
|
|
23
|
+
"hash": "5073469815b6cedcaf71",
|
|
24
|
+
"childrenByOrder": {}
|
|
25
|
+
},
|
|
3
26
|
{
|
|
4
27
|
"rendered": true,
|
|
5
28
|
"initial": true,
|
|
6
29
|
"entry": true,
|
|
7
30
|
"recorded": false,
|
|
8
|
-
"size":
|
|
31
|
+
"size": 19278,
|
|
9
32
|
"sizes": {
|
|
10
33
|
"javascript": 42,
|
|
11
34
|
"share-init": 168,
|
|
12
|
-
"runtime":
|
|
35
|
+
"runtime": 19068
|
|
13
36
|
},
|
|
14
37
|
"names": [
|
|
15
38
|
"@openmrs/esm-openconceptlab-app"
|
|
@@ -22,7 +45,7 @@
|
|
|
22
45
|
"openmrs-esm-openconceptlab-app.js"
|
|
23
46
|
],
|
|
24
47
|
"auxiliaryFiles": [],
|
|
25
|
-
"hash": "
|
|
48
|
+
"hash": "6a591c76f971f08f79da",
|
|
26
49
|
"childrenByOrder": {}
|
|
27
50
|
},
|
|
28
51
|
{
|
|
@@ -30,12 +53,12 @@
|
|
|
30
53
|
"initial": true,
|
|
31
54
|
"entry": true,
|
|
32
55
|
"recorded": false,
|
|
33
|
-
"size":
|
|
56
|
+
"size": 21901,
|
|
34
57
|
"sizes": {
|
|
35
58
|
"consume-shared": 42,
|
|
36
59
|
"javascript": 2256,
|
|
37
60
|
"share-init": 168,
|
|
38
|
-
"runtime":
|
|
61
|
+
"runtime": 19435
|
|
39
62
|
},
|
|
40
63
|
"names": [
|
|
41
64
|
"main"
|
|
@@ -48,7 +71,7 @@
|
|
|
48
71
|
"main.js"
|
|
49
72
|
],
|
|
50
73
|
"auxiliaryFiles": [],
|
|
51
|
-
"hash": "
|
|
74
|
+
"hash": "0c58c4f2010c43dc7dd2",
|
|
52
75
|
"childrenByOrder": {}
|
|
53
76
|
},
|
|
54
77
|
{
|
|
@@ -77,7 +100,7 @@
|
|
|
77
100
|
"initial": false,
|
|
78
101
|
"entry": false,
|
|
79
102
|
"recorded": false,
|
|
80
|
-
"reason": "
|
|
103
|
+
"reason": "split chunk (cache group: defaultVendors)",
|
|
81
104
|
"size": 137533,
|
|
82
105
|
"sizes": {
|
|
83
106
|
"javascript": 137533
|
|
@@ -102,22 +125,24 @@
|
|
|
102
125
|
"initial": false,
|
|
103
126
|
"entry": false,
|
|
104
127
|
"recorded": false,
|
|
105
|
-
"
|
|
128
|
+
"reason": "split chunk (cache group: defaultVendors)",
|
|
129
|
+
"size": 820257,
|
|
106
130
|
"sizes": {
|
|
107
|
-
"javascript":
|
|
108
|
-
"consume-shared": 84
|
|
131
|
+
"javascript": 820257
|
|
109
132
|
},
|
|
110
133
|
"names": [],
|
|
111
|
-
"idHints": [
|
|
134
|
+
"idHints": [
|
|
135
|
+
"vendors"
|
|
136
|
+
],
|
|
112
137
|
"runtime": [
|
|
113
138
|
"@openmrs/esm-openconceptlab-app",
|
|
114
139
|
"main"
|
|
115
140
|
],
|
|
116
141
|
"files": [
|
|
117
|
-
"
|
|
142
|
+
"538.js"
|
|
118
143
|
],
|
|
119
144
|
"auxiliaryFiles": [],
|
|
120
|
-
"hash": "
|
|
145
|
+
"hash": "d6f1d6d949f2efcf186e",
|
|
121
146
|
"childrenByOrder": {}
|
|
122
147
|
},
|
|
123
148
|
{
|
|
@@ -125,9 +150,9 @@
|
|
|
125
150
|
"initial": false,
|
|
126
151
|
"entry": false,
|
|
127
152
|
"recorded": false,
|
|
128
|
-
"size":
|
|
153
|
+
"size": 1943,
|
|
129
154
|
"sizes": {
|
|
130
|
-
"javascript":
|
|
155
|
+
"javascript": 1943
|
|
131
156
|
},
|
|
132
157
|
"names": [],
|
|
133
158
|
"idHints": [],
|
|
@@ -139,32 +164,7 @@
|
|
|
139
164
|
"574.js"
|
|
140
165
|
],
|
|
141
166
|
"auxiliaryFiles": [],
|
|
142
|
-
"hash": "
|
|
143
|
-
"childrenByOrder": {}
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
"rendered": true,
|
|
147
|
-
"initial": false,
|
|
148
|
-
"entry": false,
|
|
149
|
-
"recorded": false,
|
|
150
|
-
"reason": "split chunk (cache group: defaultVendors)",
|
|
151
|
-
"size": 1799596,
|
|
152
|
-
"sizes": {
|
|
153
|
-
"javascript": 1799596
|
|
154
|
-
},
|
|
155
|
-
"names": [],
|
|
156
|
-
"idHints": [
|
|
157
|
-
"vendors"
|
|
158
|
-
],
|
|
159
|
-
"runtime": [
|
|
160
|
-
"@openmrs/esm-openconceptlab-app",
|
|
161
|
-
"main"
|
|
162
|
-
],
|
|
163
|
-
"files": [
|
|
164
|
-
"645.js"
|
|
165
|
-
],
|
|
166
|
-
"auxiliaryFiles": [],
|
|
167
|
-
"hash": "ebc70c52b01ddb991d59",
|
|
167
|
+
"hash": "1ebe466753433a738c79",
|
|
168
168
|
"childrenByOrder": {}
|
|
169
169
|
},
|
|
170
170
|
{
|
|
@@ -258,7 +258,7 @@
|
|
|
258
258
|
"862.js"
|
|
259
259
|
],
|
|
260
260
|
"auxiliaryFiles": [],
|
|
261
|
-
"hash": "
|
|
261
|
+
"hash": "b4083e764fe4896211db",
|
|
262
262
|
"childrenByOrder": {}
|
|
263
263
|
}
|
|
264
264
|
]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var _openmrs_esm_openconceptlab_app;(()=>{"use strict";var e,r,t,n,o,a,i,l,s,p,u,f,c,d,h={3203:(e,r,t)=>{var n={"./start":()=>t.e(862).then((()=>()=>t(4862)))},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})}},m={};function v(e){var r=m[e];if(void 0!==r)return r.exports;var t=m[e]={id:e,loaded:!1,exports:{}};return h[e]
|
|
1
|
+
var _openmrs_esm_openconceptlab_app;(()=>{"use strict";var e,r,t,n,o,a,i,l,s,p,u,f,c,d,h={3203:(e,r,t)=>{var n={"./start":()=>t.e(862).then((()=>()=>t(4862)))},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})}},m={};function v(e){var r=m[e];if(void 0!==r)return r.exports;var t=m[e]={id:e,loaded:!1,exports:{}};return h[e](t,t.exports,v),t.loaded=!0,t.exports}v.m=h,v.c=m,v.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return v.d(r,{a:r}),r},v.d=(e,r)=>{for(var t in r)v.o(r,t)&&!v.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},v.f={},v.e=e=>Promise.all(Object.keys(v.f).reduce(((r,t)=>(v.f[t](e,r),r)),[])),v.u=e=>e+".js",v.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),v.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),e={},r="@openmrs/esm-openconceptlab-app:",v.l=(t,n,o,a)=>{if(e[t])e[t].push(n);else{var i,l;if(void 0!==o)for(var s=document.getElementsByTagName("script"),p=0;p<s.length;p++){var u=s[p];if(u.getAttribute("src")==t||u.getAttribute("data-webpack")==r+o){i=u;break}}i||(l=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,v.nc&&i.setAttribute("nonce",v.nc),i.setAttribute("data-webpack",r+o),i.src=t),e[t]=[n];var f=(r,n)=>{i.onerror=i.onload=null,clearTimeout(c);var o=e[t];if(delete e[t],i.parentNode&&i.parentNode.removeChild(i),o&&o.forEach((e=>e(n))),r)return r(n)},c=setTimeout(f.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=f.bind(null,i.onerror),i.onload=f.bind(null,i.onload),l&&document.head.appendChild(i)}},v.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},v.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{v.S={};var e={},r={};v.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];v.o(v.S,t)||(v.S[t]={});var a=v.S[t],i="@openmrs/esm-openconceptlab-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})},s=[];return"default"===t&&(l("@openmrs/esm-framework","4.0.1-pre.238",(()=>Promise.all([v.e(858),v.e(268)]).then((()=>()=>v(6858))))),l("react-dom","18.2.0",(()=>Promise.all([v.e(316),v.e(268)]).then((()=>()=>v(8316))))),l("react-i18next","11.18.4",(()=>Promise.all([v.e(709),v.e(268)]).then((()=>()=>v(709))))),l("react","18.2.0",(()=>v.e(784).then((()=>()=>v(2784)))))),e[t]=s.length?Promise.all(s).then((()=>e[t]=1)):1}}})(),(()=>{var e;v.g.importScripts&&(e=v.g.location+"");var r=v.g.document;if(!e&&r&&(r.currentScript&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");t.length&&(e=t[t.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),v.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("+s()+")":1===l?"("+s()+" || "+s()+")":2===l?i.pop()+" "+i.pop():o(l))}return s();function s(){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,s=!0;;l++,i++){var p,u,f=l<e.length?(typeof e[l])[0]:"";if(i>=r.length||"o"==(u=(typeof(p=r[i]))[0]))return!s||("u"==f?l>n&&!o:""==f!=o);if("u"==u){if(!s||"u"!=f)return!1}else if(s)if(f==u)if(l<=n){if(p!=e[l])return!1}else{if(o?p>e[l]:p<e[l])return!1;p!=e[l]&&(s=!1)}else if("s"!=f&&"n"!=f){if(o||l<=n)return!1;s=!1,l--}else{if(l<=n||u<f!=o)return!1;s=!1}else"s"!=f&&"n"!=f&&(s=!1,l--)}}var c=[],d=c.pop.bind(c);for(i=1;i<e.length;i++){var h=e[i];c.push(1==h?d()|d():2==h?d()&d():h?a(h,r):!d())}return!!d()},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)+")",s=(e,r,t,n)=>{var o=i(e,t);return a(n,o)||"undefined"!=typeof console&&console.warn&&console.warn(l(e,t,o,n)),p(e[t][o])},p=e=>(e.loaded=1,e.get()),u=(e=>function(r,t,n,o){var a=v.I(r);return a&&a.then?a.then(e.bind(e,r,v.S[r],t,n,o)):e(0,v.S[r],t,n,o)})(((e,r,t,n,o)=>r&&v.o(r,t)?s(r,0,t,n):o())),f={},c={268:()=>u("default","react",[1,18],(()=>v.e(784).then((()=>()=>v(2784))))),906:()=>u("default","@openmrs/esm-framework",[1,4],(()=>Promise.all([v.e(858),v.e(268)]).then((()=>()=>v(6858))))),4924:()=>u("default","react-i18next",[1,11],(()=>v.e(709).then((()=>()=>v(709)))))},d={15:[4924],268:[268],862:[906]},v.f.consumes=(e,r)=>{v.o(d,e)&&d[e].forEach((e=>{if(v.o(f,e))return r.push(f[e]);var t=r=>{f[e]=0,v.m[e]=t=>{delete v.c[e],t.exports=r()}},n=r=>{delete f[e],v.m[e]=t=>{throw delete v.c[e],r}};try{var o=c[e]();o.then?r.push(f[e]=o.then(t).catch(n)):t(o)}catch(e){n(e)}}))},(()=>{var e={174:0};v.f.j=(r,t)=>{var n=v.o(e,r)?e[r]:void 0;if(0!==n)if(n)t.push(n[2]);else if(268!=r){var o=new Promise(((t,o)=>n=e[r]=[t,o]));t.push(n[2]=o);var a=v.p+v.u(r),i=new Error;v.l(a,(t=>{if(v.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)}else e[r]=0};var r=(r,t)=>{var n,o,[a,i,l]=t,s=0;if(a.some((r=>0!==e[r]))){for(n in i)v.o(i,n)&&(v.m[n]=i[n]);l&&l(v)}for(r&&r(t);s<a.length;s++)o=a[s],v.o(e,o)&&e[o]&&e[o][0](),e[o]=0},t=self.webpackChunk_openmrs_esm_openconceptlab_app=self.webpackChunk_openmrs_esm_openconceptlab_app||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})(),v.nc=void 0;var g=v(3203);_openmrs_esm_openconceptlab_app=g})();
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"fileFormatError": "",
|
|
3
|
+
"noSubscriptionError": "",
|
|
4
|
+
"importSuccess": "",
|
|
5
|
+
"importFailed": "",
|
|
6
|
+
"noFileSelected": "",
|
|
7
|
+
"subscriptionError": "",
|
|
8
|
+
"importConcepts": "",
|
|
9
|
+
"importInstructions": "",
|
|
10
|
+
"importFromSubscription": "",
|
|
11
|
+
"importFromFileHeading": "",
|
|
12
|
+
"importFromFileInfo": "",
|
|
13
|
+
"fileAdded": "",
|
|
14
|
+
"importFromFileDragInfo": "",
|
|
15
|
+
"importFromFile": "",
|
|
16
|
+
"moduleTitle": "",
|
|
17
|
+
"subscription": "",
|
|
18
|
+
"import": "",
|
|
19
|
+
"previousImports": "",
|
|
20
|
+
"errorSavingSubscription": "",
|
|
21
|
+
"cancelledChanges": "",
|
|
22
|
+
"subscriptionDeleted": "",
|
|
23
|
+
"errorDeletingSubscription": "",
|
|
24
|
+
"setupSubscription": "",
|
|
25
|
+
"subscriptionUrl": "",
|
|
26
|
+
"apiToken": "",
|
|
27
|
+
"advancedOptions": "",
|
|
28
|
+
"subscribeToSnapshotText": "",
|
|
29
|
+
"disableValidationText": "",
|
|
30
|
+
"cancelButton": "",
|
|
31
|
+
"subscribeButton": "",
|
|
32
|
+
"unsubscribe": "",
|
|
33
|
+
"unsubscribeInfo": "",
|
|
34
|
+
"unsubscribeButton": ""
|
|
35
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"fileFormatError": "",
|
|
3
|
+
"noSubscriptionError": "",
|
|
4
|
+
"importSuccess": "",
|
|
5
|
+
"importFailed": "",
|
|
6
|
+
"noFileSelected": "",
|
|
7
|
+
"subscriptionError": "",
|
|
8
|
+
"importConcepts": "",
|
|
9
|
+
"importInstructions": "",
|
|
10
|
+
"importFromSubscription": "",
|
|
11
|
+
"importFromFileHeading": "",
|
|
12
|
+
"importFromFileInfo": "",
|
|
13
|
+
"fileAdded": "",
|
|
14
|
+
"importFromFileDragInfo": "",
|
|
15
|
+
"importFromFile": "",
|
|
16
|
+
"moduleTitle": "",
|
|
17
|
+
"subscription": "",
|
|
18
|
+
"import": "",
|
|
19
|
+
"previousImports": "",
|
|
20
|
+
"errorSavingSubscription": "",
|
|
21
|
+
"cancelledChanges": "",
|
|
22
|
+
"subscriptionDeleted": "",
|
|
23
|
+
"errorDeletingSubscription": "",
|
|
24
|
+
"setupSubscription": "",
|
|
25
|
+
"subscriptionUrl": "",
|
|
26
|
+
"apiToken": "",
|
|
27
|
+
"advancedOptions": "",
|
|
28
|
+
"subscribeToSnapshotText": "",
|
|
29
|
+
"disableValidationText": "",
|
|
30
|
+
"cancelButton": "",
|
|
31
|
+
"subscribeButton": "",
|
|
32
|
+
"unsubscribe": "",
|
|
33
|
+
"unsubscribeInfo": "",
|
|
34
|
+
"unsubscribeButton": ""
|
|
35
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openmrs/esm-openconceptlab-app",
|
|
3
|
-
"version": "3.0.1-pre.
|
|
3
|
+
"version": "3.0.1-pre.5",
|
|
4
4
|
"license": "MPL-2.0",
|
|
5
5
|
"description": "An app to manage the openconceptlab module",
|
|
6
6
|
"browser": "dist/openmrs-esm-openconceptlab-app.js",
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
"react-router-dom": "6.x",
|
|
50
50
|
"rxjs": "6.x"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "bcf813b362b036641c0e35f554707944c8e7788e"
|
|
53
53
|
}
|
|
@@ -34,7 +34,7 @@ const Import: React.FC = () => {
|
|
|
34
34
|
if (fileToUpload.type !== 'application/zip') {
|
|
35
35
|
showNotification({
|
|
36
36
|
kind: 'error',
|
|
37
|
-
description: t('fileFormatError'
|
|
37
|
+
description: t('fileFormatError'),
|
|
38
38
|
});
|
|
39
39
|
} else {
|
|
40
40
|
setFile(fileToUpload);
|
|
@@ -55,7 +55,7 @@ const Import: React.FC = () => {
|
|
|
55
55
|
if (!isSubscriptionAvailable) {
|
|
56
56
|
showNotification({
|
|
57
57
|
kind: 'error',
|
|
58
|
-
description: t('noSubscriptionError'
|
|
58
|
+
description: t('noSubscriptionError'),
|
|
59
59
|
});
|
|
60
60
|
return;
|
|
61
61
|
}
|
|
@@ -66,12 +66,12 @@ const Import: React.FC = () => {
|
|
|
66
66
|
if (response.status === 201) {
|
|
67
67
|
showNotification({
|
|
68
68
|
kind: 'success',
|
|
69
|
-
description: t('importSuccess'
|
|
69
|
+
description: t('importSuccess'),
|
|
70
70
|
});
|
|
71
71
|
} else {
|
|
72
72
|
showNotification({
|
|
73
73
|
kind: 'error',
|
|
74
|
-
description: t('importFailed'
|
|
74
|
+
description: t('importFailed'),
|
|
75
75
|
});
|
|
76
76
|
}
|
|
77
77
|
},
|
|
@@ -86,7 +86,7 @@ const Import: React.FC = () => {
|
|
|
86
86
|
if (!file) {
|
|
87
87
|
showNotification({
|
|
88
88
|
kind: 'error',
|
|
89
|
-
description: t('noFileSelected'
|
|
89
|
+
description: t('noFileSelected'),
|
|
90
90
|
});
|
|
91
91
|
return;
|
|
92
92
|
}
|
|
@@ -98,12 +98,12 @@ const Import: React.FC = () => {
|
|
|
98
98
|
setFile(null);
|
|
99
99
|
showNotification({
|
|
100
100
|
kind: 'success',
|
|
101
|
-
description: t('importSuccess'
|
|
101
|
+
description: t('importSuccess'),
|
|
102
102
|
});
|
|
103
103
|
} else {
|
|
104
104
|
showNotification({
|
|
105
105
|
kind: 'error',
|
|
106
|
-
description: t('importFailed'
|
|
106
|
+
description: t('importFailed'),
|
|
107
107
|
});
|
|
108
108
|
}
|
|
109
109
|
},
|
|
@@ -134,7 +134,7 @@ const Import: React.FC = () => {
|
|
|
134
134
|
if (isError) {
|
|
135
135
|
showNotification({
|
|
136
136
|
kind: 'error',
|
|
137
|
-
description: t('subscriptionError'
|
|
137
|
+
description: t('subscriptionError'),
|
|
138
138
|
});
|
|
139
139
|
}
|
|
140
140
|
|
|
@@ -142,30 +142,23 @@ const Import: React.FC = () => {
|
|
|
142
142
|
<Grid className={styles.grid}>
|
|
143
143
|
<Column sm={4} md={8} lg={10}>
|
|
144
144
|
<Form onSubmit={handleImportWithSubscription}>
|
|
145
|
-
<h3 className={styles.productiveHeading03}>{t('importConcepts'
|
|
146
|
-
<p className={styles.formText}>
|
|
147
|
-
{t(
|
|
148
|
-
'importInstructions',
|
|
149
|
-
'Avoid importing during data entry hours, because the operation may significantly slow down the system. You can either use the subscription or a zip file to import concepts.',
|
|
150
|
-
)}
|
|
151
|
-
</p>
|
|
145
|
+
<h3 className={styles.productiveHeading03}>{t('importConcepts')}</h3>
|
|
146
|
+
<p className={styles.formText}>{t('importInstructions')}</p>
|
|
152
147
|
<Button kind="primary" type="submit" disabled={!isSubscriptionAvailable}>
|
|
153
|
-
{t('importFromSubscription'
|
|
148
|
+
{t('importFromSubscription')}
|
|
154
149
|
</Button>
|
|
155
150
|
</Form>
|
|
156
151
|
|
|
157
152
|
<Form className={styles.form} onSubmit={handleImportWithFile}>
|
|
158
|
-
<h3 className={styles.productiveHeading03}>{t('importFromFileHeading'
|
|
159
|
-
<p className={styles.formText}>
|
|
160
|
-
{t('importFromFileInfo', 'You can import data without setting up a subscription by using this option.')}
|
|
161
|
-
</p>
|
|
153
|
+
<h3 className={styles.productiveHeading03}>{t('importFromFileHeading')}</h3>
|
|
154
|
+
<p className={styles.formText}>{t('importFromFileInfo')}</p>
|
|
162
155
|
{file ? (
|
|
163
156
|
<FileUploaderItem
|
|
164
157
|
key={file.name}
|
|
165
158
|
name={file.name}
|
|
166
159
|
size="default"
|
|
167
160
|
status="edit"
|
|
168
|
-
iconDescription={t('fileAdded'
|
|
161
|
+
iconDescription={t('fileAdded')}
|
|
169
162
|
onDelete={handleFileUploaderItemClick}
|
|
170
163
|
style={{ backgroundColor: '#e0e0e0' }}
|
|
171
164
|
/>
|
|
@@ -173,13 +166,13 @@ const Import: React.FC = () => {
|
|
|
173
166
|
<FileUploaderDropContainer
|
|
174
167
|
accept={['application/zip']}
|
|
175
168
|
multiple
|
|
176
|
-
labelText={t('importFromFileDragInfo'
|
|
169
|
+
labelText={t('importFromFileDragInfo')}
|
|
177
170
|
onAddFiles={onAddFiles}
|
|
178
171
|
style={{ marginBottom: '1.5rem' }}
|
|
179
172
|
/>
|
|
180
173
|
)}
|
|
181
174
|
<Button kind="primary" type="submit">
|
|
182
|
-
{t('importFromFile'
|
|
175
|
+
{t('importFromFile')}
|
|
183
176
|
</Button>
|
|
184
177
|
</Form>
|
|
185
178
|
</Column>
|
|
@@ -44,12 +44,14 @@ describe(`Import component`, () => {
|
|
|
44
44
|
renderImportComponent();
|
|
45
45
|
await waitForLoadingToFinish();
|
|
46
46
|
|
|
47
|
-
expect(screen.getByText('
|
|
48
|
-
expect(screen.getByText('
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
expect(screen.getByText('
|
|
52
|
-
expect(screen.
|
|
47
|
+
expect(screen.getByText('importConcepts')).toBeVisible();
|
|
48
|
+
expect(screen.getByText('importInstructions')).toBeVisible();
|
|
49
|
+
expect(screen.getByText('importFromSubscription')).toBeVisible();
|
|
50
|
+
|
|
51
|
+
expect(screen.getByText('importFromFileHeading')).toBeVisible();
|
|
52
|
+
expect(screen.getByText('importFromFileInfo')).toBeVisible();
|
|
53
|
+
expect(screen.getByText('importFromFile')).toBeEnabled();
|
|
54
|
+
expect(screen.queryByText('fileAdded')).not.toBeInTheDocument();
|
|
53
55
|
});
|
|
54
56
|
|
|
55
57
|
it(`renders correctly when there is no subscription`, async () => {
|
|
@@ -57,8 +59,8 @@ describe(`Import component`, () => {
|
|
|
57
59
|
renderImportComponent();
|
|
58
60
|
await waitForLoadingToFinish();
|
|
59
61
|
|
|
60
|
-
expect(screen.getByText('
|
|
61
|
-
expect(screen.getByText('
|
|
62
|
+
expect(screen.getByText('importFromSubscription')).toBeDisabled();
|
|
63
|
+
expect(screen.getByText('importFromFile')).toBeEnabled();
|
|
62
64
|
});
|
|
63
65
|
|
|
64
66
|
it(`renders correctly when when a subscription exists`, async () => {
|
|
@@ -66,8 +68,8 @@ describe(`Import component`, () => {
|
|
|
66
68
|
renderImportComponent();
|
|
67
69
|
await waitForLoadingToFinish();
|
|
68
70
|
|
|
69
|
-
|
|
70
|
-
expect(screen.getByText('
|
|
71
|
+
expect(screen.getByText('importFromSubscription')).toBeEnabled();
|
|
72
|
+
expect(screen.getByText('importFromFile')).toBeEnabled();
|
|
71
73
|
});
|
|
72
74
|
|
|
73
75
|
it(`allows starting an import using the subscription`, async () => {
|
|
@@ -77,14 +79,14 @@ describe(`Import component`, () => {
|
|
|
77
79
|
|
|
78
80
|
mockStartImportWithSubscription.mockReturnValueOnce({ status: 201 });
|
|
79
81
|
|
|
80
|
-
await waitFor(() => userEvent.click(screen.getByText('
|
|
82
|
+
await waitFor(() => userEvent.click(screen.getByText('importFromSubscription')));
|
|
81
83
|
|
|
82
84
|
expect(mockStartImportWithSubscription).toHaveBeenCalledWith(new AbortController());
|
|
83
85
|
expect(mockStartImportWithSubscription).toHaveBeenCalledTimes(1);
|
|
84
86
|
|
|
85
87
|
expect(mockShowNotification).toHaveBeenCalledWith(
|
|
86
88
|
expect.objectContaining({
|
|
87
|
-
description: '
|
|
89
|
+
description: 'importSuccess',
|
|
88
90
|
kind: 'success',
|
|
89
91
|
}),
|
|
90
92
|
);
|
|
@@ -98,6 +100,6 @@ function renderImportComponent() {
|
|
|
98
100
|
|
|
99
101
|
function waitForLoadingToFinish() {
|
|
100
102
|
return waitFor(() => {
|
|
101
|
-
expect(screen.getByText('
|
|
103
|
+
expect(screen.getByText('importConcepts')).toBeVisible, { timeout: 2000 };
|
|
102
104
|
});
|
|
103
105
|
}
|
package/src/root.component.tsx
CHANGED
|
@@ -5,19 +5,18 @@ import { SWRConfig } from 'swr';
|
|
|
5
5
|
import Subscription from './subscription/subscription.component';
|
|
6
6
|
import styles from './root.component.scss';
|
|
7
7
|
import Import from './import/import.component';
|
|
8
|
-
import PreviousImports from './previous-imports/previous-imports.component';
|
|
9
8
|
|
|
10
9
|
const Root: React.FC = () => {
|
|
11
10
|
const { t } = useTranslation();
|
|
12
11
|
return (
|
|
13
12
|
<SWRConfig>
|
|
14
13
|
<main className={`omrs-main-content ${styles.main}`}>
|
|
15
|
-
<h3 className={styles.moduleHeader}>{t('moduleTitle'
|
|
14
|
+
<h3 className={styles.moduleHeader}>{t('moduleTitle')}</h3>
|
|
16
15
|
<Tabs>
|
|
17
16
|
<TabList className={styles.tabList} contained={true}>
|
|
18
|
-
<Tab>{t('subscription'
|
|
19
|
-
<Tab>{t('import'
|
|
20
|
-
<Tab>{t('previousImports'
|
|
17
|
+
<Tab>{t('subscription')} </Tab>
|
|
18
|
+
<Tab>{t('import')} </Tab>
|
|
19
|
+
<Tab>{t('previousImports')} </Tab>
|
|
21
20
|
</TabList>
|
|
22
21
|
<TabPanels>
|
|
23
22
|
<TabPanel className={styles.tabPanel}>
|
|
@@ -26,9 +25,7 @@ const Root: React.FC = () => {
|
|
|
26
25
|
<TabPanel className={styles.tabPanel}>
|
|
27
26
|
<Import />
|
|
28
27
|
</TabPanel>
|
|
29
|
-
<TabPanel className={styles.tabPanel}
|
|
30
|
-
<PreviousImports />
|
|
31
|
-
</TabPanel>
|
|
28
|
+
<TabPanel className={styles.tabPanel} />
|
|
32
29
|
</TabPanels>
|
|
33
30
|
</Tabs>
|
|
34
31
|
</main>
|
package/src/root.test.tsx
CHANGED
|
@@ -10,10 +10,10 @@ describe(`Root component`, () => {
|
|
|
10
10
|
|
|
11
11
|
it(`renders the title and tab containers`, () => {
|
|
12
12
|
renderOclSubscriptionModule();
|
|
13
|
-
expect(screen.getByText('
|
|
14
|
-
expect(screen.getByRole('tab', { name: '
|
|
15
|
-
expect(screen.getByRole('tab', { name: '
|
|
16
|
-
expect(screen.getByRole('tab', { name: '
|
|
13
|
+
expect(screen.getByText('moduleTitle')).toBeInTheDocument();
|
|
14
|
+
expect(screen.getByRole('tab', { name: 'subscription' })).toBeInTheDocument();
|
|
15
|
+
expect(screen.getByRole('tab', { name: 'import' })).toBeInTheDocument();
|
|
16
|
+
expect(screen.getByRole('tab', { name: 'previousImports' })).toBeInTheDocument();
|
|
17
17
|
});
|
|
18
18
|
});
|
|
19
19
|
|
|
@@ -76,14 +76,11 @@ const Subscription: React.FC = () => {
|
|
|
76
76
|
if (response.ok) {
|
|
77
77
|
showNotification({
|
|
78
78
|
kind: 'success',
|
|
79
|
-
description: t(
|
|
80
|
-
response.status === 201 ? 'subscriptionCreated' : 'subscriptionUpdated',
|
|
81
|
-
response.status === 201 ? 'Subscription created successfully' : 'Subscription updated successfully',
|
|
82
|
-
),
|
|
79
|
+
description: t(response.status === 201 ? 'subscriptionCreated' : 'subscriptionUpdated'),
|
|
83
80
|
});
|
|
84
81
|
} else {
|
|
85
82
|
showNotification({
|
|
86
|
-
title: t('errorSavingSubscription'
|
|
83
|
+
title: t('errorSavingSubscription'),
|
|
87
84
|
kind: 'error',
|
|
88
85
|
critical: true,
|
|
89
86
|
description: JSON.stringify(response.data),
|
|
@@ -103,7 +100,7 @@ const Subscription: React.FC = () => {
|
|
|
103
100
|
|
|
104
101
|
showNotification({
|
|
105
102
|
kind: 'info',
|
|
106
|
-
description: t('cancelledChanges'
|
|
103
|
+
description: t('cancelledChanges'),
|
|
107
104
|
});
|
|
108
105
|
}, [subscription, t]);
|
|
109
106
|
|
|
@@ -123,11 +120,11 @@ const Subscription: React.FC = () => {
|
|
|
123
120
|
setValidationType('FULL');
|
|
124
121
|
showNotification({
|
|
125
122
|
kind: 'success',
|
|
126
|
-
description: t('subscriptionDeleted'
|
|
123
|
+
description: t('subscriptionDeleted'),
|
|
127
124
|
});
|
|
128
125
|
} else {
|
|
129
126
|
showNotification({
|
|
130
|
-
title: t('errorDeletingSubscription'
|
|
127
|
+
title: t('errorDeletingSubscription'),
|
|
131
128
|
kind: 'error',
|
|
132
129
|
critical: true,
|
|
133
130
|
description: JSON.stringify(response.data),
|
|
@@ -169,7 +166,7 @@ const Subscription: React.FC = () => {
|
|
|
169
166
|
if (isError) {
|
|
170
167
|
showNotification({
|
|
171
168
|
kind: 'error',
|
|
172
|
-
description: t('subscriptionError'
|
|
169
|
+
description: t('subscriptionError'),
|
|
173
170
|
});
|
|
174
171
|
}
|
|
175
172
|
|
|
@@ -177,12 +174,12 @@ const Subscription: React.FC = () => {
|
|
|
177
174
|
<Grid className={styles.grid}>
|
|
178
175
|
<Column sm={4} md={8} lg={10}>
|
|
179
176
|
<Form onSubmit={handleSubmit}>
|
|
180
|
-
<h3 className={styles.productiveHeading03}>{t('setupSubscription'
|
|
177
|
+
<h3 className={styles.productiveHeading03}>{t('setupSubscription')}</h3>
|
|
181
178
|
<Stack gap={5}>
|
|
182
179
|
<TextInput
|
|
183
180
|
id="subscriptionUrl"
|
|
184
181
|
type="url"
|
|
185
|
-
labelText={t('subscriptionUrl'
|
|
182
|
+
labelText={t('subscriptionUrl')}
|
|
186
183
|
placeholder="https://api.openconceptlab.org/orgs/organization-name/collections/dictionary-name"
|
|
187
184
|
value={subscriptionUrl}
|
|
188
185
|
onChange={handleChangeSubscriptionUrl}
|
|
@@ -193,47 +190,39 @@ const Subscription: React.FC = () => {
|
|
|
193
190
|
id="apiToken"
|
|
194
191
|
type="password"
|
|
195
192
|
placeholder="••••••••••••••••••••••••••••••••••••••••••••••••"
|
|
196
|
-
labelText={t('apiToken'
|
|
193
|
+
labelText={t('apiToken')}
|
|
197
194
|
value={token}
|
|
198
195
|
onChange={handleChangeToken}
|
|
199
196
|
light={true}
|
|
200
197
|
required
|
|
201
198
|
/>
|
|
202
|
-
<FormGroup legendText={t('advancedOptions'
|
|
199
|
+
<FormGroup legendText={t('advancedOptions')} className={styles.formGroup}>
|
|
203
200
|
<Checkbox
|
|
204
201
|
checked={isSubscribedToSnapshot}
|
|
205
202
|
onChange={handleChangeSubscriptionType}
|
|
206
|
-
labelText={t('subscribeToSnapshotText'
|
|
203
|
+
labelText={t('subscribeToSnapshotText')}
|
|
207
204
|
id="isSubscribedToSnapshot"
|
|
208
205
|
/>
|
|
209
206
|
<Checkbox
|
|
210
207
|
checked={validationType === 'NONE'}
|
|
211
208
|
onChange={handleChangeValidationType}
|
|
212
|
-
labelText={t(
|
|
213
|
-
'disableValidationText',
|
|
214
|
-
'Disable validation (should be used with care for well curated collections or sources)',
|
|
215
|
-
)}
|
|
209
|
+
labelText={t('disableValidationText')}
|
|
216
210
|
id="isValidationDisabled"
|
|
217
211
|
/>
|
|
218
212
|
</FormGroup>
|
|
219
213
|
</Stack>
|
|
220
214
|
<Button kind="secondary" onClick={handleCancel}>
|
|
221
|
-
{t('cancelButton'
|
|
215
|
+
{t('cancelButton')}
|
|
222
216
|
</Button>
|
|
223
217
|
<Button kind="primary" type="submit">
|
|
224
|
-
{t('subscribeButton'
|
|
218
|
+
{t('subscribeButton')}
|
|
225
219
|
</Button>
|
|
226
220
|
</Form>
|
|
227
221
|
<Form onSubmit={handleUnsubscribe} className={styles.unsubscribeForm}>
|
|
228
|
-
<h3 className={styles.productiveHeading03}>{t('unsubscribe'
|
|
229
|
-
<p className={styles.unsubscribeText}>
|
|
230
|
-
{t(
|
|
231
|
-
'unsubscribeInfo',
|
|
232
|
-
'If you unsubscribe, no concepts will be deleted nor changed. All information about subscription will be deleted from your system.',
|
|
233
|
-
)}
|
|
234
|
-
</p>
|
|
222
|
+
<h3 className={styles.productiveHeading03}>{t('unsubscribe')}</h3>
|
|
223
|
+
<p className={styles.unsubscribeText}>{t('unsubscribeInfo')}</p>
|
|
235
224
|
<Button kind="danger" type="submit" disabled={!subscription}>
|
|
236
|
-
{t('unsubscribeButton'
|
|
225
|
+
{t('unsubscribeButton')}
|
|
237
226
|
</Button>
|
|
238
227
|
</Form>
|
|
239
228
|
</Column>
|