Global

Members


<constant> DEFAULT_WS_CLIENT_NAME :string

default name of WS client
Type:
  • string
Default Value:
  • "main"

<constant> OPT_CONTROLLER_PREFIX :string

controller names prefix nc aka NotController
Type:
  • string
Default Value:
  • "nc"

<constant> OPT_DEFAULT_ACTION_NAME :string

default action name
Type:
  • string
Default Value:
  • "default"

<constant> OPT_DEFAULT_AUTO_NAME :boolean

if shoould be used auto name generator
Type:
  • boolean
Default Value:
  • true

<constant> OPT_DEFAULT_CONTAINER_SELECTOR :string

selector of container HTML element
Type:
  • string
Default Value:
  • "main.content"

<constant> OPT_DEFAULT_MODULE_NAME :string

default module name
Type:
  • string
Default Value:
  • "main"

<constant> OPT_DEFAULT_PLURAL_NAME :string

default plural name of entities
Type:
  • string
Default Value:
  • "Models"

<constant> OPT_DEFAULT_SINGLE_NAME :string

default single name of entities
Type:
  • string
Default Value:
  • "Model"

<constant> OPT_RECORD_PREFIX :string

record names prefix nr aka NotRecord
Type:
  • string
Default Value:
  • "nr"

Methods


fake()

Creates object that is fake Store Some time this is useful when you need to initialize local var, before you could get actual Stores from central storage by its ID
Returns:
Type
Object

fake()

Creates object that is fake Store Some time this is useful when you need to initialize local var, before you could get actual Stores from central storage by its ID
Returns:
Type
Object

fieldInit(type, mutation, VARIANTS, FIELDS)

Creates field manifest
Parameters:
Name Type Description
type string name/type of the field
mutation Object mutation to manifest from library
VARIANTS Object store which contains named lists of field value variants
FIELDS Object store which contains named lists of field manifests
Returns:
field manifest
Type
Object

initFormByField(form, fieldName, VARIANTS, FIELDS, formFieldsOptions)

Initialization of form structure object
Parameters:
Name Type Description
form object form structure object
fieldName string | Array.<string> name of the field type if string, array of strings = subform
VARIANTS Object store which contains named lists of field value variants
FIELDS Object store which contains named lists of field manifests
formFieldsOptions Object form wide options
Returns:
form structure object
Type
Object

isFieldValid(form, fieldName)

Checks if field has errors
Parameters:
Name Type Description
form Object form structure object
fieldName string name of the field
Returns:
true - valid, false -invalid
Type
boolean

setFieldInvalid(form, fieldName, value, errors)

Marking field as invalid by own validator
Parameters:
Name Type Description
form Object form structure object
fieldName string name of the field
value any value of field
errors Array.<string> list of errors
Returns:
form structure object
Type
Object

setFieldValid(form, fieldName, value)

Marking field as valid by own validator
Parameters:
Name Type Description
form Object form structure object
fieldName string name of the field
value any value of field
Returns:
form structure object
Type
Object

setFormFieldInvalid(form, fieldName, errors)

Form level validator error in this field
Parameters:
Name Type Description
form Object form structure object
fieldName string name of the field
errors Array.<string> list of errors
Returns:
form structure object
Type
Object

setFormFieldValid(form, fieldName)

Form level validator success in this field
Parameters:
Name Type Description
form Object form structure object
fieldName string name of the field
Returns:
form structure object
Type
Object

updateFormValidationStatus(form, validationStatus)

Updates fields and form error labels
Parameters:
Name Type Description
form Object form structure object
validationStatus Object results of validation