UNPKG

@vonage/vivid-react

Version:

Vivid wrapped for easy React usage & IDE autocomplete support & typescript typings

476 lines (471 loc) 10.4 kB
/* * DO NOT EDIT THIS FILE. IT IS GENERATED */ /* Code in this file were generated using following JSON: { "kind": "class", "description": "", "name": "DataGrid", "slots": [ { "description": "Default slot.", "name": "" } ], "members": [ { "kind": "method", "name": "generateTemplateColumns", "privacy": "private", "static": true, "return": { "type": { "text": "string" } }, "parameters": [ { "name": "columnDefinitions", "type": { "text": "ColumnDefinition[]" } } ], "description": "generates a gridTemplateColumns based on columndata array" }, { "kind": "field", "name": "noTabbing", "type": { "text": "boolean" }, "default": "false", "description": "When true the component will not add itself to the tab queue.\nDefault is false.", "privacy": "public" }, { "kind": "method", "name": "#setTabIndex" }, { "kind": "field", "name": "generateHeader", "type": { "text": "GenerateHeaderOptions" }, "description": "Whether the grid should automatically generate a header row and its type", "privacy": "public" }, { "kind": "field", "name": "gridTemplateColumns", "type": { "text": "string" }, "description": "String that gets applied to the css gridTemplateColumns attribute of child rows", "privacy": "public" }, { "kind": "field", "name": "rowsData", "type": { "text": "object[]" }, "default": "[]", "description": "The data being displayed in the grid", "privacy": "public" }, { "kind": "field", "name": "columnDefinitions", "type": { "text": "ColumnDefinition[] | null" }, "default": "null", "description": "The column definitions of the grid", "privacy": "public" }, { "kind": "field", "name": "rowItemTemplate", "type": { "text": "ViewTemplate" }, "description": "The template to use for the programmatic generation of rows", "privacy": "public" }, { "kind": "field", "name": "cellItemTemplate", "type": { "text": "ViewTemplate | undefined" }, "description": "The template used to render cells in generated rows.", "privacy": "public" }, { "kind": "field", "name": "headerCellItemTemplate", "type": { "text": "ViewTemplate | undefined" }, "description": "The template used to render header cells in generated rows.", "privacy": "public" }, { "kind": "field", "name": "focusRowIndex", "type": { "text": "number" }, "default": "0", "description": "The index of the row that will receive focus the next time the\ngrid is focused. This value changes as focus moves to different\nrows within the grid. Changing this value when focus is already\nwithin the grid moves focus to the specified row.", "privacy": "public" }, { "kind": "field", "name": "focusColumnIndex", "type": { "text": "number" }, "default": "0", "description": "The index of the column that will receive focus the next time the\ngrid is focused. This value changes as focus moves to different rows\nwithin the grid. Changing this value when focus is already within\nthe grid moves focus to the specified column.", "privacy": "public" }, { "kind": "field", "name": "fixedColumns", "type": { "text": "number | undefined" }, "description": "Number of columns to be fixed when scrolling horizontally", "privacy": "public" }, { "kind": "field", "name": "rowElementTag", "type": { "text": "string" }, "description": "Set by the component templates." }, { "kind": "field", "name": "rowsRepeatBehavior", "type": { "text": "RepeatBehavior | null" }, "privacy": "private", "default": "null" }, { "kind": "field", "name": "rowsPlaceholder", "type": { "text": "Node | null" }, "privacy": "private", "default": "null" }, { "kind": "field", "name": "generatedHeader", "type": { "text": "DataGridRow | null" }, "privacy": "private", "default": "null" }, { "kind": "field", "name": "isUpdatingFocus", "type": { "text": "boolean" }, "privacy": "private", "default": "false" }, { "kind": "field", "name": "pendingFocusUpdate", "type": { "text": "boolean" }, "privacy": "private", "default": "false" }, { "kind": "field", "name": "resizeObserver", "type": { "text": "ResizeObserver | undefined" }, "privacy": "private" }, { "kind": "field", "name": "observer", "type": { "text": "MutationObserver" }, "privacy": "private" }, { "kind": "field", "name": "rowindexUpdateQueued", "type": { "text": "boolean" }, "privacy": "private", "default": "false" }, { "kind": "field", "name": "columnDefinitionsStale", "type": { "text": "boolean" }, "privacy": "private", "default": "true" }, { "kind": "field", "name": "generatedGridTemplateColumns", "type": { "text": "string" }, "privacy": "private", "default": "''" }, { "kind": "field", "name": "focusOnCell", "privacy": "private" }, { "kind": "method", "name": "queueFocusUpdate", "privacy": "private", "return": { "type": { "text": "void" } } }, { "kind": "method", "name": "updateFocus", "privacy": "private", "return": { "type": { "text": "void" } } }, { "kind": "method", "name": "toggleGeneratedHeader", "privacy": "private", "return": { "type": { "text": "void" } } }, { "kind": "field", "name": "onChildListChange", "privacy": "private" }, { "kind": "field", "name": "queueRowIndexUpdate", "privacy": "private" }, { "kind": "field", "name": "updateRowIndexes", "privacy": "private" }, { "kind": "field", "name": "selectionMode", "type": { "text": "DataGridSelectionMode | undefined" }, "description": "Indicates the selection mode.", "privacy": "public" }, { "kind": "field", "name": "#selectedRows", "privacy": "private", "type": { "text": "DataGridRow[]" }, "readonly": true }, { "kind": "field", "name": "#selectedCells", "privacy": "private", "type": { "text": "DataGridCell[]" }, "readonly": true }, { "kind": "method", "name": "selectionModeChanged", "parameters": [ { "name": "oldValue", "type": { "text": "DataGridSelectionMode" } } ] }, { "kind": "field", "name": "#handleKeypress", "privacy": "private" }, { "kind": "field", "name": "#handleClick", "privacy": "private" }, { "kind": "field", "name": "#handleCellSelection", "privacy": "private" }, { "kind": "field", "name": "#handleRowSelection", "privacy": "private" }, { "kind": "field", "name": "#changeHandler", "privacy": "private", "type": { "text": "object" }, "default": "{\n\t\thandleChange(dataGrid: DataGrid, propertyName: string) {\n\t\t\tif (propertyName === 'columnDefinitions') {\n\t\t\t\tif (dataGrid.$fastController.isConnected) {\n\t\t\t\t\tdataGrid.toggleGeneratedHeader();\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t}" }, { "kind": "method", "name": "generateColumns", "static": true, "parameters": [ { "name": "rowData", "type": { "text": "any" } } ] }, { "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<{cell: HTMLElement, row: HTMLElement, isHeaderCell: boolean, columnDataKey: string}>" }, "description": "Event that fires when a cell is clicked", "name": "cell-click" } ], "attributes": [ { "name": "no-tabbing", "type": { "text": "boolean" }, "default": "false", "description": "When true the component will not add itself to the tab queue.\nDefault is false.", "fieldName": "noTabbing" }, { "name": "generate-header", "type": { "text": "GenerateHeaderOptions" }, "description": "Whether the grid should automatically generate a header row and its type", "fieldName": "generateHeader" }, { "name": "grid-template-columns", "type": { "text": "string" }, "description": "String that gets applied to the css gridTemplateColumns attribute of child rows", "fieldName": "gridTemplateColumns" }, { "name": "fixed-columns", "type": { "text": "number | undefined" }, "description": "Number of columns to be fixed when scrolling horizontally", "fieldName": "fixedColumns" }, { "name": "selection-mode", "type": { "text": "DataGridSelectionMode | undefined" }, "description": "Indicates the selection mode.", "fieldName": "selectionMode" } ], "superclass": { "name": "VividElement", "module": "/src/shared/foundation/vivid-element/vivid-element" }, "vividComponent": { "public": true, "name": "data-grid" } } */ import wrapper from '@vonage/vivid-react-wrapper' import { registerDataGrid } from '@vonage/vivid' registerDataGrid('vvd3') const VwcDataGrid = wrapper(`vvd3-data-grid`, { events: [{"name":"cell-click","propName":"onCellClick"}], attributes: [], properties: ['noTabbing', 'generateHeader', 'gridTemplateColumns', 'rowsData', 'columnDefinitions', 'rowItemTemplate', 'cellItemTemplate', 'headerCellItemTemplate', 'focusRowIndex', 'focusColumnIndex', 'fixedColumns', 'rowElementTag', 'selectionMode', 'VIVID_VERSION', 'componentName'] }) VwcDataGrid.displayName = 'VwcDataGrid' export default VwcDataGrid