@nova-ui/bits
Version:
SolarWinds Nova Framework
167 lines (165 loc) • 6.17 kB
JSON
{
"$id": "SchematicsNovaListComponent",
"$schema": "http://json-schema.org/schema",
"description": "Adds a list",
"properties": {
"path": {
"type": "string",
"format": "path",
"description": "The path at which to create the component file, relative to the current workspace. Default is a folder with the same name as the component in the project root.",
"visible": false
},
"project": {
"type": "string",
"description": "The name of the project",
"$default": {
"$source": "projectName"
}
},
"name": {
"type": "string",
"description": "The name of the component",
"$default": {
"$source": "argv",
"index": 0
},
"x-prompt": "What name would you like to use for the component?"
},
"prefix": {
"type": "string",
"description": "The prefix to apply to the generated component selector",
"alias": "p",
"oneOf": [
{
"maxLength": 0
},
{
"minLength": 1,
"format": "html-selector"
}
]
},
"flat": {
"type": "boolean",
"description": "When true, creates the new files at the top level of the current project",
"default": false
},
"skipImport": {
"type": "boolean",
"description": "When true, does not import this component into the owning NgModule",
"default": false
},
"selector": {
"type": "string",
"format": "html-selector",
"description": "The HTML selector to use for this component"
},
"module": {
"type": "string",
"description": "The declaring NgModule",
"alias": "m"
},
"export": {
"type": "boolean",
"default": false,
"description": "When true, the declaring NgModule exports this component"
},
"lintFix": {
"type": "boolean",
"default": false,
"description": "When true, applies lint fixes after generating the component"
},
"selectionMode": {
"description": "Selection mode to be used for the list",
"type": "string",
"default": "none",
"enum": [
"none",
"multi",
"single",
"singleWithRequiredSelection",
"radio",
"radioWithNonRequiredSelection"
],
"x-prompt": {
"message": "What selection mode would you like the list to use?",
"type": "list",
"items": [
{ "value": "none", "label": "None (Selection Disabled)" },
{ "value": "multi", "label": "Multi-Select (Checkboxes)" },
{ "value": "radio", "label": "Radio Buttons" },
{
"value": "radioWithNonRequiredSelection",
"label": "Radio Buttons with Deselection Allowed"
},
{
"value": "singleWithRequiredSelection",
"label": "Single-Select with No Radio Buttons"
},
{
"value": "single",
"label": "Single-Select with No Radio Buttons and Deselection Allowed"
}
]
}
},
"pagingMode": {
"description": "Paging mode to be used for the list",
"type": "string",
"default": "virtualScroll",
"enum": ["none", "pagination", "virtualScroll"],
"x-prompt": {
"message": "What paging mode would you like the list to use?",
"type": "list",
"items": [
{ "value": "pagination", "label": "Pagination" },
{ "value": "virtualScroll", "label": "Virtual Scroll" },
{ "value": "none", "label": "None" }
]
}
},
"enableSearch": {
"type": "boolean",
"description": "When true, enables the search functionality for the list",
"default": true
},
"enableSort": {
"type": "boolean",
"description": "When true, enables the search functionality for the list",
"default": true
},
"dataSource": {
"type": "string",
"default": "serverSide",
"x-prompt": {
"message": "What is the source of your data?",
"type": "list",
"items": [
{
"value": "clientSide",
"label": "The generated data source will retrieve data locally from a client side source."
},
{
"value": "serverSide",
"label": "The generated data source will retrieve data remotely from a server side API."
},
{
"value": "custom",
"label": "No data source will be generated, allowing you to create one from scratch."
},
{
"value": "none",
"label": "No data source will be generated and no accommodations for a data source, e.g. sorting or search, will be added to the generated code."
}
]
}
},
"dataSourceName": {
"type": "string",
"description": "Specifies the datasource class name"
}
},
"required": ["name", "selectionMode", "pagingMode"],
"title": "Nova list Schema",
"type": "object"
}