@@ -11,7 +11,6 @@ import { createDataHarmonizerContainer, createDataHarmonizerTab } from '../web';
1111import { getExportFormats } from 'schemas' ;
1212import { range as arrayRange } from 'lodash' ;
1313import { deepMerge } from '../lib/utils/objects' ;
14- import Validator from './Validator' ;
1514import i18next from 'i18next' ;
1615
1716import { SchemaEditor } from './SchemaEditor' ;
@@ -38,7 +37,7 @@ export default class AppContext {
3837 console . log ( "this should only be done once" )
3938 // THIS WAS $(document), but that was causing haywire issues with Handsontable!!!!
4039 // Each tab was requiring a double click to fully render its table!!!
41- $ ( '#data-harmonizer-tabs' ) . on ( 'dhTabChange' , ( event , class_name ) => {
40+ $ ( '#data-harmonizer-tabs' ) . on ( 'dhTabChange' , ( ) => {
4241 //if (this.getCurrentDataHarmonizer() !== class_name) {
4342 //this.tabChange(class_name);
4443 //}
@@ -309,7 +308,7 @@ export default class AppContext {
309308 // .inherits[enum1 name, enum2 name, ... , this enum], merging each in order
310309 // such that permissible value labels, descriptions and mappings can be
311310 // overwritten. See https://linkml.io/linkml-model/latest/docs/inherits/
312- Object . entries ( schema . enums || { } ) . forEach ( ( [ enum_name , enum_obj ] ) => {
311+ Object . entries ( schema . enums || { } ) . forEach ( ( [ , enum_obj ] ) => {
313312 if ( enum_obj . inherits ) {
314313 const values = { } ;
315314 enum_obj . inherits . forEach ( inherit_enum_name => {
@@ -377,7 +376,6 @@ export default class AppContext {
377376 const dhId = `data-harmonizer-grid-${ index } ` ;
378377 const tab_label = class_obj . title ? class_obj . title : class_name ;
379378 const dhTab = createDataHarmonizerTab ( dhId , tab_label , class_name , tooltip , index === 0 ) ;
380- const self = this ;
381379
382380 // Future: Change createDataHarmonizerTab() to return jquery dom element id?
383381 dhTab . addEventListener ( 'click' , ( event ) => {
@@ -830,7 +828,6 @@ export default class AppContext {
830828 */
831829 stringifyNestedVocabulary ( vocab_list ) {
832830 let ret = [ ] ;
833- let stack = [ ] ;
834831 for ( const pointer in vocab_list ) {
835832 let choice = vocab_list [ pointer ] ;
836833 this . setExportField ( choice , false ) ; // Move elsewhere?
@@ -1112,14 +1109,14 @@ export default class AppContext {
11121109 // First pass establishes basic attributes so 2nd pass references to
11131110 // .parent or .child don't matter, i.e. classes can be processed in
11141111 // any order.
1115- Object . entries ( schema . classes ) . forEach ( ( [ class_name , class_obj ] ) => {
1112+ Object . entries ( schema . classes ) . forEach ( ( [ class_name ] ) => {
11161113 if ( class_name != 'Container' && class_name != 'dh_interface' ) {
11171114 relations [ class_name ] = {
11181115 parent : { } ,
11191116 child : { } ,
11201117 dependent_slots : { } ,
11211118 foreign_key_count : 0 ,
1122- target_slots : { } ,
1119+ target_slots : { } ,
11231120 unique_key_slots : { }
11241121 } ;
11251122 }
@@ -1286,7 +1283,6 @@ export default class AppContext {
12861283 let class_dependents = this . relations [ class_name ] . dependents ;
12871284 for ( let [ dependent_name ] of class_dependents . entries ( ) ) {
12881285 this . setDHTabStatus ( dependent_name ) ;
1289- const dh = this . dhs [ dependent_name ] ;
12901286 } ;
12911287 } ;
12921288
@@ -1441,7 +1437,7 @@ export default class AppContext {
14411437 * @param {Object } changes dictionary pertaining to a particular dh row's slots.
14421438 * @return {Object } this.dependent_rows updated table of given start_name class's foreign and other keys and their current and changed values
14431439 */
1444- crudGetDependentRows ( start_name , skippable = false , changes = { } ) {
1440+ crudGetDependentRows ( start_name , _skippable = false , changes = { } ) {
14451441 // Changes only apply to start_name class; all dependents should "see" them
14461442 // only via dependent_rows foreign key values.
14471443 let [ key_vals , fkey_vals , fkey_status ] =
@@ -1450,8 +1446,8 @@ export default class AppContext {
14501446 // Changes may include any key slots (not just foreign keys), but other
14511447 // slots are ignored.
14521448 let changed_keys = Object . fromEntries ( Object . entries ( key_vals )
1453- . filter ( ( [ slot_name , value ] ) => changes . hasOwnProperty ( slot_name ) )
1454- . map ( ( [ slot_name , value ] ) => ( [ slot_name , changes [ slot_name ] . value ] ) )
1449+ . filter ( ( [ slot_name ] ) => changes . hasOwnProperty ( slot_name ) )
1450+ . map ( ( [ slot_name ] ) => ( [ slot_name , changes [ slot_name ] . value ] ) )
14551451 ) ;
14561452
14571453 this . dependent_rows . set ( start_name , {
@@ -1549,7 +1545,7 @@ export default class AppContext {
15491545 // are included in the cascade report even when only the top-level
15501546 // ancestor (e.g. Schema) is selected.
15511547 let search_vals = Object . fromEntries (
1552- Object . entries ( fkey_vals ) . filter ( ( [ k , v ] ) => v !== null )
1548+ Object . entries ( fkey_vals ) . filter ( ( [ , v ] ) => v !== null )
15531549 ) ;
15541550 let rows = this . crudFindAllRowsByKeyVals ( class_name , search_vals ) ;
15551551 if ( rows . length ) {
@@ -1594,7 +1590,7 @@ export default class AppContext {
15941590 * @return {Object } changed_key_vals by slot_name of key values that are changing (and need to be updated)
15951591 * @return {Boolean } key_status = integer
15961592 */
1597- crudGetDependentKeyVals ( class_name , changes ) {
1593+ crudGetDependentKeyVals ( class_name , _changes ) {
15981594 const class_dh = this . dhs [ class_name ] ;
15991595 let fkey_vals = { } ;
16001596 let key_vals = { } ;
@@ -1814,8 +1810,8 @@ export default class AppContext {
18141810 // controlled by dependent CRUD create and update actions.
18151811 crudMakeForeignKeysReadOnly ( dh , class_name ) {
18161812 Object . entries ( this . crudGetParents ( class_name ) ) . forEach (
1817- ( [ parent_name , parent ] ) => {
1818- Object . entries ( parent ) . forEach ( ( [ slot_name , foreign_name ] ) => {
1813+ ( [ , parent ] ) => {
1814+ Object . entries ( parent ) . forEach ( ( [ slot_name ] ) => {
18191815 let col = dh . slot_name_to_column [ slot_name ] ;
18201816 if ( dh . slots [ col ] . required ) {
18211817 dh . updateColumnSettings ( col , { readOnly : true } ) ;
@@ -1848,7 +1844,7 @@ export default class AppContext {
18481844 let changed = false ;
18491845 let complete = Object . entries ( key_obj . unique_key_slots )
18501846 // If every slot has a value, then the whole key is complete.
1851- . every ( ( [ index , slot_name ] ) => {
1847+ . every ( ( [ , slot_name ] ) => {
18521848 // Key has a changed value (incl. null?), so update it.
18531849 if ( slot_name in changes ) {
18541850 changed = true ; // signals that a change has been made to key.
0 commit comments