@@ -7,18 +7,18 @@ import 'jquery-ui/dist/themes/base/jquery-ui.css';
7
7
8
8
import i18next from 'i18next' ;
9
9
import { utils as XlsxUtils , read as xlsxRead } from 'xlsx/xlsx.js' ;
10
- import { renderContent , urlToClickableAnchor } from '@/lib /utils/content' ;
11
- import { readFileAsync , updateSheetRange } from '@ /lib/utils/files' ;
12
- import { findSlotNamesForClass } from '@ /lib/utils/templates' ;
10
+ import { renderContent , urlToClickableAnchor } from '. /utils/content' ;
11
+ import { readFileAsync , updateSheetRange } from '.. /lib/utils/files' ;
12
+ import { findSlotNamesForClass } from '.. /lib/utils/templates' ;
13
13
import {
14
14
isValidHeaderRow ,
15
15
rowIsEmpty ,
16
16
wait ,
17
17
stripDiv ,
18
18
isEmptyUnitVal ,
19
19
pascalToLowerWithSpaces ,
20
- } from '@ /lib/utils/general' ;
21
- import { invert , deepMerge , looseMatchInObject } from '@ /lib/utils/objects' ;
20
+ } from '.. /lib/utils/general' ;
21
+ import { invert , deepMerge , looseMatchInObject } from '.. /lib/utils/objects' ;
22
22
23
23
import {
24
24
changeCase ,
@@ -31,40 +31,42 @@ import {
31
31
MULTIVALUED_DELIMITER ,
32
32
parseMultivaluedValue ,
33
33
titleOverText ,
34
- } from '@/lib /utils/fields' ;
34
+ } from '. /utils/fields' ;
35
35
36
36
import {
37
37
checkProvenance ,
38
38
itemCompare ,
39
39
validateValAgainstVocab ,
40
40
validateValsAgainstVocab ,
41
41
// validateUniqueValues,
42
- } from '@/lib /utils/validation' ;
42
+ } from '. /utils/validation' ;
43
43
44
44
import 'handsontable/dist/handsontable.full.css' ;
45
- import '@/lib /data-harmonizer.css' ;
45
+ import '. /data-harmonizer.css' ;
46
46
import '@selectize/selectize/dist/css/selectize.bootstrap4.css' ;
47
47
48
- import specifyHeadersModal from '@/lib /specifyHeadersModal.html' ;
49
- import unmappedHeadersModal from '@/lib /unmappedHeadersModal.html' ;
50
- import fieldDescriptionsModal from '@/lib /fieldDescriptionsModal.html' ;
48
+ import specifyHeadersModal from '. /specifyHeadersModal.html' ;
49
+ import unmappedHeadersModal from '. /unmappedHeadersModal.html' ;
50
+ import fieldDescriptionsModal from '. /fieldDescriptionsModal.html' ;
51
51
52
- import HelpSidebar from '@/lib /HelpSidebar' ;
52
+ import HelpSidebar from '. /HelpSidebar' ;
53
53
54
54
// NOTE: this is odd! package.json is a developer file. why should a UI component care about it?
55
- import pkg from '@ /package.json' ;
56
- import Validator from '@/lib /Validator' ;
55
+ import pkg from '.. /package.json' ;
56
+ import Validator from '. /Validator' ;
57
57
58
58
const VERSION = pkg . version ;
59
59
const VERSION_TEXT = 'DataHarmonizer v' + VERSION ;
60
60
61
- import { DateEditor , DatetimeEditor , TimeEditor } from '@/lib/editors' ;
62
61
import {
62
+ DateEditor ,
63
+ DatetimeEditor ,
64
+ TimeEditor ,
63
65
KeyValueListEditor ,
64
66
keyValueListValidator ,
65
67
keyValueListRenderer ,
66
68
multiKeyValueListRenderer ,
67
- } from '@/lib /editors' ;
69
+ } from '. /editors' ;
68
70
69
71
Handsontable . cellTypes . registerCellType ( 'key-value-list' , {
70
72
editor : KeyValueListEditor ,
@@ -2236,7 +2238,7 @@ class DataHarmonizer {
2236
2238
// if sources exist, fetch transformed Value
2237
2239
if ( field . sources ) {
2238
2240
if ( field . multivalued === true ) {
2239
- //Map list of semicolon-delimited choices
2241
+ // Map list of semicolon-delimited choices
2240
2242
// ISSUE: relying on semicolon delimiter in input
2241
2243
for ( let cellVal of mappedCellVal . split ( ';' ) ) {
2242
2244
mappedCell . push (
@@ -2655,7 +2657,6 @@ class DataHarmonizer {
2655
2657
if ( number >= 0 ) {
2656
2658
// Here we have the 3 field call, with units sandwitched in the middle
2657
2659
if ( binOffset === 2 ) {
2658
-
2659
2660
const unit = matrix [ row ] [ hotRowNextCol ] ;
2660
2661
// Host age unit is interpreted by default to be year.
2661
2662
// If user selects month, value is converted into years for binning.
@@ -2693,7 +2694,7 @@ class DataHarmonizer {
2693
2694
const bin_values = fields [ hotRowBinCol ] . flatVocabulary ;
2694
2695
if ( value in bin_values && ( ! bin_value || bin_value === '' ) ) {
2695
2696
selection = value ;
2696
- console . log ( " no bin value" , value ) ;
2697
+ console . log ( ' no bin value' , value ) ;
2697
2698
}
2698
2699
// If a unit field exists, then set that to metadata too.
2699
2700
if ( binOffset == 2 ) {
@@ -2742,7 +2743,7 @@ class DataHarmonizer {
2742
2743
doPreValidationRepairs ( data ) {
2743
2744
return new Promise ( ( resolve ) => {
2744
2745
const cellChanges = [ ] ;
2745
- const whitespace_minimized_re = new RegExp ( / \s + / , 'g' ) ;
2746
+ const whitespace_minimized_re = new RegExp ( / \s + / , 'g' ) ;
2746
2747
let fullVersion =
2747
2748
VERSION_TEXT +
2748
2749
', ' +
@@ -2762,15 +2763,16 @@ class DataHarmonizer {
2762
2763
const datatype = field . datatype ;
2763
2764
2764
2765
if ( cellVal && datatype === 'xsd:token' ) {
2765
-
2766
- const minimized = cellVal . replace ( whitespace_minimized_re , ' ' ) . trim ( ) ;
2766
+ const minimized = cellVal
2767
+ . replace ( whitespace_minimized_re , ' ' )
2768
+ . trim ( ) ;
2767
2769
// Update cellVal in advance of validateVal(s) below
2768
2770
if ( minimized !== cellVal ) {
2769
2771
cellVal = minimized ;
2770
2772
data [ row ] [ col ] = cellVal ;
2771
2773
cellChanges . push ( [ row , col , minimized , 'thisChange' ] ) ;
2772
2774
}
2773
- } ;
2775
+ }
2774
2776
2775
2777
if ( datatype === 'Provenance' ) {
2776
2778
checkProvenance ( cellChanges , fullVersion , cellVal , row , col ) ;
0 commit comments