@@ -1214,7 +1214,7 @@ class DataHarmonizer {
1214
1214
default :
1215
1215
value = schema [ dep_slot . name ] ??= '' ;
1216
1216
}
1217
- console . log ( "loadschema" , focus_row , dep_col , value ) ;
1217
+ console . log ( "loadschema" , focus_row , dep_col , value ) ;
1218
1218
this . hot . setDataAtCell ( focus_row , parseInt ( dep_col ) , value , 'upload' ) ;
1219
1219
}
1220
1220
}
@@ -1297,20 +1297,27 @@ class DataHarmonizer {
1297
1297
reference : value // In this case value is a string
1298
1298
} ) ;
1299
1299
break ;
1300
+
1300
1301
case 'Setting' :
1301
1302
this . addRowRecord ( dh , tables , {
1302
1303
schema_id : loaded_schema_name ,
1303
1304
name : item_name ,
1304
1305
value : value // In this case value is a string
1305
1306
} ) ;
1306
1307
break ;
1308
+
1307
1309
case 'Extension' :
1308
1310
// FUTURE: make this read-only?
1311
+ // Each locale entry gets copied to the Extension table/class in a shallow way
1312
+ // But also gets copied to the schema locales table held in first cell
1313
+ // See "if (locales)" condition above.
1314
+ // FUTURE: revise this so Extension's cell metadata holds it?
1309
1315
this . addRowRecord ( dh , tables , {
1310
1316
schema_id : loaded_schema_name ,
1311
1317
name : item_name ,
1312
1318
value : value // In this case value is a string or object. It won't be renderable via DH
1313
1319
} ) ;
1320
+
1314
1321
break ;
1315
1322
1316
1323
case 'Enum' :
@@ -1644,19 +1651,16 @@ class DataHarmonizer {
1644
1651
uri : 'xsd:token'
1645
1652
}
1646
1653
} ,
1647
- settings : {
1648
- //Title_Case: "(((?<=\\b)[^a-z\\W]\\w*?|[\\W])+)",
1649
- //UPPER_CASE: "[A-Z\\W\\d_]*",
1650
- //lower_case: "[a-z\\W\\d_]*"
1651
- } ,
1654
+ settings : { } ,
1652
1655
extensions : { }
1653
1656
}
1654
1657
1655
1658
// Loop through loaded DH schema and all its dependent child tabs.
1656
1659
let components = [ 'Schema' , ... Object . keys ( this . context . relations [ 'Schema' ] . child ) ] ;
1657
1660
for ( let [ ptr , tab_name ] of components . entries ( ) ) {
1658
- // For Schema, key slot is 'name'; for all other tables it is 'schema_id'
1659
- let schema_key_slot = ( tab_name === 'Schema' ? 'name' : 'schema_id' ) ;
1661
+ // For Schema, key slot is 'name'; for all other tables it is
1662
+ // 'schema_id' which has a foreign key relationship to schema
1663
+ let schema_key_slot = ( tab_name === 'Schema' ) ? 'name' : 'schema_id' ;
1660
1664
let rows = this . context . crudFindAllRowsByKeyVals ( tab_name , { [ schema_key_slot ] : schema_name } )
1661
1665
let dependent_dh = this . context . dhs [ tab_name ] ;
1662
1666
@@ -1681,7 +1685,6 @@ class DataHarmonizer {
1681
1685
break ;
1682
1686
case 'xsd:boolean' :
1683
1687
value = [ 't' , 'true' , '1' , 'yes' , 'y' ] . includes ( value . toLowerCase ( ) ) ;
1684
- console . log ( 'after' , value )
1685
1688
break ;
1686
1689
}
1687
1690
0 commit comments