@datagrok/compute 1.43.4 → 1.43.6

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.4",
4
+ "version": "1.43.6",
5
5
  "author": {
6
6
  "name": "Andrey Sharapov",
7
7
  "email": "andrey.sharapov@softwarecountry.com"
@@ -13,7 +13,7 @@
13
13
  "directory": "packages/Compute"
14
14
  },
15
15
  "dependencies": {
16
- "@datagrok-libraries/compute-utils": "^1.43.2",
16
+ "@datagrok-libraries/compute-utils": "^1.43.5",
17
17
  "@datagrok-libraries/utils": "^4.5.7",
18
18
  "cash-dom": "^8.1.5",
19
19
  "datagrok-api": "^1.25.0",
@@ -34,7 +34,7 @@ export class OutliersSelectionViewer extends DG.JsViewer {
34
34
 
35
35
  if (!inputData.columns.byName(IS_OUTLIER_COL_LABEL)) {
36
36
  inputData.columns
37
- .add(DG.Column.fromBitSet(IS_OUTLIER_COL_LABEL, DG.BitSet.create(inputData.rowCount, () => false)));
37
+ .add(DG.Column.fromList(DG.TYPE.STRING, IS_OUTLIER_COL_LABEL, new Array(inputData.rowCount).fill('Inlier')));
38
38
  }
39
39
 
40
40
  if (!inputData.columns.byName(OUTLIER_RATIONALE_COL_LABEL)) {
@@ -67,13 +67,16 @@ export class OutliersSelectionViewer extends DG.JsViewer {
67
67
  const confirmOutliers = () => {
68
68
  if (!groupsListGrid.dataFrame) return;
69
69
 
70
- inputData.col(IS_OUTLIER_COL_LABEL)?.meta.markers.assign('true', DG.MARKER_TYPE.OUTLIER);
70
+ inputData.col(IS_OUTLIER_COL_LABEL)?.meta.markers.assign('Outlier', DG.MARKER_TYPE.OUTLIER);
71
+ inputData.col(IS_OUTLIER_COL_LABEL)?.meta.markers.assign('Last Inlier', DG.MARKER_TYPE.STAR);
72
+ inputData.col(IS_OUTLIER_COL_LABEL)?.meta.colors.setCategorical({'Outlier': DG.Color.scatterPlotMarker,
73
+ 'Inlier': DG.Color.scatterPlotMarker, 'Last Inlier': DG.Color.red});
71
74
 
72
75
  const newRationale =
73
76
  groupsListGrid.dataFrame?.cell(groupsListGrid.dataFrame.rowCount-1, OUTLIER_RATIONALE_COL_LABEL).value;
74
77
 
75
78
  inputData.selection.getSelectedIndexes().forEach((selectedIndex: number) => {
76
- inputData.col(IS_OUTLIER_COL_LABEL)!.set(selectedIndex, true, false);
79
+ inputData.col(IS_OUTLIER_COL_LABEL)!.set(selectedIndex, 'Outlier', false);
77
80
  inputData.col(OUTLIER_RATIONALE_COL_LABEL)!.set(
78
81
  selectedIndex,
79
82
  newRationale,
@@ -89,7 +92,7 @@ export class OutliersSelectionViewer extends DG.JsViewer {
89
92
  const cancelOutliers = () => {
90
93
  if (!groupsListGrid.dataFrame) return;
91
94
 
92
- groupsListGrid.dataFrame.rows.removeAt(groupsListGrid.dataFrame.rowCount-1);
95
+ groupsListGrid.dataFrame.rows.removeAt(groupsListGrid.dataFrame.rowCount - 1);
93
96
  inputData.selection.setAll(false);
94
97
 
95
98
  $(getBalloonContainer()).empty();
@@ -113,7 +116,7 @@ export class OutliersSelectionViewer extends DG.JsViewer {
113
116
  for (let i = 0; i < inputData.rowCount; i++) {
114
117
  if (inputData.columns.byName(OUTLIER_RATIONALE_COL_LABEL).get(i) === rationale) {
115
118
  inputData.columns.byName(OUTLIER_RATIONALE_COL_LABEL).set(i, '', false);
116
- inputData.columns.byName(IS_OUTLIER_COL_LABEL).set(i, false, false);
119
+ inputData.columns.byName(IS_OUTLIER_COL_LABEL).set(i, 'Inlier', false);
117
120
  }
118
121
  }
119
122
  inputData.fireValuesChanged();
@@ -153,7 +156,7 @@ export class OutliersSelectionViewer extends DG.JsViewer {
153
156
  const updateGroupsDf = () => {
154
157
  if ((inputData.columns as DG.ColumnList).byName(OUTLIER_RATIONALE_COL_LABEL)) {
155
158
  for (let i = 0; i < inputData.rowCount; i++) {
156
- if (inputData.columns.byName(IS_OUTLIER_COL_LABEL).get(i)) {
159
+ if (inputData.columns.byName(IS_OUTLIER_COL_LABEL).get(i) === 'Outlier') {
157
160
  if (inputData.columns.byName(OUTLIER_RATIONALE_COL_LABEL).get(i) === '')
158
161
  (inputData.columns as DG.ColumnList).byName(OUTLIER_RATIONALE_COL_LABEL).set(i, 'Manual', false);
159
162
  } else {