@opencloning/ui 1.1.0-test.5 → 1.1.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 +37 -3
- package/package.json +5 -4
- package/src/StandAloneOpenCloning.js +66 -0
- package/src/index.js +2 -0
- package/src/version.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,13 +1,47 @@
|
|
|
1
1
|
# @opencloning/ui
|
|
2
2
|
|
|
3
|
-
## 1.1.
|
|
3
|
+
## 1.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#590](https://github.com/manulera/OpenCloning_frontend/pull/590) [`81bcca3`](https://github.com/manulera/OpenCloning_frontend/commit/81bcca3c4a38e32793dab1cc60862f8ae61b3bb9) Thanks [@manulera](https://github.com/manulera)! - Now it exports a standalone OpenCloning component that can be used without manually setting up React providers, Redux store, or ConfigProvider.
|
|
8
|
+
|
|
9
|
+
- Updated dependencies []:
|
|
10
|
+
- @opencloning/store@1.1.1
|
|
11
|
+
- @opencloning/utils@1.1.1
|
|
12
|
+
|
|
13
|
+
## 1.1.0
|
|
14
|
+
|
|
15
|
+
### Minor Changes
|
|
16
|
+
|
|
17
|
+
- [#570](https://github.com/manulera/OpenCloning_frontend/pull/570) [`83dab1c`](https://github.com/manulera/OpenCloning_frontend/commit/83dab1c2a7cca2b17aa8039b74d15c47e467b2f0) Thanks [@manulera](https://github.com/manulera)! - Switch to using provider for configuration rather than state
|
|
18
|
+
|
|
19
|
+
- [#570](https://github.com/manulera/OpenCloning_frontend/pull/570) [`83dab1c`](https://github.com/manulera/OpenCloning_frontend/commit/83dab1c2a7cca2b17aa8039b74d15c47e467b2f0) Thanks [@manulera](https://github.com/manulera)! - Handle version display with scripts
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- [#574](https://github.com/manulera/OpenCloning_frontend/pull/574) [`6df1c20`](https://github.com/manulera/OpenCloning_frontend/commit/6df1c2060d5776a30a00daaedfb0ec2cc685284d) Thanks [@manulera](https://github.com/manulera)! - Last dummy test to check if auto pre-release works
|
|
24
|
+
|
|
25
|
+
- [#573](https://github.com/manulera/OpenCloning_frontend/pull/573) [`07106ac`](https://github.com/manulera/OpenCloning_frontend/commit/07106ac0c8f9321d0b33994ed086a76eb79739a3) Thanks [@manulera](https://github.com/manulera)! - Dummy change to test that new action works
|
|
26
|
+
|
|
27
|
+
- [#570](https://github.com/manulera/OpenCloning_frontend/pull/570) [`83dab1c`](https://github.com/manulera/OpenCloning_frontend/commit/83dab1c2a7cca2b17aa8039b74d15c47e467b2f0) Thanks [@manulera](https://github.com/manulera)! - testing a test release to npm
|
|
28
|
+
|
|
29
|
+
- [#570](https://github.com/manulera/OpenCloning_frontend/pull/570) [`83dab1c`](https://github.com/manulera/OpenCloning_frontend/commit/83dab1c2a7cca2b17aa8039b74d15c47e467b2f0) Thanks [@manulera](https://github.com/manulera)! - Fix imports from mui and icons library, and add husky hook to validate that it does not happen again
|
|
30
|
+
|
|
31
|
+
- [#570](https://github.com/manulera/OpenCloning_frontend/pull/570) [`83dab1c`](https://github.com/manulera/OpenCloning_frontend/commit/83dab1c2a7cca2b17aa8039b74d15c47e467b2f0) Thanks [@manulera](https://github.com/manulera)! - Releases work on npm now through `YARN_NPM_AUTH_TOKEN=<> yarn changeset publish`, this is enabled by patch, see Readme. This properly handles workspaces (in package.json in each of the packages, `"@opencloning/store": "workspace:*",` is replaced by the actual version).
|
|
32
|
+
|
|
33
|
+
- Updated dependencies [[`6df1c20`](https://github.com/manulera/OpenCloning_frontend/commit/6df1c2060d5776a30a00daaedfb0ec2cc685284d), [`83dab1c`](https://github.com/manulera/OpenCloning_frontend/commit/83dab1c2a7cca2b17aa8039b74d15c47e467b2f0), [`83dab1c`](https://github.com/manulera/OpenCloning_frontend/commit/83dab1c2a7cca2b17aa8039b74d15c47e467b2f0), [`83dab1c`](https://github.com/manulera/OpenCloning_frontend/commit/83dab1c2a7cca2b17aa8039b74d15c47e467b2f0), [`83dab1c`](https://github.com/manulera/OpenCloning_frontend/commit/83dab1c2a7cca2b17aa8039b74d15c47e467b2f0)]:
|
|
34
|
+
- @opencloning/store@1.1.0
|
|
35
|
+
- @opencloning/utils@1.1.0
|
|
36
|
+
|
|
37
|
+
## 1.1.0-dev.5
|
|
4
38
|
|
|
5
39
|
### Patch Changes
|
|
6
40
|
|
|
7
41
|
- 6df1c20: Last dummy test to check if auto pre-release works
|
|
8
42
|
- Updated dependencies [6df1c20]
|
|
9
|
-
- @opencloning/store@1.1.0-
|
|
10
|
-
- @opencloning/utils@1.1.0-
|
|
43
|
+
- @opencloning/store@1.1.0-dev.5
|
|
44
|
+
- @opencloning/utils@1.1.0-dev.5
|
|
11
45
|
|
|
12
46
|
## 1.1.0-dev.4
|
|
13
47
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opencloning/ui",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./src/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
".": "./src/index.js",
|
|
12
12
|
"./components": "./src/components/index.js",
|
|
13
13
|
"./providers/ConfigProvider": "./src/providers/index.js",
|
|
14
|
-
"./hooks/useConfig": "./src/hooks/useConfig.js"
|
|
14
|
+
"./hooks/useConfig": "./src/hooks/useConfig.js",
|
|
15
|
+
"./standalone": "./src/StandAloneOpenCloning.js"
|
|
15
16
|
},
|
|
16
17
|
"repository": {
|
|
17
18
|
"type": "git",
|
|
@@ -23,8 +24,8 @@
|
|
|
23
24
|
"@emotion/styled": "^11.14.0",
|
|
24
25
|
"@mui/icons-material": "^5.15.17",
|
|
25
26
|
"@mui/material": "^5.15.17",
|
|
26
|
-
"@opencloning/store": "1.1.
|
|
27
|
-
"@opencloning/utils": "1.1.
|
|
27
|
+
"@opencloning/store": "1.1.1",
|
|
28
|
+
"@opencloning/utils": "1.1.1",
|
|
28
29
|
"@teselagen/bio-parsers": "^0.4.32",
|
|
29
30
|
"@teselagen/ove": "^0.8.18",
|
|
30
31
|
"@teselagen/range-utils": "^0.3.13",
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { createRoot } from 'react-dom/client';
|
|
3
|
+
import { Provider } from 'react-redux';
|
|
4
|
+
import store from '@opencloning/store';
|
|
5
|
+
import { ConfigProvider } from './providers/ConfigProvider';
|
|
6
|
+
import { OpenCloning } from './components';
|
|
7
|
+
// Import styles
|
|
8
|
+
import './index.css';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* StandAloneOpenCloning - Mounts the OpenCloning component into a DOM element
|
|
12
|
+
*
|
|
13
|
+
* This function handles all the setup required for OpenCloning:
|
|
14
|
+
* - Redux Provider with store
|
|
15
|
+
* - ConfigProvider with config
|
|
16
|
+
* - React rendering
|
|
17
|
+
*
|
|
18
|
+
* @param {Object} options - Configuration options
|
|
19
|
+
* @param {Object} options.config - Configuration object for OpenCloning
|
|
20
|
+
* @param {HTMLElement} options.element - DOM element where to mount the component
|
|
21
|
+
* @returns {Function} Cleanup function that unmounts the component
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* const container = document.getElementById('opencloning-container');
|
|
25
|
+
* const cleanup = StandAloneOpenCloning({
|
|
26
|
+
* config: { /* config object *\/ },
|
|
27
|
+
* element: container
|
|
28
|
+
* });
|
|
29
|
+
*
|
|
30
|
+
* // Later, to unmount:
|
|
31
|
+
* cleanup();
|
|
32
|
+
*/
|
|
33
|
+
export function StandAloneOpenCloning({ config, element }) {
|
|
34
|
+
if (!config) {
|
|
35
|
+
throw new Error('StandAloneOpenCloning requires a config object');
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
if (!element) {
|
|
39
|
+
throw new Error('StandAloneOpenCloning requires an element');
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
if (!(element instanceof HTMLElement)) {
|
|
43
|
+
throw new Error('Element must be an HTMLElement');
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const container = element;
|
|
47
|
+
|
|
48
|
+
// Create React root
|
|
49
|
+
const root = createRoot(container);
|
|
50
|
+
|
|
51
|
+
// Render the component with all providers
|
|
52
|
+
root.render(
|
|
53
|
+
React.createElement(Provider, { store },
|
|
54
|
+
React.createElement(ConfigProvider, { config },
|
|
55
|
+
React.createElement(OpenCloning)
|
|
56
|
+
)
|
|
57
|
+
)
|
|
58
|
+
);
|
|
59
|
+
|
|
60
|
+
// Return cleanup function
|
|
61
|
+
return () => {
|
|
62
|
+
root.unmount();
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export default StandAloneOpenCloning;
|
package/src/index.js
CHANGED
|
@@ -3,6 +3,8 @@ import './index.css';
|
|
|
3
3
|
|
|
4
4
|
// Re-export components
|
|
5
5
|
export * from './components/index.js';
|
|
6
|
+
// Export standalone wrapper
|
|
7
|
+
export { StandAloneOpenCloning } from './StandAloneOpenCloning.js';
|
|
6
8
|
// Export version - replaced at publish time via prepack script
|
|
7
9
|
export { version } from './version.js';
|
|
8
10
|
|
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.1.
|
|
2
|
+
export const version = "1.1.1";
|