@dxos/lit-grid 0.8.4-main.fd6878d → 0.8.4-main.fffef41

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.
@@ -1,3 +1,4 @@
1
1
  export declare const defaultColSize = 180;
2
2
  export declare const defaultRowSize = 30;
3
+ export declare const focusUnfurlDefault = true;
3
4
  //# sourceMappingURL=defs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"defs.d.ts","sourceRoot":"","sources":["../../src/defs.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,cAAc,MAAM,CAAC;AAClC,eAAO,MAAM,cAAc,KAAK,CAAC"}
1
+ {"version":3,"file":"defs.d.ts","sourceRoot":"","sources":["../../src/defs.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,cAAc,MAAM,CAAC;AAClC,eAAO,MAAM,cAAc,KAAK,CAAC;AACjC,eAAO,MAAM,kBAAkB,OAAO,CAAC"}
package/dist/src/defs.js CHANGED
@@ -3,4 +3,5 @@
3
3
  //
4
4
  export const defaultColSize = 180;
5
5
  export const defaultRowSize = 30;
6
+ export const focusUnfurlDefault = true;
6
7
  //# sourceMappingURL=defs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"defs.js","sourceRoot":"","sources":["../../src/defs.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,CAAC;AAClC,MAAM,CAAC,MAAM,cAAc,GAAG,EAAE,CAAC"}
1
+ {"version":3,"file":"defs.js","sourceRoot":"","sources":["../../src/defs.ts"],"names":[],"mappings":"AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,CAAC;AAClC,MAAM,CAAC,MAAM,cAAc,GAAG,EAAE,CAAC;AACjC,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAI,CAAC"}
@@ -1,11 +1,11 @@
1
1
  import { LitElement } from 'lit';
2
2
  import './dx-grid-axis-resize-handle';
3
- import { type DxGridAxisMeta, type DxGridAxisMetaProps, type DxGridCells, type DxGridFrozenAxes, type DxGridFrozenColsPlane, type DxGridFrozenRowsPlane, type DxGridMode, type DxGridPlane, type DxGridPlaneCells, type DxGridPlaneRange, type DxGridPlaneRecord, type DxGridPosition, type DxGridRange } from './types';
3
+ import { type DxGridAxisMeta, type DxGridAxisMetaProps, type DxGridCells, type DxGridFocusIndicatorVariant, type DxGridFrozenAxes, type DxGridFrozenColsPlane, type DxGridFrozenRowsPlane, type DxGridMode, type DxGridOverscroll, type DxGridPlane, type DxGridPlaneCells, type DxGridPlaneRange, type DxGridPlaneRecord, type DxGridPosition, type DxGridRange } from './types';
4
4
  export declare class DxGrid extends LitElement {
5
5
  constructor();
6
6
  gridId: string;
7
- rowDefault: DxGridPlaneRecord<DxGridFrozenRowsPlane, DxGridAxisMetaProps>;
8
- columnDefault: DxGridPlaneRecord<DxGridFrozenColsPlane, DxGridAxisMetaProps>;
7
+ rowDefault: Partial<DxGridPlaneRecord<DxGridFrozenRowsPlane, Partial<DxGridAxisMetaProps>>>;
8
+ columnDefault: Partial<DxGridPlaneRecord<DxGridFrozenColsPlane, Partial<DxGridAxisMetaProps>>>;
9
9
  rows: DxGridAxisMeta;
10
10
  columns: DxGridAxisMeta;
11
11
  initialCells: DxGridCells;
@@ -13,8 +13,9 @@ export declare class DxGrid extends LitElement {
13
13
  limitColumns: number;
14
14
  limitRows: number;
15
15
  frozen: DxGridFrozenAxes;
16
- overscroll: 'inline' | 'block' | 'trap' | undefined;
16
+ overscroll: DxGridOverscroll;
17
17
  activeRefs: string;
18
+ focusIndicatorVariant: DxGridFocusIndicatorVariant;
18
19
  /**
19
20
  * When this function is defined, it is used first to try to get a value for a cell,
20
21
  * and otherwise will fall back to `cells`.
@@ -41,6 +42,8 @@ export declare class DxGrid extends LitElement {
41
42
  private templateGridRows;
42
43
  private templatefrozenRowsStart;
43
44
  private templatefrozenRowsEnd;
45
+ private frozenColsSize;
46
+ private frozenRowsSize;
44
47
  private pointer;
45
48
  private colSizes;
46
49
  private rowSizes;
@@ -80,7 +83,6 @@ export declare class DxGrid extends LitElement {
80
83
  private focusedCellBox;
81
84
  private observer;
82
85
  private gridRef;
83
- private viewportRef;
84
86
  private maybeUpdateVisInline;
85
87
  private maybeUpdateVisBlock;
86
88
  private maxPosInline;
@@ -123,7 +125,7 @@ export declare class DxGrid extends LitElement {
123
125
  */
124
126
  private blockOffset;
125
127
  /**
126
- * Updates `pos` so that a cell in focus is fully within the viewport
128
+ * Updates `pos` so that a cell in focus is fully within the viewport.
127
129
  */
128
130
  snapPosToFocusedCell(): void;
129
131
  scrollToCoord({ coords }: {
@@ -137,12 +139,15 @@ export declare class DxGrid extends LitElement {
137
139
  get scrollTop(): number;
138
140
  set scrollTop(nextValue: number);
139
141
  private axisResizeable;
142
+ private clampAxisSize;
140
143
  private handleAxisResizeInternal;
141
144
  private renderPresentationLayer;
142
145
  private renderFixed;
143
146
  private renderFrozenRows;
144
147
  private renderFrozenColumns;
148
+ private renderMainGrid;
145
149
  private cellReadonly;
150
+ private cellFocusUnfurl;
146
151
  /**
147
152
  * Determines if the cell's text content should be selectable based on its readonly value.
148
153
  * @returns true if the cells text content is selectable, false otherwise.
@@ -1 +1 @@
1
- {"version":3,"file":"dx-grid.d.ts","sourceRoot":"","sources":["../../src/dx-grid.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAiB,MAAM,KAAK,CAAC;AAOhD,OAAO,8BAA8B,CAAC;AACtC,OAAO,EAML,KAAK,cAAc,EACnB,KAAK,mBAAmB,EAGxB,KAAK,WAAW,EAGhB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAE1B,KAAK,qBAAqB,EAC1B,KAAK,UAAU,EACf,KAAK,WAAW,EAEhB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EAEtB,KAAK,cAAc,EACnB,KAAK,WAA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,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI;IA2CrD,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI;IAcpD,oBAAoB,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,EAAE,YAAY,CAAC,EAAE,OAAO,GAAG,OAAO;IAS/F,oBAAoB,IAAI,IAAI;IAQ5B,gBAAgB,IAAI,IAAI;CAGlC;AAED,OAAO,EACL,eAAe,EACf,eAAe,EACf,aAAa,EACb,WAAW,EACX,cAAc,EACd,gBAAgB,EAChB,SAAS,EACT,gCAAgC,GACjC,MAAM,QAAQ,CAAC;AAEhB,eAAO,MAAM,kBAAkB,6BAA6B,CAAC"}
@@ -12,7 +12,7 @@ import { customElement, property, state } from 'lit/decorators.js';
12
12
  import { createRef, ref } from 'lit/directives/ref.js';
13
13
  import { styleMap } from 'lit/directives/style-map.js';
14
14
  import { html as staticHtml, unsafeStatic } from 'lit/static-html.js';
15
- import { defaultColSize, defaultRowSize } from './defs';
15
+ import { defaultColSize, defaultRowSize, focusUnfurlDefault } from './defs';
16
16
  import './dx-grid-axis-resize-handle';
17
17
  import { DxAxisResize, DxEditRequest, DxGridCellsSelect, separator, } from './types';
18
18
  import { cellSelected, closestAction, closestCell, gap, isReadonly, isSameCell, resizeTolerance, resolveColPlane, resolveFrozenPlane, resolveRowPlane, selectionProps, shouldSelect, sizeColMax, sizeColMin, sizeRowMax, sizeRowMin, targetIsPlane, toCellIndex, } from './util';
@@ -35,6 +35,7 @@ let DxGrid = class DxGrid extends LitElement {
35
35
  this.frozen = {};
36
36
  this.overscroll = undefined;
37
37
  this.activeRefs = '';
38
+ this.focusIndicatorVariant = 'sheet';
38
39
  /**
39
40
  * When this function is defined, it is used first to try to get a value for a cell,
40
41
  * and otherwise will fall back to `cells`.
@@ -81,6 +82,11 @@ let DxGrid = class DxGrid extends LitElement {
81
82
  this.templatefrozenRowsStart = '';
82
83
  this.templatefrozenRowsEnd = '';
83
84
  //
85
+ // `frozen…Size` is used to measure space available for the non-fixed planes
86
+ //
87
+ this.frozenColsSize = 0;
88
+ this.frozenRowsSize = 0;
89
+ //
84
90
  // Focus, selection, and resize states
85
91
  //
86
92
  this.pointer = null;
@@ -120,7 +126,7 @@ let DxGrid = class DxGrid extends LitElement {
120
126
  this.dispatchSelectionChange();
121
127
  }
122
128
  if (this.mode === 'edit-select') {
123
- // Prevent focus moving when editing while selection is possible
129
+ // Prevent focus moving when editing while selection is possible.
124
130
  event.preventDefault();
125
131
  }
126
132
  else if (this.focusActive && isSameCell(this.focusedCell, cellCoords)) {
@@ -162,24 +168,23 @@ let DxGrid = class DxGrid extends LitElement {
162
168
  }
163
169
  };
164
170
  //
165
- // Resize & reposition handlers, observer, ref
171
+ // Resize & reposition handlers, observer, ref.
166
172
  //
167
173
  this.observer = new ResizeObserver((entries) => {
168
174
  const { inlineSize, blockSize } = entries?.[0]?.contentBoxSize?.[0] ?? {
169
175
  inlineSize: 0,
170
176
  blockSize: 0,
171
177
  };
172
- if (Math.abs(inlineSize - this.sizeInline) > resizeTolerance ||
173
- Math.abs(blockSize - this.sizeBlock) > resizeTolerance) {
178
+ if (Math.abs(inlineSize - this.frozenColsSize - this.sizeInline) > resizeTolerance ||
179
+ Math.abs(blockSize - this.frozenRowsSize - this.sizeBlock) > resizeTolerance) {
174
180
  // console.info('[updating bounds]', 'resize', [inlineSize - this.sizeInline, blockSize - this.sizeBlock]);
175
- this.sizeInline = inlineSize;
176
- this.sizeBlock = blockSize;
181
+ this.sizeInline = inlineSize - this.frozenColsSize;
182
+ this.sizeBlock = blockSize - this.frozenRowsSize;
177
183
  this.updateVis();
178
184
  queueMicrotask(() => this.updatePos());
179
185
  }
180
186
  });
181
187
  this.gridRef = createRef();
182
- this.viewportRef = createRef();
183
188
  this.maybeUpdateVisInline = () => {
184
189
  if (this.posInline < this.binInlineMin || this.posInline >= this.binInlineMax) {
185
190
  this.updateVisInline();
@@ -223,12 +228,12 @@ let DxGrid = class DxGrid extends LitElement {
223
228
  event.gridId = this.gridId;
224
229
  }
225
230
  };
226
- // Wheel, top-level and element-level
231
+ // Wheel, top-level and element-level.
227
232
  document.defaultView?.addEventListener('wheel', this.handleTopLevelWheel, { passive: false });
228
233
  this.addEventListener('wheel', this.handleWheel);
229
- // Custom event(s)
234
+ // Custom event(s).
230
235
  this.addEventListener('dx-axis-resize-internal', this.handleAxisResizeInternal);
231
- // Standard events
236
+ // Standard events.
232
237
  this.addEventListener('pointerdown', this.handlePointerDown);
233
238
  this.addEventListener('pointermove', this.handlePointerMove);
234
239
  this.addEventListener('pointerup', this.handlePointerUp);
@@ -318,15 +323,13 @@ let DxGrid = class DxGrid extends LitElement {
318
323
  }
319
324
  }
320
325
  moveFocusIntoPlane(plane) {
321
- if (this.focusedCell.plane !== plane) {
322
- const colPlane = resolveColPlane(plane);
323
- const rowPlane = resolveRowPlane(plane);
324
- this.focusedCell = {
325
- plane,
326
- col: colPlane === 'grid' ? this.visColMin : 0,
327
- row: rowPlane === 'grid' ? this.visRowMin : 0,
328
- };
329
- }
326
+ const colPlane = resolveColPlane(plane);
327
+ const rowPlane = resolveRowPlane(plane);
328
+ this.focusedCell = {
329
+ plane,
330
+ col: colPlane === 'grid' ? this.visColMin : 0,
331
+ row: rowPlane === 'grid' ? this.visRowMin : 0,
332
+ };
330
333
  this.focusedCellElement()?.focus({ preventScroll: true });
331
334
  }
332
335
  moveFocusToPlane() {
@@ -483,7 +486,7 @@ let DxGrid = class DxGrid extends LitElement {
483
486
  this.updatePosBlock(block, maxBlock);
484
487
  }
485
488
  updateVisInline() {
486
- // todo: avoid starting from zero
489
+ // todo: avoid starting from zero.
487
490
  let axisCursor = 0;
488
491
  let pxCursor = this.colSize(axisCursor, 'grid');
489
492
  while (pxCursor < this.posInline) {
@@ -518,9 +521,14 @@ let DxGrid = class DxGrid extends LitElement {
518
521
  this.templatefrozenColsEnd = [...Array(this.frozen.frozenColsEnd ?? 0)]
519
522
  .map((_, c0) => `${this.colSize(c0, 'frozenColsEnd')}px`)
520
523
  .join(' ');
524
+ this.frozenColsSize =
525
+ [...Array(this.frozen.frozenColsStart ?? 0)].reduce((sum, _, c0) => sum + this.colSize(c0, 'frozenColsStart'), 0) +
526
+ gap * Math.max(0, this.frozen.frozenColsStart ?? 0 - 1) +
527
+ [...Array(this.frozen.frozenColsEnd ?? 0)].reduce((sum, _, c0) => sum + this.colSize(c0, 'frozenColsEnd'), 0) +
528
+ gap * Math.max(0, this.frozen.frozenColsEnd ?? 0 - 1);
521
529
  }
522
530
  updateVisBlock() {
523
- // todo: avoid starting from zero
531
+ // todo: avoid starting from zero.
524
532
  let axisCursor = 0;
525
533
  let pxCursor = this.rowSize(axisCursor, 'grid');
526
534
  while (pxCursor < this.posBlock) {
@@ -555,6 +563,11 @@ let DxGrid = class DxGrid extends LitElement {
555
563
  this.templatefrozenRowsEnd = [...Array(this.frozen.frozenRowsEnd ?? 0)]
556
564
  .map((_, r0) => `${this.rowSize(r0, 'frozenRowsEnd')}px`)
557
565
  .join(' ');
566
+ this.frozenRowsSize =
567
+ [...Array(this.frozen.frozenRowsStart ?? 0)].reduce((sum, _, r0) => sum + this.rowSize(r0, 'frozenRowsStart'), 0) +
568
+ gap * Math.max(0, this.frozen.frozenRowsStart ?? 0 - 1) +
569
+ [...Array(this.frozen.frozenRowsEnd ?? 0)].reduce((sum, _, r0) => sum + this.rowSize(r0, 'frozenRowsEnd'), 0) +
570
+ gap * Math.max(0, this.frozen.frozenRowsEnd ?? 0 - 1);
558
571
  }
559
572
  updateVis() {
560
573
  this.updateVisInline();
@@ -736,7 +749,7 @@ let DxGrid = class DxGrid extends LitElement {
736
749
  }, 0);
737
750
  }
738
751
  /**
739
- * Updates `pos` so that a cell in focus is fully within the viewport
752
+ * Updates `pos` so that a cell in focus is fully within the viewport.
740
753
  */
741
754
  snapPosToFocusedCell() {
742
755
  const outOfVis = this.focusedCellOutOfVis();
@@ -801,17 +814,33 @@ let DxGrid = class DxGrid extends LitElement {
801
814
  ? !!(this.columns[plane]?.[index]?.resizeable ?? this.columnDefault[plane]?.resizeable)
802
815
  : !!(this.rows[plane]?.[index]?.resizeable ?? this.rowDefault[plane]?.resizeable);
803
816
  }
817
+ clampAxisSize(plane, axis, index, requestedSize) {
818
+ const minSize = axis === 'col'
819
+ ? (this.columns[plane]?.[index]?.minSize ??
820
+ this.columnDefault[plane]?.minSize ??
821
+ sizeColMin)
822
+ : (this.rows[plane]?.[index]?.minSize ??
823
+ this.rowDefault[plane]?.minSize ??
824
+ sizeRowMin);
825
+ const maxSize = axis === 'col'
826
+ ? (this.columns[plane]?.[index]?.maxSize ??
827
+ this.columnDefault[plane]?.maxSize ??
828
+ sizeColMax)
829
+ : (this.rows[plane]?.[index]?.maxSize ??
830
+ this.rowDefault[plane]?.maxSize ??
831
+ sizeRowMax);
832
+ return Math.max(minSize, Math.min(maxSize, requestedSize));
833
+ }
804
834
  handleAxisResizeInternal(event) {
805
835
  event.stopPropagation();
806
836
  const { plane, axis, delta, size, index, state } = event;
837
+ const nextSize = this.clampAxisSize(plane, axis, index, size + delta);
807
838
  if (axis === 'col') {
808
- const nextSize = Math.max(sizeColMin, Math.min(sizeColMax, size + delta));
809
839
  this.colSizes = { ...this.colSizes, [plane]: { ...this.colSizes[plane], [index]: nextSize } };
810
840
  this.updateVisInline();
811
841
  this.updateIntrinsicInlineSize();
812
842
  }
813
843
  else {
814
- const nextSize = Math.max(sizeRowMin, Math.min(sizeRowMax, size + delta));
815
844
  this.rowSizes = { ...this.colSizes, [plane]: { ...this.rowSizes[plane], [index]: nextSize } };
816
845
  this.updateVisBlock();
817
846
  this.updateIntrinsicBlockSize();
@@ -826,7 +855,7 @@ let DxGrid = class DxGrid extends LitElement {
826
855
  }
827
856
  }
828
857
  //
829
- // Render and other lifecycle methods
858
+ // Render and other lifecycle methods.
830
859
  //
831
860
  // TODO(thure): This is for rendering presentational objects superimposed onto the canonical grid (e.g. DnD drop line for #8108).
832
861
  renderPresentationLayer(offsetInline, offsetBlock) {
@@ -891,7 +920,7 @@ let DxGrid = class DxGrid extends LitElement {
891
920
  renderFrozenRows(plane, visibleCols, offsetInline, selection) {
892
921
  const rowPlane = resolveRowPlane(plane);
893
922
  const rows = this.frozen[rowPlane];
894
- return (rows ?? 0) > 0
923
+ return (rows ?? 0) > 0 && this.limitColumns > 0
895
924
  ? html `<div
896
925
  role="none"
897
926
  class="dx-grid__plane--frozen-row"
@@ -919,7 +948,7 @@ let DxGrid = class DxGrid extends LitElement {
919
948
  renderFrozenColumns(plane, visibleRows, offsetBlock, selection) {
920
949
  const colPlane = resolveColPlane(plane);
921
950
  const cols = this.frozen[colPlane];
922
- return (cols ?? 0) > 0
951
+ return (cols ?? 0) > 0 && this.limitRows > 0
923
952
  ? html `<div
924
953
  role="none"
925
954
  class="dx-grid__plane--frozen-col"
@@ -944,6 +973,33 @@ let DxGrid = class DxGrid extends LitElement {
944
973
  </div>`
945
974
  : null;
946
975
  }
976
+ renderMainGrid(visibleCols, visibleRows, offsetInline, offsetBlock, selection) {
977
+ return this.limitRows > 0 && this.limitColumns > 0
978
+ ? html `<div
979
+ role="grid"
980
+ class="dx-grid__plane--grid"
981
+ tabindex="0"
982
+ data-dx-grid-plane="grid"
983
+ data-dx-grid-plane-row="1"
984
+ data-dx-grid-plane-col="1"
985
+ >
986
+ <div
987
+ role="none"
988
+ class="dx-grid__plane--grid__content"
989
+ style="transform:translate3d(${offsetInline}px,${offsetBlock}px,0);grid-template-columns:${this
990
+ .templateGridColumns};grid-template-rows:${this.templateGridRows};"
991
+ >
992
+ ${[...Array(visibleRows)].map((_, r0) => {
993
+ return [...Array(visibleCols)].map((_, c0) => {
994
+ const c = c0 + this.visColMin;
995
+ const r = r0 + this.visRowMin;
996
+ return this.renderCell(c, r, 'grid', cellSelected(c, r, 'grid', selection), c0, r0);
997
+ });
998
+ })}
999
+ </div>
1000
+ </div>`
1001
+ : null;
1002
+ }
947
1003
  cellReadonly(col, row, plane) {
948
1004
  const colPlane = resolveColPlane(plane);
949
1005
  const rowPlane = resolveRowPlane(plane);
@@ -957,6 +1013,19 @@ let DxGrid = class DxGrid extends LitElement {
957
1013
  const rowReadOnly = this.rows?.[rowPlane]?.[row]?.readonly ?? this.rowDefault?.[rowPlane]?.readonly;
958
1014
  return isReadonly(colReadOnly) || isReadonly(rowReadOnly);
959
1015
  }
1016
+ cellFocusUnfurl(col, row, plane) {
1017
+ const colPlane = resolveColPlane(plane);
1018
+ const rowPlane = resolveRowPlane(plane);
1019
+ // Check cell-specific setting first.
1020
+ const cellUnfurl = this.cell(col, row, plane)?.focusUnfurl;
1021
+ if (cellUnfurl !== undefined) {
1022
+ return cellUnfurl;
1023
+ }
1024
+ // Check column/row defaults.
1025
+ const colUnfurl = this.columns?.[colPlane]?.[col]?.focusUnfurl ?? this.columnDefault?.[colPlane]?.focusUnfurl;
1026
+ const rowUnfurl = this.rows?.[rowPlane]?.[row]?.focusUnfurl ?? this.rowDefault?.[rowPlane]?.focusUnfurl;
1027
+ return colUnfurl ?? rowUnfurl ?? focusUnfurlDefault;
1028
+ }
960
1029
  /**
961
1030
  * Determines if the cell's text content should be selectable based on its readonly value.
962
1031
  * @returns true if the cells text content is selectable, false otherwise.
@@ -1004,6 +1073,7 @@ let DxGrid = class DxGrid extends LitElement {
1004
1073
  const cell = this.cell(col, row, plane);
1005
1074
  const active = this.cellActive(col, row, plane);
1006
1075
  const readonly = this.cellReadonly(col, row, plane);
1076
+ const focusUnfurl = this.cellFocusUnfurl(col, row, plane);
1007
1077
  const textSelectable = this.cellTextSelectable(col, row, plane);
1008
1078
  const resizeIndex = cell?.resizeHandle ? (cell.resizeHandle === 'col' ? col : row) : undefined;
1009
1079
  const resizePlane = cell?.resizeHandle ? resolveFrozenPlane(cell.resizeHandle, plane) : undefined;
@@ -1015,11 +1085,13 @@ let DxGrid = class DxGrid extends LitElement {
1015
1085
  aria-readonly=${readonly ? 'true' : nothing}
1016
1086
  class=${cell?.className ?? nothing}
1017
1087
  data-refs=${cell?.dataRefs ?? nothing}
1088
+ data-focus-unfurl=${focusUnfurl ? nothing : 'false'}
1018
1089
  ?data-dx-active=${active}
1019
1090
  data-text-selectable=${textSelectable ? 'true' : 'false'}
1020
1091
  data-dx-grid-action="cell"
1021
1092
  aria-colindex=${col}
1022
1093
  aria-rowindex=${row}
1094
+ data-testid=${`${plane}.${col}.${row}`}
1023
1095
  style="grid-column:${visCol + 1};grid-row:${visRow + 1}"
1024
1096
  >
1025
1097
  <div role="none" class="dx-grid__cell__content">${cell?.value}${accessory}</div>
@@ -1053,9 +1125,24 @@ let DxGrid = class DxGrid extends LitElement {
1053
1125
  <div
1054
1126
  role="none"
1055
1127
  class="dx-grid"
1128
+ data-arrow-keys="all"
1056
1129
  style=${styleMap({
1057
- 'grid-template-columns': `${this.templatefrozenColsStart ? 'min-content ' : ''}minmax(0, ${Number.isFinite(this.limitColumns) ? `${Math.max(0, this.intrinsicInlineSize)}px` : '1fr'})${this.templatefrozenColsEnd ? ' min-content' : ''}`,
1058
- 'grid-template-rows': `${this.templatefrozenRowsStart ? 'min-content ' : ''}minmax(0, ${Number.isFinite(this.limitRows) ? `${Math.max(0, this.intrinsicBlockSize)}px` : '1fr'})${this.templatefrozenRowsEnd ? ' min-content' : ''}`,
1130
+ 'grid-template-columns': [
1131
+ this.templatefrozenColsStart ? 'min-content' : false,
1132
+ this.limitColumns > 0 &&
1133
+ `minmax(0, ${Number.isFinite(this.limitColumns) ? `${Math.max(0, this.intrinsicInlineSize)}px` : '1fr'})`,
1134
+ this.templatefrozenColsEnd ? 'min-content' : false,
1135
+ ]
1136
+ .filter(Boolean)
1137
+ .join(' '),
1138
+ 'grid-template-rows': [
1139
+ this.templatefrozenRowsStart ? 'min-content' : false,
1140
+ this.limitRows > 0 &&
1141
+ `minmax(0, ${Number.isFinite(this.limitRows) ? `${Math.max(0, this.intrinsicBlockSize)}px` : '1fr'})`,
1142
+ this.templatefrozenRowsEnd ? ' min-content' : false,
1143
+ ]
1144
+ .filter(Boolean)
1145
+ .join(' '),
1059
1146
  '--dx-grid-content-inline-size': Number.isFinite(this.limitColumns)
1060
1147
  ? `${Math.max(0, this.totalIntrinsicInlineSize)}px`
1061
1148
  : 'max-content',
@@ -1065,64 +1152,30 @@ let DxGrid = class DxGrid extends LitElement {
1065
1152
  })}
1066
1153
  data-grid=${this.gridId}
1067
1154
  data-grid-mode=${this.mode}
1155
+ data-grid-focus-indicator-variant=${this.focusIndicatorVariant}
1068
1156
  ?data-grid-select=${selection.visible}
1069
1157
  ${ref(this.gridRef)}
1070
1158
  >
1071
1159
  ${this.renderFixed('fixedStartStart', selection)}${this.renderFrozenRows('frozenRowsStart', visibleCols, offsetInline, selection)}${this.renderFixed('fixedStartEnd', selection)}${this.renderFrozenColumns('frozenColsStart', visibleRows, offsetBlock, selection)}
1072
- <div
1073
- role="grid"
1074
- class="dx-grid__plane--grid"
1075
- tabindex="0"
1076
- data-dx-grid-plane="grid"
1077
- data-dx-grid-plane-row="1"
1078
- data-dx-grid-plane-col="1"
1079
- ${ref(this.viewportRef)}
1080
- >
1081
- <div
1082
- role="none"
1083
- class="dx-grid__plane--grid__content"
1084
- style="transform:translate3d(${offsetInline}px,${offsetBlock}px,0);grid-template-columns:${this
1085
- .templateGridColumns};grid-template-rows:${this.templateGridRows};"
1086
- >
1087
- ${[...Array(visibleRows)].map((_, r0) => {
1088
- return [...Array(visibleCols)].map((_, c0) => {
1089
- const c = c0 + this.visColMin;
1090
- const r = r0 + this.visRowMin;
1091
- return this.renderCell(c, r, 'grid', cellSelected(c, r, 'grid', selection), c0, r0);
1092
- });
1093
- })}
1094
- </div>
1095
- </div>
1160
+ ${this.renderMainGrid(visibleCols, visibleRows, offsetInline, offsetBlock, selection)}
1096
1161
  ${this.renderFrozenColumns('frozenColsEnd', visibleRows, offsetBlock, selection)}${this.renderFixed('fixedEndStart', selection)}${this.renderFrozenRows('frozenRowsEnd', visibleCols, offsetInline, selection)}${this.renderFixed('fixedEndEnd', selection)}
1097
1162
  </div>`;
1098
1163
  }
1099
1164
  updateIntrinsicInlineSize() {
1100
1165
  this.intrinsicInlineSize = Number.isFinite(this.limitColumns)
1101
1166
  ? [...Array(this.limitColumns)].reduce((acc, _, c0) => acc + this.colSize(c0, 'grid'), 0) +
1102
- gap * (this.limitColumns - 1)
1167
+ gap * Math.max(0, this.limitColumns - 1)
1103
1168
  : Infinity;
1104
1169
  this.totalIntrinsicInlineSize =
1105
- this.intrinsicInlineSize +
1106
- (Number.isFinite(this.frozen.frozenColsStart)
1107
- ? [...Array(this.frozen.frozenColsStart)].reduce((acc, _, c0) => acc + gap + this.colSize(c0, 'frozenColsStart'), 0)
1108
- : 0) +
1109
- (Number.isFinite(this.frozen.frozenColsEnd)
1110
- ? [...Array(this.frozen.frozenColsEnd)].reduce((acc, _, c0) => acc + gap + this.colSize(c0, 'frozenColsEnd'), 0)
1111
- : 0);
1170
+ this.limitColumns > 0 ? this.intrinsicInlineSize + this.frozenColsSize : this.frozenColsSize - gap;
1112
1171
  }
1113
1172
  updateIntrinsicBlockSize() {
1114
1173
  this.intrinsicBlockSize = Number.isFinite(this.limitRows)
1115
1174
  ? [...Array(this.limitRows)].reduce((acc, _, r0) => acc + this.rowSize(r0, 'grid'), 0) +
1116
- gap * (this.limitRows - 1)
1175
+ gap * Math.max(0, this.limitRows - 1)
1117
1176
  : Infinity;
1118
1177
  this.totalIntrinsicBlockSize =
1119
- this.intrinsicBlockSize +
1120
- (Number.isFinite(this.frozen.frozenRowsStart)
1121
- ? [...Array(this.frozen.frozenRowsStart)].reduce((acc, _, r0) => acc + gap + this.rowSize(r0, 'frozenRowsStart'), 0)
1122
- : 0) +
1123
- (Number.isFinite(this.frozen.frozenRowsEnd)
1124
- ? [...Array(this.frozen.frozenRowsEnd)].reduce((acc, _, r0) => acc + gap + this.rowSize(r0, 'frozenRowsEnd'), 0)
1125
- : 0);
1178
+ this.limitRows > 0 ? this.intrinsicBlockSize + this.frozenRowsSize : this.frozenRowsSize - gap;
1126
1179
  }
1127
1180
  updateIntrinsicSizes() {
1128
1181
  this.updateIntrinsicInlineSize();
@@ -1154,7 +1207,7 @@ let DxGrid = class DxGrid extends LitElement {
1154
1207
  if (this.getCells) {
1155
1208
  this.updateCells(true);
1156
1209
  }
1157
- this.observer.observe(this.viewportRef.value);
1210
+ this.observer.observe(this.gridRef.value);
1158
1211
  this.computeColSizes();
1159
1212
  this.computeRowSizes();
1160
1213
  this.updateIntrinsicSizes();
@@ -1215,8 +1268,8 @@ let DxGrid = class DxGrid extends LitElement {
1215
1268
  }
1216
1269
  disconnectedCallback() {
1217
1270
  super.disconnectedCallback();
1218
- if (this.viewportRef.value) {
1219
- this.observer.unobserve(this.viewportRef.value);
1271
+ if (this.gridRef.value) {
1272
+ this.observer.unobserve(this.gridRef.value);
1220
1273
  }
1221
1274
  document.defaultView?.removeEventListener('wheel', this.handleTopLevelWheel);
1222
1275
  }
@@ -1260,6 +1313,9 @@ __decorate([
1260
1313
  __decorate([
1261
1314
  property({ type: String })
1262
1315
  ], DxGrid.prototype, "activeRefs", void 0);
1316
+ __decorate([
1317
+ property({ type: String })
1318
+ ], DxGrid.prototype, "focusIndicatorVariant", void 0);
1263
1319
  __decorate([
1264
1320
  state()
1265
1321
  ], DxGrid.prototype, "cells", void 0);
@@ -1323,6 +1379,12 @@ __decorate([
1323
1379
  __decorate([
1324
1380
  state()
1325
1381
  ], DxGrid.prototype, "templatefrozenRowsEnd", void 0);
1382
+ __decorate([
1383
+ state()
1384
+ ], DxGrid.prototype, "frozenColsSize", void 0);
1385
+ __decorate([
1386
+ state()
1387
+ ], DxGrid.prototype, "frozenRowsSize", void 0);
1326
1388
  __decorate([
1327
1389
  state()
1328
1390
  ], DxGrid.prototype, "pointer", void 0);