@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.
@@ -12,7 +12,7 @@ export default class EditorCheckbox extends SignalWatcher(LitElement) {
12
12
  /**
13
13
  * The column id (mirrors the `#editor` slot scope). Used as the input `aria-label`.
14
14
  */
15
- @property({ type: String, reflect: true }) columnId: string = '';
15
+ @property({ type: String, reflect: true, attribute: 'column-id' }) columnId: string = '';
16
16
  /**
17
17
  * The table-core column object (opaque passthrough from the `#editor` slot scope).
18
18
  */
@@ -40,7 +40,7 @@ export default class EditorCheckbox extends SignalWatcher(LitElement) {
40
40
  /**
41
41
  * The column's human header, forwarded by the slot scope — used as the control's accessible name in place of the internal column id.
42
42
  */
43
- @property({ type: String, reflect: true }) columnLabel: string = '';
43
+ @property({ type: String, reflect: true, attribute: 'column-label' }) columnLabel: string = '';
44
44
  @query('[data-rozie-ref="inputEl"]') private _refInputEl!: HTMLElement;
45
45
  private __rozieFirstUpdateDone = false;
46
46
 
package/src/EditorDate.ts CHANGED
@@ -33,7 +33,7 @@ export default class EditorDate extends SignalWatcher(LitElement) {
33
33
  /**
34
34
  * The column id (mirrors the `#editor` slot scope). Used as the input `aria-label`.
35
35
  */
36
- @property({ type: String, reflect: true }) columnId: string = '';
36
+ @property({ type: String, reflect: true, attribute: 'column-id' }) columnId: string = '';
37
37
  /**
38
38
  * The table-core column object (opaque passthrough from the `#editor` slot scope).
39
39
  */
@@ -61,7 +61,7 @@ export default class EditorDate extends SignalWatcher(LitElement) {
61
61
  /**
62
62
  * The column's human header, forwarded by the slot scope — used as the control's accessible name in place of the internal column id.
63
63
  */
64
- @property({ type: String, reflect: true }) columnLabel: string = '';
64
+ @property({ type: String, reflect: true, attribute: 'column-label' }) columnLabel: string = '';
65
65
  private _draft = signal('');
66
66
  private _touched = signal(false);
67
67
  @query('[data-rozie-ref="inputEl"]') private _refInputEl!: HTMLElement;
@@ -12,7 +12,7 @@ export default class EditorNumber extends SignalWatcher(LitElement) {
12
12
  /**
13
13
  * The column id (mirrors the `#editor` slot scope). Used as the input `aria-label`.
14
14
  */
15
- @property({ type: String, reflect: true }) columnId: string = '';
15
+ @property({ type: String, reflect: true, attribute: 'column-id' }) columnId: string = '';
16
16
  /**
17
17
  * The table-core column object (opaque passthrough from the `#editor` slot scope).
18
18
  */
@@ -40,7 +40,7 @@ export default class EditorNumber extends SignalWatcher(LitElement) {
40
40
  /**
41
41
  * The column's human header, forwarded by the slot scope — used as the control's accessible name in place of the internal column id.
42
42
  */
43
- @property({ type: String, reflect: true }) columnLabel: string = '';
43
+ @property({ type: String, reflect: true, attribute: 'column-label' }) columnLabel: string = '';
44
44
  private _draft = signal('');
45
45
  private _touched = signal(false);
46
46
  @query('[data-rozie-ref="inputEl"]') private _refInputEl!: HTMLElement;
@@ -13,7 +13,7 @@ export default class EditorSelect extends SignalWatcher(LitElement) {
13
13
  /**
14
14
  * The column id (mirrors the `#editor` slot scope). Used as the select `aria-label`.
15
15
  */
16
- @property({ type: String, reflect: true }) columnId: string = '';
16
+ @property({ type: String, reflect: true, attribute: 'column-id' }) columnId: string = '';
17
17
  /**
18
18
  * The table-core column object (opaque passthrough from the `#editor` slot scope).
19
19
  */
@@ -45,7 +45,7 @@ export default class EditorSelect extends SignalWatcher(LitElement) {
45
45
  /**
46
46
  * The column's human header, forwarded by the slot scope — used as the control's accessible name in place of the internal column id.
47
47
  */
48
- @property({ type: String, reflect: true }) columnLabel: string = '';
48
+ @property({ type: String, reflect: true, attribute: 'column-label' }) columnLabel: string = '';
49
49
  private _draft = signal('');
50
50
  private _touched = signal(false);
51
51
  @query('[data-rozie-ref="selectEl"]') private _refSelectEl!: HTMLElement;
package/src/EditorText.ts CHANGED
@@ -12,7 +12,7 @@ export default class EditorText extends SignalWatcher(LitElement) {
12
12
  /**
13
13
  * The column id (mirrors the `#editor` slot scope). Used as the input `aria-label` fallback.
14
14
  */
15
- @property({ type: String, reflect: true }) columnId: string = '';
15
+ @property({ type: String, reflect: true, attribute: 'column-id' }) columnId: string = '';
16
16
  /**
17
17
  * The table-core column object (opaque passthrough from the `#editor` slot scope).
18
18
  */
@@ -40,7 +40,7 @@ export default class EditorText extends SignalWatcher(LitElement) {
40
40
  /**
41
41
  * The column's human header, forwarded by the slot scope — used as the control's accessible name in place of the internal column id.
42
42
  */
43
- @property({ type: String, reflect: true }) columnLabel: string = '';
43
+ @property({ type: String, reflect: true, attribute: 'column-label' }) columnLabel: string = '';
44
44
  private _draft = signal('');
45
45
  private _touched = signal(false);
46
46
  @query('[data-rozie-ref="inputEl"]') private _refInputEl!: HTMLElement;
@@ -12,7 +12,7 @@ export default class FilterNumberRange extends SignalWatcher(LitElement) {
12
12
  /**
13
13
  * The column id (mirrors the `#filter` slot scope) — used as the filter key and the input `aria-label` base.
14
14
  */
15
- @property({ type: String, reflect: true }) columnId: string = '';
15
+ @property({ type: String, reflect: true, attribute: 'column-id' }) columnId: string = '';
16
16
  /**
17
17
  * The table-core column object (opaque passthrough from the `#filter` slot scope).
18
18
  */
@@ -24,15 +24,15 @@ export default class FilterNumberRange extends SignalWatcher(LitElement) {
24
24
  /**
25
25
  * `(columnId, value) => void` — apply the column filter as a `[min, max]` tuple (each side coerced to a Number or `undefined`, so a one-sided range works); both empty clears the filter. Null-guarded at call sites.
26
26
  */
27
- @property({ type: Function }) setFilter: ((...args: any[]) => any) | null = null;
27
+ @property({ type: Function, attribute: 'set-filter' }) setFilter: ((...args: any[]) => any) | null = null;
28
28
  /**
29
29
  * The faceted `[min, max]` bounds for this column (`[number, number]` or null) — drives the input placeholders only.
30
30
  */
31
- @property({ type: Object }) minMax: unknown = null;
31
+ @property({ type: Object, attribute: 'min-max' }) minMax: unknown = null;
32
32
  /**
33
33
  * The column's human header, forwarded by the `#filter` slot scope — used as the control's accessible name in place of the internal column id.
34
34
  */
35
- @property({ type: String, reflect: true }) columnLabel: string = '';
35
+ @property({ type: String, reflect: true, attribute: 'column-label' }) columnLabel: string = '';
36
36
  private _minDraft = signal('');
37
37
  private _maxDraft = signal('');
38
38
  private _touched = signal(false);
@@ -13,7 +13,7 @@ export default class FilterSelect extends SignalWatcher(LitElement) {
13
13
  /**
14
14
  * The column id (mirrors the `#filter` slot scope) — used as the filter key and the select `aria-label`.
15
15
  */
16
- @property({ type: String, reflect: true }) columnId: string = '';
16
+ @property({ type: String, reflect: true, attribute: 'column-id' }) columnId: string = '';
17
17
  /**
18
18
  * The table-core column object (opaque passthrough from the `#filter` slot scope).
19
19
  */
@@ -25,15 +25,15 @@ export default class FilterSelect extends SignalWatcher(LitElement) {
25
25
  /**
26
26
  * `(columnId, value) => void` — apply the column filter on change; the leading empty "All" option clears it. Null-guarded at call sites.
27
27
  */
28
- @property({ type: Function }) setFilter: ((...args: any[]) => any) | null = null;
28
+ @property({ type: Function, attribute: 'set-filter' }) setFilter: ((...args: any[]) => any) | null = null;
29
29
  /**
30
30
  * The faceted distinct keys for this column (cross-filtered, keys only — no occurrence counts) used to build the `<option>` list.
31
31
  */
32
- @property({ type: Array }) uniqueValues: any[] = [];
32
+ @property({ type: Array, attribute: 'unique-values' }) uniqueValues: any[] = [];
33
33
  /**
34
34
  * The column's human header, forwarded by the `#filter` slot scope — used as the control's accessible name in place of the internal column id.
35
35
  */
36
- @property({ type: String, reflect: true }) columnLabel: string = '';
36
+ @property({ type: String, reflect: true, attribute: 'column-label' }) columnLabel: string = '';
37
37
 
38
38
  private _disconnectCleanups: Array<() => void> = [];
39
39
  // Re-parenting guard: set true once the deferred teardown has actually
package/src/FilterText.ts CHANGED
@@ -12,7 +12,7 @@ export default class FilterText extends SignalWatcher(LitElement) {
12
12
  /**
13
13
  * The column id (mirrors the `#filter` slot scope) — used as the filter key and the input `aria-label`.
14
14
  */
15
- @property({ type: String, reflect: true }) columnId: string = '';
15
+ @property({ type: String, reflect: true, attribute: 'column-id' }) columnId: string = '';
16
16
  /**
17
17
  * The table-core column object (opaque passthrough from the `#filter` slot scope).
18
18
  */
@@ -24,11 +24,11 @@ export default class FilterText extends SignalWatcher(LitElement) {
24
24
  /**
25
25
  * `(columnId, value) => void` — apply the column filter (Enter / blur applies, Escape clears). Null-guarded at call sites.
26
26
  */
27
- @property({ type: Function }) setFilter: ((...args: any[]) => any) | null = null;
27
+ @property({ type: Function, attribute: 'set-filter' }) setFilter: ((...args: any[]) => any) | null = null;
28
28
  /**
29
29
  * The column's human header, forwarded by the `#filter` slot scope — used as the control's accessible name in place of the internal column id.
30
30
  */
31
- @property({ type: String, reflect: true }) columnLabel: string = '';
31
+ @property({ type: String, reflect: true, attribute: 'column-label' }) columnLabel: string = '';
32
32
  private _draft = signal('');
33
33
  private _touched = signal(false);
34
34
  private __rozieFirstUpdateDone = false;
package/src/GroupBar.ts CHANGED
@@ -86,15 +86,15 @@ export default class GroupBar extends SignalWatcher(LitElement) {
86
86
  /**
87
87
  * The columns offered as grouping targets — `[{ id, label }]` — rendered as draggable chips.
88
88
  */
89
- @property({ type: Array }) groupableColumns: any[] = [];
89
+ @property({ type: Array, attribute: 'groupable-columns' }) groupableColumns: any[] = [];
90
90
  /**
91
91
  * `(cols: string[]) => void` — the only add/reorder writer for the grouping order. Null-guarded at call sites.
92
92
  */
93
- @property({ type: Function }) applyGrouping: ((...args: any[]) => any) | null = null;
93
+ @property({ type: Function, attribute: 'apply-grouping' }) applyGrouping: ((...args: any[]) => any) | null = null;
94
94
  /**
95
95
  * `() => void` — the only clear writer; resets grouping to empty. Null-guarded at call sites.
96
96
  */
97
- @property({ type: Function }) clearGrouping: ((...args: any[]) => any) | null = null;
97
+ @property({ type: Function, attribute: 'clear-grouping' }) clearGrouping: ((...args: any[]) => any) | null = null;
98
98
  private _draggingId = signal('');
99
99
  private _isOver = signal(false);
100
100
  private _dragKind = signal('');
package/src/index.ts CHANGED
@@ -11,3 +11,5 @@ export { default as FilterNumberRange } from './FilterNumberRange';
11
11
  export { default as FilterSelect } from './FilterSelect';
12
12
  export { default as GroupBar } from './GroupBar';
13
13
  export { default as DetailPanel } from './DetailPanel';
14
+ export type { RozieDataTableEventMap } from './DataTable';
15
+ export type * from './DataTable';