-
Notifications
You must be signed in to change notification settings - Fork 8
fix(cli): add grid components types selection for project creation #1730
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
Open
georgianastasov
wants to merge
14
commits into
master
Choose a base branch
from
ganastasov/add-grids-components-selection
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
71ff727
fix(cli): add tree, hierarchical, and pivot grid options for react
georgianastasov d1bf1e3
fix(components): add rel attributes to target blank links
georgianastasov 1c46d31
fix(components): add rel attributes to target blank links
georgianastasov 21e8a37
fix(components): add rel attributes to target blank links
georgianastasov 9a6fcf6
fix(components): add rel attributes to target blank links
georgianastasov 54c7d22
feat(cli): grid components with improved styles and layouts for angular
georgianastasov 8c80c80
fix(cli): refactor the data for the grids in react
georgianastasov b8769dd
fix(cli): add tree, hierarchical, and pivot grid components for wc
georgianastasov 63e968f
Potential fix for pull request finding
georgianastasov 5b78ce0
Potential fix for pull request finding
georgianastasov 7302f8e
Potential fix for pull request finding
georgianastasov 4eb5322
fix(components): normalize router navigation paths
georgianastasov 85f3d2c
Merge branch 'ganastasov/add-grids-components-selection' of https://g…
georgianastasov f1fc98e
fix(components): add shared data path for template components files
georgianastasov 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 hidden or 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.
File renamed without changes.
File renamed without changes.
This file contains hidden or 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
46 changes: 0 additions & 46 deletions
46
packages/cli/templates/react/igr-ts/grid/basic/files/src/app/__path__/data.tsx
This file was deleted.
Oops, something went wrong.
24 changes: 17 additions & 7 deletions
24
packages/cli/templates/react/igr-ts/grid/basic/files/src/app/__path__/style.module.css
This file contains hidden or 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,27 @@ | ||
| :local(.container) { | ||
| padding-top: 24px; | ||
| :local(.page) { | ||
| width: 100%; | ||
| margin-top: 40px; | ||
| padding: 0 48px; | ||
| display: flex; | ||
| flex-flow: column; | ||
| justify-content: center; | ||
| flex-direction: column; | ||
| align-items: center; | ||
| } | ||
|
|
||
| :local(.title) { | ||
| color: rgb(0, 153, 255); | ||
| text-align: center; | ||
| font-size: 2.5rem; | ||
| font-weight: 600; | ||
| } | ||
|
|
||
| :local(.subtitle) { | ||
| text-align: center; | ||
| margin-bottom: 32px; | ||
| margin-top: 16px; | ||
| font-size: 14px; | ||
| } | ||
|
|
||
| :local(.grid) { | ||
| width: 80%; | ||
| margin-bottom: 24px; | ||
| border: 1px solid rgb(0, 153, 255); | ||
| width: 100%; | ||
| max-width: 1200px; | ||
| } |
This file contains hidden or 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,23 +1,33 @@ | ||
|
|
||
| import { IgniteUIForReactTemplate } from "../../../../../lib/templates/IgniteUIForReactTemplate"; | ||
| import { IGNITEUI_REACT_GRIDS_PACKAGE } from "../../constants"; | ||
| import * as path from "path"; | ||
|
|
||
| const SHARED_DATA_ROOT = path.join(__dirname, "../../../../../shared-data"); | ||
|
|
||
| class GridTemplate extends IgniteUIForReactTemplate { | ||
| /** | ||
| * | ||
| */ | ||
| constructor() { | ||
| super(__dirname); | ||
| this.id = "grid"; | ||
| this.name = "Grid"; | ||
| this.widget = "igGrid"; | ||
| this.description = "IgrGrid template for React"; | ||
| this.projectType = "igr-ts"; | ||
| this.components = ["Grid"]; | ||
| this.controlGroup = "Data Grids"; | ||
| this.packages = [IGNITEUI_REACT_GRIDS_PACKAGE]; | ||
| /** | ||
| * | ||
| */ | ||
| constructor() { | ||
| super(__dirname); | ||
| this.id = "grid"; | ||
| this.name = "Grid"; | ||
| this.widget = "igGrid"; | ||
| this.description = "IgrGrid template for React"; | ||
| this.projectType = "igr-ts"; | ||
| this.components = ["Grid"]; | ||
| this.controlGroup = "Data Grids"; | ||
| this.packages = [IGNITEUI_REACT_GRIDS_PACKAGE]; | ||
|
|
||
| this.hasExtraConfiguration = false; | ||
| } | ||
|
|
||
| this.hasExtraConfiguration = false; | ||
| } | ||
| public get templatePaths(): string[] { | ||
| return [ | ||
| ...super.templatePaths, | ||
| path.join(SHARED_DATA_ROOT, "grid", "files") | ||
| ]; | ||
| } | ||
| } | ||
| module.exports = new GridTemplate(); |
13 changes: 13 additions & 0 deletions
13
...lates/react/igr-ts/hierarchical-grid/basic/files/src/app/__path__/__filePrefix__.test.tsx
This file contains hidden or 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 @@ | ||
| import { beforeAll, expect, test } from 'vitest'; | ||
| import { render } from '@testing-library/react'; | ||
| import $(ClassName) from './$(path)'; | ||
| import { setupTestMocks } from '../../setupTests'; | ||
|
|
||
| beforeAll(() => { | ||
| setupTestMocks(); | ||
| }) | ||
|
|
||
| test('renders $(ClassName) component', () => { | ||
| const wrapper = render(<$(ClassName) />); | ||
| expect(wrapper).toBeTruthy(); | ||
| }); |
43 changes: 43 additions & 0 deletions
43
.../templates/react/igr-ts/hierarchical-grid/basic/files/src/app/__path__/__filePrefix__.tsx
This file contains hidden or 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 style from './style.module.css'; | ||
| import { IgrHierarchicalGrid, IgrRowIsland, IgrColumn } from 'igniteui-react-grids'; | ||
| import 'igniteui-react-grids/grids/themes/light/bootstrap.css'; | ||
|
|
||
| import { ARTISTS } from './data'; | ||
|
|
||
| export default function $(ClassName)() { | ||
| const title = '$(name)'; | ||
|
|
||
| return ( | ||
| <div className={style.page}> | ||
| <p className={style.title}>{title}</p> | ||
| <p className={style.subtitle}> | ||
| IgrHierarchicalGrid with basic configuration.<br /> | ||
| You can read more about configuring the IgrHierarchicalGrid component in the | ||
| <a href="https://www.infragistics.com/products/ignite-ui-react/react/components/grids/hierarchical-grid/overview.html" target="_blank" rel="noopener noreferrer"> | ||
| official documentation | ||
| </a>. | ||
| </p> | ||
| <div className={style.grid}> | ||
| <IgrHierarchicalGrid data={ARTISTS} primaryKey="Artist" autoGenerate={false} height="600px" width="100%"> | ||
| <IgrColumn field="Artist" dataType="string" /> | ||
| <IgrColumn field="HasGrammyAward" header="Has Grammy Award" dataType="boolean" /> | ||
| <IgrColumn field="Debut" dataType="number" /> | ||
| <IgrColumn field="GrammyNominations" header="Grammy Nominations" dataType="number" /> | ||
| <IgrColumn field="GrammyAwards" header="Grammy Awards" dataType="number" /> | ||
| <IgrRowIsland childDataKey="Albums" primaryKey="Album" autoGenerate={false}> | ||
| <IgrColumn field="Album" dataType="string" /> | ||
| <IgrColumn field="LaunchDate" header="Launch Date" dataType="date" /> | ||
| <IgrColumn field="BillboardReview" header="Billboard Review" dataType="number" /> | ||
| <IgrColumn field="USBillboard200" header="US Billboard 200" dataType="number" /> | ||
| <IgrRowIsland childDataKey="Songs" primaryKey="TrackNumber" autoGenerate={false}> | ||
| <IgrColumn field="TrackNumber" header="Track" dataType="string" /> | ||
| <IgrColumn field="Title" dataType="string" /> | ||
| <IgrColumn field="Released" dataType="string" /> | ||
| <IgrColumn field="Genre" dataType="string" /> | ||
| </IgrRowIsland> | ||
| </IgrRowIsland> | ||
| </IgrHierarchicalGrid> | ||
| </div> | ||
| </div> | ||
| ); | ||
| } |
27 changes: 27 additions & 0 deletions
27
...li/templates/react/igr-ts/hierarchical-grid/basic/files/src/app/__path__/style.module.css
This file contains hidden or 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,27 @@ | ||
| :local(.page) { | ||
| width: 100%; | ||
| margin-top: 40px; | ||
| padding: 0 48px; | ||
| display: flex; | ||
| flex-direction: column; | ||
| align-items: center; | ||
| } | ||
|
|
||
| :local(.title) { | ||
| color: rgb(0, 153, 255); | ||
| text-align: center; | ||
| font-size: 2.5rem; | ||
| font-weight: 600; | ||
| } | ||
|
|
||
| :local(.subtitle) { | ||
| text-align: center; | ||
| margin-bottom: 32px; | ||
| margin-top: 16px; | ||
| font-size: 14px; | ||
| } | ||
|
|
||
| :local(.grid) { | ||
| width: 100%; | ||
| max-width: 1200px; | ||
| } |
28 changes: 28 additions & 0 deletions
28
packages/cli/templates/react/igr-ts/hierarchical-grid/basic/index.ts
This file contains hidden or 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 { IgniteUIForReactTemplate } from "../../../../../lib/templates/IgniteUIForReactTemplate"; | ||
| import { IGNITEUI_REACT_GRIDS_PACKAGE } from "../../constants"; | ||
| import * as path from "path"; | ||
|
|
||
| const SHARED_DATA_ROOT = path.join(__dirname, "../../../../../shared-data"); | ||
|
|
||
| class HierarchicalGridTemplate extends IgniteUIForReactTemplate { | ||
| constructor() { | ||
| super(__dirname); | ||
| this.id = "hierarchical-grid"; | ||
| this.name = "Hierarchical Grid"; | ||
| this.widget = "igHierarchicalGrid"; | ||
| this.description = "IgrHierarchicalGrid template for React"; | ||
| this.projectType = "igr-ts"; | ||
| this.components = ["Hierarchical Grid"]; | ||
| this.controlGroup = "Data Grids"; | ||
| this.packages = [IGNITEUI_REACT_GRIDS_PACKAGE]; | ||
| this.hasExtraConfiguration = false; | ||
| } | ||
|
|
||
| public get templatePaths(): string[] { | ||
| return [ | ||
| ...super.templatePaths, | ||
| path.join(SHARED_DATA_ROOT, "hierarchical-grid", "files") | ||
| ]; | ||
| } | ||
| } | ||
| module.exports = new HierarchicalGridTemplate(); |
11 changes: 11 additions & 0 deletions
11
packages/cli/templates/react/igr-ts/hierarchical-grid/index.ts
This file contains hidden or 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,11 @@ | ||
| import { BaseComponent } from "@igniteui/cli-core"; | ||
|
|
||
| class IgrTsHierarchicalGridComponent extends BaseComponent { | ||
| constructor() { | ||
| super(__dirname); | ||
| this.name = "Hierarchical Grid"; | ||
| this.group = "Grids & Lists"; | ||
| this.description = "IgrHierarchicalGrid component for React"; | ||
| } | ||
| } | ||
| module.exports = new IgrTsHierarchicalGridComponent(); |
13 changes: 13 additions & 0 deletions
13
...li/templates/react/igr-ts/pivot-grid/basic/files/src/app/__path__/__filePrefix__.test.tsx
This file contains hidden or 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 @@ | ||
| import { beforeAll, expect, test } from 'vitest'; | ||
| import { render } from '@testing-library/react'; | ||
| import $(ClassName) from './$(path)'; | ||
| import { setupTestMocks } from '../../setupTests'; | ||
|
|
||
| beforeAll(() => { | ||
| setupTestMocks(); | ||
| }) | ||
|
|
||
| test('renders $(ClassName) component', () => { | ||
| const wrapper = render(<$(ClassName) />); | ||
| expect(wrapper).toBeTruthy(); | ||
| }); |
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.
Uh oh!
There was an error while loading. Please reload this page.