Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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
})
}
}
this.properties.sort(common.compare)
}
this.updateValue.emit({ value: this.value, isValid: this.invalidProperties.length === 0 })
}
isRequired(property: string) {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({
propertyName,
property,
schema
})
}
}
this.properties.sort(common.compare)
}
for (const property in this.schema.properties) {
const schema = this.schema.properties[property]
if (schema && schema.requiredWhen && !this.watchedProperties.includes(schema.requiredWhen[0])) {
this.watchedProperties.push(schema.requiredWhen[0])
}
}
this.$emit('update-value', { value: this.value, isValid: true })
}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
})
}
}
this.properties = this.properties.sort(common.compare)
}
}
componentDidMount() {