diff --git a/ember-headless-table/src/plugins/column-resizing/handle.ts b/ember-headless-table/src/plugins/column-resizing/handle.ts index b41d20ea..800cf430 100644 --- a/ember-headless-table/src/plugins/column-resizing/handle.ts +++ b/ember-headless-table/src/plugins/column-resizing/handle.ts @@ -24,9 +24,11 @@ let waiter = buildWaiter('ColumnResizing#ResizeHandle'); * */ -class ResizeHandle extends Modifier<{ Args: { Positional: [Column] } }> { +class ResizeHandle extends Modifier<{ + Args: { Positional: [Column] }; +}> { declare dragHandle: HTMLElement; - declare column: Column; + declare column: Column; declare meta: ColumnMeta; // Pointer @@ -45,7 +47,7 @@ class ResizeHandle extends Modifier<{ Args: { Positional: [Column] } }> { token?: unknown; isSetup = false; - modify(element: Element, [column]: [Column]) { + modify(element: Element, [column]: [Column]) { this.column = column; this.meta = meta.forColumn(column, ColumnResizing); this.dragHandle = element as HTMLElement; diff --git a/ember-headless-table/src/plugins/column-resizing/helpers.ts b/ember-headless-table/src/plugins/column-resizing/helpers.ts index 89529eac..9553ad14 100644 --- a/ember-headless-table/src/plugins/column-resizing/helpers.ts +++ b/ember-headless-table/src/plugins/column-resizing/helpers.ts @@ -15,12 +15,14 @@ import type { Column } from '[public-types]'; * be marked as isResizing, because this is a user-scoped question: * "Is the user directly resizing this column?" */ -export const isResizing = (column: Column) => meta.forColumn(column, ColumnResizing).isResizing; +export const isResizing = (column: Column) => + meta.forColumn(column, ColumnResizing).isResizing; /** * Does the column have room to shrink? */ -export const canShrink = (column: Column) => meta.forColumn(column, ColumnResizing).canShrink; +export const canShrink = (column: Column) => + meta.forColumn(column, ColumnResizing).canShrink; /** * Does the column have a resize handle? @@ -29,7 +31,7 @@ export const canShrink = (column: Column) => meta.forColumn(column, ColumnResizi * - if resizing is enabled for the whole table * - or if we're asking about the first column (resize handles may only be "between" columns) */ -export const hasResizeHandle = (column: Column) => +export const hasResizeHandle = (column: Column) => meta.forColumn(column, ColumnResizing).hasResizeHandle; /** diff --git a/ember-headless-table/src/plugins/data-sorting/helpers.ts b/ember-headless-table/src/plugins/data-sorting/helpers.ts index adfafb46..4a73a20e 100644 --- a/ember-headless-table/src/plugins/data-sorting/helpers.ts +++ b/ember-headless-table/src/plugins/data-sorting/helpers.ts @@ -6,27 +6,32 @@ import type { Column } from '[public-types]'; /** * Query a specific column's current sort direction */ -export const sortDirection = (column: Column) => meta.forColumn(column, Sorting).sortDirection; +export const sortDirection = (column: Column) => + meta.forColumn(column, Sorting).sortDirection; /** * Ask if a column is sortable */ -export const isSortable = (column: Column) => meta.forColumn(column, Sorting).isSortable; +export const isSortable = (column: Column) => + meta.forColumn(column, Sorting).isSortable; /** * Ask if a column is ascending */ -export const isAscending = (column: Column) => meta.forColumn(column, Sorting).isAscending; +export const isAscending = (column: Column) => + meta.forColumn(column, Sorting).isAscending; /** * Ask if a column is sorted descending */ -export const isDescending = (column: Column) => meta.forColumn(column, Sorting).isDescending; +export const isDescending = (column: Column) => + meta.forColumn(column, Sorting).isDescending; /** * Ask if a column is not sorted */ -export const isUnsorted = (column: Column) => meta.forColumn(column, Sorting).isUnsorted; +export const isUnsorted = (column: Column) => + meta.forColumn(column, Sorting).isUnsorted; /** * Sort the specified column's data using a tri-toggle. diff --git a/ember-headless-table/src/plugins/data-sorting/plugin.ts b/ember-headless-table/src/plugins/data-sorting/plugin.ts index 2002065d..cca576dd 100644 --- a/ember-headless-table/src/plugins/data-sorting/plugin.ts +++ b/ember-headless-table/src/plugins/data-sorting/plugin.ts @@ -22,8 +22,8 @@ declare module 'ember-headless-table/plugins' { export interface Signature { Meta: { - Column: ColumnMeta; - Table: TableMeta; + Column: ColumnMeta; + Table: TableMeta; }; Options: { Plugin: Options; @@ -92,8 +92,8 @@ export class Sorting extends BasePlugin> }; } -export class ColumnMeta { - constructor(private column: Column) {} +export class ColumnMeta { + constructor(private column: Column) {} @cached get options() { @@ -131,8 +131,8 @@ export class ColumnMeta { } } -export class TableMeta { - constructor(private table: Table) {} +export class TableMeta { + constructor(private table: Table) {} @cached get options() { @@ -152,7 +152,7 @@ export class TableMeta { } @action - handleSort(column: Column) { + handleSort(column: Column) { let columnMeta = meta.forColumn(column, Sorting); if (!columnMeta.sortProperty) { @@ -169,7 +169,7 @@ export class TableMeta { } @action - toggleAscending(column: Column) { + toggleAscending(column: Column) { let columnMeta = meta.forColumn(column, Sorting); if (!columnMeta.sortProperty) { diff --git a/ember-headless-table/src/plugins/metadata/helpers.ts b/ember-headless-table/src/plugins/metadata/helpers.ts index aea4eefa..7aa3d464 100644 --- a/ember-headless-table/src/plugins/metadata/helpers.ts +++ b/ember-headless-table/src/plugins/metadata/helpers.ts @@ -3,10 +3,10 @@ import { Metadata } from './plugin'; import type { Column, Table } from '[public-types]'; -export const forColumn = (column: Column, key: string) => { +export const forColumn = (column: Column, key: string) => { return options.forColumn(column, Metadata)[key]; }; -export const forTable = (table: Table, key: string) => { +export const forTable = (table: Table, key: string) => { return options.forTable(table, Metadata)[key]; };