import * as Survey from "survey-knockout" ; import { SurveyQuestionEditorDefinition , ISurveyQuestionEditorDefinition , } from "./questionEditorDefinition" ; export class SurveyCreatorProperties { private static instanceValue = new SurveyCreatorProperties ( ) ; public static get instance ( ) { return SurveyCreatorProperties . instanceValue ; } public hideCategory ( categoryName ) { var def = SurveyQuestionEditorDefinition . definition ; for ( var key in def ) { var tab = this . getTabFromElementDef ( def [ key ] , categoryName ) ; if ( ! ! tab ) { tab . visible = false ; } } } public hideProperty ( propertyName , objType = undefined ) { } public showProperty ( propertyName , objType = undefined , options = undefined ) { } public moveProperty ( propertyName , objType , options ) { } private changeProperty ( propertyName , objType , options ) { } private getTabFromElementDef ( elDef , tabName ) { if ( ! elDef . tabs ) return null ; for ( var i = 0 ; i < elDef . tabs . length ; i ++ ) { if ( elDef . tabs [ i ] . name == tabName ) return elDef . tabs [ i ] ; } return null ; } } export var creatorProperties = SurveyCreatorProperties . instance ;