@rozie-ui/data-table-lit 0.7.0 → 0.7.2
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/CHANGELOG.md +417 -0
- package/README.md +11 -11
- package/dist/index.cjs +119 -39
- package/dist/index.d.cts +169 -77
- package/dist/index.d.mts +169 -77
- package/dist/index.mjs +134 -54
- package/package.json +5 -4
- package/src/Column.ts +4 -3
- package/src/DataTable.ts +237 -122
- package/src/EditorCheckbox.ts +2 -2
- package/src/EditorDate.ts +2 -2
- package/src/EditorNumber.ts +2 -2
- package/src/EditorSelect.ts +2 -2
- package/src/EditorText.ts +2 -2
- package/src/FilterNumberRange.ts +4 -4
- package/src/FilterSelect.ts +4 -4
- package/src/FilterText.ts +3 -3
- package/src/GroupBar.ts +3 -3
- package/src/index.ts +2 -0
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LitElement, css, html, nothing } from "lit";
|
|
2
2
|
import { customElement, property, query, queryAssignedElements, state } from "lit/decorators.js";
|
|
3
3
|
import { SignalWatcher, effect, signal, untracked } from "@lit-labs/preact-signals";
|
|
4
|
-
import { RozieSlotDistributor, createLitControllableProperty, rozieAttr, rozieDisplay, rozieStyle } from "@rozie/runtime-lit";
|
|
4
|
+
import { RozieSlotDistributor, createLitControllableProperty, rozieAttr, rozieDisplay, rozieNumberOrStringAttr, rozieStyle } from "@rozie/runtime-lit";
|
|
5
5
|
import { ContextConsumer, ContextProvider, createContext } from "@lit/context";
|
|
6
6
|
import { repeat } from "lit/directives/repeat.js";
|
|
7
7
|
import "@rozie-ui/popover-lit";
|
|
@@ -4844,6 +4844,18 @@ let DataTable = class DataTable extends SignalWatcher(LitElement) {
|
|
|
4844
4844
|
queueMicrotask(() => {
|
|
4845
4845
|
if (this.isConnected || this._rozieTornDown) return;
|
|
4846
4846
|
this._rozieTornDown = true;
|
|
4847
|
+
(() => {
|
|
4848
|
+
if (this.docPointerDown && typeof document !== "undefined") {
|
|
4849
|
+
document.removeEventListener("pointerdown", this.docPointerDown, true);
|
|
4850
|
+
this.docPointerDown = null;
|
|
4851
|
+
}
|
|
4852
|
+
if (this.virtualizerCleanup) this.virtualizerCleanup();
|
|
4853
|
+
if (this.colVirtualizerCleanup) this.colVirtualizerCleanup();
|
|
4854
|
+
this.teardownColRtlWatch();
|
|
4855
|
+
this.teardownRemeasure();
|
|
4856
|
+
this.teardownFillDrag();
|
|
4857
|
+
this.teardownRangeDrag();
|
|
4858
|
+
})();
|
|
4847
4859
|
for (const fn of this._disconnectCleanups) fn();
|
|
4848
4860
|
this._disconnectCleanups = [];
|
|
4849
4861
|
});
|
|
@@ -5878,6 +5890,12 @@ ${this.groupable ? html`<div class="rdt-group-bar-host" data-rozie-s-d5dcab4c>
|
|
|
5878
5890
|
set columnPinning(v) {
|
|
5879
5891
|
this._columnPinningControllable.notifyPropertyWrite(v);
|
|
5880
5892
|
}
|
|
5893
|
+
addEventListener(type, listener, options) {
|
|
5894
|
+
super.addEventListener(type, listener, options);
|
|
5895
|
+
}
|
|
5896
|
+
removeEventListener(type, listener, options) {
|
|
5897
|
+
super.removeEventListener(type, listener, options);
|
|
5898
|
+
}
|
|
5881
5899
|
};
|
|
5882
5900
|
__decorate([property({
|
|
5883
5901
|
type: Array,
|
|
@@ -5886,7 +5904,8 @@ __decorate([property({
|
|
|
5886
5904
|
__decorate([property({ type: Array })], DataTable.prototype, "columns", void 0);
|
|
5887
5905
|
__decorate([property({
|
|
5888
5906
|
type: String,
|
|
5889
|
-
reflect: true
|
|
5907
|
+
reflect: true,
|
|
5908
|
+
attribute: "selection-mode"
|
|
5890
5909
|
})], DataTable.prototype, "selectionMode", void 0);
|
|
5891
5910
|
__decorate([property({
|
|
5892
5911
|
type: Array,
|
|
@@ -5910,11 +5929,13 @@ __decorate([property({
|
|
|
5910
5929
|
})], DataTable.prototype, "manual", void 0);
|
|
5911
5930
|
__decorate([property({
|
|
5912
5931
|
type: Number,
|
|
5913
|
-
reflect: true
|
|
5932
|
+
reflect: true,
|
|
5933
|
+
attribute: "row-count"
|
|
5914
5934
|
})], DataTable.prototype, "rowCount", void 0);
|
|
5915
5935
|
__decorate([property({
|
|
5916
5936
|
type: Number,
|
|
5917
|
-
reflect: true
|
|
5937
|
+
reflect: true,
|
|
5938
|
+
attribute: "page-count"
|
|
5918
5939
|
})], DataTable.prototype, "pageCount", void 0);
|
|
5919
5940
|
__decorate([property({
|
|
5920
5941
|
type: Boolean,
|
|
@@ -5924,8 +5945,14 @@ __decorate([property({
|
|
|
5924
5945
|
type: Object,
|
|
5925
5946
|
attribute: "expanded"
|
|
5926
5947
|
})], DataTable.prototype, "_expanded_attr", void 0);
|
|
5927
|
-
__decorate([property({
|
|
5928
|
-
|
|
5948
|
+
__decorate([property({
|
|
5949
|
+
type: Function,
|
|
5950
|
+
attribute: "get-row-id"
|
|
5951
|
+
})], DataTable.prototype, "getRowId", void 0);
|
|
5952
|
+
__decorate([property({
|
|
5953
|
+
type: Function,
|
|
5954
|
+
attribute: "get-sub-rows"
|
|
5955
|
+
})], DataTable.prototype, "getSubRows", void 0);
|
|
5929
5956
|
__decorate([property({
|
|
5930
5957
|
type: Boolean,
|
|
5931
5958
|
reflect: true
|
|
@@ -5956,15 +5983,18 @@ __decorate([property({
|
|
|
5956
5983
|
})], DataTable.prototype, "_columnPinning_attr", void 0);
|
|
5957
5984
|
__decorate([property({
|
|
5958
5985
|
type: Boolean,
|
|
5959
|
-
reflect: true
|
|
5986
|
+
reflect: true,
|
|
5987
|
+
attribute: "sticky-header"
|
|
5960
5988
|
})], DataTable.prototype, "stickyHeader", void 0);
|
|
5961
5989
|
__decorate([property({
|
|
5962
5990
|
type: String,
|
|
5963
|
-
reflect: true
|
|
5991
|
+
reflect: true,
|
|
5992
|
+
attribute: "interaction-mode"
|
|
5964
5993
|
})], DataTable.prototype, "interactionMode", void 0);
|
|
5965
5994
|
__decorate([property({
|
|
5966
5995
|
type: Boolean,
|
|
5967
|
-
reflect: true
|
|
5996
|
+
reflect: true,
|
|
5997
|
+
attribute: "single-click-edit"
|
|
5968
5998
|
})], DataTable.prototype, "singleClickEdit", void 0);
|
|
5969
5999
|
__decorate([property({
|
|
5970
6000
|
type: Boolean,
|
|
@@ -5972,20 +6002,24 @@ __decorate([property({
|
|
|
5972
6002
|
})], DataTable.prototype, "undoable", void 0);
|
|
5973
6003
|
__decorate([property({
|
|
5974
6004
|
type: Number,
|
|
5975
|
-
reflect: true
|
|
6005
|
+
reflect: true,
|
|
6006
|
+
attribute: "undo-limit"
|
|
5976
6007
|
})], DataTable.prototype, "undoLimit", void 0);
|
|
5977
6008
|
__decorate([property({ converter: { fromAttribute: (v) => v === null ? false : v === "true" ? true : v === "false" ? false : v === "" ? true : v } })], DataTable.prototype, "virtual", void 0);
|
|
5978
6009
|
__decorate([property({
|
|
5979
6010
|
type: Number,
|
|
5980
|
-
reflect: true
|
|
6011
|
+
reflect: true,
|
|
6012
|
+
attribute: "estimate-row-height"
|
|
5981
6013
|
})], DataTable.prototype, "estimateRowHeight", void 0);
|
|
5982
6014
|
__decorate([property({
|
|
5983
6015
|
type: Boolean,
|
|
5984
|
-
reflect: true
|
|
6016
|
+
reflect: true,
|
|
6017
|
+
attribute: "auto-measure"
|
|
5985
6018
|
})], DataTable.prototype, "autoMeasure", void 0);
|
|
5986
6019
|
__decorate([property({
|
|
5987
6020
|
type: String,
|
|
5988
|
-
reflect: true
|
|
6021
|
+
reflect: true,
|
|
6022
|
+
attribute: "max-height"
|
|
5989
6023
|
})], DataTable.prototype, "maxHeight", void 0);
|
|
5990
6024
|
__decorate([query("[data-rozie-ref=\"__rozieRoot\"]")], DataTable.prototype, "_ref__rozieRoot", void 0);
|
|
5991
6025
|
__decorate([state()], DataTable.prototype, "_hasSlotDefault", void 0);
|
|
@@ -6058,7 +6092,7 @@ var DataTable_default = DataTable;
|
|
|
6058
6092
|
//#endregion
|
|
6059
6093
|
//#region src/Column.ts
|
|
6060
6094
|
const __rozieCtx_data_table_columns = createContext(Symbol.for("rozie:data-table:columns"));
|
|
6061
|
-
let Column = class Column extends SignalWatcher(LitElement) {
|
|
6095
|
+
let Column$1 = class Column extends SignalWatcher(LitElement) {
|
|
6062
6096
|
constructor(..._args) {
|
|
6063
6097
|
super(..._args);
|
|
6064
6098
|
this.id = "";
|
|
@@ -6154,49 +6188,55 @@ let Column = class Column extends SignalWatcher(LitElement) {
|
|
|
6154
6188
|
__decorate([property({
|
|
6155
6189
|
type: String,
|
|
6156
6190
|
reflect: true
|
|
6157
|
-
})], Column.prototype, "id", void 0);
|
|
6191
|
+
})], Column$1.prototype, "id", void 0);
|
|
6158
6192
|
__decorate([property({
|
|
6159
6193
|
type: String,
|
|
6160
6194
|
reflect: true
|
|
6161
|
-
})], Column.prototype, "field", void 0);
|
|
6195
|
+
})], Column$1.prototype, "field", void 0);
|
|
6162
6196
|
__decorate([property({
|
|
6163
6197
|
type: String,
|
|
6164
6198
|
reflect: true
|
|
6165
|
-
})], Column.prototype, "header", void 0);
|
|
6199
|
+
})], Column$1.prototype, "header", void 0);
|
|
6166
6200
|
__decorate([property({
|
|
6167
6201
|
type: Boolean,
|
|
6168
6202
|
reflect: true
|
|
6169
|
-
})], Column.prototype, "sortable", void 0);
|
|
6203
|
+
})], Column$1.prototype, "sortable", void 0);
|
|
6170
6204
|
__decorate([property({
|
|
6171
6205
|
type: Boolean,
|
|
6172
6206
|
reflect: true
|
|
6173
|
-
})], Column.prototype, "filterable", void 0);
|
|
6207
|
+
})], Column$1.prototype, "filterable", void 0);
|
|
6174
6208
|
__decorate([property({
|
|
6175
6209
|
type: String,
|
|
6176
6210
|
reflect: true
|
|
6177
|
-
})], Column.prototype, "pinned", void 0);
|
|
6178
|
-
__decorate([property({
|
|
6211
|
+
})], Column$1.prototype, "pinned", void 0);
|
|
6212
|
+
__decorate([property({ converter: { fromAttribute: rozieNumberOrStringAttr } })], Column$1.prototype, "width", void 0);
|
|
6179
6213
|
__decorate([property({
|
|
6180
6214
|
type: Boolean,
|
|
6181
6215
|
reflect: true
|
|
6182
|
-
})], Column.prototype, "expandable", void 0);
|
|
6216
|
+
})], Column$1.prototype, "expandable", void 0);
|
|
6183
6217
|
__decorate([property({
|
|
6184
6218
|
type: Boolean,
|
|
6185
6219
|
reflect: true
|
|
6186
|
-
})], Column.prototype, "groupable", void 0);
|
|
6187
|
-
__decorate([property({
|
|
6220
|
+
})], Column$1.prototype, "groupable", void 0);
|
|
6221
|
+
__decorate([property({
|
|
6222
|
+
type: String,
|
|
6223
|
+
attribute: "aggregation-fn"
|
|
6224
|
+
})], Column$1.prototype, "aggregationFn", void 0);
|
|
6188
6225
|
__decorate([property({
|
|
6189
6226
|
type: Boolean,
|
|
6190
6227
|
reflect: true
|
|
6191
|
-
})], Column.prototype, "editable", void 0);
|
|
6228
|
+
})], Column$1.prototype, "editable", void 0);
|
|
6192
6229
|
__decorate([property({
|
|
6193
6230
|
type: String,
|
|
6194
6231
|
reflect: true
|
|
6195
|
-
})], Column.prototype, "editor", void 0);
|
|
6196
|
-
__decorate([property({
|
|
6197
|
-
|
|
6198
|
-
|
|
6199
|
-
|
|
6232
|
+
})], Column$1.prototype, "editor", void 0);
|
|
6233
|
+
__decorate([property({
|
|
6234
|
+
type: Array,
|
|
6235
|
+
attribute: "editor-options"
|
|
6236
|
+
})], Column$1.prototype, "editorOptions", void 0);
|
|
6237
|
+
__decorate([property({ type: Function })], Column$1.prototype, "validate", void 0);
|
|
6238
|
+
Column$1 = __decorate([customElement("rozie-column")], Column$1);
|
|
6239
|
+
var Column_default = Column$1;
|
|
6200
6240
|
//#endregion
|
|
6201
6241
|
//#region src/EditorText.ts
|
|
6202
6242
|
let EditorText = class EditorText extends SignalWatcher(LitElement) {
|
|
@@ -6280,7 +6320,8 @@ let EditorText = class EditorText extends SignalWatcher(LitElement) {
|
|
|
6280
6320
|
};
|
|
6281
6321
|
__decorate([property({
|
|
6282
6322
|
type: String,
|
|
6283
|
-
reflect: true
|
|
6323
|
+
reflect: true,
|
|
6324
|
+
attribute: "column-id"
|
|
6284
6325
|
})], EditorText.prototype, "columnId", void 0);
|
|
6285
6326
|
__decorate([property({ type: Object })], EditorText.prototype, "column", void 0);
|
|
6286
6327
|
__decorate([property({ type: Object })], EditorText.prototype, "row", void 0);
|
|
@@ -6293,7 +6334,8 @@ __decorate([property({
|
|
|
6293
6334
|
})], EditorText.prototype, "autofocus", void 0);
|
|
6294
6335
|
__decorate([property({
|
|
6295
6336
|
type: String,
|
|
6296
|
-
reflect: true
|
|
6337
|
+
reflect: true,
|
|
6338
|
+
attribute: "column-label"
|
|
6297
6339
|
})], EditorText.prototype, "columnLabel", void 0);
|
|
6298
6340
|
__decorate([query("[data-rozie-ref=\"inputEl\"]")], EditorText.prototype, "_refInputEl", void 0);
|
|
6299
6341
|
EditorText = __decorate([customElement("rozie-editor-text")], EditorText);
|
|
@@ -6388,7 +6430,8 @@ let EditorNumber = class EditorNumber extends SignalWatcher(LitElement) {
|
|
|
6388
6430
|
};
|
|
6389
6431
|
__decorate([property({
|
|
6390
6432
|
type: String,
|
|
6391
|
-
reflect: true
|
|
6433
|
+
reflect: true,
|
|
6434
|
+
attribute: "column-id"
|
|
6392
6435
|
})], EditorNumber.prototype, "columnId", void 0);
|
|
6393
6436
|
__decorate([property({ type: Object })], EditorNumber.prototype, "column", void 0);
|
|
6394
6437
|
__decorate([property({ type: Object })], EditorNumber.prototype, "row", void 0);
|
|
@@ -6401,7 +6444,8 @@ __decorate([property({
|
|
|
6401
6444
|
})], EditorNumber.prototype, "autofocus", void 0);
|
|
6402
6445
|
__decorate([property({
|
|
6403
6446
|
type: String,
|
|
6404
|
-
reflect: true
|
|
6447
|
+
reflect: true,
|
|
6448
|
+
attribute: "column-label"
|
|
6405
6449
|
})], EditorNumber.prototype, "columnLabel", void 0);
|
|
6406
6450
|
__decorate([query("[data-rozie-ref=\"inputEl\"]")], EditorNumber.prototype, "_refInputEl", void 0);
|
|
6407
6451
|
EditorNumber = __decorate([customElement("rozie-editor-number")], EditorNumber);
|
|
@@ -6492,7 +6536,8 @@ let EditorSelect = class EditorSelect extends SignalWatcher(LitElement) {
|
|
|
6492
6536
|
};
|
|
6493
6537
|
__decorate([property({
|
|
6494
6538
|
type: String,
|
|
6495
|
-
reflect: true
|
|
6539
|
+
reflect: true,
|
|
6540
|
+
attribute: "column-id"
|
|
6496
6541
|
})], EditorSelect.prototype, "columnId", void 0);
|
|
6497
6542
|
__decorate([property({ type: Object })], EditorSelect.prototype, "column", void 0);
|
|
6498
6543
|
__decorate([property({ type: Object })], EditorSelect.prototype, "row", void 0);
|
|
@@ -6506,7 +6551,8 @@ __decorate([property({
|
|
|
6506
6551
|
})], EditorSelect.prototype, "autofocus", void 0);
|
|
6507
6552
|
__decorate([property({
|
|
6508
6553
|
type: String,
|
|
6509
|
-
reflect: true
|
|
6554
|
+
reflect: true,
|
|
6555
|
+
attribute: "column-label"
|
|
6510
6556
|
})], EditorSelect.prototype, "columnLabel", void 0);
|
|
6511
6557
|
__decorate([query("[data-rozie-ref=\"selectEl\"]")], EditorSelect.prototype, "_refSelectEl", void 0);
|
|
6512
6558
|
EditorSelect = __decorate([customElement("rozie-editor-select")], EditorSelect);
|
|
@@ -6576,7 +6622,8 @@ let EditorCheckbox = class EditorCheckbox extends SignalWatcher(LitElement) {
|
|
|
6576
6622
|
};
|
|
6577
6623
|
__decorate([property({
|
|
6578
6624
|
type: String,
|
|
6579
|
-
reflect: true
|
|
6625
|
+
reflect: true,
|
|
6626
|
+
attribute: "column-id"
|
|
6580
6627
|
})], EditorCheckbox.prototype, "columnId", void 0);
|
|
6581
6628
|
__decorate([property({ type: Object })], EditorCheckbox.prototype, "column", void 0);
|
|
6582
6629
|
__decorate([property({ type: Object })], EditorCheckbox.prototype, "row", void 0);
|
|
@@ -6589,7 +6636,8 @@ __decorate([property({
|
|
|
6589
6636
|
})], EditorCheckbox.prototype, "autofocus", void 0);
|
|
6590
6637
|
__decorate([property({
|
|
6591
6638
|
type: String,
|
|
6592
|
-
reflect: true
|
|
6639
|
+
reflect: true,
|
|
6640
|
+
attribute: "column-label"
|
|
6593
6641
|
})], EditorCheckbox.prototype, "columnLabel", void 0);
|
|
6594
6642
|
__decorate([query("[data-rozie-ref=\"inputEl\"]")], EditorCheckbox.prototype, "_refInputEl", void 0);
|
|
6595
6643
|
EditorCheckbox = __decorate([customElement("rozie-editor-checkbox")], EditorCheckbox);
|
|
@@ -6716,7 +6764,8 @@ let EditorDate = class EditorDate extends SignalWatcher(LitElement) {
|
|
|
6716
6764
|
};
|
|
6717
6765
|
__decorate([property({
|
|
6718
6766
|
type: String,
|
|
6719
|
-
reflect: true
|
|
6767
|
+
reflect: true,
|
|
6768
|
+
attribute: "column-id"
|
|
6720
6769
|
})], EditorDate.prototype, "columnId", void 0);
|
|
6721
6770
|
__decorate([property({ type: Object })], EditorDate.prototype, "column", void 0);
|
|
6722
6771
|
__decorate([property({ type: Object })], EditorDate.prototype, "row", void 0);
|
|
@@ -6729,7 +6778,8 @@ __decorate([property({
|
|
|
6729
6778
|
})], EditorDate.prototype, "autofocus", void 0);
|
|
6730
6779
|
__decorate([property({
|
|
6731
6780
|
type: String,
|
|
6732
|
-
reflect: true
|
|
6781
|
+
reflect: true,
|
|
6782
|
+
attribute: "column-label"
|
|
6733
6783
|
})], EditorDate.prototype, "columnLabel", void 0);
|
|
6734
6784
|
__decorate([query("[data-rozie-ref=\"inputEl\"]")], EditorDate.prototype, "_refInputEl", void 0);
|
|
6735
6785
|
EditorDate = __decorate([customElement("rozie-editor-date")], EditorDate);
|
|
@@ -6814,14 +6864,19 @@ let FilterText = class FilterText extends SignalWatcher(LitElement) {
|
|
|
6814
6864
|
};
|
|
6815
6865
|
__decorate([property({
|
|
6816
6866
|
type: String,
|
|
6817
|
-
reflect: true
|
|
6867
|
+
reflect: true,
|
|
6868
|
+
attribute: "column-id"
|
|
6818
6869
|
})], FilterText.prototype, "columnId", void 0);
|
|
6819
6870
|
__decorate([property({ type: Object })], FilterText.prototype, "column", void 0);
|
|
6820
6871
|
__decorate([property({ type: Object })], FilterText.prototype, "value", void 0);
|
|
6821
|
-
__decorate([property({
|
|
6872
|
+
__decorate([property({
|
|
6873
|
+
type: Function,
|
|
6874
|
+
attribute: "set-filter"
|
|
6875
|
+
})], FilterText.prototype, "setFilter", void 0);
|
|
6822
6876
|
__decorate([property({
|
|
6823
6877
|
type: String,
|
|
6824
|
-
reflect: true
|
|
6878
|
+
reflect: true,
|
|
6879
|
+
attribute: "column-label"
|
|
6825
6880
|
})], FilterText.prototype, "columnLabel", void 0);
|
|
6826
6881
|
FilterText = __decorate([customElement("rozie-filter-text")], FilterText);
|
|
6827
6882
|
var FilterText_default = FilterText;
|
|
@@ -6921,15 +6976,23 @@ let FilterNumberRange = class FilterNumberRange extends SignalWatcher(LitElement
|
|
|
6921
6976
|
};
|
|
6922
6977
|
__decorate([property({
|
|
6923
6978
|
type: String,
|
|
6924
|
-
reflect: true
|
|
6979
|
+
reflect: true,
|
|
6980
|
+
attribute: "column-id"
|
|
6925
6981
|
})], FilterNumberRange.prototype, "columnId", void 0);
|
|
6926
6982
|
__decorate([property({ type: Object })], FilterNumberRange.prototype, "column", void 0);
|
|
6927
6983
|
__decorate([property({ type: Object })], FilterNumberRange.prototype, "value", void 0);
|
|
6928
|
-
__decorate([property({
|
|
6929
|
-
|
|
6984
|
+
__decorate([property({
|
|
6985
|
+
type: Function,
|
|
6986
|
+
attribute: "set-filter"
|
|
6987
|
+
})], FilterNumberRange.prototype, "setFilter", void 0);
|
|
6988
|
+
__decorate([property({
|
|
6989
|
+
type: Object,
|
|
6990
|
+
attribute: "min-max"
|
|
6991
|
+
})], FilterNumberRange.prototype, "minMax", void 0);
|
|
6930
6992
|
__decorate([property({
|
|
6931
6993
|
type: String,
|
|
6932
|
-
reflect: true
|
|
6994
|
+
reflect: true,
|
|
6995
|
+
attribute: "column-label"
|
|
6933
6996
|
})], FilterNumberRange.prototype, "columnLabel", void 0);
|
|
6934
6997
|
FilterNumberRange = __decorate([customElement("rozie-filter-number-range")], FilterNumberRange);
|
|
6935
6998
|
var FilterNumberRange_default = FilterNumberRange;
|
|
@@ -6984,15 +7047,23 @@ let FilterSelect = class FilterSelect extends SignalWatcher(LitElement) {
|
|
|
6984
7047
|
};
|
|
6985
7048
|
__decorate([property({
|
|
6986
7049
|
type: String,
|
|
6987
|
-
reflect: true
|
|
7050
|
+
reflect: true,
|
|
7051
|
+
attribute: "column-id"
|
|
6988
7052
|
})], FilterSelect.prototype, "columnId", void 0);
|
|
6989
7053
|
__decorate([property({ type: Object })], FilterSelect.prototype, "column", void 0);
|
|
6990
7054
|
__decorate([property({ type: Object })], FilterSelect.prototype, "value", void 0);
|
|
6991
|
-
__decorate([property({
|
|
6992
|
-
|
|
7055
|
+
__decorate([property({
|
|
7056
|
+
type: Function,
|
|
7057
|
+
attribute: "set-filter"
|
|
7058
|
+
})], FilterSelect.prototype, "setFilter", void 0);
|
|
7059
|
+
__decorate([property({
|
|
7060
|
+
type: Array,
|
|
7061
|
+
attribute: "unique-values"
|
|
7062
|
+
})], FilterSelect.prototype, "uniqueValues", void 0);
|
|
6993
7063
|
__decorate([property({
|
|
6994
7064
|
type: String,
|
|
6995
|
-
reflect: true
|
|
7065
|
+
reflect: true,
|
|
7066
|
+
attribute: "column-label"
|
|
6996
7067
|
})], FilterSelect.prototype, "columnLabel", void 0);
|
|
6997
7068
|
FilterSelect = __decorate([customElement("rozie-filter-select")], FilterSelect);
|
|
6998
7069
|
var FilterSelect_default = FilterSelect;
|
|
@@ -7247,9 +7318,18 @@ let GroupBar = class GroupBar extends SignalWatcher(LitElement) {
|
|
|
7247
7318
|
}
|
|
7248
7319
|
};
|
|
7249
7320
|
__decorate([property({ type: Array })], GroupBar.prototype, "grouping", void 0);
|
|
7250
|
-
__decorate([property({
|
|
7251
|
-
|
|
7252
|
-
|
|
7321
|
+
__decorate([property({
|
|
7322
|
+
type: Array,
|
|
7323
|
+
attribute: "groupable-columns"
|
|
7324
|
+
})], GroupBar.prototype, "groupableColumns", void 0);
|
|
7325
|
+
__decorate([property({
|
|
7326
|
+
type: Function,
|
|
7327
|
+
attribute: "apply-grouping"
|
|
7328
|
+
})], GroupBar.prototype, "applyGrouping", void 0);
|
|
7329
|
+
__decorate([property({
|
|
7330
|
+
type: Function,
|
|
7331
|
+
attribute: "clear-grouping"
|
|
7332
|
+
})], GroupBar.prototype, "clearGrouping", void 0);
|
|
7253
7333
|
GroupBar = __decorate([customElement("rozie-group-bar")], GroupBar);
|
|
7254
7334
|
var GroupBar_default = GroupBar;
|
|
7255
7335
|
//#endregion
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rozie-ui/data-table-lit",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"private": false,
|
|
6
6
|
"license": "MIT",
|
|
@@ -42,10 +42,11 @@
|
|
|
42
42
|
},
|
|
43
43
|
"files": [
|
|
44
44
|
"dist",
|
|
45
|
-
"src"
|
|
45
|
+
"src",
|
|
46
|
+
"CHANGELOG.md"
|
|
46
47
|
],
|
|
47
48
|
"dependencies": {
|
|
48
|
-
"@rozie/runtime-lit": "^0.
|
|
49
|
+
"@rozie/runtime-lit": "^0.9.0"
|
|
49
50
|
},
|
|
50
51
|
"peerDependencies": {
|
|
51
52
|
"lit": "^3.2",
|
|
@@ -54,7 +55,7 @@
|
|
|
54
55
|
"@preact/signals-core": "^1.3.0",
|
|
55
56
|
"@tanstack/table-core": "^8.21",
|
|
56
57
|
"@tanstack/virtual-core": "^3",
|
|
57
|
-
"@rozie-ui/popover-lit": "^0.1.0 || ^0.2.0"
|
|
58
|
+
"@rozie-ui/popover-lit": "^0.1.0 || ^0.2.0 || ^0.3.0"
|
|
58
59
|
},
|
|
59
60
|
"peerDependenciesMeta": {
|
|
60
61
|
"lit": {
|
package/src/Column.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { LitElement, css, html } from 'lit';
|
|
2
2
|
import { customElement, property } from 'lit/decorators.js';
|
|
3
3
|
import { SignalWatcher } from '@lit-labs/preact-signals';
|
|
4
|
+
import { rozieNumberOrStringAttr } from '@rozie/runtime-lit';
|
|
4
5
|
import { ContextConsumer, createContext } from '@lit/context';
|
|
5
6
|
|
|
6
7
|
const __rozieCtx_data_table_columns = createContext(Symbol.for("rozie:data-table:columns"));
|
|
@@ -40,7 +41,7 @@ export default class Column extends SignalWatcher(LitElement) {
|
|
|
40
41
|
/**
|
|
41
42
|
* Optional fixed/initial column width, applied as the column's starting size — a px number (`120`) or a px string (`'120px'`). Column sizing is numeric px, so other CSS lengths (`'12rem'`, `'20%'`, `'auto'`) have no px value to apply and are ignored; the column keeps the default width. An interactive resize overrides this.
|
|
42
43
|
*/
|
|
43
|
-
@property({
|
|
44
|
+
@property({ converter: { fromAttribute: rozieNumberOrStringAttr } }) width: string | number = '';
|
|
44
45
|
/**
|
|
45
46
|
* Reserved per-column metadata flagging participation in the expand affordance. The expander chevron is its own auto-injected leading column on `<DataTable expandable>`, so this is forward-compat metadata, not the toggle host. Default `false`.
|
|
46
47
|
*/
|
|
@@ -52,7 +53,7 @@ export default class Column extends SignalWatcher(LitElement) {
|
|
|
52
53
|
/**
|
|
53
54
|
* The table-core aggregation for this column inside a group-header cell. Either a built-in name string — `'sum'` | `'min'` | `'max'` | `'extent'` | `'mean'` | `'median'` | `'unique'` | `'uniqueCount'` | `'count'` — or a custom function `(columnId, leafRows, childRows) => any` (defensively wrapped by the parent so a throw cannot crash grouping). Null → no aggregation (the group-header cell renders as a placeholder).
|
|
54
55
|
*/
|
|
55
|
-
@property({ type: String }) aggregationFn: string | (((...args: any[]) => any) | null) = null;
|
|
56
|
+
@property({ type: String, attribute: 'aggregation-fn' }) aggregationFn: string | (((...args: any[]) => any) | null) = null;
|
|
56
57
|
/**
|
|
57
58
|
* Whether this column's cells are editable (opt-in). Default `false` → the column is read-only and the display↔editor branch never mounts an editor. Bind `:editable="true"` (a bare attr only coerces on Vue+Lit).
|
|
58
59
|
*/
|
|
@@ -64,7 +65,7 @@ export default class Column extends SignalWatcher(LitElement) {
|
|
|
64
65
|
/**
|
|
65
66
|
* Options for `editor: 'select'` — `[{ value, label }]`. Empty for other editor types.
|
|
66
67
|
*/
|
|
67
|
-
@property({ type: Array }) editorOptions: any[] = [];
|
|
68
|
+
@property({ type: Array, attribute: 'editor-options' }) editorOptions: any[] = [];
|
|
68
69
|
/**
|
|
69
70
|
* Synchronous per-column validator `(value, row) => true | string`. A string return is the error message (the editor stays open and the aria-live region announces it). Null → no validation. The parent wraps it defensively against a thrown/non-bool/non-string return.
|
|
70
71
|
*/
|