@genesislcap/grid-pro 14.275.2 → 14.275.3-alpha-74bf9e5.0

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 (92) hide show
  1. package/README.md +182 -14
  2. package/dist/custom-elements.json +1202 -141
  3. package/dist/dts/datasource/base.datasource.d.ts +20 -1
  4. package/dist/dts/datasource/base.datasource.d.ts.map +1 -1
  5. package/dist/dts/datasource/server-side.datasource.d.ts +6 -5
  6. package/dist/dts/datasource/server-side.datasource.d.ts.map +1 -1
  7. package/dist/dts/grid-pro-genesis-datasource/grid-pro-genesis-datasource.d.ts +30 -12
  8. package/dist/dts/grid-pro-genesis-datasource/grid-pro-genesis-datasource.d.ts.map +1 -1
  9. package/dist/dts/grid-pro.d.ts +70 -15
  10. package/dist/dts/grid-pro.d.ts.map +1 -1
  11. package/dist/dts/grid-pro.types.d.ts +91 -0
  12. package/dist/dts/grid-pro.types.d.ts.map +1 -1
  13. package/dist/dts/index.d.ts +1 -0
  14. package/dist/dts/index.d.ts.map +1 -1
  15. package/dist/dts/status-bar-components/index.d.ts +5 -0
  16. package/dist/dts/status-bar-components/index.d.ts.map +1 -0
  17. package/dist/dts/status-bar-components/label-value.status-bar.d.ts +21 -0
  18. package/dist/dts/status-bar-components/label-value.status-bar.d.ts.map +1 -0
  19. package/dist/dts/status-bar-components/load-more.status-bar.d.ts +43 -0
  20. package/dist/dts/status-bar-components/load-more.status-bar.d.ts.map +1 -0
  21. package/dist/dts/status-bar-components/pagination.status-bar.d.ts +32 -0
  22. package/dist/dts/status-bar-components/pagination.status-bar.d.ts.map +1 -0
  23. package/dist/dts/status-bar-components/reload.status-bar.d.ts +36 -0
  24. package/dist/dts/status-bar-components/reload.status-bar.d.ts.map +1 -0
  25. package/dist/esm/datasource/base.datasource.js +111 -7
  26. package/dist/esm/datasource/server-side.datasource.js +14 -10
  27. package/dist/esm/grid-pro-genesis-datasource/grid-pro-genesis-datasource.js +111 -34
  28. package/dist/esm/grid-pro.js +134 -2
  29. package/dist/esm/grid-pro.types.js +28 -0
  30. package/dist/esm/index.js +1 -0
  31. package/dist/esm/status-bar-components/index.js +4 -0
  32. package/dist/esm/status-bar-components/label-value.status-bar.js +33 -0
  33. package/dist/esm/status-bar-components/load-more.status-bar.js +209 -0
  34. package/dist/esm/status-bar-components/pagination.status-bar.js +206 -0
  35. package/dist/esm/status-bar-components/reload.status-bar.js +163 -0
  36. package/dist/grid-pro.api.json +2421 -776
  37. package/dist/grid-pro.d.ts +351 -29
  38. package/docs/api/grid-pro.default_status_bar_config.md +13 -0
  39. package/docs/api/grid-pro.gridpro.clearlocalgridoptions.md +17 -0
  40. package/docs/api/grid-pro.gridpro.gridprodatasource.md +2 -2
  41. package/docs/api/grid-pro.gridpro.md +7 -1
  42. package/docs/api/grid-pro.gridpro.pagination.md +18 -0
  43. package/docs/api/grid-pro.gridpro.paginationpagesize.md +18 -0
  44. package/docs/api/grid-pro.gridpro.setuppaginationandstatusbar.md +22 -0
  45. package/docs/api/grid-pro.gridpro.statusbarconfig.md +18 -0
  46. package/docs/api/grid-pro.gridpro.withstatusbar.md +18 -0
  47. package/docs/api/grid-pro.gridprogenesisdatasource.handlestreamdeletes.md +22 -0
  48. package/docs/api/grid-pro.gridprogenesisdatasource.handlestreaminserts.md +22 -0
  49. package/docs/api/grid-pro.gridprogenesisdatasource.handlestreamupdates.md +22 -0
  50. package/docs/api/grid-pro.gridprogenesisdatasource.loadmore.md +15 -0
  51. package/docs/api/grid-pro.gridprogenesisdatasource.md +6 -1
  52. package/docs/api/grid-pro.gridprogenesisdatasource.reloadresourcedata.md +21 -0
  53. package/docs/api/grid-pro.gridprogenesisdatasource.restart.md +3 -3
  54. package/docs/api/grid-pro.gridprostatusbarconfig.loadmore.md +18 -0
  55. package/docs/api/grid-pro.gridprostatusbarconfig.maxrows.md +18 -0
  56. package/docs/api/grid-pro.gridprostatusbarconfig.md +27 -0
  57. package/docs/api/grid-pro.gridprostatusbarconfig.reload.md +18 -0
  58. package/docs/api/grid-pro.gridprostatusbarconfig.rows.md +18 -0
  59. package/docs/api/grid-pro.gridprostatusbarloadmoreconfig.appearance.md +18 -0
  60. package/docs/api/grid-pro.gridprostatusbarloadmoreconfig.md +22 -0
  61. package/docs/api/grid-pro.gridprostatusbarloadmoreconfig.onloadmore.md +13 -0
  62. package/docs/api/grid-pro.gridprostatusbarloadmoreconfig.tooltip.md +18 -0
  63. package/docs/api/grid-pro.gridprostatusbarreloadconfig.icon.md +18 -0
  64. package/docs/api/grid-pro.gridprostatusbarreloadconfig.md +22 -0
  65. package/docs/api/grid-pro.gridprostatusbarreloadconfig.onreload.md +13 -0
  66. package/docs/api/grid-pro.gridprostatusbarreloadconfig.tooltip.md +18 -0
  67. package/docs/api/grid-pro.gridprostatusbartypes.md +27 -0
  68. package/docs/api/grid-pro.labelvaluestatusbarcomponent.destroy.md +15 -0
  69. package/docs/api/grid-pro.labelvaluestatusbarcomponent.getgui.md +15 -0
  70. package/docs/api/grid-pro.labelvaluestatusbarcomponent.init.md +22 -0
  71. package/docs/api/grid-pro.labelvaluestatusbarcomponent.md +23 -0
  72. package/docs/api/grid-pro.labelvaluestatusbarparams.md +17 -0
  73. package/docs/api/grid-pro.loadmorestatusbarcomponent.destroy.md +15 -0
  74. package/docs/api/grid-pro.loadmorestatusbarcomponent.getgui.md +15 -0
  75. package/docs/api/grid-pro.loadmorestatusbarcomponent.init.md +22 -0
  76. package/docs/api/grid-pro.loadmorestatusbarcomponent.md +25 -0
  77. package/docs/api/grid-pro.loadmorestatusbarcomponent.updatebuttonvisibility.md +15 -0
  78. package/docs/api/grid-pro.loadmorestatusbarcomponent.updateparams.md +22 -0
  79. package/docs/api/grid-pro.loadmorestatusbarparams.md +18 -0
  80. package/docs/api/grid-pro.md +12 -0
  81. package/docs/api/grid-pro.paginationstatusbarcomponent.destroy.md +15 -0
  82. package/docs/api/grid-pro.paginationstatusbarcomponent.getgui.md +15 -0
  83. package/docs/api/grid-pro.paginationstatusbarcomponent.init.md +22 -0
  84. package/docs/api/grid-pro.paginationstatusbarcomponent.md +23 -0
  85. package/docs/api/grid-pro.reloadstatusbarcomponent.destroy.md +15 -0
  86. package/docs/api/grid-pro.reloadstatusbarcomponent.getgui.md +15 -0
  87. package/docs/api/grid-pro.reloadstatusbarcomponent.init.md +22 -0
  88. package/docs/api/grid-pro.reloadstatusbarcomponent.md +24 -0
  89. package/docs/api/grid-pro.reloadstatusbarcomponent.updateparams.md +22 -0
  90. package/docs/api/grid-pro.reloadstatusbarparams.md +17 -0
  91. package/docs/api-report.md +133 -6
  92. package/package.json +13 -13
package/README.md CHANGED
@@ -268,7 +268,7 @@ export class ConnectedGridServerSideExample extends GenesisElement {}
268
268
 
269
269
  This folder contains implementations of Genesis `datasource` components, responsible for fetching data for Genesis [Grid Pro](../../README.md) components.
270
270
 
271
- This document outlines the available features of our two Grid Pro datasources: `<grid-pro-client-side-datasource>` and `<grid-pro-server-side-datasource>`.
271
+ This document outlines the available features of our two "Grid Pro" datasources: `<grid-pro-client-side-datasource>` and `<grid-pro-server-side-datasource>`.
272
272
 
273
273
  ## \<grid-pro-client-side-datasource\>
274
274
 
@@ -276,7 +276,7 @@ This document outlines the available features of our two “Grid Pro” datasour
276
276
 
277
277
  - **Sorting**: Order by any column, ASC or DESC.
278
278
  - **Filtering**:
279
- - Filtering options are automatically generated, based on the resources metadata.
279
+ - Filtering options are automatically generated, based on the resource's metadata.
280
280
  - String Filters:
281
281
  - contains
282
282
  - not contains
@@ -308,11 +308,11 @@ This document outlines the available features of our two “Grid Pro” datasour
308
308
  ### Server-Side Features
309
309
 
310
310
  - **Sorting**: Order by any INDEX column/field, ASC or DESC.
311
- - This is a server limitation. For each column that needs to have sorting the developer will need to have an INDEX for it. See more about indexes [here](https://learn.genesis.global/docs/database/data-types/index-entities/).
312
- - By default, sorting is disabled on ALL columns… BUT if we detect valid ‘` indexes from the metadata those column/fields will be setup to have sorting.
313
- - If the user attempts to force `sortable` well check if its really ok to do that + warn in the logs about it + try to mention other available indexes.. if any at all.
311
+ - This is a server limitation. For each column that needs to have "sorting" the developer will need to have an INDEX for it. See more about indexes [here](https://learn.genesis.global/docs/database/data-types/index-entities/).
312
+ - By default, sorting is disabled on ALL columns… BUT if we detect valid '` indexes" from the metadata those column/fields will be setup to have sorting.
313
+ - If the user attempts to force `sortable` we'll check if it's really ok to do that + warn in the logs about it + try to mention other available indexes.. if any at all.
314
314
  - **Filtering**:
315
- - Filtering options are automatically generated, based on the resources metadata.
315
+ - Filtering options are automatically generated, based on the resource's metadata.
316
316
  - String filters
317
317
  - blank
318
318
  - contains
@@ -344,21 +344,21 @@ This document outlines the available features of our two “Grid Pro” datasour
344
344
  - Operations like sorting and filtering are pushed to the backend.
345
345
  - Filtering uses `CRITERIA_MATCH` param
346
346
  - Sorting uses `ORDERY_BY` param
347
- - Both work the same way, once filtering/sorting is applied the datasource component resets itself”, basically starting a new stream with the updated params.
347
+ - Both work the same way, once filtering/sorting is applied the datasource component "resets itself", basically starting a new stream with the updated params.
348
348
  - **LIMITATIONS**
349
- - Sorting can only be applied to index fields/columns. Also mentioned [here](https://www.notion.so/Grid-Pro-Datasource-Inventory-d11ca7570ee94847bbcb3e7362025b0a?pvs=21). More details [here](https://genesisglobal.atlassian.net/jira/polaris/projects/GPR/ideas/view/4721227?selectedIssue=GPR-171&focusedCommentId=143757) and [here](https://genesis-global-talk.slack.com/archives/C0416MFG360/p1696456988606789).
350
- - ROWS_COUNT doesnt reflect the correct amount when a CRITERIA_MATCH (filtering) is applied. Example: X resource has 100 records. A criteria is specified so it returns only 50 records… the rows count sent from the server is still 100. Because of that we have to manually/locally calculate that.
349
+ - Sorting can only be applied to "index" fields/columns. Also mentioned [here](https://www.notion.so/Grid-Pro-Datasource-Inventory-d11ca7570ee94847bbcb3e7362025b0a?pvs=21). More details [here](https://genesisglobal.atlassian.net/jira/polaris/projects/GPR/ideas/view/4721227?selectedIssue=GPR-171&focusedCommentId=143757) and [here](https://genesis-global-talk.slack.com/archives/C0416MFG360/p1696456988606789).
350
+ - ROWS_COUNT doesn't reflect the correct amount when a CRITERIA_MATCH (filtering) is applied. Example: X resource has 100 records. A criteria is specified so it returns only 50 records… the rows count sent from the server is still 100. Because of that we have to manually/locally calculate that.
351
351
  - Suitable for large datasets where only a subset of data is loaded into the client based on user interactions.
352
352
 
353
353
  ---
354
354
 
355
355
  ## Supported Row Models
356
356
 
357
- We support all of the AGs Row Models. More on [JavaScript Grid: Row Models | AG Grid (ag-grid.com)](https://www.ag-grid.com/javascript-data-grid/row-models/).
357
+ We support all of the AG's Row Models. More on [JavaScript Grid: Row Models | AG Grid (ag-grid.com)](https://www.ag-grid.com/javascript-data-grid/row-models/).
358
358
 
359
- In the table below you can find a complete feature list of all the possibilities of client/server-side row models (and others too.. that can be manually enabled/integrated but we dont expose any components for those yet).
359
+ In the table below you can find a complete "feature list" of all the possibilities of client/server-side row models (and others too.. that can be manually enabled/integrated but we don't expose any components for those yet).
360
360
 
361
- Its important to note that any client app can implement the other Row Models to their own needs. Our Grid Pro component is not tied to the datasource, its the opossite.. so datasources can be as specialized/customized as possible.
361
+ It's important to note that any client app can implement the other Row Models to their own needs. Our Grid Pro component is not tied to the datasource, it's the opossite.. so datasources can be as specialized/customized as possible.
362
362
 
363
363
  `Infinite` and `Viewport` row models are also supported but not offered "out of the box" (devs will have to create their own component).
364
364
 
@@ -406,7 +406,7 @@ It’s important to note that any client app can implement the other Row Models
406
406
 
407
407
  ### DOM Virtualisation
408
408
 
409
- DOM Virtualisation is a powerful technique that enhances the performance of grid components by only rendering the rows and columns that are currently visible in the viewport. This approach significantly reduces the memory footprint and improves the rendering speed, enabling all of our grid components to handle larger datasets more efficiently.
409
+ DOM Virtualisation is a powerful technique that enhances the performance of grid components by only rendering the rows and columns that are currently visible in the viewport. This approach significantly reduces the memory footprint and improves the rendering speed, enabling all of our "grid components" to handle larger datasets more efficiently.
410
410
 
411
411
  - **How It Works**: Instead of rendering all rows and columns, the grid dynamically generates the DOM elements for only the visible part of the dataset. As the user scrolls, rows and columns are created or destroyed on the fly, ensuring a smooth scrolling experience.
412
412
  - **Benefits**:
@@ -428,12 +428,180 @@ Pagination is another effective technique to improve performance in AG Grid by b
428
428
 
429
429
  ### Combined Approach
430
430
 
431
- By leveraging both DOM Virtualisation and Pagination, our grid components can efficiently manage and display larger datasets on the client-side. Heres how these techniques work together:
431
+ By leveraging both DOM Virtualisation and Pagination, our "grid components" can efficiently manage and display larger datasets on the client-side. Here's how these techniques work together:
432
432
 
433
433
  - **Initial Load**: Only the data for the first page is loaded, minimizing the initial load time.
434
434
  - **Scrolling**: As users scroll, DOM Virtualisation ensures only the visible rows and columns are rendered, maintaining performance.
435
435
  - **Page Navigation**: Users can navigate through pages to access the full dataset without overwhelming the client.
436
436
 
437
+ ## Status Bar
438
+
439
+ The Grid Pro component supports a status bar at the bottom of the grid. The status bar can be configured with various panels to display information like row counts, custom content, and action buttons.
440
+
441
+ ### Basic Usage
442
+
443
+ The status bar can be enabled using the datasource attributes and configured through the `status-bar-config` attribute:
444
+
445
+ ```html
446
+ <rapid-grid-pro>
447
+ <grid-pro-client-side-datasource
448
+ resource-name="ALL_TRADES"
449
+ with-status-bar="true"
450
+ status-bar-config='{"rows": true, "reload": true, "loadMore": true}'
451
+ ></grid-pro-client-side-datasource>
452
+ </rapid-grid-pro>
453
+ ```
454
+
455
+ ### Status Bar Configuration
456
+
457
+ The status bar can be configured using the `GridProStatusBarConfig` interface:
458
+
459
+ ```typescript
460
+ interface GridProStatusBarConfig {
461
+ rows?: boolean; // Enable row count component (default: true)
462
+ maxRows?: boolean; // Enable max rows label-value component (default: false)
463
+ loadMore?: boolean; // Enable load more button component (default: false)
464
+ reload?: boolean; // Enable reload button component (default: true)
465
+ }
466
+ ```
467
+
468
+ ### Built-in AG Grid Status Bar Panels
469
+
470
+ Grid Pro supports all standard AG Grid status bar panels:
471
+
472
+ - `agTotalRowCountComponent`: Displays the total row count
473
+ - `agTotalAndFilteredRowCountComponent`: Displays the total and filtered row count
474
+ - `agFilteredRowCountComponent`: Displays the filtered row count
475
+ - `agSelectedRowCountComponent`: Displays the selected row count
476
+ - `agAggregationComponent`: Displays aggregations for the selected range
477
+
478
+ ### Custom Status Bar Components
479
+
480
+ Grid Pro provides several custom status bar components accessible through the `GridProStatusBarTypes` enum:
481
+
482
+ #### LabelValueStatusBarComponent
483
+
484
+ A flexible component that displays a label and value pair:
485
+
486
+ ```typescript
487
+ import { GridProStatusBarTypes } from '@genesislcap/grid-pro';
488
+
489
+ // In your grid options:
490
+ statusBar: {
491
+ statusPanels: [
492
+ {
493
+ statusPanel: GridProStatusBarTypes.labelValue,
494
+ statusPanelParams: {
495
+ label: 'Max Rows',
496
+ value: 250,
497
+ hide: false
498
+ },
499
+ align: 'left',
500
+ },
501
+ ],
502
+ },
503
+ ```
504
+
505
+ #### LoadMoreStatusBarComponent
506
+
507
+ A button component that allows users to load additional rows:
508
+
509
+ ```typescript
510
+ import { GridProStatusBarTypes } from '@genesislcap/grid-pro';
511
+
512
+ // In your grid options:
513
+ statusBar: {
514
+ statusPanels: [
515
+ {
516
+ statusPanel: GridProStatusBarTypes.loadMore,
517
+ align: 'right',
518
+ },
519
+ ],
520
+ },
521
+ ```
522
+
523
+ #### ReloadStatusBarComponent
524
+
525
+ A refresh button component that allows users to reload the grid data:
526
+
527
+ ```typescript
528
+ import { GridProStatusBarTypes } from '@genesislcap/grid-pro';
529
+
530
+ // In your grid options:
531
+ statusBar: {
532
+ statusPanels: [
533
+ {
534
+ statusPanel: GridProStatusBarTypes.reload,
535
+ statusPanelParams: {
536
+ onReload: () => console.log('Reloading data...')
537
+ },
538
+ align: 'right',
539
+ },
540
+ ],
541
+ },
542
+ ```
543
+
544
+ #### PaginationStatusBarComponent
545
+
546
+ A pagination control component that provides navigation buttons and page information:
547
+
548
+ ```typescript
549
+ import { GridProStatusBarTypes } from '@genesislcap/grid-pro';
550
+
551
+ // In your grid options:
552
+ statusBar: {
553
+ statusPanels: [
554
+ { statusPanel: 'agTotalAndFilteredRowCountComponent', align: 'left' },
555
+ { statusPanel: GridProStatusBarTypes.pagination, align: 'right' },
556
+ ],
557
+ },
558
+ ```
559
+
560
+ ### Using Status Bar with Pagination
561
+
562
+ When pagination is enabled, Grid Pro automatically configures the status bar with the pagination component and suppresses the default pagination panel:
563
+
564
+ ```html
565
+ <rapid-grid-pro>
566
+ <grid-pro-client-side-datasource
567
+ resource-name="ALL_TRADES"
568
+ pagination="true"
569
+ with-status-bar="true"
570
+ suppress-pagination-panel="true"
571
+ ></grid-pro-client-side-datasource>
572
+ </rapid-grid-pro>
573
+ ```
574
+
575
+ The default status bar configuration with pagination includes:
576
+ - `agTotalAndFilteredRowCountComponent` on the left
577
+ - `PaginationStatusBarComponent` on the right
578
+
579
+ ### Custom Status Bar Configuration
580
+
581
+ You can also manually configure the status bar using direct grid options:
582
+
583
+ ```typescript
584
+ import { GridProStatusBarTypes } from '@genesislcap/grid-pro';
585
+
586
+ const gridOptions = {
587
+ statusBar: {
588
+ statusPanels: [
589
+ { statusPanel: 'agTotalAndFilteredRowCountComponent', align: 'left' },
590
+ {
591
+ statusPanel: GridProStatusBarTypes.labelValue,
592
+ statusPanelParams: { label: 'Active Records', value: 1250 },
593
+ align: 'center'
594
+ },
595
+ { statusPanel: GridProStatusBarTypes.reload, align: 'right' },
596
+ ],
597
+ },
598
+ };
599
+ ```
600
+
601
+ ### Enterprise License Requirement
602
+
603
+ **Note**: 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.
604
+
437
605
  ## License
438
606
 
439
607
  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.