import * as ko from "knockout" ; import "./strings.scss" ; import { SurveyPropertyStringsEditor } from "../propertyEditors/propertyModalEditor" ; const templateHtml = require ( "./strings.html" ) ; export class PropertyEditorStringsViewModel { constructor ( public koTextValue , public readOnly , public displayName , public koDisplayError , public koErrorText , public onKeydown , public afterRender ) { afterRender ( ) ; } } ko . components . register ( "svd-property-editor-strings" , { viewModel : { createViewModel : ( params , componentInfo ) => { const model = params . model ; return new PropertyEditorStringsViewModel ( model . koTextValue , model . readOnly , model . displayName , model . koDisplayError , model . koErrorText , model . onInputKeydown , ( ) => { typeof params . afterRender === "function" && params . afterRender . call ( model , componentInfo ) ; typeof model . koAfterRender === "function" && model . koAfterRender . call ( model , componentInfo ) ; } ) ; } , } , template : templateHtml , } ) ;