@igo2/common 20.2.0 → 21.0.0-next.10
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/fesm2022/igo2-common-action.mjs +62 -77
- package/fesm2022/igo2-common-action.mjs.map +1 -1
- package/fesm2022/igo2-common-backdrop.mjs +11 -20
- package/fesm2022/igo2-common-backdrop.mjs.map +1 -1
- package/fesm2022/igo2-common-badge.mjs +7 -8
- package/fesm2022/igo2-common-badge.mjs.map +1 -1
- package/fesm2022/igo2-common-clickout.mjs +11 -11
- package/fesm2022/igo2-common-clickout.mjs.map +1 -1
- package/fesm2022/igo2-common-clone.mjs +8 -9
- package/fesm2022/igo2-common-clone.mjs.map +1 -1
- package/fesm2022/igo2-common-collapsible.mjs +18 -27
- package/fesm2022/igo2-common-collapsible.mjs.map +1 -1
- package/fesm2022/igo2-common-color.mjs +10 -10
- package/fesm2022/igo2-common-color.mjs.map +1 -1
- package/fesm2022/igo2-common-confirm-dialog.mjs +12 -11
- package/fesm2022/igo2-common-confirm-dialog.mjs.map +1 -1
- package/fesm2022/igo2-common-context-menu.mjs +23 -27
- package/fesm2022/igo2-common-context-menu.mjs.map +1 -1
- package/fesm2022/igo2-common-custom-html.mjs +11 -12
- package/fesm2022/igo2-common-custom-html.mjs.map +1 -1
- package/fesm2022/igo2-common-datepicker.mjs +26 -20
- package/fesm2022/igo2-common-datepicker.mjs.map +1 -1
- package/fesm2022/igo2-common-dom.mjs +10 -8
- package/fesm2022/igo2-common-dom.mjs.map +1 -1
- package/fesm2022/igo2-common-drag-drop.mjs +83 -55
- package/fesm2022/igo2-common-drag-drop.mjs.map +1 -1
- package/fesm2022/igo2-common-dynamic-component.mjs +27 -21
- package/fesm2022/igo2-common-dynamic-component.mjs.map +1 -1
- package/fesm2022/igo2-common-entity.mjs +181 -148
- package/fesm2022/igo2-common-entity.mjs.map +1 -1
- package/fesm2022/igo2-common-flexible.mjs +26 -78
- package/fesm2022/igo2-common-flexible.mjs.map +1 -1
- package/fesm2022/igo2-common-form.mjs +426 -125
- package/fesm2022/igo2-common-form.mjs.map +1 -1
- package/fesm2022/igo2-common-home-button.mjs +7 -7
- package/fesm2022/igo2-common-icon.mjs +8 -8
- package/fesm2022/igo2-common-icon.mjs.map +1 -1
- package/fesm2022/igo2-common-image.mjs +14 -16
- package/fesm2022/igo2-common-image.mjs.map +1 -1
- package/fesm2022/igo2-common-interactive-tour.mjs +55 -32
- package/fesm2022/igo2-common-interactive-tour.mjs.map +1 -1
- package/fesm2022/igo2-common-json-dialog.mjs +11 -11
- package/fesm2022/igo2-common-json-dialog.mjs.map +1 -1
- package/fesm2022/igo2-common-keyvalue.mjs +11 -10
- package/fesm2022/igo2-common-keyvalue.mjs.map +1 -1
- package/fesm2022/igo2-common-list.mjs +28 -31
- package/fesm2022/igo2-common-list.mjs.map +1 -1
- package/fesm2022/igo2-common-panel.mjs +12 -13
- package/fesm2022/igo2-common-panel.mjs.map +1 -1
- package/fesm2022/igo2-common-resizable-bar.mjs +11 -17
- package/fesm2022/igo2-common-resizable-bar.mjs.map +1 -1
- package/fesm2022/igo2-common-select-value-dialog.mjs +23 -13
- package/fesm2022/igo2-common-select-value-dialog.mjs.map +1 -1
- package/fesm2022/igo2-common-sidenav.mjs +14 -19
- package/fesm2022/igo2-common-sidenav.mjs.map +1 -1
- package/fesm2022/igo2-common-spinner.mjs +14 -15
- package/fesm2022/igo2-common-spinner.mjs.map +1 -1
- package/fesm2022/igo2-common-stop-propagation.mjs +12 -14
- package/fesm2022/igo2-common-stop-propagation.mjs.map +1 -1
- package/fesm2022/igo2-common-table.mjs +62 -69
- package/fesm2022/igo2-common-table.mjs.map +1 -1
- package/fesm2022/igo2-common-timepicker.mjs +14 -15
- package/fesm2022/igo2-common-timepicker.mjs.map +1 -1
- package/fesm2022/igo2-common-tool.mjs +35 -32
- package/fesm2022/igo2-common-tool.mjs.map +1 -1
- package/fesm2022/igo2-common-widget.mjs +18 -18
- package/fesm2022/igo2-common-widget.mjs.map +1 -1
- package/fesm2022/igo2-common-workspace.mjs +28 -32
- package/fesm2022/igo2-common-workspace.mjs.map +1 -1
- package/package.json +60 -59
- package/{action/index.d.ts → types/igo2-common-action.d.ts} +2 -5
- package/{backdrop/index.d.ts → types/igo2-common-backdrop.d.ts} +2 -4
- package/{badge/index.d.ts → types/igo2-common-badge.d.ts} +4 -4
- package/{clickout/index.d.ts → types/igo2-common-clickout.d.ts} +1 -1
- package/{collapsible/index.d.ts → types/igo2-common-collapsible.d.ts} +2 -4
- package/{confirm-dialog/index.d.ts → types/igo2-common-confirm-dialog.d.ts} +1 -1
- package/{context-menu/index.d.ts → types/igo2-common-context-menu.d.ts} +2 -2
- package/{datepicker/index.d.ts → types/igo2-common-datepicker.d.ts} +9 -9
- package/{drag-drop/index.d.ts → types/igo2-common-drag-drop.d.ts} +15 -13
- package/{dynamic-component/index.d.ts → types/igo2-common-dynamic-component.d.ts} +3 -3
- package/{entity/index.d.ts → types/igo2-common-entity.d.ts} +64 -60
- package/types/igo2-common-flexible.d.ts +42 -0
- package/types/igo2-common-form.d.ts +568 -0
- package/{icon/index.d.ts → types/igo2-common-icon.d.ts} +1 -1
- package/{interactive-tour/index.d.ts → types/igo2-common-interactive-tour.d.ts} +6 -6
- package/{json-dialog/index.d.ts → types/igo2-common-json-dialog.d.ts} +4 -4
- package/{keyvalue/index.d.ts → types/igo2-common-keyvalue.d.ts} +4 -1
- package/{list/index.d.ts → types/igo2-common-list.d.ts} +7 -7
- package/{panel/index.d.ts → types/igo2-common-panel.d.ts} +1 -1
- package/{resizable-bar/index.d.ts → types/igo2-common-resizable-bar.d.ts} +4 -5
- package/{select-value-dialog/index.d.ts → types/igo2-common-select-value-dialog.d.ts} +2 -2
- package/{sidenav/index.d.ts → types/igo2-common-sidenav.d.ts} +2 -2
- package/{spinner/index.d.ts → types/igo2-common-spinner.d.ts} +1 -1
- package/{table/index.d.ts → types/igo2-common-table.d.ts} +17 -18
- package/{timepicker/index.d.ts → types/igo2-common-timepicker.d.ts} +3 -3
- package/{tool/index.d.ts → types/igo2-common-tool.d.ts} +7 -8
- package/{widget/index.d.ts → types/igo2-common-widget.d.ts} +7 -7
- package/{workspace/index.d.ts → types/igo2-common-workspace.d.ts} +12 -12
- package/flexible/index.d.ts +0 -56
- package/form/index.d.ts +0 -429
- /package/{clone/index.d.ts → types/igo2-common-clone.d.ts} +0 -0
- /package/{color/index.d.ts → types/igo2-common-color.d.ts} +0 -0
- /package/{custom-html/index.d.ts → types/igo2-common-custom-html.d.ts} +0 -0
- /package/{dom/index.d.ts → types/igo2-common-dom.d.ts} +0 -0
- /package/{environment/index.d.ts → types/igo2-common-environment.d.ts} +0 -0
- /package/{home-button/index.d.ts → types/igo2-common-home-button.d.ts} +0 -0
- /package/{image/index.d.ts → types/igo2-common-image.d.ts} +0 -0
- /package/{stop-propagation/index.d.ts → types/igo2-common-stop-propagation.d.ts} +0 -0
- /package/{index.d.ts → types/igo2-common.d.ts} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, output, viewChild, Component, NgModule } from '@angular/core';
|
|
2
|
+
import { input, output, viewChild, computed, effect, afterNextRender, Component, NgModule } from '@angular/core';
|
|
3
3
|
import { SelectionModel } from '@angular/cdk/collections';
|
|
4
4
|
import { NgClass } from '@angular/common';
|
|
5
5
|
import * as i6 from '@angular/material/button';
|
|
@@ -18,8 +18,8 @@ import * as i3 from '@angular/material/table';
|
|
|
18
18
|
import { MatTableModule } from '@angular/material/table';
|
|
19
19
|
import { IgoLanguageModule } from '@igo2/core/language';
|
|
20
20
|
import { ObjectUtils } from '@igo2/utils';
|
|
21
|
-
import { BehaviorSubject, merge, fromEvent } from 'rxjs';
|
|
22
|
-
import { map, debounceTime, distinctUntilChanged } from 'rxjs/operators';
|
|
21
|
+
import { BehaviorSubject, merge, EMPTY, fromEvent } from 'rxjs';
|
|
22
|
+
import { switchMap, map, debounceTime, distinctUntilChanged } from 'rxjs/operators';
|
|
23
23
|
import { DataSource } from '@angular/cdk/table';
|
|
24
24
|
import * as i8 from '@ngx-translate/core';
|
|
25
25
|
|
|
@@ -33,7 +33,6 @@ var TableActionColor;
|
|
|
33
33
|
class TableDataSource extends DataSource {
|
|
34
34
|
_database;
|
|
35
35
|
_model;
|
|
36
|
-
_sort;
|
|
37
36
|
get filter() {
|
|
38
37
|
return this._filterChange.value;
|
|
39
38
|
}
|
|
@@ -41,11 +40,14 @@ class TableDataSource extends DataSource {
|
|
|
41
40
|
this._filterChange.next(filter);
|
|
42
41
|
}
|
|
43
42
|
_filterChange = new BehaviorSubject('');
|
|
44
|
-
|
|
43
|
+
_sort$ = new BehaviorSubject(undefined);
|
|
44
|
+
set sort(sort) {
|
|
45
|
+
this._sort$.next(sort);
|
|
46
|
+
}
|
|
47
|
+
constructor(_database, _model) {
|
|
45
48
|
super();
|
|
46
49
|
this._database = _database;
|
|
47
50
|
this._model = _model;
|
|
48
|
-
this._sort = _sort;
|
|
49
51
|
}
|
|
50
52
|
// Connect function called by the table to retrieve one stream containing
|
|
51
53
|
// the data to render.
|
|
@@ -53,16 +55,8 @@ class TableDataSource extends DataSource {
|
|
|
53
55
|
if (!this._database) {
|
|
54
56
|
return merge([]);
|
|
55
57
|
}
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
this._filterChange,
|
|
59
|
-
this._sort.sortChange
|
|
60
|
-
];
|
|
61
|
-
return merge(...displayDataChanges).pipe(map(() => {
|
|
62
|
-
return this.getFilteredData(this._database.data);
|
|
63
|
-
}), map((data) => {
|
|
64
|
-
return this.getSortedData(data);
|
|
65
|
-
}));
|
|
58
|
+
const sortChange$ = this._sort$.pipe(switchMap((sort) => (sort ? sort.sortChange : EMPTY)));
|
|
59
|
+
return merge(this._database.dataChange, this._filterChange, sortChange$).pipe(map(() => this.getFilteredData(this._database.data)), map((data) => this.getSortedData(data)));
|
|
66
60
|
}
|
|
67
61
|
disconnect() {
|
|
68
62
|
// empty
|
|
@@ -81,61 +75,55 @@ class TableDataSource extends DataSource {
|
|
|
81
75
|
});
|
|
82
76
|
}
|
|
83
77
|
getSortedData(data) {
|
|
84
|
-
|
|
78
|
+
const sort = this._sort$.value;
|
|
79
|
+
if (!sort || !sort.active || sort.direction === '') {
|
|
85
80
|
return data;
|
|
86
81
|
}
|
|
87
82
|
return data.sort((a, b) => {
|
|
88
|
-
const propertyA = ObjectUtils.resolve(a,
|
|
89
|
-
const propertyB = ObjectUtils.resolve(b,
|
|
90
|
-
return ObjectUtils.naturalCompare(propertyB, propertyA,
|
|
83
|
+
const propertyA = ObjectUtils.resolve(a, sort.active);
|
|
84
|
+
const propertyB = ObjectUtils.resolve(b, sort.active);
|
|
85
|
+
return ObjectUtils.naturalCompare(propertyB, propertyA, sort.direction);
|
|
91
86
|
});
|
|
92
87
|
}
|
|
93
88
|
}
|
|
94
89
|
|
|
95
90
|
class TableComponent {
|
|
96
|
-
database = input(
|
|
97
|
-
model = input(
|
|
98
|
-
hasFilterInput = input(true, ...(ngDevMode ? [{ debugName: "hasFilterInput" }] : []));
|
|
99
|
-
displayedColumns;
|
|
100
|
-
dataSource;
|
|
91
|
+
database = input.required(...(ngDevMode ? [{ debugName: "database" }] : /* istanbul ignore next */ []));
|
|
92
|
+
model = input.required(...(ngDevMode ? [{ debugName: "model" }] : /* istanbul ignore next */ []));
|
|
93
|
+
hasFilterInput = input(true, ...(ngDevMode ? [{ debugName: "hasFilterInput" }] : /* istanbul ignore next */ []));
|
|
101
94
|
selection = new SelectionModel(true, []);
|
|
102
95
|
select = output();
|
|
103
|
-
filter = viewChild('filter', ...(ngDevMode ? [{ debugName: "filter" }] : []));
|
|
104
|
-
sort = viewChild(MatSort, ...(ngDevMode ? [{ debugName: "sort" }] : []));
|
|
105
|
-
|
|
96
|
+
filter = viewChild('filter', ...(ngDevMode ? [{ debugName: "filter" }] : /* istanbul ignore next */ []));
|
|
97
|
+
sort = viewChild(MatSort, ...(ngDevMode ? [{ debugName: "sort" }] : /* istanbul ignore next */ []));
|
|
98
|
+
displayedColumns = computed(() => {
|
|
106
99
|
const model = this.model();
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
if (model.selectionCheckbox) {
|
|
113
|
-
this.displayedColumns.unshift('selectionCheckbox');
|
|
114
|
-
}
|
|
115
|
-
if (model.actions && model.actions.length) {
|
|
116
|
-
this.displayedColumns.push('action');
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
this.selection.changed.subscribe((e) => this.select.emit(e));
|
|
120
|
-
}
|
|
121
|
-
ngAfterViewInit() {
|
|
122
|
-
const filter = this.filter();
|
|
123
|
-
if (filter) {
|
|
124
|
-
fromEvent(filter.nativeElement, 'keyup')
|
|
125
|
-
.pipe(debounceTime(150), distinctUntilChanged())
|
|
126
|
-
.subscribe(() => {
|
|
127
|
-
if (!this.dataSource) {
|
|
128
|
-
return;
|
|
129
|
-
}
|
|
130
|
-
this.dataSource.filter = this.filter().nativeElement.value;
|
|
131
|
-
});
|
|
100
|
+
const cols = model.columns
|
|
101
|
+
.filter((c) => c.displayed !== false)
|
|
102
|
+
.map((c) => c.name);
|
|
103
|
+
if (model.selectionCheckbox) {
|
|
104
|
+
cols.unshift('selectionCheckbox');
|
|
132
105
|
}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
if (change.database) {
|
|
136
|
-
this.dataSource = new TableDataSource(this.database(), this.model(), this.sort());
|
|
137
|
-
this.selection.clear();
|
|
106
|
+
if (model.actions?.length) {
|
|
107
|
+
cols.push('action');
|
|
138
108
|
}
|
|
109
|
+
return cols;
|
|
110
|
+
}, ...(ngDevMode ? [{ debugName: "displayedColumns" }] : /* istanbul ignore next */ []));
|
|
111
|
+
dataSource = computed(() => new TableDataSource(this.database(), this.model()), ...(ngDevMode ? [{ debugName: "dataSource" }] : /* istanbul ignore next */ []));
|
|
112
|
+
constructor() {
|
|
113
|
+
effect(() => {
|
|
114
|
+
this.dataSource().sort = this.sort();
|
|
115
|
+
});
|
|
116
|
+
this.selection.changed.subscribe((e) => this.select.emit(e));
|
|
117
|
+
afterNextRender(() => {
|
|
118
|
+
const filter = this.filter();
|
|
119
|
+
if (filter) {
|
|
120
|
+
fromEvent(filter.nativeElement, 'keyup')
|
|
121
|
+
.pipe(debounceTime(150), distinctUntilChanged())
|
|
122
|
+
.subscribe(() => {
|
|
123
|
+
this.dataSource().filter = filter.nativeElement.value;
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
});
|
|
139
127
|
}
|
|
140
128
|
getActionColor(colorId) {
|
|
141
129
|
return TableActionColor[colorId];
|
|
@@ -146,23 +134,28 @@ class TableComponent {
|
|
|
146
134
|
/** Whether the number of selected elements matches the total number of rows. */
|
|
147
135
|
isAllSelected() {
|
|
148
136
|
const numSelected = this.selection.selected.length;
|
|
149
|
-
const
|
|
137
|
+
const database = this.database();
|
|
138
|
+
const numRows = database ? database.data.length : 0;
|
|
150
139
|
return numSelected === numRows;
|
|
151
140
|
}
|
|
152
141
|
/** Selects all rows if they are not all selected; otherwise clear selection. */
|
|
153
142
|
masterToggle() {
|
|
143
|
+
const database = this.database();
|
|
144
|
+
if (!database) {
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
154
147
|
this.isAllSelected()
|
|
155
148
|
? this.selection.clear()
|
|
156
|
-
:
|
|
149
|
+
: database.data.forEach((row) => this.selection.select(row));
|
|
157
150
|
}
|
|
158
151
|
handleClickAction(event, action, row) {
|
|
159
152
|
event.stopPropagation();
|
|
160
153
|
action.click(row);
|
|
161
154
|
}
|
|
162
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
163
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
155
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: TableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
156
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.14", type: TableComponent, isStandalone: true, selector: "igo-table", inputs: { database: { classPropertyName: "database", publicName: "database", isSignal: true, isRequired: true, transformFunction: null }, model: { classPropertyName: "model", publicName: "model", isSignal: true, isRequired: true, transformFunction: null }, hasFilterInput: { classPropertyName: "hasFilterInput", publicName: "hasFilterInput", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { select: "select" }, viewQueries: [{ propertyName: "filter", first: true, predicate: ["filter"], descendants: true, isSignal: true }, { propertyName: "sort", first: true, predicate: MatSort, descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"table-box\">\n @if (hasFilterInput()) {\n <div class=\"table-header\">\n <mat-form-field floatPlaceholder=\"never\">\n <input\n matInput\n #filter\n [placeholder]=\"'igo.common.table.filter' | translate\"\n />\n </mat-form-field>\n </div>\n }\n\n <div class=\"table-container\">\n <table mat-table #table [dataSource]=\"dataSource()\" matSort>\n <!-- Checkbox Column -->\n <ng-container matColumnDef=\"selectionCheckbox\">\n <th mat-header-cell *matHeaderCellDef>\n <mat-checkbox\n (change)=\"$event ? masterToggle() : null\"\n [checked]=\"selection.hasValue() && isAllSelected()\"\n [indeterminate]=\"selection.hasValue() && !isAllSelected()\"\n />\n </th>\n <td mat-cell *matCellDef=\"let row\">\n <mat-checkbox\n (click)=\"$event.stopPropagation()\"\n (change)=\"$event ? selection.toggle(row) : null\"\n [checked]=\"selection.isSelected(row)\"\n />\n </td>\n </ng-container>\n\n @for (column of model().columns; track column) {\n <ng-container [matColumnDef]=\"column.name\">\n @if (column.sortable) {\n <th mat-header-cell *matHeaderCellDef mat-sort-header>\n {{ column.title }}\n </th>\n }\n @if (!column.sortable) {\n <th mat-header-cell *matHeaderCellDef>{{ column.title }}</th>\n }\n @if (!column.html) {\n <td\n mat-cell\n *matCellDef=\"let row\"\n class=\"mat-cell-text\"\n [ngClass]=\"model().cellClassFunc?.(row, column)\"\n >\n {{ getValue(row, column.name) }}\n </td>\n } @else {\n <td\n mat-cell\n *matCellDef=\"let row\"\n class=\"mat-cell-text\"\n [ngClass]=\"model().cellClassFunc?.(row, column)\"\n [innerHTML]=\"getValue(row, column.name)\"\n ></td>\n }\n </ng-container>\n }\n\n <!-- Action Column -->\n <ng-container matColumnDef=\"action\">\n <th mat-header-cell *matHeaderCellDef></th>\n <td mat-cell *matCellDef=\"let row\">\n @for (action of model().actions; track action) {\n <button\n mat-mini-fab\n [color]=\"getActionColor(action.color!)\"\n (click)=\"handleClickAction($event, action, row)\"\n >\n <mat-icon>{{ action.icon }}</mat-icon>\n </button>\n }\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns()\"></tr>\n <tr\n mat-row\n *matRowDef=\"let row; columns: displayedColumns()\"\n [ngClass]=\"model().rowClassFunc?.(row)\"\n (click)=\"selection.toggle(row)\"\n ></tr>\n </table>\n </div>\n</div>\n", styles: [":host{width:100%;height:100%;display:block}.table-container{display:flex;flex-direction:column;height:100%;overflow:auto;flex:1 1 auto}.table-box{height:100%;display:flex;flex-direction:column}.table-header{min-height:64px;max-width:500px;display:flex;flex:0 1 auto;align-items:baseline;padding:8px 24px 0;font-size:20px;justify-content:space-between}tr[mat-header-row],tr[mat-row]{height:60px}.mat-cell-text{overflow:hidden;word-wrap:break-word}td[mat-cell]{padding-right:15px}th.mat-mdc-header-cell{padding-right:5px}button{margin-right:10px}\n"], dependencies: [{ kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i3.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i3.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i3.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i3.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i3.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i3.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i3.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i3.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i3.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i3.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "ngmodule", type: MatSortModule }, { kind: "directive", type: i4.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i4.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i5.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i6.MatMiniFabButton, selector: "button[mat-mini-fab], a[mat-mini-fab], button[matMiniFab], a[matMiniFab]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: i8.TranslatePipe, name: "translate" }] });
|
|
164
157
|
}
|
|
165
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
158
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: TableComponent, decorators: [{
|
|
166
159
|
type: Component,
|
|
167
160
|
args: [{ selector: 'igo-table', imports: [
|
|
168
161
|
MatFormFieldModule,
|
|
@@ -174,8 +167,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
|
|
|
174
167
|
MatButtonModule,
|
|
175
168
|
MatIconModule,
|
|
176
169
|
IgoLanguageModule
|
|
177
|
-
], template: "<div class=\"table-box\">\n @if (hasFilterInput()) {\n <div class=\"table-header\">\n <mat-form-field floatPlaceholder=\"never\">\n <input\n matInput\n #filter\n [placeholder]=\"'igo.common.table.filter' | translate\"\n />\n </mat-form-field>\n </div>\n }\n\n <div class=\"table-container\">\n <table mat-table #table [dataSource]=\"dataSource\" matSort>\n <!-- Checkbox Column -->\n <ng-container matColumnDef=\"selectionCheckbox\">\n <th mat-header-cell *matHeaderCellDef>\n <mat-checkbox\n (change)=\"$event ? masterToggle() : null\"\n [checked]=\"selection.hasValue() && isAllSelected()\"\n [indeterminate]=\"selection.hasValue() && !isAllSelected()\"\n />\n </th>\n <td mat-cell *matCellDef=\"let row\">\n <mat-checkbox\n (click)=\"$event.stopPropagation()\"\n (change)=\"$event ? selection.toggle(row) : null\"\n [checked]=\"selection.isSelected(row)\"\n />\n </td>\n </ng-container>\n\n @for (column of model().columns; track column) {\n <ng-container [matColumnDef]=\"column.name\">\n @if (column.sortable) {\n <th mat-header-cell *matHeaderCellDef mat-sort-header>\n {{ column.title }}\n </th>\n }\n @if (!column.sortable) {\n <th mat-header-cell *matHeaderCellDef>{{ column.title }}</th>\n }\n @if (!column.html) {\n <td\n mat-cell\n *matCellDef=\"let row\"\n class=\"mat-cell-text\"\n [ngClass]=\"
|
|
178
|
-
}], propDecorators: { database: [{ type: i0.Input, args: [{ isSignal: true, alias: "database", required:
|
|
170
|
+
], template: "<div class=\"table-box\">\n @if (hasFilterInput()) {\n <div class=\"table-header\">\n <mat-form-field floatPlaceholder=\"never\">\n <input\n matInput\n #filter\n [placeholder]=\"'igo.common.table.filter' | translate\"\n />\n </mat-form-field>\n </div>\n }\n\n <div class=\"table-container\">\n <table mat-table #table [dataSource]=\"dataSource()\" matSort>\n <!-- Checkbox Column -->\n <ng-container matColumnDef=\"selectionCheckbox\">\n <th mat-header-cell *matHeaderCellDef>\n <mat-checkbox\n (change)=\"$event ? masterToggle() : null\"\n [checked]=\"selection.hasValue() && isAllSelected()\"\n [indeterminate]=\"selection.hasValue() && !isAllSelected()\"\n />\n </th>\n <td mat-cell *matCellDef=\"let row\">\n <mat-checkbox\n (click)=\"$event.stopPropagation()\"\n (change)=\"$event ? selection.toggle(row) : null\"\n [checked]=\"selection.isSelected(row)\"\n />\n </td>\n </ng-container>\n\n @for (column of model().columns; track column) {\n <ng-container [matColumnDef]=\"column.name\">\n @if (column.sortable) {\n <th mat-header-cell *matHeaderCellDef mat-sort-header>\n {{ column.title }}\n </th>\n }\n @if (!column.sortable) {\n <th mat-header-cell *matHeaderCellDef>{{ column.title }}</th>\n }\n @if (!column.html) {\n <td\n mat-cell\n *matCellDef=\"let row\"\n class=\"mat-cell-text\"\n [ngClass]=\"model().cellClassFunc?.(row, column)\"\n >\n {{ getValue(row, column.name) }}\n </td>\n } @else {\n <td\n mat-cell\n *matCellDef=\"let row\"\n class=\"mat-cell-text\"\n [ngClass]=\"model().cellClassFunc?.(row, column)\"\n [innerHTML]=\"getValue(row, column.name)\"\n ></td>\n }\n </ng-container>\n }\n\n <!-- Action Column -->\n <ng-container matColumnDef=\"action\">\n <th mat-header-cell *matHeaderCellDef></th>\n <td mat-cell *matCellDef=\"let row\">\n @for (action of model().actions; track action) {\n <button\n mat-mini-fab\n [color]=\"getActionColor(action.color!)\"\n (click)=\"handleClickAction($event, action, row)\"\n >\n <mat-icon>{{ action.icon }}</mat-icon>\n </button>\n }\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns()\"></tr>\n <tr\n mat-row\n *matRowDef=\"let row; columns: displayedColumns()\"\n [ngClass]=\"model().rowClassFunc?.(row)\"\n (click)=\"selection.toggle(row)\"\n ></tr>\n </table>\n </div>\n</div>\n", styles: [":host{width:100%;height:100%;display:block}.table-container{display:flex;flex-direction:column;height:100%;overflow:auto;flex:1 1 auto}.table-box{height:100%;display:flex;flex-direction:column}.table-header{min-height:64px;max-width:500px;display:flex;flex:0 1 auto;align-items:baseline;padding:8px 24px 0;font-size:20px;justify-content:space-between}tr[mat-header-row],tr[mat-row]{height:60px}.mat-cell-text{overflow:hidden;word-wrap:break-word}td[mat-cell]{padding-right:15px}th.mat-mdc-header-cell{padding-right:5px}button{margin-right:10px}\n"] }]
|
|
171
|
+
}], ctorParameters: () => [], propDecorators: { database: [{ type: i0.Input, args: [{ isSignal: true, alias: "database", required: true }] }], model: [{ type: i0.Input, args: [{ isSignal: true, alias: "model", required: true }] }], hasFilterInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasFilterInput", required: false }] }], select: [{ type: i0.Output, args: ["select"] }], filter: [{ type: i0.ViewChild, args: ['filter', { isSignal: true }] }], sort: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatSort), { isSignal: true }] }] } });
|
|
179
172
|
|
|
180
173
|
/**
|
|
181
174
|
* @deprecated import the TableComponent directly
|
|
@@ -187,11 +180,11 @@ class IgoTableModule {
|
|
|
187
180
|
providers: []
|
|
188
181
|
};
|
|
189
182
|
}
|
|
190
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
191
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
192
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
183
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: IgoTableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
184
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.14", ngImport: i0, type: IgoTableModule, imports: [TableComponent], exports: [TableComponent] });
|
|
185
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: IgoTableModule, imports: [TableComponent] });
|
|
193
186
|
}
|
|
194
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
187
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: IgoTableModule, decorators: [{
|
|
195
188
|
type: NgModule,
|
|
196
189
|
args: [{
|
|
197
190
|
imports: [TableComponent],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"igo2-common-table.mjs","sources":["../../../packages/common/table/src/table-action-color.enum.ts","../../../packages/common/table/src/table-datasource.ts","../../../packages/common/table/src/table.component.ts","../../../packages/common/table/src/table.component.html","../../../packages/common/table/src/table.module.ts","../../../packages/common/table/src/table-database.ts","../../../packages/common/table/src/igo2-common-table.ts"],"sourcesContent":["export enum TableActionColor {\n primary,\n accent,\n warn\n}\n","import { DataSource } from '@angular/cdk/table';\nimport { MatSort } from '@angular/material/sort';\n\nimport { ObjectUtils } from '@igo2/utils';\n\nimport { BehaviorSubject, Observable, merge } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport { TableDatabase } from './table-database';\nimport { TableModel } from './table-model.interface';\n\nexport class TableDataSource extends DataSource<any> {\n get filter(): string {\n return this._filterChange.value;\n }\n set filter(filter: string) {\n this._filterChange.next(filter);\n }\n private _filterChange = new BehaviorSubject('');\n\n constructor(\n private _database: TableDatabase,\n private _model: TableModel,\n private _sort: MatSort\n ) {\n super();\n }\n\n // Connect function called by the table to retrieve one stream containing\n // the data to render.\n connect(): Observable<any[]> {\n if (!this._database) {\n return merge([]);\n }\n const displayDataChanges = [\n this._database.dataChange,\n this._filterChange,\n this._sort.sortChange\n ];\n\n return merge(...displayDataChanges).pipe(\n map(() => {\n return this.getFilteredData(this._database.data);\n }),\n map((data) => {\n return this.getSortedData(data);\n })\n );\n }\n\n disconnect() {\n // empty\n }\n\n getFilteredData(data): any[] {\n if (!this.filter) {\n return data;\n }\n return data.slice().filter((item: any) => {\n const searchStr: string = this._model.columns\n .filter((c) => c.filterable)\n .map((c) => ObjectUtils.resolve(item, c.name))\n .join(' ')\n .toLowerCase();\n\n return searchStr.indexOf(this.filter.toLowerCase()) !== -1;\n });\n }\n\n getSortedData(data): any[] {\n if (!this._sort.active || this._sort.direction === '') {\n return data;\n }\n\n return data.sort((a, b) => {\n const propertyA: number | string = ObjectUtils.resolve(\n a,\n this._sort.active\n );\n const propertyB: number | string = ObjectUtils.resolve(\n b,\n this._sort.active\n );\n\n return ObjectUtils.naturalCompare(\n propertyB,\n propertyA,\n this._sort.direction\n );\n });\n }\n}\n","import { SelectionModel } from '@angular/cdk/collections';\nimport { NgClass } from '@angular/common';\nimport {\n AfterViewInit,\n Component,\n ElementRef,\n OnChanges,\n OnInit,\n input,\n output,\n viewChild\n} from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatSort, MatSortModule } from '@angular/material/sort';\nimport { MatTableModule } from '@angular/material/table';\n\nimport { IgoLanguageModule } from '@igo2/core/language';\nimport { ObjectUtils } from '@igo2/utils';\n\nimport { fromEvent } from 'rxjs';\nimport { debounceTime, distinctUntilChanged } from 'rxjs/operators';\n\nimport { TableActionColor } from './table-action-color.enum';\nimport { TableDatabase } from './table-database';\nimport { TableDataSource } from './table-datasource';\nimport { TableModel } from './table-model.interface';\n\n@Component({\n selector: 'igo-table',\n templateUrl: './table.component.html',\n styleUrls: ['./table.component.scss'],\n imports: [\n MatFormFieldModule,\n MatInputModule,\n MatTableModule,\n MatSortModule,\n MatCheckboxModule,\n NgClass,\n MatButtonModule,\n MatIconModule,\n IgoLanguageModule\n ]\n})\nexport class TableComponent implements OnChanges, OnInit, AfterViewInit {\n readonly database = input<TableDatabase>(undefined);\n readonly model = input<TableModel>(undefined);\n readonly hasFilterInput = input(true);\n\n public displayedColumns;\n public dataSource: TableDataSource | null;\n public selection = new SelectionModel<any>(true, []);\n\n readonly select = output<{\n added: any[];\n removed: any[];\n source: SelectionModel<any>;\n }>();\n\n readonly filter = viewChild<ElementRef>('filter');\n readonly sort = viewChild(MatSort);\n\n ngOnInit() {\n const model = this.model();\n this.dataSource = new TableDataSource(this.database(), model, this.sort());\n\n if (model) {\n this.displayedColumns = model.columns\n .filter((c) => c.displayed !== false)\n .map((c) => c.name);\n\n if (model.selectionCheckbox) {\n this.displayedColumns.unshift('selectionCheckbox');\n }\n if (model.actions && model.actions.length) {\n this.displayedColumns.push('action');\n }\n }\n\n this.selection.changed.subscribe((e) => this.select.emit(e));\n }\n\n ngAfterViewInit() {\n const filter = this.filter();\n if (filter) {\n fromEvent(filter.nativeElement, 'keyup')\n .pipe(debounceTime(150), distinctUntilChanged())\n .subscribe(() => {\n if (!this.dataSource) {\n return;\n }\n this.dataSource.filter = this.filter().nativeElement.value;\n });\n }\n }\n\n ngOnChanges(change) {\n if (change.database) {\n this.dataSource = new TableDataSource(\n this.database(),\n this.model(),\n this.sort()\n );\n this.selection.clear();\n }\n }\n\n getActionColor(colorId: number): string {\n return TableActionColor[colorId];\n }\n\n getValue(row, key) {\n return ObjectUtils.resolve(row, key);\n }\n\n /** Whether the number of selected elements matches the total number of rows. */\n isAllSelected() {\n const numSelected = this.selection.selected.length;\n const numRows = this.database().data.length;\n return numSelected === numRows;\n }\n\n /** Selects all rows if they are not all selected; otherwise clear selection. */\n masterToggle() {\n this.isAllSelected()\n ? this.selection.clear()\n : this.database().data.forEach((row) => this.selection.select(row));\n }\n\n handleClickAction(event, action, row) {\n event.stopPropagation();\n action.click(row);\n }\n}\n","<div class=\"table-box\">\n @if (hasFilterInput()) {\n <div class=\"table-header\">\n <mat-form-field floatPlaceholder=\"never\">\n <input\n matInput\n #filter\n [placeholder]=\"'igo.common.table.filter' | translate\"\n />\n </mat-form-field>\n </div>\n }\n\n <div class=\"table-container\">\n <table mat-table #table [dataSource]=\"dataSource\" matSort>\n <!-- Checkbox Column -->\n <ng-container matColumnDef=\"selectionCheckbox\">\n <th mat-header-cell *matHeaderCellDef>\n <mat-checkbox\n (change)=\"$event ? masterToggle() : null\"\n [checked]=\"selection.hasValue() && isAllSelected()\"\n [indeterminate]=\"selection.hasValue() && !isAllSelected()\"\n />\n </th>\n <td mat-cell *matCellDef=\"let row\">\n <mat-checkbox\n (click)=\"$event.stopPropagation()\"\n (change)=\"$event ? selection.toggle(row) : null\"\n [checked]=\"selection.isSelected(row)\"\n />\n </td>\n </ng-container>\n\n @for (column of model().columns; track column) {\n <ng-container [matColumnDef]=\"column.name\">\n @if (column.sortable) {\n <th mat-header-cell *matHeaderCellDef mat-sort-header>\n {{ column.title }}\n </th>\n }\n @if (!column.sortable) {\n <th mat-header-cell *matHeaderCellDef>{{ column.title }}</th>\n }\n @if (!column.html) {\n <td\n mat-cell\n *matCellDef=\"let row\"\n class=\"mat-cell-text\"\n [ngClass]=\"\n model().cellClassFunc ? model().cellClassFunc(row, column) : {}\n \"\n >\n {{ getValue(row, column.name) }}\n </td>\n } @else {\n <td\n mat-cell\n *matCellDef=\"let row\"\n class=\"mat-cell-text\"\n [ngClass]=\"\n model().cellClassFunc ? model().cellClassFunc(row, column) : {}\n \"\n [innerHTML]=\"getValue(row, column.name)\"\n ></td>\n }\n </ng-container>\n }\n\n <!-- Action Column -->\n <ng-container matColumnDef=\"action\">\n <th mat-header-cell *matHeaderCellDef></th>\n <td mat-cell *matCellDef=\"let row\">\n @for (action of model().actions; track action) {\n <button\n mat-mini-fab\n [color]=\"getActionColor(action.color)\"\n (click)=\"handleClickAction($event, action, row)\"\n >\n <mat-icon>{{ action.icon }}</mat-icon>\n </button>\n }\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr\n mat-row\n *matRowDef=\"let row; columns: displayedColumns\"\n [ngClass]=\"model().rowClassFunc ? model().rowClassFunc(row) : {}\"\n (click)=\"selection.toggle(row)\"\n ></tr>\n </table>\n </div>\n</div>\n","import { ModuleWithProviders, NgModule } from '@angular/core';\n\nimport { TableComponent } from './table.component';\n\n/**\n * @deprecated import the TableComponent directly\n */\n@NgModule({\n imports: [TableComponent],\n exports: [TableComponent]\n})\nexport class IgoTableModule {\n static forRoot(): ModuleWithProviders<IgoTableModule> {\n return {\n ngModule: IgoTableModule,\n providers: []\n };\n }\n}\n","import { BehaviorSubject } from 'rxjs';\n\nexport class TableDatabase {\n /** Stream that emits whenever the data has been modified. */\n dataChange: BehaviorSubject<any[]> = new BehaviorSubject<any[]>([]);\n get data(): any[] {\n return this.dataChange.value;\n }\n\n constructor(data?) {\n if (data) {\n this.dataChange.next(data);\n }\n }\n\n set(data) {\n this.dataChange.next(data);\n }\n\n add(item) {\n const copiedData = this.data.slice();\n copiedData.push(item);\n this.set(copiedData);\n }\n\n remove(item) {\n const copiedData = this.data.slice();\n const index = copiedData.indexOf(item);\n copiedData.splice(index, 1);\n this.set(copiedData);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;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,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC;IACtB;AAEA,IAAA,MAAM,CAAC,IAAI,EAAA;QACT,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;QACpC,MAAM,KAAK,GAAG,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC;AACtC,QAAA,UAAU,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;AAC3B,QAAA,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC;IACtB;AACD;;AC/BD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"igo2-common-table.mjs","sources":["../../../packages/common/table/src/table-action-color.enum.ts","../../../packages/common/table/src/table-datasource.ts","../../../packages/common/table/src/table.component.ts","../../../packages/common/table/src/table.component.html","../../../packages/common/table/src/table.module.ts","../../../packages/common/table/src/table-database.ts","../../../packages/common/table/src/igo2-common-table.ts"],"sourcesContent":["export enum TableActionColor {\n primary,\n accent,\n warn\n}\n","import { DataSource } from '@angular/cdk/table';\nimport { MatSort } from '@angular/material/sort';\n\nimport { ObjectUtils } from '@igo2/utils';\n\nimport { BehaviorSubject, EMPTY, Observable, merge } from 'rxjs';\nimport { map, switchMap } from 'rxjs/operators';\n\nimport { TableDatabase } from './table-database';\nimport { TableModel } from './table-model.interface';\n\nexport class TableDataSource extends DataSource<any> {\n get filter(): string {\n return this._filterChange.value;\n }\n set filter(filter: string) {\n this._filterChange.next(filter);\n }\n private _filterChange = new BehaviorSubject('');\n\n private _sort$ = new BehaviorSubject<MatSort | undefined>(undefined);\n\n set sort(sort: MatSort | undefined) {\n this._sort$.next(sort);\n }\n\n constructor(\n private _database: TableDatabase,\n private _model: TableModel\n ) {\n super();\n }\n\n // Connect function called by the table to retrieve one stream containing\n // the data to render.\n connect(): Observable<any[]> {\n if (!this._database) {\n return merge([]);\n }\n const sortChange$ = this._sort$.pipe(\n switchMap((sort) => (sort ? sort.sortChange : EMPTY))\n );\n\n return merge(\n this._database.dataChange,\n this._filterChange,\n sortChange$\n ).pipe(\n map(() => this.getFilteredData(this._database.data)),\n map((data) => this.getSortedData(data))\n );\n }\n\n disconnect() {\n // empty\n }\n\n getFilteredData(data: any[]): any[] {\n if (!this.filter) {\n return data;\n }\n return data.slice().filter((item: any) => {\n const searchStr: string = this._model.columns\n .filter((c) => c.filterable)\n .map((c) => ObjectUtils.resolve(item, c.name))\n .join(' ')\n .toLowerCase();\n\n return searchStr.indexOf(this.filter.toLowerCase()) !== -1;\n });\n }\n\n getSortedData(data: any[]): any[] {\n const sort = this._sort$.value;\n if (!sort || !sort.active || sort.direction === '') {\n return data;\n }\n\n return data.sort((a, b) => {\n const propertyA: number | string = ObjectUtils.resolve(a, sort.active) as\n | number\n | string;\n const propertyB: number | string = ObjectUtils.resolve(b, sort.active) as\n | number\n | string;\n\n return ObjectUtils.naturalCompare(propertyB, propertyA, sort.direction);\n });\n }\n}\n","import { SelectionModel } from '@angular/cdk/collections';\nimport { NgClass } from '@angular/common';\nimport {\n Component,\n ElementRef,\n afterNextRender,\n computed,\n effect,\n input,\n output,\n viewChild\n} from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatSort, MatSortModule } from '@angular/material/sort';\nimport { MatTableModule } from '@angular/material/table';\n\nimport { IgoLanguageModule } from '@igo2/core/language';\nimport { ObjectUtils } from '@igo2/utils';\n\nimport { fromEvent } from 'rxjs';\nimport { debounceTime, distinctUntilChanged } from 'rxjs/operators';\n\nimport { TableActionColor } from './table-action-color.enum';\nimport { TableDatabase } from './table-database';\nimport { TableDataSource } from './table-datasource';\nimport { TableModel } from './table-model.interface';\n\n@Component({\n selector: 'igo-table',\n templateUrl: './table.component.html',\n styleUrls: ['./table.component.scss'],\n imports: [\n MatFormFieldModule,\n MatInputModule,\n MatTableModule,\n MatSortModule,\n MatCheckboxModule,\n NgClass,\n MatButtonModule,\n MatIconModule,\n IgoLanguageModule\n ]\n})\nexport class TableComponent {\n readonly database = input.required<TableDatabase>();\n readonly model = input.required<TableModel>();\n readonly hasFilterInput = input(true);\n\n public selection = new SelectionModel<any>(true, []);\n\n readonly select = output<{\n added: any[];\n removed: any[];\n source: SelectionModel<any>;\n }>();\n\n readonly filter = viewChild<ElementRef>('filter');\n readonly sort = viewChild(MatSort);\n\n readonly displayedColumns = computed(() => {\n const model = this.model();\n const cols = model.columns\n .filter((c) => c.displayed !== false)\n .map((c) => c.name);\n if (model.selectionCheckbox) {\n cols.unshift('selectionCheckbox');\n }\n if (model.actions?.length) {\n cols.push('action');\n }\n return cols;\n });\n\n readonly dataSource = computed(\n () => new TableDataSource(this.database(), this.model())\n );\n\n constructor() {\n effect(() => {\n this.dataSource().sort = this.sort();\n });\n\n this.selection.changed.subscribe((e) => this.select.emit(e));\n\n afterNextRender(() => {\n const filter = this.filter();\n if (filter) {\n fromEvent(filter.nativeElement, 'keyup')\n .pipe(debounceTime(150), distinctUntilChanged())\n .subscribe(() => {\n this.dataSource().filter = filter.nativeElement.value;\n });\n }\n });\n }\n\n getActionColor(colorId: number): string {\n return TableActionColor[colorId];\n }\n\n getValue(row: any, key: string): any {\n return ObjectUtils.resolve(row, key);\n }\n\n /** Whether the number of selected elements matches the total number of rows. */\n isAllSelected(): boolean {\n const numSelected = this.selection.selected.length;\n const database = this.database();\n const numRows = database ? database.data.length : 0;\n return numSelected === numRows;\n }\n\n /** Selects all rows if they are not all selected; otherwise clear selection. */\n masterToggle() {\n const database = this.database();\n if (!database) {\n return;\n }\n this.isAllSelected()\n ? this.selection.clear()\n : database.data.forEach((row) => this.selection.select(row));\n }\n\n handleClickAction(event: MouseEvent, action: any, row: any) {\n event.stopPropagation();\n action.click(row);\n }\n}\n","<div class=\"table-box\">\n @if (hasFilterInput()) {\n <div class=\"table-header\">\n <mat-form-field floatPlaceholder=\"never\">\n <input\n matInput\n #filter\n [placeholder]=\"'igo.common.table.filter' | translate\"\n />\n </mat-form-field>\n </div>\n }\n\n <div class=\"table-container\">\n <table mat-table #table [dataSource]=\"dataSource()\" matSort>\n <!-- Checkbox Column -->\n <ng-container matColumnDef=\"selectionCheckbox\">\n <th mat-header-cell *matHeaderCellDef>\n <mat-checkbox\n (change)=\"$event ? masterToggle() : null\"\n [checked]=\"selection.hasValue() && isAllSelected()\"\n [indeterminate]=\"selection.hasValue() && !isAllSelected()\"\n />\n </th>\n <td mat-cell *matCellDef=\"let row\">\n <mat-checkbox\n (click)=\"$event.stopPropagation()\"\n (change)=\"$event ? selection.toggle(row) : null\"\n [checked]=\"selection.isSelected(row)\"\n />\n </td>\n </ng-container>\n\n @for (column of model().columns; track column) {\n <ng-container [matColumnDef]=\"column.name\">\n @if (column.sortable) {\n <th mat-header-cell *matHeaderCellDef mat-sort-header>\n {{ column.title }}\n </th>\n }\n @if (!column.sortable) {\n <th mat-header-cell *matHeaderCellDef>{{ column.title }}</th>\n }\n @if (!column.html) {\n <td\n mat-cell\n *matCellDef=\"let row\"\n class=\"mat-cell-text\"\n [ngClass]=\"model().cellClassFunc?.(row, column)\"\n >\n {{ getValue(row, column.name) }}\n </td>\n } @else {\n <td\n mat-cell\n *matCellDef=\"let row\"\n class=\"mat-cell-text\"\n [ngClass]=\"model().cellClassFunc?.(row, column)\"\n [innerHTML]=\"getValue(row, column.name)\"\n ></td>\n }\n </ng-container>\n }\n\n <!-- Action Column -->\n <ng-container matColumnDef=\"action\">\n <th mat-header-cell *matHeaderCellDef></th>\n <td mat-cell *matCellDef=\"let row\">\n @for (action of model().actions; track action) {\n <button\n mat-mini-fab\n [color]=\"getActionColor(action.color!)\"\n (click)=\"handleClickAction($event, action, row)\"\n >\n <mat-icon>{{ action.icon }}</mat-icon>\n </button>\n }\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns()\"></tr>\n <tr\n mat-row\n *matRowDef=\"let row; columns: displayedColumns()\"\n [ngClass]=\"model().rowClassFunc?.(row)\"\n (click)=\"selection.toggle(row)\"\n ></tr>\n </table>\n </div>\n</div>\n","import { ModuleWithProviders, NgModule } from '@angular/core';\n\nimport { TableComponent } from './table.component';\n\n/**\n * @deprecated import the TableComponent directly\n */\n@NgModule({\n imports: [TableComponent],\n exports: [TableComponent]\n})\nexport class IgoTableModule {\n static forRoot(): ModuleWithProviders<IgoTableModule> {\n return {\n ngModule: IgoTableModule,\n providers: []\n };\n }\n}\n","import { BehaviorSubject } from 'rxjs';\n\nexport class TableDatabase {\n /** Stream that emits whenever the data has been modified. */\n dataChange: BehaviorSubject<any[]> = new BehaviorSubject<any[]>([]);\n get data(): any[] {\n return this.dataChange.value;\n }\n\n constructor(data?: any[]) {\n if (data) {\n this.dataChange.next(data);\n }\n }\n\n set(data: any[]) {\n this.dataChange.next(data);\n }\n\n add(item: any) {\n const copiedData = this.data.slice();\n copiedData.push(item);\n this.set(copiedData);\n }\n\n remove(item: any) {\n const copiedData = this.data.slice();\n const index = copiedData.indexOf(item);\n copiedData.splice(index, 1);\n this.set(copiedData);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;IAAY;AAAZ,CAAA,UAAY,gBAAgB,EAAA;AAC1B,IAAA,gBAAA,CAAA,gBAAA,CAAA,SAAA,CAAA,GAAA,CAAA,CAAA,GAAA,SAAO;AACP,IAAA,gBAAA,CAAA,gBAAA,CAAA,QAAA,CAAA,GAAA,CAAA,CAAA,GAAA,QAAM;AACN,IAAA,gBAAA,CAAA,gBAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAI;AACN,CAAC,EAJW,gBAAgB,KAAhB,gBAAgB,GAAA,EAAA,CAAA,CAAA;;ACWtB,MAAO,eAAgB,SAAQ,UAAe,CAAA;AAgBxC,IAAA,SAAA;AACA,IAAA,MAAA;AAhBV,IAAA,IAAI,MAAM,GAAA;AACR,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from 'rxjs/operators';
|
|
12
12
|
|
|
13
13
|
class TimepickerComponent {
|
|
14
|
-
value = input(
|
|
15
|
-
hourInputLabel = input('Hour', ...(ngDevMode ? [{ debugName: "hourInputLabel" }] : []));
|
|
16
|
-
minuteInputLabel = input('Minute', ...(ngDevMode ? [{ debugName: "minuteInputLabel" }] : []));
|
|
17
|
-
minHour = input(
|
|
18
|
-
maxHour = input(
|
|
14
|
+
value = input(...(ngDevMode ? [undefined, { debugName: "value" }] : /* istanbul ignore next */ []));
|
|
15
|
+
hourInputLabel = input('Hour', ...(ngDevMode ? [{ debugName: "hourInputLabel" }] : /* istanbul ignore next */ []));
|
|
16
|
+
minuteInputLabel = input('Minute', ...(ngDevMode ? [{ debugName: "minuteInputLabel" }] : /* istanbul ignore next */ []));
|
|
17
|
+
minHour = input(...(ngDevMode ? [undefined, { debugName: "minHour" }] : /* istanbul ignore next */ []));
|
|
18
|
+
maxHour = input(...(ngDevMode ? [undefined, { debugName: "maxHour" }] : /* istanbul ignore next */ []));
|
|
19
19
|
set disabled(value) {
|
|
20
20
|
this._disabled = value;
|
|
21
21
|
this.setDisabledState();
|
|
@@ -25,7 +25,7 @@ class TimepickerComponent {
|
|
|
25
25
|
}
|
|
26
26
|
_disabled = false;
|
|
27
27
|
/** interval in minutes*/
|
|
28
|
-
interval = input(1, ...(ngDevMode ? [{ debugName: "interval" }] : []));
|
|
28
|
+
interval = input(1, ...(ngDevMode ? [{ debugName: "interval" }] : /* istanbul ignore next */ []));
|
|
29
29
|
valueChange = output();
|
|
30
30
|
hourFormControl;
|
|
31
31
|
minuteFormControl;
|
|
@@ -52,14 +52,13 @@ class TimepickerComponent {
|
|
|
52
52
|
const date = resolveDate(this.value() ?? new Date());
|
|
53
53
|
const hours = date.getHours();
|
|
54
54
|
const minutes = date.getMinutes();
|
|
55
|
-
this.hourFormControl = new FormControl({
|
|
56
|
-
|
|
57
|
-
disabled: this.disabled || isTimeFrame(this.value())
|
|
55
|
+
this.hourFormControl = new FormControl(hours, {
|
|
56
|
+
nonNullable: true
|
|
58
57
|
});
|
|
59
|
-
this.minuteFormControl = new FormControl({
|
|
60
|
-
|
|
61
|
-
disabled: this.disabled || isTimeFrame(this.value())
|
|
58
|
+
this.minuteFormControl = new FormControl(minutes, {
|
|
59
|
+
nonNullable: true
|
|
62
60
|
});
|
|
61
|
+
this.setDisabledState();
|
|
63
62
|
combineLatest([
|
|
64
63
|
this.hourFormControl.valueChanges.pipe(startWith(hours)),
|
|
65
64
|
this.minuteFormControl.valueChanges.pipe(startWith(minutes))
|
|
@@ -82,10 +81,10 @@ class TimepickerComponent {
|
|
|
82
81
|
? control.disable({ emitEvent: false })
|
|
83
82
|
: control.enable({ emitEvent: false });
|
|
84
83
|
}
|
|
85
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
86
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
84
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: TimepickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
85
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.14", type: TimepickerComponent, isStandalone: true, selector: "igo-timepicker", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, hourInputLabel: { classPropertyName: "hourInputLabel", publicName: "hourInputLabel", isSignal: true, isRequired: false, transformFunction: null }, minuteInputLabel: { classPropertyName: "minuteInputLabel", publicName: "minuteInputLabel", isSignal: true, isRequired: false, transformFunction: null }, minHour: { classPropertyName: "minHour", publicName: "minHour", isSignal: true, isRequired: false, transformFunction: null }, maxHour: { classPropertyName: "maxHour", publicName: "maxHour", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null }, interval: { classPropertyName: "interval", publicName: "interval", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: "<mat-form-field class=\"hour-input\" subscriptSizing=\"dynamic\">\n <mat-label>{{ hourInputLabel() }}</mat-label>\n <mat-select name=\"hour\" [formControl]=\"hourFormControl\">\n @for (hour of hours; track hour) {\n <mat-option [value]=\"hour\">\n {{ hour }}\n </mat-option>\n }\n </mat-select>\n</mat-form-field>\n<mat-form-field class=\"minute-input\" subscriptSizing=\"dynamic\">\n <mat-label>{{ minuteInputLabel() }}</mat-label>\n <mat-select name=\"minute\" [formControl]=\"minuteFormControl\">\n @for (minute of minutes; track minute) {\n <mat-option [value]=\"minute\">\n {{ minute }}\n </mat-option>\n }\n </mat-select>\n</mat-form-field>\n", styles: [":host{display:flex;gap:8px;align-items:center}:host .hour-input,:host .minute-input{width:84px}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i3.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i3.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }] });
|
|
87
86
|
}
|
|
88
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
87
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: TimepickerComponent, decorators: [{
|
|
89
88
|
type: Component,
|
|
90
89
|
args: [{ selector: 'igo-timepicker', imports: [
|
|
91
90
|
FormsModule,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"igo2-common-timepicker.mjs","sources":["../../../packages/common/timepicker/src/timepicker.component.ts","../../../packages/common/timepicker/src/timepicker.component.html","../../../packages/common/timepicker/src/igo2-common-timepicker.ts"],"sourcesContent":["import { Component, Input, OnInit, input, output } from '@angular/core';\nimport { FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatSelectModule } from '@angular/material/select';\n\nimport { TimeFrame, isTimeFrame, resolveDate } from '@igo2/utils';\n\nimport { combineLatest } from 'rxjs';\nimport { startWith } from 'rxjs/operators';\n\n@Component({\n selector: 'igo-timepicker',\n templateUrl: './timepicker.component.html',\n styleUrls: ['./timepicker.component.scss'],\n imports: [\n FormsModule,\n MatFormFieldModule,\n ReactiveFormsModule,\n MatSelectModule\n ]\n})\nexport class TimepickerComponent implements OnInit {\n readonly value = input<Date | TimeFrame>(undefined);\n readonly hourInputLabel = input<string>('Hour');\n readonly minuteInputLabel = input<string>('Minute');\n\n readonly minHour = input<number | undefined>(undefined);\n readonly maxHour = input<number | undefined>(undefined);\n\n @Input()\n set disabled(value: boolean) {\n this._disabled = value;\n this.setDisabledState();\n }\n get disabled(): boolean {\n return this._disabled;\n }\n private _disabled = false;\n\n /** interval in minutes*/\n readonly interval = input<number>(1);\n readonly valueChange = output<{\n hour: number;\n minute: number;\n }>();\n\n hourFormControl: FormControl<number>;\n minuteFormControl: FormControl<number>;\n\n get hours(): number[] {\n const step = this.interval() >= 60 ? this.interval() / 60 : 1;\n const fullHours = Array.from(\n { length: Math.ceil(24 / step) },\n (_, i) => i * step\n );\n\n return fullHours.filter((hour) => {\n const minHour = this.minHour();\n if (minHour !== undefined && hour < minHour) return false;\n const maxHour = this.maxHour();\n if (maxHour !== undefined && hour > maxHour) return false;\n return true;\n });\n }\n\n get minutes(): number[] {\n const minuteStep = this.interval() < 60 ? this.interval() : 0;\n return minuteStep > 0\n ? Array.from(\n { length: Math.ceil(60 / minuteStep) },\n (_, i) => i * minuteStep\n )\n : [0];\n }\n\n ngOnInit(): void {\n const date = resolveDate(this.value() ?? new Date());\n const hours = date.getHours();\n const minutes = date.getMinutes();\n this.hourFormControl = new FormControl({\n value: hours,\n disabled: this.disabled || isTimeFrame(this.value())\n });\n this.minuteFormControl = new FormControl({\n value: minutes,\n disabled: this.disabled || isTimeFrame(this.value())\n });\n\n combineLatest([\n this.hourFormControl.valueChanges.pipe(startWith(hours)),\n this.minuteFormControl.valueChanges.pipe(startWith(minutes))\n ]).subscribe(([hour, minute]) => this.valueChange.emit({ hour, minute }));\n }\n\n reset(value: Date | TimeFrame): void {\n const date = resolveDate(value);\n this.hourFormControl.setValue(date.getHours(), { emitEvent: false });\n this.minuteFormControl.setValue(date.getMinutes(), { emitEvent: false });\n }\n\n private setDisabledState(): void {\n if (!this.hourFormControl || !this.minuteFormControl) return;\n const disabled = this.disabled || isTimeFrame(this.value());\n this.toggleDisabled(this.hourFormControl, disabled);\n this.toggleDisabled(this.minuteFormControl, disabled);\n }\n\n private toggleDisabled(control: FormControl, disabled: boolean): void {\n disabled\n ? control.disable({ emitEvent: false })\n : control.enable({ emitEvent: false });\n }\n}\n","<mat-form-field class=\"hour-input\" subscriptSizing=\"dynamic\">\n <mat-label>{{ hourInputLabel() }}</mat-label>\n <mat-select name=\"hour\" [formControl]=\"hourFormControl\">\n @for (hour of hours; track hour) {\n <mat-option [value]=\"hour\">\n {{ hour }}\n </mat-option>\n }\n </mat-select>\n</mat-form-field>\n<mat-form-field class=\"minute-input\" subscriptSizing=\"dynamic\">\n <mat-label>{{ minuteInputLabel() }}</mat-label>\n <mat-select name=\"minute\" [formControl]=\"minuteFormControl\">\n @for (minute of minutes; track minute) {\n <mat-option [value]=\"minute\">\n {{ minute }}\n </mat-option>\n }\n </mat-select>\n</mat-form-field>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;MAqBa,mBAAmB,CAAA;AACrB,IAAA,KAAK,GAAG,KAAK,CAAmB,SAAS,iDAAC;AAC1C,IAAA,cAAc,GAAG,KAAK,CAAS,MAAM,0DAAC;AACtC,IAAA,gBAAgB,GAAG,KAAK,CAAS,QAAQ,4DAAC;AAE1C,IAAA,OAAO,GAAG,KAAK,CAAqB,SAAS,mDAAC;AAC9C,IAAA,OAAO,GAAG,KAAK,CAAqB,SAAS,mDAAC;IAEvD,IACI,QAAQ,CAAC,KAAc,EAAA;AACzB,QAAA,IAAI,CAAC,SAAS,GAAG,KAAK;QACtB,IAAI,CAAC,gBAAgB,EAAE;IACzB;AACA,IAAA,IAAI,QAAQ,GAAA;QACV,OAAO,IAAI,CAAC,SAAS;IACvB;IACQ,SAAS,GAAG,KAAK;;AAGhB,IAAA,QAAQ,GAAG,KAAK,CAAS,CAAC,oDAAC;IAC3B,WAAW,GAAG,MAAM,EAGzB;AAEJ,IAAA,eAAe;AACf,IAAA,iBAAiB;AAEjB,IAAA,IAAI,KAAK,GAAA;QACP,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC,QAAQ,EAAE,GAAG,EAAE,GAAG,CAAC;AAC7D,QAAA,MAAM,SAAS,GAAG,KAAK,CAAC,IAAI,CAC1B,EAAE,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,EAAE,EAChC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC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AA,EAAA,wBAAA,EAAA,aAAA,EAAA,OAAA,EAAA,YAAA,EAAA,iBAAA,EAAA,mBAAA,EAAA,2BAAA,EAAA,gBAAA,EAAA,IAAA,EAAA,YAAA,EAAA,0BAAA,CAAA,EAAA,OAAA,EAAA,CAAA,cAAA,EAAA,QAAA,EAAA,QAAA,EAAA,iBAAA,EAAA,aAAA,CAAA,EAAA,QAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,QAAA,EAAA,YAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,IAAA,EAAA,UAAA,CAAA,EAAA,OAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,QAAA,EAAA,CAAA,WAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;4FAGN,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAX/B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,gBAAgB,EAAA,OAAA,EAGjB;wBACP,WAAW;wBACX,kBAAkB;wBAClB,mBAAmB;wBACnB;AACD,qBAAA,EAAA,QAAA,EAAA,8rBAAA,EAAA,MAAA,EAAA,CAAA,mGAAA,CAAA,EAAA;;sBAUA;;;AE7BH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"igo2-common-timepicker.mjs","sources":["../../../packages/common/timepicker/src/timepicker.component.ts","../../../packages/common/timepicker/src/timepicker.component.html","../../../packages/common/timepicker/src/igo2-common-timepicker.ts"],"sourcesContent":["import { Component, Input, OnInit, input, output } from '@angular/core';\nimport { FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatSelectModule } from '@angular/material/select';\n\nimport { TimeFrame, isTimeFrame, resolveDate } from '@igo2/utils';\n\nimport { combineLatest } from 'rxjs';\nimport { startWith } from 'rxjs/operators';\n\n@Component({\n selector: 'igo-timepicker',\n templateUrl: './timepicker.component.html',\n styleUrls: ['./timepicker.component.scss'],\n imports: [\n FormsModule,\n MatFormFieldModule,\n ReactiveFormsModule,\n MatSelectModule\n ]\n})\nexport class TimepickerComponent implements OnInit {\n readonly value = input<Date | TimeFrame>();\n readonly hourInputLabel = input<string>('Hour');\n readonly minuteInputLabel = input<string>('Minute');\n\n readonly minHour = input<number>();\n readonly maxHour = input<number>();\n\n @Input()\n set disabled(value: boolean) {\n this._disabled = value;\n this.setDisabledState();\n }\n get disabled(): boolean {\n return this._disabled;\n }\n private _disabled = false;\n\n /** interval in minutes*/\n readonly interval = input<number>(1);\n readonly valueChange = output<{\n hour: number;\n minute: number;\n }>();\n\n hourFormControl!: FormControl<number>;\n minuteFormControl!: FormControl<number>;\n\n get hours(): number[] {\n const step = this.interval() >= 60 ? this.interval() / 60 : 1;\n const fullHours = Array.from(\n { length: Math.ceil(24 / step) },\n (_, i) => i * step\n );\n\n return fullHours.filter((hour) => {\n const minHour = this.minHour();\n if (minHour !== undefined && hour < minHour) return false;\n const maxHour = this.maxHour();\n if (maxHour !== undefined && hour > maxHour) return false;\n return true;\n });\n }\n\n get minutes(): number[] {\n const minuteStep = this.interval() < 60 ? this.interval() : 0;\n return minuteStep > 0\n ? Array.from(\n { length: Math.ceil(60 / minuteStep) },\n (_, i) => i * minuteStep\n )\n : [0];\n }\n\n ngOnInit(): void {\n const date = resolveDate(this.value() ?? new Date())!;\n const hours = date.getHours();\n const minutes = date.getMinutes();\n this.hourFormControl = new FormControl(hours, {\n nonNullable: true\n });\n this.minuteFormControl = new FormControl(minutes, {\n nonNullable: true\n });\n this.setDisabledState();\n\n combineLatest([\n this.hourFormControl.valueChanges.pipe(startWith(hours)),\n this.minuteFormControl.valueChanges.pipe(startWith(minutes))\n ]).subscribe(([hour, minute]) => this.valueChange.emit({ hour, minute }));\n }\n\n reset(value: Date | TimeFrame): void {\n const date = resolveDate(value)!;\n this.hourFormControl.setValue(date.getHours(), { emitEvent: false });\n this.minuteFormControl.setValue(date.getMinutes(), { emitEvent: false });\n }\n\n private setDisabledState(): void {\n if (!this.hourFormControl || !this.minuteFormControl) return;\n const disabled = this.disabled || isTimeFrame(this.value() as any);\n this.toggleDisabled(this.hourFormControl, disabled);\n this.toggleDisabled(this.minuteFormControl, disabled);\n }\n\n private toggleDisabled(control: FormControl, disabled: boolean): void {\n disabled\n ? control.disable({ emitEvent: false })\n : control.enable({ emitEvent: false });\n }\n}\n","<mat-form-field class=\"hour-input\" subscriptSizing=\"dynamic\">\n <mat-label>{{ hourInputLabel() }}</mat-label>\n <mat-select name=\"hour\" [formControl]=\"hourFormControl\">\n @for (hour of hours; track hour) {\n <mat-option [value]=\"hour\">\n {{ hour }}\n </mat-option>\n }\n </mat-select>\n</mat-form-field>\n<mat-form-field class=\"minute-input\" subscriptSizing=\"dynamic\">\n <mat-label>{{ minuteInputLabel() }}</mat-label>\n <mat-select name=\"minute\" [formControl]=\"minuteFormControl\">\n @for (minute of minutes; track minute) {\n <mat-option [value]=\"minute\">\n {{ minute }}\n </mat-option>\n }\n </mat-select>\n</mat-form-field>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;MAqBa,mBAAmB,CAAA;IACrB,KAAK,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,OAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAoB;AACjC,IAAA,cAAc,GAAG,KAAK,CAAS,MAAM,qFAAC;AACtC,IAAA,gBAAgB,GAAG,KAAK,CAAS,QAAQ,uFAAC;IAE1C,OAAO,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,SAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAU;IACzB,OAAO,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,SAAA,EAAA,CAAA,8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