@genesislcap/grid-pro 14.277.0 → 14.278.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +109 -27
- package/dist/custom-elements.json +632 -632
- package/package.json +13 -13
package/README.md
CHANGED
|
@@ -440,20 +440,44 @@ The Grid Pro component supports a comprehensive status bar system at the bottom
|
|
|
440
440
|
|
|
441
441
|
### Enterprise License Requirement
|
|
442
442
|
|
|
443
|
-
**Important**: Status bar functionality requires the AG Grid Enterprise module to be available. Status bar components will only be displayed if the Enterprise module is properly licensed and configured.
|
|
443
|
+
**Important**: Status bar functionality requires the AG Grid Enterprise module to be available. Status bar components will only be displayed if the Enterprise module is properly licensed and configured. If the Enterprise module is not available, the status bar will be silently disabled without affecting grid functionality.
|
|
444
444
|
|
|
445
445
|
### Basic Status Bar Usage
|
|
446
446
|
|
|
447
447
|
The status bar can be enabled using the datasource attributes and configured through the `status-bar-config` attribute:
|
|
448
448
|
|
|
449
|
-
```
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
449
|
+
```typescript
|
|
450
|
+
const customStatusBarConfig = {
|
|
451
|
+
rows: false, // Disable row count component
|
|
452
|
+
maxRows: false, // Disable max rows label-value component
|
|
453
|
+
loadMore: false, // Disable load more button
|
|
454
|
+
reload: true // Enable reload button
|
|
455
|
+
};
|
|
456
|
+
|
|
457
|
+
const template = html`
|
|
458
|
+
<rapid-grid-pro pagination with-status-bar :statusBarConfig="${(x) => customStatusBarConfig}">
|
|
459
|
+
<grid-pro-client-side-datasource
|
|
460
|
+
resource-name="ALL_TRADES"
|
|
461
|
+
></grid-pro-client-side-datasource>
|
|
462
|
+
</rapid-grid-pro>
|
|
463
|
+
`;
|
|
464
|
+
```
|
|
465
|
+
|
|
466
|
+
### Default Status Bar Configuration
|
|
467
|
+
|
|
468
|
+
When `with-status-bar` is enabled without providing a custom configuration, the following default configuration is applied:
|
|
469
|
+
|
|
470
|
+
```typescript
|
|
471
|
+
const DEFAULT_STATUS_BAR_CONFIG = {
|
|
472
|
+
rows: true, // Row count component enabled by default
|
|
473
|
+
loadMore: {
|
|
474
|
+
tooltip: 'Load more rows from server' // Load more button with default tooltip
|
|
475
|
+
},
|
|
476
|
+
reload: {
|
|
477
|
+
tooltip: 'Reload the datasource.' // Reload button with default tooltip
|
|
478
|
+
}
|
|
479
|
+
// maxRows: false (disabled by default)
|
|
480
|
+
};
|
|
457
481
|
```
|
|
458
482
|
|
|
459
483
|
### Status Bar Configuration Interface
|
|
@@ -464,20 +488,20 @@ The status bar can be configured using the `GridProStatusBarConfig` interface:
|
|
|
464
488
|
interface GridProStatusBarConfig {
|
|
465
489
|
rows?: boolean; // Enable row count component (default: true)
|
|
466
490
|
maxRows?: boolean; // Enable max rows label-value component (default: false)
|
|
467
|
-
loadMore?: boolean | GridProStatusBarLoadMoreConfig; // Enable/configure load more button
|
|
491
|
+
loadMore?: boolean | GridProStatusBarLoadMoreConfig; // Enable/configure load more button (client-side only)
|
|
468
492
|
reload?: boolean | GridProStatusBarReloadConfig; // Enable/configure reload button
|
|
469
493
|
}
|
|
470
494
|
|
|
471
495
|
interface GridProStatusBarLoadMoreConfig {
|
|
472
|
-
onLoadMore?: () => void; // Custom callback function
|
|
473
|
-
appearance?: string; // Button appearance: 'accent', 'lightweight', 'neutral', 'outline', 'stealth'
|
|
474
|
-
tooltip?: string; // Custom tooltip text (default: 'Load
|
|
496
|
+
onLoadMore?: () => void; // Custom callback function (defaults to datasource.loadMore())
|
|
497
|
+
appearance?: string; // Button appearance: 'accent', 'lightweight', 'neutral', 'outline', 'stealth' (default: 'outline')
|
|
498
|
+
tooltip?: string; // Custom tooltip text (default: 'Load more rows from server')
|
|
475
499
|
}
|
|
476
500
|
|
|
477
501
|
interface GridProStatusBarReloadConfig {
|
|
478
|
-
onReload?: () => void; // Custom callback function
|
|
502
|
+
onReload?: () => void; // Custom callback function (defaults to datasource restart/reload)
|
|
479
503
|
icon?: string; // Custom icon name (default: 'refresh')
|
|
480
|
-
tooltip?: string; // Custom tooltip text (default: 'Reload')
|
|
504
|
+
tooltip?: string; // Custom tooltip text (default: 'Reload the datasource.')
|
|
481
505
|
}
|
|
482
506
|
```
|
|
483
507
|
|
|
@@ -486,12 +510,12 @@ interface GridProStatusBarReloadConfig {
|
|
|
486
510
|
#### Basic Configuration
|
|
487
511
|
|
|
488
512
|
```typescript
|
|
489
|
-
// Simple boolean configuration
|
|
513
|
+
// Simple boolean configuration (uses default settings)
|
|
490
514
|
const statusBarConfig = {
|
|
491
|
-
rows: true,
|
|
492
|
-
maxRows: true,
|
|
493
|
-
loadMore: true,
|
|
494
|
-
reload: true
|
|
515
|
+
rows: true, // Show row count
|
|
516
|
+
maxRows: true, // Show max rows limit
|
|
517
|
+
loadMore: true, // Show load more button (client-side only, uses default tooltip)
|
|
518
|
+
reload: true // Show reload button (uses default tooltip)
|
|
495
519
|
};
|
|
496
520
|
```
|
|
497
521
|
|
|
@@ -587,9 +611,10 @@ export class MyGridComponent extends GenesisElement {
|
|
|
587
611
|
|
|
588
612
|
**Important Notes:**
|
|
589
613
|
|
|
590
|
-
- Load More button is **automatically disabled** for server-side datasources
|
|
591
|
-
- Server-side row model handles data loading through infinite scroll or pagination
|
|
614
|
+
- Load More button is **automatically disabled/hidden** for server-side datasources because the server-side datasource explicitly throws an error: `'loadMore() method is not supported for server-side datasource'`
|
|
615
|
+
- Server-side row model handles data loading through infinite scroll or pagination instead
|
|
592
616
|
- Row count component shows total rows (not filtered count due to server limitations)
|
|
617
|
+
- Status bar components automatically update based on server responses (e.g., Load More button state changes based on `MORE_ROWS` flag)
|
|
593
618
|
|
|
594
619
|
**Example:**
|
|
595
620
|
|
|
@@ -629,8 +654,9 @@ export class MyGridComponent extends GenesisElement {
|
|
|
629
654
|
When pagination is enabled, Grid Pro automatically:
|
|
630
655
|
|
|
631
656
|
- Adds pagination controls to the status bar
|
|
632
|
-
- Suppresses the default AG Grid pagination panel
|
|
657
|
+
- Suppresses the default AG Grid pagination panel (`suppressPaginationPanel: true`)
|
|
633
658
|
- Positions pagination controls on the right side of the status bar
|
|
659
|
+
- Adjusts Load More button alignment to the left when pagination is present
|
|
634
660
|
|
|
635
661
|
```html
|
|
636
662
|
<rapid-grid-pro pagination="true" with-status-bar="true">
|
|
@@ -643,9 +669,14 @@ When pagination is enabled, Grid Pro automatically:
|
|
|
643
669
|
|
|
644
670
|
**Default Status Bar Layout with Pagination:**
|
|
645
671
|
|
|
646
|
-
- Left: Row count component (`agTotalAndFilteredRowCountComponent` for client-side, `agTotalRowCountComponent` for server-side)
|
|
672
|
+
- Left: Row count component (`agTotalAndFilteredRowCountComponent` for client-side, `agTotalRowCountComponent` for server-side), Load More button (if enabled)
|
|
647
673
|
- Right: Pagination controls with navigation buttons and page information
|
|
648
674
|
|
|
675
|
+
**Default Status Bar Layout without Pagination:**
|
|
676
|
+
|
|
677
|
+
- Left: Row count component, Max Rows component (if enabled)
|
|
678
|
+
- Right: Load More button (if enabled), Reload button (if enabled)
|
|
679
|
+
|
|
649
680
|
### Built-in AG Grid Status Bar Panels
|
|
650
681
|
|
|
651
682
|
Grid Pro supports all standard AG Grid status bar panels:
|
|
@@ -683,6 +714,13 @@ statusBar: {
|
|
|
683
714
|
},
|
|
684
715
|
```
|
|
685
716
|
|
|
717
|
+
**Label Value Component Features:**
|
|
718
|
+
- **Dynamic Updates**: Value updates automatically when parameters change
|
|
719
|
+
- **Visibility Control**: Can be hidden/shown via `hide` parameter
|
|
720
|
+
- **Accessibility**: Proper semantic HTML structure with descriptive text
|
|
721
|
+
- **Flexible Content**: Supports any label/value combination with automatic formatting
|
|
722
|
+
- **Consistent Styling**: Inherits status bar styling and spacing
|
|
723
|
+
|
|
686
724
|
#### LoadMoreStatusBarComponent
|
|
687
725
|
|
|
688
726
|
A button component that allows users to load additional rows (client-side only):
|
|
@@ -697,7 +735,7 @@ statusBar: {
|
|
|
697
735
|
statusPanel: GridProStatusBarTypes.loadMore,
|
|
698
736
|
statusPanelParams: {
|
|
699
737
|
onLoadMore: () => console.log('Loading more data...'),
|
|
700
|
-
appearance: 'outline',
|
|
738
|
+
appearance: 'outline', // Options: 'accent', 'lightweight', 'neutral', 'outline', 'stealth'
|
|
701
739
|
tooltip: 'Load more rows from server'
|
|
702
740
|
},
|
|
703
741
|
align: 'right',
|
|
@@ -706,6 +744,16 @@ statusBar: {
|
|
|
706
744
|
},
|
|
707
745
|
```
|
|
708
746
|
|
|
747
|
+
**Load More Button Features:**
|
|
748
|
+
- **State Management**: Multiple states (Available, Loading, No More Data) with automatic transitions
|
|
749
|
+
- **Visual Feedback**: Shows progress ring during loading operation with 500ms minimum display time
|
|
750
|
+
- **Accessibility**: Full ARIA labels, role attributes, and screen reader support with dynamic state announcements
|
|
751
|
+
- **Keyboard Navigation**: Not applicable (button component handles this automatically)
|
|
752
|
+
- **Dynamic Alignment**: Left-aligned when pagination is enabled, right-aligned otherwise
|
|
753
|
+
- **Design System Integration**: Automatically detects design system prefix (`rapid` or `zero`) with graceful fallbacks
|
|
754
|
+
- **Error Handling**: Graceful error recovery with loading state reset
|
|
755
|
+
- **Responsive Sizing**: Consistent 120px minimum width with proper height and spacing
|
|
756
|
+
|
|
709
757
|
#### ReloadStatusBarComponent
|
|
710
758
|
|
|
711
759
|
A refresh button component that allows users to reload the grid data:
|
|
@@ -720,8 +768,8 @@ statusBar: {
|
|
|
720
768
|
statusPanel: GridProStatusBarTypes.reload,
|
|
721
769
|
statusPanelParams: {
|
|
722
770
|
onReload: () => console.log('Reloading data...'),
|
|
723
|
-
icon: 'refresh',
|
|
724
|
-
tooltip: 'Reload the datasource'
|
|
771
|
+
icon: 'refresh', // Custom icon name (default: 'refresh')
|
|
772
|
+
tooltip: 'Reload the datasource' // Custom tooltip (default: 'Reload')
|
|
725
773
|
},
|
|
726
774
|
align: 'right',
|
|
727
775
|
},
|
|
@@ -729,6 +777,12 @@ statusBar: {
|
|
|
729
777
|
},
|
|
730
778
|
```
|
|
731
779
|
|
|
780
|
+
**Reload Button Features:**
|
|
781
|
+
- **Visual Feedback**: Shows progress ring during reload operation with 500ms minimum display time
|
|
782
|
+
- **Accessibility**: Full keyboard navigation support (Enter/Space keys) and ARIA labels
|
|
783
|
+
- **Hover Effects**: Visual feedback on mouse over/out
|
|
784
|
+
- **Fallback Support**: Uses Unicode refresh symbol (↻) for systems without icon components
|
|
785
|
+
|
|
732
786
|
#### PaginationStatusBarComponent
|
|
733
787
|
|
|
734
788
|
A pagination control component that provides navigation buttons and page information:
|
|
@@ -745,6 +799,14 @@ statusBar: {
|
|
|
745
799
|
},
|
|
746
800
|
```
|
|
747
801
|
|
|
802
|
+
**Pagination Component Features:**
|
|
803
|
+
- **Navigation Controls**: First, Previous, Next, Last page buttons with intelligent enable/disable states
|
|
804
|
+
- **Page Information**: Current page, total pages, and row range display (e.g., "1 to 25 of 100")
|
|
805
|
+
- **Accessibility**: Full ARIA navigation landmarks, button labels, and keyboard support
|
|
806
|
+
- **Real-time Updates**: Automatically updates when pagination state changes
|
|
807
|
+
- **Button State Management**: Disables first/previous on first page, next/last on last page
|
|
808
|
+
- **Responsive Layout**: Flexible layout that adapts to available space
|
|
809
|
+
|
|
748
810
|
### Manual Status Bar Configuration
|
|
749
811
|
|
|
750
812
|
You can also manually configure the status bar using direct grid options:
|
|
@@ -830,6 +892,24 @@ const gridOptions = {
|
|
|
830
892
|
</rapid-grid-pro>
|
|
831
893
|
```
|
|
832
894
|
|
|
895
|
+
### Progressive Enhancement and Design System Integration
|
|
896
|
+
|
|
897
|
+
Status bar components are designed to work across different Genesis design systems:
|
|
898
|
+
|
|
899
|
+
- **Automatic Detection**: Components automatically detect the current design system prefix (`rapid` or `zero`)
|
|
900
|
+
- **Graceful Fallbacks**: Fallback implementations for systems without specific components (e.g., Unicode symbols for icons)
|
|
901
|
+
- **Consistent Styling**: Components inherit design system styling and tokens automatically
|
|
902
|
+
- **Enterprise Requirement**: All status bar functionality requires AG Grid Enterprise module
|
|
903
|
+
|
|
904
|
+
### Dynamic Status Bar Updates
|
|
905
|
+
|
|
906
|
+
The status bar components support real-time updates based on server responses:
|
|
907
|
+
|
|
908
|
+
- **Load More Button**: Automatically updates state based on `MORE_ROWS` flag from server responses
|
|
909
|
+
- **Row Count**: Updates in real-time as data changes (client-side shows filtered count, server-side shows total count)
|
|
910
|
+
- **Max Rows**: Displays current maximum rows limit from datasource configuration
|
|
911
|
+
- **State Persistence**: Button states persist across grid operations
|
|
912
|
+
|
|
833
913
|
### Accessibility Features
|
|
834
914
|
|
|
835
915
|
All status bar components include comprehensive accessibility support:
|
|
@@ -839,6 +919,7 @@ All status bar components include comprehensive accessibility support:
|
|
|
839
919
|
- **Focus management** and visual indicators
|
|
840
920
|
- **Semantic HTML** structure with proper landmarks
|
|
841
921
|
- **Tooltips** and **descriptions** for interactive elements
|
|
922
|
+
- **Screen reader announcements** for state changes
|
|
842
923
|
|
|
843
924
|
### Performance Considerations
|
|
844
925
|
|
|
@@ -846,6 +927,7 @@ All status bar components include comprehensive accessibility support:
|
|
|
846
927
|
- Components are only rendered when enabled in configuration
|
|
847
928
|
- Event listeners are properly cleaned up when components are destroyed
|
|
848
929
|
- Status updates are debounced to prevent excessive re-renders
|
|
930
|
+
- Progressive enhancement ensures no performance impact when Enterprise module is unavailable
|
|
849
931
|
|
|
850
932
|
## License
|
|
851
933
|
|