@luzmo/ngx-lucero 2.4.2 → 2.5.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/esm/components/table-body.d.ts +30 -0
- package/esm/components/table-body.js +75 -0
- package/esm/components/table-cell.d.ts +30 -0
- package/esm/components/table-cell.js +79 -0
- package/esm/components/table-checkbox-cell.d.ts +37 -0
- package/esm/components/table-checkbox-cell.js +120 -0
- package/esm/components/table-disclosure-cell.d.ts +31 -0
- package/esm/components/table-disclosure-cell.js +84 -0
- package/esm/components/table-head-cell.d.ts +50 -0
- package/esm/components/table-head-cell.js +155 -0
- package/esm/components/table-head.d.ts +30 -0
- package/esm/components/table-head.js +79 -0
- package/esm/components/table-row-details.d.ts +32 -0
- package/esm/components/table-row-details.js +83 -0
- package/esm/components/table-row.d.ts +38 -0
- package/esm/components/table-row.js +111 -0
- package/esm/components/table.d.ts +75 -0
- package/esm/components/table.js +242 -0
- package/esm/index.d.ts +20 -2
- package/esm/index.js +36 -0
- package/package.json +2 -2
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
+
import '@luzmo/lucero/table';
|
|
3
|
+
import type { LuzmoTableBody as LuzmoTableBodyHostElement } from '@luzmo/lucero/table';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class LuzmoTableBody implements OnChanges {
|
|
6
|
+
private readonly elementRef;
|
|
7
|
+
private readonly renderer;
|
|
8
|
+
private readonly destroyRef;
|
|
9
|
+
private readonly host;
|
|
10
|
+
private readonly listenerCleanup;
|
|
11
|
+
/** The underlying custom element instance. Use to call imperative methods. */
|
|
12
|
+
get nativeElement(): LuzmoTableBodyHostElement;
|
|
13
|
+
role?: string;
|
|
14
|
+
/** The body scroll position changed. */
|
|
15
|
+
readonly luzmoTableBodyScroll: import("@angular/core").OutputEmitterRef<CustomEvent<unknown>>;
|
|
16
|
+
constructor();
|
|
17
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
18
|
+
/**
|
|
19
|
+
* Forward a wrapper @Input to the underlying host element via Renderer2 so
|
|
20
|
+
* the wrapper stays compatible with non-DOM Angular platforms (SSR, tests).
|
|
21
|
+
* Unlike a "skip undefined" guard, this lets consumers reset values back to
|
|
22
|
+
* undefined / null by clearing their bindings.
|
|
23
|
+
*/
|
|
24
|
+
private setHostProperty;
|
|
25
|
+
private bindEvents;
|
|
26
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LuzmoTableBody, never>;
|
|
27
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LuzmoTableBody, "luzmo-table-body", ["luzmoTableBody"], { "role": { "alias": "role"; "required": false; }; }, { "luzmoTableBodyScroll": "luzmo-table-body-scroll"; }, never, ["*"], true, never>;
|
|
28
|
+
}
|
|
29
|
+
/** The underlying custom element type for LuzmoTableBody */
|
|
30
|
+
export type LuzmoTableBodyElement = LuzmoTableBodyHostElement;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, inject, Input, output, Renderer2 } from '@angular/core';
|
|
2
|
+
import '@luzmo/lucero/table';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
const _c0 = ["*"];
|
|
5
|
+
/**
|
|
6
|
+
* Angular wrapper component for <luzmo-table-body>
|
|
7
|
+
*
|
|
8
|
+
* @slot (default) - `luzmo-table-row` elements.
|
|
9
|
+
*/
|
|
10
|
+
export class LuzmoTableBody {
|
|
11
|
+
elementRef = inject(ElementRef);
|
|
12
|
+
renderer = inject(Renderer2);
|
|
13
|
+
destroyRef = inject(DestroyRef);
|
|
14
|
+
host = this.elementRef.nativeElement;
|
|
15
|
+
listenerCleanup = [];
|
|
16
|
+
/** The underlying custom element instance. Use to call imperative methods. */
|
|
17
|
+
get nativeElement() {
|
|
18
|
+
return this.host;
|
|
19
|
+
}
|
|
20
|
+
role;
|
|
21
|
+
/** The body scroll position changed. */
|
|
22
|
+
luzmoTableBodyScroll = output({ alias: 'luzmo-table-body-scroll' });
|
|
23
|
+
constructor() {
|
|
24
|
+
this.bindEvents();
|
|
25
|
+
this.destroyRef.onDestroy(() => {
|
|
26
|
+
for (const cleanup of this.listenerCleanup) {
|
|
27
|
+
cleanup();
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
ngOnChanges(changes) {
|
|
32
|
+
for (const key of Object.keys(changes)) {
|
|
33
|
+
switch (key) {
|
|
34
|
+
case 'role':
|
|
35
|
+
this.setHostProperty('role', changes['role'].currentValue);
|
|
36
|
+
break;
|
|
37
|
+
default:
|
|
38
|
+
break;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Forward a wrapper @Input to the underlying host element via Renderer2 so
|
|
44
|
+
* the wrapper stays compatible with non-DOM Angular platforms (SSR, tests).
|
|
45
|
+
* Unlike a "skip undefined" guard, this lets consumers reset values back to
|
|
46
|
+
* undefined / null by clearing their bindings.
|
|
47
|
+
*/
|
|
48
|
+
setHostProperty(key, value) {
|
|
49
|
+
this.renderer.setProperty(this.host, key, value);
|
|
50
|
+
}
|
|
51
|
+
bindEvents() {
|
|
52
|
+
this.listenerCleanup.push(this.renderer.listen(this.host, 'luzmo-table-body-scroll', (event) => {
|
|
53
|
+
this.luzmoTableBodyScroll.emit(event);
|
|
54
|
+
}));
|
|
55
|
+
}
|
|
56
|
+
static ɵfac = function LuzmoTableBody_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LuzmoTableBody)(); };
|
|
57
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LuzmoTableBody, selectors: [["luzmo-table-body"]], inputs: { role: "role" }, outputs: { luzmoTableBodyScroll: "luzmo-table-body-scroll" }, exportAs: ["luzmoTableBody"], features: [i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0, decls: 1, vars: 0, template: function LuzmoTableBody_Template(rf, ctx) { if (rf & 1) {
|
|
58
|
+
i0.ɵɵprojectionDef();
|
|
59
|
+
i0.ɵɵprojection(0);
|
|
60
|
+
} }, encapsulation: 2 });
|
|
61
|
+
}
|
|
62
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LuzmoTableBody, [{
|
|
63
|
+
type: Component,
|
|
64
|
+
args: [{
|
|
65
|
+
selector: 'luzmo-table-body',
|
|
66
|
+
exportAs: 'luzmoTableBody',
|
|
67
|
+
standalone: true,
|
|
68
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
69
|
+
template: '<ng-content />'
|
|
70
|
+
}]
|
|
71
|
+
}], () => [], { role: [{
|
|
72
|
+
type: Input,
|
|
73
|
+
args: [{ alias: 'role' }]
|
|
74
|
+
}], luzmoTableBodyScroll: [{ type: i0.Output, args: ["luzmo-table-body-scroll"] }] }); })();
|
|
75
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LuzmoTableBody, { className: "LuzmoTableBody", filePath: "components/table-body.ts", lineNumber: 17 }); })();
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
+
import '@luzmo/lucero/table';
|
|
3
|
+
import type { LuzmoTableCell as LuzmoTableCellHostElement } from '@luzmo/lucero/table';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class LuzmoTableCell implements OnChanges {
|
|
6
|
+
private readonly elementRef;
|
|
7
|
+
private readonly renderer;
|
|
8
|
+
private readonly destroyRef;
|
|
9
|
+
private readonly host;
|
|
10
|
+
private readonly listenerCleanup;
|
|
11
|
+
/** The underlying custom element instance. Use to call imperative methods. */
|
|
12
|
+
get nativeElement(): LuzmoTableCellHostElement;
|
|
13
|
+
role?: string;
|
|
14
|
+
/** Maximum number of lines before the cell truncates. Unset wraps. Overrides the column's `lineClamp`. */
|
|
15
|
+
lineClamp?: number;
|
|
16
|
+
constructor();
|
|
17
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
18
|
+
/**
|
|
19
|
+
* Forward a wrapper @Input to the underlying host element via Renderer2 so
|
|
20
|
+
* the wrapper stays compatible with non-DOM Angular platforms (SSR, tests).
|
|
21
|
+
* Unlike a "skip undefined" guard, this lets consumers reset values back to
|
|
22
|
+
* undefined / null by clearing their bindings.
|
|
23
|
+
*/
|
|
24
|
+
private setHostProperty;
|
|
25
|
+
private bindEvents;
|
|
26
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LuzmoTableCell, never>;
|
|
27
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LuzmoTableCell, "luzmo-table-cell", ["luzmoTableCell"], { "role": { "alias": "role"; "required": false; }; "lineClamp": { "alias": "lineClamp"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
28
|
+
}
|
|
29
|
+
/** The underlying custom element type for LuzmoTableCell */
|
|
30
|
+
export type LuzmoTableCellElement = LuzmoTableCellHostElement;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, inject, Input, Renderer2 } from '@angular/core';
|
|
2
|
+
import '@luzmo/lucero/table';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
const _c0 = ["*"];
|
|
5
|
+
/**
|
|
6
|
+
* Angular wrapper component for <luzmo-table-cell>
|
|
7
|
+
*
|
|
8
|
+
* @slot (default) - Cell content.
|
|
9
|
+
*/
|
|
10
|
+
export class LuzmoTableCell {
|
|
11
|
+
elementRef = inject(ElementRef);
|
|
12
|
+
renderer = inject(Renderer2);
|
|
13
|
+
destroyRef = inject(DestroyRef);
|
|
14
|
+
host = this.elementRef.nativeElement;
|
|
15
|
+
listenerCleanup = [];
|
|
16
|
+
/** The underlying custom element instance. Use to call imperative methods. */
|
|
17
|
+
get nativeElement() {
|
|
18
|
+
return this.host;
|
|
19
|
+
}
|
|
20
|
+
role;
|
|
21
|
+
/** Maximum number of lines before the cell truncates. Unset wraps. Overrides the column's `lineClamp`. */
|
|
22
|
+
lineClamp;
|
|
23
|
+
constructor() {
|
|
24
|
+
this.bindEvents();
|
|
25
|
+
this.destroyRef.onDestroy(() => {
|
|
26
|
+
for (const cleanup of this.listenerCleanup) {
|
|
27
|
+
cleanup();
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
ngOnChanges(changes) {
|
|
32
|
+
for (const key of Object.keys(changes)) {
|
|
33
|
+
switch (key) {
|
|
34
|
+
case 'role':
|
|
35
|
+
this.setHostProperty('role', changes['role'].currentValue);
|
|
36
|
+
break;
|
|
37
|
+
case 'lineClamp':
|
|
38
|
+
this.setHostProperty('lineClamp', changes['lineClamp'].currentValue);
|
|
39
|
+
break;
|
|
40
|
+
default:
|
|
41
|
+
break;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Forward a wrapper @Input to the underlying host element via Renderer2 so
|
|
47
|
+
* the wrapper stays compatible with non-DOM Angular platforms (SSR, tests).
|
|
48
|
+
* Unlike a "skip undefined" guard, this lets consumers reset values back to
|
|
49
|
+
* undefined / null by clearing their bindings.
|
|
50
|
+
*/
|
|
51
|
+
setHostProperty(key, value) {
|
|
52
|
+
this.renderer.setProperty(this.host, key, value);
|
|
53
|
+
}
|
|
54
|
+
bindEvents() {
|
|
55
|
+
// No custom events for this wrapper.
|
|
56
|
+
}
|
|
57
|
+
static ɵfac = function LuzmoTableCell_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LuzmoTableCell)(); };
|
|
58
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LuzmoTableCell, selectors: [["luzmo-table-cell"]], inputs: { role: "role", lineClamp: "lineClamp" }, exportAs: ["luzmoTableCell"], features: [i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0, decls: 1, vars: 0, template: function LuzmoTableCell_Template(rf, ctx) { if (rf & 1) {
|
|
59
|
+
i0.ɵɵprojectionDef();
|
|
60
|
+
i0.ɵɵprojection(0);
|
|
61
|
+
} }, encapsulation: 2 });
|
|
62
|
+
}
|
|
63
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LuzmoTableCell, [{
|
|
64
|
+
type: Component,
|
|
65
|
+
args: [{
|
|
66
|
+
selector: 'luzmo-table-cell',
|
|
67
|
+
exportAs: 'luzmoTableCell',
|
|
68
|
+
standalone: true,
|
|
69
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
70
|
+
template: '<ng-content />'
|
|
71
|
+
}]
|
|
72
|
+
}], () => [], { role: [{
|
|
73
|
+
type: Input,
|
|
74
|
+
args: [{ alias: 'role' }]
|
|
75
|
+
}], lineClamp: [{
|
|
76
|
+
type: Input,
|
|
77
|
+
args: [{ alias: 'lineClamp' }]
|
|
78
|
+
}] }); })();
|
|
79
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LuzmoTableCell, { className: "LuzmoTableCell", filePath: "components/table-cell.ts", lineNumber: 17 }); })();
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
+
import '@luzmo/lucero/table';
|
|
3
|
+
import type { LuzmoTableCheckboxCell as LuzmoTableCheckboxCellHostElement } from '@luzmo/lucero/table';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class LuzmoTableCheckboxCell implements OnChanges {
|
|
6
|
+
private readonly elementRef;
|
|
7
|
+
private readonly renderer;
|
|
8
|
+
private readonly destroyRef;
|
|
9
|
+
private readonly host;
|
|
10
|
+
private readonly listenerCleanup;
|
|
11
|
+
/** The underlying custom element instance. Use to call imperative methods. */
|
|
12
|
+
get nativeElement(): LuzmoTableCheckboxCellHostElement;
|
|
13
|
+
role?: string;
|
|
14
|
+
/** Whether this is the select-all cell of the header row. */
|
|
15
|
+
headCell?: boolean;
|
|
16
|
+
checked?: boolean;
|
|
17
|
+
indeterminate?: boolean;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
selectsSingle?: boolean;
|
|
20
|
+
emphasized?: boolean;
|
|
21
|
+
/** Accessible name of the checkbox. */
|
|
22
|
+
label?: string;
|
|
23
|
+
constructor();
|
|
24
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
25
|
+
/**
|
|
26
|
+
* Forward a wrapper @Input to the underlying host element via Renderer2 so
|
|
27
|
+
* the wrapper stays compatible with non-DOM Angular platforms (SSR, tests).
|
|
28
|
+
* Unlike a "skip undefined" guard, this lets consumers reset values back to
|
|
29
|
+
* undefined / null by clearing their bindings.
|
|
30
|
+
*/
|
|
31
|
+
private setHostProperty;
|
|
32
|
+
private bindEvents;
|
|
33
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LuzmoTableCheckboxCell, never>;
|
|
34
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LuzmoTableCheckboxCell, "luzmo-table-checkbox-cell", ["luzmoTableCheckboxCell"], { "role": { "alias": "role"; "required": false; }; "headCell": { "alias": "headCell"; "required": false; }; "checked": { "alias": "checked"; "required": false; }; "indeterminate": { "alias": "indeterminate"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "selectsSingle": { "alias": "selectsSingle"; "required": false; }; "emphasized": { "alias": "emphasized"; "required": false; }; "label": { "alias": "label"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
35
|
+
}
|
|
36
|
+
/** The underlying custom element type for LuzmoTableCheckboxCell */
|
|
37
|
+
export type LuzmoTableCheckboxCellElement = LuzmoTableCheckboxCellHostElement;
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, inject, Input, Renderer2 } from '@angular/core';
|
|
2
|
+
import '@luzmo/lucero/table';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
const _c0 = ["*"];
|
|
5
|
+
/**
|
|
6
|
+
* Angular wrapper component for <luzmo-table-checkbox-cell>
|
|
7
|
+
*/
|
|
8
|
+
export class LuzmoTableCheckboxCell {
|
|
9
|
+
elementRef = inject(ElementRef);
|
|
10
|
+
renderer = inject(Renderer2);
|
|
11
|
+
destroyRef = inject(DestroyRef);
|
|
12
|
+
host = this.elementRef.nativeElement;
|
|
13
|
+
listenerCleanup = [];
|
|
14
|
+
/** The underlying custom element instance. Use to call imperative methods. */
|
|
15
|
+
get nativeElement() {
|
|
16
|
+
return this.host;
|
|
17
|
+
}
|
|
18
|
+
role;
|
|
19
|
+
/** Whether this is the select-all cell of the header row. */
|
|
20
|
+
headCell;
|
|
21
|
+
checked;
|
|
22
|
+
indeterminate;
|
|
23
|
+
disabled;
|
|
24
|
+
selectsSingle;
|
|
25
|
+
emphasized;
|
|
26
|
+
/** Accessible name of the checkbox. */
|
|
27
|
+
label;
|
|
28
|
+
constructor() {
|
|
29
|
+
this.bindEvents();
|
|
30
|
+
this.destroyRef.onDestroy(() => {
|
|
31
|
+
for (const cleanup of this.listenerCleanup) {
|
|
32
|
+
cleanup();
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
ngOnChanges(changes) {
|
|
37
|
+
for (const key of Object.keys(changes)) {
|
|
38
|
+
switch (key) {
|
|
39
|
+
case 'role':
|
|
40
|
+
this.setHostProperty('role', changes['role'].currentValue);
|
|
41
|
+
break;
|
|
42
|
+
case 'headCell':
|
|
43
|
+
this.setHostProperty('headCell', changes['headCell'].currentValue);
|
|
44
|
+
break;
|
|
45
|
+
case 'checked':
|
|
46
|
+
this.setHostProperty('checked', changes['checked'].currentValue);
|
|
47
|
+
break;
|
|
48
|
+
case 'indeterminate':
|
|
49
|
+
this.setHostProperty('indeterminate', changes['indeterminate'].currentValue);
|
|
50
|
+
break;
|
|
51
|
+
case 'disabled':
|
|
52
|
+
this.setHostProperty('disabled', changes['disabled'].currentValue);
|
|
53
|
+
break;
|
|
54
|
+
case 'selectsSingle':
|
|
55
|
+
this.setHostProperty('selectsSingle', changes['selectsSingle'].currentValue);
|
|
56
|
+
break;
|
|
57
|
+
case 'emphasized':
|
|
58
|
+
this.setHostProperty('emphasized', changes['emphasized'].currentValue);
|
|
59
|
+
break;
|
|
60
|
+
case 'label':
|
|
61
|
+
this.setHostProperty('label', changes['label'].currentValue);
|
|
62
|
+
break;
|
|
63
|
+
default:
|
|
64
|
+
break;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Forward a wrapper @Input to the underlying host element via Renderer2 so
|
|
70
|
+
* the wrapper stays compatible with non-DOM Angular platforms (SSR, tests).
|
|
71
|
+
* Unlike a "skip undefined" guard, this lets consumers reset values back to
|
|
72
|
+
* undefined / null by clearing their bindings.
|
|
73
|
+
*/
|
|
74
|
+
setHostProperty(key, value) {
|
|
75
|
+
this.renderer.setProperty(this.host, key, value);
|
|
76
|
+
}
|
|
77
|
+
bindEvents() {
|
|
78
|
+
// No custom events for this wrapper.
|
|
79
|
+
}
|
|
80
|
+
static ɵfac = function LuzmoTableCheckboxCell_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LuzmoTableCheckboxCell)(); };
|
|
81
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LuzmoTableCheckboxCell, selectors: [["luzmo-table-checkbox-cell"]], inputs: { role: "role", headCell: "headCell", checked: "checked", indeterminate: "indeterminate", disabled: "disabled", selectsSingle: "selectsSingle", emphasized: "emphasized", label: "label" }, exportAs: ["luzmoTableCheckboxCell"], features: [i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0, decls: 1, vars: 0, template: function LuzmoTableCheckboxCell_Template(rf, ctx) { if (rf & 1) {
|
|
82
|
+
i0.ɵɵprojectionDef();
|
|
83
|
+
i0.ɵɵprojection(0);
|
|
84
|
+
} }, encapsulation: 2 });
|
|
85
|
+
}
|
|
86
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LuzmoTableCheckboxCell, [{
|
|
87
|
+
type: Component,
|
|
88
|
+
args: [{
|
|
89
|
+
selector: 'luzmo-table-checkbox-cell',
|
|
90
|
+
exportAs: 'luzmoTableCheckboxCell',
|
|
91
|
+
standalone: true,
|
|
92
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
93
|
+
template: '<ng-content />'
|
|
94
|
+
}]
|
|
95
|
+
}], () => [], { role: [{
|
|
96
|
+
type: Input,
|
|
97
|
+
args: [{ alias: 'role' }]
|
|
98
|
+
}], headCell: [{
|
|
99
|
+
type: Input,
|
|
100
|
+
args: [{ alias: 'headCell' }]
|
|
101
|
+
}], checked: [{
|
|
102
|
+
type: Input,
|
|
103
|
+
args: [{ alias: 'checked' }]
|
|
104
|
+
}], indeterminate: [{
|
|
105
|
+
type: Input,
|
|
106
|
+
args: [{ alias: 'indeterminate' }]
|
|
107
|
+
}], disabled: [{
|
|
108
|
+
type: Input,
|
|
109
|
+
args: [{ alias: 'disabled' }]
|
|
110
|
+
}], selectsSingle: [{
|
|
111
|
+
type: Input,
|
|
112
|
+
args: [{ alias: 'selectsSingle' }]
|
|
113
|
+
}], emphasized: [{
|
|
114
|
+
type: Input,
|
|
115
|
+
args: [{ alias: 'emphasized' }]
|
|
116
|
+
}], label: [{
|
|
117
|
+
type: Input,
|
|
118
|
+
args: [{ alias: 'label' }]
|
|
119
|
+
}] }); })();
|
|
120
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LuzmoTableCheckboxCell, { className: "LuzmoTableCheckboxCell", filePath: "components/table-checkbox-cell.ts", lineNumber: 15 }); })();
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
+
import '@luzmo/lucero/table';
|
|
3
|
+
import type { LuzmoTableDisclosureCell as LuzmoTableDisclosureCellHostElement } from '@luzmo/lucero/table';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class LuzmoTableDisclosureCell implements OnChanges {
|
|
6
|
+
private readonly elementRef;
|
|
7
|
+
private readonly renderer;
|
|
8
|
+
private readonly destroyRef;
|
|
9
|
+
private readonly host;
|
|
10
|
+
private readonly listenerCleanup;
|
|
11
|
+
/** The underlying custom element instance. Use to call imperative methods. */
|
|
12
|
+
get nativeElement(): LuzmoTableDisclosureCellHostElement;
|
|
13
|
+
role?: string;
|
|
14
|
+
expanded?: boolean;
|
|
15
|
+
/** Accessible name of the disclosure button. */
|
|
16
|
+
label?: string;
|
|
17
|
+
constructor();
|
|
18
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
19
|
+
/**
|
|
20
|
+
* Forward a wrapper @Input to the underlying host element via Renderer2 so
|
|
21
|
+
* the wrapper stays compatible with non-DOM Angular platforms (SSR, tests).
|
|
22
|
+
* Unlike a "skip undefined" guard, this lets consumers reset values back to
|
|
23
|
+
* undefined / null by clearing their bindings.
|
|
24
|
+
*/
|
|
25
|
+
private setHostProperty;
|
|
26
|
+
private bindEvents;
|
|
27
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LuzmoTableDisclosureCell, never>;
|
|
28
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LuzmoTableDisclosureCell, "luzmo-table-disclosure-cell", ["luzmoTableDisclosureCell"], { "role": { "alias": "role"; "required": false; }; "expanded": { "alias": "expanded"; "required": false; }; "label": { "alias": "label"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
29
|
+
}
|
|
30
|
+
/** The underlying custom element type for LuzmoTableDisclosureCell */
|
|
31
|
+
export type LuzmoTableDisclosureCellElement = LuzmoTableDisclosureCellHostElement;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, inject, Input, Renderer2 } from '@angular/core';
|
|
2
|
+
import '@luzmo/lucero/table';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
const _c0 = ["*"];
|
|
5
|
+
/**
|
|
6
|
+
* Angular wrapper component for <luzmo-table-disclosure-cell>
|
|
7
|
+
*/
|
|
8
|
+
export class LuzmoTableDisclosureCell {
|
|
9
|
+
elementRef = inject(ElementRef);
|
|
10
|
+
renderer = inject(Renderer2);
|
|
11
|
+
destroyRef = inject(DestroyRef);
|
|
12
|
+
host = this.elementRef.nativeElement;
|
|
13
|
+
listenerCleanup = [];
|
|
14
|
+
/** The underlying custom element instance. Use to call imperative methods. */
|
|
15
|
+
get nativeElement() {
|
|
16
|
+
return this.host;
|
|
17
|
+
}
|
|
18
|
+
role;
|
|
19
|
+
expanded;
|
|
20
|
+
/** Accessible name of the disclosure button. */
|
|
21
|
+
label;
|
|
22
|
+
constructor() {
|
|
23
|
+
this.bindEvents();
|
|
24
|
+
this.destroyRef.onDestroy(() => {
|
|
25
|
+
for (const cleanup of this.listenerCleanup) {
|
|
26
|
+
cleanup();
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
ngOnChanges(changes) {
|
|
31
|
+
for (const key of Object.keys(changes)) {
|
|
32
|
+
switch (key) {
|
|
33
|
+
case 'role':
|
|
34
|
+
this.setHostProperty('role', changes['role'].currentValue);
|
|
35
|
+
break;
|
|
36
|
+
case 'expanded':
|
|
37
|
+
this.setHostProperty('expanded', changes['expanded'].currentValue);
|
|
38
|
+
break;
|
|
39
|
+
case 'label':
|
|
40
|
+
this.setHostProperty('label', changes['label'].currentValue);
|
|
41
|
+
break;
|
|
42
|
+
default:
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Forward a wrapper @Input to the underlying host element via Renderer2 so
|
|
49
|
+
* the wrapper stays compatible with non-DOM Angular platforms (SSR, tests).
|
|
50
|
+
* Unlike a "skip undefined" guard, this lets consumers reset values back to
|
|
51
|
+
* undefined / null by clearing their bindings.
|
|
52
|
+
*/
|
|
53
|
+
setHostProperty(key, value) {
|
|
54
|
+
this.renderer.setProperty(this.host, key, value);
|
|
55
|
+
}
|
|
56
|
+
bindEvents() {
|
|
57
|
+
// No custom events for this wrapper.
|
|
58
|
+
}
|
|
59
|
+
static ɵfac = function LuzmoTableDisclosureCell_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LuzmoTableDisclosureCell)(); };
|
|
60
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LuzmoTableDisclosureCell, selectors: [["luzmo-table-disclosure-cell"]], inputs: { role: "role", expanded: "expanded", label: "label" }, exportAs: ["luzmoTableDisclosureCell"], features: [i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0, decls: 1, vars: 0, template: function LuzmoTableDisclosureCell_Template(rf, ctx) { if (rf & 1) {
|
|
61
|
+
i0.ɵɵprojectionDef();
|
|
62
|
+
i0.ɵɵprojection(0);
|
|
63
|
+
} }, encapsulation: 2 });
|
|
64
|
+
}
|
|
65
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LuzmoTableDisclosureCell, [{
|
|
66
|
+
type: Component,
|
|
67
|
+
args: [{
|
|
68
|
+
selector: 'luzmo-table-disclosure-cell',
|
|
69
|
+
exportAs: 'luzmoTableDisclosureCell',
|
|
70
|
+
standalone: true,
|
|
71
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
72
|
+
template: '<ng-content />'
|
|
73
|
+
}]
|
|
74
|
+
}], () => [], { role: [{
|
|
75
|
+
type: Input,
|
|
76
|
+
args: [{ alias: 'role' }]
|
|
77
|
+
}], expanded: [{
|
|
78
|
+
type: Input,
|
|
79
|
+
args: [{ alias: 'expanded' }]
|
|
80
|
+
}], label: [{
|
|
81
|
+
type: Input,
|
|
82
|
+
args: [{ alias: 'label' }]
|
|
83
|
+
}] }); })();
|
|
84
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LuzmoTableDisclosureCell, { className: "LuzmoTableDisclosureCell", filePath: "components/table-disclosure-cell.ts", lineNumber: 15 }); })();
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
+
import '@luzmo/lucero/table';
|
|
3
|
+
import type { LuzmoTableHeadCell as LuzmoTableHeadCellHostElement } from '@luzmo/lucero/table';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class LuzmoTableHeadCell implements OnChanges {
|
|
6
|
+
private readonly elementRef;
|
|
7
|
+
private readonly renderer;
|
|
8
|
+
private readonly destroyRef;
|
|
9
|
+
private readonly host;
|
|
10
|
+
private readonly listenerCleanup;
|
|
11
|
+
/** The underlying custom element instance. Use to call imperative methods. */
|
|
12
|
+
get nativeElement(): LuzmoTableHeadCellHostElement;
|
|
13
|
+
role?: string;
|
|
14
|
+
/** Pressed state while Space is held on a sortable header. */
|
|
15
|
+
active?: boolean;
|
|
16
|
+
/** Whether activating the header sorts the table. */
|
|
17
|
+
sortable?: boolean;
|
|
18
|
+
/** Current sort direction. Unset when the column is not sorted. */
|
|
19
|
+
sortDirection?: ('asc' | 'desc');
|
|
20
|
+
/** Item key the column sorts by. Sent as `sortKey` in `luzmo-table-sorted`. */
|
|
21
|
+
sortKey?: string;
|
|
22
|
+
/** Stable column identifier. Defaults to `sortKey`, then the column index. */
|
|
23
|
+
columnId?: string;
|
|
24
|
+
/** Fixed column width, in pixels. */
|
|
25
|
+
width?: number;
|
|
26
|
+
/** Minimum column width, in pixels. */
|
|
27
|
+
minWidth?: number;
|
|
28
|
+
/** Maximum column width, in pixels. */
|
|
29
|
+
maxWidth?: number;
|
|
30
|
+
/** Whether the header shows a resize handle. */
|
|
31
|
+
resizable?: boolean;
|
|
32
|
+
/** Maximum number of header lines before the text truncates. Unset wraps. Also the default clamp for the column's cells. */
|
|
33
|
+
lineClamp?: number;
|
|
34
|
+
/** A sortable header was activated. `detail` is `{ sortKey, sortDirection }`. Cancel it in data mode to skip the client sort. Cancel it on this header to keep sibling sort directions unchanged. */
|
|
35
|
+
readonly luzmoTableSorted: import("@angular/core").OutputEmitterRef<CustomEvent<unknown>>;
|
|
36
|
+
constructor();
|
|
37
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
38
|
+
/**
|
|
39
|
+
* Forward a wrapper @Input to the underlying host element via Renderer2 so
|
|
40
|
+
* the wrapper stays compatible with non-DOM Angular platforms (SSR, tests).
|
|
41
|
+
* Unlike a "skip undefined" guard, this lets consumers reset values back to
|
|
42
|
+
* undefined / null by clearing their bindings.
|
|
43
|
+
*/
|
|
44
|
+
private setHostProperty;
|
|
45
|
+
private bindEvents;
|
|
46
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LuzmoTableHeadCell, never>;
|
|
47
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LuzmoTableHeadCell, "luzmo-table-head-cell", ["luzmoTableHeadCell"], { "role": { "alias": "role"; "required": false; }; "active": { "alias": "active"; "required": false; }; "sortable": { "alias": "sortable"; "required": false; }; "sortDirection": { "alias": "sortDirection"; "required": false; }; "sortKey": { "alias": "sortKey"; "required": false; }; "columnId": { "alias": "columnId"; "required": false; }; "width": { "alias": "width"; "required": false; }; "minWidth": { "alias": "minWidth"; "required": false; }; "maxWidth": { "alias": "maxWidth"; "required": false; }; "resizable": { "alias": "resizable"; "required": false; }; "lineClamp": { "alias": "lineClamp"; "required": false; }; }, { "luzmoTableSorted": "luzmo-table-sorted"; }, never, ["*"], true, never>;
|
|
48
|
+
}
|
|
49
|
+
/** The underlying custom element type for LuzmoTableHeadCell */
|
|
50
|
+
export type LuzmoTableHeadCellElement = LuzmoTableHeadCellHostElement;
|