Skip to content
This repository has been archived by the owner on Mar 25, 2022. It is now read-only.

Latest commit

 

History

History
74 lines (45 loc) · 2.19 KB

src-exo-core_ExoFormSchema.md

File metadata and controls

74 lines (45 loc) · 2.19 KB

Module exo/core/ExoFormSchema

category:other

Source file

Class ExoFormSchema

Hosts the XO form json/js form schema and manages its state

Methods

read(value) ► ExoFormSchema

modifier: private modifier: static

Reads the given schema

Parameters Type Description
value Any the string, JS- or JSON literal to read
return ExoFormSchema the parsed schema

query(matcher, options) ► array

modifier: private

query all fields using matcher and return matches

Parameters Type Description
matcher function function to use to filter
options object query options. e.g. {inScope: true} for querying only fields that are currenttly in scope.
return array - All matched fields in the current ExoForm schema

update(name, schema)

modifier: private

Updates the schema of a field in the ExoForm Schema in place.

Parameters Type Description
name * name of the field to update
schema * new field schema

insertBefore(ctl, beforeCtl) ► ExoFormSchema

modifier: private

Moves field to new position and returns the modified form schema

Parameters Type Description
ctl ExoControlBase control to move to new position
beforeCtl ExoControlBase control to insert the control before - null to append at end
return ExoFormSchema - modified schema

Members

Name Type Description
controls undefined Controls section for form navigation
mappings undefined UI mappings - used when JSON Schema is used and only UI mapping is needed