-
Notifications
You must be signed in to change notification settings - Fork 839
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeScriptified basic_table. #2428
Merged
Merged
Changes from 16 commits
Commits
Show all changes
82 commits
Select commit
Hold shift + click to select a range
ee2b251
TypeScriptify custom_item_action.
sainthkh 250bd2b
TypeScriptify default_item_action.
sainthkh ea8d657
Created action_types.ts.
sainthkh df8a094
Added missing props in DefaultItemAction.
sainthkh 766404b
TypeScriptify expanded_item_actions.
sainthkh a73bce9
TypeScriptify CollapsedItemActions.
sainthkh b1cbb97
TypeScriptify LoadingTableBody.
sainthkh 6e62a2c
TypeScriptify PaginationBar.
sainthkh c5b0e76
TypeScriptify BasicTable.
sainthkh 781ed0e
Removed anys.
sainthkh dcf83da
Removed more anys.
sainthkh 95450c2
Removed any in item and itemId.
sainthkh f5565ed
TypeScriptify EuiInMemoryTable.
sainthkh ec27dd7
Fixed bug in PropType generation.
sainthkh 306c70e
Clean up.
sainthkh 06afcbf
Used Omit.
sainthkh 9ca68f6
Thread generics throughout EuiBasicTable
pugnascotia d999c21
Tweaks
pugnascotia 30fb9d2
More tweaks
pugnascotia 049c959
Even more tweaks
pugnascotia 3fb8714
Merge pull request #1 from pugnascotia/ts-basic-table
sainthkh dd1d652
Added responsive prop to EuiInMemoryTable.
sainthkh e7f8b89
any -> Event.
sainthkh d767d71
Fixed selectable test failure.
sainthkh e209494
Renamed prop interfaces.
sainthkh 467bd7f
Merge upstream.
sainthkh cf5c203
Some typescript updates
chandlerprall 8c29e77
ts->proptypes test for direct-usage literal values
chandlerprall 2022116
Update: State -> CollapsedItemActionsState
sainthkh 8533bba
Update: State -> CollapsedItemActionsState
sainthkh 7ca9ef3
Update State -> CustomItemActionState
sainthkh 9e6a007
Update State -> CustomItemActionState
sainthkh db56653
Merge remote-tracking branch 'upstream/master' into ts-basic-table
sainthkh fce5c12
clean up types in in_memory_table
chandlerprall 17e967d
Merge pull request #2 from chandlerprall/ts-basic-table
sainthkh bc413a4
Fixed ExpandedItemActions snapshot. Because it has some props that do…
sainthkh 45f27a1
Remove more anys.
sainthkh 07730c4
Updated i18ntokens.json.
sainthkh a7dbdb6
Merge remote-tracking branch 'upstream/master' into ts-basic-table
sainthkh 96f0e3b
TypeScriptify custom_item_action.
sainthkh d870291
TypeScriptify default_item_action.
sainthkh c0edfe3
Created action_types.ts.
sainthkh 890a01e
Added missing props in DefaultItemAction.
sainthkh 7b94c7c
TypeScriptify expanded_item_actions.
sainthkh 11cac1f
TypeScriptify CollapsedItemActions.
sainthkh 41a23b6
TypeScriptify LoadingTableBody.
sainthkh ae3c8a1
TypeScriptify PaginationBar.
sainthkh 3259a1c
TypeScriptify BasicTable.
sainthkh 1b785c7
Removed anys.
sainthkh ab91fa7
Removed more anys.
sainthkh 262f1f3
Removed any in item and itemId.
sainthkh 5bfc737
TypeScriptify EuiInMemoryTable.
sainthkh b6eb031
Fixed bug in PropType generation.
sainthkh 18dc72d
Clean up.
sainthkh 9aa27ec
Used Omit.
sainthkh e944eee
Thread generics throughout EuiBasicTable
pugnascotia 7ec868f
Tweaks
pugnascotia b221494
More tweaks
pugnascotia bac79f8
Even more tweaks
pugnascotia 927e9c0
Added responsive prop to EuiInMemoryTable.
sainthkh 48c8a92
any -> Event.
sainthkh 528838b
Fixed selectable test failure.
sainthkh 8ff3883
Renamed prop interfaces.
sainthkh cbd291e
Some typescript updates
chandlerprall 548a89f
ts->proptypes test for direct-usage literal values
chandlerprall 93ec991
Update: State -> CollapsedItemActionsState
sainthkh 572716e
Update: State -> CollapsedItemActionsState
sainthkh b3820d6
Update State -> CustomItemActionState
sainthkh 65dc1b1
Update State -> CustomItemActionState
sainthkh 82e5e54
clean up types in in_memory_table
chandlerprall 2de08e0
Fixed ExpandedItemActions snapshot. Because it has some props that do…
sainthkh 32c1e16
Remove more anys.
sainthkh 75d9e32
more types
chandlerprall 18a39b4
guarantee the page argument in table callbacks if pagination is provided
chandlerprall 10de16e
rebased against master
chandlerprall 2b07266
export EuiBasicTableColumn type
chandlerprall dda88bd
Added TD attributes to field and computed column types
chandlerprall 21d3836
Accept string | number for EuiTableSortMobile's key
chandlerprall d25f49c
Merge chandlerprall/ts-basic-table into ts-basic-table.
sainthkh d11b1c1
Merge remote-tracking branch 'upstream/master' into ts-basic-table
sainthkh e3620a8
Merge branch 'master' into saintkh-ts-basic-table
chandlerprall 8e513a3
changelog
chandlerprall File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
File renamed without changes.
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
18 changes: 18 additions & 0 deletions
18
...pshots__/default_item_action.test.js.snap → ...shots__/default_item_action.test.tsx.snap
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
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import { EuiIconType } from '../icon/icon'; | ||
import { ButtonIconColor } from '../button/button_icon/button_icon'; | ||
import { EuiButtonEmptyColor } from '../button/button_empty/button_empty'; | ||
|
||
type IconFunction = (item: any) => EuiIconType; | ||
type ButtonColor = ButtonIconColor | EuiButtonEmptyColor; | ||
type ButtonIconColorFunction = (item: any) => ButtonColor; | ||
|
||
interface DefaultItemActionBase { | ||
name: string; | ||
description: string; | ||
onClick?: (item: any) => void; | ||
href?: string; | ||
target?: string; | ||
available?: (item: any) => boolean; | ||
enabled?: (item: any) => boolean; | ||
isPrimary?: boolean; | ||
'data-test-subj'?: string; | ||
} | ||
|
||
export interface DefaultItemEmptyButtonAction extends DefaultItemActionBase { | ||
type?: 'button'; | ||
color?: EuiButtonEmptyColor | ButtonIconColorFunction; | ||
} | ||
|
||
export interface DefaultItemIconButtonAction extends DefaultItemActionBase { | ||
type: 'icon'; | ||
icon: EuiIconType | IconFunction; | ||
color?: ButtonIconColor | ButtonIconColorFunction; | ||
} | ||
|
||
export type DefaultItemAction = | ||
| DefaultItemEmptyButtonAction | ||
| DefaultItemIconButtonAction; | ||
|
||
export interface CustomItemAction { | ||
render: (item: any, enabled?: boolean) => any; | ||
available?: (item: any) => boolean; | ||
enabled?: (item: any) => boolean; | ||
isPrimary?: boolean; | ||
} | ||
|
||
export type Action = DefaultItemAction | CustomItemAction; |
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why has this been renamed? I think it should be done as a separate PR, assuming it's actually necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
onSelectionChanged
was never correct, see #2432 / #2433