@sheetwrite/vuevariable
Convenience component for local object rows with live option updates.
- Package
@sheetwrite/vue- Source
packages/vue/src/index.ts#L513
Declaration
const Sheetwrite: SheetwriteComponentConstructortype SheetwriteComponentConstructor<
Props,
Emits,
Expose = object,
> = new () => Expose &
ComponentPublicInstance & {
$props: AllowedComponentProps &
Props &
VNodeProps & {
[
EventName in keyof Emits &
string as `on${Capitalize<EventName>}`
]?: (payload: Emits[EventName]) => void;
};
};type SheetwriteComponentConstructor<
Props,
Emits,
Expose = object,
> = new () => Expose &
ComponentPublicInstance & {
$props: AllowedComponentProps &
Props &
VNodeProps & {
[
EventName in keyof Emits &
string as `on${Capitalize<EventName>}`
]?: (payload: Emits[EventName]) => void;
};
};type SheetwriteComponentConstructor<
Props,
Emits,
Expose = object,
> = new () => Expose &
ComponentPublicInstance & {
$props: AllowedComponentProps &
Props &
VNodeProps & {
[
EventName in keyof Emits &
string as `on${Capitalize<EventName>}`
]?: (
payload: Emits[EventName],
) => void;
};
};Vue constructor type for Sheetwrite components: Sheetwrite-owned props, emitted events exposed as on* listener props, and the exposed instance surface reachable through a template ref.API reference →< SheetwritePropstype SheetwriteProps<
Row extends Record<string, CellScalar>,
Id extends RowBridgeId = RowBridgeId,
> = Omit<
SheetwriteGridProps<Id>,
| "workbook"
| "data"
| "datasource"
| "height"
| "fill"
| "rowBridge"
> &
GridSizeProps & {
columns: readonly SimpleColumn<Row>[];
defaultRows: readonly Row[];
// … 6 more lines — see the API reference
}type SheetwriteProps<
Row extends Record<string, CellScalar>,
Id extends RowBridgeId = RowBridgeId,
> = Omit<
SheetwriteGridProps<Id>,
| "workbook"
| "data"
| "datasource"
| "height"
| "fill"
| "rowBridge"
> &
GridSizeProps & {
columns: readonly SimpleColumn<Row>[];
defaultRows: readonly Row[];
// … 6 more lines — see the API reference
}type SheetwriteProps<
Row extends Record<
string,
CellScalar
>,
Id extends RowBridgeId =
RowBridgeId,
> = Omit<
SheetwriteGridProps<Id>,
| "workbook"
| "data"
| "datasource"
| "height"
| "fill"
| "rowBridge"
> &
GridSizeProps & {
columns: readonly SimpleColumn<Row>[];
defaultRows: readonly Row[];
// … 12 more lines — see the API reference
}Simple framework adapter props for columns and default row objects.API reference →<Record<string, CellScalartype CellScalar = string | number | boolean | null;type CellScalar = string | number | boolean | null;type CellScalar =
| string
| number
| boolean
| null;A scalar that can be displayed directly.API reference →>, RowBridgeIdtype RowBridgeId = string | number;type RowBridgeId = string | number;type RowBridgeId =
string | number;A stable host identity for one data-space row.API reference →>, SheetwriteGridEmitsinterface SheetwriteGridEmits<
Id extends RowBridgeId = RowBridgeId,
> {
"row-delta": Parameters<RowBridgeHandler<Id>>[0];
"grid-change": ChangeEvent;
"selection-change": Selection | null;
"viewport-change": GridEvents["scroll"];
"edit-begin": GridEvents["edit-begin"];
"edit-commit": GridEvents["edit-commit"];
search: GridEvents["search"];
"command-state-change": GridEvents["command-state-change"];
"active-sheet-change": GridEvents["active-sheet"];
"mutation-rejected": GridEvents["mutation-rejected"];
"renderer-fallback": GridEvents["renderer-fallback"];
"datasource-error": GridEvents["datasource-error"];
// … 4 more lines — see the API reference
}interface SheetwriteGridEmits<
Id extends RowBridgeId = RowBridgeId,
> {
"row-delta": Parameters<RowBridgeHandler<Id>>[0];
"grid-change": ChangeEvent;
"selection-change": Selection | null;
"viewport-change": GridEvents["scroll"];
"edit-begin": GridEvents["edit-begin"];
"edit-commit": GridEvents["edit-commit"];
search: GridEvents["search"];
"command-state-change": GridEvents["command-state-change"];
"active-sheet-change": GridEvents["active-sheet"];
"mutation-rejected": GridEvents["mutation-rejected"];
"renderer-fallback": GridEvents["renderer-fallback"];
"datasource-error": GridEvents["datasource-error"];
// … 4 more lines — see the API reference
}interface SheetwriteGridEmits<
Id extends RowBridgeId =
RowBridgeId,
> {
"row-delta": Parameters<
RowBridgeHandler<Id>
>[0];
"grid-change": ChangeEvent;
"selection-change": Selection | null;
"viewport-change": GridEvents["scroll"];
"edit-begin": GridEvents["edit-begin"];
"edit-commit": GridEvents["edit-commit"];
search: GridEvents["search"];
"command-state-change": GridEvents["command-state-change"];
"active-sheet-change": GridEvents["active-sheet"];
"mutation-rejected": GridEvents["mutation-rejected"];
"renderer-fallback": GridEvents["renderer-fallback"];
"datasource-error": GridEvents["datasource-error"];
"export-error": GridEvents["export-error"];
// … 3 more lines — see the API reference
}Event payloads emitted by the Vue components, keyed by template event name.API reference →<RowBridgeIdtype RowBridgeId = string | number;type RowBridgeId = string | number;type RowBridgeId =
string | number;A stable host identity for one data-space row.API reference →>, object>