@genesislcap/grid-pro 15.62.0 → 15.64.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 (49) hide show
  1. package/.cursor/rules/ag-embedded-components.mdc +1 -0
  2. package/dist/custom-elements.json +11320 -10780
  3. package/dist/dts/column-selection/column-selection.d.ts +11 -2
  4. package/dist/dts/column-selection/column-selection.d.ts.map +1 -1
  5. package/dist/dts/column-selection/column-selection.styles.d.ts.map +1 -1
  6. package/dist/dts/column-selection/column-selection.template.d.ts.map +1 -1
  7. package/dist/dts/datasource/base.datasource.d.ts +2 -1
  8. package/dist/dts/datasource/base.datasource.d.ts.map +1 -1
  9. package/dist/dts/grid-components.d.ts +9 -0
  10. package/dist/dts/grid-components.d.ts.map +1 -1
  11. package/dist/dts/grid-pro.d.ts +59 -12
  12. package/dist/dts/grid-pro.d.ts.map +1 -1
  13. package/dist/dts/grid-pro.template.d.ts.map +1 -1
  14. package/dist/dts/grid-pro.types.d.ts +4 -7
  15. package/dist/dts/grid-pro.types.d.ts.map +1 -1
  16. package/dist/dts/index.d.ts +1 -0
  17. package/dist/dts/index.d.ts.map +1 -1
  18. package/dist/dts/react.d.ts +68 -58
  19. package/dist/dts/status-bar/index.d.ts +5 -0
  20. package/dist/dts/status-bar/index.d.ts.map +1 -0
  21. package/dist/dts/status-bar/resolve-status-bar-panels.d.ts +43 -0
  22. package/dist/dts/status-bar/resolve-status-bar-panels.d.ts.map +1 -0
  23. package/dist/dts/status-bar/status-bar.d.ts +439 -0
  24. package/dist/dts/status-bar/status-bar.d.ts.map +1 -0
  25. package/dist/dts/status-bar/status-bar.styles.d.ts +6 -0
  26. package/dist/dts/status-bar/status-bar.styles.d.ts.map +1 -0
  27. package/dist/dts/status-bar/status-bar.template.d.ts +12 -0
  28. package/dist/dts/status-bar/status-bar.template.d.ts.map +1 -0
  29. package/dist/esm/column-selection/column-selection.js +25 -4
  30. package/dist/esm/column-selection/column-selection.styles.js +218 -11
  31. package/dist/esm/column-selection/column-selection.template.js +9 -3
  32. package/dist/esm/datasource/base.datasource.js +3 -3
  33. package/dist/esm/grid-components.js +2 -0
  34. package/dist/esm/grid-pro.js +147 -116
  35. package/dist/esm/grid-pro.styles.js +1 -1
  36. package/dist/esm/grid-pro.template.js +23 -10
  37. package/dist/esm/grid-pro.types.js +2 -3
  38. package/dist/esm/index.js +1 -0
  39. package/dist/esm/status-bar/index.js +4 -0
  40. package/dist/esm/status-bar/resolve-status-bar-panels.js +67 -0
  41. package/dist/esm/status-bar/status-bar.js +171 -0
  42. package/dist/esm/status-bar/status-bar.styles.js +49 -0
  43. package/dist/esm/status-bar/status-bar.template.js +16 -0
  44. package/dist/esm/status-bar-components/row-count.status-bar.js +2 -1
  45. package/dist/grid-pro.api.json +1333 -88
  46. package/dist/grid-pro.d.ts +581 -21
  47. package/dist/react.cjs +46 -39
  48. package/dist/react.mjs +38 -32
  49. package/package.json +12 -12
@@ -38,7 +38,9 @@ export const columnSelectionStyles = css `
38
38
  background: var(--neutral-layer-floating, var(--neutral-layer-2, #fff));
39
39
  box-shadow: 0 8px 24px rgb(0 0 0 / 18%);
40
40
  padding: 0;
41
+ /* stylelint-disable-next-line property-no-unknown -- CSS anchor positioning */
41
42
  position-area: block-end span-inline-start;
43
+ /* stylelint-disable-next-line property-no-unknown -- CSS anchor positioning */
42
44
  position-try-fallbacks: flip-block, flip-inline;
43
45
  margin-block-start: calc(var(--design-unit, 4) * 1px);
44
46
  min-width: 200px;
@@ -47,6 +49,7 @@ export const columnSelectionStyles = css `
47
49
  font-size: var(--ag-data-font-size, var(--type-ramp-minus-1-font-size));
48
50
  }
49
51
 
52
+ /* stylelint-disable-next-line selector-pseudo-class-no-unknown -- Popover API */
50
53
  .column-selection-panel:popover-open {
51
54
  display: flex;
52
55
  flex-direction: column;
@@ -129,6 +132,12 @@ export const columnSelectionStyles = css `
129
132
  min-height: 250px;
130
133
  max-height: 400px;
131
134
  padding: 8px;
135
+ scrollbar-color: var(--ag-scrollbar-handle, var(--neutral-layer-1))
136
+ var(--ag-scrollbar-background, var(--neutral-layer-4));
137
+ }
138
+
139
+ .grid-pro-columns-list:hover {
140
+ scrollbar-color: var(--neutral-fill-rest) var(--ag-scrollbar-background, var(--neutral-layer-4));
132
141
  }
133
142
 
134
143
  .grid-pro-columns-section {
@@ -202,33 +211,231 @@ export const columnSelectionStyles = css `
202
211
  text-overflow: ellipsis;
203
212
  white-space: nowrap;
204
213
  }
214
+
215
+ :host([docked]) {
216
+ --column-selection-tab-width: calc(var(--ag-icon-size, 16px) + var(--ag-grid-size, 4px) * 2);
217
+
218
+ position: relative;
219
+ display: flex;
220
+ align-self: stretch;
221
+ overflow: visible;
222
+ width: var(--column-selection-tab-width);
223
+ height: 100%;
224
+ min-height: 0;
225
+ background: var(
226
+ --ag-control-panel-background-color,
227
+ var(--ag-header-background-color, var(--neutral-layer-2))
228
+ );
229
+ border-inline-start: 1px solid
230
+ var(--ag-border-color, var(--neutral-stroke-divider-rest, var(--neutral-stroke-rest)));
231
+ }
232
+
233
+ :host([docked]) .column-selection {
234
+ display: flex;
235
+ flex-direction: row-reverse;
236
+ align-items: flex-start;
237
+ overflow: visible;
238
+ width: 100%;
239
+ height: 100%;
240
+ min-height: 0;
241
+ padding-top: calc(var(--ag-grid-size, 4px) * 4);
242
+ }
243
+
244
+ :host([docked]) .column-selection-button {
245
+ align-self: flex-start;
246
+ width: var(--column-selection-tab-width);
247
+ min-width: var(--column-selection-tab-width);
248
+ height: auto;
249
+ min-height: 0;
250
+ background: transparent;
251
+ border: none;
252
+ color: var(--ag-foreground-color, var(--neutral-foreground-rest));
253
+ font-size: var(--ag-font-size, 12px);
254
+ font-weight: 400;
255
+ }
256
+
257
+ :host([docked]) .column-selection-button::part(control) {
258
+ flex-direction: column;
259
+ align-items: center;
260
+ justify-content: flex-start;
261
+ gap: 7px;
262
+ width: 100%;
263
+ height: auto;
264
+ min-height: calc(var(--ag-grid-size, 4px) * 18);
265
+ border: none;
266
+ border-radius: 0;
267
+ padding: calc(var(--ag-grid-size, 4px) * 2) 0;
268
+ background: transparent;
269
+ box-shadow: none;
270
+ color: inherit;
271
+ font: inherit;
272
+ }
273
+
274
+ :host([docked]) .column-selection-button::part(start) {
275
+ align-self: center;
276
+ margin: 0;
277
+ }
278
+
279
+ :host([docked]) .column-selection-button > [slot='start'] {
280
+ width: var(--ag-icon-size, 16px);
281
+ height: var(--ag-icon-size, 16px);
282
+ }
283
+
284
+ :host([docked]) .column-selection-button[aria-expanded='true']::part(control) {
285
+ background: var(
286
+ --ag-side-button-selected-background-color,
287
+ var(--ag-background-color, var(--neutral-layer-1))
288
+ );
289
+ box-shadow: none;
290
+ }
291
+
292
+ :host([docked]) .column-selection-button-label {
293
+ position: static;
294
+ width: auto;
295
+ height: auto;
296
+ margin: 0;
297
+ padding: 0;
298
+ overflow: visible;
299
+ clip: auto;
300
+ border: 0;
301
+ writing-mode: vertical-lr;
302
+ white-space: nowrap;
303
+ line-height: 1;
304
+ letter-spacing: 0;
305
+ }
306
+
307
+ .column-selection-panel-window {
308
+ display: contents;
309
+ }
310
+
311
+ :host([docked]) .column-selection-panel-window {
312
+ display: flex;
313
+ flex-direction: column;
314
+ position: absolute;
315
+ inset-block: 0 auto;
316
+ inset-inline-end: 100%;
317
+ width: var(--ag-side-bar-panel-width, 250px);
318
+ height: auto;
319
+ min-height: 40%;
320
+ max-height: calc(100% - var(--grid-pro-column-panel-status-offset, 0px));
321
+ overflow: hidden;
322
+ z-index: 2;
323
+ pointer-events: none;
324
+ filter: drop-shadow(-8px 0 16px rgb(0 0 0 / 16%));
325
+ }
326
+
327
+ :host([docked]) .column-selection-panel {
328
+ display: flex;
329
+ flex-direction: column;
330
+ position: relative;
331
+ inset: auto;
332
+ width: 100%;
333
+ max-width: none;
334
+ max-height: 100%;
335
+ height: auto;
336
+ min-height: 0;
337
+ flex: 1 1 auto;
338
+ margin: 0;
339
+ overflow: hidden;
340
+ border-radius: 0;
341
+ border: 1px solid
342
+ var(--ag-border-color, var(--neutral-stroke-divider-rest, var(--neutral-stroke-rest)));
343
+ background: var(
344
+ --ag-control-panel-background-color,
345
+ var(--ag-header-background-color, var(--neutral-layer-1, #1b2836))
346
+ );
347
+ box-shadow: none;
348
+ transform: translateX(100%);
349
+ visibility: hidden;
350
+ pointer-events: none;
351
+ transition:
352
+ transform 200ms ease,
353
+ visibility 200ms;
354
+ }
355
+
356
+ :host([docked]:dir(rtl)) .column-selection-panel {
357
+ transform: translateX(-100%);
358
+ }
359
+
360
+ :host([docked].column-selection-open) .column-selection-panel {
361
+ transform: translateX(0);
362
+ visibility: visible;
363
+ pointer-events: auto;
364
+ }
365
+
366
+ @media (prefers-reduced-motion: reduce) {
367
+ :host([docked]) .column-selection-panel {
368
+ transition: none;
369
+ }
370
+ }
371
+
372
+ :host([docked]) .grid-pro-columns-list {
373
+ flex: 1 1 auto;
374
+ min-height: 0;
375
+ max-height: none;
376
+ overflow: auto;
377
+ padding-bottom: 0;
378
+ }
379
+
380
+ :host([docked]) .grid-pro-columns-list-end {
381
+ flex: none;
382
+ height: 40px;
383
+ }
384
+
385
+ :host([docked]) .grid-pro-columns-toolbar {
386
+ flex: none;
387
+ }
205
388
  `;
206
389
  /**
207
390
  * Host layout when the Grid Pro column-selection toolbar is shown.
208
391
  * @public
209
392
  */
210
393
  export const gridProColumnSelectionHostStyles = css `
211
- :host(.has-column-selection) {
394
+ /* AG's own status bar sits inside the grid area, under the docked panel. */
395
+ :host([with-status-bar].has-column-selection:not(.has-status-bar)) {
396
+ --grid-pro-column-panel-status-offset: var(--ag-status-bar-height, 32.5px);
397
+ }
398
+
399
+ :host(.has-column-selection),
400
+ :host(.has-status-bar) {
212
401
  display: flex;
213
402
  flex-direction: column;
214
403
  min-height: 0;
404
+ min-width: 0;
215
405
  }
216
406
 
217
- :host(.has-column-selection) [part='grid'] {
407
+ .grid-pro-main {
408
+ display: contents;
409
+ }
410
+
411
+ :host(.has-column-selection) .grid-pro-main,
412
+ :host(.has-status-bar) .grid-pro-main {
413
+ display: flex;
414
+ flex-direction: row;
218
415
  flex: 1 1 auto;
416
+ min-width: 0;
219
417
  min-height: 0;
220
418
  }
221
419
 
222
- .grid-pro-column-selection-toolbar {
420
+ :host(.has-column-selection) [part='grid'],
421
+ :host(.has-status-bar) [part='grid'] {
422
+ flex: 1 1 auto;
423
+ min-width: 0;
424
+ min-height: 0;
425
+ }
426
+
427
+ .grid-pro-side-bar {
223
428
  display: flex;
224
- align-items: center;
225
- justify-content: flex-end;
226
- gap: calc(var(--design-unit, 4) * 2px);
429
+ position: relative;
430
+ z-index: 2;
431
+ flex: 0 0 auto;
432
+ align-self: stretch;
433
+ overflow: visible;
434
+ min-height: 0;
435
+ }
436
+
437
+ .grid-pro-status-bar {
438
+ flex: 0 0 auto;
227
439
  width: 100%;
228
- box-sizing: border-box;
229
- flex-shrink: 0;
230
- padding: calc(var(--design-unit, 4) * 2px);
231
- border-bottom: 1px solid var(--neutral-stroke-divider-rest, var(--neutral-stroke-rest));
232
- background: var(--neutral-layer-1, transparent);
233
440
  }
234
441
  `;
@@ -47,18 +47,22 @@ export const getColumnSelectionTemplate = (prefix = 'foundation') => {
47
47
  class="column-selection-button"
48
48
  appearance="neutral"
49
49
  data-state="${(x) => (x.open ? 'hover' : undefined)}"
50
- aria-pressed="${(x) => (x.open ? 'true' : 'false')}"
50
+ aria-label="${(x) => x.label}"
51
+ aria-expanded="${(x) => (x.open ? 'true' : 'false')}"
52
+ aria-controls="column-selection-panel"
51
53
  @click=${(x) => x.toggle()}
52
54
  >
53
55
  <${prefix}-icon size="lg" name="columns" slot="start"></${prefix}-icon>
54
- ${(x) => x.label}
56
+ <span class="column-selection-button-label">${(x) => x.label}</span>
55
57
  </${prefix}-button>
58
+ <div class="column-selection-panel-window">
56
59
  <div
57
60
  ${ref('panelEl')}
61
+ id="column-selection-panel"
58
62
  class="column-selection-panel"
59
63
  part="column-selection-panel"
60
64
  data-test-id="column-selection-panel"
61
- popover="manual"
65
+ popover="${(x) => (x.docked ? null : 'manual')}"
62
66
  >
63
67
  <div class="grid-pro-columns-toolbar" data-test-id="grid-pro-columns-toolbar">
64
68
  <${checkbox}
@@ -84,8 +88,10 @@ export const getColumnSelectionTemplate = (prefix = 'foundation') => {
84
88
  <div class="grid-pro-columns-section" data-test-id="grid-pro-columns-unselected">
85
89
  ${repeat((x) => x.unselectedItems, columnRow, { recycle: false })}
86
90
  </div>
91
+ <div class="grid-pro-columns-list-end"></div>
87
92
  </div>
88
93
  </div>
94
+ </div>
89
95
  </div>
90
96
  `;
91
97
  };
@@ -811,15 +811,15 @@ export class GridProBaseDatasource extends GenesisGridDatasourceElement {
811
811
  /**
812
812
  * Gets datasource-specific status bar component configurations.
813
813
  * This method should be called by the grid to get status bar panels specific to this datasource.
814
+ * @param suppressLoadMore - Leaves out the Load More panel, for row models that fetch on scroll.
814
815
  * @public
815
816
  */
816
- getDatasourceStatusBarPanels(isServerSide, statusBarConfig) {
817
+ getDatasourceStatusBarPanels(suppressLoadMore, statusBarConfig) {
817
818
  var _a, _b, _c, _d, _e, _f;
818
819
  const additionalPanels = [];
819
820
  // Extract loadMore configuration
820
821
  const loadMoreConfig = this.getStatusBarActionConfig(statusBarConfig === null || statusBarConfig === void 0 ? void 0 : statusBarConfig.loadMore);
821
- // Add load more button if enabled and not server-side
822
- if (loadMoreConfig.enabled && !isServerSide) {
822
+ if (loadMoreConfig.enabled && !suppressLoadMore) {
823
823
  const loadMoreParams = {};
824
824
  // Use custom callback if provided, otherwise leave undefined for default behavior
825
825
  if ((_a = loadMoreConfig.config) === null || _a === void 0 ? void 0 : _a.onLoadMore) {
@@ -3,6 +3,7 @@ import { foundationGridProActionRenderer, foundationGridProActionsMenuRenderer,
3
3
  import { foundationColumnSelection } from './column-selection';
4
4
  import { foundationGridPro } from './grid-pro';
5
5
  import { foundationMulticolumnDropdown } from './multicolumn-dropdown';
6
+ import { foundationGridProStatusBar } from './status-bar';
6
7
  /**
7
8
  * The Grid Pro Components.
8
9
  * @remarks Contains all available components, from Grid Pro itself to the cell renderers.
@@ -27,6 +28,7 @@ export const foundationGridComponents = {
27
28
  StatusPillRenderer,
28
29
  foundationGridPro,
29
30
  foundationColumnSelection,
31
+ foundationGridProStatusBar,
30
32
  register(container, ...rest) {
31
33
  if (!container) {
32
34
  // preserve backward compatibility with code that loops through