Skip to content

Commit d6c1475

Browse files
committed
refactor: addressing review comments
1 parent e7ace1c commit d6c1475

File tree

6 files changed

+6
-28
lines changed

6 files changed

+6
-28
lines changed

projects/components/src/table/cells/state-parsers/table-cell-state-expander.ts

Lines changed: 0 additions & 17 deletions
This file was deleted.

projects/components/src/table/cells/state-parsers/table-cell-state-checkbox.ts renamed to projects/components/src/table/cells/state-parsers/table-cell-state-parser.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import { TableCellParserBase } from '../table-cell-parser-base';
44
import { CoreTableCellParserType } from '../types/core-table-cell-parser-type';
55

66
@TableCellParser({
7-
type: CoreTableCellParserType.Checkbox
7+
type: CoreTableCellParserType.State
88
})
9-
export class TableCellStateParserCheckbox extends TableCellParserBase<TableRowState, TableRowState, undefined> {
9+
export class TableCellStateParser extends TableCellParserBase<TableRowState, TableRowState, undefined> {
1010
public parseValue(_: TableRowState, rowData: StatefulTableRow): TableRowState {
1111
return rowData.$$state;
1212
}

projects/components/src/table/cells/state-renderers/checkbox/table-checkbox-cell-renderer.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ import { TableCellAlignmentType } from '../../types/table-cell-alignment-type';
1818
@TableCellRenderer({
1919
type: CoreTableCellRendererType.Checkbox,
2020
alignment: TableCellAlignmentType.Center,
21-
parser: CoreTableCellParserType.Checkbox
21+
parser: CoreTableCellParserType.State
2222
})
2323
export class TableCheckboxCellRendererComponent extends TableCellRendererBase<TableRowState> {}

projects/components/src/table/cells/state-renderers/expander/table-expander-cell-renderer.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ import { TableCellAlignmentType } from '../../types/table-cell-alignment-type';
2323
@TableCellRenderer({
2424
type: CoreTableCellRendererType.RowExpander,
2525
alignment: TableCellAlignmentType.Center,
26-
parser: CoreTableCellParserType.RowExpander
26+
parser: CoreTableCellParserType.State
2727
})
2828
export class TableExpanderCellRendererComponent extends TableCellRendererBase<TableRowState> {}

projects/components/src/table/cells/table-cells.module.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@ import { TextTableCellRendererComponent } from './data-renderers/text/text-table
2727
import { TimeAgoTableCellRendererComponent } from './data-renderers/time-ago/time-ago-table-cell-renderer.component';
2828
import { TimestampTableCellRendererComponent } from './data-renderers/timestamp/timestamp-table-cell-renderer.component';
2929
import { TableExpandedDetailRowCellRendererComponent } from './expanded-detail/table-expanded-detail-row-cell-renderer.component';
30-
import { TableCellStateParserCheckbox } from './state-parsers/table-cell-state-checkbox';
31-
import { TableCellStateParserExpander } from './state-parsers/table-cell-state-expander';
32-
30+
import { TableCellStateParser } from './state-parsers/table-cell-state-parser';
3331
import { TableCheckboxCellRendererComponent } from './state-renderers/checkbox/table-checkbox-cell-renderer.component';
3432
import { TableExpanderCellRendererComponent } from './state-renderers/expander/table-expander-cell-renderer.component';
3533
import { TableCellParserConstructor } from './table-cell-parser';
@@ -94,8 +92,7 @@ export const TABLE_CELL_PARSERS = new InjectionToken<unknown[][]>('TABLE_CELL_PA
9492
{
9593
provide: TABLE_CELL_PARSERS,
9694
useValue: [
97-
TableCellStateParserCheckbox,
98-
TableCellStateParserExpander,
95+
TableCellStateParser,
9996
TableCellBooleanParser,
10097
TableCellIconParser,
10198
TableCellNumberParser,

projects/components/src/table/cells/types/core-table-cell-parser-type.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
export const enum CoreTableCellParserType {
22
Boolean = 'boolean',
3-
Checkbox = 'checkbox',
43
Number = 'number',
5-
RowExpander = 'row-expander',
64
State = 'state',
75
String = 'string',
86
Timestamp = 'timestamp',

0 commit comments

Comments
 (0)