@rozie-ui/data-table-lit 0.8.1 → 0.9.1

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/index.mjs CHANGED
@@ -292,6 +292,28 @@ const tileIndex = (i, lo, hi) => {
292
292
  return lo + k;
293
293
  };
294
294
  //#endregion
295
+ //#region src/helpers/rangeFill.ts
296
+ const rangeFillTargets = (range, activeRow, activeCol) => {
297
+ const single = {
298
+ top: activeRow,
299
+ bottom: activeRow,
300
+ col: activeCol,
301
+ size: 1
302
+ };
303
+ if (!range) return single;
304
+ const top = Math.min(range.r0, range.r1);
305
+ const bottom = Math.max(range.r0, range.r1);
306
+ const left = Math.min(range.c0, range.c1);
307
+ const right = Math.max(range.c0, range.c1);
308
+ if (activeCol < left || activeCol > right || activeRow < top || activeRow > bottom) return single;
309
+ return {
310
+ top,
311
+ bottom,
312
+ col: activeCol,
313
+ size: bottom - top + 1
314
+ };
315
+ };
316
+ //#endregion
295
317
  //#region src/helpers/rowValueUtils.ts
296
318
  const replaceRowValue = (rows, rowIndex, field, value) => {
297
319
  const src = rows || [];
@@ -587,6 +609,7 @@ let DataTable = class DataTable extends SignalWatcher(LitElement) {
587
609
  initialControlledValue: void 0
588
610
  });
589
611
  this.stickyHeader = false;
612
+ this.columnLines = false;
590
613
  this.interactionMode = "table";
591
614
  this.singleClickEdit = false;
592
615
  this.undoable = false;
@@ -2698,7 +2721,7 @@ let DataTable = class DataTable extends SignalWatcher(LitElement) {
2698
2721
  this._activeColIndex.value = col;
2699
2722
  if (isHeader !== prevIsHeader || col !== prevCol || (isHeader ? movedLevel !== prevLevel : movedRow !== prevRow)) this.focusIntentEpoch = this.focusIntentEpoch + 1;
2700
2723
  if (this.rangeTransition) this.rangeTransition = false;
2701
- else if (this.rangeClickPending && this.rangeClickPending.isHeader === isHeader && this.rangeClickPending.r === movedRow && this.rangeClickPending.c === col) this.rangeClickPending = null;
2724
+ else if (!isHeader && tgt !== cellEl && this._editingRow.value === movedRow && this._editingCol.value === col) {} else if (this.rangeClickPending && this.rangeClickPending.isHeader === isHeader && this.rangeClickPending.r === movedRow && this.rangeClickPending.c === col) this.rangeClickPending = null;
2702
2725
  else {
2703
2726
  this.rangeClickPending = null;
2704
2727
  this.clearRange();
@@ -3462,6 +3485,14 @@ let DataTable = class DataTable extends SignalWatcher(LitElement) {
3462
3485
  }
3463
3486
  this.applyGridToRange(grid, box.r0, box.c0, "filled");
3464
3487
  };
3488
+ this.fillTargets = () => rangeFillTargets(this.normalizedRange(), this._activeRow.value, this._activeColIndex.value);
3489
+ this.rangeSize = () => this._activeIsHeader.value ? 1 : this.fillTargets().size;
3490
+ this.fillActiveColumn = (value) => {
3491
+ const t = this.fillTargets();
3492
+ const grid = [];
3493
+ for (let i = 0; i < t.size; i++) grid.push([value]);
3494
+ return this.applyGridToRange(grid, t.top, t.col, "updated");
3495
+ };
3465
3496
  this.fillDragging = false;
3466
3497
  this.fillDragMove = null;
3467
3498
  this.fillDragUp = null;
@@ -3888,6 +3919,44 @@ let DataTable = class DataTable extends SignalWatcher(LitElement) {
3888
3919
  } else if (skipFocusReturn !== true) this.focusCellWhenReady(focusRow, focusCol);
3889
3920
  return true;
3890
3921
  };
3922
+ this.commitEditToRange = (overrideValue = void 0) => {
3923
+ if (this._editingRow.value < 0) return false;
3924
+ if (this.committedThisSession) return false;
3925
+ const colId = this.editingColumnId();
3926
+ if (colId == null) {
3927
+ this.endEdit();
3928
+ return false;
3929
+ }
3930
+ const rawValue = overrideValue !== void 0 ? overrideValue : this._draftValue.value;
3931
+ const err = this.runValidator(colId, this.coerceCellValue(colId, rawValue), this.editingRowOriginal());
3932
+ if (err !== true) {
3933
+ this.setInvalid(err);
3934
+ this.focusEditorWhenReady(this._editingRow.value, this._editingCol.value);
3935
+ return false;
3936
+ }
3937
+ this.setInvalid("");
3938
+ const focusRow = this._editingRow.value;
3939
+ const focusCol = this._editingCol.value;
3940
+ const rowOriginal = this.editingRowOriginal();
3941
+ const rowId = this.editingRowId();
3942
+ this.editTransition = true;
3943
+ this.committedThisSession = true;
3944
+ const result = this.fillActiveColumn(rawValue);
3945
+ this.endEdit();
3946
+ this.editTransition = false;
3947
+ this.rangeClickPending = {
3948
+ isHeader: false,
3949
+ r: focusRow,
3950
+ c: focusCol
3951
+ };
3952
+ if (result && result.changed > 0) this.pendingEditFollow = {
3953
+ rowOriginal,
3954
+ rowId,
3955
+ col: focusCol
3956
+ };
3957
+ else this.focusCellWhenReady(focusRow, focusCol);
3958
+ return true;
3959
+ };
3891
3960
  this.toggleActiveBooleanCell = () => {
3892
3961
  if (this.rowIndexIsGrouped(this._activeRow.value)) return;
3893
3962
  const row = (this._rows.value || [])[this._activeRow.value];
@@ -3899,6 +3968,11 @@ let DataTable = class DataTable extends SignalWatcher(LitElement) {
3899
3968
  const rowId = row.id;
3900
3969
  const oldValue = this.cellValueAt(this._activeRow.value, this._activeColIndex.value);
3901
3970
  const newValue = !oldValue;
3971
+ if (this.rangeSize() > 1) {
3972
+ this.setInvalid("");
3973
+ this.fillActiveColumn(newValue);
3974
+ return;
3975
+ }
3902
3976
  const err = this.runValidator(colId, newValue, rowOriginal);
3903
3977
  if (err !== true) {
3904
3978
  this.setInvalid(err);
@@ -4129,14 +4203,21 @@ let DataTable = class DataTable extends SignalWatcher(LitElement) {
4129
4203
  this.committedThisSession = false;
4130
4204
  this.rowDraftSync = {};
4131
4205
  this.dropinTabFlush = null;
4206
+ this.rangeCommitIntent = false;
4132
4207
  this.inRowEdit = () => this._editingRowIndex.value != null;
4133
4208
  this.editorValueFor = (colId) => this.inRowEdit() ? this._rowDraft.value ? this._rowDraft.value[colId] : null : this._draftValue.value;
4134
4209
  this.editorCheckedFor = (colId) => !!(this.inRowEdit() ? this._rowDraft.value ? this._rowDraft.value[colId] : null : this._draftValue.value);
4135
- this.editorCommitFor = (colId) => (value) => {
4210
+ this.editorCommitFor = (colId) => (value, options) => {
4136
4211
  if (this.inRowEdit()) {
4137
4212
  this.setRowDraft(colId, value);
4138
4213
  return;
4139
4214
  }
4215
+ const wantsRange = options != null && options.toRange === true || this.rangeCommitIntent;
4216
+ this.rangeCommitIntent = false;
4217
+ if (wantsRange && !this.dropinTabFlush && this.rangeSize() > 1) {
4218
+ this.commitEditToRange(value);
4219
+ return;
4220
+ }
4140
4221
  if (this.dropinTabFlush) {
4141
4222
  this.dropinTabFlush.called = true;
4142
4223
  if (this.commitEdit(value, true)) this.dropinTabFlush.committed = true;
@@ -4208,7 +4289,10 @@ let DataTable = class DataTable extends SignalWatcher(LitElement) {
4208
4289
  }
4209
4290
  return;
4210
4291
  }
4211
- if (key === "Enter") {
4292
+ if (key === "Enter" && (e.ctrlKey || e.metaKey) && this.rangeSize() > 1) {
4293
+ e.preventDefault();
4294
+ this.commitEditToRange(void 0);
4295
+ } else if (key === "Enter") {
4212
4296
  e.preventDefault();
4213
4297
  this.commitEdit(void 0);
4214
4298
  } else if (key === "Tab") {
@@ -4229,8 +4313,18 @@ let DataTable = class DataTable extends SignalWatcher(LitElement) {
4229
4313
  this.cancelEdit();
4230
4314
  }
4231
4315
  };
4316
+ this.onEditorDropinKeyDownCapture = (e) => {
4317
+ if (!e) return;
4318
+ if (e.key === "Enter" && (e.ctrlKey || e.metaKey)) {
4319
+ this.rangeCommitIntent = true;
4320
+ setTimeout(() => {
4321
+ this.rangeCommitIntent = false;
4322
+ }, 0);
4323
+ }
4324
+ };
4232
4325
  this.onEditorDropinKeyDown = (e) => {
4233
4326
  if (!e) return;
4327
+ this.rangeCommitIntent = false;
4234
4328
  const key = e.key;
4235
4329
  if (this.inRowEdit()) {
4236
4330
  if (key === "Enter") {
@@ -4488,6 +4582,8 @@ let DataTable = class DataTable extends SignalWatcher(LitElement) {
4488
4582
  --rdt-border: 1px solid var(--rozie-data-table-border-color, var(--rdt-ds-border-color));
4489
4583
  --rdt-filter-border: 1px solid var(--rozie-data-table-control-border-color, var(--rdt-ds-control-border-color));
4490
4584
  --rdt-filter-radius: var(--rozie-data-table-radius, var(--rdt-ds-radius));
4585
+ --rdt-column-border: 1px solid var(--rozie-data-table-column-border-color, var(--rozie-data-table-border-color, var(--rdt-ds-column-border-color)));
4586
+ --rdt-pinned-bg: var(--rozie-data-table-pinned-bg, var(--rdt-ds-pinned-bg));
4491
4587
  --rdt-font: var(--rozie-data-table-font, var(--rdt-ds-font));
4492
4588
  --rdt-cell-padding: var(--rozie-data-table-cell-padding, var(--rdt-ds-cell-padding));
4493
4589
  --rdt-header-bg: var(--rozie-data-table-header-bg, var(--rdt-ds-header-bg));
@@ -4509,7 +4605,12 @@ let DataTable = class DataTable extends SignalWatcher(LitElement) {
4509
4605
  --rdt-page-size-radius: var(--rozie-data-table-radius, var(--rdt-ds-radius));
4510
4606
  }
4511
4607
  .rozie-data-table[data-rozie-s-d5dcab4c] {
4512
- border-collapse: collapse;
4608
+ /* SEPARATE, not collapse. With collapsed borders the browser keeps a sticky cell's shared
4609
+ border in the scrolling grid, so a 1px line of scrolled content shows beside pinned
4610
+ columns and above the sticky header. Separate borders travel with their cell; zero
4611
+ spacing keeps lines 1px because each cell draws only its own sides (see the cell rule). */
4612
+ border-collapse: separate;
4613
+ border-spacing: 0;
4513
4614
  width: 100%;
4514
4615
  font: var(--rdt-font, 14px system-ui, sans-serif);
4515
4616
  color: var(--rdt-color, inherit);
@@ -4568,8 +4669,28 @@ let DataTable = class DataTable extends SignalWatcher(LitElement) {
4568
4669
  .rozie-data-table[data-rozie-s-d5dcab4c] .rdt-td[data-rozie-s-d5dcab4c] {
4569
4670
  padding: var(--rdt-cell-padding, 0.5rem 0.75rem);
4570
4671
  text-align: left;
4672
+ /* Reset every side, then draw only the row line. Under separate borders each cell owns its
4673
+ lines, and the reset keeps a host's plain \`table td { border }\` rule from drawing a second
4674
+ set inside the table (this class-scoped rule outranks it). */
4675
+ border: 0;
4571
4676
  border-bottom: var(--rdt-border, 1px solid rgba(0, 0, 0, 0.08));
4572
4677
  }
4678
+ .rozie-data-table[data-rozie-s-d5dcab4c] .rdt-detail-cell[data-rozie-s-d5dcab4c] {
4679
+ border: 0;
4680
+ }
4681
+ .rozie-data-table.rdt-column-lines[data-rozie-s-d5dcab4c] .rdt-th[data-rozie-s-d5dcab4c],
4682
+ .rozie-data-table.rdt-column-lines[data-rozie-s-d5dcab4c] .rdt-td[data-rozie-s-d5dcab4c],
4683
+ .rozie-data-table.rdt-column-lines[data-rozie-s-d5dcab4c] .rdt-filter-cell[data-rozie-s-d5dcab4c],
4684
+ .rozie-data-table.rdt-column-lines[data-rozie-s-d5dcab4c] .rdt-detail-cell[data-rozie-s-d5dcab4c] {
4685
+ border-inline-end: var(--rdt-column-border, 1px solid rgba(0, 0, 0, 0.08));
4686
+ }
4687
+ .rozie-data-table.rdt-column-lines[data-rozie-s-d5dcab4c] tr[data-rozie-s-d5dcab4c] > [data-rozie-s-d5dcab4c]:first-child:not(.rdt-col-spacer[data-rozie-s-d5dcab4c]),
4688
+ .rozie-data-table.rdt-column-lines[data-rozie-s-d5dcab4c] tr[data-rozie-s-d5dcab4c] > .rdt-col-spacer[data-rozie-s-d5dcab4c]:first-child + *[data-rozie-s-d5dcab4c] {
4689
+ border-inline-start: var(--rdt-column-border, 1px solid rgba(0, 0, 0, 0.08));
4690
+ }
4691
+ .rozie-data-table.rdt-column-lines[data-rozie-s-d5dcab4c] .rdt-thead[data-rozie-s-d5dcab4c] > tr[data-rozie-s-d5dcab4c]:first-child > .rdt-th[data-rozie-s-d5dcab4c] {
4692
+ border-top: var(--rdt-column-border, 1px solid rgba(0, 0, 0, 0.08));
4693
+ }
4573
4694
  .rozie-data-table[data-rozie-s-d5dcab4c] .rdt-thead[data-rozie-s-d5dcab4c] .rdt-th[data-rozie-s-d5dcab4c] {
4574
4695
  font-weight: var(--rdt-header-weight, 600);
4575
4696
  /* OPAQUE default (was rgba(0,0,0,0.03)): a translucent header lets the scrolling body
@@ -4693,8 +4814,21 @@ let DataTable = class DataTable extends SignalWatcher(LitElement) {
4693
4814
  .rozie-data-table[data-rozie-s-d5dcab4c] .rdt-pinned[data-rozie-s-d5dcab4c] {
4694
4815
  box-sizing: border-box;
4695
4816
  }
4817
+ .rozie-data-table[data-rozie-s-d5dcab4c] .rdt-td.rdt-pinned[data-rozie-s-d5dcab4c] {
4818
+ background-color: var(--rdt-pinned-bg, #fff);
4819
+ }
4820
+ .rozie-data-table[data-rozie-s-d5dcab4c] .rdt-group-header[data-rozie-s-d5dcab4c] > .rdt-td.rdt-pinned[data-rozie-s-d5dcab4c] {
4821
+ background: linear-gradient(var(--rdt-group-header-bg, rgba(0, 0, 0, 0.025)), var(--rdt-group-header-bg, rgba(0, 0, 0, 0.025))), var(--rdt-pinned-bg, #fff);
4822
+ }
4823
+ .rozie-data-table[data-rozie-s-d5dcab4c] .rdt-filter-cell.rdt-pinned[data-rozie-s-d5dcab4c] {
4824
+ background: linear-gradient(var(--rdt-filter-row-bg, rgba(0, 0, 0, 0.015)), var(--rdt-filter-row-bg, rgba(0, 0, 0, 0.015))), var(--rdt-pinned-bg, #fff);
4825
+ }
4826
+ .rozie-data-table[data-rozie-s-d5dcab4c] .rdt-td.rdt-pinned.rdt-in-range[data-rozie-s-d5dcab4c] {
4827
+ background: linear-gradient(var(--rdt-range-bg, rgba(37, 99, 235, 0.12)), var(--rdt-range-bg, rgba(37, 99, 235, 0.12))), var(--rdt-pinned-bg, #fff);
4828
+ }
4696
4829
  .rozie-data-table[data-rozie-s-d5dcab4c] .rdt-filter-cell[data-rozie-s-d5dcab4c] {
4697
4830
  padding: var(--rdt-filter-cell-padding, 0.35rem 0.75rem);
4831
+ border: 0;
4698
4832
  border-bottom: var(--rdt-border, 1px solid rgba(0, 0, 0, 0.08));
4699
4833
  }
4700
4834
  .rozie-data-table-wrap[data-rozie-s-d5dcab4c] .rdt-filter-row[data-rozie-s-d5dcab4c] .rdt-col-filter {
@@ -5291,6 +5425,7 @@ let DataTable = class DataTable extends SignalWatcher(LitElement) {
5291
5425
  };
5292
5426
  document.addEventListener("pointerdown", this.docPointerDown, true);
5293
5427
  }
5428
+ if (this.gridRoot) this.gridRoot.addEventListener("keydown", this.onEditorDropinKeyDownCapture, true);
5294
5429
  if (this.isWindowed()) this.gridScrollEl = this._ref__rozieRoot ? this._ref__rozieRoot.querySelector(".rdt-scroll") : null;
5295
5430
  if (this.rowsWindowed()) {
5296
5431
  this.virtualizer = new Virtualizer(this.virtualizerOptions());
@@ -5380,6 +5515,7 @@ let DataTable = class DataTable extends SignalWatcher(LitElement) {
5380
5515
  document.removeEventListener("pointerdown", this.docPointerDown, true);
5381
5516
  this.docPointerDown = null;
5382
5517
  }
5518
+ if (this.gridRoot) this.gridRoot.removeEventListener("keydown", this.onEditorDropinKeyDownCapture, true);
5383
5519
  if (this.virtualizerCleanup) this.virtualizerCleanup();
5384
5520
  if (this.colVirtualizerCleanup) this.colVirtualizerCleanup();
5385
5521
  this.teardownColRtlWatch();
@@ -5453,7 +5589,8 @@ ${this.groupable ? html`<div class="rdt-group-bar-host" data-rozie-s-d5dcab4c>
5453
5589
  <table class="${Object.entries({
5454
5590
  "rozie-data-table": true,
5455
5591
  "rdt-sticky": this.stickyHeader,
5456
- "rdt-col-windowed": this.colsWindowed()
5592
+ "rdt-col-windowed": this.colsWindowed(),
5593
+ "rdt-column-lines": this.columnLines
5457
5594
  }).filter(([, v]) => v).map(([k]) => k).join(" ")}" role=${rozieAttr(this.tableRole())} aria-rowcount=${rozieAttr(this.gridAriaRowCount())} aria-colcount=${rozieAttr(this.gridAriaColCount())} @keydown=${($event) => {
5458
5595
  this.onGridKeyDown($event);
5459
5596
  }} @focusin=${($event) => {
@@ -5788,7 +5925,8 @@ ${this.groupable ? html`<div class="rdt-group-bar-host" data-rozie-s-d5dcab4c>
5788
5925
  commit: this.editorCommitFor(cell.column.id),
5789
5926
  cancel: this.editorCancelFor(),
5790
5927
  columnLabel: this.headerLabel(cell.column.id),
5791
- autofocus: this.editorAutofocusFor(cell.column.id, wr.vi.index)
5928
+ autofocus: this.editorAutofocusFor(cell.column.id, wr.vi.index),
5929
+ rangeSize: this.inRowEdit() ? 1 : this.rangeSize()
5792
5930
  }) : html`<slot name="${`editor-${cell.column.id}`}" data-rozie-params=${(() => {
5793
5931
  try {
5794
5932
  return JSON.stringify({
@@ -5799,7 +5937,8 @@ ${this.groupable ? html`<div class="rdt-group-bar-host" data-rozie-s-d5dcab4c>
5799
5937
  commit: this.editorCommitFor(cell.column.id),
5800
5938
  cancel: this.editorCancelFor(),
5801
5939
  columnLabel: this.headerLabel(cell.column.id),
5802
- autofocus: this.editorAutofocusFor(cell.column.id, wr.vi.index)
5940
+ autofocus: this.editorAutofocusFor(cell.column.id, wr.vi.index),
5941
+ rangeSize: this.inRowEdit() ? 1 : this.rangeSize()
5803
5942
  });
5804
5943
  } catch {
5805
5944
  return "{}";
@@ -5813,7 +5952,8 @@ ${this.groupable ? html`<div class="rdt-group-bar-host" data-rozie-s-d5dcab4c>
5813
5952
  commit: this.editorCommitFor(cell.column.id),
5814
5953
  cancel: this.editorCancelFor(),
5815
5954
  columnLabel: this.headerLabel(cell.column.id),
5816
- autofocus: this.editorAutofocusFor(cell.column.id, wr.vi.index)
5955
+ autofocus: this.editorAutofocusFor(cell.column.id, wr.vi.index),
5956
+ rangeSize: this.inRowEdit() ? 1 : this.rangeSize()
5817
5957
  }) : html`<slot name="editor" data-rozie-params=${(() => {
5818
5958
  try {
5819
5959
  return JSON.stringify({
@@ -5824,7 +5964,8 @@ ${this.groupable ? html`<div class="rdt-group-bar-host" data-rozie-s-d5dcab4c>
5824
5964
  commit: this.editorCommitFor(cell.column.id),
5825
5965
  cancel: this.editorCancelFor(),
5826
5966
  columnLabel: this.headerLabel(cell.column.id),
5827
- autofocus: this.editorAutofocusFor(cell.column.id, wr.vi.index)
5967
+ autofocus: this.editorAutofocusFor(cell.column.id, wr.vi.index),
5968
+ rangeSize: this.inRowEdit() ? 1 : this.rangeSize()
5828
5969
  });
5829
5970
  } catch {
5830
5971
  return "{}";
@@ -5906,7 +6047,8 @@ ${this.groupable ? html`<div class="rdt-group-bar-host" data-rozie-s-d5dcab4c>
5906
6047
  </table>
5907
6048
  </div>` : html`<table class="${Object.entries({
5908
6049
  "rozie-data-table": true,
5909
- "rdt-sticky": this.stickyHeader
6050
+ "rdt-sticky": this.stickyHeader,
6051
+ "rdt-column-lines": this.columnLines
5910
6052
  }).filter(([, v]) => v).map(([k]) => k).join(" ")}" role=${rozieAttr(this.tableRole())} aria-rowcount=${rozieAttr(this.gridAriaRowCount())} aria-colcount=${rozieAttr(this.gridAriaColCount())} @keydown=${($event) => {
5911
6053
  this.onGridKeyDown($event);
5912
6054
  }} @focusin=${($event) => {
@@ -6218,7 +6360,8 @@ ${this.groupable ? html`<div class="rdt-group-bar-host" data-rozie-s-d5dcab4c>
6218
6360
  commit: this.editorCommitFor(cell.column.id),
6219
6361
  cancel: this.editorCancelFor(),
6220
6362
  columnLabel: this.headerLabel(cell.column.id),
6221
- autofocus: this.editorAutofocusFor(cell.column.id, this.rowIndexOf(row))
6363
+ autofocus: this.editorAutofocusFor(cell.column.id, this.rowIndexOf(row)),
6364
+ rangeSize: this.inRowEdit() ? 1 : this.rangeSize()
6222
6365
  }) : html`<slot name="${`editor-${cell.column.id}`}" data-rozie-params=${(() => {
6223
6366
  try {
6224
6367
  return JSON.stringify({
@@ -6229,7 +6372,8 @@ ${this.groupable ? html`<div class="rdt-group-bar-host" data-rozie-s-d5dcab4c>
6229
6372
  commit: this.editorCommitFor(cell.column.id),
6230
6373
  cancel: this.editorCancelFor(),
6231
6374
  columnLabel: this.headerLabel(cell.column.id),
6232
- autofocus: this.editorAutofocusFor(cell.column.id, this.rowIndexOf(row))
6375
+ autofocus: this.editorAutofocusFor(cell.column.id, this.rowIndexOf(row)),
6376
+ rangeSize: this.inRowEdit() ? 1 : this.rangeSize()
6233
6377
  });
6234
6378
  } catch {
6235
6379
  return "{}";
@@ -6243,7 +6387,8 @@ ${this.groupable ? html`<div class="rdt-group-bar-host" data-rozie-s-d5dcab4c>
6243
6387
  commit: this.editorCommitFor(cell.column.id),
6244
6388
  cancel: this.editorCancelFor(),
6245
6389
  columnLabel: this.headerLabel(cell.column.id),
6246
- autofocus: this.editorAutofocusFor(cell.column.id, this.rowIndexOf(row))
6390
+ autofocus: this.editorAutofocusFor(cell.column.id, this.rowIndexOf(row)),
6391
+ rangeSize: this.inRowEdit() ? 1 : this.rangeSize()
6247
6392
  }) : html`<slot name="editor" data-rozie-params=${(() => {
6248
6393
  try {
6249
6394
  return JSON.stringify({
@@ -6254,7 +6399,8 @@ ${this.groupable ? html`<div class="rdt-group-bar-host" data-rozie-s-d5dcab4c>
6254
6399
  commit: this.editorCommitFor(cell.column.id),
6255
6400
  cancel: this.editorCancelFor(),
6256
6401
  columnLabel: this.headerLabel(cell.column.id),
6257
- autofocus: this.editorAutofocusFor(cell.column.id, this.rowIndexOf(row))
6402
+ autofocus: this.editorAutofocusFor(cell.column.id, this.rowIndexOf(row)),
6403
+ rangeSize: this.inRowEdit() ? 1 : this.rangeSize()
6258
6404
  });
6259
6405
  } catch {
6260
6406
  return "{}";
@@ -6517,6 +6663,11 @@ __decorate([property({
6517
6663
  reflect: true,
6518
6664
  attribute: "sticky-header"
6519
6665
  })], DataTable.prototype, "stickyHeader", void 0);
6666
+ __decorate([property({
6667
+ type: Boolean,
6668
+ reflect: true,
6669
+ attribute: "column-lines"
6670
+ })], DataTable.prototype, "columnLines", void 0);
6520
6671
  __decorate([property({
6521
6672
  type: String,
6522
6673
  reflect: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rozie-ui/data-table-lit",
3
- "version": "0.8.1",
3
+ "version": "0.9.1",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "license": "MIT",
@@ -46,7 +46,7 @@
46
46
  "CHANGELOG.md"
47
47
  ],
48
48
  "dependencies": {
49
- "@rozie/runtime-lit": "^0.10.1"
49
+ "@rozie/runtime-lit": "^0.10.2"
50
50
  },
51
51
  "peerDependencies": {
52
52
  "lit": "^3.2",