UNPKG

@viewdo/dxp-story-cli

Version:

DXP Story Management CLI

328 lines (326 loc) 13.6 kB
{ "$schema": "http://json-schema.org/draft-07/schema#", "name" : "view.DO UI-ML: Input State", "description" : "Settings to create an view.DO UI-ML: State that collects data from user's input.", "type" : "object", "required": ["id", "name", "url", "next","form"], "properties" : { "id": { "name": "Id", "type": "string", "description": "A unique identifier for the state. Used by iVXjs for navigation and CSS styling." }, "name": { "name": "Name", "type": "string", "description": "A human readable name of the state." }, "type": { "name": "Type", "type": "string", "description": "This state's type indicating what kind of state will render to the user.", "enum": [ "video", "html", "input", "navigation" ] }, "url": { "name": "Url", "type": "string", "description": "The url pathname which this state can be found that must be preceded by a /. For example, if the domain name is \"http://www.example.com\" and this state's url is \"/test\" then the url for this state will be \"http://www.example.com/#/test.\"" }, "next": { "type": "array", "name": "Next", "description": "A collection of rules and state Ids that indicate which state this state will go to once an appropriate actions is performed on the state. Each state will have its own action that will trigger a next navigation.", "minLength": 1, "items": { "name": "Next Collection Items", "type": "object", "description": "Indicates which state to go to next based on its stateId and rule", "required": ["stateId"], "properties": { "stateId": { "name": "State ID", "type": "string", "description": "The stateId the user will go to if the rule is evaluated to true or missing." }, "rule": { "name": "Rule", "type": "object", "description": "Supplies the rule information for this experiences rule function to evaluate if this state should be used. If this rule evaluates to 'true', then iVXjs will navigate to the corresponding state.", "required": ["conditions"], "properties": { "conditionOperators": { "name": "Condition Operators", "type": "string", "description": "Indicates how to evaluate the conditions for this rule.", "enum": [ "and", "or", "not" ] }, "conditions": { "name": "Conditions", "type": "array", "description": "The conditions/rules to be evaluate to a boolean.", "items": { "type": "object", "name": "Condition Settings", "description": "The key, value and the evaluator for each of the conditions.", "required": ["key", "is", "value"], "properties": { "key": { "name": "Condition Key", "type": "string", "description": "The key from the experience.data object or a keyword the rule function uses to get the correct data." }, "is": { "name": "Condition Comparer", "type": "string", "description": "The type of comparison this key will be evaluated against the value", "enum": [ "lt", "lte", "gt", "gte", "equals", "notEquals" ] }, "value": { "name": "Condition Value", "type": ["number", "string", "boolean", "integer"], "description": "The value to evaluate the data found in the 'key'." }, "type": { "name": "Condition Type", "type": "string", "description": "Type of comparison. By default, it is input meaning it looks for any data input in the experience object. However, some data modules may use this to indicate a special kind of condition" } } } } } } } } }, "audio": { "type": "object", "name": "State Audio", "description": "All settings for state-wide audio that plays when a user enters the state.", "required": ["src"], "properties": { "src": { "name": "State Audio Source", "type": "string", "description": "The path to the audio for this state." }, "loop": { "name": "Loop", "type": "boolean", "description": "Determines if the state wide audio should repeat if the audio ends." }, "cuePoints": { "type": "array", "name": "State Audio Cue Points", "description": "Events/Actions to fire while a state wide audio plays.", "items": { "type": "object", "name": "State Audio Cue Points Event Data", "description": "Events to fire at a specific time during an audio clip.", "required": ["timeAt"], "properties": { "timeAt": { "name": "Time At", "type": "number", "description": "Time in the audio at which this event should fire." }, "once": { "name": "Once", "type": "boolean", "description": "Indicates that this event should fire once (just in case the audio loops)" }, "eventName": { "name": "State Audio Event Name", "type": "string", "description": "The event to be fired." }, "args": { "name": "State Audio Event Arguments", "type": "object", "description": "Arguments for this event." } } } }, "onEnd": { "name": "On Audio End", "type": "array", "description": "Events to fire when the audio clip is finished." } } }, "header": { "type": "object", "name": "Header", "description": "Contains all the settings for the header which appears before the main section of the state.", "properties": { "templateUrl": { "name": "Header's Template URL Path", "type": "string", "description": "Url path to an external .html file" }, "html": { "name": "Header's HTML", "type": "string", "description": "HTML to be inserted in the header section of the state." }, "classes": { "name": "Header's CSS Class Names", "type": "string", "description": "Classes to add to the header section of this state. Used mostly for injecting classes for ui frameworks." } } }, "section": { "type": "object", "name": "Section", "description": "Contains all the settings for the section (the wrapper around state specific features like forms, links and video", "properties": { "classes": { "name": "Section CSS Class Names", "type": "string", "description": "Classes to be added to the section part of the state. Primarily used for UI frameworks and targeting specific elements." } } }, "footer": { "type": "object", "name": "Footer", "description": "Contains all the settings for the footer which appears after the main section of the state.", "properties": { "templateUrl": { "name": "Footer Template URL Path", "type": "string", "description": "Url path to an external .html file." }, "html": { "name": "Footer HTML", "type": "string", "description": "HTML to be inserted in the footer section of the state." }, "classes": { "name": "Footer CSS Class Names", "type": "string", "description": "Classes to add to the footer section in this state. Used mostly for injecting classes for ui frameworks." } } }, "onEnter": { "name": "On Enter", "type": "array", "description": "A collection of events and actions to run everytime the user loads this state.", "items": { "type": "object", "descriptions": "Event data as defined in the event section of this documentation" } }, "onExit": { "name": "On Exit", "type": "array", "description": "A collection of events and actions to run everytime the user exits this state.", "items": { "type": "object", "descriptions": "Event data as defined in the event section of this documentation" } }, "form" : { "type" : "object", "name" : "Form", "description" : "Style and other content settings for this input state's form.", "properties" : { "classes" : { "name" : "CSS Classes", "type" : "string", "description" : "CSS Classes to add to the form." }, "label" : { "name" : "Form Label", "type" : "string", "description" : "Label\/title to appear before the form." }, "labelHTML" : { "name" : "Form Label HTML", "type" : "string", "description" : "Label\/title's HTML to appear before the form." }, "labelTemplateUrl" : { "name" : "Form Label Template URL", "type" : "string", "description" : "Url path to a template to a HTML label\/title for this form." }, "submit" : { "name" : "Submit Settings", "type" : "object", "description" : "Settings for the submit button", "properties" : { "classes" : { "name" : "Submit Button CSS Classes", "type" : "string", "description" : "Classes to add to the submit button" }, "label" : { "name" : "Submit Button Label", "type" : "string", "description" : "Label string to appear on the submit button" }, "labelHTML" : { "name" : "Submit Button Label HTML", "type" : "string", "description" : "HTML to appear on the submit button" }, "labelTemplateUrl" : { "name" : "Submit Button Lable Template URL", "type" : "string", "description" : "Url path to a template for this label" } } } } }, "onSubmit" : { "name" : "On Submit Actions", "type" : "array", "description" : "An array of event data to run when a user submits the data but before it navigates to the next state.", "items" : { "name" : "On Submit Actions Collection", "type" : "object", "description" : "Event data as defined in the event section of this documentation" } }, "onInputReady" : { "name" : "On Input Ready", "type" : "array", "description" : "An array of event data that runs when the HTML is rendered on the page. Used primarily for animating elements on the DOM", "items" : { "type" : "object", "description" : "Event data as defined in the event section of this documentation" } }, "inputs" : { "name" : "Inputs", "type" : "array", "description" : "All inputs and settings to be shown in this form.", "items" : { "name" : "Inputs Collection", "type" : "object", "description" : "Input information. The settings of which is under the 'input' portion of this documentation" } } } }