@opencloning/ui 1.4.2 → 1.4.3
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @opencloning/ui
|
|
2
2
|
|
|
3
|
+
## 1.4.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#622](https://github.com/manulera/OpenCloning_frontend/pull/622) [`03cec1c`](https://github.com/manulera/OpenCloning_frontend/commit/03cec1c53e6e8365bb8bf9617ed3128b65ab18cc) Thanks [@manulera](https://github.com/manulera)! - Fix loading external assemblies in syntax builder by extracting config out of ExistingSyntaxDialog component
|
|
8
|
+
|
|
9
|
+
- Updated dependencies []:
|
|
10
|
+
- @opencloning/store@1.4.3
|
|
11
|
+
- @opencloning/utils@1.4.3
|
|
12
|
+
|
|
3
13
|
## 1.4.2
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opencloning/ui",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./src/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"@emotion/styled": "^11.14.0",
|
|
26
26
|
"@mui/icons-material": "^5.15.17",
|
|
27
27
|
"@mui/material": "^5.15.17",
|
|
28
|
-
"@opencloning/store": "1.4.
|
|
29
|
-
"@opencloning/utils": "1.4.
|
|
28
|
+
"@opencloning/store": "1.4.3",
|
|
29
|
+
"@opencloning/utils": "1.4.3",
|
|
30
30
|
"@teselagen/bio-parsers": "^0.4.34",
|
|
31
31
|
"@teselagen/ove": "^0.8.34",
|
|
32
32
|
"@teselagen/range-utils": "^0.3.20",
|
|
@@ -17,6 +17,7 @@ import useBackendRoute from '../../hooks/useBackendRoute';
|
|
|
17
17
|
import useHttpClient from '../../hooks/useHttpClient';
|
|
18
18
|
import useAlerts from '../../hooks/useAlerts';
|
|
19
19
|
import UploadPlasmidsButton from './UploadPlasmidsButton';
|
|
20
|
+
import { useConfig } from '../../providers';
|
|
20
21
|
|
|
21
22
|
|
|
22
23
|
const { setState: setCloningState, setCurrentTab: setCurrentTabAction } = cloningActions;
|
|
@@ -240,6 +241,7 @@ function categoriesFromSyntaxAndPlasmids(syntax, plasmids) {
|
|
|
240
241
|
function LoadSyntaxButton({ setSyntax, addPlasmids }) {
|
|
241
242
|
const [existingSyntaxDialogOpen, setExistingSyntaxDialogOpen] = React.useState(false)
|
|
242
243
|
const httpClient = useHttpClient();
|
|
244
|
+
const { staticContentPath } = useConfig();
|
|
243
245
|
const backendRoute = useBackendRoute();
|
|
244
246
|
const { addAlert } = useAlerts();
|
|
245
247
|
const onSyntaxSelect = React.useCallback(async (syntax, plasmids) => {
|
|
@@ -257,7 +259,7 @@ function LoadSyntaxButton({ setSyntax, addPlasmids }) {
|
|
|
257
259
|
}, [setSyntax, addPlasmids, httpClient, backendRoute, addAlert])
|
|
258
260
|
return <>
|
|
259
261
|
<Button color="success" onClick={() => setExistingSyntaxDialogOpen(true)}>Load Syntax</Button>
|
|
260
|
-
{existingSyntaxDialogOpen && <ExistingSyntaxDialog onClose={() => setExistingSyntaxDialogOpen(false)} onSyntaxSelect={onSyntaxSelect}/>}
|
|
262
|
+
{existingSyntaxDialogOpen && <ExistingSyntaxDialog staticContentPath={staticContentPath} onClose={() => setExistingSyntaxDialogOpen(false)} onSyntaxSelect={onSyntaxSelect}/>}
|
|
261
263
|
</>
|
|
262
264
|
}
|
|
263
265
|
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ConfigProvider } from '@opencloning/ui/providers/ConfigProvider';
|
|
3
2
|
import ExistingSyntaxDialog from './ExistingSyntaxDialog';
|
|
4
3
|
|
|
5
4
|
// Test config
|
|
@@ -50,12 +49,10 @@ describe('<ExistingSyntaxDialog />', () => {
|
|
|
50
49
|
const onSyntaxSelectSpy = cy.spy().as('onSyntaxSelectSpy');
|
|
51
50
|
|
|
52
51
|
cy.mount(
|
|
53
|
-
<
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
/>
|
|
58
|
-
</ConfigProvider>,
|
|
52
|
+
<ExistingSyntaxDialog
|
|
53
|
+
onClose={onCloseSpy}
|
|
54
|
+
onSyntaxSelect={onSyntaxSelectSpy}
|
|
55
|
+
/>,
|
|
59
56
|
);
|
|
60
57
|
|
|
61
58
|
cy.wait('@getSyntaxes');
|
|
@@ -82,12 +79,10 @@ describe('<ExistingSyntaxDialog />', () => {
|
|
|
82
79
|
}).as('getPlasmidsData');
|
|
83
80
|
|
|
84
81
|
cy.mount(
|
|
85
|
-
<
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
/>
|
|
90
|
-
</ConfigProvider>,
|
|
82
|
+
<ExistingSyntaxDialog
|
|
83
|
+
onClose={onCloseSpy}
|
|
84
|
+
onSyntaxSelect={onSyntaxSelectSpy}
|
|
85
|
+
/>,
|
|
91
86
|
);
|
|
92
87
|
|
|
93
88
|
cy.wait('@getSyntaxes');
|
|
@@ -111,12 +106,10 @@ describe('<ExistingSyntaxDialog />', () => {
|
|
|
111
106
|
}).as('getSyntaxDataError');
|
|
112
107
|
|
|
113
108
|
cy.mount(
|
|
114
|
-
<
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
/>
|
|
119
|
-
</ConfigProvider>,
|
|
109
|
+
<ExistingSyntaxDialog
|
|
110
|
+
onClose={onCloseSpy}
|
|
111
|
+
onSyntaxSelect={onSyntaxSelectSpy}
|
|
112
|
+
/>,
|
|
120
113
|
);
|
|
121
114
|
|
|
122
115
|
cy.wait('@getSyntaxes');
|
|
@@ -146,12 +139,10 @@ describe('<ExistingSyntaxDialog />', () => {
|
|
|
146
139
|
}).as('getPlasmidsDataError');
|
|
147
140
|
|
|
148
141
|
cy.mount(
|
|
149
|
-
<
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
/>
|
|
154
|
-
</ConfigProvider>,
|
|
142
|
+
<ExistingSyntaxDialog
|
|
143
|
+
onClose={onCloseSpy}
|
|
144
|
+
onSyntaxSelect={onSyntaxSelectSpy}
|
|
145
|
+
/>,
|
|
155
146
|
);
|
|
156
147
|
|
|
157
148
|
cy.wait('@getSyntaxes');
|
|
@@ -187,12 +178,10 @@ describe('<ExistingSyntaxDialog />', () => {
|
|
|
187
178
|
}).as('getPlasmidsData2');
|
|
188
179
|
|
|
189
180
|
cy.mount(
|
|
190
|
-
<
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
/>
|
|
195
|
-
</ConfigProvider>,
|
|
181
|
+
<ExistingSyntaxDialog
|
|
182
|
+
onClose={onCloseSpy}
|
|
183
|
+
onSyntaxSelect={onSyntaxSelectSpy}
|
|
184
|
+
/>,
|
|
196
185
|
);
|
|
197
186
|
|
|
198
187
|
cy.wait('@getSyntaxes');
|
|
@@ -232,12 +221,10 @@ describe('<ExistingSyntaxDialog />', () => {
|
|
|
232
221
|
}
|
|
233
222
|
|
|
234
223
|
cy.mount(
|
|
235
|
-
<
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
/>
|
|
240
|
-
</ConfigProvider>,
|
|
224
|
+
<ExistingSyntaxDialog
|
|
225
|
+
onClose={onCloseSpy}
|
|
226
|
+
onSyntaxSelect={onSyntaxSelectSpy}
|
|
227
|
+
/>,
|
|
241
228
|
);
|
|
242
229
|
|
|
243
230
|
cy.wait('@getSyntaxes');
|
|
@@ -262,12 +249,10 @@ describe('<ExistingSyntaxDialog />', () => {
|
|
|
262
249
|
}
|
|
263
250
|
|
|
264
251
|
cy.mount(
|
|
265
|
-
<
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
/>
|
|
270
|
-
</ConfigProvider>,
|
|
252
|
+
<ExistingSyntaxDialog
|
|
253
|
+
onClose={onCloseSpy}
|
|
254
|
+
onSyntaxSelect={onSyntaxSelectSpy}
|
|
255
|
+
/>,
|
|
271
256
|
);
|
|
272
257
|
|
|
273
258
|
cy.wait('@getSyntaxes');
|
|
@@ -28,13 +28,12 @@ function LocalSyntaxDialog({ onClose, onSyntaxSelect }) {
|
|
|
28
28
|
)
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
function ExistingSyntaxDialog({ onClose, onSyntaxSelect }) {
|
|
31
|
+
function ExistingSyntaxDialog({ staticContentPath, onClose, onSyntaxSelect }) {
|
|
32
32
|
const [syntaxes, setSyntaxes] = React.useState([]);
|
|
33
33
|
const [connectAttempt, setConnectAttempt] = React.useState(0);
|
|
34
34
|
const [requestStatus, setRequestStatus] = React.useState({ status: 'loading' });
|
|
35
35
|
const [loadError, setLoadError] = React.useState(null);
|
|
36
36
|
const fileInputRef = React.useRef(null);
|
|
37
|
-
const { staticContentPath } = useConfig();
|
|
38
37
|
const [localDialogOpen, setLocalDialogOpen] = React.useState(false);
|
|
39
38
|
|
|
40
39
|
React.useEffect(() => {
|
package/src/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Version placeholder - replaced at publish time via prepack script
|
|
2
|
-
export const version = "1.4.
|
|
2
|
+
export const version = "1.4.3";
|