@datagrok/helm 2.2.1 → 2.3.0
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 +17 -0
- package/dist/package-test.js +1 -1
- package/dist/package-test.js.map +1 -1
- package/dist/package.js +1 -1
- package/dist/package.js.map +1 -1
- package/package.json +9 -10
- package/src/cell-renderer.ts +8 -33
- package/src/helm-helper.ts +67 -17
- package/src/helm-monomer-placer.ts +7 -9
- package/src/helm-web-editor.ts +33 -3
- package/src/package-test.ts +8 -3
- package/src/package-utils.ts +69 -42
- package/src/package.ts +121 -141
- package/src/tests/findMonomers-tests.ts +2 -0
- package/src/tests/get-all-parts-tests.ts +5 -0
- package/src/tests/get-molfiles-tests.ts +3 -1
- package/src/tests/get-monomer-tests.ts +88 -19
- package/src/tests/helm-service-tests.ts +4 -0
- package/src/tests/helm-tests.ts +7 -1
- package/src/tests/helm-web-editor-tests.ts +55 -0
- package/src/tests/parse-helm-tests.ts +98 -0
- package/src/tests/properties-widget-tests.ts +33 -4
- package/src/tests/renderers-tests.ts +3 -1
- package/src/tests/utils.ts +6 -0
- package/src/types/index.ts +5 -0
- package/src/utils/get-hovered.ts +3 -4
- package/src/utils/{dummy-monomer.ts → get-monomer-dummy.ts} +10 -45
- package/src/utils/get-monomer-of-library.ts +90 -0
- package/src/utils/get-monomer.ts +23 -21
- package/src/utils/helm-grid-cell-renderer.ts +9 -2
- package/src/utils/helm-service.ts +6 -5
- package/src/utils/index.ts +11 -17
- package/src/widgets/properties-widget.ts +29 -9
- package/tsconfig.json +1 -1
- package/vendor/helm-web-editor.development.js +39640 -0
- package/vendor/helm-web-editor.production.js +2 -0
- package/vendor/helm-web-editor.production.js.map +1 -0
- package/webpack.config.js +14 -11
- package/helm/JSDraw/Pistoia.HELM-uncompressed.js +0 -9694
- package/helm/JSDraw/Pistoia.HELM.js +0 -27
- package/helm/JSDraw/ReadMe.txt +0 -8
- package/helm/JSDraw/Scilligence.JSDraw2.Lite-uncompressed.js +0 -31126
- package/helm/JSDraw/Scilligence.JSDraw2.Lite.js +0 -12
- package/helm/JSDraw/Scilligence.JSDraw2.Resources.js +0 -762
- package/helm/JSDraw/dojo.js +0 -250
- package/helm/JSDraw/test.html +0 -24
package/webpack.config.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
const path = require('path');
|
|
2
2
|
const packageName = path.parse(require('./package.json').name).name.toLowerCase().replace(/-/g, '');
|
|
3
3
|
|
|
4
|
+
const mode = process.env.NODE_ENV ?? 'production';
|
|
5
|
+
if (mode !== 'production')
|
|
6
|
+
console.warn(`Building '${packageName}' in '${mode}' mode.`);
|
|
7
|
+
|
|
4
8
|
module.exports = {
|
|
5
|
-
cache: {
|
|
6
|
-
|
|
7
|
-
},
|
|
8
|
-
mode: 'development',
|
|
9
|
+
...(mode !== 'production' ? {} : {cache: {type: 'filesystem'}}),
|
|
10
|
+
mode: mode,
|
|
9
11
|
entry: {
|
|
10
12
|
package: './src/package.ts',
|
|
11
13
|
test: {
|
|
@@ -17,15 +19,20 @@ module.exports = {
|
|
|
17
19
|
resolve: {
|
|
18
20
|
fallback: {'url': false},
|
|
19
21
|
extensions: ['.ts', '.tsx', '.js', '.wasm', '.mjs', '.json'],
|
|
22
|
+
alias: {
|
|
23
|
+
'vendor/helm-web-editor': mode === 'production' ?
|
|
24
|
+
path.resolve(__dirname, 'vendor', 'helm-web-editor.production.js') :
|
|
25
|
+
path.resolve(__dirname, 'vendor', 'helm-web-editor.development.js'),
|
|
26
|
+
},
|
|
20
27
|
},
|
|
21
28
|
devServer: {
|
|
22
29
|
contentBase: './dist',
|
|
23
30
|
},
|
|
24
31
|
module: {
|
|
25
32
|
rules: [
|
|
26
|
-
{test: /\.js$/, enforce: 'pre', use: ['source-map-loader'], exclude: /node_modules/},
|
|
27
|
-
{test: /\.ts(x?)$/, use: 'ts-loader', exclude: /node_modules/},
|
|
28
|
-
{test: /\.css$/, use: ['style-loader', 'css-loader'], exclude: /node_modules/},
|
|
33
|
+
{test: /\.js$/, enforce: 'pre', use: ['source-map-loader'], exclude: [/node_modules/, /vendor/]},
|
|
34
|
+
{test: /\.ts(x?)$/, use: 'ts-loader', exclude: [/node_modules/, /vendor/]},
|
|
35
|
+
{test: /\.css$/, use: ['style-loader', 'css-loader'], exclude: [/node_modules/, /vendor/]},
|
|
29
36
|
],
|
|
30
37
|
},
|
|
31
38
|
devtool: 'source-map',
|
|
@@ -39,10 +46,6 @@ module.exports = {
|
|
|
39
46
|
'cash-dom': '$',
|
|
40
47
|
'dayjs': 'dayjs',
|
|
41
48
|
'wu': 'wu',
|
|
42
|
-
'scil': 'scil',
|
|
43
|
-
'org': 'org',
|
|
44
|
-
'dojo': 'dojo',
|
|
45
|
-
'JSDraw2': 'JSDraw2',
|
|
46
49
|
},
|
|
47
50
|
output: {
|
|
48
51
|
filename: '[name].js',
|