Skip to content

Commit

Permalink
Migration to visyn_core (#107)
Browse files Browse the repository at this point in the history
* Switch branches

* Migration to visyn_core

* Fix import

* Fix error

* Update deps

---------

Co-authored-by: Michael Puehringer <[email protected]>
  • Loading branch information
oltionchampari and puehringer authored Mar 1, 2023
1 parent 8a52969 commit 76c9ba4
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"vega-functions": "5.12.0",
"vega-lite": "5.1.1",
"vega-parser": "6.1.3",
"visyn_scripts": "git+ssh://[email protected]/datavisyn/visyn_scripts#develop",
"visyn_scripts": "git+ssh://[email protected]/datavisyn/visyn_scripts.git#develop",
"xxhashjs": "^0.2.2"
},
"visyn": {
Expand Down
5 changes: 3 additions & 2 deletions src/phovea.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
* Copyright (c) The Caleydo Team. All rights reserved.
* Licensed under the new BSD license, available at http://caleydo.org/license
**************************************************************************** */
import { IRegistry } from 'tdp_core';

import { IRegistry } from 'visyn_core';
import { EP_TDP_CORE_LINEUP_PANEL_TAB, IPanelTabExtensionDesc } from 'tdp_core';

export default function (registry: IRegistry) {
Expand All @@ -14,7 +15,7 @@ export default function (registry: IRegistry) {
EP_TDP_CORE_LINEUP_PANEL_TAB,
'statisticalAnalysisPanel',
function () {
return import('./app/TouringPanel').then((m) => m.TouringPanel);
return import('./app/TouringPanel.js').then((m) => m.TouringPanel);
},
<IPanelTabExtensionDesc>{
cssClass: 'statistical-analysis-tab',
Expand Down
2 changes: 1 addition & 1 deletion src/phovea_registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Licensed under the new BSD license, available at http://caleydo.org/license
**************************************************************************** */

import { PluginRegistry } from 'tdp_core';
import { PluginRegistry } from 'visyn_core';
import reg from './phovea';

/**
Expand Down
3 changes: 2 additions & 1 deletion src/tasks/ATouringTask.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import * as $ from 'jquery';
import * as d3v3 from 'd3v3';
import 'select2';
import { LocalDataProvider, IColumnDesc, CategoricalColumn, ICategoricalColumnDesc, Column } from 'lineupjs';
import { IServerColumn, UniqueIdManager } from 'tdp_core';
import { IServerColumn } from 'visyn_core';
import { UniqueIdManager } from 'tdp_core';
import { IMeasureResult, ISimilarityMeasure, ISetParameters } from '../base/interfaces';
import { SCOPE } from '../base/constants';
import { RankingAdapter } from './RankingAdapter';
Expand Down
2 changes: 1 addition & 1 deletion src/tasks/ColumnComparisonTask.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as XXH from 'xxhashjs';
import { cloneDeep } from 'lodash';
import { IColumnDesc } from 'lineupjs';
import { IServerColumn } from 'tdp_core';
import { IServerColumn } from 'visyn_core';
import colCmpHtml from '../templates/ColumnComparison.html'; // webpack imports html to variable
import colCmpIcon from '../assets/colCmp.png';

Expand Down
2 changes: 1 addition & 1 deletion src/tasks/RowComparisonTask.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as $ from 'jquery';
import * as d3v3 from 'd3v3';
import * as XXH from 'xxhashjs';
import { IColumnDesc, ICategoricalColumnDesc, ICategory } from 'lineupjs';
import { IServerColumn } from 'tdp_core';
import { IServerColumn } from 'visyn_core';
import rowCmpHtml from '../templates/RowComparison.html'; // webpack imports html to variable
import rowCmpIcon from '../assets/rowCmp.png';

Expand Down
6 changes: 4 additions & 2 deletions src/tasks/TaskUtils.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as d3v3 from 'd3v3';
import { IColumnDesc } from 'lineupjs';
import { IServerColumn, UniqueIdManager } from 'tdp_core';
import { IServerColumn } from 'visyn_core';
import { UniqueIdManager } from 'tdp_core';
import { RankingAdapter } from './RankingAdapter';

export class TaskUtils {
Expand Down Expand Up @@ -28,7 +29,8 @@ export class TaskUtils {
});
return cp.map((n: any) => TaskUtils.deepCopy<any>(n)) as any;
}
if (typeof target === 'object' && target !== {}) {
// not an empty object
if (typeof target === 'object' && Object.keys(target).length > 0) {
const cp = { ...(target as { [key: string]: any }) } as { [key: string]: any };
Object.keys(cp).forEach((k) => {
cp[k] = TaskUtils.deepCopy<any>(cp[k]);
Expand Down

0 comments on commit 76c9ba4

Please sign in to comment.