import * as ko from "knockout" ; import "./default-value.scss" ; import { SurveyPropertyDefaultValueEditor } from "../propertyEditors/propertyDefaultValueEditor" ; const templateHtml = require ( "./default-value.html" ) ; export class PropertyEditorValueViewModel { constructor ( public koSurvey , public resetValue , public resetText , public refreshSurvey , public refreshText , public model , public componentInfo , public koAfterRender , public afterRender ) { afterRender ( ) ; } } ko . components . register ( "svd-property-editor-default-value" , { viewModel : { createViewModel : ( params , componentInfo ) => { const model = params . model ; return new PropertyEditorValueViewModel ( model . koSurvey , model . resetValue , model . resetText , model . refreshSurvey , model . refreshText , model , componentInfo , model . koAfterRender , ( ) => { typeof params . afterRender === "function" && params . afterRender . call ( model , componentInfo ) ; typeof model . koAfterRender === "function" && model . koAfterRender . call ( model , componentInfo ) ; } ) ; } , } , template : templateHtml , } ) ;