@rozie-ui/data-table-lit 0.3.2 → 0.4.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.
package/dist/index.cjs CHANGED
@@ -400,12 +400,16 @@ let DataTable = class DataTable extends (0, _lit_labs_preact_signals.SignalWatch
400
400
  this._hasSlotDefault = false;
401
401
  this._hasSlotGroupBar = false;
402
402
  this._hasSlotSelectAll = false;
403
+ this._hasSlotDynamicColHeader = false;
404
+ this._hasSlotDynamicFilter = false;
405
+ this._hasSlotSelectCell = false;
406
+ this._hasSlotDynamicCell = false;
407
+ this._hasSlotDynamicEditor = false;
408
+ this._hasSlotDetail = false;
403
409
  this._hasSlotColHeader = false;
404
410
  this._hasSlotFilter = false;
405
- this._hasSlotSelectCell = false;
406
411
  this._hasSlotCell = false;
407
412
  this._hasSlotEditor = false;
408
- this._hasSlotDetail = false;
409
413
  this._disconnectCleanups = [];
410
414
  this._rozieTornDown = false;
411
415
  this.table = null;
@@ -1314,8 +1318,6 @@ let DataTable = class DataTable extends (0, _lit_labs_preact_signals.SignalWatch
1314
1318
  const m = this.editMetaOf(colId);
1315
1319
  return m && m.editorOptions != null ? m.editorOptions : [];
1316
1320
  };
1317
- this.hasEditorSlot = (colId) => this.editorTypeOf(colId) === "custom" && !!(this._hasSlotEditor || this.editor !== void 0);
1318
- this.hasFilterSlot = () => !!(this._hasSlotFilter || this.filter !== void 0);
1319
1321
  this.columnIsFilterable = (colId) => {
1320
1322
  const d = this.defFor(colId);
1321
1323
  return !!(d && d.filterable);
@@ -1324,11 +1326,9 @@ let DataTable = class DataTable extends (0, _lit_labs_preact_signals.SignalWatch
1324
1326
  const d = this.defFor(colId);
1325
1327
  return d ? d.header : colId;
1326
1328
  };
1327
- this.headerWidth = (colId) => {
1328
- if (this.tick() < 0 || !this.table) return null;
1329
- const col = this.table.getColumn(colId);
1330
- if (!col) return null;
1331
- const w = col.getSize();
1329
+ this.headerWidth = (header) => {
1330
+ if (this.tick() < 0 || !header || typeof header.getSize !== "function") return null;
1331
+ const w = header.getSize();
1332
1332
  return w != null && w > 0 ? w + "px" : null;
1333
1333
  };
1334
1334
  this.onResizeStart = (colId, evt) => {
@@ -1397,11 +1397,11 @@ let DataTable = class DataTable extends (0, _lit_labs_preact_signals.SignalWatch
1397
1397
  if (side === "right") return "position:sticky;right:" + (col.getAfter ? col.getAfter("right") : 0) + "px;z-index:" + zIndex + ";";
1398
1398
  return "";
1399
1399
  };
1400
- this.thStyle = (colId) => {
1400
+ this.thStyle = (header) => {
1401
1401
  let s = "";
1402
- const w = this.headerWidth(colId);
1402
+ const w = this.headerWidth(header);
1403
1403
  if (w) s += "width:" + w + ";";
1404
- s += this.pinStyle(colId, 2);
1404
+ s += this.pinStyle(header && header.column ? header.column.id : null, 2);
1405
1405
  return s;
1406
1406
  };
1407
1407
  this.onGlobalFilterInput = (evt) => {
@@ -2707,8 +2707,9 @@ let DataTable = class DataTable extends (0, _lit_labs_preact_signals.SignalWatch
2707
2707
  this.fillEdgeScrollRaf = null;
2708
2708
  }
2709
2709
  };
2710
- this.cellIndexFromPoint = (clientX, clientY) => {
2711
- if (typeof document === "undefined" || !document.elementFromPoint) return null;
2710
+ this.FILL_HITTEST_PROBE_RADIUS_PX = 8;
2711
+ this.FILL_HITTEST_PROBE_STEP_PX = 2;
2712
+ this.resolveCellAt = (clientX, clientY) => {
2712
2713
  let el = document.elementFromPoint(clientX, clientY);
2713
2714
  while (el && el.shadowRoot && el.shadowRoot.elementFromPoint) {
2714
2715
  const inner = el.shadowRoot.elementFromPoint(clientX, clientY);
@@ -2729,6 +2730,18 @@ let DataTable = class DataTable extends (0, _lit_labs_preact_signals.SignalWatch
2729
2730
  c
2730
2731
  };
2731
2732
  };
2733
+ this.cellIndexFromPoint = (clientX, clientY) => {
2734
+ if (typeof document === "undefined" || !document.elementFromPoint) return null;
2735
+ const direct = this.resolveCellAt(clientX, clientY);
2736
+ if (direct) return direct;
2737
+ for (let d = this.FILL_HITTEST_PROBE_STEP_PX; d <= this.FILL_HITTEST_PROBE_RADIUS_PX; d += this.FILL_HITTEST_PROBE_STEP_PX) {
2738
+ const right = this.resolveCellAt(clientX + d, clientY);
2739
+ if (right) return right;
2740
+ const left = this.resolveCellAt(clientX - d, clientY);
2741
+ if (left) return left;
2742
+ }
2743
+ return null;
2744
+ };
2732
2745
  this.onFillHandlePointerDown = (e) => {
2733
2746
  if (!e) return;
2734
2747
  if (e.preventDefault) e.preventDefault();
@@ -2899,12 +2912,24 @@ let DataTable = class DataTable extends (0, _lit_labs_preact_signals.SignalWatch
2899
2912
  const row = (this._rows.value || [])[this._editingRow.value];
2900
2913
  return row ? row.id : null;
2901
2914
  };
2902
- this.focusEditorWhenReady = (selectAll = true) => {
2915
+ this.resolveEditFocusCellEl = (rowIndex, colIndex) => {
2916
+ if (rowIndex == null || colIndex == null || rowIndex < 0 || colIndex < 0) return null;
2917
+ return this.resolveCellEl(String(rowIndex), colIndex);
2918
+ };
2919
+ this.focusEditorWhenReady = (rowIndex, colIndex, selectAll = true) => {
2903
2920
  if (!this.gridRoot) return;
2904
- if (this._editFocusColId.value != null && this.hasEditorSlot(this._editFocusColId.value)) return;
2905
2921
  let attempts = 0;
2906
2922
  const tryFocus = () => {
2907
- const el = this.gridRoot ? this.gridRoot.querySelector("[data-editing-cell]") : null;
2923
+ const cellEl = this.resolveEditFocusCellEl(rowIndex, colIndex);
2924
+ const el = cellEl && cellEl.querySelector ? cellEl.querySelector("[data-editing-cell][data-builtin-editor]") : null;
2925
+ if (!el) {
2926
+ if (cellEl && cellEl.querySelector ? cellEl.querySelector("[data-editing-cell]") : null) return;
2927
+ attempts = attempts + 1;
2928
+ if (attempts >= 30) return;
2929
+ if (typeof requestAnimationFrame === "function") requestAnimationFrame(tryFocus);
2930
+ else setTimeout(tryFocus, 16);
2931
+ return;
2932
+ }
2908
2933
  const ae = this.gridRoot && this.gridRoot.getRootNode ? this.gridRoot.getRootNode().activeElement : null;
2909
2934
  if (ae && el && ae !== el && ae.closest && this.gridRoot.contains(ae) && ae.hasAttribute && ae.hasAttribute("data-editing-cell")) {
2910
2935
  const aeCell = ae.closest("[data-grid-cell]");
@@ -2913,17 +2938,10 @@ let DataTable = class DataTable extends (0, _lit_labs_preact_signals.SignalWatch
2913
2938
  const elCol = elCell ? elCell.getAttribute("data-col-index") : null;
2914
2939
  if (aeCol != null && aeCol !== elCol) return;
2915
2940
  }
2916
- if (el) {
2917
- el.focus();
2918
- if (selectAll && el.select) try {
2919
- el.select();
2920
- } catch (e) {}
2921
- return;
2922
- }
2923
- attempts = attempts + 1;
2924
- if (attempts >= 30) return;
2925
- if (typeof requestAnimationFrame === "function") requestAnimationFrame(tryFocus);
2926
- else setTimeout(tryFocus, 16);
2941
+ el.focus();
2942
+ if (selectAll && el.select) try {
2943
+ el.select();
2944
+ } catch (e) {}
2927
2945
  };
2928
2946
  if (typeof requestAnimationFrame === "function") requestAnimationFrame(tryFocus);
2929
2947
  else setTimeout(tryFocus, 0);
@@ -2954,7 +2972,7 @@ let DataTable = class DataTable extends (0, _lit_labs_preact_signals.SignalWatch
2954
2972
  this._activeInControl.value = true;
2955
2973
  this._editVer.value = this._editVer.value + 1;
2956
2974
  this._editFocusColId.value = colId;
2957
- this.focusEditorWhenReady(seed == null);
2975
+ this.focusEditorWhenReady(rowIndex, colIndex, seed == null);
2958
2976
  };
2959
2977
  this.focusCellWhenReady = (row, col) => {
2960
2978
  if (!this.gridRoot) return;
@@ -3023,7 +3041,7 @@ let DataTable = class DataTable extends (0, _lit_labs_preact_signals.SignalWatch
3023
3041
  const err = this.runValidator(colId, newValue, rowOriginal);
3024
3042
  if (err !== true) {
3025
3043
  this.setInvalid(err);
3026
- this.focusEditorWhenReady();
3044
+ this.focusEditorWhenReady(this._editingRow.value, this._editingCol.value);
3027
3045
  return false;
3028
3046
  }
3029
3047
  this.setInvalid("");
@@ -3125,12 +3143,10 @@ let DataTable = class DataTable extends (0, _lit_labs_preact_signals.SignalWatch
3125
3143
  };
3126
3144
  this.focusRowEditorAt = (rowIndex, colIndex) => {
3127
3145
  if (!this.gridRoot) return;
3128
- const colId = this.columnIdAt(rowIndex, colIndex);
3129
- if (colId != null && this.hasEditorSlot(colId)) return;
3130
3146
  let attempts = 0;
3131
3147
  const tryFocus = () => {
3132
3148
  const cellEl = this.resolveCellEl(String(rowIndex), colIndex);
3133
- const ed = cellEl && cellEl.querySelector ? cellEl.querySelector("[data-editing-cell]") : null;
3149
+ const ed = cellEl && cellEl.querySelector ? cellEl.querySelector("[data-editing-cell][data-builtin-editor]") : null;
3134
3150
  if (ed) {
3135
3151
  ed.focus();
3136
3152
  if (ed.select) try {
@@ -3138,6 +3154,7 @@ let DataTable = class DataTable extends (0, _lit_labs_preact_signals.SignalWatch
3138
3154
  } catch (e) {}
3139
3155
  return;
3140
3156
  }
3157
+ if (cellEl && cellEl.querySelector ? cellEl.querySelector("[data-editing-cell]") : null) return;
3141
3158
  attempts = attempts + 1;
3142
3159
  if (attempts >= 30) return;
3143
3160
  if (typeof requestAnimationFrame === "function") requestAnimationFrame(tryFocus);
@@ -3169,7 +3186,7 @@ let DataTable = class DataTable extends (0, _lit_labs_preact_signals.SignalWatch
3169
3186
  this._activeInControl.value = true;
3170
3187
  this._editVer.value = this._editVer.value + 1;
3171
3188
  this._editFocusColId.value = editable[0].colId;
3172
- this.focusEditorWhenReady();
3189
+ this.focusEditorWhenReady(rowIndex, editable[0].colIndex);
3173
3190
  };
3174
3191
  this.commitRow = () => {
3175
3192
  if (this._editingRowIndex.value == null) return false;
@@ -3954,10 +3971,10 @@ let DataTable = class DataTable extends (0, _lit_labs_preact_signals.SignalWatch
3954
3971
  }
3955
3972
  }
3956
3973
  {
3957
- const slotEl = this.shadowRoot?.querySelector("slot[name=\"colHeader\"]");
3974
+ const slotEl = this.shadowRoot?.querySelector("slot:not([name])");
3958
3975
  if (slotEl !== null && slotEl !== void 0) {
3959
3976
  const update = () => {
3960
- this._hasSlotColHeader = this._slotColHeaderElements.length > 0;
3977
+ this._hasSlotDynamicColHeader = this._slotDynamicColHeaderElements.length > 0;
3961
3978
  };
3962
3979
  slotEl.addEventListener("slotchange", update);
3963
3980
  this._disconnectCleanups.push(() => slotEl.removeEventListener("slotchange", update));
@@ -3965,10 +3982,10 @@ let DataTable = class DataTable extends (0, _lit_labs_preact_signals.SignalWatch
3965
3982
  }
3966
3983
  }
3967
3984
  {
3968
- const slotEl = this.shadowRoot?.querySelector("slot[name=\"filter\"]");
3985
+ const slotEl = this.shadowRoot?.querySelector("slot:not([name])");
3969
3986
  if (slotEl !== null && slotEl !== void 0) {
3970
3987
  const update = () => {
3971
- this._hasSlotFilter = this._slotFilterElements.length > 0;
3988
+ this._hasSlotDynamicFilter = this._slotDynamicFilterElements.length > 0;
3972
3989
  };
3973
3990
  slotEl.addEventListener("slotchange", update);
3974
3991
  this._disconnectCleanups.push(() => slotEl.removeEventListener("slotchange", update));
@@ -3987,10 +4004,10 @@ let DataTable = class DataTable extends (0, _lit_labs_preact_signals.SignalWatch
3987
4004
  }
3988
4005
  }
3989
4006
  {
3990
- const slotEl = this.shadowRoot?.querySelector("slot[name=\"cell\"]");
4007
+ const slotEl = this.shadowRoot?.querySelector("slot:not([name])");
3991
4008
  if (slotEl !== null && slotEl !== void 0) {
3992
4009
  const update = () => {
3993
- this._hasSlotCell = this._slotCellElements.length > 0;
4010
+ this._hasSlotDynamicCell = this._slotDynamicCellElements.length > 0;
3994
4011
  };
3995
4012
  slotEl.addEventListener("slotchange", update);
3996
4013
  this._disconnectCleanups.push(() => slotEl.removeEventListener("slotchange", update));
@@ -3998,10 +4015,10 @@ let DataTable = class DataTable extends (0, _lit_labs_preact_signals.SignalWatch
3998
4015
  }
3999
4016
  }
4000
4017
  {
4001
- const slotEl = this.shadowRoot?.querySelector("slot[name=\"editor\"]");
4018
+ const slotEl = this.shadowRoot?.querySelector("slot:not([name])");
4002
4019
  if (slotEl !== null && slotEl !== void 0) {
4003
4020
  const update = () => {
4004
- this._hasSlotEditor = this._slotEditorElements.length > 0;
4021
+ this._hasSlotDynamicEditor = this._slotDynamicEditorElements.length > 0;
4005
4022
  };
4006
4023
  slotEl.addEventListener("slotchange", update);
4007
4024
  this._disconnectCleanups.push(() => slotEl.removeEventListener("slotchange", update));
@@ -4019,17 +4036,65 @@ let DataTable = class DataTable extends (0, _lit_labs_preact_signals.SignalWatch
4019
4036
  update();
4020
4037
  }
4021
4038
  }
4039
+ {
4040
+ const slotEl = this.shadowRoot?.querySelector("slot[name=\"colHeader\"]");
4041
+ if (slotEl !== null && slotEl !== void 0) {
4042
+ const update = () => {
4043
+ this._hasSlotColHeader = this._slotColHeaderElements.length > 0;
4044
+ };
4045
+ slotEl.addEventListener("slotchange", update);
4046
+ this._disconnectCleanups.push(() => slotEl.removeEventListener("slotchange", update));
4047
+ update();
4048
+ }
4049
+ }
4050
+ {
4051
+ const slotEl = this.shadowRoot?.querySelector("slot[name=\"filter\"]");
4052
+ if (slotEl !== null && slotEl !== void 0) {
4053
+ const update = () => {
4054
+ this._hasSlotFilter = this._slotFilterElements.length > 0;
4055
+ };
4056
+ slotEl.addEventListener("slotchange", update);
4057
+ this._disconnectCleanups.push(() => slotEl.removeEventListener("slotchange", update));
4058
+ update();
4059
+ }
4060
+ }
4061
+ {
4062
+ const slotEl = this.shadowRoot?.querySelector("slot[name=\"cell\"]");
4063
+ if (slotEl !== null && slotEl !== void 0) {
4064
+ const update = () => {
4065
+ this._hasSlotCell = this._slotCellElements.length > 0;
4066
+ };
4067
+ slotEl.addEventListener("slotchange", update);
4068
+ this._disconnectCleanups.push(() => slotEl.removeEventListener("slotchange", update));
4069
+ update();
4070
+ }
4071
+ }
4072
+ {
4073
+ const slotEl = this.shadowRoot?.querySelector("slot[name=\"editor\"]");
4074
+ if (slotEl !== null && slotEl !== void 0) {
4075
+ const update = () => {
4076
+ this._hasSlotEditor = this._slotEditorElements.length > 0;
4077
+ };
4078
+ slotEl.addEventListener("slotchange", update);
4079
+ this._disconnectCleanups.push(() => slotEl.removeEventListener("slotchange", update));
4080
+ update();
4081
+ }
4082
+ }
4022
4083
  }
4023
4084
  connectedCallback() {
4024
4085
  this._hasSlotDefault = Array.from(this.children).some((el) => !el.hasAttribute("slot") && (el.nodeType !== 3 || (el.textContent?.trim().length ?? 0) > 0));
4025
4086
  this._hasSlotGroupBar = Array.from(this.children).some((el) => el.getAttribute("slot") === "groupBar");
4026
4087
  this._hasSlotSelectAll = Array.from(this.children).some((el) => el.getAttribute("slot") === "selectAll");
4088
+ this._hasSlotDynamicColHeader = Array.from(this.children).some((el) => !el.hasAttribute("slot") && (el.nodeType !== 3 || (el.textContent?.trim().length ?? 0) > 0));
4089
+ this._hasSlotDynamicFilter = Array.from(this.children).some((el) => !el.hasAttribute("slot") && (el.nodeType !== 3 || (el.textContent?.trim().length ?? 0) > 0));
4090
+ this._hasSlotSelectCell = Array.from(this.children).some((el) => el.getAttribute("slot") === "selectCell");
4091
+ this._hasSlotDynamicCell = Array.from(this.children).some((el) => !el.hasAttribute("slot") && (el.nodeType !== 3 || (el.textContent?.trim().length ?? 0) > 0));
4092
+ this._hasSlotDynamicEditor = Array.from(this.children).some((el) => !el.hasAttribute("slot") && (el.nodeType !== 3 || (el.textContent?.trim().length ?? 0) > 0));
4093
+ this._hasSlotDetail = Array.from(this.children).some((el) => el.getAttribute("slot") === "detail");
4027
4094
  this._hasSlotColHeader = Array.from(this.children).some((el) => el.getAttribute("slot") === "colHeader");
4028
4095
  this._hasSlotFilter = Array.from(this.children).some((el) => el.getAttribute("slot") === "filter");
4029
- this._hasSlotSelectCell = Array.from(this.children).some((el) => el.getAttribute("slot") === "selectCell");
4030
4096
  this._hasSlotCell = Array.from(this.children).some((el) => el.getAttribute("slot") === "cell");
4031
4097
  this._hasSlotEditor = Array.from(this.children).some((el) => el.getAttribute("slot") === "editor");
4032
- this._hasSlotDetail = Array.from(this.children).some((el) => el.getAttribute("slot") === "detail");
4033
4098
  super.connectedCallback();
4034
4099
  if (this.hasUpdated && this._rozieTornDown) {
4035
4100
  this._rozieTornDown = false;
@@ -4291,7 +4356,7 @@ ${this.groupable ? lit.html`<div class="rdt-group-bar-host" data-rozie-s-d5dcab4
4291
4356
  "rdt-expander-th": this.isExpanderColumn(wh.header.column.id),
4292
4357
  "rdt-th-resizing": this.columnIsResizing(wh.header.column.id),
4293
4358
  "rdt-cell-active": this.isActiveCell("__header", this.headerColIndexOf(hg, wh.header), hgLevel)
4294
- }).filter(([, v]) => v).map(([k]) => k).join(" ")}" role="columnheader" data-col=${(0, _rozie_runtime_lit.rozieAttr)(wh.header.column.id)} data-grid-cell="" data-row="__header" data-header-level=${(0, _rozie_runtime_lit.rozieAttr)(hgLevel)} colspan=${(0, _rozie_runtime_lit.rozieAttr)(wh.span > 1 ? wh.span : null)} data-col-index=${(0, _rozie_runtime_lit.rozieAttr)(this.headerColIndexOf(hg, wh.header))} tabindex=${(0, _rozie_runtime_lit.rozieAttr)(this.cellTabindex("__header", this.headerColIndexOf(hg, wh.header), hgLevel))} aria-sort=${(0, _rozie_runtime_lit.rozieAttr)(this.ariaSortFor(wh.header.column.id))} style=${(0, _rozie_runtime_lit.rozieStyle)(this.thStyle(wh.header.column.id))} data-rozie-s-d5dcab4c>
4359
+ }).filter(([, v]) => v).map(([k]) => k).join(" ")}" role="columnheader" data-col=${(0, _rozie_runtime_lit.rozieAttr)(wh.header.column.id)} data-grid-cell="" data-row="__header" data-header-level=${(0, _rozie_runtime_lit.rozieAttr)(hgLevel)} colspan=${(0, _rozie_runtime_lit.rozieAttr)(wh.span > 1 ? wh.span : null)} data-col-index=${(0, _rozie_runtime_lit.rozieAttr)(this.headerColIndexOf(hg, wh.header))} tabindex=${(0, _rozie_runtime_lit.rozieAttr)(this.cellTabindex("__header", this.headerColIndexOf(hg, wh.header), hgLevel))} aria-sort=${(0, _rozie_runtime_lit.rozieAttr)(this.ariaSortFor(wh.header.column.id))} style=${(0, _rozie_runtime_lit.rozieStyle)(this.thStyle(wh.header))} data-rozie-s-d5dcab4c>
4295
4360
  ${this.isSelectColumn(wh.header.column.id) ? lit.html`<span style="display:contents" data-rozie-s-d5dcab4c>
4296
4361
  ${this.selectAll !== void 0 ? this.selectAll({
4297
4362
  checked: this.isAllRowsSelected(),
@@ -4315,7 +4380,22 @@ ${this.groupable ? lit.html`<div class="rdt-group-bar-host" data-rozie-s-d5dcab4
4315
4380
  this.onHeaderSort(wh.header.column.id, $event);
4316
4381
  }} data-rozie-s-d5dcab4c>
4317
4382
  <span class="rdt-header-label" data-rozie-s-d5dcab4c>
4318
- ${this.colHeader !== void 0 ? this.colHeader({
4383
+ ${this.rozieSlots?.[`colHeader-${wh.header.column.id}`] !== void 0 ? this.rozieSlots?.[`colHeader-${wh.header.column.id}`]({
4384
+ columnId: wh.header.column.id,
4385
+ column: wh.header.column,
4386
+ label: this.headerLabel(wh.header.column.id)
4387
+ }) : lit.html`<slot name="${`colHeader-${wh.header.column.id}`}" data-rozie-params=${(() => {
4388
+ try {
4389
+ return JSON.stringify({
4390
+ columnId: wh.header.column.id,
4391
+ column: wh.header.column,
4392
+ label: this.headerLabel(wh.header.column.id)
4393
+ });
4394
+ } catch {
4395
+ return "{}";
4396
+ }
4397
+ })()}>
4398
+ ${this.colHeader !== void 0 ? this.colHeader({
4319
4399
  columnId: wh.header.column.id,
4320
4400
  column: wh.header.column,
4321
4401
  label: this.headerLabel(wh.header.column.id)
@@ -4330,11 +4410,27 @@ ${this.groupable ? lit.html`<div class="rdt-group-bar-host" data-rozie-s-d5dcab4
4330
4410
  return "{}";
4331
4411
  }
4332
4412
  })()}>${(0, _rozie_runtime_lit.rozieDisplay)(this.headerLabel(wh.header.column.id))}</slot>`}
4413
+ </slot>`}
4333
4414
  </span>
4334
4415
  <span class="rdt-sort-ind" aria-hidden="true" data-rozie-s-d5dcab4c>${(0, _rozie_runtime_lit.rozieDisplay)(this.sortIndicator(wh.header.column.id))}</span>
4335
4416
  </button>` : lit.html`<span style="display:contents" data-rozie-s-d5dcab4c>
4336
4417
  <span class="rdt-header-label" data-rozie-s-d5dcab4c>
4337
- ${this.colHeader !== void 0 ? this.colHeader({
4418
+ ${this.rozieSlots?.[`colHeader-${wh.header.column.id}`] !== void 0 ? this.rozieSlots?.[`colHeader-${wh.header.column.id}`]({
4419
+ columnId: wh.header.column.id,
4420
+ column: wh.header.column,
4421
+ label: this.headerLabel(wh.header.column.id)
4422
+ }) : lit.html`<slot name="${`colHeader-${wh.header.column.id}`}" data-rozie-params=${(() => {
4423
+ try {
4424
+ return JSON.stringify({
4425
+ columnId: wh.header.column.id,
4426
+ column: wh.header.column,
4427
+ label: this.headerLabel(wh.header.column.id)
4428
+ });
4429
+ } catch {
4430
+ return "{}";
4431
+ }
4432
+ })()}>
4433
+ ${this.colHeader !== void 0 ? this.colHeader({
4338
4434
  columnId: wh.header.column.id,
4339
4435
  column: wh.header.column,
4340
4436
  label: this.headerLabel(wh.header.column.id)
@@ -4349,6 +4445,7 @@ ${this.groupable ? lit.html`<div class="rdt-group-bar-host" data-rozie-s-d5dcab4
4349
4445
  return "{}";
4350
4446
  }
4351
4447
  })()}>${(0, _rozie_runtime_lit.rozieDisplay)(this.headerLabel(wh.header.column.id))}</slot>`}
4448
+ </slot>`}
4352
4449
  </span>
4353
4450
  </span>`}<rozie-popover trigger="click" placement="bottom-end" strategy="fixed" .offset=${4} data-rozie-s-d5dcab4c><button class="rdt-col-menu-trigger" type="button" aria-label=${(0, _rozie_runtime_lit.rozieAttr)("Column options for " + this.headerLabel(wh.header.column.id))} data-rozie-s-d5dcab4c slot="anchor">⋯</button><div class="rdt-col-menu" role="menu" data-rozie-s-d5dcab4c>
4354
4451
  <button class="rdt-col-menu-item" type="button" role="menuitem" aria-pressed=${this.columnPinSide(wh.header.column.id) === "left"} @click=${($event) => {
@@ -4377,12 +4474,26 @@ ${this.groupable ? lit.html`<div class="rdt-group-bar-host" data-rozie-s-d5dcab4
4377
4474
  ${this.hasAnyFilterableColumn() ? lit.html`<tr class="rdt-filter-row" data-rozie-s-d5dcab4c>
4378
4475
  ${this.colsWindowed() ? lit.html`<th class="rdt-col-spacer" aria-hidden="true" style=${(0, _rozie_runtime_lit.rozieStyle)("width:" + this.colPadLeft() + "px;padding:0;border:0")} data-rozie-s-d5dcab4c></th>` : lit.nothing}${(0, lit_directives_repeat_js.repeat)(this.windowedHeadersFor(this._headerGroups.value[this._headerGroups.value.length - 1], this._headerGroups.value.length - 1), (wh, _idx) => wh.header.id, (wh, _idx) => lit.html`<th class="rdt-filter-cell" role="presentation" data-col=${(0, _rozie_runtime_lit.rozieAttr)(wh.header.column.id)} style=${(0, _rozie_runtime_lit.rozieStyle)(this.pinStyle(wh.header.column.id))} data-rozie-s-d5dcab4c>
4379
4476
  ${this.isSelectColumn(wh.header.column.id) ? lit.html`<span style="display:contents" data-rozie-s-d5dcab4c></span>` : this.isExpanderColumn(wh.header.column.id) ? lit.html`<span style="display:contents" data-rozie-s-d5dcab4c></span>` : lit.html`<span style="display:contents" data-rozie-s-d5dcab4c>
4380
- ${this.columnIsFilterable(wh.header.column.id) && !this.hasFilterSlot() ? lit.html`<input class="rdt-col-filter" type="text" aria-label=${(0, _rozie_runtime_lit.rozieAttr)("Filter " + this.headerLabel(wh.header.column.id))} .value=${this.columnFilterValue(wh.header.column.id)} @input=${($event) => {
4381
- this.onColumnFilterInput(wh.header.column.id, $event);
4382
- }} @click=${($event) => {
4383
- this.stopEvent($event);
4384
- }} data-rozie-s-d5dcab4c />` : lit.nothing}${this.columnIsFilterable(wh.header.column.id) ? lit.html`<span style="display:contents" data-rozie-s-d5dcab4c>
4385
- ${this.filter !== void 0 ? this.filter({
4477
+ ${this.columnIsFilterable(wh.header.column.id) ? lit.html`<span style="display:contents" data-rozie-s-d5dcab4c>
4478
+ ${this.rozieSlots?.[`filter-${wh.header.column.id}`] !== void 0 ? this.rozieSlots?.[`filter-${wh.header.column.id}`]({
4479
+ columnId: wh.header.column.id,
4480
+ value: this.columnFilterValue(wh.header.column.id),
4481
+ uniqueValues: this.getFacetedUniqueValues(wh.header.column.id),
4482
+ minMax: this.getFacetedMinMaxValues(wh.header.column.id),
4483
+ setFilter: this.setColumnFilter
4484
+ }) : lit.html`<slot name="${`filter-${wh.header.column.id}`}" data-rozie-params=${(() => {
4485
+ try {
4486
+ return JSON.stringify({
4487
+ columnId: wh.header.column.id,
4488
+ value: this.columnFilterValue(wh.header.column.id),
4489
+ uniqueValues: this.getFacetedUniqueValues(wh.header.column.id),
4490
+ minMax: this.getFacetedMinMaxValues(wh.header.column.id)
4491
+ });
4492
+ } catch {
4493
+ return "{}";
4494
+ }
4495
+ })()} @rozie-default-set-filter=${($event) => this.setColumnFilter($event.detail)}>
4496
+ ${this.filter !== void 0 ? this.filter({
4386
4497
  columnId: wh.header.column.id,
4387
4498
  value: this.columnFilterValue(wh.header.column.id),
4388
4499
  uniqueValues: this.getFacetedUniqueValues(wh.header.column.id),
@@ -4399,7 +4510,14 @@ ${this.groupable ? lit.html`<div class="rdt-group-bar-host" data-rozie-s-d5dcab4
4399
4510
  } catch {
4400
4511
  return "{}";
4401
4512
  }
4402
- })()} @rozie-filter-set-filter=${($event) => this.setColumnFilter($event.detail)}></slot>`}
4513
+ })()} @rozie-filter-set-filter=${($event) => this.setColumnFilter($event.detail)}>
4514
+ <input class="rdt-col-filter" type="text" aria-label=${(0, _rozie_runtime_lit.rozieAttr)("Filter " + this.headerLabel(wh.header.column.id))} .value=${this.columnFilterValue(wh.header.column.id)} @input=${($event) => {
4515
+ this.onColumnFilterInput(wh.header.column.id, $event);
4516
+ }} @click=${($event) => {
4517
+ this.stopEvent($event);
4518
+ }} data-rozie-s-d5dcab4c />
4519
+ </slot>`}
4520
+ </slot>`}
4403
4521
  </span>` : lit.nothing}</span>`}</th>`)}
4404
4522
  ${this.colsWindowed() ? lit.html`<th class="rdt-col-spacer" aria-hidden="true" style=${(0, _rozie_runtime_lit.rozieStyle)("width:" + this.colPadRight() + "px;padding:0;border:0")} data-rozie-s-d5dcab4c></th>` : lit.nothing}</tr>` : lit.nothing}</thead>
4405
4523
 
@@ -4451,7 +4569,24 @@ ${this.groupable ? lit.html`<div class="rdt-group-bar-host" data-rozie-s-d5dcab4
4451
4569
  this.onToggleExpand(wr.row, $event);
4452
4570
  }} data-rozie-s-d5dcab4c>${(0, _rozie_runtime_lit.rozieDisplay)(this.rowIsExpanded(wr.row) ? "▾" : "▸")}</button>
4453
4571
  <span class="rdt-group-value" data-rozie-s-d5dcab4c>
4454
- ${this.cell !== void 0 ? this.cell({
4572
+ ${this.rozieSlots?.[`cell-${cell.column.id}`] !== void 0 ? this.rozieSlots?.[`cell-${cell.column.id}`]({
4573
+ columnId: cell.column.id,
4574
+ column: cell.column,
4575
+ row: this.cellSlotRow(wr.row),
4576
+ value: cell.getValue()
4577
+ }) : lit.html`<slot name="${`cell-${cell.column.id}`}" data-rozie-params=${(() => {
4578
+ try {
4579
+ return JSON.stringify({
4580
+ columnId: cell.column.id,
4581
+ column: cell.column,
4582
+ row: this.cellSlotRow(wr.row),
4583
+ value: cell.getValue()
4584
+ });
4585
+ } catch {
4586
+ return "{}";
4587
+ }
4588
+ })()}>
4589
+ ${this.cell !== void 0 ? this.cell({
4455
4590
  columnId: cell.column.id,
4456
4591
  column: cell.column,
4457
4592
  row: this.cellSlotRow(wr.row),
@@ -4468,11 +4603,55 @@ ${this.groupable ? lit.html`<div class="rdt-group-bar-host" data-rozie-s-d5dcab4
4468
4603
  return "{}";
4469
4604
  }
4470
4605
  })()}>${(0, _rozie_runtime_lit.rozieDisplay)(cell.getValue())}</slot>`}
4606
+ </slot>`}
4471
4607
  </span>
4472
4608
  <span class="rdt-group-count" data-rozie-s-d5dcab4c>${(0, _rozie_runtime_lit.rozieDisplay)("(" + this.groupSubRowCount(wr.row) + ")")}</span>
4473
4609
  </span>` : this.isEditing(wr.vi.index, this.colIndexOf(wr.row, cell)) ? lit.html`<span style="display:contents" data-rozie-s-d5dcab4c>
4474
- ${this.hasEditorSlot(cell.column.id) ? lit.html`<span style="display:contents" data-rozie-s-d5dcab4c>
4475
- ${this.editor !== void 0 ? this.editor({
4610
+ ${this.editorTypeOf(cell.column.id) === "number" ? lit.html`<input class="rdt-cell-editor" type="number" data-editing-cell="" data-builtin-editor="" .value=${this.editorValueFor(cell.column.id)} @input=${($event) => {
4611
+ this.onCellEditorInput(cell.column.id, $event);
4612
+ }} @keydown=${($event) => {
4613
+ this.onEditorKeyDown($event);
4614
+ }} @blur=${($event) => {
4615
+ this.onEditorBlur($event);
4616
+ }} data-rozie-s-d5dcab4c />` : this.editorTypeOf(cell.column.id) === "select" ? lit.html`<select class="rdt-cell-editor" data-editing-cell="" data-builtin-editor="" .value=${this.editorValueFor(cell.column.id)} @change=${($event) => {
4617
+ this.onCellEditorInput(cell.column.id, $event);
4618
+ }} @keydown=${($event) => {
4619
+ this.onEditorKeyDown($event);
4620
+ }} @blur=${($event) => {
4621
+ this.onEditorBlur($event);
4622
+ }} data-rozie-s-d5dcab4c>
4623
+ ${(0, lit_directives_repeat_js.repeat)(this.editorOptionsOf(cell.column.id), (opt, _idx) => opt.value, (opt, _idx) => lit.html`<option value=${(0, _rozie_runtime_lit.rozieAttr)(opt.value)} data-rozie-s-d5dcab4c>${(0, _rozie_runtime_lit.rozieDisplay)(opt.label)}</option>`)}
4624
+ </select>` : this.editorTypeOf(cell.column.id) === "checkbox" ? lit.html`<input class="rdt-cell-editor" type="checkbox" data-editing-cell="" data-builtin-editor="" ?checked=${this.editorCheckedFor(cell.column.id)} @change=${($event) => {
4625
+ this.onCellEditorCheckbox(cell.column.id, $event);
4626
+ }} @keydown=${($event) => {
4627
+ this.onEditorKeyDown($event);
4628
+ }} @blur=${($event) => {
4629
+ this.onEditorBlur($event);
4630
+ }} data-rozie-s-d5dcab4c />` : this.editorTypeOf(cell.column.id) === "custom" ? lit.html`<span style="display:contents" data-rozie-s-d5dcab4c>
4631
+ ${this.rozieSlots?.[`editor-${cell.column.id}`] !== void 0 ? this.rozieSlots?.[`editor-${cell.column.id}`]({
4632
+ columnId: cell.column.id,
4633
+ column: cell.column,
4634
+ row: this.cellSlotRow(wr.row),
4635
+ value: this.editorValueFor(cell.column.id),
4636
+ commit: this.editorCommitFor(cell.column.id),
4637
+ cancel: this.editorCancelFor(),
4638
+ autofocus: this.editorAutofocusFor(cell.column.id, wr.vi.index)
4639
+ }) : lit.html`<slot name="${`editor-${cell.column.id}`}" data-rozie-params=${(() => {
4640
+ try {
4641
+ return JSON.stringify({
4642
+ columnId: cell.column.id,
4643
+ column: cell.column,
4644
+ row: this.cellSlotRow(wr.row),
4645
+ value: this.editorValueFor(cell.column.id),
4646
+ commit: this.editorCommitFor(cell.column.id),
4647
+ cancel: this.editorCancelFor(),
4648
+ autofocus: this.editorAutofocusFor(cell.column.id, wr.vi.index)
4649
+ });
4650
+ } catch {
4651
+ return "{}";
4652
+ }
4653
+ })()}>
4654
+ ${this.editor !== void 0 ? this.editor({
4476
4655
  columnId: cell.column.id,
4477
4656
  column: cell.column,
4478
4657
  row: this.cellSlotRow(wr.row),
@@ -4494,35 +4673,41 @@ ${this.groupable ? lit.html`<div class="rdt-group-bar-host" data-rozie-s-d5dcab4
4494
4673
  } catch {
4495
4674
  return "{}";
4496
4675
  }
4497
- })()}></slot>`}
4498
- </span>` : this.editorTypeOf(cell.column.id) === "number" ? lit.html`<input class="rdt-cell-editor" type="number" data-editing-cell="" .value=${this.editorValueFor(cell.column.id)} @input=${($event) => {
4499
- this.onCellEditorInput(cell.column.id, $event);
4500
- }} @keydown=${($event) => {
4501
- this.onEditorKeyDown($event);
4502
- }} @blur=${($event) => {
4503
- this.onEditorBlur($event);
4504
- }} data-rozie-s-d5dcab4c />` : this.editorTypeOf(cell.column.id) === "select" ? lit.html`<select class="rdt-cell-editor" data-editing-cell="" .value=${this.editorValueFor(cell.column.id)} @change=${($event) => {
4676
+ })()}>
4677
+ <input class="rdt-cell-editor" type="text" data-editing-cell="" data-builtin-editor="" .value=${this.editorValueFor(cell.column.id)} @input=${($event) => {
4505
4678
  this.onCellEditorInput(cell.column.id, $event);
4506
4679
  }} @keydown=${($event) => {
4507
4680
  this.onEditorKeyDown($event);
4508
4681
  }} @blur=${($event) => {
4509
4682
  this.onEditorBlur($event);
4510
- }} data-rozie-s-d5dcab4c>
4511
- ${(0, lit_directives_repeat_js.repeat)(this.editorOptionsOf(cell.column.id), (opt, _idx) => opt.value, (opt, _idx) => lit.html`<option value=${(0, _rozie_runtime_lit.rozieAttr)(opt.value)} data-rozie-s-d5dcab4c>${(0, _rozie_runtime_lit.rozieDisplay)(opt.label)}</option>`)}
4512
- </select>` : this.editorTypeOf(cell.column.id) === "checkbox" ? lit.html`<input class="rdt-cell-editor" type="checkbox" data-editing-cell="" ?checked=${this.editorCheckedFor(cell.column.id)} @change=${($event) => {
4513
- this.onCellEditorCheckbox(cell.column.id, $event);
4514
- }} @keydown=${($event) => {
4515
- this.onEditorKeyDown($event);
4516
- }} @blur=${($event) => {
4517
- this.onEditorBlur($event);
4518
- }} data-rozie-s-d5dcab4c />` : lit.html`<input class="rdt-cell-editor" type="text" data-editing-cell="" .value=${this.editorValueFor(cell.column.id)} @input=${($event) => {
4683
+ }} data-rozie-s-d5dcab4c />
4684
+ </slot>`}
4685
+ </slot>`}
4686
+ </span>` : lit.html`<input class="rdt-cell-editor" type="text" data-editing-cell="" data-builtin-editor="" .value=${this.editorValueFor(cell.column.id)} @input=${($event) => {
4519
4687
  this.onCellEditorInput(cell.column.id, $event);
4520
4688
  }} @keydown=${($event) => {
4521
4689
  this.onEditorKeyDown($event);
4522
4690
  }} @blur=${($event) => {
4523
4691
  this.onEditorBlur($event);
4524
4692
  }} data-rozie-s-d5dcab4c />`}</span>` : this.cellIsPlaceholder(cell) ? lit.html`<span style="display:contents" data-rozie-s-d5dcab4c></span>` : lit.html`<span class="rdt-cell-value" data-rozie-s-d5dcab4c>
4525
- ${this.cell !== void 0 ? this.cell({
4693
+ ${this.rozieSlots?.[`cell-${cell.column.id}`] !== void 0 ? this.rozieSlots?.[`cell-${cell.column.id}`]({
4694
+ columnId: cell.column.id,
4695
+ column: cell.column,
4696
+ row: this.cellSlotRow(wr.row),
4697
+ value: cell.getValue()
4698
+ }) : lit.html`<slot name="${`cell-${cell.column.id}`}" data-rozie-params=${(() => {
4699
+ try {
4700
+ return JSON.stringify({
4701
+ columnId: cell.column.id,
4702
+ column: cell.column,
4703
+ row: this.cellSlotRow(wr.row),
4704
+ value: cell.getValue()
4705
+ });
4706
+ } catch {
4707
+ return "{}";
4708
+ }
4709
+ })()}>
4710
+ ${this.cell !== void 0 ? this.cell({
4526
4711
  columnId: cell.column.id,
4527
4712
  column: cell.column,
4528
4713
  row: this.cellSlotRow(wr.row),
@@ -4539,6 +4724,7 @@ ${this.groupable ? lit.html`<div class="rdt-group-bar-host" data-rozie-s-d5dcab4
4539
4724
  return "{}";
4540
4725
  }
4541
4726
  })()}>${(0, _rozie_runtime_lit.rozieDisplay)(cell.getValue())}</slot>`}
4727
+ </slot>`}
4542
4728
  </span>`}${this.isFillHandleCell(wr.vi.index, this.colIndexOf(wr.row, cell)) ? lit.html`<span class="rdt-fill-handle" data-fill-handle="" data-testid="fill-handle" aria-hidden="true" @pointerdown=${($event) => {
4543
4729
  this.onFillHandlePointerDown($event);
4544
4730
  }} data-rozie-s-d5dcab4c></span>` : lit.nothing}</td>`)}
@@ -4586,7 +4772,7 @@ ${this.groupable ? lit.html`<div class="rdt-group-bar-host" data-rozie-s-d5dcab4
4586
4772
  "rdt-expander-th": this.isExpanderColumn(header.column.id),
4587
4773
  "rdt-th-resizing": this.columnIsResizing(header.column.id),
4588
4774
  "rdt-cell-active": this.isActiveCell("__header", this.headerColIndexOf(hg, header), hgLevel)
4589
- }).filter(([, v]) => v).map(([k]) => k).join(" ")}" role="columnheader" data-col=${(0, _rozie_runtime_lit.rozieAttr)(header.column.id)} data-grid-cell="" data-row="__header" data-header-level=${(0, _rozie_runtime_lit.rozieAttr)(hgLevel)} colspan=${(0, _rozie_runtime_lit.rozieAttr)(header.colSpan > 1 ? header.colSpan : null)} data-col-index=${(0, _rozie_runtime_lit.rozieAttr)(this.headerColIndexOf(hg, header))} tabindex=${(0, _rozie_runtime_lit.rozieAttr)(this.cellTabindex("__header", this.headerColIndexOf(hg, header), hgLevel))} aria-sort=${(0, _rozie_runtime_lit.rozieAttr)(this.ariaSortFor(header.column.id))} style=${(0, _rozie_runtime_lit.rozieStyle)(this.thStyle(header.column.id))} data-rozie-s-d5dcab4c>
4775
+ }).filter(([, v]) => v).map(([k]) => k).join(" ")}" role="columnheader" data-col=${(0, _rozie_runtime_lit.rozieAttr)(header.column.id)} data-grid-cell="" data-row="__header" data-header-level=${(0, _rozie_runtime_lit.rozieAttr)(hgLevel)} colspan=${(0, _rozie_runtime_lit.rozieAttr)(header.colSpan > 1 ? header.colSpan : null)} data-col-index=${(0, _rozie_runtime_lit.rozieAttr)(this.headerColIndexOf(hg, header))} tabindex=${(0, _rozie_runtime_lit.rozieAttr)(this.cellTabindex("__header", this.headerColIndexOf(hg, header), hgLevel))} aria-sort=${(0, _rozie_runtime_lit.rozieAttr)(this.ariaSortFor(header.column.id))} style=${(0, _rozie_runtime_lit.rozieStyle)(this.thStyle(header))} data-rozie-s-d5dcab4c>
4590
4776
 
4591
4777
 
4592
4778
  ${this.isSelectColumn(header.column.id) ? lit.html`<span style="display:contents" data-rozie-s-d5dcab4c>
@@ -4615,7 +4801,22 @@ ${this.groupable ? lit.html`<div class="rdt-group-bar-host" data-rozie-s-d5dcab4
4615
4801
  }} data-rozie-s-d5dcab4c>
4616
4802
 
4617
4803
  <span class="rdt-header-label" data-rozie-s-d5dcab4c>
4618
- ${this.colHeader !== void 0 ? this.colHeader({
4804
+ ${this.rozieSlots?.[`colHeader-${header.column.id}`] !== void 0 ? this.rozieSlots?.[`colHeader-${header.column.id}`]({
4805
+ columnId: header.column.id,
4806
+ column: header.column,
4807
+ label: this.headerLabel(header.column.id)
4808
+ }) : lit.html`<slot name="${`colHeader-${header.column.id}`}" data-rozie-params=${(() => {
4809
+ try {
4810
+ return JSON.stringify({
4811
+ columnId: header.column.id,
4812
+ column: header.column,
4813
+ label: this.headerLabel(header.column.id)
4814
+ });
4815
+ } catch {
4816
+ return "{}";
4817
+ }
4818
+ })()}>
4819
+ ${this.colHeader !== void 0 ? this.colHeader({
4619
4820
  columnId: header.column.id,
4620
4821
  column: header.column,
4621
4822
  label: this.headerLabel(header.column.id)
@@ -4630,11 +4831,27 @@ ${this.groupable ? lit.html`<div class="rdt-group-bar-host" data-rozie-s-d5dcab4
4630
4831
  return "{}";
4631
4832
  }
4632
4833
  })()}>${(0, _rozie_runtime_lit.rozieDisplay)(this.headerLabel(header.column.id))}</slot>`}
4834
+ </slot>`}
4633
4835
  </span>
4634
4836
  <span class="rdt-sort-ind" aria-hidden="true" data-rozie-s-d5dcab4c>${(0, _rozie_runtime_lit.rozieDisplay)(this.sortIndicator(header.column.id))}</span>
4635
4837
  </button>` : lit.html`<span style="display:contents" data-rozie-s-d5dcab4c>
4636
4838
  <span class="rdt-header-label" data-rozie-s-d5dcab4c>
4637
- ${this.colHeader !== void 0 ? this.colHeader({
4839
+ ${this.rozieSlots?.[`colHeader-${header.column.id}`] !== void 0 ? this.rozieSlots?.[`colHeader-${header.column.id}`]({
4840
+ columnId: header.column.id,
4841
+ column: header.column,
4842
+ label: this.headerLabel(header.column.id)
4843
+ }) : lit.html`<slot name="${`colHeader-${header.column.id}`}" data-rozie-params=${(() => {
4844
+ try {
4845
+ return JSON.stringify({
4846
+ columnId: header.column.id,
4847
+ column: header.column,
4848
+ label: this.headerLabel(header.column.id)
4849
+ });
4850
+ } catch {
4851
+ return "{}";
4852
+ }
4853
+ })()}>
4854
+ ${this.colHeader !== void 0 ? this.colHeader({
4638
4855
  columnId: header.column.id,
4639
4856
  column: header.column,
4640
4857
  label: this.headerLabel(header.column.id)
@@ -4649,6 +4866,7 @@ ${this.groupable ? lit.html`<div class="rdt-group-bar-host" data-rozie-s-d5dcab4
4649
4866
  return "{}";
4650
4867
  }
4651
4868
  })()}>${(0, _rozie_runtime_lit.rozieDisplay)(this.headerLabel(header.column.id))}</slot>`}
4869
+ </slot>`}
4652
4870
  </span>
4653
4871
  </span>`}<rozie-popover trigger="click" placement="bottom-end" strategy="fixed" .offset=${4} data-rozie-s-d5dcab4c><button class="rdt-col-menu-trigger" type="button" aria-label=${(0, _rozie_runtime_lit.rozieAttr)("Column options for " + this.headerLabel(header.column.id))} data-rozie-s-d5dcab4c slot="anchor">⋯</button><div class="rdt-col-menu" role="menu" data-rozie-s-d5dcab4c>
4654
4872
  <button class="rdt-col-menu-item" type="button" role="menuitem" aria-pressed=${this.columnPinSide(header.column.id) === "left"} @click=${($event) => {
@@ -4677,12 +4895,26 @@ ${this.groupable ? lit.html`<div class="rdt-group-bar-host" data-rozie-s-d5dcab4
4677
4895
  ${this.hasAnyFilterableColumn() ? lit.html`<tr class="rdt-filter-row" data-rozie-s-d5dcab4c>
4678
4896
  ${(0, lit_directives_repeat_js.repeat)(this._headerGroups.value[this._headerGroups.value.length - 1].headers, (header, _idx) => header.id, (header, _idx) => lit.html`<th class="rdt-filter-cell" role="presentation" style=${(0, _rozie_runtime_lit.rozieStyle)(this.pinStyle(header.column.id))} data-rozie-s-d5dcab4c>
4679
4897
  ${this.isSelectColumn(header.column.id) ? lit.html`<span style="display:contents" data-rozie-s-d5dcab4c></span>` : this.isExpanderColumn(header.column.id) ? lit.html`<span style="display:contents" data-rozie-s-d5dcab4c></span>` : lit.html`<span style="display:contents" data-rozie-s-d5dcab4c>
4680
- ${this.columnIsFilterable(header.column.id) && !this.hasFilterSlot() ? lit.html`<input class="rdt-col-filter" type="text" aria-label=${(0, _rozie_runtime_lit.rozieAttr)("Filter " + this.headerLabel(header.column.id))} .value=${this.columnFilterValue(header.column.id)} @input=${($event) => {
4681
- this.onColumnFilterInput(header.column.id, $event);
4682
- }} @click=${($event) => {
4683
- this.stopEvent($event);
4684
- }} data-rozie-s-d5dcab4c />` : lit.nothing}${this.columnIsFilterable(header.column.id) ? lit.html`<span style="display:contents" data-rozie-s-d5dcab4c>
4685
- ${this.filter !== void 0 ? this.filter({
4898
+ ${this.columnIsFilterable(header.column.id) ? lit.html`<span style="display:contents" data-rozie-s-d5dcab4c>
4899
+ ${this.rozieSlots?.[`filter-${header.column.id}`] !== void 0 ? this.rozieSlots?.[`filter-${header.column.id}`]({
4900
+ columnId: header.column.id,
4901
+ value: this.columnFilterValue(header.column.id),
4902
+ uniqueValues: this.getFacetedUniqueValues(header.column.id),
4903
+ minMax: this.getFacetedMinMaxValues(header.column.id),
4904
+ setFilter: this.setColumnFilter
4905
+ }) : lit.html`<slot name="${`filter-${header.column.id}`}" data-rozie-params=${(() => {
4906
+ try {
4907
+ return JSON.stringify({
4908
+ columnId: header.column.id,
4909
+ value: this.columnFilterValue(header.column.id),
4910
+ uniqueValues: this.getFacetedUniqueValues(header.column.id),
4911
+ minMax: this.getFacetedMinMaxValues(header.column.id)
4912
+ });
4913
+ } catch {
4914
+ return "{}";
4915
+ }
4916
+ })()} @rozie-default-set-filter=${($event) => this.setColumnFilter($event.detail)}>
4917
+ ${this.filter !== void 0 ? this.filter({
4686
4918
  columnId: header.column.id,
4687
4919
  value: this.columnFilterValue(header.column.id),
4688
4920
  uniqueValues: this.getFacetedUniqueValues(header.column.id),
@@ -4699,7 +4931,14 @@ ${this.groupable ? lit.html`<div class="rdt-group-bar-host" data-rozie-s-d5dcab4
4699
4931
  } catch {
4700
4932
  return "{}";
4701
4933
  }
4702
- })()} @rozie-filter-set-filter=${($event) => this.setColumnFilter($event.detail)}></slot>`}
4934
+ })()} @rozie-filter-set-filter=${($event) => this.setColumnFilter($event.detail)}>
4935
+ <input class="rdt-col-filter" type="text" aria-label=${(0, _rozie_runtime_lit.rozieAttr)("Filter " + this.headerLabel(header.column.id))} .value=${this.columnFilterValue(header.column.id)} @input=${($event) => {
4936
+ this.onColumnFilterInput(header.column.id, $event);
4937
+ }} @click=${($event) => {
4938
+ this.stopEvent($event);
4939
+ }} data-rozie-s-d5dcab4c />
4940
+ </slot>`}
4941
+ </slot>`}
4703
4942
  </span>` : lit.nothing}</span>`}</th>`)}
4704
4943
  </tr>` : lit.nothing}</thead>
4705
4944
 
@@ -4745,7 +4984,24 @@ ${this.groupable ? lit.html`<div class="rdt-group-bar-host" data-rozie-s-d5dcab4
4745
4984
  this.onToggleExpand(row, $event);
4746
4985
  }} data-rozie-s-d5dcab4c>${(0, _rozie_runtime_lit.rozieDisplay)(this.rowIsExpanded(row) ? "▾" : "▸")}</button>
4747
4986
  <span class="rdt-group-value" data-rozie-s-d5dcab4c>
4748
- ${this.cell !== void 0 ? this.cell({
4987
+ ${this.rozieSlots?.[`cell-${cell.column.id}`] !== void 0 ? this.rozieSlots?.[`cell-${cell.column.id}`]({
4988
+ columnId: cell.column.id,
4989
+ column: cell.column,
4990
+ row: this.cellSlotRow(row),
4991
+ value: cell.getValue()
4992
+ }) : lit.html`<slot name="${`cell-${cell.column.id}`}" data-rozie-params=${(() => {
4993
+ try {
4994
+ return JSON.stringify({
4995
+ columnId: cell.column.id,
4996
+ column: cell.column,
4997
+ row: this.cellSlotRow(row),
4998
+ value: cell.getValue()
4999
+ });
5000
+ } catch {
5001
+ return "{}";
5002
+ }
5003
+ })()}>
5004
+ ${this.cell !== void 0 ? this.cell({
4749
5005
  columnId: cell.column.id,
4750
5006
  column: cell.column,
4751
5007
  row: this.cellSlotRow(row),
@@ -4762,11 +5018,55 @@ ${this.groupable ? lit.html`<div class="rdt-group-bar-host" data-rozie-s-d5dcab4
4762
5018
  return "{}";
4763
5019
  }
4764
5020
  })()}>${(0, _rozie_runtime_lit.rozieDisplay)(cell.getValue())}</slot>`}
5021
+ </slot>`}
4765
5022
  </span>
4766
5023
  <span class="rdt-group-count" data-rozie-s-d5dcab4c>${(0, _rozie_runtime_lit.rozieDisplay)("(" + this.groupSubRowCount(row) + ")")}</span>
4767
5024
  </span>` : this.isEditing(this.rowIndexOf(row), this.colIndexOf(row, cell)) ? lit.html`<span style="display:contents" data-rozie-s-d5dcab4c>
4768
- ${this.hasEditorSlot(cell.column.id) ? lit.html`<span style="display:contents" data-rozie-s-d5dcab4c>
4769
- ${this.editor !== void 0 ? this.editor({
5025
+ ${this.editorTypeOf(cell.column.id) === "number" ? lit.html`<input class="rdt-cell-editor" type="number" data-editing-cell="" data-builtin-editor="" .value=${this.editorValueFor(cell.column.id)} @input=${($event) => {
5026
+ this.onCellEditorInput(cell.column.id, $event);
5027
+ }} @keydown=${($event) => {
5028
+ this.onEditorKeyDown($event);
5029
+ }} @blur=${($event) => {
5030
+ this.onEditorBlur($event);
5031
+ }} data-rozie-s-d5dcab4c />` : this.editorTypeOf(cell.column.id) === "select" ? lit.html`<select class="rdt-cell-editor" data-editing-cell="" data-builtin-editor="" .value=${this.editorValueFor(cell.column.id)} @change=${($event) => {
5032
+ this.onCellEditorInput(cell.column.id, $event);
5033
+ }} @keydown=${($event) => {
5034
+ this.onEditorKeyDown($event);
5035
+ }} @blur=${($event) => {
5036
+ this.onEditorBlur($event);
5037
+ }} data-rozie-s-d5dcab4c>
5038
+ ${(0, lit_directives_repeat_js.repeat)(this.editorOptionsOf(cell.column.id), (opt, _idx) => opt.value, (opt, _idx) => lit.html`<option value=${(0, _rozie_runtime_lit.rozieAttr)(opt.value)} data-rozie-s-d5dcab4c>${(0, _rozie_runtime_lit.rozieDisplay)(opt.label)}</option>`)}
5039
+ </select>` : this.editorTypeOf(cell.column.id) === "checkbox" ? lit.html`<input class="rdt-cell-editor" type="checkbox" data-editing-cell="" data-builtin-editor="" ?checked=${this.editorCheckedFor(cell.column.id)} @change=${($event) => {
5040
+ this.onCellEditorCheckbox(cell.column.id, $event);
5041
+ }} @keydown=${($event) => {
5042
+ this.onEditorKeyDown($event);
5043
+ }} @blur=${($event) => {
5044
+ this.onEditorBlur($event);
5045
+ }} data-rozie-s-d5dcab4c />` : this.editorTypeOf(cell.column.id) === "custom" ? lit.html`<span style="display:contents" data-rozie-s-d5dcab4c>
5046
+ ${this.rozieSlots?.[`editor-${cell.column.id}`] !== void 0 ? this.rozieSlots?.[`editor-${cell.column.id}`]({
5047
+ columnId: cell.column.id,
5048
+ column: cell.column,
5049
+ row: this.cellSlotRow(row),
5050
+ value: this.editorValueFor(cell.column.id),
5051
+ commit: this.editorCommitFor(cell.column.id),
5052
+ cancel: this.editorCancelFor(),
5053
+ autofocus: this.editorAutofocusFor(cell.column.id, this.rowIndexOf(row))
5054
+ }) : lit.html`<slot name="${`editor-${cell.column.id}`}" data-rozie-params=${(() => {
5055
+ try {
5056
+ return JSON.stringify({
5057
+ columnId: cell.column.id,
5058
+ column: cell.column,
5059
+ row: this.cellSlotRow(row),
5060
+ value: this.editorValueFor(cell.column.id),
5061
+ commit: this.editorCommitFor(cell.column.id),
5062
+ cancel: this.editorCancelFor(),
5063
+ autofocus: this.editorAutofocusFor(cell.column.id, this.rowIndexOf(row))
5064
+ });
5065
+ } catch {
5066
+ return "{}";
5067
+ }
5068
+ })()}>
5069
+ ${this.editor !== void 0 ? this.editor({
4770
5070
  columnId: cell.column.id,
4771
5071
  column: cell.column,
4772
5072
  row: this.cellSlotRow(row),
@@ -4788,35 +5088,41 @@ ${this.groupable ? lit.html`<div class="rdt-group-bar-host" data-rozie-s-d5dcab4
4788
5088
  } catch {
4789
5089
  return "{}";
4790
5090
  }
4791
- })()}></slot>`}
4792
- </span>` : this.editorTypeOf(cell.column.id) === "number" ? lit.html`<input class="rdt-cell-editor" type="number" data-editing-cell="" .value=${this.editorValueFor(cell.column.id)} @input=${($event) => {
5091
+ })()}>
5092
+ <input class="rdt-cell-editor" type="text" data-editing-cell="" data-builtin-editor="" .value=${this.editorValueFor(cell.column.id)} @input=${($event) => {
4793
5093
  this.onCellEditorInput(cell.column.id, $event);
4794
5094
  }} @keydown=${($event) => {
4795
5095
  this.onEditorKeyDown($event);
4796
5096
  }} @blur=${($event) => {
4797
5097
  this.onEditorBlur($event);
4798
- }} data-rozie-s-d5dcab4c />` : this.editorTypeOf(cell.column.id) === "select" ? lit.html`<select class="rdt-cell-editor" data-editing-cell="" .value=${this.editorValueFor(cell.column.id)} @change=${($event) => {
4799
- this.onCellEditorInput(cell.column.id, $event);
4800
- }} @keydown=${($event) => {
4801
- this.onEditorKeyDown($event);
4802
- }} @blur=${($event) => {
4803
- this.onEditorBlur($event);
4804
- }} data-rozie-s-d5dcab4c>
4805
- ${(0, lit_directives_repeat_js.repeat)(this.editorOptionsOf(cell.column.id), (opt, _idx) => opt.value, (opt, _idx) => lit.html`<option value=${(0, _rozie_runtime_lit.rozieAttr)(opt.value)} data-rozie-s-d5dcab4c>${(0, _rozie_runtime_lit.rozieDisplay)(opt.label)}</option>`)}
4806
- </select>` : this.editorTypeOf(cell.column.id) === "checkbox" ? lit.html`<input class="rdt-cell-editor" type="checkbox" data-editing-cell="" ?checked=${this.editorCheckedFor(cell.column.id)} @change=${($event) => {
4807
- this.onCellEditorCheckbox(cell.column.id, $event);
4808
- }} @keydown=${($event) => {
4809
- this.onEditorKeyDown($event);
4810
- }} @blur=${($event) => {
4811
- this.onEditorBlur($event);
4812
- }} data-rozie-s-d5dcab4c />` : lit.html`<input class="rdt-cell-editor" type="text" data-editing-cell="" .value=${this.editorValueFor(cell.column.id)} @input=${($event) => {
5098
+ }} data-rozie-s-d5dcab4c />
5099
+ </slot>`}
5100
+ </slot>`}
5101
+ </span>` : lit.html`<input class="rdt-cell-editor" type="text" data-editing-cell="" data-builtin-editor="" .value=${this.editorValueFor(cell.column.id)} @input=${($event) => {
4813
5102
  this.onCellEditorInput(cell.column.id, $event);
4814
5103
  }} @keydown=${($event) => {
4815
5104
  this.onEditorKeyDown($event);
4816
5105
  }} @blur=${($event) => {
4817
5106
  this.onEditorBlur($event);
4818
5107
  }} data-rozie-s-d5dcab4c />`}</span>` : this.cellIsPlaceholder(cell) ? lit.html`<span style="display:contents" data-rozie-s-d5dcab4c></span>` : lit.html`<span class="rdt-cell-value" data-rozie-s-d5dcab4c>
4819
- ${this.cell !== void 0 ? this.cell({
5108
+ ${this.rozieSlots?.[`cell-${cell.column.id}`] !== void 0 ? this.rozieSlots?.[`cell-${cell.column.id}`]({
5109
+ columnId: cell.column.id,
5110
+ column: cell.column,
5111
+ row: this.cellSlotRow(row),
5112
+ value: cell.getValue()
5113
+ }) : lit.html`<slot name="${`cell-${cell.column.id}`}" data-rozie-params=${(() => {
5114
+ try {
5115
+ return JSON.stringify({
5116
+ columnId: cell.column.id,
5117
+ column: cell.column,
5118
+ row: this.cellSlotRow(row),
5119
+ value: cell.getValue()
5120
+ });
5121
+ } catch {
5122
+ return "{}";
5123
+ }
5124
+ })()}>
5125
+ ${this.cell !== void 0 ? this.cell({
4820
5126
  columnId: cell.column.id,
4821
5127
  column: cell.column,
4822
5128
  row: this.cellSlotRow(row),
@@ -4833,6 +5139,7 @@ ${this.groupable ? lit.html`<div class="rdt-group-bar-host" data-rozie-s-d5dcab4
4833
5139
  return "{}";
4834
5140
  }
4835
5141
  })()}>${(0, _rozie_runtime_lit.rozieDisplay)(cell.getValue())}</slot>`}
5142
+ </slot>`}
4836
5143
  </span>`}${this.isFillHandleCell(this.rowIndexOf(row), this.colIndexOf(row, cell)) ? lit.html`<span class="rdt-fill-handle" data-fill-handle="" data-testid="fill-handle" aria-hidden="true" @pointerdown=${($event) => {
4837
5144
  this.onFillHandlePointerDown($event);
4838
5145
  }} data-rozie-s-d5dcab4c></span>` : lit.nothing}</td>`)}
@@ -5066,6 +5373,26 @@ __decorate([(0, lit_decorators_js.queryAssignedElements)({
5066
5373
  flatten: true
5067
5374
  })], DataTable.prototype, "_slotSelectAllElements", void 0);
5068
5375
  __decorate([(0, lit_decorators_js.property)({ attribute: false })], DataTable.prototype, "selectAll", void 0);
5376
+ __decorate([(0, lit_decorators_js.state)()], DataTable.prototype, "_hasSlotDynamicColHeader", void 0);
5377
+ __decorate([(0, lit_decorators_js.queryAssignedElements)({ flatten: true })], DataTable.prototype, "_slotDynamicColHeaderElements", void 0);
5378
+ __decorate([(0, lit_decorators_js.state)()], DataTable.prototype, "_hasSlotDynamicFilter", void 0);
5379
+ __decorate([(0, lit_decorators_js.queryAssignedElements)({ flatten: true })], DataTable.prototype, "_slotDynamicFilterElements", void 0);
5380
+ __decorate([(0, lit_decorators_js.state)()], DataTable.prototype, "_hasSlotSelectCell", void 0);
5381
+ __decorate([(0, lit_decorators_js.queryAssignedElements)({
5382
+ slot: "selectCell",
5383
+ flatten: true
5384
+ })], DataTable.prototype, "_slotSelectCellElements", void 0);
5385
+ __decorate([(0, lit_decorators_js.property)({ attribute: false })], DataTable.prototype, "selectCell", void 0);
5386
+ __decorate([(0, lit_decorators_js.state)()], DataTable.prototype, "_hasSlotDynamicCell", void 0);
5387
+ __decorate([(0, lit_decorators_js.queryAssignedElements)({ flatten: true })], DataTable.prototype, "_slotDynamicCellElements", void 0);
5388
+ __decorate([(0, lit_decorators_js.state)()], DataTable.prototype, "_hasSlotDynamicEditor", void 0);
5389
+ __decorate([(0, lit_decorators_js.queryAssignedElements)({ flatten: true })], DataTable.prototype, "_slotDynamicEditorElements", void 0);
5390
+ __decorate([(0, lit_decorators_js.state)()], DataTable.prototype, "_hasSlotDetail", void 0);
5391
+ __decorate([(0, lit_decorators_js.queryAssignedElements)({
5392
+ slot: "detail",
5393
+ flatten: true
5394
+ })], DataTable.prototype, "_slotDetailElements", void 0);
5395
+ __decorate([(0, lit_decorators_js.property)({ attribute: false })], DataTable.prototype, "detail", void 0);
5069
5396
  __decorate([(0, lit_decorators_js.state)()], DataTable.prototype, "_hasSlotColHeader", void 0);
5070
5397
  __decorate([(0, lit_decorators_js.queryAssignedElements)({
5071
5398
  slot: "colHeader",
@@ -5078,12 +5405,6 @@ __decorate([(0, lit_decorators_js.queryAssignedElements)({
5078
5405
  flatten: true
5079
5406
  })], DataTable.prototype, "_slotFilterElements", void 0);
5080
5407
  __decorate([(0, lit_decorators_js.property)({ attribute: false })], DataTable.prototype, "filter", void 0);
5081
- __decorate([(0, lit_decorators_js.state)()], DataTable.prototype, "_hasSlotSelectCell", void 0);
5082
- __decorate([(0, lit_decorators_js.queryAssignedElements)({
5083
- slot: "selectCell",
5084
- flatten: true
5085
- })], DataTable.prototype, "_slotSelectCellElements", void 0);
5086
- __decorate([(0, lit_decorators_js.property)({ attribute: false })], DataTable.prototype, "selectCell", void 0);
5087
5408
  __decorate([(0, lit_decorators_js.state)()], DataTable.prototype, "_hasSlotCell", void 0);
5088
5409
  __decorate([(0, lit_decorators_js.queryAssignedElements)({
5089
5410
  slot: "cell",
@@ -5096,12 +5417,6 @@ __decorate([(0, lit_decorators_js.queryAssignedElements)({
5096
5417
  flatten: true
5097
5418
  })], DataTable.prototype, "_slotEditorElements", void 0);
5098
5419
  __decorate([(0, lit_decorators_js.property)({ attribute: false })], DataTable.prototype, "editor", void 0);
5099
- __decorate([(0, lit_decorators_js.state)()], DataTable.prototype, "_hasSlotDetail", void 0);
5100
- __decorate([(0, lit_decorators_js.queryAssignedElements)({
5101
- slot: "detail",
5102
- flatten: true
5103
- })], DataTable.prototype, "_slotDetailElements", void 0);
5104
- __decorate([(0, lit_decorators_js.property)({ attribute: false })], DataTable.prototype, "detail", void 0);
5105
5420
  __decorate([(0, lit_decorators_js.property)({ attribute: false })], DataTable.prototype, "rozieSlots", void 0);
5106
5421
  DataTable = __decorate([(0, lit_decorators_js.customElement)("rozie-data-table")], DataTable);
5107
5422
  var DataTable_default = DataTable;