function defaultFormDefinition(schemaTypes, name, schema, options) {
	const rules = schemaTypes[stripNullType(schema.type)];
	if (rules) {
		let def;
		// We give each rule a possibility to recurse it's children.
		const innerDefaultFormDefinition = (childName, childSchema, childOptions) =>
			defaultFormDefinition(schemaTypes, childName, childSchema, childOptions);
		for (let i = 0; i < rules.length; i++) {
			def = rules[i](name, schema, options, innerDefaultFormDefinition);

			// first handler in list that actually returns something is our handler!
			if (def) {
				// Do we have form defaults in the schema under the x-schema-form-attribute?
				if (def.schema['x-schema-form']) {
					Object.assign(def, def.schema['x-schema-form']);
				}

				return def;
			}
		}
	}
}
/**
 * Creates a default form definition from a schema.
 */
Creates a default form definition from a schema.
Creates a default form definition from a schema .
function defaultFormDefinition(schemaTypes, name, schema, options) {
	const rules = schemaTypes[stripNullType(schema.type)];
	if (rules) {
		let def;
		const innerDefaultFormDefinition = (childName, childSchema, childOptions) =>
			defaultFormDefinition(schemaTypes, childName, childSchema, childOptions);
		for (let i = 0; i < rules.length; i++) {
			def = rules[i](name, schema, options, innerDefaultFormDefinition);
			if (def) {
				if (def.schema['x-schema-form']) {
					Object.assign(def, def.schema['x-schema-form']);
				}
				return def;
			}
		}
	}
}
function defaultFormDefinition ( schemaTypes , name , schema , options ) { const rules = schemaTypes [ stripNullType ( schema . type ) ] ; if ( rules ) { let def ; const innerDefaultFormDefinition = ( childName , childSchema , childOptions ) => defaultFormDefinition ( schemaTypes , childName , childSchema , childOptions ) ; for ( let i = 0 ; i < rules . length ; i ++ ) { def = rules [ i ] ( name , schema , options , innerDefaultFormDefinition ) ; if ( def ) { if ( def . schema [ 'x-schema-form' ] ) { Object . assign ( def , def . schema [ 'x-schema-form' ] ) ; } return def ; } } } }
Creates a default form definition from a schema.
Creates a default form definition from a schema .
// We give each rule a possibility to recurse it's children. // first handler in list that actually returns something is our handler! // Do we have form defaults in the schema under the x-schema-form-attribute?