@datagrok/compute 1.1.1 → 1.2.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/dist/package.js +2 -1
- package/dist/package.js.LICENSE.txt +11 -0
- package/dist/package.js.map +1 -1
- package/package.json +3 -2
- package/src/models-widget.ts +10 -11
- package/src/package.ts +1 -20
- package/tsconfig.json +3 -3
- package/webpack.config.js +5 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datagrok/compute",
|
|
3
3
|
"friendlyName": "Compute",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.2.1",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Aufar Zakiev",
|
|
7
7
|
"email": "aufar.zakiev@softwarecountry.com"
|
|
@@ -13,11 +13,12 @@
|
|
|
13
13
|
"directory": "packages/Compute"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@datagrok-libraries/utils": "
|
|
16
|
+
"@datagrok-libraries/compute-utils": "^1.0.1",
|
|
17
17
|
"cash-dom": "latest",
|
|
18
18
|
"datagrok-api": "latest",
|
|
19
19
|
"dayjs": "latest",
|
|
20
20
|
"rxjs": "^6.5.5",
|
|
21
|
+
"source-map-loader": "^4.0.1",
|
|
21
22
|
"ts-loader": "latest",
|
|
22
23
|
"typescript": "latest",
|
|
23
24
|
"wu": "latest"
|
package/src/models-widget.ts
CHANGED
|
@@ -3,7 +3,6 @@ import * as DG from "datagrok-api/dg";
|
|
|
3
3
|
import * as ui from "datagrok-api/ui";
|
|
4
4
|
import {ModelHandler} from './model-handler';
|
|
5
5
|
import $ from 'cash-dom';
|
|
6
|
-
import {FunctionView} from "@datagrok-libraries/utils/src/function-view";
|
|
7
6
|
const api = <any>window;
|
|
8
7
|
|
|
9
8
|
/*
|
|
@@ -19,7 +18,7 @@ export class ModelsWidget extends DG.Widget {
|
|
|
19
18
|
|
|
20
19
|
constructor() {
|
|
21
20
|
super(ui.box());
|
|
22
|
-
|
|
21
|
+
|
|
23
22
|
this.meta = new ModelHandler();
|
|
24
23
|
this.name = 'Models';
|
|
25
24
|
this.permanentFilter = '#model';
|
|
@@ -59,25 +58,25 @@ export class ModelsWidget extends DG.Widget {
|
|
|
59
58
|
this.getModels('updatedOn');
|
|
60
59
|
}
|
|
61
60
|
|
|
62
|
-
|
|
61
|
+
|
|
63
62
|
|
|
64
63
|
async getModels(order:string){
|
|
65
64
|
let b = true;
|
|
66
65
|
let v = order;
|
|
67
66
|
|
|
68
67
|
switch(order){
|
|
69
|
-
case 'Recent':
|
|
68
|
+
case 'Recent':
|
|
70
69
|
v = 'updatedOn';
|
|
71
70
|
break;
|
|
72
|
-
case 'Newest':
|
|
71
|
+
case 'Newest':
|
|
73
72
|
v = 'createdOn';
|
|
74
73
|
break;
|
|
75
|
-
case 'Oldest':
|
|
74
|
+
case 'Oldest':
|
|
76
75
|
v = 'createdOn';
|
|
77
76
|
b = false;
|
|
78
77
|
break;
|
|
79
78
|
default:
|
|
80
|
-
v = 'updatedOn';
|
|
79
|
+
v = 'updatedOn';
|
|
81
80
|
}
|
|
82
81
|
|
|
83
82
|
grok.dapi.scripts
|
|
@@ -92,16 +91,16 @@ export class ModelsWidget extends DG.Widget {
|
|
|
92
91
|
d.style.color = 'var(--blue-1)';
|
|
93
92
|
d.style.margin = '4px 0';
|
|
94
93
|
$(d).find('.ui-label').addClass('ui-link');
|
|
95
|
-
|
|
96
|
-
this.modelsList.append(d)
|
|
94
|
+
|
|
95
|
+
this.modelsList.append(d)
|
|
97
96
|
}));
|
|
98
97
|
}
|
|
99
98
|
|
|
100
99
|
static openModel(x: DG.Script, parentCall?: DG.FuncCall) {
|
|
101
|
-
let views = []
|
|
100
|
+
let views = []
|
|
102
101
|
for (let v of grok.shell.views)
|
|
103
102
|
views.push(v.name)
|
|
104
|
-
|
|
103
|
+
|
|
105
104
|
if (views.includes('Models')){
|
|
106
105
|
let view = new FunctionView(x);
|
|
107
106
|
view.parentCall = parentCall!;
|
package/src/package.ts
CHANGED
|
@@ -6,8 +6,7 @@ import {ModelHandler} from './model-handler';
|
|
|
6
6
|
import {_functionParametersGrid} from './function-parameters-grid';
|
|
7
7
|
import {ModelCatalogView} from './model-catalog-view';
|
|
8
8
|
import {OutliersSelectionViewer} from './outliers-selection/outliers-selection-viewer';
|
|
9
|
-
import {
|
|
10
|
-
import {RichFunctionView} from "@datagrok-libraries/utils/src/rich-function-view";
|
|
9
|
+
import {RichFunctionView} from "@datagrok-libraries/compute-utils";
|
|
11
10
|
import './css/model-card.css';
|
|
12
11
|
import { ImportScriptGeneratorApp } from './import-script-generator/view';
|
|
13
12
|
|
|
@@ -228,21 +227,3 @@ export function modelCatalog() {
|
|
|
228
227
|
}
|
|
229
228
|
} else grok.shell.v = modelsView;
|
|
230
229
|
}
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
//name: computationTest
|
|
234
|
-
//input: int delayMs {description: Wait time; units: ms}
|
|
235
|
-
//input: string error {description: When specified, throws this error}
|
|
236
|
-
//output: dataframe result
|
|
237
|
-
export async function computationTest(delayMs: number, error: string): Promise<DG.DataFrame> {
|
|
238
|
-
await delay(delayMs);
|
|
239
|
-
if (error != null || error != '')
|
|
240
|
-
throw error;
|
|
241
|
-
return grok.data.demo.demog();
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
//name: testComputationView();
|
|
245
|
-
export function testComputationView() {
|
|
246
|
-
let f = DG.Func.find({name: 'computationTest'})[0];
|
|
247
|
-
//grok.shell.addView(new ComputationView(f));
|
|
248
|
-
}
|
package/tsconfig.json
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', 'react', 'react-jsx' or 'react-jsxdev'. */
|
|
13
13
|
// "declaration": true, /* Generates corresponding '.d.ts' file. */
|
|
14
14
|
// "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
|
|
15
|
-
|
|
15
|
+
"sourceMap": true, /* Generates corresponding '.map' file. */
|
|
16
16
|
// "outFile": "./", /* Concatenate and emit output to single file. */
|
|
17
17
|
// "outDir": "./", /* Redirect output structure to the directory. */
|
|
18
18
|
// "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
|
|
@@ -57,8 +57,8 @@
|
|
|
57
57
|
/* Source Map Options */
|
|
58
58
|
// "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
|
|
59
59
|
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
|
|
60
|
-
"inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
|
|
61
|
-
"inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
|
|
60
|
+
// "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
|
|
61
|
+
// "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
|
|
62
62
|
|
|
63
63
|
/* Experimental Options */
|
|
64
64
|
"experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
|