Name: bedrock-angular-entity
Owner: Digital Bazaar, Inc.
Description: A bedrock module for displaying and editing entities based on an entity schema
Created: 2017-08-04 20:57:31.0
Updated: 2017-09-09 01:37:18.0
Pushed: 2017-09-20 18:01:52.0
Homepage: null
Size: 15
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
The Bedrock Entity module enables an entity schema to be described using JSON, a UI to be dynamically built from the entity schema, and data to be input based on the UI. The data from the entity data model may then be serialized to a data structure such as JSON-LD using an external process.
entity
-entity-schema="$ctrl.entitySchema"
-entity-model="$ctrl.entityData"
-entity-template="$ctrl.entityTemplate"
-on-change="$ctrl.onSave(entityData)">
-entity>
n example Entity Schema
context': 'https://w3id.org/flexform/v1',
: config.server.baseUri + '/forms/1',
pe: [
'EntitySchema',
'StormwaterSiteForm'
label to display for entity schema
bel: 'Stormwater Site',
tribute: [ ? array of attribute inputs (see below) ? ]
bel: 'Name',
delProperty: 'name',
taType: 'ShortString' // or 'LongString'
bel: 'Age',
delProperty: 'age',
taType: 'Integer' // or 'Decimal' or 'Number'
bel: 'Location',
delProperty: ?location?,
taType: ?Location?,
lueSchema: {
attribute: [{
label: ?Latitude?,
modelProperty: 'latitude',
dataType: 'Decimal'
}, {
label: ?Longitude?,
modelProperty: ?longitude?,
dataType: ?Decimal?
}]
bel: 'Type',
delProperty: 'assetType',
taType: 'ShortString',
tion: [{
label: 'Bioretention',
value: 'BioretentionAsset'
{
label: 'Filter Strip',
value: 'FilterStripAsset'
{
label: 'Infiltration (Basin or Trench)',
value: 'InfiltrationAsset'
{
label: 'Manufactured BMP',
value: 'ManufacturedBmpAsset'
{
label: 'Permeable Pavement',
value: 'PermeablePavementAsset'
{
label: 'Pond (Dry or Wet)',
value: 'PondAsset'
{
label: 'Rooftop Runoff',
value: 'RooftopRunoffAsset'
{
label: 'Sand Filter (Open or Closed)',
value: 'SandFilterAsset'
{
label: 'Underground Detention',
value: 'UndergroundDetentionAsset'
{
label: 'Wetland',
value: 'WetlandAsset'
bel: 'Type',
delProperty: 'pickupOrDelivery',
taType: 'Object',
tion: [{
label: 'Delivery',
valueSchema: {
attribute: [{
label: ?Latitude?,
modelProperty: 'latitude',
dataType: 'Decimal'
}, {
label: ?Longitude?,
modelProperty: ?longitude?,
dataType: ?Decimal?
}]
}, {
label: 'Pickup',
valueSchema: {
label: ?Time?,
attribute: [{
modelProperty: ?pickupTime?,
dataType: ?DateTime?
}]
}
bel: 'Date Implemented',
delProperty: 'implementationDate',
taType: 'Date'
bel: 'Submission Time',
delProperty: 'submitted',
taType: 'Datetime'