@opencloning/store 1.7.2 → 1.8.1
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 +24 -0
- package/package.json +3 -3
- package/src/cloning.js +4 -0
- package/src/cloning_utils.js +7 -0
- package/src/index.js +13 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @opencloning/store
|
|
2
2
|
|
|
3
|
+
## 1.8.1
|
|
4
|
+
|
|
5
|
+
## 1.8.0
|
|
6
|
+
|
|
7
|
+
### Patch Changes
|
|
8
|
+
|
|
9
|
+
- [#694](https://github.com/OpenCloning/OpenCloning_frontend/pull/694) [`2ff9010`](https://github.com/OpenCloning/OpenCloning_frontend/commit/2ff90103c1d9e8e984533e51ecf4dc7978756a57) Thanks [@manulera](https://github.com/manulera)! - Update how store is setup, using legacy_createStore.
|
|
10
|
+
|
|
11
|
+
## 1.7.8
|
|
12
|
+
|
|
13
|
+
## 1.7.7
|
|
14
|
+
|
|
15
|
+
## 1.7.6
|
|
16
|
+
|
|
17
|
+
## 1.7.5
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- [#684](https://github.com/manulera/OpenCloning_frontend/pull/684) [`034c738`](https://github.com/manulera/OpenCloning_frontend/commit/034c73840dc183b6b3584365c1db899d2f0c548b) Thanks [@manulera](https://github.com/manulera)! - Allow recombinase genome setting
|
|
22
|
+
|
|
23
|
+
## 1.7.4
|
|
24
|
+
|
|
25
|
+
## 1.7.3
|
|
26
|
+
|
|
3
27
|
## 1.7.2
|
|
4
28
|
|
|
5
29
|
## 1.7.1
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"license": "MIT",
|
|
3
3
|
"name": "@opencloning/store",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.8.1",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.js",
|
|
7
7
|
"exports": {
|
|
@@ -11,12 +11,12 @@
|
|
|
11
11
|
},
|
|
12
12
|
"repository": {
|
|
13
13
|
"type": "git",
|
|
14
|
-
"url": "https://github.com/
|
|
14
|
+
"url": "https://github.com/OpenCloning/OpenCloning_frontend.git",
|
|
15
15
|
"directory": "packages/store"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@reduxjs/toolkit": "^1.9.7",
|
|
19
|
-
"@teselagen/bio-parsers": "^0.4.
|
|
19
|
+
"@teselagen/bio-parsers": "^0.4.38",
|
|
20
20
|
"@teselagen/range-utils": "^0.3.20",
|
|
21
21
|
"redux": "^4.2.1",
|
|
22
22
|
"redux-form": "^8.3.10",
|
package/src/cloning.js
CHANGED
package/src/cloning_utils.js
CHANGED
|
@@ -40,6 +40,13 @@ export function getInputSequencesFromSourceId(state, sourceId) {
|
|
|
40
40
|
return thisSource.input.map(({sequence}) => state.cloning.sequences.find((e) => e.id === sequence)).filter((e) => e !== undefined);
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
+
/** True if any assembly input is linear (not circular) according to teselaJsonCache.*/
|
|
44
|
+
export function anyAssemblyInputIsLinear(source, teselaJsonCache) {
|
|
45
|
+
const sequenceIds = source.input.map(({ sequence }) => sequence);
|
|
46
|
+
// We test whether teselaJsonCache[id], because primers are also listed as inputs
|
|
47
|
+
return sequenceIds.some((id) => teselaJsonCache[id] && (teselaJsonCache[id].circular !== true));
|
|
48
|
+
}
|
|
49
|
+
|
|
43
50
|
export function isSourceATemplate({ sources, sequences }, sourceId) {
|
|
44
51
|
// Get the output sequence
|
|
45
52
|
const source = sources.find((s) => s.id === sourceId);
|
package/src/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// optionally connect to the redux store
|
|
2
|
-
import { createStore, combineReducers, applyMiddleware, compose } from 'redux';
|
|
2
|
+
import { legacy_createStore as createStore, combineReducers, applyMiddleware, compose } from 'redux';
|
|
3
3
|
import { tg_modalState } from '@teselagen/ui';
|
|
4
4
|
import {
|
|
5
5
|
vectorEditorReducer as VectorEditor,
|
|
@@ -18,17 +18,23 @@ const composeEnhancer = (window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__
|
|
|
18
18
|
}))
|
|
19
19
|
|| compose;
|
|
20
20
|
|
|
21
|
+
const reducerMap = {
|
|
22
|
+
form,
|
|
23
|
+
tg_modalState,
|
|
24
|
+
VectorEditor: VectorEditor(),
|
|
25
|
+
cloning: cloningReducer,
|
|
26
|
+
};
|
|
27
|
+
|
|
21
28
|
const store = createStore(
|
|
22
|
-
combineReducers(
|
|
23
|
-
form,
|
|
24
|
-
tg_modalState,
|
|
25
|
-
VectorEditor: VectorEditor(),
|
|
26
|
-
cloning: cloningReducer,
|
|
27
|
-
}),
|
|
29
|
+
combineReducers(reducerMap),
|
|
28
30
|
undefined,
|
|
29
31
|
composeEnhancer(
|
|
30
32
|
applyMiddleware(thunk, vectorEditorMiddleware), // your store should be redux-thunk connected for the VectorEditor component to work
|
|
31
33
|
),
|
|
32
34
|
);
|
|
33
35
|
|
|
36
|
+
export function extendStore(extraReducers) {
|
|
37
|
+
store.replaceReducer(combineReducers({ ...reducerMap, ...extraReducers }));
|
|
38
|
+
}
|
|
39
|
+
|
|
34
40
|
export default store;
|