@@ -26,11 +26,13 @@ import { FButton } from '../../f-components/f-button/f-button';
26
26
import { KupLanguageGeneric } from '../../managers/kup-language/kup-language-declarations' ;
27
27
import {
28
28
FCellProps ,
29
- FCellShapes ,
29
+ FCellTypes ,
30
30
} from '../../f-components/f-cell/f-cell-declarations' ;
31
31
import { FTextFieldMDC } from '../../f-components/f-text-field/f-text-field-mdc' ;
32
32
import { FCell } from '../../f-components/f-cell/f-cell' ;
33
+ import { KupDom } from '../../managers/kup-manager/kup-manager-declarations' ;
33
34
35
+ const dom : KupDom = document . documentElement as KupDom ;
34
36
@Component ( {
35
37
tag : 'kup-input-panel' ,
36
38
styleUrl : 'kup-input-panel.scss' ,
@@ -187,16 +189,17 @@ export class KupInputPanel {
187
189
const options = cell . options ;
188
190
const fieldLabel = col . title ;
189
191
const currentValue = cell . value ;
190
-
191
- const dataAdapterMap = new Map < FCellShapes , DataAdapterFn > ( [
192
- [ FCellShapes . AUTOCOMPLETE , this . #CMBandACPAdapter] ,
193
- [ FCellShapes . CHECKBOX , this . #CHKAdapter] ,
194
- [ FCellShapes . COLOR_PICKER , this . #CLPAdapter] ,
195
- [ FCellShapes . COMBOBOX , this . #CMBandACPAdapter] ,
196
- [ FCellShapes . TEXT_FIELD , this . #ITXAdapter] ,
192
+ const cellType = dom . ketchup . data . cell . getType ( cell , cell . shape ) ;
193
+
194
+ const dataAdapterMap = new Map < FCellTypes , DataAdapterFn > ( [
195
+ [ FCellTypes . AUTOCOMPLETE , this . #CMBandACPAdapter] ,
196
+ [ FCellTypes . CHECKBOX , this . #CHKAdapter] ,
197
+ [ FCellTypes . COLOR_PICKER , this . #CLPAdapter] ,
198
+ [ FCellTypes . COMBOBOX , this . #CMBandACPAdapter] ,
199
+ [ FCellTypes . STRING , this . #ITXAdapter] ,
197
200
] ) ;
198
201
199
- const adapter = dataAdapterMap . get ( cell . shape ) ;
202
+ const adapter = dataAdapterMap . get ( cellType ) ;
200
203
201
204
return adapter ? adapter ( options , fieldLabel , currentValue ) : null ;
202
205
}
0 commit comments