@datagrok/eda 1.1.19 → 1.1.21
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 +8 -0
- package/dist/246.js +2 -2
- package/dist/523.js +2 -2
- package/dist/972.js +2 -2
- package/dist/package-test.js +2 -2
- package/dist/package.js +2 -2
- package/package.json +6 -4
- package/src/package.ts +27 -6
- package/webpack.config.js +4 -0
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datagrok/eda",
|
|
3
3
|
"friendlyName": "EDA",
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.21",
|
|
5
5
|
"description": "Exploratory Data Analysis Tools",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@datagrok-libraries/math": "^1.1.
|
|
8
|
-
"@datagrok-libraries/ml": "^6.6.
|
|
7
|
+
"@datagrok-libraries/math": "^1.1.3",
|
|
8
|
+
"@datagrok-libraries/ml": "^6.6.4",
|
|
9
9
|
"@datagrok-libraries/tutorials": "^1.3.6",
|
|
10
10
|
"@datagrok-libraries/utils": "^4.1.44",
|
|
11
11
|
"@keckelt/tsne": "^1.0.2",
|
|
@@ -30,7 +30,9 @@
|
|
|
30
30
|
"ts-loader": "latest",
|
|
31
31
|
"typescript": "latest",
|
|
32
32
|
"webpack": "latest",
|
|
33
|
-
"webpack-cli": "latest"
|
|
33
|
+
"webpack-cli": "latest",
|
|
34
|
+
"css-loader": "latest",
|
|
35
|
+
"style-loader": "latest"
|
|
34
36
|
},
|
|
35
37
|
"scripts": {
|
|
36
38
|
"link-all": "npm link datagrok-api @datagrok-libraries/utils @datagrok-libraries/tutorials",
|
package/src/package.ts
CHANGED
|
@@ -140,17 +140,38 @@ export function stringPreprocessingFunction(col: DG.Column, _metric: string) {
|
|
|
140
140
|
//name: Multi Column Dimensionality Reduction
|
|
141
141
|
export async function reduceDimensionality(): Promise<void> {
|
|
142
142
|
const editor = new MultiColumnDimReductionEditor();
|
|
143
|
-
ui.dialog('Dimensionality reduction')
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
143
|
+
const dialog = ui.dialog('Dimensionality reduction')
|
|
144
|
+
.add(editor.getEditor())
|
|
145
|
+
.onOK(async () => {
|
|
146
|
+
const params = editor.getParams();
|
|
147
|
+
if (params.columns.length === 0)
|
|
148
|
+
return;
|
|
149
|
+
await multiColReduceDimensionality(params.table, params.columns, params.methodName as DimReductionMethods,
|
|
148
150
|
params.distanceMetrics as KnownMetrics[],
|
|
149
151
|
params.weights, params.preprocessingFunctions, params.aggreaggregationMethod as DistanceAggregationMethods,
|
|
150
152
|
!!params.plotEmbeddings, !!params.clusterEmbeddings, params.options, {
|
|
151
153
|
fastRowCount: 10000,
|
|
152
154
|
}, params.postProcessingFunction, params.postProcessingFunctionArgs);
|
|
153
|
-
|
|
155
|
+
}).show();
|
|
156
|
+
const validate = () => {
|
|
157
|
+
const cols = editor.columnsInput.value;
|
|
158
|
+
const okButton = dialog.getButton('OK');
|
|
159
|
+
if (!okButton)
|
|
160
|
+
return;
|
|
161
|
+
const isDisabled = !cols || cols.length === 0;
|
|
162
|
+
if (isDisabled)
|
|
163
|
+
okButton.classList.add('disabled');
|
|
164
|
+
else
|
|
165
|
+
okButton.classList.remove('disabled');
|
|
166
|
+
};
|
|
167
|
+
editor.onColumnsChanged.subscribe(() => {
|
|
168
|
+
try {
|
|
169
|
+
validate();
|
|
170
|
+
} catch (e) {
|
|
171
|
+
console.error(e);
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
validate();
|
|
154
175
|
}
|
|
155
176
|
|
|
156
177
|
//name: GetMCLEditor
|
package/webpack.config.js
CHANGED
|
@@ -14,6 +14,10 @@ module.exports = {
|
|
|
14
14
|
rules: [
|
|
15
15
|
{test: /\.js$/, enforce: 'pre', use: ['source-map-loader'], exclude: /node_modules/},
|
|
16
16
|
{test: /\.ts(x?)$/, use: 'ts-loader', exclude: /node_modules/},
|
|
17
|
+
{
|
|
18
|
+
test: /\.css$/i,
|
|
19
|
+
use: ['style-loader', 'css-loader'],
|
|
20
|
+
},
|
|
17
21
|
],
|
|
18
22
|
},
|
|
19
23
|
devtool: 'inline-source-map',
|