-
Notifications
You must be signed in to change notification settings - Fork 4
chore: bump @koobiq/ag-grid-angular-theme to 34.4.0, added new examples (#DS-5157) #1686
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
f92aa06
chore: bump @koobiq/ag-grid-angular-theme to 34.4.0, added new exampl…
artembelik 2e28ee2
refactor: examples
artembelik f8ed658
refactor: column menu example
artembelik 1cecf29
docs(ag-grid): improve infinite selection section wording (#DS-5157)
rmnturov 6868e23
docs(ag-grid): describe column menu search, reset and pinning constra…
rmnturov 1800f2c
refactor: en
artembelik 2ae06cb
refactor(ag-grid): add more columns with descriptive names to column …
rmnturov 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
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
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
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
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
108 changes: 108 additions & 0 deletions
108
...mples/components/ag-grid/ag-grid-infinite-selection/ag-grid-infinite-selection-example.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,108 @@ | ||
| import { JsonPipe } from '@angular/common'; | ||
| import { ChangeDetectionStrategy, Component } from '@angular/core'; | ||
| import { | ||
| KbqAgGridInfiniteSelectionState, | ||
| KbqAgGridSkeletonCellRenderer, | ||
| KbqAgGridThemeModule | ||
| } from '@koobiq/ag-grid-angular-theme'; | ||
| import { AgGridModule } from 'ag-grid-angular'; | ||
| import { | ||
| AllCommunityModule, | ||
| ColDef, | ||
| GetRowIdFunc, | ||
| ICellRendererParams, | ||
| IDatasource, | ||
| IGetRowsParams, | ||
| ModuleRegistry, | ||
| RowSelectionOptions | ||
| } from 'ag-grid-community'; | ||
|
|
||
| ModuleRegistry.registerModules([AllCommunityModule]); | ||
|
|
||
| const ROW_DATA = Array.from({ length: 1000 }, (_, index) => ({ | ||
| id: 'ProjectName' + index, | ||
| column0: 'ProjectName ' + index, | ||
| column1: 'Text ' + index, | ||
| column2: 'Text ' + index, | ||
| column3: 'Text ' + index, | ||
| column4: 'Text ' + index, | ||
| column5: 'Text ' + index | ||
| })); | ||
|
|
||
| /** | ||
| * @title AG Grid with infinite selection | ||
| */ | ||
| @Component({ | ||
| selector: 'ag-grid-infinite-selection-example', | ||
| imports: [AgGridModule, KbqAgGridThemeModule, JsonPipe], | ||
| template: ` | ||
| <ag-grid-angular | ||
| #selection="kbqAgGridInfiniteSelection" | ||
| kbqAgGridTheme | ||
| kbqAgGridThemeDisableCellFocusStyles | ||
| kbqAgGridInfiniteSelection | ||
| kbqAgGridSelectRowsByShiftClick | ||
| kbqAgGridToNextRowByTab | ||
| kbqAgGridSelectRowsByShiftArrow | ||
| kbqAgGridSelectRowsByCtrlClick | ||
| [columnDefs]="columnDefs" | ||
| [defaultColDef]="defaultColDef" | ||
| [rowSelection]="rowSelection" | ||
| [kbqAgGridInfiniteSelectionDatasource]="datasource" | ||
| [getRowId]="getRowId" | ||
| [cacheBlockSize]="10" | ||
| (kbqAgGridInfiniteSelectionStateChange)="onSelectAllChange($event)" | ||
| /> | ||
| <pre class="kbq-scrollbar"><code>{{ selection.state() | json }}</code></pre> | ||
| `, | ||
| styles: ` | ||
| :host { | ||
| display: flex; | ||
| gap: var(--kbq-size-xl); | ||
| } | ||
|
|
||
| ag-grid-angular { | ||
| flex-grow: 1; | ||
| height: 300px; | ||
| } | ||
|
|
||
| pre { | ||
| margin: 0; | ||
| width: 180px; | ||
| max-height: 300px; | ||
| overflow: scroll; | ||
| font-size: var(--kbq-typography-text-compact-font-size); | ||
| color: var(--kbq-foreground-contrast-secondary); | ||
| } | ||
| `, | ||
| changeDetection: ChangeDetectionStrategy.OnPush | ||
| }) | ||
| export class AgGridInfiniteSelectionExample { | ||
| protected readonly columnDefs: ColDef[] = [ | ||
| { field: 'column0', headerName: 'Project name' }, | ||
| { field: 'column1', headerName: 'Text' }, | ||
| { field: 'column2', headerName: 'Text' }, | ||
| { field: 'column3', headerName: 'Text' }, | ||
| { field: 'column4', headerName: 'Text' }, | ||
| { field: 'column5', headerName: 'Text' } | ||
| ]; | ||
| protected readonly datasource: IDatasource = { | ||
| rowCount: ROW_DATA.length, | ||
| getRows: ({ startRow, endRow, successCallback }: IGetRowsParams) => { | ||
| setTimeout(() => successCallback(ROW_DATA.slice(startRow, endRow), ROW_DATA.length), 500); | ||
| } | ||
| }; | ||
| protected readonly getRowId: GetRowIdFunc = ({ data }) => data.id; | ||
| protected readonly defaultColDef: ColDef = { | ||
| cellRendererSelector: (params: ICellRendererParams) => | ||
| params.data === undefined ? { component: KbqAgGridSkeletonCellRenderer } : undefined | ||
| }; | ||
| protected readonly rowSelection: RowSelectionOptions = { | ||
| mode: 'multiRow', | ||
| isRowSelectable: ({ data }) => data !== undefined | ||
| }; | ||
|
|
||
| protected onSelectAllChange(state: KbqAgGridInfiniteSelectionState): void { | ||
| console.debug('onSelectAllChange: ', state); | ||
| } | ||
| } |
65 changes: 65 additions & 0 deletions
65
...cs-examples/components/ag-grid/ag-grid-loading-overlay/ag-grid-loading-overlay-example.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,65 @@ | ||
| import { ChangeDetectionStrategy, Component, model } from '@angular/core'; | ||
| import { FormsModule } from '@angular/forms'; | ||
| import { kbqAgGridLoadingOverlayConfigProvider, KbqAgGridThemeModule } from '@koobiq/ag-grid-angular-theme'; | ||
| import { KbqToggleModule } from '@koobiq/components/toggle'; | ||
| import { AgGridModule } from 'ag-grid-angular'; | ||
| import { AllCommunityModule, ColDef, ModuleRegistry } from 'ag-grid-community'; | ||
|
|
||
| ModuleRegistry.registerModules([AllCommunityModule]); | ||
|
|
||
| /** | ||
| * @title AG Grid with loading overlay | ||
| */ | ||
| @Component({ | ||
| selector: 'ag-grid-loading-overlay-example', | ||
| imports: [AgGridModule, KbqAgGridThemeModule, KbqToggleModule, FormsModule], | ||
| template: ` | ||
| <kbq-toggle [(ngModel)]="loading">Show loading overlay</kbq-toggle> | ||
|
|
||
| <ag-grid-angular | ||
| kbqAgGridTheme | ||
| kbqAgGridSelectRowsByShiftClick | ||
| kbqAgGridThemeDisableCellFocusStyles | ||
| kbqAgGridToNextRowByTab | ||
| kbqAgGridSelectRowsByShiftArrow | ||
| kbqAgGridSelectRowsByCtrlClick | ||
| [kbqAgGridLoadingOverlay]="loading()" | ||
| [rowData]="rowData" | ||
| [columnDefs]="columnDefs" | ||
| /> | ||
| `, | ||
| styles: ` | ||
| :host { | ||
| display: flex; | ||
| flex-direction: column; | ||
| align-items: center; | ||
| gap: var(--kbq-size-xl); | ||
| } | ||
|
|
||
| ag-grid-angular { | ||
| height: 300px; | ||
| width: 100%; | ||
| } | ||
| `, | ||
| providers: [kbqAgGridLoadingOverlayConfigProvider({ rows: 6, cols: 4 })], | ||
| changeDetection: ChangeDetectionStrategy.OnPush | ||
| }) | ||
| export class AgGridLoadingOverlayExample { | ||
| readonly loading = model(true); | ||
| readonly columnDefs: ColDef[] = [ | ||
| { field: 'column0', headerName: 'Text' }, | ||
| { field: 'column1', headerName: 'Text' }, | ||
| { field: 'column2', headerName: 'Text' }, | ||
| { field: 'column3', headerName: 'Text' }, | ||
| { field: 'column4', headerName: 'Text' }, | ||
| { field: 'column5', headerName: 'Text' } | ||
| ]; | ||
| readonly rowData = Array.from({ length: 50 }, (_, index) => ({ | ||
| column0: 'Text ' + index, | ||
| column1: 'Text ' + index, | ||
| column2: 'Text ' + index, | ||
| column3: 'Text ' + index, | ||
| column4: 'Text ' + index, | ||
| column5: 'Text ' + index | ||
| })); | ||
| } |
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.