-
Notifications
You must be signed in to change notification settings - Fork 423
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: migrate Resizer Plugin to TypeScript (#815)
- Loading branch information
1 parent
0037c7d
commit 762ec3d
Showing
10 changed files
with
406 additions
and
353 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
export interface GridSize { | ||
/** | ||
* When using a fixed grid height, can be a number or a string. | ||
* if a number is provided it will add the `px` suffix for pixels, or if a string is passed it will use it as is. | ||
*/ | ||
height?: number | string; | ||
|
||
/** | ||
* When using a fixed grid width, can be a number or a string. | ||
* if a number is provided it will add the `px` suffix for pixels, or if a string is passed it will use it as is. | ||
*/ | ||
width?: number | string; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
export interface ResizerOption { | ||
/** Defaults to false, do we want to apply the resized dimentions to the grid container as well? */ | ||
applyResizeToContainer?: boolean; | ||
|
||
/** Defaults to 'window', which DOM element are we using to calculate the available size for the grid? */ | ||
calculateAvailableSizeBy?: 'container' | 'window'; | ||
|
||
/** bottom padding of the grid in pixels */ | ||
bottomPadding?: number; | ||
|
||
/** | ||
* Page Container. Either selector (for example '.page-container' or '#page-container'), or an HTMLElement. | ||
* Basically what element in the page will be used to calculate the available space. | ||
*/ | ||
container?: string | HTMLElement; | ||
|
||
/** | ||
* Grid Container selector, for example '.myGrid' or '#myGrid', this is provided by the lib internally. | ||
* | ||
* Optional but when provided it will be resized with same size as the grid (typically a container holding the grid and extra custom footer/pagination) | ||
* This is useful when you want the footer/pagination to be exactly the same width as the grid (this lib takes care of it internally) | ||
*/ | ||
gridContainer?: string | HTMLElement; | ||
|
||
/** maximum height (pixels) of the grid */ | ||
maxHeight?: number; | ||
|
||
/** minimum height (pixels) of the grid */ | ||
minHeight?: number; | ||
|
||
/** maximum width (pixels) of the grid */ | ||
maxWidth?: number; | ||
|
||
/** minimum width (pixels) of the grid */ | ||
minWidth?: number; | ||
|
||
/** padding on the right side of the grid (pixels) */ | ||
rightPadding?: number; | ||
} |
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.