@datagrok/hit-triage 1.10.7 → 1.10.9
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/.turbo/turbo-build.log +2 -6
- package/.vscode/settings.json +16 -0
- package/CHANGELOG.md +2 -1
- package/bdd/bdd.config.json +1 -0
- package/bdd/bindings/hit-design.ts +99 -0
- package/bdd/features/hit-design/campaign-column-metadata.feature +61 -0
- package/bdd/generated/hit-design/campaign-column-metadata.test.ts +75 -0
- package/bdd/package.json +1 -0
- package/bdd/tsconfig.json +13 -0
- package/dist/package-test.js +4 -4
- package/dist/package-test.js.map +1 -1
- package/dist/package.js +2 -2
- package/dist/package.js.map +1 -1
- package/package.json +9 -6
- package/src/app/hit-design-app.ts +15 -0
- package/src/app/types.ts +2 -0
- package/tsconfig.json +3 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datagrok/hit-triage",
|
|
3
3
|
"friendlyName": "Hit Triage",
|
|
4
|
-
"version": "1.10.
|
|
4
|
+
"version": "1.10.9",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Davit Rizhinashvili",
|
|
7
7
|
"email": "drizhinashvili@datagrok.ai"
|
|
@@ -18,17 +18,19 @@
|
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@datagrok-libraries/test": "^1.4.1",
|
|
20
20
|
"cash-dom": "8.1.5",
|
|
21
|
+
"datagrok-api": "^1.27.0",
|
|
21
22
|
"rxjs": "6.6.7",
|
|
22
23
|
"typeahead-standalone": "4.14.1",
|
|
23
24
|
"uuid": "^11.1.1",
|
|
24
|
-
"@datagrok-libraries/bio": "^6.0.7",
|
|
25
25
|
"@datagrok-libraries/compute-utils": "^1.47.0",
|
|
26
|
-
"@datagrok-libraries/
|
|
26
|
+
"@datagrok-libraries/bio": "^6.0.8",
|
|
27
27
|
"@datagrok-libraries/utils": "^4.7.9",
|
|
28
|
-
"datagrok-
|
|
28
|
+
"@datagrok-libraries/statistics": "^1.12.15"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@types/uuid": "^9.0.2"
|
|
31
|
+
"@types/uuid": "^9.0.2",
|
|
32
|
+
"@playwright/test": "^1.62.1",
|
|
33
|
+
"@datagrok-libraries/bdd": "^0.1.0"
|
|
32
34
|
},
|
|
33
35
|
"canEdit": [
|
|
34
36
|
"Administrators"
|
|
@@ -74,6 +76,7 @@
|
|
|
74
76
|
"scripts": {
|
|
75
77
|
"build": "grok build",
|
|
76
78
|
"typecheck": "grok tsc --noEmit -p tsconfig.json",
|
|
77
|
-
"lint": "eslint --ext .ts,.tsx src"
|
|
79
|
+
"lint": "eslint --ext .ts,.tsx src",
|
|
80
|
+
"test:bdd": "grok-bdd run"
|
|
78
81
|
}
|
|
79
82
|
}
|
|
@@ -302,6 +302,17 @@ export class HitDesignApp<T extends HitDesignTemplate = HitDesignTemplate> exten
|
|
|
302
302
|
try {this.dataFrame!.changeColumnType(colName, type as DG.COLUMN_TYPE);} catch (e) {console.error(e);}
|
|
303
303
|
});
|
|
304
304
|
}
|
|
305
|
+
// restored before the view binds the table, which subscribes formula columns to recalculation only if it has any
|
|
306
|
+
for (const [colName, tags] of Object.entries(this._campaign?.columnTags ?? {})) {
|
|
307
|
+
const col = this.dataFrame.columns.byName(colName);
|
|
308
|
+
if (!col)
|
|
309
|
+
continue;
|
|
310
|
+
for (const [tag, value] of Object.entries(tags))
|
|
311
|
+
!!tag && !!value && col.setTag(tag, value);
|
|
312
|
+
// the tag alone does not reorder the categories
|
|
313
|
+
if (tags['.category-order'] && col.type === DG.COLUMN_TYPE.STRING)
|
|
314
|
+
col.setCategoryOrder(col.getCategoryOrder());
|
|
315
|
+
}
|
|
305
316
|
//await this.dataFrame.meta.detectSemanticTypes();
|
|
306
317
|
}
|
|
307
318
|
|
|
@@ -1070,6 +1081,9 @@ export class HitDesignApp<T extends HitDesignTemplate = HitDesignTemplate> exten
|
|
|
1070
1081
|
enrichedDf.columns.toList().forEach((col) => columnSemTypes[col.name] = col.semType);
|
|
1071
1082
|
const colTypeMap: {[_: string]: string} = {};
|
|
1072
1083
|
enrichedDf.columns.toList().forEach((col) => colTypeMap[col.name] = col.type);
|
|
1084
|
+
const columnTags: {[_: string]: {[_: string]: string}} = {};
|
|
1085
|
+
for (const col of enrichedDf.columns.toList().filter((col) => !col.name.startsWith('~')))
|
|
1086
|
+
columnTags[col.name] = Object.fromEntries(col.tags);
|
|
1073
1087
|
const sketchStateString = this.campaign?.tilesViewerFormSketch ?? undefined;
|
|
1074
1088
|
|
|
1075
1089
|
const getDefaultPerms = async () => {
|
|
@@ -1103,6 +1117,7 @@ export class HitDesignApp<T extends HitDesignTemplate = HitDesignTemplate> exten
|
|
|
1103
1117
|
filteredRowCount: enrichedDf.filter.trueCount,
|
|
1104
1118
|
savePath: this._filePath,
|
|
1105
1119
|
columnTypes: colTypeMap,
|
|
1120
|
+
columnTags,
|
|
1106
1121
|
tilesViewerFormSketch: sketchStateString,
|
|
1107
1122
|
version: this.version + 1,
|
|
1108
1123
|
authorUserId,
|
package/src/app/types.ts
CHANGED
|
@@ -125,6 +125,8 @@ export type HitDesignMergeConfig = {
|
|
|
125
125
|
export type HitDesignCampaign = Omit<HitTriageCampaign, 'filters' | 'ingest'> & {
|
|
126
126
|
tilesViewerFormSketch?: string,
|
|
127
127
|
mergeConfig?: HitDesignMergeConfig,
|
|
128
|
+
// the CSV table carries no column metadata
|
|
129
|
+
columnTags?: {[colName: string]: {[tag: string]: string}},
|
|
128
130
|
};
|
|
129
131
|
|
|
130
132
|
// todo: probably add some more stuff
|