App.Constants

App.Constants

The App.Constants module contains various constants

Members

(static) ActionTypes :Object

What Action types are currently supported

Type:
  • Object
Example
App.Constants.ActionTypes = {
  DATA_RECEIVED: "DATA_RECEIVED",
  OBJECT_SELECTED: "OBJECT_SELECTED",
  OBJECT_EDITED: "OBJECT_EDITED",
  OBJECT_UPDATED: "OBJECT_UPDATED",
  OBJECT_CREATED: "OBJECT_CREATED"
};

(static) Boolean

Constants map to boolean value

Example
App.Constants.Boolean = {
    TRUE: true,
    FALSE: false
}

(static) BrowserEvents

Example
App.Constants.BrowserEvents = {
    CLICK: 'click',
    DOUBLE_CLICK: 'dblclick',
    RESIZE: 'resize',
    RESIZE_STOP: 'resizestop',
    CHANGE: 'change',
    BEFORE_UNLOAD: 'beforeunload',
    KEY_DOWN: 'keydown',
    KEY_UP: 'keyup',
    MOUSE_DOWN: 'mousedown',
    MOUSE_UP: 'mouseup',
    MOUSE_MOVE: 'mousemove',
    MOUSE_ENTER: 'mouseenter',
    REMOVE: 'remove',
    HOVER: 'hover'
}

(static) DATA_TYPES :Object

Map of data type codes to human readable format

Type:
  • Object
Example
App.Constants.DATA_TYPES = {
  0: "unknown",
  1: "bool",
  2: "datetime",
  4: "int",
  8: "real",
  16: "string"
};

(static) EMPTY_STRING

Generic constants, reusable from several contexts

(static) EventKeys

Key names used in JS events. For example, it is used for keyUp and keyDown events.

Example
App.Constants.EventKeys = {
    Enter: 'Enter',
    Escape: 'Escape',
    Backspace: 'Backspace'
}

(static) Events

Custom events used by the application

(static) FieldDataTypes

Constants related to form field data type

Example
App.Constants.FieldDataTypes = {
    STRING: 'string',
    INTEGER: 'integer',
    DECIMAL: 'decimal',
    DATE: 'date',
    DATETIME: 'datetime',
    USER: 'user',
    BOOLEAN: 'boolean'
}

(static) FilesFieldIcon

Map of file type and icon

Example
App.Constants.FilesFieldIcon = {
   pdf: 'pdf',
   doc: 'word',
   docx: 'word',
   xsl: 'excel',
   xslx: 'excel',
   xml: 'code',
   txt: 'alternate',
   zip: 'archive',
   rar: 'archive',
   ppt: 'powerpoint',
   pptx: 'powerpoint',
};

(static) Form

Constants related to Form Field

(static) FormDataTypes :Object

Map of data type codes to human readable format for form

Type:
  • Object
Example
App.Constants.FormDataTypes = {
  1: "boolean",
};

(static) Int

Constants related to Integer type

Example
App.Constants.Int = {
    ZERO: 0,
    MINUS_ONE: -1
}

(static) JS_VARIABLE_TYPES :Object

JavaScript variable types

Type:
  • Object
Example
App.Constants.JS_VARIABLE_TYPES = {
  FUNCTION: 'function',
  BOOLEAN: 'boolean',
  UNDEFINED: 'undefined',
  OBJECT: 'Object'
};

(static) Operators

Constants related to mathematical and logical operators

(static) PublishEvents

PublishSubscriber events used by the application

(static) RegEx

RegEx patterns

(static) Search

Constants related to Search

(static) SearchEvents

Constants related to search events

Example
App.Constants.SearchEvents = {
    SAVE_SEARCH: 'saveSearch',
    LOAD_SEARCH: 'loadSearch',
    DELETE_SEARCH: 'deleteSearch'
}

(static) String

Constants related to String type

Example
App.Constants.String = {
    EMPTY: '',
    COMMA: ',',
    UNDERSCORE: '_',
    SPACE:' ',
    DECIMAL_POINT: '.'
}

(static) SWActionTypes

Action types handled by Service Worker

Example
App.Constants.SWActionTypes = {
    CLEAR_CACHE: 'clearCache',
    CLEAR_CACHE_ALL: 'clearCacheAll'
}

(static) Toolbar

Example
App.Constants.Toolbar = {
    VERTICAL_TOOLBAR_CLASS: 'has-vertical-toolbar',
    HORIZONTAL_TOOLBAR_CLASS: 'has-horizontal-toolbar'
}