@vonage/vivid-react
Version:
Vivid wrapped for easy React usage & IDE autocomplete support & typescript typings
388 lines (383 loc) • 8.23 kB
JavaScript
/*
* DO NOT EDIT THIS FILE. IT IS GENERATED
*/
/*
Code in this file were generated using following JSON:
{
"kind": "class",
"description": "",
"name": "DataGridCell",
"cssProperties": [
{
"name": "--vvd-data-grid-cell-cta-primary",
"default": "var(--vvd-color-cta-500)"
},
{
"name": "--vvd-data-grid-cell-cta-primary-text",
"default": "var(--vvd-color-canvas)"
},
{
"name": "--vvd-data-grid-cell-cta-primary-increment",
"default": "var(--vvd-color-cta-600)"
},
{
"name": "--vvd-data-grid-cell-cta-firm",
"default": "var(--vvd-color-cta-600)"
},
{
"name": "--vvd-data-grid-cell-cta-soft",
"default": "var(--vvd-color-cta-100)"
},
{
"name": "--vvd-data-grid-cell-cta-faint",
"default": "var(--vvd-color-cta-50)"
},
{
"name": "--vvd-data-grid-cell-cta-pale",
"default": "var(--vvd-color-cta-300)"
},
{
"name": "--vvd-data-grid-cell-cta-dim",
"default": "var(--vvd-color-cta-200)"
},
{
"name": "--vvd-data-grid-cell-accent-primary",
"default": "var(--vvd-color-canvas-text)"
},
{
"name": "--vvd-data-grid-cell-accent-primary-text",
"default": "var(--vvd-color-canvas)"
},
{
"name": "--vvd-data-grid-cell-accent-primary-increment",
"default": "var(--vvd-color-neutral-800)"
},
{
"name": "--vvd-data-grid-cell-accent-firm",
"default": "var(--vvd-color-canvas-text)"
},
{
"name": "--vvd-data-grid-cell-accent-soft",
"default": "var(--vvd-color-neutral-100)"
},
{
"name": "--vvd-data-grid-cell-accent-faint",
"default": "var(--vvd-color-neutral-50)"
},
{
"name": "--vvd-data-grid-cell-accent-pale",
"default": "var(--vvd-color-neutral-300)"
},
{
"name": "--vvd-data-grid-cell-accent-dim",
"default": "var(--vvd-color-neutral-200)"
}
],
"slots": [
{
"description": "Default slot.",
"name": ""
}
],
"members": [
{
"kind": "field",
"name": "cellType",
"type": {
"text": "DataGridCellTypes"
},
"description": "The type of cell",
"privacy": "public"
},
{
"kind": "field",
"name": "gridColumn",
"type": {
"text": "string"
},
"description": "The column index of the cell.\nThis will be applied to the css grid-column-index value\napplied to the cell",
"privacy": "public"
},
{
"kind": "field",
"name": "rowData",
"type": {
"text": "object | null"
},
"default": "null",
"description": "The base data for the parent row",
"privacy": "public"
},
{
"kind": "field",
"name": "columnDefinition",
"type": {
"text": "ColumnDefinitionExtended | null"
},
"default": "null",
"description": "The base data for the column",
"privacy": "public"
},
{
"kind": "field",
"name": "isActiveCell",
"type": {
"text": "boolean"
},
"privacy": "private",
"default": "false"
},
{
"kind": "field",
"name": "customCellView",
"type": {
"text": "HTMLView | null"
},
"privacy": "private",
"default": "null"
},
{
"kind": "method",
"name": "handleFocusin",
"return": {
"type": {
"text": "void"
}
},
"parameters": [
{
"name": "_",
"type": {
"text": "FocusEvent"
}
}
]
},
{
"kind": "method",
"name": "handleFocusout",
"return": {
"type": {
"text": "void"
}
},
"parameters": [
{
"name": "_",
"type": {
"text": "FocusEvent"
}
}
]
},
{
"kind": "method",
"name": "handleKeydown",
"return": {
"type": {
"text": "void"
}
},
"parameters": [
{
"name": "e",
"type": {
"text": "KeyboardEvent"
}
}
]
},
{
"kind": "method",
"name": "updateCellView",
"privacy": "private",
"return": {
"type": {
"text": "void"
}
}
},
{
"kind": "method",
"name": "disconnectCellView",
"privacy": "private",
"return": {
"type": {
"text": "void"
}
}
},
{
"kind": "field",
"name": "updateCellStyle",
"privacy": "private"
},
{
"kind": "field",
"name": "selected",
"type": {
"text": "boolean"
},
"default": "false",
"description": "Reflects selected state of the row",
"privacy": "public"
},
{
"kind": "field",
"name": "ariaSelected",
"type": {
"text": "string | null"
},
"default": "null",
"description": "Indicates the selected status.",
"privacy": "public"
},
{
"kind": "field",
"name": "ariaSort",
"type": {
"text": "string | null"
},
"default": "null",
"description": "Indicates the sort status.",
"privacy": "public"
},
{
"kind": "field",
"name": "sortDirection",
"type": {
"text": "DataGridCellSortStates | undefined"
},
"description": "Sets the sorting direction.",
"privacy": "public"
},
{
"kind": "method",
"name": "#getColumnDataKey"
},
{
"kind": "field",
"name": "_vividAriaBehaviour",
"default": "'host'",
"type": {
"text": "'host'"
},
"inheritedFrom": {
"name": "HostSemantics",
"module": "src/shared/aria/host-semantics.ts"
}
},
{
"kind": "field",
"name": "VIVID_VERSION",
"static": true,
"default": "__PACKAGE_VERSION__",
"description": "The current version of the Vivid library, which is useful for debugging.\nIt can be accessed from any Vivid element via `<el>.constructor.VIVID_VERSION`.",
"type": {
"text": "string"
},
"inheritedFrom": {
"name": "VividElement",
"module": "src/shared/foundation/vivid-element/vivid-element.ts"
}
},
{
"kind": "field",
"name": "componentName",
"type": {
"text": "string"
},
"static": true,
"description": "Core component name, without prefix",
"inheritedFrom": {
"name": "VividElement",
"module": "src/shared/foundation/vivid-element/vivid-element.ts"
}
}
],
"events": [
{
"type": {
"text": "CustomEvent<{columnDataKey: string, ariaSort: string | null, sortDirection: string | null}>"
},
"description": "Event that fires when a sortable column header is clicked",
"name": "sort"
},
{
"type": {
"text": "CustomEvent<{cell: HTMLElement, row: HTMLElement, isHeaderCell: boolean, columnDataKey: string}>"
},
"description": "Event that fires when a cell is clicked",
"name": "cell-click"
},
{
"type": {
"text": "CustomEvent<HTMLElement>"
},
"description": "Fires a custom 'cell-focused' event when focus is on the cell or its contents",
"name": "cell-focused"
}
],
"attributes": [
{
"name": "cell-type",
"type": {
"text": "DataGridCellTypes"
},
"description": "The type of cell",
"fieldName": "cellType"
},
{
"name": "grid-column",
"type": {
"text": "string"
},
"description": "The column index of the cell.\nThis will be applied to the css grid-column-index value\napplied to the cell",
"fieldName": "gridColumn"
},
{
"name": "selected",
"type": {
"text": "boolean"
},
"default": "false",
"description": "Reflects selected state of the row",
"fieldName": "selected"
},
{
"name": "sort-direction",
"type": {
"text": "DataGridCellSortStates | undefined"
},
"description": "Sets the sorting direction.",
"fieldName": "sortDirection"
}
],
"mixins": [
{
"name": "Localized",
"module": "/src/shared/patterns"
},
{
"name": "HostSemantics",
"module": "/src/shared/aria/host-semantics"
}
],
"superclass": {
"name": "VividElement",
"module": "/src/shared/foundation/vivid-element/vivid-element"
},
"vividComponent": {
"public": true,
"name": "data-grid-cell"
}
}
*/
import wrapper from '@vonage/vivid-react-wrapper'
const VwcDataGridCell = wrapper(`vvd3-data-grid-cell`, {
events: [{"name":"cell-focused","propName":"onCellFocused"},{"name":"cell-click","propName":"onCellClick"},{"name":"sort","propName":"onSort"}],
attributes: [],
properties: ['ariaSelected', 'cellType', 'gridColumn', 'rowData', 'columnDefinition', 'selected', 'ariaSelected', 'ariaSort', 'sortDirection', '_vividAriaBehaviour', 'VIVID_VERSION', 'componentName']
})
VwcDataGridCell.displayName = 'VwcDataGridCell'
export default VwcDataGridCell