Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
ngOnInit() {
this.collapsed = this.schema.collapsed
this.value = common.getDefaultValue(this.required, this.schema, this.initialValue) as { [name: string]: common.ValueType }
this.validate()
if (this.value !== undefined) {
for (const property in this.schema.properties) {
if (this.schema.properties.hasOwnProperty(property)) {
const schema = this.schema.properties[property]
const propertyName = schema.propertyName || property
if (this.isRequired(property) !== false) {
const required = this.schema.required && this.schema.required.some(r => r === property)
this.value[propertyName] = common.getDefaultValue(required, schema, this.value[propertyName]) as { [name: string]: common.ValueType }
}
this.properties.push({
property,
propertyName,
schema
})
ngOnInit() {
this.value = common.getDefaultValue(this.required, this.schema, this.initialValue) as string
this.updateValue.emit({ value: this.value, isValid: true })
}
ngAfterViewInit() {
beforeMount() {
this.value = common.getDefaultValue(this.required, this.schema, this.initialValue) as boolean
this.$emit('update-value', { value: this.value, isValid: true })
}
addItem() {
this.value!.push(common.getDefaultValue(true, this.schema.items, undefined)!)
this.updateValue.emit({ value: this.value, isValid: !this.errorMessage && this.invalidIndexes.length === 0 })
}
onDeleteFunction(i: number) {
constructor(props: Props) {
super(props)
this.value = common.getDefaultValue(this.props.required, this.props.schema, this.props.initialValue) as number
this.validate()
}
componentDidMount() {
constructor(props: Props) {
super(props)
this.value = common.getDefaultValue(this.props.required, this.props.schema, this.props.initialValue) as { [name: string]: common.ValueType }
this.validate()
if (this.value !== undefined) {
for (const property in this.props.schema.properties) {
if (this.props.schema.properties.hasOwnProperty(property)) {
const schema = this.props.schema.properties[property]
const propertyName = schema.propertyName || property
if (this.isRequired(property) !== false) {
const required = this.props.schema.required && this.props.schema.required.some(r => r === property)
this.value[propertyName] = common.getDefaultValue(required, schema, this.value[propertyName]) as { [name: string]: common.ValueType }
}
this.properties.push({
property,
propertyName,
schema
})
}
constructor(props: Props) {
super(props)
this.value = common.getDefaultValue(this.props.required, this.props.schema, this.props.initialValue) as boolean
}
componentDidMount() {
constructor(props: Props) {
super(props)
this.value = common.getDefaultValue(this.props.required, this.props.schema, this.props.initialValue)
this.monacoEditorRef = React.createRef()
}
private addItem = () => {
this.value!.push(common.getDefaultValue(true, this.props.schema.items, undefined)!)
this.setState({ value: this.value })
this.props.updateValue(this.value, !this.errorMessage && this.invalidIndexes.length === 0)
}
private onChange = (i: number, value: common.ValueType | undefined, isValid: boolean) => {
constructor(props: Props) {
super(props)
this.value = common.getDefaultValue(this.props.required, this.props.schema, this.props.initialValue) as null
}
componentDidMount() {