summaryrefslogtreecommitdiff
path: root/packages/frontend/src/components/grid
diff options
context:
space:
mode:
Diffstat (limited to 'packages/frontend/src/components/grid')
-rw-r--r--packages/frontend/src/components/grid/MkGrid.vue2
-rw-r--r--packages/frontend/src/components/grid/cell-validators.ts8
-rw-r--r--packages/frontend/src/components/grid/cell.ts6
-rw-r--r--packages/frontend/src/components/grid/column.ts2
-rw-r--r--packages/frontend/src/components/grid/grid.ts8
-rw-r--r--packages/frontend/src/components/grid/row.ts6
6 files changed, 16 insertions, 16 deletions
diff --git a/packages/frontend/src/components/grid/MkGrid.vue b/packages/frontend/src/components/grid/MkGrid.vue
index 84f1f754b2..c89e23c135 100644
--- a/packages/frontend/src/components/grid/MkGrid.vue
+++ b/packages/frontend/src/components/grid/MkGrid.vue
@@ -79,7 +79,7 @@ type RowHolder = {
row: GridRow,
cells: GridCell[],
origin: DataSource,
-}
+};
const emit = defineEmits<{
(ev: 'event', event: GridEvent, context: GridContext): void;
diff --git a/packages/frontend/src/components/grid/cell-validators.ts b/packages/frontend/src/components/grid/cell-validators.ts
index 56d7f0f13d..7310a82c9e 100644
--- a/packages/frontend/src/components/grid/cell-validators.ts
+++ b/packages/frontend/src/components/grid/cell-validators.ts
@@ -18,25 +18,25 @@ export type ValidatorParams = {
export type ValidatorResult = {
valid: boolean;
message?: string;
-}
+};
export type GridCellValidator = {
name?: string;
ignoreViolation?: boolean;
validate: (params: ValidatorParams) => ValidatorResult;
-}
+};
export type ValidateViolation = {
valid: boolean;
params: ValidatorParams;
violations: ValidateViolationItem[];
-}
+};
export type ValidateViolationItem = {
valid: boolean;
validator: GridCellValidator;
result: ValidatorResult;
-}
+};
export function cellValidation(allCells: GridCell[], cell: GridCell, newValue: CellValue): ValidateViolation {
const { column, row } = cell;
diff --git a/packages/frontend/src/components/grid/cell.ts b/packages/frontend/src/components/grid/cell.ts
index 2569c6d50d..d347d05bdb 100644
--- a/packages/frontend/src/components/grid/cell.ts
+++ b/packages/frontend/src/components/grid/cell.ts
@@ -15,7 +15,7 @@ export type CellValue = string | boolean | number | undefined | null | Array<unk
export type CellAddress = {
row: number;
col: number;
-}
+};
export const CELL_ADDRESS_NONE: CellAddress = {
row: -1,
@@ -32,13 +32,13 @@ export type GridCell = {
contentSize: Size;
setting: GridCellSetting;
violation: ValidateViolation;
-}
+};
export type GridCellContextMenuFactory = (col: GridColumn, row: GridRow, value: CellValue, context: GridContext) => MenuItem[];
export type GridCellSetting = {
contextMenuFactory?: GridCellContextMenuFactory;
-}
+};
export function createCell(
column: GridColumn,
diff --git a/packages/frontend/src/components/grid/column.ts b/packages/frontend/src/components/grid/column.ts
index 6780c8a3a7..6a694b39ec 100644
--- a/packages/frontend/src/components/grid/column.ts
+++ b/packages/frontend/src/components/grid/column.ts
@@ -40,7 +40,7 @@ export type GridColumn = {
setting: GridColumnSetting;
width: string;
contentSize: Size;
-}
+};
export function createColumn(setting: GridColumnSetting, index: number): GridColumn {
return {
diff --git a/packages/frontend/src/components/grid/grid.ts b/packages/frontend/src/components/grid/grid.ts
index 03947b7ee3..0428e6493c 100644
--- a/packages/frontend/src/components/grid/grid.ts
+++ b/packages/frontend/src/components/grid/grid.ts
@@ -21,7 +21,7 @@ export type GridSetting = {
export type DataSource = Record<string, CellValue>;
-export type GridState =
+export type GridState = (
'normal' |
'cellSelecting' |
'cellEditing' |
@@ -29,19 +29,19 @@ export type GridState =
'colSelecting' |
'rowSelecting' |
'hidden'
- ;
+);
export type Size = {
width: number;
height: number;
-}
+};
export type SizeStyle = number | 'auto' | undefined;
export type AdditionalStyle = {
className?: string;
style?: Record<string, string | number>;
-}
+};
export class GridEventEmitter extends EventEmitter<{
'forceRefreshContentSize': void;
diff --git a/packages/frontend/src/components/grid/row.ts b/packages/frontend/src/components/grid/row.ts
index f34770312a..42da22193f 100644
--- a/packages/frontend/src/components/grid/row.ts
+++ b/packages/frontend/src/components/grid/row.ts
@@ -27,7 +27,7 @@ export type GridRowStyleRuleConditionParams = {
export type GridRowStyleRule = {
condition: (params: GridRowStyleRuleConditionParams) => boolean;
applyStyle: AdditionalStyle;
-}
+};
export type GridRowContextMenuFactory = (row: GridRow, context: GridContext) => MenuItem[];
@@ -40,7 +40,7 @@ export type GridRowSetting = {
events?: {
delete?: (rows: GridRow[]) => void;
}
-}
+};
export type GridRow = {
index: number;
@@ -48,7 +48,7 @@ export type GridRow = {
using: boolean;
setting: GridRowSetting;
additionalStyles: AdditionalStyle[];
-}
+};
export function createRow(index: number, using: boolean, setting: GridRowSetting): GridRow {
return {