@opencloning/ui 1.4.6 → 1.4.7

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,19 @@
1
1
  # @opencloning/ui
2
2
 
3
+ ## 1.4.7
4
+
5
+ ### Patch Changes
6
+
7
+ - [#631](https://github.com/manulera/OpenCloning_frontend/pull/631) [`40dd956`](https://github.com/manulera/OpenCloning_frontend/commit/40dd956d0f6c729ad0690578bf232610a063523f) Thanks [@manulera](https://github.com/manulera)! - Add links to assembler documentation and to create your own syntax in the builder
8
+
9
+ - [#631](https://github.com/manulera/OpenCloning_frontend/pull/631) [`40dd956`](https://github.com/manulera/OpenCloning_frontend/commit/40dd956d0f6c729ad0690578bf232610a063523f) Thanks [@manulera](https://github.com/manulera)! - Add link to documentation for the Assembler, and add deprecation notice for MoClo templates
10
+
11
+ - [#631](https://github.com/manulera/OpenCloning_frontend/pull/631) [`40dd956`](https://github.com/manulera/OpenCloning_frontend/commit/40dd956d0f6c729ad0690578bf232610a063523f) Thanks [@manulera](https://github.com/manulera)! - improve alignment of sequences in the AssemblerPart by improving css
12
+
13
+ - Updated dependencies []:
14
+ - @opencloning/store@1.4.7
15
+ - @opencloning/utils@1.4.7
16
+
3
17
  ## 1.4.6
4
18
 
5
19
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opencloning/ui",
3
- "version": "1.4.6",
3
+ "version": "1.4.7",
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.6",
29
- "@opencloning/utils": "1.4.6",
28
+ "@opencloning/store": "1.4.7",
29
+ "@opencloning/utils": "1.4.7",
30
30
  "@teselagen/bio-parsers": "^0.4.34",
31
31
  "@teselagen/ove": "^0.8.34",
32
32
  "@teselagen/range-utils": "^0.3.20",
@@ -283,7 +283,12 @@ function LoadSyntaxButton({ setSyntax, addPlasmids, clearPlasmids }) {
283
283
  }, [setSyntax, addPlasmids, clearPlasmids, httpClient, backendRoute, addAlert])
284
284
  return <>
285
285
  <Button color="success" onClick={() => setExistingSyntaxDialogOpen(true)}>Load Syntax</Button>
286
- {existingSyntaxDialogOpen && <ExistingSyntaxDialog staticContentPath={staticContentPath} onClose={() => setExistingSyntaxDialogOpen(false)} onSyntaxSelect={onSyntaxSelect}/>}
286
+ {existingSyntaxDialogOpen && <ExistingSyntaxDialog
287
+ staticContentPath={staticContentPath}
288
+ onClose={() => setExistingSyntaxDialogOpen(false)}
289
+ onSyntaxSelect={onSyntaxSelect}
290
+ displayCreateYourOwnMessage={true}
291
+ />}
287
292
  </>
288
293
  }
289
294
 
@@ -317,7 +322,7 @@ function Assembler() {
317
322
  return (
318
323
  <>
319
324
  <Alert severity="warning" sx={{ maxWidth: '400px', margin: 'auto', fontSize: '.9rem', mb: 2 }}>
320
- The Assembler is experimental. Use with caution.
325
+ The Assembler is experimental. Use with caution. Visit <a href="https://docs.opencloning.org/assembler" target="_blank">the documentation</a> for more information.
321
326
  </Alert>
322
327
  <ButtonGroup>
323
328
  <LoadSyntaxButton setSyntax={setSyntax} addPlasmids={addPlasmids} clearPlasmids={clearPlasmids} />
@@ -5,6 +5,7 @@ import RequestStatusWrapper from '../form/RequestStatusWrapper';
5
5
  import ServerStaticFileSelect from '../form/ServerStaticFileSelect';
6
6
  import { readSubmittedTextFile } from '@opencloning/utils/readNwrite';
7
7
  import { ExpandMore as ExpandMoreIcon } from '@mui/icons-material';
8
+ import { IconButton } from '@mui/material';
8
9
 
9
10
  const httpClient = getHttpClient();
10
11
  const baseURL = 'https://assets.opencloning.org/syntaxes/syntaxes/';
@@ -70,7 +71,7 @@ function SyntaxListItem({ syntax, onSyntaxClick }) {
70
71
  )
71
72
  }
72
73
 
73
- function ExistingSyntaxDialog({ staticContentPath, onClose, onSyntaxSelect }) {
74
+ function ExistingSyntaxDialog({ staticContentPath, onClose, onSyntaxSelect, displayCreateYourOwnMessage = false }) {
74
75
  const [syntaxes, setSyntaxes] = React.useState([]);
75
76
  const [connectAttempt, setConnectAttempt] = React.useState(0);
76
77
  const [requestStatus, setRequestStatus] = React.useState({ status: 'loading' });
@@ -138,6 +139,10 @@ function ExistingSyntaxDialog({ staticContentPath, onClose, onSyntaxSelect }) {
138
139
  {syntaxes.map((syntax) => (
139
140
  <SyntaxListItem key={syntax.path} syntax={syntax} onSyntaxClick={onSyntaxClick} />
140
141
  ))}
142
+ {displayCreateYourOwnMessage && <ListItem>
143
+ <ListItemText primary="🔎 Can't find your favourite syntax?" secondary="Add it yourself! It's very easy!" />
144
+ <Button type="a" color="success" href="https://syntax.opencloning.org" target="_blank">Create a syntax</Button>
145
+ </ListItem>}
141
146
  </List>
142
147
  </RequestStatusWrapper>
143
148
  <Box sx={{ mb: 2 }}>
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { Button, Dialog, DialogTitle, DialogContent, DialogActions, Alert, Box } from '@mui/material';
2
+ import { Button, Dialog, DialogTitle, DialogContent, DialogActions, Alert, Box, ButtonGroup } from '@mui/material';
3
3
  import { useConfig } from '../../providers';
4
4
  import ServerStaticFileSelect from '../form/ServerStaticFileSelect';
5
5
  import { usePlasmidsLogic } from './usePlasmidsLogic';
@@ -95,9 +95,9 @@ function UploadPlasmidsButton({ addPlasmids, syntax }) {
95
95
  },
96
96
  }}
97
97
  >
98
- <DialogActions sx={{ justifyContent: 'center', position: 'sticky', top: 0, zIndex: 99, background: '#fff' }}>
99
- <Button disabled={validPlasmids.length === 0} variant="contained" color="success" onClick={handleImportValidPlasmids}>Import valid plasmids</Button>
100
- <Button variant="contained" color="error" onClick={() => setLinkedPlasmids([])}>Cancel</Button>
98
+ <DialogActions sx={{ justifyContent: 'center', position: 'sticky', top: 0, zIndex: 99, background: '#fff', py: 2 }}>
99
+ <Button sx={{ p: 1.5, fontSize: '1rem' }} disabled={validPlasmids.length === 0} variant="contained" color="success" onClick={handleImportValidPlasmids}>Import valid plasmids</Button>
100
+ <Button sx={{ p: 1.5, fontSize: '1rem' }} variant="contained" color="error" onClick={() => setLinkedPlasmids([])}>Cancel</Button>
101
101
  </DialogActions>
102
102
  {invalidPlasmids.length > 0 && (
103
103
  <Box data-testid="invalid-plasmids-box">
@@ -14,10 +14,6 @@
14
14
  min-height: 1em;
15
15
  }
16
16
 
17
- .overhang div {
18
- padding-left: calc(2px + var(--border-width));
19
- padding-right: 2px;
20
- }
21
17
 
22
18
  .container {
23
19
  display: flex;
@@ -57,19 +53,19 @@
57
53
  .overhang .watson {
58
54
  border-left: var(--border-width) var(--border-style) var(--border-color);
59
55
  border-bottom: var(--border-width) var(--border-style) var(--border-color);
60
- padding-left: 2px;
61
56
  }
62
57
 
63
58
  .overhang .crick {
64
59
  border-right: var(--border-width) var(--border-style) var(--border-color);
65
60
  }
66
61
 
67
- .insideLeft {
68
- margin-left: .2em;
62
+ .inside .watson {
63
+ padding-bottom: var(--border-width);
69
64
  }
70
65
 
71
- .insideRight {
72
- margin-right: .2em;
66
+ .overhang {
67
+ padding-left: var(--border-width);
68
+ padding-right: var(--border-width);
73
69
  }
74
70
 
75
71
  .overhang.left .watson {
@@ -79,3 +75,12 @@
79
75
  .overhang.right .crick {
80
76
  font-weight: bold;
81
77
  }
78
+
79
+ .overhang .top {
80
+ padding-left: var(--border-width);
81
+ padding-right: var(--border-width);
82
+ }
83
+
84
+ .overhang .crick {
85
+ padding-left: var(--border-width);
86
+ }
@@ -27,6 +27,8 @@ function SelectTemplateDialog({ onClose, open }) {
27
27
  return (
28
28
  <Dialog open={open} onClose={() => onClose('')} className="load-template-dialog">
29
29
  <DialogTitle>Load a template</DialogTitle>
30
+ <Alert severity="warning" sx={{ maxWidth: '400px', margin: 'auto', fontSize: '.9rem', mb: 2 }}>
31
+ MoClo templates will soon be replaced by the new Assembler. Go to the Assembler tab to learn more.</Alert>
30
32
  {!templates
31
33
  && (
32
34
  <DialogContent>
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.6";
2
+ export const version = "1.4.7";