@luzmo/ngx-lucero 2.4.2 → 2.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +63 -0
- package/esm/components/action-button.d.ts +2 -2
- package/esm/components/action-button.js +2 -2
- package/esm/components/action-menu.d.ts +7 -2
- package/esm/components/action-menu.js +18 -2
- package/esm/components/progress-steps.d.ts +1 -2
- package/esm/components/progress-steps.js +1 -8
- 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 +89 -0
- package/esm/components/table.js +279 -0
- package/esm/components/template-input.d.ts +11 -0
- package/esm/components/template-input.js +56 -0
- package/esm/components/template.d.ts +10 -0
- package/esm/components/template.js +30 -0
- package/esm/index.d.ts +21 -2
- package/esm/index.js +37 -0
- package/package.json +2 -2
|
@@ -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;
|
|
@@ -0,0 +1,155 @@
|
|
|
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-head-cell>
|
|
7
|
+
*
|
|
8
|
+
* @slot (default) - Column header content.
|
|
9
|
+
*/
|
|
10
|
+
export class LuzmoTableHeadCell {
|
|
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
|
+
/** Pressed state while Space is held on a sortable header. */
|
|
22
|
+
active;
|
|
23
|
+
/** Whether activating the header sorts the table. */
|
|
24
|
+
sortable;
|
|
25
|
+
/** Current sort direction. Unset when the column is not sorted. */
|
|
26
|
+
sortDirection;
|
|
27
|
+
/** Item key the column sorts by. Sent as `sortKey` in `luzmo-table-sorted`. */
|
|
28
|
+
sortKey;
|
|
29
|
+
/** Stable column identifier. Defaults to `sortKey`, then the column index. */
|
|
30
|
+
columnId;
|
|
31
|
+
/** Fixed column width, in pixels. */
|
|
32
|
+
width;
|
|
33
|
+
/** Minimum column width, in pixels. */
|
|
34
|
+
minWidth;
|
|
35
|
+
/** Maximum column width, in pixels. */
|
|
36
|
+
maxWidth;
|
|
37
|
+
/** Whether the header shows a resize handle. */
|
|
38
|
+
resizable;
|
|
39
|
+
/** Maximum number of header lines before the text truncates. Unset wraps. Also the default clamp for the column's cells. */
|
|
40
|
+
lineClamp;
|
|
41
|
+
/** 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. */
|
|
42
|
+
luzmoTableSorted = output({ alias: 'luzmo-table-sorted' });
|
|
43
|
+
constructor() {
|
|
44
|
+
this.bindEvents();
|
|
45
|
+
this.destroyRef.onDestroy(() => {
|
|
46
|
+
for (const cleanup of this.listenerCleanup) {
|
|
47
|
+
cleanup();
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
ngOnChanges(changes) {
|
|
52
|
+
for (const key of Object.keys(changes)) {
|
|
53
|
+
switch (key) {
|
|
54
|
+
case 'role':
|
|
55
|
+
this.setHostProperty('role', changes['role'].currentValue);
|
|
56
|
+
break;
|
|
57
|
+
case 'active':
|
|
58
|
+
this.setHostProperty('active', changes['active'].currentValue);
|
|
59
|
+
break;
|
|
60
|
+
case 'sortable':
|
|
61
|
+
this.setHostProperty('sortable', changes['sortable'].currentValue);
|
|
62
|
+
break;
|
|
63
|
+
case 'sortDirection':
|
|
64
|
+
this.setHostProperty('sortDirection', changes['sortDirection'].currentValue);
|
|
65
|
+
break;
|
|
66
|
+
case 'sortKey':
|
|
67
|
+
this.setHostProperty('sortKey', changes['sortKey'].currentValue);
|
|
68
|
+
break;
|
|
69
|
+
case 'columnId':
|
|
70
|
+
this.setHostProperty('columnId', changes['columnId'].currentValue);
|
|
71
|
+
break;
|
|
72
|
+
case 'width':
|
|
73
|
+
this.setHostProperty('width', changes['width'].currentValue);
|
|
74
|
+
break;
|
|
75
|
+
case 'minWidth':
|
|
76
|
+
this.setHostProperty('minWidth', changes['minWidth'].currentValue);
|
|
77
|
+
break;
|
|
78
|
+
case 'maxWidth':
|
|
79
|
+
this.setHostProperty('maxWidth', changes['maxWidth'].currentValue);
|
|
80
|
+
break;
|
|
81
|
+
case 'resizable':
|
|
82
|
+
this.setHostProperty('resizable', changes['resizable'].currentValue);
|
|
83
|
+
break;
|
|
84
|
+
case 'lineClamp':
|
|
85
|
+
this.setHostProperty('lineClamp', changes['lineClamp'].currentValue);
|
|
86
|
+
break;
|
|
87
|
+
default:
|
|
88
|
+
break;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Forward a wrapper @Input to the underlying host element via Renderer2 so
|
|
94
|
+
* the wrapper stays compatible with non-DOM Angular platforms (SSR, tests).
|
|
95
|
+
* Unlike a "skip undefined" guard, this lets consumers reset values back to
|
|
96
|
+
* undefined / null by clearing their bindings.
|
|
97
|
+
*/
|
|
98
|
+
setHostProperty(key, value) {
|
|
99
|
+
this.renderer.setProperty(this.host, key, value);
|
|
100
|
+
}
|
|
101
|
+
bindEvents() {
|
|
102
|
+
this.listenerCleanup.push(this.renderer.listen(this.host, 'luzmo-table-sorted', (event) => {
|
|
103
|
+
this.luzmoTableSorted.emit(event);
|
|
104
|
+
}));
|
|
105
|
+
}
|
|
106
|
+
static ɵfac = function LuzmoTableHeadCell_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LuzmoTableHeadCell)(); };
|
|
107
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LuzmoTableHeadCell, selectors: [["luzmo-table-head-cell"]], inputs: { role: "role", active: "active", sortable: "sortable", sortDirection: "sortDirection", sortKey: "sortKey", columnId: "columnId", width: "width", minWidth: "minWidth", maxWidth: "maxWidth", resizable: "resizable", lineClamp: "lineClamp" }, outputs: { luzmoTableSorted: "luzmo-table-sorted" }, exportAs: ["luzmoTableHeadCell"], features: [i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0, decls: 1, vars: 0, template: function LuzmoTableHeadCell_Template(rf, ctx) { if (rf & 1) {
|
|
108
|
+
i0.ɵɵprojectionDef();
|
|
109
|
+
i0.ɵɵprojection(0);
|
|
110
|
+
} }, encapsulation: 2 });
|
|
111
|
+
}
|
|
112
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LuzmoTableHeadCell, [{
|
|
113
|
+
type: Component,
|
|
114
|
+
args: [{
|
|
115
|
+
selector: 'luzmo-table-head-cell',
|
|
116
|
+
exportAs: 'luzmoTableHeadCell',
|
|
117
|
+
standalone: true,
|
|
118
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
119
|
+
template: '<ng-content />'
|
|
120
|
+
}]
|
|
121
|
+
}], () => [], { role: [{
|
|
122
|
+
type: Input,
|
|
123
|
+
args: [{ alias: 'role' }]
|
|
124
|
+
}], active: [{
|
|
125
|
+
type: Input,
|
|
126
|
+
args: [{ alias: 'active' }]
|
|
127
|
+
}], sortable: [{
|
|
128
|
+
type: Input,
|
|
129
|
+
args: [{ alias: 'sortable' }]
|
|
130
|
+
}], sortDirection: [{
|
|
131
|
+
type: Input,
|
|
132
|
+
args: [{ alias: 'sortDirection' }]
|
|
133
|
+
}], sortKey: [{
|
|
134
|
+
type: Input,
|
|
135
|
+
args: [{ alias: 'sortKey' }]
|
|
136
|
+
}], columnId: [{
|
|
137
|
+
type: Input,
|
|
138
|
+
args: [{ alias: 'columnId' }]
|
|
139
|
+
}], width: [{
|
|
140
|
+
type: Input,
|
|
141
|
+
args: [{ alias: 'width' }]
|
|
142
|
+
}], minWidth: [{
|
|
143
|
+
type: Input,
|
|
144
|
+
args: [{ alias: 'minWidth' }]
|
|
145
|
+
}], maxWidth: [{
|
|
146
|
+
type: Input,
|
|
147
|
+
args: [{ alias: 'maxWidth' }]
|
|
148
|
+
}], resizable: [{
|
|
149
|
+
type: Input,
|
|
150
|
+
args: [{ alias: 'resizable' }]
|
|
151
|
+
}], lineClamp: [{
|
|
152
|
+
type: Input,
|
|
153
|
+
args: [{ alias: 'lineClamp' }]
|
|
154
|
+
}], luzmoTableSorted: [{ type: i0.Output, args: ["luzmo-table-sorted"] }] }); })();
|
|
155
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LuzmoTableHeadCell, { className: "LuzmoTableHeadCell", filePath: "components/table-head-cell.ts", lineNumber: 17 }); })();
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
+
import '@luzmo/lucero/table';
|
|
3
|
+
import type { LuzmoTableHead as LuzmoTableHeadHostElement } from '@luzmo/lucero/table';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class LuzmoTableHead 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(): LuzmoTableHeadHostElement;
|
|
13
|
+
role?: string;
|
|
14
|
+
/** Whether any row is selected. Mirrored from the table. */
|
|
15
|
+
selected?: boolean;
|
|
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<LuzmoTableHead, never>;
|
|
27
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LuzmoTableHead, "luzmo-table-head", ["luzmoTableHead"], { "role": { "alias": "role"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
28
|
+
}
|
|
29
|
+
/** The underlying custom element type for LuzmoTableHead */
|
|
30
|
+
export type LuzmoTableHeadElement = LuzmoTableHeadHostElement;
|
|
@@ -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-head>
|
|
7
|
+
*
|
|
8
|
+
* @slot (default) - `luzmo-table-head-cell` elements.
|
|
9
|
+
*/
|
|
10
|
+
export class LuzmoTableHead {
|
|
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
|
+
/** Whether any row is selected. Mirrored from the table. */
|
|
22
|
+
selected;
|
|
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 'selected':
|
|
38
|
+
this.setHostProperty('selected', changes['selected'].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 LuzmoTableHead_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LuzmoTableHead)(); };
|
|
58
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LuzmoTableHead, selectors: [["luzmo-table-head"]], inputs: { role: "role", selected: "selected" }, exportAs: ["luzmoTableHead"], features: [i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0, decls: 1, vars: 0, template: function LuzmoTableHead_Template(rf, ctx) { if (rf & 1) {
|
|
59
|
+
i0.ɵɵprojectionDef();
|
|
60
|
+
i0.ɵɵprojection(0);
|
|
61
|
+
} }, encapsulation: 2 });
|
|
62
|
+
}
|
|
63
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LuzmoTableHead, [{
|
|
64
|
+
type: Component,
|
|
65
|
+
args: [{
|
|
66
|
+
selector: 'luzmo-table-head',
|
|
67
|
+
exportAs: 'luzmoTableHead',
|
|
68
|
+
standalone: true,
|
|
69
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
70
|
+
template: '<ng-content />'
|
|
71
|
+
}]
|
|
72
|
+
}], () => [], { role: [{
|
|
73
|
+
type: Input,
|
|
74
|
+
args: [{ alias: 'role' }]
|
|
75
|
+
}], selected: [{
|
|
76
|
+
type: Input,
|
|
77
|
+
args: [{ alias: 'selected' }]
|
|
78
|
+
}] }); })();
|
|
79
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LuzmoTableHead, { className: "LuzmoTableHead", filePath: "components/table-head.ts", lineNumber: 17 }); })();
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
+
import '@luzmo/lucero/table';
|
|
3
|
+
import type { LuzmoTableRowDetails as LuzmoTableRowDetailsHostElement } from '@luzmo/lucero/table';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class LuzmoTableRowDetails 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(): LuzmoTableRowDetailsHostElement;
|
|
13
|
+
role?: string;
|
|
14
|
+
/** Whether the details row is shown. Set by the table from the owning row. */
|
|
15
|
+
open?: boolean;
|
|
16
|
+
/** The closing animation finished and the details row is hidden. */
|
|
17
|
+
readonly luzmoTableDetailsCollapsed: import("@angular/core").OutputEmitterRef<CustomEvent<unknown>>;
|
|
18
|
+
constructor();
|
|
19
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
20
|
+
/**
|
|
21
|
+
* Forward a wrapper @Input to the underlying host element via Renderer2 so
|
|
22
|
+
* the wrapper stays compatible with non-DOM Angular platforms (SSR, tests).
|
|
23
|
+
* Unlike a "skip undefined" guard, this lets consumers reset values back to
|
|
24
|
+
* undefined / null by clearing their bindings.
|
|
25
|
+
*/
|
|
26
|
+
private setHostProperty;
|
|
27
|
+
private bindEvents;
|
|
28
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LuzmoTableRowDetails, never>;
|
|
29
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LuzmoTableRowDetails, "luzmo-table-row-details", ["luzmoTableRowDetails"], { "role": { "alias": "role"; "required": false; }; "open": { "alias": "open"; "required": false; }; }, { "luzmoTableDetailsCollapsed": "luzmo-table-details-collapsed"; }, never, ["*"], true, never>;
|
|
30
|
+
}
|
|
31
|
+
/** The underlying custom element type for LuzmoTableRowDetails */
|
|
32
|
+
export type LuzmoTableRowDetailsElement = LuzmoTableRowDetailsHostElement;
|
|
@@ -0,0 +1,83 @@
|
|
|
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-row-details>
|
|
7
|
+
*
|
|
8
|
+
* @slot (default) - Details content. A nested `luzmo-table` needs its own accessible name.
|
|
9
|
+
*/
|
|
10
|
+
export class LuzmoTableRowDetails {
|
|
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
|
+
/** Whether the details row is shown. Set by the table from the owning row. */
|
|
22
|
+
open;
|
|
23
|
+
/** The closing animation finished and the details row is hidden. */
|
|
24
|
+
luzmoTableDetailsCollapsed = output({ alias: 'luzmo-table-details-collapsed' });
|
|
25
|
+
constructor() {
|
|
26
|
+
this.bindEvents();
|
|
27
|
+
this.destroyRef.onDestroy(() => {
|
|
28
|
+
for (const cleanup of this.listenerCleanup) {
|
|
29
|
+
cleanup();
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
ngOnChanges(changes) {
|
|
34
|
+
for (const key of Object.keys(changes)) {
|
|
35
|
+
switch (key) {
|
|
36
|
+
case 'role':
|
|
37
|
+
this.setHostProperty('role', changes['role'].currentValue);
|
|
38
|
+
break;
|
|
39
|
+
case 'open':
|
|
40
|
+
this.setHostProperty('open', changes['open'].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
|
+
this.listenerCleanup.push(this.renderer.listen(this.host, 'luzmo-table-details-collapsed', (event) => {
|
|
58
|
+
this.luzmoTableDetailsCollapsed.emit(event);
|
|
59
|
+
}));
|
|
60
|
+
}
|
|
61
|
+
static ɵfac = function LuzmoTableRowDetails_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LuzmoTableRowDetails)(); };
|
|
62
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LuzmoTableRowDetails, selectors: [["luzmo-table-row-details"]], inputs: { role: "role", open: "open" }, outputs: { luzmoTableDetailsCollapsed: "luzmo-table-details-collapsed" }, exportAs: ["luzmoTableRowDetails"], features: [i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0, decls: 1, vars: 0, template: function LuzmoTableRowDetails_Template(rf, ctx) { if (rf & 1) {
|
|
63
|
+
i0.ɵɵprojectionDef();
|
|
64
|
+
i0.ɵɵprojection(0);
|
|
65
|
+
} }, encapsulation: 2 });
|
|
66
|
+
}
|
|
67
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LuzmoTableRowDetails, [{
|
|
68
|
+
type: Component,
|
|
69
|
+
args: [{
|
|
70
|
+
selector: 'luzmo-table-row-details',
|
|
71
|
+
exportAs: 'luzmoTableRowDetails',
|
|
72
|
+
standalone: true,
|
|
73
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
74
|
+
template: '<ng-content />'
|
|
75
|
+
}]
|
|
76
|
+
}], () => [], { role: [{
|
|
77
|
+
type: Input,
|
|
78
|
+
args: [{ alias: 'role' }]
|
|
79
|
+
}], open: [{
|
|
80
|
+
type: Input,
|
|
81
|
+
args: [{ alias: 'open' }]
|
|
82
|
+
}], luzmoTableDetailsCollapsed: [{ type: i0.Output, args: ["luzmo-table-details-collapsed"] }] }); })();
|
|
83
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LuzmoTableRowDetails, { className: "LuzmoTableRowDetails", filePath: "components/table-row-details.ts", lineNumber: 17 }); })();
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
+
import '@luzmo/lucero/table';
|
|
3
|
+
import type { LuzmoTableRow as LuzmoTableRowHostElement } from '@luzmo/lucero/table';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class LuzmoTableRow 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(): LuzmoTableRowHostElement;
|
|
13
|
+
role?: string;
|
|
14
|
+
/** Selection value. Defaults to the row's position when empty. */
|
|
15
|
+
value?: string;
|
|
16
|
+
/** Whether the row is selected. Mirrored from the table's `selected`. */
|
|
17
|
+
selected?: boolean;
|
|
18
|
+
/** Whether the row can be selected. Set by the table while it `selects`. */
|
|
19
|
+
selectable?: boolean;
|
|
20
|
+
/** Whether the row's details are shown. */
|
|
21
|
+
expanded?: boolean;
|
|
22
|
+
/** Whether the row has a details sibling or data-mode details renderer. */
|
|
23
|
+
expandable?: boolean;
|
|
24
|
+
constructor();
|
|
25
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
26
|
+
/**
|
|
27
|
+
* Forward a wrapper @Input to the underlying host element via Renderer2 so
|
|
28
|
+
* the wrapper stays compatible with non-DOM Angular platforms (SSR, tests).
|
|
29
|
+
* Unlike a "skip undefined" guard, this lets consumers reset values back to
|
|
30
|
+
* undefined / null by clearing their bindings.
|
|
31
|
+
*/
|
|
32
|
+
private setHostProperty;
|
|
33
|
+
private bindEvents;
|
|
34
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LuzmoTableRow, never>;
|
|
35
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LuzmoTableRow, "luzmo-table-row", ["luzmoTableRow"], { "role": { "alias": "role"; "required": false; }; "value": { "alias": "value"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "selectable": { "alias": "selectable"; "required": false; }; "expanded": { "alias": "expanded"; "required": false; }; "expandable": { "alias": "expandable"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
36
|
+
}
|
|
37
|
+
/** The underlying custom element type for LuzmoTableRow */
|
|
38
|
+
export type LuzmoTableRowElement = LuzmoTableRowHostElement;
|