-
decode
-
Decodes to UTF-8 string
- Source:
-
Property/Base64.js
-
atob
-
Decodes to bytes, which is compatible with browser's built-in atob()
(Which is absent in node)
- Source:
-
Property/Base64.js
-
parse
-
Parses value to moment object
- Source:
-
Property/Date.js
-
parse
-
Parses value to float
- Source:
-
Property/Float.js
-
isValid
-
Validates a JSON string
- Source:
-
Property/Json.js
-
getAsHtmlSafe
-
Utility function - gets the JSON string in a way that is safe to display in HTML.
i.e. It enables us to show a JSON string in HTML *without its contents being interpreted as HTML*
- Source:
-
Property/Json.js
-
<inner> name :string
-
Could be anything, but OneHat's convention is to use
the model name pluralized and underscored, followed by two underscores,
followed by the field name singular and underscored (e.g. 'groups_users__id')
This convention allows us to have multiple models' data in a single Entity, all flattened
Type:
- Source:
-
Property/Property.js
-
<inner> allowNull :boolean
-
Is the property required to have a value?
Defaults to true.
Type:
- Source:
-
Property/Property.js
-
<inner> submitAsString :boolean
-
Whether to submit value as a string, rather than a primitive or complex type
Type:
- Source:
-
Property/Property.js
-
<inner> isSortable :boolean
-
Whether this property type is sortable
Type:
- Source:
-
Property/Property.js
-
<inner> rawValue :any
-
The raw value supplied to this property, *before* any parsing was applied
Type:
- Source:
-
Property/Property.js
-
<inner> parsedValue :any
-
The value for this property, *after* any parsing was applied
Type:
- Source:
-
Property/Property.js
-
getRawValue
-
Gets "raw" value, prior to any parsing
- Source:
-
Property/Property.js
-
getParsedValue
-
Gets "parsed" value, without any formatting applied
- Source:
-
Property/Property.js
-
getSubmitValue
-
Gets parsed value, formatted for submission to server
- Source:
-
Property/Property.js
-
submitValue
-
Gets parsed value, formatted for submission to server
- Source:
-
Property/Property.js
-
getDisplayValue
-
Gets parsed value, formatted for displaying to user
- Source:
-
Property/Property.js
-
displayValue
-
Gets parsed value, formatted for displaying to user
- Source:
-
Property/Property.js
-
hasMapping
-
Gets whether or not the Property has a mapping.
Used by Entity.
- Source:
-
Property/Property.js
-
hasDepends
-
Gets whether or not the Property depends on any other properties
for its local "parse" function.
Used by Entity.
- Source:
-
Property/Property.js
-
isIdProperty
-
Gets whether or not the Property is an "ID" property for the Entity it's assigned to
- Source:
-
Property/Property.js
-
isDisplayProperty
-
Gets whether or not the Property is a "Display" property for the Entity it's assigned to
- Source:
-
Property/Property.js
-
setValue
-
Sets the parsedValue for this Property.
Any mapping for this property has already taken place.
i.e. The rawValue to parse *is the mapped value.*
- Source:
-
Property/Property.js
-
parse
-
Performs the actual parsing conversion, but *does not* set anything on the property.
Default function. Meant to be overridden with subclass.
- Source:
-
Property/Property.js
-
setSubmitAsString
-
Sets value of submitAsString
- Source:
-
Property/Property.js
-
getEntity
-
Gets the Entity object
- Source:
-
Property/Property.js
-
getClassName
-
Gets the className of this Property type.
- Source:
-
Property/Property.js
-
destroy
-
Destroy this object.
- Removes all circular references to parent objects
- Removes child objects
- Removes event listeners
- Source:
-
Property/Property.js
-
parse
-
Parses value to string.
- Strings will pass through unaltered.
- Numbers and Booleans will be converted to strings.
- Other types will return null.
- Source:
-
Property/String.js
-
newId
-
Generates a new UUID
- Source:
-
Property/Uuid.js
-
isValid
-
Validates a UUID
- Source:
-
Property/Uuid.js
-
isEmpty
-
Determines whether a given UUID is empty (i.e. all zeros)
- Source:
-
Property/Uuid.js