@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.
- package/dist/src/defs.d.ts +1 -0
- package/dist/src/defs.d.ts.map +1 -1
- package/dist/src/defs.js +1 -0
- package/dist/src/defs.js.map +1 -1
- package/dist/src/dx-grid-axis-resize-handle.d.ts.map +1 -1
- package/dist/src/dx-grid-axis-resize-handle.js +3 -5
- package/dist/src/dx-grid-axis-resize-handle.js.map +1 -1
- package/dist/src/dx-grid-multiselect-cell.d.ts.map +1 -1
- package/dist/src/dx-grid-multiselect-cell.js +2 -1
- package/dist/src/dx-grid-multiselect-cell.js.map +1 -1
- package/dist/src/dx-grid.d.ts +11 -6
- package/dist/src/dx-grid.d.ts.map +1 -1
- package/dist/src/dx-grid.js +193 -154
- package/dist/src/dx-grid.js.map +1 -1
- package/dist/src/dx-grid.lit-stories.js +15 -18
- package/dist/src/dx-grid.lit-stories.js.map +1 -1
- package/dist/src/playwright/dx-grid.spec.js.map +1 -1
- package/dist/src/testing/dx-grid-manager.d.ts.map +1 -1
- package/dist/src/testing/dx-grid-manager.js.map +1 -1
- package/dist/src/types.d.ts +9 -0
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/types.js.map +1 -1
- package/dist/src/util.d.ts +4 -1
- package/dist/src/util.d.ts.map +1 -1
- package/dist/src/util.js +11 -11
- package/dist/src/util.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/src/defs.ts +1 -0
- package/src/dx-grid-axis-resize-handle.pcss +6 -0
- package/src/dx-grid-axis-resize-handle.ts +1 -1
- package/src/dx-grid-multiselect-cell.ts +2 -1
- package/src/dx-grid.pcss +22 -9
- package/src/dx-grid.ts +186 -101
- package/src/playwright/dx-grid.spec.ts +1 -1
- package/src/testing/dx-grid-manager.ts +1 -1
- package/src/types.ts +11 -0
- package/src/util.ts +13 -9
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
|
|
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
|
|
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
|
-
|
|
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) {
|