@opencloning/ui 1.4.6 → 1.4.8

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,29 @@
1
1
  # @opencloning/ui
2
2
 
3
+ ## 1.4.8
4
+
5
+ ### Patch Changes
6
+
7
+ - [#637](https://github.com/manulera/OpenCloning_frontend/pull/637) [`600d6e3`](https://github.com/manulera/OpenCloning_frontend/commit/600d6e341feb308fe62d22dc11d6b1e256dd43d4) Thanks [@manulera](https://github.com/manulera)! - Fix kcal > cal in thermodynamics
8
+
9
+ - Updated dependencies []:
10
+ - @opencloning/store@1.4.8
11
+ - @opencloning/utils@1.4.8
12
+
13
+ ## 1.4.7
14
+
15
+ ### Patch Changes
16
+
17
+ - [#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
18
+
19
+ - [#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
20
+
21
+ - [#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
22
+
23
+ - Updated dependencies []:
24
+ - @opencloning/store@1.4.7
25
+ - @opencloning/utils@1.4.7
26
+
3
27
  ## 1.4.6
4
28
 
5
29
  ### 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.8",
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.8",
29
+ "@opencloning/utils": "1.4.8",
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>
@@ -42,7 +42,7 @@ describe('PCRTable', () => {
42
42
  });
43
43
 
44
44
  cy.contains('.pcr-table tr', 'ΔG (heterodimer)').within(() => {
45
- cy.get('td').should('contain', '-5276 kcal/mol');
45
+ cy.get('td').should('contain', '-5276 cal/mol');
46
46
  });
47
47
 
48
48
  // Verify heterodimer figure exists
@@ -25,7 +25,7 @@ export default function PCRTable({ pcrDetail }) {
25
25
  {heterodimer && (
26
26
  <>
27
27
  <TableSection
28
- values={[['Tm (heterodimer)', `${formatMeltingTemperature(heterodimer.melting_temperature)} °C`], ['ΔG (heterodimer)', `${formatDeltaG(heterodimer.deltaG)} kcal/mol`]]}
28
+ values={[['Tm (heterodimer)', `${formatMeltingTemperature(heterodimer.melting_temperature)} °C`], ['ΔG (heterodimer)', `${formatDeltaG(heterodimer.deltaG)} cal/mol`]]}
29
29
  />
30
30
  <Primer3Figure figure={heterodimer.figure} />
31
31
  </>
@@ -91,7 +91,7 @@ describe('PrimerInfoDialog Component', () => {
91
91
  cy.get('tr').eq(7).find('td').eq(0)
92
92
  .should('contain', 'ΔG (homodimer)');
93
93
  cy.get('tr').eq(7).find('td').eq(1)
94
- .should('contain', '-100 kcal/mol');
94
+ .should('contain', '-100 cal/mol');
95
95
 
96
96
  // Hairpin section
97
97
  cy.get('tr').eq(9).should('contain', 'Hairpin');
@@ -102,7 +102,7 @@ describe('PrimerInfoDialog Component', () => {
102
102
  cy.get('tr').eq(11).find('td').eq(0)
103
103
  .should('contain', 'ΔG (hairpin)');
104
104
  cy.get('tr').eq(11).find('td').eq(1)
105
- .should('contain', '-100 kcal/mol');
105
+ .should('contain', '-100 cal/mol');
106
106
  cy.get('.pcr-table').should('not.exist');
107
107
  });
108
108
 
@@ -30,7 +30,7 @@ export function PrimerInfoDialog({ primerDetails, open, onClose, pcrDetails }) {
30
30
  title="Homodimer"
31
31
  values={[
32
32
  ['Tm (homodimer)', `${formatMeltingTemperature(primerDetails.homodimer.melting_temperature)} °C`],
33
- ['ΔG (homodimer)', `${formatDeltaG(primerDetails.homodimer.deltaG)} kcal/mol`],
33
+ ['ΔG (homodimer)', `${formatDeltaG(primerDetails.homodimer.deltaG)} cal/mol`],
34
34
  ]}
35
35
  />
36
36
  <Primer3Figure figure={primerDetails.homodimer.figure} />
@@ -42,7 +42,7 @@ export function PrimerInfoDialog({ primerDetails, open, onClose, pcrDetails }) {
42
42
  title="Hairpin"
43
43
  values={[
44
44
  ['Tm (hairpin)', `${formatMeltingTemperature(primerDetails.hairpin.melting_temperature)} °C`],
45
- ['ΔG (hairpin)', `${formatDeltaG(primerDetails.hairpin.deltaG)} kcal/mol`],
45
+ ['ΔG (hairpin)', `${formatDeltaG(primerDetails.hairpin.deltaG)} cal/mol`],
46
46
  ]}
47
47
  />
48
48
  <Primer3Figure figure={primerDetails.hairpin.figure} />
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.8";