@dxos/lit-grid 0.8.4-main.c1de068 → 0.8.4-main.c4373fc

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 (38) hide show
  1. package/dist/src/defs.d.ts +1 -0
  2. package/dist/src/defs.d.ts.map +1 -1
  3. package/dist/src/defs.js +1 -0
  4. package/dist/src/defs.js.map +1 -1
  5. package/dist/src/dx-grid-axis-resize-handle.d.ts.map +1 -1
  6. package/dist/src/dx-grid-axis-resize-handle.js +3 -5
  7. package/dist/src/dx-grid-axis-resize-handle.js.map +1 -1
  8. package/dist/src/dx-grid-multiselect-cell.d.ts.map +1 -1
  9. package/dist/src/dx-grid-multiselect-cell.js +2 -1
  10. package/dist/src/dx-grid-multiselect-cell.js.map +1 -1
  11. package/dist/src/dx-grid.d.ts +11 -6
  12. package/dist/src/dx-grid.d.ts.map +1 -1
  13. package/dist/src/dx-grid.js +193 -154
  14. package/dist/src/dx-grid.js.map +1 -1
  15. package/dist/src/dx-grid.lit-stories.js +15 -18
  16. package/dist/src/dx-grid.lit-stories.js.map +1 -1
  17. package/dist/src/playwright/dx-grid.spec.js.map +1 -1
  18. package/dist/src/testing/dx-grid-manager.d.ts.map +1 -1
  19. package/dist/src/testing/dx-grid-manager.js.map +1 -1
  20. package/dist/src/types.d.ts +9 -0
  21. package/dist/src/types.d.ts.map +1 -1
  22. package/dist/src/types.js.map +1 -1
  23. package/dist/src/util.d.ts +4 -1
  24. package/dist/src/util.d.ts.map +1 -1
  25. package/dist/src/util.js +11 -11
  26. package/dist/src/util.js.map +1 -1
  27. package/dist/tsconfig.tsbuildinfo +1 -1
  28. package/package.json +4 -4
  29. package/src/defs.ts +1 -0
  30. package/src/dx-grid-axis-resize-handle.pcss +6 -0
  31. package/src/dx-grid-axis-resize-handle.ts +1 -1
  32. package/src/dx-grid-multiselect-cell.ts +2 -1
  33. package/src/dx-grid.pcss +22 -9
  34. package/src/dx-grid.ts +186 -101
  35. package/src/playwright/dx-grid.spec.ts +1 -1
  36. package/src/testing/dx-grid-manager.ts +1 -1
  37. package/src/types.ts +11 -0
  38. package/src/util.ts +13 -9
@@ -2,7 +2,7 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
- import { expect, type Locator, type Page } from '@playwright/test';
5
+ import { type Locator, type Page, expect } from '@playwright/test';
6
6
 
7
7
  import type { DxGridPlanePosition } from '../types';
8
8
 
package/src/types.ts CHANGED
@@ -83,6 +83,10 @@ export type DxGridCellValue = {
83
83
  * Controls the read-only state of the cell.
84
84
  */
85
85
  readonly?: DxGridReadonlyValue;
86
+ /**
87
+ * Controls whether the cell content should unfurl when the cell has focus.
88
+ */
89
+ focusUnfurl?: boolean;
86
90
  };
87
91
 
88
92
  export type DxGridAxisMetaProps = {
@@ -90,6 +94,9 @@ export type DxGridAxisMetaProps = {
90
94
  description?: string;
91
95
  resizeable?: boolean;
92
96
  readonly?: DxGridReadonlyValue;
97
+ focusUnfurl?: boolean;
98
+ minSize?: number;
99
+ maxSize?: number;
93
100
  };
94
101
 
95
102
  export type DxGridAxisSizes = DxGridPlaneRecord<DxGridFrozenPlane, Record<string, number>>;
@@ -121,6 +128,10 @@ export type DxGridSelectionProps = {
121
128
  visible?: boolean;
122
129
  };
123
130
 
131
+ export type DxGridFocusIndicatorVariant = 'sheet' | 'stack';
132
+
133
+ export type DxGridOverscroll = 'inline' | 'block' | 'trap' | undefined;
134
+
124
135
  export class DxAxisResize extends Event {
125
136
  public readonly axis: DxGridAxis;
126
137
  public readonly plane: 'grid' | DxGridFrozenPlane;
package/src/util.ts CHANGED
@@ -4,19 +4,19 @@
4
4
 
5
5
  import { defaultRowSize } from './defs';
6
6
  import {
7
- type DxGridPlaneCellIndex,
7
+ type DxGridAxis,
8
8
  type DxGridCellIndex,
9
- type DxGridPosition,
10
- type DxGridPointer,
11
- type DxGridSelectionProps,
12
- type DxGridPositionNullable,
13
- type DxGridPlane,
14
- type DxGridFrozenRowsPlane,
15
9
  type DxGridFrozenColsPlane,
16
10
  type DxGridFrozenPlane,
17
- type DxGridAxis,
11
+ type DxGridFrozenRowsPlane,
12
+ type DxGridPlane,
13
+ type DxGridPlaneCellIndex,
18
14
  type DxGridPlanePosition,
15
+ type DxGridPointer,
16
+ type DxGridPosition,
17
+ type DxGridPositionNullable,
19
18
  type DxGridReadonlyValue,
19
+ type DxGridSelectionProps,
20
20
  separator,
21
21
  } from './types';
22
22
 
@@ -25,7 +25,7 @@ export const toPlaneCellIndex = (cellCoords: Partial<DxGridPosition> & DxGridPla
25
25
 
26
26
  export function parseCellIndex(index: DxGridCellIndex): DxGridPosition;
27
27
  export function parseCellIndex(index: DxGridPlaneCellIndex): DxGridPlanePosition;
28
- // eslint-disable-next-line prefer-arrow-functions/prefer-arrow-functions
28
+
29
29
  export function parseCellIndex(index: DxGridPlaneCellIndex | DxGridCellIndex): DxGridPlanePosition | DxGridPosition {
30
30
  const coords = index.split(separator);
31
31
  if (coords.length === 3) {
@@ -123,6 +123,10 @@ export const closestAction = (target: EventTarget | null): { action: string | nu
123
123
  return { actionEl, action: actionEl?.getAttribute('data-dx-grid-action') ?? null };
124
124
  };
125
125
 
126
+ export const accessoryHandlesPointerdownAttrs = {
127
+ 'data-dx-grid-action': 'accessory',
128
+ };
129
+
126
130
  export const closestCell = (target: EventTarget | null, actionEl?: HTMLElement | null): DxGridPositionNullable => {
127
131
  let cellElement = actionEl;
128
132
  if (!cellElement) {