-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #47 from Gavant/ember-tbl-types
Ember tbl types
- Loading branch information
Showing
33 changed files
with
485 additions
and
1,117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
102 changes: 59 additions & 43 deletions
102
ember-table/src/components/ember-table-override/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,42 @@ | ||
import EmberTbody, { EmberTableBodySignature } from 'ember-table/components/ember-tbody/component'; | ||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment | ||
//@ts-ignore | ||
import EmberTbody from 'ember-table/components/ember-tbody/component'; | ||
|
||
type OverridenArgs = EmberTableBodySignature['Args'] & { | ||
isLoading?: boolean; | ||
showBottomLoading?: boolean; | ||
showTopLoading?: boolean; | ||
isEmpty?: boolean; | ||
noResultsText?: string; | ||
}; | ||
import { Column, ColumnMeta, RowValue } from '@gavant/glint-template-types/types/ember-table/table'; | ||
|
||
interface OverridenSignature { | ||
Args: OverridenArgs; | ||
Blocks: EmberTableBodySignature['Blocks']; | ||
Element: EmberTableBodySignature['Element']; | ||
} | ||
// type OverridenArgs< | ||
// CV extends Column<RV, M, CM, RM, TM>, | ||
// RV extends RowValue, | ||
// M, | ||
// CM extends ColumnMeta, | ||
// RM, | ||
// TM | ||
// > = EmberTableBodySignature<CV, RV, M, CM, RM, TM>['Args'] & { | ||
// isLoading?: boolean; | ||
// showBottomLoading?: boolean; | ||
// showTopLoading?: boolean; | ||
// isEmpty?: boolean; | ||
// noResultsText?: string; | ||
// }; | ||
|
||
export default class EmberTbodyComponent extends EmberTbody<OverridenSignature> {} | ||
// interface OverridenSignature< | ||
// CV extends Column<RV, M, CM, RM, TM>, | ||
// RV extends RowValue, | ||
// M, | ||
// CM extends ColumnMeta, | ||
// RM, | ||
// TM | ||
// > { | ||
// Args: OverridenArgs<CV, RV, M, CM, RM, TM>; | ||
// Blocks: EmberTableBodySignature<CV, RV, M, CM, RM, TM>['Blocks']; | ||
// Element: EmberTableBodySignature<CV, RV, M, CM, RM, TM>['Element']; | ||
// } | ||
|
||
export default class EmberTbodyComponent< | ||
CV extends Column<RV, M, CM, RM, TM>, | ||
RV extends RowValue, | ||
M, | ||
CM extends ColumnMeta, | ||
RM, | ||
TM | ||
> extends EmberTbody<CV, RV, M, CM, RM, TM> {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
{{! @glint-nocheck }} | ||
<div | ||
class="data-table | ||
{{if this.hasHiddenColumns ' has-hidden-columns'}} | ||
|
Oops, something went wrong.