-
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(plugins): move Row Detail View plugin to universal
- create it as a separate package
- Loading branch information
1 parent
2e240cc
commit 9700ff4
Showing
23 changed files
with
195 additions
and
356 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
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
80 changes: 80 additions & 0 deletions
80
packages/common/src/interfaces/slickRowDetailView.interface.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
import { Column, GridOption, RowDetailViewOption, SlickEvent, SlickGrid, } from './index'; | ||
import { ContainerService } from '../services/container.service'; | ||
import { UsabilityOverrideFn } from '../enums'; | ||
|
||
/** A plugin to add row detail panel. */ | ||
export interface SlickRowDetailView { | ||
pluginName: 'RowDetailView'; | ||
|
||
/** Initialize the SlickGrid 3rd party plugin */ | ||
init(grid: SlickGrid, containerService?: ContainerService): void; | ||
|
||
/** @deprecated @use `dispose` Destroy (dispose) the SlickGrid 3rd party plugin */ | ||
destroy(): void; | ||
|
||
/** Destroy (dispose) the SlickGrid 3rd party plugin */ | ||
dispose(): void; | ||
|
||
/** Create the plugin */ | ||
create(columnDefinitions: Column[], gridOptions: GridOption): SlickRowDetailView | null; | ||
|
||
/** Collapse all of the open items */ | ||
collapseAll(): void; | ||
|
||
/** Colapse an Item so it is not longer seen */ | ||
collapseDetailView(item: any, isMultipleCollapsing: boolean): void; | ||
|
||
/** Expand a row given the dataview item that is to be expanded */ | ||
expandDetailView(item: any): void; | ||
|
||
/** Override the logic for showing (or not) the expand icon (use case example: only every 2nd row is expandable) */ | ||
expandableOverride(overrideFn: UsabilityOverrideFn): void; | ||
|
||
/** Get the Column Definition of the first column dedicated to toggling the Row Detail View */ | ||
getColumnDefinition(): Column; | ||
|
||
/** Get the row expandable Override function */ | ||
getExpandableOverride(): UsabilityOverrideFn; | ||
|
||
/** return the currently expanded rows */ | ||
getExpandedRows(): Array<number | string>; | ||
|
||
/** Takes in the item we are filtering and if it is an expanded row returns it's parents row to filter on */ | ||
getFilterItem(item: any): any; | ||
|
||
/** Get current plugin options */ | ||
getOptions(): RowDetailViewOption; | ||
|
||
/** Resize the Row Detail View */ | ||
resizeDetailView(item: any): void; | ||
|
||
/** Saves the current state of the detail view */ | ||
saveDetailView(item: any): void; | ||
|
||
/** | ||
* Change plugin options | ||
* @options An object with configuration options. | ||
*/ | ||
setOptions(options: RowDetailViewOption): void; | ||
|
||
// -- | ||
// Events | ||
|
||
/** Fired when the async response finished */ | ||
onAsyncEndUpdate?: SlickEvent<{ item: any; grid: SlickGrid; }>; | ||
|
||
/** This event must be used with the "notify" by the end user once the Asynchronous Server call returns the item detail */ | ||
onAsyncResponse?: SlickEvent<{ item: any; detailView?: any }>; | ||
|
||
/** Fired after the row detail gets toggled */ | ||
onAfterRowDetailToggle?: SlickEvent<{ item: any; expandedRows: Array<number | string>; grid: SlickGrid; }>; | ||
|
||
/** Fired before the row detail gets toggled */ | ||
onBeforeRowDetailToggle?: SlickEvent<{ item: any; grid: SlickGrid; }>; | ||
|
||
/** Fired after the row detail gets toggled */ | ||
onRowBackToViewportRange?: SlickEvent<{ item: any; rowId: number | string; rowIndex: number; expandedRows: Array<number | string>; rowIdsOutOfViewport: Array<number | string>; grid: SlickGrid; }>; | ||
|
||
/** Fired after a row becomes out of viewport range (user can't see the row anymore) */ | ||
onRowOutOfViewportRange?: SlickEvent<{ item: any; rowId: number | string; rowIndex: number; expandedRows: Array<number | string>; rowIdsOutOfViewport: Array<number | string>; grid: SlickGrid; }>; | ||
} |
69 changes: 0 additions & 69 deletions
69
packages/common/src/plugins/__tests__/slickRowDetail.spec.ts
This file was deleted.
Oops, something went wrong.
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
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
Oops, something went wrong.