@datagrok/compute 1.43.6 → 1.43.8

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@datagrok/compute",
3
3
  "friendlyName": "Compute",
4
- "version": "1.43.6",
4
+ "version": "1.43.8",
5
5
  "author": {
6
6
  "name": "Andrey Sharapov",
7
7
  "email": "andrey.sharapov@softwarecountry.com"
@@ -28,6 +28,7 @@ export class OutliersSelectionViewer extends DG.JsViewer {
28
28
 
29
29
  const inputData = this.dataFrame;
30
30
  const IS_OUTLIER_COL_LABEL = 'isOutlier';
31
+ const IS_OUTLIER_SECONDARY_COL_LABEL = 'isOutlierSecondary';
31
32
  const OUTLIER_RATIONALE_COL_LABEL = 'Rationale';
32
33
  const OUTLIER_COUNT_COL_LABEL = 'Count';
33
34
  const IS_GROUP_CONFIRMED_LABEL = 'isConfirmed';
@@ -36,6 +37,10 @@ export class OutliersSelectionViewer extends DG.JsViewer {
36
37
  inputData.columns
37
38
  .add(DG.Column.fromList(DG.TYPE.STRING, IS_OUTLIER_COL_LABEL, new Array(inputData.rowCount).fill('Inlier')));
38
39
  }
40
+ if (!inputData.columns.byName(IS_OUTLIER_SECONDARY_COL_LABEL)) {
41
+ inputData.columns
42
+ .add(DG.Column.fromList(DG.TYPE.STRING, IS_OUTLIER_SECONDARY_COL_LABEL, new Array(inputData.rowCount).fill('Inlier')));
43
+ }
39
44
 
40
45
  if (!inputData.columns.byName(OUTLIER_RATIONALE_COL_LABEL)) {
41
46
  inputData.columns
@@ -71,12 +76,17 @@ export class OutliersSelectionViewer extends DG.JsViewer {
71
76
  inputData.col(IS_OUTLIER_COL_LABEL)?.meta.markers.assign('Last Inlier', DG.MARKER_TYPE.STAR);
72
77
  inputData.col(IS_OUTLIER_COL_LABEL)?.meta.colors.setCategorical({'Outlier': DG.Color.scatterPlotMarker,
73
78
  'Inlier': DG.Color.scatterPlotMarker, 'Last Inlier': DG.Color.red});
79
+ inputData.col(IS_OUTLIER_SECONDARY_COL_LABEL)?.meta.markers.assign('Outlier', DG.MARKER_TYPE.OUTLIER);
80
+ inputData.col(IS_OUTLIER_SECONDARY_COL_LABEL)?.meta.markers.assign('Last Inlier', DG.MARKER_TYPE.STAR);
81
+ inputData.col(IS_OUTLIER_SECONDARY_COL_LABEL)?.meta.colors.setCategorical({'Outlier': DG.Color.cyan,
82
+ 'Inlier': DG.Color.cyan, 'Last Inlier': DG.Color.red});
74
83
 
75
84
  const newRationale =
76
85
  groupsListGrid.dataFrame?.cell(groupsListGrid.dataFrame.rowCount-1, OUTLIER_RATIONALE_COL_LABEL).value;
77
86
 
78
87
  inputData.selection.getSelectedIndexes().forEach((selectedIndex: number) => {
79
88
  inputData.col(IS_OUTLIER_COL_LABEL)!.set(selectedIndex, 'Outlier', false);
89
+ inputData.col(IS_OUTLIER_SECONDARY_COL_LABEL)!.set(selectedIndex, 'Outlier', false);
80
90
  inputData.col(OUTLIER_RATIONALE_COL_LABEL)!.set(
81
91
  selectedIndex,
82
92
  newRationale,
@@ -117,6 +127,7 @@ export class OutliersSelectionViewer extends DG.JsViewer {
117
127
  if (inputData.columns.byName(OUTLIER_RATIONALE_COL_LABEL).get(i) === rationale) {
118
128
  inputData.columns.byName(OUTLIER_RATIONALE_COL_LABEL).set(i, '', false);
119
129
  inputData.columns.byName(IS_OUTLIER_COL_LABEL).set(i, 'Inlier', false);
130
+ inputData.columns.byName(IS_OUTLIER_SECONDARY_COL_LABEL).set(i, 'Inlier', false);
120
131
  }
121
132
  }
122
133
  inputData.fireValuesChanged();