-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: add stretchRange option in JustifiedGrid * feat: add passUnstretchRow * fix: fix stretch cost * feat: add index property in GridItem * feat: add stretch, stretchRange, passUnstretchRow * demo: add stretch demo * test: test `stretch` options * fix: fix FrameGrid useless code
- Loading branch information
Showing
42 changed files
with
1,146 additions
and
50 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
52 changes: 52 additions & 0 deletions
52
packages/ngx-grid/stories/2-JustifiedGrid/5-StretchedJustifiedGrid.stories.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,52 @@ | ||
import { AppComponent } from './apps/NgxKeepRatioWithMaintainedTargetApp/app.component'; | ||
import { JUSTIFIED_GRID_CONTROLS } from '../../../../stories/templates/controls'; | ||
import { convertPath, convertAngularTemplate, makeArgs } from '../../../../stories/utils'; | ||
import HTML_TEMPLATE from '!!raw-loader!./apps/NgxKeepRatioWithMaintainedTargetApp/app.component.html'; | ||
import CSS_TEMPLATE from '!!raw-loader!../../../../stories/templates/default.css'; | ||
import RawApp from '!!raw-loader!./apps/NgxKeepRatioWithMaintainedTargetApp/app.component.ts'; | ||
import MODULE_TEMPLATE from '!!raw-loader!../apps/default/app.module.ts'; | ||
|
||
export const StretchedJustifiedGridTemplate = (props: any) => ({ | ||
component: AppComponent, | ||
props: { | ||
...props, | ||
key: JSON.stringify(props), | ||
}, | ||
}); | ||
StretchedJustifiedGridTemplate.storyName = "Stretched Items with JustifiedGrid"; | ||
|
||
|
||
StretchedJustifiedGridTemplate.argTypes = JUSTIFIED_GRID_CONTROLS; | ||
StretchedJustifiedGridTemplate.args = { | ||
...makeArgs(StretchedJustifiedGridTemplate.argTypes), | ||
stretch: true, | ||
sizeRange: [200, 300], | ||
}; | ||
|
||
StretchedJustifiedGridTemplate.parameters = { | ||
preview: [ | ||
{ | ||
tab: "CSS", | ||
template: CSS_TEMPLATE, | ||
language: "css", | ||
}, | ||
{ | ||
tab: "Angular", | ||
template: HTML_TEMPLATE, | ||
language: "html", | ||
description: "app.component.html", | ||
}, | ||
{ | ||
tab: "Angular", | ||
template: convertAngularTemplate(convertPath(RawApp, "projects", "@egjs/ngx-grid")), | ||
language: "ts", | ||
description: "app.component.ts", | ||
}, | ||
{ | ||
tab: "Angular", | ||
template: convertPath(MODULE_TEMPLATE, "projects", "@egjs/ngx-grid"), | ||
language: "ts", | ||
description: "app.module.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
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
26 changes: 26 additions & 0 deletions
26
packages/react-grid/stories/2-JustifiedGrid/5-StretchedJustifiedGrid.stories.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,26 @@ | ||
import App from "./apps/ReactKeepRatioWithMaintainedTargetApp"; | ||
import RawApp from "!!raw-loader!./apps/ReactKeepRatioWithMaintainedTargetApp"; | ||
import { JUSTIFIED_GRID_CONTROLS } from "../../../../stories/templates/controls"; | ||
import { makeArgs, convertReactTemplate, convertPath } from "../../../../stories/utils"; | ||
import "../../../../stories/templates/default.css"; | ||
|
||
export const StretchedJustifiedGridTemplate = App.bind({}) as any; | ||
|
||
|
||
StretchedJustifiedGridTemplate.storyName = "Stretched Items with JustifiedGrid"; | ||
StretchedJustifiedGridTemplate.argTypes = JUSTIFIED_GRID_CONTROLS; | ||
StretchedJustifiedGridTemplate.args = { | ||
...makeArgs(StretchedJustifiedGridTemplate.argTypes), | ||
stretch: true, | ||
sizeRange: [200, 300], | ||
}; | ||
|
||
StretchedJustifiedGridTemplate.parameters = { | ||
preview: [ | ||
{ | ||
tab: "React", | ||
template: convertReactTemplate(convertPath(RawApp, "react-grid", "@egjs/react-grid")), | ||
language: "tsx", | ||
}, | ||
], | ||
}; |
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
28 changes: 28 additions & 0 deletions
28
packages/svelte-grid/stories/2-JustifiedGrid/5-StretchedJustifiedGrid.stories.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,28 @@ | ||
import JustifiedGridApp from "./apps/SvelteKeepRatioWithMaintainedTargetApp.svelte"; | ||
import RawJustifiedGridApp from "!!raw-loader!./apps/SvelteKeepRatioWithMaintainedTargetApp.svelte"; | ||
import { JUSTIFIED_GRID_CONTROLS } from "../../../../stories/templates/controls"; | ||
import { convertPath, convertSvelteTemplate, makeArgs } from "../../../../stories/utils"; | ||
import "../../../../stories/templates/default.css"; | ||
|
||
export const StretchedJustifiedGridTemplate = (props) => ({ | ||
Component: JustifiedGridApp, | ||
props, | ||
}); | ||
|
||
StretchedJustifiedGridTemplate.storyName = "Stretched Items with JustifiedGrid"; | ||
StretchedJustifiedGridTemplate.argTypes = JUSTIFIED_GRID_CONTROLS; | ||
StretchedJustifiedGridTemplate.args = { | ||
...makeArgs(StretchedJustifiedGridTemplate.argTypes), | ||
stretch: true, | ||
sizeRange: [200, 300], | ||
}; | ||
|
||
StretchedJustifiedGridTemplate.parameters = { | ||
preview: [ | ||
{ | ||
tab: "Svelte", | ||
template: convertSvelteTemplate(convertPath(RawJustifiedGridApp, "src", "@egjs/svelte-grid")), | ||
language: "html", | ||
}, | ||
], | ||
}; |
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
28 changes: 28 additions & 0 deletions
28
packages/vue-grid/stories/2-JustifiedGrid/5-StretchedJustifiedGrid.stories.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,28 @@ | ||
/* eslint-disable import/no-webpack-loader-syntax */ | ||
import App from "./apps/VueKeepRatioWithMaintainedTargetApp.vue"; | ||
import RawApp from "!!raw-loader!./apps/VueKeepRatioWithMaintainedTargetApp.vue"; | ||
import { JUSTIFIED_GRID_CONTROLS } from "../../../../stories/templates/controls"; | ||
import { convertPath, convertVueTemplate, makeArgs } from "../../../../stories/utils"; | ||
import "../../../../stories/templates/default.css"; | ||
import { makeVueApp } from "../utils"; | ||
|
||
export const StretchedJustifiedGridTemplate = makeVueApp(App); | ||
|
||
|
||
StretchedJustifiedGridTemplate.storyName = "Stretched Items with JustifiedGrid"; | ||
StretchedJustifiedGridTemplate.argTypes = JUSTIFIED_GRID_CONTROLS; | ||
StretchedJustifiedGridTemplate.args = { | ||
...makeArgs(StretchedJustifiedGridTemplate.argTypes), | ||
stretch: true, | ||
sizeRange: [200, 300], | ||
}; | ||
|
||
StretchedJustifiedGridTemplate.parameters = { | ||
preview: [ | ||
{ | ||
tab: "Vue", | ||
template: convertVueTemplate(convertPath(RawApp, "src", "@egjs/vue-grid")), | ||
language: "html", | ||
}, | ||
], | ||
}; |
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.