@genesislcap/grid-pro 14.278.1 → 14.278.2

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.
Files changed (2) hide show
  1. package/README.md +254 -524
  2. package/package.json +13 -13
package/README.md CHANGED
@@ -60,7 +60,233 @@ import { rapidGridComponents } from '@genesislcap/rapid-grid-pro';
60
60
  provideDesignSystem().register(baseComponents, rapidGridComponents);
61
61
  ```
62
62
 
63
- ### Attributes
63
+ ### Grid Pro Element Attributes
64
+
65
+ The `<grid-pro>` element supports the following attributes and properties:
66
+
67
+ #### Grid Attributes
68
+
69
+ |Name|Type|Default|Description|
70
+ |----|----|-------|-----------|
71
+ | `:rowData` | `any[]` | - | **Manual data**: Array of row data for scenarios where you set data manually without using datasource components. |
72
+ | `:gridComponents` | `{[componentName: string]: any}` | - | **Custom components**: Object containing custom AG Grid components (cell renderers, editors, filters). |
73
+ | `:eventsAndCallbacks` | `GridProEventsAndCallbacks` | - | **AG Grid events**: Object containing AG Grid event handlers and callbacks. |
74
+ | `:gridFontFace` | `string` | `defaultAgGridFontFace` | **Font configuration**: Font face configuration for AG Grid themes. |
75
+ | `auto-cell-renderer-by-type` | `boolean` | `false` | **Genesis-specific**: Enable automatic cell renderer selection by data type. |
76
+ | `only-template-col-defs` | `boolean` | `false` | **Genesis-specific**: Use only template-defined column definitions, ignore metadata. |
77
+ | `grid-autosizing` | `boolean` | `false` | **Important**: Controls automatic column sizing on interaction. Disables manual column widths and local storage persistence of widths. |
78
+ | `add-index` | `number` | `0` | Index position for new rows when using `applyTransaction` or `applyTransactionAsync`. |
79
+ | `async-add` | `boolean` | `false` | Use `applyTransactionAsync` for add transactions (better performance for large datasets). |
80
+ | `async-remove` | `boolean` | `false` | Use `applyTransactionAsync` for remove transactions (better performance for large datasets). |
81
+ | `async-update` | `boolean` | `true` | Use `applyTransactionAsync` for update transactions (enabled by default for performance). |
82
+ | `enable-cell-flashing` | `boolean` | `false` | Enable cell flashing animations when cell values change. |
83
+ | `enable-row-flashing` | `boolean` | `false` | Enable row flashing animations for add transactions. |
84
+ | `enabled-row-flashing` | `boolean` | `false` | **@deprecated** - Use `enable-row-flashing` instead. |
85
+ | `persist-column-state-key` | `string` | - | **Key for persisting column state** in local browser or KV storage. Essential for maintaining user preferences. |
86
+ | `persist-filter-model-key` | `string` | - | **Key for persisting filter model** in local browser or KV storage. Maintains filter state across sessions. |
87
+ | `header-case-type` | `GridProCaseType` | `CONSTANT_CASE` | Transform header names: `camelCase`, `capitalCase`, `dotCase`, `headerCase`, `noCase`, `paramCase`, `pascalCase`, `pathCase`, `sentenceCase`, `snakeCase`. |
88
+ | `column-component-name` | `string` | `grid-pro-column` | **Internal**: Name of the column component to use. |
89
+ | `header-height` | `number` | - | Custom header height in pixels. Overrides theme defaults. |
90
+ | `row-height` | `number` | - | Custom row height in pixels. Overrides theme defaults. |
91
+ | `theme` | `string` | `alpine` | AG Grid theme name. Available: `alpine`, `alpine-dark`, `balham`, `balham-dark`, `material`. |
92
+ | `pagination` | `boolean` | `false` | **Enables pagination**. Basic pagination works with AG Grid Community edition. **Enterprise features** like custom pagination components require AG Grid Enterprise. Works with both client-side and server-side datasources. |
93
+ | `pagination-page-size` | `number` | `25` | Number of rows per page when pagination is enabled. |
94
+ | `with-status-bar` | `boolean` | `false` | **Enterprise Feature**: Enables status bar at bottom of grid. **Requires AG Grid Enterprise module**. |
95
+ | `:statusBarConfig` | `GridProStatusBarConfig` | `DEFAULT_STATUS_BAR_CONFIG` | **Enterprise Feature**: Configuration for status bar components. Must use binding syntax with observable property. |
96
+
97
+ #### Status Bar Configuration
98
+
99
+ **Enterprise License Required**: Status bar functionality requires the AG Grid Enterprise module. Status bar components will only be displayed if the Enterprise module is properly licensed and configured.
100
+
101
+ **Important Datasource Behavior:**
102
+
103
+ - **Client-side datasources**: All status bar components are available (`rows`, `maxRows`, `loadMore`, `reload`)
104
+ - **Server-side datasources**: `loadMore` component is **automatically disabled** and will not be shown, even if configured
105
+
106
+ ```typescript
107
+ interface GridProStatusBarConfig {
108
+ rows?: boolean; // Enable row count component (default: true)
109
+ maxRows?: boolean; // Enable max rows label-value component (default: false)
110
+ loadMore?: boolean | GridProStatusBarLoadMoreConfig; // Enable/configure load more button (CLIENT-SIDE ONLY)
111
+ reload?: boolean | GridProStatusBarReloadConfig; // Enable/configure reload button
112
+ }
113
+
114
+ interface GridProStatusBarLoadMoreConfig {
115
+ onLoadMore?: () => void; // Custom callback function (defaults to datasource.loadMore())
116
+ appearance?: string; // Button appearance: 'accent', 'lightweight', 'neutral', 'outline', 'stealth'
117
+ tooltip?: string; // Custom tooltip text
118
+ }
119
+
120
+ interface GridProStatusBarReloadConfig {
121
+ onReload?: () => void; // Custom callback function (defaults to datasource restart/reload)
122
+ icon?: string; // Custom icon name (default: 'refresh')
123
+ tooltip?: string; // Custom tooltip text
124
+ }
125
+ ```
126
+
127
+ **Status Bar Component Availability by Datasource Type:**
128
+
129
+ | Component | Client-Side Datasource | Server-Side Datasource | Description |
130
+ |-----------|------------------------|-------------------------|-------------|
131
+ | `rows` | Available | Available | Shows row count information |
132
+ | `maxRows` | Available | Available | Shows maximum rows limit |
133
+ | `loadMore` | Available | **Disabled** | Load more button (infinite scroll alternative) |
134
+ | `reload` | Available | Available | Reload/refresh button |
135
+
136
+ **Complete Usage Examples:**
137
+
138
+ **1. Client-Side Grid with All Status Bar Components:**
139
+
140
+ ```typescript
141
+ @customElement({
142
+ name: 'client-side-grid-example',
143
+ template: html`
144
+ <grid-pro
145
+ pagination
146
+ pagination-page-size="50"
147
+ with-status-bar
148
+ :statusBarConfig="${(x) => x.clientStatusBarConfig}"
149
+ persist-column-state-key="client-grid-columns"
150
+ persist-filter-model-key="client-grid-filters"
151
+ enable-row-flashing
152
+ enable-cell-flashing
153
+ header-case-type="headerCase"
154
+ theme="alpine-dark"
155
+ async-update
156
+ auto-cell-renderer-by-type>
157
+ <grid-pro-client-side-datasource
158
+ resource-name="ALL_TRADES"
159
+ max-rows="1000"
160
+ ></grid-pro-client-side-datasource>
161
+ </grid-pro>
162
+ `
163
+ })
164
+ export class ClientSideGridExample extends GenesisElement {
165
+ // Client-side datasource: ALL status bar components available
166
+ @observable clientStatusBarConfig: GridProStatusBarConfig = {
167
+ rows: true, // Available
168
+ maxRows: true, // Available
169
+ loadMore: { // Available - shows load more button
170
+ appearance: 'accent',
171
+ tooltip: 'Load more trades from server'
172
+ },
173
+ reload: { // Available
174
+ tooltip: 'Refresh all trade data'
175
+ }
176
+ };
177
+ }
178
+ ```
179
+
180
+ **2. Server-Side Grid (loadMore Automatically Disabled):**
181
+
182
+ ```typescript
183
+ @customElement({
184
+ name: 'server-side-grid-example',
185
+ template: html`
186
+ <grid-pro
187
+ pagination
188
+ pagination-page-size="100"
189
+ with-status-bar
190
+ :statusBarConfig="${(x) => x.serverStatusBarConfig}"
191
+ persist-column-state-key="server-grid-columns"
192
+ enable-row-flashing
193
+ theme="balham">
194
+ <grid-pro-server-side-datasource
195
+ resource-name="ALL_TRADES"
196
+ max-rows="500"
197
+ ></grid-pro-server-side-datasource>
198
+ </grid-pro>
199
+ `
200
+ })
201
+ export class ServerSideGridExample extends GenesisElement {
202
+ // Server-side datasource: loadMore automatically disabled
203
+ @observable serverStatusBarConfig: GridProStatusBarConfig = {
204
+ rows: true, // Available - shows row counts
205
+ maxRows: true, // Available - shows max rows info
206
+ loadMore: true, // DISABLED - even if true, will not show (by design when it is a server-side datasource)
207
+ reload: { // Available - shows reload button
208
+ tooltip: 'Refresh trade data from server'
209
+ }
210
+ };
211
+ }
212
+ ```
213
+
214
+ **3. Manual Data Grid with Custom Components:**
215
+
216
+ ```typescript
217
+ @customElement({
218
+ name: 'manual-data-grid',
219
+ template: html`
220
+ <grid-pro
221
+ :rowData="${(x) => x.rowData}"
222
+ :gridComponents="${(x) => x.gridComponents}"
223
+ :eventsAndCallbacks="${(x) => x.eventsAndCallbacks}"
224
+ theme="balham"
225
+ header-height="50"
226
+ persist-column-state-key="manual-grid-state"
227
+ enable-cell-flashing>
228
+ </grid-pro>
229
+ `
230
+ })
231
+ export class ManualDataGrid extends GenesisElement {
232
+ @observable rowData = [
233
+ { id: 1, name: 'John Doe', age: 30, department: 'Engineering' },
234
+ { id: 2, name: 'Jane Smith', age: 25, department: 'Marketing' },
235
+ // ... more data
236
+ ];
237
+
238
+ @observable gridComponents = {
239
+ customRenderer: CustomCellRenderer,
240
+ customEditor: CustomCellEditor,
241
+ customFilter: CustomFilter
242
+ };
243
+
244
+ @observable eventsAndCallbacks = {
245
+ onCellValueChanged: (event) => {
246
+ console.log('Cell value changed:', event);
247
+ // Handle cell value changes
248
+ },
249
+ onRowSelected: (event) => {
250
+ console.log('Row selected:', event);
251
+ // Handle row selection
252
+ },
253
+ onGridReady: (event) => {
254
+ console.log('Grid ready:', event);
255
+ // Grid initialization complete
256
+ }
257
+ };
258
+ }
259
+ ```
260
+
261
+ **4. Theme and Font Customization:**
262
+
263
+ ```typescript
264
+ @customElement({
265
+ name: 'themed-grid',
266
+ template: html`
267
+ <grid-pro
268
+ theme="material"
269
+ :gridFontFace="${(x) => x.customFontFace}"
270
+ header-height="48"
271
+ row-height="42"
272
+ header-case-type="sentenceCase">
273
+ <grid-pro-server-side-datasource
274
+ resource-name="ALL_POSITIONS"
275
+ ></grid-pro-server-side-datasource>
276
+ </grid-pro>
277
+ `
278
+ })
279
+ export class ThemedGrid extends GenesisElement {
280
+ @observable customFontFace = `
281
+ @font-face {
282
+ font-family: 'CustomGridFont';
283
+ src: url('path/to/custom-font.woff2') format('woff2');
284
+ }
285
+ `;
286
+ }
287
+ ```
288
+
289
+ ### Datasource Attributes
64
290
 
65
291
  There are many attributes that can be set on a datasource component.
66
292
 
@@ -112,7 +338,6 @@ There are additional attributes that can affect the behavior of a datasource com
112
338
 
113
339
  |Name|Type|Default|Description|
114
340
  |----|----|-------|-----------|
115
- | `pagination` | `boolean` | `false` | This option enables pagination if set to true, otherwise the behavior will be infinite-scroll.|
116
341
  | `zero-based-view-number` | `boolean` | `false` | This option, if set to true, will make the starting VIEW_NUMBER zero-based (starting from 0 instead of 1).|
117
342
  | `live-updates` | `boolean` | `false` | This option enables live updates for the grid if set to true.|
118
343
 
@@ -364,38 +589,38 @@ It's important to note that any client app can implement the other Row Models to
364
589
 
365
590
  | Feature | Client-Side | Server-Side | Notes |
366
591
  | --- | --- |--- | --- |
367
- | All Data in Client | | | Free |
368
- | Fetch Data as User Scrolls | | | Free |
592
+ | All Data in Client | Yes | No | Free |
593
+ | Fetch Data as User Scrolls | No | Yes | Free |
369
594
  | Row Sorting | (client) | (client OR server) our component is server-only | Free |
370
595
  | Row Filtering | (client) | (client OR server) our component is server-only | Free |
371
- | Quick Filter | | | Free |
372
- | Floating Filters | | | Free |
373
- | Dynamic Row Height | | | Free |
596
+ | Quick Filter | Yes | Yes | Free |
597
+ | Floating Filters | Yes | Yes | Free |
598
+ | Dynamic Row Height | Yes | Yes | Free |
374
599
  | Row Grouping | (client) | (server) | Paid (Enterprise) |
375
600
  | Row Pivoting | (client) | (server) | Paid (Enterprise) |
376
- | Lazy Loading Row Groups | | | Paid (Enterprise) |
601
+ | Lazy Loading Row Groups | No | Yes | Paid (Enterprise) |
377
602
  | Value Aggregation | (client) | (server) | Paid (Enterprise) |
378
- | Row Selection | | | Free |
379
- | Specify Selectable Rows | | | Free |
380
- | Header Checkbox Selection | | | Free |
381
- | Range Selection | | | Free |
382
- | Column Spanning | | | Free |
383
- | Column Pinning | | | Free |
384
- | Row Pinning | | | Free |
385
- | Pagination | | | Free |
386
- | Custom Filters | | | Free |
387
- | Cell Editors | | | Free |
388
- | Cell Renderers | | | Free |
389
- | Value Getter | | | Free |
390
- | Value Setter | | | Free |
391
- | Value Formatter | | | Free |
392
- | Value Parser | | | Free |
393
- | Full Width Rows | | | Free |
394
- | CSV Export | | (data on screen) | Free |
395
- | Excel Export | | (data on screen) | Paid (Enterprise) |
396
- | Clipboard Copy & Paste | | | Free |
397
- | Update via Transaction | | | Free |
398
- | Update via Async Transactions | | | Free |
603
+ | Row Selection | Yes | Yes | Free |
604
+ | Specify Selectable Rows | Yes | Yes | Free |
605
+ | Header Checkbox Selection | Yes | Yes | Free |
606
+ | Range Selection | Yes | Yes | Free |
607
+ | Column Spanning | Yes | Yes | Free |
608
+ | Column Pinning | Yes | Yes | Free |
609
+ | Row Pinning | Yes | Yes | Free |
610
+ | Pagination | Yes | Yes | Free |
611
+ | Custom Filters | Yes | Yes | Free |
612
+ | Cell Editors | Yes | Yes | Free |
613
+ | Cell Renderers | Yes | Yes | Free |
614
+ | Value Getter | Yes | Yes | Free |
615
+ | Value Setter | Yes | Yes | Free |
616
+ | Value Formatter | Yes | Yes | Free |
617
+ | Value Parser | Yes | Yes | Free |
618
+ | Full Width Rows | Yes | Yes | Free |
619
+ | CSV Export | Yes | (data on screen) | Free |
620
+ | Excel Export | Yes | (data on screen) | Paid (Enterprise) |
621
+ | Clipboard Copy & Paste | Yes | Yes | Free |
622
+ | Update via Transaction | Yes | Yes | Free |
623
+ | Update via Async Transactions | Yes | Yes | Free |
399
624
 
400
625
  ### Summary
401
626
 
@@ -434,501 +659,6 @@ By leveraging both DOM Virtualisation and Pagination, our "grid components" can
434
659
  - **Scrolling**: As users scroll, DOM Virtualisation ensures only the visible rows and columns are rendered, maintaining performance.
435
660
  - **Page Navigation**: Users can navigate through pages to access the full dataset without overwhelming the client.
436
661
 
437
- ## Status Bar and Pagination
438
-
439
- The Grid Pro component supports a comprehensive status bar system at the bottom of the grid, along with flexible pagination options. The status bar can be configured with various panels to display information like row counts, custom content, and action buttons.
440
-
441
- ### Enterprise License Requirement
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. If the Enterprise module is not available, the status bar will be silently disabled without affecting grid functionality.
444
-
445
- ### Basic Status Bar Usage
446
-
447
- The status bar can be enabled using the datasource attributes and configured through the `status-bar-config` attribute:
448
-
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
- };
481
- ```
482
-
483
- ### Status Bar Configuration Interface
484
-
485
- The status bar can be configured using the `GridProStatusBarConfig` interface:
486
-
487
- ```typescript
488
- interface GridProStatusBarConfig {
489
- rows?: boolean; // Enable row count component (default: true)
490
- maxRows?: boolean; // Enable max rows label-value component (default: false)
491
- loadMore?: boolean | GridProStatusBarLoadMoreConfig; // Enable/configure load more button (client-side only)
492
- reload?: boolean | GridProStatusBarReloadConfig; // Enable/configure reload button
493
- }
494
-
495
- interface GridProStatusBarLoadMoreConfig {
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')
499
- }
500
-
501
- interface GridProStatusBarReloadConfig {
502
- onReload?: () => void; // Custom callback function (defaults to datasource restart/reload)
503
- icon?: string; // Custom icon name (default: 'refresh')
504
- tooltip?: string; // Custom tooltip text (default: 'Reload the datasource.')
505
- }
506
- ```
507
-
508
- ### Status Bar Configuration Examples
509
-
510
- #### Basic Configuration
511
-
512
- ```typescript
513
- // Simple boolean configuration (uses default settings)
514
- const statusBarConfig = {
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)
519
- };
520
- ```
521
-
522
- #### Advanced Configuration with Custom Callbacks
523
-
524
- ```typescript
525
- // Advanced configuration with custom callbacks and styling
526
- const statusBarConfig = {
527
- rows: true,
528
- maxRows: false,
529
- loadMore: {
530
- onLoadMore: () => {
531
- console.log('Custom load more logic');
532
- // Your custom load more implementation
533
- },
534
- appearance: 'accent',
535
- tooltip: 'Load 50 more records from server'
536
- },
537
- reload: {
538
- onReload: () => {
539
- console.log('Custom reload logic');
540
- // Your custom reload implementation
541
- },
542
- icon: 'refresh',
543
- tooltip: 'Refresh all data from server'
544
- }
545
- };
546
- ```
547
-
548
- #### TypeScript Usage in Component
549
-
550
- ```typescript
551
- import { GridProStatusBarConfig } from '@genesislcap/grid-pro';
552
-
553
- @customElement({
554
- name: 'my-grid-component',
555
- template: html`
556
- <rapid-grid-pro with-status-bar>
557
- <grid-pro-client-side-datasource
558
- resource-name="ALL_TRADES"
559
- :status-bar-config=${(x) => x.statusBarConfig}
560
- ></grid-pro-client-side-datasource>
561
- </rapid-grid-pro>
562
- `
563
- })
564
- export class MyGridComponent extends GenesisElement {
565
- @observable statusBarConfig: GridProStatusBarConfig = {
566
- rows: true,
567
- maxRows: true,
568
- loadMore: {
569
- appearance: 'outline',
570
- tooltip: 'Load more trades from server'
571
- },
572
- reload: {
573
- tooltip: 'Refresh trade data'
574
- }
575
- };
576
- }
577
- ```
578
-
579
- ### Client-Side vs Server-Side Datasource Differences
580
-
581
- #### Client-Side Datasource (`<grid-pro-client-side-datasource>`)
582
-
583
- **Available Status Bar Components:**
584
-
585
- - **Row Count**: Shows total and filtered row count (`agTotalAndFilteredRowCountComponent`)
586
- - **Max Rows**: Shows the maximum rows limit
587
- - **Load More**: Button to load additional rows from server
588
- - **Reload**: Button to reload/refresh the datasource
589
- - **Pagination**: Full pagination controls when pagination is enabled
590
-
591
- **Example:**
592
-
593
- ```html
594
- <rapid-grid-pro with-status-bar>
595
- <grid-pro-client-side-datasource
596
- resource-name="ALL_TRADES"
597
- status-bar-config='{"rows": true, "maxRows": true, "loadMore": true, "reload": true}'
598
- ></grid-pro-client-side-datasource>
599
- </rapid-grid-pro>
600
- ```
601
-
602
- #### Server-Side Datasource (`<grid-pro-server-side-datasource>`)
603
-
604
- **Available Status Bar Components:**
605
-
606
- - **Row Count**: Shows total row count only (`agTotalRowCountComponent`)
607
- - **Max Rows**: Shows the maximum rows limit
608
- - **Load More**: **NOT AVAILABLE** - Server-side uses infinite scroll or pagination instead
609
- - **Reload**: Button to reload/refresh the datasource
610
- - **Pagination**: Full pagination controls when pagination is enabled
611
-
612
- **Important Notes:**
613
-
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
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)
618
-
619
- **Example:**
620
-
621
- ```html
622
- <rapid-grid-pro with-status-bar>
623
- <grid-pro-server-side-datasource
624
- resource-name="ALL_TRADES"
625
- status-bar-config='{"rows": true, "maxRows": true, "reload": true}'
626
- pagination="true"
627
- ></grid-pro-server-side-datasource>
628
- </rapid-grid-pro>
629
- ```
630
-
631
- ### Pagination
632
-
633
- #### Basic Pagination Setup
634
-
635
- ```html
636
- <!-- Client-side pagination -->
637
- <rapid-grid-pro pagination="true" pagination-page-size="25" with-status-bar="true">
638
- <grid-pro-client-side-datasource
639
- resource-name="ALL_TRADES"
640
- ></grid-pro-client-side-datasource>
641
- </rapid-grid-pro>
642
-
643
- <!-- Server-side pagination -->
644
- <rapid-grid-pro pagination="true" with-status-bar="true">
645
- <grid-pro-server-side-datasource
646
- resource-name="ALL_TRADES"
647
- max-rows="50"
648
- ></grid-pro-server-side-datasource>
649
- </rapid-grid-pro>
650
- ```
651
-
652
- #### Pagination with Custom Status Bar
653
-
654
- When pagination is enabled, Grid Pro automatically:
655
-
656
- - Adds pagination controls to the status bar
657
- - Suppresses the default AG Grid pagination panel (`suppressPaginationPanel: true`)
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
660
-
661
- ```html
662
- <rapid-grid-pro pagination="true" with-status-bar="true">
663
- <grid-pro-client-side-datasource
664
- resource-name="ALL_TRADES"
665
- status-bar-config='{"rows": true, "reload": true}'
666
- ></grid-pro-client-side-datasource>
667
- </rapid-grid-pro>
668
- ```
669
-
670
- **Default Status Bar Layout with Pagination:**
671
-
672
- - Left: Row count component (`agTotalAndFilteredRowCountComponent` for client-side, `agTotalRowCountComponent` for server-side), Load More button (if enabled)
673
- - Right: Pagination controls with navigation buttons and page information
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
-
680
- ### Built-in AG Grid Status Bar Panels
681
-
682
- Grid Pro supports all standard AG Grid status bar panels:
683
-
684
- - `agTotalRowCountComponent`: Displays the total row count
685
- - `agTotalAndFilteredRowCountComponent`: Displays the total and filtered row count
686
- - `agFilteredRowCountComponent`: Displays the filtered row count
687
- - `agSelectedRowCountComponent`: Displays the selected row count
688
- - `agAggregationComponent`: Displays aggregations for the selected range
689
-
690
- ### Custom Status Bar Components
691
-
692
- Grid Pro provides several custom status bar components accessible through the `GridProStatusBarTypes` enum:
693
-
694
- #### LabelValueStatusBarComponent
695
-
696
- A flexible component that displays a label and value pair:
697
-
698
- ```typescript
699
- import { GridProStatusBarTypes } from '@genesislcap/grid-pro';
700
-
701
- // In your grid options:
702
- statusBar: {
703
- statusPanels: [
704
- {
705
- statusPanel: GridProStatusBarTypes.labelValue,
706
- statusPanelParams: {
707
- label: 'Max Rows',
708
- value: 250,
709
- hide: false
710
- },
711
- align: 'left',
712
- },
713
- ],
714
- },
715
- ```
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
-
724
- #### LoadMoreStatusBarComponent
725
-
726
- A button component that allows users to load additional rows (client-side only):
727
-
728
- ```typescript
729
- import { GridProStatusBarTypes } from '@genesislcap/grid-pro';
730
-
731
- // In your grid options:
732
- statusBar: {
733
- statusPanels: [
734
- {
735
- statusPanel: GridProStatusBarTypes.loadMore,
736
- statusPanelParams: {
737
- onLoadMore: () => console.log('Loading more data...'),
738
- appearance: 'outline', // Options: 'accent', 'lightweight', 'neutral', 'outline', 'stealth'
739
- tooltip: 'Load more rows from server'
740
- },
741
- align: 'right',
742
- },
743
- ],
744
- },
745
- ```
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
-
757
- #### ReloadStatusBarComponent
758
-
759
- A refresh button component that allows users to reload the grid data:
760
-
761
- ```typescript
762
- import { GridProStatusBarTypes } from '@genesislcap/grid-pro';
763
-
764
- // In your grid options:
765
- statusBar: {
766
- statusPanels: [
767
- {
768
- statusPanel: GridProStatusBarTypes.reload,
769
- statusPanelParams: {
770
- onReload: () => console.log('Reloading data...'),
771
- icon: 'refresh', // Custom icon name (default: 'refresh')
772
- tooltip: 'Reload the datasource' // Custom tooltip (default: 'Reload')
773
- },
774
- align: 'right',
775
- },
776
- ],
777
- },
778
- ```
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
-
786
- #### PaginationStatusBarComponent
787
-
788
- A pagination control component that provides navigation buttons and page information:
789
-
790
- ```typescript
791
- import { GridProStatusBarTypes } from '@genesislcap/grid-pro';
792
-
793
- // In your grid options:
794
- statusBar: {
795
- statusPanels: [
796
- { statusPanel: 'agTotalAndFilteredRowCountComponent', align: 'left' },
797
- { statusPanel: GridProStatusBarTypes.pagination, align: 'right' },
798
- ],
799
- },
800
- ```
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
-
810
- ### Manual Status Bar Configuration
811
-
812
- You can also manually configure the status bar using direct grid options:
813
-
814
- ```typescript
815
- import { GridProStatusBarTypes } from '@genesislcap/grid-pro';
816
-
817
- const gridOptions = {
818
- statusBar: {
819
- statusPanels: [
820
- { statusPanel: 'agTotalAndFilteredRowCountComponent', align: 'left' },
821
- {
822
- statusPanel: GridProStatusBarTypes.labelValue,
823
- statusPanelParams: { label: 'Active Records', value: 1250 },
824
- align: 'center'
825
- },
826
- {
827
- statusPanel: GridProStatusBarTypes.reload,
828
- statusPanelParams: {
829
- tooltip: 'Refresh all data'
830
- },
831
- align: 'right'
832
- },
833
- ],
834
- },
835
- };
836
- ```
837
-
838
- ### Complete Usage Examples
839
-
840
- #### Client-Side with Full Status Bar
841
-
842
- ```html
843
- <rapid-grid-pro
844
- pagination="true"
845
- pagination-page-size="50"
846
- with-status-bar="true">
847
- <grid-pro-client-side-datasource
848
- resource-name="ALL_TRADES"
849
- max-rows="500"
850
- status-bar-config='{
851
- "rows": true,
852
- "maxRows": true,
853
- "loadMore": {
854
- "appearance": "accent",
855
- "tooltip": "Load 50 more trades"
856
- },
857
- "reload": {
858
- "tooltip": "Refresh trade data"
859
- }
860
- }'
861
- ></grid-pro-client-side-datasource>
862
- </rapid-grid-pro>
863
- ```
864
-
865
- #### Server-Side with Pagination
866
-
867
- ```html
868
- <rapid-grid-pro
869
- pagination="true"
870
- with-status-bar="true">
871
- <grid-pro-server-side-datasource
872
- resource-name="ALL_TRADES"
873
- max-rows="100"
874
- status-bar-config='{
875
- "rows": true,
876
- "maxRows": true,
877
- "reload": true
878
- }'
879
- ></grid-pro-server-side-datasource>
880
- </rapid-grid-pro>
881
- ```
882
-
883
- #### Infinite Scroll with Minimal Status Bar
884
-
885
- ```html
886
- <rapid-grid-pro with-status-bar="true">
887
- <grid-pro-server-side-datasource
888
- resource-name="ALL_TRADES"
889
- max-rows="50"
890
- status-bar-config='{"rows": true, "reload": true}'
891
- ></grid-pro-server-side-datasource>
892
- </rapid-grid-pro>
893
- ```
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
-
913
- ### Accessibility Features
914
-
915
- All status bar components include comprehensive accessibility support:
916
-
917
- - **ARIA labels** and **roles** for screen readers
918
- - **Keyboard navigation** support (Tab, Enter, Space)
919
- - **Focus management** and visual indicators
920
- - **Semantic HTML** structure with proper landmarks
921
- - **Tooltips** and **descriptions** for interactive elements
922
- - **Screen reader announcements** for state changes
923
-
924
- ### Performance Considerations
925
-
926
- - Status bar components are lightweight and optimized for performance
927
- - Components are only rendered when enabled in configuration
928
- - Event listeners are properly cleaned up when components are destroyed
929
- - Status updates are debounced to prevent excessive re-renders
930
- - Progressive enhancement ensures no performance impact when Enterprise module is unavailable
931
-
932
662
  ## License
933
663
 
934
664
  Note: this project provides front-end dependencies and uses licensed components listed in the next section; thus, licenses for those components are required during development. Contact [Genesis Global](https://genesis.global/contact-us/) for more details.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/grid-pro",
3
3
  "description": "Genesis Foundation AG Grid",
4
- "version": "14.278.1",
4
+ "version": "14.278.2",
5
5
  "sideEffects": false,
6
6
  "license": "SEE LICENSE IN license.txt",
7
7
  "main": "dist/esm/index.js",
@@ -38,20 +38,20 @@
38
38
  }
39
39
  },
40
40
  "devDependencies": {
41
- "@genesislcap/foundation-testing": "14.278.1",
42
- "@genesislcap/genx": "14.278.1",
43
- "@genesislcap/rollup-builder": "14.278.1",
44
- "@genesislcap/ts-builder": "14.278.1",
45
- "@genesislcap/uvu-playwright-builder": "14.278.1",
46
- "@genesislcap/vite-builder": "14.278.1",
47
- "@genesislcap/webpack-builder": "14.278.1",
41
+ "@genesislcap/foundation-testing": "14.278.2",
42
+ "@genesislcap/genx": "14.278.2",
43
+ "@genesislcap/rollup-builder": "14.278.2",
44
+ "@genesislcap/ts-builder": "14.278.2",
45
+ "@genesislcap/uvu-playwright-builder": "14.278.2",
46
+ "@genesislcap/vite-builder": "14.278.2",
47
+ "@genesislcap/webpack-builder": "14.278.2",
48
48
  "rimraf": "^5.0.0"
49
49
  },
50
50
  "dependencies": {
51
- "@genesislcap/foundation-comms": "14.278.1",
52
- "@genesislcap/foundation-logger": "14.278.1",
53
- "@genesislcap/foundation-ui": "14.278.1",
54
- "@genesislcap/foundation-utils": "14.278.1",
51
+ "@genesislcap/foundation-comms": "14.278.2",
52
+ "@genesislcap/foundation-logger": "14.278.2",
53
+ "@genesislcap/foundation-ui": "14.278.2",
54
+ "@genesislcap/foundation-utils": "14.278.2",
55
55
  "@microsoft/fast-colors": "5.3.1",
56
56
  "@microsoft/fast-components": "2.30.6",
57
57
  "@microsoft/fast-element": "1.14.0",
@@ -77,5 +77,5 @@
77
77
  "access": "public"
78
78
  },
79
79
  "customElements": "dist/custom-elements.json",
80
- "gitHead": "471994ca97809011625eaeffe4ef2f3814458a67"
80
+ "gitHead": "2c6ab52f798c70513a1638647e4be88fd4a91f10"
81
81
  }